From 3f0d3f49b84c55bbc827d461c73cdd36fa3aaa0d Mon Sep 17 00:00:00 2001 From: "C. J. Howard" Date: Wed, 6 Sep 2023 15:17:20 +0800 Subject: [PATCH] Upgrade SDL to v2.28.2. Upgrade stb_image to v2.28 --- modules/SDL2/.clang-format | 9 +- modules/SDL2/.editorconfig | 2 + modules/SDL2/.github/cmake/CMakeLists.txt | 16 + modules/SDL2/.github/workflows/emscripten.yml | 2 +- modules/SDL2/.github/workflows/main.yml | 54 +- modules/SDL2/.github/workflows/msvc.yml | 2 +- modules/SDL2/.github/workflows/n3ds.yml | 17 +- modules/SDL2/.github/workflows/ps2.yaml | 4 +- modules/SDL2/.github/workflows/psp.yaml | 4 +- modules/SDL2/.github/workflows/vita.yaml | 42 + modules/SDL2/.gitignore | 6 + modules/SDL2/.wikiheaders-options | 10 +- modules/SDL2/Android.mk | 3 +- modules/SDL2/CMakeLists.txt | 364 +- modules/SDL2/Makefile.in | 3 +- modules/SDL2/Makefile.minimal | 4 +- modules/SDL2/Makefile.os2 | 2 +- modules/SDL2/Makefile.w32 | 2 +- modules/SDL2/SDL2Config.cmake.in | 14 +- .../VisualC-GDK/tests/testgdk/src/testgdk.cpp | 13 +- modules/SDL2/VisualC/SDL/SDL.vcxproj | 1 + modules/SDL2/WhatsNew.txt | 27 +- .../SDL2/Xcode-iOS/Demos/src/accelerometer.c | 4 +- modules/SDL2/Xcode-iOS/Demos/src/fireworks.c | 25 +- modules/SDL2/Xcode-iOS/Demos/src/happy.c | 2 +- modules/SDL2/Xcode-iOS/Demos/src/keyboard.c | 4 +- modules/SDL2/Xcode-iOS/Demos/src/mixer.c | 4 +- modules/SDL2/Xcode-iOS/Demos/src/rectangles.c | 4 +- modules/SDL2/Xcode-iOS/Demos/src/touch.c | 2 +- modules/SDL2/Xcode/SDL/Info-Framework.plist | 4 +- .../Xcode/SDL/SDL.xcodeproj/project.pbxproj | 24 +- modules/SDL2/Xcode/SDL/pkg-support/SDL.info | 2 +- modules/SDL2/android-project/app/build.gradle | 20 +- .../app/src/main/AndroidManifest.xml | 1 - .../app/HIDDeviceBLESteamController.java | 4 +- .../java/org/libsdl/app/HIDDeviceManager.java | 16 +- .../java/org/libsdl/app/HIDDeviceUSB.java | 6 +- .../app/src/main/java/org/libsdl/app/SDL.java | 1 + .../main/java/org/libsdl/app/SDLActivity.java | 97 +- .../java/org/libsdl/app/SDLAudioManager.java | 164 +- .../org/libsdl/app/SDLControllerManager.java | 78 +- .../main/java/org/libsdl/app/SDLSurface.java | 4 +- modules/SDL2/android-project/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- modules/SDL2/android-project/gradlew | 4 +- .../SDL2/build-scripts/androidbuildlibs.sh | 2 +- .../SDL2/build-scripts/clang-format-src.sh | 32 + modules/SDL2/build-scripts/config.guess | 59 +- modules/SDL2/build-scripts/config.sub | 87 +- modules/SDL2/build-scripts/test-versioning.sh | 21 + modules/SDL2/build-scripts/update-version.sh | 4 + modules/SDL2/build-scripts/wikiheaders.pl | 296 +- modules/SDL2/cmake/CheckCPUArchitecture.cmake | 2 + modules/SDL2/cmake/macros.cmake | 10 +- modules/SDL2/cmake/sdlchecks.cmake | 77 +- modules/SDL2/cmake/sdlfind.cmake | 9 + modules/SDL2/cmake/sdlplatform.cmake | 57 + modules/SDL2/cmake/test/test_pkgconfig.sh | 30 +- modules/SDL2/cmake/test/test_sdlconfig.sh | 30 +- modules/SDL2/configure | 369 +- modules/SDL2/configure.ac | 79 +- modules/SDL2/docs/README-android.md | 64 +- modules/SDL2/docs/README-cmake.md | 14 +- modules/SDL2/docs/README-directfb.md | 10 +- modules/SDL2/docs/README-dynapi.md | 108 +- modules/SDL2/docs/README-gdk.md | 6 +- modules/SDL2/docs/README-gesture.md | 6 +- modules/SDL2/docs/README-ios.md | 22 +- modules/SDL2/docs/README-linux.md | 34 +- modules/SDL2/docs/README-macos.md | 14 +- modules/SDL2/docs/README-n3ds.md | 1 + modules/SDL2/docs/README-nacl.md | 52 +- modules/SDL2/docs/README-os2.md | 2 +- modules/SDL2/docs/README-pandora.md | 2 +- modules/SDL2/docs/README-ps2.md | 4 +- modules/SDL2/docs/README-psp.md | 4 +- modules/SDL2/docs/README-raspberrypi.md | 40 +- modules/SDL2/docs/README-touch.md | 2 +- modules/SDL2/docs/README-visualc.md | 10 +- modules/SDL2/docs/README-vita.md | 4 +- modules/SDL2/docs/README-windows.md | 4 +- modules/SDL2/docs/README-winrt.md | 128 +- modules/SDL2/include/SDL_assert.h | 14 +- modules/SDL2/include/SDL_atomic.h | 5 +- modules/SDL2/include/SDL_audio.h | 14 +- modules/SDL2/include/SDL_blendmode.h | 2 +- modules/SDL2/include/SDL_config.h.cmake | 4 + modules/SDL2/include/SDL_config.h.in | 3 + modules/SDL2/include/SDL_config_xbox.h | 17 +- modules/SDL2/include/SDL_endian.h | 6 +- modules/SDL2/include/SDL_gamecontroller.h | 8 +- modules/SDL2/include/SDL_hints.h | 111 +- modules/SDL2/include/SDL_joystick.h | 13 +- modules/SDL2/include/SDL_keycode.h | 2 +- modules/SDL2/include/SDL_main.h | 7 + modules/SDL2/include/SDL_mouse.h | 13 +- modules/SDL2/include/SDL_mutex.h | 84 +- modules/SDL2/include/SDL_opengl_glext.h | 6 +- modules/SDL2/include/SDL_power.h | 15 +- modules/SDL2/include/SDL_render.h | 7 +- modules/SDL2/include/SDL_sensor.h | 2 +- modules/SDL2/include/SDL_stdinc.h | 30 +- modules/SDL2/include/SDL_thread.h | 4 +- modules/SDL2/include/SDL_version.h | 2 +- modules/SDL2/include/SDL_video.h | 32 +- modules/SDL2/include/begin_code.h | 14 +- modules/SDL2/include/close_code.h | 4 +- modules/SDL2/sdl2-config.cmake.in | 16 + modules/SDL2/sdl2.pc.in | 2 +- modules/SDL2/src/SDL.c | 115 +- modules/SDL2/src/SDL_assert.c | 123 +- modules/SDL2/src/SDL_dataqueue.c | 159 +- modules/SDL2/src/SDL_dataqueue.h | 17 +- modules/SDL2/src/SDL_error.c | 24 +- modules/SDL2/src/SDL_guid.c | 14 +- modules/SDL2/src/SDL_hints.c | 61 +- modules/SDL2/src/SDL_internal.h | 33 +- modules/SDL2/src/SDL_list.c | 16 +- modules/SDL2/src/SDL_list.h | 1 - modules/SDL2/src/SDL_log.c | 184 +- modules/SDL2/src/SDL_utils_c.h | 2 +- modules/SDL2/src/atomic/SDL_atomic.c | 83 +- modules/SDL2/src/atomic/SDL_spinlock.c | 69 +- modules/SDL2/src/audio/SDL_audio.c | 499 +- modules/SDL2/src/audio/SDL_audio_c.h | 8 +- .../src/audio/SDL_audio_channel_converters.h | 579 +- .../src/audio/SDL_audio_resampler_filter.h | 7 +- modules/SDL2/src/audio/SDL_audiocvt.c | 680 +- modules/SDL2/src/audio/SDL_audiodev.c | 36 +- modules/SDL2/src/audio/SDL_audiodev_c.h | 6 +- modules/SDL2/src/audio/SDL_audiotypecvt.c | 880 +- modules/SDL2/src/audio/SDL_mixer.c | 430 +- modules/SDL2/src/audio/SDL_sysaudio.h | 41 +- modules/SDL2/src/audio/SDL_wave.c | 286 +- modules/SDL2/src/audio/SDL_wave.h | 46 +- modules/SDL2/src/audio/aaudio/SDL_aaudio.c | 98 +- modules/SDL2/src/audio/aaudio/SDL_aaudio.h | 5 +- .../SDL2/src/audio/aaudio/SDL_aaudiofuncs.h | 111 +- modules/SDL2/src/audio/alsa/SDL_alsa_audio.c | 441 +- modules/SDL2/src/audio/alsa/SDL_alsa_audio.h | 2 +- .../SDL2/src/audio/android/SDL_androidaudio.c | 71 +- .../SDL2/src/audio/android/SDL_androidaudio.h | 2 +- modules/SDL2/src/audio/arts/SDL_artsaudio.c | 39 +- .../SDL2/src/audio/coreaudio/SDL_coreaudio.h | 2 +- .../SDL2/src/audio/coreaudio/SDL_coreaudio.m | 312 +- .../src/audio/directsound/SDL_directsound.c | 149 +- .../src/audio/directsound/SDL_directsound.h | 2 +- modules/SDL2/src/audio/disk/SDL_diskaudio.c | 64 +- modules/SDL2/src/audio/disk/SDL_diskaudio.h | 2 +- modules/SDL2/src/audio/dsp/SDL_dspaudio.c | 65 +- modules/SDL2/src/audio/dsp/SDL_dspaudio.h | 4 +- modules/SDL2/src/audio/dummy/SDL_dummyaudio.c | 16 +- modules/SDL2/src/audio/dummy/SDL_dummyaudio.h | 2 +- .../audio/emscripten/SDL_emscriptenaudio.c | 55 +- .../audio/emscripten/SDL_emscriptenaudio.h | 2 +- modules/SDL2/src/audio/esd/SDL_esdaudio.c | 39 +- .../SDL2/src/audio/fusionsound/SDL_fsaudio.c | 36 +- .../SDL2/src/audio/haiku/SDL_haikuaudio.cc | 21 +- modules/SDL2/src/audio/haiku/SDL_haikuaudio.h | 2 +- modules/SDL2/src/audio/jack/SDL_jackaudio.c | 159 +- modules/SDL2/src/audio/n3ds/SDL_n3dsaudio.c | 60 +- modules/SDL2/src/audio/nacl/SDL_naclaudio.c | 39 +- modules/SDL2/src/audio/nas/SDL_nasaudio.c | 60 +- .../SDL2/src/audio/netbsd/SDL_netbsdaudio.c | 54 +- .../SDL2/src/audio/netbsd/SDL_netbsdaudio.h | 4 +- .../SDL2/src/audio/openslES/SDL_openslES.c | 116 +- .../SDL2/src/audio/openslES/SDL_openslES.h | 10 +- modules/SDL2/src/audio/os2/SDL_os2audio.c | 289 +- modules/SDL2/src/audio/os2/SDL_os2audio.h | 5 +- modules/SDL2/src/audio/paudio/SDL_paudio.c | 27 +- .../SDL2/src/audio/pipewire/SDL_pipewire.c | 329 +- .../SDL2/src/audio/pipewire/SDL_pipewire.h | 8 +- modules/SDL2/src/audio/ps2/SDL_ps2audio.c | 43 +- modules/SDL2/src/audio/ps2/SDL_ps2audio.h | 18 +- modules/SDL2/src/audio/psp/SDL_pspaudio.c | 64 +- modules/SDL2/src/audio/psp/SDL_pspaudio.h | 13 +- .../src/audio/pulseaudio/SDL_pulseaudio.c | 307 +- .../src/audio/pulseaudio/SDL_pulseaudio.h | 2 +- modules/SDL2/src/audio/qsa/SDL_qsa_audio.c | 33 +- modules/SDL2/src/audio/sndio/SDL_sndioaudio.c | 110 +- modules/SDL2/src/audio/sndio/SDL_sndioaudio.h | 2 +- modules/SDL2/src/audio/sun/SDL_sunaudio.c | 30 +- modules/SDL2/src/audio/vita/SDL_vitaaudio.c | 29 +- modules/SDL2/src/audio/vita/SDL_vitaaudio.h | 13 +- modules/SDL2/src/audio/wasapi/SDL_wasapi.c | 174 +- modules/SDL2/src/audio/wasapi/SDL_wasapi.h | 1 + .../SDL2/src/audio/wasapi/SDL_wasapi_win32.c | 43 +- .../src/audio/wasapi/SDL_wasapi_winrt.cpp | 130 +- modules/SDL2/src/audio/winmm/SDL_winmm.c | 56 +- modules/SDL2/src/core/android/SDL_android.c | 746 +- modules/SDL2/src/core/android/SDL_android.h | 17 +- .../freebsd/SDL_evdev_kbd_default_keyaccmap.h | 2 + .../src/core/freebsd/SDL_evdev_kbd_freebsd.c | 183 +- modules/SDL2/src/core/gdk/SDL_gdk.cpp | 65 +- modules/SDL2/src/core/linux/SDL_dbus.c | 181 +- modules/SDL2/src/core/linux/SDL_dbus.h | 17 +- modules/SDL2/src/core/linux/SDL_evdev.c | 231 +- .../src/core/linux/SDL_evdev_capabilities.c | 21 +- .../src/core/linux/SDL_evdev_capabilities.h | 30 +- modules/SDL2/src/core/linux/SDL_evdev_kbd.c | 372 +- .../core/linux/SDL_evdev_kbd_default_keymap.h | 6 +- modules/SDL2/src/core/linux/SDL_fcitx.c | 127 +- modules/SDL2/src/core/linux/SDL_ibus.c | 292 +- modules/SDL2/src/core/linux/SDL_ibus.h | 4 +- modules/SDL2/src/core/linux/SDL_ime.c | 51 +- modules/SDL2/src/core/linux/SDL_sandbox.c | 6 +- modules/SDL2/src/core/linux/SDL_threadprio.c | 87 +- modules/SDL2/src/core/linux/SDL_udev.c | 91 +- modules/SDL2/src/core/linux/SDL_udev.h | 13 +- modules/SDL2/src/core/openbsd/SDL_wscons.h | 2 - .../SDL2/src/core/openbsd/SDL_wscons_kbd.c | 940 +- .../SDL2/src/core/openbsd/SDL_wscons_mouse.c | 120 +- modules/SDL2/src/core/unix/SDL_poll.c | 9 +- modules/SDL2/src/core/windows/SDL_directx.h | 33 +- modules/SDL2/src/core/windows/SDL_hid.c | 16 +- modules/SDL2/src/core/windows/SDL_hid.h | 237 +- modules/SDL2/src/core/windows/SDL_immdevice.c | 116 +- modules/SDL2/src/core/windows/SDL_windows.c | 156 +- modules/SDL2/src/core/windows/SDL_windows.h | 48 +- modules/SDL2/src/core/windows/SDL_xinput.c | 35 +- modules/SDL2/src/core/windows/SDL_xinput.h | 73 +- .../src/core/winrt/SDL_winrtapp_common.cpp | 18 +- .../src/core/winrt/SDL_winrtapp_direct3d.cpp | 303 +- .../src/core/winrt/SDL_winrtapp_direct3d.h | 75 +- .../SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp | 41 +- .../SDL2/src/core/winrt/SDL_winrtapp_xaml.h | 2 +- modules/SDL2/src/cpuinfo/SDL_cpuinfo.c | 575 +- modules/SDL2/src/dynapi/SDL2.exports | 3 + modules/SDL2/src/dynapi/SDL_dynapi.c | 333 +- modules/SDL2/src/dynapi/SDL_dynapi.h | 18 +- .../SDL2/src/dynapi/SDL_dynapi_overrides.h | 3 + modules/SDL2/src/dynapi/SDL_dynapi_procs.h | 13 +- modules/SDL2/src/dynapi/gendynapi.pl | 1 + modules/SDL2/src/events/SDL_clipboardevents.c | 6 +- modules/SDL2/src/events/SDL_displayevents.c | 8 +- modules/SDL2/src/events/SDL_dropevents.c | 16 +- modules/SDL2/src/events/SDL_events.c | 882 +- modules/SDL2/src/events/SDL_events_c.h | 2 +- modules/SDL2/src/events/SDL_gesture.c | 307 +- modules/SDL2/src/events/SDL_gesture_c.h | 2 +- modules/SDL2/src/events/SDL_keyboard.c | 238 +- modules/SDL2/src/events/SDL_keyboard_c.h | 11 +- .../SDL2/src/events/SDL_keysym_to_scancode.c | 7 +- modules/SDL2/src/events/SDL_mouse.c | 207 +- modules/SDL2/src/events/SDL_mouse_c.h | 35 +- modules/SDL2/src/events/SDL_quit.c | 71 +- modules/SDL2/src/events/SDL_touch.c | 131 +- modules/SDL2/src/events/SDL_touch_c.h | 7 +- modules/SDL2/src/events/SDL_windowevents.c | 28 +- modules/SDL2/src/events/SDL_windowevents_c.h | 2 +- modules/SDL2/src/events/blank_cursor.h | 8 +- modules/SDL2/src/events/scancodes_ascii.h | 256 +- modules/SDL2/src/events/scancodes_linux.h | 8 +- modules/SDL2/src/file/SDL_rwops.c | 293 +- .../src/file/cocoa/SDL_rwopsbundlesupport.h | 2 +- .../src/file/cocoa/SDL_rwopsbundlesupport.m | 45 +- modules/SDL2/src/file/n3ds/SDL_rwopsromfs.c | 23 +- .../filesystem/android/SDL_sysfilesystem.c | 10 +- .../src/filesystem/cocoa/SDL_sysfilesystem.m | 159 +- .../src/filesystem/dummy/SDL_sysfilesystem.c | 6 +- .../filesystem/emscripten/SDL_sysfilesystem.c | 21 +- .../src/filesystem/haiku/SDL_sysfilesystem.cc | 14 +- .../src/filesystem/n3ds/SDL_sysfilesystem.c | 6 +- .../src/filesystem/nacl/SDL_sysfilesystem.c | 6 +- .../src/filesystem/os2/SDL_sysfilesystem.c | 6 +- .../src/filesystem/ps2/SDL_sysfilesystem.c | 122 +- .../src/filesystem/psp/SDL_sysfilesystem.c | 14 +- .../src/filesystem/riscos/SDL_sysfilesystem.c | 44 +- .../src/filesystem/unix/SDL_sysfilesystem.c | 124 +- .../src/filesystem/vita/SDL_sysfilesystem.c | 16 +- .../filesystem/windows/SDL_sysfilesystem.c | 33 +- .../filesystem/winrt/SDL_sysfilesystem.cpp | 102 +- modules/SDL2/src/haptic/SDL_haptic.c | 294 +- modules/SDL2/src/haptic/SDL_syshaptic.h | 64 +- .../SDL2/src/haptic/android/SDL_syshaptic.c | 146 +- .../SDL2/src/haptic/darwin/SDL_syshaptic.c | 296 +- .../SDL2/src/haptic/darwin/SDL_syshaptic_c.h | 5 +- modules/SDL2/src/haptic/dummy/SDL_syshaptic.c | 93 +- modules/SDL2/src/haptic/linux/SDL_syshaptic.c | 303 +- .../src/haptic/windows/SDL_dinputhaptic.c | 351 +- .../src/haptic/windows/SDL_dinputhaptic_c.h | 30 +- .../src/haptic/windows/SDL_windowshaptic.c | 89 +- .../src/haptic/windows/SDL_windowshaptic_c.h | 16 +- .../src/haptic/windows/SDL_xinputhaptic.c | 147 +- .../src/haptic/windows/SDL_xinputhaptic_c.h | 30 +- modules/SDL2/src/hidapi/SDL_hidapi.c | 582 +- modules/SDL2/src/hidapi/ios/hid.m | 4 +- modules/SDL2/src/hidapi/libusb/hid.c | 4 + modules/SDL2/src/hidapi/linux/hid.c | 18 +- modules/SDL2/src/hidapi/mac/hid.c | 10 +- modules/SDL2/src/hidapi/windows/hid.c | 3 +- .../SDL2/src/joystick/SDL_gamecontroller.c | 1606 +- .../SDL2/src/joystick/SDL_gamecontrollerdb.h | 78 +- modules/SDL2/src/joystick/SDL_joystick.c | 1374 +- modules/SDL2/src/joystick/SDL_joystick_c.h | 4 +- modules/SDL2/src/joystick/SDL_sysjoystick.h | 125 +- .../src/joystick/android/SDL_sysjoystick.c | 372 +- .../src/joystick/android/SDL_sysjoystick_c.h | 6 +- .../SDL2/src/joystick/bsd/SDL_bsdjoystick.c | 296 +- modules/SDL2/src/joystick/check_8bitdo.sh | 6 +- modules/SDL2/src/joystick/controller_list.h | 591 + modules/SDL2/src/joystick/controller_type.c | 567 +- .../src/joystick/darwin/SDL_iokitjoystick.c | 389 +- .../src/joystick/darwin/SDL_iokitjoystick_c.h | 34 +- .../SDL2/src/joystick/dummy/SDL_sysjoystick.c | 64 +- .../src/joystick/emscripten/SDL_sysjoystick.c | 121 +- .../joystick/emscripten/SDL_sysjoystick_c.h | 27 +- .../src/joystick/haiku/SDL_haikujoystick.cc | 7 +- .../src/joystick/hidapi/SDL_hidapi_combined.c | 57 +- .../src/joystick/hidapi/SDL_hidapi_gamecube.c | 172 +- .../src/joystick/hidapi/SDL_hidapi_luna.c | 100 +- .../src/joystick/hidapi/SDL_hidapi_nintendo.h | 37 +- .../SDL2/src/joystick/hidapi/SDL_hidapi_ps3.c | 296 +- .../SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c | 447 +- .../SDL2/src/joystick/hidapi/SDL_hidapi_ps5.c | 533 +- .../src/joystick/hidapi/SDL_hidapi_rumble.c | 47 +- .../src/joystick/hidapi/SDL_hidapi_rumble.h | 11 +- .../src/joystick/hidapi/SDL_hidapi_shield.c | 222 +- .../src/joystick/hidapi/SDL_hidapi_stadia.c | 120 +- .../src/joystick/hidapi/SDL_hidapi_steam.c | 878 +- .../src/joystick/hidapi/SDL_hidapi_switch.c | 708 +- .../SDL2/src/joystick/hidapi/SDL_hidapi_wii.c | 562 +- .../src/joystick/hidapi/SDL_hidapi_xbox360.c | 96 +- .../src/joystick/hidapi/SDL_hidapi_xbox360w.c | 89 +- .../src/joystick/hidapi/SDL_hidapi_xboxone.c | 335 +- .../src/joystick/hidapi/SDL_hidapijoystick.c | 512 +- .../joystick/hidapi/SDL_hidapijoystick_c.h | 14 +- .../src/joystick/iphoneos/SDL_mfijoystick.m | 420 +- .../src/joystick/iphoneos/SDL_mfijoystick_c.h | 1 - .../SDL2/src/joystick/linux/SDL_sysjoystick.c | 615 +- .../src/joystick/linux/SDL_sysjoystick_c.h | 2 +- .../SDL2/src/joystick/n3ds/SDL_sysjoystick.c | 60 +- .../SDL2/src/joystick/os2/SDL_os2joystick.c | 1118 +- .../SDL2/src/joystick/ps2/SDL_sysjoystick.c | 75 +- .../SDL2/src/joystick/psp/SDL_sysjoystick.c | 60 +- modules/SDL2/src/joystick/sort_controllers.py | 45 +- .../src/joystick/steam/SDL_steamcontroller.c | 1 - modules/SDL2/src/joystick/usb_ids.h | 201 +- .../joystick/virtual/SDL_virtualjoystick.c | 193 +- .../joystick/virtual/SDL_virtualjoystick_c.h | 10 +- .../SDL2/src/joystick/vita/SDL_sysjoystick.c | 108 +- .../src/joystick/windows/SDL_dinputjoystick.c | 267 +- .../joystick/windows/SDL_dinputjoystick_c.h | 10 +- .../joystick/windows/SDL_rawinputjoystick.c | 658 +- .../joystick/windows/SDL_rawinputjoystick_c.h | 5 +- .../windows/SDL_windows_gaming_input.c | 416 +- .../joystick/windows/SDL_windowsjoystick.c | 214 +- .../joystick/windows/SDL_windowsjoystick_c.h | 6 +- .../src/joystick/windows/SDL_xinputjoystick.c | 147 +- .../joystick/windows/SDL_xinputjoystick_c.h | 10 +- .../SDL2/src/loadso/dlopen/SDL_sysloadso.c | 17 +- modules/SDL2/src/loadso/dummy/SDL_sysloadso.c | 13 +- modules/SDL2/src/loadso/os2/SDL_sysloadso.c | 9 +- .../SDL2/src/loadso/windows/SDL_sysloadso.c | 19 +- modules/SDL2/src/locale/SDL_locale.c | 44 +- .../SDL2/src/locale/android/SDL_syslocale.c | 4 +- modules/SDL2/src/locale/dummy/SDL_syslocale.c | 4 +- .../src/locale/emscripten/SDL_syslocale.c | 6 +- .../SDL2/src/locale/haiku/SDL_syslocale.cc | 3 +- .../SDL2/src/locale/macosx/SDL_syslocale.m | 83 +- modules/SDL2/src/locale/n3ds/SDL_syslocale.c | 3 +- modules/SDL2/src/locale/unix/SDL_syslocale.c | 18 +- modules/SDL2/src/locale/vita/SDL_syslocale.c | 7 +- .../SDL2/src/locale/windows/SDL_syslocale.c | 45 +- modules/SDL2/src/locale/winrt/SDL_syslocale.c | 19 +- modules/SDL2/src/main/dummy/SDL_dummy_main.c | 8 +- modules/SDL2/src/main/gdk/SDL_gdk_main.c | 2 +- modules/SDL2/src/main/haiku/SDL_BApp.h | 190 +- modules/SDL2/src/main/haiku/SDL_BeApp.cc | 106 +- modules/SDL2/src/main/haiku/SDL_BeApp.h | 2 +- modules/SDL2/src/main/n3ds/SDL_n3ds_main.c | 3 +- modules/SDL2/src/main/nacl/SDL_nacl_main.c | 21 +- .../SDL2/src/main/ngage/SDL_ngage_main.cpp | 29 +- modules/SDL2/src/main/ps2/SDL_ps2_main.c | 47 +- modules/SDL2/src/main/psp/SDL_psp_main.c | 9 +- modules/SDL2/src/main/uikit/SDL_uikit_main.c | 3 +- .../SDL2/src/main/windows/SDL_windows_main.c | 33 +- modules/SDL2/src/main/windows/version.rc | 10 +- .../src/main/winrt/SDL_winrt_main_NonXAML.cpp | 2 +- modules/SDL2/src/misc/SDL_url.c | 7 +- modules/SDL2/src/misc/android/SDL_sysurl.c | 4 +- modules/SDL2/src/misc/dummy/SDL_sysurl.c | 4 +- modules/SDL2/src/misc/emscripten/SDL_sysurl.c | 7 +- modules/SDL2/src/misc/haiku/SDL_sysurl.cc | 3 +- modules/SDL2/src/misc/ios/SDL_sysurl.m | 16 +- modules/SDL2/src/misc/macosx/SDL_sysurl.m | 16 +- modules/SDL2/src/misc/riscos/SDL_sysurl.c | 4 +- modules/SDL2/src/misc/unix/SDL_sysurl.c | 24 +- modules/SDL2/src/misc/vita/SDL_sysurl.c | 4 +- modules/SDL2/src/misc/windows/SDL_sysurl.c | 11 +- modules/SDL2/src/misc/winrt/SDL_sysurl.cpp | 6 +- modules/SDL2/src/power/SDL_power.c | 31 +- modules/SDL2/src/power/android/SDL_syspower.c | 3 +- .../SDL2/src/power/emscripten/SDL_syspower.c | 6 +- modules/SDL2/src/power/haiku/SDL_syspower.c | 33 +- modules/SDL2/src/power/linux/SDL_syspower.c | 253 +- modules/SDL2/src/power/macosx/SDL_syspower.c | 39 +- modules/SDL2/src/power/n3ds/SDL_syspower.c | 11 +- modules/SDL2/src/power/psp/SDL_syspower.c | 14 +- modules/SDL2/src/power/uikit/SDL_syspower.h | 2 +- modules/SDL2/src/power/uikit/SDL_syspower.m | 15 +- modules/SDL2/src/power/vita/SDL_syspower.c | 14 +- modules/SDL2/src/power/windows/SDL_syspower.c | 22 +- modules/SDL2/src/power/winrt/SDL_syspower.cpp | 3 +- modules/SDL2/src/render/SDL_d3dmath.c | 1 - modules/SDL2/src/render/SDL_d3dmath.h | 7 +- modules/SDL2/src/render/SDL_render.c | 1116 +- modules/SDL2/src/render/SDL_sysrender.h | 145 +- modules/SDL2/src/render/SDL_yuv_sw.c | 229 +- modules/SDL2/src/render/SDL_yuv_sw_c.h | 20 +- .../SDL2/src/render/direct3d/SDL_render_d3d.c | 543 +- .../src/render/direct3d/SDL_shaders_d3d.c | 1 - .../src/render/direct3d/SDL_shaders_d3d.h | 3 +- .../src/render/direct3d11/SDL_render_d3d11.c | 1029 +- .../render/direct3d11/SDL_render_winrt.cpp | 8 +- .../src/render/direct3d11/SDL_render_winrt.h | 2 +- .../src/render/direct3d11/SDL_shaders_d3d11.c | 35 +- .../src/render/direct3d11/SDL_shaders_d3d11.h | 3 +- .../src/render/direct3d12/SDL_render_d3d12.c | 1324 +- .../src/render/direct3d12/SDL_shaders_d3d12.c | 110 +- .../src/render/direct3d12/SDL_shaders_d3d12.h | 8 +- .../SDL2/src/render/metal/SDL_render_metal.m | 174 +- modules/SDL2/src/render/opengl/SDL_glfuncs.h | 284 +- .../SDL2/src/render/opengl/SDL_render_gl.c | 813 +- .../SDL2/src/render/opengl/SDL_shaders_gl.c | 75 +- .../SDL2/src/render/opengl/SDL_shaders_gl.h | 5 +- .../SDL2/src/render/opengles/SDL_glesfuncs.h | 4 +- .../src/render/opengles/SDL_render_gles.c | 512 +- .../src/render/opengles2/SDL_gles2funcs.h | 4 +- .../src/render/opengles2/SDL_render_gles2.c | 848 +- .../src/render/opengles2/SDL_shaders_gles2.c | 13 +- modules/SDL2/src/render/ps2/SDL_render_ps2.c | 433 +- modules/SDL2/src/render/psp/SDL_render_psp.c | 927 +- .../src/render/software/SDL_blendfillrect.c | 49 +- .../src/render/software/SDL_blendfillrect.h | 5 +- .../SDL2/src/render/software/SDL_blendline.c | 89 +- .../SDL2/src/render/software/SDL_blendline.h | 5 +- .../SDL2/src/render/software/SDL_blendpoint.c | 47 +- .../SDL2/src/render/software/SDL_blendpoint.h | 5 +- modules/SDL2/src/render/software/SDL_draw.h | 701 +- .../SDL2/src/render/software/SDL_drawline.c | 57 +- .../SDL2/src/render/software/SDL_drawline.h | 5 +- .../SDL2/src/render/software/SDL_drawpoint.c | 13 +- .../SDL2/src/render/software/SDL_drawpoint.h | 5 +- .../SDL2/src/render/software/SDL_render_sw.c | 249 +- .../src/render/software/SDL_render_sw_c.h | 2 +- modules/SDL2/src/render/software/SDL_rotate.c | 239 +- modules/SDL2/src/render/software/SDL_rotate.h | 6 +- .../SDL2/src/render/software/SDL_triangle.c | 238 +- .../SDL2/src/render/software/SDL_triangle.h | 14 +- .../src/render/vitagxm/SDL_render_vita_gxm.c | 627 +- .../vitagxm/SDL_render_vita_gxm_memory.c | 80 +- .../vitagxm/SDL_render_vita_gxm_memory.h | 4 +- .../vitagxm/SDL_render_vita_gxm_shaders.h | 16 +- .../vitagxm/SDL_render_vita_gxm_tools.c | 355 +- .../vitagxm/SDL_render_vita_gxm_tools.h | 3 +- .../vitagxm/SDL_render_vita_gxm_types.h | 58 +- modules/SDL2/src/sensor/SDL_sensor.c | 111 +- modules/SDL2/src/sensor/SDL_syssensor.h | 24 +- .../src/sensor/android/SDL_androidsensor.c | 57 +- .../src/sensor/android/SDL_androidsensor.h | 1 - .../sensor/coremotion/SDL_coremotionsensor.h | 1 - .../sensor/coremotion/SDL_coremotionsensor.m | 97 +- .../SDL2/src/sensor/dummy/SDL_dummysensor.c | 38 +- modules/SDL2/src/sensor/n3ds/SDL_n3dssensor.c | 51 +- modules/SDL2/src/sensor/vita/SDL_vitasensor.c | 96 +- .../src/sensor/windows/SDL_windowssensor.c | 66 +- modules/SDL2/src/stdlib/SDL_crc16.c | 6 +- modules/SDL2/src/stdlib/SDL_crc32.c | 6 +- modules/SDL2/src/stdlib/SDL_getenv.c | 91 +- modules/SDL2/src/stdlib/SDL_iconv.c | 809 +- modules/SDL2/src/stdlib/SDL_malloc.c | 4136 +- modules/SDL2/src/stdlib/SDL_mslibc.c | 77 +- modules/SDL2/src/stdlib/SDL_qsort.c | 6 +- modules/SDL2/src/stdlib/SDL_stdlib.c | 119 +- modules/SDL2/src/stdlib/SDL_string.c | 550 +- modules/SDL2/src/stdlib/SDL_vacopy.h | 6 +- modules/SDL2/src/test/SDL_test_assert.c | 22 +- modules/SDL2/src/test/SDL_test_common.c | 511 +- modules/SDL2/src/test/SDL_test_compare.c | 147 +- modules/SDL2/src/test/SDL_test_crc32.c | 181 +- modules/SDL2/src/test/SDL_test_font.c | 4176 +- modules/SDL2/src/test/SDL_test_fuzzer.c | 284 +- modules/SDL2/src/test/SDL_test_harness.c | 234 +- modules/SDL2/src/test/SDL_test_imageBlit.c | 3102 +- .../SDL2/src/test/SDL_test_imageBlitBlend.c | 5623 +- modules/SDL2/src/test/SDL_test_imageFace.c | 408 +- .../SDL2/src/test/SDL_test_imagePrimitives.c | 956 +- .../src/test/SDL_test_imagePrimitivesBlend.c | 1311 +- modules/SDL2/src/test/SDL_test_log.c | 18 +- modules/SDL2/src/test/SDL_test_md5.c | 425 +- modules/SDL2/src/test/SDL_test_memory.c | 38 +- modules/SDL2/src/test/SDL_test_random.c | 89 +- modules/SDL2/src/thread/SDL_systhread.h | 10 +- modules/SDL2/src/thread/SDL_thread.c | 134 +- modules/SDL2/src/thread/SDL_thread_c.h | 16 +- modules/SDL2/src/thread/generic/SDL_syscond.c | 26 +- .../SDL2/src/thread/generic/SDL_syscond_c.h | 14 +- .../SDL2/src/thread/generic/SDL_sysmutex.c | 24 +- modules/SDL2/src/thread/generic/SDL_syssem.c | 55 +- .../SDL2/src/thread/generic/SDL_systhread.c | 29 +- modules/SDL2/src/thread/generic/SDL_systls.c | 7 +- modules/SDL2/src/thread/n3ds/SDL_syscond.c | 38 +- modules/SDL2/src/thread/n3ds/SDL_sysmutex.c | 23 +- modules/SDL2/src/thread/n3ds/SDL_syssem.c | 95 +- modules/SDL2/src/thread/n3ds/SDL_systhread.c | 33 +- .../SDL2/src/thread/ngage/SDL_sysmutex.cpp | 69 +- modules/SDL2/src/thread/ngage/SDL_syssem.cpp | 94 +- .../SDL2/src/thread/ngage/SDL_systhread.cpp | 63 +- modules/SDL2/src/thread/os2/SDL_sysmutex.c | 21 +- modules/SDL2/src/thread/os2/SDL_syssem.c | 21 +- modules/SDL2/src/thread/os2/SDL_systhread.c | 18 +- modules/SDL2/src/thread/ps2/SDL_syssem.c | 24 +- modules/SDL2/src/thread/ps2/SDL_systhread.c | 30 +- modules/SDL2/src/thread/psp/SDL_syscond.c | 28 +- modules/SDL2/src/thread/psp/SDL_sysmutex.c | 64 +- modules/SDL2/src/thread/psp/SDL_syssem.c | 29 +- modules/SDL2/src/thread/psp/SDL_systhread.c | 12 +- modules/SDL2/src/thread/pthread/SDL_syscond.c | 34 +- .../SDL2/src/thread/pthread/SDL_sysmutex.c | 25 +- modules/SDL2/src/thread/pthread/SDL_syssem.c | 59 +- .../SDL2/src/thread/pthread/SDL_systhread.c | 75 +- modules/SDL2/src/thread/pthread/SDL_systls.c | 7 +- .../SDL2/src/thread/stdcpp/SDL_syscond.cpp | 50 +- .../SDL2/src/thread/stdcpp/SDL_sysmutex.cpp | 39 +- .../SDL2/src/thread/stdcpp/SDL_systhread.cpp | 56 +- .../SDL2/src/thread/stdcpp/SDL_systhread_c.h | 2 +- modules/SDL2/src/thread/vita/SDL_syscond.c | 32 +- modules/SDL2/src/thread/vita/SDL_sysmutex.c | 67 +- modules/SDL2/src/thread/vita/SDL_syssem.c | 29 +- modules/SDL2/src/thread/vita/SDL_systhread.c | 57 +- .../SDL2/src/thread/windows/SDL_syscond_cv.c | 106 +- .../SDL2/src/thread/windows/SDL_sysmutex.c | 131 +- .../SDL2/src/thread/windows/SDL_sysmutex_c.h | 17 +- modules/SDL2/src/thread/windows/SDL_syssem.c | 136 +- .../SDL2/src/thread/windows/SDL_systhread.c | 123 +- modules/SDL2/src/thread/windows/SDL_systls.c | 8 +- modules/SDL2/src/timer/SDL_timer.c | 62 +- modules/SDL2/src/timer/SDL_timer_c.h | 2 +- modules/SDL2/src/timer/dummy/SDL_systimer.c | 18 +- modules/SDL2/src/timer/haiku/SDL_systimer.c | 20 +- modules/SDL2/src/timer/n3ds/SDL_systimer.c | 18 +- modules/SDL2/src/timer/ngage/SDL_systimer.cpp | 32 +- modules/SDL2/src/timer/os2/SDL_systimer.c | 22 +- modules/SDL2/src/timer/ps2/SDL_systimer.c | 21 +- modules/SDL2/src/timer/psp/SDL_systimer.c | 18 +- modules/SDL2/src/timer/unix/SDL_systimer.c | 26 +- modules/SDL2/src/timer/vita/SDL_systimer.c | 20 +- modules/SDL2/src/timer/windows/SDL_systimer.c | 42 +- modules/SDL2/src/video/SDL_RLEaccel.c | 1243 +- modules/SDL2/src/video/SDL_RLEaccel_c.h | 4 +- modules/SDL2/src/video/SDL_blit.c | 39 +- modules/SDL2/src/video/SDL_blit.h | 866 +- modules/SDL2/src/video/SDL_blit_0.c | 635 +- modules/SDL2/src/video/SDL_blit_1.c | 102 +- modules/SDL2/src/video/SDL_blit_A.c | 466 +- modules/SDL2/src/video/SDL_blit_N.c | 936 +- modules/SDL2/src/video/SDL_blit_auto.c | 24 - modules/SDL2/src/video/SDL_blit_auto.h | 4 +- modules/SDL2/src/video/SDL_blit_copy.c | 82 +- modules/SDL2/src/video/SDL_blit_copy.h | 2 +- modules/SDL2/src/video/SDL_blit_slow.c | 39 +- modules/SDL2/src/video/SDL_blit_slow.h | 2 +- modules/SDL2/src/video/SDL_bmp.c | 280 +- modules/SDL2/src/video/SDL_clipboard.c | 39 +- modules/SDL2/src/video/SDL_egl.c | 347 +- modules/SDL2/src/video/SDL_egl_c.h | 44 +- modules/SDL2/src/video/SDL_fillrect.c | 173 +- modules/SDL2/src/video/SDL_pixels.c | 322 +- modules/SDL2/src/video/SDL_pixels_c.h | 12 +- modules/SDL2/src/video/SDL_rect.c | 46 +- modules/SDL2/src/video/SDL_rect_c.h | 2 +- modules/SDL2/src/video/SDL_rect_impl.h | 86 +- modules/SDL2/src/video/SDL_shape.c | 275 +- modules/SDL2/src/video/SDL_shape_internals.h | 28 +- modules/SDL2/src/video/SDL_stretch.c | 409 +- modules/SDL2/src/video/SDL_surface.c | 317 +- modules/SDL2/src/video/SDL_sysvideo.h | 168 +- modules/SDL2/src/video/SDL_video.c | 1223 +- modules/SDL2/src/video/SDL_vulkan_internal.h | 5 +- modules/SDL2/src/video/SDL_vulkan_utils.c | 218 +- modules/SDL2/src/video/SDL_yuv.c | 944 +- modules/SDL2/src/video/SDL_yuv_c.h | 4 +- .../src/video/android/SDL_androidclipboard.c | 6 +- .../src/video/android/SDL_androidevents.c | 44 +- .../SDL2/src/video/android/SDL_androidgl.c | 21 +- .../SDL2/src/video/android/SDL_androidgl.h | 7 +- .../src/video/android/SDL_androidkeyboard.c | 584 +- .../src/video/android/SDL_androidkeyboard.h | 2 +- .../src/video/android/SDL_androidmessagebox.c | 3 +- .../SDL2/src/video/android/SDL_androidmouse.c | 126 +- .../SDL2/src/video/android/SDL_androidtouch.c | 38 +- .../SDL2/src/video/android/SDL_androidvideo.c | 99 +- .../SDL2/src/video/android/SDL_androidvideo.h | 6 +- .../src/video/android/SDL_androidvulkan.c | 77 +- .../src/video/android/SDL_androidvulkan.h | 12 +- .../src/video/android/SDL_androidwindow.c | 34 +- .../src/video/android/SDL_androidwindow.h | 4 +- .../SDL2/src/video/cocoa/SDL_cocoaclipboard.m | 12 +- .../SDL2/src/video/cocoa/SDL_cocoaevents.m | 42 +- .../SDL2/src/video/cocoa/SDL_cocoakeyboard.m | 132 +- .../src/video/cocoa/SDL_cocoamessagebox.m | 38 +- .../SDL2/src/video/cocoa/SDL_cocoametalview.m | 21 +- modules/SDL2/src/video/cocoa/SDL_cocoamodes.m | 48 +- modules/SDL2/src/video/cocoa/SDL_cocoamouse.h | 2 + modules/SDL2/src/video/cocoa/SDL_cocoamouse.m | 71 +- .../SDL2/src/video/cocoa/SDL_cocoaopengl.h | 2 +- .../SDL2/src/video/cocoa/SDL_cocoaopengl.m | 63 +- .../SDL2/src/video/cocoa/SDL_cocoaopengles.m | 23 +- modules/SDL2/src/video/cocoa/SDL_cocoashape.m | 12 +- modules/SDL2/src/video/cocoa/SDL_cocoavideo.m | 15 +- .../SDL2/src/video/cocoa/SDL_cocoawindow.m | 156 +- .../SDL2/src/video/directfb/SDL_DirectFB_WM.c | 27 +- .../src/video/directfb/SDL_DirectFB_dyn.c | 14 +- .../src/video/directfb/SDL_DirectFB_events.c | 46 +- .../src/video/directfb/SDL_DirectFB_modes.c | 29 +- .../src/video/directfb/SDL_DirectFB_mouse.c | 41 +- .../src/video/directfb/SDL_DirectFB_opengl.c | 42 +- .../src/video/directfb/SDL_DirectFB_render.c | 91 +- .../src/video/directfb/SDL_DirectFB_shape.c | 14 +- .../src/video/directfb/SDL_DirectFB_video.c | 21 +- .../src/video/directfb/SDL_DirectFB_window.c | 54 +- modules/SDL2/src/video/dummy/SDL_nullevents.c | 3 +- .../src/video/dummy/SDL_nullframebuffer.c | 23 +- .../src/video/dummy/SDL_nullframebuffer_c.h | 6 +- modules/SDL2/src/video/dummy/SDL_nullvideo.c | 52 +- .../video/emscripten/SDL_emscriptenevents.c | 906 +- .../video/emscripten/SDL_emscriptenevents.h | 2 - .../emscripten/SDL_emscriptenframebuffer.c | 20 +- .../emscripten/SDL_emscriptenframebuffer.h | 6 +- .../video/emscripten/SDL_emscriptenmouse.c | 160 +- .../video/emscripten/SDL_emscriptenmouse.h | 1 - .../video/emscripten/SDL_emscriptenopengles.c | 12 +- .../video/emscripten/SDL_emscriptenvideo.c | 99 +- modules/SDL2/src/video/haiku/SDL_BApp.h | 190 +- modules/SDL2/src/video/haiku/SDL_BWin.h | 393 +- .../SDL2/src/video/haiku/SDL_bclipboard.cc | 12 +- .../SDL2/src/video/haiku/SDL_bframebuffer.cc | 15 +- .../SDL2/src/video/haiku/SDL_bframebuffer.h | 12 +- modules/SDL2/src/video/haiku/SDL_bkeyboard.cc | 10 +- .../SDL2/src/video/haiku/SDL_bmessagebox.cc | 73 +- modules/SDL2/src/video/haiku/SDL_bmodes.cc | 48 +- modules/SDL2/src/video/haiku/SDL_bmodes.h | 4 +- modules/SDL2/src/video/haiku/SDL_bopengl.cc | 16 +- modules/SDL2/src/video/haiku/SDL_bopengl.h | 19 +- modules/SDL2/src/video/haiku/SDL_bvideo.cc | 34 +- modules/SDL2/src/video/haiku/SDL_bvideo.h | 1 - modules/SDL2/src/video/haiku/SDL_bwindow.cc | 28 +- modules/SDL2/src/video/haiku/SDL_bwindow.h | 4 - .../SDL2/src/video/khronos/vulkan/vulkan.hpp | 14537 --- .../src/video/khronos/vulkan/vulkan_enums.hpp | 8538 -- .../khronos/vulkan/vulkan_format_traits.hpp | 7333 -- .../src/video/khronos/vulkan/vulkan_funcs.hpp | 20008 ---- .../video/khronos/vulkan/vulkan_handles.hpp | 13585 --- .../src/video/khronos/vulkan/vulkan_hash.hpp | 13489 --- .../src/video/khronos/vulkan/vulkan_raii.hpp | 17460 --- .../vulkan/vulkan_static_assertions.hpp | 5847 - .../video/khronos/vulkan/vulkan_structs.hpp | 99721 ---------------- .../video/khronos/vulkan/vulkan_to_string.hpp | 7732 -- modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c | 53 +- modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h | 6 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c | 2 - .../SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c | 148 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h | 6 +- .../src/video/kmsdrm/SDL_kmsdrmopengles.c | 34 +- .../src/video/kmsdrm/SDL_kmsdrmopengles.h | 6 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c | 404 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h | 24 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.c | 163 +- .../SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.h | 12 +- modules/SDL2/src/video/n3ds/SDL_n3dsevents.c | 3 +- .../SDL2/src/video/n3ds/SDL_n3dsframebuffer.c | 25 +- modules/SDL2/src/video/n3ds/SDL_n3dsswkb.c | 18 +- modules/SDL2/src/video/n3ds/SDL_n3dstouch.c | 9 +- modules/SDL2/src/video/n3ds/SDL_n3dsvideo.c | 36 +- modules/SDL2/src/video/nacl/SDL_naclevents.c | 3 +- .../SDL2/src/video/nacl/SDL_naclopengles.c | 49 +- modules/SDL2/src/video/nacl/SDL_naclvideo.c | 46 +- modules/SDL2/src/video/nacl/SDL_naclwindow.c | 17 +- .../SDL2/src/video/ngage/SDL_ngageevents.cpp | 228 +- .../src/video/ngage/SDL_ngageframebuffer.cpp | 290 +- .../src/video/ngage/SDL_ngageframebuffer_c.h | 10 +- .../SDL2/src/video/ngage/SDL_ngagevideo.cpp | 81 +- modules/SDL2/src/video/ngage/SDL_ngagevideo.h | 38 +- .../SDL2/src/video/ngage/SDL_ngagewindow.cpp | 34 +- .../SDL2/src/video/ngage/SDL_ngagewindow.h | 11 +- .../src/video/offscreen/SDL_offscreenevents.c | 3 +- .../offscreen/SDL_offscreenframebuffer.c | 24 +- .../offscreen/SDL_offscreenframebuffer_c.h | 6 +- .../video/offscreen/SDL_offscreenopengles.c | 18 +- .../video/offscreen/SDL_offscreenopengles.h | 1 - .../src/video/offscreen/SDL_offscreenvideo.c | 23 +- .../src/video/offscreen/SDL_offscreenwindow.c | 10 +- .../src/video/offscreen/SDL_offscreenwindow.h | 7 +- modules/SDL2/src/video/os2/SDL_os2mouse.c | 4 +- modules/SDL2/src/video/pandora/SDL_pandora.c | 90 +- .../src/video/pandora/SDL_pandora_events.c | 3 +- modules/SDL2/src/video/ps2/SDL_ps2video.c | 17 +- modules/SDL2/src/video/psp/SDL_pspevents.c | 70 +- modules/SDL2/src/video/psp/SDL_pspevents_c.h | 1 - modules/SDL2/src/video/psp/SDL_pspgl.c | 159 +- modules/SDL2/src/video/psp/SDL_pspgl_c.h | 22 +- modules/SDL2/src/video/psp/SDL_pspmouse.c | 4 +- modules/SDL2/src/video/psp/SDL_pspvideo.c | 95 +- modules/SDL2/src/video/psp/SDL_pspvideo.h | 49 +- modules/SDL2/src/video/qnx/gl.c | 30 +- modules/SDL2/src/video/qnx/keyboard.c | 3 +- modules/SDL2/src/video/qnx/video.c | 36 +- .../SDL2/src/video/raspberry/SDL_rpievents.c | 2 - .../SDL2/src/video/raspberry/SDL_rpimouse.c | 141 +- .../SDL2/src/video/raspberry/SDL_rpimouse.h | 10 +- .../src/video/raspberry/SDL_rpiopengles.c | 18 +- .../src/video/raspberry/SDL_rpiopengles.h | 8 +- .../SDL2/src/video/raspberry/SDL_rpivideo.c | 160 +- .../SDL2/src/video/raspberry/SDL_rpivideo.h | 47 +- .../SDL2/src/video/riscos/SDL_riscosdefs.h | 6 +- .../SDL2/src/video/riscos/SDL_riscosevents.c | 31 +- .../src/video/riscos/SDL_riscosframebuffer.c | 31 +- .../video/riscos/SDL_riscosframebuffer_c.h | 6 +- .../src/video/riscos/SDL_riscosmessagebox.c | 14 +- .../SDL2/src/video/riscos/SDL_riscosmodes.c | 78 +- .../SDL2/src/video/riscos/SDL_riscosmodes.h | 6 +- .../SDL2/src/video/riscos/SDL_riscosmouse.c | 13 +- .../SDL2/src/video/riscos/SDL_riscosvideo.c | 20 +- .../SDL2/src/video/riscos/SDL_riscoswindow.c | 18 +- modules/SDL2/src/video/sdlgenblit.pl | 13 +- .../src/video/uikit/SDL_uikitappdelegate.m | 3 +- .../SDL2/src/video/uikit/SDL_uikitclipboard.m | 15 +- .../SDL2/src/video/uikit/SDL_uikitevents.m | 6 +- .../src/video/uikit/SDL_uikitmessagebox.m | 15 +- .../SDL2/src/video/uikit/SDL_uikitmetalview.m | 23 +- modules/SDL2/src/video/uikit/SDL_uikitmodes.m | 45 +- .../SDL2/src/video/uikit/SDL_uikitopengles.m | 21 +- modules/SDL2/src/video/uikit/SDL_uikitvideo.m | 24 +- modules/SDL2/src/video/uikit/SDL_uikitview.m | 20 +- .../src/video/uikit/SDL_uikitviewcontroller.m | 103 +- .../SDL2/src/video/uikit/SDL_uikitwindow.m | 54 +- .../SDL2/src/video/vita/SDL_vitaframebuffer.c | 46 +- .../SDL2/src/video/vita/SDL_vitaframebuffer.h | 6 +- modules/SDL2/src/video/vita/SDL_vitagl_pvr.c | 30 +- .../SDL2/src/video/vita/SDL_vitagl_pvr_c.h | 3 +- modules/SDL2/src/video/vita/SDL_vitagles.c | 73 +- modules/SDL2/src/video/vita/SDL_vitagles_c.h | 22 +- .../SDL2/src/video/vita/SDL_vitagles_pvr.c | 36 +- .../SDL2/src/video/vita/SDL_vitagles_pvr_c.h | 7 +- .../SDL2/src/video/vita/SDL_vitakeyboard.c | 54 +- .../SDL2/src/video/vita/SDL_vitamessagebox.c | 55 +- modules/SDL2/src/video/vita/SDL_vitamouse.c | 23 +- modules/SDL2/src/video/vita/SDL_vitatouch.c | 87 +- modules/SDL2/src/video/vita/SDL_vitavideo.c | 240 +- modules/SDL2/src/video/vita/SDL_vitavideo.h | 51 +- .../src/video/vivante/SDL_vivanteopengles.c | 10 +- .../src/video/vivante/SDL_vivanteopengles.h | 8 +- .../src/video/vivante/SDL_vivanteplatform.c | 9 +- .../SDL2/src/video/vivante/SDL_vivantevideo.c | 64 +- .../SDL2/src/video/vivante/SDL_vivantevideo.h | 36 +- .../src/video/vivante/SDL_vivantevulkan.c | 71 +- .../src/video/vivante/SDL_vivantevulkan.h | 15 +- .../src/video/wayland/SDL_waylandclipboard.c | 26 +- .../video/wayland/SDL_waylanddatamanager.c | 216 +- .../video/wayland/SDL_waylanddatamanager.h | 39 +- .../SDL2/src/video/wayland/SDL_waylanddyn.c | 96 +- .../SDL2/src/video/wayland/SDL_waylanddyn.h | 134 +- .../src/video/wayland/SDL_waylandevents.c | 1109 +- .../src/video/wayland/SDL_waylandevents_c.h | 36 +- .../src/video/wayland/SDL_waylandkeyboard.c | 30 +- .../src/video/wayland/SDL_waylandmessagebox.c | 317 +- .../SDL2/src/video/wayland/SDL_waylandmouse.c | 188 +- .../SDL2/src/video/wayland/SDL_waylandmouse.h | 2 +- .../src/video/wayland/SDL_waylandopengles.c | 49 +- .../src/video/wayland/SDL_waylandopengles.h | 6 +- .../SDL2/src/video/wayland/SDL_waylandsym.h | 16 + .../SDL2/src/video/wayland/SDL_waylandtouch.c | 132 +- .../SDL2/src/video/wayland/SDL_waylandtouch.h | 217 +- .../SDL2/src/video/wayland/SDL_waylandvideo.c | 287 +- .../SDL2/src/video/wayland/SDL_waylandvideo.h | 13 +- .../src/video/wayland/SDL_waylandvulkan.c | 83 +- .../src/video/wayland/SDL_waylandvulkan.h | 12 +- .../src/video/wayland/SDL_waylandwindow.c | 652 +- .../src/video/wayland/SDL_waylandwindow.h | 56 +- modules/SDL2/src/video/windows/SDL_msctf.h | 10 +- modules/SDL2/src/video/windows/SDL_vkeys.h | 98 +- .../src/video/windows/SDL_windowsclipboard.c | 74 +- .../src/video/windows/SDL_windowsclipboard.h | 2 +- .../src/video/windows/SDL_windowsevents.c | 1328 +- .../src/video/windows/SDL_windowsevents.h | 2 +- .../video/windows/SDL_windowsframebuffer.c | 32 +- .../video/windows/SDL_windowsframebuffer.h | 6 +- .../src/video/windows/SDL_windowskeyboard.c | 718 +- .../src/video/windows/SDL_windowsmessagebox.c | 200 +- .../SDL2/src/video/windows/SDL_windowsmodes.c | 215 +- .../SDL2/src/video/windows/SDL_windowsmodes.h | 11 +- .../SDL2/src/video/windows/SDL_windowsmouse.c | 147 +- .../src/video/windows/SDL_windowsopengl.c | 259 +- .../src/video/windows/SDL_windowsopengl.h | 183 +- .../src/video/windows/SDL_windowsopengles.c | 28 +- .../src/video/windows/SDL_windowsopengles.h | 6 +- .../SDL2/src/video/windows/SDL_windowsshape.c | 64 +- .../SDL2/src/video/windows/SDL_windowsshape.h | 7 +- .../SDL2/src/video/windows/SDL_windowsvideo.c | 185 +- .../SDL2/src/video/windows/SDL_windowsvideo.h | 229 +- .../src/video/windows/SDL_windowsvulkan.c | 67 +- .../src/video/windows/SDL_windowswindow.c | 337 +- .../src/video/windows/SDL_windowswindow.h | 12 +- modules/SDL2/src/video/windows/wmmsg.h | 2 +- .../SDL2/src/video/winrt/SDL_winrtevents.cpp | 81 +- .../SDL2/src/video/winrt/SDL_winrtevents_c.h | 30 +- .../SDL2/src/video/winrt/SDL_winrtgamebar.cpp | 70 +- .../src/video/winrt/SDL_winrtkeyboard.cpp | 485 +- .../src/video/winrt/SDL_winrtmessagebox.cpp | 18 +- .../SDL2/src/video/winrt/SDL_winrtmouse.cpp | 100 +- .../src/video/winrt/SDL_winrtopengles.cpp | 71 +- .../SDL2/src/video/winrt/SDL_winrtopengles.h | 17 +- .../src/video/winrt/SDL_winrtpointerinput.cpp | 226 +- .../SDL2/src/video/winrt/SDL_winrtvideo.cpp | 218 +- .../SDL2/src/video/winrt/SDL_winrtvideo_cpp.h | 27 +- modules/SDL2/src/video/x11/SDL_x11clipboard.c | 154 +- modules/SDL2/src/video/x11/SDL_x11clipboard.h | 7 +- modules/SDL2/src/video/x11/SDL_x11dyn.c | 53 +- modules/SDL2/src/video/x11/SDL_x11dyn.h | 21 +- modules/SDL2/src/video/x11/SDL_x11events.c | 1490 +- modules/SDL2/src/video/x11/SDL_x11events.h | 3 +- .../SDL2/src/video/x11/SDL_x11framebuffer.c | 103 +- .../SDL2/src/video/x11/SDL_x11framebuffer.h | 13 +- modules/SDL2/src/video/x11/SDL_x11keyboard.c | 163 +- .../SDL2/src/video/x11/SDL_x11messagebox.c | 495 +- modules/SDL2/src/video/x11/SDL_x11modes.c | 223 +- modules/SDL2/src/video/x11/SDL_x11modes.h | 20 +- modules/SDL2/src/video/x11/SDL_x11mouse.c | 177 +- modules/SDL2/src/video/x11/SDL_x11mouse.h | 1 - modules/SDL2/src/video/x11/SDL_x11opengl.c | 307 +- modules/SDL2/src/video/x11/SDL_x11opengl.h | 41 +- modules/SDL2/src/video/x11/SDL_x11opengles.c | 32 +- modules/SDL2/src/video/x11/SDL_x11opengles.h | 8 +- modules/SDL2/src/video/x11/SDL_x11shape.c | 58 +- modules/SDL2/src/video/x11/SDL_x11shape.h | 11 +- modules/SDL2/src/video/x11/SDL_x11touch.c | 10 +- modules/SDL2/src/video/x11/SDL_x11video.c | 69 +- modules/SDL2/src/video/x11/SDL_x11video.h | 4 +- modules/SDL2/src/video/x11/SDL_x11vulkan.c | 112 +- modules/SDL2/src/video/x11/SDL_x11window.c | 639 +- modules/SDL2/src/video/x11/SDL_x11window.h | 16 +- modules/SDL2/src/video/x11/SDL_x11xfixes.c | 71 +- modules/SDL2/src/video/x11/SDL_x11xfixes.h | 6 +- modules/SDL2/src/video/x11/SDL_x11xinput2.c | 297 +- modules/SDL2/src/video/x11/SDL_x11xinput2.h | 2 +- modules/SDL2/src/video/x11/edid.h | 218 +- modules/SDL2/test/CMakeLists.txt | 9 +- modules/SDL2/test/Makefile.os2 | 1 + modules/SDL2/test/Makefile.w32 | 2 +- modules/SDL2/test/checkkeys.c | 83 +- modules/SDL2/test/checkkeysthreads.c | 102 +- modules/SDL2/test/controllermap.c | 140 +- modules/SDL2/test/loopwave.c | 24 +- modules/SDL2/test/loopwavequeue.c | 44 +- modules/SDL2/test/testatomic.c | 202 +- modules/SDL2/test/testaudiocapture.c | 18 +- modules/SDL2/test/testaudiohotplug.c | 52 +- modules/SDL2/test/testaudioinfo.c | 17 +- modules/SDL2/test/testautomation.c | 35 +- modules/SDL2/test/testautomation_audio.c | 1471 +- modules/SDL2/test/testautomation_clipboard.c | 79 +- modules/SDL2/test/testautomation_events.c | 242 +- modules/SDL2/test/testautomation_guid.c | 59 +- modules/SDL2/test/testautomation_hints.c | 339 +- modules/SDL2/test/testautomation_joystick.c | 7 +- modules/SDL2/test/testautomation_keyboard.c | 1035 +- modules/SDL2/test/testautomation_main.c | 70 +- modules/SDL2/test/testautomation_math.c | 312 +- modules/SDL2/test/testautomation_mouse.c | 537 +- modules/SDL2/test/testautomation_pixels.c | 459 +- modules/SDL2/test/testautomation_platform.c | 725 +- modules/SDL2/test/testautomation_rect.c | 799 +- modules/SDL2/test/testautomation_render.c | 1750 +- modules/SDL2/test/testautomation_rwops.c | 831 +- modules/SDL2/test/testautomation_sdltest.c | 2312 +- modules/SDL2/test/testautomation_stdlib.c | 941 +- modules/SDL2/test/testautomation_suites.h | 2 +- modules/SDL2/test/testautomation_surface.c | 452 +- modules/SDL2/test/testautomation_syswm.c | 28 +- modules/SDL2/test/testautomation_timer.c | 241 +- modules/SDL2/test/testautomation_video.c | 2922 +- modules/SDL2/test/testbounds.c | 2 +- modules/SDL2/test/testcustomcursor.c | 222 +- modules/SDL2/test/testdisplayinfo.c | 8 +- modules/SDL2/test/testdraw2.c | 55 +- modules/SDL2/test/testdrawchessboard.c | 60 +- modules/SDL2/test/testdropfile.c | 13 +- modules/SDL2/test/testerror.c | 13 +- modules/SDL2/test/testevdev.c | 50 +- modules/SDL2/test/testfile.c | 296 +- modules/SDL2/test/testfilesystem.c | 21 +- modules/SDL2/test/testgamecontroller.c | 166 +- modules/SDL2/test/testgeometry.c | 32 +- modules/SDL2/test/testgesture.c | 152 +- modules/SDL2/test/testgl2.c | 93 +- modules/SDL2/test/testgles.c | 123 +- modules/SDL2/test/testgles2.c | 324 +- modules/SDL2/test/testgles2_sdf.c | 296 +- modules/SDL2/test/testhaptic.c | 98 +- modules/SDL2/test/testhittesting.c | 66 +- modules/SDL2/test/testhotplug.c | 150 +- modules/SDL2/test/testiconv.c | 19 +- modules/SDL2/test/testime.c | 417 +- modules/SDL2/test/testintersections.c | 85 +- modules/SDL2/test/testjoystick.c | 45 +- modules/SDL2/test/testkeys.c | 7 +- modules/SDL2/test/testloadso.c | 15 +- modules/SDL2/test/testlocale.c | 2 +- modules/SDL2/test/testlock.c | 45 +- modules/SDL2/test/testmessage.c | 85 +- modules/SDL2/test/testmouse.c | 114 +- modules/SDL2/test/testmultiaudio.c | 47 +- modules/SDL2/test/testnative.c | 30 +- modules/SDL2/test/testnative.h | 4 +- modules/SDL2/test/testnativecocoa.m | 9 +- modules/SDL2/test/testnativew32.c | 4 +- modules/SDL2/test/testnativex11.c | 4 +- modules/SDL2/test/testoffscreen.c | 35 +- modules/SDL2/test/testoverlay2.c | 47 +- modules/SDL2/test/testplatform.c | 379 +- modules/SDL2/test/testpower.c | 7 +- modules/SDL2/test/testqsort.c | 29 +- modules/SDL2/test/testrelative.c | 44 +- modules/SDL2/test/testrendercopyex.c | 22 +- modules/SDL2/test/testrendertarget.c | 26 +- modules/SDL2/test/testresample.c | 33 +- modules/SDL2/test/testrumble.c | 28 +- modules/SDL2/test/testscale.c | 23 +- modules/SDL2/test/testsem.c | 67 +- modules/SDL2/test/testsensor.c | 14 +- modules/SDL2/test/testshader.c | 265 +- modules/SDL2/test/testshape.c | 119 +- modules/SDL2/test/testsprite2.c | 88 +- modules/SDL2/test/testspriteminimal.c | 15 +- modules/SDL2/test/teststreaming.c | 25 +- modules/SDL2/test/testsurround.c | 31 +- modules/SDL2/test/testthread.c | 39 +- modules/SDL2/test/testtimer.c | 42 +- modules/SDL2/test/testutils.c | 25 +- modules/SDL2/test/testutils.h | 13 +- modules/SDL2/test/testver.c | 13 +- modules/SDL2/test/testviewport.c | 52 +- modules/SDL2/test/testvulkan.c | 151 +- modules/SDL2/test/testwm2.c | 204 +- modules/SDL2/test/testyuv.c | 65 +- modules/SDL2/test/testyuv_cvt.c | 64 +- modules/SDL2/test/torturethread.c | 23 +- .../wayland-protocols/fractional-scale-v1.xml | 102 + modules/antkeeper-source | 2 +- modules/stb/stb_image.h | 144 +- 951 files changed, 65936 insertions(+), 273570 deletions(-) create mode 100644 modules/SDL2/.github/cmake/CMakeLists.txt create mode 100644 modules/SDL2/build-scripts/clang-format-src.sh create mode 100644 modules/SDL2/cmake/sdlfind.cmake create mode 100644 modules/SDL2/cmake/sdlplatform.cmake create mode 100644 modules/SDL2/src/joystick/controller_list.h delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_enums.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_format_traits.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_funcs.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_handles.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_hash.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_raii.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_static_assertions.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_structs.hpp delete mode 100644 modules/SDL2/src/video/khronos/vulkan/vulkan_to_string.hpp create mode 100644 modules/SDL2/wayland-protocols/fractional-scale-v1.xml diff --git a/modules/SDL2/.clang-format b/modules/SDL2/.clang-format index f4d9bcf..e98e5cd 100644 --- a/modules/SDL2/.clang-format +++ b/modules/SDL2/.clang-format @@ -16,8 +16,8 @@ AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: All -AlwaysBreakAfterReturnType: AllDefinitions +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: MultiLine @@ -35,7 +35,7 @@ BraceWrapping: AfterUnion: true AfterExternBlock: false BeforeElse: false - BeforeWhile: true + BeforeWhile: false IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true @@ -62,7 +62,8 @@ IndentGotoLabels: true IndentPPDirectives: None IndentExternBlock: NoIndent -SpaceAfterCStyleCast: true +PointerAlignment: Right +SpaceAfterCStyleCast: false SpacesInCStyleCastParentheses: false SpacesInConditionalStatement: false SpacesInContainerLiterals: true diff --git a/modules/SDL2/.editorconfig b/modules/SDL2/.editorconfig index 636c544..cdd3c4e 100644 --- a/modules/SDL2/.editorconfig +++ b/modules/SDL2/.editorconfig @@ -7,6 +7,8 @@ root = true [*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}] indent_size = 4 indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true [*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}] indent_size = 2 diff --git a/modules/SDL2/.github/cmake/CMakeLists.txt b/modules/SDL2/.github/cmake/CMakeLists.txt new file mode 100644 index 0000000..4875701 --- /dev/null +++ b/modules/SDL2/.github/cmake/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.0...3.5) +project(ci_utils C CXX) + +set(txt "CC=${CMAKE_C_COMPILER} +CXX=${CMAKE_CXX_COMPILER} +CFLAGS=${CMAKE_C_FLAGS} +CXXFLAGS=${CMAKE_CXX_FLAGS} +LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_STANDARD_LIBRARIES} +") + +message("${txt}") + +set(VAR_PATH "/tmp/env.txt" CACHE PATH "Where to write environment file") +message(STATUS "Writing CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS environment to ${VAR_PATH}") + +file(WRITE "${VAR_PATH}" "${txt}") diff --git a/modules/SDL2/.github/workflows/emscripten.yml b/modules/SDL2/.github/workflows/emscripten.yml index 56f77b6..b32410a 100644 --- a/modules/SDL2/.github/workflows/emscripten.yml +++ b/modules/SDL2/.github/workflows/emscripten.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: mymindstorm/setup-emsdk@v10 + - uses: mymindstorm/setup-emsdk@v12 with: version: 2.0.32 - name: Install ninja diff --git a/modules/SDL2/.github/workflows/main.yml b/modules/SDL2/.github/workflows/main.yml index b09ae94..71fb85d 100644 --- a/modules/SDL2/.github/workflows/main.yml +++ b/modules/SDL2/.github/workflows/main.yml @@ -15,17 +15,22 @@ jobs: fail-fast: false matrix: platform: - - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 } - - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 } - - { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 } - - { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 } - - { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 } - - { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh } - - { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true } - - { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh } - - { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true } - - { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' } - - { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true } + - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 } + - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 } + - { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 } + - { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 } + - { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 } + - { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh } + - { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true } + - { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true, + source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'} + - { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF', + source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '} + + - { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh } + - { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true } + - { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' } + - { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true } steps: - name: Set up MSYS2 @@ -59,7 +64,21 @@ jobs: if: runner.os == 'macOS' run: | brew install \ - ninja + ninja \ + pkg-config + + - name: Setup Intel oneAPI + if: matrix.platform.intel + run: | + # Setup oneAPI repo + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update -y + + # Install oneAPI + sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + - uses: actions/checkout@v3 - name: Check that versioning is consistent # We only need to run this once: arbitrarily use the Linux/CMake build @@ -68,6 +87,7 @@ jobs: - name: Configure (CMake) if: "! matrix.platform.autotools" run: | + ${{ matrix.platform.source_cmd }} cmake -S . -B build -G Ninja \ -DSDL_TESTS=ON \ -DSDL_WERROR=ON \ @@ -79,10 +99,12 @@ jobs: - name: Build (CMake) if: "! matrix.platform.autotools" run: | + ${{ matrix.platform.source_cmd }} cmake --build build/ --config Release --verbose --parallel - name: Run build-time tests (CMake) if: "! matrix.platform.autotools" run: | + ${{ matrix.platform.source_cmd }} set -eu export SDL_TESTS_QUICK=1 ctest -VV --test-dir build/ @@ -100,6 +122,7 @@ jobs: - name: Configure (Autotools) if: matrix.platform.autotools run: | + ${{ matrix.platform.source_cmd }} set -eu rm -fr build-autotools mkdir build-autotools @@ -131,6 +154,7 @@ jobs: - name: Build (Autotools) if: matrix.platform.autotools run: | + ${{ matrix.platform.source_cmd }} set -eu parallel="$(getconf _NPROCESSORS_ONLN)" make -j"${parallel}" -C build-autotools V=1 @@ -140,6 +164,7 @@ jobs: - name: Run build-time tests (Autotools) if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }} run: | + ${{ matrix.platform.source_cmd }} set -eu curdir="$(pwd)" parallel="$(getconf _NPROCESSORS_ONLN)" @@ -152,6 +177,7 @@ jobs: - name: Install (Autotools) if: matrix.platform.autotools run: | + ${{ matrix.platform.source_cmd }} set -eu curdir="$(pwd)" parallel="$(getconf _NPROCESSORS_ONLN)" @@ -163,16 +189,19 @@ jobs: echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV - name: Verify CMake configuration files run: | + ${{ matrix.platform.source_cmd }} cmake -S cmake/test -B cmake_config_build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} cmake --build cmake_config_build --verbose - name: Verify sdl2-config run: | + ${{ matrix.platform.source_cmd }} export PATH=${{ env.SDL2_DIR }}/bin:$PATH cmake/test/test_sdlconfig.sh - name: Verify sdl2.pc run: | + ${{ matrix.platform.source_cmd }} export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig cmake/test/test_pkgconfig.sh - name: Distcheck (Autotools) @@ -190,6 +219,7 @@ jobs: - name: Run installed-tests (Autotools) if: "runner.os == 'Linux' && matrix.platform.autotools" run: | + ${{ matrix.platform.source_cmd }} set -eu parallel="$(getconf _NPROCESSORS_ONLN)" sudo make -j"${parallel}" -C build-autotools install diff --git a/modules/SDL2/.github/workflows/msvc.yml b/modules/SDL2/.github/workflows/msvc.yml index 78fb73a..a70a3b6 100644 --- a/modules/SDL2/.github/workflows/msvc.yml +++ b/modules/SDL2/.github/workflows/msvc.yml @@ -34,7 +34,7 @@ jobs: os.makedirs(builddir) with open(f"{ builddir }/CMakeLists.txt", "w") as f: f.write(textwrap.dedent(f"""\ - cmake_minimum_required(VERSION 3.0) + cmake_minimum_required(VERSION 3.0...3.5) project(sdl_user) add_subdirectory("{ srcdir }" SDL) """)) diff --git a/modules/SDL2/.github/workflows/n3ds.yml b/modules/SDL2/.github/workflows/n3ds.yml index f35577e..20f7a15 100644 --- a/modules/SDL2/.github/workflows/n3ds.yml +++ b/modules/SDL2/.github/workflows/n3ds.yml @@ -38,5 +38,18 @@ jobs: -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \ -DCMAKE_BUILD_TYPE=Release cmake --build cmake_config_build --verbose - # Not running test_pkgconfig.sh and test_sdlconfig.sh - # as invoking the compiler manually is not supported + - name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain + run: | + cmake -S .github/cmake -B /tmp/cmake_extract \ + -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DVAR_PATH=/tmp/n3ds_env.txt + cat /tmp/n3ds_env.txt >> $GITHUB_ENV + - name: Verify sdl2-config + run: | + export PATH=${{ env.SDL2_DIR }}/bin:$PATH + cmake/test/test_sdlconfig.sh + - name: Verify sdl2.pc + run: | + export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig + cmake/test/test_pkgconfig.sh diff --git a/modules/SDL2/.github/workflows/ps2.yaml b/modules/SDL2/.github/workflows/ps2.yaml index bfb0b1c..fdf6329 100644 --- a/modules/SDL2/.github/workflows/ps2.yaml +++ b/modules/SDL2/.github/workflows/ps2.yaml @@ -50,13 +50,13 @@ jobs: - name: Verify sdl2-config run: | export CC=mips64r5900el-ps2-elf-gcc + export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib" export PATH=${{ env.SDL2_DIR }}/bin:$PATH - export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib" cmake/test/test_sdlconfig.sh - name: Verify sdl2.pc run: | export CC=mips64r5900el-ps2-elf-gcc - export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib" + export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib" export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig cmake/test/test_pkgconfig.sh diff --git a/modules/SDL2/.github/workflows/psp.yaml b/modules/SDL2/.github/workflows/psp.yaml index addc7b1..d9f7620 100644 --- a/modules/SDL2/.github/workflows/psp.yaml +++ b/modules/SDL2/.github/workflows/psp.yaml @@ -39,12 +39,12 @@ jobs: - name: Verify sdl2-config run: | export CC=psp-gcc + export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib" export PATH=${{ env.SDL2_DIR }}/bin:$PATH - export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib" cmake/test/test_sdlconfig.sh - name: Verify sdl2.pc run: | export CC=psp-gcc + export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib" export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig - export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib" cmake/test/test_pkgconfig.sh diff --git a/modules/SDL2/.github/workflows/vita.yaml b/modules/SDL2/.github/workflows/vita.yaml index ac3b17c..b9f998d 100644 --- a/modules/SDL2/.github/workflows/vita.yaml +++ b/modules/SDL2/.github/workflows/vita.yaml @@ -8,19 +8,61 @@ defaults: jobs: vita: + name: ${{ matrix.platform.name }} runs-on: ubuntu-latest container: image: vitasdk/vitasdk:latest + strategy: + fail-fast: false + matrix: + platform: + - { name: GLES (pib), os: windows-latest, pib: true } + - { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true } steps: - uses: actions/checkout@v3 - name: Install build requirements run: | apk update apk add cmake ninja pkgconf bash + + - name: Configure PVR_PSP2 (GLES) + if: ${{ !!matrix.platform.pvr }} + run: | + pvr_psp2_version=3.9 + + # Configure PVR_PSP2 headers + wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp + unzip /tmp/v$pvr_psp2_version.zip -d/tmp + cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* ${VITASDK}/arm-vita-eabi/include + rm /tmp/v$pvr_psp2_version.zip + + # Configure PVR_PSP2 stub libraries + wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp + unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs + find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} ${VITASDK}/arm-vita-eabi/lib \; + rm /tmp/vitasdk_stubs.zip + rm -rf /tmp/pvr_psp2_stubs + + - name: Configure gl4es4vita (OpenGL) + if: ${{ !!matrix.platform.pvr }} + run: | + gl4es4vita_version=1.1.4 + + # Configure gl4es4vita headers + wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp + unzip -o /tmp/include.zip -d${VITASDK}/arm-vita-eabi/include + rm /tmp/include.zip + + # Configure gl4es4vita stub libraries + wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp + unzip /tmp/vitasdk_stubs.zip -d${VITASDK}/arm-vita-eabi/lib + - name: Configure CMake run: | cmake -S . -B build -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \ + -DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \ + -DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \ -DSDL_WERROR=ON \ -DSDL_TESTS=ON \ -DSDL_INSTALL_TESTS=ON \ diff --git a/modules/SDL2/.gitignore b/modules/SDL2/.gitignore index a746abb..fb013e8 100644 --- a/modules/SDL2/.gitignore +++ b/modules/SDL2/.gitignore @@ -62,6 +62,11 @@ cmake-build-* xcuserdata *.xcworkspace +# for QtCreator +CMakeLists.txt.user +build*/ +*.pro.user* + # for Visual C++ .vs Debug @@ -173,6 +178,7 @@ test/testyuv test/torturethread builddir/ +!build-scripts/ debian/*.debhelper.log debian/*.substvars debian/*.tar.gz diff --git a/modules/SDL2/.wikiheaders-options b/modules/SDL2/.wikiheaders-options index 31ccd43..634840e 100644 --- a/modules/SDL2/.wikiheaders-options +++ b/modules/SDL2/.wikiheaders-options @@ -1,7 +1,8 @@ -projectfullname = SDL_mixer -projectshortname = SDL_mixer +projectfullname = SDL2 +projectshortname = SDL2 incsubdir = include -wikisubdir = +wikisubdir = SDL2 +readmesubdir = docs apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_) mainincludefname = SDL.h versionfname = include/SDL_version.h @@ -10,6 +11,7 @@ versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z selectheaderregex = \ASDL.*?\.h\Z projecturl = https://libsdl.org/ -wikiurl = https://wiki.libsdl.org +wikiurl = https://wiki.libsdl.org/SDL2 bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new warn_about_missing = 0 +wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.) diff --git a/modules/SDL2/Android.mk b/modules/SDL2/Android.mk index facc54a..9c9a160 100644 --- a/modules/SDL2/Android.mk +++ b/modules/SDL2/Android.mk @@ -63,7 +63,6 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES LOCAL_CFLAGS += \ -Wall -Wextra \ -Wdocumentation \ - -Wdocumentation-unknown-command \ -Wmissing-prototypes \ -Wunreachable-code-break \ -Wunneeded-internal-declaration \ @@ -78,6 +77,8 @@ LOCAL_CFLAGS += \ # Warnings we haven't fixed (yet) LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare +LOCAL_CXXFLAGS += -std=gnu++11 + LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid LOCAL_LDFLAGS := -Wl,--no-undefined diff --git a/modules/SDL2/CMakeLists.txt b/modules/SDL2/CMakeLists.txt index c5c9a77..eb99213 100644 --- a/modules/SDL2/CMakeLists.txt +++ b/modules/SDL2/CMakeLists.txt @@ -2,7 +2,7 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there") endif() -cmake_minimum_required(VERSION 3.0.0) +cmake_minimum_required(VERSION 3.0.0...3.5) project(SDL2 C CXX) if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) @@ -18,6 +18,9 @@ endif() set(EXTRA_LIBS) set(EXTRA_LDFLAGS) +set(CMAKE_DEPENDS) +set(PKGCONFIG_DEPENDS) + # This is a virtual "library" that just exists to collect up compiler and # linker options that used to be global to this CMake project. When you # specify it as part of a real library's target_link_libraries(), that @@ -27,16 +30,10 @@ set(EXTRA_LDFLAGS) add_library(sdl-build-options INTERFACE) if(WINDOWS_STORE) - cmake_minimum_required(VERSION 3.11.0) target_compile_definitions(sdl-build-options INTERFACE "-DSDL_BUILDING_WINRT=1") target_compile_options(sdl-build-options INTERFACE "-ZW") endif() -# Build in parallel under Visual Studio. Not enabled by default. -if(MSVC) - target_compile_options(sdl-build-options INTERFACE "/MP") -endif() - # CMake 3.0 expands the "if(${A})" in "set(OFF 1);set(A OFF);if(${A})" to "if(1)" # CMake 3.24+ emits a warning when not set. unset(OFF) @@ -74,6 +71,7 @@ find_package(PkgConfig) list(APPEND CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake") include(${SDL2_SOURCE_DIR}/cmake/macros.cmake) include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake) +include(${SDL2_SOURCE_DIR}/cmake/sdlplatform.cmake) include(${SDL2_SOURCE_DIR}/cmake/CheckCPUArchitecture.cmake) # Enable large file support on 32-bit glibc, so that we can access files @@ -85,7 +83,7 @@ endif() # See docs/release_checklist.md set(SDL_MAJOR_VERSION 2) -set(SDL_MINOR_VERSION 26) +set(SDL_MINOR_VERSION 28) set(SDL_MICRO_VERSION 3) set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") @@ -135,8 +133,12 @@ set(SDL_GENERATED_HEADERS) #message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}") -# General settings & flags -set(LIBRARY_OUTPUT_DIRECTORY "build") +check_cpu_architecture(x86 SDL_CPU_X86) +check_cpu_architecture(x64 SDL_CPU_X64) +check_cpu_architecture(arm32 SDL_CPU_ARM32) +check_cpu_architecture(arm64 SDL_CPU_ARM64) +check_cpu_architecture(loongarch64 SDL_CPU_LOONGARCH64) + # Check for 64 or 32 bit set(SIZEOF_VOIDP ${CMAKE_SIZEOF_VOID_P}) if(CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -152,56 +154,7 @@ if(NOT LIBTYPE) endif() # Get the platform -if(WIN32) - if(NOT WINDOWS) - set(WINDOWS TRUE) - endif() -elseif(UNIX AND NOT APPLE) - if(CMAKE_SYSTEM_NAME MATCHES ".*Linux") - set(LINUX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*") - set(FREEBSD TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*") - set(NETBSD TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") - set(OPENBSD TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*GNU.*") - set(GNU TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*") - set(BSDI TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD") - set(FREEBSD TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "SYSV5.*") - set(SYSV5 TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "Solaris.*|SunOS.*") - set(SOLARIS TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "HP-UX.*") - set(HPUX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "AIX.*") - set(AIX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "Minix.*") - set(MINIX TRUE) - endif() -elseif(APPLE) - if(CMAKE_SYSTEM_NAME MATCHES ".*Darwin.*") - set(DARWIN TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*") - set(MACOSX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*") - set(TVOS TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*iOS.*") - # !!! FIXME: remove the version check when we start requiring >= 3.14.0 - if(CMAKE_VERSION VERSION_LESS 3.14) - set(IOS TRUE) - endif() - endif() -elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") - message_error("BeOS support has been removed as of SDL 2.0.2.") -elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*") - set(HAIKU TRUE) -elseif(NINTENDO_3DS) - set(N3DS TRUE) -endif() +SDL_DetectCMakePlatform() # Don't mistake osx for unix if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS) @@ -254,7 +207,7 @@ else() endif() # Compiler info -if(CMAKE_C_COMPILER_ID MATCHES "Clang") +if(CMAKE_C_COMPILER_ID MATCHES "Clang|IntelLLVM") set(USE_CLANG TRUE) set(OPT_DEF_ASM TRUE) # Visual Studio 2019 v16.2 added support for Clang/LLVM. @@ -268,20 +221,18 @@ elseif(CMAKE_COMPILER_IS_GNUCC) elseif(MSVC_VERSION GREATER 1400) # VisualStudio 8.0+ set(OPT_DEF_ASM TRUE) #set(CMAKE_C_FLAGS "/ZI /WX- / +elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$") + set(OPT_DEF_ASM TRUE) + set(USE_INTELCC TRUE) else() set(OPT_DEF_ASM FALSE) endif() -if(USE_GCC OR USE_CLANG) +if(USE_GCC OR USE_CLANG OR USE_INTELCC) set(OPT_DEF_GCC_ATOMICS ON) endif() # Default option knobs -if(APPLE OR ARCH_64 OR MSVC_CLANG) - if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm") - set(OPT_DEF_SSEMATH ON) - endif() -endif() if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS) set(OPT_DEF_LIBC ON) endif() @@ -294,6 +245,11 @@ if(NOT ("$ENV{CFLAGS}" STREQUAL "")) endif() endif() +# Build in parallel under Visual Studio. Not enabled by default. +if(MSVC AND NOT USE_CLANG) + target_compile_options(sdl-build-options INTERFACE "/MP") +endif() + if(MSVC) option(SDL_FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF) if(SDL_FORCE_STATIC_VCRT) @@ -371,7 +327,6 @@ endif() # All these ENABLED_BY_DEFAULT vars will default to ON if not specified, so # you only need to have a platform override them if they are disabling. -set(OPT_DEF_ASM TRUE) if(EMSCRIPTEN) # Set up default values for the currently supported set of subsystems: # Emscripten/Javascript does not have assembly support, a dynamic library @@ -435,18 +390,21 @@ set_option(SDL2_DISABLE_UNINSTALL "Disable uninstallation of SDL2" OFF) option_string(SDL_ASSERTIONS "Enable internal sanity checks (auto/disabled/release/enabled/paranoid)" "auto") #set_option(SDL_DEPENDENCY_TRACKING "Use gcc -MMD -MT dependency tracking" ON) +set_option(SDL_ASSEMBLY "Enable assembly routines" ${OPT_DEF_ASM}) +dep_option(SDL_SSEMATH "Allow GCC to use SSE floating point math" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) +dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF) +dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF) +dep_option(SDL_ARMNEON "Use NEON assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF) +dep_option(SDL_LSX "Use LSX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF) +dep_option(SDL_LASX "Use LASX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF) + set_option(SDL_LIBC "Use the system C library" ${OPT_DEF_LIBC}) set_option(SDL_GCC_ATOMICS "Use gcc builtin atomics" ${OPT_DEF_GCC_ATOMICS}) -set_option(SDL_ASSEMBLY "Enable assembly routines" ${OPT_DEF_ASM}) -set_option(SDL_SSEMATH "Allow GCC to use SSE floating point math" ${OPT_DEF_SSEMATH}) -set_option(SDL_MMX "Use MMX assembly routines" ${OPT_DEF_ASM}) -set_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ${OPT_DEF_ASM}) -set_option(SDL_SSE "Use SSE assembly routines" ${OPT_DEF_ASM}) -set_option(SDL_SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH}) -set_option(SDL_SSE3 "Use SSE3 assembly routines" ${OPT_DEF_SSEMATH}) -set_option(SDL_ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM}) -set_option(SDL_ARMSIMD "use SIMD assembly blitters on ARM" OFF) -set_option(SDL_ARMNEON "use NEON assembly blitters on ARM" OFF) dep_option(SDL_DBUS "Enable D-Bus support" ON ${UNIX_SYS} OFF) set_option(SDL_DISKAUDIO "Support the disk writer audio driver" ON) set_option(SDL_DUMMYAUDIO "Support the dummy audio driver" ON) @@ -513,6 +471,7 @@ set_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON) dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" OFF SDL_HIDAPI OFF) dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF) dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF) +set_option(SDL_LIBUDEV "Enable libudev support" ON) set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF) option_string(SDL_VENDOR_INFO "Vendor name and/or version to add to SDL_REVISION" "") set_option(SDL_CCACHE "Use Ccache to speed up build" ON) @@ -567,6 +526,15 @@ file(GLOB SOURCE_FILES ${SDL2_SOURCE_DIR}/src/video/*.c ${SDL2_SOURCE_DIR}/src/video/yuv2rgb/*.c) +if(USE_INTELCC) + # warning #39: division by zero + # warning #239: floating point underflow + # warning #264: floating-point value does not fit in required floating-point type + set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_exp.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd239 -wd264") + set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39") + set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log10.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39") +endif() + set(SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED 1) if(SDL_ASSERTIONS MATCHES "^(auto|)$") @@ -595,7 +563,7 @@ if(NOT SDL_FOREGROUNDING_SIGNAL STREQUAL "OFF") endif() # Compiler option evaluation -if(USE_GCC OR USE_CLANG) +if(USE_GCC OR USE_CLANG OR USE_INTELCC) # Check for -Wall first, so later things can override pieces of it. # Note: clang-cl treats -Wall as -Weverything (which is very loud), # /W3 as -Wall, and /W4 as -Wall -Wextra. So: /W3 is enough. @@ -652,11 +620,6 @@ if(USE_GCC OR USE_CLANG) endif() endif() - set(CMAKE_REQUIRED_FLAGS "-mpreferred-stack-boundary=2") - check_c_source_compiles("int x = 0; int main(int argc, char **argv) { return 0; }" - HAVE_GCC_PREFERRED_STACK_BOUNDARY) - set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS "-fvisibility=hidden -Werror") check_c_source_compiles(" #if !defined(__GNUC__) || __GNUC__ < 4 @@ -673,6 +636,11 @@ if(USE_GCC OR USE_CLANG) list(APPEND EXTRA_CFLAGS "-Wshadow") endif() + check_c_compiler_flag(-Wunused-local-typedefs HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS) + if(HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS) + list(APPEND EXTRA_CFLAGS "-Wno-unused-local-typedefs") + endif() + if(APPLE) cmake_push_check_state(RESET) # FIXME: don't use deprecated declarations @@ -733,7 +701,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") endif() if(SDL_ASSEMBLY) - if(USE_GCC OR USE_CLANG) + if(USE_GCC OR USE_CLANG OR USE_INTELCC) # TODO: Those all seem to be quite GCC specific - needs to be # reworked for better compiler support set(HAVE_ASSEMBLY TRUE) @@ -817,8 +785,9 @@ if(SDL_ASSEMBLY) #ifndef __SSE2__ #error Assembler CPP flag not enabled #endif - int main(int argc, char **argv) { return 0; }" HAVE_SSE2) - if(HAVE_SSE2) + int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_SSE2) + if(CPU_SUPPORTS_SSE2) + set(HAVE_SSE2 TRUE) list(APPEND EXTRA_CFLAGS "-msse2") endif() set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) @@ -840,8 +809,9 @@ if(SDL_ASSEMBLY) #ifndef __SSE3__ #error Assembler CPP flag not enabled #endif - int main(int argc, char **argv) { return 0; }" HAVE_SSE3) - if(HAVE_SSE3) + int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_SSE3) + if(CPU_SUPPORTS_SSE3) + set(HAVE_SSE3 TRUE) list(APPEND EXTRA_CFLAGS "-msse3") endif() set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) @@ -874,9 +844,9 @@ if(SDL_ASSEMBLY) vector unsigned int vzero() { return vec_splat_u32(0); } - int main(int argc, char **argv) { return 0; }" HAVE_ALTIVEC) + int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_ALTIVEC) set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) - if(HAVE_ALTIVEC OR HAVE_ALTIVEC_H_HDR) + if(CPU_SUPPORTS_ALTIVEC OR HAVE_ALTIVEC_H_HDR) set(HAVE_ALTIVEC TRUE) # if only HAVE_ALTIVEC_H_HDR is set list(APPEND EXTRA_CFLAGS "-maltivec") set(SDL_ALTIVEC_BLITTERS 1) @@ -886,6 +856,39 @@ if(SDL_ASSEMBLY) endif() endif() + if(SDL_LSX) + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_FLAGS "-mlsx") + check_c_source_compiles(" + #ifndef __loongarch_sx + #error Assembler CPP flag not enabled + #endif + int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LSX) + check_include_file("lsxintrin.h" HAVE_LSXINTRIN_H) + cmake_pop_check_state() + + if(CPU_SUPPORTS_LSX AND HAVE_LSXINTRIN_H) + list(APPEND EXTRA_CFLAGS "-mlsx") + set(HAVE_LSX TRUE) + endif() + endif() + + if(SDL_LASX) + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_FLAGS "-mlasx") + check_c_source_compiles(" + #ifndef __loongarch_asx + #error Assembler CPP flag not enabled + #endif + int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LASX) + check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H) + cmake_pop_check_state() + if(CPU_SUPPORTS_LASX AND HAVE_LASXINTRIN_H) + list(APPEND EXTRA_CFLAGS "-mlasx") + set(HAVE_LASX TRUE) + endif() + endif() + if(SDL_ARMSIMD) set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp") @@ -944,12 +947,22 @@ if(SDL_ASSEMBLY) # TODO: SDL_cpuinfo.h needs to support the user's configuration wish # for MSVC - right now it is always activated if(NOT ARCH_64) - set(HAVE_MMX TRUE) - set(HAVE_3DNOW TRUE) + if(SDL_MMX) + set(HAVE_MMX TRUE) + endif() + if(SDL_3DNOW) + set(HAVE_3DNOW TRUE) + endif() + endif() + if(SDL_SSE) + set(HAVE_SSE TRUE) + endif() + if(SDL_SSE2) + set(HAVE_SSE2 TRUE) + endif() + if(SDL_SSE3) + set(HAVE_SSE3 TRUE) endif() - set(HAVE_SSE TRUE) - set(HAVE_SSE2 TRUE) - set(HAVE_SSE3 TRUE) check_include_file("immintrin.h" HAVE_IMMINTRIN_H) endif() endif() @@ -1101,6 +1114,10 @@ else() set(HAVE_STDARG_H 1) set(HAVE_STDDEF_H 1) check_include_file(stdint.h HAVE_STDINT_H) + + if(MSVC AND USE_CLANG) + check_c_compiler_flag("/Q_no-use-libirc" HAS_Q_NO_USE_LIBIRC ) + endif() endif() endif() @@ -1469,6 +1486,18 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU) ioctl(0, KDENABIO, 1); return 0; }" HAVE_INPUT_KBIO) + elseif(OPENBSD OR NETBSD) + check_c_source_compiles(" + #include + #include + #include + #include + #include + int main(int argc, char **argv) { + struct wskbd_map_data data; + ioctl(0, WSKBDIO_GETMAP, &data); + return 0; + }" HAVE_INPUT_WSCONS) endif() if(HAVE_INPUT_EVENTS) @@ -1490,7 +1519,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU) set(SDL_INPUT_FBSDKBIO 1) endif() - check_include_file("libudev.h" HAVE_LIBUDEV_H) + if(HAVE_INPUT_WSCONS) + set(SDL_INPUT_WSCONS 1) + endif() + + CheckLibUDev() check_include_file("sys/inotify.h" HAVE_SYS_INOTIFY_H) check_symbol_exists(inotify_init "sys/inotify.h" HAVE_INOTIFY_INIT) check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1) @@ -1600,14 +1633,14 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU) CheckPTHREAD() if(SDL_CLOCK_GETTIME) - check_library_exists(rt clock_gettime "" FOUND_CLOCK_GETTIME_LIBRT) - if(FOUND_CLOCK_GETTIME_LIBRT) - list(APPEND EXTRA_LIBS rt) + check_library_exists(c clock_gettime "" FOUND_CLOCK_GETTIME_LIBC) + if(FOUND_CLOCK_GETTIME_LIBC) set(HAVE_CLOCK_GETTIME 1) else() - check_library_exists(c clock_gettime "" FOUND_CLOCK_GETTIME_LIBC) - if(FOUND_CLOCK_GETTIME_LIBC) + check_library_exists(rt clock_gettime "" FOUND_CLOCK_GETTIME_LIBRT) + if(FOUND_CLOCK_GETTIME_LIBRT) set(HAVE_CLOCK_GETTIME 1) + list(APPEND EXTRA_LIBS rt) endif() endif() endif() @@ -1687,7 +1720,7 @@ elseif(WINDOWS) if(MSVC AND NOT SDL_LIBC) # Prevent codegen that would use the VC runtime libraries. - set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") + set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-;/Gs1048576") if(NOT ARCH_64 AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM") set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE") endif() @@ -1728,7 +1761,7 @@ elseif(WINDOWS) check_include_file(ddraw.h HAVE_DDRAW_H) check_include_file(dsound.h HAVE_DSOUND_H) check_include_file(dinput.h HAVE_DINPUT_H) - if(WINDOWS_STORE OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM") + if(WINDOWS_STORE OR SDL_CPU_ARM32) set(HAVE_DINPUT_H 0) endif() check_include_file(dxgi.h HAVE_DXGI_H) @@ -1888,7 +1921,7 @@ elseif(WINDOWS) # Libraries for Win32 native and MinGW if(NOT WINDOWS_STORE) - list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32) + list(APPEND EXTRA_LIBS kernel32 user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32) endif() if(WINDOWS_STORE) @@ -2468,6 +2501,9 @@ elseif(VITA) set(SDL_VIDEO_OPENGL_ES2 1) list(APPEND EXTRA_LIBS pib + libScePiglet_stub_weak + taihen_stub_weak + SceShaccCg_stub_weak ) set(HAVE_VIDEO_VITA_PIB ON) set(SDL_VIDEO_VITA_PIB 1) @@ -2480,7 +2516,6 @@ elseif(VITA) check_include_file(gpu_es4/psp2_pvr_hint.h HAVE_PVR_H) if(HAVE_PVR_H) target_compile_definitions(sdl-build-options INTERFACE "-D__psp2__") - check_include_file(gl4esinit.h HAVE_GL4ES_H) set(SDL_VIDEO_OPENGL_EGL 1) set(HAVE_OPENGLES TRUE) set(SDL_VIDEO_OPENGL_ES 1) @@ -2491,17 +2526,21 @@ elseif(VITA) list(APPEND EXTRA_LIBS libgpu_es4_ext_stub_weak libIMGEGL_stub_weak + SceIme_stub ) set(HAVE_VIDEO_VITA_PVR ON) set(SDL_VIDEO_VITA_PVR 1) - if(HAVE_GL4ES_H) - set(HAVE_OPENGL TRUE) - set(SDL_VIDEO_OPENGL 1) - set(SDL_VIDEO_RENDER_OGL 1) - list(APPEND EXTRA_LIBS libGL_stub) - set(SDL_VIDEO_VITA_PVR_OGL 1) + if(SDL_OPENGL) + check_include_file(gl4esinit.h HAVE_GL4ES_H) + if(HAVE_GL4ES_H) + set(HAVE_OPENGL TRUE) + set(SDL_VIDEO_OPENGL 1) + set(SDL_VIDEO_RENDER_OGL 1) + list(APPEND EXTRA_LIBS libGL_stub) + set(SDL_VIDEO_VITA_PVR_OGL 1) + endif() endif() else() @@ -2531,19 +2570,6 @@ elseif(VITA) SceProcessmgr_stub m ) - if(HAVE_VITA_PIB) - list(PREPEND EXTRA_LIBS - pib - libScePiglet_stub - SceShaccCg_stub - taihen_stub - ) - endif() - if(HAVE_VITA_PVR) - list(PREPEND EXTRA_LIBS - SceIme_stub - ) - endif() endif() set(HAVE_ARMSIMD TRUE) @@ -2626,7 +2652,7 @@ elseif(PSP) ) if(NOT SDL2_DISABLE_SDL2MAIN) list(INSERT SDL_LIBS 0 "-lSDL2main") - endif(NOT SDL2_DISABLE_SDL2MAIN) + endif() elseif(PS2) list(APPEND EXTRA_CFLAGS "-DPS2" "-D__PS2__" "-I$ENV{PS2SDK}/ports/include" "-I$ENV{PS2DEV}/gsKit/include") @@ -2824,6 +2850,17 @@ elseif(N3DS) else() message_error("SDL_FILE must be enabled to build on N3DS") endif() + + if(NOT SDL2_DISABLE_SDL2MAIN) + list(INSERT SDL_LIBS 0 "-lSDL2main") + endif() + + foreach(lib ${CMAKE_C_STANDARD_LIBRARIES}) + if(lib MATCHES "^-l") + string(SUBSTRING "${lib}" 2 -1 lib) + endif() + list(APPEND EXTRA_LIBS ${lib}) + endforeach() endif() if(HAVE_VULKAN AND NOT SDL_LOADSO) @@ -2918,7 +2955,7 @@ if(SDL_WERROR) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") endif() - elseif(USE_GCC OR USE_CLANG) + elseif(USE_GCC OR USE_CLANG OR USE_INTELCC) cmake_push_check_state(RESET) check_c_compiler_flag(-Werror HAVE_WERROR) if(HAVE_WERROR) @@ -2946,7 +2983,7 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" lower_build_type) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include-config-${lower_build_type}") # 3. generate SDL_config in an build_type-dependent folder (which should be first in the include search path) file(GENERATE - OUTPUT "${SDL2_BINARY_DIR}/include-config-$>/SDL_config.h" + OUTPUT "${SDL2_BINARY_DIR}/include-config-$>/SDL2/SDL_config.h" INPUT "${SDL2_BINARY_DIR}/SDL_config.h.intermediate") # Prepare the flags and remove duplicates @@ -2997,9 +3034,9 @@ else() endif() configure_file("${SDL2_SOURCE_DIR}/include/SDL_revision.h.cmake" - "${SDL2_BINARY_DIR}/include/SDL_revision.h") + "${SDL2_BINARY_DIR}/include/SDL2/SDL_revision.h") -# Copy all non-generated headers to "${SDL2_BINARY_DIR}/include" +# Copy all non-generated headers to "${SDL2_BINARY_DIR}/include/SDL2" # This is done to avoid the inclusion of a pre-generated SDL_config.h file(GLOB SDL2_INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/*.h) set(SDL2_COPIED_INCLUDE_FILES) @@ -3008,7 +3045,7 @@ foreach(_hdr IN LISTS SDL2_INCLUDE_FILES) list(REMOVE_ITEM SDL2_INCLUDE_FILES "${_hdr}") else() get_filename_component(_name "${_hdr}" NAME) - set(_bin_hdr "${SDL2_BINARY_DIR}/include/${_name}") + set(_bin_hdr "${SDL2_BINARY_DIR}/include/SDL2/${_name}") list(APPEND SDL2_COPIED_INCLUDE_FILES "${_bin_hdr}") add_custom_command(OUTPUT "${_bin_hdr}" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_hdr}" "${_bin_hdr}" @@ -3063,6 +3100,7 @@ string(REGEX REPLACE "-lSDL2( |$)" "-l${sdl_static_libname} " SDL_STATIC_LIBS "$ if(NOT SDL_SHARED) string(REGEX REPLACE "-lSDL2( |$)" "-l${sdl_static_libname} " SDL_LIBS "${SDL_LIBS}") endif() +listtostr(PKGCONFIG_DEPENDS PKGCONFIG_DEPENDS) if(SDL_STATIC AND SDL_SHARED AND NOT sdl_static_libname STREQUAL "SDL2") message(STATUS "\"pkg-config --static --libs sdl2\" will return invalid information") @@ -3143,8 +3181,8 @@ if (SDL_ASAN) endif() endif() -if(SDL_CCACHE) - cmake_minimum_required(VERSION 3.4) +if(SDL_CCACHE AND NOT CMAKE_VERSION VERSION_LESS 3.4) + cmake_minimum_required(VERSION 3.4...3.5) find_program(CCACHE_BINARY ccache) if(CCACHE_BINARY) set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY}) @@ -3154,6 +3192,8 @@ if(SDL_CCACHE) else() set(HAVE_CCACHE OFF) endif() +else() + set(HAVE_CCACHE OFF) endif() if(SDL_TESTS) @@ -3239,7 +3279,11 @@ if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN) add_dependencies(SDL2main sdl_headers_copy) # alias target for in-tree builds add_library(SDL2::SDL2main ALIAS SDL2main) - target_include_directories(SDL2main BEFORE PRIVATE "${SDL2_BINARY_DIR}/include" PRIVATE "${SDL2_BINARY_DIR}/include-config-$>") + target_include_directories(SDL2main BEFORE + PRIVATE "${SDL2_BINARY_DIR}/include" + PRIVATE "${SDL2_BINARY_DIR}/include/SDL2" + PRIVATE "${SDL2_BINARY_DIR}/include-config-$>/SDL2" + ) target_include_directories(SDL2main PUBLIC "$" $ $) if (WIN32) target_link_libraries(SDL2main PRIVATE shell32) @@ -3254,6 +3298,8 @@ if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN) if (NOT ANDROID) set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") endif() + set_property(TARGET SDL2main APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION") + set_property(TARGET SDL2main PROPERTY INTERFACE_SDL_VERSION "SDL2") endif() if(ANDROID) @@ -3271,7 +3317,7 @@ endif() if(APPLE) foreach(SOURCE_FILE ${SOURCE_FILES}) get_filename_component(FILE_EXTENSION ${SOURCE_FILE} EXT) - if(FILE_EXTENSION STREQUAL "m") + if(FILE_EXTENSION STREQUAL ".m") set_property(SOURCE ${SOURCE_FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -x objective-c") endif() endforeach() @@ -3283,12 +3329,15 @@ if(SDL_SHARED) # alias target for in-tree builds add_library(SDL2::SDL2 ALIAS SDL2) set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + set_target_properties(SDL2 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) if(NOT SDL_LIBC) - check_cpu_architecture(x86 HAS_X86) - if(HAS_X86) + if(SDL_CPU_X86) # FIXME: should be added for all architectures (missing symbols for ARM) target_link_libraries(SDL2 PRIVATE "-nodefaultlib:MSVCRT") endif() + if(HAS_Q_NO_USE_LIBIRC) + target_compile_options(SDL2 PRIVATE /Q_no-use-libirc) + endif() endif() if(APPLE) # FIXME: Remove SOVERSION in SDL3 @@ -3315,21 +3364,22 @@ if(SDL_SHARED) OUTPUT_NAME "SDL2") endif() # Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB. - if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM") + if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT SDL_CPU_ARM32) # Don't try to link with the default set of libraries. if(NOT WINDOWS_STORE) - set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") - set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") + set_property(TARGET SDL2 APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB") endif() - set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") + set_property(TARGET SDL2 APPEND_STRING PROPERTY STATIC_LIBRARY_FLAGS " /NODEFAULTLIB") endif() # FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS - target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD}) + target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD} ${CMAKE_DEPENDS}) target_include_directories(SDL2 PUBLIC "$" - "$>>" + "$" + "$>/SDL2>" "$" - "$") + "$" + ) # This picks up all the compiler options and such we've accumulated up to here. target_link_libraries(SDL2 PRIVATE $) if(MINGW OR CYGWIN) @@ -3341,8 +3391,10 @@ if(SDL_SHARED) set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") endif() # Use `Compatible Interface Properties` to allow consumers to enforce a shared/static library - set_property(TARGET SDL2 PROPERTY INTERFACE_SDL2_SHARED TRUE) set_property(TARGET SDL2 APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL2_SHARED) + set_property(TARGET SDL2 PROPERTY INTERFACE_SDL2_SHARED TRUE) + set_property(TARGET SDL2 APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION") + set_property(TARGET SDL2 PROPERTY INTERFACE_SDL_VERSION "SDL2") endif() if(SDL_STATIC) @@ -3356,20 +3408,24 @@ if(SDL_STATIC) target_compile_definitions(SDL2-static PRIVATE SDL_STATIC_LIB) # TODO: Win32 platforms keep the same suffix .lib for import and static # libraries - do we need to consider this? - target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) + target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${CMAKE_DEPENDS}) target_include_directories(SDL2-static PUBLIC "$" - "$>>" + "$" + "$>/SDL2>" "$" - "$") + "$" + ) # This picks up all the compiler options and such we've accumulated up to here. target_link_libraries(SDL2-static PRIVATE $) if(NOT ANDROID) set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") endif() # Use `Compatible Interface Properties` to allow consumers to enforce a shared/static library - set_property(TARGET SDL2-static PROPERTY INTERFACE_SDL2_SHARED FALSE) set_property(TARGET SDL2-static APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL2_SHARED) + set_property(TARGET SDL2-static PROPERTY INTERFACE_SDL2_SHARED FALSE) + set_property(TARGET SDL2-static APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION") + set_property(TARGET SDL2-static PROPERTY INTERFACE_SDL_VERSION "SDL2") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSDL_BUILD_MAJOR_VERSION=${SDL_MAJOR_VERSION}") @@ -3387,10 +3443,13 @@ if(SDL_TEST) EXPORT_NAME SDL2test) target_include_directories(SDL2_test PUBLIC "$" - "$>>" + "$" + "$>/SDL2>" "$" "$") target_link_libraries(SDL2_test PRIVATE ${EXTRA_TEST_LIBS}) + set_property(TARGET SDL2_test APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION") + set_property(TARGET SDL2_test PROPERTY INTERFACE_SDL_VERSION "SDL2") endif() ##### Installation targets ##### @@ -3495,6 +3554,7 @@ if(NOT SDL2_DISABLE_INSTALL) FILES ${CMAKE_CURRENT_BINARY_DIR}/SDL2Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/SDL2ConfigVersion.cmake + ${SDL2_SOURCE_DIR}/cmake/sdlfind.cmake DESTINATION "${SDL_INSTALL_CMAKEDIR}" COMPONENT Devel ) @@ -3502,8 +3562,8 @@ if(NOT SDL2_DISABLE_INSTALL) install( FILES ${SDL2_INCLUDE_FILES} - "${SDL2_BINARY_DIR}/include/SDL_revision.h" - "${SDL2_BINARY_DIR}/include-config-$>/SDL_config.h" + "${SDL2_BINARY_DIR}/include/SDL2/SDL_revision.h" + "${SDL2_BINARY_DIR}/include-config-$>/SDL2/SDL_config.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL2) string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE) diff --git a/modules/SDL2/Makefile.in b/modules/SDL2/Makefile.in index d4eeee4..eb4c4bc 100644 --- a/modules/SDL2/Makefile.in +++ b/modules/SDL2/Makefile.in @@ -27,6 +27,7 @@ LDFLAGS = @BUILD_LDFLAGS@ EXTRA_LDFLAGS = @EXTRA_LDFLAGS@ LIBTOOL = @LIBTOOL@ INSTALL = @INSTALL@ +FGREP = @FGREP@ AR = @AR@ RANLIB = @RANLIB@ RC = @RC@ @@ -130,7 +131,7 @@ HDRS = \ begin_code.h \ close_code.h -SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test) +SDLTEST_HDRS = $(shell ls $(srcdir)/include | $(FGREP) SDL_test) LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ diff --git a/modules/SDL2/Makefile.minimal b/modules/SDL2/Makefile.minimal index 97ce201..f9c4b53 100644 --- a/modules/SDL2/Makefile.minimal +++ b/modules/SDL2/Makefile.minimal @@ -1,7 +1,7 @@ # Makefile to build the SDL library -INCLUDE = -I./include -CFLAGS = -g -O2 $(INCLUDE) +CPPFLAGS = -I./include +CFLAGS = -g -O2 AR = ar RANLIB = ranlib diff --git a/modules/SDL2/Makefile.os2 b/modules/SDL2/Makefile.os2 index 7fa1491..750898a 100644 --- a/modules/SDL2/Makefile.os2 +++ b/modules/SDL2/Makefile.os2 @@ -14,7 +14,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 -MINOR_VERSION = 26 +MINOR_VERSION = 28 MICRO_VERSION = 3 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) DESCRIPTION = Simple DirectMedia Layer 2 diff --git a/modules/SDL2/Makefile.w32 b/modules/SDL2/Makefile.w32 index 01ae9f1..9acc487 100644 --- a/modules/SDL2/Makefile.w32 +++ b/modules/SDL2/Makefile.w32 @@ -5,7 +5,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 -MINOR_VERSION = 26 +MINOR_VERSION = 28 MICRO_VERSION = 3 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) diff --git a/modules/SDL2/SDL2Config.cmake.in b/modules/SDL2/SDL2Config.cmake.in index 8c18aa5..cc8bcf2 100644 --- a/modules/SDL2/SDL2Config.cmake.in +++ b/modules/SDL2/SDL2Config.cmake.in @@ -30,6 +30,18 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake") set(SDL2_SDL2test_FOUND TRUE) endif() + +include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake") + +set(SDL_ALSA @SDL_ALSA@) +set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@) +if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static) + sdlFindALSA() +endif() +unset(SDL_ALSA) +unset(SDL_ALSA_SHARED) + + check_required_components(SDL2) # Create SDL2::SDL2 alias for static-only builds @@ -62,4 +74,4 @@ if(TARGET SDL2::SDL2main) list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main) endif() -set(SDL2TEST_LIBRARY SDL2::SDL2test) \ No newline at end of file +set(SDL2TEST_LIBRARY SDL2::SDL2test) diff --git a/modules/SDL2/VisualC-GDK/tests/testgdk/src/testgdk.cpp b/modules/SDL2/VisualC-GDK/tests/testgdk/src/testgdk.cpp index 82438a6..6aea4cc 100644 --- a/modules/SDL2/VisualC-GDK/tests/testgdk/src/testgdk.cpp +++ b/modules/SDL2/VisualC-GDK/tests/testgdk/src/testgdk.cpp @@ -239,17 +239,17 @@ LoadSprite(const char *file) /* This does the SDL_LoadBMP step repeatedly, but that's OK for test code. */ sprites[i] = LoadTexture(state->renderers[i], file, SDL_TRUE, &sprite_w, &sprite_h); if (!sprites[i]) { - return (-1); + return -1; } if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError()); SDL_DestroyTexture(sprites[i]); - return (-1); + return -1; } } /* We're ready to roll. :) */ - return (0); + return 0; } void @@ -364,8 +364,9 @@ loop() #endif } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } DrawSprites(state->renderers[i], sprites[i]); } } @@ -382,7 +383,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO); - if (!state) { + if (state == NULL) { return 1; } @@ -445,7 +446,7 @@ main(int argc, char *argv[]) /* Create the windows, initialize the renderers, and load the textures */ sprites = (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites)); - if (!sprites) { + if (sprites == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } diff --git a/modules/SDL2/VisualC/SDL/SDL.vcxproj b/modules/SDL2/VisualC/SDL/SDL.vcxproj index 2c85790..957dabe 100644 --- a/modules/SDL2/VisualC/SDL/SDL.vcxproj +++ b/modules/SDL2/VisualC/SDL/SDL.vcxproj @@ -137,6 +137,7 @@ OldStyle true OnlyExplicitInline + true _DEBUG;%(PreprocessorDefinitions) diff --git a/modules/SDL2/WhatsNew.txt b/modules/SDL2/WhatsNew.txt index a7cdf84..28f60c9 100644 --- a/modules/SDL2/WhatsNew.txt +++ b/modules/SDL2/WhatsNew.txt @@ -1,6 +1,23 @@ This is a list of major changes in SDL's version history. +--------------------------------------------------------------------------- +2.28.2: +--------------------------------------------------------------------------- +General: +* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers + + +--------------------------------------------------------------------------- +2.28.0: +--------------------------------------------------------------------------- + +General: +* Added SDL_HasWindowSurface() and SDL_DestroyWindowSurface() to switch between the window surface and rendering APIs +* Added a display event SDL_DISPLAYEVENT_MOVED which is sent when the primary monitor changes or displays change position relative to each other +* Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active + + --------------------------------------------------------------------------- 2.26.0: --------------------------------------------------------------------------- @@ -24,7 +41,7 @@ General: * Added access to the individual left and right gyro sensors of the combined Joy-Cons controller * Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information * Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp -* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices +* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices * SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available Windows: @@ -645,7 +662,7 @@ iOS: tvOS: * Added support for Apple TV -* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote. +* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote. Android: * Fixed SDL not resizing window when Android screen resolution changes @@ -790,8 +807,8 @@ Linux: * Added experimental Wayland and Mir support, disabled by default Android: -* Joystick support (minimum SDK version required to build SDL is now 12, - the required runtime version remains at 10, but on such devices joystick +* Joystick support (minimum SDK version required to build SDL is now 12, + the required runtime version remains at 10, but on such devices joystick support won't be available). * Hotplugging support for joysticks * Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default. @@ -844,7 +861,7 @@ iOS: Android: IMPORTANT: You MUST get the updated SDLActivity.java to match C code -* Moved EGL initialization to native code +* Moved EGL initialization to native code * Fixed the accelerometer axis rotation relative to the device rotation * Fixed race conditions when handling the EGL context on pause/resume * Touch devices are available for enumeration immediately after init diff --git a/modules/SDL2/Xcode-iOS/Demos/src/accelerometer.c b/modules/SDL2/Xcode-iOS/Demos/src/accelerometer.c index 0af1536..3ce8125 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/accelerometer.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/accelerometer.c @@ -127,7 +127,7 @@ initializeTextures(SDL_Renderer *renderer) /* create ship texture from surface */ ship = SDL_CreateTextureFromSurface(renderer, bmp_surface); - if (!ship) { + if (ship == NULL) { fatalError("could not create ship texture"); } SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND); @@ -145,7 +145,7 @@ initializeTextures(SDL_Renderer *renderer) } /* create space texture from surface */ space = SDL_CreateTextureFromSurface(renderer, bmp_surface); - if (!space) { + if (space == NULL) { fatalError("could not create space texture"); } SDL_FreeSurface(bmp_surface); diff --git a/modules/SDL2/Xcode-iOS/Demos/src/fireworks.c b/modules/SDL2/Xcode-iOS/Demos/src/fireworks.c index 600d20b..eb3bb4c 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/fireworks.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/fireworks.c @@ -84,14 +84,16 @@ stepParticles(double deltaTime) /* is the particle actually active, or is it marked for deletion? */ if (curr->isActive) { /* is the particle off the screen? */ - if (curr->y > screen_h) + if (curr->y > screen_h) { curr->isActive = 0; - else if (curr->y < 0) + } else if (curr->y < 0) { curr->isActive = 0; - if (curr->x > screen_w) + } + if (curr->x > screen_w) { curr->isActive = 0; - else if (curr->x < 0) + } else if (curr->x < 0) { curr->isActive = 0; + } /* step velocity, then step position */ curr->yvel += ACCEL * deltaMilliseconds; @@ -133,15 +135,17 @@ stepParticles(double deltaTime) } /* if we're a dust particle, shrink our size */ - if (curr->type == dust) + if (curr->type == dust) { curr->size -= deltaMilliseconds * 0.010f; + } } /* if we're still active, pack ourselves in the array next to the last active guy (pack the array tightly) */ - if (curr->isActive) + if (curr->isActive) { *(slot++) = *curr; + } } /* endif (curr->isActive) */ curr++; } @@ -188,8 +192,9 @@ explodeEmitter(struct particle *emitter) int i; for (i = 0; i < 200; i++) { - if (num_active_particles >= MAX_PARTICLES) + if (num_active_particles >= MAX_PARTICLES) { return; + } /* come up with a random angle and speed for new particle */ float theta = randomFloat(0, 2.0f * 3.141592); @@ -226,8 +231,9 @@ void spawnTrailFromEmitter(struct particle *emitter) { - if (num_active_particles >= MAX_PARTICLES) + if (num_active_particles >= MAX_PARTICLES) { return; + } /* select the particle at the slot at the end of our array */ struct particle *p = &particles[num_active_particles]; @@ -262,8 +268,9 @@ void spawnEmitterParticle(GLfloat x, GLfloat y) { - if (num_active_particles >= MAX_PARTICLES) + if (num_active_particles >= MAX_PARTICLES) { return; + } /* find particle at endpoint of array */ struct particle *p = &particles[num_active_particles]; diff --git a/modules/SDL2/Xcode-iOS/Demos/src/happy.c b/modules/SDL2/Xcode-iOS/Demos/src/happy.c index 73d4d4f..4256200 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/happy.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/happy.c @@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer) /* convert RGBA surface to texture */ texture = SDL_CreateTextureFromSurface(renderer, bmp_surface); - if (!texture) { + if (texture == NULL) { fatalError("could not create texture"); } SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND); diff --git a/modules/SDL2/Xcode-iOS/Demos/src/keyboard.c b/modules/SDL2/Xcode-iOS/Demos/src/keyboard.c index 4d630ba..6ab1db2 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/keyboard.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/keyboard.c @@ -165,7 +165,7 @@ loadFont(void) { SDL_Surface *surface = SDL_LoadBMP("kromasky_16x16.bmp"); - if (!surface) { + if (surface == NULL) { printf("Error loading bitmap: %s\n", SDL_GetError()); return 0; } else { @@ -183,7 +183,7 @@ loadFont(void) SDL_BlitSurface(surface, NULL, converted, NULL); /* create our texture */ texture = SDL_CreateTextureFromSurface(renderer, converted); - if (!texture) { + if (texture == NULL) { printf("texture creation failed: %s\n", SDL_GetError()); } else { /* set blend mode for our texture */ diff --git a/modules/SDL2/Xcode-iOS/Demos/src/mixer.c b/modules/SDL2/Xcode-iOS/Demos/src/mixer.c index 18e33f1..4c4ffba 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/mixer.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/mixer.c @@ -207,9 +207,9 @@ playSound(struct sound *s) break; } /* if this channel's sound is older than the oldest so far, set it to oldest */ - if (mixer.channels[i].timestamp < - mixer.channels[oldest_channel].timestamp) + if (mixer.channels[i].timestamp < mixer.channels[oldest_channel].timestamp) { oldest_channel = i; + } } /* no empty channels, take the oldest one */ diff --git a/modules/SDL2/Xcode-iOS/Demos/src/rectangles.c b/modules/SDL2/Xcode-iOS/Demos/src/rectangles.c index a08f997..9102cf2 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/rectangles.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/rectangles.c @@ -58,11 +58,11 @@ main(int argc, char *argv[]) /* create window and renderer */ window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI); - if (!window) { + if (window == NULL) { fatalError("Could not initialize Window"); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { fatalError("Could not create renderer"); } diff --git a/modules/SDL2/Xcode-iOS/Demos/src/touch.c b/modules/SDL2/Xcode-iOS/Demos/src/touch.c index 6c18463..22a251b 100644 --- a/modules/SDL2/Xcode-iOS/Demos/src/touch.c +++ b/modules/SDL2/Xcode-iOS/Demos/src/touch.c @@ -63,7 +63,7 @@ initializeTexture(SDL_Renderer *renderer) brush = SDL_CreateTextureFromSurface(renderer, bmp_surface); SDL_FreeSurface(bmp_surface); - if (!brush) { + if (brush == NULL) { fatalError("could not create brush texture"); } /* additive blending -- laying strokes on top of eachother makes them brighter */ diff --git a/modules/SDL2/Xcode/SDL/Info-Framework.plist b/modules/SDL2/Xcode/SDL/Info-Framework.plist index 5653bbb..56ee240 100644 --- a/modules/SDL2/Xcode/SDL/Info-Framework.plist +++ b/modules/SDL2/Xcode/SDL/Info-Framework.plist @@ -19,10 +19,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.26.3 + 2.28.3 CFBundleSignature SDLX CFBundleVersion - 2.26.3 + 2.28.3 diff --git a/modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj index fe38e56..9266004 100644 --- a/modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -9528,8 +9528,8 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_POSTPROCESSING = YES; - DYLIB_COMPATIBILITY_VERSION = 2601.0.0; - DYLIB_CURRENT_VERSION = 2601.3.0; + DYLIB_COMPATIBILITY_VERSION = 2801.0.0; + DYLIB_CURRENT_VERSION = 2801.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_ALTIVEC_EXTENSIONS = YES; @@ -9558,7 +9558,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2; PRODUCT_NAME = SDL2; STRIP_STYLE = "non-global"; @@ -9570,7 +9570,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.0.17; + MARKETING_VERSION = 2.28.3; OTHER_LDFLAGS = "-liconv"; }; name = Release; @@ -9613,8 +9613,8 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_COMPATIBILITY_VERSION = 2601.0.0; - DYLIB_CURRENT_VERSION = 2601.3.0; + DYLIB_COMPATIBILITY_VERSION = 2801.0.0; + DYLIB_CURRENT_VERSION = 2801.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -9643,7 +9643,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.11; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2; PRODUCT_NAME = SDL2; @@ -9656,7 +9656,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.0.17; + MARKETING_VERSION = 2.28.3; OTHER_LDFLAGS = "-liconv"; }; name = Debug; @@ -9862,8 +9862,8 @@ CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 2601.0.0; - DYLIB_CURRENT_VERSION = 2601.3.0; + DYLIB_COMPATIBILITY_VERSION = 2801.0.0; + DYLIB_CURRENT_VERSION = 2801.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -9914,8 +9914,8 @@ CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 2601.0.0; - DYLIB_CURRENT_VERSION = 2601.3.0; + DYLIB_COMPATIBILITY_VERSION = 2801.0.0; + DYLIB_CURRENT_VERSION = 2801.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; diff --git a/modules/SDL2/Xcode/SDL/pkg-support/SDL.info b/modules/SDL2/Xcode/SDL/pkg-support/SDL.info index f08facd..aea50a9 100644 --- a/modules/SDL2/Xcode/SDL/pkg-support/SDL.info +++ b/modules/SDL2/Xcode/SDL/pkg-support/SDL.info @@ -1,4 +1,4 @@ -Title SDL 2.0.0 +Title SDL 2.28.3 Version 1 Description SDL Library for Mac OS X (http://www.libsdl.org) DefaultLocation /Library/Frameworks diff --git a/modules/SDL2/android-project/app/build.gradle b/modules/SDL2/android-project/app/build.gradle index baa0edc..c604361 100644 --- a/modules/SDL2/android-project/app/build.gradle +++ b/modules/SDL2/android-project/app/build.gradle @@ -8,22 +8,22 @@ else { } android { - compileSdkVersion 31 + if (buildAsApplication) { + namespace "org.libsdl.app" + } + compileSdkVersion 34 defaultConfig { - if (buildAsApplication) { - applicationId "org.libsdl.app" - } - minSdkVersion 16 - targetSdkVersion 31 + minSdkVersion 19 + targetSdkVersion 34 versionCode 1 versionName "1.0" externalNativeBuild { ndkBuild { - arguments "APP_PLATFORM=android-16" + arguments "APP_PLATFORM=android-19" abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' } // cmake { - // arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static" + // arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static" // // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' // abiFilters 'arm64-v8a' // } @@ -53,10 +53,10 @@ android { } } - lintOptions { + lint { abortOnError false } - + if (buildAsLibrary) { libraryVariants.all { variant -> variant.outputs.each { output -> diff --git a/modules/SDL2/android-project/app/src/main/AndroidManifest.xml b/modules/SDL2/android-project/app/src/main/AndroidManifest.xml index d997afe..e0d0334 100644 --- a/modules/SDL2/android-project/app/src/main/AndroidManifest.xml +++ b/modules/SDL2/android-project/app/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@ com.gamemaker.game --> diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java index 65c5a42..ee5521f 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java @@ -186,7 +186,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe // Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead // of TRANSPORT_LE. Let's force ourselves to connect low energy. private BluetoothGatt connectGatt(boolean managed) { - if (Build.VERSION.SDK_INT >= 23) { + if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) { try { return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE); } catch (Exception e) { @@ -429,7 +429,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe } }); } - } + } else if (newState == 0) { mIsConnected = false; } diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java index cf3c926..6f7013b 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java @@ -170,7 +170,7 @@ public class HIDDeviceManager { Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol()); Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount()); - // Get endpoint details + // Get endpoint details for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++) { UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi); @@ -251,6 +251,8 @@ public class HIDDeviceManager { 0x20d6, // PowerA 0x24c6, // PowerA 0x2c22, // Qanba + 0x2dc8, // 8BitDo + 0x9886, // ASTRO Gaming }; if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC && @@ -271,14 +273,16 @@ public class HIDDeviceManager { final int XB1_IFACE_SUBCLASS = 71; final int XB1_IFACE_PROTOCOL = 208; final int[] SUPPORTED_VENDORS = { + 0x044f, // Thrustmaster 0x045e, // Microsoft 0x0738, // Mad Catz 0x0e6f, // PDP 0x0f0d, // Hori + 0x10f5, // Turtle Beach 0x1532, // Razer Wildcat 0x20d6, // PowerA 0x24c6, // PowerA - 0x2dc8, /* 8BitDo */ + 0x2dc8, // 8BitDo 0x2e24, // Hyperkin }; @@ -353,13 +357,13 @@ public class HIDDeviceManager { private void initializeBluetooth() { Log.d(TAG, "Initializing Bluetooth"); - if (Build.VERSION.SDK_INT <= 30 && + if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ && mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) { Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH"); return; } - if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18)) { + if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18 /* Android 4.3 (JELLY_BEAN_MR2) */)) { Log.d(TAG, "Couldn't initialize Bluetooth, this version of Android does not support Bluetooth LE"); return; } @@ -524,7 +528,7 @@ public class HIDDeviceManager { for (HIDDevice device : mDevicesById.values()) { device.setFrozen(frozen); } - } + } } ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -573,7 +577,7 @@ public class HIDDeviceManager { try { final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31 int flags; - if (Build.VERSION.SDK_INT >= 31) { + if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) { flags = FLAG_MUTABLE; } else { flags = 0; diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java index d20fe80..bfe0cf9 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java @@ -52,7 +52,7 @@ class HIDDeviceUSB implements HIDDevice { @Override public String getSerialNumber() { String result = null; - if (Build.VERSION.SDK_INT >= 21) { + if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) { try { result = mDevice.getSerialNumber(); } @@ -74,7 +74,7 @@ class HIDDeviceUSB implements HIDDevice { @Override public String getManufacturerName() { String result = null; - if (Build.VERSION.SDK_INT >= 21) { + if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) { result = mDevice.getManufacturerName(); } if (result == null) { @@ -86,7 +86,7 @@ class HIDDeviceUSB implements HIDDevice { @Override public String getProductName() { String result = null; - if (Build.VERSION.SDK_INT >= 21) { + if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) { result = mDevice.getProductName(); } if (result == null) { diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDL.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDL.java index dafc0cb..44c21c1 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDL.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDL.java @@ -29,6 +29,7 @@ public class SDL { // This function stores the current activity (SDL or not) public static void setContext(Context context) { + SDLAudioManager.setContext(context); mContext = context; } diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index c122fc9..8d0f8d1 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -60,7 +60,7 @@ import java.util.Locale; public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener { private static final String TAG = "SDL"; private static final int SDL_MAJOR_VERSION = 2; - private static final int SDL_MINOR_VERSION = 26; + private static final int SDL_MINOR_VERSION = 28; private static final int SDL_MICRO_VERSION = 3; /* // Display InputType.SOURCE/CLASS of events and devices @@ -93,7 +93,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (Build.VERSION.SDK_INT >= 23) { tst = InputDevice.SOURCE_BLUETOOTH_STYLUS; if ((s & tst) == tst) src += " BLUETOOTH_STYLUS"; s2 &= ~tst; @@ -107,7 +107,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh if ((s & tst) == tst) src += " GAMEPAD"; s2 &= ~tst; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + if (Build.VERSION.SDK_INT >= 21) { tst = InputDevice.SOURCE_HDMI; if ((s & tst) == tst) src += " HDMI"; s2 &= ~tst; @@ -146,7 +146,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh if ((s & tst) == tst) src += " TOUCHSCREEN"; s2 &= ~tst; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { + if (Build.VERSION.SDK_INT >= 18) { tst = InputDevice.SOURCE_TOUCH_NAVIGATION; if ((s & tst) == tst) src += " TOUCH_NAVIGATION"; s2 &= ~tst; @@ -170,7 +170,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh */ public static boolean mIsResumedCalled, mHasFocus; - public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24); + public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */); // Cursor types // private static final int SDL_SYSTEM_CURSOR_NONE = -1; @@ -224,9 +224,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh protected static SDLGenericMotionListener_API12 getMotionListener() { if (mMotionListener == null) { - if (Build.VERSION.SDK_INT >= 26) { + if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) { mMotionListener = new SDLGenericMotionListener_API26(); - } else if (Build.VERSION.SDK_INT >= 24) { + } else if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { mMotionListener = new SDLGenericMotionListener_API24(); } else { mMotionListener = new SDLGenericMotionListener_API12(); @@ -393,7 +393,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh mHIDDeviceManager = HIDDeviceManager.acquire(this); // Set up the surface - mSurface = createSDLSurface(getApplication()); + mSurface = createSDLSurface(this); mLayout = new RelativeLayout(this); mLayout.addView(mSurface); @@ -404,7 +404,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh SDLActivity.onNativeOrientationChanged(mCurrentOrientation); try { - if (Build.VERSION.SDK_INT < 24) { + if (Build.VERSION.SDK_INT < 24 /* Android 7.0 (N) */) { mCurrentLocale = getContext().getResources().getConfiguration().locale; } else { mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0); @@ -588,6 +588,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh mHIDDeviceManager = null; } + SDLAudioManager.release(this); + if (SDLActivity.mBrokenLibraries) { super.onDestroy(); return; @@ -766,7 +768,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh } break; case COMMAND_CHANGE_WINDOW_STYLE: - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) { if (context instanceof Activity) { Window window = ((Activity) context).getWindow(); if (window != null) { @@ -841,7 +843,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh msg.obj = data; boolean result = commandHandler.sendMessage(msg); - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) { if (command == COMMAND_CHANGE_WINDOW_STYLE) { // Ensure we don't return until the resize has actually happened, // or 500ms have passed. @@ -969,15 +971,18 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh /* If set, hint "explicitly controls which UI orientations are allowed". */ if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) { orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; - } else if (hint.contains("LandscapeRight")) { - orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; } else if (hint.contains("LandscapeLeft")) { + orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; + } else if (hint.contains("LandscapeRight")) { orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE; } - if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) { + /* exact match to 'Portrait' to distinguish with PortraitUpsideDown */ + boolean contains_Portrait = hint.contains("Portrait ") || hint.endsWith("Portrait"); + + if (contains_Portrait && hint.contains("PortraitUpsideDown")) { orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT; - } else if (hint.contains("Portrait")) { + } else if (contains_Portrait) { orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; } else if (hint.contains("PortraitUpsideDown")) { orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT; @@ -1090,7 +1095,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh // thus SDK version 27. If we are in DeX mode and not API 27 or higher, as a result, // we should stick to relative mode. // - if ((Build.VERSION.SDK_INT < 27) && isDeXMode()) { + if (Build.VERSION.SDK_INT < 27 /* Android 8.1 (O_MR1) */ && isDeXMode()) { return false; } @@ -1180,7 +1185,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh * This method is called by SDL using JNI. */ public static boolean isDeXMode() { - if (Build.VERSION.SDK_INT < 24) { + if (Build.VERSION.SDK_INT < 24 /* Android 7.0 (N) */) { return false; } try { @@ -1340,23 +1345,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh } } - if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) { - if (event.getAction() == KeyEvent.ACTION_DOWN) { - if (isTextInputEvent(event)) { - if (ic != null) { - ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1); - } else { - SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1); - } - } - onNativeKeyDown(keyCode); - return true; - } else if (event.getAction() == KeyEvent.ACTION_UP) { - onNativeKeyUp(keyCode); - return true; - } - } - if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) { // on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses // they are ignored here because sending them as mouse input to SDL is messy @@ -1371,6 +1359,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh } } + if (event.getAction() == KeyEvent.ACTION_DOWN) { + if (isTextInputEvent(event)) { + if (ic != null) { + ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1); + } else { + SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1); + } + } + onNativeKeyDown(keyCode); + return true; + } else if (event.getAction() == KeyEvent.ACTION_UP) { + onNativeKeyUp(keyCode); + return true; + } + return false; } @@ -1617,7 +1620,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh private final Runnable rehideSystemUi = new Runnable() { @Override public void run() { - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) { int flags = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | @@ -1670,7 +1673,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); ++mLastCursorID; - if (Build.VERSION.SDK_INT >= 24) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { try { mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY)); } catch (Exception e) { @@ -1686,7 +1689,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh * This method is called by SDL using JNI. */ public static void destroyCustomCursor(int cursorID) { - if (Build.VERSION.SDK_INT >= 24) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { try { mCursors.remove(cursorID); } catch (Exception e) { @@ -1700,7 +1703,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh */ public static boolean setCustomCursor(int cursorID) { - if (Build.VERSION.SDK_INT >= 24) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { try { mSurface.setPointerIcon(mCursors.get(cursorID)); } catch (Exception e) { @@ -1755,7 +1758,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh cursor_type = 1002; //PointerIcon.TYPE_HAND; break; } - if (Build.VERSION.SDK_INT >= 24) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { try { mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type)); } catch (Exception e) { @@ -1769,7 +1772,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh * This method is called by SDL using JNI. */ public static void requestPermission(String permission, int requestCode) { - if (Build.VERSION.SDK_INT < 23) { + if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) { nativePermissionResult(requestCode, true); return; } @@ -1798,7 +1801,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh i.setData(Uri.parse(url)); int flags = Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK; - if (Build.VERSION.SDK_INT >= 21) { + if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) { flags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT; } else { flags |= Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET; @@ -2002,6 +2005,18 @@ class SDLInputConnection extends BaseInputConnection { @Override public boolean deleteSurroundingText(int beforeLength, int afterLength) { + if (Build.VERSION.SDK_INT <= 29 /* Android 10.0 (Q) */) { + // Workaround to capture backspace key. Ref: http://stackoverflow.com/questions>/14560344/android-backspace-in-webview-baseinputconnection + // and https://bugzilla.libsdl.org/show_bug.cgi?id=2265 + if (beforeLength > 0 && afterLength == 0) { + // backspace(s) + while (beforeLength-- > 0) { + nativeGenerateScancodeForUnichar('\b'); + } + return true; + } + } + if (!super.deleteSurroundingText(beforeLength, afterLength)) { return false; } diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java index 2bfc718..7c821a4 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java @@ -1,5 +1,8 @@ package org.libsdl.app; +import android.content.Context; +import android.media.AudioDeviceCallback; +import android.media.AudioDeviceInfo; import android.media.AudioFormat; import android.media.AudioManager; import android.media.AudioRecord; @@ -8,34 +11,67 @@ import android.media.MediaRecorder; import android.os.Build; import android.util.Log; -public class SDLAudioManager -{ +import java.util.Arrays; + +public class SDLAudioManager { protected static final String TAG = "SDLAudio"; protected static AudioTrack mAudioTrack; protected static AudioRecord mAudioRecord; + protected static Context mContext; + + private static final int[] NO_DEVICES = {}; + + private static AudioDeviceCallback mAudioDeviceCallback; public static void initialize() { mAudioTrack = null; mAudioRecord = null; + mAudioDeviceCallback = null; + + if(Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) + { + mAudioDeviceCallback = new AudioDeviceCallback() { + @Override + public void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices) { + Arrays.stream(addedDevices).forEach(deviceInfo -> addAudioDevice(deviceInfo.isSink(), deviceInfo.getId())); + } + + @Override + public void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices) { + Arrays.stream(removedDevices).forEach(deviceInfo -> removeAudioDevice(deviceInfo.isSink(), deviceInfo.getId())); + } + }; + } + } + + public static void setContext(Context context) { + mContext = context; + if (context != null) { + registerAudioDeviceCallback(); + } + } + + public static void release(Context context) { + unregisterAudioDeviceCallback(context); } // Audio protected static String getAudioFormatString(int audioFormat) { switch (audioFormat) { - case AudioFormat.ENCODING_PCM_8BIT: - return "8-bit"; - case AudioFormat.ENCODING_PCM_16BIT: - return "16-bit"; - case AudioFormat.ENCODING_PCM_FLOAT: - return "float"; - default: - return Integer.toString(audioFormat); + case AudioFormat.ENCODING_PCM_8BIT: + return "8-bit"; + case AudioFormat.ENCODING_PCM_16BIT: + return "16-bit"; + case AudioFormat.ENCODING_PCM_FLOAT: + return "float"; + default: + return Integer.toString(audioFormat); } } - protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { + protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) { int channelConfig; int sampleSize; int frameSize; @@ -43,14 +79,14 @@ public class SDLAudioManager Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz"); /* On older devices let's use known good settings */ - if (Build.VERSION.SDK_INT < 21) { + if (Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) { if (desiredChannels > 2) { desiredChannels = 2; } } /* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */ - if (Build.VERSION.SDK_INT < 22) { + if (Build.VERSION.SDK_INT < 22 /* Android 5.1 (LOLLIPOP_MR1) */) { if (sampleRate < 8000) { sampleRate = 8000; } else if (sampleRate > 48000) { @@ -59,7 +95,7 @@ public class SDLAudioManager } if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) { - int minSDKVersion = (isCapture ? 23 : 21); + int minSDKVersion = (isCapture ? 23 /* Android 6.0 (M) */ : 21 /* Android 5.0 (LOLLIPOP) */); if (Build.VERSION.SDK_INT < minSDKVersion) { audioFormat = AudioFormat.ENCODING_PCM_16BIT; } @@ -120,7 +156,7 @@ public class SDLAudioManager channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER; break; case 8: - if (Build.VERSION.SDK_INT >= 23) { + if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) { channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND; } else { Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround"); @@ -201,6 +237,10 @@ public class SDLAudioManager return null; } + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) { + mAudioRecord.setPreferredDevice(getOutputAudioDeviceInfo(deviceId)); + } + mAudioRecord.startRecording(); } @@ -224,6 +264,10 @@ public class SDLAudioManager return null; } + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) { + mAudioTrack.setPreferredDevice(getInputAudioDeviceInfo(deviceId)); + } + mAudioTrack.play(); } @@ -238,11 +282,73 @@ public class SDLAudioManager return results; } + private static AudioDeviceInfo getInputAudioDeviceInfo(int deviceId) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS)) + .filter(deviceInfo -> deviceInfo.getId() == deviceId) + .findFirst() + .orElse(null); + } else { + return null; + } + } + + private static AudioDeviceInfo getOutputAudioDeviceInfo(int deviceId) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)) + .filter(deviceInfo -> deviceInfo.getId() == deviceId) + .findFirst() + .orElse(null); + } else { + return null; + } + } + + private static void registerAudioDeviceCallback() { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + audioManager.registerAudioDeviceCallback(mAudioDeviceCallback, null); + } + } + + private static void unregisterAudioDeviceCallback(Context context) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + audioManager.unregisterAudioDeviceCallback(mAudioDeviceCallback); + } + } + + /** + * This method is called by SDL using JNI. + */ + public static int[] getAudioOutputDevices() { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)).mapToInt(AudioDeviceInfo::getId).toArray(); + } else { + return NO_DEVICES; + } + } + + /** + * This method is called by SDL using JNI. + */ + public static int[] getAudioInputDevices() { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { + AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS)).mapToInt(AudioDeviceInfo::getId).toArray(); + } else { + return NO_DEVICES; + } + } + /** * This method is called by SDL using JNI. */ - public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { - return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames); + public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) { + return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId); } /** @@ -254,6 +360,11 @@ public class SDLAudioManager return; } + if (android.os.Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) { + Log.e(TAG, "Attempted to make an incompatible audio call with uninitialized audio! (floating-point output is supported since Android 5.0 Lollipop)"); + return; + } + for (int i = 0; i < buffer.length;) { int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING); if (result > 0) { @@ -326,18 +437,22 @@ public class SDLAudioManager /** * This method is called by SDL using JNI. */ - public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { - return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames); + public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) { + return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId); } /** This method is called by SDL using JNI. */ public static int captureReadFloatBuffer(float[] buffer, boolean blocking) { - return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); + if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) { + return 0; + } else { + return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); + } } /** This method is called by SDL using JNI. */ public static int captureReadShortBuffer(short[] buffer, boolean blocking) { - if (Build.VERSION.SDK_INT < 23) { + if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) { return mAudioRecord.read(buffer, 0, buffer.length); } else { return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); @@ -346,7 +461,7 @@ public class SDLAudioManager /** This method is called by SDL using JNI. */ public static int captureReadByteBuffer(byte[] buffer, boolean blocking) { - if (Build.VERSION.SDK_INT < 23) { + if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) { return mAudioRecord.read(buffer, 0, buffer.length); } else { return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); @@ -391,4 +506,9 @@ public class SDLAudioManager } public static native int nativeSetupJNI(); + + public static native void removeAudioDevice(boolean isCapture, int deviceId); + + public static native void addAudioDevice(boolean isCapture, int deviceId); + } diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java index 82373d9..d6913f1 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java @@ -24,7 +24,7 @@ public class SDLControllerManager public static native int nativeAddJoystick(int device_id, String name, String desc, int vendor_id, int product_id, boolean is_accelerometer, int button_mask, - int naxes, int nhats, int nballs); + int naxes, int axis_mask, int nhats, int nballs); public static native int nativeRemoveJoystick(int device_id); public static native int nativeAddHaptic(int device_id, String name); public static native int nativeRemoveHaptic(int device_id); @@ -42,7 +42,7 @@ public class SDLControllerManager public static void initialize() { if (mJoystickHandler == null) { - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) { mJoystickHandler = new SDLJoystickHandler_API19(); } else { mJoystickHandler = new SDLJoystickHandler_API16(); @@ -50,7 +50,7 @@ public class SDLControllerManager } if (mHapticHandler == null) { - if (Build.VERSION.SDK_INT >= 26) { + if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) { mHapticHandler = new SDLHapticHandler_API26(); } else { mHapticHandler = new SDLHapticHandler(); @@ -168,6 +168,32 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler { arg1Axis = MotionEvent.AXIS_GAS; } + // Make sure the AXIS_Z is sorted between AXIS_RY and AXIS_RZ. + // This is because the usual pairing are: + // - AXIS_X + AXIS_Y (left stick). + // - AXIS_RX, AXIS_RY (sometimes the right stick, sometimes triggers). + // - AXIS_Z, AXIS_RZ (sometimes the right stick, sometimes triggers). + // This sorts the axes in the above order, which tends to be correct + // for Xbox-ish game pads that have the right stick on RX/RY and the + // triggers on Z/RZ. + // + // Gamepads that don't have AXIS_Z/AXIS_RZ but use + // AXIS_LTRIGGER/AXIS_RTRIGGER are unaffected by this. + // + // References: + // - https://developer.android.com/develop/ui/views/touch-and-input/game-controllers/controller-input + // - https://www.kernel.org/doc/html/latest/input/gamepad.html + if (arg0Axis == MotionEvent.AXIS_Z) { + arg0Axis = MotionEvent.AXIS_RZ - 1; + } else if (arg0Axis > MotionEvent.AXIS_Z && arg0Axis < MotionEvent.AXIS_RZ) { + --arg0Axis; + } + if (arg1Axis == MotionEvent.AXIS_Z) { + arg1Axis = MotionEvent.AXIS_RZ - 1; + } else if (arg1Axis > MotionEvent.AXIS_Z && arg1Axis < MotionEvent.AXIS_RZ) { + --arg1Axis; + } + return arg0Axis - arg1Axis; } } @@ -210,7 +236,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler { mJoysticks.add(joystick); SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, - getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0); + getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, 0); } } } @@ -291,6 +317,9 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler { public int getVendorId(InputDevice joystickDevice) { return 0; } + public int getAxisMask(List ranges) { + return -1; + } public int getButtonMask(InputDevice joystickDevice) { return -1; } @@ -308,6 +337,43 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 { return joystickDevice.getVendorId(); } + @Override + public int getAxisMask(List ranges) { + // For compatibility, keep computing the axis mask like before, + // only really distinguishing 2, 4 and 6 axes. + int axis_mask = 0; + if (ranges.size() >= 2) { + // ((1 << SDL_GAMEPAD_AXIS_LEFTX) | (1 << SDL_GAMEPAD_AXIS_LEFTY)) + axis_mask |= 0x0003; + } + if (ranges.size() >= 4) { + // ((1 << SDL_GAMEPAD_AXIS_RIGHTX) | (1 << SDL_GAMEPAD_AXIS_RIGHTY)) + axis_mask |= 0x000c; + } + if (ranges.size() >= 6) { + // ((1 << SDL_GAMEPAD_AXIS_LEFT_TRIGGER) | (1 << SDL_GAMEPAD_AXIS_RIGHT_TRIGGER)) + axis_mask |= 0x0030; + } + // Also add an indicator bit for whether the sorting order has changed. + // This serves to disable outdated gamecontrollerdb.txt mappings. + boolean have_z = false; + boolean have_past_z_before_rz = false; + for (InputDevice.MotionRange range : ranges) { + int axis = range.getAxis(); + if (axis == MotionEvent.AXIS_Z) { + have_z = true; + } else if (axis > MotionEvent.AXIS_Z && axis < MotionEvent.AXIS_RZ) { + have_past_z_before_rz = true; + } + } + if (have_z && have_past_z_before_rz) { + // If both these exist, the compare() function changed sorting order. + // Set a bit to indicate this fact. + axis_mask |= 0x8000; + } + return axis_mask; + } + @Override public int getButtonMask(InputDevice joystickDevice) { int button_mask = 0; @@ -743,7 +809,7 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 { @Override public boolean supportsRelativeMouse() { - return (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)); + return (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */); } @Override @@ -753,7 +819,7 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 { @Override public boolean setRelativeMouseEnabled(boolean enabled) { - if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) { + if (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */) { if (enabled) { SDLActivity.getContentView().requestPointerCapture(); } else { diff --git a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java index dcd26d4..0857e4b 100644 --- a/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java +++ b/modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java @@ -116,7 +116,7 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, int nDeviceHeight = height; try { - if (Build.VERSION.SDK_INT >= 17) { + if (Build.VERSION.SDK_INT >= 17 /* Android 4.2 (JELLY_BEAN_MR1) */) { DisplayMetrics realMetrics = new DisplayMetrics(); mDisplay.getRealMetrics( realMetrics ); nDeviceWidth = realMetrics.widthPixels; @@ -163,7 +163,7 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Don't skip in MultiWindow. if (skip) { - if (Build.VERSION.SDK_INT >= 24) { + if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) { if (SDLActivity.mSingleton.isInMultiWindowMode()) { Log.v("SDL", "Don't skip in Multi-Window"); skip = false; diff --git a/modules/SDL2/android-project/build.gradle b/modules/SDL2/android-project/build.gradle index 6f629c8..2c911c6 100644 --- a/modules/SDL2/android-project/build.gradle +++ b/modules/SDL2/android-project/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.3' + classpath 'com.android.tools.build:gradle:8.1.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/modules/SDL2/android-project/gradle/wrapper/gradle-wrapper.properties b/modules/SDL2/android-project/gradle/wrapper/gradle-wrapper.properties index ada5af4..5b9d759 100644 --- a/modules/SDL2/android-project/gradle/wrapper/gradle-wrapper.properties +++ b/modules/SDL2/android-project/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Nov 11 18:20:34 PST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/modules/SDL2/android-project/gradlew b/modules/SDL2/android-project/gradlew index 9d82f78..3427607 100644 --- a/modules/SDL2/android-project/gradlew +++ b/modules/SDL2/android-project/gradlew @@ -126,8 +126,8 @@ if $cygwin ; then # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` diff --git a/modules/SDL2/build-scripts/androidbuildlibs.sh b/modules/SDL2/build-scripts/androidbuildlibs.sh index dc72172..0ee583a 100644 --- a/modules/SDL2/build-scripts/androidbuildlibs.sh +++ b/modules/SDL2/build-scripts/androidbuildlibs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Build the Android libraries without needing a project # (AndroidManifest.xml, jni/{Application,Android}.mk, etc.) diff --git a/modules/SDL2/build-scripts/clang-format-src.sh b/modules/SDL2/build-scripts/clang-format-src.sh new file mode 100644 index 0000000..c4af9a5 --- /dev/null +++ b/modules/SDL2/build-scripts/clang-format-src.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +cd "$(dirname $0)/../src" + +echo "Running clang-format in $(pwd)" + +find . -regex '.*\.[chm]p*' -exec clang-format -i {} \; + +# Revert third-party code +git checkout \ + events/imKStoUCS.* \ + hidapi \ + joystick/controller_type.c \ + joystick/controller_type.h \ + joystick/hidapi/steam/controller_constants.h \ + joystick/hidapi/steam/controller_structs.h \ + libm \ + stdlib/SDL_malloc.c \ + stdlib/SDL_qsort.c \ + stdlib/SDL_strtokr.c \ + video/arm \ + video/khronos \ + video/x11/edid-parse.c \ + video/yuv2rgb +clang-format -i hidapi/SDL_hidapi.c + +# Revert generated code +git checkout dynapi/SDL_dynapi_overrides.h +git checkout dynapi/SDL_dynapi_procs.h +git checkout render/metal/SDL_shaders_metal_*.h + +echo "clang-format complete!" diff --git a/modules/SDL2/build-scripts/config.guess b/modules/SDL2/build-scripts/config.guess index 1817bdc..b187213 100644 --- a/modules/SDL2/build-scripts/config.guess +++ b/modules/SDL2/build-scripts/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-05-25' +timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -966,11 +966,37 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1036,7 +1062,16 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) @@ -1191,7 +1226,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1332,7 +1367,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; diff --git a/modules/SDL2/build-scripts/config.sub b/modules/SDL2/build-scripts/config.sub index 312ad81..6ae2502 100644 --- a/modules/SDL2/build-scripts/config.sub +++ b/modules/SDL2/build-scripts/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-03' +timestamp='2023-07-31' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1205,39 +1206,16 @@ case $cpu-$vendor in | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ - | loongarch32 | loongarch64 | loongarchx32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ @@ -1285,7 +1263,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1341,6 +1319,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1728,7 +1710,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1754,7 +1736,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* | cos* | mbr* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1762,8 +1744,11 @@ case $os in ;; none) ;; + kernel* | msvc* ) + # Restricted further below + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac @@ -1772,14 +1757,30 @@ esac # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ;; uclinux-uclibc* ) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + managarm-mlibc* | managarm-kernel* ) + ;; + windows*-gnu* | windows*-msvc*) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel* ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc* ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) @@ -1792,11 +1793,15 @@ case $kernel-$os in ;; *-eabi* | *-gnueabi*) ;; + none-coff* | none-elf*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an output format "OS" + ;; -*) # Blank kernel with real OS is always fine. ;; *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac diff --git a/modules/SDL2/build-scripts/test-versioning.sh b/modules/SDL2/build-scripts/test-versioning.sh index 7d71c9e..ed77715 100644 --- a/modules/SDL2/build-scripts/test-versioning.sh +++ b/modules/SDL2/build-scripts/test-versioning.sh @@ -4,6 +4,8 @@ set -eu +cd `dirname $0`/.. + ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h) ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h) ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h) @@ -139,6 +141,25 @@ else not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version" fi +version=$(sed -Ene 's/Title SDL (.*)/\1/p' Xcode/SDL/pkg-support/SDL.info) + +if [ "$ref_version" = "$version" ]; then + ok "SDL.info Title $version" +else + not_ok "SDL.info Title $version disagrees with SDL_version.h $ref_version" +fi + +marketing=$(sed -Ene 's/.*MARKETING_VERSION = (.*);/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj) + +ref="$ref_version +$ref_version" + +if [ "$ref" = "$marketing" ]; then + ok "project.pbxproj MARKETING_VERSION is consistent" +else + not_ok "project.pbxproj MARKETING_VERSION is inconsistent, expected $ref, got $marketing" +fi + # For simplicity this assumes we'll never break ABI before SDL 3. dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj) diff --git a/modules/SDL2/build-scripts/update-version.sh b/modules/SDL2/build-scripts/update-version.sh index 82174be..9b25c2a 100644 --- a/modules/SDL2/build-scripts/update-version.sh +++ b/modules/SDL2/build-scripts/update-version.sh @@ -30,6 +30,10 @@ echo "Updating version to '$NEWVERSION' ..." # !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file. perl -w -pi -e 's/(\)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist +perl -w -pi -e 's/(Title SDL )\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/pkg-support/SDL.info + +perl -w -pi -e 's/(MARKETING_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj + DYVER=`expr $MINOR \* 100 + 1` perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj diff --git a/modules/SDL2/build-scripts/wikiheaders.pl b/modules/SDL2/build-scripts/wikiheaders.pl index 5aeeaf0..bf26d64 100644 --- a/modules/SDL2/build-scripts/wikiheaders.pl +++ b/modules/SDL2/build-scripts/wikiheaders.pl @@ -10,6 +10,7 @@ my $projectfullname = 'Simple Directmedia Layer'; my $projectshortname = 'SDL'; my $wikisubdir = ''; my $incsubdir = 'include'; +my $readmesubdir = undef; my $apiprefixregex = undef; my $versionfname = 'include/SDL_version.h'; my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z'; @@ -22,10 +23,12 @@ my $wikiurl = 'https://wiki.libsdl.org'; my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new'; my $srcpath = undef; my $wikipath = undef; +my $wikireadmesubdir = 'README'; my $warn_about_missing = 0; my $copy_direction = 0; my $optionsfname = undef; my $wikipreamble = undef; +my $changeformat = undef; foreach (@ARGV) { $warn_about_missing = 1, next if $_ eq '--warn-about-missing'; @@ -36,6 +39,9 @@ foreach (@ARGV) { if (/\A--options=(.*)\Z/) { $optionsfname = $1; next; + } elsif (/\A--changeformat=(.*)\Z/) { + $changeformat = $1; + next; } $srcpath = $_, next if not defined $srcpath; $wikipath = $_, next if not defined $wikipath; @@ -67,6 +73,7 @@ if (defined $optionsfname) { $projectshortname = $val, next if $key eq 'projectshortname'; $wikisubdir = $val, next if $key eq 'wikisubdir'; $incsubdir = $val, next if $key eq 'incsubdir'; + $readmesubdir = $val, next if $key eq 'readmesubdir'; $versionmajorregex = $val, next if $key eq 'versionmajorregex'; $versionminorregex = $val, next if $key eq 'versionminorregex'; $versionpatchregex = $val, next if $key eq 'versionpatchregex'; @@ -131,6 +138,7 @@ sub wordwrap_with_bullet_indent { # don't call this directly. my $usual_prefix = ' ' x $bulletlen; foreach (@wrappedlines) { + s/\s*\Z//; $retval .= "$prefix$_\n"; $prefix = $usual_prefix; } @@ -255,10 +263,30 @@ sub wikify_chunk { $str .= "$code<\/syntaxhighlight>"; } } elsif ($wikitype eq 'md') { + # convert `code` things first, so they aren't mistaken for other markdown items. + my $codedstr = ''; + while ($str =~ s/\A(.*?)(\`.*?\`)//ms) { + my $codeblock = $2; + $codedstr .= wikify_chunk($wikitype, $1, undef, undef); + if (defined $apiprefixregex) { + # Convert obvious API things to wikilinks, even inside `code` blocks, + # BUT ONLY IF the entire code block is the API thing, + # So something like "just call `SDL_Whatever`" will become + # "just call [`SDL_Whatever`](SDL_Whatever)", but + # "just call `SDL_Whatever(7)`" will not. It's just the safest + # way to do this without resorting to wrapping things in html tags. + $codeblock =~ s/\A\`($apiprefixregex[a-zA-Z0-9_]+)\`\Z/[`$1`]($1)/gms; + } + $codedstr .= $codeblock; + } + # Convert obvious API things to wikilinks. if (defined $apiprefixregex) { $str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms; } + + $str = $codedstr . $str; + if (defined $code) { $str .= "```$codelang$code```"; } @@ -325,6 +353,11 @@ sub dewikify_chunk { # bullets $str =~ s/^\* /- /gm; + } elsif ($wikitype eq 'md') { + # Dump obvious wikilinks. The rest can just passthrough. + if (defined $apiprefixregex) { + $str =~ s/\[(\`?$apiprefixregex[a-zA-Z0-9_]+\`?)\]\($apiprefixregex[a-zA-Z0-9_]+\)/$1/gms; + } } if (defined $code) { @@ -355,6 +388,30 @@ sub dewikify_chunk { # bullets $str =~ s/^\* /\n\\\(bu /gm; + } elsif ($wikitype eq 'md') { + # Dump obvious wikilinks. + if (defined $apiprefixregex) { + $str =~ s/\[(\`?$apiprefixregex[a-zA-Z0-9_]+\`?)\]\($apiprefixregex[a-zA-Z0-9_]+\)/\n.BR $1\n/gms; + } + + # links + $str =~ s/\[(.*?)]\((https?\:\/\/.*?)\)/\n.URL "$2" "$1"\n/g; + + # is also popular. :/ + $str =~ s/\s*\`(.*?)\`\s*/\n.BR $1\n/gms; + + # bold+italic + $str =~ s/\s*\*\*\*(.*?)\*\*\*\s*/\n.BI $1\n/gms; + + # bold + $str =~ s/\s*\*\*(.*?)\*\*\s*/\n.B $1\n/gms; + + # italic + $str =~ s/\s*\*(.*?)\*\s*/\n.I $1\n/gms; + + # bullets + $str =~ s/^\- /\n\\\(bu /gm; + } else { die("Unexpected wikitype when converting to manpages\n"); # !!! FIXME: need to handle Markdown wiki pages. } @@ -399,6 +456,23 @@ sub dewikify { return $retval; } +sub filecopy { + my $src = shift; + my $dst = shift; + my $endline = shift; + $endline = "\n" if not defined $endline; + + open(COPYIN, '<', $src) or die("Failed to open '$src' for reading: $!\n"); + open(COPYOUT, '>', $dst) or die("Failed to open '$dst' for writing: $!\n"); + while () { + chomp; + s/[ \t\r\n]*\Z//; + print COPYOUT "$_$endline"; + } + close(COPYOUT); + close(COPYIN); +} + sub usage { die("USAGE: $0 [--copy-to-headers|--copy-to-wiki|--copy-to-manpages] [--warn-about-missing]\n\n"); } @@ -415,6 +489,7 @@ my @standard_wiki_sections = ( 'Function Parameters', 'Return Value', 'Remarks', + 'Thread Safety', 'Version', 'Code Examples', 'Related Functions' @@ -438,9 +513,15 @@ my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if t my $incpath = "$srcpath"; $incpath .= "/$incsubdir" if $incsubdir ne ''; +my $wikireadmepath = "$wikipath/$wikireadmesubdir"; +my $readmepath = undef; +if (defined $readmesubdir) { + $readmepath = "$srcpath/$readmesubdir"; +} + opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n"); -while (readdir(DH)) { - my $dent = $_; +while (my $d = readdir(DH)) { + my $dent = $d; next if not $dent =~ /$selectheaderregex/; # just selected headers. open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n"); @@ -588,8 +669,8 @@ my %wikitypes = (); # contains string of wiki page extension, like $wikitypes{" my %wikifuncs = (); # contains references to hash of strings, each string being the full contents of a section of a wiki page, like $wikifuncs{"SDL_OpenAudio"}{"Remarks"}. my %wikisectionorder = (); # contains references to array, each array item being a key to a wikipage section in the correct order, like $wikisectionorder{"SDL_OpenAudio"}[2] == 'Remarks' opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n"); -while (readdir(DH)) { - my $dent = $_; +while (my $d = readdir(DH)) { + my $dent = $d; my $type = ''; if ($dent =~ /\.(md|mediawiki)\Z/) { $type = $1; @@ -726,13 +807,14 @@ if ($copy_direction == 1) { # --copy-to-headers next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it. my $wikitype = $wikitypes{$fn}; my $sectionsref = $wikifuncs{$fn}; - my $remarks = %$sectionsref{'Remarks'}; - my $params = %$sectionsref{'Function Parameters'}; - my $returns = %$sectionsref{'Return Value'}; - my $version = %$sectionsref{'Version'}; - my $related = %$sectionsref{'Related Functions'}; - my $deprecated = %$sectionsref{'Deprecated'}; - my $brief = %$sectionsref{'[Brief]'}; + my $remarks = $sectionsref->{'Remarks'}; + my $params = $sectionsref->{'Function Parameters'}; + my $returns = $sectionsref->{'Return Value'}; + my $threadsafety = $sectionsref->{'Thread Safety'}; + my $version = $sectionsref->{'Version'}; + my $related = $sectionsref->{'Related Functions'}; + my $deprecated = $sectionsref->{'Deprecated'}; + my $brief = $sectionsref->{'[Brief]'}; my $addblank = 0; my $str = ''; @@ -797,6 +879,33 @@ if ($copy_direction == 1) { # --copy-to-headers $str .= "${whitespace}$_\n"; } } + } elsif ($wikitype eq 'md') { + my $l; + $l = shift @lines; + die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\|\s*\|\s*\Z/); + $l = shift @lines; + die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\-*\s*\|\s*\-*\s*\|\s*\Z/); + while (scalar(@lines) >= 1) { + $l = shift @lines; + if ($l =~ /\A\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*\Z/) { + my $name = $1; + my $desc = $2; + $name =~ s/\A\*\*(.*?)\*\*/$1/; + $name =~ s/\A\'\'\'(.*?)\'\'\'/$1/; + #print STDERR "FN: $fn NAME: $name DESC: $desc\n"; + my $whitespacelen = length($name) + 8; + my $whitespace = ' ' x $whitespacelen; + $desc = wordwrap($desc, -$whitespacelen); + my @desclines = split /\n/, $desc; + my $firstline = shift @desclines; + $str .= "\\param $name $firstline\n"; + foreach (@desclines) { + $str .= "${whitespace}$_\n"; + } + } else { + last; # we seem to have run out of table. + } + } } else { die("write me"); } @@ -821,6 +930,21 @@ if ($copy_direction == 1) { # --copy-to-headers } } + if (defined $threadsafety) { + # !!! FIXME: lots of code duplication in all of these. + $str .= "\n" if $addblank; $addblank = 1; + my $v = dewikify($wikitype, $threadsafety); + my $whitespacelen = length("\\threadsafety") + 1; + my $whitespace = ' ' x $whitespacelen; + $v = wordwrap($v, -$whitespacelen); + my @desclines = split /\n/, $v; + my $firstline = shift @desclines; + $str .= "\\threadsafety $firstline\n"; + foreach (@desclines) { + $str .= "${whitespace}$_\n"; + } + } + if (defined $version) { # !!! FIXME: lots of code duplication in all of these. $str .= "\n" if $addblank; $addblank = 1; @@ -845,6 +969,7 @@ if ($copy_direction == 1) { # --copy-to-headers s/\A(\:|\* )//; s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func" s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain. + s/\[(.*?)\]\(.*?\)/$1/; # in case some wikilinks remain. s/\A\/*//; $str .= "\\sa $_\n"; } @@ -905,11 +1030,32 @@ if ($copy_direction == 1) { # --copy-to-headers rename($path, "$incpath/$header") or die("Can't rename '$path' to '$incpath/$header': $!\n"); } + if (defined $readmepath) { + if ( -d $wikireadmepath ) { + mkdir($readmepath); # just in case + opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n"); + while (readdir(DH)) { + my $dent = $_; + if ($dent =~ /\A(.*?)\.md\Z/) { # we only bridge Markdown files here. + next if $1 eq 'FrontPage'; + filecopy("$wikireadmepath/$dent", "$readmepath/README-$dent", "\r\n"); + } + } + closedir(DH); + } + } } elsif ($copy_direction == -1) { # --copy-to-wiki + + if (defined $changeformat) { + $dewikify_mode = $changeformat; + $wordwrap_mode = $changeformat; + } + foreach (keys %headerfuncs) { my $fn = $_; next if not $headerfuncshasdoxygen{$fn}; - my $wikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'mediawiki'; # default to MediaWiki for new stuff FOR NOW. + my $origwikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'md'; # default to MarkDown for new stuff. + my $wikitype = (defined $changeformat) ? $changeformat : $origwikitype; die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md') and ($wikitype ne 'manpage')); #print("$fn\n"); next; @@ -1047,6 +1193,21 @@ if ($copy_direction == 1) { # --copy-to-headers } $desc =~ s/[\s\n]+\Z//ms; $sections{'Version'} = wordwrap(wikify($wikitype, $desc)) . "\n"; + } elsif ($l =~ /\A\\threadsafety\s+(.*)\Z/) { + my $desc = $1; + while (@doxygenlines) { + my $subline = $doxygenlines[0]; + $subline =~ s/\A\s*//; + last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing. + shift @doxygenlines; # dump this line from the array; we're using it. + if ($subline eq '') { # empty line, make sure it keeps the newline char. + $desc .= "\n"; + } else { + $desc .= " $subline"; + } + } + $desc =~ s/[\s\n]+\Z//ms; + $sections{'Thread Safety'} = wordwrap(wikify($wikitype, $desc)) . "\n"; } elsif ($l =~ /\A\\sa\s+(.*)\Z/) { my $sa = $1; $sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func" @@ -1125,8 +1286,25 @@ if ($copy_direction == 1) { # --copy-to-headers push @$wikisectionorderref, '[footer]'; } + # If changing format, convert things that otherwise are passed through unmolested. + if (defined $changeformat) { + if (($dewikify_mode eq 'md') and ($origwikitype eq 'mediawiki')) { + $$sectionsref{'[footer]'} =~ s/\[\[(Category[a-zA-Z0-9_]+)\]\]/[$1]($1)/g; + } elsif (($dewikify_mode eq 'mediawiki') and ($origwikitype eq 'md')) { + $$sectionsref{'[footer]'} =~ s/\[(Category[a-zA-Z0-9_]+)\]\(.*?\)/[[$1]]/g; + } + + foreach (keys %only_wiki_sections) { + my $sect = $_; + if (defined $$sectionsref{$sect}) { + $$sectionsref{$sect} = wikify($wikitype, dewikify($origwikitype, $$sectionsref{$sect})); + } + } + } + # !!! FIXME: This won't be CategoryAPI if we eventually handle things other than functions. my $footer = $$sectionsref{'[footer]'}; + if ($wikitype eq 'mediawiki') { $footer =~ s/\[\[CategoryAPI\]\],?\s*//g; $footer = '[[CategoryAPI]]' . (($footer eq '') ? "\n" : ", $footer"); @@ -1137,10 +1315,11 @@ if ($copy_direction == 1) { # --copy-to-headers $$sectionsref{'[footer]'} = $footer; if (defined $wikipreamble) { + my $wikified_preamble = wikify($wikitype, $wikipreamble); if ($wikitype eq 'mediawiki') { - print FH "====== $wikipreamble ======\n"; + print FH "====== $wikified_preamble ======\n"; } elsif ($wikitype eq 'md') { - print FH "###### $wikipreamble\n"; + print FH "###### $wikified_preamble\n"; } else { die("Unexpected wikitype '$wikitype'\n"); } } @@ -1185,9 +1364,51 @@ if ($copy_direction == 1) { # --copy-to-headers print FH "\n\n"; close(FH); + + if (defined $changeformat and ($origwikitype ne $wikitype)) { + system("cd '$wikipath' ; git mv '$_.${origwikitype}' '$_.${wikitype}'"); + unlink("$wikipath/$_.${origwikitype}"); + } + rename($path, "$wikipath/$_.${wikitype}") or die("Can't rename '$path' to '$wikipath/$_.${wikitype}': $!\n"); } + if (defined $readmepath) { + if ( -d $readmepath ) { + mkdir($wikireadmepath); # just in case + opendir(DH, $readmepath) or die("Can't opendir '$readmepath': $!\n"); + while (my $d = readdir(DH)) { + my $dent = $d; + if ($dent =~ /\AREADME\-(.*?\.md)\Z/) { # we only bridge Markdown files here. + my $wikifname = $1; + next if $wikifname eq 'FrontPage.md'; + filecopy("$readmepath/$dent", "$wikireadmepath/$wikifname", "\n"); + } + } + closedir(DH); + + my @pages = (); + opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n"); + while (my $d = readdir(DH)) { + my $dent = $d; + if ($dent =~ /\A(.*?)\.(mediawiki|md)\Z/) { + my $wikiname = $1; + next if $wikiname eq 'FrontPage'; + push @pages, $wikiname; + } + } + closedir(DH); + + open(FH, '>', "$wikireadmepath/FrontPage.md") or die("Can't open '$wikireadmepath/FrontPage.md': $!\n"); + print FH "# All READMEs available here\n\n"; + foreach (sort @pages) { + my $wikiname = $_; + print FH "- [$wikiname]($wikiname)\n"; + } + close(FH); + } + } + } elsif ($copy_direction == -2) { # --copy-to-manpages # This only takes from the wiki data, since it has sections we omit from the headers, like code examples. @@ -1235,14 +1456,15 @@ if ($copy_direction == 1) { # --copy-to-headers next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it. my $wikitype = $wikitypes{$fn}; my $sectionsref = $wikifuncs{$fn}; - my $remarks = %$sectionsref{'Remarks'}; - my $params = %$sectionsref{'Function Parameters'}; - my $returns = %$sectionsref{'Return Value'}; - my $version = %$sectionsref{'Version'}; - my $related = %$sectionsref{'Related Functions'}; - my $examples = %$sectionsref{'Code Examples'}; - my $deprecated = %$sectionsref{'Deprecated'}; - my $brief = %$sectionsref{'[Brief]'}; + my $remarks = $sectionsref->{'Remarks'}; + my $params = $sectionsref->{'Function Parameters'}; + my $returns = $sectionsref->{'Return Value'}; + my $version = $sectionsref->{'Version'}; + my $threadsafety = $sectionsref->{'Thread Safety'}; + my $related = $sectionsref->{'Related Functions'}; + my $examples = $sectionsref->{'Code Examples'}; + my $deprecated = $sectionsref->{'Deprecated'}; + my $brief = $sectionsref->{'[Brief]'}; my $decl = $headerdecls{$fn}; my $str = ''; @@ -1329,6 +1551,28 @@ if ($copy_direction == 1) { # --copy-to-headers $str .= ".I $name\n"; $str .= "$desc\n"; } + } elsif ($wikitype eq 'md') { + my $l; + $l = shift @lines; + die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\|\s*\|\s*\Z/); + $l = shift @lines; + die("Unexpected data parsing Markdown table") if (not $l =~ /\A\s*\|\s*\-*\s*\|\s*\-*\s*\|\s*\Z/); + while (scalar(@lines) >= 1) { + $l = shift @lines; + if ($l =~ /\A\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*\Z/) { + my $name = $1; + my $desc = $2; + $name =~ s/\A\*\*(.*?)\*\*/$1/; + $name =~ s/\A\'\'\'(.*?)\'\'\'/$1/; + $desc = dewikify($wikitype, $desc); + + $str .= ".TP\n"; + $str .= ".I $name\n"; + $str .= "$desc\n"; + } else { + last; # we seem to have run out of table. + } + } } else { die("write me"); } @@ -1346,6 +1590,11 @@ if ($copy_direction == 1) { # --copy-to-headers $dewikify_manpage_code_indent = 1; } + if (defined $threadsafety) { + $str .= ".SH THREAD SAFETY\n"; + $str .= dewikify($wikitype, $threadsafety) . "\n"; + } + if (defined $version) { $str .= ".SH AVAILABILITY\n"; $str .= dewikify($wikitype, $version) . "\n"; @@ -1361,8 +1610,11 @@ if ($copy_direction == 1) { # --copy-to-headers s/\A(\:|\* )//; s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func" s/\[\[(.*?)\]\]/$1/; # in case some wikilinks remain. + s/\[(.*?)\]\(.*?\)/$1/; # in case some wikilinks remain. + s/\A\*\s*\Z//; s/\A\/*//; s/\A\.BR\s+//; # dewikify added this, but we want to handle it. + s/\A\.I\s+//; # dewikify added this, but we want to handle it. s/\A\s+//; s/\s+\Z//; next if $_ eq ''; diff --git a/modules/SDL2/cmake/CheckCPUArchitecture.cmake b/modules/SDL2/cmake/CheckCPUArchitecture.cmake index 63e89a4..ab53b9f 100644 --- a/modules/SDL2/cmake/CheckCPUArchitecture.cmake +++ b/modules/SDL2/cmake/CheckCPUArchitecture.cmake @@ -32,6 +32,8 @@ function(check_cpu_architecture ARCH VARIABLE) _internal_check_cpu_architecture("defined(__arm__) || defined(_M_ARM)" arm32 ${VARIABLE}) elseif(ARCH STREQUAL "arm64") _internal_check_cpu_architecture("defined(__aarch64__) || defined(_M_ARM64)" arm64 ${VARIABLE}) + elseif(ARCH STREQUAL "loongarch64") + _internal_check_cpu_architecture("defined(__loongarch64)" loongarch64 ${VARIABLE}) else() message(WARNING "Unknown CPU architectures (${ARCH}).") set(${VARIABLE} FALSE) diff --git a/modules/SDL2/cmake/macros.cmake b/modules/SDL2/cmake/macros.cmake index 6f6c329..69a5d54 100644 --- a/modules/SDL2/cmake/macros.cmake +++ b/modules/SDL2/cmake/macros.cmake @@ -29,7 +29,7 @@ ENDMACRO() # Message Output macro(MESSAGE_WARN _TEXT) - message(STATUS "*** WARNING: ${_TEXT}") + message(WARNING "${_TEXT}") endmacro() macro(MESSAGE_ERROR _TEXT) @@ -64,7 +64,7 @@ macro(MESSAGE_TESTED_OPTION _NAME) message(STATUS " ${_NAME}${_PAD}(Wanted: ${_REQVALUE}): ${HAVE_${_STRIPPEDNAME}}") endmacro() -macro(LISTTOSTR _LIST _OUTPUT) +function(LISTTOSTR _LIST _OUTPUT) if(${ARGC} EQUAL 3) # prefix for each element set(_LPREFIX ${ARGV2}) @@ -73,10 +73,12 @@ macro(LISTTOSTR _LIST _OUTPUT) endif() # Do not use string(REPLACE ";" " ") here to avoid messing up list # entries + set(res) foreach(_ITEM ${${_LIST}}) - set(${_OUTPUT} "${${_OUTPUT}} ${_LPREFIX}${_ITEM}") + set(res "${res} ${_LPREFIX}${_ITEM}") endforeach() -endmacro() + set(${_OUTPUT} "${res}" PARENT_SCOPE) +endfunction() macro(LISTTOSTRREV _LIST _OUTPUT) if(${ARGC} EQUAL 3) diff --git a/modules/SDL2/cmake/sdlchecks.cmake b/modules/SDL2/cmake/sdlchecks.cmake index 4df914d..c4aec17 100644 --- a/modules/SDL2/cmake/sdlchecks.cmake +++ b/modules/SDL2/cmake/sdlchecks.cmake @@ -1,4 +1,5 @@ include(CMakeParseArguments) +include(${SDL2_SOURCE_DIR}/cmake/sdlfind.cmake) macro(FindLibraryAndSONAME _LIB) cmake_parse_arguments(FLAS "" "" "LIBDIRS" ${ARGN}) @@ -6,6 +7,13 @@ macro(FindLibraryAndSONAME _LIB) string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}") find_library(${_LNAME}_LIB ${_LIB} PATHS ${FLAS_LIBDIRS}) + + if(${_LNAME}_LIB MATCHES ".*\\${CMAKE_SHARED_LIBRARY_SUFFIX}.*" AND NOT ${_LNAME}_LIB MATCHES ".*\\${CMAKE_STATIC_LIBRARY_SUFFIX}.*") + set(${_LNAME}_SHARED TRUE) + else() + set(${_LNAME}_SHARED FALSE) + endif() + if(${_LNAME}_LIB) # reduce the library name for shared linking @@ -83,26 +91,35 @@ endmacro() # - HAVE_SDL_LOADSO opt macro(CheckALSA) if(SDL_ALSA) - CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H) - if(HAVE_ASOUNDLIB_H) - CHECK_LIBRARY_EXISTS(asound snd_pcm_recover "" HAVE_LIBASOUND) - endif() - if(HAVE_LIBASOUND) - set(HAVE_ALSA TRUE) - file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c) + sdlFindALSA() + if(ALSA_FOUND) + file(GLOB ALSA_SOURCES "${SDL2_SOURCE_DIR}/src/audio/alsa/*.c") list(APPEND SOURCE_FILES ${ALSA_SOURCES}) set(SDL_AUDIO_DRIVER_ALSA 1) - if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO) - message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading") + set(HAVE_ALSA TRUE) + set(HAVE_ALSA_SHARED FALSE) + if(SDL_ALSA_SHARED) + if(HAVE_SDL_LOADSO) + FindLibraryAndSONAME("asound") + if(ASOUND_LIB AND ASOUND_SHARED) + target_include_directories(sdl-build-options INTERFACE $) + set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"") + set(HAVE_ALSA_SHARED TRUE) + else() + message(WARNING "Unable to find asound shared object") + endif() + else() + message(WARNING "You must have SDL_LoadObject() support for dynamic ALSA loading") + endif() endif() - FindLibraryAndSONAME("asound") - if(SDL_ALSA_SHARED AND ASOUND_LIB AND HAVE_SDL_LOADSO) - set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"") - set(HAVE_ALSA_SHARED TRUE) - else() - list(APPEND EXTRA_LIBS asound) + if(NOT HAVE_ALSA_SHARED) + list(APPEND CMAKE_DEPENDS ALSA::ALSA) + list(APPEND PKGCONFIG_DEPENDS alsa) endif() set(HAVE_SDL_AUDIO TRUE) + else() + set(HAVE_ALSA FALSE) + message(WARNING "Unable to found the alsa development library") endif() endif() endmacro() @@ -717,6 +734,17 @@ macro(CheckWayland) else() list(APPEND EXTRA_LIBS ${PKG_LIBDECOR_LIBRARIES}) endif() + + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_FLAGS ${PKG_LIBDECOR_CFLAGS}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${PKG_LIBDECOR_INCLUDE_DIRS}) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${PKG_LIBDECOR_LINK_LIBRARIES}) + check_symbol_exists(libdecor_frame_get_max_content_size "libdecor.h" HAVE_LIBDECOR_FRAME_GET_MAX_CONTENT_SIZE) + check_symbol_exists(libdecor_frame_get_min_content_size "libdecor.h" HAVE_LIBDECOR_FRAME_GET_MIN_CONTENT_SIZE) + if(HAVE_LIBDECOR_FRAME_GET_MAX_CONTENT_SIZE AND HAVE_LIBDECOR_FRAME_GET_MIN_CONTENT_SIZE) + set(SDL_HAVE_LIBDECOR_GET_MIN_MAX 1) + endif() + cmake_pop_check_state() endif() endif() @@ -991,7 +1019,11 @@ macro(CheckPTHREAD) check_c_source_compiles(" #include int main(int argc, char **argv) { - pthread_setname_np(pthread_self(), \"\"); + #ifdef __APPLE__ + pthread_setname_np(\"\"); + #else + pthread_setname_np(pthread_self(),\"\"); + #endif return 0; }" HAVE_PTHREAD_SETNAME_NP) if (HAVE_PTHREAD_NP_H) @@ -1291,3 +1323,16 @@ macro(CheckKMSDRM) endif() endif() endmacro() + +macro(CheckLibUDev) + if(SDL_LIBUDEV) + check_include_file("libudev.h" have_libudev_header) + if(have_libudev_header) + set(HAVE_LIBUDEV_H TRUE) + FindLibraryAndSONAME(udev) + if(UDEV_LIB_SONAME) + set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"") + endif() + endif() + endif() +endmacro() diff --git a/modules/SDL2/cmake/sdlfind.cmake b/modules/SDL2/cmake/sdlfind.cmake new file mode 100644 index 0000000..a814548 --- /dev/null +++ b/modules/SDL2/cmake/sdlfind.cmake @@ -0,0 +1,9 @@ + +macro(sdlFindALSA) + find_package(ALSA MODULE) + if(ALSA_FOUND AND (NOT TARGET ALSA::ALSA) ) + add_Library(ALSA::ALSA UNKNOWN IMPORTED) + set_property(TARGET ALSA::ALSA PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) + set_property(TARGET ALSA::ALSA APPEND PROPERTY IMPORTED_LOCATION ${ALSA_LIBRARY}) + endif() +endmacro() diff --git a/modules/SDL2/cmake/sdlplatform.cmake b/modules/SDL2/cmake/sdlplatform.cmake new file mode 100644 index 0000000..7daaa23 --- /dev/null +++ b/modules/SDL2/cmake/sdlplatform.cmake @@ -0,0 +1,57 @@ +macro(SDL_DetectCMakePlatform) + set(SDL_CMAKE_PLATFORM ) + # Get the platform + if(WIN32) + set(SDL_CMAKE_PLATFORM WINDOWS) + elseif(UNIX AND NOT APPLE) + if(CMAKE_SYSTEM_NAME MATCHES ".*Linux") + set(SDL_CMAKE_PLATFORM LINUX) + elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*") + set(SDL_CMAKE_PLATFORM FREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*") + set(SDL_CMAKE_PLATFORM NETBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") + set(SDL_CMAKE_PLATFORM OPENBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES ".*GNU.*") + set(SDL_CMAKE_PLATFORM GNU) + elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*") + set(SDL_CMAKE_PLATFORM BSDI) + elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD") + set(SDL_CMAKE_PLATFORM FREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "SYSV5.*") + set(SDL_CMAKE_PLATFORM SYSV5) + elseif(CMAKE_SYSTEM_NAME MATCHES "Solaris.*|SunOS.*") + set(SDL_CMAKE_PLATFORM SOLARIS) + elseif(CMAKE_SYSTEM_NAME MATCHES "HP-UX.*") + set(SDL_CMAKE_PLATFORM HPUX) + elseif(CMAKE_SYSTEM_NAME MATCHES "AIX.*") + set(SDL_CMAKE_PLATFORM AIX) + elseif(CMAKE_SYSTEM_NAME MATCHES "Minix.*") + set(SDL_CMAKE_PLATFORM MINIX) + endif() + elseif(APPLE) + if(CMAKE_SYSTEM_NAME MATCHES ".*Darwin.*") + set(SDL_CMAKE_PLATFORM DARWIN) + elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*") + set(SDL_CMAKE_PLATFORM MACOSX) + elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*") + set(SDL_CMAKE_PLATFORM TVOS) + elseif(CMAKE_SYSTEM_NAME MATCHES ".*iOS.*") + # !!! FIXME: remove the version check when we start requiring >= 3.14.0 + if(CMAKE_VERSION VERSION_LESS 3.14) + set(SDL_CMAKE_PLATFORM IOS) + endif() + endif() + elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") + message_error("BeOS support has been removed as of SDL 2.0.2.") + elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*") + set(SDL_CMAKE_PLATFORM HAIKU) + elseif(NINTENDO_3DS) + set(SDL_CMAKE_PLATFORM N3DS) + elseif(OS2) + set(SDL_CMAKE_PLATFORM OS2) + endif() + if(SDL_CMAKE_PLATFORM) + set(${SDL_CMAKE_PLATFORM} TRUE) + endif() +endmacro() diff --git a/modules/SDL2/cmake/test/test_pkgconfig.sh b/modules/SDL2/cmake/test/test_pkgconfig.sh index 7afc00b..500cd09 100644 --- a/modules/SDL2/cmake/test/test_pkgconfig.sh +++ b/modules/SDL2/cmake/test/test_pkgconfig.sh @@ -13,7 +13,7 @@ case "$machine" in *android* ) EXEPREFIX="lib" EXESUFFIX=".so" - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared" + LDFLAGS="$LDFLAGS -shared" ;; * ) EXEPREFIX="" @@ -25,20 +25,20 @@ set -e # Get the canonical path of the folder containing this script testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)") -CFLAGS="$( pkg-config sdl2 --cflags )" -LDFLAGS="$( pkg-config sdl2 --libs )" -STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )" - -compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_CFLAGS" -link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS" -static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS" - -echo "-- CC: $CC" -echo "-- CFLAGS: $CFLAGS" -echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS" -echo "-- LDFLASG: $LDFLAGS" -echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS" -echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS" +SDL_CFLAGS="$( pkg-config sdl2 --cflags )" +SDL_LDFLAGS="$( pkg-config sdl2 --libs )" +SDL_STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )" + +compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $SDL_CFLAGS $CFLAGS" +link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS" +static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS" + +echo "-- CC: $CC" +echo "-- CFLAGS: $CFLAGS" +echo "-- LDFLASG: $LDFLAGS" +echo "-- SDL_CFLAGS: $SDL_CFLAGS" +echo "-- SDL_LDFLAGS: $SDL_LDFLAGS" +echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS" echo "-- COMPILE: $compile_cmd" echo "-- LINK: $link_cmd" diff --git a/modules/SDL2/cmake/test/test_sdlconfig.sh b/modules/SDL2/cmake/test/test_sdlconfig.sh index 8de5421..fa41dbb 100644 --- a/modules/SDL2/cmake/test/test_sdlconfig.sh +++ b/modules/SDL2/cmake/test/test_sdlconfig.sh @@ -13,7 +13,7 @@ case "$machine" in *android* ) EXEPREFIX="lib" EXESUFFIX=".so" - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared" + LDFLAGS="$LDFLAGS -shared" ;; * ) EXEPREFIX="" @@ -25,20 +25,20 @@ set -e # Get the canonical path of the folder containing this script testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)") -CFLAGS="$( sdl2-config --cflags )" -LDFLAGS="$( sdl2-config --libs )" -STATIC_LDFLAGS="$( sdl2-config --static-libs )" - -compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS" -link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS" -static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS" - -echo "-- CC: $CC" -echo "-- CFLAGS: $CFLAGS" -echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS" -echo "-- LDFLAGS: $LDFLAGS" -echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS" -echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS" +SDL_CFLAGS="$( sdl2-config --cflags )" +SDL_LDFLAGS="$( sdl2-config --libs )" +SDL_STATIC_LDFLAGS="$( sdl2-config --static-libs )" + +compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $SDL_CFLAGS" +link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS" +static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS" + +echo "-- CC: $CC" +echo "-- CFLAGS: $CFLAGS" +echo "-- LDFLAGS: $LDFLAGS" +echo "-- SDL_CFLAGS: $SDL_CFLAGS" +echo "-- SDL_LDFLAGS: $SDL_LDFLAGS" +echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS" echo "-- COMPILE: $compile_cmd" echo "-- LINK: $link_cmd" diff --git a/modules/SDL2/configure b/modules/SDL2/configure index f3a3e0b..e15eec6 100644 --- a/modules/SDL2/configure +++ b/modules/SDL2/configure @@ -677,6 +677,7 @@ ENABLE_STATIC_TRUE ENABLE_SHARED_FALSE ENABLE_SHARED_TRUE PKGCONFIG_LIBS_PRIV +PKGCONFIG_DEPENDS SDL_RLD_FLAGS SDL_STATIC_LIBS SDL_LIBS @@ -2448,6 +2449,58 @@ printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl ac_configure_args_raw= for ac_arg do @@ -3453,7 +3506,7 @@ orig_CFLAGS="$CFLAGS" # See docs/release_checklist.md SDL_MAJOR_VERSION=2 -SDL_MINOR_VERSION=26 +SDL_MINOR_VERSION=28 SDL_MICRO_VERSION=3 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION @@ -17652,6 +17705,79 @@ printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -18292,8 +18418,8 @@ base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` find_lib() { - gcc_bin_path=`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` - gcc_lib_path=`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + gcc_bin_path=`$CC -print-search-dirs 2>/dev/null | $FGREP programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + gcc_lib_path=`$CC -print-search-dirs 2>/dev/null | $FGREP libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` env_lib_path=`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'` if test "$cross_compiling" = yes; then host_lib_path="" @@ -22900,41 +23026,6 @@ printf "%s\n" "$have_gcc_no_strict_aliasing" >&6; } fi } -CheckStackBoundary() -{ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mpreferred-stack-boundary option" >&5 -printf %s "checking for GCC -mpreferred-stack-boundary option... " >&6; } - have_gcc_preferred_stack_boundary=no - - save_CFLAGS="$CFLAGS" - CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int x = 0; - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - have_gcc_preferred_stack_boundary=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_preferred_stack_boundary" >&5 -printf "%s\n" "$have_gcc_preferred_stack_boundary" >&6; } - CFLAGS="$save_CFLAGS" - - if test x$have_gcc_preferred_stack_boundary = xyes; then - EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2" - fi -} - CheckWerror() { # Check whether --enable-werror was given. @@ -23099,6 +23190,41 @@ printf "%s\n" "$need_gcc_Wno_multichar" >&6; } fi } +CheckUnusedLocalTypedefs() +{ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -Wunused-local-typedefs option" >&5 +printf %s "checking for GCC -Wunused-local-typedefs option... " >&6; } + have_gcc_unused_local_typedefs=no + + save_CFLAGS="$CFLAGS" + CFLAGS="$save_CFLAGS -Wunused-local-typedefs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int x = 0; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + have_gcc_unused_local_typedefs=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_unused_local_typedefs" >&5 +printf "%s\n" "$have_gcc_unused_local_typedefs" >&6; } + CFLAGS="$save_CFLAGS" + + if test x$have_gcc_unused_local_typedefs = xyes; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-unused-local-typedefs" + fi +} + CheckWayland() { # Check whether --enable-video-wayland was given. @@ -23329,6 +23455,122 @@ printf "%s\n" "#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR \"$decor_lib\"" else EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS" fi + + saved_cflags=$CFLAGS + CFLAGS="$CFLAGS $DECOR_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "libdecor_frame_get_min_content_size" "ac_cv_have_decl_libdecor_frame_get_min_content_size" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_libdecor_frame_get_min_content_size" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_LIBDECOR_FRAME_GET_MIN_CONTENT_SIZE $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : + libdecor_get_min_max=yes +fi +ac_fn_check_decl "$LINENO" "libdecor_frame_get_max_content_size" "ac_cv_have_decl_libdecor_frame_get_max_content_size" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_libdecor_frame_get_max_content_size" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_LIBDECOR_FRAME_GET_MAX_CONTENT_SIZE $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : + libdecor_get_min_max=yes +fi + + if test x$libdecor_get_min_max = xyes; then + +printf "%s\n" "#define SDL_HAVE_LIBDECOR_GET_MIN_MAX 1" >>confdefs.h + + fi + CFLAGS="$saved_cflags" fi fi fi @@ -27197,9 +27439,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_wince" >&5 printf "%s\n" "$have_wince" >&6; } - # This fixes Windows stack alignment with newer GCC - CheckStackBoundary - # headers needed elsewhere ac_fn_c_check_header_compile "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default" if test "x$ac_cv_header_tpcshrd_h" = xyes @@ -28008,7 +28247,7 @@ fi enable_hidapi_libusb=yes require_hidapi_libusb=yes ;; - *-*-os2* ) + *-*-os2* ) enable_hidapi_libusb=yes ;; esac @@ -28162,14 +28401,14 @@ else $as_nop fi if test x$enable_clock_gettime = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -printf %s "checking for clock_gettime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_gettime+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lc" >&5 +printf %s "checking for clock_gettime in -lc... " >&6; } +if test ${ac_cv_lib_c_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" +LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28187,17 +28426,17 @@ return clock_gettime (); _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_rt_clock_gettime=yes + ac_cv_lib_c_clock_gettime=yes else $as_nop - ac_cv_lib_rt_clock_gettime=no + ac_cv_lib_c_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_clock_gettime" >&5 +printf "%s\n" "$ac_cv_lib_c_clock_gettime" >&6; } +if test "x$ac_cv_lib_c_clock_gettime" = xyes then : have_clock_gettime=yes fi @@ -28206,16 +28445,15 @@ fi printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lc" >&5 -printf %s "checking for clock_gettime in -lc... " >&6; } -if test ${ac_cv_lib_c_clock_gettime+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +printf %s "checking for clock_gettime in -lrt... " >&6; } +if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" +LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28233,26 +28471,26 @@ return clock_gettime (); _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_c_clock_gettime=yes + ac_cv_lib_rt_clock_gettime=yes else $as_nop - ac_cv_lib_c_clock_gettime=no + ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_c_clock_gettime" >&6; } -if test "x$ac_cv_lib_c_clock_gettime" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes then : have_clock_gettime=yes fi if test x$have_clock_gettime = xyes; then + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt" printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - EXTRA_LDFLAGS="$EXTRA_LDFLAGS" fi fi fi @@ -28330,6 +28568,7 @@ printf "%s\n" "#define SDL_JOYSTICK_VIRTUAL 1" >>confdefs.h } CheckWarnAll +CheckUnusedLocalTypedefs CheckNoStrictAliasing CheckEventSignals @@ -29401,7 +29640,7 @@ printf "%s\n" "#define SDL_VIDEO_DRIVER_OS2 1" >>confdefs.h SOURCES="$SOURCES $srcdir/src/video/os2/*.c" have_video=yes - SUMMARY_video="${SUMMARY_video} os/2" + SUMMARY_video="${SUMMARY_video} OS/2" fi # Set up files for the audio library if test x$enable_audio = xyes; then @@ -29410,7 +29649,7 @@ printf "%s\n" "#define SDL_AUDIO_DRIVER_OS2 1" >>confdefs.h SOURCES="$SOURCES $srcdir/src/audio/os2/*.c" have_audio=yes - SUMMARY_audio="${SUMMARY_audio} os/2" + SUMMARY_audio="${SUMMARY_audio} OS/2" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2" fi # Set up files for the thread library @@ -29800,6 +30039,8 @@ done +PKGCONFIG_DEPENDS="" + if test x$enable_shared = xyes; then PKGCONFIG_LIBS_PRIV=" Libs.private:" diff --git a/modules/SDL2/configure.ac b/modules/SDL2/configure.ac index bafc64a..5ae002f 100644 --- a/modules/SDL2/configure.ac +++ b/modules/SDL2/configure.ac @@ -12,7 +12,7 @@ orig_CFLAGS="$CFLAGS" dnl Set various version strings - taken gratefully from the GTk sources # See docs/release_checklist.md SDL_MAJOR_VERSION=2 -SDL_MINOR_VERSION=26 +SDL_MINOR_VERSION=28 SDL_MICRO_VERSION=3 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION @@ -62,6 +62,7 @@ AC_PROG_AWK AC_PROG_CC AC_PROG_CXX AC_PROG_EGREP +AC_PROG_FGREP AC_PROG_INSTALL AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG @@ -180,8 +181,8 @@ base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` dnl Function to find a library in the compiler search path find_lib() { - gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] - gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] + gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | $FGREP programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] + gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | $FGREP libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`] if test "$cross_compiling" = yes; then host_lib_path="" @@ -1557,26 +1558,6 @@ CheckNoStrictAliasing() fi } -dnl See if GCC's -mpreferred-stack-boundary is supported. -dnl Reference: http://bugzilla.libsdl.org/show_bug.cgi?id=1296 -CheckStackBoundary() -{ - AC_MSG_CHECKING(for GCC -mpreferred-stack-boundary option) - have_gcc_preferred_stack_boundary=no - - save_CFLAGS="$CFLAGS" - CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - int x = 0; - ]],[])], [have_gcc_preferred_stack_boundary=yes],[]) - AC_MSG_RESULT($have_gcc_preferred_stack_boundary) - CFLAGS="$save_CFLAGS" - - if test x$have_gcc_preferred_stack_boundary = xyes; then - EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2" - fi -} - dnl See if GCC's -Werror is supported. CheckWerror() { @@ -1673,6 +1654,27 @@ dnl Haiku headers use multicharacter constants all over the place. Ignore these fi } +dnl See if GCC's -Wunused-local-typedefs is supported and disable it +dnl because it triggers on gcc 4.8.4 for compile time asserts inside +dnl of functions. +CheckUnusedLocalTypedefs() +{ + AC_MSG_CHECKING(for GCC -Wunused-local-typedefs option) + have_gcc_unused_local_typedefs=no + + save_CFLAGS="$CFLAGS" + CFLAGS="$save_CFLAGS -Wunused-local-typedefs" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + int x = 0; + ]],[])], [have_gcc_unused_local_typedefs=yes],[]) + AC_MSG_RESULT($have_gcc_unused_local_typedefs) + CFLAGS="$save_CFLAGS" + + if test x$have_gcc_unused_local_typedefs = xyes; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-unused-local-typedefs" + fi +} + dnl Check for Wayland CheckWayland() { @@ -1786,6 +1788,14 @@ dnl See if libdecor is available else EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS" fi + + saved_cflags=$CFLAGS + CFLAGS="$CFLAGS $DECOR_CFLAGS" + AC_CHECK_DECLS([libdecor_frame_get_min_content_size, libdecor_frame_get_max_content_size], [libdecor_get_min_max=yes], [ ], [[#include ]]) + if test x$libdecor_get_min_max = xyes; then + AC_DEFINE(SDL_HAVE_LIBDECOR_GET_MIN_MAX, 1, [ ]) + fi + CFLAGS="$saved_cflags" fi fi fi @@ -3276,9 +3286,6 @@ CheckWINDOWS() ],[]) AC_MSG_RESULT($have_wince) - # This fixes Windows stack alignment with newer GCC - CheckStackBoundary - # headers needed elsewhere AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes) if test x$have_tpcshrd_h = xyes; then @@ -3607,7 +3614,7 @@ CheckHIDAPI() enable_hidapi_libusb=yes require_hidapi_libusb=yes ;; - *-*-os2* ) + *-*-os2* ) enable_hidapi_libusb=yes ;; esac @@ -3672,15 +3679,14 @@ CheckClockGettime() [AS_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [default=yes]])], , enable_clock_gettime=yes) if test x$enable_clock_gettime = xyes; then - AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) + AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ]) - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt" + AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ]) else - AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes) + AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ]) - EXTRA_LDFLAGS="$EXTRA_LDFLAGS" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt" + AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ]) fi fi fi @@ -3738,6 +3744,7 @@ CheckVirtualJoystick() dnl Do this on all platforms, before everything else (other things might want to override it). CheckWarnAll +CheckUnusedLocalTypedefs CheckNoStrictAliasing dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow. @@ -4618,14 +4625,14 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan. AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ]) SOURCES="$SOURCES $srcdir/src/video/os2/*.c" have_video=yes - SUMMARY_video="${SUMMARY_video} os/2" + SUMMARY_video="${SUMMARY_video} OS/2" fi # Set up files for the audio library if test x$enable_audio = xyes; then AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ]) SOURCES="$SOURCES $srcdir/src/audio/os2/*.c" have_audio=yes - SUMMARY_audio="${SUMMARY_audio} os/2" + SUMMARY_audio="${SUMMARY_audio} OS/2" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2" fi # Set up files for the thread library @@ -4860,6 +4867,8 @@ AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) AC_SUBST(SDL_STATIC_LIBS) AC_SUBST(SDL_RLD_FLAGS) +PKGCONFIG_DEPENDS="" +AC_SUBST(PKGCONFIG_DEPENDS) if test x$enable_shared = xyes; then PKGCONFIG_LIBS_PRIV=" Libs.private:" diff --git a/modules/SDL2/docs/README-android.md b/modules/SDL2/docs/README-android.md index 5227d7e..f084935 100644 --- a/modules/SDL2/docs/README-android.md +++ b/modules/SDL2/docs/README-android.md @@ -13,22 +13,22 @@ supported, but you can use the "android-project-ant" directory as a template. Requirements ================================================================================ -Android SDK (version 31 or later) +Android SDK (version 34 or later) https://developer.android.com/sdk/index.html Android NDK r15c or later https://developer.android.com/tools/sdk/ndk/index.html -Minimum API level supported by SDL: 16 (Android 4.1) +Minimum API level supported by SDL: 19 (Android 4.4) How the port works ================================================================================ - Android applications are Java-based, optionally with parts written in C -- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to +- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to the SDL library -- This means that your application C code must be placed inside an Android +- This means that your application C code must be placed inside an Android Java project, along with some C support code that communicates with Java - This eventually produces a standard Android .apk package @@ -68,14 +68,22 @@ Finally, a word of caution: re running androidbuild.sh wipes any changes you may done in the build directory for the app! + For more complex projects, follow these instructions: - -1. Copy the android-project directory wherever you want to keep your projects - and rename it to the name of your project. -2. Move or symlink this SDL directory into the "/app/jni" directory -3. Edit "/app/jni/src/Android.mk" to include your source files -4a. If you want to use Android Studio, simply open your directory and start building. +1. Get the source code for SDL and copy the 'android-project' directory located at SDL/android-project to a suitable location. Also make sure to rename it to your project name (In these examples: YOURPROJECT). + + (The 'android-project' directory can basically be seen as a sort of starting point for the android-port of your project. It contains the glue code between the Android Java 'frontend' and the SDL code 'backend'. It also contains some standard behaviour, like how events should be handled, which you will be able to change.) + +2. Move or [symlink](https://en.wikipedia.org/wiki/Symbolic_link) the SDL directory into the "YOURPROJECT/app/jni" directory + +(This is needed as the source of SDL has to be compiled by the Android compiler) + +3. Edit "YOURPROJECT/app/jni/src/Android.mk" to include your source files. + +(They should be separated by spaces after the "LOCAL_SRC_FILES := " declaration) + +4a. If you want to use Android Studio, simply open your 'YOURPROJECT' directory and start building. 4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device @@ -83,9 +91,9 @@ For more complex projects, follow these instructions: If you already have a project that uses CMake, the instructions change somewhat: 1. Do points 1 and 2 from the instruction above. -2. Edit "/app/build.gradle" to comment out or remove sections containing ndk-build +2. Edit "YOURPROJECT/app/build.gradle" to comment out or remove sections containing ndk-build and uncomment the cmake sections. Add arguments to the CMake invocation as needed. -3. Edit "/app/jni/CMakeLists.txt" to include your project (it defaults to +3. Edit "YOURPROJECT/app/jni/CMakeLists.txt" to include your project (it defaults to adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)" in your CMakeLists.txt file. Also be aware that you should use add_library() instead of @@ -132,15 +140,15 @@ Here's an example of a minimal class file: --- MyGame.java -------------------------- package com.gamemaker.game; - - import org.libsdl.app.SDLActivity; - + + import org.libsdl.app.SDLActivity; + /** - * A sample wrapper class that just calls SDLActivity - */ - + * A sample wrapper class that just calls SDLActivity + */ + public class MyGame extends SDLActivity { } - + ------------------------------------------ Then replace "SDLActivity" in AndroidManifest.xml with the name of your @@ -179,7 +187,7 @@ may want to keep this fact in mind when building your APK, specially when large files are involved. For more information on which extensions get compressed by default and how to disable this behaviour, see for example: - + http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ @@ -350,7 +358,7 @@ I get output from addr2line showing that it's in the quit function, in testsprit You can add logging to your code to help show what's happening: #include - + __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x); If you need to build without optimization turned on, you can create a file called @@ -423,13 +431,13 @@ The Tegra Graphics Debugger is available from NVidia here: https://developer.nvidia.com/tegra-graphics-debugger -Why is API level 16 the minimum required? +Why is API level 19 the minimum required? ================================================================================ -The latest NDK toolchain doesn't support targeting earlier than API level 16. -As of this writing, according to https://developer.android.com/about/dashboards/index.html -about 99% of the Android devices accessing Google Play support API level 16 or -higher (January 2018). +The latest NDK toolchain doesn't support targeting earlier than API level 19. +As of this writing, according to https://www.composables.com/tools/distribution-chart +about 99.7% of the Android devices accessing Google Play support API level 19 or +higher (August 2023). A note regarding the use of the "dirty rectangles" rendering technique @@ -440,7 +448,7 @@ where you only update a portion of the screen on each frame, you may notice a variety of visual glitches on Android, that are not present on other platforms. This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2 contexts, in particular the use of the eglSwapBuffers function. As stated in the -documentation for the function "The contents of ancillary buffers are always +documentation for the function "The contents of ancillary buffers are always undefined after calling eglSwapBuffers". Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED is not possible for SDL as it requires EGL 1.4, available only on the API level @@ -459,7 +467,7 @@ Two legitimate ways: Activity by calling Activity.finish(). - Android OS can decide to terminate your application by calling onDestroy() -(see Activity life cycle). Your application will receive a SDL_QUIT event you +(see Activity life cycle). Your application will receive a SDL_QUIT event you can handle to save things and quit. Don't call exit() as it stops the activity badly. diff --git a/modules/SDL2/docs/README-cmake.md b/modules/SDL2/docs/README-cmake.md index 9a14957..205ddbd 100644 --- a/modules/SDL2/docs/README-cmake.md +++ b/modules/SDL2/docs/README-cmake.md @@ -3,10 +3,10 @@ (www.cmake.org) SDL's build system was traditionally based on autotools. Over time, this -approach has suffered from several issues across the different supported +approach has suffered from several issues across the different supported platforms. To solve these problems, a new build system based on CMake was introduced. -It is developed in parallel to the legacy autotools build system, so users +It is developed in parallel to the legacy autotools build system, so users can experiment with it without complication. The CMake build system is supported on the following platforms: @@ -48,7 +48,7 @@ SDL can be included in your project in 2 major ways: The following CMake script supports both, depending on the value of `MYGAME_VENDORED`. ```cmake -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(mygame) # Create an option to switch between a system sdl library and a vendored sdl library @@ -59,15 +59,15 @@ if(MYGAME_VENDORED) else() # 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2) - - # 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available + + # 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main) endif() -# Create your game executable target as usual +# Create your game executable target as usual add_executable(mygame WIN32 mygame.c) -# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications +# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications if(TARGET SDL2::SDL2main) # It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static) target_link_libraries(mygame PRIVATE SDL2::SDL2main) diff --git a/modules/SDL2/docs/README-directfb.md b/modules/SDL2/docs/README-directfb.md index 6672fa4..c41cab2 100644 --- a/modules/SDL2/docs/README-directfb.md +++ b/modules/SDL2/docs/README-directfb.md @@ -12,7 +12,7 @@ Supports: What you need: * DirectFB 1.0.1, 1.2.x, 1.3.0 -* Kernel-Framebuffer support: required: vesafb, radeonfb .... +* Kernel-Framebuffer support: required: vesafb, radeonfb .... * Mesa 7.0.x - optional for OpenGL The `/etc/directfbrc` file should contain the following lines to make @@ -44,7 +44,7 @@ To use hardware accelerated YUV-overlays for YUV-textures, use: export SDL_DIRECTFB_YUV_DIRECT=1 ``` -This is disabled by default. It will only support one +This is disabled by default. It will only support one YUV texture, namely the first. Every other YUV texture will be rendered in software. @@ -84,7 +84,7 @@ As of this writing 20100802 you need to pull Mesa from git and do the following: ``` git clone git://anongit.freedesktop.org/git/mesa/mesa -cd mesa +cd mesa git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a ``` @@ -92,10 +92,10 @@ Edit `configs/linux-directfb` so that the Directories-section looks like this: ``` # Directories -SRC_DIRS = mesa glu +SRC_DIRS = mesa glu GLU_DIRS = sgi DRIVER_DIRS = directfb -PROGRAM_DIRS = +PROGRAM_DIRS = ``` Then do the following: diff --git a/modules/SDL2/docs/README-dynapi.md b/modules/SDL2/docs/README-dynapi.md index 7827458..8eb6fb2 100644 --- a/modules/SDL2/docs/README-dynapi.md +++ b/modules/SDL2/docs/README-dynapi.md @@ -4,29 +4,29 @@ Originally posted on Ryan's Google+ account. Background: -- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, - but developers are shipping their own SDL2 with individual Steam games. - These games might stop getting updates, but a newer SDL2 might be needed later. - Certainly we'll always be fixing bugs in SDL, even if a new video target isn't +- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, + but developers are shipping their own SDL2 with individual Steam games. + These games might stop getting updates, but a newer SDL2 might be needed later. + Certainly we'll always be fixing bugs in SDL, even if a new video target isn't ever needed, and these fixes won't make it to a game shipping its own SDL. -- Even if we replace the SDL2 in those games with a compatible one, that is to - say, edit a developer's Steam depot (yuck!), there are developers that are - statically linking SDL2 that we can't do this for. We can't even force the +- Even if we replace the SDL2 in those games with a compatible one, that is to + say, edit a developer's Steam depot (yuck!), there are developers that are + statically linking SDL2 that we can't do this for. We can't even force the dynamic loader to ignore their SDL2 in this case, of course. - If you don't ship an SDL2 with the game in some form, people that disabled the - Steam Runtime, or just tried to run the game from the command line instead of + Steam Runtime, or just tried to run the game from the command line instead of Steam might find themselves unable to run the game, due to a missing dependency. - If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target - generic Linux boxes that may or may not have SDL2 installed, you have to ship - the library or risk a total failure to launch. So now, you might have to have - a non-Steam build plus a Steam build (that is, one with and one without SDL2 - included), which is inconvenient if you could have had one universal build + generic Linux boxes that may or may not have SDL2 installed, you have to ship + the library or risk a total failure to launch. So now, you might have to have + a non-Steam build plus a Steam build (that is, one with and one without SDL2 + included), which is inconvenient if you could have had one universal build that works everywhere. -- We like the zlib license, but the biggest complaint from the open source - community about the license change is the static linking. The LGPL forced this +- We like the zlib license, but the biggest complaint from the open source + community about the license change is the static linking. The LGPL forced this as a legal, not technical issue, but zlib doesn't care. Even those that aren't - concerned about the GNU freedoms found themselves solving the same problems: - swapping in a newer SDL to an older game often times can save the day. + concerned about the GNU freedoms found themselves solving the same problems: + swapping in a newer SDL to an older game often times can save the day. Static linking stops this dead. So here's what we did: @@ -45,7 +45,7 @@ Except that is all done with a bunch of macro magic so we don't have to maintain every one of these. What is jump_table.SDL_init()? Eventually, that's a function pointer of the real -SDL_Init() that you've been calling all this time. But at startup, it looks more +SDL_Init() that you've been calling all this time. But at startup, it looks more like this: ```c @@ -56,12 +56,12 @@ Uint32 SDL_Init_DEFAULT(Uint32 flags) } ``` -SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function -pointers, which means that this `_DEFAULT` function never gets called again. +SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function +pointers, which means that this `_DEFAULT` function never gets called again. First call to any SDL function sets the whole thing up. So you might be asking, what was the value in that? Isn't this what the operating -system's dynamic loader was supposed to do for us? Yes, but now we've got this +system's dynamic loader was supposed to do for us? Yes, but now we've got this level of indirection, we can do things like this: ```bash @@ -69,34 +69,34 @@ export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0 ./MyGameThatIsStaticallyLinkedToSDL2 ``` -And now, this game that is statically linked to SDL, can still be overridden -with a newer, or better, SDL. The statically linked one will only be used as +And now, this game that is statically linked to SDL, can still be overridden +with a newer, or better, SDL. The statically linked one will only be used as far as calling into the jump table in this case. But in cases where no override -is desired, the statically linked version will provide its own jump table, +is desired, the statically linked version will provide its own jump table, and everyone is happy. So now: -- Developers can statically link SDL, and users can still replace it. +- Developers can statically link SDL, and users can still replace it. (We'd still rather you ship a shared library, though!) -- Developers can ship an SDL with their game, Valve can override it for, say, - new features on SteamOS, or distros can override it for their own needs, +- Developers can ship an SDL with their game, Valve can override it for, say, + new features on SteamOS, or distros can override it for their own needs, but it'll also just work in the default case. -- Developers can ship the same package to everyone (Humble Bundle, GOG, etc), +- Developers can ship the same package to everyone (Humble Bundle, GOG, etc), and it'll do the right thing. -- End users (and Valve) can update a game's SDL in almost any case, +- End users (and Valve) can update a game's SDL in almost any case, to keep abandoned games running on newer platforms. -- Everyone develops with SDL exactly as they have been doing all along. +- Everyone develops with SDL exactly as they have been doing all along. Same headers, same ABI. Just get the latest version to enable this magic. A little more about SDL_InitDynamicAPI(): -Internally, InitAPI does some locking to make sure everything waits until a -single thread initializes everything (although even SDL_CreateThread() goes +Internally, InitAPI does some locking to make sure everything waits until a +single thread initializes everything (although even SDL_CreateThread() goes through here before spinning a thread, too), and then decides if it should use -an external SDL library. If not, it sets up the jump table using the current +an external SDL library. If not, it sets up the jump table using the current SDL's function pointers (which might be statically linked into a program, or in -a shared library of its own). If so, it loads that library and looks for and +a shared library of its own). If so, it loads that library and looks for and calls a single function: ```c @@ -104,35 +104,35 @@ SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize); ``` That function takes a version number (more on that in a moment), the address of -the jump table, and the size, in bytes, of the table. -Now, we've got policy here: this table's layout never changes; new stuff gets -added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all +the jump table, and the size, in bytes, of the table. +Now, we've got policy here: this table's layout never changes; new stuff gets +added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all the needed functions if tablesize <= sizeof its own jump table. If tablesize is bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but if it's smaller, we know we can provide the entire API that the caller needs. -The version variable is a failsafe switch. -Right now it's always 1. This number changes when there are major API changes -(so we know if the tablesize might be smaller, or entries in it have changed). -Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not -inconceivable to have a small dispatch library that only supplies this one +The version variable is a failsafe switch. +Right now it's always 1. This number changes when there are major API changes +(so we know if the tablesize might be smaller, or entries in it have changed). +Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not +inconceivable to have a small dispatch library that only supplies this one function and loads different, otherwise-incompatible SDL libraries and has the -right one initialize the jump table based on the version. For something that -must generically catch lots of different versions of SDL over time, like the +right one initialize the jump table based on the version. For something that +must generically catch lots of different versions of SDL over time, like the Steam Client, this isn't a bad option. Finally, I'm sure some people are reading this and thinking, -"I don't want that overhead in my project!" +"I don't want that overhead in my project!" -To which I would point out that the extra function call through the jump table -probably wouldn't even show up in a profile, but lucky you: this can all be -disabled. You can build SDL without this if you absolutely must, but we would -encourage you not to do that. However, on heavily locked down platforms like +To which I would point out that the extra function call through the jump table +probably wouldn't even show up in a profile, but lucky you: this can all be +disabled. You can build SDL without this if you absolutely must, but we would +encourage you not to do that. However, on heavily locked down platforms like iOS, or maybe when debugging, it makes sense to disable it. The way this is -designed in SDL, you just have to change one #define, and the entire system -vaporizes out, and SDL functions exactly like it always did. Most of it is -macro magic, so the system is contained to one C file and a few headers. -However, this is on by default and you have to edit a header file to turn it -off. Our hopes is that if we make it easy to disable, but not too easy, -everyone will ultimately be able to get what they want, but we've gently +designed in SDL, you just have to change one #define, and the entire system +vaporizes out, and SDL functions exactly like it always did. Most of it is +macro magic, so the system is contained to one C file and a few headers. +However, this is on by default and you have to edit a header file to turn it +off. Our hopes is that if we make it easy to disable, but not too easy, +everyone will ultimately be able to get what they want, but we've gently nudged everyone towards what we think is the best solution. diff --git a/modules/SDL2/docs/README-gdk.md b/modules/SDL2/docs/README-gdk.md index 5f6b18b..903265f 100644 --- a/modules/SDL2/docs/README-gdk.md +++ b/modules/SDL2/docs/README-gdk.md @@ -24,11 +24,11 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers * GDK-specific setup: * Initializing/uninitializing the game runtime, and initializing Xbox Live services * Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue. - + * An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters. * Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`). * You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak). - + * What doesn't work: * Compilation with anything other than through the included Visual C++ solution file @@ -58,7 +58,7 @@ In your game's existing Visual Studio Solution, go to Build > Configuration Mana Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project. -*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built. +*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built. ### 3. Configuring Project Settings ### diff --git a/modules/SDL2/docs/README-gesture.md b/modules/SDL2/docs/README-gesture.md index 451afae..ee6a0c5 100644 --- a/modules/SDL2/docs/README-gesture.md +++ b/modules/SDL2/docs/README-gesture.md @@ -2,7 +2,7 @@ Dollar Gestures =========================================================================== SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. -Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. +Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. @@ -42,7 +42,7 @@ Both functions return the number of gestures successfully saved. Loading: -------- -To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. +To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. SDL_LoadDollarTemplates returns the number of templates successfully loaded. @@ -51,7 +51,7 @@ SDL_LoadDollarTemplates returns the number of templates successfully loaded. =========================================================================== Multi Gestures =========================================================================== -SDL provides simple support for pinch/rotate/swipe gestures. +SDL provides simple support for pinch/rotate/swipe gestures. Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: * event.mgesture.touchId - the Id of the touch on which the gesture was performed. diff --git a/modules/SDL2/docs/README-ios.md b/modules/SDL2/docs/README-ios.md index 966d674..f5a3a83 100644 --- a/modules/SDL2/docs/README-ios.md +++ b/modules/SDL2/docs/README-ios.md @@ -111,17 +111,17 @@ e.g. return 1; } } - + int main(int argc, char *argv[]) { SDL_SetEventFilter(HandleAppEvents, NULL); - + ... run your main loop - + return 0; } - + Notes -- Accelerometer as Joystick ============================================================================== @@ -185,7 +185,7 @@ Once your application is installed its directory tree looks like: Preferences/ tmp/ -When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". +When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". More information on this subject is available here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html @@ -194,7 +194,7 @@ http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOS Notes -- xcFramework ============================================================================== -The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform. +The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform. In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package. @@ -216,7 +216,7 @@ main(int argc, char *argv[]) } #endif /* !SDL_MAIN_HANDLED */ -Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected: +Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected: #include "SDL_main.h" #include @@ -252,7 +252,7 @@ to your Info.plist: MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app. -Game Center +Game Center ============================================================================== Game Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using: @@ -268,15 +268,15 @@ e.g. { ... do event handling, frame logic and rendering ... } - + int main(int argc, char *argv[]) { ... initialize game ... - + #if __IPHONEOS__ // Initialize the Game Center for scoring and matchmaking InitGameCenter(); - + // Set up the game to run in the window animation callback on iOS // so that Game Center and so forth works correctly. SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); diff --git a/modules/SDL2/docs/README-linux.md b/modules/SDL2/docs/README-linux.md index 29e7094..b28690b 100644 --- a/modules/SDL2/docs/README-linux.md +++ b/modules/SDL2/docs/README-linux.md @@ -5,7 +5,7 @@ By default SDL will only link against glibc, the rest of the features will be enabled dynamically at runtime depending on the available features on the target system. So, for example if you built SDL with XRandR support and the target system does not have the XRandR libraries installed, it will be disabled -at runtime, and you won't get a missing library error, at least with the +at runtime, and you won't get a missing library error, at least with the default configuration parameters. @@ -43,7 +43,7 @@ NOTES: is missing, so it's safe to build in support even if the end user doesn't have this library installed. - DirectFB isn't included because the configure script (currently) fails to find - it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the + it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the configure script to include DirectFB support. Send patches. :) @@ -55,42 +55,42 @@ there's a few issues that may cause SDL to fail to detect your joystick. To debug this, start by installing the evtest utility. On Ubuntu/Debian: sudo apt-get install evtest - + Then run: - + sudo evtest - + You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX" Now run: - + cat /dev/input/event/XX If you get a permission error, you need to set a udev rule to change the mode of -your device (see below) - +your device (see below) + Also, try: - + sudo udevadm info --query=all --name=input/eventXX - + If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it, you need to set up an udev rule to force this variable. -A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks +A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks like: - + SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" - + You can set up similar rules for your device by changing the values listed in idProduct and idVendor. To obtain these values, try: - + sudo udevadm info -a --name=input/eventXX | grep idVendor sudo udevadm info -a --name=input/eventXX | grep idProduct - -If multiple values come up for each of these, the one you want is the first one of each. + +If multiple values come up for each of these, the one you want is the first one of each. On other systems which ship with an older udev (such as CentOS), you may need to set up a rule such as: - + SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1" diff --git a/modules/SDL2/docs/README-macos.md b/modules/SDL2/docs/README-macos.md index f53b419..af8a475 100644 --- a/modules/SDL2/docs/README-macos.md +++ b/modules/SDL2/docs/README-macos.md @@ -74,10 +74,10 @@ NSApplicationDelegate implementation: event.type = SDL_QUIT; SDL_PushEvent(&event); } - + return NSTerminateCancel; } - + - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename { if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) { @@ -86,7 +86,7 @@ NSApplicationDelegate implementation: event.drop.file = SDL_strdup([filename UTF8String]); return (SDL_PushEvent(&event) > 0); } - + return NO; } ``` @@ -196,12 +196,12 @@ normally from the Finder. The SDL Library is packaged as a framework bundle, an organized relocatable folder hierarchy of executable code, interface headers, -and additional resources. For practical purposes, you can think of a +and additional resources. For practical purposes, you can think of a framework as a more user and system-friendly shared library, whose library file behaves more or less like a standard UNIX shared library. -To build the framework, simply open the framework project and build it. -By default, the framework bundle "SDL.framework" is installed in +To build the framework, simply open the framework project and build it. +By default, the framework bundle "SDL.framework" is installed in /Library/Frameworks. Therefore, the testers and project stationary expect it to be located there. However, it will function the same in any of the following locations: @@ -253,7 +253,7 @@ Use `xcode-build` in the same directory as your .pbxproj file You can send command line args to your app by either invoking it from the command line (in *.app/Contents/MacOS) or by entering them in the Executables" panel of the target settings. - + # Implementation Notes Some things that may be of interest about how it all works... diff --git a/modules/SDL2/docs/README-n3ds.md b/modules/SDL2/docs/README-n3ds.md index 5be0961..ff528eb 100644 --- a/modules/SDL2/docs/README-n3ds.md +++ b/modules/SDL2/docs/README-n3ds.md @@ -25,3 +25,4 @@ cmake --install build - SDL2main should be used to ensure ROMFS is enabled. - By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function. - `SDL_GetBasePath` returns the romfs root instead of the executable's directory. +- The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information. diff --git a/modules/SDL2/docs/README-nacl.md b/modules/SDL2/docs/README-nacl.md index 4c9432b..2906825 100644 --- a/modules/SDL2/docs/README-nacl.md +++ b/modules/SDL2/docs/README-nacl.md @@ -1,13 +1,13 @@ Native Client ================================================================================ -Requirements: +Requirements: -* Native Client SDK (https://developer.chrome.com/native-client), +* Native Client SDK (https://developer.chrome.com/native-client), (tested with Pepper version 33 or higher). The SDL backend for Chrome's Native Client has been tested only with the PNaCl -toolchain, which generates binaries designed to run on ARM and x86_32/64 +toolchain, which generates binaries designed to run on ARM and x86_32/64 platforms. This does not mean it won't work with the other toolchains! ================================================================================ @@ -17,15 +17,15 @@ Building SDL for NaCl Set up the right environment variables (see naclbuild.sh), then configure SDL with: configure --host=pnacl --prefix some/install/destination - -Then "make". -As an example of how to create a deployable app a Makefile project is provided -in test/nacl/Makefile, which includes some monkey patching of the common.mk file -provided by NaCl, without which linking properly to SDL won't work (the search -path can't be modified externally, so the linker won't find SDL's binaries unless +Then "make". + +As an example of how to create a deployable app a Makefile project is provided +in test/nacl/Makefile, which includes some monkey patching of the common.mk file +provided by NaCl, without which linking properly to SDL won't work (the search +path can't be modified externally, so the linker won't find SDL's binaries unless you dump them into the SDK path, which is inconvenient). -Also provided in test/nacl is the required support file, such as index.html, +Also provided in test/nacl is the required support file, such as index.html, manifest.json, etc. SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure. This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem), @@ -38,20 +38,20 @@ Running tests ================================================================================ Due to the nature of NaCl programs, building and running SDL tests is not as -straightforward as one would hope. The script naclbuild.sh in build-scripts -automates the process and should serve as a guide for users of SDL trying to build +straightforward as one would hope. The script naclbuild.sh in build-scripts +automates the process and should serve as a guide for users of SDL trying to build their own applications. Basic usage: - + ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35) - + This will build testgles2.c by default. If you want to build a different test, for example testrendercopyex.c: - + SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35 - + Once the build finishes, you have to serve the contents with a web server (the script will give you instructions on how to do that with Python). @@ -60,28 +60,28 @@ RWops and nacl_io ================================================================================ SDL_RWops work transparently with nacl_io. Two functions control the mount points: - - int mount(const char* source, const char* target, - const char* filesystemtype, + + int mount(const char* source, const char* target, + const char* filesystemtype, unsigned long mountflags, const void *data); int umount(const char *target); - - For convenience, SDL will by default mount an httpfs tree at / before calling + + For convenience, SDL will by default mount an httpfs tree at / before calling the app's main function. Such setting can be overridden by calling: - + umount("/"); And then mounting a different filesystem at / It's important to consider that the asynchronous nature of file operations on a browser is hidden from the application, effectively providing the developer with -a set of blocking file operations just like you get in a regular desktop -environment, which eases the job of porting to Native Client, but also introduces -a set of challenges of its own, in particular when big file sizes and slow +a set of blocking file operations just like you get in a regular desktop +environment, which eases the job of porting to Native Client, but also introduces +a set of challenges of its own, in particular when big file sizes and slow connections are involved. For more information on how nacl_io and mount points work, see: - + https://developer.chrome.com/native-client/devguide/coding/nacl_io https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h diff --git a/modules/SDL2/docs/README-os2.md b/modules/SDL2/docs/README-os2.md index 1815b94..148eb33 100644 --- a/modules/SDL2/docs/README-os2.md +++ b/modules/SDL2/docs/README-os2.md @@ -3,7 +3,7 @@ Simple DirectMedia Layer 2 for OS/2 & eComStation SDL port for OS/2, authored by Andrey Vasilkin , 2016 -OpenGL and audio capture not supported by this port. +OpenGL not supported by this port. Additional optional environment variables: diff --git a/modules/SDL2/docs/README-pandora.md b/modules/SDL2/docs/README-pandora.md index 511a054..b89d526 100644 --- a/modules/SDL2/docs/README-pandora.md +++ b/modules/SDL2/docs/README-pandora.md @@ -1,4 +1,4 @@ -Pandora +Pandora ===================================================================== ( http://openpandora.org/ ) diff --git a/modules/SDL2/docs/README-ps2.md b/modules/SDL2/docs/README-ps2.md index d9fb800..3f07580 100644 --- a/modules/SDL2/docs/README-ps2.md +++ b/modules/SDL2/docs/README-ps2.md @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) { ..... ``` -For a release binary is recommendable to reset the IOP always. +For a release binary is recommendable to reset the IOP always. Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected. @@ -48,4 +48,4 @@ Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_ ## To Do - PS2 Screen Keyboard - Dialogs -- Others \ No newline at end of file +- Others diff --git a/modules/SDL2/docs/README-psp.md b/modules/SDL2/docs/README-psp.md index 798a37b..0c5380f 100644 --- a/modules/SDL2/docs/README-psp.md +++ b/modules/SDL2/docs/README-psp.md @@ -1,7 +1,7 @@ PSP ====== SDL2 port for the Sony PSP contributed by: -- Captian Lex +- Captian Lex - Francisco Javier Trujillo Mata - Wouter Wijsman @@ -33,4 +33,4 @@ cmake --install build ## To Do - PSP Screen Keyboard -- Dialogs \ No newline at end of file +- Dialogs diff --git a/modules/SDL2/docs/README-raspberrypi.md b/modules/SDL2/docs/README-raspberrypi.md index 762dd38..f2f24c7 100644 --- a/modules/SDL2/docs/README-raspberrypi.md +++ b/modules/SDL2/docs/README-raspberrypi.md @@ -20,9 +20,9 @@ Raspbian Build Dependencies sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev -You also need the VideoCore binary stuff that ships in /opt/vc for EGL and +You also need the VideoCore binary stuff that ships in /opt/vc for EGL and OpenGL ES 2.x, it usually comes pre-installed, but in any case: - + sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev @@ -45,7 +45,7 @@ will be placed in /opt/rpi-tools sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools You'll also need a Raspbian binary image. -Get it from: http://downloads.raspberrypi.org/raspbian_latest +Get it from: http://downloads.raspberrypi.org/raspbian_latest After unzipping, you'll get file with a name like: "-wheezy-raspbian.img" Let's assume the sysroot will be built in /opt/rpi-sysroot. @@ -69,8 +69,8 @@ edit $SYSROOT/etc/ld.so.preload and comment out all lines in it. sudo umount $SYSROOT/proc sudo umount $SYSROOT/sys sudo umount /mnt - -There's one more fix required, as the libdl.so symlink uses an absolute path + +There's one more fix required, as the libdl.so symlink uses an absolute path which doesn't quite work in our setup. sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so @@ -86,13 +86,13 @@ The final step is compiling SDL itself. make install To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths: - + perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config - + Apps don't work or poor video/audio performance ----------------------------------------------- -If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to +If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to update the RPi's firmware. Note that doing so will fix these problems, but it will also render the CMA - Dynamic Memory Split functionality useless. @@ -101,7 +101,7 @@ low in general, specially if a 1080p TV is hooked up. See here how to configure this setting: http://elinux.org/RPiconfig -Using a fixed gpu_mem=128 is the best option (specially if you updated the +Using a fixed gpu_mem=128 is the best option (specially if you updated the firmware, using CMA probably won't work, at least it's the current case). No input @@ -115,9 +115,9 @@ No HDMI Audio ------------- If you notice that ALSA works but there's no audio over HDMI, try adding: - + hdmi_drive=2 - + to your config.txt file and reboot. Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062 @@ -129,7 +129,7 @@ The Text Input API is supported, with translation of scan codes done via the kernel symbol tables. For this to work, SDL needs access to a valid console. If you notice there's no SDL_TEXTINPUT message being emitted, double check that your app has read access to one of the following: - + * /proc/self/fd/0 * /dev/tty * /dev/tty[0...6] @@ -137,17 +137,17 @@ your app has read access to one of the following: * /dev/console This is usually not a problem if you run from the physical terminal (as opposed -to running from a pseudo terminal, such as via SSH). If running from a PTS, a +to running from a pseudo terminal, such as via SSH). If running from a PTS, a quick workaround is to run your app as root or add yourself to the tty group, then re-login to the system. sudo usermod -aG tty `whoami` - + The keyboard layout used by SDL is the same as the one the kernel uses. To configure the layout on Raspbian: - + sudo dpkg-reconfigure keyboard-configuration - + To configure the locale, which controls which keys are interpreted as letters, this determining the CAPS LOCK behavior: @@ -157,9 +157,9 @@ this determining the CAPS LOCK behavior: OpenGL problems --------------- -If you have desktop OpenGL headers installed at build time in your RPi or cross -compilation environment, support for it will be built in. However, the chipset -does not actually have support for it, which causes issues in certain SDL apps +If you have desktop OpenGL headers installed at build time in your RPi or cross +compilation environment, support for it will be built in. However, the chipset +does not actually have support for it, which causes issues in certain SDL apps since the presence of OpenGL support supersedes the ES/ES2 variants. The workaround is to disable OpenGL at configuration time: @@ -176,5 +176,5 @@ Notes * When launching apps remotely (via SSH), SDL can prevent local keystrokes from leaking into the console only if it has root privileges. Launching apps locally does not suffer from this issue. - + diff --git a/modules/SDL2/docs/README-touch.md b/modules/SDL2/docs/README-touch.md index b6745ac..1a23f35 100644 --- a/modules/SDL2/docs/README-touch.md +++ b/modules/SDL2/docs/README-touch.md @@ -8,7 +8,7 @@ The linux touch system is currently based off event streams, and proc/bus/device Mac: The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. -iPhone: +iPhone: Works out of box. Windows: diff --git a/modules/SDL2/docs/README-visualc.md b/modules/SDL2/docs/README-visualc.md index 759752a..fb0edb9 100644 --- a/modules/SDL2/docs/README-visualc.md +++ b/modules/SDL2/docs/README-visualc.md @@ -17,10 +17,10 @@ _Editor's note: I've been able to successfully build SDL using Visual Studio 201 2. Your IDE will likely prompt you to upgrade this solution file to whatever later version of the IDE you're using. In the `Retarget Projects` dialog, all of the affected project files should be checked allowing you to use the latest `Windows SDK Version` you have installed, along with the `Platform Toolset`. - + If you choose *NOT* to upgrade to use the latest `Windows SDK Version` or `Platform Toolset`, then you'll need the `Visual Studio 2010 Platform Toolset`. -3. Build the `.dll` and `.lib` files by right clicking on each project in turn (Projects are listed in the _Workspace_ +3. Build the `.dll` and `.lib` files by right clicking on each project in turn (Projects are listed in the _Workspace_ panel in the _FileView_ tab), and selecting `Build`. You may get a few warnings, but you should not get any errors. @@ -90,17 +90,17 @@ Here's a sample SDL snippet to verify everything is setup in your IDE: SDL_Init(SDL_INIT_VIDEO); window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN); renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); - + SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); return 0; } - ``` + ``` ### That's it! -I hope that this document has helped you get through the most difficult part of using the SDL: installing it. +I hope that this document has helped you get through the most difficult part of using the SDL: installing it. Suggestions for improvements should be posted to the [Github Issues](https://github.com/libsdl-org/SDL/issues). ### Credits diff --git a/modules/SDL2/docs/README-vita.md b/modules/SDL2/docs/README-vita.md index 503fef7..0a11cf8 100644 --- a/modules/SDL2/docs/README-vita.md +++ b/modules/SDL2/docs/README-vita.md @@ -20,13 +20,13 @@ To build for the PSVita, make sure you have vitasdk and cmake installed and run: Notes ----- * gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON` - These renderers support 720p and 1080i resolutions. These can be specified with: + These renderers support 720p and 1080i resolutions. These can be specified with: `SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);` * Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK. They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);` anytime before video subsystem initialization. * gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON` -* By default SDL emits mouse events for touch events on every touchscreen. +* By default SDL emits mouse events for touch events on every touchscreen. Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead. Individual touchscreens can be disabled with: `SDL_setenv("VITA_DISABLE_TOUCH_FRONT", "1", 1);` and `SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);` diff --git a/modules/SDL2/docs/README-windows.md b/modules/SDL2/docs/README-windows.md index ed0c93e..66b5fb0 100644 --- a/modules/SDL2/docs/README-windows.md +++ b/modules/SDL2/docs/README-windows.md @@ -34,7 +34,7 @@ from a recent Chrome/Chromium install for Windows. The files you need are: - libGLESv2.dll - d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler) *or* d3dcompiler_43.dll (supports Windows XP or later) - + If you compile ANGLE from source, you can configure it so it does not need the d3dcompiler_* DLL at all (for details on this, see their documentation). However, by default SDL will try to preload the d3dcompiler_46.dll to @@ -48,7 +48,7 @@ Known Bugs: - SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears that there's a bug in the library which prevents the window contents from refreshing if this is set to anything other than the default value. - + ## Vulkan Surface Support Support for creating Vulkan surfaces is configured on by default. To disable diff --git a/modules/SDL2/docs/README-winrt.md b/modules/SDL2/docs/README-winrt.md index 3ea9c3d..d87ec04 100644 --- a/modules/SDL2/docs/README-winrt.md +++ b/modules/SDL2/docs/README-winrt.md @@ -21,7 +21,7 @@ Requirements (The "Community" editions of Visual C++ do, however, support both desktop/Win32 and WinRT development). * A valid Microsoft account - This requirement is not imposed by SDL, but - rather by Microsoft's Visual C++ toolchain. This is required to launch or + rather by Microsoft's Visual C++ toolchain. This is required to launch or debug apps. @@ -44,8 +44,8 @@ Here is a rough list of what works, and what doesn't: SDL_GetPerformanceFrequency(), etc.) * file I/O via SDL_RWops * mouse input (unsupported on Windows Phone) - * audio, via SDL's WASAPI backend (if you want to record, your app must - have "Microphone" capabilities enabled in its manifest, and the user must + * audio, via SDL's WASAPI backend (if you want to record, your app must + have "Microphone" capabilities enabled in its manifest, and the user must not have blocked access. Otherwise, capture devices will fail to work, presenting as a device disconnect shortly after opening it.) * .DLL file loading. Libraries *MUST* be packaged inside applications. Loading @@ -55,7 +55,7 @@ Here is a rough list of what works, and what doesn't: SDL_GameController APIs, and is backed by Microsoft's XInput API. Please note, however, that Windows limits game-controller support in UWP apps to, "Xbox compatible controllers" (many controllers that work in Win32 apps, - do not work in UWP, due to restrictions in UWP itself.) + do not work in UWP, due to restrictions in UWP itself.) * multi-touch input * app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as appropriate. @@ -199,7 +199,7 @@ libraries such that, when the app is built: 1. each library gets built for the appropriate CPU architecture(s) and WinRT platform(s). -2. each library's output, such as .dll files, get copied to the app's build +2. each library's output, such as .dll files, get copied to the app's build output. To set this up for SDL/WinRT, you'll need to run through the following steps: @@ -245,12 +245,12 @@ To change these settings: 7. edit the "Additional Include Directories" setting, and add a path to SDL's "include" directory 8. **Optional: to enable compilation of C code:** change the setting for - "Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're - working with a completely C++ based project, this step can usually be + "Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're + working with a completely C++ based project, this step can usually be omitted. -9. **Optional: to disable precompiled headers (which can produce - 'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand - list, select "Precompiled Headers", then change the setting for "Precompiled +9. **Optional: to disable precompiled headers (which can produce + 'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand + list, select "Precompiled Headers", then change the setting for "Precompiled Header" from "Use (/Yu)" to "Not Using Precompiled Headers". 10. close the dialog, saving settings, by clicking the "OK" button @@ -267,7 +267,7 @@ A few files should be included directly in your app's MSVC project, specifically To include these files for C/C++ projects: -1. right-click on your project (again, in Visual C++'s Solution Explorer), +1. right-click on your project (again, in Visual C++'s Solution Explorer), navigate to "Add", then choose "Existing Item...". 2. navigate to the directory containing SDL's source code, then into its subdirectory, 'src/main/winrt/'. Select, then add, the following files: @@ -282,8 +282,8 @@ To include these files for C/C++ projects: 7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)". 8. click the OK button. This will close the dialog. -**NOTE: C++/CX compilation is currently required in at least one file of your -app's project. This is to make sure that Visual C++'s linker builds a 'Windows +**NOTE: C++/CX compilation is currently required in at least one file of your +app's project. This is to make sure that Visual C++'s linker builds a 'Windows Metadata' file (.winmd) for your app. Not doing so can lead to build errors.** For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's @@ -293,37 +293,37 @@ first block in your Visual Studio project file. ### 6. Add app code and assets ### -At this point, you can add in SDL-specific source code. Be sure to include a -C-style main function (ie: `int main(int argc, char *argv[])`). From there you -should be able to create a single `SDL_Window` (WinRT apps can only have one -window, at present), as well as an `SDL_Renderer`. Direct3D will be used to -draw content. Events are received via SDL's usual event functions -(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets, -you can start adding them to the project now. If not, or if you would like to -make sure that you're setup correctly, some short and simple sample code is +At this point, you can add in SDL-specific source code. Be sure to include a +C-style main function (ie: `int main(int argc, char *argv[])`). From there you +should be able to create a single `SDL_Window` (WinRT apps can only have one +window, at present), as well as an `SDL_Renderer`. Direct3D will be used to +draw content. Events are received via SDL's usual event functions +(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets, +you can start adding them to the project now. If not, or if you would like to +make sure that you're setup correctly, some short and simple sample code is provided below. #### 6.A. ... when creating a new app #### -If you are creating a new app (rather than porting an existing SDL-based app), -or if you would just like a simple app to test SDL/WinRT with before trying to -get existing code working, some working SDL/WinRT code is provided below. To +If you are creating a new app (rather than porting an existing SDL-based app), +or if you would just like a simple app to test SDL/WinRT with before trying to +get existing code working, some working SDL/WinRT code is provided below. To set this up: 1. right click on your app's project 2. select Add, then New Item. An "Add New Item" dialog will show up. 3. from the left-hand list, choose "Visual C++" 4. from the middle/main list, choose "C++ File (.cpp)" -5. near the bottom of the dialog, next to "Name:", type in a name for your +5. near the bottom of the dialog, next to "Name:", type in a name for your source file, such as, "main.cpp". -6. click on the Add button. This will close the dialog, add the new file to +6. click on the Add button. This will close the dialog, add the new file to your project, and open the file in Visual C++'s text editor. 7. Copy and paste the following code into the new file, then save it. ```c #include - + int main(int argc, char **argv) { SDL_DisplayMode mode; @@ -331,7 +331,7 @@ int main(int argc, char **argv) SDL_Renderer * renderer = NULL; SDL_Event evt; SDL_bool keep_going = SDL_TRUE; - + if (SDL_Init(SDL_INIT_VIDEO) != 0) { return 1; } else if (SDL_GetCurrentDisplayMode(0, &mode) != 0) { @@ -339,14 +339,14 @@ int main(int argc, char **argv) } else if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) { return 1; } - + while (keep_going) { while (SDL_PollEvent(&evt)) { if ((evt.type == SDL_KEYDOWN) && (evt.key.keysym.sym == SDLK_ESCAPE)) { keep_going = SDL_FALSE; - } + } } - + SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255); SDL_RenderClear(renderer); SDL_RenderPresent(renderer); @@ -359,41 +359,41 @@ int main(int argc, char **argv) #### 6.B. Adding code and assets #### -If you have existing code and assets that you'd like to add, you should be able +If you have existing code and assets that you'd like to add, you should be able to add them now. The process for adding a set of files is as such. 1. right click on the app's project 2. select Add, then click on "New Item..." -3. open any source, header, or asset files as appropriate. Support for C and +3. open any source, header, or asset files as appropriate. Support for C and C++ is available. -Do note that WinRT only supports a subset of the APIs that are available to -Win32-based apps. Many portions of the Win32 API and the C runtime are not +Do note that WinRT only supports a subset of the APIs that are available to +Win32-based apps. Many portions of the Win32 API and the C runtime are not available. -A list of unsupported C APIs can be found at +A list of unsupported C APIs can be found at -General information on using the C runtime in WinRT can be found at +General information on using the C runtime in WinRT can be found at -A list of supported Win32 APIs for WinRT apps can be found at -. To note, -the list of supported Win32 APIs for Windows Phone 8.0 is different. -That list can be found at +A list of supported Win32 APIs for WinRT apps can be found at +. To note, +the list of supported Win32 APIs for Windows Phone 8.0 is different. +That list can be found at ### 7. Build and run your app ### -Your app project should now be setup, and you should be ready to build your app. -To run it on the local machine, open the Debug menu and choose "Start -Debugging". This will build your app, then run your app full-screen. To switch -out of your app, press the Windows key. Alternatively, you can choose to run -your app in a window. To do this, before building and running your app, find -the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand -this by clicking on the arrow on the right side of the list, then click on -Simulator. Once you do that, any time you build and run the app, the app will +Your app project should now be setup, and you should be ready to build your app. +To run it on the local machine, open the Debug menu and choose "Start +Debugging". This will build your app, then run your app full-screen. To switch +out of your app, press the Windows key. Alternatively, you can choose to run +your app in a window. To do this, before building and running your app, find +the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand +this by clicking on the arrow on the right side of the list, then click on +Simulator. Once you do that, any time you build and run the app, the app will launch in window, rather than full-screen. @@ -406,37 +406,37 @@ Windows 8.x that ran primarily on ARM-based tablet computers. To build and run the app on ARM-based, "Windows RT" devices, you'll need to: -- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and +- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and debugs ARM-based apps via IP networks. -- change a few options on the development machine, both to make sure it builds - for ARM (rather than x86 or x64), and to make sure it knows how to find the +- change a few options on the development machine, both to make sure it builds + for ARM (rather than x86 or x64), and to make sure it knows how to find the Windows RT device (on the network). -Microsoft's Remote Debugger can be found at -. Please note -that separate versions of this debugger exist for different versions of Visual +Microsoft's Remote Debugger can be found at +. Please note +that separate versions of this debugger exist for different versions of Visual C++, one each for MSVC 2015, 2013, and 2012. To setup Visual C++ to launch your app on an ARM device: -1. make sure the Remote Debugger is running on your ARM device, and that it's on +1. make sure the Remote Debugger is running on your ARM device, and that it's on the same IP network as your development machine. -2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click +2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click it, then change the value to "ARM". -3. make sure Visual C++ knows the hostname or IP address of the ARM device. To +3. make sure Visual C++ knows the hostname or IP address of the ARM device. To do this: 1. open the app project's properties 2. select "Debugging" - 3. next to "Machine Name", enter the hostname or IP address of the ARM + 3. next to "Machine Name", enter the hostname or IP address of the ARM device 4. if, and only if, you've turned off authentication in the Remote Debugger, then change the setting for "Require Authentication" to No 5. click "OK" -4. build and run the app (from Visual C++). The first time you do this, a - prompt will show up on the ARM device, asking for a Microsoft Account. You - do, unfortunately, need to log in here, and will need to follow the - subsequent registration steps in order to launch the app. After you do so, - if the app didn't already launch, try relaunching it again from within Visual +4. build and run the app (from Visual C++). The first time you do this, a + prompt will show up on the ARM device, asking for a Microsoft Account. You + do, unfortunately, need to log in here, and will need to follow the + subsequent registration steps in order to launch the app. After you do so, + if the app didn't already launch, try relaunching it again from within Visual C++. diff --git a/modules/SDL2/include/SDL_assert.h b/modules/SDL2/include/SDL_assert.h index ba6dcd1..7ce823e 100644 --- a/modules/SDL2/include/SDL_assert.h +++ b/modules/SDL2/include/SDL_assert.h @@ -55,6 +55,8 @@ assert can have unique static variables associated with it. #define SDL_TriggerBreakpoint() __builtin_debugtrap() #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) +#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv) + #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" ) #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */ #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" ) #elif defined(__APPLE__) && defined(__arm__) @@ -125,12 +127,10 @@ typedef struct SDL_AssertData const struct SDL_AssertData *next; } SDL_AssertData; -#if (SDL_ASSERT_LEVEL > 0) - /* Never call this directly. Use the SDL_assert* macros. */ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, - const char *, - const char *, int) + const char *, + const char *, int) #if defined(__clang__) #if __has_feature(attribute_analyzer_noreturn) /* this tells Clang's static analysis that we're a custom assert function, @@ -151,9 +151,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, #define SDL_enabled_assert(condition) \ do { \ while ( !(condition) ) { \ - static struct SDL_AssertData sdl_assert_data = { \ - 0, 0, #condition, 0, 0, 0, 0 \ - }; \ + static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \ const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \ if (sdl_assert_state == SDL_ASSERTION_RETRY) { \ continue; /* go again. */ \ @@ -164,8 +162,6 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, } \ } while (SDL_NULL_WHILE_LOOP_CONDITION) -#endif /* enabled assertions support code */ - /* Enable various levels of assertions. */ #if SDL_ASSERT_LEVEL == 0 /* assertions disabled */ # define SDL_assert(condition) SDL_disabled_assert(condition) diff --git a/modules/SDL2/include/SDL_atomic.h b/modules/SDL2/include/SDL_atomic.h index 22ea019..1dd816a 100644 --- a/modules/SDL2/include/SDL_atomic.h +++ b/modules/SDL2/include/SDL_atomic.h @@ -240,7 +240,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); /* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */ #if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) #define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */ -#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__) +#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__) #define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory") #elif (defined(__powerpc__) || defined(__powerpc64__)) #define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27"); @@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) #define SDL_CPUPauseInstruction() __yield() #elif defined(__WATCOMC__) && defined(__386__) - /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ extern __inline void SDL_CPUPauseInstruction(void); - #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" + #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" #else #define SDL_CPUPauseInstruction() #endif diff --git a/modules/SDL2/include/SDL_audio.h b/modules/SDL2/include/SDL_audio.h index 2c0f211..ccd3598 100644 --- a/modules/SDL2/include/SDL_audio.h +++ b/modules/SDL2/include/SDL_audio.h @@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, * The calculated values in this structure are calculated by SDL_OpenAudio(). * * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR LFE BL BR (4.1 surround) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) + * 2: FL FR (stereo) + * 3: FL FR LFE (2.1 surround) + * 4: FL FR BL BR (quad) + * 5: FL FR LFE BL BR (4.1 surround) + * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) + * 7: FL FR FC LFE BC SL SR (6.1 surround) + * 8: FL FR FC LFE BL BR SL SR (7.1 surround) */ typedef struct SDL_AudioSpec { diff --git a/modules/SDL2/include/SDL_blendmode.h b/modules/SDL2/include/SDL_blendmode.h index b862116..4ecbe50 100644 --- a/modules/SDL2/include/SDL_blendmode.h +++ b/modules/SDL2/include/SDL_blendmode.h @@ -52,7 +52,7 @@ typedef enum dstA = dstA */ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ + dstA = dstA */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/modules/SDL2/include/SDL_config.h.cmake b/modules/SDL2/include/SDL_config.h.cmake index b8e2144..7512bb1 100644 --- a/modules/SDL2/include/SDL_config.h.cmake +++ b/modules/SDL2/include/SDL_config.h.cmake @@ -332,6 +332,7 @@ #cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@ #cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@ #cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@ +#cmakedefine SDL_INPUT_WSCONS @SDL_INPUT_WSCONS@ #cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@ #cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@ #cmakedefine SDL_JOYSTICK_WGI @SDL_JOYSTICK_WGI@ @@ -359,6 +360,7 @@ #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ #cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ #cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@ +#cmakedefine SDL_UDEV_DYNAMIC @SDL_UDEV_DYNAMIC@ /* Enable various sensor drivers */ #cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@ @@ -539,6 +541,8 @@ #cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@ #cmakedefine SDL_VIDEO_VITA_PVR_OGL @SDL_VIDEO_VITA_PVR_OGL@ +#cmakedefine SDL_HAVE_LIBDECOR_GET_MIN_MAX @SDL_HAVE_LIBDECOR_GET_MIN_MAX@ + #if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_) /* Most everything except Visual Studio 2008 and earlier has stdint.h now */ #if defined(_MSC_VER) && (_MSC_VER < 1600) diff --git a/modules/SDL2/include/SDL_config.h.in b/modules/SDL2/include/SDL_config.h.in index 5dc98a3..d6460b7 100644 --- a/modules/SDL2/include/SDL_config.h.in +++ b/modules/SDL2/include/SDL_config.h.in @@ -491,4 +491,7 @@ /* Enable dynamic libsamplerate support */ #undef SDL_LIBSAMPLERATE_DYNAMIC +/* Libdecor get min/max content size functions */ +#undef SDL_HAVE_LIBDECOR_GET_MIN_MAX + #endif /* SDL_config_h_ */ diff --git a/modules/SDL2/include/SDL_config_xbox.h b/modules/SDL2/include/SDL_config_xbox.h index 0d5efc4..8baf78e 100644 --- a/modules/SDL2/include/SDL_config_xbox.h +++ b/modules/SDL2/include/SDL_config_xbox.h @@ -209,16 +209,21 @@ #define SDL_VIDEO_DRIVER_DUMMY 1 #define SDL_VIDEO_DRIVER_WINDOWS 1 -/* #ifndef SDL_VIDEO_RENDER_D3D -#define SDL_VIDEO_RENDER_D3D 1 -#endif*/ -#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H) -#define SDL_VIDEO_RENDER_D3D11 1 -#endif #if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H) #define SDL_VIDEO_RENDER_D3D12 1 #endif +/* Enable OpenGL support */ +#ifndef SDL_VIDEO_OPENGL +#define SDL_VIDEO_OPENGL 1 +#endif +#ifndef SDL_VIDEO_OPENGL_WGL +#define SDL_VIDEO_OPENGL_WGL 1 +#endif +#ifndef SDL_VIDEO_RENDER_OGL +#define SDL_VIDEO_RENDER_OGL 1 +#endif + /* Enable system power support */ /*#define SDL_POWER_WINDOWS 1*/ #define SDL_POWER_HARDWIRED 1 diff --git a/modules/SDL2/include/SDL_endian.h b/modules/SDL2/include/SDL_endian.h index 582c3a8..71bc067 100644 --- a/modules/SDL2/include/SDL_endian.h +++ b/modules/SDL2/include/SDL_endian.h @@ -140,7 +140,7 @@ extern "C" { #if HAS_BUILTIN_BSWAP16 #define SDL_Swap16(x) __builtin_bswap16(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ushort) #define SDL_Swap16(x) _byteswap_ushort(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x) #if HAS_BUILTIN_BSWAP32 #define SDL_Swap32(x) __builtin_bswap32(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ulong) #define SDL_Swap32(x) _byteswap_ulong(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x) #if HAS_BUILTIN_BSWAP64 #define SDL_Swap64(x) __builtin_bswap64(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP diff --git a/modules/SDL2/include/SDL_gamecontroller.h b/modules/SDL2/include/SDL_gamecontroller.h index d66e1b0..140054d 100644 --- a/modules/SDL2/include/SDL_gamecontroller.h +++ b/modules/SDL2/include/SDL_gamecontroller.h @@ -724,10 +724,10 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ - SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ - SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ - SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ - SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; diff --git a/modules/SDL2/include/SDL_hints.h b/modules/SDL2/include/SDL_hints.h index 1317924..00beef5 100644 --- a/modules/SDL2/include/SDL_hints.h +++ b/modules/SDL2/include/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -377,6 +377,17 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active + * + * The variable can be set to the following values: + * "0" - Do not show the on-screen keyboard + * "1" - Show the on-screen keyboard + * + * The default value is "1". This hint must be set before text input is activated. + */ +#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" + /** * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs * @@ -507,7 +518,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -569,9 +580,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -996,6 +1007,15 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD" +/** + * \brief A variable controlling whether Windows.Gaming.Input should be used for controller handling. + * + * This variable can be set to the following values: + * "0" - WGI is not used + * "1" - WGI is used (the default) + */ +#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI" + /** * \brief Determines whether SDL enforces that DRM master is required in order * to initialize the KMSDRM video backend. @@ -1310,6 +1330,8 @@ extern "C" { * * This variable can be one of the following values: * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" + * + * Since SDL 2.0.22 this variable accepts a comma-separated list of values above. */ #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" @@ -1452,6 +1474,17 @@ extern "C" { */ #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" +/** + * \brief A variable controlling whether the Metal render driver select low power device over default one + * + * This variable can be set to the following values: + * "0" - Use the prefered OS device + * "1" - Select a low power one + * + * By default the prefered OS device is used. + */ +#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE" + /** * \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS * @@ -1495,7 +1528,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1509,13 +1542,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1603,7 +1636,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1616,7 +1649,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1747,9 +1780,9 @@ extern "C" { /** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). -* +* * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1815,13 +1848,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1955,7 +1988,29 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic). + * + * If the mnemonics are enabled, then menus can be opened by pressing the Alt + * key and the corresponding mnemonic (for example, Alt+F opens the File menu). + * However, in case an invalid mnemonic is pressed, Windows makes an audible + * beep to convey that nothing happened. This is true even if the window has + * no menu at all! + * + * Because most SDL applications don't have menus, and some want to use the Alt + * key for other purposes, SDL disables mnemonics (and the beeping) by default. + * + * Note: This also affects keyboard events: with mnemonics enabled, when a + * menu is opened from the keyboard, you will not receive a KEYUP event for + * the mnemonic key, and *might* not receive one for Alt. + * + * This variable can be set to the following values: + * "0" - Alt+mnemonic does nothing, no beeping. (default) + * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep. + */ +#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" + +/** + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1996,7 +2051,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -2035,16 +2090,16 @@ extern "C" { * * This hint must be set before initializing the video subsystem. * - * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with + * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with * a DPI scale factor. - * + * * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel * even on high-DPI displays. - * + * * For more information, see: * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows - * + * * This variable can be set to the following values: * "" - Do not change the DPI awareness (default). * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later). @@ -2062,16 +2117,16 @@ extern "C" { /** * \brief Uses DPI-scaled points as the SDL coordinate system on Windows. - * + * * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. * This means windows will be appropriately sized, even when created on high-DPI displays with scaling. - * + * * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, * will create a window with an 800x600 client area (in pixels). * * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows. - * + * * This variable can be set to the following values: * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging * between monitors with different scale factors (unless this is performed by @@ -2082,7 +2137,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -2093,7 +2148,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/modules/SDL2/include/SDL_joystick.h b/modules/SDL2/include/SDL_joystick.h index 07d6a2e..b9b4f62 100644 --- a/modules/SDL2/include/SDL_joystick.h +++ b/modules/SDL2/include/SDL_joystick.h @@ -44,6 +44,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" #include "SDL_guid.h" +#include "SDL_mutex.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ @@ -66,6 +67,9 @@ extern "C" { /** * The joystick structure used to identify an SDL joystick */ +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_joystick_lock; +#endif struct _SDL_Joystick; typedef struct _SDL_Joystick SDL_Joystick; @@ -131,7 +135,7 @@ typedef enum * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** @@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); /** * Count the number of joysticks attached to the system. @@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in /** * Get the instance ID of a joystick. * - * This can be called before any joysticks are opened. If the index is out of - * range, this function will return -1. + * This can be called before any joysticks are opened. * * \param device_index the index of the joystick to query (the N'th joystick * on the system * \returns the instance id of the selected joystick. If called on an invalid - * index, this function returns zero + * index, this function returns -1. * * \since This function is available since SDL 2.0.6. */ diff --git a/modules/SDL2/include/SDL_keycode.h b/modules/SDL2/include/SDL_keycode.h index 2523506..7106223 100644 --- a/modules/SDL2/include/SDL_keycode.h +++ b/modules/SDL2/include/SDL_keycode.h @@ -40,7 +40,7 @@ * an SDLK_* constant for those keys that do not generate characters. * * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. + * map to SDLK_0...SDLK_9 on AZERTY layouts. */ typedef Sint32 SDL_Keycode; diff --git a/modules/SDL2/include/SDL_main.h b/modules/SDL2/include/SDL_main.h index 14d39f1..5cc8e59 100644 --- a/modules/SDL2/include/SDL_main.h +++ b/modules/SDL2/include/SDL_main.h @@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun */ extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved); +/** + * Callback from the application to let the suspend continue. + * + * \since This function is available since SDL 2.28.0. + */ +extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); + #endif /* __GDK__ */ #ifdef __cplusplus diff --git a/modules/SDL2/include/SDL_mouse.h b/modules/SDL2/include/SDL_mouse.h index c5712ef..aa07575 100644 --- a/modules/SDL2/include/SDL_mouse.h +++ b/modules/SDL2/include/SDL_mouse.h @@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); /** * Set relative mouse mode. * - * While the mouse is in relative mode, the cursor is hidden, and the driver - * will try to report continuous motion in the current window. Only relative - * motion events will be delivered, the mouse position will not change. - * - * Note that this function will not be able to provide continuous relative - * motion when used over Microsoft Remote Desktop, instead motion is limited - * to the bounds of the screen. + * While the mouse is in relative mode, the cursor is hidden, the mouse + * position is constrained to the window, and SDL will report continuous + * relative mouse motion even if the mouse is at the edge of the window. * * This function will flush any pending mouse motion. * @@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); /** * Get the default cursor. * + * You do not have to call SDL_FreeCursor() on the return value, but it is + * safe to do so. + * * \returns the default cursor on success or NULL on failure. * * \since This function is available since SDL 2.0.0. diff --git a/modules/SDL2/include/SDL_mutex.h b/modules/SDL2/include/SDL_mutex.h index 54b6a53..e679d38 100644 --- a/modules/SDL2/include/SDL_mutex.h +++ b/modules/SDL2/include/SDL_mutex.h @@ -31,6 +31,80 @@ #include "SDL_stdinc.h" #include "SDL_error.h" +/******************************************************************************/ +/* Enable thread safety attributes only with clang. + * The attributes can be safely erased when compiling with other compilers. + */ +#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \ + defined(__clang__) && (!defined(SWIG)) +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */ +#endif + +#define SDL_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + +#define SDL_SCOPED_CAPABILITY \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + +#define SDL_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + +#define SDL_PT_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + +#define SDL_ACQUIRED_BEFORE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) + +#define SDL_ACQUIRED_AFTER(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) + +#define SDL_REQUIRES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x)) + +#define SDL_REQUIRES_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x)) + +#define SDL_ACQUIRE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x)) + +#define SDL_ACQUIRE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x)) + +#define SDL_RELEASE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x)) + +#define SDL_RELEASE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x)) + +#define SDL_RELEASE_GENERIC(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x)) + +#define SDL_TRY_ACQUIRE(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y)) + +#define SDL_TRY_ACQUIRE_SHARED(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y)) + +#define SDL_EXCLUDES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x)) + +#define SDL_ASSERT_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x)) + +#define SDL_ASSERT_SHARED_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x)) + +#define SDL_RETURN_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + +#define SDL_NO_THREAD_SAFETY_ANALYSIS \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +/******************************************************************************/ + + #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex); #define SDL_mutexP(m) SDL_LockMutex(m) /** @@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \sa SDL_LockMutex * \sa SDL_UnlockMutex */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex); /** * Unlock the mutex. @@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) /** @@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * successful it will atomically decrement the semaphore value. * * \param sem the semaphore to wait on - * \param ms the length of the timeout, in milliseconds + * \param timeout the length of the timeout, in milliseconds * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. @@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * \sa SDL_SemValue * \sa SDL_SemWait */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout); /** * Atomically increment a semaphore's value and wake waiting threads. diff --git a/modules/SDL2/include/SDL_opengl_glext.h b/modules/SDL2/include/SDL_opengl_glext.h index 8527e17..ff6ad12 100644 --- a/modules/SDL2/include/SDL_opengl_glext.h +++ b/modules/SDL2/include/SDL_opengl_glext.h @@ -1,4 +1,8 @@ -#ifndef __gl_glext_h_ +/* SDL modified the include guard to be compatible with Mesa and Apple include guards: + * - Mesa uses: __gl_glext_h_ + * - Apple uses: __glext_h_ */ +#if !defined(__glext_h_) && !defined(__gl_glext_h_) +#define __glext_h_ 1 #define __gl_glext_h_ 1 #ifdef __cplusplus diff --git a/modules/SDL2/include/SDL_power.h b/modules/SDL2/include/SDL_power.h index be06c8b..1d75704 100644 --- a/modules/SDL2/include/SDL_power.h +++ b/modules/SDL2/include/SDL_power.h @@ -48,7 +48,6 @@ typedef enum SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ } SDL_PowerState; - /** * Get the current power supply details. * @@ -65,17 +64,17 @@ typedef enum * It's possible a platform can only report battery percentage or time left * but not both. * - * \param secs seconds of battery life left, you can pass a NULL here if you - * don't care, will return -1 if we can't determine a value, or - * we're not running on a battery - * \param pct percentage of battery life left, between 0 and 100, you can pass - * a NULL here if you don't care, will return -1 if we can't - * determine a value, or we're not running on a battery + * \param seconds seconds of battery life left, you can pass a NULL here if + * you don't care, will return -1 if we can't determine a + * value, or we're not running on a battery + * \param percent percentage of battery life left, between 0 and 100, you can + * pass a NULL here if you don't care, will return -1 if we + * can't determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); +extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/include/SDL_render.h b/modules/SDL2/include/SDL_render.h index c729501..2d3f073 100644 --- a/modules/SDL2/include/SDL_render.h +++ b/modules/SDL2/include/SDL_render.h @@ -1731,6 +1731,11 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \threadsafety You may only call this function on the main thread. If this + * happens to work on a background thread on any given platform + * or backend, it's purely by luck and you should not rely on it + * to work next time. + * * \since This function is available since SDL 2.0.0. * * \sa SDL_RenderClear @@ -1885,7 +1890,7 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer); * Note that as of SDL 2.0.18, this will return NULL if Metal refuses to give * SDL a drawable to render to, which might happen if the window is * hidden/minimized/offscreen. This doesn't apply to command encoders for - * render targets, just the window's backbacker. Check your return values! + * render targets, just the window's backbuffer. Check your return values! * * \param renderer The renderer to query * \returns an `id` on success, or NULL if the diff --git a/modules/SDL2/include/SDL_sensor.h b/modules/SDL2/include/SDL_sensor.h index 3010e49..9ecce44 100644 --- a/modules/SDL2/include/SDL_sensor.h +++ b/modules/SDL2/include/SDL_sensor.h @@ -84,7 +84,7 @@ typedef enum * The accelerometer returns the current acceleration in SI meters per * second squared. This measurement includes the force of gravity, so * a device at rest will have an value of SDL_STANDARD_GRAVITY away - * from the center of the earth. + * from the center of the earth, which is a positive Y value. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis diff --git a/modules/SDL2/include/SDL_stdinc.h b/modules/SDL2/include/SDL_stdinc.h index bbce3d0..182ed86 100644 --- a/modules/SDL2/include/SDL_stdinc.h +++ b/modules/SDL2/include/SDL_stdinc.h @@ -30,12 +30,6 @@ #include "SDL_config.h" -#ifdef __APPLE__ -#ifndef _DARWIN_C_SOURCE -#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -85,7 +79,9 @@ Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx for more information. */ -# define _USE_MATH_DEFINES +# ifndef _USE_MATH_DEFINES +# define _USE_MATH_DEFINES +# endif # endif # include #endif @@ -528,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" @@ -694,7 +688,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t * outbytesleft); /** - * This function converts a string between encodings in one pass, returning a + * This function converts a buffer or string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. * * \since This function is available since SDL 2.0.0. @@ -722,6 +716,20 @@ size_t strlcpy(char* dst, const char* src, size_t size); size_t strlcat(char* dst, const char* src, size_t size); #endif +#ifndef HAVE_WCSLCPY +size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +#ifndef HAVE_WCSLCAT +size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +/* Starting LLVM 16, the analyser errors out if these functions do not have + their prototype defined (clang-diagnostic-implicit-function-declaration) */ +#include +#include +#include + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc diff --git a/modules/SDL2/include/SDL_thread.h b/modules/SDL2/include/SDL_thread.h index 849f70b..b829bba 100644 --- a/modules/SDL2/include/SDL_thread.h +++ b/modules/SDL2/include/SDL_thread.h @@ -35,7 +35,7 @@ #include "SDL_atomic.h" #include "SDL_mutex.h" -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) #include /* _beginthreadex() and _endthreadex() */ #endif #if defined(__OS2__) /* for _beginthread() and _endthread() */ @@ -88,7 +88,7 @@ typedef enum { typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) /** * \file SDL_thread.h * diff --git a/modules/SDL2/include/SDL_version.h b/modules/SDL2/include/SDL_version.h index 739134a..40396a4 100644 --- a/modules/SDL2/include/SDL_version.h +++ b/modules/SDL2/include/SDL_version.h @@ -58,7 +58,7 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ #define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 26 +#define SDL_MINOR_VERSION 28 #define SDL_PATCHLEVEL 3 /** diff --git a/modules/SDL2/include/SDL_video.h b/modules/SDL2/include/SDL_video.h index c70facb..c8b2d7a 100644 --- a/modules/SDL2/include/SDL_video.h +++ b/modules/SDL2/include/SDL_video.h @@ -187,7 +187,8 @@ typedef enum SDL_DISPLAYEVENT_NONE, /**< Never used */ SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ - SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_MOVED /**< Display has changed position */ } SDL_DisplayEventID; /** @@ -1274,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags); +/** + * Return whether the window has a surface associated with it. + * + * \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); + /** * Get the SDL surface associated with the window. * @@ -1294,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * * \since This function is available since SDL 2.0.0. * + * \sa SDL_DestroyWindowSurface + * \sa SDL_HasWindowSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1328,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * * \param window the window to update * \param rects an array of SDL_Rect structures representing areas of the - * surface to copy + * surface to copy, in pixels * \param numrects the number of rectangles * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. @@ -1342,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects); +/** + * Destroy the surface associated with the window. + * + * \param window the window to update + * \returns 0 on success or a negative error code on failure; call + * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + * \sa SDL_HasWindowSurface + */ +extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); + /** * Set a window's input grab mode. * diff --git a/modules/SDL2/include/begin_code.h b/modules/SDL2/include/begin_code.h index 1f01e0b..4142ffe 100644 --- a/modules/SDL2/include/begin_code.h +++ b/modules/SDL2/include/begin_code.h @@ -28,10 +28,10 @@ */ /* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h +#ifdef SDL_begin_code_h #error Nested inclusion of begin_code.h #endif -#define _begin_code_h +#define SDL_begin_code_h #ifndef SDL_DEPRECATED # if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ @@ -171,17 +171,17 @@ #define SDL_FALLTHROUGH [[fallthrough]] #else #if defined(__has_attribute) -#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__) +#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__) #else -#define _HAS_FALLTHROUGH 0 +#define SDL_HAS_FALLTHROUGH 0 #endif /* __has_attribute */ -#if _HAS_FALLTHROUGH && \ +#if SDL_HAS_FALLTHROUGH && \ ((defined(__GNUC__) && __GNUC__ >= 7) || \ (defined(__clang_major__) && __clang_major__ >= 10)) #define SDL_FALLTHROUGH __attribute__((__fallthrough__)) #else #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */ -#endif /* _HAS_FALLTHROUGH */ -#undef _HAS_FALLTHROUGH +#endif /* SDL_HAS_FALLTHROUGH */ +#undef SDL_HAS_FALLTHROUGH #endif /* C++17 or C2x */ #endif /* SDL_FALLTHROUGH not defined */ diff --git a/modules/SDL2/include/close_code.h b/modules/SDL2/include/close_code.h index 874a926..b5ff3e2 100644 --- a/modules/SDL2/include/close_code.h +++ b/modules/SDL2/include/close_code.h @@ -26,10 +26,10 @@ * after you finish any function and structure declarations in your headers */ -#ifndef _begin_code_h +#ifndef SDL_begin_code_h #error close_code.h included without matching begin_code.h #endif -#undef _begin_code_h +#undef SDL_begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) diff --git a/modules/SDL2/sdl2-config.cmake.in b/modules/SDL2/sdl2-config.cmake.in index 0be79a4..842f826 100644 --- a/modules/SDL2/sdl2-config.cmake.in +++ b/modules/SDL2/sdl2-config.cmake.in @@ -14,6 +14,7 @@ macro(set_and_check _var _file) endif() endmacro() +get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR} REALPATH) get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/@cmake_prefix_relpath@" ABSOLUTE) set(exec_prefix "@exec_prefix@") @@ -59,6 +60,11 @@ string(REGEX MATCHALL "-L([-a-zA-Z0-9._/]+)" _sdl2_static_private_libdirs "${_sd string(REGEX REPLACE "^-L" "" _sdl2_static_private_libdirs "${_sdl2_static_private_libdirs}") string(REGEX REPLACE ";-L" ";" _sdl2_static_private_libdirs "${_sdl2_static_private_libdirs}") +# Set SDL2_NO_MWINDOWS to a true-ish value to not add the -mwindows link option +if(SDL2_NO_MWINDOWS) + list(REMOVE_ITEM _sdl2_libraries "-mwindows") +endif() + if(_sdl2_libraries MATCHES ".*SDL2main.*") list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main) list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main) @@ -72,6 +78,8 @@ if(EXISTS "${_sdl2main_library}") set_target_properties(SDL2::SDL2main PROPERTIES IMPORTED_LOCATION "${_sdl2main_library}" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) if(WIN32) # INTERFACE_LINK_OPTIONS needs CMake 3.13 @@ -115,6 +123,8 @@ if(WIN32) IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_IMPLIB "${_sdl2_implib}" IMPORTED_LOCATION "${_sdl2_dll}" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2_FOUND TRUE) @@ -134,6 +144,8 @@ else() INTERFACE_LINK_DIRECTORIES "${_sdl2_libdirs}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${_sdl2_shared}" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2_FOUND TRUE) @@ -154,6 +166,8 @@ if(EXISTS "${_sdl2_static}") INTERFACE_LINK_LIBRARIES "${_sdl2_link_libraries};${_sdl2_static_private_libs}" INTERFACE_LINK_DIRECTORIES "${_sdl2_libdirs};${_sdl2_static_private_libdirs}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2-static_FOUND TRUE) @@ -173,6 +187,8 @@ if(EXISTS "${_sdl2test_library}") IMPORTED_LOCATION "${_sdl2test_library}" INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2test_FOUND TRUE) diff --git a/modules/SDL2/sdl2.pc.in b/modules/SDL2/sdl2.pc.in index ad1a957..23a1d69 100644 --- a/modules/SDL2/sdl2.pc.in +++ b/modules/SDL2/sdl2.pc.in @@ -8,7 +8,7 @@ includedir=@includedir@ Name: sdl2 Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. Version: @SDL_VERSION@ -Requires: +Requires.private: @PKGCONFIG_DEPENDS@ Conflicts: Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@ Cflags: -I${includedir} -I${includedir}/SDL2 @SDL_CFLAGS@ diff --git a/modules/SDL2/src/SDL.c b/modules/SDL2/src/SDL.c index 8ccfa17..56049ad 100644 --- a/modules/SDL2/src/SDL.c +++ b/modules/SDL2/src/SDL.c @@ -55,7 +55,7 @@ /* Initialization/Cleanup routines */ #if !SDL_TIMERS_DISABLED -# include "timer/SDL_timer_c.h" +#include "timer/SDL_timer_c.h" #endif #if SDL_VIDEO_DRIVER_WINDOWS extern int SDL_HelperWindowCreate(void); @@ -98,8 +98,8 @@ SDL_NORETURN void SDL_ExitProcess(int exitcode) ExitProcess here that will never be reached but make MingW happy. */ ExitProcess(exitcode); #elif defined(__EMSCRIPTEN__) - emscripten_cancel_main_loop(); /* this should "kill" the app. */ - emscripten_force_exit(exitcode); /* this should "kill" the app. */ + emscripten_cancel_main_loop(); /* this should "kill" the app. */ + emscripten_force_exit(exitcode); /* this should "kill" the app. */ exit(exitcode); #elif defined(__HAIKU__) /* Haiku has _Exit, but it's not marked noreturn. */ _exit(exitcode); @@ -110,7 +110,6 @@ SDL_NORETURN void SDL_ExitProcess(int exitcode) #endif } - /* The initialized subsystems */ #ifdef SDL_MAIN_NEEDED static SDL_bool SDL_MainIsReady = SDL_FALSE; @@ -118,11 +117,10 @@ static SDL_bool SDL_MainIsReady = SDL_FALSE; static SDL_bool SDL_MainIsReady = SDL_TRUE; #endif static SDL_bool SDL_bInMainQuit = SDL_FALSE; -static Uint8 SDL_SubsystemRefCount[ 32 ]; +static Uint8 SDL_SubsystemRefCount[32]; /* Private helper to increment a subsystem's ref counter. */ -static void -SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem) +static void SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem) { const int subsystem_index = SDL_MostSignificantBitIndex32(subsystem); SDL_assert((subsystem_index < 0) || (SDL_SubsystemRefCount[subsystem_index] < 255)); @@ -132,8 +130,7 @@ SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem) } /* Private helper to decrement a subsystem's ref counter. */ -static void -SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem) +static void SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem) { const int subsystem_index = SDL_MostSignificantBitIndex32(subsystem); if ((subsystem_index >= 0) && (SDL_SubsystemRefCount[subsystem_index] > 0)) { @@ -142,8 +139,7 @@ SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem) } /* Private helper to check if a system needs init. */ -static SDL_bool -SDL_PrivateShouldInitSubsystem(Uint32 subsystem) +static SDL_bool SDL_PrivateShouldInitSubsystem(Uint32 subsystem) { const int subsystem_index = SDL_MostSignificantBitIndex32(subsystem); SDL_assert((subsystem_index < 0) || (SDL_SubsystemRefCount[subsystem_index] < 255)); @@ -151,8 +147,8 @@ SDL_PrivateShouldInitSubsystem(Uint32 subsystem) } /* Private helper to check if a system needs to be quit. */ -static SDL_bool -SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) { +static SDL_bool SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) +{ const int subsystem_index = SDL_MostSignificantBitIndex32(subsystem); if ((subsystem_index >= 0) && (SDL_SubsystemRefCount[subsystem_index] == 0)) { return SDL_FALSE; @@ -164,14 +160,12 @@ SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) { return (((subsystem_index >= 0) && (SDL_SubsystemRefCount[subsystem_index] == 1)) || SDL_bInMainQuit) ? SDL_TRUE : SDL_FALSE; } -void -SDL_SetMainReady(void) +void SDL_SetMainReady(void) { SDL_MainIsReady = SDL_TRUE; } -int -SDL_InitSubSystem(Uint32 flags) +int SDL_InitSubSystem(Uint32 flags) { Uint32 flags_initialized = 0; @@ -188,12 +182,12 @@ SDL_InitSubSystem(Uint32 flags) SDL_DBus_Init(); #endif - if ((flags & SDL_INIT_GAMECONTROLLER)) { + if (flags & SDL_INIT_GAMECONTROLLER) { /* game controller implies joystick */ flags |= SDL_INIT_JOYSTICK; } - if ((flags & (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK|SDL_INIT_AUDIO))) { + if (flags & (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO)) { /* video or joystick or audio implies events */ flags |= SDL_INIT_EVENTS; } @@ -203,7 +197,7 @@ SDL_InitSubSystem(Uint32 flags) #endif #if SDL_VIDEO_DRIVER_WINDOWS - if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) { + if (flags & (SDL_INIT_HAPTIC | SDL_INIT_JOYSTICK)) { if (SDL_HelperWindowCreate() < 0) { goto quit_and_error; } @@ -215,7 +209,7 @@ SDL_InitSubSystem(Uint32 flags) #endif /* Initialize the event subsystem */ - if ((flags & SDL_INIT_EVENTS)) { + if (flags & SDL_INIT_EVENTS) { #if !SDL_EVENTS_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_EVENTS)) { if (SDL_EventsInit() < 0) { @@ -231,7 +225,7 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the timer subsystem */ - if ((flags & SDL_INIT_TIMER)){ + if (flags & SDL_INIT_TIMER) { #if !SDL_TIMERS_DISABLED && !SDL_TIMER_DUMMY if (SDL_PrivateShouldInitSubsystem(SDL_INIT_TIMER)) { if (SDL_TimerInit() < 0) { @@ -247,7 +241,7 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the video subsystem */ - if ((flags & SDL_INIT_VIDEO)){ + if (flags & SDL_INIT_VIDEO) { #if !SDL_VIDEO_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_VIDEO)) { if (SDL_VideoInit(NULL) < 0) { @@ -263,7 +257,7 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the audio subsystem */ - if ((flags & SDL_INIT_AUDIO)){ + if (flags & SDL_INIT_AUDIO) { #if !SDL_AUDIO_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_AUDIO)) { if (SDL_AudioInit(NULL) < 0) { @@ -279,12 +273,12 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the joystick subsystem */ - if ((flags & SDL_INIT_JOYSTICK)){ + if (flags & SDL_INIT_JOYSTICK) { #if !SDL_JOYSTICK_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_JOYSTICK)) { - if (SDL_JoystickInit() < 0) { - goto quit_and_error; - } + if (SDL_JoystickInit() < 0) { + goto quit_and_error; + } } SDL_PrivateSubsystemRefCountIncr(SDL_INIT_JOYSTICK); flags_initialized |= SDL_INIT_JOYSTICK; @@ -294,7 +288,7 @@ SDL_InitSubSystem(Uint32 flags) #endif } - if ((flags & SDL_INIT_GAMECONTROLLER)){ + if (flags & SDL_INIT_GAMECONTROLLER) { #if !SDL_JOYSTICK_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_GAMECONTROLLER)) { if (SDL_GameControllerInit() < 0) { @@ -310,7 +304,7 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the haptic subsystem */ - if ((flags & SDL_INIT_HAPTIC)){ + if (flags & SDL_INIT_HAPTIC) { #if !SDL_HAPTIC_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_HAPTIC)) { if (SDL_HapticInit() < 0) { @@ -326,7 +320,7 @@ SDL_InitSubSystem(Uint32 flags) } /* Initialize the sensor subsystem */ - if ((flags & SDL_INIT_SENSOR)){ + if (flags & SDL_INIT_SENSOR) { #if !SDL_SENSOR_DISABLED if (SDL_PrivateShouldInitSubsystem(SDL_INIT_SENSOR)) { if (SDL_SensorInit() < 0) { @@ -341,23 +335,21 @@ SDL_InitSubSystem(Uint32 flags) #endif } - (void) flags_initialized; /* make static analysis happy, since this only gets used in error cases. */ + (void)flags_initialized; /* make static analysis happy, since this only gets used in error cases. */ - return (0); + return 0; quit_and_error: SDL_QuitSubSystem(flags_initialized); - return (-1); + return -1; } -int -SDL_Init(Uint32 flags) +int SDL_Init(Uint32 flags) { return SDL_InitSubSystem(flags); } -void -SDL_QuitSubSystem(Uint32 flags) +void SDL_QuitSubSystem(Uint32 flags) { #if defined(__OS2__) #if SDL_THREAD_OS2 @@ -368,7 +360,7 @@ SDL_QuitSubSystem(Uint32 flags) /* Shut down requested initialized subsystems */ #if !SDL_SENSOR_DISABLED - if ((flags & SDL_INIT_SENSOR)) { + if (flags & SDL_INIT_SENSOR) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_SENSOR)) { SDL_SensorQuit(); } @@ -377,7 +369,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_JOYSTICK_DISABLED - if ((flags & SDL_INIT_GAMECONTROLLER)) { + if (flags & SDL_INIT_GAMECONTROLLER) { /* game controller implies joystick */ flags |= SDL_INIT_JOYSTICK; @@ -387,7 +379,7 @@ SDL_QuitSubSystem(Uint32 flags) SDL_PrivateSubsystemRefCountDecr(SDL_INIT_GAMECONTROLLER); } - if ((flags & SDL_INIT_JOYSTICK)) { + if (flags & SDL_INIT_JOYSTICK) { /* joystick implies events */ flags |= SDL_INIT_EVENTS; @@ -399,7 +391,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_HAPTIC_DISABLED - if ((flags & SDL_INIT_HAPTIC)) { + if (flags & SDL_INIT_HAPTIC) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_HAPTIC)) { SDL_HapticQuit(); } @@ -408,7 +400,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_AUDIO_DISABLED - if ((flags & SDL_INIT_AUDIO)) { + if (flags & SDL_INIT_AUDIO) { /* audio implies events */ flags |= SDL_INIT_EVENTS; @@ -420,7 +412,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_VIDEO_DISABLED - if ((flags & SDL_INIT_VIDEO)) { + if (flags & SDL_INIT_VIDEO) { /* video implies events */ flags |= SDL_INIT_EVENTS; @@ -432,7 +424,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_TIMERS_DISABLED && !SDL_TIMER_DUMMY - if ((flags & SDL_INIT_TIMER)) { + if (flags & SDL_INIT_TIMER) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_TIMER)) { SDL_TimerQuit(); } @@ -441,7 +433,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif #if !SDL_EVENTS_DISABLED - if ((flags & SDL_INIT_EVENTS)) { + if (flags & SDL_INIT_EVENTS) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_EVENTS)) { SDL_EventsQuit(); } @@ -450,8 +442,7 @@ SDL_QuitSubSystem(Uint32 flags) #endif } -Uint32 -SDL_WasInit(Uint32 flags) +Uint32 SDL_WasInit(Uint32 flags) { int i; int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount); @@ -481,8 +472,7 @@ SDL_WasInit(Uint32 flags) return initialized; } -void -SDL_Quit(void) +void SDL_Quit(void) { SDL_bInMainQuit = SDL_TRUE; @@ -508,7 +498,7 @@ SDL_Quit(void) /* Now that every subsystem has been quit, we reset the subsystem refcount * and the list of initialized subsystems. */ - SDL_memset( SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount) ); + SDL_memset(SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount)); SDL_TLSCleanup(); @@ -516,13 +506,12 @@ SDL_Quit(void) } /* Get the library version number */ -void -SDL_GetVersion(SDL_version * ver) +void SDL_GetVersion(SDL_version *ver) { static SDL_bool check_hint = SDL_TRUE; static SDL_bool legacy_version = SDL_FALSE; - if (!ver) { + if (ver == NULL) { return; } @@ -541,22 +530,19 @@ SDL_GetVersion(SDL_version * ver) } /* Get the library source revision */ -const char * -SDL_GetRevision(void) +const char *SDL_GetRevision(void) { return SDL_REVISION; } /* Get the library source revision number */ -int -SDL_GetRevisionNumber(void) +int SDL_GetRevisionNumber(void) { return 0; /* doesn't make sense without Mercurial. */ } /* Get the name of the platform */ -const char * -SDL_GetPlatform(void) +const char *SDL_GetPlatform(void) { #if __AIX__ return "AIX"; @@ -629,8 +615,7 @@ SDL_GetPlatform(void) #endif } -SDL_bool -SDL_IsTablet(void) +SDL_bool SDL_IsTablet(void) { #if __ANDROID__ extern SDL_bool SDL_IsAndroidTablet(void); @@ -646,11 +631,9 @@ SDL_IsTablet(void) #if defined(__WIN32__) #if (!defined(HAVE_LIBC) || defined(__WATCOMC__)) && !defined(SDL_STATIC_LIB) -/* Need to include DllMain() on Watcom C for some reason.. */ +/* FIXME: Still need to include DllMain() on Watcom C ? */ -BOOL APIENTRY -_DllMainCRTStartup(HANDLE hModule, - DWORD ul_reason_for_call, LPVOID lpReserved) +BOOL APIENTRY MINGW32_FORCEALIGN _DllMainCRTStartup(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: diff --git a/modules/SDL2/src/SDL_assert.c b/modules/SDL2/src/SDL_assert.c index 35b0149..dc5a220 100644 --- a/modules/SDL2/src/SDL_assert.c +++ b/modules/SDL2/src/SDL_assert.c @@ -48,8 +48,7 @@ /* The size of the stack buffer to use for rendering assert messages. */ #define SDL_MAX_ASSERT_MESSAGE_STACK 256 -static SDL_assert_state SDLCALL -SDL_PromptAssertion(const SDL_assert_data *data, void *userdata); +static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, void *userdata); /* * We keep all triggered assertions in a singly-linked list so we can @@ -65,12 +64,10 @@ static SDL_AssertionHandler assertion_handler = SDL_PromptAssertion; static void *assertion_userdata = NULL; #ifdef __GNUC__ -static void -debug_print(const char *fmt, ...) __attribute__((format (printf, 1, 2))); +static void debug_print(const char *fmt, ...) __attribute__((format(printf, 1, 2))); #endif -static void -debug_print(const char *fmt, ...) +static void debug_print(const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -78,31 +75,30 @@ debug_print(const char *fmt, ...) va_end(ap); } - static void SDL_AddAssertionToReport(SDL_assert_data *data) { /* (data) is always a static struct defined with the assert macros, so we don't have to worry about copying or allocating them. */ data->trigger_count++; - if (data->trigger_count == 1) { /* not yet added? */ + if (data->trigger_count == 1) { /* not yet added? */ data->next = triggered_assertions; triggered_assertions = data; } } #if defined(__WIN32__) || defined(__GDK__) - #define ENDLINE "\r\n" +#define ENDLINE "\r\n" #else - #define ENDLINE "\n" +#define ENDLINE "\n" #endif -static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_assert_data *data) { +static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_assert_data *data) +{ return SDL_snprintf(buf, buf_len, - "Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE " '%s'", - data->function, data->filename, data->linenum, - data->trigger_count, (data->trigger_count == 1) ? "time" : "times", - data->condition - ); + "Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE " '%s'", + data->function, data->filename, data->linenum, + data->trigger_count, (data->trigger_count == 1) ? "time" : "times", + data->condition); } static void SDL_GenerateAssertionReport(void) @@ -132,7 +128,6 @@ static void SDL_GenerateAssertionReport(void) } } - /* This is not declared in any header, although it is shared between some parts of SDL, because we don't want anything calling it without an extremely good reason. */ @@ -142,9 +137,8 @@ extern void SDL_ExitProcess(int exitcode); #endif extern SDL_NORETURN void SDL_ExitProcess(int exitcode); - #if defined(__WATCOMC__) -static void SDL_AbortAssertion (void); +static void SDL_AbortAssertion(void); #pragma aux SDL_AbortAssertion aborts; #endif static SDL_NORETURN void SDL_AbortAssertion(void) @@ -153,21 +147,20 @@ static SDL_NORETURN void SDL_AbortAssertion(void) SDL_ExitProcess(42); } -static SDL_assert_state SDLCALL -SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) +static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) { const char *envr; SDL_assert_state state = SDL_ASSERTION_ABORT; SDL_Window *window; SDL_MessageBoxData messagebox; SDL_MessageBoxButtonData buttons[] = { - { 0, SDL_ASSERTION_RETRY, "Retry" }, - { 0, SDL_ASSERTION_BREAK, "Break" }, - { 0, SDL_ASSERTION_ABORT, "Abort" }, - { SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, - SDL_ASSERTION_IGNORE, "Ignore" }, - { SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, - SDL_ASSERTION_ALWAYS_IGNORE, "Always Ignore" } + { 0, SDL_ASSERTION_RETRY, "Retry" }, + { 0, SDL_ASSERTION_BREAK, "Break" }, + { 0, SDL_ASSERTION_ABORT, "Abort" }, + { SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, + SDL_ASSERTION_IGNORE, "Ignore" }, + { SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, + SDL_ASSERTION_ALWAYS_IGNORE, "Always Ignore" } }; int selected; @@ -176,7 +169,7 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) size_t buf_len = sizeof(stack_buf); int len; - (void) userdata; /* unused in default handler. */ + (void)userdata; /* unused in default handler. */ /* Assume the output will fit... */ len = SDL_RenderAssertMessage(message, buf_len, data); @@ -221,7 +214,7 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) } else if (SDL_strcmp(envr, "always_ignore") == 0) { return SDL_ASSERTION_ALWAYS_IGNORE; } else { - return SDL_ASSERTION_ABORT; /* oh well. */ + return SDL_ASSERTION_ABORT; /* oh well. */ } } @@ -252,14 +245,12 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) } else { state = (SDL_assert_state)selected; } - } - - else - { + } else { #if defined(__EMSCRIPTEN__) /* This is nasty, but we can't block on a custom UI. */ - for ( ; ; ) { + for (;;) { SDL_bool okay = SDL_TRUE; + /* *INDENT-OFF* */ /* clang-format off */ char *buf = (char *) EM_ASM_INT({ var str = UTF8ToString($0) + '\n\n' + @@ -270,12 +261,14 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) } return allocate(intArrayFromString(reply), 'i8', ALLOC_NORMAL); }, message); + /* *INDENT-ON* */ /* clang-format on */ if (SDL_strcmp(buf, "a") == 0) { state = SDL_ASSERTION_ABORT; - /* (currently) no break functionality on Emscripten +#if 0 /* (currently) no break functionality on Emscripten */ } else if (SDL_strcmp(buf, "b") == 0) { - state = SDL_ASSERTION_BREAK; */ + state = SDL_ASSERTION_BREAK; +#endif } else if (SDL_strcmp(buf, "r") == 0) { state = SDL_ASSERTION_RETRY; } else if (SDL_strcmp(buf, "i") == 0) { @@ -293,11 +286,11 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) } #elif defined(HAVE_STDIO_H) /* this is a little hacky. */ - for ( ; ; ) { + for (;;) { char buf[32]; - fprintf(stderr, "Abort/Break/Retry/Ignore/AlwaysIgnore? [abriA] : "); - fflush(stderr); - if (fgets(buf, sizeof (buf), stdin) == NULL) { + (void)fprintf(stderr, "Abort/Break/Retry/Ignore/AlwaysIgnore? [abriA] : "); + (void)fflush(stderr); + if (fgets(buf, sizeof(buf), stdin) == NULL) { break; } @@ -333,10 +326,7 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata) return state; } - -SDL_assert_state -SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, - int line) +SDL_assert_state SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, int line) { SDL_assert_state state = SDL_ASSERTION_IGNORE; static int assertion_running = 0; @@ -348,15 +338,13 @@ SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, assertion_mutex = SDL_CreateMutex(); if (assertion_mutex == NULL) { SDL_AtomicUnlock(&spinlock); - return SDL_ASSERTION_IGNORE; /* oh well, I guess. */ + return SDL_ASSERTION_IGNORE; /* oh well, I guess. */ } } SDL_AtomicUnlock(&spinlock); - if (SDL_LockMutex(assertion_mutex) < 0) { - return SDL_ASSERTION_IGNORE; /* oh well, I guess. */ - } -#endif + SDL_LockMutex(assertion_mutex); +#endif /* !SDL_THREADS_DISABLED */ /* doing this because Visual C is upset over assigning in the macro. */ if (data->trigger_count == 0) { @@ -368,13 +356,14 @@ SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, SDL_AddAssertionToReport(data); assertion_running++; - if (assertion_running > 1) { /* assert during assert! Abort. */ + if (assertion_running > 1) { /* assert during assert! Abort. */ if (assertion_running == 2) { SDL_AbortAssertion(); - } else if (assertion_running == 3) { /* Abort asserted! */ + } else if (assertion_running == 3) { /* Abort asserted! */ SDL_ExitProcess(42); } else { - while (1) { /* do nothing but spin; what else can you do?! */ } + while (1) { /* do nothing but spin; what else can you do?! */ + } } } @@ -382,21 +371,20 @@ SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, state = assertion_handler(data, assertion_userdata); } - switch (state) - { - case SDL_ASSERTION_ALWAYS_IGNORE: - state = SDL_ASSERTION_IGNORE; - data->always_ignore = 1; - break; + switch (state) { + case SDL_ASSERTION_ALWAYS_IGNORE: + state = SDL_ASSERTION_IGNORE; + data->always_ignore = 1; + break; - case SDL_ASSERTION_IGNORE: - case SDL_ASSERTION_RETRY: - case SDL_ASSERTION_BREAK: - break; /* macro handles these. */ + case SDL_ASSERTION_IGNORE: + case SDL_ASSERTION_RETRY: + case SDL_ASSERTION_BREAK: + break; /* macro handles these. */ - case SDL_ASSERTION_ABORT: - SDL_AbortAssertion(); - /*break; ...shouldn't return, but oh well. */ + case SDL_ASSERTION_ABORT: + SDL_AbortAssertion(); + /*break; ...shouldn't return, but oh well. */ } assertion_running--; @@ -408,7 +396,6 @@ SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, return state; } - void SDL_AssertionsQuit(void) { #if SDL_ASSERT_LEVEL > 0 @@ -443,7 +430,7 @@ void SDL_ResetAssertionReport(void) SDL_assert_data *next = NULL; SDL_assert_data *item; for (item = triggered_assertions; item != NULL; item = next) { - next = (SDL_assert_data *) item->next; + next = (SDL_assert_data *)item->next; item->always_ignore = SDL_FALSE; item->trigger_count = 0; item->next = NULL; diff --git a/modules/SDL2/src/SDL_dataqueue.c b/modules/SDL2/src/SDL_dataqueue.c index daa8e26..2019c30 100644 --- a/modules/SDL2/src/SDL_dataqueue.c +++ b/modules/SDL2/src/SDL_dataqueue.c @@ -25,23 +25,23 @@ typedef struct SDL_DataQueuePacket { - size_t datalen; /* bytes currently in use in this packet. */ - size_t startpos; /* bytes currently consumed in this packet. */ - struct SDL_DataQueuePacket *next; /* next item in linked list. */ - Uint8 data[SDL_VARIABLE_LENGTH_ARRAY]; /* packet data */ + size_t datalen; /* bytes currently in use in this packet. */ + size_t startpos; /* bytes currently consumed in this packet. */ + struct SDL_DataQueuePacket *next; /* next item in linked list. */ + Uint8 data[SDL_VARIABLE_LENGTH_ARRAY]; /* packet data */ } SDL_DataQueuePacket; struct SDL_DataQueue { + SDL_mutex *lock; SDL_DataQueuePacket *head; /* device fed from here. */ SDL_DataQueuePacket *tail; /* queue fills to here. */ SDL_DataQueuePacket *pool; /* these are unused packets. */ - size_t packet_size; /* size of new packets */ - size_t queued_bytes; /* number of bytes of data in the queue. */ + size_t packet_size; /* size of new packets */ + size_t queued_bytes; /* number of bytes of data in the queue. */ }; -static void -SDL_FreeDataQueueList(SDL_DataQueuePacket *packet) +static void SDL_FreeDataQueueList(SDL_DataQueuePacket *packet) { while (packet) { SDL_DataQueuePacket *next = packet->next; @@ -50,27 +50,27 @@ SDL_FreeDataQueueList(SDL_DataQueuePacket *packet) } } - -/* this all expects that you managed thread safety elsewhere. */ - -SDL_DataQueue * -SDL_NewDataQueue(const size_t _packetlen, const size_t initialslack) +SDL_DataQueue *SDL_NewDataQueue(const size_t _packetlen, const size_t initialslack) { - SDL_DataQueue *queue = (SDL_DataQueue *) SDL_malloc(sizeof (SDL_DataQueue)); + SDL_DataQueue *queue = (SDL_DataQueue *)SDL_calloc(1, sizeof(SDL_DataQueue)); - if (!queue) { + if (queue == NULL) { SDL_OutOfMemory(); - return NULL; } else { const size_t packetlen = _packetlen ? _packetlen : 1024; const size_t wantpackets = (initialslack + (packetlen - 1)) / packetlen; size_t i; - SDL_zerop(queue); queue->packet_size = packetlen; + queue->lock = SDL_CreateMutex(); + if (!queue->lock) { + SDL_free(queue); + return NULL; + } + for (i = 0; i < wantpackets; i++) { - SDL_DataQueuePacket *packet = (SDL_DataQueuePacket *) SDL_malloc(sizeof (SDL_DataQueuePacket) + packetlen); + SDL_DataQueuePacket *packet = (SDL_DataQueuePacket *)SDL_malloc(sizeof(SDL_DataQueuePacket) + packetlen); if (packet) { /* don't care if this fails, we'll deal later. */ packet->datalen = 0; packet->startpos = 0; @@ -83,29 +83,30 @@ SDL_NewDataQueue(const size_t _packetlen, const size_t initialslack) return queue; } -void -SDL_FreeDataQueue(SDL_DataQueue *queue) +void SDL_FreeDataQueue(SDL_DataQueue *queue) { if (queue) { SDL_FreeDataQueueList(queue->head); SDL_FreeDataQueueList(queue->pool); + SDL_DestroyMutex(queue->lock); SDL_free(queue); } } -void -SDL_ClearDataQueue(SDL_DataQueue *queue, const size_t slack) +void SDL_ClearDataQueue(SDL_DataQueue *queue, const size_t slack) { const size_t packet_size = queue ? queue->packet_size : 1; - const size_t slackpackets = (slack + (packet_size-1)) / packet_size; + const size_t slackpackets = (slack + (packet_size - 1)) / packet_size; SDL_DataQueuePacket *packet; SDL_DataQueuePacket *prev = NULL; size_t i; - if (!queue) { + if (queue == NULL) { return; } + SDL_LockMutex(queue->lock); + packet = queue->head; /* merge the available pool and the current queue into one list. */ @@ -133,11 +134,13 @@ SDL_ClearDataQueue(SDL_DataQueue *queue, const size_t slack) queue->pool = NULL; } - SDL_FreeDataQueueList(packet); /* free extra packets */ + SDL_UnlockMutex(queue->lock); + + SDL_FreeDataQueueList(packet); /* free extra packets */ } -static SDL_DataQueuePacket * -AllocateDataQueuePacket(SDL_DataQueue *queue) +/* You must hold queue->lock before calling this! */ +static SDL_DataQueuePacket *AllocateDataQueuePacket(SDL_DataQueue *queue) { SDL_DataQueuePacket *packet; @@ -149,7 +152,7 @@ AllocateDataQueuePacket(SDL_DataQueue *queue) queue->pool = packet->next; } else { /* Have to allocate a new one! */ - packet = (SDL_DataQueuePacket *) SDL_malloc(sizeof (SDL_DataQueuePacket) + queue->packet_size); + packet = (SDL_DataQueuePacket *)SDL_malloc(sizeof(SDL_DataQueuePacket) + queue->packet_size); if (packet == NULL) { return NULL; } @@ -158,7 +161,7 @@ AllocateDataQueuePacket(SDL_DataQueue *queue) packet->datalen = 0; packet->startpos = 0; packet->next = NULL; - + SDL_assert((queue->head != NULL) == (queue->queued_bytes != 0)); if (queue->tail == NULL) { queue->head = packet; @@ -169,38 +172,38 @@ AllocateDataQueuePacket(SDL_DataQueue *queue) return packet; } - -int -SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *_data, const size_t _len) +int SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *_data, const size_t _len) { size_t len = _len; - const Uint8 *data = (const Uint8 *) _data; + const Uint8 *data = (const Uint8 *)_data; const size_t packet_size = queue ? queue->packet_size : 0; SDL_DataQueuePacket *orighead; SDL_DataQueuePacket *origtail; size_t origlen; size_t datalen; - if (!queue) { + if (queue == NULL) { return SDL_InvalidParamError("queue"); } + SDL_LockMutex(queue->lock); + orighead = queue->head; origtail = queue->tail; origlen = origtail ? origtail->datalen : 0; while (len > 0) { SDL_DataQueuePacket *packet = queue->tail; - SDL_assert(!packet || (packet->datalen <= packet_size)); - if (!packet || (packet->datalen >= packet_size)) { + SDL_assert(packet == NULL || (packet->datalen <= packet_size)); + if (packet == NULL || (packet->datalen >= packet_size)) { /* tail packet missing or completely full; we need a new packet. */ packet = AllocateDataQueuePacket(queue); - if (!packet) { + if (packet == NULL) { /* uhoh, reset so we've queued nothing new, free what we can. */ - if (!origtail) { - packet = queue->head; /* whole queue. */ + if (origtail == NULL) { + packet = queue->head; /* whole queue. */ } else { - packet = origtail->next; /* what we added to existing queue. */ + packet = origtail->next; /* what we added to existing queue. */ origtail->next = NULL; origtail->datalen = origlen; } @@ -208,7 +211,8 @@ SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *_data, const size_t _len) queue->tail = origtail; queue->pool = NULL; - SDL_FreeDataQueueList(packet); /* give back what we can. */ + SDL_UnlockMutex(queue->lock); + SDL_FreeDataQueueList(packet); /* give back what we can. */ return SDL_OutOfMemory(); } } @@ -221,6 +225,8 @@ SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *_data, const size_t _len) queue->queued_bytes += datalen; } + SDL_UnlockMutex(queue->lock); + return 0; } @@ -228,14 +234,16 @@ size_t SDL_PeekIntoDataQueue(SDL_DataQueue *queue, void *_buf, const size_t _len) { size_t len = _len; - Uint8 *buf = (Uint8 *) _buf; + Uint8 *buf = (Uint8 *)_buf; Uint8 *ptr = buf; SDL_DataQueuePacket *packet; - if (!queue) { + if (queue == NULL) { return 0; } + SDL_LockMutex(queue->lock); + for (packet = queue->head; len && packet; packet = packet->next) { const size_t avail = packet->datalen - packet->startpos; const size_t cpy = SDL_min(len, avail); @@ -246,21 +254,25 @@ SDL_PeekIntoDataQueue(SDL_DataQueue *queue, void *_buf, const size_t _len) len -= cpy; } - return (size_t) (ptr - buf); + SDL_UnlockMutex(queue->lock); + + return (size_t)(ptr - buf); } size_t SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *_buf, const size_t _len) { size_t len = _len; - Uint8 *buf = (Uint8 *) _buf; + Uint8 *buf = (Uint8 *)_buf; Uint8 *ptr = buf; SDL_DataQueuePacket *packet; - if (!queue) { + if (queue == NULL) { return 0; } + SDL_LockMutex(queue->lock); + while ((len > 0) && ((packet = queue->head) != NULL)) { const size_t avail = packet->datalen - packet->startpos; const size_t cpy = SDL_min(len, avail); @@ -272,7 +284,7 @@ SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *_buf, const size_t _len) queue->queued_bytes -= cpy; len -= cpy; - if (packet->startpos == packet->datalen) { /* packet is done, put it in the pool. */ + if (packet->startpos == packet->datalen) { /* packet is done, put it in the pool. */ queue->head = packet->next; SDL_assert((packet->next != NULL) || (packet == queue->tail)); packet->next = queue->pool; @@ -283,56 +295,29 @@ SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *_buf, const size_t _len) SDL_assert((queue->head != NULL) == (queue->queued_bytes != 0)); if (queue->head == NULL) { - queue->tail = NULL; /* in case we drained the queue entirely. */ + queue->tail = NULL; /* in case we drained the queue entirely. */ } - return (size_t) (ptr - buf); + SDL_UnlockMutex(queue->lock); + + return (size_t)(ptr - buf); } size_t SDL_CountDataQueue(SDL_DataQueue *queue) { - return queue ? queue->queued_bytes : 0; + size_t retval = 0; + if (queue) { + SDL_LockMutex(queue->lock); + retval = queue->queued_bytes; + SDL_UnlockMutex(queue->lock); + } + return retval; } -void * -SDL_ReserveSpaceInDataQueue(SDL_DataQueue *queue, const size_t len) +SDL_mutex *SDL_GetDataQueueMutex(SDL_DataQueue *queue) { - SDL_DataQueuePacket *packet; - - if (!queue) { - SDL_InvalidParamError("queue"); - return NULL; - } else if (len == 0) { - SDL_InvalidParamError("len"); - return NULL; - } else if (len > queue->packet_size) { - SDL_SetError("len is larger than packet size"); - return NULL; - } - - packet = queue->head; - if (packet) { - const size_t avail = queue->packet_size - packet->datalen; - if (len <= avail) { /* we can use the space at end of this packet. */ - void *retval = packet->data + packet->datalen; - packet->datalen += len; - queue->queued_bytes += len; - return retval; - } - } - - /* Need a fresh packet. */ - packet = AllocateDataQueuePacket(queue); - if (!packet) { - SDL_OutOfMemory(); - return NULL; - } - - packet->datalen = len; - queue->queued_bytes += len; - return packet->data; + return queue ? queue->lock : NULL; } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/SDL_dataqueue.h b/modules/SDL2/src/SDL_dataqueue.h index a88b10f..aee2cda 100644 --- a/modules/SDL2/src/SDL_dataqueue.h +++ b/modules/SDL2/src/SDL_dataqueue.h @@ -33,23 +33,8 @@ int SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *data, const size_t le size_t SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *buf, const size_t len); size_t SDL_PeekIntoDataQueue(SDL_DataQueue *queue, void *buf, const size_t len); size_t SDL_CountDataQueue(SDL_DataQueue *queue); - -/* this sets a section of the data queue aside (possibly allocating memory for it) - as if it's been written to, but returns a pointer to that space. You may write - to this space until a read would consume it. Writes (and other calls to this - function) will safely append their data after this reserved space and can - be in flight at the same time. There is no thread safety. - If there isn't an existing block of memory that can contain the reserved - space, one will be allocated for it. You can not (currently) allocate - a space larger than the packetlen requested in SDL_NewDataQueue. - Returned buffer is uninitialized. - This lets you avoid an extra copy in some cases, but it's safer to use - SDL_WriteToDataQueue() unless you know what you're doing. - Returns pointer to buffer of at least (len) bytes, NULL on error. -*/ -void *SDL_ReserveSpaceInDataQueue(SDL_DataQueue *queue, const size_t len); +SDL_mutex *SDL_GetDataQueueMutex(SDL_DataQueue *queue); /* don't destroy this, obviously. */ #endif /* SDL_dataqueue_h_ */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/SDL_error.c b/modules/SDL2/src/SDL_error.c index 054c58f..501d395 100644 --- a/modules/SDL2/src/SDL_error.c +++ b/modules/SDL2/src/SDL_error.c @@ -25,8 +25,7 @@ #include "SDL_error.h" #include "SDL_error_c.h" -int -SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +int SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { /* Ignore call if invalid format pointer was passed */ if (fmt != NULL) { @@ -34,7 +33,7 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) int result; SDL_error *error = SDL_GetErrBuf(); - error->error = 1; /* mark error as valid */ + error->error = 1; /* mark error as valid */ va_start(ap, fmt); result = SDL_vsnprintf(error->str, error->len, fmt, ap); @@ -47,12 +46,11 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) error->str = str; error->len = len; va_start(ap, fmt); - SDL_vsnprintf(error->str, error->len, fmt, ap); + (void)SDL_vsnprintf(error->str, error->len, fmt, ap); va_end(ap); } } - if (SDL_LogGetPriority(SDL_LOG_CATEGORY_ERROR) <= SDL_LOG_PRIORITY_DEBUG) { /* If we are in debug mode, print out the error message */ SDL_LogDebug(SDL_LOG_CATEGORY_ERROR, "%s", error->str); @@ -63,22 +61,19 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) } /* Available for backwards compatibility */ -const char * -SDL_GetError(void) +const char *SDL_GetError(void) { const SDL_error *error = SDL_GetErrBuf(); return error->error ? error->str : ""; } -void -SDL_ClearError(void) +void SDL_ClearError(void) { SDL_GetErrBuf()->error = 0; } /* Very common errors go here */ -int -SDL_Error(SDL_errorcode code) +int SDL_Error(SDL_errorcode code) { switch (code) { case SDL_ENOMEM: @@ -97,8 +92,7 @@ SDL_Error(SDL_errorcode code) } #ifdef TEST_ERROR -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { char buffer[BUFSIZ + 1]; @@ -113,9 +107,7 @@ main(int argc, char *argv[]) } #endif - -char * -SDL_GetErrorMsg(char *errstr, int maxlen) +char *SDL_GetErrorMsg(char *errstr, int maxlen) { const SDL_error *error = SDL_GetErrBuf(); diff --git a/modules/SDL2/src/SDL_guid.c b/modules/SDL2/src/SDL_guid.c index bfbb8a1..f8c4c60 100644 --- a/modules/SDL2/src/SDL_guid.c +++ b/modules/SDL2/src/SDL_guid.c @@ -33,7 +33,7 @@ void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID) return; } - for (i = 0; i < sizeof(guid.data) && i < (cbGUID-1)/2; i++) { + for (i = 0; i < sizeof(guid.data) && i < (cbGUID - 1) / 2; i++) { /* each input byte writes 2 ascii chars, and might write a null byte. */ /* If we don't have room for next input byte, stop */ unsigned char c = guid.data[i]; @@ -52,15 +52,15 @@ void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID) static unsigned char nibble(unsigned char c) { if ((c >= '0') && (c <= '9')) { - return (c - '0'); + return c - '0'; } if ((c >= 'A') && (c <= 'F')) { - return (c - 'A' + 0x0a); + return c - 'A' + 0x0a; } if ((c >= 'a') && (c <= 'f')) { - return (c - 'a' + 0x0a); + return c - 'a' + 0x0a; } /* received an invalid character, and no real way to return an error */ @@ -72,7 +72,7 @@ static unsigned char nibble(unsigned char c) SDL_GUID SDL_GUIDFromString(const char *pchGUID) { SDL_GUID guid; - int maxoutputbytes= sizeof(guid); + int maxoutputbytes = sizeof(guid); size_t len = SDL_strlen(pchGUID); Uint8 *p; size_t i; @@ -83,8 +83,8 @@ SDL_GUID SDL_GUIDFromString(const char *pchGUID) SDL_memset(&guid, 0x00, sizeof(guid)); p = (Uint8 *)&guid; - for (i = 0; (i < len) && ((p - (Uint8 *)&guid) < maxoutputbytes); i+=2, p++) { - *p = (nibble((unsigned char)pchGUID[i]) << 4) | nibble((unsigned char)pchGUID[i+1]); + for (i = 0; (i < len) && ((p - (Uint8 *)&guid) < maxoutputbytes); i += 2, p++) { + *p = (nibble((unsigned char)pchGUID[i]) << 4) | nibble((unsigned char)pchGUID[i + 1]); } return guid; diff --git a/modules/SDL2/src/SDL_hints.c b/modules/SDL2/src/SDL_hints.c index c45812a..ceec0d5 100644 --- a/modules/SDL2/src/SDL_hints.c +++ b/modules/SDL2/src/SDL_hints.c @@ -24,17 +24,18 @@ #include "SDL_error.h" #include "SDL_hints_c.h" - /* Assuming there aren't many hints set and they aren't being queried in critical performance paths, we'll just use linked lists here. */ -typedef struct SDL_HintWatch { +typedef struct SDL_HintWatch +{ SDL_HintCallback callback; void *userdata; struct SDL_HintWatch *next; } SDL_HintWatch; -typedef struct SDL_Hint { +typedef struct SDL_Hint +{ char *name; char *value; SDL_HintPriority priority; @@ -44,15 +45,13 @@ typedef struct SDL_Hint { static SDL_Hint *SDL_hints; -SDL_bool -SDL_SetHintWithPriority(const char *name, const char *value, - SDL_HintPriority priority) +SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority) { const char *env; SDL_Hint *hint; SDL_HintWatch *entry; - if (!name) { + if (name == NULL) { return SDL_FALSE; } @@ -67,8 +66,8 @@ SDL_SetHintWithPriority(const char *name, const char *value, return SDL_FALSE; } if (hint->value != value && - (!value || !hint->value || SDL_strcmp(hint->value, value) != 0)) { - for (entry = hint->callbacks; entry; ) { + (value == NULL || !hint->value || SDL_strcmp(hint->value, value) != 0)) { + for (entry = hint->callbacks; entry;) { /* Save the next entry in case this one is deleted */ SDL_HintWatch *next = entry->next; entry->callback(entry->userdata, name, hint->value, value); @@ -84,7 +83,7 @@ SDL_SetHintWithPriority(const char *name, const char *value, /* Couldn't find the hint, add a new one */ hint = (SDL_Hint *)SDL_malloc(sizeof(*hint)); - if (!hint) { + if (hint == NULL) { return SDL_FALSE; } hint->name = SDL_strdup(name); @@ -96,14 +95,13 @@ SDL_SetHintWithPriority(const char *name, const char *value, return SDL_TRUE; } -SDL_bool -SDL_ResetHint(const char *name) +SDL_bool SDL_ResetHint(const char *name) { const char *env; SDL_Hint *hint; SDL_HintWatch *entry; - if (!name) { + if (name == NULL) { return SDL_FALSE; } @@ -113,7 +111,7 @@ SDL_ResetHint(const char *name) if ((env == NULL && hint->value != NULL) || (env != NULL && hint->value == NULL) || (env != NULL && SDL_strcmp(env, hint->value) != 0)) { - for (entry = hint->callbacks; entry; ) { + for (entry = hint->callbacks; entry;) { /* Save the next entry in case this one is deleted */ SDL_HintWatch *next = entry->next; entry->callback(entry->userdata, name, hint->value, env); @@ -129,8 +127,7 @@ SDL_ResetHint(const char *name) return SDL_FALSE; } -void -SDL_ResetHints(void) +void SDL_ResetHints(void) { const char *env; SDL_Hint *hint; @@ -141,7 +138,7 @@ SDL_ResetHints(void) if ((env == NULL && hint->value != NULL) || (env != NULL && hint->value == NULL) || (env != NULL && SDL_strcmp(env, hint->value) != 0)) { - for (entry = hint->callbacks; entry; ) { + for (entry = hint->callbacks; entry;) { /* Save the next entry in case this one is deleted */ SDL_HintWatch *next = entry->next; entry->callback(entry->userdata, hint->name, hint->value, env); @@ -154,14 +151,12 @@ SDL_ResetHints(void) } } -SDL_bool -SDL_SetHint(const char *name, const char *value) +SDL_bool SDL_SetHint(const char *name, const char *value) { return SDL_SetHintWithPriority(name, value, SDL_HINT_NORMAL); } -const char * -SDL_GetHint(const char *name) +const char *SDL_GetHint(const char *name) { const char *env; SDL_Hint *hint; @@ -178,10 +173,9 @@ SDL_GetHint(const char *name) return env; } -SDL_bool -SDL_GetStringBoolean(const char *value, SDL_bool default_value) +SDL_bool SDL_GetStringBoolean(const char *value, SDL_bool default_value) { - if (!value || !*value) { + if (value == NULL || !*value) { return default_value; } if (*value == '0' || SDL_strcasecmp(value, "false") == 0) { @@ -190,21 +184,19 @@ SDL_GetStringBoolean(const char *value, SDL_bool default_value) return SDL_TRUE; } -SDL_bool -SDL_GetHintBoolean(const char *name, SDL_bool default_value) +SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value) { const char *hint = SDL_GetHint(name); return SDL_GetStringBoolean(hint, default_value); } -void -SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata) +void SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata) { SDL_Hint *hint; SDL_HintWatch *entry; const char *value; - if (!name || !*name) { + if (name == NULL || !*name) { SDL_InvalidParamError("name"); return; } @@ -216,7 +208,7 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata) SDL_DelHintCallback(name, callback, userdata); entry = (SDL_HintWatch *)SDL_malloc(sizeof(*entry)); - if (!entry) { + if (entry == NULL) { SDL_OutOfMemory(); return; } @@ -228,10 +220,10 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata) break; } } - if (!hint) { + if (hint == NULL) { /* Need to add a hint entry for this watcher */ hint = (SDL_Hint *)SDL_malloc(sizeof(*hint)); - if (!hint) { + if (hint == NULL) { SDL_OutOfMemory(); SDL_free(entry); return; @@ -259,8 +251,7 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata) callback(userdata, name, value, value); } -void -SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata) +void SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata) { SDL_Hint *hint; SDL_HintWatch *entry, *prev; @@ -296,7 +287,7 @@ void SDL_ClearHints(void) SDL_free(hint->name); SDL_free(hint->value); - for (entry = hint->callbacks; entry; ) { + for (entry = hint->callbacks; entry;) { SDL_HintWatch *freeable = entry; entry = entry->next; SDL_free(freeable); diff --git a/modules/SDL2/src/SDL_internal.h b/modules/SDL2/src/SDL_internal.h index 8fa6291..2514eed 100644 --- a/modules/SDL2/src/SDL_internal.h +++ b/modules/SDL2/src/SDL_internal.h @@ -35,9 +35,14 @@ #define SDL_VARIABLE_LENGTH_ARRAY #endif -#define SDL_MAX_SMALL_ALLOC_STACKSIZE 128 -#define SDL_small_alloc(type, count, pisstack) ( (*(pisstack) = ((sizeof(type)*(count)) < SDL_MAX_SMALL_ALLOC_STACKSIZE)), (*(pisstack) ? SDL_stack_alloc(type, count) : (type*)SDL_malloc(sizeof(type)*(count))) ) -#define SDL_small_free(ptr, isstack) if ((isstack)) { SDL_stack_free(ptr); } else { SDL_free(ptr); } +#define SDL_MAX_SMALL_ALLOC_STACKSIZE 128 +#define SDL_small_alloc(type, count, pisstack) ((*(pisstack) = ((sizeof(type) * (count)) < SDL_MAX_SMALL_ALLOC_STACKSIZE)), (*(pisstack) ? SDL_stack_alloc(type, count) : (type *)SDL_malloc(sizeof(type) * (count)))) +#define SDL_small_free(ptr, isstack) \ + if ((isstack)) { \ + SDL_stack_free(ptr); \ + } else { \ + SDL_free(ptr); \ + } #include "dynapi/SDL_dynapi.h" @@ -52,57 +57,57 @@ /* If you run into a warning that O_CLOEXEC is redefined, update the SDL configuration header for your platform to add HAVE_O_CLOEXEC */ #ifndef HAVE_O_CLOEXEC -#define O_CLOEXEC 0 +#define O_CLOEXEC 0 #endif /* A few #defines to reduce SDL2 footprint. Only effective when library is statically linked. You have to manually edit this file. */ #ifndef SDL_LEAN_AND_MEAN -#define SDL_LEAN_AND_MEAN 0 +#define SDL_LEAN_AND_MEAN 0 #endif /* Optimized functions from 'SDL_blit_0.c' - blit with source BitsPerPixel < 8, palette */ #ifndef SDL_HAVE_BLIT_0 -#define SDL_HAVE_BLIT_0 !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_0 !SDL_LEAN_AND_MEAN #endif /* Optimized functions from 'SDL_blit_1.c' - blit with source BytesPerPixel == 1, palette */ #ifndef SDL_HAVE_BLIT_1 -#define SDL_HAVE_BLIT_1 !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_1 !SDL_LEAN_AND_MEAN #endif /* Optimized functions from 'SDL_blit_A.c' - blit with 'SDL_BLENDMODE_BLEND' blending mode */ #ifndef SDL_HAVE_BLIT_A -#define SDL_HAVE_BLIT_A !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_A !SDL_LEAN_AND_MEAN #endif /* Optimized functions from 'SDL_blit_N.c' - blit with COLORKEY mode, or nothing */ #ifndef SDL_HAVE_BLIT_N -#define SDL_HAVE_BLIT_N !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_N !SDL_LEAN_AND_MEAN #endif /* Optimized functions from 'SDL_blit_N.c' - RGB565 conversion with Lookup tables */ #ifndef SDL_HAVE_BLIT_N_RGB565 -#define SDL_HAVE_BLIT_N_RGB565 !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_N_RGB565 !SDL_LEAN_AND_MEAN #endif /* Optimized functions from 'SDL_blit_AUTO.c' - blit with modulate color, modulate alpha, any blending mode - scaling or not */ #ifndef SDL_HAVE_BLIT_AUTO -#define SDL_HAVE_BLIT_AUTO !SDL_LEAN_AND_MEAN +#define SDL_HAVE_BLIT_AUTO !SDL_LEAN_AND_MEAN #endif /* Run-Length-Encoding - SDL_SetColorKey() called with SDL_RLEACCEL flag */ #ifndef SDL_HAVE_RLE -#define SDL_HAVE_RLE !SDL_LEAN_AND_MEAN +#define SDL_HAVE_RLE !SDL_LEAN_AND_MEAN #endif /* Software SDL_Renderer @@ -110,14 +115,14 @@ - *not* general blitting functions - {blend,draw}{fillrect,line,point} internal functions */ #ifndef SDL_VIDEO_RENDER_SW -#define SDL_VIDEO_RENDER_SW !SDL_LEAN_AND_MEAN +#define SDL_VIDEO_RENDER_SW !SDL_LEAN_AND_MEAN #endif /* YUV formats - handling of YUV surfaces - blitting and conversion functions */ #ifndef SDL_HAVE_YUV -#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN +#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN #endif #include "SDL_assert.h" diff --git a/modules/SDL2/src/SDL_list.c b/modules/SDL2/src/SDL_list.c index bff6d42..b089196 100644 --- a/modules/SDL2/src/SDL_list.c +++ b/modules/SDL2/src/SDL_list.c @@ -24,10 +24,9 @@ #include "./SDL_list.h" /* Push */ -int -SDL_ListAdd(SDL_ListNode **head, void *ent) +int SDL_ListAdd(SDL_ListNode **head, void *ent) { - SDL_ListNode *node = SDL_malloc(sizeof (*node)); + SDL_ListNode *node = SDL_malloc(sizeof(*node)); if (node == NULL) { return SDL_OutOfMemory(); @@ -40,8 +39,7 @@ SDL_ListAdd(SDL_ListNode **head, void *ent) } /* Pop from end as a FIFO (if add with SDL_ListAdd) */ -void -SDL_ListPop(SDL_ListNode **head, void **ent) +void SDL_ListPop(SDL_ListNode **head, void **ent) { SDL_ListNode **ptr = head; @@ -55,15 +53,14 @@ SDL_ListPop(SDL_ListNode **head, void **ent) } if (ent) { - *ent = (*ptr)->entry; + *ent = (*ptr)->entry; } SDL_free(*ptr); *ptr = NULL; } -void -SDL_ListRemove(SDL_ListNode **head, void *ent) +void SDL_ListRemove(SDL_ListNode **head, void *ent) { SDL_ListNode **ptr = head; @@ -78,8 +75,7 @@ SDL_ListRemove(SDL_ListNode **head, void *ent) } } -void -SDL_ListClear(SDL_ListNode **head) +void SDL_ListClear(SDL_ListNode **head) { SDL_ListNode *l = *head; *head = NULL; diff --git a/modules/SDL2/src/SDL_list.h b/modules/SDL2/src/SDL_list.h index bc1cd3e..f1ee7ff 100644 --- a/modules/SDL2/src/SDL_list.h +++ b/modules/SDL2/src/SDL_list.h @@ -28,7 +28,6 @@ typedef struct SDL_ListNode struct SDL_ListNode *next; } SDL_ListNode; - int SDL_ListAdd(SDL_ListNode **head, void *ent); void SDL_ListPop(SDL_ListNode **head, void **ent); void SDL_ListRemove(SDL_ListNode **head, void *ent); diff --git a/modules/SDL2/src/SDL_log.c b/modules/SDL2/src/SDL_log.c index f710dd8..ab6e7c2 100644 --- a/modules/SDL2/src/SDL_log.c +++ b/modules/SDL2/src/SDL_log.c @@ -41,14 +41,13 @@ #include "stdlib/SDL_vacopy.h" - /* The size of the stack buffer to use for rendering log messages. */ #define SDL_MAX_LOG_MESSAGE_STACK 256 -#define DEFAULT_PRIORITY SDL_LOG_PRIORITY_CRITICAL -#define DEFAULT_ASSERT_PRIORITY SDL_LOG_PRIORITY_WARN -#define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO -#define DEFAULT_TEST_PRIORITY SDL_LOG_PRIORITY_VERBOSE +#define DEFAULT_PRIORITY SDL_LOG_PRIORITY_CRITICAL +#define DEFAULT_ASSERT_PRIORITY SDL_LOG_PRIORITY_WARN +#define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO +#define DEFAULT_TEST_PRIORITY SDL_LOG_PRIORITY_VERBOSE typedef struct SDL_LogLevel { @@ -105,17 +104,15 @@ static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = { }; #endif /* __ANDROID__ */ -void -SDL_LogInit(void) +void SDL_LogInit(void) { - if (!log_function_mutex) { + if (log_function_mutex == NULL) { /* if this fails we'll try to continue without it. */ log_function_mutex = SDL_CreateMutex(); } } -void -SDL_LogQuit(void) +void SDL_LogQuit(void) { SDL_LogResetPriorities(); if (log_function_mutex) { @@ -124,8 +121,7 @@ SDL_LogQuit(void) } } -void -SDL_LogSetAllPriority(SDL_LogPriority priority) +void SDL_LogSetAllPriority(SDL_LogPriority priority) { SDL_LogLevel *entry; @@ -137,8 +133,7 @@ SDL_LogSetAllPriority(SDL_LogPriority priority) SDL_application_priority = priority; } -void -SDL_LogSetPriority(int category, SDL_LogPriority priority) +void SDL_LogSetPriority(int category, SDL_LogPriority priority) { SDL_LogLevel *entry; @@ -159,8 +154,7 @@ SDL_LogSetPriority(int category, SDL_LogPriority priority) } } -SDL_LogPriority -SDL_LogGetPriority(int category) +SDL_LogPriority SDL_LogGetPriority(int category) { SDL_LogLevel *entry; @@ -181,8 +175,7 @@ SDL_LogGetPriority(int category) } } -void -SDL_LogResetPriorities(void) +void SDL_LogResetPriorities(void) { SDL_LogLevel *entry; @@ -198,8 +191,7 @@ SDL_LogResetPriorities(void) SDL_test_priority = DEFAULT_TEST_PRIORITY; } -void -SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -208,8 +200,7 @@ SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -218,8 +209,7 @@ SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -228,8 +218,7 @@ SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -238,8 +227,7 @@ SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -248,8 +236,7 @@ SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -258,8 +245,7 @@ SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -268,8 +254,7 @@ SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) va_end(ap); } -void -SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +void SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; @@ -279,8 +264,7 @@ SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING } #ifdef __ANDROID__ -static const char * -GetCategoryPrefix(int category) +static const char *GetCategoryPrefix(int category) { if (category < SDL_LOG_CATEGORY_RESERVED1) { return SDL_category_prefixes[category]; @@ -292,8 +276,7 @@ GetCategoryPrefix(int category) } #endif /* __ANDROID__ */ -void -SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap) +void SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap) { char *message = NULL; char stack_buf[SDL_MAX_LOG_MESSAGE_STACK]; @@ -316,7 +299,7 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list return; } - if (!log_function_mutex) { + if (log_function_mutex == NULL) { /* this mutex creation can race if you log from two threads at startup. You should have called SDL_Init first! */ log_function_mutex = SDL_CreateMutex(); } @@ -326,15 +309,17 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list len = SDL_vsnprintf(stack_buf, sizeof(stack_buf), fmt, aq); va_end(aq); - if (len < 0) + if (len < 0) { return; + } /* If message truncated, allocate and re-render */ if (len >= sizeof(stack_buf) && SDL_size_add_overflow(len, 1, &len_plus_term) == 0) { /* Allocate exactly what we need, including the zero-terminator */ message = (char *)SDL_malloc(len_plus_term); - if (!message) + if (message == NULL) { return; + } va_copy(aq, ap); len = SDL_vsnprintf(message, len_plus_term, fmt, aq); va_end(aq); @@ -343,22 +328,16 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list } /* Chop off final endline. */ - if ((len > 0) && (message[len-1] == '\n')) { + if ((len > 0) && (message[len - 1] == '\n')) { message[--len] = '\0'; - if ((len > 0) && (message[len-1] == '\r')) { /* catch "\r\n", too. */ + if ((len > 0) && (message[len - 1] == '\r')) { /* catch "\r\n", too. */ message[--len] = '\0'; } } - if (log_function_mutex) { - SDL_LockMutex(log_function_mutex); - } - + SDL_LockMutex(log_function_mutex); SDL_log_function(SDL_log_userdata, category, priority, message); - - if (log_function_mutex) { - SDL_UnlockMutex(log_function_mutex); - } + SDL_UnlockMutex(log_function_mutex); /* Free only if dynamically allocated */ if (message != stack_buf) { @@ -374,9 +353,8 @@ static int consoleAttached = 0; static HANDLE stderrHandle = NULL; #endif -static void SDLCALL -SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, - const char *message) +static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, + const char *message) { #if defined(__WIN32__) || defined(__WINRT__) || defined(__GDK__) /* Way too many allocations here, urgh */ @@ -397,57 +375,57 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, if (consoleAttached == 0) { attachResult = AttachConsole(ATTACH_PARENT_PROCESS); if (!attachResult) { - attachError = GetLastError(); - if (attachError == ERROR_INVALID_HANDLE) { - /* This is expected when running from Visual Studio */ - /*OutputDebugString(TEXT("Parent process has no console\r\n"));*/ - consoleAttached = -1; - } else if (attachError == ERROR_GEN_FAILURE) { - OutputDebugString(TEXT("Could not attach to console of parent process\r\n")); - consoleAttached = -1; - } else if (attachError == ERROR_ACCESS_DENIED) { - /* Already attached */ - consoleAttached = 1; - } else { - OutputDebugString(TEXT("Error attaching console\r\n")); - consoleAttached = -1; - } - } else { - /* Newly attached */ + attachError = GetLastError(); + if (attachError == ERROR_INVALID_HANDLE) { + /* This is expected when running from Visual Studio */ + /*OutputDebugString(TEXT("Parent process has no console\r\n"));*/ + consoleAttached = -1; + } else if (attachError == ERROR_GEN_FAILURE) { + OutputDebugString(TEXT("Could not attach to console of parent process\r\n")); + consoleAttached = -1; + } else if (attachError == ERROR_ACCESS_DENIED) { + /* Already attached */ consoleAttached = 1; + } else { + OutputDebugString(TEXT("Error attaching console\r\n")); + consoleAttached = -1; } + } else { + /* Newly attached */ + consoleAttached = 1; + } - if (consoleAttached == 1) { - stderrHandle = GetStdHandle(STD_ERROR_HANDLE); + if (consoleAttached == 1) { + stderrHandle = GetStdHandle(STD_ERROR_HANDLE); - if (GetConsoleMode(stderrHandle, &consoleMode) == 0) { - /* WriteConsole fails if the output is redirected to a file. Must use WriteFile instead. */ - consoleAttached = 2; - } + if (GetConsoleMode(stderrHandle, &consoleMode) == 0) { + /* WriteConsole fails if the output is redirected to a file. Must use WriteFile instead. */ + consoleAttached = 2; } + } } #endif /* !defined(HAVE_STDIO_H) && !defined(__WINRT__) && !defined(__GDK__) */ length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1 + 1; output = SDL_small_alloc(char, length, &isstack); - SDL_snprintf(output, length, "%s: %s\r\n", SDL_priority_prefixes[priority], message); + (void)SDL_snprintf(output, length, "%s: %s\r\n", SDL_priority_prefixes[priority], message); tstr = WIN_UTF8ToString(output); - + /* Output to debugger */ OutputDebugString(tstr); - + #if !defined(HAVE_STDIO_H) && !defined(__WINRT__) && !defined(__GDK__) /* Screen output to stderr, if console was attached. */ if (consoleAttached == 1) { - if (!WriteConsole(stderrHandle, tstr, (DWORD) SDL_tcslen(tstr), &charsWritten, NULL)) { - OutputDebugString(TEXT("Error calling WriteConsole\r\n")); - if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) { - OutputDebugString(TEXT("Insufficient heap memory to write message\r\n")); - } + if (!WriteConsole(stderrHandle, tstr, (DWORD)SDL_tcslen(tstr), &charsWritten, NULL)) { + OutputDebugString(TEXT("Error calling WriteConsole\r\n")); + if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) { + OutputDebugString(TEXT("Insufficient heap memory to write message\r\n")); } + } } else if (consoleAttached == 2) { - if (!WriteFile(stderrHandle, output, (DWORD) SDL_strlen(output), &charsWritten, NULL)) { + if (!WriteFile(stderrHandle, output, (DWORD)SDL_strlen(output), &charsWritten, NULL)) { OutputDebugString(TEXT("Error calling WriteFile\r\n")); } } @@ -465,7 +443,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, } #elif defined(__APPLE__) && (defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT)) /* Technically we don't need Cocoa/UIKit, but that's where this function is defined for now. - */ + */ extern void SDL_NSLog(const char *prefix, const char *text); { SDL_NSLog(SDL_priority_prefixes[priority], message); @@ -473,24 +451,30 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, } #elif defined(__PSP__) || defined(__PS2__) { - FILE* pFile; - pFile = fopen ("SDL_Log.txt", "a"); - fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); - fclose (pFile); + FILE *pFile; + pFile = fopen("SDL_Log.txt", "a"); + if (pFile != NULL) { + (void)fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); + (void)fclose(pFile); + } } #elif defined(__VITA__) { - FILE* pFile; - pFile = fopen ("ux0:/data/SDL_Log.txt", "a"); - fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); - fclose (pFile); + FILE *pFile; + pFile = fopen("ux0:/data/SDL_Log.txt", "a"); + if (pFile != NULL) { + (void)fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); + (void)fclose(pFile); + } } #elif defined(__3DS__) { FILE *pFile; pFile = fopen("sdmc:/3ds/SDL_Log.txt", "a"); - fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); - fclose(pFile); + if (pFile != NULL) { + (void)fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); + (void)fclose(pFile); + } } #endif #if HAVE_STDIO_H && \ @@ -502,8 +486,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, #endif } -void -SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata) +void SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata) { if (callback) { *callback = SDL_log_function; @@ -513,8 +496,7 @@ SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata) } } -void -SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata) +void SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata) { SDL_log_function = callback; SDL_log_userdata = userdata; diff --git a/modules/SDL2/src/SDL_utils_c.h b/modules/SDL2/src/SDL_utils_c.h index baa552f..08b90e6 100644 --- a/modules/SDL2/src/SDL_utils_c.h +++ b/modules/SDL2/src/SDL_utils_c.h @@ -25,7 +25,7 @@ /* Common utility functions that aren't in the public API */ /* Return the smallest power of 2 greater than or equal to 'x' */ -int SDL_powerof2(int x); +extern int SDL_powerof2(int x); #endif /* SDL_utils_h_ */ diff --git a/modules/SDL2/src/atomic/SDL_atomic.c b/modules/SDL2/src/atomic/SDL_atomic.c index 302cb40..4e10d52 100644 --- a/modules/SDL2/src/atomic/SDL_atomic.c +++ b/modules/SDL2/src/atomic/SDL_atomic.c @@ -37,19 +37,20 @@ /* The __atomic_load_n() intrinsic showed up in different times for different compilers. */ #if defined(__clang__) -# if __has_builtin(__atomic_load_n) || defined(HAVE_GCC_ATOMICS) - /* !!! FIXME: this advertises as available in the NDK but uses an external symbol we don't have. - It might be in a later NDK or we might need an extra library? --ryan. */ -# if !defined(__ANDROID__) -# define HAVE_ATOMIC_LOAD_N 1 -# endif -# endif +#if __has_builtin(__atomic_load_n) || defined(HAVE_GCC_ATOMICS) +/* !!! FIXME: this advertises as available in the NDK but uses an external symbol we don't have. + It might be in a later NDK or we might need an extra library? --ryan. */ +#if !defined(__ANDROID__) +#define HAVE_ATOMIC_LOAD_N 1 +#endif +#endif #elif defined(__GNUC__) -# if (__GNUC__ >= 5) -# define HAVE_ATOMIC_LOAD_N 1 -# endif +#if (__GNUC__ >= 5) +#define HAVE_ATOMIC_LOAD_N 1 +#endif #endif +/* *INDENT-OFF* */ /* clang-format off */ #if defined(__WATCOMC__) && defined(__386__) SDL_COMPILE_TIME_ASSERT(intsize, 4==sizeof(int)); #define HAVE_WATCOM_ATOMICS @@ -74,7 +75,9 @@ extern __inline int _SDL_xadd_watcom(volatile int *a, int v); parm [ecx] [eax] \ value [eax] \ modify exact [eax]; + #endif /* __WATCOMC__ && __386__ */ +/* *INDENT-ON* */ /* clang-format on */ /* If any of the operations are not provided then we must emulate some @@ -106,16 +109,14 @@ extern __inline int _SDL_xadd_watcom(volatile int *a, int v); #if EMULATE_CAS static SDL_SpinLock locks[32]; -static SDL_INLINE void -enterLock(void *a) +static SDL_INLINE void enterLock(void *a) { uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f); SDL_AtomicLock(&locks[index]); } -static SDL_INLINE void -leaveLock(void *a) +static SDL_INLINE void leaveLock(void *a) { uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f); @@ -123,21 +124,19 @@ leaveLock(void *a) } #endif - -SDL_bool -SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval) +SDL_bool SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval) { #ifdef HAVE_MSC_ATOMICS SDL_COMPILE_TIME_ASSERT(atomic_cas, sizeof(long) == sizeof(a->value)); - return (_InterlockedCompareExchange((long*)&a->value, (long)newval, (long)oldval) == (long)oldval); + return _InterlockedCompareExchange((long *)&a->value, (long)newval, (long)oldval) == (long)oldval; #elif defined(HAVE_WATCOM_ATOMICS) - return (SDL_bool) _SDL_cmpxchg_watcom(&a->value, newval, oldval); + return (SDL_bool)_SDL_cmpxchg_watcom(&a->value, newval, oldval); #elif defined(HAVE_GCC_ATOMICS) return (SDL_bool) __sync_bool_compare_and_swap(&a->value, oldval, newval); #elif defined(__MACOSX__) /* this is deprecated in 10.12 sdk; favor gcc atomics. */ return (SDL_bool) OSAtomicCompareAndSwap32Barrier(oldval, newval, &a->value); #elif defined(__SOLARIS__) - return (SDL_bool) ((int) atomic_cas_uint((volatile uint_t*)&a->value, (uint_t)oldval, (uint_t)newval) == oldval); + return (SDL_bool)((int)atomic_cas_uint((volatile uint_t *)&a->value, (uint_t)oldval, (uint_t)newval) == oldval); #elif EMULATE_CAS SDL_bool retval = SDL_FALSE; @@ -150,17 +149,16 @@ SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval) return retval; #else - #error Please define your platform. +#error Please define your platform. #endif } -SDL_bool -SDL_AtomicCASPtr(void **a, void *oldval, void *newval) +SDL_bool SDL_AtomicCASPtr(void **a, void *oldval, void *newval) { #if defined(HAVE_MSC_ATOMICS) - return (_InterlockedCompareExchangePointer(a, newval, oldval) == oldval); + return _InterlockedCompareExchangePointer(a, newval, oldval) == oldval; #elif defined(HAVE_WATCOM_ATOMICS) - return (SDL_bool) _SDL_cmpxchg_watcom((int *)a, (long)newval, (long)oldval); + return (SDL_bool)_SDL_cmpxchg_watcom((int *)a, (long)newval, (long)oldval); #elif defined(HAVE_GCC_ATOMICS) return __sync_bool_compare_and_swap(a, oldval, newval); #elif defined(__MACOSX__) && defined(__LP64__) /* this is deprecated in 10.12 sdk; favor gcc atomics. */ @@ -168,7 +166,7 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval) #elif defined(__MACOSX__) && !defined(__LP64__) /* this is deprecated in 10.12 sdk; favor gcc atomics. */ return (SDL_bool) OSAtomicCompareAndSwap32Barrier((int32_t)oldval, (int32_t)newval, (int32_t*) a); #elif defined(__SOLARIS__) - return (SDL_bool) (atomic_cas_ptr(a, oldval, newval) == oldval); + return (SDL_bool)(atomic_cas_ptr(a, oldval, newval) == oldval); #elif EMULATE_CAS SDL_bool retval = SDL_FALSE; @@ -181,22 +179,21 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval) return retval; #else - #error Please define your platform. +#error Please define your platform. #endif } -int -SDL_AtomicSet(SDL_atomic_t *a, int v) +int SDL_AtomicSet(SDL_atomic_t *a, int v) { #ifdef HAVE_MSC_ATOMICS SDL_COMPILE_TIME_ASSERT(atomic_set, sizeof(long) == sizeof(a->value)); - return _InterlockedExchange((long*)&a->value, v); + return _InterlockedExchange((long *)&a->value, v); #elif defined(HAVE_WATCOM_ATOMICS) return _SDL_xchg_watcom(&a->value, v); #elif defined(HAVE_GCC_ATOMICS) return __sync_lock_test_and_set(&a->value, v); #elif defined(__SOLARIS__) - return (int) atomic_swap_uint((volatile uint_t*)&a->value, v); + return (int)atomic_swap_uint((volatile uint_t *)&a->value, v); #else int value; do { @@ -206,13 +203,12 @@ SDL_AtomicSet(SDL_atomic_t *a, int v) #endif } -void* -SDL_AtomicSetPtr(void **a, void *v) +void *SDL_AtomicSetPtr(void **a, void *v) { #if defined(HAVE_MSC_ATOMICS) return _InterlockedExchangePointer(a, v); #elif defined(HAVE_WATCOM_ATOMICS) - return (void *) _SDL_xchg_watcom((int *)a, (long)v); + return (void *)_SDL_xchg_watcom((int *)a, (long)v); #elif defined(HAVE_GCC_ATOMICS) return __sync_lock_test_and_set(a, v); #elif defined(__SOLARIS__) @@ -226,12 +222,11 @@ SDL_AtomicSetPtr(void **a, void *v) #endif } -int -SDL_AtomicAdd(SDL_atomic_t *a, int v) +int SDL_AtomicAdd(SDL_atomic_t *a, int v) { #ifdef HAVE_MSC_ATOMICS SDL_COMPILE_TIME_ASSERT(atomic_add, sizeof(long) == sizeof(a->value)); - return _InterlockedExchangeAdd((long*)&a->value, v); + return _InterlockedExchangeAdd((long *)&a->value, v); #elif defined(HAVE_WATCOM_ATOMICS) return _SDL_xadd_watcom(&a->value, v); #elif defined(HAVE_GCC_ATOMICS) @@ -239,7 +234,7 @@ SDL_AtomicAdd(SDL_atomic_t *a, int v) #elif defined(__SOLARIS__) int pv = a->value; membar_consumer(); - atomic_add_int((volatile uint_t*)&a->value, v); + atomic_add_int((volatile uint_t *)&a->value, v); return pv; #else int value; @@ -250,8 +245,7 @@ SDL_AtomicAdd(SDL_atomic_t *a, int v) #endif } -int -SDL_AtomicGet(SDL_atomic_t *a) +int SDL_AtomicGet(SDL_atomic_t *a) { #ifdef HAVE_ATOMIC_LOAD_N return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST); @@ -275,8 +269,7 @@ SDL_AtomicGet(SDL_atomic_t *a) #endif } -void * -SDL_AtomicGetPtr(void **a) +void *SDL_AtomicGetPtr(void **a) { #ifdef HAVE_ATOMIC_LOAD_N return __atomic_load_n(a, __ATOMIC_SEQ_CST); @@ -299,14 +292,12 @@ SDL_AtomicGetPtr(void **a) #error This file should be built in arm mode so the mcr instruction is available for memory barriers #endif -void -SDL_MemoryBarrierReleaseFunction(void) +void SDL_MemoryBarrierReleaseFunction(void) { SDL_MemoryBarrierRelease(); } -void -SDL_MemoryBarrierAcquireFunction(void) +void SDL_MemoryBarrierAcquireFunction(void) { SDL_MemoryBarrierAcquire(); } diff --git a/modules/SDL2/src/atomic/SDL_spinlock.c b/modules/SDL2/src/atomic/SDL_spinlock.c index 2035ba6..9fd3e61 100644 --- a/modules/SDL2/src/atomic/SDL_spinlock.c +++ b/modules/SDL2/src/atomic/SDL_spinlock.c @@ -48,6 +48,7 @@ #include #endif +/* *INDENT-OFF* */ /* clang-format off */ #if defined(__WATCOMC__) && defined(__386__) SDL_COMPILE_TIME_ASSERT(locksize, 4==sizeof(SDL_SpinLock)); extern __inline int _SDL_xchg_watcom(volatile int *a, int v); @@ -57,16 +58,16 @@ extern __inline int _SDL_xchg_watcom(volatile int *a, int v); value [eax] \ modify exact [eax]; #endif /* __WATCOMC__ && __386__ */ +/* *INDENT-ON* */ /* clang-format on */ /* This function is where all the magic happens... */ -SDL_bool -SDL_AtomicTryLock(SDL_SpinLock *lock) +SDL_bool SDL_AtomicTryLock(SDL_SpinLock *lock) { #if SDL_ATOMIC_DISABLED /* Terrible terrible damage */ static SDL_mutex *_spinlock_mutex; - if (!_spinlock_mutex) { + if (_spinlock_mutex == NULL) { /* Race condition on first lock... */ _spinlock_mutex = SDL_CreateMutex(); } @@ -81,52 +82,60 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) } #elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET - return (__sync_lock_test_and_set(lock, 1) == 0); + return __sync_lock_test_and_set(lock, 1) == 0; #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) - return (_InterlockedExchange_acq(lock, 1) == 0); + return _InterlockedExchange_acq(lock, 1) == 0; #elif defined(_MSC_VER) SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long)); - return (InterlockedExchange((long*)lock, 1) == 0); + return InterlockedExchange((long *)lock, 1) == 0; #elif defined(__WATCOMC__) && defined(__386__) return _SDL_xchg_watcom(lock, 1) == 0; -#elif defined(__GNUC__) && defined(__arm__) && \ - (defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) || \ - defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \ - defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \ - defined(__ARM_ARCH_5TEJ__)) +#elif defined(__GNUC__) && defined(__arm__) && \ + (defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) || \ + defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \ + defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \ + defined(__ARM_ARCH_5TEJ__)) int result; #if defined(__RISCOS__) if (__cpucap_have_rex()) { - __asm__ __volatile__ ( + __asm__ __volatile__( "ldrex %0, [%2]\nteq %0, #0\nstrexeq %0, %1, [%2]" - : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory"); - return (result == 0); + : "=&r"(result) + : "r"(1), "r"(lock) + : "cc", "memory"); + return result == 0; } #endif - __asm__ __volatile__ ( + __asm__ __volatile__( "swp %0, %1, [%2]\n" - : "=&r,&r" (result) : "r,0" (1), "r,r" (lock) : "memory"); - return (result == 0); + : "=&r,&r"(result) + : "r,0"(1), "r,r"(lock) + : "memory"); + return result == 0; #elif defined(__GNUC__) && defined(__arm__) int result; - __asm__ __volatile__ ( + __asm__ __volatile__( "ldrex %0, [%2]\nteq %0, #0\nstrexeq %0, %1, [%2]" - : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory"); - return (result == 0); + : "=&r"(result) + : "r"(1), "r"(lock) + : "cc", "memory"); + return result == 0; #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) int result; __asm__ __volatile__( "lock ; xchgl %0, (%1)\n" - : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory"); - return (result == 0); + : "=r"(result) + : "r"(lock), "0"(1) + : "cc", "memory"); + return result == 0; #elif defined(__MACOSX__) || defined(__IPHONEOS__) /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */ @@ -134,11 +143,11 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) #elif defined(__SOLARIS__) && defined(_LP64) /* Used for Solaris with non-gcc compilers. */ - return (SDL_bool) ((int) atomic_cas_64((volatile uint64_t*)lock, 0, 1) == 0); + return (SDL_bool)((int)atomic_cas_64((volatile uint64_t *)lock, 0, 1) == 0); #elif defined(__SOLARIS__) && !defined(_LP64) /* Used for Solaris with non-gcc compilers. */ - return (SDL_bool) ((int) atomic_cas_32((volatile uint32_t*)lock, 0, 1) == 0); + return (SDL_bool)((int)atomic_cas_32((volatile uint32_t *)lock, 0, 1) == 0); #elif defined(PS2) uint32_t oldintr; SDL_bool res = SDL_FALSE; @@ -150,7 +159,9 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) res = SDL_TRUE; } // enable interuption - if(oldintr) { EIntr(); } + if (oldintr) { + EIntr(); + } return res; #else #error Please implement for your platform. @@ -158,8 +169,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) #endif } -void -SDL_AtomicLock(SDL_SpinLock *lock) +void SDL_AtomicLock(SDL_SpinLock *lock) { int iterations = 0; /* FIXME: Should we have an eventual timeout? */ @@ -174,8 +184,7 @@ SDL_AtomicLock(SDL_SpinLock *lock) } } -void -SDL_AtomicUnlock(SDL_SpinLock *lock) +void SDL_AtomicUnlock(SDL_SpinLock *lock) { #if HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET __sync_lock_release(lock); @@ -188,7 +197,7 @@ SDL_AtomicUnlock(SDL_SpinLock *lock) *lock = 0; #elif defined(__WATCOMC__) && defined(__386__) - SDL_CompilerBarrier (); + SDL_CompilerBarrier(); *lock = 0; #elif defined(__SOLARIS__) diff --git a/modules/SDL2/src/audio/SDL_audio.c b/modules/SDL2/src/audio/SDL_audio.c index b1b87d1..60242e6 100644 --- a/modules/SDL2/src/audio/SDL_audio.c +++ b/modules/SDL2/src/audio/SDL_audio.c @@ -132,22 +132,20 @@ static const AudioBootStrap *const bootstrap[] = { NULL }; - #ifdef HAVE_LIBSAMPLERATE_H #ifdef SDL_LIBSAMPLERATE_DYNAMIC static void *SRC_lib = NULL; #endif SDL_bool SRC_available = SDL_FALSE; int SRC_converter = 0; -SRC_STATE* (*SRC_src_new)(int converter_type, int channels, int *error) = NULL; +SRC_STATE *(*SRC_src_new)(int converter_type, int channels, int *error) = NULL; int (*SRC_src_process)(SRC_STATE *state, SRC_DATA *data) = NULL; int (*SRC_src_reset)(SRC_STATE *state) = NULL; -SRC_STATE* (*SRC_src_delete)(SRC_STATE *state) = NULL; -const char* (*SRC_src_strerror)(int error) = NULL; +SRC_STATE *(*SRC_src_delete)(SRC_STATE *state) = NULL; +const char *(*SRC_src_strerror)(int error) = NULL; int (*SRC_src_simple)(SRC_DATA *data, int converter_type, int channels) = NULL; -static SDL_bool -LoadLibSampleRate(void) +static SDL_bool LoadLibSampleRate(void) { const char *hint = SDL_GetHint(SDL_HINT_AUDIO_RESAMPLING_MODE); @@ -155,15 +153,17 @@ LoadLibSampleRate(void) SRC_converter = 0; if (!hint || *hint == '0' || SDL_strcasecmp(hint, "default") == 0) { - return SDL_FALSE; /* don't load anything. */ + return SDL_FALSE; /* don't load anything. */ } else if (*hint == '1' || SDL_strcasecmp(hint, "fast") == 0) { SRC_converter = SRC_SINC_FASTEST; } else if (*hint == '2' || SDL_strcasecmp(hint, "medium") == 0) { SRC_converter = SRC_SINC_MEDIUM_QUALITY; } else if (*hint == '3' || SDL_strcasecmp(hint, "best") == 0) { SRC_converter = SRC_SINC_BEST_QUALITY; + } else if (*hint == '4' || SDL_strcasecmp(hint, "linear") == 0) { + SRC_converter = SRC_LINEAR; } else { - return SDL_FALSE; /* treat it like "default", don't load anything. */ + return SDL_FALSE; /* treat it like "default", don't load anything. */ } #ifdef SDL_LIBSAMPLERATE_DYNAMIC @@ -174,12 +174,14 @@ LoadLibSampleRate(void) return SDL_FALSE; } + /* *INDENT-OFF* */ /* clang-format off */ SRC_src_new = (SRC_STATE* (*)(int converter_type, int channels, int *error))SDL_LoadFunction(SRC_lib, "src_new"); SRC_src_process = (int (*)(SRC_STATE *state, SRC_DATA *data))SDL_LoadFunction(SRC_lib, "src_process"); SRC_src_reset = (int(*)(SRC_STATE *state))SDL_LoadFunction(SRC_lib, "src_reset"); SRC_src_delete = (SRC_STATE* (*)(SRC_STATE *state))SDL_LoadFunction(SRC_lib, "src_delete"); SRC_src_strerror = (const char* (*)(int error))SDL_LoadFunction(SRC_lib, "src_strerror"); SRC_src_simple = (int(*)(SRC_DATA *data, int converter_type, int channels))SDL_LoadFunction(SRC_lib, "src_simple"); +/* *INDENT-ON* */ /* clang-format on */ if (!SRC_src_new || !SRC_src_process || !SRC_src_reset || !SRC_src_delete || !SRC_src_strerror || !SRC_src_simple) { SDL_UnloadObject(SRC_lib); @@ -199,8 +201,7 @@ LoadLibSampleRate(void) return SDL_TRUE; } -static void -UnloadLibSampleRate(void) +static void UnloadLibSampleRate(void) { #ifdef SDL_LIBSAMPLERATE_DYNAMIC if (SRC_lib != NULL) { @@ -218,8 +219,7 @@ UnloadLibSampleRate(void) } #endif -static SDL_AudioDevice * -get_audio_device(SDL_AudioDeviceID id) +static SDL_AudioDevice *get_audio_device(SDL_AudioDeviceID id) { id--; if ((id >= SDL_arraysize(open_devices)) || (open_devices[id] == NULL)) { @@ -230,82 +230,67 @@ get_audio_device(SDL_AudioDeviceID id) return open_devices[id]; } - /* stubs for audio drivers that don't need a specific entry point... */ -static void -SDL_AudioDetectDevices_Default(void) +static void SDL_AudioDetectDevices_Default(void) { /* you have to write your own implementation if these assertions fail. */ SDL_assert(current_audio.impl.OnlyHasDefaultOutputDevice); SDL_assert(current_audio.impl.OnlyHasDefaultCaptureDevice || !current_audio.impl.HasCaptureSupport); - SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *) ((size_t) 0x1)); + SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *)((size_t)0x1)); if (current_audio.impl.HasCaptureSupport) { - SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) ((size_t) 0x2)); + SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *)((size_t)0x2)); } } -static void -SDL_AudioThreadInit_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioThreadInit_Default(_THIS) +{ /* no-op. */ } -static void -SDL_AudioThreadDeinit_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioThreadDeinit_Default(_THIS) +{ /* no-op. */ } -static void -SDL_AudioWaitDevice_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioWaitDevice_Default(_THIS) +{ /* no-op. */ } -static void -SDL_AudioPlayDevice_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioPlayDevice_Default(_THIS) +{ /* no-op. */ } -static Uint8 * -SDL_AudioGetDeviceBuf_Default(_THIS) +static Uint8 *SDL_AudioGetDeviceBuf_Default(_THIS) { return NULL; } -static int -SDL_AudioCaptureFromDevice_Default(_THIS, void *buffer, int buflen) +static int SDL_AudioCaptureFromDevice_Default(_THIS, void *buffer, int buflen) { - return -1; /* just fail immediately. */ + return -1; /* just fail immediately. */ } -static void -SDL_AudioFlushCapture_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioFlushCapture_Default(_THIS) +{ /* no-op. */ } -static void -SDL_AudioCloseDevice_Default(_THIS) -{ /* no-op. */ +static void SDL_AudioCloseDevice_Default(_THIS) +{ /* no-op. */ } -static void -SDL_AudioDeinitialize_Default(void) -{ /* no-op. */ +static void SDL_AudioDeinitialize_Default(void) +{ /* no-op. */ } -static void -SDL_AudioFreeDeviceHandle_Default(void *handle) -{ /* no-op. */ +static void SDL_AudioFreeDeviceHandle_Default(void *handle) +{ /* no-op. */ } - -static int -SDL_AudioOpenDevice_Default(_THIS, const char *devname) +static int SDL_AudioOpenDevice_Default(_THIS, const char *devname) { return SDL_Unsupported(); } -static SDL_INLINE SDL_bool -is_in_audio_device_thread(SDL_AudioDevice * device) +static SDL_INLINE SDL_bool is_in_audio_device_thread(SDL_AudioDevice *device) { /* The device thread locks the same mutex, but not through the public API. This check is in case the application, in the audio callback, @@ -318,35 +303,31 @@ is_in_audio_device_thread(SDL_AudioDevice * device) return SDL_FALSE; } -static void -SDL_AudioLockDevice_Default(SDL_AudioDevice * device) +static void SDL_AudioLockDevice_Default(SDL_AudioDevice *device) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang assumes recursive locks */ { if (!is_in_audio_device_thread(device)) { SDL_LockMutex(device->mixer_lock); } } -static void -SDL_AudioUnlockDevice_Default(SDL_AudioDevice * device) +static void SDL_AudioUnlockDevice_Default(SDL_AudioDevice *device) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang assumes recursive locks */ { if (!is_in_audio_device_thread(device)) { SDL_UnlockMutex(device->mixer_lock); } } -static void -finish_audio_entry_points_init(void) +static void finish_audio_entry_points_init(void) { /* * Fill in stub functions for unused driver entry points. This lets us * blindly call them without having to check for validity first. */ - -#define FILL_STUB(x) \ - if (current_audio.impl.x == NULL) { \ - current_audio.impl.x = SDL_Audio##x##_Default; \ - } +#define FILL_STUB(x) \ + if (current_audio.impl.x == NULL) { \ + current_audio.impl.x = SDL_Audio##x##_Default; \ + } FILL_STUB(DetectDevices); FILL_STUB(OpenDevice); FILL_STUB(ThreadInit); @@ -364,21 +345,19 @@ finish_audio_entry_points_init(void) #undef FILL_STUB } - /* device hotplug support... */ -static int -add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioDeviceItem **devices, int *devCount) +static int add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioDeviceItem **devices, int *devCount) { int retval = -1; SDL_AudioDeviceItem *item; const SDL_AudioDeviceItem *i; int dupenum = 0; - SDL_assert(handle != NULL); /* we reserve NULL, audio backends can't use it. */ + SDL_assert(handle != NULL); /* we reserve NULL, audio backends can't use it. */ SDL_assert(name != NULL); - item = (SDL_AudioDeviceItem *) SDL_malloc(sizeof (SDL_AudioDeviceItem)); + item = (SDL_AudioDeviceItem *)SDL_malloc(sizeof(SDL_AudioDeviceItem)); if (!item) { return SDL_OutOfMemory(); } @@ -403,13 +382,13 @@ add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioD for (i = *devices; i != NULL; i = i->next) { if (SDL_strcmp(name, i->original_name) == 0) { dupenum = i->dupenum + 1; - break; /* stop at the highest-numbered dupe. */ + break; /* stop at the highest-numbered dupe. */ } } if (dupenum) { const size_t len = SDL_strlen(name) + 16; - char *replacement = (char *) SDL_malloc(len); + char *replacement = (char *)SDL_malloc(len); if (!replacement) { SDL_UnlockMutex(current_audio.detectionLock); SDL_free(item->original_name); @@ -417,35 +396,32 @@ add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioD return SDL_OutOfMemory(); } - SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1); + (void)SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1); item->dupenum = dupenum; item->name = replacement; } item->next = *devices; *devices = item; - retval = (*devCount)++; /* !!! FIXME: this should be an atomic increment */ + retval = (*devCount)++; /* !!! FIXME: this should be an atomic increment */ SDL_UnlockMutex(current_audio.detectionLock); return retval; } -static SDL_INLINE int -add_capture_device(const char *name, SDL_AudioSpec *spec, void *handle) +static SDL_INLINE int add_capture_device(const char *name, SDL_AudioSpec *spec, void *handle) { SDL_assert(current_audio.impl.HasCaptureSupport); return add_audio_device(name, spec, handle, ¤t_audio.inputDevices, ¤t_audio.inputDeviceCount); } -static SDL_INLINE int -add_output_device(const char *name, SDL_AudioSpec *spec, void *handle) +static SDL_INLINE int add_output_device(const char *name, SDL_AudioSpec *spec, void *handle) { return add_audio_device(name, spec, handle, ¤t_audio.outputDevices, ¤t_audio.outputDeviceCount); } -static void -free_device_list(SDL_AudioDeviceItem **devices, int *devCount) +static void free_device_list(SDL_AudioDeviceItem **devices, int *devCount) { SDL_AudioDeviceItem *item, *next; for (item = *devices; item != NULL; item = next) { @@ -464,10 +440,8 @@ free_device_list(SDL_AudioDeviceItem **devices, int *devCount) *devCount = 0; } - /* The audio backends call this when a new device is plugged in. */ -void -SDL_AddAudioDevice(const SDL_bool iscapture, const char *name, SDL_AudioSpec *spec, void *handle) +void SDL_AddAudioDevice(const SDL_bool iscapture, const char *name, SDL_AudioSpec *spec, void *handle) { const int device_index = iscapture ? add_capture_device(name, spec, handle) : add_output_device(name, spec, handle); if (device_index != -1) { @@ -489,11 +463,11 @@ void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device) SDL_assert(get_audio_device(device->id) == device); if (!SDL_AtomicGet(&device->enabled)) { - return; /* don't report disconnects more than once. */ + return; /* don't report disconnects more than once. */ } if (SDL_AtomicGet(&device->shutdown)) { - return; /* don't report disconnect if we're trying to close device. */ + return; /* don't report disconnect if we're trying to close device. */ } /* Ends the audio callback and mark the device as STOPPED, but the @@ -513,8 +487,7 @@ void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device) } } -static void -mark_device_removed(void *handle, SDL_AudioDeviceItem *devices, SDL_bool *removedFlag) +static void mark_device_removed(void *handle, SDL_AudioDeviceItem *devices, SDL_bool *removedFlag) { SDL_AudioDeviceItem *item; SDL_assert(handle != NULL); @@ -528,8 +501,7 @@ mark_device_removed(void *handle, SDL_AudioDeviceItem *devices, SDL_bool *remove } /* The audio backends call this when a device is removed from the system. */ -void -SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle) +void SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle) { int device_index; SDL_AudioDevice *device = NULL; @@ -541,11 +513,9 @@ SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle) } else { mark_device_removed(handle, current_audio.outputDevices, ¤t_audio.outputDevicesRemoved); } - for (device_index = 0; device_index < SDL_arraysize(open_devices); device_index++) - { + for (device_index = 0; device_index < SDL_arraysize(open_devices); device_index++) { device = open_devices[device_index]; - if (device != NULL && device->handle == handle) - { + if (device != NULL && device->handle == handle) { device_was_opened = SDL_TRUE; SDL_OpenedAudioDeviceDisconnected(device); break; @@ -574,40 +544,36 @@ SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle) current_audio.impl.FreeDeviceHandle(handle); } - - /* buffer queueing support... */ -static void SDLCALL -SDL_BufferQueueDrainCallback(void *userdata, Uint8 *stream, int len) +static void SDLCALL SDL_BufferQueueDrainCallback(void *userdata, Uint8 *stream, int len) { /* this function always holds the mixer lock before being called. */ - SDL_AudioDevice *device = (SDL_AudioDevice *) userdata; + SDL_AudioDevice *device = (SDL_AudioDevice *)userdata; size_t dequeued; - SDL_assert(device != NULL); /* this shouldn't ever happen, right?! */ - SDL_assert(!device->iscapture); /* this shouldn't ever happen, right?! */ - SDL_assert(len >= 0); /* this shouldn't ever happen, right?! */ + SDL_assert(device != NULL); /* this shouldn't ever happen, right?! */ + SDL_assert(!device->iscapture); /* this shouldn't ever happen, right?! */ + SDL_assert(len >= 0); /* this shouldn't ever happen, right?! */ dequeued = SDL_ReadFromDataQueue(device->buffer_queue, stream, len); stream += dequeued; - len -= (int) dequeued; + len -= (int)dequeued; - if (len > 0) { /* fill any remaining space in the stream with silence. */ + if (len > 0) { /* fill any remaining space in the stream with silence. */ SDL_assert(SDL_CountDataQueue(device->buffer_queue) == 0); SDL_memset(stream, device->callbackspec.silence, len); } } -static void SDLCALL -SDL_BufferQueueFillCallback(void *userdata, Uint8 *stream, int len) +static void SDLCALL SDL_BufferQueueFillCallback(void *userdata, Uint8 *stream, int len) { /* this function always holds the mixer lock before being called. */ - SDL_AudioDevice *device = (SDL_AudioDevice *) userdata; + SDL_AudioDevice *device = (SDL_AudioDevice *)userdata; - SDL_assert(device != NULL); /* this shouldn't ever happen, right?! */ - SDL_assert(device->iscapture); /* this shouldn't ever happen, right?! */ - SDL_assert(len >= 0); /* this shouldn't ever happen, right?! */ + SDL_assert(device != NULL); /* this shouldn't ever happen, right?! */ + SDL_assert(device->iscapture); /* this shouldn't ever happen, right?! */ + SDL_assert(len >= 0); /* this shouldn't ever happen, right?! */ /* note that if this needs to allocate more space and run out of memory, we have no choice but to quietly drop the data and hope it works out @@ -615,14 +581,13 @@ SDL_BufferQueueFillCallback(void *userdata, Uint8 *stream, int len) SDL_WriteToDataQueue(device->buffer_queue, stream, len); } -int -SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len) +int SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len) { SDL_AudioDevice *device = get_audio_device(devid); int rc = 0; if (!device) { - return -1; /* get_audio_device() will have set the error state */ + return -1; /* get_audio_device() will have set the error state */ } else if (device->iscapture) { return SDL_SetError("This is a capture device, queueing not allowed"); } else if (device->callbackspec.callback != SDL_BufferQueueDrainCallback) { @@ -638,27 +603,25 @@ SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len) return rc; } -Uint32 -SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len) +Uint32 SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len) { SDL_AudioDevice *device = get_audio_device(devid); Uint32 rc; - if ( (len == 0) || /* nothing to do? */ - (!device) || /* called with bogus device id */ - (!device->iscapture) || /* playback devices can't dequeue */ - (device->callbackspec.callback != SDL_BufferQueueFillCallback) ) { /* not set for queueing */ - return 0; /* just report zero bytes dequeued. */ + if ((len == 0) || /* nothing to do? */ + (!device) || /* called with bogus device id */ + (!device->iscapture) || /* playback devices can't dequeue */ + (device->callbackspec.callback != SDL_BufferQueueFillCallback)) { /* not set for queueing */ + return 0; /* just report zero bytes dequeued. */ } current_audio.impl.LockDevice(device); - rc = (Uint32) SDL_ReadFromDataQueue(device->buffer_queue, data, len); + rc = (Uint32)SDL_ReadFromDataQueue(device->buffer_queue, data, len); current_audio.impl.UnlockDevice(device); return rc; } -Uint32 -SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid) +Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid) { Uint32 retval = 0; SDL_AudioDevice *device = get_audio_device(devid); @@ -669,23 +632,21 @@ SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid) /* Nothing to do unless we're set up for queueing. */ if (device->callbackspec.callback == SDL_BufferQueueDrainCallback || - device->callbackspec.callback == SDL_BufferQueueFillCallback) - { + device->callbackspec.callback == SDL_BufferQueueFillCallback) { current_audio.impl.LockDevice(device); - retval = (Uint32) SDL_CountDataQueue(device->buffer_queue); + retval = (Uint32)SDL_CountDataQueue(device->buffer_queue); current_audio.impl.UnlockDevice(device); } return retval; } -void -SDL_ClearQueuedAudio(SDL_AudioDeviceID devid) +void SDL_ClearQueuedAudio(SDL_AudioDeviceID devid) { SDL_AudioDevice *device = get_audio_device(devid); if (!device) { - return; /* nothing to do. */ + return; /* nothing to do. */ } /* Blank out the device and release the mutex. Free it afterwards. */ @@ -697,12 +658,14 @@ SDL_ClearQueuedAudio(SDL_AudioDeviceID devid) current_audio.impl.UnlockDevice(device); } +#if SDL_AUDIO_DRIVER_ANDROID +extern void Android_JNI_AudioSetThreadPriority(int, int); +#endif /* The general mixing thread function */ -static int SDLCALL -SDL_RunAudio(void *devicep) +static int SDLCALL SDL_RunAudio(void *devicep) { - SDL_AudioDevice *device = (SDL_AudioDevice *) devicep; + SDL_AudioDevice *device = (SDL_AudioDevice *)devicep; void *udata = device->callbackspec.userdata; SDL_AudioCallback callback = device->callbackspec.callback; int data_len = 0; @@ -713,7 +676,6 @@ SDL_RunAudio(void *devicep) #if SDL_AUDIO_DRIVER_ANDROID { /* Set thread priority to THREAD_PRIORITY_AUDIO */ - extern void Android_JNI_AudioSetThreadPriority(int, int); Android_JNI_AudioSetThreadPriority(device->iscapture, device->id); } #else @@ -761,15 +723,15 @@ SDL_RunAudio(void *devicep) /* if this fails...oh well. We'll play silence here. */ SDL_AudioStreamPut(device->stream, data, data_len); - while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->spec.size)) { + while (SDL_AudioStreamAvailable(device->stream) >= ((int)device->spec.size)) { int got; data = SDL_AtomicGet(&device->enabled) ? current_audio.impl.GetDeviceBuf(device) : NULL; got = SDL_AudioStreamGet(device->stream, data ? data : device->work_buffer, device->spec.size); SDL_assert((got <= 0) || (got == device->spec.size)); - if (data == NULL) { /* device is having issues... */ + if (data == NULL) { /* device is having issues... */ const Uint32 delay = ((device->spec.samples * 1000) / device->spec.freq); - SDL_Delay(delay); /* wait for as long as this buffer would have played. Maybe device recovers later? */ + SDL_Delay(delay); /* wait for as long as this buffer would have played. Maybe device recovers later? */ } else { if (got != device->spec.size) { SDL_memset(data, device->spec.silence, device->spec.size); @@ -782,7 +744,7 @@ SDL_RunAudio(void *devicep) /* nothing to do; pause like we queued a buffer to play. */ const Uint32 delay = ((device->spec.samples * 1000) / device->spec.freq); SDL_Delay(delay); - } else { /* writing directly to the device. */ + } else { /* writing directly to the device. */ /* queue this buffer and wait for it to finish playing. */ current_audio.impl.PlayDevice(device); current_audio.impl.WaitDevice(device); @@ -799,11 +761,10 @@ SDL_RunAudio(void *devicep) /* !!! FIXME: this needs to deal with device spec changes. */ /* The general capture thread function */ -static int SDLCALL -SDL_CaptureAudio(void *devicep) +static int SDLCALL SDL_CaptureAudio(void *devicep) { - SDL_AudioDevice *device = (SDL_AudioDevice *) devicep; - const int silence = (int) device->spec.silence; + SDL_AudioDevice *device = (SDL_AudioDevice *)devicep; + const int silence = (int)device->spec.silence; const Uint32 delay = ((device->spec.samples * 1000) / device->spec.freq); const int data_len = device->spec.size; Uint8 *data; @@ -815,7 +776,6 @@ SDL_CaptureAudio(void *devicep) #if SDL_AUDIO_DRIVER_ANDROID { /* Set thread priority to THREAD_PRIORITY_AUDIO */ - extern void Android_JNI_AudioSetThreadPriority(int, int); Android_JNI_AudioSetThreadPriority(device->iscapture, device->id); } #else @@ -833,11 +793,11 @@ SDL_CaptureAudio(void *devicep) Uint8 *ptr; if (SDL_AtomicGet(&device->paused)) { - SDL_Delay(delay); /* just so we don't cook the CPU. */ + SDL_Delay(delay); /* just so we don't cook the CPU. */ if (device->stream) { SDL_AudioStreamClear(device->stream); } - current_audio.impl.FlushCapture(device); /* dump anything pending. */ + current_audio.impl.FlushCapture(device); /* dump anything pending. */ continue; } @@ -855,15 +815,15 @@ SDL_CaptureAudio(void *devicep) But we don't process it further or call the app's callback. */ if (!SDL_AtomicGet(&device->enabled)) { - SDL_Delay(delay); /* try to keep callback firing at normal pace. */ + SDL_Delay(delay); /* try to keep callback firing at normal pace. */ } else { while (still_need > 0) { const int rc = current_audio.impl.CaptureFromDevice(device, ptr, still_need); - SDL_assert(rc <= still_need); /* device should not overflow buffer. :) */ + SDL_assert(rc <= still_need); /* device should not overflow buffer. :) */ if (rc > 0) { still_need -= rc; ptr += rc; - } else { /* uhoh, device failed for some reason! */ + } else { /* uhoh, device failed for some reason! */ SDL_OpenedAudioDeviceDisconnected(device); break; } @@ -879,7 +839,7 @@ SDL_CaptureAudio(void *devicep) /* if this fails...oh well. */ SDL_AudioStreamPut(device->stream, data, data_len); - while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->callbackspec.size)) { + while (SDL_AudioStreamAvailable(device->stream) >= ((int)device->callbackspec.size)) { const int got = SDL_AudioStreamGet(device->stream, device->work_buffer, device->callbackspec.size); SDL_assert((got < 0) || (got == device->callbackspec.size)); if (got != device->callbackspec.size) { @@ -893,7 +853,7 @@ SDL_CaptureAudio(void *devicep) } SDL_UnlockMutex(device->mixer_lock); } - } else { /* feeding user callback directly without streaming. */ + } else { /* feeding user callback directly without streaming. */ /* !!! FIXME: this should be LockDevice. */ SDL_LockMutex(device->mixer_lock); if (!SDL_AtomicGet(&device->paused)) { @@ -910,11 +870,11 @@ SDL_CaptureAudio(void *devicep) return 0; } - -static SDL_AudioFormat -SDL_ParseAudioFormat(const char *string) +static SDL_AudioFormat SDL_ParseAudioFormat(const char *string) { -#define CHECK_FMT_STRING(x) if (SDL_strcmp(string, #x) == 0) return AUDIO_##x +#define CHECK_FMT_STRING(x) \ + if (SDL_strcmp(string, #x) == 0) \ + return AUDIO_##x CHECK_FMT_STRING(U8); CHECK_FMT_STRING(S8); CHECK_FMT_STRING(U16LSB); @@ -937,14 +897,12 @@ SDL_ParseAudioFormat(const char *string) return 0; } -int -SDL_GetNumAudioDrivers(void) +int SDL_GetNumAudioDrivers(void) { return SDL_arraysize(bootstrap) - 1; } -const char * -SDL_GetAudioDriver(int index) +const char *SDL_GetAudioDriver(int index) { if (index >= 0 && index < SDL_GetNumAudioDrivers()) { return bootstrap[index]->name; @@ -952,14 +910,13 @@ SDL_GetAudioDriver(int index) return NULL; } -int -SDL_AudioInit(const char *driver_name) +int SDL_AudioInit(const char *driver_name) { int i; SDL_bool initialized = SDL_FALSE, tried_to_init = SDL_FALSE; if (SDL_GetCurrentAudioDriver()) { - SDL_AudioQuit(); /* shutdown driver if already running. */ + SDL_AudioQuit(); /* shutdown driver if already running. */ } SDL_zeroa(open_devices); @@ -1009,7 +966,7 @@ SDL_AudioInit(const char *driver_name) } } else { for (i = 0; (!initialized) && (bootstrap[i]); ++i) { - if(bootstrap[i]->demand_only) { + if (bootstrap[i]->demand_only) { continue; } @@ -1032,7 +989,7 @@ SDL_AudioInit(const char *driver_name) } SDL_zero(current_audio); - return -1; /* No driver was available, so fail. */ + return -1; /* No driver was available, so fail. */ } current_audio.detectionLock = SDL_CreateMutex(); @@ -1052,15 +1009,13 @@ SDL_AudioInit(const char *driver_name) /* * Get the current audio driver name */ -const char * -SDL_GetCurrentAudioDriver() +const char *SDL_GetCurrentAudioDriver() { return current_audio.name; } /* Clean out devices that we've removed but had to keep around for stability. */ -static void -clean_out_device_list(SDL_AudioDeviceItem **devices, int *devCount, SDL_bool *removedFlag) +static void clean_out_device_list(SDL_AudioDeviceItem **devices, int *devCount, SDL_bool *removedFlag) { SDL_AudioDeviceItem *item = *devices; SDL_AudioDeviceItem *prev = NULL; @@ -1091,9 +1046,7 @@ clean_out_device_list(SDL_AudioDeviceItem **devices, int *devCount, SDL_bool *re *removedFlag = SDL_FALSE; } - -int -SDL_GetNumAudioDevices(int iscapture) +int SDL_GetNumAudioDevices(int iscapture) { int retval = 0; @@ -1116,9 +1069,7 @@ SDL_GetNumAudioDevices(int iscapture) return retval; } - -const char * -SDL_GetAudioDeviceName(int index, int iscapture) +const char *SDL_GetAudioDeviceName(int index, int iscapture) { SDL_AudioDeviceItem *item; int i; @@ -1147,9 +1098,7 @@ SDL_GetAudioDeviceName(int index, int iscapture) return retval; } - -int -SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec) +int SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec) { SDL_AudioDeviceItem *item; int i, retval; @@ -1180,9 +1129,7 @@ SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec) return retval; } - -int -SDL_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +int SDL_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { if (spec == NULL) { return SDL_InvalidParamError("spec"); @@ -1198,9 +1145,7 @@ SDL_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) return current_audio.impl.GetDefaultAudioInfo(name, spec, iscapture); } - -static void -close_audio_device(SDL_AudioDevice * device) +static void close_audio_device(SDL_AudioDevice *device) { if (!device) { return; @@ -1241,35 +1186,55 @@ close_audio_device(SDL_AudioDevice * device) SDL_free(device); } +static Uint16 GetDefaultSamplesFromFreq(int freq) +{ + /* Pick a default of ~46 ms at desired frequency */ + /* !!! FIXME: remove this when the non-Po2 resampling is in. */ + const Uint16 max_sample = (freq / 1000) * 46; + Uint16 current_sample = 1; + while (current_sample < max_sample) { + current_sample *= 2; + } + return current_sample; +} /* * Sanity check desired AudioSpec for SDL_OpenAudio() in (orig). * Fills in a sanitized copy in (prepared). * Returns non-zero if okay, zero on fatal parameters in (orig). */ -static int -prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared) +static int prepare_audiospec(const SDL_AudioSpec *orig, SDL_AudioSpec *prepared) { SDL_copyp(prepared, orig); if (orig->freq == 0) { + static const int DEFAULT_FREQ = 22050; const char *env = SDL_getenv("SDL_AUDIO_FREQUENCY"); - if ((!env) || ((prepared->freq = SDL_atoi(env)) == 0)) { - prepared->freq = 22050; /* a reasonable default */ + if (env != NULL) { + int freq = SDL_atoi(env); + prepared->freq = freq != 0 ? freq : DEFAULT_FREQ; + } else { + prepared->freq = DEFAULT_FREQ; } } if (orig->format == 0) { const char *env = SDL_getenv("SDL_AUDIO_FORMAT"); - if ((!env) || ((prepared->format = SDL_ParseAudioFormat(env)) == 0)) { - prepared->format = AUDIO_S16; /* a reasonable default */ + if (env != NULL) { + const SDL_AudioFormat format = SDL_ParseAudioFormat(env); + prepared->format = format != 0 ? format : AUDIO_S16; + } else { + prepared->format = AUDIO_S16; } } if (orig->channels == 0) { const char *env = SDL_getenv("SDL_AUDIO_CHANNELS"); - if ((!env) || ((prepared->channels = (Uint8) SDL_atoi(env)) == 0)) { - prepared->channels = 2; /* a reasonable default */ + if (env != NULL) { + Uint8 channels = (Uint8)SDL_atoi(env); + prepared->channels = channels != 0 ? channels : 2; + } else { + prepared->channels = 2; } } else if (orig->channels > 8) { SDL_SetError("Unsupported number of audio channels."); @@ -1278,15 +1243,11 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared) if (orig->samples == 0) { const char *env = SDL_getenv("SDL_AUDIO_SAMPLES"); - if ((!env) || ((prepared->samples = (Uint16) SDL_atoi(env)) == 0)) { - /* Pick a default of ~46 ms at desired frequency */ - /* !!! FIXME: remove this when the non-Po2 resampling is in. */ - const int samples = (prepared->freq / 1000) * 46; - int power2 = 1; - while (power2 < samples) { - power2 *= 2; - } - prepared->samples = power2; + if (env != NULL) { + Uint16 samples = (Uint16)SDL_atoi(env); + prepared->samples = samples != 0 ? samples : GetDefaultSamplesFromFreq(prepared->freq); + } else { + prepared->samples = GetDefaultSamplesFromFreq(prepared->freq); } } @@ -1296,10 +1257,9 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared) return 1; } -static SDL_AudioDeviceID -open_audio_device(const char *devname, int iscapture, - const SDL_AudioSpec * desired, SDL_AudioSpec * obtained, - int allowed_changes, int min_id) +static SDL_AudioDeviceID open_audio_device(const char *devname, int iscapture, + const SDL_AudioSpec *desired, SDL_AudioSpec *obtained, + int allowed_changes, int min_id) { const SDL_bool is_internal_thread = (desired->callback == NULL); SDL_AudioDeviceID id = 0; @@ -1411,7 +1371,7 @@ open_audio_device(const char *devname, int iscapture, } } - device = (SDL_AudioDevice *) SDL_calloc(1, sizeof (SDL_AudioDevice)); + device = (SDL_AudioDevice *)SDL_calloc(1, sizeof(SDL_AudioDevice)); if (device == NULL) { SDL_OutOfMemory(); SDL_UnlockMutex(current_audio.detectionLock); @@ -1422,7 +1382,7 @@ open_audio_device(const char *devname, int iscapture, device->iscapture = iscapture ? SDL_TRUE : SDL_FALSE; device->handle = handle; - SDL_AtomicSet(&device->shutdown, 0); /* just in case. */ + SDL_AtomicSet(&device->shutdown, 0); /* just in case. */ SDL_AtomicSet(&device->paused, 1); SDL_AtomicSet(&device->enabled, 1); @@ -1485,19 +1445,19 @@ open_audio_device(const char *devname, int iscapture, } } - SDL_CalculateAudioSpec(obtained); /* recalc after possible changes. */ + SDL_CalculateAudioSpec(obtained); /* recalc after possible changes. */ device->callbackspec = *obtained; if (build_stream) { if (iscapture) { device->stream = SDL_NewAudioStream(device->spec.format, - device->spec.channels, device->spec.freq, - obtained->format, obtained->channels, obtained->freq); + device->spec.channels, device->spec.freq, + obtained->format, obtained->channels, obtained->freq); } else { device->stream = SDL_NewAudioStream(obtained->format, obtained->channels, - obtained->freq, device->spec.format, - device->spec.channels, device->spec.freq); + obtained->freq, device->spec.format, + device->spec.channels, device->spec.freq); } if (!device->stream) { @@ -1507,7 +1467,7 @@ open_audio_device(const char *devname, int iscapture, } } - if (device->spec.callback == NULL) { /* use buffer queueing? */ + if (device->spec.callback == NULL) { /* use buffer queueing? */ /* pool a few packets to start. Enough for two callbacks. */ device->buffer_queue = SDL_NewDataQueue(SDL_AUDIOBUFFERQUEUE_PACKETLEN, obtained->size * 2); if (!device->buffer_queue) { @@ -1527,7 +1487,7 @@ open_audio_device(const char *devname, int iscapture, } SDL_assert(device->work_buffer_len > 0); - device->work_buffer = (Uint8 *) SDL_malloc(device->work_buffer_len); + device->work_buffer = (Uint8 *)SDL_malloc(device->work_buffer_len); if (device->work_buffer == NULL) { close_audio_device(device); SDL_UnlockMutex(current_audio.detectionLock); @@ -1535,7 +1495,7 @@ open_audio_device(const char *devname, int iscapture, return 0; } - open_devices[id] = device; /* add it to our list of open devices. */ + open_devices[id] = device; /* add it to our list of open devices. */ /* Start the audio thread if necessary */ if (!current_audio.impl.ProvidesOwnCallbackThread) { @@ -1545,7 +1505,7 @@ open_audio_device(const char *devname, int iscapture, const size_t stacksize = is_internal_thread ? 64 * 1024 : 0; char threadname[64]; - SDL_snprintf(threadname, sizeof (threadname), "SDLAudio%c%d", (iscapture) ? 'C' : 'P', (int) device->id); + (void)SDL_snprintf(threadname, sizeof(threadname), "SDLAudio%c%" SDL_PRIu32, (iscapture) ? 'C' : 'P', device->id); device->thread = SDL_CreateThreadInternal(iscapture ? SDL_CaptureAudio : SDL_RunAudio, threadname, stacksize, device); if (device->thread == NULL) { @@ -1560,9 +1520,7 @@ open_audio_device(const char *devname, int iscapture, return device->id; } - -int -SDL_OpenAudio(SDL_AudioSpec * desired, SDL_AudioSpec * obtained) +int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained) { SDL_AudioDeviceID id = 0; @@ -1596,17 +1554,15 @@ SDL_OpenAudio(SDL_AudioSpec * desired, SDL_AudioSpec * obtained) return (id == 0) ? -1 : 0; } -SDL_AudioDeviceID -SDL_OpenAudioDevice(const char *device, int iscapture, - const SDL_AudioSpec * desired, SDL_AudioSpec * obtained, +SDL_AudioDeviceID SDL_OpenAudioDevice(const char *device, int iscapture, + const SDL_AudioSpec *desired, SDL_AudioSpec *obtained, int allowed_changes) { return open_audio_device(device, iscapture, desired, obtained, allowed_changes, 2); } -SDL_AudioStatus -SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid) +SDL_AudioStatus SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid) { SDL_AudioDevice *device = get_audio_device(devid); SDL_AudioStatus status = SDL_AUDIO_STOPPED; @@ -1620,15 +1576,12 @@ SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid) return status; } - -SDL_AudioStatus -SDL_GetAudioStatus(void) +SDL_AudioStatus SDL_GetAudioStatus(void) { return SDL_GetAudioDeviceStatus(1); } -void -SDL_PauseAudioDevice(SDL_AudioDeviceID devid, int pause_on) +void SDL_PauseAudioDevice(SDL_AudioDeviceID devid, int pause_on) { SDL_AudioDevice *device = get_audio_device(devid); if (device) { @@ -1638,15 +1591,12 @@ SDL_PauseAudioDevice(SDL_AudioDeviceID devid, int pause_on) } } -void -SDL_PauseAudio(int pause_on) +void SDL_PauseAudio(int pause_on) { SDL_PauseAudioDevice(1, pause_on); } - -void -SDL_LockAudioDevice(SDL_AudioDeviceID devid) +void SDL_LockAudioDevice(SDL_AudioDeviceID devid) { /* Obtain a lock on the mixing buffers */ SDL_AudioDevice *device = get_audio_device(devid); @@ -1655,14 +1605,12 @@ SDL_LockAudioDevice(SDL_AudioDeviceID devid) } } -void -SDL_LockAudio(void) +void SDL_LockAudio(void) { SDL_LockAudioDevice(1); } -void -SDL_UnlockAudioDevice(SDL_AudioDeviceID devid) +void SDL_UnlockAudioDevice(SDL_AudioDeviceID devid) { /* Obtain a lock on the mixing buffers */ SDL_AudioDevice *device = get_audio_device(devid); @@ -1671,30 +1619,26 @@ SDL_UnlockAudioDevice(SDL_AudioDeviceID devid) } } -void -SDL_UnlockAudio(void) +void SDL_UnlockAudio(void) { SDL_UnlockAudioDevice(1); } -void -SDL_CloseAudioDevice(SDL_AudioDeviceID devid) +void SDL_CloseAudioDevice(SDL_AudioDeviceID devid) { close_audio_device(get_audio_device(devid)); } -void -SDL_CloseAudio(void) +void SDL_CloseAudio(void) { SDL_CloseAudioDevice(1); } -void -SDL_AudioQuit(void) +void SDL_AudioQuit(void) { SDL_AudioDeviceID i; - if (!current_audio.name) { /* not initialized?! */ + if (!current_audio.name) { /* not initialized?! */ return; } @@ -1722,30 +1666,29 @@ SDL_AudioQuit(void) static int format_idx; static int format_idx_sub; static SDL_AudioFormat format_list[NUM_FORMATS][NUM_FORMATS] = { - {AUDIO_U8, AUDIO_S8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, - AUDIO_U16MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB}, - {AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, - AUDIO_U16MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB}, - {AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S32LSB, - AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S32MSB, - AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S32LSB, - AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_S32MSB, - AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_S16LSB, - AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_S32MSB, AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_S16MSB, - AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S16LSB, - AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8}, - {AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_S32MSB, AUDIO_S32LSB, AUDIO_S16MSB, - AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8}, + { AUDIO_U8, AUDIO_S8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, + AUDIO_U16MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB }, + { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, + AUDIO_U16MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB }, + { AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S32LSB, + AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S32MSB, + AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S32LSB, + AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_S32MSB, + AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_S16LSB, + AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_S32MSB, AUDIO_S32LSB, AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_S16MSB, + AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S16LSB, + AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_F32MSB, AUDIO_F32LSB, AUDIO_S32MSB, AUDIO_S32LSB, AUDIO_S16MSB, + AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8 }, }; -SDL_AudioFormat -SDL_FirstAudioFormat(SDL_AudioFormat format) +SDL_AudioFormat SDL_FirstAudioFormat(SDL_AudioFormat format) { for (format_idx = 0; format_idx < NUM_FORMATS; ++format_idx) { if (format_list[format_idx][0] == format) { @@ -1756,8 +1699,7 @@ SDL_FirstAudioFormat(SDL_AudioFormat format) return SDL_NextAudioFormat(); } -SDL_AudioFormat -SDL_NextAudioFormat(void) +SDL_AudioFormat SDL_NextAudioFormat(void) { if ((format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS)) { return 0; @@ -1765,26 +1707,25 @@ SDL_NextAudioFormat(void) return format_list[format_idx][format_idx_sub++]; } -Uint8 -SDL_SilenceValueForFormat(const SDL_AudioFormat format) +Uint8 SDL_SilenceValueForFormat(const SDL_AudioFormat format) { switch (format) { - /* !!! FIXME: 0x80 isn't perfect for U16, but we can't fit 0x8000 in a - !!! FIXME: byte for SDL_memset() use. This is actually 0.1953 percent - !!! FIXME: off from silence. Maybe just don't use U16. */ - case AUDIO_U16LSB: - case AUDIO_U16MSB: - case AUDIO_U8: - return 0x80; + /* !!! FIXME: 0x80 isn't perfect for U16, but we can't fit 0x8000 in a + !!! FIXME: byte for SDL_memset() use. This is actually 0.1953 percent + !!! FIXME: off from silence. Maybe just don't use U16. */ + case AUDIO_U16LSB: + case AUDIO_U16MSB: + case AUDIO_U8: + return 0x80; - default: break; - } + default: + break; + } return 0x00; } -void -SDL_CalculateAudioSpec(SDL_AudioSpec * spec) +void SDL_CalculateAudioSpec(SDL_AudioSpec *spec) { spec->silence = SDL_SilenceValueForFormat(spec->format); spec->size = SDL_AUDIO_BITSIZE(spec->format) / 8; @@ -1792,13 +1733,11 @@ SDL_CalculateAudioSpec(SDL_AudioSpec * spec) spec->size *= spec->samples; } - /* * Moved here from SDL_mixer.c, since it relies on internals of an opened * audio device (and is deprecated, by the way!). */ -void -SDL_MixAudio(Uint8 * dst, const Uint8 * src, Uint32 len, int volume) +void SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume) { /* Mix the user-level audio format */ SDL_AudioDevice *device = get_audio_device(1); diff --git a/modules/SDL2/src/audio/SDL_audio_c.h b/modules/SDL2/src/audio/SDL_audio_c.h index d6f44ce..9ec79ed 100644 --- a/modules/SDL2/src/audio/SDL_audio_c.h +++ b/modules/SDL2/src/audio/SDL_audio_c.h @@ -40,11 +40,11 @@ #include "samplerate.h" extern SDL_bool SRC_available; extern int SRC_converter; -extern SRC_STATE* (*SRC_src_new)(int converter_type, int channels, int *error); +extern SRC_STATE *(*SRC_src_new)(int converter_type, int channels, int *error); extern int (*SRC_src_process)(SRC_STATE *state, SRC_DATA *data); extern int (*SRC_src_reset)(SRC_STATE *state); -extern SRC_STATE* (*SRC_src_delete)(SRC_STATE *state); -extern const char* (*SRC_src_strerror)(int error); +extern SRC_STATE *(*SRC_src_delete)(SRC_STATE *state); +extern const char *(*SRC_src_strerror)(int error); extern int (*SRC_src_simple)(SRC_DATA *data, int converter_type, int channels); #endif @@ -54,7 +54,7 @@ extern SDL_AudioFormat SDL_NextAudioFormat(void); /* Function to calculate the size and silence for a SDL_AudioSpec */ extern Uint8 SDL_SilenceValueForFormat(const SDL_AudioFormat format); -extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec); +extern void SDL_CalculateAudioSpec(SDL_AudioSpec *spec); /* Choose the audio filter functions below */ extern void SDL_ChooseAudioConverters(void); diff --git a/modules/SDL2/src/audio/SDL_audio_channel_converters.h b/modules/SDL2/src/audio/SDL_audio_channel_converters.h index 283ad6d..72cb511 100644 --- a/modules/SDL2/src/audio/SDL_audio_channel_converters.h +++ b/modules/SDL2/src/audio/SDL_audio_channel_converters.h @@ -21,18 +21,17 @@ /* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_channel_conversion.c */ -static void SDLCALL -SDL_ConvertMonoToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 2))) - 2; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 2))) - 2; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "stereo"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 2) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 2) { const float srcFC = src[0]; dst[1] /* FR */ = srcFC; dst[0] /* FL */ = srcFC; @@ -40,22 +39,21 @@ SDL_ConvertMonoToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 3))) - 3; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 3))) - 3; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "2.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 3) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 3) { const float srcFC = src[0]; dst[2] /* LFE */ = 0.0f; dst[1] /* FR */ = srcFC; @@ -64,22 +62,21 @@ SDL_ConvertMonoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 4))) - 4; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 4))) - 4; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "quad"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 4) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 4) { const float srcFC = src[0]; dst[3] /* BR */ = 0.0f; dst[2] /* BL */ = 0.0f; @@ -89,22 +86,21 @@ SDL_ConvertMonoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 5))) - 5; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 5))) - 5; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "4.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 5) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 5) { const float srcFC = src[0]; dst[4] /* BR */ = 0.0f; dst[3] /* BL */ = 0.0f; @@ -115,22 +111,21 @@ SDL_ConvertMonoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 6))) - 6; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 6))) - 6; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "5.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 6) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 6) { const float srcFC = src[0]; dst[5] /* BR */ = 0.0f; dst[4] /* BL */ = 0.0f; @@ -142,22 +137,21 @@ SDL_ConvertMonoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 7) { const float srcFC = src[0]; dst[6] /* SR */ = 0.0f; dst[5] /* SL */ = 0.0f; @@ -170,22 +164,21 @@ SDL_ConvertMonoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertMonoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 1) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 1) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 1; int i; LOG_DEBUG_CONVERT("mono", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 1); i; i--, src -= 1, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 1); i; i--, src -= 1, dst -= 8) { const float srcFC = src[0]; dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; @@ -199,42 +192,40 @@ SDL_ConvertMonoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = cvt->len_cvt * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("stereo", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src += 2, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src += 2, dst += 1) { dst[0] /* FC */ = (src[0] * 0.500000000f) + (src[1] * 0.500000000f); } cvt->len_cvt = cvt->len_cvt / 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 3))) - 3; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 3))) - 3; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "2.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 3) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 3) { dst[2] /* LFE */ = 0.0f; dst[1] /* FR */ = src[1]; dst[0] /* FL */ = src[0]; @@ -242,22 +233,21 @@ SDL_ConvertStereoTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 4))) - 4; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 4))) - 4; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "quad"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 4) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 4) { dst[3] /* BR */ = 0.0f; dst[2] /* BL */ = 0.0f; dst[1] /* FR */ = src[1]; @@ -266,22 +256,21 @@ SDL_ConvertStereoToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 5))) - 5; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 5))) - 5; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "4.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 5) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 5) { dst[4] /* BR */ = 0.0f; dst[3] /* BL */ = 0.0f; dst[2] /* LFE */ = 0.0f; @@ -291,22 +280,21 @@ SDL_ConvertStereoTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 6))) - 6; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 6))) - 6; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "5.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 6) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 6) { dst[5] /* BR */ = 0.0f; dst[4] /* BL */ = 0.0f; dst[3] /* LFE */ = 0.0f; @@ -317,22 +305,21 @@ SDL_ConvertStereoTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 7) { dst[6] /* SR */ = 0.0f; dst[5] /* SL */ = 0.0f; dst[4] /* BC */ = 0.0f; @@ -344,22 +331,21 @@ SDL_ConvertStereoTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertStereoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 2) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 2; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 2) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 2; int i; LOG_DEBUG_CONVERT("stereo", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 2); i; i--, src -= 2, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 2); i; i--, src -= 2, dst -= 8) { dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; dst[5] /* BR */ = 0.0f; @@ -372,41 +358,39 @@ SDL_ConvertStereoTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 2) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("2.1", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src += 3, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src += 3, dst += 1) { dst[0] /* FC */ = (src[0] * 0.333333343f) + (src[1] * 0.333333343f) + (src[2] * 0.333333343f); } cvt->len_cvt = cvt->len_cvt / 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("2.1", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src += 3, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src += 3, dst += 2) { const float srcLFE = src[2]; dst[0] /* FL */ = (src[0] * 0.800000012f) + (srcLFE * 0.200000003f); dst[1] /* FR */ = (src[1] * 0.800000012f) + (srcLFE * 0.200000003f); @@ -414,22 +398,21 @@ SDL_Convert21ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 3) * 4))) - 4; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 3; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 3) * 4))) - 4; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 3; int i; LOG_DEBUG_CONVERT("2.1", "quad"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src -= 3, dst -= 4) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src -= 3, dst -= 4) { const float srcLFE = src[2]; dst[3] /* BR */ = (srcLFE * 0.111111112f); dst[2] /* BL */ = (srcLFE * 0.111111112f); @@ -439,22 +422,21 @@ SDL_Convert21ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 3) * 5))) - 5; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 3; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 3) * 5))) - 5; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 3; int i; LOG_DEBUG_CONVERT("2.1", "4.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src -= 3, dst -= 5) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src -= 3, dst -= 5) { dst[4] /* BR */ = 0.0f; dst[3] /* BL */ = 0.0f; dst[2] /* LFE */ = src[2]; @@ -464,22 +446,21 @@ SDL_Convert21To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 3) * 6))) - 6; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 3; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 3) * 6))) - 6; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 3; int i; LOG_DEBUG_CONVERT("2.1", "5.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src -= 3, dst -= 6) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src -= 3, dst -= 6) { dst[5] /* BR */ = 0.0f; dst[4] /* BL */ = 0.0f; dst[3] /* LFE */ = src[2]; @@ -490,22 +471,21 @@ SDL_Convert21To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 3) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 3; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 3) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 3; int i; LOG_DEBUG_CONVERT("2.1", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src -= 3, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src -= 3, dst -= 7) { dst[6] /* SR */ = 0.0f; dst[5] /* SL */ = 0.0f; dst[4] /* BC */ = 0.0f; @@ -517,22 +497,21 @@ SDL_Convert21To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert21To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert21To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 3) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 3; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 3) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 3; int i; LOG_DEBUG_CONVERT("2.1", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 3); i; i--, src -= 3, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 3); i; i--, src -= 3, dst -= 8) { dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; dst[5] /* BR */ = 0.0f; @@ -545,41 +524,39 @@ SDL_Convert21To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 3) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("quad", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src += 4, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src += 4, dst += 1) { dst[0] /* FC */ = (src[0] * 0.250000000f) + (src[1] * 0.250000000f) + (src[2] * 0.250000000f) + (src[3] * 0.250000000f); } cvt->len_cvt = cvt->len_cvt / 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("quad", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src += 4, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src += 4, dst += 2) { const float srcBL = src[2]; const float srcBR = src[3]; dst[0] /* FL */ = (src[0] * 0.421000004f) + (srcBL * 0.358999997f) + (srcBR * 0.219999999f); @@ -588,21 +565,20 @@ SDL_ConvertQuadToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("quad", "2.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src += 4, dst += 3) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src += 4, dst += 3) { const float srcBL = src[2]; const float srcBR = src[3]; dst[0] /* FL */ = (src[0] * 0.421000004f) + (srcBL * 0.358999997f) + (srcBR * 0.219999999f); @@ -612,22 +588,21 @@ SDL_ConvertQuadTo21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 4) * 5))) - 5; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 4; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 4) * 5))) - 5; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 4; int i; LOG_DEBUG_CONVERT("quad", "4.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src -= 4, dst -= 5) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src -= 4, dst -= 5) { dst[4] /* BR */ = src[3]; dst[3] /* BL */ = src[2]; dst[2] /* LFE */ = 0.0f; @@ -637,22 +612,21 @@ SDL_ConvertQuadTo41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 4) * 6))) - 6; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 4; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 4) * 6))) - 6; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 4; int i; LOG_DEBUG_CONVERT("quad", "5.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src -= 4, dst -= 6) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src -= 4, dst -= 6) { dst[5] /* BR */ = src[3]; dst[4] /* BL */ = src[2]; dst[3] /* LFE */ = 0.0f; @@ -663,22 +637,21 @@ SDL_ConvertQuadTo51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 4) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 4; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 4) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 4; int i; LOG_DEBUG_CONVERT("quad", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src -= 4, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src -= 4, dst -= 7) { const float srcBL = src[2]; const float srcBR = src[3]; dst[6] /* SR */ = (srcBR * 0.796000004f); @@ -692,22 +665,21 @@ SDL_ConvertQuadTo61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_ConvertQuadTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertQuadTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 4) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 4; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 4) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 4; int i; LOG_DEBUG_CONVERT("quad", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 4); i; i--, src -= 4, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 4); i; i--, src -= 4, dst -= 8) { dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; dst[5] /* BR */ = src[3]; @@ -720,41 +692,39 @@ SDL_ConvertQuadTo71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 4) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("4.1", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src += 5, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src += 5, dst += 1) { dst[0] /* FC */ = (src[0] * 0.200000003f) + (src[1] * 0.200000003f) + (src[2] * 0.200000003f) + (src[3] * 0.200000003f) + (src[4] * 0.200000003f); } cvt->len_cvt = cvt->len_cvt / 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("4.1", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src += 5, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src += 5, dst += 2) { const float srcLFE = src[2]; const float srcBL = src[3]; const float srcBR = src[4]; @@ -764,21 +734,20 @@ SDL_Convert41ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("4.1", "2.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src += 5, dst += 3) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src += 5, dst += 3) { const float srcBL = src[3]; const float srcBR = src[4]; dst[0] /* FL */ = (src[0] * 0.421000004f) + (srcBL * 0.358999997f) + (srcBR * 0.219999999f); @@ -788,21 +757,20 @@ SDL_Convert41To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("4.1", "quad"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src += 5, dst += 4) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src += 5, dst += 4) { const float srcLFE = src[2]; dst[0] /* FL */ = (src[0] * 0.941176474f) + (srcLFE * 0.058823530f); dst[1] /* FR */ = (src[1] * 0.941176474f) + (srcLFE * 0.058823530f); @@ -812,22 +780,21 @@ SDL_Convert41ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 5) * 6))) - 6; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 5; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 5) * 6))) - 6; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 5; int i; LOG_DEBUG_CONVERT("4.1", "5.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src -= 5, dst -= 6) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src -= 5, dst -= 6) { dst[5] /* BR */ = src[4]; dst[4] /* BL */ = src[3]; dst[3] /* LFE */ = src[2]; @@ -838,22 +805,21 @@ SDL_Convert41To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 5) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 5; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 5) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 5; int i; LOG_DEBUG_CONVERT("4.1", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src -= 5, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src -= 5, dst -= 7) { const float srcBL = src[3]; const float srcBR = src[4]; dst[6] /* SR */ = (srcBR * 0.796000004f); @@ -867,22 +833,21 @@ SDL_Convert41To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert41To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert41To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 5) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 5; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 5) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 5; int i; LOG_DEBUG_CONVERT("4.1", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 5); i; i--, src -= 5, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 5); i; i--, src -= 5, dst -= 8) { dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; dst[5] /* BR */ = src[4]; @@ -895,41 +860,39 @@ SDL_Convert41To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 5) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("5.1", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src += 6, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src += 6, dst += 1) { dst[0] /* FC */ = (src[0] * 0.166666672f) + (src[1] * 0.166666672f) + (src[2] * 0.166666672f) + (src[3] * 0.166666672f) + (src[4] * 0.166666672f) + (src[5] * 0.166666672f); } cvt->len_cvt = cvt->len_cvt / 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("5.1", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src += 6, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src += 6, dst += 2) { const float srcFC = src[2]; const float srcLFE = src[3]; const float srcBL = src[4]; @@ -940,21 +903,20 @@ SDL_Convert51ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("5.1", "2.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src += 6, dst += 3) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src += 6, dst += 3) { const float srcFC = src[2]; const float srcBL = src[4]; const float srcBR = src[5]; @@ -965,21 +927,20 @@ SDL_Convert51To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("5.1", "quad"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src += 6, dst += 4) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src += 6, dst += 4) { const float srcFC = src[2]; const float srcLFE = src[3]; dst[0] /* FL */ = (src[0] * 0.558095276f) + (srcFC * 0.394285709f) + (srcLFE * 0.047619049f); @@ -990,21 +951,20 @@ SDL_Convert51ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("5.1", "4.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src += 6, dst += 5) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src += 6, dst += 5) { const float srcFC = src[2]; dst[0] /* FL */ = (src[0] * 0.586000025f) + (srcFC * 0.414000005f); dst[1] /* FR */ = (src[1] * 0.586000025f) + (srcFC * 0.414000005f); @@ -1015,22 +975,21 @@ SDL_Convert51To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 6) * 7))) - 7; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 6; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 6) * 7))) - 7; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 6; int i; LOG_DEBUG_CONVERT("5.1", "6.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src -= 6, dst -= 7) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src -= 6, dst -= 7) { const float srcBL = src[4]; const float srcBR = src[5]; dst[6] /* SR */ = (srcBR * 0.796000004f); @@ -1044,22 +1003,21 @@ SDL_Convert51To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert51To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert51To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 6) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 6; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 6) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 6; int i; LOG_DEBUG_CONVERT("5.1", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 6); i; i--, src -= 6, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 6); i; i--, src -= 6, dst -= 8) { dst[7] /* SR */ = 0.0f; dst[6] /* SL */ = 0.0f; dst[5] /* BR */ = src[5]; @@ -1072,41 +1030,39 @@ SDL_Convert51To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 6) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 1) { dst[0] /* FC */ = (src[0] * 0.143142849f) + (src[1] * 0.143142849f) + (src[2] * 0.143142849f) + (src[3] * 0.142857149f) + (src[4] * 0.143142849f) + (src[5] * 0.143142849f) + (src[6] * 0.143142849f); } cvt->len_cvt = cvt->len_cvt / 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 2) { const float srcFC = src[2]; const float srcLFE = src[3]; const float srcBC = src[4]; @@ -1118,21 +1074,20 @@ SDL_Convert61ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "2.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 3) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 3) { const float srcFC = src[2]; const float srcBC = src[4]; const float srcSL = src[5]; @@ -1144,21 +1099,20 @@ SDL_Convert61To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "quad"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 4) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 4) { const float srcFC = src[2]; const float srcLFE = src[3]; const float srcBC = src[4]; @@ -1172,21 +1126,20 @@ SDL_Convert61ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "4.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 5) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 5) { const float srcFC = src[2]; const float srcBC = src[4]; const float srcSL = src[5]; @@ -1200,21 +1153,20 @@ SDL_Convert61To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("6.1", "5.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src += 7, dst += 6) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src += 7, dst += 6) { const float srcBC = src[4]; const float srcSL = src[5]; const float srcSR = src[6]; @@ -1228,22 +1180,21 @@ SDL_Convert61To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert61To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert61To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / 7) * 8))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 7; + float *dst = ((float *)(cvt->buf + ((cvt->len_cvt / 7) * 8))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 7; int i; LOG_DEBUG_CONVERT("6.1", "7.1"); SDL_assert(format == AUDIO_F32SYS); /* convert backwards, since output is growing in-place. */ - for (i = cvt->len_cvt / (sizeof (float) * 7); i; i--, src -= 7, dst -= 8) { + for (i = cvt->len_cvt / (sizeof(float) * 7); i; i--, src -= 7, dst -= 8) { const float srcBC = src[4]; dst[7] /* SR */ = src[6]; dst[6] /* SL */ = src[5]; @@ -1257,41 +1208,39 @@ SDL_Convert61To71(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 7) * 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71ToMono(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "mono"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 1) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 1) { dst[0] /* FC */ = (src[0] * 0.125125006f) + (src[1] * 0.125125006f) + (src[2] * 0.125125006f) + (src[3] * 0.125000000f) + (src[4] * 0.125125006f) + (src[5] * 0.125125006f) + (src[6] * 0.125125006f) + (src[7] * 0.125125006f); } cvt->len_cvt = cvt->len_cvt / 8; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "stereo"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 2) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 2) { const float srcFC = src[2]; const float srcLFE = src[3]; const float srcBL = src[4]; @@ -1304,21 +1253,20 @@ SDL_Convert71ToStereo(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "2.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 3) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 3) { const float srcFC = src[2]; const float srcBL = src[4]; const float srcBR = src[5]; @@ -1331,21 +1279,20 @@ SDL_Convert71To21(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 3; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "quad"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 4) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 4) { const float srcFC = src[2]; const float srcLFE = src[3]; const float srcSL = src[6]; @@ -1358,21 +1305,20 @@ SDL_Convert71ToQuad(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 4; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "4.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 5) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 5) { const float srcFC = src[2]; const float srcSL = src[6]; const float srcSR = src[7]; @@ -1385,21 +1331,20 @@ SDL_Convert71To41(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 5; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "5.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 6) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 6) { const float srcSL = src[6]; const float srcSR = src[7]; dst[0] /* FL */ = (src[0] * 0.518000007f) + (srcSL * 0.188999996f); @@ -1412,21 +1357,20 @@ SDL_Convert71To51(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 6; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static void SDLCALL -SDL_Convert71To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert71To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i; LOG_DEBUG_CONVERT("7.1", "6.1"); SDL_assert(format == AUDIO_F32SYS); - for (i = cvt->len_cvt / (sizeof (float) * 8); i; i--, src += 8, dst += 7) { + for (i = cvt->len_cvt / (sizeof(float) * 8); i; i--, src += 8, dst += 7) { const float srcBL = src[4]; const float srcBR = src[5]; dst[0] /* FL */ = (src[0] * 0.541000009f); @@ -1440,20 +1384,19 @@ SDL_Convert71To61(SDL_AudioCVT *cvt, SDL_AudioFormat format) cvt->len_cvt = (cvt->len_cvt / 8) * 7; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } -static const SDL_AudioFilter channel_converters[8][8] = { /* [from][to] */ - { NULL, SDL_ConvertMonoToStereo, SDL_ConvertMonoTo21, SDL_ConvertMonoToQuad, SDL_ConvertMonoTo41, SDL_ConvertMonoTo51, SDL_ConvertMonoTo61, SDL_ConvertMonoTo71 }, - { SDL_ConvertStereoToMono, NULL, SDL_ConvertStereoTo21, SDL_ConvertStereoToQuad, SDL_ConvertStereoTo41, SDL_ConvertStereoTo51, SDL_ConvertStereoTo61, SDL_ConvertStereoTo71 }, - { SDL_Convert21ToMono, SDL_Convert21ToStereo, NULL, SDL_Convert21ToQuad, SDL_Convert21To41, SDL_Convert21To51, SDL_Convert21To61, SDL_Convert21To71 }, - { SDL_ConvertQuadToMono, SDL_ConvertQuadToStereo, SDL_ConvertQuadTo21, NULL, SDL_ConvertQuadTo41, SDL_ConvertQuadTo51, SDL_ConvertQuadTo61, SDL_ConvertQuadTo71 }, - { SDL_Convert41ToMono, SDL_Convert41ToStereo, SDL_Convert41To21, SDL_Convert41ToQuad, NULL, SDL_Convert41To51, SDL_Convert41To61, SDL_Convert41To71 }, - { SDL_Convert51ToMono, SDL_Convert51ToStereo, SDL_Convert51To21, SDL_Convert51ToQuad, SDL_Convert51To41, NULL, SDL_Convert51To61, SDL_Convert51To71 }, - { SDL_Convert61ToMono, SDL_Convert61ToStereo, SDL_Convert61To21, SDL_Convert61ToQuad, SDL_Convert61To41, SDL_Convert61To51, NULL, SDL_Convert61To71 }, - { SDL_Convert71ToMono, SDL_Convert71ToStereo, SDL_Convert71To21, SDL_Convert71ToQuad, SDL_Convert71To41, SDL_Convert71To51, SDL_Convert71To61, NULL } +static const SDL_AudioFilter channel_converters[8][8] = { /* [from][to] */ + { NULL, SDL_ConvertMonoToStereo, SDL_ConvertMonoTo21, SDL_ConvertMonoToQuad, SDL_ConvertMonoTo41, SDL_ConvertMonoTo51, SDL_ConvertMonoTo61, SDL_ConvertMonoTo71 }, + { SDL_ConvertStereoToMono, NULL, SDL_ConvertStereoTo21, SDL_ConvertStereoToQuad, SDL_ConvertStereoTo41, SDL_ConvertStereoTo51, SDL_ConvertStereoTo61, SDL_ConvertStereoTo71 }, + { SDL_Convert21ToMono, SDL_Convert21ToStereo, NULL, SDL_Convert21ToQuad, SDL_Convert21To41, SDL_Convert21To51, SDL_Convert21To61, SDL_Convert21To71 }, + { SDL_ConvertQuadToMono, SDL_ConvertQuadToStereo, SDL_ConvertQuadTo21, NULL, SDL_ConvertQuadTo41, SDL_ConvertQuadTo51, SDL_ConvertQuadTo61, SDL_ConvertQuadTo71 }, + { SDL_Convert41ToMono, SDL_Convert41ToStereo, SDL_Convert41To21, SDL_Convert41ToQuad, NULL, SDL_Convert41To51, SDL_Convert41To61, SDL_Convert41To71 }, + { SDL_Convert51ToMono, SDL_Convert51ToStereo, SDL_Convert51To21, SDL_Convert51ToQuad, SDL_Convert51To41, NULL, SDL_Convert51To61, SDL_Convert51To71 }, + { SDL_Convert61ToMono, SDL_Convert61ToStereo, SDL_Convert61To21, SDL_Convert61ToQuad, SDL_Convert61To41, SDL_Convert61To51, NULL, SDL_Convert61To71 }, + { SDL_Convert71ToMono, SDL_Convert71ToStereo, SDL_Convert71To21, SDL_Convert71ToQuad, SDL_Convert71To41, SDL_Convert71To51, SDL_Convert71To61, NULL } }; /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/audio/SDL_audio_resampler_filter.h b/modules/SDL2/src/audio/SDL_audio_resampler_filter.h index ddb7664..83cde7c 100644 --- a/modules/SDL2/src/audio/SDL_audio_resampler_filter.h +++ b/modules/SDL2/src/audio/SDL_audio_resampler_filter.h @@ -21,10 +21,10 @@ /* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_resampler_filter.c */ -#define RESAMPLER_ZERO_CROSSINGS 5 -#define RESAMPLER_BITS_PER_SAMPLE 16 +#define RESAMPLER_ZERO_CROSSINGS 5 +#define RESAMPLER_BITS_PER_SAMPLE 16 #define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1)) -#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1) +#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1) static const float ResamplerFilter[RESAMPLER_FILTER_SIZE] = { 1.000000000f, 0.999993682f, 0.999974370f, 0.999941289f, 0.999894559f, @@ -1059,4 +1059,3 @@ static const float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE] = { }; /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/audio/SDL_audiocvt.c b/modules/SDL2/src/audio/SDL_audiocvt.c index de97bea..ed4333e 100644 --- a/modules/SDL2/src/audio/SDL_audiocvt.c +++ b/modules/SDL2/src/audio/SDL_audiocvt.c @@ -48,16 +48,16 @@ #define HAVE_AVX_INTRINSICS 1 #endif #if defined __clang__ -# if (!__has_attribute(target)) -# undef HAVE_AVX_INTRINSICS -# endif -# if (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX__) -# undef HAVE_AVX_INTRINSICS -# endif +#if (!__has_attribute(target)) +#undef HAVE_AVX_INTRINSICS +#endif +#if (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX__) +#undef HAVE_AVX_INTRINSICS +#endif #elif defined __GNUC__ -# if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 9) -# undef HAVE_AVX_INTRINSICS -# endif +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 9) +#undef HAVE_AVX_INTRINSICS +#endif #endif /* @@ -95,11 +95,10 @@ #if HAVE_SSE3_INTRINSICS /* Convert from stereo to mono. Average left and right. */ -static void SDLCALL -SDL_ConvertStereoToMono_SSE3(SDL_AudioCVT * cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertStereoToMono_SSE3(SDL_AudioCVT *cvt, SDL_AudioFormat format) { const __m128 divby2 = _mm_set1_ps(0.5f); - float *dst = (float *) cvt->buf; + float *dst = (float *)cvt->buf; const float *src = dst; int i = cvt->len_cvt / 8; @@ -109,32 +108,35 @@ SDL_ConvertStereoToMono_SSE3(SDL_AudioCVT * cvt, SDL_AudioFormat format) /* Do SSE blocks as long as we have 16 bytes available. Just use unaligned load/stores, if the memory at runtime is aligned it'll be just as fast on modern processors */ - while (i >= 4) { /* 4 * float32 */ - _mm_storeu_ps(dst, _mm_mul_ps(_mm_hadd_ps(_mm_loadu_ps(src), _mm_loadu_ps(src+4)), divby2)); - i -= 4; src += 8; dst += 4; + while (i >= 4) { /* 4 * float32 */ + _mm_storeu_ps(dst, _mm_mul_ps(_mm_hadd_ps(_mm_loadu_ps(src), _mm_loadu_ps(src + 4)), divby2)); + i -= 4; + src += 8; + dst += 4; } /* Finish off any leftovers with scalar operations. */ while (i) { *dst = (src[0] + src[1]) * 0.5f; - dst++; i--; src += 2; + dst++; + i--; + src += 2; } cvt->len_cvt /= 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } #endif #if HAVE_SSE_INTRINSICS /* Convert from mono to stereo. Duplicate to stereo left and right. */ -static void SDLCALL -SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT * cvt, SDL_AudioFormat format) +static void SDLCALL SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - float *dst = ((float *) (cvt->buf + (cvt->len_cvt * 2))) - 8; - const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - 4; - int i = cvt->len_cvt / sizeof (float); + float *dst = ((float *)(cvt->buf + (cvt->len_cvt * 2))) - 8; + const float *src = ((const float *)(cvt->buf + cvt->len_cvt)) - 4; + int i = cvt->len_cvt / sizeof(float); LOG_DEBUG_CONVERT("mono", "stereo (using SSE)"); SDL_assert(format == AUDIO_F32SYS); @@ -143,117 +145,122 @@ SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT * cvt, SDL_AudioFormat format) Just use unaligned load/stores, if the memory at runtime is aligned it'll be just as fast on modern processors */ /* convert backwards, since output is growing in-place. */ - while (i >= 4) { /* 4 * float32 */ - const __m128 input = _mm_loadu_ps(src); /* A B C D */ - _mm_storeu_ps(dst, _mm_unpacklo_ps(input, input)); /* A A B B */ - _mm_storeu_ps(dst+4, _mm_unpackhi_ps(input, input)); /* C C D D */ - i -= 4; src -= 4; dst -= 8; + while (i >= 4) { /* 4 * float32 */ + const __m128 input = _mm_loadu_ps(src); /* A B C D */ + _mm_storeu_ps(dst, _mm_unpacklo_ps(input, input)); /* A A B B */ + _mm_storeu_ps(dst + 4, _mm_unpackhi_ps(input, input)); /* C C D D */ + i -= 4; + src -= 4; + dst -= 8; } /* Finish off any leftovers with scalar operations. */ - src += 3; dst += 6; /* adjust for smaller buffers. */ - while (i) { /* convert backwards, since output is growing in-place. */ + src += 3; + dst += 6; /* adjust for smaller buffers. */ + while (i) { /* convert backwards, since output is growing in-place. */ const float srcFC = src[0]; dst[1] /* FR */ = srcFC; dst[0] /* FL */ = srcFC; - i--; src--; dst -= 2; + i--; + src--; + dst -= 2; } cvt->len_cvt *= 2; if (cvt->filters[++cvt->filter_index]) { - cvt->filters[cvt->filter_index] (cvt, format); + cvt->filters[cvt->filter_index](cvt, format); } } #endif - /* Include the autogenerated channel converters... */ #include "SDL_audio_channel_converters.h" - - /* SDL's resampler uses a "bandlimited interpolation" algorithm: https://ccrma.stanford.edu/~jos/resample/ */ #include "SDL_audio_resampler_filter.h" -static int -ResamplerPadding(const int inrate, const int outrate) +static Sint32 ResamplerPadding(const Sint32 inrate, const Sint32 outrate) { + /* This function uses integer arithmetics to avoid precision loss caused + * by large floating point numbers. Sint32 is needed for the large number + * multiplication. The integers are assumed to be non-negative so that + * division rounds by truncation. */ if (inrate == outrate) { return 0; } if (inrate > outrate) { - return (int) SDL_ceilf(((float) (RESAMPLER_SAMPLES_PER_ZERO_CROSSING * inrate) / ((float) outrate))); + return (RESAMPLER_SAMPLES_PER_ZERO_CROSSING * inrate + outrate - 1) / outrate; } return RESAMPLER_SAMPLES_PER_ZERO_CROSSING; } -/* lpadding and rpadding are expected to be buffers of (ResamplePadding(inrate, outrate) * chans * sizeof (float)) bytes. */ -static int -SDL_ResampleAudio(const int chans, const int inrate, const int outrate, - const float *lpadding, const float *rpadding, - const float *inbuf, const int inbuflen, - float *outbuf, const int outbuflen) +/* lpadding and rpadding are expected to be buffers of (ResamplePadding(inrate, outrate) * chans * sizeof(float)) bytes. */ +static int SDL_ResampleAudio(const int chans, const int inrate, const int outrate, + const float *lpadding, const float *rpadding, + const float *inbuf, const int inbuflen, + float *outbuf, const int outbuflen) { - /* Note that this used to be double, but it looks like we can get by with float in most cases at - almost twice the speed on Intel processors, and orders of magnitude more - on CPUs that need a software fallback for double calculations. */ - typedef float ResampleFloatType; - - const ResampleFloatType finrate = (ResampleFloatType) inrate; - const ResampleFloatType ratio = ((float) outrate) / ((float) inrate); + /* This function uses integer arithmetics to avoid precision loss caused + * by large floating point numbers. For some operations, Sint32 or Sint64 + * are needed for the large number multiplications. The input integers are + * assumed to be non-negative so that division rounds by truncation and + * modulo is always non-negative. Note that the operator order is important + * for these integer divisions. */ const int paddinglen = ResamplerPadding(inrate, outrate); - const int framelen = chans * (int)sizeof (float); + const int framelen = chans * (int)sizeof(float); const int inframes = inbuflen / framelen; - const int wantedoutframes = (int) ((inbuflen / framelen) * ratio); /* outbuflen isn't total to write, it's total available. */ + /* outbuflen isn't total to write, it's total available. */ + const int wantedoutframes = (int)((Sint64)inframes * outrate / inrate); const int maxoutframes = outbuflen / framelen; const int outframes = SDL_min(wantedoutframes, maxoutframes); - ResampleFloatType outtime = 0.0f; float *dst = outbuf; int i, j, chan; for (i = 0; i < outframes; i++) { - const int srcindex = (int) (outtime * inrate); - const ResampleFloatType intime = ((ResampleFloatType) srcindex) / finrate; - const ResampleFloatType innexttime = ((ResampleFloatType) (srcindex + 1)) / finrate; - const ResampleFloatType indeltatime = innexttime - intime; - const ResampleFloatType interpolation1 = (indeltatime == 0.0f) ? 1.0f : (1.0f - ((innexttime - outtime) / indeltatime)); - const int filterindex1 = (int) (interpolation1 * RESAMPLER_SAMPLES_PER_ZERO_CROSSING); - const ResampleFloatType interpolation2 = 1.0f - interpolation1; - const int filterindex2 = (int) (interpolation2 * RESAMPLER_SAMPLES_PER_ZERO_CROSSING); + const int srcindex = (int)((Sint64)i * inrate / outrate); + /* Calculating the following way avoids subtraction or modulo of large + * floats which have low result precision. + * interpolation1 + * = (i / outrate * inrate) - floor(i / outrate * inrate) + * = mod(i / outrate * inrate, 1) + * = mod(i * inrate, outrate) / outrate */ + const int srcfraction = ((Sint64)i) * inrate % outrate; + const float interpolation1 = ((float)srcfraction) / ((float)outrate); + const int filterindex1 = ((Sint32)srcfraction) * RESAMPLER_SAMPLES_PER_ZERO_CROSSING / outrate; + const float interpolation2 = 1.0f - interpolation1; + const int filterindex2 = ((Sint32)(outrate - srcfraction)) * RESAMPLER_SAMPLES_PER_ZERO_CROSSING / outrate; for (chan = 0; chan < chans; chan++) { float outsample = 0.0f; /* do this twice to calculate the sample, once for the "left wing" and then same for the right. */ for (j = 0; (filterindex1 + (j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) < RESAMPLER_FILTER_SIZE; j++) { + const int filt_ind = filterindex1 + j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING; const int srcframe = srcindex - j; /* !!! FIXME: we can bubble this conditional out of here by doing a pre loop. */ const float insample = (srcframe < 0) ? lpadding[((paddinglen + srcframe) * chans) + chan] : inbuf[(srcframe * chans) + chan]; - outsample += (float)(insample * (ResamplerFilter[filterindex1 + (j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING)] + (interpolation1 * ResamplerFilterDifference[filterindex1 + (j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING)]))); + outsample += (float) (insample * (ResamplerFilter[filt_ind] + (interpolation1 * ResamplerFilterDifference[filt_ind]))); } /* Do the right wing! */ for (j = 0; (filterindex2 + (j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) < RESAMPLER_FILTER_SIZE; j++) { - const int jsamples = j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING; + const int filt_ind = filterindex2 + j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING; const int srcframe = srcindex + 1 + j; /* !!! FIXME: we can bubble this conditional out of here by doing a post loop. */ const float insample = (srcframe >= inframes) ? rpadding[((srcframe - inframes) * chans) + chan] : inbuf[(srcframe * chans) + chan]; - outsample += (float)(insample * (ResamplerFilter[filterindex2 + jsamples] + (interpolation2 * ResamplerFilterDifference[filterindex2 + jsamples]))); + outsample += (float) (insample * (ResamplerFilter[filt_ind] + (interpolation2 * ResamplerFilterDifference[filt_ind]))); } *(dst++) = outsample; } - - outtime = ((ResampleFloatType) i) / ((ResampleFloatType) outrate); } - return outframes * chans * sizeof (float); + return outframes * chans * sizeof(float); } -int -SDL_ConvertAudio(SDL_AudioCVT * cvt) +int SDL_ConvertAudio(SDL_AudioCVT *cvt) { /* !!! FIXME: (cvt) should be const; stack-copy it here. */ /* !!! FIXME: (actually, we can't...len_cvt needs to be updated. Grr.) */ @@ -271,35 +278,37 @@ SDL_ConvertAudio(SDL_AudioCVT * cvt) /* Set up the conversion and go! */ cvt->filter_index = 0; - cvt->filters[0] (cvt, cvt->src_format); + cvt->filters[0](cvt, cvt->src_format); return 0; } -static void SDLCALL -SDL_Convert_Byteswap(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_Byteswap(SDL_AudioCVT *cvt, SDL_AudioFormat format) { #if DEBUG_CONVERT SDL_Log("SDL_AUDIO_CONVERT: Converting byte order\n"); #endif switch (SDL_AUDIO_BITSIZE(format)) { - #define CASESWAP(b) \ - case b: { \ - Uint##b *ptr = (Uint##b *) cvt->buf; \ - int i; \ - for (i = cvt->len_cvt / sizeof (*ptr); i; --i, ++ptr) { \ - *ptr = SDL_Swap##b(*ptr); \ - } \ - break; \ - } +#define CASESWAP(b) \ + case b: \ + { \ + Uint##b *ptr = (Uint##b *)cvt->buf; \ + int i; \ + for (i = cvt->len_cvt / sizeof(*ptr); i; --i, ++ptr) { \ + *ptr = SDL_Swap##b(*ptr); \ + } \ + break; \ + } CASESWAP(16); CASESWAP(32); CASESWAP(64); - #undef CASESWAP +#undef CASESWAP - default: SDL_assert(!"unhandled byteswap datatype!"); break; + default: + SDL_assert(!"unhandled byteswap datatype!"); + break; } if (cvt->filters[++cvt->filter_index]) { @@ -313,8 +322,7 @@ SDL_Convert_Byteswap(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static int -SDL_AddAudioCVTFilter(SDL_AudioCVT *cvt, const SDL_AudioFilter filter) +static int SDL_AddAudioCVTFilter(SDL_AudioCVT *cvt, SDL_AudioFilter filter) { if (cvt->filter_index >= SDL_AUDIOCVT_MAX_FILTERS) { return SDL_SetError("Too many filters needed for conversion, exceeded maximum of %d", SDL_AUDIOCVT_MAX_FILTERS); @@ -325,16 +333,15 @@ SDL_AddAudioCVTFilter(SDL_AudioCVT *cvt, const SDL_AudioFilter filter) return 0; } -static int -SDL_BuildAudioTypeCVTToFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat src_fmt) +static int SDL_BuildAudioTypeCVTToFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat src_fmt) { - int retval = 0; /* 0 == no conversion necessary. */ + int retval = 0; /* 0 == no conversion necessary. */ if ((SDL_AUDIO_ISBIGENDIAN(src_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN) && SDL_AUDIO_BITSIZE(src_fmt) > 8) { if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) { return -1; } - retval = 1; /* added a converter. */ + retval = 1; /* added a converter. */ } if (!SDL_AUDIO_ISFLOAT(src_fmt)) { @@ -343,12 +350,24 @@ SDL_BuildAudioTypeCVTToFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat src_fmt) SDL_AudioFilter filter = NULL; switch (src_fmt & ~SDL_AUDIO_MASK_ENDIAN) { - case AUDIO_S8: filter = SDL_Convert_S8_to_F32; break; - case AUDIO_U8: filter = SDL_Convert_U8_to_F32; break; - case AUDIO_S16: filter = SDL_Convert_S16_to_F32; break; - case AUDIO_U16: filter = SDL_Convert_U16_to_F32; break; - case AUDIO_S32: filter = SDL_Convert_S32_to_F32; break; - default: SDL_assert(!"Unexpected audio format!"); break; + case AUDIO_S8: + filter = SDL_Convert_S8_to_F32; + break; + case AUDIO_U8: + filter = SDL_Convert_U8_to_F32; + break; + case AUDIO_S16: + filter = SDL_Convert_S16_to_F32; + break; + case AUDIO_U16: + filter = SDL_Convert_U16_to_F32; + break; + case AUDIO_S32: + filter = SDL_Convert_S32_to_F32; + break; + default: + SDL_assert(!"Unexpected audio format!"); + break; } if (!filter) { @@ -363,31 +382,43 @@ SDL_BuildAudioTypeCVTToFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat src_fmt) cvt->len_mult *= mult; cvt->len_ratio *= mult; } else if (src_bitsize > dst_bitsize) { - cvt->len_ratio /= (src_bitsize / dst_bitsize); + const int div = (src_bitsize / dst_bitsize); + cvt->len_ratio /= div; } - retval = 1; /* added a converter. */ + retval = 1; /* added a converter. */ } return retval; } -static int -SDL_BuildAudioTypeCVTFromFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat dst_fmt) +static int SDL_BuildAudioTypeCVTFromFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat dst_fmt) { - int retval = 0; /* 0 == no conversion necessary. */ + int retval = 0; /* 0 == no conversion necessary. */ if (!SDL_AUDIO_ISFLOAT(dst_fmt)) { const Uint16 dst_bitsize = SDL_AUDIO_BITSIZE(dst_fmt); const Uint16 src_bitsize = 32; SDL_AudioFilter filter = NULL; switch (dst_fmt & ~SDL_AUDIO_MASK_ENDIAN) { - case AUDIO_S8: filter = SDL_Convert_F32_to_S8; break; - case AUDIO_U8: filter = SDL_Convert_F32_to_U8; break; - case AUDIO_S16: filter = SDL_Convert_F32_to_S16; break; - case AUDIO_U16: filter = SDL_Convert_F32_to_U16; break; - case AUDIO_S32: filter = SDL_Convert_F32_to_S32; break; - default: SDL_assert(!"Unexpected audio format!"); break; + case AUDIO_S8: + filter = SDL_Convert_F32_to_S8; + break; + case AUDIO_U8: + filter = SDL_Convert_F32_to_U8; + break; + case AUDIO_S16: + filter = SDL_Convert_F32_to_S16; + break; + case AUDIO_U16: + filter = SDL_Convert_F32_to_U16; + break; + case AUDIO_S32: + filter = SDL_Convert_F32_to_S32; + break; + default: + SDL_assert(!"Unexpected audio format!"); + break; } if (!filter) { @@ -405,14 +436,14 @@ SDL_BuildAudioTypeCVTFromFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat dst_fmt) const int div = (src_bitsize / dst_bitsize); cvt->len_ratio /= div; } - retval = 1; /* added a converter. */ + retval = 1; /* added a converter. */ } if ((SDL_AUDIO_ISBIGENDIAN(dst_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN) && SDL_AUDIO_BITSIZE(dst_fmt) > 8) { if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) { return -1; } - retval = 1; /* added a converter. */ + retval = 1; /* added a converter. */ } return retval; @@ -420,12 +451,11 @@ SDL_BuildAudioTypeCVTFromFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat dst_fmt) #ifdef HAVE_LIBSAMPLERATE_H -static void -SDL_ResampleCVT_SRC(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format) +static void SDL_ResampleCVT_SRC(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; + const float *src = (const float *)cvt->buf; const int srclen = cvt->len_cvt; - float *dst = (float *) (cvt->buf + srclen); + float *dst = (float *)(cvt->buf + srclen); const int dstlen = (cvt->len * cvt->len_mult) - srclen; const int framelen = sizeof(float) * chans; int result = 0; @@ -442,12 +472,12 @@ SDL_ResampleCVT_SRC(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat fo data.src_ratio = cvt->rate_incr; result = SRC_src_simple(&data, SRC_converter, chans); /* Simple API converts the whole buffer at once. No need for initialization. */ - /* !!! FIXME: Handle library failures? */ - #ifdef DEBUG_CONVERT +/* !!! FIXME: Handle library failures? */ +#ifdef DEBUG_CONVERT if (result != 0) { SDL_Log("src_simple() failed: %s", SRC_src_strerror(result)); } - #endif +#endif cvt->len_cvt = data.output_frames_gen * framelen; @@ -460,20 +490,19 @@ SDL_ResampleCVT_SRC(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat fo #endif /* HAVE_LIBSAMPLERATE_H */ -static void -SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format) +static void SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format) { /* !!! FIXME in 2.1: there are ten slots in the filter list, and the theoretical maximum we use is six (seven with NULL terminator). !!! FIXME in 2.1: We need to store data for this resampler, because the cvt structure doesn't store the original sample rates, !!! FIXME in 2.1: so we steal the ninth and tenth slot. :( */ - const int inrate = (int) (size_t) cvt->filters[SDL_AUDIOCVT_MAX_FILTERS-1]; - const int outrate = (int) (size_t) cvt->filters[SDL_AUDIOCVT_MAX_FILTERS]; - const float *src = (const float *) cvt->buf; + const int inrate = (int)(size_t)cvt->filters[SDL_AUDIOCVT_MAX_FILTERS - 1]; + const int outrate = (int)(size_t)cvt->filters[SDL_AUDIOCVT_MAX_FILTERS]; + const float *src = (const float *)cvt->buf; const int srclen = cvt->len_cvt; /*float *dst = (float *) cvt->buf; const int dstlen = (cvt->len * cvt->len_mult);*/ /* !!! FIXME: remove this if we can get the resampler to work in-place again. */ - float *dst = (float *) (cvt->buf + srclen); + float *dst = (float *)(cvt->buf + srclen); const int dstlen = (cvt->len * cvt->len_mult) - srclen; const int requestedpadding = ResamplerPadding(inrate, outrate); int paddingsamples; @@ -487,8 +516,8 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format SDL_assert(format == AUDIO_F32SYS); /* we keep no streaming state here, so pad with silence on both ends. */ - padding = (float *) SDL_calloc(paddingsamples ? paddingsamples : 1, sizeof (float)); - if (!padding) { + padding = (float *)SDL_calloc(paddingsamples ? paddingsamples : 1, sizeof(float)); + if (padding == NULL) { SDL_OutOfMemory(); return; } @@ -497,7 +526,7 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format SDL_free(padding); - SDL_memmove(cvt->buf, dst, cvt->len_cvt); /* !!! FIXME: remove this if we can get the resampler to work in-place again. */ + SDL_memmove(cvt->buf, dst, cvt->len_cvt); /* !!! FIXME: remove this if we can get the resampler to work in-place again. */ if (cvt->filters[++cvt->filter_index]) { cvt->filters[cvt->filter_index](cvt, format); @@ -508,10 +537,11 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format !!! FIXME: store channel info, so we have to have function entry !!! FIXME: points for each supported channel count and multiple !!! FIXME: vs arbitrary. When we rev the ABI, clean this up. */ -#define RESAMPLER_FUNCS(chans) \ - static void SDLCALL \ - SDL_ResampleCVT_c##chans(SDL_AudioCVT *cvt, SDL_AudioFormat format) { \ - SDL_ResampleCVT(cvt, chans, format); \ +#define RESAMPLER_FUNCS(chans) \ + static void SDLCALL \ + SDL_ResampleCVT_c##chans(SDL_AudioCVT *cvt, SDL_AudioFormat format) \ + { \ + SDL_ResampleCVT(cvt, chans, format); \ } RESAMPLER_FUNCS(1) RESAMPLER_FUNCS(2) @@ -521,10 +551,11 @@ RESAMPLER_FUNCS(8) #undef RESAMPLER_FUNCS #ifdef HAVE_LIBSAMPLERATE_H -#define RESAMPLER_FUNCS(chans) \ - static void SDLCALL \ - SDL_ResampleCVT_SRC_c##chans(SDL_AudioCVT *cvt, SDL_AudioFormat format) { \ - SDL_ResampleCVT_SRC(cvt, chans, format); \ +#define RESAMPLER_FUNCS(chans) \ + static void SDLCALL \ + SDL_ResampleCVT_SRC_c##chans(SDL_AudioCVT *cvt, SDL_AudioFormat format) \ + { \ + SDL_ResampleCVT_SRC(cvt, chans, format); \ } RESAMPLER_FUNCS(1) RESAMPLER_FUNCS(2) @@ -534,42 +565,52 @@ RESAMPLER_FUNCS(8) #undef RESAMPLER_FUNCS #endif /* HAVE_LIBSAMPLERATE_H */ -static SDL_AudioFilter -ChooseCVTResampler(const int dst_channels) +static SDL_AudioFilter ChooseCVTResampler(const int dst_channels) { - #ifdef HAVE_LIBSAMPLERATE_H +#ifdef HAVE_LIBSAMPLERATE_H if (SRC_available) { switch (dst_channels) { - case 1: return SDL_ResampleCVT_SRC_c1; - case 2: return SDL_ResampleCVT_SRC_c2; - case 4: return SDL_ResampleCVT_SRC_c4; - case 6: return SDL_ResampleCVT_SRC_c6; - case 8: return SDL_ResampleCVT_SRC_c8; - default: break; + case 1: + return SDL_ResampleCVT_SRC_c1; + case 2: + return SDL_ResampleCVT_SRC_c2; + case 4: + return SDL_ResampleCVT_SRC_c4; + case 6: + return SDL_ResampleCVT_SRC_c6; + case 8: + return SDL_ResampleCVT_SRC_c8; + default: + break; } } - #endif /* HAVE_LIBSAMPLERATE_H */ +#endif /* HAVE_LIBSAMPLERATE_H */ switch (dst_channels) { - case 1: return SDL_ResampleCVT_c1; - case 2: return SDL_ResampleCVT_c2; - case 4: return SDL_ResampleCVT_c4; - case 6: return SDL_ResampleCVT_c6; - case 8: return SDL_ResampleCVT_c8; - default: break; + case 1: + return SDL_ResampleCVT_c1; + case 2: + return SDL_ResampleCVT_c2; + case 4: + return SDL_ResampleCVT_c4; + case 6: + return SDL_ResampleCVT_c6; + case 8: + return SDL_ResampleCVT_c8; + default: + break; } return NULL; } -static int -SDL_BuildAudioResampleCVT(SDL_AudioCVT * cvt, const int dst_channels, - const int src_rate, const int dst_rate) +static int SDL_BuildAudioResampleCVT(SDL_AudioCVT *cvt, const int dst_channels, + const int src_rate, const int dst_rate) { SDL_AudioFilter filter; if (src_rate == dst_rate) { - return 0; /* no conversion necessary. */ + return 0; /* no conversion necessary. */ } filter = ChooseCVTResampler(dst_channels); @@ -585,18 +626,18 @@ SDL_BuildAudioResampleCVT(SDL_AudioCVT * cvt, const int dst_channels, /* !!! FIXME in 2.1: there are ten slots in the filter list, and the theoretical maximum we use is six (seven with NULL terminator). !!! FIXME in 2.1: We need to store data for this resampler, because the cvt structure doesn't store the original sample rates, !!! FIXME in 2.1: so we steal the ninth and tenth slot. :( */ - if (cvt->filter_index >= (SDL_AUDIOCVT_MAX_FILTERS-2)) { - return SDL_SetError("Too many filters needed for conversion, exceeded maximum of %d", SDL_AUDIOCVT_MAX_FILTERS-2); + if (cvt->filter_index >= (SDL_AUDIOCVT_MAX_FILTERS - 2)) { + return SDL_SetError("Too many filters needed for conversion, exceeded maximum of %d", SDL_AUDIOCVT_MAX_FILTERS - 2); } - cvt->filters[SDL_AUDIOCVT_MAX_FILTERS-1] = (SDL_AudioFilter) (uintptr_t) src_rate; - cvt->filters[SDL_AUDIOCVT_MAX_FILTERS] = (SDL_AudioFilter) (uintptr_t) dst_rate; + cvt->filters[SDL_AUDIOCVT_MAX_FILTERS - 1] = (SDL_AudioFilter)(uintptr_t)src_rate; + cvt->filters[SDL_AUDIOCVT_MAX_FILTERS] = (SDL_AudioFilter)(uintptr_t)dst_rate; if (src_rate < dst_rate) { - const double mult = ((double) dst_rate) / ((double) src_rate); - cvt->len_mult *= (int) SDL_ceil(mult); + const double mult = ((double)dst_rate) / ((double)src_rate); + cvt->len_mult *= (int)SDL_ceil(mult); cvt->len_ratio *= mult; } else { - cvt->len_ratio /= ((double) src_rate) / ((double) dst_rate); + cvt->len_ratio /= ((double)src_rate) / ((double)dst_rate); } /* !!! FIXME: remove this if we can get the resampler to work in-place again. */ @@ -604,48 +645,44 @@ SDL_BuildAudioResampleCVT(SDL_AudioCVT * cvt, const int dst_channels, we need it large enough to hold a separate scratch buffer. */ cvt->len_mult *= 2; - return 1; /* added a converter. */ + return 1; /* added a converter. */ } -static SDL_bool -SDL_SupportedAudioFormat(const SDL_AudioFormat fmt) +static SDL_bool SDL_SupportedAudioFormat(const SDL_AudioFormat fmt) { switch (fmt) { - case AUDIO_U8: - case AUDIO_S8: - case AUDIO_U16LSB: - case AUDIO_S16LSB: - case AUDIO_U16MSB: - case AUDIO_S16MSB: - case AUDIO_S32LSB: - case AUDIO_S32MSB: - case AUDIO_F32LSB: - case AUDIO_F32MSB: - return SDL_TRUE; /* supported. */ - - default: - break; - } - - return SDL_FALSE; /* unsupported. */ + case AUDIO_U8: + case AUDIO_S8: + case AUDIO_U16LSB: + case AUDIO_S16LSB: + case AUDIO_U16MSB: + case AUDIO_S16MSB: + case AUDIO_S32LSB: + case AUDIO_S32MSB: + case AUDIO_F32LSB: + case AUDIO_F32MSB: + return SDL_TRUE; /* supported. */ + + default: + break; + } + + return SDL_FALSE; /* unsupported. */ } -static SDL_bool -SDL_SupportedChannelCount(const int channels) +static SDL_bool SDL_SupportedChannelCount(const int channels) { return ((channels >= 1) && (channels <= 8)) ? SDL_TRUE : SDL_FALSE; } - /* Creates a set of audio filters to convert from one format to another. Returns 0 if no conversion is needed, 1 if the audio filter is set up, or -1 if an error like invalid parameter, unsupported format, etc. occurred. */ -int -SDL_BuildAudioCVT(SDL_AudioCVT * cvt, - SDL_AudioFormat src_fmt, Uint8 src_channels, int src_rate, - SDL_AudioFormat dst_fmt, Uint8 dst_channels, int dst_rate) +int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, + SDL_AudioFormat src_format, Uint8 src_channels, int src_rate, + SDL_AudioFormat dst_format, Uint8 dst_channels, int dst_rate) { SDL_AudioFilter channel_converter = NULL; @@ -657,10 +694,10 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, /* Make sure we zero out the audio conversion before error checking */ SDL_zerop(cvt); - if (!SDL_SupportedAudioFormat(src_fmt)) { + if (!SDL_SupportedAudioFormat(src_format)) { return SDL_SetError("Invalid source format"); } - if (!SDL_SupportedAudioFormat(dst_fmt)) { + if (!SDL_SupportedAudioFormat(dst_format)) { return SDL_SetError("Invalid destination format"); } if (!SDL_SupportedChannelCount(src_channels)) { @@ -684,18 +721,18 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, #if DEBUG_CONVERT SDL_Log("SDL_AUDIO_CONVERT: Build format %04x->%04x, channels %u->%u, rate %d->%d\n", - src_fmt, dst_fmt, src_channels, dst_channels, src_rate, dst_rate); + src_format, dst_format, src_channels, dst_channels, src_rate, dst_rate); #endif /* Start off with no conversion necessary */ - cvt->src_format = src_fmt; - cvt->dst_format = dst_fmt; + cvt->src_format = src_format; + cvt->dst_format = dst_format; cvt->needed = 0; cvt->filter_index = 0; SDL_zeroa(cvt->filters); cvt->len_mult = 1; cvt->len_ratio = 1.0; - cvt->rate_incr = ((double) dst_rate) / ((double) src_rate); + cvt->rate_incr = ((double)dst_rate) / ((double)src_rate); /* Make sure we've chosen audio conversion functions (SIMD, scalar, etc.) */ SDL_ChooseAudioConverters(); @@ -716,13 +753,13 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, /* see if we can skip float conversion entirely. */ if (src_rate == dst_rate && src_channels == dst_channels) { - if (src_fmt == dst_fmt) { + if (src_format == dst_format) { return 0; } /* just a byteswap needed? */ - if ((src_fmt & ~SDL_AUDIO_MASK_ENDIAN) == (dst_fmt & ~SDL_AUDIO_MASK_ENDIAN)) { - if (SDL_AUDIO_BITSIZE(dst_fmt) == 8) { + if ((src_format & ~SDL_AUDIO_MASK_ENDIAN) == (dst_format & ~SDL_AUDIO_MASK_ENDIAN)) { + if (SDL_AUDIO_BITSIZE(dst_format) == 8) { return 0; } if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) { @@ -734,18 +771,17 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, } /* Convert data types, if necessary. Updates (cvt). */ - if (SDL_BuildAudioTypeCVTToFloat(cvt, src_fmt) < 0) { - return -1; /* shouldn't happen, but just in case... */ + if (SDL_BuildAudioTypeCVTToFloat(cvt, src_format) < 0) { + return -1; /* shouldn't happen, but just in case... */ } - /* Channel conversion */ /* SDL_SupportedChannelCount should have caught these asserts, or we added a new format and forgot to update the table. */ SDL_assert(src_channels <= SDL_arraysize(channel_converters)); SDL_assert(dst_channels <= SDL_arraysize(channel_converters[0])); - channel_converter = channel_converters[src_channels-1][dst_channels-1]; + channel_converter = channel_converters[src_channels - 1][dst_channels - 1]; if ((channel_converter == NULL) != (src_channels == dst_channels)) { /* All combinations of supported channel counts should have been handled by now, but let's be defensive */ return SDL_SetError("Invalid channel combination"); @@ -753,16 +789,24 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, /* swap in some SIMD versions for a few of these. */ if (channel_converter == SDL_ConvertStereoToMono) { SDL_AudioFilter filter = NULL; - #if HAVE_SSE3_INTRINSICS - if (!filter && SDL_HasSSE3()) { filter = SDL_ConvertStereoToMono_SSE3; } - #endif - if (filter) { channel_converter = filter; } +#if HAVE_SSE3_INTRINSICS + if (!filter && SDL_HasSSE3()) { + filter = SDL_ConvertStereoToMono_SSE3; + } +#endif + if (filter) { + channel_converter = filter; + } } else if (channel_converter == SDL_ConvertMonoToStereo) { SDL_AudioFilter filter = NULL; - #if HAVE_SSE_INTRINSICS - if (!filter && SDL_HasSSE()) { filter = SDL_ConvertMonoToStereo_SSE; } - #endif - if (filter) { channel_converter = filter; } +#if HAVE_SSE_INTRINSICS + if (!filter && SDL_HasSSE()) { + filter = SDL_ConvertMonoToStereo_SSE; + } +#endif + if (filter) { + channel_converter = filter; + } } if (SDL_AddAudioCVTFilter(cvt, channel_converter) < 0) { @@ -770,7 +814,7 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, } if (src_channels < dst_channels) { - cvt->len_mult = ((cvt->len_mult * dst_channels) + (src_channels-1)) / src_channels; + cvt->len_mult = ((cvt->len_mult * dst_channels) + (src_channels - 1)) / src_channels; } cvt->len_ratio = (cvt->len_ratio * dst_channels) / src_channels; @@ -779,16 +823,16 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, /* Do rate conversion, if necessary. Updates (cvt). */ if (SDL_BuildAudioResampleCVT(cvt, dst_channels, src_rate, dst_rate) < 0) { - return -1; /* shouldn't happen, but just in case... */ + return -1; /* shouldn't happen, but just in case... */ } /* Move to final data type. */ - if (SDL_BuildAudioTypeCVTFromFloat(cvt, dst_fmt) < 0) { - return -1; /* shouldn't happen, but just in case... */ + if (SDL_BuildAudioTypeCVTFromFloat(cvt, dst_format) < 0) { + return -1; /* shouldn't happen, but just in case... */ } cvt->needed = (cvt->filter_index != 0); - return (cvt->needed); + return cvt->needed; } typedef int (*SDL_ResampleAudioStreamFunc)(SDL_AudioStream *stream, const void *inbuf, const int inbuflen, void *outbuf, const int outbuflen); @@ -804,7 +848,7 @@ struct _SDL_AudioStream Uint8 *staging_buffer; int staging_buffer_size; int staging_buffer_filled; - Uint8 *work_buffer_base; /* maybe unaligned pointer from SDL_realloc(). */ + Uint8 *work_buffer_base; /* maybe unaligned pointer from SDL_realloc(). */ int work_buffer_len; int src_sample_frame_size; SDL_AudioFormat src_format; @@ -825,8 +869,7 @@ struct _SDL_AudioStream SDL_CleanupAudioStreamResamplerFunc cleanup_resampler_func; }; -static Uint8 * -EnsureStreamBufferSize(SDL_AudioStream *stream, const int newlen) +static Uint8 *EnsureStreamBufferSize(SDL_AudioStream *stream, int newlen) { Uint8 *ptr; size_t offset; @@ -834,8 +877,8 @@ EnsureStreamBufferSize(SDL_AudioStream *stream, const int newlen) if (stream->work_buffer_len >= newlen) { ptr = stream->work_buffer_base; } else { - ptr = (Uint8 *) SDL_realloc(stream->work_buffer_base, newlen + 32); - if (!ptr) { + ptr = (Uint8 *)SDL_realloc(stream->work_buffer_base, (size_t)newlen + 32); + if (ptr == NULL) { SDL_OutOfMemory(); return NULL; } @@ -844,22 +887,21 @@ EnsureStreamBufferSize(SDL_AudioStream *stream, const int newlen) stream->work_buffer_len = newlen; } - offset = ((size_t) ptr) & 15; + offset = ((size_t)ptr) & 15; return offset ? ptr + (16 - offset) : ptr; } #ifdef HAVE_LIBSAMPLERATE_H -static int -SDL_ResampleAudioStream_SRC(SDL_AudioStream *stream, const void *_inbuf, const int inbuflen, void *_outbuf, const int outbuflen) +static int SDL_ResampleAudioStream_SRC(SDL_AudioStream *stream, const void *_inbuf, const int inbuflen, void *_outbuf, const int outbuflen) { - const float *inbuf = (const float *) _inbuf; - float *outbuf = (float *) _outbuf; + const float *inbuf = (const float *)_inbuf; + float *outbuf = (float *)_outbuf; const int framelen = sizeof(float) * stream->pre_resample_channels; SRC_STATE *state = (SRC_STATE *)stream->resampler_state; SRC_DATA data; int result; - SDL_assert(inbuf != ((const float *) outbuf)); /* SDL_AudioStreamPut() shouldn't allow in-place resamples. */ + SDL_assert(inbuf != ((const float *)outbuf)); /* SDL_AudioStreamPut() shouldn't allow in-place resamples. */ data.data_in = (float *)inbuf; /* Older versions of libsamplerate had a non-const pointer, but didn't write to it */ data.input_frames = inbuflen / framelen; @@ -883,14 +925,12 @@ SDL_ResampleAudioStream_SRC(SDL_AudioStream *stream, const void *_inbuf, const i return data.output_frames_gen * (sizeof(float) * stream->pre_resample_channels); } -static void -SDL_ResetAudioStreamResampler_SRC(SDL_AudioStream *stream) +static void SDL_ResetAudioStreamResampler_SRC(SDL_AudioStream *stream) { SRC_src_reset((SRC_STATE *)stream->resampler_state); } -static void -SDL_CleanupAudioStreamResampler_SRC(SDL_AudioStream *stream) +static void SDL_CleanupAudioStreamResampler_SRC(SDL_AudioStream *stream) { SRC_STATE *state = (SRC_STATE *)stream->resampler_state; if (state) { @@ -903,20 +943,19 @@ SDL_CleanupAudioStreamResampler_SRC(SDL_AudioStream *stream) stream->cleanup_resampler_func = NULL; } -static SDL_bool -SetupLibSampleRateResampling(SDL_AudioStream *stream) +static SDL_bool SetupLibSampleRateResampling(SDL_AudioStream *stream) { int result = 0; SRC_STATE *state = NULL; if (SRC_available) { state = SRC_src_new(SRC_converter, stream->pre_resample_channels, &result); - if (!state) { + if (state == NULL) { SDL_SetError("src_new() failed: %s", SRC_src_strerror(result)); } } - if (!state) { + if (state == NULL) { SDL_CleanupAudioStreamResampler_SRC(stream); return SDL_FALSE; } @@ -930,60 +969,65 @@ SetupLibSampleRateResampling(SDL_AudioStream *stream) } #endif /* HAVE_LIBSAMPLERATE_H */ - -static int -SDL_ResampleAudioStream(SDL_AudioStream *stream, const void *_inbuf, const int inbuflen, void *_outbuf, const int outbuflen) +static int SDL_ResampleAudioStream(SDL_AudioStream *stream, const void *_inbuf, const int inbuflen, void *_outbuf, const int outbuflen) { - const Uint8 *inbufend = ((const Uint8 *) _inbuf) + inbuflen; - const float *inbuf = (const float *) _inbuf; - float *outbuf = (float *) _outbuf; - const int chans = (int) stream->pre_resample_channels; + const Uint8 *inbufend = ((const Uint8 *)_inbuf) + inbuflen; + const float *inbuf = (const float *)_inbuf; + float *outbuf = (float *)_outbuf; + const int chans = (int)stream->pre_resample_channels; const int inrate = stream->src_rate; const int outrate = stream->dst_rate; const int paddingsamples = stream->resampler_padding_samples; - const int paddingbytes = paddingsamples * sizeof (float); - float *lpadding = (float *) stream->resampler_state; - const float *rpadding = (const float *) inbufend; /* we set this up so there are valid padding samples at the end of the input buffer. */ + const int paddingbytes = paddingsamples * sizeof(float); + float *lpadding = (float *)stream->resampler_state; + const float *rpadding = (const float *)inbufend; /* we set this up so there are valid padding samples at the end of the input buffer. */ const int cpy = SDL_min(inbuflen, paddingbytes); int retval; - SDL_assert(inbuf != ((const float *) outbuf)); /* SDL_AudioStreamPut() shouldn't allow in-place resamples. */ + SDL_assert(inbuf != ((const float *)outbuf)); /* SDL_AudioStreamPut() shouldn't allow in-place resamples. */ retval = SDL_ResampleAudio(chans, inrate, outrate, lpadding, rpadding, inbuf, inbuflen, outbuf, outbuflen); /* update our left padding with end of current input, for next run. */ - SDL_memcpy((lpadding + paddingsamples) - (cpy / sizeof (float)), inbufend - cpy, cpy); + SDL_memcpy((lpadding + paddingsamples) - (cpy / sizeof(float)), inbufend - cpy, cpy); return retval; } -static void -SDL_ResetAudioStreamResampler(SDL_AudioStream *stream) +static void SDL_ResetAudioStreamResampler(SDL_AudioStream *stream) { /* set all the padding to silence. */ const int len = stream->resampler_padding_samples; - SDL_memset(stream->resampler_state, '\0', len * sizeof (float)); + SDL_memset(stream->resampler_state, '\0', len * sizeof(float)); } -static void -SDL_CleanupAudioStreamResampler(SDL_AudioStream *stream) +static void SDL_CleanupAudioStreamResampler(SDL_AudioStream *stream) { SDL_free(stream->resampler_state); } -SDL_AudioStream * -SDL_NewAudioStream(const SDL_AudioFormat src_format, +SDL_AudioStream *SDL_NewAudioStream(const SDL_AudioFormat src_format, const Uint8 src_channels, const int src_rate, const SDL_AudioFormat dst_format, const Uint8 dst_channels, const int dst_rate) { - const int packetlen = 4096; /* !!! FIXME: good enough for now. */ + int packetlen = 4096; /* !!! FIXME: good enough for now. */ Uint8 pre_resample_channels; SDL_AudioStream *retval; - retval = (SDL_AudioStream *) SDL_calloc(1, sizeof (SDL_AudioStream)); - if (!retval) { + if (src_channels == 0) { + SDL_InvalidParamError("src_channels"); + return NULL; + } + + if (dst_channels == 0) { + SDL_InvalidParamError("dst_channels"); + return NULL; + } + + retval = (SDL_AudioStream *)SDL_calloc(1, sizeof(SDL_AudioStream)); + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1005,9 +1049,9 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, retval->dst_rate = dst_rate; retval->pre_resample_channels = pre_resample_channels; retval->packetlen = packetlen; - retval->rate_incr = ((double) dst_rate) / ((double) src_rate); + retval->rate_incr = ((double)dst_rate) / ((double)src_rate); retval->resampler_padding_samples = ResamplerPadding(retval->src_rate, retval->dst_rate) * pre_resample_channels; - retval->resampler_padding = (float *) SDL_calloc(retval->resampler_padding_samples ? retval->resampler_padding_samples : 1, sizeof (float)); + retval->resampler_padding = (float *)SDL_calloc(retval->resampler_padding_samples ? retval->resampler_padding_samples : 1, sizeof(float)); if (retval->resampler_padding == NULL) { SDL_FreeAudioStream(retval); @@ -1017,7 +1061,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, retval->staging_buffer_size = ((retval->resampler_padding_samples / retval->pre_resample_channels) * retval->src_sample_frame_size); if (retval->staging_buffer_size > 0) { - retval->staging_buffer = (Uint8 *) SDL_malloc(retval->staging_buffer_size); + retval->staging_buffer = (Uint8 *)SDL_malloc(retval->staging_buffer_size); if (retval->staging_buffer == NULL) { SDL_FreeAudioStream(retval); SDL_OutOfMemory(); @@ -1030,14 +1074,14 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, retval->cvt_before_resampling.needed = SDL_FALSE; if (SDL_BuildAudioCVT(&retval->cvt_after_resampling, src_format, src_channels, dst_rate, dst_format, dst_channels, dst_rate) < 0) { SDL_FreeAudioStream(retval); - return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ + return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ } } else { /* Don't resample at first. Just get us to Float32 format. */ /* !!! FIXME: convert to int32 on devices without hardware float. */ if (SDL_BuildAudioCVT(&retval->cvt_before_resampling, src_format, src_channels, src_rate, AUDIO_F32SYS, pre_resample_channels, src_rate) < 0) { SDL_FreeAudioStream(retval); - return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ + return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ } #ifdef HAVE_LIBSAMPLERATE_H @@ -1045,7 +1089,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, #endif if (!retval->resampler_func) { - retval->resampler_state = SDL_calloc(retval->resampler_padding_samples, sizeof (float)); + retval->resampler_state = SDL_calloc(retval->resampler_padding_samples, sizeof(float)); if (!retval->resampler_state) { SDL_FreeAudioStream(retval); SDL_OutOfMemory(); @@ -1060,21 +1104,20 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, /* Convert us to the final format after resampling. */ if (SDL_BuildAudioCVT(&retval->cvt_after_resampling, AUDIO_F32SYS, pre_resample_channels, dst_rate, dst_format, dst_channels, dst_rate) < 0) { SDL_FreeAudioStream(retval); - return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ + return NULL; /* SDL_BuildAudioCVT should have called SDL_SetError. */ } } - retval->queue = SDL_NewDataQueue(packetlen, packetlen * 2); + retval->queue = SDL_NewDataQueue(packetlen, (size_t)packetlen * 2); if (!retval->queue) { SDL_FreeAudioStream(retval); - return NULL; /* SDL_NewDataQueue should have called SDL_SetError. */ + return NULL; /* SDL_NewDataQueue should have called SDL_SetError. */ } return retval; } -static int -SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, int *maxputbytes) +static int SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, int *maxputbytes) { int buflen = len; int workbuflen; @@ -1093,7 +1136,7 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in !!! FIXME: a few samples at the end and convert them separately. */ /* no padding prepended on first run. */ - neededpaddingbytes = stream->resampler_padding_samples * sizeof (float); + neededpaddingbytes = stream->resampler_padding_samples * sizeof(float); paddingbytes = stream->first_run ? 0 : neededpaddingbytes; stream->first_run = SDL_FALSE; @@ -1105,12 +1148,12 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in if (stream->dst_rate != stream->src_rate) { /* resamples can't happen in place, so make space for second buf. */ - const int framesize = stream->pre_resample_channels * sizeof (float); + const int framesize = stream->pre_resample_channels * sizeof(float); const int frames = workbuflen / framesize; - resamplebuflen = ((int) SDL_ceil(frames * stream->rate_incr)) * framesize; - #if DEBUG_AUDIOSTREAM + resamplebuflen = ((int)SDL_ceil(frames * stream->rate_incr)) * framesize; +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: will resample %d bytes to %d (ratio=%.6f)\n", workbuflen, resamplebuflen, stream->rate_incr); - #endif +#endif workbuflen += resamplebuflen; } @@ -1121,16 +1164,16 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in workbuflen += neededpaddingbytes; - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: Putting %d bytes of preconverted audio, need %d byte work buffer\n", buflen, workbuflen); - #endif +#endif workbuf = EnsureStreamBufferSize(stream, workbuflen); - if (!workbuf) { - return -1; /* probably out of memory. */ + if (workbuf == NULL) { + return -1; /* probably out of memory. */ } - resamplebuf = workbuf; /* default if not resampling. */ + resamplebuf = workbuf; /* default if not resampling. */ SDL_memcpy(workbuf + paddingbytes, buf, buflen); @@ -1138,13 +1181,13 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in stream->cvt_before_resampling.buf = workbuf + paddingbytes; stream->cvt_before_resampling.len = buflen; if (SDL_ConvertAudio(&stream->cvt_before_resampling) == -1) { - return -1; /* uhoh! */ + return -1; /* uhoh! */ } buflen = stream->cvt_before_resampling.len_cvt; - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: After initial conversion we have %d bytes\n", buflen); - #endif +#endif } if (stream->dst_rate != stream->src_rate) { @@ -1161,7 +1204,7 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in /* save off the data at the end for the next run. */ SDL_memcpy(stream->resampler_padding, workbuf + (buflen - neededpaddingbytes), neededpaddingbytes); - resamplebuf = workbuf + buflen; /* skip to second piece of workbuf. */ + resamplebuf = workbuf + buflen; /* skip to second piece of workbuf. */ SDL_assert(buflen >= neededpaddingbytes); if (buflen > neededpaddingbytes) { buflen = stream->resampler_func(stream, workbuf, buflen - neededpaddingbytes, resamplebuf, resamplebuflen); @@ -1169,32 +1212,33 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in buflen = 0; } - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: After resampling we have %d bytes\n", buflen); - #endif +#endif } if (stream->cvt_after_resampling.needed && (buflen > 0)) { stream->cvt_after_resampling.buf = resamplebuf; stream->cvt_after_resampling.len = buflen; if (SDL_ConvertAudio(&stream->cvt_after_resampling) == -1) { - return -1; /* uhoh! */ + return -1; /* uhoh! */ } buflen = stream->cvt_after_resampling.len_cvt; - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: After final conversion we have %d bytes\n", buflen); - #endif +#endif } - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: Final output is %d bytes\n", buflen); - #endif +#endif if (maxputbytes) { const int maxbytes = *maxputbytes; - if (buflen > maxbytes) + if (buflen > maxbytes) { buflen = maxbytes; + } *maxputbytes -= buflen; } @@ -1202,8 +1246,7 @@ SDL_AudioStreamPutInternal(SDL_AudioStream *stream, const void *buf, int len, in return buflen ? SDL_WriteToDataQueue(stream->queue, resamplebuf, buflen) : 0; } -int -SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len) +int SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len) { /* !!! FIXME: several converters can take advantage of SIMD, but only !!! FIXME: if the data is aligned to 16 bytes. EnsureStreamBufferSize() @@ -1213,18 +1256,18 @@ SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len) !!! FIXME: isn't a multiple of 16. In these cases, we should chop off !!! FIXME: a few samples at the end and convert them separately. */ - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: wants to put %d preconverted bytes\n", buflen); - #endif +#endif - if (!stream) { + if (stream == NULL) { return SDL_InvalidParamError("stream"); } - if (!buf) { + if (buf == NULL) { return SDL_InvalidParamError("buf"); } if (len == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if ((len % stream->src_sample_frame_size) != 0) { return SDL_SetError("Can't add partial sample frames"); @@ -1233,9 +1276,9 @@ SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len) if (!stream->cvt_before_resampling.needed && (stream->dst_rate == stream->src_rate) && !stream->cvt_after_resampling.needed) { - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: no conversion needed at all, queueing %d bytes.\n", len); - #endif +#endif return SDL_WriteToDataQueue(stream->queue, buf, len); } @@ -1272,13 +1315,13 @@ SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len) int SDL_AudioStreamFlush(SDL_AudioStream *stream) { - if (!stream) { + if (stream == NULL) { return SDL_InvalidParamError("stream"); } - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: flushing! staging_buffer_filled=%d bytes\n", stream->staging_buffer_filled); - #endif +#endif /* shouldn't use a staging buffer if we're not resampling. */ SDL_assert((stream->dst_rate != stream->src_rate) || (stream->staging_buffer_filled == 0)); @@ -1290,16 +1333,17 @@ int SDL_AudioStreamFlush(SDL_AudioStream *stream) const SDL_bool first_run = stream->first_run; const int filled = stream->staging_buffer_filled; int actual_input_frames = filled / stream->src_sample_frame_size; - if (!first_run) + if (!first_run) { actual_input_frames += stream->resampler_padding_samples / stream->pre_resample_channels; + } - if (actual_input_frames > 0) { /* don't bother if nothing to flush. */ + if (actual_input_frames > 0) { /* don't bother if nothing to flush. */ /* This is how many bytes we're expecting without silence appended. */ - int flush_remaining = ((int) SDL_ceil(actual_input_frames * stream->rate_incr)) * stream->dst_sample_frame_size; + int flush_remaining = ((int)SDL_ceil(actual_input_frames * stream->rate_incr)) * stream->dst_sample_frame_size; - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: flushing with padding to get max %d bytes!\n", flush_remaining); - #endif +#endif SDL_memset(stream->staging_buffer + filled, '\0', stream->staging_buffer_size - filled); if (SDL_AudioStreamPutInternal(stream, stream->staging_buffer, stream->staging_buffer_size, &flush_remaining) < 0) { @@ -1323,43 +1367,40 @@ int SDL_AudioStreamFlush(SDL_AudioStream *stream) } /* get converted/resampled data from the stream */ -int -SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len) +int SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len) { - #if DEBUG_AUDIOSTREAM +#if DEBUG_AUDIOSTREAM SDL_Log("AUDIOSTREAM: want to get %d converted bytes\n", len); - #endif +#endif - if (!stream) { + if (stream == NULL) { return SDL_InvalidParamError("stream"); } - if (!buf) { + if (buf == NULL) { return SDL_InvalidParamError("buf"); } if (len <= 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if ((len % stream->dst_sample_frame_size) != 0) { return SDL_SetError("Can't request partial sample frames"); } - return (int) SDL_ReadFromDataQueue(stream->queue, buf, len); + return (int)SDL_ReadFromDataQueue(stream->queue, buf, len); } /* number of converted/resampled bytes available */ -int -SDL_AudioStreamAvailable(SDL_AudioStream *stream) +int SDL_AudioStreamAvailable(SDL_AudioStream *stream) { - return stream ? (int) SDL_CountDataQueue(stream->queue) : 0; + return stream ? (int)SDL_CountDataQueue(stream->queue) : 0; } -void -SDL_AudioStreamClear(SDL_AudioStream *stream) +void SDL_AudioStreamClear(SDL_AudioStream *stream) { - if (!stream) { + if (stream == NULL) { SDL_InvalidParamError("stream"); } else { - SDL_ClearDataQueue(stream->queue, stream->packetlen * 2); + SDL_ClearDataQueue(stream->queue, (size_t)stream->packetlen * 2); if (stream->reset_resampler_func) { stream->reset_resampler_func(stream); } @@ -1369,8 +1410,7 @@ SDL_AudioStreamClear(SDL_AudioStream *stream) } /* dispose of a stream */ -void -SDL_FreeAudioStream(SDL_AudioStream *stream) +void SDL_FreeAudioStream(SDL_AudioStream *stream) { if (stream) { if (stream->cleanup_resampler_func) { diff --git a/modules/SDL2/src/audio/SDL_audiodev.c b/modules/SDL2/src/audio/SDL_audiodev.c index 7fd1256..ac35cb2 100644 --- a/modules/SDL2/src/audio/SDL_audiodev.c +++ b/modules/SDL2/src/audio/SDL_audiodev.c @@ -34,9 +34,9 @@ #ifndef _PATH_DEV_DSP #if defined(__NETBSD__) || defined(__OPENBSD__) -#define _PATH_DEV_DSP "/dev/audio" +#define _PATH_DEV_DSP "/dev/audio" #else -#define _PATH_DEV_DSP "/dev/dsp" +#define _PATH_DEV_DSP "/dev/dsp" #endif #endif #ifndef _PATH_DEV_DSP24 @@ -46,8 +46,7 @@ #define _PATH_DEV_AUDIO "/dev/audio" #endif -static void -test_device(const int iscapture, const char *fname, int flags, int (*test) (int fd)) +static void test_device(const int iscapture, const char *fname, int flags, int (*test)(int fd)) { struct stat sb; if ((stat(fname, &sb) == 0) && (S_ISCHR(sb.st_mode))) { @@ -65,40 +64,40 @@ test_device(const int iscapture, const char *fname, int flags, int (*test) (int * information, making this information inaccessible at * enumeration time */ - SDL_AddAudioDevice(iscapture, fname, NULL, (void *) (uintptr_t) dummyhandle); + SDL_AddAudioDevice(iscapture, fname, NULL, (void *)(uintptr_t)dummyhandle); } } } } -static int -test_stub(int fd) +static int test_stub(int fd) { return 1; } -static void -SDL_EnumUnixAudioDevices_Internal(const int iscapture, const int classic, int (*test)(int)) +static void SDL_EnumUnixAudioDevices_Internal(const int iscapture, const int classic, int (*test)(int)) { const int flags = iscapture ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT; const char *audiodev; char audiopath[1024]; - if (test == NULL) + if (test == NULL) { test = test_stub; + } /* Figure out what our audio device is */ - if (((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) && - ((audiodev = SDL_getenv("AUDIODEV")) == NULL)) { + audiodev = SDL_getenv("SDL_PATH_DSP"); + if (audiodev == NULL) { + audiodev = SDL_getenv("AUDIODEV"); + } + if (audiodev == NULL) { if (classic) { audiodev = _PATH_DEV_AUDIO; } else { struct stat sb; /* Added support for /dev/sound/\* in Linux 2.4 */ - if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode)) - && ((stat(_PATH_DEV_DSP24, &sb) == 0) - && S_ISCHR(sb.st_mode))) { + if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode)) && ((stat(_PATH_DEV_DSP24, &sb) == 0) && S_ISCHR(sb.st_mode))) { audiodev = _PATH_DEV_DSP24; } else { audiodev = _PATH_DEV_DSP; @@ -110,16 +109,15 @@ SDL_EnumUnixAudioDevices_Internal(const int iscapture, const int classic, int (* if (SDL_strlen(audiodev) < (sizeof(audiopath) - 3)) { int instance = 0; while (instance <= 64) { - SDL_snprintf(audiopath, SDL_arraysize(audiopath), - "%s%d", audiodev, instance); + (void)SDL_snprintf(audiopath, SDL_arraysize(audiopath), + "%s%d", audiodev, instance); instance++; test_device(iscapture, audiopath, flags, test); } } } -void -SDL_EnumUnixAudioDevices(const int classic, int (*test)(int)) +void SDL_EnumUnixAudioDevices(const int classic, int (*test)(int)) { SDL_EnumUnixAudioDevices_Internal(SDL_TRUE, classic, test); SDL_EnumUnixAudioDevices_Internal(SDL_FALSE, classic, test); diff --git a/modules/SDL2/src/audio/SDL_audiodev_c.h b/modules/SDL2/src/audio/SDL_audiodev_c.h index 51d3e9f..9e890c3 100644 --- a/modules/SDL2/src/audio/SDL_audiodev_c.h +++ b/modules/SDL2/src/audio/SDL_audiodev_c.h @@ -31,10 +31,10 @@ #ifdef USE_BLOCKING_WRITES #define OPEN_FLAGS_OUTPUT O_WRONLY -#define OPEN_FLAGS_INPUT O_RDONLY +#define OPEN_FLAGS_INPUT O_RDONLY #else -#define OPEN_FLAGS_OUTPUT (O_WRONLY|O_NONBLOCK) -#define OPEN_FLAGS_INPUT (O_RDONLY|O_NONBLOCK) +#define OPEN_FLAGS_OUTPUT (O_WRONLY | O_NONBLOCK) +#define OPEN_FLAGS_INPUT (O_RDONLY | O_NONBLOCK) #endif extern void SDL_EnumUnixAudioDevices(const int classic, int (*test)(int)); diff --git a/modules/SDL2/src/audio/SDL_audiotypecvt.c b/modules/SDL2/src/audio/SDL_audiotypecvt.c index 4e2320e..7ffa4dd 100644 --- a/modules/SDL2/src/audio/SDL_audiotypecvt.c +++ b/modules/SDL2/src/audio/SDL_audiotypecvt.c @@ -37,9 +37,9 @@ #elif __MACOSX__ && HAVE_SSE2_INTRINSICS #define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* Mac OS X/Intel guarantees SSE2. */ #elif defined(__ARM_ARCH) && (__ARM_ARCH >= 8) && HAVE_NEON_INTRINSICS -#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* ARMv8+ promise NEON. */ +#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* ARMv8+ promise NEON. */ #elif defined(__APPLE__) && defined(__ARM_ARCH) && (__ARM_ARCH >= 7) && HAVE_NEON_INTRINSICS -#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* All Apple ARMv7 chips promise NEON support. */ +#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* All Apple ARMv7 chips promise NEON support. */ #endif /* Set to zero if platform is guaranteed to use a SIMD codepath here. */ @@ -59,24 +59,21 @@ SDL_AudioFilter SDL_Convert_F32_to_S16 = NULL; SDL_AudioFilter SDL_Convert_F32_to_U16 = NULL; SDL_AudioFilter SDL_Convert_F32_to_S32 = NULL; - -#define DIVBY128 0.0078125f -#define DIVBY32768 0.000030517578125f +#define DIVBY128 0.0078125f +#define DIVBY32768 0.000030517578125f #define DIVBY8388607 0.00000011920930376163766f - #if NEED_SCALAR_CONVERTER_FALLBACKS -static void SDLCALL -SDL_Convert_S8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint8 *src = ((const Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Sint8 *src = ((const Sint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S8", "AUDIO_F32"); for (i = cvt->len_cvt; i; --i, --src, --dst) { - *dst = ((float) *src) * DIVBY128; + *dst = ((float)*src) * DIVBY128; } cvt->len_cvt *= 4; @@ -85,17 +82,16 @@ SDL_Convert_S8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint8 *src = ((const Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Uint8 *src = ((const Uint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U8", "AUDIO_F32"); for (i = cvt->len_cvt; i; --i, --src, --dst) { - *dst = (((float) *src) * DIVBY128) - 1.0f; + *dst = (((float)*src) * DIVBY128) - 1.0f; } cvt->len_cvt *= 4; @@ -104,17 +100,16 @@ SDL_Convert_U8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint16 *src = ((const Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Sint16 *src = ((const Sint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S16", "AUDIO_F32"); - for (i = cvt->len_cvt / sizeof (Sint16); i; --i, --src, --dst) { - *dst = ((float) *src) * DIVBY32768; + for (i = cvt->len_cvt / sizeof(Sint16); i; --i, --src, --dst) { + *dst = ((float)*src) * DIVBY32768; } cvt->len_cvt *= 2; @@ -123,17 +118,16 @@ SDL_Convert_S16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint16 *src = ((const Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Uint16 *src = ((const Uint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U16", "AUDIO_F32"); - for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) { - *dst = (((float) *src) * DIVBY32768) - 1.0f; + for (i = cvt->len_cvt / sizeof(Uint16); i; --i, --src, --dst) { + *dst = (((float)*src) * DIVBY32768) - 1.0f; } cvt->len_cvt *= 2; @@ -142,17 +136,16 @@ SDL_Convert_U16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S32_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S32_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint32 *src = (const Sint32 *) cvt->buf; - float *dst = (float *) cvt->buf; + const Sint32 *src = (const Sint32 *)cvt->buf; + float *dst = (float *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32"); - for (i = cvt->len_cvt / sizeof (Sint32); i; --i, ++src, ++dst) { - *dst = ((float) (*src>>8)) * DIVBY8388607; + for (i = cvt->len_cvt / sizeof(Sint32); i; --i, ++src, ++dst) { + *dst = ((float)(*src >> 8)) * DIVBY8388607; } if (cvt->filters[++cvt->filter_index]) { @@ -160,16 +153,15 @@ SDL_Convert_S32_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint8 *dst = (Sint8 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint8 *dst = (Sint8 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S8"); - for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i; --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 127; @@ -186,16 +178,15 @@ SDL_Convert_F32_to_S8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Uint8 *dst = (Uint8 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Uint8 *dst = (Uint8 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8"); - for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i; --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 255; @@ -212,16 +203,15 @@ SDL_Convert_F32_to_U8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint16 *dst = (Sint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint16 *dst = (Sint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S16"); - for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i; --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 32767; @@ -238,16 +228,15 @@ SDL_Convert_F32_to_S16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Uint16 *dst = (Uint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Uint16 *dst = (Uint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U16"); - for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i; --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 65535; @@ -264,21 +253,20 @@ SDL_Convert_F32_to_U16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint32 *dst = (Sint32 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint32 *dst = (Sint32 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S32"); - for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i; --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { - *dst = (Sint32) -2147483648LL; + *dst = (Sint32)-2147483648LL; } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; } @@ -290,33 +278,32 @@ SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) } #endif - #if HAVE_SSE2_INTRINSICS -static void SDLCALL -SDL_Convert_S8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint8 *src = ((const Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Sint8 *src = ((const Sint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S8", "AUDIO_F32 (using SSE2)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { - *dst = ((float) *src) * DIVBY128; + for (i = cvt->len_cvt; i && (((size_t)(dst - 15)) & 15); --i, --src, --dst) { + *dst = ((float)*src) * DIVBY128; } - src -= 15; dst -= 15; /* adjust to read SSE blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 15; + dst -= 15; /* adjust to read SSE blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ - const __m128i *mmsrc = (const __m128i *) src; + const __m128i *mmsrc = (const __m128i *)src; const __m128i zero = _mm_setzero_si128(); const __m128 divby128 = _mm_set1_ps(DIVBY128); - while (i >= 16) { /* 16 * 8-bit */ - const __m128i bytes = _mm_load_si128(mmsrc); /* get 16 sint8 into an XMM register. */ + while (i >= 16) { /* 16 * 8-bit */ + const __m128i bytes = _mm_load_si128(mmsrc); /* get 16 sint8 into an XMM register. */ /* treat as int16, shift left to clear every other sint16, then back right with sign-extend. Now sint16. */ const __m128i shorts1 = _mm_srai_epi16(_mm_slli_epi16(bytes, 8), 8); /* right-shift-sign-extend gets us sint16 with the other set of values. */ @@ -328,21 +315,26 @@ SDL_Convert_S8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) const __m128 floats4 = _mm_mul_ps(_mm_cvtepi32_ps(_mm_srai_epi32(_mm_slli_epi32(_mm_unpackhi_epi16(shorts2, zero), 16), 16)), divby128); /* Interleave back into correct order, store. */ _mm_store_ps(dst, _mm_unpacklo_ps(floats1, floats2)); - _mm_store_ps(dst+4, _mm_unpackhi_ps(floats1, floats2)); - _mm_store_ps(dst+8, _mm_unpacklo_ps(floats3, floats4)); - _mm_store_ps(dst+12, _mm_unpackhi_ps(floats3, floats4)); - i -= 16; mmsrc--; dst -= 16; + _mm_store_ps(dst + 4, _mm_unpackhi_ps(floats1, floats2)); + _mm_store_ps(dst + 8, _mm_unpacklo_ps(floats3, floats4)); + _mm_store_ps(dst + 12, _mm_unpackhi_ps(floats3, floats4)); + i -= 16; + mmsrc--; + dst -= 16; } - src = (const Sint8 *) mmsrc; + src = (const Sint8 *)mmsrc; } - src += 15; dst += 15; /* adjust for any scalar finishing. */ + src += 15; + dst += 15; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) *src) * DIVBY128; - i--; src--; dst--; + *dst = ((float)*src) * DIVBY128; + i--; + src--; + dst--; } cvt->len_cvt *= 4; @@ -351,32 +343,32 @@ SDL_Convert_S8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint8 *src = ((const Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Uint8 *src = ((const Uint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U8", "AUDIO_F32 (using SSE2)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { - *dst = (((float) *src) * DIVBY128) - 1.0f; + for (i = cvt->len_cvt; i && (((size_t)(dst - 15)) & 15); --i, --src, --dst) { + *dst = (((float)*src) * DIVBY128) - 1.0f; } - src -= 15; dst -= 15; /* adjust to read SSE blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 15; + dst -= 15; /* adjust to read SSE blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ - const __m128i *mmsrc = (const __m128i *) src; + const __m128i *mmsrc = (const __m128i *)src; const __m128i zero = _mm_setzero_si128(); const __m128 divby128 = _mm_set1_ps(DIVBY128); const __m128 minus1 = _mm_set1_ps(-1.0f); - while (i >= 16) { /* 16 * 8-bit */ - const __m128i bytes = _mm_load_si128(mmsrc); /* get 16 uint8 into an XMM register. */ + while (i >= 16) { /* 16 * 8-bit */ + const __m128i bytes = _mm_load_si128(mmsrc); /* get 16 uint8 into an XMM register. */ /* treat as int16, shift left to clear every other sint16, then back right with zero-extend. Now uint16. */ const __m128i shorts1 = _mm_srli_epi16(_mm_slli_epi16(bytes, 8), 8); /* right-shift-zero-extend gets us uint16 with the other set of values. */ @@ -389,21 +381,26 @@ SDL_Convert_U8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) const __m128 floats4 = _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(_mm_unpackhi_epi16(shorts2, zero)), divby128), minus1); /* Interleave back into correct order, store. */ _mm_store_ps(dst, _mm_unpacklo_ps(floats1, floats2)); - _mm_store_ps(dst+4, _mm_unpackhi_ps(floats1, floats2)); - _mm_store_ps(dst+8, _mm_unpacklo_ps(floats3, floats4)); - _mm_store_ps(dst+12, _mm_unpackhi_ps(floats3, floats4)); - i -= 16; mmsrc--; dst -= 16; + _mm_store_ps(dst + 4, _mm_unpackhi_ps(floats1, floats2)); + _mm_store_ps(dst + 8, _mm_unpacklo_ps(floats3, floats4)); + _mm_store_ps(dst + 12, _mm_unpackhi_ps(floats3, floats4)); + i -= 16; + mmsrc--; + dst -= 16; } - src = (const Uint8 *) mmsrc; + src = (const Uint8 *)mmsrc; } - src += 15; dst += 15; /* adjust for any scalar finishing. */ + src += 15; + dst += 15; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = (((float) *src) * DIVBY128) - 1.0f; - i--; src--; dst--; + *dst = (((float)*src) * DIVBY128) - 1.0f; + i--; + src--; + dst--; } cvt->len_cvt *= 4; @@ -412,46 +409,51 @@ SDL_Convert_U8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint16 *src = ((const Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Sint16 *src = ((const Sint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S16", "AUDIO_F32 (using SSE2)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { - *dst = ((float) *src) * DIVBY32768; + for (i = cvt->len_cvt / sizeof(Sint16); i && (((size_t)(dst - 7)) & 15); --i, --src, --dst) { + *dst = ((float)*src) * DIVBY32768; } - src -= 7; dst -= 7; /* adjust to read SSE blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 7; + dst -= 7; /* adjust to read SSE blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 divby32768 = _mm_set1_ps(DIVBY32768); - while (i >= 8) { /* 8 * 16-bit */ - const __m128i ints = _mm_load_si128((__m128i const *) src); /* get 8 sint16 into an XMM register. */ + while (i >= 8) { /* 8 * 16-bit */ + const __m128i ints = _mm_load_si128((__m128i const *)src); /* get 8 sint16 into an XMM register. */ /* treat as int32, shift left to clear every other sint16, then back right with sign-extend. Now sint32. */ const __m128i a = _mm_srai_epi32(_mm_slli_epi32(ints, 16), 16); /* right-shift-sign-extend gets us sint32 with the other set of values. */ const __m128i b = _mm_srai_epi32(ints, 16); /* Interleave these back into the right order, convert to float, multiply, store. */ _mm_store_ps(dst, _mm_mul_ps(_mm_cvtepi32_ps(_mm_unpacklo_epi32(a, b)), divby32768)); - _mm_store_ps(dst+4, _mm_mul_ps(_mm_cvtepi32_ps(_mm_unpackhi_epi32(a, b)), divby32768)); - i -= 8; src -= 8; dst -= 8; + _mm_store_ps(dst + 4, _mm_mul_ps(_mm_cvtepi32_ps(_mm_unpackhi_epi32(a, b)), divby32768)); + i -= 8; + src -= 8; + dst -= 8; } } - src += 7; dst += 7; /* adjust for any scalar finishing. */ + src += 7; + dst += 7; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) *src) * DIVBY32768; - i--; src--; dst--; + *dst = ((float)*src) * DIVBY32768; + i--; + src--; + dst--; } cvt->len_cvt *= 2; @@ -460,47 +462,52 @@ SDL_Convert_S16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint16 *src = ((const Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Uint16 *src = ((const Uint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U16", "AUDIO_F32 (using SSE2)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { - *dst = (((float) *src) * DIVBY32768) - 1.0f; + for (i = cvt->len_cvt / sizeof(Sint16); i && (((size_t)(dst - 7)) & 15); --i, --src, --dst) { + *dst = (((float)*src) * DIVBY32768) - 1.0f; } - src -= 7; dst -= 7; /* adjust to read SSE blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 7; + dst -= 7; /* adjust to read SSE blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 divby32768 = _mm_set1_ps(DIVBY32768); const __m128 minus1 = _mm_set1_ps(-1.0f); - while (i >= 8) { /* 8 * 16-bit */ - const __m128i ints = _mm_load_si128((__m128i const *) src); /* get 8 sint16 into an XMM register. */ + while (i >= 8) { /* 8 * 16-bit */ + const __m128i ints = _mm_load_si128((__m128i const *)src); /* get 8 sint16 into an XMM register. */ /* treat as int32, shift left to clear every other sint16, then back right with zero-extend. Now sint32. */ const __m128i a = _mm_srli_epi32(_mm_slli_epi32(ints, 16), 16); /* right-shift-sign-extend gets us sint32 with the other set of values. */ const __m128i b = _mm_srli_epi32(ints, 16); /* Interleave these back into the right order, convert to float, multiply, store. */ _mm_store_ps(dst, _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(_mm_unpacklo_epi32(a, b)), divby32768), minus1)); - _mm_store_ps(dst+4, _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(_mm_unpackhi_epi32(a, b)), divby32768), minus1)); - i -= 8; src -= 8; dst -= 8; + _mm_store_ps(dst + 4, _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(_mm_unpackhi_epi32(a, b)), divby32768), minus1)); + i -= 8; + src -= 8; + dst -= 8; } } - src += 7; dst += 7; /* adjust for any scalar finishing. */ + src += 7; + dst += 7; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = (((float) *src) * DIVBY32768) - 1.0f; - i--; src--; dst--; + *dst = (((float)*src) * DIVBY32768) - 1.0f; + i--; + src--; + dst--; } cvt->len_cvt *= 2; @@ -509,39 +516,42 @@ SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint32 *src = (const Sint32 *) cvt->buf; - float *dst = (float *) cvt->buf; + const Sint32 *src = (const Sint32 *)cvt->buf; + float *dst = (float *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) { - *dst = ((float) (*src>>8)) * DIVBY8388607; + for (i = cvt->len_cvt / sizeof(Sint32); i && (((size_t)dst) & 15); --i, ++src, ++dst) { + *dst = ((float)(*src >> 8)) * DIVBY8388607; } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 divby8388607 = _mm_set1_ps(DIVBY8388607); - const __m128i *mmsrc = (const __m128i *) src; - while (i >= 4) { /* 4 * sint32 */ + const __m128i *mmsrc = (const __m128i *)src; + while (i >= 4) { /* 4 * sint32 */ /* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */ _mm_store_ps(dst, _mm_mul_ps(_mm_cvtepi32_ps(_mm_srai_epi32(_mm_load_si128(mmsrc), 8)), divby8388607)); - i -= 4; mmsrc++; dst += 4; + i -= 4; + mmsrc++; + dst += 4; } - src = (const Sint32 *) mmsrc; + src = (const Sint32 *)mmsrc; } /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) (*src>>8)) * DIVBY8388607; - i--; src++; dst++; + *dst = ((float)(*src >> 8)) * DIVBY8388607; + i--; + src++; + dst++; } if (cvt->filters[++cvt->filter_index]) { @@ -549,17 +559,16 @@ SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint8 *dst = (Sint8 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint8 *dst = (Sint8 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S8 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 127; @@ -570,24 +579,26 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 one = _mm_set1_ps(1.0f); const __m128 negone = _mm_set1_ps(-1.0f); const __m128 mulby127 = _mm_set1_ps(127.0f); - __m128i *mmdst = (__m128i *) dst; - while (i >= 16) { /* 16 * float32 */ - const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - _mm_store_si128(mmdst, _mm_packs_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ - i -= 16; src += 16; mmdst++; + __m128i *mmdst = (__m128i *)dst; + while (i >= 16) { /* 16 * float32 */ + const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + _mm_store_si128(mmdst, _mm_packs_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ + i -= 16; + src += 16; + mmdst++; } - dst = (Sint8 *) mmdst; + dst = (Sint8 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -600,7 +611,9 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Sint8)(sample * 127.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 4; @@ -609,17 +622,16 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; + const float *src = (const float *)cvt->buf; Uint8 *dst = cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 255; @@ -630,24 +642,26 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 one = _mm_set1_ps(1.0f); const __m128 negone = _mm_set1_ps(-1.0f); const __m128 mulby127 = _mm_set1_ps(127.0f); - __m128i *mmdst = (__m128i *) dst; - while (i >= 16) { /* 16 * float32 */ - const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - _mm_store_si128(mmdst, _mm_packus_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ - i -= 16; src += 16; mmdst++; + __m128i *mmdst = (__m128i *)dst; + while (i >= 16) { /* 16 * float32 */ + const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 4)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 8)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 12)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + _mm_store_si128(mmdst, _mm_packus_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ + i -= 16; + src += 16; + mmdst++; } - dst = (Uint8 *) mmdst; + dst = (Uint8 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -660,7 +674,9 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Uint8)((sample + 1.0f) * 127.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 4; @@ -669,17 +685,16 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint16 *dst = (Sint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint16 *dst = (Sint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S16 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 32767; @@ -690,22 +705,24 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 one = _mm_set1_ps(1.0f); const __m128 negone = _mm_set1_ps(-1.0f); const __m128 mulby32767 = _mm_set1_ps(32767.0f); - __m128i *mmdst = (__m128i *) dst; - while (i >= 8) { /* 8 * float32 */ - const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - _mm_store_si128(mmdst, _mm_packs_epi32(ints1, ints2)); /* pack to sint16, store out. */ - i -= 8; src += 8; mmdst++; + __m128i *mmdst = (__m128i *)dst; + while (i >= 8) { /* 8 * float32 */ + const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + _mm_store_si128(mmdst, _mm_packs_epi32(ints1, ints2)); /* pack to sint16, store out. */ + i -= 8; + src += 8; + mmdst++; } - dst = (Sint16 *) mmdst; + dst = (Sint16 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -718,7 +735,9 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Sint16)(sample * 32767.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 2; @@ -727,17 +746,16 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Uint16 *dst = (Uint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Uint16 *dst = (Uint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U16 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 65535; @@ -748,10 +766,10 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ /* This calculates differently than the scalar path because SSE2 can't pack int32 data down to unsigned int16. _mm_packs_epi32 does signed @@ -764,14 +782,16 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) const __m128i topbit = _mm_set1_epi16(-32768); const __m128 one = _mm_set1_ps(1.0f); const __m128 negone = _mm_set1_ps(-1.0f); - __m128i *mmdst = (__m128i *) dst; - while (i >= 8) { /* 8 * float32 */ - const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - _mm_store_si128(mmdst, _mm_xor_si128(_mm_packs_epi32(ints1, ints2), topbit)); /* pack to sint16, xor top bit, store out. */ - i -= 8; src += 8; mmdst++; + __m128i *mmdst = (__m128i *)dst; + while (i >= 8) { /* 8 * float32 */ + const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src + 4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + _mm_store_si128(mmdst, _mm_xor_si128(_mm_packs_epi32(ints1, ints2), topbit)); /* pack to sint16, xor top bit, store out. */ + i -= 8; + src += 8; + mmdst++; } - dst = (Uint16 *) mmdst; + dst = (Uint16 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -784,7 +804,9 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Uint16)((sample + 1.0f) * 32767.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 2; @@ -793,41 +815,42 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint32 *dst = (Sint32 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint32 *dst = (Sint32 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S32 (using SSE2)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { - *dst = (Sint32) -2147483648LL; + *dst = (Sint32)-2147483648LL; } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); - SDL_assert(!i || ((((size_t) src) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); + SDL_assert(!i || !(((size_t)src) & 15)); { /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ const __m128 one = _mm_set1_ps(1.0f); const __m128 negone = _mm_set1_ps(-1.0f); const __m128 mulby8388607 = _mm_set1_ps(8388607.0f); - __m128i *mmdst = (__m128i *) dst; - while (i >= 4) { /* 4 * float32 */ - _mm_store_si128(mmdst, _mm_slli_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby8388607)), 8)); /* load 4 floats, clamp, convert to sint32 */ - i -= 4; src += 4; mmdst++; + __m128i *mmdst = (__m128i *)dst; + while (i >= 4) { /* 4 * float32 */ + _mm_store_si128(mmdst, _mm_slli_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby8388607)), 8)); /* load 4 floats, clamp, convert to sint32 */ + i -= 4; + src += 4; + mmdst++; } - dst = (Sint32 *) mmdst; + dst = (Sint32 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -836,11 +859,13 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { - *dst = (Sint32) -2147483648LL; + *dst = (Sint32)-2147483648LL; } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; } - i--; src++; dst++; + i--; + src++; + dst++; } if (cvt->filters[++cvt->filter_index]) { @@ -849,51 +874,55 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } #endif - #if HAVE_NEON_INTRINSICS -static void SDLCALL -SDL_Convert_S8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint8 *src = ((const Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Sint8 *src = ((const Sint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S8", "AUDIO_F32 (using NEON)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { - *dst = ((float) *src) * DIVBY128; + for (i = cvt->len_cvt; i && (((size_t)(dst - 15)) & 15); --i, --src, --dst) { + *dst = ((float)*src) * DIVBY128; } - src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 15; + dst -= 15; /* adjust to read NEON blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ - const int8_t *mmsrc = (const int8_t *) src; + const int8_t *mmsrc = (const int8_t *)src; const float32x4_t divby128 = vdupq_n_f32(DIVBY128); - while (i >= 16) { /* 16 * 8-bit */ - const int8x16_t bytes = vld1q_s8(mmsrc); /* get 16 sint8 into a NEON register. */ - const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes)); /* convert top 8 bytes to 8 int16 */ - const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes)); /* convert bottom 8 bytes to 8 int16 */ + while (i >= 16) { /* 16 * 8-bit */ + const int8x16_t bytes = vld1q_s8(mmsrc); /* get 16 sint8 into a NEON register. */ + const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes)); /* convert top 8 bytes to 8 int16 */ + const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes)); /* convert bottom 8 bytes to 8 int16 */ /* split int16 to two int32, then convert to float, then multiply to normalize, store. */ vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128)); - vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128)); - vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128)); - vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128)); - i -= 16; mmsrc -= 16; dst -= 16; + vst1q_f32(dst + 4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128)); + vst1q_f32(dst + 8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128)); + vst1q_f32(dst + 12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128)); + i -= 16; + mmsrc -= 16; + dst -= 16; } - src = (const Sint8 *) mmsrc; + src = (const Sint8 *)mmsrc; } - src += 15; dst += 15; /* adjust for any scalar finishing. */ + src += 15; + dst += 15; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) *src) * DIVBY128; - i--; src--; dst--; + *dst = ((float)*src) * DIVBY128; + i--; + src--; + dst--; } cvt->len_cvt *= 4; @@ -902,50 +931,55 @@ SDL_Convert_S8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint8 *src = ((const Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; + const Uint8 *src = ((const Uint8 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 4)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U8", "AUDIO_F32 (using NEON)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { - *dst = (((float) *src) * DIVBY128) - 1.0f; + for (i = cvt->len_cvt; i && (((size_t)(dst - 15)) & 15); --i, --src, --dst) { + *dst = (((float)*src) * DIVBY128) - 1.0f; } - src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 15; + dst -= 15; /* adjust to read NEON blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ - const uint8_t *mmsrc = (const uint8_t *) src; + const uint8_t *mmsrc = (const uint8_t *)src; const float32x4_t divby128 = vdupq_n_f32(DIVBY128); const float32x4_t negone = vdupq_n_f32(-1.0f); - while (i >= 16) { /* 16 * 8-bit */ - const uint8x16_t bytes = vld1q_u8(mmsrc); /* get 16 uint8 into a NEON register. */ - const uint16x8_t uint16hi = vmovl_u8(vget_high_u8(bytes)); /* convert top 8 bytes to 8 uint16 */ - const uint16x8_t uint16lo = vmovl_u8(vget_low_u8(bytes)); /* convert bottom 8 bytes to 8 uint16 */ + while (i >= 16) { /* 16 * 8-bit */ + const uint8x16_t bytes = vld1q_u8(mmsrc); /* get 16 uint8 into a NEON register. */ + const uint16x8_t uint16hi = vmovl_u8(vget_high_u8(bytes)); /* convert top 8 bytes to 8 uint16 */ + const uint16x8_t uint16lo = vmovl_u8(vget_low_u8(bytes)); /* convert bottom 8 bytes to 8 uint16 */ /* split uint16 to two uint32, then convert to float, then multiply to normalize, subtract to adjust for sign, store. */ vst1q_f32(dst, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128)); - vst1q_f32(dst+4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128)); - vst1q_f32(dst+8, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128)); - vst1q_f32(dst+12, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128)); - i -= 16; mmsrc -= 16; dst -= 16; + vst1q_f32(dst + 4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128)); + vst1q_f32(dst + 8, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128)); + vst1q_f32(dst + 12, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128)); + i -= 16; + mmsrc -= 16; + dst -= 16; } - src = (const Uint8 *) mmsrc; + src = (const Uint8 *)mmsrc; } - src += 15; dst += 15; /* adjust for any scalar finishing. */ + src += 15; + dst += 15; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = (((float) *src) * DIVBY128) - 1.0f; - i--; src--; dst--; + *dst = (((float)*src) * DIVBY128) - 1.0f; + i--; + src--; + dst--; } cvt->len_cvt *= 4; @@ -954,42 +988,47 @@ SDL_Convert_U8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint16 *src = ((const Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Sint16 *src = ((const Sint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_S16", "AUDIO_F32 (using NEON)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { - *dst = ((float) *src) * DIVBY32768; + for (i = cvt->len_cvt / sizeof(Sint16); i && (((size_t)(dst - 7)) & 15); --i, --src, --dst) { + *dst = ((float)*src) * DIVBY32768; } - src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 7; + dst -= 7; /* adjust to read NEON blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768); - while (i >= 8) { /* 8 * 16-bit */ - const int16x8_t ints = vld1q_s16((int16_t const *) src); /* get 8 sint16 into a NEON register. */ + while (i >= 8) { /* 8 * 16-bit */ + const int16x8_t ints = vld1q_s16((int16_t const *)src); /* get 8 sint16 into a NEON register. */ /* split int16 to two int32, then convert to float, then multiply to normalize, store. */ vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(ints))), divby32768)); - vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(ints))), divby32768)); - i -= 8; src -= 8; dst -= 8; + vst1q_f32(dst + 4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(ints))), divby32768)); + i -= 8; + src -= 8; + dst -= 8; } } - src += 7; dst += 7; /* adjust for any scalar finishing. */ + src += 7; + dst += 7; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) *src) * DIVBY32768; - i--; src--; dst--; + *dst = ((float)*src) * DIVBY32768; + i--; + src--; + dst--; } cvt->len_cvt *= 2; @@ -998,43 +1037,48 @@ SDL_Convert_S16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_U16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_U16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Uint16 *src = ((const Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; - float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; + const Uint16 *src = ((const Uint16 *)(cvt->buf + cvt->len_cvt)) - 1; + float *dst = ((float *)(cvt->buf + cvt->len_cvt * 2)) - 1; int i; LOG_DEBUG_CONVERT("AUDIO_U16", "AUDIO_F32 (using NEON)"); /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ - for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { - *dst = (((float) *src) * DIVBY32768) - 1.0f; + for (i = cvt->len_cvt / sizeof(Sint16); i && (((size_t)(dst - 7)) & 15); --i, --src, --dst) { + *dst = (((float)*src) * DIVBY32768) - 1.0f; } - src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */ - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + src -= 7; + dst -= 7; /* adjust to read NEON blocks from the start. */ + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768); const float32x4_t negone = vdupq_n_f32(-1.0f); - while (i >= 8) { /* 8 * 16-bit */ - const uint16x8_t uints = vld1q_u16((uint16_t const *) src); /* get 8 uint16 into a NEON register. */ + while (i >= 8) { /* 8 * 16-bit */ + const uint16x8_t uints = vld1q_u16((uint16_t const *)src); /* get 8 uint16 into a NEON register. */ /* split uint16 to two int32, then convert to float, then multiply to normalize, subtract for sign, store. */ vst1q_f32(dst, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768)); - vst1q_f32(dst+4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768)); - i -= 8; src -= 8; dst -= 8; + vst1q_f32(dst + 4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768)); + i -= 8; + src -= 8; + dst -= 8; } } - src += 7; dst += 7; /* adjust for any scalar finishing. */ + src += 7; + dst += 7; /* adjust for any scalar finishing. */ /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = (((float) *src) * DIVBY32768) - 1.0f; - i--; src--; dst--; + *dst = (((float)*src) * DIVBY32768) - 1.0f; + i--; + src--; + dst--; } cvt->len_cvt *= 2; @@ -1043,39 +1087,42 @@ SDL_Convert_U16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_S32_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_S32_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const Sint32 *src = (const Sint32 *) cvt->buf; - float *dst = (float *) cvt->buf; + const Sint32 *src = (const Sint32 *)cvt->buf; + float *dst = (float *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) { - *dst = ((float) (*src>>8)) * DIVBY8388607; + for (i = cvt->len_cvt / sizeof(Sint32); i && (((size_t)dst) & 15); --i, ++src, ++dst) { + *dst = ((float)(*src >> 8)) * DIVBY8388607; } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t divby8388607 = vdupq_n_f32(DIVBY8388607); - const int32_t *mmsrc = (const int32_t *) src; - while (i >= 4) { /* 4 * sint32 */ + const int32_t *mmsrc = (const int32_t *)src; + while (i >= 4) { /* 4 * sint32 */ /* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */ vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vshrq_n_s32(vld1q_s32(mmsrc), 8)), divby8388607)); - i -= 4; mmsrc += 4; dst += 4; + i -= 4; + mmsrc += 4; + dst += 4; } - src = (const Sint32 *) mmsrc; + src = (const Sint32 *)mmsrc; } /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = ((float) (*src>>8)) * DIVBY8388607; - i--; src++; dst++; + *dst = ((float)(*src >> 8)) * DIVBY8388607; + i--; + src++; + dst++; } if (cvt->filters[++cvt->filter_index]) { @@ -1083,17 +1130,16 @@ SDL_Convert_S32_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint8 *dst = (Sint8 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint8 *dst = (Sint8 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S8 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 127; @@ -1104,26 +1150,28 @@ SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t one = vdupq_n_f32(1.0f); const float32x4_t negone = vdupq_n_f32(-1.0f); const float32x4_t mulby127 = vdupq_n_f32(127.0f); - int8_t *mmdst = (int8_t *) dst; - while (i >= 16) { /* 16 * float32 */ - const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const int32x4_t ints3 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const int32x4_t ints4 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ - const int8x8_t i8lo = vmovn_s16(vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, narrow to sint8 */ - const int8x8_t i8hi = vmovn_s16(vcombine_s16(vmovn_s32(ints3), vmovn_s32(ints4))); /* narrow to sint16, combine, narrow to sint8 */ - vst1q_s8(mmdst, vcombine_s8(i8lo, i8hi)); /* combine to int8x16_t, store out */ - i -= 16; src += 16; mmdst += 16; + int8_t *mmdst = (int8_t *)dst; + while (i >= 16) { /* 16 * float32 */ + const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const int32x4_t ints3 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const int32x4_t ints4 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ + const int8x8_t i8lo = vmovn_s16(vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, narrow to sint8 */ + const int8x8_t i8hi = vmovn_s16(vcombine_s16(vmovn_s32(ints3), vmovn_s32(ints4))); /* narrow to sint16, combine, narrow to sint8 */ + vst1q_s8(mmdst, vcombine_s8(i8lo, i8hi)); /* combine to int8x16_t, store out */ + i -= 16; + src += 16; + mmdst += 16; } - dst = (Sint8 *) mmdst; + dst = (Sint8 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -1136,7 +1184,9 @@ SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Sint8)(sample * 127.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 4; @@ -1145,17 +1195,16 @@ SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Uint8 *dst = (Uint8 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Uint8 *dst = cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 255; @@ -1166,27 +1215,29 @@ SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t one = vdupq_n_f32(1.0f); const float32x4_t negone = vdupq_n_f32(-1.0f); const float32x4_t mulby127 = vdupq_n_f32(127.0f); - uint8_t *mmdst = (uint8_t *) dst; - while (i >= 16) { /* 16 * float32 */ - const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ - const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ - const uint32x4_t uints3 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ - const uint32x4_t uints4 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ - const uint8x8_t ui8lo = vmovn_u16(vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, narrow to uint8 */ - const uint8x8_t ui8hi = vmovn_u16(vcombine_u16(vmovn_u32(uints3), vmovn_u32(uints4))); /* narrow to uint16, combine, narrow to uint8 */ - vst1q_u8(mmdst, vcombine_u8(ui8lo, ui8hi)); /* combine to uint8x16_t, store out */ - i -= 16; src += 16; mmdst += 16; + uint8_t *mmdst = (uint8_t *)dst; + while (i >= 16) { /* 16 * float32 */ + const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ + const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 4)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ + const uint32x4_t uints3 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 8)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ + const uint32x4_t uints4 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 12)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ + const uint8x8_t ui8lo = vmovn_u16(vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, narrow to uint8 */ + const uint8x8_t ui8hi = vmovn_u16(vcombine_u16(vmovn_u32(uints3), vmovn_u32(uints4))); /* narrow to uint16, combine, narrow to uint8 */ + vst1q_u8(mmdst, vcombine_u8(ui8lo, ui8hi)); /* combine to uint8x16_t, store out */ + i -= 16; + src += 16; + mmdst += 16; } - dst = (Uint8 *) mmdst; + dst = (Uint8 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -1199,7 +1250,9 @@ SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Uint8)((sample + 1.0f) * 127.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 4; @@ -1208,17 +1261,16 @@ SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint16 *dst = (Sint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint16 *dst = (Sint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S16 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 32767; @@ -1229,22 +1281,24 @@ SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t one = vdupq_n_f32(1.0f); const float32x4_t negone = vdupq_n_f32(-1.0f); const float32x4_t mulby32767 = vdupq_n_f32(32767.0f); - int16_t *mmdst = (int16_t *) dst; - while (i >= 8) { /* 8 * float32 */ - const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ - vst1q_s16(mmdst, vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, store out. */ - i -= 8; src += 8; mmdst += 8; + int16_t *mmdst = (int16_t *)dst; + while (i >= 8) { /* 8 * float32 */ + const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ + vst1q_s16(mmdst, vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, store out. */ + i -= 8; + src += 8; + mmdst += 8; } - dst = (Sint16 *) mmdst; + dst = (Sint16 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -1257,7 +1311,9 @@ SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Sint16)(sample * 32767.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 2; @@ -1266,17 +1322,16 @@ SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Uint16 *dst = (Uint16 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Uint16 *dst = (Uint16 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U16 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 65535; @@ -1287,22 +1342,24 @@ SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); /* Make sure src is aligned too. */ - if ((((size_t) src) & 15) == 0) { + if (!(((size_t)src) & 15)) { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t one = vdupq_n_f32(1.0f); const float32x4_t negone = vdupq_n_f32(-1.0f); const float32x4_t mulby32767 = vdupq_n_f32(32767.0f); - uint16_t *mmdst = (uint16_t *) dst; - while (i >= 8) { /* 8 * float32 */ - const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ - const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ - vst1q_u16(mmdst, vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, store out. */ - i -= 8; src += 8; mmdst += 8; + uint16_t *mmdst = (uint16_t *)dst; + while (i >= 8) { /* 8 * float32 */ + const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ + const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src + 4)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ + vst1q_u16(mmdst, vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, store out. */ + i -= 8; + src += 8; + mmdst += 8; } - dst = (Uint16 *) mmdst; + dst = (Uint16 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -1315,7 +1372,9 @@ SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = (Uint16)((sample + 1.0f) * 32767.0f); } - i--; src++; dst++; + i--; + src++; + dst++; } cvt->len_cvt /= 2; @@ -1324,17 +1383,16 @@ SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } -static void SDLCALL -SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) +static void SDLCALL SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) { - const float *src = (const float *) cvt->buf; - Sint32 *dst = (Sint32 *) cvt->buf; + const float *src = (const float *)cvt->buf; + Sint32 *dst = (Sint32 *)cvt->buf; int i; LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S32 (using NEON)"); /* Get dst aligned to 16 bytes */ - for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { + for (i = cvt->len_cvt / sizeof(float); i && (((size_t)dst) & 15); --i, ++src, ++dst) { const float sample = *src; if (sample >= 1.0f) { *dst = 2147483647; @@ -1345,20 +1403,22 @@ SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } - SDL_assert(!i || ((((size_t) dst) & 15) == 0)); - SDL_assert(!i || ((((size_t) src) & 15) == 0)); + SDL_assert(!i || !(((size_t)dst) & 15)); + SDL_assert(!i || !(((size_t)src) & 15)); { /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ const float32x4_t one = vdupq_n_f32(1.0f); const float32x4_t negone = vdupq_n_f32(-1.0f); const float32x4_t mulby8388607 = vdupq_n_f32(8388607.0f); - int32_t *mmdst = (int32_t *) dst; - while (i >= 4) { /* 4 * float32 */ + int32_t *mmdst = (int32_t *)dst; + while (i >= 4) { /* 4 * float32 */ vst1q_s32(mmdst, vshlq_n_s32(vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby8388607)), 8)); - i -= 4; src += 4; mmdst += 4; + i -= 4; + src += 4; + mmdst += 4; } - dst = (Sint32 *) mmdst; + dst = (Sint32 *)mmdst; } /* Finish off any leftovers with scalar operations. */ @@ -1371,7 +1431,9 @@ SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; } - i--; src++; dst++; + i--; + src++; + dst++; } if (cvt->filters[++cvt->filter_index]) { @@ -1380,8 +1442,6 @@ SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) } #endif - - void SDL_ChooseAudioConverters(void) { static SDL_bool converters_chosen = SDL_FALSE; @@ -1390,18 +1450,18 @@ void SDL_ChooseAudioConverters(void) return; } -#define SET_CONVERTER_FUNCS(fntype) \ - SDL_Convert_S8_to_F32 = SDL_Convert_S8_to_F32_##fntype; \ - SDL_Convert_U8_to_F32 = SDL_Convert_U8_to_F32_##fntype; \ - SDL_Convert_S16_to_F32 = SDL_Convert_S16_to_F32_##fntype; \ - SDL_Convert_U16_to_F32 = SDL_Convert_U16_to_F32_##fntype; \ - SDL_Convert_S32_to_F32 = SDL_Convert_S32_to_F32_##fntype; \ - SDL_Convert_F32_to_S8 = SDL_Convert_F32_to_S8_##fntype; \ - SDL_Convert_F32_to_U8 = SDL_Convert_F32_to_U8_##fntype; \ - SDL_Convert_F32_to_S16 = SDL_Convert_F32_to_S16_##fntype; \ - SDL_Convert_F32_to_U16 = SDL_Convert_F32_to_U16_##fntype; \ - SDL_Convert_F32_to_S32 = SDL_Convert_F32_to_S32_##fntype; \ - converters_chosen = SDL_TRUE +#define SET_CONVERTER_FUNCS(fntype) \ + SDL_Convert_S8_to_F32 = SDL_Convert_S8_to_F32_##fntype; \ + SDL_Convert_U8_to_F32 = SDL_Convert_U8_to_F32_##fntype; \ + SDL_Convert_S16_to_F32 = SDL_Convert_S16_to_F32_##fntype; \ + SDL_Convert_U16_to_F32 = SDL_Convert_U16_to_F32_##fntype; \ + SDL_Convert_S32_to_F32 = SDL_Convert_S32_to_F32_##fntype; \ + SDL_Convert_F32_to_S8 = SDL_Convert_F32_to_S8_##fntype; \ + SDL_Convert_F32_to_U8 = SDL_Convert_F32_to_U8_##fntype; \ + SDL_Convert_F32_to_S16 = SDL_Convert_F32_to_S16_##fntype; \ + SDL_Convert_F32_to_U16 = SDL_Convert_F32_to_U16_##fntype; \ + SDL_Convert_F32_to_S32 = SDL_Convert_F32_to_S32_##fntype; \ + converters_chosen = SDL_TRUE #if HAVE_SSE2_INTRINSICS if (SDL_HasSSE2()) { diff --git a/modules/SDL2/src/audio/SDL_mixer.c b/modules/SDL2/src/audio/SDL_mixer.c index 3cd8d5d..9a6a75e 100644 --- a/modules/SDL2/src/audio/SDL_mixer.c +++ b/modules/SDL2/src/audio/SDL_mixer.c @@ -81,14 +81,12 @@ static const Uint8 mix8[] = { }; /* The volume ranges from 0 - 128 */ -#define ADJUST_VOLUME(s, v) (s = (s*v)/SDL_MIX_MAXVOLUME) -#define ADJUST_VOLUME_U8(s, v) (s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128) -#define ADJUST_VOLUME_U16(s, v) (s = (((s-32768)*v)/SDL_MIX_MAXVOLUME)+32768) +#define ADJUST_VOLUME(s, v) (s = (s * v) / SDL_MIX_MAXVOLUME) +#define ADJUST_VOLUME_U8(s, v) (s = (((s - 128) * v) / SDL_MIX_MAXVOLUME) + 128) +#define ADJUST_VOLUME_U16(s, v) (s = (((s - 32768) * v) / SDL_MIX_MAXVOLUME) + 32768) - -void -SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format, - Uint32 len, int volume) +void SDL_MixAudioFormat(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, + Uint32 len, int volume) { if (volume == 0) { return; @@ -97,258 +95,248 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format, switch (format) { case AUDIO_U8: - { - Uint8 src_sample; - - while (len--) { - src_sample = *src; - ADJUST_VOLUME_U8(src_sample, volume); - *dst = mix8[*dst + src_sample]; - ++dst; - ++src; - } + { + Uint8 src_sample; + + while (len--) { + src_sample = *src; + ADJUST_VOLUME_U8(src_sample, volume); + *dst = mix8[*dst + src_sample]; + ++dst; + ++src; } - break; + } break; case AUDIO_S8: - { - Sint8 *dst8, *src8; - Sint8 src_sample; - int dst_sample; - const int max_audioval = SDL_MAX_SINT8; - const int min_audioval = SDL_MIN_SINT8; - - src8 = (Sint8 *) src; - dst8 = (Sint8 *) dst; - while (len--) { - src_sample = *src8; - ADJUST_VOLUME(src_sample, volume); - dst_sample = *dst8 + src_sample; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *dst8 = dst_sample; - ++dst8; - ++src8; + { + Sint8 *dst8, *src8; + Sint8 src_sample; + int dst_sample; + const int max_audioval = SDL_MAX_SINT8; + const int min_audioval = SDL_MIN_SINT8; + + src8 = (Sint8 *)src; + dst8 = (Sint8 *)dst; + while (len--) { + src_sample = *src8; + ADJUST_VOLUME(src_sample, volume); + dst_sample = *dst8 + src_sample; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *dst8 = dst_sample; + ++dst8; + ++src8; } - break; + } break; case AUDIO_S16LSB: - { - Sint16 src1, src2; - int dst_sample; - const int max_audioval = SDL_MAX_SINT16; - const int min_audioval = SDL_MIN_SINT16; - - len /= 2; - while (len--) { - src1 = SDL_SwapLE16(*(Sint16 *)src); - ADJUST_VOLUME(src1, volume); - src2 = SDL_SwapLE16(*(Sint16 *)dst); - src += 2; - dst_sample = src1 + src2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(Sint16 *)dst = SDL_SwapLE16(dst_sample); - dst += 2; + { + Sint16 src1, src2; + int dst_sample; + const int max_audioval = SDL_MAX_SINT16; + const int min_audioval = SDL_MIN_SINT16; + + len /= 2; + while (len--) { + src1 = SDL_SwapLE16(*(Sint16 *)src); + ADJUST_VOLUME(src1, volume); + src2 = SDL_SwapLE16(*(Sint16 *)dst); + src += 2; + dst_sample = src1 + src2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(Sint16 *)dst = SDL_SwapLE16(dst_sample); + dst += 2; } - break; + } break; case AUDIO_S16MSB: - { - Sint16 src1, src2; - int dst_sample; - const int max_audioval = SDL_MAX_SINT16; - const int min_audioval = SDL_MIN_SINT16; - - len /= 2; - while (len--) { - src1 = SDL_SwapBE16(*(Sint16 *)src); - ADJUST_VOLUME(src1, volume); - src2 = SDL_SwapBE16(*(Sint16 *)dst); - src += 2; - dst_sample = src1 + src2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(Sint16 *)dst = SDL_SwapBE16(dst_sample); - dst += 2; + { + Sint16 src1, src2; + int dst_sample; + const int max_audioval = SDL_MAX_SINT16; + const int min_audioval = SDL_MIN_SINT16; + + len /= 2; + while (len--) { + src1 = SDL_SwapBE16(*(Sint16 *)src); + ADJUST_VOLUME(src1, volume); + src2 = SDL_SwapBE16(*(Sint16 *)dst); + src += 2; + dst_sample = src1 + src2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(Sint16 *)dst = SDL_SwapBE16(dst_sample); + dst += 2; } - break; + } break; case AUDIO_U16LSB: - { - Uint16 src1, src2; - int dst_sample; - const int max_audioval = SDL_MAX_SINT16; - const int min_audioval = SDL_MIN_SINT16; - - len /= 2; - while (len--) { - src1 = SDL_SwapLE16(*(Uint16 *)src); - ADJUST_VOLUME_U16(src1, volume); - src2 = SDL_SwapLE16(*(Uint16 *)dst); - src += 2; - dst_sample = src1 + src2 - 32768 * 2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - dst_sample += 32768; - *(Uint16 *)dst = SDL_SwapLE16(dst_sample); - dst += 2; + { + Uint16 src1, src2; + int dst_sample; + const int max_audioval = SDL_MAX_SINT16; + const int min_audioval = SDL_MIN_SINT16; + + len /= 2; + while (len--) { + src1 = SDL_SwapLE16(*(Uint16 *)src); + ADJUST_VOLUME_U16(src1, volume); + src2 = SDL_SwapLE16(*(Uint16 *)dst); + src += 2; + dst_sample = src1 + src2 - 32768 * 2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + dst_sample += 32768; + *(Uint16 *)dst = SDL_SwapLE16(dst_sample); + dst += 2; } - break; + } break; case AUDIO_U16MSB: - { - Uint16 src1, src2; - int dst_sample; - const int max_audioval = SDL_MAX_SINT16; - const int min_audioval = SDL_MIN_SINT16; - - len /= 2; - while (len--) { - src1 = SDL_SwapBE16(*(Uint16 *)src); - ADJUST_VOLUME_U16(src1, volume); - src2 = SDL_SwapBE16(*(Uint16 *)dst); - src += 2; - dst_sample = src1 + src2 - 32768 * 2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - dst_sample += 32768; - *(Uint16 *)dst = SDL_SwapBE16(dst_sample); - dst += 2; + { + Uint16 src1, src2; + int dst_sample; + const int max_audioval = SDL_MAX_SINT16; + const int min_audioval = SDL_MIN_SINT16; + + len /= 2; + while (len--) { + src1 = SDL_SwapBE16(*(Uint16 *)src); + ADJUST_VOLUME_U16(src1, volume); + src2 = SDL_SwapBE16(*(Uint16 *)dst); + src += 2; + dst_sample = src1 + src2 - 32768 * 2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + dst_sample += 32768; + *(Uint16 *)dst = SDL_SwapBE16(dst_sample); + dst += 2; } - break; + } break; case AUDIO_S32LSB: - { - const Uint32 *src32 = (Uint32 *) src; - Uint32 *dst32 = (Uint32 *) dst; - Sint64 src1, src2; - Sint64 dst_sample; - const Sint64 max_audioval = SDL_MAX_SINT32; - const Sint64 min_audioval = SDL_MIN_SINT32; - - len /= 4; - while (len--) { - src1 = (Sint64) ((Sint32) SDL_SwapLE32(*src32)); - src32++; - ADJUST_VOLUME(src1, volume); - src2 = (Sint64) ((Sint32) SDL_SwapLE32(*dst32)); - dst_sample = src1 + src2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(dst32++) = SDL_SwapLE32((Uint32) ((Sint32) dst_sample)); + { + const Uint32 *src32 = (Uint32 *)src; + Uint32 *dst32 = (Uint32 *)dst; + Sint64 src1, src2; + Sint64 dst_sample; + const Sint64 max_audioval = SDL_MAX_SINT32; + const Sint64 min_audioval = SDL_MIN_SINT32; + + len /= 4; + while (len--) { + src1 = (Sint64)((Sint32)SDL_SwapLE32(*src32)); + src32++; + ADJUST_VOLUME(src1, volume); + src2 = (Sint64)((Sint32)SDL_SwapLE32(*dst32)); + dst_sample = src1 + src2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(dst32++) = SDL_SwapLE32((Uint32)((Sint32)dst_sample)); } - break; + } break; case AUDIO_S32MSB: - { - const Uint32 *src32 = (Uint32 *) src; - Uint32 *dst32 = (Uint32 *) dst; - Sint64 src1, src2; - Sint64 dst_sample; - const Sint64 max_audioval = SDL_MAX_SINT32; - const Sint64 min_audioval = SDL_MIN_SINT32; - - len /= 4; - while (len--) { - src1 = (Sint64) ((Sint32) SDL_SwapBE32(*src32)); - src32++; - ADJUST_VOLUME(src1, volume); - src2 = (Sint64) ((Sint32) SDL_SwapBE32(*dst32)); - dst_sample = src1 + src2; - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(dst32++) = SDL_SwapBE32((Uint32) ((Sint32) dst_sample)); + { + const Uint32 *src32 = (Uint32 *)src; + Uint32 *dst32 = (Uint32 *)dst; + Sint64 src1, src2; + Sint64 dst_sample; + const Sint64 max_audioval = SDL_MAX_SINT32; + const Sint64 min_audioval = SDL_MIN_SINT32; + + len /= 4; + while (len--) { + src1 = (Sint64)((Sint32)SDL_SwapBE32(*src32)); + src32++; + ADJUST_VOLUME(src1, volume); + src2 = (Sint64)((Sint32)SDL_SwapBE32(*dst32)); + dst_sample = src1 + src2; + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(dst32++) = SDL_SwapBE32((Uint32)((Sint32)dst_sample)); } - break; + } break; case AUDIO_F32LSB: - { - const float fmaxvolume = 1.0f / ((float) SDL_MIX_MAXVOLUME); - const float fvolume = (float) volume; - const float *src32 = (float *) src; - float *dst32 = (float *) dst; - float src1, src2; - double dst_sample; - /* !!! FIXME: are these right? */ - const double max_audioval = 3.402823466e+38F; - const double min_audioval = -3.402823466e+38F; - - len /= 4; - while (len--) { - src1 = ((SDL_SwapFloatLE(*src32) * fvolume) * fmaxvolume); - src2 = SDL_SwapFloatLE(*dst32); - src32++; - - dst_sample = ((double) src1) + ((double) src2); - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(dst32++) = SDL_SwapFloatLE((float) dst_sample); + { + const float fmaxvolume = 1.0f / ((float)SDL_MIX_MAXVOLUME); + const float fvolume = (float)volume; + const float *src32 = (float *)src; + float *dst32 = (float *)dst; + float src1, src2; + double dst_sample; + /* !!! FIXME: are these right? */ + const double max_audioval = 3.402823466e+38F; + const double min_audioval = -3.402823466e+38F; + + len /= 4; + while (len--) { + src1 = ((SDL_SwapFloatLE(*src32) * fvolume) * fmaxvolume); + src2 = SDL_SwapFloatLE(*dst32); + src32++; + + dst_sample = ((double)src1) + ((double)src2); + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(dst32++) = SDL_SwapFloatLE((float)dst_sample); } - break; + } break; case AUDIO_F32MSB: - { - const float fmaxvolume = 1.0f / ((float) SDL_MIX_MAXVOLUME); - const float fvolume = (float) volume; - const float *src32 = (float *) src; - float *dst32 = (float *) dst; - float src1, src2; - double dst_sample; - /* !!! FIXME: are these right? */ - const double max_audioval = 3.402823466e+38F; - const double min_audioval = -3.402823466e+38F; - - len /= 4; - while (len--) { - src1 = ((SDL_SwapFloatBE(*src32) * fvolume) * fmaxvolume); - src2 = SDL_SwapFloatBE(*dst32); - src32++; - - dst_sample = ((double) src1) + ((double) src2); - if (dst_sample > max_audioval) { - dst_sample = max_audioval; - } else if (dst_sample < min_audioval) { - dst_sample = min_audioval; - } - *(dst32++) = SDL_SwapFloatBE((float) dst_sample); + { + const float fmaxvolume = 1.0f / ((float)SDL_MIX_MAXVOLUME); + const float fvolume = (float)volume; + const float *src32 = (float *)src; + float *dst32 = (float *)dst; + float src1, src2; + double dst_sample; + /* !!! FIXME: are these right? */ + const double max_audioval = 3.402823466e+38F; + const double min_audioval = -3.402823466e+38F; + + len /= 4; + while (len--) { + src1 = ((SDL_SwapFloatBE(*src32) * fvolume) * fmaxvolume); + src2 = SDL_SwapFloatBE(*dst32); + src32++; + + dst_sample = ((double)src1) + ((double)src2); + if (dst_sample > max_audioval) { + dst_sample = max_audioval; + } else if (dst_sample < min_audioval) { + dst_sample = min_audioval; } + *(dst32++) = SDL_SwapFloatBE((float)dst_sample); } - break; + } break; - default: /* If this happens... FIXME! */ + default: /* If this happens... FIXME! */ SDL_SetError("SDL_MixAudioFormat(): unknown audio format"); return; } diff --git a/modules/SDL2/src/audio/SDL_sysaudio.h b/modules/SDL2/src/audio/SDL_sysaudio.h index 002ae2a..c755d43 100644 --- a/modules/SDL2/src/audio/SDL_sysaudio.h +++ b/modules/SDL2/src/audio/SDL_sysaudio.h @@ -30,11 +30,11 @@ /* !!! FIXME: These are wordy and unlocalized... */ #define DEFAULT_OUTPUT_DEVNAME "System audio output device" -#define DEFAULT_INPUT_DEVNAME "System audio capture device" +#define DEFAULT_INPUT_DEVNAME "System audio capture device" /* The SDL audio driver */ typedef struct SDL_AudioDevice SDL_AudioDevice; -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this /* Audio targets should call this as devices are added to the system (such as a USB headset being plugged in), and should also be called for @@ -64,21 +64,21 @@ extern void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device); typedef struct SDL_AudioDriverImpl { - void (*DetectDevices) (void); - int (*OpenDevice) (_THIS, const char *devname); - void (*ThreadInit) (_THIS); /* Called by audio thread at start */ - void (*ThreadDeinit) (_THIS); /* Called by audio thread at end */ - void (*WaitDevice) (_THIS); - void (*PlayDevice) (_THIS); - Uint8 *(*GetDeviceBuf) (_THIS); - int (*CaptureFromDevice) (_THIS, void *buffer, int buflen); - void (*FlushCapture) (_THIS); - void (*CloseDevice) (_THIS); - void (*LockDevice) (_THIS); - void (*UnlockDevice) (_THIS); - void (*FreeDeviceHandle) (void *handle); /**< SDL is done with handle from SDL_AddAudioDevice() */ - void (*Deinitialize) (void); - int (*GetDefaultAudioInfo) (char **name, SDL_AudioSpec *spec, int iscapture); + void (*DetectDevices)(void); + int (*OpenDevice)(_THIS, const char *devname); + void (*ThreadInit)(_THIS); /* Called by audio thread at start */ + void (*ThreadDeinit)(_THIS); /* Called by audio thread at end */ + void (*WaitDevice)(_THIS); + void (*PlayDevice)(_THIS); + Uint8 *(*GetDeviceBuf)(_THIS); + int (*CaptureFromDevice)(_THIS, void *buffer, int buflen); + void (*FlushCapture)(_THIS); + void (*CloseDevice)(_THIS); + void (*LockDevice)(_THIS); + void (*UnlockDevice)(_THIS); + void (*FreeDeviceHandle)(void *handle); /**< SDL is done with handle from SDL_AddAudioDevice() */ + void (*Deinitialize)(void); + int (*GetDefaultAudioInfo)(char **name, SDL_AudioSpec *spec, int iscapture); /* !!! FIXME: add pause(), so we can optimize instead of mixing silence. */ @@ -91,7 +91,6 @@ typedef struct SDL_AudioDriverImpl SDL_bool SupportsNonPow2Samples; } SDL_AudioDriverImpl; - typedef struct SDL_AudioDeviceItem { void *handle; @@ -102,7 +101,6 @@ typedef struct SDL_AudioDeviceItem struct SDL_AudioDeviceItem *next; } SDL_AudioDeviceItem; - typedef struct SDL_AudioDriver { /* * * */ @@ -125,7 +123,6 @@ typedef struct SDL_AudioDriver SDL_AudioDeviceItem *inputDevices; } SDL_AudioDriver; - /* Define the SDL audio driver structure */ struct SDL_AudioDevice { @@ -176,8 +173,8 @@ typedef struct AudioBootStrap { const char *name; const char *desc; - SDL_bool (*init) (SDL_AudioDriverImpl * impl); - SDL_bool demand_only; /* 1==request explicitly, or it won't be available. */ + SDL_bool (*init)(SDL_AudioDriverImpl *impl); + SDL_bool demand_only; /* 1==request explicitly, or it won't be available. */ } AudioBootStrap; /* Not all of these are available in a given build. Use #ifdefs, etc. */ diff --git a/modules/SDL2/src/audio/SDL_wave.c b/modules/SDL2/src/audio/SDL_wave.c index 5f0271c..209a577 100644 --- a/modules/SDL2/src/audio/SDL_wave.c +++ b/modules/SDL2/src/audio/SDL_wave.c @@ -43,8 +43,7 @@ * Returns 0 on success, or -1 if the multiplication overflows, in which case f1 * does not get modified. */ -static int -SafeMult(size_t *f1, size_t f2) +static int SafeMult(size_t *f1, size_t f2) { if (*f1 > 0 && SIZE_MAX / *f1 <= f2) { return -1; @@ -66,21 +65,24 @@ typedef struct ADPCM_DecoderState void *cstate; /* Decoding state for each channel. */ /* ADPCM data. */ - struct { + struct + { Uint8 *data; size_t size; size_t pos; } input; /* Current ADPCM block in the ADPCM data above. */ - struct { + struct + { Uint8 *data; size_t size; size_t pos; } block; /* Decoded 16-bit PCM data. */ - struct { + struct + { Sint16 *data; size_t size; size_t pos; @@ -102,8 +104,7 @@ typedef struct MS_ADPCM_ChannelState } MS_ADPCM_ChannelState; #ifdef SDL_WAVE_DEBUG_LOG_FORMAT -static void -WaveDebugLogFormat(WaveFile *file) +static void WaveDebugLogFormat(WaveFile *file) { WaveFormat *format = &file->format; const char *fmtstr = "WAVE file: %s, %u Hz, %s, %u bits, %u %s/s"; @@ -137,55 +138,60 @@ WaveDebugLogFormat(WaveFile *file) break; } -#define SDL_WAVE_DEBUG_CHANNELCFG(STR, CODE) case CODE: wavechannel = STR; break; -#define SDL_WAVE_DEBUG_CHANNELSTR(STR, CODE) if (format->channelmask & CODE) { \ - SDL_strlcat(channelstr, channelstr[0] ? "-" STR : STR, sizeof(channelstr));} +#define SDL_WAVE_DEBUG_CHANNELCFG(STR, CODE) \ + case CODE: \ + wavechannel = STR; \ + break; +#define SDL_WAVE_DEBUG_CHANNELSTR(STR, CODE) \ + if (format->channelmask & CODE) { \ + SDL_strlcat(channelstr, channelstr[0] ? "-" STR : STR, sizeof(channelstr)); \ + } if (format->formattag == EXTENSIBLE_CODE && format->channelmask > 0) { switch (format->channelmask) { - SDL_WAVE_DEBUG_CHANNELCFG("1.0 Mono", 0x4) - SDL_WAVE_DEBUG_CHANNELCFG("1.1 Mono", 0xc) - SDL_WAVE_DEBUG_CHANNELCFG("2.0 Stereo", 0x3) - SDL_WAVE_DEBUG_CHANNELCFG("2.1 Stereo", 0xb) - SDL_WAVE_DEBUG_CHANNELCFG("3.0 Stereo", 0x7) - SDL_WAVE_DEBUG_CHANNELCFG("3.1 Stereo", 0xf) - SDL_WAVE_DEBUG_CHANNELCFG("3.0 Surround", 0x103) - SDL_WAVE_DEBUG_CHANNELCFG("3.1 Surround", 0x10b) - SDL_WAVE_DEBUG_CHANNELCFG("4.0 Quad", 0x33) - SDL_WAVE_DEBUG_CHANNELCFG("4.1 Quad", 0x3b) - SDL_WAVE_DEBUG_CHANNELCFG("4.0 Surround", 0x107) - SDL_WAVE_DEBUG_CHANNELCFG("4.1 Surround", 0x10f) - SDL_WAVE_DEBUG_CHANNELCFG("5.0", 0x37) - SDL_WAVE_DEBUG_CHANNELCFG("5.1", 0x3f) - SDL_WAVE_DEBUG_CHANNELCFG("5.0 Side", 0x607) - SDL_WAVE_DEBUG_CHANNELCFG("5.1 Side", 0x60f) - SDL_WAVE_DEBUG_CHANNELCFG("6.0", 0x137) - SDL_WAVE_DEBUG_CHANNELCFG("6.1", 0x13f) - SDL_WAVE_DEBUG_CHANNELCFG("6.0 Side", 0x707) - SDL_WAVE_DEBUG_CHANNELCFG("6.1 Side", 0x70f) - SDL_WAVE_DEBUG_CHANNELCFG("7.0", 0xf7) - SDL_WAVE_DEBUG_CHANNELCFG("7.1", 0xff) - SDL_WAVE_DEBUG_CHANNELCFG("7.0 Side", 0x6c7) - SDL_WAVE_DEBUG_CHANNELCFG("7.1 Side", 0x6cf) - SDL_WAVE_DEBUG_CHANNELCFG("7.0 Surround", 0x637) - SDL_WAVE_DEBUG_CHANNELCFG("7.1 Surround", 0x63f) - SDL_WAVE_DEBUG_CHANNELCFG("9.0 Surround", 0x5637) - SDL_WAVE_DEBUG_CHANNELCFG("9.1 Surround", 0x563f) - SDL_WAVE_DEBUG_CHANNELCFG("11.0 Surround", 0x56f7) - SDL_WAVE_DEBUG_CHANNELCFG("11.1 Surround", 0x56ff) + SDL_WAVE_DEBUG_CHANNELCFG("1.0 Mono", 0x4) + SDL_WAVE_DEBUG_CHANNELCFG("1.1 Mono", 0xc) + SDL_WAVE_DEBUG_CHANNELCFG("2.0 Stereo", 0x3) + SDL_WAVE_DEBUG_CHANNELCFG("2.1 Stereo", 0xb) + SDL_WAVE_DEBUG_CHANNELCFG("3.0 Stereo", 0x7) + SDL_WAVE_DEBUG_CHANNELCFG("3.1 Stereo", 0xf) + SDL_WAVE_DEBUG_CHANNELCFG("3.0 Surround", 0x103) + SDL_WAVE_DEBUG_CHANNELCFG("3.1 Surround", 0x10b) + SDL_WAVE_DEBUG_CHANNELCFG("4.0 Quad", 0x33) + SDL_WAVE_DEBUG_CHANNELCFG("4.1 Quad", 0x3b) + SDL_WAVE_DEBUG_CHANNELCFG("4.0 Surround", 0x107) + SDL_WAVE_DEBUG_CHANNELCFG("4.1 Surround", 0x10f) + SDL_WAVE_DEBUG_CHANNELCFG("5.0", 0x37) + SDL_WAVE_DEBUG_CHANNELCFG("5.1", 0x3f) + SDL_WAVE_DEBUG_CHANNELCFG("5.0 Side", 0x607) + SDL_WAVE_DEBUG_CHANNELCFG("5.1 Side", 0x60f) + SDL_WAVE_DEBUG_CHANNELCFG("6.0", 0x137) + SDL_WAVE_DEBUG_CHANNELCFG("6.1", 0x13f) + SDL_WAVE_DEBUG_CHANNELCFG("6.0 Side", 0x707) + SDL_WAVE_DEBUG_CHANNELCFG("6.1 Side", 0x70f) + SDL_WAVE_DEBUG_CHANNELCFG("7.0", 0xf7) + SDL_WAVE_DEBUG_CHANNELCFG("7.1", 0xff) + SDL_WAVE_DEBUG_CHANNELCFG("7.0 Side", 0x6c7) + SDL_WAVE_DEBUG_CHANNELCFG("7.1 Side", 0x6cf) + SDL_WAVE_DEBUG_CHANNELCFG("7.0 Surround", 0x637) + SDL_WAVE_DEBUG_CHANNELCFG("7.1 Surround", 0x63f) + SDL_WAVE_DEBUG_CHANNELCFG("9.0 Surround", 0x5637) + SDL_WAVE_DEBUG_CHANNELCFG("9.1 Surround", 0x563f) + SDL_WAVE_DEBUG_CHANNELCFG("11.0 Surround", 0x56f7) + SDL_WAVE_DEBUG_CHANNELCFG("11.1 Surround", 0x56ff) default: - SDL_WAVE_DEBUG_CHANNELSTR("FL", 0x1) - SDL_WAVE_DEBUG_CHANNELSTR("FR", 0x2) - SDL_WAVE_DEBUG_CHANNELSTR("FC", 0x4) - SDL_WAVE_DEBUG_CHANNELSTR("LF", 0x8) - SDL_WAVE_DEBUG_CHANNELSTR("BL", 0x10) - SDL_WAVE_DEBUG_CHANNELSTR("BR", 0x20) + SDL_WAVE_DEBUG_CHANNELSTR("FL", 0x1) + SDL_WAVE_DEBUG_CHANNELSTR("FR", 0x2) + SDL_WAVE_DEBUG_CHANNELSTR("FC", 0x4) + SDL_WAVE_DEBUG_CHANNELSTR("LF", 0x8) + SDL_WAVE_DEBUG_CHANNELSTR("BL", 0x10) + SDL_WAVE_DEBUG_CHANNELSTR("BR", 0x20) SDL_WAVE_DEBUG_CHANNELSTR("FLC", 0x40) SDL_WAVE_DEBUG_CHANNELSTR("FRC", 0x80) - SDL_WAVE_DEBUG_CHANNELSTR("BC", 0x100) - SDL_WAVE_DEBUG_CHANNELSTR("SL", 0x200) - SDL_WAVE_DEBUG_CHANNELSTR("SR", 0x400) - SDL_WAVE_DEBUG_CHANNELSTR("TC", 0x800) + SDL_WAVE_DEBUG_CHANNELSTR("BC", 0x100) + SDL_WAVE_DEBUG_CHANNELSTR("SL", 0x200) + SDL_WAVE_DEBUG_CHANNELSTR("SR", 0x400) + SDL_WAVE_DEBUG_CHANNELSTR("TC", 0x800) SDL_WAVE_DEBUG_CHANNELSTR("TFL", 0x1000) SDL_WAVE_DEBUG_CHANNELSTR("TFC", 0x2000) SDL_WAVE_DEBUG_CHANNELSTR("TFR", 0x4000) @@ -226,33 +232,32 @@ WaveDebugLogFormat(WaveFile *file) #endif #ifdef SDL_WAVE_DEBUG_DUMP_FORMAT -static void -WaveDebugDumpFormat(WaveFile *file, Uint32 rifflen, Uint32 fmtlen, Uint32 datalen) +static void WaveDebugDumpFormat(WaveFile *file, Uint32 rifflen, Uint32 fmtlen, Uint32 datalen) { WaveFormat *format = &file->format; const char *fmtstr1 = "WAVE chunk dump:\n" - "-------------------------------------------\n" - "RIFF %11u\n" - "-------------------------------------------\n" - " fmt %11u\n" - " wFormatTag 0x%04x\n" - " nChannels %11u\n" - " nSamplesPerSec %11u\n" - " nAvgBytesPerSec %11u\n" - " nBlockAlign %11u\n"; + "-------------------------------------------\n" + "RIFF %11u\n" + "-------------------------------------------\n" + " fmt %11u\n" + " wFormatTag 0x%04x\n" + " nChannels %11u\n" + " nSamplesPerSec %11u\n" + " nAvgBytesPerSec %11u\n" + " nBlockAlign %11u\n"; const char *fmtstr2 = " wBitsPerSample %11u\n"; const char *fmtstr3 = " cbSize %11u\n"; const char *fmtstr4a = " wValidBitsPerSample %11u\n"; const char *fmtstr4b = " wSamplesPerBlock %11u\n"; const char *fmtstr5 = " dwChannelMask 0x%08x\n" - " SubFormat\n" - " %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x\n"; + " SubFormat\n" + " %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x\n"; const char *fmtstr6 = "-------------------------------------------\n" - " fact\n" - " dwSampleLength %11u\n"; + " fact\n" + " dwSampleLength %11u\n"; const char *fmtstr7 = "-------------------------------------------\n" - " data %11u\n" - "-------------------------------------------\n"; + " data %11u\n" + "-------------------------------------------\n"; char *dumpstr; size_t dumppos = 0; const size_t bufsize = 1024; @@ -317,8 +322,7 @@ WaveDebugDumpFormat(WaveFile *file, Uint32 rifflen, Uint32 fmtlen, Uint32 datale } #endif -static Sint64 -WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes) +static Sint64 WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes) { if (file->fact.status == 2) { if (file->facthint == FactStrict && sampleframes < file->fact.samplelength) { @@ -331,8 +335,7 @@ WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes) return sampleframes; } -static int -MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) +static int MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; const size_t blockheadersize = (size_t)file->format.channels * 7; @@ -371,8 +374,7 @@ MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) return 0; } -static int -MS_ADPCM_Init(WaveFile *file, size_t datalength) +static int MS_ADPCM_Init(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; WaveChunk *chunk = &file->chunk; @@ -380,7 +382,7 @@ MS_ADPCM_Init(WaveFile *file, size_t datalength) const size_t blockdatasize = (size_t)format->blockalign - blockheadersize; const size_t blockframebitsize = (size_t)format->bitspersample * format->channels; const size_t blockdatasamples = (blockdatasize * 8) / blockframebitsize; - const Sint16 presetcoeffs[14] = {256, 0, 512, -256, 0, 0, 192, 64, 240, 0, 460, -208, 392, -232}; + const Sint16 presetcoeffs[14] = { 256, 0, 512, -256, 0, 0, 192, 64, 240, 0, 460, -208, 392, -232 }; size_t i, coeffcount; MS_ADPCM_CoeffData *coeffdata; @@ -490,8 +492,7 @@ MS_ADPCM_Init(WaveFile *file, size_t datalength) return 0; } -static Sint16 -MS_ADPCM_ProcessNibble(MS_ADPCM_ChannelState *cstate, Sint32 sample1, Sint32 sample2, Uint8 nybble) +static Sint16 MS_ADPCM_ProcessNibble(MS_ADPCM_ChannelState *cstate, Sint32 sample1, Sint32 sample2, Uint8 nybble) { const Sint32 max_audioval = 32767; const Sint32 min_audioval = -32768; @@ -527,8 +528,7 @@ MS_ADPCM_ProcessNibble(MS_ADPCM_ChannelState *cstate, Sint32 sample1, Sint32 sam return (Sint16)new_sample; } -static int -MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) +static int MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) { Uint8 coeffindex; const Uint32 channels = state->channels; @@ -549,20 +549,20 @@ MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) cstate[c].coeff2 = ddata->coeff[coeffindex * 2 + 1]; /* Initial delta value. */ - o = channels + c * 2; + o = (size_t)channels + c * 2; cstate[c].delta = state->block.data[o] | ((Uint16)state->block.data[o + 1] << 8); /* Load the samples from the header. Interestingly, the sample later in * the output stream comes first. */ - o = channels * 3 + c * 2; + o = (size_t)channels * 3 + c * 2; sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8); if (sample >= 0x8000) { sample -= 0x10000; } state->output.data[state->output.pos + channels] = (Sint16)sample; - o = channels * 5 + c * 2; + o = (size_t)channels * 5 + c * 2; sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8); if (sample >= 0x8000) { sample -= 0x10000; @@ -588,8 +588,7 @@ MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) * will always contain full sample frames (same sample count for each channel). * Incomplete sample frames are discarded. */ -static int -MS_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) +static int MS_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) { Uint16 nybble = 0; Sint16 sample1, sample2; @@ -636,8 +635,7 @@ MS_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) return 0; } -static int -MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) +static int MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) { int result; size_t bytesleft, outputsize; @@ -736,8 +734,7 @@ MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) return 0; } -static int -IMA_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) +static int IMA_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; const size_t blockheadersize = (size_t)format->channels * 4; @@ -790,8 +787,7 @@ IMA_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) return 0; } -static int -IMA_ADPCM_Init(WaveFile *file, size_t datalength) +static int IMA_ADPCM_Init(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; WaveChunk *chunk = &file->chunk; @@ -820,7 +816,7 @@ IMA_ADPCM_Init(WaveFile *file, size_t datalength) /* There's no specification for this, but it's basically the same * format because the extensible header has wSampePerBlocks too. */ - } else { + } else { /* The Standards Update says there 'should' be 2 bytes for wSamplesPerBlock. */ if (chunk->size >= 20 && format->extsize >= 2) { format->samplesperblock = chunk->data[18] | ((Uint16)chunk->data[19] << 8); @@ -856,8 +852,7 @@ IMA_ADPCM_Init(WaveFile *file, size_t datalength) return 0; } -static Sint16 -IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble) +static Sint16 IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble) { const Sint32 max_audioval = 32767; const Sint32 min_audioval = -32768; @@ -901,14 +896,18 @@ IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble) * (nybble & 0x8 ? -1 : 1) * ((nybble & 0x7) * step / 4 + step / 8) */ delta = step >> 3; - if (nybble & 0x04) + if (nybble & 0x04) { delta += step; - if (nybble & 0x02) + } + if (nybble & 0x02) { delta += step >> 1; - if (nybble & 0x01) + } + if (nybble & 0x01) { delta += step >> 2; - if (nybble & 0x08) + } + if (nybble & 0x08) { delta = -delta; + } sample = lastsample + delta; @@ -922,12 +921,11 @@ IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble) return (Sint16)sample; } -static int -IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) +static int IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) { Sint16 step; Uint32 c; - Uint8 *cstate = (Uint8 *) state->cstate; + Uint8 *cstate = (Uint8 *)state->cstate; for (c = 0; c < state->channels; c++) { size_t o = state->block.pos + c * 4; @@ -945,7 +943,7 @@ IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) /* Reserved byte in block header, should be 0. */ if (state->block.data[o + 3] != 0) { - /* Uh oh, corrupt data? Buggy code? */ ; + /* Uh oh, corrupt data? Buggy code? */; } } @@ -962,13 +960,12 @@ IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state) * contains full sample frames (same sample count for each channel). * Incomplete sample frames are discarded. */ -static int -IMA_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) +static int IMA_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) { size_t i; int retval = 0; const Uint32 channels = state->channels; - const size_t subblockframesize = channels * 4; + const size_t subblockframesize = (size_t)channels * 4; Uint64 bytesrequired; Uint32 c; @@ -1032,8 +1029,7 @@ IMA_ADPCM_DecodeBlockData(ADPCM_DecoderState *state) return retval; } -static int -IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) +static int IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) { int result; size_t bytesleft, outputsize; @@ -1136,8 +1132,7 @@ IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) return 0; } -static int -LAW_Init(WaveFile *file, size_t datalength) +static int LAW_Init(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; @@ -1165,8 +1160,7 @@ LAW_Init(WaveFile *file, size_t datalength) return 0; } -static int -LAW_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) +static int LAW_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) { #ifdef SDL_WAVE_LAW_LUT const Sint16 alaw_lut[256] = { @@ -1308,8 +1302,7 @@ LAW_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) return 0; } -static int -PCM_Init(WaveFile *file, size_t datalength) +static int PCM_Init(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; @@ -1352,8 +1345,7 @@ PCM_Init(WaveFile *file, size_t datalength) return 0; } -static int -PCM_ConvertSint24ToSint32(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) +static int PCM_ConvertSint24ToSint32(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) { WaveFormat *format = &file->format; WaveChunk *chunk = &file->chunk; @@ -1404,8 +1396,7 @@ PCM_ConvertSint24ToSint32(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) return 0; } -static int -PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) +static int PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) { WaveFormat *format = &file->format; WaveChunk *chunk = &file->chunk; @@ -1447,8 +1438,7 @@ PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len) return 0; } -static WaveRiffSizeHint -WaveGetRiffSizeHint() +static WaveRiffSizeHint WaveGetRiffSizeHint() { const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE); @@ -1467,8 +1457,7 @@ WaveGetRiffSizeHint() return RiffSizeNoHint; } -static WaveTruncationHint -WaveGetTruncationHint() +static WaveTruncationHint WaveGetTruncationHint() { const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION); @@ -1487,8 +1476,7 @@ WaveGetTruncationHint() return TruncNoHint; } -static WaveFactChunkHint -WaveGetFactChunkHint() +static WaveFactChunkHint WaveGetFactChunkHint() { const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK); @@ -1507,8 +1495,7 @@ WaveGetFactChunkHint() return FactNoHint; } -static void -WaveFreeChunkData(WaveChunk *chunk) +static void WaveFreeChunkData(WaveChunk *chunk) { if (chunk->data != NULL) { SDL_free(chunk->data); @@ -1517,8 +1504,7 @@ WaveFreeChunkData(WaveChunk *chunk) chunk->size = 0; } -static int -WaveNextChunk(SDL_RWops *src, WaveChunk *chunk) +static int WaveNextChunk(SDL_RWops *src, WaveChunk *chunk) { Uint32 chunkheader[2]; Sint64 nextposition = chunk->position + chunk->length; @@ -1550,8 +1536,7 @@ WaveNextChunk(SDL_RWops *src, WaveChunk *chunk) return 0; } -static int -WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length) +static int WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length) { WaveFreeChunkData(chunk); @@ -1560,7 +1545,7 @@ WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length) } if (length > 0) { - chunk->data = (Uint8 *) SDL_malloc(length); + chunk->data = (Uint8 *)SDL_malloc(length); if (chunk->data == NULL) { return SDL_OutOfMemory(); } @@ -1579,30 +1564,32 @@ WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length) return 0; } -static int -WaveReadChunkData(SDL_RWops *src, WaveChunk *chunk) +static int WaveReadChunkData(SDL_RWops *src, WaveChunk *chunk) { return WaveReadPartialChunkData(src, chunk, chunk->length); } -typedef struct WaveExtensibleGUID { +typedef struct WaveExtensibleGUID +{ Uint16 encoding; Uint8 guid[16]; } WaveExtensibleGUID; /* Some of the GUIDs that are used by WAVEFORMATEXTENSIBLE. */ -#define WAVE_FORMATTAG_GUID(tag) {(tag) & 0xff, (tag) >> 8, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113} +#define WAVE_FORMATTAG_GUID(tag) \ + { \ + (tag) & 0xff, (tag) >> 8, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 \ + } static WaveExtensibleGUID extensible_guids[] = { - {PCM_CODE, WAVE_FORMATTAG_GUID(PCM_CODE)}, - {MS_ADPCM_CODE, WAVE_FORMATTAG_GUID(MS_ADPCM_CODE)}, - {IEEE_FLOAT_CODE, WAVE_FORMATTAG_GUID(IEEE_FLOAT_CODE)}, - {ALAW_CODE, WAVE_FORMATTAG_GUID(ALAW_CODE)}, - {MULAW_CODE, WAVE_FORMATTAG_GUID(MULAW_CODE)}, - {IMA_ADPCM_CODE, WAVE_FORMATTAG_GUID(IMA_ADPCM_CODE)} + { PCM_CODE, WAVE_FORMATTAG_GUID(PCM_CODE) }, + { MS_ADPCM_CODE, WAVE_FORMATTAG_GUID(MS_ADPCM_CODE) }, + { IEEE_FLOAT_CODE, WAVE_FORMATTAG_GUID(IEEE_FLOAT_CODE) }, + { ALAW_CODE, WAVE_FORMATTAG_GUID(ALAW_CODE) }, + { MULAW_CODE, WAVE_FORMATTAG_GUID(MULAW_CODE) }, + { IMA_ADPCM_CODE, WAVE_FORMATTAG_GUID(IMA_ADPCM_CODE) } }; -static Uint16 -WaveGetFormatGUIDEncoding(WaveFormat *format) +static Uint16 WaveGetFormatGUIDEncoding(WaveFormat *format) { size_t i; for (i = 0; i < SDL_arraysize(extensible_guids); i++) { @@ -1613,8 +1600,7 @@ WaveGetFormatGUIDEncoding(WaveFormat *format) return UNKNOWN_CODE; } -static int -WaveReadFormat(WaveFile *file) +static int WaveReadFormat(WaveFile *file) { WaveChunk *chunk = &file->chunk; WaveFormat *format = &file->format; @@ -1675,8 +1661,7 @@ WaveReadFormat(WaveFile *file) return 0; } -static int -WaveCheckFormat(WaveFile *file, size_t datalength) +static int WaveCheckFormat(WaveFile *file, size_t datalength) { WaveFormat *format = &file->format; @@ -1726,7 +1711,7 @@ WaveCheckFormat(WaveFile *file, size_t datalength) /* All supported formats must have a proper block size. */ if (format->blockalign == 0) { - return SDL_SetError("Invalid block alignment"); + format->blockalign = 1; /* force it to 1 if it was unset. */ } /* If the fact chunk is valid and the appropriate hint is set, the @@ -1783,8 +1768,7 @@ WaveCheckFormat(WaveFile *file, size_t datalength) return 0; } -static int -WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) +static int WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) { int result; Uint32 chunkcount = 0; @@ -2049,7 +2033,7 @@ WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, SDL_zerop(spec); spec->freq = format->frequency; spec->channels = (Uint8)format->channels; - spec->samples = 4096; /* Good default buffer size */ + spec->samples = 4096; /* Good default buffer size */ switch (format->encoding) { case MS_ADPCM_CODE: @@ -2093,8 +2077,7 @@ WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, return 0; } -SDL_AudioSpec * -SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) +SDL_AudioSpec *SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) { int result; WaveFile file; @@ -2146,8 +2129,7 @@ SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_b /* Since the WAV memory is allocated in the shared library, it must also be freed here. (Necessary under Win32, VC++) */ -void -SDL_FreeWAV(Uint8 *audio_buf) +void SDL_FreeWAV(Uint8 *audio_buf) { SDL_free(audio_buf); } diff --git a/modules/SDL2/src/audio/SDL_wave.h b/modules/SDL2/src/audio/SDL_wave.h index 2514edc..83acb44 100644 --- a/modules/SDL2/src/audio/SDL_wave.h +++ b/modules/SDL2/src/audio/SDL_wave.h @@ -26,14 +26,14 @@ /* Define values for Microsoft WAVE format */ /*******************************************/ /* FOURCC */ -#define RIFF 0x46464952 /* "RIFF" */ -#define WAVE 0x45564157 /* "WAVE" */ -#define FACT 0x74636166 /* "fact" */ -#define LIST 0x5453494c /* "LIST" */ -#define BEXT 0x74786562 /* "bext" */ -#define JUNK 0x4B4E554A /* "JUNK" */ -#define FMT 0x20746D66 /* "fmt " */ -#define DATA 0x61746164 /* "data" */ +#define RIFF 0x46464952 /* "RIFF" */ +#define WAVE 0x45564157 /* "WAVE" */ +#define FACT 0x74636166 /* "fact" */ +#define LIST 0x5453494c /* "LIST" */ +#define BEXT 0x74786562 /* "bext" */ +#define JUNK 0x4B4E554A /* "JUNK" */ +#define FMT 0x20746D66 /* "fmt " */ +#define DATA 0x61746164 /* "data" */ /* Format tags */ #define UNKNOWN_CODE 0x0000 #define PCM_CODE 0x0001 @@ -49,13 +49,13 @@ /* Stores the WAVE format information. */ typedef struct WaveFormat { - Uint16 formattag; /* Raw value of the first field in the fmt chunk data. */ - Uint16 encoding; /* Actual encoding, possibly from the extensible header. */ - Uint16 channels; /* Number of channels. */ - Uint32 frequency; /* Sampling rate in Hz. */ - Uint32 byterate; /* Average bytes per second. */ - Uint16 blockalign; /* Bytes per block. */ - Uint16 bitspersample; /* Currently supported are 8, 16, 24, 32, and 4 for ADPCM. */ + Uint16 formattag; /* Raw value of the first field in the fmt chunk data. */ + Uint16 encoding; /* Actual encoding, possibly from the extensible header. */ + Uint16 channels; /* Number of channels. */ + Uint32 frequency; /* Sampling rate in Hz. */ + Uint32 byterate; /* Average bytes per second. */ + Uint16 blockalign; /* Bytes per block. */ + Uint16 bitspersample; /* Currently supported are 8, 16, 24, 32, and 4 for ADPCM. */ /* Extra information size. Number of extra bytes starting at byte 18 in the * fmt chunk data. This is at least 22 for the extensible header. @@ -66,11 +66,12 @@ typedef struct WaveFormat Uint16 validsamplebits; Uint32 samplesperblock; /* For compressed formats. Can be zero. Actually 16 bits in the header. */ Uint32 channelmask; - Uint8 subformat[16]; /* A format GUID. */ + Uint8 subformat[16]; /* A format GUID. */ } WaveFormat; /* Stores information on the fact chunk. */ -typedef struct WaveFact { +typedef struct WaveFact +{ /* Represents the state of the fact chunk in the WAVE file. * Set to -1 if the fact chunk is invalid. * Set to 0 if the fact chunk is not present @@ -101,7 +102,8 @@ typedef struct WaveChunk } WaveChunk; /* Controls how the size of the RIFF chunk affects the loading of a WAVE file. */ -typedef enum WaveRiffSizeHint { +typedef enum WaveRiffSizeHint +{ RiffSizeNoHint, RiffSizeForce, RiffSizeIgnoreZero, @@ -110,7 +112,8 @@ typedef enum WaveRiffSizeHint { } WaveRiffSizeHint; /* Controls how a truncated WAVE file is handled. */ -typedef enum WaveTruncationHint { +typedef enum WaveTruncationHint +{ TruncNoHint, TruncVeryStrict, TruncStrict, @@ -119,7 +122,8 @@ typedef enum WaveTruncationHint { } WaveTruncationHint; /* Controls how the fact chunk affects the loading of a WAVE file. */ -typedef enum WaveFactChunkHint { +typedef enum WaveFactChunkHint +{ FactNoHint, FactTruncate, FactStrict, @@ -139,7 +143,7 @@ typedef struct WaveFile */ Sint64 sampleframes; - void *decoderdata; /* Some decoders require extra data for a state. */ + void *decoderdata; /* Some decoders require extra data for a state. */ WaveRiffSizeHint riffhint; WaveTruncationHint trunchint; diff --git a/modules/SDL2/src/audio/aaudio/SDL_aaudio.c b/modules/SDL2/src/audio/aaudio/SDL_aaudio.c index 4652d57..8dfd16c 100644 --- a/modules/SDL2/src/audio/aaudio/SDL_aaudio.c +++ b/modules/SDL2/src/audio/aaudio/SDL_aaudio.c @@ -30,17 +30,17 @@ /* Debug */ #if 0 -# define LOGI(...) SDL_Log(__VA_ARGS__); +#define LOGI(...) SDL_Log(__VA_ARGS__); #else -# define LOGI(...) +#define LOGI(...) #endif typedef struct AAUDIO_Data { AAudioStreamBuilder *builder; void *handle; -#define SDL_PROC(ret,func,params) ret (*func) params; -# include "SDL_aaudiofuncs.h" +#define SDL_PROC(ret, func, params) ret (*func) params; +#include "SDL_aaudiofuncs.h" #undef SDL_PROC } AAUDIO_Data; static AAUDIO_Data ctx; @@ -50,28 +50,27 @@ static SDL_AudioDevice *captureDevice = NULL; static int aaudio_LoadFunctions(AAUDIO_Data *data) { -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_LoadFunction(data->handle, #func); \ - if (! data->func) { \ - return SDL_SetError("Couldn't load AAUDIO function %s: %s", #func, SDL_GetError()); \ - } \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_LoadFunction(data->handle, #func); \ + if (!data->func) { \ + return SDL_SetError("Couldn't load AAUDIO function %s: %s", #func, SDL_GetError()); \ + } \ } while (0); #include "SDL_aaudiofuncs.h" #undef SDL_PROC return 0; } -void aaudio_errorCallback( AAudioStream *stream, void *userData, aaudio_result_t error ); -void aaudio_errorCallback( AAudioStream *stream, void *userData, aaudio_result_t error ) +void aaudio_errorCallback(AAudioStream *stream, void *userData, aaudio_result_t error); +void aaudio_errorCallback(AAudioStream *stream, void *userData, aaudio_result_t error) { - LOGI( "SDL aaudio_errorCallback: %d - %s", error, ctx.AAudio_convertResultToText( error ) ); + LOGI("SDL aaudio_errorCallback: %d - %s", error, ctx.AAudio_convertResultToText(error)); } #define LIB_AAUDIO_SO "libaaudio.so" -static int -aaudio_OpenDevice(_THIS, const char *devname) +static int aaudio_OpenDevice(_THIS, const char *devname) { struct SDL_PrivateAudioData *private; SDL_bool iscapture = this->iscapture; @@ -94,7 +93,7 @@ aaudio_OpenDevice(_THIS, const char *devname) audioDevice = this; } - this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, (sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -102,6 +101,11 @@ aaudio_OpenDevice(_THIS, const char *devname) ctx.AAudioStreamBuilder_setSampleRate(ctx.builder, this->spec.freq); ctx.AAudioStreamBuilder_setChannelCount(ctx.builder, this->spec.channels); + if(devname != NULL) { + int aaudio_device_id = SDL_atoi(devname); + LOGI("Opening device id %d", aaudio_device_id); + ctx.AAudioStreamBuilder_setDeviceId(ctx.builder, aaudio_device_id); + } { aaudio_direction_t direction = (iscapture ? AAUDIO_DIRECTION_INPUT : AAUDIO_DIRECTION_OUTPUT); ctx.AAudioStreamBuilder_setDirection(ctx.builder, direction); @@ -116,11 +120,11 @@ aaudio_OpenDevice(_THIS, const char *devname) ctx.AAudioStreamBuilder_setFormat(ctx.builder, format); } - ctx.AAudioStreamBuilder_setErrorCallback( ctx.builder, aaudio_errorCallback, private ); + ctx.AAudioStreamBuilder_setErrorCallback(ctx.builder, aaudio_errorCallback, private); LOGI("AAudio Try to open %u hz %u bit chan %u %s samples %u", - this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), - this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); + this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), + this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); res = ctx.AAudioStreamBuilder_openStream(ctx.builder, &private->stream); if (res != AAUDIO_OK) { @@ -140,15 +144,15 @@ aaudio_OpenDevice(_THIS, const char *devname) } LOGI("AAudio Try to open %u hz %u bit chan %u %s samples %u", - this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), - this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); + this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), + this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); SDL_CalculateAudioSpec(&this->spec); /* Allocate mixing buffer */ if (!iscapture) { private->mixlen = this->spec.size; - private->mixbuf = (Uint8 *) SDL_malloc(private->mixlen); + private->mixbuf = (Uint8 *)SDL_malloc(private->mixlen); if (private->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -167,8 +171,7 @@ aaudio_OpenDevice(_THIS, const char *devname) return 0; } -static void -aaudio_CloseDevice(_THIS) +static void aaudio_CloseDevice(_THIS) { struct SDL_PrivateAudioData *private = this->hidden; aaudio_result_t res; @@ -202,20 +205,18 @@ aaudio_CloseDevice(_THIS) SDL_free(this->hidden); } -static Uint8 * -aaudio_GetDeviceBuf(_THIS) +static Uint8 *aaudio_GetDeviceBuf(_THIS) { struct SDL_PrivateAudioData *private = this->hidden; return private->mixbuf; } -static void -aaudio_PlayDevice(_THIS) +static void aaudio_PlayDevice(_THIS) { struct SDL_PrivateAudioData *private = this->hidden; aaudio_result_t res; int64_t timeoutNanoseconds = 1 * 1000 * 1000; /* 8 ms */ - res = ctx.AAudioStream_write(private->stream, private->mixbuf, private->mixlen / private->frame_size, timeoutNanoseconds); + res = ctx.AAudioStream_write(private->stream, private->mixbuf, private->mixlen / private->frame_size, timeoutNanoseconds); if (res < 0) { LOGI("%s : %s", __func__, ctx.AAudio_convertResultToText(res)); } else { @@ -235,13 +236,12 @@ aaudio_PlayDevice(_THIS) #endif } -static int -aaudio_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int aaudio_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *private = this->hidden; aaudio_result_t res; int64_t timeoutNanoseconds = 8 * 1000 * 1000; /* 8 ms */ - res = ctx.AAudioStream_read(private->stream, buffer, buflen / private->frame_size, timeoutNanoseconds); + res = ctx.AAudioStream_read(private->stream, buffer, buflen / private->frame_size, timeoutNanoseconds); if (res < 0) { LOGI("%s : %s", __func__, ctx.AAudio_convertResultToText(res)); return -1; @@ -250,8 +250,7 @@ aaudio_CaptureFromDevice(_THIS, void *buffer, int buflen) return res * private->frame_size; } -static void -aaudio_Deinitialize(void) +static void aaudio_Deinitialize(void) { LOGI(__func__); if (ctx.handle) { @@ -269,8 +268,7 @@ aaudio_Deinitialize(void) LOGI("End AAUDIO %s", SDL_GetError()); } -static SDL_bool -aaudio_Init(SDL_AudioDriverImpl *impl) +static SDL_bool aaudio_Init(SDL_AudioDriverImpl *impl) { aaudio_result_t res; LOGI(__func__); @@ -307,17 +305,19 @@ aaudio_Init(SDL_AudioDriverImpl *impl) goto failure; } + impl->DetectDevices = Android_DetectDevices; impl->Deinitialize = aaudio_Deinitialize; impl->OpenDevice = aaudio_OpenDevice; impl->CloseDevice = aaudio_CloseDevice; impl->PlayDevice = aaudio_PlayDevice; impl->GetDeviceBuf = aaudio_GetDeviceBuf; impl->CaptureFromDevice = aaudio_CaptureFromDevice; + impl->AllowsArbitraryDeviceNames = SDL_TRUE; /* and the capabilities */ impl->HasCaptureSupport = SDL_TRUE; - impl->OnlyHasDefaultOutputDevice = SDL_TRUE; - impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; + impl->OnlyHasDefaultOutputDevice = SDL_FALSE; + impl->OnlyHasDefaultCaptureDevice = SDL_FALSE; /* this audio target is available. */ LOGI("SDL aaudio_Init OK"); @@ -345,7 +345,7 @@ void aaudio_PauseDevices(void) /* TODO: Handle multiple devices? */ struct SDL_PrivateAudioData *private; if (audioDevice != NULL && audioDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) audioDevice->hidden; + private = (struct SDL_PrivateAudioData *)audioDevice->hidden; if (private->stream) { aaudio_result_t res = ctx.AAudioStream_requestPause(private->stream); @@ -366,7 +366,7 @@ void aaudio_PauseDevices(void) } if (captureDevice != NULL && captureDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) captureDevice->hidden; + private = (struct SDL_PrivateAudioData *)captureDevice->hidden; if (private->stream) { /* Pause() isn't implemented for 'capture', use Stop() */ @@ -394,7 +394,7 @@ void aaudio_ResumeDevices(void) /* TODO: Handle multiple devices? */ struct SDL_PrivateAudioData *private; if (audioDevice != NULL && audioDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) audioDevice->hidden; + private = (struct SDL_PrivateAudioData *)audioDevice->hidden; if (private->resume) { SDL_AtomicSet(&audioDevice->paused, 0); @@ -412,7 +412,7 @@ void aaudio_ResumeDevices(void) } if (captureDevice != NULL && captureDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) captureDevice->hidden; + private = (struct SDL_PrivateAudioData *)captureDevice->hidden; if (private->resume) { SDL_AtomicSet(&captureDevice->paused, 0); @@ -435,24 +435,24 @@ void aaudio_ResumeDevices(void) None of the standard state queries indicate any problem in my testing. And the error callback doesn't actually get called. But, AAudioStream_getTimestamp() does return AAUDIO_ERROR_INVALID_STATE */ -SDL_bool aaudio_DetectBrokenPlayState( void ) +SDL_bool aaudio_DetectBrokenPlayState(void) { struct SDL_PrivateAudioData *private; int64_t framePosition, timeNanoseconds; aaudio_result_t res; - if ( !audioDevice || !audioDevice->hidden ) { + if (audioDevice == NULL || !audioDevice->hidden) { return SDL_FALSE; } private = audioDevice->hidden; - res = ctx.AAudioStream_getTimestamp( private->stream, CLOCK_MONOTONIC, &framePosition, &timeNanoseconds ); - if ( res == AAUDIO_ERROR_INVALID_STATE ) { - aaudio_stream_state_t currentState = ctx.AAudioStream_getState( private->stream ); + res = ctx.AAudioStream_getTimestamp(private->stream, CLOCK_MONOTONIC, &framePosition, &timeNanoseconds); + if (res == AAUDIO_ERROR_INVALID_STATE) { + aaudio_stream_state_t currentState = ctx.AAudioStream_getState(private->stream); /* AAudioStream_getTimestamp() will also return AAUDIO_ERROR_INVALID_STATE while the stream is still initially starting. But we only care if it silently went invalid while playing. */ - if ( currentState == AAUDIO_STREAM_STATE_STARTED ) { - LOGI( "SDL aaudio_DetectBrokenPlayState: detected invalid audio device state: AAudioStream_getTimestamp result=%d, framePosition=%lld, timeNanoseconds=%lld, getState=%d", (int)res, (long long)framePosition, (long long)timeNanoseconds, (int)currentState ); + if (currentState == AAUDIO_STREAM_STATE_STARTED) { + LOGI("SDL aaudio_DetectBrokenPlayState: detected invalid audio device state: AAudioStream_getTimestamp result=%d, framePosition=%lld, timeNanoseconds=%lld, getState=%d", (int)res, (long long)framePosition, (long long)timeNanoseconds, (int)currentState); return SDL_TRUE; } } diff --git a/modules/SDL2/src/audio/aaudio/SDL_aaudio.h b/modules/SDL2/src/audio/aaudio/SDL_aaudio.h index c774add..d051e1e 100644 --- a/modules/SDL2/src/audio/aaudio/SDL_aaudio.h +++ b/modules/SDL2/src/audio/aaudio/SDL_aaudio.h @@ -28,7 +28,7 @@ #include /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -42,12 +42,11 @@ struct SDL_PrivateAudioData /* Resume device if it was paused automatically */ int resume; }; - + void aaudio_ResumeDevices(void); void aaudio_PauseDevices(void); SDL_bool aaudio_DetectBrokenPlayState(void); - #endif /* _SDL_aaudio_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/audio/aaudio/SDL_aaudiofuncs.h b/modules/SDL2/src/audio/aaudio/SDL_aaudiofuncs.h index 2a837a5..3f0749c 100644 --- a/modules/SDL2/src/audio/aaudio/SDL_aaudiofuncs.h +++ b/modules/SDL2/src/audio/aaudio/SDL_aaudiofuncs.h @@ -19,62 +19,61 @@ 3. This notice may not be removed or altered from any source distribution. */ -#define SDL_PROC_UNUSED(ret,func,params) +#define SDL_PROC_UNUSED(ret, func, params) SDL_PROC(const char *, AAudio_convertResultToText, (aaudio_result_t returnCode)) SDL_PROC(const char *, AAudio_convertStreamStateToText, (aaudio_stream_state_t state)) -SDL_PROC(aaudio_result_t, AAudio_createStreamBuilder, (AAudioStreamBuilder** builder)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setDeviceId, (AAudioStreamBuilder* builder, int32_t deviceId)) -SDL_PROC(void, AAudioStreamBuilder_setSampleRate, (AAudioStreamBuilder* builder, int32_t sampleRate)) -SDL_PROC(void, AAudioStreamBuilder_setChannelCount, (AAudioStreamBuilder* builder, int32_t channelCount)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSamplesPerFrame, (AAudioStreamBuilder* builder, int32_t samplesPerFrame)) -SDL_PROC(void, AAudioStreamBuilder_setFormat, (AAudioStreamBuilder* builder, aaudio_format_t format)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSharingMode, (AAudioStreamBuilder* builder, aaudio_sharing_mode_t sharingMode)) -SDL_PROC(void, AAudioStreamBuilder_setDirection, (AAudioStreamBuilder* builder, aaudio_direction_t direction)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setBufferCapacityInFrames, (AAudioStreamBuilder* builder, int32_t numFrames)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setPerformanceMode, (AAudioStreamBuilder* builder, aaudio_performance_mode_t mode)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setUsage, (AAudioStreamBuilder* builder, aaudio_usage_t usage)) /* API 28 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setContentType, (AAudioStreamBuilder* builder, aaudio_content_type_t contentType)) /* API 28 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setInputPreset, (AAudioStreamBuilder* builder, aaudio_input_preset_t inputPreset)) /* API 28 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setAllowedCapturePolicy, (AAudioStreamBuilder* builder, aaudio_allowed_capture_policy_t capturePolicy)) /* API 29 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSessionId, (AAudioStreamBuilder* builder, aaudio_session_id_t sessionId)) /* API 28 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setPrivacySensitive, (AAudioStreamBuilder* builder, bool privacySensitive)) /* API 30 */ -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setDataCallback, (AAudioStreamBuilder* builder, AAudioStream_dataCallback callback, void *userData)) -SDL_PROC_UNUSED(void, AAudioStreamBuilder_setFramesPerDataCallback, (AAudioStreamBuilder* builder, int32_t numFrames)) -SDL_PROC(void, AAudioStreamBuilder_setErrorCallback, (AAudioStreamBuilder* builder, AAudioStream_errorCallback callback, void *userData)) -SDL_PROC(aaudio_result_t , AAudioStreamBuilder_openStream, (AAudioStreamBuilder* builder, AAudioStream** stream)) -SDL_PROC(aaudio_result_t , AAudioStreamBuilder_delete, (AAudioStreamBuilder* builder)) -SDL_PROC_UNUSED(aaudio_result_t , AAudioStream_release, (AAudioStream* stream)) /* API 30 */ -SDL_PROC(aaudio_result_t , AAudioStream_close, (AAudioStream* stream)) -SDL_PROC(aaudio_result_t , AAudioStream_requestStart, (AAudioStream* stream)) -SDL_PROC(aaudio_result_t , AAudioStream_requestPause, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_result_t , AAudioStream_requestFlush, (AAudioStream* stream)) -SDL_PROC(aaudio_result_t , AAudioStream_requestStop, (AAudioStream* stream)) -SDL_PROC(aaudio_stream_state_t, AAudioStream_getState, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_waitForStateChange, (AAudioStream* stream, aaudio_stream_state_t inputState, aaudio_stream_state_t *nextState, int64_t timeoutNanoseconds)) -SDL_PROC(aaudio_result_t, AAudioStream_read, (AAudioStream* stream, void *buffer, int32_t numFrames, int64_t timeoutNanoseconds)) -SDL_PROC(aaudio_result_t, AAudioStream_write, (AAudioStream* stream, const void *buffer, int32_t numFrames, int64_t timeoutNanoseconds)) -SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_setBufferSizeInFrames, (AAudioStream* stream, int32_t numFrames)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getBufferSizeInFrames, (AAudioStream* stream)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getFramesPerBurst, (AAudioStream* stream)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getBufferCapacityInFrames, (AAudioStream* stream)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getFramesPerDataCallback, (AAudioStream* stream)) -SDL_PROC(int32_t, AAudioStream_getXRunCount, (AAudioStream* stream)) -SDL_PROC(int32_t, AAudioStream_getSampleRate, (AAudioStream* stream)) -SDL_PROC(int32_t, AAudioStream_getChannelCount, (AAudioStream* stream)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getSamplesPerFrame, (AAudioStream* stream)) -SDL_PROC_UNUSED(int32_t, AAudioStream_getDeviceId, (AAudioStream* stream)) -SDL_PROC(aaudio_format_t, AAudioStream_getFormat, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_sharing_mode_t, AAudioStream_getSharingMode, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_performance_mode_t, AAudioStream_getPerformanceMode, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_direction_t, AAudioStream_getDirection, (AAudioStream* stream)) -SDL_PROC_UNUSED(int64_t, AAudioStream_getFramesWritten, (AAudioStream* stream)) -SDL_PROC_UNUSED(int64_t, AAudioStream_getFramesRead, (AAudioStream* stream)) -SDL_PROC_UNUSED(aaudio_session_id_t, AAudioStream_getSessionId, (AAudioStream* stream)) /* API 28 */ -SDL_PROC(aaudio_result_t, AAudioStream_getTimestamp, (AAudioStream* stream, clockid_t clockid, int64_t *framePosition, int64_t *timeNanoseconds)) -SDL_PROC_UNUSED(aaudio_usage_t, AAudioStream_getUsage, (AAudioStream* stream)) /* API 28 */ -SDL_PROC_UNUSED(aaudio_content_type_t, AAudioStream_getContentType, (AAudioStream* stream)) /* API 28 */ -SDL_PROC_UNUSED(aaudio_input_preset_t, AAudioStream_getInputPreset, (AAudioStream* stream)) /* API 28 */ -SDL_PROC_UNUSED(aaudio_allowed_capture_policy_t, AAudioStream_getAllowedCapturePolicy, ( AAudioStream* stream)) /* API 29 */ -SDL_PROC_UNUSED(bool, AAudioStream_isPrivacySensitive, (AAudioStream* stream)) /* API 30 */ - +SDL_PROC(aaudio_result_t, AAudio_createStreamBuilder, (AAudioStreamBuilder * *builder)) +SDL_PROC(void, AAudioStreamBuilder_setDeviceId, (AAudioStreamBuilder * builder, int32_t deviceId)) +SDL_PROC(void, AAudioStreamBuilder_setSampleRate, (AAudioStreamBuilder * builder, int32_t sampleRate)) +SDL_PROC(void, AAudioStreamBuilder_setChannelCount, (AAudioStreamBuilder * builder, int32_t channelCount)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSamplesPerFrame, (AAudioStreamBuilder * builder, int32_t samplesPerFrame)) +SDL_PROC(void, AAudioStreamBuilder_setFormat, (AAudioStreamBuilder * builder, aaudio_format_t format)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSharingMode, (AAudioStreamBuilder * builder, aaudio_sharing_mode_t sharingMode)) +SDL_PROC(void, AAudioStreamBuilder_setDirection, (AAudioStreamBuilder * builder, aaudio_direction_t direction)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setBufferCapacityInFrames, (AAudioStreamBuilder * builder, int32_t numFrames)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setPerformanceMode, (AAudioStreamBuilder * builder, aaudio_performance_mode_t mode)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setUsage, (AAudioStreamBuilder * builder, aaudio_usage_t usage)) /* API 28 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setContentType, (AAudioStreamBuilder * builder, aaudio_content_type_t contentType)) /* API 28 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setInputPreset, (AAudioStreamBuilder * builder, aaudio_input_preset_t inputPreset)) /* API 28 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setAllowedCapturePolicy, (AAudioStreamBuilder * builder, aaudio_allowed_capture_policy_t capturePolicy)) /* API 29 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSessionId, (AAudioStreamBuilder * builder, aaudio_session_id_t sessionId)) /* API 28 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setPrivacySensitive, (AAudioStreamBuilder * builder, bool privacySensitive)) /* API 30 */ +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setDataCallback, (AAudioStreamBuilder * builder, AAudioStream_dataCallback callback, void *userData)) +SDL_PROC_UNUSED(void, AAudioStreamBuilder_setFramesPerDataCallback, (AAudioStreamBuilder * builder, int32_t numFrames)) +SDL_PROC(void, AAudioStreamBuilder_setErrorCallback, (AAudioStreamBuilder * builder, AAudioStream_errorCallback callback, void *userData)) +SDL_PROC(aaudio_result_t, AAudioStreamBuilder_openStream, (AAudioStreamBuilder * builder, AAudioStream **stream)) +SDL_PROC(aaudio_result_t, AAudioStreamBuilder_delete, (AAudioStreamBuilder * builder)) +SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_release, (AAudioStream * stream)) /* API 30 */ +SDL_PROC(aaudio_result_t, AAudioStream_close, (AAudioStream * stream)) +SDL_PROC(aaudio_result_t, AAudioStream_requestStart, (AAudioStream * stream)) +SDL_PROC(aaudio_result_t, AAudioStream_requestPause, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_requestFlush, (AAudioStream * stream)) +SDL_PROC(aaudio_result_t, AAudioStream_requestStop, (AAudioStream * stream)) +SDL_PROC(aaudio_stream_state_t, AAudioStream_getState, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_waitForStateChange, (AAudioStream * stream, aaudio_stream_state_t inputState, aaudio_stream_state_t *nextState, int64_t timeoutNanoseconds)) +SDL_PROC(aaudio_result_t, AAudioStream_read, (AAudioStream * stream, void *buffer, int32_t numFrames, int64_t timeoutNanoseconds)) +SDL_PROC(aaudio_result_t, AAudioStream_write, (AAudioStream * stream, const void *buffer, int32_t numFrames, int64_t timeoutNanoseconds)) +SDL_PROC_UNUSED(aaudio_result_t, AAudioStream_setBufferSizeInFrames, (AAudioStream * stream, int32_t numFrames)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getBufferSizeInFrames, (AAudioStream * stream)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getFramesPerBurst, (AAudioStream * stream)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getBufferCapacityInFrames, (AAudioStream * stream)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getFramesPerDataCallback, (AAudioStream * stream)) +SDL_PROC(int32_t, AAudioStream_getXRunCount, (AAudioStream * stream)) +SDL_PROC(int32_t, AAudioStream_getSampleRate, (AAudioStream * stream)) +SDL_PROC(int32_t, AAudioStream_getChannelCount, (AAudioStream * stream)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getSamplesPerFrame, (AAudioStream * stream)) +SDL_PROC_UNUSED(int32_t, AAudioStream_getDeviceId, (AAudioStream * stream)) +SDL_PROC(aaudio_format_t, AAudioStream_getFormat, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_sharing_mode_t, AAudioStream_getSharingMode, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_performance_mode_t, AAudioStream_getPerformanceMode, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_direction_t, AAudioStream_getDirection, (AAudioStream * stream)) +SDL_PROC_UNUSED(int64_t, AAudioStream_getFramesWritten, (AAudioStream * stream)) +SDL_PROC_UNUSED(int64_t, AAudioStream_getFramesRead, (AAudioStream * stream)) +SDL_PROC_UNUSED(aaudio_session_id_t, AAudioStream_getSessionId, (AAudioStream * stream)) /* API 28 */ +SDL_PROC(aaudio_result_t, AAudioStream_getTimestamp, (AAudioStream * stream, clockid_t clockid, int64_t *framePosition, int64_t *timeNanoseconds)) +SDL_PROC_UNUSED(aaudio_usage_t, AAudioStream_getUsage, (AAudioStream * stream)) /* API 28 */ +SDL_PROC_UNUSED(aaudio_content_type_t, AAudioStream_getContentType, (AAudioStream * stream)) /* API 28 */ +SDL_PROC_UNUSED(aaudio_input_preset_t, AAudioStream_getInputPreset, (AAudioStream * stream)) /* API 28 */ +SDL_PROC_UNUSED(aaudio_allowed_capture_policy_t, AAudioStream_getAllowedCapturePolicy, (AAudioStream * stream)) /* API 29 */ +SDL_PROC_UNUSED(bool, AAudioStream_isPrivacySensitive, (AAudioStream * stream)) /* API 30 */ diff --git a/modules/SDL2/src/audio/alsa/SDL_alsa_audio.c b/modules/SDL2/src/audio/alsa/SDL_alsa_audio.c index 609d12b..c531613 100644 --- a/modules/SDL2/src/audio/alsa/SDL_alsa_audio.c +++ b/modules/SDL2/src/audio/alsa/SDL_alsa_audio.c @@ -34,7 +34,7 @@ /* Allow access to a raw mixing buffer */ #include -#include /* For kill() */ +#include /* For kill() */ #include #include "SDL_timer.h" @@ -46,64 +46,46 @@ #include "SDL_loadso.h" #endif -static int (*ALSA_snd_pcm_open) - (snd_pcm_t **, const char *, snd_pcm_stream_t, int); -static int (*ALSA_snd_pcm_close) (snd_pcm_t * pcm); -static snd_pcm_sframes_t (*ALSA_snd_pcm_writei) - (snd_pcm_t *, const void *, snd_pcm_uframes_t); -static snd_pcm_sframes_t (*ALSA_snd_pcm_readi) - (snd_pcm_t *, void *, snd_pcm_uframes_t); -static int (*ALSA_snd_pcm_recover) (snd_pcm_t *, int, int); -static int (*ALSA_snd_pcm_prepare) (snd_pcm_t *); -static int (*ALSA_snd_pcm_drain) (snd_pcm_t *); -static const char *(*ALSA_snd_strerror) (int); -static size_t(*ALSA_snd_pcm_hw_params_sizeof) (void); -static size_t(*ALSA_snd_pcm_sw_params_sizeof) (void); -static void (*ALSA_snd_pcm_hw_params_copy) - (snd_pcm_hw_params_t *, const snd_pcm_hw_params_t *); -static int (*ALSA_snd_pcm_hw_params_any) (snd_pcm_t *, snd_pcm_hw_params_t *); -static int (*ALSA_snd_pcm_hw_params_set_access) - (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_access_t); -static int (*ALSA_snd_pcm_hw_params_set_format) - (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_format_t); -static int (*ALSA_snd_pcm_hw_params_set_channels) - (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int); -static int (*ALSA_snd_pcm_hw_params_get_channels) - (const snd_pcm_hw_params_t *, unsigned int *); -static int (*ALSA_snd_pcm_hw_params_set_rate_near) - (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); -static int (*ALSA_snd_pcm_hw_params_set_period_size_near) - (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_uframes_t *, int *); -static int (*ALSA_snd_pcm_hw_params_get_period_size) - (const snd_pcm_hw_params_t *, snd_pcm_uframes_t *, int *); -static int (*ALSA_snd_pcm_hw_params_set_periods_min) - (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); -static int (*ALSA_snd_pcm_hw_params_set_periods_first) - (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); -static int (*ALSA_snd_pcm_hw_params_get_periods) - (const snd_pcm_hw_params_t *, unsigned int *, int *); -static int (*ALSA_snd_pcm_hw_params_set_buffer_size_near) - (snd_pcm_t *pcm, snd_pcm_hw_params_t *, snd_pcm_uframes_t *); -static int (*ALSA_snd_pcm_hw_params_get_buffer_size) - (const snd_pcm_hw_params_t *, snd_pcm_uframes_t *); -static int (*ALSA_snd_pcm_hw_params) (snd_pcm_t *, snd_pcm_hw_params_t *); -static int (*ALSA_snd_pcm_sw_params_current) (snd_pcm_t *, - snd_pcm_sw_params_t *); -static int (*ALSA_snd_pcm_sw_params_set_start_threshold) - (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t); -static int (*ALSA_snd_pcm_sw_params) (snd_pcm_t *, snd_pcm_sw_params_t *); -static int (*ALSA_snd_pcm_nonblock) (snd_pcm_t *, int); +static int (*ALSA_snd_pcm_open)(snd_pcm_t **, const char *, snd_pcm_stream_t, int); +static int (*ALSA_snd_pcm_close)(snd_pcm_t *pcm); +static snd_pcm_sframes_t (*ALSA_snd_pcm_writei)(snd_pcm_t *, const void *, snd_pcm_uframes_t); +static snd_pcm_sframes_t (*ALSA_snd_pcm_readi)(snd_pcm_t *, void *, snd_pcm_uframes_t); +static int (*ALSA_snd_pcm_recover)(snd_pcm_t *, int, int); +static int (*ALSA_snd_pcm_prepare)(snd_pcm_t *); +static int (*ALSA_snd_pcm_drain)(snd_pcm_t *); +static const char *(*ALSA_snd_strerror)(int); +static size_t (*ALSA_snd_pcm_hw_params_sizeof)(void); +static size_t (*ALSA_snd_pcm_sw_params_sizeof)(void); +static void (*ALSA_snd_pcm_hw_params_copy)(snd_pcm_hw_params_t *, const snd_pcm_hw_params_t *); +static int (*ALSA_snd_pcm_hw_params_any)(snd_pcm_t *, snd_pcm_hw_params_t *); +static int (*ALSA_snd_pcm_hw_params_set_access)(snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_access_t); +static int (*ALSA_snd_pcm_hw_params_set_format)(snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_format_t); +static int (*ALSA_snd_pcm_hw_params_set_channels)(snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int); +static int (*ALSA_snd_pcm_hw_params_get_channels)(const snd_pcm_hw_params_t *, unsigned int *); +static int (*ALSA_snd_pcm_hw_params_set_rate_near)(snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); +static int (*ALSA_snd_pcm_hw_params_set_period_size_near)(snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_uframes_t *, int *); +static int (*ALSA_snd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *, snd_pcm_uframes_t *, int *); +static int (*ALSA_snd_pcm_hw_params_set_periods_min)(snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); +static int (*ALSA_snd_pcm_hw_params_set_periods_first)(snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int *, int *); +static int (*ALSA_snd_pcm_hw_params_get_periods)(const snd_pcm_hw_params_t *, unsigned int *, int *); +static int (*ALSA_snd_pcm_hw_params_set_buffer_size_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *, snd_pcm_uframes_t *); +static int (*ALSA_snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *, snd_pcm_uframes_t *); +static int (*ALSA_snd_pcm_hw_params)(snd_pcm_t *, snd_pcm_hw_params_t *); +static int (*ALSA_snd_pcm_sw_params_current)(snd_pcm_t *, + snd_pcm_sw_params_t *); +static int (*ALSA_snd_pcm_sw_params_set_start_threshold)(snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t); +static int (*ALSA_snd_pcm_sw_params)(snd_pcm_t *, snd_pcm_sw_params_t *); +static int (*ALSA_snd_pcm_nonblock)(snd_pcm_t *, int); static int (*ALSA_snd_pcm_wait)(snd_pcm_t *, int); -static int (*ALSA_snd_pcm_sw_params_set_avail_min) - (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t); +static int (*ALSA_snd_pcm_sw_params_set_avail_min)(snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t); static int (*ALSA_snd_pcm_reset)(snd_pcm_t *); -static int (*ALSA_snd_device_name_hint) (int, const char *, void ***); -static char* (*ALSA_snd_device_name_get_hint) (const void *, const char *); -static int (*ALSA_snd_device_name_free_hint) (void **); +static int (*ALSA_snd_device_name_hint)(int, const char *, void ***); +static char *(*ALSA_snd_device_name_get_hint)(const void *, const char *); +static int (*ALSA_snd_device_name_free_hint)(void **); static snd_pcm_sframes_t (*ALSA_snd_pcm_avail)(snd_pcm_t *); #ifdef SND_CHMAP_API_VERSION -static snd_pcm_chmap_t* (*ALSA_snd_pcm_get_chmap) (snd_pcm_t *); -static int (*ALSA_snd_pcm_chmap_print) (const snd_pcm_chmap_t *map, size_t maxlen, char *buf); +static snd_pcm_chmap_t *(*ALSA_snd_pcm_get_chmap)(snd_pcm_t *); +static int (*ALSA_snd_pcm_chmap_print)(const snd_pcm_chmap_t *map, size_t maxlen, char *buf); #endif #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC @@ -113,8 +95,7 @@ static int (*ALSA_snd_pcm_chmap_print) (const snd_pcm_chmap_t *map, size_t maxle static const char *alsa_library = SDL_AUDIO_DRIVER_ALSA_DYNAMIC; static void *alsa_handle = NULL; -static int -load_alsa_sym(const char *fn, void **addr) +static int load_alsa_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(alsa_handle, fn); if (*addr == NULL) { @@ -126,14 +107,14 @@ load_alsa_sym(const char *fn, void **addr) } /* cast funcs to char* first, to please GCC's strict aliasing rules. */ -#define SDL_ALSA_SYM(x) \ - if (!load_alsa_sym(#x, (void **) (char *) &ALSA_##x)) return -1 +#define SDL_ALSA_SYM(x) \ + if (!load_alsa_sym(#x, (void **)(char *)&ALSA_##x)) \ + return -1 #else #define SDL_ALSA_SYM(x) ALSA_##x = x #endif -static int -load_alsa_syms(void) +static int load_alsa_syms(void) { SDL_ALSA_SYM(snd_pcm_open); SDL_ALSA_SYM(snd_pcm_close); @@ -183,8 +164,7 @@ load_alsa_syms(void) #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC -static void -UnloadALSALibrary(void) +static void UnloadALSALibrary(void) { if (alsa_handle != NULL) { SDL_UnloadObject(alsa_handle); @@ -192,8 +172,7 @@ UnloadALSALibrary(void) } } -static int -LoadALSALibrary(void) +static int LoadALSALibrary(void) { int retval = 0; if (alsa_handle == NULL) { @@ -213,13 +192,11 @@ LoadALSALibrary(void) #else -static void -UnloadALSALibrary(void) +static void UnloadALSALibrary(void) { } -static int -LoadALSALibrary(void) +static int LoadALSALibrary(void) { load_alsa_syms(); return 0; @@ -227,17 +204,16 @@ LoadALSALibrary(void) #endif /* SDL_AUDIO_DRIVER_ALSA_DYNAMIC */ -static const char * -get_audio_device(void *handle, const int channels) +static const char *get_audio_device(void *handle, const int channels) { const char *device; if (handle != NULL) { - return (const char *) handle; + return (const char *)handle; } /* !!! FIXME: we also check "SDL_AUDIO_DEVICE_NAME" at the higher level. */ - device = SDL_getenv("AUDIODEV"); /* Is there a standard variable name? */ + device = SDL_getenv("AUDIODEV"); /* Is there a standard variable name? */ if (device != NULL) { return device; } @@ -251,49 +227,50 @@ get_audio_device(void *handle, const int channels) return "default"; } - /* This function waits until it is possible to write a full sound buffer */ -static void -ALSA_WaitDevice(_THIS) +static void ALSA_WaitDevice(_THIS) { #if SDL_ALSA_NON_BLOCKING - const snd_pcm_sframes_t needed = (snd_pcm_sframes_t) this->spec.samples; + const snd_pcm_sframes_t needed = (snd_pcm_sframes_t)this->spec.samples; while (SDL_AtomicGet(&this->enabled)) { const snd_pcm_sframes_t rc = ALSA_snd_pcm_avail(this->hidden->pcm_handle); if ((rc < 0) && (rc != -EAGAIN)) { /* Hmm, not much we can do - abort */ fprintf(stderr, "ALSA snd_pcm_avail failed (unrecoverable): %s\n", - ALSA_snd_strerror(rc)); + ALSA_snd_strerror(rc)); SDL_OpenedAudioDeviceDisconnected(this); return; } else if (rc < needed) { const Uint32 delay = ((needed - (SDL_max(rc, 0))) * 1000) / this->spec.freq; SDL_Delay(SDL_max(delay, 10)); } else { - break; /* ready to go! */ + break; /* ready to go! */ } } #endif } - /* !!! FIXME: is there a channel swizzler in alsalib instead? */ /* * https://bugzilla.libsdl.org/show_bug.cgi?id=110 * "For Linux ALSA, this is FL-FR-RL-RR-C-LFE * and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-RL-RR" */ -#define SWIZ6(T) \ -static void swizzle_alsa_channels_6_##T(void *buffer, const Uint32 bufferlen) { \ - T *ptr = (T *) buffer; \ - Uint32 i; \ - for (i = 0; i < bufferlen; i++, ptr += 6) { \ - T tmp; \ - tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \ - tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \ - } \ -} - +#define SWIZ6(T) \ + static void swizzle_alsa_channels_6_##T(void *buffer, const Uint32 bufferlen) \ + { \ + T *ptr = (T *)buffer; \ + Uint32 i; \ + for (i = 0; i < bufferlen; i++, ptr += 6) { \ + T tmp; \ + tmp = ptr[2]; \ + ptr[2] = ptr[4]; \ + ptr[4] = tmp; \ + tmp = ptr[3]; \ + ptr[3] = ptr[5]; \ + ptr[5] = tmp; \ + } \ + } /* !!! FIXME: is there a channel swizzler in alsalib instead? */ /* !!! FIXME: this screams for a SIMD shuffle operation. */ @@ -302,31 +279,32 @@ static void swizzle_alsa_channels_6_##T(void *buffer, const Uint32 bufferlen) { * For Linux ALSA, this appears to be FL-FR-RL-RR-C-LFE-SL-SR * and for Windows DirectX [and CoreAudio], this is FL-FR-C-LFE-SL-SR-RL-RR" */ -#define SWIZ8(T) \ -static void swizzle_alsa_channels_8_##T(void *buffer, const Uint32 bufferlen) { \ - T *ptr = (T *) buffer; \ - Uint32 i; \ - for (i = 0; i < bufferlen; i++, ptr += 6) { \ - const T center = ptr[2]; \ - const T subwoofer = ptr[3]; \ - const T side_left = ptr[4]; \ - const T side_right = ptr[5]; \ - const T rear_left = ptr[6]; \ - const T rear_right = ptr[7]; \ - ptr[2] = rear_left; \ - ptr[3] = rear_right; \ - ptr[4] = center; \ - ptr[5] = subwoofer; \ - ptr[6] = side_left; \ - ptr[7] = side_right; \ - } \ -} +#define SWIZ8(T) \ + static void swizzle_alsa_channels_8_##T(void *buffer, const Uint32 bufferlen) \ + { \ + T *ptr = (T *)buffer; \ + Uint32 i; \ + for (i = 0; i < bufferlen; i++, ptr += 6) { \ + const T center = ptr[2]; \ + const T subwoofer = ptr[3]; \ + const T side_left = ptr[4]; \ + const T side_right = ptr[5]; \ + const T rear_left = ptr[6]; \ + const T rear_right = ptr[7]; \ + ptr[2] = rear_left; \ + ptr[3] = rear_right; \ + ptr[4] = center; \ + ptr[5] = subwoofer; \ + ptr[6] = side_left; \ + ptr[7] = side_right; \ + } \ + } #define CHANNEL_SWIZZLE(x) \ - x(Uint64) \ - x(Uint32) \ - x(Uint16) \ - x(Uint8) + x(Uint64) \ + x(Uint32) \ + x(Uint16) \ + x(Uint8) CHANNEL_SWIZZLE(SWIZ6) CHANNEL_SWIZZLE(SWIZ8) @@ -335,53 +313,59 @@ CHANNEL_SWIZZLE(SWIZ8) #undef SWIZ6 #undef SWIZ8 - /* * Called right before feeding this->hidden->mixbuf to the hardware. Swizzle * channels from Windows/Mac order to the format alsalib will want. */ -static void -swizzle_alsa_channels(_THIS, void *buffer, Uint32 bufferlen) +static void swizzle_alsa_channels(_THIS, void *buffer, Uint32 bufferlen) { switch (this->spec.channels) { - #define CHANSWIZ(chans) \ - case chans: \ - switch ((this->spec.format & (0xFF))) { \ - case 8: swizzle_alsa_channels_##chans##_Uint8(buffer, bufferlen); break; \ - case 16: swizzle_alsa_channels_##chans##_Uint16(buffer, bufferlen); break; \ - case 32: swizzle_alsa_channels_##chans##_Uint32(buffer, bufferlen); break; \ - case 64: swizzle_alsa_channels_##chans##_Uint64(buffer, bufferlen); break; \ - default: SDL_assert(!"unhandled bitsize"); break; \ - } \ - return; +#define CHANSWIZ(chans) \ + case chans: \ + switch ((this->spec.format & (0xFF))) { \ + case 8: \ + swizzle_alsa_channels_##chans##_Uint8(buffer, bufferlen); \ + break; \ + case 16: \ + swizzle_alsa_channels_##chans##_Uint16(buffer, bufferlen); \ + break; \ + case 32: \ + swizzle_alsa_channels_##chans##_Uint32(buffer, bufferlen); \ + break; \ + case 64: \ + swizzle_alsa_channels_##chans##_Uint64(buffer, bufferlen); \ + break; \ + default: \ + SDL_assert(!"unhandled bitsize"); \ + break; \ + } \ + return; CHANSWIZ(6); CHANSWIZ(8); - #undef CHANSWIZ - default: break; +#undef CHANSWIZ + default: + break; } } #ifdef SND_CHMAP_API_VERSION /* Some devices have the right channel map, no swizzling necessary */ -static void -no_swizzle(_THIS, void *buffer, Uint32 bufferlen) +static void no_swizzle(_THIS, void *buffer, Uint32 bufferlen) { } #endif /* SND_CHMAP_API_VERSION */ - -static void -ALSA_PlayDevice(_THIS) +static void ALSA_PlayDevice(_THIS) { - const Uint8 *sample_buf = (const Uint8 *) this->hidden->mixbuf; + const Uint8 *sample_buf = (const Uint8 *)this->hidden->mixbuf; const int frame_size = ((SDL_AUDIO_BITSIZE(this->spec.format)) / 8) * - this->spec.channels; - snd_pcm_uframes_t frames_left = ((snd_pcm_uframes_t) this->spec.samples); + this->spec.channels; + snd_pcm_uframes_t frames_left = ((snd_pcm_uframes_t)this->spec.samples); this->hidden->swizzle_func(this, this->hidden->mixbuf, frames_left); - while ( frames_left > 0 && SDL_AtomicGet(&this->enabled) ) { + while (frames_left > 0 && SDL_AtomicGet(&this->enabled)) { int status = ALSA_snd_pcm_writei(this->hidden->pcm_handle, sample_buf, frames_left); @@ -395,14 +379,14 @@ ALSA_PlayDevice(_THIS) status = ALSA_snd_pcm_recover(this->hidden->pcm_handle, status, 0); if (status < 0) { /* Hmm, not much we can do - abort */ - fprintf(stderr, "ALSA write failed (unrecoverable): %s\n", - ALSA_snd_strerror(status)); + SDL_LogError(SDL_LOG_CATEGORY_AUDIO, + "ALSA write failed (unrecoverable): %s\n", + ALSA_snd_strerror(status)); SDL_OpenedAudioDeviceDisconnected(this); return; } continue; - } - else if (status == 0) { + } else if (status == 0) { /* No frames were written (no available space in pcm device). Allow other threads to catch up. */ Uint32 delay = (frames_left / 2 * 1000) / this->spec.freq; @@ -414,41 +398,39 @@ ALSA_PlayDevice(_THIS) } } -static Uint8 * -ALSA_GetDeviceBuf(_THIS) +static Uint8 *ALSA_GetDeviceBuf(_THIS) { - return (this->hidden->mixbuf); + return this->hidden->mixbuf; } -static int -ALSA_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int ALSA_CaptureFromDevice(_THIS, void *buffer, int buflen) { - Uint8 *sample_buf = (Uint8 *) buffer; + Uint8 *sample_buf = (Uint8 *)buffer; const int frame_size = ((SDL_AUDIO_BITSIZE(this->spec.format)) / 8) * - this->spec.channels; + this->spec.channels; const int total_frames = buflen / frame_size; snd_pcm_uframes_t frames_left = total_frames; snd_pcm_uframes_t wait_time = frame_size / 2; SDL_assert((buflen % frame_size) == 0); - while ( frames_left > 0 && SDL_AtomicGet(&this->enabled) ) { + while (frames_left > 0 && SDL_AtomicGet(&this->enabled)) { int status; status = ALSA_snd_pcm_readi(this->hidden->pcm_handle, - sample_buf, frames_left); + sample_buf, frames_left); if (status == -EAGAIN) { ALSA_snd_pcm_wait(this->hidden->pcm_handle, wait_time); status = 0; - } - else if (status < 0) { + } else if (status < 0) { /*printf("ALSA: capture error %d\n", status);*/ status = ALSA_snd_pcm_recover(this->hidden->pcm_handle, status, 0); if (status < 0) { /* Hmm, not much we can do - abort */ - fprintf(stderr, "ALSA read failed (unrecoverable): %s\n", - ALSA_snd_strerror(status)); + SDL_LogError(SDL_LOG_CATEGORY_AUDIO, + "ALSA read failed (unrecoverable): %s\n", + ALSA_snd_strerror(status)); return -1; } continue; @@ -464,14 +446,12 @@ ALSA_CaptureFromDevice(_THIS, void *buffer, int buflen) return (total_frames - frames_left) * frame_size; } -static void -ALSA_FlushCapture(_THIS) +static void ALSA_FlushCapture(_THIS) { ALSA_snd_pcm_reset(this->hidden->pcm_handle); } -static void -ALSA_CloseDevice(_THIS) +static void ALSA_CloseDevice(_THIS) { if (this->hidden->pcm_handle) { /* Wait for the submitted audio to drain @@ -486,8 +466,7 @@ ALSA_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params) +static int ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params) { int status; snd_pcm_hw_params_t *hwparams; @@ -501,49 +480,48 @@ ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params) /* Attempt to match the period size to the requested buffer size */ persize = this->spec.samples; status = ALSA_snd_pcm_hw_params_set_period_size_near( - this->hidden->pcm_handle, hwparams, &persize, NULL); - if ( status < 0 ) { - return(-1); + this->hidden->pcm_handle, hwparams, &persize, NULL); + if (status < 0) { + return -1; } /* Need to at least double buffer */ periods = 2; status = ALSA_snd_pcm_hw_params_set_periods_min( - this->hidden->pcm_handle, hwparams, &periods, NULL); - if ( status < 0 ) { - return(-1); + this->hidden->pcm_handle, hwparams, &periods, NULL); + if (status < 0) { + return -1; } status = ALSA_snd_pcm_hw_params_set_periods_first( - this->hidden->pcm_handle, hwparams, &periods, NULL); - if ( status < 0 ) { - return(-1); + this->hidden->pcm_handle, hwparams, &periods, NULL); + if (status < 0) { + return -1; } /* "set" the hardware with the desired parameters */ status = ALSA_snd_pcm_hw_params(this->hidden->pcm_handle, hwparams); - if ( status < 0 ) { - return(-1); + if (status < 0) { + return -1; } this->spec.samples = persize; /* This is useful for debugging */ - if ( SDL_getenv("SDL_AUDIO_ALSA_DEBUG") ) { + if (SDL_getenv("SDL_AUDIO_ALSA_DEBUG")) { snd_pcm_uframes_t bufsize; ALSA_snd_pcm_hw_params_get_buffer_size(hwparams, &bufsize); - fprintf(stderr, - "ALSA: period size = %ld, periods = %u, buffer size = %lu\n", - persize, periods, bufsize); + SDL_LogError(SDL_LOG_CATEGORY_AUDIO, + "ALSA: period size = %ld, periods = %u, buffer size = %lu\n", + persize, periods, bufsize); } - return(0); + return 0; } -static int -ALSA_OpenDevice(_THIS, const char *devname) +static int ALSA_OpenDevice(_THIS, const char *devname) { int status = 0; SDL_bool iscapture = this->iscapture; @@ -560,8 +538,7 @@ ALSA_OpenDevice(_THIS, const char *devname) #endif /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -570,13 +547,12 @@ ALSA_OpenDevice(_THIS, const char *devname) /* Open the audio device */ /* Name of device should depend on # channels in spec */ status = ALSA_snd_pcm_open(&pcm_handle, - get_audio_device(this->handle, this->spec.channels), - iscapture ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK, - SND_PCM_NONBLOCK); + get_audio_device(this->handle, this->spec.channels), + iscapture ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK, + SND_PCM_NONBLOCK); if (status < 0) { - return SDL_SetError("ALSA: Couldn't open audio device: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't open audio device: %s", ALSA_snd_strerror(status)); } this->hidden->pcm_handle = pcm_handle; @@ -585,16 +561,14 @@ ALSA_OpenDevice(_THIS, const char *devname) snd_pcm_hw_params_alloca(&hwparams); status = ALSA_snd_pcm_hw_params_any(pcm_handle, hwparams); if (status < 0) { - return SDL_SetError("ALSA: Couldn't get hardware config: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't get hardware config: %s", ALSA_snd_strerror(status)); } /* SDL only uses interleaved sample output */ status = ALSA_snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); if (status < 0) { - return SDL_SetError("ALSA: Couldn't set interleaved access: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't set interleaved access: %s", ALSA_snd_strerror(status)); } /* Try for a closest match on audio format */ @@ -676,8 +650,7 @@ ALSA_OpenDevice(_THIS, const char *devname) status = ALSA_snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &rate, NULL); if (status < 0) { - return SDL_SetError("ALSA: Couldn't set audio frequency: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't set audio frequency: %s", ALSA_snd_strerror(status)); } this->spec.freq = rate; @@ -691,24 +664,20 @@ ALSA_OpenDevice(_THIS, const char *devname) snd_pcm_sw_params_alloca(&swparams); status = ALSA_snd_pcm_sw_params_current(pcm_handle, swparams); if (status < 0) { - return SDL_SetError("ALSA: Couldn't get software config: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't get software config: %s", ALSA_snd_strerror(status)); } status = ALSA_snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, this->spec.samples); if (status < 0) { - return SDL_SetError("Couldn't set minimum available samples: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("Couldn't set minimum available samples: %s", ALSA_snd_strerror(status)); } status = ALSA_snd_pcm_sw_params_set_start_threshold(pcm_handle, swparams, 1); if (status < 0) { - return SDL_SetError("ALSA: Couldn't set start threshold: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("ALSA: Couldn't set start threshold: %s", ALSA_snd_strerror(status)); } status = ALSA_snd_pcm_sw_params(pcm_handle, swparams); if (status < 0) { - return SDL_SetError("Couldn't set software audio parameters: %s", - ALSA_snd_strerror(status)); + return SDL_SetError("Couldn't set software audio parameters: %s", ALSA_snd_strerror(status)); } /* Calculate the final parameters for this audio specification */ @@ -717,18 +686,18 @@ ALSA_OpenDevice(_THIS, const char *devname) /* Allocate mixing buffer */ if (!iscapture) { this->hidden->mixlen = this->spec.size; - this->hidden->mixbuf = (Uint8 *) SDL_malloc(this->hidden->mixlen); + this->hidden->mixbuf = (Uint8 *)SDL_malloc(this->hidden->mixlen); if (this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen); } - #if !SDL_ALSA_NON_BLOCKING +#if !SDL_ALSA_NON_BLOCKING if (!iscapture) { ALSA_snd_pcm_nonblock(pcm_handle, 0); } - #endif +#endif /* We're ready to rock and roll. :-) */ return 0; @@ -741,15 +710,14 @@ typedef struct ALSA_Device struct ALSA_Device *next; } ALSA_Device; -static void -add_device(const int iscapture, const char *name, void *hint, ALSA_Device **pSeen) +static void add_device(const int iscapture, const char *name, void *hint, ALSA_Device **pSeen) { - ALSA_Device *dev = SDL_malloc(sizeof (ALSA_Device)); + ALSA_Device *dev = SDL_malloc(sizeof(ALSA_Device)); char *desc; char *handle = NULL; char *ptr; - if (!dev) { + if (dev == NULL) { return; } @@ -759,12 +727,12 @@ add_device(const int iscapture, const char *name, void *hint, ALSA_Device **pSee Make sure not to free the storage associated with desc in this case */ if (hint) { desc = ALSA_snd_device_name_get_hint(hint, "DESC"); - if (!desc) { + if (desc == NULL) { SDL_free(dev); return; } } else { - desc = (char *) name; + desc = (char *)name; } SDL_assert(name != NULL); @@ -772,14 +740,15 @@ add_device(const int iscapture, const char *name, void *hint, ALSA_Device **pSee /* some strings have newlines, like "HDA NVidia, HDMI 0\nHDMI Audio Output". just chop the extra lines off, this seems to get a reasonable device name without extra details. */ - if ((ptr = SDL_strchr(desc, '\n')) != NULL) { + ptr = SDL_strchr(desc, '\n'); + if (ptr != NULL) { *ptr = '\0'; } /*printf("ALSA: adding %s device '%s' (%s)\n", iscapture ? "capture" : "output", name, desc);*/ handle = SDL_strdup(name); - if (!handle) { + if (handle == NULL) { if (hint) { free(desc); } @@ -792,19 +761,18 @@ add_device(const int iscapture, const char *name, void *hint, ALSA_Device **pSee * enumeration time */ SDL_AddAudioDevice(iscapture, desc, NULL, handle); - if (hint) + if (hint) { free(desc); + } dev->name = handle; dev->iscapture = iscapture; dev->next = *pSeen; *pSeen = dev; } - static ALSA_Device *hotplug_devices = NULL; -static void -ALSA_HotplugIteration(void) +static void ALSA_HotplugIteration(void) { void **hints = NULL; ALSA_Device *dev; @@ -819,7 +787,7 @@ ALSA_HotplugIteration(void) int bestmatch = 0xFFFF; size_t match_len = 0; int defaultdev = -1; - static const char * const prefixes[] = { + static const char *const prefixes[] = { "hw:", "sysdefault:", "default:", NULL }; @@ -832,7 +800,7 @@ ALSA_HotplugIteration(void) if we can find a preferred prefix for the system. */ for (i = 0; hints[i]; i++) { char *name = ALSA_snd_device_name_get_hint(hints[i], "NAME"); - if (!name) { + if (name == NULL) { continue; } @@ -861,17 +829,17 @@ ALSA_HotplugIteration(void) char *name; /* if we didn't find a device name prefix we like at all... */ - if ((!match) && (defaultdev != i)) { - continue; /* ...skip anything that isn't the default device. */ + if ((match == NULL) && (defaultdev != i)) { + continue; /* ...skip anything that isn't the default device. */ } name = ALSA_snd_device_name_get_hint(hints[i], "NAME"); - if (!name) { + if (name == NULL) { continue; } /* only want physical hardware interfaces */ - if (!match || (SDL_strncmp(name, match, match_len) == 0)) { + if (match == NULL || (SDL_strncmp(name, match, match_len) == 0)) { char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID"); const SDL_bool isoutput = (ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0); const SDL_bool isinput = (ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0); @@ -888,7 +856,7 @@ ALSA_HotplugIteration(void) prev = NULL; for (dev = unseen; dev; dev = next) { next = dev->next; - if ( (SDL_strcmp(dev->name, name) == 0) && (((isinput) && dev->iscapture) || ((isoutput) && !dev->iscapture)) ) { + if ((SDL_strcmp(dev->name, name) == 0) && (((isinput) && dev->iscapture) || ((isoutput) && !dev->iscapture))) { if (prev) { prev->next = next; } else { @@ -896,8 +864,12 @@ ALSA_HotplugIteration(void) } dev->next = seen; seen = dev; - if (isinput) have_input = SDL_TRUE; - if (isoutput) have_output = SDL_TRUE; + if (isinput) { + have_input = SDL_TRUE; + } + if (isoutput) { + have_output = SDL_TRUE; + } } else { prev = dev; } @@ -916,7 +888,7 @@ ALSA_HotplugIteration(void) ALSA_snd_device_name_free_hint(hints); - hotplug_devices = seen; /* now we have a known-good list of attached devices. */ + hotplug_devices = seen; /* now we have a known-good list of attached devices. */ /* report anything still in unseen as removed. */ for (dev = unseen; dev; dev = next) { @@ -933,8 +905,7 @@ ALSA_HotplugIteration(void) static SDL_atomic_t ALSA_hotplug_shutdown; static SDL_Thread *ALSA_hotplug_thread; -static int SDLCALL -ALSA_HotplugThread(void *arg) +static int SDLCALL ALSA_HotplugThread(void *arg) { SDL_SetThreadPriority(SDL_THREAD_PRIORITY_LOW); @@ -945,17 +916,16 @@ ALSA_HotplugThread(void *arg) SDL_Delay(100); } - ALSA_HotplugIteration(); /* run the check. */ + ALSA_HotplugIteration(); /* run the check. */ } return 0; } #endif -static void -ALSA_DetectDevices(void) +static void ALSA_DetectDevices(void) { - ALSA_HotplugIteration(); /* run once now before a thread continues to check. */ + ALSA_HotplugIteration(); /* run once now before a thread continues to check. */ #if SDL_ALSA_HOTPLUG_THREAD SDL_AtomicSet(&ALSA_hotplug_shutdown, 0); @@ -964,8 +934,7 @@ ALSA_DetectDevices(void) #endif } -static void -ALSA_Deinitialize(void) +static void ALSA_Deinitialize(void) { ALSA_Device *dev; ALSA_Device *next; @@ -990,8 +959,7 @@ ALSA_Deinitialize(void) UnloadALSALibrary(); } -static SDL_bool -ALSA_Init(SDL_AudioDriverImpl * impl) +static SDL_bool ALSA_Init(SDL_AudioDriverImpl *impl) { if (LoadALSALibrary() < 0) { return SDL_FALSE; @@ -1011,10 +979,9 @@ ALSA_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } - AudioBootStrap ALSA_bootstrap = { "alsa", "ALSA PCM audio", ALSA_Init, SDL_FALSE }; diff --git a/modules/SDL2/src/audio/alsa/SDL_alsa_audio.h b/modules/SDL2/src/audio/alsa/SDL_alsa_audio.h index c2f14b6..1ce2e58 100644 --- a/modules/SDL2/src/audio/alsa/SDL_alsa_audio.h +++ b/modules/SDL2/src/audio/alsa/SDL_alsa_audio.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/android/SDL_androidaudio.c b/modules/SDL2/src/audio/android/SDL_androidaudio.c index ee9421b..b46fdda 100644 --- a/modules/SDL2/src/audio/android/SDL_androidaudio.c +++ b/modules/SDL2/src/audio/android/SDL_androidaudio.c @@ -32,11 +32,11 @@ #include -static SDL_AudioDevice* audioDevice = NULL; -static SDL_AudioDevice* captureDevice = NULL; +static SDL_AudioDevice *audioDevice = NULL; +static SDL_AudioDevice *captureDevice = NULL; -static int -ANDROIDAUDIO_OpenDevice(_THIS, const char *devname) + +static int ANDROIDAUDIO_OpenDevice(_THIS, const char *devname) { SDL_AudioFormat test_format; SDL_bool iscapture = this->iscapture; @@ -50,7 +50,7 @@ ANDROIDAUDIO_OpenDevice(_THIS, const char *devname) audioDevice = this; } - this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, (sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -69,8 +69,14 @@ ANDROIDAUDIO_OpenDevice(_THIS, const char *devname) return SDL_SetError("%s: Unsupported audio format", "android"); } - if (Android_JNI_OpenAudioDevice(iscapture, &this->spec) < 0) { - return -1; + { + int audio_device_id = 0; + if (devname != NULL) { + audio_device_id = SDL_atoi(devname); + } + if (Android_JNI_OpenAudioDevice(iscapture, audio_device_id, &this->spec) < 0) { + return -1; + } } SDL_CalculateAudioSpec(&this->spec); @@ -78,32 +84,27 @@ ANDROIDAUDIO_OpenDevice(_THIS, const char *devname) return 0; } -static void -ANDROIDAUDIO_PlayDevice(_THIS) +static void ANDROIDAUDIO_PlayDevice(_THIS) { Android_JNI_WriteAudioBuffer(); } -static Uint8 * -ANDROIDAUDIO_GetDeviceBuf(_THIS) +static Uint8 *ANDROIDAUDIO_GetDeviceBuf(_THIS) { return Android_JNI_GetAudioBuffer(); } -static int -ANDROIDAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int ANDROIDAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { return Android_JNI_CaptureAudioBuffer(buffer, buflen); } -static void -ANDROIDAUDIO_FlushCapture(_THIS) +static void ANDROIDAUDIO_FlushCapture(_THIS) { Android_JNI_FlushCapturedAudio(); } -static void -ANDROIDAUDIO_CloseDevice(_THIS) +static void ANDROIDAUDIO_CloseDevice(_THIS) { /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread so it's safe to terminate the Java side buffer and AudioTrack @@ -119,23 +120,24 @@ ANDROIDAUDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static SDL_bool -ANDROIDAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool ANDROIDAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ + impl->DetectDevices = Android_DetectDevices; impl->OpenDevice = ANDROIDAUDIO_OpenDevice; impl->PlayDevice = ANDROIDAUDIO_PlayDevice; impl->GetDeviceBuf = ANDROIDAUDIO_GetDeviceBuf; impl->CloseDevice = ANDROIDAUDIO_CloseDevice; impl->CaptureFromDevice = ANDROIDAUDIO_CaptureFromDevice; impl->FlushCapture = ANDROIDAUDIO_FlushCapture; + impl->AllowsArbitraryDeviceNames = SDL_TRUE; /* and the capabilities */ impl->HasCaptureSupport = SDL_TRUE; - impl->OnlyHasDefaultOutputDevice = SDL_TRUE; - impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; + impl->OnlyHasDefaultOutputDevice = SDL_FALSE; + impl->OnlyHasDefaultCaptureDevice = SDL_FALSE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap ANDROIDAUDIO_bootstrap = { @@ -147,26 +149,24 @@ void ANDROIDAUDIO_PauseDevices(void) { /* TODO: Handle multiple devices? */ struct SDL_PrivateAudioData *private; - if(audioDevice != NULL && audioDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) audioDevice->hidden; + if (audioDevice != NULL && audioDevice->hidden != NULL) { + private = (struct SDL_PrivateAudioData *)audioDevice->hidden; if (SDL_AtomicGet(&audioDevice->paused)) { /* The device is already paused, leave it alone */ private->resume = SDL_FALSE; - } - else { + } else { SDL_LockMutex(audioDevice->mixer_lock); SDL_AtomicSet(&audioDevice->paused, 1); private->resume = SDL_TRUE; } } - if(captureDevice != NULL && captureDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) captureDevice->hidden; + if (captureDevice != NULL && captureDevice->hidden != NULL) { + private = (struct SDL_PrivateAudioData *)captureDevice->hidden; if (SDL_AtomicGet(&captureDevice->paused)) { /* The device is already paused, leave it alone */ private->resume = SDL_FALSE; - } - else { + } else { SDL_LockMutex(captureDevice->mixer_lock); SDL_AtomicSet(&captureDevice->paused, 1); private->resume = SDL_TRUE; @@ -179,8 +179,8 @@ void ANDROIDAUDIO_ResumeDevices(void) { /* TODO: Handle multiple devices? */ struct SDL_PrivateAudioData *private; - if(audioDevice != NULL && audioDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) audioDevice->hidden; + if (audioDevice != NULL && audioDevice->hidden != NULL) { + private = (struct SDL_PrivateAudioData *)audioDevice->hidden; if (private->resume) { SDL_AtomicSet(&audioDevice->paused, 0); private->resume = SDL_FALSE; @@ -188,8 +188,8 @@ void ANDROIDAUDIO_ResumeDevices(void) } } - if(captureDevice != NULL && captureDevice->hidden != NULL) { - private = (struct SDL_PrivateAudioData *) captureDevice->hidden; + if (captureDevice != NULL && captureDevice->hidden != NULL) { + private = (struct SDL_PrivateAudioData *)captureDevice->hidden; if (private->resume) { SDL_AtomicSet(&captureDevice->paused, 0); private->resume = SDL_FALSE; @@ -198,7 +198,7 @@ void ANDROIDAUDIO_ResumeDevices(void) } } -#else +#else void ANDROIDAUDIO_ResumeDevices(void) {} void ANDROIDAUDIO_PauseDevices(void) {} @@ -206,4 +206,3 @@ void ANDROIDAUDIO_PauseDevices(void) {} #endif /* SDL_AUDIO_DRIVER_ANDROID */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/audio/android/SDL_androidaudio.h b/modules/SDL2/src/audio/android/SDL_androidaudio.h index 0f5eb2d..4e10379 100644 --- a/modules/SDL2/src/audio/android/SDL_androidaudio.h +++ b/modules/SDL2/src/audio/android/SDL_androidaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/arts/SDL_artsaudio.c b/modules/SDL2/src/audio/arts/SDL_artsaudio.c index 7c37608..ea4f311 100644 --- a/modules/SDL2/src/audio/arts/SDL_artsaudio.c +++ b/modules/SDL2/src/audio/arts/SDL_artsaudio.c @@ -86,8 +86,7 @@ static struct #undef SDL_ARTS_SYM -static void -UnloadARTSLibrary() +static void UnloadARTSLibrary() { if (arts_handle != NULL) { SDL_UnloadObject(arts_handle); @@ -95,8 +94,7 @@ UnloadARTSLibrary() } } -static int -LoadARTSLibrary(void) +static int LoadARTSLibrary(void) { int i, retval = -1; @@ -121,14 +119,12 @@ LoadARTSLibrary(void) #else -static void -UnloadARTSLibrary() +static void UnloadARTSLibrary() { return; } -static int -LoadARTSLibrary(void) +static int LoadARTSLibrary(void) { return 0; } @@ -136,8 +132,7 @@ LoadARTSLibrary(void) #endif /* SDL_AUDIO_DRIVER_ARTS_DYNAMIC */ /* This function waits until it is possible to write a full sound buffer */ -static void -ARTS_WaitDevice(_THIS) +static void ARTS_WaitDevice(_THIS) { Sint32 ticks; @@ -163,8 +158,7 @@ ARTS_WaitDevice(_THIS) } } -static void -ARTS_PlayDevice(_THIS) +static void ARTS_PlayDevice(_THIS) { /* Write the audio data */ int written = SDL_NAME(arts_write) (this->hidden->stream, @@ -185,15 +179,13 @@ ARTS_PlayDevice(_THIS) #endif } -static Uint8 * -ARTS_GetDeviceBuf(_THIS) +static Uint8 *ARTS_GetDeviceBuf(_THIS) { return (this->hidden->mixbuf); } -static void -ARTS_CloseDevice(_THIS) +static void ARTS_CloseDevice(_THIS) { if (this->hidden->stream) { SDL_NAME(arts_close_stream) (this->hidden->stream); @@ -203,8 +195,7 @@ ARTS_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -ARTS_Suspend(void) +static int ARTS_Suspend(void) { const Uint32 abortms = SDL_GetTicks() + 3000; /* give up after 3 secs */ while ( (!SDL_NAME(arts_suspended)()) && !SDL_TICKS_PASSED(SDL_GetTicks(), abortms) ) { @@ -215,16 +206,14 @@ ARTS_Suspend(void) return SDL_NAME(arts_suspended)(); } -static int -ARTS_OpenDevice(_THIS, const char *devname) +static int ARTS_OpenDevice(_THIS, const char *devname) { int rc = 0; int bits, frag_spec = 0; SDL_AudioFormat test_format = 0; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -305,15 +294,13 @@ ARTS_OpenDevice(_THIS, const char *devname) } -static void -ARTS_Deinitialize(void) +static void ARTS_Deinitialize(void) { UnloadARTSLibrary(); } -static SDL_bool -ARTS_Init(SDL_AudioDriverImpl * impl) +static SDL_bool ARTS_Init(SDL_AudioDriverImpl * impl) { if (LoadARTSLibrary() < 0) { return SDL_FALSE; diff --git a/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.h b/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.h index be29e01..08b8cfb 100644 --- a/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.h +++ b/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.h @@ -48,7 +48,7 @@ #endif /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.m b/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.m index 0790114..974fe86 100644 --- a/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.m +++ b/modules/SDL2/src/audio/coreaudio/SDL_coreaudio.m @@ -34,21 +34,20 @@ #define DEBUG_COREAUDIO 0 #if DEBUG_COREAUDIO - #define CHECK_RESULT(msg) \ - if (result != noErr) { \ - printf("COREAUDIO: Got error %d from '%s'!\n", (int) result, msg); \ - SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \ - return 0; \ - } +#define CHECK_RESULT(msg) \ + if (result != noErr) { \ + printf("COREAUDIO: Got error %d from '%s'!\n", (int)result, msg); \ + SDL_SetError("CoreAudio error (%s): %d", msg, (int)result); \ + return 0; \ + } #else - #define CHECK_RESULT(msg) \ - if (result != noErr) { \ - SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \ - return 0; \ - } +#define CHECK_RESULT(msg) \ + if (result != noErr) { \ + SDL_SetError("CoreAudio error (%s): %d", msg, (int)result); \ + return 0; \ + } #endif - #if MACOSX_COREAUDIO static const AudioObjectPropertyAddress devlist_address = { kAudioHardwarePropertyDevices, @@ -68,10 +67,9 @@ typedef struct AudioDeviceList static AudioDeviceList *output_devs = NULL; static AudioDeviceList *capture_devs = NULL; -static SDL_bool -add_to_internal_dev_list(const int iscapture, AudioDeviceID devId) +static SDL_bool add_to_internal_dev_list(const int iscapture, AudioDeviceID devId) { - AudioDeviceList *item = (AudioDeviceList *) SDL_malloc(sizeof (AudioDeviceList)); + AudioDeviceList *item = (AudioDeviceList *)SDL_malloc(sizeof(AudioDeviceList)); if (item == NULL) { return SDL_FALSE; } @@ -87,16 +85,14 @@ add_to_internal_dev_list(const int iscapture, AudioDeviceID devId) return SDL_TRUE; } -static void -addToDevList(const char *name, SDL_AudioSpec *spec, const int iscapture, AudioDeviceID devId, void *data) +static void addToDevList(const char *name, SDL_AudioSpec *spec, const int iscapture, AudioDeviceID devId, void *data) { if (add_to_internal_dev_list(iscapture, devId)) { - SDL_AddAudioDevice(iscapture, name, spec, (void *) ((size_t) devId)); + SDL_AddAudioDevice(iscapture, name, spec, (void *)((size_t)devId)); } } -static void -build_device_list(int iscapture, addDevFn addfn, void *addfndata) +static void build_device_list(int iscapture, addDevFn addfn, void *addfndata) { OSStatus result = noErr; UInt32 size = 0; @@ -106,19 +102,22 @@ build_device_list(int iscapture, addDevFn addfn, void *addfndata) result = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &devlist_address, 0, NULL, &size); - if (result != kAudioHardwareNoError) + if (result != kAudioHardwareNoError) { return; + } - devs = (AudioDeviceID *) alloca(size); - if (devs == NULL) + devs = (AudioDeviceID *)alloca(size); + if (devs == NULL) { return; + } result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &devlist_address, 0, NULL, &size, devs); - if (result != kAudioHardwareNoError) + if (result != kAudioHardwareNoError) { return; + } - max = size / sizeof (AudioDeviceID); + max = size / sizeof(AudioDeviceID); for (i = 0; i < max; i++) { CFStringRef cfstr = NULL; char *ptr = NULL; @@ -145,12 +144,14 @@ build_device_list(int iscapture, addDevFn addfn, void *addfndata) }; result = AudioObjectGetPropertyDataSize(dev, &addr, 0, NULL, &size); - if (result != noErr) + if (result != noErr) { continue; + } - buflist = (AudioBufferList *) SDL_malloc(size); - if (buflist == NULL) + buflist = (AudioBufferList *)SDL_malloc(size); + if (buflist == NULL) { continue; + } result = AudioObjectGetPropertyData(dev, &addr, 0, NULL, &size, buflist); @@ -165,27 +166,28 @@ build_device_list(int iscapture, addDevFn addfn, void *addfndata) SDL_free(buflist); - if (spec.channels == 0) + if (spec.channels == 0) { continue; + } - size = sizeof (sampleRate); + size = sizeof(sampleRate); result = AudioObjectGetPropertyData(dev, &freqaddr, 0, NULL, &size, &sampleRate); if (result == noErr) { - spec.freq = (int) sampleRate; + spec.freq = (int)sampleRate; } - size = sizeof (CFStringRef); + size = sizeof(CFStringRef); result = AudioObjectGetPropertyData(dev, &nameaddr, 0, NULL, &size, &cfstr); - if (result != kAudioHardwareNoError) + if (result != kAudioHardwareNoError) { continue; + } len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8); - ptr = (char *) SDL_malloc(len + 1); + ptr = (char *)SDL_malloc(len + 1); usable = ((ptr != NULL) && - (CFStringGetCString - (cfstr, ptr, len + 1, kCFStringEncodingUTF8))); + (CFStringGetCString(cfstr, ptr, len + 1, kCFStringEncodingUTF8))); CFRelease(cfstr); @@ -204,16 +206,15 @@ build_device_list(int iscapture, addDevFn addfn, void *addfndata) #if DEBUG_COREAUDIO printf("COREAUDIO: Found %s device #%d: '%s' (devid %d)\n", ((iscapture) ? "capture" : "output"), - (int) i, ptr, (int) dev); + (int)i, ptr, (int)dev); #endif addfn(ptr, &spec, iscapture, dev, addfndata); } - SDL_free(ptr); /* addfn() would have copied the string. */ + SDL_free(ptr); /* addfn() would have copied the string. */ } } -static void -free_audio_device_list(AudioDeviceList **list) +static void free_audio_device_list(AudioDeviceList **list) { AudioDeviceList *item = *list; while (item) { @@ -224,17 +225,15 @@ free_audio_device_list(AudioDeviceList **list) *list = NULL; } -static void -COREAUDIO_DetectDevices(void) +static void COREAUDIO_DetectDevices(void) { build_device_list(SDL_TRUE, addToDevList, NULL); build_device_list(SDL_FALSE, addToDevList, NULL); } -static void -build_device_change_list(const char *name, SDL_AudioSpec *spec, const int iscapture, AudioDeviceID devId, void *data) +static void build_device_change_list(const char *name, SDL_AudioSpec *spec, const int iscapture, AudioDeviceID devId, void *data) { - AudioDeviceList **list = (AudioDeviceList **) data; + AudioDeviceList **list = (AudioDeviceList **)data; AudioDeviceList *item; for (item = *list; item != NULL; item = item->next) { if (item->devid == devId) { @@ -243,12 +242,11 @@ build_device_change_list(const char *name, SDL_AudioSpec *spec, const int iscapt } } - add_to_internal_dev_list(iscapture, devId); /* new device, add it. */ - SDL_AddAudioDevice(iscapture, name, spec, (void *) ((size_t) devId)); + add_to_internal_dev_list(iscapture, devId); /* new device, add it. */ + SDL_AddAudioDevice(iscapture, name, spec, (void *)((size_t)devId)); } -static void -reprocess_device_list(const int iscapture, AudioDeviceList **list) +static void reprocess_device_list(const int iscapture, AudioDeviceList **list) { AudioDeviceList *item; AudioDeviceList *prev = NULL; @@ -265,7 +263,7 @@ reprocess_device_list(const int iscapture, AudioDeviceList **list) if (item->alive) { prev = item; } else { - SDL_RemoveAudioDevice(iscapture, (void *) ((size_t) item->devid)); + SDL_RemoveAudioDevice(iscapture, (void *)((size_t)item->devid)); if (prev) { prev->next = item->next; } else { @@ -278,8 +276,7 @@ reprocess_device_list(const int iscapture, AudioDeviceList **list) } /* this is called when the system's list of available audio devices changes. */ -static OSStatus -device_list_changed(AudioObjectID systemObj, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data) +static OSStatus device_list_changed(AudioObjectID systemObj, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data) { reprocess_device_list(SDL_TRUE, &capture_devs); reprocess_device_list(SDL_FALSE, &output_devs); @@ -287,7 +284,6 @@ device_list_changed(AudioObjectID systemObj, UInt32 num_addr, const AudioObjectP } #endif - static int open_playback_devices; static int open_capture_devices; static int num_open_devices; @@ -339,16 +335,14 @@ static void interruption_begin(_THIS) static void interruption_end(_THIS) { - if (this != NULL && this->hidden != NULL && this->hidden->audioQueue != NULL - && this->hidden->interrupted - && AudioQueueStart(this->hidden->audioQueue, NULL) == AVAudioSessionErrorCodeNone) { + if (this != NULL && this->hidden != NULL && this->hidden->audioQueue != NULL && this->hidden->interrupted && AudioQueueStart(this->hidden->audioQueue, NULL) == AVAudioSessionErrorCodeNone) { this->hidden->interrupted = SDL_FALSE; } } @interface SDLInterruptionListener : NSObject -@property (nonatomic, assign) SDL_AudioDevice *device; +@property(nonatomic, assign) SDL_AudioDevice *device; @end @@ -356,7 +350,7 @@ static void interruption_end(_THIS) - (void)audioSessionInterruption:(NSNotification *)note { - @synchronized (self) { + @synchronized(self) { NSNumber *type = note.userInfo[AVAudioSessionInterruptionTypeKey]; if (type.unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) { interruption_begin(self.device); @@ -368,7 +362,7 @@ static void interruption_end(_THIS) - (void)applicationBecameActive:(NSNotification *)note { - @synchronized (self) { + @synchronized(self) { interruption_end(self.device); } } @@ -504,9 +498,9 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec this->hidden->interruption_listener = CFBridgingRetain(listener); } else { SDLInterruptionListener *listener = nil; - listener = (SDLInterruptionListener *) CFBridgingRelease(this->hidden->interruption_listener); + listener = (SDLInterruptionListener *)CFBridgingRelease(this->hidden->interruption_listener); [center removeObserver:listener]; - @synchronized (listener) { + @synchronized(listener) { listener.device = NULL; } } @@ -516,25 +510,23 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec } #endif - /* The AudioQueue callback */ -static void -outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) +static void outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) { - SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData; + SDL_AudioDevice *this = (SDL_AudioDevice *)inUserData; /* This flag is set before this->mixer_lock is destroyed during shutdown, so check it before grabbing the mutex, and then check it again _after_ in case we blocked waiting on the lock. */ if (SDL_AtomicGet(&this->shutdown)) { - return; /* don't do anything, since we don't even want to enqueue this buffer again. */ + return; /* don't do anything, since we don't even want to enqueue this buffer again. */ } SDL_LockMutex(this->mixer_lock); if (SDL_AtomicGet(&this->shutdown)) { SDL_UnlockMutex(this->mixer_lock); - return; /* don't do anything, since we don't even want to enqueue this buffer again. */ + return; /* don't do anything, since we don't even want to enqueue this buffer again. */ } if (!SDL_AtomicGet(&this->enabled) || SDL_AtomicGet(&this->paused)) { @@ -542,7 +534,7 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe SDL_memset(inBuffer->mAudioData, this->spec.silence, inBuffer->mAudioDataBytesCapacity); } else if (this->stream) { UInt32 remaining = inBuffer->mAudioDataBytesCapacity; - Uint8 *ptr = (Uint8 *) inBuffer->mAudioData; + Uint8 *ptr = (Uint8 *)inBuffer->mAudioData; while (remaining > 0) { if (SDL_AudioStreamAvailable(this->stream) == 0) { @@ -555,8 +547,9 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe if (SDL_AudioStreamAvailable(this->stream) > 0) { int got; UInt32 len = SDL_AudioStreamAvailable(this->stream); - if (len > remaining) + if (len > remaining) { len = remaining; + } got = SDL_AudioStreamGet(this->stream, ptr, len); SDL_assert((got < 0) || (got == len)); if (got != len) { @@ -568,14 +561,14 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe } } else { UInt32 remaining = inBuffer->mAudioDataBytesCapacity; - Uint8 *ptr = (Uint8 *) inBuffer->mAudioData; + Uint8 *ptr = (Uint8 *)inBuffer->mAudioData; while (remaining > 0) { UInt32 len; if (this->hidden->bufferOffset >= this->hidden->bufferSize) { /* Generate the data */ (*this->callbackspec.callback)(this->callbackspec.userdata, - this->hidden->buffer, this->hidden->bufferSize); + this->hidden->buffer, this->hidden->bufferSize); this->hidden->bufferOffset = 0; } @@ -583,8 +576,7 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe if (len > remaining) { len = remaining; } - SDL_memcpy(ptr, (char *)this->hidden->buffer + - this->hidden->bufferOffset, len); + SDL_memcpy(ptr, (char *)this->hidden->buffer + this->hidden->bufferOffset, len); ptr = ptr + len; remaining -= len; this->hidden->bufferOffset += len; @@ -598,20 +590,19 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe SDL_UnlockMutex(this->mixer_lock); } -static void -inputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, - const AudioTimeStamp *inStartTime, UInt32 inNumberPacketDescriptions, - const AudioStreamPacketDescription *inPacketDescs) +static void inputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, + const AudioTimeStamp *inStartTime, UInt32 inNumberPacketDescriptions, + const AudioStreamPacketDescription *inPacketDescs) { - SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData; + SDL_AudioDevice *this = (SDL_AudioDevice *)inUserData; if (SDL_AtomicGet(&this->shutdown)) { - return; /* don't do anything. */ + return; /* don't do anything. */ } /* ignore unless we're active. */ if (!SDL_AtomicGet(&this->paused) && SDL_AtomicGet(&this->enabled)) { - const Uint8 *ptr = (const Uint8 *) inBuffer->mAudioData; + const Uint8 *ptr = (const Uint8 *)inBuffer->mAudioData; UInt32 remaining = inBuffer->mAudioDataByteSize; while (remaining > 0) { UInt32 len = this->hidden->bufferSize - this->hidden->bufferOffset; @@ -636,35 +627,32 @@ inputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL); } - #if MACOSX_COREAUDIO -static const AudioObjectPropertyAddress alive_address = -{ +static const AudioObjectPropertyAddress alive_address = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain }; -static OSStatus -device_unplugged(AudioObjectID devid, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data) +static OSStatus device_unplugged(AudioObjectID devid, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data) { - SDL_AudioDevice *this = (SDL_AudioDevice *) data; + SDL_AudioDevice *this = (SDL_AudioDevice *)data; SDL_bool dead = SDL_FALSE; UInt32 isAlive = 1; - UInt32 size = sizeof (isAlive); + UInt32 size = sizeof(isAlive); OSStatus error; if (!SDL_AtomicGet(&this->enabled)) { - return 0; /* already known to be dead. */ + return 0; /* already known to be dead. */ } error = AudioObjectGetPropertyData(this->hidden->deviceID, &alive_address, 0, NULL, &size, &isAlive); if (error == kAudioHardwareBadDeviceError) { - dead = SDL_TRUE; /* device was unplugged. */ + dead = SDL_TRUE; /* device was unplugged. */ } else if ((error == kAudioHardwareNoError) && (!isAlive)) { - dead = SDL_TRUE; /* device died in some other way. */ + dead = SDL_TRUE; /* device died in some other way. */ } if (dead) { @@ -675,20 +663,18 @@ device_unplugged(AudioObjectID devid, UInt32 num_addr, const AudioObjectProperty } /* macOS calls this when the default device changed (if we have a default device open). */ -static OSStatus -default_device_changed(AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *inUserData) +static OSStatus default_device_changed(AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *inUserData) { - SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData; - #if DEBUG_COREAUDIO + SDL_AudioDevice *this = (SDL_AudioDevice *)inUserData; +#if DEBUG_COREAUDIO printf("COREAUDIO: default device changed for SDL audio device %p!\n", this); - #endif - SDL_AtomicSet(&this->hidden->device_change_flag, 1); /* let the audioqueue thread pick up on this when safe to do so. */ +#endif + SDL_AtomicSet(&this->hidden->device_change_flag, 1); /* let the audioqueue thread pick up on this when safe to do so. */ return noErr; } #endif -static void -COREAUDIO_CloseDevice(_THIS) +static void COREAUDIO_CloseDevice(_THIS) { const SDL_bool iscapture = this->iscapture; int i; @@ -696,7 +682,7 @@ COREAUDIO_CloseDevice(_THIS) /* !!! FIXME: what does iOS do when a bluetooth audio device vanishes? Headphones unplugged? */ /* !!! FIXME: (we only do a "default" device on iOS right now...can we do more?) */ #if MACOSX_COREAUDIO - if (this->handle != NULL) { /* we don't register this listener for default devices. */ + if (this->handle != NULL) { /* we don't register this listener for default devices. */ AudioObjectRemovePropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this); } #endif @@ -706,11 +692,13 @@ COREAUDIO_CloseDevice(_THIS) /* dispose of the audio queue before waiting on the thread, or it might stall for a long time! */ if (this->hidden->audioQueue) { + AudioQueueFlush(this->hidden->audioQueue); + AudioQueueStop(this->hidden->audioQueue, 0); AudioQueueDispose(this->hidden->audioQueue, 0); } if (this->hidden->thread) { - SDL_assert(SDL_AtomicGet(&this->shutdown) != 0); /* should have been set by SDL_audio.c */ + SDL_assert(SDL_AtomicGet(&this->shutdown) != 0); /* should have been set by SDL_audio.c */ SDL_WaitThread(this->hidden->thread, NULL); } @@ -728,7 +716,7 @@ COREAUDIO_CloseDevice(_THIS) if (open_devices[i] == this) { --num_open_devices; if (i < num_open_devices) { - SDL_memmove(&open_devices[i], &open_devices[i+1], sizeof(open_devices[i])*(num_open_devices - i)); + SDL_memmove(&open_devices[i], &open_devices[i + 1], sizeof(open_devices[i]) * (num_open_devices - i)); } break; } @@ -750,12 +738,11 @@ COREAUDIO_CloseDevice(_THIS) } #if MACOSX_COREAUDIO -static int -prepare_device(_THIS) +static int prepare_device(_THIS) { void *handle = this->handle; SDL_bool iscapture = this->iscapture; - AudioDeviceID devid = (AudioDeviceID) ((size_t) handle); + AudioDeviceID devid = (AudioDeviceID)((size_t)handle); OSStatus result = noErr; UInt32 size = 0; UInt32 alive = 0; @@ -768,23 +755,20 @@ prepare_device(_THIS) }; if (handle == NULL) { - size = sizeof (AudioDeviceID); + size = sizeof(AudioDeviceID); addr.mSelector = - ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice : - kAudioHardwarePropertyDefaultOutputDevice); + ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice : kAudioHardwarePropertyDefaultOutputDevice); result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr, 0, NULL, &size, &devid); CHECK_RESULT("AudioHardwareGetProperty (default device)"); } addr.mSelector = kAudioDevicePropertyDeviceIsAlive; - addr.mScope = iscapture ? kAudioDevicePropertyScopeInput : - kAudioDevicePropertyScopeOutput; + addr.mScope = iscapture ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput; - size = sizeof (alive); + size = sizeof(alive); result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &alive); - CHECK_RESULT - ("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)"); + CHECK_RESULT("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)"); if (!alive) { SDL_SetError("CoreAudio: requested device exists, but isn't alive."); @@ -792,7 +776,7 @@ prepare_device(_THIS) } addr.mSelector = kAudioDevicePropertyHogMode; - size = sizeof (pid); + size = sizeof(pid); result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &pid); /* some devices don't support this property, so errors are fine here. */ @@ -805,8 +789,7 @@ prepare_device(_THIS) return 1; } -static int -assign_device_to_audioqueue(_THIS) +static int assign_device_to_audioqueue(_THIS) { const AudioObjectPropertyAddress prop = { kAudioDevicePropertyDeviceUID, @@ -816,7 +799,7 @@ assign_device_to_audioqueue(_THIS) OSStatus result; CFStringRef devuid; - UInt32 devuidsize = sizeof (devuid); + UInt32 devuidsize = sizeof(devuid); result = AudioObjectGetPropertyData(this->hidden->deviceID, &prop, 0, NULL, &devuidsize, &devuid); CHECK_RESULT("AudioObjectGetPropertyData (kAudioDevicePropertyDeviceUID)"); result = AudioQueueSetProperty(this->hidden->audioQueue, kAudioQueueProperty_CurrentDevice, &devuid, devuidsize); @@ -826,8 +809,7 @@ assign_device_to_audioqueue(_THIS) } #endif -static int -prepare_audioqueue(_THIS) +static int prepare_audioqueue(_THIS) { const AudioStreamBasicDescription *strdesc = &this->hidden->strdesc; const int iscapture = this->iscapture; @@ -835,7 +817,8 @@ prepare_audioqueue(_THIS) int i, numAudioBuffers = 2; AudioChannelLayout layout; double MINIMUM_AUDIO_BUFFER_TIME_MS; - const double msecs = (this->spec.samples / ((double) this->spec.freq)) * 1000.0;; + const double msecs = (this->spec.samples / ((double)this->spec.freq)) * 1000.0; + ; SDL_assert(CFRunLoopGetCurrent() != NULL); @@ -847,7 +830,7 @@ prepare_audioqueue(_THIS) CHECK_RESULT("AudioQueueNewOutput"); } - #if MACOSX_COREAUDIO +#if MACOSX_COREAUDIO if (!assign_device_to_audioqueue(this)) { return 0; } @@ -861,7 +844,7 @@ prepare_audioqueue(_THIS) /* If this fails, oh well, we won't notice a device had an extraordinary event take place. */ AudioObjectAddPropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this); } - #endif +#endif /* Calculate the final parameters for this audio specification */ SDL_CalculateAudioSpec(&this->spec); @@ -918,12 +901,12 @@ prepare_audioqueue(_THIS) MINIMUM_AUDIO_BUFFER_TIME_MS = 40.0; } #endif - if (msecs < MINIMUM_AUDIO_BUFFER_TIME_MS) { /* use more buffers if we have a VERY small sample set. */ + if (msecs < MINIMUM_AUDIO_BUFFER_TIME_MS) { /* use more buffers if we have a VERY small sample set. */ numAudioBuffers = ((int)SDL_ceil(MINIMUM_AUDIO_BUFFER_TIME_MS / msecs) * 2); } this->hidden->numAudioBuffers = numAudioBuffers; - this->hidden->audioBuffer = SDL_calloc(1, sizeof (AudioQueueBufferRef) * numAudioBuffers); + this->hidden->audioBuffer = SDL_calloc(1, sizeof(AudioQueueBufferRef) * numAudioBuffers); if (this->hidden->audioBuffer == NULL) { SDL_OutOfMemory(); return 0; @@ -950,24 +933,23 @@ prepare_audioqueue(_THIS) return 1; } -static int -audioqueue_thread(void *arg) +static int audioqueue_thread(void *arg) { - SDL_AudioDevice *this = (SDL_AudioDevice *) arg; + SDL_AudioDevice *this = (SDL_AudioDevice *)arg; int rc; - #if MACOSX_COREAUDIO +#if MACOSX_COREAUDIO const AudioObjectPropertyAddress default_device_address = { this->iscapture ? kAudioHardwarePropertyDefaultInputDevice : kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain }; - if (this->handle == NULL) { /* opened the default device? Register to know if the user picks a new default. */ + if (this->handle == NULL) { /* opened the default device? Register to know if the user picks a new default. */ /* we don't care if this fails; we just won't change to new default devices, but we still otherwise function in this case. */ AudioObjectAddPropertyListener(kAudioObjectSystemObject, &default_device_address, default_device_changed, this); } - #endif +#endif rc = prepare_audioqueue(this); if (!rc) { @@ -984,14 +966,14 @@ audioqueue_thread(void *arg) while (!SDL_AtomicGet(&this->shutdown)) { CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1); - #if MACOSX_COREAUDIO +#if MACOSX_COREAUDIO if ((this->handle == NULL) && SDL_AtomicGet(&this->hidden->device_change_flag)) { const AudioDeviceID prev_devid = this->hidden->deviceID; SDL_AtomicSet(&this->hidden->device_change_flag, 0); - #if DEBUG_COREAUDIO +#if DEBUG_COREAUDIO printf("COREAUDIO: audioqueue_thread is trying to switch to new default device!\n"); - #endif +#endif /* if any of this fails, there's not much to do but wait to see if the user gives up and quits (flagging the audioqueue for shutdown), or toggles to some other system @@ -1009,26 +991,25 @@ audioqueue_thread(void *arg) } } } - #endif +#endif } - if (!this->iscapture) { /* Drain off any pending playback. */ - const CFTimeInterval secs = (((this->spec.size / (SDL_AUDIO_BITSIZE(this->spec.format) / 8)) / this->spec.channels) / ((CFTimeInterval) this->spec.freq)) * 2.0; + if (!this->iscapture) { /* Drain off any pending playback. */ + const CFTimeInterval secs = (((this->spec.size / (SDL_AUDIO_BITSIZE(this->spec.format) / 8.0)) / this->spec.channels) / ((CFTimeInterval)this->spec.freq)) * 2.0; CFRunLoopRunInMode(kCFRunLoopDefaultMode, secs, 0); } - #if MACOSX_COREAUDIO +#if MACOSX_COREAUDIO if (this->handle == NULL) { /* we don't care if this fails; we just won't change to new default devices, but we still otherwise function in this case. */ AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &default_device_address, default_device_changed, this); } - #endif +#endif return 0; } -static int -COREAUDIO_OpenDevice(_THIS, const char *devname) +static int COREAUDIO_OpenDevice(_THIS, const char *devname) { AudioStreamBasicDescription *strdesc; SDL_AudioFormat test_format; @@ -1036,8 +1017,7 @@ COREAUDIO_OpenDevice(_THIS, const char *devname) SDL_AudioDevice **new_open_devices; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -1064,7 +1044,7 @@ COREAUDIO_OpenDevice(_THIS, const char *devname) /* Stop CoreAudio from doing expensive audio rate conversion */ @autoreleasepool { - AVAudioSession* session = [AVAudioSession sharedInstance]; + AVAudioSession *session = [AVAudioSession sharedInstance]; [session setPreferredSampleRate:this->spec.freq error:nil]; this->spec.freq = (int)session.sampleRate; #if TARGET_OS_TV @@ -1108,18 +1088,20 @@ COREAUDIO_OpenDevice(_THIS, const char *devname) break; } - if (!test_format) { /* shouldn't happen, but just in case... */ + if (!test_format) { /* shouldn't happen, but just in case... */ return SDL_SetError("%s: Unsupported audio format", "coreaudio"); } this->spec.format = test_format; strdesc->mBitsPerChannel = SDL_AUDIO_BITSIZE(test_format); - if (SDL_AUDIO_ISBIGENDIAN(test_format)) + if (SDL_AUDIO_ISBIGENDIAN(test_format)) { strdesc->mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; + } - if (SDL_AUDIO_ISFLOAT(test_format)) + if (SDL_AUDIO_ISFLOAT(test_format)) { strdesc->mFormatFlags |= kLinearPCMFormatFlagIsFloat; - else if (SDL_AUDIO_ISSIGNED(test_format)) + } else if (SDL_AUDIO_ISSIGNED(test_format)) { strdesc->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; + } strdesc->mBytesPerFrame = strdesc->mChannelsPerFrame * strdesc->mBitsPerChannel / 8; strdesc->mBytesPerPacket = strdesc->mBytesPerFrame * strdesc->mFramesPerPacket; @@ -1133,7 +1115,7 @@ COREAUDIO_OpenDevice(_THIS, const char *devname) /* This has to init in a new thread so it can get its own CFRunLoop. :/ */ this->hidden->ready_semaphore = SDL_CreateSemaphore(0); if (!this->hidden->ready_semaphore) { - return -1; /* oh well. */ + return -1; /* oh well. */ } this->hidden->thread = SDL_CreateThreadInternal(audioqueue_thread, "AudioQueue thread", 512 * 1024, this); @@ -1153,10 +1135,9 @@ COREAUDIO_OpenDevice(_THIS, const char *devname) } #if !MACOSX_COREAUDIO -static int -COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +static int COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { - AVAudioSession* session = [AVAudioSession sharedInstance]; + AVAudioSession *session = [AVAudioSession sharedInstance]; if (name != NULL) { *name = NULL; @@ -1166,9 +1147,8 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) spec->channels = [session outputNumberOfChannels]; return 0; } -#else /* MACOSX_COREAUDIO */ -static int -COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +#else /* MACOSX_COREAUDIO */ +static int COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { AudioDeviceID devid; AudioBufferList *buflist; @@ -1207,7 +1187,7 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) /* Get the Device ID */ cfstr = NULL; - size = sizeof (AudioDeviceID); + size = sizeof(AudioDeviceID); result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr, 0, NULL, &size, &devid); @@ -1217,7 +1197,7 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) if (name != NULL) { /* Use the Device ID to get the name */ - size = sizeof (CFStringRef); + size = sizeof(CFStringRef); result = AudioObjectGetPropertyData(devid, &nameaddr, 0, NULL, &size, &cfstr); if (result != noErr) { @@ -1225,8 +1205,8 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) } len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), - kCFStringEncodingUTF8); - devname = (char *) SDL_malloc(len + 1); + kCFStringEncodingUTF8); + devname = (char *)SDL_malloc(len + 1); usable = ((devname != NULL) && (CFStringGetCString(cfstr, devname, len + 1, kCFStringEncodingUTF8))); CFRelease(cfstr); @@ -1258,15 +1238,17 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) return SDL_SetError("%s: Default Device Sample Rate not found", "coreaudio"); } - spec->freq = (int) sampleRate; + spec->freq = (int)sampleRate; result = AudioObjectGetPropertyDataSize(devid, &bufaddr, 0, NULL, &size); - if (result != noErr) + if (result != noErr) { return SDL_SetError("%s: Default Device Data Size not found", "coreaudio"); + } - buflist = (AudioBufferList *) SDL_malloc(size); - if (buflist == NULL) + buflist = (AudioBufferList *)SDL_malloc(size); + if (buflist == NULL) { return SDL_SetError("%s: Default Device Buffer List not found", "coreaudio"); + } result = AudioObjectGetPropertyData(devid, &bufaddr, 0, NULL, &size, buflist); @@ -1288,8 +1270,7 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) } #endif /* MACOSX_COREAUDIO */ -static void -COREAUDIO_Deinitialize(void) +static void COREAUDIO_Deinitialize(void) { #if MACOSX_COREAUDIO AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &devlist_address, device_list_changed, NULL); @@ -1298,8 +1279,7 @@ COREAUDIO_Deinitialize(void) #endif } -static SDL_bool -COREAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool COREAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = COREAUDIO_OpenDevice; @@ -1319,7 +1299,7 @@ COREAUDIO_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap COREAUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/directsound/SDL_directsound.c b/modules/SDL2/src/audio/directsound/SDL_directsound.c index d3903ee..a61a068 100644 --- a/modules/SDL2/src/audio/directsound/SDL_directsound.c +++ b/modules/SDL2/src/audio/directsound/SDL_directsound.c @@ -44,21 +44,20 @@ static SDL_bool SupportsIMMDevice = SDL_FALSE; #endif /* HAVE_MMDEVICEAPI_H */ /* DirectX function pointers for audio */ -static void* DSoundDLL = NULL; -typedef HRESULT (WINAPI *fnDirectSoundCreate8)(LPGUID,LPDIRECTSOUND*,LPUNKNOWN); -typedef HRESULT (WINAPI *fnDirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID); -typedef HRESULT (WINAPI *fnDirectSoundCaptureCreate8)(LPCGUID,LPDIRECTSOUNDCAPTURE8 *,LPUNKNOWN); -typedef HRESULT (WINAPI *fnDirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW,LPVOID); +static void *DSoundDLL = NULL; +typedef HRESULT(WINAPI *fnDirectSoundCreate8)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN); +typedef HRESULT(WINAPI *fnDirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID); +typedef HRESULT(WINAPI *fnDirectSoundCaptureCreate8)(LPCGUID, LPDIRECTSOUNDCAPTURE8 *, LPUNKNOWN); +typedef HRESULT(WINAPI *fnDirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW, LPVOID); static fnDirectSoundCreate8 pDirectSoundCreate8 = NULL; static fnDirectSoundEnumerateW pDirectSoundEnumerateW = NULL; static fnDirectSoundCaptureCreate8 pDirectSoundCaptureCreate8 = NULL; static fnDirectSoundCaptureEnumerateW pDirectSoundCaptureEnumerateW = NULL; -static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; -static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; +static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; +static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; -static void -DSOUND_Unload(void) +static void DSOUND_Unload(void) { pDirectSoundCreate8 = NULL; pDirectSoundEnumerateW = NULL; @@ -71,9 +70,7 @@ DSOUND_Unload(void) } } - -static int -DSOUND_Load(void) +static int DSOUND_Load(void) { int loaded = 0; @@ -83,17 +80,19 @@ DSOUND_Load(void) if (DSoundDLL == NULL) { SDL_SetError("DirectSound: failed to load DSOUND.DLL"); } else { - /* Now make sure we have DirectX 8 or better... */ - #define DSOUNDLOAD(f) { \ - p##f = (fn##f) SDL_LoadFunction(DSoundDLL, #f); \ - if (!p##f) loaded = 0; \ - } - loaded = 1; /* will reset if necessary. */ +/* Now make sure we have DirectX 8 or better... */ +#define DSOUNDLOAD(f) \ + { \ + p##f = (fn##f)SDL_LoadFunction(DSoundDLL, #f); \ + if (!p##f) \ + loaded = 0; \ + } + loaded = 1; /* will reset if necessary. */ DSOUNDLOAD(DirectSoundCreate8); DSOUNDLOAD(DirectSoundEnumerateW); DSOUNDLOAD(DirectSoundCaptureCreate8); DSOUNDLOAD(DirectSoundCaptureEnumerateW); - #undef DSOUNDLOAD +#undef DSOUNDLOAD if (!loaded) { SDL_SetError("DirectSound: System doesn't appear to have DX8."); @@ -107,8 +106,7 @@ DSOUND_Load(void) return loaded; } -static int -SetDSerror(const char *function, int code) +static int SetDSerror(const char *function, int code) { const char *error; @@ -154,14 +152,12 @@ SetDSerror(const char *function, int code) return SDL_SetError("%s: %s (0x%x)", function, error, code); } -static void -DSOUND_FreeDeviceHandle(void *handle) +static void DSOUND_FreeDeviceHandle(void *handle) { SDL_free(handle); } -static int -DSOUND_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +static int DSOUND_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { #if HAVE_MMDEVICEAPI_H if (SupportsIMMDevice) { @@ -171,29 +167,27 @@ DSOUND_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) return SDL_Unsupported(); } -static BOOL CALLBACK -FindAllDevs(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID data) +static BOOL CALLBACK FindAllDevs(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID data) { - const int iscapture = (int) ((size_t) data); - if (guid != NULL) { /* skip default device */ + const int iscapture = (int)((size_t)data); + if (guid != NULL) { /* skip default device */ char *str = WIN_LookupAudioDeviceName(desc, guid); if (str != NULL) { - LPGUID cpyguid = (LPGUID) SDL_malloc(sizeof (GUID)); - SDL_memcpy(cpyguid, guid, sizeof (GUID)); + LPGUID cpyguid = (LPGUID)SDL_malloc(sizeof(GUID)); + SDL_memcpy(cpyguid, guid, sizeof(GUID)); /* Note that spec is NULL, because we are required to connect to the * device before getting the channel mask and output format, making * this information inaccessible at enumeration time */ SDL_AddAudioDevice(iscapture, str, NULL, cpyguid); - SDL_free(str); /* addfn() makes a copy of this string. */ + SDL_free(str); /* addfn() makes a copy of this string. */ } } - return TRUE; /* keep enumerating. */ + return TRUE; /* keep enumerating. */ } -static void -DSOUND_DetectDevices(void) +static void DSOUND_DetectDevices(void) { #if HAVE_MMDEVICEAPI_H if (SupportsIMMDevice) { @@ -207,9 +201,7 @@ DSOUND_DetectDevices(void) #endif /* HAVE_MMDEVICEAPI_H*/ } - -static void -DSOUND_WaitDevice(_THIS) +static void DSOUND_WaitDevice(_THIS) { DWORD status = 0; DWORD cursor = 0; @@ -237,10 +229,10 @@ DSOUND_WaitDevice(_THIS) /* Try to restore a lost sound buffer */ IDirectSoundBuffer_GetStatus(this->hidden->mixbuf, &status); - if ((status & DSBSTATUS_BUFFERLOST)) { + if (status & DSBSTATUS_BUFFERLOST) { IDirectSoundBuffer_Restore(this->hidden->mixbuf); IDirectSoundBuffer_GetStatus(this->hidden->mixbuf, &status); - if ((status & DSBSTATUS_BUFFERLOST)) { + if (status & DSBSTATUS_BUFFERLOST) { break; } } @@ -266,8 +258,7 @@ DSOUND_WaitDevice(_THIS) } } -static void -DSOUND_PlayDevice(_THIS) +static void DSOUND_PlayDevice(_THIS) { /* Unlock the buffer, allowing it to play */ if (this->hidden->locked_buf) { @@ -277,8 +268,7 @@ DSOUND_PlayDevice(_THIS) } } -static Uint8 * -DSOUND_GetDeviceBuf(_THIS) +static Uint8 *DSOUND_GetDeviceBuf(_THIS) { DWORD cursor = 0; DWORD junk = 0; @@ -296,7 +286,7 @@ DSOUND_GetDeviceBuf(_THIS) } if (result != DS_OK) { SetDSerror("DirectSound GetCurrentPosition", result); - return (NULL); + return NULL; } cursor /= this->spec.size; #ifdef DEBUG_SOUND @@ -319,25 +309,23 @@ DSOUND_GetDeviceBuf(_THIS) /* Lock the audio buffer */ result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor, this->spec.size, - (LPVOID *) & this->hidden->locked_buf, + (LPVOID *)&this->hidden->locked_buf, &rawlen, NULL, &junk, 0); if (result == DSERR_BUFFERLOST) { IDirectSoundBuffer_Restore(this->hidden->mixbuf); result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor, this->spec.size, - (LPVOID *) & this-> - hidden->locked_buf, &rawlen, NULL, + (LPVOID *)&this->hidden->locked_buf, &rawlen, NULL, &junk, 0); } if (result != DS_OK) { SetDSerror("DirectSound Lock", result); - return (NULL); + return NULL; } - return (this->hidden->locked_buf); + return this->hidden->locked_buf; } -static int -DSOUND_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int DSOUND_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *h = this->hidden; DWORD junk, cursor, ptr1len, ptr2len; @@ -346,7 +334,7 @@ DSOUND_CaptureFromDevice(_THIS, void *buffer, int buflen) SDL_assert(buflen == this->spec.size); while (SDL_TRUE) { - if (SDL_AtomicGet(&this->shutdown)) { /* in case the buffer froze... */ + if (SDL_AtomicGet(&this->shutdown)) { /* in case the buffer froze... */ SDL_memset(buffer, this->spec.silence, buflen); return buflen; } @@ -355,7 +343,7 @@ DSOUND_CaptureFromDevice(_THIS, void *buffer, int buflen) return -1; } if ((cursor / this->spec.size) == h->lastchunk) { - SDL_Delay(1); /* FIXME: find out how much time is left and sleep that long */ + SDL_Delay(1); /* FIXME: find out how much time is left and sleep that long */ } else { break; } @@ -380,8 +368,7 @@ DSOUND_CaptureFromDevice(_THIS, void *buffer, int buflen) return ptr1len; } -static void -DSOUND_FlushCapture(_THIS) +static void DSOUND_FlushCapture(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; DWORD junk, cursor; @@ -390,8 +377,7 @@ DSOUND_FlushCapture(_THIS) } } -static void -DSOUND_CloseDevice(_THIS) +static void DSOUND_CloseDevice(_THIS) { if (this->hidden->mixbuf != NULL) { IDirectSoundBuffer_Stop(this->hidden->mixbuf); @@ -414,8 +400,7 @@ DSOUND_CloseDevice(_THIS) number of audio chunks available in the created buffer. This is for playback devices, not capture. */ -static int -CreateSecondary(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) +static int CreateSecondary(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) { LPDIRECTSOUND sndObj = this->hidden->sound; LPDIRECTSOUNDBUFFER *sndbuf = &this->hidden->mixbuf; @@ -439,14 +424,14 @@ CreateSecondary(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) /* Silence the initial audio buffer */ result = IDirectSoundBuffer_Lock(*sndbuf, 0, format.dwBufferBytes, - (LPVOID *) & pvAudioPtr1, &dwAudioBytes1, - (LPVOID *) & pvAudioPtr2, &dwAudioBytes2, + (LPVOID *)&pvAudioPtr1, &dwAudioBytes1, + (LPVOID *)&pvAudioPtr2, &dwAudioBytes2, DSBLOCK_ENTIREBUFFER); if (result == DS_OK) { SDL_memset(pvAudioPtr1, this->spec.silence, dwAudioBytes1); IDirectSoundBuffer_Unlock(*sndbuf, - (LPVOID) pvAudioPtr1, dwAudioBytes1, - (LPVOID) pvAudioPtr2, dwAudioBytes2); + (LPVOID)pvAudioPtr1, dwAudioBytes1, + (LPVOID)pvAudioPtr2, dwAudioBytes2); } /* We're ready to go */ @@ -457,8 +442,7 @@ CreateSecondary(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) number of audio chunks available in the created buffer. This is for capture devices, not playback. */ -static int -CreateCaptureBuffer(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) +static int CreateCaptureBuffer(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) { LPDIRECTSOUNDCAPTURE capture = this->hidden->capture; LPDIRECTSOUNDCAPTUREBUFFER *capturebuf = &this->hidden->capturebuf; @@ -466,7 +450,7 @@ CreateCaptureBuffer(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) HRESULT result; SDL_zero(format); - format.dwSize = sizeof (format); + format.dwSize = sizeof(format); format.dwFlags = DSCBCAPS_WAVEMAPPED; format.dwBufferBytes = bufsize; format.lpwfxFormat = wfmt; @@ -497,20 +481,18 @@ CreateCaptureBuffer(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt) return 0; } -static int -DSOUND_OpenDevice(_THIS, const char *devname) +static int DSOUND_OpenDevice(_THIS, const char *devname) { const DWORD numchunks = 8; HRESULT result; SDL_bool tried_format = SDL_FALSE; SDL_bool iscapture = this->iscapture; SDL_AudioFormat test_format; - LPGUID guid = (LPGUID) this->handle; + LPGUID guid = (LPGUID)this->handle; DWORD bufsize; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -551,8 +533,8 @@ DSOUND_OpenDevice(_THIS, const char *devname) bufsize = numchunks * this->spec.size; if ((bufsize < DSBSIZE_MIN) || (bufsize > DSBSIZE_MAX)) { SDL_SetError("Sound buffer size must be between %d and %d", - (int) ((DSBSIZE_MIN < numchunks) ? 1 : DSBSIZE_MIN / numchunks), - (int) (DSBSIZE_MAX / numchunks)); + (int)((DSBSIZE_MIN < numchunks) ? 1 : DSBSIZE_MIN / numchunks), + (int)(DSBSIZE_MAX / numchunks)); } else { int rc; WAVEFORMATEXTENSIBLE wfmt; @@ -568,8 +550,7 @@ DSOUND_OpenDevice(_THIS, const char *devname) } wfmt.Samples.wValidBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format); - switch (this->spec.channels) - { + switch (this->spec.channels) { case 3: /* 3.0 (or 2.1) */ wfmt.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER; break; @@ -604,7 +585,7 @@ DSOUND_OpenDevice(_THIS, const char *devname) wfmt.Format.nBlockAlign = wfmt.Format.nChannels * (wfmt.Format.wBitsPerSample / 8); wfmt.Format.nAvgBytesPerSec = wfmt.Format.nSamplesPerSec * wfmt.Format.nBlockAlign; - rc = iscapture ? CreateCaptureBuffer(this, bufsize, (WAVEFORMATEX*) &wfmt) : CreateSecondary(this, bufsize, (WAVEFORMATEX*) &wfmt); + rc = iscapture ? CreateCaptureBuffer(this, bufsize, (WAVEFORMATEX *)&wfmt) : CreateSecondary(this, bufsize, (WAVEFORMATEX *)&wfmt); if (rc == 0) { this->hidden->num_buffers = numchunks; break; @@ -619,19 +600,17 @@ DSOUND_OpenDevice(_THIS, const char *devname) if (!test_format) { if (tried_format) { - return -1; /* CreateSecondary() should have called SDL_SetError(). */ + return -1; /* CreateSecondary() should have called SDL_SetError(). */ } return SDL_SetError("%s: Unsupported audio format", "directsound"); } /* Playback buffers will auto-start playing in DSOUND_WaitDevice() */ - return 0; /* good to go. */ + return 0; /* good to go. */ } - -static void -DSOUND_Deinitialize(void) +static void DSOUND_Deinitialize(void) { #if HAVE_MMDEVICEAPI_H if (SupportsIMMDevice) { @@ -642,9 +621,7 @@ DSOUND_Deinitialize(void) DSOUND_Unload(); } - -static SDL_bool -DSOUND_Init(SDL_AudioDriverImpl * impl) +static SDL_bool DSOUND_Init(SDL_AudioDriverImpl *impl) { if (!DSOUND_Load()) { return SDL_FALSE; @@ -670,7 +647,7 @@ DSOUND_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap DSOUND_bootstrap = { diff --git a/modules/SDL2/src/audio/directsound/SDL_directsound.h b/modules/SDL2/src/audio/directsound/SDL_directsound.h index 64cbfaf..297769e 100644 --- a/modules/SDL2/src/audio/directsound/SDL_directsound.h +++ b/modules/SDL2/src/audio/directsound/SDL_directsound.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this /* The DirectSound objects */ struct SDL_PrivateAudioData diff --git a/modules/SDL2/src/audio/disk/SDL_diskaudio.c b/modules/SDL2/src/audio/disk/SDL_diskaudio.c index 6f943cc..e98dbea 100644 --- a/modules/SDL2/src/audio/disk/SDL_diskaudio.c +++ b/modules/SDL2/src/audio/disk/SDL_diskaudio.c @@ -36,21 +36,19 @@ /* !!! FIXME: these should be SDL hints, not environment variables. */ /* environment variables and defaults. */ -#define DISKENVR_OUTFILE "SDL_DISKAUDIOFILE" -#define DISKDEFAULT_OUTFILE "sdlaudio.raw" -#define DISKENVR_INFILE "SDL_DISKAUDIOFILEIN" -#define DISKDEFAULT_INFILE "sdlaudio-in.raw" -#define DISKENVR_IODELAY "SDL_DISKAUDIODELAY" +#define DISKENVR_OUTFILE "SDL_DISKAUDIOFILE" +#define DISKDEFAULT_OUTFILE "sdlaudio.raw" +#define DISKENVR_INFILE "SDL_DISKAUDIOFILEIN" +#define DISKDEFAULT_INFILE "sdlaudio-in.raw" +#define DISKENVR_IODELAY "SDL_DISKAUDIODELAY" /* This function waits until it is possible to write a full sound buffer */ -static void -DISKAUDIO_WaitDevice(_THIS) +static void DISKAUDIO_WaitDevice(_THIS) { SDL_Delay(_this->hidden->io_delay); } -static void -DISKAUDIO_PlayDevice(_THIS) +static void DISKAUDIO_PlayDevice(_THIS) { const size_t written = SDL_RWwrite(_this->hidden->io, _this->hidden->mixbuf, @@ -65,14 +63,12 @@ DISKAUDIO_PlayDevice(_THIS) #endif } -static Uint8 * -DISKAUDIO_GetDeviceBuf(_THIS) +static Uint8 *DISKAUDIO_GetDeviceBuf(_THIS) { - return (_this->hidden->mixbuf); + return _this->hidden->mixbuf; } -static int -DISKAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int DISKAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *h = _this->hidden; const int origbuflen = buflen; @@ -81,9 +77,9 @@ DISKAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) if (h->io) { const size_t br = SDL_RWread(h->io, buffer, 1, buflen); - buflen -= (int) br; - buffer = ((Uint8 *) buffer) + br; - if (buflen > 0) { /* EOF (or error, but whatever). */ + buflen -= (int)br; + buffer = ((Uint8 *)buffer) + br; + if (buflen > 0) { /* EOF (or error, but whatever). */ SDL_RWclose(h->io); h->io = NULL; } @@ -95,15 +91,12 @@ DISKAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) return origbuflen; } -static void -DISKAUDIO_FlushCapture(_THIS) +static void DISKAUDIO_FlushCapture(_THIS) { /* no op...we don't advance the file pointer or anything. */ } - -static void -DISKAUDIO_CloseDevice(_THIS) +static void DISKAUDIO_CloseDevice(_THIS) { if (_this->hidden->io != NULL) { SDL_RWclose(_this->hidden->io); @@ -112,9 +105,7 @@ DISKAUDIO_CloseDevice(_THIS) SDL_free(_this->hidden); } - -static const char * -get_filename(const SDL_bool iscapture, const char *devname) +static const char *get_filename(const SDL_bool iscapture, const char *devname) { if (devname == NULL) { devname = SDL_getenv(iscapture ? DISKENVR_INFILE : DISKENVR_OUTFILE); @@ -125,8 +116,7 @@ get_filename(const SDL_bool iscapture, const char *devname) return devname; } -static int -DISKAUDIO_OpenDevice(_THIS, const char *devname) +static int DISKAUDIO_OpenDevice(_THIS, const char *devname) { void *handle = _this->handle; /* handle != NULL means "user specified the placeholder name on the fake detected device list" */ @@ -155,7 +145,7 @@ DISKAUDIO_OpenDevice(_THIS, const char *devname) /* Allocate mixing buffer */ if (!iscapture) { - _this->hidden->mixbuf = (Uint8 *) SDL_malloc(_this->spec.size); + _this->hidden->mixbuf = (Uint8 *)SDL_malloc(_this->spec.size); if (_this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -163,24 +153,22 @@ DISKAUDIO_OpenDevice(_THIS, const char *devname) } SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO, - "You are using the SDL disk i/o audio driver!\n"); + "You are using the SDL disk i/o audio driver!\n"); SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO, - " %s file [%s].\n", iscapture ? "Reading from" : "Writing to", - fname); + " %s file [%s].\n", iscapture ? "Reading from" : "Writing to", + fname); /* We're ready to rock and roll. :-) */ return 0; } -static void -DISKAUDIO_DetectDevices(void) +static void DISKAUDIO_DetectDevices(void) { - SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *) 0x1); - SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) 0x2); + SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *)0x1); + SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *)0x2); } -static SDL_bool -DISKAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool DISKAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = DISKAUDIO_OpenDevice; @@ -197,7 +185,7 @@ DISKAUDIO_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap DISKAUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/disk/SDL_diskaudio.h b/modules/SDL2/src/audio/disk/SDL_diskaudio.h index 1d35ec7..f134820 100644 --- a/modules/SDL2/src/audio/disk/SDL_diskaudio.h +++ b/modules/SDL2/src/audio/disk/SDL_diskaudio.h @@ -27,7 +27,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/dsp/SDL_dspaudio.c b/modules/SDL2/src/audio/dsp/SDL_dspaudio.c index ff30467..441aa25 100644 --- a/modules/SDL2/src/audio/dsp/SDL_dspaudio.c +++ b/modules/SDL2/src/audio/dsp/SDL_dspaudio.c @@ -24,8 +24,8 @@ /* Allow access to a raw mixing buffer */ -#include /* For perror() */ -#include /* For strerror() */ +#include /* For perror() */ +#include /* For strerror() */ #include #include #include @@ -42,16 +42,12 @@ #include "../SDL_audiodev_c.h" #include "SDL_dspaudio.h" - -static void -DSP_DetectDevices(void) +static void DSP_DetectDevices(void) { SDL_EnumUnixAudioDevices(0, NULL); } - -static void -DSP_CloseDevice(_THIS) +static void DSP_CloseDevice(_THIS) { if (this->hidden->audio_fd >= 0) { close(this->hidden->audio_fd); @@ -60,9 +56,7 @@ DSP_CloseDevice(_THIS) SDL_free(this->hidden); } - -static int -DSP_OpenDevice(_THIS, const char *devname) +static int DSP_OpenDevice(_THIS, const char *devname) { SDL_bool iscapture = this->iscapture; const int flags = ((iscapture) ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT); @@ -82,16 +76,16 @@ DSP_OpenDevice(_THIS, const char *devname) /* Make sure fragment size stays a power of 2, or OSS fails. */ /* I don't know which of these are actually legal values, though... */ - if (this->spec.channels > 8) + if (this->spec.channels > 8) { this->spec.channels = 8; - else if (this->spec.channels > 4) + } else if (this->spec.channels > 4) { this->spec.channels = 4; - else if (this->spec.channels > 2) + } else if (this->spec.channels > 2) { this->spec.channels = 2; + } /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -204,11 +198,12 @@ DSP_OpenDevice(_THIS, const char *devname) SDL_CalculateAudioSpec(&this->spec); /* Determine the power of two of the fragment size */ - for (frag_spec = 0; (0x01U << frag_spec) < this->spec.size; ++frag_spec); + for (frag_spec = 0; (0x01U << frag_spec) < this->spec.size; ++frag_spec) { + } if ((0x01U << frag_spec) != this->spec.size) { return SDL_SetError("Fragment size must be a power of two"); } - frag_spec |= 0x00020000; /* two fragments, for low latency */ + frag_spec |= 0x00020000; /* two fragments, for low latency */ /* Set the audio buffering parameters */ #ifdef DEBUG_AUDIO @@ -232,7 +227,7 @@ DSP_OpenDevice(_THIS, const char *devname) /* Allocate mixing buffer */ if (!iscapture) { this->hidden->mixlen = this->spec.size; - this->hidden->mixbuf = (Uint8 *) SDL_malloc(this->hidden->mixlen); + this->hidden->mixbuf = (Uint8 *)SDL_malloc(this->hidden->mixlen); if (this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -243,9 +238,7 @@ DSP_OpenDevice(_THIS, const char *devname) return 0; } - -static void -DSP_PlayDevice(_THIS) +static void DSP_PlayDevice(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; if (write(h->audio_fd, h->mixbuf, h->mixlen) == -1) { @@ -257,27 +250,24 @@ DSP_PlayDevice(_THIS) #endif } -static Uint8 * -DSP_GetDeviceBuf(_THIS) +static Uint8 *DSP_GetDeviceBuf(_THIS) { - return (this->hidden->mixbuf); + return this->hidden->mixbuf; } -static int -DSP_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int DSP_CaptureFromDevice(_THIS, void *buffer, int buflen) { - return (int) read(this->hidden->audio_fd, buffer, buflen); + return (int)read(this->hidden->audio_fd, buffer, buflen); } -static void -DSP_FlushCapture(_THIS) +static void DSP_FlushCapture(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; audio_buf_info info; if (ioctl(h->audio_fd, SNDCTL_DSP_GETISPACE, &info) == 0) { while (info.bytes > 0) { char buf[512]; - const size_t len = SDL_min(sizeof (buf), info.bytes); + const size_t len = SDL_min(sizeof(buf), info.bytes); const ssize_t br = read(h->audio_fd, buf, len); if (br <= 0) { break; @@ -288,22 +278,20 @@ DSP_FlushCapture(_THIS) } static SDL_bool InitTimeDevicesExist = SDL_FALSE; -static int -look_for_devices_test(int fd) +static int look_for_devices_test(int fd) { - InitTimeDevicesExist = SDL_TRUE; /* note that _something_ exists. */ + InitTimeDevicesExist = SDL_TRUE; /* note that _something_ exists. */ /* Don't add to the device list, we're just seeing if any devices exist. */ return 0; } -static SDL_bool -DSP_Init(SDL_AudioDriverImpl * impl) +static SDL_bool DSP_Init(SDL_AudioDriverImpl *impl) { InitTimeDevicesExist = SDL_FALSE; SDL_EnumUnixAudioDevices(0, look_for_devices_test); if (!InitTimeDevicesExist) { SDL_SetError("dsp: No such audio device"); - return SDL_FALSE; /* maybe try a different backend. */ + return SDL_FALSE; /* maybe try a different backend. */ } /* Set the function pointers */ @@ -318,10 +306,9 @@ DSP_Init(SDL_AudioDriverImpl * impl) impl->AllowsArbitraryDeviceNames = SDL_TRUE; impl->HasCaptureSupport = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } - AudioBootStrap DSP_bootstrap = { "dsp", "OSS /dev/dsp standard audio", DSP_Init, SDL_FALSE }; diff --git a/modules/SDL2/src/audio/dsp/SDL_dspaudio.h b/modules/SDL2/src/audio/dsp/SDL_dspaudio.h index 989a2f4..78c94e4 100644 --- a/modules/SDL2/src/audio/dsp/SDL_dspaudio.h +++ b/modules/SDL2/src/audio/dsp/SDL_dspaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -37,7 +37,7 @@ struct SDL_PrivateAudioData Uint8 *mixbuf; int mixlen; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* SDL_dspaudio_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/audio/dummy/SDL_dummyaudio.c b/modules/SDL2/src/audio/dummy/SDL_dummyaudio.c index de0bf1b..9255e28 100644 --- a/modules/SDL2/src/audio/dummy/SDL_dummyaudio.c +++ b/modules/SDL2/src/audio/dummy/SDL_dummyaudio.c @@ -27,15 +27,14 @@ #include "../SDL_audio_c.h" #include "SDL_dummyaudio.h" -static int -DUMMYAUDIO_OpenDevice(_THIS, const char *devname) +static int DUMMYAUDIO_OpenDevice(_THIS, const char *devname) { - _this->hidden = (void *) 0x1; /* just something non-NULL */ - return 0; /* always succeeds. */ + _this->hidden = (void *)0x1; /* just something non-NULL */ + + return 0; /* always succeeds. */ } -static int -DUMMYAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int DUMMYAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { /* Delay to make this sort of simulate real audio input. */ SDL_Delay((_this->spec.samples * 1000) / _this->spec.freq); @@ -45,8 +44,7 @@ DUMMYAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) return buflen; } -static SDL_bool -DUMMYAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool DUMMYAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = DUMMYAUDIO_OpenDevice; @@ -56,7 +54,7 @@ DUMMYAUDIO_Init(SDL_AudioDriverImpl * impl) impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; impl->HasCaptureSupport = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap DUMMYAUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/dummy/SDL_dummyaudio.h b/modules/SDL2/src/audio/dummy/SDL_dummyaudio.h index d1503cd..e93b5f9 100644 --- a/modules/SDL2/src/audio/dummy/SDL_dummyaudio.h +++ b/modules/SDL2/src/audio/dummy/SDL_dummyaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c b/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c index db851ee..af5f095 100644 --- a/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c +++ b/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c @@ -33,10 +33,10 @@ !!! FIXME: true always once pthread support becomes widespread. Revisit this code !!! FIXME: at some point and see what needs to be done for that! */ -static void -FeedAudioDevice(_THIS, const void *buf, const int buflen) +static void FeedAudioDevice(_THIS, const void *buf, const int buflen) { const int framelen = (SDL_AUDIO_BITSIZE(this->spec.format) / 8) * this->spec.channels; + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM({ var SDL2 = Module['SDL2']; var numChannels = SDL2.audio.currentOutputBuffer['numberOfChannels']; @@ -51,10 +51,10 @@ FeedAudioDevice(_THIS, const void *buf, const int buflen) } } }, buf, buflen / framelen); +/* *INDENT-ON* */ /* clang-format on */ } -static void -HandleAudioProcess(_THIS) +static void HandleAudioProcess(_THIS) { SDL_AudioCallback callback = this->callbackspec.callback; const int stream_len = this->callbackspec.size; @@ -70,12 +70,12 @@ HandleAudioProcess(_THIS) return; } - if (this->stream == NULL) { /* no conversion necessary. */ + if (this->stream == NULL) { /* no conversion necessary. */ SDL_assert(this->spec.size == stream_len); callback(this->callbackspec.userdata, this->work_buffer, stream_len); - } else { /* streaming/converting */ + } else { /* streaming/converting */ int got; - while (SDL_AudioStreamAvailable(this->stream) < ((int) this->spec.size)) { + while (SDL_AudioStreamAvailable(this->stream) < ((int)this->spec.size)) { callback(this->callbackspec.userdata, this->work_buffer, stream_len); if (SDL_AudioStreamPut(this->stream, this->work_buffer, stream_len) == -1) { SDL_AudioStreamClear(this->stream); @@ -94,8 +94,7 @@ HandleAudioProcess(_THIS) FeedAudioDevice(this, this->work_buffer, this->spec.size); } -static void -HandleCaptureProcess(_THIS) +static void HandleCaptureProcess(_THIS) { SDL_AudioCallback callback = this->callbackspec.callback; const int stream_len = this->callbackspec.size; @@ -106,6 +105,7 @@ HandleCaptureProcess(_THIS) return; } + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM({ var SDL2 = Module['SDL2']; var numChannels = SDL2.capture.currentCaptureBuffer.numberOfChannels; @@ -125,14 +125,15 @@ HandleCaptureProcess(_THIS) } } } - }, this->work_buffer, (this->spec.size / sizeof (float)) / this->spec.channels); + }, this->work_buffer, (this->spec.size / sizeof(float)) / this->spec.channels); +/* *INDENT-ON* */ /* clang-format on */ /* okay, we've got an interleaved float32 array in C now. */ - if (this->stream == NULL) { /* no conversion necessary. */ + if (this->stream == NULL) { /* no conversion necessary. */ SDL_assert(this->spec.size == stream_len); callback(this->callbackspec.userdata, this->work_buffer, stream_len); - } else { /* streaming/converting */ + } else { /* streaming/converting */ if (SDL_AudioStreamPut(this->stream, this->work_buffer, this->spec.size) == -1) { SDL_AtomicSet(&this->enabled, 0); } @@ -143,15 +144,14 @@ HandleCaptureProcess(_THIS) if (got != stream_len) { SDL_memset(this->work_buffer, this->callbackspec.silence, stream_len); } - callback(this->callbackspec.userdata, this->work_buffer, stream_len); /* Send it to the app. */ + callback(this->callbackspec.userdata, this->work_buffer, stream_len); /* Send it to the app. */ } } } - -static void -EMSCRIPTENAUDIO_CloseDevice(_THIS) +static void EMSCRIPTENAUDIO_CloseDevice(_THIS) { + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM({ var SDL2 = Module['SDL2']; if ($0) { @@ -190,14 +190,14 @@ EMSCRIPTENAUDIO_CloseDevice(_THIS) SDL2.audioContext = undefined; } }, this->iscapture); +/* *INDENT-ON* */ /* clang-format on */ #if 0 /* !!! FIXME: currently not used. Can we move some stuff off the SDL2 namespace? --ryan. */ SDL_free(this->hidden); #endif } -static int -EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) +static int EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) { SDL_AudioFormat test_format; SDL_bool iscapture = this->iscapture; @@ -205,6 +205,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) /* based on parts of library_sdl.js */ + /* *INDENT-OFF* */ /* clang-format off */ /* create context */ result = MAIN_THREAD_EM_ASM_INT({ if(typeof(Module['SDL2']) === 'undefined') { @@ -229,6 +230,8 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) } return SDL2.audioContext === undefined ? -1 : 0; }, iscapture); +/* *INDENT-ON* */ /* clang-format on */ + if (result < 0) { return SDL_SetError("Web Audio API is not available!"); } @@ -252,7 +255,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) /* Initialize all variables that we clean on shutdown */ #if 0 /* !!! FIXME: currently not used. Can we move some stuff off the SDL2 namespace? --ryan. */ this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -261,13 +264,14 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) this->hidden = (struct SDL_PrivateAudioData *)0x1; /* limit to native freq */ - this->spec.freq = EM_ASM_INT_V({ + this->spec.freq = EM_ASM_INT({ var SDL2 = Module['SDL2']; return SDL2.audioContext.sampleRate; }); SDL_CalculateAudioSpec(&this->spec); + /* *INDENT-OFF* */ /* clang-format off */ if (iscapture) { /* The idea is to take the capture media stream, hook it up to an audio graph where we can pass it through a ScriptProcessorNode @@ -339,17 +343,16 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname) SDL2.audio.scriptProcessorNode['connect'](SDL2.audioContext['destination']); }, this->spec.channels, this->spec.samples, HandleAudioProcess, this); } +/* *INDENT-ON* */ /* clang-format on */ return 0; } -static void -EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice * device) +static void EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice *device) { } -static SDL_bool -EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl *impl) { SDL_bool available, capture_available; @@ -363,6 +366,7 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl) impl->LockDevice = impl->UnlockDevice = EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock; impl->ProvidesOwnCallbackThread = SDL_TRUE; + /* *INDENT-OFF* */ /* clang-format off */ /* check availability */ available = MAIN_THREAD_EM_ASM_INT({ if (typeof(AudioContext) !== 'undefined') { @@ -372,11 +376,13 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl) } return false; }); +/* *INDENT-ON* */ /* clang-format on */ if (!available) { SDL_SetError("No audio context available"); } + /* *INDENT-OFF* */ /* clang-format off */ capture_available = available && MAIN_THREAD_EM_ASM_INT({ if ((typeof(navigator.mediaDevices) !== 'undefined') && (typeof(navigator.mediaDevices.getUserMedia) !== 'undefined')) { return true; @@ -385,6 +391,7 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl) } return false; }); +/* *INDENT-ON* */ /* clang-format on */ impl->HasCaptureSupport = capture_available ? SDL_TRUE : SDL_FALSE; impl->OnlyHasDefaultCaptureDevice = capture_available ? SDL_TRUE : SDL_FALSE; diff --git a/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h b/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h index e189a0b..13cadcf 100644 --- a/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h +++ b/modules/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/esd/SDL_esdaudio.c b/modules/SDL2/src/audio/esd/SDL_esdaudio.c index db8567b..800caaf 100644 --- a/modules/SDL2/src/audio/esd/SDL_esdaudio.c +++ b/modules/SDL2/src/audio/esd/SDL_esdaudio.c @@ -64,8 +64,7 @@ static struct #undef SDL_ESD_SYM -static void -UnloadESDLibrary() +static void UnloadESDLibrary() { if (esd_handle != NULL) { SDL_UnloadObject(esd_handle); @@ -73,8 +72,7 @@ UnloadESDLibrary() } } -static int -LoadESDLibrary(void) +static int LoadESDLibrary(void) { int i, retval = -1; @@ -98,14 +96,12 @@ LoadESDLibrary(void) #else -static void -UnloadESDLibrary() +static void UnloadESDLibrary() { return; } -static int -LoadESDLibrary(void) +static int LoadESDLibrary(void) { return 0; } @@ -114,8 +110,7 @@ LoadESDLibrary(void) /* This function waits until it is possible to write a full sound buffer */ -static void -ESD_WaitDevice(_THIS) +static void ESD_WaitDevice(_THIS) { Sint32 ticks; @@ -140,8 +135,7 @@ ESD_WaitDevice(_THIS) } } -static void -ESD_PlayDevice(_THIS) +static void ESD_PlayDevice(_THIS) { int written = 0; @@ -164,14 +158,12 @@ ESD_PlayDevice(_THIS) } } -static Uint8 * -ESD_GetDeviceBuf(_THIS) +static Uint8 *ESD_GetDeviceBuf(_THIS) { return (this->hidden->mixbuf); } -static void -ESD_CloseDevice(_THIS) +static void ESD_CloseDevice(_THIS) { if (this->hidden->audio_fd >= 0) { SDL_NAME(esd_close) (this->hidden->audio_fd); @@ -181,8 +173,7 @@ ESD_CloseDevice(_THIS) } /* Try to get the name of the program */ -static char * -get_progname(void) +static char *get_progname(void) { char *progname = NULL; #ifdef __LINUX__ @@ -207,16 +198,14 @@ get_progname(void) } -static int -ESD_OpenDevice(_THIS, const char *devname) +static int ESD_OpenDevice(_THIS, const char *devname) { esd_format_t format = (ESD_STREAM | ESD_PLAY); SDL_AudioFormat test_format = 0; int found = 0; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -287,14 +276,12 @@ ESD_OpenDevice(_THIS, const char *devname) return 0; } -static void -ESD_Deinitialize(void) +static void ESD_Deinitialize(void) { UnloadESDLibrary(); } -static SDL_bool -ESD_Init(SDL_AudioDriverImpl * impl) +static SDL_bool ESD_Init(SDL_AudioDriverImpl * impl) { if (LoadESDLibrary() < 0) { return SDL_FALSE; diff --git a/modules/SDL2/src/audio/fusionsound/SDL_fsaudio.c b/modules/SDL2/src/audio/fusionsound/SDL_fsaudio.c index f5ed59a..f79ab22 100644 --- a/modules/SDL2/src/audio/fusionsound/SDL_fsaudio.c +++ b/modules/SDL2/src/audio/fusionsound/SDL_fsaudio.c @@ -77,8 +77,7 @@ static struct #undef SDL_FS_SYM -static void -UnloadFusionSoundLibrary() +static void UnloadFusionSoundLibrary() { if (fs_handle != NULL) { SDL_UnloadObject(fs_handle); @@ -86,8 +85,7 @@ UnloadFusionSoundLibrary() } } -static int -LoadFusionSoundLibrary(void) +static int LoadFusionSoundLibrary(void) { int i, retval = -1; @@ -112,14 +110,12 @@ LoadFusionSoundLibrary(void) #else -static void -UnloadFusionSoundLibrary() +static void UnloadFusionSoundLibrary() { return; } -static int -LoadFusionSoundLibrary(void) +static int LoadFusionSoundLibrary(void) { return 0; } @@ -127,15 +123,13 @@ LoadFusionSoundLibrary(void) #endif /* SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */ /* This function waits until it is possible to write a full sound buffer */ -static void -SDL_FS_WaitDevice(_THIS) +static void SDL_FS_WaitDevice(_THIS) { this->hidden->stream->Wait(this->hidden->stream, this->hidden->mixsamples); } -static void -SDL_FS_PlayDevice(_THIS) +static void SDL_FS_PlayDevice(_THIS) { DirectResult ret; @@ -152,15 +146,13 @@ SDL_FS_PlayDevice(_THIS) } -static Uint8 * -SDL_FS_GetDeviceBuf(_THIS) +static Uint8 *SDL_FS_GetDeviceBuf(_THIS) { return (this->hidden->mixbuf); } -static void -SDL_FS_CloseDevice(_THIS) +static void SDL_FS_CloseDevice(_THIS) { if (this->hidden->stream) { this->hidden->stream->Release(this->hidden->stream); @@ -173,8 +165,7 @@ SDL_FS_CloseDevice(_THIS) } -static int -SDL_FS_OpenDevice(_THIS, const char *devname) +static int SDL_FS_OpenDevice(_THIS, const char *devname) { int bytes; SDL_AudioFormat test_format; @@ -183,8 +174,7 @@ SDL_FS_OpenDevice(_THIS, const char *devname) DirectResult ret; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -270,15 +260,13 @@ SDL_FS_OpenDevice(_THIS, const char *devname) } -static void -SDL_FS_Deinitialize(void) +static void SDL_FS_Deinitialize(void) { UnloadFusionSoundLibrary(); } -static SDL_bool -SDL_FS_Init(SDL_AudioDriverImpl * impl) +static SDL_bool SDL_FS_Init(SDL_AudioDriverImpl * impl) { if (LoadFusionSoundLibrary() < 0) { return SDL_FALSE; diff --git a/modules/SDL2/src/audio/haiku/SDL_haikuaudio.cc b/modules/SDL2/src/audio/haiku/SDL_haikuaudio.cc index 66cbbd8..ca946ed 100644 --- a/modules/SDL2/src/audio/haiku/SDL_haikuaudio.cc +++ b/modules/SDL2/src/audio/haiku/SDL_haikuaudio.cc @@ -42,8 +42,7 @@ extern "C" /* !!! FIXME: have the callback call the higher level to avoid code dupe. */ /* The Haiku callback for handling the audio buffer */ -static void -FillSound(void *device, void *stream, size_t len, +static void FillSound(void *device, void *stream, size_t len, const media_raw_audio_format & format) { SDL_AudioDevice *audio = (SDL_AudioDevice *) device; @@ -85,8 +84,7 @@ FillSound(void *device, void *stream, size_t len, SDL_UnlockMutex(audio->mixer_lock); } -static void -HAIKUAUDIO_CloseDevice(_THIS) +static void HAIKUAUDIO_CloseDevice(_THIS) { if (_this->hidden->audio_obj) { _this->hidden->audio_obj->Stop(); @@ -100,8 +98,7 @@ static const int sig_list[] = { SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0 }; -static inline void -MaskSignals(sigset_t * omask) +static inline void MaskSignals(sigset_t * omask) { sigset_t mask; int i; @@ -113,15 +110,13 @@ MaskSignals(sigset_t * omask) sigprocmask(SIG_BLOCK, &mask, omask); } -static inline void -UnmaskSignals(sigset_t * omask) +static inline void UnmaskSignals(sigset_t * omask) { sigprocmask(SIG_SETMASK, omask, NULL); } -static int -HAIKUAUDIO_OpenDevice(_THIS, const char *devname) +static int HAIKUAUDIO_OpenDevice(_THIS, const char *devname) { media_raw_audio_format format; SDL_AudioFormat test_format; @@ -208,14 +203,12 @@ HAIKUAUDIO_OpenDevice(_THIS, const char *devname) return 0; } -static void -HAIKUAUDIO_Deinitialize(void) +static void HAIKUAUDIO_Deinitialize(void) { SDL_QuitBeApp(); } -static SDL_bool -HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl) { /* Initialize the Be Application, if it's not already started */ if (SDL_InitBeApp() < 0) { diff --git a/modules/SDL2/src/audio/haiku/SDL_haikuaudio.h b/modules/SDL2/src/audio/haiku/SDL_haikuaudio.h index 21b63d7..f40aae1 100644 --- a/modules/SDL2/src/audio/haiku/SDL_haikuaudio.h +++ b/modules/SDL2/src/audio/haiku/SDL_haikuaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/jack/SDL_jackaudio.c b/modules/SDL2/src/audio/jack/SDL_jackaudio.c index e23c7d9..f9e942c 100644 --- a/modules/SDL2/src/audio/jack/SDL_jackaudio.c +++ b/modules/SDL2/src/audio/jack/SDL_jackaudio.c @@ -29,36 +29,33 @@ #include "SDL_loadso.h" #include "../../thread/SDL_systhread.h" - -static jack_client_t * (*JACK_jack_client_open) (const char *, jack_options_t, jack_status_t *, ...); -static int (*JACK_jack_client_close) (jack_client_t *); -static void (*JACK_jack_on_shutdown) (jack_client_t *, JackShutdownCallback, void *); -static int (*JACK_jack_activate) (jack_client_t *); -static int (*JACK_jack_deactivate) (jack_client_t *); -static void * (*JACK_jack_port_get_buffer) (jack_port_t *, jack_nframes_t); -static int (*JACK_jack_port_unregister) (jack_client_t *, jack_port_t *); -static void (*JACK_jack_free) (void *); -static const char ** (*JACK_jack_get_ports) (jack_client_t *, const char *, const char *, unsigned long); -static jack_nframes_t (*JACK_jack_get_sample_rate) (jack_client_t *); -static jack_nframes_t (*JACK_jack_get_buffer_size) (jack_client_t *); -static jack_port_t * (*JACK_jack_port_register) (jack_client_t *, const char *, const char *, unsigned long, unsigned long); -static jack_port_t * (*JACK_jack_port_by_name) (jack_client_t *, const char *); -static const char * (*JACK_jack_port_name) (const jack_port_t *); -static const char * (*JACK_jack_port_type) (const jack_port_t *); -static int (*JACK_jack_connect) (jack_client_t *, const char *, const char *); -static int (*JACK_jack_set_process_callback) (jack_client_t *, JackProcessCallback, void *); +static jack_client_t *(*JACK_jack_client_open)(const char *, jack_options_t, jack_status_t *, ...); +static int (*JACK_jack_client_close)(jack_client_t *); +static void (*JACK_jack_on_shutdown)(jack_client_t *, JackShutdownCallback, void *); +static int (*JACK_jack_activate)(jack_client_t *); +static int (*JACK_jack_deactivate)(jack_client_t *); +static void *(*JACK_jack_port_get_buffer)(jack_port_t *, jack_nframes_t); +static int (*JACK_jack_port_unregister)(jack_client_t *, jack_port_t *); +static void (*JACK_jack_free)(void *); +static const char **(*JACK_jack_get_ports)(jack_client_t *, const char *, const char *, unsigned long); +static jack_nframes_t (*JACK_jack_get_sample_rate)(jack_client_t *); +static jack_nframes_t (*JACK_jack_get_buffer_size)(jack_client_t *); +static jack_port_t *(*JACK_jack_port_register)(jack_client_t *, const char *, const char *, unsigned long, unsigned long); +static jack_port_t *(*JACK_jack_port_by_name)(jack_client_t *, const char *); +static const char *(*JACK_jack_port_name)(const jack_port_t *); +static const char *(*JACK_jack_port_type)(const jack_port_t *); +static int (*JACK_jack_connect)(jack_client_t *, const char *, const char *); +static int (*JACK_jack_set_process_callback)(jack_client_t *, JackProcessCallback, void *); static int load_jack_syms(void); - #ifdef SDL_AUDIO_DRIVER_JACK_DYNAMIC static const char *jack_library = SDL_AUDIO_DRIVER_JACK_DYNAMIC; static void *jack_handle = NULL; /* !!! FIXME: this is copy/pasted in several places now */ -static int -load_jack_sym(const char *fn, void **addr) +static int load_jack_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(jack_handle, fn); if (*addr == NULL) { @@ -70,11 +67,11 @@ load_jack_sym(const char *fn, void **addr) } /* cast funcs to char* first, to please GCC's strict aliasing rules. */ -#define SDL_JACK_SYM(x) \ - if (!load_jack_sym(#x, (void **) (char *) &JACK_##x)) return -1 +#define SDL_JACK_SYM(x) \ + if (!load_jack_sym(#x, (void **)(char *)&JACK_##x)) \ + return -1 -static void -UnloadJackLibrary(void) +static void UnloadJackLibrary(void) { if (jack_handle != NULL) { SDL_UnloadObject(jack_handle); @@ -82,8 +79,7 @@ UnloadJackLibrary(void) } } -static int -LoadJackLibrary(void) +static int LoadJackLibrary(void) { int retval = 0; if (jack_handle == NULL) { @@ -105,13 +101,11 @@ LoadJackLibrary(void) #define SDL_JACK_SYM(x) JACK_##x = x -static void -UnloadJackLibrary(void) +static void UnloadJackLibrary(void) { } -static int -LoadJackLibrary(void) +static int LoadJackLibrary(void) { load_jack_syms(); return 0; @@ -119,9 +113,7 @@ LoadJackLibrary(void) #endif /* SDL_AUDIO_DRIVER_JACK_DYNAMIC */ - -static int -load_jack_syms(void) +static int load_jack_syms(void) { SDL_JACK_SYM(jack_client_open); SDL_JACK_SYM(jack_client_close); @@ -140,26 +132,24 @@ load_jack_syms(void) SDL_JACK_SYM(jack_port_type); SDL_JACK_SYM(jack_connect); SDL_JACK_SYM(jack_set_process_callback); + return 0; } - -static void -jackShutdownCallback(void *arg) /* JACK went away; device is lost. */ +static void jackShutdownCallback(void *arg) /* JACK went away; device is lost. */ { - SDL_AudioDevice *this = (SDL_AudioDevice *) arg; + SDL_AudioDevice *this = (SDL_AudioDevice *)arg; SDL_OpenedAudioDeviceDisconnected(this); - SDL_SemPost(this->hidden->iosem); /* unblock the SDL thread. */ + SDL_SemPost(this->hidden->iosem); /* unblock the SDL thread. */ } // !!! FIXME: implement and register these! -//typedef int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg) -//typedef int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg) +// typedef int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg) +// typedef int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg) -static int -jackProcessPlaybackCallback(jack_nframes_t nframes, void *arg) +static int jackProcessPlaybackCallback(jack_nframes_t nframes, void *arg) { - SDL_AudioDevice *this = (SDL_AudioDevice *) arg; + SDL_AudioDevice *this = (SDL_AudioDevice *)arg; jack_port_t **ports = this->hidden->sdlports; const int total_channels = this->spec.channels; const int total_frames = this->spec.samples; @@ -171,9 +161,9 @@ jackProcessPlaybackCallback(jack_nframes_t nframes, void *arg) } for (channelsi = 0; channelsi < total_channels; channelsi++) { - float *dst = (float *) JACK_jack_port_get_buffer(ports[channelsi], nframes); + float *dst = (float *)JACK_jack_port_get_buffer(ports[channelsi], nframes); if (dst) { - const float *src = ((float *) this->hidden->iobuffer) + channelsi; + const float *src = this->hidden->iobuffer + channelsi; int framesi; for (framesi = 0; framesi < total_frames; framesi++) { *(dst++) = *src; @@ -182,14 +172,12 @@ jackProcessPlaybackCallback(jack_nframes_t nframes, void *arg) } } - SDL_SemPost(this->hidden->iosem); /* tell SDL thread we're done; refill the buffer. */ - return 0; /* success */ + SDL_SemPost(this->hidden->iosem); /* tell SDL thread we're done; refill the buffer. */ + return 0; } - /* This function waits until it is possible to write a full sound buffer */ -static void -JACK_WaitDevice(_THIS) +static void JACK_WaitDevice(_THIS) { if (SDL_AtomicGet(&this->enabled)) { if (SDL_SemWait(this->hidden->iosem) == -1) { @@ -198,27 +186,24 @@ JACK_WaitDevice(_THIS) } } -static Uint8 * -JACK_GetDeviceBuf(_THIS) +static Uint8 *JACK_GetDeviceBuf(_THIS) { - return (Uint8 *) this->hidden->iobuffer; + return (Uint8 *)this->hidden->iobuffer; } - -static int -jackProcessCaptureCallback(jack_nframes_t nframes, void *arg) +static int jackProcessCaptureCallback(jack_nframes_t nframes, void *arg) { - SDL_AudioDevice *this = (SDL_AudioDevice *) arg; + SDL_AudioDevice *this = (SDL_AudioDevice *)arg; if (SDL_AtomicGet(&this->enabled)) { jack_port_t **ports = this->hidden->sdlports; const int total_channels = this->spec.channels; const int total_frames = this->spec.samples; int channelsi; - + for (channelsi = 0; channelsi < total_channels; channelsi++) { - const float *src = (const float *) JACK_jack_port_get_buffer(ports[channelsi], nframes); + const float *src = (const float *)JACK_jack_port_get_buffer(ports[channelsi], nframes); if (src) { - float *dst = ((float *) this->hidden->iobuffer) + channelsi; + float *dst = this->hidden->iobuffer + channelsi; int framesi; for (framesi = 0; framesi < total_frames; framesi++) { *dst = *(src++); @@ -228,14 +213,13 @@ jackProcessCaptureCallback(jack_nframes_t nframes, void *arg) } } - SDL_SemPost(this->hidden->iosem); /* tell SDL thread we're done; new buffer is ready! */ - return 0; /* success */ + SDL_SemPost(this->hidden->iosem); /* tell SDL thread we're done; new buffer is ready! */ + return 0; } -static int -JACK_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int JACK_CaptureFromDevice(_THIS, void *buffer, int buflen) { - SDL_assert(buflen == this->spec.size); /* we always fill a full buffer. */ + SDL_assert(buflen == this->spec.size); /* we always fill a full buffer. */ /* Wait for JACK to fill the iobuffer */ if (SDL_SemWait(this->hidden->iosem) == -1) { @@ -246,15 +230,12 @@ JACK_CaptureFromDevice(_THIS, void *buffer, int buflen) return buflen; } -static void -JACK_FlushCapture(_THIS) +static void JACK_FlushCapture(_THIS) { SDL_SemWait(this->hidden->iosem); } - -static void -JACK_CloseDevice(_THIS) +static void JACK_CloseDevice(_THIS) { if (this->hidden->client) { JACK_jack_deactivate(this->hidden->client); @@ -279,8 +260,7 @@ JACK_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -JACK_OpenDevice(_THIS, const char *devname) +static int JACK_OpenDevice(_THIS, const char *devname) { /* Note that JACK uses "output" for capture devices (they output audio data to us) and "input" for playback (we input audio data to them). @@ -300,7 +280,7 @@ JACK_OpenDevice(_THIS, const char *devname) int i; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, sizeof (*this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -313,7 +293,7 @@ JACK_OpenDevice(_THIS, const char *devname) } devports = JACK_jack_get_ports(client, NULL, NULL, JackPortIsPhysical | sysportflags); - if (!devports || !devports[0]) { + if (devports == NULL || !devports[0]) { return SDL_SetError("No physical JACK ports available"); } @@ -322,21 +302,21 @@ JACK_OpenDevice(_THIS, const char *devname) } /* Filter out non-audio ports */ - audio_ports = SDL_calloc(ports, sizeof *audio_ports); + audio_ports = SDL_calloc(ports, sizeof(*audio_ports)); for (i = 0; i < ports; i++) { const jack_port_t *dport = JACK_jack_port_by_name(client, devports[i]); const char *type = JACK_jack_port_type(dport); const int len = SDL_strlen(type); /* See if type ends with "audio" */ - if (len >= 5 && !SDL_memcmp(type+len-5, "audio", 5)) { + if (len >= 5 && !SDL_memcmp(type + len - 5, "audio", 5)) { audio_ports[channels++] = i; } } if (channels == 0) { + SDL_free(audio_ports); return SDL_SetError("No physical JACK ports available"); } - /* !!! FIXME: docs say about buffer size: "This size may change, clients that depend on it must register a bufsize_callback so they will be notified if it does." */ /* Jack pretty much demands what it wants. */ @@ -349,36 +329,42 @@ JACK_OpenDevice(_THIS, const char *devname) this->hidden->iosem = SDL_CreateSemaphore(0); if (!this->hidden->iosem) { - return -1; /* error was set by SDL_CreateSemaphore */ + SDL_free(audio_ports); + return -1; /* error was set by SDL_CreateSemaphore */ } - this->hidden->iobuffer = (float *) SDL_calloc(1, this->spec.size); + this->hidden->iobuffer = (float *)SDL_calloc(1, this->spec.size); if (!this->hidden->iobuffer) { + SDL_free(audio_ports); return SDL_OutOfMemory(); } /* Build SDL's ports, which we will connect to the device ports. */ - this->hidden->sdlports = (jack_port_t **) SDL_calloc(channels, sizeof (jack_port_t *)); + this->hidden->sdlports = (jack_port_t **)SDL_calloc(channels, sizeof(jack_port_t *)); if (this->hidden->sdlports == NULL) { + SDL_free(audio_ports); return SDL_OutOfMemory(); } for (i = 0; i < channels; i++) { char portname[32]; - SDL_snprintf(portname, sizeof (portname), "sdl_jack_%s_%d", sdlportstr, i); + (void)SDL_snprintf(portname, sizeof(portname), "sdl_jack_%s_%d", sdlportstr, i); this->hidden->sdlports[i] = JACK_jack_port_register(client, portname, JACK_DEFAULT_AUDIO_TYPE, sdlportflags, 0); if (this->hidden->sdlports[i] == NULL) { + SDL_free(audio_ports); return SDL_SetError("jack_port_register failed"); } } if (JACK_jack_set_process_callback(client, callback, this) != 0) { + SDL_free(audio_ports); return SDL_SetError("JACK: Couldn't set process callback"); } JACK_jack_on_shutdown(client, jackShutdownCallback, this); if (JACK_jack_activate(client) != 0) { + SDL_free(audio_ports); return SDL_SetError("Failed to activate JACK client"); } @@ -388,6 +374,7 @@ JACK_OpenDevice(_THIS, const char *devname) const char *srcport = iscapture ? devports[audio_ports[i]] : sdlport; const char *dstport = iscapture ? sdlport : devports[audio_ports[i]]; if (JACK_jack_connect(client, srcport, dstport) != 0) { + SDL_free(audio_ports); return SDL_SetError("Couldn't connect JACK ports: %s => %s", srcport, dstport); } } @@ -400,14 +387,12 @@ JACK_OpenDevice(_THIS, const char *devname) return 0; } -static void -JACK_Deinitialize(void) +static void JACK_Deinitialize(void) { UnloadJackLibrary(); } -static SDL_bool -JACK_Init(SDL_AudioDriverImpl * impl) +static SDL_bool JACK_Init(SDL_AudioDriverImpl *impl) { if (LoadJackLibrary() < 0) { return SDL_FALSE; @@ -434,7 +419,7 @@ JACK_Init(SDL_AudioDriverImpl * impl) impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; impl->HasCaptureSupport = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap JACK_bootstrap = { diff --git a/modules/SDL2/src/audio/n3ds/SDL_n3dsaudio.c b/modules/SDL2/src/audio/n3ds/SDL_n3dsaudio.c index 905fbf7..ddf4e3a 100644 --- a/modules/SDL2/src/audio/n3ds/SDL_n3dsaudio.c +++ b/modules/SDL2/src/audio/n3ds/SDL_n3dsaudio.c @@ -38,32 +38,27 @@ static SDL_AudioDevice *audio_device; static void FreePrivateData(_THIS); static int FindAudioFormat(_THIS); -static SDL_INLINE void -contextLock(_THIS) +static SDL_INLINE void contextLock(_THIS) { LightLock_Lock(&this->hidden->lock); } -static SDL_INLINE void -contextUnlock(_THIS) +static SDL_INLINE void contextUnlock(_THIS) { LightLock_Unlock(&this->hidden->lock); } -static void -N3DSAUD_LockAudio(_THIS) +static void N3DSAUD_LockAudio(_THIS) { contextLock(this); } -static void -N3DSAUD_UnlockAudio(_THIS) +static void N3DSAUD_UnlockAudio(_THIS) { contextUnlock(this); } -static void -N3DSAUD_DspHook(DSP_HookType hook) +static void N3DSAUD_DspHook(DSP_HookType hook) { if (hook == DSPHOOK_ONCANCEL) { contextLock(audio_device); @@ -74,12 +69,11 @@ N3DSAUD_DspHook(DSP_HookType hook) } } -static void -AudioFrameFinished(void *device) +static void AudioFrameFinished(void *device) { bool shouldBroadcast = false; unsigned i; - SDL_AudioDevice *this = (SDL_AudioDevice *) device; + SDL_AudioDevice *this = (SDL_AudioDevice *)device; contextLock(this); @@ -97,13 +91,12 @@ AudioFrameFinished(void *device) contextUnlock(this); } -static int -N3DSAUDIO_OpenDevice(_THIS, const char *devname) +static int N3DSAUDIO_OpenDevice(_THIS, const char *devname) { Result ndsp_init_res; Uint8 *data_vaddr; float mix[12]; - this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, sizeof *this->hidden); + this->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); @@ -142,14 +135,14 @@ N3DSAUDIO_OpenDevice(_THIS, const char *devname) } this->hidden->mixlen = this->spec.size; - this->hidden->mixbuf = (Uint8 *) SDL_malloc(this->spec.size); + this->hidden->mixbuf = (Uint8 *)SDL_malloc(this->spec.size); if (this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size); - data_vaddr = (Uint8 *) linearAlloc(this->hidden->mixlen * NUM_BUFFERS); + data_vaddr = (Uint8 *)linearAlloc(this->hidden->mixlen * NUM_BUFFERS); if (data_vaddr == NULL) { return SDL_OutOfMemory(); } @@ -188,8 +181,7 @@ N3DSAUDIO_OpenDevice(_THIS, const char *devname) return 0; } -static int -N3DSAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int N3DSAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { /* Delay to make this sort of simulate real audio input. */ SDL_Delay((this->spec.samples * 1000) / this->spec.freq); @@ -199,8 +191,7 @@ N3DSAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) return buflen; } -static void -N3DSAUDIO_PlayDevice(_THIS) +static void N3DSAUDIO_PlayDevice(_THIS) { size_t nextbuf; size_t sampleLen; @@ -219,15 +210,14 @@ N3DSAUDIO_PlayDevice(_THIS) contextUnlock(this); - memcpy((void *) this->hidden->waveBuf[nextbuf].data_vaddr, + memcpy((void *)this->hidden->waveBuf[nextbuf].data_vaddr, this->hidden->mixbuf, sampleLen); DSP_FlushDataCache(this->hidden->waveBuf[nextbuf].data_vaddr, sampleLen); ndspChnWaveBufAdd(0, &this->hidden->waveBuf[nextbuf]); } -static void -N3DSAUDIO_WaitDevice(_THIS) +static void N3DSAUDIO_WaitDevice(_THIS) { contextLock(this); while (!this->hidden->isCancelled && @@ -237,14 +227,12 @@ N3DSAUDIO_WaitDevice(_THIS) contextUnlock(this); } -static Uint8 * -N3DSAUDIO_GetDeviceBuf(_THIS) +static Uint8 *N3DSAUDIO_GetDeviceBuf(_THIS) { return this->hidden->mixbuf; } -static void -N3DSAUDIO_CloseDevice(_THIS) +static void N3DSAUDIO_CloseDevice(_THIS) { contextLock(this); @@ -264,8 +252,7 @@ N3DSAUDIO_CloseDevice(_THIS) FreePrivateData(this); } -static void -N3DSAUDIO_ThreadInit(_THIS) +static void N3DSAUDIO_ThreadInit(_THIS) { s32 current_priority; svcGetThreadPriority(¤t_priority, CUR_THREAD_HANDLE); @@ -275,8 +262,7 @@ N3DSAUDIO_ThreadInit(_THIS) svcSetThreadPriority(CUR_THREAD_HANDLE, current_priority); } -static SDL_bool -N3DSAUDIO_Init(SDL_AudioDriverImpl *impl) +static SDL_bool N3DSAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = N3DSAUDIO_OpenDevice; @@ -306,15 +292,14 @@ AudioBootStrap N3DSAUDIO_bootstrap = { /** * Cleans up all allocated memory, safe to call with null pointers */ -static void -FreePrivateData(_THIS) +static void FreePrivateData(_THIS) { if (!this->hidden) { return; } if (this->hidden->waveBuf[0].data_vaddr) { - linearFree((void *) this->hidden->waveBuf[0].data_vaddr); + linearFree((void *)this->hidden->waveBuf[0].data_vaddr); } if (this->hidden->mixbuf) { @@ -326,8 +311,7 @@ FreePrivateData(_THIS) this->hidden = NULL; } -static int -FindAudioFormat(_THIS) +static int FindAudioFormat(_THIS) { SDL_bool found_valid_format = SDL_FALSE; Uint16 test_format = SDL_FirstAudioFormat(this->spec.format); diff --git a/modules/SDL2/src/audio/nacl/SDL_naclaudio.c b/modules/SDL2/src/audio/nacl/SDL_naclaudio.c index aa9d3de..cdb01bc 100644 --- a/modules/SDL2/src/audio/nacl/SDL_naclaudio.c +++ b/modules/SDL2/src/audio/nacl/SDL_naclaudio.c @@ -45,7 +45,8 @@ static void nacl_audio_callback(void* samples, uint32_t buffer_size, PP_TimeDelta latency, void* data); /* FIXME: Make use of latency if needed */ -static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta latency, void* data) { +static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta latency, void* data) +{ const int len = (int) buffer_size; SDL_AudioDevice* _this = (SDL_AudioDevice*) data; SDL_AudioCallback callback = _this->callbackspec.callback; @@ -85,56 +86,56 @@ static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta SDL_UnlockMutex(_this->mixer_lock); } -static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device) { +static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device) +{ const PPB_Core *core = PSInterfaceCore(); const PPB_Audio *ppb_audio = PSInterfaceAudio(); SDL_PrivateAudioData *hidden = (SDL_PrivateAudioData *) device->hidden; - + ppb_audio->StopPlayback(hidden->audio); core->ReleaseResource(hidden->audio); } -static int -NACLAUDIO_OpenDevice(_THIS, const char *devname) { +static int NACLAUDIO_OpenDevice(_THIS, const char *devname) +{ PP_Instance instance = PSGetInstanceId(); const PPB_Audio *ppb_audio = PSInterfaceAudio(); const PPB_AudioConfig *ppb_audiocfg = PSInterfaceAudioConfig(); - - private = (SDL_PrivateAudioData *) SDL_calloc(1, (sizeof *private)); + + private = (SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*private)); if (private == NULL) { return SDL_OutOfMemory(); } - + _this->spec.freq = 44100; _this->spec.format = AUDIO_S16LSB; _this->spec.channels = 2; _this->spec.samples = ppb_audiocfg->RecommendSampleFrameCount( - instance, - PP_AUDIOSAMPLERATE_44100, + instance, + PP_AUDIOSAMPLERATE_44100, SAMPLE_FRAME_COUNT); - + /* Calculate the final parameters for this audio specification */ SDL_CalculateAudioSpec(&_this->spec); - + private->audio = ppb_audio->Create( instance, ppb_audiocfg->CreateStereo16Bit(instance, PP_AUDIOSAMPLERATE_44100, _this->spec.samples), - nacl_audio_callback, + nacl_audio_callback, _this); - + /* Start audio playback while we are still on the main thread. */ ppb_audio->StartPlayback(private->audio); - + return 0; } -static SDL_bool -NACLAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool NACLAUDIO_Init(SDL_AudioDriverImpl * impl) { if (PSGetInstanceId() == 0) { return SDL_FALSE; } - + /* Set the function pointers */ impl->OpenDevice = NACLAUDIO_OpenDevice; impl->CloseDevice = NACLAUDIO_CloseDevice; @@ -146,7 +147,7 @@ NACLAUDIO_Init(SDL_AudioDriverImpl * impl) * impl->PlayDevice = NACLAUDIO_PlayDevice; * impl->Deinitialize = NACLAUDIO_Deinitialize; */ - + return SDL_TRUE; } diff --git a/modules/SDL2/src/audio/nas/SDL_nasaudio.c b/modules/SDL2/src/audio/nas/SDL_nasaudio.c index 0ba7f6a..d680720 100644 --- a/modules/SDL2/src/audio/nas/SDL_nasaudio.c +++ b/modules/SDL2/src/audio/nas/SDL_nasaudio.c @@ -56,8 +56,7 @@ static AuEventHandlerRec *(*NAS_AuRegisterEventHandler) static const char *nas_library = SDL_AUDIO_DRIVER_NAS_DYNAMIC; static void *nas_handle = NULL; -static int -load_nas_sym(const char *fn, void **addr) +static int load_nas_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(nas_handle, fn); if (*addr == NULL) { @@ -73,8 +72,7 @@ load_nas_sym(const char *fn, void **addr) #define SDL_NAS_SYM(x) NAS_##x = x #endif -static int -load_nas_syms(void) +static int load_nas_syms(void) { SDL_NAS_SYM(AuCloseServer); SDL_NAS_SYM(AuNextEvent); @@ -94,8 +92,7 @@ load_nas_syms(void) #ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC -static void -UnloadNASLibrary(void) +static void UnloadNASLibrary(void) { if (nas_handle != NULL) { SDL_UnloadObject(nas_handle); @@ -103,8 +100,7 @@ UnloadNASLibrary(void) } } -static int -LoadNASLibrary(void) +static int LoadNASLibrary(void) { int retval = 0; if (nas_handle == NULL) { @@ -130,13 +126,11 @@ LoadNASLibrary(void) #else -static void -UnloadNASLibrary(void) +static void UnloadNASLibrary(void) { } -static int -LoadNASLibrary(void) +static int LoadNASLibrary(void) { load_nas_syms(); return 0; @@ -145,8 +139,7 @@ LoadNASLibrary(void) #endif /* SDL_AUDIO_DRIVER_NAS_DYNAMIC */ /* This function waits until it is possible to write a full sound buffer */ -static void -NAS_WaitDevice(_THIS) +static void NAS_WaitDevice(_THIS) { while (this->hidden->buf_free < this->hidden->mixlen) { AuEvent ev; @@ -155,8 +148,7 @@ NAS_WaitDevice(_THIS) } } -static void -NAS_PlayDevice(_THIS) +static void NAS_PlayDevice(_THIS) { while (this->hidden->mixlen > this->hidden->buf_free) { /* @@ -182,14 +174,12 @@ NAS_PlayDevice(_THIS) #endif } -static Uint8 * -NAS_GetDeviceBuf(_THIS) +static Uint8 *NAS_GetDeviceBuf(_THIS) { return (this->hidden->mixbuf); } -static int -NAS_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int NAS_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *h = this->hidden; int retval; @@ -197,7 +187,7 @@ NAS_CaptureFromDevice(_THIS, void *buffer, int buflen) while (SDL_TRUE) { /* just keep the event queue moving and the server chattering. */ NAS_AuHandleEvents(h->aud); - + retval = (int) NAS_AuReadElement(h->aud, h->flow, 1, buflen, buffer, NULL); /*printf("read %d capture bytes\n", (int) retval);*/ if (retval == 0) { @@ -210,8 +200,7 @@ NAS_CaptureFromDevice(_THIS, void *buffer, int buflen) return retval; } -static void -NAS_FlushCapture(_THIS) +static void NAS_FlushCapture(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; AuUint32 total = 0; @@ -221,14 +210,13 @@ NAS_FlushCapture(_THIS) do { /* just keep the event queue moving and the server chattering. */ NAS_AuHandleEvents(h->aud); - br = NAS_AuReadElement(h->aud, h->flow, 1, sizeof (buf), buf, NULL); + br = NAS_AuReadElement(h->aud, h->flow, 1, sizeof(buf), buf, NULL); /*printf("flushed %d capture bytes\n", (int) br);*/ total += br; - } while ((br == sizeof (buf)) && (total < this->spec.size)); + } while ((br == sizeof(buf)) && (total < this->spec.size)); } -static void -NAS_CloseDevice(_THIS) +static void NAS_CloseDevice(_THIS) { if (this->hidden->aud) { NAS_AuCloseServer(this->hidden->aud); @@ -237,8 +225,7 @@ NAS_CloseDevice(_THIS) SDL_free(this->hidden); } -static AuBool -event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd) +static AuBool event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd) { SDL_AudioDevice *this = (SDL_AudioDevice *) hnd->data; struct SDL_PrivateAudioData *h = this->hidden; @@ -281,8 +268,7 @@ event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd) return AuTrue; } -static AuDeviceID -find_device(_THIS) +static AuDeviceID find_device(_THIS) { /* These "Au" things are all macros, not functions... */ struct SDL_PrivateAudioData *h = this->hidden; @@ -310,8 +296,7 @@ find_device(_THIS) return AuNone; } -static int -NAS_OpenDevice(_THIS, const char *devname) +static int NAS_OpenDevice(_THIS, const char *devname) { AuElement elms[3]; int buffer_size; @@ -319,8 +304,7 @@ NAS_OpenDevice(_THIS, const char *devname) SDL_AudioFormat test_format, format = 0; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -415,14 +399,12 @@ NAS_OpenDevice(_THIS, const char *devname) return 0; } -static void -NAS_Deinitialize(void) +static void NAS_Deinitialize(void) { UnloadNASLibrary(); } -static SDL_bool -NAS_Init(SDL_AudioDriverImpl * impl) +static SDL_bool NAS_Init(SDL_AudioDriverImpl * impl) { if (LoadNASLibrary() < 0) { return SDL_FALSE; diff --git a/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.c b/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.c index 4263684..d90f28a 100644 --- a/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.c +++ b/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.c @@ -45,15 +45,12 @@ /* #define DEBUG_AUDIO */ -static void -NETBSDAUDIO_DetectDevices(void) +static void NETBSDAUDIO_DetectDevices(void) { SDL_EnumUnixAudioDevices(0, NULL); } - -static void -NETBSDAUDIO_Status(_THIS) +static void NETBSDAUDIO_Status(_THIS) { #ifdef DEBUG_AUDIO /* *INDENT-OFF* */ /* clang-format off */ @@ -119,12 +116,11 @@ NETBSDAUDIO_Status(_THIS) this->spec.format, this->spec.size); /* *INDENT-ON* */ /* clang-format on */ + #endif /* DEBUG_AUDIO */ } - -static void -NETBSDAUDIO_PlayDevice(_THIS) +static void NETBSDAUDIO_PlayDevice(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; int written; @@ -143,17 +139,14 @@ NETBSDAUDIO_PlayDevice(_THIS) #endif } -static Uint8 * -NETBSDAUDIO_GetDeviceBuf(_THIS) +static Uint8 *NETBSDAUDIO_GetDeviceBuf(_THIS) { - return (this->hidden->mixbuf); + return this->hidden->mixbuf; } - -static int -NETBSDAUDIO_CaptureFromDevice(_THIS, void *_buffer, int buflen) +static int NETBSDAUDIO_CaptureFromDevice(_THIS, void *_buffer, int buflen) { - Uint8 *buffer = (Uint8 *) _buffer; + Uint8 *buffer = (Uint8 *)_buffer; int br; br = read(this->hidden->audio_fd, buffer, buflen); @@ -169,30 +162,28 @@ NETBSDAUDIO_CaptureFromDevice(_THIS, void *_buffer, int buflen) return 0; } -static void -NETBSDAUDIO_FlushCapture(_THIS) +static void NETBSDAUDIO_FlushCapture(_THIS) { audio_info_t info; size_t remain; Uint8 buf[512]; if (ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info) < 0) { - return; /* oh well. */ + return; /* oh well. */ } - remain = (size_t) (info.record.samples * (SDL_AUDIO_BITSIZE(this->spec.format) / 8)); + remain = (size_t)(info.record.samples * (SDL_AUDIO_BITSIZE(this->spec.format) / 8)); while (remain > 0) { - const size_t len = SDL_min(sizeof (buf), remain); + const size_t len = SDL_min(sizeof(buf), remain); const int br = read(this->hidden->audio_fd, buf, len); if (br <= 0) { - return; /* oh well. */ + return; /* oh well. */ } remain -= br; } } -static void -NETBSDAUDIO_CloseDevice(_THIS) +static void NETBSDAUDIO_CloseDevice(_THIS) { if (this->hidden->audio_fd >= 0) { close(this->hidden->audio_fd); @@ -201,8 +192,7 @@ NETBSDAUDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -NETBSDAUDIO_OpenDevice(_THIS, const char *devname) +static int NETBSDAUDIO_OpenDevice(_THIS, const char *devname) { SDL_bool iscapture = this->iscapture; SDL_AudioFormat test_format; @@ -220,8 +210,7 @@ NETBSDAUDIO_OpenDevice(_THIS, const char *devname) } /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -241,8 +230,7 @@ NETBSDAUDIO_OpenDevice(_THIS, const char *devname) * Use the device's native sample rate so the kernel doesn't have to * resample. */ - this->spec.freq = iscapture ? - hwinfo.record.sample_rate : hwinfo.play.sample_rate; + this->spec.freq = iscapture ? hwinfo.record.sample_rate : hwinfo.play.sample_rate; } #endif @@ -307,7 +295,7 @@ NETBSDAUDIO_OpenDevice(_THIS, const char *devname) if (!iscapture) { /* Allocate mixing buffer */ this->hidden->mixlen = this->spec.size; - this->hidden->mixbuf = (Uint8 *) SDL_malloc(this->hidden->mixlen); + this->hidden->mixbuf = (Uint8 *)SDL_malloc(this->hidden->mixlen); if (this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -320,8 +308,7 @@ NETBSDAUDIO_OpenDevice(_THIS, const char *devname) return 0; } -static SDL_bool -NETBSDAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool NETBSDAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->DetectDevices = NETBSDAUDIO_DetectDevices; @@ -335,10 +322,9 @@ NETBSDAUDIO_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->AllowsArbitraryDeviceNames = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } - AudioBootStrap NETBSDAUDIO_bootstrap = { "netbsd", "NetBSD audio", NETBSDAUDIO_Init, SDL_FALSE }; diff --git a/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.h b/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.h index 3ed649f..c863bb5 100644 --- a/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.h +++ b/modules/SDL2/src/audio/netbsd/SDL_netbsdaudio.h @@ -25,7 +25,7 @@ #include "../SDL_sysaudio.h" -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -41,7 +41,7 @@ struct SDL_PrivateAudioData float next_frame; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* SDL_netbsdaudio_h_ */ diff --git a/modules/SDL2/src/audio/openslES/SDL_openslES.c b/modules/SDL2/src/audio/openslES/SDL_openslES.c index 48c919c..998104c 100644 --- a/modules/SDL2/src/audio/openslES/SDL_openslES.c +++ b/modules/SDL2/src/audio/openslES/SDL_openslES.c @@ -38,9 +38,9 @@ #include #if 0 -#define LOG_TAG "SDL_openslES" -#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) -#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) +#define LOG_TAG "SDL_openslES" +#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) +#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) //#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,LOG_TAG,__VA_ARGS__) #define LOGV(...) #else @@ -70,9 +70,9 @@ #define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000) */ #define SL_ANDROID_SPEAKER_STEREO (SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT) -#define SL_ANDROID_SPEAKER_QUAD (SL_ANDROID_SPEAKER_STEREO | SL_SPEAKER_BACK_LEFT | SL_SPEAKER_BACK_RIGHT) -#define SL_ANDROID_SPEAKER_5DOT1 (SL_ANDROID_SPEAKER_QUAD | SL_SPEAKER_FRONT_CENTER | SL_SPEAKER_LOW_FREQUENCY) -#define SL_ANDROID_SPEAKER_7DOT1 (SL_ANDROID_SPEAKER_5DOT1 | SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT) +#define SL_ANDROID_SPEAKER_QUAD (SL_ANDROID_SPEAKER_STEREO | SL_SPEAKER_BACK_LEFT | SL_SPEAKER_BACK_RIGHT) +#define SL_ANDROID_SPEAKER_5DOT1 (SL_ANDROID_SPEAKER_QUAD | SL_SPEAKER_FRONT_CENTER | SL_SPEAKER_LOW_FREQUENCY) +#define SL_ANDROID_SPEAKER_7DOT1 (SL_ANDROID_SPEAKER_5DOT1 | SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT) /* engine interfaces */ static SLObjectItf engineObject = NULL; @@ -98,8 +98,8 @@ static SLAndroidSimpleBufferQueueItf recorderBufferQueue = NULL; static const char *sldevaudiorecorderstr = "SLES Audio Recorder"; static const char *sldevaudioplayerstr = "SLES Audio Player"; -#define SLES_DEV_AUDIO_RECORDER sldevaudiorecorderstr -#define SLES_DEV_AUDIO_PLAYER sldevaudioplayerstr +#define SLES_DEV_AUDIO_RECORDER sldevaudiorecorderstr +#define SLES_DEV_AUDIO_PLAYER sldevaudioplayerstr static void openslES_DetectDevices( int iscapture ) { LOGI( "openSLES_DetectDevices()" ); @@ -128,8 +128,7 @@ static void openslES_DestroyEngine(void) } } -static int -openslES_CreateEngine(void) +static int openslES_CreateEngine(void) { const SLInterfaceID ids[1] = { SL_IID_VOLUME }; const SLboolean req[1] = { SL_BOOLEAN_FALSE }; @@ -183,17 +182,15 @@ error: } /* this callback handler is called every time a buffer finishes recording */ -static void -bqRecorderCallback(SLAndroidSimpleBufferQueueItf bq, void *context) +static void bqRecorderCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { - struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context; + struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *)context; LOGV("SLES: Recording Callback"); SDL_SemPost(audiodata->playsem); } -static void -openslES_DestroyPCMRecorder(_THIS) +static void openslES_DestroyPCMRecorder(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLresult result; @@ -224,8 +221,7 @@ openslES_DestroyPCMRecorder(_THIS) } } -static int -openslES_CreatePCMRecorder(_THIS) +static int openslES_CreatePCMRecorder(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLDataFormat_PCM format_pcm; @@ -252,8 +248,8 @@ openslES_CreatePCMRecorder(_THIS) SDL_CalculateAudioSpec(&this->spec); LOGI("Try to open %u hz %u bit chan %u %s samples %u", - this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), - this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); + this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format), + this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); /* configure audio source */ loc_dev.locatorType = SL_DATALOCATOR_IODEVICE; @@ -267,13 +263,13 @@ openslES_CreatePCMRecorder(_THIS) loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; loc_bufq.numBuffers = NUM_BUFFERS; - format_pcm.formatType = SL_DATAFORMAT_PCM; - format_pcm.numChannels = this->spec.channels; - format_pcm.samplesPerSec = this->spec.freq * 1000; /* / kilo Hz to milli Hz */ + format_pcm.formatType = SL_DATAFORMAT_PCM; + format_pcm.numChannels = this->spec.channels; + format_pcm.samplesPerSec = this->spec.freq * 1000; /* / kilo Hz to milli Hz */ format_pcm.bitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format); format_pcm.containerSize = SDL_AUDIO_BITSIZE(this->spec.format); - format_pcm.endianness = SL_BYTEORDER_LITTLEENDIAN; - format_pcm.channelMask = SL_SPEAKER_FRONT_CENTER; + format_pcm.endianness = SL_BYTEORDER_LITTLEENDIAN; + format_pcm.channelMask = SL_SPEAKER_FRONT_CENTER; audioSnk.pLocator = &loc_bufq; audioSnk.pFormat = &format_pcm; @@ -323,7 +319,7 @@ openslES_CreatePCMRecorder(_THIS) } /* Create the sound buffers */ - audiodata->mixbuff = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size); + audiodata->mixbuff = (Uint8 *)SDL_malloc(NUM_BUFFERS * this->spec.size); if (audiodata->mixbuff == NULL) { LOGE("mixbuffer allocate - out of memory"); goto failed; @@ -363,17 +359,15 @@ failed: } /* this callback handler is called every time a buffer finishes playing */ -static void -bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) +static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { - struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context; + struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *)context; LOGV("SLES: Playback Callback"); SDL_SemPost(audiodata->playsem); } -static void -openslES_DestroyPCMPlayer(_THIS) +static void openslES_DestroyPCMPlayer(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLresult result; @@ -405,8 +399,7 @@ openslES_DestroyPCMPlayer(_THIS) } } -static int -openslES_CreatePCMPlayer(_THIS) +static int openslES_CreatePCMPlayer(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLDataLocator_AndroidSimpleBufferQueue loc_bufq; @@ -424,7 +417,7 @@ openslES_CreatePCMPlayer(_THIS) it can be done as described here: https://developer.android.com/ndk/guides/audio/opensl/android-extensions.html#floating-point */ - if(SDL_GetAndroidSDKVersion() >= 21) { + if (SDL_GetAndroidSDKVersion() >= 21) { SDL_AudioFormat test_format; for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) { if (SDL_AUDIO_ISSIGNED(test_format)) { @@ -434,7 +427,7 @@ openslES_CreatePCMPlayer(_THIS) if (!test_format) { /* Didn't find a compatible format : */ - LOGI( "No compatible audio format, using signed 16-bit audio" ); + LOGI("No compatible audio format, using signed 16-bit audio"); test_format = AUDIO_S16SYS; } this->spec.format = test_format; @@ -447,16 +440,16 @@ openslES_CreatePCMPlayer(_THIS) SDL_CalculateAudioSpec(&this->spec); LOGI("Try to open %u hz %s %u bit chan %u %s samples %u", - this->spec.freq, SDL_AUDIO_ISFLOAT(this->spec.format) ? "float" : "pcm", SDL_AUDIO_BITSIZE(this->spec.format), - this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); + this->spec.freq, SDL_AUDIO_ISFLOAT(this->spec.format) ? "float" : "pcm", SDL_AUDIO_BITSIZE(this->spec.format), + this->spec.channels, (this->spec.format & 0x1000) ? "BE" : "LE", this->spec.samples); /* configure audio source */ loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; loc_bufq.numBuffers = NUM_BUFFERS; - format_pcm.formatType = SL_DATAFORMAT_PCM; - format_pcm.numChannels = this->spec.channels; - format_pcm.samplesPerSec = this->spec.freq * 1000; /* / kilo Hz to milli Hz */ + format_pcm.formatType = SL_DATAFORMAT_PCM; + format_pcm.numChannels = this->spec.channels; + format_pcm.samplesPerSec = this->spec.freq * 1000; /* / kilo Hz to milli Hz */ format_pcm.bitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format); format_pcm.containerSize = SDL_AUDIO_BITSIZE(this->spec.format); @@ -466,8 +459,7 @@ openslES_CreatePCMPlayer(_THIS) format_pcm.endianness = SL_BYTEORDER_LITTLEENDIAN; } - switch (this->spec.channels) - { + switch (this->spec.channels) { case 1: format_pcm.channelMask = SL_SPEAKER_FRONT_LEFT; break; @@ -499,7 +491,7 @@ openslES_CreatePCMPlayer(_THIS) break; } - if(SDL_AUDIO_ISFLOAT(this->spec.format)) { + if (SDL_AUDIO_ISFLOAT(this->spec.format)) { /* Copy all setup into PCM EX structure */ format_pcm_ex.formatType = SL_ANDROID_DATAFORMAT_PCM_EX; format_pcm_ex.endianness = format_pcm.endianness; @@ -512,7 +504,7 @@ openslES_CreatePCMPlayer(_THIS) } audioSrc.pLocator = &loc_bufq; - audioSrc.pFormat = SDL_AUDIO_ISFLOAT(this->spec.format) ? (void*)&format_pcm_ex : (void*)&format_pcm; + audioSrc.pFormat = SDL_AUDIO_ISFLOAT(this->spec.format) ? (void *)&format_pcm_ex : (void *)&format_pcm; /* configure audio sink */ loc_outmix.locatorType = SL_DATALOCATOR_OUTPUTMIX; @@ -573,7 +565,7 @@ openslES_CreatePCMPlayer(_THIS) } /* Create the sound buffers */ - audiodata->mixbuff = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size); + audiodata->mixbuff = (Uint8 *)SDL_malloc(NUM_BUFFERS * this->spec.size); if (audiodata->mixbuff == NULL) { LOGE("mixbuffer allocate - out of memory"); goto failed; @@ -596,10 +588,9 @@ failed: return -1; } -static int -openslES_OpenDevice(_THIS, const char *devname) +static int openslES_OpenDevice(_THIS, const char *devname) { - this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, (sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_calloc(1, sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -625,12 +616,10 @@ openslES_OpenDevice(_THIS, const char *devname) } else { return SDL_SetError("Open device failed!"); } - } } -static void -openslES_WaitDevice(_THIS) +static void openslES_WaitDevice(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; @@ -640,8 +629,7 @@ openslES_WaitDevice(_THIS) SDL_SemWait(audiodata->playsem); } -static void -openslES_PlayDevice(_THIS) +static void openslES_PlayDevice(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLresult result; @@ -675,8 +663,7 @@ openslES_PlayDevice(_THIS) /* */ /* okay.. */ -static Uint8 * -openslES_GetDeviceBuf(_THIS) +static Uint8 *openslES_GetDeviceBuf(_THIS) { struct SDL_PrivateAudioData *audiodata = this->hidden; @@ -684,8 +671,7 @@ openslES_GetDeviceBuf(_THIS) return audiodata->pmixbuff[audiodata->next_buffer]; } -static int -openslES_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int openslES_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *audiodata = this->hidden; SLresult result; @@ -712,8 +698,7 @@ openslES_CaptureFromDevice(_THIS, void *buffer, int buflen) return this->spec.size; } -static void -openslES_CloseDevice(_THIS) +static void openslES_CloseDevice(_THIS) { /* struct SDL_PrivateAudioData *audiodata = this->hidden; */ @@ -728,8 +713,7 @@ openslES_CloseDevice(_THIS) SDL_free(this->hidden); } -static SDL_bool -openslES_Init(SDL_AudioDriverImpl * impl) +static SDL_bool openslES_Init(SDL_AudioDriverImpl *impl) { LOGI("openslES_Init() called"); @@ -741,13 +725,13 @@ openslES_Init(SDL_AudioDriverImpl * impl) /* Set the function pointers */ /* impl->DetectDevices = openslES_DetectDevices; */ - impl->OpenDevice = openslES_OpenDevice; - impl->WaitDevice = openslES_WaitDevice; - impl->PlayDevice = openslES_PlayDevice; - impl->GetDeviceBuf = openslES_GetDeviceBuf; + impl->OpenDevice = openslES_OpenDevice; + impl->WaitDevice = openslES_WaitDevice; + impl->PlayDevice = openslES_PlayDevice; + impl->GetDeviceBuf = openslES_GetDeviceBuf; impl->CaptureFromDevice = openslES_CaptureFromDevice; - impl->CloseDevice = openslES_CloseDevice; - impl->Deinitialize = openslES_DestroyEngine; + impl->CloseDevice = openslES_CloseDevice; + impl->Deinitialize = openslES_DestroyEngine; /* and the capabilities */ impl->HasCaptureSupport = SDL_TRUE; diff --git a/modules/SDL2/src/audio/openslES/SDL_openslES.h b/modules/SDL2/src/audio/openslES/SDL_openslES.h index f5bef08..01464b7 100644 --- a/modules/SDL2/src/audio/openslES/SDL_openslES.h +++ b/modules/SDL2/src/audio/openslES/SDL_openslES.h @@ -26,15 +26,15 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this -#define NUM_BUFFERS 2 /* -- Don't lower this! */ +#define NUM_BUFFERS 2 /* -- Don't lower this! */ struct SDL_PrivateAudioData { - Uint8 *mixbuff; - int next_buffer; - Uint8 *pmixbuff[NUM_BUFFERS]; + Uint8 *mixbuff; + int next_buffer; + Uint8 *pmixbuff[NUM_BUFFERS]; SDL_sem *playsem; }; diff --git a/modules/SDL2/src/audio/os2/SDL_os2audio.c b/modules/SDL2/src/audio/os2/SDL_os2audio.c index ec17255..2f1e6bc 100644 --- a/modules/SDL2/src/audio/os2/SDL_os2audio.c +++ b/modules/SDL2/src/audio/os2/SDL_os2audio.c @@ -30,17 +30,12 @@ #include "../SDL_audio_c.h" #include "SDL_os2audio.h" -/* -void lockIncr(volatile int *piVal); -#pragma aux lockIncr = \ - "lock add [eax], 1 "\ - parm [eax]; - -void lockDecr(volatile int *piVal); -#pragma aux lockDecr = \ - "lock sub [eax], 1 "\ - parm [eax]; -*/ +static PMCI_MIX_BUFFER _getNextBuffer(SDL_PrivateAudioData *pAData, PMCI_MIX_BUFFER pBuffer) +{ + PMCI_MIX_BUFFER pFirstBuffer = &pAData->aMixBuffers[0]; + PMCI_MIX_BUFFER pLastBuffer = &pAData->aMixBuffers[pAData->cMixBuffers -1]; + return (pBuffer == pLastBuffer ? pFirstBuffer : pBuffer+1); +} static ULONG _getEnvULong(const char *name, ULONG ulMax, ULONG ulDefault) { @@ -64,7 +59,7 @@ static int _MCIError(const char *func, ULONG ulResult) static void _mixIOError(const char *function, ULONG ulRC) { - debug_os2("%s() - failed, rc = 0x%X (%s)", + debug_os2("%s() - failed, rc = 0x%lX (%s)", function, ulRC, (ulRC == MCIERR_INVALID_MODE) ? "Mixer mode does not match request" : (ulRC == MCIERR_INVALID_BUFFER) ? "Caller sent an invalid buffer" : "unknown"); @@ -73,18 +68,33 @@ static void _mixIOError(const char *function, ULONG ulRC) static LONG APIENTRY cbAudioWriteEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags) { - SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)pBuffer->ulUserParm; + SDL_AudioDevice *_this = (SDL_AudioDevice *)pBuffer->ulUserParm; + SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; ULONG ulRC; + debug_os2("cbAudioWriteEvent: ulStatus = %lu, pBuffer = %p, ulFlags = %#lX",ulStatus,pBuffer,ulFlags); + + if (pAData->ulState == 2) + { + return 0; + } + if (ulFlags != MIX_WRITE_COMPLETE) { - debug_os2("flags = 0x%X", ulFlags); + debug_os2("flags = 0x%lX", ulFlags); + return 0; + } + + pAData->pDrainBuffer = pBuffer; + ulRC = pAData->stMCIMixSetup.pmixWrite(pAData->stMCIMixSetup.ulMixHandle, + pAData->pDrainBuffer, 1); + if (ulRC != MCIERR_SUCCESS) { + _mixIOError("pmixWrite", ulRC); return 0; } - /*lockDecr((int *)&pAData->ulQueuedBuf);*/ ulRC = DosPostEventSem(pAData->hevBuf); if (ulRC != NO_ERROR && ulRC != ERROR_ALREADY_POSTED) { - debug_os2("DosPostEventSem(), rc = %u", ulRC); + debug_os2("DosPostEventSem(), rc = %lu", ulRC); } return 1; /* return value doesn't seem to matter. */ @@ -93,19 +103,36 @@ static LONG APIENTRY cbAudioWriteEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, static LONG APIENTRY cbAudioReadEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags) { - SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)pBuffer->ulUserParm; + SDL_AudioDevice *_this = (SDL_AudioDevice *)pBuffer->ulUserParm; + SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; ULONG ulRC; + debug_os2("cbAudioReadEvent: ulStatus = %lu, pBuffer = %p, ulFlags = %#lX",ulStatus,pBuffer,ulFlags); + + if (pAData->ulState == 2) + { + return 0; + } + if (ulFlags != MIX_READ_COMPLETE) { - debug_os2("flags = 0x%X", ulFlags); + debug_os2("flags = 0x%lX", ulFlags); return 0; } - pAData->stMCIMixSetup.pmixRead(pAData->stMCIMixSetup.ulMixHandle, pBuffer, 1); + pAData->pFillBuffer = pBuffer; + if (pAData->pFillBuffer == pAData->aMixBuffers) + { + ulRC = pAData->stMCIMixSetup.pmixRead(pAData->stMCIMixSetup.ulMixHandle, + pAData->pFillBuffer, pAData->cMixBuffers); + if (ulRC != MCIERR_SUCCESS) { + _mixIOError("pmixRead", ulRC); + return 0; + } + } ulRC = DosPostEventSem(pAData->hevBuf); if (ulRC != NO_ERROR && ulRC != ERROR_ALREADY_POSTED) { - debug_os2("DosPostEventSem(), rc = %u", ulRC); + debug_os2("DosPostEventSem(), rc = %lu", ulRC); } return 1; @@ -120,31 +147,36 @@ static void OS2_DetectDevices(void) MCI_SYSINFO_LOGDEVICE stLogDevice; MCI_SYSINFO_PARMS stSysInfoParams; ULONG ulRC; - ULONG ulHandle = 0; + ULONG ulNumber; + MCI_GETDEVCAPS_PARMS stDevCapsParams; + MCI_OPEN_PARMS stMCIOpen; + MCI_GENERIC_PARMS stMCIGenericParams; + SDL_memset(&stMCISysInfo, 0, sizeof(stMCISysInfo)); acBuf[0] = '\0'; stMCISysInfo.pszReturn = acBuf; stMCISysInfo.ulRetSize = sizeof(acBuf); stMCISysInfo.usDeviceType = MCI_DEVTYPE_AUDIO_AMPMIX; ulRC = mciSendCommand(0, MCI_SYSINFO, MCI_WAIT | MCI_SYSINFO_QUANTITY, &stMCISysInfo, 0); - if (ulRC != NO_ERROR) { - debug_os2("MCI_SYSINFO, MCI_SYSINFO_QUANTITY - failed, rc = 0x%X", ulRC); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_SYSINFO, MCI_SYSINFO_QUANTITY - failed, rc = 0x%hX", LOUSHORT(ulRC)); return; } ulDevicesNum = SDL_strtoul(stMCISysInfo.pszReturn, NULL, 10); - for (stSysInfoParams.ulNumber = 0; stSysInfoParams.ulNumber < ulDevicesNum; - stSysInfoParams.ulNumber++) { + for (ulNumber = 1; ulNumber <= ulDevicesNum; + ulNumber++) { /* Get device install name. */ + stSysInfoParams.ulNumber = ulNumber; stSysInfoParams.pszReturn = acBuf; stSysInfoParams.ulRetSize = sizeof(acBuf); stSysInfoParams.usDeviceType = MCI_DEVTYPE_AUDIO_AMPMIX; ulRC = mciSendCommand(0, MCI_SYSINFO, MCI_WAIT | MCI_SYSINFO_INSTALLNAME, &stSysInfoParams, 0); - if (ulRC != NO_ERROR) { - debug_os2("MCI_SYSINFO, MCI_SYSINFO_INSTALLNAME - failed, rc = 0x%X", ulRC); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_SYSINFO, MCI_SYSINFO_INSTALLNAME - failed, rc = 0x%hX", LOUSHORT(ulRC)); continue; } @@ -154,15 +186,45 @@ static void OS2_DetectDevices(void) SDL_strlcpy(stLogDevice.szInstallName, stSysInfoParams.pszReturn, MAX_DEVICE_NAME); ulRC = mciSendCommand(0, MCI_SYSINFO, MCI_WAIT | MCI_SYSINFO_ITEM, &stSysInfoParams, 0); - if (ulRC != NO_ERROR) { - debug_os2("MCI_SYSINFO, MCI_SYSINFO_ITEM - failed, rc = 0x%X", ulRC); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_SYSINFO, MCI_SYSINFO_ITEM - failed, rc = 0x%hX", LOUSHORT(ulRC)); continue; } - ulHandle++; - SDL_AddAudioDevice(0, stLogDevice.szProductInfo, NULL, (void *)(ulHandle)); - ulHandle++; - SDL_AddAudioDevice(1, stLogDevice.szProductInfo, NULL, (void *)(ulHandle)); + SDL_AddAudioDevice(0, stLogDevice.szProductInfo, NULL, (void *)ulNumber); + + /* Open audio device for querying its capabilities */ + /* at this point we HAVE TO OPEN the waveaudio device and not the ampmix device */ + /* because only the waveaudio device (tied to the ampmix device) supports querying for playback/record capability */ + SDL_memset(&stMCIOpen, 0, sizeof(stMCIOpen)); + stMCIOpen.pszDeviceType = (PSZ)MAKEULONG(MCI_DEVTYPE_WAVEFORM_AUDIO,LOUSHORT(ulNumber)); + ulRC = mciSendCommand(0, MCI_OPEN,MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,&stMCIOpen, 0); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_OPEN (getDevCaps) - failed"); + continue; + } + + /* check for recording capability */ + SDL_memset(&stDevCapsParams, 0, sizeof(stDevCapsParams)); + stDevCapsParams.ulItem = MCI_GETDEVCAPS_CAN_RECORD; + ulRC = mciSendCommand(stMCIOpen.usDeviceID, MCI_GETDEVCAPS, MCI_WAIT | MCI_GETDEVCAPS_ITEM, + &stDevCapsParams, 0); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_GETDEVCAPS, MCI_GETDEVCAPS_ITEM - failed, rc = 0x%hX", LOUSHORT(ulRC)); + } + else { + if (stDevCapsParams.ulReturn) { + SDL_AddAudioDevice(1, stLogDevice.szProductInfo, NULL, (void *)(ulNumber | 0x80000000)); + } + } + + /* close the audio device, we are done querying its capabilities */ + SDL_memset(&stMCIGenericParams, 0, sizeof(stMCIGenericParams)); + ulRC = mciSendCommand(stMCIOpen.usDeviceID, MCI_CLOSE, MCI_WAIT, + &stMCIGenericParams, 0); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_CLOSE (getDevCaps) - failed"); + } } } @@ -171,52 +233,145 @@ static void OS2_WaitDevice(_THIS) SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; ULONG ulRC; + debug_os2("Enter"); + /* Wait for an audio chunk to finish */ ulRC = DosWaitEventSem(pAData->hevBuf, 5000); if (ulRC != NO_ERROR) { - debug_os2("DosWaitEventSem(), rc = %u", ulRC); + debug_os2("DosWaitEventSem(), rc = %lu", ulRC); } } static Uint8 *OS2_GetDeviceBuf(_THIS) { SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; - return (Uint8 *) pAData->aMixBuffers[pAData->ulNextBuf].pBuffer; + + debug_os2("Enter"); + + return (Uint8 *) pAData->pFillBuffer->pBuffer; } static void OS2_PlayDevice(_THIS) { SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; ULONG ulRC; - PMCI_MIX_BUFFER pMixBuffer = &pAData->aMixBuffers[pAData->ulNextBuf]; + PMCI_MIX_BUFFER pMixBuffer = NULL; + + debug_os2("Enter"); + + pMixBuffer = pAData->pDrainBuffer; + pAData->pFillBuffer = _getNextBuffer(pAData, pAData->pFillBuffer); + if (!pAData->ulState && pAData->pFillBuffer != pMixBuffer) + { + /* + * this buffer was filled but we have not yet filled all buffers + * so just signal event sem so that OS2_WaitDevice does not need + * to block + */ + ulRC = DosPostEventSem(pAData->hevBuf); + } - /* Queue it up */ - /*lockIncr((int *)&pAData->ulQueuedBuf);*/ - ulRC = pAData->stMCIMixSetup.pmixWrite(pAData->stMCIMixSetup.ulMixHandle, - pMixBuffer, 1); - if (ulRC != MCIERR_SUCCESS) { - _mixIOError("pmixWrite", ulRC); - } else { - pAData->ulNextBuf = (pAData->ulNextBuf + 1) % pAData->cMixBuffers; + if (!pAData->ulState && (pAData->pFillBuffer == pMixBuffer) ) + { + debug_os2("!hasStarted"); + pAData->ulState = 1; + + /* Write buffers to kick off the amp mixer */ + ulRC = pAData->stMCIMixSetup.pmixWrite(pAData->stMCIMixSetup.ulMixHandle, + pMixBuffer, pAData->cMixBuffers); + + if (ulRC != MCIERR_SUCCESS) { + _mixIOError("pmixWrite", ulRC); + } } } +static int OS2_CaptureFromDevice(_THIS,void *buffer,int buflen) +{ + SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; + ULONG ulRC; + PMCI_MIX_BUFFER pMixBuffer = NULL; + int len = 0; + + if (!pAData->ulState) + { + pAData->ulState = 1; + ulRC = pAData->stMCIMixSetup.pmixRead(pAData->stMCIMixSetup.ulMixHandle, + pAData->aMixBuffers, pAData->cMixBuffers); + if (ulRC != MCIERR_SUCCESS) { + _mixIOError("pmixRead", ulRC); + return -1; + } + } + + /* Wait for an audio chunk to finish */ + ulRC = DosWaitEventSem(pAData->hevBuf, 5000); + if (ulRC != NO_ERROR) + { + debug_os2("DosWaitEventSem(), rc = %lu", ulRC); + return -1; + } + + pMixBuffer = pAData->pDrainBuffer; + len = SDL_min((int)pMixBuffer->ulBufferLength, buflen); + SDL_memcpy(buffer,pMixBuffer->pBuffer, len); + pAData->pDrainBuffer = _getNextBuffer(pAData, pMixBuffer); + + debug_os2("buflen = %u, ulBufferLength = %lu",buflen,pMixBuffer->ulBufferLength); + + return len; +} + +static void OS2_FlushCapture(_THIS) +{ + SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; + ULONG ulIdx; + + debug_os2("Enter"); + + /* Fill all device buffers with data */ + for (ulIdx = 0; ulIdx < pAData->cMixBuffers; ulIdx++) { + pAData->aMixBuffers[ulIdx].ulFlags = 0; + pAData->aMixBuffers[ulIdx].ulBufferLength = _this->spec.size; + pAData->aMixBuffers[ulIdx].ulUserParm = (ULONG)_this; + + SDL_memset(((PMCI_MIX_BUFFER)pAData->aMixBuffers)[ulIdx].pBuffer, + _this->spec.silence, _this->spec.size); + } + pAData->pFillBuffer = pAData->aMixBuffers; + pAData->pDrainBuffer = pAData->aMixBuffers; +} + + static void OS2_CloseDevice(_THIS) { SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)_this->hidden; MCI_GENERIC_PARMS sMCIGenericParms; ULONG ulRC; + debug_os2("Enter"); + if (pAData == NULL) return; + pAData->ulState = 2; + /* Close up audio */ if (pAData->usDeviceId != (USHORT)~0) { /* Device is open. */ + SDL_zero(sMCIGenericParms); + + ulRC = mciSendCommand(pAData->usDeviceId, MCI_STOP, + MCI_WAIT, + &sMCIGenericParms, 0); + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + debug_os2("MCI_STOP - failed" ); + } + if (pAData->stMCIMixSetup.ulBitsPerSample != 0) { /* Mixer was initialized. */ ulRC = mciSendCommand(pAData->usDeviceId, MCI_MIXSETUP, MCI_WAIT | MCI_MIXSETUP_DEINIT, &pAData->stMCIMixSetup, 0); - if (ulRC != MCIERR_SUCCESS) { + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { debug_os2("MCI_MIXSETUP, MCI_MIXSETUP_DEINIT - failed"); } } @@ -230,14 +385,14 @@ static void OS2_CloseDevice(_THIS) ulRC = mciSendCommand(pAData->usDeviceId, MCI_BUFFER, MCI_WAIT | MCI_DEALLOCATE_MEMORY, &stMCIBuffer, 0); - if (ulRC != MCIERR_SUCCESS) { + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { debug_os2("MCI_BUFFER, MCI_DEALLOCATE_MEMORY - failed"); } } ulRC = mciSendCommand(pAData->usDeviceId, MCI_CLOSE, MCI_WAIT, &sMCIGenericParms, 0); - if (ulRC != MCIERR_SUCCESS) { + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { debug_os2("MCI_CLOSE - failed"); } } @@ -257,6 +412,7 @@ static int OS2_OpenDevice(_THIS, const char *devname) ULONG ulRC; ULONG ulIdx; BOOL new_freq; + ULONG ulHandle = (ULONG)_this->handle; SDL_bool iscapture = _this->iscapture; new_freq = FALSE; @@ -279,20 +435,21 @@ static int OS2_OpenDevice(_THIS, const char *devname) ulRC = DosCreateEventSem(NULL, &pAData->hevBuf, DCE_AUTORESET, TRUE); if (ulRC != NO_ERROR) { - debug_os2("DosCreateEventSem() failed, rc = %u", ulRC); + debug_os2("DosCreateEventSem() failed, rc = %lu", ulRC); return -1; } /* Open audio device */ - stMCIAmpOpen.usDeviceID = (_this->handle != NULL) ? ((ULONG)_this->handle - 1) : 0; - stMCIAmpOpen.pszDeviceType = (PSZ)MCI_DEVTYPE_AUDIO_AMPMIX; + stMCIAmpOpen.usDeviceID = 0; + stMCIAmpOpen.pszDeviceType = (PSZ)MAKEULONG(MCI_DEVTYPE_AUDIO_AMPMIX,LOUSHORT(ulHandle)); ulRC = mciSendCommand(0, MCI_OPEN, (_getEnvULong("SDL_AUDIO_SHARE", 1, 0) != 0)? MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE : MCI_WAIT | MCI_OPEN_TYPE_ID, &stMCIAmpOpen, 0); - if (ulRC != MCIERR_SUCCESS) { - stMCIAmpOpen.usDeviceID = (USHORT)~0; + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { + DosCloseEventSem(pAData->hevBuf); + pAData->usDeviceId = (USHORT)~0; return _MCIError("MCI_OPEN", ulRC); } pAData->usDeviceId = stMCIAmpOpen.usDeviceID; @@ -355,7 +512,7 @@ static int OS2_OpenDevice(_THIS, const char *devname) ulRC = mciSendCommand(pAData->usDeviceId, MCI_MIXSETUP, MCI_WAIT | MCI_MIXSETUP_INIT, &pAData->stMCIMixSetup, 0); - if (ulRC != MCIERR_SUCCESS && _this->spec.freq > 44100) { + if (LOUSHORT(ulRC) != MCIERR_SUCCESS && _this->spec.freq > 44100) { new_freq = TRUE; pAData->stMCIMixSetup.ulSamplesPerSec = 44100; _this->spec.freq = 44100; @@ -363,7 +520,7 @@ static int OS2_OpenDevice(_THIS, const char *devname) MCI_WAIT | MCI_MIXSETUP_INIT, &pAData->stMCIMixSetup, 0); } - debug_os2("Setup mixer [BPS: %u, Freq.: %u, Channels: %u]: %s", + debug_os2("Setup mixer [BPS: %lu, Freq.: %lu, Channels: %lu]: %s", pAData->stMCIMixSetup.ulBitsPerSample, pAData->stMCIMixSetup.ulSamplesPerSec, pAData->stMCIMixSetup.ulChannels, @@ -394,29 +551,25 @@ static int OS2_OpenDevice(_THIS, const char *devname) ulRC = mciSendCommand(pAData->usDeviceId, MCI_BUFFER, MCI_WAIT | MCI_ALLOCATE_MEMORY, &stMCIBuffer, 0); - if (ulRC != MCIERR_SUCCESS) { + if (LOUSHORT(ulRC) != MCIERR_SUCCESS) { return _MCIError("MCI_BUFFER", ulRC); } pAData->cMixBuffers = stMCIBuffer.ulNumBuffers; _this->spec.size = stMCIBuffer.ulBufferSize; + debug_os2("%s, number of mix buffers: %lu",iscapture ? "capture": "play",pAData->cMixBuffers); + /* Fill all device buffers with data */ for (ulIdx = 0; ulIdx < stMCIBuffer.ulNumBuffers; ulIdx++) { pAData->aMixBuffers[ulIdx].ulFlags = 0; pAData->aMixBuffers[ulIdx].ulBufferLength = stMCIBuffer.ulBufferSize; - pAData->aMixBuffers[ulIdx].ulUserParm = (ULONG)pAData; + pAData->aMixBuffers[ulIdx].ulUserParm = (ULONG)_this; SDL_memset(((PMCI_MIX_BUFFER)stMCIBuffer.pBufList)[ulIdx].pBuffer, _this->spec.silence, stMCIBuffer.ulBufferSize); } - - /* Write buffers to kick off the amp mixer */ - ulRC = pAData->stMCIMixSetup.pmixWrite(pAData->stMCIMixSetup.ulMixHandle, - pAData->aMixBuffers, 1); - if (ulRC != MCIERR_SUCCESS) { - _mixIOError("pmixWrite", ulRC); - return -1; - } + pAData->pFillBuffer = pAData->aMixBuffers; + pAData->pDrainBuffer = pAData->aMixBuffers; return 0; } @@ -431,12 +584,10 @@ static SDL_bool OS2_Init(SDL_AudioDriverImpl * impl) impl->WaitDevice = OS2_WaitDevice; impl->GetDeviceBuf = OS2_GetDeviceBuf; impl->CloseDevice = OS2_CloseDevice; - - /* TODO: IMPLEMENT CAPTURE SUPPORT: - impl->CaptureFromDevice = ; - impl->FlushCapture = ; + impl->CaptureFromDevice = OS2_CaptureFromDevice ; + impl->FlushCapture = OS2_FlushCapture; impl->HasCaptureSupport = SDL_TRUE; - */ + return SDL_TRUE; /* this audio target is available. */ } diff --git a/modules/SDL2/src/audio/os2/SDL_os2audio.h b/modules/SDL2/src/audio/os2/SDL_os2audio.h index 0bee307..fb6a832 100644 --- a/modules/SDL2/src/audio/os2/SDL_os2audio.h +++ b/modules/SDL2/src/audio/os2/SDL_os2audio.h @@ -43,10 +43,11 @@ typedef struct SDL_PrivateAudioData BYTE _pad[2]; MCI_MIXSETUP_PARMS stMCIMixSetup; HEV hevBuf; - ULONG ulNextBuf; + PMCI_MIX_BUFFER pFillBuffer; + PMCI_MIX_BUFFER pDrainBuffer; + ULONG ulState; ULONG cMixBuffers; MCI_MIX_BUFFER aMixBuffers[NUM_BUFFERS]; -/* ULONG ulQueuedBuf;*/ } SDL_PrivateAudioData; #endif /* SDL_os2mm_h_ */ diff --git a/modules/SDL2/src/audio/paudio/SDL_paudio.c b/modules/SDL2/src/audio/paudio/SDL_paudio.c index 962c031..5c5c36f 100644 --- a/modules/SDL2/src/audio/paudio/SDL_paudio.c +++ b/modules/SDL2/src/audio/paudio/SDL_paudio.c @@ -69,8 +69,7 @@ static char devsettings[][3] = { {'\0', '\0', '\0'} }; -static int -OpenUserDefinedDevice(char *path, int maxlen, int flags) +static int OpenUserDefinedDevice(char *path, int maxlen, int flags) { const char *audiodev; int fd; @@ -90,8 +89,7 @@ OpenUserDefinedDevice(char *path, int maxlen, int flags) return fd; } -static int -OpenAudioPath(char *path, int maxlen, int flags, int classic) +static int OpenAudioPath(char *path, int maxlen, int flags, int classic) { struct stat sb; int cycle = 0; @@ -123,8 +121,7 @@ OpenAudioPath(char *path, int maxlen, int flags, int classic) } /* This function waits until it is possible to write a full sound buffer */ -static void -PAUDIO_WaitDevice(_THIS) +static void PAUDIO_WaitDevice(_THIS) { fd_set fdset; @@ -176,8 +173,7 @@ PAUDIO_WaitDevice(_THIS) } } -static void -PAUDIO_PlayDevice(_THIS) +static void PAUDIO_PlayDevice(_THIS) { int written = 0; const Uint8 *mixbuf = this->hidden->mixbuf; @@ -206,14 +202,12 @@ PAUDIO_PlayDevice(_THIS) #endif } -static Uint8 * -PAUDIO_GetDeviceBuf(_THIS) +static Uint8 *PAUDIO_GetDeviceBuf(_THIS) { return this->hidden->mixbuf; } -static void -PAUDIO_CloseDevice(_THIS) +static void PAUDIO_CloseDevice(_THIS) { if (this->hidden->audio_fd >= 0) { close(this->hidden->audio_fd); @@ -222,8 +216,7 @@ PAUDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -PAUDIO_OpenDevice(_THIS, const char *devname) +static int PAUDIO_OpenDevice(_THIS, const char *devname) { const char *workaround = SDL_getenv("SDL_DSP_NOSELECT"); char audiodev[1024]; @@ -238,8 +231,7 @@ PAUDIO_OpenDevice(_THIS, const char *devname) int fd = -1; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -463,8 +455,7 @@ PAUDIO_OpenDevice(_THIS, const char *devname) return 0; } -static SDL_bool -PAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool PAUDIO_Init(SDL_AudioDriverImpl * impl) { /* !!! FIXME: not right for device enum? */ int fd = OpenAudioPath(NULL, 0, OPEN_FLAGS, 0); diff --git a/modules/SDL2/src/audio/pipewire/SDL_pipewire.c b/modules/SDL2/src/audio/pipewire/SDL_pipewire.c index 57dd78e..f969433 100644 --- a/modules/SDL2/src/audio/pipewire/SDL_pipewire.c +++ b/modules/SDL2/src/audio/pipewire/SDL_pipewire.c @@ -77,7 +77,7 @@ enum PW_READY_FLAGS { PW_READY_FLAG_BUFFER_ADDED = 0x1, PW_READY_FLAG_STREAM_READY = 0x2, - PW_READY_FLAG_ALL_BITS = 0x3 + PW_READY_FLAG_ALL_BITS = 0x3 }; #define PW_ID_TO_HANDLE(x) (void *)((uintptr_t)x) @@ -117,17 +117,16 @@ static struct pw_properties *(*PIPEWIRE_pw_properties_new)(const char *, ...)SPA static int (*PIPEWIRE_pw_properties_set)(struct pw_properties *, const char *, const char *); static int (*PIPEWIRE_pw_properties_setf)(struct pw_properties *, const char *, const char *, ...) SPA_PRINTF_FUNC(3, 4); -static int pipewire_version_major; -static int pipewire_version_minor; -static int pipewire_version_patch; +static int pipewire_version_major; +static int pipewire_version_minor; +static int pipewire_version_patch; #ifdef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC static const char *pipewire_library = SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC; -static void *pipewire_handle = NULL; +static void *pipewire_handle = NULL; -static int -pipewire_dlsym(const char *fn, void **addr) +static int pipewire_dlsym(const char *fn, void **addr) { *addr = SDL_LoadFunction(pipewire_handle, fn); if (*addr == NULL) { @@ -143,18 +142,13 @@ pipewire_dlsym(const char *fn, void **addr) return -1; \ } -static int -load_pipewire_library() +static int load_pipewire_library() { - if ((pipewire_handle = SDL_LoadObject(pipewire_library))) { - return 0; - } - - return -1; + pipewire_handle = SDL_LoadObject(pipewire_library); + return pipewire_handle != NULL ? 0 : -1; } -static void -unload_pipewire_library() +static void unload_pipewire_library() { if (pipewire_handle) { SDL_UnloadObject(pipewire_handle); @@ -166,21 +160,18 @@ unload_pipewire_library() #define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x -static int -load_pipewire_library() +static int load_pipewire_library() { return 0; } -static void -unload_pipewire_library() +static void unload_pipewire_library() { /* Nothing to do */ } #endif /* SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */ -static int -load_pipewire_syms() +static int load_pipewire_syms() { SDL_PIPEWIRE_SYM(pw_get_library_version); SDL_PIPEWIRE_SYM(pw_init); @@ -214,16 +205,14 @@ load_pipewire_syms() return 0; } -SDL_FORCE_INLINE SDL_bool -pipewire_version_at_least(int major, int minor, int patch) +SDL_FORCE_INLINE SDL_bool pipewire_version_at_least(int major, int minor, int patch) { return (pipewire_version_major >= major) && (pipewire_version_major > major || pipewire_version_minor >= minor) && (pipewire_version_major > major || pipewire_version_minor > minor || pipewire_version_patch >= patch); } -static int -init_pipewire_library() +static int init_pipewire_library() { if (!load_pipewire_library()) { if (!load_pipewire_syms()) { @@ -245,8 +234,7 @@ init_pipewire_library() return -1; } -static void -deinit_pipewire_library() +static void deinit_pipewire_library() { PIPEWIRE_pw_deinit(); unload_pipewire_library(); @@ -257,8 +245,8 @@ struct node_object { struct spa_list link; - Uint32 id; - int seq; + Uint32 id; + int seq; SDL_bool persist; /* @@ -271,8 +259,8 @@ struct node_object void *userdata; struct pw_proxy *proxy; - struct spa_hook node_listener; - struct spa_hook core_listener; + struct spa_hook node_listener; + struct spa_hook core_listener; }; /* A sink/source node used for stream I/O. */ @@ -280,8 +268,8 @@ struct io_node { struct spa_list link; - Uint32 id; - SDL_bool is_capture; + Uint32 id; + SDL_bool is_capture; SDL_AudioSpec spec; const char *name; /* Friendly name */ @@ -292,26 +280,25 @@ struct io_node /* The global hotplug thread and associated objects. */ static struct pw_thread_loop *hotplug_loop; -static struct pw_core *hotplug_core; -static struct pw_context *hotplug_context; -static struct pw_registry *hotplug_registry; -static struct spa_hook hotplug_registry_listener; -static struct spa_hook hotplug_core_listener; -static struct spa_list hotplug_pending_list; -static struct spa_list hotplug_io_list; -static int hotplug_init_seq_val; -static SDL_bool hotplug_init_complete; -static SDL_bool hotplug_events_enabled; - -static char *pipewire_default_sink_id = NULL; +static struct pw_core *hotplug_core; +static struct pw_context *hotplug_context; +static struct pw_registry *hotplug_registry; +static struct spa_hook hotplug_registry_listener; +static struct spa_hook hotplug_core_listener; +static struct spa_list hotplug_pending_list; +static struct spa_list hotplug_io_list; +static int hotplug_init_seq_val; +static SDL_bool hotplug_init_complete; +static SDL_bool hotplug_events_enabled; + +static char *pipewire_default_sink_id = NULL; static char *pipewire_default_source_id = NULL; /* The active node list */ -static SDL_bool -io_list_check_add(struct io_node *node) +static SDL_bool io_list_check_add(struct io_node *node) { struct io_node *n; - SDL_bool ret = SDL_TRUE; + SDL_bool ret = SDL_TRUE; /* See if the node is already in the list */ spa_list_for_each (n, &hotplug_io_list, link) { @@ -333,8 +320,7 @@ dup_found: return ret; } -static void -io_list_remove(Uint32 id) +static void io_list_remove(Uint32 id) { struct io_node *n, *temp; @@ -354,8 +340,7 @@ io_list_remove(Uint32 id) } } -static void -io_list_sort() +static void io_list_sort() { struct io_node *default_sink = NULL, *default_source = NULL; struct io_node *n, *temp; @@ -380,8 +365,7 @@ io_list_sort() } } -static void -io_list_clear() +static void io_list_clear() { struct io_node *n, *temp; @@ -391,8 +375,7 @@ io_list_clear() } } -static struct io_node* -io_list_get_by_id(Uint32 id) +static struct io_node *io_list_get_by_id(Uint32 id) { struct io_node *n, *temp; spa_list_for_each_safe (n, temp, &hotplug_io_list, link) { @@ -403,8 +386,7 @@ io_list_get_by_id(Uint32 id) return NULL; } -static struct io_node* -io_list_get_by_path(char *path) +static struct io_node *io_list_get_by_path(char *path) { struct io_node *n, *temp; spa_list_for_each_safe (n, temp, &hotplug_io_list, link) { @@ -415,8 +397,7 @@ io_list_get_by_path(char *path) return NULL; } -static void -node_object_destroy(struct node_object *node) +static void node_object_destroy(struct node_object *node) { SDL_assert(node); @@ -428,15 +409,13 @@ node_object_destroy(struct node_object *node) } /* The pending node list */ -static void -pending_list_add(struct node_object *node) +static void pending_list_add(struct node_object *node) { SDL_assert(node); spa_list_append(&hotplug_pending_list, &node->link); } -static void -pending_list_remove(Uint32 id) +static void pending_list_remove(Uint32 id) { struct node_object *node, *temp; @@ -447,8 +426,7 @@ pending_list_remove(Uint32 id) } } -static void -pending_list_clear() +static void pending_list_clear() { struct node_object *node, *temp; @@ -457,10 +435,9 @@ pending_list_clear() } } -static void * -node_object_new(Uint32 id, const char *type, Uint32 version, const void *funcs, const struct pw_core_events *core_events) +static void *node_object_new(Uint32 id, const char *type, Uint32 version, const void *funcs, const struct pw_core_events *core_events) { - struct pw_proxy *proxy; + struct pw_proxy *proxy; struct node_object *node; /* Create the proxy object */ @@ -473,7 +450,7 @@ node_object_new(Uint32 id, const char *type, Uint32 version, const void *funcs, node = PIPEWIRE_pw_proxy_get_user_data(proxy); SDL_zerop(node); - node->id = id; + node->id = id; node->proxy = proxy; /* Add the callbacks */ @@ -487,8 +464,7 @@ node_object_new(Uint32 id, const char *type, Uint32 version, const void *funcs, } /* Core sync points */ -static void -core_events_hotplug_init_callback(void *object, uint32_t id, int seq) +static void core_events_hotplug_init_callback(void *object, uint32_t id, int seq) { if (id == PW_ID_CORE && seq == hotplug_init_seq_val) { /* This core listener is no longer needed. */ @@ -500,11 +476,10 @@ core_events_hotplug_init_callback(void *object, uint32_t id, int seq) } } -static void -core_events_interface_callback(void *object, uint32_t id, int seq) +static void core_events_interface_callback(void *object, uint32_t id, int seq) { struct node_object *node = object; - struct io_node *io = node->userdata; + struct io_node *io = node->userdata; if (id == PW_ID_CORE && seq == node->seq) { /* @@ -519,8 +494,7 @@ core_events_interface_callback(void *object, uint32_t id, int seq) } } -static void -core_events_metadata_callback(void *object, uint32_t id, int seq) +static void core_events_metadata_callback(void *object, uint32_t id, int seq) { struct node_object *node = object; @@ -530,11 +504,10 @@ core_events_metadata_callback(void *object, uint32_t id, int seq) } static const struct pw_core_events hotplug_init_core_events = { PW_VERSION_CORE_EVENTS, .done = core_events_hotplug_init_callback }; -static const struct pw_core_events interface_core_events = { PW_VERSION_CORE_EVENTS, .done = core_events_interface_callback }; -static const struct pw_core_events metadata_core_events = { PW_VERSION_CORE_EVENTS, .done = core_events_metadata_callback }; +static const struct pw_core_events interface_core_events = { PW_VERSION_CORE_EVENTS, .done = core_events_interface_callback }; +static const struct pw_core_events metadata_core_events = { PW_VERSION_CORE_EVENTS, .done = core_events_metadata_callback }; -static void -hotplug_core_sync(struct node_object *node) +static void hotplug_core_sync(struct node_object *node) { /* * Node sync events *must* come before the hotplug init sync events or the initial @@ -550,12 +523,11 @@ hotplug_core_sync(struct node_object *node) } /* Helpers for retrieving values from params */ -static SDL_bool -get_range_param(const struct spa_pod *param, Uint32 key, int *def, int *min, int *max) +static SDL_bool get_range_param(const struct spa_pod *param, Uint32 key, int *def, int *min, int *max) { const struct spa_pod_prop *prop; - struct spa_pod *value; - Uint32 n_values, choice; + struct spa_pod *value; + Uint32 n_values, choice; prop = spa_pod_find_prop(param, NULL, key); @@ -584,11 +556,10 @@ get_range_param(const struct spa_pod *param, Uint32 key, int *def, int *min, int return SDL_FALSE; } -static SDL_bool -get_int_param(const struct spa_pod *param, Uint32 key, int *val) +static SDL_bool get_int_param(const struct spa_pod *param, Uint32 key, int *val) { const struct spa_pod_prop *prop; - Sint32 v; + Sint32 v; prop = spa_pod_find_prop(param, NULL, key); @@ -604,13 +575,12 @@ get_int_param(const struct spa_pod *param, Uint32 key, int *val) } /* Interface node callbacks */ -static void -node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *object, const struct pw_node_info *info) { struct node_object *node = object; - struct io_node *io = node->userdata; - const char *prop_val; - Uint32 i; + struct io_node *io = node->userdata; + const char *prop_val; + Uint32 i; if (info) { prop_val = spa_dict_lookup(info->props, PW_KEY_AUDIO_CHANNELS); @@ -627,11 +597,10 @@ node_event_info(void *object, const struct pw_node_info *info) } } -static void -node_event_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) +static void node_event_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { struct node_object *node = object; - struct io_node *io = node->userdata; + struct io_node *io = node->userdata; /* Get the default frequency */ if (io->spec.freq == 0) { @@ -653,8 +622,7 @@ node_event_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t ne static const struct pw_node_events interface_node_events = { PW_VERSION_NODE_EVENTS, .info = node_event_info, .param = node_event_param }; -static char* -get_name_from_json(const char *json) +static char *get_name_from_json(const char *json) { struct spa_json parser[2]; char key[7]; /* "name" */ @@ -676,8 +644,7 @@ get_name_from_json(const char *json) } /* Metadata node callback */ -static int -metadata_property(void *object, Uint32 subject, const char *key, const char *type, const char *value) +static int metadata_property(void *object, Uint32 subject, const char *key, const char *type, const char *value) { struct node_object *node = object; @@ -703,9 +670,8 @@ metadata_property(void *object, Uint32 subject, const char *key, const char *typ static const struct pw_metadata_events metadata_node_events = { PW_VERSION_METADATA_EVENTS, .property = metadata_property }; /* Global registry callbacks */ -static void -registry_event_global_callback(void *object, uint32_t id, uint32_t permissions, const char *type, uint32_t version, - const struct spa_dict *props) +static void registry_event_global_callback(void *object, uint32_t id, uint32_t permissions, const char *type, uint32_t version, + const struct spa_dict *props) { struct node_object *node; @@ -714,12 +680,12 @@ registry_event_global_callback(void *object, uint32_t id, uint32_t permissions, const char *media_class = spa_dict_lookup(props, PW_KEY_MEDIA_CLASS); if (media_class) { - const char *node_desc; - const char *node_path; + const char *node_desc; + const char *node_path; struct io_node *io; - SDL_bool is_capture; - int desc_buffer_len; - int path_buffer_len; + SDL_bool is_capture; + int desc_buffer_len; + int path_buffer_len; /* Just want sink and capture */ if (!SDL_strcasecmp(media_class, "Audio/Sink")) { @@ -751,11 +717,11 @@ registry_event_global_callback(void *object, uint32_t id, uint32_t permissions, } /* Begin setting the node properties */ - io->id = id; - io->is_capture = is_capture; + io->id = id; + io->is_capture = is_capture; io->spec.format = AUDIO_F32; /* Pipewire uses floats internally, other formats require conversion. */ - io->name = io->buf; - io->path = io->buf + desc_buffer_len; + io->name = io->buf; + io->path = io->buf + desc_buffer_len; SDL_strlcpy(io->buf, node_desc, desc_buffer_len); SDL_strlcpy(io->buf + desc_buffer_len, node_path, path_buffer_len); @@ -775,8 +741,7 @@ registry_event_global_callback(void *object, uint32_t id, uint32_t permissions, } } -static void -registry_event_remove_callback(void *object, uint32_t id) +static void registry_event_remove_callback(void *object, uint32_t id) { io_list_remove(id); pending_list_remove(id); @@ -786,8 +751,7 @@ static const struct pw_registry_events registry_events = { PW_VERSION_REGISTRY_E .global_remove = registry_event_remove_callback }; /* The hotplug thread */ -static int -hotplug_loop_init() +static int hotplug_loop_init() { int res; @@ -830,8 +794,7 @@ hotplug_loop_init() return 0; } -static void -hotplug_loop_destroy() +static void hotplug_loop_destroy() { if (hotplug_loop) { PIPEWIRE_pw_thread_loop_stop(hotplug_loop); @@ -840,7 +803,7 @@ hotplug_loop_destroy() pending_list_clear(); io_list_clear(); - hotplug_init_complete = SDL_FALSE; + hotplug_init_complete = SDL_FALSE; hotplug_events_enabled = SDL_FALSE; if (pipewire_default_sink_id != NULL) { @@ -873,8 +836,7 @@ hotplug_loop_destroy() } } -static void -PIPEWIRE_DetectDevices() +static void PIPEWIRE_DetectDevices() { struct io_node *io; @@ -916,11 +878,10 @@ static const enum spa_audio_channel PIPEWIRE_channel_map_8[] = { SPA_AUDIO_CHANN #define COPY_CHANNEL_MAP(c) SDL_memcpy(info->position, PIPEWIRE_channel_map_##c, sizeof(PIPEWIRE_channel_map_##c)) -static void -initialize_spa_info(const SDL_AudioSpec *spec, struct spa_audio_info_raw *info) +static void initialize_spa_info(const SDL_AudioSpec *spec, struct spa_audio_info_raw *info) { info->channels = spec->channels; - info->rate = spec->freq; + info->rate = spec->freq; switch (spec->channels) { case 1: @@ -984,14 +945,13 @@ initialize_spa_info(const SDL_AudioSpec *spec, struct spa_audio_info_raw *info) } } -static void -output_callback(void *data) +static void output_callback(void *data) { - struct pw_buffer *pw_buf; + struct pw_buffer *pw_buf; struct spa_buffer *spa_buf; - Uint8 *dst; + Uint8 *dst; - _THIS = (SDL_AudioDevice *)data; + _THIS = (SDL_AudioDevice *)data; struct pw_stream *stream = this->hidden->stream; /* Shutting down, don't do anything */ @@ -1000,7 +960,8 @@ output_callback(void *data) } /* See if a buffer is available */ - if ((pw_buf = PIPEWIRE_pw_stream_dequeue_buffer(stream)) == NULL) { + pw_buf = PIPEWIRE_pw_stream_dequeue_buffer(stream); + if (pw_buf == NULL) { return; } @@ -1045,18 +1006,17 @@ output_callback(void *data) spa_buf->datas[0].chunk->offset = 0; spa_buf->datas[0].chunk->stride = this->hidden->stride; - spa_buf->datas[0].chunk->size = this->spec.size; + spa_buf->datas[0].chunk->size = this->spec.size; PIPEWIRE_pw_stream_queue_buffer(stream, pw_buf); } -static void -input_callback(void *data) +static void input_callback(void *data) { - struct pw_buffer *pw_buf; + struct pw_buffer *pw_buf; struct spa_buffer *spa_buf; - Uint8 *src; - _THIS = (SDL_AudioDevice *)data; + Uint8 *src; + _THIS = (SDL_AudioDevice *)data; struct pw_stream *stream = this->hidden->stream; /* Shutting down, don't do anything */ @@ -1065,20 +1025,20 @@ input_callback(void *data) } pw_buf = PIPEWIRE_pw_stream_dequeue_buffer(stream); - if (!pw_buf) { + if (pw_buf == NULL) { return; } spa_buf = pw_buf->buffer; - - if ((src = (Uint8 *)spa_buf->datas[0].data) == NULL) { + (src = (Uint8 *)spa_buf->datas[0].data); + if (src == NULL) { return; } if (!SDL_AtomicGet(&this->paused)) { /* Calculate the offset and data size */ const Uint32 offset = SPA_MIN(spa_buf->datas[0].chunk->offset, spa_buf->datas[0].maxsize); - const Uint32 size = SPA_MIN(spa_buf->datas[0].chunk->size, spa_buf->datas[0].maxsize - offset); + const Uint32 size = SPA_MIN(spa_buf->datas[0].chunk->size, spa_buf->datas[0].maxsize - offset); src += offset; @@ -1106,8 +1066,7 @@ input_callback(void *data) PIPEWIRE_pw_stream_queue_buffer(stream, pw_buf); } -static void -stream_add_buffer_callback(void *data, struct pw_buffer *buffer) +static void stream_add_buffer_callback(void *data, struct pw_buffer *buffer) { _THIS = data; @@ -1118,7 +1077,7 @@ stream_add_buffer_callback(void *data, struct pw_buffer *buffer) */ if (this->spec.size > buffer->buffer->datas[0].maxsize) { this->spec.samples = buffer->buffer->datas[0].maxsize / this->hidden->stride; - this->spec.size = buffer->buffer->datas[0].maxsize; + this->spec.size = buffer->buffer->datas[0].maxsize; } } else if (this->hidden->buffer == NULL) { /* @@ -1130,15 +1089,14 @@ stream_add_buffer_callback(void *data, struct pw_buffer *buffer) * A packet size of 2 periods should be more than is ever needed. */ this->hidden->input_buffer_packet_size = SPA_MAX(this->spec.size, buffer->buffer->datas[0].maxsize) * 2; - this->hidden->buffer = SDL_NewDataQueue(this->hidden->input_buffer_packet_size, this->hidden->input_buffer_packet_size); + this->hidden->buffer = SDL_NewDataQueue(this->hidden->input_buffer_packet_size, this->hidden->input_buffer_packet_size); } this->hidden->stream_init_status |= PW_READY_FLAG_BUFFER_ADDED; PIPEWIRE_pw_thread_loop_signal(this->hidden->loop, false); } -static void -stream_state_changed_callback(void *data, enum pw_stream_state old, enum pw_stream_state state, const char *error) +static void stream_state_changed_callback(void *data, enum pw_stream_state old, enum pw_stream_state state, const char *error) { _THIS = data; @@ -1153,15 +1111,14 @@ stream_state_changed_callback(void *data, enum pw_stream_state old, enum pw_stre static const struct pw_stream_events stream_output_events = { PW_VERSION_STREAM_EVENTS, .state_changed = stream_state_changed_callback, - .add_buffer = stream_add_buffer_callback, - .process = output_callback }; -static const struct pw_stream_events stream_input_events = { PW_VERSION_STREAM_EVENTS, - .state_changed = stream_state_changed_callback, - .add_buffer = stream_add_buffer_callback, - .process = input_callback }; - -static int -PIPEWIRE_OpenDevice(_THIS, const char *devname) + .add_buffer = stream_add_buffer_callback, + .process = output_callback }; +static const struct pw_stream_events stream_input_events = { PW_VERSION_STREAM_EVENTS, + .state_changed = stream_state_changed_callback, + .add_buffer = stream_add_buffer_callback, + .process = input_callback }; + +static int PIPEWIRE_OpenDevice(_THIS, const char *devname) { /* * NOTE: The PW_STREAM_FLAG_RT_PROCESS flag can be set to call the stream @@ -1172,32 +1129,32 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname) */ static const enum pw_stream_flags STREAM_FLAGS = PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_MAP_BUFFERS; - char thread_name[PW_THREAD_NAME_BUFFER_LENGTH]; - Uint8 pod_buffer[PW_POD_BUFFER_LENGTH]; - struct spa_pod_builder b = SPA_POD_BUILDER_INIT(pod_buffer, sizeof(pod_buffer)); - struct spa_audio_info_raw spa_info = { 0 }; - const struct spa_pod *params = NULL; + char thread_name[PW_THREAD_NAME_BUFFER_LENGTH]; + Uint8 pod_buffer[PW_POD_BUFFER_LENGTH]; + struct spa_pod_builder b = SPA_POD_BUILDER_INIT(pod_buffer, sizeof(pod_buffer)); + struct spa_audio_info_raw spa_info = { 0 }; + const struct spa_pod *params = NULL; struct SDL_PrivateAudioData *priv; - struct pw_properties *props; - const char *app_name, *stream_name, *stream_role, *error; - Uint32 node_id = this->handle == NULL ? PW_ID_ANY : PW_HANDLE_TO_ID(this->handle); - SDL_bool iscapture = this->iscapture; - int res; + struct pw_properties *props; + const char *app_name, *stream_name, *stream_role, *error; + Uint32 node_id = this->handle == NULL ? PW_ID_ANY : PW_HANDLE_TO_ID(this->handle); + SDL_bool iscapture = this->iscapture; + int res; /* Clamp the period size to sane values */ const int min_period = PW_MIN_SAMPLES * SPA_MAX(this->spec.freq / PW_BASE_CLOCK_RATE, 1); /* Get the hints for the application name, stream name and role */ app_name = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME); - if (!app_name || *app_name == '\0') { + if (app_name == NULL || *app_name == '\0') { app_name = SDL_GetHint(SDL_HINT_APP_NAME); - if (!app_name || *app_name == '\0') { + if (app_name == NULL || *app_name == '\0') { app_name = "SDL Application"; } } stream_name = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_STREAM_NAME); - if (!stream_name || *stream_name == '\0') { + if (stream_name == NULL || *stream_name == '\0') { stream_name = "Audio Stream"; } @@ -1206,7 +1163,7 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname) * but 'Game' seems more appropriate for the majority of SDL applications. */ stream_role = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_STREAM_ROLE); - if (!stream_role || *stream_role == '\0') { + if (stream_role == NULL || *stream_role == '\0') { stream_role = "Game"; } @@ -1217,7 +1174,9 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname) return SDL_SetError("Pipewire: Failed to set audio format parameters"); } - if ((this->hidden = priv = SDL_calloc(1, sizeof(struct SDL_PrivateAudioData))) == NULL) { + priv = SDL_calloc(1, sizeof(struct SDL_PrivateAudioData)); + this->hidden = priv; + if (priv == NULL) { return SDL_OutOfMemory(); } @@ -1226,10 +1185,10 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname) if (this->spec.samples < min_period) { this->spec.samples = min_period; - this->spec.size = this->spec.samples * priv->stride; + this->spec.size = this->spec.samples * priv->stride; } - SDL_snprintf(thread_name, sizeof(thread_name), "SDLAudio%c%ld", (iscapture) ? 'C' : 'P', (long)this->handle); + (void)SDL_snprintf(thread_name, sizeof(thread_name), "SDLAudio%c%ld", (iscapture) ? 'C' : 'P', (long)this->handle); priv->loop = PIPEWIRE_pw_thread_loop_new(thread_name, NULL); if (priv->loop == NULL) { return SDL_SetError("Pipewire: Failed to create stream loop (%i)", errno); @@ -1272,7 +1231,8 @@ PIPEWIRE_OpenDevice(_THIS, const char *devname) const struct io_node *node; PIPEWIRE_pw_thread_loop_lock(hotplug_loop); - if ((node = io_list_get_by_id(node_id))) { + node = io_list_get_by_id(node_id); + if (node != NULL) { PIPEWIRE_pw_properties_set(props, PW_KEY_TARGET_OBJECT, node->path); } PIPEWIRE_pw_thread_loop_unlock(hotplug_loop); @@ -1344,8 +1304,7 @@ static void PIPEWIRE_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -PIPEWIRE_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +static int PIPEWIRE_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { struct io_node *node; char *target; @@ -1383,8 +1342,7 @@ failed: return ret; } -static void -PIPEWIRE_Deinitialize() +static void PIPEWIRE_Deinitialize() { if (pipewire_initialized) { hotplug_loop_destroy(); @@ -1393,8 +1351,7 @@ PIPEWIRE_Deinitialize() } } -static SDL_bool -PIPEWIRE_Init(SDL_AudioDriverImpl *impl) +static SDL_bool PIPEWIRE_Init(SDL_AudioDriverImpl *impl) { if (!pipewire_initialized) { if (init_pipewire_library() < 0) { @@ -1410,15 +1367,15 @@ PIPEWIRE_Init(SDL_AudioDriverImpl *impl) } /* Set the function pointers */ - impl->DetectDevices = PIPEWIRE_DetectDevices; - impl->OpenDevice = PIPEWIRE_OpenDevice; - impl->CloseDevice = PIPEWIRE_CloseDevice; - impl->Deinitialize = PIPEWIRE_Deinitialize; + impl->DetectDevices = PIPEWIRE_DetectDevices; + impl->OpenDevice = PIPEWIRE_OpenDevice; + impl->CloseDevice = PIPEWIRE_CloseDevice; + impl->Deinitialize = PIPEWIRE_Deinitialize; impl->GetDefaultAudioInfo = PIPEWIRE_GetDefaultAudioInfo; - impl->HasCaptureSupport = SDL_TRUE; + impl->HasCaptureSupport = SDL_TRUE; impl->ProvidesOwnCallbackThread = SDL_TRUE; - impl->SupportsNonPow2Samples = SDL_TRUE; + impl->SupportsNonPow2Samples = SDL_TRUE; return SDL_TRUE; } diff --git a/modules/SDL2/src/audio/pipewire/SDL_pipewire.h b/modules/SDL2/src/audio/pipewire/SDL_pipewire.h index c907af4..0f706a2 100644 --- a/modules/SDL2/src/audio/pipewire/SDL_pipewire.h +++ b/modules/SDL2/src/audio/pipewire/SDL_pipewire.h @@ -33,13 +33,13 @@ struct SDL_PrivateAudioData { struct pw_thread_loop *loop; - struct pw_stream *stream; - struct pw_context *context; - struct SDL_DataQueue *buffer; + struct pw_stream *stream; + struct pw_context *context; + struct SDL_DataQueue *buffer; size_t input_buffer_packet_size; Sint32 stride; /* Bytes-per-frame */ - int stream_init_status; + int stream_init_status; }; #endif /* SDL_pipewire_h_ */ diff --git a/modules/SDL2/src/audio/ps2/SDL_ps2audio.c b/modules/SDL2/src/audio/ps2/SDL_ps2audio.c index f8a5b40..ffbf6c5 100644 --- a/modules/SDL2/src/audio/ps2/SDL_ps2audio.c +++ b/modules/SDL2/src/audio/ps2/SDL_ps2audio.c @@ -33,10 +33,9 @@ #include /* The tag name used by PS2 audio */ -#define PS2AUDIO_DRIVER_NAME "ps2" +#define PS2AUDIO_DRIVER_NAME "ps2" -static int -PS2AUDIO_OpenDevice(_THIS, const char *devname) +static int PS2AUDIO_OpenDevice(_THIS, const char *devname) { int i, mixlen; struct audsrv_fmt_t format; @@ -48,21 +47,20 @@ PS2AUDIO_OpenDevice(_THIS, const char *devname) } SDL_zerop(this->hidden); - /* These are the native supported audio PS2 configs */ switch (this->spec.freq) { - case 11025: - case 12000: - case 22050: - case 24000: - case 32000: - case 44100: - case 48000: - this->spec.freq = this->spec.freq; - break; - default: - this->spec.freq = 48000; - break; + case 11025: + case 12000: + case 22050: + case 24000: + case 32000: + case 44100: + case 48000: + this->spec.freq = this->spec.freq; + break; + default: + this->spec.freq = 48000; + break; } this->spec.samples = 512; @@ -71,8 +69,8 @@ PS2AUDIO_OpenDevice(_THIS, const char *devname) SDL_CalculateAudioSpec(&this->spec); - format.bits = this->spec.format == AUDIO_S8 ? 8 : 16; - format.freq = this->spec.freq; + format.bits = this->spec.format == AUDIO_S8 ? 8 : 16; + format.freq = this->spec.freq; format.channels = this->spec.channels; this->hidden->channel = audsrv_set_format(&format); @@ -91,7 +89,7 @@ PS2AUDIO_OpenDevice(_THIS, const char *devname) be a multiple of 64 bytes. Our sample count is already a multiple of 64, so spec->size should be a multiple of 64 as well. */ mixlen = this->spec.size * NUM_BUFFERS; - this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen); + this->hidden->rawbuf = (Uint8 *)memalign(64, mixlen); if (this->hidden->rawbuf == NULL) { return SDL_SetError("Couldn't allocate mixing buffer"); } @@ -154,10 +152,11 @@ static void PS2AUDIO_Deinitialize(void) deinit_audio_driver(); } -static SDL_bool PS2AUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool PS2AUDIO_Init(SDL_AudioDriverImpl *impl) { - if(init_audio_driver() < 0) + if (init_audio_driver() < 0) { return SDL_FALSE; + } /* Set the function pointers */ impl->OpenDevice = PS2AUDIO_OpenDevice; @@ -168,7 +167,7 @@ static SDL_bool PS2AUDIO_Init(SDL_AudioDriverImpl * impl) impl->ThreadInit = PS2AUDIO_ThreadInit; impl->Deinitialize = PS2AUDIO_Deinitialize; impl->OnlyHasDefaultOutputDevice = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap PS2AUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/ps2/SDL_ps2audio.h b/modules/SDL2/src/audio/ps2/SDL_ps2audio.h index 69d421a..0f0223c 100644 --- a/modules/SDL2/src/audio/ps2/SDL_ps2audio.h +++ b/modules/SDL2/src/audio/ps2/SDL_ps2audio.h @@ -26,20 +26,20 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this #define NUM_BUFFERS 2 struct SDL_PrivateAudioData { - /* The hardware output channel. */ - int channel; - /* The raw allocated mixing buffer. */ - Uint8 *rawbuf; - /* Individual mixing buffers. */ - Uint8 *mixbufs[NUM_BUFFERS]; - /* Index of the next available mixing buffer. */ - int next_buffer; + /* The hardware output channel. */ + int channel; + /* The raw allocated mixing buffer. */ + Uint8 *rawbuf; + /* Individual mixing buffers. */ + Uint8 *mixbufs[NUM_BUFFERS]; + /* Index of the next available mixing buffer. */ + int next_buffer; }; #endif /* SDL_ps2audio_h_ */ diff --git a/modules/SDL2/src/audio/psp/SDL_pspaudio.c b/modules/SDL2/src/audio/psp/SDL_pspaudio.c index 2b57829..3b01564 100644 --- a/modules/SDL2/src/audio/psp/SDL_pspaudio.c +++ b/modules/SDL2/src/audio/psp/SDL_pspaudio.c @@ -39,10 +39,14 @@ #include /* The tag name used by PSP audio */ -#define PSPAUDIO_DRIVER_NAME "psp" +#define PSPAUDIO_DRIVER_NAME "psp" -static int -PSPAUDIO_OpenDevice(_THIS, const char *devname) +static inline SDL_bool isBasicAudioConfig(const SDL_AudioSpec *spec) +{ + return spec->freq == 44100; +} + +static int PSPAUDIO_OpenDevice(_THIS, const char *devname) { int format, mixlen, i; @@ -56,26 +60,40 @@ PSPAUDIO_OpenDevice(_THIS, const char *devname) /* device only natively supports S16LSB */ this->spec.format = AUDIO_S16LSB; - /* The sample count must be a multiple of 64. */ - this->spec.samples = PSP_AUDIO_SAMPLE_ALIGN(this->spec.samples); - - /* Setup the hardware channel. */ - if (this->spec.channels == 1) { - format = PSP_AUDIO_FORMAT_MONO; - } else { - format = PSP_AUDIO_FORMAT_STEREO; - this->spec.channels = 2; /* we're forcing the hardware to stereo. */ - } - /* PSP has some limitations with the Audio. It fully supports 44.1KHz (Mono & Stereo), however with frequencies differents than 44.1KHz, it just supports Stereo, so a resampler must be done for these scenarios */ - if (this->spec.freq == 44100) { + if (isBasicAudioConfig(&this->spec)) { + /* The sample count must be a multiple of 64. */ + this->spec.samples = PSP_AUDIO_SAMPLE_ALIGN(this->spec.samples); + /* The number of channels (1 or 2). */ + this->spec.channels = this->spec.channels == 1 ? 1 : 2; + format = this->spec.channels == 1 ? PSP_AUDIO_FORMAT_MONO : PSP_AUDIO_FORMAT_STEREO; this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format); } else { + /* 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11050, 8000 */ + switch (this->spec.freq) { + case 8000: + case 11025: + case 12000: + case 16000: + case 22050: + case 24000: + case 32000: + case 44100: + case 48000: + this->spec.freq = this->spec.freq; + break; + default: + this->spec.freq = 48000; + break; + } + /* The number of samples to output in one output call (min 17, max 4111). */ + this->spec.samples = this->spec.samples < 17 ? 17 : (this->spec.samples > 4111 ? 4111 : this->spec.samples); + this->spec.channels = 2; /* we're forcing the hardware to stereo. */ this->hidden->channel = sceAudioSRCChReserve(this->spec.samples, this->spec.freq, 2); } - + if (this->hidden->channel < 0) { free(this->hidden->rawbuf); this->hidden->rawbuf = NULL; @@ -89,7 +107,7 @@ PSPAUDIO_OpenDevice(_THIS, const char *devname) be a multiple of 64 bytes. Our sample count is already a multiple of 64, so spec->size should be a multiple of 64 as well. */ mixlen = this->spec.size * NUM_BUFFERS; - this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen); + this->hidden->rawbuf = (Uint8 *)memalign(64, mixlen); if (this->hidden->rawbuf == NULL) { return SDL_SetError("Couldn't allocate mixing buffer"); } @@ -105,12 +123,11 @@ PSPAUDIO_OpenDevice(_THIS, const char *devname) static void PSPAUDIO_PlayDevice(_THIS) { - if (this->spec.freq != 44100){ - Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer]; + Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer]; + if (!isBasicAudioConfig(&this->spec)) { SDL_assert(this->spec.channels == 2); sceAudioSRCOutputBlocking(PSP_AUDIO_VOLUME_MAX, mixbuf); } else { - Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer]; sceAudioOutputPannedBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, mixbuf); } @@ -131,7 +148,7 @@ static Uint8 *PSPAUDIO_GetDeviceBuf(_THIS) static void PSPAUDIO_CloseDevice(_THIS) { if (this->hidden->channel >= 0) { - if (this->spec.freq != 44100){ + if (!isBasicAudioConfig(&this->spec)) { sceAudioSRCChRelease(); } else { sceAudioChRelease(this->hidden->channel); @@ -158,8 +175,7 @@ static void PSPAUDIO_ThreadInit(_THIS) } } -static SDL_bool -PSPAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool PSPAUDIO_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = PSPAUDIO_OpenDevice; @@ -175,7 +191,7 @@ PSPAUDIO_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; */ - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap PSPAUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/psp/SDL_pspaudio.h b/modules/SDL2/src/audio/psp/SDL_pspaudio.h index 77b161f..943e9a3 100644 --- a/modules/SDL2/src/audio/psp/SDL_pspaudio.h +++ b/modules/SDL2/src/audio/psp/SDL_pspaudio.h @@ -25,19 +25,20 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this #define NUM_BUFFERS 2 -struct SDL_PrivateAudioData { +struct SDL_PrivateAudioData +{ /* The hardware output channel. */ - int channel; + int channel; /* The raw allocated mixing buffer. */ - Uint8 *rawbuf; + Uint8 *rawbuf; /* Individual mixing buffers. */ - Uint8 *mixbufs[NUM_BUFFERS]; + Uint8 *mixbufs[NUM_BUFFERS]; /* Index of the next available mixing buffer. */ - int next_buffer; + int next_buffer; }; #endif /* SDL_pspaudio_h_ */ diff --git a/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c b/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c index fdaa748..27c6e75 100644 --- a/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c @@ -49,87 +49,79 @@ /* should we include monitors in the device list? Set at SDL_Init time */ static SDL_bool include_monitors = SDL_FALSE; - #if (PA_API_VERSION < 12) /** Return non-zero if the passed state is one of the connected states */ -static SDL_INLINE int PA_CONTEXT_IS_GOOD(pa_context_state_t x) { - return - x == PA_CONTEXT_CONNECTING || - x == PA_CONTEXT_AUTHORIZING || - x == PA_CONTEXT_SETTING_NAME || - x == PA_CONTEXT_READY; +static SDL_INLINE int PA_CONTEXT_IS_GOOD(pa_context_state_t x) +{ + return x == PA_CONTEXT_CONNECTING || x == PA_CONTEXT_AUTHORIZING || x == PA_CONTEXT_SETTING_NAME || x == PA_CONTEXT_READY; } /** Return non-zero if the passed state is one of the connected states */ -static SDL_INLINE int PA_STREAM_IS_GOOD(pa_stream_state_t x) { - return - x == PA_STREAM_CREATING || - x == PA_STREAM_READY; +static SDL_INLINE int PA_STREAM_IS_GOOD(pa_stream_state_t x) +{ + return x == PA_STREAM_CREATING || x == PA_STREAM_READY; } #endif /* pulseaudio <= 0.9.10 */ - -static const char *(*PULSEAUDIO_pa_get_library_version) (void); -static pa_channel_map *(*PULSEAUDIO_pa_channel_map_init_auto) ( +static const char *(*PULSEAUDIO_pa_get_library_version)(void); +static pa_channel_map *(*PULSEAUDIO_pa_channel_map_init_auto)( pa_channel_map *, unsigned, pa_channel_map_def_t); -static const char * (*PULSEAUDIO_pa_strerror) (int); -static pa_mainloop * (*PULSEAUDIO_pa_mainloop_new) (void); -static pa_mainloop_api * (*PULSEAUDIO_pa_mainloop_get_api) (pa_mainloop *); -static int (*PULSEAUDIO_pa_mainloop_iterate) (pa_mainloop *, int, int *); -static int (*PULSEAUDIO_pa_mainloop_run) (pa_mainloop *, int *); -static void (*PULSEAUDIO_pa_mainloop_quit) (pa_mainloop *, int); -static void (*PULSEAUDIO_pa_mainloop_free) (pa_mainloop *); - -static pa_operation_state_t (*PULSEAUDIO_pa_operation_get_state) ( +static const char *(*PULSEAUDIO_pa_strerror)(int); +static pa_mainloop *(*PULSEAUDIO_pa_mainloop_new)(void); +static pa_mainloop_api *(*PULSEAUDIO_pa_mainloop_get_api)(pa_mainloop *); +static int (*PULSEAUDIO_pa_mainloop_iterate)(pa_mainloop *, int, int *); +static int (*PULSEAUDIO_pa_mainloop_run)(pa_mainloop *, int *); +static void (*PULSEAUDIO_pa_mainloop_quit)(pa_mainloop *, int); +static void (*PULSEAUDIO_pa_mainloop_free)(pa_mainloop *); + +static pa_operation_state_t (*PULSEAUDIO_pa_operation_get_state)( const pa_operation *); -static void (*PULSEAUDIO_pa_operation_cancel) (pa_operation *); -static void (*PULSEAUDIO_pa_operation_unref) (pa_operation *); - -static pa_context * (*PULSEAUDIO_pa_context_new) (pa_mainloop_api *, - const char *); -static int (*PULSEAUDIO_pa_context_connect) (pa_context *, const char *, - pa_context_flags_t, const pa_spawn_api *); -static pa_operation * (*PULSEAUDIO_pa_context_get_sink_info_list) (pa_context *, pa_sink_info_cb_t, void *); -static pa_operation * (*PULSEAUDIO_pa_context_get_source_info_list) (pa_context *, pa_source_info_cb_t, void *); -static pa_operation * (*PULSEAUDIO_pa_context_get_sink_info_by_index) (pa_context *, uint32_t, pa_sink_info_cb_t, void *); -static pa_operation * (*PULSEAUDIO_pa_context_get_source_info_by_index) (pa_context *, uint32_t, pa_source_info_cb_t, void *); -static pa_context_state_t (*PULSEAUDIO_pa_context_get_state) (const pa_context *); -static pa_operation * (*PULSEAUDIO_pa_context_subscribe) (pa_context *, pa_subscription_mask_t, pa_context_success_cb_t, void *); -static void (*PULSEAUDIO_pa_context_set_subscribe_callback) (pa_context *, pa_context_subscribe_cb_t, void *); -static void (*PULSEAUDIO_pa_context_disconnect) (pa_context *); -static void (*PULSEAUDIO_pa_context_unref) (pa_context *); - -static pa_stream * (*PULSEAUDIO_pa_stream_new) (pa_context *, const char *, - const pa_sample_spec *, const pa_channel_map *); -static int (*PULSEAUDIO_pa_stream_connect_playback) (pa_stream *, const char *, - const pa_buffer_attr *, pa_stream_flags_t, const pa_cvolume *, pa_stream *); -static int (*PULSEAUDIO_pa_stream_connect_record) (pa_stream *, const char *, - const pa_buffer_attr *, pa_stream_flags_t); -static pa_stream_state_t (*PULSEAUDIO_pa_stream_get_state) (const pa_stream *); -static size_t (*PULSEAUDIO_pa_stream_writable_size) (const pa_stream *); -static size_t (*PULSEAUDIO_pa_stream_readable_size) (const pa_stream *); -static int (*PULSEAUDIO_pa_stream_write) (pa_stream *, const void *, size_t, - pa_free_cb_t, int64_t, pa_seek_mode_t); -static pa_operation * (*PULSEAUDIO_pa_stream_drain) (pa_stream *, - pa_stream_success_cb_t, void *); -static int (*PULSEAUDIO_pa_stream_peek) (pa_stream *, const void **, size_t *); -static int (*PULSEAUDIO_pa_stream_drop) (pa_stream *); -static pa_operation * (*PULSEAUDIO_pa_stream_flush) (pa_stream *, - pa_stream_success_cb_t, void *); -static int (*PULSEAUDIO_pa_stream_disconnect) (pa_stream *); -static void (*PULSEAUDIO_pa_stream_unref) (pa_stream *); +static void (*PULSEAUDIO_pa_operation_cancel)(pa_operation *); +static void (*PULSEAUDIO_pa_operation_unref)(pa_operation *); + +static pa_context *(*PULSEAUDIO_pa_context_new)(pa_mainloop_api *, + const char *); +static int (*PULSEAUDIO_pa_context_connect)(pa_context *, const char *, + pa_context_flags_t, const pa_spawn_api *); +static pa_operation *(*PULSEAUDIO_pa_context_get_sink_info_list)(pa_context *, pa_sink_info_cb_t, void *); +static pa_operation *(*PULSEAUDIO_pa_context_get_source_info_list)(pa_context *, pa_source_info_cb_t, void *); +static pa_operation *(*PULSEAUDIO_pa_context_get_sink_info_by_index)(pa_context *, uint32_t, pa_sink_info_cb_t, void *); +static pa_operation *(*PULSEAUDIO_pa_context_get_source_info_by_index)(pa_context *, uint32_t, pa_source_info_cb_t, void *); +static pa_context_state_t (*PULSEAUDIO_pa_context_get_state)(const pa_context *); +static pa_operation *(*PULSEAUDIO_pa_context_subscribe)(pa_context *, pa_subscription_mask_t, pa_context_success_cb_t, void *); +static void (*PULSEAUDIO_pa_context_set_subscribe_callback)(pa_context *, pa_context_subscribe_cb_t, void *); +static void (*PULSEAUDIO_pa_context_disconnect)(pa_context *); +static void (*PULSEAUDIO_pa_context_unref)(pa_context *); + +static pa_stream *(*PULSEAUDIO_pa_stream_new)(pa_context *, const char *, + const pa_sample_spec *, const pa_channel_map *); +static int (*PULSEAUDIO_pa_stream_connect_playback)(pa_stream *, const char *, + const pa_buffer_attr *, pa_stream_flags_t, const pa_cvolume *, pa_stream *); +static int (*PULSEAUDIO_pa_stream_connect_record)(pa_stream *, const char *, + const pa_buffer_attr *, pa_stream_flags_t); +static pa_stream_state_t (*PULSEAUDIO_pa_stream_get_state)(const pa_stream *); +static size_t (*PULSEAUDIO_pa_stream_writable_size)(const pa_stream *); +static size_t (*PULSEAUDIO_pa_stream_readable_size)(const pa_stream *); +static int (*PULSEAUDIO_pa_stream_write)(pa_stream *, const void *, size_t, + pa_free_cb_t, int64_t, pa_seek_mode_t); +static pa_operation *(*PULSEAUDIO_pa_stream_drain)(pa_stream *, + pa_stream_success_cb_t, void *); +static int (*PULSEAUDIO_pa_stream_peek)(pa_stream *, const void **, size_t *); +static int (*PULSEAUDIO_pa_stream_drop)(pa_stream *); +static pa_operation *(*PULSEAUDIO_pa_stream_flush)(pa_stream *, + pa_stream_success_cb_t, void *); +static int (*PULSEAUDIO_pa_stream_disconnect)(pa_stream *); +static void (*PULSEAUDIO_pa_stream_unref)(pa_stream *); static void (*PULSEAUDIO_pa_stream_set_write_callback)(pa_stream *, pa_stream_request_cb_t, void *); -static pa_operation * (*PULSEAUDIO_pa_context_get_server_info)(pa_context *, pa_server_info_cb_t, void *); +static pa_operation *(*PULSEAUDIO_pa_context_get_server_info)(pa_context *, pa_server_info_cb_t, void *); static int load_pulseaudio_syms(void); - #ifdef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC static const char *pulseaudio_library = SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC; static void *pulseaudio_handle = NULL; -static int -load_pulseaudio_sym(const char *fn, void **addr) +static int load_pulseaudio_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(pulseaudio_handle, fn); if (*addr == NULL) { @@ -141,11 +133,11 @@ load_pulseaudio_sym(const char *fn, void **addr) } /* cast funcs to char* first, to please GCC's strict aliasing rules. */ -#define SDL_PULSEAUDIO_SYM(x) \ - if (!load_pulseaudio_sym(#x, (void **) (char *) &PULSEAUDIO_##x)) return -1 +#define SDL_PULSEAUDIO_SYM(x) \ + if (!load_pulseaudio_sym(#x, (void **)(char *)&PULSEAUDIO_##x)) \ + return -1 -static void -UnloadPulseAudioLibrary(void) +static void UnloadPulseAudioLibrary(void) { if (pulseaudio_handle != NULL) { SDL_UnloadObject(pulseaudio_handle); @@ -153,8 +145,7 @@ UnloadPulseAudioLibrary(void) } } -static int -LoadPulseAudioLibrary(void) +static int LoadPulseAudioLibrary(void) { int retval = 0; if (pulseaudio_handle == NULL) { @@ -176,13 +167,11 @@ LoadPulseAudioLibrary(void) #define SDL_PULSEAUDIO_SYM(x) PULSEAUDIO_##x = x -static void -UnloadPulseAudioLibrary(void) +static void UnloadPulseAudioLibrary(void) { } -static int -LoadPulseAudioLibrary(void) +static int LoadPulseAudioLibrary(void) { load_pulseaudio_syms(); return 0; @@ -190,9 +179,7 @@ LoadPulseAudioLibrary(void) #endif /* SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */ - -static int -load_pulseaudio_syms(void) +static int load_pulseaudio_syms(void) { SDL_PULSEAUDIO_SYM(pa_get_library_version); SDL_PULSEAUDIO_SYM(pa_mainloop_new); @@ -235,15 +222,13 @@ load_pulseaudio_syms(void) return 0; } -static SDL_INLINE int -squashVersion(const int major, const int minor, const int patch) +static SDL_INLINE int squashVersion(const int major, const int minor, const int patch) { return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF); } /* Workaround for older pulse: pa_context_new() must have non-NULL appname */ -static const char * -getAppName(void) +static const char *getAppName(void) { const char *retval = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME); if (retval && *retval) { @@ -254,12 +239,12 @@ getAppName(void) return retval; } else { const char *verstr = PULSEAUDIO_pa_get_library_version(); - retval = "SDL Application"; /* the "oh well" default. */ + retval = "SDL Application"; /* the "oh well" default. */ if (verstr != NULL) { int maj, min, patch; if (SDL_sscanf(verstr, "%d.%d.%d", &maj, &min, &patch) == 3) { if (squashVersion(maj, min, patch) >= squashVersion(0, 9, 15)) { - retval = NULL; /* 0.9.15+ handles NULL correctly. */ + retval = NULL; /* 0.9.15+ handles NULL correctly. */ } } } @@ -267,8 +252,7 @@ getAppName(void) return retval; } -static void -WaitForPulseOperation(pa_mainloop *mainloop, pa_operation *o) +static void WaitForPulseOperation(pa_mainloop *mainloop, pa_operation *o) { /* This checks for NO errors currently. Either fix that, check results elsewhere, or do things you don't care about. */ if (mainloop && o) { @@ -280,8 +264,7 @@ WaitForPulseOperation(pa_mainloop *mainloop, pa_operation *o) } } -static void -DisconnectFromPulseServer(pa_mainloop *mainloop, pa_context *context) +static void DisconnectFromPulseServer(pa_mainloop *mainloop, pa_context *context) { if (context) { PULSEAUDIO_pa_context_disconnect(context); @@ -292,8 +275,7 @@ DisconnectFromPulseServer(pa_mainloop *mainloop, pa_context *context) } } -static int -ConnectToPulseServer_Internal(pa_mainloop **_mainloop, pa_context **_context) +static int ConnectToPulseServer_Internal(pa_mainloop **_mainloop, pa_context **_context) { pa_mainloop *mainloop = NULL; pa_context *context = NULL; @@ -309,10 +291,10 @@ ConnectToPulseServer_Internal(pa_mainloop **_mainloop, pa_context **_context) } mainloop_api = PULSEAUDIO_pa_mainloop_get_api(mainloop); - SDL_assert(mainloop_api); /* this never fails, right? */ + SDL_assert(mainloop_api); /* this never fails, right? */ context = PULSEAUDIO_pa_context_new(mainloop_api, getAppName()); - if (!context) { + if (context == NULL) { PULSEAUDIO_pa_mainloop_free(mainloop); return SDL_SetError("pa_context_new() failed"); } @@ -341,11 +323,10 @@ ConnectToPulseServer_Internal(pa_mainloop **_mainloop, pa_context **_context) *_context = context; *_mainloop = mainloop; - return 0; /* connected and ready! */ + return 0; /* connected and ready! */ } -static int -ConnectToPulseServer(pa_mainloop **_mainloop, pa_context **_context) +static int ConnectToPulseServer(pa_mainloop **_mainloop, pa_context **_context) { const int retval = ConnectToPulseServer_Internal(_mainloop, _context); if (retval < 0) { @@ -354,23 +335,20 @@ ConnectToPulseServer(pa_mainloop **_mainloop, pa_context **_context) return retval; } - /* This function waits until it is possible to write a full sound buffer */ -static void -PULSEAUDIO_WaitDevice(_THIS) +static void PULSEAUDIO_WaitDevice(_THIS) { /* this is a no-op; we wait in PULSEAUDIO_PlayDevice now. */ } static void WriteCallback(pa_stream *p, size_t nbytes, void *userdata) { - struct SDL_PrivateAudioData *h = (struct SDL_PrivateAudioData *) userdata; + struct SDL_PrivateAudioData *h = (struct SDL_PrivateAudioData *)userdata; /*printf("PULSEAUDIO WRITE CALLBACK! nbytes=%u\n", (unsigned int) nbytes);*/ h->bytes_requested += nbytes; } -static void -PULSEAUDIO_PlayDevice(_THIS) +static void PULSEAUDIO_PlayDevice(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; int available = h->mixlen; @@ -405,15 +383,12 @@ PULSEAUDIO_PlayDevice(_THIS) /*printf("PULSEAUDIO PLAYDEVICE END! written=%d\n", written);*/ } -static Uint8 * -PULSEAUDIO_GetDeviceBuf(_THIS) +static Uint8 *PULSEAUDIO_GetDeviceBuf(_THIS) { return this->hidden->mixbuf; } - -static int -PULSEAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int PULSEAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { struct SDL_PrivateAudioData *h = this->hidden; const void *data = NULL; @@ -428,40 +403,40 @@ PULSEAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) h->capturelen -= cpy; if (h->capturelen == 0) { h->capturebuf = NULL; - PULSEAUDIO_pa_stream_drop(h->stream); /* done with this fragment. */ + PULSEAUDIO_pa_stream_drop(h->stream); /* done with this fragment. */ } - return cpy; /* new data, return it. */ + return cpy; /* new data, return it. */ } if (PULSEAUDIO_pa_context_get_state(h->context) != PA_CONTEXT_READY || PULSEAUDIO_pa_stream_get_state(h->stream) != PA_STREAM_READY || PULSEAUDIO_pa_mainloop_iterate(h->mainloop, 1, NULL) < 0) { SDL_OpenedAudioDeviceDisconnected(this); - return -1; /* uhoh, pulse failed! */ + return -1; /* uhoh, pulse failed! */ } if (PULSEAUDIO_pa_stream_readable_size(h->stream) == 0) { - continue; /* no data available yet. */ + continue; /* no data available yet. */ } /* a new fragment is available! */ PULSEAUDIO_pa_stream_peek(h->stream, &data, &nbytes); SDL_assert(nbytes > 0); - if (data == NULL) { /* NULL==buffer had a hole. Ignore that. */ - PULSEAUDIO_pa_stream_drop(h->stream); /* drop this fragment. */ + /* If data == NULL, then the buffer had a hole, ignore that */ + if (data == NULL) { + PULSEAUDIO_pa_stream_drop(h->stream); /* drop this fragment. */ } else { /* store this fragment's data, start feeding it to SDL. */ /*printf("PULSEAUDIO: captured %d new bytes\n", (int) nbytes);*/ - h->capturebuf = (const Uint8 *) data; + h->capturebuf = (const Uint8 *)data; h->capturelen = nbytes; } } - return -1; /* not enabled? */ + return -1; /* not enabled? */ } -static void -PULSEAUDIO_FlushCapture(_THIS) +static void PULSEAUDIO_FlushCapture(_THIS) { struct SDL_PrivateAudioData *h = this->hidden; const void *data = NULL; @@ -478,21 +453,20 @@ PULSEAUDIO_FlushCapture(_THIS) PULSEAUDIO_pa_stream_get_state(h->stream) != PA_STREAM_READY || PULSEAUDIO_pa_mainloop_iterate(h->mainloop, 1, NULL) < 0) { SDL_OpenedAudioDeviceDisconnected(this); - return; /* uhoh, pulse failed! */ + return; /* uhoh, pulse failed! */ } if (PULSEAUDIO_pa_stream_readable_size(h->stream) == 0) { - break; /* no data available, so we're done. */ + break; /* no data available, so we're done. */ } /* a new fragment is available! Just dump it. */ PULSEAUDIO_pa_stream_peek(h->stream, &data, &nbytes); - PULSEAUDIO_pa_stream_drop(h->stream); /* drop this fragment. */ + PULSEAUDIO_pa_stream_drop(h->stream); /* drop this fragment. */ } } -static void -PULSEAUDIO_CloseDevice(_THIS) +static void PULSEAUDIO_CloseDevice(_THIS) { if (this->hidden->stream) { if (this->hidden->capturebuf != NULL) { @@ -508,48 +482,44 @@ PULSEAUDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static void -SinkDeviceNameCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) +static void SinkDeviceNameCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) { if (i) { - char **devname = (char **) data; + char **devname = (char **)data; *devname = SDL_strdup(i->name); } } -static void -SourceDeviceNameCallback(pa_context *c, const pa_source_info *i, int is_last, void *data) +static void SourceDeviceNameCallback(pa_context *c, const pa_source_info *i, int is_last, void *data) { if (i) { - char **devname = (char **) data; + char **devname = (char **)data; *devname = SDL_strdup(i->name); } } -static SDL_bool -FindDeviceName(struct SDL_PrivateAudioData *h, const SDL_bool iscapture, void *handle) +static SDL_bool FindDeviceName(struct SDL_PrivateAudioData *h, const SDL_bool iscapture, void *handle) { - const uint32_t idx = ((uint32_t) ((intptr_t) handle)) - 1; + const uint32_t idx = ((uint32_t)((intptr_t)handle)) - 1; - if (handle == NULL) { /* NULL == default device. */ + if (handle == NULL) { /* NULL == default device. */ return SDL_TRUE; } if (iscapture) { WaitForPulseOperation(h->mainloop, - PULSEAUDIO_pa_context_get_source_info_by_index(h->context, idx, - SourceDeviceNameCallback, &h->device_name)); + PULSEAUDIO_pa_context_get_source_info_by_index(h->context, idx, + SourceDeviceNameCallback, &h->device_name)); } else { WaitForPulseOperation(h->mainloop, - PULSEAUDIO_pa_context_get_sink_info_by_index(h->context, idx, - SinkDeviceNameCallback, &h->device_name)); + PULSEAUDIO_pa_context_get_sink_info_by_index(h->context, idx, + SinkDeviceNameCallback, &h->device_name)); } - return (h->device_name != NULL); + return h->device_name != NULL; } -static int -PULSEAUDIO_OpenDevice(_THIS, const char *devname) +static int PULSEAUDIO_OpenDevice(_THIS, const char *devname) { struct SDL_PrivateAudioData *h = NULL; SDL_AudioFormat test_format; @@ -563,8 +533,7 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname) int rc = 0; /* Initialize all variables that we clean on shutdown */ - h = this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + h = this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -614,7 +583,7 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname) /* Allocate mixing buffer */ if (!iscapture) { h->mixlen = this->spec.size; - h->mixbuf = (Uint8 *) SDL_malloc(h->mixlen); + h->mixbuf = (Uint8 *)SDL_malloc(h->mixlen); if (h->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -650,9 +619,9 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname) h->stream = PULSEAUDIO_pa_stream_new( h->context, (name && *name) ? name : "Audio Stream", /* stream description */ - &paspec, /* sample format spec */ - &pacmap /* channel map */ - ); + &paspec, /* sample format spec */ + &pacmap /* channel map */ + ); if (h->stream == NULL) { return SDL_SetError("Could not set up PulseAudio stream"); @@ -702,8 +671,7 @@ static char *default_source_name = NULL; /* device handles are device index + 1, cast to void*, so we never pass a NULL. */ -static SDL_AudioFormat -PulseFormatToSDLFormat(pa_sample_format_t format) +static SDL_AudioFormat PulseFormatToSDLFormat(pa_sample_format_t format) { switch (format) { case PA_SAMPLE_U8: @@ -726,11 +694,10 @@ PulseFormatToSDLFormat(pa_sample_format_t format) } /* This is called when PulseAudio adds an output ("sink") device. */ -static void -SinkInfoCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) +static void SinkInfoCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) { SDL_AudioSpec spec; - SDL_bool add = (SDL_bool) ((intptr_t) data); + SDL_bool add = (SDL_bool)((intptr_t)data); if (i) { spec.freq = i->sample_spec.rate; spec.channels = i->sample_spec.channels; @@ -742,7 +709,7 @@ SinkInfoCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) spec.userdata = NULL; if (add) { - SDL_AddAudioDevice(SDL_FALSE, i->description, &spec, (void *) ((intptr_t) i->index+1)); + SDL_AddAudioDevice(SDL_FALSE, i->description, &spec, (void *)((intptr_t)i->index + 1)); } if (default_sink_path != NULL && SDL_strcmp(i->name, default_sink_path) == 0) { @@ -755,11 +722,10 @@ SinkInfoCallback(pa_context *c, const pa_sink_info *i, int is_last, void *data) } /* This is called when PulseAudio adds a capture ("source") device. */ -static void -SourceInfoCallback(pa_context *c, const pa_source_info *i, int is_last, void *data) +static void SourceInfoCallback(pa_context *c, const pa_source_info *i, int is_last, void *data) { SDL_AudioSpec spec; - SDL_bool add = (SDL_bool) ((intptr_t) data); + SDL_bool add = (SDL_bool)((intptr_t)data); if (i) { /* Maybe skip "monitor" sources. These are just output from other sinks. */ if (include_monitors || (i->monitor_of_sink == PA_INVALID_INDEX)) { @@ -773,7 +739,7 @@ SourceInfoCallback(pa_context *c, const pa_source_info *i, int is_last, void *da spec.userdata = NULL; if (add) { - SDL_AddAudioDevice(SDL_TRUE, i->description, &spec, (void *) ((intptr_t) i->index+1)); + SDL_AddAudioDevice(SDL_TRUE, i->description, &spec, (void *)((intptr_t)i->index + 1)); } if (default_source_path != NULL && SDL_strcmp(i->name, default_source_path) == 0) { @@ -786,8 +752,7 @@ SourceInfoCallback(pa_context *c, const pa_source_info *i, int is_last, void *da } } -static void -ServerInfoCallback(pa_context *c, const pa_server_info *i, void *data) +static void ServerInfoCallback(pa_context *c, const pa_server_info *i, void *data) { if (default_sink_path != NULL) { SDL_free(default_sink_path); @@ -800,14 +765,13 @@ ServerInfoCallback(pa_context *c, const pa_server_info *i, void *data) } /* This is called when PulseAudio has a device connected/removed/changed. */ -static void -HotplugCallback(pa_context *c, pa_subscription_event_type_t t, uint32_t idx, void *data) +static void HotplugCallback(pa_context *c, pa_subscription_event_type_t t, uint32_t idx, void *data) { const SDL_bool added = ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW); const SDL_bool removed = ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE); const SDL_bool changed = ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_CHANGE); - if (added || removed || changed) { /* we only care about add/remove events. */ + if (added || removed || changed) { /* we only care about add/remove events. */ const SDL_bool sink = ((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK); const SDL_bool source = ((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SOURCE); @@ -816,45 +780,42 @@ HotplugCallback(pa_context *c, pa_subscription_event_type_t t, uint32_t idx, voi if (changed) { PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL); } - PULSEAUDIO_pa_context_get_sink_info_by_index(hotplug_context, idx, SinkInfoCallback, (void*) ((intptr_t) added)); + PULSEAUDIO_pa_context_get_sink_info_by_index(hotplug_context, idx, SinkInfoCallback, (void *)((intptr_t)added)); } else if ((added || changed) && source) { if (changed) { PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL); } - PULSEAUDIO_pa_context_get_source_info_by_index(hotplug_context, idx, SourceInfoCallback, (void*) ((intptr_t) added)); + PULSEAUDIO_pa_context_get_source_info_by_index(hotplug_context, idx, SourceInfoCallback, (void *)((intptr_t)added)); } else if (removed && (sink || source)) { /* removes we can handle just with the device index. */ - SDL_RemoveAudioDevice(source != 0, (void *) ((intptr_t) idx+1)); + SDL_RemoveAudioDevice(source != 0, (void *)((intptr_t)idx + 1)); } } } /* this runs as a thread while the Pulse target is initialized to catch hotplug events. */ -static int SDLCALL -HotplugThread(void *data) +static int SDLCALL HotplugThread(void *data) { pa_operation *o; SDL_SetThreadPriority(SDL_THREAD_PRIORITY_LOW); PULSEAUDIO_pa_context_set_subscribe_callback(hotplug_context, HotplugCallback, NULL); o = PULSEAUDIO_pa_context_subscribe(hotplug_context, PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SOURCE, NULL, NULL); - PULSEAUDIO_pa_operation_unref(o); /* don't wait for it, just do our thing. */ + PULSEAUDIO_pa_operation_unref(o); /* don't wait for it, just do our thing. */ PULSEAUDIO_pa_mainloop_run(hotplug_mainloop, NULL); return 0; } -static void -PULSEAUDIO_DetectDevices() +static void PULSEAUDIO_DetectDevices() { WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL)); - WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_sink_info_list(hotplug_context, SinkInfoCallback, (void*) ((intptr_t) SDL_TRUE))); - WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_source_info_list(hotplug_context, SourceInfoCallback, (void*) ((intptr_t) SDL_TRUE))); + WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_sink_info_list(hotplug_context, SinkInfoCallback, (void *)((intptr_t)SDL_TRUE))); + WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_source_info_list(hotplug_context, SourceInfoCallback, (void *)((intptr_t)SDL_TRUE))); /* ok, we have a sane list, let's set up hotplug notifications now... */ hotplug_thread = SDL_CreateThreadInternal(HotplugThread, "PulseHotplug", 256 * 1024, NULL); } -static int -PULSEAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +static int PULSEAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { int i; int numdevices; @@ -885,8 +846,7 @@ PULSEAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) return SDL_SetError("Could not find default PulseAudio device"); } -static void -PULSEAUDIO_Deinitialize(void) +static void PULSEAUDIO_Deinitialize(void) { if (hotplug_thread) { PULSEAUDIO_pa_mainloop_quit(hotplug_mainloop, 0); @@ -918,8 +878,7 @@ PULSEAUDIO_Deinitialize(void) UnloadPulseAudioLibrary(); } -static SDL_bool -PULSEAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool PULSEAUDIO_Init(SDL_AudioDriverImpl *impl) { if (LoadPulseAudioLibrary() < 0) { return SDL_FALSE; @@ -947,7 +906,7 @@ PULSEAUDIO_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap PULSEAUDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h b/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h index 0f42512..3b2ee32 100644 --- a/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h +++ b/modules/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h @@ -43,7 +43,7 @@ struct SDL_PrivateAudioData Uint8 *mixbuf; int mixlen; - int bytes_requested; /* bytes of data the hardware wants _now_. */ + int bytes_requested; /* bytes of data the hardware wants _now_. */ const Uint8 *capturebuf; int capturelen; diff --git a/modules/SDL2/src/audio/qsa/SDL_qsa_audio.c b/modules/SDL2/src/audio/qsa/SDL_qsa_audio.c index 828d258..0ab4774 100644 --- a/modules/SDL2/src/audio/qsa/SDL_qsa_audio.c +++ b/modules/SDL2/src/audio/qsa/SDL_qsa_audio.c @@ -74,15 +74,13 @@ uint32_t qsa_playback_devices; QSA_Device qsa_capture_device[QSA_MAX_DEVICES]; uint32_t qsa_capture_devices; -static SDL_INLINE int -QSA_SetError(const char *fn, int status) +static int QSA_SetError(const char *fn, int status) { return SDL_SetError("QSA: %s() failed: %s", fn, snd_strerror(status)); } /* !!! FIXME: does this need to be here? Does the SDL version not work? */ -static void -QSA_ThreadInit(_THIS) +static void QSA_ThreadInit(_THIS) { /* Increase default 10 priority to 25 to avoid jerky sound */ struct sched_param param; @@ -93,8 +91,7 @@ QSA_ThreadInit(_THIS) } /* PCM channel parameters initialize function */ -static void -QSA_InitAudioParams(snd_pcm_channel_params_t * cpars) +static void QSA_InitAudioParams(snd_pcm_channel_params_t * cpars) { SDL_zerop(cpars); cpars->channel = SND_PCM_CHANNEL_PLAYBACK; @@ -111,8 +108,7 @@ QSA_InitAudioParams(snd_pcm_channel_params_t * cpars) } /* This function waits until it is possible to write a full sound buffer */ -static void -QSA_WaitDevice(_THIS) +static void QSA_WaitDevice(_THIS) { int result; @@ -137,8 +133,7 @@ QSA_WaitDevice(_THIS) } } -static void -QSA_PlayDevice(_THIS) +static void QSA_PlayDevice(_THIS) { snd_pcm_channel_status_t cstatus; int written; @@ -230,14 +225,12 @@ QSA_PlayDevice(_THIS) } } -static Uint8 * -QSA_GetDeviceBuf(_THIS) +static Uint8 *QSA_GetDeviceBuf(_THIS) { return this->hidden->pcm_buf; } -static void -QSA_CloseDevice(_THIS) +static void QSA_CloseDevice(_THIS) { if (this->hidden->audio_handle != NULL) { if (!this->iscapture) { @@ -256,8 +249,7 @@ QSA_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -QSA_OpenDevice(_THIS, const char *devname) +static int QSA_OpenDevice(_THIS, const char *devname) { const QSA_Device *device = (const QSA_Device *) this->handle; SDL_bool iscapture = this->iscapture; @@ -435,8 +427,7 @@ QSA_OpenDevice(_THIS, const char *devname) return 0; } -static void -QSA_DetectDevices(void) +static void QSA_DetectDevices(void) { uint32_t it; uint32_t cards; @@ -581,8 +572,7 @@ QSA_DetectDevices(void) } } -static void -QSA_Deinitialize(void) +static void QSA_Deinitialize(void) { /* Clear devices array on shutdown */ /* !!! FIXME: we zero these on init...any reason to do it here? */ @@ -592,8 +582,7 @@ QSA_Deinitialize(void) qsa_capture_devices = 0; } -static SDL_bool -QSA_Init(SDL_AudioDriverImpl * impl) +static SDL_bool QSA_Init(SDL_AudioDriverImpl * impl) { /* Clear devices array */ SDL_zeroa(qsa_playback_device); diff --git a/modules/SDL2/src/audio/sndio/SDL_sndioaudio.c b/modules/SDL2/src/audio/sndio/SDL_sndioaudio.c index fcddbf2..d62d179 100644 --- a/modules/SDL2/src/audio/sndio/SDL_sndioaudio.c +++ b/modules/SDL2/src/audio/sndio/SDL_sndioaudio.c @@ -52,7 +52,7 @@ #define SIO_DEVANY "default" #endif -static struct sio_hdl * (*SNDIO_sio_open)(const char *, unsigned int, int); +static struct sio_hdl *(*SNDIO_sio_open)(const char *, unsigned int, int); static void (*SNDIO_sio_close)(struct sio_hdl *); static int (*SNDIO_sio_setpar)(struct sio_hdl *, struct sio_par *); static int (*SNDIO_sio_getpar)(struct sio_hdl *, struct sio_par *); @@ -70,8 +70,7 @@ static void (*SNDIO_sio_initpar)(struct sio_par *); static const char *sndio_library = SDL_AUDIO_DRIVER_SNDIO_DYNAMIC; static void *sndio_handle = NULL; -static int -load_sndio_sym(const char *fn, void **addr) +static int load_sndio_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(sndio_handle, fn); if (*addr == NULL) { @@ -83,14 +82,14 @@ load_sndio_sym(const char *fn, void **addr) } /* cast funcs to char* first, to please GCC's strict aliasing rules. */ -#define SDL_SNDIO_SYM(x) \ - if (!load_sndio_sym(#x, (void **) (char *) &SNDIO_##x)) return -1 +#define SDL_SNDIO_SYM(x) \ + if (!load_sndio_sym(#x, (void **)(char *)&SNDIO_##x)) \ + return -1 #else #define SDL_SNDIO_SYM(x) SNDIO_##x = x #endif -static int -load_sndio_syms(void) +static int load_sndio_syms(void) { SDL_SNDIO_SYM(sio_open); SDL_SNDIO_SYM(sio_close); @@ -112,8 +111,7 @@ load_sndio_syms(void) #ifdef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC -static void -UnloadSNDIOLibrary(void) +static void UnloadSNDIOLibrary(void) { if (sndio_handle != NULL) { SDL_UnloadObject(sndio_handle); @@ -121,8 +119,7 @@ UnloadSNDIOLibrary(void) } } -static int -LoadSNDIOLibrary(void) +static int LoadSNDIOLibrary(void) { int retval = 0; if (sndio_handle == NULL) { @@ -142,13 +139,11 @@ LoadSNDIOLibrary(void) #else -static void -UnloadSNDIOLibrary(void) +static void UnloadSNDIOLibrary(void) { } -static int -LoadSNDIOLibrary(void) +static int LoadSNDIOLibrary(void) { load_sndio_syms(); return 0; @@ -156,24 +151,19 @@ LoadSNDIOLibrary(void) #endif /* SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */ - - - -static void -SNDIO_WaitDevice(_THIS) +static void SNDIO_WaitDevice(_THIS) { /* no-op; SNDIO_sio_write() blocks if necessary. */ } -static void -SNDIO_PlayDevice(_THIS) +static void SNDIO_PlayDevice(_THIS) { const int written = SNDIO_sio_write(this->hidden->dev, this->hidden->mixbuf, this->hidden->mixlen); /* If we couldn't write, assume fatal error for now */ - if ( written == 0 ) { + if (written == 0) { SDL_OpenedAudioDeviceDisconnected(this); } #ifdef DEBUG_AUDIO @@ -181,8 +171,7 @@ SNDIO_PlayDevice(_THIS) #endif } -static int -SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) { size_t r; int revents; @@ -191,8 +180,8 @@ SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) /* Emulate a blocking read */ r = SNDIO_sio_read(this->hidden->dev, buffer, buflen); while (r == 0 && !SNDIO_sio_eof(this->hidden->dev)) { - if ((nfds = SNDIO_sio_pollfd(this->hidden->dev, this->hidden->pfd, POLLIN)) <= 0 - || poll(this->hidden->pfd, nfds, INFTIM) < 0) { + nfds = SNDIO_sio_pollfd(this->hidden->dev, this->hidden->pfd, POLLIN); + if (nfds <= 0 || poll(this->hidden->pfd, nfds, INFTIM) < 0) { return -1; } revents = SNDIO_sio_revents(this->hidden->dev, this->hidden->pfd); @@ -203,11 +192,10 @@ SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) break; } } - return (int) r; + return (int)r; } -static void -SNDIO_FlushCapture(_THIS) +static void SNDIO_FlushCapture(_THIS) { char buf[512]; @@ -216,19 +204,17 @@ SNDIO_FlushCapture(_THIS) } } -static Uint8 * -SNDIO_GetDeviceBuf(_THIS) +static Uint8 *SNDIO_GetDeviceBuf(_THIS) { return this->hidden->mixbuf; } -static void -SNDIO_CloseDevice(_THIS) +static void SNDIO_CloseDevice(_THIS) { - if ( this->hidden->pfd != NULL ) { + if (this->hidden->pfd != NULL) { SDL_free(this->hidden->pfd); } - if ( this->hidden->dev != NULL ) { + if (this->hidden->dev != NULL) { SNDIO_sio_stop(this->hidden->dev); SNDIO_sio_close(this->hidden->dev); } @@ -236,8 +222,7 @@ SNDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -SNDIO_OpenDevice(_THIS, const char *devname) +static int SNDIO_OpenDevice(_THIS, const char *devname) { SDL_AudioFormat test_format; struct sio_par par; @@ -253,16 +238,18 @@ SNDIO_OpenDevice(_THIS, const char *devname) this->hidden->mixlen = this->spec.size; /* Capture devices must be non-blocking for SNDIO_FlushCapture */ - if ((this->hidden->dev = - SNDIO_sio_open(devname != NULL ? devname : SIO_DEVANY, - iscapture ? SIO_REC : SIO_PLAY, iscapture)) == NULL) { + this->hidden->dev = SNDIO_sio_open(devname != NULL ? devname : SIO_DEVANY, + iscapture ? SIO_REC : SIO_PLAY, iscapture); + if (this->hidden->dev == NULL) { return SDL_SetError("sio_open() failed"); } /* Allocate the pollfd array for capture devices */ - if (iscapture && (this->hidden->pfd = - SDL_malloc(sizeof(struct pollfd) * SNDIO_sio_nfds(this->hidden->dev))) == NULL) { - return SDL_OutOfMemory(); + if (iscapture) { + this->hidden->pfd = SDL_malloc(sizeof(struct pollfd) * SNDIO_sio_nfds(this->hidden->dev)); + if (this->hidden->pfd == NULL) { + return SDL_OutOfMemory(); + } } SNDIO_sio_initpar(&par); @@ -298,23 +285,23 @@ SNDIO_OpenDevice(_THIS, const char *devname) return SDL_SetError("%s: Unsupported audio format", "sndio"); } - if ((par.bps == 4) && (par.sig) && (par.le)) + if ((par.bps == 4) && (par.sig) && (par.le)) { this->spec.format = AUDIO_S32LSB; - else if ((par.bps == 4) && (par.sig) && (!par.le)) + } else if ((par.bps == 4) && (par.sig) && (!par.le)) { this->spec.format = AUDIO_S32MSB; - else if ((par.bps == 2) && (par.sig) && (par.le)) + } else if ((par.bps == 2) && (par.sig) && (par.le)) { this->spec.format = AUDIO_S16LSB; - else if ((par.bps == 2) && (par.sig) && (!par.le)) + } else if ((par.bps == 2) && (par.sig) && (!par.le)) { this->spec.format = AUDIO_S16MSB; - else if ((par.bps == 2) && (!par.sig) && (par.le)) + } else if ((par.bps == 2) && (!par.sig) && (par.le)) { this->spec.format = AUDIO_U16LSB; - else if ((par.bps == 2) && (!par.sig) && (!par.le)) + } else if ((par.bps == 2) && (!par.sig) && (!par.le)) { this->spec.format = AUDIO_U16MSB; - else if ((par.bps == 1) && (par.sig)) + } else if ((par.bps == 1) && (par.sig)) { this->spec.format = AUDIO_S8; - else if ((par.bps == 1) && (!par.sig)) + } else if ((par.bps == 1) && (!par.sig)) { this->spec.format = AUDIO_U8; - else { + } else { return SDL_SetError("sndio: Got unsupported hardware audio format."); } @@ -327,7 +314,7 @@ SNDIO_OpenDevice(_THIS, const char *devname) /* Allocate mixing buffer */ this->hidden->mixlen = this->spec.size; - this->hidden->mixbuf = (Uint8 *) SDL_malloc(this->hidden->mixlen); + this->hidden->mixbuf = (Uint8 *)SDL_malloc(this->hidden->mixlen); if (this->hidden->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -341,21 +328,18 @@ SNDIO_OpenDevice(_THIS, const char *devname) return 0; } -static void -SNDIO_Deinitialize(void) +static void SNDIO_Deinitialize(void) { UnloadSNDIOLibrary(); } -static void -SNDIO_DetectDevices(void) +static void SNDIO_DetectDevices(void) { - SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *) 0x1); - SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) 0x2); + SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *)0x1); + SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *)0x2); } -static SDL_bool -SNDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool SNDIO_Init(SDL_AudioDriverImpl *impl) { if (LoadSNDIOLibrary() < 0) { return SDL_FALSE; @@ -375,7 +359,7 @@ SNDIO_Init(SDL_AudioDriverImpl * impl) impl->AllowsArbitraryDeviceNames = SDL_TRUE; impl->HasCaptureSupport = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap SNDIO_bootstrap = { diff --git a/modules/SDL2/src/audio/sndio/SDL_sndioaudio.h b/modules/SDL2/src/audio/sndio/SDL_sndioaudio.h index 2666d69..d447c16 100644 --- a/modules/SDL2/src/audio/sndio/SDL_sndioaudio.h +++ b/modules/SDL2/src/audio/sndio/SDL_sndioaudio.h @@ -29,7 +29,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/modules/SDL2/src/audio/sun/SDL_sunaudio.c b/modules/SDL2/src/audio/sun/SDL_sunaudio.c index 4fdd74a..25deb90 100644 --- a/modules/SDL2/src/audio/sun/SDL_sunaudio.c +++ b/modules/SDL2/src/audio/sun/SDL_sunaudio.c @@ -55,15 +55,13 @@ static Uint8 snd2au(int sample); /* Audio driver bootstrap functions */ -static void -SUNAUDIO_DetectDevices(void) +static void SUNAUDIO_DetectDevices(void) { SDL_EnumUnixAudioDevices(1, (int (*)(int)) NULL); } #ifdef DEBUG_AUDIO -void -CheckUnderflow(_THIS) +void CheckUnderflow(_THIS) { #ifdef AUDIO_GETBUFINFO audio_info_t info; @@ -78,8 +76,7 @@ CheckUnderflow(_THIS) } #endif -static void -SUNAUDIO_WaitDevice(_THIS) +static void SUNAUDIO_WaitDevice(_THIS) { #ifdef AUDIO_GETBUFINFO #define SLEEP_FUDGE 10 /* 10 ms scheduling fudge factor */ @@ -102,8 +99,7 @@ SUNAUDIO_WaitDevice(_THIS) #endif } -static void -SUNAUDIO_PlayDevice(_THIS) +static void SUNAUDIO_PlayDevice(_THIS) { /* Write the audio data */ if (this->hidden->ulaw_only) { @@ -170,14 +166,12 @@ SUNAUDIO_PlayDevice(_THIS) } } -static Uint8 * -SUNAUDIO_GetDeviceBuf(_THIS) +static Uint8 *SUNAUDIO_GetDeviceBuf(_THIS) { return (this->hidden->mixbuf); } -static void -SUNAUDIO_CloseDevice(_THIS) +static void SUNAUDIO_CloseDevice(_THIS) { SDL_free(this->hidden->ulaw_buf); if (this->hidden->audio_fd >= 0) { @@ -187,8 +181,7 @@ SUNAUDIO_CloseDevice(_THIS) SDL_free(this->hidden); } -static int -SUNAUDIO_OpenDevice(_THIS, const char *devname) +static int SUNAUDIO_OpenDevice(_THIS, const char *devname) { #ifdef AUDIO_SETINFO int enc; @@ -209,8 +202,7 @@ SUNAUDIO_OpenDevice(_THIS, const char *devname) } /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -360,8 +352,7 @@ SUNAUDIO_OpenDevice(_THIS, const char *devname) /* provided "as is" without express or implied warranty. */ /************************************************************************/ -static Uint8 -snd2au(int sample) +static Uint8 snd2au(int sample) { int mask; @@ -395,8 +386,7 @@ snd2au(int sample) return (mask & sample); } -static SDL_bool -SUNAUDIO_Init(SDL_AudioDriverImpl * impl) +static SDL_bool SUNAUDIO_Init(SDL_AudioDriverImpl * impl) { /* Set the function pointers */ impl->DetectDevices = SUNAUDIO_DetectDevices; diff --git a/modules/SDL2/src/audio/vita/SDL_vitaaudio.c b/modules/SDL2/src/audio/vita/SDL_vitaaudio.c index 637baba..058896b 100644 --- a/modules/SDL2/src/audio/vita/SDL_vitaaudio.c +++ b/modules/SDL2/src/audio/vita/SDL_vitaaudio.c @@ -39,11 +39,10 @@ #include #include -#define SCE_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63) -#define SCE_AUDIO_MAX_VOLUME 0x8000 +#define SCE_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63) +#define SCE_AUDIO_MAX_VOLUME 0x8000 -static int -VITAAUD_OpenCaptureDevice(_THIS) +static int VITAAUD_OpenCaptureDevice(_THIS) { this->spec.freq = 16000; this->spec.samples = 512; @@ -51,7 +50,7 @@ VITAAUD_OpenCaptureDevice(_THIS) SDL_CalculateAudioSpec(&this->spec); - this->hidden->port = sceAudioInOpenPort(SCE_AUDIO_IN_PORT_TYPE_VOICE , 512, 16000, SCE_AUDIO_IN_PARAM_FORMAT_S16_MONO); + this->hidden->port = sceAudioInOpenPort(SCE_AUDIO_IN_PORT_TYPE_VOICE, 512, 16000, SCE_AUDIO_IN_PARAM_FORMAT_S16_MONO); if (this->hidden->port < 0) { return SDL_SetError("Couldn't open audio in port: %x", this->hidden->port); @@ -60,11 +59,10 @@ VITAAUD_OpenCaptureDevice(_THIS) return 0; } -static int -VITAAUD_OpenDevice(_THIS, const char *devname) +static int VITAAUD_OpenDevice(_THIS, const char *devname) { int format, mixlen, i, port = SCE_AUDIO_OUT_PORT_TYPE_MAIN; - int vols[2] = {SCE_AUDIO_MAX_VOLUME, SCE_AUDIO_MAX_VOLUME}; + int vols[2] = { SCE_AUDIO_MAX_VOLUME, SCE_AUDIO_MAX_VOLUME }; SDL_AudioFormat test_format; this->hidden = (struct SDL_PrivateAudioData *) @@ -81,7 +79,7 @@ VITAAUD_OpenDevice(_THIS, const char *devname) } } - if(!test_format) { + if (!test_format) { return SDL_SetError("Unsupported audio format"); } @@ -99,7 +97,7 @@ VITAAUD_OpenDevice(_THIS, const char *devname) be a multiple of 64 bytes. Our sample count is already a multiple of 64, so spec->size should be a multiple of 64 as well. */ mixlen = this->spec.size * NUM_BUFFERS; - this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen); + this->hidden->rawbuf = (Uint8 *)memalign(64, mixlen); if (this->hidden->rawbuf == NULL) { return SDL_SetError("Couldn't allocate mixing buffer"); } @@ -111,7 +109,7 @@ VITAAUD_OpenDevice(_THIS, const char *devname) format = SCE_AUDIO_OUT_MODE_STEREO; } - if(this->spec.freq < 48000) { + if (this->spec.freq < 48000) { port = SCE_AUDIO_OUT_PORT_TYPE_BGM; } @@ -122,7 +120,7 @@ VITAAUD_OpenDevice(_THIS, const char *devname) return SDL_SetError("Couldn't open audio out port: %x", this->hidden->port); } - sceAudioOutSetVolume(this->hidden->port, SCE_AUDIO_VOLUME_FLAG_L_CH|SCE_AUDIO_VOLUME_FLAG_R_CH, vols); + sceAudioOutSetVolume(this->hidden->port, SCE_AUDIO_VOLUME_FLAG_L_CH | SCE_AUDIO_VOLUME_FLAG_R_CH, vols); SDL_memset(this->hidden->rawbuf, 0, mixlen); for (i = 0; i < NUM_BUFFERS; i++) { @@ -165,7 +163,7 @@ static void VITAAUD_CloseDevice(_THIS) } if (!this->iscapture && this->hidden->rawbuf != NULL) { - free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */ + free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */ this->hidden->rawbuf = NULL; } } @@ -194,8 +192,7 @@ static void VITAAUD_ThreadInit(_THIS) } } -static SDL_bool -VITAAUD_Init(SDL_AudioDriverImpl * impl) +static SDL_bool VITAAUD_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = VITAAUD_OpenDevice; @@ -212,7 +209,7 @@ VITAAUD_Init(SDL_AudioDriverImpl * impl) impl->OnlyHasDefaultOutputDevice = SDL_TRUE; impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap VITAAUD_bootstrap = { diff --git a/modules/SDL2/src/audio/vita/SDL_vitaaudio.h b/modules/SDL2/src/audio/vita/SDL_vitaaudio.h index 83ce942..52feb9b 100644 --- a/modules/SDL2/src/audio/vita/SDL_vitaaudio.h +++ b/modules/SDL2/src/audio/vita/SDL_vitaaudio.h @@ -25,19 +25,20 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this #define NUM_BUFFERS 2 -struct SDL_PrivateAudioData { +struct SDL_PrivateAudioData +{ /* The hardware input/output port. */ - int port; + int port; /* The raw allocated mixing buffer. */ - Uint8 *rawbuf; + Uint8 *rawbuf; /* Individual mixing buffers. */ - Uint8 *mixbufs[NUM_BUFFERS]; + Uint8 *mixbufs[NUM_BUFFERS]; /* Index of the next available mixing buffer. */ - int next_buffer; + int next_buffer; }; #endif /* _SDL_vitaaudio_h */ diff --git a/modules/SDL2/src/audio/wasapi/SDL_wasapi.c b/modules/SDL2/src/audio/wasapi/SDL_wasapi.c index dd40d34..c465776 100644 --- a/modules/SDL2/src/audio/wasapi/SDL_wasapi.c +++ b/modules/SDL2/src/audio/wasapi/SDL_wasapi.c @@ -36,7 +36,7 @@ /* These constants aren't available in older SDKs */ #ifndef AUDCLNT_STREAMFLAGS_RATEADJUST -#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000 +#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000 #endif #ifndef AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY #define AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x08000000 @@ -46,17 +46,16 @@ #endif /* Some GUIDs we need to know without linking to libraries that aren't available before Vista. */ -static const IID SDL_IID_IAudioRenderClient = { 0xf294acfc, 0x3146, 0x4483,{ 0xa7, 0xbf, 0xad, 0xdc, 0xa7, 0xc2, 0x60, 0xe2 } }; -static const IID SDL_IID_IAudioCaptureClient = { 0xc8adbd64, 0xe71e, 0x48a0,{ 0xa4, 0xde, 0x18, 0x5c, 0x39, 0x5c, 0xd3, 0x17 } }; +static const IID SDL_IID_IAudioRenderClient = { 0xf294acfc, 0x3146, 0x4483, { 0xa7, 0xbf, 0xad, 0xdc, 0xa7, 0xc2, 0x60, 0xe2 } }; +static const IID SDL_IID_IAudioCaptureClient = { 0xc8adbd64, 0xe71e, 0x48a0, { 0xa4, 0xde, 0x18, 0x5c, 0x39, 0x5c, 0xd3, 0x17 } }; -static void -WASAPI_DetectDevices(void) + +static void WASAPI_DetectDevices(void) { WASAPI_EnumerateEndpoints(); } -static SDL_INLINE SDL_bool -WasapiFailed(_THIS, const HRESULT err) +static SDL_INLINE SDL_bool WasapiFailed(_THIS, const HRESULT err) { if (err == S_OK) { return SDL_FALSE; @@ -73,39 +72,38 @@ WasapiFailed(_THIS, const HRESULT err) return SDL_TRUE; } -static int -UpdateAudioStream(_THIS, const SDL_AudioSpec *oldspec) +static int UpdateAudioStream(_THIS, const SDL_AudioSpec *oldspec) { /* Since WASAPI requires us to handle all audio conversion, and our device format might have changed, we might have to add/remove/change the audio stream that the higher level uses to convert data, so SDL keeps firing the callback as if nothing happened here. */ - if ( (this->callbackspec.channels == this->spec.channels) && - (this->callbackspec.format == this->spec.format) && - (this->callbackspec.freq == this->spec.freq) && - (this->callbackspec.samples == this->spec.samples) ) { + if ((this->callbackspec.channels == this->spec.channels) && + (this->callbackspec.format == this->spec.format) && + (this->callbackspec.freq == this->spec.freq) && + (this->callbackspec.samples == this->spec.samples)) { /* no need to buffer/convert in an AudioStream! */ SDL_FreeAudioStream(this->stream); this->stream = NULL; - } else if ( (oldspec->channels == this->spec.channels) && - (oldspec->format == this->spec.format) && - (oldspec->freq == this->spec.freq) ) { + } else if ((oldspec->channels == this->spec.channels) && + (oldspec->format == this->spec.format) && + (oldspec->freq == this->spec.freq)) { /* The existing audio stream is okay to keep using. */ } else { /* replace the audiostream for new format */ SDL_FreeAudioStream(this->stream); if (this->iscapture) { this->stream = SDL_NewAudioStream(this->spec.format, - this->spec.channels, this->spec.freq, - this->callbackspec.format, - this->callbackspec.channels, - this->callbackspec.freq); + this->spec.channels, this->spec.freq, + this->callbackspec.format, + this->callbackspec.channels, + this->callbackspec.freq); } else { this->stream = SDL_NewAudioStream(this->callbackspec.format, - this->callbackspec.channels, - this->callbackspec.freq, this->spec.format, - this->spec.channels, this->spec.freq); + this->callbackspec.channels, + this->callbackspec.freq, this->spec.format, + this->spec.channels, this->spec.freq); } if (!this->stream) { @@ -115,7 +113,7 @@ UpdateAudioStream(_THIS, const SDL_AudioSpec *oldspec) /* make sure our scratch buffer can cover the new device spec. */ if (this->spec.size > this->work_buffer_len) { - Uint8 *ptr = (Uint8 *) SDL_realloc(this->work_buffer, this->spec.size); + Uint8 *ptr = (Uint8 *)SDL_realloc(this->work_buffer, this->spec.size); if (ptr == NULL) { return SDL_OutOfMemory(); } @@ -126,16 +124,14 @@ UpdateAudioStream(_THIS, const SDL_AudioSpec *oldspec) return 0; } - static void ReleaseWasapiDevice(_THIS); -static SDL_bool -RecoverWasapiDevice(_THIS) +static SDL_bool RecoverWasapiDevice(_THIS) { - ReleaseWasapiDevice(this); /* dump the lost device's handles. */ + ReleaseWasapiDevice(this); /* dump the lost device's handles. */ if (this->hidden->default_device_generation) { - this->hidden->default_device_generation = SDL_AtomicGet(this->iscapture ? &SDL_IMMDevice_DefaultCaptureGeneration : &SDL_IMMDevice_DefaultPlaybackGeneration); + this->hidden->default_device_generation = SDL_AtomicGet(this->iscapture ? &SDL_IMMDevice_DefaultCaptureGeneration : &SDL_IMMDevice_DefaultPlaybackGeneration); } /* this can fail for lots of reasons, but the most likely is we had a @@ -150,26 +146,25 @@ RecoverWasapiDevice(_THIS) this->hidden->device_lost = SDL_FALSE; - return SDL_TRUE; /* okay, carry on with new device details! */ + return SDL_TRUE; /* okay, carry on with new device details! */ } -static SDL_bool -RecoverWasapiIfLost(_THIS) +static SDL_bool RecoverWasapiIfLost(_THIS) { const int generation = this->hidden->default_device_generation; SDL_bool lost = this->hidden->device_lost; if (!SDL_AtomicGet(&this->enabled)) { - return SDL_FALSE; /* already failed. */ + return SDL_FALSE; /* already failed. */ } if (!this->hidden->client) { - return SDL_TRUE; /* still waiting for activation. */ + return SDL_TRUE; /* still waiting for activation. */ } if (!lost && (generation > 0)) { /* is a default device? */ const int newgen = SDL_AtomicGet(this->iscapture ? &SDL_IMMDevice_DefaultCaptureGeneration : &SDL_IMMDevice_DefaultPlaybackGeneration); - if (generation != newgen) { /* the desired default device was changed, jump over to it. */ + if (generation != newgen) { /* the desired default device was changed, jump over to it. */ lost = SDL_TRUE; } } @@ -177,33 +172,30 @@ RecoverWasapiIfLost(_THIS) return lost ? RecoverWasapiDevice(this) : SDL_TRUE; } -static Uint8 * -WASAPI_GetDeviceBuf(_THIS) +static Uint8 *WASAPI_GetDeviceBuf(_THIS) { /* get an endpoint buffer from WASAPI. */ BYTE *buffer = NULL; while (RecoverWasapiIfLost(this) && this->hidden->render) { if (!WasapiFailed(this, IAudioRenderClient_GetBuffer(this->hidden->render, this->spec.samples, &buffer))) { - return (Uint8 *) buffer; + return (Uint8 *)buffer; } SDL_assert(buffer == NULL); } - return (Uint8 *) buffer; + return (Uint8 *)buffer; } -static void -WASAPI_PlayDevice(_THIS) +static void WASAPI_PlayDevice(_THIS) { - if (this->hidden->render != NULL) { /* definitely activated? */ + if (this->hidden->render != NULL) { /* definitely activated? */ /* WasapiFailed() will mark the device for reacquisition or removal elsewhere. */ WasapiFailed(this, IAudioRenderClient_ReleaseBuffer(this->hidden->render, this->spec.samples, 0)); } } -static void -WASAPI_WaitDevice(_THIS) +static void WASAPI_WaitDevice(_THIS) { while (RecoverWasapiIfLost(this) && this->hidden->client && this->hidden->event) { DWORD waitResult = WaitForSingleObjectEx(this->hidden->event, 200, FALSE); @@ -230,8 +222,7 @@ WASAPI_WaitDevice(_THIS) } } -static int -WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen) { SDL_AudioStream *stream = this->hidden->capturestream; const int avail = SDL_AudioStreamAvailable(stream); @@ -263,7 +254,7 @@ WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen) if ((ret == AUDCLNT_S_BUFFER_EMPTY) || !frames) { WASAPI_WaitDevice(this); } else if (ret == S_OK) { - const int total = ((int) frames) * this->hidden->framesize; + const int total = ((int)frames) * this->hidden->framesize; const int cpy = SDL_min(buflen, total); const int leftover = total - cpy; const SDL_bool silent = (flags & AUDCLNT_BUFFERFLAGS_SILENT) ? SDL_TRUE : SDL_FALSE; @@ -273,15 +264,15 @@ WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen) } else { SDL_memcpy(buffer, ptr, cpy); } - + if (leftover > 0) { ptr += cpy; if (silent) { - SDL_memset(ptr, this->spec.silence, leftover); /* I guess this is safe? */ + SDL_memset(ptr, this->spec.silence, leftover); /* I guess this is safe? */ } if (SDL_AudioStreamPut(stream, ptr, leftover) == -1) { - return -1; /* uhoh, out of memory, etc. Kill device. :( */ + return -1; /* uhoh, out of memory, etc. Kill device. :( */ } } @@ -292,36 +283,34 @@ WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen) } } - return -1; /* unrecoverable error. */ + return -1; /* unrecoverable error. */ } -static void -WASAPI_FlushCapture(_THIS) +static void WASAPI_FlushCapture(_THIS) { BYTE *ptr = NULL; UINT32 frames = 0; DWORD flags = 0; if (!this->hidden->capture) { - return; /* not activated yet? */ + return; /* not activated yet? */ } /* just read until we stop getting packets, throwing them away. */ while (SDL_TRUE) { const HRESULT ret = IAudioCaptureClient_GetBuffer(this->hidden->capture, &ptr, &frames, &flags, NULL, NULL); if (ret == AUDCLNT_S_BUFFER_EMPTY) { - break; /* no more buffered data; we're done. */ + break; /* no more buffered data; we're done. */ } else if (WasapiFailed(this, ret)) { - break; /* failed for some other reason, abort. */ + break; /* failed for some other reason, abort. */ } else if (WasapiFailed(this, IAudioCaptureClient_ReleaseBuffer(this->hidden->capture, frames))) { - break; /* something broke. */ + break; /* something broke. */ } } SDL_AudioStreamClear(this->hidden->capturestream); } -static void -ReleaseWasapiDevice(_THIS) +static void ReleaseWasapiDevice(_THIS) { if (this->hidden->client) { IAudioClient_Stop(this->hidden->client); @@ -360,20 +349,17 @@ ReleaseWasapiDevice(_THIS) } } -static void -WASAPI_CloseDevice(_THIS) +static void WASAPI_CloseDevice(_THIS) { WASAPI_UnrefDevice(this); } -void -WASAPI_RefDevice(_THIS) +void WASAPI_RefDevice(_THIS) { SDL_AtomicIncRef(&this->hidden->refcount); } -void -WASAPI_UnrefDevice(_THIS) +void WASAPI_UnrefDevice(_THIS) { if (!SDL_AtomicDecRef(&this->hidden->refcount)) { return; @@ -385,13 +371,17 @@ WASAPI_UnrefDevice(_THIS) our callback thread. We do that in WASAPI_ThreadDeinit(). (likewise for this->hidden->coinitialized). */ ReleaseWasapiDevice(this); + + if (SDL_ThreadID() == this->hidden->open_threadid) { + WIN_CoUninitialize(); /* if you closed from a different thread than you opened, sorry, it's a leak. We can't help you. */ + } + SDL_free(this->hidden->devid); SDL_free(this->hidden); } /* This is called once a device is activated, possibly asynchronously. */ -int -WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) +int WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) { /* !!! FIXME: we could request an exclusive mode stream, which is lower latency; !!! it will write into the kernel's audio buffer directly instead of @@ -406,7 +396,7 @@ WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) !!! do in any case. */ const SDL_AudioSpec oldspec = this->spec; const AUDCLNT_SHAREMODE sharemode = AUDCLNT_SHAREMODE_SHARED; - UINT32 bufsize = 0; /* this is in sample frames, not samples, not bytes. */ + UINT32 bufsize = 0; /* this is in sample frames, not samples, not bytes. */ REFERENCE_TIME default_period = 0; IAudioClient *client = this->hidden->client; IAudioRenderClient *render = NULL; @@ -437,7 +427,7 @@ WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) SDL_assert(waveformat != NULL); this->hidden->waveformat = waveformat; - this->spec.channels = (Uint8) waveformat->nChannels; + this->spec.channels = (Uint8)waveformat->nChannels; /* Make sure we have a valid format that we can convert to whatever WASAPI wants. */ wasapi_format = WaveFormatToSDLFormat(waveformat); @@ -504,10 +494,10 @@ WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) if (this->iscapture) { this->hidden->capturestream = SDL_NewAudioStream(this->spec.format, this->spec.channels, this->spec.freq, this->spec.format, this->spec.channels, this->spec.freq); if (!this->hidden->capturestream) { - return -1; /* already set SDL_Error */ + return -1; /* already set SDL_Error */ } - ret = IAudioClient_GetService(client, &SDL_IID_IAudioCaptureClient, (void**) &capture); + ret = IAudioClient_GetService(client, &SDL_IID_IAudioCaptureClient, (void **)&capture); if (FAILED(ret)) { return WIN_SetErrorFromHRESULT("WASAPI can't get capture client service", ret); } @@ -519,9 +509,9 @@ WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) return WIN_SetErrorFromHRESULT("WASAPI can't start capture", ret); } - WASAPI_FlushCapture(this); /* MSDN says you should flush capture endpoint right after startup. */ + WASAPI_FlushCapture(this); /* MSDN says you should flush capture endpoint right after startup. */ } else { - ret = IAudioClient_GetService(client, &SDL_IID_IAudioRenderClient, (void**) &render); + ret = IAudioClient_GetService(client, &SDL_IID_IAudioRenderClient, (void **)&render); if (FAILED(ret)) { return WIN_SetErrorFromHRESULT("WASAPI can't get render client service", ret); } @@ -538,26 +528,28 @@ WASAPI_PrepDevice(_THIS, const SDL_bool updatestream) return UpdateAudioStream(this, &oldspec); } - return 0; /* good to go. */ + return 0; /* good to go. */ } - -static int -WASAPI_OpenDevice(_THIS, const char *devname) +static int WASAPI_OpenDevice(_THIS, const char *devname) { - LPCWSTR devid = (LPCWSTR) this->handle; + LPCWSTR devid = (LPCWSTR)this->handle; /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } SDL_zerop(this->hidden); - WASAPI_RefDevice(this); /* so CloseDevice() will unref to zero. */ + WASAPI_RefDevice(this); /* so CloseDevice() will unref to zero. */ + + if (FAILED(WIN_CoInitialize())) { /* WASAPI uses COM, we need to make sure it's initialized. You have to close the device from the same thread!! */ + return SDL_SetError("WIN_CoInitialize failed during WASAPI device open"); + } + this->hidden->open_threadid = SDL_ThreadID(); /* set this _after_ coinitialize so we don't uninit if device fails at the wrong moment. */ - if (!devid) { /* is default device? */ + if (!devid) { /* is default device? */ this->hidden->default_device_generation = SDL_AtomicGet(this->iscapture ? &SDL_IMMDevice_DefaultCaptureGeneration : &SDL_IMMDevice_DefaultPlaybackGeneration); } else { this->hidden->devid = SDL_wcsdup(devid); @@ -567,7 +559,7 @@ WASAPI_OpenDevice(_THIS, const char *devname) } if (WASAPI_ActivateDevice(this, SDL_FALSE) == -1) { - return -1; /* already set error. */ + return -1; /* already set error. */ } /* Ready, but waiting for async device activation. @@ -581,26 +573,22 @@ WASAPI_OpenDevice(_THIS, const char *devname) return 0; } -static void -WASAPI_ThreadInit(_THIS) +static void WASAPI_ThreadInit(_THIS) { WASAPI_PlatformThreadInit(this); } -static void -WASAPI_ThreadDeinit(_THIS) +static void WASAPI_ThreadDeinit(_THIS) { WASAPI_PlatformThreadDeinit(this); } -static void -WASAPI_Deinitialize(void) +static void WASAPI_Deinitialize(void) { WASAPI_PlatformDeinit(); } -static SDL_bool -WASAPI_Init(SDL_AudioDriverImpl * impl) +static SDL_bool WASAPI_Init(SDL_AudioDriverImpl *impl) { if (WASAPI_PlatformInit() == -1) { return SDL_FALSE; @@ -622,13 +610,13 @@ WASAPI_Init(SDL_AudioDriverImpl * impl) impl->HasCaptureSupport = SDL_TRUE; impl->SupportsNonPow2Samples = SDL_TRUE; - return SDL_TRUE; /* this audio target is available. */ + return SDL_TRUE; /* this audio target is available. */ } AudioBootStrap WASAPI_bootstrap = { "wasapi", "WASAPI", WASAPI_Init, SDL_FALSE }; -#endif /* SDL_AUDIO_DRIVER_WASAPI */ +#endif /* SDL_AUDIO_DRIVER_WASAPI */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/audio/wasapi/SDL_wasapi.h b/modules/SDL2/src/audio/wasapi/SDL_wasapi.h index c3485eb..96c2061 100644 --- a/modules/SDL2/src/audio/wasapi/SDL_wasapi.h +++ b/modules/SDL2/src/audio/wasapi/SDL_wasapi.h @@ -47,6 +47,7 @@ struct SDL_PrivateAudioData SDL_AudioStream *capturestream; HANDLE event; HANDLE task; + SDL_threadID open_threadid; SDL_bool coinitialized; int framesize; int default_device_generation; diff --git a/modules/SDL2/src/audio/wasapi/SDL_wasapi_win32.c b/modules/SDL2/src/audio/wasapi/SDL_wasapi_win32.c index bdeb9c0..965e7ff 100644 --- a/modules/SDL2/src/audio/wasapi/SDL_wasapi_win32.c +++ b/modules/SDL2/src/audio/wasapi/SDL_wasapi_win32.c @@ -47,26 +47,24 @@ static pfnAvSetMmThreadCharacteristicsW pAvSetMmThreadCharacteristicsW = NULL; static pfnAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL; /* Some GUIDs we need to know without linking to libraries that aren't available before Vista. */ -static const IID SDL_IID_IAudioClient = { 0x1cb9ad4c, 0xdbfa, 0x4c32,{ 0xb1, 0x78, 0xc2, 0xf5, 0x68, 0xa7, 0x03, 0xb2 } }; +static const IID SDL_IID_IAudioClient = { 0x1cb9ad4c, 0xdbfa, 0x4c32, { 0xb1, 0x78, 0xc2, 0xf5, 0x68, 0xa7, 0x03, 0xb2 } }; -int -WASAPI_PlatformInit(void) +int WASAPI_PlatformInit(void) { if (SDL_IMMDevice_Init() < 0) { return -1; /* This is set by SDL_IMMDevice_Init */ } - libavrt = LoadLibrary(TEXT("avrt.dll")); /* this library is available in Vista and later. No WinXP, so have to LoadLibrary to use it for now! */ + libavrt = LoadLibrary(TEXT("avrt.dll")); /* this library is available in Vista and later. No WinXP, so have to LoadLibrary to use it for now! */ if (libavrt) { - pAvSetMmThreadCharacteristicsW = (pfnAvSetMmThreadCharacteristicsW) GetProcAddress(libavrt, "AvSetMmThreadCharacteristicsW"); - pAvRevertMmThreadCharacteristics = (pfnAvRevertMmThreadCharacteristics) GetProcAddress(libavrt, "AvRevertMmThreadCharacteristics"); + pAvSetMmThreadCharacteristicsW = (pfnAvSetMmThreadCharacteristicsW)GetProcAddress(libavrt, "AvSetMmThreadCharacteristicsW"); + pAvRevertMmThreadCharacteristics = (pfnAvRevertMmThreadCharacteristics)GetProcAddress(libavrt, "AvRevertMmThreadCharacteristics"); } return 0; } -void -WASAPI_PlatformDeinit(void) +void WASAPI_PlatformDeinit(void) { if (libavrt) { FreeLibrary(libavrt); @@ -79,11 +77,10 @@ WASAPI_PlatformDeinit(void) SDL_IMMDevice_Quit(); } -void -WASAPI_PlatformThreadInit(_THIS) +void WASAPI_PlatformThreadInit(_THIS) { /* this thread uses COM. */ - if (SUCCEEDED(WIN_CoInitialize())) { /* can't report errors, hope it worked! */ + if (SUCCEEDED(WIN_CoInitialize())) { /* can't report errors, hope it worked! */ this->hidden->coinitialized = SDL_TRUE; } @@ -94,8 +91,7 @@ WASAPI_PlatformThreadInit(_THIS) } } -void -WASAPI_PlatformThreadDeinit(_THIS) +void WASAPI_PlatformThreadDeinit(_THIS) { /* Set this thread back to normal priority. */ if (this->hidden->task && pAvRevertMmThreadCharacteristics) { @@ -109,8 +105,7 @@ WASAPI_PlatformThreadDeinit(_THIS) } } -int -WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) +int WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) { IMMDevice *device = NULL; HRESULT ret; @@ -121,7 +116,7 @@ WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) } /* this is not async in standard win32, yay! */ - ret = IMMDevice_Activate(device, &SDL_IID_IAudioClient, CLSCTX_ALL, NULL, (void **) &this->hidden->client); + ret = IMMDevice_Activate(device, &SDL_IID_IAudioClient, CLSCTX_ALL, NULL, (void **)&this->hidden->client); IMMDevice_Release(device); if (FAILED(ret)) { @@ -130,33 +125,29 @@ WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) } SDL_assert(this->hidden->client != NULL); - if (WASAPI_PrepDevice(this, isrecovery) == -1) { /* not async, fire it right away. */ + if (WASAPI_PrepDevice(this, isrecovery) == -1) { /* not async, fire it right away. */ return -1; } - return 0; /* good to go. */ + return 0; /* good to go. */ } -void -WASAPI_EnumerateEndpoints(void) +void WASAPI_EnumerateEndpoints(void) { SDL_IMMDevice_EnumerateEndpoints(SDL_FALSE); } -int -WASAPI_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +int WASAPI_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { return SDL_IMMDevice_GetDefaultAudioInfo(name, spec, iscapture); } -void -WASAPI_PlatformDeleteActivationHandler(void *handler) +void WASAPI_PlatformDeleteActivationHandler(void *handler) { /* not asynchronous. */ SDL_assert(!"This function should have only been called on WinRT."); } -#endif /* SDL_AUDIO_DRIVER_WASAPI && !defined(__WINRT__) */ +#endif /* SDL_AUDIO_DRIVER_WASAPI && !defined(__WINRT__) */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp b/modules/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp index 8e17524..93ed3b8 100644 --- a/modules/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp +++ b/modules/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp @@ -53,13 +53,13 @@ using namespace Windows::Media::Devices; using namespace Windows::Foundation; using namespace Microsoft::WRL; -static Platform::String^ SDL_PKEY_AudioEngine_DeviceFormat = L"{f19f064d-082c-4e27-bc73-6882a1bb8e4c} 0"; +static Platform::String ^ SDL_PKEY_AudioEngine_DeviceFormat = L"{f19f064d-082c-4e27-bc73-6882a1bb8e4c} 0"; static void WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid); static void WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid); extern "C" { - SDL_atomic_t SDL_IMMDevice_DefaultPlaybackGeneration; - SDL_atomic_t SDL_IMMDevice_DefaultCaptureGeneration; +SDL_atomic_t SDL_IMMDevice_DefaultPlaybackGeneration; +SDL_atomic_t SDL_IMMDevice_DefaultCaptureGeneration; } /* This is a list of device id strings we have inflight, so we have consistent pointers to the same device. */ @@ -73,20 +73,20 @@ static DevIdList *deviceid_list = NULL; class SDL_WasapiDeviceEventHandler { -public: + public: SDL_WasapiDeviceEventHandler(const SDL_bool _iscapture); ~SDL_WasapiDeviceEventHandler(); - void OnDeviceAdded(DeviceWatcher^ sender, DeviceInformation^ args); - void OnDeviceRemoved(DeviceWatcher^ sender, DeviceInformationUpdate^ args); - void OnDeviceUpdated(DeviceWatcher^ sender, DeviceInformationUpdate^ args); - void OnEnumerationCompleted(DeviceWatcher^ sender, Platform::Object^ args); - void OnDefaultRenderDeviceChanged(Platform::Object^ sender, DefaultAudioRenderDeviceChangedEventArgs^ args); - void OnDefaultCaptureDeviceChanged(Platform::Object^ sender, DefaultAudioCaptureDeviceChangedEventArgs^ args); - SDL_semaphore* completed; - -private: + void OnDeviceAdded(DeviceWatcher ^ sender, DeviceInformation ^ args); + void OnDeviceRemoved(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args); + void OnDeviceUpdated(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args); + void OnEnumerationCompleted(DeviceWatcher ^ sender, Platform::Object ^ args); + void OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args); + void OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args); + SDL_semaphore *completed; + + private: const SDL_bool iscapture; - DeviceWatcher^ watcher; + DeviceWatcher ^ watcher; Windows::Foundation::EventRegistrationToken added_handler; Windows::Foundation::EventRegistrationToken removed_handler; Windows::Foundation::EventRegistrationToken updated_handler; @@ -95,29 +95,27 @@ private: }; SDL_WasapiDeviceEventHandler::SDL_WasapiDeviceEventHandler(const SDL_bool _iscapture) - : iscapture(_iscapture) - , completed(SDL_CreateSemaphore(0)) + : iscapture(_iscapture), completed(SDL_CreateSemaphore(0)) { if (!completed) - return; // uhoh. + return; // uhoh. - Platform::String^ selector = _iscapture ? MediaDevice::GetAudioCaptureSelector() : - MediaDevice::GetAudioRenderSelector(); - Platform::Collections::Vector properties; + Platform::String ^ selector = _iscapture ? MediaDevice::GetAudioCaptureSelector() : MediaDevice::GetAudioRenderSelector(); + Platform::Collections::Vector properties; properties.Append(SDL_PKEY_AudioEngine_DeviceFormat); watcher = DeviceInformation::CreateWatcher(selector, properties.GetView()); if (!watcher) - return; // uhoh. + return; // uhoh. // !!! FIXME: this doesn't need a lambda here, I think, if I make SDL_WasapiDeviceEventHandler a proper C++/CX class. --ryan. - added_handler = watcher->Added += ref new TypedEventHandler([this](DeviceWatcher^ sender, DeviceInformation^ args) { OnDeviceAdded(sender, args); } ); - removed_handler = watcher->Removed += ref new TypedEventHandler([this](DeviceWatcher^ sender, DeviceInformationUpdate^ args) { OnDeviceRemoved(sender, args); } ); - updated_handler = watcher->Updated += ref new TypedEventHandler([this](DeviceWatcher^ sender, DeviceInformationUpdate^ args) { OnDeviceUpdated(sender, args); } ); - completed_handler = watcher->EnumerationCompleted += ref new TypedEventHandler([this](DeviceWatcher^ sender, Platform::Object^ args) { OnEnumerationCompleted(sender, args); } ); + added_handler = watcher->Added += ref new TypedEventHandler([this](DeviceWatcher ^ sender, DeviceInformation ^ args) { OnDeviceAdded(sender, args); }); + removed_handler = watcher->Removed += ref new TypedEventHandler([this](DeviceWatcher ^ sender, DeviceInformationUpdate ^ args) { OnDeviceRemoved(sender, args); }); + updated_handler = watcher->Updated += ref new TypedEventHandler([this](DeviceWatcher ^ sender, DeviceInformationUpdate ^ args) { OnDeviceUpdated(sender, args); }); + completed_handler = watcher->EnumerationCompleted += ref new TypedEventHandler([this](DeviceWatcher ^ sender, Platform::Object ^ args) { OnEnumerationCompleted(sender, args); }); if (iscapture) { - default_changed_handler = MediaDevice::DefaultAudioCaptureDeviceChanged += ref new TypedEventHandler([this](Platform::Object^ sender, DefaultAudioCaptureDeviceChangedEventArgs^ args) { OnDefaultCaptureDeviceChanged(sender, args); } ); + default_changed_handler = MediaDevice::DefaultAudioCaptureDeviceChanged += ref new TypedEventHandler([this](Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args) { OnDefaultCaptureDeviceChanged(sender, args); }); } else { - default_changed_handler = MediaDevice::DefaultAudioRenderDeviceChanged += ref new TypedEventHandler([this](Platform::Object^ sender, DefaultAudioRenderDeviceChangedEventArgs^ args) { OnDefaultRenderDeviceChanged(sender, args); } ); + default_changed_handler = MediaDevice::DefaultAudioRenderDeviceChanged += ref new TypedEventHandler([this](Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args) { OnDefaultRenderDeviceChanged(sender, args); }); } watcher->Start(); } @@ -144,17 +142,16 @@ SDL_WasapiDeviceEventHandler::~SDL_WasapiDeviceEventHandler() } } -void -SDL_WasapiDeviceEventHandler::OnDeviceAdded(DeviceWatcher^ sender, DeviceInformation^ info) +void SDL_WasapiDeviceEventHandler::OnDeviceAdded(DeviceWatcher ^ sender, DeviceInformation ^ info) { SDL_assert(sender == this->watcher); char *utf8dev = WIN_StringToUTF8(info->Name->Data()); if (utf8dev) { WAVEFORMATEXTENSIBLE fmt; - Platform::Object^ obj = info->Properties->Lookup(SDL_PKEY_AudioEngine_DeviceFormat); + Platform::Object ^ obj = info->Properties->Lookup(SDL_PKEY_AudioEngine_DeviceFormat); if (obj) { - IPropertyValue^ property = (IPropertyValue^) obj; - Platform::Array^ data; + IPropertyValue ^ property = (IPropertyValue ^) obj; + Platform::Array ^ data; property->GetUInt8Array(&data); SDL_memcpy(&fmt, data->Data, SDL_min(data->Length, sizeof(WAVEFORMATEXTENSIBLE))); } else { @@ -166,41 +163,35 @@ SDL_WasapiDeviceEventHandler::OnDeviceAdded(DeviceWatcher^ sender, DeviceInforma } } -void -SDL_WasapiDeviceEventHandler::OnDeviceRemoved(DeviceWatcher^ sender, DeviceInformationUpdate^ info) +void SDL_WasapiDeviceEventHandler::OnDeviceRemoved(DeviceWatcher ^ sender, DeviceInformationUpdate ^ info) { SDL_assert(sender == this->watcher); WASAPI_RemoveDevice(this->iscapture, info->Id->Data()); } -void -SDL_WasapiDeviceEventHandler::OnDeviceUpdated(DeviceWatcher^ sender, DeviceInformationUpdate^ args) +void SDL_WasapiDeviceEventHandler::OnDeviceUpdated(DeviceWatcher ^ sender, DeviceInformationUpdate ^ args) { SDL_assert(sender == this->watcher); } -void -SDL_WasapiDeviceEventHandler::OnEnumerationCompleted(DeviceWatcher^ sender, Platform::Object^ args) +void SDL_WasapiDeviceEventHandler::OnEnumerationCompleted(DeviceWatcher ^ sender, Platform::Object ^ args) { SDL_assert(sender == this->watcher); SDL_SemPost(this->completed); } -void -SDL_WasapiDeviceEventHandler::OnDefaultRenderDeviceChanged(Platform::Object^ sender, DefaultAudioRenderDeviceChangedEventArgs^ args) +void SDL_WasapiDeviceEventHandler::OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args) { SDL_assert(!this->iscapture); SDL_AtomicAdd(&SDL_IMMDevice_DefaultPlaybackGeneration, 1); } -void -SDL_WasapiDeviceEventHandler::OnDefaultCaptureDeviceChanged(Platform::Object^ sender, DefaultAudioCaptureDeviceChangedEventArgs^ args) +void SDL_WasapiDeviceEventHandler::OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args) { SDL_assert(this->iscapture); SDL_AtomicAdd(&SDL_IMMDevice_DefaultCaptureGeneration, 1); } - static SDL_WasapiDeviceEventHandler *playback_device_event_handler; static SDL_WasapiDeviceEventHandler *capture_device_event_handler; @@ -240,10 +231,11 @@ void WASAPI_EnumerateEndpoints(void) SDL_SemWait(capture_device_event_handler->completed); } -struct SDL_WasapiActivationHandler : public RuntimeClass< RuntimeClassFlags< ClassicCom >, FtmBase, IActivateAudioInterfaceCompletionHandler > +struct SDL_WasapiActivationHandler : public RuntimeClass, FtmBase, IActivateAudioInterfaceCompletionHandler> { SDL_WasapiActivationHandler() : device(nullptr) {} - STDMETHOD(ActivateCompleted)(IActivateAudioInterfaceAsyncOperation *operation); + STDMETHOD(ActivateCompleted) + (IActivateAudioInterfaceAsyncOperation *operation); SDL_AudioDevice *device; }; @@ -256,23 +248,20 @@ SDL_WasapiActivationHandler::ActivateCompleted(IActivateAudioInterfaceAsyncOpera return S_OK; } -void -WASAPI_PlatformDeleteActivationHandler(void *handler) +void WASAPI_PlatformDeleteActivationHandler(void *handler) { - ((SDL_WasapiActivationHandler *) handler)->Release(); + ((SDL_WasapiActivationHandler *)handler)->Release(); } -int -WASAPI_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +int WASAPI_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { return SDL_Unsupported(); } -int -WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) +int WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) { LPCWSTR devid = _this->hidden->devid; - Platform::String^ defdevid; + Platform::String ^ defdevid; if (devid == nullptr) { defdevid = _this->iscapture ? MediaDevice::GetDefaultAudioCaptureId(AudioDeviceRole::Default) : MediaDevice::GetDefaultAudioRenderId(AudioDeviceRole::Default); @@ -288,11 +277,11 @@ WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) return SDL_SetError("Failed to allocate WASAPI activation handler"); } - handler.Get()->AddRef(); // we hold a reference after ComPtr destructs on return, causing a Release, and Release ourselves in WASAPI_PlatformDeleteActivationHandler(), etc. + handler.Get()->AddRef(); // we hold a reference after ComPtr destructs on return, causing a Release, and Release ourselves in WASAPI_PlatformDeleteActivationHandler(), etc. handler.Get()->device = _this; _this->hidden->activation_handler = handler.Get(); - WASAPI_RefDevice(_this); /* completion handler will unref it. */ + WASAPI_RefDevice(_this); /* completion handler will unref it. */ IActivateAudioInterfaceAsyncOperation *async = nullptr; const HRESULT ret = ActivateAudioInterfaceAsync(devid, __uuidof(IAudioClient), nullptr, handler.Get(), &async); @@ -339,22 +328,20 @@ WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery) return 0; } -void -WASAPI_PlatformThreadInit(_THIS) +void WASAPI_PlatformThreadInit(_THIS) { // !!! FIXME: set this thread to "Pro Audio" priority. } -void -WASAPI_PlatformThreadDeinit(_THIS) +void WASAPI_PlatformThreadDeinit(_THIS) { // !!! FIXME: set this thread to "Pro Audio" priority. } /* Everything below was copied from SDL_wasapi.c, before it got moved to SDL_immdevice.c! */ -static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; -static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; +static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; +static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; extern "C" SDL_AudioFormat WaveFormatToSDLFormat(WAVEFORMATEX *waveformat) @@ -378,8 +365,7 @@ WaveFormatToSDLFormat(WAVEFORMATEX *waveformat) return 0; } -static void -WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid) +static void WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid) { DevIdList *i; DevIdList *next; @@ -389,8 +375,7 @@ WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid) if (SDL_wcscmp(i->str, devid) == 0) { if (prev) { prev->next = next; - } - else { + } else { deviceid_list = next; } SDL_RemoveAudioDevice(iscapture, i->str); @@ -402,8 +387,7 @@ WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid) } } -static void -WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid) +static void WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid) { DevIdList *devidlist; SDL_AudioSpec spec; @@ -413,22 +397,22 @@ WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENS phones and tablets, where you might have an internal speaker and a headphone jack and expect both to be available and switch automatically. (!!! FIXME...?) */ - /* see if we already have this one. */ + /* see if we already have this one. */ for (devidlist = deviceid_list; devidlist; devidlist = devidlist->next) { if (SDL_wcscmp(devidlist->str, devid) == 0) { - return; /* we already have this. */ + return; /* we already have this. */ } } devidlist = (DevIdList *)SDL_malloc(sizeof(*devidlist)); - if (!devidlist) { - return; /* oh well. */ + if (devidlist == NULL) { + return; /* oh well. */ } devid = SDL_wcsdup(devid); if (!devid) { SDL_free(devidlist); - return; /* oh well. */ + return; /* oh well. */ } devidlist->str = (WCHAR *)devid; @@ -442,6 +426,6 @@ WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENS SDL_AddAudioDevice(iscapture, devname, &spec, (void *)devid); } -#endif // SDL_AUDIO_DRIVER_WASAPI && defined(__WINRT__) +#endif // SDL_AUDIO_DRIVER_WASAPI && defined(__WINRT__) /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/audio/winmm/SDL_winmm.c b/modules/SDL2/src/audio/winmm/SDL_winmm.c index 69e492b..d0c4b97 100644 --- a/modules/SDL2/src/audio/winmm/SDL_winmm.c +++ b/modules/SDL2/src/audio/winmm/SDL_winmm.c @@ -35,7 +35,7 @@ /* MinGW32 mmsystem.h doesn't include these structures */ #if defined(__MINGW32__) && defined(_MMSYSTEM_H) -typedef struct tagWAVEINCAPS2W +typedef struct tagWAVEINCAPS2W { WORD wMid; WORD wPid; @@ -97,16 +97,13 @@ static void DetectWave##typ##Devs(void) { \ DETECT_DEV_IMPL(SDL_FALSE, Out, WAVEOUTCAPS) DETECT_DEV_IMPL(SDL_TRUE, In, WAVEINCAPS) -static void -WINMM_DetectDevices(void) +static void WINMM_DetectDevices(void) { DetectWaveInDevs(); DetectWaveOutDevs(); } -static void CALLBACK -CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance, - DWORD_PTR dwParam1, DWORD_PTR dwParam2) +static void CALLBACK CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { SDL_AudioDevice *this = (SDL_AudioDevice *) dwInstance; @@ -120,9 +117,7 @@ CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance, /* The Win32 callback for filling the WAVE device */ -static void CALLBACK -FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, - DWORD_PTR dwParam1, DWORD_PTR dwParam2) +static void CALLBACK FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { SDL_AudioDevice *this = (SDL_AudioDevice *) dwInstance; @@ -134,8 +129,7 @@ FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, ReleaseSemaphore(this->hidden->audio_sem, 1, NULL); } -static int -SetMMerror(const char *function, MMRESULT code) +static int SetMMerror(const char *function, MMRESULT code) { int len; char errbuf[MAXERRORLENGTH]; @@ -151,22 +145,19 @@ SetMMerror(const char *function, MMRESULT code) return SDL_SetError("%s", errbuf); } -static void -WINMM_WaitDevice(_THIS) +static void WINMM_WaitDevice(_THIS) { /* Wait for an audio chunk to finish */ WaitForSingleObject(this->hidden->audio_sem, INFINITE); } -static Uint8 * -WINMM_GetDeviceBuf(_THIS) +static Uint8 *WINMM_GetDeviceBuf(_THIS) { return (Uint8 *) (this->hidden-> wavebuf[this->hidden->next_buffer].lpData); } -static void -WINMM_PlayDevice(_THIS) +static void WINMM_PlayDevice(_THIS) { /* Queue it up */ waveOutWrite(this->hidden->hout, @@ -175,8 +166,7 @@ WINMM_PlayDevice(_THIS) this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS; } -static int -WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen) +static int WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen) { const int nextbuf = this->hidden->next_buffer; MMRESULT result; @@ -192,7 +182,7 @@ WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen) /* requeue the buffer that just finished. */ result = waveInAddBuffer(this->hidden->hin, &this->hidden->wavebuf[nextbuf], - sizeof (this->hidden->wavebuf[nextbuf])); + sizeof(this->hidden->wavebuf[nextbuf])); if (result != MMSYSERR_NOERROR) { return -1; /* uhoh! Disable the device. */ } @@ -202,8 +192,7 @@ WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen) return this->spec.size; } -static void -WINMM_FlushCapture(_THIS) +static void WINMM_FlushCapture(_THIS) { /* Wait for an audio chunk to finish */ if (WaitForSingleObject(this->hidden->audio_sem, 0) == WAIT_OBJECT_0) { @@ -211,13 +200,12 @@ WINMM_FlushCapture(_THIS) /* requeue the buffer that just finished without reading from it. */ waveInAddBuffer(this->hidden->hin, &this->hidden->wavebuf[nextbuf], - sizeof (this->hidden->wavebuf[nextbuf])); + sizeof(this->hidden->wavebuf[nextbuf])); this->hidden->next_buffer = (nextbuf + 1) % NUM_BUFFERS; } } -static void -WINMM_CloseDevice(_THIS) +static void WINMM_CloseDevice(_THIS) { int i; @@ -229,7 +217,7 @@ WINMM_CloseDevice(_THIS) if (this->hidden->wavebuf[i].dwUser != 0xFFFF) { waveOutUnprepareHeader(this->hidden->hout, &this->hidden->wavebuf[i], - sizeof (this->hidden->wavebuf[i])); + sizeof(this->hidden->wavebuf[i])); } } @@ -244,7 +232,7 @@ WINMM_CloseDevice(_THIS) if (this->hidden->wavebuf[i].dwUser != 0xFFFF) { waveInUnprepareHeader(this->hidden->hin, &this->hidden->wavebuf[i], - sizeof (this->hidden->wavebuf[i])); + sizeof(this->hidden->wavebuf[i])); } } waveInClose(this->hidden->hin); @@ -258,8 +246,7 @@ WINMM_CloseDevice(_THIS) SDL_free(this->hidden); } -static SDL_bool -PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture) +static SDL_bool PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture) { SDL_zerop(pfmt); @@ -282,8 +269,7 @@ PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture) } } -static int -WINMM_OpenDevice(_THIS, const char *devname) +static int WINMM_OpenDevice(_THIS, const char *devname) { SDL_AudioFormat test_format; SDL_bool iscapture = this->iscapture; @@ -300,8 +286,7 @@ WINMM_OpenDevice(_THIS, const char *devname) } /* Initialize all variables that we clean on shutdown */ - this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + this->hidden = (struct SDL_PrivateAudioData *)SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } @@ -361,7 +346,7 @@ WINMM_OpenDevice(_THIS, const char *devname) if (iscapture) { WAVEINCAPS caps; result = waveInGetDevCaps((UINT) this->hidden->hout, - &caps, sizeof (caps)); + &caps, sizeof(caps)); if (result != MMSYSERR_NOERROR) { return SetMMerror("waveInGetDevCaps()", result); } @@ -432,8 +417,7 @@ WINMM_OpenDevice(_THIS, const char *devname) return 0; /* Ready to go! */ } -static SDL_bool -WINMM_Init(SDL_AudioDriverImpl * impl) +static SDL_bool WINMM_Init(SDL_AudioDriverImpl * impl) { /* Set the function pointers */ impl->DetectDevices = WINMM_DetectDevices; diff --git a/modules/SDL2/src/core/android/SDL_android.c b/modules/SDL2/src/core/android/SDL_android.c index 479fcc9..34dfded 100644 --- a/modules/SDL2/src/core/android/SDL_android.c +++ b/modules/SDL2/src/core/android/SDL_android.c @@ -50,231 +50,240 @@ #include #include -#define SDL_JAVA_PREFIX org_libsdl_app -#define CONCAT1(prefix, class, function) CONCAT2(prefix, class, function) -#define CONCAT2(prefix, class, function) Java_ ## prefix ## _ ## class ## _ ## function -#define SDL_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLActivity, function) -#define SDL_JAVA_AUDIO_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLAudioManager, function) -#define SDL_JAVA_CONTROLLER_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLControllerManager, function) -#define SDL_JAVA_INTERFACE_INPUT_CONNECTION(function) CONCAT1(SDL_JAVA_PREFIX, SDLInputConnection, function) +#define SDL_JAVA_PREFIX org_libsdl_app +#define CONCAT1(prefix, class, function) CONCAT2(prefix, class, function) +#define CONCAT2(prefix, class, function) Java_##prefix##_##class##_##function +#define SDL_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLActivity, function) +#define SDL_JAVA_AUDIO_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLAudioManager, function) +#define SDL_JAVA_CONTROLLER_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLControllerManager, function) +#define SDL_JAVA_INTERFACE_INPUT_CONNECTION(function) CONCAT1(SDL_JAVA_PREFIX, SDLInputConnection, function) /* Audio encoding definitions */ -#define ENCODING_PCM_8BIT 3 -#define ENCODING_PCM_16BIT 2 -#define ENCODING_PCM_FLOAT 4 +#define ENCODING_PCM_8BIT 3 +#define ENCODING_PCM_16BIT 2 +#define ENCODING_PCM_FLOAT 4 /* Java class SDLActivity */ JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetVersion)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)( - JNIEnv *env, jclass cls, - jstring library, jstring function, jobject array); + JNIEnv *env, jclass cls, + jstring library, jstring function, jobject array); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)( - JNIEnv *env, jclass jcls, - jstring filename); + JNIEnv *env, jclass jcls, + jstring filename); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)( - JNIEnv *env, jclass jcls, - jint surfaceWidth, jint surfaceHeight, - jint deviceWidth, jint deviceHeight, jfloat rate); + JNIEnv *env, jclass jcls, + jint surfaceWidth, jint surfaceHeight, + jint deviceWidth, jint deviceHeight, jfloat rate); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceCreated)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceDestroyed)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyDown)( - JNIEnv *env, jclass jcls, - jint keycode); + JNIEnv *env, jclass jcls, + jint keycode); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyUp)( - JNIEnv *env, jclass jcls, - jint keycode); + JNIEnv *env, jclass jcls, + jint keycode); JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(onNativeSoftReturnKey)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyboardFocusLost)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeTouch)( - JNIEnv *env, jclass jcls, - jint touch_device_id_in, jint pointer_finger_id_in, - jint action, jfloat x, jfloat y, jfloat p); + JNIEnv *env, jclass jcls, + jint touch_device_id_in, jint pointer_finger_id_in, + jint action, jfloat x, jfloat y, jfloat p); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)( - JNIEnv *env, jclass jcls, - jint button, jint action, jfloat x, jfloat y, jboolean relative); + JNIEnv *env, jclass jcls, + jint button, jint action, jfloat x, jfloat y, jboolean relative); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeAccel)( - JNIEnv *env, jclass jcls, - jfloat x, jfloat y, jfloat z); + JNIEnv *env, jclass jcls, + jfloat x, jfloat y, jfloat z); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeClipboardChanged)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeLowMemory)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeLocaleChanged)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSendQuit)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeQuit)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePause)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeResume)( - JNIEnv *env, jclass cls); + JNIEnv *env, jclass cls); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeFocusChanged)( - JNIEnv *env, jclass cls, jboolean hasFocus); + JNIEnv *env, jclass cls, jboolean hasFocus); JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetHint)( - JNIEnv *env, jclass cls, - jstring name); + JNIEnv *env, jclass cls, + jstring name); JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(nativeGetHintBoolean)( - JNIEnv *env, jclass cls, - jstring name, jboolean default_value); + JNIEnv *env, jclass cls, + jstring name, jboolean default_value); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)( - JNIEnv *env, jclass cls, - jstring name, jstring value); + JNIEnv *env, jclass cls, + jstring name, jstring value); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)( - JNIEnv *env, jclass cls, - jint orientation); + JNIEnv *env, jclass cls, + jint orientation); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeAddTouch)( - JNIEnv* env, jclass cls, - jint touchId, jstring name); + JNIEnv *env, jclass cls, + jint touchId, jstring name); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePermissionResult)( - JNIEnv* env, jclass cls, - jint requestCode, jboolean result); + JNIEnv *env, jclass cls, + jint requestCode, jboolean result); static JNINativeMethod SDLActivity_tab[] = { - { "nativeGetVersion", "()Ljava/lang/String;", SDL_JAVA_INTERFACE(nativeGetVersion) }, - { "nativeSetupJNI", "()I", SDL_JAVA_INTERFACE(nativeSetupJNI) }, - { "nativeRunMain", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)I", SDL_JAVA_INTERFACE(nativeRunMain) }, - { "onNativeDropFile", "(Ljava/lang/String;)V", SDL_JAVA_INTERFACE(onNativeDropFile) }, - { "nativeSetScreenResolution", "(IIIIF)V", SDL_JAVA_INTERFACE(nativeSetScreenResolution) }, - { "onNativeResize", "()V", SDL_JAVA_INTERFACE(onNativeResize) }, - { "onNativeSurfaceCreated", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceCreated) }, - { "onNativeSurfaceChanged", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceChanged) }, - { "onNativeSurfaceDestroyed", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceDestroyed) }, - { "onNativeKeyDown", "(I)V", SDL_JAVA_INTERFACE(onNativeKeyDown) }, - { "onNativeKeyUp", "(I)V", SDL_JAVA_INTERFACE(onNativeKeyUp) }, - { "onNativeSoftReturnKey", "()Z", SDL_JAVA_INTERFACE(onNativeSoftReturnKey) }, - { "onNativeKeyboardFocusLost", "()V", SDL_JAVA_INTERFACE(onNativeKeyboardFocusLost) }, - { "onNativeTouch", "(IIIFFF)V", SDL_JAVA_INTERFACE(onNativeTouch) }, - { "onNativeMouse", "(IIFFZ)V", SDL_JAVA_INTERFACE(onNativeMouse) }, - { "onNativeAccel", "(FFF)V", SDL_JAVA_INTERFACE(onNativeAccel) }, - { "onNativeClipboardChanged", "()V", SDL_JAVA_INTERFACE(onNativeClipboardChanged) }, - { "nativeLowMemory", "()V", SDL_JAVA_INTERFACE(nativeLowMemory) }, - { "onNativeLocaleChanged", "()V", SDL_JAVA_INTERFACE(onNativeLocaleChanged) }, - { "nativeSendQuit", "()V", SDL_JAVA_INTERFACE(nativeSendQuit) }, - { "nativeQuit", "()V", SDL_JAVA_INTERFACE(nativeQuit) }, - { "nativePause", "()V", SDL_JAVA_INTERFACE(nativePause) }, - { "nativeResume", "()V", SDL_JAVA_INTERFACE(nativeResume) }, - { "nativeFocusChanged", "(Z)V", SDL_JAVA_INTERFACE(nativeFocusChanged) }, - { "nativeGetHint", "(Ljava/lang/String;)Ljava/lang/String;", SDL_JAVA_INTERFACE(nativeGetHint) }, - { "nativeGetHintBoolean", "(Ljava/lang/String;Z)Z", SDL_JAVA_INTERFACE(nativeGetHintBoolean) }, - { "nativeSetenv", "(Ljava/lang/String;Ljava/lang/String;)V", SDL_JAVA_INTERFACE(nativeSetenv) }, + { "nativeGetVersion", "()Ljava/lang/String;", SDL_JAVA_INTERFACE(nativeGetVersion) }, + { "nativeSetupJNI", "()I", SDL_JAVA_INTERFACE(nativeSetupJNI) }, + { "nativeRunMain", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)I", SDL_JAVA_INTERFACE(nativeRunMain) }, + { "onNativeDropFile", "(Ljava/lang/String;)V", SDL_JAVA_INTERFACE(onNativeDropFile) }, + { "nativeSetScreenResolution", "(IIIIF)V", SDL_JAVA_INTERFACE(nativeSetScreenResolution) }, + { "onNativeResize", "()V", SDL_JAVA_INTERFACE(onNativeResize) }, + { "onNativeSurfaceCreated", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceCreated) }, + { "onNativeSurfaceChanged", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceChanged) }, + { "onNativeSurfaceDestroyed", "()V", SDL_JAVA_INTERFACE(onNativeSurfaceDestroyed) }, + { "onNativeKeyDown", "(I)V", SDL_JAVA_INTERFACE(onNativeKeyDown) }, + { "onNativeKeyUp", "(I)V", SDL_JAVA_INTERFACE(onNativeKeyUp) }, + { "onNativeSoftReturnKey", "()Z", SDL_JAVA_INTERFACE(onNativeSoftReturnKey) }, + { "onNativeKeyboardFocusLost", "()V", SDL_JAVA_INTERFACE(onNativeKeyboardFocusLost) }, + { "onNativeTouch", "(IIIFFF)V", SDL_JAVA_INTERFACE(onNativeTouch) }, + { "onNativeMouse", "(IIFFZ)V", SDL_JAVA_INTERFACE(onNativeMouse) }, + { "onNativeAccel", "(FFF)V", SDL_JAVA_INTERFACE(onNativeAccel) }, + { "onNativeClipboardChanged", "()V", SDL_JAVA_INTERFACE(onNativeClipboardChanged) }, + { "nativeLowMemory", "()V", SDL_JAVA_INTERFACE(nativeLowMemory) }, + { "onNativeLocaleChanged", "()V", SDL_JAVA_INTERFACE(onNativeLocaleChanged) }, + { "nativeSendQuit", "()V", SDL_JAVA_INTERFACE(nativeSendQuit) }, + { "nativeQuit", "()V", SDL_JAVA_INTERFACE(nativeQuit) }, + { "nativePause", "()V", SDL_JAVA_INTERFACE(nativePause) }, + { "nativeResume", "()V", SDL_JAVA_INTERFACE(nativeResume) }, + { "nativeFocusChanged", "(Z)V", SDL_JAVA_INTERFACE(nativeFocusChanged) }, + { "nativeGetHint", "(Ljava/lang/String;)Ljava/lang/String;", SDL_JAVA_INTERFACE(nativeGetHint) }, + { "nativeGetHintBoolean", "(Ljava/lang/String;Z)Z", SDL_JAVA_INTERFACE(nativeGetHintBoolean) }, + { "nativeSetenv", "(Ljava/lang/String;Ljava/lang/String;)V", SDL_JAVA_INTERFACE(nativeSetenv) }, { "onNativeOrientationChanged", "(I)V", SDL_JAVA_INTERFACE(onNativeOrientationChanged) }, - { "nativeAddTouch", "(ILjava/lang/String;)V", SDL_JAVA_INTERFACE(nativeAddTouch) }, - { "nativePermissionResult", "(IZ)V", SDL_JAVA_INTERFACE(nativePermissionResult) } + { "nativeAddTouch", "(ILjava/lang/String;)V", SDL_JAVA_INTERFACE(nativeAddTouch) }, + { "nativePermissionResult", "(IZ)V", SDL_JAVA_INTERFACE(nativePermissionResult) } }; /* Java class SDLInputConnection */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)( - JNIEnv *env, jclass cls, - jstring text, jint newCursorPosition); + JNIEnv *env, jclass cls, + jstring text, jint newCursorPosition); JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar)( - JNIEnv *env, jclass cls, - jchar chUnicode); + JNIEnv *env, jclass cls, + jchar chUnicode); static JNINativeMethod SDLInputConnection_tab[] = { - { "nativeCommitText", "(Ljava/lang/String;I)V", SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText) }, - { "nativeGenerateScancodeForUnichar", "(C)V", SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar) } + { "nativeCommitText", "(Ljava/lang/String;I)V", SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText) }, + { "nativeGenerateScancodeForUnichar", "(C)V", SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar) } }; /* Java class SDLAudioManager */ JNIEXPORT void JNICALL SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); + +JNIEXPORT void JNICALL + SDL_JAVA_AUDIO_INTERFACE(addAudioDevice)(JNIEnv *env, jclass jcls, jboolean is_capture, + jint device_id); + +JNIEXPORT void JNICALL + SDL_JAVA_AUDIO_INTERFACE(removeAudioDevice)(JNIEnv *env, jclass jcls, jboolean is_capture, + jint device_id); static JNINativeMethod SDLAudioManager_tab[] = { - { "nativeSetupJNI", "()I", SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI) } + { "nativeSetupJNI", "()I", SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI) }, + { "addAudioDevice", "(ZI)V", SDL_JAVA_AUDIO_INTERFACE(addAudioDevice) }, + { "removeAudioDevice", "(ZI)V", SDL_JAVA_AUDIO_INTERFACE(removeAudioDevice) } }; /* Java class SDLControllerManager */ JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI)( - JNIEnv *env, jclass jcls); + JNIEnv *env, jclass jcls); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown)( - JNIEnv *env, jclass jcls, - jint device_id, jint keycode); + JNIEnv *env, jclass jcls, + jint device_id, jint keycode); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp)( - JNIEnv *env, jclass jcls, - jint device_id, jint keycode); + JNIEnv *env, jclass jcls, + jint device_id, jint keycode); JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy)( - JNIEnv *env, jclass jcls, - jint device_id, jint axis, jfloat value); + JNIEnv *env, jclass jcls, + jint device_id, jint axis, jfloat value); JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat)( - JNIEnv *env, jclass jcls, - jint device_id, jint hat_id, jint x, jint y); + JNIEnv *env, jclass jcls, + jint device_id, jint hat_id, jint x, jint y); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)( - JNIEnv *env, jclass jcls, - jint device_id, jstring device_name, jstring device_desc, jint vendor_id, jint product_id, - jboolean is_accelerometer, jint button_mask, jint naxes, jint nhats, jint nballs); + JNIEnv *env, jclass jcls, + jint device_id, jstring device_name, jstring device_desc, jint vendor_id, jint product_id, + jboolean is_accelerometer, jint button_mask, jint naxes, jint axis_mask, jint nhats, jint nballs); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick)( - JNIEnv *env, jclass jcls, - jint device_id); + JNIEnv *env, jclass jcls, + jint device_id); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddHaptic)( - JNIEnv *env, jclass jcls, - jint device_id, jstring device_name); + JNIEnv *env, jclass jcls, + jint device_id, jstring device_name); JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic)( - JNIEnv *env, jclass jcls, - jint device_id); + JNIEnv *env, jclass jcls, + jint device_id); static JNINativeMethod SDLControllerManager_tab[] = { - { "nativeSetupJNI", "()I", SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI) }, - { "onNativePadDown", "(II)I", SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown) }, - { "onNativePadUp", "(II)I", SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp) }, - { "onNativeJoy", "(IIF)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy) }, - { "onNativeHat", "(IIII)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat) }, - { "nativeAddJoystick", "(ILjava/lang/String;Ljava/lang/String;IIZIIII)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick) }, - { "nativeRemoveJoystick", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick) }, - { "nativeAddHaptic", "(ILjava/lang/String;)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddHaptic) }, - { "nativeRemoveHaptic", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic) } + { "nativeSetupJNI", "()I", SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI) }, + { "onNativePadDown", "(II)I", SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown) }, + { "onNativePadUp", "(II)I", SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp) }, + { "onNativeJoy", "(IIF)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy) }, + { "onNativeHat", "(IIII)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat) }, + { "nativeAddJoystick", "(ILjava/lang/String;Ljava/lang/String;IIZIIIII)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick) }, + { "nativeRemoveJoystick", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick) }, + { "nativeAddHaptic", "(ILjava/lang/String;)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddHaptic) }, + { "nativeRemoveHaptic", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic) } }; - /* Uncomment this to log messages entering and exiting methods in this file */ /* #define DEBUG_JNI */ @@ -285,7 +294,6 @@ static void checkJNIReady(void); *******************************************************************************/ #include - /******************************************************************************* Globals *******************************************************************************/ @@ -332,6 +340,8 @@ static jmethodID midSupportsRelativeMouse; static jclass mAudioManagerClass; /* method signatures */ +static jmethodID midGetAudioOutputDevices; +static jmethodID midGetAudioInputDevices; static jmethodID midAudioOpen; static jmethodID midAudioWriteByteBuffer; static jmethodID midAudioWriteShortBuffer; @@ -396,8 +406,8 @@ static jobject javaAssetManagerRef = 0; */ /* Set local storage value */ -static int -Android_JNI_SetEnv(JNIEnv *env) { +static int Android_JNI_SetEnv(JNIEnv *env) +{ int status = pthread_setspecific(mThreadKey, env); if (status < 0) { __android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed pthread_setspecific() in Android_JNI_SetEnv() (err=%d)", status); @@ -406,7 +416,7 @@ Android_JNI_SetEnv(JNIEnv *env) { } /* Get local storage value */ -JNIEnv* Android_JNI_GetEnv(void) +JNIEnv *Android_JNI_GetEnv(void) { /* Get JNIEnv from the Thread local storage */ JNIEnv *env = pthread_getspecific(mThreadKey); @@ -466,11 +476,10 @@ int Android_JNI_SetupThread(void) } /* Destructor called for each thread where mThreadKey is not NULL */ -static void -Android_JNI_ThreadDestroyed(void *value) +static void Android_JNI_ThreadDestroyed(void *value) { /* The thread is being destroyed, detach it from the Java VM and set the mThreadKey value to NULL as required */ - JNIEnv *env = (JNIEnv *) value; + JNIEnv *env = (JNIEnv *)value; if (env != NULL) { (*mJavaVM)->DetachCurrentThread(mJavaVM); Android_JNI_SetEnv(NULL); @@ -478,8 +487,7 @@ Android_JNI_ThreadDestroyed(void *value) } /* Creation of local storage mThreadKey */ -static void -Android_JNI_CreateKey(void) +static void Android_JNI_CreateKey(void) { int status = pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed); if (status < 0) { @@ -487,8 +495,7 @@ Android_JNI_CreateKey(void) } } -static void -Android_JNI_CreateKey_once(void) +static void Android_JNI_CreateKey_once(void) { int status = pthread_once(&key_once, Android_JNI_CreateKey); if (status < 0) { @@ -496,8 +503,7 @@ Android_JNI_CreateKey_once(void) } } -static void -register_methods(JNIEnv *env, const char *classname, JNINativeMethod *methods, int nb) +static void register_methods(JNIEnv *env, const char *classname, JNINativeMethod *methods, int nb) { jclass clazz = (*env)->FindClass(env, classname); if (clazz == NULL || (*env)->RegisterNatives(env, clazz, methods, nb) < 0) { @@ -575,7 +581,6 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cl __android_log_print(ANDROID_LOG_ERROR, "SDL", "failed to create Android_ActivityMutex mutex"); } - Android_PauseSem = SDL_CreateSemaphore(0); if (Android_PauseSem == NULL) { __android_log_print(ANDROID_LOG_ERROR, "SDL", "failed to create Android_PauseSem semaphore"); @@ -593,30 +598,30 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cl midClipboardSetText = (*env)->GetStaticMethodID(env, mActivityClass, "clipboardSetText", "(Ljava/lang/String;)V"); midCreateCustomCursor = (*env)->GetStaticMethodID(env, mActivityClass, "createCustomCursor", "([IIIII)I"); midDestroyCustomCursor = (*env)->GetStaticMethodID(env, mActivityClass, "destroyCustomCursor", "(I)V"); - midGetContext = (*env)->GetStaticMethodID(env, mActivityClass, "getContext","()Landroid/content/Context;"); + midGetContext = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;"); midGetDisplayDPI = (*env)->GetStaticMethodID(env, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;"); midGetManifestEnvironmentVariables = (*env)->GetStaticMethodID(env, mActivityClass, "getManifestEnvironmentVariables", "()Z"); - midGetNativeSurface = (*env)->GetStaticMethodID(env, mActivityClass, "getNativeSurface","()Landroid/view/Surface;"); + midGetNativeSurface = (*env)->GetStaticMethodID(env, mActivityClass, "getNativeSurface", "()Landroid/view/Surface;"); midInitTouch = (*env)->GetStaticMethodID(env, mActivityClass, "initTouch", "()V"); - midIsAndroidTV = (*env)->GetStaticMethodID(env, mActivityClass, "isAndroidTV","()Z"); + midIsAndroidTV = (*env)->GetStaticMethodID(env, mActivityClass, "isAndroidTV", "()Z"); midIsChromebook = (*env)->GetStaticMethodID(env, mActivityClass, "isChromebook", "()Z"); midIsDeXMode = (*env)->GetStaticMethodID(env, mActivityClass, "isDeXMode", "()Z"); - midIsScreenKeyboardShown = (*env)->GetStaticMethodID(env, mActivityClass, "isScreenKeyboardShown","()Z"); + midIsScreenKeyboardShown = (*env)->GetStaticMethodID(env, mActivityClass, "isScreenKeyboardShown", "()Z"); midIsTablet = (*env)->GetStaticMethodID(env, mActivityClass, "isTablet", "()Z"); midManualBackButton = (*env)->GetStaticMethodID(env, mActivityClass, "manualBackButton", "()V"); - midMinimizeWindow = (*env)->GetStaticMethodID(env, mActivityClass, "minimizeWindow","()V"); + midMinimizeWindow = (*env)->GetStaticMethodID(env, mActivityClass, "minimizeWindow", "()V"); midOpenURL = (*env)->GetStaticMethodID(env, mActivityClass, "openURL", "(Ljava/lang/String;)I"); midRequestPermission = (*env)->GetStaticMethodID(env, mActivityClass, "requestPermission", "(Ljava/lang/String;I)V"); midShowToast = (*env)->GetStaticMethodID(env, mActivityClass, "showToast", "(Ljava/lang/String;IIII)I"); midSendMessage = (*env)->GetStaticMethodID(env, mActivityClass, "sendMessage", "(II)Z"); - midSetActivityTitle = (*env)->GetStaticMethodID(env, mActivityClass, "setActivityTitle","(Ljava/lang/String;)Z"); + midSetActivityTitle = (*env)->GetStaticMethodID(env, mActivityClass, "setActivityTitle", "(Ljava/lang/String;)Z"); midSetCustomCursor = (*env)->GetStaticMethodID(env, mActivityClass, "setCustomCursor", "(I)Z"); - midSetOrientation = (*env)->GetStaticMethodID(env, mActivityClass, "setOrientation","(IIZLjava/lang/String;)V"); + midSetOrientation = (*env)->GetStaticMethodID(env, mActivityClass, "setOrientation", "(IIZLjava/lang/String;)V"); midSetRelativeMouseEnabled = (*env)->GetStaticMethodID(env, mActivityClass, "setRelativeMouseEnabled", "(Z)Z"); midSetSystemCursor = (*env)->GetStaticMethodID(env, mActivityClass, "setSystemCursor", "(I)Z"); - midSetWindowStyle = (*env)->GetStaticMethodID(env, mActivityClass, "setWindowStyle","(Z)V"); - midShouldMinimizeOnFocusLoss = (*env)->GetStaticMethodID(env, mActivityClass, "shouldMinimizeOnFocusLoss","()Z"); - midShowTextInput = (*env)->GetStaticMethodID(env, mActivityClass, "showTextInput", "(IIII)Z"); + midSetWindowStyle = (*env)->GetStaticMethodID(env, mActivityClass, "setWindowStyle", "(Z)V"); + midShouldMinimizeOnFocusLoss = (*env)->GetStaticMethodID(env, mActivityClass, "shouldMinimizeOnFocusLoss", "()Z"); + midShowTextInput = (*env)->GetStaticMethodID(env, mActivityClass, "showTextInput", "(IIII)Z"); midSupportsRelativeMouse = (*env)->GetStaticMethodID(env, mActivityClass, "supportsRelativeMouse", "()Z"); if (!midClipboardGetText || @@ -662,32 +667,42 @@ JNIEXPORT void JNICALL SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI)(JNIEnv *env, jcl mAudioManagerClass = (jclass)((*env)->NewGlobalRef(env, cls)); + midGetAudioOutputDevices = (*env)->GetStaticMethodID(env, mAudioManagerClass, + "getAudioOutputDevices", + "()[I"); + midGetAudioInputDevices = (*env)->GetStaticMethodID(env, mAudioManagerClass, + "getAudioInputDevices", + "()[I"); midAudioOpen = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioOpen", "(IIII)[I"); + "audioOpen", "(IIIII)[I"); midAudioWriteByteBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioWriteByteBuffer", "([B)V"); + "audioWriteByteBuffer", "([B)V"); midAudioWriteShortBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioWriteShortBuffer", "([S)V"); + "audioWriteShortBuffer", "([S)V"); midAudioWriteFloatBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioWriteFloatBuffer", "([F)V"); + "audioWriteFloatBuffer", "([F)V"); midAudioClose = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioClose", "()V"); + "audioClose", "()V"); midCaptureOpen = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "captureOpen", "(IIII)[I"); + "captureOpen", "(IIIII)[I"); midCaptureReadByteBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "captureReadByteBuffer", "([BZ)I"); + "captureReadByteBuffer", "([BZ)I"); midCaptureReadShortBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "captureReadShortBuffer", "([SZ)I"); + "captureReadShortBuffer", "([SZ)I"); midCaptureReadFloatBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "captureReadFloatBuffer", "([FZ)I"); + "captureReadFloatBuffer", "([FZ)I"); midCaptureClose = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "captureClose", "()V"); + "captureClose", "()V"); midAudioSetThreadPriority = (*env)->GetStaticMethodID(env, mAudioManagerClass, - "audioSetThreadPriority", "(ZI)V"); + "audioSetThreadPriority", "(ZI)V"); - if (!midAudioOpen || !midAudioWriteByteBuffer || !midAudioWriteShortBuffer || !midAudioWriteFloatBuffer || !midAudioClose || - !midCaptureOpen || !midCaptureReadByteBuffer || !midCaptureReadShortBuffer || !midCaptureReadFloatBuffer || !midCaptureClose || !midAudioSetThreadPriority) { - __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLAudioManager.java?"); + if (!midGetAudioOutputDevices || !midGetAudioInputDevices || !midAudioOpen || + !midAudioWriteByteBuffer || !midAudioWriteShortBuffer || !midAudioWriteFloatBuffer || + !midAudioClose || + !midCaptureOpen || !midCaptureReadByteBuffer || !midCaptureReadShortBuffer || + !midCaptureReadFloatBuffer || !midCaptureClose || !midAudioSetThreadPriority) { + __android_log_print(ANDROID_LOG_WARN, "SDL", + "Missing some Java callbacks, do you have the latest version of SDLAudioManager.java?"); } checkJNIReady(); @@ -701,13 +716,13 @@ JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI)(JNIEnv *env mControllerManagerClass = (jclass)((*env)->NewGlobalRef(env, cls)); midPollInputDevices = (*env)->GetStaticMethodID(env, mControllerManagerClass, - "pollInputDevices", "()V"); + "pollInputDevices", "()V"); midPollHapticDevices = (*env)->GetStaticMethodID(env, mControllerManagerClass, - "pollHapticDevices", "()V"); + "pollHapticDevices", "()V"); midHapticRun = (*env)->GetStaticMethodID(env, mControllerManagerClass, - "hapticRun", "(IFI)V"); + "hapticRun", "(IFI)V"); midHapticStop = (*env)->GetStaticMethodID(env, mControllerManagerClass, - "hapticStop", "(I)V"); + "hapticStop", "(I)V"); if (!midPollInputDevices || !midPollHapticDevices || !midHapticRun || !midHapticStop) { __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLControllerManager.java?"); @@ -734,7 +749,7 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, library_file = (*env)->GetStringUTFChars(env, library, NULL); library_handle = dlopen(library_file, RTLD_GLOBAL); - if (!library_handle) { + if (library_handle == NULL) { /* When deploying android app bundle format uncompressed native libs may not extract from apk to filesystem. In this case we should use lib name without path. https://bugzilla.libsdl.org/show_bug.cgi?id=4739 */ const char *library_name = SDL_strrchr(library_file, '/'); @@ -759,7 +774,7 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, /* Prepare the arguments. */ len = (*env)->GetArrayLength(env, array); - argv = SDL_small_alloc(char *, 1 + len + 1, &isstack); /* !!! FIXME: check for NULL */ + argv = SDL_small_alloc(char *, 1 + len + 1, &isstack); /* !!! FIXME: check for NULL */ argc = 0; /* Use the name "app_process" so PHYSFS_platformCalcBaseDir() works. https://bitbucket.org/MartinFelis/love-android-sdl2/issue/23/release-build-crash-on-start @@ -777,14 +792,13 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, } (*env)->DeleteLocalRef(env, string); } - if (!arg) { + if (arg == NULL) { arg = SDL_strdup(""); } argv[argc++] = arg; } argv[argc] = NULL; - /* Run the application. */ status = SDL_main(argc, argv); @@ -818,8 +832,8 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, /* Drop file */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)( - JNIEnv *env, jclass jcls, - jstring filename) + JNIEnv *env, jclass jcls, + jstring filename) { const char *path = (*env)->GetStringUTFChars(env, filename, NULL); SDL_SendDropFile(NULL, path); @@ -828,16 +842,19 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)( } /* Lock / Unlock Mutex */ -void Android_ActivityMutex_Lock() { +void Android_ActivityMutex_Lock() +{ SDL_LockMutex(Android_ActivityMutex); } -void Android_ActivityMutex_Unlock() { +void Android_ActivityMutex_Unlock() +{ SDL_UnlockMutex(Android_ActivityMutex); } /* Lock the Mutex when the Activity is in its 'Running' state */ -void Android_ActivityMutex_Lock_Running() { +void Android_ActivityMutex_Lock_Running() +{ int pauseSignaled = 0; int resumeSignaled = 0; @@ -857,9 +874,9 @@ retry: /* Set screen resolution */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)( - JNIEnv *env, jclass jcls, - jint surfaceWidth, jint surfaceHeight, - jint deviceWidth, jint deviceHeight, jfloat rate) + JNIEnv *env, jclass jcls, + jint surfaceWidth, jint surfaceHeight, + jint deviceWidth, jint deviceHeight, jfloat rate) { SDL_LockMutex(Android_ActivityMutex); @@ -870,12 +887,11 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)( /* Resize */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)( - JNIEnv *env, jclass jcls) + JNIEnv *env, jclass jcls) { SDL_LockMutex(Android_ActivityMutex); - if (Android_Window) - { + if (Android_Window) { Android_SendResize(Android_Window); } @@ -883,15 +899,14 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)( - JNIEnv *env, jclass jcls, - jint orientation) + JNIEnv *env, jclass jcls, + jint orientation) { SDL_LockMutex(Android_ActivityMutex); displayOrientation = (SDL_DisplayOrientation)orientation; - if (Android_Window) - { + if (Android_Window) { SDL_VideoDisplay *display = SDL_GetDisplay(0); SDL_SendDisplayEvent(display, SDL_DISPLAYEVENT_ORIENTATION, orientation); } @@ -900,68 +915,92 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeAddTouch)( - JNIEnv* env, jclass cls, - jint touchId, jstring name) + JNIEnv *env, jclass cls, + jint touchId, jstring name) { const char *utfname = (*env)->GetStringUTFChars(env, name, NULL); - SDL_AddTouch((SDL_TouchID) touchId, SDL_TOUCH_DEVICE_DIRECT, utfname); + SDL_AddTouch((SDL_TouchID)touchId, SDL_TOUCH_DEVICE_DIRECT, utfname); (*env)->ReleaseStringUTFChars(env, name, utfname); } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePermissionResult)( - JNIEnv* env, jclass cls, - jint requestCode, jboolean result) + JNIEnv *env, jclass cls, + jint requestCode, jboolean result) { bPermissionRequestResult = result; SDL_AtomicSet(&bPermissionRequestPending, SDL_FALSE); } +extern void SDL_AddAudioDevice(const SDL_bool iscapture, const char *name, SDL_AudioSpec *spec, void *handle); +extern void SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle); + +JNIEXPORT void JNICALL +SDL_JAVA_AUDIO_INTERFACE(addAudioDevice)(JNIEnv *env, jclass jcls, jboolean is_capture, + jint device_id) +{ + if (SDL_GetCurrentAudioDriver() != NULL) { + char device_name[64]; + SDL_snprintf(device_name, sizeof(device_name), "%d", device_id); + SDL_Log("Adding device with name %s, capture %d", device_name, is_capture); + SDL_AddAudioDevice(is_capture, SDL_strdup(device_name), NULL, (void *)((size_t)device_id + 1)); + } +} + +JNIEXPORT void JNICALL +SDL_JAVA_AUDIO_INTERFACE(removeAudioDevice)(JNIEnv *env, jclass jcls, jboolean is_capture, + jint device_id) +{ + if (SDL_GetCurrentAudioDriver() != NULL) { + SDL_Log("Removing device with handle %d, capture %d", device_id + 1, is_capture); + SDL_RemoveAudioDevice(is_capture, (void *)((size_t)device_id + 1)); + } +} + /* Paddown */ JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown)( - JNIEnv *env, jclass jcls, - jint device_id, jint keycode) + JNIEnv *env, jclass jcls, + jint device_id, jint keycode) { return Android_OnPadDown(device_id, keycode); } /* Padup */ JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp)( - JNIEnv *env, jclass jcls, - jint device_id, jint keycode) + JNIEnv *env, jclass jcls, + jint device_id, jint keycode) { return Android_OnPadUp(device_id, keycode); } /* Joy */ JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy)( - JNIEnv *env, jclass jcls, - jint device_id, jint axis, jfloat value) + JNIEnv *env, jclass jcls, + jint device_id, jint axis, jfloat value) { Android_OnJoy(device_id, axis, value); } /* POV Hat */ JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat)( - JNIEnv *env, jclass jcls, - jint device_id, jint hat_id, jint x, jint y) + JNIEnv *env, jclass jcls, + jint device_id, jint hat_id, jint x, jint y) { Android_OnHat(device_id, hat_id, x, y); } - JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)( - JNIEnv *env, jclass jcls, - jint device_id, jstring device_name, jstring device_desc, - jint vendor_id, jint product_id, jboolean is_accelerometer, - jint button_mask, jint naxes, jint nhats, jint nballs) + JNIEnv *env, jclass jcls, + jint device_id, jstring device_name, jstring device_desc, + jint vendor_id, jint product_id, jboolean is_accelerometer, + jint button_mask, jint naxes, jint axis_mask, jint nhats, jint nballs) { int retval; const char *name = (*env)->GetStringUTFChars(env, device_name, NULL); const char *desc = (*env)->GetStringUTFChars(env, device_desc, NULL); - retval = Android_AddJoystick(device_id, name, desc, vendor_id, product_id, is_accelerometer ? SDL_TRUE : SDL_FALSE, button_mask, naxes, nhats, nballs); + retval = Android_AddJoystick(device_id, name, desc, vendor_id, product_id, is_accelerometer ? SDL_TRUE : SDL_FALSE, button_mask, naxes, axis_mask, nhats, nballs); (*env)->ReleaseStringUTFChars(env, device_name, name); (*env)->ReleaseStringUTFChars(env, device_desc, desc); @@ -970,8 +1009,8 @@ JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)( } JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick)( - JNIEnv *env, jclass jcls, - jint device_id) + JNIEnv *env, jclass jcls, + jint device_id) { return Android_RemoveJoystick(device_id); } @@ -1000,9 +1039,8 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceCreated)(JNIEnv *env, j { SDL_LockMutex(Android_ActivityMutex); - if (Android_Window) - { - SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata; + if (Android_Window) { + SDL_WindowData *data = (SDL_WindowData *)Android_Window->driverdata; data->native_window = Android_JNI_GetNativeWindow(); if (data->native_window == NULL) { @@ -1019,14 +1057,13 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)(JNIEnv *env, j SDL_LockMutex(Android_ActivityMutex); #if SDL_VIDEO_OPENGL_EGL - if (Android_Window) - { + if (Android_Window) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)Android_Window->driverdata; /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */ if (data->egl_surface == EGL_NO_SURFACE) { - data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->native_window); + data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)data->native_window); } /* GL Context handling is done in the event loop because this function is run from the Java thread */ @@ -1045,13 +1082,12 @@ retry: SDL_LockMutex(Android_ActivityMutex); - if (Android_Window) - { + if (Android_Window) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)Android_Window->driverdata; /* Wait for Main thread being paused and context un-activated to release 'egl_surface' */ - if (! data->backup_done) { + if (!data->backup_done) { nb_attempt -= 1; if (nb_attempt == 0) { SDL_SetError("Try to release egl_surface with context probably still active"); @@ -1082,23 +1118,23 @@ retry: /* Keydown */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyDown)( - JNIEnv *env, jclass jcls, - jint keycode) + JNIEnv *env, jclass jcls, + jint keycode) { Android_OnKeyDown(keycode); } /* Keyup */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyUp)( - JNIEnv *env, jclass jcls, - jint keycode) + JNIEnv *env, jclass jcls, + jint keycode) { Android_OnKeyUp(keycode); } /* Virtual keyboard return key might stop text input */ JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(onNativeSoftReturnKey)( - JNIEnv *env, jclass jcls) + JNIEnv *env, jclass jcls) { if (SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE)) { SDL_StopTextInput(); @@ -1109,18 +1145,17 @@ JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(onNativeSoftReturnKey)( /* Keyboard Focus Lost */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyboardFocusLost)( - JNIEnv *env, jclass jcls) + JNIEnv *env, jclass jcls) { /* Calling SDL_StopTextInput will take care of hiding the keyboard and cleaning up the DummyText widget */ SDL_StopTextInput(); } - /* Touch */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeTouch)( - JNIEnv *env, jclass jcls, - jint touch_device_id_in, jint pointer_finger_id_in, - jint action, jfloat x, jfloat y, jfloat p) + JNIEnv *env, jclass jcls, + jint touch_device_id_in, jint pointer_finger_id_in, + jint action, jfloat x, jfloat y, jfloat p) { SDL_LockMutex(Android_ActivityMutex); @@ -1131,8 +1166,8 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeTouch)( /* Mouse */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)( - JNIEnv *env, jclass jcls, - jint button, jint action, jfloat x, jfloat y, jboolean relative) + JNIEnv *env, jclass jcls, + jint button, jint action, jfloat x, jfloat y, jboolean relative) { SDL_LockMutex(Android_ActivityMutex); @@ -1143,8 +1178,8 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)( /* Accelerometer */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeAccel)( - JNIEnv *env, jclass jcls, - jfloat x, jfloat y, jfloat z) + JNIEnv *env, jclass jcls, + jfloat x, jfloat y, jfloat z) { fLastAccelerometer[0] = x; fLastAccelerometer[1] = y; @@ -1154,14 +1189,14 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeAccel)( /* Clipboard */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeClipboardChanged)( - JNIEnv *env, jclass jcls) + JNIEnv *env, jclass jcls) { SDL_SendClipboardUpdate(); } /* Low memory */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeLowMemory)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { SDL_SendAppEvent(SDL_APP_LOWMEMORY); } @@ -1169,15 +1204,14 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeLowMemory)( /* Locale * requires android:configChanges="layoutDirection|locale" in AndroidManifest.xml */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeLocaleChanged)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { SDL_SendAppEvent(SDL_LOCALECHANGED); } - /* Send Quit event to "SDLThread" thread */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSendQuit)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { /* Discard previous events. The user should have handled state storage * in SDL_APP_WILLENTERBACKGROUND. After nativeSendQuit() is called, no @@ -1197,7 +1231,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSendQuit)( /* Activity ends */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeQuit)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { const char *str; @@ -1228,7 +1262,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeQuit)( /* Pause */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePause)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()"); @@ -1239,7 +1273,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePause)( /* Resume */ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeResume)( - JNIEnv *env, jclass cls) + JNIEnv *env, jclass cls) { __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()"); @@ -1251,7 +1285,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeResume)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeFocusChanged)( - JNIEnv *env, jclass cls, jboolean hasFocus) + JNIEnv *env, jclass cls, jboolean hasFocus) { SDL_LockMutex(Android_ActivityMutex); @@ -1264,8 +1298,8 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeFocusChanged)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)( - JNIEnv *env, jclass cls, - jstring text, jint newCursorPosition) + JNIEnv *env, jclass cls, + jstring text, jint newCursorPosition) { const char *utftext = (*env)->GetStringUTFChars(env, text, NULL); @@ -1275,15 +1309,15 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar)( - JNIEnv *env, jclass cls, - jchar chUnicode) + JNIEnv *env, jclass cls, + jchar chUnicode) { SDL_SendKeyboardUnicodeKey(chUnicode); } JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetHint)( - JNIEnv *env, jclass cls, - jstring name) + JNIEnv *env, jclass cls, + jstring name) { const char *utfname = (*env)->GetStringUTFChars(env, name, NULL); const char *hint = SDL_GetHint(utfname); @@ -1295,8 +1329,8 @@ JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetHint)( } JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(nativeGetHintBoolean)( - JNIEnv *env, jclass cls, - jstring name, jboolean default_value) + JNIEnv *env, jclass cls, + jstring name, jboolean default_value) { jboolean result; @@ -1308,8 +1342,8 @@ JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(nativeGetHintBoolean)( } JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)( - JNIEnv *env, jclass cls, - jstring name, jstring value) + JNIEnv *env, jclass cls, + jstring name, jstring value) { const char *utfname = (*env)->GetStringUTFChars(env, name, NULL); const char *utfvalue = (*env)->GetStringUTFChars(env, value, NULL); @@ -1318,7 +1352,6 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)( (*env)->ReleaseStringUTFChars(env, name, utfname); (*env)->ReleaseStringUTFChars(env, value, utfvalue); - } /******************************************************************************* @@ -1367,7 +1400,7 @@ static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder) } } -ANativeWindow* Android_JNI_GetNativeWindow(void) +ANativeWindow *Android_JNI_GetNativeWindow(void) { ANativeWindow *anw = NULL; jobject s; @@ -1402,7 +1435,7 @@ void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint) JNIEnv *env = Android_JNI_GetEnv(); jstring jhint = (*env)->NewStringUTF(env, (hint ? hint : "")); - (*env)->CallStaticVoidMethod(env, mActivityClass, midSetOrientation, w, h, (resizable? 1 : 0), jhint); + (*env)->CallStaticVoidMethod(env, mActivityClass, midSetOrientation, w, h, (resizable ? 1 : 0), jhint); (*env)->DeleteLocalRef(env, jhint); } @@ -1443,7 +1476,57 @@ static void *audioBufferPinned = NULL; static int captureBufferFormat = 0; static jobject captureBuffer = NULL; -int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec) +static void Android_JNI_GetAudioDevices(int *devices, int *length, int max_len, int is_input) +{ + JNIEnv *env = Android_JNI_GetEnv(); + jintArray result; + + if (is_input) { + result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midGetAudioInputDevices); + } else { + result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midGetAudioOutputDevices); + } + + *length = (*env)->GetArrayLength(env, result); + + *length = SDL_min(*length, max_len); + + (*env)->GetIntArrayRegion(env, result, 0, *length, devices); +} + +void Android_DetectDevices(void) +{ + int inputs[100]; + int outputs[100]; + int inputs_length = 0; + int outputs_length = 0; + + SDL_zeroa(inputs); + + Android_JNI_GetAudioDevices(inputs, &inputs_length, 100, 1 /* input devices */); + + for (int i = 0; i < inputs_length; ++i) { + int device_id = inputs[i]; + char device_name[64]; + SDL_snprintf(device_name, sizeof(device_name), "%d", device_id); + SDL_Log("Adding input device with name %s", device_name); + SDL_AddAudioDevice(SDL_TRUE, SDL_strdup(device_name), NULL, (void *)((size_t)device_id + 1)); + } + + SDL_zeroa(outputs); + + Android_JNI_GetAudioDevices(outputs, &outputs_length, 100, 0 /* output devices */); + + for (int i = 0; i < outputs_length; ++i) { + int device_id = outputs[i]; + char device_name[64]; + SDL_snprintf(device_name, sizeof(device_name), "%d", device_id); + SDL_Log("Adding output device with name %s", device_name); + SDL_AddAudioDevice(SDL_FALSE, SDL_strdup(device_name), NULL, (void *)((size_t)device_id + 1)); + } +} + +int Android_JNI_OpenAudioDevice(int iscapture, int device_id, SDL_AudioSpec *spec) { int audioformat; jobject jbufobj = NULL; @@ -1469,10 +1552,10 @@ int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec) if (iscapture) { __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device for capture"); - result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midCaptureOpen, spec->freq, audioformat, spec->channels, spec->samples); + result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midCaptureOpen, spec->freq, audioformat, spec->channels, spec->samples, device_id); } else { __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device for output"); - result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midAudioOpen, spec->freq, audioformat, spec->channels, spec->samples); + result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midAudioOpen, spec->freq, audioformat, spec->channels, spec->samples, device_id); } if (result == NULL) { /* Error during audio initialization, error printed from Java */ @@ -1508,32 +1591,29 @@ int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec) * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */ switch (audioformat) { case ENCODING_PCM_8BIT: - { - jbyteArray audioBufferLocal = (*env)->NewByteArray(env, spec->samples * spec->channels); - if (audioBufferLocal) { - jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); - (*env)->DeleteLocalRef(env, audioBufferLocal); - } + { + jbyteArray audioBufferLocal = (*env)->NewByteArray(env, spec->samples * spec->channels); + if (audioBufferLocal) { + jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); + (*env)->DeleteLocalRef(env, audioBufferLocal); } - break; + } break; case ENCODING_PCM_16BIT: - { - jshortArray audioBufferLocal = (*env)->NewShortArray(env, spec->samples * spec->channels); - if (audioBufferLocal) { - jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); - (*env)->DeleteLocalRef(env, audioBufferLocal); - } + { + jshortArray audioBufferLocal = (*env)->NewShortArray(env, spec->samples * spec->channels); + if (audioBufferLocal) { + jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); + (*env)->DeleteLocalRef(env, audioBufferLocal); } - break; + } break; case ENCODING_PCM_FLOAT: - { - jfloatArray audioBufferLocal = (*env)->NewFloatArray(env, spec->samples * spec->channels); - if (audioBufferLocal) { - jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); - (*env)->DeleteLocalRef(env, audioBufferLocal); - } + { + jfloatArray audioBufferLocal = (*env)->NewFloatArray(env, spec->samples * spec->channels); + if (audioBufferLocal) { + jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); + (*env)->DeleteLocalRef(env, audioBufferLocal); } - break; + } break; default: return SDL_SetError("Unexpected audio format from Java: %d\n", audioformat); } @@ -1591,7 +1671,6 @@ int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi) float nativeYdpi = (*env)->GetFloatField(env, jDisplayObj, fidYdpi); int nativeDdpi = (*env)->GetIntField(env, jDisplayObj, fidDdpi); - (*env)->DeleteLocalRef(env, jDisplayObj); (*env)->DeleteLocalRef(env, jDisplayClass); @@ -1608,7 +1687,7 @@ int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi) return 0; } -void * Android_JNI_GetAudioBuffer(void) +void *Android_JNI_GetAudioBuffer(void) { return audioBufferPinned; } @@ -1684,7 +1763,7 @@ int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen) void Android_JNI_FlushCapturedAudio(void) { JNIEnv *env = Android_JNI_GetEnv(); -#if 0 /* !!! FIXME: this needs API 23, or it'll do blocking reads and never end. */ +#if 0 /* !!! FIXME: this needs API 23, or it'll do blocking reads and never end. */ switch (captureBufferFormat) { case ENCODING_PCM_8BIT: { @@ -1800,7 +1879,8 @@ static SDL_bool Android_JNI_ExceptionOccurred(SDL_bool silent) return SDL_FALSE; } -static void Internal_Android_Create_AssetManager() { +static void Internal_Android_Create_AssetManager() +{ struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__); JNIEnv *env = Android_JNI_GetEnv(); @@ -1818,7 +1898,7 @@ static void Internal_Android_Create_AssetManager() { /* javaAssetManager = context.getAssets(); */ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context), - "getAssets", "()Landroid/content/res/AssetManager;"); + "getAssets", "()Landroid/content/res/AssetManager;"); javaAssetManager = (*env)->CallObjectMethod(env, context, mid); /** @@ -1838,7 +1918,8 @@ static void Internal_Android_Create_AssetManager() { LocalReferenceHolder_Cleanup(&refs); } -static void Internal_Android_Destroy_AssetManager() { +static void Internal_Android_Destroy_AssetManager() +{ JNIEnv *env = Android_JNI_GetEnv(); if (asset_manager) { @@ -1848,7 +1929,7 @@ static void Internal_Android_Destroy_AssetManager() { } int Android_JNI_FileOpen(SDL_RWops *ctx, - const char *fileName, const char *mode) + const char *fileName, const char *mode) { AAsset *asset = NULL; ctx->hidden.androidio.asset = NULL; @@ -1866,21 +1947,20 @@ int Android_JNI_FileOpen(SDL_RWops *ctx, return -1; } - - ctx->hidden.androidio.asset = (void*) asset; + ctx->hidden.androidio.asset = (void *)asset; return 0; } -size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer, - size_t size, size_t maxnum) +size_t Android_JNI_FileRead(SDL_RWops *ctx, void *buffer, + size_t size, size_t maxnum) { size_t result; - AAsset *asset = (AAsset*) ctx->hidden.androidio.asset; + AAsset *asset = (AAsset *)ctx->hidden.androidio.asset; result = AAsset_read(asset, buffer, size * maxnum); if (result > 0) { /* Number of chuncks */ - return (result / size); + return result / size; } else { /* Error or EOF */ return result; @@ -1888,7 +1968,7 @@ size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer, } size_t Android_JNI_FileWrite(SDL_RWops *ctx, const void *buffer, - size_t size, size_t num) + size_t size, size_t num) { SDL_SetError("Cannot write to Android package filesystem"); return 0; @@ -1897,22 +1977,22 @@ size_t Android_JNI_FileWrite(SDL_RWops *ctx, const void *buffer, Sint64 Android_JNI_FileSize(SDL_RWops *ctx) { off64_t result; - AAsset *asset = (AAsset*) ctx->hidden.androidio.asset; + AAsset *asset = (AAsset *)ctx->hidden.androidio.asset; result = AAsset_getLength64(asset); return result; } -Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence) +Sint64 Android_JNI_FileSeek(SDL_RWops *ctx, Sint64 offset, int whence) { off64_t result; - AAsset *asset = (AAsset*) ctx->hidden.androidio.asset; + AAsset *asset = (AAsset *)ctx->hidden.androidio.asset; result = AAsset_seek64(asset, offset, whence); return result; } int Android_JNI_FileClose(SDL_RWops *ctx) { - AAsset *asset = (AAsset*) ctx->hidden.androidio.asset; + AAsset *asset = (AAsset *)ctx->hidden.androidio.asset; AAsset_close(asset); return 0; } @@ -1926,7 +2006,7 @@ int Android_JNI_SetClipboardText(const char *text) return 0; } -char* Android_JNI_GetClipboardText(void) +char *Android_JNI_GetClipboardText(void) { JNIEnv *env = Android_JNI_GetEnv(); char *text = NULL; @@ -1975,7 +2055,6 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco return -1; } - /* context = SDLActivity.getContext(); */ context = (*env)->CallStaticObjectMethod(env, mActivityClass, midGetContext); @@ -1998,18 +2077,18 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco imid = (*env)->GetMethodID(env, cls, "getIntExtra", "(Ljava/lang/String;I)I"); /* Watch out for C89 scoping rules because of the macro */ -#define GET_INT_EXTRA(var, key) \ - int var; \ - iname = (*env)->NewStringUTF(env, key); \ +#define GET_INT_EXTRA(var, key) \ + int var; \ + iname = (*env)->NewStringUTF(env, key); \ (var) = (*env)->CallIntMethod(env, intent, imid, iname, -1); \ (*env)->DeleteLocalRef(env, iname); bmid = (*env)->GetMethodID(env, cls, "getBooleanExtra", "(Ljava/lang/String;Z)Z"); /* Watch out for C89 scoping rules because of the macro */ -#define GET_BOOL_EXTRA(var, key) \ - int var; \ - bname = (*env)->NewStringUTF(env, key); \ +#define GET_BOOL_EXTRA(var, key) \ + int var; \ + bname = (*env)->NewStringUTF(env, key); \ (var) = (*env)->CallBooleanMethod(env, intent, bmid, bname, JNI_FALSE); \ (*env)->DeleteLocalRef(env, bname); @@ -2074,8 +2153,9 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco } /* Add all touch devices */ -void Android_JNI_InitTouch() { - JNIEnv *env = Android_JNI_GetEnv(); +void Android_JNI_InitTouch() +{ + JNIEnv *env = Android_JNI_GetEnv(); (*env)->CallStaticVoidMethod(env, mActivityClass, midInitTouch); } @@ -2104,8 +2184,7 @@ void Android_JNI_HapticStop(int device_id) } /* See SDLActivity.java for constants. */ -#define COMMAND_SET_KEEP_SCREEN_ON 5 - +#define COMMAND_SET_KEEP_SCREEN_ON 5 int SDL_AndroidSendMessage(Uint32 command, int param) { @@ -2133,10 +2212,10 @@ void Android_JNI_ShowTextInput(SDL_Rect *inputRect) { JNIEnv *env = Android_JNI_GetEnv(); (*env)->CallStaticBooleanMethod(env, mActivityClass, midShowTextInput, - inputRect->x, - inputRect->y, - inputRect->w, - inputRect->h ); + inputRect->x, + inputRect->y, + inputRect->w, + inputRect->h); } void Android_JNI_HideTextInput(void) @@ -2154,7 +2233,6 @@ SDL_bool Android_JNI_IsScreenKeyboardShown(void) return is_shown; } - int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { JNIEnv *env; @@ -2183,7 +2261,7 @@ int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *bu button_flags = (*env)->NewIntArray(env, messageboxdata->numbuttons); button_ids = (*env)->NewIntArray(env, messageboxdata->numbuttons); button_texts = (*env)->NewObjectArray(env, messageboxdata->numbuttons, - clazz, NULL); + clazz, NULL); for (i = 0; i < messageboxdata->numbuttons; ++i) { const SDL_MessageBoxButtonData *sdlButton; @@ -2223,15 +2301,15 @@ int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *bu clazz = (*env)->GetObjectClass(env, context); mid = (*env)->GetMethodID(env, clazz, - "messageboxShowMessageBox", "(ILjava/lang/String;Ljava/lang/String;[I[I[Ljava/lang/String;[I)I"); + "messageboxShowMessageBox", "(ILjava/lang/String;Ljava/lang/String;[I[I[Ljava/lang/String;[I)I"); *buttonid = (*env)->CallIntMethod(env, context, mid, - messageboxdata->flags, - title, - message, - button_flags, - button_ids, - button_texts, - colors); + messageboxdata->flags, + title, + message, + button_flags, + button_ids, + button_texts, + colors); (*env)->DeleteLocalRef(env, context); (*env)->DeleteLocalRef(env, clazz); @@ -2265,7 +2343,7 @@ void *SDL_AndroidGetActivity(void) /* See SDL_system.h for caveats on using this function. */ JNIEnv *env = Android_JNI_GetEnv(); - if (!env) { + if (env == NULL) { return NULL; } @@ -2277,7 +2355,7 @@ int SDL_GetAndroidSDKVersion(void) { static int sdk_version; if (!sdk_version) { - char sdk[PROP_VALUE_MAX] = {0}; + char sdk[PROP_VALUE_MAX] = { 0 }; if (__system_property_get("ro.build.version.sdk", sdk) != 0) { sdk_version = SDL_atoi(sdk); } @@ -2315,11 +2393,11 @@ void SDL_AndroidBackButton(void) (*env)->CallStaticVoidMethod(env, mActivityClass, midManualBackButton); } -const char * SDL_AndroidGetInternalStoragePath(void) +const char *SDL_AndroidGetInternalStoragePath(void) { static char *s_AndroidInternalFilesPath = NULL; - if (!s_AndroidInternalFilesPath) { + if (s_AndroidInternalFilesPath == NULL) { struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__); jmethodID mid; jobject context; @@ -2343,7 +2421,7 @@ const char * SDL_AndroidGetInternalStoragePath(void) /* fileObj = context.getFilesDir(); */ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context), - "getFilesDir", "()Ljava/io/File;"); + "getFilesDir", "()Ljava/io/File;"); fileObject = (*env)->CallObjectMethod(env, context, mid); if (!fileObject) { SDL_SetError("Couldn't get internal directory"); @@ -2353,7 +2431,7 @@ const char * SDL_AndroidGetInternalStoragePath(void) /* path = fileObject.getCanonicalPath(); */ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject), - "getCanonicalPath", "()Ljava/lang/String;"); + "getCanonicalPath", "()Ljava/lang/String;"); pathString = (jstring)(*env)->CallObjectMethod(env, fileObject, mid); if (Android_JNI_ExceptionOccurred(SDL_FALSE)) { LocalReferenceHolder_Cleanup(&refs); @@ -2386,7 +2464,7 @@ int SDL_AndroidGetExternalStorageState(void) cls = (*env)->FindClass(env, "android/os/Environment"); mid = (*env)->GetStaticMethodID(env, cls, - "getExternalStorageState", "()Ljava/lang/String;"); + "getExternalStorageState", "()Ljava/lang/String;"); stateString = (jstring)(*env)->CallStaticObjectMethod(env, cls, mid); state = (*env)->GetStringUTFChars(env, stateString, NULL); @@ -2408,11 +2486,11 @@ int SDL_AndroidGetExternalStorageState(void) return stateFlags; } -const char * SDL_AndroidGetExternalStoragePath(void) +const char *SDL_AndroidGetExternalStoragePath(void) { static char *s_AndroidExternalFilesPath = NULL; - if (!s_AndroidExternalFilesPath) { + if (s_AndroidExternalFilesPath == NULL) { struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__); jmethodID mid; jobject context; @@ -2431,7 +2509,7 @@ const char * SDL_AndroidGetExternalStoragePath(void) /* fileObj = context.getExternalFilesDir(); */ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context), - "getExternalFilesDir", "(Ljava/lang/String;)Ljava/io/File;"); + "getExternalFilesDir", "(Ljava/lang/String;)Ljava/io/File;"); fileObject = (*env)->CallObjectMethod(env, context, mid, NULL); if (!fileObject) { SDL_SetError("Couldn't get external directory"); @@ -2441,7 +2519,7 @@ const char * SDL_AndroidGetExternalStoragePath(void) /* path = fileObject.getAbsolutePath(); */ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject), - "getAbsolutePath", "()Ljava/lang/String;"); + "getAbsolutePath", "()Ljava/lang/String;"); pathString = (jstring)(*env)->CallObjectMethod(env, fileObject, mid); path = (*env)->GetStringUTFChars(env, pathString, NULL); @@ -2458,7 +2536,7 @@ SDL_bool SDL_AndroidRequestPermission(const char *permission) return Android_JNI_RequestPermission(permission); } -int SDL_AndroidShowToast(const char* message, int duration, int gravity, int xOffset, int yOffset) +int SDL_AndroidShowToast(const char *message, int duration, int gravity, int xOffset, int yOffset) { return Android_JNI_ShowToast(message, duration, gravity, xOffset, yOffset); } @@ -2499,7 +2577,6 @@ void Android_JNI_DestroyCustomCursor(int cursorID) { JNIEnv *env = Android_JNI_GetEnv(); (*env)->CallStaticVoidMethod(env, mActivityClass, midDestroyCustomCursor, cursorID); - return; } SDL_bool Android_JNI_SetCustomCursor(int cursorID) @@ -2550,7 +2627,7 @@ SDL_bool Android_JNI_RequestPermission(const char *permission) } /* Show toast notification */ -int Android_JNI_ShowToast(const char* message, int duration, int gravity, int xOffset, int yOffset) +int Android_JNI_ShowToast(const char *message, int duration, int gravity, int xOffset, int yOffset) { int result = 0; JNIEnv *env = Android_JNI_GetEnv(); @@ -2608,7 +2685,7 @@ int Android_JNI_GetLocale(char *buf, size_t buflen) buf[id++] = country[1]; } } - + buf[id++] = '\0'; SDL_assert(id <= buflen); } @@ -2618,8 +2695,7 @@ int Android_JNI_GetLocale(char *buf, size_t buflen) return 0; } -int -Android_JNI_OpenURL(const char *url) +int Android_JNI_OpenURL(const char *url) { JNIEnv *env = Android_JNI_GetEnv(); jstring jurl = (*env)->NewStringUTF(env, url); diff --git a/modules/SDL2/src/core/android/SDL_android.h b/modules/SDL2/src/core/android/SDL_android.h index 3efdfeb..a54b2cf 100644 --- a/modules/SDL2/src/core/android/SDL_android.h +++ b/modules/SDL2/src/core/android/SDL_android.h @@ -46,14 +46,15 @@ extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]); extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect); extern void Android_JNI_HideTextInput(void); extern SDL_bool Android_JNI_IsScreenKeyboardShown(void); -extern ANativeWindow* Android_JNI_GetNativeWindow(void); +extern ANativeWindow *Android_JNI_GetNativeWindow(void); extern SDL_DisplayOrientation Android_JNI_GetDisplayOrientation(void); extern int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi); /* Audio support */ -extern int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec); -extern void* Android_JNI_GetAudioBuffer(void); +extern void Android_DetectDevices(void); +extern int Android_JNI_OpenAudioDevice(int iscapture, int device_id, SDL_AudioSpec *spec); +extern void *Android_JNI_GetAudioBuffer(void); extern void Android_JNI_WriteAudioBuffer(void); extern int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen); extern void Android_JNI_FlushCapturedAudio(void); @@ -77,12 +78,12 @@ int Android_JNI_FileClose(SDL_RWops* ctx); void Android_JNI_GetManifestEnvironmentVariables(void); /* Clipboard support */ -int Android_JNI_SetClipboardText(const char* text); -char* Android_JNI_GetClipboardText(void); +int Android_JNI_SetClipboardText(const char *text); +char *Android_JNI_GetClipboardText(void); SDL_bool Android_JNI_HasClipboardText(void); /* Power support */ -int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent); +int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seconds, int *percent); /* Joystick support */ void Android_JNI_PollInputDevices(void); @@ -110,7 +111,7 @@ int Android_JNI_GetLocale(char *buf, size_t buflen); int Android_JNI_SendMessage(int command, int param); /* Init */ -JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv* mEnv, jclass cls); +JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv *mEnv, jclass cls); /* MessageBox */ #include "SDL_messagebox.h" @@ -130,7 +131,7 @@ SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled); SDL_bool Android_JNI_RequestPermission(const char *permission); /* Show toast notification */ -int Android_JNI_ShowToast(const char* message, int duration, int gravity, int xOffset, int yOffset); +int Android_JNI_ShowToast(const char *message, int duration, int gravity, int xOffset, int yOffset); int Android_JNI_OpenURL(const char *url); diff --git a/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_default_keyaccmap.h b/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_default_keyaccmap.h index 909afad..8cb7430 100644 --- a/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_default_keyaccmap.h +++ b/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_default_keyaccmap.h @@ -1,5 +1,6 @@ #include +/* *INDENT-OFF* */ /* clang-format off */ /* * Automatically generated from /usr/share/vt/keymaps/us.acc.kbd. * DO NOT EDIT! @@ -163,3 +164,4 @@ static accentmap_t accentmap_default_us_acc = { 11, { { 0x00 }, } }; +/* *INDENT-ON* */ /* clang-format on */ diff --git a/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_freebsd.c b/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_freebsd.c index c467993..57a4697 100644 --- a/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_freebsd.c +++ b/modules/SDL2/src/core/freebsd/SDL_evdev_kbd_freebsd.c @@ -39,7 +39,7 @@ #include "../../events/SDL_events_c.h" #include "SDL_evdev_kbd_default_keyaccmap.h" -typedef void (fn_handler_fn)(SDL_EVDEV_keyboard_state *kbd); +typedef void(fn_handler_fn)(SDL_EVDEV_keyboard_state *kbd); /* * Keyboard State @@ -51,14 +51,14 @@ struct SDL_EVDEV_keyboard_state int keyboard_fd; unsigned long old_kbd_mode; unsigned short **key_maps; - keymap_t* key_map; - keyboard_info_t* kbInfo; - unsigned char shift_down[4]; /* shift state counters.. */ + keymap_t *key_map; + keyboard_info_t *kbInfo; + unsigned char shift_down[4]; /* shift state counters.. */ SDL_bool dead_key_next; - int npadch; /* -1 or number assembled on pad */ + int npadch; /* -1 or number assembled on pad */ accentmap_t *accents; unsigned int diacr; - SDL_bool rep; /* flag telling character repeat */ + SDL_bool rep; /* flag telling character repeat */ unsigned char lockstate; unsigned char ledflagstate; char shift_state; @@ -68,27 +68,26 @@ struct SDL_EVDEV_keyboard_state static int SDL_EVDEV_kbd_load_keymaps(SDL_EVDEV_keyboard_state *kbd) { - return (ioctl(kbd->keyboard_fd, GIO_KEYMAP, kbd->key_map) >= 0); + return ioctl(kbd->keyboard_fd, GIO_KEYMAP, kbd->key_map) >= 0; } -static SDL_EVDEV_keyboard_state * kbd_cleanup_state = NULL; +static SDL_EVDEV_keyboard_state *kbd_cleanup_state = NULL; static int kbd_cleanup_sigactions_installed = 0; static int kbd_cleanup_atexit_installed = 0; static struct sigaction old_sigaction[NSIG]; -static int fatal_signals[] = -{ +static int fatal_signals[] = { /* Handlers for SIGTERM and SIGINT are installed in SDL_QuitInit. */ - SIGHUP, SIGQUIT, SIGILL, SIGABRT, - SIGFPE, SIGSEGV, SIGPIPE, SIGBUS, + SIGHUP, SIGQUIT, SIGILL, SIGABRT, + SIGFPE, SIGSEGV, SIGPIPE, SIGBUS, SIGSYS }; static void kbd_cleanup(void) { struct mouse_info mData; - SDL_EVDEV_keyboard_state* kbd = kbd_cleanup_state; + SDL_EVDEV_keyboard_state *kbd = kbd_cleanup_state; if (kbd == NULL) { return; } @@ -96,23 +95,24 @@ static void kbd_cleanup(void) SDL_zero(mData); mData.operation = MOUSE_SHOW; ioctl(kbd->keyboard_fd, KDSKBMODE, kbd->old_kbd_mode); - if (kbd->keyboard_fd != kbd->console_fd) close(kbd->keyboard_fd); + if (kbd->keyboard_fd != kbd->console_fd) { + close(kbd->keyboard_fd); + } ioctl(kbd->console_fd, CONS_SETKBD, (unsigned long)(kbd->kbInfo->kb_index)); ioctl(kbd->console_fd, CONS_MOUSECTL, &mData); } -void -SDL_EVDEV_kbd_reraise_signal(int sig) +void SDL_EVDEV_kbd_reraise_signal(int sig) { raise(sig); } -siginfo_t* SDL_EVDEV_kdb_cleanup_siginfo = NULL; -void* SDL_EVDEV_kdb_cleanup_ucontext = NULL; +siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL; +void *SDL_EVDEV_kdb_cleanup_ucontext = NULL; -static void kbd_cleanup_signal_action(int signum, siginfo_t* info, void* ucontext) +static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext) { - struct sigaction* old_action_p = &(old_sigaction[signum]); + struct sigaction *old_action_p = &(old_sigaction[signum]); sigset_t sigset; /* Restore original signal handler before going any further. */ @@ -146,19 +146,20 @@ static void kbd_unregister_emerg_cleanup() kbd_cleanup_sigactions_installed = 0; for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { - struct sigaction* old_action_p; + struct sigaction *old_action_p; struct sigaction cur_action; signum = fatal_signals[tabidx]; old_action_p = &(old_sigaction[signum]); /* Examine current signal action */ - if (sigaction(signum, NULL, &cur_action)) + if (sigaction(signum, NULL, &cur_action)) { continue; + } /* Check if action installed and not modifed */ - if (!(cur_action.sa_flags & SA_SIGINFO) - || cur_action.sa_sigaction != &kbd_cleanup_signal_action) + if (!(cur_action.sa_flags & SA_SIGINFO) || cur_action.sa_sigaction != &kbd_cleanup_signal_action) { continue; + } /* Restore original action */ sigaction(signum, old_action_p, NULL); @@ -174,7 +175,7 @@ static void kbd_cleanup_atexit(void) kbd_unregister_emerg_cleanup(); } -static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) +static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state *kbd) { int tabidx, signum; @@ -198,20 +199,20 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) kbd_cleanup_sigactions_installed = 1; for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { - struct sigaction* old_action_p; + struct sigaction *old_action_p; struct sigaction new_action; - signum = fatal_signals[tabidx]; + signum = fatal_signals[tabidx]; old_action_p = &(old_sigaction[signum]); - if (sigaction(signum, NULL, old_action_p)) + if (sigaction(signum, NULL, old_action_p)) { continue; + } /* Skip SIGHUP and SIGPIPE if handler is already installed * - assume the handler will do the cleanup */ - if ((signum == SIGHUP || signum == SIGPIPE) - && (old_action_p->sa_handler != SIG_DFL - || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) + if ((signum == SIGHUP || signum == SIGPIPE) && (old_action_p->sa_handler != SIG_DFL || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) { continue; + } new_action = *old_action_p; new_action.sa_flags |= SA_SIGINFO; @@ -220,18 +221,17 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) } } -SDL_EVDEV_keyboard_state * -SDL_EVDEV_kbd_init(void) +SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void) { SDL_EVDEV_keyboard_state *kbd; struct mouse_info mData; char flag_state; - char* devicePath; + char *devicePath; SDL_zero(mData); mData.operation = MOUSE_HIDE; kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(SDL_EVDEV_keyboard_state)); - if (!kbd) { + if (kbd == NULL) { return NULL; } @@ -244,17 +244,16 @@ SDL_EVDEV_kbd_init(void) kbd->accents = SDL_calloc(sizeof(accentmap_t), 1); kbd->key_map = SDL_calloc(sizeof(keymap_t), 1); - kbd->kbInfo = SDL_calloc(sizeof(keyboard_info_t), 1); + kbd->kbInfo = SDL_calloc(sizeof(keyboard_info_t), 1); ioctl(kbd->console_fd, KDGKBINFO, kbd->kbInfo); ioctl(kbd->console_fd, CONS_MOUSECTL, &mData); - + if (ioctl(kbd->console_fd, KDGKBSTATE, &flag_state) == 0) { kbd->ledflagstate = flag_state; } - - if (ioctl(kbd->console_fd, GIO_DEADKEYMAP, kbd->accents) < 0) - { + + if (ioctl(kbd->console_fd, GIO_DEADKEYMAP, kbd->accents) < 0) { SDL_free(kbd->accents); kbd->accents = &accentmap_default_us_acc; } @@ -262,8 +261,7 @@ SDL_EVDEV_kbd_init(void) if (ioctl(kbd->console_fd, KDGKBMODE, &kbd->old_kbd_mode) == 0) { /* Set the keyboard in XLATE mode and load the keymaps */ ioctl(kbd->console_fd, KDSKBMODE, (unsigned long)(K_XLATE)); - if(!SDL_EVDEV_kbd_load_keymaps(kbd)) - { + if (!SDL_EVDEV_kbd_load_keymaps(kbd)) { SDL_free(kbd->key_map); kbd->key_map = &keymap_default_us_acc; } @@ -275,8 +273,7 @@ SDL_EVDEV_kbd_init(void) ioctl(kbd->console_fd, CONS_RELKBD, 1ul); SDL_asprintf(&devicePath, "/dev/kbd%d", kbd->kbInfo->kb_index); kbd->keyboard_fd = open(devicePath, O_WRONLY | O_CLOEXEC); - if (kbd->keyboard_fd == -1) - { + if (kbd->keyboard_fd == -1) { // Give keyboard back. ioctl(kbd->console_fd, CONS_SETKBD, (unsigned long)(kbd->kbInfo->kb_index)); kbd->keyboard_fd = kbd->console_fd; @@ -289,19 +286,18 @@ SDL_EVDEV_kbd_init(void) kbd_register_emerg_cleanup(kbd); } SDL_free(devicePath); - } - else kbd->keyboard_fd = kbd->console_fd; + } else + kbd->keyboard_fd = kbd->console_fd; } return kbd; } -void -SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) +void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) { struct mouse_info mData; - if (!kbd) { + if (kbd == NULL) { return; } SDL_zero(mData); @@ -315,8 +311,7 @@ SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) ioctl(kbd->keyboard_fd, KDSKBMODE, kbd->old_kbd_mode); close(kbd->keyboard_fd); - if (kbd->console_fd != kbd->keyboard_fd && kbd->console_fd >= 0) - { + if (kbd->console_fd != kbd->keyboard_fd && kbd->console_fd >= 0) { // Give back keyboard. ioctl(kbd->console_fd, CONS_SETKBD, (unsigned long)(kbd->kbInfo->kb_index)); } @@ -332,7 +327,7 @@ SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) static void put_queue(SDL_EVDEV_keyboard_state *kbd, uint c) { /* c is already part of a UTF-8 sequence and safe to add as a character */ - if (kbd->text_len < (sizeof(kbd->text)-1)) { + if (kbd->text_len < (sizeof(kbd->text) - 1)) { kbd->text[kbd->text_len++] = (char)c; } } @@ -347,10 +342,12 @@ static void put_utf8(SDL_EVDEV_keyboard_state *kbd, uint c) put_queue(kbd, 0xc0 | (c >> 6)); put_queue(kbd, 0x80 | (c & 0x3f)); } else if (c < 0x10000) { - if (c >= 0xD800 && c < 0xE000) + if (c >= 0xD800 && c < 0xE000) { return; - if (c == 0xFFFF) + } + if (c == 0xFFFF) { return; + } /* 1110**** 10****** 10****** */ put_queue(kbd, 0xe0 | (c >> 12)); put_queue(kbd, 0x80 | ((c >> 6) & 0x3f)); @@ -379,13 +376,14 @@ static unsigned int handle_diacr(SDL_EVDEV_keyboard_state *kbd, unsigned int ch) kbd->diacr = 0; for (i = 0; i < kbd->accents->n_accs; i++) { - if (kbd->accents->acc[i].accchar == d) - { + if (kbd->accents->acc[i].accchar == d) { for (j = 0; j < NUM_ACCENTCHARS; ++j) { - if (kbd->accents->acc[i].map[j][0] == 0) /* end of table */ - break; - if (kbd->accents->acc[i].map[j][0] == ch) - return kbd->accents->acc[i].map[j][1]; + if (kbd->accents->acc[i].map[j][0] == 0) { /* end of table */ + break; + } + if (kbd->accents->acc[i].map[j][0] == ch) { + return kbd->accents->acc[i].map[j][1]; + } } } } @@ -416,11 +414,13 @@ static void chg_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag) static void k_self(SDL_EVDEV_keyboard_state *kbd, unsigned int value, char up_flag) { - if (up_flag) - return; /* no action, if this is a key release */ + if (up_flag) { + return; /* no action, if this is a key release */ + } - if (kbd->diacr) + if (kbd->diacr) { value = handle_diacr(kbd, value); + } if (kbd->dead_key_next) { kbd->dead_key_next = SDL_FALSE; @@ -450,8 +450,9 @@ static void k_shift(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ * handle the case that two shift or control * keys are depressed simultaneously */ - if (kbd->shift_down[value]) + if (kbd->shift_down[value]) { kbd->shift_down[value]--; + } } else kbd->shift_down[value]++; @@ -467,20 +468,19 @@ static void k_shift(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ } } -void -SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int down) +void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int down) { keymap_t key_map; struct keyent_t keysym; unsigned int final_key_state; unsigned int map_from_key_sym; - key_map = *kbd->key_map; - - if (!kbd) { + if (kbd == NULL) { return; } + key_map = *kbd->key_map; + kbd->rep = (down == 2); if (keycode < NUM_KEYS) { @@ -488,10 +488,10 @@ SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int d /* These constitute unprintable language-related keys, so ignore them. */ return; } - if (keycode > 95) + if (keycode > 95) { keycode -= 7; - if (vc_kbd_led(kbd, ALKED) || (kbd->shift_state & 0x8)) - { + } + if (vc_kbd_led(kbd, ALKED) || (kbd->shift_state & 0x8)) { keycode += ALTGR_OFFSET; } keysym = key_map.key[keycode]; @@ -500,18 +500,21 @@ SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int d } final_key_state = kbd->shift_state & 0x7; - if ((keysym.flgs & FLAG_LOCK_C) && vc_kbd_led(kbd, LED_CAP)) + if ((keysym.flgs & FLAG_LOCK_C) && vc_kbd_led(kbd, LED_CAP)) { final_key_state ^= 0x1; - if ((keysym.flgs & FLAG_LOCK_N) && vc_kbd_led(kbd, LED_NUM)) + } + if ((keysym.flgs & FLAG_LOCK_N) && vc_kbd_led(kbd, LED_NUM)) { final_key_state ^= 0x1; + } map_from_key_sym = keysym.map[final_key_state]; if ((keysym.spcl & (0x80 >> final_key_state)) || (map_from_key_sym & SPCLKEY)) { /* Special function.*/ if (map_from_key_sym == 0) return; /* Nothing to do. */ - if (map_from_key_sym & SPCLKEY) + if (map_from_key_sym & SPCLKEY) { map_from_key_sym &= ~SPCLKEY; + } if (map_from_key_sym >= F_ACC && map_from_key_sym <= L_ACC) { /* Accent function.*/ unsigned int accent_index = map_from_key_sym - F_ACC; @@ -519,42 +522,56 @@ SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int d k_deadunicode(kbd, kbd->accents->acc[accent_index].accchar, !down); } } else { - switch(map_from_key_sym) { + switch (map_from_key_sym) { case ASH: /* alt/meta shift */ k_shift(kbd, 3, down == 0); break; case LSHA: /* left shift + alt lock */ case RSHA: /* right shift + alt lock */ - if (down == 0) chg_vc_kbd_led(kbd, ALKED); + if (down == 0) { + chg_vc_kbd_led(kbd, ALKED); + } case LSH: /* left shift */ case RSH: /* right shift */ k_shift(kbd, 0, down == 0); break; case LCTRA: /* left ctrl + alt lock */ case RCTRA: /* right ctrl + alt lock */ - if (down == 0) chg_vc_kbd_led(kbd, ALKED); + if (down == 0) { + chg_vc_kbd_led(kbd, ALKED); + } case LCTR: /* left ctrl */ case RCTR: /* right ctrl */ k_shift(kbd, 1, down == 0); break; case LALTA: /* left alt + alt lock */ case RALTA: /* right alt + alt lock */ - if (down == 0) chg_vc_kbd_led(kbd, ALKED); + if (down == 0) { + chg_vc_kbd_led(kbd, ALKED); + } case LALT: /* left alt */ case RALT: /* right alt */ k_shift(kbd, 2, down == 0); break; case ALK: /* alt lock */ - if (down == 1) chg_vc_kbd_led(kbd, ALKED); + if (down == 1) { + chg_vc_kbd_led(kbd, ALKED); + } break; case CLK: /* caps lock*/ - if (down == 1) chg_vc_kbd_led(kbd, CLKED); + if (down == 1) { + chg_vc_kbd_led(kbd, CLKED); + } break; case NLK: /* num lock */ - if (down == 1) chg_vc_kbd_led(kbd, NLKED); + if (down == 1) { + chg_vc_kbd_led(kbd, NLKED); + } break; case SLK: /* scroll lock */ - if (down == 1) chg_vc_kbd_led(kbd, SLKED); + if (down == 1) { + chg_vc_kbd_led(kbd, SLKED); + } break; default: return; diff --git a/modules/SDL2/src/core/gdk/SDL_gdk.cpp b/modules/SDL2/src/core/gdk/SDL_gdk.cpp index 119f5cf..61617fd 100644 --- a/modules/SDL2/src/core/gdk/SDL_gdk.cpp +++ b/modules/SDL2/src/core/gdk/SDL_gdk.cpp @@ -20,27 +20,34 @@ */ #include "../../SDL_internal.h" +extern "C" { #include "SDL_system.h" #include "../windows/SDL_windows.h" #include "SDL_messagebox.h" #include "SDL_main.h" +#include "SDL_events.h" +#include "../../events/SDL_events_c.h" +} #include #include #include /* CommandLineToArgvW() */ +#include static XTaskQueueHandle GDK_GlobalTaskQueue; +PAPPSTATE_REGISTRATION hPLM = {}; +HANDLE plmSuspendComplete = nullptr; + extern "C" DECLSPEC int -SDL_GDKGetTaskQueue(XTaskQueueHandle * outTaskQueue) +SDL_GDKGetTaskQueue(XTaskQueueHandle *outTaskQueue) { /* If this is the first call, first create the global task queue. */ if (!GDK_GlobalTaskQueue) { HRESULT hr; hr = XTaskQueueCreate(XTaskQueueDispatchMode::ThreadPool, - XTaskQueueDispatchMode::Manual, - &GDK_GlobalTaskQueue - ); + XTaskQueueDispatchMode::Manual, + &GDK_GlobalTaskQueue); if (FAILED(hr)) { return SDL_SetError("[GDK] Could not create global task queue"); } @@ -80,7 +87,7 @@ OutOfMemory(void) /* Gets the arguments with GetCommandLine, converts them to argc and argv and calls SDL_main */ -extern "C" DECLSPEC int +extern "C" DECLSPEC int SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved) { LPWSTR *argvw; @@ -100,18 +107,18 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved) */ /* Parse it into argv and argc */ - argv = (char **) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (argc + 1) * sizeof(*argv)); - if (!argv) { + argv = (char **)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (argc + 1) * sizeof(*argv)); + if (argv == NULL) { return OutOfMemory(); } for (i = 0; i < argc; ++i) { DWORD len; char *arg = WIN_StringToUTF8W(argvw[i]); - if (!arg) { + if (arg == NULL) { return OutOfMemory(); } - len = (DWORD) SDL_strlen(arg); - argv[i] = (char *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 1); + len = (DWORD)SDL_strlen(arg); + argv[i] = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 1); if (!argv[i]) { return OutOfMemory(); } @@ -144,9 +151,39 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved) SDL_SetMainReady(); + /* Register suspend/resume handling */ + plmSuspendComplete = CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE); + if (!plmSuspendComplete) { + SDL_SetError("[GDK] Unable to create plmSuspendComplete event"); + return -1; + } + auto rascn = [](BOOLEAN quiesced, PVOID context) { + SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppStateChangeNotification handler"); + if (quiesced) { + ResetEvent(plmSuspendComplete); + SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND); + + // To defer suspension, we must wait to exit this callback. + // IMPORTANT: The app must call SDL_GDKSuspendComplete() to release this lock. + (void)WaitForSingleObject(plmSuspendComplete, INFINITE); + + SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppStateChangeNotification handler: plmSuspendComplete event signaled."); + } else { + SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); + } + }; + if (RegisterAppStateChangeNotification(rascn, NULL, &hPLM)) { + SDL_SetError("[GDK] Unable to call RegisterAppStateChangeNotification"); + return -1; + } + /* Run the application main() code */ result = mainFunction(argc, argv); + /* Unregister suspend/resume handling */ + UnregisterAppStateChangeNotification(hPLM); + CloseHandle(plmSuspendComplete); + /* !!! FIXME: This follows the docs exactly, but for some reason still leaks handles on exit? */ /* Terminate the task queue and dispatch any pending tasks */ XTaskQueueTerminate(taskQueue, false, nullptr, nullptr); @@ -173,3 +210,11 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved) return result; } + +extern "C" DECLSPEC void +SDL_GDKSuspendComplete() +{ + if (plmSuspendComplete) { + SetEvent(plmSuspendComplete); + } +} diff --git a/modules/SDL2/src/core/linux/SDL_dbus.c b/modules/SDL2/src/core/linux/SDL_dbus.c index 231bc01..f235834 100644 --- a/modules/SDL2/src/core/linux/SDL_dbus.c +++ b/modules/SDL2/src/core/linux/SDL_dbus.c @@ -34,14 +34,20 @@ static char *inhibit_handle = NULL; static unsigned int screensaver_cookie = 0; static SDL_DBusContext dbus; -static int -LoadDBUSSyms(void) +static int LoadDBUSSyms(void) { - #define SDL_DBUS_SYM2(x, y) \ - if (!(dbus.x = SDL_LoadFunction(dbus_handle, #y))) return -1 - - #define SDL_DBUS_SYM(x) \ - SDL_DBUS_SYM2(x, dbus_##x) +#define SDL_DBUS_SYM2_OPTIONAL(x, y) \ + dbus.x = SDL_LoadFunction(dbus_handle, #y) + +#define SDL_DBUS_SYM2(x, y) \ + if (!(dbus.x = SDL_LoadFunction(dbus_handle, #y))) \ + return -1 + +#define SDL_DBUS_SYM(x) \ + SDL_DBUS_SYM2(x, dbus_##x) + +#define SDL_DBUS_SYM_OPTIONAL(x) \ + SDL_DBUS_SYM2_OPTIONAL(x, dbus_##x) SDL_DBUS_SYM(bus_get_private); SDL_DBUS_SYM(bus_register); @@ -80,18 +86,18 @@ LoadDBUSSyms(void) SDL_DBUS_SYM(error_is_set); SDL_DBUS_SYM(error_free); SDL_DBUS_SYM(get_local_machine_id); + SDL_DBUS_SYM_OPTIONAL(try_get_local_machine_id); SDL_DBUS_SYM(free); SDL_DBUS_SYM(free_string_array); SDL_DBUS_SYM(shutdown); - #undef SDL_DBUS_SYM - #undef SDL_DBUS_SYM2 +#undef SDL_DBUS_SYM +#undef SDL_DBUS_SYM2 return 0; } -static void -UnloadDBUSLibrary(void) +static void UnloadDBUSLibrary(void) { if (dbus_handle != NULL) { SDL_UnloadObject(dbus_handle); @@ -99,8 +105,7 @@ UnloadDBUSLibrary(void) } } -static int -LoadDBUSLibrary(void) +static int LoadDBUSLibrary(void) { int retval = 0; if (dbus_handle == NULL) { @@ -119,24 +124,22 @@ LoadDBUSLibrary(void) return retval; } - static SDL_SpinLock spinlock_dbus_init = 0; /* you must hold spinlock_dbus_init before calling this! */ -static void -SDL_DBus_Init_Spinlocked(void) +static void SDL_DBus_Init_Spinlocked(void) { static SDL_bool is_dbus_available = SDL_TRUE; if (!is_dbus_available) { - return; /* don't keep trying if this fails. */ + return; /* don't keep trying if this fails. */ } if (!dbus.session_conn) { DBusError err; if (LoadDBUSLibrary() == -1) { - is_dbus_available = SDL_FALSE; /* can't load at all? Don't keep trying. */ - return; /* oh well */ + is_dbus_available = SDL_FALSE; /* can't load at all? Don't keep trying. */ + return; } if (!dbus.threads_init_default()) { @@ -152,7 +155,7 @@ SDL_DBus_Init_Spinlocked(void) dbus.error_free(&err); SDL_DBus_Quit(); is_dbus_available = SDL_FALSE; - return; /* oh well */ + return; /* oh well */ } dbus.connection_set_exit_on_disconnect(dbus.session_conn, 0); @@ -166,16 +169,14 @@ SDL_DBus_Init_Spinlocked(void) } } -void -SDL_DBus_Init(void) +void SDL_DBus_Init(void) { - SDL_AtomicLock(&spinlock_dbus_init); /* make sure two threads can't init at same time, since this can happen before SDL_Init. */ + SDL_AtomicLock(&spinlock_dbus_init); /* make sure two threads can't init at same time, since this can happen before SDL_Init. */ SDL_DBus_Init_Spinlocked(); SDL_AtomicUnlock(&spinlock_dbus_init); } -void -SDL_DBus_Quit(void) +void SDL_DBus_Quit(void) { if (dbus.system_conn) { dbus.connection_close(dbus.system_conn); @@ -199,18 +200,16 @@ SDL_DBus_Quit(void) inhibit_handle = NULL; } -SDL_DBusContext * -SDL_DBus_GetContext(void) +SDL_DBusContext *SDL_DBus_GetContext(void) { - if (!dbus_handle || !dbus.session_conn) { + if (dbus_handle == NULL || !dbus.session_conn) { SDL_DBus_Init(); } - + return (dbus_handle && dbus.session_conn) ? &dbus : NULL; } -static SDL_bool -SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap) +static SDL_bool SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap) { SDL_bool retval = SDL_FALSE; @@ -219,7 +218,7 @@ SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char * if (msg) { int firstarg; va_list ap_reply; - va_copy(ap_reply, ap); /* copy the arg list so we don't compete with D-Bus for it */ + va_copy(ap_reply, ap); /* copy the arg list so we don't compete with D-Bus for it */ firstarg = va_arg(ap, int); if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_append_args_valist(msg, firstarg, ap)) { DBusMessage *reply = dbus.connection_send_with_reply_and_block(conn, msg, 300, NULL); @@ -227,9 +226,15 @@ SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char * /* skip any input args, get to output args. */ while ((firstarg = va_arg(ap_reply, int)) != DBUS_TYPE_INVALID) { /* we assume D-Bus already validated all this. */ - { void *dumpptr = va_arg(ap_reply, void*); (void) dumpptr; } + { + void *dumpptr = va_arg(ap_reply, void *); + (void)dumpptr; + } if (firstarg == DBUS_TYPE_ARRAY) { - { const int dumpint = va_arg(ap_reply, int); (void) dumpint; } + { + const int dumpint = va_arg(ap_reply, int); + (void)dumpint; + } } } firstarg = va_arg(ap_reply, int); @@ -247,8 +252,7 @@ SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char * return retval; } -SDL_bool -SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...) +SDL_bool SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...) { SDL_bool retval; va_list ap; @@ -258,8 +262,7 @@ SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const ch return retval; } -SDL_bool -SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...) +SDL_bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...) { SDL_bool retval; va_list ap; @@ -269,8 +272,7 @@ SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, c return retval; } -static SDL_bool -SDL_DBus_CallVoidMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap) +static SDL_bool SDL_DBus_CallVoidMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap) { SDL_bool retval = SDL_FALSE; @@ -292,8 +294,7 @@ SDL_DBus_CallVoidMethodInternal(DBusConnection *conn, const char *node, const ch return retval; } -static SDL_bool -SDL_DBus_CallWithBasicReply(DBusConnection *conn, DBusMessage *msg, const int expectedtype, void *result) +static SDL_bool SDL_DBus_CallWithBasicReply(DBusConnection *conn, DBusMessage *msg, const int expectedtype, void *result) { SDL_bool retval = SDL_FALSE; @@ -318,8 +319,7 @@ SDL_DBus_CallWithBasicReply(DBusConnection *conn, DBusMessage *msg, const int ex return retval; } -SDL_bool -SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...) +SDL_bool SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...) { SDL_bool retval; va_list ap; @@ -329,8 +329,7 @@ SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, cons return retval; } -SDL_bool -SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...) +SDL_bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...) { SDL_bool retval; va_list ap; @@ -340,8 +339,7 @@ SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interfac return retval; } -SDL_bool -SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result) +SDL_bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result) { SDL_bool retval = SDL_FALSE; @@ -358,46 +356,45 @@ SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const return retval; } -SDL_bool -SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result) +SDL_bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result) { return SDL_DBus_QueryPropertyOnConnection(dbus.session_conn, node, path, interface, property, expectedtype, result); } - -void -SDL_DBus_ScreensaverTickle(void) +void SDL_DBus_ScreensaverTickle(void) { - if (screensaver_cookie == 0 && inhibit_handle == NULL) { /* no need to tickle if we're inhibiting. */ + if (screensaver_cookie == 0 && inhibit_handle == NULL) { /* no need to tickle if we're inhibiting. */ /* org.gnome.ScreenSaver is the legacy interface, but it'll either do nothing or just be a second harmless tickle on newer systems, so we leave it for now. */ SDL_DBus_CallVoidMethod("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID); SDL_DBus_CallVoidMethod("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID); } } -static SDL_bool -SDL_DBus_AppendDictWithKeyValue(DBusMessageIter *iterInit, const char *key, const char *value) +static SDL_bool SDL_DBus_AppendDictWithKeyValue(DBusMessageIter *iterInit, const char *key, const char *value) { DBusMessageIter iterDict, iterEntry, iterValue; - if (!dbus.message_iter_open_container(iterInit, DBUS_TYPE_ARRAY, "{sv}", &iterDict)) + if (!dbus.message_iter_open_container(iterInit, DBUS_TYPE_ARRAY, "{sv}", &iterDict)) { goto failed; + } - if (!dbus.message_iter_open_container(&iterDict, DBUS_TYPE_DICT_ENTRY, NULL, &iterEntry)) + if (!dbus.message_iter_open_container(&iterDict, DBUS_TYPE_DICT_ENTRY, NULL, &iterEntry)) { goto failed; + } - if (!dbus.message_iter_append_basic(&iterEntry, DBUS_TYPE_STRING, &key)) + if (!dbus.message_iter_append_basic(&iterEntry, DBUS_TYPE_STRING, &key)) { goto failed; + } - if (!dbus.message_iter_open_container(&iterEntry, DBUS_TYPE_VARIANT, DBUS_TYPE_STRING_AS_STRING, &iterValue)) + if (!dbus.message_iter_open_container(&iterEntry, DBUS_TYPE_VARIANT, DBUS_TYPE_STRING_AS_STRING, &iterValue)) { goto failed; + } - if (!dbus.message_iter_append_basic(&iterValue, DBUS_TYPE_STRING, &value)) + if (!dbus.message_iter_append_basic(&iterValue, DBUS_TYPE_STRING, &value)) { goto failed; + } - if (!dbus.message_iter_close_container(&iterEntry, &iterValue) - || !dbus.message_iter_close_container(&iterDict, &iterEntry) - || !dbus.message_iter_close_container(iterInit, &iterDict)) { + if (!dbus.message_iter_close_container(&iterEntry, &iterValue) || !dbus.message_iter_close_container(&iterDict, &iterEntry) || !dbus.message_iter_close_container(iterInit, &iterDict)) { goto failed; } @@ -410,13 +407,11 @@ failed: return SDL_FALSE; } -SDL_bool -SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) +SDL_bool SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) { const char *default_inhibit_reason = "Playing a game"; - if ( (inhibit && (screensaver_cookie != 0 || inhibit_handle != NULL)) - || (!inhibit && (screensaver_cookie == 0 && inhibit_handle == NULL)) ) { + if ((inhibit && (screensaver_cookie != 0 || inhibit_handle != NULL)) || (!inhibit && (screensaver_cookie == 0 && inhibit_handle == NULL))) { return SDL_TRUE; } @@ -430,7 +425,7 @@ SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) const char *bus_name = "org.freedesktop.portal.Desktop"; const char *path = "/org/freedesktop/portal/desktop"; const char *interface = "org.freedesktop.portal.Inhibit"; - const char *window = ""; /* As a future improvement we could gather the X11 XID or Wayland surface identifier */ + const char *window = ""; /* As a future improvement we could gather the X11 XID or Wayland surface identifier */ static const unsigned int INHIBIT_IDLE = 8; /* Taken from the portal API reference */ DBusMessageIter iterInit; @@ -440,12 +435,12 @@ SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) const char *key = "reason"; const char *reply = NULL; const char *reason = SDL_GetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME); - if (!reason || !reason[0]) { + if (reason == NULL || !reason[0]) { reason = default_inhibit_reason; } msg = dbus.message_new_method_call(bus_name, path, interface, "Inhibit"); - if (!msg) { + if (msg == NULL) { return SDL_FALSE; } @@ -482,16 +477,16 @@ SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) if (inhibit) { const char *app = SDL_GetHint(SDL_HINT_APP_NAME); const char *reason = SDL_GetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME); - if (!app || !app[0]) { - app = "My SDL application"; + if (app == NULL || !app[0]) { + app = "My SDL application"; } - if (!reason || !reason[0]) { + if (reason == NULL || !reason[0]) { reason = default_inhibit_reason; } if (!SDL_DBus_CallMethod(bus_name, path, interface, "Inhibit", - DBUS_TYPE_STRING, &app, DBUS_TYPE_STRING, &reason, DBUS_TYPE_INVALID, - DBUS_TYPE_UINT32, &screensaver_cookie, DBUS_TYPE_INVALID)) { + DBUS_TYPE_STRING, &app, DBUS_TYPE_STRING, &reason, DBUS_TYPE_INVALID, + DBUS_TYPE_UINT32, &screensaver_cookie, DBUS_TYPE_INVALID)) { return SDL_FALSE; } return (screensaver_cookie != 0) ? SDL_TRUE : SDL_FALSE; @@ -505,6 +500,40 @@ SDL_DBus_ScreensaverInhibit(SDL_bool inhibit) return SDL_TRUE; } + +/* + * Get the machine ID if possible. Result must be freed with dbus->free(). + */ +char *SDL_DBus_GetLocalMachineId(void) +{ + DBusError err; + char *result; + + dbus.error_init(&err); + + if (dbus.try_get_local_machine_id) { + /* Available since dbus 1.12.0, has proper error-handling */ + result = dbus.try_get_local_machine_id(&err); + } else { + /* Available since time immemorial, but has no error-handling: + * if the machine ID can't be read, many versions of libdbus will + * treat that as a fatal mis-installation and abort() */ + result = dbus.get_local_machine_id(); + } + + if (result) { + return result; + } + + if (dbus.error_is_set(&err)) { + SDL_SetError("%s: %s", err.name, err.message); + dbus.error_free(&err); + } else { + SDL_SetError("Error getting D-Bus machine ID"); + } + + return NULL; +} #endif /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/core/linux/SDL_dbus.h b/modules/SDL2/src/core/linux/SDL_dbus.h index cad528f..cda279e 100644 --- a/modules/SDL2/src/core/linux/SDL_dbus.h +++ b/modules/SDL2/src/core/linux/SDL_dbus.h @@ -29,20 +29,20 @@ #include "SDL_stdinc.h" #include - -typedef struct SDL_DBusContext { +typedef struct SDL_DBusContext +{ DBusConnection *session_conn; DBusConnection *system_conn; DBusConnection *(*bus_get_private)(DBusBusType, DBusError *); dbus_bool_t (*bus_register)(DBusConnection *, DBusError *); void (*bus_add_match)(DBusConnection *, const char *, DBusError *); - DBusConnection * (*connection_open_private)(const char *, DBusError *); + DBusConnection *(*connection_open_private)(const char *, DBusError *); void (*connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t); dbus_bool_t (*connection_get_is_connected)(DBusConnection *); dbus_bool_t (*connection_add_filter)(DBusConnection *, DBusHandleMessageFunction, void *, DBusFreeFunction); dbus_bool_t (*connection_try_register_object_path)(DBusConnection *, const char *, - const DBusObjectPathVTable *, void *, DBusError *); + const DBusObjectPathVTable *, void *, DBusError *); dbus_bool_t (*connection_send)(DBusConnection *, DBusMessage *, dbus_uint32_t *); DBusMessage *(*connection_send_with_reply_and_block)(DBusConnection *, DBusMessage *, int, DBusError *); void (*connection_close)(DBusConnection *); @@ -51,7 +51,7 @@ typedef struct SDL_DBusContext { void (*connection_flush)(DBusConnection *); dbus_bool_t (*connection_read_write)(DBusConnection *, int); DBusDispatchStatus (*connection_dispatch)(DBusConnection *); - dbus_bool_t (*message_is_signal)(DBusMessage *, const char *, const char *); + dbus_bool_t (*message_is_signal)(DBusMessage *, const char *, const char *); DBusMessage *(*message_new_method_call)(const char *, const char *, const char *, const char *); dbus_bool_t (*message_append_args)(DBusMessage *, int, ...); dbus_bool_t (*message_append_args_valist)(DBusMessage *, int, va_list); @@ -65,13 +65,14 @@ typedef struct SDL_DBusContext { dbus_bool_t (*message_iter_next)(DBusMessageIter *); void (*message_iter_get_basic)(DBusMessageIter *, void *); int (*message_iter_get_arg_type)(DBusMessageIter *); - void (*message_iter_recurse)(DBusMessageIter *, DBusMessageIter *); + void (*message_iter_recurse)(DBusMessageIter *, DBusMessageIter *); void (*message_unref)(DBusMessage *); dbus_bool_t (*threads_init_default)(void); void (*error_init)(DBusError *); dbus_bool_t (*error_is_set)(const DBusError *); void (*error_free)(DBusError *); char *(*get_local_machine_id)(void); + char *(*try_get_local_machine_id)(DBusError *); void (*free)(void *); void (*free_string_array)(char **); void (*shutdown)(void); @@ -80,7 +81,7 @@ typedef struct SDL_DBusContext { extern void SDL_DBus_Init(void); extern void SDL_DBus_Quit(void); -extern SDL_DBusContext * SDL_DBus_GetContext(void); +extern SDL_DBusContext *SDL_DBus_GetContext(void); /* These use the built-in Session connection. */ extern SDL_bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...); @@ -95,6 +96,8 @@ extern SDL_bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const c extern void SDL_DBus_ScreensaverTickle(void); extern SDL_bool SDL_DBus_ScreensaverInhibit(SDL_bool inhibit); +extern char *SDL_DBus_GetLocalMachineId(void); + #endif /* HAVE_DBUS_DBUS_H */ #endif /* SDL_dbus_h_ */ diff --git a/modules/SDL2/src/core/linux/SDL_evdev.c b/modules/SDL2/src/core/linux/SDL_evdev.c index 03e68b9..e997aae 100644 --- a/modules/SDL2/src/core/linux/SDL_evdev.c +++ b/modules/SDL2/src/core/linux/SDL_evdev.c @@ -23,7 +23,7 @@ #ifdef SDL_INPUT_LINUXEV /* This is based on the linux joystick driver */ -/* References: https://www.kernel.org/doc/Documentation/input/input.txt +/* References: https://www.kernel.org/doc/Documentation/input/input.txt * https://www.kernel.org/doc/Documentation/input/event-codes.txt * /usr/include/linux/input.h * The evtest application is also useful to debug the protocol @@ -51,15 +51,15 @@ #define SYN_DROPPED 3 #endif #ifndef ABS_MT_SLOT -#define ABS_MT_SLOT 0x2f -#define ABS_MT_POSITION_X 0x35 -#define ABS_MT_POSITION_Y 0x36 -#define ABS_MT_TRACKING_ID 0x39 -#define ABS_MT_PRESSURE 0x3a +#define ABS_MT_SLOT 0x2f +#define ABS_MT_POSITION_X 0x35 +#define ABS_MT_POSITION_Y 0x36 +#define ABS_MT_TRACKING_ID 0x39 +#define ABS_MT_PRESSURE 0x3a #endif #ifndef REL_WHEEL_HI_RES -#define REL_WHEEL_HI_RES 0x0b -#define REL_HWHEEL_HI_RES 0x0c +#define REL_WHEEL_HI_RES 0x0b +#define REL_HWHEEL_HI_RES 0x0c #endif typedef struct SDL_evdevlist_item @@ -74,8 +74,9 @@ typedef struct SDL_evdevlist_item keyboard, touchpad, etc.). Also there's probably some things in here we can pull out to the SDL_evdevlist_item i.e. name */ SDL_bool is_touchscreen; - struct { - char* name; + struct + { + char *name; int min_x, max_x, range_x; int min_y, max_y, range_y; @@ -83,8 +84,10 @@ typedef struct SDL_evdevlist_item int max_slots; int current_slot; - struct { - enum { + struct + { + enum + { EVDEV_TOUCH_SLOTDELTA_NONE = 0, EVDEV_TOUCH_SLOTDELTA_DOWN, EVDEV_TOUCH_SLOTDELTA_UP, @@ -92,9 +95,9 @@ typedef struct SDL_evdevlist_item } delta; int tracking_id; int x, y, pressure; - } * slots; + } *slots; - } * touchscreen_data; + } *touchscreen_data; /* Mouse state */ SDL_bool high_res_wheel; @@ -125,34 +128,30 @@ static int SDL_EVDEV_device_removed(const char *dev_path); static int SDL_EVDEV_device_added(const char *dev_path, int udev_class); #if SDL_USE_LIBUDEV -static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class, - const char *dev_path); +static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class, const char *dev_path); #endif /* SDL_USE_LIBUDEV */ static Uint8 EVDEV_MouseButtons[] = { - SDL_BUTTON_LEFT, /* BTN_LEFT 0x110 */ - SDL_BUTTON_RIGHT, /* BTN_RIGHT 0x111 */ - SDL_BUTTON_MIDDLE, /* BTN_MIDDLE 0x112 */ - SDL_BUTTON_X1, /* BTN_SIDE 0x113 */ - SDL_BUTTON_X2, /* BTN_EXTRA 0x114 */ - SDL_BUTTON_X2 + 1, /* BTN_FORWARD 0x115 */ - SDL_BUTTON_X2 + 2, /* BTN_BACK 0x116 */ - SDL_BUTTON_X2 + 3 /* BTN_TASK 0x117 */ + SDL_BUTTON_LEFT, /* BTN_LEFT 0x110 */ + SDL_BUTTON_RIGHT, /* BTN_RIGHT 0x111 */ + SDL_BUTTON_MIDDLE, /* BTN_MIDDLE 0x112 */ + SDL_BUTTON_X1, /* BTN_SIDE 0x113 */ + SDL_BUTTON_X2, /* BTN_EXTRA 0x114 */ + SDL_BUTTON_X2 + 1, /* BTN_FORWARD 0x115 */ + SDL_BUTTON_X2 + 2, /* BTN_BACK 0x116 */ + SDL_BUTTON_X2 + 3 /* BTN_TASK 0x117 */ }; -static int -SDL_EVDEV_SetRelativeMouseMode(SDL_bool enabled) +static int SDL_EVDEV_SetRelativeMouseMode(SDL_bool enabled) { /* Mice already send relative events through this interface */ return 0; } - -int -SDL_EVDEV_Init(void) +int SDL_EVDEV_Init(void) { if (_this == NULL) { - _this = (SDL_EVDEV_PrivateData*)SDL_calloc(1, sizeof(*_this)); + _this = (SDL_EVDEV_PrivateData *)SDL_calloc(1, sizeof(*_this)); if (_this == NULL) { return SDL_OutOfMemory(); } @@ -182,20 +181,20 @@ SDL_EVDEV_Init(void) where device class is an integer representing the SDL_UDEV_deviceclass and path is the full path to the event device. */ - const char* devices = SDL_getenv("SDL_EVDEV_DEVICES"); + const char *devices = SDL_getenv("SDL_EVDEV_DEVICES"); if (devices) { /* Assume this is the old use of the env var and it is not in ROM. */ - char* rest = (char*) devices; - char* spec; - while ((spec = strtok_r(rest, ",", &rest))) { - char* endofcls = 0; - long cls = strtol(spec, &endofcls, 0); - if (endofcls) + char *rest = (char *)devices; + char *spec; + while ((spec = SDL_strtokr(rest, ",", &rest))) { + char *endofcls = 0; + long cls = SDL_strtol(spec, &endofcls, 0); + if (endofcls) { SDL_EVDEV_device_added(endofcls + 1, cls); + } } - } - else { + } else { /* TODO: Scan the devices manually, like a caveman */ } } @@ -211,8 +210,7 @@ SDL_EVDEV_Init(void) return 0; } -void -SDL_EVDEV_Quit(void) +void SDL_EVDEV_Quit(void) { if (_this == NULL) { return; @@ -229,7 +227,7 @@ SDL_EVDEV_Quit(void) SDL_EVDEV_kbd_quit(_this->kbd); /* Remove existing devices */ - while(_this->first != NULL) { + while (_this->first != NULL) { SDL_EVDEV_device_removed(_this->first->path); } @@ -244,22 +242,24 @@ SDL_EVDEV_Quit(void) #if SDL_USE_LIBUDEV static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class, - const char* dev_path) + const char *dev_path) { if (dev_path == NULL) { return; } - switch(udev_event) { + switch (udev_event) { case SDL_UDEV_DEVICEADDED: - if (!(udev_class & (SDL_UDEV_DEVICE_MOUSE | SDL_UDEV_DEVICE_KEYBOARD | SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD))) + if (!(udev_class & (SDL_UDEV_DEVICE_MOUSE | SDL_UDEV_DEVICE_KEYBOARD | SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD))) { return; + } - if ((udev_class & SDL_UDEV_DEVICE_JOYSTICK)) + if (udev_class & SDL_UDEV_DEVICE_JOYSTICK) { return; + } SDL_EVDEV_device_added(dev_path, udev_class); - break; + break; case SDL_UDEV_DEVICEREMOVED: SDL_EVDEV_device_removed(dev_path); break; @@ -269,8 +269,7 @@ static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_cl } #endif /* SDL_USE_LIBUDEV */ -void -SDL_EVDEV_Poll(void) +void SDL_EVDEV_Poll(void) { struct input_event events[32]; int i, j, len; @@ -291,7 +290,7 @@ SDL_EVDEV_Poll(void) mouse = SDL_GetMouse(); for (item = _this->first; item != NULL; item = item->next) { - while ((len = read(item->fd, events, (sizeof events))) > 0) { + while ((len = read(item->fd, events, sizeof(events))) > 0) { len /= sizeof(events[0]); for (i = 0; i < len; ++i) { /* special handling for touchscreen, that should eventually be @@ -319,10 +318,11 @@ SDL_EVDEV_Poll(void) next finger after earlist is released) */ if (item->is_touchscreen && events[i].code == BTN_TOUCH) { if (item->touchscreen_data->max_slots == 1) { - if (events[i].value) + if (events[i].value) { item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_DOWN; - else + } else { item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_UP; + } } break; } @@ -339,15 +339,17 @@ SDL_EVDEV_Poll(void) SDL_EVDEV_kbd_keycode(_this->kbd, events[i].code, events[i].value); break; case EV_ABS: - switch(events[i].code) { + switch (events[i].code) { case ABS_MT_SLOT: - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } item->touchscreen_data->current_slot = events[i].value; break; case ABS_MT_TRACKING_ID: - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } if (events[i].value >= 0) { item->touchscreen_data->slots[item->touchscreen_data->current_slot].tracking_id = events[i].value; item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_DOWN; @@ -356,24 +358,27 @@ SDL_EVDEV_Poll(void) } break; case ABS_MT_POSITION_X: - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } item->touchscreen_data->slots[item->touchscreen_data->current_slot].x = events[i].value; if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) { item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE; } break; case ABS_MT_POSITION_Y: - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } item->touchscreen_data->slots[item->touchscreen_data->current_slot].y = events[i].value; if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) { item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE; } break; case ABS_MT_PRESSURE: - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } item->touchscreen_data->slots[item->touchscreen_data->current_slot].pressure = events[i].value; if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) { item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE; @@ -381,8 +386,9 @@ SDL_EVDEV_Poll(void) break; case ABS_X: if (item->is_touchscreen) { - if (item->touchscreen_data->max_slots != 1) + if (item->touchscreen_data->max_slots != 1) { break; + } item->touchscreen_data->slots[0].x = events[i].value; } else if (!item->relative_mouse) { /* FIXME: Normalize to input device's reported input range (EVIOCGABS) */ @@ -391,8 +397,9 @@ SDL_EVDEV_Poll(void) break; case ABS_Y: if (item->is_touchscreen) { - if (item->touchscreen_data->max_slots != 1) + if (item->touchscreen_data->max_slots != 1) { break; + } item->touchscreen_data->slots[0].y = events[i].value; } else if (!item->relative_mouse) { /* FIXME: Normalize to input device's reported input range (EVIOCGABS) */ @@ -404,26 +411,30 @@ SDL_EVDEV_Poll(void) } break; case EV_REL: - switch(events[i].code) { + switch (events[i].code) { case REL_X: - if (item->relative_mouse) + if (item->relative_mouse) { item->mouse_x += events[i].value; + } break; case REL_Y: - if (item->relative_mouse) + if (item->relative_mouse) { item->mouse_y += events[i].value; + } break; case REL_WHEEL: - if (!item->high_res_wheel) + if (!item->high_res_wheel) { item->mouse_wheel += events[i].value; + } break; case REL_WHEEL_HI_RES: SDL_assert(item->high_res_wheel); item->mouse_wheel += events[i].value; break; case REL_HWHEEL: - if (!item->high_res_hwheel) + if (!item->high_res_hwheel) { item->mouse_hwheel += events[i].value; + } break; case REL_HWHEEL_HI_RES: SDL_assert(item->high_res_hwheel); @@ -449,18 +460,19 @@ SDL_EVDEV_Poll(void) item->mouse_wheel = item->mouse_hwheel = 0; } - if (!item->is_touchscreen) /* FIXME: temp hack */ + if (!item->is_touchscreen) { /* FIXME: temp hack */ break; + } - for(j = 0; j < item->touchscreen_data->max_slots; j++) { + for (j = 0; j < item->touchscreen_data->max_slots; j++) { norm_x = (float)(item->touchscreen_data->slots[j].x - item->touchscreen_data->min_x) / - (float)item->touchscreen_data->range_x; + (float)item->touchscreen_data->range_x; norm_y = (float)(item->touchscreen_data->slots[j].y - item->touchscreen_data->min_y) / - (float)item->touchscreen_data->range_y; + (float)item->touchscreen_data->range_y; if (item->touchscreen_data->range_pressure > 0) { norm_pressure = (float)(item->touchscreen_data->slots[j].pressure - item->touchscreen_data->min_pressure) / - (float)item->touchscreen_data->range_pressure; + (float)item->touchscreen_data->range_pressure; } else { /* This touchscreen does not support pressure */ norm_pressure = 1.0f; @@ -469,7 +481,7 @@ SDL_EVDEV_Poll(void) /* FIXME: the touch's window shouldn't be null, but * the coordinate space of touch positions needs to * be window-relative in that case. */ - switch(item->touchscreen_data->slots[j].delta) { + switch (item->touchscreen_data->slots[j].delta) { case EVDEV_TOUCH_SLOTDELTA_DOWN: SDL_SendTouch(item->fd, item->touchscreen_data->slots[j].tracking_id, NULL, SDL_TRUE, norm_x, norm_y, norm_pressure); item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE; @@ -488,12 +500,14 @@ SDL_EVDEV_Poll(void) } } - if (item->out_of_sync) + if (item->out_of_sync) { item->out_of_sync = SDL_FALSE; + } break; case SYN_DROPPED: - if (item->is_touchscreen) + if (item->is_touchscreen) { item->out_of_sync = SDL_TRUE; + } SDL_EVDEV_sync_device(item); break; default: @@ -502,12 +516,11 @@ SDL_EVDEV_Poll(void) break; } } - } + } } } -static SDL_Scancode -SDL_EVDEV_translate_keycode(int keycode) +static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode) { SDL_Scancode scancode = SDL_GetScancodeFromTable(SDL_SCANCODE_TABLE_LINUX, keycode); @@ -519,8 +532,9 @@ SDL_EVDEV_translate_keycode(int keycode) SDL_Log message about an unknown key. */ if (keycode != BTN_TOUCH) { SDL_Log("The key you just pressed is not recognized by SDL. To help " - "get this fixed, please report this to the SDL forums/mailing list " - " EVDEV KeyCode %d", keycode); + "get this fixed, please report this to the SDL forums/mailing list " + " EVDEV KeyCode %d", + keycode); } } #endif /* DEBUG_SCANCODES */ @@ -528,20 +542,21 @@ SDL_EVDEV_translate_keycode(int keycode) return scancode; } -static int -SDL_EVDEV_init_touchscreen(SDL_evdevlist_item* item, int udev_class) +static int SDL_EVDEV_init_touchscreen(SDL_evdevlist_item *item, int udev_class) { int ret, i; unsigned long xreq, yreq; char name[64]; struct input_absinfo abs_info; - if (!item->is_touchscreen) + if (!item->is_touchscreen) { return 0; + } item->touchscreen_data = SDL_calloc(1, sizeof(*item->touchscreen_data)); - if (item->touchscreen_data == NULL) + if (item->touchscreen_data == NULL) { return SDL_OutOfMemory(); + } ret = ioctl(item->fd, EVIOCGNAME(sizeof(name)), name); if (ret < 0) { @@ -611,13 +626,13 @@ SDL_EVDEV_init_touchscreen(SDL_evdevlist_item* item, int udev_class) return SDL_OutOfMemory(); } - for(i = 0; i < item->touchscreen_data->max_slots; i++) { + for (i = 0; i < item->touchscreen_data->max_slots; i++) { item->touchscreen_data->slots[i].tracking_id = -1; } ret = SDL_AddTouch(item->fd, /* I guess our fd is unique enough */ - (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT, - item->touchscreen_data->name); + (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT, + item->touchscreen_data->name); if (ret < 0) { SDL_free(item->touchscreen_data->slots); SDL_free(item->touchscreen_data->name); @@ -628,10 +643,11 @@ SDL_EVDEV_init_touchscreen(SDL_evdevlist_item* item, int udev_class) return 0; } -static void -SDL_EVDEV_destroy_touchscreen(SDL_evdevlist_item* item) { - if (!item->is_touchscreen) +static void SDL_EVDEV_destroy_touchscreen(SDL_evdevlist_item *item) +{ + if (!item->is_touchscreen) { return; + } SDL_DelTouch(item->fd); SDL_free(item->touchscreen_data->slots); @@ -639,8 +655,7 @@ SDL_EVDEV_destroy_touchscreen(SDL_evdevlist_item* item) { SDL_free(item->touchscreen_data); } -static void -SDL_EVDEV_sync_device(SDL_evdevlist_item *item) +static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item) { #ifdef EVIOCGMTSLOTS int i, ret; @@ -653,23 +668,24 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) * * this is the structure we're trying to emulate */ - Uint32* mt_req_code; - Sint32* mt_req_values; + Uint32 *mt_req_code; + Sint32 *mt_req_values; size_t mt_req_size; /* TODO: sync devices other than touchscreen */ - if (!item->is_touchscreen) + if (!item->is_touchscreen) { return; + } mt_req_size = sizeof(*mt_req_code) + - sizeof(*mt_req_values) * item->touchscreen_data->max_slots; + sizeof(*mt_req_values) * item->touchscreen_data->max_slots; mt_req_code = SDL_calloc(1, mt_req_size); if (mt_req_code == NULL) { return; } - mt_req_values = (Sint32*)mt_req_code + 1; + mt_req_values = (Sint32 *)mt_req_code + 1; *mt_req_code = ABS_MT_TRACKING_ID; ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code); @@ -677,7 +693,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) SDL_free(mt_req_code); return; } - for(i = 0; i < item->touchscreen_data->max_slots; i++) { + for (i = 0; i < item->touchscreen_data->max_slots; i++) { /* * This doesn't account for the very edge case of the user removing their * finger and replacing it on the screen during the time we're out of sync, @@ -692,7 +708,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) item->touchscreen_data->slots[i].tracking_id = mt_req_values[i]; item->touchscreen_data->slots[i].delta = EVDEV_TOUCH_SLOTDELTA_DOWN; } else if (item->touchscreen_data->slots[i].tracking_id >= 0 && - mt_req_values[i] < 0) { + mt_req_values[i] < 0) { item->touchscreen_data->slots[i].tracking_id = -1; item->touchscreen_data->slots[i].delta = EVDEV_TOUCH_SLOTDELTA_UP; } @@ -704,7 +720,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) SDL_free(mt_req_code); return; } - for(i = 0; i < item->touchscreen_data->max_slots; i++) { + for (i = 0; i < item->touchscreen_data->max_slots; i++) { if (item->touchscreen_data->slots[i].tracking_id >= 0 && item->touchscreen_data->slots[i].x != mt_req_values[i]) { item->touchscreen_data->slots[i].x = mt_req_values[i]; @@ -722,7 +738,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) SDL_free(mt_req_code); return; } - for(i = 0; i < item->touchscreen_data->max_slots; i++) { + for (i = 0; i < item->touchscreen_data->max_slots; i++) { if (item->touchscreen_data->slots[i].tracking_id >= 0 && item->touchscreen_data->slots[i].y != mt_req_values[i]) { item->touchscreen_data->slots[i].y = mt_req_values[i]; @@ -740,7 +756,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) SDL_free(mt_req_code); return; } - for(i = 0; i < item->touchscreen_data->max_slots; i++) { + for (i = 0; i < item->touchscreen_data->max_slots; i++) { if (item->touchscreen_data->slots[i].tracking_id >= 0 && item->touchscreen_data->slots[i].pressure != mt_req_values[i]) { item->touchscreen_data->slots[i].pressure = mt_req_values[i]; @@ -764,8 +780,7 @@ SDL_EVDEV_sync_device(SDL_evdevlist_item *item) #endif /* EVIOCGMTSLOTS */ } -static int -SDL_EVDEV_device_added(const char *dev_path, int udev_class) +static int SDL_EVDEV_device_added(const char *dev_path, int udev_class) { int ret; SDL_evdevlist_item *item; @@ -774,11 +789,11 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class) /* Check to make sure it's not already in list. */ for (item = _this->first; item != NULL; item = item->next) { if (SDL_strcmp(dev_path, item->path) == 0) { - return -1; /* already have this one */ + return -1; /* already have this one */ } } - item = (SDL_evdevlist_item *) SDL_calloc(1, sizeof (SDL_evdevlist_item)); + item = (SDL_evdevlist_item *)SDL_calloc(1, sizeof(SDL_evdevlist_item)); if (item == NULL) { return SDL_OutOfMemory(); } @@ -805,8 +820,8 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class) /* For now, we just treat a touchpad like a touchscreen */ if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) { item->is_touchscreen = SDL_TRUE; - - if ((ret = SDL_EVDEV_init_touchscreen(item, udev_class)) < 0) { + ret = SDL_EVDEV_init_touchscreen(item, udev_class); + if (ret < 0) { close(item->fd); SDL_free(item->path); SDL_free(item); @@ -826,8 +841,7 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class) return _this->num_devices++; } -static int -SDL_EVDEV_device_removed(const char *dev_path) +static int SDL_EVDEV_device_removed(const char *dev_path) { SDL_evdevlist_item *item; SDL_evdevlist_item *prev = NULL; @@ -859,7 +873,6 @@ SDL_EVDEV_device_removed(const char *dev_path) return -1; } - #endif /* SDL_INPUT_LINUXEV */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/core/linux/SDL_evdev_capabilities.c b/modules/SDL2/src/core/linux/SDL_evdev_capabilities.c index acee48c..b8f112b 100644 --- a/modules/SDL2/src/core/linux/SDL_evdev_capabilities.c +++ b/modules/SDL2/src/core/linux/SDL_evdev_capabilities.c @@ -23,7 +23,6 @@ #include "SDL_evdev_capabilities.h" - #if HAVE_LINUX_INPUT_H /* missing defines in older Linux kernel headers */ @@ -31,19 +30,20 @@ #define BTN_TRIGGER_HAPPY 0x2c0 #endif #ifndef BTN_DPAD_UP -#define BTN_DPAD_UP 0x220 +#define BTN_DPAD_UP 0x220 #endif #ifndef KEY_ALS_TOGGLE -#define KEY_ALS_TOGGLE 0x230 +#define KEY_ALS_TOGGLE 0x230 #endif extern int -SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)], - unsigned long bitmask_abs[NBITS(ABS_MAX)], - unsigned long bitmask_key[NBITS(KEY_MAX)], - unsigned long bitmask_rel[NBITS(REL_MAX)]) +SDL_EVDEV_GuessDeviceClass(const unsigned long bitmask_ev[NBITS(EV_MAX)], + const unsigned long bitmask_abs[NBITS(ABS_MAX)], + const unsigned long bitmask_key[NBITS(KEY_MAX)], + const unsigned long bitmask_rel[NBITS(REL_MAX)]) { - struct range { + struct range + { unsigned start; unsigned end; }; @@ -114,7 +114,7 @@ SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)], unsigned i; unsigned long found = 0; - for (i = 0; i < BTN_MISC/BITS_PER_LONG; ++i) { + for (i = 0; i < BTN_MISC / BITS_PER_LONG; ++i) { found |= bitmask_key[i]; } /* If there are no keys in the lower block, check the higher blocks */ @@ -138,8 +138,9 @@ SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)], /* the first 32 bits are ESC, numbers, and Q to D; if we have any of * those, consider it a keyboard device; do not test KEY_RESERVED, though */ keyboard_mask = 0xFFFFFFFE; - if ((bitmask_key[0] & keyboard_mask) != 0) + if ((bitmask_key[0] & keyboard_mask) != 0) { devclass |= SDL_UDEV_DEVICE_KEYBOARD; /* ID_INPUT_KEYBOARD */ + } return devclass; } diff --git a/modules/SDL2/src/core/linux/SDL_evdev_capabilities.h b/modules/SDL2/src/core/linux/SDL_evdev_capabilities.h index f46fb61..8fcdcb6 100644 --- a/modules/SDL2/src/core/linux/SDL_evdev_capabilities.h +++ b/modules/SDL2/src/core/linux/SDL_evdev_capabilities.h @@ -31,26 +31,26 @@ /* A device can be any combination of these classes */ typedef enum { - SDL_UDEV_DEVICE_UNKNOWN = 0x0000, - SDL_UDEV_DEVICE_MOUSE = 0x0001, - SDL_UDEV_DEVICE_KEYBOARD = 0x0002, - SDL_UDEV_DEVICE_JOYSTICK = 0x0004, - SDL_UDEV_DEVICE_SOUND = 0x0008, + SDL_UDEV_DEVICE_UNKNOWN = 0x0000, + SDL_UDEV_DEVICE_MOUSE = 0x0001, + SDL_UDEV_DEVICE_KEYBOARD = 0x0002, + SDL_UDEV_DEVICE_JOYSTICK = 0x0004, + SDL_UDEV_DEVICE_SOUND = 0x0008, SDL_UDEV_DEVICE_TOUCHSCREEN = 0x0010, SDL_UDEV_DEVICE_ACCELEROMETER = 0x0020, - SDL_UDEV_DEVICE_TOUCHPAD = 0x0040 + SDL_UDEV_DEVICE_TOUCHPAD = 0x0040 } SDL_UDEV_deviceclass; -#define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) -#define EVDEV_OFF(x) ((x)%BITS_PER_LONG) -#define EVDEV_LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array) ((array[EVDEV_LONG(bit)] >> EVDEV_OFF(bit)) & 1) +#define BITS_PER_LONG (sizeof(unsigned long) * 8) +#define NBITS(x) ((((x)-1) / BITS_PER_LONG) + 1) +#define EVDEV_OFF(x) ((x) % BITS_PER_LONG) +#define EVDEV_LONG(x) ((x) / BITS_PER_LONG) +#define test_bit(bit, array) ((array[EVDEV_LONG(bit)] >> EVDEV_OFF(bit)) & 1) -extern int SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)], - unsigned long bitmask_abs[NBITS(ABS_MAX)], - unsigned long bitmask_key[NBITS(KEY_MAX)], - unsigned long bitmask_rel[NBITS(REL_MAX)]); +extern int SDL_EVDEV_GuessDeviceClass(const unsigned long bitmask_ev[NBITS(EV_MAX)], + const unsigned long bitmask_abs[NBITS(ABS_MAX)], + const unsigned long bitmask_key[NBITS(KEY_MAX)], + const unsigned long bitmask_rel[NBITS(REL_MAX)]); #endif /* HAVE_LINUX_INPUT_H */ diff --git a/modules/SDL2/src/core/linux/SDL_evdev_kbd.c b/modules/SDL2/src/core/linux/SDL_evdev_kbd.c index fa78bb6..632bbd2 100644 --- a/modules/SDL2/src/core/linux/SDL_evdev_kbd.c +++ b/modules/SDL2/src/core/linux/SDL_evdev_kbd.c @@ -53,33 +53,31 @@ * Handler Tables. */ -#define K_HANDLERS\ - k_self, k_fn, k_spec, k_pad,\ - k_dead, k_cons, k_cur, k_shift,\ - k_meta, k_ascii, k_lock, k_lowercase,\ - k_slock, k_dead2, k_brl, k_ignore +#define K_HANDLERS \ + k_self, k_fn, k_spec, k_pad, \ + k_dead, k_cons, k_cur, k_shift, \ + k_meta, k_ascii, k_lock, k_lowercase, \ + k_slock, k_dead2, k_brl, k_ignore -typedef void (k_handler_fn)(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag); +typedef void(k_handler_fn)(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag); static k_handler_fn K_HANDLERS; static k_handler_fn *k_handler[16] = { K_HANDLERS }; -typedef void (fn_handler_fn)(SDL_EVDEV_keyboard_state *kbd); +typedef void(fn_handler_fn)(SDL_EVDEV_keyboard_state *kbd); static void fn_enter(SDL_EVDEV_keyboard_state *kbd); static void fn_caps_toggle(SDL_EVDEV_keyboard_state *kbd); static void fn_caps_on(SDL_EVDEV_keyboard_state *kbd); static void fn_num(SDL_EVDEV_keyboard_state *kbd); static void fn_compose(SDL_EVDEV_keyboard_state *kbd); -static fn_handler_fn *fn_handler[] = -{ - NULL, fn_enter, NULL, NULL, - NULL, NULL, NULL, fn_caps_toggle, - fn_num, NULL, NULL, NULL, - NULL, fn_caps_on, fn_compose, NULL, - NULL, NULL, NULL, fn_num +static fn_handler_fn *fn_handler[] = { + NULL, fn_enter, NULL, NULL, + NULL, NULL, NULL, fn_caps_toggle, + fn_num, NULL, NULL, NULL, + NULL, fn_caps_on, fn_compose, NULL, + NULL, NULL, NULL, fn_num }; - /* * Keyboard State */ @@ -89,12 +87,12 @@ struct SDL_EVDEV_keyboard_state int console_fd; int old_kbd_mode; unsigned short **key_maps; - unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */ + unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */ SDL_bool dead_key_next; - int npadch; /* -1 or number assembled on pad */ + int npadch; /* -1 or number assembled on pad */ struct kbdiacrs *accents; unsigned int diacr; - SDL_bool rep; /* flag telling character repeat */ + SDL_bool rep; /* flag telling character repeat */ unsigned char lockstate; unsigned char slockstate; unsigned char ledflagstate; @@ -114,7 +112,7 @@ static void SDL_EVDEV_dump_accents(SDL_EVDEV_keyboard_state *kbd) for (i = 0; i < kbd->accents->kb_cnt; ++i) { struct kbdiacr *diacr = &kbd->accents->kbdiacr[i]; printf(" { 0x%.2x, 0x%.2x, 0x%.2x },\n", - diacr->diacr, diacr->base, diacr->result); + diacr->diacr, diacr->base, diacr->result); } while (i < 256) { printf(" { 0x00, 0x00, 0x00 },\n"); @@ -134,7 +132,7 @@ static void SDL_EVDEV_dump_keymap(SDL_EVDEV_keyboard_state *kbd) if (kbd->key_maps[i]) { printf("static unsigned short default_key_map_%d[NR_KEYS] = {", i); for (j = 0; j < NR_KEYS; ++j) { - if ((j%8) == 0) { + if ((j % 8) == 0) { printf("\n "); } printf("0x%.4x, ", kbd->key_maps[i][j]); @@ -155,62 +153,22 @@ static void SDL_EVDEV_dump_keymap(SDL_EVDEV_keyboard_state *kbd) } #endif /* DUMP_KEYMAP */ -static int SDL_EVDEV_kbd_load_keymaps(SDL_EVDEV_keyboard_state *kbd) -{ - int i, j; - - kbd->key_maps = (unsigned short **)SDL_calloc(MAX_NR_KEYMAPS, sizeof(unsigned short *)); - if (!kbd->key_maps) { - return -1; - } - - for (i = 0; i < MAX_NR_KEYMAPS; ++i) { - struct kbentry kbe; - - kbe.kb_table = i; - kbe.kb_index = 0; - if (ioctl(kbd->console_fd, KDGKBENT, &kbe) < 0) { - return -1; - } - - if (kbe.kb_value == K_NOSUCHMAP) { - continue; - } - - kbd->key_maps[i] = (unsigned short *)SDL_malloc(NR_KEYS * sizeof(unsigned short)); - if (!kbd->key_maps[i]) { - return -1; - } - - for (j = 0; j < NR_KEYS; ++j) { - kbe.kb_table = i; - kbe.kb_index = j; - if (ioctl(kbd->console_fd, KDGKBENT, &kbe) < 0) { - return -1; - } - kbd->key_maps[i][j] = (kbe.kb_value ^ 0xf000); - } - } - return 0; -} - -static SDL_EVDEV_keyboard_state * kbd_cleanup_state = NULL; +static SDL_EVDEV_keyboard_state *kbd_cleanup_state = NULL; static int kbd_cleanup_sigactions_installed = 0; static int kbd_cleanup_atexit_installed = 0; static struct sigaction old_sigaction[NSIG]; -static int fatal_signals[] = -{ +static int fatal_signals[] = { /* Handlers for SIGTERM and SIGINT are installed in SDL_QuitInit. */ - SIGHUP, SIGQUIT, SIGILL, SIGABRT, - SIGFPE, SIGSEGV, SIGPIPE, SIGBUS, + SIGHUP, SIGQUIT, SIGILL, SIGABRT, + SIGFPE, SIGSEGV, SIGPIPE, SIGBUS, SIGSYS }; static void kbd_cleanup(void) { - SDL_EVDEV_keyboard_state* kbd = kbd_cleanup_state; + SDL_EVDEV_keyboard_state *kbd = kbd_cleanup_state; if (kbd == NULL) { return; } @@ -219,18 +177,17 @@ static void kbd_cleanup(void) ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode); } -static void -SDL_EVDEV_kbd_reraise_signal(int sig) +static void SDL_EVDEV_kbd_reraise_signal(int sig) { - raise(sig); + (void)raise(sig); } -siginfo_t* SDL_EVDEV_kdb_cleanup_siginfo = NULL; -void* SDL_EVDEV_kdb_cleanup_ucontext = NULL; +siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL; +void *SDL_EVDEV_kdb_cleanup_ucontext = NULL; -static void kbd_cleanup_signal_action(int signum, siginfo_t* info, void* ucontext) +static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext) { - struct sigaction* old_action_p = &(old_sigaction[signum]); + struct sigaction *old_action_p = &(old_sigaction[signum]); sigset_t sigset; /* Restore original signal handler before going any further. */ @@ -264,19 +221,20 @@ static void kbd_unregister_emerg_cleanup() kbd_cleanup_sigactions_installed = 0; for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { - struct sigaction* old_action_p; + struct sigaction *old_action_p; struct sigaction cur_action; signum = fatal_signals[tabidx]; old_action_p = &(old_sigaction[signum]); /* Examine current signal action */ - if (sigaction(signum, NULL, &cur_action)) + if (sigaction(signum, NULL, &cur_action)) { continue; + } /* Check if action installed and not modifed */ - if (!(cur_action.sa_flags & SA_SIGINFO) - || cur_action.sa_sigaction != &kbd_cleanup_signal_action) + if (!(cur_action.sa_flags & SA_SIGINFO) || cur_action.sa_sigaction != &kbd_cleanup_signal_action) { continue; + } /* Restore original action */ sigaction(signum, old_action_p, NULL); @@ -292,7 +250,7 @@ static void kbd_cleanup_atexit(void) kbd_unregister_emerg_cleanup(); } -static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) +static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state *kbd) { int tabidx, signum; @@ -306,7 +264,7 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) * functions that are called when the shared library is unloaded. * -- man atexit(3) */ - atexit(kbd_cleanup_atexit); + (void)atexit(kbd_cleanup_atexit); kbd_cleanup_atexit_installed = 1; } @@ -316,20 +274,20 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) kbd_cleanup_sigactions_installed = 1; for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { - struct sigaction* old_action_p; + struct sigaction *old_action_p; struct sigaction new_action; - signum = fatal_signals[tabidx]; + signum = fatal_signals[tabidx]; old_action_p = &(old_sigaction[signum]); - if (sigaction(signum, NULL, old_action_p)) + if (sigaction(signum, NULL, old_action_p)) { continue; + } /* Skip SIGHUP and SIGPIPE if handler is already installed * - assume the handler will do the cleanup */ - if ((signum == SIGHUP || signum == SIGPIPE) - && (old_action_p->sa_handler != SIG_DFL - || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) + if ((signum == SIGHUP || signum == SIGPIPE) && (old_action_p->sa_handler != SIG_DFL || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) { continue; + } new_action = *old_action_p; new_action.sa_flags |= SA_SIGINFO; @@ -338,23 +296,26 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) } } -SDL_EVDEV_keyboard_state * -SDL_EVDEV_kbd_init(void) +SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void) { SDL_EVDEV_keyboard_state *kbd; - int i; char flag_state; - char shift_state[ sizeof (long) ] = {TIOCL_GETSHIFTSTATE, 0}; + char kbtype; + char shift_state[sizeof(long)] = { TIOCL_GETSHIFTSTATE, 0 }; kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(*kbd)); - if (!kbd) { + if (kbd == NULL) { return NULL; } - kbd->npadch = -1; - /* This might fail if we're not connected to a tty (e.g. on the Steam Link) */ kbd->console_fd = open("/dev/tty", O_RDONLY | O_CLOEXEC); + if (!((ioctl(kbd->console_fd, KDGKBTYPE, &kbtype) == 0) && ((kbtype == KB_101) || (kbtype == KB_84)))) { + close(kbd->console_fd); + kbd->console_fd = -1; + } + + kbd->npadch = -1; if (ioctl(kbd->console_fd, TIOCLINUX, shift_state) == 0) { kbd->shift_state = *shift_state; @@ -365,79 +326,57 @@ SDL_EVDEV_kbd_init(void) } kbd->accents = &default_accents; - if (ioctl(kbd->console_fd, KDGKBDIACR, kbd->accents) < 0) { - /* No worries, we'll use the default accent table */ - } - kbd->key_maps = default_key_maps; + if (ioctl(kbd->console_fd, KDGKBMODE, &kbd->old_kbd_mode) == 0) { /* Set the keyboard in UNICODE mode and load the keymaps */ ioctl(kbd->console_fd, KDSKBMODE, K_UNICODE); + } - if (SDL_EVDEV_kbd_load_keymaps(kbd) < 0) { - for (i = 0; i < MAX_NR_KEYMAPS; ++i) { - if (kbd->key_maps[i]) { - SDL_free(kbd->key_maps[i]); - } - } - SDL_free(kbd->key_maps); - - kbd->key_maps = default_key_maps; - } + /* Allow inhibiting keyboard mute with env. variable for debugging etc. */ + if (SDL_getenv("SDL_INPUT_LINUX_KEEP_KBD") == NULL) { + /* Mute the keyboard so keystrokes only generate evdev events + * and do not leak through to the console + */ + ioctl(kbd->console_fd, KDSKBMODE, K_OFF); - /* Allow inhibiting keyboard mute with env. variable for debugging etc. */ - if (SDL_getenv("SDL_INPUT_LINUX_KEEP_KBD") == NULL) { - /* Mute the keyboard so keystrokes only generate evdev events - * and do not leak through to the console - */ - ioctl(kbd->console_fd, KDSKBMODE, K_OFF); - - /* Make sure to restore keyboard if application fails to call - * SDL_Quit before exit or fatal signal is raised. - */ - if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, SDL_FALSE)) { - kbd_register_emerg_cleanup(kbd); - } + /* Make sure to restore keyboard if application fails to call + * SDL_Quit before exit or fatal signal is raised. + */ + if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, SDL_FALSE)) { + kbd_register_emerg_cleanup(kbd); } } - -#ifdef DUMP_ACCENTS - SDL_EVDEV_dump_accents(kbd); -#endif -#ifdef DUMP_KEYMAP - SDL_EVDEV_dump_keymap(kbd); -#endif return kbd; } -void -SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) +void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state) { - if (!kbd) { + if (state == NULL) { return; } kbd_unregister_emerg_cleanup(); - if (kbd->console_fd >= 0) { + if (state->console_fd >= 0) { /* Restore the original keyboard mode */ - ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode); + ioctl(state->console_fd, KDSKBMODE, state->old_kbd_mode); - close(kbd->console_fd); - kbd->console_fd = -1; + close(state->console_fd); + state->console_fd = -1; } - if (kbd->key_maps && kbd->key_maps != default_key_maps) { + if (state->key_maps && state->key_maps != default_key_maps) { int i; for (i = 0; i < MAX_NR_KEYMAPS; ++i) { - if (kbd->key_maps[i]) { - SDL_free(kbd->key_maps[i]); + if (state->key_maps[i]) { + SDL_free(state->key_maps[i]); } } - SDL_free(kbd->key_maps); + SDL_free(state->key_maps); } - SDL_free(kbd); + SDL_free(state); } /* @@ -446,25 +385,26 @@ SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd) static void put_queue(SDL_EVDEV_keyboard_state *kbd, uint c) { /* c is already part of a UTF-8 sequence and safe to add as a character */ - if (kbd->text_len < (sizeof(kbd->text)-1)) { + if (kbd->text_len < (sizeof(kbd->text) - 1)) { kbd->text[kbd->text_len++] = (char)c; } } static void put_utf8(SDL_EVDEV_keyboard_state *kbd, uint c) { - if (c < 0x80) - /* 0******* */ - put_queue(kbd, c); - else if (c < 0x800) { + if (c < 0x80) { + put_queue(kbd, c); /* 0******* */ + } else if (c < 0x800) { /* 110***** 10****** */ put_queue(kbd, 0xc0 | (c >> 6)); put_queue(kbd, 0x80 | (c & 0x3f)); } else if (c < 0x10000) { - if (c >= 0xD800 && c < 0xE000) + if (c >= 0xD800 && c < 0xE000) { return; - if (c == 0xFFFF) + } + if (c == 0xFFFF) { return; + } /* 1110**** 10****** 10****** */ put_queue(kbd, 0xe0 | (c >> 12)); put_queue(kbd, 0x80 | ((c >> 6) & 0x3f)); @@ -492,6 +432,11 @@ static unsigned int handle_diacr(SDL_EVDEV_keyboard_state *kbd, unsigned int ch) kbd->diacr = 0; + if (kbd->console_fd >= 0) + if (ioctl(kbd->console_fd, KDGKBDIACR, kbd->accents) < 0) { + /* No worries, we'll use the default accent table */ + } + for (i = 0; i < kbd->accents->kb_cnt; i++) { if (kbd->accents->kbdiacr[i].diacr == d && kbd->accents->kbdiacr[i].base == ch) { @@ -499,8 +444,9 @@ static unsigned int handle_diacr(SDL_EVDEV_keyboard_state *kbd, unsigned int ch) } } - if (ch == ' ' || ch == d) + if (ch == ' ' || ch == d) { return d; + } put_utf8(kbd, d); @@ -554,24 +500,27 @@ static void fn_enter(SDL_EVDEV_keyboard_state *kbd) static void fn_caps_toggle(SDL_EVDEV_keyboard_state *kbd) { - if (kbd->rep) + if (kbd->rep) { return; + } chg_vc_kbd_led(kbd, K_CAPSLOCK); } static void fn_caps_on(SDL_EVDEV_keyboard_state *kbd) { - if (kbd->rep) + if (kbd->rep) { return; + } set_vc_kbd_led(kbd, K_CAPSLOCK); } static void fn_num(SDL_EVDEV_keyboard_state *kbd) { - if (!kbd->rep) + if (!kbd->rep) { chg_vc_kbd_led(kbd, K_NUMLOCK); + } } static void fn_compose(SDL_EVDEV_keyboard_state *kbd) @@ -589,12 +538,15 @@ static void k_ignore(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up static void k_spec(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) { - if (up_flag) + if (up_flag) { return; - if (value >= SDL_arraysize(fn_handler)) + } + if (value >= SDL_arraysize(fn_handler)) { return; - if (fn_handler[value]) + } + if (fn_handler[value]) { fn_handler[value](kbd); + } } static void k_lowercase(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) @@ -603,11 +555,13 @@ static void k_lowercase(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char static void k_self(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) { - if (up_flag) - return; /* no action, if this is a key release */ + if (up_flag) { + return; /* no action, if this is a key release */ + } - if (kbd->diacr) + if (kbd->diacr) { value = handle_diacr(kbd, value); + } if (kbd->dead_key_next) { kbd->dead_key_next = SDL_FALSE; @@ -619,15 +573,16 @@ static void k_self(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_f static void k_deadunicode(SDL_EVDEV_keyboard_state *kbd, unsigned int value, char up_flag) { - if (up_flag) + if (up_flag) { return; + } kbd->diacr = (kbd->diacr ? handle_diacr(kbd, value) : value); } static void k_dead(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) { - const unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; + const unsigned char ret_diacr[NR_DEAD] = { '`', '\'', '^', '~', '"', ',' }; k_deadunicode(kbd, ret_diacr[value], up_flag); } @@ -653,8 +608,9 @@ static void k_pad(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_fl { static const char pad_chars[] = "0123456789+-*/\015,.?()#"; - if (up_flag) - return; /* no action, if this is a key release */ + if (up_flag) { + return; /* no action, if this is a key release */ + } if (!vc_kbd_led(kbd, K_NUMLOCK)) { /* unprintable action */ @@ -668,16 +624,18 @@ static void k_shift(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ { int old_state = kbd->shift_state; - if (kbd->rep) + if (kbd->rep) { return; + } /* * Mimic typewriter: * a CapsShift key acts like Shift but undoes CapsLock */ if (value == KVAL(K_CAPSSHIFT)) { value = KVAL(K_SHIFT); - if (!up_flag) + if (!up_flag) { clr_vc_kbd_led(kbd, K_CAPSLOCK); + } } if (up_flag) { @@ -685,15 +643,18 @@ static void k_shift(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ * handle the case that two shift or control * keys are depressed simultaneously */ - if (kbd->shift_down[value]) + if (kbd->shift_down[value]) { kbd->shift_down[value]--; - } else + } + } else { kbd->shift_down[value]++; + } - if (kbd->shift_down[value]) + if (kbd->shift_down[value]) { kbd->shift_state |= (1 << value); - else + } else { kbd->shift_state &= ~(1 << value); + } /* kludge */ if (up_flag && kbd->shift_state != old_state && kbd->npadch != -1) { @@ -710,8 +671,9 @@ static void k_ascii(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ { int base; - if (up_flag) + if (up_flag) { return; + } if (value < 10) { /* decimal input of code, while Alt depressed */ @@ -722,16 +684,18 @@ static void k_ascii(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_ base = 16; } - if (kbd->npadch == -1) + if (kbd->npadch == -1) { kbd->npadch = value; - else + } else { kbd->npadch = kbd->npadch * base + value; + } } static void k_lock(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) { - if (up_flag || kbd->rep) + if (up_flag || kbd->rep) { return; + } chg_vc_kbd_lock(kbd, value); } @@ -739,8 +703,9 @@ static void k_lock(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_f static void k_slock(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag) { k_shift(kbd, value, up_flag); - if (up_flag || kbd->rep) + if (up_flag || kbd->rep) { return; + } chg_vc_kbd_slock(kbd, value); /* try to make Alt, oops, AltGr and such work */ @@ -754,32 +719,41 @@ static void k_brl(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_fl { } -void -SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int down) +void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down) { unsigned char shift_final; unsigned char type; unsigned short *key_map; unsigned short keysym; - if (!kbd) { + if (state == NULL) { return; } - kbd->rep = (down == 2); + state->rep = (down == 2); - shift_final = (kbd->shift_state | kbd->slockstate) ^ kbd->lockstate; - key_map = kbd->key_maps[shift_final]; - if (!key_map) { + shift_final = (state->shift_state | state->slockstate) ^ state->lockstate; + key_map = state->key_maps[shift_final]; + if (key_map == NULL) { /* Unsupported shift state (e.g. ctrl = 4, alt = 8), just reset to the default state */ - kbd->shift_state = 0; - kbd->slockstate = 0; - kbd->lockstate = 0; + state->shift_state = 0; + state->slockstate = 0; + state->lockstate = 0; return; } if (keycode < NR_KEYS) { - keysym = key_map[keycode]; + if (state->console_fd < 0) { + keysym = key_map[keycode]; + } else { + struct kbentry kbe; + kbe.kb_table = shift_final; + kbe.kb_index = keycode; + if (ioctl(state->console_fd, KDGKBENT, &kbe) == 0) + keysym = (kbe.kb_value ^ 0xf000); + else + return; + } } else { return; } @@ -788,7 +762,7 @@ SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int d if (type < 0xf0) { if (down) { - put_utf8(kbd, keysym); + put_utf8(state, keysym); } } else { type -= 0xf0; @@ -797,43 +771,49 @@ SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode, int d if (type == KT_LETTER) { type = KT_LATIN; - if (vc_kbd_led(kbd, K_CAPSLOCK)) { - key_map = kbd->key_maps[shift_final ^ (1 << KG_SHIFT)]; + if (vc_kbd_led(state, K_CAPSLOCK)) { + shift_final = shift_final ^ (1 << KG_SHIFT); + key_map = state->key_maps[shift_final]; if (key_map) { - keysym = key_map[keycode]; + if (state->console_fd < 0) { + keysym = key_map[keycode]; + } else { + struct kbentry kbe; + kbe.kb_table = shift_final; + kbe.kb_index = keycode; + if (ioctl(state->console_fd, KDGKBENT, &kbe) == 0) + keysym = (kbe.kb_value ^ 0xf000); + } } } } - (*k_handler[type])(kbd, keysym & 0xff, !down); + (*k_handler[type])(state, keysym & 0xff, !down); if (type != KT_SLOCK) { - kbd->slockstate = 0; + state->slockstate = 0; } } - if (kbd->text_len > 0) { - kbd->text[kbd->text_len] = '\0'; - SDL_SendKeyboardText(kbd->text); - kbd->text_len = 0; + if (state->text_len > 0) { + state->text[state->text_len] = '\0'; + SDL_SendKeyboardText(state->text); + state->text_len = 0; } } #elif !defined(SDL_INPUT_FBSDKBIO) /* !SDL_INPUT_LINUXKD */ -SDL_EVDEV_keyboard_state * -SDL_EVDEV_kbd_init(void) +SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void) { return NULL; } -void -SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down) +void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down) { } -void -SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state) +void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state) { } diff --git a/modules/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h b/modules/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h index 54d0495..04e7127 100644 --- a/modules/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h +++ b/modules/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h @@ -19,6 +19,8 @@ 3. This notice may not be removed or altered from any source distribution. */ +/* *INDENT-OFF* */ /* clang-format off */ + static unsigned short default_key_map_0[NR_KEYS] = { 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009, @@ -4374,6 +4376,8 @@ static unsigned short default_key_map_127[NR_KEYS] = { }; #endif /* INCLUDE_EXTENDED_KEYMAP */ +/* *INDENT-ON* */ /* clang-format on */ + static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = { default_key_map_0, default_key_map_1, @@ -4504,7 +4508,7 @@ static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = { default_key_map_125, default_key_map_126, default_key_map_127, -#else /* !INCLUDE_EXTENDED_KEYMAP */ +#else /* !INCLUDE_EXTENDED_KEYMAP */ NULL, NULL, NULL, diff --git a/modules/SDL2/src/core/linux/SDL_fcitx.c b/modules/SDL2/src/core/linux/SDL_fcitx.c index d34cc23..5f76a62 100644 --- a/modules/SDL2/src/core/linux/SDL_fcitx.c +++ b/modules/SDL2/src/core/linux/SDL_fcitx.c @@ -55,8 +55,7 @@ typedef struct _FcitxClient static FcitxClient fcitx_client; -static char* -GetAppName() +static char *GetAppName() { #if defined(__LINUX__) || defined(__FREEBSD__) char *spot; @@ -65,9 +64,9 @@ GetAppName() int linksize; #if defined(__LINUX__) - SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/exe", getpid()); + (void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/exe", getpid()); #elif defined(__FREEBSD__) - SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/file", getpid()); + (void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/file", getpid()); #endif linksize = readlink(procfile, linkfile, sizeof(linkfile) - 1); if (linksize > 0) { @@ -84,12 +83,11 @@ GetAppName() return SDL_strdup("SDL_App"); } -static size_t -Fcitx_GetPreeditString(SDL_DBusContext *dbus, - DBusMessage *msg, - char **ret, - Sint32 *start_pos, - Sint32 *end_pos) +static size_t Fcitx_GetPreeditString(SDL_DBusContext *dbus, + DBusMessage *msg, + char **ret, + Sint32 *start_pos, + Sint32 *end_pos) { char *text = NULL, *subtext; size_t text_bytes = 0; @@ -141,7 +139,7 @@ Fcitx_GetPreeditString(SDL_DBusContext *dbus, } if (text) { - char* pivot = text; + char *pivot = text; /* Second pass: join all the sub string */ dbus->message_iter_recurse(&iter, &array); while (dbus->message_iter_get_arg_type(&array) == DBUS_TYPE_STRUCT) { @@ -167,8 +165,7 @@ Fcitx_GetPreeditString(SDL_DBusContext *dbus, return text_bytes; } -static Sint32 -Fcitx_GetPreeditCursorByte(SDL_DBusContext *dbus, DBusMessage *msg) +static Sint32 Fcitx_GetPreeditCursorByte(SDL_DBusContext *dbus, DBusMessage *msg) { Sint32 byte = -1; DBusMessageIter iter; @@ -186,8 +183,7 @@ Fcitx_GetPreeditCursorByte(SDL_DBusContext *dbus, DBusMessage *msg) return byte; } -static DBusHandlerResult -DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data) +static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data) { SDL_DBusContext *dbus = (SDL_DBusContext *)data; @@ -203,7 +199,7 @@ DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data) size_t text_bytes = SDL_strlen(text), i = 0; while (i < text_bytes) { - size_t sz = SDL_utf8strlcpy(buf, text+i, sizeof(buf)); + size_t sz = SDL_utf8strlcpy(buf, text + i, sizeof(buf)); SDL_SendKeyboardText(buf); i += sz; @@ -250,8 +246,7 @@ DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -static void -FcitxClientICCallMethod(FcitxClient *client, const char *method) +static void FcitxClientICCallMethod(FcitxClient *client, const char *method) { if (!client->ic_path) { return; @@ -259,11 +254,10 @@ FcitxClientICCallMethod(FcitxClient *client, const char *method) SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, client->ic_path, FCITX_IC_DBUS_INTERFACE, method, DBUS_TYPE_INVALID); } -static void SDLCALL -Fcitx_SetCapabilities(void *data, - const char *name, - const char *old_val, - const char *internal_editing) +static void SDLCALL Fcitx_SetCapabilities(void *data, + const char *name, + const char *old_val, + const char *internal_editing) { FcitxClient *client = (FcitxClient *)data; Uint64 caps = 0; @@ -279,11 +273,12 @@ Fcitx_SetCapabilities(void *data, SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, client->ic_path, FCITX_IC_DBUS_INTERFACE, "SetCapability", DBUS_TYPE_UINT64, &caps, DBUS_TYPE_INVALID); } -static SDL_bool -FcitxCreateInputContext(SDL_DBusContext* dbus, const char *appname, char **ic_path) { +static SDL_bool FcitxCreateInputContext(SDL_DBusContext *dbus, const char *appname, char **ic_path) +{ const char *program = "program"; SDL_bool retval = SDL_FALSE; - if (dbus->session_conn) { + + if (dbus && dbus->session_conn) { DBusMessage *msg = dbus->message_new_method_call(FCITX_DBUS_SERVICE, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, "CreateInputContext"); if (msg) { DBusMessage *reply = NULL; @@ -308,8 +303,7 @@ FcitxCreateInputContext(SDL_DBusContext* dbus, const char *appname, char **ic_pa return retval; } -static SDL_bool -FcitxClientCreateIC(FcitxClient *client) +static SDL_bool FcitxClientCreateIC(FcitxClient *client) { char *appname = GetAppName(); char *ic_path = NULL; @@ -317,7 +311,7 @@ FcitxClientCreateIC(FcitxClient *client) /* SDL_DBus_CallMethod cannot handle a(ss) type, call dbus function directly */ if (!FcitxCreateInputContext(dbus, appname, &ic_path)) { - ic_path = NULL; /* just in case. */ + ic_path = NULL; /* just in case. */ } SDL_free(appname); @@ -327,11 +321,11 @@ FcitxClientCreateIC(FcitxClient *client) client->ic_path = SDL_strdup(ic_path); dbus->bus_add_match(dbus->session_conn, - "type='signal', interface='org.fcitx.Fcitx.InputContext1'", - NULL); + "type='signal', interface='org.fcitx.Fcitx.InputContext1'", + NULL); dbus->connection_add_filter(dbus->session_conn, - &DBus_MessageFilter, dbus, - NULL); + &DBus_MessageFilter, dbus, + NULL); dbus->connection_flush(dbus->session_conn); SDL_AddHintCallback(SDL_HINT_IME_INTERNAL_EDITING, Fcitx_SetCapabilities, client); @@ -341,26 +335,40 @@ FcitxClientCreateIC(FcitxClient *client) return SDL_FALSE; } -static Uint32 -Fcitx_ModState(void) +static Uint32 Fcitx_ModState(void) { Uint32 fcitx_mods = 0; SDL_Keymod sdl_mods = SDL_GetModState(); - if (sdl_mods & KMOD_SHIFT) fcitx_mods |= (1 << 0); - if (sdl_mods & KMOD_CAPS) fcitx_mods |= (1 << 1); - if (sdl_mods & KMOD_CTRL) fcitx_mods |= (1 << 2); - if (sdl_mods & KMOD_ALT) fcitx_mods |= (1 << 3); - if (sdl_mods & KMOD_NUM) fcitx_mods |= (1 << 4); - if (sdl_mods & KMOD_MODE) fcitx_mods |= (1 << 7); - if (sdl_mods & KMOD_LGUI) fcitx_mods |= (1 << 6); - if (sdl_mods & KMOD_RGUI) fcitx_mods |= (1 << 28); + if (sdl_mods & KMOD_SHIFT) { + fcitx_mods |= (1 << 0); + } + if (sdl_mods & KMOD_CAPS) { + fcitx_mods |= (1 << 1); + } + if (sdl_mods & KMOD_CTRL) { + fcitx_mods |= (1 << 2); + } + if (sdl_mods & KMOD_ALT) { + fcitx_mods |= (1 << 3); + } + if (sdl_mods & KMOD_NUM) { + fcitx_mods |= (1 << 4); + } + if (sdl_mods & KMOD_MODE) { + fcitx_mods |= (1 << 7); + } + if (sdl_mods & KMOD_LGUI) { + fcitx_mods |= (1 << 6); + } + if (sdl_mods & KMOD_RGUI) { + fcitx_mods |= (1 << 28); + } return fcitx_mods; } -SDL_bool -SDL_Fcitx_Init() +SDL_bool SDL_Fcitx_Init() { fcitx_client.dbus = SDL_DBus_GetContext(); @@ -372,8 +380,7 @@ SDL_Fcitx_Init() return FcitxClientCreateIC(&fcitx_client); } -void -SDL_Fcitx_Quit() +void SDL_Fcitx_Quit() { FcitxClientICCallMethod(&fcitx_client, "DestroyIC"); if (fcitx_client.ic_path) { @@ -382,8 +389,7 @@ SDL_Fcitx_Quit() } } -void -SDL_Fcitx_SetFocus(SDL_bool focused) +void SDL_Fcitx_SetFocus(SDL_bool focused) { if (focused) { FcitxClientICCallMethod(&fcitx_client, "FocusIn"); @@ -392,15 +398,12 @@ SDL_Fcitx_SetFocus(SDL_bool focused) } } -void -SDL_Fcitx_Reset(void) +void SDL_Fcitx_Reset(void) { FcitxClientICCallMethod(&fcitx_client, "Reset"); - FcitxClientICCallMethod(&fcitx_client, "CloseIC"); } -SDL_bool -SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) +SDL_bool SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) { Uint32 mod_state = Fcitx_ModState(); Uint32 handled = SDL_FALSE; @@ -412,8 +415,8 @@ SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) } if (SDL_DBus_CallMethod(FCITX_DBUS_SERVICE, fcitx_client.ic_path, FCITX_IC_DBUS_INTERFACE, "ProcessKeyEvent", - DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &keycode, DBUS_TYPE_UINT32, &mod_state, DBUS_TYPE_BOOLEAN, &is_release, DBUS_TYPE_UINT32, &event_time, DBUS_TYPE_INVALID, - DBUS_TYPE_BOOLEAN, &handled, DBUS_TYPE_INVALID)) { + DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &keycode, DBUS_TYPE_UINT32, &mod_state, DBUS_TYPE_BOOLEAN, &is_release, DBUS_TYPE_UINT32, &event_time, DBUS_TYPE_INVALID, + DBUS_TYPE_BOOLEAN, &handled, DBUS_TYPE_INVALID)) { if (handled) { SDL_Fcitx_UpdateTextRect(NULL); return SDL_TRUE; @@ -423,8 +426,7 @@ SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) return SDL_FALSE; } -void -SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect) +void SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect) { SDL_Window *focused_win = NULL; SDL_SysWMinfo info; @@ -436,8 +438,8 @@ SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect) } focused_win = SDL_GetKeyboardFocus(); - if (!focused_win) { - return ; + if (focused_win == NULL) { + return; } SDL_VERSION(&info.version); @@ -471,11 +473,10 @@ SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect) y += cursor->y; SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, fcitx_client.ic_path, FCITX_IC_DBUS_INTERFACE, "SetCursorRect", - DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &cursor->w, DBUS_TYPE_INT32, &cursor->h, DBUS_TYPE_INVALID); + DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &cursor->w, DBUS_TYPE_INT32, &cursor->h, DBUS_TYPE_INVALID); } -void -SDL_Fcitx_PumpEvents(void) +void SDL_Fcitx_PumpEvents(void) { SDL_DBusContext *dbus = fcitx_client.dbus; DBusConnection *conn = dbus->session_conn; diff --git a/modules/SDL2/src/core/linux/SDL_ibus.c b/modules/SDL2/src/core/linux/SDL_ibus.c index ed774a1..4241cd4 100644 --- a/modules/SDL2/src/core/linux/SDL_ibus.c +++ b/modules/SDL2/src/core/linux/SDL_ibus.c @@ -37,14 +37,14 @@ #include #include -static const char IBUS_PATH[] = "/org/freedesktop/IBus"; +static const char IBUS_PATH[] = "/org/freedesktop/IBus"; -static const char IBUS_SERVICE[] = "org.freedesktop.IBus"; -static const char IBUS_INTERFACE[] = "org.freedesktop.IBus"; +static const char IBUS_SERVICE[] = "org.freedesktop.IBus"; +static const char IBUS_INTERFACE[] = "org.freedesktop.IBus"; static const char IBUS_INPUT_INTERFACE[] = "org.freedesktop.IBus.InputContext"; -static const char IBUS_PORTAL_SERVICE[] = "org.freedesktop.portal.IBus"; -static const char IBUS_PORTAL_INTERFACE[] = "org.freedesktop.IBus.Portal"; +static const char IBUS_PORTAL_SERVICE[] = "org.freedesktop.portal.IBus"; +static const char IBUS_PORTAL_INTERFACE[] = "org.freedesktop.IBus.Portal"; static const char IBUS_PORTAL_INPUT_INTERFACE[] = "org.freedesktop.IBus.InputContext"; static const char *ibus_service = NULL; @@ -57,29 +57,42 @@ static SDL_bool ibus_is_portal_interface = SDL_FALSE; static char *ibus_addr_file = NULL; static int inotify_fd = -1, inotify_wd = -1; - -static Uint32 -IBus_ModState(void) +static Uint32 IBus_ModState(void) { Uint32 ibus_mods = 0; SDL_Keymod sdl_mods = SDL_GetModState(); - + /* Not sure about MOD3, MOD4 and HYPER mappings */ - if (sdl_mods & KMOD_LSHIFT) ibus_mods |= IBUS_SHIFT_MASK; - if (sdl_mods & KMOD_CAPS) ibus_mods |= IBUS_LOCK_MASK; - if (sdl_mods & KMOD_LCTRL) ibus_mods |= IBUS_CONTROL_MASK; - if (sdl_mods & KMOD_LALT) ibus_mods |= IBUS_MOD1_MASK; - if (sdl_mods & KMOD_NUM) ibus_mods |= IBUS_MOD2_MASK; - if (sdl_mods & KMOD_MODE) ibus_mods |= IBUS_MOD5_MASK; - if (sdl_mods & KMOD_LGUI) ibus_mods |= IBUS_SUPER_MASK; - if (sdl_mods & KMOD_RGUI) ibus_mods |= IBUS_META_MASK; + if (sdl_mods & KMOD_LSHIFT) { + ibus_mods |= IBUS_SHIFT_MASK; + } + if (sdl_mods & KMOD_CAPS) { + ibus_mods |= IBUS_LOCK_MASK; + } + if (sdl_mods & KMOD_LCTRL) { + ibus_mods |= IBUS_CONTROL_MASK; + } + if (sdl_mods & KMOD_LALT) { + ibus_mods |= IBUS_MOD1_MASK; + } + if (sdl_mods & KMOD_NUM) { + ibus_mods |= IBUS_MOD2_MASK; + } + if (sdl_mods & KMOD_MODE) { + ibus_mods |= IBUS_MOD5_MASK; + } + if (sdl_mods & KMOD_LGUI) { + ibus_mods |= IBUS_SUPER_MASK; + } + if (sdl_mods & KMOD_RGUI) { + ibus_mods |= IBUS_META_MASK; + } return ibus_mods; } -static SDL_bool -IBus_EnterVariant(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, - DBusMessageIter *inside, const char * struct_id, size_t id_size) +static SDL_bool IBus_EnterVariant(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, + DBusMessageIter *inside, const char *struct_id, size_t id_size) { DBusMessageIter sub; if (dbus->message_iter_get_arg_type(iter) != DBUS_TYPE_VARIANT) { @@ -99,15 +112,14 @@ IBus_EnterVariant(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext * } dbus->message_iter_get_basic(inside, &struct_id); - if (!struct_id || SDL_strncmp(struct_id, struct_id, id_size) != 0) { + if (struct_id == NULL || SDL_strncmp(struct_id, struct_id, id_size) != 0) { return SDL_FALSE; } return SDL_TRUE; } -static SDL_bool -IBus_GetDecorationPosition(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, - Uint32 *start_pos, Uint32 *end_pos) +static SDL_bool IBus_GetDecorationPosition(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, + Uint32 *start_pos, Uint32 *end_pos) { DBusMessageIter sub1, sub2, array; @@ -170,8 +182,7 @@ IBus_GetDecorationPosition(DBusConnection *conn, DBusMessageIter *iter, SDL_DBus return SDL_FALSE; } -static const char * -IBus_GetVariantText(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus) +static const char *IBus_GetVariantText(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus) { /* The text we need is nested weirdly, use dbus-monitor to see the structure better */ const char *text = NULL; @@ -192,9 +203,8 @@ IBus_GetVariantText(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext return text; } -static SDL_bool -IBus_GetVariantCursorPos(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, - Uint32 *pos) +static SDL_bool IBus_GetVariantCursorPos(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus, + Uint32 *pos) { dbus->message_iter_next(iter); @@ -207,8 +217,7 @@ IBus_GetVariantCursorPos(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusCo return SDL_TRUE; } -static DBusHandlerResult -IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) +static DBusHandlerResult IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) { SDL_DBusContext *dbus = (SDL_DBusContext *)user_data; @@ -224,7 +233,7 @@ IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) size_t text_bytes = SDL_strlen(text), i = 0; while (i < text_bytes) { - size_t sz = SDL_utf8strlcpy(buf, text+i, sizeof(buf)); + size_t sz = SDL_utf8strlcpy(buf, text + i, sizeof(buf)); SDL_SendKeyboardText(buf); i += sz; @@ -249,13 +258,12 @@ IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) dbus->message_iter_init(msg, &iter); has_dec_pos = IBus_GetDecorationPosition(conn, &iter, dbus, &start_pos, &end_pos); - if (!has_dec_pos) - { + if (!has_dec_pos) { dbus->message_iter_init(msg, &iter); has_pos = IBus_GetVariantCursorPos(conn, &iter, dbus, &pos); } - if(has_dec_pos) { + if (has_dec_pos) { SDL_SendEditingText(text, start_pos, end_pos - start_pos); } else if (has_pos) { SDL_SendEditingText(text, pos, -1); @@ -268,7 +276,7 @@ IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) size_t cursor = 0; do { - const size_t sz = SDL_utf8strlcpy(buf, text+i, sizeof(buf)); + const size_t sz = SDL_utf8strlcpy(buf, text + i, sizeof(buf)); const size_t chars = SDL_utf8strlen(buf); SDL_SendEditingText(buf, cursor, chars); @@ -291,29 +299,32 @@ IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -static char * -IBus_ReadAddressFromFile(const char *file_path) +static char *IBus_ReadAddressFromFile(const char *file_path) { char addr_buf[1024]; SDL_bool success = SDL_FALSE; FILE *addr_file; addr_file = fopen(file_path, "r"); - if (!addr_file) { + if (addr_file == NULL) { return NULL; } while (fgets(addr_buf, sizeof(addr_buf), addr_file)) { - if (SDL_strncmp(addr_buf, "IBUS_ADDRESS=", sizeof("IBUS_ADDRESS=")-1) == 0) { + if (SDL_strncmp(addr_buf, "IBUS_ADDRESS=", sizeof("IBUS_ADDRESS=") - 1) == 0) { size_t sz = SDL_strlen(addr_buf); - if (addr_buf[sz-1] == '\n') addr_buf[sz-1] = 0; - if (addr_buf[sz-2] == '\r') addr_buf[sz-2] = 0; + if (addr_buf[sz - 1] == '\n') { + addr_buf[sz - 1] = 0; + } + if (addr_buf[sz - 2] == '\r') { + addr_buf[sz - 2] = 0; + } success = SDL_TRUE; break; } } - fclose(addr_file); + (void)fclose(addr_file); if (success) { return SDL_strdup(addr_buf + (sizeof("IBUS_ADDRESS=") - 1)); @@ -322,8 +333,7 @@ IBus_ReadAddressFromFile(const char *file_path) } } -static char * -IBus_GetDBusAddressFilename(void) +static char *IBus_GetDBusAddressFilename(void) { SDL_DBusContext *dbus; const char *disp_env; @@ -339,44 +349,44 @@ IBus_GetDBusAddressFilename(void) if (ibus_addr_file) { return SDL_strdup(ibus_addr_file); } - + dbus = SDL_DBus_GetContext(); - if (!dbus) { + if (dbus == NULL) { return NULL; } - + /* Use this environment variable if it exists. */ addr = SDL_getenv("IBUS_ADDRESS"); if (addr && *addr) { return SDL_strdup(addr); } - + /* Otherwise, we have to get the hostname, display, machine id, config dir and look up the address from a filepath using all those bits, eek. */ disp_env = SDL_getenv("DISPLAY"); - if (!disp_env || !*disp_env) { + if (disp_env == NULL || !*disp_env) { display = SDL_strdup(":0.0"); } else { display = SDL_strdup(disp_env); } - + host = display; - disp_num = SDL_strrchr(display, ':'); + disp_num = SDL_strrchr(display, ':'); screen_num = SDL_strrchr(display, '.'); - - if (!disp_num) { + + if (disp_num == NULL) { SDL_free(display); return NULL; } - + *disp_num = 0; disp_num++; - + if (screen_num) { *screen_num = 0; } - + if (!*host) { const char *session = SDL_getenv("XDG_SESSION_TYPE"); if (session != NULL && SDL_strcmp(session, "wayland") == 0) { @@ -385,40 +395,44 @@ IBus_GetDBusAddressFilename(void) host = "unix"; } } - + SDL_memset(config_dir, 0, sizeof(config_dir)); - + conf_env = SDL_getenv("XDG_CONFIG_HOME"); if (conf_env && *conf_env) { SDL_strlcpy(config_dir, conf_env, sizeof(config_dir)); } else { const char *home_env = SDL_getenv("HOME"); - if (!home_env || !*home_env) { + if (home_env == NULL || !*home_env) { SDL_free(display); return NULL; } - SDL_snprintf(config_dir, sizeof(config_dir), "%s/.config", home_env); + (void)SDL_snprintf(config_dir, sizeof(config_dir), "%s/.config", home_env); + } + + key = SDL_DBus_GetLocalMachineId(); + + if (key == NULL) { + SDL_free(display); + return NULL; } - - key = dbus->get_local_machine_id(); SDL_memset(file_path, 0, sizeof(file_path)); - SDL_snprintf(file_path, sizeof(file_path), "%s/ibus/bus/%s-%s-%s", - config_dir, key, host, disp_num); + (void)SDL_snprintf(file_path, sizeof(file_path), "%s/ibus/bus/%s-%s-%s", + config_dir, key, host, disp_num); dbus->free(key); SDL_free(display); - + return SDL_strdup(file_path); } static SDL_bool IBus_CheckConnection(SDL_DBusContext *dbus); -static void SDLCALL -IBus_SetCapabilities(void *data, const char *name, const char *old_val, - const char *internal_editing) +static void SDLCALL IBus_SetCapabilities(void *data, const char *name, const char *old_val, + const char *internal_editing) { SDL_DBusContext *dbus = SDL_DBus_GetContext(); - + if (IBus_CheckConnection(dbus)) { Uint32 caps = IBUS_CAP_FOCUS; if (!(internal_editing && *internal_editing == '1')) { @@ -426,19 +440,17 @@ IBus_SetCapabilities(void *data, const char *name, const char *old_val, } SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "SetCapabilities", - DBUS_TYPE_UINT32, &caps, DBUS_TYPE_INVALID); + DBUS_TYPE_UINT32, &caps, DBUS_TYPE_INVALID); } } - -static SDL_bool -IBus_SetupConnection(SDL_DBusContext *dbus, const char* addr) +static SDL_bool IBus_SetupConnection(SDL_DBusContext *dbus, const char *addr) { const char *client_name = "SDL2_Application"; const char *path = NULL; SDL_bool result = SDL_FALSE; DBusObjectPathVTable ibus_vtable; - + SDL_zero(ibus_vtable); ibus_vtable.message_function = &IBus_MessageHandler; @@ -461,17 +473,17 @@ IBus_SetupConnection(SDL_DBusContext *dbus, const char* addr) ibus_input_interface = IBUS_INPUT_INTERFACE; ibus_conn = dbus->connection_open_private(addr, NULL); - if (!ibus_conn) { - return SDL_FALSE; /* oh well. */ + if (ibus_conn == NULL) { + return SDL_FALSE; /* oh well. */ } dbus->connection_flush(ibus_conn); - + if (!dbus->bus_register(ibus_conn, NULL)) { ibus_conn = NULL; return SDL_FALSE; } - + dbus->connection_flush(ibus_conn); result = SDL_DBus_CallMethodOnConnection(ibus_conn, ibus_service, IBUS_PATH, ibus_interface, "CreateInputContext", @@ -484,7 +496,7 @@ IBus_SetupConnection(SDL_DBusContext *dbus, const char* addr) if (result) { char matchstr[128]; - SDL_snprintf(matchstr, sizeof (matchstr), "type='signal',interface='%s'", ibus_input_interface); + (void)SDL_snprintf(matchstr, sizeof(matchstr), "type='signal',interface='%s'", ibus_input_interface); SDL_free(input_ctx_path); input_ctx_path = SDL_strdup(path); SDL_AddHintCallback(SDL_HINT_IME_INTERNAL_EDITING, IBus_SetCapabilities, NULL); @@ -495,42 +507,45 @@ IBus_SetupConnection(SDL_DBusContext *dbus, const char* addr) SDL_IBus_SetFocus(SDL_GetKeyboardFocus() != NULL); SDL_IBus_UpdateTextRect(NULL); - + return result; } -static SDL_bool -IBus_CheckConnection(SDL_DBusContext *dbus) +static SDL_bool IBus_CheckConnection(SDL_DBusContext *dbus) { - if (!dbus) return SDL_FALSE; - + if (dbus == NULL) { + return SDL_FALSE; + } + if (ibus_conn && dbus->connection_get_is_connected(ibus_conn)) { return SDL_TRUE; } - + if (inotify_fd > 0 && inotify_wd > 0) { char buf[1024]; ssize_t readsize = read(inotify_fd, buf, sizeof(buf)); if (readsize > 0) { - + char *p; SDL_bool file_updated = SDL_FALSE; - + for (p = buf; p < buf + readsize; /**/) { - struct inotify_event *event = (struct inotify_event*) p; + struct inotify_event *event = (struct inotify_event *)p; if (event->len > 0) { char *addr_file_no_path = SDL_strrchr(ibus_addr_file, '/'); - if (!addr_file_no_path) return SDL_FALSE; - + if (addr_file_no_path == NULL) { + return SDL_FALSE; + } + if (SDL_strcmp(addr_file_no_path + 1, event->name) == 0) { file_updated = SDL_TRUE; break; } } - + p += sizeof(struct inotify_event) + event->len; } - + if (file_updated) { char *addr = IBus_ReadAddressFromFile(ibus_addr_file); if (addr) { @@ -541,47 +556,46 @@ IBus_CheckConnection(SDL_DBusContext *dbus) } } } - + return SDL_FALSE; } -SDL_bool -SDL_IBus_Init(void) +SDL_bool SDL_IBus_Init(void) { SDL_bool result = SDL_FALSE; SDL_DBusContext *dbus = SDL_DBus_GetContext(); - + if (dbus) { char *addr_file = IBus_GetDBusAddressFilename(); char *addr; char *addr_file_dir; - if (!addr_file) { + if (addr_file == NULL) { return SDL_FALSE; } - + /* !!! FIXME: if ibus_addr_file != NULL, this will overwrite it and leak (twice!) */ ibus_addr_file = SDL_strdup(addr_file); - + addr = IBus_ReadAddressFromFile(addr_file); - if (!addr) { + if (addr == NULL) { SDL_free(addr_file); return SDL_FALSE; } - + if (inotify_fd < 0) { inotify_fd = inotify_init(); fcntl(inotify_fd, F_SETFL, O_NONBLOCK); } - + addr_file_dir = SDL_strrchr(addr_file, '/'); if (addr_file_dir) { *addr_file_dir = 0; } - + inotify_wd = inotify_add_watch(inotify_fd, addr_file, IN_CREATE | IN_MODIFY); SDL_free(addr_file); - + result = IBus_SetupConnection(dbus, addr); SDL_free(addr); @@ -597,27 +611,26 @@ SDL_IBus_Init(void) } } } - + return result; } -void -SDL_IBus_Quit(void) -{ +void SDL_IBus_Quit(void) +{ SDL_DBusContext *dbus; if (input_ctx_path) { SDL_free(input_ctx_path); input_ctx_path = NULL; } - + if (ibus_addr_file) { SDL_free(ibus_addr_file); ibus_addr_file = NULL; } - + dbus = SDL_DBus_GetContext(); - + /* if using portal, ibus_conn == session_conn; don't release it here. */ if (dbus && ibus_conn && !ibus_is_portal_interface) { dbus->connection_close(ibus_conn); @@ -638,40 +651,35 @@ SDL_IBus_Quit(void) /* !!! FIXME: should we close(inotify_fd) here? */ SDL_DelHintCallback(SDL_HINT_IME_INTERNAL_EDITING, IBus_SetCapabilities, NULL); - + SDL_memset(&ibus_cursor_rect, 0, sizeof(ibus_cursor_rect)); } -static void -IBus_SimpleMessage(const char *method) -{ +static void IBus_SimpleMessage(const char *method) +{ SDL_DBusContext *dbus = SDL_DBus_GetContext(); - + if ((input_ctx_path != NULL) && (IBus_CheckConnection(dbus))) { SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, method, DBUS_TYPE_INVALID); } } -void -SDL_IBus_SetFocus(SDL_bool focused) -{ +void SDL_IBus_SetFocus(SDL_bool focused) +{ const char *method = focused ? "FocusIn" : "FocusOut"; IBus_SimpleMessage(method); } -void -SDL_IBus_Reset(void) +void SDL_IBus_Reset(void) { IBus_SimpleMessage("Reset"); } -SDL_bool -SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) -{ +SDL_bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) +{ Uint32 result = 0; SDL_DBusContext *dbus = SDL_DBus_GetContext(); - if (IBus_CheckConnection(dbus)) { Uint32 mods = IBus_ModState(); Uint32 ibus_keycode = keycode - 8; @@ -679,19 +687,18 @@ SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) mods |= (1 << 30); // IBUS_RELEASE_MASK } if (!SDL_DBus_CallMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "ProcessKeyEvent", - DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &ibus_keycode, DBUS_TYPE_UINT32, &mods, DBUS_TYPE_INVALID, - DBUS_TYPE_BOOLEAN, &result, DBUS_TYPE_INVALID)) { + DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &ibus_keycode, DBUS_TYPE_UINT32, &mods, DBUS_TYPE_INVALID, + DBUS_TYPE_BOOLEAN, &result, DBUS_TYPE_INVALID)) { result = 0; } } - + SDL_IBus_UpdateTextRect(NULL); return result ? SDL_TRUE : SDL_FALSE; } -void -SDL_IBus_UpdateTextRect(const SDL_Rect *rect) +void SDL_IBus_UpdateTextRect(const SDL_Rect *rect) { SDL_Window *focused_win; SDL_SysWMinfo info; @@ -703,7 +710,7 @@ SDL_IBus_UpdateTextRect(const SDL_Rect *rect) } focused_win = SDL_GetKeyboardFocus(); - if (!focused_win) { + if (focused_win == NULL) { return; } @@ -713,39 +720,38 @@ SDL_IBus_UpdateTextRect(const SDL_Rect *rect) } SDL_GetWindowPosition(focused_win, &x, &y); - -#if SDL_VIDEO_DRIVER_X11 + +#if SDL_VIDEO_DRIVER_X11 if (info.subsystem == SDL_SYSWM_X11) { SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(focused_win)->driverdata; - + Display *x_disp = info.info.x11.display; Window x_win = info.info.x11.window; int x_screen = displaydata->screen; Window unused; - + X11_XTranslateCoordinates(x_disp, x_win, RootWindow(x_disp, x_screen), 0, 0, &x, &y, &unused); } #endif x += ibus_cursor_rect.x; y += ibus_cursor_rect.y; - + dbus = SDL_DBus_GetContext(); - + if (IBus_CheckConnection(dbus)) { SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "SetCursorLocation", - DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &ibus_cursor_rect.w, DBUS_TYPE_INT32, &ibus_cursor_rect.h, DBUS_TYPE_INVALID); + DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &ibus_cursor_rect.w, DBUS_TYPE_INT32, &ibus_cursor_rect.h, DBUS_TYPE_INVALID); } } -void -SDL_IBus_PumpEvents(void) +void SDL_IBus_PumpEvents(void) { SDL_DBusContext *dbus = SDL_DBus_GetContext(); - + if (IBus_CheckConnection(dbus)) { dbus->connection_read_write(ibus_conn, 0); - + while (dbus->connection_dispatch(ibus_conn) == DBUS_DISPATCH_DATA_REMAINS) { /* Do nothing, actual work happens in IBus_MessageHandler */ } diff --git a/modules/SDL2/src/core/linux/SDL_ibus.h b/modules/SDL2/src/core/linux/SDL_ibus.h index efb3dc1..da00741 100644 --- a/modules/SDL2/src/core/linux/SDL_ibus.h +++ b/modules/SDL2/src/core/linux/SDL_ibus.h @@ -43,11 +43,11 @@ extern void SDL_IBus_Reset(void); called some time after this, to receive the TextInput / TextEditing event back. */ extern SDL_bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state); -/* Update the position of IBus' candidate list. If rect is NULL then this will +/* Update the position of IBus' candidate list. If rect is NULL then this will just reposition it relative to the focused window's new position. */ extern void SDL_IBus_UpdateTextRect(const SDL_Rect *window_relative_rect); -/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText / +/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText / SDL_SendEditingText for each event it finds */ extern void SDL_IBus_PumpEvents(void); diff --git a/modules/SDL2/src/core/linux/SDL_ime.c b/modules/SDL2/src/core/linux/SDL_ime.c index 00db003..f40e83c 100644 --- a/modules/SDL2/src/core/linux/SDL_ime.c +++ b/modules/SDL2/src/core/linux/SDL_ime.c @@ -40,8 +40,7 @@ static _SDL_IME_ProcessKeyEvent SDL_IME_ProcessKeyEvent_Real = NULL; static _SDL_IME_UpdateTextRect SDL_IME_UpdateTextRect_Real = NULL; static _SDL_IME_PumpEvents SDL_IME_PumpEvents_Real = NULL; -static void -InitIME() +static void InitIME() { static SDL_bool inited = SDL_FALSE; #ifdef HAVE_FCITX @@ -49,16 +48,17 @@ InitIME() const char *xmodifiers = SDL_getenv("XMODIFIERS"); #endif - if (inited == SDL_TRUE) + if (inited == SDL_TRUE) { return; + } inited = SDL_TRUE; /* See if fcitx IME support is being requested */ #ifdef HAVE_FCITX - if (!SDL_IME_Init_Real && + if (SDL_IME_Init_Real == NULL && ((im_module && SDL_strcmp(im_module, "fcitx") == 0) || - (!im_module && xmodifiers && SDL_strstr(xmodifiers, "@im=fcitx") != NULL))) { + (im_module == NULL && xmodifiers && SDL_strstr(xmodifiers, "@im=fcitx") != NULL))) { SDL_IME_Init_Real = SDL_Fcitx_Init; SDL_IME_Quit_Real = SDL_Fcitx_Quit; SDL_IME_SetFocus_Real = SDL_Fcitx_SetFocus; @@ -71,7 +71,7 @@ InitIME() /* default to IBus */ #ifdef HAVE_IBUS_IBUS_H - if (!SDL_IME_Init_Real) { + if (SDL_IME_Init_Real == NULL) { SDL_IME_Init_Real = SDL_IBus_Init; SDL_IME_Quit_Real = SDL_IBus_Quit; SDL_IME_SetFocus_Real = SDL_IBus_SetFocus; @@ -83,8 +83,7 @@ InitIME() #endif /* HAVE_IBUS_IBUS_H */ } -SDL_bool -SDL_IME_Init(void) +SDL_bool SDL_IME_Init(void) { InitIME(); @@ -106,48 +105,48 @@ SDL_IME_Init(void) return SDL_FALSE; } -void -SDL_IME_Quit(void) +void SDL_IME_Quit(void) { - if (SDL_IME_Quit_Real) + if (SDL_IME_Quit_Real) { SDL_IME_Quit_Real(); + } } -void -SDL_IME_SetFocus(SDL_bool focused) +void SDL_IME_SetFocus(SDL_bool focused) { - if (SDL_IME_SetFocus_Real) + if (SDL_IME_SetFocus_Real) { SDL_IME_SetFocus_Real(focused); + } } -void -SDL_IME_Reset(void) +void SDL_IME_Reset(void) { - if (SDL_IME_Reset_Real) + if (SDL_IME_Reset_Real) { SDL_IME_Reset_Real(); + } } -SDL_bool -SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) +SDL_bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state) { - if (SDL_IME_ProcessKeyEvent_Real) + if (SDL_IME_ProcessKeyEvent_Real) { return SDL_IME_ProcessKeyEvent_Real(keysym, keycode, state); + } return SDL_FALSE; } -void -SDL_IME_UpdateTextRect(const SDL_Rect *rect) +void SDL_IME_UpdateTextRect(const SDL_Rect *rect) { - if (SDL_IME_UpdateTextRect_Real) + if (SDL_IME_UpdateTextRect_Real) { SDL_IME_UpdateTextRect_Real(rect); + } } -void -SDL_IME_PumpEvents() +void SDL_IME_PumpEvents() { - if (SDL_IME_PumpEvents_Real) + if (SDL_IME_PumpEvents_Real) { SDL_IME_PumpEvents_Real(); + } } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/core/linux/SDL_sandbox.c b/modules/SDL2/src/core/linux/SDL_sandbox.c index 7fb38a4..1539031 100644 --- a/modules/SDL2/src/core/linux/SDL_sandbox.c +++ b/modules/SDL2/src/core/linux/SDL_sandbox.c @@ -33,13 +33,11 @@ SDL_Sandbox SDL_DetectSandbox(void) /* For Snap, we check multiple variables because they might be set for * unrelated reasons. This is the same thing WebKitGTK does. */ - if (SDL_getenv("SNAP") != NULL - && SDL_getenv("SNAP_NAME") != NULL - && SDL_getenv("SNAP_REVISION") != NULL) { + if (SDL_getenv("SNAP") != NULL && SDL_getenv("SNAP_NAME") != NULL && SDL_getenv("SNAP_REVISION") != NULL) { return SDL_SANDBOX_SNAP; } - if (access("/run/host/container-runtime", F_OK) == 0) { + if (access("/run/host/container-manager", F_OK) == 0) { return SDL_SANDBOX_UNKNOWN_CONTAINER; } diff --git a/modules/SDL2/src/core/linux/SDL_threadprio.c b/modules/SDL2/src/core/linux/SDL_threadprio.c index 941d513..57406c6 100644 --- a/modules/SDL2/src/core/linux/SDL_threadprio.c +++ b/modules/SDL2/src/core/linux/SDL_threadprio.c @@ -48,16 +48,16 @@ #include /* d-bus queries to org.freedesktop.RealtimeKit1. */ -#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1" -#define RTKIT_DBUS_PATH "/org/freedesktop/RealtimeKit1" +#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1" +#define RTKIT_DBUS_PATH "/org/freedesktop/RealtimeKit1" #define RTKIT_DBUS_INTERFACE "org.freedesktop.RealtimeKit1" /* d-bus queries to the XDG portal interface to RealtimeKit1 */ -#define XDG_PORTAL_DBUS_NODE "org.freedesktop.portal.Desktop" -#define XDG_PORTAL_DBUS_PATH "/org/freedesktop/portal/desktop" +#define XDG_PORTAL_DBUS_NODE "org.freedesktop.portal.Desktop" +#define XDG_PORTAL_DBUS_PATH "/org/freedesktop/portal/desktop" #define XDG_PORTAL_DBUS_INTERFACE "org.freedesktop.portal.Realtime" -static SDL_bool rtkit_use_session_conn; +static SDL_bool rtkit_use_session_conn; static const char *rtkit_dbus_node; static const char *rtkit_dbus_path; static const char *rtkit_dbus_interface; @@ -72,16 +72,14 @@ static Sint64 rtkit_max_rttime_usec = 200000; * - The desktop portal exists and supports the realtime interface. * - The realtime interface is new enough to have the required bug fixes applied. */ -static SDL_bool -realtime_portal_supported(DBusConnection *conn) +static SDL_bool realtime_portal_supported(DBusConnection *conn) { Sint64 res; return SDL_DBus_QueryPropertyOnConnection(conn, XDG_PORTAL_DBUS_NODE, XDG_PORTAL_DBUS_PATH, XDG_PORTAL_DBUS_INTERFACE, "RTTimeUSecMax", DBUS_TYPE_INT64, &res); } -static void -set_rtkit_interface() +static void set_rtkit_interface() { SDL_DBusContext *dbus = SDL_DBus_GetContext(); @@ -99,8 +97,7 @@ set_rtkit_interface() } } -static DBusConnection* -get_rtkit_dbus_connection() +static DBusConnection *get_rtkit_dbus_connection() { SDL_DBusContext *dbus = SDL_DBus_GetContext(); @@ -111,8 +108,7 @@ get_rtkit_dbus_connection() return NULL; } -static void -rtkit_initialize() +static void rtkit_initialize() { DBusConnection *dbus_conn; @@ -120,26 +116,25 @@ rtkit_initialize() dbus_conn = get_rtkit_dbus_connection(); /* Try getting minimum nice level: this is often greater than PRIO_MIN (-20). */ - if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MinNiceLevel", - DBUS_TYPE_INT32, &rtkit_min_nice_level)) { + if (dbus_conn == NULL || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MinNiceLevel", + DBUS_TYPE_INT32, &rtkit_min_nice_level)) { rtkit_min_nice_level = -20; } /* Try getting maximum realtime priority: this can be less than the POSIX default (99). */ - if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MaxRealtimePriority", - DBUS_TYPE_INT32, &rtkit_max_realtime_priority)) { + if (dbus_conn == NULL || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MaxRealtimePriority", + DBUS_TYPE_INT32, &rtkit_max_realtime_priority)) { rtkit_max_realtime_priority = 99; } /* Try getting maximum rttime allowed by rtkit: exceeding this value will result in SIGKILL */ - if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "RTTimeUSecMax", - DBUS_TYPE_INT64, &rtkit_max_rttime_usec)) { + if (dbus_conn == NULL || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "RTTimeUSecMax", + DBUS_TYPE_INT64, &rtkit_max_rttime_usec)) { rtkit_max_rttime_usec = 200000; } } -static SDL_bool -rtkit_initialize_realtime_thread() +static SDL_bool rtkit_initialize_realtime_thread() { // Following is an excerpt from rtkit README that outlines the requirements // a thread must meet before making rtkit requests: @@ -164,7 +159,7 @@ rtkit_initialize_realtime_thread() int err; struct rlimit rlimit; int nLimit = RLIMIT_RTTIME; - pid_t nPid = 0; //self + pid_t nPid = 0; // self int nSchedPolicy = sched_getscheduler(nPid) | SCHED_RESET_ON_FORK; struct sched_param schedParam; @@ -172,8 +167,7 @@ rtkit_initialize_realtime_thread() // Requirement #1: Set RLIMIT_RTTIME err = getrlimit(nLimit, &rlimit); - if (err) - { + if (err) { return SDL_FALSE; } @@ -181,29 +175,25 @@ rtkit_initialize_realtime_thread() rlimit.rlim_max = rtkit_max_rttime_usec; rlimit.rlim_cur = rlimit.rlim_max / 2; err = setrlimit(nLimit, &rlimit); - if (err) - { + if (err) { return SDL_FALSE; } // Requirement #2: Add SCHED_RESET_ON_FORK to the scheduler policy err = sched_getparam(nPid, &schedParam); - if (err) - { + if (err) { return SDL_FALSE; } err = sched_setscheduler(nPid, nSchedPolicy, &schedParam); - if (err) - { + if (err) { return SDL_FALSE; } return SDL_TRUE; } -static SDL_bool -rtkit_setpriority_nice(pid_t thread, int nice_level) +static SDL_bool rtkit_setpriority_nice(pid_t thread, int nice_level) { DBusConnection *dbus_conn; Uint64 pid = (Uint64)getpid(); @@ -213,20 +203,20 @@ rtkit_setpriority_nice(pid_t thread, int nice_level) pthread_once(&rtkit_initialize_once, rtkit_initialize); dbus_conn = get_rtkit_dbus_connection(); - if (nice < rtkit_min_nice_level) + if (nice < rtkit_min_nice_level) { nice = rtkit_min_nice_level; + } - if (!dbus_conn || !SDL_DBus_CallMethodOnConnection(dbus_conn, - rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadHighPriorityWithPID", - DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_INT32, &nice, DBUS_TYPE_INVALID, - DBUS_TYPE_INVALID)) { + if (dbus_conn == NULL || !SDL_DBus_CallMethodOnConnection(dbus_conn, + rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadHighPriorityWithPID", + DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_INT32, &nice, DBUS_TYPE_INVALID, + DBUS_TYPE_INVALID)) { return SDL_FALSE; } return SDL_TRUE; } -static SDL_bool -rtkit_setpriority_realtime(pid_t thread, int rt_priority) +static SDL_bool rtkit_setpriority_realtime(pid_t thread, int rt_priority) { DBusConnection *dbus_conn; Uint64 pid = (Uint64)getpid(); @@ -236,8 +226,9 @@ rtkit_setpriority_realtime(pid_t thread, int rt_priority) pthread_once(&rtkit_initialize_once, rtkit_initialize); dbus_conn = get_rtkit_dbus_connection(); - if (priority > rtkit_max_realtime_priority) + if (priority > rtkit_max_realtime_priority) { priority = rtkit_max_realtime_priority; + } // We always perform the thread state changes necessary for rtkit. // This wastes some system calls if the state is already set but @@ -247,10 +238,10 @@ rtkit_setpriority_realtime(pid_t thread, int rt_priority) // go through to determine whether it really needs to fail or not. rtkit_initialize_realtime_thread(); - if (!dbus_conn || !SDL_DBus_CallMethodOnConnection(dbus_conn, - rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadRealtimeWithPID", - DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_UINT32, &priority, DBUS_TYPE_INVALID, - DBUS_TYPE_INVALID)) { + if (dbus_conn == NULL || !SDL_DBus_CallMethodOnConnection(dbus_conn, + rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadRealtimeWithPID", + DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_UINT32, &priority, DBUS_TYPE_INVALID, + DBUS_TYPE_INVALID)) { return SDL_FALSE; } return SDL_TRUE; @@ -263,8 +254,7 @@ rtkit_setpriority_realtime(pid_t thread, int rt_priority) #endif /* threads */ /* this is a public symbol, so it has to exist even if threads are disabled. */ -int -SDL_LinuxSetThreadPriority(Sint64 threadID, int priority) +int SDL_LinuxSetThreadPriority(Sint64 threadID, int priority) { #if SDL_THREADS_DISABLED return SDL_Unsupported(); @@ -296,8 +286,7 @@ SDL_LinuxSetThreadPriority(Sint64 threadID, int priority) } /* this is a public symbol, so it has to exist even if threads are disabled. */ -int -SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy) +int SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy) { #if SDL_THREADS_DISABLED return SDL_Unsupported(); @@ -358,6 +347,6 @@ SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedP #endif } -#endif /* __LINUX__ */ +#endif /* __LINUX__ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/core/linux/SDL_udev.c b/modules/SDL2/src/core/linux/SDL_udev.c index 8a50184..39368c7 100644 --- a/modules/SDL2/src/core/linux/SDL_udev.c +++ b/modules/SDL2/src/core/linux/SDL_udev.c @@ -49,8 +49,7 @@ static int SDL_UDEV_load_syms(void); static SDL_bool SDL_UDEV_hotplug_update_available(void); static void device_event(SDL_UDEV_deviceevent type, struct udev_device *dev); -static SDL_bool -SDL_UDEV_load_sym(const char *fn, void **addr) +static SDL_bool SDL_UDEV_load_sym(const char *fn, void **addr) { *addr = SDL_LoadFunction(_this->udev_handle, fn); if (*addr == NULL) { @@ -61,12 +60,12 @@ SDL_UDEV_load_sym(const char *fn, void **addr) return SDL_TRUE; } -static int -SDL_UDEV_load_syms(void) +static int SDL_UDEV_load_syms(void) { - /* cast funcs to char* first, to please GCC's strict aliasing rules. */ - #define SDL_UDEV_SYM(x) \ - if (!SDL_UDEV_load_sym(#x, (void **) (char *) & _this->syms.x)) return -1 +/* cast funcs to char* first, to please GCC's strict aliasing rules. */ +#define SDL_UDEV_SYM(x) \ + if (!SDL_UDEV_load_sym(#x, (void **)(char *)&_this->syms.x)) \ + return -1 SDL_UDEV_SYM(udev_device_get_action); SDL_UDEV_SYM(udev_device_get_devnode); @@ -94,13 +93,12 @@ SDL_UDEV_load_syms(void) SDL_UDEV_SYM(udev_unref); SDL_UDEV_SYM(udev_device_new_from_devnum); SDL_UDEV_SYM(udev_device_get_devnum); - #undef SDL_UDEV_SYM +#undef SDL_UDEV_SYM return 0; } -static SDL_bool -SDL_UDEV_hotplug_update_available(void) +static SDL_bool SDL_UDEV_hotplug_update_available(void) { if (_this->udev_mon != NULL) { const int fd = _this->syms.udev_monitor_get_fd(_this->udev_mon); @@ -111,15 +109,13 @@ SDL_UDEV_hotplug_update_available(void) return SDL_FALSE; } - -int -SDL_UDEV_Init(void) +int SDL_UDEV_Init(void) { int retval = 0; if (_this == NULL) { - _this = (SDL_UDEV_PrivateData *) SDL_calloc(1, sizeof(*_this)); - if(_this == NULL) { + _this = (SDL_UDEV_PrivateData *)SDL_calloc(1, sizeof(*_this)); + if (_this == NULL) { return SDL_OutOfMemory(); } @@ -151,7 +147,6 @@ SDL_UDEV_Init(void) /* Do an initial scan of existing devices */ SDL_UDEV_Scan(); - } _this->ref_count += 1; @@ -159,8 +154,7 @@ SDL_UDEV_Init(void) return retval; } -void -SDL_UDEV_Quit(void) +void SDL_UDEV_Quit(void) { SDL_UDEV_CallbackList *item; @@ -194,8 +188,7 @@ SDL_UDEV_Quit(void) } } -void -SDL_UDEV_Scan(void) +void SDL_UDEV_Scan(void) { struct udev_enumerate *enumerate = NULL; struct udev_list_entry *devs = NULL; @@ -229,8 +222,7 @@ SDL_UDEV_Scan(void) _this->syms.udev_enumerate_unref(enumerate); } -SDL_bool -SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version) +SDL_bool SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version) { struct udev_enumerate *enumerate = NULL; struct udev_list_entry *devs = NULL; @@ -283,11 +275,7 @@ SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product return found; } - - - -void -SDL_UDEV_UnloadLibrary(void) +void SDL_UDEV_UnloadLibrary(void) { if (_this == NULL) { return; @@ -299,8 +287,7 @@ SDL_UDEV_UnloadLibrary(void) } } -int -SDL_UDEV_LoadLibrary(void) +int SDL_UDEV_LoadLibrary(void) { int retval = 0, i; @@ -327,14 +314,13 @@ SDL_UDEV_LoadLibrary(void) #endif if (_this->udev_handle == NULL) { - for( i = 0 ; i < SDL_arraysize(SDL_UDEV_LIBS); i++) { + for (i = 0; i < SDL_arraysize(SDL_UDEV_LIBS); i++) { _this->udev_handle = SDL_LoadObject(SDL_UDEV_LIBS[i]); if (_this->udev_handle != NULL) { retval = SDL_UDEV_load_syms(); if (retval < 0) { SDL_UDEV_UnloadLibrary(); - } - else { + } else { break; } } @@ -357,16 +343,16 @@ static void get_caps(struct udev_device *dev, struct udev_device *pdev, const ch int i; unsigned long v; - SDL_memset(bitmask, 0, bitmask_len*sizeof(*bitmask)); + SDL_memset(bitmask, 0, bitmask_len * sizeof(*bitmask)); value = _this->syms.udev_device_get_sysattr_value(pdev, attr); - if (!value) { + if (value == NULL) { return; } SDL_strlcpy(text, value, sizeof(text)); i = 0; while ((word = SDL_strrchr(text, ' ')) != NULL) { - v = SDL_strtoul(word+1, NULL, 16); + v = SDL_strtoul(word + 1, NULL, 16); if (i < bitmask_len) { bitmask[i] = v; } @@ -379,8 +365,7 @@ static void get_caps(struct udev_device *dev, struct udev_device *pdev, const ch } } -static int -guess_device_class(struct udev_device *dev) +static int guess_device_class(struct udev_device *dev) { struct udev_device *pdev; unsigned long bitmask_ev[NBITS(EV_MAX)]; @@ -394,7 +379,7 @@ guess_device_class(struct udev_device *dev) while (pdev && !_this->syms.udev_device_get_sysattr_value(pdev, "capabilities/ev")) { pdev = _this->syms.udev_device_get_parent_with_subsystem_devtype(pdev, "input", NULL); } - if (!pdev) { + if (pdev == NULL) { return 0; } @@ -409,8 +394,7 @@ guess_device_class(struct udev_device *dev) &bitmask_rel[0]); } -static void -device_event(SDL_UDEV_deviceevent type, struct udev_device *dev) +static void device_event(SDL_UDEV_deviceevent type, struct udev_device *dev) { const char *subsystem; const char *val = NULL; @@ -430,23 +414,23 @@ device_event(SDL_UDEV_deviceevent type, struct udev_device *dev) /* udev rules reference: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c */ val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_JOYSTICK"); - if (val != NULL && SDL_strcmp(val, "1") == 0 ) { + if (val != NULL && SDL_strcmp(val, "1") == 0) { devclass |= SDL_UDEV_DEVICE_JOYSTICK; } val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_ACCELEROMETER"); if (SDL_GetHintBoolean(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_TRUE) && - val != NULL && SDL_strcmp(val, "1") == 0 ) { + val != NULL && SDL_strcmp(val, "1") == 0) { devclass |= SDL_UDEV_DEVICE_JOYSTICK; } val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_MOUSE"); - if (val != NULL && SDL_strcmp(val, "1") == 0 ) { + if (val != NULL && SDL_strcmp(val, "1") == 0) { devclass |= SDL_UDEV_DEVICE_MOUSE; } val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_TOUCHSCREEN"); - if (val != NULL && SDL_strcmp(val, "1") == 0 ) { + if (val != NULL && SDL_strcmp(val, "1") == 0) { devclass |= SDL_UDEV_DEVICE_TOUCHSCREEN; } @@ -457,7 +441,7 @@ device_event(SDL_UDEV_deviceevent type, struct udev_device *dev) Ref: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c#n183 */ val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_KEY"); - if (val != NULL && SDL_strcmp(val, "1") == 0 ) { + if (val != NULL && SDL_strcmp(val, "1") == 0) { devclass |= SDL_UDEV_DEVICE_KEYBOARD; } @@ -489,8 +473,7 @@ device_event(SDL_UDEV_deviceevent type, struct udev_device *dev) } } -void -SDL_UDEV_Poll(void) +void SDL_UDEV_Poll(void) { struct udev_device *dev = NULL; const char *action = NULL; @@ -518,11 +501,10 @@ SDL_UDEV_Poll(void) } } -int -SDL_UDEV_AddCallback(SDL_UDEV_Callback cb) +int SDL_UDEV_AddCallback(SDL_UDEV_Callback cb) { SDL_UDEV_CallbackList *item; - item = (SDL_UDEV_CallbackList *) SDL_calloc(1, sizeof (SDL_UDEV_CallbackList)); + item = (SDL_UDEV_CallbackList *)SDL_calloc(1, sizeof(SDL_UDEV_CallbackList)); if (item == NULL) { return SDL_OutOfMemory(); } @@ -539,8 +521,7 @@ SDL_UDEV_AddCallback(SDL_UDEV_Callback cb) return 1; } -void -SDL_UDEV_DelCallback(SDL_UDEV_Callback cb) +void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb) { SDL_UDEV_CallbackList *item; SDL_UDEV_CallbackList *prev = NULL; @@ -568,8 +549,7 @@ SDL_UDEV_DelCallback(SDL_UDEV_Callback cb) } } -const SDL_UDEV_Symbols * -SDL_UDEV_GetUdevSyms(void) +const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void) { if (SDL_UDEV_Init() < 0) { SDL_SetError("Could not initialize UDEV"); @@ -579,8 +559,7 @@ SDL_UDEV_GetUdevSyms(void) return &_this->syms; } -void -SDL_UDEV_ReleaseUdevSyms(void) +void SDL_UDEV_ReleaseUdevSyms(void) { SDL_UDEV_Quit(); } diff --git a/modules/SDL2/src/core/linux/SDL_udev.h b/modules/SDL2/src/core/linux/SDL_udev.h index a3dd8ed..b8920b7 100644 --- a/modules/SDL2/src/core/linux/SDL_udev.h +++ b/modules/SDL2/src/core/linux/SDL_udev.h @@ -48,12 +48,14 @@ typedef enum typedef void (*SDL_UDEV_Callback)(SDL_UDEV_deviceevent udev_type, int udev_class, const char *devpath); -typedef struct SDL_UDEV_CallbackList { +typedef struct SDL_UDEV_CallbackList +{ SDL_UDEV_Callback callback; struct SDL_UDEV_CallbackList *next; } SDL_UDEV_CallbackList; -typedef struct SDL_UDEV_Symbols { +typedef struct SDL_UDEV_Symbols +{ const char *(*udev_device_get_action)(struct udev_device *); const char *(*udev_device_get_devnode)(struct udev_device *); const char *(*udev_device_get_subsystem)(struct udev_device *); @@ -78,8 +80,8 @@ typedef struct SDL_UDEV_Symbols { void (*udev_monitor_unref)(struct udev_monitor *); struct udev *(*udev_new)(void); void (*udev_unref)(struct udev *); - struct udev_device * (*udev_device_new_from_devnum)(struct udev *udev, char type, dev_t devnum); - dev_t (*udev_device_get_devnum) (struct udev_device *udev_device); + struct udev_device *(*udev_device_new_from_devnum)(struct udev *udev, char type, dev_t devnum); + dev_t (*udev_device_get_devnum)(struct udev_device *udev_device); } SDL_UDEV_Symbols; typedef struct SDL_UDEV_PrivateData @@ -90,7 +92,7 @@ typedef struct SDL_UDEV_PrivateData struct udev_monitor *udev_mon; int ref_count; SDL_UDEV_CallbackList *first, *last; - + /* Function pointers */ SDL_UDEV_Symbols syms; } SDL_UDEV_PrivateData; @@ -107,7 +109,6 @@ extern void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb); extern const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void); extern void SDL_UDEV_ReleaseUdevSyms(void); - #endif /* HAVE_LIBUDEV_H && HAVE_LINUX_INPUT_H */ #endif /* SDL_udev_h_ */ diff --git a/modules/SDL2/src/core/openbsd/SDL_wscons.h b/modules/SDL2/src/core/openbsd/SDL_wscons.h index e8082d3..e53e574 100644 --- a/modules/SDL2/src/core/openbsd/SDL_wscons.h +++ b/modules/SDL2/src/core/openbsd/SDL_wscons.h @@ -19,9 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ - void SDL_WSCONS_Init(); void SDL_WSCONS_Quit(); void SDL_WSCONS_PumpEvents(); - diff --git a/modules/SDL2/src/core/openbsd/SDL_wscons_kbd.c b/modules/SDL2/src/core/openbsd/SDL_wscons_kbd.c index 27bb930..583c420 100644 --- a/modules/SDL2/src/core/openbsd/SDL_wscons_kbd.c +++ b/modules/SDL2/src/core/openbsd/SDL_wscons_kbd.c @@ -39,349 +39,358 @@ #include "../../events/SDL_events_c.h" #ifdef __NetBSD__ -#define KS_GROUP_Ascii KS_GROUP_Plain +#define KS_GROUP_Ascii KS_GROUP_Plain #define KS_Cmd_ScrollBack KS_Cmd_ScrollFastUp -#define KS_Cmd_ScrollFwd KS_Cmd_ScrollFastDown +#define KS_Cmd_ScrollFwd KS_Cmd_ScrollFastDown #endif -#define RETIFIOCTLERR(x) if (x == -1) { free(input); input = NULL; return NULL;} +#define RETIFIOCTLERR(x) \ + if (x == -1) { \ + free(input); \ + input = NULL; \ + return NULL; \ + } typedef struct SDL_WSCONS_mouse_input_data SDL_WSCONS_mouse_input_data; -extern SDL_WSCONS_mouse_input_data* SDL_WSCONS_Init_Mouse(); -extern void updateMouse(SDL_WSCONS_mouse_input_data* input); -extern void SDL_WSCONS_Quit_Mouse(SDL_WSCONS_mouse_input_data* input); +extern SDL_WSCONS_mouse_input_data *SDL_WSCONS_Init_Mouse(); +extern void updateMouse(SDL_WSCONS_mouse_input_data *input); +extern void SDL_WSCONS_Quit_Mouse(SDL_WSCONS_mouse_input_data *input); /* Conversion table courtesy of /usr/src/sys/dev/wscons/wskbdutil.c */ static const unsigned char latin1_to_upper[256] = { /* 0 8 1 9 2 a 3 b 4 c 5 d 6 e 7 f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 5 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 5 */ - 0x00, 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 6 */ - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 6 */ - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', /* 7 */ - 'X', 'Y', 'Z', 0x00, 0x00, 0x00, 0x00, 0x00, /* 7 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d */ - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* e */ - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* e */ - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x00, /* f */ - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x00, /* f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 5 */ + 0x00, 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 6 */ + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 6 */ + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', /* 7 */ + 'X', 'Y', 'Z', 0x00, 0x00, 0x00, 0x00, 0x00, /* 7 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d */ + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* e */ + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* e */ + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x00, /* f */ + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x00, /* f */ }; /* Compose table courtesy of /usr/src/sys/dev/wscons/wskbdutil.c */ -static struct SDL_wscons_compose_tab_s { +static struct SDL_wscons_compose_tab_s +{ keysym_t elem[2]; keysym_t result; } compose_tab[] = { - { { KS_plus, KS_plus }, KS_numbersign }, - { { KS_a, KS_a }, KS_at }, - { { KS_parenleft, KS_parenleft }, KS_bracketleft }, - { { KS_slash, KS_slash }, KS_backslash }, - { { KS_parenright, KS_parenright }, KS_bracketright }, - { { KS_parenleft, KS_minus }, KS_braceleft }, - { { KS_slash, KS_minus }, KS_bar }, - { { KS_parenright, KS_minus }, KS_braceright }, - { { KS_exclam, KS_exclam }, KS_exclamdown }, - { { KS_c, KS_slash }, KS_cent }, - { { KS_l, KS_minus }, KS_sterling }, - { { KS_y, KS_minus }, KS_yen }, - { { KS_s, KS_o }, KS_section }, - { { KS_x, KS_o }, KS_currency }, - { { KS_c, KS_o }, KS_copyright }, - { { KS_less, KS_less }, KS_guillemotleft }, - { { KS_greater, KS_greater }, KS_guillemotright }, - { { KS_question, KS_question }, KS_questiondown }, - { { KS_dead_acute, KS_space }, KS_apostrophe }, - { { KS_dead_grave, KS_space }, KS_grave }, - { { KS_dead_tilde, KS_space }, KS_asciitilde }, - { { KS_dead_circumflex, KS_space }, KS_asciicircum }, - { { KS_dead_diaeresis, KS_space }, KS_quotedbl }, - { { KS_dead_cedilla, KS_space }, KS_comma }, - { { KS_dead_circumflex, KS_A }, KS_Acircumflex }, - { { KS_dead_diaeresis, KS_A }, KS_Adiaeresis }, - { { KS_dead_grave, KS_A }, KS_Agrave }, - { { KS_dead_abovering, KS_A }, KS_Aring }, - { { KS_dead_tilde, KS_A }, KS_Atilde }, - { { KS_dead_cedilla, KS_C }, KS_Ccedilla }, - { { KS_dead_acute, KS_E }, KS_Eacute }, - { { KS_dead_circumflex, KS_E }, KS_Ecircumflex }, - { { KS_dead_diaeresis, KS_E }, KS_Ediaeresis }, - { { KS_dead_grave, KS_E }, KS_Egrave }, - { { KS_dead_acute, KS_I }, KS_Iacute }, - { { KS_dead_circumflex, KS_I }, KS_Icircumflex }, - { { KS_dead_diaeresis, KS_I }, KS_Idiaeresis }, - { { KS_dead_grave, KS_I }, KS_Igrave }, - { { KS_dead_tilde, KS_N }, KS_Ntilde }, - { { KS_dead_acute, KS_O }, KS_Oacute }, - { { KS_dead_circumflex, KS_O }, KS_Ocircumflex }, - { { KS_dead_diaeresis, KS_O }, KS_Odiaeresis }, - { { KS_dead_grave, KS_O }, KS_Ograve }, - { { KS_dead_tilde, KS_O }, KS_Otilde }, - { { KS_dead_acute, KS_U }, KS_Uacute }, - { { KS_dead_circumflex, KS_U }, KS_Ucircumflex }, - { { KS_dead_diaeresis, KS_U }, KS_Udiaeresis }, - { { KS_dead_grave, KS_U }, KS_Ugrave }, - { { KS_dead_acute, KS_Y }, KS_Yacute }, - { { KS_dead_acute, KS_a }, KS_aacute }, - { { KS_dead_circumflex, KS_a }, KS_acircumflex }, - { { KS_dead_diaeresis, KS_a }, KS_adiaeresis }, - { { KS_dead_grave, KS_a }, KS_agrave }, - { { KS_dead_abovering, KS_a }, KS_aring }, - { { KS_dead_tilde, KS_a }, KS_atilde }, - { { KS_dead_cedilla, KS_c }, KS_ccedilla }, - { { KS_dead_acute, KS_e }, KS_eacute }, - { { KS_dead_circumflex, KS_e }, KS_ecircumflex }, - { { KS_dead_diaeresis, KS_e }, KS_ediaeresis }, - { { KS_dead_grave, KS_e }, KS_egrave }, - { { KS_dead_acute, KS_i }, KS_iacute }, - { { KS_dead_circumflex, KS_i }, KS_icircumflex }, - { { KS_dead_diaeresis, KS_i }, KS_idiaeresis }, - { { KS_dead_grave, KS_i }, KS_igrave }, - { { KS_dead_tilde, KS_n }, KS_ntilde }, - { { KS_dead_acute, KS_o }, KS_oacute }, - { { KS_dead_circumflex, KS_o }, KS_ocircumflex }, - { { KS_dead_diaeresis, KS_o }, KS_odiaeresis }, - { { KS_dead_grave, KS_o }, KS_ograve }, - { { KS_dead_tilde, KS_o }, KS_otilde }, - { { KS_dead_acute, KS_u }, KS_uacute }, - { { KS_dead_circumflex, KS_u }, KS_ucircumflex }, - { { KS_dead_diaeresis, KS_u }, KS_udiaeresis }, - { { KS_dead_grave, KS_u }, KS_ugrave }, - { { KS_dead_acute, KS_y }, KS_yacute }, - { { KS_dead_diaeresis, KS_y }, KS_ydiaeresis }, - { { KS_quotedbl, KS_A }, KS_Adiaeresis }, - { { KS_quotedbl, KS_E }, KS_Ediaeresis }, - { { KS_quotedbl, KS_I }, KS_Idiaeresis }, - { { KS_quotedbl, KS_O }, KS_Odiaeresis }, - { { KS_quotedbl, KS_U }, KS_Udiaeresis }, - { { KS_quotedbl, KS_a }, KS_adiaeresis }, - { { KS_quotedbl, KS_e }, KS_ediaeresis }, - { { KS_quotedbl, KS_i }, KS_idiaeresis }, - { { KS_quotedbl, KS_o }, KS_odiaeresis }, - { { KS_quotedbl, KS_u }, KS_udiaeresis }, - { { KS_quotedbl, KS_y }, KS_ydiaeresis }, - { { KS_acute, KS_A }, KS_Aacute }, - { { KS_asciicircum, KS_A }, KS_Acircumflex }, - { { KS_grave, KS_A }, KS_Agrave }, - { { KS_asterisk, KS_A }, KS_Aring }, - { { KS_asciitilde, KS_A }, KS_Atilde }, - { { KS_cedilla, KS_C }, KS_Ccedilla }, - { { KS_acute, KS_E }, KS_Eacute }, - { { KS_asciicircum, KS_E }, KS_Ecircumflex }, - { { KS_grave, KS_E }, KS_Egrave }, - { { KS_acute, KS_I }, KS_Iacute }, - { { KS_asciicircum, KS_I }, KS_Icircumflex }, - { { KS_grave, KS_I }, KS_Igrave }, - { { KS_asciitilde, KS_N }, KS_Ntilde }, - { { KS_acute, KS_O }, KS_Oacute }, - { { KS_asciicircum, KS_O }, KS_Ocircumflex }, - { { KS_grave, KS_O }, KS_Ograve }, - { { KS_asciitilde, KS_O }, KS_Otilde }, - { { KS_acute, KS_U }, KS_Uacute }, - { { KS_asciicircum, KS_U }, KS_Ucircumflex }, - { { KS_grave, KS_U }, KS_Ugrave }, - { { KS_acute, KS_Y }, KS_Yacute }, - { { KS_acute, KS_a }, KS_aacute }, - { { KS_asciicircum, KS_a }, KS_acircumflex }, - { { KS_grave, KS_a }, KS_agrave }, - { { KS_asterisk, KS_a }, KS_aring }, - { { KS_asciitilde, KS_a }, KS_atilde }, - { { KS_cedilla, KS_c }, KS_ccedilla }, - { { KS_acute, KS_e }, KS_eacute }, - { { KS_asciicircum, KS_e }, KS_ecircumflex }, - { { KS_grave, KS_e }, KS_egrave }, - { { KS_acute, KS_i }, KS_iacute }, - { { KS_asciicircum, KS_i }, KS_icircumflex }, - { { KS_grave, KS_i }, KS_igrave }, - { { KS_asciitilde, KS_n }, KS_ntilde }, - { { KS_acute, KS_o }, KS_oacute }, - { { KS_asciicircum, KS_o }, KS_ocircumflex }, - { { KS_grave, KS_o }, KS_ograve }, - { { KS_asciitilde, KS_o }, KS_otilde }, - { { KS_acute, KS_u }, KS_uacute }, - { { KS_asciicircum, KS_u }, KS_ucircumflex }, - { { KS_grave, KS_u }, KS_ugrave }, - { { KS_acute, KS_y }, KS_yacute }, + { { KS_plus, KS_plus }, KS_numbersign }, + { { KS_a, KS_a }, KS_at }, + { { KS_parenleft, KS_parenleft }, KS_bracketleft }, + { { KS_slash, KS_slash }, KS_backslash }, + { { KS_parenright, KS_parenright }, KS_bracketright }, + { { KS_parenleft, KS_minus }, KS_braceleft }, + { { KS_slash, KS_minus }, KS_bar }, + { { KS_parenright, KS_minus }, KS_braceright }, + { { KS_exclam, KS_exclam }, KS_exclamdown }, + { { KS_c, KS_slash }, KS_cent }, + { { KS_l, KS_minus }, KS_sterling }, + { { KS_y, KS_minus }, KS_yen }, + { { KS_s, KS_o }, KS_section }, + { { KS_x, KS_o }, KS_currency }, + { { KS_c, KS_o }, KS_copyright }, + { { KS_less, KS_less }, KS_guillemotleft }, + { { KS_greater, KS_greater }, KS_guillemotright }, + { { KS_question, KS_question }, KS_questiondown }, + { { KS_dead_acute, KS_space }, KS_apostrophe }, + { { KS_dead_grave, KS_space }, KS_grave }, + { { KS_dead_tilde, KS_space }, KS_asciitilde }, + { { KS_dead_circumflex, KS_space }, KS_asciicircum }, + { { KS_dead_diaeresis, KS_space }, KS_quotedbl }, + { { KS_dead_cedilla, KS_space }, KS_comma }, + { { KS_dead_circumflex, KS_A }, KS_Acircumflex }, + { { KS_dead_diaeresis, KS_A }, KS_Adiaeresis }, + { { KS_dead_grave, KS_A }, KS_Agrave }, + { { KS_dead_abovering, KS_A }, KS_Aring }, + { { KS_dead_tilde, KS_A }, KS_Atilde }, + { { KS_dead_cedilla, KS_C }, KS_Ccedilla }, + { { KS_dead_acute, KS_E }, KS_Eacute }, + { { KS_dead_circumflex, KS_E }, KS_Ecircumflex }, + { { KS_dead_diaeresis, KS_E }, KS_Ediaeresis }, + { { KS_dead_grave, KS_E }, KS_Egrave }, + { { KS_dead_acute, KS_I }, KS_Iacute }, + { { KS_dead_circumflex, KS_I }, KS_Icircumflex }, + { { KS_dead_diaeresis, KS_I }, KS_Idiaeresis }, + { { KS_dead_grave, KS_I }, KS_Igrave }, + { { KS_dead_tilde, KS_N }, KS_Ntilde }, + { { KS_dead_acute, KS_O }, KS_Oacute }, + { { KS_dead_circumflex, KS_O }, KS_Ocircumflex }, + { { KS_dead_diaeresis, KS_O }, KS_Odiaeresis }, + { { KS_dead_grave, KS_O }, KS_Ograve }, + { { KS_dead_tilde, KS_O }, KS_Otilde }, + { { KS_dead_acute, KS_U }, KS_Uacute }, + { { KS_dead_circumflex, KS_U }, KS_Ucircumflex }, + { { KS_dead_diaeresis, KS_U }, KS_Udiaeresis }, + { { KS_dead_grave, KS_U }, KS_Ugrave }, + { { KS_dead_acute, KS_Y }, KS_Yacute }, + { { KS_dead_acute, KS_a }, KS_aacute }, + { { KS_dead_circumflex, KS_a }, KS_acircumflex }, + { { KS_dead_diaeresis, KS_a }, KS_adiaeresis }, + { { KS_dead_grave, KS_a }, KS_agrave }, + { { KS_dead_abovering, KS_a }, KS_aring }, + { { KS_dead_tilde, KS_a }, KS_atilde }, + { { KS_dead_cedilla, KS_c }, KS_ccedilla }, + { { KS_dead_acute, KS_e }, KS_eacute }, + { { KS_dead_circumflex, KS_e }, KS_ecircumflex }, + { { KS_dead_diaeresis, KS_e }, KS_ediaeresis }, + { { KS_dead_grave, KS_e }, KS_egrave }, + { { KS_dead_acute, KS_i }, KS_iacute }, + { { KS_dead_circumflex, KS_i }, KS_icircumflex }, + { { KS_dead_diaeresis, KS_i }, KS_idiaeresis }, + { { KS_dead_grave, KS_i }, KS_igrave }, + { { KS_dead_tilde, KS_n }, KS_ntilde }, + { { KS_dead_acute, KS_o }, KS_oacute }, + { { KS_dead_circumflex, KS_o }, KS_ocircumflex }, + { { KS_dead_diaeresis, KS_o }, KS_odiaeresis }, + { { KS_dead_grave, KS_o }, KS_ograve }, + { { KS_dead_tilde, KS_o }, KS_otilde }, + { { KS_dead_acute, KS_u }, KS_uacute }, + { { KS_dead_circumflex, KS_u }, KS_ucircumflex }, + { { KS_dead_diaeresis, KS_u }, KS_udiaeresis }, + { { KS_dead_grave, KS_u }, KS_ugrave }, + { { KS_dead_acute, KS_y }, KS_yacute }, + { { KS_dead_diaeresis, KS_y }, KS_ydiaeresis }, + { { KS_quotedbl, KS_A }, KS_Adiaeresis }, + { { KS_quotedbl, KS_E }, KS_Ediaeresis }, + { { KS_quotedbl, KS_I }, KS_Idiaeresis }, + { { KS_quotedbl, KS_O }, KS_Odiaeresis }, + { { KS_quotedbl, KS_U }, KS_Udiaeresis }, + { { KS_quotedbl, KS_a }, KS_adiaeresis }, + { { KS_quotedbl, KS_e }, KS_ediaeresis }, + { { KS_quotedbl, KS_i }, KS_idiaeresis }, + { { KS_quotedbl, KS_o }, KS_odiaeresis }, + { { KS_quotedbl, KS_u }, KS_udiaeresis }, + { { KS_quotedbl, KS_y }, KS_ydiaeresis }, + { { KS_acute, KS_A }, KS_Aacute }, + { { KS_asciicircum, KS_A }, KS_Acircumflex }, + { { KS_grave, KS_A }, KS_Agrave }, + { { KS_asterisk, KS_A }, KS_Aring }, + { { KS_asciitilde, KS_A }, KS_Atilde }, + { { KS_cedilla, KS_C }, KS_Ccedilla }, + { { KS_acute, KS_E }, KS_Eacute }, + { { KS_asciicircum, KS_E }, KS_Ecircumflex }, + { { KS_grave, KS_E }, KS_Egrave }, + { { KS_acute, KS_I }, KS_Iacute }, + { { KS_asciicircum, KS_I }, KS_Icircumflex }, + { { KS_grave, KS_I }, KS_Igrave }, + { { KS_asciitilde, KS_N }, KS_Ntilde }, + { { KS_acute, KS_O }, KS_Oacute }, + { { KS_asciicircum, KS_O }, KS_Ocircumflex }, + { { KS_grave, KS_O }, KS_Ograve }, + { { KS_asciitilde, KS_O }, KS_Otilde }, + { { KS_acute, KS_U }, KS_Uacute }, + { { KS_asciicircum, KS_U }, KS_Ucircumflex }, + { { KS_grave, KS_U }, KS_Ugrave }, + { { KS_acute, KS_Y }, KS_Yacute }, + { { KS_acute, KS_a }, KS_aacute }, + { { KS_asciicircum, KS_a }, KS_acircumflex }, + { { KS_grave, KS_a }, KS_agrave }, + { { KS_asterisk, KS_a }, KS_aring }, + { { KS_asciitilde, KS_a }, KS_atilde }, + { { KS_cedilla, KS_c }, KS_ccedilla }, + { { KS_acute, KS_e }, KS_eacute }, + { { KS_asciicircum, KS_e }, KS_ecircumflex }, + { { KS_grave, KS_e }, KS_egrave }, + { { KS_acute, KS_i }, KS_iacute }, + { { KS_asciicircum, KS_i }, KS_icircumflex }, + { { KS_grave, KS_i }, KS_igrave }, + { { KS_asciitilde, KS_n }, KS_ntilde }, + { { KS_acute, KS_o }, KS_oacute }, + { { KS_asciicircum, KS_o }, KS_ocircumflex }, + { { KS_grave, KS_o }, KS_ograve }, + { { KS_asciitilde, KS_o }, KS_otilde }, + { { KS_acute, KS_u }, KS_uacute }, + { { KS_asciicircum, KS_u }, KS_ucircumflex }, + { { KS_grave, KS_u }, KS_ugrave }, + { { KS_acute, KS_y }, KS_yacute }, #ifndef __NetBSD__ - { { KS_dead_caron, KS_space }, KS_L2_caron }, - { { KS_dead_caron, KS_S }, KS_L2_Scaron }, - { { KS_dead_caron, KS_Z }, KS_L2_Zcaron }, - { { KS_dead_caron, KS_s }, KS_L2_scaron }, - { { KS_dead_caron, KS_z }, KS_L2_zcaron } + { { KS_dead_caron, KS_space }, KS_L2_caron }, + { { KS_dead_caron, KS_S }, KS_L2_Scaron }, + { { KS_dead_caron, KS_Z }, KS_L2_Zcaron }, + { { KS_dead_caron, KS_s }, KS_L2_scaron }, + { { KS_dead_caron, KS_z }, KS_L2_zcaron } #endif }; static keysym_t ksym_upcase(keysym_t ksym) { - if (ksym >= KS_f1 && ksym <= KS_f20) - return(KS_F1 - KS_f1 + ksym); + if (ksym >= KS_f1 && ksym <= KS_f20) { + return KS_F1 - KS_f1 + ksym; + } - if (KS_GROUP(ksym) == KS_GROUP_Ascii && ksym <= 0xff && - latin1_to_upper[ksym] != 0x00) - return(latin1_to_upper[ksym]); + if (KS_GROUP(ksym) == KS_GROUP_Ascii && ksym <= 0xff && latin1_to_upper[ksym] != 0x00) { + return latin1_to_upper[ksym]; + } - return(ksym); + return ksym; } -static struct wscons_keycode_to_SDL { +static struct wscons_keycode_to_SDL +{ keysym_t sourcekey; SDL_Scancode targetKey; } conversion_table[] = { - {KS_Menu, SDL_SCANCODE_APPLICATION}, - {KS_Up, SDL_SCANCODE_UP}, - {KS_Down, SDL_SCANCODE_DOWN}, - {KS_Left, SDL_SCANCODE_LEFT}, - {KS_Right, SDL_SCANCODE_RIGHT}, - {KS_Hold_Screen, SDL_SCANCODE_SCROLLLOCK}, - {KS_Num_Lock, SDL_SCANCODE_NUMLOCKCLEAR}, - {KS_Caps_Lock, SDL_SCANCODE_CAPSLOCK}, - {KS_BackSpace, SDL_SCANCODE_BACKSPACE}, - {KS_space, SDL_SCANCODE_SPACE}, - {KS_Delete, SDL_SCANCODE_BACKSPACE}, - {KS_Home, SDL_SCANCODE_HOME}, - {KS_End, SDL_SCANCODE_END}, - {KS_Pause, SDL_SCANCODE_PAUSE}, - {KS_Print_Screen, SDL_SCANCODE_PRINTSCREEN}, - {KS_Insert, SDL_SCANCODE_INSERT}, - {KS_Escape, SDL_SCANCODE_ESCAPE}, - {KS_Return, SDL_SCANCODE_RETURN}, - {KS_Linefeed, SDL_SCANCODE_RETURN}, - {KS_KP_Delete, SDL_SCANCODE_DELETE}, - {KS_KP_Insert, SDL_SCANCODE_INSERT}, - {KS_Control_L, SDL_SCANCODE_LCTRL}, - {KS_Control_R, SDL_SCANCODE_RCTRL}, - {KS_Shift_L, SDL_SCANCODE_LSHIFT}, - {KS_Shift_R, SDL_SCANCODE_RSHIFT}, - {KS_Alt_L, SDL_SCANCODE_LALT}, - {KS_Alt_R, SDL_SCANCODE_RALT}, - {KS_grave, SDL_SCANCODE_GRAVE}, - - {KS_KP_0, SDL_SCANCODE_KP_0}, - {KS_KP_1, SDL_SCANCODE_KP_1}, - {KS_KP_2, SDL_SCANCODE_KP_2}, - {KS_KP_3, SDL_SCANCODE_KP_3}, - {KS_KP_4, SDL_SCANCODE_KP_4}, - {KS_KP_5, SDL_SCANCODE_KP_5}, - {KS_KP_6, SDL_SCANCODE_KP_6}, - {KS_KP_7, SDL_SCANCODE_KP_7}, - {KS_KP_8, SDL_SCANCODE_KP_8}, - {KS_KP_9, SDL_SCANCODE_KP_9}, - {KS_KP_Enter, SDL_SCANCODE_KP_ENTER}, - {KS_KP_Multiply, SDL_SCANCODE_KP_MULTIPLY}, - {KS_KP_Add, SDL_SCANCODE_KP_PLUS}, - {KS_KP_Subtract, SDL_SCANCODE_KP_MINUS}, - {KS_KP_Divide, SDL_SCANCODE_KP_DIVIDE}, - {KS_KP_Up, SDL_SCANCODE_UP}, - {KS_KP_Down, SDL_SCANCODE_DOWN}, - {KS_KP_Left, SDL_SCANCODE_LEFT}, - {KS_KP_Right, SDL_SCANCODE_RIGHT}, - {KS_KP_Equal, SDL_SCANCODE_KP_EQUALS}, - {KS_f1, SDL_SCANCODE_F1}, - {KS_f2, SDL_SCANCODE_F2}, - {KS_f3, SDL_SCANCODE_F3}, - {KS_f4, SDL_SCANCODE_F4}, - {KS_f5, SDL_SCANCODE_F5}, - {KS_f6, SDL_SCANCODE_F6}, - {KS_f7, SDL_SCANCODE_F7}, - {KS_f8, SDL_SCANCODE_F8}, - {KS_f9, SDL_SCANCODE_F9}, - {KS_f10, SDL_SCANCODE_F10}, - {KS_f11, SDL_SCANCODE_F11}, - {KS_f12, SDL_SCANCODE_F12}, - {KS_f13, SDL_SCANCODE_F13}, - {KS_f14, SDL_SCANCODE_F14}, - {KS_f15, SDL_SCANCODE_F15}, - {KS_f16, SDL_SCANCODE_F16}, - {KS_f17, SDL_SCANCODE_F17}, - {KS_f18, SDL_SCANCODE_F18}, - {KS_f19, SDL_SCANCODE_F19}, - {KS_f20, SDL_SCANCODE_F20}, + { KS_Menu, SDL_SCANCODE_APPLICATION }, + { KS_Up, SDL_SCANCODE_UP }, + { KS_Down, SDL_SCANCODE_DOWN }, + { KS_Left, SDL_SCANCODE_LEFT }, + { KS_Right, SDL_SCANCODE_RIGHT }, + { KS_Hold_Screen, SDL_SCANCODE_SCROLLLOCK }, + { KS_Num_Lock, SDL_SCANCODE_NUMLOCKCLEAR }, + { KS_Caps_Lock, SDL_SCANCODE_CAPSLOCK }, + { KS_BackSpace, SDL_SCANCODE_BACKSPACE }, + { KS_space, SDL_SCANCODE_SPACE }, + { KS_Delete, SDL_SCANCODE_BACKSPACE }, + { KS_Home, SDL_SCANCODE_HOME }, + { KS_End, SDL_SCANCODE_END }, + { KS_Pause, SDL_SCANCODE_PAUSE }, + { KS_Print_Screen, SDL_SCANCODE_PRINTSCREEN }, + { KS_Insert, SDL_SCANCODE_INSERT }, + { KS_Escape, SDL_SCANCODE_ESCAPE }, + { KS_Return, SDL_SCANCODE_RETURN }, + { KS_Linefeed, SDL_SCANCODE_RETURN }, + { KS_KP_Delete, SDL_SCANCODE_DELETE }, + { KS_KP_Insert, SDL_SCANCODE_INSERT }, + { KS_Control_L, SDL_SCANCODE_LCTRL }, + { KS_Control_R, SDL_SCANCODE_RCTRL }, + { KS_Shift_L, SDL_SCANCODE_LSHIFT }, + { KS_Shift_R, SDL_SCANCODE_RSHIFT }, + { KS_Alt_L, SDL_SCANCODE_LALT }, + { KS_Alt_R, SDL_SCANCODE_RALT }, + { KS_grave, SDL_SCANCODE_GRAVE }, + + { KS_KP_0, SDL_SCANCODE_KP_0 }, + { KS_KP_1, SDL_SCANCODE_KP_1 }, + { KS_KP_2, SDL_SCANCODE_KP_2 }, + { KS_KP_3, SDL_SCANCODE_KP_3 }, + { KS_KP_4, SDL_SCANCODE_KP_4 }, + { KS_KP_5, SDL_SCANCODE_KP_5 }, + { KS_KP_6, SDL_SCANCODE_KP_6 }, + { KS_KP_7, SDL_SCANCODE_KP_7 }, + { KS_KP_8, SDL_SCANCODE_KP_8 }, + { KS_KP_9, SDL_SCANCODE_KP_9 }, + { KS_KP_Enter, SDL_SCANCODE_KP_ENTER }, + { KS_KP_Multiply, SDL_SCANCODE_KP_MULTIPLY }, + { KS_KP_Add, SDL_SCANCODE_KP_PLUS }, + { KS_KP_Subtract, SDL_SCANCODE_KP_MINUS }, + { KS_KP_Divide, SDL_SCANCODE_KP_DIVIDE }, + { KS_KP_Up, SDL_SCANCODE_UP }, + { KS_KP_Down, SDL_SCANCODE_DOWN }, + { KS_KP_Left, SDL_SCANCODE_LEFT }, + { KS_KP_Right, SDL_SCANCODE_RIGHT }, + { KS_KP_Equal, SDL_SCANCODE_KP_EQUALS }, + { KS_f1, SDL_SCANCODE_F1 }, + { KS_f2, SDL_SCANCODE_F2 }, + { KS_f3, SDL_SCANCODE_F3 }, + { KS_f4, SDL_SCANCODE_F4 }, + { KS_f5, SDL_SCANCODE_F5 }, + { KS_f6, SDL_SCANCODE_F6 }, + { KS_f7, SDL_SCANCODE_F7 }, + { KS_f8, SDL_SCANCODE_F8 }, + { KS_f9, SDL_SCANCODE_F9 }, + { KS_f10, SDL_SCANCODE_F10 }, + { KS_f11, SDL_SCANCODE_F11 }, + { KS_f12, SDL_SCANCODE_F12 }, + { KS_f13, SDL_SCANCODE_F13 }, + { KS_f14, SDL_SCANCODE_F14 }, + { KS_f15, SDL_SCANCODE_F15 }, + { KS_f16, SDL_SCANCODE_F16 }, + { KS_f17, SDL_SCANCODE_F17 }, + { KS_f18, SDL_SCANCODE_F18 }, + { KS_f19, SDL_SCANCODE_F19 }, + { KS_f20, SDL_SCANCODE_F20 }, #if !defined(__NetBSD__) - {KS_f21, SDL_SCANCODE_F21}, - {KS_f22, SDL_SCANCODE_F22}, - {KS_f23, SDL_SCANCODE_F23}, - {KS_f24, SDL_SCANCODE_F24}, + { KS_f21, SDL_SCANCODE_F21 }, + { KS_f22, SDL_SCANCODE_F22 }, + { KS_f23, SDL_SCANCODE_F23 }, + { KS_f24, SDL_SCANCODE_F24 }, #endif - {KS_Meta_L, SDL_SCANCODE_LGUI}, - {KS_Meta_R, SDL_SCANCODE_RGUI}, - {KS_Zenkaku_Hankaku, SDL_SCANCODE_LANG5}, - {KS_Hiragana_Katakana, SDL_SCANCODE_INTERNATIONAL2}, - {KS_yen, SDL_SCANCODE_INTERNATIONAL3}, - {KS_Henkan, SDL_SCANCODE_INTERNATIONAL4}, - {KS_Muhenkan, SDL_SCANCODE_INTERNATIONAL5}, - {KS_KP_Prior, SDL_SCANCODE_PRIOR}, - - {KS_a, SDL_SCANCODE_A}, - {KS_b, SDL_SCANCODE_B}, - {KS_c, SDL_SCANCODE_C}, - {KS_d, SDL_SCANCODE_D}, - {KS_e, SDL_SCANCODE_E}, - {KS_f, SDL_SCANCODE_F}, - {KS_g, SDL_SCANCODE_G}, - {KS_h, SDL_SCANCODE_H}, - {KS_i, SDL_SCANCODE_I}, - {KS_j, SDL_SCANCODE_J}, - {KS_k, SDL_SCANCODE_K}, - {KS_l, SDL_SCANCODE_L}, - {KS_m, SDL_SCANCODE_M}, - {KS_n, SDL_SCANCODE_N}, - {KS_o, SDL_SCANCODE_O}, - {KS_p, SDL_SCANCODE_P}, - {KS_q, SDL_SCANCODE_Q}, - {KS_r, SDL_SCANCODE_R}, - {KS_s, SDL_SCANCODE_S}, - {KS_t, SDL_SCANCODE_T}, - {KS_u, SDL_SCANCODE_U}, - {KS_v, SDL_SCANCODE_V}, - {KS_w, SDL_SCANCODE_W}, - {KS_x, SDL_SCANCODE_X}, - {KS_y, SDL_SCANCODE_Y}, - {KS_z, SDL_SCANCODE_Z}, - - {KS_0, SDL_SCANCODE_0}, - {KS_1, SDL_SCANCODE_1}, - {KS_2, SDL_SCANCODE_2}, - {KS_3, SDL_SCANCODE_3}, - {KS_4, SDL_SCANCODE_4}, - {KS_5, SDL_SCANCODE_5}, - {KS_6, SDL_SCANCODE_6}, - {KS_7, SDL_SCANCODE_7}, - {KS_8, SDL_SCANCODE_8}, - {KS_9, SDL_SCANCODE_9}, - {KS_minus, SDL_SCANCODE_MINUS}, - {KS_equal, SDL_SCANCODE_EQUALS}, - {KS_Tab, SDL_SCANCODE_TAB}, - {KS_KP_Tab, SDL_SCANCODE_KP_TAB}, - {KS_apostrophe, SDL_SCANCODE_APOSTROPHE}, - {KS_bracketleft, SDL_SCANCODE_LEFTBRACKET}, - {KS_bracketright, SDL_SCANCODE_RIGHTBRACKET}, - {KS_semicolon, SDL_SCANCODE_SEMICOLON}, - {KS_comma, SDL_SCANCODE_COMMA}, - {KS_period, SDL_SCANCODE_PERIOD}, - {KS_slash, SDL_SCANCODE_SLASH}, - {KS_backslash, SDL_SCANCODE_BACKSLASH} + { KS_Meta_L, SDL_SCANCODE_LGUI }, + { KS_Meta_R, SDL_SCANCODE_RGUI }, + { KS_Zenkaku_Hankaku, SDL_SCANCODE_LANG5 }, + { KS_Hiragana_Katakana, SDL_SCANCODE_INTERNATIONAL2 }, + { KS_yen, SDL_SCANCODE_INTERNATIONAL3 }, + { KS_Henkan, SDL_SCANCODE_INTERNATIONAL4 }, + { KS_Muhenkan, SDL_SCANCODE_INTERNATIONAL5 }, + { KS_KP_Prior, SDL_SCANCODE_PRIOR }, + + { KS_a, SDL_SCANCODE_A }, + { KS_b, SDL_SCANCODE_B }, + { KS_c, SDL_SCANCODE_C }, + { KS_d, SDL_SCANCODE_D }, + { KS_e, SDL_SCANCODE_E }, + { KS_f, SDL_SCANCODE_F }, + { KS_g, SDL_SCANCODE_G }, + { KS_h, SDL_SCANCODE_H }, + { KS_i, SDL_SCANCODE_I }, + { KS_j, SDL_SCANCODE_J }, + { KS_k, SDL_SCANCODE_K }, + { KS_l, SDL_SCANCODE_L }, + { KS_m, SDL_SCANCODE_M }, + { KS_n, SDL_SCANCODE_N }, + { KS_o, SDL_SCANCODE_O }, + { KS_p, SDL_SCANCODE_P }, + { KS_q, SDL_SCANCODE_Q }, + { KS_r, SDL_SCANCODE_R }, + { KS_s, SDL_SCANCODE_S }, + { KS_t, SDL_SCANCODE_T }, + { KS_u, SDL_SCANCODE_U }, + { KS_v, SDL_SCANCODE_V }, + { KS_w, SDL_SCANCODE_W }, + { KS_x, SDL_SCANCODE_X }, + { KS_y, SDL_SCANCODE_Y }, + { KS_z, SDL_SCANCODE_Z }, + + { KS_0, SDL_SCANCODE_0 }, + { KS_1, SDL_SCANCODE_1 }, + { KS_2, SDL_SCANCODE_2 }, + { KS_3, SDL_SCANCODE_3 }, + { KS_4, SDL_SCANCODE_4 }, + { KS_5, SDL_SCANCODE_5 }, + { KS_6, SDL_SCANCODE_6 }, + { KS_7, SDL_SCANCODE_7 }, + { KS_8, SDL_SCANCODE_8 }, + { KS_9, SDL_SCANCODE_9 }, + { KS_minus, SDL_SCANCODE_MINUS }, + { KS_equal, SDL_SCANCODE_EQUALS }, + { KS_Tab, SDL_SCANCODE_TAB }, + { KS_KP_Tab, SDL_SCANCODE_KP_TAB }, + { KS_apostrophe, SDL_SCANCODE_APOSTROPHE }, + { KS_bracketleft, SDL_SCANCODE_LEFTBRACKET }, + { KS_bracketright, SDL_SCANCODE_RIGHTBRACKET }, + { KS_semicolon, SDL_SCANCODE_SEMICOLON }, + { KS_comma, SDL_SCANCODE_COMMA }, + { KS_period, SDL_SCANCODE_PERIOD }, + { KS_slash, SDL_SCANCODE_SLASH }, + { KS_backslash, SDL_SCANCODE_BACKSLASH } }; -typedef struct { +typedef struct +{ int fd; struct wskbd_map_data keymap; int ledstate; @@ -397,27 +406,27 @@ typedef struct { int type; } SDL_WSCONS_input_data; -static SDL_WSCONS_input_data* inputs[4] = {NULL, NULL, NULL, NULL}; -static SDL_WSCONS_mouse_input_data* mouseInputData = NULL; -#define IS_CONTROL_HELD (input->shiftstate[2] > 0) -#define IS_ALT_HELD (input->shiftstate[1] > 0) -#define IS_SHIFT_HELD ((input->shiftstate[0] > 0) || (input->ledstate & (1 << 5))) +static SDL_WSCONS_input_data *inputs[4] = { NULL, NULL, NULL, NULL }; +static SDL_WSCONS_mouse_input_data *mouseInputData = NULL; +#define IS_CONTROL_HELD (input->shiftstate[2] > 0) +#define IS_ALT_HELD (input->shiftstate[1] > 0) +#define IS_SHIFT_HELD ((input->shiftstate[0] > 0) || (input->ledstate & (1 << 5))) #define IS_ALTGR_MODE ((input->ledstate & (1 << 4)) || (input->shiftstate[3] > 0)) #define IS_NUMLOCK_ON (input->ledstate & LED_NUM) #define IS_SCROLLLOCK_ON (input->ledstate & LED_SCR) #define IS_CAPSLOCK_ON (input->ledstate & LED_CAP) -static SDL_WSCONS_input_data* SDL_WSCONS_Init_Keyboard(const char* dev) +static SDL_WSCONS_input_data *SDL_WSCONS_Init_Keyboard(const char *dev) { #ifdef WSKBDIO_SETVERSION int version = WSKBDIO_EVENT_VERSION; #endif - SDL_WSCONS_input_data* input = (SDL_WSCONS_input_data*)SDL_calloc(1, sizeof(SDL_WSCONS_input_data)); + SDL_WSCONS_input_data *input = (SDL_WSCONS_input_data *)SDL_calloc(1, sizeof(SDL_WSCONS_input_data)); - if (!input) { + if (input == NULL) { return input; } - input->fd = open(dev,O_RDWR | O_NONBLOCK | O_CLOEXEC); + input->fd = open(dev, O_RDWR | O_NONBLOCK | O_CLOEXEC); if (input->fd == -1) { free(input); input = NULL; @@ -454,7 +463,7 @@ void SDL_WSCONS_Init() void SDL_WSCONS_Quit() { int i = 0; - SDL_WSCONS_input_data* input = NULL; + SDL_WSCONS_input_data *input = NULL; SDL_WSCONS_Quit_Mouse(mouseInputData); mouseInputData = NULL; @@ -462,7 +471,7 @@ void SDL_WSCONS_Quit() input = inputs[i]; if (input) { if (input->fd != -1 && input->fd != 0) { - ioctl(input->fd,WSKBDIO_SETLEDS, &input->origledstate); + ioctl(input->fd, WSKBDIO_SETLEDS, &input->origledstate); close(input->fd); input->fd = -1; } @@ -476,12 +485,12 @@ void SDL_WSCONS_Quit() static void put_queue(SDL_WSCONS_input_data *kbd, uint c) { /* c is already part of a UTF-8 sequence and safe to add as a character */ - if (kbd->text_len < (sizeof(kbd->text)-1)) { + if (kbd->text_len < (sizeof(kbd->text) - 1)) { kbd->text[kbd->text_len++] = (char)(c); } } -static void put_utf8(SDL_WSCONS_input_data* input, uint c) +static void put_utf8(SDL_WSCONS_input_data *input, uint c) { if (c < 0x80) /* 0******* */ @@ -491,10 +500,12 @@ static void put_utf8(SDL_WSCONS_input_data* input, uint c) put_queue(input, 0xc0 | (c >> 6)); put_queue(input, 0x80 | (c & 0x3f)); } else if (c < 0x10000) { - if (c >= 0xD800 && c <= 0xF500) + if (c >= 0xD800 && c <= 0xF500) { return; - if (c == 0xFFFF) + } + if (c == 0xFFFF) { return; + } /* 1110**** 10****** 10****** */ put_queue(input, 0xe0 | (c >> 12)); put_queue(input, 0x80 | ((c >> 6) & 0x3f)); @@ -508,12 +519,14 @@ static void put_utf8(SDL_WSCONS_input_data* input, uint c) } } -static void Translate_to_text(SDL_WSCONS_input_data* input, keysym_t ksym) +static void Translate_to_text(SDL_WSCONS_input_data *input, keysym_t ksym) { if (KS_GROUP(ksym) == KS_GROUP_Keypad) { - if (SDL_isprint(ksym & 0xFF)) ksym &= 0xFF; + if (SDL_isprint(ksym & 0xFF)) { + ksym &= 0xFF; + } } - switch(ksym) { + switch (ksym) { case KS_Escape: case KS_Delete: case KS_BackSpace: @@ -534,19 +547,21 @@ static void Translate_to_text(SDL_WSCONS_input_data* input, keysym_t ksym) } } -static void Translate_to_keycode(SDL_WSCONS_input_data* input, int type, keysym_t ksym) +static void Translate_to_keycode(SDL_WSCONS_input_data *input, int type, keysym_t ksym) { struct wscons_keymap keyDesc = input->keymap.map[ksym]; - keysym_t* group = &keyDesc.group1[KS_GROUP(keyDesc.group1[0]) == KS_GROUP_Keypad && IS_NUMLOCK_ON ? !IS_SHIFT_HELD : 0]; + keysym_t *group = &keyDesc.group1[KS_GROUP(keyDesc.group1[0]) == KS_GROUP_Keypad && IS_NUMLOCK_ON ? !IS_SHIFT_HELD : 0]; int i = 0; /* Check command first, then group[0]*/ switch (keyDesc.command) { - case KS_Cmd_ScrollBack: { + case KS_Cmd_ScrollBack: + { SDL_SendKeyboardKey(type == WSCONS_EVENT_KEY_DOWN ? SDL_PRESSED : SDL_RELEASED, SDL_SCANCODE_PAGEUP); return; } - case KS_Cmd_ScrollFwd: { + case KS_Cmd_ScrollFwd: + { SDL_SendKeyboardKey(type == WSCONS_EVENT_KEY_DOWN ? SDL_PRESSED : SDL_RELEASED, SDL_SCANCODE_PAGEDOWN); return; } @@ -558,169 +573,237 @@ static void Translate_to_keycode(SDL_WSCONS_input_data* input, int type, keysym_ } } SDL_SendKeyboardKey(type == WSCONS_EVENT_KEY_DOWN ? SDL_PRESSED : SDL_RELEASED, SDL_SCANCODE_UNKNOWN); - } -static void updateKeyboard(SDL_WSCONS_input_data* input) +static void updateKeyboard(SDL_WSCONS_input_data *input) { struct wscons_event events[64]; int type; - int n,i,gindex,acc_i; + int n, i, gindex, acc_i; keysym_t *group; keysym_t ksym, result; - if (!input) return; + if (input == NULL) { + return; + } if ((n = read(input->fd, events, sizeof(events))) > 0) { n /= sizeof(struct wscons_event); for (i = 0; i < n; i++) { type = events[i].type; - switch(type) { - case WSCONS_EVENT_KEY_DOWN: { + switch (type) { + case WSCONS_EVENT_KEY_DOWN: + { switch (input->keymap.map[events[i].value].group1[0]) { - case KS_Hold_Screen: { - if (input->lockheldstate[0] >= 1) break; + case KS_Hold_Screen: + { + if (input->lockheldstate[0] >= 1) { + break; + } input->ledstate ^= LED_SCR; ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->lockheldstate[0] = 1; break; } - case KS_Num_Lock: { - if (input->lockheldstate[1] >= 1) break; + case KS_Num_Lock: + { + if (input->lockheldstate[1] >= 1) { + break; + } input->ledstate ^= LED_NUM; ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->lockheldstate[1] = 1; break; } - case KS_Caps_Lock: { - if (input->lockheldstate[2] >= 1) break; + case KS_Caps_Lock: + { + if (input->lockheldstate[2] >= 1) { + break; + } input->ledstate ^= LED_CAP; ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->lockheldstate[2] = 1; break; } #ifndef __NetBSD__ - case KS_Mode_Lock: { - if (input->lockheldstate[3] >= 1) break; + case KS_Mode_Lock: + { + if (input->lockheldstate[3] >= 1) { + break; + } input->ledstate ^= 1 << 4; ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->lockheldstate[3] = 1; break; } #endif - case KS_Shift_Lock: { - if (input->lockheldstate[4] >= 1) break; + case KS_Shift_Lock: + { + if (input->lockheldstate[4] >= 1) { + break; + } input->ledstate ^= 1 << 5; ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->lockheldstate[4] = 1; break; } - case KS_Shift_L: { - if (input->shiftheldstate[0]) break; + case KS_Shift_L: + { + if (input->shiftheldstate[0]) { + break; + } input->shiftstate[0]++; input->shiftheldstate[0] = 1; break; } - case KS_Shift_R: { - if (input->shiftheldstate[1]) break; + case KS_Shift_R: + { + if (input->shiftheldstate[1]) { + break; + } input->shiftstate[0]++; input->shiftheldstate[1] = 1; break; } - case KS_Alt_L: { - if (input->shiftheldstate[2]) break; + case KS_Alt_L: + { + if (input->shiftheldstate[2]) { + break; + } input->shiftstate[1]++; input->shiftheldstate[2] = 1; break; } - case KS_Alt_R: { - if (input->shiftheldstate[3]) break; + case KS_Alt_R: + { + if (input->shiftheldstate[3]) { + break; + } input->shiftstate[1]++; input->shiftheldstate[3] = 1; break; } - case KS_Control_L: { - if (input->shiftheldstate[4]) break; + case KS_Control_L: + { + if (input->shiftheldstate[4]) { + break; + } input->shiftstate[2]++; input->shiftheldstate[4] = 1; break; } - case KS_Control_R: { - if (input->shiftheldstate[5]) break; + case KS_Control_R: + { + if (input->shiftheldstate[5]) { + break; + } input->shiftstate[2]++; input->shiftheldstate[5] = 1; break; } - case KS_Mode_switch: { - if (input->shiftheldstate[6]) break; + case KS_Mode_switch: + { + if (input->shiftheldstate[6]) { + break; + } input->shiftstate[3]++; input->shiftheldstate[6] = 1; break; } } - } - break; - case WSCONS_EVENT_KEY_UP: { - switch(input->keymap.map[events[i].value].group1[0]) { - case KS_Hold_Screen: { - if (input->lockheldstate[0]) input->lockheldstate[0] = 0; - } - break; - case KS_Num_Lock: { - if (input->lockheldstate[1]) input->lockheldstate[1] = 0; - } - break; - case KS_Caps_Lock: { - if (input->lockheldstate[2]) input->lockheldstate[2] = 0; - } - break; + } break; + case WSCONS_EVENT_KEY_UP: + { + switch (input->keymap.map[events[i].value].group1[0]) { + case KS_Hold_Screen: + { + if (input->lockheldstate[0]) { + input->lockheldstate[0] = 0; + } + } break; + case KS_Num_Lock: + { + if (input->lockheldstate[1]) { + input->lockheldstate[1] = 0; + } + } break; + case KS_Caps_Lock: + { + if (input->lockheldstate[2]) { + input->lockheldstate[2] = 0; + } + } break; #ifndef __NetBSD__ - case KS_Mode_Lock: { - if (input->lockheldstate[3]) input->lockheldstate[3] = 0; - } - break; + case KS_Mode_Lock: + { + if (input->lockheldstate[3]) { + input->lockheldstate[3] = 0; + } + } break; #endif - case KS_Shift_Lock: { - if (input->lockheldstate[4]) input->lockheldstate[4] = 0; - } - break; - case KS_Shift_L: { + case KS_Shift_Lock: + { + if (input->lockheldstate[4]) { + input->lockheldstate[4] = 0; + } + } break; + case KS_Shift_L: + { input->shiftheldstate[0] = 0; - if (input->shiftstate[0]) input->shiftstate[0]--; + if (input->shiftstate[0]) { + input->shiftstate[0]--; + } break; } - case KS_Shift_R: { + case KS_Shift_R: + { input->shiftheldstate[1] = 0; - if (input->shiftstate[0]) input->shiftstate[0]--; + if (input->shiftstate[0]) { + input->shiftstate[0]--; + } break; } - case KS_Alt_L: { + case KS_Alt_L: + { input->shiftheldstate[2] = 0; - if (input->shiftstate[1]) input->shiftstate[1]--; + if (input->shiftstate[1]) { + input->shiftstate[1]--; + } break; } - case KS_Alt_R: { + case KS_Alt_R: + { input->shiftheldstate[3] = 0; - if (input->shiftstate[1]) input->shiftstate[1]--; + if (input->shiftstate[1]) { + input->shiftstate[1]--; + } break; } - case KS_Control_L: { + case KS_Control_L: + { input->shiftheldstate[4] = 0; - if (input->shiftstate[2]) input->shiftstate[2]--; + if (input->shiftstate[2]) { + input->shiftstate[2]--; + } break; } - case KS_Control_R: { + case KS_Control_R: + { input->shiftheldstate[5] = 0; - if (input->shiftstate[2]) input->shiftstate[2]--; + if (input->shiftstate[2]) { + input->shiftstate[2]--; + } break; } - case KS_Mode_switch: { + case KS_Mode_switch: + { input->shiftheldstate[6] = 0; - if (input->shiftstate[3]) input->shiftstate[3]--; + if (input->shiftstate[3]) { + input->shiftstate[3]--; + } break; } } - } - break; + } break; case WSCONS_EVENT_ALL_KEYS_UP: for (i = 0; i < SDL_NUM_SCANCODES; i++) { SDL_SendKeyboardKey(SDL_RELEASED, i); @@ -730,10 +813,12 @@ static void updateKeyboard(SDL_WSCONS_input_data* input) if (input->type == WSKBD_TYPE_USB && events[i].value <= 0xE7) SDL_SendKeyboardKey(type == WSCONS_EVENT_KEY_DOWN ? SDL_PRESSED : SDL_RELEASED, (SDL_Scancode)events[i].value); - else + else Translate_to_keycode(input, type, events[i].value); - if (type == WSCONS_EVENT_KEY_UP) continue; + if (type == WSCONS_EVENT_KEY_UP) { + continue; + } if (IS_ALTGR_MODE && !IS_CONTROL_HELD) group = &input->keymap.map[events[i].value].group2[0]; @@ -763,7 +848,7 @@ static void updateKeyboard(SDL_WSCONS_input_data* input) case KS_GROUP_Mod: if (ksym == KS_Multi_key) { input->ledstate |= WSKBD_LED_COMPOSE; - ioctl(input->fd,WSKBDIO_SETLEDS, &input->ledstate); + ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->composelen = 2; input->composebuffer[0] = input->composebuffer[1] = 0; } @@ -771,14 +856,17 @@ static void updateKeyboard(SDL_WSCONS_input_data* input) case KS_GROUP_Dead: if (input->composelen == 0) { input->ledstate |= WSKBD_LED_COMPOSE; - ioctl(input->fd,WSKBDIO_SETLEDS, &input->ledstate); + ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); input->composelen = 1; input->composebuffer[0] = ksym; input->composebuffer[1] = 0; - } else result = ksym; + } else + result = ksym; break; } - if (result == KS_voidSymbol) continue; + if (result == KS_voidSymbol) { + continue; + } if (input->composelen > 0) { if (input->composelen == 2 && group == &input->keymap.map[events[i].value].group2[0]) { @@ -793,40 +881,41 @@ static void updateKeyboard(SDL_WSCONS_input_data* input) if (--input->composelen == 0) { result = KS_voidSymbol; input->ledstate &= ~WSKBD_LED_COMPOSE; - ioctl(input->fd,WSKBDIO_SETLEDS, &input->ledstate); + ioctl(input->fd, WSKBDIO_SETLEDS, &input->ledstate); for (acc_i = 0; acc_i < SDL_arraysize(compose_tab); acc_i++) { - if ((compose_tab[acc_i].elem[0] == input->composebuffer[0] - && compose_tab[acc_i].elem[1] == input->composebuffer[1]) - || (compose_tab[acc_i].elem[0] == input->composebuffer[1] - && compose_tab[acc_i].elem[1] == input->composebuffer[0])) { + if ((compose_tab[acc_i].elem[0] == input->composebuffer[0] && compose_tab[acc_i].elem[1] == input->composebuffer[1]) || (compose_tab[acc_i].elem[0] == input->composebuffer[1] && compose_tab[acc_i].elem[1] == input->composebuffer[0])) { result = compose_tab[acc_i].result; break; } } - } else continue; + } else + continue; } } if (KS_GROUP(result) == KS_GROUP_Ascii) { if (IS_CONTROL_HELD) { - if ((result >= KS_at && result <= KS_z) || result == KS_space) + if ((result >= KS_at && result <= KS_z) || result == KS_space) { result = result & 0x1f; - else if (result == KS_2) + } else if (result == KS_2) { result = 0x00; - else if (result >= KS_3 && result <= KS_7) + } else if (result >= KS_3 && result <= KS_7) { result = KS_Escape + (result - KS_3); - else if (result == KS_8) + } else if (result == KS_8) { result = KS_Delete; + } } if (IS_ALT_HELD) { if (input->encoding & KB_METAESC) { Translate_to_keycode(input, WSCONS_EVENT_KEY_DOWN, KS_Escape); Translate_to_text(input, result); continue; - } else result |= 0x80; + } else { + result |= 0x80; + } } } - Translate_to_text(input,result); + Translate_to_text(input, result); continue; } } @@ -835,7 +924,10 @@ static void updateKeyboard(SDL_WSCONS_input_data* input) void SDL_WSCONS_PumpEvents() { int i = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { updateKeyboard(inputs[i]); - if (mouseInputData != NULL) updateMouse(mouseInputData); + } + if (mouseInputData != NULL) { + updateMouse(mouseInputData); + } } diff --git a/modules/SDL2/src/core/openbsd/SDL_wscons_mouse.c b/modules/SDL2/src/core/openbsd/SDL_wscons_mouse.c index 4aa5809..617cea7 100644 --- a/modules/SDL2/src/core/openbsd/SDL_wscons_mouse.c +++ b/modules/SDL2/src/core/openbsd/SDL_wscons_mouse.c @@ -35,16 +35,21 @@ typedef struct SDL_WSCONS_mouse_input_data int fd; } SDL_WSCONS_mouse_input_data; -SDL_WSCONS_mouse_input_data* SDL_WSCONS_Init_Mouse() +SDL_WSCONS_mouse_input_data *SDL_WSCONS_Init_Mouse() { #ifdef WSMOUSEIO_SETVERSION int version = WSMOUSE_EVENT_VERSION; #endif - SDL_WSCONS_mouse_input_data* mouseInputData = SDL_calloc(1, sizeof(SDL_WSCONS_mouse_input_data)); + SDL_WSCONS_mouse_input_data *mouseInputData = SDL_calloc(1, sizeof(SDL_WSCONS_mouse_input_data)); - if (!mouseInputData) return NULL; - mouseInputData->fd = open("/dev/wsmouse",O_RDWR | O_NONBLOCK | O_CLOEXEC); - if (mouseInputData->fd == -1) {free(mouseInputData); return NULL; } + if (mouseInputData == NULL) { + return NULL; + } + mouseInputData->fd = open("/dev/wsmouse", O_RDWR | O_NONBLOCK | O_CLOEXEC); + if (mouseInputData->fd == -1) { + free(mouseInputData); + return NULL; + } #ifdef WSMOUSEIO_SETMODE ioctl(mouseInputData->fd, WSMOUSEIO_SETMODE, WSMOUSE_COMPAT); #endif @@ -54,81 +59,76 @@ SDL_WSCONS_mouse_input_data* SDL_WSCONS_Init_Mouse() return mouseInputData; } -void updateMouse(SDL_WSCONS_mouse_input_data* inputData) +void updateMouse(SDL_WSCONS_mouse_input_data *inputData) { struct wscons_event events[64]; int type; - int n,i; - SDL_Mouse* mouse = SDL_GetMouse(); + int n, i; + SDL_Mouse *mouse = SDL_GetMouse(); - if ((n = read(inputData->fd, events, sizeof(events))) > 0) - { + if ((n = read(inputData->fd, events, sizeof(events))) > 0) { n /= sizeof(struct wscons_event); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { type = events[i].type; - switch(type) - { + switch (type) { case WSCONS_EVENT_MOUSE_DOWN: - { - switch (events[i].value) - { - case 0: /* Left Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_LEFT); - break; - case 1: /* Middle Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_MIDDLE); - break; - case 2: /* Right Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_RIGHT); - break; - } + { + switch (events[i].value) { + case 0: /* Left Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_LEFT); + break; + case 1: /* Middle Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_MIDDLE); + break; + case 2: /* Right Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_PRESSED, SDL_BUTTON_RIGHT); + break; } - break; + } break; case WSCONS_EVENT_MOUSE_UP: - { - switch (events[i].value) - { - case 0: /* Left Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_LEFT); - break; - case 1: /* Middle Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_MIDDLE); - break; - case 2: /* Right Mouse Button. */ - SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_RIGHT); - break; - } - } - break; - case WSCONS_EVENT_MOUSE_DELTA_X: - { - SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, events[i].value, 0); + { + switch (events[i].value) { + case 0: /* Left Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_LEFT); break; - } - case WSCONS_EVENT_MOUSE_DELTA_Y: - { - SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, 0, -events[i].value); + case 1: /* Middle Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_MIDDLE); break; - } - case WSCONS_EVENT_MOUSE_DELTA_W: - { - SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL); + case 2: /* Right Mouse Button. */ + SDL_SendMouseButton(mouse->focus, mouse->mouseID, SDL_RELEASED, SDL_BUTTON_RIGHT); break; } + } break; + case WSCONS_EVENT_MOUSE_DELTA_X: + { + SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, events[i].value, 0); + break; + } + case WSCONS_EVENT_MOUSE_DELTA_Y: + { + SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, 0, -events[i].value); + break; + } + case WSCONS_EVENT_MOUSE_DELTA_W: + { + SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL); + break; + } case WSCONS_EVENT_MOUSE_DELTA_Z: - { - SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, -events[i].value, SDL_MOUSEWHEEL_NORMAL); - break; - } + { + SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, -events[i].value, SDL_MOUSEWHEEL_NORMAL); + break; + } } } } } -void SDL_WSCONS_Quit_Mouse(SDL_WSCONS_mouse_input_data* inputData) +void SDL_WSCONS_Quit_Mouse(SDL_WSCONS_mouse_input_data *inputData) { - if (!inputData) return; + if (inputData == NULL) { + return; + } close(inputData->fd); free(inputData); } diff --git a/modules/SDL2/src/core/unix/SDL_poll.c b/modules/SDL2/src/core/unix/SDL_poll.c index 7336c45..9254981 100644 --- a/modules/SDL2/src/core/unix/SDL_poll.c +++ b/modules/SDL2/src/core/unix/SDL_poll.c @@ -32,17 +32,14 @@ #endif #include - -int -SDL_IOReady(int fd, int flags, int timeoutMS) +int SDL_IOReady(int fd, int flags, int timeoutMS) { int result; SDL_assert(flags & (SDL_IOR_READ | SDL_IOR_WRITE)); /* Note: We don't bother to account for elapsed time if we get EINTR */ - do - { + do { #ifdef HAVE_POLL struct pollfd info; @@ -83,7 +80,7 @@ SDL_IOReady(int fd, int flags, int timeoutMS) result = select(fd + 1, rfdp, wfdp, NULL, tvp); #endif /* HAVE_POLL */ - } while ( result < 0 && errno == EINTR && !(flags & SDL_IOR_NO_RETRY)); + } while (result < 0 && errno == EINTR && !(flags & SDL_IOR_NO_RETRY)); return result; } diff --git a/modules/SDL2/src/core/windows/SDL_directx.h b/modules/SDL2/src/core/windows/SDL_directx.h index 834d407..6c2ad7d 100644 --- a/modules/SDL2/src/core/windows/SDL_directx.h +++ b/modules/SDL2/src/core/windows/SDL_directx.h @@ -30,7 +30,7 @@ #ifndef WIN32 #define WIN32 #endif -#undef WINNT +#undef WINNT /* Far pointers don't exist in 32-bit code */ #ifndef FAR @@ -39,35 +39,35 @@ /* Error codes not yet included in Win32 API header files */ #ifndef MAKE_HRESULT -#define MAKE_HRESULT(sev,fac,code) \ - ((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code)))) +#define MAKE_HRESULT(sev, fac, code) \ + ((HRESULT)(((unsigned long)(sev) << 31) | ((unsigned long)(fac) << 16) | ((unsigned long)(code)))) #endif #ifndef S_OK -#define S_OK (HRESULT)0x00000000L +#define S_OK (HRESULT)0x00000000L #endif #ifndef SUCCEEDED -#define SUCCEEDED(x) ((HRESULT)(x) >= 0) +#define SUCCEEDED(x) ((HRESULT)(x) >= 0) #endif #ifndef FAILED -#define FAILED(x) ((HRESULT)(x)<0) +#define FAILED(x) ((HRESULT)(x) < 0) #endif #ifndef E_FAIL -#define E_FAIL (HRESULT)0x80000008L +#define E_FAIL (HRESULT)0x80000008L #endif #ifndef E_NOINTERFACE -#define E_NOINTERFACE (HRESULT)0x80004002L +#define E_NOINTERFACE (HRESULT)0x80004002L #endif #ifndef E_OUTOFMEMORY -#define E_OUTOFMEMORY (HRESULT)0x8007000EL +#define E_OUTOFMEMORY (HRESULT)0x8007000EL #endif #ifndef E_INVALIDARG -#define E_INVALIDARG (HRESULT)0x80070057L +#define E_INVALIDARG (HRESULT)0x80070057L #endif #ifndef E_NOTIMPL -#define E_NOTIMPL (HRESULT)0x80004001L +#define E_NOTIMPL (HRESULT)0x80004001L #endif #ifndef REGDB_E_CLASSNOTREG #define REGDB_E_CLASSNOTREG (HRESULT)0x80040154L @@ -75,16 +75,16 @@ /* Severity codes */ #ifndef SEVERITY_ERROR -#define SEVERITY_ERROR 1 +#define SEVERITY_ERROR 1 #endif /* Error facility codes */ #ifndef FACILITY_WIN32 -#define FACILITY_WIN32 7 +#define FACILITY_WIN32 7 #endif #ifndef FIELD_OFFSET -#define FIELD_OFFSET(type, field) ((LONG)&(((type *)0)->field)) +#define FIELD_OFFSET(type, field) ((LONG) & (((type *)0)->field)) #endif /* DirectX headers (if it isn't included, I haven't tested it yet) @@ -103,7 +103,10 @@ #ifdef HAVE_DINPUT_H #include #else -typedef struct { int unused; } DIDEVICEINSTANCE; +typedef struct +{ + int unused; +} DIDEVICEINSTANCE; #endif #endif /* SDL_directx_h_ */ diff --git a/modules/SDL2/src/core/windows/SDL_hid.c b/modules/SDL2/src/core/windows/SDL_hid.c index 6d83d31..4082950 100644 --- a/modules/SDL2/src/core/windows/SDL_hid.c +++ b/modules/SDL2/src/core/windows/SDL_hid.c @@ -24,7 +24,6 @@ #include "SDL_hid.h" - HidD_GetString_t SDL_HidD_GetManufacturerString; HidD_GetString_t SDL_HidD_GetProductString; HidP_GetCaps_t SDL_HidP_GetCaps; @@ -36,14 +35,12 @@ HidP_GetData_t SDL_HidP_GetData; static HMODULE s_pHIDDLL = 0; static int s_HIDDLLRefCount = 0; - -int -WIN_LoadHIDDLL(void) +int WIN_LoadHIDDLL(void) { if (s_pHIDDLL) { SDL_assert(s_HIDDLLRefCount > 0); s_HIDDLLRefCount++; - return 0; /* already loaded */ + return 0; /* already loaded */ } s_pHIDDLL = LoadLibrary(TEXT("hid.dll")); @@ -61,9 +58,9 @@ WIN_LoadHIDDLL(void) SDL_HidP_GetValueCaps = (HidP_GetValueCaps_t)GetProcAddress(s_pHIDDLL, "HidP_GetValueCaps"); SDL_HidP_MaxDataListLength = (HidP_MaxDataListLength_t)GetProcAddress(s_pHIDDLL, "HidP_MaxDataListLength"); SDL_HidP_GetData = (HidP_GetData_t)GetProcAddress(s_pHIDDLL, "HidP_GetData"); - if (!SDL_HidD_GetManufacturerString || !SDL_HidD_GetProductString || - !SDL_HidP_GetCaps || !SDL_HidP_GetButtonCaps || - !SDL_HidP_GetValueCaps || !SDL_HidP_MaxDataListLength || !SDL_HidP_GetData) { + if (SDL_HidD_GetManufacturerString == NULL || SDL_HidD_GetProductString == NULL || + SDL_HidP_GetCaps == NULL || SDL_HidP_GetButtonCaps == NULL || + SDL_HidP_GetValueCaps == NULL || SDL_HidP_MaxDataListLength == NULL || SDL_HidP_GetData == NULL) { WIN_UnloadHIDDLL(); return -1; } @@ -71,8 +68,7 @@ WIN_LoadHIDDLL(void) return 0; } -void -WIN_UnloadHIDDLL(void) +void WIN_UnloadHIDDLL(void) { if (s_pHIDDLL) { SDL_assert(s_HIDDLLRefCount > 0); diff --git a/modules/SDL2/src/core/windows/SDL_hid.h b/modules/SDL2/src/core/windows/SDL_hid.h index 3cfe01a..d1348b7 100644 --- a/modules/SDL2/src/core/windows/SDL_hid.h +++ b/modules/SDL2/src/core/windows/SDL_hid.h @@ -39,155 +39,166 @@ typedef struct _HIDD_ATTRIBUTES USHORT VersionNumber; } HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES; -typedef enum { +typedef enum +{ HidP_Input = 0, HidP_Output = 1, HidP_Feature = 2 } HIDP_REPORT_TYPE; -typedef struct { - USAGE UsagePage; - UCHAR ReportID; +typedef struct +{ + USAGE UsagePage; + UCHAR ReportID; BOOLEAN IsAlias; - USHORT BitField; - USHORT LinkCollection; - USAGE LinkUsage; - USAGE LinkUsagePage; + USHORT BitField; + USHORT LinkCollection; + USAGE LinkUsage; + USAGE LinkUsagePage; BOOLEAN IsRange; BOOLEAN IsStringRange; BOOLEAN IsDesignatorRange; BOOLEAN IsAbsolute; - ULONG Reserved[ 10 ]; - union { - struct { - USAGE UsageMin; - USAGE UsageMax; - USHORT StringMin; - USHORT StringMax; - USHORT DesignatorMin; - USHORT DesignatorMax; - USHORT DataIndexMin; - USHORT DataIndexMax; + ULONG Reserved[10]; + union + { + struct + { + USAGE UsageMin; + USAGE UsageMax; + USHORT StringMin; + USHORT StringMax; + USHORT DesignatorMin; + USHORT DesignatorMax; + USHORT DataIndexMin; + USHORT DataIndexMax; } Range; - struct { - USAGE Usage; - USAGE Reserved1; - USHORT StringIndex; - USHORT Reserved2; - USHORT DesignatorIndex; - USHORT Reserved3; - USHORT DataIndex; - USHORT Reserved4; + struct + { + USAGE Usage; + USAGE Reserved1; + USHORT StringIndex; + USHORT Reserved2; + USHORT DesignatorIndex; + USHORT Reserved3; + USHORT DataIndex; + USHORT Reserved4; } NotRange; }; } HIDP_BUTTON_CAPS, *PHIDP_BUTTON_CAPS; -typedef struct { - USAGE UsagePage; - UCHAR ReportID; +typedef struct +{ + USAGE UsagePage; + UCHAR ReportID; BOOLEAN IsAlias; - USHORT BitField; - USHORT LinkCollection; - USAGE LinkUsage; - USAGE LinkUsagePage; + USHORT BitField; + USHORT LinkCollection; + USAGE LinkUsage; + USAGE LinkUsagePage; BOOLEAN IsRange; BOOLEAN IsStringRange; BOOLEAN IsDesignatorRange; BOOLEAN IsAbsolute; BOOLEAN HasNull; - UCHAR Reserved; - USHORT BitSize; - USHORT ReportCount; - USHORT Reserved2[ 5 ]; - ULONG UnitsExp; - ULONG Units; - LONG LogicalMin; - LONG LogicalMax; - LONG PhysicalMin; - LONG PhysicalMax; - union { - struct { - USAGE UsageMin; - USAGE UsageMax; - USHORT StringMin; - USHORT StringMax; - USHORT DesignatorMin; - USHORT DesignatorMax; - USHORT DataIndexMin; - USHORT DataIndexMax; + UCHAR Reserved; + USHORT BitSize; + USHORT ReportCount; + USHORT Reserved2[5]; + ULONG UnitsExp; + ULONG Units; + LONG LogicalMin; + LONG LogicalMax; + LONG PhysicalMin; + LONG PhysicalMax; + union + { + struct + { + USAGE UsageMin; + USAGE UsageMax; + USHORT StringMin; + USHORT StringMax; + USHORT DesignatorMin; + USHORT DesignatorMax; + USHORT DataIndexMin; + USHORT DataIndexMax; } Range; - struct { - USAGE Usage; - USAGE Reserved1; - USHORT StringIndex; - USHORT Reserved2; - USHORT DesignatorIndex; - USHORT Reserved3; - USHORT DataIndex; - USHORT Reserved4; + struct + { + USAGE Usage; + USAGE Reserved1; + USHORT StringIndex; + USHORT Reserved2; + USHORT DesignatorIndex; + USHORT Reserved3; + USHORT DataIndex; + USHORT Reserved4; } NotRange; }; } HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS; -typedef struct { - USAGE Usage; - USAGE UsagePage; - USHORT InputReportByteLength; - USHORT OutputReportByteLength; - USHORT FeatureReportByteLength; - USHORT Reserved[ 17 ]; - USHORT NumberLinkCollectionNodes; - USHORT NumberInputButtonCaps; - USHORT NumberInputValueCaps; - USHORT NumberInputDataIndices; - USHORT NumberOutputButtonCaps; - USHORT NumberOutputValueCaps; - USHORT NumberOutputDataIndices; - USHORT NumberFeatureButtonCaps; - USHORT NumberFeatureValueCaps; - USHORT NumberFeatureDataIndices; +typedef struct +{ + USAGE Usage; + USAGE UsagePage; + USHORT InputReportByteLength; + USHORT OutputReportByteLength; + USHORT FeatureReportByteLength; + USHORT Reserved[17]; + USHORT NumberLinkCollectionNodes; + USHORT NumberInputButtonCaps; + USHORT NumberInputValueCaps; + USHORT NumberInputDataIndices; + USHORT NumberOutputButtonCaps; + USHORT NumberOutputValueCaps; + USHORT NumberOutputDataIndices; + USHORT NumberFeatureButtonCaps; + USHORT NumberFeatureValueCaps; + USHORT NumberFeatureDataIndices; } HIDP_CAPS, *PHIDP_CAPS; -typedef struct { - USHORT DataIndex; - USHORT Reserved; - union { - ULONG RawValue; +typedef struct +{ + USHORT DataIndex; + USHORT Reserved; + union + { + ULONG RawValue; BOOLEAN On; }; } HIDP_DATA, *PHIDP_DATA; -#define HIDP_ERROR_CODES( p1, p2 ) ((NTSTATUS)(((p1) << 28) | (0x11 << 16) | (p2))) -#define HIDP_STATUS_SUCCESS HIDP_ERROR_CODES( 0x0, 0x0000 ) -#define HIDP_STATUS_NULL HIDP_ERROR_CODES( 0x8, 0x0001 ) -#define HIDP_STATUS_INVALID_PREPARSED_DATA HIDP_ERROR_CODES( 0xC, 0x0001 ) -#define HIDP_STATUS_INVALID_REPORT_TYPE HIDP_ERROR_CODES( 0xC, 0x0002 ) -#define HIDP_STATUS_INVALID_REPORT_LENGTH HIDP_ERROR_CODES( 0xC, 0x0003 ) -#define HIDP_STATUS_USAGE_NOT_FOUND HIDP_ERROR_CODES( 0xC, 0x0004 ) -#define HIDP_STATUS_VALUE_OUT_OF_RANGE HIDP_ERROR_CODES( 0xC, 0x0005 ) -#define HIDP_STATUS_BAD_LOG_PHY_VALUES HIDP_ERROR_CODES( 0xC, 0x0006 ) -#define HIDP_STATUS_BUFFER_TOO_SMALL HIDP_ERROR_CODES( 0xC, 0x0007 ) -#define HIDP_STATUS_INTERNAL_ERROR HIDP_ERROR_CODES( 0xC, 0x0008 ) -#define HIDP_STATUS_I8042_TRANS_UNKNOWN HIDP_ERROR_CODES( 0xC, 0x0009 ) -#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID HIDP_ERROR_CODES( 0xC, 0x000A ) -#define HIDP_STATUS_NOT_VALUE_ARRAY HIDP_ERROR_CODES( 0xC, 0x000B ) -#define HIDP_STATUS_IS_VALUE_ARRAY HIDP_ERROR_CODES( 0xC, 0x000C ) -#define HIDP_STATUS_DATA_INDEX_NOT_FOUND HIDP_ERROR_CODES( 0xC, 0x000D ) -#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE HIDP_ERROR_CODES( 0xC, 0x000E ) -#define HIDP_STATUS_BUTTON_NOT_PRESSED HIDP_ERROR_CODES( 0xC, 0x000F ) -#define HIDP_STATUS_REPORT_DOES_NOT_EXIST HIDP_ERROR_CODES( 0xC, 0x0010 ) -#define HIDP_STATUS_NOT_IMPLEMENTED HIDP_ERROR_CODES( 0xC, 0x0020 ) - +#define HIDP_ERROR_CODES(p1, p2) ((NTSTATUS)(((p1) << 28) | (0x11 << 16) | (p2))) +#define HIDP_STATUS_SUCCESS HIDP_ERROR_CODES(0x0, 0x0000) +#define HIDP_STATUS_NULL HIDP_ERROR_CODES(0x8, 0x0001) +#define HIDP_STATUS_INVALID_PREPARSED_DATA HIDP_ERROR_CODES(0xC, 0x0001) +#define HIDP_STATUS_INVALID_REPORT_TYPE HIDP_ERROR_CODES(0xC, 0x0002) +#define HIDP_STATUS_INVALID_REPORT_LENGTH HIDP_ERROR_CODES(0xC, 0x0003) +#define HIDP_STATUS_USAGE_NOT_FOUND HIDP_ERROR_CODES(0xC, 0x0004) +#define HIDP_STATUS_VALUE_OUT_OF_RANGE HIDP_ERROR_CODES(0xC, 0x0005) +#define HIDP_STATUS_BAD_LOG_PHY_VALUES HIDP_ERROR_CODES(0xC, 0x0006) +#define HIDP_STATUS_BUFFER_TOO_SMALL HIDP_ERROR_CODES(0xC, 0x0007) +#define HIDP_STATUS_INTERNAL_ERROR HIDP_ERROR_CODES(0xC, 0x0008) +#define HIDP_STATUS_I8042_TRANS_UNKNOWN HIDP_ERROR_CODES(0xC, 0x0009) +#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID HIDP_ERROR_CODES(0xC, 0x000A) +#define HIDP_STATUS_NOT_VALUE_ARRAY HIDP_ERROR_CODES(0xC, 0x000B) +#define HIDP_STATUS_IS_VALUE_ARRAY HIDP_ERROR_CODES(0xC, 0x000C) +#define HIDP_STATUS_DATA_INDEX_NOT_FOUND HIDP_ERROR_CODES(0xC, 0x000D) +#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE HIDP_ERROR_CODES(0xC, 0x000E) +#define HIDP_STATUS_BUTTON_NOT_PRESSED HIDP_ERROR_CODES(0xC, 0x000F) +#define HIDP_STATUS_REPORT_DOES_NOT_EXIST HIDP_ERROR_CODES(0xC, 0x0010) +#define HIDP_STATUS_NOT_IMPLEMENTED HIDP_ERROR_CODES(0xC, 0x0020) extern int WIN_LoadHIDDLL(void); extern void WIN_UnloadHIDDLL(void); -typedef BOOLEAN (WINAPI *HidD_GetString_t)(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength); -typedef NTSTATUS (WINAPI *HidP_GetCaps_t)(PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capabilities); -typedef NTSTATUS (WINAPI *HidP_GetButtonCaps_t)(HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData); -typedef NTSTATUS (WINAPI *HidP_GetValueCaps_t)(HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData); -typedef ULONG (WINAPI *HidP_MaxDataListLength_t)(HIDP_REPORT_TYPE ReportType, PHIDP_PREPARSED_DATA PreparsedData); -typedef NTSTATUS (WINAPI *HidP_GetData_t)(HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength); +typedef BOOLEAN(WINAPI *HidD_GetString_t)(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength); +typedef NTSTATUS(WINAPI *HidP_GetCaps_t)(PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capabilities); +typedef NTSTATUS(WINAPI *HidP_GetButtonCaps_t)(HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData); +typedef NTSTATUS(WINAPI *HidP_GetValueCaps_t)(HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData); +typedef ULONG(WINAPI *HidP_MaxDataListLength_t)(HIDP_REPORT_TYPE ReportType, PHIDP_PREPARSED_DATA PreparsedData); +typedef NTSTATUS(WINAPI *HidP_GetData_t)(HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength); extern HidD_GetString_t SDL_HidD_GetManufacturerString; extern HidD_GetString_t SDL_HidD_GetProductString; diff --git a/modules/SDL2/src/core/windows/SDL_immdevice.c b/modules/SDL2/src/core/windows/SDL_immdevice.c index 77a6a82..d2900f9 100644 --- a/modules/SDL2/src/core/windows/SDL_immdevice.c +++ b/modules/SDL2/src/core/windows/SDL_immdevice.c @@ -24,10 +24,11 @@ #include "SDL_windows.h" #include "SDL_immdevice.h" +#include "SDL_timer.h" #include "../../audio/SDL_sysaudio.h" #include /* For CLSIDFromString */ -static const ERole SDL_IMMDevice_role = eConsole; /* !!! FIXME: should this be eMultimedia? Should be a hint? */ +static const ERole SDL_IMMDevice_role = eConsole; /* !!! FIXME: should this be eMultimedia? Should be a hint? */ /* This is global to the WASAPI target, to handle hotplug and default device lookup. */ static IMMDeviceEnumerator *enumerator = NULL; @@ -39,6 +40,7 @@ static IMMDeviceEnumerator *enumerator = NULL; #define PropVariantInit(p) SDL_zerop(p) /* Some GUIDs we need to know without linking to libraries that aren't available before Vista. */ +/* *INDENT-OFF* */ /* clang-format off */ static const CLSID SDL_CLSID_MMDeviceEnumerator = { 0xbcde0395, 0xe52f, 0x467c,{ 0x8e, 0x3d, 0xc4, 0x57, 0x92, 0x91, 0x69, 0x2e } }; static const IID SDL_IID_IMMDeviceEnumerator = { 0xa95664d2, 0x9614, 0x4f35,{ 0xa7, 0x46, 0xde, 0x8d, 0xb6, 0x36, 0x17, 0xe6 } }; static const IID SDL_IID_IMMNotificationClient = { 0x7991eec9, 0x7e89, 0x4d85,{ 0x83, 0x90, 0x6c, 0x70, 0x3c, 0xec, 0x60, 0xc0 } }; @@ -48,13 +50,13 @@ static const PROPERTYKEY SDL_PKEY_AudioEngine_DeviceFormat = { { 0xf19f064d, 0x8 static const PROPERTYKEY SDL_PKEY_AudioEndpoint_GUID = { { 0x1da5d803, 0xd492, 0x4edd,{ 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, } }, 4 }; static const GUID SDL_KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; static const GUID SDL_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; +/* *INDENT-ON* */ /* clang-format on */ /* these increment as default devices change. Opened default devices pick up changes in their threads. */ SDL_atomic_t SDL_IMMDevice_DefaultPlaybackGeneration; SDL_atomic_t SDL_IMMDevice_DefaultCaptureGeneration; -static void -GetMMDeviceInfo(IMMDevice *device, char **utf8dev, WAVEFORMATEXTENSIBLE *fmt, GUID *guid) +static void GetMMDeviceInfo(IMMDevice *device, char **utf8dev, WAVEFORMATEXTENSIBLE *fmt, GUID *guid) { /* PKEY_Device_FriendlyName gives you "Speakers (SoundBlaster Pro)" which drives me nuts. I'd rather it be "SoundBlaster Pro (Speakers)" but I guess that's developers vs users. Windows uses the FriendlyName in @@ -91,8 +93,7 @@ typedef struct DevIdList static DevIdList *deviceid_list = NULL; -static void -SDL_IMMDevice_Remove(const SDL_bool iscapture, LPCWSTR devid, SDL_bool useguid) +static void SDL_IMMDevice_Remove(const SDL_bool iscapture, LPCWSTR devid, SDL_bool useguid) { DevIdList *i; DevIdList *next; @@ -105,7 +106,7 @@ SDL_IMMDevice_Remove(const SDL_bool iscapture, LPCWSTR devid, SDL_bool useguid) } else { deviceid_list = next; } - SDL_RemoveAudioDevice(iscapture, useguid ? ((void *) i->guid) : ((void *) i->str)); + SDL_RemoveAudioDevice(iscapture, useguid ? ((void *)i->guid) : ((void *)i->str)); SDL_free(i->str); SDL_free(i); } else { @@ -114,8 +115,7 @@ SDL_IMMDevice_Remove(const SDL_bool iscapture, LPCWSTR devid, SDL_bool useguid) } } -static void -SDL_IMMDevice_Add(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid, GUID *dsoundguid, SDL_bool useguid) +static void SDL_IMMDevice_Add(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid, GUID *dsoundguid, SDL_bool useguid) { DevIdList *devidlist; SDL_AudioSpec spec; @@ -128,22 +128,22 @@ SDL_IMMDevice_Add(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTEN phones and tablets, where you might have an internal speaker and a headphone jack and expect both to be available and switch automatically. (!!! FIXME...?) */ - /* see if we already have this one. */ + /* see if we already have this one. */ for (devidlist = deviceid_list; devidlist; devidlist = devidlist->next) { if (SDL_wcscmp(devidlist->str, devid) == 0) { - return; /* we already have this. */ + return; /* we already have this. */ } } devidlist = (DevIdList *)SDL_malloc(sizeof(*devidlist)); - if (!devidlist) { - return; /* oh well. */ + if (devidlist == NULL) { + return; /* oh well. */ } devidcopy = SDL_wcsdup(devid); if (!devidcopy) { SDL_free(devidlist); - return; /* oh well. */ + return; /* oh well. */ } if (useguid) { @@ -185,8 +185,7 @@ typedef struct SDLMMNotificationClient SDL_bool useguid; } SDLMMNotificationClient; -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_QueryInterface(IMMNotificationClient *this, REFIID iid, void **ppv) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_QueryInterface(IMMNotificationClient *this, REFIID iid, void **ppv) { if ((WIN_IsEqualIID(iid, &IID_IUnknown)) || (WIN_IsEqualIID(iid, &SDL_IID_IMMNotificationClient))) { *ppv = this; @@ -198,32 +197,29 @@ SDLMMNotificationClient_QueryInterface(IMMNotificationClient *this, REFIID iid, return E_NOINTERFACE; } -static ULONG STDMETHODCALLTYPE -SDLMMNotificationClient_AddRef(IMMNotificationClient *ithis) +static ULONG STDMETHODCALLTYPE SDLMMNotificationClient_AddRef(IMMNotificationClient *ithis) { SDLMMNotificationClient *this = (SDLMMNotificationClient *)ithis; return (ULONG)(SDL_AtomicIncRef(&this->refcount) + 1); } -static ULONG STDMETHODCALLTYPE -SDLMMNotificationClient_Release(IMMNotificationClient *ithis) +static ULONG STDMETHODCALLTYPE SDLMMNotificationClient_Release(IMMNotificationClient *ithis) { /* this is a static object; we don't ever free it. */ SDLMMNotificationClient *this = (SDLMMNotificationClient *)ithis; const ULONG retval = SDL_AtomicDecRef(&this->refcount); if (retval == 0) { - SDL_AtomicSet(&this->refcount, 0); /* uhh... */ + SDL_AtomicSet(&this->refcount, 0); /* uhh... */ return 0; } return retval - 1; } /* These are the entry points called when WASAPI device endpoints change. */ -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_OnDefaultDeviceChanged(IMMNotificationClient *ithis, EDataFlow flow, ERole role, LPCWSTR pwstrDeviceId) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_OnDefaultDeviceChanged(IMMNotificationClient *ithis, EDataFlow flow, ERole role, LPCWSTR pwstrDeviceId) { if (role != SDL_IMMDevice_role) { - return S_OK; /* ignore it. */ + return S_OK; /* ignore it. */ } /* Increment the "generation," so opened devices will pick this up in their threads. */ @@ -249,8 +245,7 @@ SDLMMNotificationClient_OnDefaultDeviceChanged(IMMNotificationClient *ithis, EDa return S_OK; } -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_OnDeviceAdded(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_OnDeviceAdded(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId) { /* we ignore this; devices added here then progress to ACTIVE, if appropriate, in OnDeviceStateChange, making that a better place to deal with device adds. More @@ -260,15 +255,13 @@ SDLMMNotificationClient_OnDeviceAdded(IMMNotificationClient *ithis, LPCWSTR pwst return S_OK; } -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_OnDeviceRemoved(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_OnDeviceRemoved(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId) { /* See notes in OnDeviceAdded handler about why we ignore this. */ return S_OK; } -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_OnDeviceStateChanged(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId, DWORD dwNewState) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_OnDeviceStateChanged(IMMNotificationClient *ithis, LPCWSTR pwstrDeviceId, DWORD dwNewState) { IMMDevice *device = NULL; @@ -278,7 +271,7 @@ SDLMMNotificationClient_OnDeviceStateChanged(IMMNotificationClient *ithis, LPCWS EDataFlow flow; if (SUCCEEDED(IMMEndpoint_GetDataFlow(endpoint, &flow))) { const SDL_bool iscapture = (flow == eCapture); - const SDLMMNotificationClient *client = (SDLMMNotificationClient*) ithis; + const SDLMMNotificationClient *client = (SDLMMNotificationClient *)ithis; if (dwNewState == DEVICE_STATE_ACTIVE) { char *utf8dev; WAVEFORMATEXTENSIBLE fmt; @@ -300,10 +293,9 @@ SDLMMNotificationClient_OnDeviceStateChanged(IMMNotificationClient *ithis, LPCWS return S_OK; } -static HRESULT STDMETHODCALLTYPE -SDLMMNotificationClient_OnPropertyValueChanged(IMMNotificationClient *this, LPCWSTR pwstrDeviceId, const PROPERTYKEY key) +static HRESULT STDMETHODCALLTYPE SDLMMNotificationClient_OnPropertyValueChanged(IMMNotificationClient *this, LPCWSTR pwstrDeviceId, const PROPERTYKEY key) { - return S_OK; /* we don't care about these. */ + return S_OK; /* we don't care about these. */ } static const IMMNotificationClientVtbl notification_client_vtbl = { @@ -319,8 +311,7 @@ static const IMMNotificationClientVtbl notification_client_vtbl = { static SDLMMNotificationClient notification_client = { ¬ification_client_vtbl, { 1 } }; -int -SDL_IMMDevice_Init(void) +int SDL_IMMDevice_Init(void) { HRESULT ret; @@ -344,8 +335,7 @@ SDL_IMMDevice_Init(void) return 0; } -void -SDL_IMMDevice_Quit(void) +void SDL_IMMDevice_Quit(void) { DevIdList *devidlist; DevIdList *next; @@ -366,22 +356,34 @@ SDL_IMMDevice_Quit(void) deviceid_list = NULL; } -int -SDL_IMMDevice_Get(LPCWSTR devid, IMMDevice **device, SDL_bool iscapture) +int SDL_IMMDevice_Get(LPCWSTR devid, IMMDevice **device, SDL_bool iscapture) { + const Uint64 timeout = SDL_GetTicks64() + 8000; /* intel's audio drivers can fail for up to EIGHT SECONDS after a device is connected or we wake from sleep. */ HRESULT ret; SDL_assert(device != NULL); - if (devid == NULL) { - const EDataFlow dataflow = iscapture ? eCapture : eRender; - ret = IMMDeviceEnumerator_GetDefaultAudioEndpoint(enumerator, dataflow, SDL_IMMDevice_role, device); - } else { - ret = IMMDeviceEnumerator_GetDevice(enumerator, devid, device); - } + while (SDL_TRUE) { + if (devid == NULL) { + const EDataFlow dataflow = iscapture ? eCapture : eRender; + ret = IMMDeviceEnumerator_GetDefaultAudioEndpoint(enumerator, dataflow, SDL_IMMDevice_role, device); + } else { + ret = IMMDeviceEnumerator_GetDevice(enumerator, devid, device); + } + + if (SUCCEEDED(ret)) { + break; + } + + if (ret == E_NOTFOUND) { + const Uint64 now = SDL_GetTicks64(); + if (timeout > now) { + const Uint64 ticksleft = timeout - now; + SDL_Delay((Uint32)SDL_min(ticksleft, 300)); /* wait awhile and try again. */ + continue; + } + } - if (FAILED(ret)) { - SDL_assert(*device == NULL); return WIN_SetErrorFromHRESULT("WASAPI can't find requested audio endpoint", ret); } return 0; @@ -422,8 +424,7 @@ static int SDLCALL sort_endpoints(const void *_a, const void *_b) return 0; } -static void -EnumerateEndpointsForFlow(const SDL_bool iscapture) +static void EnumerateEndpointsForFlow(const SDL_bool iscapture) { IMMDeviceCollection *collection = NULL; EndpointItem *items; @@ -442,8 +443,8 @@ EnumerateEndpointsForFlow(const SDL_bool iscapture) } items = (EndpointItem *)SDL_calloc(total, sizeof(EndpointItem)); - if (!items) { - return; /* oh well. */ + if (items == NULL) { + return; /* oh well. */ } for (i = 0; i < total; i++) { @@ -474,20 +475,18 @@ EnumerateEndpointsForFlow(const SDL_bool iscapture) IMMDeviceCollection_Release(collection); } -void -SDL_IMMDevice_EnumerateEndpoints(SDL_bool useguid) +void SDL_IMMDevice_EnumerateEndpoints(SDL_bool useguid) { notification_client.useguid = useguid; - EnumerateEndpointsForFlow(SDL_FALSE); /* playback */ + EnumerateEndpointsForFlow(SDL_FALSE); /* playback */ EnumerateEndpointsForFlow(SDL_TRUE); /* capture */ /* if this fails, we just won't get hotplug events. Carry on anyhow. */ IMMDeviceEnumerator_RegisterEndpointNotificationCallback(enumerator, (IMMNotificationClient *)¬ification_client); } -int -SDL_IMMDevice_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) +int SDL_IMMDevice_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture) { WAVEFORMATEXTENSIBLE fmt; IMMDevice *device = NULL; @@ -516,12 +515,11 @@ SDL_IMMDevice_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscaptur SDL_zerop(spec); spec->channels = (Uint8)fmt.Format.nChannels; spec->freq = fmt.Format.nSamplesPerSec; - spec->format = WaveFormatToSDLFormat((WAVEFORMATEX *) &fmt); + spec->format = WaveFormatToSDLFormat((WAVEFORMATEX *)&fmt); return 0; } -SDL_AudioFormat -WaveFormatToSDLFormat(WAVEFORMATEX *waveformat) +SDL_AudioFormat WaveFormatToSDLFormat(WAVEFORMATEX *waveformat) { if ((waveformat->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) && (waveformat->wBitsPerSample == 32)) { return AUDIO_F32SYS; diff --git a/modules/SDL2/src/core/windows/SDL_windows.c b/modules/SDL2/src/core/windows/SDL_windows.c index 7209ecd..350198e 100644 --- a/modules/SDL2/src/core/windows/SDL_windows.c +++ b/modules/SDL2/src/core/windows/SDL_windows.c @@ -24,41 +24,41 @@ #include "SDL_windows.h" #include "SDL_error.h" +#include "SDL_system.h" -#include /* for CoInitialize/CoUninitialize (Win32 only) */ +#include /* for CoInitialize/CoUninitialize (Win32 only) */ #if defined(HAVE_ROAPI_H) -#include /* For RoInitialize/RoUninitialize (Win32 only) */ +#include /* For RoInitialize/RoUninitialize (Win32 only) */ #else -typedef enum RO_INIT_TYPE { - RO_INIT_SINGLETHREADED = 0, - RO_INIT_MULTITHREADED = 1 +typedef enum RO_INIT_TYPE +{ + RO_INIT_SINGLETHREADED = 0, + RO_INIT_MULTITHREADED = 1 } RO_INIT_TYPE; #endif #ifndef _WIN32_WINNT_VISTA -#define _WIN32_WINNT_VISTA 0x0600 +#define _WIN32_WINNT_VISTA 0x0600 #endif #ifndef _WIN32_WINNT_WIN7 -#define _WIN32_WINNT_WIN7 0x0601 +#define _WIN32_WINNT_WIN7 0x0601 #endif #ifndef _WIN32_WINNT_WIN8 -#define _WIN32_WINNT_WIN8 0x0602 +#define _WIN32_WINNT_WIN8 0x0602 #endif #ifndef LOAD_LIBRARY_SEARCH_SYSTEM32 #define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 #endif - /* Sets an error message based on an HRESULT */ -int -WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr) +int WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr) { TCHAR buffer[1024]; char *message; TCHAR *p = buffer; DWORD c = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, hr, 0, - buffer, SDL_arraysize(buffer), NULL); + buffer, SDL_arraysize(buffer), NULL); buffer[c] = 0; /* kill CR/LF that FormatMessage() sticks at the end */ while (*p) { @@ -75,8 +75,7 @@ WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr) } /* Sets an error message based on GetLastError() */ -int -WIN_SetError(const char *prefix) +int WIN_SetError(const char *prefix) { return WIN_SetErrorFromHRESULT(prefix, GetLastError()); } @@ -115,8 +114,7 @@ WIN_CoInitialize(void) #endif } -void -WIN_CoUninitialize(void) +void WIN_CoUninitialize(void) { #ifndef __WINRT__ CoUninitialize(); @@ -124,15 +122,14 @@ WIN_CoUninitialize(void) } #ifndef __WINRT__ -void * -WIN_LoadComBaseFunction(const char *name) +void *WIN_LoadComBaseFunction(const char *name) { static SDL_bool s_bLoaded; static HMODULE s_hComBase; - + if (!s_bLoaded) { - s_hComBase = LoadLibraryEx(TEXT("combase.dll"), NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); - s_bLoaded = SDL_TRUE; + s_hComBase = LoadLibraryEx(TEXT("combase.dll"), NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + s_bLoaded = SDL_TRUE; } if (s_hComBase) { return GetProcAddress(s_hComBase, name); @@ -148,7 +145,7 @@ WIN_RoInitialize(void) #ifdef __WINRT__ return S_OK; #else - typedef HRESULT (WINAPI *RoInitialize_t)(RO_INIT_TYPE initType); + typedef HRESULT(WINAPI * RoInitialize_t)(RO_INIT_TYPE initType); RoInitialize_t RoInitializeFunc = (RoInitialize_t)WIN_LoadComBaseFunction("RoInitialize"); if (RoInitializeFunc) { /* RO_INIT_SINGLETHREADED is equivalent to COINIT_APARTMENTTHREADED */ @@ -170,11 +167,10 @@ WIN_RoInitialize(void) #endif } -void -WIN_RoUninitialize(void) +void WIN_RoUninitialize(void) { #ifndef __WINRT__ - typedef void (WINAPI *RoUninitialize_t)(void); + typedef void(WINAPI * RoUninitialize_t)(void); RoUninitialize_t RoUninitializeFunc = (RoUninitialize_t)WIN_LoadComBaseFunction("RoUninitialize"); if (RoUninitializeFunc) { RoUninitializeFunc(); @@ -183,16 +179,15 @@ WIN_RoUninitialize(void) } #if !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -static BOOL -IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor) +static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor) { OSVERSIONINFOEXW osvi; DWORDLONG const dwlConditionMask = VerSetConditionMask( VerSetConditionMask( - VerSetConditionMask( - 0, VER_MAJORVERSION, VER_GREATER_EQUAL ), - VER_MINORVERSION, VER_GREATER_EQUAL ), - VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL ); + VerSetConditionMask( + 0, VER_MAJORVERSION, VER_GREATER_EQUAL), + VER_MINORVERSION, VER_GREATER_EQUAL), + VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); SDL_zero(osvi); osvi.dwOSVersionInfoSize = sizeof(osvi); @@ -252,11 +247,10 @@ has the same problem.) WASAPI doesn't need this. This is just for DirectSound/WinMM. */ -char * -WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid) +char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid) { #if defined(__WINRT__) || defined(__XBOXONE__) || defined(__XBOXSERIES__) - return WIN_StringToUTF8(name); /* No registry access on WinRT/UWP and Xbox, go with what we've got. */ + return WIN_StringToUTF8(name); /* No registry access on WinRT/UWP and Xbox, go with what we've got. */ #else static const GUID nullguid = { 0 }; const unsigned char *ptr; @@ -268,42 +262,42 @@ WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid) char *retval = NULL; if (WIN_IsEqualGUID(guid, &nullguid)) { - return WIN_StringToUTF8(name); /* No GUID, go with what we've got. */ + return WIN_StringToUTF8(name); /* No GUID, go with what we've got. */ } - ptr = (const unsigned char *) guid; - SDL_snprintf(keystr, sizeof (keystr), - "System\\CurrentControlSet\\Control\\MediaCategories\\{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - ptr[3], ptr[2], ptr[1], ptr[0], ptr[5], ptr[4], ptr[7], ptr[6], - ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); + ptr = (const unsigned char *)guid; + (void)SDL_snprintf(keystr, sizeof(keystr), + "System\\CurrentControlSet\\Control\\MediaCategories\\{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + ptr[3], ptr[2], ptr[1], ptr[0], ptr[5], ptr[4], ptr[7], ptr[6], + ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); strw = WIN_UTF8ToString(keystr); rc = (RegOpenKeyExW(HKEY_LOCAL_MACHINE, strw, 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS); SDL_free(strw); if (!rc) { - return WIN_StringToUTF8(name); /* oh well. */ + return WIN_StringToUTF8(name); /* oh well. */ } rc = (RegQueryValueExW(hkey, L"Name", NULL, NULL, NULL, &len) == ERROR_SUCCESS); if (!rc) { RegCloseKey(hkey); - return WIN_StringToUTF8(name); /* oh well. */ + return WIN_StringToUTF8(name); /* oh well. */ } - strw = (WCHAR *) SDL_malloc(len + sizeof (WCHAR)); - if (!strw) { + strw = (WCHAR *)SDL_malloc(len + sizeof(WCHAR)); + if (strw == NULL) { RegCloseKey(hkey); - return WIN_StringToUTF8(name); /* oh well. */ + return WIN_StringToUTF8(name); /* oh well. */ } - rc = (RegQueryValueExW(hkey, L"Name", NULL, NULL, (LPBYTE) strw, &len) == ERROR_SUCCESS); + rc = (RegQueryValueExW(hkey, L"Name", NULL, NULL, (LPBYTE)strw, &len) == ERROR_SUCCESS); RegCloseKey(hkey); if (!rc) { SDL_free(strw); - return WIN_StringToUTF8(name); /* oh well. */ + return WIN_StringToUTF8(name); /* oh well. */ } - strw[len / 2] = 0; /* make sure it's null-terminated. */ + strw[len / 2] = 0; /* make sure it's null-terminated. */ retval = WIN_StringToUTF8(strw); SDL_free(strw); @@ -311,20 +305,17 @@ WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid) #endif /* if __WINRT__ / else */ } -BOOL -WIN_IsEqualGUID(const GUID * a, const GUID * b) +BOOL WIN_IsEqualGUID(const GUID *a, const GUID *b) { - return (SDL_memcmp(a, b, sizeof (*a)) == 0); + return SDL_memcmp(a, b, sizeof(*a)) == 0; } -BOOL -WIN_IsEqualIID(REFIID a, REFIID b) +BOOL WIN_IsEqualIID(REFIID a, REFIID b) { - return (SDL_memcmp(a, b, sizeof (*a)) == 0); + return SDL_memcmp(a, b, sizeof(*a)) == 0; } -void -WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect) +void WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect) { sdlrect->x = winrect->left; sdlrect->w = (winrect->right - winrect->left) + 1; @@ -332,8 +323,7 @@ WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect) sdlrect->h = (winrect->bottom - winrect->top) + 1; } -void -WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect) +void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect) { winrect->left = sdlrect->x; winrect->right = sdlrect->x + sdlrect->w - 1; @@ -341,6 +331,56 @@ WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect) winrect->bottom = sdlrect->y + sdlrect->h - 1; } +BOOL WIN_IsRectEmpty(const RECT *rect) +{ + /* Calculating this manually because UWP and Xbox do not support Win32 IsRectEmpty. */ + return (rect->right <= rect->left) || (rect->bottom <= rect->top); +} #endif /* defined(__WIN32__) || defined(__WINRT__) || defined(__GDK__) */ +/* + * Public APIs + */ +#if !defined(SDL_VIDEO_DRIVER_WINDOWS) + +#if defined(__WIN32__) || defined(__GDK__) +int SDL_RegisterApp(const char *name, Uint32 style, void *hInst) +{ + (void)name; + (void)style; + (void)hInst; + return 0; +} + +void SDL_UnregisterApp(void) +{ +} + +void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata) +{ +} +#endif /* __WIN32__ || __GDK__ */ + +#if defined(__WIN32__) || defined(__WINGDK__) +int SDL_Direct3D9GetAdapterIndex(int displayIndex) +{ + (void)displayIndex; + return 0; /* D3DADAPTER_DEFAULT */ +} + +SDL_bool SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) +{ + (void)displayIndex; + if (adapterIndex) { + *adapterIndex = -1; + } + if (outputIndex) { + *outputIndex = -1; + } + return SDL_FALSE; +} +#endif /* __WIN32__ || __WINGDK__ */ + +#endif /* !SDL_VIDEO_DRIVER_WINDOWS */ + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/core/windows/SDL_windows.h b/modules/SDL2/src/core/windows/SDL_windows.h index 5eb82d4..3842e08 100644 --- a/modules/SDL2/src/core/windows/SDL_windows.h +++ b/modules/SDL2/src/core/windows/SDL_windows.h @@ -37,13 +37,13 @@ #undef WINVER #undef _WIN32_WINNT #if defined(SDL_VIDEO_RENDER_D3D12) -#define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */ +#define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */ #elif defined(HAVE_SHELLSCALINGAPI_H) -#define _WIN32_WINNT 0x603 /* For DPI support */ +#define _WIN32_WINNT 0x603 /* For DPI support */ #else -#define _WIN32_WINNT 0x501 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices(), 0x501 for raw input */ +#define _WIN32_WINNT 0x501 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices(), 0x501 for raw input */ #endif -#define WINVER _WIN32_WINNT +#define WINVER _WIN32_WINNT #elif defined(__WINGDK__) #ifndef WIN32_LEAN_AND_MEAN @@ -57,8 +57,8 @@ #endif #undef WINVER #undef _WIN32_WINNT -#define _WIN32_WINNT 0xA00 -#define WINVER _WIN32_WINNT +#define _WIN32_WINNT 0xA00 +#define WINVER _WIN32_WINNT #elif defined(__XBOXONE__) || defined(__XBOXSERIES__) #ifndef WIN32_LEAN_AND_MEAN @@ -76,8 +76,21 @@ #define WINVER _WIN32_WINNT #endif +/* See https://github.com/libsdl-org/SDL/pull/7607 */ +/* force_align_arg_pointer attribute requires gcc >= 4.2.x. */ +#if defined(__clang__) +#define HAVE_FORCE_ALIGN_ARG_POINTER +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#define HAVE_FORCE_ALIGN_ARG_POINTER +#endif +#if defined(__GNUC__) && defined(__i386__) && defined(HAVE_FORCE_ALIGN_ARG_POINTER) +#define MINGW32_FORCEALIGN __attribute__((force_align_arg_pointer)) +#else +#define MINGW32_FORCEALIGN +#endif + #include -#include /* for REFIID with broken mingw.org headers */ +#include /* for REFIID with broken mingw.org headers */ /* Older Visual C++ headers don't have the Win64-compatible typedefs... */ #if defined(_MSC_VER) && (_MSC_VER <= 1200) @@ -92,21 +105,21 @@ #include "SDL_rect.h" /* Routines to convert from UTF8 to native Windows text */ -#define WIN_StringToUTF8W(S) SDL_iconv_string("UTF-8", "UTF-16LE", (const char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR)) -#define WIN_UTF8ToStringW(S) (WCHAR *)SDL_iconv_string("UTF-16LE", "UTF-8", (const char *)(S), SDL_strlen(S)+1) +#define WIN_StringToUTF8W(S) SDL_iconv_string("UTF-8", "UTF-16LE", (const char *)(S), (SDL_wcslen(S) + 1) * sizeof(WCHAR)) +#define WIN_UTF8ToStringW(S) (WCHAR *)SDL_iconv_string("UTF-16LE", "UTF-8", (const char *)(S), SDL_strlen(S) + 1) /* !!! FIXME: UTF8ToString() can just be a SDL_strdup() here. */ -#define WIN_StringToUTF8A(S) SDL_iconv_string("UTF-8", "ASCII", (const char *)(S), (SDL_strlen(S)+1)) -#define WIN_UTF8ToStringA(S) SDL_iconv_string("ASCII", "UTF-8", (const char *)(S), SDL_strlen(S)+1) +#define WIN_StringToUTF8A(S) SDL_iconv_string("UTF-8", "ASCII", (const char *)(S), (SDL_strlen(S) + 1)) +#define WIN_UTF8ToStringA(S) SDL_iconv_string("ASCII", "UTF-8", (const char *)(S), SDL_strlen(S) + 1) #if UNICODE #define WIN_StringToUTF8 WIN_StringToUTF8W #define WIN_UTF8ToString WIN_UTF8ToStringW -#define SDL_tcslen SDL_wcslen -#define SDL_tcsstr SDL_wcsstr +#define SDL_tcslen SDL_wcslen +#define SDL_tcsstr SDL_wcsstr #else #define WIN_StringToUTF8 WIN_StringToUTF8A #define WIN_UTF8ToString WIN_UTF8ToStringA -#define SDL_tcslen SDL_strlen -#define SDL_tcsstr SDL_strstr +#define SDL_tcslen SDL_strlen +#define SDL_tcsstr SDL_strstr #endif /* Set up for C function definitions, even when using C++ */ @@ -146,13 +159,16 @@ extern BOOL WIN_IsWindows8OrGreater(void); extern char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid); /* Checks to see if two GUID are the same. */ -extern BOOL WIN_IsEqualGUID(const GUID * a, const GUID * b); +extern BOOL WIN_IsEqualGUID(const GUID *a, const GUID *b); extern BOOL WIN_IsEqualIID(REFIID a, REFIID b); /* Convert between SDL_rect and RECT */ extern void WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect); extern void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect); +/* Returns SDL_TRUE if the rect is empty */ +extern BOOL WIN_IsRectEmpty(const RECT *rect); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/modules/SDL2/src/core/windows/SDL_xinput.c b/modules/SDL2/src/core/windows/SDL_xinput.c index e827586..1ebefcf 100644 --- a/modules/SDL2/src/core/windows/SDL_xinput.c +++ b/modules/SDL2/src/core/windows/SDL_xinput.c @@ -33,14 +33,12 @@ XInputGetCapabilities_t SDL_XInputGetCapabilities = NULL; XInputGetBatteryInformation_t SDL_XInputGetBatteryInformation = NULL; DWORD SDL_XInputVersion = 0; -static HANDLE s_pXInputDLL = 0; +static HMODULE s_pXInputDLL = NULL; static int s_XInputDLLRefCount = 0; - #if defined(__WINRT__) || defined(__XBOXONE__) || defined(__XBOXSERIES__) -int -WIN_LoadXInputDLL(void) +int WIN_LoadXInputDLL(void) { /* Getting handles to system dlls (via LoadLibrary and its variants) is not * supported on WinRT, thus, pointers to XInput's functions can't be @@ -65,22 +63,20 @@ WIN_LoadXInputDLL(void) return 0; } -void -WIN_UnloadXInputDLL(void) +void WIN_UnloadXInputDLL(void) { } #else /* !(defined(__WINRT__) || defined(__XBOXONE__) || defined(__XBOXSERIES__)) */ -int -WIN_LoadXInputDLL(void) +int WIN_LoadXInputDLL(void) { DWORD version = 0; if (s_pXInputDLL) { SDL_assert(s_XInputDLLRefCount > 0); s_XInputDLLRefCount++; - return 0; /* already loaded */ + return 0; /* already loaded */ } /* NOTE: Don't load XinputUap.dll @@ -88,10 +84,10 @@ WIN_LoadXInputDLL(void) * limitations of that API (no devices at startup, no background input, etc.) */ version = (1 << 16) | 4; - s_pXInputDLL = LoadLibrary(TEXT("XInput1_4.dll")); /* 1.4 Ships with Windows 8. */ + s_pXInputDLL = LoadLibrary(TEXT("XInput1_4.dll")); /* 1.4 Ships with Windows 8. */ if (!s_pXInputDLL) { version = (1 << 16) | 3; - s_pXInputDLL = LoadLibrary(TEXT("XInput1_3.dll")); /* 1.3 can be installed as a redistributable component. */ + s_pXInputDLL = LoadLibrary(TEXT("XInput1_3.dll")); /* 1.3 can be installed as a redistributable component. */ } if (!s_pXInputDLL) { s_pXInputDLL = LoadLibrary(TEXT("bin\\XInput1_3.dll")); @@ -109,14 +105,14 @@ WIN_LoadXInputDLL(void) s_XInputDLLRefCount = 1; /* 100 is the ordinal for _XInputGetStateEx, which returns the same struct as XinputGetState, but with extra data in wButtons for the guide button, we think... */ - SDL_XInputGetState = (XInputGetState_t)GetProcAddress((HMODULE)s_pXInputDLL, (LPCSTR)100); - if (!SDL_XInputGetState) { - SDL_XInputGetState = (XInputGetState_t)GetProcAddress((HMODULE)s_pXInputDLL, "XInputGetState"); + SDL_XInputGetState = (XInputGetState_t)GetProcAddress(s_pXInputDLL, (LPCSTR)100); + if (SDL_XInputGetState == NULL) { + SDL_XInputGetState = (XInputGetState_t)GetProcAddress(s_pXInputDLL, "XInputGetState"); } - SDL_XInputSetState = (XInputSetState_t)GetProcAddress((HMODULE)s_pXInputDLL, "XInputSetState"); - SDL_XInputGetCapabilities = (XInputGetCapabilities_t)GetProcAddress((HMODULE)s_pXInputDLL, "XInputGetCapabilities"); - SDL_XInputGetBatteryInformation = (XInputGetBatteryInformation_t)GetProcAddress( (HMODULE)s_pXInputDLL, "XInputGetBatteryInformation" ); - if (!SDL_XInputGetState || !SDL_XInputSetState || !SDL_XInputGetCapabilities) { + SDL_XInputSetState = (XInputSetState_t)GetProcAddress(s_pXInputDLL, "XInputSetState"); + SDL_XInputGetCapabilities = (XInputGetCapabilities_t)GetProcAddress(s_pXInputDLL, "XInputGetCapabilities"); + SDL_XInputGetBatteryInformation = (XInputGetBatteryInformation_t)GetProcAddress(s_pXInputDLL, "XInputGetBatteryInformation"); + if (SDL_XInputGetState == NULL || SDL_XInputSetState == NULL || SDL_XInputGetCapabilities == NULL) { WIN_UnloadXInputDLL(); return -1; } @@ -124,8 +120,7 @@ WIN_LoadXInputDLL(void) return 0; } -void -WIN_UnloadXInputDLL(void) +void WIN_UnloadXInputDLL(void) { if (s_pXInputDLL) { SDL_assert(s_XInputDLLRefCount > 0); diff --git a/modules/SDL2/src/core/windows/SDL_xinput.h b/modules/SDL2/src/core/windows/SDL_xinput.h index 3e27c2a..acdd8d5 100644 --- a/modules/SDL2/src/core/windows/SDL_xinput.h +++ b/modules/SDL2/src/core/windows/SDL_xinput.h @@ -39,7 +39,7 @@ using namespace XInputOnGameInput; #define XUSER_MAX_COUNT 4 #endif #ifndef XUSER_INDEX_ANY -#define XUSER_INDEX_ANY 0x000000FF +#define XUSER_INDEX_ANY 0x000000FF #endif #ifndef XINPUT_CAPS_FFB_SUPPORTED #define XINPUT_CAPS_FFB_SUPPORTED 0x0001 @@ -131,29 +131,29 @@ using namespace XInputOnGameInput; #endif #ifndef BATTERY_DEVTYPE_GAMEPAD -#define BATTERY_DEVTYPE_GAMEPAD 0x00 +#define BATTERY_DEVTYPE_GAMEPAD 0x00 #endif #ifndef BATTERY_TYPE_DISCONNECTED -#define BATTERY_TYPE_DISCONNECTED 0x00 +#define BATTERY_TYPE_DISCONNECTED 0x00 #endif #ifndef BATTERY_TYPE_WIRED -#define BATTERY_TYPE_WIRED 0x01 +#define BATTERY_TYPE_WIRED 0x01 #endif #ifndef BATTERY_TYPE_UNKNOWN -#define BATTERY_TYPE_UNKNOWN 0xFF +#define BATTERY_TYPE_UNKNOWN 0xFF #endif #ifndef BATTERY_LEVEL_EMPTY -#define BATTERY_LEVEL_EMPTY 0x00 +#define BATTERY_LEVEL_EMPTY 0x00 #endif #ifndef BATTERY_LEVEL_LOW -#define BATTERY_LEVEL_LOW 0x01 +#define BATTERY_LEVEL_LOW 0x01 #endif #ifndef BATTERY_LEVEL_MEDIUM -#define BATTERY_LEVEL_MEDIUM 0x02 +#define BATTERY_LEVEL_MEDIUM 0x02 #endif #ifndef BATTERY_LEVEL_FULL -#define BATTERY_LEVEL_FULL 0x03 +#define BATTERY_LEVEL_FULL 0x03 #endif /* Set up for C function definitions, even when using C++ */ @@ -222,31 +222,26 @@ typedef struct #endif /* HAVE_XINPUT_H */ /* Forward decl's for XInput API's we load dynamically and use if available */ -typedef DWORD (WINAPI *XInputGetState_t) - ( - DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ - XINPUT_STATE_EX* pState /* [out] Receives the current state */ - ); - -typedef DWORD (WINAPI *XInputSetState_t) - ( - DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ - XINPUT_VIBRATION* pVibration /* [in, out] The vibration information to send to the controller */ - ); - -typedef DWORD (WINAPI *XInputGetCapabilities_t) - ( - DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ - DWORD dwFlags, /* [in] Input flags that identify the device type */ - XINPUT_CAPABILITIES* pCapabilities /* [out] Receives the capabilities */ - ); - -typedef DWORD (WINAPI *XInputGetBatteryInformation_t) - ( - DWORD dwUserIndex, - BYTE devType, - XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation - ); +typedef DWORD(WINAPI *XInputGetState_t)( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + XINPUT_STATE_EX *pState /* [out] Receives the current state */ +); + +typedef DWORD(WINAPI *XInputSetState_t)( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + XINPUT_VIBRATION *pVibration /* [in, out] The vibration information to send to the controller */ +); + +typedef DWORD(WINAPI *XInputGetCapabilities_t)( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + DWORD dwFlags, /* [in] Input flags that identify the device type */ + XINPUT_CAPABILITIES *pCapabilities /* [out] Receives the capabilities */ +); + +typedef DWORD(WINAPI *XInputGetBatteryInformation_t)( + DWORD dwUserIndex, + BYTE devType, + XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation); extern int WIN_LoadXInputDLL(void); extern void WIN_UnloadXInputDLL(void); @@ -255,17 +250,17 @@ extern XInputGetState_t SDL_XInputGetState; extern XInputSetState_t SDL_XInputSetState; extern XInputGetCapabilities_t SDL_XInputGetCapabilities; extern XInputGetBatteryInformation_t SDL_XInputGetBatteryInformation; -extern DWORD SDL_XInputVersion; /* ((major << 16) & 0xFF00) | (minor & 0xFF) */ +extern DWORD SDL_XInputVersion; /* ((major << 16) & 0xFF00) | (minor & 0xFF) */ /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif -#define XINPUTGETSTATE SDL_XInputGetState -#define XINPUTSETSTATE SDL_XInputSetState -#define XINPUTGETCAPABILITIES SDL_XInputGetCapabilities -#define XINPUTGETBATTERYINFORMATION SDL_XInputGetBatteryInformation +#define XINPUTGETSTATE SDL_XInputGetState +#define XINPUTSETSTATE SDL_XInputSetState +#define XINPUTGETCAPABILITIES SDL_XInputGetCapabilities +#define XINPUTGETBATTERYINFORMATION SDL_XInputGetBatteryInformation #endif /* SDL_xinput_h_ */ diff --git a/modules/SDL2/src/core/winrt/SDL_winrtapp_common.cpp b/modules/SDL2/src/core/winrt/SDL_winrtapp_common.cpp index f17dd42..52618b2 100644 --- a/modules/SDL2/src/core/winrt/SDL_winrtapp_common.cpp +++ b/modules/SDL2/src/core/winrt/SDL_winrtapp_common.cpp @@ -30,7 +30,7 @@ int (*WINRT_SDLAppEntryPoint)(int, char **) = NULL; extern "C" DECLSPEC int -SDL_WinRTRunApp(SDL_main_func mainFunction, void * xamlBackgroundPanel) +SDL_WinRTRunApp(SDL_main_func mainFunction, void *xamlBackgroundPanel) { if (xamlBackgroundPanel) { return SDL_WinRTInitXAMLApp(mainFunction, xamlBackgroundPanel); @@ -42,23 +42,17 @@ SDL_WinRTRunApp(SDL_main_func mainFunction, void * xamlBackgroundPanel) } } - extern "C" DECLSPEC SDL_WinRT_DeviceFamily SDL_WinRTGetDeviceFamily() { -#if NTDDI_VERSION >= NTDDI_WIN10 /* !!! FIXME: I have no idea if this is the right test. This is a UWP API, I think. Older windows should...just return "mobile"? I don't know. --ryan. */ - Platform::String^ deviceFamily = Windows::System::Profile::AnalyticsInfo::VersionInfo->DeviceFamily; +#if NTDDI_VERSION >= NTDDI_WIN10 /* !!! FIXME: I have no idea if this is the right test. This is a UWP API, I think. Older windows should...just return "mobile"? I don't know. --ryan. */ + Platform::String ^ deviceFamily = Windows::System::Profile::AnalyticsInfo::VersionInfo->DeviceFamily; - if (deviceFamily->Equals("Windows.Desktop")) - { + if (deviceFamily->Equals("Windows.Desktop")) { return SDL_WINRT_DEVICEFAMILY_DESKTOP; - } - else if (deviceFamily->Equals("Windows.Mobile")) - { + } else if (deviceFamily->Equals("Windows.Mobile")) { return SDL_WINRT_DEVICEFAMILY_MOBILE; - } - else if (deviceFamily->Equals("Windows.Xbox")) - { + } else if (deviceFamily->Equals("Windows.Xbox")) { return SDL_WINRT_DEVICEFAMILY_XBOX; } #endif diff --git a/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp b/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp index 6fc4560..5fe6f33 100644 --- a/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp +++ b/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp @@ -26,7 +26,6 @@ #include using namespace std; - /* Windows includes */ #include "ppltasks.h" using namespace concurrency; @@ -44,7 +43,6 @@ using namespace Windows::UI::Input; using namespace Windows::Phone::UI::Input; #endif - /* SDL includes */ extern "C" { #include "SDL_events.h" @@ -53,7 +51,6 @@ extern "C" { #include "SDL_stdinc.h" #include "SDL_render.h" #include "../../video/SDL_sysvideo.h" -//#include "../../SDL_hints_c.h" #include "../../events/SDL_events_c.h" #include "../../events/SDL_keyboard_c.h" #include "../../events/SDL_mouse_c.h" @@ -74,13 +71,11 @@ extern "C" { extern "C" void D3D11_Trim(SDL_Renderer *); #endif - // Compile-time debugging options: // To enable, uncomment; to disable, comment them out. -//#define LOG_POINTER_EVENTS 1 -//#define LOG_WINDOW_EVENTS 1 -//#define LOG_ORIENTATION_EVENTS 1 - +// #define LOG_POINTER_EVENTS 1 +// #define LOG_WINDOW_EVENTS 1 +// #define LOG_ORIENTATION_EVENTS 1 // HACK, DLudwig: record a reference to the global, WinRT 'app'/view. // SDL/WinRT will use this throughout its code. @@ -93,19 +88,18 @@ SDL_WinRTApp ^ SDL_WinRTGlobalApp = nullptr; ref class SDLApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource { -public: - virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView(); + public: + virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView(); }; -IFrameworkView^ SDLApplicationSource::CreateView() +IFrameworkView ^ SDLApplicationSource::CreateView() { // TODO, WinRT: see if this function (CreateView) can ever get called // more than once. For now, just prevent it from ever assigning // SDL_WinRTGlobalApp more than once. SDL_assert(!SDL_WinRTGlobalApp); SDL_WinRTApp ^ app = ref new SDL_WinRTApp(); - if (!SDL_WinRTGlobalApp) - { + if (!SDL_WinRTGlobalApp) { SDL_WinRTGlobalApp = app; } return app; @@ -119,14 +113,13 @@ int SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **)) return 0; } -static void -WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identifying thing into WINRT_ProcessWindowSizeChange() +static void WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identifying thing into WINRT_ProcessWindowSizeChange() { CoreWindow ^ coreWindow = CoreWindow::GetForCurrentThread(); if (coreWindow) { if (WINRT_GlobalSDLWindow) { - SDL_Window * window = WINRT_GlobalSDLWindow; - SDL_WindowData * data = (SDL_WindowData *) window->driverdata; + SDL_Window *window = WINRT_GlobalSDLWindow; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; int x = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Left); int y = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Top); @@ -145,12 +138,13 @@ WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identifying thing in */ const DisplayOrientations currentOrientation = WINRT_DISPLAY_PROPERTY(CurrentOrientation); switch (currentOrientation) { - case DisplayOrientations::Landscape: - case DisplayOrientations::LandscapeFlipped: { - int tmp = w; - w = h; - h = tmp; - } break; + case DisplayOrientations::Landscape: + case DisplayOrientations::LandscapeFlipped: + { + int tmp = w; + w = h; + h = tmp; + } break; } #endif @@ -171,25 +165,24 @@ WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identifying thing in } } -SDL_WinRTApp::SDL_WinRTApp() : - m_windowClosed(false), - m_windowVisible(true) +SDL_WinRTApp::SDL_WinRTApp() : m_windowClosed(false), + m_windowVisible(true) { } -void SDL_WinRTApp::Initialize(CoreApplicationView^ applicationView) +void SDL_WinRTApp::Initialize(CoreApplicationView ^ applicationView) { applicationView->Activated += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnAppActivated); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnAppActivated); CoreApplication::Suspending += - ref new EventHandler(this, &SDL_WinRTApp::OnSuspending); + ref new EventHandler(this, &SDL_WinRTApp::OnSuspending); CoreApplication::Resuming += - ref new EventHandler(this, &SDL_WinRTApp::OnResuming); + ref new EventHandler(this, &SDL_WinRTApp::OnResuming); CoreApplication::Exiting += - ref new EventHandler(this, &SDL_WinRTApp::OnExiting); + ref new EventHandler(this, &SDL_WinRTApp::OnExiting); #if NTDDI_VERSION >= NTDDI_WIN10 /* HACK ALERT! Xbox One doesn't seem to detect gamepads unless something @@ -198,37 +191,36 @@ void SDL_WinRTApp::Initialize(CoreApplicationView^ applicationView) sure that gamepad detection works later on, if requested. */ Windows::Gaming::Input::Gamepad::GamepadAdded += - ref new Windows::Foundation::EventHandler( - this, &SDL_WinRTApp::OnGamepadAdded - ); + ref new Windows::Foundation::EventHandler( + this, &SDL_WinRTApp::OnGamepadAdded); #endif } #if NTDDI_VERSION > NTDDI_WIN8 -void SDL_WinRTApp::OnOrientationChanged(DisplayInformation^ sender, Object^ args) +void SDL_WinRTApp::OnOrientationChanged(DisplayInformation ^ sender, Object ^ args) #else -void SDL_WinRTApp::OnOrientationChanged(Object^ sender) +void SDL_WinRTApp::OnOrientationChanged(Object ^ sender) #endif { -#if LOG_ORIENTATION_EVENTS==1 +#if LOG_ORIENTATION_EVENTS == 1 { - CoreWindow^ window = CoreWindow::GetForCurrentThread(); + CoreWindow ^ window = CoreWindow::GetForCurrentThread(); if (window) { SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d, CoreWindow Bounds={%f,%f,%f,%f}\n", - __FUNCTION__, - WINRT_DISPLAY_PROPERTY(CurrentOrientation), - WINRT_DISPLAY_PROPERTY(NativeOrientation), - WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), - window->Bounds.X, - window->Bounds.Y, - window->Bounds.Width, - window->Bounds.Height); + __FUNCTION__, + WINRT_DISPLAY_PROPERTY(CurrentOrientation), + WINRT_DISPLAY_PROPERTY(NativeOrientation), + WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), + window->Bounds.X, + window->Bounds.Y, + window->Bounds.Width, + window->Bounds.Height); } else { SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d\n", - __FUNCTION__, - WINRT_DISPLAY_PROPERTY(CurrentOrientation), - WINRT_DISPLAY_PROPERTY(NativeOrientation), - WINRT_DISPLAY_PROPERTY(AutoRotationPreferences)); + __FUNCTION__, + WINRT_DISPLAY_PROPERTY(CurrentOrientation), + WINRT_DISPLAY_PROPERTY(NativeOrientation), + WINRT_DISPLAY_PROPERTY(AutoRotationPreferences)); } } #endif @@ -245,121 +237,118 @@ void SDL_WinRTApp::OnOrientationChanged(Object^ sender) // I'm not currently sure why this is, but it seems to work fine. -- David L. // // TODO, WinRT: do more extensive research into why orientation changes on Win 8.x don't need D3D changes, or if they might, in some cases - SDL_Window * window = WINRT_GlobalSDLWindow; + SDL_Window *window = WINRT_GlobalSDLWindow; if (window) { - SDL_WindowData * data = (SDL_WindowData *)window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; int w = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Width); int h = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Height); SDL_SendWindowEvent(WINRT_GlobalSDLWindow, SDL_WINDOWEVENT_SIZE_CHANGED, w, h); } #endif - } -void SDL_WinRTApp::SetWindow(CoreWindow^ window) +void SDL_WinRTApp::SetWindow(CoreWindow ^ window) { -#if LOG_WINDOW_EVENTS==1 +#if LOG_WINDOW_EVENTS == 1 SDL_Log("%s, current orientation=%d, native orientation=%d, auto rot. pref=%d, window bounds={%f, %f, %f,%f}\n", - __FUNCTION__, - WINRT_DISPLAY_PROPERTY(CurrentOrientation), - WINRT_DISPLAY_PROPERTY(NativeOrientation), - WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), - window->Bounds.X, - window->Bounds.Y, - window->Bounds.Width, - window->Bounds.Height); + __FUNCTION__, + WINRT_DISPLAY_PROPERTY(CurrentOrientation), + WINRT_DISPLAY_PROPERTY(NativeOrientation), + WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), + window->Bounds.X, + window->Bounds.Y, + window->Bounds.Width, + window->Bounds.Height); #endif - window->SizeChanged += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowSizeChanged); + window->SizeChanged += + ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowSizeChanged); window->VisibilityChanged += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnVisibilityChanged); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnVisibilityChanged); window->Activated += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowActivated); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowActivated); - window->Closed += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowClosed); + window->Closed += + ref new TypedEventHandler(this, &SDL_WinRTApp::OnWindowClosed); #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0); #endif window->PointerPressed += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerPressed); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerPressed); window->PointerMoved += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerMoved); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerMoved); window->PointerReleased += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerReleased); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerReleased); window->PointerEntered += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerEntered); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerEntered); window->PointerExited += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerExited); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerExited); window->PointerWheelChanged += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerWheelChanged); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnPointerWheelChanged); #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP // Retrieves relative-only mouse movements: Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnMouseMoved); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnMouseMoved); #endif window->KeyDown += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnKeyDown); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnKeyDown); window->KeyUp += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnKeyUp); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnKeyUp); window->CharacterReceived += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnCharacterReceived); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnCharacterReceived); #if NTDDI_VERSION >= NTDDI_WIN10 Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested += - ref new EventHandler(this, &SDL_WinRTApp::OnBackButtonPressed); + ref new EventHandler(this, &SDL_WinRTApp::OnBackButtonPressed); #elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP HardwareButtons::BackPressed += - ref new EventHandler(this, &SDL_WinRTApp::OnBackButtonPressed); + ref new EventHandler(this, &SDL_WinRTApp::OnBackButtonPressed); #endif #if NTDDI_VERSION > NTDDI_WIN8 DisplayInformation::GetForCurrentView()->OrientationChanged += - ref new TypedEventHandler(this, &SDL_WinRTApp::OnOrientationChanged); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnOrientationChanged); #else DisplayProperties::OrientationChanged += ref new DisplayPropertiesEventHandler(this, &SDL_WinRTApp::OnOrientationChanged); #endif -#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps) +#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps) // Make sure we know when a user has opened the app's settings pane. // This is needed in order to display a privacy policy, which needs // to be done for network-enabled apps, as per Windows Store requirements. using namespace Windows::UI::ApplicationSettings; SettingsPane::GetForCurrentView()->CommandsRequested += - ref new TypedEventHandler - (this, &SDL_WinRTApp::OnSettingsPaneCommandsRequested); + ref new TypedEventHandler(this, &SDL_WinRTApp::OnSettingsPaneCommandsRequested); #endif } -void SDL_WinRTApp::Load(Platform::String^ entryPoint) +void SDL_WinRTApp::Load(Platform::String ^ entryPoint) { } void SDL_WinRTApp::Run() { SDL_SetMainReady(); - if (WINRT_SDLAppEntryPoint) - { + if (WINRT_SDLAppEntryPoint) { // TODO, WinRT: pass the C-style main() a reasonably realistic // representation of command line arguments. int argc = 1; char **argv = (char **)SDL_malloc(2 * sizeof(*argv)); - if (!argv) { + if (argv == NULL) { return; } argv[0] = SDL_strdup("WinRTApp"); @@ -373,7 +362,7 @@ void SDL_WinRTApp::Run() static bool IsSDLWindowEventPending(SDL_WindowEventID windowEventID) { SDL_Event events[128]; - const int count = SDL_PeepEvents(events, sizeof(events)/sizeof(SDL_Event), SDL_PEEKEVENT, SDL_WINDOWEVENT, SDL_WINDOWEVENT); + const int count = SDL_PeepEvents(events, sizeof(events) / sizeof(SDL_Event), SDL_PEEKEVENT, SDL_WINDOWEVENT, SDL_WINDOWEVENT); for (int i = 0; i < count; ++i) { if (events[i].window.event == windowEventID) { return true; @@ -388,7 +377,7 @@ bool SDL_WinRTApp::ShouldWaitForAppResumeEvents() if (m_windowVisible) { return false; } - + /* Don't wait until the window-hide events finish processing. * Do note that if an app-suspend event is sent (as indicated * by SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND @@ -437,17 +426,17 @@ void SDL_WinRTApp::Uninitialize() #if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) void SDL_WinRTApp::OnSettingsPaneCommandsRequested( - Windows::UI::ApplicationSettings::SettingsPane ^p, - Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^args) + Windows::UI::ApplicationSettings::SettingsPane ^ p, + Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^ args) { using namespace Platform; using namespace Windows::UI::ApplicationSettings; using namespace Windows::UI::Popups; - String ^privacyPolicyURL = nullptr; // a URL to an app's Privacy Policy - String ^privacyPolicyLabel = nullptr; // label/link text - const char *tmpHintValue = NULL; // SDL_GetHint-retrieved value, used immediately - wchar_t *tmpStr = NULL; // used for UTF8 to UCS2 conversion + String ^ privacyPolicyURL = nullptr; // a URL to an app's Privacy Policy + String ^ privacyPolicyLabel = nullptr; // label/link text + const char *tmpHintValue = NULL; // SDL_GetHint-retrieved value, used immediately + wchar_t *tmpStr = NULL; // used for UTF8 to UCS2 conversion // Setup a 'Privacy Policy' link, if one is available (via SDL_GetHint): tmpHintValue = SDL_GetHint(SDL_HINT_WINRT_PRIVACY_POLICY_URL); @@ -471,39 +460,39 @@ void SDL_WinRTApp::OnSettingsPaneCommandsRequested( // Register the link, along with a handler to be called if and when it is // clicked: auto cmd = ref new SettingsCommand(L"privacyPolicy", privacyPolicyLabel, - ref new UICommandInvokedHandler([=](IUICommand ^) { - Windows::System::Launcher::LaunchUriAsync(ref new Uri(privacyPolicyURL)); - })); + ref new UICommandInvokedHandler([=](IUICommand ^) { + Windows::System::Launcher::LaunchUriAsync(ref new Uri(privacyPolicyURL)); + })); args->Request->ApplicationCommands->Append(cmd); } } #endif // if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) -void SDL_WinRTApp::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args) +void SDL_WinRTApp::OnWindowSizeChanged(CoreWindow ^ sender, WindowSizeChangedEventArgs ^ args) { -#if LOG_WINDOW_EVENTS==1 +#if LOG_WINDOW_EVENTS == 1 SDL_Log("%s, size={%f,%f}, bounds={%f,%f,%f,%f}, current orientation=%d, native orientation=%d, auto rot. pref=%d, WINRT_GlobalSDLWindow?=%s\n", - __FUNCTION__, - args->Size.Width, args->Size.Height, - sender->Bounds.X, sender->Bounds.Y, sender->Bounds.Width, sender->Bounds.Height, - WINRT_DISPLAY_PROPERTY(CurrentOrientation), - WINRT_DISPLAY_PROPERTY(NativeOrientation), - WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), - (WINRT_GlobalSDLWindow ? "yes" : "no")); + __FUNCTION__, + args->Size.Width, args->Size.Height, + sender->Bounds.X, sender->Bounds.Y, sender->Bounds.Width, sender->Bounds.Height, + WINRT_DISPLAY_PROPERTY(CurrentOrientation), + WINRT_DISPLAY_PROPERTY(NativeOrientation), + WINRT_DISPLAY_PROPERTY(AutoRotationPreferences), + (WINRT_GlobalSDLWindow ? "yes" : "no")); #endif WINRT_ProcessWindowSizeChange(); } -void SDL_WinRTApp::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) +void SDL_WinRTApp::OnVisibilityChanged(CoreWindow ^ sender, VisibilityChangedEventArgs ^ args) { -#if LOG_WINDOW_EVENTS==1 +#if LOG_WINDOW_EVENTS == 1 SDL_Log("%s, visible?=%s, bounds={%f,%f,%f,%f}, WINRT_GlobalSDLWindow?=%s\n", - __FUNCTION__, - (args->Visible ? "yes" : "no"), - sender->Bounds.X, sender->Bounds.Y, - sender->Bounds.Width, sender->Bounds.Height, - (WINRT_GlobalSDLWindow ? "yes" : "no")); + __FUNCTION__, + (args->Visible ? "yes" : "no"), + sender->Bounds.X, sender->Bounds.Y, + sender->Bounds.Width, sender->Bounds.Height, + (WINRT_GlobalSDLWindow ? "yes" : "no")); #endif m_windowVisible = args->Visible; @@ -534,12 +523,12 @@ void SDL_WinRTApp::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEven } } -void SDL_WinRTApp::OnWindowActivated(CoreWindow^ sender, WindowActivatedEventArgs^ args) +void SDL_WinRTApp::OnWindowActivated(CoreWindow ^ sender, WindowActivatedEventArgs ^ args) { -#if LOG_WINDOW_EVENTS==1 +#if LOG_WINDOW_EVENTS == 1 SDL_Log("%s, WINRT_GlobalSDLWindow?=%s\n\n", - __FUNCTION__, - (WINRT_GlobalSDLWindow ? "yes" : "no")); + __FUNCTION__, + (WINRT_GlobalSDLWindow ? "yes" : "no")); #endif /* There's no property in Win 8.x to tell whether a window is active or @@ -549,14 +538,14 @@ void SDL_WinRTApp::OnWindowActivated(CoreWindow^ sender, WindowActivatedEventArg */ sender->CustomProperties->Insert("SDLHelperWindowActivationState", args->WindowActivationState); - SDL_Window * window = WINRT_GlobalSDLWindow; + SDL_Window *window = WINRT_GlobalSDLWindow; if (window) { if (args->WindowActivationState != CoreWindowActivationState::Deactivated) { SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SHOWN, 0, 0); if (SDL_GetKeyboardFocus() != window) { SDL_SetKeyboardFocus(window); } - + /* Send a mouse-motion event as appropriate. This doesn't work when called from OnPointerEntered, at least not in WinRT CoreWindow apps (as OnPointerEntered doesn't @@ -572,13 +561,13 @@ void SDL_WinRTApp::OnWindowActivated(CoreWindow^ sender, WindowActivatedEventArg #endif /* TODO, WinRT: see if the Win32 bugfix from https://hg.libsdl.org/SDL/rev/d278747da408 needs to be applied (on window activation) */ - //WIN_CheckAsyncMouseRelease(data); + // WIN_CheckAsyncMouseRelease(data); /* TODO, WinRT: implement clipboard support, if possible */ ///* // * FIXME: Update keyboard state // */ - //WIN_CheckClipboardUpdate(data->videodata); + // WIN_CheckClipboardUpdate(data->videodata); // HACK: Resetting the mouse-cursor here seems to fix // https://bugzilla.libsdl.org/show_bug.cgi?id=3217, whereby a @@ -596,20 +585,20 @@ void SDL_WinRTApp::OnWindowActivated(CoreWindow^ sender, WindowActivatedEventArg } } -void SDL_WinRTApp::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) +void SDL_WinRTApp::OnWindowClosed(CoreWindow ^ sender, CoreWindowEventArgs ^ args) { -#if LOG_WINDOW_EVENTS==1 +#if LOG_WINDOW_EVENTS == 1 SDL_Log("%s\n", __FUNCTION__); #endif m_windowClosed = true; } -void SDL_WinRTApp::OnAppActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args) +void SDL_WinRTApp::OnAppActivated(CoreApplicationView ^ applicationView, IActivatedEventArgs ^ args) { CoreWindow::GetForCurrentThread()->Activate(); } -void SDL_WinRTApp::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) +void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^ args) { // Save app state asynchronously after requesting a deferral. Holding a deferral // indicates that the application is busy performing suspending operations. Be @@ -625,9 +614,8 @@ void SDL_WinRTApp::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ a // this could be important. SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND); - SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral(); - create_task([this, deferral]() - { + SuspendingDeferral ^ deferral = args->SuspendingOperation->GetDeferral(); + create_task([this, deferral]() { // Send an app did-enter-background event immediately to observers. // CoreDispatcher::ProcessEvents, which is the backbone on which // SDL_WinRTApp::PumpEvents is built, will not return to its caller @@ -642,7 +630,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ a // More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx #if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED if (WINRT_GlobalSDLWindow) { - SDL_Renderer * renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow); + SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow); if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) { D3D11_Trim(renderer); } @@ -653,7 +641,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ a }); } -void SDL_WinRTApp::OnResuming(Platform::Object^ sender, Platform::Object^ args) +void SDL_WinRTApp::OnResuming(Platform::Object ^ sender, Platform::Object ^ args) { // Restore any data or state that was unloaded on suspend. By default, data // and state are persisted when resuming from suspend. Note that these events @@ -662,29 +650,28 @@ void SDL_WinRTApp::OnResuming(Platform::Object^ sender, Platform::Object^ args) SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); } -void SDL_WinRTApp::OnExiting(Platform::Object^ sender, Platform::Object^ args) +void SDL_WinRTApp::OnExiting(Platform::Object ^ sender, Platform::Object ^ args) { SDL_SendAppEvent(SDL_APP_TERMINATING); } -static void -WINRT_LogPointerEvent(const char * header, Windows::UI::Core::PointerEventArgs ^ args, Windows::Foundation::Point transformedPoint) +static void WINRT_LogPointerEvent(const char *header, Windows::UI::Core::PointerEventArgs ^ args, Windows::Foundation::Point transformedPoint) { Uint8 button, pressed; Windows::UI::Input::PointerPoint ^ pt = args->CurrentPoint; WINRT_GetSDLButtonForPointerPoint(pt, &button, &pressed); SDL_Log("%s: Position={%f,%f}, Transformed Pos={%f, %f}, MouseWheelDelta=%d, FrameId=%d, PointerId=%d, SDL button=%d pressed=%d\n", - header, - pt->Position.X, pt->Position.Y, - transformedPoint.X, transformedPoint.Y, - pt->Properties->MouseWheelDelta, - pt->FrameId, - pt->PointerId, - button, - pressed); + header, + pt->Position.X, pt->Position.Y, + transformedPoint.X, transformedPoint.Y, + pt->Properties->MouseWheelDelta, + pt->FrameId, + pt->PointerId, + button, + pressed); } -void SDL_WinRTApp::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerPressed(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer pressed", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); @@ -693,7 +680,7 @@ void SDL_WinRTApp::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args) WINRT_ProcessPointerPressedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerMoved(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer moved", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); @@ -702,16 +689,16 @@ void SDL_WinRTApp::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args) WINRT_ProcessPointerMovedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerReleased(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer released", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); #endif - + WINRT_ProcessPointerReleasedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnPointerEntered(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerEntered(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer entered", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); @@ -720,7 +707,7 @@ void SDL_WinRTApp::OnPointerEntered(CoreWindow^ sender, PointerEventArgs^ args) WINRT_ProcessPointerEnteredEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnPointerExited(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerExited(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer exited", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); @@ -729,7 +716,7 @@ void SDL_WinRTApp::OnPointerExited(CoreWindow^ sender, PointerEventArgs^ args) WINRT_ProcessPointerExitedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ args) +void SDL_WinRTApp::OnPointerWheelChanged(CoreWindow ^ sender, PointerEventArgs ^ args) { #if LOG_POINTER_EVENTS WINRT_LogPointerEvent("pointer wheel changed", args, WINRT_TransformCursorPosition(WINRT_GlobalSDLWindow, args->CurrentPoint->Position, TransformToSDLWindowSize)); @@ -738,22 +725,22 @@ void SDL_WinRTApp::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ a WINRT_ProcessPointerWheelChangedEvent(WINRT_GlobalSDLWindow, args->CurrentPoint); } -void SDL_WinRTApp::OnMouseMoved(MouseDevice^ mouseDevice, MouseEventArgs^ args) +void SDL_WinRTApp::OnMouseMoved(MouseDevice ^ mouseDevice, MouseEventArgs ^ args) { WINRT_ProcessMouseMovedEvent(WINRT_GlobalSDLWindow, args); } -void SDL_WinRTApp::OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args) +void SDL_WinRTApp::OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args) { WINRT_ProcessKeyDownEvent(args); } -void SDL_WinRTApp::OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args) +void SDL_WinRTApp::OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args) { WINRT_ProcessKeyUpEvent(args); } -void SDL_WinRTApp::OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args) +void SDL_WinRTApp::OnCharacterReceived(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CharacterReceivedEventArgs ^ args) { WINRT_ProcessCharacterReceivedEvent(args); } @@ -770,13 +757,13 @@ static void WINRT_OnBackButtonPressed(BackButtonEventArgs ^ args) } #if NTDDI_VERSION >= NTDDI_WIN10 -void SDL_WinRTApp::OnBackButtonPressed(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args) +void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::Core::BackRequestedEventArgs ^ args) { WINRT_OnBackButtonPressed(args); } #elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -void SDL_WinRTApp::OnBackButtonPressed(Platform::Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ args) +void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args) { WINRT_OnBackButtonPressed(args); @@ -784,7 +771,7 @@ void SDL_WinRTApp::OnBackButtonPressed(Platform::Object^ sender, Windows::Phone: #endif #if NTDDI_VERSION >= NTDDI_WIN10 -void SDL_WinRTApp::OnGamepadAdded(Platform::Object ^sender, Windows::Gaming::Input::Gamepad ^gamepad) +void SDL_WinRTApp::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ gamepad) { /* HACK ALERT: Nothing needs to be done here, as this method currently only exists to allow something to be registered with Win10's diff --git a/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h b/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h index f2b910f..0208a6a 100644 --- a/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h +++ b/modules/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h @@ -24,67 +24,68 @@ extern int SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **)); ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFrameworkView { -public: + public: SDL_WinRTApp(); - + // IFrameworkView Methods. - virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView); - virtual void SetWindow(Windows::UI::Core::CoreWindow^ window); - virtual void Load(Platform::String^ entryPoint); + virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView); + virtual void SetWindow(Windows::UI::Core::CoreWindow ^ window); + virtual void Load(Platform::String ^ entryPoint); virtual void Run(); virtual void Uninitialize(); -internal: - // SDL-specific methods - void PumpEvents(); + internal : + // SDL-specific methods + void + PumpEvents(); -protected: + protected: bool ShouldWaitForAppResumeEvents(); // Event Handlers. -#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps) +#if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) // for Windows 8/8.1/RT apps... (and not Phone apps) void OnSettingsPaneCommandsRequested( - Windows::UI::ApplicationSettings::SettingsPane ^p, - Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^args); + Windows::UI::ApplicationSettings::SettingsPane ^ p, + Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs ^ args); #endif // if (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (NTDDI_VERSION < NTDDI_WIN10) #if NTDDI_VERSION > NTDDI_WIN8 - void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation ^ sender, Platform::Object ^ args); #else - void OnOrientationChanged(Platform::Object^ sender); + void OnOrientationChanged(Platform::Object ^ sender); #endif - void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); - void OnLogicalDpiChanged(Platform::Object^ sender); - void OnAppActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args); - void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args); - void OnResuming(Platform::Object^ sender, Platform::Object^ args); - void OnExiting(Platform::Object^ sender, Platform::Object^ args); - void OnWindowActivated(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowActivatedEventArgs^ args); - void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); - void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); - void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerEntered(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerExited(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnMouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args); - void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); + void OnWindowSizeChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::WindowSizeChangedEventArgs ^ args); + void OnLogicalDpiChanged(Platform::Object ^ sender); + void OnAppActivated(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args); + void OnSuspending(Platform::Object ^ sender, Windows::ApplicationModel::SuspendingEventArgs ^ args); + void OnResuming(Platform::Object ^ sender, Platform::Object ^ args); + void OnExiting(Platform::Object ^ sender, Platform::Object ^ args); + void OnWindowActivated(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::WindowActivatedEventArgs ^ args); + void OnWindowClosed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CoreWindowEventArgs ^ args); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::VisibilityChangedEventArgs ^ args); + void OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnPointerWheelChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnPointerEntered(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnPointerExited(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + void OnMouseMoved(Windows::Devices::Input::MouseDevice ^ mouseDevice, Windows::Devices::Input::MouseEventArgs ^ args); + void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args); + void OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args); + void OnCharacterReceived(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CharacterReceivedEventArgs ^ args); #if NTDDI_VERSION >= NTDDI_WIN10 - void OnBackButtonPressed(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args); + void OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::Core::BackRequestedEventArgs ^ args); #elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - void OnBackButtonPressed(Platform::Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ args); + void OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args); #endif #if NTDDI_VERSION >= NTDDI_WIN10 - void OnGamepadAdded(Platform::Object ^sender, Windows::Gaming::Input::Gamepad ^gamepad); + void OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ gamepad); #endif -private: + private: bool m_windowClosed; bool m_windowVisible; }; diff --git a/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp b/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp index 8d9e2c6..118f64b 100644 --- a/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp +++ b/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp @@ -27,7 +27,6 @@ #include #endif - /* SDL includes */ #include "../../SDL_internal.h" #include "SDL.h" @@ -36,70 +35,58 @@ #include "SDL_winrtapp_common.h" #include "SDL_winrtapp_xaml.h" - - /* SDL-internal globals: */ SDL_bool WINRT_XAMLWasEnabled = SDL_FALSE; #if WINAPI_FAMILY == WINAPI_FAMILY_APP -extern "C" -ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNative = NULL; -static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken; +extern "C" ISwapChainBackgroundPanelNative *WINRT_GlobalSwapChainBackgroundPanelNative = NULL; +static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken; #endif - /* * Input event handlers (XAML) */ #if WINAPI_FAMILY == WINAPI_FAMILY_APP -static void -WINRT_OnPointerPressedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args) +static void WINRT_OnPointerPressedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args) { WINRT_ProcessPointerPressedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr)); } -static void -WINRT_OnPointerMovedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args) +static void WINRT_OnPointerMovedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args) { WINRT_ProcessPointerMovedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr)); } -static void -WINRT_OnPointerReleasedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args) +static void WINRT_OnPointerReleasedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args) { WINRT_ProcessPointerReleasedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr)); } -static void -WINRT_OnPointerWheelChangedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args) +static void WINRT_OnPointerWheelChangedViaXAML(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ args) { WINRT_ProcessPointerWheelChangedEvent(WINRT_GlobalSDLWindow, args->GetCurrentPoint(nullptr)); } #endif // WINAPI_FAMILY == WINAPI_FAMILY_APP - /* * XAML-to-SDL Rendering Callback */ #if WINAPI_FAMILY == WINAPI_FAMILY_APP -static void -WINRT_OnRenderViaXAML(_In_ Platform::Object^ sender, _In_ Platform::Object^ args) +static void WINRT_OnRenderViaXAML(_In_ Platform::Object ^ sender, _In_ Platform::Object ^ args) { WINRT_CycleXAMLThread(); } #endif // WINAPI_FAMILY == WINAPI_FAMILY_APP - /* * SDL + XAML Initialization */ -int -SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void * backgroundPanelAsIInspectable) +int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPanelAsIInspectable) { #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP return SDL_SetError("XAML support is not yet available in Windows Phone."); @@ -114,13 +101,13 @@ SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void * backgroundPanelAs using namespace Windows::UI::Xaml::Media; // Make sure we have a valid XAML element (to draw onto): - if ( ! backgroundPanelAsIInspectable) { + if (!backgroundPanelAsIInspectable) { return SDL_InvalidParamError("backgroundPanelAsIInspectable"); } - Platform::Object ^ backgroundPanel = reinterpret_cast((IInspectable *) backgroundPanelAsIInspectable); - SwapChainBackgroundPanel ^swapChainBackgroundPanel = dynamic_cast(backgroundPanel); - if ( ! swapChainBackgroundPanel) { + Platform::Object ^ backgroundPanel = reinterpret_cast((IInspectable *)backgroundPanelAsIInspectable); + SwapChainBackgroundPanel ^ swapChainBackgroundPanel = dynamic_cast(backgroundPanel); + if (!swapChainBackgroundPanel) { return SDL_SetError("An unknown or unsupported type of XAML control was specified."); } @@ -131,10 +118,10 @@ SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void * backgroundPanelAs swapChainBackgroundPanel->PointerMoved += ref new PointerEventHandler(WINRT_OnPointerMovedViaXAML); // Setup for rendering: - IInspectable *panelInspectable = (IInspectable*) reinterpret_cast(swapChainBackgroundPanel); + IInspectable *panelInspectable = (IInspectable *)reinterpret_cast(swapChainBackgroundPanel); panelInspectable->QueryInterface(__uuidof(ISwapChainBackgroundPanelNative), (void **)&WINRT_GlobalSwapChainBackgroundPanelNative); - WINRT_XAMLAppEventToken = CompositionTarget::Rendering::add(ref new EventHandler(WINRT_OnRenderViaXAML)); + WINRT_XAMLAppEventToken = CompositionTarget::Rendering::add(ref new EventHandler(WINRT_OnRenderViaXAML)); // Make sure the app is ready to call the SDL-centric main() function: WINRT_SDLAppEntryPoint = mainFunction; diff --git a/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.h b/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.h index 3147ac5..5ee15e8 100644 --- a/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.h +++ b/modules/SDL2/src/core/winrt/SDL_winrtapp_xaml.h @@ -27,7 +27,7 @@ #ifdef __cplusplus extern SDL_bool WINRT_XAMLWasEnabled; -extern int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void * backgroundPanelAsIInspectable); +extern int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPanelAsIInspectable); #endif // ifdef __cplusplus #endif // SDL_winrtapp_xaml_h_ diff --git a/modules/SDL2/src/cpuinfo/SDL_cpuinfo.c b/modules/SDL2/src/cpuinfo/SDL_cpuinfo.c index 43394a8..337ae33 100644 --- a/modules/SDL2/src/cpuinfo/SDL_cpuinfo.c +++ b/modules/SDL2/src/cpuinfo/SDL_cpuinfo.c @@ -102,41 +102,39 @@ #include #endif -#define CPU_HAS_RDTSC (1 << 0) -#define CPU_HAS_ALTIVEC (1 << 1) -#define CPU_HAS_MMX (1 << 2) -#define CPU_HAS_3DNOW (1 << 3) -#define CPU_HAS_SSE (1 << 4) -#define CPU_HAS_SSE2 (1 << 5) -#define CPU_HAS_SSE3 (1 << 6) -#define CPU_HAS_SSE41 (1 << 7) -#define CPU_HAS_SSE42 (1 << 8) -#define CPU_HAS_AVX (1 << 9) -#define CPU_HAS_AVX2 (1 << 10) -#define CPU_HAS_NEON (1 << 11) -#define CPU_HAS_AVX512F (1 << 12) +#define CPU_HAS_RDTSC (1 << 0) +#define CPU_HAS_ALTIVEC (1 << 1) +#define CPU_HAS_MMX (1 << 2) +#define CPU_HAS_3DNOW (1 << 3) +#define CPU_HAS_SSE (1 << 4) +#define CPU_HAS_SSE2 (1 << 5) +#define CPU_HAS_SSE3 (1 << 6) +#define CPU_HAS_SSE41 (1 << 7) +#define CPU_HAS_SSE42 (1 << 8) +#define CPU_HAS_AVX (1 << 9) +#define CPU_HAS_AVX2 (1 << 10) +#define CPU_HAS_NEON (1 << 11) +#define CPU_HAS_AVX512F (1 << 12) #define CPU_HAS_ARM_SIMD (1 << 13) -#define CPU_HAS_LSX (1 << 14) -#define CPU_HAS_LASX (1 << 15) +#define CPU_HAS_LSX (1 << 14) +#define CPU_HAS_LASX (1 << 15) -#define CPU_CFG2 0x2 -#define CPU_CFG2_LSX (1 << 6) -#define CPU_CFG2_LASX (1 << 7) +#define CPU_CFG2 0x2 +#define CPU_CFG2_LSX (1 << 6) +#define CPU_CFG2_LASX (1 << 7) #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__ && !__FreeBSD__ /* This is the brute force way of detecting instruction sets... the idea is borrowed from the libmpeg2 library - thanks! */ static jmp_buf jmpbuf; -static void -illegal_instruction(int sig) +static void illegal_instruction(int sig) { longjmp(jmpbuf, 1); } #endif /* HAVE_SETJMP */ -static int -CPU_haveCPUID(void) +static int CPU_haveCPUID(void) { int has_CPUID = 0; @@ -161,7 +159,7 @@ CPU_haveCPUID(void) : "%eax", "%ecx" ); #elif (defined(__GNUC__) || defined(__llvm__)) && defined(__x86_64__) -/* Technically, if this is being compiled under __x86_64__ then it has +/* Technically, if this is being compiled under __x86_64__ then it has CPUid by definition. But it's nice to be able to prove it. :) */ __asm__ ( " pushfq # Get original EFLAGS \n" @@ -234,23 +232,25 @@ done: } #if (defined(__GNUC__) || defined(__llvm__)) && defined(__i386__) -#define cpuid(func, a, b, c, d) \ - __asm__ __volatile__ ( \ -" pushl %%ebx \n" \ -" xorl %%ecx,%%ecx \n" \ -" cpuid \n" \ -" movl %%ebx, %%esi \n" \ -" popl %%ebx \n" : \ - "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (func)) +#define cpuid(func, a, b, c, d) \ + __asm__ __volatile__( \ + " pushl %%ebx \n" \ + " xorl %%ecx,%%ecx \n" \ + " cpuid \n" \ + " movl %%ebx, %%esi \n" \ + " popl %%ebx \n" \ + : "=a"(a), "=S"(b), "=c"(c), "=d"(d) \ + : "a"(func)) #elif (defined(__GNUC__) || defined(__llvm__)) && defined(__x86_64__) -#define cpuid(func, a, b, c, d) \ - __asm__ __volatile__ ( \ -" pushq %%rbx \n" \ -" xorq %%rcx,%%rcx \n" \ -" cpuid \n" \ -" movq %%rbx, %%rsi \n" \ -" popq %%rbx \n" : \ - "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (func)) +#define cpuid(func, a, b, c, d) \ + __asm__ __volatile__( \ + " pushq %%rbx \n" \ + " xorq %%rcx,%%rcx \n" \ + " cpuid \n" \ + " movq %%rbx, %%rsi \n" \ + " popq %%rbx \n" \ + : "=a"(a), "=S"(b), "=c"(c), "=d"(d) \ + : "a"(func)) #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__) #define cpuid(func, a, b, c, d) \ __asm { \ @@ -260,21 +260,28 @@ done: __asm mov a, eax \ __asm mov b, ebx \ __asm mov c, ecx \ - __asm mov d, edx \ -} -#elif defined(_MSC_VER) && defined(_M_X64) -#define cpuid(func, a, b, c, d) \ -{ \ - int CPUInfo[4]; \ - __cpuid(CPUInfo, func); \ - a = CPUInfo[0]; \ - b = CPUInfo[1]; \ - c = CPUInfo[2]; \ - d = CPUInfo[3]; \ -} + __asm mov d, edx \ + } +#elif (defined(_MSC_VER) && defined(_M_X64)) +/* Use __cpuidex instead of __cpuid because ICL does not clear ecx register */ +#define cpuid(func, a, b, c, d) \ + { \ + int CPUInfo[4]; \ + __cpuidex(CPUInfo, func, 0); \ + a = CPUInfo[0]; \ + b = CPUInfo[1]; \ + c = CPUInfo[2]; \ + d = CPUInfo[3]; \ + } #else #define cpuid(func, a, b, c, d) \ - do { a = b = c = d = 0; (void) a; (void) b; (void) c; (void) d; } while (0) + do { \ + a = b = c = d = 0; \ + (void)a; \ + (void)b; \ + (void)c; \ + (void)d; \ + } while (0) #endif static int CPU_CPUIDFeatures[4]; @@ -282,8 +289,7 @@ static int CPU_CPUIDMaxFunction = 0; static SDL_bool CPU_OSSavesYMM = SDL_FALSE; static SDL_bool CPU_OSSavesZMM = SDL_FALSE; -static void -CPU_calcCPUIDFeatures(void) +static void CPU_calcCPUIDFeatures(void) { static SDL_bool checked = SDL_FALSE; if (!checked) { @@ -303,16 +309,19 @@ CPU_calcCPUIDFeatures(void) if (c & 0x08000000) { /* Call xgetbv to see if YMM (etc) register state is saved */ #if (defined(__GNUC__) || defined(__llvm__)) && (defined(__i386__) || defined(__x86_64__)) - __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (a) : "c" (0) : "%edx"); + __asm__(".byte 0x0f, 0x01, 0xd0" + : "=a"(a) + : "c"(0) + : "%edx"); #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && (_MSC_FULL_VER >= 160040219) /* VS2010 SP1 */ a = (int)_xgetbv(0); #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__) __asm - { + { xor ecx, ecx _asm _emit 0x0f _asm _emit 0x01 _asm _emit 0xd0 mov a, eax - } + } #endif CPU_OSSavesYMM = ((a & 6) == 6) ? SDL_TRUE : SDL_FALSE; CPU_OSSavesZMM = (CPU_OSSavesYMM && ((a & 0xe0) == 0xe0)) ? SDL_TRUE : SDL_FALSE; @@ -322,8 +331,7 @@ CPU_calcCPUIDFeatures(void) } } -static int -CPU_haveAltiVec(void) +static int CPU_haveAltiVec(void) { volatile int altivec = 0; #ifndef SDL_CPUINFO_DISABLED @@ -336,18 +344,20 @@ CPU_haveAltiVec(void) int hasVectorUnit = 0; size_t length = sizeof(hasVectorUnit); int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); - if (0 == error) + if (0 == error) { altivec = (hasVectorUnit != 0); + } #elif defined(__FreeBSD__) && defined(__powerpc__) unsigned long cpufeatures = 0; elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures)); altivec = cpufeatures & PPC_FEATURE_HAS_ALTIVEC; return altivec; #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP - void (*handler) (int sig); + void (*handler)(int sig); handler = signal(SIGILL, illegal_instruction); if (setjmp(jmpbuf) == 0) { - asm volatile ("mtspr 256, %0\n\t" "vand %%v0, %%v0, %%v0"::"r" (-1)); + asm volatile("mtspr 256, %0\n\t" + "vand %%v0, %%v0, %%v0" ::"r"(-1)); altivec = 1; } signal(SIGILL, handler); @@ -357,35 +367,29 @@ CPU_haveAltiVec(void) } #if (defined(__ARM_ARCH) && (__ARM_ARCH >= 6)) || defined(__aarch64__) -static int -CPU_haveARMSIMD(void) +static int CPU_haveARMSIMD(void) { return 1; } #elif !defined(__arm__) -static int -CPU_haveARMSIMD(void) +static int CPU_haveARMSIMD(void) { return 0; } #elif defined(__LINUX__) -static int -CPU_haveARMSIMD(void) +static int CPU_haveARMSIMD(void) { int arm_simd = 0; int fd; fd = open("/proc/self/auxv", O_RDONLY | O_CLOEXEC); - if (fd >= 0) - { + if (fd >= 0) { Elf32_auxv_t aux; - while (read(fd, &aux, sizeof aux) == sizeof aux) - { - if (aux.a_type == AT_PLATFORM) - { - const char *plat = (const char *) aux.a_un.a_val; + while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) { + if (aux.a_type == AT_PLATFORM) { + const char *plat = (const char *)aux.a_un.a_val; if (plat) { arm_simd = SDL_strncmp(plat, "v6l", 3) == 0 || SDL_strncmp(plat, "v7l", 3) == 0; @@ -398,28 +402,29 @@ CPU_haveARMSIMD(void) } #elif defined(__RISCOS__) -static int -CPU_haveARMSIMD(void) +static int CPU_haveARMSIMD(void) { _kernel_swi_regs regs; regs.r[0] = 0; - if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) != NULL) + if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) != NULL) { return 0; + } - if (!(regs.r[0] & (1<<31))) + if (!(regs.r[0] & (1 << 31))) { return 0; + } regs.r[0] = 34; regs.r[1] = 29; - if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) != NULL) + if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) != NULL) { return 0; + } return regs.r[0]; } #else -static int -CPU_haveARMSIMD(void) +static int CPU_haveARMSIMD(void) { #warning SDL_HasARMSIMD is not implemented for this ARM platform. Write me. return 0; @@ -427,17 +432,15 @@ CPU_haveARMSIMD(void) #endif #if defined(__LINUX__) && defined(__arm__) && !defined(HAVE_GETAUXVAL) -static int -readProcAuxvForNeon(void) +static int readProcAuxvForNeon(void) { int neon = 0; int fd; fd = open("/proc/self/auxv", O_RDONLY | O_CLOEXEC); - if (fd >= 0) - { + if (fd >= 0) { Elf32_auxv_t aux; - while (read(fd, &aux, sizeof (aux)) == sizeof (aux)) { + while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) { if (aux.a_type == AT_HWCAP) { neon = (aux.a_un.a_val & HWCAP_NEON) == HWCAP_NEON; break; @@ -449,45 +452,45 @@ readProcAuxvForNeon(void) } #endif -static int -CPU_haveNEON(void) +static int CPU_haveNEON(void) { /* The way you detect NEON is a privileged instruction on ARM, so you have query the OS kernel in a platform-specific way. :/ */ #if defined(SDL_CPUINFO_DISABLED) - return 0; /* disabled */ + return 0; /* disabled */ #elif (defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)) && (defined(_M_ARM) || defined(_M_ARM64)) /* Visual Studio, for ARM, doesn't define __ARM_ARCH. Handle this first. */ /* Seems to have been removed */ -# if !defined(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) -# define PF_ARM_NEON_INSTRUCTIONS_AVAILABLE 19 -# endif -/* All WinRT ARM devices are required to support NEON, but just in case. */ +#if !defined(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) +#define PF_ARM_NEON_INSTRUCTIONS_AVAILABLE 19 +#endif + /* All WinRT ARM devices are required to support NEON, but just in case. */ return IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) != 0; #elif (defined(__ARM_ARCH) && (__ARM_ARCH >= 8)) || defined(__aarch64__) - return 1; /* ARMv8 always has non-optional NEON support. */ + return 1; /* ARMv8 always has non-optional NEON support. */ #elif __VITA__ return 1; #elif __3DS__ return 0; #elif defined(__APPLE__) && defined(__ARM_ARCH) && (__ARM_ARCH >= 7) /* (note that sysctlbyname("hw.optional.neon") doesn't work!) */ - return 1; /* all Apple ARMv7 chips and later have NEON. */ + return 1; /* all Apple ARMv7 chips and later have NEON. */ #elif defined(__APPLE__) - return 0; /* assume anything else from Apple doesn't have NEON. */ + return 0; /* assume anything else from Apple doesn't have NEON. */ #elif !defined(__arm__) - return 0; /* not an ARM CPU at all. */ + return 0; /* not an ARM CPU at all. */ #elif defined(__OpenBSD__) - return 1; /* OpenBSD only supports ARMv7 CPUs that have NEON. */ + return 1; /* OpenBSD only supports ARMv7 CPUs that have NEON. */ #elif defined(HAVE_ELF_AUX_INFO) unsigned long hasneon = 0; - if (elf_aux_info(AT_HWCAP, (void *)&hasneon, (int)sizeof(hasneon)) != 0) + if (elf_aux_info(AT_HWCAP, (void *)&hasneon, (int)sizeof(hasneon)) != 0) { return 0; + } return ((hasneon & HWCAP_NEON) == HWCAP_NEON); #elif defined(__QNXNTO__) return SYSPAGE_ENTRY(cpuinfo)->flags & ARM_CPU_FLAG_NEON; #elif (defined(__LINUX__) || defined(__ANDROID__)) && defined(HAVE_GETAUXVAL) - return ((getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON); + return (getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON; #elif defined(__LINUX__) return readProcAuxvForNeon(); #elif defined(__ANDROID__) @@ -496,7 +499,7 @@ CPU_haveNEON(void) AndroidCpuFamily cpu_family = android_getCpuFamily(); if (cpu_family == ANDROID_CPU_FAMILY_ARM) { uint64_t cpu_features = android_getCpuFeatures(); - if ((cpu_features & ANDROID_CPU_ARM_FEATURE_NEON) != 0) { + if (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON) { return 1; } } @@ -520,21 +523,19 @@ CPU_haveNEON(void) #endif } -static int -CPU_readCPUCFG(void) +static int CPU_readCPUCFG(void) { uint32_t cfg2 = 0; #if defined __loongarch__ __asm__ volatile( "cpucfg %0, %1 \n\t" : "+&r"(cfg2) - : "r"(CPU_CFG2) - ); + : "r"(CPU_CFG2)); #endif return cfg2; } -#define CPU_haveLSX() (CPU_readCPUCFG() & CPU_CFG2_LSX) +#define CPU_haveLSX() (CPU_readCPUCFG() & CPU_CFG2_LSX) #define CPU_haveLASX() (CPU_readCPUCFG() & CPU_CFG2_LASX) #if defined(__e2k__) @@ -548,15 +549,14 @@ CPU_have3DNow(void) #endif } #else -static int -CPU_have3DNow(void) +static int CPU_have3DNow(void) { - if (CPU_CPUIDMaxFunction > 0) { /* that is, do we have CPUID at all? */ + if (CPU_CPUIDMaxFunction > 0) { /* that is, do we have CPUID at all? */ int a, b, c, d; cpuid(0x80000000, a, b, c, d); if (a >= 0x80000001) { cpuid(0x80000001, a, b, c, d); - return (d & 0x80000000); + return d & 0x80000000; } } return 0; @@ -602,13 +602,13 @@ CPU_have3DNow(void) #endif #else #define CPU_haveRDTSC() (CPU_CPUIDFeatures[3] & 0x00000010) -#define CPU_haveMMX() (CPU_CPUIDFeatures[3] & 0x00800000) -#define CPU_haveSSE() (CPU_CPUIDFeatures[3] & 0x02000000) -#define CPU_haveSSE2() (CPU_CPUIDFeatures[3] & 0x04000000) -#define CPU_haveSSE3() (CPU_CPUIDFeatures[2] & 0x00000001) +#define CPU_haveMMX() (CPU_CPUIDFeatures[3] & 0x00800000) +#define CPU_haveSSE() (CPU_CPUIDFeatures[3] & 0x02000000) +#define CPU_haveSSE2() (CPU_CPUIDFeatures[3] & 0x04000000) +#define CPU_haveSSE3() (CPU_CPUIDFeatures[2] & 0x00000001) #define CPU_haveSSE41() (CPU_CPUIDFeatures[2] & 0x00080000) #define CPU_haveSSE42() (CPU_CPUIDFeatures[2] & 0x00100000) -#define CPU_haveAVX() (CPU_OSSavesYMM && (CPU_CPUIDFeatures[2] & 0x10000000)) +#define CPU_haveAVX() (CPU_OSSavesYMM && (CPU_CPUIDFeatures[2] & 0x10000000)) #endif #if defined(__e2k__) @@ -622,14 +622,16 @@ CPU_haveAVX2(void) #endif } #else -static int -CPU_haveAVX2(void) +static int CPU_haveAVX2(void) { if (CPU_OSSavesYMM && (CPU_CPUIDMaxFunction >= 7)) { int a, b, c, d; - (void) a; (void) b; (void) c; (void) d; /* compiler warnings... */ + (void)a; + (void)b; + (void)c; + (void)d; /* compiler warnings... */ cpuid(7, a, b, c, d); - return (b & 0x00000020); + return b & 0x00000020; } return 0; } @@ -642,14 +644,16 @@ CPU_haveAVX512F(void) return 0; } #else -static int -CPU_haveAVX512F(void) +static int CPU_haveAVX512F(void) { if (CPU_OSSavesZMM && (CPU_CPUIDMaxFunction >= 7)) { int a, b, c, d; - (void) a; (void) b; (void) c; (void) d; /* compiler warnings... */ + (void)a; + (void)b; + (void)c; + (void)d; /* compiler warnings... */ cpuid(7, a, b, c, d); - return (b & 0x00010000); + return b & 0x00010000; } return 0; } @@ -657,8 +661,7 @@ CPU_haveAVX512F(void) static int SDL_CPUCount = 0; -int -SDL_GetCPUCount(void) +int SDL_GetCPUCount(void) { if (!SDL_CPUCount) { #ifndef SDL_CPUINFO_DISABLED @@ -707,8 +710,7 @@ SDL_GetCPUType(void) } #else /* Oh, such a sweet sweet trick, just not very useful. :) */ -static const char * -SDL_GetCPUType(void) +static const char *SDL_GetCPUType(void) { static char SDL_CPUType[13]; @@ -716,23 +718,32 @@ SDL_GetCPUType(void) int i = 0; CPU_calcCPUIDFeatures(); - if (CPU_CPUIDMaxFunction > 0) { /* do we have CPUID at all? */ + if (CPU_CPUIDMaxFunction > 0) { /* do we have CPUID at all? */ int a, b, c, d; cpuid(0x00000000, a, b, c, d); - (void) a; - SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8; + (void)a; + SDL_CPUType[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUType[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUType[i++] = (char)(b & 0xff); + b >>= 8; SDL_CPUType[i++] = (char)(b & 0xff); - SDL_CPUType[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUType[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUType[i++] = (char)(d & 0xff); d >>= 8; + SDL_CPUType[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUType[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUType[i++] = (char)(d & 0xff); + d >>= 8; SDL_CPUType[i++] = (char)(d & 0xff); - SDL_CPUType[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUType[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUType[i++] = (char)(c & 0xff); c >>= 8; + SDL_CPUType[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUType[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUType[i++] = (char)(c & 0xff); + c >>= 8; SDL_CPUType[i++] = (char)(c & 0xff); } if (!SDL_CPUType[0]) { @@ -743,8 +754,7 @@ SDL_GetCPUType(void) } #endif - -#ifdef TEST_MAIN /* !!! FIXME: only used for test at the moment. */ +#ifdef TEST_MAIN /* !!! FIXME: only used for test at the moment. */ #if defined(__e2k__) inline const char * SDL_GetCPUName(void) @@ -756,8 +766,7 @@ SDL_GetCPUName(void) return SDL_CPUName; } #else -static const char * -SDL_GetCPUName(void) +static const char *SDL_GetCPUName(void) { static char SDL_CPUName[48]; @@ -766,60 +775,108 @@ SDL_GetCPUName(void) int a, b, c, d; CPU_calcCPUIDFeatures(); - if (CPU_CPUIDMaxFunction > 0) { /* do we have CPUID at all? */ + if (CPU_CPUIDMaxFunction > 0) { /* do we have CPUID at all? */ cpuid(0x80000000, a, b, c, d); if (a >= 0x80000004) { cpuid(0x80000002, a, b, c, d); - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; cpuid(0x80000003, a, b, c, d); - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; cpuid(0x80000004, a, b, c, d); - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(a & 0xff); a >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(b & 0xff); b >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(c & 0xff); c >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; - SDL_CPUName[i++] = (char)(d & 0xff); d >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(a & 0xff); + a >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(b & 0xff); + b >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(c & 0xff); + c >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; + SDL_CPUName[i++] = (char)(d & 0xff); + d >>= 8; } } if (!SDL_CPUName[0]) { @@ -831,18 +888,20 @@ SDL_GetCPUName(void) #endif #endif -int -SDL_GetCPUCacheLineSize(void) +int SDL_GetCPUCacheLineSize(void) { const char *cpuType = SDL_GetCPUType(); int a, b, c, d; - (void) a; (void) b; (void) c; (void) d; - if (SDL_strcmp(cpuType, "GenuineIntel") == 0 || SDL_strcmp(cpuType, "CentaurHauls") == 0 || SDL_strcmp(cpuType, " Shanghai ") == 0) { + (void)a; + (void)b; + (void)c; + (void)d; + if (SDL_strcmp(cpuType, "GenuineIntel") == 0 || SDL_strcmp(cpuType, "CentaurHauls") == 0 || SDL_strcmp(cpuType, " Shanghai ") == 0) { cpuid(0x00000001, a, b, c, d); - return (((b >> 8) & 0xff) * 8); + return ((b >> 8) & 0xff) * 8; } else if (SDL_strcmp(cpuType, "AuthenticAMD") == 0 || SDL_strcmp(cpuType, "HygonGenuine") == 0) { cpuid(0x80000005, a, b, c, d); - return (c & 0xff); + return c & 0xff; } else { /* Just make a guess here... */ return SDL_CACHELINE_SIZE; @@ -852,13 +911,12 @@ SDL_GetCPUCacheLineSize(void) static Uint32 SDL_CPUFeatures = 0xFFFFFFFF; static Uint32 SDL_SIMDAlignment = 0xFFFFFFFF; -static Uint32 -SDL_GetCPUFeatures(void) +static Uint32 SDL_GetCPUFeatures(void) { if (SDL_CPUFeatures == 0xFFFFFFFF) { CPU_calcCPUIDFeatures(); SDL_CPUFeatures = 0; - SDL_SIMDAlignment = sizeof(void *); /* a good safe base value */ + SDL_SIMDAlignment = sizeof(void *); /* a good safe base value */ if (CPU_haveRDTSC()) { SDL_CPUFeatures |= CPU_HAS_RDTSC; } @@ -933,125 +991,109 @@ SDL_bool SDL_HasRDTSC(void) return CPU_FEATURE_AVAILABLE(CPU_HAS_RDTSC); } -SDL_bool -SDL_HasAltiVec(void) +SDL_bool SDL_HasAltiVec(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_ALTIVEC); } -SDL_bool -SDL_HasMMX(void) +SDL_bool SDL_HasMMX(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_MMX); } -SDL_bool -SDL_Has3DNow(void) +SDL_bool SDL_Has3DNow(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_3DNOW); } -SDL_bool -SDL_HasSSE(void) +SDL_bool SDL_HasSSE(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE); } -SDL_bool -SDL_HasSSE2(void) +SDL_bool SDL_HasSSE2(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE2); } -SDL_bool -SDL_HasSSE3(void) +SDL_bool SDL_HasSSE3(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE3); } -SDL_bool -SDL_HasSSE41(void) +SDL_bool SDL_HasSSE41(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE41); } -SDL_bool -SDL_HasSSE42(void) +SDL_bool SDL_HasSSE42(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE42); } -SDL_bool -SDL_HasAVX(void) +SDL_bool SDL_HasAVX(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX); } -SDL_bool -SDL_HasAVX2(void) +SDL_bool SDL_HasAVX2(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX2); } -SDL_bool -SDL_HasAVX512F(void) +SDL_bool SDL_HasAVX512F(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX512F); } -SDL_bool -SDL_HasARMSIMD(void) +SDL_bool SDL_HasARMSIMD(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_ARM_SIMD); } -SDL_bool -SDL_HasNEON(void) +SDL_bool SDL_HasNEON(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_NEON); } -SDL_bool -SDL_HasLSX(void) +SDL_bool SDL_HasLSX(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_LSX); } -SDL_bool -SDL_HasLASX(void) +SDL_bool SDL_HasLASX(void) { return CPU_FEATURE_AVAILABLE(CPU_HAS_LASX); } static int SDL_SystemRAM = 0; -int -SDL_GetSystemRAM(void) +int SDL_GetSystemRAM(void) { if (!SDL_SystemRAM) { #ifndef SDL_CPUINFO_DISABLED #if defined(HAVE_SYSCONF) && defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE) if (SDL_SystemRAM <= 0) { - SDL_SystemRAM = (int)((Sint64)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / (1024*1024)); + SDL_SystemRAM = (int)((Sint64)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / (1024 * 1024)); } #endif #ifdef HAVE_SYSCTLBYNAME if (SDL_SystemRAM <= 0) { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__) #ifdef HW_REALMEM - int mib[2] = {CTL_HW, HW_REALMEM}; + int mib[2] = { CTL_HW, HW_REALMEM }; #else /* might only report up to 2 GiB */ - int mib[2] = {CTL_HW, HW_PHYSMEM}; + int mib[2] = { CTL_HW, HW_PHYSMEM }; #endif /* HW_REALMEM */ #else - int mib[2] = {CTL_HW, HW_MEMSIZE}; + int mib[2] = { CTL_HW, HW_MEMSIZE }; #endif /* __FreeBSD__ || __FreeBSD_kernel__ */ Uint64 memsize = 0; size_t len = sizeof(memsize); - + if (sysctl(mib, 2, &memsize, &len, NULL, 0) == 0) { - SDL_SystemRAM = (int)(memsize / (1024*1024)); + SDL_SystemRAM = (int)(memsize / (1024 * 1024)); } } #endif @@ -1098,19 +1140,16 @@ SDL_GetSystemRAM(void) return SDL_SystemRAM; } - -size_t -SDL_SIMDGetAlignment(void) +size_t SDL_SIMDGetAlignment(void) { if (SDL_SIMDAlignment == 0xFFFFFFFF) { - SDL_GetCPUFeatures(); /* make sure this has been calculated */ + SDL_GetCPUFeatures(); /* make sure this has been calculated */ } SDL_assert(SDL_SIMDAlignment != 0); return SDL_SIMDAlignment; } -void * -SDL_SIMDAlloc(const size_t len) +void *SDL_SIMDAlloc(const size_t len) { const size_t alignment = SDL_SIMDGetAlignment(); const size_t padding = (alignment - (len % alignment)) % alignment; @@ -1118,61 +1157,60 @@ SDL_SIMDAlloc(const size_t len) Uint8 *ptr; size_t to_allocate; - /* alignment + padding + sizeof (void *) is bounded (a few hundred + /* alignment + padding + sizeof(void *) is bounded (a few hundred * bytes max), so no need to check for overflow within that argument */ - if (SDL_size_add_overflow(len, alignment + padding + sizeof (void *), &to_allocate)) { + if (SDL_size_add_overflow(len, alignment + padding + sizeof(void *), &to_allocate)) { return NULL; } - ptr = (Uint8 *) SDL_malloc(to_allocate); + ptr = (Uint8 *)SDL_malloc(to_allocate); if (ptr) { /* store the actual allocated pointer right before our aligned pointer. */ - retval = ptr + sizeof (void *); - retval += alignment - (((size_t) retval) % alignment); - *(((void **) retval) - 1) = ptr; + retval = ptr + sizeof(void *); + retval += alignment - (((size_t)retval) % alignment); + *(((void **)retval) - 1) = ptr; } return retval; } -void * -SDL_SIMDRealloc(void *mem, const size_t len) +void *SDL_SIMDRealloc(void *mem, const size_t len) { const size_t alignment = SDL_SIMDGetAlignment(); const size_t padding = (alignment - (len % alignment)) % alignment; - Uint8 *retval = (Uint8*) mem; + Uint8 *retval = (Uint8 *)mem; void *oldmem = mem; size_t memdiff = 0, ptrdiff; Uint8 *ptr; size_t to_allocate; - /* alignment + padding + sizeof (void *) is bounded (a few hundred + /* alignment + padding + sizeof(void *) is bounded (a few hundred * bytes max), so no need to check for overflow within that argument */ - if (SDL_size_add_overflow(len, alignment + padding + sizeof (void *), &to_allocate)) { + if (SDL_size_add_overflow(len, alignment + padding + sizeof(void *), &to_allocate)) { return NULL; } if (mem) { - mem = *(((void **) mem) - 1); + mem = *(((void **)mem) - 1); /* Check the delta between the real pointer and user pointer */ - memdiff = ((size_t) oldmem) - ((size_t) mem); + memdiff = ((size_t)oldmem) - ((size_t)mem); } - ptr = (Uint8 *) SDL_realloc(mem, to_allocate); + ptr = (Uint8 *)SDL_realloc(mem, to_allocate); if (ptr == NULL) { return NULL; /* Out of memory, bail! */ } /* Store the actual allocated pointer right before our aligned pointer. */ - retval = ptr + sizeof (void *); - retval += alignment - (((size_t) retval) % alignment); + retval = ptr + sizeof(void *); + retval += alignment - (((size_t)retval) % alignment); /* Make sure the delta is the same! */ if (mem) { - ptrdiff = ((size_t) retval) - ((size_t) ptr); + ptrdiff = ((size_t)retval) - ((size_t)ptr); if (memdiff != ptrdiff) { /* Delta has changed, copy to new offset! */ - oldmem = (void*) (((uintptr_t) ptr) + memdiff); + oldmem = (void *)(((uintptr_t)ptr) + memdiff); /* Even though the data past the old `len` is undefined, this is the * only length value we have, and it guarantees that we copy all the @@ -1183,25 +1221,22 @@ SDL_SIMDRealloc(void *mem, const size_t len) } /* Actually store the allocated pointer, finally. */ - *(((void **) retval) - 1) = ptr; + *(((void **)retval) - 1) = ptr; return retval; } -void -SDL_SIMDFree(void *ptr) +void SDL_SIMDFree(void *ptr) { if (ptr) { - SDL_free(*(((void **) ptr) - 1)); + SDL_free(*(((void **)ptr) - 1)); } } - #ifdef TEST_MAIN #include -int -main() +int main() { printf("CPU count: %d\n", SDL_GetCPUCount()); printf("CPU type: %s\n", SDL_GetCPUType()); diff --git a/modules/SDL2/src/dynapi/SDL2.exports b/modules/SDL2/src/dynapi/SDL2.exports index 5085bff..696e2be 100644 --- a/modules/SDL2/src/dynapi/SDL2.exports +++ b/modules/SDL2/src/dynapi/SDL2.exports @@ -867,3 +867,6 @@ ++'_SDL_SensorGetDataWithTimestamp'.'SDL2.dll'.'SDL_SensorGetDataWithTimestamp' ++'_SDL_ResetHints'.'SDL2.dll'.'SDL_ResetHints' ++'_SDL_strcasestr'.'SDL2.dll'.'SDL_strcasestr' +# ++'_SDL_GDKSuspendComplete'.'SDL2.dll'.'SDL_GDKSuspendComplete' +++'_SDL_HasWindowSurface'.'SDL2.dll'.'SDL_HasWindowSurface' +++'_SDL_DestroyWindowSurface'.'SDL2.dll'.'SDL_DestroyWindowSurface' diff --git a/modules/SDL2/src/dynapi/SDL_dynapi.c b/modules/SDL2/src/dynapi/SDL_dynapi.c index 054577c..6151f01 100644 --- a/modules/SDL2/src/dynapi/SDL_dynapi.c +++ b/modules/SDL2/src/dynapi/SDL_dynapi.c @@ -24,6 +24,8 @@ #if SDL_DYNAMIC_API +#define SDL_DYNAMIC_API_ENVVAR "SDL_DYNAMIC_API" + #if defined(__OS2__) #define INCL_DOS #define INCL_DOSERRORS @@ -40,20 +42,23 @@ /* This is the version of the dynamic API. This doesn't match the SDL version and should not change until there's been a major revamp in API/ABI. So 2.0.5 adds functions over 2.0.4? This number doesn't change; - the sizeof (jump_table) changes instead. But 2.1.0 changes how a function + the sizeof(jump_table) changes instead. But 2.1.0 changes how a function works in an incompatible way or removes a function? This number changes, - since sizeof (jump_table) isn't sufficient anymore. It's likely + since sizeof(jump_table) isn't sufficient anymore. It's likely we'll forget to bump every time we add a function, so this is the failsafe switch for major API change decisions. Respect it and use it sparingly. */ #define SDL_DYNAPI_VERSION 1 +#ifdef __cplusplus +extern "C" { +#endif + static void SDL_InitDynamicAPI(void); /* BE CAREFUL CALLING ANY SDL CODE IN HERE, IT WILL BLOW UP. Even self-contained stuff might call SDL_Error and break everything. */ - /* behold, the macro salsa! */ /* !!! FIXME: ...disabled...until we write it. :) */ @@ -61,110 +66,134 @@ static void SDL_InitDynamicAPI(void); #if DISABLE_JUMP_MAGIC /* Can't use the macro for varargs nonsense. This is atrocious. */ -#define SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) \ - _static void SDLCALL SDL_Log##logname##name(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - va_list ap; initcall; va_start(ap, fmt); \ - jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \ - va_end(ap); \ +#define SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) \ + _static void SDLCALL SDL_Log##logname##name(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \ + va_end(ap); \ } -#define SDL_DYNAPI_VARARGS(_static, name, initcall) \ - _static int SDLCALL SDL_SetError##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - char buf[128], *str = buf; \ - int result; \ - va_list ap; initcall; \ - va_start(ap, fmt); \ - result = jump_table.SDL_vsnprintf(buf, sizeof(buf), fmt, ap); \ - va_end(ap); \ - if (result >= 0 && (size_t)result >= sizeof(buf)) { \ - size_t len = (size_t)result + 1; \ - str = (char *)jump_table.SDL_malloc(len); \ - if (str) { \ - va_start(ap, fmt); \ - result = jump_table.SDL_vsnprintf(str, len, fmt, ap); \ - va_end(ap); \ - } \ - } \ - if (result >= 0) { \ - result = jump_table.SDL_SetError("%s", str); \ - } \ - if (str != buf) { \ - jump_table.SDL_free(str); \ - } \ - return result; \ - } \ - _static int SDLCALL SDL_sscanf##name(const char *buf, SDL_SCANF_FORMAT_STRING const char *fmt, ...) { \ - int retval; va_list ap; initcall; va_start(ap, fmt); \ - retval = jump_table.SDL_vsscanf(buf, fmt, ap); \ - va_end(ap); \ - return retval; \ - } \ - _static int SDLCALL SDL_snprintf##name(SDL_OUT_Z_CAP(maxlen) char *buf, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - int retval; va_list ap; initcall; va_start(ap, fmt); \ - retval = jump_table.SDL_vsnprintf(buf, maxlen, fmt, ap); \ - va_end(ap); \ - return retval; \ - } \ - _static int SDLCALL SDL_asprintf##name(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - int retval; va_list ap; initcall; va_start(ap, fmt); \ - retval = jump_table.SDL_vasprintf(strp, fmt, ap); \ - va_end(ap); \ - return retval; \ - } \ - _static void SDLCALL SDL_Log##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - va_list ap; initcall; va_start(ap, fmt); \ - jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \ - va_end(ap); \ - } \ - _static void SDLCALL SDL_LogMessage##name(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \ - va_list ap; initcall; va_start(ap, fmt); \ - jump_table.SDL_LogMessageV(category, priority, fmt, ap); \ - va_end(ap); \ - } \ - SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Verbose, VERBOSE) \ - SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Debug, DEBUG) \ - SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Info, INFO) \ - SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Warn, WARN) \ - SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Error, ERROR) \ +#define SDL_DYNAPI_VARARGS(_static, name, initcall) \ + _static int SDLCALL SDL_SetError##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + char buf[128], *str = buf; \ + int result; \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + result = jump_table.SDL_vsnprintf(buf, sizeof(buf), fmt, ap); \ + va_end(ap); \ + if (result >= 0 && (size_t)result >= sizeof(buf)) { \ + size_t len = (size_t)result + 1; \ + str = (char *)jump_table.SDL_malloc(len); \ + if (str) { \ + va_start(ap, fmt); \ + result = jump_table.SDL_vsnprintf(str, len, fmt, ap); \ + va_end(ap); \ + } \ + } \ + if (result >= 0) { \ + result = jump_table.SDL_SetError("%s", str); \ + } \ + if (str != buf) { \ + jump_table.SDL_free(str); \ + } \ + return result; \ + } \ + _static int SDLCALL SDL_sscanf##name(const char *buf, SDL_SCANF_FORMAT_STRING const char *fmt, ...) \ + { \ + int retval; \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + retval = jump_table.SDL_vsscanf(buf, fmt, ap); \ + va_end(ap); \ + return retval; \ + } \ + _static int SDLCALL SDL_snprintf##name(SDL_OUT_Z_CAP(maxlen) char *buf, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + int retval; \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + retval = jump_table.SDL_vsnprintf(buf, maxlen, fmt, ap); \ + va_end(ap); \ + return retval; \ + } \ + _static int SDLCALL SDL_asprintf##name(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + int retval; \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + retval = jump_table.SDL_vasprintf(strp, fmt, ap); \ + va_end(ap); \ + return retval; \ + } \ + _static void SDLCALL SDL_Log##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \ + va_end(ap); \ + } \ + _static void SDLCALL SDL_LogMessage##name(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \ + { \ + va_list ap; \ + initcall; \ + va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(category, priority, fmt, ap); \ + va_end(ap); \ + } \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Verbose, VERBOSE) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Debug, DEBUG) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Info, INFO) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Warn, WARN) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Error, ERROR) \ SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Critical, CRITICAL) #endif - /* Typedefs for function pointers for jump table, and predeclare funcs */ /* The DEFAULT funcs will init jump table and then call real function. */ /* The REAL funcs are the actual functions, name-mangled to not clash. */ -#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ - typedef rc (SDLCALL *SDL_DYNAPIFN_##fn) params; \ - static rc SDLCALL fn##_DEFAULT params; \ +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) \ + typedef rc (SDLCALL *SDL_DYNAPIFN_##fn) params;\ + static rc SDLCALL fn##_DEFAULT params; \ extern rc SDLCALL fn##_REAL params; #include "SDL_dynapi_procs.h" #undef SDL_DYNAPI_PROC /* The jump table! */ -typedef struct { - #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) SDL_DYNAPIFN_##fn fn; - #include "SDL_dynapi_procs.h" - #undef SDL_DYNAPI_PROC +typedef struct +{ +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) SDL_DYNAPIFN_##fn fn; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC } SDL_DYNAPI_jump_table; /* Predeclare the default functions for initializing the jump table. */ -#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) static rc SDLCALL fn##_DEFAULT params; +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) static rc SDLCALL fn##_DEFAULT params; #include "SDL_dynapi_procs.h" #undef SDL_DYNAPI_PROC /* The actual jump table. */ static SDL_DYNAPI_jump_table jump_table = { - #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) fn##_DEFAULT, - #include "SDL_dynapi_procs.h" - #undef SDL_DYNAPI_PROC +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) fn##_DEFAULT, +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC }; /* Default functions init the function table then call right thing. */ #if DISABLE_JUMP_MAGIC -#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ - static rc SDLCALL fn##_DEFAULT params { \ - SDL_InitDynamicAPI(); \ - ret jump_table.fn args; \ +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) \ + static rc SDLCALL fn##_DEFAULT params \ + { \ + SDL_InitDynamicAPI(); \ + ret jump_table.fn args; \ } #define SDL_DYNAPI_PROC_NO_VARARGS 1 #include "SDL_dynapi_procs.h" @@ -178,13 +207,16 @@ SDL_DYNAPI_VARARGS(static, _DEFAULT, SDL_InitDynamicAPI()) /* Public API functions to jump into the jump table. */ #if DISABLE_JUMP_MAGIC -#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ - rc SDLCALL fn params { ret jump_table.fn args; } +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) \ + rc SDLCALL fn params \ + { \ + ret jump_table.fn args; \ + } #define SDL_DYNAPI_PROC_NO_VARARGS 1 #include "SDL_dynapi_procs.h" #undef SDL_DYNAPI_PROC #undef SDL_DYNAPI_PROC_NO_VARARGS -SDL_DYNAPI_VARARGS(,,) +SDL_DYNAPI_VARARGS(, , ) #else /* !!! FIXME: need the jump magic. */ #error Write me. @@ -192,16 +224,18 @@ SDL_DYNAPI_VARARGS(,,) #define ENABLE_SDL_CALL_LOGGING 0 #if ENABLE_SDL_CALL_LOGGING -static int SDLCALL SDL_SetError_LOGSDLCALLS(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { - char buf[512]; /* !!! FIXME: dynamic allocation */ \ +static int SDLCALL SDL_SetError_LOGSDLCALLS(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +{ + char buf[512]; /* !!! FIXME: dynamic allocation */ va_list ap; SDL_Log_REAL("SDL2CALL SDL_SetError"); va_start(ap, fmt); - SDL_vsnprintf_REAL(buf, sizeof (buf), fmt, ap); + SDL_vsnprintf_REAL(buf, sizeof(buf), fmt, ap); va_end(ap); return SDL_SetError_REAL("%s", buf); } -static int SDLCALL SDL_sscanf_LOGSDLCALLS(const char *buf, SDL_SCANF_FORMAT_STRING const char *fmt, ...) { +static int SDLCALL SDL_sscanf_LOGSDLCALLS(const char *buf, SDL_SCANF_FORMAT_STRING const char *fmt, ...) +{ int retval; va_list ap; SDL_Log_REAL("SDL2CALL SDL_sscanf"); @@ -210,7 +244,8 @@ static int SDLCALL SDL_sscanf_LOGSDLCALLS(const char *buf, SDL_SCANF_FORMAT_STRI va_end(ap); return retval; } -static int SDLCALL SDL_snprintf_LOGSDLCALLS(SDL_OUT_Z_CAP(maxlen) char *buf, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { +static int SDLCALL SDL_snprintf_LOGSDLCALLS(SDL_OUT_Z_CAP(maxlen) char *buf, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +{ int retval; va_list ap; SDL_Log_REAL("SDL2CALL SDL_snprintf"); @@ -219,7 +254,8 @@ static int SDLCALL SDL_snprintf_LOGSDLCALLS(SDL_OUT_Z_CAP(maxlen) char *buf, siz va_end(ap); return retval; } -static int SDLCALL SDL_asprintf_LOGSDLCALLS(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { +static int SDLCALL SDL_asprintf_LOGSDLCALLS(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +{ int retval; va_list ap; SDL_Log_REAL("SDL2CALL SDL_asprintf"); @@ -228,14 +264,16 @@ static int SDLCALL SDL_asprintf_LOGSDLCALLS(char **strp, SDL_PRINTF_FORMAT_STRIN va_end(ap); return retval; } -static void SDLCALL SDL_Log_LOGSDLCALLS(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { +static void SDLCALL SDL_Log_LOGSDLCALLS(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +{ va_list ap; SDL_Log_REAL("SDL2CALL SDL_Log"); va_start(ap, fmt); - SDL_LogMessageV_REAL(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \ + SDL_LogMessageV_REAL(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); va_end(ap); } -static void SDLCALL SDL_LogMessage_LOGSDLCALLS(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { +static void SDLCALL SDL_LogMessage_LOGSDLCALLS(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +{ va_list ap; SDL_Log_REAL("SDL2CALL SDL_LogMessage"); va_start(ap, fmt); @@ -265,38 +303,37 @@ SDL_DYNAPI_VARARGS_LOGFN_LOGSDLCALLS(Critical, CRITICAL) /* we make this a static function so we can call the correct one without the system's dynamic linker resolving to the wrong version of this. */ -static Sint32 -initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize) +static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize) { - SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table; + SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *)table; if (apiver != SDL_DYNAPI_VERSION) { /* !!! FIXME: can maybe handle older versions? */ - return -1; /* not compatible. */ - } else if (tablesize > sizeof (jump_table)) { - return -1; /* newer version of SDL with functions we can't provide. */ + return -1; /* not compatible. */ + } else if (tablesize > sizeof(jump_table)) { + return -1; /* newer version of SDL with functions we can't provide. */ } - /* Init our jump table first. */ - #if ENABLE_SDL_CALL_LOGGING +/* Init our jump table first. */ +#if ENABLE_SDL_CALL_LOGGING { const char *env = SDL_getenv_REAL("SDL_DYNAPI_LOG_CALLS"); const SDL_bool log_calls = (env && SDL_atoi_REAL(env)); if (log_calls) { - #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_LOGSDLCALLS; - #include "SDL_dynapi_procs.h" - #undef SDL_DYNAPI_PROC +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) jump_table.fn = fn##_LOGSDLCALLS; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC } else { - #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL; - #include "SDL_dynapi_procs.h" - #undef SDL_DYNAPI_PROC +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) jump_table.fn = fn##_REAL; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC } } - #else - #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL; - #include "SDL_dynapi_procs.h" - #undef SDL_DYNAPI_PROC - #endif +#else +#define SDL_DYNAPI_PROC(rc, fn, params, args, ret) jump_table.fn = fn##_REAL; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC +#endif /* Then the external table... */ if (output_jump_table != &jump_table) { @@ -305,21 +342,22 @@ initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize) /* Safe to call SDL functions now; jump table is initialized! */ - return 0; /* success! */ + return 0; /* success! */ } - /* Here's the exported entry point that fills in the jump table. */ /* Use specific types when an "int" might suffice to keep this sane. */ typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize); extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32); -Sint32 -SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) +Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) { return initialize_jumptable(apiver, table, tablesize); } +#ifdef __cplusplus +} +#endif /* Obviously we can't use SDL_LoadObject() to load SDL. :) */ /* Also obviously, we never close the loaded library. */ @@ -330,10 +368,10 @@ SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) #include static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) { - HANDLE lib = LoadLibraryA(fname); + HMODULE lib = LoadLibraryA(fname); void *retval = NULL; if (lib) { - retval = GetProcAddress(lib, sym); + retval = (void *) GetProcAddress(lib, sym); if (retval == NULL) { FreeLibrary(lib); } @@ -374,56 +412,72 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) #error Please define your platform. #endif - static void dynapi_warn(const char *msg) { const char *caption = "SDL Dynamic API Failure!"; - /* SDL_ShowSimpleMessageBox() is a too heavy for here. */ - #if (defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) +/* SDL_ShowSimpleMessageBox() is a too heavy for here. */ +#if (defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) MessageBoxA(NULL, msg, caption, MB_OK | MB_ICONERROR); - #elif defined(HAVE_STDIO_H) +#elif defined(HAVE_STDIO_H) fprintf(stderr, "\n\n%s\n%s\n\n", caption, msg); fflush(stderr); - #endif +#endif } /* This is not declared in any header, although it is shared between some parts of SDL, because we don't want anything calling it without an extremely good reason. */ +#ifdef __cplusplus +extern "C" { +#endif +extern SDL_NORETURN void SDL_ExitProcess(int exitcode); #if defined(__WATCOMC__) -void SDL_ExitProcess(int exitcode); #pragma aux SDL_ExitProcess aborts; #endif -SDL_NORETURN void SDL_ExitProcess(int exitcode); - +#ifdef __cplusplus +} +#endif -static void -SDL_InitDynamicAPILocked(void) +static void SDL_InitDynamicAPILocked(void) { - const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API"); - SDL_DYNAPI_ENTRYFN entry = NULL; /* funcs from here by default. */ + char *libname = SDL_getenv_REAL(SDL_DYNAMIC_API_ENVVAR); + SDL_DYNAPI_ENTRYFN entry = NULL; /* funcs from here by default. */ SDL_bool use_internal = SDL_TRUE; if (libname) { - entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry"); + while (*libname && !entry) { + char *ptr = libname; + while (SDL_TRUE) { + const char ch = *ptr; + if ((ch == ',') || (ch == '\0')) { + *ptr = '\0'; + entry = (SDL_DYNAPI_ENTRYFN)get_sdlapi_entry(libname, "SDL_DYNAPI_entry"); + *ptr = ch; + libname = (ch == '\0') ? ptr : (ptr + 1); + break; + } else { + ptr++; + } + } + } if (!entry) { - dynapi_warn("Couldn't load overriding SDL library. Please fix or remove the SDL_DYNAMIC_API environment variable. Using the default SDL."); + dynapi_warn("Couldn't load an overriding SDL library. Please fix or remove the " SDL_DYNAMIC_API_ENVVAR " environment variable. Using the default SDL."); /* Just fill in the function pointers from this library, later. */ } } if (entry) { - if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) { - dynapi_warn("Couldn't override SDL library. Using a newer SDL build might help. Please fix or remove the SDL_DYNAMIC_API environment variable. Using the default SDL."); + if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof(jump_table)) < 0) { + dynapi_warn("Couldn't override SDL library. Using a newer SDL build might help. Please fix or remove the " SDL_DYNAMIC_API_ENVVAR " environment variable. Using the default SDL."); /* Just fill in the function pointers from this library, later. */ } else { - use_internal = SDL_FALSE; /* We overrode SDL! Don't use the internal version! */ + use_internal = SDL_FALSE; /* We overrode SDL! Don't use the internal version! */ } } /* Just fill in the function pointers from this library. */ if (use_internal) { - if (initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) { + if (initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof(jump_table)) < 0) { /* Now we're screwed. Should definitely abort now. */ dynapi_warn("Failed to initialize internal SDL dynapi. As this would otherwise crash, we have to abort now."); SDL_ExitProcess(86); @@ -433,8 +487,7 @@ SDL_InitDynamicAPILocked(void) /* we intentionally never close the newly-loaded lib, of course. */ } -static void -SDL_InitDynamicAPI(void) +static void SDL_InitDynamicAPI(void) { /* So the theory is that every function in the jump table defaults to * calling this function, and then replaces itself with a version that @@ -467,6 +520,6 @@ SDL_InitDynamicAPI(void) #endif } -#endif /* SDL_DYNAMIC_API */ +#endif /* SDL_DYNAMIC_API */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/dynapi/SDL_dynapi.h b/modules/SDL2/src/dynapi/SDL_dynapi.h index 35acf1a..99ca080 100644 --- a/modules/SDL2/src/dynapi/SDL_dynapi.h +++ b/modules/SDL2/src/dynapi/SDL_dynapi.h @@ -35,7 +35,7 @@ updated SDL can transparently take advantage of them, but your program will not without this feature. Think hard before turning it off. */ -#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */ +#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */ #error Nope, you have to edit this file to force this off. #endif @@ -43,7 +43,7 @@ #include "TargetConditionals.h" #endif -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* probably not useful on iOS. */ +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* probably not useful on iOS. */ #define SDL_DYNAMIC_API 0 #elif defined(__ANDROID__) /* probably not useful on Android. */ #define SDL_DYNAMIC_API 0 @@ -51,7 +51,7 @@ #define SDL_DYNAMIC_API 0 #elif defined(__EMSCRIPTEN__) && __EMSCRIPTEN__ /* probably not useful on Emscripten. */ #define SDL_DYNAMIC_API 0 -#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */ +#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */ #define SDL_DYNAMIC_API 0 #elif defined(__PS2__) && __PS2__ #define SDL_DYNAMIC_API 0 @@ -59,16 +59,16 @@ #define SDL_DYNAMIC_API 0 #elif defined(__riscos__) && __riscos__ /* probably not useful on RISC OS, since dlopen() can't be used when using static linking. */ #define SDL_DYNAMIC_API 0 -#elif defined(__clang_analyzer__) -#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */ +#elif defined(__clang_analyzer__) || defined(SDL_THREAD_SAFETY_ANALYSIS) +#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */ #elif defined(__VITA__) -#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */ +#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */ #elif defined(__NGAGE__) -#define SDL_DYNAMIC_API 0 /* The N-Gage doesn't support dynamic linking either */ +#define SDL_DYNAMIC_API 0 /* The N-Gage doesn't support dynamic linking either */ #elif defined(__3DS__) -#define SDL_DYNAMIC_API 0 /* devkitARM doesn't support dynamic linking */ +#define SDL_DYNAMIC_API 0 /* devkitARM doesn't support dynamic linking */ #elif defined(DYNAPI_NEEDS_DLOPEN) && !defined(HAVE_DLOPEN) -#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */ +#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */ #endif /* everyone else. This is where we turn on the API if nothing forced it off. */ diff --git a/modules/SDL2/src/dynapi/SDL_dynapi_overrides.h b/modules/SDL2/src/dynapi/SDL_dynapi_overrides.h index 52ddfaf..0b59a21 100644 --- a/modules/SDL2/src/dynapi/SDL_dynapi_overrides.h +++ b/modules/SDL2/src/dynapi/SDL_dynapi_overrides.h @@ -893,3 +893,6 @@ #define SDL_SensorGetDataWithTimestamp SDL_SensorGetDataWithTimestamp_REAL #define SDL_ResetHints SDL_ResetHints_REAL #define SDL_strcasestr SDL_strcasestr_REAL +#define SDL_GDKSuspendComplete SDL_GDKSuspendComplete_REAL +#define SDL_HasWindowSurface SDL_HasWindowSurface_REAL +#define SDL_DestroyWindowSurface SDL_DestroyWindowSurface_REAL diff --git a/modules/SDL2/src/dynapi/SDL_dynapi_procs.h b/modules/SDL2/src/dynapi/SDL_dynapi_procs.h index 2180dbf..8e1d36d 100644 --- a/modules/SDL2/src/dynapi/SDL_dynapi_procs.h +++ b/modules/SDL2/src/dynapi/SDL_dynapi_procs.h @@ -90,9 +90,9 @@ SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return) SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(Uint32 a),(a),) SDL_DYNAPI_PROC(Uint32,SDL_WasInit,(Uint32 a),(a),return) SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),) -SDL_DYNAPI_PROC(SDL_assert_state,SDL_ReportAssertion,(SDL_assert_data *a, const char *b, const char *c, int d),(a,b,c,d),return) +SDL_DYNAPI_PROC(SDL_AssertState,SDL_ReportAssertion,(SDL_AssertData *a, const char *b, const char *c, int d),(a,b,c,d),return) SDL_DYNAPI_PROC(void,SDL_SetAssertionHandler,(SDL_AssertionHandler a, void *b),(a,b),) -SDL_DYNAPI_PROC(const SDL_assert_data*,SDL_GetAssertionReport,(void),(),return) +SDL_DYNAPI_PROC(const SDL_AssertData*,SDL_GetAssertionReport,(void),(),return) SDL_DYNAPI_PROC(void,SDL_ResetAssertionReport,(void),(),) SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicTryLock,(SDL_SpinLock *a),(a),return) SDL_DYNAPI_PROC(void,SDL_AtomicLock,(SDL_SpinLock *a),(a),) @@ -607,7 +607,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_DXGIGetOutputInfo,(int a,int *b, int *c),(a,b,c),re #endif SDL_DYNAPI_PROC(SDL_bool,SDL_RenderIsClipEnabled,(SDL_Renderer *a),(a),return) #ifdef __WINRT__ -SDL_DYNAPI_PROC(int,SDL_WinRTRunApp,(int a, char **b, void *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_WinRTRunApp,(SDL_main_func a, void *b),(a,b),return) SDL_DYNAPI_PROC(const wchar_t*,SDL_WinRTGetFSPathUNICODE,(SDL_WinRT_Path a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_WinRTGetFSPathUTF8,(SDL_WinRT_Path a),(a),return) #endif @@ -771,7 +771,7 @@ SDL_DYNAPI_PROC(int,SDL_RenderCopyF,(SDL_Renderer *a, SDL_Texture *b, const SDL_ SDL_DYNAPI_PROC(int,SDL_RenderCopyExF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return) SDL_DYNAPI_PROC(SDL_TouchDeviceType,SDL_GetTouchDeviceType,(SDL_TouchID a),(a),return) #ifdef __IPHONEOS__ -SDL_DYNAPI_PROC(int,SDL_UIKitRunApp,(int a, char *b, SDL_main_func c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_UIKitRunApp,(int a, char *b[], SDL_main_func c),(a,b,c),return) #endif SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return) SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return) @@ -976,3 +976,8 @@ SDL_DYNAPI_PROC(int,SDL_GameControllerGetSensorDataWithTimestamp,(SDL_GameContro SDL_DYNAPI_PROC(int,SDL_SensorGetDataWithTimestamp,(SDL_Sensor *a, Uint64 *b, float *c, int d),(a,b,c,d),return) SDL_DYNAPI_PROC(void,SDL_ResetHints,(void),(),) SDL_DYNAPI_PROC(char*,SDL_strcasestr,(const char *a, const char *b),(a,b),return) +#if defined(__GDK__) +SDL_DYNAPI_PROC(void,SDL_GDKSuspendComplete,(void),(),) +#endif +SDL_DYNAPI_PROC(SDL_bool,SDL_HasWindowSurface,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_DestroyWindowSurface,(SDL_Window *a),(a),return) diff --git a/modules/SDL2/src/dynapi/gendynapi.pl b/modules/SDL2/src/dynapi/gendynapi.pl index b740fe8..47509f8 100644 --- a/modules/SDL2/src/dynapi/gendynapi.pl +++ b/modules/SDL2/src/dynapi/gendynapi.pl @@ -142,6 +142,7 @@ while (my $d = readdir(HEADERS)) { } close(HEADER); } + closedir(HEADERS); close(SDL_DYNAPI_PROCS_H); diff --git a/modules/SDL2/src/events/SDL_clipboardevents.c b/modules/SDL2/src/events/SDL_clipboardevents.c index ac90c25..0508074 100644 --- a/modules/SDL2/src/events/SDL_clipboardevents.c +++ b/modules/SDL2/src/events/SDL_clipboardevents.c @@ -26,9 +26,7 @@ #include "SDL_events_c.h" #include "SDL_clipboardevents_c.h" - -int -SDL_SendClipboardUpdate(void) +int SDL_SendClipboardUpdate(void) { int posted; @@ -40,7 +38,7 @@ SDL_SendClipboardUpdate(void) posted = (SDL_PushEvent(&event) > 0); } - return (posted); + return posted; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/events/SDL_displayevents.c b/modules/SDL2/src/events/SDL_displayevents.c index a217c41..ec5e158 100644 --- a/modules/SDL2/src/events/SDL_displayevents.c +++ b/modules/SDL2/src/events/SDL_displayevents.c @@ -25,13 +25,11 @@ #include "SDL_events.h" #include "SDL_events_c.h" - -int -SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1) +int SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1) { int posted; - if (!display) { + if (display == NULL) { return 0; } switch (displayevent) { @@ -54,7 +52,7 @@ SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1) posted = (SDL_PushEvent(&event) > 0); } - return (posted); + return posted; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/events/SDL_dropevents.c b/modules/SDL2/src/events/SDL_dropevents.c index 99abc88..3665a17 100644 --- a/modules/SDL2/src/events/SDL_dropevents.c +++ b/modules/SDL2/src/events/SDL_dropevents.c @@ -26,11 +26,9 @@ #include "SDL_events_c.h" #include "SDL_dropevents_c.h" -#include "../video/SDL_sysvideo.h" /* for SDL_Window internals. */ +#include "../video/SDL_sysvideo.h" /* for SDL_Window internals. */ - -static int -SDL_SendDrop(SDL_Window *window, const SDL_EventType evtype, const char *data) +static int SDL_SendDrop(SDL_Window *window, const SDL_EventType evtype, const char *data) { static SDL_bool app_is_dropping = SDL_FALSE; int posted = 0; @@ -76,23 +74,19 @@ SDL_SendDrop(SDL_Window *window, const SDL_EventType evtype, const char *data) return posted; } -int -SDL_SendDropFile(SDL_Window *window, const char *file) +int SDL_SendDropFile(SDL_Window *window, const char *file) { return SDL_SendDrop(window, SDL_DROPFILE, file); } -int -SDL_SendDropText(SDL_Window *window, const char *text) +int SDL_SendDropText(SDL_Window *window, const char *text) { return SDL_SendDrop(window, SDL_DROPTEXT, text); } -int -SDL_SendDropComplete(SDL_Window *window) +int SDL_SendDropComplete(SDL_Window *window) { return SDL_SendDrop(window, SDL_DROPCOMPLETE, NULL); } - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/events/SDL_events.c b/modules/SDL2/src/events/SDL_events.c index 36ca746..05c2bf8 100644 --- a/modules/SDL2/src/events/SDL_events.c +++ b/modules/SDL2/src/events/SDL_events.c @@ -36,18 +36,19 @@ #undef SDL_PRIs64 #if (defined(__WIN32__) || defined(__GDK__)) && !defined(__CYGWIN__) -#define SDL_PRIs64 "I64d" +#define SDL_PRIs64 "I64d" #else -#define SDL_PRIs64 "lld" +#define SDL_PRIs64 "lld" #endif /* An arbitrary limit so we don't have unbounded growth */ -#define SDL_MAX_QUEUED_EVENTS 65535 +#define SDL_MAX_QUEUED_EVENTS 65535 /* Determines how often we wake to call SDL_PumpEvents() in SDL_WaitEventTimeout_Device() */ #define PERIODIC_POLL_INTERVAL_MS 3000 -typedef struct SDL_EventWatcher { +typedef struct SDL_EventWatcher +{ SDL_EventFilter callback; void *userdata; SDL_bool removed; @@ -61,7 +62,8 @@ static SDL_bool SDL_event_watchers_dispatching = SDL_FALSE; static SDL_bool SDL_event_watchers_removed = SDL_FALSE; static SDL_atomic_t SDL_sentinel_pending; -typedef struct { +typedef struct +{ Uint32 bits[8]; } SDL_DisabledEventBlock; @@ -96,13 +98,11 @@ static struct SDL_SysWMEntry *wmmsg_free; } SDL_EventQ = { NULL, SDL_FALSE, { 0 }, 0, NULL, NULL, NULL, NULL, NULL }; - #if !SDL_JOYSTICK_DISABLED static SDL_bool SDL_update_joysticks = SDL_TRUE; -static void -SDL_CalculateShouldUpdateJoysticks(SDL_bool hint_value) +static void SDL_CalculateShouldUpdateJoysticks(SDL_bool hint_value) { if (hint_value && (!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] || SDL_JoystickEventState(SDL_QUERY))) { @@ -112,21 +112,18 @@ SDL_CalculateShouldUpdateJoysticks(SDL_bool hint_value) } } -static void SDLCALL -SDL_AutoUpdateJoysticksChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_AutoUpdateJoysticksChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_CalculateShouldUpdateJoysticks(SDL_GetStringBoolean(hint, SDL_TRUE)); } #endif /* !SDL_JOYSTICK_DISABLED */ - #if !SDL_SENSOR_DISABLED static SDL_bool SDL_update_sensors = SDL_TRUE; -static void -SDL_CalculateShouldUpdateSensors(SDL_bool hint_value) +static void SDL_CalculateShouldUpdateSensors(SDL_bool hint_value) { if (hint_value && !SDL_disabled_events[SDL_SENSORUPDATE >> 8]) { @@ -136,16 +133,14 @@ SDL_CalculateShouldUpdateSensors(SDL_bool hint_value) } } -static void SDLCALL -SDL_AutoUpdateSensorsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_AutoUpdateSensorsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_CalculateShouldUpdateSensors(SDL_GetStringBoolean(hint, SDL_TRUE)); } #endif /* !SDL_SENSOR_DISABLED */ -static void SDLCALL -SDL_PollSentinelChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_PollSentinelChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { (void)SDL_EventState(SDL_POLLSENTINEL, SDL_GetStringBoolean(hint, SDL_TRUE) ? SDL_ENABLE : SDL_DISABLE); } @@ -159,25 +154,23 @@ SDL_PollSentinelChanged(void *userdata, const char *name, const char *oldValue, */ static int SDL_EventLoggingVerbosity = 0; -static void SDLCALL -SDL_EventLoggingChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_EventLoggingChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_EventLoggingVerbosity = (hint && *hint) ? SDL_clamp(SDL_atoi(hint), 0, 3) : 0; } -static void -SDL_LogEvent(const SDL_Event *event) +static void SDL_LogEvent(const SDL_Event *event) { - char name[32]; + char name[64]; char details[128]; /* sensor/mouse/finger motion are spammy, ignore these if they aren't demanded. */ - if ( (SDL_EventLoggingVerbosity < 2) && - ( (event->type == SDL_MOUSEMOTION) || - (event->type == SDL_FINGERMOTION) || - (event->type == SDL_CONTROLLERTOUCHPADMOTION) || - (event->type == SDL_CONTROLLERSENSORUPDATE) || - (event->type == SDL_SENSORUPDATE) ) ) { + if ((SDL_EventLoggingVerbosity < 2) && + ((event->type == SDL_MOUSEMOTION) || + (event->type == SDL_FINGERMOTION) || + (event->type == SDL_CONTROLLERTOUCHPADMOTION) || + (event->type == SDL_CONTROLLERSENSORUPDATE) || + (event->type == SDL_SENSORUPDATE))) { return; } @@ -186,8 +179,8 @@ SDL_LogEvent(const SDL_Event *event) return; } - /* this is to make SDL_snprintf() calls cleaner. */ - #define uint unsigned int +/* this is to make (void)SDL_snprintf() calls cleaner. */ +#define uint unsigned int name[0] = '\0'; details[0] = '\0'; @@ -196,54 +189,86 @@ SDL_LogEvent(const SDL_Event *event) if ((event->type >= SDL_USEREVENT) && (event->type <= SDL_LASTEVENT)) { char plusstr[16]; - SDL_strlcpy(name, "SDL_USEREVENT", sizeof (name)); + SDL_strlcpy(name, "SDL_USEREVENT", sizeof(name)); if (event->type > SDL_USEREVENT) { - SDL_snprintf(plusstr, sizeof (plusstr), "+%u", ((uint) event->type) - SDL_USEREVENT); + (void)SDL_snprintf(plusstr, sizeof(plusstr), "+%u", ((uint)event->type) - SDL_USEREVENT); } else { plusstr[0] = '\0'; } - SDL_snprintf(details, sizeof (details), "%s (timestamp=%u windowid=%u code=%d data1=%p data2=%p)", - plusstr, (uint) event->user.timestamp, (uint) event->user.windowID, - (int) event->user.code, event->user.data1, event->user.data2); + (void)SDL_snprintf(details, sizeof(details), "%s (timestamp=%u windowid=%u code=%d data1=%p data2=%p)", + plusstr, (uint)event->user.timestamp, (uint)event->user.windowID, + (int)event->user.code, event->user.data1, event->user.data2); } switch (event->type) { - #define SDL_EVENT_CASE(x) case x: SDL_strlcpy(name, #x, sizeof (name)); - SDL_EVENT_CASE(SDL_FIRSTEVENT) SDL_strlcpy(details, " (THIS IS PROBABLY A BUG!)", sizeof (details)); break; - SDL_EVENT_CASE(SDL_QUIT) SDL_snprintf(details, sizeof (details), " (timestamp=%u)", (uint) event->quit.timestamp); break; - SDL_EVENT_CASE(SDL_APP_TERMINATING) break; - SDL_EVENT_CASE(SDL_APP_LOWMEMORY) break; - SDL_EVENT_CASE(SDL_APP_WILLENTERBACKGROUND) break; - SDL_EVENT_CASE(SDL_APP_DIDENTERBACKGROUND) break; - SDL_EVENT_CASE(SDL_APP_WILLENTERFOREGROUND) break; - SDL_EVENT_CASE(SDL_APP_DIDENTERFOREGROUND) break; - SDL_EVENT_CASE(SDL_LOCALECHANGED) break; - SDL_EVENT_CASE(SDL_KEYMAPCHANGED) break; - SDL_EVENT_CASE(SDL_CLIPBOARDUPDATE) break; - SDL_EVENT_CASE(SDL_RENDER_TARGETS_RESET) break; - SDL_EVENT_CASE(SDL_RENDER_DEVICE_RESET) break; - - SDL_EVENT_CASE(SDL_DISPLAYEVENT) { +#define SDL_EVENT_CASE(x) \ + case x: \ + SDL_strlcpy(name, #x, sizeof(name)); + SDL_EVENT_CASE(SDL_FIRSTEVENT) + SDL_strlcpy(details, " (THIS IS PROBABLY A BUG!)", sizeof(details)); + break; + SDL_EVENT_CASE(SDL_QUIT) + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u)", (uint)event->quit.timestamp); + break; + SDL_EVENT_CASE(SDL_APP_TERMINATING) + break; + SDL_EVENT_CASE(SDL_APP_LOWMEMORY) + break; + SDL_EVENT_CASE(SDL_APP_WILLENTERBACKGROUND) + break; + SDL_EVENT_CASE(SDL_APP_DIDENTERBACKGROUND) + break; + SDL_EVENT_CASE(SDL_APP_WILLENTERFOREGROUND) + break; + SDL_EVENT_CASE(SDL_APP_DIDENTERFOREGROUND) + break; + SDL_EVENT_CASE(SDL_LOCALECHANGED) + break; + SDL_EVENT_CASE(SDL_KEYMAPCHANGED) + break; + SDL_EVENT_CASE(SDL_CLIPBOARDUPDATE) + break; + SDL_EVENT_CASE(SDL_RENDER_TARGETS_RESET) + break; + SDL_EVENT_CASE(SDL_RENDER_DEVICE_RESET) + break; + + SDL_EVENT_CASE(SDL_DISPLAYEVENT) + { char name2[64]; switch (event->display.event) { - case SDL_DISPLAYEVENT_NONE: SDL_strlcpy(name2, "SDL_DISPLAYEVENT_NONE (THIS IS PROBABLY A BUG!)", sizeof(name2)); break; - #define SDL_DISPLAYEVENT_CASE(x) case x: SDL_strlcpy(name2, #x, sizeof (name2)); break + case SDL_DISPLAYEVENT_NONE: + SDL_strlcpy(name2, "SDL_DISPLAYEVENT_NONE (THIS IS PROBABLY A BUG!)", sizeof(name2)); + break; +#define SDL_DISPLAYEVENT_CASE(x) \ + case x: \ + SDL_strlcpy(name2, #x, sizeof(name2)); \ + break SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_ORIENTATION); SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_CONNECTED); SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_DISCONNECTED); - #undef SDL_DISPLAYEVENT_CASE - default: SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof(name2)); break; + SDL_DISPLAYEVENT_CASE(SDL_DISPLAYEVENT_MOVED); +#undef SDL_DISPLAYEVENT_CASE + default: + SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof(name2)); + break; } - SDL_snprintf(details, sizeof (details), " (timestamp=%u display=%u event=%s data1=%d)", - (uint) event->display.timestamp, (uint) event->display.display, name2, (int) event->display.data1); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u display=%u event=%s data1=%d)", + (uint)event->display.timestamp, (uint)event->display.display, name2, (int)event->display.data1); break; } - SDL_EVENT_CASE(SDL_WINDOWEVENT) { + SDL_EVENT_CASE(SDL_WINDOWEVENT) + { char name2[64]; - switch(event->window.event) { - case SDL_WINDOWEVENT_NONE: SDL_strlcpy(name2, "SDL_WINDOWEVENT_NONE (THIS IS PROBABLY A BUG!)", sizeof (name2)); break; - #define SDL_WINDOWEVENT_CASE(x) case x: SDL_strlcpy(name2, #x, sizeof (name2)); break + switch (event->window.event) { + case SDL_WINDOWEVENT_NONE: + SDL_strlcpy(name2, "SDL_WINDOWEVENT_NONE (THIS IS PROBABLY A BUG!)", sizeof(name2)); + break; +#define SDL_WINDOWEVENT_CASE(x) \ + case x: \ + SDL_strlcpy(name2, #x, sizeof(name2)); \ + break SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_SHOWN); SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_HIDDEN); SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_EXPOSED); @@ -262,217 +287,266 @@ SDL_LogEvent(const SDL_Event *event) SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_HIT_TEST); SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_ICCPROF_CHANGED); SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_DISPLAY_CHANGED); - #undef SDL_WINDOWEVENT_CASE - default: SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof (name2)); break; +#undef SDL_WINDOWEVENT_CASE + default: + SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof(name2)); + break; } - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u event=%s data1=%d data2=%d)", - (uint) event->window.timestamp, (uint) event->window.windowID, name2, (int) event->window.data1, (int) event->window.data2); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u event=%s data1=%d data2=%d)", + (uint)event->window.timestamp, (uint)event->window.windowID, name2, (int)event->window.data1, (int)event->window.data2); break; } SDL_EVENT_CASE(SDL_SYSWMEVENT) - /* !!! FIXME: we don't delve further at the moment. */ - SDL_snprintf(details, sizeof (details), " (timestamp=%u)", (uint) event->syswm.timestamp); - break; - - #define PRINT_KEY_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u state=%s repeat=%s scancode=%u keycode=%u mod=%u)", \ - (uint) event->key.timestamp, (uint) event->key.windowID, \ - event->key.state == SDL_PRESSED ? "pressed" : "released", \ - event->key.repeat ? "true" : "false", \ - (uint) event->key.keysym.scancode, \ - (uint) event->key.keysym.sym, \ - (uint) event->key.keysym.mod) - SDL_EVENT_CASE(SDL_KEYDOWN) PRINT_KEY_EVENT(event); break; - SDL_EVENT_CASE(SDL_KEYUP) PRINT_KEY_EVENT(event); break; - #undef PRINT_KEY_EVENT + /* !!! FIXME: we don't delve further at the moment. */ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u)", (uint)event->syswm.timestamp); + break; + +#define PRINT_KEY_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u state=%s repeat=%s scancode=%u keycode=%u mod=%u)", \ + (uint)event->key.timestamp, (uint)event->key.windowID, \ + event->key.state == SDL_PRESSED ? "pressed" : "released", \ + event->key.repeat ? "true" : "false", \ + (uint)event->key.keysym.scancode, \ + (uint)event->key.keysym.sym, \ + (uint)event->key.keysym.mod) + SDL_EVENT_CASE(SDL_KEYDOWN) + PRINT_KEY_EVENT(event); + break; + SDL_EVENT_CASE(SDL_KEYUP) + PRINT_KEY_EVENT(event); + break; +#undef PRINT_KEY_EVENT SDL_EVENT_CASE(SDL_TEXTEDITING) - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u text='%s' start=%d length=%d)", - (uint) event->edit.timestamp, (uint) event->edit.windowID, - event->edit.text, (int) event->edit.start, (int) event->edit.length); - break; + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u text='%s' start=%d length=%d)", + (uint)event->edit.timestamp, (uint)event->edit.windowID, + event->edit.text, (int)event->edit.start, (int)event->edit.length); + break; SDL_EVENT_CASE(SDL_TEXTINPUT) - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u text='%s')", (uint) event->text.timestamp, (uint) event->text.windowID, event->text.text); - break; - + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u text='%s')", (uint)event->text.timestamp, (uint)event->text.windowID, event->text.text); + break; SDL_EVENT_CASE(SDL_MOUSEMOTION) - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u state=%u x=%d y=%d xrel=%d yrel=%d)", - (uint) event->motion.timestamp, (uint) event->motion.windowID, - (uint) event->motion.which, (uint) event->motion.state, - (int) event->motion.x, (int) event->motion.y, - (int) event->motion.xrel, (int) event->motion.yrel); - break; - - #define PRINT_MBUTTON_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u button=%u state=%s clicks=%u x=%d y=%d)", \ - (uint) event->button.timestamp, (uint) event->button.windowID, \ - (uint) event->button.which, (uint) event->button.button, \ - event->button.state == SDL_PRESSED ? "pressed" : "released", \ - (uint) event->button.clicks, (int) event->button.x, (int) event->button.y) - SDL_EVENT_CASE(SDL_MOUSEBUTTONDOWN) PRINT_MBUTTON_EVENT(event); break; - SDL_EVENT_CASE(SDL_MOUSEBUTTONUP) PRINT_MBUTTON_EVENT(event); break; - #undef PRINT_MBUTTON_EVENT - + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u state=%u x=%d y=%d xrel=%d yrel=%d)", + (uint)event->motion.timestamp, (uint)event->motion.windowID, + (uint)event->motion.which, (uint)event->motion.state, + (int)event->motion.x, (int)event->motion.y, + (int)event->motion.xrel, (int)event->motion.yrel); + break; + +#define PRINT_MBUTTON_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u button=%u state=%s clicks=%u x=%d y=%d)", \ + (uint)event->button.timestamp, (uint)event->button.windowID, \ + (uint)event->button.which, (uint)event->button.button, \ + event->button.state == SDL_PRESSED ? "pressed" : "released", \ + (uint)event->button.clicks, (int)event->button.x, (int)event->button.y) + SDL_EVENT_CASE(SDL_MOUSEBUTTONDOWN) + PRINT_MBUTTON_EVENT(event); + break; + SDL_EVENT_CASE(SDL_MOUSEBUTTONUP) + PRINT_MBUTTON_EVENT(event); + break; +#undef PRINT_MBUTTON_EVENT SDL_EVENT_CASE(SDL_MOUSEWHEEL) - SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u x=%d y=%d preciseX=%f preciseY=%f direction=%s)", - (uint) event->wheel.timestamp, (uint) event->wheel.windowID, - (uint) event->wheel.which, (int) event->wheel.x, (int) event->wheel.y, - event->wheel.preciseX, event->wheel.preciseY, - event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped"); - break; + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u x=%d y=%d preciseX=%f preciseY=%f direction=%s)", + (uint)event->wheel.timestamp, (uint)event->wheel.windowID, + (uint)event->wheel.which, (int)event->wheel.x, (int)event->wheel.y, + event->wheel.preciseX, event->wheel.preciseY, + event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped"); + break; SDL_EVENT_CASE(SDL_JOYAXISMOTION) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d axis=%u value=%d)", - (uint) event->jaxis.timestamp, (int) event->jaxis.which, - (uint) event->jaxis.axis, (int) event->jaxis.value); - break; + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d axis=%u value=%d)", + (uint)event->jaxis.timestamp, (int)event->jaxis.which, + (uint)event->jaxis.axis, (int)event->jaxis.value); + break; SDL_EVENT_CASE(SDL_JOYBALLMOTION) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d ball=%u xrel=%d yrel=%d)", - (uint) event->jball.timestamp, (int) event->jball.which, - (uint) event->jball.ball, (int) event->jball.xrel, (int) event->jball.yrel); - break; + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d ball=%u xrel=%d yrel=%d)", + (uint)event->jball.timestamp, (int)event->jball.which, + (uint)event->jball.ball, (int)event->jball.xrel, (int)event->jball.yrel); + break; SDL_EVENT_CASE(SDL_JOYHATMOTION) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d hat=%u value=%u)", - (uint) event->jhat.timestamp, (int) event->jhat.which, - (uint) event->jhat.hat, (uint) event->jhat.value); - break; - - #define PRINT_JBUTTON_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d button=%u state=%s)", \ - (uint) event->jbutton.timestamp, (int) event->jbutton.which, \ - (uint) event->jbutton.button, event->jbutton.state == SDL_PRESSED ? "pressed" : "released") - SDL_EVENT_CASE(SDL_JOYBUTTONDOWN) PRINT_JBUTTON_EVENT(event); break; - SDL_EVENT_CASE(SDL_JOYBUTTONUP) PRINT_JBUTTON_EVENT(event); break; - #undef PRINT_JBUTTON_EVENT - - #define PRINT_JOYDEV_EVENT(event) SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d)", (uint) event->jdevice.timestamp, (int) event->jdevice.which) - SDL_EVENT_CASE(SDL_JOYDEVICEADDED) PRINT_JOYDEV_EVENT(event); break; - SDL_EVENT_CASE(SDL_JOYDEVICEREMOVED) PRINT_JOYDEV_EVENT(event); break; - #undef PRINT_JOYDEV_EVENT + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d hat=%u value=%u)", + (uint)event->jhat.timestamp, (int)event->jhat.which, + (uint)event->jhat.hat, (uint)event->jhat.value); + break; + +#define PRINT_JBUTTON_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d button=%u state=%s)", \ + (uint)event->jbutton.timestamp, (int)event->jbutton.which, \ + (uint)event->jbutton.button, event->jbutton.state == SDL_PRESSED ? "pressed" : "released") + SDL_EVENT_CASE(SDL_JOYBUTTONDOWN) + PRINT_JBUTTON_EVENT(event); + break; + SDL_EVENT_CASE(SDL_JOYBUTTONUP) + PRINT_JBUTTON_EVENT(event); + break; +#undef PRINT_JBUTTON_EVENT + +#define PRINT_JOYDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d)", (uint)event->jdevice.timestamp, (int)event->jdevice.which) + SDL_EVENT_CASE(SDL_JOYDEVICEADDED) + PRINT_JOYDEV_EVENT(event); + break; + SDL_EVENT_CASE(SDL_JOYDEVICEREMOVED) + PRINT_JOYDEV_EVENT(event); + break; +#undef PRINT_JOYDEV_EVENT SDL_EVENT_CASE(SDL_CONTROLLERAXISMOTION) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d axis=%u value=%d)", - (uint) event->caxis.timestamp, (int) event->caxis.which, - (uint) event->caxis.axis, (int) event->caxis.value); - break; - - #define PRINT_CBUTTON_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d button=%u state=%s)", \ - (uint) event->cbutton.timestamp, (int) event->cbutton.which, \ - (uint) event->cbutton.button, event->cbutton.state == SDL_PRESSED ? "pressed" : "released") - SDL_EVENT_CASE(SDL_CONTROLLERBUTTONDOWN) PRINT_CBUTTON_EVENT(event); break; - SDL_EVENT_CASE(SDL_CONTROLLERBUTTONUP) PRINT_CBUTTON_EVENT(event); break; - #undef PRINT_CBUTTON_EVENT - - #define PRINT_CONTROLLERDEV_EVENT(event) SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d)", (uint) event->cdevice.timestamp, (int) event->cdevice.which) - SDL_EVENT_CASE(SDL_CONTROLLERDEVICEADDED) PRINT_CONTROLLERDEV_EVENT(event); break; - SDL_EVENT_CASE(SDL_CONTROLLERDEVICEREMOVED) PRINT_CONTROLLERDEV_EVENT(event); break; - SDL_EVENT_CASE(SDL_CONTROLLERDEVICEREMAPPED) PRINT_CONTROLLERDEV_EVENT(event); break; - #undef PRINT_CONTROLLERDEV_EVENT - - #define PRINT_CTOUCHPAD_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d touchpad=%d finger=%d x=%f y=%f pressure=%f)", \ - (uint) event->ctouchpad.timestamp, (int) event->ctouchpad.which, \ - (int) event->ctouchpad.touchpad, (int) event->ctouchpad.finger, \ - event->ctouchpad.x, event->ctouchpad.y, event->ctouchpad.pressure) - SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADDOWN) PRINT_CTOUCHPAD_EVENT(event); break; - SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADUP) PRINT_CTOUCHPAD_EVENT(event); break; - SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADMOTION) PRINT_CTOUCHPAD_EVENT(event); break; - #undef PRINT_CTOUCHPAD_EVENT - - SDL_EVENT_CASE(SDL_CONTROLLERSENSORUPDATE) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d sensor=%d data[0]=%f data[1]=%f data[2]=%f)", \ - (uint) event->csensor.timestamp, (int) event->csensor.which, (int) event->csensor.sensor, \ - event->csensor.data[0], event->csensor.data[1], event->csensor.data[2]); - break; - - #define PRINT_FINGER_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" fingerid=%"SDL_PRIs64" x=%f y=%f dx=%f dy=%f pressure=%f)", \ - (uint) event->tfinger.timestamp, (long long)event->tfinger.touchId, \ - (long long)event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ - event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure) - SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break; - SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break; - SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break; - #undef PRINT_FINGER_EVENT - - #define PRINT_DOLLAR_EVENT(event) \ - SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" gestureid=%"SDL_PRIs64" numfingers=%u error=%f x=%f y=%f)", \ - (uint) event->dgesture.timestamp, (long long)event->dgesture.touchId, \ - (long long)event->dgesture.gestureId, (uint) event->dgesture.numFingers, \ - event->dgesture.error, event->dgesture.x, event->dgesture.y) - SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break; - SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break; - #undef PRINT_DOLLAR_EVENT + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d axis=%u value=%d)", + (uint)event->caxis.timestamp, (int)event->caxis.which, + (uint)event->caxis.axis, (int)event->caxis.value); + break; + +#define PRINT_CBUTTON_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d button=%u state=%s)", \ + (uint)event->cbutton.timestamp, (int)event->cbutton.which, \ + (uint)event->cbutton.button, event->cbutton.state == SDL_PRESSED ? "pressed" : "released") + SDL_EVENT_CASE(SDL_CONTROLLERBUTTONDOWN) + PRINT_CBUTTON_EVENT(event); + break; + SDL_EVENT_CASE(SDL_CONTROLLERBUTTONUP) + PRINT_CBUTTON_EVENT(event); + break; +#undef PRINT_CBUTTON_EVENT + +#define PRINT_CONTROLLERDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d)", (uint)event->cdevice.timestamp, (int)event->cdevice.which) + SDL_EVENT_CASE(SDL_CONTROLLERDEVICEADDED) + PRINT_CONTROLLERDEV_EVENT(event); + break; + SDL_EVENT_CASE(SDL_CONTROLLERDEVICEREMOVED) + PRINT_CONTROLLERDEV_EVENT(event); + break; + SDL_EVENT_CASE(SDL_CONTROLLERDEVICEREMAPPED) + PRINT_CONTROLLERDEV_EVENT(event); + break; +#undef PRINT_CONTROLLERDEV_EVENT + +#define PRINT_CTOUCHPAD_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d touchpad=%d finger=%d x=%f y=%f pressure=%f)", \ + (uint)event->ctouchpad.timestamp, (int)event->ctouchpad.which, \ + (int)event->ctouchpad.touchpad, (int)event->ctouchpad.finger, \ + event->ctouchpad.x, event->ctouchpad.y, event->ctouchpad.pressure) + SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADDOWN) + PRINT_CTOUCHPAD_EVENT(event); + break; + SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADUP) + PRINT_CTOUCHPAD_EVENT(event); + break; + SDL_EVENT_CASE(SDL_CONTROLLERTOUCHPADMOTION) + PRINT_CTOUCHPAD_EVENT(event); + break; +#undef PRINT_CTOUCHPAD_EVENT + + SDL_EVENT_CASE(SDL_CONTROLLERSENSORUPDATE) + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d sensor=%d data[0]=%f data[1]=%f data[2]=%f)", + (uint)event->csensor.timestamp, (int)event->csensor.which, (int)event->csensor.sensor, + event->csensor.data[0], event->csensor.data[1], event->csensor.data[2]); + break; + +#define PRINT_FINGER_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " fingerid=%" SDL_PRIs64 " x=%f y=%f dx=%f dy=%f pressure=%f)", \ + (uint)event->tfinger.timestamp, (long long)event->tfinger.touchId, \ + (long long)event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ + event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure) + SDL_EVENT_CASE(SDL_FINGERDOWN) + PRINT_FINGER_EVENT(event); + break; + SDL_EVENT_CASE(SDL_FINGERUP) + PRINT_FINGER_EVENT(event); + break; + SDL_EVENT_CASE(SDL_FINGERMOTION) + PRINT_FINGER_EVENT(event); + break; +#undef PRINT_FINGER_EVENT + +#define PRINT_DOLLAR_EVENT(event) \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " gestureid=%" SDL_PRIs64 " numfingers=%u error=%f x=%f y=%f)", \ + (uint)event->dgesture.timestamp, (long long)event->dgesture.touchId, \ + (long long)event->dgesture.gestureId, (uint)event->dgesture.numFingers, \ + event->dgesture.error, event->dgesture.x, event->dgesture.y) + SDL_EVENT_CASE(SDL_DOLLARGESTURE) + PRINT_DOLLAR_EVENT(event); + break; + SDL_EVENT_CASE(SDL_DOLLARRECORD) + PRINT_DOLLAR_EVENT(event); + break; +#undef PRINT_DOLLAR_EVENT SDL_EVENT_CASE(SDL_MULTIGESTURE) - SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" dtheta=%f ddist=%f x=%f y=%f numfingers=%u)", - (uint) event->mgesture.timestamp, (long long)event->mgesture.touchId, - event->mgesture.dTheta, event->mgesture.dDist, - event->mgesture.x, event->mgesture.y, (uint) event->mgesture.numFingers); - break; - - #define PRINT_DROP_EVENT(event) SDL_snprintf(details, sizeof (details), " (file='%s' timestamp=%u windowid=%u)", event->drop.file, (uint) event->drop.timestamp, (uint) event->drop.windowID) - SDL_EVENT_CASE(SDL_DROPFILE) PRINT_DROP_EVENT(event); break; - SDL_EVENT_CASE(SDL_DROPTEXT) PRINT_DROP_EVENT(event); break; - SDL_EVENT_CASE(SDL_DROPBEGIN) PRINT_DROP_EVENT(event); break; - SDL_EVENT_CASE(SDL_DROPCOMPLETE) PRINT_DROP_EVENT(event); break; - #undef PRINT_DROP_EVENT - - #define PRINT_AUDIODEV_EVENT(event) SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%u iscapture=%s)", (uint) event->adevice.timestamp, (uint) event->adevice.which, event->adevice.iscapture ? "true" : "false") - SDL_EVENT_CASE(SDL_AUDIODEVICEADDED) PRINT_AUDIODEV_EVENT(event); break; - SDL_EVENT_CASE(SDL_AUDIODEVICEREMOVED) PRINT_AUDIODEV_EVENT(event); break; - #undef PRINT_AUDIODEV_EVENT + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " dtheta=%f ddist=%f x=%f y=%f numfingers=%u)", + (uint)event->mgesture.timestamp, (long long)event->mgesture.touchId, + event->mgesture.dTheta, event->mgesture.dDist, + event->mgesture.x, event->mgesture.y, (uint)event->mgesture.numFingers); + break; + +#define PRINT_DROP_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (file='%s' timestamp=%u windowid=%u)", event->drop.file, (uint)event->drop.timestamp, (uint)event->drop.windowID) + SDL_EVENT_CASE(SDL_DROPFILE) + PRINT_DROP_EVENT(event); + break; + SDL_EVENT_CASE(SDL_DROPTEXT) + PRINT_DROP_EVENT(event); + break; + SDL_EVENT_CASE(SDL_DROPBEGIN) + PRINT_DROP_EVENT(event); + break; + SDL_EVENT_CASE(SDL_DROPCOMPLETE) + PRINT_DROP_EVENT(event); + break; +#undef PRINT_DROP_EVENT + +#define PRINT_AUDIODEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%u iscapture=%s)", (uint)event->adevice.timestamp, (uint)event->adevice.which, event->adevice.iscapture ? "true" : "false") + SDL_EVENT_CASE(SDL_AUDIODEVICEADDED) + PRINT_AUDIODEV_EVENT(event); + break; + SDL_EVENT_CASE(SDL_AUDIODEVICEREMOVED) + PRINT_AUDIODEV_EVENT(event); + break; +#undef PRINT_AUDIODEV_EVENT SDL_EVENT_CASE(SDL_SENSORUPDATE) - SDL_snprintf(details, sizeof (details), " (timestamp=%u which=%d data[0]=%f data[1]=%f data[2]=%f data[3]=%f data[4]=%f data[5]=%f)", \ - (uint) event->sensor.timestamp, (int) event->sensor.which, \ - event->sensor.data[0], event->sensor.data[1], event->sensor.data[2], \ - event->sensor.data[3], event->sensor.data[4], event->sensor.data[5]); - break; - - #undef SDL_EVENT_CASE - - case SDL_POLLSENTINEL: - /* No logging necessary for this one */ - break; - - default: - if (!name[0]) { - SDL_strlcpy(name, "UNKNOWN", sizeof (name)); - SDL_snprintf(details, sizeof (details), " #%u! (Bug? FIXME?)", (uint) event->type); - } - break; + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d data[0]=%f data[1]=%f data[2]=%f data[3]=%f data[4]=%f data[5]=%f)", + (uint)event->sensor.timestamp, (int)event->sensor.which, + event->sensor.data[0], event->sensor.data[1], event->sensor.data[2], + event->sensor.data[3], event->sensor.data[4], event->sensor.data[5]); + break; + +#undef SDL_EVENT_CASE + + case SDL_POLLSENTINEL: + /* No logging necessary for this one */ + break; + + default: + if (!name[0]) { + SDL_strlcpy(name, "UNKNOWN", sizeof(name)); + (void)SDL_snprintf(details, sizeof(details), " #%u! (Bug? FIXME?)", (uint)event->type); + } + break; } if (name[0]) { SDL_Log("SDL EVENT: %s%s", name, details); } - #undef uint +#undef uint } - - /* Public functions */ -void -SDL_StopEventLoop(void) +void SDL_StopEventLoop(void) { const char *report = SDL_GetHint("SDL_EVENT_QUEUE_STATISTICS"); int i; SDL_EventEntry *entry; SDL_SysWMEntry *wmmsg; - if (SDL_EventQ.lock) { - SDL_LockMutex(SDL_EventQ.lock); - } + SDL_LockMutex(SDL_EventQ.lock); SDL_EventQ.active = SDL_FALSE; @@ -482,22 +556,22 @@ SDL_StopEventLoop(void) } /* Clean out EventQ */ - for (entry = SDL_EventQ.head; entry; ) { + for (entry = SDL_EventQ.head; entry;) { SDL_EventEntry *next = entry->next; SDL_free(entry); entry = next; } - for (entry = SDL_EventQ.free; entry; ) { + for (entry = SDL_EventQ.free; entry;) { SDL_EventEntry *next = entry->next; SDL_free(entry); entry = next; } - for (wmmsg = SDL_EventQ.wmmsg_used; wmmsg; ) { + for (wmmsg = SDL_EventQ.wmmsg_used; wmmsg;) { SDL_SysWMEntry *next = wmmsg->next; SDL_free(wmmsg); wmmsg = next; } - for (wmmsg = SDL_EventQ.wmmsg_free; wmmsg; ) { + for (wmmsg = SDL_EventQ.wmmsg_free; wmmsg;) { SDL_SysWMEntry *next = wmmsg->next; SDL_free(wmmsg); wmmsg = next; @@ -529,16 +603,16 @@ SDL_StopEventLoop(void) } SDL_zero(SDL_EventOK); + SDL_UnlockMutex(SDL_EventQ.lock); + if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); SDL_DestroyMutex(SDL_EventQ.lock); SDL_EventQ.lock = NULL; } } /* This function (and associated calls) may be called more than once */ -int -SDL_StartEventLoop(void) +int SDL_StartEventLoop(void) { /* We'll leave the event queue alone, since we might have gotten some important events at launch (like SDL_DROPFILE) @@ -556,7 +630,7 @@ SDL_StartEventLoop(void) } SDL_LockMutex(SDL_EventQ.lock); - if (!SDL_event_watchers_lock) { + if (SDL_event_watchers_lock == NULL) { SDL_event_watchers_lock = SDL_CreateMutex(); if (SDL_event_watchers_lock == NULL) { SDL_UnlockMutex(SDL_EventQ.lock); @@ -575,16 +649,12 @@ SDL_StartEventLoop(void) #endif SDL_EventQ.active = SDL_TRUE; - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } + SDL_UnlockMutex(SDL_EventQ.lock); return 0; } - /* Add an event to the event queue -- called with the queue locked */ -static int -SDL_AddEvent(SDL_Event * event) +static int SDL_AddEvent(SDL_Event *event) { SDL_EventEntry *entry; const int initial_count = SDL_AtomicGet(&SDL_EventQ.count); @@ -597,7 +667,7 @@ SDL_AddEvent(SDL_Event * event) if (SDL_EventQ.free == NULL) { entry = (SDL_EventEntry *)SDL_malloc(sizeof(*entry)); - if (!entry) { + if (entry == NULL) { return 0; } } else { @@ -639,8 +709,7 @@ SDL_AddEvent(SDL_Event * event) } /* Remove an event from the queue -- called with the queue locked */ -static void -SDL_CutEvent(SDL_EventEntry *entry) +static void SDL_CutEvent(SDL_EventEntry *entry) { if (entry->prev) { entry->prev->next = entry->next; @@ -668,47 +737,46 @@ SDL_CutEvent(SDL_EventEntry *entry) SDL_AtomicAdd(&SDL_EventQ.count, -1); } -static int -SDL_SendWakeupEvent() +static int SDL_SendWakeupEvent() { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this || !_this->SendWakeupEvent) { + if (_this == NULL || !_this->SendWakeupEvent) { return 0; } - if (!_this->wakeup_lock || SDL_LockMutex(_this->wakeup_lock) == 0) { + + SDL_LockMutex(_this->wakeup_lock); + { if (_this->wakeup_window) { _this->SendWakeupEvent(_this, _this->wakeup_window); /* No more wakeup events needed until we enter a new wait */ _this->wakeup_window = NULL; } - if (_this->wakeup_lock) { - SDL_UnlockMutex(_this->wakeup_lock); - } } + SDL_UnlockMutex(_this->wakeup_lock); + return 0; } /* Lock the event queue, take a peep at it, and unlock it */ -static int -SDL_PeepEventsInternal(SDL_Event * events, int numevents, SDL_eventaction action, - Uint32 minType, Uint32 maxType, SDL_bool include_sentinel) +static int SDL_PeepEventsInternal(SDL_Event *events, int numevents, SDL_eventaction action, + Uint32 minType, Uint32 maxType, SDL_bool include_sentinel) { int i, used, sentinels_expected = 0; /* Lock the event queue */ used = 0; - if (!SDL_EventQ.lock || SDL_LockMutex(SDL_EventQ.lock) == 0) { + + SDL_LockMutex(SDL_EventQ.lock); + { /* Don't look after we've quit */ if (!SDL_EventQ.active) { - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } /* We get a few spurious events at shutdown, so don't warn then */ if (action == SDL_GETEVENT) { SDL_SetError("The event system has been shut down"); } - return (-1); + SDL_UnlockMutex(SDL_EventQ.lock); + return -1; } if (action == SDL_ADDEVENT) { for (i = 0; i < numevents; ++i) { @@ -731,7 +799,7 @@ SDL_PeepEventsInternal(SDL_Event * events, int numevents, SDL_eventaction action SDL_EventQ.wmmsg_used = NULL; } - for (entry = SDL_EventQ.head; entry && (!events || used < numevents); entry = next) { + for (entry = SDL_EventQ.head; entry && (events == NULL || used < numevents); entry = next) { next = entry->next; type = entry->event.type; if (minType <= type && type <= maxType) { @@ -764,7 +832,7 @@ SDL_PeepEventsInternal(SDL_Event * events, int numevents, SDL_eventaction action /* Skip it, we don't want to include it */ continue; } - if (!events || action != SDL_GETEVENT) { + if (events == NULL || action != SDL_GETEVENT) { ++sentinels_expected; } if (SDL_AtomicGet(&SDL_sentinel_pending) > sentinels_expected) { @@ -776,46 +844,37 @@ SDL_PeepEventsInternal(SDL_Event * events, int numevents, SDL_eventaction action } } } - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } - } else { - return SDL_SetError("Couldn't lock event queue"); } + SDL_UnlockMutex(SDL_EventQ.lock); if (used > 0 && action == SDL_ADDEVENT) { SDL_SendWakeupEvent(); } - return (used); + return used; } -int -SDL_PeepEvents(SDL_Event * events, int numevents, SDL_eventaction action, - Uint32 minType, Uint32 maxType) +int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, + Uint32 minType, Uint32 maxType) { return SDL_PeepEventsInternal(events, numevents, action, minType, maxType, SDL_FALSE); } -SDL_bool -SDL_HasEvent(Uint32 type) +SDL_bool SDL_HasEvent(Uint32 type) { - return (SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type) > 0); + return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type) > 0; } -SDL_bool -SDL_HasEvents(Uint32 minType, Uint32 maxType) +SDL_bool SDL_HasEvents(Uint32 minType, Uint32 maxType) { - return (SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, minType, maxType) > 0); + return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, minType, maxType) > 0; } -void -SDL_FlushEvent(Uint32 type) +void SDL_FlushEvent(Uint32 type) { SDL_FlushEvents(type, type); } -void -SDL_FlushEvents(Uint32 minType, Uint32 maxType) +void SDL_FlushEvents(Uint32 minType, Uint32 maxType) { SDL_EventEntry *entry, *next; Uint32 type; @@ -832,12 +891,11 @@ SDL_FlushEvents(Uint32 minType, Uint32 maxType) #endif /* Lock the event queue */ - if (!SDL_EventQ.lock || SDL_LockMutex(SDL_EventQ.lock) == 0) { + SDL_LockMutex(SDL_EventQ.lock); + { /* Don't look after we've quit */ if (!SDL_EventQ.active) { - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } + SDL_UnlockMutex(SDL_EventQ.lock); return; } for (entry = SDL_EventQ.head; entry; entry = next) { @@ -847,15 +905,12 @@ SDL_FlushEvents(Uint32 minType, Uint32 maxType) SDL_CutEvent(entry); } } - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } } + SDL_UnlockMutex(SDL_EventQ.lock); } /* Run the system dependent event loops */ -static void -SDL_PumpEventsInternal(SDL_bool push_sentinel) +static void SDL_PumpEventsInternal(SDL_bool push_sentinel) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); @@ -881,33 +936,36 @@ SDL_PumpEventsInternal(SDL_bool push_sentinel) } #endif - SDL_SendPendingSignalEvents(); /* in case we had a signal handler fire, etc. */ + SDL_SendPendingSignalEvents(); /* in case we had a signal handler fire, etc. */ if (push_sentinel && SDL_GetEventState(SDL_POLLSENTINEL) == SDL_ENABLE) { SDL_Event sentinel; + /* Make sure we don't already have a sentinel in the queue, and add one to the end */ + if (SDL_AtomicGet(&SDL_sentinel_pending) > 0) { + SDL_PeepEventsInternal(&sentinel, 1, SDL_GETEVENT, SDL_POLLSENTINEL, SDL_POLLSENTINEL, SDL_TRUE); + } + SDL_zero(sentinel); sentinel.type = SDL_POLLSENTINEL; SDL_PushEvent(&sentinel); } } -void -SDL_PumpEvents() +void SDL_PumpEvents() { SDL_PumpEventsInternal(SDL_FALSE); } /* Public functions */ -int -SDL_PollEvent(SDL_Event * event) +int SDL_PollEvent(SDL_Event *event) { return SDL_WaitEventTimeout(event, 0); } -static SDL_bool -SDL_events_need_periodic_poll() { +static SDL_bool SDL_events_need_periodic_poll() +{ SDL_bool need_periodic_poll = SDL_FALSE; #if !SDL_JOYSTICK_DISABLED @@ -917,14 +975,13 @@ SDL_events_need_periodic_poll() { #if !SDL_SENSOR_DISABLED need_periodic_poll = need_periodic_poll || - (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors); + (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors); #endif return need_periodic_poll; } -static int -SDL_WaitEventTimeout_Device(_THIS, SDL_Window *wakeup_window, SDL_Event * event, Uint32 start, int timeout) +static int SDL_WaitEventTimeout_Device(_THIS, SDL_Window *wakeup_window, SDL_Event *event, Uint32 start, int timeout) { int loop_timeout = timeout; SDL_bool need_periodic_poll = SDL_events_need_periodic_poll(); @@ -936,67 +993,64 @@ SDL_WaitEventTimeout_Device(_THIS, SDL_Window *wakeup_window, SDL_Event * event, c) Periodic processing that takes place in some platform PumpEvents() functions happens d) Signals received in WaitEventTimeout() are turned into SDL events */ - /* We only want a single sentinel in the queue. We could get more than one if event is NULL, - * since the SDL_PeepEvents() call below won't remove it in that case. - */ - SDL_bool add_sentinel = (SDL_AtomicGet(&SDL_sentinel_pending) == 0) ? SDL_TRUE : SDL_FALSE; - SDL_PumpEventsInternal(add_sentinel); - - if (!_this->wakeup_lock || SDL_LockMutex(_this->wakeup_lock) == 0) { - int status = SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT); + int status; + SDL_PumpEventsInternal(SDL_TRUE); + + SDL_LockMutex(_this->wakeup_lock); + { + status = SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT); /* If status == 0 we are going to block so wakeup will be needed. */ if (status == 0) { _this->wakeup_window = wakeup_window; } else { _this->wakeup_window = NULL; } - if (_this->wakeup_lock) { - SDL_UnlockMutex(_this->wakeup_lock); - } - if (status < 0) { - /* Got an error: return */ - break; - } - if (status > 0) { - /* There is an event, we can return. */ - return 1; - } - /* No events found in the queue, call WaitEventTimeout to wait for an event. */ - if (timeout > 0) { - Uint32 elapsed = SDL_GetTicks() - start; - if (elapsed >= (Uint32)timeout) { - /* Set wakeup_window to NULL without holding the lock. */ - _this->wakeup_window = NULL; - return 0; - } - loop_timeout = (int)((Uint32)timeout - elapsed); - } - if (need_periodic_poll) { - if (loop_timeout >= 0) { - loop_timeout = SDL_min(loop_timeout, PERIODIC_POLL_INTERVAL_MS); - } else { - loop_timeout = PERIODIC_POLL_INTERVAL_MS; - } + } + SDL_UnlockMutex(_this->wakeup_lock); + + if (status < 0) { + /* Got an error: return */ + break; + } + if (status > 0) { + /* There is an event, we can return. */ + return 1; + } + /* No events found in the queue, call WaitEventTimeout to wait for an event. */ + if (timeout > 0) { + Uint32 elapsed = SDL_GetTicks() - start; + if (elapsed >= (Uint32)timeout) { + /* Set wakeup_window to NULL without holding the lock. */ + _this->wakeup_window = NULL; + return 0; } - status = _this->WaitEventTimeout(_this, loop_timeout); - /* Set wakeup_window to NULL without holding the lock. */ - _this->wakeup_window = NULL; - if (status == 0 && need_periodic_poll && loop_timeout == PERIODIC_POLL_INTERVAL_MS) { - /* We may have woken up to poll. Try again */ - continue; - } else if (status <= 0) { - /* There is either an error or the timeout is elapsed: return */ - return status; + loop_timeout = (int)((Uint32)timeout - elapsed); + } + if (need_periodic_poll) { + if (loop_timeout >= 0) { + loop_timeout = SDL_min(loop_timeout, PERIODIC_POLL_INTERVAL_MS); + } else { + loop_timeout = PERIODIC_POLL_INTERVAL_MS; } - /* An event was found and pumped into the SDL events queue. Continue the loop - to let SDL_PeepEvents pick it up .*/ } + status = _this->WaitEventTimeout(_this, loop_timeout); + /* Set wakeup_window to NULL without holding the lock. */ + _this->wakeup_window = NULL; + if (status == 0 && need_periodic_poll && loop_timeout == PERIODIC_POLL_INTERVAL_MS) { + /* We may have woken up to poll. Try again */ + continue; + } else if (status <= 0) { + /* There is either an error or the timeout is elapsed: return */ + return status; + } + /* An event was found and pumped into the SDL events queue. Continue the loop + to let SDL_PeepEvents pick it up .*/ } return 0; } -static SDL_bool -SDL_events_need_polling() { +static SDL_bool SDL_events_need_polling() +{ SDL_bool need_polling = SDL_FALSE; #if !SDL_JOYSTICK_DISABLED @@ -1008,14 +1062,13 @@ SDL_events_need_polling() { #if !SDL_SENSOR_DISABLED need_polling = need_polling || - (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors && (SDL_NumSensors() > 0)); + (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors && (SDL_NumSensors() > 0)); #endif return need_polling; } -static SDL_Window * -SDL_find_active_window(SDL_VideoDevice * _this) +static SDL_Window *SDL_find_active_window(SDL_VideoDevice *_this) { SDL_Window *window; for (window = _this->windows; window; window = window->next) { @@ -1026,14 +1079,12 @@ SDL_find_active_window(SDL_VideoDevice * _this) return NULL; } -int -SDL_WaitEvent(SDL_Event * event) +int SDL_WaitEvent(SDL_Event *event) { return SDL_WaitEventTimeout(event, -1); } -int -SDL_WaitEventTimeout(SDL_Event * event, int timeout) +int SDL_WaitEventTimeout(SDL_Event *event, int timeout) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); SDL_Window *wakeup_window; @@ -1122,17 +1173,15 @@ SDL_WaitEventTimeout(SDL_Event * event, int timeout) } } -int -SDL_PushEvent(SDL_Event * event) +int SDL_PushEvent(SDL_Event *event) { event->common.timestamp = SDL_GetTicks(); if (SDL_EventOK.callback || SDL_event_watchers_count > 0) { - if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { + SDL_LockMutex(SDL_event_watchers_lock); + { if (SDL_EventOK.callback && !SDL_EventOK.callback(SDL_EventOK.userdata, event)) { - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } + SDL_UnlockMutex(SDL_event_watchers_lock); return 0; } @@ -1149,22 +1198,19 @@ SDL_PushEvent(SDL_Event * event) SDL_event_watchers_dispatching = SDL_FALSE; if (SDL_event_watchers_removed) { - for (i = SDL_event_watchers_count; i--; ) { + for (i = SDL_event_watchers_count; i--;) { if (SDL_event_watchers[i].removed) { --SDL_event_watchers_count; if (i < SDL_event_watchers_count) { - SDL_memmove(&SDL_event_watchers[i], &SDL_event_watchers[i+1], (SDL_event_watchers_count - i) * sizeof(SDL_event_watchers[i])); + SDL_memmove(&SDL_event_watchers[i], &SDL_event_watchers[i + 1], (SDL_event_watchers_count - i) * sizeof(SDL_event_watchers[i])); } } } SDL_event_watchers_removed = SDL_FALSE; } } - - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } } + SDL_UnlockMutex(SDL_event_watchers_lock); } if (SDL_PeepEvents(event, 1, SDL_ADDEVENT, 0, 0) <= 0) { @@ -1176,35 +1222,27 @@ SDL_PushEvent(SDL_Event * event) return 1; } -void -SDL_SetEventFilter(SDL_EventFilter filter, void *userdata) +void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata) { - if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { + SDL_LockMutex(SDL_event_watchers_lock); + { /* Set filter and discard pending events */ SDL_EventOK.callback = filter; SDL_EventOK.userdata = userdata; SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT); - - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } } + SDL_UnlockMutex(SDL_event_watchers_lock); } -SDL_bool -SDL_GetEventFilter(SDL_EventFilter * filter, void **userdata) +SDL_bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata) { SDL_EventWatcher event_ok; - if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { + SDL_LockMutex(SDL_event_watchers_lock); + { event_ok = SDL_EventOK; - - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } - } else { - SDL_zero(event_ok); } + SDL_UnlockMutex(SDL_event_watchers_lock); if (filter) { *filter = event_ok.callback; @@ -1215,10 +1253,10 @@ SDL_GetEventFilter(SDL_EventFilter * filter, void **userdata) return event_ok.callback ? SDL_TRUE : SDL_FALSE; } -void -SDL_AddEventWatch(SDL_EventFilter filter, void *userdata) +void SDL_AddEventWatch(SDL_EventFilter filter, void *userdata) { - if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { + SDL_LockMutex(SDL_event_watchers_lock); + { SDL_EventWatcher *event_watchers; event_watchers = SDL_realloc(SDL_event_watchers, (SDL_event_watchers_count + 1) * sizeof(*event_watchers)); @@ -1232,17 +1270,14 @@ SDL_AddEventWatch(SDL_EventFilter filter, void *userdata) watcher->removed = SDL_FALSE; ++SDL_event_watchers_count; } - - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } } + SDL_UnlockMutex(SDL_event_watchers_lock); } -void -SDL_DelEventWatch(SDL_EventFilter filter, void *userdata) +void SDL_DelEventWatch(SDL_EventFilter filter, void *userdata) { - if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { + SDL_LockMutex(SDL_event_watchers_lock); + { int i; for (i = 0; i < SDL_event_watchers_count; ++i) { @@ -1253,23 +1288,20 @@ SDL_DelEventWatch(SDL_EventFilter filter, void *userdata) } else { --SDL_event_watchers_count; if (i < SDL_event_watchers_count) { - SDL_memmove(&SDL_event_watchers[i], &SDL_event_watchers[i+1], (SDL_event_watchers_count - i) * sizeof(SDL_event_watchers[i])); + SDL_memmove(&SDL_event_watchers[i], &SDL_event_watchers[i + 1], (SDL_event_watchers_count - i) * sizeof(SDL_event_watchers[i])); } } break; } } - - if (SDL_event_watchers_lock) { - SDL_UnlockMutex(SDL_event_watchers_lock); - } } + SDL_UnlockMutex(SDL_event_watchers_lock); } -void -SDL_FilterEvents(SDL_EventFilter filter, void *userdata) +void SDL_FilterEvents(SDL_EventFilter filter, void *userdata) { - if (!SDL_EventQ.lock || SDL_LockMutex(SDL_EventQ.lock) == 0) { + SDL_LockMutex(SDL_EventQ.lock); + { SDL_EventEntry *entry, *next; for (entry = SDL_EventQ.head; entry; entry = next) { next = entry->next; @@ -1277,14 +1309,11 @@ SDL_FilterEvents(SDL_EventFilter filter, void *userdata) SDL_CutEvent(entry); } } - if (SDL_EventQ.lock) { - SDL_UnlockMutex(SDL_EventQ.lock); - } } + SDL_UnlockMutex(SDL_EventQ.lock); } -Uint8 -SDL_EventState(Uint32 type, int state) +Uint8 SDL_EventState(Uint32 type, int state) { const SDL_bool isde = (state == SDL_DISABLE) || (state == SDL_ENABLE); Uint8 current_state; @@ -1292,7 +1321,7 @@ SDL_EventState(Uint32 type, int state) Uint8 lo = (type & 0xff); if (SDL_disabled_events[hi] && - (SDL_disabled_events[hi]->bits[lo/32] & (1 << (lo&31)))) { + (SDL_disabled_events[hi]->bits[lo / 32] & (1 << (lo & 31)))) { current_state = SDL_DISABLE; } else { current_state = SDL_ENABLE; @@ -1302,15 +1331,15 @@ SDL_EventState(Uint32 type, int state) if (state == SDL_DISABLE) { /* Disable this event type and discard pending events */ if (!SDL_disabled_events[hi]) { - SDL_disabled_events[hi] = (SDL_DisabledEventBlock*) SDL_calloc(1, sizeof(SDL_DisabledEventBlock)); + SDL_disabled_events[hi] = (SDL_DisabledEventBlock *)SDL_calloc(1, sizeof(SDL_DisabledEventBlock)); } /* Out of memory, nothing we can do... */ if (SDL_disabled_events[hi]) { - SDL_disabled_events[hi]->bits[lo/32] |= (1 << (lo&31)); + SDL_disabled_events[hi]->bits[lo / 32] |= (1 << (lo & 31)); SDL_FlushEvent(type); } } else { // state == SDL_ENABLE - SDL_disabled_events[hi]->bits[lo/32] &= ~(1 << (lo&31)); + SDL_disabled_events[hi]->bits[lo / 32] &= ~(1 << (lo & 31)); } #if !SDL_JOYSTICK_DISABLED @@ -1330,12 +1359,11 @@ SDL_EventState(Uint32 type, int state) return current_state; } -Uint32 -SDL_RegisterEvents(int numevents) +Uint32 SDL_RegisterEvents(int numevents) { Uint32 event_base; - if ((numevents > 0) && (SDL_userevents+numevents <= SDL_LASTEVENT)) { + if ((numevents > 0) && (SDL_userevents + numevents <= SDL_LASTEVENT)) { event_base = SDL_userevents; SDL_userevents += numevents; } else { @@ -1344,8 +1372,7 @@ SDL_RegisterEvents(int numevents) return event_base; } -int -SDL_SendAppEvent(SDL_EventType eventType) +int SDL_SendAppEvent(SDL_EventType eventType) { int posted; @@ -1355,11 +1382,10 @@ SDL_SendAppEvent(SDL_EventType eventType) event.type = eventType; posted = (SDL_PushEvent(&event) > 0); } - return (posted); + return posted; } -int -SDL_SendSysWMEvent(SDL_SysWMmsg * message) +int SDL_SendSysWMEvent(SDL_SysWMmsg *message) { int posted; @@ -1372,23 +1398,20 @@ SDL_SendSysWMEvent(SDL_SysWMmsg * message) posted = (SDL_PushEvent(&event) > 0); } /* Update internal event state */ - return (posted); + return posted; } -int -SDL_SendKeymapChangedEvent(void) +int SDL_SendKeymapChangedEvent(void) { return SDL_SendAppEvent(SDL_KEYMAPCHANGED); } -int -SDL_SendLocaleChangedEvent(void) +int SDL_SendLocaleChangedEvent(void) { return SDL_SendAppEvent(SDL_LOCALECHANGED); } -int -SDL_EventsInit(void) +int SDL_EventsInit(void) { #if !SDL_JOYSTICK_DISABLED SDL_AddHintCallback(SDL_HINT_AUTO_UPDATE_JOYSTICKS, SDL_AutoUpdateJoysticksChanged, NULL); @@ -1408,8 +1431,7 @@ SDL_EventsInit(void) return 0; } -void -SDL_EventsQuit(void) +void SDL_EventsQuit(void) { SDL_QuitQuit(); SDL_StopEventLoop(); diff --git a/modules/SDL2/src/events/SDL_events_c.h b/modules/SDL2/src/events/SDL_events_c.h index 080f78b..7f27b1a 100644 --- a/modules/SDL2/src/events/SDL_events_c.h +++ b/modules/SDL2/src/events/SDL_events_c.h @@ -44,7 +44,7 @@ extern void SDL_StopEventLoop(void); extern void SDL_QuitInterrupt(void); extern int SDL_SendAppEvent(SDL_EventType eventType); -extern int SDL_SendSysWMEvent(SDL_SysWMmsg * message); +extern int SDL_SendSysWMEvent(SDL_SysWMmsg *message); extern int SDL_SendKeymapChangedEvent(void); extern int SDL_SendLocaleChangedEvent(void); diff --git a/modules/SDL2/src/events/SDL_gesture.c b/modules/SDL2/src/events/SDL_gesture.c index 07d1f83..1769457 100644 --- a/modules/SDL2/src/events/SDL_gesture.c +++ b/modules/SDL2/src/events/SDL_gesture.c @@ -41,27 +41,31 @@ #define DOLLARNPOINTS 64 #if defined(ENABLE_DOLLAR) -# define DOLLARSIZE 256 -# define PHI 0.618033989 +#define DOLLARSIZE 256 +#define PHI 0.618033989 #endif -typedef struct { - float x,y; +typedef struct +{ + float x, y; } SDL_FloatPoint; -typedef struct { +typedef struct +{ float length; int numPoints; SDL_FloatPoint p[MAXPATHSIZE]; } SDL_DollarPath; -typedef struct { +typedef struct +{ SDL_FloatPoint path[DOLLARNPOINTS]; unsigned long hash; } SDL_DollarTemplate; -typedef struct { +typedef struct +{ SDL_TouchID id; SDL_FloatPoint centroid; SDL_DollarPath dollarPath; @@ -92,15 +96,18 @@ static void PrintPath(SDL_FloatPoint *path) int SDL_RecordGesture(SDL_TouchID touchId) { int i; - if (touchId < 0) recordAll = SDL_TRUE; + if (touchId < 0) { + recordAll = SDL_TRUE; + } for (i = 0; i < SDL_numGestureTouches; i++) { if ((touchId < 0) || (SDL_gestureTouch[i].id == touchId)) { SDL_gestureTouch[i].recording = SDL_TRUE; - if (touchId >= 0) + if (touchId >= 0) { return 1; + } } } - return (touchId < 0); + return touchId < 0; } void SDL_GestureQuit() @@ -109,18 +116,17 @@ void SDL_GestureQuit() SDL_gestureTouch = NULL; } -static unsigned long SDL_HashDollar(SDL_FloatPoint* points) +static unsigned long SDL_HashDollar(SDL_FloatPoint *points) { unsigned long hash = 5381; int i; for (i = 0; i < DOLLARNPOINTS; i++) { - hash = ((hash<<5) + hash) + (unsigned long)points[i].x; - hash = ((hash<<5) + hash) + (unsigned long)points[i].y; + hash = ((hash << 5) + hash) + (unsigned long)points[i].x; + hash = ((hash << 5) + hash) + (unsigned long)points[i].y; } return hash; } - static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst) { if (dst == NULL) { @@ -132,7 +138,7 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (SDL_RWwrite(dst, templ->path, - sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS) { + sizeof(templ->path[0]), DOLLARNPOINTS) != DOLLARNPOINTS) { return 0; } #else @@ -146,7 +152,7 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst) } if (SDL_RWwrite(dst, copy.path, - sizeof(copy.path[0]),DOLLARNPOINTS) != DOLLARNPOINTS) { + sizeof(copy.path[0]), DOLLARNPOINTS) != DOLLARNPOINTS) { return 0; } } @@ -155,12 +161,11 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst) return 1; } - int SDL_SaveAllDollarTemplates(SDL_RWops *dst) { - int i,j,rtrn = 0; + int i, j, rtrn = 0; for (i = 0; i < SDL_numGestureTouches; i++) { - SDL_GestureTouch* touch = &SDL_gestureTouch[i]; + SDL_GestureTouch *touch = &SDL_gestureTouch[i]; for (j = 0; j < touch->numDollarTemplates; j++) { rtrn += SaveTemplate(&touch->dollarTemplate[j], dst); } @@ -170,9 +175,9 @@ int SDL_SaveAllDollarTemplates(SDL_RWops *dst) int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst) { - int i,j; + int i, j; for (i = 0; i < SDL_numGestureTouches; i++) { - SDL_GestureTouch* touch = &SDL_gestureTouch[i]; + SDL_GestureTouch *touch = &SDL_gestureTouch[i]; for (j = 0; j < touch->numDollarTemplates; j++) { if (touch->dollarTemplate[j].hash == gestureId) { return SaveTemplate(&touch->dollarTemplate[j], dst); @@ -184,9 +189,9 @@ int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst) /* path is an already sampled set of points Returns the index of the gesture on success, or -1 */ -static int SDL_AddDollarGesture_one(SDL_GestureTouch* inTouch, SDL_FloatPoint* path) +static int SDL_AddDollarGesture_one(SDL_GestureTouch *inTouch, SDL_FloatPoint *path) { - SDL_DollarTemplate* dollarTemplate; + SDL_DollarTemplate *dollarTemplate; SDL_DollarTemplate *templ; int index; @@ -194,31 +199,34 @@ static int SDL_AddDollarGesture_one(SDL_GestureTouch* inTouch, SDL_FloatPoint* p dollarTemplate = (SDL_DollarTemplate *)SDL_realloc(inTouch->dollarTemplate, (index + 1) * - sizeof(SDL_DollarTemplate)); - if (!dollarTemplate) { + sizeof(SDL_DollarTemplate)); + if (dollarTemplate == NULL) { return SDL_OutOfMemory(); } inTouch->dollarTemplate = dollarTemplate; templ = &inTouch->dollarTemplate[index]; - SDL_memcpy(templ->path, path, DOLLARNPOINTS*sizeof(SDL_FloatPoint)); + SDL_memcpy(templ->path, path, DOLLARNPOINTS * sizeof(SDL_FloatPoint)); templ->hash = SDL_HashDollar(templ->path); inTouch->numDollarTemplates++; return index; } -static int SDL_AddDollarGesture(SDL_GestureTouch* inTouch, SDL_FloatPoint* path) +static int SDL_AddDollarGesture(SDL_GestureTouch *inTouch, SDL_FloatPoint *path) { int index = -1; int i = 0; if (inTouch == NULL) { - if (SDL_numGestureTouches == 0) return SDL_SetError("no gesture touch devices registered"); + if (SDL_numGestureTouches == 0) { + return SDL_SetError("no gesture touch devices registered"); + } for (i = 0; i < SDL_numGestureTouches; i++) { inTouch = &SDL_gestureTouch[i]; index = SDL_AddDollarGesture_one(inTouch, path); - if (index < 0) + if (index < 0) { return -1; + } } /* Use the index of the last one added. */ return index; @@ -228,9 +236,11 @@ static int SDL_AddDollarGesture(SDL_GestureTouch* inTouch, SDL_FloatPoint* path) int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src) { - int i,loaded = 0; + int i, loaded = 0; SDL_GestureTouch *touch = NULL; - if (src == NULL) return 0; + if (src == NULL) { + return 0; + } if (touchId >= 0) { for (i = 0; i < SDL_numGestureTouches; i++) { if (SDL_gestureTouch[i].id == touchId) { @@ -245,7 +255,7 @@ int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src) while (1) { SDL_DollarTemplate templ; - if (SDL_RWread(src,templ.path,sizeof(templ.path[0]),DOLLARNPOINTS) < DOLLARNPOINTS) { + if (SDL_RWread(src, templ.path, sizeof(templ.path[0]), DOLLARNPOINTS) < DOLLARNPOINTS) { if (loaded == 0) { return SDL_SetError("could not read any dollar gesture from rwops"); } @@ -262,16 +272,16 @@ int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src) if (touchId >= 0) { /* printf("Adding loaded gesture to 1 touch\n"); */ - if (SDL_AddDollarGesture(touch, templ.path) >= 0) + if (SDL_AddDollarGesture(touch, templ.path) >= 0) { loaded++; - } - else { + } + } else { /* printf("Adding to: %i touches\n",SDL_numGestureTouches); */ for (i = 0; i < SDL_numGestureTouches; i++) { touch = &SDL_gestureTouch[i]; /* printf("Adding loaded gesture to + touches\n"); */ /* TODO: What if this fails? */ - SDL_AddDollarGesture(touch,templ.path); + SDL_AddDollarGesture(touch, templ.path); } loaded++; } @@ -280,9 +290,8 @@ int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src) return loaded; } - #if defined(ENABLE_DOLLAR) -static float dollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ,float ang) +static float dollarDifference(SDL_FloatPoint *points, SDL_FloatPoint *templ, float ang) { /* SDL_FloatPoint p[DOLLARNPOINTS]; */ float dist = 0; @@ -291,14 +300,13 @@ static float dollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ,float for (i = 0; i < DOLLARNPOINTS; i++) { p.x = (float)(points[i].x * SDL_cos(ang) - points[i].y * SDL_sin(ang)); p.y = (float)(points[i].x * SDL_sin(ang) + points[i].y * SDL_cos(ang)); - dist += (float)(SDL_sqrt((p.x-templ[i].x)*(p.x-templ[i].x)+ - (p.y-templ[i].y)*(p.y-templ[i].y))); + dist += (float)(SDL_sqrt((p.x - templ[i].x) * (p.x - templ[i].x) + + (p.y - templ[i].y) * (p.y - templ[i].y))); } - return dist/DOLLARNPOINTS; - + return dist / DOLLARNPOINTS; } -static float bestDollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ) +static float bestDollarDifference(SDL_FloatPoint *points, SDL_FloatPoint *templ) { /*------------BEGIN DOLLAR BLACKBOX------------------ -TRANSLATED DIRECTLY FROM PSUDEO-CODE AVAILABLE AT- @@ -316,15 +324,14 @@ static float bestDollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ) tb = x2; x2 = x1; f2 = f1; - x1 = (float)(PHI*ta + (1-PHI)*tb); - f1 = dollarDifference(points,templ,x1); - } - else { + x1 = (float)(PHI * ta + (1 - PHI) * tb); + f1 = dollarDifference(points, templ, x1); + } else { ta = x1; x1 = x2; f1 = f2; - x2 = (float)((1-PHI)*ta + PHI*tb); - f2 = dollarDifference(points,templ,x2); + x2 = (float)((1 - PHI) * ta + PHI * tb); + f2 = dollarDifference(points, templ, x2); } } /* @@ -333,47 +340,48 @@ static float bestDollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ) else if (f1 > f2) printf("Min angle (x2): %f\n",x2); */ - return SDL_min(f1,f2); + return SDL_min(f1, f2); } /* DollarPath contains raw points, plus (possibly) the calculated length */ -static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points, SDL_bool is_recording) +static int dollarNormalize(const SDL_DollarPath *path, SDL_FloatPoint *points, SDL_bool is_recording) { int i; float interval; float dist; int numPoints = 0; SDL_FloatPoint centroid; - float xmin,xmax,ymin,ymax; + float xmin, xmax, ymin, ymax; float ang; - float w,h; + float w, h; float length = path->length; /* Calculate length if it hasn't already been done */ if (length <= 0) { - for (i=1;i < path->numPoints; i++) { - float dx = path->p[i ].x - path->p[i-1].x; - float dy = path->p[i ].y - path->p[i-1].y; - length += (float)(SDL_sqrt(dx*dx+dy*dy)); + for (i = 1; i < path->numPoints; i++) { + float dx = path->p[i].x - path->p[i - 1].x; + float dy = path->p[i].y - path->p[i - 1].y; + length += (float)(SDL_sqrt(dx * dx + dy * dy)); } } /* Resample */ - interval = length/(DOLLARNPOINTS - 1); + interval = length / (DOLLARNPOINTS - 1); dist = interval; - centroid.x = 0;centroid.y = 0; + centroid.x = 0; + centroid.y = 0; /* printf("(%f,%f)\n",path->p[path->numPoints-1].x,path->p[path->numPoints-1].y); */ for (i = 1; i < path->numPoints; i++) { - float d = (float)(SDL_sqrt((path->p[i-1].x-path->p[i].x)*(path->p[i-1].x-path->p[i].x)+ - (path->p[i-1].y-path->p[i].y)*(path->p[i-1].y-path->p[i].y))); + float d = (float)(SDL_sqrt((path->p[i - 1].x - path->p[i].x) * (path->p[i - 1].x - path->p[i].x) + + (path->p[i - 1].y - path->p[i].y) * (path->p[i - 1].y - path->p[i].y))); /* printf("d = %f dist = %f/%f\n",d,dist,interval); */ while (dist + d > interval) { - points[numPoints].x = path->p[i-1].x + - ((interval-dist)/d)*(path->p[i].x-path->p[i-1].x); - points[numPoints].y = path->p[i-1].y + - ((interval-dist)/d)*(path->p[i].y-path->p[i-1].y); + points[numPoints].x = path->p[i - 1].x + + ((interval - dist) / d) * (path->p[i].x - path->p[i - 1].x); + points[numPoints].y = path->p[i - 1].y + + ((interval - dist) / d) * (path->p[i].y - path->p[i - 1].y); centroid.x += points[numPoints].x; centroid.y += points[numPoints].y; numPoints++; @@ -382,14 +390,14 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points, SD } dist += d; } - if (numPoints < DOLLARNPOINTS-1) { + if (numPoints < DOLLARNPOINTS - 1) { if (is_recording) { SDL_SetError("ERROR: NumPoints = %i", numPoints); } return 0; } /* copy the last point */ - points[DOLLARNPOINTS-1] = path->p[path->numPoints-1]; + points[DOLLARNPOINTS - 1] = path->p[path->numPoints - 1]; numPoints = DOLLARNPOINTS; centroid.x /= numPoints; @@ -405,33 +413,40 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points, SD ang = (float)(SDL_atan2(centroid.y - points[0].y, centroid.x - points[0].x)); - for (i = 0; i xmax) xmax = points[i].x; - if (points[i].y < ymin) ymin = points[i].y; - if (points[i].y > ymax) ymax = points[i].y; + if (points[i].x < xmin) { + xmin = points[i].x; + } + if (points[i].x > xmax) { + xmax = points[i].x; + } + if (points[i].y < ymin) { + ymin = points[i].y; + } + if (points[i].y > ymax) { + ymax = points[i].y; + } } /* Scale points to DOLLARSIZE, and translate to the origin */ - w = xmax-xmin; - h = ymax-ymin; + w = xmax - xmin; + h = ymax - ymin; - for (i=0; inumDollarTemplates; i++) { - float diff = bestDollarDifference(points,touch->dollarTemplate[i].path); - if (diff < bestDiff) {bestDiff = diff; *bestTempl = i;} + float diff = bestDollarDifference(points, touch->dollarTemplate[i].path); + if (diff < bestDiff) { + bestDiff = diff; + *bestTempl = i; + } } return bestDiff; } @@ -455,9 +473,9 @@ int SDL_GestureAddTouch(SDL_TouchID touchId) { SDL_GestureTouch *gestureTouch = (SDL_GestureTouch *)SDL_realloc(SDL_gestureTouch, (SDL_numGestureTouches + 1) * - sizeof(SDL_GestureTouch)); + sizeof(SDL_GestureTouch)); - if (!gestureTouch) { + if (gestureTouch == NULL) { return SDL_OutOfMemory(); } @@ -493,18 +511,19 @@ int SDL_GestureDelTouch(SDL_TouchID touchId) return 0; } -static SDL_GestureTouch * SDL_GetGestureTouch(SDL_TouchID id) +static SDL_GestureTouch *SDL_GetGestureTouch(SDL_TouchID id) { int i; for (i = 0; i < SDL_numGestureTouches; i++) { /* printf("%i ?= %i\n",SDL_gestureTouch[i].id,id); */ - if (SDL_gestureTouch[i].id == id) + if (SDL_gestureTouch[i].id == id) { return &SDL_gestureTouch[i]; + } } return NULL; } -static void SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist) +static void SDL_SendGestureMulti(SDL_GestureTouch *touch, float dTheta, float dDist) { if (SDL_GetEventState(SDL_MULTIGESTURE) == SDL_ENABLE) { SDL_Event event; @@ -520,8 +539,8 @@ static void SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDis } #if defined(ENABLE_DOLLAR) -static void SDL_SendGestureDollar(SDL_GestureTouch* touch, - SDL_GestureID gestureId,float error) +static void SDL_SendGestureDollar(SDL_GestureTouch *touch, + SDL_GestureID gestureId, float error) { if (SDL_GetEventState(SDL_DOLLARGESTURE) == SDL_ENABLE) { SDL_Event event; @@ -537,7 +556,7 @@ static void SDL_SendGestureDollar(SDL_GestureTouch* touch, } } -static void SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) +static void SDL_SendDollarRecord(SDL_GestureTouch *touch, SDL_GestureID gestureId) { if (SDL_GetEventState(SDL_DOLLARRECORD) == SDL_ENABLE) { SDL_Event event; @@ -549,10 +568,9 @@ static void SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId } #endif - -void SDL_GestureProcessEvent(SDL_Event* event) +void SDL_GestureProcessEvent(SDL_Event *event) { - float x,y; + float x, y; #if defined(ENABLE_DOLLAR) int index; int i; @@ -568,10 +586,12 @@ void SDL_GestureProcessEvent(SDL_Event* event) if (event->type == SDL_FINGERMOTION || event->type == SDL_FINGERDOWN || event->type == SDL_FINGERUP) { - SDL_GestureTouch* inTouch = SDL_GetGestureTouch(event->tfinger.touchId); + SDL_GestureTouch *inTouch = SDL_GetGestureTouch(event->tfinger.touchId); /* Shouldn't be possible */ - if (inTouch == NULL) return; + if (inTouch == NULL) { + return; + } x = event->tfinger.x; y = event->tfinger.y; @@ -590,55 +610,54 @@ void SDL_GestureProcessEvent(SDL_Event* event) dollarNormalize(&inTouch->dollarPath, path, SDL_TRUE); /* PrintPath(path); */ if (recordAll) { - index = SDL_AddDollarGesture(NULL,path); - for (i = 0; i < SDL_numGestureTouches; i++) + index = SDL_AddDollarGesture(NULL, path); + for (i = 0; i < SDL_numGestureTouches; i++) { SDL_gestureTouch[i].recording = SDL_FALSE; - } - else { - index = SDL_AddDollarGesture(inTouch,path); + } + } else { + index = SDL_AddDollarGesture(inTouch, path); } if (index >= 0) { - SDL_SendDollarRecord(inTouch,inTouch->dollarTemplate[index].hash); + SDL_SendDollarRecord(inTouch, inTouch->dollarTemplate[index].hash); + } else { + SDL_SendDollarRecord(inTouch, -1); } - else { - SDL_SendDollarRecord(inTouch,-1); - } - } - else { + } else { int bestTempl; float error; error = dollarRecognize(&inTouch->dollarPath, - &bestTempl,inTouch); - if (bestTempl >= 0){ + &bestTempl, inTouch); + if (bestTempl >= 0) { /* Send Event */ unsigned long gestureId = inTouch->dollarTemplate[bestTempl].hash; - SDL_SendGestureDollar(inTouch,gestureId,error); + SDL_SendGestureDollar(inTouch, gestureId, error); /* printf ("%s\n",);("Dollar error: %f\n",error); */ } } #endif /* inTouch->gestureLast[j] = inTouch->gestureLast[inTouch->numDownFingers]; */ if (inTouch->numDownFingers > 0) { - inTouch->centroid.x = (inTouch->centroid.x*(inTouch->numDownFingers+1)- - x)/inTouch->numDownFingers; - inTouch->centroid.y = (inTouch->centroid.y*(inTouch->numDownFingers+1)- - y)/inTouch->numDownFingers; + inTouch->centroid.x = (inTouch->centroid.x * (inTouch->numDownFingers + 1) - + x) / + inTouch->numDownFingers; + inTouch->centroid.y = (inTouch->centroid.y * (inTouch->numDownFingers + 1) - + y) / + inTouch->numDownFingers; } - } - else if (event->type == SDL_FINGERMOTION) { + } else if (event->type == SDL_FINGERMOTION) { float dx = event->tfinger.dx; float dy = event->tfinger.dy; #if defined(ENABLE_DOLLAR) - SDL_DollarPath* path = &inTouch->dollarPath; + SDL_DollarPath *path = &inTouch->dollarPath; if (path->numPoints < MAXPATHSIZE) { path->p[path->numPoints].x = inTouch->centroid.x; path->p[path->numPoints].y = inTouch->centroid.y; pathDx = - (path->p[path->numPoints].x-path->p[path->numPoints-1].x); + (path->p[path->numPoints].x - path->p[path->numPoints - 1].x); pathDy = - (path->p[path->numPoints].y-path->p[path->numPoints-1].y); - path->length += (float)SDL_sqrt(pathDx*pathDx + pathDy*pathDy); + (path->p[path->numPoints].y - path->p[path->numPoints - 1].y); + path->length += (float)SDL_sqrt(pathDx * pathDx + pathDy * pathDy); path->numPoints++; } #endif @@ -646,32 +665,36 @@ void SDL_GestureProcessEvent(SDL_Event* event) lastP.y = y - dy; lastCentroid = inTouch->centroid; - inTouch->centroid.x += dx/inTouch->numDownFingers; - inTouch->centroid.y += dy/inTouch->numDownFingers; + inTouch->centroid.x += dx / inTouch->numDownFingers; + inTouch->centroid.y += dy / inTouch->numDownFingers; /* printf("Centrid : (%f,%f)\n",inTouch->centroid.x,inTouch->centroid.y); */ if (inTouch->numDownFingers > 1) { SDL_FloatPoint lv; /* Vector from centroid to last x,y position */ - SDL_FloatPoint v; /* Vector from centroid to current x,y position */ + SDL_FloatPoint v; /* Vector from centroid to current x,y position */ /* lv = inTouch->gestureLast[j].cv; */ lv.x = lastP.x - lastCentroid.x; lv.y = lastP.y - lastCentroid.y; - lDist = (float)SDL_sqrt(lv.x*lv.x + lv.y*lv.y); + lDist = (float)SDL_sqrt(lv.x * lv.x + lv.y * lv.y); /* printf("lDist = %f\n",lDist); */ v.x = x - inTouch->centroid.x; v.y = y - inTouch->centroid.y; /* inTouch->gestureLast[j].cv = v; */ - Dist = (float)SDL_sqrt(v.x*v.x+v.y*v.y); + Dist = (float)SDL_sqrt(v.x * v.x + v.y * v.y); /* SDL_cos(dTheta) = (v . lv)/(|v| * |lv|) */ /* Normalize Vectors to simplify angle calculation */ - lv.x/=lDist; - lv.y/=lDist; - v.x/=Dist; - v.y/=Dist; - dtheta = (float)SDL_atan2(lv.x*v.y - lv.y*v.x,lv.x*v.x + lv.y*v.y); + lv.x /= lDist; + lv.y /= lDist; + v.x /= Dist; + v.y /= Dist; + dtheta = (float)SDL_atan2(lv.x * v.y - lv.y * v.x, lv.x * v.x + lv.y * v.y); dDist = (Dist - lDist); - if (lDist == 0) {dDist = 0;dtheta = 0;} /* To avoid impossible values */ + if (lDist == 0) { + /* To avoid impossible values */ + dDist = 0; + dtheta = 0; + } /* inTouch->gestureLast[j].dDist = dDist; inTouch->gestureLast[j].dtheta = dtheta; @@ -683,9 +706,8 @@ void SDL_GestureProcessEvent(SDL_Event* event) knob.ang += dtheta; printf("thetaSum = %f, distSum = %f\n",gdtheta,gdDist); printf("id: %i dTheta = %f, dDist = %f\n",j,dtheta,dDist); */ - SDL_SendGestureMulti(inTouch,dtheta,dDist); - } - else { + SDL_SendGestureMulti(inTouch, dtheta, dDist); + } else { /* inTouch->gestureLast[j].dDist = 0; inTouch->gestureLast[j].dtheta = 0; inTouch->gestureLast[j].cv.x = 0; @@ -695,14 +717,15 @@ void SDL_GestureProcessEvent(SDL_Event* event) inTouch->gestureLast[j].f.p.y = y; break; pressure? */ - } - else if (event->type == SDL_FINGERDOWN) { + } else if (event->type == SDL_FINGERDOWN) { inTouch->numDownFingers++; - inTouch->centroid.x = (inTouch->centroid.x*(inTouch->numDownFingers - 1)+ - x)/inTouch->numDownFingers; - inTouch->centroid.y = (inTouch->centroid.y*(inTouch->numDownFingers - 1)+ - y)/inTouch->numDownFingers; + inTouch->centroid.x = (inTouch->centroid.x * (inTouch->numDownFingers - 1) + + x) / + inTouch->numDownFingers; + inTouch->centroid.y = (inTouch->centroid.y * (inTouch->numDownFingers - 1) + + y) / + inTouch->numDownFingers; /* printf("Finger Down: (%f,%f). Centroid: (%f,%f\n",x,y, inTouch->centroid.x,inTouch->centroid.y); */ diff --git a/modules/SDL2/src/events/SDL_gesture_c.h b/modules/SDL2/src/events/SDL_gesture_c.h index f72281b..d359290 100644 --- a/modules/SDL2/src/events/SDL_gesture_c.h +++ b/modules/SDL2/src/events/SDL_gesture_c.h @@ -26,7 +26,7 @@ extern int SDL_GestureAddTouch(SDL_TouchID touchId); extern int SDL_GestureDelTouch(SDL_TouchID touchId); -extern void SDL_GestureProcessEvent(SDL_Event* event); +extern void SDL_GestureProcessEvent(SDL_Event *event); extern void SDL_GestureQuit(void); diff --git a/modules/SDL2/src/events/SDL_keyboard.c b/modules/SDL2/src/events/SDL_keyboard.c index b779af5..5a14f85 100644 --- a/modules/SDL2/src/events/SDL_keyboard.c +++ b/modules/SDL2/src/events/SDL_keyboard.c @@ -29,13 +29,13 @@ #include "../video/SDL_sysvideo.h" #include "scancodes_ascii.h" - /* #define DEBUG_KEYBOARD */ /* Global keyboard information */ -#define KEYBOARD_HARDWARE 0x01 -#define KEYBOARD_AUTORELEASE 0x02 +#define KEYBOARD_HARDWARE 0x01 +#define KEYBOARD_VIRTUAL 0x02 +#define KEYBOARD_AUTORELEASE 0x04 typedef struct SDL_Keyboard SDL_Keyboard; @@ -48,6 +48,7 @@ struct SDL_Keyboard Uint8 keystate[SDL_NUM_SCANCODES]; SDL_Keycode keymap[SDL_NUM_SCANCODES]; SDL_bool autorelease_pending; + Uint32 hardware_timestamp; }; static SDL_Keyboard SDL_keyboard; @@ -641,43 +642,40 @@ static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = { }; /* Taken from SDL_iconv() */ -char * -SDL_UCS4ToUTF8(Uint32 ch, char *dst) +char *SDL_UCS4ToUTF8(Uint32 ch, char *dst) { - Uint8 *p = (Uint8 *) dst; + Uint8 *p = (Uint8 *)dst; if (ch <= 0x7F) { - *p = (Uint8) ch; + *p = (Uint8)ch; ++dst; } else if (ch <= 0x7FF) { - p[0] = 0xC0 | (Uint8) ((ch >> 6) & 0x1F); - p[1] = 0x80 | (Uint8) (ch & 0x3F); + p[0] = 0xC0 | (Uint8)((ch >> 6) & 0x1F); + p[1] = 0x80 | (Uint8)(ch & 0x3F); dst += 2; } else if (ch <= 0xFFFF) { - p[0] = 0xE0 | (Uint8) ((ch >> 12) & 0x0F); - p[1] = 0x80 | (Uint8) ((ch >> 6) & 0x3F); - p[2] = 0x80 | (Uint8) (ch & 0x3F); + p[0] = 0xE0 | (Uint8)((ch >> 12) & 0x0F); + p[1] = 0x80 | (Uint8)((ch >> 6) & 0x3F); + p[2] = 0x80 | (Uint8)(ch & 0x3F); dst += 3; } else { - p[0] = 0xF0 | (Uint8) ((ch >> 18) & 0x07); - p[1] = 0x80 | (Uint8) ((ch >> 12) & 0x3F); - p[2] = 0x80 | (Uint8) ((ch >> 6) & 0x3F); - p[3] = 0x80 | (Uint8) (ch & 0x3F); + p[0] = 0xF0 | (Uint8)((ch >> 18) & 0x07); + p[1] = 0x80 | (Uint8)((ch >> 12) & 0x3F); + p[2] = 0x80 | (Uint8)((ch >> 6) & 0x3F); + p[3] = 0x80 | (Uint8)(ch & 0x3F); dst += 4; } return dst; } /* Public functions */ -int -SDL_KeyboardInit(void) +int SDL_KeyboardInit(void) { /* Set the default keymap */ SDL_SetKeymap(0, SDL_default_keymap, SDL_NUM_SCANCODES, SDL_FALSE); return 0; } -void -SDL_ResetKeyboard(void) +void SDL_ResetKeyboard(void) { SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Scancode scancode; @@ -685,39 +683,58 @@ SDL_ResetKeyboard(void) #ifdef DEBUG_KEYBOARD printf("Resetting keyboard\n"); #endif - for (scancode = (SDL_Scancode) 0; scancode < SDL_NUM_SCANCODES; ++scancode) { + for (scancode = (SDL_Scancode)0; scancode < SDL_NUM_SCANCODES; ++scancode) { if (keyboard->keystate[scancode] == SDL_PRESSED) { SDL_SendKeyboardKey(SDL_RELEASED, scancode); } } } -void -SDL_GetDefaultKeymap(SDL_Keycode * keymap) +void SDL_GetDefaultKeymap(SDL_Keycode *keymap) { SDL_memcpy(keymap, SDL_default_keymap, sizeof(SDL_default_keymap)); } -void -SDL_SetKeymap(int start, const SDL_Keycode * keys, int length, SDL_bool send_event) +void SDL_SetKeymap(int start, const SDL_Keycode *keys, int length, SDL_bool send_event) { SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Scancode scancode; SDL_Keycode normalized_keymap[SDL_NUM_SCANCODES]; + SDL_bool is_azerty = SDL_FALSE; if (start < 0 || start + length > SDL_NUM_SCANCODES) { return; } + if (start > 0) { + SDL_memcpy(&normalized_keymap[0], &keyboard->keymap[0], sizeof(*keys) * start); + } + SDL_memcpy(&normalized_keymap[start], keys, sizeof(*keys) * length); - /* The number key scancodes always map to the number key keycodes. - * On AZERTY layouts these technically are symbols, but users (and games) - * always think of them and view them in UI as number keys. + if (start + length < SDL_NUM_SCANCODES) { + int offset = start + length; + SDL_memcpy(&normalized_keymap[offset], &keyboard->keymap[offset], sizeof(*keys) * (SDL_NUM_SCANCODES - offset)); + } + + /* On AZERTY layouts the number keys are technically symbols, but users (and games) + * always think of them and view them in UI as number keys, so remap them here. */ - normalized_keymap[SDL_SCANCODE_0] = SDLK_0; - for (scancode = SDL_SCANCODE_1; scancode <= SDL_SCANCODE_9; ++scancode) { - normalized_keymap[scancode] = SDLK_1 + (scancode - SDL_SCANCODE_1); + if (normalized_keymap[SDL_SCANCODE_0] < SDLK_0 || normalized_keymap[SDL_SCANCODE_0] > SDLK_9) { + is_azerty = SDL_TRUE; + for (scancode = SDL_SCANCODE_1; scancode <= SDL_SCANCODE_9; ++scancode) { + if (normalized_keymap[scancode] >= SDLK_0 && normalized_keymap[scancode] <= SDLK_9) { + /* There's a number on this row, it's not AZERTY */ + is_azerty = SDL_FALSE; + break; + } + } + } + if (is_azerty) { + normalized_keymap[SDL_SCANCODE_0] = SDLK_0; + for (scancode = SDL_SCANCODE_1; scancode <= SDL_SCANCODE_9; ++scancode) { + normalized_keymap[scancode] = SDLK_1 + (scancode - SDL_SCANCODE_1); + } } /* If the mapping didn't really change, we're done here */ @@ -732,8 +749,7 @@ SDL_SetKeymap(int start, const SDL_Keycode * keys, int length, SDL_bool send_eve } } -void -SDL_SetScancodeName(SDL_Scancode scancode, const char *name) +void SDL_SetScancodeName(SDL_Scancode scancode, const char *name) { if (scancode >= SDL_NUM_SCANCODES) { return; @@ -741,20 +757,18 @@ SDL_SetScancodeName(SDL_Scancode scancode, const char *name) SDL_scancode_names[scancode] = name; } -SDL_Window * -SDL_GetKeyboardFocus(void) +SDL_Window *SDL_GetKeyboardFocus(void) { SDL_Keyboard *keyboard = &SDL_keyboard; return keyboard->focus; } -void -SDL_SetKeyboardFocus(SDL_Window * window) +void SDL_SetKeyboardFocus(SDL_Window *window) { SDL_Keyboard *keyboard = &SDL_keyboard; - if (keyboard->focus && !window) { + if (keyboard->focus && window == NULL) { /* We won't get anymore keyboard messages, so reset keyboard state */ SDL_ResetKeyboard(); } @@ -763,11 +777,11 @@ SDL_SetKeyboardFocus(SDL_Window * window) if (keyboard->focus && keyboard->focus != window) { /* new window shouldn't think it has mouse captured. */ - SDL_assert(!window || !(window->flags & SDL_WINDOW_MOUSE_CAPTURE)); + SDL_assert(window == NULL || !(window->flags & SDL_WINDOW_MOUSE_CAPTURE)); /* old window must lose an existing mouse capture. */ if (keyboard->focus->flags & SDL_WINDOW_MOUSE_CAPTURE) { - SDL_CaptureMouse(SDL_FALSE); /* drop the capture. */ + SDL_CaptureMouse(SDL_FALSE); /* drop the capture. */ SDL_UpdateMouseCapture(SDL_TRUE); SDL_assert(!(keyboard->focus->flags & SDL_WINDOW_MOUSE_CAPTURE)); } @@ -799,8 +813,7 @@ SDL_SetKeyboardFocus(SDL_Window * window) } } -static int -SDL_SendKeyboardKeyInternal(Uint8 source, Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) +static int SDL_SendKeyboardKeyInternal(Uint8 source, Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) { SDL_Keyboard *keyboard = &SDL_keyboard; int posted; @@ -854,7 +867,9 @@ SDL_SendKeyboardKeyInternal(Uint8 source, Uint8 state, SDL_Scancode scancode, SD keycode = keyboard->keymap[scancode]; } - if (source == KEYBOARD_AUTORELEASE) { + if (source == KEYBOARD_HARDWARE) { + keyboard->hardware_timestamp = SDL_GetTicks(); + } else if (source == KEYBOARD_AUTORELEASE) { keyboard->autorelease_pending = SDL_TRUE; } @@ -934,16 +949,15 @@ SDL_SendKeyboardKeyInternal(Uint8 source, Uint8 state, SDL_Scancode scancode, SD (keyboard->focus->flags & SDL_WINDOW_KEYBOARD_GRABBED) && (keyboard->focus->flags & SDL_WINDOW_FULLSCREEN) && SDL_GetHintBoolean(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, SDL_TRUE)) { - /* We will temporarily forfeit our grab by minimizing our window, + /* We will temporarily forfeit our grab by minimizing our window, allowing the user to escape the application */ SDL_MinimizeWindow(keyboard->focus); } - return (posted); + return posted; } -int -SDL_SendKeyboardUnicodeKey(Uint32 ch) +int SDL_SendKeyboardUnicodeKey(Uint32 ch) { SDL_Scancode code = SDL_SCANCODE_UNKNOWN; uint16_t mod = 0; @@ -955,40 +969,41 @@ SDL_SendKeyboardUnicodeKey(Uint32 ch) if (mod & KMOD_SHIFT) { /* If the character uses shift, press shift down */ - SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT); + SDL_SendKeyboardKeyInternal(KEYBOARD_VIRTUAL, SDL_PRESSED, SDL_SCANCODE_LSHIFT, SDLK_UNKNOWN); } /* Send a keydown and keyup for the character */ - SDL_SendKeyboardKey(SDL_PRESSED, code); - SDL_SendKeyboardKey(SDL_RELEASED, code); + SDL_SendKeyboardKeyInternal(KEYBOARD_VIRTUAL, SDL_PRESSED, code, SDLK_UNKNOWN); + SDL_SendKeyboardKeyInternal(KEYBOARD_VIRTUAL, SDL_RELEASED, code, SDLK_UNKNOWN); if (mod & KMOD_SHIFT) { /* If the character uses shift, release shift */ - SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT); + SDL_SendKeyboardKeyInternal(KEYBOARD_VIRTUAL, SDL_RELEASED, SDL_SCANCODE_LSHIFT, SDLK_UNKNOWN); } return 0; } -int -SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode) +int SDL_SendVirtualKeyboardKey(Uint8 state, SDL_Scancode scancode) +{ + return SDL_SendKeyboardKeyInternal(KEYBOARD_VIRTUAL, state, scancode, SDLK_UNKNOWN); +} + +int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode) { return SDL_SendKeyboardKeyInternal(KEYBOARD_HARDWARE, state, scancode, SDLK_UNKNOWN); } -int -SDL_SendKeyboardKeyAndKeycode(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) +int SDL_SendKeyboardKeyAndKeycode(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) { return SDL_SendKeyboardKeyInternal(KEYBOARD_HARDWARE, state, scancode, keycode); } -int -SDL_SendKeyboardKeyAutoRelease(SDL_Scancode scancode) +int SDL_SendKeyboardKeyAutoRelease(SDL_Scancode scancode) { return SDL_SendKeyboardKeyInternal(KEYBOARD_AUTORELEASE, SDL_PRESSED, scancode, SDLK_UNKNOWN); } -void -SDL_ReleaseAutoReleaseKeys(void) +void SDL_ReleaseAutoReleaseKeys(void) { SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Scancode scancode; @@ -1001,24 +1016,30 @@ SDL_ReleaseAutoReleaseKeys(void) } keyboard->autorelease_pending = SDL_FALSE; } + + if (keyboard->hardware_timestamp) { + /* Keep hardware keyboard "active" for 250 ms */ + if (SDL_TICKS_PASSED(SDL_GetTicks(), keyboard->hardware_timestamp + 250)) { + keyboard->hardware_timestamp = 0; + } + } } -SDL_bool -SDL_HardwareKeyboardKeyPressed(void) +SDL_bool SDL_HardwareKeyboardKeyPressed(void) { SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Scancode scancode; for (scancode = SDL_SCANCODE_UNKNOWN; scancode < SDL_NUM_SCANCODES; ++scancode) { - if ((keyboard->keysource[scancode] & KEYBOARD_HARDWARE) != 0) { + if (keyboard->keysource[scancode] & KEYBOARD_HARDWARE) { return SDL_TRUE; } } - return SDL_FALSE; + + return keyboard->hardware_timestamp ? SDL_TRUE : SDL_FALSE; } -int -SDL_SendKeyboardText(const char *text) +int SDL_SendKeyboardText(const char *text) { SDL_Keyboard *keyboard = &SDL_keyboard; int posted; @@ -1045,11 +1066,10 @@ SDL_SendKeyboardText(const char *text) posted |= (SDL_PushEvent(&event) > 0); } } - return (posted); + return posted; } -int -SDL_SendEditingText(const char *text, int start, int length) +int SDL_SendEditingText(const char *text, int start, int length) { SDL_Keyboard *keyboard = &SDL_keyboard; int posted; @@ -1076,35 +1096,31 @@ SDL_SendEditingText(const char *text, int start, int length) posted = (SDL_PushEvent(&event) > 0); } - return (posted); + return posted; } -void -SDL_KeyboardQuit(void) +void SDL_KeyboardQuit(void) { } -const Uint8 * -SDL_GetKeyboardState(int *numkeys) +const Uint8 *SDL_GetKeyboardState(int *numkeys) { SDL_Keyboard *keyboard = &SDL_keyboard; - if (numkeys != (int *) 0) { + if (numkeys != (int *)0) { *numkeys = SDL_NUM_SCANCODES; } return keyboard->keystate; } -SDL_Keymod -SDL_GetModState(void) +SDL_Keymod SDL_GetModState(void) { SDL_Keyboard *keyboard = &SDL_keyboard; - return (SDL_Keymod) keyboard->modstate; + return (SDL_Keymod)keyboard->modstate; } -void -SDL_SetModState(SDL_Keymod modstate) +void SDL_SetModState(SDL_Keymod modstate) { SDL_Keyboard *keyboard = &SDL_keyboard; @@ -1112,8 +1128,7 @@ SDL_SetModState(SDL_Keymod modstate) } /* Note that SDL_ToggleModState() is not a public API. SDL_SetModState() is. */ -void -SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle) +void SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle) { SDL_Keyboard *keyboard = &SDL_keyboard; if (toggle) { @@ -1123,22 +1138,19 @@ SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle) } } - -SDL_Keycode -SDL_GetKeyFromScancode(SDL_Scancode scancode) +SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode) { SDL_Keyboard *keyboard = &SDL_keyboard; if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { - SDL_InvalidParamError("scancode"); - return 0; + SDL_InvalidParamError("scancode"); + return 0; } return keyboard->keymap[scancode]; } -SDL_Keycode -SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode) +SDL_Keycode SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode) { if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { SDL_InvalidParamError("scancode"); @@ -1148,8 +1160,7 @@ SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode) return SDL_default_keymap[scancode]; } -SDL_Scancode -SDL_GetScancodeFromKey(SDL_Keycode key) +SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key) { SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Scancode scancode; @@ -1163,28 +1174,28 @@ SDL_GetScancodeFromKey(SDL_Keycode key) return SDL_SCANCODE_UNKNOWN; } -const char * -SDL_GetScancodeName(SDL_Scancode scancode) +const char *SDL_GetScancodeName(SDL_Scancode scancode) { const char *name; if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { - SDL_InvalidParamError("scancode"); - return ""; + SDL_InvalidParamError("scancode"); + return ""; } name = SDL_scancode_names[scancode]; - if (name) + if (name != NULL) { return name; - else - return ""; + } + + return ""; } SDL_Scancode SDL_GetScancodeFromName(const char *name) { int i; - if (!name || !*name) { - SDL_InvalidParamError("name"); + if (name == NULL || !*name) { + SDL_InvalidParamError("name"); return SDL_SCANCODE_UNKNOWN; } @@ -1201,15 +1212,13 @@ SDL_Scancode SDL_GetScancodeFromName(const char *name) return SDL_SCANCODE_UNKNOWN; } -const char * -SDL_GetKeyName(SDL_Keycode key) +const char *SDL_GetKeyName(SDL_Keycode key) { static char name[8]; char *end; if (key & SDLK_SCANCODE_MASK) { - return - SDL_GetScancodeName((SDL_Scancode) (key & ~SDLK_SCANCODE_MASK)); + return SDL_GetScancodeName((SDL_Scancode)(key & ~SDLK_SCANCODE_MASK)); } switch (key) { @@ -1234,14 +1243,13 @@ SDL_GetKeyName(SDL_Keycode key) key -= 32; } - end = SDL_UCS4ToUTF8((Uint32) key, name); + end = SDL_UCS4ToUTF8((Uint32)key, name); *end = '\0'; return name; } } -SDL_Keycode -SDL_GetKeyFromName(const char *name) +SDL_Keycode SDL_GetKeyFromName(const char *name) { SDL_Keycode key; @@ -1255,27 +1263,27 @@ SDL_GetKeyFromName(const char *name) if (key >= 0xF0) { if (SDL_strlen(name) == 4) { int i = 0; - key = (Uint16)(name[i]&0x07) << 18; - key |= (Uint16)(name[++i]&0x3F) << 12; - key |= (Uint16)(name[++i]&0x3F) << 6; - key |= (Uint16)(name[++i]&0x3F); + key = (Uint16)(name[i] & 0x07) << 18; + key |= (Uint16)(name[++i] & 0x3F) << 12; + key |= (Uint16)(name[++i] & 0x3F) << 6; + key |= (Uint16)(name[++i] & 0x3F); return key; } return SDLK_UNKNOWN; } else if (key >= 0xE0) { if (SDL_strlen(name) == 3) { int i = 0; - key = (Uint16)(name[i]&0x0F) << 12; - key |= (Uint16)(name[++i]&0x3F) << 6; - key |= (Uint16)(name[++i]&0x3F); + key = (Uint16)(name[i] & 0x0F) << 12; + key |= (Uint16)(name[++i] & 0x3F) << 6; + key |= (Uint16)(name[++i] & 0x3F); return key; } return SDLK_UNKNOWN; } else if (key >= 0xC0) { if (SDL_strlen(name) == 2) { int i = 0; - key = (Uint16)(name[i]&0x1F) << 6; - key |= (Uint16)(name[++i]&0x3F); + key = (Uint16)(name[i] & 0x1F) << 6; + key |= (Uint16)(name[++i] & 0x3F); return key; } return SDLK_UNKNOWN; diff --git a/modules/SDL2/src/events/SDL_keyboard_c.h b/modules/SDL2/src/events/SDL_keyboard_c.h index 7e346a8..16a5fad 100644 --- a/modules/SDL2/src/events/SDL_keyboard_c.h +++ b/modules/SDL2/src/events/SDL_keyboard_c.h @@ -30,13 +30,13 @@ extern int SDL_KeyboardInit(void); /* Get the default keymap */ -extern void SDL_GetDefaultKeymap(SDL_Keycode * keymap); +extern void SDL_GetDefaultKeymap(SDL_Keycode *keymap); /* Get the default key code for a scancode */ extern SDL_Keycode SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode); /* Set the mapping of scancode to key codes */ -extern void SDL_SetKeymap(int start, const SDL_Keycode * keys, int length, SDL_bool send_event); +extern void SDL_SetKeymap(int start, const SDL_Keycode *keys, int length, SDL_bool send_event); /* Set a platform-dependent key name, overriding the default platform-agnostic name. Encoded as UTF-8. The string is not copied, thus the pointer given to @@ -45,13 +45,16 @@ extern void SDL_SetKeymap(int start, const SDL_Keycode * keys, int length, SDL_b extern void SDL_SetScancodeName(SDL_Scancode scancode, const char *name); /* Set the keyboard focus window */ -extern void SDL_SetKeyboardFocus(SDL_Window * window); +extern void SDL_SetKeyboardFocus(SDL_Window *window); /* Send a character from an on-screen keyboard as scancode and modifier key events, currently assuming ASCII characters on a US keyboard layout */ extern int SDL_SendKeyboardUnicodeKey(Uint32 ch); +/* Send a key from a virtual key source, like an on-screen keyboard */ +extern int SDL_SendVirtualKeyboardKey(Uint8 state, SDL_Scancode scancode); + /* Send a keyboard key event */ extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode); extern int SDL_SendKeyboardKeyAutoRelease(SDL_Scancode scancode); @@ -70,7 +73,7 @@ extern SDL_bool SDL_HardwareKeyboardKeyPressed(void); extern int SDL_SendKeyboardText(const char *text); /* Send editing text for selected range from start to end */ -extern int SDL_SendEditingText(const char *text, int start, int end); +extern int SDL_SendEditingText(const char *text, int start, int length); /* Shutdown the keyboard subsystem */ extern void SDL_KeyboardQuit(void); diff --git a/modules/SDL2/src/events/SDL_keysym_to_scancode.c b/modules/SDL2/src/events/SDL_keysym_to_scancode.c index 15566e2..df0b6b1 100644 --- a/modules/SDL2/src/events/SDL_keysym_to_scancode.c +++ b/modules/SDL2/src/events/SDL_keysym_to_scancode.c @@ -316,11 +316,11 @@ function process_line { sym=$(echo "$1" | awk '{print $3}') code=$(echo "$1" | sed 's,.*_EVDEVK(\(0x[0-9A-Fa-f]*\)).*,\1,') - value=$(egrep "#define ${sym}\s" -R /usr/include/X11 | awk '{print $3}') + value=$(grep -E "#define ${sym}\s" -R /usr/include/X11 | awk '{print $3}') printf " { 0x%.8X, 0x%.3x }, /* $sym */\n" $value $code } -fgrep "/* Use: " /usr/include/xkbcommon/xkbcommon-keysyms.h | fgrep _EVDEVK | while read line; do +grep -F "/* Use: " /usr/include/xkbcommon/xkbcommon-keysyms.h | grep -F _EVDEVK | while read line; do process_line "$line" done #endif @@ -387,8 +387,7 @@ static const struct { }; /* *INDENT-ON* */ /* clang-format on */ -SDL_Scancode -SDL_GetScancodeFromKeySym(Uint32 keysym, Uint32 keycode) +SDL_Scancode SDL_GetScancodeFromKeySym(Uint32 keysym, Uint32 keycode) { int i; Uint32 linux_keycode = 0; diff --git a/modules/SDL2/src/events/SDL_mouse.c b/modules/SDL2/src/events/SDL_mouse.c index ad3b636..000b22d 100644 --- a/modules/SDL2/src/events/SDL_mouse.c +++ b/modules/SDL2/src/events/SDL_mouse.c @@ -29,7 +29,7 @@ #include "../SDL_hints_c.h" #include "../video/SDL_sysvideo.h" #if defined(__WIN32__) || defined(__GDK__) -#include "../core/windows/SDL_windows.h" // For GetDoubleClickTime() +#include "../core/windows/SDL_windows.h" // For GetDoubleClickTime() #endif #if defined(__OS2__) #define INCL_WIN @@ -44,11 +44,9 @@ static SDL_Mouse SDL_mouse; /* for mapping mouse events to touch */ static SDL_bool track_mouse_down = SDL_FALSE; -static int -SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y); +static int SDL_PrivateSendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y); -static void SDLCALL -SDL_MouseDoubleClickTimeChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseDoubleClickTimeChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; @@ -65,20 +63,18 @@ SDL_MouseDoubleClickTimeChanged(void *userdata, const char *name, const char *ol } } -static void SDLCALL -SDL_MouseDoubleClickRadiusChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseDoubleClickRadiusChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; if (hint && *hint) { mouse->double_click_radius = SDL_atoi(hint); } else { - mouse->double_click_radius = 32; /* 32 pixels seems about right for touch interfaces */ + mouse->double_click_radius = 32; /* 32 pixels seems about right for touch interfaces */ } } -static void SDLCALL -SDL_MouseNormalSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseNormalSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; @@ -91,8 +87,7 @@ SDL_MouseNormalSpeedScaleChanged(void *userdata, const char *name, const char *o } } -static void SDLCALL -SDL_MouseRelativeSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseRelativeSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; @@ -105,16 +100,14 @@ SDL_MouseRelativeSpeedScaleChanged(void *userdata, const char *name, const char } } -static void SDLCALL -SDL_MouseRelativeSystemScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseRelativeSystemScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; mouse->enable_relative_system_scale = SDL_GetStringBoolean(hint, SDL_FALSE); } -static void SDLCALL -SDL_TouchMouseEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_TouchMouseEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; @@ -122,12 +115,11 @@ SDL_TouchMouseEventsChanged(void *userdata, const char *name, const char *oldVal } #if defined(__vita__) -static void SDLCALL -SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; if (hint) { - switch(*hint) { + switch (*hint) { default: case '0': mouse->vita_touch_mouse_device = 0; @@ -143,8 +135,7 @@ SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *ol } #endif -static void SDLCALL -SDL_MouseTouchEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseTouchEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; SDL_bool default_value; @@ -161,8 +152,7 @@ SDL_MouseTouchEventsChanged(void *userdata, const char *name, const char *oldVal } } -static void SDLCALL -SDL_MouseAutoCaptureChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseAutoCaptureChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; SDL_bool auto_capture = SDL_GetStringBoolean(hint, SDL_TRUE); @@ -173,8 +163,7 @@ SDL_MouseAutoCaptureChanged(void *userdata, const char *name, const char *oldVal } } -static void SDLCALL -SDL_MouseRelativeWarpMotionChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_MouseRelativeWarpMotionChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_Mouse *mouse = (SDL_Mouse *)userdata; @@ -182,8 +171,7 @@ SDL_MouseRelativeWarpMotionChanged(void *userdata, const char *name, const char } /* Public functions */ -int -SDL_MouseInit(void) +int SDL_MouseInit(void) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -225,11 +213,10 @@ SDL_MouseInit(void) mouse->cursor_shown = SDL_TRUE; - return (0); + return 0; } -void -SDL_SetDefaultCursor(SDL_Cursor * cursor) +void SDL_SetDefaultCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -239,8 +226,7 @@ SDL_SetDefaultCursor(SDL_Cursor * cursor) } } -SDL_Mouse * -SDL_GetMouse(void) +SDL_Mouse *SDL_GetMouse(void) { return &SDL_mouse; } @@ -258,8 +244,7 @@ static Uint32 GetButtonState(SDL_Mouse *mouse, SDL_bool include_touch) return buttonstate; } -SDL_Window * -SDL_GetMouseFocus(void) +SDL_Window *SDL_GetMouseFocus(void) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -274,8 +259,7 @@ SDL_GetMouseFocus(void) * -flibit */ #if 0 -void -SDL_ResetMouse(void) +void SDL_ResetMouse(void) { SDL_Mouse *mouse = SDL_GetMouse(); Uint32 buttonState = GetButtonState(mouse, SDL_FALSE); @@ -290,8 +274,7 @@ SDL_ResetMouse(void) } #endif /* 0 */ -void -SDL_SetMouseFocus(SDL_Window * window) +void SDL_SetMouseFocus(SDL_Window *window) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -328,13 +311,12 @@ SDL_SetMouseFocus(SDL_Window * window) } /* Check to see if we need to synthesize focus events */ -static SDL_bool -SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate, SDL_bool send_mouse_motion) +static SDL_bool SDL_UpdateMouseFocus(SDL_Window *window, int x, int y, Uint32 buttonstate, SDL_bool send_mouse_motion) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_bool inWindow = SDL_TRUE; - if (window && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) { + if (window && !(window->flags & SDL_WINDOW_MOUSE_CAPTURE)) { int w, h; SDL_GetWindowSize(window, &w, &h); if (x < 0 || y < 0 || x >= w || y >= h) { @@ -367,8 +349,7 @@ SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate, SDL_ return SDL_TRUE; } -int -SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y) +int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y) { if (window && !relative) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -380,8 +361,7 @@ SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int return SDL_PrivateSendMouseMotion(window, mouseID, relative, x, y); } -static int -GetScaledMouseDelta(float scale, int value, float *accum) +static int GetScaledMouseDelta(float scale, int value, float *accum) { if (value && scale != 1.0f) { if ((value > 0) != (*accum > 0)) { @@ -398,8 +378,7 @@ GetScaledMouseDelta(float scale, int value, float *accum) return value; } -static float -CalculateSystemScale(SDL_Mouse *mouse, int *x, int *y) +static float CalculateSystemScale(SDL_Mouse *mouse, const int *x, const int *y) { int i; int n = mouse->num_system_scale_values; @@ -430,8 +409,7 @@ CalculateSystemScale(SDL_Mouse *mouse, int *x, int *y) } /* You can set either a single scale, or a set of {speed, scale} values in ascending order */ -int -SDL_SetMouseSystemScale(int num_values, const float *values) +int SDL_SetMouseSystemScale(int num_values, const float *values) { SDL_Mouse *mouse = SDL_GetMouse(); float *v; @@ -462,7 +440,7 @@ SDL_SetMouseSystemScale(int num_values, const float *values) } v = (float *)SDL_realloc(mouse->system_scale_values, num_values * sizeof(*values)); - if (!v) { + if (v == NULL) { return SDL_OutOfMemory(); } SDL_memcpy(v, values, num_values * sizeof(*values)); @@ -472,8 +450,7 @@ SDL_SetMouseSystemScale(int num_values, const float *values) return 0; } -static void -GetScaledMouseDeltas(SDL_Mouse *mouse, int *x, int *y) +static void GetScaledMouseDeltas(SDL_Mouse *mouse, int *x, int *y) { if (mouse->relative_mode) { if (mouse->enable_relative_speed_scale) { @@ -492,8 +469,7 @@ GetScaledMouseDeltas(SDL_Mouse *mouse, int *x, int *y) } } -static int -SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y) +static int SDL_PrivateSendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); int posted; @@ -530,7 +506,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ return 0; } } else { - if (window && (window->flags & SDL_WINDOW_INPUT_FOCUS) != 0) { + if (window && (window->flags & SDL_WINDOW_INPUT_FOCUS)) { if (mouse->WarpMouse) { mouse->WarpMouse(window, center_x, center_y); } else { @@ -556,7 +532,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ mouse->x = x; mouse->y = y; mouse->has_position = SDL_TRUE; - } else if (!xrel && !yrel) { /* Drop events that don't change state */ + } else if (!xrel && !yrel) { /* Drop events that don't change state */ #ifdef DEBUG_MOUSE SDL_Log("Mouse event didn't change state - dropped!\n"); #endif @@ -580,7 +556,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ /* make sure that the pointers find themselves inside the windows, unless we have the mouse captured. */ - if (window && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) { + if (window && !(window->flags & SDL_WINDOW_MOUSE_CAPTURE)) { int x_min = 0, x_max = 0; int y_min = 0, y_max = 0; const SDL_Rect *confine = SDL_GetWindowMouseRect(window); @@ -637,7 +613,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ event.motion.windowID = mouse->focus ? mouse->focus->id : 0; event.motion.which = mouseID; /* Set us pending (or clear during a normal mouse movement event) as having triggered */ - mouse->was_touch_mouse_events = (mouseID == SDL_TOUCH_MOUSEID)? SDL_TRUE : SDL_FALSE; + mouse->was_touch_mouse_events = (mouseID == SDL_TOUCH_MOUSEID) ? SDL_TRUE : SDL_FALSE; event.motion.state = GetButtonState(mouse, SDL_TRUE); event.motion.x = mouse->x; event.motion.y = mouse->y; @@ -668,7 +644,7 @@ static SDL_MouseInputSource *GetMouseInputSource(SDL_Mouse *mouse, SDL_MouseID m } } - sources = (SDL_MouseInputSource *)SDL_realloc(mouse->sources, (mouse->num_sources + 1)*sizeof(*mouse->sources)); + sources = (SDL_MouseInputSource *)SDL_realloc(mouse->sources, (mouse->num_sources + 1) * sizeof(*mouse->sources)); if (sources) { mouse->sources = sources; ++mouse->num_sources; @@ -685,7 +661,7 @@ static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button) if (button >= mouse->num_clickstates) { int i, count = button + 1; SDL_MouseClickState *clickstate = (SDL_MouseClickState *)SDL_realloc(mouse->clickstate, count * sizeof(*mouse->clickstate)); - if (!clickstate) { + if (clickstate == NULL) { return NULL; } mouse->clickstate = clickstate; @@ -698,8 +674,7 @@ static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button) return &mouse->clickstate[button]; } -static int -SDL_PrivateSendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks) +static int SDL_PrivateSendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks) { SDL_Mouse *mouse = SDL_GetMouse(); int posted; @@ -708,7 +683,7 @@ SDL_PrivateSendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state SDL_MouseInputSource *source; source = GetMouseInputSource(mouse, mouseID); - if (!source) { + if (source == NULL) { return 0; } buttonstate = source->buttonstate; @@ -795,7 +770,7 @@ SDL_PrivateSendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state event.button.which = mouseID; event.button.state = state; event.button.button = button; - event.button.clicks = (Uint8) SDL_min(clicks, 255); + event.button.clicks = (Uint8)SDL_min(clicks, 255); event.button.x = mouse->x; event.button.y = mouse->y; posted = (SDL_PushEvent(&event) > 0); @@ -814,21 +789,18 @@ SDL_PrivateSendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state return posted; } -int -SDL_SendMouseButtonClicks(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks) +int SDL_SendMouseButtonClicks(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks) { clicks = SDL_max(clicks, 0); return SDL_PrivateSendMouseButton(window, mouseID, state, button, clicks); } -int -SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button) +int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button) { return SDL_PrivateSendMouseButton(window, mouseID, state, button, -1); } -int -SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction) +int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction) { SDL_Mouse *mouse = SDL_GetMouse(); int posted; @@ -899,8 +871,7 @@ SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, float x, float y, S return posted; } -void -SDL_MouseQuit(void) +void SDL_MouseQuit(void) { SDL_Cursor *cursor, *next; SDL_Mouse *mouse = SDL_GetMouse(); @@ -938,6 +909,12 @@ SDL_MouseQuit(void) } mouse->num_clickstates = 0; + if (mouse->system_scale_values) { + SDL_free(mouse->system_scale_values); + mouse->system_scale_values = NULL; + } + mouse->num_system_scale_values = 0; + SDL_DelHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME, SDL_MouseDoubleClickTimeChanged, mouse); @@ -966,8 +943,7 @@ SDL_MouseQuit(void) SDL_MouseRelativeWarpMotionChanged, mouse); } -Uint32 -SDL_GetMouseState(int *x, int *y) +Uint32 SDL_GetMouseState(int *x, int *y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -980,8 +956,7 @@ SDL_GetMouseState(int *x, int *y) return GetButtonState(mouse, SDL_TRUE); } -Uint32 -SDL_GetRelativeMouseState(int *x, int *y) +Uint32 SDL_GetRelativeMouseState(int *x, int *y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -996,8 +971,7 @@ SDL_GetRelativeMouseState(int *x, int *y) return GetButtonState(mouse, SDL_TRUE); } -Uint32 -SDL_GetGlobalMouseState(int *x, int *y) +Uint32 SDL_GetGlobalMouseState(int *x, int *y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -1005,10 +979,10 @@ SDL_GetGlobalMouseState(int *x, int *y) int tmpx, tmpy; /* make sure these are never NULL for the backend implementations... */ - if (!x) { + if (x == NULL) { x = &tmpx; } - if (!y) { + if (y == NULL) { y = &tmpy; } @@ -1020,8 +994,7 @@ SDL_GetGlobalMouseState(int *x, int *y) } } -void -SDL_PerformWarpMouseInWindow(SDL_Window *window, int x, int y, SDL_bool ignore_relative_mode) +void SDL_PerformWarpMouseInWindow(SDL_Window *window, int x, int y, SDL_bool ignore_relative_mode) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -1066,14 +1039,12 @@ SDL_PerformWarpMouseInWindow(SDL_Window *window, int x, int y, SDL_bool ignore_r } } -void -SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) +void SDL_WarpMouseInWindow(SDL_Window *window, int x, int y) { SDL_PerformWarpMouseInWindow(window, x, y, SDL_FALSE); } -int -SDL_WarpMouseGlobal(int x, int y) +int SDL_WarpMouseGlobal(int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -1084,8 +1055,7 @@ SDL_WarpMouseGlobal(int x, int y) return SDL_Unsupported(); } -static SDL_bool -ShouldUseRelativeModeWarp(SDL_Mouse *mouse) +static SDL_bool ShouldUseRelativeModeWarp(SDL_Mouse *mouse) { if (!mouse->WarpMouse) { /* Need this functionality for relative mode warp implementation */ @@ -1095,8 +1065,7 @@ ShouldUseRelativeModeWarp(SDL_Mouse *mouse) return SDL_GetHintBoolean(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, SDL_FALSE); } -int -SDL_SetRelativeMouseMode(SDL_bool enabled) +int SDL_SetRelativeMouseMode(SDL_bool enabled) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Window *focusWindow = SDL_GetKeyboardFocus(); @@ -1132,7 +1101,7 @@ SDL_SetRelativeMouseMode(SDL_bool enabled) SDL_SetMouseFocus(focusWindow); if (mouse->relative_mode_warp) { - SDL_PerformWarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2, SDL_TRUE); + SDL_PerformWarpMouseInWindow(focusWindow, focusWindow->w / 2, focusWindow->h / 2, SDL_TRUE); } } @@ -1158,16 +1127,14 @@ SDL_SetRelativeMouseMode(SDL_bool enabled) return 0; } -SDL_bool -SDL_GetRelativeMouseMode() +SDL_bool SDL_GetRelativeMouseMode() { SDL_Mouse *mouse = SDL_GetMouse(); return mouse->relative_mode; } -int -SDL_UpdateMouseCapture(SDL_bool force_release) +int SDL_UpdateMouseCapture(SDL_bool force_release) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Window *capture_window = NULL; @@ -1218,8 +1185,7 @@ SDL_UpdateMouseCapture(SDL_bool force_release) return 0; } -int -SDL_CaptureMouse(SDL_bool enabled) +int SDL_CaptureMouse(SDL_bool enabled) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -1246,8 +1212,7 @@ SDL_CaptureMouse(SDL_bool enabled) return SDL_UpdateMouseCapture(SDL_FALSE); } -SDL_Cursor * -SDL_CreateCursor(const Uint8 * data, const Uint8 * mask, +SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y) { SDL_Surface *surface; @@ -1268,11 +1233,11 @@ SDL_CreateCursor(const Uint8 * data, const Uint8 * mask, 0x0000FF00, 0x000000FF, 0xFF000000); - if (!surface) { + if (surface == NULL) { return NULL; } for (y = 0; y < h; ++y) { - pixel = (Uint32 *) ((Uint8 *) surface->pixels + y * surface->pitch); + pixel = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch); for (x = 0; x < w; ++x) { if ((x % 8) == 0) { datab = *data++; @@ -1295,14 +1260,13 @@ SDL_CreateCursor(const Uint8 * data, const Uint8 * mask, return cursor; } -SDL_Cursor * -SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y) +SDL_Cursor *SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Surface *temp = NULL; SDL_Cursor *cursor; - if (!surface) { + if (surface == NULL) { SDL_InvalidParamError("surface"); return NULL; } @@ -1321,7 +1285,7 @@ SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y) if (surface->format->format != SDL_PIXELFORMAT_ARGB8888) { temp = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_ARGB8888, 0); - if (!temp) { + if (temp == NULL) { return NULL; } surface = temp; @@ -1338,8 +1302,7 @@ SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y) return cursor; } -SDL_Cursor * -SDL_CreateSystemCursor(SDL_SystemCursor id) +SDL_Cursor *SDL_CreateSystemCursor(SDL_SystemCursor id) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Cursor *cursor; @@ -1362,11 +1325,15 @@ SDL_CreateSystemCursor(SDL_SystemCursor id) if this is desired for any reason. This is used when setting the video mode and when the SDL window gains the mouse focus. */ -void -SDL_SetCursor(SDL_Cursor * cursor) +void SDL_SetCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); + /* Return immediately if setting the cursor to the currently set one (fixes #7151) */ + if (cursor == mouse->cur_cursor) { + return; + } + /* Set the new cursor */ if (cursor) { /* Make sure the cursor is still valid for this mouse */ @@ -1377,7 +1344,7 @@ SDL_SetCursor(SDL_Cursor * cursor) break; } } - if (!found) { + if (found == NULL) { SDL_SetError("Cursor not associated with the current mouse"); return; } @@ -1402,35 +1369,32 @@ SDL_SetCursor(SDL_Cursor * cursor) } } -SDL_Cursor * -SDL_GetCursor(void) +SDL_Cursor *SDL_GetCursor(void) { SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse) { + if (mouse == NULL) { return NULL; } return mouse->cur_cursor; } -SDL_Cursor * -SDL_GetDefaultCursor(void) +SDL_Cursor *SDL_GetDefaultCursor(void) { SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse) { + if (mouse == NULL) { return NULL; } return mouse->def_cursor; } -void -SDL_FreeCursor(SDL_Cursor * cursor) +void SDL_FreeCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Cursor *curr, *prev; - if (!cursor) { + if (cursor == NULL) { return; } @@ -1458,13 +1422,12 @@ SDL_FreeCursor(SDL_Cursor * cursor) } } -int -SDL_ShowCursor(int toggle) +int SDL_ShowCursor(int toggle) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_bool shown; - if (!mouse) { + if (mouse == NULL) { return 0; } diff --git a/modules/SDL2/src/events/SDL_mouse_c.h b/modules/SDL2/src/events/SDL_mouse_c.h index bcc94a0..64e82ab 100644 --- a/modules/SDL2/src/events/SDL_mouse_c.h +++ b/modules/SDL2/src/events/SDL_mouse_c.h @@ -49,34 +49,34 @@ typedef struct typedef struct { /* Create a cursor from a surface */ - SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y); + SDL_Cursor *(*CreateCursor)(SDL_Surface *surface, int hot_x, int hot_y); /* Create a system cursor */ - SDL_Cursor *(*CreateSystemCursor) (SDL_SystemCursor id); + SDL_Cursor *(*CreateSystemCursor)(SDL_SystemCursor id); /* Show the specified cursor, or hide if cursor is NULL */ - int (*ShowCursor) (SDL_Cursor * cursor); + int (*ShowCursor)(SDL_Cursor *cursor); /* This is called when a mouse motion event occurs */ - void (*MoveCursor) (SDL_Cursor * cursor); + void (*MoveCursor)(SDL_Cursor *cursor); /* Free a window manager cursor */ - void (*FreeCursor) (SDL_Cursor * cursor); + void (*FreeCursor)(SDL_Cursor *cursor); /* Warp the mouse to (x,y) within a window */ - void (*WarpMouse) (SDL_Window * window, int x, int y); + void (*WarpMouse)(SDL_Window *window, int x, int y); /* Warp the mouse to (x,y) in screen space */ - int (*WarpMouseGlobal) (int x, int y); + int (*WarpMouseGlobal)(int x, int y); /* Set relative mode */ - int (*SetRelativeMouseMode) (SDL_bool enabled); + int (*SetRelativeMouseMode)(SDL_bool enabled); /* Set mouse capture */ - int (*CaptureMouse) (SDL_Window * window); + int (*CaptureMouse)(SDL_Window *window); /* Get absolute mouse coordinates. (x) and (y) are never NULL and set to zero before call. */ - Uint32 (*GetGlobalMouseState) (int *x, int *y); + Uint32 (*GetGlobalMouseState)(int *x, int *y); /* Data common to all mice */ SDL_MouseID mouseID; @@ -85,7 +85,7 @@ typedef struct int y; int xdelta; int ydelta; - int last_x, last_y; /* the last reported x and y coordinates */ + int last_x, last_y; /* the last reported x and y coordinates */ float accumulated_wheel_x; float accumulated_wheel_y; SDL_bool has_position; @@ -130,7 +130,6 @@ typedef struct void *driverdata; } SDL_Mouse; - /* Initialize the mouse subsystem */ extern int SDL_MouseInit(void); @@ -138,10 +137,10 @@ extern int SDL_MouseInit(void); SDL_Mouse *SDL_GetMouse(void); /* Set the default mouse cursor */ -extern void SDL_SetDefaultCursor(SDL_Cursor * cursor); +extern void SDL_SetDefaultCursor(SDL_Cursor *cursor); /* Set the mouse focus window */ -extern void SDL_SetMouseFocus(SDL_Window * window); +extern void SDL_SetMouseFocus(SDL_Window *window); /* Update the mouse capture window */ extern int SDL_UpdateMouseCapture(SDL_bool force_release); @@ -150,16 +149,16 @@ extern int SDL_UpdateMouseCapture(SDL_bool force_release); extern int SDL_SetMouseSystemScale(int num_values, const float *values); /* Send a mouse motion event */ -extern int SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y); +extern int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y); /* Send a mouse button event */ -extern int SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button); +extern int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button); /* Send a mouse button event with a click count */ -extern int SDL_SendMouseButtonClicks(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks); +extern int SDL_SendMouseButtonClicks(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button, int clicks); /* Send a mouse wheel event */ -extern int SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction); +extern int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction); /* Warp the mouse within the window, potentially overriding relative mode */ extern void SDL_PerformWarpMouseInWindow(SDL_Window *window, int x, int y, SDL_bool ignore_relative_mode); diff --git a/modules/SDL2/src/events/SDL_quit.c b/modules/SDL2/src/events/SDL_quit.c index 42c5714..dba801a 100644 --- a/modules/SDL2/src/events/SDL_quit.c +++ b/modules/SDL2/src/events/SDL_quit.c @@ -47,11 +47,10 @@ static SDL_bool send_backgrounding_pending = SDL_FALSE; static SDL_bool send_foregrounding_pending = SDL_FALSE; #endif -static void -SDL_HandleSIG(int sig) +static void SDL_HandleSIG(int sig) { /* Reset the signal handler */ - signal(sig, SDL_HandleSIG); + (void)signal(sig, SDL_HandleSIG); /* Send a quit event next time the event loop pumps. */ /* We can't send it in signal handler; SDL_malloc() might be interrupted! */ @@ -59,54 +58,52 @@ SDL_HandleSIG(int sig) send_quit_pending = SDL_TRUE; } - #ifdef SDL_BACKGROUNDING_SIGNAL +#ifdef SDL_BACKGROUNDING_SIGNAL else if (sig == SDL_BACKGROUNDING_SIGNAL) { send_backgrounding_pending = SDL_TRUE; } - #endif +#endif - #ifdef SDL_FOREGROUNDING_SIGNAL +#ifdef SDL_FOREGROUNDING_SIGNAL else if (sig == SDL_FOREGROUNDING_SIGNAL) { send_foregrounding_pending = SDL_TRUE; } - #endif +#endif } -static void -SDL_EventSignal_Init(const int sig) +static void SDL_EventSignal_Init(const int sig) { #ifdef HAVE_SIGACTION struct sigaction action; sigaction(sig, NULL, &action); #ifdef HAVE_SA_SIGACTION - if ( action.sa_handler == SIG_DFL && (void (*)(int))action.sa_sigaction == SIG_DFL ) { + if (action.sa_handler == SIG_DFL && (void (*)(int))action.sa_sigaction == SIG_DFL) { #else - if ( action.sa_handler == SIG_DFL ) { + if (action.sa_handler == SIG_DFL) { #endif action.sa_handler = SDL_HandleSIG; sigaction(sig, &action, NULL); } #elif HAVE_SIGNAL_H - void (*ohandler) (int) = signal(sig, SDL_HandleSIG); + void (*ohandler)(int) = signal(sig, SDL_HandleSIG); if (ohandler != SIG_DFL) { signal(sig, ohandler); } #endif } -static void -SDL_EventSignal_Quit(const int sig) +static void SDL_EventSignal_Quit(const int sig) { #ifdef HAVE_SIGACTION struct sigaction action; sigaction(sig, NULL, &action); - if ( action.sa_handler == SDL_HandleSIG ) { + if (action.sa_handler == SDL_HandleSIG) { action.sa_handler = SIG_DFL; sigaction(sig, &action, NULL); } #elif HAVE_SIGNAL_H - void (*ohandler) (int) = signal(sig, SIG_DFL); + void (*ohandler)(int) = signal(sig, SIG_DFL); if (ohandler != SDL_HandleSIG) { signal(sig, ohandler); } @@ -114,44 +111,41 @@ SDL_EventSignal_Quit(const int sig) } /* Public functions */ -static int -SDL_QuitInit_Internal(void) +static int SDL_QuitInit_Internal(void) { /* Both SIGINT and SIGTERM are translated into quit interrupts */ /* and SDL can be built to simulate iOS/Android semantics with arbitrary signals. */ SDL_EventSignal_Init(SIGINT); SDL_EventSignal_Init(SIGTERM); - #ifdef SDL_BACKGROUNDING_SIGNAL +#ifdef SDL_BACKGROUNDING_SIGNAL SDL_EventSignal_Init(SDL_BACKGROUNDING_SIGNAL); - #endif +#endif - #ifdef SDL_FOREGROUNDING_SIGNAL +#ifdef SDL_FOREGROUNDING_SIGNAL SDL_EventSignal_Init(SDL_FOREGROUNDING_SIGNAL); - #endif +#endif /* That's it! */ return 0; } -static void -SDL_QuitQuit_Internal(void) +static void SDL_QuitQuit_Internal(void) { SDL_EventSignal_Quit(SIGINT); SDL_EventSignal_Quit(SIGTERM); - #ifdef SDL_BACKGROUNDING_SIGNAL +#ifdef SDL_BACKGROUNDING_SIGNAL SDL_EventSignal_Quit(SDL_BACKGROUNDING_SIGNAL); - #endif +#endif - #ifdef SDL_FOREGROUNDING_SIGNAL +#ifdef SDL_FOREGROUNDING_SIGNAL SDL_EventSignal_Quit(SDL_FOREGROUNDING_SIGNAL); - #endif +#endif } #endif -int -SDL_QuitInit(void) +int SDL_QuitInit(void) { #ifdef HAVE_SIGNAL_SUPPORT if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, SDL_FALSE)) { @@ -161,8 +155,7 @@ SDL_QuitInit(void) return 0; } -void -SDL_QuitQuit(void) +void SDL_QuitQuit(void) { #ifdef HAVE_SIGNAL_SUPPORT if (!disable_signals) { @@ -171,8 +164,7 @@ SDL_QuitQuit(void) #endif } -void -SDL_SendPendingSignalEvents(void) +void SDL_SendPendingSignalEvents(void) { #ifdef HAVE_SIGNAL_SUPPORT if (send_quit_pending) { @@ -180,25 +172,24 @@ SDL_SendPendingSignalEvents(void) SDL_assert(!send_quit_pending); } - #ifdef SDL_BACKGROUNDING_SIGNAL +#ifdef SDL_BACKGROUNDING_SIGNAL if (send_backgrounding_pending) { send_backgrounding_pending = SDL_FALSE; SDL_OnApplicationWillResignActive(); } - #endif +#endif - #ifdef SDL_FOREGROUNDING_SIGNAL +#ifdef SDL_FOREGROUNDING_SIGNAL if (send_foregrounding_pending) { send_foregrounding_pending = SDL_FALSE; SDL_OnApplicationDidBecomeActive(); } - #endif +#endif #endif } /* This function returns 1 if it's okay to close the application window */ -int -SDL_SendQuit(void) +int SDL_SendQuit(void) { #ifdef HAVE_SIGNAL_SUPPORT send_quit_pending = SDL_FALSE; diff --git a/modules/SDL2/src/events/SDL_touch.c b/modules/SDL2/src/events/SDL_touch.c index d8210d5..cff41b0 100644 --- a/modules/SDL2/src/events/SDL_touch.c +++ b/modules/SDL2/src/events/SDL_touch.c @@ -26,7 +26,6 @@ #include "SDL_events_c.h" #include "../video/SDL_sysvideo.h" - static int SDL_num_touch = 0; static SDL_Touch **SDL_touchDevices = NULL; @@ -37,24 +36,21 @@ static SDL_Touch **SDL_touchDevices = NULL; #if SYNTHESIZE_TOUCH_TO_MOUSE static SDL_bool finger_touching = SDL_FALSE; static SDL_FingerID track_fingerid; -static SDL_TouchID track_touchid; +static SDL_TouchID track_touchid; #endif /* Public functions */ -int -SDL_TouchInit(void) +int SDL_TouchInit(void) { - return (0); + return 0; } -int -SDL_GetNumTouchDevices(void) +int SDL_GetNumTouchDevices(void) { return SDL_num_touch; } -SDL_TouchID -SDL_GetTouchDevice(int index) +SDL_TouchID SDL_GetTouchDevice(int index) { if (index < 0 || index >= SDL_num_touch) { SDL_SetError("Unknown touch device index %d", index); @@ -63,8 +59,7 @@ SDL_GetTouchDevice(int index) return SDL_touchDevices[index]->id; } -const char* -SDL_GetTouchName(int index) +const char *SDL_GetTouchName(int index) { if (index < 0 || index >= SDL_num_touch) { SDL_SetError("Unknown touch device"); @@ -73,8 +68,7 @@ SDL_GetTouchName(int index) return SDL_touchDevices[index]->name; } -static int -SDL_GetTouchIndex(SDL_TouchID id) +static int SDL_GetTouchIndex(SDL_TouchID id) { int index; SDL_Touch *touch; @@ -88,24 +82,22 @@ SDL_GetTouchIndex(SDL_TouchID id) return -1; } -SDL_Touch * -SDL_GetTouch(SDL_TouchID id) +SDL_Touch *SDL_GetTouch(SDL_TouchID id) { int index = SDL_GetTouchIndex(id); if (index < 0 || index >= SDL_num_touch) { if (SDL_GetVideoDevice()->ResetTouch != NULL) { - SDL_SetError("Unknown touch id %d, resetting", (int) id); + SDL_SetError("Unknown touch id %d, resetting", (int)id); (SDL_GetVideoDevice()->ResetTouch)(SDL_GetVideoDevice()); } else { - SDL_SetError("Unknown touch device id %d, cannot reset", (int) id); + SDL_SetError("Unknown touch device id %d, cannot reset", (int)id); } return NULL; } return SDL_touchDevices[index]; } -SDL_TouchDeviceType -SDL_GetTouchDeviceType(SDL_TouchID id) +SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID id) { SDL_Touch *touch = SDL_GetTouch(id); if (touch) { @@ -114,8 +106,7 @@ SDL_GetTouchDeviceType(SDL_TouchID id) return SDL_TOUCH_DEVICE_INVALID; } -static int -SDL_GetFingerIndex(const SDL_Touch * touch, SDL_FingerID fingerid) +static int SDL_GetFingerIndex(const SDL_Touch *touch, SDL_FingerID fingerid) { int index; for (index = 0; index < touch->num_fingers; ++index) { @@ -126,8 +117,7 @@ SDL_GetFingerIndex(const SDL_Touch * touch, SDL_FingerID fingerid) return -1; } -static SDL_Finger * -SDL_GetFinger(const SDL_Touch * touch, SDL_FingerID id) +static SDL_Finger *SDL_GetFinger(const SDL_Touch *touch, SDL_FingerID id) { int index = SDL_GetFingerIndex(touch, id); if (index < 0 || index >= touch->num_fingers) { @@ -136,8 +126,7 @@ SDL_GetFinger(const SDL_Touch * touch, SDL_FingerID id) return touch->fingers[index]; } -int -SDL_GetNumTouchFingers(SDL_TouchID touchID) +int SDL_GetNumTouchFingers(SDL_TouchID touchID) { SDL_Touch *touch = SDL_GetTouch(touchID); if (touch) { @@ -146,11 +135,10 @@ SDL_GetNumTouchFingers(SDL_TouchID touchID) return 0; } -SDL_Finger * -SDL_GetTouchFinger(SDL_TouchID touchID, int index) +SDL_Finger *SDL_GetTouchFinger(SDL_TouchID touchID, int index) { SDL_Touch *touch = SDL_GetTouch(touchID); - if (!touch) { + if (touch == NULL) { return NULL; } if (index < 0 || index >= touch->num_fingers) { @@ -160,8 +148,7 @@ SDL_GetTouchFinger(SDL_TouchID touchID, int index) return touch->fingers[index]; } -int -SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name) +int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name) { SDL_Touch **touchDevices; int index; @@ -172,16 +159,16 @@ SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name) } /* Add the touch to the list of touch */ - touchDevices = (SDL_Touch **) SDL_realloc(SDL_touchDevices, - (SDL_num_touch + 1) * sizeof(*touchDevices)); - if (!touchDevices) { + touchDevices = (SDL_Touch **)SDL_realloc(SDL_touchDevices, + (SDL_num_touch + 1) * sizeof(*touchDevices)); + if (touchDevices == NULL) { return SDL_OutOfMemory(); } SDL_touchDevices = touchDevices; index = SDL_num_touch; - SDL_touchDevices[index] = (SDL_Touch *) SDL_malloc(sizeof(*SDL_touchDevices[index])); + SDL_touchDevices[index] = (SDL_Touch *)SDL_malloc(sizeof(*SDL_touchDevices[index])); if (!SDL_touchDevices[index]) { return SDL_OutOfMemory(); } @@ -204,15 +191,14 @@ SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name) return index; } -static int -SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure) +static int SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure) { SDL_Finger *finger; if (touch->num_fingers == touch->max_fingers) { SDL_Finger **new_fingers; - new_fingers = (SDL_Finger **)SDL_realloc(touch->fingers, (touch->max_fingers+1)*sizeof(*touch->fingers)); - if (!new_fingers) { + new_fingers = (SDL_Finger **)SDL_realloc(touch->fingers, (touch->max_fingers + 1) * sizeof(*touch->fingers)); + if (new_fingers == NULL) { return SDL_OutOfMemory(); } touch->fingers = new_fingers; @@ -231,8 +217,7 @@ SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float p return 0; } -static int -SDL_DelFinger(SDL_Touch* touch, SDL_FingerID fingerid) +static int SDL_DelFinger(SDL_Touch *touch, SDL_FingerID fingerid) { SDL_Finger *temp; @@ -248,16 +233,15 @@ SDL_DelFinger(SDL_Touch* touch, SDL_FingerID fingerid) return 0; } -int -SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, - SDL_bool down, float x, float y, float pressure) +int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, + SDL_bool down, float x, float y, float pressure) { int posted; SDL_Finger *finger; SDL_Mouse *mouse; - SDL_Touch* touch = SDL_GetTouch(id); - if (!touch) { + SDL_Touch *touch = SDL_GetTouch(id); + if (touch == NULL) { return -1; } @@ -268,7 +252,7 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, /* SDL_HINT_VITA_TOUCH_MOUSE_DEVICE: controlling which touchpad should generate synthetic mouse events, PSVita-only */ { #if defined(__vita__) - if (mouse->touch_mouse_events && ((mouse->vita_touch_mouse_device == id) || (mouse->vita_touch_mouse_device == 2)) ) { + if (mouse->touch_mouse_events && ((mouse->vita_touch_mouse_device == id) || (mouse->vita_touch_mouse_device == 2))) { #else if (mouse->touch_mouse_events) { #endif @@ -279,10 +263,18 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, if (finger_touching == SDL_FALSE) { int pos_x = (int)(x * (float)window->w); int pos_y = (int)(y * (float)window->h); - if (pos_x < 0) pos_x = 0; - if (pos_x > window->w - 1) pos_x = window->w - 1; - if (pos_y < 0) pos_y = 0; - if (pos_y > window->h - 1) pos_y = window->h - 1; + if (pos_x < 0) { + pos_x = 0; + } + if (pos_x > window->w - 1) { + pos_x = window->w - 1; + } + if (pos_y < 0) { + pos_y = 0; + } + if (pos_y > window->h - 1) { + pos_y = window->h - 1; + } SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y); SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT); } @@ -342,7 +334,7 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, posted = (SDL_PushEvent(&event) > 0); } } else { - if (!finger) { + if (finger == NULL) { /* This finger is already up */ return 0; } @@ -368,9 +360,8 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, return posted; } -int -SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, - float x, float y, float pressure) +int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, + float x, float y, float pressure) { SDL_Touch *touch; SDL_Finger *finger; @@ -379,7 +370,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, float xrel, yrel, prel; touch = SDL_GetTouch(id); - if (!touch) { + if (touch == NULL) { return -1; } @@ -394,10 +385,18 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, if (finger_touching == SDL_TRUE && track_touchid == id && track_fingerid == fingerid) { int pos_x = (int)(x * (float)window->w); int pos_y = (int)(y * (float)window->h); - if (pos_x < 0) pos_x = 0; - if (pos_x > window->w - 1) pos_x = window->w - 1; - if (pos_y < 0) pos_y = 0; - if (pos_y > window->h - 1) pos_y = window->h - 1; + if (pos_x < 0) { + pos_x = 0; + } + if (pos_x > window->w - 1) { + pos_x = window->w - 1; + } + if (pos_y < 0) { + pos_y = 0; + } + if (pos_y > window->h - 1) { + pos_y = window->h - 1; + } SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y); } } @@ -413,8 +412,8 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, } } - finger = SDL_GetFinger(touch,fingerid); - if (!finger) { + finger = SDL_GetFinger(touch, fingerid); + if (finger == NULL) { return SDL_SendTouch(id, fingerid, window, SDL_TRUE, x, y, pressure); } @@ -453,8 +452,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, return posted; } -void -SDL_DelTouch(SDL_TouchID id) +void SDL_DelTouch(SDL_TouchID id) { int i, index; SDL_Touch *touch; @@ -466,7 +464,7 @@ SDL_DelTouch(SDL_TouchID id) index = SDL_GetTouchIndex(id); touch = SDL_GetTouch(id); - if (!touch) { + if (touch == NULL) { return; } @@ -484,12 +482,11 @@ SDL_DelTouch(SDL_TouchID id) SDL_GestureDelTouch(id); } -void -SDL_TouchQuit(void) +void SDL_TouchQuit(void) { int i; - for (i = SDL_num_touch; i--; ) { + for (i = SDL_num_touch; i--;) { SDL_DelTouch(SDL_touchDevices[i]->id); } SDL_assert(SDL_num_touch == 0); diff --git a/modules/SDL2/src/events/SDL_touch_c.h b/modules/SDL2/src/events/SDL_touch_c.h index 479f4ee..1ece04c 100644 --- a/modules/SDL2/src/events/SDL_touch_c.h +++ b/modules/SDL2/src/events/SDL_touch_c.h @@ -30,11 +30,10 @@ typedef struct SDL_Touch SDL_TouchDeviceType type; int num_fingers; int max_fingers; - SDL_Finger** fingers; + SDL_Finger **fingers; char *name; } SDL_Touch; - /* Initialize the touch subsystem */ extern int SDL_TouchInit(void); @@ -45,11 +44,11 @@ extern int SDL_AddTouch(SDL_TouchID id, SDL_TouchDeviceType type, const char *na extern SDL_Touch *SDL_GetTouch(SDL_TouchID id); /* Send a touch down/up event for a touch */ -extern int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, +extern int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, SDL_bool down, float x, float y, float pressure); /* Send a touch motion event for a touch */ -extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window * window, +extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, float x, float y, float pressure); /* Remove a touch */ diff --git a/modules/SDL2/src/events/SDL_windowevents.c b/modules/SDL2/src/events/SDL_windowevents.c index 7a27773..800c8aa 100644 --- a/modules/SDL2/src/events/SDL_windowevents.c +++ b/modules/SDL2/src/events/SDL_windowevents.c @@ -33,10 +33,9 @@ typedef struct RemovePendingSizeChangedAndResizedEvents_Data SDL_bool saw_resized; } RemovePendingSizeChangedAndResizedEvents_Data; -static int SDLCALL -RemovePendingSizeChangedAndResizedEvents(void *_userdata, SDL_Event *event) +static int SDLCALL RemovePendingSizeChangedAndResizedEvents(void *_userdata, SDL_Event *event) { - RemovePendingSizeChangedAndResizedEvents_Data *userdata = (RemovePendingSizeChangedAndResizedEvents_Data *) _userdata; + RemovePendingSizeChangedAndResizedEvents_Data *userdata = (RemovePendingSizeChangedAndResizedEvents_Data *)_userdata; const SDL_Event *new_event = userdata->new_event; if (event->type == SDL_WINDOWEVENT && @@ -54,8 +53,7 @@ RemovePendingSizeChangedAndResizedEvents(void *_userdata, SDL_Event *event) return 1; } -static int SDLCALL -RemovePendingMoveEvents(void * userdata, SDL_Event *event) +static int SDLCALL RemovePendingMoveEvents(void *userdata, SDL_Event *event) { SDL_Event *new_event = (SDL_Event *)userdata; @@ -68,8 +66,7 @@ RemovePendingMoveEvents(void * userdata, SDL_Event *event) return 1; } -static int SDLCALL -RemovePendingExposedEvents(void * userdata, SDL_Event *event) +static int SDLCALL RemovePendingExposedEvents(void *userdata, SDL_Event *event) { SDL_Event *new_event = (SDL_Event *)userdata; @@ -82,13 +79,12 @@ RemovePendingExposedEvents(void * userdata, SDL_Event *event) return 1; } -int -SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, - int data2) +int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, + int data2) { int posted; - if (!window) { + if (window == NULL) { return 0; } switch (windowevent) { @@ -205,12 +201,12 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, userdata.new_event = &event; userdata.saw_resized = SDL_FALSE; SDL_FilterEvents(RemovePendingSizeChangedAndResizedEvents, &userdata); - if (userdata.saw_resized) { /* if there was a pending resize, make sure one at the new dimensions remains. */ + if (userdata.saw_resized) { /* if there was a pending resize, make sure one at the new dimensions remains. */ event.window.event = SDL_WINDOWEVENT_RESIZED; if (SDL_PushEvent(&event) <= 0) { - return 0; /* oh well. */ + return 0; /* oh well. */ } - event.window.event = SDL_WINDOWEVENT_SIZE_CHANGED; /* then push the actual event next. */ + event.window.event = SDL_WINDOWEVENT_SIZE_CHANGED; /* then push the actual event next. */ } } if (windowevent == SDL_WINDOWEVENT_MOVED) { @@ -223,9 +219,9 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, } if (windowevent == SDL_WINDOWEVENT_CLOSE) { - if ( !window->prev && !window->next ) { + if (!window->prev && !window->next) { if (SDL_GetHintBoolean(SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE, SDL_TRUE)) { - SDL_SendQuit(); /* This is the last window in the list so send the SDL_QUIT event */ + SDL_SendQuit(); /* This is the last window in the list so send the SDL_QUIT event */ } } } diff --git a/modules/SDL2/src/events/SDL_windowevents_c.h b/modules/SDL2/src/events/SDL_windowevents_c.h index b5053fc..fa2c353 100644 --- a/modules/SDL2/src/events/SDL_windowevents_c.h +++ b/modules/SDL2/src/events/SDL_windowevents_c.h @@ -23,7 +23,7 @@ #ifndef SDL_windowevents_c_h_ #define SDL_windowevents_c_h_ -extern int SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, +extern int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2); #endif /* SDL_windowevents_c_h_ */ diff --git a/modules/SDL2/src/events/blank_cursor.h b/modules/SDL2/src/events/blank_cursor.h index 232c47d..020474b 100644 --- a/modules/SDL2/src/events/blank_cursor.h +++ b/modules/SDL2/src/events/blank_cursor.h @@ -22,10 +22,10 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A default blank 8x8 cursor */ -#define BLANK_CWIDTH 8 -#define BLANK_CHEIGHT 8 -#define BLANK_CHOTX 0 -#define BLANK_CHOTY 0 +#define BLANK_CWIDTH 8 +#define BLANK_CHEIGHT 8 +#define BLANK_CHOTX 0 +#define BLANK_CHOTY 0 static const unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static const unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/modules/SDL2/src/events/scancodes_ascii.h b/modules/SDL2/src/events/scancodes_ascii.h index 3ea6f55..852370a 100644 --- a/modules/SDL2/src/events/scancodes_ascii.h +++ b/modules/SDL2/src/events/scancodes_ascii.h @@ -37,134 +37,134 @@ typedef struct } ASCIIKeyInfo; static ASCIIKeyInfo SDL_ASCIIKeyInfoTable[] = { -/* 0 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 1 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 2 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 3 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 4 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 5 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 6 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 7 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 8 */ { SDL_SCANCODE_BACKSPACE, 0 }, -/* 9 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 10 */ { SDL_SCANCODE_RETURN, 0 }, -/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 12 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 13 */ { SDL_SCANCODE_RETURN, 0 }, -/* 14 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 15 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 16 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 17 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 18 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 19 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 20 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 21 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 22 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 23 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 24 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 25 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 26 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 27 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 28 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 29 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 30 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 31 */ { SDL_SCANCODE_UNKNOWN, 0 }, -/* 32 */ { SDL_SCANCODE_SPACE, 0 }, -/* 33 */ { SDL_SCANCODE_1, KMOD_SHIFT }, /* plus shift modifier '!' */ -/* 34 */ { SDL_SCANCODE_APOSTROPHE, KMOD_SHIFT }, /* plus shift modifier '"' */ -/* 35 */ { SDL_SCANCODE_3, KMOD_SHIFT }, /* plus shift modifier '#' */ -/* 36 */ { SDL_SCANCODE_4, KMOD_SHIFT }, /* plus shift modifier '$' */ -/* 37 */ { SDL_SCANCODE_5, KMOD_SHIFT }, /* plus shift modifier '%' */ -/* 38 */ { SDL_SCANCODE_7, KMOD_SHIFT }, /* plus shift modifier '&' */ -/* 39 */ { SDL_SCANCODE_APOSTROPHE, 0 }, /* ''' */ -/* 40 */ { SDL_SCANCODE_9, KMOD_SHIFT }, /* plus shift modifier '(' */ -/* 41 */ { SDL_SCANCODE_0, KMOD_SHIFT }, /* plus shift modifier ')' */ -/* 42 */ { SDL_SCANCODE_8, KMOD_SHIFT }, /* '*' */ -/* 43 */ { SDL_SCANCODE_EQUALS, KMOD_SHIFT }, /* plus shift modifier '+' */ -/* 44 */ { SDL_SCANCODE_COMMA, 0 }, /* ',' */ -/* 45 */ { SDL_SCANCODE_MINUS, 0 }, /* '-' */ -/* 46 */ { SDL_SCANCODE_PERIOD, 0 }, /* '.' */ -/* 47 */ { SDL_SCANCODE_SLASH, 0 }, /* '/' */ -/* 48 */ { SDL_SCANCODE_0, 0 }, -/* 49 */ { SDL_SCANCODE_1, 0 }, -/* 50 */ { SDL_SCANCODE_2, 0 }, -/* 51 */ { SDL_SCANCODE_3, 0 }, -/* 52 */ { SDL_SCANCODE_4, 0 }, -/* 53 */ { SDL_SCANCODE_5, 0 }, -/* 54 */ { SDL_SCANCODE_6, 0 }, -/* 55 */ { SDL_SCANCODE_7, 0 }, -/* 56 */ { SDL_SCANCODE_8, 0 }, -/* 57 */ { SDL_SCANCODE_9, 0 }, -/* 58 */ { SDL_SCANCODE_SEMICOLON, KMOD_SHIFT }, /* plus shift modifier ';' */ -/* 59 */ { SDL_SCANCODE_SEMICOLON, 0 }, -/* 60 */ { SDL_SCANCODE_COMMA, KMOD_SHIFT }, /* plus shift modifier '<' */ -/* 61 */ { SDL_SCANCODE_EQUALS, 0 }, -/* 62 */ { SDL_SCANCODE_PERIOD, KMOD_SHIFT }, /* plus shift modifier '>' */ -/* 63 */ { SDL_SCANCODE_SLASH, KMOD_SHIFT }, /* plus shift modifier '?' */ -/* 64 */ { SDL_SCANCODE_2, KMOD_SHIFT }, /* plus shift modifier '@' */ -/* 65 */ { SDL_SCANCODE_A, KMOD_SHIFT }, /* all the following need shift modifiers */ -/* 66 */ { SDL_SCANCODE_B, KMOD_SHIFT }, -/* 67 */ { SDL_SCANCODE_C, KMOD_SHIFT }, -/* 68 */ { SDL_SCANCODE_D, KMOD_SHIFT }, -/* 69 */ { SDL_SCANCODE_E, KMOD_SHIFT }, -/* 70 */ { SDL_SCANCODE_F, KMOD_SHIFT }, -/* 71 */ { SDL_SCANCODE_G, KMOD_SHIFT }, -/* 72 */ { SDL_SCANCODE_H, KMOD_SHIFT }, -/* 73 */ { SDL_SCANCODE_I, KMOD_SHIFT }, -/* 74 */ { SDL_SCANCODE_J, KMOD_SHIFT }, -/* 75 */ { SDL_SCANCODE_K, KMOD_SHIFT }, -/* 76 */ { SDL_SCANCODE_L, KMOD_SHIFT }, -/* 77 */ { SDL_SCANCODE_M, KMOD_SHIFT }, -/* 78 */ { SDL_SCANCODE_N, KMOD_SHIFT }, -/* 79 */ { SDL_SCANCODE_O, KMOD_SHIFT }, -/* 80 */ { SDL_SCANCODE_P, KMOD_SHIFT }, -/* 81 */ { SDL_SCANCODE_Q, KMOD_SHIFT }, -/* 82 */ { SDL_SCANCODE_R, KMOD_SHIFT }, -/* 83 */ { SDL_SCANCODE_S, KMOD_SHIFT }, -/* 84 */ { SDL_SCANCODE_T, KMOD_SHIFT }, -/* 85 */ { SDL_SCANCODE_U, KMOD_SHIFT }, -/* 86 */ { SDL_SCANCODE_V, KMOD_SHIFT }, -/* 87 */ { SDL_SCANCODE_W, KMOD_SHIFT }, -/* 88 */ { SDL_SCANCODE_X, KMOD_SHIFT }, -/* 89 */ { SDL_SCANCODE_Y, KMOD_SHIFT }, -/* 90 */ { SDL_SCANCODE_Z, KMOD_SHIFT }, -/* 91 */ { SDL_SCANCODE_LEFTBRACKET, 0 }, -/* 92 */ { SDL_SCANCODE_BACKSLASH, 0 }, -/* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 }, -/* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */ -/* 95 */ { SDL_SCANCODE_MINUS, KMOD_SHIFT }, /* plus shift modifier '_' */ -/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' */ -/* 97 */ { SDL_SCANCODE_A, 0 }, -/* 98 */ { SDL_SCANCODE_B, 0 }, -/* 99 */ { SDL_SCANCODE_C, 0 }, -/* 100 */ { SDL_SCANCODE_D, 0 }, -/* 101 */ { SDL_SCANCODE_E, 0 }, -/* 102 */ { SDL_SCANCODE_F, 0 }, -/* 103 */ { SDL_SCANCODE_G, 0 }, -/* 104 */ { SDL_SCANCODE_H, 0 }, -/* 105 */ { SDL_SCANCODE_I, 0 }, -/* 106 */ { SDL_SCANCODE_J, 0 }, -/* 107 */ { SDL_SCANCODE_K, 0 }, -/* 108 */ { SDL_SCANCODE_L, 0 }, -/* 109 */ { SDL_SCANCODE_M, 0 }, -/* 110 */ { SDL_SCANCODE_N, 0 }, -/* 111 */ { SDL_SCANCODE_O, 0 }, -/* 112 */ { SDL_SCANCODE_P, 0 }, -/* 113 */ { SDL_SCANCODE_Q, 0 }, -/* 114 */ { SDL_SCANCODE_R, 0 }, -/* 115 */ { SDL_SCANCODE_S, 0 }, -/* 116 */ { SDL_SCANCODE_T, 0 }, -/* 117 */ { SDL_SCANCODE_U, 0 }, -/* 118 */ { SDL_SCANCODE_V, 0 }, -/* 119 */ { SDL_SCANCODE_W, 0 }, -/* 120 */ { SDL_SCANCODE_X, 0 }, -/* 121 */ { SDL_SCANCODE_Y, 0 }, -/* 122 */ { SDL_SCANCODE_Z, 0 }, -/* 123 */ { SDL_SCANCODE_LEFTBRACKET, KMOD_SHIFT }, /* plus shift modifier '{' */ -/* 124 */ { SDL_SCANCODE_BACKSLASH, KMOD_SHIFT }, /* plus shift modifier '|' */ -/* 125 */ { SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT }, /* plus shift modifier '}' */ -/* 126 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* plus shift modifier '~' */ -/* 127 */ { SDL_SCANCODE_BACKSPACE, KMOD_SHIFT } + /* 0 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 1 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 2 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 3 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 4 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 5 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 6 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 7 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 8 */ { SDL_SCANCODE_BACKSPACE, 0 }, + /* 9 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 10 */ { SDL_SCANCODE_RETURN, 0 }, + /* 11 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 12 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 13 */ { SDL_SCANCODE_RETURN, 0 }, + /* 14 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 15 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 16 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 17 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 18 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 19 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 20 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 21 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 22 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 23 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 24 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 25 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 26 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 27 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 28 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 29 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 30 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 31 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 32 */ { SDL_SCANCODE_SPACE, 0 }, + /* 33 */ { SDL_SCANCODE_1, KMOD_SHIFT }, /* plus shift modifier '!' */ + /* 34 */ { SDL_SCANCODE_APOSTROPHE, KMOD_SHIFT }, /* plus shift modifier '"' */ + /* 35 */ { SDL_SCANCODE_3, KMOD_SHIFT }, /* plus shift modifier '#' */ + /* 36 */ { SDL_SCANCODE_4, KMOD_SHIFT }, /* plus shift modifier '$' */ + /* 37 */ { SDL_SCANCODE_5, KMOD_SHIFT }, /* plus shift modifier '%' */ + /* 38 */ { SDL_SCANCODE_7, KMOD_SHIFT }, /* plus shift modifier '&' */ + /* 39 */ { SDL_SCANCODE_APOSTROPHE, 0 }, /* ''' */ + /* 40 */ { SDL_SCANCODE_9, KMOD_SHIFT }, /* plus shift modifier '(' */ + /* 41 */ { SDL_SCANCODE_0, KMOD_SHIFT }, /* plus shift modifier ')' */ + /* 42 */ { SDL_SCANCODE_8, KMOD_SHIFT }, /* '*' */ + /* 43 */ { SDL_SCANCODE_EQUALS, KMOD_SHIFT }, /* plus shift modifier '+' */ + /* 44 */ { SDL_SCANCODE_COMMA, 0 }, /* ',' */ + /* 45 */ { SDL_SCANCODE_MINUS, 0 }, /* '-' */ + /* 46 */ { SDL_SCANCODE_PERIOD, 0 }, /* '.' */ + /* 47 */ { SDL_SCANCODE_SLASH, 0 }, /* '/' */ + /* 48 */ { SDL_SCANCODE_0, 0 }, + /* 49 */ { SDL_SCANCODE_1, 0 }, + /* 50 */ { SDL_SCANCODE_2, 0 }, + /* 51 */ { SDL_SCANCODE_3, 0 }, + /* 52 */ { SDL_SCANCODE_4, 0 }, + /* 53 */ { SDL_SCANCODE_5, 0 }, + /* 54 */ { SDL_SCANCODE_6, 0 }, + /* 55 */ { SDL_SCANCODE_7, 0 }, + /* 56 */ { SDL_SCANCODE_8, 0 }, + /* 57 */ { SDL_SCANCODE_9, 0 }, + /* 58 */ { SDL_SCANCODE_SEMICOLON, KMOD_SHIFT }, /* plus shift modifier ';' */ + /* 59 */ { SDL_SCANCODE_SEMICOLON, 0 }, + /* 60 */ { SDL_SCANCODE_COMMA, KMOD_SHIFT }, /* plus shift modifier '<' */ + /* 61 */ { SDL_SCANCODE_EQUALS, 0 }, + /* 62 */ { SDL_SCANCODE_PERIOD, KMOD_SHIFT }, /* plus shift modifier '>' */ + /* 63 */ { SDL_SCANCODE_SLASH, KMOD_SHIFT }, /* plus shift modifier '?' */ + /* 64 */ { SDL_SCANCODE_2, KMOD_SHIFT }, /* plus shift modifier '@' */ + /* 65 */ { SDL_SCANCODE_A, KMOD_SHIFT }, /* all the following need shift modifiers */ + /* 66 */ { SDL_SCANCODE_B, KMOD_SHIFT }, + /* 67 */ { SDL_SCANCODE_C, KMOD_SHIFT }, + /* 68 */ { SDL_SCANCODE_D, KMOD_SHIFT }, + /* 69 */ { SDL_SCANCODE_E, KMOD_SHIFT }, + /* 70 */ { SDL_SCANCODE_F, KMOD_SHIFT }, + /* 71 */ { SDL_SCANCODE_G, KMOD_SHIFT }, + /* 72 */ { SDL_SCANCODE_H, KMOD_SHIFT }, + /* 73 */ { SDL_SCANCODE_I, KMOD_SHIFT }, + /* 74 */ { SDL_SCANCODE_J, KMOD_SHIFT }, + /* 75 */ { SDL_SCANCODE_K, KMOD_SHIFT }, + /* 76 */ { SDL_SCANCODE_L, KMOD_SHIFT }, + /* 77 */ { SDL_SCANCODE_M, KMOD_SHIFT }, + /* 78 */ { SDL_SCANCODE_N, KMOD_SHIFT }, + /* 79 */ { SDL_SCANCODE_O, KMOD_SHIFT }, + /* 80 */ { SDL_SCANCODE_P, KMOD_SHIFT }, + /* 81 */ { SDL_SCANCODE_Q, KMOD_SHIFT }, + /* 82 */ { SDL_SCANCODE_R, KMOD_SHIFT }, + /* 83 */ { SDL_SCANCODE_S, KMOD_SHIFT }, + /* 84 */ { SDL_SCANCODE_T, KMOD_SHIFT }, + /* 85 */ { SDL_SCANCODE_U, KMOD_SHIFT }, + /* 86 */ { SDL_SCANCODE_V, KMOD_SHIFT }, + /* 87 */ { SDL_SCANCODE_W, KMOD_SHIFT }, + /* 88 */ { SDL_SCANCODE_X, KMOD_SHIFT }, + /* 89 */ { SDL_SCANCODE_Y, KMOD_SHIFT }, + /* 90 */ { SDL_SCANCODE_Z, KMOD_SHIFT }, + /* 91 */ { SDL_SCANCODE_LEFTBRACKET, 0 }, + /* 92 */ { SDL_SCANCODE_BACKSLASH, 0 }, + /* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 }, + /* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */ + /* 95 */ { SDL_SCANCODE_MINUS, KMOD_SHIFT }, /* plus shift modifier '_' */ + /* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' */ + /* 97 */ { SDL_SCANCODE_A, 0 }, + /* 98 */ { SDL_SCANCODE_B, 0 }, + /* 99 */ { SDL_SCANCODE_C, 0 }, + /* 100 */ { SDL_SCANCODE_D, 0 }, + /* 101 */ { SDL_SCANCODE_E, 0 }, + /* 102 */ { SDL_SCANCODE_F, 0 }, + /* 103 */ { SDL_SCANCODE_G, 0 }, + /* 104 */ { SDL_SCANCODE_H, 0 }, + /* 105 */ { SDL_SCANCODE_I, 0 }, + /* 106 */ { SDL_SCANCODE_J, 0 }, + /* 107 */ { SDL_SCANCODE_K, 0 }, + /* 108 */ { SDL_SCANCODE_L, 0 }, + /* 109 */ { SDL_SCANCODE_M, 0 }, + /* 110 */ { SDL_SCANCODE_N, 0 }, + /* 111 */ { SDL_SCANCODE_O, 0 }, + /* 112 */ { SDL_SCANCODE_P, 0 }, + /* 113 */ { SDL_SCANCODE_Q, 0 }, + /* 114 */ { SDL_SCANCODE_R, 0 }, + /* 115 */ { SDL_SCANCODE_S, 0 }, + /* 116 */ { SDL_SCANCODE_T, 0 }, + /* 117 */ { SDL_SCANCODE_U, 0 }, + /* 118 */ { SDL_SCANCODE_V, 0 }, + /* 119 */ { SDL_SCANCODE_W, 0 }, + /* 120 */ { SDL_SCANCODE_X, 0 }, + /* 121 */ { SDL_SCANCODE_Y, 0 }, + /* 122 */ { SDL_SCANCODE_Z, 0 }, + /* 123 */ { SDL_SCANCODE_LEFTBRACKET, KMOD_SHIFT }, /* plus shift modifier '{' */ + /* 124 */ { SDL_SCANCODE_BACKSLASH, KMOD_SHIFT }, /* plus shift modifier '|' */ + /* 125 */ { SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT }, /* plus shift modifier '}' */ + /* 126 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* plus shift modifier '~' */ + /* 127 */ { SDL_SCANCODE_BACKSPACE, KMOD_SHIFT } }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/events/scancodes_linux.h b/modules/SDL2/src/events/scancodes_linux.h index d97157c..67737ac 100644 --- a/modules/SDL2/src/events/scancodes_linux.h +++ b/modules/SDL2/src/events/scancodes_linux.h @@ -804,7 +804,7 @@ static SDL_Scancode const linux_scancode_table[] = { function get_keyname { value=$(echo "$1" | awk '{print $3}') - fgrep KEY_ /usr/include/linux/input-event-codes.h | while read line; do + grep -F KEY_ /usr/include/linux/input-event-codes.h | while read line; do read -ra fields <<<"$line" if [ "${fields[2]}" = "$value" ]; then echo "${fields[1]}" @@ -813,7 +813,7 @@ function get_keyname done } -fgrep SDL_SCANCODE scancodes_linux.h | while read line; do +grep -F SDL_SCANCODE scancodes_linux.h | while read line; do if [ $(echo "$line" | awk '{print NF}') -eq 5 ]; then name=$(get_keyname "$line") if [ "$name" != "" ]; then @@ -832,11 +832,11 @@ function get_comment { name=$(echo "$1" | awk '{print $7}') if [ "$name" != "" ]; then - egrep "$name\s" /usr/include/linux/input-event-codes.h | fgrep "/*" | sed 's,[^/]*/,/,' + grep -E "$name\s" /usr/include/linux/input-event-codes.h | grep -F "/*" | sed 's,[^/]*/,/,' fi } -fgrep SDL_SCANCODE scancodes_linux.h | while read line; do +grep -F SDL_SCANCODE scancodes_linux.h | while read line; do comment=$(get_comment "$line") if [ "$comment" != "" ]; then echo " $line $comment" diff --git a/modules/SDL2/src/file/SDL_rwops.c b/modules/SDL2/src/file/SDL_rwops.c index 03348d0..2f66dcf 100644 --- a/modules/SDL2/src/file/SDL_rwops.c +++ b/modules/SDL2/src/file/SDL_rwops.c @@ -74,10 +74,9 @@ #define INVALID_SET_FILE_POINTER 0xFFFFFFFF #endif -#define READAHEAD_BUFFER_SIZE 1024 +#define READAHEAD_BUFFER_SIZE 1024 -static int SDLCALL -windows_file_open(SDL_RWops * context, const char *filename, const char *mode) +static int SDLCALL windows_file_open(SDL_RWops *context, const char *filename, const char *mode) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) UINT old_error_mode; @@ -87,10 +86,11 @@ windows_file_open(SDL_RWops * context, const char *filename, const char *mode) DWORD must_exist, truncate; int a_mode; - if (!context) - return -1; /* failed (invalid call) */ + if (context == NULL) { + return -1; /* failed (invalid call) */ + } - context->hidden.windowsio.h = INVALID_HANDLE_VALUE; /* mark this as unusable */ + context->hidden.windowsio.h = INVALID_HANDLE_VALUE; /* mark this as unusable */ context->hidden.windowsio.buffer.data = NULL; context->hidden.windowsio.buffer.size = 0; context->hidden.windowsio.buffer.left = 0; @@ -104,17 +104,17 @@ windows_file_open(SDL_RWops * context, const char *filename, const char *mode) must_exist = (SDL_strchr(mode, 'r') != NULL) ? OPEN_EXISTING : 0; truncate = (SDL_strchr(mode, 'w') != NULL) ? CREATE_ALWAYS : 0; - r_right = (SDL_strchr(mode, '+') != NULL - || must_exist) ? GENERIC_READ : 0; + r_right = (SDL_strchr(mode, '+') != NULL || must_exist) ? GENERIC_READ : 0; a_mode = (SDL_strchr(mode, 'a') != NULL) ? OPEN_ALWAYS : 0; - w_right = (a_mode || SDL_strchr(mode, '+') - || truncate) ? GENERIC_WRITE : 0; + w_right = (a_mode || SDL_strchr(mode, '+') || truncate) ? GENERIC_WRITE : 0; - if (!r_right && !w_right) /* inconsistent mode */ - return -1; /* failed (invalid call) */ + if (!r_right && !w_right) { + return -1; /* inconsistent mode */ + } + /* failed (invalid call) */ context->hidden.windowsio.buffer.data = - (char *) SDL_malloc(READAHEAD_BUFFER_SIZE); + (char *)SDL_malloc(READAHEAD_BUFFER_SIZE); if (!context->hidden.windowsio.buffer.data) { return SDL_OutOfMemory(); } @@ -142,20 +142,19 @@ windows_file_open(SDL_RWops * context, const char *filename, const char *mode) SDL_free(context->hidden.windowsio.buffer.data); context->hidden.windowsio.buffer.data = NULL; SDL_SetError("Couldn't open %s", filename); - return -2; /* failed (CreateFile) */ + return -2; /* failed (CreateFile) */ } context->hidden.windowsio.h = h; context->hidden.windowsio.append = a_mode ? SDL_TRUE : SDL_FALSE; - return 0; /* ok */ + return 0; /* ok */ } -static Sint64 SDLCALL -windows_file_size(SDL_RWops * context) +static Sint64 SDLCALL windows_file_size(SDL_RWops *context) { LARGE_INTEGER size; - if (!context || context->hidden.windowsio.h == INVALID_HANDLE_VALUE) { + if (context == NULL || context->hidden.windowsio.h == INVALID_HANDLE_VALUE) { return SDL_SetError("windows_file_size: invalid context/file not opened"); } @@ -166,13 +165,12 @@ windows_file_size(SDL_RWops * context) return size.QuadPart; } -static Sint64 SDLCALL -windows_file_seek(SDL_RWops * context, Sint64 offset, int whence) +static Sint64 SDLCALL windows_file_seek(SDL_RWops *context, Sint64 offset, int whence) { DWORD windowswhence; LARGE_INTEGER windowsoffset; - if (!context || context->hidden.windowsio.h == INVALID_HANDLE_VALUE) { + if (context == NULL || context->hidden.windowsio.h == INVALID_HANDLE_VALUE) { return SDL_SetError("windows_file_seek: invalid context/file not opened"); } @@ -204,7 +202,7 @@ windows_file_seek(SDL_RWops * context, Sint64 offset, int whence) } static size_t SDLCALL -windows_file_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) +windows_file_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) { size_t total_need; size_t total_read = 0; @@ -213,14 +211,14 @@ windows_file_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) total_need = size * maxnum; - if (!context || context->hidden.windowsio.h == INVALID_HANDLE_VALUE || !total_need) { + if (context == NULL || context->hidden.windowsio.h == INVALID_HANDLE_VALUE || !total_need) { return 0; } if (context->hidden.windowsio.buffer.left > 0) { - void *data = (char *) context->hidden.windowsio.buffer.data + - context->hidden.windowsio.buffer.size - - context->hidden.windowsio.buffer.left; + void *data = (char *)context->hidden.windowsio.buffer.data + + context->hidden.windowsio.buffer.size - + context->hidden.windowsio.buffer.left; read_ahead = SDL_min(total_need, context->hidden.windowsio.buffer.left); SDL_memcpy(ptr, data, read_ahead); @@ -229,37 +227,35 @@ windows_file_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) if (read_ahead == total_need) { return maxnum; } - ptr = (char *) ptr + read_ahead; + ptr = (char *)ptr + read_ahead; total_need -= read_ahead; total_read += read_ahead; } if (total_need < READAHEAD_BUFFER_SIZE) { - if (!ReadFile - (context->hidden.windowsio.h, context->hidden.windowsio.buffer.data, - READAHEAD_BUFFER_SIZE, &byte_read, NULL)) { + if (!ReadFile(context->hidden.windowsio.h, context->hidden.windowsio.buffer.data, + READAHEAD_BUFFER_SIZE, &byte_read, NULL)) { SDL_Error(SDL_EFREAD); return 0; } - read_ahead = SDL_min(total_need, (int) byte_read); + read_ahead = SDL_min(total_need, (int)byte_read); SDL_memcpy(ptr, context->hidden.windowsio.buffer.data, read_ahead); context->hidden.windowsio.buffer.size = byte_read; context->hidden.windowsio.buffer.left = byte_read - read_ahead; total_read += read_ahead; } else { - if (!ReadFile - (context->hidden.windowsio.h, ptr, (DWORD)total_need, &byte_read, NULL)) { + if (!ReadFile(context->hidden.windowsio.h, ptr, (DWORD)total_need, &byte_read, NULL)) { SDL_Error(SDL_EFREAD); return 0; } total_read += byte_read; } - return (total_read / size); + return total_read / size; } static size_t SDLCALL -windows_file_write(SDL_RWops * context, const void *ptr, size_t size, - size_t num) +windows_file_write(SDL_RWops *context, const void *ptr, size_t size, + size_t num) { size_t total_bytes; @@ -268,7 +264,7 @@ windows_file_write(SDL_RWops * context, const void *ptr, size_t size, total_bytes = size * num; - if (!context || context->hidden.windowsio.h == INVALID_HANDLE_VALUE || !size || !total_bytes) { + if (context == NULL || context->hidden.windowsio.h == INVALID_HANDLE_VALUE || !size || !total_bytes) { return 0; } @@ -281,15 +277,15 @@ windows_file_write(SDL_RWops * context, const void *ptr, size_t size, /* if in append mode, we must go to the EOF before write */ if (context->hidden.windowsio.append) { - if (SetFilePointer(context->hidden.windowsio.h, 0L, NULL, FILE_END) == - INVALID_SET_FILE_POINTER) { + LARGE_INTEGER windowsoffset; + windowsoffset.QuadPart = 0; + if (!SetFilePointerEx(context->hidden.windowsio.h, windowsoffset, &windowsoffset, FILE_END)) { SDL_Error(SDL_EFWRITE); return 0; } } - if (!WriteFile - (context->hidden.windowsio.h, ptr, (DWORD)total_bytes, &byte_written, NULL)) { + if (!WriteFile(context->hidden.windowsio.h, ptr, (DWORD)total_bytes, &byte_written, NULL)) { SDL_Error(SDL_EFWRITE); return 0; } @@ -298,14 +294,13 @@ windows_file_write(SDL_RWops * context, const void *ptr, size_t size, return nwritten; } -static int SDLCALL -windows_file_close(SDL_RWops * context) +static int SDLCALL windows_file_close(SDL_RWops *context) { if (context) { if (context->hidden.windowsio.h != INVALID_HANDLE_VALUE) { CloseHandle(context->hidden.windowsio.h); - context->hidden.windowsio.h = INVALID_HANDLE_VALUE; /* to be sure */ + context->hidden.windowsio.h = INVALID_HANDLE_VALUE; /* to be sure */ } SDL_free(context->hidden.windowsio.buffer.data); context->hidden.windowsio.buffer.data = NULL; @@ -318,12 +313,12 @@ windows_file_close(SDL_RWops * context) #ifdef HAVE_STDIO_H #ifdef HAVE_FOPEN64 -#define fopen fopen64 +#define fopen fopen64 #endif #ifdef HAVE_FSEEKO64 #define fseek_off_t off64_t -#define fseek fseeko64 -#define ftell ftello64 +#define fseek fseeko64 +#define ftell ftello64 #elif defined(HAVE_FSEEKO) #if defined(OFF_MIN) && defined(OFF_MAX) #define FSEEK_OFF_MIN OFF_MIN @@ -336,15 +331,15 @@ windows_file_close(SDL_RWops * context) * and eliminate the dead code if off_t has 64 bits. */ #define FSEEK_OFF_MAX (((((off_t)1 << (sizeof(off_t) * CHAR_BIT - 2)) - 1) << 1) + 1) -#define FSEEK_OFF_MIN (-(FSEEK_OFF_MAX) - 1) +#define FSEEK_OFF_MIN (-(FSEEK_OFF_MAX)-1) #endif #define fseek_off_t off_t -#define fseek fseeko -#define ftell ftello +#define fseek fseeko +#define ftell ftello #elif defined(HAVE__FSEEKI64) #define fseek_off_t __int64 -#define fseek _fseeki64 -#define ftell _ftelli64 +#define fseek _fseeki64 +#define ftell _ftelli64 #else #ifdef HAVE_LIMITS_H #define FSEEK_OFF_MIN LONG_MIN @@ -370,8 +365,7 @@ stdio_size(SDL_RWops * context) return size; } -static Sint64 SDLCALL -stdio_seek(SDL_RWops * context, Sint64 offset, int whence) +static Sint64 SDLCALL stdio_seek(SDL_RWops *context, Sint64 offset, int whence) { int stdiowhence; @@ -406,7 +400,7 @@ stdio_seek(SDL_RWops * context, Sint64 offset, int whence) } static size_t SDLCALL -stdio_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) +stdio_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) { size_t nread; @@ -418,7 +412,7 @@ stdio_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) } static size_t SDLCALL -stdio_write(SDL_RWops * context, const void *ptr, size_t size, size_t num) +stdio_write(SDL_RWops *context, const void *ptr, size_t size, size_t num) { size_t nwrote; @@ -429,8 +423,7 @@ stdio_write(SDL_RWops * context, const void *ptr, size_t size, size_t num) return nwrote; } -static int SDLCALL -stdio_close(SDL_RWops * context) +static int SDLCALL stdio_close(SDL_RWops *context) { int status = 0; if (context) { @@ -448,14 +441,12 @@ stdio_close(SDL_RWops * context) /* Functions to read/write memory pointers */ -static Sint64 SDLCALL -mem_size(SDL_RWops * context) +static Sint64 SDLCALL mem_size(SDL_RWops *context) { return (Sint64)(context->hidden.mem.stop - context->hidden.mem.base); } -static Sint64 SDLCALL -mem_seek(SDL_RWops * context, Sint64 offset, int whence) +static Sint64 SDLCALL mem_seek(SDL_RWops *context, Sint64 offset, int whence) { Uint8 *newpos; @@ -483,7 +474,7 @@ mem_seek(SDL_RWops * context, Sint64 offset, int whence) } static size_t SDLCALL -mem_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) +mem_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) { size_t total_bytes; size_t mem_available; @@ -501,11 +492,11 @@ mem_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum) SDL_memcpy(ptr, context->hidden.mem.here, total_bytes); context->hidden.mem.here += total_bytes; - return (total_bytes / size); + return total_bytes / size; } static size_t SDLCALL -mem_write(SDL_RWops * context, const void *ptr, size_t size, size_t num) +mem_write(SDL_RWops *context, const void *ptr, size_t size, size_t num) { if ((context->hidden.mem.here + (num * size)) > context->hidden.mem.stop) { num = (context->hidden.mem.stop - context->hidden.mem.here) / size; @@ -516,14 +507,13 @@ mem_write(SDL_RWops * context, const void *ptr, size_t size, size_t num) } static size_t SDLCALL -mem_writeconst(SDL_RWops * context, const void *ptr, size_t size, size_t num) +mem_writeconst(SDL_RWops *context, const void *ptr, size_t size, size_t num) { SDL_SetError("Can't write to read-only memory"); return 0; } -static int SDLCALL -mem_close(SDL_RWops * context) +static int SDLCALL mem_close(SDL_RWops *context) { if (context) { SDL_FreeRW(context); @@ -531,14 +521,12 @@ mem_close(SDL_RWops * context) return 0; } - /* Functions to create SDL_RWops structures from various data sources */ -SDL_RWops * -SDL_RWFromFile(const char *file, const char *mode) +SDL_RWops *SDL_RWFromFile(const char *file, const char *mode) { SDL_RWops *rwops = NULL; - if (!file || !*file || !mode || !*mode) { + if (file == NULL || !*file || mode == NULL || !*mode) { SDL_SetError("SDL_RWFromFile(): No file or no mode specified"); return NULL; } @@ -571,8 +559,10 @@ SDL_RWFromFile(const char *file, const char *mode) /* Try to open the file from the asset system */ rwops = SDL_AllocRW(); - if (!rwops) - return NULL; /* SDL_SetError already setup by SDL_AllocRW() */ + if (rwops == NULL) { + return NULL; /* SDL_SetError already setup by SDL_AllocRW() */ + } + if (Android_JNI_FileOpen(rwops, file, mode) < 0) { SDL_FreeRW(rwops); return NULL; @@ -586,8 +576,10 @@ SDL_RWFromFile(const char *file, const char *mode) #elif defined(__WIN32__) || defined(__GDK__) rwops = SDL_AllocRW(); - if (!rwops) - return NULL; /* SDL_SetError already setup by SDL_AllocRW() */ + if (rwops == NULL) { + return NULL; /* SDL_SetError already setup by SDL_AllocRW() */ + } + if (windows_file_open(rwops, file, mode) < 0) { SDL_FreeRW(rwops); return NULL; @@ -600,16 +592,16 @@ SDL_RWFromFile(const char *file, const char *mode) rwops->type = SDL_RWOPS_WINFILE; #elif HAVE_STDIO_H { - #if __APPLE__ && !SDL_FILE_DISABLED // TODO: add dummy? +#if __APPLE__ && !SDL_FILE_DISABLED // TODO: add dummy? FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode); - #elif __WINRT__ +#elif __WINRT__ FILE *fp = NULL; fopen_s(&fp, file, mode); - #elif __3DS__ +#elif __3DS__ FILE *fp = N3DS_FileOpen(file, mode); - #else +#else FILE *fp = fopen(file, mode); - #endif +#endif if (fp == NULL) { SDL_SetError("Couldn't open %s", file); } else { @@ -624,8 +616,7 @@ SDL_RWFromFile(const char *file, const char *mode) } #ifdef HAVE_STDIO_H -SDL_RWops * -SDL_RWFromFP(FILE * fp, SDL_bool autoclose) +SDL_RWops *SDL_RWFromFP(FILE * fp, SDL_bool autoclose) { SDL_RWops *rwops = NULL; @@ -643,25 +634,23 @@ SDL_RWFromFP(FILE * fp, SDL_bool autoclose) return rwops; } #else -SDL_RWops * -SDL_RWFromFP(void * fp, SDL_bool autoclose) +SDL_RWops *SDL_RWFromFP(void * fp, SDL_bool autoclose) { SDL_SetError("SDL not compiled with stdio support"); return NULL; } #endif /* HAVE_STDIO_H */ -SDL_RWops * -SDL_RWFromMem(void *mem, int size) +SDL_RWops *SDL_RWFromMem(void *mem, int size) { SDL_RWops *rwops = NULL; - if (!mem) { - SDL_InvalidParamError("mem"); - return rwops; + if (mem == NULL) { + SDL_InvalidParamError("mem"); + return rwops; } - if (!size) { - SDL_InvalidParamError("size"); - return rwops; + if (size <= 0) { + SDL_InvalidParamError("size"); + return rwops; } rwops = SDL_AllocRW(); @@ -671,7 +660,7 @@ SDL_RWFromMem(void *mem, int size) rwops->read = mem_read; rwops->write = mem_write; rwops->close = mem_close; - rwops->hidden.mem.base = (Uint8 *) mem; + rwops->hidden.mem.base = (Uint8 *)mem; rwops->hidden.mem.here = rwops->hidden.mem.base; rwops->hidden.mem.stop = rwops->hidden.mem.base + size; rwops->type = SDL_RWOPS_MEMORY; @@ -679,17 +668,16 @@ SDL_RWFromMem(void *mem, int size) return rwops; } -SDL_RWops * -SDL_RWFromConstMem(const void *mem, int size) +SDL_RWops *SDL_RWFromConstMem(const void *mem, int size) { SDL_RWops *rwops = NULL; - if (!mem) { - SDL_InvalidParamError("mem"); - return rwops; + if (mem == NULL) { + SDL_InvalidParamError("mem"); + return rwops; } - if (!size) { - SDL_InvalidParamError("size"); - return rwops; + if (size <= 0) { + SDL_InvalidParamError("size"); + return rwops; } rwops = SDL_AllocRW(); @@ -699,7 +687,7 @@ SDL_RWFromConstMem(const void *mem, int size) rwops->read = mem_read; rwops->write = mem_writeconst; rwops->close = mem_close; - rwops->hidden.mem.base = (Uint8 *) mem; + rwops->hidden.mem.base = (Uint8 *)mem; rwops->hidden.mem.here = rwops->hidden.mem.base; rwops->hidden.mem.stop = rwops->hidden.mem.base + size; rwops->type = SDL_RWOPS_MEMORY_RO; @@ -707,12 +695,11 @@ SDL_RWFromConstMem(const void *mem, int size) return rwops; } -SDL_RWops * -SDL_AllocRW(void) +SDL_RWops *SDL_AllocRW(void) { SDL_RWops *area; - area = (SDL_RWops *) SDL_malloc(sizeof *area); + area = (SDL_RWops *)SDL_malloc(sizeof(*area)); if (area == NULL) { SDL_OutOfMemory(); } else { @@ -721,22 +708,20 @@ SDL_AllocRW(void) return area; } -void -SDL_FreeRW(SDL_RWops * area) +void SDL_FreeRW(SDL_RWops *area) { SDL_free(area); } /* Load all the data from an SDL data stream */ -void * -SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, int freesrc) +void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc) { - const int FILE_CHUNK_SIZE = 1024; + static const Sint64 FILE_CHUNK_SIZE = 1024; Sint64 size; size_t size_read, size_total; void *data = NULL, *newdata; - if (!src) { + if (src == NULL) { SDL_InvalidParamError("src"); return NULL; } @@ -752,7 +737,7 @@ SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, int freesrc) if ((((Sint64)size_total) + FILE_CHUNK_SIZE) > size) { size = (size_total + FILE_CHUNK_SIZE); newdata = SDL_realloc(data, (size_t)(size + 1)); - if (!newdata) { + if (newdata == NULL) { SDL_free(data); data = NULL; SDL_OutOfMemory(); @@ -761,7 +746,7 @@ SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, int freesrc) data = newdata; } - size_read = SDL_RWread(src, (char *)data+size_total, 1, (size_t)(size-size_total)); + size_read = SDL_RWread(src, (char *)data + size_total, 1, (size_t)(size - size_total)); if (size_read == 0) { break; } @@ -780,26 +765,22 @@ done: return data; } -void * -SDL_LoadFile(const char *file, size_t *datasize) +void *SDL_LoadFile(const char *file, size_t *datasize) { - return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1); + return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1); } -Sint64 -SDL_RWsize(SDL_RWops *context) +Sint64 SDL_RWsize(SDL_RWops *context) { return context->size(context); } -Sint64 -SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence) +Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence) { return context->seek(context, offset, whence); } -Sint64 -SDL_RWtell(SDL_RWops *context) +Sint64 SDL_RWtell(SDL_RWops *context) { return context->seek(context, 0, RW_SEEK_CUR); } @@ -816,123 +797,115 @@ SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size, size_t num) return context->write(context, ptr, size, num); } -int -SDL_RWclose(SDL_RWops *context) +int SDL_RWclose(SDL_RWops *context) { return context->close(context); } /* Functions for dynamically reading and writing endian-specific values */ -Uint8 -SDL_ReadU8(SDL_RWops * src) +Uint8 SDL_ReadU8(SDL_RWops *src) { Uint8 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return value; } -Uint16 -SDL_ReadLE16(SDL_RWops * src) +Uint16 SDL_ReadLE16(SDL_RWops *src) { Uint16 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapLE16(value); } -Uint16 -SDL_ReadBE16(SDL_RWops * src) +Uint16 SDL_ReadBE16(SDL_RWops *src) { Uint16 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapBE16(value); } -Uint32 -SDL_ReadLE32(SDL_RWops * src) +Uint32 SDL_ReadLE32(SDL_RWops *src) { Uint32 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapLE32(value); } -Uint32 -SDL_ReadBE32(SDL_RWops * src) +Uint32 SDL_ReadBE32(SDL_RWops *src) { Uint32 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapBE32(value); } -Uint64 -SDL_ReadLE64(SDL_RWops * src) +Uint64 SDL_ReadLE64(SDL_RWops *src) { Uint64 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapLE64(value); } -Uint64 -SDL_ReadBE64(SDL_RWops * src) +Uint64 SDL_ReadBE64(SDL_RWops *src) { Uint64 value = 0; - SDL_RWread(src, &value, sizeof (value), 1); + SDL_RWread(src, &value, sizeof(value), 1); return SDL_SwapBE64(value); } size_t -SDL_WriteU8(SDL_RWops * dst, Uint8 value) +SDL_WriteU8(SDL_RWops *dst, Uint8 value) { - return SDL_RWwrite(dst, &value, sizeof (value), 1); + return SDL_RWwrite(dst, &value, sizeof(value), 1); } size_t -SDL_WriteLE16(SDL_RWops * dst, Uint16 value) +SDL_WriteLE16(SDL_RWops *dst, Uint16 value) { const Uint16 swapped = SDL_SwapLE16(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } size_t -SDL_WriteBE16(SDL_RWops * dst, Uint16 value) +SDL_WriteBE16(SDL_RWops *dst, Uint16 value) { const Uint16 swapped = SDL_SwapBE16(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } size_t -SDL_WriteLE32(SDL_RWops * dst, Uint32 value) +SDL_WriteLE32(SDL_RWops *dst, Uint32 value) { const Uint32 swapped = SDL_SwapLE32(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } size_t -SDL_WriteBE32(SDL_RWops * dst, Uint32 value) +SDL_WriteBE32(SDL_RWops *dst, Uint32 value) { const Uint32 swapped = SDL_SwapBE32(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } size_t -SDL_WriteLE64(SDL_RWops * dst, Uint64 value) +SDL_WriteLE64(SDL_RWops *dst, Uint64 value) { const Uint64 swapped = SDL_SwapLE64(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } size_t -SDL_WriteBE64(SDL_RWops * dst, Uint64 value) +SDL_WriteBE64(SDL_RWops *dst, Uint64 value) { const Uint64 swapped = SDL_SwapBE64(value); - return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1); + return SDL_RWwrite(dst, &swapped, sizeof(swapped), 1); } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h b/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h index 1578d32..17bc86b 100644 --- a/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h +++ b/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h @@ -25,6 +25,6 @@ #ifndef SDL_rwopsbundlesupport_h #define SDL_rwopsbundlesupport_h -FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode); +FILE *SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode); #endif #endif diff --git a/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m b/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m index 0f6cc0d..8d6ec70 100644 --- a/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m +++ b/modules/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m @@ -32,34 +32,35 @@ but we would somehow need to know what the bundle identifiers we need to search are. Also, note the bundle layouts are different for iPhone and Mac. */ -FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode) -{ @autoreleasepool +FILE *SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode) { - FILE* fp = NULL; - NSFileManager* file_manager; - NSString* resource_path; - NSString* ns_string_file_component; - NSString* full_path_with_file_to_try; + @autoreleasepool { + FILE *fp = NULL; + NSFileManager *file_manager; + NSString *resource_path; + NSString *ns_string_file_component; + NSString *full_path_with_file_to_try; - /* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */ - if(strcmp("r", mode) && strcmp("rb", mode)) { - return fopen(file, mode); - } + /* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */ + if (SDL_strchr(mode, 'r') == NULL) { + return fopen(file, mode); + } - file_manager = [NSFileManager defaultManager]; - resource_path = [[NSBundle mainBundle] resourcePath]; + file_manager = [NSFileManager defaultManager]; + resource_path = [[NSBundle mainBundle] resourcePath]; - ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; + ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; - if([file_manager fileExistsAtPath:full_path_with_file_to_try]) { - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - } else { - fp = fopen(file, mode); - } + full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; + if ([file_manager fileExistsAtPath:full_path_with_file_to_try]) { + fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); + } else { + fp = fopen(file, mode); + } - return fp; -}} + return fp; + } +} #endif /* __APPLE__ */ diff --git a/modules/SDL2/src/file/n3ds/SDL_rwopsromfs.c b/modules/SDL2/src/file/n3ds/SDL_rwopsromfs.c index fbe8be8..467bae3 100644 --- a/modules/SDL2/src/file/n3ds/SDL_rwopsromfs.c +++ b/modules/SDL2/src/file/n3ds/SDL_rwopsromfs.c @@ -23,21 +23,20 @@ #include "SDL_error.h" /* Checks if the mode is a kind of reading */ -SDL_FORCE_INLINE SDL_bool IsReadMode(const char *mode); +static SDL_bool IsReadMode(const char *mode); /* Checks if the file starts with the given prefix */ -SDL_FORCE_INLINE SDL_bool HasPrefix(const char *file, const char *prefix); +static SDL_bool HasPrefix(const char *file, const char *prefix); -SDL_FORCE_INLINE FILE *TryOpenFile(const char *file, const char *mode); -SDL_FORCE_INLINE FILE *TryOpenInRomfs(const char *file, const char *mode); +static FILE *TryOpenFile(const char *file, const char *mode); +static FILE *TryOpenInRomfs(const char *file, const char *mode); /* Nintendo 3DS applications may embed resources in the executable. The resources are stored in a special read-only partition prefixed with 'romfs:/'. As such, when opening a file, we should first try the romfs unless sdmc is specifically mentionned. */ -FILE * -N3DS_FileOpen(const char *file, const char *mode) +FILE *N3DS_FileOpen(const char *file, const char *mode) { /* romfs are read-only */ if (!IsReadMode(mode)) { @@ -52,20 +51,17 @@ N3DS_FileOpen(const char *file, const char *mode) return TryOpenFile(file, mode); } -SDL_FORCE_INLINE SDL_bool -IsReadMode(const char *mode) +static SDL_bool IsReadMode(const char *mode) { return SDL_strchr(mode, 'r') != NULL; } -SDL_FORCE_INLINE SDL_bool -HasPrefix(const char *file, const char *prefix) +static SDL_bool HasPrefix(const char *file, const char *prefix) { return SDL_strncmp(prefix, file, SDL_strlen(prefix)) == 0; } -SDL_FORCE_INLINE FILE * -TryOpenFile(const char *file, const char *mode) +static FILE *TryOpenFile(const char *file, const char *mode) { FILE *fp = NULL; @@ -77,8 +73,7 @@ TryOpenFile(const char *file, const char *mode) return fp; } -SDL_FORCE_INLINE FILE * -TryOpenInRomfs(const char *file, const char *mode) +static FILE *TryOpenInRomfs(const char *file, const char *mode) { FILE *fp = NULL; char *prefixed_filepath = NULL; diff --git a/modules/SDL2/src/filesystem/android/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/android/SDL_sysfilesystem.c index 8aab53e..9df6790 100644 --- a/modules/SDL2/src/filesystem/android/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/android/SDL_sysfilesystem.c @@ -32,22 +32,20 @@ #include "SDL_system.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { /* The current working directory is / on Android */ SDL_Unsupported(); return NULL; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { const char *path = SDL_AndroidGetInternalStoragePath(); if (path) { - size_t pathlen = SDL_strlen(path)+2; + size_t pathlen = SDL_strlen(path) + 2; char *fullpath = (char *)SDL_malloc(pathlen); - if (!fullpath) { + if (fullpath == NULL) { SDL_OutOfMemory(); return NULL; } diff --git a/modules/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m b/modules/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m index fa076ef..94ee783 100644 --- a/modules/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m +++ b/modules/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m @@ -33,107 +33,106 @@ #include "SDL_stdinc.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) -{ @autoreleasepool +char *SDL_GetBasePath(void) { - NSBundle *bundle = [NSBundle mainBundle]; - const char* baseType = [[[bundle infoDictionary] objectForKey:@"SDL_FILESYSTEM_BASE_DIR_TYPE"] UTF8String]; - const char *base = NULL; - char *retval = NULL; - - if (baseType == NULL) { - baseType = "resource"; - } - if (SDL_strcasecmp(baseType, "bundle")==0) { - base = [[bundle bundlePath] fileSystemRepresentation]; - } else if (SDL_strcasecmp(baseType, "parent")==0) { - base = [[[bundle bundlePath] stringByDeletingLastPathComponent] fileSystemRepresentation]; - } else { - /* this returns the exedir for non-bundled and the resourceDir for bundled apps */ - base = [[bundle resourcePath] fileSystemRepresentation]; - } - - if (base) { - const size_t len = SDL_strlen(base) + 2; - retval = (char *) SDL_malloc(len); - if (retval == NULL) { - SDL_OutOfMemory(); + @autoreleasepool { + NSBundle *bundle = [NSBundle mainBundle]; + const char *baseType = [[[bundle infoDictionary] objectForKey:@"SDL_FILESYSTEM_BASE_DIR_TYPE"] UTF8String]; + const char *base = NULL; + char *retval = NULL; + + if (baseType == NULL) { + baseType = "resource"; + } + if (SDL_strcasecmp(baseType, "bundle") == 0) { + base = [[bundle bundlePath] fileSystemRepresentation]; + } else if (SDL_strcasecmp(baseType, "parent") == 0) { + base = [[[bundle bundlePath] stringByDeletingLastPathComponent] fileSystemRepresentation]; } else { - SDL_snprintf(retval, len, "%s/", base); + /* this returns the exedir for non-bundled and the resourceDir for bundled apps */ + base = [[bundle resourcePath] fileSystemRepresentation]; + } + + if (base) { + const size_t len = SDL_strlen(base) + 2; + retval = (char *)SDL_malloc(len); + if (retval == NULL) { + SDL_OutOfMemory(); + } else { + SDL_snprintf(retval, len, "%s/", base); + } } - } - return retval; -}} + return retval; + } +} -char * -SDL_GetPrefPath(const char *org, const char *app) -{ @autoreleasepool +char *SDL_GetPrefPath(const char *org, const char *app) { - char *retval = NULL; - NSArray *array; + @autoreleasepool { + char *retval = NULL; + NSArray *array; - if (!app) { - SDL_InvalidParamError("app"); - return NULL; - } - if (!org) { - org = ""; - } + if (!app) { + SDL_InvalidParamError("app"); + return NULL; + } + if (!org) { + org = ""; + } #if !TARGET_OS_TV - array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); + array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); #else - /* tvOS does not have persistent local storage! - * The only place on-device where we can store data is - * a cache directory that the OS can empty at any time. - * - * It's therefore very likely that save data will be erased - * between sessions. If you want your app's save data to - * actually stick around, you'll need to use iCloud storage. - */ - { - static SDL_bool shown = SDL_FALSE; - if (!shown) + /* tvOS does not have persistent local storage! + * The only place on-device where we can store data is + * a cache directory that the OS can empty at any time. + * + * It's therefore very likely that save data will be erased + * between sessions. If you want your app's save data to + * actually stick around, you'll need to use iCloud storage. + */ { - shown = SDL_TRUE; - SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "tvOS does not have persistent local storage! Use iCloud storage if you want your data to persist between sessions.\n"); + static SDL_bool shown = SDL_FALSE; + if (!shown) { + shown = SDL_TRUE; + SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "tvOS does not have persistent local storage! Use iCloud storage if you want your data to persist between sessions.\n"); + } } - } - array = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); + array = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); #endif /* !TARGET_OS_TV */ - if ([array count] > 0) { /* we only want the first item in the list. */ - NSString *str = [array objectAtIndex:0]; - const char *base = [str fileSystemRepresentation]; - if (base) { - const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; - retval = (char *) SDL_malloc(len); - if (retval == NULL) { - SDL_OutOfMemory(); - } else { - char *ptr; - if (*org) { - SDL_snprintf(retval, len, "%s/%s/%s/", base, org, app); + if ([array count] > 0) { /* we only want the first item in the list. */ + NSString *str = [array objectAtIndex:0]; + const char *base = [str fileSystemRepresentation]; + if (base) { + const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; + retval = (char *)SDL_malloc(len); + if (retval == NULL) { + SDL_OutOfMemory(); } else { - SDL_snprintf(retval, len, "%s/%s/", base, app); - } - for (ptr = retval+1; *ptr; ptr++) { - if (*ptr == '/') { - *ptr = '\0'; - mkdir(retval, 0700); - *ptr = '/'; + char *ptr; + if (*org) { + SDL_snprintf(retval, len, "%s/%s/%s/", base, org, app); + } else { + SDL_snprintf(retval, len, "%s/%s/", base, app); } + for (ptr = retval + 1; *ptr; ptr++) { + if (*ptr == '/') { + *ptr = '\0'; + mkdir(retval, 0700); + *ptr = '/'; + } + } + mkdir(retval, 0700); } - mkdir(retval, 0700); } } - } - return retval; -}} + return retval; + } +} #endif /* SDL_FILESYSTEM_COCOA */ diff --git a/modules/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c index 7492a5d..83819ed 100644 --- a/modules/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c @@ -28,15 +28,13 @@ #include "SDL_error.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { SDL_Unsupported(); return NULL; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { SDL_Unsupported(); return NULL; diff --git a/modules/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c index 8d76457..af39e36 100644 --- a/modules/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c @@ -32,32 +32,30 @@ #include -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { char *retval = "/"; return SDL_strdup(retval); } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { const char *append = "/libsdl/"; char *retval; char *ptr = NULL; size_t len = 0; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } len = SDL_strlen(append) + SDL_strlen(org) + SDL_strlen(app) + 3; - retval = (char *) SDL_malloc(len); - if (!retval) { + retval = (char *)SDL_malloc(len); + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -68,17 +66,18 @@ SDL_GetPrefPath(const char *org, const char *app) SDL_snprintf(retval, len, "%s%s/", append, app); } - for (ptr = retval+1; *ptr; ptr++) { + for (ptr = retval + 1; *ptr; ptr++) { if (*ptr == '/') { *ptr = '\0'; - if (mkdir(retval, 0700) != 0 && errno != EEXIST) + if (mkdir(retval, 0700) != 0 && errno != EEXIST) { goto error; + } *ptr = '/'; } } if (mkdir(retval, 0700) != 0 && errno != EEXIST) { -error: + error: SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno)); SDL_free(retval); return NULL; diff --git a/modules/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc b/modules/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc index 3dfc39b..b6dc7d1 100644 --- a/modules/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc +++ b/modules/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc @@ -34,8 +34,7 @@ #include "SDL_stdinc.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { image_info info; int32 cookie = 0; @@ -57,7 +56,7 @@ SDL_GetBasePath(void) const size_t len = SDL_strlen(str); char *retval = (char *) SDL_malloc(len + 2); - if (!retval) { + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -69,19 +68,18 @@ SDL_GetBasePath(void) } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { // !!! FIXME: is there a better way to do this? const char *home = SDL_getenv("HOME"); const char *append = "/config/settings/"; size_t len = SDL_strlen(home); - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } @@ -90,7 +88,7 @@ SDL_GetPrefPath(const char *org, const char *app) } len += SDL_strlen(append) + SDL_strlen(org) + SDL_strlen(app) + 3; char *retval = (char *) SDL_malloc(len); - if (!retval) { + if (retval == NULL) { SDL_OutOfMemory(); } else { if (*org) { diff --git a/modules/SDL2/src/filesystem/n3ds/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/n3ds/SDL_sysfilesystem.c index 6286699..fe2fd3f 100644 --- a/modules/SDL2/src/filesystem/n3ds/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/n3ds/SDL_sysfilesystem.c @@ -35,15 +35,13 @@ SDL_FORCE_INLINE char *MakePrefPath(const char *app); SDL_FORCE_INLINE int CreatePrefPathDir(const char *pref); -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { char *base_path = SDL_strdup("romfs:/"); return base_path; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { char *pref_path = NULL; if (app == NULL) { diff --git a/modules/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c index 9a067aa..91e7a98 100644 --- a/modules/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c @@ -24,15 +24,13 @@ #ifdef SDL_FILESYSTEM_NACL -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { SDL_Unsupported(); return NULL; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { SDL_Unsupported(); return NULL; diff --git a/modules/SDL2/src/filesystem/os2/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/os2/SDL_sysfilesystem.c index 8eccd76..fb7d528 100644 --- a/modules/SDL2/src/filesystem/os2/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/os2/SDL_sysfilesystem.c @@ -36,8 +36,7 @@ #include -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { PTIB tib; PPIB pib; @@ -71,8 +70,7 @@ SDL_GetBasePath(void) return OS2_SysToUTF8(acBuf); } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { PSZ pszPath; CHAR acBuf[CCHMAXPATH]; diff --git a/modules/SDL2/src/filesystem/ps2/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/ps2/SDL_sysfilesystem.c index ada28f4..86dcb14 100644 --- a/modules/SDL2/src/filesystem/ps2/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/ps2/SDL_sysfilesystem.c @@ -31,76 +31,78 @@ #include "SDL_error.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { - char *retval; - size_t len; - char cwd[FILENAME_MAX]; - - getcwd(cwd, sizeof(cwd)); - len = SDL_strlen(cwd) + 1; - retval = (char *) SDL_malloc(len); - if (retval) - SDL_memcpy(retval, cwd, len); + char *retval; + size_t len; + char cwd[FILENAME_MAX]; + + getcwd(cwd, sizeof(cwd)); + len = SDL_strlen(cwd) + 1; + retval = (char *)SDL_malloc(len); + if (retval) { + SDL_memcpy(retval, cwd, len); + } - return retval; + return retval; } /* Do a recursive mkdir of parents folders */ -static void recursive_mkdir(const char *dir) { - char tmp[FILENAME_MAX]; - char *base = SDL_GetBasePath(); - char *p = NULL; - size_t len; - - snprintf(tmp, sizeof(tmp),"%s",dir); - len = strlen(tmp); - if (tmp[len - 1] == '/') - tmp[len - 1] = 0; - - for (p = tmp + 1; *p; p++) { - if (*p == '/') { - *p = 0; - // Just creating subfolders from current path - if (strstr(tmp, base) != NULL) - mkdir(tmp, S_IRWXU); - - *p = '/'; +static void recursive_mkdir(const char *dir) +{ + char tmp[FILENAME_MAX]; + char *base = SDL_GetBasePath(); + char *p = NULL; + size_t len; + + snprintf(tmp, sizeof(tmp), "%s", dir); + len = strlen(tmp); + if (tmp[len - 1] == '/') { + tmp[len - 1] = 0; } - } - free(base); - mkdir(tmp, S_IRWXU); + for (p = tmp + 1; *p; p++) { + if (*p == '/') { + *p = 0; + // Just creating subfolders from current path + if (strstr(tmp, base) != NULL) { + mkdir(tmp, S_IRWXU); + } + + *p = '/'; + } + } + + free(base); + mkdir(tmp, S_IRWXU); } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { - char *retval = NULL; - size_t len; - char *base = SDL_GetBasePath(); - if (!app) { - SDL_InvalidParamError("app"); - return NULL; - } - if(!org) { - org = ""; - } - - len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; - retval = (char *) SDL_malloc(len); - - if (*org) { - SDL_snprintf(retval, len, "%s%s/%s/", base, org, app); - } else { - SDL_snprintf(retval, len, "%s%s/", base, app); - } - free(base); - - recursive_mkdir(retval); - - return retval; + char *retval = NULL; + size_t len; + char *base = SDL_GetBasePath(); + if (app == NULL) { + SDL_InvalidParamError("app"); + return NULL; + } + if (org == NULL) { + org = ""; + } + + len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; + retval = (char *)SDL_malloc(len); + + if (*org) { + SDL_snprintf(retval, len, "%s%s/%s/", base, org, app); + } else { + SDL_snprintf(retval, len, "%s%s/", base, app); + } + free(base); + + recursive_mkdir(retval); + + return retval; } #endif /* SDL_FILESYSTEM_PS2 */ diff --git a/modules/SDL2/src/filesystem/psp/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/psp/SDL_sysfilesystem.c index 1fcab90..c163fa1 100644 --- a/modules/SDL2/src/filesystem/psp/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/psp/SDL_sysfilesystem.c @@ -31,8 +31,7 @@ #include "SDL_error.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { char *retval = NULL; size_t len; @@ -40,28 +39,27 @@ SDL_GetBasePath(void) getcwd(cwd, sizeof(cwd)); len = SDL_strlen(cwd) + 2; - retval = (char *) SDL_malloc(len); + retval = (char *)SDL_malloc(len); SDL_snprintf(retval, len, "%s/", cwd); return retval; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { char *retval = NULL; size_t len; char *base = SDL_GetBasePath(); - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if(!org) { + if (org == NULL) { org = ""; } len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; - retval = (char *) SDL_malloc(len); + retval = (char *)SDL_malloc(len); if (*org) { SDL_snprintf(retval, len, "%s%s/%s/", base, org, app); diff --git a/modules/SDL2/src/filesystem/riscos/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/riscos/SDL_sysfilesystem.c index 1cb66fb..2537340 100644 --- a/modules/SDL2/src/filesystem/riscos/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/riscos/SDL_sysfilesystem.c @@ -34,27 +34,27 @@ #include "SDL_filesystem.h" /* Wrapper around __unixify_std that uses SDL's memory allocators */ -static char * -SDL_unixify_std(const char *ro_path, char *buffer, size_t buf_len, int filetype) +static char *SDL_unixify_std(const char *ro_path, char *buffer, size_t buf_len, int filetype) { const char *const in_buf = buffer; /* = NULL if we allocate the buffer. */ - if (!buffer) { + if (buffer == NULL) { /* This matches the logic in __unixify, with an additional byte for the * extra path separator. */ buf_len = SDL_strlen(ro_path) + 14 + 1; buffer = SDL_malloc(buf_len); - if (!buffer) { + if (buffer == NULL) { SDL_OutOfMemory(); return NULL; } } if (!__unixify_std(ro_path, buffer, buf_len, filetype)) { - if (!in_buf) + if (in_buf == NULL) { SDL_free(buffer); + } SDL_SetError("Could not convert '%s' to a Unix-style path", ro_path); return NULL; @@ -72,8 +72,7 @@ SDL_unixify_std(const char *ro_path, char *buffer, size_t buf_len, int filetype) return buffer; } -static char * -canonicalisePath(const char *path, const char *pathVar) +static char *canonicalisePath(const char *path, const char *pathVar) { _kernel_oserror *error; _kernel_swi_regs regs; @@ -93,7 +92,7 @@ canonicalisePath(const char *path, const char *pathVar) regs.r[5] = 1 - regs.r[5]; buf = SDL_malloc(regs.r[5]); - if (!buf) { + if (buf == NULL) { SDL_OutOfMemory(); return NULL; } @@ -108,8 +107,7 @@ canonicalisePath(const char *path, const char *pathVar) return buf; } -static _kernel_oserror * -createDirectoryRecursive(char *path) +static _kernel_oserror *createDirectoryRecursive(char *path) { char *ptr = NULL; _kernel_oserror *error; @@ -118,20 +116,20 @@ createDirectoryRecursive(char *path) regs.r[1] = (int)path; regs.r[2] = 0; - for (ptr = path+1; *ptr; ptr++) { + for (ptr = path + 1; *ptr; ptr++) { if (*ptr == '.') { *ptr = '\0'; error = _kernel_swi(OS_File, ®s, ®s); *ptr = '.'; - if (error != NULL) + if (error != NULL) { return error; + } } } return _kernel_swi(OS_File, ®s, ®s); } -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { _kernel_swi_regs regs; _kernel_oserror *error; @@ -143,43 +141,43 @@ SDL_GetBasePath(void) } canon = canonicalisePath((const char *)regs.r[0], "Run$Path"); - if (!canon) { + if (canon == NULL) { return NULL; } /* chop off filename. */ ptr = SDL_strrchr(canon, '.'); - if (ptr != NULL) + if (ptr != NULL) { *ptr = '\0'; + } retval = SDL_unixify_std(canon, NULL, 0, __RISCOSIFY_FILETYPE_NOTSPECIFIED); SDL_free(canon); return retval; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { char *canon, *dir, *retval; size_t len; _kernel_oserror *error; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } canon = canonicalisePath("", "Run$Path"); - if (!canon) { + if (canon == NULL) { return NULL; } len = SDL_strlen(canon) + SDL_strlen(org) + SDL_strlen(app) + 4; - dir = (char *) SDL_malloc(len); - if (!dir) { + dir = (char *)SDL_malloc(len); + if (dir == NULL) { SDL_OutOfMemory(); SDL_free(canon); return NULL; diff --git a/modules/SDL2/src/filesystem/unix/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/unix/SDL_sysfilesystem.c index d80974e..42e6e48 100644 --- a/modules/SDL2/src/filesystem/unix/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/unix/SDL_sysfilesystem.c @@ -45,16 +45,14 @@ /* QNX's /proc/self/exefile is a text file and not a symlink. */ #if !defined(__QNXNTO__) -static char * -readSymLink(const char *path) +static char *readSymLink(const char *path) { char *retval = NULL; ssize_t len = 64; ssize_t rc = -1; - while (1) - { - char *ptr = (char *) SDL_realloc(retval, (size_t) len); + while (1) { + char *ptr = (char *)SDL_realloc(retval, (size_t)len); if (ptr == NULL) { SDL_OutOfMemory(); break; @@ -64,13 +62,13 @@ readSymLink(const char *path) rc = readlink(path, retval, len); if (rc == -1) { - break; /* not a symlink, i/o error, etc. */ + break; /* not a symlink, i/o error, etc. */ } else if (rc < len) { - retval[rc] = '\0'; /* readlink doesn't null-terminate. */ - return retval; /* we're good to go. */ + retval[rc] = '\0'; /* readlink doesn't null-terminate. */ + return retval; /* we're good to go. */ } - len *= 2; /* grow buffer, try again. */ + len *= 2; /* grow buffer, try again. */ } SDL_free(retval); @@ -88,13 +86,13 @@ static char *search_path_for_binary(const char *bin) char *start = envr; char *ptr; - if (!envr) { + if (envr == NULL) { SDL_SetError("No $PATH set"); return NULL; } envr = SDL_strdup(envr); - if (!envr) { + if (envr == NULL) { SDL_OutOfMemory(); return NULL; } @@ -102,10 +100,10 @@ static char *search_path_for_binary(const char *bin) SDL_assert(bin != NULL); alloc_size = SDL_strlen(bin) + SDL_strlen(envr) + 2; - exe = (char *) SDL_malloc(alloc_size); + exe = (char *)SDL_malloc(alloc_size); do { - ptr = SDL_strchr(start, ':'); /* find next $PATH separator. */ + ptr = SDL_strchr(start, ':'); /* find next $PATH separator. */ if (ptr != start) { if (ptr) { *ptr = '\0'; @@ -119,31 +117,28 @@ static char *search_path_for_binary(const char *bin) return exe; } } - start = ptr + 1; /* start points to beginning of next element. */ + start = ptr + 1; /* start points to beginning of next element. */ } while (ptr != NULL); SDL_free(envr); SDL_free(exe); SDL_SetError("Process not found in $PATH"); - return NULL; /* doesn't exist in path. */ + return NULL; /* doesn't exist in path. */ } #endif - - -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { char *retval = NULL; #if defined(__FREEBSD__) char fullpath[PATH_MAX]; - size_t buflen = sizeof (fullpath); + size_t buflen = sizeof(fullpath); const int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; if (sysctl(mib, SDL_arraysize(mib), fullpath, &buflen, NULL, 0) != -1) { retval = SDL_strdup(fullpath); - if (!retval) { + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -156,14 +151,14 @@ SDL_GetBasePath(void) const int mib[] = { CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV }; if (sysctl(mib, 4, NULL, &len, NULL, 0) != -1) { char *exe, *pwddst; - char *realpathbuf = (char *) SDL_malloc(PATH_MAX + 1); - if (!realpathbuf) { + char *realpathbuf = (char *)SDL_malloc(PATH_MAX + 1); + if (realpathbuf == NULL) { SDL_OutOfMemory(); return NULL; } cmdline = SDL_malloc(len); - if (!cmdline) { + if (cmdline == NULL) { SDL_free(realpathbuf); SDL_OutOfMemory(); return NULL; @@ -173,13 +168,13 @@ SDL_GetBasePath(void) exe = cmdline[0]; pwddst = NULL; - if (SDL_strchr(exe, '/') == NULL) { /* not a relative or absolute path, check $PATH for it */ + if (SDL_strchr(exe, '/') == NULL) { /* not a relative or absolute path, check $PATH for it */ exe = search_path_for_binary(cmdline[0]); } else { if (exe && *exe == '.') { const char *pwd = SDL_getenv("PWD"); if (pwd && *pwd) { - SDL_asprintf(&pwddst, "%s/%s", pwd, exe); + SDL_asprintf(&pwddst, "%s/%s", pwd, exe); } } } @@ -201,26 +196,16 @@ SDL_GetBasePath(void) } } - if (!retval) { + if (retval == NULL) { SDL_free(realpathbuf); } SDL_free(cmdline); } #endif -#if defined(__SOLARIS__) - const char *path = getexecname(); - if ((path != NULL) && (path[0] == '/')) { /* must be absolute path... */ - retval = SDL_strdup(path); - if (!retval) { - SDL_OutOfMemory(); - return NULL; - } - } -#endif /* is a Linux-style /proc filesystem available? */ - if (!retval && (access("/proc", F_OK) == 0)) { + if (retval == NULL && (access("/proc", F_OK) == 0)) { /* !!! FIXME: after 2.0.6 ships, let's delete this code and just use the /proc/%llu version. There's no reason to have two copies of this plus all the #ifdefs. --ryan. */ @@ -228,31 +213,46 @@ SDL_GetBasePath(void) retval = readSymLink("/proc/curproc/file"); #elif defined(__NETBSD__) retval = readSymLink("/proc/curproc/exe"); +#elif defined(__SOLARIS__) + retval = readSymLink("/proc/self/path/a.out"); #elif defined(__QNXNTO__) retval = SDL_LoadFile("/proc/self/exefile", NULL); #else - retval = readSymLink("/proc/self/exe"); /* linux. */ + retval = readSymLink("/proc/self/exe"); /* linux. */ if (retval == NULL) { /* older kernels don't have /proc/self ... try PID version... */ char path[64]; const int rc = SDL_snprintf(path, sizeof(path), - "/proc/%llu/exe", - (unsigned long long) getpid()); - if ( (rc > 0) && (rc < sizeof(path)) ) { + "/proc/%llu/exe", + (unsigned long long)getpid()); + if ((rc > 0) && (rc < sizeof(path))) { retval = readSymLink(path); } } #endif } +#if defined(__SOLARIS__) /* try this as a fallback if /proc didn't pan out */ + if (!retval) { + const char *path = getexecname(); + if ((path != NULL) && (path[0] == '/')) { /* must be absolute path... */ + retval = SDL_strdup(path); + if (!retval) { + SDL_OutOfMemory(); + return NULL; + } + } + } +#endif + /* If we had access to argv[0] here, we could check it for a path, or troll through $PATH looking for it, too. */ if (retval != NULL) { /* chop off filename. */ char *ptr = SDL_strrchr(retval, '/'); if (ptr != NULL) { - *(ptr+1) = '\0'; - } else { /* shouldn't happen, but just in case... */ + *(ptr + 1) = '\0'; + } else { /* shouldn't happen, but just in case... */ SDL_free(retval); retval = NULL; } @@ -260,16 +260,16 @@ SDL_GetBasePath(void) if (retval != NULL) { /* try to shrink buffer... */ - char *ptr = (char *) SDL_realloc(retval, SDL_strlen(retval) + 1); - if (ptr != NULL) - retval = ptr; /* oh well if it failed. */ + char *ptr = (char *)SDL_realloc(retval, SDL_strlen(retval) + 1); + if (ptr != NULL) { + retval = ptr; /* oh well if it failed. */ + } } return retval; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { /* * We use XDG's base directory spec, even if you're not on Linux. @@ -284,18 +284,18 @@ SDL_GetPrefPath(const char *org, const char *app) char *ptr = NULL; size_t len = 0; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } - if (!envr) { + if (envr == NULL) { /* You end up with "$HOME/.local/share/Game Name 2" */ envr = SDL_getenv("HOME"); - if (!envr) { + if (envr == NULL) { /* we could take heroic measures with /etc/passwd, but oh well. */ SDL_SetError("neither XDG_DATA_HOME nor HOME environment is set"); return NULL; @@ -306,32 +306,34 @@ SDL_GetPrefPath(const char *org, const char *app) } len = SDL_strlen(envr); - if (envr[len - 1] == '/') + if (envr[len - 1] == '/') { append += 1; + } len += SDL_strlen(append) + SDL_strlen(org) + SDL_strlen(app) + 3; - retval = (char *) SDL_malloc(len); - if (!retval) { + retval = (char *)SDL_malloc(len); + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } if (*org) { - SDL_snprintf(retval, len, "%s%s%s/%s/", envr, append, org, app); + (void)SDL_snprintf(retval, len, "%s%s%s/%s/", envr, append, org, app); } else { - SDL_snprintf(retval, len, "%s%s%s/", envr, append, app); + (void)SDL_snprintf(retval, len, "%s%s%s/", envr, append, app); } - for (ptr = retval+1; *ptr; ptr++) { + for (ptr = retval + 1; *ptr; ptr++) { if (*ptr == '/') { *ptr = '\0'; - if (mkdir(retval, 0700) != 0 && errno != EEXIST) + if (mkdir(retval, 0700) != 0 && errno != EEXIST) { goto error; + } *ptr = '/'; } } if (mkdir(retval, 0700) != 0 && errno != EEXIST) { -error: + error: SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno)); SDL_free(retval); return NULL; diff --git a/modules/SDL2/src/filesystem/vita/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/vita/SDL_sysfilesystem.c index ab5f954..bb57270 100644 --- a/modules/SDL2/src/filesystem/vita/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/vita/SDL_sysfilesystem.c @@ -39,35 +39,33 @@ #include "SDL_filesystem.h" #include "SDL_rwops.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { const char *basepath = "app0:/"; char *retval = SDL_strdup(basepath); return retval; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { const char *envr = "ux0:/data/"; char *retval = NULL; char *ptr = NULL; size_t len = 0; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } len = SDL_strlen(envr); len += SDL_strlen(org) + SDL_strlen(app) + 3; - retval = (char *) SDL_malloc(len); - if (!retval) { + retval = (char *)SDL_malloc(len); + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -78,7 +76,7 @@ SDL_GetPrefPath(const char *org, const char *app) SDL_snprintf(retval, len, "%s%s/", envr, app); } - for (ptr = retval+1; *ptr; ptr++) { + for (ptr = retval + 1; *ptr; ptr++) { if (*ptr == '/') { *ptr = '\0'; sceIoMkdir(retval, 0777); diff --git a/modules/SDL2/src/filesystem/windows/SDL_sysfilesystem.c b/modules/SDL2/src/filesystem/windows/SDL_sysfilesystem.c index 260d5e3..0684270 100644 --- a/modules/SDL2/src/filesystem/windows/SDL_sysfilesystem.c +++ b/modules/SDL2/src/filesystem/windows/SDL_sysfilesystem.c @@ -32,8 +32,7 @@ #include "SDL_stdinc.h" #include "SDL_filesystem.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { DWORD buflen = 128; WCHAR *path = NULL; @@ -42,14 +41,14 @@ SDL_GetBasePath(void) int i; while (SDL_TRUE) { - void *ptr = SDL_realloc(path, buflen * sizeof (WCHAR)); - if (!ptr) { + void *ptr = SDL_realloc(path, buflen * sizeof(WCHAR)); + if (ptr == NULL) { SDL_free(path); SDL_OutOfMemory(); return NULL; } - path = (WCHAR *) ptr; + path = (WCHAR *)ptr; len = GetModuleFileNameW(NULL, path, buflen); /* if it truncated, then len >= buflen - 1 */ @@ -68,14 +67,14 @@ SDL_GetBasePath(void) return NULL; } - for (i = len-1; i > 0; i--) { + for (i = len - 1; i > 0; i--) { if (path[i] == '\\') { break; } } - SDL_assert(i > 0); /* Should have been an absolute path. */ - path[i+1] = '\0'; /* chop off filename. */ + SDL_assert(i > 0); /* Should have been an absolute path. */ + path[i + 1] = '\0'; /* chop off filename. */ retval = WIN_StringToUTF8W(path); SDL_free(path); @@ -83,8 +82,7 @@ SDL_GetBasePath(void) return retval; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { /* * Vista and later has a new API for this, but SHGetFolderPath works there, @@ -96,16 +94,16 @@ SDL_GetPrefPath(const char *org, const char *app) WCHAR path[MAX_PATH]; char *retval = NULL; - WCHAR* worg = NULL; - WCHAR* wapp = NULL; + WCHAR *worg = NULL; + WCHAR *wapp = NULL; size_t new_wpath_len = 0; BOOL api_result = FALSE; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } @@ -175,20 +173,17 @@ SDL_GetPrefPath(const char *org, const char *app) #ifdef SDL_FILESYSTEM_XBOX #include "SDL_filesystem.h" #include "SDL_error.h" -char * -SDL_GetBasePath(void) +char *SDL_GetBasePath(void) { SDL_Unsupported(); return NULL; } -char * -SDL_GetPrefPath(const char *org, const char *app) +char *SDL_GetPrefPath(const char *org, const char *app) { SDL_Unsupported(); return NULL; } #endif /* SDL_FILESYSTEM_XBOX */ - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp b/modules/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp index 8ef04f2..b8ba6fd 100644 --- a/modules/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp +++ b/modules/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp @@ -21,7 +21,7 @@ #include "../../SDL_internal.h" /* TODO, WinRT: remove the need to compile this with C++/CX (/ZW) extensions, and if possible, without C++ at all -*/ + */ #ifdef __WINRT__ @@ -44,55 +44,55 @@ extern "C" const wchar_t * SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType) { switch (pathType) { - case SDL_WINRT_PATH_INSTALLED_LOCATION: - { - static wstring path; - if (path.empty()) { + case SDL_WINRT_PATH_INSTALLED_LOCATION: + { + static wstring path; + if (path.empty()) { #if defined(NTDDI_WIN10_19H1) && (NTDDI_VERSION >= NTDDI_WIN10_19H1) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) /* Only PC supports mods */ - /* Windows 1903 supports mods, via the EffectiveLocation API */ - if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) { - path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data(); - } else { - path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); - } -#else + /* Windows 1903 supports mods, via the EffectiveLocation API */ + if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) { + path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data(); + } else { path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); -#endif } - return path.c_str(); +#else + path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); +#endif } + return path.c_str(); + } - case SDL_WINRT_PATH_LOCAL_FOLDER: - { - static wstring path; - if (path.empty()) { - path = ApplicationData::Current->LocalFolder->Path->Data(); - } - return path.c_str(); + case SDL_WINRT_PATH_LOCAL_FOLDER: + { + static wstring path; + if (path.empty()) { + path = ApplicationData::Current->LocalFolder->Path->Data(); } + return path.c_str(); + } #if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION > NTDDI_WIN8) - case SDL_WINRT_PATH_ROAMING_FOLDER: - { - static wstring path; - if (path.empty()) { - path = ApplicationData::Current->RoamingFolder->Path->Data(); - } - return path.c_str(); + case SDL_WINRT_PATH_ROAMING_FOLDER: + { + static wstring path; + if (path.empty()) { + path = ApplicationData::Current->RoamingFolder->Path->Data(); } + return path.c_str(); + } - case SDL_WINRT_PATH_TEMP_FOLDER: - { - static wstring path; - if (path.empty()) { - path = ApplicationData::Current->TemporaryFolder->Path->Data(); - } - return path.c_str(); + case SDL_WINRT_PATH_TEMP_FOLDER: + { + static wstring path; + if (path.empty()) { + path = ApplicationData::Current->TemporaryFolder->Path->Data(); } + return path.c_str(); + } #endif - default: - break; + default: + break; } SDL_Unsupported(); @@ -110,12 +110,12 @@ SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType) return searchResult->second.c_str(); } - const wchar_t * ucs2Path = SDL_WinRTGetFSPathUNICODE(pathType); - if (!ucs2Path) { + const wchar_t *ucs2Path = SDL_WinRTGetFSPathUNICODE(pathType); + if (ucs2Path == NULL) { return NULL; } - char * utf8Path = WIN_StringToUTF8(ucs2Path); + char *utf8Path = WIN_StringToUTF8(ucs2Path); utf8Paths[pathType] = utf8Path; SDL_free(utf8Path); return utf8Paths[pathType].c_str(); @@ -124,18 +124,18 @@ SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType) extern "C" char * SDL_GetBasePath(void) { - const char * srcPath = SDL_WinRTGetFSPathUTF8(SDL_WINRT_PATH_INSTALLED_LOCATION); + const char *srcPath = SDL_WinRTGetFSPathUTF8(SDL_WINRT_PATH_INSTALLED_LOCATION); size_t destPathLen; - char * destPath = NULL; + char *destPath = NULL; - if (!srcPath) { + if (srcPath == NULL) { SDL_SetError("Couldn't locate our basepath: %s", SDL_GetError()); return NULL; } destPathLen = SDL_strlen(srcPath) + 2; - destPath = (char *) SDL_malloc(destPathLen); - if (!destPath) { + destPath = (char *)SDL_malloc(destPathLen); + if (destPath == NULL) { SDL_OutOfMemory(); return NULL; } @@ -153,24 +153,24 @@ SDL_GetPrefPath(const char *org, const char *app) * without violating Microsoft's app-store requirements. */ - const WCHAR * srcPath = NULL; + const WCHAR *srcPath = NULL; WCHAR path[MAX_PATH]; char *retval = NULL; - WCHAR* worg = NULL; - WCHAR* wapp = NULL; + WCHAR *worg = NULL; + WCHAR *wapp = NULL; size_t new_wpath_len = 0; BOOL api_result = FALSE; - if (!app) { + if (app == NULL) { SDL_InvalidParamError("app"); return NULL; } - if (!org) { + if (org == NULL) { org = ""; } srcPath = SDL_WinRTGetFSPathUNICODE(SDL_WINRT_PATH_LOCAL_FOLDER); - if ( ! srcPath) { + if (srcPath == NULL) { SDL_SetError("Unable to find a source path"); return NULL; } diff --git a/modules/SDL2/src/haptic/SDL_haptic.c b/modules/SDL2/src/haptic/SDL_haptic.c index 81b6ee9..ee64bcb 100644 --- a/modules/SDL2/src/haptic/SDL_haptic.c +++ b/modules/SDL2/src/haptic/SDL_haptic.c @@ -27,15 +27,14 @@ /* Global for SDL_windowshaptic.c */ #if (defined(SDL_HAPTIC_DINPUT) && SDL_HAPTIC_DINPUT) || (defined(SDL_HAPTIC_XINPUT) && SDL_HAPTIC_XINPUT) SDL_Haptic *SDL_haptics = NULL; -#else +#else static SDL_Haptic *SDL_haptics = NULL; #endif /* * Initializes the Haptic devices. */ -int -SDL_HapticInit(void) +int SDL_HapticInit(void) { int status; @@ -47,12 +46,10 @@ SDL_HapticInit(void) return status; } - /* * Checks to see if the haptic device is valid */ -static int -ValidHaptic(SDL_Haptic * haptic) +static int ValidHaptic(SDL_Haptic *haptic) { int valid; SDL_Haptic *hapticlist; @@ -60,8 +57,7 @@ ValidHaptic(SDL_Haptic * haptic) valid = 0; if (haptic != NULL) { hapticlist = SDL_haptics; - while ( hapticlist ) - { + while (hapticlist) { if (hapticlist == haptic) { valid = 1; break; @@ -78,22 +74,18 @@ ValidHaptic(SDL_Haptic * haptic) return valid; } - /* * Returns the number of available devices. */ -int -SDL_NumHaptics(void) +int SDL_NumHaptics(void) { return SDL_SYS_NumHaptics(); } - /* * Gets the name of a Haptic device by index. */ -const char * -SDL_HapticName(int device_index) +const char *SDL_HapticName(int device_index) { if ((device_index < 0) || (device_index >= SDL_NumHaptics())) { SDL_SetError("Haptic: There are %d haptic devices available", @@ -103,12 +95,10 @@ SDL_HapticName(int device_index) return SDL_SYS_HapticName(device_index); } - /* * Opens a Haptic device. */ -SDL_Haptic * -SDL_HapticOpen(int device_index) +SDL_Haptic *SDL_HapticOpen(int device_index) { SDL_Haptic *haptic; SDL_Haptic *hapticlist; @@ -121,10 +111,9 @@ SDL_HapticOpen(int device_index) hapticlist = SDL_haptics; /* If the haptic is already open, return it - * TODO: Should we create haptic instance IDs like the Joystick API? - */ - while ( hapticlist ) - { + * TODO: Should we create haptic instance IDs like the Joystick API? + */ + while (hapticlist) { if (device_index == hapticlist->index) { haptic = hapticlist; ++haptic->ref_count; @@ -134,14 +123,14 @@ SDL_HapticOpen(int device_index) } /* Create the haptic device */ - haptic = (SDL_Haptic *) SDL_malloc((sizeof *haptic)); + haptic = (SDL_Haptic *)SDL_malloc(sizeof(*haptic)); if (haptic == NULL) { SDL_OutOfMemory(); return NULL; } /* Initialize the haptic device */ - SDL_memset(haptic, 0, (sizeof *haptic)); + SDL_memset(haptic, 0, sizeof(*haptic)); haptic->rumble_id = -1; haptic->index = device_index; if (SDL_SYS_HapticOpen(haptic) < 0) { @@ -156,20 +145,20 @@ SDL_HapticOpen(int device_index) SDL_haptics = haptic; /* Disable autocenter and set gain to max. */ - if (haptic->supported & SDL_HAPTIC_GAIN) + if (haptic->supported & SDL_HAPTIC_GAIN) { SDL_HapticSetGain(haptic, 100); - if (haptic->supported & SDL_HAPTIC_AUTOCENTER) + } + if (haptic->supported & SDL_HAPTIC_AUTOCENTER) { SDL_HapticSetAutocenter(haptic, 0); + } return haptic; } - /* * Returns 1 if the device has been opened. */ -int -SDL_HapticOpened(int device_index) +int SDL_HapticOpened(int device_index) { int opened; SDL_Haptic *hapticlist; @@ -184,9 +173,8 @@ SDL_HapticOpened(int device_index) opened = 0; hapticlist = SDL_haptics; /* TODO Should this use an instance ID? */ - while ( hapticlist ) - { - if (hapticlist->index == (Uint8) device_index) { + while (hapticlist) { + if (hapticlist->index == (Uint8)device_index) { opened = 1; break; } @@ -195,12 +183,10 @@ SDL_HapticOpened(int device_index) return opened; } - /* * Returns the index to a haptic device. */ -int -SDL_HapticIndex(SDL_Haptic * haptic) +int SDL_HapticIndex(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; @@ -209,24 +195,21 @@ SDL_HapticIndex(SDL_Haptic * haptic) return haptic->index; } - /* * Returns SDL_TRUE if mouse is haptic, SDL_FALSE if it isn't. */ -int -SDL_MouseIsHaptic(void) +int SDL_MouseIsHaptic(void) { - if (SDL_SYS_HapticMouse() < 0) + if (SDL_SYS_HapticMouse() < 0) { return SDL_FALSE; + } return SDL_TRUE; } - /* * Returns the haptic device if mouse is haptic or NULL elsewise. */ -SDL_Haptic * -SDL_HapticOpenFromMouse(void) +SDL_Haptic *SDL_HapticOpenFromMouse(void) { int device_index; @@ -240,36 +223,38 @@ SDL_HapticOpenFromMouse(void) return SDL_HapticOpen(device_index); } - /* * Returns SDL_TRUE if joystick has haptic features. */ -int -SDL_JoystickIsHaptic(SDL_Joystick * joystick) +int SDL_JoystickIsHaptic(SDL_Joystick *joystick) { int ret; - /* Must be a valid joystick */ - if (!SDL_PrivateJoystickValid(joystick)) { - return -1; - } + SDL_LockJoysticks(); + { + /* Must be a valid joystick */ + if (!SDL_PrivateJoystickValid(joystick)) { + SDL_UnlockJoysticks(); + return -1; + } - ret = SDL_SYS_JoystickIsHaptic(joystick); + ret = SDL_SYS_JoystickIsHaptic(joystick); + } + SDL_UnlockJoysticks(); - if (ret > 0) + if (ret > 0) { return SDL_TRUE; - else if (ret == 0) + } else if (ret == 0) { return SDL_FALSE; - else - return -1; -} + } + return -1; +} /* * Opens a haptic device from a joystick. */ -SDL_Haptic * -SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) +SDL_Haptic *SDL_HapticOpenFromJoystick(SDL_Joystick *joystick) { SDL_Haptic *haptic; SDL_Haptic *hapticlist; @@ -281,45 +266,53 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) return NULL; } - /* Must be a valid joystick */ - if (!SDL_PrivateJoystickValid(joystick)) { - SDL_SetError("Haptic: Joystick isn't valid."); - return NULL; - } + SDL_LockJoysticks(); + { + /* Must be a valid joystick */ + if (!SDL_PrivateJoystickValid(joystick)) { + SDL_SetError("Haptic: Joystick isn't valid."); + SDL_UnlockJoysticks(); + return NULL; + } - /* Joystick must be haptic */ - if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) { - SDL_SetError("Haptic: Joystick isn't a haptic device."); - return NULL; - } + /* Joystick must be haptic */ + if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) { + SDL_SetError("Haptic: Joystick isn't a haptic device."); + SDL_UnlockJoysticks(); + return NULL; + } - hapticlist = SDL_haptics; - /* Check to see if joystick's haptic is already open */ - while ( hapticlist ) - { - if (SDL_SYS_JoystickSameHaptic(hapticlist, joystick)) { - haptic = hapticlist; - ++haptic->ref_count; - return haptic; + hapticlist = SDL_haptics; + /* Check to see if joystick's haptic is already open */ + while (hapticlist) { + if (SDL_SYS_JoystickSameHaptic(hapticlist, joystick)) { + haptic = hapticlist; + ++haptic->ref_count; + SDL_UnlockJoysticks(); + return haptic; + } + hapticlist = hapticlist->next; } - hapticlist = hapticlist->next; - } - /* Create the haptic device */ - haptic = (SDL_Haptic *) SDL_malloc((sizeof *haptic)); - if (haptic == NULL) { - SDL_OutOfMemory(); - return NULL; - } + /* Create the haptic device */ + haptic = (SDL_Haptic *)SDL_malloc(sizeof(*haptic)); + if (haptic == NULL) { + SDL_OutOfMemory(); + SDL_UnlockJoysticks(); + return NULL; + } - /* Initialize the haptic device */ - SDL_memset(haptic, 0, sizeof(SDL_Haptic)); - haptic->rumble_id = -1; - if (SDL_SYS_HapticOpenFromJoystick(haptic, joystick) < 0) { - SDL_SetError("Haptic: SDL_SYS_HapticOpenFromJoystick failed."); - SDL_free(haptic); - return NULL; + /* Initialize the haptic device */ + SDL_memset(haptic, 0, sizeof(SDL_Haptic)); + haptic->rumble_id = -1; + if (SDL_SYS_HapticOpenFromJoystick(haptic, joystick) < 0) { + SDL_SetError("Haptic: SDL_SYS_HapticOpenFromJoystick failed."); + SDL_free(haptic); + SDL_UnlockJoysticks(); + return NULL; + } } + SDL_UnlockJoysticks(); /* Add haptic to list */ ++haptic->ref_count; @@ -330,12 +323,10 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) return haptic; } - /* * Closes a SDL_Haptic device. */ -void -SDL_HapticClose(SDL_Haptic * haptic) +void SDL_HapticClose(SDL_Haptic *haptic) { int i; SDL_Haptic *hapticlist; @@ -362,17 +353,12 @@ SDL_HapticClose(SDL_Haptic * haptic) /* Remove from the list */ hapticlist = SDL_haptics; hapticlistprev = NULL; - while ( hapticlist ) - { - if (haptic == hapticlist) - { - if ( hapticlistprev ) - { + while (hapticlist) { + if (haptic == hapticlist) { + if (hapticlistprev) { /* unlink this entry */ hapticlistprev->next = hapticlist->next; - } - else - { + } else { SDL_haptics = haptic->next; } @@ -389,8 +375,7 @@ SDL_HapticClose(SDL_Haptic * haptic) /* * Cleans up after the subsystem. */ -void -SDL_HapticQuit(void) +void SDL_HapticQuit(void) { while (SDL_haptics) { SDL_HapticClose(SDL_haptics); @@ -402,8 +387,7 @@ SDL_HapticQuit(void) /* * Returns the number of effects a haptic device has. */ -int -SDL_HapticNumEffects(SDL_Haptic * haptic) +int SDL_HapticNumEffects(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; @@ -412,12 +396,10 @@ SDL_HapticNumEffects(SDL_Haptic * haptic) return haptic->neffects; } - /* * Returns the number of effects a haptic device can play. */ -int -SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic) +int SDL_HapticNumEffectsPlaying(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; @@ -426,12 +408,10 @@ SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic) return haptic->nplaying; } - /* * Returns supported effects by the device. */ -unsigned int -SDL_HapticQuery(SDL_Haptic * haptic) +unsigned int SDL_HapticQuery(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return 0; /* same as if no effects were supported */ @@ -440,12 +420,10 @@ SDL_HapticQuery(SDL_Haptic * haptic) return haptic->supported; } - /* * Returns the number of axis on the device. */ -int -SDL_HapticNumAxes(SDL_Haptic * haptic) +int SDL_HapticNumAxes(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; @@ -457,23 +435,22 @@ SDL_HapticNumAxes(SDL_Haptic * haptic) /* * Checks to see if the device can support the effect. */ -int -SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect) +int SDL_HapticEffectSupported(SDL_Haptic *haptic, SDL_HapticEffect *effect) { if (!ValidHaptic(haptic)) { return -1; } - if ((haptic->supported & effect->type) != 0) + if ((haptic->supported & effect->type) != 0) { return SDL_TRUE; + } return SDL_FALSE; } /* * Creates a new haptic effect. */ -int -SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect) +int SDL_HapticNewEffect(SDL_Haptic *haptic, SDL_HapticEffect *effect) { int i; @@ -492,9 +469,8 @@ SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect) if (haptic->effects[i].hweffect == NULL) { /* Now let the backend create the real effect */ - if (SDL_SYS_HapticNewEffect(haptic, &haptic->effects[i], effect) - != 0) { - return -1; /* Backend failed to create effect */ + if (SDL_SYS_HapticNewEffect(haptic, &haptic->effects[i], effect) != 0) { + return -1; /* Backend failed to create effect */ } SDL_memcpy(&haptic->effects[i].effect, effect, @@ -509,8 +485,7 @@ SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect) /* * Checks to see if an effect is valid. */ -static int -ValidEffect(SDL_Haptic * haptic, int effect) +static int ValidEffect(SDL_Haptic *haptic, int effect) { if ((effect < 0) || (effect >= haptic->neffects)) { SDL_SetError("Haptic: Invalid effect identifier."); @@ -522,9 +497,8 @@ ValidEffect(SDL_Haptic * haptic, int effect) /* * Updates an effect. */ -int -SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, - SDL_HapticEffect * data) +int SDL_HapticUpdateEffect(SDL_Haptic *haptic, int effect, + SDL_HapticEffect *data) { if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { return -1; @@ -546,20 +520,17 @@ SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, return 0; } - /* * Runs the haptic effect on the device. */ -int -SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, Uint32 iterations) +int SDL_HapticRunEffect(SDL_Haptic *haptic, int effect, Uint32 iterations) { if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { return -1; } /* Run the effect */ - if (SDL_SYS_HapticRunEffect(haptic, &haptic->effects[effect], iterations) - < 0) { + if (SDL_SYS_HapticRunEffect(haptic, &haptic->effects[effect], iterations) < 0) { return -1; } @@ -569,8 +540,7 @@ SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, Uint32 iterations) /* * Stops the haptic effect on the device. */ -int -SDL_HapticStopEffect(SDL_Haptic * haptic, int effect) +int SDL_HapticStopEffect(SDL_Haptic *haptic, int effect) { if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { return -1; @@ -587,8 +557,7 @@ SDL_HapticStopEffect(SDL_Haptic * haptic, int effect) /* * Gets rid of a haptic effect. */ -void -SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect) +void SDL_HapticDestroyEffect(SDL_Haptic *haptic, int effect) { if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { return; @@ -605,14 +574,13 @@ SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect) /* * Gets the status of a haptic effect. */ -int -SDL_HapticGetEffectStatus(SDL_Haptic * haptic, int effect) +int SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect) { if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { return -1; } - if ((haptic->supported & SDL_HAPTIC_STATUS) == 0) { + if (!(haptic->supported & SDL_HAPTIC_STATUS)) { return SDL_SetError("Haptic: Device does not support status queries."); } @@ -622,8 +590,7 @@ SDL_HapticGetEffectStatus(SDL_Haptic * haptic, int effect) /* * Sets the global gain of the device. */ -int -SDL_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_HapticSetGain(SDL_Haptic *haptic, int gain) { const char *env; int real_gain, max_gain; @@ -632,7 +599,7 @@ SDL_HapticSetGain(SDL_Haptic * haptic, int gain) return -1; } - if ((haptic->supported & SDL_HAPTIC_GAIN) == 0) { + if (!(haptic->supported & SDL_HAPTIC_GAIN)) { return SDL_SetError("Haptic: Device does not support setting gain."); } @@ -646,10 +613,11 @@ SDL_HapticSetGain(SDL_Haptic * haptic, int gain) max_gain = SDL_atoi(env); /* Check for sanity. */ - if (max_gain < 0) + if (max_gain < 0) { max_gain = 0; - else if (max_gain > 100) + } else if (max_gain > 100) { max_gain = 100; + } /* We'll scale it linearly with SDL_HAPTIC_GAIN_MAX */ real_gain = (gain * max_gain) / 100; @@ -667,14 +635,13 @@ SDL_HapticSetGain(SDL_Haptic * haptic, int gain) /* * Makes the device autocenter, 0 disables. */ -int -SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { if (!ValidHaptic(haptic)) { return -1; } - if ((haptic->supported & SDL_HAPTIC_AUTOCENTER) == 0) { + if (!(haptic->supported & SDL_HAPTIC_AUTOCENTER)) { return SDL_SetError("Haptic: Device does not support setting autocenter."); } @@ -692,14 +659,13 @@ SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) /* * Pauses the haptic device. */ -int -SDL_HapticPause(SDL_Haptic * haptic) +int SDL_HapticPause(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; } - if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) { + if (!(haptic->supported & SDL_HAPTIC_PAUSE)) { return SDL_SetError("Haptic: Device does not support setting pausing."); } @@ -709,15 +675,14 @@ SDL_HapticPause(SDL_Haptic * haptic) /* * Unpauses the haptic device. */ -int -SDL_HapticUnpause(SDL_Haptic * haptic) +int SDL_HapticUnpause(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; } - if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) { - return 0; /* Not going to be paused, so we pretend it's unpaused. */ + if (!(haptic->supported & SDL_HAPTIC_PAUSE)) { + return 0; /* Not going to be paused, so we pretend it's unpaused. */ } return SDL_SYS_HapticUnpause(haptic); @@ -726,8 +691,7 @@ SDL_HapticUnpause(SDL_Haptic * haptic) /* * Stops all the currently playing effects. */ -int -SDL_HapticStopAll(SDL_Haptic * haptic) +int SDL_HapticStopAll(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; @@ -739,22 +703,20 @@ SDL_HapticStopAll(SDL_Haptic * haptic) /* * Checks to see if rumble is supported. */ -int -SDL_HapticRumbleSupported(SDL_Haptic * haptic) +int SDL_HapticRumbleSupported(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; } /* Most things can use SINE, but XInput only has LEFTRIGHT. */ - return ((haptic->supported & (SDL_HAPTIC_SINE|SDL_HAPTIC_LEFTRIGHT)) != 0); + return (haptic->supported & (SDL_HAPTIC_SINE | SDL_HAPTIC_LEFTRIGHT)) != 0; } /* * Initializes the haptic device for simple rumble playback. */ -int -SDL_HapticRumbleInit(SDL_Haptic * haptic) +int SDL_HapticRumbleInit(SDL_Haptic *haptic) { SDL_HapticEffect *efx = &haptic->rumble_effect; @@ -776,7 +738,7 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic) efx->periodic.length = 5000; efx->periodic.attack_length = 0; efx->periodic.fade_length = 0; - } else if (haptic->supported & SDL_HAPTIC_LEFTRIGHT) { /* XInput? */ + } else if (haptic->supported & SDL_HAPTIC_LEFTRIGHT) { /* XInput? */ efx->type = SDL_HAPTIC_LEFTRIGHT; efx->leftright.length = 5000; efx->leftright.large_magnitude = 0x4000; @@ -795,8 +757,7 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic) /* * Runs simple rumble on a haptic device */ -int -SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length) +int SDL_HapticRumblePlay(SDL_Haptic *haptic, float strength, Uint32 length) { SDL_HapticEffect *efx; Sint16 magnitude; @@ -815,7 +776,7 @@ SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length) } else if (strength < 0.0f) { strength = 0.0f; } - magnitude = (Sint16)(32767.0f*strength); + magnitude = (Sint16)(32767.0f * strength); efx = &haptic->rumble_effect; if (efx->type == SDL_HAPTIC_SINE) { @@ -838,8 +799,7 @@ SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length) /* * Stops the simple rumble on a haptic device. */ -int -SDL_HapticRumbleStop(SDL_Haptic * haptic) +int SDL_HapticRumbleStop(SDL_Haptic *haptic) { if (!ValidHaptic(haptic)) { return -1; diff --git a/modules/SDL2/src/haptic/SDL_syshaptic.h b/modules/SDL2/src/haptic/SDL_syshaptic.h index ebc204c..f812951 100644 --- a/modules/SDL2/src/haptic/SDL_syshaptic.h +++ b/modules/SDL2/src/haptic/SDL_syshaptic.h @@ -33,8 +33,8 @@ extern "C" { struct haptic_effect { - SDL_HapticEffect effect; /* The current event */ - struct haptic_hweffect *hweffect; /* The hardware behind the event */ + SDL_HapticEffect effect; /* The current event */ + struct haptic_hweffect *hweffect; /* The hardware behind the event */ }; /* @@ -42,20 +42,20 @@ struct haptic_effect */ struct _SDL_Haptic { - Uint8 index; /* Stores index it is attached to */ + Uint8 index; /* Stores index it is attached to */ - struct haptic_effect *effects; /* Allocated effects */ - int neffects; /* Maximum amount of effects */ - int nplaying; /* Maximum amount of effects to play at the same time */ - unsigned int supported; /* Supported effects */ - int naxes; /* Number of axes on the device. */ + struct haptic_effect *effects; /* Allocated effects */ + int neffects; /* Maximum amount of effects */ + int nplaying; /* Maximum amount of effects to play at the same time */ + unsigned int supported; /* Supported effects */ + int naxes; /* Number of axes on the device. */ - struct haptic_hwdata *hwdata; /* Driver dependent */ - int ref_count; /* Count for multiple opens */ + struct haptic_hwdata *hwdata; /* Driver dependent */ + int ref_count; /* Count for multiple opens */ - int rumble_id; /* ID of rumble effect for simple rumble API. */ + int rumble_id; /* ID of rumble effect for simple rumble API. */ SDL_HapticEffect rumble_effect; /* Rumble effect. */ - struct _SDL_Haptic *next; /* pointer to next haptic we have allocated */ + struct _SDL_Haptic *next; /* pointer to next haptic we have allocated */ }; /* @@ -79,7 +79,7 @@ extern const char *SDL_SYS_HapticName(int index); * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic); +extern int SDL_SYS_HapticOpen(SDL_Haptic *haptic); /* * Returns the index of the haptic core pointer or -1 if none is found. @@ -92,7 +92,7 @@ int SDL_SYS_HapticMouse(void); * Returns >0 if haptic capabilities are detected, 0 if haptic * capabilities aren't detected and -1 on error. */ -extern int SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick); +extern int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick); /* * Opens the haptic device for usage using the same device as @@ -100,20 +100,20 @@ extern int SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick); * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, - SDL_Joystick * joystick); +extern int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, + SDL_Joystick *joystick); /* * Checks to see if haptic device and joystick device are the same. * * Returns 1 if they are the same, 0 if they aren't. */ -extern int SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, - SDL_Joystick * joystick); +extern int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, + SDL_Joystick *joystick); /* * Closes a haptic device after usage. */ -extern void SDL_SYS_HapticClose(SDL_Haptic * haptic); +extern void SDL_SYS_HapticClose(SDL_Haptic *haptic); /* * Performs a cleanup on the haptic subsystem. @@ -126,9 +126,9 @@ extern void SDL_SYS_HapticQuit(void); * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, +extern int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, - SDL_HapticEffect * base); + SDL_HapticEffect *base); /* * Updates the haptic effect on the haptic device using data @@ -136,16 +136,16 @@ extern int SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, +extern int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, - SDL_HapticEffect * data); + SDL_HapticEffect *data); /* * Runs the effect on the haptic device. * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, +extern int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations); @@ -154,13 +154,13 @@ extern int SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, +extern int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect); /* * Cleanups up the effect on the haptic device. */ -extern void SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, +extern void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect); /* @@ -169,7 +169,7 @@ extern void SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, * Returns 0 if device is stopped, >0 if device is playing and * -1 on error. */ -extern int SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, +extern int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect); /* @@ -177,35 +177,35 @@ extern int SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain); +extern int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain); /* * Sets the autocenter feature of the haptic device. * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); +extern int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter); /* * Pauses the haptic device. * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticPause(SDL_Haptic * haptic); +extern int SDL_SYS_HapticPause(SDL_Haptic *haptic); /* * Unpauses the haptic device. * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticUnpause(SDL_Haptic * haptic); +extern int SDL_SYS_HapticUnpause(SDL_Haptic *haptic); /* * Stops all the currently playing haptic effects on the device. * * Returns 0 on success, -1 on error. */ -extern int SDL_SYS_HapticStopAll(SDL_Haptic * haptic); +extern int SDL_SYS_HapticStopAll(SDL_Haptic *haptic); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/haptic/android/SDL_syshaptic.c b/modules/SDL2/src/haptic/android/SDL_syshaptic.c index 9585b8f..111c43c 100644 --- a/modules/SDL2/src/haptic/android/SDL_syshaptic.c +++ b/modules/SDL2/src/haptic/android/SDL_syshaptic.c @@ -44,9 +44,7 @@ static SDL_hapticlist_item *SDL_hapticlist = NULL; static SDL_hapticlist_item *SDL_hapticlist_tail = NULL; static int numhaptics = 0; - -int -SDL_SYS_HapticInit(void) +int SDL_SYS_HapticInit(void) { /* Support for device connect/disconnect is API >= 16 only, * so we poll every three seconds @@ -57,17 +55,15 @@ SDL_SYS_HapticInit(void) timeout = SDL_GetTicks() + 3000; Android_JNI_PollHapticDevices(); } - return (numhaptics); + return numhaptics; } -int -SDL_SYS_NumHaptics(void) +int SDL_SYS_NumHaptics(void) { - return (numhaptics); + return numhaptics; } -static SDL_hapticlist_item * -HapticByOrder(int index) +static SDL_hapticlist_item *HapticByOrder(int index) { SDL_hapticlist_item *item = SDL_hapticlist; if ((index < 0) || (index >= numhaptics)) { @@ -81,8 +77,7 @@ HapticByOrder(int index) return item; } -static SDL_hapticlist_item * -HapticByDevId (int device_id) +static SDL_hapticlist_item *HapticByDevId(int device_id) { SDL_hapticlist_item *item; for (item = SDL_hapticlist; item != NULL; item = item->next) { @@ -94,22 +89,19 @@ HapticByDevId (int device_id) return NULL; } -const char * -SDL_SYS_HapticName(int index) +const char *SDL_SYS_HapticName(int index) { SDL_hapticlist_item *item = HapticByOrder(index); - if (item == NULL ) { + if (item == NULL) { SDL_SetError("No such device"); return NULL; } return item->name; } - -static SDL_hapticlist_item * -OpenHaptic(SDL_Haptic *haptic, SDL_hapticlist_item *item) +static SDL_hapticlist_item *OpenHaptic(SDL_Haptic *haptic, SDL_hapticlist_item *item) { - if (item == NULL ) { + if (item == NULL) { SDL_SetError("No such device"); return NULL; } @@ -124,75 +116,59 @@ OpenHaptic(SDL_Haptic *haptic, SDL_hapticlist_item *item) haptic->supported = SDL_HAPTIC_LEFTRIGHT; haptic->neffects = 1; haptic->nplaying = haptic->neffects; - haptic->effects = (struct haptic_effect *)SDL_malloc (sizeof (struct haptic_effect) * haptic->neffects); + haptic->effects = (struct haptic_effect *)SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); if (haptic->effects == NULL) { SDL_OutOfMemory(); return NULL; } - SDL_memset(haptic->effects, 0, sizeof (struct haptic_effect) * haptic->neffects); + SDL_memset(haptic->effects, 0, sizeof(struct haptic_effect) * haptic->neffects); return item; } -static SDL_hapticlist_item * -OpenHapticByOrder(SDL_Haptic *haptic, int index) +static SDL_hapticlist_item *OpenHapticByOrder(SDL_Haptic *haptic, int index) { - return OpenHaptic (haptic, HapticByOrder(index)); + return OpenHaptic(haptic, HapticByOrder(index)); } -static SDL_hapticlist_item * -OpenHapticByDevId(SDL_Haptic *haptic, int device_id) +static SDL_hapticlist_item *OpenHapticByDevId(SDL_Haptic *haptic, int device_id) { - return OpenHaptic (haptic, HapticByDevId(device_id)); + return OpenHaptic(haptic, HapticByDevId(device_id)); } -int -SDL_SYS_HapticOpen(SDL_Haptic *haptic) +int SDL_SYS_HapticOpen(SDL_Haptic *haptic) { - return (OpenHapticByOrder(haptic, haptic->index) == NULL ? -1 : 0); + return OpenHapticByOrder(haptic, haptic->index) == NULL ? -1 : 0; } - -int -SDL_SYS_HapticMouse(void) +int SDL_SYS_HapticMouse(void) { return -1; } - -int -SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) +int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) { SDL_hapticlist_item *item; item = HapticByDevId(((joystick_hwdata *)joystick->hwdata)->device_id); return (item != NULL) ? 1 : 0; } - -int -SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) +int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { - return (OpenHapticByDevId(haptic, ((joystick_hwdata *)joystick->hwdata)->device_id) == NULL ? -1 : 0); + return OpenHapticByDevId(haptic, ((joystick_hwdata *)joystick->hwdata)->device_id) == NULL ? -1 : 0; } - -int -SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { - return (((SDL_hapticlist_item *)haptic->hwdata)->device_id == ((joystick_hwdata *)joystick->hwdata)->device_id ? 1 : 0); + return ((SDL_hapticlist_item *)haptic->hwdata)->device_id == ((joystick_hwdata *)joystick->hwdata)->device_id ? 1 : 0; } - -void -SDL_SYS_HapticClose(SDL_Haptic * haptic) +void SDL_SYS_HapticClose(SDL_Haptic *haptic) { ((SDL_hapticlist_item *)haptic->hwdata)->haptic = NULL; haptic->hwdata = NULL; - return; } - -void -SDL_SYS_HapticQuit(void) +void SDL_SYS_HapticQuit(void) { /* We don't have any way to scan for joysticks (and their vibrators) at init, so don't wipe the list * of joysticks here in case this is a reinit. @@ -212,107 +188,83 @@ SDL_SYS_HapticQuit(void) #endif } - -int -SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, SDL_HapticEffect *base) { return 0; } - -int -SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, - SDL_HapticEffect * data) +int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, + SDL_HapticEffect *data) { return 0; } - -int -SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - Uint32 iterations) +int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + Uint32 iterations) { float large = effect->effect.leftright.large_magnitude / 32767.0f; float small = effect->effect.leftright.small_magnitude / 32767.0f; float total = (large * 0.6f) + (small * 0.4f); - Android_JNI_HapticRun (((SDL_hapticlist_item *)haptic->hwdata)->device_id, total, effect->effect.leftright.length); + Android_JNI_HapticRun(((SDL_hapticlist_item *)haptic->hwdata)->device_id, total, effect->effect.leftright.length); return 0; } - -int -SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { - Android_JNI_HapticStop (((SDL_hapticlist_item *)haptic->hwdata)->device_id); + Android_JNI_HapticStop(((SDL_hapticlist_item *)haptic->hwdata)->device_id); return 0; } - -void -SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { - return; } - -int -SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, - struct haptic_effect *effect) +int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect) { return 0; } - -int -SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain) { return 0; } - -int -SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { return 0; } -int -SDL_SYS_HapticPause(SDL_Haptic * haptic) +int SDL_SYS_HapticPause(SDL_Haptic *haptic) { return 0; } -int -SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +int SDL_SYS_HapticUnpause(SDL_Haptic *haptic) { return 0; } -int -SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +int SDL_SYS_HapticStopAll(SDL_Haptic *haptic) { return 0; } - - -int -Android_AddHaptic(int device_id, const char *name) +int Android_AddHaptic(int device_id, const char *name) { SDL_hapticlist_item *item; - item = (SDL_hapticlist_item *) SDL_calloc(1, sizeof (SDL_hapticlist_item)); + item = (SDL_hapticlist_item *)SDL_calloc(1, sizeof(SDL_hapticlist_item)); if (item == NULL) { return -1; } item->device_id = device_id; - item->name = SDL_strdup (name); + item->name = SDL_strdup(name); if (item->name == NULL) { - SDL_free (item); + SDL_free(item); return -1; } @@ -327,8 +279,7 @@ Android_AddHaptic(int device_id, const char *name) return numhaptics; } -int -Android_RemoveHaptic(int device_id) +int Android_RemoveHaptic(int device_id) { SDL_hapticlist_item *item; SDL_hapticlist_item *prev = NULL; @@ -361,7 +312,6 @@ Android_RemoveHaptic(int device_id) return -1; } - #endif /* SDL_HAPTIC_ANDROID */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/haptic/darwin/SDL_syshaptic.c b/modules/SDL2/src/haptic/darwin/SDL_syshaptic.c index 055658f..dea1ee7 100644 --- a/modules/SDL2/src/haptic/darwin/SDL_syshaptic.c +++ b/modules/SDL2/src/haptic/darwin/SDL_syshaptic.c @@ -37,7 +37,7 @@ #include #ifndef IO_OBJECT_NULL -#define IO_OBJECT_NULL ((io_service_t)0) +#define IO_OBJECT_NULL ((io_service_t)0) #endif /* @@ -45,10 +45,10 @@ */ typedef struct SDL_hapticlist_item { - char name[256]; /* Name of the device. */ + char name[256]; /* Name of the device. */ - io_service_t dev; /* Node we use to create the device. */ - SDL_Haptic *haptic; /* Haptic currently associated with it. */ + io_service_t dev; /* Node we use to create the device. */ + SDL_Haptic *haptic; /* Haptic currently associated with it. */ /* Usage pages for determining if it's a mouse or not. */ long usage; @@ -57,30 +57,28 @@ typedef struct SDL_hapticlist_item struct SDL_hapticlist_item *next; } SDL_hapticlist_item; - /* * Haptic system hardware data. */ struct haptic_hwdata { - FFDeviceObjectReference device; /* Hardware device. */ + FFDeviceObjectReference device; /* Hardware device. */ UInt8 axes[3]; }; - /* * Haptic system effect data. */ struct haptic_hweffect { - FFEffectObjectReference ref; /* Reference. */ - struct FFEFFECT effect; /* Hardware effect. */ + FFEffectObjectReference ref; /* Reference. */ + struct FFEFFECT effect; /* Hardware effect. */ }; /* * Prototypes. */ -static void SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type); +static void SDL_SYS_HapticFreeFFEFFECT(FFEFFECT *effect, int type); static int HIDGetDeviceProduct(io_service_t dev, char *name); static SDL_hapticlist_item *SDL_hapticlist = NULL; @@ -90,8 +88,7 @@ static int numhaptics = -1; /* * Like strerror but for force feedback errors. */ -static const char * -FFStrError(unsigned int err) +static const char *FFStrError(unsigned int err) { switch (err) { case FFERR_DEVICEFULL: @@ -143,12 +140,10 @@ FFStrError(unsigned int err) } } - /* * Initializes the haptic subsystem. */ -int -SDL_SYS_HapticInit(void) +int SDL_SYS_HapticInit(void) { IOReturn result; io_iterator_t iter; @@ -173,7 +168,7 @@ SDL_SYS_HapticInit(void) } /* IOServiceGetMatchingServices consumes dictionary. */ - if (!IOIteratorIsValid(iter)) { /* No iterator. */ + if (!IOIteratorIsValid(iter)) { /* No iterator. */ return 0; } @@ -187,14 +182,12 @@ SDL_SYS_HapticInit(void) return numhaptics; } -int -SDL_SYS_NumHaptics(void) +int SDL_SYS_NumHaptics(void) { return numhaptics; } -static SDL_hapticlist_item * -HapticByDevIndex(int device_index) +static SDL_hapticlist_item *HapticByDevIndex(int device_index) { SDL_hapticlist_item *item = SDL_hapticlist; @@ -211,8 +204,7 @@ HapticByDevIndex(int device_index) return item; } -int -MacHaptic_MaybeAddDevice( io_object_t device ) +int MacHaptic_MaybeAddDevice(io_object_t device) { IOReturn result; CFMutableDictionaryRef hidProperties; @@ -229,9 +221,8 @@ MacHaptic_MaybeAddDevice( io_object_t device ) } /* Make sure we don't already have it */ - for (item = SDL_hapticlist; item ; item = item->next) - { - if (IOObjectIsEqualTo((io_object_t) item->dev, device)) { + for (item = SDL_hapticlist; item; item = item->next) { + if (IOObjectIsEqualTo((io_object_t)item->dev, device)) { /* Already added */ return -1; } @@ -287,8 +278,7 @@ MacHaptic_MaybeAddDevice( io_object_t device ) return numhaptics; } -int -MacHaptic_MaybeRemoveDevice( io_object_t device ) +int MacHaptic_MaybeRemoveDevice(io_object_t device) { SDL_hapticlist_item *item; SDL_hapticlist_item *prev = NULL; @@ -299,7 +289,7 @@ MacHaptic_MaybeRemoveDevice( io_object_t device ) for (item = SDL_hapticlist; item != NULL; item = item->next) { /* found it, remove it. */ - if (IOObjectIsEqualTo((io_object_t) item->dev, device)) { + if (IOObjectIsEqualTo((io_object_t)item->dev, device)) { const int retval = item->haptic ? item->haptic->index : -1; if (prev != NULL) { @@ -329,8 +319,7 @@ MacHaptic_MaybeRemoveDevice( io_object_t device ) /* * Return the name of a haptic device, does not need to be opened. */ -const char * -SDL_SYS_HapticName(int index) +const char *SDL_SYS_HapticName(int index) { SDL_hapticlist_item *item; item = HapticByDevIndex(index); @@ -340,8 +329,7 @@ SDL_SYS_HapticName(int index) /* * Gets the device's product name. */ -static int -HIDGetDeviceProduct(io_service_t dev, char *name) +static int HIDGetDeviceProduct(io_service_t dev, char *name) { CFMutableDictionaryRef hidProperties, usbProperties; io_registry_entry_t parent1, parent2; @@ -359,20 +347,19 @@ HIDGetDeviceProduct(io_service_t dev, char *name) * get dictionary for USB properties: step up two levels and get CF dictionary for USB properties */ if ((KERN_SUCCESS == - IORegistryEntryGetParentEntry(dev, kIOServicePlane, &parent1)) - && (KERN_SUCCESS == - IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2)) - && (KERN_SUCCESS == - IORegistryEntryCreateCFProperties(parent2, &usbProperties, - kCFAllocatorDefault, - kNilOptions))) { + IORegistryEntryGetParentEntry(dev, kIOServicePlane, &parent1)) && + (KERN_SUCCESS == + IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2)) && + (KERN_SUCCESS == + IORegistryEntryCreateCFProperties(parent2, &usbProperties, + kCFAllocatorDefault, + kNilOptions))) { if (usbProperties) { CFTypeRef refCF = 0; /* get device info * try hid dictionary first, if fail then go to USB dictionary */ - /* Get product name */ refCF = CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDProductKey)); if (!refCF) { @@ -405,14 +392,13 @@ HIDGetDeviceProduct(io_service_t dev, char *name) return 0; } - -#define FF_TEST(ff, s) \ -if (features.supportedEffects & (ff)) supported |= (s) +#define FF_TEST(ff, s) \ + if (features.supportedEffects & (ff)) \ + supported |= (s) /* * Gets supported features. */ -static unsigned int -GetSupportedFeatures(SDL_Haptic * haptic) +static unsigned int GetSupportedFeatures(SDL_Haptic *haptic) { HRESULT ret; FFDeviceObjectReference device; @@ -464,9 +450,8 @@ GetSupportedFeatures(SDL_Haptic * haptic) if (ret == FF_OK) { supported |= SDL_HAPTIC_AUTOCENTER; } else if (ret != FFERR_UNSUPPORTED) { - return SDL_SetError - ("Haptic: Unable to get if device supports autocenter: %s.", - FFStrError(ret)); + return SDL_SetError("Haptic: Unable to get if device supports autocenter: %s.", + FFStrError(ret)); } /* Check for axes, we have an artificial limit on axes */ @@ -482,12 +467,10 @@ GetSupportedFeatures(SDL_Haptic * haptic) return 0; } - /* * Opens the haptic device from the file descriptor. */ -static int -SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) +static int SDL_SYS_HapticOpenFromService(SDL_Haptic *haptic, io_service_t service) { HRESULT ret; int ret2; @@ -515,7 +498,6 @@ SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) goto open_err; } - /* Reset and then enable actuators. */ ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, FFSFFC_RESET); @@ -531,7 +513,6 @@ SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) goto open_err; } - /* Allocate effects memory. */ haptic->effects = (struct haptic_effect *) SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); @@ -546,23 +527,20 @@ SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) return 0; /* Error handling */ - open_err: +open_err: FFReleaseDevice(haptic->hwdata->device); - creat_err: +creat_err: if (haptic->hwdata != NULL) { SDL_free(haptic->hwdata); haptic->hwdata = NULL; } return -1; - } - /* * Opens a haptic device for usage. */ -int -SDL_SYS_HapticOpen(SDL_Haptic * haptic) +int SDL_SYS_HapticOpen(SDL_Haptic *haptic) { SDL_hapticlist_item *item; item = HapticByDevIndex(haptic->index); @@ -570,12 +548,10 @@ SDL_SYS_HapticOpen(SDL_Haptic * haptic) return SDL_SYS_HapticOpenFromService(haptic, item->dev); } - /* * Opens a haptic device from first mouse it finds for usage. */ -int -SDL_SYS_HapticMouse(void) +int SDL_SYS_HapticMouse(void) { int device_index = 0; SDL_hapticlist_item *item; @@ -591,12 +567,10 @@ SDL_SYS_HapticMouse(void) return -1; } - /* * Checks to see if a joystick has haptic features. */ -int -SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) +int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_IOKIT if (joystick->driver != &SDL_DARWIN_JoystickDriver) { @@ -609,18 +583,16 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) return SDL_FALSE; } - /* * Checks to see if the haptic device and joystick are in reality the same. */ -int -SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_IOKIT if (joystick->driver != &SDL_DARWIN_JoystickDriver) { return 0; } - if (IOObjectIsEqualTo((io_object_t) ((size_t)haptic->hwdata->device), + if (IOObjectIsEqualTo((io_object_t)((size_t)haptic->hwdata->device), joystick->hwdata->ffservice)) { return 1; } @@ -628,25 +600,23 @@ SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) return 0; } - /* * Opens a SDL_Haptic from a SDL_Joystick. */ -int -SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_IOKIT int device_index = 0; SDL_hapticlist_item *item; - + if (joystick->driver != &SDL_DARWIN_JoystickDriver) { return -1; } for (item = SDL_hapticlist; item; item = item->next) { - if (IOObjectIsEqualTo((io_object_t) item->dev, - joystick->hwdata->ffservice)) { - haptic->index = device_index; - break; + if (IOObjectIsEqualTo((io_object_t)item->dev, + joystick->hwdata->ffservice)) { + haptic->index = device_index; + break; } ++device_index; } @@ -657,12 +627,10 @@ SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) #endif } - /* * Closes the haptic device. */ -void -SDL_SYS_HapticClose(SDL_Haptic * haptic) +void SDL_SYS_HapticClose(SDL_Haptic *haptic) { if (haptic->hwdata) { @@ -680,12 +648,10 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) } } - /* * Clean up after system specific haptic stuff */ -void -SDL_SYS_HapticQuit(void) +void SDL_SYS_HapticQuit(void) { SDL_hapticlist_item *item; SDL_hapticlist_item *next = NULL; @@ -705,12 +671,10 @@ SDL_SYS_HapticQuit(void) SDL_hapticlist_tail = NULL; } - /* * Converts an SDL trigger button to an FFEFFECT trigger button. */ -static DWORD -FFGetTriggerButton(Uint16 button) +static DWORD FFGetTriggerButton(Uint16 button) { DWORD dwTriggerButton; @@ -723,18 +687,16 @@ FFGetTriggerButton(Uint16 button) return dwTriggerButton; } - /* * Sets the direction. */ -static int -SDL_SYS_SetDirection(FFEFFECT * effect, SDL_HapticDirection * dir, int naxes) +static int SDL_SYS_SetDirection(FFEFFECT *effect, SDL_HapticDirection *dir, int naxes) { LONG *rglDir; /* Handle no axes a part. */ if (naxes == 0) { - effect->dwFlags |= FFEFF_SPHERICAL; /* Set as default. */ + effect->dwFlags |= FFEFF_SPHERICAL; /* Set as default. */ effect->rglDirection = NULL; return 0; } @@ -782,21 +744,19 @@ SDL_SYS_SetDirection(FFEFFECT * effect, SDL_HapticDirection * dir, int naxes) } } - /* Clamps and converts. */ -#define CCONVERT(x) (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF) +#define CCONVERT(x) (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF) /* Just converts. */ -#define CONVERT(x) (((x)*10000) / 0x7FFF) +#define CONVERT(x) (((x)*10000) / 0x7FFF) /* * Creates the FFEFFECT from a SDL_HapticEffect. */ -static int -SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) +static int SDL_SYS_ToFFEFFECT(SDL_Haptic *haptic, FFEFFECT *dest, SDL_HapticEffect *src) { int i; FFCONSTANTFORCE *constant = NULL; FFPERIODIC *periodic = NULL; - FFCONDITION *condition = NULL; /* Actually an array of conditions - one per axis. */ + FFCONDITION *condition = NULL; /* Actually an array of conditions - one per axis. */ FFRAMPFORCE *ramp = NULL; FFCUSTOMFORCE *custom = NULL; FFENVELOPE *envelope = NULL; @@ -809,10 +769,10 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) /* Set global stuff. */ SDL_memset(dest, 0, sizeof(FFEFFECT)); - dest->dwSize = sizeof(FFEFFECT); /* Set the structure size. */ - dest->dwSamplePeriod = 0; /* Not used by us. */ - dest->dwGain = 10000; /* Gain is set globally, not locally. */ - dest->dwFlags = FFEFF_OBJECTOFFSETS; /* Seems obligatory. */ + dest->dwSize = sizeof(FFEFFECT); /* Set the structure size. */ + dest->dwSamplePeriod = 0; /* Not used by us. */ + dest->dwGain = 10000; /* Gain is set globally, not locally. */ + dest->dwFlags = FFEFF_OBJECTOFFSETS; /* Seems obligatory. */ /* Envelope. */ envelope = SDL_malloc(sizeof(FFENVELOPE)); @@ -821,7 +781,7 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) } SDL_memset(envelope, 0, sizeof(FFENVELOPE)); dest->lpEnvelope = envelope; - envelope->dwSize = sizeof(FFENVELOPE); /* Always should be this. */ + envelope->dwSize = sizeof(FFENVELOPE); /* Always should be this. */ /* Axes. */ if (src->constant.direction.type == SDL_HAPTIC_STEERING_AXIS) { @@ -834,7 +794,7 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) if (axes == NULL) { return SDL_OutOfMemory(); } - axes[0] = haptic->hwdata->axes[0]; /* Always at least one axis. */ + axes[0] = haptic->hwdata->axes[0]; /* Always at least one axis. */ if (dest->cAxes > 1) { axes[1] = haptic->hwdata->axes[1]; } @@ -844,7 +804,6 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) dest->rgdwAxes = axes; } - /* The big type handling switch, even bigger then Linux's version. */ switch (src->type) { case SDL_HAPTIC_CONSTANT: @@ -864,17 +823,15 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) dest->dwDuration = hap_constant->length * 1000; /* In microseconds. */ dest->dwTriggerButton = FFGetTriggerButton(hap_constant->button); dest->dwTriggerRepeatInterval = hap_constant->interval; - dest->dwStartDelay = hap_constant->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_constant->delay * 1000; /* In microseconds. */ /* Direction. */ - if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) - < 0) { + if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) < 0) { return -1; } /* Envelope */ - if ((hap_constant->attack_length == 0) - && (hap_constant->fade_length == 0)) { + if ((hap_constant->attack_length == 0) && (hap_constant->fade_length == 0)) { SDL_free(envelope); dest->lpEnvelope = NULL; } else { @@ -902,8 +859,8 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) /* Specifics */ periodic->dwMagnitude = CONVERT(SDL_abs(hap_periodic->magnitude)); periodic->lOffset = CONVERT(hap_periodic->offset); - periodic->dwPhase = - (hap_periodic->phase + (hap_periodic->magnitude < 0 ? 18000 : 0)) % 36000; + periodic->dwPhase = + (hap_periodic->phase + (hap_periodic->magnitude < 0 ? 18000 : 0)) % 36000; periodic->dwPeriod = hap_periodic->period * 1000; dest->cbTypeSpecificParams = sizeof(FFPERIODIC); dest->lpvTypeSpecificParams = periodic; @@ -912,17 +869,15 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) dest->dwDuration = hap_periodic->length * 1000; /* In microseconds. */ dest->dwTriggerButton = FFGetTriggerButton(hap_periodic->button); dest->dwTriggerRepeatInterval = hap_periodic->interval; - dest->dwStartDelay = hap_periodic->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_periodic->delay * 1000; /* In microseconds. */ /* Direction. */ - if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) - < 0) { + if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) < 0) { return -1; } /* Envelope */ - if ((hap_periodic->attack_length == 0) - && (hap_periodic->fade_length == 0)) { + if ((hap_periodic->attack_length == 0) && (hap_periodic->fade_length == 0)) { SDL_free(envelope); dest->lpEnvelope = NULL; } else { @@ -965,14 +920,13 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) dest->lpvTypeSpecificParams = condition; /* Generics */ - dest->dwDuration = hap_condition->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_condition->length * 1000; /* In microseconds. */ dest->dwTriggerButton = FFGetTriggerButton(hap_condition->button); dest->dwTriggerRepeatInterval = hap_condition->interval; - dest->dwStartDelay = hap_condition->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_condition->delay * 1000; /* In microseconds. */ /* Direction. */ - if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) - < 0) { + if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) < 0) { return -1; } @@ -997,10 +951,10 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) dest->lpvTypeSpecificParams = ramp; /* Generics */ - dest->dwDuration = hap_ramp->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_ramp->length * 1000; /* In microseconds. */ dest->dwTriggerButton = FFGetTriggerButton(hap_ramp->button); dest->dwTriggerRepeatInterval = hap_ramp->interval; - dest->dwStartDelay = hap_ramp->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_ramp->delay * 1000; /* In microseconds. */ /* Direction. */ if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { @@ -1034,17 +988,17 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) custom->cSamples = hap_custom->samples; custom->rglForceData = SDL_malloc(sizeof(LONG) * custom->cSamples * custom->cChannels); - for (i = 0; i < hap_custom->samples * hap_custom->channels; i++) { /* Copy data. */ + for (i = 0; i < hap_custom->samples * hap_custom->channels; i++) { /* Copy data. */ custom->rglForceData[i] = CCONVERT(hap_custom->data[i]); } dest->cbTypeSpecificParams = sizeof(FFCUSTOMFORCE); dest->lpvTypeSpecificParams = custom; /* Generics */ - dest->dwDuration = hap_custom->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_custom->length * 1000; /* In microseconds. */ dest->dwTriggerButton = FFGetTriggerButton(hap_custom->button); dest->dwTriggerRepeatInterval = hap_custom->interval; - dest->dwStartDelay = hap_custom->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_custom->delay * 1000; /* In microseconds. */ /* Direction. */ if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < @@ -1053,8 +1007,7 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) } /* Envelope */ - if ((hap_custom->attack_length == 0) - && (hap_custom->fade_length == 0)) { + if ((hap_custom->attack_length == 0) && (hap_custom->fade_length == 0)) { SDL_free(envelope); dest->lpEnvelope = NULL; } else { @@ -1066,7 +1019,6 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) break; - default: return SDL_SetError("Haptic: Unknown effect type."); } @@ -1074,12 +1026,10 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) return 0; } - /* * Frees an FFEFFECT allocated by SDL_SYS_ToFFEFFECT. */ -static void -SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type) +static void SDL_SYS_HapticFreeFFEFFECT(FFEFFECT *effect, int type) { FFCUSTOMFORCE *custom; @@ -1088,8 +1038,8 @@ SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type) SDL_free(effect->rgdwAxes); effect->rgdwAxes = NULL; if (effect->lpvTypeSpecificParams != NULL) { - if (type == SDL_HAPTIC_CUSTOM) { /* Must free the custom data. */ - custom = (FFCUSTOMFORCE *) effect->lpvTypeSpecificParams; + if (type == SDL_HAPTIC_CUSTOM) { /* Must free the custom data. */ + custom = (FFCUSTOMFORCE *)effect->lpvTypeSpecificParams; SDL_free(custom->rglForceData); custom->rglForceData = NULL; } @@ -1100,7 +1050,6 @@ SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type) effect->rglDirection = NULL; } - /* * Gets the effect type from the generic SDL haptic effect wrapper. */ @@ -1114,9 +1063,9 @@ SDL_SYS_HapticEffectType(Uint16 type) case SDL_HAPTIC_RAMP: return kFFEffectType_RampForce_ID; - /* !!! FIXME: put this back when we have more bits in 2.1 */ - /* case SDL_HAPTIC_SQUARE: - return kFFEffectType_Square_ID; */ + /* !!! FIXME: put this back when we have more bits in 2.1 */ + /* case SDL_HAPTIC_SQUARE: + return kFFEffectType_Square_ID; */ case SDL_HAPTIC_SINE: return kFFEffectType_Sine_ID; @@ -1151,13 +1100,11 @@ SDL_SYS_HapticEffectType(Uint16 type) } } - /* * Creates a new haptic effect. */ -int -SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - SDL_HapticEffect * base) +int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + SDL_HapticEffect *base) { HRESULT ret; CFUUIDRef type; @@ -1192,22 +1139,20 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, return 0; - err_effectdone: +err_effectdone: SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, base->type); - err_hweffect: +err_hweffect: SDL_free(effect->hweffect); effect->hweffect = NULL; return -1; } - /* * Updates an effect. */ -int -SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, - SDL_HapticEffect * data) +int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, + SDL_HapticEffect *data) { HRESULT ret; FFEffectParameterFlag flags; @@ -1222,11 +1167,11 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, /* Set the flags. Might be worthwhile to diff temp with loaded effect and * only change those parameters. */ flags = FFEP_DIRECTION | - FFEP_DURATION | - FFEP_ENVELOPE | - FFEP_STARTDELAY | - FFEP_TRIGGERBUTTON | - FFEP_TRIGGERREPEATINTERVAL | FFEP_TYPESPECIFICPARAMS; + FFEP_DURATION | + FFEP_ENVELOPE | + FFEP_STARTDELAY | + FFEP_TRIGGERBUTTON | + FFEP_TRIGGERREPEATINTERVAL | FFEP_TYPESPECIFICPARAMS; /* Create the actual effect. */ ret = FFEffectSetParameters(effect->hweffect->ref, &temp, flags); @@ -1241,18 +1186,16 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, return 0; - err_update: +err_update: SDL_SYS_HapticFreeFFEFFECT(&temp, data->type); return -1; } - /* * Runs an effect. */ -int -SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - Uint32 iterations) +int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + Uint32 iterations) { HRESULT ret; Uint32 iter; @@ -1260,8 +1203,9 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, /* Check if it's infinite. */ if (iterations == SDL_HAPTIC_INFINITY) { iter = FF_INFINITE; - } else + } else { iter = iterations; + } /* Run the effect. */ ret = FFEffectStart(effect->hweffect->ref, iter, 0); @@ -1273,12 +1217,10 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, return 0; } - /* * Stops an effect. */ -int -SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { HRESULT ret; @@ -1291,12 +1233,10 @@ SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) return 0; } - /* * Frees the effect. */ -void -SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { HRESULT ret; @@ -1311,13 +1251,11 @@ SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) effect->hweffect = NULL; } - /* * Gets the status of a haptic effect. */ -int -SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, - struct haptic_effect *effect) +int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, + struct haptic_effect *effect) { HRESULT ret; FFEffectStatusFlag status; @@ -1332,15 +1270,13 @@ SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, if (status == 0) { return SDL_FALSE; } - return SDL_TRUE; /* Assume it's playing or emulated. */ + return SDL_TRUE; /* Assume it's playing or emulated. */ } - /* * Sets the gain. */ -int -SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain) { HRESULT ret; Uint32 val; @@ -1355,12 +1291,10 @@ SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) return 0; } - /* * Sets the autocentering. */ -int -SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { HRESULT ret; Uint32 val; @@ -1382,12 +1316,10 @@ SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) return 0; } - /* * Pauses the device. */ -int -SDL_SYS_HapticPause(SDL_Haptic * haptic) +int SDL_SYS_HapticPause(SDL_Haptic *haptic) { HRESULT ret; @@ -1400,12 +1332,10 @@ SDL_SYS_HapticPause(SDL_Haptic * haptic) return 0; } - /* * Unpauses the device. */ -int -SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +int SDL_SYS_HapticUnpause(SDL_Haptic *haptic) { HRESULT ret; @@ -1418,12 +1348,10 @@ SDL_SYS_HapticUnpause(SDL_Haptic * haptic) return 0; } - /* * Stops all currently playing effects. */ -int -SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +int SDL_SYS_HapticStopAll(SDL_Haptic *haptic) { HRESULT ret; diff --git a/modules/SDL2/src/haptic/darwin/SDL_syshaptic_c.h b/modules/SDL2/src/haptic/darwin/SDL_syshaptic_c.h index 91a2c25..8247fe8 100644 --- a/modules/SDL2/src/haptic/darwin/SDL_syshaptic_c.h +++ b/modules/SDL2/src/haptic/darwin/SDL_syshaptic_c.h @@ -25,8 +25,7 @@ #define kIOMainPortDefault kIOMasterPortDefault #endif -extern int MacHaptic_MaybeAddDevice( io_object_t device ); -extern int MacHaptic_MaybeRemoveDevice( io_object_t device ); +extern int MacHaptic_MaybeAddDevice(io_object_t device); +extern int MacHaptic_MaybeRemoveDevice(io_object_t device); /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/haptic/dummy/SDL_syshaptic.c b/modules/SDL2/src/haptic/dummy/SDL_syshaptic.c index 1ebd969..433093c 100644 --- a/modules/SDL2/src/haptic/dummy/SDL_syshaptic.c +++ b/modules/SDL2/src/haptic/dummy/SDL_syshaptic.c @@ -25,158 +25,119 @@ #include "SDL_haptic.h" #include "../SDL_syshaptic.h" - -static int -SDL_SYS_LogicError(void) +static int SDL_SYS_LogicError(void) { return SDL_SetError("Logic error: No haptic devices available."); } - -int -SDL_SYS_HapticInit(void) +int SDL_SYS_HapticInit(void) { return 0; } -int -SDL_SYS_NumHaptics(void) +int SDL_SYS_NumHaptics(void) { return 0; } -const char * -SDL_SYS_HapticName(int index) +const char *SDL_SYS_HapticName(int index) { SDL_SYS_LogicError(); return NULL; } - -int -SDL_SYS_HapticOpen(SDL_Haptic * haptic) +int SDL_SYS_HapticOpen(SDL_Haptic *haptic) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticMouse(void) +int SDL_SYS_HapticMouse(void) { return -1; } - -int -SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) +int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) { return 0; } - -int -SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { return 0; } - -void -SDL_SYS_HapticClose(SDL_Haptic * haptic) +void SDL_SYS_HapticClose(SDL_Haptic *haptic) { return; } - -void -SDL_SYS_HapticQuit(void) +void SDL_SYS_HapticQuit(void) { return; } - -int -SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, SDL_HapticEffect *base) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, - SDL_HapticEffect * data) +int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, + SDL_HapticEffect *data) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - Uint32 iterations) +int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + Uint32 iterations) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_SYS_LogicError(); } - -void -SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { SDL_SYS_LogicError(); return; } - -int -SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, - struct haptic_effect *effect) +int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, + struct haptic_effect *effect) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain) { return SDL_SYS_LogicError(); } - -int -SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { return SDL_SYS_LogicError(); } -int -SDL_SYS_HapticPause(SDL_Haptic * haptic) +int SDL_SYS_HapticPause(SDL_Haptic *haptic) { return SDL_SYS_LogicError(); } -int -SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +int SDL_SYS_HapticUnpause(SDL_Haptic *haptic) { return SDL_SYS_LogicError(); } -int -SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +int SDL_SYS_HapticStopAll(SDL_Haptic *haptic) { return SDL_SYS_LogicError(); } diff --git a/modules/SDL2/src/haptic/linux/SDL_syshaptic.c b/modules/SDL2/src/haptic/linux/SDL_syshaptic.c index adee0fb..55a8ca1 100644 --- a/modules/SDL2/src/haptic/linux/SDL_syshaptic.c +++ b/modules/SDL2/src/haptic/linux/SDL_syshaptic.c @@ -30,12 +30,12 @@ #include "../../core/linux/SDL_evdev_capabilities.h" #include "../../core/linux/SDL_udev.h" -#include /* close */ -#include /* Force feedback linux stuff. */ -#include /* O_RDWR */ -#include /* INT_MAX */ -#include /* errno, strerror */ -#include /* stat */ +#include /* close */ +#include /* Force feedback linux stuff. */ +#include /* O_RDWR */ +#include /* INT_MAX */ +#include /* errno, strerror */ +#include /* stat */ /* Just in case. */ #ifndef M_PI @@ -56,43 +56,42 @@ static void haptic_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class, */ typedef struct SDL_hapticlist_item { - char *fname; /* Dev path name (like /dev/input/event1) */ - SDL_Haptic *haptic; /* Associated haptic. */ + char *fname; /* Dev path name (like /dev/input/event1) */ + SDL_Haptic *haptic; /* Associated haptic. */ dev_t dev_num; struct SDL_hapticlist_item *next; } SDL_hapticlist_item; - /* * Haptic system hardware data. */ struct haptic_hwdata { - int fd; /* File descriptor of the device. */ - char *fname; /* Points to the name in SDL_hapticlist. */ + int fd; /* File descriptor of the device. */ + char *fname; /* Points to the name in SDL_hapticlist. */ }; - /* * Haptic system effect data. */ struct haptic_hweffect { - struct ff_effect effect; /* The linux kernel effect structure. */ + struct ff_effect effect; /* The linux kernel effect structure. */ }; static SDL_hapticlist_item *SDL_hapticlist = NULL; static SDL_hapticlist_item *SDL_hapticlist_tail = NULL; static int numhaptics = 0; -#define EV_TEST(ev,f) \ - if (test_bit((ev), features)) ret |= (f); +#define EV_TEST(ev, f) \ + if (test_bit((ev), features)) { \ + ret |= (f); \ + } /* * Test whether a device has haptic properties. * Returns available properties or 0 if there are none. */ -static int -EV_IsHaptic(int fd) +static int EV_IsHaptic(int fd) { unsigned int ret; unsigned long features[1 + FF_MAX / sizeof(unsigned long)]; @@ -126,12 +125,10 @@ EV_IsHaptic(int fd) return ret; } - /* * Tests whether a device is a mouse or not. */ -static int -EV_IsMouse(int fd) +static int EV_IsMouse(int fd) { unsigned long argp[40]; @@ -151,8 +148,7 @@ EV_IsMouse(int fd) /* * Initializes the haptic subsystem by finding available devices. */ -int -SDL_SYS_HapticInit(void) +int SDL_SYS_HapticInit(void) { const char joydev_pattern[] = "/dev/input/event%d"; char path[PATH_MAX]; @@ -164,8 +160,7 @@ SDL_SYS_HapticInit(void) */ i = 0; for (j = 0; j < MAX_HAPTICS; ++j) { - - SDL_snprintf(path, PATH_MAX, joydev_pattern, i++); + (void)SDL_snprintf(path, PATH_MAX, joydev_pattern, i++); MaybeAddDevice(path); } @@ -174,7 +169,7 @@ SDL_SYS_HapticInit(void) return SDL_SetError("Could not initialize UDEV"); } - if ( SDL_UDEV_AddCallback(haptic_udev_callback) < 0) { + if (SDL_UDEV_AddCallback(haptic_udev_callback) < 0) { SDL_UDEV_Quit(); return SDL_SetError("Could not setup haptic <-> udev callback"); } @@ -186,14 +181,12 @@ SDL_SYS_HapticInit(void) return numhaptics; } -int -SDL_SYS_NumHaptics(void) +int SDL_SYS_NumHaptics(void) { return numhaptics; } -static SDL_hapticlist_item * -HapticByDevIndex(int device_index) +static SDL_hapticlist_item *HapticByDevIndex(int device_index) { SDL_hapticlist_item *item = SDL_hapticlist; @@ -217,25 +210,22 @@ static void haptic_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class, return; } - switch( udev_type ) - { - case SDL_UDEV_DEVICEADDED: - MaybeAddDevice(devpath); - break; + switch (udev_type) { + case SDL_UDEV_DEVICEADDED: + MaybeAddDevice(devpath); + break; - case SDL_UDEV_DEVICEREMOVED: - MaybeRemoveDevice(devpath); - break; + case SDL_UDEV_DEVICEREMOVED: + MaybeRemoveDevice(devpath); + break; - default: - break; + default: + break; } - } #endif /* SDL_USE_LIBUDEV */ -static int -MaybeAddDevice(const char *path) +static int MaybeAddDevice(const char *path) { struct stat sb; int fd; @@ -254,7 +244,7 @@ MaybeAddDevice(const char *path) /* check for duplicates */ for (item = SDL_hapticlist; item != NULL; item = item->next) { if (item->dev_num == sb.st_rdev) { - return -1; /* duplicate. */ + return -1; /* duplicate. */ } } @@ -275,7 +265,7 @@ MaybeAddDevice(const char *path) return -1; } - item = (SDL_hapticlist_item *) SDL_calloc(1, sizeof (SDL_hapticlist_item)); + item = (SDL_hapticlist_item *)SDL_calloc(1, sizeof(SDL_hapticlist_item)); if (item == NULL) { return -1; } @@ -304,8 +294,7 @@ MaybeAddDevice(const char *path) } #if SDL_USE_LIBUDEV -static int -MaybeRemoveDevice(const char* path) +static int MaybeRemoveDevice(const char *path) { SDL_hapticlist_item *item; SDL_hapticlist_item *prev = NULL; @@ -347,8 +336,7 @@ MaybeRemoveDevice(const char* path) /* * Gets the name from a file descriptor. */ -static const char * -SDL_SYS_HapticNameFromFD(int fd) +static const char *SDL_SYS_HapticNameFromFD(int fd) { static char namebuf[128]; @@ -360,12 +348,10 @@ SDL_SYS_HapticNameFromFD(int fd) return namebuf; } - /* * Return the name of a haptic device, does not need to be opened. */ -const char * -SDL_SYS_HapticName(int index) +const char *SDL_SYS_HapticName(int index) { SDL_hapticlist_item *item; int fd; @@ -389,12 +375,10 @@ SDL_SYS_HapticName(int index) return name; } - /* * Opens the haptic device from the file descriptor. */ -static int -SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) +static int SDL_SYS_HapticOpenFromFD(SDL_Haptic *haptic, int fd) { /* Allocate the hwdata */ haptic->hwdata = (struct haptic_hwdata *) @@ -408,7 +392,7 @@ SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) /* Set the data. */ haptic->hwdata->fd = fd; haptic->supported = EV_IsHaptic(fd); - haptic->naxes = 2; /* Hardcoded for now, not sure if it's possible to find out. */ + haptic->naxes = 2; /* Hardcoded for now, not sure if it's possible to find out. */ /* Set the effects */ if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) { @@ -416,7 +400,7 @@ SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) strerror(errno)); goto open_err; } - haptic->nplaying = haptic->neffects; /* Linux makes no distinction. */ + haptic->nplaying = haptic->neffects; /* Linux makes no distinction. */ haptic->effects = (struct haptic_effect *) SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); if (haptic->effects == NULL) { @@ -430,7 +414,7 @@ SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) return 0; /* Error handling */ - open_err: +open_err: close(fd); if (haptic->hwdata != NULL) { SDL_free(haptic->hwdata); @@ -439,12 +423,10 @@ SDL_SYS_HapticOpenFromFD(SDL_Haptic * haptic, int fd) return -1; } - /* * Opens a haptic device for usage. */ -int -SDL_SYS_HapticOpen(SDL_Haptic * haptic) +int SDL_SYS_HapticOpen(SDL_Haptic *haptic) { int fd; int ret; @@ -465,16 +447,14 @@ SDL_SYS_HapticOpen(SDL_Haptic * haptic) } /* Set the fname. */ - haptic->hwdata->fname = SDL_strdup( item->fname ); + haptic->hwdata->fname = SDL_strdup(item->fname); return 0; } - /* * Opens a haptic device from first mouse it finds for usage. */ -int -SDL_SYS_HapticMouse(void) +int SDL_SYS_HapticMouse(void) { int fd; int device_index = 0; @@ -502,14 +482,14 @@ SDL_SYS_HapticMouse(void) return -1; } - /* * Checks to see if a joystick has haptic features. */ -int -SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) +int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_LINUX + SDL_AssertJoysticksLocked(); + if (joystick->driver != &SDL_LINUX_JoystickDriver) { return SDL_FALSE; } @@ -520,14 +500,14 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) return SDL_FALSE; } - /* * Checks to see if the haptic device and joystick are in reality the same. */ -int -SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_LINUX + SDL_AssertJoysticksLocked(); + if (joystick->driver != &SDL_LINUX_JoystickDriver) { return 0; } @@ -540,19 +520,19 @@ SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) return 0; } - /* * Opens a SDL_Haptic from a SDL_Joystick. */ -int -SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_LINUX int device_index = 0; int fd; int ret; SDL_hapticlist_item *item; - + + SDL_AssertJoysticksLocked(); + if (joystick->driver != &SDL_LINUX_JoystickDriver) { return -1; } @@ -579,7 +559,7 @@ SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) return -1; } - haptic->hwdata->fname = SDL_strdup( joystick->hwdata->fname ); + haptic->hwdata->fname = SDL_strdup(joystick->hwdata->fname); return 0; #else @@ -587,12 +567,10 @@ SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) #endif } - /* * Closes the haptic device. */ -void -SDL_SYS_HapticClose(SDL_Haptic * haptic) +void SDL_SYS_HapticClose(SDL_Haptic *haptic) { if (haptic->hwdata) { @@ -614,12 +592,10 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) SDL_memset(haptic, 0, sizeof(SDL_Haptic)); } - /* * Clean up after system specific haptic stuff */ -void -SDL_SYS_HapticQuit(void) +void SDL_SYS_HapticQuit(void) { SDL_hapticlist_item *item = NULL; SDL_hapticlist_item *next = NULL; @@ -642,12 +618,10 @@ SDL_SYS_HapticQuit(void) SDL_hapticlist_tail = NULL; } - /* * Converts an SDL button to a ff_trigger button. */ -static Uint16 -SDL_SYS_ToButton(Uint16 button) +static Uint16 SDL_SYS_ToButton(Uint16 button) { Uint16 ff_button; @@ -664,12 +638,10 @@ SDL_SYS_ToButton(Uint16 button) return ff_button; } - /* * Initializes the ff_effect usable direction from a SDL_HapticDirection. */ -static int -SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src) +static int SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection *src) { Uint32 tmp; @@ -687,29 +659,29 @@ SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src) i.e. the opposite convention of SDL directions. */ tmp = ((src->dir[0] % 36000) * 0x8000) / 18000; /* convert to range [0,0xFFFF] */ - *dest = (Uint16) tmp; + *dest = (Uint16)tmp; break; case SDL_HAPTIC_SPHERICAL: - /* - We convert to polar, because that's the only supported direction on Linux. - The first value of a spherical direction is practically the same as a - Polar direction, except that we have to add 90 degrees. It is the angle - from EAST {1,0} towards SOUTH {0,1}. - --> add 9000 - --> finally convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. - */ - tmp = ((src->dir[0]) + 9000) % 36000; /* Convert to polars */ - tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */ - *dest = (Uint16) tmp; + /* + We convert to polar, because that's the only supported direction on Linux. + The first value of a spherical direction is practically the same as a + Polar direction, except that we have to add 90 degrees. It is the angle + from EAST {1,0} towards SOUTH {0,1}. + --> add 9000 + --> finally convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. + */ + tmp = ((src->dir[0]) + 9000) % 36000; /* Convert to polars */ + tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */ + *dest = (Uint16)tmp; break; case SDL_HAPTIC_CARTESIAN: - if (!src->dir[1]) + if (!src->dir[1]) { *dest = (src->dir[0] >= 0 ? 0x4000 : 0xC000); - else if (!src->dir[0]) + } else if (!src->dir[0]) { *dest = (src->dir[1] >= 0 ? 0x8000 : 0); - else { + } else { float f = SDL_atan2(src->dir[1], src->dir[0]); /* Ideally we'd use fixed point math instead of floats... */ /* SDL_atan2 takes the parameters: Y-axis-value and X-axis-value (in that order) @@ -723,7 +695,7 @@ SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src) */ tmp = (((Sint32) (f * 18000. / M_PI)) + 45000) % 36000; tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */ - *dest = (Uint16) tmp; + *dest = (Uint16)tmp; } break; case SDL_HAPTIC_STEERING_AXIS: @@ -736,14 +708,12 @@ SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src) return 0; } - -#define CLAMP(x) (((x) > 32767) ? 32767 : x) +#define CLAMP(x) (((x) > 32767) ? 32767 : x) /* * Initializes the Linux effect struct from a haptic_effect. * Values above 32767 (for unsigned) are unspecified so we must clamp. */ -static int -SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) +static int SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect *src) { SDL_HapticConstant *constant; SDL_HapticPeriodic *periodic; @@ -760,12 +730,12 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) /* Header */ dest->type = FF_CONSTANT; - if (SDL_SYS_ToDirection(&dest->direction, &constant->direction) == -1) + if (SDL_SYS_ToDirection(&dest->direction, &constant->direction) == -1) { return -1; + } /* Replay */ - dest->replay.length = (constant->length == SDL_HAPTIC_INFINITY) ? - 0 : CLAMP(constant->length); + dest->replay.length = (constant->length == SDL_HAPTIC_INFINITY) ? 0 : CLAMP(constant->length); dest->replay.delay = CLAMP(constant->delay); /* Trigger */ @@ -795,12 +765,12 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) /* Header */ dest->type = FF_PERIODIC; - if (SDL_SYS_ToDirection(&dest->direction, &periodic->direction) == -1) + if (SDL_SYS_ToDirection(&dest->direction, &periodic->direction) == -1) { return -1; + } /* Replay */ - dest->replay.length = (periodic->length == SDL_HAPTIC_INFINITY) ? - 0 : CLAMP(periodic->length); + dest->replay.length = (periodic->length == SDL_HAPTIC_INFINITY) ? 0 : CLAMP(periodic->length); dest->replay.delay = CLAMP(periodic->delay); /* Trigger */ @@ -808,17 +778,18 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) dest->trigger.interval = CLAMP(periodic->interval); /* Periodic */ - if (periodic->type == SDL_HAPTIC_SINE) + if (periodic->type == SDL_HAPTIC_SINE) { dest->u.periodic.waveform = FF_SINE; - /* !!! FIXME: put this back when we have more bits in 2.1 */ - /* else if (periodic->type == SDL_HAPTIC_SQUARE) - dest->u.periodic.waveform = FF_SQUARE; */ - else if (periodic->type == SDL_HAPTIC_TRIANGLE) + /* !!! FIXME: put this back when we have more bits in 2.1 */ + /* else if (periodic->type == SDL_HAPTIC_SQUARE) + dest->u.periodic.waveform = FF_SQUARE; */ + } else if (periodic->type == SDL_HAPTIC_TRIANGLE) { dest->u.periodic.waveform = FF_TRIANGLE; - else if (periodic->type == SDL_HAPTIC_SAWTOOTHUP) + } else if (periodic->type == SDL_HAPTIC_SAWTOOTHUP) { dest->u.periodic.waveform = FF_SAW_UP; - else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN) + } else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN) { dest->u.periodic.waveform = FF_SAW_DOWN; + } dest->u.periodic.period = CLAMP(periodic->period); dest->u.periodic.magnitude = periodic->magnitude; dest->u.periodic.offset = periodic->offset; @@ -842,19 +813,20 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) condition = &src->condition; /* Header */ - if (condition->type == SDL_HAPTIC_SPRING) + if (condition->type == SDL_HAPTIC_SPRING) { dest->type = FF_SPRING; - else if (condition->type == SDL_HAPTIC_DAMPER) + } else if (condition->type == SDL_HAPTIC_DAMPER) { dest->type = FF_DAMPER; - else if (condition->type == SDL_HAPTIC_INERTIA) + } else if (condition->type == SDL_HAPTIC_INERTIA) { dest->type = FF_INERTIA; - else if (condition->type == SDL_HAPTIC_FRICTION) + } else if (condition->type == SDL_HAPTIC_FRICTION) { dest->type = FF_FRICTION; - dest->direction = 0; /* Handled by the condition-specifics. */ + } + + dest->direction = 0; /* Handled by the condition-specifics. */ /* Replay */ - dest->replay.length = (condition->length == SDL_HAPTIC_INFINITY) ? - 0 : CLAMP(condition->length); + dest->replay.length = (condition->length == SDL_HAPTIC_INFINITY) ? 0 : CLAMP(condition->length); dest->replay.delay = CLAMP(condition->delay); /* Trigger */ @@ -888,12 +860,12 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) /* Header */ dest->type = FF_RAMP; - if (SDL_SYS_ToDirection(&dest->direction, &ramp->direction) == -1) + if (SDL_SYS_ToDirection(&dest->direction, &ramp->direction) == -1) { return -1; + } /* Replay */ - dest->replay.length = (ramp->length == SDL_HAPTIC_INFINITY) ? - 0 : CLAMP(ramp->length); + dest->replay.length = (ramp->length == SDL_HAPTIC_INFINITY) ? 0 : CLAMP(ramp->length); dest->replay.delay = CLAMP(ramp->delay); /* Trigger */ @@ -920,8 +892,7 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) dest->direction = 0; /* Replay */ - dest->replay.length = (leftright->length == SDL_HAPTIC_INFINITY) ? - 0 : CLAMP(leftright->length); + dest->replay.length = (leftright->length == SDL_HAPTIC_INFINITY) ? 0 : CLAMP(leftright->length); /* Trigger */ dest->trigger.button = 0; @@ -933,7 +904,6 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) break; - default: return SDL_SetError("Haptic: Unknown effect type."); } @@ -941,13 +911,11 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) return 0; } - /* * Creates a new haptic effect. */ -int -SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - SDL_HapticEffect * base) +int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + SDL_HapticEffect *base) { struct ff_effect *linux_effect; @@ -963,7 +931,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, if (SDL_SYS_ToFFEffect(linux_effect, base) != 0) { goto new_effect_err; } - linux_effect->id = -1; /* Have the kernel give it an id */ + linux_effect->id = -1; /* Have the kernel give it an id */ /* Upload the effect */ if (ioctl(haptic->hwdata->fd, EVIOCSFF, linux_effect) < 0) { @@ -974,23 +942,21 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, return 0; - new_effect_err: +new_effect_err: SDL_free(effect->hweffect); effect->hweffect = NULL; return -1; } - /* * Updates an effect. * * Note: Dynamically updating the direction can in some cases force * the effect to restart and run once. */ -int -SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, - SDL_HapticEffect * data) +int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, + SDL_HapticEffect *data) { struct ff_effect linux_effect; @@ -1013,13 +979,11 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, return effect->hweffect->effect.id; } - /* * Runs an effect. */ -int -SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - Uint32 iterations) +int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + Uint32 iterations) { struct input_event run; @@ -1029,19 +993,17 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, /* We don't actually have infinity here, so we just do INT_MAX which is pretty damn close. */ run.value = (iterations > INT_MAX) ? INT_MAX : iterations; - if (write(haptic->hwdata->fd, (const void *) &run, sizeof(run)) < 0) { + if (write(haptic->hwdata->fd, (const void *)&run, sizeof(run)) < 0) { return SDL_SetError("Haptic: Unable to run the effect: %s", strerror(errno)); } return 0; } - /* * Stops an effect. */ -int -SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { struct input_event stop; @@ -1049,7 +1011,7 @@ SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) stop.code = effect->hweffect->effect.id; stop.value = 0; - if (write(haptic->hwdata->fd, (const void *) &stop, sizeof(stop)) < 0) { + if (write(haptic->hwdata->fd, (const void *)&stop, sizeof(stop)) < 0) { return SDL_SetError("Haptic: Unable to stop the effect: %s", strerror(errno)); } @@ -1057,12 +1019,10 @@ SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) return 0; } - /* * Frees the effect. */ -void -SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { if (ioctl(haptic->hwdata->fd, EVIOCRMFF, effect->hweffect->effect.id) < 0) { SDL_SetError("Haptic: Error removing the effect from the device: %s", @@ -1072,15 +1032,13 @@ SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) effect->hweffect = NULL; } - /* * Gets the status of a haptic effect. */ -int -SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, - struct haptic_effect *effect) +int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, + struct haptic_effect *effect) { -#if 0 /* Not supported atm. */ +#if 0 /* Not supported atm. */ struct input_event ie; ie.type = EV_FF; @@ -1097,12 +1055,10 @@ SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, return -1; } - /* * Sets the gain. */ -int -SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain) { struct input_event ie; @@ -1117,12 +1073,10 @@ SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) return 0; } - /* * Sets the autocentering. */ -int -SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { struct input_event ie; @@ -1137,32 +1091,26 @@ SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) return 0; } - /* * Pausing is not supported atm by linux. */ -int -SDL_SYS_HapticPause(SDL_Haptic * haptic) +int SDL_SYS_HapticPause(SDL_Haptic *haptic) { return -1; } - /* * Unpausing is not supported atm by linux. */ -int -SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +int SDL_SYS_HapticUnpause(SDL_Haptic *haptic) { return -1; } - /* * Stops all the currently playing effects. */ -int -SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +int SDL_SYS_HapticStopAll(SDL_Haptic *haptic) { int i, ret; @@ -1171,8 +1119,7 @@ SDL_SYS_HapticStopAll(SDL_Haptic * haptic) if (haptic->effects[i].hweffect != NULL) { ret = SDL_SYS_HapticStopEffect(haptic, &haptic->effects[i]); if (ret < 0) { - return SDL_SetError - ("Haptic: Error while trying to stop all playing effects."); + return SDL_SetError("Haptic: Error while trying to stop all playing effects."); } } } diff --git a/modules/SDL2/src/haptic/windows/SDL_dinputhaptic.c b/modules/SDL2/src/haptic/windows/SDL_dinputhaptic.c index 0abb37f..5a096be 100644 --- a/modules/SDL2/src/haptic/windows/SDL_dinputhaptic.c +++ b/modules/SDL2/src/haptic/windows/SDL_dinputhaptic.c @@ -37,8 +37,11 @@ /* * External stuff. */ +#ifdef SDL_VIDEO_DRIVER_WINDOWS extern HWND SDL_HelperWindow; - +#else +static const HWND SDL_HelperWindow = NULL; +#endif /* * Internal stuff. @@ -46,12 +49,10 @@ extern HWND SDL_HelperWindow; static SDL_bool coinitialized = SDL_FALSE; static LPDIRECTINPUT8 dinput = NULL; - /* * Like SDL_SetError but for DX error codes. */ -static int -DI_SetError(const char *str, HRESULT err) +static int DI_SetError(const char *str, HRESULT err) { return SDL_SetError("Haptic error %s", str); } @@ -59,22 +60,20 @@ DI_SetError(const char *str, HRESULT err) /* * Callback to find the haptic devices. */ -static BOOL CALLBACK -EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) +static BOOL CALLBACK EnumHapticsCallback(const DIDEVICEINSTANCE *pdidInstance, VOID *pContext) { - (void) pContext; + (void)pContext; SDL_DINPUT_HapticMaybeAddDevice(pdidInstance); - return DIENUM_CONTINUE; /* continue enumerating */ + return DIENUM_CONTINUE; /* continue enumerating */ } -int -SDL_DINPUT_HapticInit(void) +int SDL_DINPUT_HapticInit(void) { HRESULT ret; HINSTANCE instance; DWORD devClass; - if (dinput != NULL) { /* Already open. */ + if (dinput != NULL) { /* Already open. */ return SDL_SetError("Haptic: SubSystem already open."); } @@ -91,7 +90,7 @@ SDL_DINPUT_HapticInit(void) coinitialized = SDL_TRUE; ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectInput8, (LPVOID *) &dinput); + &IID_IDirectInput8, (LPVOID *)&dinput); if (FAILED(ret)) { SDL_SYS_HapticQuit(); return DI_SetError("CoCreateInstance", ret); @@ -102,7 +101,7 @@ SDL_DINPUT_HapticInit(void) if (instance == NULL) { SDL_SYS_HapticQuit(); return SDL_SetError("GetModuleHandle() failed with error code %lu.", - GetLastError()); + GetLastError()); } ret = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION); if (FAILED(ret)) { @@ -122,7 +121,7 @@ SDL_DINPUT_HapticInit(void) EnumHapticsCallback, NULL, DIEDFL_FORCEFEEDBACK | - DIEDFL_ATTACHEDONLY); + DIEDFL_ATTACHEDONLY); if (FAILED(ret)) { SDL_SYS_HapticQuit(); return DI_SetError("Enumerating DirectInput devices", ret); @@ -132,8 +131,7 @@ SDL_DINPUT_HapticInit(void) return 0; } -int -SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance) +int SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE *pdidInstance) { HRESULT ret; LPDIRECTINPUTDEVICE8 device; @@ -142,13 +140,13 @@ SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance) SDL_hapticlist_item *item = NULL; if (dinput == NULL) { - return -1; /* not initialized. We'll pick these up on enumeration if we init later. */ + return -1; /* not initialized. We'll pick these up on enumeration if we init later. */ } /* Make sure we don't already have it */ for (item = SDL_hapticlist; item; item = item->next) { if ((!item->bXInputHaptic) && (SDL_memcmp(&item->instance, pdidInstance, sizeof(*pdidInstance)) == 0)) { - return -1; /* Already added */ + return -1; /* Already added */ } } @@ -170,7 +168,7 @@ SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance) } if ((capabilities.dwFlags & needflags) != needflags) { - return -1; /* not a device we can use. */ + return -1; /* not a device we can use. */ } item = (SDL_hapticlist_item *)SDL_calloc(1, sizeof(SDL_hapticlist_item)); @@ -191,14 +189,13 @@ SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance) return SDL_SYS_AddHapticDevice(item); } -int -SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance) +int SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE *pdidInstance) { SDL_hapticlist_item *item; SDL_hapticlist_item *prev = NULL; if (dinput == NULL) { - return -1; /* not initialized, ignore this. */ + return -1; /* not initialized, ignore this. */ } for (item = SDL_hapticlist; item != NULL; item = item->next) { @@ -214,10 +211,9 @@ SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance) /* * Callback to get supported axes. */ -static BOOL CALLBACK -DI_DeviceObjectCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) +static BOOL CALLBACK DI_DeviceObjectCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) { - SDL_Haptic *haptic = (SDL_Haptic *) pvRef; + SDL_Haptic *haptic = (SDL_Haptic *)pvRef; if ((dev->dwType & DIDFT_AXIS) && (dev->dwFlags & DIDOI_FFACTUATOR)) { const GUID *guid = &dev->guidType; @@ -235,7 +231,7 @@ DI_DeviceObjectCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) } else if (WIN_IsEqualGUID(guid, &GUID_RzAxis)) { offset = DIJOFS_RZ; } else { - return DIENUM_CONTINUE; /* can't use this, go on. */ + return DIENUM_CONTINUE; /* can't use this, go on. */ } haptic->hwdata->axes[haptic->naxes] = offset; @@ -253,14 +249,13 @@ DI_DeviceObjectCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) /* * Callback to get all supported effects. */ -#define EFFECT_TEST(e,s) \ -if (WIN_IsEqualGUID(&pei->guid, &(e))) \ - haptic->supported |= (s) -static BOOL CALLBACK -DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv) +#define EFFECT_TEST(e, s) \ + if (WIN_IsEqualGUID(&pei->guid, &(e))) \ + haptic->supported |= (s) +static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv) { /* Prepare the haptic device. */ - SDL_Haptic *haptic = (SDL_Haptic *) pv; + SDL_Haptic *haptic = (SDL_Haptic *)pv; /* Get supported. */ EFFECT_TEST(GUID_Spring, SDL_HAPTIC_SPRING); @@ -291,8 +286,7 @@ DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv) * - Reset actuators. * - Get supported features. */ -static int -SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device8, SDL_bool is_joystick) +static int SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic *haptic, LPDIRECTINPUTDEVICE8 device8, SDL_bool is_joystick) { HRESULT ret; DIPROPDWORD dipdw; @@ -315,12 +309,12 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device !!! FIXME: to work, and that's probably the common case. Still, !!! FIXME: ideally, We need to unify the opening code. */ - if (!is_joystick) { /* if is_joystick, we already set this up elsewhere. */ + if (!is_joystick) { /* if is_joystick, we already set this up elsewhere. */ /* Grab it exclusively to use force feedback stuff. */ ret = IDirectInputDevice8_SetCooperativeLevel(haptic->hwdata->device, SDL_HelperWindow, DISCL_EXCLUSIVE | - DISCL_BACKGROUND); + DISCL_BACKGROUND); if (FAILED(ret)) { DI_SetError("Setting cooperative level to exclusive", ret); goto acquire_err; @@ -334,7 +328,6 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device goto acquire_err; } - /* Acquire the device. */ ret = IDirectInputDevice8_Acquire(haptic->hwdata->device); if (FAILED(ret)) { @@ -376,7 +369,7 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device DI_SetError("Enumerating supported effects", ret); goto acquire_err; } - if (haptic->supported == 0) { /* Error since device supports nothing. */ + if (haptic->supported == 0) { /* Error since device supports nothing. */ SDL_SetError("Haptic: Internal error on finding supported effects."); goto acquire_err; } @@ -389,7 +382,7 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device dipdw.dwData = 10000; ret = IDirectInputDevice8_SetProperty(haptic->hwdata->device, DIPROP_FFGAIN, &dipdw.diph); - if (!FAILED(ret)) { /* Gain is supported. */ + if (!FAILED(ret)) { /* Gain is supported. */ haptic->supported |= SDL_HAPTIC_GAIN; } dipdw.diph.dwObj = 0; @@ -397,7 +390,7 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device dipdw.dwData = DIPROPAUTOCENTER_OFF; ret = IDirectInputDevice8_SetProperty(haptic->hwdata->device, DIPROP_AUTOCENTER, &dipdw.diph); - if (!FAILED(ret)) { /* Autocenter is supported. */ + if (!FAILED(ret)) { /* Autocenter is supported. */ haptic->supported |= SDL_HAPTIC_AUTOCENTER; } @@ -405,11 +398,11 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device haptic->supported |= SDL_HAPTIC_STATUS | SDL_HAPTIC_PAUSE; /* Check maximum effects. */ - haptic->neffects = 128; /* This is not actually supported as thus under windows, - there is no way to tell the number of EFFECTS that a - device can hold, so we'll just use a "random" number - instead and put warnings in SDL_haptic.h */ - haptic->nplaying = 128; /* Even more impossible to get this then neffects. */ + haptic->neffects = 128; /* This is not actually supported as thus under windows, + there is no way to tell the number of EFFECTS that a + device can hold, so we'll just use a "random" number + instead and put warnings in SDL_haptic.h */ + haptic->nplaying = 128; /* Even more impossible to get this then neffects. */ /* Prepare effects memory. */ haptic->effects = (struct haptic_effect *) @@ -425,20 +418,19 @@ SDL_DINPUT_HapticOpenFromDevice(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE8 device return 0; /* Error handling */ - acquire_err: +acquire_err: IDirectInputDevice8_Unacquire(haptic->hwdata->device); return -1; } -int -SDL_DINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item) +int SDL_DINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item) { HRESULT ret; LPDIRECTINPUTDEVICE8 device; /* Open the device */ ret = IDirectInput8_CreateDevice(dinput, &item->instance.guidInstance, - &device, NULL); + &device, NULL); if (FAILED(ret)) { DI_SetError("Creating DirectInput device", ret); return -1; @@ -451,8 +443,7 @@ SDL_DINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item) return 0; } -int -SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { HRESULT ret; DIDEVICEINSTANCE hap_instance, joy_instance; @@ -462,12 +453,12 @@ SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) /* Get the device instances. */ ret = IDirectInputDevice8_GetDeviceInfo(haptic->hwdata->device, - &hap_instance); + &hap_instance); if (FAILED(ret)) { return 0; } ret = IDirectInputDevice8_GetDeviceInfo(joystick->hwdata->InputDevice, - &joy_instance); + &joy_instance); if (FAILED(ret)) { return 0; } @@ -475,8 +466,7 @@ SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) return WIN_IsEqualGUID(&hap_instance.guidInstance, &joy_instance.guidInstance); } -int -SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { SDL_hapticlist_item *item; int index = 0; @@ -501,8 +491,7 @@ SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) return SDL_SetError("Couldn't find joystick in haptic device list"); } -void -SDL_DINPUT_HapticClose(SDL_Haptic * haptic) +void SDL_DINPUT_HapticClose(SDL_Haptic *haptic) { IDirectInputDevice8_Unacquire(haptic->hwdata->device); @@ -512,8 +501,7 @@ SDL_DINPUT_HapticClose(SDL_Haptic * haptic) } } -void -SDL_DINPUT_HapticQuit(void) +void SDL_DINPUT_HapticQuit(void) { if (dinput != NULL) { IDirectInput8_Release(dinput); @@ -529,8 +517,7 @@ SDL_DINPUT_HapticQuit(void) /* * Converts an SDL trigger button to an DIEFFECT trigger button. */ -static DWORD -DIGetTriggerButton(Uint16 button) +static DWORD DIGetTriggerButton(Uint16 button) { DWORD dwTriggerButton; @@ -543,18 +530,16 @@ DIGetTriggerButton(Uint16 button) return dwTriggerButton; } - /* * Sets the direction. */ -static int -SDL_SYS_SetDirection(DIEFFECT * effect, SDL_HapticDirection * dir, int naxes) +static int SDL_SYS_SetDirection(DIEFFECT *effect, SDL_HapticDirection *dir, int naxes) { LONG *rglDir; /* Handle no axes a part. */ if (naxes == 0) { - effect->dwFlags |= DIEFF_SPHERICAL; /* Set as default. */ + effect->dwFlags |= DIEFF_SPHERICAL; /* Set as default. */ effect->rglDirection = NULL; return 0; } @@ -575,18 +560,22 @@ SDL_SYS_SetDirection(DIEFFECT * effect, SDL_HapticDirection * dir, int naxes) case SDL_HAPTIC_CARTESIAN: effect->dwFlags |= DIEFF_CARTESIAN; rglDir[0] = dir->dir[0]; - if (naxes > 1) + if (naxes > 1) { rglDir[1] = dir->dir[1]; - if (naxes > 2) + } + if (naxes > 2) { rglDir[2] = dir->dir[2]; + } return 0; case SDL_HAPTIC_SPHERICAL: effect->dwFlags |= DIEFF_SPHERICAL; rglDir[0] = dir->dir[0]; - if (naxes > 1) + if (naxes > 1) { rglDir[1] = dir->dir[1]; - if (naxes > 2) + } + if (naxes > 2) { rglDir[2] = dir->dir[2]; + } return 0; case SDL_HAPTIC_STEERING_AXIS: effect->dwFlags |= DIEFF_CARTESIAN; @@ -599,20 +588,19 @@ SDL_SYS_SetDirection(DIEFFECT * effect, SDL_HapticDirection * dir, int naxes) } /* Clamps and converts. */ -#define CCONVERT(x) (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF) +#define CCONVERT(x) (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF) /* Just converts. */ -#define CONVERT(x) (((x)*10000) / 0x7FFF) +#define CONVERT(x) (((x)*10000) / 0x7FFF) /* * Creates the DIEFFECT from a SDL_HapticEffect. */ -static int -SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, - SDL_HapticEffect * src) +static int SDL_SYS_ToDIEFFECT(SDL_Haptic *haptic, DIEFFECT *dest, + SDL_HapticEffect *src) { int i; DICONSTANTFORCE *constant; DIPERIODIC *periodic; - DICONDITION *condition; /* Actually an array of conditions - one per axis. */ + DICONDITION *condition; /* Actually an array of conditions - one per axis. */ DIRAMPFORCE *ramp; DICUSTOMFORCE *custom; DIENVELOPE *envelope; @@ -625,10 +613,10 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, /* Set global stuff. */ SDL_memset(dest, 0, sizeof(DIEFFECT)); - dest->dwSize = sizeof(DIEFFECT); /* Set the structure size. */ - dest->dwSamplePeriod = 0; /* Not used by us. */ - dest->dwGain = 10000; /* Gain is set globally, not locally. */ - dest->dwFlags = DIEFF_OBJECTOFFSETS; /* Seems obligatory. */ + dest->dwSize = sizeof(DIEFFECT); /* Set the structure size. */ + dest->dwSamplePeriod = 0; /* Not used by us. */ + dest->dwGain = 10000; /* Gain is set globally, not locally. */ + dest->dwFlags = DIEFF_OBJECTOFFSETS; /* Seems obligatory. */ /* Envelope. */ envelope = SDL_malloc(sizeof(DIENVELOPE)); @@ -637,7 +625,7 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, } SDL_memset(envelope, 0, sizeof(DIENVELOPE)); dest->lpEnvelope = envelope; - envelope->dwSize = sizeof(DIENVELOPE); /* Always should be this. */ + envelope->dwSize = sizeof(DIENVELOPE); /* Always should be this. */ /* Axes. */ if (src->constant.direction.type == SDL_HAPTIC_STEERING_AXIS) { @@ -650,7 +638,7 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, if (axes == NULL) { return SDL_OutOfMemory(); } - axes[0] = haptic->hwdata->axes[0]; /* Always at least one axis. */ + axes[0] = haptic->hwdata->axes[0]; /* Always at least one axis. */ if (dest->cAxes > 1) { axes[1] = haptic->hwdata->axes[1]; } @@ -676,10 +664,10 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, dest->lpvTypeSpecificParams = constant; /* Generics */ - dest->dwDuration = hap_constant->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_constant->length * 1000UL; /* In microseconds. */ dest->dwTriggerButton = DIGetTriggerButton(hap_constant->button); dest->dwTriggerRepeatInterval = hap_constant->interval; - dest->dwStartDelay = hap_constant->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_constant->delay * 1000UL; /* In microseconds. */ /* Direction. */ if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) < 0) { @@ -687,15 +675,14 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, } /* Envelope */ - if ((hap_constant->attack_length == 0) - && (hap_constant->fade_length == 0)) { + if ((hap_constant->attack_length == 0) && (hap_constant->fade_length == 0)) { SDL_free(dest->lpEnvelope); dest->lpEnvelope = NULL; } else { envelope->dwAttackLevel = CCONVERT(hap_constant->attack_level); - envelope->dwAttackTime = hap_constant->attack_length * 1000; + envelope->dwAttackTime = hap_constant->attack_length * 1000UL; envelope->dwFadeLevel = CCONVERT(hap_constant->fade_level); - envelope->dwFadeTime = hap_constant->fade_length * 1000; + envelope->dwFadeTime = hap_constant->fade_length * 1000UL; } break; @@ -717,33 +704,31 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, periodic->dwMagnitude = CONVERT(SDL_abs(hap_periodic->magnitude)); periodic->lOffset = CONVERT(hap_periodic->offset); periodic->dwPhase = - (hap_periodic->phase + (hap_periodic->magnitude < 0 ? 18000 : 0)) % 36000; + (hap_periodic->phase + (hap_periodic->magnitude < 0 ? 18000 : 0)) % 36000; periodic->dwPeriod = hap_periodic->period * 1000; dest->cbTypeSpecificParams = sizeof(DIPERIODIC); dest->lpvTypeSpecificParams = periodic; /* Generics */ - dest->dwDuration = hap_periodic->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_periodic->length * 1000UL; /* In microseconds. */ dest->dwTriggerButton = DIGetTriggerButton(hap_periodic->button); dest->dwTriggerRepeatInterval = hap_periodic->interval; - dest->dwStartDelay = hap_periodic->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_periodic->delay * 1000UL; /* In microseconds. */ /* Direction. */ - if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) - < 0) { + if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) < 0) { return -1; } /* Envelope */ - if ((hap_periodic->attack_length == 0) - && (hap_periodic->fade_length == 0)) { + if ((hap_periodic->attack_length == 0) && (hap_periodic->fade_length == 0)) { SDL_free(dest->lpEnvelope); dest->lpEnvelope = NULL; } else { envelope->dwAttackLevel = CCONVERT(hap_periodic->attack_level); - envelope->dwAttackTime = hap_periodic->attack_length * 1000; + envelope->dwAttackTime = hap_periodic->attack_length * 1000UL; envelope->dwFadeLevel = CCONVERT(hap_periodic->fade_level); - envelope->dwFadeTime = hap_periodic->fade_length * 1000; + envelope->dwFadeTime = hap_periodic->fade_length * 1000UL; } break; @@ -760,7 +745,7 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, SDL_memset(condition, 0, sizeof(DICONDITION)); /* Specifics */ - for (i = 0; i < (int) dest->cAxes; i++) { + for (i = 0; i < (int)dest->cAxes; i++) { condition[i].lOffset = CONVERT(hap_condition->center[i]); condition[i].lPositiveCoefficient = CONVERT(hap_condition->right_coeff[i]); @@ -776,14 +761,13 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, dest->lpvTypeSpecificParams = condition; /* Generics */ - dest->dwDuration = hap_condition->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_condition->length * 1000UL; /* In microseconds. */ dest->dwTriggerButton = DIGetTriggerButton(hap_condition->button); dest->dwTriggerRepeatInterval = hap_condition->interval; - dest->dwStartDelay = hap_condition->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_condition->delay * 1000UL; /* In microseconds. */ /* Direction. */ - if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) - < 0) { + if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) < 0) { return -1; } @@ -808,10 +792,10 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, dest->lpvTypeSpecificParams = ramp; /* Generics */ - dest->dwDuration = hap_ramp->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_ramp->length * 1000UL; /* In microseconds. */ dest->dwTriggerButton = DIGetTriggerButton(hap_ramp->button); dest->dwTriggerRepeatInterval = hap_ramp->interval; - dest->dwStartDelay = hap_ramp->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_ramp->delay * 1000UL; /* In microseconds. */ /* Direction. */ if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { @@ -824,9 +808,9 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, dest->lpEnvelope = NULL; } else { envelope->dwAttackLevel = CCONVERT(hap_ramp->attack_level); - envelope->dwAttackTime = hap_ramp->attack_length * 1000; + envelope->dwAttackTime = hap_ramp->attack_length * 1000UL; envelope->dwFadeLevel = CCONVERT(hap_ramp->fade_level); - envelope->dwFadeTime = hap_ramp->fade_length * 1000; + envelope->dwFadeTime = hap_ramp->fade_length * 1000UL; } break; @@ -841,21 +825,21 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, /* Specifics */ custom->cChannels = hap_custom->channels; - custom->dwSamplePeriod = hap_custom->period * 1000; + custom->dwSamplePeriod = hap_custom->period * 1000UL; custom->cSamples = hap_custom->samples; custom->rglForceData = SDL_malloc(sizeof(LONG) * custom->cSamples * custom->cChannels); - for (i = 0; i < hap_custom->samples * hap_custom->channels; i++) { /* Copy data. */ + for (i = 0; i < hap_custom->samples * hap_custom->channels; i++) { /* Copy data. */ custom->rglForceData[i] = CCONVERT(hap_custom->data[i]); } dest->cbTypeSpecificParams = sizeof(DICUSTOMFORCE); dest->lpvTypeSpecificParams = custom; /* Generics */ - dest->dwDuration = hap_custom->length * 1000; /* In microseconds. */ + dest->dwDuration = hap_custom->length * 1000UL; /* In microseconds. */ dest->dwTriggerButton = DIGetTriggerButton(hap_custom->button); dest->dwTriggerRepeatInterval = hap_custom->interval; - dest->dwStartDelay = hap_custom->delay * 1000; /* In microseconds. */ + dest->dwStartDelay = hap_custom->delay * 1000UL; /* In microseconds. */ /* Direction. */ if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < 0) { @@ -863,15 +847,14 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, } /* Envelope */ - if ((hap_custom->attack_length == 0) - && (hap_custom->fade_length == 0)) { + if ((hap_custom->attack_length == 0) && (hap_custom->fade_length == 0)) { SDL_free(dest->lpEnvelope); dest->lpEnvelope = NULL; } else { envelope->dwAttackLevel = CCONVERT(hap_custom->attack_level); - envelope->dwAttackTime = hap_custom->attack_length * 1000; + envelope->dwAttackTime = hap_custom->attack_length * 1000UL; envelope->dwFadeLevel = CCONVERT(hap_custom->fade_level); - envelope->dwFadeTime = hap_custom->fade_length * 1000; + envelope->dwFadeTime = hap_custom->fade_length * 1000UL; } break; @@ -883,12 +866,10 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, return 0; } - /* * Frees an DIEFFECT allocated by SDL_SYS_ToDIEFFECT. */ -static void -SDL_SYS_HapticFreeDIEFFECT(DIEFFECT * effect, int type) +static void SDL_SYS_HapticFreeDIEFFECT(DIEFFECT *effect, int type) { DICUSTOMFORCE *custom; @@ -897,8 +878,8 @@ SDL_SYS_HapticFreeDIEFFECT(DIEFFECT * effect, int type) SDL_free(effect->rgdwAxes); effect->rgdwAxes = NULL; if (effect->lpvTypeSpecificParams != NULL) { - if (type == SDL_HAPTIC_CUSTOM) { /* Must free the custom data. */ - custom = (DICUSTOMFORCE *) effect->lpvTypeSpecificParams; + if (type == SDL_HAPTIC_CUSTOM) { /* Must free the custom data. */ + custom = (DICUSTOMFORCE *)effect->lpvTypeSpecificParams; SDL_free(custom->rglForceData); custom->rglForceData = NULL; } @@ -912,8 +893,8 @@ SDL_SYS_HapticFreeDIEFFECT(DIEFFECT * effect, int type) /* * Gets the effect type from the generic SDL haptic effect wrapper. */ -static REFGUID -SDL_SYS_HapticEffectType(SDL_HapticEffect * effect) +/* NOLINTNEXTLINE(readability-const-return-type): Can't fix Windows' headers */ +static REFGUID SDL_SYS_HapticEffectType(SDL_HapticEffect *effect) { switch (effect->type) { case SDL_HAPTIC_CONSTANT: @@ -922,9 +903,9 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect) case SDL_HAPTIC_RAMP: return &GUID_RampForce; - /* !!! FIXME: put this back when we have more bits in 2.1 */ - /* case SDL_HAPTIC_SQUARE: - return &GUID_Square; */ + /* !!! FIXME: put this back when we have more bits in 2.1 */ + /* case SDL_HAPTIC_SQUARE: + return &GUID_Square; */ case SDL_HAPTIC_SINE: return &GUID_Sine; @@ -957,8 +938,7 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect) return NULL; } } -int -SDL_DINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_DINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base) { HRESULT ret; REFGUID type = SDL_SYS_HapticEffectType(base); @@ -974,8 +954,8 @@ SDL_DINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SD /* Create the actual effect. */ ret = IDirectInputDevice8_CreateEffect(haptic->hwdata->device, type, - &effect->hweffect->effect, - &effect->hweffect->ref, NULL); + &effect->hweffect->effect, + &effect->hweffect->ref, NULL); if (FAILED(ret)) { DI_SetError("Unable to create effect", ret); goto err_effectdone; @@ -988,8 +968,7 @@ err_effectdone: return -1; } -int -SDL_DINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data) +int SDL_DINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data) { HRESULT ret; DWORD flags; @@ -1002,13 +981,13 @@ SDL_DINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, } /* Set the flags. Might be worthwhile to diff temp with loaded effect and - * only change those parameters. */ + * only change those parameters. */ flags = DIEP_DIRECTION | - DIEP_DURATION | - DIEP_ENVELOPE | - DIEP_STARTDELAY | - DIEP_TRIGGERBUTTON | - DIEP_TRIGGERREPEATINTERVAL | DIEP_TYPESPECIFICPARAMS; + DIEP_DURATION | + DIEP_ENVELOPE | + DIEP_STARTDELAY | + DIEP_TRIGGERBUTTON | + DIEP_TRIGGERREPEATINTERVAL | DIEP_TYPESPECIFICPARAMS; /* Create the actual effect. */ ret = @@ -1042,8 +1021,7 @@ err_update: return -1; } -int -SDL_DINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations) +int SDL_DINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations) { HRESULT ret; DWORD iter; @@ -1063,8 +1041,7 @@ SDL_DINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Ui return 0; } -int -SDL_DINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_DINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { HRESULT ret; @@ -1075,8 +1052,7 @@ SDL_DINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) return 0; } -void -SDL_DINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_DINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { HRESULT ret; @@ -1087,8 +1063,7 @@ SDL_DINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect SDL_SYS_HapticFreeDIEFFECT(&effect->hweffect->effect, effect->effect.type); } -int -SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect) { HRESULT ret; DWORD status; @@ -1098,13 +1073,13 @@ SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effe return DI_SetError("Getting effect status", ret); } - if (status == 0) + if (status == 0) { return SDL_FALSE; + } return SDL_TRUE; } -int -SDL_DINPUT_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_DINPUT_HapticSetGain(SDL_Haptic *haptic, int gain) { HRESULT ret; DIPROPDWORD dipdw; @@ -1114,19 +1089,18 @@ SDL_DINPUT_HapticSetGain(SDL_Haptic * haptic, int gain) dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); dipdw.diph.dwObj = 0; dipdw.diph.dwHow = DIPH_DEVICE; - dipdw.dwData = gain * 100; /* 0 to 10,000 */ + dipdw.dwData = (DWORD)gain * 100; /* 0 to 10,000 */ /* Try to set the autocenter. */ ret = IDirectInputDevice8_SetProperty(haptic->hwdata->device, - DIPROP_FFGAIN, &dipdw.diph); + DIPROP_FFGAIN, &dipdw.diph); if (FAILED(ret)) { return DI_SetError("Setting gain", ret); } return 0; } -int -SDL_DINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_DINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { HRESULT ret; DIPROPDWORD dipdw; @@ -1136,54 +1110,50 @@ SDL_DINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); dipdw.diph.dwObj = 0; dipdw.diph.dwHow = DIPH_DEVICE; - dipdw.dwData = (autocenter == 0) ? DIPROPAUTOCENTER_OFF : - DIPROPAUTOCENTER_ON; + dipdw.dwData = (autocenter == 0) ? DIPROPAUTOCENTER_OFF : DIPROPAUTOCENTER_ON; /* Try to set the autocenter. */ ret = IDirectInputDevice8_SetProperty(haptic->hwdata->device, - DIPROP_AUTOCENTER, &dipdw.diph); + DIPROP_AUTOCENTER, &dipdw.diph); if (FAILED(ret)) { return DI_SetError("Setting autocenter", ret); } return 0; } -int -SDL_DINPUT_HapticPause(SDL_Haptic * haptic) +int SDL_DINPUT_HapticPause(SDL_Haptic *haptic) { HRESULT ret; /* Pause the device. */ ret = IDirectInputDevice8_SendForceFeedbackCommand(haptic->hwdata->device, - DISFFC_PAUSE); + DISFFC_PAUSE); if (FAILED(ret)) { return DI_SetError("Pausing the device", ret); } return 0; } -int -SDL_DINPUT_HapticUnpause(SDL_Haptic * haptic) +int SDL_DINPUT_HapticUnpause(SDL_Haptic *haptic) { HRESULT ret; /* Unpause the device. */ ret = IDirectInputDevice8_SendForceFeedbackCommand(haptic->hwdata->device, - DISFFC_CONTINUE); + DISFFC_CONTINUE); if (FAILED(ret)) { return DI_SetError("Pausing the device", ret); } return 0; } -int -SDL_DINPUT_HapticStopAll(SDL_Haptic * haptic) +int SDL_DINPUT_HapticStopAll(SDL_Haptic *haptic) { HRESULT ret; /* Try to stop the effects. */ ret = IDirectInputDevice8_SendForceFeedbackCommand(haptic->hwdata->device, - DISFFC_STOPALL); + DISFFC_STOPALL); if (FAILED(ret)) { return DI_SetError("Stopping the device", ret); } @@ -1195,113 +1165,94 @@ SDL_DINPUT_HapticStopAll(SDL_Haptic * haptic) typedef struct DIDEVICEINSTANCE DIDEVICEINSTANCE; typedef struct SDL_hapticlist_item SDL_hapticlist_item; -int -SDL_DINPUT_HapticInit(void) +int SDL_DINPUT_HapticInit(void) { return 0; } -int -SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance) +int SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE *pdidInstance) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance) +int SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE *pdidInstance) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item) +int SDL_DINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item) { return SDL_Unsupported(); } -int -SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { return SDL_Unsupported(); } -void -SDL_DINPUT_HapticClose(SDL_Haptic * haptic) +void SDL_DINPUT_HapticClose(SDL_Haptic *haptic) { } -void -SDL_DINPUT_HapticQuit(void) +void SDL_DINPUT_HapticQuit(void) { } -int -SDL_DINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_DINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data) +int SDL_DINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations) +int SDL_DINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_DINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_Unsupported(); } -void -SDL_DINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_DINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { } -int -SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_DINPUT_HapticSetGain(SDL_Haptic *haptic, int gain) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_DINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticPause(SDL_Haptic * haptic) +int SDL_DINPUT_HapticPause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticUnpause(SDL_Haptic * haptic) +int SDL_DINPUT_HapticUnpause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_DINPUT_HapticStopAll(SDL_Haptic * haptic) +int SDL_DINPUT_HapticStopAll(SDL_Haptic *haptic) { return SDL_Unsupported(); } diff --git a/modules/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h b/modules/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h index df88a72..fa61a0d 100644 --- a/modules/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h +++ b/modules/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h @@ -31,22 +31,22 @@ extern "C" { extern int SDL_DINPUT_HapticInit(void); extern int SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE *pdidInstance); extern int SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE *pdidInstance); -extern int SDL_DINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item); -extern int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick); -extern int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick); -extern void SDL_DINPUT_HapticClose(SDL_Haptic * haptic); +extern int SDL_DINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item); +extern int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick); +extern int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick); +extern void SDL_DINPUT_HapticClose(SDL_Haptic *haptic); extern void SDL_DINPUT_HapticQuit(void); -extern int SDL_DINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base); -extern int SDL_DINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data); -extern int SDL_DINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations); -extern int SDL_DINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect); -extern void SDL_DINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect); -extern int SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect); -extern int SDL_DINPUT_HapticSetGain(SDL_Haptic * haptic, int gain); -extern int SDL_DINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); -extern int SDL_DINPUT_HapticPause(SDL_Haptic * haptic); -extern int SDL_DINPUT_HapticUnpause(SDL_Haptic * haptic); -extern int SDL_DINPUT_HapticStopAll(SDL_Haptic * haptic); +extern int SDL_DINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base); +extern int SDL_DINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data); +extern int SDL_DINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations); +extern int SDL_DINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect); +extern void SDL_DINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect); +extern int SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect); +extern int SDL_DINPUT_HapticSetGain(SDL_Haptic *haptic, int gain); +extern int SDL_DINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter); +extern int SDL_DINPUT_HapticPause(SDL_Haptic *haptic); +extern int SDL_DINPUT_HapticUnpause(SDL_Haptic *haptic); +extern int SDL_DINPUT_HapticStopAll(SDL_Haptic *haptic); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/haptic/windows/SDL_windowshaptic.c b/modules/SDL2/src/haptic/windows/SDL_windowshaptic.c index 772ac75..01a4a7e 100644 --- a/modules/SDL2/src/haptic/windows/SDL_windowshaptic.c +++ b/modules/SDL2/src/haptic/windows/SDL_windowshaptic.c @@ -49,14 +49,12 @@ SDL_hapticlist_item *SDL_hapticlist = NULL; static SDL_hapticlist_item *SDL_hapticlist_tail = NULL; static int numhaptics = 0; - /* * Initializes the haptic subsystem. */ -int -SDL_SYS_HapticInit(void) +int SDL_SYS_HapticInit(void) { - JoyStick_DeviceData* device; + JoyStick_DeviceData *device; if (SDL_DINPUT_HapticInit() < 0) { return -1; @@ -81,8 +79,7 @@ SDL_SYS_HapticInit(void) return numhaptics; } -int -SDL_SYS_AddHapticDevice(SDL_hapticlist_item *item) +int SDL_SYS_AddHapticDevice(SDL_hapticlist_item *item) { if (SDL_hapticlist_tail == NULL) { SDL_hapticlist = SDL_hapticlist_tail = item; @@ -97,8 +94,7 @@ SDL_SYS_AddHapticDevice(SDL_hapticlist_item *item) return numhaptics; } -int -SDL_SYS_RemoveHapticDevice(SDL_hapticlist_item *prev, SDL_hapticlist_item *item) +int SDL_SYS_RemoveHapticDevice(SDL_hapticlist_item *prev, SDL_hapticlist_item *item) { const int retval = item->haptic ? item->haptic->index : -1; if (prev != NULL) { @@ -116,14 +112,12 @@ SDL_SYS_RemoveHapticDevice(SDL_hapticlist_item *prev, SDL_hapticlist_item *item) return retval; } -int -SDL_SYS_NumHaptics(void) +int SDL_SYS_NumHaptics(void) { return numhaptics; } -static SDL_hapticlist_item * -HapticByDevIndex(int device_index) +static SDL_hapticlist_item *HapticByDevIndex(int device_index) { SDL_hapticlist_item *item = SDL_hapticlist; @@ -142,8 +136,7 @@ HapticByDevIndex(int device_index) /* * Return the name of a haptic device, does not need to be opened. */ -const char * -SDL_SYS_HapticName(int index) +const char *SDL_SYS_HapticName(int index) { SDL_hapticlist_item *item = HapticByDevIndex(index); return item->name; @@ -152,8 +145,7 @@ SDL_SYS_HapticName(int index) /* * Opens a haptic device for usage. */ -int -SDL_SYS_HapticOpen(SDL_Haptic * haptic) +int SDL_SYS_HapticOpen(SDL_Haptic *haptic) { SDL_hapticlist_item *item = HapticByDevIndex(haptic->index); if (item->bXInputHaptic) { @@ -163,12 +155,10 @@ SDL_SYS_HapticOpen(SDL_Haptic * haptic) } } - /* * Opens a haptic device from first mouse it finds for usage. */ -int -SDL_SYS_HapticMouse(void) +int SDL_SYS_HapticMouse(void) { #if SDL_HAPTIC_DINPUT SDL_hapticlist_item *item; @@ -185,12 +175,10 @@ SDL_SYS_HapticMouse(void) return -1; } - /* * Checks to see if a joystick has haptic features. */ -int -SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) +int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick) { if (joystick->driver != &SDL_WINDOWS_JoystickDriver) { return 0; @@ -211,14 +199,13 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) /* * Checks to see if the haptic device and joystick are in reality the same. */ -int -SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { if (joystick->driver != &SDL_WINDOWS_JoystickDriver) { return 0; } if (joystick->hwdata->bXInputHaptic != haptic->hwdata->bXInputHaptic) { - return 0; /* one is XInput, one is not; not the same device. */ + return 0; /* one is XInput, one is not; not the same device. */ } else if (joystick->hwdata->bXInputHaptic) { return SDL_XINPUT_JoystickSameHaptic(haptic, joystick); } else { @@ -229,8 +216,7 @@ SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) /* * Opens a SDL_Haptic from a SDL_Joystick. */ -int -SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { SDL_assert(joystick->driver == &SDL_WINDOWS_JoystickDriver); @@ -244,8 +230,7 @@ SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) /* * Closes the haptic device. */ -void -SDL_SYS_HapticClose(SDL_Haptic * haptic) +void SDL_SYS_HapticClose(SDL_Haptic *haptic) { if (haptic->hwdata) { @@ -270,8 +255,7 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) /* * Clean up after system specific haptic stuff */ -void -SDL_SYS_HapticQuit(void) +void SDL_SYS_HapticQuit(void) { SDL_hapticlist_item *item; SDL_hapticlist_item *next = NULL; @@ -307,9 +291,8 @@ SDL_SYS_HapticQuit(void) /* * Creates a new haptic effect. */ -int -SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - SDL_HapticEffect * base) +int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + SDL_HapticEffect *base) { int result; @@ -337,10 +320,9 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, /* * Updates an effect. */ -int -SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, - struct haptic_effect *effect, - SDL_HapticEffect * data) +int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, + struct haptic_effect *effect, + SDL_HapticEffect *data) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticUpdateEffect(haptic, effect, data); @@ -352,9 +334,8 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, /* * Runs an effect. */ -int -SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, - Uint32 iterations) +int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, + Uint32 iterations) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticRunEffect(haptic, effect, iterations); @@ -366,8 +347,7 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, /* * Stops an effect. */ -int -SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticStopEffect(haptic, effect); @@ -379,8 +359,7 @@ SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) /* * Frees the effect. */ -void -SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { if (haptic->hwdata->bXInputHaptic) { SDL_XINPUT_HapticDestroyEffect(haptic, effect); @@ -394,9 +373,8 @@ SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) /* * Gets the status of a haptic effect. */ -int -SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, - struct haptic_effect *effect) +int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, + struct haptic_effect *effect) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticGetEffectStatus(haptic, effect); @@ -408,8 +386,7 @@ SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, /* * Sets the gain. */ -int -SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticSetGain(haptic, gain); @@ -421,8 +398,7 @@ SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) /* * Sets the autocentering. */ -int -SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticSetAutocenter(haptic, autocenter); @@ -434,8 +410,7 @@ SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) /* * Pauses the device. */ -int -SDL_SYS_HapticPause(SDL_Haptic * haptic) +int SDL_SYS_HapticPause(SDL_Haptic *haptic) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticPause(haptic); @@ -447,8 +422,7 @@ SDL_SYS_HapticPause(SDL_Haptic * haptic) /* * Pauses the device. */ -int -SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +int SDL_SYS_HapticUnpause(SDL_Haptic *haptic) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticUnpause(haptic); @@ -460,8 +434,7 @@ SDL_SYS_HapticUnpause(SDL_Haptic * haptic) /* * Stops all the playing effects on the device. */ -int -SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +int SDL_SYS_HapticStopAll(SDL_Haptic *haptic) { if (haptic->hwdata->bXInputHaptic) { return SDL_XINPUT_HapticStopAll(haptic); diff --git a/modules/SDL2/src/haptic/windows/SDL_windowshaptic_c.h b/modules/SDL2/src/haptic/windows/SDL_windowshaptic_c.h index 5fca749..9ed62dd 100644 --- a/modules/SDL2/src/haptic/windows/SDL_windowshaptic_c.h +++ b/modules/SDL2/src/haptic/windows/SDL_windowshaptic_c.h @@ -41,17 +41,16 @@ struct haptic_hwdata #if SDL_HAPTIC_DINPUT LPDIRECTINPUTDEVICE8 device; #endif - DWORD axes[3]; /* Axes to use. */ - SDL_bool is_joystick; /* Device is loaded as joystick. */ - Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ - Uint8 userid; /* XInput userid index for this joystick */ + DWORD axes[3]; /* Axes to use. */ + SDL_bool is_joystick; /* Device is loaded as joystick. */ + Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ + Uint8 userid; /* XInput userid index for this joystick */ SDL_Thread *thread; SDL_mutex *mutex; Uint32 stopTicks; SDL_atomic_t stopThread; }; - /* * Haptic system effect data. */ @@ -69,8 +68,8 @@ struct haptic_hweffect #endif /* -* List of available haptic devices. -*/ + * List of available haptic devices. + */ typedef struct SDL_hapticlist_item { char *name; @@ -80,7 +79,7 @@ typedef struct SDL_hapticlist_item DIDEVCAPS capabilities; #endif SDL_bool bXInputHaptic; /* Supports force feedback via XInput. */ - Uint8 userid; /* XInput userid index for this joystick */ + Uint8 userid; /* XInput userid index for this joystick */ struct SDL_hapticlist_item *next; } SDL_hapticlist_item; @@ -97,4 +96,3 @@ extern int SDL_SYS_RemoveHapticDevice(SDL_hapticlist_item *prev, SDL_hapticlist_ #endif /* SDL_windowshaptic_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/haptic/windows/SDL_xinputhaptic.c b/modules/SDL2/src/haptic/windows/SDL_xinputhaptic.c index f23787f..6c77163 100644 --- a/modules/SDL2/src/haptic/windows/SDL_xinputhaptic.c +++ b/modules/SDL2/src/haptic/windows/SDL_xinputhaptic.c @@ -45,9 +45,7 @@ extern "C" { */ static SDL_bool loaded_xinput = SDL_FALSE; - -int -SDL_XINPUT_HapticInit(void) +int SDL_XINPUT_HapticInit(void) { if (SDL_GetHintBoolean(SDL_HINT_XINPUT_ENABLED, SDL_TRUE)) { loaded_xinput = (WIN_LoadXInputDLL() == 0) ? SDL_TRUE : SDL_FALSE; @@ -63,8 +61,7 @@ SDL_XINPUT_HapticInit(void) return 0; } -int -SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) +int SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) { const Uint8 userid = (Uint8)dwUserid; SDL_hapticlist_item *item; @@ -77,13 +74,13 @@ SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) /* Make sure we don't already have it */ for (item = SDL_hapticlist; item; item = item->next) { if (item->bXInputHaptic && item->userid == userid) { - return -1; /* Already added */ + return -1; /* Already added */ } } SDL_zero(state); if (XINPUTSETSTATE(dwUserid, &state) != ERROR_SUCCESS) { - return -1; /* no force feedback on this device. */ + return -1; /* no force feedback on this device. */ } item = (SDL_hapticlist_item *)SDL_malloc(sizeof(SDL_hapticlist_item)); @@ -96,7 +93,7 @@ SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) /* !!! FIXME: I'm not bothering to query for a real name right now (can we even?) */ { char buf[64]; - SDL_snprintf(buf, sizeof(buf), "XInput Controller #%u", (unsigned int)(userid + 1)); + (void)SDL_snprintf(buf, sizeof(buf), "XInput Controller #%u", userid + 1); item->name = SDL_strdup(buf); } @@ -112,8 +109,7 @@ SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) return SDL_SYS_AddHapticDevice(item); } -int -SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid) +int SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid) { const Uint8 userid = (Uint8)dwUserid; SDL_hapticlist_item *item; @@ -147,10 +143,9 @@ SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid) * Mostly, this is here to get rumbling to work, and all the other features * are absent in the XInput path for now. :( */ -static int SDLCALL -SDL_RunXInputHaptic(void *arg) +static int SDLCALL SDL_RunXInputHaptic(void *arg) { - struct haptic_hwdata *hwdata = (struct haptic_hwdata *) arg; + struct haptic_hwdata *hwdata = (struct haptic_hwdata *)arg; while (!SDL_AtomicGet(&hwdata->stopThread)) { SDL_Delay(50); @@ -169,11 +164,10 @@ SDL_RunXInputHaptic(void *arg) return 0; } -static int -SDL_XINPUT_HapticOpenFromUserIndex(SDL_Haptic *haptic, const Uint8 userid) +static int SDL_XINPUT_HapticOpenFromUserIndex(SDL_Haptic *haptic, const Uint8 userid) { char threadName[32]; - XINPUT_VIBRATION vibration = { 0, 0 }; /* stop any current vibration */ + XINPUT_VIBRATION vibration = { 0, 0 }; /* stop any current vibration */ XINPUTSETSTATE(userid, &vibration); haptic->supported = SDL_HAPTIC_LEFTRIGHT; @@ -189,9 +183,9 @@ SDL_XINPUT_HapticOpenFromUserIndex(SDL_Haptic *haptic, const Uint8 userid) } /* Clear the memory */ SDL_memset(haptic->effects, 0, - sizeof(struct haptic_effect) * haptic->neffects); + sizeof(struct haptic_effect) * haptic->neffects); - haptic->hwdata = (struct haptic_hwdata *) SDL_malloc(sizeof(*haptic->hwdata)); + haptic->hwdata = (struct haptic_hwdata *)SDL_malloc(sizeof(*haptic->hwdata)); if (haptic->hwdata == NULL) { SDL_free(haptic->effects); haptic->effects = NULL; @@ -210,7 +204,7 @@ SDL_XINPUT_HapticOpenFromUserIndex(SDL_Haptic *haptic, const Uint8 userid) return SDL_SetError("Couldn't create XInput haptic mutex"); } - SDL_snprintf(threadName, sizeof(threadName), "SDLXInputDev%d", (int)userid); + (void)SDL_snprintf(threadName, sizeof(threadName), "SDLXInputDev%d", userid); haptic->hwdata->thread = SDL_CreateThreadInternal(SDL_RunXInputHaptic, threadName, 64 * 1024, haptic->hwdata); if (haptic->hwdata->thread == NULL) { @@ -224,20 +218,17 @@ SDL_XINPUT_HapticOpenFromUserIndex(SDL_Haptic *haptic, const Uint8 userid) return 0; } -int -SDL_XINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item) +int SDL_XINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item) { return SDL_XINPUT_HapticOpenFromUserIndex(haptic, item->userid); } -int -SDL_XINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { - return (haptic->hwdata->userid == joystick->hwdata->userid); + return haptic->hwdata->userid == joystick->hwdata->userid; } -int -SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { SDL_hapticlist_item *item; int index = 0; @@ -254,16 +245,14 @@ SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) return SDL_SetError("Couldn't find joystick in haptic device list"); } -void -SDL_XINPUT_HapticClose(SDL_Haptic * haptic) +void SDL_XINPUT_HapticClose(SDL_Haptic *haptic) { SDL_AtomicSet(&haptic->hwdata->stopThread, 1); SDL_WaitThread(haptic->hwdata->thread, NULL); SDL_DestroyMutex(haptic->hwdata->mutex); } -void -SDL_XINPUT_HapticQuit(void) +void SDL_XINPUT_HapticQuit(void) { if (loaded_xinput) { WIN_UnloadXInputDLL(); @@ -271,15 +260,13 @@ SDL_XINPUT_HapticQuit(void) } } -int -SDL_XINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_XINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base) { - SDL_assert(base->type == SDL_HAPTIC_LEFTRIGHT); /* should catch this at higher level */ + SDL_assert(base->type == SDL_HAPTIC_LEFTRIGHT); /* should catch this at higher level */ return SDL_XINPUT_HapticUpdateEffect(haptic, effect, base); } -int -SDL_XINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data) +int SDL_XINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data) { XINPUT_VIBRATION *vib = &effect->hweffect->vibration; SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT); @@ -287,18 +274,17 @@ SDL_XINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, vib->wLeftMotorSpeed = data->leftright.large_magnitude * 2; vib->wRightMotorSpeed = data->leftright.small_magnitude * 2; SDL_LockMutex(haptic->hwdata->mutex); - if (haptic->hwdata->stopTicks) { /* running right now? Update it. */ + if (haptic->hwdata->stopTicks) { /* running right now? Update it. */ XINPUTSETSTATE(haptic->hwdata->userid, vib); } SDL_UnlockMutex(haptic->hwdata->mutex); return 0; } -int -SDL_XINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations) +int SDL_XINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations) { XINPUT_VIBRATION *vib = &effect->hweffect->vibration; - SDL_assert(effect->effect.type == SDL_HAPTIC_LEFTRIGHT); /* should catch this at higher level */ + SDL_assert(effect->effect.type == SDL_HAPTIC_LEFTRIGHT); /* should catch this at higher level */ SDL_LockMutex(haptic->hwdata->mutex); if (effect->effect.leftright.length == SDL_HAPTIC_INFINITY || iterations == SDL_HAPTIC_INFINITY) { haptic->hwdata->stopTicks = SDL_HAPTIC_INFINITY; @@ -307,15 +293,14 @@ SDL_XINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Ui } else { haptic->hwdata->stopTicks = SDL_GetTicks() + (effect->effect.leftright.length * iterations); if ((haptic->hwdata->stopTicks == SDL_HAPTIC_INFINITY) || (haptic->hwdata->stopTicks == 0)) { - haptic->hwdata->stopTicks = 1; /* fix edge cases. */ + haptic->hwdata->stopTicks = 1; /* fix edge cases. */ } } SDL_UnlockMutex(haptic->hwdata->mutex); return (XINPUTSETSTATE(haptic->hwdata->userid, vib) == ERROR_SUCCESS) ? 0 : -1; } -int -SDL_XINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_XINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { XINPUT_VIBRATION vibration = { 0, 0 }; SDL_LockMutex(haptic->hwdata->mutex); @@ -324,44 +309,37 @@ SDL_XINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) return (XINPUTSETSTATE(haptic->hwdata->userid, &vibration) == ERROR_SUCCESS) ? 0 : -1; } -void -SDL_XINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_XINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { SDL_XINPUT_HapticStopEffect(haptic, effect); } -int -SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_XINPUT_HapticSetGain(SDL_Haptic *haptic, int gain) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_XINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticPause(SDL_Haptic * haptic) +int SDL_XINPUT_HapticPause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticUnpause(SDL_Haptic * haptic) +int SDL_XINPUT_HapticUnpause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticStopAll(SDL_Haptic * haptic) +int SDL_XINPUT_HapticStopAll(SDL_Haptic *haptic) { XINPUT_VIBRATION vibration = { 0, 0 }; SDL_LockMutex(haptic->hwdata->mutex); @@ -381,113 +359,94 @@ SDL_XINPUT_HapticStopAll(SDL_Haptic * haptic) typedef struct SDL_hapticlist_item SDL_hapticlist_item; -int -SDL_XINPUT_HapticInit(void) +int SDL_XINPUT_HapticInit(void) { return 0; } -int -SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) +int SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid) +int SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item) +int SDL_XINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item) { return SDL_Unsupported(); } -int -SDL_XINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick) { return SDL_Unsupported(); } -void -SDL_XINPUT_HapticClose(SDL_Haptic * haptic) +void SDL_XINPUT_HapticClose(SDL_Haptic *haptic) { } -void -SDL_XINPUT_HapticQuit(void) +void SDL_XINPUT_HapticQuit(void) { } -int -SDL_XINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base) +int SDL_XINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data) +int SDL_XINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations) +int SDL_XINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_XINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_Unsupported(); } -void -SDL_XINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +void SDL_XINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect) { } -int -SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect) +int SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticSetGain(SDL_Haptic * haptic, int gain) +int SDL_XINPUT_HapticSetGain(SDL_Haptic *haptic, int gain) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +int SDL_XINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticPause(SDL_Haptic * haptic) +int SDL_XINPUT_HapticPause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticUnpause(SDL_Haptic * haptic) +int SDL_XINPUT_HapticUnpause(SDL_Haptic *haptic) { return SDL_Unsupported(); } -int -SDL_XINPUT_HapticStopAll(SDL_Haptic * haptic) +int SDL_XINPUT_HapticStopAll(SDL_Haptic *haptic) { return SDL_Unsupported(); } diff --git a/modules/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h b/modules/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h index b7c8dee..3a6fbd3 100644 --- a/modules/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h +++ b/modules/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h @@ -31,22 +31,22 @@ extern "C" { extern int SDL_XINPUT_HapticInit(void); extern int SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid); extern int SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid); -extern int SDL_XINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item); -extern int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick); -extern int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick); -extern void SDL_XINPUT_HapticClose(SDL_Haptic * haptic); +extern int SDL_XINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item); +extern int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick); +extern int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick); +extern void SDL_XINPUT_HapticClose(SDL_Haptic *haptic); extern void SDL_XINPUT_HapticQuit(void); -extern int SDL_XINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * base); -extern int SDL_XINPUT_HapticUpdateEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_HapticEffect * data); -extern int SDL_XINPUT_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, Uint32 iterations); -extern int SDL_XINPUT_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect); -extern void SDL_XINPUT_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect); -extern int SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect *effect); -extern int SDL_XINPUT_HapticSetGain(SDL_Haptic * haptic, int gain); -extern int SDL_XINPUT_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); -extern int SDL_XINPUT_HapticPause(SDL_Haptic * haptic); -extern int SDL_XINPUT_HapticUnpause(SDL_Haptic * haptic); -extern int SDL_XINPUT_HapticStopAll(SDL_Haptic * haptic); +extern int SDL_XINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base); +extern int SDL_XINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data); +extern int SDL_XINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations); +extern int SDL_XINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect); +extern void SDL_XINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect); +extern int SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect); +extern int SDL_XINPUT_HapticSetGain(SDL_Haptic *haptic, int gain); +extern int SDL_XINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter); +extern int SDL_XINPUT_HapticPause(SDL_Haptic *haptic); +extern int SDL_XINPUT_HapticUnpause(SDL_Haptic *haptic); +extern int SDL_XINPUT_HapticStopAll(SDL_Haptic *haptic); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/hidapi/SDL_hidapi.c b/modules/SDL2/src/hidapi/SDL_hidapi.c index bea950d..6c3e43f 100644 --- a/modules/SDL2/src/hidapi/SDL_hidapi.c +++ b/modules/SDL2/src/hidapi/SDL_hidapi.c @@ -57,7 +57,6 @@ #include "../core/linux/SDL_udev.h" #ifdef SDL_USE_LIBUDEV #include -#include #include "../core/linux/SDL_sandbox.h" #endif @@ -65,10 +64,14 @@ #include /* just in case we didn't use that SDL_USE_LIBUDEV block... */ #include /* errno, strerror */ #include -#include /* For the definition of NAME_MAX */ +#include /* For the definition of NAME_MAX */ #include #endif +#if defined(SDL_USE_LIBUDEV) || defined(HAVE_INOTIFY) +#include +#endif + #if defined(SDL_USE_LIBUDEV) typedef enum { @@ -85,7 +88,7 @@ static int inotify_fd = -1; #endif #if defined(SDL_USE_LIBUDEV) -static const SDL_UDEV_Symbols * usyms = NULL; +static const SDL_UDEV_Symbols *usyms = NULL; #endif static struct @@ -115,32 +118,31 @@ static struct #endif } SDL_HIDAPI_discovery; - #if defined(__WIN32__) || defined(__WINGDK__) struct _DEV_BROADCAST_HDR { - DWORD dbch_size; - DWORD dbch_devicetype; - DWORD dbch_reserved; + DWORD dbch_size; + DWORD dbch_devicetype; + DWORD dbch_reserved; }; typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A { - DWORD dbcc_size; - DWORD dbcc_devicetype; - DWORD dbcc_reserved; - GUID dbcc_classguid; - char dbcc_name[ 1 ]; + DWORD dbcc_size; + DWORD dbcc_devicetype; + DWORD dbcc_reserved; + GUID dbcc_classguid; + char dbcc_name[1]; } DEV_BROADCAST_DEVICEINTERFACE_A, *PDEV_BROADCAST_DEVICEINTERFACE_A; -typedef struct _DEV_BROADCAST_HDR DEV_BROADCAST_HDR; -#define DBT_DEVICEARRIVAL 0x8000 /* system detected a new device */ -#define DBT_DEVICEREMOVECOMPLETE 0x8004 /* device was removed from the system */ -#define DBT_DEVTYP_DEVICEINTERFACE 0x00000005 /* device interface class */ -#define DBT_DEVNODES_CHANGED 0x0007 -#define DBT_CONFIGCHANGED 0x0018 -#define DBT_DEVICETYPESPECIFIC 0x8005 /* type specific event */ -#define DBT_DEVINSTSTARTED 0x8008 /* device installed and started */ +typedef struct _DEV_BROADCAST_HDR DEV_BROADCAST_HDR; +#define DBT_DEVICEARRIVAL 0x8000 /* system detected a new device */ +#define DBT_DEVICEREMOVECOMPLETE 0x8004 /* device was removed from the system */ +#define DBT_DEVTYP_DEVICEINTERFACE 0x00000005 /* device interface class */ +#define DBT_DEVNODES_CHANGED 0x0007 +#define DBT_CONFIGCHANGED 0x0018 +#define DBT_DEVICETYPESPECIFIC 0x8005 /* type specific event */ +#define DBT_DEVINSTSTARTED 0x8008 /* device installed and started */ #include DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED); @@ -152,7 +154,7 @@ static LRESULT CALLBACK ControllerWndProc(HWND hwnd, UINT message, WPARAM wParam switch (wParam) { case DBT_DEVICEARRIVAL: case DBT_DEVICEREMOVECOMPLETE: - if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { + if (((DEV_BROADCAST_HDR *)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter; } break; @@ -179,27 +181,29 @@ static void CallbackIOServiceFunc(void *context, io_iterator_t portIterator) #ifdef HAVE_INOTIFY #ifdef HAVE_INOTIFY_INIT1 -static int SDL_inotify_init1(void) { +static int SDL_inotify_init1(void) +{ return inotify_init1(IN_NONBLOCK | IN_CLOEXEC); } #else -static int SDL_inotify_init1(void) { +static int SDL_inotify_init1(void) +{ int fd = inotify_init(); - if (fd < 0) return -1; + if (fd < 0) { + return -1; + } fcntl(fd, F_SETFL, O_NONBLOCK); fcntl(fd, F_SETFD, FD_CLOEXEC); return fd; } #endif -static int -StrHasPrefix(const char *string, const char *prefix) +static int StrHasPrefix(const char *string, const char *prefix) { - return (SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0); + return SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0; } -static int -StrIsInteger(const char *string) +static int StrIsInteger(const char *string) { const char *p; @@ -217,8 +221,7 @@ StrIsInteger(const char *string) } #endif /* HAVE_INOTIFY */ -static void -HIDAPI_InitializeDiscovery() +static void HIDAPI_InitializeDiscovery() { SDL_HIDAPI_discovery.m_bInitialized = SDL_TRUE; SDL_HIDAPI_discovery.m_unDeviceChangeCounter = 1; @@ -231,7 +234,7 @@ HIDAPI_InitializeDiscovery() SDL_zero(SDL_HIDAPI_discovery.m_wndClass); SDL_HIDAPI_discovery.m_wndClass.hInstance = GetModuleHandle(NULL); SDL_HIDAPI_discovery.m_wndClass.lpszClassName = "SDL_HIDAPI_DEVICE_DETECTION"; - SDL_HIDAPI_discovery.m_wndClass.lpfnWndProc = ControllerWndProc; /* This function is called by windows */ + SDL_HIDAPI_discovery.m_wndClass.lpfnWndProc = ControllerWndProc; /* This function is called by windows */ SDL_HIDAPI_discovery.m_wndClass.cbSize = sizeof(WNDCLASSEX); RegisterClassExA(&SDL_HIDAPI_discovery.m_wndClass); @@ -241,7 +244,7 @@ HIDAPI_InitializeDiscovery() DEV_BROADCAST_DEVICEINTERFACE_A devBroadcast; SDL_zero(devBroadcast); - devBroadcast.dbcc_size = sizeof( devBroadcast ); + devBroadcast.dbcc_size = sizeof(devBroadcast); devBroadcast.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; devBroadcast.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; @@ -249,8 +252,8 @@ HIDAPI_InitializeDiscovery() * but that seems to be necessary to get a notice after each individual usb input device actually * installs, rather than just as the composite device is seen. */ - SDL_HIDAPI_discovery.m_hNotify = RegisterDeviceNotification( SDL_HIDAPI_discovery.m_hwndMsg, &devBroadcast, DEVICE_NOTIFY_WINDOW_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES ); - SDL_HIDAPI_discovery.m_bCanGetNotifications = ( SDL_HIDAPI_discovery.m_hNotify != 0 ); + SDL_HIDAPI_discovery.m_hNotify = RegisterDeviceNotification(SDL_HIDAPI_discovery.m_hwndMsg, &devBroadcast, DEVICE_NOTIFY_WINDOW_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES); + SDL_HIDAPI_discovery.m_bCanGetNotifications = (SDL_HIDAPI_discovery.m_hNotify != 0); } #endif /* defined(__WIN32__) || defined(__WINGDK__) */ @@ -313,19 +316,18 @@ HIDAPI_InitializeDiscovery() SDL_HIDAPI_discovery.m_nUdevFd = -1; usyms = SDL_UDEV_GetUdevSyms(); - if (usyms) { + if (usyms != NULL) { SDL_HIDAPI_discovery.m_pUdev = usyms->udev_new(); - } - if (SDL_HIDAPI_discovery.m_pUdev) { - SDL_HIDAPI_discovery.m_pUdevMonitor = usyms->udev_monitor_new_from_netlink(SDL_HIDAPI_discovery.m_pUdev, "udev"); - if (SDL_HIDAPI_discovery.m_pUdevMonitor) { - usyms->udev_monitor_enable_receiving(SDL_HIDAPI_discovery.m_pUdevMonitor); - SDL_HIDAPI_discovery.m_nUdevFd = usyms->udev_monitor_get_fd(SDL_HIDAPI_discovery.m_pUdevMonitor); - SDL_HIDAPI_discovery.m_bCanGetNotifications = SDL_TRUE; + if (SDL_HIDAPI_discovery.m_pUdev != NULL) { + SDL_HIDAPI_discovery.m_pUdevMonitor = usyms->udev_monitor_new_from_netlink(SDL_HIDAPI_discovery.m_pUdev, "udev"); + if (SDL_HIDAPI_discovery.m_pUdevMonitor != NULL) { + usyms->udev_monitor_enable_receiving(SDL_HIDAPI_discovery.m_pUdevMonitor); + SDL_HIDAPI_discovery.m_nUdevFd = usyms->udev_monitor_get_fd(SDL_HIDAPI_discovery.m_pUdevMonitor); + SDL_HIDAPI_discovery.m_bCanGetNotifications = SDL_TRUE; + } } } - } - else + } else #endif /* SDL_USE_LIBUDEV */ { #if defined(HAVE_INOTIFY) @@ -349,7 +351,7 @@ HIDAPI_InitializeDiscovery() inotify_fd = -1; SDL_LogWarn(SDL_LOG_CATEGORY_INPUT, "Unable to add inotify watch, falling back to polling: %s", - strerror (errno)); + strerror(errno)); return; } @@ -358,15 +360,14 @@ HIDAPI_InitializeDiscovery() } } -static void -HIDAPI_UpdateDiscovery() +static void HIDAPI_UpdateDiscovery() { if (!SDL_HIDAPI_discovery.m_bInitialized) { HIDAPI_InitializeDiscovery(); } if (!SDL_HIDAPI_discovery.m_bCanGetNotifications) { - const Uint32 SDL_HIDAPI_DETECT_INTERVAL_MS = 3000; /* Update every 3 seconds */ + const Uint32 SDL_HIDAPI_DETECT_INTERVAL_MS = 3000; /* Update every 3 seconds */ Uint32 now = SDL_GetTicks(); if (!SDL_HIDAPI_discovery.m_unLastDetect || SDL_TICKS_PASSED(now, SDL_HIDAPI_discovery.m_unLastDetect + SDL_HIDAPI_DETECT_INTERVAL_MS)) { ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter; @@ -392,7 +393,11 @@ HIDAPI_UpdateDiscovery() #if defined(__MACOSX__) if (SDL_HIDAPI_discovery.m_notificationPort) { - struct { mach_msg_header_t hdr; char payload[ 4096 ]; } msg; + struct + { + mach_msg_header_t hdr; + char payload[4096]; + } msg; while (mach_msg(&msg.hdr, MACH_RCV_MSG | MACH_RCV_TIMEOUT, 0, sizeof(msg), SDL_HIDAPI_discovery.m_notificationMach, 0, MACH_PORT_NULL) == KERN_SUCCESS) { IODispatchCalloutFromMessage(NULL, &msg.hdr, SDL_HIDAPI_discovery.m_notificationPort); } @@ -421,15 +426,14 @@ HIDAPI_UpdateDiscovery() if (pUdevDevice) { const char *action = NULL; action = usyms->udev_device_get_action(pUdevDevice); - if (!action || SDL_strcmp(action, "add") == 0 || SDL_strcmp(action, "remove") == 0) { + if (action == NULL || SDL_strcmp(action, "add") == 0 || SDL_strcmp(action, "remove") == 0) { ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter; } usyms->udev_device_unref(pUdevDevice); } } } - } - else + } else #endif /* SDL_USE_LIBUDEV */ { #if defined(HAVE_INOTIFY) @@ -438,22 +442,22 @@ HIDAPI_UpdateDiscovery() { struct inotify_event event; char storage[4096]; - char enough_for_inotify[sizeof (struct inotify_event) + NAME_MAX + 1]; + char enough_for_inotify[sizeof(struct inotify_event) + NAME_MAX + 1]; } buf; ssize_t bytes; size_t remain = 0; size_t len; - bytes = read(inotify_fd, &buf, sizeof (buf)); + bytes = read(inotify_fd, &buf, sizeof(buf)); if (bytes > 0) { - remain = (size_t) bytes; + remain = (size_t)bytes; } while (remain > 0) { if (buf.event.len > 0) { if (StrHasPrefix(buf.event.name, "hidraw") && - StrIsInteger(buf.event.name + SDL_strlen ("hidraw"))) { + StrIsInteger(buf.event.name + SDL_strlen("hidraw"))) { ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter; /* We found an hidraw change. We still continue to * drain the inotify fd to avoid leaving old @@ -461,7 +465,7 @@ HIDAPI_UpdateDiscovery() } } - len = sizeof (struct inotify_event) + buf.event.len; + len = sizeof(struct inotify_event) + buf.event.len; remain -= len; if (remain != 0) { @@ -473,16 +477,16 @@ HIDAPI_UpdateDiscovery() } } -static void -HIDAPI_ShutdownDiscovery() +static void HIDAPI_ShutdownDiscovery() { if (!SDL_HIDAPI_discovery.m_bInitialized) { return; } #if defined(__WIN32__) || defined(__WINGDK__) - if (SDL_HIDAPI_discovery.m_hNotify) + if (SDL_HIDAPI_discovery.m_hNotify) { UnregisterDeviceNotification(SDL_HIDAPI_discovery.m_hNotify); + } if (SDL_HIDAPI_discovery.m_hwndMsg) { DestroyWindow(SDL_HIDAPI_discovery.m_hwndMsg); @@ -509,8 +513,7 @@ HIDAPI_ShutdownDiscovery() SDL_UDEV_ReleaseUdevSyms(); usyms = NULL; } - } - else + } else #endif /* SDL_USE_LIBUDEV */ { #if defined(HAVE_INOTIFY) @@ -526,32 +529,32 @@ HIDAPI_ShutdownDiscovery() /* Platform HIDAPI Implementation */ -#define hid_device PLATFORM_hid_device -#define hid_device_ PLATFORM_hid_device_ -#define hid_init PLATFORM_hid_init -#define hid_exit PLATFORM_hid_exit -#define hid_enumerate PLATFORM_hid_enumerate -#define hid_free_enumeration PLATFORM_hid_free_enumeration -#define hid_open PLATFORM_hid_open -#define hid_open_path PLATFORM_hid_open_path -#define hid_write PLATFORM_hid_write -#define hid_read_timeout PLATFORM_hid_read_timeout -#define hid_read PLATFORM_hid_read -#define hid_set_nonblocking PLATFORM_hid_set_nonblocking -#define hid_send_feature_report PLATFORM_hid_send_feature_report -#define hid_get_feature_report PLATFORM_hid_get_feature_report -#define hid_close PLATFORM_hid_close -#define hid_get_manufacturer_string PLATFORM_hid_get_manufacturer_string -#define hid_get_product_string PLATFORM_hid_get_product_string -#define hid_get_serial_number_string PLATFORM_hid_get_serial_number_string -#define hid_get_indexed_string PLATFORM_hid_get_indexed_string -#define hid_error PLATFORM_hid_error -#define new_hid_device PLATFORM_new_hid_device -#define free_hid_device PLATFORM_free_hid_device -#define input_report PLATFORM_input_report -#define return_data PLATFORM_return_data -#define make_path PLATFORM_make_path -#define read_thread PLATFORM_read_thread +#define hid_device PLATFORM_hid_device +#define hid_device_ PLATFORM_hid_device_ +#define hid_init PLATFORM_hid_init +#define hid_exit PLATFORM_hid_exit +#define hid_enumerate PLATFORM_hid_enumerate +#define hid_free_enumeration PLATFORM_hid_free_enumeration +#define hid_open PLATFORM_hid_open +#define hid_open_path PLATFORM_hid_open_path +#define hid_write PLATFORM_hid_write +#define hid_read_timeout PLATFORM_hid_read_timeout +#define hid_read PLATFORM_hid_read +#define hid_set_nonblocking PLATFORM_hid_set_nonblocking +#define hid_send_feature_report PLATFORM_hid_send_feature_report +#define hid_get_feature_report PLATFORM_hid_get_feature_report +#define hid_close PLATFORM_hid_close +#define hid_get_manufacturer_string PLATFORM_hid_get_manufacturer_string +#define hid_get_product_string PLATFORM_hid_get_product_string +#define hid_get_serial_number_string PLATFORM_hid_get_serial_number_string +#define hid_get_indexed_string PLATFORM_hid_get_indexed_string +#define hid_error PLATFORM_hid_error +#define new_hid_device PLATFORM_new_hid_device +#define free_hid_device PLATFORM_free_hid_device +#define input_report PLATFORM_input_report +#define return_data PLATFORM_return_data +#define make_path PLATFORM_make_path +#define read_thread PLATFORM_read_thread #undef HIDAPI_H__ #if __LINUX__ @@ -559,21 +562,21 @@ HIDAPI_ShutdownDiscovery() #if SDL_USE_LIBUDEV static const SDL_UDEV_Symbols *udev_ctx = NULL; -#define udev_device_get_sysattr_value udev_ctx->udev_device_get_sysattr_value -#define udev_new udev_ctx->udev_new -#define udev_unref udev_ctx->udev_unref -#define udev_device_new_from_devnum udev_ctx->udev_device_new_from_devnum -#define udev_device_get_parent_with_subsystem_devtype udev_ctx->udev_device_get_parent_with_subsystem_devtype -#define udev_device_unref udev_ctx->udev_device_unref -#define udev_enumerate_new udev_ctx->udev_enumerate_new -#define udev_enumerate_add_match_subsystem udev_ctx->udev_enumerate_add_match_subsystem -#define udev_enumerate_scan_devices udev_ctx->udev_enumerate_scan_devices -#define udev_enumerate_get_list_entry udev_ctx->udev_enumerate_get_list_entry -#define udev_list_entry_get_name udev_ctx->udev_list_entry_get_name -#define udev_device_new_from_syspath udev_ctx->udev_device_new_from_syspath -#define udev_device_get_devnode udev_ctx->udev_device_get_devnode -#define udev_list_entry_get_next udev_ctx->udev_list_entry_get_next -#define udev_enumerate_unref udev_ctx->udev_enumerate_unref +#define udev_device_get_sysattr_value udev_ctx->udev_device_get_sysattr_value +#define udev_new udev_ctx->udev_new +#define udev_unref udev_ctx->udev_unref +#define udev_device_new_from_devnum udev_ctx->udev_device_new_from_devnum +#define udev_device_get_parent_with_subsystem_devtype udev_ctx->udev_device_get_parent_with_subsystem_devtype +#define udev_device_unref udev_ctx->udev_device_unref +#define udev_enumerate_new udev_ctx->udev_enumerate_new +#define udev_enumerate_add_match_subsystem udev_ctx->udev_enumerate_add_match_subsystem +#define udev_enumerate_scan_devices udev_ctx->udev_enumerate_scan_devices +#define udev_enumerate_get_list_entry udev_ctx->udev_enumerate_get_list_entry +#define udev_list_entry_get_name udev_ctx->udev_list_entry_get_name +#define udev_device_new_from_syspath udev_ctx->udev_device_new_from_syspath +#define udev_device_get_devnode udev_ctx->udev_device_get_devnode +#define udev_list_entry_get_next udev_ctx->udev_list_entry_get_next +#define udev_enumerate_unref udev_ctx->udev_enumerate_unref #include "linux/hid.c" #define HAVE_PLATFORM_BACKEND 1 @@ -582,11 +585,11 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL; #elif __MACOSX__ #include "mac/hid.c" #define HAVE_PLATFORM_BACKEND 1 -#define udev_ctx 1 +#define udev_ctx 1 #elif __WINDOWS__ || __WINGDK__ #include "windows/hid.c" #define HAVE_PLATFORM_BACKEND 1 -#define udev_ctx 1 +#define udev_ctx 1 #elif __ANDROID__ /* The implementation for Android is in a separate .cpp file */ #include "hidapi/hidapi.h" @@ -596,7 +599,7 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL; /* The implementation for iOS and tvOS is in a separate .m file */ #include "hidapi/hidapi.h" #define HAVE_PLATFORM_BACKEND 1 -#define udev_ctx 1 +#define udev_ctx 1 #endif #undef hid_device @@ -634,26 +637,26 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL; /* DRIVER HIDAPI Implementation */ -#define hid_device DRIVER_hid_device -#define hid_device_ DRIVER_hid_device_ -#define hid_init DRIVER_hid_init -#define hid_exit DRIVER_hid_exit -#define hid_enumerate DRIVER_hid_enumerate -#define hid_free_enumeration DRIVER_hid_free_enumeration -#define hid_open DRIVER_hid_open -#define hid_open_path DRIVER_hid_open_path -#define hid_write DRIVER_hid_write -#define hid_read_timeout DRIVER_hid_read_timeout -#define hid_read DRIVER_hid_read -#define hid_set_nonblocking DRIVER_hid_set_nonblocking -#define hid_send_feature_report DRIVER_hid_send_feature_report -#define hid_get_feature_report DRIVER_hid_get_feature_report -#define hid_close DRIVER_hid_close -#define hid_get_manufacturer_string DRIVER_hid_get_manufacturer_string -#define hid_get_product_string DRIVER_hid_get_product_string -#define hid_get_serial_number_string DRIVER_hid_get_serial_number_string -#define hid_get_indexed_string DRIVER_hid_get_indexed_string -#define hid_error DRIVER_hid_error +#define hid_device DRIVER_hid_device +#define hid_device_ DRIVER_hid_device_ +#define hid_init DRIVER_hid_init +#define hid_exit DRIVER_hid_exit +#define hid_enumerate DRIVER_hid_enumerate +#define hid_free_enumeration DRIVER_hid_free_enumeration +#define hid_open DRIVER_hid_open +#define hid_open_path DRIVER_hid_open_path +#define hid_write DRIVER_hid_write +#define hid_read_timeout DRIVER_hid_read_timeout +#define hid_read DRIVER_hid_read +#define hid_set_nonblocking DRIVER_hid_set_nonblocking +#define hid_send_feature_report DRIVER_hid_send_feature_report +#define hid_get_feature_report DRIVER_hid_get_feature_report +#define hid_close DRIVER_hid_close +#define hid_get_manufacturer_string DRIVER_hid_get_manufacturer_string +#define hid_get_product_string DRIVER_hid_get_product_string +#define hid_get_serial_number_string DRIVER_hid_get_serial_number_string +#define hid_get_indexed_string DRIVER_hid_get_indexed_string +#define hid_error DRIVER_hid_error #ifdef SDL_JOYSTICK_HIDAPI_STEAMXBOX #undef HIDAPI_H__ @@ -685,7 +688,6 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL; #endif /* HAVE_DRIVER_BACKEND */ - #ifdef HAVE_LIBUSB /* libusb HIDAPI Implementation */ @@ -694,8 +696,9 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL; static struct { - void* libhandle; + void *libhandle; + /* *INDENT-OFF* */ /* clang-format off */ int (LIBUSB_CALL *init)(libusb_context **ctx); void (LIBUSB_CALL *exit)(libusb_context *ctx); ssize_t (LIBUSB_CALL *get_device_list)(libusb_context *ctx, libusb_device ***list); @@ -743,79 +746,74 @@ static struct int (LIBUSB_CALL *handle_events)(libusb_context *ctx); int (LIBUSB_CALL *handle_events_completed)(libusb_context *ctx, int *completed); const char * (LIBUSB_CALL *error_name)(int errcode); +/* *INDENT-ON* */ /* clang-format on */ + } libusb_ctx; -#define libusb_init libusb_ctx.init -#define libusb_exit libusb_ctx.exit -#define libusb_get_device_list libusb_ctx.get_device_list -#define libusb_free_device_list libusb_ctx.free_device_list -#define libusb_get_device_descriptor libusb_ctx.get_device_descriptor -#define libusb_get_active_config_descriptor libusb_ctx.get_active_config_descriptor -#define libusb_get_config_descriptor libusb_ctx.get_config_descriptor -#define libusb_free_config_descriptor libusb_ctx.free_config_descriptor -#define libusb_get_bus_number libusb_ctx.get_bus_number -#define libusb_get_device_address libusb_ctx.get_device_address -#define libusb_open libusb_ctx.open -#define libusb_close libusb_ctx.close -#define libusb_claim_interface libusb_ctx.claim_interface -#define libusb_release_interface libusb_ctx.release_interface -#define libusb_kernel_driver_active libusb_ctx.kernel_driver_active -#define libusb_detach_kernel_driver libusb_ctx.detach_kernel_driver -#define libusb_attach_kernel_driver libusb_ctx.attach_kernel_driver -#define libusb_set_interface_alt_setting libusb_ctx.set_interface_alt_setting -#define libusb_alloc_transfer libusb_ctx.alloc_transfer -#define libusb_submit_transfer libusb_ctx.submit_transfer -#define libusb_cancel_transfer libusb_ctx.cancel_transfer -#define libusb_free_transfer libusb_ctx.free_transfer -#define libusb_control_transfer libusb_ctx.control_transfer -#define libusb_interrupt_transfer libusb_ctx.interrupt_transfer -#define libusb_handle_events libusb_ctx.handle_events -#define libusb_handle_events_completed libusb_ctx.handle_events_completed -#define libusb_error_name libusb_ctx.error_name - -#define hid_device LIBUSB_hid_device -#define hid_device_ LIBUSB_hid_device_ -#define hid_init LIBUSB_hid_init -#define hid_exit LIBUSB_hid_exit -#define hid_enumerate LIBUSB_hid_enumerate -#define hid_free_enumeration LIBUSB_hid_free_enumeration -#define hid_open LIBUSB_hid_open -#define hid_open_path LIBUSB_hid_open_path -#define hid_write LIBUSB_hid_write -#define hid_read_timeout LIBUSB_hid_read_timeout -#define hid_read LIBUSB_hid_read -#define hid_set_nonblocking LIBUSB_hid_set_nonblocking -#define hid_send_feature_report LIBUSB_hid_send_feature_report -#define hid_get_feature_report LIBUSB_hid_get_feature_report -#define hid_close LIBUSB_hid_close -#define hid_get_manufacturer_string LIBUSB_hid_get_manufacturer_string -#define hid_get_product_string LIBUSB_hid_get_product_string -#define hid_get_serial_number_string LIBUSB_hid_get_serial_number_string -#define hid_get_indexed_string LIBUSB_hid_get_indexed_string -#define hid_error LIBUSB_hid_error -#define new_hid_device LIBUSB_new_hid_device -#define free_hid_device LIBUSB_free_hid_device -#define input_report LIBUSB_input_report -#define return_data LIBUSB_return_data -#define make_path LIBUSB_make_path -#define read_thread LIBUSB_read_thread +#define libusb_init libusb_ctx.init +#define libusb_exit libusb_ctx.exit +#define libusb_get_device_list libusb_ctx.get_device_list +#define libusb_free_device_list libusb_ctx.free_device_list +#define libusb_get_device_descriptor libusb_ctx.get_device_descriptor +#define libusb_get_active_config_descriptor libusb_ctx.get_active_config_descriptor +#define libusb_get_config_descriptor libusb_ctx.get_config_descriptor +#define libusb_free_config_descriptor libusb_ctx.free_config_descriptor +#define libusb_get_bus_number libusb_ctx.get_bus_number +#define libusb_get_device_address libusb_ctx.get_device_address +#define libusb_open libusb_ctx.open +#define libusb_close libusb_ctx.close +#define libusb_claim_interface libusb_ctx.claim_interface +#define libusb_release_interface libusb_ctx.release_interface +#define libusb_kernel_driver_active libusb_ctx.kernel_driver_active +#define libusb_detach_kernel_driver libusb_ctx.detach_kernel_driver +#define libusb_attach_kernel_driver libusb_ctx.attach_kernel_driver +#define libusb_set_interface_alt_setting libusb_ctx.set_interface_alt_setting +#define libusb_alloc_transfer libusb_ctx.alloc_transfer +#define libusb_submit_transfer libusb_ctx.submit_transfer +#define libusb_cancel_transfer libusb_ctx.cancel_transfer +#define libusb_free_transfer libusb_ctx.free_transfer +#define libusb_control_transfer libusb_ctx.control_transfer +#define libusb_interrupt_transfer libusb_ctx.interrupt_transfer +#define libusb_handle_events libusb_ctx.handle_events +#define libusb_handle_events_completed libusb_ctx.handle_events_completed +#define libusb_error_name libusb_ctx.error_name + +#define hid_device LIBUSB_hid_device +#define hid_device_ LIBUSB_hid_device_ +#define hid_init LIBUSB_hid_init +#define hid_exit LIBUSB_hid_exit +#define hid_enumerate LIBUSB_hid_enumerate +#define hid_free_enumeration LIBUSB_hid_free_enumeration +#define hid_open LIBUSB_hid_open +#define hid_open_path LIBUSB_hid_open_path +#define hid_write LIBUSB_hid_write +#define hid_read_timeout LIBUSB_hid_read_timeout +#define hid_read LIBUSB_hid_read +#define hid_set_nonblocking LIBUSB_hid_set_nonblocking +#define hid_send_feature_report LIBUSB_hid_send_feature_report +#define hid_get_feature_report LIBUSB_hid_get_feature_report +#define hid_close LIBUSB_hid_close +#define hid_get_manufacturer_string LIBUSB_hid_get_manufacturer_string +#define hid_get_product_string LIBUSB_hid_get_product_string +#define hid_get_serial_number_string LIBUSB_hid_get_serial_number_string +#define hid_get_indexed_string LIBUSB_hid_get_indexed_string +#define hid_error LIBUSB_hid_error +#define new_hid_device LIBUSB_new_hid_device +#define free_hid_device LIBUSB_free_hid_device +#define input_report LIBUSB_input_report +#define return_data LIBUSB_return_data +#define make_path LIBUSB_make_path +#define read_thread LIBUSB_read_thread #ifndef __FreeBSD__ /* this is awkwardly inlined, so we need to re-implement it here * so we can override the libusb_control_transfer call */ -static int -SDL_libusb_get_string_descriptor(libusb_device_handle *dev, +static int SDL_libusb_get_string_descriptor(libusb_device_handle *dev, uint8_t descriptor_index, uint16_t lang_id, unsigned char *data, int length) { - return libusb_control_transfer(dev, - LIBUSB_ENDPOINT_IN | 0x0, /* Endpoint 0 IN */ - LIBUSB_REQUEST_GET_DESCRIPTOR, - (LIBUSB_DT_STRING << 8) | descriptor_index, - lang_id, - data, - (uint16_t) length, - 1000); + return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN | 0x0, LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | descriptor_index, lang_id, + data, (uint16_t)length, 1000); /* Endpoint 0 IN */ } #define libusb_get_string_descriptor SDL_libusb_get_string_descriptor #endif /* __FreeBSD__ */ @@ -884,69 +882,70 @@ SDL_libusb_get_string_descriptor(libusb_device_handle *dev, /* Shared HIDAPI Implementation */ -struct hidapi_backend { - int (*hid_write)(void* device, const unsigned char* data, size_t length); - int (*hid_read_timeout)(void* device, unsigned char* data, size_t length, int milliseconds); - int (*hid_read)(void* device, unsigned char* data, size_t length); - int (*hid_set_nonblocking)(void* device, int nonblock); - int (*hid_send_feature_report)(void* device, const unsigned char* data, size_t length); - int (*hid_get_feature_report)(void* device, unsigned char* data, size_t length); - void (*hid_close)(void* device); - int (*hid_get_manufacturer_string)(void* device, wchar_t* string, size_t maxlen); - int (*hid_get_product_string)(void* device, wchar_t* string, size_t maxlen); - int (*hid_get_serial_number_string)(void* device, wchar_t* string, size_t maxlen); - int (*hid_get_indexed_string)(void* device, int string_index, wchar_t* string, size_t maxlen); - const wchar_t* (*hid_error)(void* device); +struct hidapi_backend +{ + int (*hid_write)(void *device, const unsigned char *data, size_t length); + int (*hid_read_timeout)(void *device, unsigned char *data, size_t length, int milliseconds); + int (*hid_read)(void *device, unsigned char *data, size_t length); + int (*hid_set_nonblocking)(void *device, int nonblock); + int (*hid_send_feature_report)(void *device, const unsigned char *data, size_t length); + int (*hid_get_feature_report)(void *device, unsigned char *data, size_t length); + void (*hid_close)(void *device); + int (*hid_get_manufacturer_string)(void *device, wchar_t *string, size_t maxlen); + int (*hid_get_product_string)(void *device, wchar_t *string, size_t maxlen); + int (*hid_get_serial_number_string)(void *device, wchar_t *string, size_t maxlen); + int (*hid_get_indexed_string)(void *device, int string_index, wchar_t *string, size_t maxlen); + const wchar_t *(*hid_error)(void *device); }; #if HAVE_PLATFORM_BACKEND static const struct hidapi_backend PLATFORM_Backend = { - (void*)PLATFORM_hid_write, - (void*)PLATFORM_hid_read_timeout, - (void*)PLATFORM_hid_read, - (void*)PLATFORM_hid_set_nonblocking, - (void*)PLATFORM_hid_send_feature_report, - (void*)PLATFORM_hid_get_feature_report, - (void*)PLATFORM_hid_close, - (void*)PLATFORM_hid_get_manufacturer_string, - (void*)PLATFORM_hid_get_product_string, - (void*)PLATFORM_hid_get_serial_number_string, - (void*)PLATFORM_hid_get_indexed_string, - (void*)PLATFORM_hid_error + (void *)PLATFORM_hid_write, + (void *)PLATFORM_hid_read_timeout, + (void *)PLATFORM_hid_read, + (void *)PLATFORM_hid_set_nonblocking, + (void *)PLATFORM_hid_send_feature_report, + (void *)PLATFORM_hid_get_feature_report, + (void *)PLATFORM_hid_close, + (void *)PLATFORM_hid_get_manufacturer_string, + (void *)PLATFORM_hid_get_product_string, + (void *)PLATFORM_hid_get_serial_number_string, + (void *)PLATFORM_hid_get_indexed_string, + (void *)PLATFORM_hid_error }; #endif /* HAVE_PLATFORM_BACKEND */ #if HAVE_DRIVER_BACKEND static const struct hidapi_backend DRIVER_Backend = { - (void*)DRIVER_hid_write, - (void*)DRIVER_hid_read_timeout, - (void*)DRIVER_hid_read, - (void*)DRIVER_hid_set_nonblocking, - (void*)DRIVER_hid_send_feature_report, - (void*)DRIVER_hid_get_feature_report, - (void*)DRIVER_hid_close, - (void*)DRIVER_hid_get_manufacturer_string, - (void*)DRIVER_hid_get_product_string, - (void*)DRIVER_hid_get_serial_number_string, - (void*)DRIVER_hid_get_indexed_string, - (void*)DRIVER_hid_error + (void *)DRIVER_hid_write, + (void *)DRIVER_hid_read_timeout, + (void *)DRIVER_hid_read, + (void *)DRIVER_hid_set_nonblocking, + (void *)DRIVER_hid_send_feature_report, + (void *)DRIVER_hid_get_feature_report, + (void *)DRIVER_hid_close, + (void *)DRIVER_hid_get_manufacturer_string, + (void *)DRIVER_hid_get_product_string, + (void *)DRIVER_hid_get_serial_number_string, + (void *)DRIVER_hid_get_indexed_string, + (void *)DRIVER_hid_error }; #endif /* HAVE_DRIVER_BACKEND */ #ifdef HAVE_LIBUSB static const struct hidapi_backend LIBUSB_Backend = { - (void*)LIBUSB_hid_write, - (void*)LIBUSB_hid_read_timeout, - (void*)LIBUSB_hid_read, - (void*)LIBUSB_hid_set_nonblocking, - (void*)LIBUSB_hid_send_feature_report, - (void*)LIBUSB_hid_get_feature_report, - (void*)LIBUSB_hid_close, - (void*)LIBUSB_hid_get_manufacturer_string, - (void*)LIBUSB_hid_get_product_string, - (void*)LIBUSB_hid_get_serial_number_string, - (void*)LIBUSB_hid_get_indexed_string, - (void*)LIBUSB_hid_error + (void *)LIBUSB_hid_write, + (void *)LIBUSB_hid_read_timeout, + (void *)LIBUSB_hid_read, + (void *)LIBUSB_hid_set_nonblocking, + (void *)LIBUSB_hid_send_feature_report, + (void *)LIBUSB_hid_get_feature_report, + (void *)LIBUSB_hid_close, + (void *)LIBUSB_hid_get_manufacturer_string, + (void *)LIBUSB_hid_get_product_string, + (void *)LIBUSB_hid_get_serial_number_string, + (void *)LIBUSB_hid_get_indexed_string, + (void *)LIBUSB_hid_error }; #endif /* HAVE_LIBUSB */ @@ -960,8 +959,7 @@ static char device_magic; #if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB) -static SDL_hid_device * -CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend) +static SDL_hid_device *CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend) { SDL_hid_device *wrapper = (SDL_hid_device *)SDL_malloc(sizeof(*wrapper)); wrapper->magic = &device_magic; @@ -972,37 +970,35 @@ CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend) #endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || HAVE_LIBUSB */ -static void -DeleteHIDDeviceWrapper(SDL_hid_device *device) +static void DeleteHIDDeviceWrapper(SDL_hid_device *device) { device->magic = NULL; SDL_free(device); } -#define CHECK_DEVICE_MAGIC(device, retval) \ +#define CHECK_DEVICE_MAGIC(device, retval) \ if (!device || device->magic != &device_magic) { \ - SDL_SetError("Invalid device"); \ - return retval; \ + SDL_SetError("Invalid device"); \ + return retval; \ } #if !SDL_HIDAPI_DISABLED #if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB) -#define COPY_IF_EXISTS(var) \ - if (pSrc->var != NULL) { \ +#define COPY_IF_EXISTS(var) \ + if (pSrc->var != NULL) { \ pDst->var = SDL_strdup(pSrc->var); \ - } else { \ - pDst->var = NULL; \ + } else { \ + pDst->var = NULL; \ } -#define WCOPY_IF_EXISTS(var) \ - if (pSrc->var != NULL) { \ +#define WCOPY_IF_EXISTS(var) \ + if (pSrc->var != NULL) { \ pDst->var = SDL_wcsdup(pSrc->var); \ - } else { \ - pDst->var = NULL; \ + } else { \ + pDst->var = NULL; \ } -static void -CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst) +static void CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst) { COPY_IF_EXISTS(path) pDst->vendor_id = pSrc->vendor_id; @@ -1028,7 +1024,7 @@ CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info * static int SDL_hidapi_refcount = 0; -static void SDL_SetHIDAPIError( const wchar_t *error ) +static void SDL_SetHIDAPIError(const wchar_t *error) { if (error) { char *error_utf8 = SDL_iconv_wchar_utf8(error); @@ -1079,11 +1075,13 @@ int SDL_hid_init(void) if (libusb_ctx.libhandle != NULL) { SDL_bool loaded = SDL_TRUE; #ifdef SDL_LIBUSB_DYNAMIC - #define LOAD_LIBUSB_SYMBOL(func) \ - if (!(libusb_ctx.func = SDL_LoadFunction(libusb_ctx.libhandle, "libusb_" #func))) {loaded = SDL_FALSE;} +#define LOAD_LIBUSB_SYMBOL(func) \ + if (!(libusb_ctx.func = SDL_LoadFunction(libusb_ctx.libhandle, "libusb_" #func))) { \ + loaded = SDL_FALSE; \ + } #else - #define LOAD_LIBUSB_SYMBOL(func) \ - libusb_ctx.func = libusb_##func; +#define LOAD_LIBUSB_SYMBOL(func) \ + libusb_ctx.func = libusb_##func; #endif LOAD_LIBUSB_SYMBOL(init) LOAD_LIBUSB_SYMBOL(exit) @@ -1112,7 +1110,7 @@ int SDL_hid_init(void) LOAD_LIBUSB_SYMBOL(handle_events) LOAD_LIBUSB_SYMBOL(handle_events_completed) LOAD_LIBUSB_SYMBOL(error_name) - #undef LOAD_LIBUSB_SYMBOL +#undef LOAD_LIBUSB_SYMBOL if (!loaded) { #ifdef SDL_LIBUSB_DYNAMIC @@ -1219,8 +1217,8 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned struct SDL_hid_device_info *usb_dev; #endif #if HAVE_DRIVER_BACKEND - struct SDL_hid_device_info* driver_devs = NULL; - struct SDL_hid_device_info* driver_dev; + struct SDL_hid_device_info *driver_devs = NULL; + struct SDL_hid_device_info *driver_dev; #endif #if HAVE_PLATFORM_BACKEND struct SDL_hid_device_info *raw_devs = NULL; @@ -1239,8 +1237,8 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned SDL_Log("libusb devices found:"); #endif for (usb_dev = usb_devs; usb_dev; usb_dev = usb_dev->next) { - new_dev = (struct SDL_hid_device_info*) SDL_malloc(sizeof(struct SDL_hid_device_info)); - if (!new_dev) { + new_dev = (struct SDL_hid_device_info *)SDL_malloc(sizeof(struct SDL_hid_device_info)); + if (new_dev == NULL) { LIBUSB_hid_free_enumeration(usb_devs); SDL_hid_free_enumeration(devs); SDL_OutOfMemory(); @@ -1266,7 +1264,7 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned #ifdef HAVE_DRIVER_BACKEND driver_devs = DRIVER_hid_enumerate(vendor_id, product_id); for (driver_dev = driver_devs; driver_dev; driver_dev = driver_dev->next) { - new_dev = (struct SDL_hid_device_info*) SDL_malloc(sizeof(struct SDL_hid_device_info)); + new_dev = (struct SDL_hid_device_info *)SDL_malloc(sizeof(struct SDL_hid_device_info)); CopyHIDDeviceInfo(driver_dev, new_dev); if (last != NULL) { @@ -1312,8 +1310,8 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned } #endif if (!bFound) { - new_dev = (struct SDL_hid_device_info*) SDL_malloc(sizeof(struct SDL_hid_device_info)); - if (!new_dev) { + new_dev = (struct SDL_hid_device_info *)SDL_malloc(sizeof(struct SDL_hid_device_info)); + if (new_dev == NULL) { #ifdef HAVE_LIBUSB if (libusb_ctx.libhandle) { LIBUSB_hid_free_enumeration(usb_devs); @@ -1374,22 +1372,27 @@ SDL_hid_device *SDL_hid_open(unsigned short vendor_id, unsigned short product_id } #if HAVE_PLATFORM_BACKEND - if (udev_ctx && - (pDevice = PLATFORM_hid_open(vendor_id, product_id, serial_number)) != NULL) { - return CreateHIDDeviceWrapper(pDevice, &PLATFORM_Backend); + if (udev_ctx) { + pDevice = PLATFORM_hid_open(vendor_id, product_id, serial_number); + if (pDevice != NULL) { + return CreateHIDDeviceWrapper(pDevice, &PLATFORM_Backend); + } } #endif /* HAVE_PLATFORM_BACKEND */ #if HAVE_DRIVER_BACKEND - if ((pDevice = DRIVER_hid_open(vendor_id, product_id, serial_number)) != NULL) { + pDevice = DRIVER_hid_open(vendor_id, product_id, serial_number); + if (pDevice != NULL) { return CreateHIDDeviceWrapper(pDevice, &DRIVER_Backend); } #endif /* HAVE_DRIVER_BACKEND */ #ifdef HAVE_LIBUSB - if (libusb_ctx.libhandle && - (pDevice = LIBUSB_hid_open(vendor_id, product_id, serial_number)) != NULL) { - return CreateHIDDeviceWrapper(pDevice, &LIBUSB_Backend); + if (libusb_ctx.libhandle != NULL) { + pDevice = LIBUSB_hid_open(vendor_id, product_id, serial_number); + if (pDevice != NULL) { + return CreateHIDDeviceWrapper(pDevice, &LIBUSB_Backend); + } } #endif /* HAVE_LIBUSB */ @@ -1408,22 +1411,27 @@ SDL_hid_device *SDL_hid_open_path(const char *path, int bExclusive /* = false */ } #if HAVE_PLATFORM_BACKEND - if (udev_ctx && - (pDevice = PLATFORM_hid_open_path(path, bExclusive)) != NULL) { - return CreateHIDDeviceWrapper(pDevice, &PLATFORM_Backend); + if (udev_ctx) { + pDevice = PLATFORM_hid_open_path(path, bExclusive); + if (pDevice != NULL) { + return CreateHIDDeviceWrapper(pDevice, &PLATFORM_Backend); + } } #endif /* HAVE_PLATFORM_BACKEND */ #if HAVE_DRIVER_BACKEND - if ((pDevice = DRIVER_hid_open_path(path, bExclusive)) != NULL) { + pDevice = DRIVER_hid_open_path(path, bExclusive); + if (pDevice != NULL) { return CreateHIDDeviceWrapper(pDevice, &DRIVER_Backend); } #endif /* HAVE_DRIVER_BACKEND */ #ifdef HAVE_LIBUSB - if (libusb_ctx.libhandle && - (pDevice = LIBUSB_hid_open_path(path, bExclusive)) != NULL) { - return CreateHIDDeviceWrapper(pDevice, &LIBUSB_Backend); + if (libusb_ctx.libhandle != NULL) { + pDevice = LIBUSB_hid_open_path(path, bExclusive); + if (pDevice != NULL) { + return CreateHIDDeviceWrapper(pDevice, &LIBUSB_Backend); + } } #endif /* HAVE_LIBUSB */ @@ -1512,7 +1520,7 @@ int SDL_hid_get_feature_report(SDL_hid_device *device, unsigned char *data, size void SDL_hid_close(SDL_hid_device *device) { - CHECK_DEVICE_MAGIC(device,); + CHECK_DEVICE_MAGIC(device, ); device->backend->hid_close(device->device); DeleteHIDDeviceWrapper(device); diff --git a/modules/SDL2/src/hidapi/ios/hid.m b/modules/SDL2/src/hidapi/ios/hid.m index 5584570..8ebfdbe 100644 --- a/modules/SDL2/src/hidapi/ios/hid.m +++ b/modules/SDL2/src/hidapi/ios/hid.m @@ -848,8 +848,8 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, } } - if ( ( vendor_id == 0 && product_id == 0 ) || - ( vendor_id == VALVE_USB_VID && product_id == D0G_BLE2_PID ) ) + if ( ( vendor_id == 0 || vendor_id == VALVE_USB_VID ) && + ( product_id == 0 || product_id == D0G_BLE2_PID ) ) { HIDBLEManager *bleManager = HIDBLEManager.sharedInstance; [bleManager updateConnectedSteamControllers:false]; diff --git a/modules/SDL2/src/hidapi/libusb/hid.c b/modules/SDL2/src/hidapi/libusb/hid.c index 9e2a435..98eaa0e 100644 --- a/modules/SDL2/src/hidapi/libusb/hid.c +++ b/modules/SDL2/src/hidapi/libusb/hid.c @@ -688,6 +688,8 @@ static int is_xbox360(unsigned short vendor_id, const struct libusb_interface_de 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ 0x2c22, /* Qanba */ + 0x2dc8, /* 8BitDo */ + 0x9886, /* ASTRO Gaming */ }; if (intf_desc->bInterfaceClass == LIBUSB_CLASS_VENDOR_SPEC && @@ -709,10 +711,12 @@ static int is_xboxone(unsigned short vendor_id, const struct libusb_interface_de static const int XB1_IFACE_SUBCLASS = 71; static const int XB1_IFACE_PROTOCOL = 208; static const int SUPPORTED_VENDORS[] = { + 0x044f, /* Thrustmaster */ 0x045e, /* Microsoft */ 0x0738, /* Mad Catz */ 0x0e6f, /* PDP */ 0x0f0d, /* Hori */ + 0x10f5, /* Turtle Beach */ 0x1532, /* Razer Wildcat */ 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ diff --git a/modules/SDL2/src/hidapi/linux/hid.c b/modules/SDL2/src/hidapi/linux/hid.c index cf857a6..8c3aeae 100644 --- a/modules/SDL2/src/hidapi/linux/hid.c +++ b/modules/SDL2/src/hidapi/linux/hid.c @@ -729,6 +729,8 @@ hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, const hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive) { + const int MAX_ATTEMPTS = 10; + int attempt; hid_device *dev = NULL; hid_init(); @@ -736,7 +738,15 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive) dev = new_hid_device(); /* OPEN HERE */ - dev->device_handle = open(path, O_RDWR | O_CLOEXEC); + for (attempt = 1; attempt <= MAX_ATTEMPTS; ++attempt) { + dev->device_handle = open(path, O_RDWR | O_CLOEXEC); + if (dev->device_handle < 0 && errno == EACCES) { + /* udev might be setting up permissions, wait a bit and try again */ + usleep(1 * 1000); + continue; + } + break; + } /* If we have a good handle, return it. */ if (dev->device_handle >= 0) { @@ -874,9 +884,9 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data, unsigned char report = data[0]; res = ioctl(dev->device_handle, HIDIOCGFEATURE(length), data); - if (res < 0) - perror("ioctl (GFEATURE)"); - else if (dev->needs_ble_hack) { + if (res < 0) { + /* perror("ioctl (GFEATURE)"); */ + } else if (dev->needs_ble_hack) { /* Versions of BlueZ before 5.56 don't include the report in the data, * and versions of BlueZ >= 5.56 include 2 copies of the report. * We'll fix it so that there is a single copy of the report in both cases diff --git a/modules/SDL2/src/hidapi/mac/hid.c b/modules/SDL2/src/hidapi/mac/hid.c index d5dfbc2..c654168 100644 --- a/modules/SDL2/src/hidapi/mac/hid.c +++ b/modules/SDL2/src/hidapi/mac/hid.c @@ -772,7 +772,7 @@ static void *read_thread(void *param) while (!dev->shutdown_thread && !dev->disconnected) { code = CFRunLoopRunInMode(dev->run_loop_mode, 1000/*sec*/, FALSE); /* Return if the device has been disconnected */ - if (code == kCFRunLoopRunFinished) { + if (code == kCFRunLoopRunFinished || code == kCFRunLoopRunStopped) { dev->disconnected = 1; break; } @@ -819,10 +819,12 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive) /* Set up the HID Manager if it hasn't been done */ if (hid_init() < 0) return NULL; - + +#if 0 /* We have a path because the IOHIDManager is already updated */ /* give the IOHIDManager a chance to update itself */ process_pending_events(); - +#endif + device_set = IOHIDManagerCopyDevices(hid_mgr); if (!device_set) return NULL; @@ -853,7 +855,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive) /* Create the Run Loop Mode for this device. printing the reference seems to work. */ - sprintf(str, "HIDAPI_%p", os_dev); + snprintf(str, sizeof(str), "HIDAPI_%p", os_dev); dev->run_loop_mode = CFStringCreateWithCString(NULL, str, kCFStringEncodingASCII); diff --git a/modules/SDL2/src/hidapi/windows/hid.c b/modules/SDL2/src/hidapi/windows/hid.c index 27c09e5..3d8a230 100644 --- a/modules/SDL2/src/hidapi/windows/hid.c +++ b/modules/SDL2/src/hidapi/windows/hid.c @@ -346,13 +346,14 @@ int hid_blacklist(unsigned short vendor_id, unsigned short product_id) { 0x1532, 0x010B }, /* Razer Arctosa Gaming keyboard */ { 0x045E, 0x0822 }, /* Microsoft Precision Mouse */ { 0x0D8C, 0x0014 }, /* Sharkoon Skiller SGH2 headset */ + { 0x1CCF, 0x0000 }, /* All Konami Amusement Devices */ /* Turns into an Android controller when enumerated... */ { 0x0738, 0x2217 } /* SPEEDLINK COMPETITION PRO */ }; for (i = 0; i < (sizeof(known_bad)/sizeof(known_bad[0])); i++) { - if ((vendor_id == known_bad[i].vid) && (product_id == known_bad[i].pid)) { + if ((vendor_id == known_bad[i].vid) && (product_id == known_bad[i].pid || known_bad[i].pid == 0x0000)) { return 1; } } diff --git a/modules/SDL2/src/joystick/SDL_gamecontroller.c b/modules/SDL2/src/joystick/SDL_gamecontroller.c index dea89ca..035176b 100644 --- a/modules/SDL2/src/joystick/SDL_gamecontroller.c +++ b/modules/SDL2/src/joystick/SDL_gamecontroller.c @@ -40,23 +40,22 @@ #include "SDL_system.h" #endif - /* Many controllers turn the center button into an instantaneous button press */ -#define SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS 250 - -#define SDL_CONTROLLER_CRC_FIELD "crc:" -#define SDL_CONTROLLER_CRC_FIELD_SIZE 4 /* hard-coded for speed */ -#define SDL_CONTROLLER_PLATFORM_FIELD "platform:" -#define SDL_CONTROLLER_PLATFORM_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_PLATFORM_FIELD) -#define SDL_CONTROLLER_HINT_FIELD "hint:" -#define SDL_CONTROLLER_HINT_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_HINT_FIELD) -#define SDL_CONTROLLER_SDKGE_FIELD "sdk>=:" -#define SDL_CONTROLLER_SDKGE_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_SDKGE_FIELD) -#define SDL_CONTROLLER_SDKLE_FIELD "sdk<=:" -#define SDL_CONTROLLER_SDKLE_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_SDKLE_FIELD) +#define SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS 250 + +#define SDL_CONTROLLER_CRC_FIELD "crc:" +#define SDL_CONTROLLER_CRC_FIELD_SIZE 4 /* hard-coded for speed */ +#define SDL_CONTROLLER_PLATFORM_FIELD "platform:" +#define SDL_CONTROLLER_PLATFORM_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_PLATFORM_FIELD) +#define SDL_CONTROLLER_HINT_FIELD "hint:" +#define SDL_CONTROLLER_HINT_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_HINT_FIELD) +#define SDL_CONTROLLER_SDKGE_FIELD "sdk>=:" +#define SDL_CONTROLLER_SDKGE_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_SDKGE_FIELD) +#define SDL_CONTROLLER_SDKLE_FIELD "sdk<=:" +#define SDL_CONTROLLER_SDKLE_FIELD_SIZE SDL_strlen(SDL_CONTROLLER_SDKLE_FIELD) /* a list of currently opened game controllers */ -static SDL_GameController *SDL_gamecontrollers = NULL; +static SDL_GameController *SDL_gamecontrollers SDL_GUARDED_BY(SDL_joystick_lock) = NULL; typedef struct { @@ -65,13 +64,15 @@ typedef struct { int button; - struct { + struct + { int axis; int axis_min; int axis_max; } axis; - struct { + struct + { int hat; int hat_mask; } hat; @@ -83,7 +84,8 @@ typedef struct { SDL_GameControllerButton button; - struct { + struct + { SDL_GameControllerAxis axis; int axis_min; int axis_max; @@ -101,46 +103,54 @@ typedef enum SDL_CONTROLLER_MAPPING_PRIORITY_USER, } SDL_ControllerMappingPriority; +#define _guarded SDL_GUARDED_BY(SDL_joystick_lock) + typedef struct _ControllerMapping_t { - SDL_JoystickGUID guid; - char *name; - char *mapping; - SDL_ControllerMappingPriority priority; - struct _ControllerMapping_t *next; + SDL_JoystickGUID guid _guarded; + char *name _guarded; + char *mapping _guarded; + SDL_ControllerMappingPriority priority _guarded; + struct _ControllerMapping_t *next _guarded; } ControllerMapping_t; +#undef _guarded + static SDL_JoystickGUID s_zeroGUID; -static ControllerMapping_t *s_pSupportedControllers = NULL; -static ControllerMapping_t *s_pDefaultMapping = NULL; -static ControllerMapping_t *s_pXInputMapping = NULL; +static ControllerMapping_t *s_pSupportedControllers SDL_GUARDED_BY(SDL_joystick_lock) = NULL; +static ControllerMapping_t *s_pDefaultMapping SDL_GUARDED_BY(SDL_joystick_lock) = NULL; +static ControllerMapping_t *s_pXInputMapping SDL_GUARDED_BY(SDL_joystick_lock) = NULL; static char gamecontroller_magic; +#define _guarded SDL_GUARDED_BY(SDL_joystick_lock) + /* The SDL game controller structure */ struct _SDL_GameController { - const void *magic; + const void *magic _guarded; - SDL_Joystick *joystick; /* underlying joystick device */ - int ref_count; + SDL_Joystick *joystick _guarded; /* underlying joystick device */ + int ref_count _guarded; - const char *name; - ControllerMapping_t *mapping; - int num_bindings; - SDL_ExtendedGameControllerBind *bindings; - SDL_ExtendedGameControllerBind **last_match_axis; - Uint8 *last_hat_mask; - Uint32 guide_button_down; + const char *name _guarded; + ControllerMapping_t *mapping _guarded; + int num_bindings _guarded; + SDL_ExtendedGameControllerBind *bindings _guarded; + SDL_ExtendedGameControllerBind **last_match_axis _guarded; + Uint8 *last_hat_mask _guarded; + Uint32 guide_button_down _guarded; - struct _SDL_GameController *next; /* pointer to next game controller we have allocated */ + struct _SDL_GameController *next _guarded; /* pointer to next game controller we have allocated */ }; +#undef _guarded -#define CHECK_GAMECONTROLLER_MAGIC(gamecontroller, retval) \ +#define CHECK_GAMECONTROLLER_MAGIC(gamecontroller, retval) \ if (!gamecontroller || gamecontroller->magic != &gamecontroller_magic || \ - !SDL_PrivateJoystickValid(gamecontroller->joystick)) { \ - SDL_InvalidParamError("gamecontroller"); \ - return retval; \ + !SDL_PrivateJoystickValid(gamecontroller->joystick)) { \ + SDL_InvalidParamError("gamecontroller"); \ + SDL_UnlockJoysticks(); \ + return retval; \ } typedef struct @@ -153,8 +163,7 @@ typedef struct static SDL_vidpid_list SDL_allowed_controllers; static SDL_vidpid_list SDL_ignored_controllers; -static void -SDL_LoadVIDPIDListFromHint(const char *hint, SDL_vidpid_list *list) +static void SDL_LoadVIDPIDListFromHint(const char *hint, SDL_vidpid_list *list) { Uint32 entry; char *spot; @@ -163,12 +172,12 @@ SDL_LoadVIDPIDListFromHint(const char *hint, SDL_vidpid_list *list) list->num_entries = 0; if (hint && *hint == '@') { - spot = file = (char *)SDL_LoadFile(hint+1, NULL); + spot = file = (char *)SDL_LoadFile(hint + 1, NULL); } else { spot = (char *)hint; } - if (!spot) { + if (spot == NULL) { return; } @@ -176,14 +185,14 @@ SDL_LoadVIDPIDListFromHint(const char *hint, SDL_vidpid_list *list) entry = (Uint16)SDL_strtol(spot, &spot, 0); entry <<= 16; spot = SDL_strstr(spot, "0x"); - if (!spot) { + if (spot == NULL) { break; } entry |= (Uint16)SDL_strtol(spot, &spot, 0); if (list->num_entries == list->max_entries) { int max_entries = list->max_entries + 16; - Uint32 *entries = (Uint32 *)SDL_realloc(list->entries, max_entries*sizeof(*list->entries)); + Uint32 *entries = (Uint32 *)SDL_realloc(list->entries, max_entries * sizeof(*list->entries)); if (entries == NULL) { /* Out of memory, go with what we have already */ break; @@ -199,14 +208,12 @@ SDL_LoadVIDPIDListFromHint(const char *hint, SDL_vidpid_list *list) } } -static void SDLCALL -SDL_GameControllerIgnoreDevicesChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_GameControllerIgnoreDevicesChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_LoadVIDPIDListFromHint(hint, &SDL_ignored_controllers); } -static void SDLCALL -SDL_GameControllerIgnoreDevicesExceptChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_GameControllerIgnoreDevicesExceptChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_LoadVIDPIDListFromHint(hint, &SDL_allowed_controllers); } @@ -222,9 +229,9 @@ static SDL_bool HasSameOutput(SDL_ExtendedGameControllerBind *a, SDL_ExtendedGam } if (a->outputType == SDL_CONTROLLER_BINDTYPE_AXIS) { - return (a->output.axis.axis == b->output.axis.axis); + return a->output.axis.axis == b->output.axis.axis; } else { - return (a->output.button == b->output.button); + return a->output.button == b->output.button; } } @@ -243,7 +250,7 @@ static void HandleJoystickAxis(SDL_GameController *gamecontroller, int axis, int SDL_ExtendedGameControllerBind *last_match; SDL_ExtendedGameControllerBind *match = NULL; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); + SDL_AssertJoysticksLocked(); last_match = gamecontroller->last_match_axis[axis]; for (i = 0; i < gamecontroller->num_bindings; ++i) { @@ -266,7 +273,7 @@ static void HandleJoystickAxis(SDL_GameController *gamecontroller, int axis, int } } - if (last_match && (!match || !HasSameOutput(last_match, match))) { + if (last_match && (match == NULL || !HasSameOutput(last_match, match))) { /* Clear the last input that this axis generated */ ResetOutput(gamecontroller, last_match); } @@ -296,7 +303,7 @@ static void HandleJoystickButton(SDL_GameController *gamecontroller, int button, { int i; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); + SDL_AssertJoysticksLocked(); for (i = 0; i < gamecontroller->num_bindings; ++i) { SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; @@ -318,7 +325,7 @@ static void HandleJoystickHat(SDL_GameController *gamecontroller, int hat, Uint8 int i; Uint8 last_mask, changed_mask; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); + SDL_AssertJoysticksLocked(); last_mask = gamecontroller->last_hat_mask[hat]; changed_mask = (last_mask ^ value); @@ -341,7 +348,6 @@ static void HandleJoystickHat(SDL_GameController *gamecontroller, int hat, Uint8 gamecontroller->last_hat_mask[hat] = value; } - /* The joystick layer will _also_ send events to recenter before disconnect, but it has to make (sometimes incorrect) guesses at what being "centered" is. The game controller layer, however, can set a definite logical idle @@ -353,96 +359,90 @@ static void RecenterGameController(SDL_GameController *gamecontroller) SDL_GameControllerButton button; SDL_GameControllerAxis axis; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); - - for (button = (SDL_GameControllerButton) 0; button < SDL_CONTROLLER_BUTTON_MAX; button++) { + for (button = (SDL_GameControllerButton)0; button < SDL_CONTROLLER_BUTTON_MAX; button++) { if (SDL_GameControllerGetButton(gamecontroller, button)) { SDL_PrivateGameControllerButton(gamecontroller, button, SDL_RELEASED); } } - for (axis = (SDL_GameControllerAxis) 0; axis < SDL_CONTROLLER_AXIS_MAX; axis++) { + for (axis = (SDL_GameControllerAxis)0; axis < SDL_CONTROLLER_AXIS_MAX; axis++) { if (SDL_GameControllerGetAxis(gamecontroller, axis) != 0) { SDL_PrivateGameControllerAxis(gamecontroller, axis, 0); } } } - /* * Event filter to fire controller events from joystick ones */ -static int SDLCALL SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event) +static int SDLCALL SDL_GameControllerEventWatcher(void *userdata, SDL_Event *event) { - switch(event->type) { + SDL_GameController *controller; + + switch (event->type) { case SDL_JOYAXISMOTION: - { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while (controllerlist) { - if (controllerlist->joystick->instance_id == event->jaxis.which) { - HandleJoystickAxis(controllerlist, event->jaxis.axis, event->jaxis.value); - break; - } - controllerlist = controllerlist->next; + { + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->joystick->instance_id == event->jaxis.which) { + HandleJoystickAxis(controller, event->jaxis.axis, event->jaxis.value); + break; } } - break; + } break; case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: - { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while (controllerlist) { - if (controllerlist->joystick->instance_id == event->jbutton.which) { - HandleJoystickButton(controllerlist, event->jbutton.button, event->jbutton.state); - break; - } - controllerlist = controllerlist->next; + { + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->joystick->instance_id == event->jbutton.which) { + HandleJoystickButton(controller, event->jbutton.button, event->jbutton.state); + break; } } - break; + } break; case SDL_JOYHATMOTION: - { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while (controllerlist) { - if (controllerlist->joystick->instance_id == event->jhat.which) { - HandleJoystickHat(controllerlist, event->jhat.hat, event->jhat.value); - break; - } - controllerlist = controllerlist->next; + { + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->joystick->instance_id == event->jhat.which) { + HandleJoystickHat(controller, event->jhat.hat, event->jhat.value); + break; } } - break; + } break; case SDL_JOYDEVICEADDED: - { - if (SDL_IsGameController(event->jdevice.which)) { - SDL_Event deviceevent; - deviceevent.type = SDL_CONTROLLERDEVICEADDED; - deviceevent.cdevice.which = event->jdevice.which; - SDL_PushEvent(&deviceevent); - } + { + if (SDL_IsGameController(event->jdevice.which)) { + SDL_Event deviceevent; + deviceevent.type = SDL_CONTROLLERDEVICEADDED; + deviceevent.cdevice.which = event->jdevice.which; + SDL_PushEvent(&deviceevent); } - break; + } break; case SDL_JOYDEVICEREMOVED: - { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while (controllerlist) { - if (controllerlist->joystick->instance_id == event->jdevice.which) { - RecenterGameController(controllerlist); - break; - } - controllerlist = controllerlist->next; + { + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->joystick->instance_id == event->jdevice.which) { + RecenterGameController(controller); + break; } + } - /* We don't know if this was a game controller, so go ahead and send an event */ - { - SDL_Event deviceevent; + /* We don't know if this was a game controller, so go ahead and send an event */ + { + SDL_Event deviceevent; - deviceevent.type = SDL_CONTROLLERDEVICEREMOVED; - deviceevent.cdevice.which = event->jdevice.which; - SDL_PushEvent(&deviceevent); - } + deviceevent.type = SDL_CONTROLLERDEVICEREMOVED; + deviceevent.cdevice.which = event->jdevice.which; + SDL_PushEvent(&deviceevent); } - break; + } break; default: break; } @@ -465,8 +465,8 @@ static ControllerMapping_t *SDL_CreateMappingForAndroidController(SDL_JoystickGU int button_mask; int axis_mask; - button_mask = SDL_SwapLE16(*(Uint16*)(&guid.data[sizeof(guid.data)-4])); - axis_mask = SDL_SwapLE16(*(Uint16*)(&guid.data[sizeof(guid.data)-2])); + button_mask = SDL_SwapLE16(*(Uint16 *)(&guid.data[sizeof(guid.data) - 4])); + axis_mask = SDL_SwapLE16(*(Uint16 *)(&guid.data[sizeof(guid.data) - 2])); if (!button_mask && !axis_mask) { /* Accelerometer, shouldn't have a game controller mapping */ return NULL; @@ -549,8 +549,7 @@ static ControllerMapping_t *SDL_CreateMappingForAndroidController(SDL_JoystickGU SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string)); } - return SDL_PrivateAddMappingForGUID(guid, mapping_string, - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); + return SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } #endif /* __ANDROID__ */ @@ -573,11 +572,24 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI /* GameCube driver has 12 buttons and 6 axes */ SDL_strlcat(mapping_string, "a:b0,b:b1,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3,start:b8,x:b2,y:b3,", sizeof(mapping_string)); } else if (vendor == USB_VENDOR_NINTENDO && - guid.data[15] != k_eSwitchDeviceInfoControllerType_Unknown && - guid.data[15] != k_eSwitchDeviceInfoControllerType_ProController && - guid.data[15] != k_eWiiExtensionControllerType_Gamepad && - guid.data[15] != k_eWiiExtensionControllerType_WiiUPro) { + (guid.data[15] == k_eSwitchDeviceInfoControllerType_HVCLeft || + guid.data[15] == k_eSwitchDeviceInfoControllerType_HVCRight || + guid.data[15] == k_eSwitchDeviceInfoControllerType_NESLeft || + guid.data[15] == k_eSwitchDeviceInfoControllerType_NESRight || + guid.data[15] == k_eSwitchDeviceInfoControllerType_SNES || + guid.data[15] == k_eSwitchDeviceInfoControllerType_N64 || + guid.data[15] == k_eSwitchDeviceInfoControllerType_SEGA_Genesis || + guid.data[15] == k_eWiiExtensionControllerType_None || + guid.data[15] == k_eWiiExtensionControllerType_Nunchuk || + guid.data[15] == k_eSwitchDeviceInfoControllerType_JoyConLeft || + guid.data[15] == k_eSwitchDeviceInfoControllerType_JoyConRight)) { switch (guid.data[15]) { + case k_eSwitchDeviceInfoControllerType_HVCLeft: + SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,rightshoulder:b10,start:b6,", sizeof(mapping_string)); + break; + case k_eSwitchDeviceInfoControllerType_HVCRight: + SDL_strlcat(mapping_string, "a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,rightshoulder:b10,", sizeof(mapping_string)); + break; case k_eSwitchDeviceInfoControllerType_NESLeft: case k_eSwitchDeviceInfoControllerType_NESRight: SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,rightshoulder:b10,start:b6,", sizeof(mapping_string)); @@ -595,17 +607,16 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,start:b6,x:b2,y:b3,", sizeof(mapping_string)); break; case k_eWiiExtensionControllerType_Nunchuk: - { - /* FIXME: Should we map this to the left or right side? */ - const SDL_bool map_nunchuck_left_side = SDL_TRUE; + { + /* FIXME: Should we map this to the left or right side? */ + const SDL_bool map_nunchuck_left_side = SDL_TRUE; - if (map_nunchuck_left_side) { - SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,start:b6,x:b2,y:b3,", sizeof(mapping_string)); - } else { - SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,rightshoulder:b9,righttrigger:a4,rightx:a0,righty:a1,start:b6,x:b2,y:b3,", sizeof(mapping_string)); - } + if (map_nunchuck_left_side) { + SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,start:b6,x:b2,y:b3,", sizeof(mapping_string)); + } else { + SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,rightshoulder:b9,righttrigger:a4,rightx:a0,righty:a1,start:b6,x:b2,y:b3,", sizeof(mapping_string)); } - break; + } break; default: if (SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS, SDL_FALSE)) { /* Vertical mode */ @@ -649,6 +660,10 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI case SDL_CONTROLLER_TYPE_PS5: /* PS5 controllers have a microphone button and an additional touchpad button */ SDL_strlcat(mapping_string, "touchpad:b15,misc1:b16,", sizeof(mapping_string)); + /* DualSense Edge controllers have paddles */ + if (SDL_IsJoystickDualSenseEdge(vendor, product)) { + SDL_strlcat(mapping_string, "paddle1:b20,paddle2:b19,paddle3:b18,paddle4:b17,", sizeof(mapping_string)); + } break; case SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO: /* Nintendo Switch Pro controllers have a screenshot button */ @@ -681,8 +696,7 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI } } - return SDL_PrivateAddMappingForGUID(guid, mapping_string, - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); + return SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } /* @@ -696,8 +710,7 @@ static ControllerMapping_t *SDL_CreateMappingForRAWINPUTController(SDL_JoystickG SDL_strlcpy(mapping_string, "none,*,", sizeof(mapping_string)); SDL_strlcat(mapping_string, "a:b0,b:b1,x:b2,y:b3,back:b6,guide:b10,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,", sizeof(mapping_string)); - return SDL_PrivateAddMappingForGUID(guid, mapping_string, - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); + return SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } /* @@ -715,8 +728,7 @@ static ControllerMapping_t *SDL_CreateMappingForWGIController(SDL_JoystickGUID g SDL_strlcpy(mapping_string, "none,*,", sizeof(mapping_string)); SDL_strlcat(mapping_string, "a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:b10,dpdown:b12,dpleft:b13,dpright:b11,leftx:a1,lefty:a0~,rightx:a3,righty:a2~,lefttrigger:a4,righttrigger:a5,", sizeof(mapping_string)); - return SDL_PrivateAddMappingForGUID(guid, mapping_string, - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); + return SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } /* @@ -727,6 +739,8 @@ static ControllerMapping_t *SDL_PrivateMatchControllerMappingForGUID(SDL_Joystic ControllerMapping_t *mapping; Uint16 crc = 0; + SDL_AssertJoysticksLocked(); + if (match_crc) { SDL_GetJoystickGUIDInfo(guid, NULL, NULL, NULL, &crc); } @@ -770,7 +784,7 @@ static ControllerMapping_t *SDL_PrivateMatchControllerMappingForGUID(SDL_Joystic /* * Helper function to scan the mappings database for a controller with the specified GUID */ -static ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID guid, SDL_bool create_mapping) +static ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID guid, SDL_bool adding_mapping) { ControllerMapping_t *mapping; Uint16 vendor, product, crc; @@ -790,6 +804,13 @@ static ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickG return mapping; } + if (adding_mapping) { + /* We didn't find an existing mapping */ + return NULL; + } + + /* Try harder to get the best match, or create a mapping */ + if (vendor && product) { /* Try again, ignoring the version */ if (crc) { @@ -805,35 +826,29 @@ static ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickG } } - if (!create_mapping) { - return NULL; - } - #if SDL_JOYSTICK_XINPUT if (SDL_IsJoystickXInput(guid)) { /* This is an XInput device */ return s_pXInputMapping; } #endif - if (!mapping) { - if (SDL_IsJoystickHIDAPI(guid)) { - mapping = SDL_CreateMappingForHIDAPIController(guid); - } else if (SDL_IsJoystickRAWINPUT(guid)) { - mapping = SDL_CreateMappingForRAWINPUTController(guid); - } else if (SDL_IsJoystickWGI(guid)) { - mapping = SDL_CreateMappingForWGIController(guid); - } else if (SDL_IsJoystickVirtual(guid)) { - /* We'll pick up a robust mapping in VIRTUAL_JoystickGetGamepadMapping */ + if (SDL_IsJoystickHIDAPI(guid)) { + mapping = SDL_CreateMappingForHIDAPIController(guid); + } else if (SDL_IsJoystickRAWINPUT(guid)) { + mapping = SDL_CreateMappingForRAWINPUTController(guid); + } else if (SDL_IsJoystickWGI(guid)) { + mapping = SDL_CreateMappingForWGIController(guid); + } else if (SDL_IsJoystickVirtual(guid)) { + /* We'll pick up a robust mapping in VIRTUAL_JoystickGetGamepadMapping */ #ifdef __ANDROID__ - } else { - mapping = SDL_CreateMappingForAndroidController(guid); + } else { + mapping = SDL_CreateMappingForAndroidController(guid); #endif - } } return mapping; } -static const char* map_StringForControllerAxis[] = { +static const char *map_StringForControllerAxis[] = { "leftx", "lefty", "rightx", @@ -846,21 +861,22 @@ static const char* map_StringForControllerAxis[] = { /* * convert a string to its enum equivalent */ -SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *pchString) +SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *str) { int entry; - if (pchString && (*pchString == '+' || *pchString == '-')) { - ++pchString; + if (str == NULL || str[0] == '\0') { + return SDL_CONTROLLER_AXIS_INVALID; } - if (!pchString || !pchString[0]) { - return SDL_CONTROLLER_AXIS_INVALID; + if (*str == '+' || *str == '-') { + ++str; } for (entry = 0; map_StringForControllerAxis[entry]; ++entry) { - if (!SDL_strcasecmp(pchString, map_StringForControllerAxis[entry])) - return (SDL_GameControllerAxis) entry; + if (SDL_strcasecmp(str, map_StringForControllerAxis[entry]) == 0) { + return (SDL_GameControllerAxis)entry; + } } return SDL_CONTROLLER_AXIS_INVALID; } @@ -868,7 +884,7 @@ SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *pchString /* * convert an enum to its string equivalent */ -const char* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis) +const char *SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis) { if (axis > SDL_CONTROLLER_AXIS_INVALID && axis < SDL_CONTROLLER_AXIS_MAX) { return map_StringForControllerAxis[axis]; @@ -876,7 +892,7 @@ const char* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis) return NULL; } -static const char* map_StringForControllerButton[] = { +static const char *map_StringForControllerButton[] = { "a", "b", "x", @@ -904,15 +920,17 @@ static const char* map_StringForControllerButton[] = { /* * convert a string to its enum equivalent */ -SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *pchString) +SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *str) { int entry; - if (!pchString || !pchString[0]) + if (str == NULL || str[0] == '\0') { return SDL_CONTROLLER_BUTTON_INVALID; + } for (entry = 0; map_StringForControllerButton[entry]; ++entry) { - if (SDL_strcasecmp(pchString, map_StringForControllerButton[entry]) == 0) - return (SDL_GameControllerButton) entry; + if (SDL_strcasecmp(str, map_StringForControllerButton[entry]) == 0) { + return (SDL_GameControllerButton)entry; + } } return SDL_CONTROLLER_BUTTON_INVALID; } @@ -920,10 +938,10 @@ SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *pchSt /* * convert an enum to its string equivalent */ -const char* SDL_GameControllerGetStringForButton(SDL_GameControllerButton axis) +const char *SDL_GameControllerGetStringForButton(SDL_GameControllerButton button) { - if (axis > SDL_CONTROLLER_BUTTON_INVALID && axis < SDL_CONTROLLER_BUTTON_MAX) { - return map_StringForControllerButton[axis]; + if (button > SDL_CONTROLLER_BUTTON_INVALID && button < SDL_CONTROLLER_BUTTON_MAX) { + return map_StringForControllerButton[button]; } return NULL; } @@ -940,7 +958,7 @@ static void SDL_PrivateGameControllerParseElement(SDL_GameController *gamecontro char half_axis_input = 0; char half_axis_output = 0; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); + SDL_AssertJoysticksLocked(); if (*szGameButton == '+' || *szGameButton == '-') { half_axis_output = *szGameButton++; @@ -981,7 +999,7 @@ static void SDL_PrivateGameControllerParseElement(SDL_GameController *gamecontro invert_input = SDL_TRUE; } - if (szJoystickButton[0] == 'a' && SDL_isdigit((unsigned char) szJoystickButton[1])) { + if (szJoystickButton[0] == 'a' && SDL_isdigit((unsigned char)szJoystickButton[1])) { bind.inputType = SDL_CONTROLLER_BINDTYPE_AXIS; bind.input.axis.axis = SDL_atoi(&szJoystickButton[1]); if (half_axis_input == '+') { @@ -999,11 +1017,11 @@ static void SDL_PrivateGameControllerParseElement(SDL_GameController *gamecontro bind.input.axis.axis_min = bind.input.axis.axis_max; bind.input.axis.axis_max = tmp; } - } else if (szJoystickButton[0] == 'b' && SDL_isdigit((unsigned char) szJoystickButton[1])) { + } else if (szJoystickButton[0] == 'b' && SDL_isdigit((unsigned char)szJoystickButton[1])) { bind.inputType = SDL_CONTROLLER_BINDTYPE_BUTTON; bind.input.button = SDL_atoi(&szJoystickButton[1]); - } else if (szJoystickButton[0] == 'h' && SDL_isdigit((unsigned char) szJoystickButton[1]) && - szJoystickButton[2] == '.' && SDL_isdigit((unsigned char) szJoystickButton[3])) { + } else if (szJoystickButton[0] == 'h' && SDL_isdigit((unsigned char)szJoystickButton[1]) && + szJoystickButton[2] == '.' && SDL_isdigit((unsigned char)szJoystickButton[3])) { int hat = SDL_atoi(&szJoystickButton[1]); int mask = SDL_atoi(&szJoystickButton[3]); bind.inputType = SDL_CONTROLLER_BINDTYPE_HAT; @@ -1024,12 +1042,10 @@ static void SDL_PrivateGameControllerParseElement(SDL_GameController *gamecontro gamecontroller->bindings[gamecontroller->num_bindings - 1] = bind; } - /* * given a controller mapping string update our mapping object */ -static void -SDL_PrivateGameControllerParseControllerConfigString(SDL_GameController *gamecontroller, const char *pchString) +static void SDL_PrivateGameControllerParseControllerConfigString(SDL_GameController *gamecontroller, const char *pchString) { char szGameButton[20]; char szJoystickButton[20]; @@ -1037,8 +1053,6 @@ SDL_PrivateGameControllerParseControllerConfigString(SDL_GameController *gamecon int i = 0; const char *pchPos = pchString; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); - SDL_zeroa(szGameButton); SDL_zeroa(szJoystickButton); @@ -1086,12 +1100,12 @@ static void SDL_PrivateLoadButtonMapping(SDL_GameController *gamecontroller, Con { int i; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, ); + SDL_AssertJoysticksLocked(); gamecontroller->name = pControllerMapping->name; gamecontroller->num_bindings = 0; gamecontroller->mapping = pControllerMapping; - if (gamecontroller->joystick->naxes) { + if (gamecontroller->joystick->naxes != 0 && gamecontroller->last_match_axis != NULL) { SDL_memset(gamecontroller->last_match_axis, 0, gamecontroller->joystick->naxes * sizeof(*gamecontroller->last_match_axis)); } @@ -1106,13 +1120,12 @@ static void SDL_PrivateLoadButtonMapping(SDL_GameController *gamecontroller, Con binding->output.axis.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) { if (binding->input.axis.axis < gamecontroller->joystick->naxes) { gamecontroller->joystick->axes[binding->input.axis.axis].value = - gamecontroller->joystick->axes[binding->input.axis.axis].zero = (Sint16)binding->input.axis.axis_min; + gamecontroller->joystick->axes[binding->input.axis.axis].zero = (Sint16)binding->input.axis.axis_min; } } } } - /* * grab the guid string from a mapping string */ @@ -1121,7 +1134,7 @@ static char *SDL_PrivateGetControllerGUIDFromMappingString(const char *pMapping) const char *pFirstComma = SDL_strchr(pMapping, ','); if (pFirstComma) { char *pchGUID = SDL_malloc(pFirstComma - pMapping + 1); - if (!pchGUID) { + if (pchGUID == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1151,7 +1164,6 @@ static char *SDL_PrivateGetControllerGUIDFromMappingString(const char *pMapping) return NULL; } - /* * grab the name string from a mapping string */ @@ -1161,15 +1173,17 @@ static char *SDL_PrivateGetControllerNameFromMappingString(const char *pMapping) char *pchName; pFirstComma = SDL_strchr(pMapping, ','); - if (!pFirstComma) + if (pFirstComma == NULL) { return NULL; + } pSecondComma = SDL_strchr(pFirstComma + 1, ','); - if (!pSecondComma) + if (pSecondComma == NULL) { return NULL; + } pchName = SDL_malloc(pSecondComma - pFirstComma); - if (!pchName) { + if (pchName == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1178,7 +1192,6 @@ static char *SDL_PrivateGetControllerNameFromMappingString(const char *pMapping) return pchName; } - /* * grab the button mapping string from a mapping string */ @@ -1187,12 +1200,14 @@ static char *SDL_PrivateGetControllerMappingFromMappingString(const char *pMappi const char *pFirstComma, *pSecondComma; pFirstComma = SDL_strchr(pMapping, ','); - if (!pFirstComma) + if (pFirstComma == NULL) { return NULL; + } pSecondComma = SDL_strchr(pFirstComma + 1, ','); - if (!pSecondComma) + if (pSecondComma == NULL) { return NULL; + } return SDL_strdup(pSecondComma + 1); /* mapping is everything after the 3rd comma */ } @@ -1202,43 +1217,44 @@ static char *SDL_PrivateGetControllerMappingFromMappingString(const char *pMappi */ static void SDL_PrivateGameControllerRefreshMapping(ControllerMapping_t *pControllerMapping) { - SDL_GameController *gamecontrollerlist = SDL_gamecontrollers; - while (gamecontrollerlist) { - if (gamecontrollerlist->mapping == pControllerMapping) { - /* Not really threadsafe. Should this lock access within SDL_GameControllerEventWatcher? */ - SDL_PrivateLoadButtonMapping(gamecontrollerlist, pControllerMapping); + SDL_GameController *controller; + + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->mapping == pControllerMapping) { + SDL_PrivateLoadButtonMapping(controller, pControllerMapping); { SDL_Event event; event.type = SDL_CONTROLLERDEVICEREMAPPED; - event.cdevice.which = gamecontrollerlist->joystick->instance_id; + event.cdevice.which = controller->joystick->instance_id; SDL_PushEvent(&event); } } - - gamecontrollerlist = gamecontrollerlist->next; } } /* * Helper function to add a mapping for a guid */ -static ControllerMapping_t * -SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString, SDL_bool *existing, SDL_ControllerMappingPriority priority) +static ControllerMapping_t *SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString, SDL_bool *existing, SDL_ControllerMappingPriority priority) { char *pchName; char *pchMapping; ControllerMapping_t *pControllerMapping; Uint16 crc; + SDL_AssertJoysticksLocked(); + pchName = SDL_PrivateGetControllerNameFromMappingString(mappingString); - if (!pchName) { + if (pchName == NULL) { SDL_SetError("Couldn't parse name from %s", mappingString); return NULL; } pchMapping = SDL_PrivateGetControllerMappingFromMappingString(mappingString); - if (!pchMapping) { + if (pchMapping == NULL) { SDL_free(pchName); SDL_SetError("Couldn't parse %s", mappingString); return NULL; @@ -1276,7 +1292,7 @@ SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString, } } - pControllerMapping = SDL_PrivateGetControllerMappingForGUID(jGUID, SDL_FALSE); + pControllerMapping = SDL_PrivateGetControllerMappingForGUID(jGUID, SDL_TRUE); if (pControllerMapping) { /* Only overwrite the mapping if the priority is the same or higher. */ if (pControllerMapping->priority <= priority) { @@ -1295,7 +1311,7 @@ SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString, *existing = SDL_TRUE; } else { pControllerMapping = SDL_malloc(sizeof(*pControllerMapping)); - if (!pControllerMapping) { + if (pControllerMapping == NULL) { SDL_free(pchName); SDL_free(pchMapping); SDL_OutOfMemory(); @@ -1315,9 +1331,9 @@ SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString, /* Add the mapping to the end of the list */ ControllerMapping_t *pCurrMapping, *pPrevMapping; - for ( pPrevMapping = s_pSupportedControllers, pCurrMapping = pPrevMapping->next; - pCurrMapping; - pPrevMapping = pCurrMapping, pCurrMapping = pCurrMapping->next ) { + for (pPrevMapping = s_pSupportedControllers, pCurrMapping = pPrevMapping->next; + pCurrMapping; + pPrevMapping = pCurrMapping, pCurrMapping = pCurrMapping->next) { /* continue; */ } pPrevMapping->next = pControllerMapping; @@ -1336,22 +1352,22 @@ static ControllerMapping_t *SDL_PrivateGetControllerMappingForNameAndGUID(const { ControllerMapping_t *mapping; - mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_TRUE); + SDL_AssertJoysticksLocked(); + + mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_FALSE); #ifdef __LINUX__ - if (!mapping && name) { + if (mapping == NULL && name) { if (SDL_strstr(name, "Xbox 360 Wireless Receiver")) { /* The Linux driver xpad.c maps the wireless dpad to buttons */ SDL_bool existing; mapping = SDL_PrivateAddMappingForGUID(guid, -"none,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); - } else if (SDL_strstr(name, "Xbox") || SDL_strstr(name, "X-Box") || SDL_strstr(name, "XBOX")) { - mapping = s_pXInputMapping; + "none,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", + &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } } #endif /* __LINUX__ */ - if (!mapping) { + if (mapping == NULL) { mapping = s_pDefaultMapping; } return mapping; @@ -1370,17 +1386,17 @@ static void SDL_PrivateAppendToMappingString(char *mapping_string, SDL_strlcat(mapping_string, input_name, mapping_string_len); SDL_strlcat(mapping_string, ":", mapping_string_len); switch (mapping->kind) { - case EMappingKind_Button: - SDL_snprintf(buffer, sizeof(buffer), "b%i", mapping->target); - break; - case EMappingKind_Axis: - SDL_snprintf(buffer, sizeof(buffer), "a%i", mapping->target); - break; - case EMappingKind_Hat: - SDL_snprintf(buffer, sizeof(buffer), "h%i.%i", mapping->target >> 4, mapping->target & 0x0F); - break; - default: - SDL_assert(SDL_FALSE); + case EMappingKind_Button: + (void)SDL_snprintf(buffer, sizeof(buffer), "b%i", mapping->target); + break; + case EMappingKind_Axis: + (void)SDL_snprintf(buffer, sizeof(buffer), "a%i", mapping->target); + break; + case EMappingKind_Hat: + (void)SDL_snprintf(buffer, sizeof(buffer), "h%i.%i", mapping->target >> 4, mapping->target & 0x0F); + break; + default: + SDL_assert(SDL_FALSE); } SDL_strlcat(mapping_string, buffer, mapping_string_len); @@ -1405,7 +1421,7 @@ static ControllerMapping_t *SDL_PrivateGenerateAutomaticControllerMapping(const } } } - SDL_snprintf(mapping, sizeof(mapping), "none,%s,", name_string); + (void)SDL_snprintf(mapping, sizeof(mapping), "none,%s,", name_string); SDL_PrivateAppendToMappingString(mapping, sizeof(mapping), "a", &raw_map->a); SDL_PrivateAppendToMappingString(mapping, sizeof(mapping), "b", &raw_map->b); SDL_PrivateAppendToMappingString(mapping, sizeof(mapping), "x", &raw_map->x); @@ -1433,8 +1449,7 @@ static ControllerMapping_t *SDL_PrivateGenerateAutomaticControllerMapping(const SDL_PrivateAppendToMappingString(mapping, sizeof(mapping), "lefttrigger", &raw_map->lefttrigger); SDL_PrivateAppendToMappingString(mapping, sizeof(mapping), "righttrigger", &raw_map->righttrigger); - return SDL_PrivateAddMappingForGUID(guid, mapping, - &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); + return SDL_PrivateAddMappingForGUID(guid, mapping, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); } static ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) @@ -1443,18 +1458,17 @@ static ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) SDL_JoystickGUID guid; ControllerMapping_t *mapping; - SDL_LockJoysticks(); + SDL_AssertJoysticksLocked(); if ((device_index < 0) || (device_index >= SDL_NumJoysticks())) { SDL_SetError("There are %d joysticks available", SDL_NumJoysticks()); - SDL_UnlockJoysticks(); - return (NULL); + return NULL; } name = SDL_JoystickNameForIndex(device_index); guid = SDL_JoystickGetDeviceGUID(device_index); mapping = SDL_PrivateGetControllerMappingForNameAndGUID(name, guid); - if (!mapping) { + if (mapping == NULL) { SDL_GamepadMapping raw_map; SDL_zero(raw_map); @@ -1463,26 +1477,24 @@ static ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) } } - SDL_UnlockJoysticks(); return mapping; } /* * Add or update an entry into the Mappings Database */ -int -SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw) +int SDL_GameControllerAddMappingsFromRW(SDL_RWops *rw, int freerw) { const char *platform = SDL_GetPlatform(); int controllers = 0; char *buf, *line, *line_end, *tmp, *comma, line_platform[64]; size_t db_size, platform_len; - + if (rw == NULL) { return SDL_SetError("Invalid RWops"); } db_size = (size_t)SDL_RWsize(rw); - + buf = (char *)SDL_malloc(db_size + 1); if (buf == NULL) { if (freerw) { @@ -1490,7 +1502,7 @@ SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw) } return SDL_SetError("Could not allocate space to read DB into memory"); } - + if (SDL_RWread(rw, buf, db_size, 1) != 1) { if (freerw) { SDL_RWclose(rw); @@ -1498,14 +1510,14 @@ SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw) SDL_free(buf); return SDL_SetError("Could not read DB"); } - + if (freerw) { SDL_RWclose(rw); } - + buf[db_size] = '\0'; line = buf; - + while (line < buf + db_size) { line_end = SDL_strchr(line, '\n'); if (line_end != NULL) { @@ -1513,7 +1525,7 @@ SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw) } else { line_end = buf + db_size; } - + /* Extract and verify the platform */ tmp = SDL_strstr(line, SDL_CONTROLLER_PLATFORM_FIELD); if (tmp != NULL) { @@ -1541,8 +1553,7 @@ SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw) /* * Add or update an entry into the Mappings Database with a priority */ -static int -SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMappingPriority priority) +static int SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMappingPriority priority) { char *pchGUID; SDL_JoystickGUID jGUID; @@ -1551,7 +1562,9 @@ SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMap SDL_bool existing = SDL_FALSE; ControllerMapping_t *pControllerMapping; - if (!mappingString) { + SDL_AssertJoysticksLocked(); + + if (mappingString == NULL) { return SDL_InvalidParamError("mappingString"); } @@ -1618,7 +1631,7 @@ SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMap #endif pchGUID = SDL_PrivateGetControllerGUIDFromMappingString(mappingString); - if (!pchGUID) { + if (pchGUID == NULL) { return SDL_SetError("Couldn't parse GUID from %s", mappingString); } if (!SDL_strcasecmp(pchGUID, "default")) { @@ -1630,7 +1643,7 @@ SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMap SDL_free(pchGUID); pControllerMapping = SDL_PrivateAddMappingForGUID(jGUID, mappingString, &existing, priority); - if (!pControllerMapping) { + if (pControllerMapping == NULL) { return -1; } @@ -1649,41 +1662,54 @@ SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMap /* * Add or update an entry into the Mappings Database */ -int -SDL_GameControllerAddMapping(const char *mappingString) +int SDL_GameControllerAddMapping(const char *mappingString) { - return SDL_PrivateGameControllerAddMapping(mappingString, SDL_CONTROLLER_MAPPING_PRIORITY_API); + int retval; + + SDL_LockJoysticks(); + { + retval = SDL_PrivateGameControllerAddMapping(mappingString, SDL_CONTROLLER_MAPPING_PRIORITY_API); + } + SDL_UnlockJoysticks(); + + return retval; } /* * Get the number of mappings installed */ -int -SDL_GameControllerNumMappings(void) +int SDL_GameControllerNumMappings(void) { int num_mappings = 0; - ControllerMapping_t *mapping; - for (mapping = s_pSupportedControllers; mapping; mapping = mapping->next) { - if (SDL_memcmp(&mapping->guid, &s_zeroGUID, sizeof(mapping->guid)) == 0) { - continue; + SDL_LockJoysticks(); + { + ControllerMapping_t *mapping; + + for (mapping = s_pSupportedControllers; mapping; mapping = mapping->next) { + if (SDL_memcmp(&mapping->guid, &s_zeroGUID, sizeof(mapping->guid)) == 0) { + continue; + } + ++num_mappings; } - ++num_mappings; } + SDL_UnlockJoysticks(); + return num_mappings; } /* * Create a mapping string for a mapping */ -static char * -CreateMappingString(ControllerMapping_t *mapping, SDL_JoystickGUID guid) +static char *CreateMappingString(ControllerMapping_t *mapping, SDL_JoystickGUID guid) { char *pMappingString, *pPlatformString; char pchGUID[33]; size_t needed; const char *platform = SDL_GetPlatform(); + SDL_AssertJoysticksLocked(); + SDL_JoystickGetGUIDString(guid, pchGUID, sizeof(pchGUID)); /* allocate enough memory for GUID + ',' + name + ',' + mapping + \0 */ @@ -1698,12 +1724,12 @@ CreateMappingString(ControllerMapping_t *mapping, SDL_JoystickGUID guid) } pMappingString = SDL_malloc(needed); - if (!pMappingString) { + if (pMappingString == NULL) { SDL_OutOfMemory(); return NULL; } - SDL_snprintf(pMappingString, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping); + (void)SDL_snprintf(pMappingString, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping); if (!SDL_strstr(mapping->mapping, SDL_CONTROLLER_PLATFORM_FIELD)) { if (mapping->mapping[SDL_strlen(mapping->mapping) - 1] != ',') { @@ -1727,52 +1753,74 @@ CreateMappingString(ControllerMapping_t *mapping, SDL_JoystickGUID guid) /* * Get the mapping at a particular index. */ -char * -SDL_GameControllerMappingForIndex(int mapping_index) +char *SDL_GameControllerMappingForIndex(int mapping_index) { - ControllerMapping_t *mapping; + char *retval = NULL; - for (mapping = s_pSupportedControllers; mapping; mapping = mapping->next) { - if (SDL_memcmp(&mapping->guid, &s_zeroGUID, sizeof(mapping->guid)) == 0) { - continue; - } - if (mapping_index == 0) { - return CreateMappingString(mapping, mapping->guid); + SDL_LockJoysticks(); + { + ControllerMapping_t *mapping; + + for (mapping = s_pSupportedControllers; mapping; mapping = mapping->next) { + if (SDL_memcmp(&mapping->guid, &s_zeroGUID, sizeof(mapping->guid)) == 0) { + continue; + } + if (mapping_index == 0) { + retval = CreateMappingString(mapping, mapping->guid); + break; + } + --mapping_index; } - --mapping_index; } - SDL_SetError("Mapping not available"); - return NULL; + SDL_UnlockJoysticks(); + + if (retval == NULL) { + SDL_SetError("Mapping not available"); + } + return retval; } /* * Get the mapping string for this GUID */ -char * -SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid) +char *SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid) { - ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_TRUE); - if (mapping) { - return CreateMappingString(mapping, guid); - } else { - SDL_SetError("Mapping not available"); + char *retval; + + SDL_LockJoysticks(); + { + ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_FALSE); + if (mapping) { + retval = CreateMappingString(mapping, guid); + } else { + SDL_SetError("Mapping not available"); + retval = NULL; + } } - return NULL; + SDL_UnlockJoysticks(); + + return retval; } /* * Get the mapping string for this device */ -char * -SDL_GameControllerMapping(SDL_GameController *gamecontroller) +char *SDL_GameControllerMapping(SDL_GameController *gamecontroller) { - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + char *retval; + + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + + retval = CreateMappingString(gamecontroller->mapping, gamecontroller->joystick->guid); + } + SDL_UnlockJoysticks(); - return CreateMappingString(gamecontroller->mapping, gamecontroller->joystick->guid); + return retval; } -static void -SDL_GameControllerLoadHints() +static void SDL_GameControllerLoadHints() { const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERCONFIG); if (hint && hint[0]) { @@ -1785,8 +1833,9 @@ SDL_GameControllerLoadHints() char *pchNewLine = NULL; pchNewLine = SDL_strchr(pUserMappings, '\n'); - if (pchNewLine) + if (pchNewLine) { *pchNewLine = '\0'; + } SDL_PrivateGameControllerAddMapping(pUserMappings, SDL_CONTROLLER_MAPPING_PRIORITY_USER); @@ -1801,7 +1850,7 @@ SDL_GameControllerLoadHints() } /* - * Fill the given buffer with the expected controller mapping filepath. + * Fill the given buffer with the expected controller mapping filepath. * Usually this will just be SDL_HINT_GAMECONTROLLERCONFIG_FILE, but for * Android, we want to get the internal storage path. */ @@ -1822,12 +1871,14 @@ static SDL_bool SDL_GetControllerMappingFilePath(char *path, size_t size) /* * Initialize the game controller system, mostly load our DB of controller config mappings */ -int -SDL_GameControllerInitMappings(void) +int SDL_GameControllerInitMappings(void) { char szControllerMapPath[1024]; int i = 0; const char *pMappingString = NULL; + + SDL_AssertJoysticksLocked(); + pMappingString = s_ControllerMappings[i]; while (pMappingString) { SDL_PrivateGameControllerAddMapping(pMappingString, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); @@ -1837,7 +1888,7 @@ SDL_GameControllerInitMappings(void) } if (SDL_GetControllerMappingFilePath(szControllerMapPath, sizeof(szControllerMapPath))) { - SDL_GameControllerAddMappingsFromFile(szControllerMapPath); + SDL_GameControllerAddMappingsFromFile(szControllerMapPath); } /* load in any user supplied config */ @@ -1848,11 +1899,10 @@ SDL_GameControllerInitMappings(void) SDL_AddHintCallback(SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT, SDL_GameControllerIgnoreDevicesExceptChanged, NULL); - return (0); + return 0; } -int -SDL_GameControllerInit(void) +int SDL_GameControllerInit(void) { int i; @@ -1869,110 +1919,129 @@ SDL_GameControllerInit(void) } } - return (0); + return 0; } - /* * Get the implementation dependent name of a controller */ -const char * -SDL_GameControllerNameForIndex(int device_index) +const char *SDL_GameControllerNameForIndex(int joystick_index) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if (pSupportedController) { - if (SDL_strcmp(pSupportedController->name, "*") == 0) { - return SDL_JoystickNameForIndex(device_index); - } else { - return pSupportedController->name; + const char *retval = NULL; + + SDL_LockJoysticks(); + { + ControllerMapping_t *mapping = SDL_PrivateGetControllerMapping(joystick_index); + if (mapping != NULL) { + if (SDL_strcmp(mapping->name, "*") == 0) { + retval = SDL_JoystickNameForIndex(joystick_index); + } else { + retval = mapping->name; + } } } - return NULL; -} + SDL_UnlockJoysticks(); + return retval; +} /* * Get the implementation dependent path of a controller */ -const char * -SDL_GameControllerPathForIndex(int device_index) +const char *SDL_GameControllerPathForIndex(int joystick_index) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if (pSupportedController) { - return SDL_JoystickPathForIndex(device_index); + const char *retval = NULL; + + SDL_LockJoysticks(); + { + ControllerMapping_t *mapping = SDL_PrivateGetControllerMapping(joystick_index); + if (mapping != NULL) { + retval = SDL_JoystickPathForIndex(joystick_index); + } } - return NULL; -} + SDL_UnlockJoysticks(); + return retval; +} /** * Get the type of a game controller. */ -SDL_GameControllerType -SDL_GameControllerTypeForIndex(int joystick_index) +SDL_GameControllerType SDL_GameControllerTypeForIndex(int joystick_index) { return SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGetDeviceGUID(joystick_index), SDL_JoystickNameForIndex(joystick_index)); } - /** * Get the mapping of a game controller. * This can be called before any controllers are opened. * If no mapping can be found, this function returns NULL. */ -char * -SDL_GameControllerMappingForDeviceIndex(int joystick_index) +char *SDL_GameControllerMappingForDeviceIndex(int joystick_index) { - char *pMappingString = NULL; - ControllerMapping_t *mapping; + char *retval = NULL; SDL_LockJoysticks(); - mapping = SDL_PrivateGetControllerMapping(joystick_index); - if (mapping) { - SDL_JoystickGUID guid; - char pchGUID[33]; - size_t needed; - guid = SDL_JoystickGetDeviceGUID(joystick_index); - SDL_JoystickGetGUIDString(guid, pchGUID, sizeof(pchGUID)); - /* allocate enough memory for GUID + ',' + name + ',' + mapping + \0 */ - needed = SDL_strlen(pchGUID) + 1 + SDL_strlen(mapping->name) + 1 + SDL_strlen(mapping->mapping) + 1; - pMappingString = SDL_malloc(needed); - if (!pMappingString) { - SDL_OutOfMemory(); - SDL_UnlockJoysticks(); - return NULL; + { + ControllerMapping_t *mapping = SDL_PrivateGetControllerMapping(joystick_index); + if (mapping != NULL) { + SDL_JoystickGUID guid; + char pchGUID[33]; + size_t needed; + guid = SDL_JoystickGetDeviceGUID(joystick_index); + SDL_JoystickGetGUIDString(guid, pchGUID, sizeof(pchGUID)); + /* allocate enough memory for GUID + ',' + name + ',' + mapping + \0 */ + needed = SDL_strlen(pchGUID) + 1 + SDL_strlen(mapping->name) + 1 + SDL_strlen(mapping->mapping) + 1; + retval = (char *)SDL_malloc(needed); + if (retval != NULL) { + (void)SDL_snprintf(retval, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping); + } else { + SDL_OutOfMemory(); + } } - SDL_snprintf(pMappingString, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping); } SDL_UnlockJoysticks(); - return pMappingString; + return retval; } - /* * Return 1 if the joystick with this name and GUID is a supported controller */ -SDL_bool -SDL_IsGameControllerNameAndGUID(const char *name, SDL_JoystickGUID guid) +SDL_bool SDL_IsGameControllerNameAndGUID(const char *name, SDL_JoystickGUID guid) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMappingForNameAndGUID(name, guid); - if (pSupportedController) { - return SDL_TRUE; + SDL_bool retval; + + SDL_LockJoysticks(); + { + if (SDL_PrivateGetControllerMappingForNameAndGUID(name, guid) != NULL) { + retval = SDL_TRUE; + } else { + retval = SDL_FALSE; + } } - return SDL_FALSE; + SDL_UnlockJoysticks(); + + return retval; } /* * Return 1 if the joystick at this device index is a supported controller */ -SDL_bool -SDL_IsGameController(int device_index) +SDL_bool SDL_IsGameController(int joystick_index) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if (pSupportedController) { - return SDL_TRUE; + SDL_bool retval; + + SDL_LockJoysticks(); + { + if (SDL_PrivateGetControllerMapping(joystick_index) != NULL) { + retval = SDL_TRUE; + } else { + retval = SDL_FALSE; + } } - return SDL_FALSE; + SDL_UnlockJoysticks(); + + return retval; } #if defined(__LINUX__) @@ -2074,8 +2143,7 @@ SDL_bool SDL_ShouldIgnoreGameController(const char *name, SDL_JoystickGUID guid) * * This function returns a controller identifier, or NULL if an error occurred. */ -SDL_GameController * -SDL_GameControllerOpen(int device_index) +SDL_GameController *SDL_GameControllerOpen(int joystick_index) { SDL_JoystickID instance_id; SDL_GameController *gamecontroller; @@ -2086,27 +2154,27 @@ SDL_GameControllerOpen(int device_index) gamecontrollerlist = SDL_gamecontrollers; /* If the controller is already open, return it */ - instance_id = SDL_JoystickGetDeviceInstanceID(device_index); - while (gamecontrollerlist) { + instance_id = SDL_JoystickGetDeviceInstanceID(joystick_index); + while (gamecontrollerlist != NULL) { if (instance_id == gamecontrollerlist->joystick->instance_id) { - gamecontroller = gamecontrollerlist; - ++gamecontroller->ref_count; - SDL_UnlockJoysticks(); - return (gamecontroller); + gamecontroller = gamecontrollerlist; + ++gamecontroller->ref_count; + SDL_UnlockJoysticks(); + return gamecontroller; } gamecontrollerlist = gamecontrollerlist->next; } /* Find a controller mapping */ - pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if (!pSupportedController) { - SDL_SetError("Couldn't find mapping for device (%d)", device_index); + pSupportedController = SDL_PrivateGetControllerMapping(joystick_index); + if (pSupportedController == NULL) { + SDL_SetError("Couldn't find mapping for device (%d)", joystick_index); SDL_UnlockJoysticks(); return NULL; } /* Create and initialize the controller */ - gamecontroller = (SDL_GameController *) SDL_calloc(1, sizeof(*gamecontroller)); + gamecontroller = (SDL_GameController *)SDL_calloc(1, sizeof(*gamecontroller)); if (gamecontroller == NULL) { SDL_OutOfMemory(); SDL_UnlockJoysticks(); @@ -2114,8 +2182,8 @@ SDL_GameControllerOpen(int device_index) } gamecontroller->magic = &gamecontroller_magic; - gamecontroller->joystick = SDL_JoystickOpen(device_index); - if (!gamecontroller->joystick) { + gamecontroller->joystick = SDL_JoystickOpen(joystick_index); + if (gamecontroller->joystick == NULL) { SDL_free(gamecontroller); SDL_UnlockJoysticks(); return NULL; @@ -2153,14 +2221,13 @@ SDL_GameControllerOpen(int device_index) SDL_UnlockJoysticks(); - return (gamecontroller); + return gamecontroller; } /* * Manually pump for controller updates. */ -void -SDL_GameControllerUpdate(void) +void SDL_GameControllerUpdate(void) { /* Just for API completeness; the joystick API does all the work. */ SDL_JoystickUpdate(); @@ -2169,141 +2236,171 @@ SDL_GameControllerUpdate(void) /** * Return whether a game controller has a given axis */ -SDL_bool -SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) +SDL_bool SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) { SDL_GameControllerButtonBind bind; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, SDL_FALSE); + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, SDL_FALSE); + + bind = SDL_GameControllerGetBindForAxis(gamecontroller, axis); + } + SDL_UnlockJoysticks(); - bind = SDL_GameControllerGetBindForAxis(gamecontroller, axis); return (bind.bindType != SDL_CONTROLLER_BINDTYPE_NONE) ? SDL_TRUE : SDL_FALSE; } /* * Get the current state of an axis control on a controller */ -Sint16 -SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) +Sint16 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) { - int i; + Sint16 retval = 0; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); + SDL_LockJoysticks(); + { + int i; - for (i = 0; i < gamecontroller->num_bindings; ++i) { - SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; - if (binding->outputType == SDL_CONTROLLER_BINDTYPE_AXIS && binding->output.axis.axis == axis) { - int value = 0; - SDL_bool valid_input_range; - SDL_bool valid_output_range; - - if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { - value = SDL_JoystickGetAxis(gamecontroller->joystick, binding->input.axis.axis); - if (binding->input.axis.axis_min < binding->input.axis.axis_max) { - valid_input_range = (value >= binding->input.axis.axis_min && value <= binding->input.axis.axis_max); - } else { - valid_input_range = (value >= binding->input.axis.axis_max && value <= binding->input.axis.axis_min); - } - if (valid_input_range) { - if (binding->input.axis.axis_min != binding->output.axis.axis_min || binding->input.axis.axis_max != binding->output.axis.axis_max) { - float normalized_value = (float)(value - binding->input.axis.axis_min) / (binding->input.axis.axis_max - binding->input.axis.axis_min); - value = binding->output.axis.axis_min + (int)(normalized_value * (binding->output.axis.axis_max - binding->output.axis.axis_min)); + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); + + for (i = 0; i < gamecontroller->num_bindings; ++i) { + SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; + if (binding->outputType == SDL_CONTROLLER_BINDTYPE_AXIS && binding->output.axis.axis == axis) { + int value = 0; + SDL_bool valid_input_range; + SDL_bool valid_output_range; + + if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { + value = SDL_JoystickGetAxis(gamecontroller->joystick, binding->input.axis.axis); + if (binding->input.axis.axis_min < binding->input.axis.axis_max) { + valid_input_range = (value >= binding->input.axis.axis_min && value <= binding->input.axis.axis_max); + } else { + valid_input_range = (value >= binding->input.axis.axis_max && value <= binding->input.axis.axis_min); + } + if (valid_input_range) { + if (binding->input.axis.axis_min != binding->output.axis.axis_min || binding->input.axis.axis_max != binding->output.axis.axis_max) { + float normalized_value = (float)(value - binding->input.axis.axis_min) / (binding->input.axis.axis_max - binding->input.axis.axis_min); + value = binding->output.axis.axis_min + (int)(normalized_value * (binding->output.axis.axis_max - binding->output.axis.axis_min)); + } + } else { + value = 0; + } + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { + value = SDL_JoystickGetButton(gamecontroller->joystick, binding->input.button); + if (value == SDL_PRESSED) { + value = binding->output.axis.axis_max; + } + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { + int hat_mask = SDL_JoystickGetHat(gamecontroller->joystick, binding->input.hat.hat); + if (hat_mask & binding->input.hat.hat_mask) { + value = binding->output.axis.axis_max; } - } else { - value = 0; } - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { - value = SDL_JoystickGetButton(gamecontroller->joystick, binding->input.button); - if (value == SDL_PRESSED) { - value = binding->output.axis.axis_max; + + if (binding->output.axis.axis_min < binding->output.axis.axis_max) { + valid_output_range = (value >= binding->output.axis.axis_min && value <= binding->output.axis.axis_max); + } else { + valid_output_range = (value >= binding->output.axis.axis_max && value <= binding->output.axis.axis_min); } - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { - int hat_mask = SDL_JoystickGetHat(gamecontroller->joystick, binding->input.hat.hat); - if (hat_mask & binding->input.hat.hat_mask) { - value = binding->output.axis.axis_max; + /* If the value is zero, there might be another binding that makes it non-zero */ + if (value != 0 && valid_output_range) { + retval = (Sint16)value; + break; } } - - if (binding->output.axis.axis_min < binding->output.axis.axis_max) { - valid_output_range = (value >= binding->output.axis.axis_min && value <= binding->output.axis.axis_max); - } else { - valid_output_range = (value >= binding->output.axis.axis_max && value <= binding->output.axis.axis_min); - } - /* If the value is zero, there might be another binding that makes it non-zero */ - if (value != 0 && valid_output_range) { - return (Sint16)value; - } } } - return 0; + SDL_UnlockJoysticks(); + + return retval; } /** * Return whether a game controller has a given button */ -SDL_bool -SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) +SDL_bool SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) { SDL_GameControllerButtonBind bind; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, SDL_FALSE); + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, SDL_FALSE); + + bind = SDL_GameControllerGetBindForButton(gamecontroller, button); + } + SDL_UnlockJoysticks(); - bind = SDL_GameControllerGetBindForButton(gamecontroller, button); return (bind.bindType != SDL_CONTROLLER_BINDTYPE_NONE) ? SDL_TRUE : SDL_FALSE; } /* * Get the current state of a button on a controller */ -Uint8 -SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) +Uint8 SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) { - int i; + Uint8 retval = SDL_RELEASED; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); - - for (i = 0; i < gamecontroller->num_bindings; ++i) { - SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; - if (binding->outputType == SDL_CONTROLLER_BINDTYPE_BUTTON && binding->output.button == button) { - if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { - SDL_bool valid_input_range; - - int value = SDL_JoystickGetAxis(gamecontroller->joystick, binding->input.axis.axis); - int threshold = binding->input.axis.axis_min + (binding->input.axis.axis_max - binding->input.axis.axis_min) / 2; - if (binding->input.axis.axis_min < binding->input.axis.axis_max) { - valid_input_range = (value >= binding->input.axis.axis_min && value <= binding->input.axis.axis_max); - if (valid_input_range) { - return (value >= threshold) ? SDL_PRESSED : SDL_RELEASED; - } - } else { - valid_input_range = (value >= binding->input.axis.axis_max && value <= binding->input.axis.axis_min); - if (valid_input_range) { - return (value <= threshold) ? SDL_PRESSED : SDL_RELEASED; + SDL_LockJoysticks(); + { + int i; + + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); + + for (i = 0; i < gamecontroller->num_bindings; ++i) { + SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; + if (binding->outputType == SDL_CONTROLLER_BINDTYPE_BUTTON && binding->output.button == button) { + if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { + SDL_bool valid_input_range; + + int value = SDL_JoystickGetAxis(gamecontroller->joystick, binding->input.axis.axis); + int threshold = binding->input.axis.axis_min + (binding->input.axis.axis_max - binding->input.axis.axis_min) / 2; + if (binding->input.axis.axis_min < binding->input.axis.axis_max) { + valid_input_range = (value >= binding->input.axis.axis_min && value <= binding->input.axis.axis_max); + if (valid_input_range) { + retval = (value >= threshold) ? SDL_PRESSED : SDL_RELEASED; + break; + } + } else { + valid_input_range = (value >= binding->input.axis.axis_max && value <= binding->input.axis.axis_min); + if (valid_input_range) { + retval = (value <= threshold) ? SDL_PRESSED : SDL_RELEASED; + break; + } } + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { + retval = SDL_JoystickGetButton(gamecontroller->joystick, binding->input.button); + break; + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { + int hat_mask = SDL_JoystickGetHat(gamecontroller->joystick, binding->input.hat.hat); + retval = (hat_mask & binding->input.hat.hat_mask) ? SDL_PRESSED : SDL_RELEASED; + break; } - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { - return SDL_JoystickGetButton(gamecontroller->joystick, binding->input.button); - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { - int hat_mask = SDL_JoystickGetHat(gamecontroller->joystick, binding->input.hat.hat); - return (hat_mask & binding->input.hat.hat_mask) ? SDL_PRESSED : SDL_RELEASED; } } } - return SDL_RELEASED; + SDL_UnlockJoysticks(); + + return retval; } /** * Get the number of touchpads on a game controller. */ -int -SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller) +int SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + int retval = 0; - if (joystick) { - return joystick->ntouchpads; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + retval = joystick->ntouchpads; + } } - return 0; + SDL_UnlockJoysticks(); + + return retval; } /** @@ -2311,69 +2408,89 @@ SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller) */ int SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + int retval = 0; - if (joystick && touchpad >= 0 && touchpad < joystick->ntouchpads) { - return joystick->touchpads[touchpad].nfingers; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + if (touchpad >= 0 && touchpad < joystick->ntouchpads) { + retval = joystick->touchpads[touchpad].nfingers; + } else { + retval = SDL_InvalidParamError("touchpad"); + } + } } - return 0; + SDL_UnlockJoysticks(); + + return retval; } /** * Get the current state of a finger on a touchpad on a game controller. */ -int -SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure) +int SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + int retval = -1; - if (joystick ) { - if (touchpad >= 0 && touchpad < joystick->ntouchpads) { - SDL_JoystickTouchpadInfo *touchpad_info = &joystick->touchpads[touchpad]; - if (finger >= 0 && finger < touchpad_info->nfingers) { - SDL_JoystickTouchpadFingerInfo *info = &touchpad_info->fingers[finger]; - - if (state) { - *state = info->state; - } - if (x) { - *x = info->x; - } - if (y) { - *y = info->y; - } - if (pressure) { - *pressure = info->pressure; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + if (touchpad >= 0 && touchpad < joystick->ntouchpads) { + SDL_JoystickTouchpadInfo *touchpad_info = &joystick->touchpads[touchpad]; + if (finger >= 0 && finger < touchpad_info->nfingers) { + SDL_JoystickTouchpadFingerInfo *info = &touchpad_info->fingers[finger]; + + if (state) { + *state = info->state; + } + if (x) { + *x = info->x; + } + if (y) { + *y = info->y; + } + if (pressure) { + *pressure = info->pressure; + } + retval = 0; + } else { + retval = SDL_InvalidParamError("finger"); } - return 0; } else { - return SDL_InvalidParamError("finger"); + retval = SDL_InvalidParamError("touchpad"); } - } else { - return SDL_InvalidParamError("touchpad"); } - } else { - return SDL_InvalidParamError("gamecontroller"); } + SDL_UnlockJoysticks(); + + return retval; } /** * Return whether a game controller has a particular sensor. */ -SDL_bool -SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type) +SDL_bool SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - int i; + SDL_bool retval = SDL_FALSE; - if (joystick) { - for (i = 0; i < joystick->nsensors; ++i) { - if (joystick->sensors[i].type == type) { - return SDL_TRUE; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + int i; + for (i = 0; i < joystick->nsensors; ++i) { + if (joystick->sensors[i].type == type) { + retval = SDL_TRUE; + break; + } } } } - return SDL_FALSE; + SDL_UnlockJoysticks(); + + return retval; } /* @@ -2381,41 +2498,47 @@ SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType t */ int SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - int i; - - if (!joystick) { - return -1; - } - - for (i = 0; i < joystick->nsensors; ++i) { - SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; - - if (sensor->type == type) { - if (sensor->enabled == enabled) { - return 0; - } - - if (enabled) { - if (joystick->nsensors_enabled == 0) { - if (joystick->driver->SetSensorsEnabled(joystick, SDL_TRUE) < 0) { - return -1; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + int i; + for (i = 0; i < joystick->nsensors; ++i) { + SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; + + if (sensor->type == type) { + if (sensor->enabled == enabled) { + SDL_UnlockJoysticks(); + return 0; } - } - ++joystick->nsensors_enabled; - } else { - if (joystick->nsensors_enabled == 1) { - if (joystick->driver->SetSensorsEnabled(joystick, SDL_FALSE) < 0) { - return -1; + + if (enabled) { + if (joystick->nsensors_enabled == 0) { + if (joystick->driver->SetSensorsEnabled(joystick, SDL_TRUE) < 0) { + SDL_UnlockJoysticks(); + return -1; + } + } + ++joystick->nsensors_enabled; + } else { + if (joystick->nsensors_enabled == 1) { + if (joystick->driver->SetSensorsEnabled(joystick, SDL_FALSE) < 0) { + SDL_UnlockJoysticks(); + return -1; + } + } + --joystick->nsensors_enabled; } + + sensor->enabled = enabled; + SDL_UnlockJoysticks(); + return 0; } - --joystick->nsensors_enabled; } - - sensor->enabled = enabled; - return 0; } } + SDL_UnlockJoysticks(); + return SDL_Unsupported(); } @@ -2424,47 +2547,57 @@ int SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_S */ SDL_bool SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - int i; + SDL_bool retval = SDL_FALSE; - if (joystick) { - for (i = 0; i < joystick->nsensors; ++i) { - if (joystick->sensors[i].type == type) { - return joystick->sensors[i].enabled; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + int i; + for (i = 0; i < joystick->nsensors; ++i) { + if (joystick->sensors[i].type == type) { + retval = joystick->sensors[i].enabled; + break; + } } } } - return SDL_FALSE; + SDL_UnlockJoysticks(); + + return retval; } /* * Get the data rate of a game controller sensor. */ -float -SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type) +float SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - int i; - - if (!joystick) { - return 0.0f; - } + float retval = 0.0f; - for (i = 0; i < joystick->nsensors; ++i) { - SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; - - if (sensor->type == type) { - return sensor->rate; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + int i; + for (i = 0; i < joystick->nsensors; ++i) { + SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; + + if (sensor->type == type) { + retval = sensor->rate; + break; + } + } } } - return 0.0f; + SDL_UnlockJoysticks(); + + return retval; } /* * Get the current state of a game controller sensor. */ -int -SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values) +int SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values) { return SDL_GameControllerGetSensorDataWithTimestamp(gamecontroller, type, NULL, data, num_values); } @@ -2472,71 +2605,77 @@ SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorTy /* * Get the current state of a game controller sensor. */ -int -SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values) +int SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values) { - SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - int i; - - if (!joystick) { - return -1; - } - - for (i = 0; i < joystick->nsensors; ++i) { - SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; - - if (sensor->type == type) { - num_values = SDL_min(num_values, SDL_arraysize(sensor->data)); - SDL_memcpy(data, sensor->data, num_values*sizeof(*data)); - if (timestamp) { - *timestamp = sensor->timestamp_us; + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); + if (joystick) { + int i; + for (i = 0; i < joystick->nsensors; ++i) { + SDL_JoystickSensorInfo *sensor = &joystick->sensors[i]; + + if (sensor->type == type) { + num_values = SDL_min(num_values, SDL_arraysize(sensor->data)); + SDL_memcpy(data, sensor->data, num_values * sizeof(*data)); + if (timestamp) { + *timestamp = sensor->timestamp_us; + } + SDL_UnlockJoysticks(); + return 0; + } } - return 0; } } + SDL_UnlockJoysticks(); + return SDL_Unsupported(); } -const char * -SDL_GameControllerName(SDL_GameController *gamecontroller) +const char *SDL_GameControllerName(SDL_GameController *gamecontroller) { - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + const char *retval = NULL; - if (SDL_strcmp(gamecontroller->name, "*") == 0) { - return SDL_JoystickName(SDL_GameControllerGetJoystick(gamecontroller)); - } else { - return gamecontroller->name; + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + + if (SDL_strcmp(gamecontroller->name, "*") == 0) { + retval = SDL_JoystickName(gamecontroller->joystick); + } else { + retval = gamecontroller->name; + } } + SDL_UnlockJoysticks(); + + return retval; } -const char * -SDL_GameControllerPath(SDL_GameController *gamecontroller) +const char *SDL_GameControllerPath(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return NULL; } return SDL_JoystickPath(joystick); } -SDL_GameControllerType -SDL_GameControllerGetType(SDL_GameController *gamecontroller) +SDL_GameControllerType SDL_GameControllerGetType(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return SDL_CONTROLLER_TYPE_UNKNOWN; } return SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGetGUID(joystick), SDL_JoystickName(joystick)); } -int -SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller) +int SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return -1; } return SDL_JoystickGetPlayerIndex(joystick); @@ -2545,67 +2684,61 @@ SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller) /** * Set the player index of an opened game controller */ -void -SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index) +void SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return; } SDL_JoystickSetPlayerIndex(joystick, player_index); } -Uint16 -SDL_GameControllerGetVendor(SDL_GameController *gamecontroller) +Uint16 SDL_GameControllerGetVendor(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return 0; } return SDL_JoystickGetVendor(joystick); } -Uint16 -SDL_GameControllerGetProduct(SDL_GameController *gamecontroller) +Uint16 SDL_GameControllerGetProduct(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return 0; } return SDL_JoystickGetProduct(joystick); } -Uint16 -SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller) +Uint16 SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return 0; } return SDL_JoystickGetProductVersion(joystick); } -Uint16 -SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller) +Uint16 SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return 0; } return SDL_JoystickGetFirmwareVersion(joystick); } -const char * -SDL_GameControllerGetSerial(SDL_GameController *gamecontroller) +const char * SDL_GameControllerGetSerial(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return NULL; } return SDL_JoystickGetSerial(joystick); @@ -2615,31 +2748,38 @@ SDL_GameControllerGetSerial(SDL_GameController *gamecontroller) * Return if the controller in question is currently attached to the system, * \return 0 if not plugged in, 1 if still present. */ -SDL_bool -SDL_GameControllerGetAttached(SDL_GameController *gamecontroller) +SDL_bool SDL_GameControllerGetAttached(SDL_GameController *gamecontroller) { - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, SDL_FALSE); + SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - return SDL_JoystickGetAttached(gamecontroller->joystick); + if (joystick == NULL) { + return SDL_FALSE; + } + return SDL_JoystickGetAttached(joystick); } /* * Get the joystick for this controller */ -SDL_Joystick * -SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller) +SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller) { - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + SDL_Joystick *joystick; - return gamecontroller->joystick; -} + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + + joystick = gamecontroller->joystick; + } + SDL_UnlockJoysticks(); + return joystick; +} /* * Return the SDL_GameController associated with an instance id. */ -SDL_GameController * -SDL_GameControllerFromInstanceID(SDL_JoystickID joyid) +SDL_GameController *SDL_GameControllerFromInstanceID(SDL_JoystickID joyid) { SDL_GameController *gamecontroller; @@ -2656,174 +2796,181 @@ SDL_GameControllerFromInstanceID(SDL_JoystickID joyid) return NULL; } - /** * Return the SDL_GameController associated with a player index. */ SDL_GameController *SDL_GameControllerFromPlayerIndex(int player_index) { - SDL_Joystick *joystick = SDL_JoystickFromPlayerIndex(player_index); - if (joystick) { - return SDL_GameControllerFromInstanceID(joystick->instance_id); + SDL_GameController *retval = NULL; + + SDL_LockJoysticks(); + { + SDL_Joystick *joystick = SDL_JoystickFromPlayerIndex(player_index); + if (joystick) { + retval = SDL_GameControllerFromInstanceID(joystick->instance_id); + } } - return NULL; -} + SDL_UnlockJoysticks(); + return retval; +} /* * Get the SDL joystick layer binding for this controller axis mapping */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) { - int i; SDL_GameControllerButtonBind bind; - SDL_zero(bind); - - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, bind); - if (axis == SDL_CONTROLLER_AXIS_INVALID) - return bind; + SDL_zero(bind); - for (i = 0; i < gamecontroller->num_bindings; ++i) { - SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; - if (binding->outputType == SDL_CONTROLLER_BINDTYPE_AXIS && binding->output.axis.axis == axis) { - bind.bindType = binding->inputType; - if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { - /* FIXME: There might be multiple axes bound now that we have axis ranges... */ - bind.value.axis = binding->input.axis.axis; - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { - bind.value.button = binding->input.button; - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { - bind.value.hat.hat = binding->input.hat.hat; - bind.value.hat.hat_mask = binding->input.hat.hat_mask; + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, bind); + + if (axis != SDL_CONTROLLER_AXIS_INVALID) { + int i; + for (i = 0; i < gamecontroller->num_bindings; ++i) { + SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; + if (binding->outputType == SDL_CONTROLLER_BINDTYPE_AXIS && binding->output.axis.axis == axis) { + bind.bindType = binding->inputType; + if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { + /* FIXME: There might be multiple axes bound now that we have axis ranges... */ + bind.value.axis = binding->input.axis.axis; + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { + bind.value.button = binding->input.button; + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { + bind.value.hat.hat = binding->input.hat.hat; + bind.value.hat.hat_mask = binding->input.hat.hat_mask; + } + break; + } } - break; } } + SDL_UnlockJoysticks(); + return bind; } - /* * Get the SDL joystick layer binding for this controller button mapping */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) { - int i; SDL_GameControllerButtonBind bind; - SDL_zero(bind); - - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, bind); - if (button == SDL_CONTROLLER_BUTTON_INVALID) - return bind; + SDL_zero(bind); - for (i = 0; i < gamecontroller->num_bindings; ++i) { - SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; - if (binding->outputType == SDL_CONTROLLER_BINDTYPE_BUTTON && binding->output.button == button) { - bind.bindType = binding->inputType; - if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { - bind.value.axis = binding->input.axis.axis; - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { - bind.value.button = binding->input.button; - } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { - bind.value.hat.hat = binding->input.hat.hat; - bind.value.hat.hat_mask = binding->input.hat.hat_mask; + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, bind); + + if (button != SDL_CONTROLLER_BUTTON_INVALID) { + int i; + for (i = 0; i < gamecontroller->num_bindings; ++i) { + SDL_ExtendedGameControllerBind *binding = &gamecontroller->bindings[i]; + if (binding->outputType == SDL_CONTROLLER_BINDTYPE_BUTTON && binding->output.button == button) { + bind.bindType = binding->inputType; + if (binding->inputType == SDL_CONTROLLER_BINDTYPE_AXIS) { + bind.value.axis = binding->input.axis.axis; + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) { + bind.value.button = binding->input.button; + } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_HAT) { + bind.value.hat.hat = binding->input.hat.hat; + bind.value.hat.hat_mask = binding->input.hat.hat_mask; + } + break; + } } - break; } } + SDL_UnlockJoysticks(); + return bind; } - -int -SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms) +int SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return -1; } return SDL_JoystickRumble(joystick, low_frequency_rumble, high_frequency_rumble, duration_ms); } -int -SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms) +int SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return -1; } return SDL_JoystickRumbleTriggers(joystick, left_rumble, right_rumble, duration_ms); } -SDL_bool -SDL_GameControllerHasLED(SDL_GameController *gamecontroller) +SDL_bool SDL_GameControllerHasLED(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return SDL_FALSE; } return SDL_JoystickHasLED(joystick); } -SDL_bool -SDL_GameControllerHasRumble(SDL_GameController *gamecontroller) +SDL_bool SDL_GameControllerHasRumble(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return SDL_FALSE; } return SDL_JoystickHasRumble(joystick); } -SDL_bool -SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller) +SDL_bool SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return SDL_FALSE; } return SDL_JoystickHasRumbleTriggers(joystick); } -int -SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue) +int SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return -1; } return SDL_JoystickSetLED(joystick, red, green, blue); } -int -SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size) +int SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size) { SDL_Joystick *joystick = SDL_GameControllerGetJoystick(gamecontroller); - if (!joystick) { + if (joystick == NULL) { return -1; } return SDL_JoystickSendEffect(joystick, data, size); } -void -SDL_GameControllerClose(SDL_GameController *gamecontroller) +void SDL_GameControllerClose(SDL_GameController *gamecontroller) { SDL_GameController *gamecontrollerlist, *gamecontrollerlistprev; - if (!gamecontroller || gamecontroller->magic != &gamecontroller_magic) - return; - SDL_LockJoysticks(); + if (gamecontroller == NULL || gamecontroller->magic != &gamecontroller_magic) { + SDL_UnlockJoysticks(); + return; + } + /* First decrement ref count */ if (--gamecontroller->ref_count > 0) { SDL_UnlockJoysticks(); @@ -2857,12 +3004,10 @@ SDL_GameControllerClose(SDL_GameController *gamecontroller) SDL_UnlockJoysticks(); } - /* * Quit the controller subsystem */ -void -SDL_GameControllerQuit(void) +void SDL_GameControllerQuit(void) { SDL_LockJoysticks(); while (SDL_gamecontrollers) { @@ -2872,11 +3017,12 @@ SDL_GameControllerQuit(void) SDL_UnlockJoysticks(); } -void -SDL_GameControllerQuitMappings(void) +void SDL_GameControllerQuitMappings(void) { ControllerMapping_t *pControllerMap; + SDL_AssertJoysticksLocked(); + while (s_pSupportedControllers) { pControllerMap = s_pSupportedControllers; s_pSupportedControllers = s_pSupportedControllers->next; @@ -2905,12 +3051,11 @@ SDL_GameControllerQuitMappings(void) /* * Event filter to transform joystick events into appropriate game controller ones */ -static int -SDL_PrivateGameControllerAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis, Sint16 value) +static int SDL_PrivateGameControllerAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis, Sint16 value) { int posted; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); + SDL_AssertJoysticksLocked(); /* translate the event, if desired */ posted = 0; @@ -2924,21 +3069,19 @@ SDL_PrivateGameControllerAxis(SDL_GameController *gamecontroller, SDL_GameContro posted = SDL_PushEvent(&event) == 1; } #endif /* !SDL_EVENTS_DISABLED */ - return (posted); + return posted; } - /* * Event filter to transform joystick events into appropriate game controller ones */ -static int -SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button, Uint8 state) +static int SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button, Uint8 state) { int posted; #if !SDL_EVENTS_DISABLED SDL_Event event; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, 0); + SDL_AssertJoysticksLocked(); if (button == SDL_CONTROLLER_BUTTON_INVALID) { return 0; @@ -2953,7 +3096,7 @@ SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameCont break; default: /* Invalid state -- bail */ - return (0); + return 0; } #endif /* !SDL_EVENTS_DISABLED */ @@ -2964,12 +3107,12 @@ SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameCont if (gamecontroller->joystick->delayed_guide_button) { /* Skip duplicate press */ - return (0); + return 0; } } else { - if (!SDL_TICKS_PASSED(now, gamecontroller->guide_button_down+SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS)) { + if (!SDL_TICKS_PASSED(now, gamecontroller->guide_button_down + SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS)) { gamecontroller->joystick->delayed_guide_button = SDL_TRUE; - return (0); + return 0; } gamecontroller->joystick->delayed_guide_button = SDL_FALSE; } @@ -2985,22 +3128,28 @@ SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameCont posted = SDL_PushEvent(&event) == 1; } #endif /* !SDL_EVENTS_DISABLED */ - return (posted); + return posted; } /* * Turn off controller events */ -int -SDL_GameControllerEventState(int state) +int SDL_GameControllerEventState(int state) { #if SDL_EVENTS_DISABLED return SDL_IGNORE; #else const Uint32 event_list[] = { - SDL_CONTROLLERAXISMOTION, SDL_CONTROLLERBUTTONDOWN, SDL_CONTROLLERBUTTONUP, - SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED, - SDL_CONTROLLERTOUCHPADDOWN, SDL_CONTROLLERTOUCHPADMOTION, SDL_CONTROLLERTOUCHPADUP, SDL_CONTROLLERSENSORUPDATE, + SDL_CONTROLLERAXISMOTION, + SDL_CONTROLLERBUTTONDOWN, + SDL_CONTROLLERBUTTONUP, + SDL_CONTROLLERDEVICEADDED, + SDL_CONTROLLERDEVICEREMOVED, + SDL_CONTROLLERDEVICEREMAPPED, + SDL_CONTROLLERTOUCHPADDOWN, + SDL_CONTROLLERTOUCHPADMOTION, + SDL_CONTROLLERTOUCHPADUP, + SDL_CONTROLLERSENSORUPDATE, }; unsigned int i; @@ -3020,46 +3169,59 @@ SDL_GameControllerEventState(int state) } break; } - return (state); + return state; #endif /* SDL_EVENTS_DISABLED */ } -void -SDL_GameControllerHandleDelayedGuideButton(SDL_Joystick *joystick) +void SDL_GameControllerHandleDelayedGuideButton(SDL_Joystick *joystick) { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while (controllerlist) { - if (controllerlist->joystick == joystick) { - SDL_PrivateGameControllerButton(controllerlist, SDL_CONTROLLER_BUTTON_GUIDE, SDL_RELEASED); + SDL_GameController *controller; + + SDL_AssertJoysticksLocked(); + + for (controller = SDL_gamecontrollers; controller; controller = controller->next) { + if (controller->joystick == joystick) { + SDL_PrivateGameControllerButton(controller, SDL_CONTROLLER_BUTTON_GUIDE, SDL_RELEASED); break; } - controllerlist = controllerlist->next; } } -const char * -SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) +const char *SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) { #if defined(SDL_JOYSTICK_MFI) - const char *IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); + const char *IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button); + const char *retval; + + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + retval = IOS_GameControllerGetAppleSFSymbolsNameForButton(gamecontroller, button); + } + SDL_UnlockJoysticks(); - return IOS_GameControllerGetAppleSFSymbolsNameForButton(gamecontroller, button); + return retval; #else return NULL; #endif } -const char * -SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) +const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) { #if defined(SDL_JOYSTICK_MFI) - const char *IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); + const char *IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis); + const char *retval; - CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + SDL_LockJoysticks(); + { + CHECK_GAMECONTROLLER_MAGIC(gamecontroller, NULL); + + retval = IOS_GameControllerGetAppleSFSymbolsNameForAxis(gamecontroller, axis); + } + SDL_UnlockJoysticks(); - return IOS_GameControllerGetAppleSFSymbolsNameForAxis(gamecontroller, axis); + return retval; #else return NULL; #endif diff --git a/modules/SDL2/src/joystick/SDL_gamecontrollerdb.h b/modules/SDL2/src/joystick/SDL_gamecontrollerdb.h index 42996e3..f926c16 100644 --- a/modules/SDL2/src/joystick/SDL_gamecontrollerdb.h +++ b/modules/SDL2/src/joystick/SDL_gamecontrollerdb.h @@ -20,7 +20,6 @@ */ #include "../SDL_internal.h" - /* Default mappings we support The easiest way to generate a new mapping is to start Steam in Big Picture @@ -29,8 +28,7 @@ Alternatively, you can use the app located in test/controllermap */ -static const char *s_ControllerMappings [] = -{ +static const char *s_ControllerMappings[] = { #if SDL_JOYSTICK_XINPUT "xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", #endif @@ -86,6 +84,8 @@ static const char *s_ControllerMappings [] = "03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "030000003512000020ab000000000000,8BitDo SNES30 Gamepad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "030000003512000020ab000000000000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000c82d00001130000000000000,8BitDo Ultimate Wired Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,", + "03000000c82d00001330000000000000,8BitDo Ultimate Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,", "03000000c82d00001890000000000000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00003032000000000000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", @@ -134,9 +134,7 @@ static const char *s_ControllerMappings [] = "03000000b80500000610000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,", "03000000852100000201000000000000,FF-GP1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000000d0f00002700000000000000,FIGHTING STICK V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,", - "03000000151900004000000000000000,Flydigi Vader 2,a:b11,b:b10,back:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,leftstick:b1,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b0,righttrigger:b4,rightx:a3,righty:a4,start:b2,x:b9,y:b8,", - "03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b4,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,", - "03000000790000000600000000000000,G-Shark GS-GP702,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", + "03000000790000000600000000000000,G-Shark GS-GP702,crc:8e4f,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", "030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "03000000300f00000b01000000000000,GGE909 Recoil Pad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,", "03000000790000002201000000000000,Game Controller for PC,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", @@ -176,6 +174,7 @@ static const char *s_ControllerMappings [] = "030000000d0f00000900000000000000,Hori Pad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000000d0f00005400000000000000,Hori Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000000d0f00004d00000000000000,Hori Pad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", + "030000000d0f00009200000000000000,Hori Pokken Tournament DX Pro Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,", "030000000d0f0000c100000000000000,Horipad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000008f0e00001330000000000000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,", "030000006f0e00002401000000000000,INJUSTICE FightStick PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,", @@ -294,7 +293,8 @@ static const char *s_ControllerMappings [] = "030000000d0f00005c00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "0300000000f000000300000000000000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,", "0300000000f00000f100000000000000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,", - "03000000790000001100000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,", + "03000000790000001100000000000000,Retrolink SNES Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b0,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000790000001100000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "030000006b140000130d000000000000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", @@ -351,6 +351,7 @@ static const char *s_ControllerMappings [] = "03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", "03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", "03000000172700004431000000000000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,", + "03000000c0160000e105000000000000,Xin-Mo Dual Arcade,crc:2246,a:b1,b:b2,back:b9,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b4,righttrigger:b5,start:b8,x:b0,y:b3,", /* Ultimate Atari Fight Stick */ "03000000790000004f18000000000000,ZD-T Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,", "03000000120c0000101e000000000000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "03000000d81d00000f00000000000000,iBUFFALO BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", @@ -391,6 +392,8 @@ static const char *s_ControllerMappings [] = "03000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000c82d00001130000000020000,8BitDo Ultimate Wired Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", + "03000000c82d00001330000000020000,8BitDo Ultimate Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "03000000c82d00001890000001000000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00003032000000010000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", @@ -411,9 +414,6 @@ static const char *s_ControllerMappings [] = "03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,", "030000000d0f00008400000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000000d0f00008500000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", - "03000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", - "03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b4,paddle2:b5,paddle3:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,", - "03000000790000000600000000000000,G-Shark GS-GP702,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", "03000000ac0500001a06000002020000,GameSir-T3 2.02,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", "03000000c01100000140000000010000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", @@ -473,7 +473,8 @@ static const char *s_ControllerMappings [] = "03000000321500000009000000020000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,", "0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,", "03000000790000001100000000000000,Retrolink Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a3,lefty:a4,rightshoulder:b5,start:b9,x:b3,y:b0,", - "03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,", + "03000000790000001100000006010000,Retrolink SNES Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b0,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "030000006b140000130d000000010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006b140000010d000000010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,", @@ -511,14 +512,14 @@ static const char *s_ControllerMappings [] = "030000005e040000ea02000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,", "030000005e040000fd02000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "03000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,", + "03000000c0160000e105000000040000,Xin-Mo Dual Arcade,crc:82d5,a:b2,b:b4,back:b18,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,rightshoulder:b8,righttrigger:b10,start:b16,x:b0,y:b6,", /* Ultimate Atari Fight Stick */ "03000000120c0000100e000000010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "03000000120c0000101e000000010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "03000000830500006020000000010000,iBuffalo SNES Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000830500006020000000010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,", #endif -#if SDL_JOYSTICK_LINUX - "xinput,*,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", +#if defined(SDL_JOYSTICK_LINUX) || defined(__OpenBSD__) "03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d00001038000000010000,8BitDo FC30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", @@ -539,6 +540,8 @@ static const char *s_ControllerMappings [] = "05000000203800000900000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d00002038000000010000,8BitDo NES30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d00002038000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000c82d00000020000000000000,8BitDo Pro 2 Wired Controller for Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", + "06000000c82d00000020000006010000,8BitDo Pro 2 Wired Controller for Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "03000000c82d00000660000011010000,8BitDo Pro 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00000660000011010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d00000660000000010000,8BitDo Pro 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", @@ -559,6 +562,8 @@ static const char *s_ControllerMappings [] = "030000003512000020ab000010010000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000202800000900000000010000,8BitDo SNES30 Gamepad,a:b0,b:b1,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000202800000900000000010000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000c82d00001130000011010000,8BitDo Ultimate Wired Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", + "03000000c82d00001330000011010000,8BitDo Ultimate Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "03000000c82d00001890000011010000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d00003032000000010000,8BitDo Zero 2,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", @@ -597,10 +602,9 @@ static const char *s_ControllerMappings [] = "03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,", "03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,", "03000000a306000022f6000011010000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,", - "03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,", + "050000004c050000f20d000000010000,DualSense Edge Wireless Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", - "03000000b40400001124000011010000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "05000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", + "03000000790000001100000010010000,Elecom Gamepad,crc:e86c,a:b2,b:b3,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b0,y:b1,", "0300000079000000d418000000010000,GPD Win 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "0500000047532067616d657061640000,GS Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,", "03000000341a000005f7000010010000,GameCube {HuiJia USB box},a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,", @@ -614,6 +618,7 @@ static const char *s_ControllerMappings [] = "030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "03000000d11800000094000011010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,", + "05000000d11800000094000000010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,", "03000000280400000140000000010000,Gravis Gamepad Pro USB ,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,", "030000008f0e00000610000000010000,GreenAsia Electronics 4Axes 12Keys Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,", "030000008f0e00001200000010010000,GreenAsia Inc. USB Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,", @@ -647,6 +652,7 @@ static const char *s_ControllerMappings [] = "03000000300f00001001000010010000,Jess Tech Dual Analog Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,", "03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,", "030000006f0e00000103000000020000,Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", + "030000006d040000d1ca000011010000,Logitech Chillstream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000006d04000016c2000010010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", "030000006d04000016c2000011010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", @@ -778,7 +784,8 @@ static const char *s_ControllerMappings [] = "050000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,", "0300000032150000030a000001010000,Razer Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "0300000000f000000300000000010000,RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,", - "03000000790000001100000010010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,", + "03000000790000001100000010010000,Retrolink SNES Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b0,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", + "03000000790000001100000010010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "030000006b140000130d000011010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006b140000010d000011010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000006f0e00001e01000011010000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", @@ -809,6 +816,7 @@ static const char *s_ControllerMappings [] = "05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,", "05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,", "05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,", + "03000000de2800000512000011010000,Steam Deck,a:b3,b:b4,back:b11,dpdown:b17,dpleft:b18,dpright:b19,dpup:b16,guide:b13,leftshoulder:b7,leftstick:b14,lefttrigger:a9,leftx:a0,lefty:a1,misc1:b2,paddle1:b21,paddle2:b20,paddle3:b23,paddle4:b22,rightshoulder:b8,rightstick:b15,righttrigger:a8,rightx:a2,righty:a3,start:b12,x:b5,y:b6,", "03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "0500000011010000311400001b010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b32,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "05000000110100001914000009010000,SteelSeries Stratus XL,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b18,leftshoulder:b6,leftstick:b13,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:+a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", @@ -827,7 +835,6 @@ static const char *s_ControllerMappings [] = "03000000d814000007cd000011010000,Toodles 2008 Chimp PC/PS3,a:b0,b:b1,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,", "03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,", "03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,", - "03000000790000000600000007010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,", "03000000790000001100000000010000,USB Gamepad1,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,", "05000000ac0500003232000001000000,VR-BOX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,", "030000006f0e00000302000011010000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,", @@ -842,17 +849,10 @@ static const char *s_ControllerMappings [] = "0000000058626f782033363020576900,Xbox 360 Wireless Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,", "030000005e040000a102000014010000,Xbox 360 Wireless Receiver (XBOX),a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,", - "050000005e040000050b000002090000,Xbox One Elite Series 2,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "050000005e040000050b000003090000,Xbox One Elite Series 2,a:b0,b:b1,back:b121,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "050000005e040000e302000002090000,Xbox One Elite,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "030000005e040000ea02000000000000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", - "030000005e040000ea02000001030000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "050000005e040000e002000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "050000005e040000130b000007050000,Xbox Series X Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", - "050000005e040000130b000011050000,Xbox Series X Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,", "05000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,", - "03000000c0160000e105000001010000,Xin-Mo Xin-Mo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,", + "03000000c0160000e105000010010000,Xin-Mo Dual Arcade,crc:82d5,a:b1,b:b2,back:b9,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b4,righttrigger:b5,start:b8,x:b0,y:b3,", /* Ultimate Atari Fight Stick */ "03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "03000000120c0000101e000011010000,ZEROPLUS P4 Wired Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,", @@ -902,25 +902,24 @@ static const char *s_ControllerMappings [] = "05000000c82d000018900000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d000030320000ffff0f00,8BitDo Zero 2,a:b0,b:b1,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b2,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "05000000c82d000030320000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", - "05000000b404000011240000dfff3f00,Flydigi Vader 2,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "05000000d6020000e5890000dfff3f00,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,", + "05000000d6020000e5890000dfff3f80,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a3,rightx:a4,righty:a5,start:b6,x:b2,y:b3,", "0500000031366332860c44aadfff0f00,GS Gamepad,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "05000000bc20000000550000ffff3f00,GameSir G3w,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005509000003720000cf7f3f00,NVIDIA Controller v01.01,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005509000010720000ffff3f00,NVIDIA Controller v01.03,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000005509000014720000df7f3f00,NVIDIA Controller v01.04,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,", + "050000005509000014720000df7f3f80,NVIDIA Controller v01.04,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a3,rightx:a4,righty:a5,start:b6,x:b2,y:b3,", "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,sdk>=:29,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b2,y:b3,sdk>=:29,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", - "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,sdk<=:28,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", /* Extremely slow in Bluetooth mode on Android */ + "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,sdk<=:28,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", /* Extremely slow in Bluetooth mode on Android */ "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b1,b:b0,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b2,y:b17,sdk<=:28,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", /* Extremely slow in Bluetooth mode on Android */ "050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "030000004c050000cc09000000006800,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000004c050000c405000000783f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000004c050000c4050000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,", + "050000004c050000c4050000fffe3f80,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a3,rightx:a4,righty:a5,start:b16,x:b0,y:b2,", "050000004c050000c4050000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000004c050000cc090000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,", + "050000004c050000cc090000fffe3f80,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a3,rightx:a4,righty:a5,start:b16,x:b0,y:b2,", "050000004c050000cc090000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000004c050000e60c0000fffe3f00,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,", + "050000004c050000e60c0000fffe3f80,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a3,rightx:a4,righty:a5,start:b16,x:b0,y:b2,", "050000004c050000e60c0000ffff3f00,PS5 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "05000000f8270000bf0b0000ffff3f00,Razer Kishi,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000003215000005070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", @@ -928,16 +927,17 @@ static const char *s_ControllerMappings [] = "050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,", "050000004f0400000ed00000fffe3f00,ThrustMaster eSwap PRO Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005e0400008e02000000783f00,Xbox 360 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000005e040000000b000000783f00,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,", + "050000005e040000000b000000783f80,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", + "050000005e040000050b0000ffff3f00,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005e040000e002000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005e040000ea02000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005e040000fd020000ff7f3f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000005e040000e00200000ffe3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,", + "050000005e040000e00200000ffe3f80,Xbox One Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a2,righty:a3,start:b10,x:b17,y:b2,", "050000005e040000fd020000ffff3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000005e040000120b000000783f00,Xbox Series X Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,", + "050000005e040000120b000000783f80,Xbox Series X Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", "050000005e040000130b0000ffff3f00,Xbox Series X Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", - "050000005e04000091020000ff073f00,Xbox Wireless Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,", /* The DPAD doesn't seem to work on this controller on Android TV? */ - "050000001727000044310000ffff3f00,XiaoMi Game Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a5,start:b6,x:b2,y:b3,", + "050000005e04000091020000ff073f80,Xbox Wireless Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", /* The DPAD doesn't seem to work on this controller on Android TV? */ + "050000001727000044310000ffff3f80,XiaoMi Game Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a4,righty:a5,start:b6,x:b2,y:b3,", "0500000083050000602000000ffe0000,iBuffalo SNES Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b15,rightshoulder:b16,start:b10,x:b2,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "0500000083050000602000000ffe0000,iBuffalo SNES Controller,a:b1,b:b0,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b15,rightshoulder:b16,start:b10,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", #endif @@ -947,6 +947,8 @@ static const char *s_ControllerMappings [] = "05000000ac05000001000000df076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,", "05000000ac05000001000000ff076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,", "05000000ac050000020000004f066d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,", + "050000008a35000003010000ff070000,Backbone One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,", + "050000008a35000004010000ff070000,Backbone One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,", "050000007e050000062000000f060000,Nintendo Switch Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b2,b:b0,leftshoulder:b4,rightshoulder:b5,x:b3,y:b1,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "050000007e050000062000000f060000,Nintendo Switch Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b2,leftshoulder:b4,rightshoulder:b5,x:b1,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", "050000007e050000062000004f060000,Nintendo Switch Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b2,b:b0,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b3,y:b1,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", diff --git a/modules/SDL2/src/joystick/SDL_joystick.c b/modules/SDL2/src/joystick/SDL_joystick.c index b4d6d2e..3818cab 100644 --- a/modules/SDL2/src/joystick/SDL_joystick.c +++ b/modules/SDL2/src/joystick/SDL_joystick.c @@ -42,7 +42,7 @@ /* Needed for checking for input remapping programs */ #include "../core/windows/SDL_windows.h" -#undef UNICODE /* We want ASCII functions */ +#undef UNICODE /* We want ASCII functions */ #include #endif @@ -84,7 +84,7 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = { #ifdef SDL_JOYSTICK_HAIKU &SDL_HAIKU_JoystickDriver, #endif -#ifdef SDL_JOYSTICK_USBHID /* !!! FIXME: "USBHID" is a generic name, and doubly-confusing with HIDAPI next to it. This is the *BSD interface, rename this. */ +#ifdef SDL_JOYSTICK_USBHID /* !!! FIXME: "USBHID" is a generic name, and doubly-confusing with HIDAPI next to it. This is the *BSD interface, rename this. */ &SDL_BSD_JoystickDriver, #endif #ifdef SDL_JOYSTICK_OS2 @@ -106,76 +106,82 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = { &SDL_N3DS_JoystickDriver #endif #if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED) - &SDL_DUMMY_JoystickDriver + &SDL_DUMMY_JoystickDriver #endif }; + +#ifndef SDL_THREAD_SAFETY_ANALYSIS +static +#endif +SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */ +static SDL_atomic_t SDL_joystick_lock_pending; +static int SDL_joysticks_locked; static SDL_bool SDL_joysticks_initialized; static SDL_bool SDL_joysticks_quitting = SDL_FALSE; -static SDL_Joystick *SDL_joysticks = NULL; -static SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */ -static int SDL_joysticks_locked; -static SDL_atomic_t SDL_next_joystick_instance_id; -static int SDL_joystick_player_count = 0; -static SDL_JoystickID *SDL_joystick_players = NULL; +static SDL_Joystick *SDL_joysticks SDL_GUARDED_BY(SDL_joystick_lock) = NULL; +static SDL_atomic_t SDL_next_joystick_instance_id SDL_GUARDED_BY(SDL_joystick_lock); +static int SDL_joystick_player_count SDL_GUARDED_BY(SDL_joystick_lock) = 0; +static SDL_JoystickID *SDL_joystick_players SDL_GUARDED_BY(SDL_joystick_lock) = NULL; static SDL_bool SDL_joystick_allows_background_events = SDL_FALSE; -static char joystick_magic; - +char SDL_joystick_magic; -#define CHECK_JOYSTICK_MAGIC(joystick, retval) \ - if (!joystick || joystick->magic != &joystick_magic) { \ - SDL_InvalidParamError("joystick"); \ - return retval; \ +#define CHECK_JOYSTICK_MAGIC(joystick, retval) \ + if (!joystick || joystick->magic != &SDL_joystick_magic) { \ + SDL_InvalidParamError("joystick"); \ + SDL_UnlockJoysticks(); \ + return retval; \ } -SDL_bool -SDL_JoysticksInitialized(void) +SDL_bool SDL_JoysticksInitialized(void) { return SDL_joysticks_initialized; } -SDL_bool -SDL_JoysticksQuitting(void) +SDL_bool SDL_JoysticksQuitting(void) { return SDL_joysticks_quitting; } -void -SDL_LockJoysticks(void) +void SDL_LockJoysticks(void) { - if (SDL_joystick_lock) { - SDL_LockMutex(SDL_joystick_lock); - } + (void)SDL_AtomicIncRef(&SDL_joystick_lock_pending); + SDL_LockMutex(SDL_joystick_lock); + (void)SDL_AtomicDecRef(&SDL_joystick_lock_pending); ++SDL_joysticks_locked; } -void -SDL_UnlockJoysticks(void) +void SDL_UnlockJoysticks(void) { - --SDL_joysticks_locked; + SDL_mutex *joystick_lock = SDL_joystick_lock; + SDL_bool last_unlock = SDL_FALSE; - if (SDL_joystick_lock) { - SDL_UnlockMutex(SDL_joystick_lock); + --SDL_joysticks_locked; - /* The last unlock after joysticks are uninitialized will cleanup the mutex, - * allowing applications to lock joysticks while reinitializing the system. - */ - if (!SDL_joysticks_locked && - !SDL_joysticks_initialized) { - SDL_DestroyMutex(SDL_joystick_lock); + if (!SDL_joysticks_initialized) { + if (!SDL_joysticks_locked && SDL_AtomicGet(&SDL_joystick_lock_pending) == 0) { + /* NOTE: There's a small window here where another thread could lock the mutex */ SDL_joystick_lock = NULL; + last_unlock = SDL_TRUE; } } + + SDL_UnlockMutex(joystick_lock); + + /* The last unlock after joysticks are uninitialized will cleanup the mutex, + * allowing applications to lock joysticks while reinitializing the system. + */ + if (last_unlock) { + SDL_DestroyMutex(joystick_lock); + } } -SDL_bool -SDL_JoysticksLocked(void) +SDL_bool SDL_JoysticksLocked(void) { return (SDL_joysticks_locked > 0) ? SDL_TRUE : SDL_FALSE; } -void -SDL_AssertJoysticksLocked(void) +void SDL_AssertJoysticksLocked(void) { SDL_assert(SDL_JoysticksLocked()); } @@ -184,8 +190,7 @@ SDL_AssertJoysticksLocked(void) * Get the driver and device index for an API device index * This should be called while the joystick lock is held, to prevent another thread from updating the list */ -static SDL_bool -SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriver **driver, int *driver_index) +static SDL_bool SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriver **driver, int *driver_index) { int i, num_joysticks, total_joysticks = 0; @@ -208,8 +213,7 @@ SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriver **driver, int return SDL_FALSE; } -static int -SDL_FindFreePlayerIndex() +static int SDL_FindFreePlayerIndex() { int player_index; @@ -217,14 +221,13 @@ SDL_FindFreePlayerIndex() for (player_index = 0; player_index < SDL_joystick_player_count; ++player_index) { if (SDL_joystick_players[player_index] == -1) { - return player_index; + break; } } return player_index; } -static int -SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id) +static int SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id) { int player_index; @@ -241,8 +244,7 @@ SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id) return player_index; } -static SDL_JoystickID -SDL_GetJoystickIDForPlayerIndex(int player_index) +static SDL_JoystickID SDL_GetJoystickIDForPlayerIndex(int player_index) { SDL_AssertJoysticksLocked(); @@ -252,8 +254,7 @@ SDL_GetJoystickIDForPlayerIndex(int player_index) return SDL_joystick_players[player_index]; } -static SDL_bool -SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id) +static SDL_bool SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id) { SDL_JoystickID existing_instance = SDL_GetJoystickIDForPlayerIndex(player_index); SDL_JoystickDriver *driver; @@ -263,8 +264,8 @@ SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id) SDL_AssertJoysticksLocked(); if (player_index >= SDL_joystick_player_count) { - SDL_JoystickID *new_players = (SDL_JoystickID *)SDL_realloc(SDL_joystick_players, (player_index + 1)*sizeof(*SDL_joystick_players)); - if (!new_players) { + SDL_JoystickID *new_players = (SDL_JoystickID *)SDL_realloc(SDL_joystick_players, (player_index + 1) * sizeof(*SDL_joystick_players)); + if (new_players == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -300,8 +301,7 @@ SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id) return SDL_TRUE; } -static void SDLCALL -SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { if (SDL_GetStringBoolean(hint, SDL_FALSE)) { SDL_joystick_allows_background_events = SDL_TRUE; @@ -310,13 +310,12 @@ SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const } } -int -SDL_JoystickInit(void) +int SDL_JoystickInit(void) { int i, status; /* Create the joystick list lock */ - if (!SDL_joystick_lock) { + if (SDL_joystick_lock == NULL) { SDL_joystick_lock = SDL_CreateMutex(); } @@ -354,8 +353,7 @@ SDL_JoystickInit(void) /* * Count the number of joysticks attached to the system */ -int -SDL_NumJoysticks(void) +int SDL_NumJoysticks(void) { int i, total_joysticks = 0; SDL_LockJoysticks(); @@ -378,8 +376,7 @@ SDL_JoystickID SDL_GetNextJoystickInstanceID() /* * Get the implementation dependent name of a joystick */ -const char * -SDL_JoystickNameForIndex(int device_index) +const char *SDL_JoystickNameForIndex(int device_index) { SDL_JoystickDriver *driver; const char *name = NULL; @@ -397,8 +394,7 @@ SDL_JoystickNameForIndex(int device_index) /* * Get the implementation dependent path of a joystick */ -const char * -SDL_JoystickPathForIndex(int device_index) +const char *SDL_JoystickPathForIndex(int device_index) { SDL_JoystickDriver *driver; const char *path = NULL; @@ -410,7 +406,7 @@ SDL_JoystickPathForIndex(int device_index) SDL_UnlockJoysticks(); /* FIXME: Really we should reference count this path so it doesn't go away after unlock */ - if (!path) { + if (path == NULL) { SDL_Unsupported(); } return path; @@ -419,8 +415,7 @@ SDL_JoystickPathForIndex(int device_index) /* * Get the player index of a joystick, or -1 if it's not available */ -int -SDL_JoystickGetDevicePlayerIndex(int device_index) +int SDL_JoystickGetDevicePlayerIndex(int device_index) { int player_index; @@ -436,34 +431,40 @@ SDL_JoystickGetDevicePlayerIndex(int device_index) * This isn't generally needed unless the joystick never generates an initial axis value near zero, * e.g. it's emulating axes with digital buttons */ -static SDL_bool -SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) +static SDL_bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) { #ifdef __WINRT__ return SDL_TRUE; #else static Uint32 zero_centered_joysticks[] = { - MAKE_VIDPID(0x0e8f, 0x3013), /* HuiJia SNES USB adapter */ - MAKE_VIDPID(0x05a0, 0x3232), /* 8Bitdo Zero Gamepad */ + MAKE_VIDPID(0x0e8f, 0x3013), /* HuiJia SNES USB adapter */ + MAKE_VIDPID(0x05a0, 0x3232), /* 8Bitdo Zero Gamepad */ }; + SDL_bool retval = SDL_FALSE; int i; Uint32 id = MAKE_VIDPID(SDL_JoystickGetVendor(joystick), SDL_JoystickGetProduct(joystick)); /*printf("JOYSTICK '%s' VID/PID 0x%.4x/0x%.4x AXES: %d\n", joystick->name, vendor, product, joystick->naxes);*/ - if (joystick->naxes == 2) { - /* Assume D-pad or thumbstick style axes are centered at 0 */ - return SDL_TRUE; - } + SDL_LockJoysticks(); + { + if (joystick->naxes == 2) { + /* Assume D-pad or thumbstick style axes are centered at 0 */ + retval = SDL_TRUE; + } - for (i = 0; i < SDL_arraysize(zero_centered_joysticks); ++i) { - if (id == zero_centered_joysticks[i]) { - return SDL_TRUE; + for (i = 0; i < SDL_arraysize(zero_centered_joysticks); ++i) { + if (id == zero_centered_joysticks[i]) { + retval = SDL_TRUE; + break; + } } } - return SDL_FALSE; + SDL_UnlockJoysticks(); + + return retval; #endif /* __WINRT__ */ } @@ -474,8 +475,7 @@ SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) * * This function returns a joystick identifier, or NULL if an error occurred. */ -SDL_Joystick * -SDL_JoystickOpen(int device_index) +SDL_Joystick *SDL_JoystickOpen(int device_index) { SDL_JoystickDriver *driver; SDL_JoystickID instance_id; @@ -499,22 +499,22 @@ SDL_JoystickOpen(int device_index) instance_id = driver->GetDeviceInstanceID(device_index); while (joysticklist) { if (instance_id == joysticklist->instance_id) { - joystick = joysticklist; - ++joystick->ref_count; - SDL_UnlockJoysticks(); - return joystick; + joystick = joysticklist; + ++joystick->ref_count; + SDL_UnlockJoysticks(); + return joystick; } joysticklist = joysticklist->next; } /* Create and initialize the joystick */ - joystick = (SDL_Joystick *) SDL_calloc(sizeof(*joystick), 1); + joystick = (SDL_Joystick *)SDL_calloc(sizeof(*joystick), 1); if (joystick == NULL) { SDL_OutOfMemory(); SDL_UnlockJoysticks(); return NULL; } - joystick->magic = &joystick_magic; + joystick->magic = &SDL_joystick_magic; joystick->driver = driver; joystick->instance_id = instance_id; joystick->attached = SDL_TRUE; @@ -544,21 +544,18 @@ SDL_JoystickOpen(int device_index) joystick->guid = driver->GetDeviceGUID(device_index); if (joystick->naxes > 0) { - joystick->axes = (SDL_JoystickAxisInfo *) SDL_calloc(joystick->naxes, sizeof(SDL_JoystickAxisInfo)); + joystick->axes = (SDL_JoystickAxisInfo *)SDL_calloc(joystick->naxes, sizeof(SDL_JoystickAxisInfo)); } if (joystick->nhats > 0) { - joystick->hats = (Uint8 *) SDL_calloc(joystick->nhats, sizeof(Uint8)); + joystick->hats = (Uint8 *)SDL_calloc(joystick->nhats, sizeof(Uint8)); } if (joystick->nballs > 0) { - joystick->balls = (struct balldelta *) SDL_calloc(joystick->nballs, sizeof(*joystick->balls)); + joystick->balls = (struct balldelta *)SDL_calloc(joystick->nballs, sizeof(*joystick->balls)); } if (joystick->nbuttons > 0) { - joystick->buttons = (Uint8 *) SDL_calloc(joystick->nbuttons, sizeof(Uint8)); + joystick->buttons = (Uint8 *)SDL_calloc(joystick->nbuttons, sizeof(Uint8)); } - if (((joystick->naxes > 0) && !joystick->axes) - || ((joystick->nhats > 0) && !joystick->hats) - || ((joystick->nballs > 0) && !joystick->balls) - || ((joystick->nbuttons > 0) && !joystick->buttons)) { + if (((joystick->naxes > 0) && !joystick->axes) || ((joystick->nhats > 0) && !joystick->hats) || ((joystick->nballs > 0) && !joystick->balls) || ((joystick->nbuttons > 0) && !joystick->buttons)) { SDL_OutOfMemory(); SDL_JoystickClose(joystick); SDL_UnlockJoysticks(); @@ -594,9 +591,7 @@ SDL_JoystickOpen(int device_index) return joystick; } -int -SDL_JoystickAttachVirtual(SDL_JoystickType type, - int naxes, int nbuttons, int nhats) +int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats) { SDL_VirtualJoystickDesc desc; @@ -609,23 +604,21 @@ SDL_JoystickAttachVirtual(SDL_JoystickType type, return SDL_JoystickAttachVirtualEx(&desc); } -int -SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc) +int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc) { #if SDL_JOYSTICK_VIRTUAL - int result; + int retval; SDL_LockJoysticks(); - result = SDL_JoystickAttachVirtualInner(desc); + retval = SDL_JoystickAttachVirtualInner(desc); SDL_UnlockJoysticks(); - return result; + return retval; #else return SDL_SetError("SDL not built with virtual-joystick support"); #endif } -int -SDL_JoystickDetachVirtual(int device_index) +int SDL_JoystickDetachVirtual(int device_index) { #if SDL_JOYSTICK_VIRTUAL SDL_JoystickDriver *driver; @@ -633,9 +626,9 @@ SDL_JoystickDetachVirtual(int device_index) SDL_LockJoysticks(); if (SDL_GetDriverAndJoystickIndex(device_index, &driver, &device_index)) { if (driver == &SDL_VIRTUAL_JoystickDriver) { - const int result = SDL_JoystickDetachVirtualInner(device_index); + const int retval = SDL_JoystickDetachVirtualInner(device_index); SDL_UnlockJoysticks(); - return result; + return retval; } } SDL_UnlockJoysticks(); @@ -646,8 +639,7 @@ SDL_JoystickDetachVirtual(int device_index) #endif } -SDL_bool -SDL_JoystickIsVirtual(int device_index) +SDL_bool SDL_JoystickIsVirtual(int device_index) { #if SDL_JOYSTICK_VIRTUAL SDL_JoystickDriver *driver; @@ -668,54 +660,73 @@ SDL_JoystickIsVirtual(int device_index) #endif } -int -SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value) +int SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); #if SDL_JOYSTICK_VIRTUAL - return SDL_JoystickSetVirtualAxisInner(joystick, axis, value); + retval = SDL_JoystickSetVirtualAxisInner(joystick, axis, value); #else - return SDL_SetError("SDL not built with virtual-joystick support"); + retval = SDL_SetError("SDL not built with virtual-joystick support"); #endif + } + SDL_UnlockJoysticks(); + + return retval; } -int -SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value) +int SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); #if SDL_JOYSTICK_VIRTUAL - return SDL_JoystickSetVirtualButtonInner(joystick, button, value); + retval = SDL_JoystickSetVirtualButtonInner(joystick, button, value); #else - return SDL_SetError("SDL not built with virtual-joystick support"); + retval = SDL_SetError("SDL not built with virtual-joystick support"); #endif + } + SDL_UnlockJoysticks(); + + return retval; } -int -SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value) +int SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); #if SDL_JOYSTICK_VIRTUAL - return SDL_JoystickSetVirtualHatInner(joystick, hat, value); + retval = SDL_JoystickSetVirtualHatInner(joystick, hat, value); #else - return SDL_SetError("SDL not built with virtual-joystick support"); + retval = SDL_SetError("SDL not built with virtual-joystick support"); #endif + } + SDL_UnlockJoysticks(); + + return retval; } /* * Checks to make sure the joystick is valid. */ -SDL_bool -SDL_PrivateJoystickValid(SDL_Joystick *joystick) +SDL_bool SDL_PrivateJoystickValid(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); - return SDL_TRUE; + SDL_AssertJoysticksLocked(); + return (joystick && joystick->magic == &SDL_joystick_magic); } -SDL_bool -SDL_PrivateJoystickGetAutoGamepadMapping(int device_index, SDL_GamepadMapping * out) +SDL_bool SDL_PrivateJoystickGetAutoGamepadMapping(int device_index, SDL_GamepadMapping *out) { SDL_JoystickDriver *driver; SDL_bool is_ok = SDL_FALSE; @@ -732,145 +743,197 @@ SDL_PrivateJoystickGetAutoGamepadMapping(int device_index, SDL_GamepadMapping * /* * Get the number of multi-dimensional axis controls on a joystick */ -int -SDL_JoystickNumAxes(SDL_Joystick *joystick) +int SDL_JoystickNumAxes(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + retval = joystick->naxes; + } + SDL_UnlockJoysticks(); - return joystick->naxes; + return retval; } /* * Get the number of hats on a joystick */ -int -SDL_JoystickNumHats(SDL_Joystick *joystick) +int SDL_JoystickNumHats(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); - return joystick->nhats; + retval = joystick->nhats; + } + SDL_UnlockJoysticks(); + + return retval; } /* * Get the number of trackballs on a joystick */ -int -SDL_JoystickNumBalls(SDL_Joystick *joystick) +int SDL_JoystickNumBalls(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + retval = joystick->nballs; + } + SDL_UnlockJoysticks(); - return joystick->nballs; + return retval; } /* * Get the number of buttons on a joystick */ -int -SDL_JoystickNumButtons(SDL_Joystick *joystick) +int SDL_JoystickNumButtons(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); - return joystick->nbuttons; + retval = joystick->nbuttons; + } + SDL_UnlockJoysticks(); + + return retval; } /* * Get the current state of an axis control on a joystick */ -Sint16 -SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis) +Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis) { Sint16 state; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, 0); - if (axis < joystick->naxes) { - state = joystick->axes[axis].value; - } else { - SDL_SetError("Joystick only has %d axes", joystick->naxes); - state = 0; + if (axis < joystick->naxes) { + state = joystick->axes[axis].value; + } else { + SDL_SetError("Joystick only has %d axes", joystick->naxes); + state = 0; + } } + SDL_UnlockJoysticks(); + return state; } /* * Get the initial state of an axis control on a joystick */ -SDL_bool -SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state) +SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state) { - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + SDL_bool retval; - if (axis >= joystick->naxes) { - SDL_SetError("Joystick only has %d axes", joystick->naxes); - return SDL_FALSE; - } - if (state) { - *state = joystick->axes[axis].initial_value; + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + + if (axis >= joystick->naxes) { + SDL_SetError("Joystick only has %d axes", joystick->naxes); + retval = SDL_FALSE; + } else { + if (state) { + *state = joystick->axes[axis].initial_value; + } + retval = joystick->axes[axis].has_initial_value; + } } - return joystick->axes[axis].has_initial_value; + SDL_UnlockJoysticks(); + + return retval; } /* * Get the current state of a hat on a joystick */ -Uint8 -SDL_JoystickGetHat(SDL_Joystick *joystick, int hat) +Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat) { Uint8 state; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, 0); - if (hat < joystick->nhats) { - state = joystick->hats[hat]; - } else { - SDL_SetError("Joystick only has %d hats", joystick->nhats); - state = 0; + if (hat < joystick->nhats) { + state = joystick->hats[hat]; + } else { + SDL_SetError("Joystick only has %d hats", joystick->nhats); + state = 0; + } } + SDL_UnlockJoysticks(); + return state; } /* * Get the ball axis change since the last poll */ -int -SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy) +int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy) { int retval; - CHECK_JOYSTICK_MAGIC(joystick, -1); + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); - retval = 0; - if (ball < joystick->nballs) { - if (dx) { - *dx = joystick->balls[ball].dx; - } - if (dy) { - *dy = joystick->balls[ball].dy; + if (ball < joystick->nballs) { + if (dx) { + *dx = joystick->balls[ball].dx; + } + if (dy) { + *dy = joystick->balls[ball].dy; + } + joystick->balls[ball].dx = 0; + joystick->balls[ball].dy = 0; + retval = 0; + } else { + retval = SDL_SetError("Joystick only has %d balls", joystick->nballs); } - joystick->balls[ball].dx = 0; - joystick->balls[ball].dy = 0; - } else { - return SDL_SetError("Joystick only has %d balls", joystick->nballs); } + SDL_UnlockJoysticks(); + return retval; } /* * Get the current state of a button on a joystick */ -Uint8 -SDL_JoystickGetButton(SDL_Joystick *joystick, int button) +Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button) { Uint8 state; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, 0); - if (button < joystick->nbuttons) { - state = joystick->buttons[button]; - } else { - SDL_SetError("Joystick only has %d buttons", joystick->nbuttons); - state = 0; + if (button < joystick->nbuttons) { + state = joystick->buttons[button]; + } else { + SDL_SetError("Joystick only has %d buttons", joystick->nbuttons); + state = 0; + } } + SDL_UnlockJoysticks(); + return state; } @@ -878,30 +941,43 @@ SDL_JoystickGetButton(SDL_Joystick *joystick, int button) * Return if the joystick in question is currently attached to the system, * \return SDL_FALSE if not plugged in, SDL_TRUE if still present. */ -SDL_bool -SDL_JoystickGetAttached(SDL_Joystick *joystick) +SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + SDL_bool retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); - return joystick->attached; + retval = joystick->attached; + } + SDL_UnlockJoysticks(); + + return retval; } /* * Get the instance id for this opened joystick */ -SDL_JoystickID -SDL_JoystickInstanceID(SDL_Joystick *joystick) +SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, -1); + SDL_JoystickID retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + retval = joystick->instance_id; + } + SDL_UnlockJoysticks(); - return joystick->instance_id; + return retval; } /* * Return the SDL_Joystick associated with an instance id. */ -SDL_Joystick * -SDL_JoystickFromInstanceID(SDL_JoystickID instance_id) +SDL_Joystick *SDL_JoystickFromInstanceID(SDL_JoystickID instance_id) { SDL_Joystick *joystick; @@ -918,8 +994,7 @@ SDL_JoystickFromInstanceID(SDL_JoystickID instance_id) /** * Return the SDL_Joystick associated with a player index. */ -SDL_Joystick * -SDL_JoystickFromPlayerIndex(int player_index) +SDL_Joystick *SDL_JoystickFromPlayerIndex(int player_index) { SDL_JoystickID instance_id; SDL_Joystick *joystick; @@ -938,296 +1013,308 @@ SDL_JoystickFromPlayerIndex(int player_index) /* * Get the friendly name of this joystick */ -const char * -SDL_JoystickName(SDL_Joystick *joystick) +const char *SDL_JoystickName(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, NULL); + const char *retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, NULL); + + retval = joystick->name; + } + SDL_UnlockJoysticks(); - return joystick->name; + return retval; } /* * Get the implementation dependent path of this joystick */ -const char * -SDL_JoystickPath(SDL_Joystick *joystick) +const char *SDL_JoystickPath(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, NULL); + const char *retval; - if (!joystick->path) { - SDL_Unsupported(); - return NULL; + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, NULL); + + if (joystick->path) { + retval = joystick->path; + } else { + SDL_Unsupported(); + retval = NULL; + } } - return joystick->path; + SDL_UnlockJoysticks(); + + return retval; } /** * Get the player index of an opened joystick, or -1 if it's not available */ -int -SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick) +int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick) { - int player_index; - - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; SDL_LockJoysticks(); - player_index = SDL_GetPlayerIndexForJoystickID(joystick->instance_id); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + retval = SDL_GetPlayerIndexForJoystickID(joystick->instance_id); + } SDL_UnlockJoysticks(); - return player_index; + return retval; } /** * Set the player index of an opened joystick */ -void -SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index) +void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index) { - CHECK_JOYSTICK_MAGIC(joystick, ); - SDL_LockJoysticks(); - SDL_SetJoystickIDForPlayerIndex(player_index, joystick->instance_id); + { + CHECK_JOYSTICK_MAGIC(joystick, ); + + SDL_SetJoystickIDForPlayerIndex(player_index, joystick->instance_id); + } SDL_UnlockJoysticks(); } -int -SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms) +int SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms) { - int result; - - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; SDL_LockJoysticks(); - if (low_frequency_rumble == joystick->low_frequency_rumble && - high_frequency_rumble == joystick->high_frequency_rumble) { - /* Just update the expiration */ - result = 0; - } else { - result = joystick->driver->Rumble(joystick, low_frequency_rumble, high_frequency_rumble); - joystick->rumble_resend = SDL_GetTicks() + SDL_RUMBLE_RESEND_MS; - if (!joystick->rumble_resend) { - joystick->rumble_resend = 1; + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + if (low_frequency_rumble == joystick->low_frequency_rumble && + high_frequency_rumble == joystick->high_frequency_rumble) { + /* Just update the expiration */ + retval = 0; + } else { + retval = joystick->driver->Rumble(joystick, low_frequency_rumble, high_frequency_rumble); + joystick->rumble_resend = SDL_GetTicks() + SDL_RUMBLE_RESEND_MS; + if (!joystick->rumble_resend) { + joystick->rumble_resend = 1; + } } - } - if (result == 0) { - joystick->low_frequency_rumble = low_frequency_rumble; - joystick->high_frequency_rumble = high_frequency_rumble; + if (retval == 0) { + joystick->low_frequency_rumble = low_frequency_rumble; + joystick->high_frequency_rumble = high_frequency_rumble; - if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) { - joystick->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS); - if (!joystick->rumble_expiration) { - joystick->rumble_expiration = 1; + if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) { + joystick->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS); + if (!joystick->rumble_expiration) { + joystick->rumble_expiration = 1; + } + } else { + joystick->rumble_expiration = 0; + joystick->rumble_resend = 0; } - } else { - joystick->rumble_expiration = 0; - joystick->rumble_resend = 0; } } SDL_UnlockJoysticks(); - return result; + return retval; } -int -SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms) +int SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms) { - int result; - - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; SDL_LockJoysticks(); - if (left_rumble == joystick->left_trigger_rumble && right_rumble == joystick->right_trigger_rumble) { - /* Just update the expiration */ - result = 0; - } else { - result = joystick->driver->RumbleTriggers(joystick, left_rumble, right_rumble); - } + { + CHECK_JOYSTICK_MAGIC(joystick, -1); + + if (left_rumble == joystick->left_trigger_rumble && right_rumble == joystick->right_trigger_rumble) { + /* Just update the expiration */ + retval = 0; + } else { + retval = joystick->driver->RumbleTriggers(joystick, left_rumble, right_rumble); + } - if (result == 0) { - joystick->left_trigger_rumble = left_rumble; - joystick->right_trigger_rumble = right_rumble; + if (retval == 0) { + joystick->left_trigger_rumble = left_rumble; + joystick->right_trigger_rumble = right_rumble; - if ((left_rumble || right_rumble) && duration_ms) { - joystick->trigger_rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS); - if (!joystick->trigger_rumble_expiration) { - joystick->trigger_rumble_expiration = 1; + if ((left_rumble || right_rumble) && duration_ms) { + joystick->trigger_rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS); + if (!joystick->trigger_rumble_expiration) { + joystick->trigger_rumble_expiration = 1; + } + } else { + joystick->trigger_rumble_expiration = 0; } - } else { - joystick->trigger_rumble_expiration = 0; } } SDL_UnlockJoysticks(); - return result; + return retval; } -SDL_bool -SDL_JoystickHasLED(SDL_Joystick *joystick) +SDL_bool SDL_JoystickHasLED(SDL_Joystick *joystick) { - SDL_bool result; - - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + SDL_bool retval; SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); - result = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_LED) != 0; - + retval = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_LED) != 0; + } SDL_UnlockJoysticks(); - return result; + return retval; } -SDL_bool -SDL_JoystickHasRumble(SDL_Joystick *joystick) +SDL_bool SDL_JoystickHasRumble(SDL_Joystick *joystick) { - SDL_bool result; - - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + SDL_bool retval; SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); - result = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_RUMBLE) != 0; - + retval = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_RUMBLE) != 0; + } SDL_UnlockJoysticks(); - return result; + return retval; } -SDL_bool -SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick) +SDL_bool SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick) { - SDL_bool result; - - CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); + SDL_bool retval; SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_FALSE); - result = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_RUMBLE_TRIGGERS) != 0; - + retval = (joystick->driver->GetCapabilities(joystick) & SDL_JOYCAP_RUMBLE_TRIGGERS) != 0; + } SDL_UnlockJoysticks(); - return result; + return retval; } -int -SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +int SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { - int result; + int retval; SDL_bool isfreshvalue; - CHECK_JOYSTICK_MAGIC(joystick, -1); - SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); - isfreshvalue = red != joystick->led_red || - green != joystick->led_green || - blue != joystick->led_blue; - - if (isfreshvalue || SDL_TICKS_PASSED(SDL_GetTicks(), joystick->led_expiration)) { - result = joystick->driver->SetLED(joystick, red, green, blue); - joystick->led_expiration = SDL_GetTicks() + SDL_LED_MIN_REPEAT_MS; - } else { - /* Avoid spamming the driver */ - result = 0; - } + isfreshvalue = red != joystick->led_red || + green != joystick->led_green || + blue != joystick->led_blue; - /* Save the LED value regardless of success, so we don't spam the driver */ - joystick->led_red = red; - joystick->led_green = green; - joystick->led_blue = blue; + if (isfreshvalue || SDL_TICKS_PASSED(SDL_GetTicks(), joystick->led_expiration)) { + retval = joystick->driver->SetLED(joystick, red, green, blue); + joystick->led_expiration = SDL_GetTicks() + SDL_LED_MIN_REPEAT_MS; + } else { + /* Avoid spamming the driver */ + retval = 0; + } + /* Save the LED value regardless of success, so we don't spam the driver */ + joystick->led_red = red; + joystick->led_green = green; + joystick->led_blue = blue; + } SDL_UnlockJoysticks(); - return result; + return retval; } -int -SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +int SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { - int result; - - CHECK_JOYSTICK_MAGIC(joystick, -1); + int retval; SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, -1); - result = joystick->driver->SendEffect(joystick, data, size); - + retval = joystick->driver->SendEffect(joystick, data, size); + } SDL_UnlockJoysticks(); - return result; + return retval; } /* * Close a joystick previously opened with SDL_JoystickOpen() */ -void -SDL_JoystickClose(SDL_Joystick *joystick) +void SDL_JoystickClose(SDL_Joystick *joystick) { SDL_Joystick *joysticklist; SDL_Joystick *joysticklistprev; int i; - CHECK_JOYSTICK_MAGIC(joystick, ); - SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, ); - /* First decrement ref count */ - if (--joystick->ref_count > 0) { - SDL_UnlockJoysticks(); - return; - } + /* First decrement ref count */ + if (--joystick->ref_count > 0) { + SDL_UnlockJoysticks(); + return; + } - if (joystick->rumble_expiration) { - SDL_JoystickRumble(joystick, 0, 0, 0); - } - if (joystick->trigger_rumble_expiration) { - SDL_JoystickRumbleTriggers(joystick, 0, 0, 0); - } + if (joystick->rumble_expiration) { + SDL_JoystickRumble(joystick, 0, 0, 0); + } + if (joystick->trigger_rumble_expiration) { + SDL_JoystickRumbleTriggers(joystick, 0, 0, 0); + } - joystick->driver->Close(joystick); - joystick->hwdata = NULL; - joystick->magic = NULL; + joystick->driver->Close(joystick); + joystick->hwdata = NULL; + joystick->magic = NULL; - joysticklist = SDL_joysticks; - joysticklistprev = NULL; - while (joysticklist) { - if (joystick == joysticklist) { - if (joysticklistprev) { - /* unlink this entry */ - joysticklistprev->next = joysticklist->next; - } else { - SDL_joysticks = joystick->next; + joysticklist = SDL_joysticks; + joysticklistprev = NULL; + while (joysticklist) { + if (joystick == joysticklist) { + if (joysticklistprev) { + /* unlink this entry */ + joysticklistprev->next = joysticklist->next; + } else { + SDL_joysticks = joystick->next; + } + break; } - break; + joysticklistprev = joysticklist; + joysticklist = joysticklist->next; } - joysticklistprev = joysticklist; - joysticklist = joysticklist->next; - } - SDL_free(joystick->name); - SDL_free(joystick->path); - SDL_free(joystick->serial); + SDL_free(joystick->name); + SDL_free(joystick->path); + SDL_free(joystick->serial); - /* Free the data associated with this joystick */ - SDL_free(joystick->axes); - SDL_free(joystick->hats); - SDL_free(joystick->balls); - SDL_free(joystick->buttons); - for (i = 0; i < joystick->ntouchpads; i++) { - SDL_JoystickTouchpadInfo *touchpad = &joystick->touchpads[i]; - SDL_free(touchpad->fingers); + /* Free the data associated with this joystick */ + SDL_free(joystick->axes); + SDL_free(joystick->hats); + SDL_free(joystick->balls); + SDL_free(joystick->buttons); + for (i = 0; i < joystick->ntouchpads; i++) { + SDL_JoystickTouchpadInfo *touchpad = &joystick->touchpads[i]; + SDL_free(touchpad->fingers); + } + SDL_free(joystick->touchpads); + SDL_free(joystick->sensors); + SDL_free(joystick); } - SDL_free(joystick->touchpads); - SDL_free(joystick->sensors); - SDL_free(joystick); - SDL_UnlockJoysticks(); } -void -SDL_JoystickQuit(void) +void SDL_JoystickQuit(void) { int i; @@ -1243,7 +1330,7 @@ SDL_JoystickQuit(void) /* Quit drivers in reverse order to avoid breaking dependencies between drivers */ for (i = SDL_arraysize(SDL_joystick_drivers) - 1; i >= 0; --i) { - SDL_joystick_drivers[i]->Quit(); + SDL_joystick_drivers[i]->Quit(); } if (SDL_joystick_players) { @@ -1267,9 +1354,7 @@ SDL_JoystickQuit(void) SDL_UnlockJoysticks(); } - -static SDL_bool -SDL_PrivateJoystickShouldIgnoreEvent() +static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent() { if (SDL_joystick_allows_background_events) { return SDL_FALSE; @@ -1289,7 +1374,7 @@ void SDL_PrivateJoystickAddTouchpad(SDL_Joystick *joystick, int nfingers) int ntouchpads; SDL_JoystickTouchpadInfo *touchpads; - CHECK_JOYSTICK_MAGIC(joystick, ); + SDL_AssertJoysticksLocked(); ntouchpads = joystick->ntouchpads + 1; touchpads = (SDL_JoystickTouchpadInfo *)SDL_realloc(joystick->touchpads, (ntouchpads * sizeof(SDL_JoystickTouchpadInfo))); @@ -1316,7 +1401,7 @@ void SDL_PrivateJoystickAddSensor(SDL_Joystick *joystick, SDL_SensorType type, f int nsensors; SDL_JoystickSensorInfo *sensors; - CHECK_JOYSTICK_MAGIC(joystick, ); + SDL_AssertJoysticksLocked(); nsensors = joystick->nsensors + 1; sensors = (SDL_JoystickSensorInfo *)SDL_realloc(joystick->sensors, (nsensors * sizeof(SDL_JoystickSensorInfo))); @@ -1389,7 +1474,7 @@ static void UpdateEventsForDeviceRemoval(int device_index, Uint32 type) } events = SDL_small_alloc(SDL_Event, num_events, &isstack); - if (!events) { + if (events == NULL) { return; } @@ -1432,12 +1517,11 @@ static void UpdateEventsForDeviceRemoval(int device_index, Uint32 type) SDL_small_free(events, isstack); } -void -SDL_PrivateJoystickForceRecentering(SDL_Joystick *joystick) +void SDL_PrivateJoystickForceRecentering(SDL_Joystick *joystick) { int i, j; - CHECK_JOYSTICK_MAGIC(joystick, ); + SDL_AssertJoysticksLocked(); /* Tell the app that everything is centered/unpressed... */ for (i = 0; i < joystick->naxes; i++) { @@ -1505,16 +1589,13 @@ void SDL_PrivateJoystickRemoved(SDL_JoystickID device_instance) } } -int -SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value) +int SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value) { int posted; SDL_JoystickAxisInfo *info; SDL_AssertJoysticksLocked(); - CHECK_JOYSTICK_MAGIC(joystick, 0); - /* Make sure we're not getting garbage or duplicate events */ if (axis >= joystick->naxes) { return 0; @@ -1534,7 +1615,7 @@ SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value) } if (!info->sent_initial_value) { /* Make sure we don't send motion until there's real activity on this axis */ - const int MAX_ALLOWED_JITTER = SDL_JOYSTICK_AXIS_MAX / 80; /* ShanWan PS3 controller needed 96 */ + const int MAX_ALLOWED_JITTER = SDL_JOYSTICK_AXIS_MAX / 80; /* ShanWan PS3 controller needed 96 */ if (SDL_abs(value - info->value) <= MAX_ALLOWED_JITTER && !SDL_IsJoystickVirtual(joystick->guid)) { return 0; @@ -1574,15 +1655,12 @@ SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value) return posted; } -int -SDL_PrivateJoystickHat(SDL_Joystick *joystick, Uint8 hat, Uint8 value) +int SDL_PrivateJoystickHat(SDL_Joystick *joystick, Uint8 hat, Uint8 value) { int posted; SDL_AssertJoysticksLocked(); - CHECK_JOYSTICK_MAGIC(joystick, 0); - /* Make sure we're not getting garbage or duplicate events */ if (hat >= joystick->nhats) { return 0; @@ -1618,16 +1696,12 @@ SDL_PrivateJoystickHat(SDL_Joystick *joystick, Uint8 hat, Uint8 value) return posted; } -int -SDL_PrivateJoystickBall(SDL_Joystick *joystick, Uint8 ball, - Sint16 xrel, Sint16 yrel) +int SDL_PrivateJoystickBall(SDL_Joystick *joystick, Uint8 ball, Sint16 xrel, Sint16 yrel) { int posted; SDL_AssertJoysticksLocked(); - CHECK_JOYSTICK_MAGIC(joystick, 0); - /* Make sure we're not getting garbage events */ if (ball >= joystick->nballs) { return 0; @@ -1658,14 +1732,13 @@ SDL_PrivateJoystickBall(SDL_Joystick *joystick, Uint8 ball, return posted; } -int -SDL_PrivateJoystickButton(SDL_Joystick *joystick, Uint8 button, Uint8 state) +int SDL_PrivateJoystickButton(SDL_Joystick *joystick, Uint8 button, Uint8 state) { int posted; #if !SDL_EVENTS_DISABLED SDL_Event event; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_AssertJoysticksLocked(); switch (state) { case SDL_PRESSED: @@ -1714,8 +1787,7 @@ SDL_PrivateJoystickButton(SDL_Joystick *joystick, Uint8 button, Uint8 state) return posted; } -void -SDL_JoystickUpdate(void) +void SDL_JoystickUpdate(void) { int i; Uint32 now; @@ -1773,8 +1845,7 @@ SDL_JoystickUpdate(void) SDL_UnlockJoysticks(); } -int -SDL_JoystickEventState(int state) +int SDL_JoystickEventState(int state) { #if SDL_EVENTS_DISABLED return SDL_DISABLE; @@ -1835,7 +1906,7 @@ void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *prod if (crc16) { *crc16 = SDL_SwapLE16(guid16[1]); } - } else if (bus < ' ') { + } else if (bus < ' ' || bus == SDL_HARDWARE_BUS_VIRTUAL) { /* This GUID fits the unknown VID/PID form: * 16-bit bus * 16-bit CRC16 of the joystick name (can be zero) @@ -1869,12 +1940,11 @@ void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *prod } } -static int -PrefixMatch(const char *a, const char *b) +static int PrefixMatch(const char *a, const char *b) { int matchlen = 0; while (*a && *b) { - if (SDL_tolower((unsigned char) *a++) == SDL_tolower((unsigned char) *b++)) { + if (SDL_tolower((unsigned char)*a++) == SDL_tolower((unsigned char)*b++)) { ++matchlen; } else { break; @@ -1883,10 +1953,10 @@ PrefixMatch(const char *a, const char *b) return matchlen; } -char * -SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, const char *product_name) +char *SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, const char *product_name) { - static struct { + static struct + { const char *prefix; const char *replacement; } replacements[] = { @@ -1910,10 +1980,10 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c return SDL_strdup(custom_name); } - if (!vendor_name) { + if (vendor_name == NULL) { vendor_name = ""; } - if (!product_name) { + if (product_name == NULL) { product_name = ""; } @@ -1928,7 +1998,7 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c len = (SDL_strlen(vendor_name) + 1 + SDL_strlen(product_name) + 1); name = (char *)SDL_malloc(len); if (name) { - SDL_snprintf(name, len, "%s %s", vendor_name, product_name); + (void)SDL_snprintf(name, len, "%s %s", vendor_name, product_name); } } else if (*product_name) { name = SDL_strdup(product_name); @@ -1948,7 +2018,7 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c name = SDL_strdup("PS4 Controller"); break; case SDL_CONTROLLER_TYPE_PS5: - name = SDL_strdup("PS5 Controller"); + name = SDL_strdup("DualSense Wireless Controller"); break; case SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO: name = SDL_strdup("Nintendo Switch Pro Controller"); @@ -1956,8 +2026,8 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c default: len = (6 + 1 + 6 + 1); name = (char *)SDL_malloc(len); - if (name) { - SDL_snprintf(name, len, "0x%.4x/0x%.4x", vendor, product); + if (name != NULL) { + (void)SDL_snprintf(name, len, "0x%.4x/0x%.4x", vendor, product); } break; } @@ -1965,7 +2035,7 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c name = SDL_strdup("Controller"); } - if (!name) { + if (name == NULL) { return NULL; } @@ -1976,9 +2046,9 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c name[len] = '\0'; /* Compress duplicate spaces */ - for (i = 0; i < (len - 1); ) { - if (name[i] == ' ' && name[i+1] == ' ') { - SDL_memmove(&name[i], &name[i+1], (len - i)); + for (i = 0; i < (len - 1);) { + if (name[i] == ' ' && name[i + 1] == ' ') { + SDL_memmove(&name[i], &name[i + 1], (len - i)); --len; } else { ++i; @@ -1992,7 +2062,7 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c size_t replacementlen = SDL_strlen(replacements[i].replacement); if (replacementlen <= prefixlen) { SDL_memcpy(name, replacements[i].replacement, replacementlen); - SDL_memmove(name+replacementlen, name+prefixlen, (len-prefixlen)+1); + SDL_memmove(name + replacementlen, name + prefixlen, (len - prefixlen) + 1); len -= (prefixlen - replacementlen); } else { /* FIXME: Need to handle the expand case by reallocating the string */ @@ -2022,15 +2092,14 @@ SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, c return name; } -SDL_JoystickGUID -SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 product, Uint16 version, const char *name, Uint8 driver_signature, Uint8 driver_data) +SDL_JoystickGUID SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 product, Uint16 version, const char *name, Uint8 driver_signature, Uint8 driver_data) { SDL_JoystickGUID guid; Uint16 *guid16 = (Uint16 *)guid.data; SDL_zero(guid); - if (!name) { + if (name == NULL) { name = ""; } @@ -2055,13 +2124,12 @@ SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 product, Uint16 version guid.data[14] = driver_signature; guid.data[15] = driver_data; } - SDL_strlcpy((char*)guid16, name, available_space); + SDL_strlcpy((char *)guid16, name, available_space); } return guid; } -SDL_JoystickGUID -SDL_CreateJoystickGUIDForName(const char *name) +SDL_JoystickGUID SDL_CreateJoystickGUIDForName(const char *name) { return SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_UNKNOWN, 0, 0, 0, name, 0, 0); } @@ -2087,16 +2155,14 @@ void SDL_SetJoystickGUIDVersion(SDL_JoystickGUID *guid, Uint16 version) guid16[6] = SDL_SwapLE16(version); } -void -SDL_SetJoystickGUIDCRC(SDL_JoystickGUID *guid, Uint16 crc) +void SDL_SetJoystickGUIDCRC(SDL_JoystickGUID *guid, Uint16 crc) { Uint16 *guid16 = (Uint16 *)guid->data; guid16[1] = SDL_SwapLE16(crc); } -SDL_GameControllerType -SDL_GetJoystickGameControllerTypeFromVIDPID(Uint16 vendor, Uint16 product, const char *name, SDL_bool forUI) +SDL_GameControllerType SDL_GetJoystickGameControllerTypeFromVIDPID(Uint16 vendor, Uint16 product, const char *name, SDL_bool forUI) { SDL_GameControllerType type = SDL_CONTROLLER_TYPE_UNKNOWN; @@ -2191,8 +2257,7 @@ SDL_GetJoystickGameControllerTypeFromVIDPID(Uint16 vendor, Uint16 product, const return type; } -SDL_GameControllerType -SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGUID guid, const char *name) +SDL_GameControllerType SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGUID guid, const char *name) { SDL_GameControllerType type; Uint16 vendor, product; @@ -2216,28 +2281,26 @@ SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGUID guid, const char *nam return type; } -SDL_bool -SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_XBoxOneController); + return eType == k_eControllerType_XBoxOneController; } -SDL_bool -SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id) { if (vendor_id == USB_VENDOR_MICROSOFT) { if (product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1 || product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2 || - product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH) { + product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH || + product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLE) { return SDL_TRUE; } } return SDL_FALSE; } -SDL_bool -SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id) { if (vendor_id == USB_VENDOR_MICROSOFT) { if (product_id == USB_PRODUCT_XBOX_SERIES_X || @@ -2260,7 +2323,25 @@ SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id) } } if (vendor_id == USB_VENDOR_HORI) { - if (product_id == USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X) { + if (product_id == USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X || + product_id == USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X) { + return SDL_TRUE; + } + } + if (vendor_id == USB_VENDOR_RAZER) { + if (product_id == USB_PRODUCT_RAZER_WOLVERINE_V2 || + product_id == USB_PRODUCT_RAZER_WOLVERINE_V2_CHROMA) { + return SDL_TRUE; + } + } + if (vendor_id == USB_VENDOR_THRUSTMASTER) { + if (product_id == USB_PRODUCT_THRUSTMASTER_ESWAPX_PRO) { + return SDL_TRUE; + } + } + if (vendor_id == USB_VENDOR_TURTLE_BEACH) { + if (product_id == USB_PRODUCT_TURTLE_BEACH_SERIES_X_REACT_R || + product_id == USB_PRODUCT_TURTLE_BEACH_SERIES_X_RECON) { return SDL_TRUE; } } @@ -2272,8 +2353,7 @@ SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id) return SDL_FALSE; } -SDL_bool -SDL_IsJoystickBluetoothXboxOne(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickBluetoothXboxOne(Uint16 vendor_id, Uint16 product_id) { if (vendor_id == USB_VENDOR_MICROSOFT) { if (product_id == USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLUETOOTH || @@ -2290,103 +2370,95 @@ SDL_IsJoystickBluetoothXboxOne(Uint16 vendor_id, Uint16 product_id) return SDL_FALSE; } -SDL_bool -SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_PS4Controller); + return eType == k_eControllerType_PS4Controller; } -SDL_bool -SDL_IsJoystickPS5(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickPS5(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_PS5Controller); + return eType == k_eControllerType_PS5Controller; } -SDL_bool -SDL_IsJoystickNintendoSwitchPro(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id) +{ + if (vendor_id == USB_VENDOR_SONY) { + if (product_id == USB_PRODUCT_SONY_DS5_EDGE) { + return SDL_TRUE; + } + } + return SDL_FALSE; +} + +SDL_bool SDL_IsJoystickNintendoSwitchPro(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SwitchProController || - eType == k_eControllerType_SwitchInputOnlyController); + return eType == k_eControllerType_SwitchProController || eType == k_eControllerType_SwitchInputOnlyController; } -SDL_bool -SDL_IsJoystickNintendoSwitchProInputOnly(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchProInputOnly(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SwitchInputOnlyController); + return eType == k_eControllerType_SwitchInputOnlyController; } -SDL_bool -SDL_IsJoystickNintendoSwitchJoyCon(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchJoyCon(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SwitchJoyConLeft || - eType == k_eControllerType_SwitchJoyConRight); + return eType == k_eControllerType_SwitchJoyConLeft || eType == k_eControllerType_SwitchJoyConRight; } -SDL_bool -SDL_IsJoystickNintendoSwitchJoyConLeft(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchJoyConLeft(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SwitchJoyConLeft); + return eType == k_eControllerType_SwitchJoyConLeft; } -SDL_bool -SDL_IsJoystickNintendoSwitchJoyConRight(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchJoyConRight(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SwitchJoyConRight); + return eType == k_eControllerType_SwitchJoyConRight; } -SDL_bool -SDL_IsJoystickNintendoSwitchJoyConGrip(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchJoyConGrip(Uint16 vendor_id, Uint16 product_id) { - return (vendor_id == USB_VENDOR_NINTENDO && product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP); + return vendor_id == USB_VENDOR_NINTENDO && product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP; } -SDL_bool -SDL_IsJoystickNintendoSwitchJoyConPair(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickNintendoSwitchJoyConPair(Uint16 vendor_id, Uint16 product_id) { - return (vendor_id == USB_VENDOR_NINTENDO && product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR); + return vendor_id == USB_VENDOR_NINTENDO && product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR; } -SDL_bool -SDL_IsJoystickSteamController(Uint16 vendor_id, Uint16 product_id) +SDL_bool SDL_IsJoystickSteamController(Uint16 vendor_id, Uint16 product_id) { EControllerType eType = GuessControllerType(vendor_id, product_id); - return (eType == k_eControllerType_SteamController || - eType == k_eControllerType_SteamControllerV2); + return eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2; } -SDL_bool -SDL_IsJoystickXInput(SDL_JoystickGUID guid) +SDL_bool SDL_IsJoystickXInput(SDL_JoystickGUID guid) { return (guid.data[14] == 'x') ? SDL_TRUE : SDL_FALSE; } -SDL_bool -SDL_IsJoystickWGI(SDL_JoystickGUID guid) +SDL_bool SDL_IsJoystickWGI(SDL_JoystickGUID guid) { return (guid.data[14] == 'w') ? SDL_TRUE : SDL_FALSE; } -SDL_bool -SDL_IsJoystickHIDAPI(SDL_JoystickGUID guid) +SDL_bool SDL_IsJoystickHIDAPI(SDL_JoystickGUID guid) { return (guid.data[14] == 'h') ? SDL_TRUE : SDL_FALSE; } -SDL_bool -SDL_IsJoystickRAWINPUT(SDL_JoystickGUID guid) +SDL_bool SDL_IsJoystickRAWINPUT(SDL_JoystickGUID guid) { return (guid.data[14] == 'r') ? SDL_TRUE : SDL_FALSE; } -SDL_bool -SDL_IsJoystickVirtual(SDL_JoystickGUID guid) +SDL_bool SDL_IsJoystickVirtual(SDL_JoystickGUID guid) { return (guid.data[14] == 'v') ? SDL_TRUE : SDL_FALSE; } @@ -2394,28 +2466,33 @@ SDL_IsJoystickVirtual(SDL_JoystickGUID guid) static SDL_bool SDL_IsJoystickProductWheel(Uint32 vidpid) { static Uint32 wheel_joysticks[] = { - MAKE_VIDPID(0x046d, 0xc294), /* Logitech generic wheel */ - MAKE_VIDPID(0x046d, 0xc295), /* Logitech Momo Force */ - MAKE_VIDPID(0x046d, 0xc298), /* Logitech Driving Force Pro */ - MAKE_VIDPID(0x046d, 0xc299), /* Logitech G25 */ - MAKE_VIDPID(0x046d, 0xc29a), /* Logitech Driving Force GT */ - MAKE_VIDPID(0x046d, 0xc29b), /* Logitech G27 */ - MAKE_VIDPID(0x046d, 0xc24f), /* Logitech G29 (PS3) */ - MAKE_VIDPID(0x046d, 0xc260), /* Logitech G29 (PS4) */ - MAKE_VIDPID(0x046d, 0xc261), /* Logitech G920 (initial mode) */ - MAKE_VIDPID(0x046d, 0xc262), /* Logitech G920 (active mode) */ - MAKE_VIDPID(0x046d, 0xc26e), /* Logitech G923 */ - MAKE_VIDPID(0x046d, 0xca03), /* Logitech Momo Racing */ - MAKE_VIDPID(0x044f, 0xb65d), /* Thrustmaster Wheel FFB */ - MAKE_VIDPID(0x044f, 0xb66d), /* Thrustmaster Wheel FFB */ - MAKE_VIDPID(0x044f, 0xb677), /* Thrustmaster T150 */ - MAKE_VIDPID(0x044f, 0xb696), /* Thrustmaster T248 */ - MAKE_VIDPID(0x044f, 0xb66e), /* Thrustmaster T300RS (normal mode) */ - MAKE_VIDPID(0x044f, 0xb66f), /* Thrustmaster T300RS (advanced mode) */ - MAKE_VIDPID(0x044f, 0xb66d), /* Thrustmaster T300RS (PS4 mode) */ - MAKE_VIDPID(0x044f, 0xb65e), /* Thrustmaster T500RS */ - MAKE_VIDPID(0x044f, 0xb664), /* Thrustmaster TX (initial mode) */ - MAKE_VIDPID(0x044f, 0xb669), /* Thrustmaster TX (active mode) */ + MAKE_VIDPID(0x0079, 0x1864), /* DragonRise Inc. Wired Wheel (active mode) (also known as PXN V900 (PS3), Superdrive SV-750, or a Genesis Seaborg 400) */ + MAKE_VIDPID(0x046d, 0xc294), /* Logitech generic wheel */ + MAKE_VIDPID(0x046d, 0xc295), /* Logitech Momo Force */ + MAKE_VIDPID(0x046d, 0xc298), /* Logitech Driving Force Pro */ + MAKE_VIDPID(0x046d, 0xc299), /* Logitech G25 */ + MAKE_VIDPID(0x046d, 0xc29a), /* Logitech Driving Force GT */ + MAKE_VIDPID(0x046d, 0xc29b), /* Logitech G27 */ + MAKE_VIDPID(0x046d, 0xc24f), /* Logitech G29 (PS3) */ + MAKE_VIDPID(0x046d, 0xc260), /* Logitech G29 (PS4) */ + MAKE_VIDPID(0x046d, 0xc261), /* Logitech G920 (initial mode) */ + MAKE_VIDPID(0x046d, 0xc262), /* Logitech G920 (active mode) */ + MAKE_VIDPID(0x046d, 0xc268), /* Logitech PRO Racing Wheel (PC mode) */ + MAKE_VIDPID(0x046d, 0xc269), /* Logitech PRO Racing Wheel (PS4/PS5 mode) */ + MAKE_VIDPID(0x046d, 0xc26d), /* Logitech G923 (Xbox) */ + MAKE_VIDPID(0x046d, 0xc26e), /* Logitech G923 */ + MAKE_VIDPID(0x046d, 0xca03), /* Logitech Momo Racing */ + MAKE_VIDPID(0x044f, 0xb65d), /* Thrustmaster Wheel FFB */ + MAKE_VIDPID(0x044f, 0xb66d), /* Thrustmaster Wheel FFB */ + MAKE_VIDPID(0x044f, 0xb677), /* Thrustmaster T150 */ + MAKE_VIDPID(0x044f, 0xb696), /* Thrustmaster T248 */ + MAKE_VIDPID(0x044f, 0xb66e), /* Thrustmaster T300RS (normal mode) */ + MAKE_VIDPID(0x044f, 0xb66f), /* Thrustmaster T300RS (advanced mode) */ + MAKE_VIDPID(0x044f, 0xb66d), /* Thrustmaster T300RS (PS4 mode) */ + MAKE_VIDPID(0x044f, 0xb65e), /* Thrustmaster T500RS */ + MAKE_VIDPID(0x044f, 0xb664), /* Thrustmaster TX (initial mode) */ + MAKE_VIDPID(0x044f, 0xb669), /* Thrustmaster TX (active mode) */ + MAKE_VIDPID(0x11ff, 0x0511), /* DragonRise Inc. Wired Wheel (initial mode) (also known as PXN V900 (PS3), Superdrive SV-750, or a Genesis Seaborg 400) */ }; int i; @@ -2430,37 +2507,38 @@ static SDL_bool SDL_IsJoystickProductWheel(Uint32 vidpid) static SDL_bool SDL_IsJoystickProductArcadeStick(Uint32 vidpid) { static Uint32 arcadestick_joysticks[] = { - MAKE_VIDPID(0x0079, 0x181a), /* Venom Arcade Stick */ - MAKE_VIDPID(0x0079, 0x181b), /* Venom Arcade Stick */ - MAKE_VIDPID(0x0c12, 0x0ef6), /* Hitbox Arcade Stick */ - MAKE_VIDPID(0x0e6f, 0x0109), /* PDP Versus Fighting Pad */ - MAKE_VIDPID(0x0f0d, 0x0016), /* Hori Real Arcade Pro.EX */ - MAKE_VIDPID(0x0f0d, 0x001b), /* Hori Real Arcade Pro VX */ - MAKE_VIDPID(0x0f0d, 0x0063), /* Hori Real Arcade Pro Hayabusa (USA) Xbox One */ - MAKE_VIDPID(0x0f0d, 0x006a), /* Real Arcade Pro 4 */ - MAKE_VIDPID(0x0f0d, 0x0078), /* Hori Real Arcade Pro V Kai Xbox One */ - MAKE_VIDPID(0x0f0d, 0x008a), /* HORI Real Arcade Pro 4 */ - MAKE_VIDPID(0x0f0d, 0x008c), /* Hori Real Arcade Pro 4 */ - MAKE_VIDPID(0x0f0d, 0x00aa), /* HORI Real Arcade Pro V Hayabusa in Switch Mode */ - MAKE_VIDPID(0x0f0d, 0x00ed), /* Hori Fighting Stick mini 4 kai */ - MAKE_VIDPID(0x0f0d, 0x011c), /* Hori Fighting Stick α in PS4 Mode */ - MAKE_VIDPID(0x0f0d, 0x011e), /* Hori Fighting Stick α in PC Mode */ - MAKE_VIDPID(0x0f0d, 0x0184), /* Hori Fighting Stick α in PS5 Mode */ - MAKE_VIDPID(0x1532, 0x0a00), /* Razer Atrox Arcade Stick */ - MAKE_VIDPID(0x1bad, 0xf03d), /* Street Fighter IV Arcade Stick TE - Chun Li */ - MAKE_VIDPID(0x1bad, 0xf502), /* Hori Real Arcade Pro.VX SA */ - MAKE_VIDPID(0x1bad, 0xf504), /* Hori Real Arcade Pro. EX */ - MAKE_VIDPID(0x1bad, 0xf506), /* Hori Real Arcade Pro.EX Premium VLX */ - MAKE_VIDPID(0x20d6, 0xa715), /* PowerA Nintendo Switch Fusion Arcade Stick */ - MAKE_VIDPID(0x24c6, 0x5000), /* Razer Atrox Arcade Stick */ - MAKE_VIDPID(0x24c6, 0x5501), /* Hori Real Arcade Pro VX-SA */ - MAKE_VIDPID(0x24c6, 0x550e), /* Hori Real Arcade Pro V Kai 360 */ - MAKE_VIDPID(0x2c22, 0x2300), /* Qanba Obsidian Arcade Joystick in PS4 Mode */ - MAKE_VIDPID(0x2c22, 0x2302), /* Qanba Obsidian Arcade Joystick in PS3 Mode */ - MAKE_VIDPID(0x2c22, 0x2303), /* Qanba Obsidian Arcade Joystick in PC Mode */ - MAKE_VIDPID(0x2c22, 0x2500), /* Qanba Dragon Arcade Joystick in PS4 Mode */ - MAKE_VIDPID(0x2c22, 0x2502), /* Qanba Dragon Arcade Joystick in PS3 Mode */ - MAKE_VIDPID(0x2c22, 0x2503), /* Qanba Dragon Arcade Joystick in PC Mode */ + MAKE_VIDPID(0x0079, 0x181a), /* Venom Arcade Stick */ + MAKE_VIDPID(0x0079, 0x181b), /* Venom Arcade Stick */ + MAKE_VIDPID(0x0c12, 0x0ef6), /* Hitbox Arcade Stick */ + MAKE_VIDPID(0x0e6f, 0x0109), /* PDP Versus Fighting Pad */ + MAKE_VIDPID(0x0f0d, 0x0016), /* Hori Real Arcade Pro.EX */ + MAKE_VIDPID(0x0f0d, 0x001b), /* Hori Real Arcade Pro VX */ + MAKE_VIDPID(0x0f0d, 0x0063), /* Hori Real Arcade Pro Hayabusa (USA) Xbox One */ + MAKE_VIDPID(0x0f0d, 0x006a), /* Real Arcade Pro 4 */ + MAKE_VIDPID(0x0f0d, 0x0078), /* Hori Real Arcade Pro V Kai Xbox One */ + MAKE_VIDPID(0x0f0d, 0x008a), /* HORI Real Arcade Pro 4 */ + MAKE_VIDPID(0x0f0d, 0x008c), /* Hori Real Arcade Pro 4 */ + MAKE_VIDPID(0x0f0d, 0x00aa), /* HORI Real Arcade Pro V Hayabusa in Switch Mode */ + MAKE_VIDPID(0x0f0d, 0x00ed), /* Hori Fighting Stick mini 4 kai */ + MAKE_VIDPID(0x0f0d, 0x011c), /* Hori Fighting Stick α in PS4 Mode */ + MAKE_VIDPID(0x0f0d, 0x011e), /* Hori Fighting Stick α in PC Mode */ + MAKE_VIDPID(0x0f0d, 0x0184), /* Hori Fighting Stick α in PS5 Mode */ + MAKE_VIDPID(0x146b, 0x0604), /* NACON Daija Arcade Stick */ + MAKE_VIDPID(0x1532, 0x0a00), /* Razer Atrox Arcade Stick */ + MAKE_VIDPID(0x1bad, 0xf03d), /* Street Fighter IV Arcade Stick TE - Chun Li */ + MAKE_VIDPID(0x1bad, 0xf502), /* Hori Real Arcade Pro.VX SA */ + MAKE_VIDPID(0x1bad, 0xf504), /* Hori Real Arcade Pro. EX */ + MAKE_VIDPID(0x1bad, 0xf506), /* Hori Real Arcade Pro.EX Premium VLX */ + MAKE_VIDPID(0x20d6, 0xa715), /* PowerA Nintendo Switch Fusion Arcade Stick */ + MAKE_VIDPID(0x24c6, 0x5000), /* Razer Atrox Arcade Stick */ + MAKE_VIDPID(0x24c6, 0x5501), /* Hori Real Arcade Pro VX-SA */ + MAKE_VIDPID(0x24c6, 0x550e), /* Hori Real Arcade Pro V Kai 360 */ + MAKE_VIDPID(0x2c22, 0x2300), /* Qanba Obsidian Arcade Joystick in PS4 Mode */ + MAKE_VIDPID(0x2c22, 0x2302), /* Qanba Obsidian Arcade Joystick in PS3 Mode */ + MAKE_VIDPID(0x2c22, 0x2303), /* Qanba Obsidian Arcade Joystick in PC Mode */ + MAKE_VIDPID(0x2c22, 0x2500), /* Qanba Dragon Arcade Joystick in PS4 Mode */ + MAKE_VIDPID(0x2c22, 0x2502), /* Qanba Dragon Arcade Joystick in PS3 Mode */ + MAKE_VIDPID(0x2c22, 0x2503), /* Qanba Dragon Arcade Joystick in PC Mode */ }; int i; @@ -2475,12 +2553,12 @@ static SDL_bool SDL_IsJoystickProductArcadeStick(Uint32 vidpid) static SDL_bool SDL_IsJoystickProductFlightStick(Uint32 vidpid) { static Uint32 flightstick_joysticks[] = { - MAKE_VIDPID(0x044f, 0x0402), /* HOTAS Warthog Joystick */ - MAKE_VIDPID(0x0738, 0x2221), /* Saitek Pro Flight X-56 Rhino Stick */ - MAKE_VIDPID(0x044f, 0xb10a), /* ThrustMaster, Inc. T.16000M Joystick */ - MAKE_VIDPID(0x046d, 0xc215), /* Logitech Extreme 3D */ - MAKE_VIDPID(0x231d, 0x0126), /* Gunfighter Mk.III ‘Space Combat Edition’ (right) */ - MAKE_VIDPID(0x231d, 0x0127), /* Gunfighter Mk.III ‘Space Combat Edition’ (left) */ + MAKE_VIDPID(0x044f, 0x0402), /* HOTAS Warthog Joystick */ + MAKE_VIDPID(0x0738, 0x2221), /* Saitek Pro Flight X-56 Rhino Stick */ + MAKE_VIDPID(0x044f, 0xb10a), /* ThrustMaster, Inc. T.16000M Joystick */ + MAKE_VIDPID(0x046d, 0xc215), /* Logitech Extreme 3D */ + MAKE_VIDPID(0x231d, 0x0126), /* Gunfighter Mk.III ‘Space Combat Edition’ (right) */ + MAKE_VIDPID(0x231d, 0x0127), /* Gunfighter Mk.III ‘Space Combat Edition’ (left) */ }; int i; @@ -2495,8 +2573,8 @@ static SDL_bool SDL_IsJoystickProductFlightStick(Uint32 vidpid) static SDL_bool SDL_IsJoystickProductThrottle(Uint32 vidpid) { static Uint32 throttle_joysticks[] = { - MAKE_VIDPID(0x044f, 0x0404), /* HOTAS Warthog Throttle */ - MAKE_VIDPID(0x0738, 0xa221), /* Saitek Pro Flight X-56 Rhino Throttle */ + MAKE_VIDPID(0x044f, 0x0404), /* HOTAS Warthog Throttle */ + MAKE_VIDPID(0x0738, 0xa221), /* Saitek Pro Flight X-56 Rhino Throttle */ }; int i; @@ -2517,23 +2595,23 @@ static SDL_JoystickType SDL_GetJoystickGUIDType(SDL_JoystickGUID guid) if (SDL_IsJoystickXInput(guid)) { /* XInput GUID, get the type based on the XInput device subtype */ switch (guid.data[15]) { - case 0x01: /* XINPUT_DEVSUBTYPE_GAMEPAD */ + case 0x01: /* XINPUT_DEVSUBTYPE_GAMEPAD */ return SDL_JOYSTICK_TYPE_GAMECONTROLLER; - case 0x02: /* XINPUT_DEVSUBTYPE_WHEEL */ + case 0x02: /* XINPUT_DEVSUBTYPE_WHEEL */ return SDL_JOYSTICK_TYPE_WHEEL; - case 0x03: /* XINPUT_DEVSUBTYPE_ARCADE_STICK */ + case 0x03: /* XINPUT_DEVSUBTYPE_ARCADE_STICK */ return SDL_JOYSTICK_TYPE_ARCADE_STICK; - case 0x04: /* XINPUT_DEVSUBTYPE_FLIGHT_STICK */ + case 0x04: /* XINPUT_DEVSUBTYPE_FLIGHT_STICK */ return SDL_JOYSTICK_TYPE_FLIGHT_STICK; - case 0x05: /* XINPUT_DEVSUBTYPE_DANCE_PAD */ + case 0x05: /* XINPUT_DEVSUBTYPE_DANCE_PAD */ return SDL_JOYSTICK_TYPE_DANCE_PAD; - case 0x06: /* XINPUT_DEVSUBTYPE_GUITAR */ - case 0x07: /* XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE */ - case 0x0B: /* XINPUT_DEVSUBTYPE_GUITAR_BASS */ + case 0x06: /* XINPUT_DEVSUBTYPE_GUITAR */ + case 0x07: /* XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE */ + case 0x0B: /* XINPUT_DEVSUBTYPE_GUITAR_BASS */ return SDL_JOYSTICK_TYPE_GUITAR; - case 0x08: /* XINPUT_DEVSUBTYPE_DRUM_KIT */ + case 0x08: /* XINPUT_DEVSUBTYPE_DRUM_KIT */ return SDL_JOYSTICK_TYPE_DRUM_KIT; - case 0x13: /* XINPUT_DEVSUBTYPE_ARCADE_PAD */ + case 0x13: /* XINPUT_DEVSUBTYPE_ARCADE_PAD */ return SDL_JOYSTICK_TYPE_ARCADE_PAD; default: return SDL_JOYSTICK_TYPE_UNKNOWN; @@ -2632,54 +2710,54 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid) /* Microsoft Nano Transceiver v2.0 */ MAKE_VIDPID(0x045e, 0x0800), - MAKE_VIDPID(0x046d, 0xc30a), /* Logitech, Inc. iTouch Composite keboard */ + MAKE_VIDPID(0x046d, 0xc30a), /* Logitech, Inc. iTouch Composite keboard */ - MAKE_VIDPID(0x04d9, 0xa0df), /* Tek Syndicate Mouse (E-Signal USB Gaming Mouse) */ + MAKE_VIDPID(0x04d9, 0xa0df), /* Tek Syndicate Mouse (E-Signal USB Gaming Mouse) */ /* List of Wacom devices at: http://linuxwacom.sourceforge.net/wiki/index.php/Device_IDs */ - MAKE_VIDPID(0x056a, 0x0010), /* Wacom ET-0405 Graphire */ - MAKE_VIDPID(0x056a, 0x0011), /* Wacom ET-0405A Graphire2 (4x5) */ - MAKE_VIDPID(0x056a, 0x0012), /* Wacom ET-0507A Graphire2 (5x7) */ - MAKE_VIDPID(0x056a, 0x0013), /* Wacom CTE-430 Graphire3 (4x5) */ - MAKE_VIDPID(0x056a, 0x0014), /* Wacom CTE-630 Graphire3 (6x8) */ - MAKE_VIDPID(0x056a, 0x0015), /* Wacom CTE-440 Graphire4 (4x5) */ - MAKE_VIDPID(0x056a, 0x0016), /* Wacom CTE-640 Graphire4 (6x8) */ - MAKE_VIDPID(0x056a, 0x0017), /* Wacom CTE-450 Bamboo Fun (4x5) */ - MAKE_VIDPID(0x056a, 0x0018), /* Wacom CTE-650 Bamboo Fun 6x8 */ - MAKE_VIDPID(0x056a, 0x0019), /* Wacom CTE-631 Bamboo One */ - MAKE_VIDPID(0x056a, 0x00d1), /* Wacom Bamboo Pen and Touch CTH-460 */ - MAKE_VIDPID(0x056a, 0x030e), /* Wacom Intuos Pen (S) CTL-480 */ - - MAKE_VIDPID(0x09da, 0x054f), /* A4 Tech Co., G7 750 mouse */ - MAKE_VIDPID(0x09da, 0x1410), /* A4 Tech Co., Ltd Bloody AL9 mouse */ - MAKE_VIDPID(0x09da, 0x3043), /* A4 Tech Co., Ltd Bloody R8A Gaming Mouse */ - MAKE_VIDPID(0x09da, 0x31b5), /* A4 Tech Co., Ltd Bloody TL80 Terminator Laser Gaming Mouse */ - MAKE_VIDPID(0x09da, 0x3997), /* A4 Tech Co., Ltd Bloody RT7 Terminator Wireless */ - MAKE_VIDPID(0x09da, 0x3f8b), /* A4 Tech Co., Ltd Bloody V8 mouse */ - MAKE_VIDPID(0x09da, 0x51f4), /* Modecom MC-5006 Keyboard */ - MAKE_VIDPID(0x09da, 0x5589), /* A4 Tech Co., Ltd Terminator TL9 Laser Gaming Mouse */ - MAKE_VIDPID(0x09da, 0x7b22), /* A4 Tech Co., Ltd Bloody V5 */ - MAKE_VIDPID(0x09da, 0x7f2d), /* A4 Tech Co., Ltd Bloody R3 mouse */ - MAKE_VIDPID(0x09da, 0x8090), /* A4 Tech Co., Ltd X-718BK Oscar Optical Gaming Mouse */ - MAKE_VIDPID(0x09da, 0x9033), /* A4 Tech Co., X7 X-705K */ - MAKE_VIDPID(0x09da, 0x9066), /* A4 Tech Co., Sharkoon Fireglider Optical */ - MAKE_VIDPID(0x09da, 0x9090), /* A4 Tech Co., Ltd XL-730K / XL-750BK / XL-755BK Laser Mouse */ - MAKE_VIDPID(0x09da, 0x90c0), /* A4 Tech Co., Ltd X7 G800V keyboard */ - MAKE_VIDPID(0x09da, 0xf012), /* A4 Tech Co., Ltd Bloody V7 mouse */ - MAKE_VIDPID(0x09da, 0xf32a), /* A4 Tech Co., Ltd Bloody B540 keyboard */ - MAKE_VIDPID(0x09da, 0xf613), /* A4 Tech Co., Ltd Bloody V2 mouse */ - MAKE_VIDPID(0x09da, 0xf624), /* A4 Tech Co., Ltd Bloody B120 Keyboard */ - - MAKE_VIDPID(0x1b1c, 0x1b3c), /* Corsair Harpoon RGB gaming mouse */ - - MAKE_VIDPID(0x1d57, 0xad03), /* [T3] 2.4GHz and IR Air Mouse Remote Control */ - - MAKE_VIDPID(0x1e7d, 0x2e4a), /* Roccat Tyon Mouse */ - - MAKE_VIDPID(0x20a0, 0x422d), /* Winkeyless.kr Keyboards */ - - MAKE_VIDPID(0x2516, 0x001f), /* Cooler Master Storm Mizar Mouse */ - MAKE_VIDPID(0x2516, 0x0028), /* Cooler Master Storm Alcor Mouse */ + MAKE_VIDPID(0x056a, 0x0010), /* Wacom ET-0405 Graphire */ + MAKE_VIDPID(0x056a, 0x0011), /* Wacom ET-0405A Graphire2 (4x5) */ + MAKE_VIDPID(0x056a, 0x0012), /* Wacom ET-0507A Graphire2 (5x7) */ + MAKE_VIDPID(0x056a, 0x0013), /* Wacom CTE-430 Graphire3 (4x5) */ + MAKE_VIDPID(0x056a, 0x0014), /* Wacom CTE-630 Graphire3 (6x8) */ + MAKE_VIDPID(0x056a, 0x0015), /* Wacom CTE-440 Graphire4 (4x5) */ + MAKE_VIDPID(0x056a, 0x0016), /* Wacom CTE-640 Graphire4 (6x8) */ + MAKE_VIDPID(0x056a, 0x0017), /* Wacom CTE-450 Bamboo Fun (4x5) */ + MAKE_VIDPID(0x056a, 0x0018), /* Wacom CTE-650 Bamboo Fun 6x8 */ + MAKE_VIDPID(0x056a, 0x0019), /* Wacom CTE-631 Bamboo One */ + MAKE_VIDPID(0x056a, 0x00d1), /* Wacom Bamboo Pen and Touch CTH-460 */ + MAKE_VIDPID(0x056a, 0x030e), /* Wacom Intuos Pen (S) CTL-480 */ + + MAKE_VIDPID(0x09da, 0x054f), /* A4 Tech Co., G7 750 mouse */ + MAKE_VIDPID(0x09da, 0x1410), /* A4 Tech Co., Ltd Bloody AL9 mouse */ + MAKE_VIDPID(0x09da, 0x3043), /* A4 Tech Co., Ltd Bloody R8A Gaming Mouse */ + MAKE_VIDPID(0x09da, 0x31b5), /* A4 Tech Co., Ltd Bloody TL80 Terminator Laser Gaming Mouse */ + MAKE_VIDPID(0x09da, 0x3997), /* A4 Tech Co., Ltd Bloody RT7 Terminator Wireless */ + MAKE_VIDPID(0x09da, 0x3f8b), /* A4 Tech Co., Ltd Bloody V8 mouse */ + MAKE_VIDPID(0x09da, 0x51f4), /* Modecom MC-5006 Keyboard */ + MAKE_VIDPID(0x09da, 0x5589), /* A4 Tech Co., Ltd Terminator TL9 Laser Gaming Mouse */ + MAKE_VIDPID(0x09da, 0x7b22), /* A4 Tech Co., Ltd Bloody V5 */ + MAKE_VIDPID(0x09da, 0x7f2d), /* A4 Tech Co., Ltd Bloody R3 mouse */ + MAKE_VIDPID(0x09da, 0x8090), /* A4 Tech Co., Ltd X-718BK Oscar Optical Gaming Mouse */ + MAKE_VIDPID(0x09da, 0x9033), /* A4 Tech Co., X7 X-705K */ + MAKE_VIDPID(0x09da, 0x9066), /* A4 Tech Co., Sharkoon Fireglider Optical */ + MAKE_VIDPID(0x09da, 0x9090), /* A4 Tech Co., Ltd XL-730K / XL-750BK / XL-755BK Laser Mouse */ + MAKE_VIDPID(0x09da, 0x90c0), /* A4 Tech Co., Ltd X7 G800V keyboard */ + MAKE_VIDPID(0x09da, 0xf012), /* A4 Tech Co., Ltd Bloody V7 mouse */ + MAKE_VIDPID(0x09da, 0xf32a), /* A4 Tech Co., Ltd Bloody B540 keyboard */ + MAKE_VIDPID(0x09da, 0xf613), /* A4 Tech Co., Ltd Bloody V2 mouse */ + MAKE_VIDPID(0x09da, 0xf624), /* A4 Tech Co., Ltd Bloody B120 Keyboard */ + + MAKE_VIDPID(0x1b1c, 0x1b3c), /* Corsair Harpoon RGB gaming mouse */ + + MAKE_VIDPID(0x1d57, 0xad03), /* [T3] 2.4GHz and IR Air Mouse Remote Control */ + + MAKE_VIDPID(0x1e7d, 0x2e4a), /* Roccat Tyon Mouse */ + + MAKE_VIDPID(0x20a0, 0x422d), /* Winkeyless.kr Keyboards */ + + MAKE_VIDPID(0x2516, 0x001f), /* Cooler Master Storm Mizar Mouse */ + MAKE_VIDPID(0x2516, 0x0028), /* Cooler Master Storm Alcor Mouse */ /*****************************************************************/ /* Additional entries */ @@ -2696,12 +2774,12 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid) }; static Uint32 rog_chakram_list[] = { - MAKE_VIDPID(0x0b05, 0x1958), /* ROG Chakram Core Mouse */ - MAKE_VIDPID(0x0b05, 0x18e3), /* ROG Chakram (wired) Mouse */ - MAKE_VIDPID(0x0b05, 0x18e5), /* ROG Chakram (wireless) Mouse */ - MAKE_VIDPID(0x0b05, 0x1a18), /* ROG Chakram X (wired) Mouse */ - MAKE_VIDPID(0x0b05, 0x1a1a), /* ROG Chakram X (wireless) Mouse */ - MAKE_VIDPID(0x0b05, 0x1a1c), /* ROG Chakram X (Bluetooth) Mouse */ + MAKE_VIDPID(0x0b05, 0x1958), /* ROG Chakram Core Mouse */ + MAKE_VIDPID(0x0b05, 0x18e3), /* ROG Chakram (wired) Mouse */ + MAKE_VIDPID(0x0b05, 0x18e5), /* ROG Chakram (wireless) Mouse */ + MAKE_VIDPID(0x0b05, 0x1a18), /* ROG Chakram X (wired) Mouse */ + MAKE_VIDPID(0x0b05, 0x1a1a), /* ROG Chakram X (wireless) Mouse */ + MAKE_VIDPID(0x0b05, 0x1a1c), /* ROG Chakram X (Bluetooth) Mouse */ }; unsigned int i; @@ -2824,11 +2902,19 @@ int SDL_JoystickGetDeviceIndexFromInstanceID(SDL_JoystickID instance_id) SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick) { - static SDL_JoystickGUID emptyGUID; + SDL_JoystickGUID retval; + + SDL_LockJoysticks(); + { + static SDL_JoystickGUID emptyGUID; + + CHECK_JOYSTICK_MAGIC(joystick, emptyGUID); - CHECK_JOYSTICK_MAGIC(joystick, emptyGUID); + retval = joystick->guid; + } + SDL_UnlockJoysticks(); - return joystick->guid; + return retval; } Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick) @@ -2860,16 +2946,32 @@ Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick) Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, 0); + Uint16 retval; + + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, 0); + + retval = joystick->firmware_version; + } + SDL_UnlockJoysticks(); - return joystick->firmware_version; + return retval; } const char *SDL_JoystickGetSerial(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, NULL); + const char *retval; - return joystick->serial; + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, NULL); + + retval = joystick->serial; + } + SDL_UnlockJoysticks(); + + return retval; } SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick) @@ -2879,9 +2981,15 @@ SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick) type = SDL_GetJoystickGUIDType(guid); if (type == SDL_JOYSTICK_TYPE_UNKNOWN) { - if (joystick && joystick->is_game_controller) { - type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_JOYSTICK_TYPE_UNKNOWN); + + if (joystick->is_game_controller) { + type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; + } } + SDL_UnlockJoysticks(); } return type; } @@ -2901,7 +3009,7 @@ SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID) /* update the power level for this joystick */ void SDL_PrivateJoystickBatteryLevel(SDL_Joystick *joystick, SDL_JoystickPowerLevel ePowerLevel) { - CHECK_JOYSTICK_MAGIC(joystick, ); + SDL_AssertJoysticksLocked(); SDL_assert(joystick->ref_count); /* make sure we are calling this only for update, not for initialization */ if (ePowerLevel != joystick->epowerlevel) { @@ -2921,9 +3029,17 @@ void SDL_PrivateJoystickBatteryLevel(SDL_Joystick *joystick, SDL_JoystickPowerLe /* return its power level */ SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick) { - CHECK_JOYSTICK_MAGIC(joystick, SDL_JOYSTICK_POWER_UNKNOWN); + SDL_JoystickPowerLevel retval; - return joystick->epowerlevel; + SDL_LockJoysticks(); + { + CHECK_JOYSTICK_MAGIC(joystick, SDL_JOYSTICK_POWER_UNKNOWN); + + retval = joystick->epowerlevel; + } + SDL_UnlockJoysticks(); + + return retval; } int SDL_PrivateJoystickTouchpad(SDL_Joystick *joystick, int touchpad, int finger, Uint8 state, float x, float y, float pressure) @@ -2933,7 +3049,7 @@ int SDL_PrivateJoystickTouchpad(SDL_Joystick *joystick, int touchpad, int finger int posted; Uint32 event_type; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_AssertJoysticksLocked(); if (touchpad < 0 || touchpad >= joystick->ntouchpads) { return 0; @@ -3021,7 +3137,7 @@ int SDL_PrivateJoystickSensor(SDL_Joystick *joystick, SDL_SensorType type, Uint6 int i; int posted = 0; - CHECK_JOYSTICK_MAGIC(joystick, 0); + SDL_AssertJoysticksLocked(); /* We ignore events if we don't have keyboard focus */ if (SDL_PrivateJoystickShouldIgnoreEvent()) { @@ -3036,7 +3152,7 @@ int SDL_PrivateJoystickSensor(SDL_Joystick *joystick, SDL_SensorType type, Uint6 num_values = SDL_min(num_values, SDL_arraysize(sensor->data)); /* Update internal sensor state */ - SDL_memcpy(sensor->data, data, num_values*sizeof(*data)); + SDL_memcpy(sensor->data, data, num_values * sizeof(*data)); sensor->timestamp_us = timestamp_us; /* Post the event, if desired */ @@ -3048,7 +3164,7 @@ int SDL_PrivateJoystickSensor(SDL_Joystick *joystick, SDL_SensorType type, Uint6 event.csensor.sensor = type; num_values = SDL_min(num_values, SDL_arraysize(event.csensor.data)); SDL_memset(event.csensor.data, 0, sizeof(event.csensor.data)); - SDL_memcpy(event.csensor.data, data, num_values*sizeof(*data)); + SDL_memcpy(event.csensor.data, data, num_values * sizeof(*data)); event.csensor.timestamp_us = timestamp_us; posted = SDL_PushEvent(&event) == 1; } diff --git a/modules/SDL2/src/joystick/SDL_joystick_c.h b/modules/SDL2/src/joystick/SDL_joystick_c.h index 9e1114f..484746d 100644 --- a/modules/SDL2/src/joystick/SDL_joystick_c.h +++ b/modules/SDL2/src/joystick/SDL_joystick_c.h @@ -34,6 +34,7 @@ extern "C" { #endif struct _SDL_JoystickDriver; +extern char SDL_joystick_magic; /* Initialization and shutdown functions */ extern int SDL_JoystickInit(void); @@ -49,7 +50,7 @@ extern SDL_bool SDL_JoysticksQuitting(void); extern SDL_bool SDL_JoysticksLocked(void); /* Make sure we currently have the joysticks locked */ -extern void SDL_AssertJoysticksLocked(void); +extern void SDL_AssertJoysticksLocked(void) SDL_ASSERT_CAPABILITY(SDL_joystick_lock); /* Function to get the next available joystick instance ID */ extern SDL_JoystickID SDL_GetNextJoystickInstanceID(void); @@ -107,6 +108,7 @@ extern SDL_bool SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id); /* Function to return whether a joystick is a PS5 controller */ extern SDL_bool SDL_IsJoystickPS5(Uint16 vendor_id, Uint16 product_id); +extern SDL_bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id); /* Function to return whether a joystick is a Nintendo Switch Pro controller */ extern SDL_bool SDL_IsJoystickNintendoSwitchPro(Uint16 vendor_id, Uint16 product_id); diff --git a/modules/SDL2/src/joystick/SDL_sysjoystick.h b/modules/SDL2/src/joystick/SDL_sysjoystick.h index 20216bb..a93fa66 100644 --- a/modules/SDL2/src/joystick/SDL_sysjoystick.h +++ b/modules/SDL2/src/joystick/SDL_sysjoystick.h @@ -35,12 +35,12 @@ extern "C" { /* The SDL joystick structure */ typedef struct _SDL_JoystickAxisInfo { - Sint16 initial_value; /* Initial axis state */ - Sint16 value; /* Current axis state */ - Sint16 zero; /* Zero point on the axis (-32768 for triggers) */ - SDL_bool has_initial_value; /* Whether we've seen a value on the axis yet */ - SDL_bool has_second_value; /* Whether we've seen a second value on the axis yet */ - SDL_bool sent_initial_value; /* Whether we've sent the initial axis value */ + Sint16 initial_value; /* Initial axis state */ + Sint16 value; /* Current axis state */ + Sint16 zero; /* Zero point on the axis (-32768 for triggers) */ + SDL_bool has_initial_value; /* Whether we've seen a value on the axis yet */ + SDL_bool has_second_value; /* Whether we've seen a second value on the axis yet */ + SDL_bool sent_initial_value; /* Whether we've sent the initial axis value */ SDL_bool sending_initial_value; /* Whether we are sending the initial axis value */ } SDL_JoystickAxisInfo; @@ -63,84 +63,89 @@ typedef struct _SDL_JoystickSensorInfo SDL_SensorType type; SDL_bool enabled; float rate; - float data[3]; /* If this needs to expand, update SDL_ControllerSensorEvent */ + float data[3]; /* If this needs to expand, update SDL_ControllerSensorEvent */ Uint64 timestamp_us; } SDL_JoystickSensorInfo; +#define _guarded SDL_GUARDED_BY(SDL_joystick_lock) + struct _SDL_Joystick { - const void *magic; + const void *magic _guarded; - SDL_JoystickID instance_id; /* Device instance, monotonically increasing from 0 */ - char *name; /* Joystick name - system dependent */ - char *path; /* Joystick path - system dependent */ - char *serial; /* Joystick serial */ - SDL_JoystickGUID guid; /* Joystick guid */ - Uint16 firmware_version; /* Firmware version, if available */ + SDL_JoystickID instance_id _guarded; /* Device instance, monotonically increasing from 0 */ + char *name _guarded; /* Joystick name - system dependent */ + char *path _guarded; /* Joystick path - system dependent */ + char *serial _guarded; /* Joystick serial */ + SDL_JoystickGUID guid _guarded; /* Joystick guid */ + Uint16 firmware_version _guarded; /* Firmware version, if available */ - int naxes; /* Number of axis controls on the joystick */ - SDL_JoystickAxisInfo *axes; + int naxes _guarded; /* Number of axis controls on the joystick */ + SDL_JoystickAxisInfo *axes _guarded; - int nhats; /* Number of hats on the joystick */ - Uint8 *hats; /* Current hat states */ + int nhats _guarded; /* Number of hats on the joystick */ + Uint8 *hats _guarded; /* Current hat states */ - int nballs; /* Number of trackballs on the joystick */ - struct balldelta { + int nballs _guarded; /* Number of trackballs on the joystick */ + struct balldelta + { int dx; int dy; - } *balls; /* Current ball motion deltas */ + } *balls _guarded; /* Current ball motion deltas */ - int nbuttons; /* Number of buttons on the joystick */ - Uint8 *buttons; /* Current button states */ + int nbuttons _guarded; /* Number of buttons on the joystick */ + Uint8 *buttons _guarded; /* Current button states */ - int ntouchpads; /* Number of touchpads on the joystick */ - SDL_JoystickTouchpadInfo *touchpads; /* Current touchpad states */ + int ntouchpads _guarded; /* Number of touchpads on the joystick */ + SDL_JoystickTouchpadInfo *touchpads _guarded; /* Current touchpad states */ - int nsensors; /* Number of sensors on the joystick */ - int nsensors_enabled; - SDL_JoystickSensorInfo *sensors; + int nsensors _guarded; /* Number of sensors on the joystick */ + int nsensors_enabled _guarded; + SDL_JoystickSensorInfo *sensors _guarded; - Uint16 low_frequency_rumble; - Uint16 high_frequency_rumble; - Uint32 rumble_expiration; - Uint32 rumble_resend; + Uint16 low_frequency_rumble _guarded; + Uint16 high_frequency_rumble _guarded; + Uint32 rumble_expiration _guarded; + Uint32 rumble_resend _guarded; - Uint16 left_trigger_rumble; - Uint16 right_trigger_rumble; - Uint32 trigger_rumble_expiration; + Uint16 left_trigger_rumble _guarded; + Uint16 right_trigger_rumble _guarded; + Uint32 trigger_rumble_expiration _guarded; - Uint8 led_red; - Uint8 led_green; - Uint8 led_blue; - Uint32 led_expiration; + Uint8 led_red _guarded; + Uint8 led_green _guarded; + Uint8 led_blue _guarded; + Uint32 led_expiration _guarded; - SDL_bool attached; - SDL_bool is_game_controller; - SDL_bool delayed_guide_button; /* SDL_TRUE if this device has the guide button event delayed */ - SDL_JoystickPowerLevel epowerlevel; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */ + SDL_bool attached _guarded; + SDL_bool is_game_controller _guarded; + SDL_bool delayed_guide_button _guarded; /* SDL_TRUE if this device has the guide button event delayed */ + SDL_JoystickPowerLevel epowerlevel _guarded; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */ - struct _SDL_JoystickDriver *driver; + struct _SDL_JoystickDriver *driver _guarded; - struct joystick_hwdata *hwdata; /* Driver dependent information */ + struct joystick_hwdata *hwdata _guarded; /* Driver dependent information */ - int ref_count; /* Reference count for multiple opens */ + int ref_count _guarded; /* Reference count for multiple opens */ - struct _SDL_Joystick *next; /* pointer to next joystick we have allocated */ + struct _SDL_Joystick *next _guarded; /* pointer to next joystick we have allocated */ }; +#undef _guarded + /* Device bus definitions */ -#define SDL_HARDWARE_BUS_UNKNOWN 0x00 -#define SDL_HARDWARE_BUS_USB 0x03 -#define SDL_HARDWARE_BUS_BLUETOOTH 0x05 -#define SDL_HARDWARE_BUS_VIRTUAL 0xFF +#define SDL_HARDWARE_BUS_UNKNOWN 0x00 +#define SDL_HARDWARE_BUS_USB 0x03 +#define SDL_HARDWARE_BUS_BLUETOOTH 0x05 +#define SDL_HARDWARE_BUS_VIRTUAL 0xFF /* Joystick capability flags for GetCapabilities() */ -#define SDL_JOYCAP_LED 0x01 -#define SDL_JOYCAP_RUMBLE 0x02 -#define SDL_JOYCAP_RUMBLE_TRIGGERS 0x04 +#define SDL_JOYCAP_LED 0x01 +#define SDL_JOYCAP_RUMBLE 0x02 +#define SDL_JOYCAP_RUMBLE_TRIGGERS 0x04 /* Macro to combine a USB vendor ID and product ID into a single Uint32 value */ -#define MAKE_VIDPID(VID, PID) (((Uint32)(VID))<<16|(PID)) +#define MAKE_VIDPID(VID, PID) (((Uint32)(VID)) << 16 | (PID)) typedef struct _SDL_JoystickDriver { @@ -211,18 +216,18 @@ typedef struct _SDL_JoystickDriver void (*Quit)(void); /* Function to get the autodetected controller mapping; returns false if there isn't any. */ - SDL_bool (*GetGamepadMapping)(int device_index, SDL_GamepadMapping * out); + SDL_bool (*GetGamepadMapping)(int device_index, SDL_GamepadMapping *out); } SDL_JoystickDriver; /* Windows and Mac OSX has a limit of MAX_DWORD / 1000, Linux kernel has a limit of 0xFFFF */ -#define SDL_MAX_RUMBLE_DURATION_MS 0xFFFF +#define SDL_MAX_RUMBLE_DURATION_MS 0xFFFF -/* Dualshock4 only rumbles for about 5 seconds max, resend rumble command every 2 seconds +/* Dualshock4 only rumbles for about 5 seconds max, resend rumble command every 2 seconds * to make long rumble work. */ -#define SDL_RUMBLE_RESEND_MS 2000 +#define SDL_RUMBLE_RESEND_MS 2000 -#define SDL_LED_MIN_REPEAT_MS 5000 +#define SDL_LED_MIN_REPEAT_MS 5000 /* The available joystick drivers */ extern SDL_JoystickDriver SDL_ANDROID_JoystickDriver; diff --git a/modules/SDL2/src/joystick/android/SDL_sysjoystick.c b/modules/SDL2/src/joystick/android/SDL_sysjoystick.c index 9b3df49..84822e4 100644 --- a/modules/SDL2/src/joystick/android/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/android/SDL_sysjoystick.c @@ -39,15 +39,15 @@ /* As of platform android-14, android/keycodes.h is missing these defines */ #ifndef AKEYCODE_BUTTON_1 -#define AKEYCODE_BUTTON_1 188 -#define AKEYCODE_BUTTON_2 189 -#define AKEYCODE_BUTTON_3 190 -#define AKEYCODE_BUTTON_4 191 -#define AKEYCODE_BUTTON_5 192 -#define AKEYCODE_BUTTON_6 193 -#define AKEYCODE_BUTTON_7 194 -#define AKEYCODE_BUTTON_8 195 -#define AKEYCODE_BUTTON_9 196 +#define AKEYCODE_BUTTON_1 188 +#define AKEYCODE_BUTTON_2 189 +#define AKEYCODE_BUTTON_3 190 +#define AKEYCODE_BUTTON_4 191 +#define AKEYCODE_BUTTON_5 192 +#define AKEYCODE_BUTTON_6 193 +#define AKEYCODE_BUTTON_7 194 +#define AKEYCODE_BUTTON_8 195 +#define AKEYCODE_BUTTON_9 196 #define AKEYCODE_BUTTON_10 197 #define AKEYCODE_BUTTON_11 198 #define AKEYCODE_BUTTON_12 199 @@ -57,129 +57,126 @@ #define AKEYCODE_BUTTON_16 203 #endif -#define ANDROID_ACCELEROMETER_NAME "Android Accelerometer" +#define ANDROID_ACCELEROMETER_NAME "Android Accelerometer" #define ANDROID_ACCELEROMETER_DEVICE_ID INT_MIN -#define ANDROID_MAX_NBUTTONS 36 +#define ANDROID_MAX_NBUTTONS 36 -static SDL_joylist_item * JoystickByDeviceId(int device_id); +static SDL_joylist_item *JoystickByDeviceId(int device_id); static SDL_joylist_item *SDL_joylist = NULL; static SDL_joylist_item *SDL_joylist_tail = NULL; static int numjoysticks = 0; - /* Function to convert Android keyCodes into SDL ones. * This code manipulation is done to get a sequential list of codes. * FIXME: This is only suited for the case where we use a fixed number of buttons determined by ANDROID_MAX_NBUTTONS */ -static int -keycode_to_SDL(int keycode) +static int keycode_to_SDL(int keycode) { /* FIXME: If this function gets too unwieldy in the future, replace with a lookup table */ int button = 0; switch (keycode) { - /* Some gamepad buttons (API 9) */ - case AKEYCODE_BUTTON_A: - button = SDL_CONTROLLER_BUTTON_A; - break; - case AKEYCODE_BUTTON_B: - button = SDL_CONTROLLER_BUTTON_B; - break; - case AKEYCODE_BUTTON_X: - button = SDL_CONTROLLER_BUTTON_X; - break; - case AKEYCODE_BUTTON_Y: - button = SDL_CONTROLLER_BUTTON_Y; - break; - case AKEYCODE_BUTTON_L1: - button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; - break; - case AKEYCODE_BUTTON_R1: - button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; - break; - case AKEYCODE_BUTTON_THUMBL: - button = SDL_CONTROLLER_BUTTON_LEFTSTICK; - break; - case AKEYCODE_BUTTON_THUMBR: - button = SDL_CONTROLLER_BUTTON_RIGHTSTICK; - break; - case AKEYCODE_MENU: - case AKEYCODE_BUTTON_START: - button = SDL_CONTROLLER_BUTTON_START; - break; - case AKEYCODE_BACK: - case AKEYCODE_BUTTON_SELECT: - button = SDL_CONTROLLER_BUTTON_BACK; - break; - case AKEYCODE_BUTTON_MODE: - button = SDL_CONTROLLER_BUTTON_GUIDE; - break; - case AKEYCODE_BUTTON_L2: - button = 15; - break; - case AKEYCODE_BUTTON_R2: - button = 16; - break; - case AKEYCODE_BUTTON_C: - button = 17; - break; - case AKEYCODE_BUTTON_Z: - button = 18; - break; - - /* D-Pad key codes (API 1) */ - case AKEYCODE_DPAD_UP: - button = SDL_CONTROLLER_BUTTON_DPAD_UP; - break; - case AKEYCODE_DPAD_DOWN: - button = SDL_CONTROLLER_BUTTON_DPAD_DOWN; - break; - case AKEYCODE_DPAD_LEFT: - button = SDL_CONTROLLER_BUTTON_DPAD_LEFT; - break; - case AKEYCODE_DPAD_RIGHT: - button = SDL_CONTROLLER_BUTTON_DPAD_RIGHT; - break; - case AKEYCODE_DPAD_CENTER: - /* This is handled better by applications as the A button */ - /*button = 19;*/ - button = SDL_CONTROLLER_BUTTON_A; - break; - - /* More gamepad buttons (API 12), these get mapped to 20...35*/ - case AKEYCODE_BUTTON_1: - case AKEYCODE_BUTTON_2: - case AKEYCODE_BUTTON_3: - case AKEYCODE_BUTTON_4: - case AKEYCODE_BUTTON_5: - case AKEYCODE_BUTTON_6: - case AKEYCODE_BUTTON_7: - case AKEYCODE_BUTTON_8: - case AKEYCODE_BUTTON_9: - case AKEYCODE_BUTTON_10: - case AKEYCODE_BUTTON_11: - case AKEYCODE_BUTTON_12: - case AKEYCODE_BUTTON_13: - case AKEYCODE_BUTTON_14: - case AKEYCODE_BUTTON_15: - case AKEYCODE_BUTTON_16: - button = 20 + (keycode - AKEYCODE_BUTTON_1); - break; - - default: - return -1; - /* break; -Wunreachable-code-break */ - } - - /* This is here in case future generations, probably with six fingers per hand, - * happily add new cases up above and forget to update the max number of buttons. + /* Some gamepad buttons (API 9) */ + case AKEYCODE_BUTTON_A: + button = SDL_CONTROLLER_BUTTON_A; + break; + case AKEYCODE_BUTTON_B: + button = SDL_CONTROLLER_BUTTON_B; + break; + case AKEYCODE_BUTTON_X: + button = SDL_CONTROLLER_BUTTON_X; + break; + case AKEYCODE_BUTTON_Y: + button = SDL_CONTROLLER_BUTTON_Y; + break; + case AKEYCODE_BUTTON_L1: + button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; + break; + case AKEYCODE_BUTTON_R1: + button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; + break; + case AKEYCODE_BUTTON_THUMBL: + button = SDL_CONTROLLER_BUTTON_LEFTSTICK; + break; + case AKEYCODE_BUTTON_THUMBR: + button = SDL_CONTROLLER_BUTTON_RIGHTSTICK; + break; + case AKEYCODE_MENU: + case AKEYCODE_BUTTON_START: + button = SDL_CONTROLLER_BUTTON_START; + break; + case AKEYCODE_BACK: + case AKEYCODE_BUTTON_SELECT: + button = SDL_CONTROLLER_BUTTON_BACK; + break; + case AKEYCODE_BUTTON_MODE: + button = SDL_CONTROLLER_BUTTON_GUIDE; + break; + case AKEYCODE_BUTTON_L2: + button = 15; + break; + case AKEYCODE_BUTTON_R2: + button = 16; + break; + case AKEYCODE_BUTTON_C: + button = 17; + break; + case AKEYCODE_BUTTON_Z: + button = 18; + break; + + /* D-Pad key codes (API 1) */ + case AKEYCODE_DPAD_UP: + button = SDL_CONTROLLER_BUTTON_DPAD_UP; + break; + case AKEYCODE_DPAD_DOWN: + button = SDL_CONTROLLER_BUTTON_DPAD_DOWN; + break; + case AKEYCODE_DPAD_LEFT: + button = SDL_CONTROLLER_BUTTON_DPAD_LEFT; + break; + case AKEYCODE_DPAD_RIGHT: + button = SDL_CONTROLLER_BUTTON_DPAD_RIGHT; + break; + case AKEYCODE_DPAD_CENTER: + /* This is handled better by applications as the A button */ + /*button = 19;*/ + button = SDL_CONTROLLER_BUTTON_A; + break; + + /* More gamepad buttons (API 12), these get mapped to 20...35*/ + case AKEYCODE_BUTTON_1: + case AKEYCODE_BUTTON_2: + case AKEYCODE_BUTTON_3: + case AKEYCODE_BUTTON_4: + case AKEYCODE_BUTTON_5: + case AKEYCODE_BUTTON_6: + case AKEYCODE_BUTTON_7: + case AKEYCODE_BUTTON_8: + case AKEYCODE_BUTTON_9: + case AKEYCODE_BUTTON_10: + case AKEYCODE_BUTTON_11: + case AKEYCODE_BUTTON_12: + case AKEYCODE_BUTTON_13: + case AKEYCODE_BUTTON_14: + case AKEYCODE_BUTTON_15: + case AKEYCODE_BUTTON_16: + button = 20 + (keycode - AKEYCODE_BUTTON_1); + break; + + default: + return -1; + /* break; -Wunreachable-code-break */ + } + + /* This is here in case future generations, probably with six fingers per hand, + * happily add new cases up above and forget to update the max number of buttons. */ SDL_assert(button < ANDROID_MAX_NBUTTONS); return button; } -static SDL_Scancode -button_to_scancode(int button) +static SDL_Scancode button_to_scancode(int button) { switch (button) { case SDL_CONTROLLER_BUTTON_A: @@ -188,6 +185,8 @@ button_to_scancode(int button) return SDL_SCANCODE_ESCAPE; case SDL_CONTROLLER_BUTTON_BACK: return SDL_SCANCODE_ESCAPE; + case SDL_CONTROLLER_BUTTON_START: + return SDL_SCANCODE_MENU; case SDL_CONTROLLER_BUTTON_DPAD_UP: return SDL_SCANCODE_UP; case SDL_CONTROLLER_BUTTON_DPAD_DOWN: @@ -202,8 +201,7 @@ button_to_scancode(int button) return SDL_SCANCODE_UNKNOWN; } -int -Android_OnPadDown(int device_id, int keycode) +int Android_OnPadDown(int device_id, int keycode) { SDL_joylist_item *item; int button = keycode_to_SDL(keycode); @@ -218,12 +216,11 @@ Android_OnPadDown(int device_id, int keycode) SDL_UnlockJoysticks(); return 0; } - + return -1; } -int -Android_OnPadUp(int device_id, int keycode) +int Android_OnPadUp(int device_id, int keycode) { SDL_joylist_item *item; int button = keycode_to_SDL(keycode); @@ -238,12 +235,11 @@ Android_OnPadUp(int device_id, int keycode) SDL_UnlockJoysticks(); return 0; } - + return -1; } -int -Android_OnJoy(int device_id, int axis, float value) +int Android_OnJoy(int device_id, int axis, float value) { /* Android gives joy info normalized as [-1.0, 1.0] or [0.0, 1.0] */ SDL_joylist_item *item; @@ -251,15 +247,14 @@ Android_OnJoy(int device_id, int axis, float value) SDL_LockJoysticks(); item = JoystickByDeviceId(device_id); if (item && item->joystick) { - SDL_PrivateJoystickAxis(item->joystick, axis, (Sint16) (32767.*value)); + SDL_PrivateJoystickAxis(item->joystick, axis, (Sint16)(32767. * value)); } SDL_UnlockJoysticks(); - + return 0; } -int -Android_OnHat(int device_id, int hat_id, int x, int y) +int Android_OnHat(int device_id, int hat_id, int x, int y) { const int DPAD_UP_MASK = (1 << SDL_CONTROLLER_BUTTON_DPAD_UP); const int DPAD_DOWN_MASK = (1 << SDL_CONTROLLER_BUTTON_DPAD_DOWN); @@ -309,14 +304,11 @@ Android_OnHat(int device_id, int hat_id, int x, int y) return -1; } - -int -Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int nhats, int nballs) +int Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int axis_mask, int nhats, int nballs) { SDL_joylist_item *item; SDL_JoystickGUID guid; int i; - int axis_mask; int result = -1; SDL_LockJoysticks(); @@ -343,22 +335,6 @@ Android_AddJoystick(int device_id, const char *name, const char *desc, int vendo SDL_Log("Joystick: %s, descriptor %s, vendor = 0x%.4x, product = 0x%.4x, %d axes, %d hats\n", name, desc, vendor_id, product_id, naxes, nhats); #endif - /* Add the available buttons and axes - The axis mask should probably come from Java where there is more information about the axes... - */ - axis_mask = 0; - if (!is_accelerometer) { - if (naxes >= 2) { - axis_mask |= ((1 << SDL_CONTROLLER_AXIS_LEFTX) | (1 << SDL_CONTROLLER_AXIS_LEFTY)); - } - if (naxes >= 4) { - axis_mask |= ((1 << SDL_CONTROLLER_AXIS_RIGHTX) | (1 << SDL_CONTROLLER_AXIS_RIGHTY)); - } - if (naxes >= 6) { - axis_mask |= ((1 << SDL_CONTROLLER_AXIS_TRIGGERLEFT) | (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)); - } - } - if (nhats > 0) { /* Hat is translated into DPAD buttons */ button_mask |= ((1 << SDL_CONTROLLER_BUTTON_DPAD_UP) | @@ -377,7 +353,7 @@ Android_AddJoystick(int device_id, const char *name, const char *desc, int vendo guid16[7] = SDL_SwapLE16(axis_mask); } - item = (SDL_joylist_item *) SDL_malloc(sizeof (SDL_joylist_item)); + item = (SDL_joylist_item *)SDL_malloc(sizeof(SDL_joylist_item)); if (item == NULL) { goto done; } @@ -390,14 +366,14 @@ Android_AddJoystick(int device_id, const char *name, const char *desc, int vendo SDL_free(item); goto done; } - + item->is_accelerometer = is_accelerometer; if (button_mask == 0xFFFFFFFF) { item->nbuttons = ANDROID_MAX_NBUTTONS; } else { - for (i = 0; i < sizeof(button_mask)*8; ++i) { + for (i = 0; i < sizeof(button_mask) * 8; ++i) { if (button_mask & (1 << i)) { - item->nbuttons = i+1; + item->nbuttons = i + 1; } } } @@ -429,13 +405,12 @@ done: return result; } -int -Android_RemoveJoystick(int device_id) +int Android_RemoveJoystick(int device_id) { SDL_joylist_item *item = SDL_joylist; SDL_joylist_item *prev = NULL; int result = -1; - + SDL_LockJoysticks(); /* Don't call JoystickByDeviceId here or there'll be an infinite loop! */ @@ -446,7 +421,7 @@ Android_RemoveJoystick(int device_id) prev = item; item = item->next; } - + if (item == NULL) { goto done; } @@ -454,7 +429,7 @@ Android_RemoveJoystick(int device_id) if (item->joystick) { item->joystick->hwdata = NULL; } - + if (prev != NULL) { prev->next = item->next; } else { @@ -485,30 +460,25 @@ done: return result; } - static void ANDROID_JoystickDetect(void); -static int -ANDROID_JoystickInit(void) +static int ANDROID_JoystickInit(void) { ANDROID_JoystickDetect(); - + if (SDL_GetHintBoolean(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_TRUE)) { /* Default behavior, accelerometer as joystick */ - Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, ANDROID_ACCELEROMETER_NAME, 0, 0, SDL_TRUE, 0, 3, 0, 0); + Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, ANDROID_ACCELEROMETER_NAME, 0, 0, SDL_TRUE, 0, 3, 0x0003, 0, 0); } return 0; - } -static int -ANDROID_JoystickGetCount(void) +static int ANDROID_JoystickGetCount(void) { return numjoysticks; } -static void -ANDROID_JoystickDetect(void) +static void ANDROID_JoystickDetect(void) { /* Support for device connect/disconnect is API >= 16 only, * so we poll every three seconds @@ -521,8 +491,7 @@ ANDROID_JoystickDetect(void) } } -static SDL_joylist_item * -JoystickByDevIndex(int device_index) +static SDL_joylist_item *JoystickByDevIndex(int device_index) { SDL_joylist_item *item = SDL_joylist; @@ -539,8 +508,7 @@ JoystickByDevIndex(int device_index) return item; } -static SDL_joylist_item * -JoystickByDeviceId(int device_id) +static SDL_joylist_item *JoystickByDeviceId(int device_id) { SDL_joylist_item *item = SDL_joylist; @@ -550,10 +518,10 @@ JoystickByDeviceId(int device_id) } item = item->next; } - + /* Joystick not found, try adding it */ ANDROID_JoystickDetect(); - + while (item != NULL) { if (item->device_id == device_id) { return item; @@ -564,110 +532,96 @@ JoystickByDeviceId(int device_id) return NULL; } -static const char * -ANDROID_JoystickGetDeviceName(int device_index) +static const char *ANDROID_JoystickGetDeviceName(int device_index) { return JoystickByDevIndex(device_index)->name; } -static const char * -ANDROID_JoystickGetDevicePath(int device_index) +static const char *ANDROID_JoystickGetDevicePath(int device_index) { return NULL; } -static int -ANDROID_JoystickGetDevicePlayerIndex(int device_index) +static int ANDROID_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -ANDROID_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void ANDROID_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -ANDROID_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID ANDROID_JoystickGetDeviceGUID(int device_index) { return JoystickByDevIndex(device_index)->guid; } -static SDL_JoystickID -ANDROID_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID ANDROID_JoystickGetDeviceInstanceID(int device_index) { return JoystickByDevIndex(device_index)->device_instance; } -static int -ANDROID_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int ANDROID_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_joylist_item *item = JoystickByDevIndex(device_index); if (item == NULL) { return SDL_SetError("No such device"); } - + if (item->joystick != NULL) { return SDL_SetError("Joystick already opened"); } joystick->instance_id = item->device_instance; - joystick->hwdata = (struct joystick_hwdata *) item; + joystick->hwdata = (struct joystick_hwdata *)item; item->joystick = joystick; joystick->nhats = item->nhats; joystick->nballs = item->nballs; joystick->nbuttons = item->nbuttons; joystick->naxes = item->naxes; - return (0); + return 0; } -static int -ANDROID_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int ANDROID_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -ANDROID_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int ANDROID_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -ANDROID_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 ANDROID_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -static int -ANDROID_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int ANDROID_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -ANDROID_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int ANDROID_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -ANDROID_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int ANDROID_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -ANDROID_JoystickUpdate(SDL_Joystick *joystick) +static void ANDROID_JoystickUpdate(SDL_Joystick *joystick) { - SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata; + SDL_joylist_item *item = (SDL_joylist_item *)joystick->hwdata; if (item == NULL) { return; } - + if (item->is_accelerometer) { int i; Sint16 value; @@ -688,17 +642,15 @@ ANDROID_JoystickUpdate(SDL_Joystick *joystick) } } -static void -ANDROID_JoystickClose(SDL_Joystick *joystick) +static void ANDROID_JoystickClose(SDL_Joystick *joystick) { - SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata; + SDL_joylist_item *item = (SDL_joylist_item *)joystick->hwdata; if (item) { item->joystick = NULL; } } -static void -ANDROID_JoystickQuit(void) +static void ANDROID_JoystickQuit(void) { /* We don't have any way to scan for joysticks at init, so don't wipe the list * of joysticks here in case this is a reinit. @@ -719,14 +671,12 @@ ANDROID_JoystickQuit(void) #endif /* 0 */ } -static SDL_bool -ANDROID_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool ANDROID_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_ANDROID_JoystickDriver = -{ +SDL_JoystickDriver SDL_ANDROID_JoystickDriver = { ANDROID_JoystickInit, ANDROID_JoystickGetCount, ANDROID_JoystickDetect, diff --git a/modules/SDL2/src/joystick/android/SDL_sysjoystick_c.h b/modules/SDL2/src/joystick/android/SDL_sysjoystick_c.h index 3302fef..aa96f87 100644 --- a/modules/SDL2/src/joystick/android/SDL_sysjoystick_c.h +++ b/modules/SDL2/src/joystick/android/SDL_sysjoystick_c.h @@ -32,7 +32,7 @@ extern int Android_OnPadDown(int device_id, int keycode); extern int Android_OnPadUp(int device_id, int keycode); extern int Android_OnJoy(int device_id, int axisnum, float value); extern int Android_OnHat(int device_id, int hat_id, int x, int y); -extern int Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int nhats, int nballs); +extern int Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int axis_mask, int nhats, int nballs); extern int Android_RemoveJoystick(int device_id); /* A linked list of available joysticks */ @@ -40,13 +40,13 @@ typedef struct SDL_joylist_item { int device_instance; int device_id; /* Android's device id */ - char *name; /* "SideWinder 3D Pro" or whatever */ + char *name; /* "SideWinder 3D Pro" or whatever */ SDL_JoystickGUID guid; SDL_bool is_accelerometer; SDL_Joystick *joystick; int nbuttons, naxes, nhats, nballs; int dpad_state; - + struct SDL_joylist_item *next; } SDL_joylist_item; diff --git a/modules/SDL2/src/joystick/bsd/SDL_bsdjoystick.c b/modules/SDL2/src/joystick/bsd/SDL_bsdjoystick.c index 171b9ad..90a7f39 100644 --- a/modules/SDL2/src/joystick/bsd/SDL_bsdjoystick.c +++ b/modules/SDL2/src/joystick/bsd/SDL_bsdjoystick.c @@ -82,30 +82,29 @@ #define SUPPORT_JOY_GAMEPORT #endif -#define MAX_UHID_JOYS 64 -#define MAX_JOY_JOYS 2 -#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) +#define MAX_UHID_JOYS 64 +#define MAX_JOY_JOYS 2 +#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) #ifdef __OpenBSD__ -#define HUG_DPAD_UP 0x90 -#define HUG_DPAD_DOWN 0x91 -#define HUG_DPAD_RIGHT 0x92 -#define HUG_DPAD_LEFT 0x93 - -#define HAT_CENTERED 0x00 -#define HAT_UP 0x01 -#define HAT_RIGHT 0x02 -#define HAT_DOWN 0x04 -#define HAT_LEFT 0x08 -#define HAT_RIGHTUP (HAT_RIGHT|HAT_UP) -#define HAT_RIGHTDOWN (HAT_RIGHT|HAT_DOWN) -#define HAT_LEFTUP (HAT_LEFT|HAT_UP) -#define HAT_LEFTDOWN (HAT_LEFT|HAT_DOWN) +#define HUG_DPAD_UP 0x90 +#define HUG_DPAD_DOWN 0x91 +#define HUG_DPAD_RIGHT 0x92 +#define HUG_DPAD_LEFT 0x93 + +#define HAT_CENTERED 0x00 +#define HAT_UP 0x01 +#define HAT_RIGHT 0x02 +#define HAT_DOWN 0x04 +#define HAT_LEFT 0x08 +#define HAT_RIGHTUP (HAT_RIGHT | HAT_UP) +#define HAT_RIGHTDOWN (HAT_RIGHT | HAT_DOWN) +#define HAT_LEFTUP (HAT_LEFT | HAT_UP) +#define HAT_LEFTDOWN (HAT_LEFT | HAT_DOWN) /* calculate the value from the state of the dpad */ -int -dpad_to_sdl(Sint32 *dpad) +int dpad_to_sdl(Sint32 *dpad) { if (dpad[2]) { if (dpad[0]) @@ -140,8 +139,8 @@ struct report #else struct usb_ctl_report *buf; /* Buffer */ #endif - size_t size; /* Buffer size */ - int rid; /* Report ID */ + size_t size; /* Buffer size */ + int rid; /* Report ID */ enum { SREPORT_UNINIT, @@ -156,9 +155,9 @@ static struct hid_kind_t kind; const char *name; } const repinfo[] = { - {UHID_INPUT_REPORT, hid_input, "input"}, - {UHID_OUTPUT_REPORT, hid_output, "output"}, - {UHID_FEATURE_REPORT, hid_feature, "feature"} + { UHID_INPUT_REPORT, hid_input, "input" }, + { UHID_OUTPUT_REPORT, hid_output, "output" }, + { UHID_FEATURE_REPORT, hid_feature, "feature" } }; enum @@ -186,8 +185,8 @@ struct joystick_hwdata int fd; enum { - BSDJOY_UHID, /* uhid(4) */ - BSDJOY_JOY /* joy(4) */ + BSDJOY_UHID, /* uhid(4) */ + BSDJOY_JOY /* joy(4) */ } type; int naxes; @@ -202,8 +201,8 @@ struct joystick_hwdata typedef struct SDL_joylist_item { SDL_JoystickID device_instance; - char *path; /* "/dev/uhid0" or whatever */ - char *name; /* "SideWinder 3D Pro" or whatever */ + char *path; /* "/dev/uhid0" or whatever */ + char *name; /* "SideWinder 3D Pro" or whatever */ SDL_JoystickGUID guid; dev_t devnum; struct SDL_joylist_item *next; @@ -227,9 +226,7 @@ static void report_free(struct report *); #define REP_BUF_DATA(rep) ((rep)->buf->data) #endif - -static int -usage_to_joyaxe(int usage) +static int usage_to_joyaxe(int usage) { int joyaxe; switch (usage) { @@ -263,16 +260,14 @@ usage_to_joyaxe(int usage) return joyaxe; } -static void -FreeJoylistItem(SDL_joylist_item *item) +static void FreeJoylistItem(SDL_joylist_item *item) { SDL_free(item->path); SDL_free(item->name); SDL_free(item); } -static void -FreeHwData(struct joystick_hwdata *hw) +static void FreeHwData(struct joystick_hwdata *hw) { if (hw->type == BSDJOY_UHID) { report_free(&hw->inreport); @@ -321,8 +316,9 @@ CreateHwData(const char *path) hw->type = BSDJOY_UHID; { int ax; - for (ax = 0; ax < JOYAXE_count; ax++) + for (ax = 0; ax < JOYAXE_count; ax++) { hw->axis_map[ax] = -1; + } } hw->repdesc = hid_get_report_desc(fd); if (hw->repdesc == NULL) { @@ -337,7 +333,7 @@ CreateHwData(const char *path) #else if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) { #endif - rep->rid = -1; /* XXX */ + rep->rid = -1; /* XXX */ } if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { goto usberr; @@ -356,36 +352,36 @@ CreateHwData(const char *path) SDL_SetError("%s: Cannot start HID parser", path); goto usberr; } - for (i = 0; i < JOYAXE_count; i++) + for (i = 0; i < JOYAXE_count; i++) { hw->axis_map[i] = -1; + } while (hid_get_item(hdata, &hitem) > 0) { switch (hitem.kind) { case hid_input: switch (HID_PAGE(hitem.usage)) { case HUP_GENERIC_DESKTOP: - { - int usage = HID_USAGE(hitem.usage); - int joyaxe = usage_to_joyaxe(usage); - if (joyaxe >= 0) { - hw->axis_map[joyaxe] = 1; - } else if (usage == HUG_HAT_SWITCH + { + int usage = HID_USAGE(hitem.usage); + int joyaxe = usage_to_joyaxe(usage); + if (joyaxe >= 0) { + hw->axis_map[joyaxe] = 1; + } else if (usage == HUG_HAT_SWITCH #ifdef __OpenBSD__ - || usage == HUG_DPAD_UP + || usage == HUG_DPAD_UP #endif - ) { - hw->nhats++; - } - break; + ) { + hw->nhats++; } + break; + } case HUP_BUTTON: - { - int usage = HID_USAGE(hitem.usage); - if (usage > hw->nbuttons) { - hw->nbuttons = usage; - } + { + int usage = HID_USAGE(hitem.usage); + if (usage > hw->nbuttons) { + hw->nbuttons = usage; } - break; + } break; default: break; } @@ -395,9 +391,11 @@ CreateHwData(const char *path) } } hid_end_parse(hdata); - for (i = 0; i < JOYAXE_count; i++) - if (hw->axis_map[i] > 0) + for (i = 0; i < JOYAXE_count; i++) { + if (hw->axis_map[i] > 0) { hw->axis_map[i] = hw->naxes++; + } + } if (hw->naxes == 0 && hw->nbuttons == 0 && hw->nhats == 0) { SDL_SetError("%s: Not a joystick, ignoring", path); @@ -422,8 +420,7 @@ usberr: return NULL; } -static int -MaybeAddDevice(const char *path) +static int MaybeAddDevice(const char *path) { struct stat sb; char *name = NULL; @@ -442,12 +439,12 @@ MaybeAddDevice(const char *path) /* Check to make sure it's not already in list. */ for (item = SDL_joylist; item != NULL; item = item->next) { if (sb.st_rdev == item->devnum) { - return -1; /* already have this one */ + return -1; /* already have this one */ } } hw = CreateHwData(path); - if (!hw) { + if (hw == NULL) { return -1; } @@ -477,13 +474,13 @@ MaybeAddDevice(const char *path) } #endif /* USB_GET_DEVICEINFO */ } - if (!name) { + if (name == NULL) { name = SDL_strdup(path); guid = SDL_CreateJoystickGUIDForName(name); } FreeHwData(hw); - item = (SDL_joylist_item *) SDL_calloc(1, sizeof (SDL_joylist_item)); + item = (SDL_joylist_item *)SDL_calloc(1, sizeof(SDL_joylist_item)); if (item == NULL) { SDL_free(name); return -1; @@ -495,8 +492,8 @@ MaybeAddDevice(const char *path) item->guid = guid; if ((item->path == NULL) || (item->name == NULL)) { - FreeJoylistItem(item); - return -1; + FreeJoylistItem(item); + return -1; } item->device_instance = SDL_GetNextJoystickInstanceID(); @@ -515,8 +512,7 @@ MaybeAddDevice(const char *path) return numjoysticks; } -static int -BSD_JoystickInit(void) +static int BSD_JoystickInit(void) { char s[16]; int i; @@ -542,19 +538,16 @@ BSD_JoystickInit(void) return numjoysticks; } -static int -BSD_JoystickGetCount(void) +static int BSD_JoystickGetCount(void) { return numjoysticks; } -static void -BSD_JoystickDetect(void) +static void BSD_JoystickDetect(void) { } -static SDL_joylist_item * -JoystickByDevIndex(int device_index) +static SDL_joylist_item *JoystickByDevIndex(int device_index) { SDL_joylist_item *item = SDL_joylist; @@ -571,44 +564,37 @@ JoystickByDevIndex(int device_index) return item; } -static const char * -BSD_JoystickGetDeviceName(int device_index) +static const char *BSD_JoystickGetDeviceName(int device_index) { return JoystickByDevIndex(device_index)->name; } -static const char * -BSD_JoystickGetDevicePath(int device_index) +static const char *BSD_JoystickGetDevicePath(int device_index) { return JoystickByDevIndex(device_index)->path; } -static int -BSD_JoystickGetDevicePlayerIndex(int device_index) +static int BSD_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -BSD_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void BSD_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -BSD_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID BSD_JoystickGetDeviceGUID(int device_index) { return JoystickByDevIndex(device_index)->guid; } /* Function to perform the mapping from device index to the instance id for this index */ -static SDL_JoystickID -BSD_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID BSD_JoystickGetDeviceInstanceID(int device_index) { return JoystickByDevIndex(device_index)->device_instance; } -static unsigned -hatval_to_sdl(Sint32 hatval) +static unsigned hatval_to_sdl(Sint32 hatval) { static const unsigned hat_dir_map[8] = { SDL_HAT_UP, SDL_HAT_RIGHTUP, SDL_HAT_RIGHT, SDL_HAT_RIGHTDOWN, @@ -622,9 +608,7 @@ hatval_to_sdl(Sint32 hatval) return result; } - -static int -BSD_JoystickOpen(SDL_Joystick *joy, int device_index) +static int BSD_JoystickOpen(SDL_Joystick *joy, int device_index) { SDL_joylist_item *item = JoystickByDevIndex(device_index); struct joystick_hwdata *hw; @@ -634,7 +618,7 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index) } hw = CreateHwData(item->path); - if (!hw) { + if (hw == NULL) { return -1; } @@ -647,8 +631,7 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index) return 0; } -static void -BSD_JoystickUpdate(SDL_Joystick *joy) +static void BSD_JoystickUpdate(SDL_Joystick *joy) { struct hid_item hitem; struct hid_data *hdata; @@ -656,7 +639,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) int nbutton, naxe = -1; Sint32 v; #ifdef __OpenBSD__ - Sint32 dpad[4] = {0, 0, 0, 0}; + Sint32 dpad[4] = { 0, 0, 0, 0 }; #endif #ifdef SUPPORT_JOY_GAMEPORT @@ -664,7 +647,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0; if (joy->hwdata->type == BSDJOY_JOY) { - while (read(joy->hwdata->fd, &gameport, sizeof gameport) == sizeof gameport) { + while (read(joy->hwdata->fd, &gameport, sizeof(gameport)) == sizeof(gameport)) { if (SDL_abs(x - gameport.x) > 8) { x = gameport.x; if (x < xmin) { @@ -677,7 +660,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) xmin--; xmax++; } - v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * ((Sint32)x - xmin) ) / (xmax - xmin)) + SDL_JOYSTICK_AXIS_MIN; + v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * ((Sint32)x - xmin)) / (xmax - xmin)) + SDL_JOYSTICK_AXIS_MIN; SDL_PrivateJoystickAxis(joy, 0, v); } if (SDL_abs(y - gameport.y) > 8) { @@ -692,7 +675,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) ymin--; ymax++; } - v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * ((Sint32)y - ymin) ) / (ymax - ymin)) + SDL_JOYSTICK_AXIS_MIN; + v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * ((Sint32)y - ymin)) / (ymax - ymin)) + SDL_JOYSTICK_AXIS_MIN; SDL_PrivateJoystickAxis(joy, 1, v); } SDL_PrivateJoystickButton(joy, 0, gameport.b1); @@ -720,44 +703,41 @@ BSD_JoystickUpdate(SDL_Joystick *joy) case hid_input: switch (HID_PAGE(hitem.usage)) { case HUP_GENERIC_DESKTOP: - { - int usage = HID_USAGE(hitem.usage); - int joyaxe = usage_to_joyaxe(usage); - if (joyaxe >= 0) { - naxe = joy->hwdata->axis_map[joyaxe]; - /* scaleaxe */ - v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * (v - hitem.logical_minimum) ) / (hitem.logical_maximum - hitem.logical_minimum)) + SDL_JOYSTICK_AXIS_MIN; - SDL_PrivateJoystickAxis(joy, naxe, v); - } else if (usage == HUG_HAT_SWITCH) { - v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - SDL_PrivateJoystickHat(joy, 0, - hatval_to_sdl(v) - + { + int usage = HID_USAGE(hitem.usage); + int joyaxe = usage_to_joyaxe(usage); + if (joyaxe >= 0) { + naxe = joy->hwdata->axis_map[joyaxe]; + /* scaleaxe */ + v = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + v = (((SDL_JOYSTICK_AXIS_MAX - SDL_JOYSTICK_AXIS_MIN) * (v - hitem.logical_minimum)) / (hitem.logical_maximum - hitem.logical_minimum)) + SDL_JOYSTICK_AXIS_MIN; + SDL_PrivateJoystickAxis(joy, naxe, v); + } else if (usage == HUG_HAT_SWITCH) { + v = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + SDL_PrivateJoystickHat(joy, 0, + hatval_to_sdl(v) - hitem.logical_minimum); - } + } #ifdef __OpenBSD__ - else if (usage == HUG_DPAD_UP) { - dpad[0] = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); - } - else if (usage == HUG_DPAD_DOWN) { - dpad[1] = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); - } - else if (usage == HUG_DPAD_RIGHT) { - dpad[2] = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); - } - else if (usage == HUG_DPAD_LEFT) { - dpad[3] = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); - } -#endif - break; + else if (usage == HUG_DPAD_UP) { + dpad[0] = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); + } else if (usage == HUG_DPAD_DOWN) { + dpad[1] = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); + } else if (usage == HUG_DPAD_RIGHT) { + dpad[2] = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); + } else if (usage == HUG_DPAD_LEFT) { + dpad[3] = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + SDL_PrivateJoystickHat(joy, 0, dpad_to_sdl(dpad)); } +#endif + break; + } case HUP_BUTTON: - v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem); - nbutton = HID_USAGE(hitem.usage) - 1; /* SDL buttons are zero-based */ + v = (Sint32)hid_get_data(REP_BUF_DATA(rep), &hitem); + nbutton = HID_USAGE(hitem.usage) - 1; /* SDL buttons are zero-based */ SDL_PrivateJoystickButton(joy, nbutton, v); break; default: @@ -773,8 +753,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) } /* Function to close a joystick after use */ -static void -BSD_JoystickClose(SDL_Joystick *joy) +static void BSD_JoystickClose(SDL_Joystick *joy) { if (joy->hwdata) { FreeHwData(joy->hwdata); @@ -782,8 +761,7 @@ BSD_JoystickClose(SDL_Joystick *joy) } } -static void -BSD_JoystickQuit(void) +static void BSD_JoystickQuit(void) { SDL_joylist_item *item = NULL; SDL_joylist_item *next = NULL; @@ -798,29 +776,28 @@ BSD_JoystickQuit(void) numjoysticks = 0; } -static int -report_alloc(struct report *r, struct report_desc *rd, int repind) +static int report_alloc(struct report *r, struct report_desc *rd, int repind) { int len; #ifdef __DragonFly__ len = hid_report_size(rd, repinfo[repind].kind, r->rid); #elif __FREEBSD__ -# if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__) -# if (__FreeBSD_kernel_version <= 500111) +#if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__) +#if (__FreeBSD_kernel_version <= 500111) len = hid_report_size(rd, r->rid, repinfo[repind].kind); -# else +#else len = hid_report_size(rd, repinfo[repind].kind, r->rid); -# endif -# else +#endif +#else len = hid_report_size(rd, repinfo[repind].kind, &r->rid); -# endif +#endif #else -# ifdef USBHID_NEW +#ifdef USBHID_NEW len = hid_report_size(rd, repinfo[repind].kind, r->rid); -# else +#else len = hid_report_size(rd, repinfo[repind].kind, &r->rid); -# endif +#endif #endif if (len < 0) { @@ -846,57 +823,48 @@ report_alloc(struct report *r, struct report_desc *rd, int repind) return 0; } -static void -report_free(struct report *r) +static void report_free(struct report *r) { SDL_free(r->buf); r->status = SREPORT_UNINIT; } -static int -BSD_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int BSD_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -BSD_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int BSD_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static SDL_bool -BSD_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool BSD_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -static Uint32 -BSD_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 BSD_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -static int -BSD_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int BSD_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -BSD_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int BSD_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -BSD_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int BSD_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -SDL_JoystickDriver SDL_BSD_JoystickDriver = -{ +SDL_JoystickDriver SDL_BSD_JoystickDriver = { BSD_JoystickInit, BSD_JoystickGetCount, BSD_JoystickDetect, diff --git a/modules/SDL2/src/joystick/check_8bitdo.sh b/modules/SDL2/src/joystick/check_8bitdo.sh index d65b972..5e172db 100644 --- a/modules/SDL2/src/joystick/check_8bitdo.sh +++ b/modules/SDL2/src/joystick/check_8bitdo.sh @@ -10,6 +10,6 @@ cat <<__EOF__ __EOF__ echo "Actual output:" -fgrep 8BitDo SDL_gamecontrollerdb.h | fgrep -v hint -egrep "hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | fgrep -i 8bit | fgrep -v x:b2,y:b3 | fgrep -v x:b3,y:b4 -egrep "hint:.SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | fgrep -i 8bit | fgrep -v x:b3,y:b2 | fgrep -v x:b4,y:b3 +${FGREP:-grep -F} 8BitDo SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -v hint +${EGREP:-grep -E} "hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -i 8bit | ${FGREP:-grep -F} -v x:b2,y:b3 | ${FGREP:-grep -F} -v x:b3,y:b4 +${EGREP:-grep -E} "hint:.SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -i 8bit | ${FGREP:-grep -F} -v x:b3,y:b2 | ${FGREP:-grep -F} -v x:b4,y:b3 diff --git a/modules/SDL2/src/joystick/controller_list.h b/modules/SDL2/src/joystick/controller_list.h new file mode 100644 index 0000000..c7871c2 --- /dev/null +++ b/modules/SDL2/src/joystick/controller_list.h @@ -0,0 +1,591 @@ +/* + Copyright (C) Valve Corporation + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID ) + +static const ControllerDescription_t arrControllers[] = { + { MAKE_CONTROLLER_ID( 0x0079, 0x181a ), k_eControllerType_PS3Controller, NULL }, // Venom Arcade Stick + { MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3 + { MAKE_CONTROLLER_ID( 0x044f, 0xd007 ), k_eControllerType_PS3Controller, NULL }, // Thrustmaster wireless 3-1 + //{ MAKE_CONTROLLER_ID( 0x046d, 0xc24f ), k_eControllerType_PS3Controller, NULL }, // Logitech G29 (PS3) + { MAKE_CONTROLLER_ID( 0x054c, 0x0268 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller + { MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x056e, 0x2013 ), k_eControllerType_PS3Controller, NULL }, // JC-U4113SBK + { MAKE_CONTROLLER_ID( 0x05b8, 0x1004 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x05b8, 0x1006 ), k_eControllerType_PS3Controller, NULL }, // JC-U3412SBK + { MAKE_CONTROLLER_ID( 0x06a3, 0xf622 ), k_eControllerType_PS3Controller, NULL }, // Cyborg V3 + { MAKE_CONTROLLER_ID( 0x0738, 0x3180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS3 mode + { MAKE_CONTROLLER_ID( 0x0738, 0x3250 ), k_eControllerType_PS3Controller, NULL }, // madcats fightpad pro ps3 + { MAKE_CONTROLLER_ID( 0x0738, 0x3481 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz FightStick TE 2+ PS3 + { MAKE_CONTROLLER_ID( 0x0738, 0x8180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS4 mode (no touchpad on device) + { MAKE_CONTROLLER_ID( 0x0738, 0x8838 ), k_eControllerType_PS3Controller, NULL }, // Madcatz Fightstick Pro + { MAKE_CONTROLLER_ID( 0x0810, 0x0001 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later + { MAKE_CONTROLLER_ID( 0x0810, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later + { MAKE_CONTROLLER_ID( 0x0925, 0x0005 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller + { MAKE_CONTROLLER_ID( 0x0925, 0x8866 ), k_eControllerType_PS3Controller, NULL }, // PS2 maybe break out later + { MAKE_CONTROLLER_ID( 0x0925, 0x8888 ), k_eControllerType_PS3Controller, NULL }, // Actually ps2 -maybe break out later Lakeview Research WiseGroup Ltd, MP-8866 Dual Joypad + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0109 ), k_eControllerType_PS3Controller, NULL }, // PDP Versus Fighting Pad + { MAKE_CONTROLLER_ID( 0x0e6f, 0x011e ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS4 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0128 ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS3 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0203 ), k_eControllerType_PS3Controller, NULL }, // Victrix Pro FS (PS4 peripheral but no trackpad/lightbar) + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0214 ), k_eControllerType_PS3Controller, NULL }, // afterglow ps3 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x1314 ), k_eControllerType_PS3Controller, NULL }, // PDP Afterglow Wireless PS3 controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x6302 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x0e8f, 0x0008 ), k_eControllerType_PS3Controller, NULL }, // Green Asia + { MAKE_CONTROLLER_ID( 0x0e8f, 0x3075 ), k_eControllerType_PS3Controller, NULL }, // SpeedLink Strike FX + { MAKE_CONTROLLER_ID( 0x0e8f, 0x310d ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0009 ), k_eControllerType_PS3Controller, NULL }, // HORI BDA GP1 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x004d ), k_eControllerType_PS3Controller, NULL }, // Horipad 3 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x005f ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander 4 PS3 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x006a ), k_eControllerType_PS3Controller, NULL }, // Real Arcade Pro 4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x006e ), k_eControllerType_PS3Controller, NULL }, // HORI horipad4 ps3 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0085 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PS3 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0086 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PC (Uses the Xbox 360 protocol, but has PS3 buttons) + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0088 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Stick mini 4 + { MAKE_CONTROLLER_ID( 0x0f30, 0x1100 ), k_eControllerType_PS3Controller, NULL }, // Qanba Q1 fight stick + { MAKE_CONTROLLER_ID( 0x11ff, 0x3331 ), k_eControllerType_PS3Controller, NULL }, // SRXJ-PH2400 + { MAKE_CONTROLLER_ID( 0x1345, 0x1000 ), k_eControllerType_PS3Controller, NULL }, // PS2 ACME GA-D5 + { MAKE_CONTROLLER_ID( 0x1345, 0x6005 ), k_eControllerType_PS3Controller, NULL }, // ps2 maybe break out later + { MAKE_CONTROLLER_ID( 0x146b, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x1a34, 0x0836 ), k_eControllerType_PS3Controller, NULL }, // Afterglow PS3 + { MAKE_CONTROLLER_ID( 0x20bc, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // ShanWan PS3 + { MAKE_CONTROLLER_ID( 0x20d6, 0x576d ), k_eControllerType_PS3Controller, NULL }, // Power A PS3 + { MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x2563, 0x0523 ), k_eControllerType_PS3Controller, NULL }, // Digiflip GP006 + { MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x25f0, 0x83c3 ), k_eControllerType_PS3Controller, NULL }, // gioteck vx2 + { MAKE_CONTROLLER_ID( 0x25f0, 0xc121 ), k_eControllerType_PS3Controller, NULL }, // + { MAKE_CONTROLLER_ID( 0x2c22, 0x2003 ), k_eControllerType_PS3Controller, NULL }, // Qanba Drone + { MAKE_CONTROLLER_ID( 0x2c22, 0x2302 ), k_eControllerType_PS3Controller, NULL }, // Qanba Obsidian + { MAKE_CONTROLLER_ID( 0x2c22, 0x2502 ), k_eControllerType_PS3Controller, NULL }, // Qanba Dragon + { MAKE_CONTROLLER_ID( 0x8380, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // BTP 2163 + { MAKE_CONTROLLER_ID( 0x8888, 0x0308 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller + + { MAKE_CONTROLLER_ID( 0x0079, 0x181b ), k_eControllerType_PS4Controller, NULL }, // Venom Arcade Stick - XXX:this may not work and may need to be called a ps3 controller + //{ MAKE_CONTROLLER_ID( 0x046d, 0xc260 ), k_eControllerType_PS4Controller, NULL }, // Logitech G29 (PS4) + { MAKE_CONTROLLER_ID( 0x044f, 0xd00e ), k_eControllerType_PS4Controller, NULL }, // Thrustmaster Eswap Pro - No gyro and lightbar doesn't change color. Works otherwise + { MAKE_CONTROLLER_ID( 0x054c, 0x05c4 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller + { MAKE_CONTROLLER_ID( 0x054c, 0x05c5 ), k_eControllerType_PS4Controller, NULL }, // STRIKEPAD PS4 Grip Add-on + { MAKE_CONTROLLER_ID( 0x054c, 0x09cc ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Slim Controller + { MAKE_CONTROLLER_ID( 0x054c, 0x0ba0 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller (Wireless dongle) + { MAKE_CONTROLLER_ID( 0x0738, 0x8250 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightPad Pro PS4 + { MAKE_CONTROLLER_ID( 0x0738, 0x8384 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE S+ PS4 + { MAKE_CONTROLLER_ID( 0x0738, 0x8480 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2 PS4 + { MAKE_CONTROLLER_ID( 0x0738, 0x8481 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2+ PS4 + { MAKE_CONTROLLER_ID( 0x0c12, 0x0e10 ), k_eControllerType_PS4Controller, NULL }, // Armor Armor 3 Pad PS4 + { MAKE_CONTROLLER_ID( 0x0c12, 0x0e13 ), k_eControllerType_PS4Controller, NULL }, // ZEROPLUS P4 Wired Gamepad + { MAKE_CONTROLLER_ID( 0x0c12, 0x0e15 ), k_eControllerType_PS4Controller, NULL }, // Game:Pad 4 + { MAKE_CONTROLLER_ID( 0x0c12, 0x0e20 ), k_eControllerType_PS4Controller, NULL }, // Brook Mars Controller - needs FW update to show up as Ps4 controller on PC. Has Gyro but touchpad is a single button. + { MAKE_CONTROLLER_ID( 0x0c12, 0x0ef6 ), k_eControllerType_PS4Controller, NULL }, // Hitbox Arcade Stick + { MAKE_CONTROLLER_ID( 0x0c12, 0x1cf6 ), k_eControllerType_PS4Controller, NULL }, // EMIO PS4 Elite Controller + { MAKE_CONTROLLER_ID( 0x0c12, 0x1e10 ), k_eControllerType_PS4Controller, NULL }, // P4 Wired Gamepad generic knock off - lightbar but not trackpad or gyro + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0207 ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro Fightstick w/ Touchpad for PS4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0055 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS + { MAKE_CONTROLLER_ID( 0x0f0d, 0x005e ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander 4 PS4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0066 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS Plus + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0084 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander PS4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0087 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Stick mini 4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x008a ), k_eControllerType_PS4Controller, NULL }, // HORI Real Arcade Pro 4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x009c ), k_eControllerType_PS4Controller, NULL }, // HORI TAC PRO mousething + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00a0 ), k_eControllerType_PS4Controller, NULL }, // HORI TAC4 mousething + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ed ), k_eControllerType_XInputPS4Controller, NULL }, // Hori Fighting Stick mini 4 kai - becomes an Xbox 360 controller on PC + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ee ), k_eControllerType_PS4Controller, NULL }, // Hori mini wired https://www.playstation.com/en-us/explore/accessories/gaming-controllers/mini-wired-gamepad/ + { MAKE_CONTROLLER_ID( 0x0f0d, 0x011c ), k_eControllerType_PS4Controller, NULL }, // Hori Fighting Stick α + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0123 ), k_eControllerType_PS4Controller, NULL }, // HORI Wireless Controller Light (Japan only) - only over bt- over usb is xbox and pid 0x0124 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0162 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander OCTA + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0164 ), k_eControllerType_XInputPS4Controller, NULL }, // HORI Fighting Commander OCTA + { MAKE_CONTROLLER_ID( 0x11c0, 0x4001 ), k_eControllerType_PS4Controller, NULL }, // "PS4 Fun Controller" added from user log + { MAKE_CONTROLLER_ID( 0x146b, 0x0603 ), k_eControllerType_XInputPS4Controller, NULL }, // Nacon PS4 Compact Controller + { MAKE_CONTROLLER_ID( 0x146b, 0x0604 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON Daija Arcade Stick + { MAKE_CONTROLLER_ID( 0x146b, 0x0605 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON PS4 controller in Xbox mode - might also be other bigben brand xbox controllers + { MAKE_CONTROLLER_ID( 0x146b, 0x0606 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON Unknown Controller + { MAKE_CONTROLLER_ID( 0x146b, 0x0609 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON Wireless Controller for PS4 + { MAKE_CONTROLLER_ID( 0x146b, 0x0d01 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller - has gyro + { MAKE_CONTROLLER_ID( 0x146b, 0x0d02 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller v2 - has gyro + { MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid + { MAKE_CONTROLLER_ID( 0x146b, 0x0d08 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited Wireless Dongle + { MAKE_CONTROLLER_ID( 0x146b, 0x0d09 ), k_eControllerType_PS4Controller, NULL }, // NACON Daija Fight Stick - touchpad but no gyro/rumble + { MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Infinite - has gyro + { MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited + { MAKE_CONTROLLER_ID( 0x146b, 0x0d13 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Pro Controller 3 + { MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller -- on windows this doesn't enumerate + { MAKE_CONTROLLER_ID( 0x1532, 0X0401 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera PS4 Controller + { MAKE_CONTROLLER_ID( 0x1532, 0x1000 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju PS4 Controller + { MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate USB + { MAKE_CONTROLLER_ID( 0x1532, 0x1007 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition USB + { MAKE_CONTROLLER_ID( 0x1532, 0x1008 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera Evo Fightstick + { MAKE_CONTROLLER_ID( 0x1532, 0x1009 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate BT + { MAKE_CONTROLLER_ID( 0x1532, 0x100A ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition BT + { MAKE_CONTROLLER_ID( 0x1532, 0x1100 ), k_eControllerType_PS4Controller, NULL }, // Razer RAION Fightpad - Trackpad, no gyro, lightbar hardcoded to green + { MAKE_CONTROLLER_ID( 0x20d6, 0x792a ), k_eControllerType_PS4Controller, NULL }, // PowerA Fusion Fight Pad + { MAKE_CONTROLLER_ID( 0x2c22, 0x2000 ), k_eControllerType_PS4Controller, NULL }, // Qanba Drone + { MAKE_CONTROLLER_ID( 0x2c22, 0x2300 ), k_eControllerType_PS4Controller, NULL }, // Qanba Obsidian + { MAKE_CONTROLLER_ID( 0x2c22, 0x2303 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Obsidian Arcade Joystick + { MAKE_CONTROLLER_ID( 0x2c22, 0x2500 ), k_eControllerType_PS4Controller, NULL }, // Qanba Dragon + { MAKE_CONTROLLER_ID( 0x2c22, 0x2503 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Dragon Arcade Joystick + { MAKE_CONTROLLER_ID( 0x7545, 0x0104 ), k_eControllerType_PS4Controller, NULL }, // Armor 3 or Level Up Cobra - At least one variant has gyro + { MAKE_CONTROLLER_ID (0x9886, 0x0024 ), k_eControllerType_XInputPS4Controller, NULL }, // Astro C40 in Xbox 360 mode + { MAKE_CONTROLLER_ID( 0x9886, 0x0025 ), k_eControllerType_PS4Controller, NULL }, // Astro C40 + // Removing the Giotek because there were a bunch of help tickets from users w/ issues including from non-PS4 controller users. This VID/PID is probably used in different FW's +// { MAKE_CONTROLLER_ID( 0x7545, 0x1122 ), k_eControllerType_PS4Controller, NULL }, // Giotek VX4 - trackpad/gyro don't work. Had to not filter on interface info. Light bar is flaky, but works. + + { MAKE_CONTROLLER_ID( 0x054c, 0x0ce6 ), k_eControllerType_PS5Controller, NULL }, // Sony DualSense Controller + { MAKE_CONTROLLER_ID( 0x054c, 0x0df2 ), k_eControllerType_PS5Controller, NULL }, // Sony DualSense Edge Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0163 ), k_eControllerType_PS5Controller, NULL }, // HORI Fighting Commander OCTA + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0184 ), k_eControllerType_PS5Controller, NULL }, // Hori Fighting Stick α + { MAKE_CONTROLLER_ID( 0x1532, 0x100b ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wired) + { MAKE_CONTROLLER_ID( 0x1532, 0x100c ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wireless) + { MAKE_CONTROLLER_ID( 0x358a, 0x0104 ), k_eControllerType_PS5Controller, NULL }, // Backbone One PlayStation Edition for iOS + + { MAKE_CONTROLLER_ID( 0x0079, 0x0006 ), k_eControllerType_UnknownNonSteamController, NULL }, // DragonRise Generic USB PCB, sometimes configured as a PC Twin Shock Controller - looks like a DS3 but the face buttons are 1-4 instead of symbols + + { MAKE_CONTROLLER_ID( 0x0079, 0x18d4 ), k_eControllerType_XBox360Controller, NULL }, // GPD Win 2 X-Box Controller + { MAKE_CONTROLLER_ID( 0x03eb, 0xff02 ), k_eControllerType_XBox360Controller, NULL }, // Wooting Two + { MAKE_CONTROLLER_ID( 0x044f, 0xb326 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Gamepad GP XID + { MAKE_CONTROLLER_ID( 0x045e, 0x028e ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad + { MAKE_CONTROLLER_ID( 0x045e, 0x028f ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad v2 + { MAKE_CONTROLLER_ID( 0x045e, 0x0291 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (XBOX) + { MAKE_CONTROLLER_ID( 0x045e, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Big Button IR + { MAKE_CONTROLLER_ID( 0x045e, 0x02a1 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Wireless Controller with XUSB driver on Windows + { MAKE_CONTROLLER_ID( 0x045e, 0x02a9 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (third party knockoff) + { MAKE_CONTROLLER_ID( 0x045e, 0x0719 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver + { MAKE_CONTROLLER_ID( 0x046d, 0xc21d ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F310 + { MAKE_CONTROLLER_ID( 0x046d, 0xc21e ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F510 + { MAKE_CONTROLLER_ID( 0x046d, 0xc21f ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F710 + { MAKE_CONTROLLER_ID( 0x046d, 0xc242 ), k_eControllerType_XBox360Controller, NULL }, // Logitech Chillstream Controller + { MAKE_CONTROLLER_ID( 0x056e, 0x2004 ), k_eControllerType_XBox360Controller, NULL }, // Elecom JC-U3613M +// This isn't actually an Xbox 360 controller, it just looks like one +// { MAKE_CONTROLLER_ID( 0x06a3, 0xf51a ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3600 + { MAKE_CONTROLLER_ID( 0x0738, 0x4716 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller + { MAKE_CONTROLLER_ID( 0x0738, 0x4718 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightStick SE + { MAKE_CONTROLLER_ID( 0x0738, 0x4726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller + { MAKE_CONTROLLER_ID( 0x0738, 0x4728 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightPad + { MAKE_CONTROLLER_ID( 0x0738, 0x4736 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon Gamepad + { MAKE_CONTROLLER_ID( 0x0738, 0x4738 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller (SFIV) + { MAKE_CONTROLLER_ID( 0x0738, 0x4740 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Beat Pad + { MAKE_CONTROLLER_ID( 0x0738, 0xb726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox controller - MW2 + { MAKE_CONTROLLER_ID( 0x0738, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz JOYTECH NEO SE Advanced GamePad + { MAKE_CONTROLLER_ID( 0x0738, 0xcb02 ), k_eControllerType_XBox360Controller, NULL }, // Saitek Cyborg Rumble Pad - PC/Xbox 360 + { MAKE_CONTROLLER_ID( 0x0738, 0xcb03 ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3200 Rumble Pad - PC/Xbox 360 + { MAKE_CONTROLLER_ID( 0x0738, 0xf738 ), k_eControllerType_XBox360Controller, NULL }, // Super SFIV FightStick TE S + { MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller, NULL }, // Nvidia Shield local controller + { MAKE_CONTROLLER_ID( 0x0955, 0xb400 ), k_eControllerType_XBox360Controller, NULL }, // NVIDIA Shield streaming controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0105 ), k_eControllerType_XBox360Controller, NULL }, // HSM3 Xbox360 dancepad + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0113 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x011f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0125 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightStick" }, // PDP INJUSTICE FightStick for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0127 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightPad" }, // PDP INJUSTICE FightPad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0131 ), k_eControllerType_XBox360Controller, "PDP EA Soccer Controller" }, // PDP EA Soccer Gamepad + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0133 ), k_eControllerType_XBox360Controller, "PDP Battlefield 4 Controller" }, // PDP Battlefield 4 Gamepad + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0143 ), k_eControllerType_XBox360Controller, "PDP MK X Fight Stick" }, // PDP MK X Fight Stick for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0147 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Marvel Controller" }, // PDP Marvel Controller for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0201 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0213 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x021f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0301 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0313 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0314 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0401 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0413 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted) + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0501 ), k_eControllerType_XBox360Controller, NULL }, // PDP Xbox 360 Controller (unlisted) + { MAKE_CONTROLLER_ID( 0x0e6f, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted) + { MAKE_CONTROLLER_ID( 0x0f0d, 0x000a ), k_eControllerType_XBox360Controller, NULL }, // Hori Co. DOA4 FightStick + { MAKE_CONTROLLER_ID( 0x0f0d, 0x000c ), k_eControllerType_XBox360Controller, NULL }, // Hori PadEX Turbo + { MAKE_CONTROLLER_ID( 0x0f0d, 0x000d ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0016 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX + { MAKE_CONTROLLER_ID( 0x0f0d, 0x001b ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX + { MAKE_CONTROLLER_ID( 0x0f0d, 0x008c ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro 4 + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00db ), k_eControllerType_XBox360Controller, "HORI Slime Controller" }, // Hori Dragon Quest Slime Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x011e ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick α + { MAKE_CONTROLLER_ID( 0x1038, 0x1430 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo + { MAKE_CONTROLLER_ID( 0x1038, 0x1431 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo + { MAKE_CONTROLLER_ID( 0x1038, 0xb360 ), k_eControllerType_XBox360Controller, NULL }, // SteelSeries Nimbus/Stratus XL + { MAKE_CONTROLLER_ID( 0x11c9, 0x55f0 ), k_eControllerType_XBox360Controller, NULL }, // Nacon GC-100XF + { MAKE_CONTROLLER_ID( 0x12ab, 0x0004 ), k_eControllerType_XBox360Controller, NULL }, // Honey Bee Xbox360 dancepad + { MAKE_CONTROLLER_ID( 0x12ab, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // PDP AFTERGLOW AX.1 + { MAKE_CONTROLLER_ID( 0x12ab, 0x0303 ), k_eControllerType_XBox360Controller, NULL }, // Mortal Kombat Klassic FightStick + { MAKE_CONTROLLER_ID( 0x1430, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller Adapter + { MAKE_CONTROLLER_ID( 0x1430, 0x4748 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Guitar Hero X-plorer + { MAKE_CONTROLLER_ID( 0x1430, 0xf801 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller + { MAKE_CONTROLLER_ID( 0x146b, 0x0601 ), k_eControllerType_XBox360Controller, NULL }, // BigBen Interactive XBOX 360 Controller +// { MAKE_CONTROLLER_ID( 0x1532, 0x0037 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth + { MAKE_CONTROLLER_ID( 0x15e4, 0x3f00 ), k_eControllerType_XBox360Controller, NULL }, // Power A Mini Pro Elite + { MAKE_CONTROLLER_ID( 0x15e4, 0x3f0a ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller + { MAKE_CONTROLLER_ID( 0x15e4, 0x3f10 ), k_eControllerType_XBox360Controller, NULL }, // Batarang Xbox 360 controller + { MAKE_CONTROLLER_ID( 0x162e, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Joytech Neo-Se Take2 + { MAKE_CONTROLLER_ID( 0x1689, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Tournament Edition + { MAKE_CONTROLLER_ID( 0x1689, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Classic Edition + { MAKE_CONTROLLER_ID( 0x1689, 0xfe00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth + { MAKE_CONTROLLER_ID( 0x1949, 0x041a ), k_eControllerType_XBox360Controller, "Amazon Luna Controller" }, // Amazon Luna Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Guitar + { MAKE_CONTROLLER_ID( 0x1bad, 0x0003 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Drumkit + { MAKE_CONTROLLER_ID( 0x1bad, 0xf016 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0xf018 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV SE Fighting Stick + { MAKE_CONTROLLER_ID( 0x1bad, 0xf019 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Brawlstick for Xbox 360 + { MAKE_CONTROLLER_ID( 0x1bad, 0xf021 ), k_eControllerType_XBox360Controller, NULL }, // Mad Cats Ghost Recon FS GamePad + { MAKE_CONTROLLER_ID( 0x1bad, 0xf023 ), k_eControllerType_XBox360Controller, NULL }, // MLG Pro Circuit Controller (Xbox) + { MAKE_CONTROLLER_ID( 0x1bad, 0xf025 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Call Of Duty + { MAKE_CONTROLLER_ID( 0x1bad, 0xf027 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FPS Pro + { MAKE_CONTROLLER_ID( 0x1bad, 0xf028 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightPad + { MAKE_CONTROLLER_ID( 0x1bad, 0xf02e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Fightpad + { MAKE_CONTROLLER_ID( 0x1bad, 0xf036 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon GamePad Pro + { MAKE_CONTROLLER_ID( 0x1bad, 0xf038 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightStick TE + { MAKE_CONTROLLER_ID( 0x1bad, 0xf039 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MvC2 TE + { MAKE_CONTROLLER_ID( 0x1bad, 0xf03a ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz SFxT Fightstick Pro + { MAKE_CONTROLLER_ID( 0x1bad, 0xf03d ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV Arcade Stick TE - Chun Li + { MAKE_CONTROLLER_ID( 0x1bad, 0xf03e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MLG FightStick TE + { MAKE_CONTROLLER_ID( 0x1bad, 0xf03f ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick SoulCaliber + { MAKE_CONTROLLER_ID( 0x1bad, 0xf042 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TES+ + { MAKE_CONTROLLER_ID( 0x1bad, 0xf080 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TE2 + { MAKE_CONTROLLER_ID( 0x1bad, 0xf501 ), k_eControllerType_XBox360Controller, NULL }, // HoriPad EX2 Turbo + { MAKE_CONTROLLER_ID( 0x1bad, 0xf502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.VX SA + { MAKE_CONTROLLER_ID( 0x1bad, 0xf503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX + { MAKE_CONTROLLER_ID( 0x1bad, 0xf504 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro. EX + { MAKE_CONTROLLER_ID( 0x1bad, 0xf505 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2B + { MAKE_CONTROLLER_ID( 0x1bad, 0xf506 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX Premium VLX + { MAKE_CONTROLLER_ID( 0x1bad, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Xbox 360 Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0xf901 ), k_eControllerType_XBox360Controller, NULL }, // Gamestop Xbox 360 Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0xf902 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Gamepad2 + { MAKE_CONTROLLER_ID( 0x1bad, 0xf903 ), k_eControllerType_XBox360Controller, NULL }, // Tron Xbox 360 controller + { MAKE_CONTROLLER_ID( 0x1bad, 0xf904 ), k_eControllerType_XBox360Controller, NULL }, // PDP Versus Fighting Pad + { MAKE_CONTROLLER_ID( 0x1bad, 0xf906 ), k_eControllerType_XBox360Controller, NULL }, // MortalKombat FightStick + { MAKE_CONTROLLER_ID( 0x1bad, 0xfa01 ), k_eControllerType_XBox360Controller, NULL }, // MadCatz GamePad + { MAKE_CONTROLLER_ID( 0x1bad, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza TE + { MAKE_CONTROLLER_ID( 0x1bad, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza + { MAKE_CONTROLLER_ID( 0x24c6, 0x5000 ), k_eControllerType_XBox360Controller, NULL }, // Razer Atrox Arcade Stick + { MAKE_CONTROLLER_ID( 0x24c6, 0x5300 ), k_eControllerType_XBox360Controller, NULL }, // PowerA MINI PROEX Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x5303 ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x530a ), k_eControllerType_XBox360Controller, NULL }, // Xbox 360 Pro EX Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x531a ), k_eControllerType_XBox360Controller, NULL }, // PowerA Pro Ex + { MAKE_CONTROLLER_ID( 0x24c6, 0x5397 ), k_eControllerType_XBox360Controller, NULL }, // FUS1ON Tournament Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x5500 ), k_eControllerType_XBox360Controller, NULL }, // Hori XBOX 360 EX 2 with Turbo + { MAKE_CONTROLLER_ID( 0x24c6, 0x5501 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX-SA + { MAKE_CONTROLLER_ID( 0x24c6, 0x5502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX Alt + { MAKE_CONTROLLER_ID( 0x24c6, 0x5503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Edge + { MAKE_CONTROLLER_ID( 0x24c6, 0x5506 ), k_eControllerType_XBox360Controller, NULL }, // Hori SOULCALIBUR V Stick + { MAKE_CONTROLLER_ID( 0x24c6, 0x550d ), k_eControllerType_XBox360Controller, NULL }, // Hori GEM Xbox controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x550e ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro V Kai 360 + { MAKE_CONTROLLER_ID( 0x24c6, 0x5508 ), k_eControllerType_XBox360Controller, NULL }, // Hori PAD A + { MAKE_CONTROLLER_ID( 0x24c6, 0x5510 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Commander ONE + { MAKE_CONTROLLER_ID( 0x24c6, 0x5b00 ), k_eControllerType_XBox360Controller, NULL }, // ThrustMaster Ferrari Italia 458 Racing Wheel + { MAKE_CONTROLLER_ID( 0x24c6, 0x5b02 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster, Inc. GPX Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x5b03 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Ferrari 458 Racing Wheel + { MAKE_CONTROLLER_ID( 0x24c6, 0x5d04 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth + { MAKE_CONTROLLER_ID( 0x24c6, 0xfafa ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0xfafb ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 1 + { MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 3 + { MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller, NULL }, // Rock Candy Gamepad for Xbox 360 + + { MAKE_CONTROLLER_ID( 0x044f, 0xd012 ), k_eControllerType_XBoxOneController, NULL }, // ThrustMaster eSwap PRO Controller Xbox + { MAKE_CONTROLLER_ID( 0x045e, 0x02d1 ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad + { MAKE_CONTROLLER_ID( 0x045e, 0x02dd ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad (Firmware 2015) + { MAKE_CONTROLLER_ID( 0x045e, 0x02e0 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth) + { MAKE_CONTROLLER_ID( 0x045e, 0x02e3 ), k_eControllerType_XBoxOneController, "Xbox One Elite Controller" }, // Microsoft X-Box One Elite pad + { MAKE_CONTROLLER_ID( 0x045e, 0x02ea ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad + { MAKE_CONTROLLER_ID( 0x045e, 0x02fd ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth) + { MAKE_CONTROLLER_ID( 0x045e, 0x02ff ), k_eControllerType_XBoxOneController, NULL }, // Microsoft X-Box One controller with XBOXGIP driver on Windows + { MAKE_CONTROLLER_ID( 0x045e, 0x0b00 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad +// { MAKE_CONTROLLER_ID( 0x045e, 0x0b02 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // The virtual keyboard generated by XboxGip drivers for Xbox One Controllers (see https://github.com/libsdl-org/SDL/pull/5121 for details) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b05 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (Bluetooth) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b0a ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad + { MAKE_CONTROLLER_ID( 0x045e, 0x0b0c ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (Bluetooth) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b12 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad + { MAKE_CONTROLLER_ID( 0x045e, 0x0b13 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad (BLE) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b20 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (BLE) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b21 ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (BLE) + { MAKE_CONTROLLER_ID( 0x045e, 0x0b22 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (BLE) + { MAKE_CONTROLLER_ID( 0x0738, 0x4a01 ), k_eControllerType_XBoxOneController, NULL }, // Mad Catz FightStick TE 2 + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0139 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x013B ), k_eControllerType_XBoxOneController, "PDP Xbox One Face-Off Controller" }, // PDP Face-Off Gamepad for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x013a ), k_eControllerType_XBoxOneController, NULL }, // PDP Xbox One Controller (unlisted) + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0145 ), k_eControllerType_XBoxOneController, "PDP MK X Fight Pad" }, // PDP MK X Fight Pad for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0146 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x015b ), k_eControllerType_XBoxOneController, "PDP Fallout 4 Vault Boy Controller" }, // PDP Fallout 4 Vault Boy Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x015c ), k_eControllerType_XBoxOneController, "PDP Xbox One @Play Controller" }, // PDP @Play Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x015d ), k_eControllerType_XBoxOneController, "PDP Mirror's Edge Controller" }, // PDP Mirror's Edge Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x015f ), k_eControllerType_XBoxOneController, "PDP Metallic Controller" }, // PDP Metallic Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0160 ), k_eControllerType_XBoxOneController, "PDP NFL Face-Off Controller" }, // PDP NFL Official Face-Off Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0161 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0162 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0163 ), k_eControllerType_XBoxOneController, "PDP Deliverer of Truth" }, // PDP Legendary Collection: Deliverer of Truth + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0164 ), k_eControllerType_XBoxOneController, "PDP Battlefield 1 Controller" }, // PDP Battlefield 1 Official Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0165 ), k_eControllerType_XBoxOneController, "PDP Titanfall 2 Controller" }, // PDP Titanfall 2 Official Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0166 ), k_eControllerType_XBoxOneController, "PDP Mass Effect: Andromeda Controller" }, // PDP Mass Effect: Andromeda Official Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0167 ), k_eControllerType_XBoxOneController, "PDP Halo Wars 2 Face-Off Controller" }, // PDP Halo Wars 2 Official Face-Off Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0205 ), k_eControllerType_XBoxOneController, "PDP Victrix Pro Fight Stick" }, // PDP Victrix Pro Fight Stick + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0206 ), k_eControllerType_XBoxOneController, "PDP Mortal Kombat Controller" }, // PDP Mortal Kombat 25 Anniversary Edition Stick (Xbox One) + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0246 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0261 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0262 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a8 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02aa ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ab ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ac ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Wired Controller for Xbox One - Ember Orange + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ad ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ae ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02af ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Prismatic Wired Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b5 ), k_eControllerType_XBoxOneController, "PDP Xbox One GAMEware Controller" }, // PDP GAMEware Wired Controller Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b6 ), k_eControllerType_XBoxOneController, NULL }, // PDP One-Handed Joystick Adaptive Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02bd ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Wired Controller for Xbox One - Royal Purple + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02be ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Deluxe Wired Controller for Xbox One - Raven Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02bf ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Deluxe Wired Controller for Xbox One - Midnight Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantom Black + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Ghost White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Revenant Blue + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Deluxe Wired Controller for Xbox One - Verdant Green + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Deluxe Wired Controller for Xbox One - Ember Orange + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Deluxe Wired Controller for Xbox One - Royal Purple + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Deluxe Wired Controller for Xbox One - Crimson Red + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Deluxe Wired Controller for Xbox One - Arctic White + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c8 ), k_eControllerType_XBoxOneController, "PDP Kingdom Hearts Controller" }, // PDP Kingdom Hearts Wired Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantasm Red" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantasm Red + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ca ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Specter Violet + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cb ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Wired Controller for Xbox One - Stealth Series | Specter Violet + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cd ), k_eControllerType_XBoxOneController, "PDP Xbox One Blu-merang" }, // PDP Rock Candy Wired Controller for Xbox One - Blu-merang + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ce ), k_eControllerType_XBoxOneController, "PDP Xbox One Cranblast" }, // PDP Rock Candy Wired Controller for Xbox One - Cranblast + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cf ), k_eControllerType_XBoxOneController, "PDP Xbox One Aqualime" }, // PDP Rock Candy Wired Controller for Xbox One - Aqualime + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Red Camo" }, // PDP Wired Controller for Xbox One - Red Camo + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0346 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0446 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02da ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Afterglow" }, // PDP Xbox Series X Afterglow + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d6 ), k_eControllerType_XBoxOneController, "Victrix Gambit Tournament Controller" }, // Victrix Gambit Tournament Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d9 ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Midnight Blue" }, // PDP Xbox Series X Midnight Blue + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0063 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro Hayabusa (USA) Xbox One + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0067 ), k_eControllerType_XBoxOneController, NULL }, // HORIPAD ONE + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0078 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro V Kai Xbox One + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00c5 ), k_eControllerType_XBoxOneController, NULL }, // HORI Fighting Commander + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0150 ), k_eControllerType_XBoxOneController, NULL }, // HORI Fighting Commander OCTA for Xbox Series X + { MAKE_CONTROLLER_ID( 0x10f5, 0x7009 ), k_eControllerType_XBoxOneController, NULL }, // Turtle Beach Recon Controller + { MAKE_CONTROLLER_ID( 0x10f5, 0x7013 ), k_eControllerType_XBoxOneController, NULL }, // Turtle Beach REACT-R + { MAKE_CONTROLLER_ID( 0x1532, 0x0a00 ), k_eControllerType_XBoxOneController, NULL }, // Razer Atrox Arcade Stick + { MAKE_CONTROLLER_ID( 0x1532, 0x0a03 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wildcat + { MAKE_CONTROLLER_ID( 0x1532, 0x0a14 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Ultimate + { MAKE_CONTROLLER_ID( 0x1532, 0x0a15 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Tournament Edition + { MAKE_CONTROLLER_ID( 0x20d6, 0x2001 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Black Inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x2002 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Gray/White Inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x2003 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Green Inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x2004 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Pink inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x2005 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - Black + { MAKE_CONTROLLER_ID( 0x20d6, 0x2006 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - White + { MAKE_CONTROLLER_ID( 0x20d6, 0x2009 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Red inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x200a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Blue inline + { MAKE_CONTROLLER_ID( 0x20d6, 0x200b ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Red + { MAKE_CONTROLLER_ID( 0x20d6, 0x200c ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Blue + { MAKE_CONTROLLER_ID( 0x20d6, 0x200d ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Seafoam Fade + { MAKE_CONTROLLER_ID( 0x20d6, 0x200e ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Midnight Blue + { MAKE_CONTROLLER_ID( 0x20d6, 0x200f ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Soldier Green + { MAKE_CONTROLLER_ID( 0x20d6, 0x2011 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired - Metallic Ice + { MAKE_CONTROLLER_ID( 0x20d6, 0x2012 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Cuphead EnWired Controller - Mugman + { MAKE_CONTROLLER_ID( 0x20d6, 0x2015 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Blue Hint + { MAKE_CONTROLLER_ID( 0x20d6, 0x2016 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Green Hint + { MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Cntroller - Arctic Camo + { MAKE_CONTROLLER_ID( 0x20d6, 0x2018 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Arc Lightning + { MAKE_CONTROLLER_ID( 0x20d6, 0x2019 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Royal Purple + { MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Nebula + { MAKE_CONTROLLER_ID( 0x20d6, 0x4001 ), k_eControllerType_XBoxOneController, "PowerA Fusion Pro 2 Controller" }, // PowerA Fusion Pro 2 Wired Controller (Xbox Series X style) + { MAKE_CONTROLLER_ID( 0x20d6, 0x4002 ), k_eControllerType_XBoxOneController, "PowerA Spectra Infinity Controller" }, // PowerA Spectra Infinity Wired Controller (Xbox Series X style) + { MAKE_CONTROLLER_ID( 0x24c6, 0x541a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Xbox One Mini Wired Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x542a ), k_eControllerType_XBoxOneController, NULL }, // Xbox ONE spectra + { MAKE_CONTROLLER_ID( 0x24c6, 0x543a ), k_eControllerType_XBoxOneController, "PowerA Xbox One Controller" }, // PowerA Xbox ONE liquid metal controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x551a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x561a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x591a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x592a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Spectra Pro + { MAKE_CONTROLLER_ID( 0x24c6, 0x791a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Fusion Fight Pad + { MAKE_CONTROLLER_ID( 0x2dc8, 0x2002 ), k_eControllerType_XBoxOneController, NULL }, // 8BitDo Ultimate Wired Controller for Xbox + { MAKE_CONTROLLER_ID( 0x2e24, 0x0652 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke + { MAKE_CONTROLLER_ID( 0x2e24, 0x1618 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke + { MAKE_CONTROLLER_ID( 0x2e24, 0x1688 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin X91 + { MAKE_CONTROLLER_ID( 0x146b, 0x0611 ), k_eControllerType_XBoxOneController, NULL }, // Xbox Controller Mode for NACON Revolution 3 + + // These have been added via Minidump for unrecognized Xinput controller assert + { MAKE_CONTROLLER_ID( 0x0000, 0x0000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x045e, 0x02a2 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - Microsoft VID + { MAKE_CONTROLLER_ID( 0x0e6f, 0x1414 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0159 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0xfaff ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x006d ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00a4 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x1832 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x187f ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x1883 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x03eb, 0xff01 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0c12, 0x0ef8 ), k_eControllerType_XBox360Controller, NULL }, // Homemade fightstick based on brook pcb (with XInput driver??) + { MAKE_CONTROLLER_ID( 0x046d, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1345, 0x6006 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + + { MAKE_CONTROLLER_ID( 0x056e, 0x2012 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x146b, 0x0602 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ae ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x046d, 0x0401 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput + { MAKE_CONTROLLER_ID( 0x046d, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput + { MAKE_CONTROLLER_ID( 0x046d, 0xcaa3 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput + { MAKE_CONTROLLER_ID( 0x046d, 0xc261 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput + { MAKE_CONTROLLER_ID( 0x046d, 0x0291 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput + { MAKE_CONTROLLER_ID( 0x0079, 0x18d3 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00b1 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0001, 0x0001 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x188e ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x187c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x189c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x0079, 0x1874 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller + + { MAKE_CONTROLLER_ID( 0x2f24, 0x0050 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0x2e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0x91 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1430, 0x719 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xf0d, 0xed ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xf0d, 0xc0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x152 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2a7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x46d, 0x1007 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2b8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2a8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x79, 0x18a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + + /* Added from Minidumps 10-9-19 */ + { MAKE_CONTROLLER_ID( 0x0, 0x6686 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x11ff, 0x511 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x12ab, 0x304 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1430, 0x291 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1430, 0x2a9 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1430, 0x70b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0x28e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x1bad, 0x5500 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x20ab, 0x55ef ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x24c6, 0x5509 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2516, 0x69 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x25b1, 0x360 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2c22, 0x2203 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0x11 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0x53 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0xb7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x46d, 0x0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x46d, 0x1004 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x46d, 0x1008 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x46d, 0xf301 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x738, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x738, 0x7263 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x738, 0xb738 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x738, 0xcb29 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x738, 0xf401 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x79, 0x18c2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x79, 0x18c8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x79, 0x18cf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xc12, 0xe17 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xc12, 0xe1c ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xc12, 0xe22 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xc12, 0xe30 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xd2d2, 0xd2d2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xd62, 0x9a1a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xd62, 0x9a1b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe00, 0xe00 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x12a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2a2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2a5 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2b2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2bd ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2bf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2c0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0x2c6 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xf0d, 0x97 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xf0d, 0xba ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xf0d, 0xd8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xfff, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x45e, 0x867 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + // Added 12-17-2020 + { MAKE_CONTROLLER_ID( 0x16d0, 0xf3f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0x2f24, 0x8f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + { MAKE_CONTROLLER_ID( 0xe6f, 0xf501 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller + + //{ MAKE_CONTROLLER_ID( 0x1949, 0x0402 ), /*android*/, NULL }, // Unknown Controller + + { MAKE_CONTROLLER_ID( 0x05ac, 0x0001 ), k_eControllerType_AppleController, NULL }, // MFI Extended Gamepad (generic entry for iOS/tvOS) + { MAKE_CONTROLLER_ID( 0x05ac, 0x0002 ), k_eControllerType_AppleController, NULL }, // MFI Standard Gamepad (generic entry for iOS/tvOS) + + { MAKE_CONTROLLER_ID( 0x057e, 0x2006 ), k_eControllerType_SwitchJoyConLeft, NULL }, // Nintendo Switch Joy-Con (Left) + { MAKE_CONTROLLER_ID( 0x057e, 0x2007 ), k_eControllerType_SwitchJoyConRight, NULL }, // Nintendo Switch Joy-Con (Right) + { MAKE_CONTROLLER_ID( 0x057e, 0x2008 ), k_eControllerType_SwitchJoyConPair, NULL }, // Nintendo Switch Joy-Con (Left+Right Combined) + + // This same controller ID is spoofed by many 3rd-party Switch controllers. + // The ones we currently know of are: + // * Any 8bitdo controller with Switch support + // * ORTZ Gaming Wireless Pro Controller + // * ZhiXu Gamepad Wireless + // * Sunwaytek Wireless Motion Controller for Nintendo Switch + { MAKE_CONTROLLER_ID( 0x057e, 0x2009 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Switch Pro Controller + //{ MAKE_CONTROLLER_ID( 0x057e, 0x2017 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SNES Controller + //{ MAKE_CONTROLLER_ID( 0x057e, 0x2019 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online N64 Controller + //{ MAKE_CONTROLLER_ID( 0x057e, 0x201e ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SEGA Genesis Controller + + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00c1 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORIPAD for Nintendo Switch + { MAKE_CONTROLLER_ID( 0x0f0d, 0x0092 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Pokken Tournament DX Pro Pad + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00f6 ), k_eControllerType_SwitchProController, NULL }, // HORI Wireless Switch Pad + // The HORIPAD S, which comes in multiple styles: + // - NSW-108, classic GameCube controller + // - NSW-244, Fighting Commander arcade pad + // - NSW-278, Hori Pad Mini gamepad + // - NSW-326, HORIPAD FPS for Nintendo Switch + // + // The first two, at least, shouldn't have their buttons remapped, and since we + // can't tell which model we're actually using, we won't do any button remapping + // for any of them. + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController, NULL }, // HORIPAD S - Looks like a Switch controller but uses the Xbox 360 controller protocol + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0180 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Pro Controller for Nintendo Switch + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0181 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0184 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Deluxe+ Audio Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0185 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Wired Fight Pad Pro for Nintendo Switch + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0186 ), k_eControllerType_SwitchProController, NULL }, // PDP Afterglow Wireless Switch Controller - working gyro. USB is for charging only. Many later "Wireless" line devices w/ gyro also use this vid/pid + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0187 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Rockcandy Wired Controller + { MAKE_CONTROLLER_ID( 0x0e6f, 0x0188 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Afterglow Wired Deluxe+ Audio Controller + { MAKE_CONTROLLER_ID( 0x0f0d, 0x00aa ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Real Arcade Pro V Hayabusa in Switch Mode + { MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Wired Controller Plus/PowerA Wired Controller Nintendo GameCube Style + { MAKE_CONTROLLER_ID( 0x20d6, 0xa712 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Fight Pad + { MAKE_CONTROLLER_ID( 0x20d6, 0xa713 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Super Mario Controller + { MAKE_CONTROLLER_ID( 0x20d6, 0xa714 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Spectra Controller + { MAKE_CONTROLLER_ID( 0x20d6, 0xa715 ), k_eControllerType_SwitchInputOnlyController, NULL }, // Power A Fusion Wireless Arcade Stick (USB Mode) Over BT is shows up as 057e 2009 + { MAKE_CONTROLLER_ID( 0x20d6, 0xa716 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Pro Controller - USB requires toggling switch on back of device + + // Valve products + { MAKE_CONTROLLER_ID( 0x0000, 0x11fb ), k_eControllerType_MobileTouch, NULL }, // Streaming mobile touch virtual controls + { MAKE_CONTROLLER_ID( 0x28de, 0x1101 ), k_eControllerType_SteamController, NULL }, // Valve Legacy Steam Controller (CHELL) + { MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController, NULL }, // Valve wired Steam Controller (D0G) + { MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G) + { MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G) + { MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController, NULL }, // Valve wireless Steam Controller + { MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2, NULL }, // Valve wired Steam Controller (HEADCRAB) + { MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2, NULL }, // Valve Bluetooth Steam Controller (HEADCRAB) +}; diff --git a/modules/SDL2/src/joystick/controller_type.c b/modules/SDL2/src/joystick/controller_type.c index 80ce118..cda3586 100644 --- a/modules/SDL2/src/joystick/controller_type.c +++ b/modules/SDL2/src/joystick/controller_type.c @@ -23,574 +23,9 @@ #include "SDL_gamecontroller.h" #include "controller_type.h" +#include "controller_list.h" -#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID ) - -static const ControllerDescription_t arrControllers[] = { - { MAKE_CONTROLLER_ID( 0x0079, 0x181a ), k_eControllerType_PS3Controller, NULL }, // Venom Arcade Stick - { MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3 - { MAKE_CONTROLLER_ID( 0x044f, 0xd007 ), k_eControllerType_PS3Controller, NULL }, // Thrustmaster wireless 3-1 - //{ MAKE_CONTROLLER_ID( 0x046d, 0xc24f ), k_eControllerType_PS3Controller, NULL }, // Logitech G29 (PS3) - { MAKE_CONTROLLER_ID( 0x054c, 0x0268 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller - { MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x056e, 0x2013 ), k_eControllerType_PS3Controller, NULL }, // JC-U4113SBK - { MAKE_CONTROLLER_ID( 0x05b8, 0x1004 ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x05b8, 0x1006 ), k_eControllerType_PS3Controller, NULL }, // JC-U3412SBK - { MAKE_CONTROLLER_ID( 0x06a3, 0xf622 ), k_eControllerType_PS3Controller, NULL }, // Cyborg V3 - { MAKE_CONTROLLER_ID( 0x0738, 0x3180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS3 mode - { MAKE_CONTROLLER_ID( 0x0738, 0x3250 ), k_eControllerType_PS3Controller, NULL }, // madcats fightpad pro ps3 - { MAKE_CONTROLLER_ID( 0x0738, 0x3481 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz FightStick TE 2+ PS3 - { MAKE_CONTROLLER_ID( 0x0738, 0x8180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS4 mode (no touchpad on device) - { MAKE_CONTROLLER_ID( 0x0738, 0x8838 ), k_eControllerType_PS3Controller, NULL }, // Madcatz Fightstick Pro - { MAKE_CONTROLLER_ID( 0x0810, 0x0001 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later - { MAKE_CONTROLLER_ID( 0x0810, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later - { MAKE_CONTROLLER_ID( 0x0925, 0x0005 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller - { MAKE_CONTROLLER_ID( 0x0925, 0x8866 ), k_eControllerType_PS3Controller, NULL }, // PS2 maybe break out later - { MAKE_CONTROLLER_ID( 0x0925, 0x8888 ), k_eControllerType_PS3Controller, NULL }, // Actually ps2 -maybe break out later Lakeview Research WiseGroup Ltd, MP-8866 Dual Joypad - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0109 ), k_eControllerType_PS3Controller, NULL }, // PDP Versus Fighting Pad - { MAKE_CONTROLLER_ID( 0x0e6f, 0x011e ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS4 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0128 ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS3 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0203 ), k_eControllerType_PS3Controller, NULL }, // Victrix Pro FS (PS4 peripheral but no trackpad/lightbar) - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0214 ), k_eControllerType_PS3Controller, NULL }, // afterglow ps3 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x1314 ), k_eControllerType_PS3Controller, NULL }, // PDP Afterglow Wireless PS3 controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x6302 ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x0e8f, 0x0008 ), k_eControllerType_PS3Controller, NULL }, // Green Asia - { MAKE_CONTROLLER_ID( 0x0e8f, 0x3075 ), k_eControllerType_PS3Controller, NULL }, // SpeedLink Strike FX - { MAKE_CONTROLLER_ID( 0x0e8f, 0x310d ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0009 ), k_eControllerType_PS3Controller, NULL }, // HORI BDA GP1 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x004d ), k_eControllerType_PS3Controller, NULL }, // Horipad 3 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x005f ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander 4 PS3 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x006a ), k_eControllerType_PS3Controller, NULL }, // Real Arcade Pro 4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x006e ), k_eControllerType_PS3Controller, NULL }, // HORI horipad4 ps3 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0085 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PS3 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0086 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PC (Uses the Xbox 360 protocol, but has PS3 buttons) - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0088 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Stick mini 4 - { MAKE_CONTROLLER_ID( 0x0f30, 0x1100 ), k_eControllerType_PS3Controller, NULL }, // Qanba Q1 fight stick - { MAKE_CONTROLLER_ID( 0x11ff, 0x3331 ), k_eControllerType_PS3Controller, NULL }, // SRXJ-PH2400 - { MAKE_CONTROLLER_ID( 0x1345, 0x1000 ), k_eControllerType_PS3Controller, NULL }, // PS2 ACME GA-D5 - { MAKE_CONTROLLER_ID( 0x1345, 0x6005 ), k_eControllerType_PS3Controller, NULL }, // ps2 maybe break out later - { MAKE_CONTROLLER_ID( 0x146b, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x1a34, 0x0836 ), k_eControllerType_PS3Controller, NULL }, // Afterglow PS3 - { MAKE_CONTROLLER_ID( 0x20bc, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // ShanWan PS3 - { MAKE_CONTROLLER_ID( 0x20d6, 0x576d ), k_eControllerType_PS3Controller, NULL }, // Power A PS3 - { MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x2563, 0x0523 ), k_eControllerType_PS3Controller, NULL }, // Digiflip GP006 - { MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, NULL }, // From SDL - { MAKE_CONTROLLER_ID( 0x25f0, 0x83c3 ), k_eControllerType_PS3Controller, NULL }, // gioteck vx2 - { MAKE_CONTROLLER_ID( 0x25f0, 0xc121 ), k_eControllerType_PS3Controller, NULL }, // - { MAKE_CONTROLLER_ID( 0x2c22, 0x2003 ), k_eControllerType_PS3Controller, NULL }, // Qanba Drone - { MAKE_CONTROLLER_ID( 0x2c22, 0x2302 ), k_eControllerType_PS3Controller, NULL }, // Qanba Obsidian - { MAKE_CONTROLLER_ID( 0x2c22, 0x2502 ), k_eControllerType_PS3Controller, NULL }, // Qanba Dragon - { MAKE_CONTROLLER_ID( 0x8380, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // BTP 2163 - { MAKE_CONTROLLER_ID( 0x8888, 0x0308 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller - - { MAKE_CONTROLLER_ID( 0x0079, 0x181b ), k_eControllerType_PS4Controller, NULL }, // Venom Arcade Stick - XXX:this may not work and may need to be called a ps3 controller - //{ MAKE_CONTROLLER_ID( 0x046d, 0xc260 ), k_eControllerType_PS4Controller, NULL }, // Logitech G29 (PS4) - { MAKE_CONTROLLER_ID( 0x054c, 0x05c4 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller - { MAKE_CONTROLLER_ID( 0x054c, 0x05c5 ), k_eControllerType_PS4Controller, NULL }, // STRIKEPAD PS4 Grip Add-on - { MAKE_CONTROLLER_ID( 0x054c, 0x09cc ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Slim Controller - { MAKE_CONTROLLER_ID( 0x054c, 0x0ba0 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller (Wireless dongle) - { MAKE_CONTROLLER_ID( 0x0738, 0x8250 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightPad Pro PS4 - { MAKE_CONTROLLER_ID( 0x0738, 0x8384 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE S+ PS4 - { MAKE_CONTROLLER_ID( 0x0738, 0x8480 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2 PS4 - { MAKE_CONTROLLER_ID( 0x0738, 0x8481 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2+ PS4 - { MAKE_CONTROLLER_ID( 0x0C12, 0x0E10 ), k_eControllerType_PS4Controller, NULL }, // Armor Armor 3 Pad PS4 - { MAKE_CONTROLLER_ID( 0x0C12, 0x1CF6 ), k_eControllerType_PS4Controller, NULL }, // EMIO PS4 Elite Controller - { MAKE_CONTROLLER_ID( 0x0c12, 0x0e13 ), k_eControllerType_PS4Controller, NULL }, // ZEROPLUS P4 Wired Gamepad - { MAKE_CONTROLLER_ID( 0x0c12, 0x0e15 ), k_eControllerType_PS4Controller, NULL }, // Game:Pad 4 - { MAKE_CONTROLLER_ID( 0x0c12, 0x0ef6 ), k_eControllerType_PS4Controller, NULL }, // Hitbox Arcade Stick - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0055 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS - { MAKE_CONTROLLER_ID( 0x0f0d, 0x005e ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander 4 PS4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0066 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS Plus - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0084 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander PS4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0087 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Stick mini 4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x008a ), k_eControllerType_PS4Controller, NULL }, // HORI Real Arcade Pro 4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x009c ), k_eControllerType_PS4Controller, NULL }, // HORI TAC PRO mousething - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00a0 ), k_eControllerType_PS4Controller, NULL }, // HORI TAC4 mousething - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ed ), k_eControllerType_XInputPS4Controller, NULL }, // Hori Fighting Stick mini 4 kai - becomes an Xbox 360 controller on PC - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ee ), k_eControllerType_PS4Controller, NULL }, // Hori mini wired https://www.playstation.com/en-us/explore/accessories/gaming-controllers/mini-wired-gamepad/ - { MAKE_CONTROLLER_ID( 0x0f0d, 0x011c ), k_eControllerType_PS4Controller, NULL }, // Hori Fighting Stick α - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0123 ), k_eControllerType_PS4Controller, NULL }, // HORI Wireless Controller Light (Japan only) - only over bt- over usb is xbox and pid 0x0124 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0162 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander OCTA - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0164 ), k_eControllerType_XInputPS4Controller, NULL }, // HORI Fighting Commander OCTA - { MAKE_CONTROLLER_ID( 0x11c0, 0x4001 ), k_eControllerType_PS4Controller, NULL }, // "PS4 Fun Controller" added from user log - { MAKE_CONTROLLER_ID( 0x146b, 0x0603 ), k_eControllerType_XInputPS4Controller, NULL }, // Nacon PS4 Compact Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x0d01 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller - has gyro - { MAKE_CONTROLLER_ID( 0x146b, 0x0d02 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller v2 - has gyro - { MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Infinite - has gyro - { MAKE_CONTROLLER_ID( 0x1532, 0X0401 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera PS4 Controller - { MAKE_CONTROLLER_ID( 0x1532, 0x1000 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju PS4 Controller - { MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate USB - { MAKE_CONTROLLER_ID( 0x1532, 0x1007 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition USB - { MAKE_CONTROLLER_ID( 0x1532, 0x1008 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera Evo Fightstick - { MAKE_CONTROLLER_ID( 0x1532, 0x1009 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate BT - { MAKE_CONTROLLER_ID( 0x1532, 0x100A ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition BT - { MAKE_CONTROLLER_ID( 0x1532, 0x1100 ), k_eControllerType_PS4Controller, NULL }, // Razer RAION Fightpad - Trackpad, no gyro, lightbar hardcoded to green - { MAKE_CONTROLLER_ID( 0x20d6, 0x792a ), k_eControllerType_PS4Controller, NULL }, // PowerA Fusion Fight Pad - { MAKE_CONTROLLER_ID( 0x2c22, 0x2000 ), k_eControllerType_PS4Controller, NULL }, // Qanba Drone - { MAKE_CONTROLLER_ID( 0x2c22, 0x2300 ), k_eControllerType_PS4Controller, NULL }, // Qanba Obsidian - { MAKE_CONTROLLER_ID( 0x2c22, 0x2303 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Obsidian Arcade Joystick - { MAKE_CONTROLLER_ID( 0x2c22, 0x2500 ), k_eControllerType_PS4Controller, NULL }, // Qanba Dragon - { MAKE_CONTROLLER_ID( 0x2c22, 0x2503 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Dragon Arcade Joystick - { MAKE_CONTROLLER_ID( 0x7545, 0x0104 ), k_eControllerType_PS4Controller, NULL }, // Armor 3 or Level Up Cobra - At least one variant has gyro - { MAKE_CONTROLLER_ID( 0x9886, 0x0025 ), k_eControllerType_PS4Controller, NULL }, // Astro C40 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0207 ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro Fightstick w/ Touchpad for PS4 - // Removing the Giotek because there were a bunch of help tickets from users w/ issues including from non-PS4 controller users. This VID/PID is probably used in different FW's -// { MAKE_CONTROLLER_ID( 0x7545, 0x1122 ), k_eControllerType_PS4Controller, NULL }, // Giotek VX4 - trackpad/gyro don't work. Had to not filter on interface info. Light bar is flaky, but works. - { MAKE_CONTROLLER_ID( 0x044f, 0xd00e ), k_eControllerType_PS4Controller, NULL }, // Thrustmast Eswap Pro - No gyro and lightbar doesn't change color. Works otherwise - { MAKE_CONTROLLER_ID( 0x0c12, 0x1e10 ), k_eControllerType_PS4Controller, NULL }, // P4 Wired Gamepad generic knock off - lightbar but not trackpad or gyro - { MAKE_CONTROLLER_ID( 0x146b, 0x0d09 ), k_eControllerType_PS4Controller, NULL }, // NACON Daija Fight Stick - touchpad but no gyro/rumble - { MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited - { MAKE_CONTROLLER_ID( 0x146b, 0x0d08 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited Wireless Dongle - { MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid - { MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller -- on windows this doesn't enumerate - { MAKE_CONTROLLER_ID( 0x146b, 0x0d13 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution 3 - { MAKE_CONTROLLER_ID( 0x0c12, 0x0e20 ), k_eControllerType_PS4Controller, NULL }, // Brook Mars Controller - needs FW update to show up as Ps4 controller on PC. Has Gyro but touchpad is a single button. - - { MAKE_CONTROLLER_ID( 0x054c, 0x0ce6 ), k_eControllerType_PS5Controller, NULL }, // Sony PS5 Controller - { MAKE_CONTROLLER_ID( 0x054c, 0x0df2 ), k_eControllerType_PS5Controller, NULL }, // Sony DualSense Edge Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0163 ), k_eControllerType_PS5Controller, NULL }, // HORI Fighting Commander OCTA - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0184 ), k_eControllerType_PS5Controller, NULL }, // Hori Fighting Stick α - - { MAKE_CONTROLLER_ID( 0x0079, 0x0006 ), k_eControllerType_UnknownNonSteamController, NULL }, // DragonRise Generic USB PCB, sometimes configured as a PC Twin Shock Controller - looks like a DS3 but the face buttons are 1-4 instead of symbols - - { MAKE_CONTROLLER_ID( 0x0079, 0x18d4 ), k_eControllerType_XBox360Controller, NULL }, // GPD Win 2 X-Box Controller - { MAKE_CONTROLLER_ID( 0x03eb, 0xff02 ), k_eControllerType_XBox360Controller, NULL }, // Wooting Two - { MAKE_CONTROLLER_ID( 0x044f, 0xb326 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Gamepad GP XID - { MAKE_CONTROLLER_ID( 0x045e, 0x028e ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad - { MAKE_CONTROLLER_ID( 0x045e, 0x028f ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad v2 - { MAKE_CONTROLLER_ID( 0x045e, 0x0291 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (XBOX) - { MAKE_CONTROLLER_ID( 0x045e, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Big Button IR - { MAKE_CONTROLLER_ID( 0x045e, 0x02a1 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Wireless Controller with XUSB driver on Windows - { MAKE_CONTROLLER_ID( 0x045e, 0x02a9 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (third party knockoff) - { MAKE_CONTROLLER_ID( 0x045e, 0x0719 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver - { MAKE_CONTROLLER_ID( 0x046d, 0xc21d ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F310 - { MAKE_CONTROLLER_ID( 0x046d, 0xc21e ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F510 - { MAKE_CONTROLLER_ID( 0x046d, 0xc21f ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F710 - { MAKE_CONTROLLER_ID( 0x046d, 0xc242 ), k_eControllerType_XBox360Controller, NULL }, // Logitech Chillstream Controller - { MAKE_CONTROLLER_ID( 0x056e, 0x2004 ), k_eControllerType_XBox360Controller, NULL }, // Elecom JC-U3613M - { MAKE_CONTROLLER_ID( 0x06a3, 0xf51a ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3600 - { MAKE_CONTROLLER_ID( 0x0738, 0x4716 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller - { MAKE_CONTROLLER_ID( 0x0738, 0x4718 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightStick SE - { MAKE_CONTROLLER_ID( 0x0738, 0x4726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller - { MAKE_CONTROLLER_ID( 0x0738, 0x4728 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightPad - { MAKE_CONTROLLER_ID( 0x0738, 0x4736 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon Gamepad - { MAKE_CONTROLLER_ID( 0x0738, 0x4738 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller (SFIV) - { MAKE_CONTROLLER_ID( 0x0738, 0x4740 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Beat Pad - { MAKE_CONTROLLER_ID( 0x0738, 0xb726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox controller - MW2 - { MAKE_CONTROLLER_ID( 0x0738, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz JOYTECH NEO SE Advanced GamePad - { MAKE_CONTROLLER_ID( 0x0738, 0xcb02 ), k_eControllerType_XBox360Controller, NULL }, // Saitek Cyborg Rumble Pad - PC/Xbox 360 - { MAKE_CONTROLLER_ID( 0x0738, 0xcb03 ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3200 Rumble Pad - PC/Xbox 360 - { MAKE_CONTROLLER_ID( 0x0738, 0xf738 ), k_eControllerType_XBox360Controller, NULL }, // Super SFIV FightStick TE S - { MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller, NULL }, // Nvidia Shield local controller - { MAKE_CONTROLLER_ID( 0x0955, 0xb400 ), k_eControllerType_XBox360Controller, NULL }, // NVIDIA Shield streaming controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0105 ), k_eControllerType_XBox360Controller, NULL }, // HSM3 Xbox360 dancepad - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0113 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x011f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0125 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightStick" }, // PDP INJUSTICE FightStick for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0127 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightPad" }, // PDP INJUSTICE FightPad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0131 ), k_eControllerType_XBox360Controller, "PDP EA Soccer Controller" }, // PDP EA Soccer Gamepad - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0133 ), k_eControllerType_XBox360Controller, "PDP Battlefield 4 Controller" }, // PDP Battlefield 4 Gamepad - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0143 ), k_eControllerType_XBox360Controller, "PDP MK X Fight Stick" }, // PDP MK X Fight Stick for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0147 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Marvel Controller" }, // PDP Marvel Controller for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0201 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0213 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x021f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0301 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0313 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0314 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0401 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0413 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted) - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0501 ), k_eControllerType_XBox360Controller, NULL }, // PDP Xbox 360 Controller (unlisted) - { MAKE_CONTROLLER_ID( 0x0e6f, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted) - { MAKE_CONTROLLER_ID( 0x0f0d, 0x000a ), k_eControllerType_XBox360Controller, NULL }, // Hori Co. DOA4 FightStick - { MAKE_CONTROLLER_ID( 0x0f0d, 0x000c ), k_eControllerType_XBox360Controller, NULL }, // Hori PadEX Turbo - { MAKE_CONTROLLER_ID( 0x0f0d, 0x000d ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0016 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX - { MAKE_CONTROLLER_ID( 0x0f0d, 0x001b ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX - { MAKE_CONTROLLER_ID( 0x0f0d, 0x008c ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro 4 - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00db ), k_eControllerType_XBox360Controller, "HORI Slime Controller" }, // Hori Dragon Quest Slime Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x011e ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick α - { MAKE_CONTROLLER_ID( 0x1038, 0x1430 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo - { MAKE_CONTROLLER_ID( 0x1038, 0x1431 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo - { MAKE_CONTROLLER_ID( 0x1038, 0xb360 ), k_eControllerType_XBox360Controller, NULL }, // SteelSeries Nimbus/Stratus XL - { MAKE_CONTROLLER_ID( 0x11c9, 0x55f0 ), k_eControllerType_XBox360Controller, NULL }, // Nacon GC-100XF - { MAKE_CONTROLLER_ID( 0x12ab, 0x0004 ), k_eControllerType_XBox360Controller, NULL }, // Honey Bee Xbox360 dancepad - { MAKE_CONTROLLER_ID( 0x12ab, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // PDP AFTERGLOW AX.1 - { MAKE_CONTROLLER_ID( 0x12ab, 0x0303 ), k_eControllerType_XBox360Controller, NULL }, // Mortal Kombat Klassic FightStick - { MAKE_CONTROLLER_ID( 0x1430, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller Adapter - { MAKE_CONTROLLER_ID( 0x1430, 0x4748 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Guitar Hero X-plorer - { MAKE_CONTROLLER_ID( 0x1430, 0xf801 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x0601 ), k_eControllerType_XBox360Controller, NULL }, // BigBen Interactive XBOX 360 Controller -// { MAKE_CONTROLLER_ID( 0x1532, 0x0037 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth - { MAKE_CONTROLLER_ID( 0x15e4, 0x3f00 ), k_eControllerType_XBox360Controller, NULL }, // Power A Mini Pro Elite - { MAKE_CONTROLLER_ID( 0x15e4, 0x3f0a ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller - { MAKE_CONTROLLER_ID( 0x15e4, 0x3f10 ), k_eControllerType_XBox360Controller, NULL }, // Batarang Xbox 360 controller - { MAKE_CONTROLLER_ID( 0x162e, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Joytech Neo-Se Take2 - { MAKE_CONTROLLER_ID( 0x1689, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Tournament Edition - { MAKE_CONTROLLER_ID( 0x1689, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Classic Edition - { MAKE_CONTROLLER_ID( 0x1689, 0xfe00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth - { MAKE_CONTROLLER_ID( 0x1949, 0x041a ), k_eControllerType_XBox360Controller, "Amazon Luna Controller" }, // Amazon Luna Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Guitar - { MAKE_CONTROLLER_ID( 0x1bad, 0x0003 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Drumkit - { MAKE_CONTROLLER_ID( 0x1bad, 0xf016 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0xf018 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV SE Fighting Stick - { MAKE_CONTROLLER_ID( 0x1bad, 0xf019 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Brawlstick for Xbox 360 - { MAKE_CONTROLLER_ID( 0x1bad, 0xf021 ), k_eControllerType_XBox360Controller, NULL }, // Mad Cats Ghost Recon FS GamePad - { MAKE_CONTROLLER_ID( 0x1bad, 0xf023 ), k_eControllerType_XBox360Controller, NULL }, // MLG Pro Circuit Controller (Xbox) - { MAKE_CONTROLLER_ID( 0x1bad, 0xf025 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Call Of Duty - { MAKE_CONTROLLER_ID( 0x1bad, 0xf027 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FPS Pro - { MAKE_CONTROLLER_ID( 0x1bad, 0xf028 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightPad - { MAKE_CONTROLLER_ID( 0x1bad, 0xf02e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Fightpad - { MAKE_CONTROLLER_ID( 0x1bad, 0xf036 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon GamePad Pro - { MAKE_CONTROLLER_ID( 0x1bad, 0xf038 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightStick TE - { MAKE_CONTROLLER_ID( 0x1bad, 0xf039 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MvC2 TE - { MAKE_CONTROLLER_ID( 0x1bad, 0xf03a ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz SFxT Fightstick Pro - { MAKE_CONTROLLER_ID( 0x1bad, 0xf03d ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV Arcade Stick TE - Chun Li - { MAKE_CONTROLLER_ID( 0x1bad, 0xf03e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MLG FightStick TE - { MAKE_CONTROLLER_ID( 0x1bad, 0xf03f ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick SoulCaliber - { MAKE_CONTROLLER_ID( 0x1bad, 0xf042 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TES+ - { MAKE_CONTROLLER_ID( 0x1bad, 0xf080 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TE2 - { MAKE_CONTROLLER_ID( 0x1bad, 0xf501 ), k_eControllerType_XBox360Controller, NULL }, // HoriPad EX2 Turbo - { MAKE_CONTROLLER_ID( 0x1bad, 0xf502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.VX SA - { MAKE_CONTROLLER_ID( 0x1bad, 0xf503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX - { MAKE_CONTROLLER_ID( 0x1bad, 0xf504 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro. EX - { MAKE_CONTROLLER_ID( 0x1bad, 0xf505 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2B - { MAKE_CONTROLLER_ID( 0x1bad, 0xf506 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX Premium VLX - { MAKE_CONTROLLER_ID( 0x1bad, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Xbox 360 Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0xf901 ), k_eControllerType_XBox360Controller, NULL }, // Gamestop Xbox 360 Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0xf902 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Gamepad2 - { MAKE_CONTROLLER_ID( 0x1bad, 0xf903 ), k_eControllerType_XBox360Controller, NULL }, // Tron Xbox 360 controller - { MAKE_CONTROLLER_ID( 0x1bad, 0xf904 ), k_eControllerType_XBox360Controller, NULL }, // PDP Versus Fighting Pad - { MAKE_CONTROLLER_ID( 0x1bad, 0xf906 ), k_eControllerType_XBox360Controller, NULL }, // MortalKombat FightStick - { MAKE_CONTROLLER_ID( 0x1bad, 0xfa01 ), k_eControllerType_XBox360Controller, NULL }, // MadCatz GamePad - { MAKE_CONTROLLER_ID( 0x1bad, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza TE - { MAKE_CONTROLLER_ID( 0x1bad, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza - { MAKE_CONTROLLER_ID( 0x24c6, 0x5000 ), k_eControllerType_XBox360Controller, NULL }, // Razer Atrox Arcade Stick - { MAKE_CONTROLLER_ID( 0x24c6, 0x5300 ), k_eControllerType_XBox360Controller, NULL }, // PowerA MINI PROEX Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x5303 ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x530a ), k_eControllerType_XBox360Controller, NULL }, // Xbox 360 Pro EX Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x531a ), k_eControllerType_XBox360Controller, NULL }, // PowerA Pro Ex - { MAKE_CONTROLLER_ID( 0x24c6, 0x5397 ), k_eControllerType_XBox360Controller, NULL }, // FUS1ON Tournament Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x5500 ), k_eControllerType_XBox360Controller, NULL }, // Hori XBOX 360 EX 2 with Turbo - { MAKE_CONTROLLER_ID( 0x24c6, 0x5501 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX-SA - { MAKE_CONTROLLER_ID( 0x24c6, 0x5502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX Alt - { MAKE_CONTROLLER_ID( 0x24c6, 0x5503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Edge - { MAKE_CONTROLLER_ID( 0x24c6, 0x5506 ), k_eControllerType_XBox360Controller, NULL }, // Hori SOULCALIBUR V Stick - { MAKE_CONTROLLER_ID( 0x24c6, 0x550d ), k_eControllerType_XBox360Controller, NULL }, // Hori GEM Xbox controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x550e ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro V Kai 360 - { MAKE_CONTROLLER_ID( 0x24c6, 0x5508 ), k_eControllerType_XBox360Controller, NULL }, // Hori PAD A - { MAKE_CONTROLLER_ID( 0x24c6, 0x5510 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Commander ONE - { MAKE_CONTROLLER_ID( 0x24c6, 0x5b00 ), k_eControllerType_XBox360Controller, NULL }, // ThrustMaster Ferrari Italia 458 Racing Wheel - { MAKE_CONTROLLER_ID( 0x24c6, 0x5b02 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster, Inc. GPX Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x5b03 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Ferrari 458 Racing Wheel - { MAKE_CONTROLLER_ID( 0x24c6, 0x5d04 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth - { MAKE_CONTROLLER_ID( 0x24c6, 0xfafa ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0xfafb ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 1 - { MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 3 - { MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller, NULL }, // Rock Candy Gamepad for Xbox 360 - - { MAKE_CONTROLLER_ID( 0x045e, 0x02d1 ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad - { MAKE_CONTROLLER_ID( 0x045e, 0x02dd ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad (Firmware 2015) - { MAKE_CONTROLLER_ID( 0x045e, 0x02e0 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth) - { MAKE_CONTROLLER_ID( 0x045e, 0x02e3 ), k_eControllerType_XBoxOneController, "Xbox One Elite Controller" }, // Microsoft X-Box One Elite pad - { MAKE_CONTROLLER_ID( 0x045e, 0x02ea ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad - { MAKE_CONTROLLER_ID( 0x045e, 0x02fd ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth) - { MAKE_CONTROLLER_ID( 0x045e, 0x02ff ), k_eControllerType_XBoxOneController, NULL }, // Microsoft X-Box One controller with XBOXGIP driver on Windows - { MAKE_CONTROLLER_ID( 0x045e, 0x0b00 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad -// { MAKE_CONTROLLER_ID( 0x045e, 0x0b02 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // The virtual keyboard generated by XboxGip drivers for Xbox One Controllers (see https://github.com/libsdl-org/SDL/pull/5121 for details) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b05 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (Bluetooth) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b0a ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad - { MAKE_CONTROLLER_ID( 0x045e, 0x0b0c ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (Bluetooth) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b12 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad - { MAKE_CONTROLLER_ID( 0x045e, 0x0b13 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad (BLE) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b20 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (BLE) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b21 ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (BLE) - { MAKE_CONTROLLER_ID( 0x045e, 0x0b22 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (BLE) - { MAKE_CONTROLLER_ID( 0x0738, 0x4a01 ), k_eControllerType_XBoxOneController, NULL }, // Mad Catz FightStick TE 2 - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0139 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x013B ), k_eControllerType_XBoxOneController, "PDP Xbox One Face-Off Controller" }, // PDP Face-Off Gamepad for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x013a ), k_eControllerType_XBoxOneController, NULL }, // PDP Xbox One Controller (unlisted) - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0145 ), k_eControllerType_XBoxOneController, "PDP MK X Fight Pad" }, // PDP MK X Fight Pad for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0146 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x015b ), k_eControllerType_XBoxOneController, "PDP Fallout 4 Vault Boy Controller" }, // PDP Fallout 4 Vault Boy Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x015c ), k_eControllerType_XBoxOneController, "PDP Xbox One @Play Controller" }, // PDP @Play Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x015d ), k_eControllerType_XBoxOneController, "PDP Mirror's Edge Controller" }, // PDP Mirror's Edge Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x015f ), k_eControllerType_XBoxOneController, "PDP Metallic Controller" }, // PDP Metallic Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0160 ), k_eControllerType_XBoxOneController, "PDP NFL Face-Off Controller" }, // PDP NFL Official Face-Off Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0161 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0162 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0163 ), k_eControllerType_XBoxOneController, "PDP Deliverer of Truth" }, // PDP Legendary Collection: Deliverer of Truth - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0164 ), k_eControllerType_XBoxOneController, "PDP Battlefield 1 Controller" }, // PDP Battlefield 1 Official Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0165 ), k_eControllerType_XBoxOneController, "PDP Titanfall 2 Controller" }, // PDP Titanfall 2 Official Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0166 ), k_eControllerType_XBoxOneController, "PDP Mass Effect: Andromeda Controller" }, // PDP Mass Effect: Andromeda Official Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0167 ), k_eControllerType_XBoxOneController, "PDP Halo Wars 2 Face-Off Controller" }, // PDP Halo Wars 2 Official Face-Off Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0205 ), k_eControllerType_XBoxOneController, "PDP Victrix Pro Fight Stick" }, // PDP Victrix Pro Fight Stick - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0206 ), k_eControllerType_XBoxOneController, "PDP Mortal Kombat Controller" }, // PDP Mortal Kombat 25 Anniversary Edition Stick (Xbox One) - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0246 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0261 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0262 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a8 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02a9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02aa ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ab ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ac ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Wired Controller for Xbox One - Ember Orange - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ad ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ae ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02af ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Prismatic Wired Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b5 ), k_eControllerType_XBoxOneController, "PDP Xbox One GAMEware Controller" }, // PDP GAMEware Wired Controller Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02b6 ), k_eControllerType_XBoxOneController, NULL }, // PDP One-Handed Joystick Adaptive Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02bd ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Wired Controller for Xbox One - Royal Purple - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02be ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Deluxe Wired Controller for Xbox One - Raven Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02bf ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Deluxe Wired Controller for Xbox One - Midnight Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantom Black - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Ghost White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Revenant Blue - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Deluxe Wired Controller for Xbox One - Verdant Green - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Deluxe Wired Controller for Xbox One - Ember Orange - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Deluxe Wired Controller for Xbox One - Royal Purple - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Deluxe Wired Controller for Xbox One - Crimson Red - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Deluxe Wired Controller for Xbox One - Arctic White - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c8 ), k_eControllerType_XBoxOneController, "PDP Kingdom Hearts Controller" }, // PDP Kingdom Hearts Wired Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02c9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantasm Red" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantasm Red - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ca ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Specter Violet - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cb ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Wired Controller for Xbox One - Stealth Series | Specter Violet - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cd ), k_eControllerType_XBoxOneController, "PDP Xbox One Blu-merang" }, // PDP Rock Candy Wired Controller for Xbox One - Blu-merang - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02ce ), k_eControllerType_XBoxOneController, "PDP Xbox One Cranblast" }, // PDP Rock Candy Wired Controller for Xbox One - Cranblast - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02cf ), k_eControllerType_XBoxOneController, "PDP Xbox One Aqualime" }, // PDP Rock Candy Wired Controller for Xbox One - Aqualime - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Red Camo" }, // PDP Wired Controller for Xbox One - Red Camo - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0346 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0446 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02da ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Afterglow" }, // PDP Xbox Series X Afterglow - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d6 ), k_eControllerType_XBoxOneController, "Victrix Gambit Tournament Controller" }, // Victrix Gambit Tournament Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x02d9 ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Midnight Blue" }, // PDP Xbox Series X Midnight Blue - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0063 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro Hayabusa (USA) Xbox One - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0067 ), k_eControllerType_XBoxOneController, NULL }, // HORIPAD ONE - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0078 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro V Kai Xbox One - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00c5 ), k_eControllerType_XBoxOneController, NULL }, // HORI Fighting Commander - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0150 ), k_eControllerType_XBoxOneController, NULL }, // HORI Fighting Commander OCTA for Xbox Series X - { MAKE_CONTROLLER_ID( 0x1532, 0x0a00 ), k_eControllerType_XBoxOneController, NULL }, // Razer Atrox Arcade Stick - { MAKE_CONTROLLER_ID( 0x1532, 0x0a03 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wildcat - { MAKE_CONTROLLER_ID( 0x1532, 0x0a14 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Ultimate - { MAKE_CONTROLLER_ID( 0x1532, 0x0a15 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Tournament Edition - { MAKE_CONTROLLER_ID( 0x20d6, 0x2001 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Black Inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x2002 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Gray/White Inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x2003 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Green Inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x2004 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Pink inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x2005 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - Black - { MAKE_CONTROLLER_ID( 0x20d6, 0x2006 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - White - { MAKE_CONTROLLER_ID( 0x20d6, 0x2009 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Red inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x200a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Blue inline - { MAKE_CONTROLLER_ID( 0x20d6, 0x200b ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Red - { MAKE_CONTROLLER_ID( 0x20d6, 0x200c ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Blue - { MAKE_CONTROLLER_ID( 0x20d6, 0x200d ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Seafoam Fade - { MAKE_CONTROLLER_ID( 0x20d6, 0x200e ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Midnight Blue - { MAKE_CONTROLLER_ID( 0x20d6, 0x200f ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Soldier Green - { MAKE_CONTROLLER_ID( 0x20d6, 0x2011 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired - Metallic Ice - { MAKE_CONTROLLER_ID( 0x20d6, 0x2012 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Cuphead EnWired Controller - Mugman - { MAKE_CONTROLLER_ID( 0x20d6, 0x2015 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Blue Hint - { MAKE_CONTROLLER_ID( 0x20d6, 0x2016 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Green Hint - { MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Cntroller - Arctic Camo - { MAKE_CONTROLLER_ID( 0x20d6, 0x2018 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Arc Lightning - { MAKE_CONTROLLER_ID( 0x20d6, 0x2019 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Royal Purple - { MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Nebula - { MAKE_CONTROLLER_ID( 0x20d6, 0x4001 ), k_eControllerType_XBoxOneController, "PowerA Fusion Pro 2 Controller" }, // PowerA Fusion Pro 2 Wired Controller (Xbox Series X style) - { MAKE_CONTROLLER_ID( 0x20d6, 0x4002 ), k_eControllerType_XBoxOneController, "PowerA Spectra Infinity Controller" }, // PowerA Spectra Infinity Wired Controller (Xbox Series X style) - { MAKE_CONTROLLER_ID( 0x24c6, 0x541a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Xbox One Mini Wired Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x542a ), k_eControllerType_XBoxOneController, NULL }, // Xbox ONE spectra - { MAKE_CONTROLLER_ID( 0x24c6, 0x543a ), k_eControllerType_XBoxOneController, "PowerA Xbox One Controller" }, // PowerA Xbox ONE liquid metal controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x551a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x561a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x591a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x592a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Spectra Pro - { MAKE_CONTROLLER_ID( 0x24c6, 0x791a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Fusion Fight Pad - { MAKE_CONTROLLER_ID( 0x2dc8, 0x2002 ), k_eControllerType_XBoxOneController, NULL }, // 8BitDo Ultimate Wired Controller for Xbox - { MAKE_CONTROLLER_ID( 0x2e24, 0x0652 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke - { MAKE_CONTROLLER_ID( 0x2e24, 0x1618 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke - { MAKE_CONTROLLER_ID( 0x2e24, 0x1688 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin X91 - { MAKE_CONTROLLER_ID( 0x146b, 0x0611 ), k_eControllerType_XBoxOneController, NULL }, // Xbox Controller Mode for NACON Revolution 3 - - // These have been added via Minidump for unrecognized Xinput controller assert - { MAKE_CONTROLLER_ID( 0x0000, 0x0000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x045e, 0x02a2 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - Microsoft VID - { MAKE_CONTROLLER_ID( 0x0e6f, 0x1414 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0159 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0xfaff ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x006d ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00a4 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x1832 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x187f ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x1883 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x03eb, 0xff01 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0c12, 0x0ef8 ), k_eControllerType_XBox360Controller, NULL }, // Homemade fightstick based on brook pcb (with XInput driver??) - { MAKE_CONTROLLER_ID( 0x046d, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1345, 0x6006 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - - { MAKE_CONTROLLER_ID( 0x056e, 0x2012 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x0602 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00ae ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x046d, 0x0401 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput - { MAKE_CONTROLLER_ID( 0x046d, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput - { MAKE_CONTROLLER_ID( 0x046d, 0xcaa3 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput - { MAKE_CONTROLLER_ID( 0x046d, 0xc261 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput - { MAKE_CONTROLLER_ID( 0x046d, 0x0291 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput - { MAKE_CONTROLLER_ID( 0x0079, 0x18d3 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00b1 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0001, 0x0001 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x188e ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x187c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x189c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x0079, 0x1874 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - - { MAKE_CONTROLLER_ID( 0x2f24, 0x0050 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0x2e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x9886, 0x24 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0x91 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1430, 0x719 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xf0d, 0xed ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xf0d, 0xc0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x152 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2a7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x46d, 0x1007 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2b8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2a8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x79, 0x18a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - - /* Added from Minidumps 10-9-19 */ - { MAKE_CONTROLLER_ID( 0x0, 0x6686 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x11ff, 0x511 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x12ab, 0x304 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1430, 0x291 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1430, 0x2a9 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1430, 0x70b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x604 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x605 ), k_eControllerType_XBoxOneController, NULL }, // NACON PS4 controller in Xbox mode - might also be other bigben brand xbox controllers - { MAKE_CONTROLLER_ID( 0x146b, 0x606 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x146b, 0x609 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0x28e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x1bad, 0x5500 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x20ab, 0x55ef ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x24c6, 0x5509 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2516, 0x69 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x25b1, 0x360 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2c22, 0x2203 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0x11 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0x53 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0xb7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x46d, 0x0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x46d, 0x1004 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x46d, 0x1008 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x46d, 0xf301 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x738, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x738, 0x7263 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x738, 0xb738 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x738, 0xcb29 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x738, 0xf401 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x79, 0x18c2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x79, 0x18c8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x79, 0x18cf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xc12, 0xe17 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xc12, 0xe1c ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xc12, 0xe22 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xc12, 0xe30 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xd2d2, 0xd2d2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xd62, 0x9a1a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xd62, 0x9a1b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe00, 0xe00 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x12a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2a2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2a5 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2b2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2bd ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2bf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2c0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0x2c6 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xf0d, 0x97 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xf0d, 0xba ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xf0d, 0xd8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xfff, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x45e, 0x867 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - // Added 12-17-2020 - { MAKE_CONTROLLER_ID( 0x16d0, 0xf3f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0x2f24, 0x8f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - { MAKE_CONTROLLER_ID( 0xe6f, 0xf501 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller - - //{ MAKE_CONTROLLER_ID( 0x1949, 0x0402 ), /*android*/, NULL }, // Unknown Controller - - { MAKE_CONTROLLER_ID( 0x05ac, 0x0001 ), k_eControllerType_AppleController, NULL }, // MFI Extended Gamepad (generic entry for iOS/tvOS) - { MAKE_CONTROLLER_ID( 0x05ac, 0x0002 ), k_eControllerType_AppleController, NULL }, // MFI Standard Gamepad (generic entry for iOS/tvOS) - - { MAKE_CONTROLLER_ID( 0x057e, 0x2006 ), k_eControllerType_SwitchJoyConLeft, NULL }, // Nintendo Switch Joy-Con (Left) - { MAKE_CONTROLLER_ID( 0x057e, 0x2007 ), k_eControllerType_SwitchJoyConRight, NULL }, // Nintendo Switch Joy-Con (Right) - { MAKE_CONTROLLER_ID( 0x057e, 0x2008 ), k_eControllerType_SwitchJoyConPair, NULL }, // Nintendo Switch Joy-Con (Left+Right Combined) - - // This same controller ID is spoofed by many 3rd-party Switch controllers. - // The ones we currently know of are: - // * Any 8bitdo controller with Switch support - // * ORTZ Gaming Wireless Pro Controller - // * ZhiXu Gamepad Wireless - // * Sunwaytek Wireless Motion Controller for Nintendo Switch - { MAKE_CONTROLLER_ID( 0x057e, 0x2009 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Switch Pro Controller - //{ MAKE_CONTROLLER_ID( 0x057e, 0x2017 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SNES Controller - //{ MAKE_CONTROLLER_ID( 0x057e, 0x2019 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online N64 Controller - //{ MAKE_CONTROLLER_ID( 0x057e, 0x201e ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SEGA Genesis Controller - - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00c1 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORIPAD for Nintendo Switch - { MAKE_CONTROLLER_ID( 0x0f0d, 0x0092 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Pokken Tournament DX Pro Pad - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00f6 ), k_eControllerType_SwitchProController, NULL }, // HORI Wireless Switch Pad - // The HORIPAD S, which comes in multiple styles: - // - NSW-108, classic GameCube controller - // - NSW-244, Fighting Commander arcade pad - // - NSW-278, Hori Pad Mini gamepad - // - NSW-326, HORIPAD FPS for Nintendo Switch - // - // The first two, at least, shouldn't have their buttons remapped, and since we - // can't tell which model we're actually using, we won't do any button remapping - // for any of them. - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController, NULL }, // HORIPAD S - Looks like a Switch controller but uses the Xbox 360 controller protocol - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0180 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Pro Controller for Nintendo Switch - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0181 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0184 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Deluxe+ Audio Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0185 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Wired Fight Pad Pro for Nintendo Switch - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0186 ), k_eControllerType_SwitchProController, NULL }, // PDP Afterglow Wireless Switch Controller - working gyro. USB is for charging only. Many later "Wireless" line devices w/ gyro also use this vid/pid - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0187 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Rockcandy Wired Controller - { MAKE_CONTROLLER_ID( 0x0e6f, 0x0188 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Afterglow Wired Deluxe+ Audio Controller - { MAKE_CONTROLLER_ID( 0x0f0d, 0x00aa ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Real Arcade Pro V Hayabusa in Switch Mode - { MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Wired Controller Plus/PowerA Wired Controller Nintendo GameCube Style - { MAKE_CONTROLLER_ID( 0x20d6, 0xa712 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Fight Pad - { MAKE_CONTROLLER_ID( 0x20d6, 0xa713 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Super Mario Controller - { MAKE_CONTROLLER_ID( 0x20d6, 0xa714 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Spectra Controller - { MAKE_CONTROLLER_ID( 0x20d6, 0xa715 ), k_eControllerType_SwitchInputOnlyController, NULL }, // Power A Fusion Wireless Arcade Stick (USB Mode) Over BT is shows up as 057e 2009 - { MAKE_CONTROLLER_ID( 0x20d6, 0xa716 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Pro Controller - USB requires toggling switch on back of device - - // Valve products - { MAKE_CONTROLLER_ID( 0x0000, 0x11fb ), k_eControllerType_MobileTouch, NULL }, // Streaming mobile touch virtual controls - { MAKE_CONTROLLER_ID( 0x28de, 0x1101 ), k_eControllerType_SteamController, NULL }, // Valve Legacy Steam Controller (CHELL) - { MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController, NULL }, // Valve wired Steam Controller (D0G) - { MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G) - { MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G) - { MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController, NULL }, // Valve wireless Steam Controller - { MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2, NULL }, // Valve wired Steam Controller (HEADCRAB) - { MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2, NULL }, // Valve Bluetooth Steam Controller (HEADCRAB) -}; - static const char *GetControllerTypeOverride( int nVID, int nPID ) { const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERTYPE); diff --git a/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick.c b/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick.c index d5eef75..0ac9b50 100644 --- a/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick.c +++ b/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick.c @@ -28,12 +28,11 @@ #include "../SDL_joystick_c.h" #include "SDL_iokitjoystick_c.h" #include "../hidapi/SDL_hidapijoystick_c.h" -#include "../../haptic/darwin/SDL_syshaptic_c.h" /* For haptic hot plugging */ - +#include "../../haptic/darwin/SDL_syshaptic_c.h" /* For haptic hot plugging */ #define SDL_JOYSTICK_RUNLOOP_MODE CFSTR("SDLJoystick") -#define CONVERT_MAGNITUDE(x) (((x)*10000) / 0x7FFF) +#define CONVERT_MAGNITUDE(x) (((x)*10000) / 0x7FFF) /* The base object of the HID Manager API */ static IOHIDManagerRef hidman = NULL; @@ -43,7 +42,7 @@ static recDevice *gpDeviceList = NULL; void FreeRumbleEffectData(FFEFFECT *effect) { - if (!effect) { + if (effect == NULL) { return; } SDL_free(effect->rgdwAxes); @@ -59,7 +58,7 @@ FFEFFECT *CreateRumbleEffectData(Sint16 magnitude) /* Create the effect */ effect = (FFEFFECT *)SDL_calloc(1, sizeof(*effect)); - if (!effect) { + if (effect == NULL) { return NULL; } effect->dwSize = sizeof(*effect); @@ -83,7 +82,7 @@ FFEFFECT *CreateRumbleEffectData(Sint16 magnitude) effect->dwFlags |= FFEFF_CARTESIAN; periodic = (FFPERIODIC *)SDL_calloc(1, sizeof(*periodic)); - if (!periodic) { + if (periodic == NULL) { FreeRumbleEffectData(effect); return NULL; } @@ -101,8 +100,9 @@ static recDevice *GetDeviceForIndex(int device_index) recDevice *device = gpDeviceList; while (device) { if (!device->removed) { - if (device_index == 0) + if (device_index == 0) { break; + } --device_index; } @@ -111,8 +111,7 @@ static recDevice *GetDeviceForIndex(int device_index) return device; } -static void -FreeElementList(recElement *pElement) +static void FreeElementList(recElement *pElement) { while (pElement) { recElement *pElementNext = pElement->pNext; @@ -121,8 +120,7 @@ FreeElementList(recElement *pElement) } } -static recDevice * -FreeDevice(recDevice *removeDevice) +static recDevice *FreeDevice(recDevice *removeDevice) { recDevice *pDeviceNext = NULL; if (removeDevice) { @@ -176,8 +174,7 @@ FreeDevice(recDevice *removeDevice) return pDeviceNext; } -static SDL_bool -GetHIDElementState(recDevice *pDevice, recElement *pElement, SInt32 *pValue) +static SDL_bool GetHIDElementState(recDevice *pDevice, recElement *pElement, SInt32 *pValue) { SInt32 value = 0; int returnValue = SDL_FALSE; @@ -185,7 +182,7 @@ GetHIDElementState(recDevice *pDevice, recElement *pElement, SInt32 *pValue) if (pDevice && pDevice->deviceRef && pElement) { IOHIDValueRef valueRef; if (IOHIDDeviceGetValue(pDevice->deviceRef, pElement->elementRef, &valueRef) == kIOReturnSuccess) { - value = (SInt32) IOHIDValueGetIntegerValue(valueRef); + value = (SInt32)IOHIDValueGetIntegerValue(valueRef); /* record min and max for auto calibration */ if (value < pElement->minReport) { @@ -202,30 +199,25 @@ GetHIDElementState(recDevice *pDevice, recElement *pElement, SInt32 *pValue) return returnValue; } -static SDL_bool -GetHIDScaledCalibratedState(recDevice * pDevice, recElement * pElement, SInt32 min, SInt32 max, SInt32 *pValue) +static SDL_bool GetHIDScaledCalibratedState(recDevice *pDevice, recElement *pElement, SInt32 min, SInt32 max, SInt32 *pValue) { const float deviceScale = max - min; const float readScale = pElement->maxReport - pElement->minReport; int returnValue = SDL_FALSE; - if (GetHIDElementState(pDevice, pElement, pValue)) - { + if (GetHIDElementState(pDevice, pElement, pValue)) { if (readScale == 0) { - returnValue = SDL_TRUE; /* no scaling at all */ - } - else - { + returnValue = SDL_TRUE; /* no scaling at all */ + } else { *pValue = ((*pValue - pElement->minReport) * deviceScale / readScale) + min; returnValue = SDL_TRUE; } - } + } return returnValue; } -static void -JoystickDeviceWasRemovedCallback(void *ctx, IOReturn result, void *sender) +static void JoystickDeviceWasRemovedCallback(void *ctx, IOReturn result, void *sender) { - recDevice *device = (recDevice *) ctx; + recDevice *device = (recDevice *)ctx; device->removed = SDL_TRUE; if (device->deviceRef) { // deviceRef was invalidated due to the remove @@ -252,19 +244,17 @@ JoystickDeviceWasRemovedCallback(void *ctx, IOReturn result, void *sender) SDL_PrivateJoystickRemoved(device->instance_id); } - static void AddHIDElement(const void *value, void *parameter); /* Call AddHIDElement() on all elements in an array of IOHIDElementRefs */ -static void -AddHIDElements(CFArrayRef array, recDevice *pDevice) +static void AddHIDElements(CFArrayRef array, recDevice *pDevice) { const CFRange range = { 0, CFArrayGetCount(array) }; CFArrayApplyFunction(array, range, AddHIDElement, pDevice); } -static SDL_bool -ElementAlreadyAdded(const IOHIDElementCookie cookie, const recElement *listitem) { +static SDL_bool ElementAlreadyAdded(const IOHIDElementCookie cookie, const recElement *listitem) +{ while (listitem) { if (listitem->cookie == cookie) { return SDL_TRUE; @@ -275,11 +265,10 @@ ElementAlreadyAdded(const IOHIDElementCookie cookie, const recElement *listitem) } /* See if we care about this HID element, and if so, note it in our recDevice. */ -static void -AddHIDElement(const void *value, void *parameter) +static void AddHIDElement(const void *value, void *parameter) { - recDevice *pDevice = (recDevice *) parameter; - IOHIDElementRef refElement = (IOHIDElementRef) value; + recDevice *pDevice = (recDevice *)parameter; + IOHIDElementRef refElement = (IOHIDElementRef)value; const CFTypeID elementTypeID = refElement ? CFGetTypeID(refElement) : 0; if (refElement && (elementTypeID == IOHIDElementGetTypeID())) { @@ -291,107 +280,107 @@ AddHIDElement(const void *value, void *parameter) /* look at types of interest */ switch (IOHIDElementGetType(refElement)) { - case kIOHIDElementTypeInput_Misc: - case kIOHIDElementTypeInput_Button: - case kIOHIDElementTypeInput_Axis: { - switch (usagePage) { /* only interested in kHIDPage_GenericDesktop and kHIDPage_Button */ - case kHIDPage_GenericDesktop: - switch (usage) { - case kHIDUsage_GD_X: - case kHIDUsage_GD_Y: - case kHIDUsage_GD_Z: - case kHIDUsage_GD_Rx: - case kHIDUsage_GD_Ry: - case kHIDUsage_GD_Rz: - case kHIDUsage_GD_Slider: - case kHIDUsage_GD_Dial: - case kHIDUsage_GD_Wheel: - if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { - element = (recElement *) SDL_calloc(1, sizeof (recElement)); - if (element) { - pDevice->axes++; - headElement = &(pDevice->firstAxis); - } - } - break; - - case kHIDUsage_GD_Hatswitch: - if (!ElementAlreadyAdded(cookie, pDevice->firstHat)) { - element = (recElement *) SDL_calloc(1, sizeof (recElement)); - if (element) { - pDevice->hats++; - headElement = &(pDevice->firstHat); - } - } - break; - case kHIDUsage_GD_DPadUp: - case kHIDUsage_GD_DPadDown: - case kHIDUsage_GD_DPadRight: - case kHIDUsage_GD_DPadLeft: - case kHIDUsage_GD_Start: - case kHIDUsage_GD_Select: - case kHIDUsage_GD_SystemMainMenu: - if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { - element = (recElement *) SDL_calloc(1, sizeof (recElement)); - if (element) { - pDevice->buttons++; - headElement = &(pDevice->firstButton); - } - } - break; + case kIOHIDElementTypeInput_Misc: + case kIOHIDElementTypeInput_Button: + case kIOHIDElementTypeInput_Axis: + { + switch (usagePage) { /* only interested in kHIDPage_GenericDesktop and kHIDPage_Button */ + case kHIDPage_GenericDesktop: + switch (usage) { + case kHIDUsage_GD_X: + case kHIDUsage_GD_Y: + case kHIDUsage_GD_Z: + case kHIDUsage_GD_Rx: + case kHIDUsage_GD_Ry: + case kHIDUsage_GD_Rz: + case kHIDUsage_GD_Slider: + case kHIDUsage_GD_Dial: + case kHIDUsage_GD_Wheel: + if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { + element = (recElement *)SDL_calloc(1, sizeof(recElement)); + if (element) { + pDevice->axes++; + headElement = &(pDevice->firstAxis); + } + } + break; + + case kHIDUsage_GD_Hatswitch: + if (!ElementAlreadyAdded(cookie, pDevice->firstHat)) { + element = (recElement *)SDL_calloc(1, sizeof(recElement)); + if (element) { + pDevice->hats++; + headElement = &(pDevice->firstHat); } - break; - - case kHIDPage_Simulation: - switch (usage) { - case kHIDUsage_Sim_Rudder: - case kHIDUsage_Sim_Throttle: - case kHIDUsage_Sim_Accelerator: - case kHIDUsage_Sim_Brake: - if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { - element = (recElement *) SDL_calloc(1, sizeof (recElement)); - if (element) { - pDevice->axes++; - headElement = &(pDevice->firstAxis); - } - } - break; - - default: - break; + } + break; + case kHIDUsage_GD_DPadUp: + case kHIDUsage_GD_DPadDown: + case kHIDUsage_GD_DPadRight: + case kHIDUsage_GD_DPadLeft: + case kHIDUsage_GD_Start: + case kHIDUsage_GD_Select: + case kHIDUsage_GD_SystemMainMenu: + if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { + element = (recElement *)SDL_calloc(1, sizeof(recElement)); + if (element) { + pDevice->buttons++; + headElement = &(pDevice->firstButton); } - break; - - case kHIDPage_Button: - case kHIDPage_Consumer: /* e.g. 'pause' button on Steelseries MFi gamepads. */ - if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { - element = (recElement *) SDL_calloc(1, sizeof (recElement)); - if (element) { - pDevice->buttons++; - headElement = &(pDevice->firstButton); - } + } + break; + } + break; + + case kHIDPage_Simulation: + switch (usage) { + case kHIDUsage_Sim_Rudder: + case kHIDUsage_Sim_Throttle: + case kHIDUsage_Sim_Accelerator: + case kHIDUsage_Sim_Brake: + if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { + element = (recElement *)SDL_calloc(1, sizeof(recElement)); + if (element) { + pDevice->axes++; + headElement = &(pDevice->firstAxis); } - break; + } + break; - default: - break; + default: + break; } - } - break; + break; - case kIOHIDElementTypeCollection: { - CFArrayRef array = IOHIDElementGetChildren(refElement); - if (array) { - AddHIDElements(array, pDevice); + case kHIDPage_Button: + case kHIDPage_Consumer: /* e.g. 'pause' button on Steelseries MFi gamepads. */ + if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { + element = (recElement *)SDL_calloc(1, sizeof(recElement)); + if (element) { + pDevice->buttons++; + headElement = &(pDevice->firstButton); + } } - } - break; + break; default: break; + } + } break; + + case kIOHIDElementTypeCollection: + { + CFArrayRef array = IOHIDElementGetChildren(refElement); + if (array) { + AddHIDElements(array, pDevice); + } + } break; + + default: + break; } - if (element && headElement) { /* add to list */ + if (element && headElement) { /* add to list */ recElement *elementPrevious = NULL; recElement *elementCurrent = *headElement; while (elementCurrent && usage >= elementCurrent->usage) { @@ -409,8 +398,8 @@ AddHIDElement(const void *value, void *parameter) element->usage = usage; element->pNext = elementCurrent; - element->minReport = element->min = (SInt32) IOHIDElementGetLogicalMin(refElement); - element->maxReport = element->max = (SInt32) IOHIDElementGetLogicalMax(refElement); + element->minReport = element->min = (SInt32)IOHIDElementGetLogicalMin(refElement); + element->maxReport = element->max = (SInt32)IOHIDElementGetLogicalMax(refElement); element->cookie = IOHIDElementGetCookie(refElement); pDevice->elements++; @@ -418,9 +407,7 @@ AddHIDElement(const void *value, void *parameter) } } - -static SDL_bool -GetDeviceInfo(IOHIDDeviceRef hidDevice, recDevice *pDevice) +static SDL_bool GetDeviceInfo(IOHIDDeviceRef hidDevice, recDevice *pDevice) { Sint32 vendor = 0; Sint32 product = 0; @@ -510,8 +497,7 @@ GetDeviceInfo(IOHIDDeviceRef hidDevice, recDevice *pDevice) return SDL_TRUE; } -static SDL_bool -JoystickAlreadyKnown(IOHIDDeviceRef ioHIDDeviceObject) +static SDL_bool JoystickAlreadyKnown(IOHIDDeviceRef ioHIDDeviceObject) { recDevice *i; @@ -530,12 +516,9 @@ JoystickAlreadyKnown(IOHIDDeviceRef ioHIDDeviceObject) return SDL_FALSE; } - -static void -JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) +static void JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) { recDevice *device; - int device_index = 0; io_service_t ioservice; if (res != kIOReturnSuccess) { @@ -543,18 +526,18 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic } if (JoystickAlreadyKnown(ioHIDDeviceObject)) { - return; /* IOKit sent us a duplicate. */ + return; /* IOKit sent us a duplicate. */ } - device = (recDevice *) SDL_calloc(1, sizeof(recDevice)); - if (!device) { + device = (recDevice *)SDL_calloc(1, sizeof(recDevice)); + if (device == NULL) { SDL_OutOfMemory(); return; } if (!GetDeviceInfo(ioHIDDeviceObject, device)) { FreeDevice(device); - return; /* not a device we care about, probably. */ + return; /* not a device we care about, probably. */ } if (SDL_ShouldIgnoreJoystick(device->product, device->guid)) { @@ -580,25 +563,22 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic } /* Add device to the end of the list */ - if ( !gpDeviceList ) { + if (gpDeviceList == NULL) { gpDeviceList = device; } else { recDevice *curdevice; curdevice = gpDeviceList; - while ( curdevice->pNext ) { - ++device_index; + while (curdevice->pNext != NULL) { curdevice = curdevice->pNext; } curdevice->pNext = device; - ++device_index; /* bump by one since we counted by pNext. */ } SDL_PrivateJoystickAdded(device->instance_id); } -static SDL_bool -ConfigHIDManager(CFArrayRef matchingArray) +static SDL_bool ConfigHIDManager(CFArrayRef matchingArray) { CFRunLoopRef runloop = CFRunLoopGetCurrent(); @@ -610,24 +590,22 @@ ConfigHIDManager(CFArrayRef matchingArray) IOHIDManagerRegisterDeviceMatchingCallback(hidman, JoystickDeviceWasAddedCallback, NULL); IOHIDManagerScheduleWithRunLoop(hidman, runloop, SDL_JOYSTICK_RUNLOOP_MODE); - while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) { + while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE, 0, TRUE) == kCFRunLoopRunHandledSource) { /* no-op. Callback fires once per existing device. */ } /* future hotplug events will come through SDL_JOYSTICK_RUNLOOP_MODE now. */ - return SDL_TRUE; /* good to go. */ + return SDL_TRUE; /* good to go. */ } - -static CFDictionaryRef -CreateHIDDeviceMatchDictionary(const UInt32 page, const UInt32 usage, int *okay) +static CFDictionaryRef CreateHIDDeviceMatchDictionary(const UInt32 page, const UInt32 usage, int *okay) { CFDictionaryRef retval = NULL; CFNumberRef pageNumRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &page); CFNumberRef usageNumRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &usage); - const void *keys[2] = { (void *) CFSTR(kIOHIDDeviceUsagePageKey), (void *) CFSTR(kIOHIDDeviceUsageKey) }; - const void *vals[2] = { (void *) pageNumRef, (void *) usageNumRef }; + const void *keys[2] = { (void *)CFSTR(kIOHIDDeviceUsagePageKey), (void *)CFSTR(kIOHIDDeviceUsageKey) }; + const void *vals[2] = { (void *)pageNumRef, (void *)usageNumRef }; if (pageNumRef && usageNumRef) { retval = CFDictionaryCreate(kCFAllocatorDefault, keys, vals, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -647,15 +625,14 @@ CreateHIDDeviceMatchDictionary(const UInt32 page, const UInt32 usage, int *okay) return retval; } -static SDL_bool -CreateHIDManager(void) +static SDL_bool CreateHIDManager(void) { SDL_bool retval = SDL_FALSE; int okay = 1; const void *vals[] = { - (void *) CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, &okay), - (void *) CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad, &okay), - (void *) CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_MultiAxisController, &okay), + (void *)CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, &okay), + (void *)CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad, &okay), + (void *)CreateHIDDeviceMatchDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_MultiAxisController, &okay), }; const size_t numElements = SDL_arraysize(vals); CFArrayRef array = okay ? CFArrayCreate(kCFAllocatorDefault, vals, numElements, &kCFTypeArrayCallBacks) : NULL; @@ -663,7 +640,7 @@ CreateHIDManager(void) for (i = 0; i < numElements; i++) { if (vals[i]) { - CFRelease((CFTypeRef) vals[i]); + CFRelease((CFTypeRef)vals[i]); } } @@ -678,9 +655,7 @@ CreateHIDManager(void) return retval; } - -static int -DARWIN_JoystickInit(void) +static int DARWIN_JoystickInit(void) { if (gpDeviceList) { return SDL_SetError("Joystick: Device list already inited."); @@ -693,8 +668,7 @@ DARWIN_JoystickInit(void) return 0; } -static int -DARWIN_JoystickGetCount(void) +static int DARWIN_JoystickGetCount(void) { recDevice *device = gpDeviceList; int nJoySticks = 0; @@ -709,8 +683,7 @@ DARWIN_JoystickGetCount(void) return nJoySticks; } -static void -DARWIN_JoystickDetect(void) +static void DARWIN_JoystickDetect(void) { recDevice *device = gpDeviceList; while (device) { @@ -723,37 +696,32 @@ DARWIN_JoystickDetect(void) /* run this after the checks above so we don't set device->removed and delete the device before DARWIN_JoystickUpdate can run to clean up the SDL_Joystick object that owns this device */ - while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE,0,TRUE) == kCFRunLoopRunHandledSource) { + while (CFRunLoopRunInMode(SDL_JOYSTICK_RUNLOOP_MODE, 0, TRUE) == kCFRunLoopRunHandledSource) { /* no-op. Pending callbacks will fire in CFRunLoopRunInMode(). */ } } -const char * -DARWIN_JoystickGetDeviceName(int device_index) +const char *DARWIN_JoystickGetDeviceName(int device_index) { recDevice *device = GetDeviceForIndex(device_index); return device ? device->product : "UNKNOWN"; } -const char * -DARWIN_JoystickGetDevicePath(int device_index) +const char *DARWIN_JoystickGetDevicePath(int device_index) { return NULL; } -static int -DARWIN_JoystickGetDevicePlayerIndex(int device_index) +static int DARWIN_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -DARWIN_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void DARWIN_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -DARWIN_JoystickGetDeviceGUID( int device_index ) +static SDL_JoystickGUID DARWIN_JoystickGetDeviceGUID(int device_index) { recDevice *device = GetDeviceForIndex(device_index); SDL_JoystickGUID guid; @@ -765,15 +733,13 @@ DARWIN_JoystickGetDeviceGUID( int device_index ) return guid; } -static SDL_JoystickID -DARWIN_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID DARWIN_JoystickGetDeviceInstanceID(int device_index) { recDevice *device = GetDeviceForIndex(device_index); return device ? device->instance_id : 0; } -static int -DARWIN_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int DARWIN_JoystickOpen(SDL_Joystick *joystick, int device_index) { recDevice *device = GetDeviceForIndex(device_index); @@ -792,8 +758,7 @@ DARWIN_JoystickOpen(SDL_Joystick *joystick, int device_index) /* * Like strerror but for force feedback errors. */ -static const char * -FFStrError(unsigned int err) +static const char *FFStrError(unsigned int err) { switch (err) { case FFERR_DEVICEFULL: @@ -845,8 +810,7 @@ FFStrError(unsigned int err) } } -static int -DARWIN_JoystickInitRumble(recDevice *device, Sint16 magnitude) +static int DARWIN_JoystickInitRumble(recDevice *device, Sint16 magnitude) { HRESULT result; @@ -875,23 +839,22 @@ DARWIN_JoystickInitRumble(recDevice *device, Sint16 magnitude) } result = FFDeviceCreateEffect(device->ffdevice, kFFEffectType_Sine_ID, - device->ffeffect, &device->ffeffect_ref); + device->ffeffect, &device->ffeffect_ref); if (result != FF_OK) { return SDL_SetError("Haptic: Unable to create effect: %s", FFStrError(result)); } return 0; } -static int -DARWIN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int DARWIN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { HRESULT result; recDevice *device = joystick->hwdata; /* Scale and average the two rumble strengths */ Sint16 magnitude = (Sint16)(((low_frequency_rumble / 2) + (high_frequency_rumble / 2)) / 2); - - if (!device) { + + if (device == NULL) { return SDL_SetError("Rumble failed, device disconnected"); } @@ -904,7 +867,7 @@ DARWIN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint1 periodic->dwMagnitude = CONVERT_MAGNITUDE(magnitude); result = FFEffectSetParameters(device->ffeffect_ref, device->ffeffect, - (FFEP_DURATION | FFEP_TYPESPECIFICPARAMS)); + (FFEP_DURATION | FFEP_TYPESPECIFICPARAMS)); if (result != FF_OK) { return SDL_SetError("Unable to update rumble effect: %s", FFStrError(result)); } @@ -922,19 +885,17 @@ DARWIN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint1 return 0; } -static int -DARWIN_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int DARWIN_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -DARWIN_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 DARWIN_JoystickGetCapabilities(SDL_Joystick *joystick) { recDevice *device = joystick->hwdata; Uint32 result = 0; - if (!device) { + if (device == NULL) { return 0; } @@ -945,37 +906,33 @@ DARWIN_JoystickGetCapabilities(SDL_Joystick *joystick) return result; } -static int -DARWIN_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int DARWIN_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -DARWIN_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int DARWIN_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -DARWIN_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int DARWIN_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -DARWIN_JoystickUpdate(SDL_Joystick *joystick) +static void DARWIN_JoystickUpdate(SDL_Joystick *joystick) { recDevice *device = joystick->hwdata; recElement *element; SInt32 value, range; int i, goodRead = SDL_FALSE; - if (!device) { + if (device == NULL) { return; } - if (device->removed) { /* device was unplugged; ignore it. */ + if (device->removed) { /* device was unplugged; ignore it. */ if (joystick->hwdata) { joystick->hwdata = NULL; } @@ -1000,7 +957,7 @@ DARWIN_JoystickUpdate(SDL_Joystick *joystick) while (element) { goodRead = GetHIDElementState(device, element, &value); if (goodRead) { - if (value > 1) { /* handle pressure-sensitive buttons */ + if (value > 1) { /* handle pressure-sensitive buttons */ value = 1; } SDL_PrivateJoystickButton(joystick, i, value); @@ -1012,7 +969,7 @@ DARWIN_JoystickUpdate(SDL_Joystick *joystick) element = device->firstHat; i = 0; - + while (element) { Uint8 pos = 0; @@ -1020,9 +977,9 @@ DARWIN_JoystickUpdate(SDL_Joystick *joystick) goodRead = GetHIDElementState(device, element, &value); if (goodRead) { value -= element->min; - if (range == 4) { /* 4 position hatswitch - scale up value */ + if (range == 4) { /* 4 position hatswitch - scale up value */ value *= 2; - } else if (range != 8) { /* Neither a 4 nor 8 positions - fall back to default position (centered) */ + } else if (range != 8) { /* Neither a 4 nor 8 positions - fall back to default position (centered) */ value = -1; } switch (value) { @@ -1061,14 +1018,13 @@ DARWIN_JoystickUpdate(SDL_Joystick *joystick) SDL_PrivateJoystickHat(joystick, i, pos); } - + element = element->pNext; ++i; } } -static void -DARWIN_JoystickClose(SDL_Joystick *joystick) +static void DARWIN_JoystickClose(SDL_Joystick *joystick) { recDevice *device = joystick->hwdata; if (device) { @@ -1076,8 +1032,7 @@ DARWIN_JoystickClose(SDL_Joystick *joystick) } } -static void -DARWIN_JoystickQuit(void) +static void DARWIN_JoystickQuit(void) { while (FreeDevice(gpDeviceList)) { /* spin */ @@ -1091,14 +1046,12 @@ DARWIN_JoystickQuit(void) } } -static SDL_bool -DARWIN_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool DARWIN_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_DARWIN_JoystickDriver = -{ +SDL_JoystickDriver SDL_DARWIN_JoystickDriver = { DARWIN_JoystickInit, DARWIN_JoystickGetCount, DARWIN_JoystickDetect, diff --git a/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick_c.h b/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick_c.h index a9dde59..aec2550 100644 --- a/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick_c.h +++ b/modules/SDL2/src/joystick/darwin/SDL_iokitjoystick_c.h @@ -31,35 +31,35 @@ struct recElement { IOHIDElementRef elementRef; IOHIDElementCookie cookie; - uint32_t usagePage, usage; /* HID usage */ - SInt32 min; /* reported min value possible */ - SInt32 max; /* reported max value possible */ + uint32_t usagePage, usage; /* HID usage */ + SInt32 min; /* reported min value possible */ + SInt32 max; /* reported max value possible */ /* runtime variables used for auto-calibration */ - SInt32 minReport; /* min returned value */ - SInt32 maxReport; /* max returned value */ + SInt32 minReport; /* min returned value */ + SInt32 maxReport; /* max returned value */ - struct recElement *pNext; /* next element in list */ + struct recElement *pNext; /* next element in list */ }; typedef struct recElement recElement; struct joystick_hwdata { - IOHIDDeviceRef deviceRef; /* HIDManager device handle */ - io_service_t ffservice; /* Interface for force feedback, 0 = no ff */ + IOHIDDeviceRef deviceRef; /* HIDManager device handle */ + io_service_t ffservice; /* Interface for force feedback, 0 = no ff */ FFDeviceObjectReference ffdevice; FFEFFECT *ffeffect; FFEffectObjectReference ffeffect_ref; SDL_bool ff_initialized; - char product[256]; /* name of product */ - uint32_t usage; /* usage page from IOUSBHID Parser.h which defines general usage */ - uint32_t usagePage; /* usage within above page from IOUSBHID Parser.h which defines specific usage */ + char product[256]; /* name of product */ + uint32_t usage; /* usage page from IOUSBHID Parser.h which defines general usage */ + uint32_t usagePage; /* usage within above page from IOUSBHID Parser.h which defines specific usage */ - int axes; /* number of axis (calculated, not reported by device) */ - int buttons; /* number of buttons (calculated, not reported by device) */ - int hats; /* number of hat switches (calculated, not reported by device) */ - int elements; /* number of total elements (should be total of above) (calculated, not reported by device) */ + int axes; /* number of axis (calculated, not reported by device) */ + int buttons; /* number of buttons (calculated, not reported by device) */ + int hats; /* number of hat switches (calculated, not reported by device) */ + int elements; /* number of total elements (should be total of above) (calculated, not reported by device) */ recElement *firstAxis; recElement *firstButton; @@ -67,12 +67,12 @@ struct joystick_hwdata SDL_bool removed; SDL_Joystick *joystick; - SDL_bool runLoopAttached; /* is 'deviceRef' attached to a CFRunLoop? */ + SDL_bool runLoopAttached; /* is 'deviceRef' attached to a CFRunLoop? */ int instance_id; SDL_JoystickGUID guid; - struct joystick_hwdata *pNext; /* next device */ + struct joystick_hwdata *pNext; /* next device */ }; typedef struct joystick_hwdata recDevice; diff --git a/modules/SDL2/src/joystick/dummy/SDL_sysjoystick.c b/modules/SDL2/src/joystick/dummy/SDL_sysjoystick.c index 1d73aae..bf1284d 100644 --- a/modules/SDL2/src/joystick/dummy/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/dummy/SDL_sysjoystick.c @@ -28,126 +28,104 @@ #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" - -static int -DUMMY_JoystickInit(void) +static int DUMMY_JoystickInit(void) { return 0; } -static int -DUMMY_JoystickGetCount(void) +static int DUMMY_JoystickGetCount(void) { return 0; } -static void -DUMMY_JoystickDetect(void) +static void DUMMY_JoystickDetect(void) { } -static const char * -DUMMY_JoystickGetDeviceName(int device_index) +static const char *DUMMY_JoystickGetDeviceName(int device_index) { return NULL; } -static const char * -DUMMY_JoystickGetDevicePath(int device_index) +static const char *DUMMY_JoystickGetDevicePath(int device_index) { return NULL; } -static int -DUMMY_JoystickGetDevicePlayerIndex(int device_index) +static int DUMMY_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -DUMMY_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void DUMMY_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -DUMMY_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID DUMMY_JoystickGetDeviceGUID(int device_index) { SDL_JoystickGUID guid; SDL_zero(guid); return guid; } -static SDL_JoystickID -DUMMY_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID DUMMY_JoystickGetDeviceInstanceID(int device_index) { return -1; } -static int -DUMMY_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int DUMMY_JoystickOpen(SDL_Joystick *joystick, int device_index) { return SDL_SetError("Logic error: No joysticks available"); } -static int -DUMMY_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int DUMMY_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -DUMMY_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int DUMMY_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -DUMMY_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 DUMMY_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -static int -DUMMY_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int DUMMY_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -DUMMY_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int DUMMY_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -DUMMY_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int DUMMY_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -DUMMY_JoystickUpdate(SDL_Joystick *joystick) +static void DUMMY_JoystickUpdate(SDL_Joystick *joystick) { } -static void -DUMMY_JoystickClose(SDL_Joystick *joystick) +static void DUMMY_JoystickClose(SDL_Joystick *joystick) { } -static void -DUMMY_JoystickQuit(void) +static void DUMMY_JoystickQuit(void) { } -static SDL_bool -DUMMY_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool DUMMY_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_DUMMY_JoystickDriver = -{ +SDL_JoystickDriver SDL_DUMMY_JoystickDriver = { DUMMY_JoystickInit, DUMMY_JoystickGetCount, DUMMY_JoystickDetect, diff --git a/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick.c b/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick.c index f6783f9..81544fd 100644 --- a/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick.c @@ -32,25 +32,24 @@ #include "SDL_sysjoystick_c.h" #include "../SDL_joystick_c.h" -static SDL_joylist_item * JoystickByIndex(int index); +static SDL_joylist_item *JoystickByIndex(int index); static SDL_joylist_item *SDL_joylist = NULL; static SDL_joylist_item *SDL_joylist_tail = NULL; static int numjoysticks = 0; static int instance_counter = 0; -static EM_BOOL -Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData) +static EM_BOOL Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData) { int i; SDL_joylist_item *item; if (JoystickByIndex(gamepadEvent->index) != NULL) { - return 1; + return 1; } - item = (SDL_joylist_item *) SDL_malloc(sizeof (SDL_joylist_item)); + item = (SDL_joylist_item *)SDL_malloc(sizeof(SDL_joylist_item)); if (item == NULL) { return 1; } @@ -59,13 +58,13 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa item->index = gamepadEvent->index; item->name = SDL_CreateJoystickName(0, 0, NULL, gamepadEvent->id); - if ( item->name == NULL ) { + if (item->name == NULL) { SDL_free(item); return 1; } item->mapping = SDL_strdup(gamepadEvent->mapping); - if ( item->mapping == NULL ) { + if (item->mapping == NULL) { SDL_free(item->name); SDL_free(item); return 1; @@ -77,11 +76,11 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa item->timestamp = gamepadEvent->timestamp; - for( i = 0; i < item->naxes; i++) { + for (i = 0; i < item->naxes; i++) { item->axis[i] = gamepadEvent->axis[i]; } - for( i = 0; i < item->nbuttons; i++) { + for (i = 0; i < item->nbuttons; i++) { item->analogButton[i] = gamepadEvent->analogButton[i]; item->digitalButton[i] = gamepadEvent->digitalButton[i]; } @@ -108,8 +107,7 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa return 1; } -static EM_BOOL -Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData) +static EM_BOOL Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData) { SDL_joylist_item *item = SDL_joylist; SDL_joylist_item *prev = NULL; @@ -155,8 +153,7 @@ Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gam } /* Function to perform any system-specific joystick related cleanup */ -static void -EMSCRIPTEN_JoystickQuit(void) +static void EMSCRIPTEN_JoystickQuit(void) { SDL_joylist_item *item = NULL; SDL_joylist_item *next = NULL; @@ -180,8 +177,7 @@ EMSCRIPTEN_JoystickQuit(void) /* Function to scan the system for joysticks. * It should return 0, or -1 on an unrecoverable fatal error. */ -static int -EMSCRIPTEN_JoystickInit(void) +static int EMSCRIPTEN_JoystickInit(void) { int retval, i, numjs; EmscriptenGamepadEvent gamepadState; @@ -199,7 +195,7 @@ EMSCRIPTEN_JoystickInit(void) /* handle already connected gamepads */ if (numjs > 0) { - for(i = 0; i < numjs; i++) { + for (i = 0; i < numjs; i++) { retval = emscripten_get_gamepad_status(i, &gamepadState); if (retval == EMSCRIPTEN_RESULT_SUCCESS) { Emscripten_JoyStickConnected(EMSCRIPTEN_EVENT_GAMEPADCONNECTED, @@ -213,7 +209,7 @@ EMSCRIPTEN_JoystickInit(void) 0, Emscripten_JoyStickConnected); - if(retval != EMSCRIPTEN_RESULT_SUCCESS) { + if (retval != EMSCRIPTEN_RESULT_SUCCESS) { EMSCRIPTEN_JoystickQuit(); return SDL_SetError("Could not set gamepad connect callback"); } @@ -221,7 +217,7 @@ EMSCRIPTEN_JoystickInit(void) retval = emscripten_set_gamepaddisconnected_callback(NULL, 0, Emscripten_JoyStickDisconnected); - if(retval != EMSCRIPTEN_RESULT_SUCCESS) { + if (retval != EMSCRIPTEN_RESULT_SUCCESS) { EMSCRIPTEN_JoystickQuit(); return SDL_SetError("Could not set gamepad disconnect callback"); } @@ -230,8 +226,7 @@ EMSCRIPTEN_JoystickInit(void) } /* Returns item matching given SDL device index. */ -static SDL_joylist_item * -JoystickByDeviceIndex(int device_index) +static SDL_joylist_item *JoystickByDeviceIndex(int device_index) { SDL_joylist_item *item = SDL_joylist; @@ -244,8 +239,7 @@ JoystickByDeviceIndex(int device_index) } /* Returns item matching given HTML gamepad index. */ -static SDL_joylist_item * -JoystickByIndex(int index) +static SDL_joylist_item *JoystickByIndex(int index) { SDL_joylist_item *item = SDL_joylist; @@ -263,42 +257,35 @@ JoystickByIndex(int index) return item; } -static int -EMSCRIPTEN_JoystickGetCount(void) +static int EMSCRIPTEN_JoystickGetCount(void) { return numjoysticks; } -static void -EMSCRIPTEN_JoystickDetect(void) +static void EMSCRIPTEN_JoystickDetect(void) { } -static const char * -EMSCRIPTEN_JoystickGetDeviceName(int device_index) +static const char *EMSCRIPTEN_JoystickGetDeviceName(int device_index) { return JoystickByDeviceIndex(device_index)->name; } -static const char * -EMSCRIPTEN_JoystickGetDevicePath(int device_index) +static const char *EMSCRIPTEN_JoystickGetDevicePath(int device_index) { return NULL; } -static int -EMSCRIPTEN_JoystickGetDevicePlayerIndex(int device_index) +static int EMSCRIPTEN_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -EMSCRIPTEN_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void EMSCRIPTEN_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickID -EMSCRIPTEN_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID EMSCRIPTEN_JoystickGetDeviceInstanceID(int device_index) { return JoystickByDeviceIndex(device_index)->device_instance; } @@ -308,12 +295,11 @@ EMSCRIPTEN_JoystickGetDeviceInstanceID(int device_index) This should fill the nbuttons and naxes fields of the joystick structure. It returns 0, or -1 if there is an error. */ -static int -EMSCRIPTEN_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int EMSCRIPTEN_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_joylist_item *item = JoystickByDeviceIndex(device_index); - if (item == NULL ) { + if (item == NULL) { return SDL_SetError("No such device"); } @@ -322,7 +308,7 @@ EMSCRIPTEN_JoystickOpen(SDL_Joystick *joystick, int device_index) } joystick->instance_id = item->device_instance; - joystick->hwdata = (struct joystick_hwdata *) item; + joystick->hwdata = (struct joystick_hwdata *)item; item->joystick = joystick; /* HTML5 Gamepad API doesn't say anything about these */ @@ -332,7 +318,7 @@ EMSCRIPTEN_JoystickOpen(SDL_Joystick *joystick, int device_index) joystick->nbuttons = item->nbuttons; joystick->naxes = item->naxes; - return (0); + return 0; } /* Function to update the state of a joystick - called as a device poll. @@ -340,22 +326,21 @@ EMSCRIPTEN_JoystickOpen(SDL_Joystick *joystick, int device_index) * but instead should call SDL_PrivateJoystick*() to deliver events * and update joystick device state. */ -static void -EMSCRIPTEN_JoystickUpdate(SDL_Joystick *joystick) +static void EMSCRIPTEN_JoystickUpdate(SDL_Joystick *joystick) { EmscriptenGamepadEvent gamepadState; - SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata; + SDL_joylist_item *item = (SDL_joylist_item *)joystick->hwdata; int i, result, buttonState; emscripten_sample_gamepad_data(); if (item) { result = emscripten_get_gamepad_status(item->index, &gamepadState); - if( result == EMSCRIPTEN_RESULT_SUCCESS) { - if(gamepadState.timestamp == 0 || gamepadState.timestamp != item->timestamp) { - for(i = 0; i < item->nbuttons; i++) { - if(item->digitalButton[i] != gamepadState.digitalButton[i]) { - buttonState = gamepadState.digitalButton[i]? SDL_PRESSED: SDL_RELEASED; + if (result == EMSCRIPTEN_RESULT_SUCCESS) { + if (gamepadState.timestamp == 0 || gamepadState.timestamp != item->timestamp) { + for (i = 0; i < item->nbuttons; i++) { + if (item->digitalButton[i] != gamepadState.digitalButton[i]) { + buttonState = gamepadState.digitalButton[i] ? SDL_PRESSED : SDL_RELEASED; SDL_PrivateJoystickButton(item->joystick, i, buttonState); } @@ -364,11 +349,11 @@ EMSCRIPTEN_JoystickUpdate(SDL_Joystick *joystick) item->digitalButton[i] = gamepadState.digitalButton[i]; } - for(i = 0; i < item->naxes; i++) { - if(item->axis[i] != gamepadState.axis[i]) { + for (i = 0; i < item->naxes; i++) { + if (item->axis[i] != gamepadState.axis[i]) { /* do we need to do conversion? */ SDL_PrivateJoystickAxis(item->joystick, i, - (Sint16) (32767.*gamepadState.axis[i])); + (Sint16)(32767. * gamepadState.axis[i])); } /* store to compare in next update */ @@ -382,67 +367,57 @@ EMSCRIPTEN_JoystickUpdate(SDL_Joystick *joystick) } /* Function to close a joystick after use */ -static void -EMSCRIPTEN_JoystickClose(SDL_Joystick *joystick) +static void EMSCRIPTEN_JoystickClose(SDL_Joystick *joystick) { - SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata; + SDL_joylist_item *item = (SDL_joylist_item *)joystick->hwdata; if (item) { item->joystick = NULL; } } -static SDL_JoystickGUID -EMSCRIPTEN_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID EMSCRIPTEN_JoystickGetDeviceGUID(int device_index) { /* the GUID is just the name for now */ const char *name = EMSCRIPTEN_JoystickGetDeviceName(device_index); return SDL_CreateJoystickGUIDForName(name); } -static int -EMSCRIPTEN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int EMSCRIPTEN_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -EMSCRIPTEN_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int EMSCRIPTEN_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static SDL_bool -EMSCRIPTEN_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool EMSCRIPTEN_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -static Uint32 -EMSCRIPTEN_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 EMSCRIPTEN_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -static int -EMSCRIPTEN_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int EMSCRIPTEN_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -EMSCRIPTEN_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int EMSCRIPTEN_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -EMSCRIPTEN_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int EMSCRIPTEN_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -SDL_JoystickDriver SDL_EMSCRIPTEN_JoystickDriver = -{ +SDL_JoystickDriver SDL_EMSCRIPTEN_JoystickDriver = { EMSCRIPTEN_JoystickInit, EMSCRIPTEN_JoystickGetCount, EMSCRIPTEN_JoystickDetect, diff --git a/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h b/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h index fd9f875..c9a2674 100644 --- a/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h +++ b/modules/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h @@ -24,25 +24,24 @@ #ifdef SDL_JOYSTICK_EMSCRIPTEN #include "../SDL_sysjoystick.h" - #include /* A linked list of available joysticks */ typedef struct SDL_joylist_item { - int index; - char *name; - char *mapping; - SDL_JoystickID device_instance; - SDL_Joystick *joystick; - int nbuttons; - int naxes; - double timestamp; - double axis[64]; - double analogButton[64]; - EM_BOOL digitalButton[64]; - - struct SDL_joylist_item *next; + int index; + char *name; + char *mapping; + SDL_JoystickID device_instance; + SDL_Joystick *joystick; + int nbuttons; + int naxes; + double timestamp; + double axis[64]; + double analogButton[64]; + EM_BOOL digitalButton[64]; + + struct SDL_joylist_item *next; } SDL_joylist_item; typedef SDL_joylist_item joystick_hwdata; diff --git a/modules/SDL2/src/joystick/haiku/SDL_haikujoystick.cc b/modules/SDL2/src/joystick/haiku/SDL_haikujoystick.cc index 19a2827..37e89c3 100644 --- a/modules/SDL2/src/joystick/haiku/SDL_haikujoystick.cc +++ b/modules/SDL2/src/joystick/haiku/SDL_haikujoystick.cc @@ -66,10 +66,9 @@ extern "C" /* Search for attached joysticks */ nports = joystick.CountDevices(); numjoysticks = 0; - SDL_memset(SDL_joyport, 0, (sizeof SDL_joyport)); - SDL_memset(SDL_joyname, 0, (sizeof SDL_joyname)); - for (i = 0; (numjoysticks < MAX_JOYSTICKS) && (i < nports); ++i) - { + SDL_memset(SDL_joyport, 0, sizeof(SDL_joyport)); + SDL_memset(SDL_joyname, 0, sizeof(SDL_joyname)); + for (i = 0; (numjoysticks < MAX_JOYSTICKS) && (i < nports); ++i) { if (joystick.GetDeviceName(i, name) == B_OK) { if (joystick.Open(name) != B_ERROR) { BString stick_name; diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_combined.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_combined.c index 3b9cce9..ccf1662 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_combined.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_combined.c @@ -28,54 +28,47 @@ #include "SDL_hidapijoystick_c.h" #include "../SDL_sysjoystick.h" - -static void -HIDAPI_DriverCombined_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverCombined_RegisterHints(SDL_HintCallback callback, void *userdata) { } -static void -HIDAPI_DriverCombined_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverCombined_UnregisterHints(SDL_HintCallback callback, void *userdata) { } -static SDL_bool -HIDAPI_DriverCombined_IsEnabled(void) +static SDL_bool HIDAPI_DriverCombined_IsEnabled(void) { return SDL_TRUE; } -static SDL_bool -HIDAPI_DriverCombined_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverCombined_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { /* This is always explicitly created for combined devices */ return SDL_FALSE; } -static SDL_bool -HIDAPI_DriverCombined_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverCombined_InitDevice(SDL_HIDAPI_Device *device) { return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverCombined_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverCombined_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverCombined_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverCombined_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { int i; char *serial = NULL, *new_serial; size_t serial_length = 0, new_length; + SDL_AssertJoysticksLocked(); + for (i = 0; i < device->num_children; ++i) { SDL_HIDAPI_Device *child = device->children[i]; if (!child->driver->OpenJoystick(child, joystick)) { @@ -117,8 +110,7 @@ HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys return SDL_TRUE; } -static int -HIDAPI_DriverCombined_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverCombined_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { int i; int result = -1; @@ -132,8 +124,7 @@ HIDAPI_DriverCombined_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *jo return result; } -static int -HIDAPI_DriverCombined_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverCombined_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { int i; int result = -1; @@ -147,8 +138,7 @@ HIDAPI_DriverCombined_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joys return result; } -static Uint32 -HIDAPI_DriverCombined_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverCombined_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { int i; Uint32 caps = 0; @@ -160,8 +150,7 @@ HIDAPI_DriverCombined_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joy return caps; } -static int -HIDAPI_DriverCombined_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverCombined_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { int i; int result = -1; @@ -175,14 +164,12 @@ HIDAPI_DriverCombined_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *jo return result; } -static int -HIDAPI_DriverCombined_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverCombined_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverCombined_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverCombined_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { int i; int result = -1; @@ -196,8 +183,7 @@ HIDAPI_DriverCombined_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_J return result; } -static SDL_bool -HIDAPI_DriverCombined_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverCombined_UpdateDevice(SDL_HIDAPI_Device *device) { int i; int result = SDL_TRUE; @@ -211,8 +197,7 @@ HIDAPI_DriverCombined_UpdateDevice(SDL_HIDAPI_Device *device) return result; } -static void -HIDAPI_DriverCombined_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverCombined_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { int i; @@ -222,13 +207,11 @@ HIDAPI_DriverCombined_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy } } -static void -HIDAPI_DriverCombined_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverCombined_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverCombined = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverCombined = { "SDL_JOYSTICK_HIDAPI_COMBINED", SDL_TRUE, HIDAPI_DriverCombined_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_gamecube.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_gamecube.c index 36bc6d0..b4c7e69 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_gamecube.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_gamecube.c @@ -33,7 +33,6 @@ #include "SDL_hidapi_rumble.h" #include "../../hidapi/SDL_hidapi_c.h" - #ifdef SDL_JOYSTICK_HIDAPI_GAMECUBE /* Define this if you want to log all packets from the controller */ @@ -41,42 +40,39 @@ #define MAX_CONTROLLERS 4 -typedef struct { +typedef struct +{ SDL_bool pc_mode; SDL_JoystickID joysticks[MAX_CONTROLLERS]; Uint8 wireless[MAX_CONTROLLERS]; - Uint8 min_axis[MAX_CONTROLLERS*SDL_CONTROLLER_AXIS_MAX]; - Uint8 max_axis[MAX_CONTROLLERS*SDL_CONTROLLER_AXIS_MAX]; + Uint8 min_axis[MAX_CONTROLLERS * SDL_CONTROLLER_AXIS_MAX]; + Uint8 max_axis[MAX_CONTROLLERS * SDL_CONTROLLER_AXIS_MAX]; Uint8 rumbleAllowed[MAX_CONTROLLERS]; - Uint8 rumble[1+MAX_CONTROLLERS]; + Uint8 rumble[1 + MAX_CONTROLLERS]; /* Without this variable, hid_write starts to lag a TON */ SDL_bool rumbleUpdate; SDL_bool m_bUseButtonLabels; SDL_bool useRumbleBrake; } SDL_DriverGameCube_Context; -static void -HIDAPI_DriverGameCube_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverGameCube_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, callback, userdata); } -static void -HIDAPI_DriverGameCube_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverGameCube_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, callback, userdata); } -static SDL_bool -HIDAPI_DriverGameCube_IsEnabled(void) +static SDL_bool HIDAPI_DriverGameCube_IsEnabled(void) { return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, + SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverGameCube_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverGameCube_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { if (vendor_id == USB_VENDOR_NINTENDO && product_id == USB_PRODUCT_NINTENDO_GAMECUBE_ADAPTER) { /* Nintendo Co., Ltd. Wii U GameCube Controller Adapter */ @@ -89,15 +85,14 @@ HIDAPI_DriverGameCube_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *n return SDL_FALSE; } -static void -ResetAxisRange(SDL_DriverGameCube_Context *ctx, int joystick_index) +static void ResetAxisRange(SDL_DriverGameCube_Context *ctx, int joystick_index) { - SDL_memset(&ctx->min_axis[joystick_index*SDL_CONTROLLER_AXIS_MAX], 128-88, SDL_CONTROLLER_AXIS_MAX); - SDL_memset(&ctx->max_axis[joystick_index*SDL_CONTROLLER_AXIS_MAX], 128+88, SDL_CONTROLLER_AXIS_MAX); + SDL_memset(&ctx->min_axis[joystick_index * SDL_CONTROLLER_AXIS_MAX], 128 - 88, SDL_CONTROLLER_AXIS_MAX); + SDL_memset(&ctx->max_axis[joystick_index * SDL_CONTROLLER_AXIS_MAX], 128 + 88, SDL_CONTROLLER_AXIS_MAX); /* Trigger axes may have a higher resting value */ - ctx->min_axis[joystick_index*SDL_CONTROLLER_AXIS_MAX+SDL_CONTROLLER_AXIS_TRIGGERLEFT] = 40; - ctx->min_axis[joystick_index*SDL_CONTROLLER_AXIS_MAX+SDL_CONTROLLER_AXIS_TRIGGERRIGHT] = 40; + ctx->min_axis[joystick_index * SDL_CONTROLLER_AXIS_MAX + SDL_CONTROLLER_AXIS_TRIGGERLEFT] = 40; + ctx->min_axis[joystick_index * SDL_CONTROLLER_AXIS_MAX + SDL_CONTROLLER_AXIS_TRIGGERRIGHT] = 40; } static void SDLCALL SDL_GameControllerButtonReportingHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint) @@ -130,8 +125,7 @@ static Uint8 RemapButton(SDL_DriverGameCube_Context *ctx, Uint8 button) return button; } -static SDL_bool -HIDAPI_DriverGameCube_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverGameCube_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverGameCube_Context *ctx; Uint8 packet[37]; @@ -146,7 +140,7 @@ HIDAPI_DriverGameCube_InitDevice(SDL_HIDAPI_Device *device) #endif ctx = (SDL_DriverGameCube_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -194,7 +188,7 @@ HIDAPI_DriverGameCube_InitDevice(SDL_HIDAPI_Device *device) ctx->wireless[i] = (curSlot[0] & 0x20) != 0; /* Only allow rumble if the adapter's second USB cable is connected */ - ctx->rumbleAllowed[i] = (curSlot[0] & 0x04) != 0 && !ctx->wireless[i]; + ctx->rumbleAllowed[i] = (curSlot[0] & 0x04) && !ctx->wireless[i]; if (curSlot[0] & 0x30) { /* 0x10 - Wired, 0x20 - Wireless */ if (ctx->joysticks[i] == -1) { @@ -222,8 +216,7 @@ HIDAPI_DriverGameCube_InitDevice(SDL_HIDAPI_Device *device) return SDL_TRUE; } -static int -HIDAPI_DriverGameCube_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverGameCube_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; Uint8 i; @@ -236,13 +229,11 @@ HIDAPI_DriverGameCube_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joysti return -1; } -static void -HIDAPI_DriverGameCube_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverGameCube_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static void -HIDAPI_DriverGameCube_HandleJoystickPacket(SDL_HIDAPI_Device *device, SDL_DriverGameCube_Context *ctx, Uint8 *packet, int size) +static void HIDAPI_DriverGameCube_HandleJoystickPacket(SDL_HIDAPI_Device *device, SDL_DriverGameCube_Context *ctx, const Uint8 *packet, int size) { SDL_Joystick *joystick; Uint8 i, v; @@ -258,17 +249,16 @@ HIDAPI_DriverGameCube_HandleJoystickPacket(SDL_HIDAPI_Device *device, SDL_Driver } joystick = SDL_JoystickFromInstanceID(ctx->joysticks[i]); - if (!joystick) { + if (joystick == NULL) { /* Hasn't been opened yet, skip */ return; } - #define READ_BUTTON(off, flag, button) \ - SDL_PrivateJoystickButton( \ - joystick, \ - RemapButton(ctx, button), \ - (packet[off] & flag) ? SDL_PRESSED : SDL_RELEASED \ - ); +#define READ_BUTTON(off, flag, button) \ + SDL_PrivateJoystickButton( \ + joystick, \ + RemapButton(ctx, button), \ + (packet[off] & flag) ? SDL_PRESSED : SDL_RELEASED); READ_BUTTON(1, 0x02, 0) /* A */ READ_BUTTON(1, 0x04, 1) /* B */ READ_BUTTON(1, 0x01, 2) /* X */ @@ -285,28 +275,28 @@ HIDAPI_DriverGameCube_HandleJoystickPacket(SDL_HIDAPI_Device *device, SDL_Driver */ READ_BUTTON(1, 0x20, 10) /* TRIGGERRIGHT */ READ_BUTTON(1, 0x10, 11) /* TRIGGERLEFT */ - #undef READ_BUTTON - - #define READ_AXIS(off, axis, invert) \ - v = invert ? (0xff - packet[off]) : packet[off]; \ - if (v < ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis]) ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis] = v; \ - if (v > ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis]) ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis] = v; \ - axis_value = (Sint16)HIDAPI_RemapVal(v, ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis], ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis], SDL_MIN_SINT16, SDL_MAX_SINT16); \ - SDL_PrivateJoystickAxis( \ - joystick, \ - axis, axis_value \ - ); +#undef READ_BUTTON + +#define READ_AXIS(off, axis, invert) \ + v = invert ? (0xff - packet[off]) : packet[off]; \ + if (v < ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis]) \ + ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis] = v; \ + if (v > ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis]) \ + ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis] = v; \ + axis_value = (Sint16)HIDAPI_RemapVal(v, ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis], ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis], SDL_MIN_SINT16, SDL_MAX_SINT16); \ + SDL_PrivateJoystickAxis( \ + joystick, \ + axis, axis_value); READ_AXIS(3, SDL_CONTROLLER_AXIS_LEFTX, 0) READ_AXIS(4, SDL_CONTROLLER_AXIS_LEFTY, 0) READ_AXIS(6, SDL_CONTROLLER_AXIS_RIGHTX, 1) READ_AXIS(5, SDL_CONTROLLER_AXIS_RIGHTY, 1) READ_AXIS(7, SDL_CONTROLLER_AXIS_TRIGGERLEFT, 0) READ_AXIS(8, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, 0) - #undef READ_AXIS +#undef READ_AXIS } -static void -HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device, SDL_DriverGameCube_Context *ctx, Uint8 *packet, int size) +static void HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device, SDL_DriverGameCube_Context *ctx, Uint8 *packet, int size) { SDL_Joystick *joystick; Uint8 *curSlot; @@ -323,7 +313,7 @@ HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device, SDL_Driver ctx->wireless[i] = (curSlot[0] & 0x20) != 0; /* Only allow rumble if the adapter's second USB cable is connected */ - ctx->rumbleAllowed[i] = (curSlot[0] & 0x04) != 0 && !ctx->wireless[i]; + ctx->rumbleAllowed[i] = (curSlot[0] & 0x04) && !ctx->wireless[i]; if (curSlot[0] & 0x30) { /* 0x10 - Wired, 0x20 - Wireless */ if (ctx->joysticks[i] == -1) { @@ -344,12 +334,11 @@ HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device, SDL_Driver continue; } - #define READ_BUTTON(off, flag, button) \ - SDL_PrivateJoystickButton( \ - joystick, \ - RemapButton(ctx, button), \ - (curSlot[off] & flag) ? SDL_PRESSED : SDL_RELEASED \ - ); +#define READ_BUTTON(off, flag, button) \ + SDL_PrivateJoystickButton( \ + joystick, \ + RemapButton(ctx, button), \ + (curSlot[off] & flag) ? SDL_PRESSED : SDL_RELEASED); READ_BUTTON(1, 0x01, 0) /* A */ READ_BUTTON(1, 0x04, 1) /* B */ READ_BUTTON(1, 0x02, 2) /* X */ @@ -366,28 +355,28 @@ HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device, SDL_Driver */ READ_BUTTON(2, 0x04, 10) /* TRIGGERRIGHT */ READ_BUTTON(2, 0x08, 11) /* TRIGGERLEFT */ - #undef READ_BUTTON - - #define READ_AXIS(off, axis) \ - if (curSlot[off] < ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis]) ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis] = curSlot[off]; \ - if (curSlot[off] > ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis]) ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis] = curSlot[off]; \ - axis_value = (Sint16)HIDAPI_RemapVal(curSlot[off], ctx->min_axis[i*SDL_CONTROLLER_AXIS_MAX+axis], ctx->max_axis[i*SDL_CONTROLLER_AXIS_MAX+axis], SDL_MIN_SINT16, SDL_MAX_SINT16); \ - SDL_PrivateJoystickAxis( \ - joystick, \ - axis, axis_value \ - ); +#undef READ_BUTTON + +#define READ_AXIS(off, axis) \ + if (curSlot[off] < ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis]) \ + ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis] = curSlot[off]; \ + if (curSlot[off] > ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis]) \ + ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis] = curSlot[off]; \ + axis_value = (Sint16)HIDAPI_RemapVal(curSlot[off], ctx->min_axis[i * SDL_CONTROLLER_AXIS_MAX + axis], ctx->max_axis[i * SDL_CONTROLLER_AXIS_MAX + axis], SDL_MIN_SINT16, SDL_MAX_SINT16); \ + SDL_PrivateJoystickAxis( \ + joystick, \ + axis, axis_value); READ_AXIS(3, SDL_CONTROLLER_AXIS_LEFTX) READ_AXIS(4, SDL_CONTROLLER_AXIS_LEFTY) READ_AXIS(5, SDL_CONTROLLER_AXIS_RIGHTX) READ_AXIS(6, SDL_CONTROLLER_AXIS_RIGHTY) READ_AXIS(7, SDL_CONTROLLER_AXIS_TRIGGERLEFT) READ_AXIS(8, SDL_CONTROLLER_AXIS_TRIGGERRIGHT) - #undef READ_AXIS +#undef READ_AXIS } } -static SDL_bool -HIDAPI_DriverGameCube_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverGameCube_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; Uint8 packet[USB_PACKET_LENGTH]; @@ -396,7 +385,7 @@ HIDAPI_DriverGameCube_UpdateDevice(SDL_HIDAPI_Device *device) /* Read input packet */ while ((size = SDL_hid_read_timeout(device->dev, packet, sizeof(packet), 0)) > 0) { #ifdef DEBUG_GAMECUBE_PROTOCOL - //HIDAPI_DumpPacket("Nintendo GameCube packet: size = %d", packet, size); + // HIDAPI_DumpPacket("Nintendo GameCube packet: size = %d", packet, size); #endif if (ctx->pc_mode) { HIDAPI_DriverGameCube_HandleJoystickPacket(device, ctx, packet, size); @@ -415,11 +404,13 @@ HIDAPI_DriverGameCube_UpdateDevice(SDL_HIDAPI_Device *device) return SDL_TRUE; } -static SDL_bool -HIDAPI_DriverGameCube_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverGameCube_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; Uint8 i; + + SDL_AssertJoysticksLocked(); + for (i = 0; i < MAX_CONTROLLERS; i += 1) { if (joystick->instance_id == ctx->joysticks[i]) { joystick->nbuttons = 12; @@ -431,12 +422,13 @@ HIDAPI_DriverGameCube_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys return SDL_FALSE; /* Should never get here! */ } -static int -HIDAPI_DriverGameCube_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverGameCube_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; Uint8 i, val; + SDL_AssertJoysticksLocked(); + if (ctx->pc_mode) { return SDL_Unsupported(); } @@ -472,18 +464,18 @@ HIDAPI_DriverGameCube_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *jo return SDL_SetError("Couldn't find joystick"); } -static int -HIDAPI_DriverGameCube_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverGameCube_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverGameCube_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverGameCube_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; Uint32 result = 0; + SDL_AssertJoysticksLocked(); + if (!ctx->pc_mode) { Uint8 i; @@ -500,26 +492,22 @@ HIDAPI_DriverGameCube_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joy return result; } -static int -HIDAPI_DriverGameCube_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverGameCube_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverGameCube_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverGameCube_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverGameCube_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverGameCube_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverGameCube_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverGameCube_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; @@ -530,8 +518,7 @@ HIDAPI_DriverGameCube_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy } } -static void -HIDAPI_DriverGameCube_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverGameCube_FreeDevice(SDL_HIDAPI_Device *device) { SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context; @@ -541,8 +528,7 @@ HIDAPI_DriverGameCube_FreeDevice(SDL_HIDAPI_Device *device) SDL_JoystickGameCubeRumbleBrakeHintChanged, ctx); } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverGameCube = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverGameCube = { SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, SDL_TRUE, HIDAPI_DriverGameCube_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_luna.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_luna.c index a543e7a..7eb44c7 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_luna.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_luna.c @@ -29,7 +29,6 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_LUNA /* Define this if you want to log all packets from the controller */ @@ -46,44 +45,37 @@ enum SDL_CONTROLLER_NUM_LUNA_BUTTONS, }; -typedef struct { +typedef struct +{ Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverLuna_Context; - -static void -HIDAPI_DriverLuna_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverLuna_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_LUNA, callback, userdata); } -static void -HIDAPI_DriverLuna_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverLuna_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_LUNA, callback, userdata); } -static SDL_bool -HIDAPI_DriverLuna_IsEnabled(void) +static SDL_bool HIDAPI_DriverLuna_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_LUNA, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_LUNA, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverLuna_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverLuna_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { return (type == SDL_CONTROLLER_TYPE_AMAZON_LUNA) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverLuna_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverLuna_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverLuna_Context *ctx; ctx = (SDL_DriverLuna_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -95,22 +87,21 @@ HIDAPI_DriverLuna_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverLuna_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverLuna_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverLuna_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverLuna_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverLuna_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverLuna_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverLuna_Context *ctx = (SDL_DriverLuna_Context *)device->context; + SDL_AssertJoysticksLocked(); + SDL_zeroa(ctx->last_state); /* Initialize the joystick capabilities */ @@ -121,8 +112,7 @@ HIDAPI_DriverLuna_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick return SDL_TRUE; } -static int -HIDAPI_DriverLuna_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverLuna_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { #ifdef ENABLE_LUNA_BLUETOOTH_RUMBLE if (device->product_id == BLUETOOTH_PRODUCT_LUNA_CONTROLLER) { @@ -141,18 +131,16 @@ HIDAPI_DriverLuna_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti } #endif /* ENABLE_LUNA_BLUETOOTH_RUMBLE */ - /* There is currently no rumble packet over USB */ - return SDL_Unsupported(); + /* There is currently no rumble packet over USB */ + return SDL_Unsupported(); } -static int -HIDAPI_DriverLuna_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverLuna_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverLuna_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverLuna_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { Uint32 result = 0; @@ -165,26 +153,22 @@ HIDAPI_DriverLuna_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystic return result; } -static int -HIDAPI_DriverLuna_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverLuna_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverLuna_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverLuna_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverLuna_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverLuna_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverLuna_HandleUSBStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverLuna_HandleUSBStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Context *ctx, Uint8 *data, int size) { if (ctx->last_state[1] != data[1]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A, (data[1] & 0x01) ? SDL_PRESSED : SDL_RELEASED); @@ -248,8 +232,7 @@ HIDAPI_DriverLuna_HandleUSBStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Co } #define READ_STICK_AXIS(offset) \ - (data[offset] == 0x7f ? 0 : \ - (Sint16)HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16)) + (data[offset] == 0x7f ? 0 : (Sint16)HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16)) { Sint16 axis = READ_STICK_AXIS(4); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -263,7 +246,7 @@ HIDAPI_DriverLuna_HandleUSBStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Co #undef READ_STICK_AXIS #define READ_TRIGGER_AXIS(offset) \ - (Sint16)HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16) + (Sint16) HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16) { Sint16 axis = READ_TRIGGER_AXIS(8); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); @@ -275,8 +258,7 @@ HIDAPI_DriverLuna_HandleUSBStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Co SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static void -HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverLuna_Context *ctx, Uint8 *data, int size) { if (size >= 2 && data[0] == 0x02) { /* Home button has dedicated report */ @@ -289,14 +271,11 @@ HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverL int level = data[1] * 100 / 0xFF; if (level == 0) { SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_EMPTY); - } - else if (level <= 20) { + } else if (level <= 20) { SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_LOW); - } - else if (level <= 70) { + } else if (level <= 70) { SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_MEDIUM); - } - else { + } else { SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_FULL); } @@ -371,8 +350,7 @@ HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverL } #define READ_STICK_AXIS(offset) \ - (data[offset] == 0x7f ? 0 : \ - (Sint16)HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16)) + (data[offset] == 0x7f ? 0 : (Sint16)HIDAPI_RemapVal((float)data[offset], 0x00, 0xff, SDL_MIN_SINT16, SDL_MAX_SINT16)) { Sint16 axis = READ_STICK_AXIS(2); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -386,7 +364,7 @@ HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverL #undef READ_STICK_AXIS #define READ_TRIGGER_AXIS(offset) \ - (Sint16)HIDAPI_RemapVal((float)((int)(((data[offset] | (data[offset + 1] << 8)) & 0x3ff) - 0x200)), 0x00 - 0x200, 0x3ff - 0x200, SDL_MIN_SINT16, SDL_MAX_SINT16) + (Sint16) HIDAPI_RemapVal((float)((int)(((data[offset] | (data[offset + 1] << 8)) & 0x3ff) - 0x200)), 0x00 - 0x200, 0x3ff - 0x200, SDL_MIN_SINT16, SDL_MAX_SINT16) { Sint16 axis = READ_TRIGGER_AXIS(9); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); @@ -398,8 +376,7 @@ HIDAPI_DriverLuna_HandleBluetoothStatePacket(SDL_Joystick *joystick, SDL_DriverL SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverLuna_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverLuna_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverLuna_Context *ctx = (SDL_DriverLuna_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -416,7 +393,7 @@ HIDAPI_DriverLuna_UpdateDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_LUNA_PROTOCOL HIDAPI_DumpPacket("Amazon Luna packet: size = %d", data, size); #endif - if (!joystick) { + if (joystick == NULL) { continue; } @@ -434,21 +411,18 @@ HIDAPI_DriverLuna_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverLuna_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverLuna_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { } -static void -HIDAPI_DriverLuna_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverLuna_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverLuna = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverLuna = { SDL_HINT_JOYSTICK_HIDAPI_LUNA, SDL_TRUE, HIDAPI_DriverLuna_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_nintendo.h b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_nintendo.h index 3fac20b..9b9a667 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_nintendo.h +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_nintendo.h @@ -22,25 +22,30 @@ /* These are values used in the controller type byte of the controller GUID */ /* These values come directly out of the hardware, so don't change them */ -typedef enum { - k_eSwitchDeviceInfoControllerType_Unknown = 0, - k_eSwitchDeviceInfoControllerType_JoyConLeft = 1, - k_eSwitchDeviceInfoControllerType_JoyConRight = 2, - k_eSwitchDeviceInfoControllerType_ProController = 3, - k_eSwitchDeviceInfoControllerType_NESLeft = 9, - k_eSwitchDeviceInfoControllerType_NESRight = 10, - k_eSwitchDeviceInfoControllerType_SNES = 11, - k_eSwitchDeviceInfoControllerType_N64 = 12, - k_eSwitchDeviceInfoControllerType_SEGA_Genesis = 13, +typedef enum +{ + k_eSwitchDeviceInfoControllerType_Unknown = 0, + k_eSwitchDeviceInfoControllerType_JoyConLeft = 1, + k_eSwitchDeviceInfoControllerType_JoyConRight = 2, + k_eSwitchDeviceInfoControllerType_ProController = 3, + k_eSwitchDeviceInfoControllerType_LicProController = 6, + k_eSwitchDeviceInfoControllerType_HVCLeft = 7, + k_eSwitchDeviceInfoControllerType_HVCRight = 8, + k_eSwitchDeviceInfoControllerType_NESLeft = 9, + k_eSwitchDeviceInfoControllerType_NESRight = 10, + k_eSwitchDeviceInfoControllerType_SNES = 11, + k_eSwitchDeviceInfoControllerType_N64 = 12, + k_eSwitchDeviceInfoControllerType_SEGA_Genesis = 13, } ESwitchDeviceInfoControllerType; /* These values are used internally but can be updated as needed */ -typedef enum { - k_eWiiExtensionControllerType_Unknown = 0, - k_eWiiExtensionControllerType_None = 128, - k_eWiiExtensionControllerType_Nunchuk = 129, - k_eWiiExtensionControllerType_Gamepad = 130, - k_eWiiExtensionControllerType_WiiUPro = 131, +typedef enum +{ + k_eWiiExtensionControllerType_Unknown = 0, + k_eWiiExtensionControllerType_None = 128, + k_eWiiExtensionControllerType_Nunchuk = 129, + k_eWiiExtensionControllerType_Gamepad = 130, + k_eWiiExtensionControllerType_WiiUPro = 131, } EWiiExtensionControllerType; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps3.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps3.c index 5461067..d5e00ba 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps3.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps3.c @@ -32,13 +32,12 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_PS3 /* Define this if you want to log all packets from the controller */ /*#define DEBUG_PS3_PROTOCOL*/ -#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) +#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) typedef enum { @@ -46,7 +45,8 @@ typedef enum k_EPS3ReportIdEffects = 1, } EPS3ReportId; -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; SDL_bool is_shanwan; @@ -58,23 +58,19 @@ typedef struct { Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverPS3_Context; - static int HIDAPI_DriverPS3_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size); -static void -HIDAPI_DriverPS3_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS3_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3, callback, userdata); } -static void -HIDAPI_DriverPS3_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS3_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3, callback, userdata); } -static SDL_bool -HIDAPI_DriverPS3_IsEnabled(void) +static SDL_bool HIDAPI_DriverPS3_IsEnabled(void) { SDL_bool default_value; @@ -105,8 +101,7 @@ HIDAPI_DriverPS3_IsEnabled(void) return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3, default_value); } -static SDL_bool -HIDAPI_DriverPS3_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverPS3_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { if (vendor_id == USB_VENDOR_SONY && product_id == USB_PRODUCT_SONY_DS3) { return SDL_TRUE; @@ -129,8 +124,7 @@ static int SendFeatureReport(SDL_hid_device *dev, Uint8 *report, size_t length) return SDL_hid_send_feature_report(dev, report, length); } -static SDL_bool -HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS3_Context *ctx; SDL_bool is_shanwan = SDL_FALSE; @@ -145,7 +139,7 @@ HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) } ctx = (SDL_DriverPS3_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -164,9 +158,9 @@ HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) /* Set the controller into report mode over USB */ { Uint8 data[USB_PACKET_LENGTH]; - int size; - if ((size = ReadFeatureReport(device->dev, 0xf2, data, 17)) < 0) { + int size = ReadFeatureReport(device->dev, 0xf2, data, 17); + if (size < 0) { SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI_DriverPS3_InitDevice(): Couldn't read feature report 0xf2"); return SDL_FALSE; @@ -174,7 +168,8 @@ HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_PS3_PROTOCOL HIDAPI_DumpPacket("PS3 0xF2 packet: size = %d", data, size); #endif - if ((size = ReadFeatureReport(device->dev, 0xf5, data, 8)) < 0) { + size = ReadFeatureReport(device->dev, 0xf5, data, 8); + if (size < 0) { SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI_DriverPS3_InitDevice(): Couldn't read feature report 0xf5"); return SDL_FALSE; @@ -194,14 +189,12 @@ HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverPS3_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverPS3_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static int -HIDAPI_DriverPS3_UpdateEffects(SDL_HIDAPI_Device *device) +static int HIDAPI_DriverPS3_UpdateEffects(SDL_HIDAPI_Device *device) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; @@ -218,17 +211,16 @@ HIDAPI_DriverPS3_UpdateEffects(SDL_HIDAPI_Device *device) effects[2] = ctx->rumble_right ? 1 : 0; effects[4] = ctx->rumble_left; - effects[9] = (0x01 << (1+(ctx->player_index % 4))); + effects[9] = (0x01 << (1 + (ctx->player_index % 4))); return HIDAPI_DriverPS3_SendJoystickEffect(device, ctx->joystick, effects, sizeof(effects)); } -static void -HIDAPI_DriverPS3_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverPS3_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; - if (!ctx) { + if (ctx == NULL) { return; } @@ -238,11 +230,12 @@ HIDAPI_DriverPS3_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID HIDAPI_DriverPS3_UpdateEffects(device); } -static SDL_bool -HIDAPI_DriverPS3_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverPS3_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->joystick = joystick; ctx->effects_updated = SDL_FALSE; ctx->rumble_left = 0; @@ -262,8 +255,7 @@ HIDAPI_DriverPS3_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) return SDL_TRUE; } -static int -HIDAPI_DriverPS3_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverPS3_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; @@ -273,26 +265,22 @@ HIDAPI_DriverPS3_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return HIDAPI_DriverPS3_UpdateEffects(device); } -static int -HIDAPI_DriverPS3_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverPS3_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverPS3_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverPS3_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { return SDL_JOYCAP_RUMBLE; } -static int -HIDAPI_DriverPS3_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverPS3_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverPS3_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) +static int HIDAPI_DriverPS3_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) { Uint8 data[49]; int report_size, offset; @@ -310,8 +298,7 @@ HIDAPI_DriverPS3_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy return 0; } -static int -HIDAPI_DriverPS3_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverPS3_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; @@ -320,16 +307,14 @@ HIDAPI_DriverPS3_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joysti return 0; } -static float -HIDAPI_DriverPS3_ScaleAccel(Sint16 value) +static float HIDAPI_DriverPS3_ScaleAccel(Sint16 value) { /* Accelerometer values are in big endian order */ value = SDL_SwapBE16(value); - return (float)(value - 511) / 113.0f; + return ((float)(value - 511) / 113.0f) * SDL_STANDARD_GRAVITY; } -static void -HIDAPI_DriverPS3_HandleMiniStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverPS3_HandleMiniStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) { Sint16 axis; @@ -405,8 +390,7 @@ HIDAPI_DriverPS3_HandleMiniStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Con SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static void -HIDAPI_DriverPS3_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverPS3_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) { Sint16 axis; @@ -493,8 +477,7 @@ HIDAPI_DriverPS3_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverPS3_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS3_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -511,7 +494,7 @@ HIDAPI_DriverPS3_UpdateDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_PS3_PROTOCOL HIDAPI_DumpPacket("PS3 packet: size = %d", data, size); #endif - if (!joystick) { + if (joystick == NULL) { continue; } @@ -553,24 +536,21 @@ HIDAPI_DriverPS3_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverPS3_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS3_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; ctx->joystick = NULL; } -static void -HIDAPI_DriverPS3_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS3_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS3 = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS3 = { SDL_HINT_JOYSTICK_HIDAPI_PS3, SDL_TRUE, HIDAPI_DriverPS3_RegisterHints, @@ -592,29 +572,22 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS3 = HIDAPI_DriverPS3_FreeDevice, }; - -static SDL_bool -HIDAPI_DriverPS3ThirdParty_IsEnabled(void) +static SDL_bool HIDAPI_DriverPS3ThirdParty_IsEnabled(void) { -#if 1 /* Not enabled by default, we don't know what the L3/R3 buttons are */ - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3, SDL_FALSE); -#else return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); -#endif + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, + SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverPS3ThirdParty_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverPS3ThirdParty_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { Uint8 data[USB_PACKET_LENGTH]; int size; - if (SONY_THIRDPARTY_VENDOR(vendor_id)) { - if (device) { - if ((size = ReadFeatureReport(device->dev, 0x03, data, sizeof(data))) == 8 && - data[2] == 0x26) { + if (HIDAPI_SupportsPlaystationDetection(vendor_id, product_id)) { + if (device && device->dev) { + size = ReadFeatureReport(device->dev, 0x03, data, sizeof(data)); + if (size == 8 && data[2] == 0x26) { /* Supported third party controller */ return SDL_TRUE; } else { @@ -628,13 +601,12 @@ HIDAPI_DriverPS3ThirdParty_IsSupportedDevice(SDL_HIDAPI_Device *device, const ch return SDL_FALSE; } -static SDL_bool -HIDAPI_DriverPS3ThirdParty_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS3ThirdParty_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS3_Context *ctx; ctx = (SDL_DriverPS3_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -644,25 +616,29 @@ HIDAPI_DriverPS3ThirdParty_InitDevice(SDL_HIDAPI_Device *device) device->type = SDL_CONTROLLER_TYPE_PS3; + if (device->vendor_id == USB_VENDOR_LOGITECH && + device->product_id == USB_PRODUCT_LOGITECH_CHILLSTREAM) { + HIDAPI_SetDeviceName(device, "Logitech ChillStream"); + } + return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverPS3ThirdParty_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverPS3ThirdParty_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverPS3ThirdParty_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverPS3ThirdParty_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverPS3ThirdParty_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverPS3ThirdParty_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->joystick = joystick; SDL_zeroa(ctx->last_state); @@ -674,44 +650,149 @@ HIDAPI_DriverPS3ThirdParty_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick return SDL_TRUE; } -static int -HIDAPI_DriverPS3ThirdParty_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverPS3ThirdParty_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -HIDAPI_DriverPS3ThirdParty_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverPS3ThirdParty_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverPS3ThirdParty_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverPS3ThirdParty_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { return 0; } -static int -HIDAPI_DriverPS3ThirdParty_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverPS3ThirdParty_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverPS3ThirdParty_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) +static int HIDAPI_DriverPS3ThirdParty_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverPS3ThirdParty_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverPS3ThirdParty_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverPS3ThirdParty_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket18(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) +{ + Sint16 axis; + + if (ctx->last_state[0] != data[0]) { + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_X, (data[0] & 0x01) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A, (data[0] & 0x02) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_B, (data[0] & 0x04) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_Y, (data[0] & 0x08) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, (data[0] & 0x10) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, (data[0] & 0x20) ? SDL_PRESSED : SDL_RELEASED); + } + + if (ctx->last_state[1] != data[1]) { + SDL_bool dpad_up = SDL_FALSE; + SDL_bool dpad_down = SDL_FALSE; + SDL_bool dpad_left = SDL_FALSE; + SDL_bool dpad_right = SDL_FALSE; + + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_BACK, (data[1] & 0x01) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_START, (data[1] & 0x02) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSTICK, (data[1] & 0x04) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSTICK, (data[1] & 0x08) ? SDL_PRESSED : SDL_RELEASED); + + switch (data[1] >> 4) { + case 0: + dpad_up = SDL_TRUE; + break; + case 1: + dpad_up = SDL_TRUE; + dpad_right = SDL_TRUE; + break; + case 2: + dpad_right = SDL_TRUE; + break; + case 3: + dpad_right = SDL_TRUE; + dpad_down = SDL_TRUE; + break; + case 4: + dpad_down = SDL_TRUE; + break; + case 5: + dpad_left = SDL_TRUE; + dpad_down = SDL_TRUE; + break; + case 6: + dpad_left = SDL_TRUE; + break; + case 7: + dpad_up = SDL_TRUE; + dpad_left = SDL_TRUE; + break; + default: + break; + } + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_DOWN, dpad_down); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_UP, dpad_up); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, dpad_right); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, dpad_left); + } + + axis = ((int)data[16] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); + axis = ((int)data[17] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); + axis = ((int)data[2] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); + axis = ((int)data[3] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, axis); + axis = ((int)data[4] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, axis); + axis = ((int)data[5] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); + + /* Buttons are mapped as axes in the order they appear in the button enumeration */ + { + static int button_axis_offsets[] = { + 12, /* SDL_GAMEPAD_BUTTON_A */ + 11, /* SDL_GAMEPAD_BUTTON_B */ + 13, /* SDL_GAMEPAD_BUTTON_X */ + 10, /* SDL_GAMEPAD_BUTTON_Y */ + 0, /* SDL_GAMEPAD_BUTTON_BACK */ + 0, /* SDL_GAMEPAD_BUTTON_GUIDE */ + 0, /* SDL_GAMEPAD_BUTTON_START */ + 0, /* SDL_GAMEPAD_BUTTON_LEFT_STICK */ + 0, /* SDL_GAMEPAD_BUTTON_RIGHT_STICK */ + 14, /* SDL_GAMEPAD_BUTTON_LEFT_SHOULDER */ + 16, /* SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER */ + 8, /* SDL_GAMEPAD_BUTTON_DPAD_UP */ + 9, /* SDL_GAMEPAD_BUTTON_DPAD_DOWN */ + 7, /* SDL_GAMEPAD_BUTTON_DPAD_LEFT */ + 6, /* SDL_GAMEPAD_BUTTON_DPAD_RIGHT */ + }; + int i, axis_index = 6; + + for (i = 0; i < SDL_arraysize(button_axis_offsets); ++i) { + int offset = button_axis_offsets[i]; + if (!offset) { + /* This button doesn't report as an axis */ + continue; + } + + axis = ((int)data[offset] * 257) - 32768; + SDL_PrivateJoystickAxis(joystick, axis_index, axis); + ++axis_index; + } + } + + SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); +} + +static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket19(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size) { Sint16 axis; @@ -727,6 +808,8 @@ HIDAPI_DriverPS3ThirdParty_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverP if (ctx->last_state[1] != data[1]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_BACK, (data[1] & 0x01) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_START, (data[1] & 0x02) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSTICK, (data[1] & 0x04) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSTICK, (data[1] & 0x08) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data[1] & 0x10) ? SDL_PRESSED : SDL_RELEASED); } @@ -824,8 +907,7 @@ HIDAPI_DriverPS3ThirdParty_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverP SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverPS3ThirdParty_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS3ThirdParty_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -842,12 +924,15 @@ HIDAPI_DriverPS3ThirdParty_UpdateDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_PS3_PROTOCOL HIDAPI_DumpPacket("PS3 packet: size = %d", data, size); #endif - if (!joystick) { + if (joystick == NULL) { continue; } - if (size == 27) { - HIDAPI_DriverPS3ThirdParty_HandleStatePacket(joystick, ctx, data, size); + if (size >= 19) { + HIDAPI_DriverPS3ThirdParty_HandleStatePacket19(joystick, ctx, data, size); + } else if (size == 18) { + /* This packet format was seen with the Logitech ChillStream */ + HIDAPI_DriverPS3ThirdParty_HandleStatePacket18(joystick, ctx, data, size); } else { #ifdef DEBUG_JOYSTICK SDL_Log("Unknown PS3 packet, size %d\n", size); @@ -859,24 +944,21 @@ HIDAPI_DriverPS3ThirdParty_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverPS3ThirdParty_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS3ThirdParty_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS3_Context *ctx = (SDL_DriverPS3_Context *)device->context; ctx->joystick = NULL; } -static void -HIDAPI_DriverPS3ThirdParty_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS3ThirdParty_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS3ThirdParty = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS3ThirdParty = { SDL_HINT_JOYSTICK_HIDAPI_PS3, SDL_TRUE, HIDAPI_DriverPS3_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c index 7582082..68dfc01 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c @@ -34,7 +34,6 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_PS4 /* Define this if you want to log all packets from the controller */ @@ -43,14 +42,12 @@ /* Define this if you want to log calibration data */ /*#define DEBUG_PS4_CALIBRATION*/ -#define GYRO_RES_PER_DEGREE 1024.0f -#define ACCEL_RES_PER_G 8192.0f #define BLUETOOTH_DISCONNECT_TIMEOUT_MS 500 -#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) -#define LOAD32(A, B, C, D) ((((Uint32)(A)) << 0) | \ - (((Uint32)(B)) << 8) | \ - (((Uint32)(C)) << 16) | \ +#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) +#define LOAD32(A, B, C, D) ((((Uint32)(A)) << 0) | \ + (((Uint32)(B)) << 8) | \ + (((Uint32)(C)) << 16) | \ (((Uint32)(D)) << 24)) typedef enum @@ -70,7 +67,7 @@ typedef enum k_EPS4ReportIdDisconnectMessage = 226, } EPS4ReportId; -typedef enum +typedef enum { k_ePS4FeatureReportIdGyroCalibration_USB = 0x02, k_ePS4FeatureReportIdCapabilities = 0x03, @@ -113,19 +110,21 @@ typedef struct Uint8 ucLedBlue; Uint8 ucLedDelayOn; Uint8 ucLedDelayOff; - Uint8 _rgucPad0[ 8 ]; + Uint8 _rgucPad0[8]; Uint8 ucVolumeLeft; Uint8 ucVolumeRight; Uint8 ucVolumeMic; Uint8 ucVolumeSpeaker; } DS4EffectsState_t; -typedef struct { +typedef struct +{ Sint16 bias; - float sensitivity; + float scale; } IMUCalibrationData; -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; SDL_bool is_dongle; @@ -148,32 +147,31 @@ typedef struct { Uint8 led_red; Uint8 led_green; Uint8 led_blue; + Uint16 gyro_numerator; + Uint16 gyro_denominator; + Uint16 accel_numerator; + Uint16 accel_denominator; Uint16 last_timestamp; Uint64 timestamp; + Uint16 valid_crc_packets; /* wrapping counter */ PS4StatePacket_t last_state; } SDL_DriverPS4_Context; - static int HIDAPI_DriverPS4_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size); -static void -HIDAPI_DriverPS4_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS4_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4, callback, userdata); } -static void -HIDAPI_DriverPS4_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS4_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4, callback, userdata); } -static SDL_bool -HIDAPI_DriverPS4_IsEnabled(void) +static SDL_bool HIDAPI_DriverPS4_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS4, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS4, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } static int ReadFeatureReport(SDL_hid_device *dev, Uint8 report_id, Uint8 *report, size_t length) @@ -183,8 +181,7 @@ static int ReadFeatureReport(SDL_hid_device *dev, Uint8 report_id, Uint8 *report return SDL_hid_get_feature_report(dev, report, length); } -static SDL_bool -HIDAPI_DriverPS4_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverPS4_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { Uint8 data[USB_PACKET_LENGTH]; int size; @@ -193,10 +190,10 @@ HIDAPI_DriverPS4_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, return SDL_TRUE; } - if (SONY_THIRDPARTY_VENDOR(vendor_id)) { + if (HIDAPI_SupportsPlaystationDetection(vendor_id, product_id)) { if (device && device->dev) { - if ((size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data))) == 48 && - data[2] == 0x27) { + size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data)); + if (size == 48 && data[2] == 0x27) { /* Supported third party controller */ return SDL_TRUE; } else { @@ -211,8 +208,7 @@ HIDAPI_DriverPS4_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, return SDL_FALSE; } -static void -SetLedsForPlayerIndex(DS4EffectsState_t *effects, int player_index) +static void SetLedsForPlayerIndex(DS4EffectsState_t *effects, int player_index) { /* This list is the same as what hid-sony.c uses in the Linux kernel. The first 4 values correspond to what the PS4 assigns. @@ -238,8 +234,7 @@ SetLedsForPlayerIndex(DS4EffectsState_t *effects, int player_index) effects->ucLedBlue = colors[player_index][2]; } -static SDL_bool -HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS4_Context *ctx; Uint8 data[USB_PACKET_LENGTH]; @@ -248,12 +243,17 @@ HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) SDL_JoystickType joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; ctx = (SDL_DriverPS4_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } ctx->device = device; + ctx->gyro_numerator = 1; + ctx->gyro_denominator = 16; + ctx->accel_numerator = 1; + ctx->accel_denominator = 8192; + device->context = ctx; if (device->serial && SDL_strlen(device->serial) == 12) { @@ -276,17 +276,21 @@ HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) if (ctx->is_dongle) { size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdSerialNumber, data, sizeof(data)); if (size >= 7 && (data[1] || data[2] || data[3] || data[4] || data[5] || data[6])) { - SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", - data[6], data[5], data[4], data[3], data[2], data[1]); + (void)SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", + data[6], data[5], data[4], data[3], data[2], data[1]); } device->is_bluetooth = SDL_FALSE; ctx->enhanced_mode = SDL_TRUE; + } else if (device->vendor_id == USB_VENDOR_SONY && device->product_id == USB_PRODUCT_SONY_DS4_STRIKEPAD) { + device->is_bluetooth = SDL_FALSE; + ctx->enhanced_mode = SDL_TRUE; + } else if (device->vendor_id == USB_VENDOR_SONY) { /* This will fail if we're on Bluetooth */ size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdSerialNumber, data, sizeof(data)); if (size >= 7 && (data[1] || data[2] || data[3] || data[4] || data[5] || data[6])) { - SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", - data[6], data[5], data[4], data[3], data[2], data[1]); + (void)SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", + data[6], data[5], data[4], data[3], data[2], data[1]); device->is_bluetooth = SDL_FALSE; ctx->enhanced_mode = SDL_TRUE; } else { @@ -316,75 +320,99 @@ HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) SDL_Log("PS4 dongle = %s, bluetooth = %s\n", ctx->is_dongle ? "TRUE" : "FALSE", device->is_bluetooth ? "TRUE" : "FALSE"); #endif - /* Get the device capabilities */ if (device->vendor_id == USB_VENDOR_SONY) { ctx->official_controller = SDL_TRUE; ctx->sensors_supported = SDL_TRUE; ctx->lightbar_supported = SDL_TRUE; ctx->vibration_supported = SDL_TRUE; ctx->touchpad_supported = SDL_TRUE; - } else if ((size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data))) == 48 && - data[2] == 0x27) { - Uint8 capabilities = data[4]; - Uint8 device_type = data[5]; + } else { + size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data)); + /* Get the device capabilities */ + if (size == 48 && data[2] == 0x27) { + Uint8 capabilities = data[4]; + Uint8 device_type = data[5]; + Uint16 gyro_numerator = LOAD16(data[10], data[11]); + Uint16 gyro_denominator = LOAD16(data[12], data[13]); + Uint16 accel_numerator = LOAD16(data[14], data[15]); + Uint16 accel_denominator = LOAD16(data[16], data[17]); #ifdef DEBUG_PS4_PROTOCOL - HIDAPI_DumpPacket("PS4 capabilities: size = %d", data, size); + HIDAPI_DumpPacket("PS4 capabilities: size = %d", data, size); #endif - if ((capabilities & 0x02) != 0) { - ctx->sensors_supported = SDL_TRUE; - } - if ((capabilities & 0x04) != 0) { - ctx->lightbar_supported = SDL_TRUE; - } - if ((capabilities & 0x08) != 0) { + if (capabilities & 0x02) { + ctx->sensors_supported = SDL_TRUE; + } + if (capabilities & 0x04) { + ctx->lightbar_supported = SDL_TRUE; + } + if (capabilities & 0x08) { + ctx->vibration_supported = SDL_TRUE; + } + if (capabilities & 0x40) { + ctx->touchpad_supported = SDL_TRUE; + } + + switch (device_type) { + case 0x00: + joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; + break; + case 0x01: + joystick_type = SDL_JOYSTICK_TYPE_GUITAR; + break; + case 0x02: + joystick_type = SDL_JOYSTICK_TYPE_DRUM_KIT; + break; + case 0x04: + joystick_type = SDL_JOYSTICK_TYPE_DANCE_PAD; + break; + case 0x06: + joystick_type = SDL_JOYSTICK_TYPE_WHEEL; + break; + case 0x07: + joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK; + break; + case 0x08: + joystick_type = SDL_JOYSTICK_TYPE_FLIGHT_STICK; + break; + default: + joystick_type = SDL_JOYSTICK_TYPE_UNKNOWN; + break; + } + + if (gyro_numerator && gyro_denominator) { + ctx->gyro_numerator = gyro_numerator; + ctx->gyro_denominator = gyro_denominator; + } + if (accel_numerator && accel_denominator) { + ctx->accel_numerator = accel_numerator; + ctx->accel_denominator = accel_denominator; + } + } else if (device->vendor_id == USB_VENDOR_RAZER) { + /* The Razer Raiju doesn't respond to the detection protocol, but has a touchpad and vibration */ ctx->vibration_supported = SDL_TRUE; - } - if ((capabilities & 0x40) != 0) { ctx->touchpad_supported = SDL_TRUE; - } - - switch (device_type) { - case 0x00: - joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; - break; - case 0x01: - joystick_type = SDL_JOYSTICK_TYPE_GUITAR; - break; - case 0x02: - joystick_type = SDL_JOYSTICK_TYPE_DRUM_KIT; - break; - case 0x04: - joystick_type = SDL_JOYSTICK_TYPE_DANCE_PAD; - break; - case 0x06: - joystick_type = SDL_JOYSTICK_TYPE_WHEEL; - break; - case 0x07: - joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK; - break; - case 0x08: - joystick_type = SDL_JOYSTICK_TYPE_FLIGHT_STICK; - break; - default: - joystick_type = SDL_JOYSTICK_TYPE_UNKNOWN; - break; - } - } else if (device->vendor_id == USB_VENDOR_RAZER) { - /* The Razer Raiju doesn't respond to the detection protocol, but has a touchpad and vibration */ - ctx->vibration_supported = SDL_TRUE; - ctx->touchpad_supported = SDL_TRUE; - if (device->product_id == USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH || - device->product_id == USB_PRODUCT_RAZER_ULTIMATE_EDITION_BLUETOOTH) { - device->is_bluetooth = SDL_TRUE; + if (device->product_id == USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH || + device->product_id == USB_PRODUCT_RAZER_ULTIMATE_EDITION_BLUETOOTH) { + device->is_bluetooth = SDL_TRUE; + } } } ctx->effects_supported = (ctx->lightbar_supported || ctx->vibration_supported); + if (device->vendor_id == USB_VENDOR_PDP && + device->product_id == USB_PRODUCT_VICTRIX_FS_PRO_V2) { + /* The Victrix FS Pro V2 reports that it has lightbar support, + * but it doesn't respond to the effects packet, and will hang + * on reboot if we send it. + */ + ctx->effects_supported = SDL_FALSE; + } + device->joystick_type = joystick_type; device->type = SDL_CONTROLLER_TYPE_PS4; - if (device->vendor_id == USB_VENDOR_SONY) { + if (ctx->official_controller) { HIDAPI_SetDeviceName(device, "PS4 Controller"); } HIDAPI_SetDeviceSerial(device, serial); @@ -404,14 +432,12 @@ HIDAPI_DriverPS4_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverPS4_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverPS4_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS4_LoadOfficialCalibrationData(SDL_HIDAPI_Device *device) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; int i, tries, size; @@ -422,17 +448,17 @@ HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) #ifdef DEBUG_PS4_CALIBRATION SDL_Log("Not an official controller, ignoring calibration\n"); #endif - return; + return SDL_FALSE; } - for( tries = 0; tries < 5; ++tries ) { + for (tries = 0; tries < 5; ++tries) { /* For Bluetooth controllers, this report switches them into advanced report mode */ size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdGyroCalibration_USB, data, sizeof(data)); if (size < 35) { #ifdef DEBUG_PS4_CALIBRATION SDL_Log("Short read of calibration data: %d, ignoring calibration\n", size); #endif - return; + return SDL_FALSE; } if (device->is_bluetooth) { @@ -441,7 +467,7 @@ HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) #ifdef DEBUG_PS4_CALIBRATION SDL_Log("Short read of calibration data: %d, ignoring calibration\n", size); #endif - return; + return SDL_FALSE; } } @@ -471,6 +497,7 @@ HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) Sint16 sAccZPlus, sAccZMinus; float flNumerator; + float flDenominator; Sint16 sRange2g; #ifdef DEBUG_PS4_CALIBRATION @@ -507,36 +534,44 @@ HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) sAccZPlus = LOAD16(data[31], data[32]); sAccZMinus = LOAD16(data[33], data[34]); - flNumerator = (sGyroSpeedPlus + sGyroSpeedMinus) * GYRO_RES_PER_DEGREE; - ctx->calibration[0].bias = sGyroPitchBias; - ctx->calibration[0].sensitivity = flNumerator / (sGyroPitchPlus - sGyroPitchMinus); + flNumerator = (float)(sGyroSpeedPlus + sGyroSpeedMinus) * ctx->gyro_denominator / ctx->gyro_numerator; + flDenominator = (float)(SDL_abs(sGyroPitchPlus - sGyroPitchBias) + SDL_abs(sGyroPitchMinus - sGyroPitchBias)); + if (flDenominator != 0.0f) { + ctx->calibration[0].bias = sGyroPitchBias; + ctx->calibration[0].scale = flNumerator / flDenominator; + } - ctx->calibration[1].bias = sGyroYawBias; - ctx->calibration[1].sensitivity = flNumerator / (sGyroYawPlus - sGyroYawMinus); + flDenominator = (float)(SDL_abs(sGyroYawPlus - sGyroYawBias) + SDL_abs(sGyroYawMinus - sGyroYawBias)); + if (flDenominator != 0.0f) { + ctx->calibration[1].bias = sGyroYawBias; + ctx->calibration[1].scale = flNumerator / flDenominator; + } - ctx->calibration[2].bias = sGyroRollBias; - ctx->calibration[2].sensitivity = flNumerator / (sGyroRollPlus - sGyroRollMinus); + flDenominator = (float)(SDL_abs(sGyroRollPlus - sGyroRollBias) + SDL_abs(sGyroRollMinus - sGyroRollBias)); + if (flDenominator != 0.0f) { + ctx->calibration[2].bias = sGyroRollBias; + ctx->calibration[2].scale = flNumerator / flDenominator; + } sRange2g = sAccXPlus - sAccXMinus; ctx->calibration[3].bias = sAccXPlus - sRange2g / 2; - ctx->calibration[3].sensitivity = 2.0f * ACCEL_RES_PER_G / (float)sRange2g; + ctx->calibration[3].scale = (2.0f * ctx->accel_denominator / ctx->accel_numerator) / sRange2g; sRange2g = sAccYPlus - sAccYMinus; ctx->calibration[4].bias = sAccYPlus - sRange2g / 2; - ctx->calibration[4].sensitivity = 2.0f * ACCEL_RES_PER_G / (float)sRange2g; + ctx->calibration[4].scale = (2.0f * ctx->accel_denominator / ctx->accel_numerator) / sRange2g; sRange2g = sAccZPlus - sAccZMinus; ctx->calibration[5].bias = sAccZPlus - sRange2g / 2; - ctx->calibration[5].sensitivity = 2.0f * ACCEL_RES_PER_G / (float)sRange2g; + ctx->calibration[5].scale = (2.0f * ctx->accel_denominator / ctx->accel_numerator) / sRange2g; ctx->hardware_calibration = SDL_TRUE; for (i = 0; i < 6; ++i) { - float divisor = (i < 3 ? 64.0f : 1.0f); #ifdef DEBUG_PS4_CALIBRATION - SDL_Log("calibration[%d] bias = %d, sensitivity = %f\n", i, ctx->calibration[i].bias, ctx->calibration[i].sensitivity); + SDL_Log("calibration[%d] bias = %d, sensitivity = %f\n", i, ctx->calibration[i].bias, ctx->calibration[i].scale); #endif /* Some controllers have a bad calibration */ - if ((SDL_abs(ctx->calibration[i].bias) > 1024) || (SDL_fabs(1.0f - ctx->calibration[i].sensitivity / divisor) > 0.5f)) { + if (SDL_abs(ctx->calibration[i].bias) > 1024 || SDL_fabs(1.0f - ctx->calibration[i].scale) > 0.5f) { #ifdef DEBUG_PS4_CALIBRATION SDL_Log("invalid calibration, ignoring\n"); #endif @@ -548,34 +583,55 @@ HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) SDL_Log("Calibration data not available\n"); #endif } + return ctx->hardware_calibration; } -static float -HIDAPI_DriverPS4_ApplyCalibrationData(SDL_DriverPS4_Context *ctx, int index, Sint16 value) +static void HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device) { - float result; - - if (ctx->hardware_calibration) { - IMUCalibrationData *calibration = &ctx->calibration[index]; + SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; + int i; - result = (value - calibration->bias) * calibration->sensitivity; - } else if (index < 3) { - result = value * 64.f; - } else { - result = value; + if (!HIDAPI_DriverPS4_LoadOfficialCalibrationData(device)) { + for (i = 0; i < SDL_arraysize(ctx->calibration); ++i) { + ctx->calibration[i].bias = 0; + ctx->calibration[i].scale = 1.0f; + } } - /* Convert the raw data to the units expected by SDL */ - if (index < 3) { - result = (result / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f; - } else { - result = (result / ACCEL_RES_PER_G) * SDL_STANDARD_GRAVITY; + /* Scale the raw data to the units expected by SDL */ + for (i = 0; i < SDL_arraysize(ctx->calibration); ++i) { + double scale = ctx->calibration[i].scale; + + if (i < 3) { + scale *= ((double)ctx->gyro_numerator / ctx->gyro_denominator) * M_PI / 180.0; + + if (device->vendor_id == USB_VENDOR_SONY && + device->product_id == USB_PRODUCT_SONY_DS4_STRIKEPAD) { + /* The Armor-X Pro seems to only deliver half the rotation it should */ + scale *= 2.0; + } + } else { + scale *= ((double)ctx->accel_numerator / ctx->accel_denominator) * SDL_STANDARD_GRAVITY; + + if (device->vendor_id == USB_VENDOR_SONY && + device->product_id == USB_PRODUCT_SONY_DS4_STRIKEPAD) { + /* The Armor-X Pro seems to only deliver half the acceleration it should, + * and in the opposite direction on all axes */ + scale *= -2.0; + } + } + ctx->calibration[i].scale = (float)scale; } - return result; } -static int -HIDAPI_DriverPS4_UpdateEffects(SDL_HIDAPI_Device *device) +static float HIDAPI_DriverPS4_ApplyCalibrationData(SDL_DriverPS4_Context *ctx, int index, Sint16 value) +{ + IMUCalibrationData *calibration = &ctx->calibration[index]; + + return ((float)value - calibration->bias) * calibration->scale; +} + +static int HIDAPI_DriverPS4_UpdateEffects(SDL_HIDAPI_Device *device) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; DS4EffectsState_t effects; @@ -604,24 +660,31 @@ HIDAPI_DriverPS4_UpdateEffects(SDL_HIDAPI_Device *device) return HIDAPI_DriverPS4_SendJoystickEffect(device, ctx->joystick, &effects, sizeof(effects)); } -static void -HIDAPI_DriverPS4_TickleBluetooth(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS4_TickleBluetooth(SDL_HIDAPI_Device *device) { - /* This is just a dummy packet that should have no effect, since we don't set the CRC */ - Uint8 data[78]; + SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; - SDL_zeroa(data); + if (ctx->enhanced_mode) { + /* This is just a dummy packet that should have no effect, since we don't set the CRC */ + Uint8 data[78]; + + SDL_zeroa(data); - data[0] = k_EPS4ReportIdBluetoothEffects; - data[1] = 0xC0; /* Magic value HID + CRC */ + data[0] = k_EPS4ReportIdBluetoothEffects; + data[1] = 0xC0; /* Magic value HID + CRC */ - if (SDL_HIDAPI_LockRumble() == 0) { - SDL_HIDAPI_SendRumbleAndUnlock(device, data, sizeof(data)); + if (SDL_HIDAPI_LockRumble() == 0) { + SDL_HIDAPI_SendRumbleAndUnlock(device, data, sizeof(data)); + } + } else { + /* We can't even send an invalid effects packet, or it will put the controller in enhanced mode */ + if (device->num_joysticks > 0) { + HIDAPI_JoystickDisconnected(device, device->joysticks[0]); + } } } -static void -HIDAPI_DriverPS4_SetEnhancedMode(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS4_SetEnhancedMode(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -651,8 +714,7 @@ static void SDLCALL SDL_PS4RumbleHintChanged(void *userdata, const char *name, c } } -static void -HIDAPI_DriverPS4_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverPS4_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -666,10 +728,11 @@ HIDAPI_DriverPS4_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID HIDAPI_DriverPS4_UpdateEffects(device); } -static SDL_bool -HIDAPI_DriverPS4_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverPS4_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { - SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *) device->context; + SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; + + SDL_AssertJoysticksLocked(); ctx->joystick = joystick; ctx->last_packet = SDL_GetTicks(); @@ -706,8 +769,7 @@ HIDAPI_DriverPS4_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) return SDL_TRUE; } -static int -HIDAPI_DriverPS4_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverPS4_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -721,14 +783,12 @@ HIDAPI_DriverPS4_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return HIDAPI_DriverPS4_UpdateEffects(device); } -static int -HIDAPI_DriverPS4_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverPS4_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverPS4_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverPS4_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; Uint32 result = 0; @@ -745,8 +805,7 @@ HIDAPI_DriverPS4_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick return result; } -static int -HIDAPI_DriverPS4_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverPS4_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -762,8 +821,7 @@ HIDAPI_DriverPS4_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return HIDAPI_DriverPS4_UpdateEffects(device); } -static int -HIDAPI_DriverPS4_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) +static int HIDAPI_DriverPS4_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; Uint8 data[78]; @@ -781,14 +839,14 @@ HIDAPI_DriverPS4_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy if (device->is_bluetooth && ctx->official_controller) { data[0] = k_EPS4ReportIdBluetoothEffects; - data[1] = 0xC0 | 0x04; /* Magic value HID + CRC, also sets interval to 4ms for samples */ - data[3] = 0x03; /* 0x1 is rumble, 0x2 is lightbar, 0x4 is the blink interval */ + data[1] = 0xC0 | 0x04; /* Magic value HID + CRC, also sets interval to 4ms for samples */ + data[3] = 0x03; /* 0x1 is rumble, 0x2 is lightbar, 0x4 is the blink interval */ report_size = 78; offset = 6; } else { data[0] = k_EPS4ReportIdUsbEffects; - data[1] = 0x07; /* Magic value */ + data[1] = 0x07; /* Magic value */ report_size = 32; offset = 4; @@ -811,8 +869,7 @@ HIDAPI_DriverPS4_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy return 0; } -static int -HIDAPI_DriverPS4_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverPS4_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -829,11 +886,10 @@ HIDAPI_DriverPS4_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joysti return 0; } -static void -HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS4_Context *ctx, PS4StatePacket_t *packet) +static void HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS4_Context *ctx, PS4StatePacket_t *packet, int size) { static const float TOUCHPAD_SCALEX = 1.0f / 1920; - static const float TOUCHPAD_SCALEY = 1.0f / 920; /* This is noted as being 944 resolution, but 920 feels better */ + static const float TOUCHPAD_SCALEY = 1.0f / 920; /* This is noted as being 944 resolution, but 920 feels better */ Sint16 axis; Uint8 touchpad_state; int touchpad_x, touchpad_y; @@ -907,7 +963,7 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, /* Some fightsticks, ex: Victrix FS Pro will only this these digital trigger bits and not the analog values so this needs to run whenever the trigger is evaluated */ - if ((packet->rgucButtonsHatAndCounter[1] & 0x0C) != 0) { + if (packet->rgucButtonsHatAndCounter[1] & 0x0C) { Uint8 data = packet->rgucButtonsHatAndCounter[1]; packet->ucTriggerLeft = (data & 0x04) && packet->ucTriggerLeft == 0 ? 255 : packet->ucTriggerLeft; packet->ucTriggerRight = (data & 0x08) && packet->ucTriggerRight == 0 ? 255 : packet->ucTriggerRight; @@ -933,7 +989,7 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, axis = ((int)packet->ucRightJoystickY * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); - if (ctx->device->is_bluetooth && ctx->official_controller) { + if (size > 9 && ctx->device->is_bluetooth && ctx->official_controller) { if (packet->ucBatteryLevel & 0x10) { SDL_PrivateJoystickBatteryLevel(joystick, SDL_JOYSTICK_POWER_WIRED); } else { @@ -951,19 +1007,19 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, } } - if (ctx->report_touchpad) { - touchpad_state = ((packet->ucTouchpadCounter1 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; + if (size > 9 && ctx->report_touchpad) { + touchpad_state = !(packet->ucTouchpadCounter1 & 0x80) ? SDL_PRESSED : SDL_RELEASED; touchpad_x = packet->rgucTouchpadData1[0] | (((int)packet->rgucTouchpadData1[1] & 0x0F) << 8); touchpad_y = (packet->rgucTouchpadData1[1] >> 4) | ((int)packet->rgucTouchpadData1[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 0, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); - touchpad_state = ((packet->ucTouchpadCounter2 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; + touchpad_state = !(packet->ucTouchpadCounter2 & 0x80) ? SDL_PRESSED : SDL_RELEASED; touchpad_x = packet->rgucTouchpadData2[0] | (((int)packet->rgucTouchpadData2[1] & 0x0F) << 8); touchpad_y = (packet->rgucTouchpadData2[1] >> 4) | ((int)packet->rgucTouchpadData2[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 1, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); } - if (ctx->report_sensors) { + if (size > 9 && ctx->report_sensors) { Uint16 timestamp; Uint64 timestamp_us; float data[3]; @@ -986,7 +1042,6 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, /* Sensor timestamp is in 5.33us units */ timestamp_us = (ctx->timestamp * 16) / 3; - data[0] = HIDAPI_DriverPS4_ApplyCalibrationData(ctx, 0, LOAD16(packet->rgucGyroX[0], packet->rgucGyroX[1])); data[1] = HIDAPI_DriverPS4_ApplyCalibrationData(ctx, 1, LOAD16(packet->rgucGyroY[0], packet->rgucGyroY[1])); data[2] = HIDAPI_DriverPS4_ApplyCalibrationData(ctx, 2, LOAD16(packet->rgucGyroZ[0], packet->rgucGyroZ[1])); @@ -1001,8 +1056,7 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_memcpy(&ctx->last_state, packet, sizeof(ctx->last_state)); } -static SDL_bool -VerifyCRC(Uint8 *data, int size) +static SDL_bool VerifyCRC(Uint8 *data, int size) { Uint8 ubHdr = 0xA1; /* hidp header is part of the CRC calculation */ Uint32 unCRC, unPacketCRC; @@ -1017,17 +1071,21 @@ VerifyCRC(Uint8 *data, int size) return (unCRC == unPacketCRC) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverPS4_IsPacketValid(SDL_DriverPS4_Context *ctx, Uint8 *data, int size) +static SDL_bool HIDAPI_DriverPS4_IsPacketValid(SDL_DriverPS4_Context *ctx, Uint8 *data, int size) { switch (data[0]) { case k_EPS4ReportIdUsbState: + if (size == 10) { + /* This is non-enhanced mode, this packet is fine */ + return SDL_TRUE; + } + /* In the case of a DS4 USB dongle, bit[2] of byte 31 indicates if a DS4 is actually connected (indicated by '0'). * For non-dongle, this bit is always 0 (connected). - * This is usually the ID over USB, but the DS4v2 that started shipping with the PS4 Slim will also send this - * packet over BT with a size of 128 + * This is usually the ID over USB, but the DS4v2 that started shipping with the PS4 Slim will also send this + * packet over BT with a size of 128 */ - if (size >= 64 && (data[31] & 0x04) == 0) { + if (size >= 64 && !(data[31] & 0x04)) { return SDL_TRUE; } break; @@ -1041,7 +1099,18 @@ HIDAPI_DriverPS4_IsPacketValid(SDL_DriverPS4_Context *ctx, Uint8 *data, int size case k_EPS4ReportIdBluetoothState8: case k_EPS4ReportIdBluetoothState9: /* Bluetooth state packets have two additional bytes at the beginning, the first notes if HID data is present */ - if (size >= 78 && (data[1] & 0x80) && VerifyCRC(data, 78)) { + if (size >= 78 && (data[1] & 0x80)) { + if (VerifyCRC(data, 78)) { + ++ctx->valid_crc_packets; + } else { + if (ctx->valid_crc_packets > 0) { + --ctx->valid_crc_packets; + } + if (ctx->valid_crc_packets >= 3) { + /* We're generally getting valid CRC, but failed one */ + return SDL_FALSE; + } + } return SDL_TRUE; } break; @@ -1051,12 +1120,11 @@ HIDAPI_DriverPS4_IsPacketValid(SDL_DriverPS4_Context *ctx, Uint8 *data, int size return SDL_FALSE; } -static SDL_bool -HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; SDL_Joystick *joystick = NULL; - Uint8 data[USB_PACKET_LENGTH*2]; + Uint8 data[USB_PACKET_LENGTH * 2]; int size; int packet_count = 0; Uint32 now = SDL_GetTicks(); @@ -1076,13 +1144,13 @@ HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) ++packet_count; ctx->last_packet = now; - if (!joystick) { + if (joystick == NULL) { continue; } switch (data[0]) { case k_EPS4ReportIdUsbState: - HIDAPI_DriverPS4_HandleStatePacket(joystick, device->dev, ctx, (PS4StatePacket_t *)&data[1]); + HIDAPI_DriverPS4_HandleStatePacket(joystick, device->dev, ctx, (PS4StatePacket_t *)&data[1], size - 1); break; case k_EPS4ReportIdBluetoothState1: case k_EPS4ReportIdBluetoothState2: @@ -1098,7 +1166,7 @@ HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) HIDAPI_DriverPS4_SetEnhancedMode(device, joystick); } /* Bluetooth state packets have two additional bytes at the beginning, the first notes if HID is present */ - HIDAPI_DriverPS4_HandleStatePacket(joystick, device->dev, ctx, (PS4StatePacket_t*)&data[3]); + HIDAPI_DriverPS4_HandleStatePacket(joystick, device->dev, ctx, (PS4StatePacket_t *)&data[3], size - 3); break; default: #ifdef DEBUG_JOYSTICK @@ -1137,8 +1205,8 @@ HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) char serial[18]; size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdSerialNumber, data, sizeof(data)); if (size >= 7 && (data[1] || data[2] || data[3] || data[4] || data[5] || data[6])) { - SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", - data[6], data[5], data[4], data[3], data[2], data[1]); + (void)SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", + data[6], data[5], data[4], data[3], data[2], data[1]); HIDAPI_SetDeviceSerial(device, serial); } HIDAPI_JoystickConnected(device, NULL); @@ -1150,11 +1218,10 @@ HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverPS4_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS4_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context; @@ -1164,13 +1231,11 @@ HIDAPI_DriverPS4_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick ctx->joystick = NULL; } -static void -HIDAPI_DriverPS4_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS4_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS4 = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS4 = { SDL_HINT_JOYSTICK_HIDAPI_PS4, SDL_TRUE, HIDAPI_DriverPS4_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps5.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps5.c index 85db2ed..081c126 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps5.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_ps5.c @@ -31,7 +31,6 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_PS5 /* Define this if you want to log all packets from the controller */ @@ -40,16 +39,25 @@ /* Define this if you want to log calibration data */ /*#define DEBUG_PS5_CALIBRATION*/ -#define GYRO_RES_PER_DEGREE 1024.0f -#define ACCEL_RES_PER_G 8192.0f +#define GYRO_RES_PER_DEGREE 1024.0f +#define ACCEL_RES_PER_G 8192.0f #define BLUETOOTH_DISCONNECT_TIMEOUT_MS 500 -#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) -#define LOAD32(A, B, C, D) ((((Uint32)(A)) << 0) | \ - (((Uint32)(B)) << 8) | \ - (((Uint32)(C)) << 16) | \ +#define LOAD16(A, B) (Sint16)((Uint16)(A) | (((Uint16)(B)) << 8)) +#define LOAD32(A, B, C, D) ((((Uint32)(A)) << 0) | \ + (((Uint32)(B)) << 8) | \ + (((Uint32)(C)) << 16) | \ (((Uint32)(D)) << 24)) +enum +{ + SDL_CONTROLLER_BUTTON_PS5_TOUCHPAD = SDL_CONTROLLER_BUTTON_MISC1 + 1, + SDL_CONTROLLER_BUTTON_PS5_LEFT_FUNCTION, + SDL_CONTROLLER_BUTTON_PS5_RIGHT_FUNCTION, + SDL_CONTROLLER_BUTTON_PS5_LEFT_PADDLE, + SDL_CONTROLLER_BUTTON_PS5_RIGHT_PADDLE +}; + typedef enum { k_EPS5ReportIdState = 0x01, @@ -79,128 +87,132 @@ typedef struct typedef struct { - Uint8 ucLeftJoystickX; /* 0 */ - Uint8 ucLeftJoystickY; /* 1 */ - Uint8 ucRightJoystickX; /* 2 */ - Uint8 ucRightJoystickY; /* 3 */ - Uint8 ucTriggerLeft; /* 4 */ - Uint8 ucTriggerRight; /* 5 */ - Uint8 ucCounter; /* 6 */ - Uint8 rgucButtonsAndHat[4]; /* 7 */ - Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ - Uint8 rgucGyroX[2]; /* 15 */ - Uint8 rgucGyroY[2]; /* 17 */ - Uint8 rgucGyroZ[2]; /* 19 */ - Uint8 rgucAccelX[2]; /* 21 */ - Uint8 rgucAccelY[2]; /* 23 */ - Uint8 rgucAccelZ[2]; /* 25 */ - Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ + Uint8 ucLeftJoystickX; /* 0 */ + Uint8 ucLeftJoystickY; /* 1 */ + Uint8 ucRightJoystickX; /* 2 */ + Uint8 ucRightJoystickY; /* 3 */ + Uint8 ucTriggerLeft; /* 4 */ + Uint8 ucTriggerRight; /* 5 */ + Uint8 ucCounter; /* 6 */ + Uint8 rgucButtonsAndHat[4]; /* 7 */ + Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ + Uint8 rgucGyroX[2]; /* 15 */ + Uint8 rgucGyroY[2]; /* 17 */ + Uint8 rgucGyroZ[2]; /* 19 */ + Uint8 rgucAccelX[2]; /* 21 */ + Uint8 rgucAccelY[2]; /* 23 */ + Uint8 rgucAccelZ[2]; /* 25 */ + Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ } PS5StatePacketCommon_t; typedef struct { - Uint8 ucLeftJoystickX; /* 0 */ - Uint8 ucLeftJoystickY; /* 1 */ - Uint8 ucRightJoystickX; /* 2 */ - Uint8 ucRightJoystickY; /* 3 */ - Uint8 ucTriggerLeft; /* 4 */ - Uint8 ucTriggerRight; /* 5 */ - Uint8 ucCounter; /* 6 */ - Uint8 rgucButtonsAndHat[4]; /* 7 */ - Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ - Uint8 rgucGyroX[2]; /* 15 */ - Uint8 rgucGyroY[2]; /* 17 */ - Uint8 rgucGyroZ[2]; /* 19 */ - Uint8 rgucAccelX[2]; /* 21 */ - Uint8 rgucAccelY[2]; /* 23 */ - Uint8 rgucAccelZ[2]; /* 25 */ - Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ - Uint8 ucSensorTemp; /* 31 */ - Uint8 ucTouchpadCounter1; /* 32 - high bit clear + counter */ - Uint8 rgucTouchpadData1[3]; /* 33 - X/Y, 12 bits per axis */ - Uint8 ucTouchpadCounter2; /* 36 - high bit clear + counter */ - Uint8 rgucTouchpadData2[3]; /* 37 - X/Y, 12 bits per axis */ - Uint8 rgucUnknown1[8]; /* 40 */ - Uint8 rgucTimer2[4]; /* 48 - 32 bit little endian */ - Uint8 ucBatteryLevel; /* 52 */ - Uint8 ucConnectState; /* 53 - 0x08 = USB, 0x01 = headphone */ + Uint8 ucLeftJoystickX; /* 0 */ + Uint8 ucLeftJoystickY; /* 1 */ + Uint8 ucRightJoystickX; /* 2 */ + Uint8 ucRightJoystickY; /* 3 */ + Uint8 ucTriggerLeft; /* 4 */ + Uint8 ucTriggerRight; /* 5 */ + Uint8 ucCounter; /* 6 */ + Uint8 rgucButtonsAndHat[4]; /* 7 */ + Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ + Uint8 rgucGyroX[2]; /* 15 */ + Uint8 rgucGyroY[2]; /* 17 */ + Uint8 rgucGyroZ[2]; /* 19 */ + Uint8 rgucAccelX[2]; /* 21 */ + Uint8 rgucAccelY[2]; /* 23 */ + Uint8 rgucAccelZ[2]; /* 25 */ + Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ + Uint8 ucSensorTemp; /* 31 */ + Uint8 ucTouchpadCounter1; /* 32 - high bit clear + counter */ + Uint8 rgucTouchpadData1[3]; /* 33 - X/Y, 12 bits per axis */ + Uint8 ucTouchpadCounter2; /* 36 - high bit clear + counter */ + Uint8 rgucTouchpadData2[3]; /* 37 - X/Y, 12 bits per axis */ + Uint8 rgucUnknown1[8]; /* 40 */ + Uint8 rgucTimer2[4]; /* 48 - 32 bit little endian */ + Uint8 ucBatteryLevel; /* 52 */ + Uint8 ucConnectState; /* 53 - 0x08 = USB, 0x01 = headphone */ /* There's more unknown data at the end, and a 32-bit CRC on Bluetooth */ } PS5StatePacket_t; typedef struct { - Uint8 ucLeftJoystickX; /* 0 */ - Uint8 ucLeftJoystickY; /* 1 */ - Uint8 ucRightJoystickX; /* 2 */ - Uint8 ucRightJoystickY; /* 3 */ - Uint8 ucTriggerLeft; /* 4 */ - Uint8 ucTriggerRight; /* 5 */ - Uint8 ucCounter; /* 6 */ - Uint8 rgucButtonsAndHat[4]; /* 7 */ - Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ - Uint8 rgucGyroX[2]; /* 15 */ - Uint8 rgucGyroY[2]; /* 17 */ - Uint8 rgucGyroZ[2]; /* 19 */ - Uint8 rgucAccelX[2]; /* 21 */ - Uint8 rgucAccelY[2]; /* 23 */ - Uint8 rgucAccelZ[2]; /* 25 */ - Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ - Uint8 ucTouchpadCounter1; /* 31 - high bit clear + counter */ - Uint8 rgucTouchpadData1[3]; /* 32 - X/Y, 12 bits per axis */ - Uint8 ucTouchpadCounter2; /* 35 - high bit clear + counter */ - Uint8 rgucTouchpadData2[3]; /* 36 - X/Y, 12 bits per axis */ + Uint8 ucLeftJoystickX; /* 0 */ + Uint8 ucLeftJoystickY; /* 1 */ + Uint8 ucRightJoystickX; /* 2 */ + Uint8 ucRightJoystickY; /* 3 */ + Uint8 ucTriggerLeft; /* 4 */ + Uint8 ucTriggerRight; /* 5 */ + Uint8 ucCounter; /* 6 */ + Uint8 rgucButtonsAndHat[4]; /* 7 */ + Uint8 rgucPacketSequence[4]; /* 11 - 32 bit little endian */ + Uint8 rgucGyroX[2]; /* 15 */ + Uint8 rgucGyroY[2]; /* 17 */ + Uint8 rgucGyroZ[2]; /* 19 */ + Uint8 rgucAccelX[2]; /* 21 */ + Uint8 rgucAccelY[2]; /* 23 */ + Uint8 rgucAccelZ[2]; /* 25 */ + Uint8 rgucSensorTimestamp[4]; /* 27 - 32 bit little endian */ + Uint8 ucTouchpadCounter1; /* 31 - high bit clear + counter */ + Uint8 rgucTouchpadData1[3]; /* 32 - X/Y, 12 bits per axis */ + Uint8 ucTouchpadCounter2; /* 35 - high bit clear + counter */ + Uint8 rgucTouchpadData2[3]; /* 36 - X/Y, 12 bits per axis */ /* There's more unknown data at the end, and a 32-bit CRC on Bluetooth */ } PS5StatePacketAlt_t; typedef struct { - Uint8 ucEnableBits1; /* 0 */ - Uint8 ucEnableBits2; /* 1 */ - Uint8 ucRumbleRight; /* 2 */ - Uint8 ucRumbleLeft; /* 3 */ - Uint8 ucHeadphoneVolume; /* 4 */ - Uint8 ucSpeakerVolume; /* 5 */ - Uint8 ucMicrophoneVolume; /* 6 */ - Uint8 ucAudioEnableBits; /* 7 */ - Uint8 ucMicLightMode; /* 8 */ - Uint8 ucAudioMuteBits; /* 9 */ - Uint8 rgucRightTriggerEffect[11]; /* 10 */ - Uint8 rgucLeftTriggerEffect[11]; /* 21 */ - Uint8 rgucUnknown1[6]; /* 32 */ - Uint8 ucEnableBits3; /* 38 */ - Uint8 rgucUnknown2[2]; /* 39 */ - Uint8 ucLedAnim; /* 41 */ - Uint8 ucLedBrightness; /* 42 */ - Uint8 ucPadLights; /* 43 */ - Uint8 ucLedRed; /* 44 */ - Uint8 ucLedGreen; /* 45 */ - Uint8 ucLedBlue; /* 46 */ + Uint8 ucEnableBits1; /* 0 */ + Uint8 ucEnableBits2; /* 1 */ + Uint8 ucRumbleRight; /* 2 */ + Uint8 ucRumbleLeft; /* 3 */ + Uint8 ucHeadphoneVolume; /* 4 */ + Uint8 ucSpeakerVolume; /* 5 */ + Uint8 ucMicrophoneVolume; /* 6 */ + Uint8 ucAudioEnableBits; /* 7 */ + Uint8 ucMicLightMode; /* 8 */ + Uint8 ucAudioMuteBits; /* 9 */ + Uint8 rgucRightTriggerEffect[11]; /* 10 */ + Uint8 rgucLeftTriggerEffect[11]; /* 21 */ + Uint8 rgucUnknown1[6]; /* 32 */ + Uint8 ucEnableBits3; /* 38 */ + Uint8 rgucUnknown2[2]; /* 39 */ + Uint8 ucLedAnim; /* 41 */ + Uint8 ucLedBrightness; /* 42 */ + Uint8 ucPadLights; /* 43 */ + Uint8 ucLedRed; /* 44 */ + Uint8 ucLedGreen; /* 45 */ + Uint8 ucLedBlue; /* 46 */ } DS5EffectsState_t; -typedef enum { - k_EDS5EffectRumbleStart = (1 << 0), - k_EDS5EffectRumble = (1 << 1), - k_EDS5EffectLEDReset = (1 << 2), - k_EDS5EffectLED = (1 << 3), - k_EDS5EffectPadLights = (1 << 4), - k_EDS5EffectMicLight = (1 << 5) +typedef enum +{ + k_EDS5EffectRumbleStart = (1 << 0), + k_EDS5EffectRumble = (1 << 1), + k_EDS5EffectLEDReset = (1 << 2), + k_EDS5EffectLED = (1 << 3), + k_EDS5EffectPadLights = (1 << 4), + k_EDS5EffectMicLight = (1 << 5) } EDS5Effect; -typedef enum { +typedef enum +{ k_EDS5LEDResetStateNone, k_EDS5LEDResetStatePending, k_EDS5LEDResetStateComplete, } EDS5LEDResetState; -typedef struct { +typedef struct +{ Sint16 bias; float sensitivity; } IMUCalibrationData; -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; SDL_bool use_alternate_report; @@ -239,24 +251,19 @@ typedef struct { static int HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size); -static void -HIDAPI_DriverPS5_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS5_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5, callback, userdata); } -static void -HIDAPI_DriverPS5_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverPS5_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5, callback, userdata); } -static SDL_bool -HIDAPI_DriverPS5_IsEnabled(void) +static SDL_bool HIDAPI_DriverPS5_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS5, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS5, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } static int ReadFeatureReport(SDL_hid_device *dev, Uint8 report_id, Uint8 *report, size_t length) @@ -266,8 +273,7 @@ static int ReadFeatureReport(SDL_hid_device *dev, Uint8 report_id, Uint8 *report return SDL_hid_get_feature_report(dev, report, length); } -static SDL_bool -HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { Uint8 data[USB_PACKET_LENGTH]; int size; @@ -276,10 +282,10 @@ HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, return SDL_TRUE; } - if (SONY_THIRDPARTY_VENDOR(vendor_id)) { + if (HIDAPI_SupportsPlaystationDetection(vendor_id, product_id)) { if (device && device->dev) { - if ((size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data))) == 48 && - data[2] == 0x28) { + size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data)); + if (size == 48 && data[2] == 0x28) { /* Supported third party controller */ return SDL_TRUE; } else { @@ -293,8 +299,7 @@ HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, return SDL_FALSE; } -static void -SetLedsForPlayerIndex(DS5EffectsState_t *effects, int player_index) +static void SetLedsForPlayerIndex(DS5EffectsState_t *effects, int player_index) { /* This list is the same as what hid-sony.c uses in the Linux kernel. The first 4 values correspond to what the PS4 assigns. @@ -320,8 +325,7 @@ SetLedsForPlayerIndex(DS5EffectsState_t *effects, int player_index) effects->ucLedBlue = colors[player_index][2]; } -static void -SetLightsForPlayerIndex(DS5EffectsState_t *effects, int player_index) +static void SetLightsForPlayerIndex(DS5EffectsState_t *effects, int player_index) { static const Uint8 lights[] = { 0x04, @@ -339,17 +343,16 @@ SetLightsForPlayerIndex(DS5EffectsState_t *effects, int player_index) } } -static SDL_bool -HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS5_Context *ctx; - Uint8 data[USB_PACKET_LENGTH*2]; + Uint8 data[USB_PACKET_LENGTH * 2]; int size; char serial[18]; SDL_JoystickType joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; ctx = (SDL_DriverPS5_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -406,8 +409,8 @@ HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device) This will also enable enhanced reports over Bluetooth */ if (ReadFeatureReport(device->dev, k_EPS5FeatureReportIdSerialNumber, data, sizeof(data)) >= 7) { - SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", - data[6], data[5], data[4], data[3], data[2], data[1]); + (void)SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", + data[6], data[5], data[4], data[3], data[2], data[1]); } /* Read the firmware version @@ -425,63 +428,77 @@ HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device) ctx->vibration_supported = SDL_TRUE; ctx->playerled_supported = SDL_TRUE; ctx->touchpad_supported = SDL_TRUE; - } else if ((size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data))) == 48 && - data[2] == 0x28) { - Uint8 capabilities = data[4]; - Uint8 capabilities2 = data[20]; - Uint8 device_type = data[5]; + } else { + /* Third party controller capability request */ + size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data)); + if (size == 48 && data[2] == 0x28) { + Uint8 capabilities = data[4]; + Uint8 capabilities2 = data[20]; + Uint8 device_type = data[5]; #ifdef DEBUG_PS5_PROTOCOL - HIDAPI_DumpPacket("PS5 capabilities: size = %d", data, size); + HIDAPI_DumpPacket("PS5 capabilities: size = %d", data, size); #endif - if ((capabilities & 0x02) != 0) { + if (capabilities & 0x02) { + ctx->sensors_supported = SDL_TRUE; + } + if (capabilities & 0x04) { + ctx->lightbar_supported = SDL_TRUE; + } + if (capabilities & 0x08) { + ctx->vibration_supported = SDL_TRUE; + } + if (capabilities & 0x40) { + ctx->touchpad_supported = SDL_TRUE; + } + if (capabilities2 & 0x80) { + ctx->playerled_supported = SDL_TRUE; + } + + switch (device_type) { + case 0x00: + joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; + break; + case 0x01: + joystick_type = SDL_JOYSTICK_TYPE_GUITAR; + break; + case 0x02: + joystick_type = SDL_JOYSTICK_TYPE_DRUM_KIT; + break; + case 0x06: + joystick_type = SDL_JOYSTICK_TYPE_WHEEL; + break; + case 0x07: + joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK; + break; + case 0x08: + joystick_type = SDL_JOYSTICK_TYPE_FLIGHT_STICK; + break; + default: + joystick_type = SDL_JOYSTICK_TYPE_UNKNOWN; + break; + } + + ctx->use_alternate_report = SDL_TRUE; + } else if (device->vendor_id == USB_VENDOR_RAZER && + (device->product_id == USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRED || + device->product_id == USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRELESS)) { + /* The Razer Wolverine V2 Pro doesn't respond to the detection protocol, but has a touchpad and sensors, but no vibration */ ctx->sensors_supported = SDL_TRUE; - } - if ((capabilities & 0x04) != 0) { - ctx->lightbar_supported = SDL_TRUE; - } - if ((capabilities & 0x08) != 0) { - ctx->vibration_supported = SDL_TRUE; - } - if ((capabilities & 0x40) != 0) { ctx->touchpad_supported = SDL_TRUE; + ctx->use_alternate_report = SDL_TRUE; } - if ((capabilities2 & 0x80) != 0) { - ctx->playerled_supported = SDL_TRUE; - } - - switch (device_type) { - case 0x00: - joystick_type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; - break; - case 0x01: - joystick_type = SDL_JOYSTICK_TYPE_GUITAR; - break; - case 0x02: - joystick_type = SDL_JOYSTICK_TYPE_DRUM_KIT; - break; - case 0x06: - joystick_type = SDL_JOYSTICK_TYPE_WHEEL; - break; - case 0x07: - joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK; - break; - case 0x08: - joystick_type = SDL_JOYSTICK_TYPE_FLIGHT_STICK; - break; - default: - joystick_type = SDL_JOYSTICK_TYPE_UNKNOWN; - break; - } - - ctx->use_alternate_report = SDL_TRUE; } ctx->effects_supported = (ctx->lightbar_supported || ctx->vibration_supported || ctx->playerled_supported); device->joystick_type = joystick_type; device->type = SDL_CONTROLLER_TYPE_PS5; if (device->vendor_id == USB_VENDOR_SONY) { - HIDAPI_SetDeviceName(device, "PS5 Controller"); + if (SDL_IsJoystickDualSenseEdge(device->vendor_id, device->product_id)) { + HIDAPI_SetDeviceName(device, "DualSense Edge Wireless Controller"); + } else { + HIDAPI_SetDeviceName(device, "DualSense Wireless Controller"); + } } HIDAPI_SetDeviceSerial(device, serial); @@ -496,14 +513,12 @@ HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverPS5_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverPS5_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverPS5_LoadCalibrationData(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS5_LoadCalibrationData(SDL_HIDAPI_Device *device) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; int i, size; @@ -595,8 +610,7 @@ HIDAPI_DriverPS5_LoadCalibrationData(SDL_HIDAPI_Device *device) } } -static float -HIDAPI_DriverPS5_ApplyCalibrationData(SDL_DriverPS5_Context *ctx, int index, Sint16 value) +static float HIDAPI_DriverPS5_ApplyCalibrationData(SDL_DriverPS5_Context *ctx, int index, Sint16 value) { float result; @@ -619,8 +633,7 @@ HIDAPI_DriverPS5_ApplyCalibrationData(SDL_DriverPS5_Context *ctx, int index, Sin return result; } -static int -HIDAPI_DriverPS5_UpdateEffects(SDL_HIDAPI_Device *device, int effect_mask) +static int HIDAPI_DriverPS5_UpdateEffects(SDL_HIDAPI_Device *device, int effect_mask) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; DS5EffectsState_t effects; @@ -632,7 +645,7 @@ HIDAPI_DriverPS5_UpdateEffects(SDL_HIDAPI_Device *device, int effect_mask) SDL_zero(effects); /* Make sure the Bluetooth connection sequence has completed before sending LED color change */ - if (device->is_bluetooth && + if (device->is_bluetooth && (effect_mask & (k_EDS5EffectLED | k_EDS5EffectPadLights)) != 0) { if (ctx->led_reset_state != k_EDS5LEDResetStateComplete) { ctx->led_reset_state = k_EDS5LEDResetStatePending; @@ -697,14 +710,13 @@ HIDAPI_DriverPS5_UpdateEffects(SDL_HIDAPI_Device *device, int effect_mask) if ((effect_mask & k_EDS5EffectMicLight) != 0) { effects.ucEnableBits2 |= 0x01; /* Enable microphone light */ - effects.ucMicLightMode = 0; /* Bitmask, 0x00 = off, 0x01 = solid, 0x02 = pulse */ + effects.ucMicLightMode = 0; /* Bitmask, 0x00 = off, 0x01 = solid, 0x02 = pulse */ } return HIDAPI_DriverPS5_SendJoystickEffect(device, ctx->joystick, &effects, sizeof(effects)); } -static void -HIDAPI_DriverPS5_CheckPendingLEDReset(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS5_CheckPendingLEDReset(SDL_HIDAPI_Device *device) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; SDL_bool led_reset_complete = SDL_FALSE; @@ -718,7 +730,7 @@ HIDAPI_DriverPS5_CheckPendingLEDReset(SDL_HIDAPI_Device *device) packet->rgucSensorTimestamp[1], packet->rgucSensorTimestamp[2], packet->rgucSensorTimestamp[3]); - if (SDL_TICKS_PASSED(timestamp, connection_complete)) { + if (timestamp >= connection_complete) { led_reset_complete = SDL_TRUE; } } else { @@ -735,24 +747,31 @@ HIDAPI_DriverPS5_CheckPendingLEDReset(SDL_HIDAPI_Device *device) } } -static void -HIDAPI_DriverPS5_TickleBluetooth(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS5_TickleBluetooth(SDL_HIDAPI_Device *device) { - /* This is just a dummy packet that should have no effect, since we don't set the CRC */ - Uint8 data[78]; + SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; - SDL_zeroa(data); + if (ctx->enhanced_mode) { + /* This is just a dummy packet that should have no effect, since we don't set the CRC */ + Uint8 data[78]; + + SDL_zeroa(data); - data[0] = k_EPS5ReportIdBluetoothEffects; - data[1] = 0x02; /* Magic value */ + data[0] = k_EPS5ReportIdBluetoothEffects; + data[1] = 0x02; /* Magic value */ - if (SDL_HIDAPI_LockRumble() == 0) { - SDL_HIDAPI_SendRumbleAndUnlock(device, data, sizeof(data)); + if (SDL_HIDAPI_LockRumble() == 0) { + SDL_HIDAPI_SendRumbleAndUnlock(device, data, sizeof(data)); + } + } else { + /* We can't even send an invalid effects packet, or it will put the controller in enhanced mode */ + if (device->num_joysticks > 0) { + HIDAPI_JoystickDisconnected(device, device->joysticks[0]); + } } } -static void -HIDAPI_DriverPS5_SetEnhancedMode(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS5_SetEnhancedMode(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -804,8 +823,7 @@ static void SDLCALL SDL_PS5PlayerLEDHintChanged(void *userdata, const char *name } } -static void -HIDAPI_DriverPS5_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverPS5_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -819,11 +837,12 @@ HIDAPI_DriverPS5_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID HIDAPI_DriverPS5_UpdateEffects(device, (k_EDS5EffectLED | k_EDS5EffectPadLights)); } -static SDL_bool -HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->joystick = joystick; ctx->last_packet = SDL_GetTicks(); ctx->report_sensors = SDL_FALSE; @@ -839,7 +858,13 @@ HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) ctx->player_lights = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, SDL_TRUE); /* Initialize the joystick capabilities */ - joystick->nbuttons = ctx->touchpad_supported ? 17 : 15; + if (SDL_IsJoystickDualSenseEdge(device->vendor_id, device->product_id)) { + joystick->nbuttons = 21; + } else if (ctx->touchpad_supported) { + joystick->nbuttons = 17; + } else { + joystick->nbuttons = 15; + } joystick->naxes = SDL_CONTROLLER_AXIS_MAX; joystick->epowerlevel = device->is_bluetooth ? SDL_JOYSTICK_POWER_UNKNOWN : SDL_JOYSTICK_POWER_WIRED; joystick->firmware_version = ctx->firmware_version; @@ -858,8 +883,7 @@ HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) return SDL_TRUE; } -static int -HIDAPI_DriverPS5_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverPS5_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -877,14 +901,12 @@ HIDAPI_DriverPS5_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return HIDAPI_DriverPS5_UpdateEffects(device, k_EDS5EffectRumble); } -static int -HIDAPI_DriverPS5_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverPS5_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverPS5_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverPS5_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; Uint32 result = 0; @@ -901,8 +923,7 @@ HIDAPI_DriverPS5_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick return result; } -static int -HIDAPI_DriverPS5_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverPS5_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -918,8 +939,7 @@ HIDAPI_DriverPS5_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return HIDAPI_DriverPS5_UpdateEffects(device, k_EDS5EffectLED); } -static int -HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) +static int HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *effect, int size) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; Uint8 data[78]; @@ -940,7 +960,7 @@ HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy if (device->is_bluetooth) { data[0] = k_EPS5ReportIdBluetoothEffects; - data[1] = 0x02; /* Magic value */ + data[1] = 0x02; /* Magic value */ report_size = 78; offset = 2; @@ -962,7 +982,7 @@ HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy SDL_memcpy(&data[report_size - sizeof(unCRC)], &unCRC, sizeof(unCRC)); } - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return -1; } @@ -987,8 +1007,7 @@ HIDAPI_DriverPS5_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joy return 0; } -static int -HIDAPI_DriverPS5_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverPS5_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -1005,8 +1024,7 @@ HIDAPI_DriverPS5_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joysti return 0; } -static void -HIDAPI_DriverPS5_HandleSimpleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5SimpleStatePacket_t *packet) +static void HIDAPI_DriverPS5_HandleSimpleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5SimpleStatePacket_t *packet) { Sint16 axis; @@ -1080,12 +1098,20 @@ HIDAPI_DriverPS5_HandleSimpleStatePacket(SDL_Joystick *joystick, SDL_hid_device Uint8 data = (packet->rgucButtonsHatAndCounter[2] & 0x03); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data & 0x01) ? SDL_PRESSED : SDL_RELEASED); - SDL_PrivateJoystickButton(joystick, 15, (data & 0x02) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data & 0x02) ? SDL_PRESSED : SDL_RELEASED); } - axis = ((int)packet->ucTriggerLeft * 257) - 32768; + if (packet->ucTriggerLeft == 0 && (packet->rgucButtonsHatAndCounter[1] & 0x04)) { + axis = SDL_JOYSTICK_AXIS_MAX; + } else { + axis = ((int)packet->ucTriggerLeft * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); - axis = ((int)packet->ucTriggerRight * 257) - 32768; + if (packet->ucTriggerRight == 0 && (packet->rgucButtonsHatAndCounter[1] & 0x08)) { + axis = SDL_JOYSTICK_AXIS_MAX; + } else { + axis = ((int)packet->ucTriggerRight * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); axis = ((int)packet->ucLeftJoystickX * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -1099,8 +1125,7 @@ HIDAPI_DriverPS5_HandleSimpleStatePacket(SDL_Joystick *joystick, SDL_hid_device SDL_memcpy(&ctx->last_state.simple, packet, sizeof(ctx->last_state.simple)); } -static void -HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketCommon_t *packet) +static void HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketCommon_t *packet) { Sint16 axis; @@ -1174,13 +1199,25 @@ HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL_hid_device Uint8 data = packet->rgucButtonsAndHat[2]; SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data & 0x01) ? SDL_PRESSED : SDL_RELEASED); - SDL_PrivateJoystickButton(joystick, 15, (data & 0x02) ? SDL_PRESSED : SDL_RELEASED); - SDL_PrivateJoystickButton(joystick, 16, (data & 0x04) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data & 0x02) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_PS5_TOUCHPAD, (data & 0x04) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_PS5_LEFT_FUNCTION, (data & 0x10) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_PS5_RIGHT_FUNCTION, (data & 0x20) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_PS5_LEFT_PADDLE, (data & 0x40) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_PS5_RIGHT_PADDLE, (data & 0x80) ? SDL_PRESSED : SDL_RELEASED); } - axis = ((int)packet->ucTriggerLeft * 257) - 32768; + if (packet->ucTriggerLeft == 0 && (packet->rgucButtonsAndHat[1] & 0x04)) { + axis = SDL_JOYSTICK_AXIS_MAX; + } else { + axis = ((int)packet->ucTriggerLeft * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); - axis = ((int)packet->ucTriggerRight * 257) - 32768; + if (packet->ucTriggerRight == 0 && (packet->rgucButtonsAndHat[1] & 0x08)) { + axis = SDL_JOYSTICK_AXIS_MAX; + } else { + axis = ((int)packet->ucTriggerRight * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); axis = ((int)packet->ucLeftJoystickX * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -1229,8 +1266,7 @@ HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL_hid_device } } -static void -HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacket_t *packet) +static void HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacket_t *packet) { static const float TOUCHPAD_SCALEX = 1.0f / 1920; static const float TOUCHPAD_SCALEY = 1.0f / 1070; @@ -1238,12 +1274,12 @@ HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, int touchpad_x, touchpad_y; if (ctx->report_touchpad) { - touchpad_state = ((packet->ucTouchpadCounter1 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; + touchpad_state = !(packet->ucTouchpadCounter1 & 0x80) ? SDL_PRESSED : SDL_RELEASED; touchpad_x = packet->rgucTouchpadData1[0] | (((int)packet->rgucTouchpadData1[1] & 0x0F) << 8); touchpad_y = (packet->rgucTouchpadData1[1] >> 4) | ((int)packet->rgucTouchpadData1[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 0, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); - touchpad_state = ((packet->ucTouchpadCounter2 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; + touchpad_state = !(packet->ucTouchpadCounter2 & 0x80) ? SDL_PRESSED : SDL_RELEASED; touchpad_x = packet->rgucTouchpadData2[0] | (((int)packet->rgucTouchpadData2[1] & 0x0F) << 8); touchpad_y = (packet->rgucTouchpadData2[1] >> 4) | ((int)packet->rgucTouchpadData2[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 1, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); @@ -1272,8 +1308,7 @@ HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_memcpy(&ctx->last_state, packet, sizeof(ctx->last_state)); } -static void -HIDAPI_DriverPS5_HandleStatePacketAlt(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketAlt_t *packet) +static void HIDAPI_DriverPS5_HandleStatePacketAlt(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketAlt_t *packet) { static const float TOUCHPAD_SCALEX = 1.0f / 1920; static const float TOUCHPAD_SCALEY = 1.0f / 1070; @@ -1281,22 +1316,21 @@ HIDAPI_DriverPS5_HandleStatePacketAlt(SDL_Joystick *joystick, SDL_hid_device *de int touchpad_x, touchpad_y; if (ctx->report_touchpad) { - touchpad_state = ((packet->ucTouchpadCounter1 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; - touchpad_x = packet->rgucTouchpadData1[0] | (((int) packet->rgucTouchpadData1[1] & 0x0F) << 8); - touchpad_y = (packet->rgucTouchpadData1[1] >> 4) | ((int) packet->rgucTouchpadData1[2] << 4); + touchpad_state = !(packet->ucTouchpadCounter1 & 0x80) ? SDL_PRESSED : SDL_RELEASED; + touchpad_x = packet->rgucTouchpadData1[0] | (((int)packet->rgucTouchpadData1[1] & 0x0F) << 8); + touchpad_y = (packet->rgucTouchpadData1[1] >> 4) | ((int)packet->rgucTouchpadData1[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 0, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); - touchpad_state = ((packet->ucTouchpadCounter2 & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; - touchpad_x = packet->rgucTouchpadData2[0] | (((int) packet->rgucTouchpadData2[1] & 0x0F) << 8); - touchpad_y = (packet->rgucTouchpadData2[1] >> 4) | ((int) packet->rgucTouchpadData2[2] << 4); + touchpad_state = !(packet->ucTouchpadCounter2 & 0x80) ? SDL_PRESSED : SDL_RELEASED; + touchpad_x = packet->rgucTouchpadData2[0] | (((int)packet->rgucTouchpadData2[1] & 0x0F) << 8); + touchpad_y = (packet->rgucTouchpadData2[1] >> 4) | ((int)packet->rgucTouchpadData2[2] << 4); SDL_PrivateJoystickTouchpad(joystick, 0, 1, touchpad_state, touchpad_x * TOUCHPAD_SCALEX, touchpad_y * TOUCHPAD_SCALEY, touchpad_state ? 1.0f : 0.0f); } SDL_memcpy(&ctx->last_state, packet, sizeof(ctx->last_state)); } -static SDL_bool -VerifyCRC(Uint8 *data, int size) +static SDL_bool VerifyCRC(Uint8 *data, int size) { Uint8 ubHdr = 0xA1; /* hidp header is part of the CRC calculation */ Uint32 unCRC, unPacketCRC; @@ -1311,8 +1345,7 @@ VerifyCRC(Uint8 *data, int size) return (unCRC == unPacketCRC) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverPS5_IsPacketValid(SDL_DriverPS5_Context *ctx, Uint8 *data, int size) +static SDL_bool HIDAPI_DriverPS5_IsPacketValid(SDL_DriverPS5_Context *ctx, Uint8 *data, int size) { switch (data[0]) { case k_EPS5ReportIdState: @@ -1329,12 +1362,11 @@ HIDAPI_DriverPS5_IsPacketValid(SDL_DriverPS5_Context *ctx, Uint8 *data, int size return SDL_FALSE; } -static SDL_bool -HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; SDL_Joystick *joystick = NULL; - Uint8 data[USB_PACKET_LENGTH*2]; + Uint8 data[USB_PACKET_LENGTH * 2]; int size; int packet_count = 0; Uint32 now = SDL_GetTicks(); @@ -1354,7 +1386,7 @@ HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device) ++packet_count; ctx->last_packet = now; - if (!joystick) { + if (joystick == NULL) { continue; } @@ -1376,15 +1408,15 @@ HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device) /* This is the extended report, we can enable effects now */ HIDAPI_DriverPS5_SetEnhancedMode(device, joystick); } - if (ctx->led_reset_state == k_EDS5LEDResetStatePending) { - HIDAPI_DriverPS5_CheckPendingLEDReset(device); - } HIDAPI_DriverPS5_HandleStatePacketCommon(joystick, device->dev, ctx, (PS5StatePacketCommon_t *)&data[2]); if (ctx->use_alternate_report) { HIDAPI_DriverPS5_HandleStatePacketAlt(joystick, device->dev, ctx, (PS5StatePacketAlt_t *)&data[2]); } else { HIDAPI_DriverPS5_HandleStatePacket(joystick, device->dev, ctx, (PS5StatePacket_t *)&data[2]); } + if (ctx->led_reset_state == k_EDS5LEDResetStatePending) { + HIDAPI_DriverPS5_CheckPendingLEDReset(device); + } break; default: #ifdef DEBUG_JOYSTICK @@ -1414,11 +1446,10 @@ HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverPS5_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverPS5_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context; @@ -1431,13 +1462,11 @@ HIDAPI_DriverPS5_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick ctx->joystick = NULL; } -static void -HIDAPI_DriverPS5_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverPS5_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS5 = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS5 = { SDL_HINT_JOYSTICK_HIDAPI_PS5, SDL_TRUE, HIDAPI_DriverPS5_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.c index 401e56f..d045079 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.c @@ -30,11 +30,10 @@ #include "SDL_hidapi_rumble.h" #include "../../thread/SDL_systhread.h" - typedef struct SDL_HIDAPI_RumbleRequest { SDL_HIDAPI_Device *device; - Uint8 data[2*USB_PACKET_LENGTH]; /* need enough space for the biggest report: dualshock4 is 78 bytes */ + Uint8 data[2 * USB_PACKET_LENGTH]; /* need enough space for the biggest report: dualshock4 is 78 bytes */ int size; SDL_HIDAPI_RumbleSentCallback callback; void *userdata; @@ -47,13 +46,16 @@ typedef struct SDL_HIDAPI_RumbleContext SDL_atomic_t initialized; SDL_atomic_t running; SDL_Thread *thread; - SDL_mutex *lock; SDL_sem *request_sem; SDL_HIDAPI_RumbleRequest *requests_head; SDL_HIDAPI_RumbleRequest *requests_tail; } SDL_HIDAPI_RumbleContext; -static SDL_HIDAPI_RumbleContext rumble_context; +#ifndef SDL_THREAD_SAFETY_ANALYSIS +static +#endif +SDL_mutex *SDL_HIDAPI_rumble_lock; +static SDL_HIDAPI_RumbleContext rumble_context SDL_GUARDED_BY(SDL_HIDAPI_rumble_lock); static int SDLCALL SDL_HIDAPI_RumbleThread(void *data) { @@ -66,7 +68,7 @@ static int SDLCALL SDL_HIDAPI_RumbleThread(void *data) SDL_SemWait(ctx->request_sem); - SDL_LockMutex(ctx->lock); + SDL_LockMutex(SDL_HIDAPI_rumble_lock); request = ctx->requests_tail; if (request) { if (request == ctx->requests_head) { @@ -74,7 +76,7 @@ static int SDLCALL SDL_HIDAPI_RumbleThread(void *data) } ctx->requests_tail = request->prev; } - SDL_UnlockMutex(ctx->lock); + SDL_UnlockMutex(SDL_HIDAPI_rumble_lock); if (request) { SDL_LockMutex(request->device->dev_lock); @@ -98,8 +100,7 @@ static int SDLCALL SDL_HIDAPI_RumbleThread(void *data) return 0; } -static void -SDL_HIDAPI_StopRumbleThread(SDL_HIDAPI_RumbleContext *ctx) +static void SDL_HIDAPI_StopRumbleThread(SDL_HIDAPI_RumbleContext *ctx) { SDL_HIDAPI_RumbleRequest *request; @@ -113,7 +114,7 @@ SDL_HIDAPI_StopRumbleThread(SDL_HIDAPI_RumbleContext *ctx) ctx->thread = NULL; } - SDL_LockMutex(ctx->lock); + SDL_LockMutex(SDL_HIDAPI_rumble_lock); while (ctx->requests_tail) { request = ctx->requests_tail; if (request == ctx->requests_head) { @@ -127,26 +128,25 @@ SDL_HIDAPI_StopRumbleThread(SDL_HIDAPI_RumbleContext *ctx) (void)SDL_AtomicDecRef(&request->device->rumble_pending); SDL_free(request); } - SDL_UnlockMutex(ctx->lock); + SDL_UnlockMutex(SDL_HIDAPI_rumble_lock); if (ctx->request_sem) { SDL_DestroySemaphore(ctx->request_sem); ctx->request_sem = NULL; } - if (ctx->lock) { - SDL_DestroyMutex(ctx->lock); - ctx->lock = NULL; + if (SDL_HIDAPI_rumble_lock) { + SDL_DestroyMutex(SDL_HIDAPI_rumble_lock); + SDL_HIDAPI_rumble_lock = NULL; } SDL_AtomicSet(&ctx->initialized, SDL_FALSE); } -static int -SDL_HIDAPI_StartRumbleThread(SDL_HIDAPI_RumbleContext *ctx) +static int SDL_HIDAPI_StartRumbleThread(SDL_HIDAPI_RumbleContext *ctx) { - ctx->lock = SDL_CreateMutex(); - if (!ctx->lock) { + SDL_HIDAPI_rumble_lock = SDL_CreateMutex(); + if (!SDL_HIDAPI_rumble_lock) { SDL_HIDAPI_StopRumbleThread(ctx); return -1; } @@ -176,7 +176,8 @@ int SDL_HIDAPI_LockRumble(void) } } - return SDL_LockMutex(ctx->lock); + SDL_LockMutex(SDL_HIDAPI_rumble_lock); + return 0; } SDL_bool SDL_HIDAPI_GetPendingRumbleLocked(SDL_HIDAPI_Device *device, Uint8 **data, int **size, int *maximum_size) @@ -215,7 +216,7 @@ int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const } request = (SDL_HIDAPI_RumbleRequest *)SDL_calloc(1, sizeof(*request)); - if (!request) { + if (request == NULL) { SDL_HIDAPI_UnlockRumble(); return SDL_OutOfMemory(); } @@ -226,7 +227,7 @@ int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const request->userdata = userdata; SDL_AtomicIncRef(&device->rumble_pending); - + if (ctx->requests_head) { ctx->requests_head->prev = request; } else { @@ -244,9 +245,7 @@ int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const void SDL_HIDAPI_UnlockRumble(void) { - SDL_HIDAPI_RumbleContext *ctx = &rumble_context; - - SDL_UnlockMutex(ctx->lock); + SDL_UnlockMutex(SDL_HIDAPI_rumble_lock); } int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size) @@ -259,7 +258,7 @@ int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size return SDL_SetError("Tried to send rumble with invalid size"); } - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return -1; } diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.h b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.h index 0cd517e..120d51f 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.h +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_rumble.h @@ -25,12 +25,15 @@ /* Handle rumble on a separate thread so it doesn't block the application */ /* Advanced API */ -int SDL_HIDAPI_LockRumble(void); +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_HIDAPI_rumble_lock; +#endif +int SDL_HIDAPI_LockRumble(void) SDL_TRY_ACQUIRE(0, SDL_HIDAPI_rumble_lock); SDL_bool SDL_HIDAPI_GetPendingRumbleLocked(SDL_HIDAPI_Device *device, Uint8 **data, int **size, int *maximum_size); -int SDL_HIDAPI_SendRumbleAndUnlock(SDL_HIDAPI_Device *device, const Uint8 *data, int size); +int SDL_HIDAPI_SendRumbleAndUnlock(SDL_HIDAPI_Device *device, const Uint8 *data, int size) SDL_RELEASE(SDL_HIDAPI_rumble_lock); typedef void (*SDL_HIDAPI_RumbleSentCallback)(void *userdata); -int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const Uint8 *data, int size, SDL_HIDAPI_RumbleSentCallback callback, void *userdata); -void SDL_HIDAPI_UnlockRumble(void); +int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const Uint8 *data, int size, SDL_HIDAPI_RumbleSentCallback callback, void *userdata) SDL_RELEASE(SDL_HIDAPI_rumble_lock); +void SDL_HIDAPI_UnlockRumble(void) SDL_RELEASE(SDL_HIDAPI_rumble_lock); /* Simple API, will replace any pending rumble with the new data */ int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size); diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_shield.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_shield.c index 04da665..33a2066 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_shield.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_shield.c @@ -30,15 +30,14 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_SHIELD /* Define this if you want to log all packets from the controller */ /*#define DEBUG_SHIELD_PROTOCOL*/ #define CMD_BATTERY_STATE 0x07 -#define CMD_RUMBLE 0x39 -#define CMD_CHARGE_STATE 0x3A +#define CMD_RUMBLE 0x39 +#define CMD_CHARGE_STATE 0x3A /* Milliseconds between polls of battery state */ #define BATTERY_POLL_INTERVAL_MS 60000 @@ -59,7 +58,8 @@ enum SDL_CONTROLLER_NUM_SHIELD_V104_BUTTONS = SDL_CONTROLLER_BUTTON_MISC1 + 1, }; -typedef enum { +typedef enum +{ k_ShieldReportIdControllerState = 0x01, k_ShieldReportIdControllerTouch = 0x02, k_ShieldReportIdCommandResponse = 0x03, @@ -67,7 +67,8 @@ typedef enum { } EShieldReportId; /* This same report structure is used for both requests and responses */ -typedef struct { +typedef struct +{ Uint8 report_id; Uint8 cmd; Uint8 seq_num; @@ -75,7 +76,8 @@ typedef struct { } ShieldCommandReport_t; SDL_COMPILE_TIME_ASSERT(ShieldCommandReport_t, sizeof(ShieldCommandReport_t) == HID_REPORT_SIZE); -typedef struct { +typedef struct +{ Uint8 seq_num; SDL_JoystickPowerLevel battery_level; @@ -91,40 +93,32 @@ typedef struct { Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverShield_Context; - -static void -HIDAPI_DriverShield_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverShield_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, callback, userdata); } -static void -HIDAPI_DriverShield_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverShield_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, callback, userdata); } -static SDL_bool -HIDAPI_DriverShield_IsEnabled(void) +static SDL_bool HIDAPI_DriverShield_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverShield_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverShield_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { return (type == SDL_CONTROLLER_TYPE_NVIDIA_SHIELD) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverShield_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverShield_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverShield_Context *ctx; ctx = (SDL_DriverShield_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -136,19 +130,16 @@ HIDAPI_DriverShield_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverShield_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverShield_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverShield_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverShield_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static int -HIDAPI_DriverShield_SendCommand(SDL_HIDAPI_Device *device, Uint8 cmd, const void *data, int size) +static int HIDAPI_DriverShield_SendCommand(SDL_HIDAPI_Device *device, Uint8 cmd, const void *data, int size) { SDL_DriverShield_Context *ctx = (SDL_DriverShield_Context *)device->context; ShieldCommandReport_t cmd_pkt; @@ -157,7 +148,7 @@ HIDAPI_DriverShield_SendCommand(SDL_HIDAPI_Device *device, Uint8 cmd, const void return SDL_SetError("Command data exceeds HID report size"); } - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return -1; } @@ -173,18 +164,19 @@ HIDAPI_DriverShield_SendCommand(SDL_HIDAPI_Device *device, Uint8 cmd, const void SDL_memset(&cmd_pkt.payload[size], 0, sizeof(cmd_pkt.payload) - size); } - if (SDL_HIDAPI_SendRumbleAndUnlock(device, (Uint8*)&cmd_pkt, sizeof(cmd_pkt)) != sizeof(cmd_pkt)) { + if (SDL_HIDAPI_SendRumbleAndUnlock(device, (Uint8 *)&cmd_pkt, sizeof(cmd_pkt)) != sizeof(cmd_pkt)) { return SDL_SetError("Couldn't send command packet"); } return 0; } -static SDL_bool -HIDAPI_DriverShield_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverShield_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverShield_Context *ctx = (SDL_DriverShield_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->rumble_report_pending = SDL_FALSE; ctx->rumble_update_pending = SDL_FALSE; ctx->left_motor_amplitude = 0; @@ -213,8 +205,7 @@ HIDAPI_DriverShield_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti return SDL_TRUE; } -static int -HIDAPI_DriverShield_SendNextRumble(SDL_HIDAPI_Device *device) +static int HIDAPI_DriverShield_SendNextRumble(SDL_HIDAPI_Device *device) { SDL_DriverShield_Context *ctx = device->context; Uint8 rumble_data[3]; @@ -233,8 +224,7 @@ HIDAPI_DriverShield_SendNextRumble(SDL_HIDAPI_Device *device) return HIDAPI_DriverShield_SendCommand(device, CMD_RUMBLE, rumble_data, sizeof(rumble_data)); } -static int -HIDAPI_DriverShield_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverShield_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { if (device->product_id == USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V103) { Uint8 rumble_packet[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -264,26 +254,22 @@ HIDAPI_DriverShield_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys } } -static int -HIDAPI_DriverShield_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverShield_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverShield_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverShield_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { return SDL_JOYCAP_RUMBLE; } -static int -HIDAPI_DriverShield_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverShield_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverShield_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverShield_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { const Uint8 *data_bytes = data; @@ -298,14 +284,12 @@ HIDAPI_DriverShield_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick * } } -static int -HIDAPI_DriverShield_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverShield_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverShield_HandleStatePacketV103(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverShield_HandleStatePacketV103(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, Uint8 *data, int size) { if (ctx->last_state[3] != data[3]) { SDL_bool dpad_up = SDL_FALSE; @@ -371,14 +355,14 @@ HIDAPI_DriverShield_HandleStatePacketV103(SDL_Joystick *joystick, SDL_DriverShie SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[2] & 0x80) ? SDL_PRESSED : SDL_RELEASED); } - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, SDL_SwapLE16(*(Sint16*)&data[4]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, SDL_SwapLE16(*(Sint16*)&data[6]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, SDL_SwapLE16(*(Sint16 *)&data[4]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, SDL_SwapLE16(*(Sint16 *)&data[6]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, SDL_SwapLE16(*(Sint16*)&data[8]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, SDL_SwapLE16(*(Sint16*)&data[10]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, SDL_SwapLE16(*(Sint16 *)&data[8]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, SDL_SwapLE16(*(Sint16 *)&data[10]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, SDL_SwapLE16(*(Sint16*)&data[12]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, SDL_SwapLE16(*(Sint16*)&data[14]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, SDL_SwapLE16(*(Sint16 *)&data[12]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, SDL_SwapLE16(*(Sint16 *)&data[14]) - 0x8000); SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } @@ -386,8 +370,7 @@ HIDAPI_DriverShield_HandleStatePacketV103(SDL_Joystick *joystick, SDL_DriverShie #undef clamp #define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) -static void -HIDAPI_DriverShield_HandleTouchPacketV103(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverShield_HandleTouchPacketV103(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, const Uint8 *data, int size) { Uint8 touchpad_state; float touchpad_x, touchpad_y; @@ -395,14 +378,13 @@ HIDAPI_DriverShield_HandleTouchPacketV103(SDL_Joystick *joystick, SDL_DriverShie SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_SHIELD_V103_TOUCHPAD, (data[1] & 0x01) ? SDL_PRESSED : SDL_RELEASED); /* It's a triangular pad, but just use the center as the usable touch area */ - touchpad_state = ((data[1] & 0x80) == 0) ? SDL_PRESSED : SDL_RELEASED; + touchpad_state = !(data[1] & 0x80) ? SDL_PRESSED : SDL_RELEASED; touchpad_x = clamp((float)(data[2] - 0x70) / 0x50, 0.0f, 1.0f); touchpad_y = clamp((float)(data[4] - 0x40) / 0x15, 0.0f, 1.0f); SDL_PrivateJoystickTouchpad(joystick, 0, 0, touchpad_state, touchpad_x, touchpad_y, touchpad_state ? 1.0f : 0.0f); } -static void -HIDAPI_DriverShield_HandleStatePacketV104(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverShield_HandleStatePacketV104(SDL_Joystick *joystick, SDL_DriverShield_Context *ctx, Uint8 *data, int size) { if (size < 23) { return; @@ -467,14 +449,14 @@ HIDAPI_DriverShield_HandleStatePacketV104(SDL_Joystick *joystick, SDL_DriverShie SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_START, (data[4] & 0x01) ? SDL_PRESSED : SDL_RELEASED); } - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, SDL_SwapLE16(*(Sint16*)&data[9]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, SDL_SwapLE16(*(Sint16*)&data[11]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, SDL_SwapLE16(*(Sint16 *)&data[9]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, SDL_SwapLE16(*(Sint16 *)&data[11]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, SDL_SwapLE16(*(Sint16*)&data[13]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, SDL_SwapLE16(*(Sint16*)&data[15]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, SDL_SwapLE16(*(Sint16 *)&data[13]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, SDL_SwapLE16(*(Sint16 *)&data[15]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, SDL_SwapLE16(*(Sint16*)&data[19]) - 0x8000); - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, SDL_SwapLE16(*(Sint16*)&data[21]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, SDL_SwapLE16(*(Sint16 *)&data[19]) - 0x8000); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, SDL_SwapLE16(*(Sint16 *)&data[21]) - 0x8000); if (ctx->last_state[17] != data[17]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[17] & 0x01) ? SDL_PRESSED : SDL_RELEASED); @@ -485,8 +467,7 @@ HIDAPI_DriverShield_HandleStatePacketV104(SDL_Joystick *joystick, SDL_DriverShie SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverShield_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverShield_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverShield_Context *ctx = (SDL_DriverShield_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -507,61 +488,61 @@ HIDAPI_DriverShield_UpdateDevice(SDL_HIDAPI_Device *device) /* Byte 0 is HID report ID */ switch (data[0]) { - case k_ShieldReportIdControllerState: - if (!joystick) { - break; - } - if (size == 16) { - HIDAPI_DriverShield_HandleStatePacketV103(joystick, ctx, data, size); - } else { - HIDAPI_DriverShield_HandleStatePacketV104(joystick, ctx, data, size); + case k_ShieldReportIdControllerState: + if (joystick == NULL) { + break; + } + if (size == 16) { + HIDAPI_DriverShield_HandleStatePacketV103(joystick, ctx, data, size); + } else { + HIDAPI_DriverShield_HandleStatePacketV104(joystick, ctx, data, size); + } + break; + case k_ShieldReportIdControllerTouch: + if (joystick == NULL) { + break; + } + HIDAPI_DriverShield_HandleTouchPacketV103(joystick, ctx, data, size); + break; + case k_ShieldReportIdCommandResponse: + cmd_resp_report = (ShieldCommandReport_t *)data; + switch (cmd_resp_report->cmd) { + case CMD_RUMBLE: + ctx->rumble_report_pending = SDL_FALSE; + HIDAPI_DriverShield_SendNextRumble(device); + break; + case CMD_CHARGE_STATE: + ctx->charging = cmd_resp_report->payload[0] != 0; + if (joystick) { + SDL_PrivateJoystickBatteryLevel(joystick, ctx->charging ? SDL_JOYSTICK_POWER_WIRED : ctx->battery_level); } break; - case k_ShieldReportIdControllerTouch: - if (!joystick) { + case CMD_BATTERY_STATE: + switch (cmd_resp_report->payload[2]) { + case 0: + ctx->battery_level = SDL_JOYSTICK_POWER_EMPTY; + break; + case 1: + ctx->battery_level = SDL_JOYSTICK_POWER_LOW; + break; + case 2: /* 40% */ + case 3: /* 60% */ + case 4: /* 80% */ + ctx->battery_level = SDL_JOYSTICK_POWER_MEDIUM; + break; + case 5: + ctx->battery_level = SDL_JOYSTICK_POWER_FULL; + break; + default: + ctx->battery_level = SDL_JOYSTICK_POWER_UNKNOWN; break; } - HIDAPI_DriverShield_HandleTouchPacketV103(joystick, ctx, data, size); - break; - case k_ShieldReportIdCommandResponse: - cmd_resp_report = (ShieldCommandReport_t*)data; - switch (cmd_resp_report->cmd) { - case CMD_RUMBLE: - ctx->rumble_report_pending = SDL_FALSE; - HIDAPI_DriverShield_SendNextRumble(device); - break; - case CMD_CHARGE_STATE: - ctx->charging = cmd_resp_report->payload[0] != 0; - if (joystick) { - SDL_PrivateJoystickBatteryLevel(joystick, ctx->charging ? SDL_JOYSTICK_POWER_WIRED : ctx->battery_level); - } - break; - case CMD_BATTERY_STATE: - switch (cmd_resp_report->payload[2]) { - case 0: - ctx->battery_level = SDL_JOYSTICK_POWER_EMPTY; - break; - case 1: - ctx->battery_level = SDL_JOYSTICK_POWER_LOW; - break; - case 2: /* 40% */ - case 3: /* 60% */ - case 4: /* 80% */ - ctx->battery_level = SDL_JOYSTICK_POWER_MEDIUM; - break; - case 5: - ctx->battery_level = SDL_JOYSTICK_POWER_FULL; - break; - default: - ctx->battery_level = SDL_JOYSTICK_POWER_UNKNOWN; - break; - } - if (joystick) { - SDL_PrivateJoystickBatteryLevel(joystick, ctx->charging ? SDL_JOYSTICK_POWER_WIRED : ctx->battery_level); - } - break; + if (joystick) { + SDL_PrivateJoystickBatteryLevel(joystick, ctx->charging ? SDL_JOYSTICK_POWER_WIRED : ctx->battery_level); } break; + } + break; } } @@ -582,21 +563,18 @@ HIDAPI_DriverShield_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverShield_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverShield_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { } -static void -HIDAPI_DriverShield_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverShield_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverShield = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverShield = { SDL_HINT_JOYSTICK_HIDAPI_SHIELD, SDL_TRUE, HIDAPI_DriverShield_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_stadia.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_stadia.c index b6ce3c9..0cdb4f4 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_stadia.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_stadia.c @@ -29,7 +29,6 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_STADIA /* Define this if you want to log all packets from the controller */ @@ -42,71 +41,73 @@ enum SDL_CONTROLLER_NUM_STADIA_BUTTONS, }; -typedef struct { +typedef struct +{ + SDL_bool rumble_supported; Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverStadia_Context; - -static void -HIDAPI_DriverStadia_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverStadia_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STADIA, callback, userdata); } -static void -HIDAPI_DriverStadia_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverStadia_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STADIA, callback, userdata); } -static SDL_bool -HIDAPI_DriverStadia_IsEnabled(void) +static SDL_bool HIDAPI_DriverStadia_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_STADIA, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_STADIA, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverStadia_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverStadia_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { return (type == SDL_CONTROLLER_TYPE_GOOGLE_STADIA) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverStadia_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverStadia_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverStadia_Context *ctx; ctx = (SDL_DriverStadia_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } device->context = ctx; + /* Check whether rumble is supported */ + { + Uint8 rumble_packet[] = { 0x05, 0x00, 0x00, 0x00, 0x00 }; + + if (SDL_hid_write(device->dev, rumble_packet, sizeof(rumble_packet)) >= 0) { + ctx->rumble_supported = SDL_TRUE; + } + } + device->type = SDL_CONTROLLER_TYPE_GOOGLE_STADIA; HIDAPI_SetDeviceName(device, "Google Stadia Controller"); return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverStadia_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverStadia_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverStadia_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverStadia_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverStadia_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverStadia_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverStadia_Context *ctx = (SDL_DriverStadia_Context *)device->context; + SDL_AssertJoysticksLocked(); + SDL_zeroa(ctx->last_state); /* Initialize the joystick capabilities */ @@ -117,58 +118,64 @@ HIDAPI_DriverStadia_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti return SDL_TRUE; } -static int -HIDAPI_DriverStadia_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverStadia_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { - Uint8 rumble_packet[] = { 0x05, 0x00, 0x00, 0x00, 0x00 }; + SDL_DriverStadia_Context *ctx = (SDL_DriverStadia_Context *)device->context; + + if (ctx->rumble_supported) { + Uint8 rumble_packet[] = { 0x05, 0x00, 0x00, 0x00, 0x00 }; + - rumble_packet[1] = (low_frequency_rumble & 0xFF); - rumble_packet[2] = (low_frequency_rumble >> 8); - rumble_packet[3] = (high_frequency_rumble & 0xFF); - rumble_packet[4] = (high_frequency_rumble >> 8); + rumble_packet[1] = (low_frequency_rumble & 0xFF); + rumble_packet[2] = (low_frequency_rumble >> 8); + rumble_packet[3] = (high_frequency_rumble & 0xFF); + rumble_packet[4] = (high_frequency_rumble >> 8); - if (SDL_HIDAPI_SendRumble(device, rumble_packet, sizeof(rumble_packet)) != sizeof(rumble_packet)) { - return SDL_SetError("Couldn't send rumble packet"); + if (SDL_HIDAPI_SendRumble(device, rumble_packet, sizeof(rumble_packet)) != sizeof(rumble_packet)) { + return SDL_SetError("Couldn't send rumble packet"); + } + return 0; + } else { + return SDL_Unsupported(); } - return 0; } -static int -HIDAPI_DriverStadia_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverStadia_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverStadia_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverStadia_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { - return SDL_JOYCAP_RUMBLE; + SDL_DriverStadia_Context *ctx = (SDL_DriverStadia_Context *)device->context; + Uint32 caps = 0; + + if (ctx->rumble_supported) { + caps |= SDL_JOYCAP_RUMBLE; + } + return caps; } -static int -HIDAPI_DriverStadia_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverStadia_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverStadia_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverStadia_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverStadia_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverStadia_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_Context *ctx, Uint8 *data, int size) { Sint16 axis; - // The format is the same but the original FW will send 10 bytes and January '21 FW update will send 11 + // The format is the same but the original FW will send 10 bytes and January '21 FW update will send 11 if (size < 10 || data[0] != 0x03) { /* We don't know how to handle this report */ return; @@ -238,8 +245,7 @@ HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_C } #define READ_STICK_AXIS(offset) \ - (data[offset] == 0x80 ? 0 : \ - (Sint16)HIDAPI_RemapVal((float)((int)data[offset] - 0x80), 0x01 - 0x80, 0xff - 0x80, SDL_MIN_SINT16, SDL_MAX_SINT16)) + (data[offset] == 0x80 ? 0 : (Sint16)HIDAPI_RemapVal((float)((int)data[offset] - 0x80), 0x01 - 0x80, 0xff - 0x80, SDL_MIN_SINT16, SDL_MAX_SINT16)) { axis = READ_STICK_AXIS(4); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -265,8 +271,7 @@ HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_C SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverStadia_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverStadia_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverStadia_Context *ctx = (SDL_DriverStadia_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -283,7 +288,7 @@ HIDAPI_DriverStadia_UpdateDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_STADIA_PROTOCOL HIDAPI_DumpPacket("Google Stadia packet: size = %d", data, size); #endif - if (!joystick) { + if (joystick == NULL) { continue; } @@ -294,21 +299,18 @@ HIDAPI_DriverStadia_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverStadia_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverStadia_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { } -static void -HIDAPI_DriverStadia_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverStadia_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverStadia = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverStadia = { SDL_HINT_JOYSTICK_HIDAPI_STADIA, SDL_TRUE, HIDAPI_DriverStadia_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_steam.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_steam.c index 991dec8..046c0ce 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_steam.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_steam.c @@ -29,23 +29,19 @@ #include "../SDL_sysjoystick.h" #include "SDL_hidapijoystick_c.h" - - #ifdef SDL_JOYSTICK_HIDAPI_STEAM /*****************************************************************************************************/ #include -typedef enum -{ - false, - true -} bool; +#define bool SDL_bool +#define true SDL_TRUE +#define false SDL_FALSE typedef uint32_t uint32; typedef uint64_t uint64; - + #include "steam/controller_constants.h" #include "steam/controller_structs.h" @@ -54,17 +50,17 @@ typedef struct SteamControllerStateInternal_t // Controller Type for this Controller State uint32 eControllerType; - // If packet num matches that on your prior call, then the controller state hasn't been changed since + // If packet num matches that on your prior call, then the controller state hasn't been changed since // your last call and there is no need to process it uint32 unPacketNum; - + // bit flags for each of the buttons uint64 ulButtons; - + // Left pad coordinates short sLeftPadX; short sLeftPadY; - + // Right pad coordinates short sRightPadX; short sRightPadY; @@ -72,7 +68,7 @@ typedef struct SteamControllerStateInternal_t // Center pad coordinates short sCenterPadX; short sCenterPadY; - + // Left analog stick coordinates short sLeftStickX; short sLeftStickY; @@ -80,289 +76,276 @@ typedef struct SteamControllerStateInternal_t // Right analog stick coordinates short sRightStickX; short sRightStickY; - + unsigned short sTriggerL; unsigned short sTriggerR; - + short sAccelX; short sAccelY; short sAccelZ; - + short sGyroX; short sGyroY; short sGyroZ; - + float sGyroQuatW; float sGyroQuatX; float sGyroQuatY; float sGyroQuatZ; - + short sGyroSteeringAngle; - + unsigned short sBatteryLevel; // Pressure sensor data. unsigned short sPressurePadLeft; unsigned short sPressurePadRight; - + unsigned short sPressureBumperLeft; unsigned short sPressureBumperRight; - + // Internal state data short sPrevLeftPad[2]; short sPrevLeftStick[2]; } SteamControllerStateInternal_t; - /* Defines for ulButtons in SteamControllerStateInternal_t */ -#define STEAM_RIGHT_TRIGGER_MASK 0x00000001 -#define STEAM_LEFT_TRIGGER_MASK 0x00000002 -#define STEAM_RIGHT_BUMPER_MASK 0x00000004 -#define STEAM_LEFT_BUMPER_MASK 0x00000008 -#define STEAM_BUTTON_0_MASK 0x00000010 /* Y */ -#define STEAM_BUTTON_1_MASK 0x00000020 /* B */ -#define STEAM_BUTTON_2_MASK 0x00000040 /* X */ -#define STEAM_BUTTON_3_MASK 0x00000080 /* A */ -#define STEAM_TOUCH_0_MASK 0x00000100 /* DPAD UP */ -#define STEAM_TOUCH_1_MASK 0x00000200 /* DPAD RIGHT */ -#define STEAM_TOUCH_2_MASK 0x00000400 /* DPAD LEFT */ -#define STEAM_TOUCH_3_MASK 0x00000800 /* DPAD DOWN */ -#define STEAM_BUTTON_MENU_MASK 0x00001000 /* SELECT */ -#define STEAM_BUTTON_STEAM_MASK 0x00002000 /* GUIDE */ -#define STEAM_BUTTON_ESCAPE_MASK 0x00004000 /* START */ -#define STEAM_BUTTON_BACK_LEFT_MASK 0x00008000 -#define STEAM_BUTTON_BACK_RIGHT_MASK 0x00010000 -#define STEAM_BUTTON_LEFTPAD_CLICKED_MASK 0x00020000 -#define STEAM_BUTTON_RIGHTPAD_CLICKED_MASK 0x00040000 -#define STEAM_LEFTPAD_FINGERDOWN_MASK 0x00080000 -#define STEAM_RIGHTPAD_FINGERDOWN_MASK 0x00100000 -#define STEAM_JOYSTICK_BUTTON_MASK 0x00400000 -#define STEAM_LEFTPAD_AND_JOYSTICK_MASK 0x00800000 - +#define STEAM_RIGHT_TRIGGER_MASK 0x00000001 +#define STEAM_LEFT_TRIGGER_MASK 0x00000002 +#define STEAM_RIGHT_BUMPER_MASK 0x00000004 +#define STEAM_LEFT_BUMPER_MASK 0x00000008 +#define STEAM_BUTTON_0_MASK 0x00000010 /* Y */ +#define STEAM_BUTTON_1_MASK 0x00000020 /* B */ +#define STEAM_BUTTON_2_MASK 0x00000040 /* X */ +#define STEAM_BUTTON_3_MASK 0x00000080 /* A */ +#define STEAM_TOUCH_0_MASK 0x00000100 /* DPAD UP */ +#define STEAM_TOUCH_1_MASK 0x00000200 /* DPAD RIGHT */ +#define STEAM_TOUCH_2_MASK 0x00000400 /* DPAD LEFT */ +#define STEAM_TOUCH_3_MASK 0x00000800 /* DPAD DOWN */ +#define STEAM_BUTTON_MENU_MASK 0x00001000 /* SELECT */ +#define STEAM_BUTTON_STEAM_MASK 0x00002000 /* GUIDE */ +#define STEAM_BUTTON_ESCAPE_MASK 0x00004000 /* START */ +#define STEAM_BUTTON_BACK_LEFT_MASK 0x00008000 +#define STEAM_BUTTON_BACK_RIGHT_MASK 0x00010000 +#define STEAM_BUTTON_LEFTPAD_CLICKED_MASK 0x00020000 +#define STEAM_BUTTON_RIGHTPAD_CLICKED_MASK 0x00040000 +#define STEAM_LEFTPAD_FINGERDOWN_MASK 0x00080000 +#define STEAM_RIGHTPAD_FINGERDOWN_MASK 0x00100000 +#define STEAM_JOYSTICK_BUTTON_MASK 0x00400000 +#define STEAM_LEFTPAD_AND_JOYSTICK_MASK 0x00800000 // Look for report version 0x0001, type WIRELESS (3), length >= 1 byte -#define D0G_IS_VALID_WIRELESS_EVENT(data, len) ((len) >= 5 && (data)[0] == 1 && (data)[1] == 0 && (data)[2] == 3 && (data)[3] >= 1) -#define D0G_GET_WIRELESS_EVENT_TYPE(data) ((data)[4]) -#define D0G_WIRELESS_DISCONNECTED 1 -#define D0G_WIRELESS_ESTABLISHED 2 -#define D0G_WIRELESS_NEWLYPAIRED 3 +#define D0G_IS_VALID_WIRELESS_EVENT(data, len) ((len) >= 5 && (data)[0] == 1 && (data)[1] == 0 && (data)[2] == 3 && (data)[3] >= 1) +#define D0G_GET_WIRELESS_EVENT_TYPE(data) ((data)[4]) +#define D0G_WIRELESS_DISCONNECTED 1 +#define D0G_WIRELESS_ESTABLISHED 2 +#define D0G_WIRELESS_NEWLYPAIRED 3 -#define D0G_IS_WIRELESS_DISCONNECT(data, len) ( D0G_IS_VALID_WIRELESS_EVENT(data,len) && D0G_GET_WIRELESS_EVENT_TYPE(data) == D0G_WIRELESS_DISCONNECTED ) +#define D0G_IS_WIRELESS_DISCONNECT(data, len) (D0G_IS_VALID_WIRELESS_EVENT(data, len) && D0G_GET_WIRELESS_EVENT_TYPE(data) == D0G_WIRELESS_DISCONNECTED) -#define MAX_REPORT_SEGMENT_PAYLOAD_SIZE 18 +#define MAX_REPORT_SEGMENT_PAYLOAD_SIZE 18 /* * SteamControllerPacketAssembler has to be used when reading output repots from controllers. */ typedef struct { - uint8_t uBuffer[ MAX_REPORT_SEGMENT_PAYLOAD_SIZE * 8 + 1 ]; + uint8_t uBuffer[MAX_REPORT_SEGMENT_PAYLOAD_SIZE * 8 + 1]; int nExpectedSegmentNumber; bool bIsBle; } SteamControllerPacketAssembler; - #undef clamp #define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) #undef offsetof -#define offsetof(s,m) (size_t)&(((s *)0)->m) +#define offsetof(s, m) (size_t) & (((s *)0)->m) #ifdef DEBUG_STEAM_CONTROLLER #define DPRINTF(format, ...) printf(format, ##__VA_ARGS__) -#define HEXDUMP(ptr, len) hexdump(ptr, len) +#define HEXDUMP(ptr, len) hexdump(ptr, len) #else #define DPRINTF(format, ...) #define HEXDUMP(ptr, len) #endif -#define printf SDL_Log +#define printf SDL_Log -#define MAX_REPORT_SEGMENT_SIZE ( MAX_REPORT_SEGMENT_PAYLOAD_SIZE + 2 ) -#define CALC_REPORT_SEGMENT_NUM(index) ( ( index / MAX_REPORT_SEGMENT_PAYLOAD_SIZE ) & 0x07 ) -#define REPORT_SEGMENT_DATA_FLAG 0x80 -#define REPORT_SEGMENT_LAST_FLAG 0x40 -#define BLE_REPORT_NUMBER 0x03 +#define MAX_REPORT_SEGMENT_SIZE (MAX_REPORT_SEGMENT_PAYLOAD_SIZE + 2) +#define CALC_REPORT_SEGMENT_NUM(index) ((index / MAX_REPORT_SEGMENT_PAYLOAD_SIZE) & 0x07) +#define REPORT_SEGMENT_DATA_FLAG 0x80 +#define REPORT_SEGMENT_LAST_FLAG 0x40 +#define BLE_REPORT_NUMBER 0x03 #define STEAMCONTROLLER_TRIGGER_MAX_ANALOG 26000 // Enable mouse mode when using the Steam Controller locally #undef ENABLE_MOUSE_MODE - // Wireless firmware quirk: the firmware intentionally signals "failure" when performing // SET_FEATURE / GET_FEATURE when it actually means "pending radio roundtrip". The only // way to make SET_FEATURE / GET_FEATURE work is to loop several times with a sleep. If // it takes more than 50ms to get the response for SET_FEATURE / GET_FEATURE, we assume // that the controller has failed. -#define RADIO_WORKAROUND_SLEEP_ATTEMPTS 50 +#define RADIO_WORKAROUND_SLEEP_ATTEMPTS 50 #define RADIO_WORKAROUND_SLEEP_DURATION_US 500 // This was defined by experimentation. 2000 seemed to work but to give that extra bit of margin, set to 3ms. #define CONTROLLER_CONFIGURATION_DELAY_US 3000 -static uint8_t GetSegmentHeader( int nSegmentNumber, bool bLastPacket ) +static uint8_t GetSegmentHeader(int nSegmentNumber, bool bLastPacket) { uint8_t header = REPORT_SEGMENT_DATA_FLAG; header |= nSegmentNumber; - if ( bLastPacket ) + if (bLastPacket) { header |= REPORT_SEGMENT_LAST_FLAG; - + } + return header; } -static void hexdump( const uint8_t *ptr, int len ) +static void hexdump(const uint8_t *ptr, int len) { int i; - for ( i = 0; i < len ; ++i ) + for (i = 0; i < len; ++i) { printf("%02x ", ptr[i]); + } printf("\n"); } -static void ResetSteamControllerPacketAssembler( SteamControllerPacketAssembler *pAssembler ) +static void ResetSteamControllerPacketAssembler(SteamControllerPacketAssembler *pAssembler) { - SDL_memset( pAssembler->uBuffer, 0, sizeof( pAssembler->uBuffer ) ); + SDL_memset(pAssembler->uBuffer, 0, sizeof(pAssembler->uBuffer)); pAssembler->nExpectedSegmentNumber = 0; } -static void InitializeSteamControllerPacketAssembler( SteamControllerPacketAssembler *pAssembler ) +static void InitializeSteamControllerPacketAssembler(SteamControllerPacketAssembler *pAssembler) { /* We only support BLE devices right now */ pAssembler->bIsBle = true; - ResetSteamControllerPacketAssembler( pAssembler ); + ResetSteamControllerPacketAssembler(pAssembler); } // Returns: // <0 on error // 0 on not ready // Complete packet size on completion -static int WriteSegmentToSteamControllerPacketAssembler( SteamControllerPacketAssembler *pAssembler, const uint8_t *pSegment, int nSegmentLength ) +static int WriteSegmentToSteamControllerPacketAssembler(SteamControllerPacketAssembler *pAssembler, const uint8_t *pSegment, int nSegmentLength) { - if ( pAssembler->bIsBle ) - { - uint8_t uSegmentHeader = pSegment[ 1 ]; + if (pAssembler->bIsBle) { + uint8_t uSegmentHeader = pSegment[1]; int nSegmentNumber = uSegmentHeader & 0x07; - HEXDUMP( pSegment, nSegmentLength ); + HEXDUMP(pSegment, nSegmentLength); - if ( pSegment[ 0 ] != BLE_REPORT_NUMBER ) - { + if (pSegment[0] != BLE_REPORT_NUMBER) { // We may get keyboard/mouse input events until controller stops sending them return 0; } - - if ( nSegmentLength != MAX_REPORT_SEGMENT_SIZE ) - { - printf( "Bad segment size! %d\n", (int)nSegmentLength ); - hexdump( pSegment, nSegmentLength ); - ResetSteamControllerPacketAssembler( pAssembler ); + + if (nSegmentLength != MAX_REPORT_SEGMENT_SIZE) { + printf("Bad segment size! %d\n", nSegmentLength); + hexdump(pSegment, nSegmentLength); + ResetSteamControllerPacketAssembler(pAssembler); return -1; } - + DPRINTF("GOT PACKET HEADER = 0x%x\n", uSegmentHeader); - - if ( ( uSegmentHeader & REPORT_SEGMENT_DATA_FLAG ) == 0 ) - { + + if (!(uSegmentHeader & REPORT_SEGMENT_DATA_FLAG)) { // We get empty segments, just ignore them return 0; } - - if ( nSegmentNumber != pAssembler->nExpectedSegmentNumber ) - { - ResetSteamControllerPacketAssembler( pAssembler ); - - if ( nSegmentNumber ) - { + + if (nSegmentNumber != pAssembler->nExpectedSegmentNumber) { + ResetSteamControllerPacketAssembler(pAssembler); + + if (nSegmentNumber) { // This happens occasionally DPRINTF("Bad segment number, got %d, expected %d\n", - nSegmentNumber, pAssembler->nExpectedSegmentNumber ); + nSegmentNumber, pAssembler->nExpectedSegmentNumber); return -1; } } - - SDL_memcpy( pAssembler->uBuffer + nSegmentNumber * MAX_REPORT_SEGMENT_PAYLOAD_SIZE, - pSegment + 2, // ignore header and report number - MAX_REPORT_SEGMENT_PAYLOAD_SIZE ); - - if ( uSegmentHeader & REPORT_SEGMENT_LAST_FLAG ) - { + + SDL_memcpy(pAssembler->uBuffer + nSegmentNumber * MAX_REPORT_SEGMENT_PAYLOAD_SIZE, + pSegment + 2, // ignore header and report number + MAX_REPORT_SEGMENT_PAYLOAD_SIZE); + + if (uSegmentHeader & REPORT_SEGMENT_LAST_FLAG) { pAssembler->nExpectedSegmentNumber = 0; - return ( nSegmentNumber + 1 ) * MAX_REPORT_SEGMENT_PAYLOAD_SIZE; + return (nSegmentNumber + 1) * MAX_REPORT_SEGMENT_PAYLOAD_SIZE; } - + pAssembler->nExpectedSegmentNumber++; - } - else - { + } else { // Just pass through - SDL_memcpy( pAssembler->uBuffer, - pSegment, - nSegmentLength ); + SDL_memcpy(pAssembler->uBuffer, + pSegment, + nSegmentLength); return nSegmentLength; } - + return 0; } -#define BLE_MAX_READ_RETRIES 8 +#define BLE_MAX_READ_RETRIES 8 -static int SetFeatureReport( SDL_hid_device *dev, unsigned char uBuffer[65], int nActualDataLen ) +static int SetFeatureReport(SDL_hid_device *dev, unsigned char uBuffer[65], int nActualDataLen) { int nRet = -1; bool bBle = true; // only wireless/BLE for now, though macOS could do wired in the future - + DPRINTF("SetFeatureReport %p %p %d\n", dev, uBuffer, nActualDataLen); - if ( bBle ) - { + if (bBle) { int nSegmentNumber = 0; - uint8_t uPacketBuffer[ MAX_REPORT_SEGMENT_SIZE ]; + uint8_t uPacketBuffer[MAX_REPORT_SEGMENT_SIZE]; unsigned char *pBufferPtr = uBuffer + 1; - if ( nActualDataLen < 1 ) + if (nActualDataLen < 1) { return -1; - + } + // Skip report number in data nActualDataLen--; - - while ( nActualDataLen > 0 ) - { + + while (nActualDataLen > 0) { int nBytesInPacket = nActualDataLen > MAX_REPORT_SEGMENT_PAYLOAD_SIZE ? MAX_REPORT_SEGMENT_PAYLOAD_SIZE : nActualDataLen; - + nActualDataLen -= nBytesInPacket; // Construct packet - SDL_memset( uPacketBuffer, 0, sizeof( uPacketBuffer ) ); - uPacketBuffer[ 0 ] = BLE_REPORT_NUMBER; - uPacketBuffer[ 1 ] = GetSegmentHeader( nSegmentNumber, nActualDataLen == 0 ); - SDL_memcpy( &uPacketBuffer[ 2 ], pBufferPtr, nBytesInPacket ); - + SDL_memset(uPacketBuffer, 0, sizeof(uPacketBuffer)); + uPacketBuffer[0] = BLE_REPORT_NUMBER; + uPacketBuffer[1] = GetSegmentHeader(nSegmentNumber, nActualDataLen == 0); + SDL_memcpy(&uPacketBuffer[2], pBufferPtr, nBytesInPacket); + pBufferPtr += nBytesInPacket; nSegmentNumber++; - - nRet = SDL_hid_send_feature_report( dev, uPacketBuffer, sizeof( uPacketBuffer ) ); + + nRet = SDL_hid_send_feature_report(dev, uPacketBuffer, sizeof(uPacketBuffer)); DPRINTF("SetFeatureReport() ret = %d\n", nRet); } } - + return nRet; } -static int GetFeatureReport( SDL_hid_device *dev, unsigned char uBuffer[65] ) +static int GetFeatureReport(SDL_hid_device *dev, unsigned char uBuffer[65]) { int nRet = -1; bool bBle = true; - DPRINTF("GetFeatureReport( %p %p )\n", dev, uBuffer ); + DPRINTF("GetFeatureReport( %p %p )\n", dev, uBuffer); - if ( bBle ) - { + if (bBle) { int nRetries = 0; - uint8_t uSegmentBuffer[ MAX_REPORT_SEGMENT_SIZE + 1 ]; + uint8_t uSegmentBuffer[MAX_REPORT_SEGMENT_SIZE + 1]; uint8_t ucBytesToRead = MAX_REPORT_SEGMENT_SIZE; uint8_t ucDataStartOffset = 0; SteamControllerPacketAssembler assembler; - InitializeSteamControllerPacketAssembler( &assembler ); - + InitializeSteamControllerPacketAssembler(&assembler); + // On Windows and macOS, BLE devices get 2 copies of the feature report ID, one that is removed by ReadFeatureReport, // and one that's included in the buffer we receive. We pad the bytes to read and skip over the report ID // if necessary. @@ -371,67 +354,65 @@ static int GetFeatureReport( SDL_hid_device *dev, unsigned char uBuffer[65] ) ++ucDataStartOffset; #endif - while( nRetries < BLE_MAX_READ_RETRIES ) - { - SDL_memset( uSegmentBuffer, 0, sizeof( uSegmentBuffer ) ); - uSegmentBuffer[ 0 ] = BLE_REPORT_NUMBER; - nRet = SDL_hid_get_feature_report( dev, uSegmentBuffer, ucBytesToRead ); + while (nRetries < BLE_MAX_READ_RETRIES) { + SDL_memset(uSegmentBuffer, 0, sizeof(uSegmentBuffer)); + uSegmentBuffer[0] = BLE_REPORT_NUMBER; + nRet = SDL_hid_get_feature_report(dev, uSegmentBuffer, ucBytesToRead); + + DPRINTF("GetFeatureReport ble ret=%d\n", nRet); + HEXDUMP(uSegmentBuffer, nRet); - DPRINTF( "GetFeatureReport ble ret=%d\n", nRet ); - HEXDUMP( uSegmentBuffer, nRet ); - // Zero retry counter if we got data - if ( nRet > 2 && ( uSegmentBuffer[ ucDataStartOffset + 1 ] & REPORT_SEGMENT_DATA_FLAG ) ) + if (nRet > 2 && (uSegmentBuffer[ucDataStartOffset + 1] & REPORT_SEGMENT_DATA_FLAG)) { nRetries = 0; - else + } else { nRetries++; + } - if ( nRet > 0 ) - { - int nPacketLength = WriteSegmentToSteamControllerPacketAssembler( &assembler, + if (nRet > 0) { + int nPacketLength = WriteSegmentToSteamControllerPacketAssembler(&assembler, uSegmentBuffer + ucDataStartOffset, - nRet - ucDataStartOffset ); - - if ( nPacketLength > 0 && nPacketLength < 65 ) - { + nRet - ucDataStartOffset); + + if (nPacketLength > 0 && nPacketLength < 65) { // Leave space for "report number" - uBuffer[ 0 ] = 0; - SDL_memcpy( uBuffer + 1, assembler.uBuffer, nPacketLength ); + uBuffer[0] = 0; + SDL_memcpy(uBuffer + 1, assembler.uBuffer, nPacketLength); return nPacketLength; } } - - } - printf("Could not get a full ble packet after %d retries\n", nRetries ); + printf("Could not get a full ble packet after %d retries\n", nRetries); return -1; } - + return nRet; } -static int ReadResponse( SDL_hid_device *dev, uint8_t uBuffer[65], int nExpectedResponse ) +static int ReadResponse(SDL_hid_device *dev, uint8_t uBuffer[65], int nExpectedResponse) { - int nRet = GetFeatureReport( dev, uBuffer ); + int nRet = GetFeatureReport(dev, uBuffer); - DPRINTF("ReadResponse( %p %p %d )\n", dev, uBuffer, nExpectedResponse ); + DPRINTF("ReadResponse( %p %p %d )\n", dev, uBuffer, nExpectedResponse); - if ( nRet < 0 ) + if (nRet < 0) { return nRet; - - DPRINTF("ReadResponse got %d bytes of data: ", nRet ); - HEXDUMP( uBuffer, nRet ); - - if ( uBuffer[1] != nExpectedResponse ) + } + + DPRINTF("ReadResponse got %d bytes of data: ", nRet); + HEXDUMP(uBuffer, nRet); + + if (uBuffer[1] != nExpectedResponse) { return -1; - + } + return nRet; } //--------------------------------------------------------------------------- // Reset steam controller (unmap buttons and pads) and re-fetch capability bits //--------------------------------------------------------------------------- -static bool ResetSteamController( SDL_hid_device *dev, bool bSuppressErrorSpew, uint32_t *punUpdateRateUS ) +static bool ResetSteamController(SDL_hid_device *dev, bool bSuppressErrorSpew, uint32_t *punUpdateRateUS) { // Firmware quirk: Set Feature and Get Feature requests always require a 65-byte buffer. unsigned char buf[65]; @@ -441,46 +422,44 @@ static bool ResetSteamController( SDL_hid_device *dev, bool bSuppressErrorSpew, int nAttributesLength; FeatureReportMsg *msg; uint32_t unUpdateRateUS = 9000; // Good default rate - - DPRINTF( "ResetSteamController hid=%p\n", dev ); + + DPRINTF("ResetSteamController hid=%p\n", dev); buf[0] = 0; buf[1] = ID_GET_ATTRIBUTES_VALUES; - res = SetFeatureReport( dev, buf, 2 ); - if ( res < 0 ) - { - if ( !bSuppressErrorSpew ) - printf( "GET_ATTRIBUTES_VALUES failed for controller %p\n", dev ); + res = SetFeatureReport(dev, buf, 2); + if (res < 0) { + if (!bSuppressErrorSpew) { + printf("GET_ATTRIBUTES_VALUES failed for controller %p\n", dev); + } return false; } - + // Retrieve GET_ATTRIBUTES_VALUES result // Wireless controller endpoints without a connected controller will return nAttrs == 0 - res = ReadResponse( dev, buf, ID_GET_ATTRIBUTES_VALUES ); - if ( res < 0 || buf[1] != ID_GET_ATTRIBUTES_VALUES ) - { + res = ReadResponse(dev, buf, ID_GET_ATTRIBUTES_VALUES); + if (res < 0 || buf[1] != ID_GET_ATTRIBUTES_VALUES) { HEXDUMP(buf, res); - if ( !bSuppressErrorSpew ) - printf( "Bad GET_ATTRIBUTES_VALUES response for controller %p\n", dev ); + if (!bSuppressErrorSpew) { + printf("Bad GET_ATTRIBUTES_VALUES response for controller %p\n", dev); + } return false; } - - nAttributesLength = buf[ 2 ]; - if ( nAttributesLength > res ) - { - if ( !bSuppressErrorSpew ) - printf( "Bad GET_ATTRIBUTES_VALUES response for controller %p\n", dev ); + + nAttributesLength = buf[2]; + if (nAttributesLength > res) { + if (!bSuppressErrorSpew) { + printf("Bad GET_ATTRIBUTES_VALUES response for controller %p\n", dev); + } return false; } msg = (FeatureReportMsg *)&buf[1]; - for ( i = 0; i < (int)msg->header.length / sizeof( ControllerAttribute ); ++i ) - { + for (i = 0; i < (int)msg->header.length / sizeof(ControllerAttribute); ++i) { uint8_t unAttribute = msg->payload.getAttributes.attributes[i].attributeTag; uint32_t unValue = msg->payload.getAttributes.attributes[i].attributeValue; - switch ( unAttribute ) - { + switch (unAttribute) { case ATTRIB_UNIQUE_ID: break; case ATTRIB_PRODUCT_ID: @@ -494,104 +473,98 @@ static bool ResetSteamController( SDL_hid_device *dev, bool bSuppressErrorSpew, break; } } - if ( punUpdateRateUS ) - { + if (punUpdateRateUS) { *punUpdateRateUS = unUpdateRateUS; } // Clear digital button mappings buf[0] = 0; buf[1] = ID_CLEAR_DIGITAL_MAPPINGS; - res = SetFeatureReport( dev, buf, 2 ); - if ( res < 0 ) - { - if ( !bSuppressErrorSpew ) - printf( "CLEAR_DIGITAL_MAPPINGS failed for controller %p\n", dev ); + res = SetFeatureReport(dev, buf, 2); + if (res < 0) { + if (!bSuppressErrorSpew) { + printf("CLEAR_DIGITAL_MAPPINGS failed for controller %p\n", dev); + } return false; } - + // Reset the default settings - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_LOAD_DEFAULT_SETTINGS; buf[2] = 0; - res = SetFeatureReport( dev, buf, 3 ); - if ( res < 0 ) - { - if ( !bSuppressErrorSpew ) - printf( "LOAD_DEFAULT_SETTINGS failed for controller %p\n", dev ); + res = SetFeatureReport(dev, buf, 3); + if (res < 0) { + if (!bSuppressErrorSpew) { + printf("LOAD_DEFAULT_SETTINGS failed for controller %p\n", dev); + } return false; } - + // Apply custom settings - clear trackpad modes (cancel mouse emulation), etc -#define ADD_SETTING(SETTING, VALUE) \ -buf[3+nSettings*3] = SETTING; \ -buf[3+nSettings*3+1] = ((uint16_t)VALUE)&0xFF; \ -buf[3+nSettings*3+2] = ((uint16_t)VALUE)>>8; \ -++nSettings; - - SDL_memset( buf, 0, 65 ); +#define ADD_SETTING(SETTING, VALUE) \ + buf[3 + nSettings * 3] = SETTING; \ + buf[3 + nSettings * 3 + 1] = ((uint16_t)VALUE) & 0xFF; \ + buf[3 + nSettings * 3 + 2] = ((uint16_t)VALUE) >> 8; \ + ++nSettings; + + SDL_memset(buf, 0, 65); buf[1] = ID_SET_SETTINGS_VALUES; - ADD_SETTING( SETTING_WIRELESS_PACKET_VERSION, 2 ); - ADD_SETTING( SETTING_LEFT_TRACKPAD_MODE, TRACKPAD_NONE ); + ADD_SETTING(SETTING_WIRELESS_PACKET_VERSION, 2); + ADD_SETTING(SETTING_LEFT_TRACKPAD_MODE, TRACKPAD_NONE); #ifdef ENABLE_MOUSE_MODE - ADD_SETTING( SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_ABSOLUTE_MOUSE ); - ADD_SETTING( SETTING_SMOOTH_ABSOLUTE_MOUSE, 1 ); - ADD_SETTING( SETTING_MOMENTUM_MAXIMUM_VELOCITY, 20000 ); // [0-20000] default 8000 - ADD_SETTING( SETTING_MOMENTUM_DECAY_AMMOUNT, 50 ); // [0-50] default 5 + ADD_SETTING(SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_ABSOLUTE_MOUSE); + ADD_SETTING(SETTING_SMOOTH_ABSOLUTE_MOUSE, 1); + ADD_SETTING(SETTING_MOMENTUM_MAXIMUM_VELOCITY, 20000); // [0-20000] default 8000 + ADD_SETTING(SETTING_MOMENTUM_DECAY_AMMOUNT, 50); // [0-50] default 5 #else - ADD_SETTING( SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_NONE ); - ADD_SETTING( SETTING_SMOOTH_ABSOLUTE_MOUSE, 0 ); + ADD_SETTING(SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_NONE); + ADD_SETTING(SETTING_SMOOTH_ABSOLUTE_MOUSE, 0); #endif - buf[2] = nSettings*3; - - res = SetFeatureReport( dev, buf, 3+nSettings*3 ); - if ( res < 0 ) - { - if ( !bSuppressErrorSpew ) - printf( "SET_SETTINGS failed for controller %p\n", dev ); + buf[2] = nSettings * 3; + + res = SetFeatureReport(dev, buf, 3 + nSettings * 3); + if (res < 0) { + if (!bSuppressErrorSpew) { + printf("SET_SETTINGS failed for controller %p\n", dev); + } return false; } - + #ifdef ENABLE_MOUSE_MODE // Wait for ID_CLEAR_DIGITAL_MAPPINGS to be processed on the controller bool bMappingsCleared = false; int iRetry; - for ( iRetry = 0; iRetry < 2; ++iRetry ) - { - SDL_memset( buf, 0, 65 ); + for (iRetry = 0; iRetry < 2; ++iRetry) { + SDL_memset(buf, 0, 65); buf[1] = ID_GET_DIGITAL_MAPPINGS; buf[2] = 1; // one byte - requesting from index 0 buf[3] = 0; - res = SetFeatureReport( dev, buf, 4 ); - if ( res < 0 ) - { - printf( "GET_DIGITAL_MAPPINGS failed for controller %p\n", dev ); + res = SetFeatureReport(dev, buf, 4); + if (res < 0) { + printf("GET_DIGITAL_MAPPINGS failed for controller %p\n", dev); return false; } - - res = ReadResponse( dev, buf, ID_GET_DIGITAL_MAPPINGS ); - if ( res < 0 || buf[1] != ID_GET_DIGITAL_MAPPINGS ) - { - printf( "Bad GET_DIGITAL_MAPPINGS response for controller %p\n", dev ); + + res = ReadResponse(dev, buf, ID_GET_DIGITAL_MAPPINGS); + if (res < 0 || buf[1] != ID_GET_DIGITAL_MAPPINGS) { + printf("Bad GET_DIGITAL_MAPPINGS response for controller %p\n", dev); return false; } - + // If the length of the digital mappings result is not 1 (index byte, no mappings) then clearing hasn't executed - if ( buf[2] == 1 && buf[3] == 0xFF ) - { + if (buf[2] == 1 && buf[3] == 0xFF) { bMappingsCleared = true; break; } - usleep( CONTROLLER_CONFIGURATION_DELAY_US ); + usleep(CONTROLLER_CONFIGURATION_DELAY_US); } - - if ( !bMappingsCleared && !bSuppressErrorSpew ) - { - printf( "Warning: CLEAR_DIGITAL_MAPPINGS never completed for controller %p\n", dev ); + + if (!bMappingsCleared && !bSuppressErrorSpew) { + printf("Warning: CLEAR_DIGITAL_MAPPINGS never completed for controller %p\n", dev); } - + // Set our new mappings - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_SET_DIGITAL_MAPPINGS; buf[2] = 6; // 2 settings x 3 bytes buf[3] = IO_DIGITAL_BUTTON_RIGHT_TRIGGER; @@ -600,102 +573,94 @@ buf[3+nSettings*3+2] = ((uint16_t)VALUE)>>8; \ buf[6] = IO_DIGITAL_BUTTON_LEFT_TRIGGER; buf[7] = DEVICE_MOUSE; buf[8] = MOUSE_BTN_RIGHT; - - res = SetFeatureReport( dev, buf, 9 ); - if ( res < 0 ) - { - if ( !bSuppressErrorSpew ) - printf( "SET_DIGITAL_MAPPINGS failed for controller %p\n", dev ); + + res = SetFeatureReport(dev, buf, 9); + if (res < 0) { + if (!bSuppressErrorSpew) { + printf("SET_DIGITAL_MAPPINGS failed for controller %p\n", dev); + } return false; } #endif // ENABLE_MOUSE_MODE - + return true; } - //--------------------------------------------------------------------------- // Read from a Steam Controller //--------------------------------------------------------------------------- -static int ReadSteamController( SDL_hid_device *dev, uint8_t *pData, int nDataSize ) +static int ReadSteamController(SDL_hid_device *dev, uint8_t *pData, int nDataSize) { - SDL_memset( pData, 0, nDataSize ); - pData[ 0 ] = BLE_REPORT_NUMBER; // hid_read will also overwrite this with the same value, 0x03 - return SDL_hid_read( dev, pData, nDataSize ); + SDL_memset(pData, 0, nDataSize); + pData[0] = BLE_REPORT_NUMBER; // hid_read will also overwrite this with the same value, 0x03 + return SDL_hid_read(dev, pData, nDataSize); } - //--------------------------------------------------------------------------- // Close a Steam Controller //--------------------------------------------------------------------------- -static void CloseSteamController( SDL_hid_device *dev ) +static void CloseSteamController(SDL_hid_device *dev) { // Switch the Steam Controller back to lizard mode so it works with the OS unsigned char buf[65]; int nSettings = 0; - + // Reset digital button mappings - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_SET_DEFAULT_DIGITAL_MAPPINGS; - SetFeatureReport( dev, buf, 2 ); + SetFeatureReport(dev, buf, 2); // Reset the default settings - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_LOAD_DEFAULT_SETTINGS; buf[2] = 0; - SetFeatureReport( dev, buf, 3 ); + SetFeatureReport(dev, buf, 3); // Reset mouse mode for lizard mode - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_SET_SETTINGS_VALUES; - ADD_SETTING( SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_ABSOLUTE_MOUSE ); - buf[2] = nSettings*3; - SetFeatureReport( dev, buf, 3+nSettings*3 ); + ADD_SETTING(SETTING_RIGHT_TRACKPAD_MODE, TRACKPAD_ABSOLUTE_MOUSE); + buf[2] = nSettings * 3; + SetFeatureReport(dev, buf, 3 + nSettings * 3); } - //--------------------------------------------------------------------------- // Scale and clamp values to a range //--------------------------------------------------------------------------- -static float RemapValClamped( float val, float A, float B, float C, float D) +static float RemapValClamped(float val, float A, float B, float C, float D) { - if ( A == B ) - { - return ( val - B ) >= 0.0f ? D : C; - } - else - { + if (A == B) { + return (val - B) >= 0.0f ? D : C; + } else { float cVal = (val - A) / (B - A); - cVal = clamp( cVal, 0.0f, 1.0f ); + cVal = clamp(cVal, 0.0f, 1.0f); return C + (D - C) * cVal; } } - //--------------------------------------------------------------------------- // Rotate the pad coordinates //--------------------------------------------------------------------------- -static void RotatePad( int *pX, int *pY, float flAngleInRad ) +static void RotatePad(int *pX, int *pY, float flAngleInRad) { short int origX = *pX, origY = *pY; - *pX = (int)( SDL_cosf( flAngleInRad ) * origX - SDL_sinf( flAngleInRad ) * origY ); - *pY = (int)( SDL_sinf( flAngleInRad ) * origX + SDL_cosf( flAngleInRad ) * origY ); + *pX = (int)(SDL_cosf(flAngleInRad) * origX - SDL_sinf(flAngleInRad) * origY); + *pY = (int)(SDL_sinf(flAngleInRad) * origX + SDL_cosf(flAngleInRad) * origY); } -static void RotatePadShort( short *pX, short *pY, float flAngleInRad ) +static void RotatePadShort(short *pX, short *pY, float flAngleInRad) { short int origX = *pX, origY = *pY; - *pX = (short)( SDL_cosf( flAngleInRad ) * origX - SDL_sinf( flAngleInRad ) * origY ); - *pY = (short)( SDL_sinf( flAngleInRad ) * origX + SDL_cosf( flAngleInRad ) * origY ); + *pX = (short)(SDL_cosf(flAngleInRad) * origX - SDL_sinf(flAngleInRad) * origY); + *pY = (short)(SDL_sinf(flAngleInRad) * origX + SDL_cosf(flAngleInRad) * origY); } - //--------------------------------------------------------------------------- // Format the first part of the state packet //--------------------------------------------------------------------------- -static void FormatStatePacketUntilGyro( SteamControllerStateInternal_t *pState, ValveControllerStatePacket_t *pStatePacket ) +static void FormatStatePacketUntilGyro(SteamControllerStateInternal_t *pState, ValveControllerStatePacket_t *pStatePacket) { int nLeftPadX; int nLeftPadY; @@ -708,7 +673,7 @@ static void FormatStatePacketUntilGyro( SteamControllerStateInternal_t *pState, SDL_memset(pState, 0, offsetof(SteamControllerStateInternal_t, sBatteryLevel)); - //pState->eControllerType = m_eControllerType; + // pState->eControllerType = m_eControllerType; pState->eControllerType = 2; // k_eControllerType_SteamController; pState->unPacketNum = pStatePacket->unPacketNum; @@ -717,65 +682,52 @@ static void FormatStatePacketUntilGyro( SteamControllerStateInternal_t *pState, pState->ulButtons &= ~0xFFFF000000LL; // The firmware uses this bit to tell us what kind of data is packed into the left two axises - if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) - { + if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) { // Finger-down bit not set; "left pad" is actually trackpad pState->sLeftPadX = pState->sPrevLeftPad[0] = pStatePacket->sLeftPadX; pState->sLeftPadY = pState->sPrevLeftPad[1] = pStatePacket->sLeftPadY; - if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) - { + if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) { // The controller is interleaving both stick and pad data, both are active pState->sLeftStickX = pState->sPrevLeftStick[0]; pState->sLeftStickY = pState->sPrevLeftStick[1]; - } - else - { + } else { // The stick is not active pState->sPrevLeftStick[0] = 0; pState->sPrevLeftStick[1] = 0; } - } - else - { + } else { // Finger-down bit not set; "left pad" is actually joystick // XXX there's a firmware bug where sometimes padX is 0 and padY is a large number (acutally the battery voltage) // If that happens skip this packet and report last frames stick -/* - if ( m_eControllerType == k_eControllerType_SteamControllerV2 && pStatePacket->sLeftPadY > 900 ) - { - pState->sLeftStickX = pState->sPrevLeftStick[0]; - pState->sLeftStickY = pState->sPrevLeftStick[1]; - } - else -*/ + /* + if ( m_eControllerType == k_eControllerType_SteamControllerV2 && pStatePacket->sLeftPadY > 900 ) { + pState->sLeftStickX = pState->sPrevLeftStick[0]; + pState->sLeftStickY = pState->sPrevLeftStick[1]; + } else + */ { pState->sPrevLeftStick[0] = pState->sLeftStickX = pStatePacket->sLeftPadX; pState->sPrevLeftStick[1] = pState->sLeftStickY = pStatePacket->sLeftPadY; } -/* - if (m_eControllerType == k_eControllerType_SteamControllerV2) - { - UpdateV2JoystickCap(&state); - } -*/ + /* + if (m_eControllerType == k_eControllerType_SteamControllerV2) { + UpdateV2JoystickCap(&state); + } + */ - if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) - { + if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) { // The controller is interleaving both stick and pad data, both are active pState->sLeftPadX = pState->sPrevLeftPad[0]; pState->sLeftPadY = pState->sPrevLeftPad[1]; - } - else - { + } else { // The trackpad is not active pState->sPrevLeftPad[0] = 0; pState->sPrevLeftPad[1] = 0; // Old controllers send trackpad click for joystick button when trackpad is not active - if (pState->ulButtons & STEAM_BUTTON_LEFTPAD_CLICKED_MASK) - { + if (pState->ulButtons & STEAM_BUTTON_LEFTPAD_CLICKED_MASK) { pState->ulButtons &= ~STEAM_BUTTON_LEFTPAD_CLICKED_MASK; pState->ulButtons |= STEAM_JOYSTICK_BUTTON_MASK; } @@ -784,8 +736,9 @@ static void FormatStatePacketUntilGyro( SteamControllerStateInternal_t *pState, // Fingerdown bit indicates if the packed left axis data was joystick or pad, // but if we are interleaving both, the left finger is definitely on the pad. - if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) + if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_AND_JOYSTICK_MASK) { pState->ulButtons |= STEAM_LEFTPAD_FINGERDOWN_MASK; + } pState->sRightPadX = pStatePacket->sRightPadX; pState->sRightPadY = pStatePacket->sRightPadY; @@ -798,151 +751,141 @@ static void FormatStatePacketUntilGyro( SteamControllerStateInternal_t *pState, RotatePad(&nLeftPadX, &nLeftPadY, -flRotationAngle); RotatePad(&nRightPadX, &nRightPadY, flRotationAngle); - if (pState->ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) + if (pState->ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) { nPadOffset = 1000; - else + } else { nPadOffset = 0; + } pState->sLeftPadX = clamp(nLeftPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); pState->sLeftPadY = clamp(nLeftPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); nPadOffset = 0; - if (pState->ulButtons & STEAM_RIGHTPAD_FINGERDOWN_MASK) + if (pState->ulButtons & STEAM_RIGHTPAD_FINGERDOWN_MASK) { nPadOffset = 1000; - else + } else { nPadOffset = 0; + } pState->sRightPadX = clamp(nRightPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); pState->sRightPadY = clamp(nRightPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); - pState->sTriggerL = (unsigned short)RemapValClamped( (float)((pStatePacket->ButtonTriggerData.Triggers.nLeft << 7) | pStatePacket->ButtonTriggerData.Triggers.nLeft), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16 ); - pState->sTriggerR = (unsigned short)RemapValClamped( (float)((pStatePacket->ButtonTriggerData.Triggers.nRight << 7) | pStatePacket->ButtonTriggerData.Triggers.nRight), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16 ); + pState->sTriggerL = (unsigned short)RemapValClamped((float)((pStatePacket->ButtonTriggerData.Triggers.nLeft << 7) | pStatePacket->ButtonTriggerData.Triggers.nLeft), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16); + pState->sTriggerR = (unsigned short)RemapValClamped((float)((pStatePacket->ButtonTriggerData.Triggers.nRight << 7) | pStatePacket->ButtonTriggerData.Triggers.nRight), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16); } - //--------------------------------------------------------------------------- // Update Steam Controller state from a BLE data packet, returns true if it parsed data //--------------------------------------------------------------------------- -static bool UpdateBLESteamControllerState( const uint8_t *pData, int nDataSize, SteamControllerStateInternal_t *pState ) +static bool UpdateBLESteamControllerState(const uint8_t *pData, int nDataSize, SteamControllerStateInternal_t *pState) { const float flRotationAngle = 0.261799f; uint32_t ucOptionDataMask; pState->unPacketNum++; - ucOptionDataMask = ( *pData++ & 0xF0 ); + ucOptionDataMask = (*pData++ & 0xF0); ucOptionDataMask |= (uint32_t)(*pData++) << 8; - if ( ucOptionDataMask & k_EBLEButtonChunk1 ) - { - SDL_memcpy( &pState->ulButtons, pData, 3 ); + if (ucOptionDataMask & k_EBLEButtonChunk1) { + SDL_memcpy(&pState->ulButtons, pData, 3); pData += 3; } - if ( ucOptionDataMask & k_EBLEButtonChunk2 ) - { + if (ucOptionDataMask & k_EBLEButtonChunk2) { // The middle 2 bytes of the button bits over the wire are triggers when over the wire and non-SC buttons in the internal controller state packet - pState->sTriggerL = (unsigned short)RemapValClamped( (float)(( pData[ 0 ] << 7 ) | pData[ 0 ]), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16 ); - pState->sTriggerR = (unsigned short)RemapValClamped( (float)(( pData[ 1 ] << 7 ) | pData[ 1 ]), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16 ); + pState->sTriggerL = (unsigned short)RemapValClamped((float)((pData[0] << 7) | pData[0]), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16); + pState->sTriggerR = (unsigned short)RemapValClamped((float)((pData[1] << 7) | pData[1]), 0, STEAMCONTROLLER_TRIGGER_MAX_ANALOG, 0, SDL_MAX_SINT16); pData += 2; } - if ( ucOptionDataMask & k_EBLEButtonChunk3 ) - { + if (ucOptionDataMask & k_EBLEButtonChunk3) { uint8_t *pButtonByte = (uint8_t *)&pState->ulButtons; - pButtonByte[ 5 ] = *pData++; - pButtonByte[ 6 ] = *pData++; - pButtonByte[ 7 ] = *pData++; + pButtonByte[5] = *pData++; + pButtonByte[6] = *pData++; + pButtonByte[7] = *pData++; } - if ( ucOptionDataMask & k_EBLELeftJoystickChunk ) - { + if (ucOptionDataMask & k_EBLELeftJoystickChunk) { // This doesn't handle any of the special headcrab stuff for raw joystick which is OK for now since that FW doesn't support // this protocol yet either - int nLength = sizeof( pState->sLeftStickX ) + sizeof( pState->sLeftStickY ); - SDL_memcpy( &pState->sLeftStickX, pData, nLength ); + int nLength = sizeof(pState->sLeftStickX) + sizeof(pState->sLeftStickY); + SDL_memcpy(&pState->sLeftStickX, pData, nLength); pData += nLength; } - if ( ucOptionDataMask & k_EBLELeftTrackpadChunk ) - { - int nLength = sizeof( pState->sLeftPadX ) + sizeof( pState->sLeftPadY ); + if (ucOptionDataMask & k_EBLELeftTrackpadChunk) { + int nLength = sizeof(pState->sLeftPadX) + sizeof(pState->sLeftPadY); int nPadOffset; - SDL_memcpy( &pState->sLeftPadX, pData, nLength ); - if ( pState->ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK ) + SDL_memcpy(&pState->sLeftPadX, pData, nLength); + if (pState->ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) { nPadOffset = 1000; - else + } else { nPadOffset = 0; + } - RotatePadShort( &pState->sLeftPadX, &pState->sLeftPadY, -flRotationAngle ); - pState->sLeftPadX = clamp( pState->sLeftPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16 ); - pState->sLeftPadY = clamp( pState->sLeftPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16 ); + RotatePadShort(&pState->sLeftPadX, &pState->sLeftPadY, -flRotationAngle); + pState->sLeftPadX = clamp(pState->sLeftPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); + pState->sLeftPadY = clamp(pState->sLeftPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); pData += nLength; } - if ( ucOptionDataMask & k_EBLERightTrackpadChunk ) - { - int nLength = sizeof( pState->sRightPadX ) + sizeof( pState->sRightPadY ); + if (ucOptionDataMask & k_EBLERightTrackpadChunk) { + int nLength = sizeof(pState->sRightPadX) + sizeof(pState->sRightPadY); int nPadOffset = 0; - SDL_memcpy( &pState->sRightPadX, pData, nLength ); + SDL_memcpy(&pState->sRightPadX, pData, nLength); - if ( pState->ulButtons & STEAM_RIGHTPAD_FINGERDOWN_MASK ) + if (pState->ulButtons & STEAM_RIGHTPAD_FINGERDOWN_MASK) { nPadOffset = 1000; - else + } else { nPadOffset = 0; + } - RotatePadShort( &pState->sRightPadX, &pState->sRightPadY, flRotationAngle ); - pState->sRightPadX = clamp( pState->sRightPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16 ); - pState->sRightPadY = clamp( pState->sRightPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16 ); + RotatePadShort(&pState->sRightPadX, &pState->sRightPadY, flRotationAngle); + pState->sRightPadX = clamp(pState->sRightPadX + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); + pState->sRightPadY = clamp(pState->sRightPadY + nPadOffset, SDL_MIN_SINT16, SDL_MAX_SINT16); pData += nLength; } - if ( ucOptionDataMask & k_EBLEIMUAccelChunk ) - { - int nLength = sizeof( pState->sAccelX ) + sizeof( pState->sAccelY ) + sizeof( pState->sAccelZ ); - SDL_memcpy( &pState->sAccelX, pData, nLength ); + if (ucOptionDataMask & k_EBLEIMUAccelChunk) { + int nLength = sizeof(pState->sAccelX) + sizeof(pState->sAccelY) + sizeof(pState->sAccelZ); + SDL_memcpy(&pState->sAccelX, pData, nLength); pData += nLength; } - if ( ucOptionDataMask & k_EBLEIMUGyroChunk ) - { - int nLength = sizeof( pState->sAccelX ) + sizeof( pState->sAccelY ) + sizeof( pState->sAccelZ ); - SDL_memcpy( &pState->sGyroX, pData, nLength ); + if (ucOptionDataMask & k_EBLEIMUGyroChunk) { + int nLength = sizeof(pState->sAccelX) + sizeof(pState->sAccelY) + sizeof(pState->sAccelZ); + SDL_memcpy(&pState->sGyroX, pData, nLength); pData += nLength; } - if ( ucOptionDataMask & k_EBLEIMUQuatChunk ) - { - int nLength = sizeof( pState->sGyroQuatW ) + sizeof( pState->sGyroQuatX ) + sizeof( pState->sGyroQuatY ) + sizeof( pState->sGyroQuatZ ); - SDL_memcpy( &pState->sGyroQuatW, pData, nLength ); + if (ucOptionDataMask & k_EBLEIMUQuatChunk) { + int nLength = sizeof(pState->sGyroQuatW) + sizeof(pState->sGyroQuatX) + sizeof(pState->sGyroQuatY) + sizeof(pState->sGyroQuatZ); + SDL_memcpy(&pState->sGyroQuatW, pData, nLength); pData += nLength; } return true; } - //--------------------------------------------------------------------------- // Update Steam Controller state from a data packet, returns true if it parsed data //--------------------------------------------------------------------------- -static bool UpdateSteamControllerState( const uint8_t *pData, int nDataSize, SteamControllerStateInternal_t *pState ) +static bool UpdateSteamControllerState(const uint8_t *pData, int nDataSize, SteamControllerStateInternal_t *pState) { - ValveInReport_t *pInReport = (ValveInReport_t*)pData; + ValveInReport_t *pInReport = (ValveInReport_t *)pData; - if ( pInReport->header.unReportVersion != k_ValveInReportMsgVersion ) - { - if ( ( pData[ 0 ] & 0x0F ) == k_EBLEReportState ) - { - return UpdateBLESteamControllerState( pData, nDataSize, pState ); + if (pInReport->header.unReportVersion != k_ValveInReportMsgVersion) { + if ((pData[0] & 0x0F) == k_EBLEReportState) { + return UpdateBLESteamControllerState(pData, nDataSize, pState); } return false; } - if ( ( pInReport->header.ucType != ID_CONTROLLER_STATE ) && - ( pInReport->header.ucType != ID_CONTROLLER_BLE_STATE ) ) - { + if ((pInReport->header.ucType != ID_CONTROLLER_STATE) && + (pInReport->header.ucType != ID_CONTROLLER_BLE_STATE)) { return false; } - if ( pInReport->header.ucType == ID_CONTROLLER_STATE ) - { + if (pInReport->header.ucType == ID_CONTROLLER_STATE) { ValveControllerStatePacket_t *pStatePacket = &pInReport->payload.controllerState; // No new data to process; indicate that we received a state packet, but otherwise do nothing. - if ( pState->unPacketNum == pStatePacket->unPacketNum ) + if (pState->unPacketNum == pStatePacket->unPacketNum) { return true; + } - FormatStatePacketUntilGyro( pState, pStatePacket ); + FormatStatePacketUntilGyro(pState, pStatePacket); pState->sAccelX = pStatePacket->sAccelX; pState->sAccelY = pStatePacket->sAccelY; @@ -957,25 +900,23 @@ static bool UpdateSteamControllerState( const uint8_t *pData, int nDataSize, Ste pState->sGyroY = pStatePacket->sGyroY; pState->sGyroZ = pStatePacket->sGyroZ; - } - else if ( pInReport->header.ucType == ID_CONTROLLER_BLE_STATE ) - { + } else if (pInReport->header.ucType == ID_CONTROLLER_BLE_STATE) { ValveControllerBLEStatePacket_t *pBLEStatePacket = &pInReport->payload.controllerBLEState; ValveControllerStatePacket_t *pStatePacket = &pInReport->payload.controllerState; // No new data to process; indicate that we received a state packet, but otherwise do nothing. - if ( pState->unPacketNum == pStatePacket->unPacketNum ) + if (pState->unPacketNum == pStatePacket->unPacketNum) { return true; + } - FormatStatePacketUntilGyro( pState, pStatePacket ); + FormatStatePacketUntilGyro(pState, pStatePacket); - switch ( pBLEStatePacket->ucGyroDataType ) - { + switch (pBLEStatePacket->ucGyroDataType) { case 1: - pState->sGyroQuatW = (( float ) pBLEStatePacket->sGyro[0]); - pState->sGyroQuatX = (( float ) pBLEStatePacket->sGyro[1]); - pState->sGyroQuatY = (( float ) pBLEStatePacket->sGyro[2]); - pState->sGyroQuatZ = (( float ) pBLEStatePacket->sGyro[3]); + pState->sGyroQuatW = ((float)pBLEStatePacket->sGyro[0]); + pState->sGyroQuatX = ((float)pBLEStatePacket->sGyro[1]); + pState->sGyroQuatY = ((float)pBLEStatePacket->sGyro[2]); + pState->sGyroQuatZ = ((float)pBLEStatePacket->sGyro[3]); break; case 2: @@ -1000,7 +941,8 @@ static bool UpdateSteamControllerState( const uint8_t *pData, int nDataSize, Ste /*****************************************************************************************************/ -typedef struct { +typedef struct +{ SDL_bool report_sensors; uint32_t update_rate_in_us; Uint32 timestamp_us; @@ -1010,38 +952,32 @@ typedef struct { SteamControllerStateInternal_t m_last_state; } SDL_DriverSteam_Context; - -static void -HIDAPI_DriverSteam_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverSteam_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAM, callback, userdata); } -static void -HIDAPI_DriverSteam_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverSteam_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAM, callback, userdata); } -static SDL_bool -HIDAPI_DriverSteam_IsEnabled(void) +static SDL_bool HIDAPI_DriverSteam_IsEnabled(void) { return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_STEAM, SDL_FALSE); } -static SDL_bool -HIDAPI_DriverSteam_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverSteam_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { return SDL_IsJoystickSteamController(vendor_id, product_id); } -static SDL_bool -HIDAPI_DriverSteam_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverSteam_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverSteam_Context *ctx; ctx = (SDL_DriverSteam_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -1060,23 +996,22 @@ HIDAPI_DriverSteam_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverSteam_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverSteam_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverSteam_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverSteam_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverSteam_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverSteam_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverSteam_Context *ctx = (SDL_DriverSteam_Context *)device->context; float update_rate_in_hz = 0.0f; + SDL_AssertJoysticksLocked(); + ctx->report_sensors = SDL_FALSE; SDL_zero(ctx->m_assembler); SDL_zero(ctx->m_state); @@ -1102,55 +1037,49 @@ HIDAPI_DriverSteam_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return SDL_TRUE; } -static int -HIDAPI_DriverSteam_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverSteam_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { /* You should use the full Steam Input API for rumble support */ return SDL_Unsupported(); } -static int -HIDAPI_DriverSteam_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverSteam_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverSteam_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverSteam_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { /* You should use the full Steam Input API for extended capabilities */ return 0; } -static int -HIDAPI_DriverSteam_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverSteam_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { /* You should use the full Steam Input API for LED support */ return SDL_Unsupported(); } -static int -HIDAPI_DriverSteam_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverSteam_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverSteam_SetSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverSteam_SetSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { SDL_DriverSteam_Context *ctx = (SDL_DriverSteam_Context *)device->context; unsigned char buf[65]; int nSettings = 0; - SDL_memset( buf, 0, 65 ); + SDL_memset(buf, 0, 65); buf[1] = ID_SET_SETTINGS_VALUES; if (enabled) { - ADD_SETTING( SETTING_GYRO_MODE, 0x18 /* SETTING_GYRO_SEND_RAW_ACCEL | SETTING_GYRO_MODE_SEND_RAW_GYRO */ ); + ADD_SETTING(SETTING_GYRO_MODE, 0x18 /* SETTING_GYRO_SEND_RAW_ACCEL | SETTING_GYRO_MODE_SEND_RAW_GYRO */); } else { - ADD_SETTING( SETTING_GYRO_MODE, 0x00 /* SETTING_GYRO_MODE_OFF */ ); + ADD_SETTING(SETTING_GYRO_MODE, 0x00 /* SETTING_GYRO_MODE_OFF */); } - buf[2] = nSettings*3; - if (SetFeatureReport( device->dev, buf, 3+nSettings*3 ) < 0) { + buf[2] = nSettings * 3; + if (SetFeatureReport(device->dev, buf, 3 + nSettings * 3) < 0) { return SDL_SetError("Couldn't write feature report"); } @@ -1159,8 +1088,7 @@ HIDAPI_DriverSteam_SetSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *jo return 0; } -static SDL_bool -HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverSteam_Context *ctx = (SDL_DriverSteam_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -1171,8 +1099,7 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) return SDL_FALSE; } - for (;;) - { + for (;;) { uint8_t data[128]; int r, nPacketLength; const Uint8 *pPacket; @@ -1182,7 +1109,7 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) break; } - if (!joystick) { + if (joystick == NULL) { continue; } @@ -1196,38 +1123,38 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) if (nPacketLength > 0 && UpdateSteamControllerState(pPacket, nPacketLength, &ctx->m_state)) { if (ctx->m_state.ulButtons != ctx->m_last_state.ulButtons) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A, - (ctx->m_state.ulButtons & STEAM_BUTTON_3_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_3_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_B, - (ctx->m_state.ulButtons & STEAM_BUTTON_1_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_1_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_X, - (ctx->m_state.ulButtons & STEAM_BUTTON_2_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_2_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_Y, - (ctx->m_state.ulButtons & STEAM_BUTTON_0_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_0_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, - (ctx->m_state.ulButtons & STEAM_LEFT_BUMPER_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_LEFT_BUMPER_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, - (ctx->m_state.ulButtons & STEAM_RIGHT_BUMPER_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_RIGHT_BUMPER_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_BACK, - (ctx->m_state.ulButtons & STEAM_BUTTON_MENU_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_MENU_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_START, - (ctx->m_state.ulButtons & STEAM_BUTTON_ESCAPE_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_ESCAPE_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, - (ctx->m_state.ulButtons & STEAM_BUTTON_STEAM_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_STEAM_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSTICK, - (ctx->m_state.ulButtons & STEAM_JOYSTICK_BUTTON_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_JOYSTICK_BUTTON_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1 + 0, - (ctx->m_state.ulButtons & STEAM_BUTTON_BACK_LEFT_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_BACK_LEFT_MASK) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1 + 1, - (ctx->m_state.ulButtons & STEAM_BUTTON_BACK_RIGHT_MASK) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.ulButtons & STEAM_BUTTON_BACK_RIGHT_MASK) ? SDL_PRESSED : SDL_RELEASED); } { /* Minimum distance from center of pad to register a direction */ @@ -1235,16 +1162,16 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) /* Pad coordinates are like math grid coordinates: negative is bottom left */ SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_UP, - (ctx->m_state.sLeftPadY > kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.sLeftPadY > kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_DOWN, - (ctx->m_state.sLeftPadY < -kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.sLeftPadY < -kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, - (ctx->m_state.sLeftPadX < -kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.sLeftPadX < -kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - (ctx->m_state.sLeftPadX > kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); + (ctx->m_state.sLeftPadX > kPadDeadZone) ? SDL_PRESSED : SDL_RELEASED); } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, (int)ctx->m_state.sTriggerL * 2 - 32768); @@ -1283,19 +1210,16 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device) return SDL_TRUE; } -static void -HIDAPI_DriverSteam_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverSteam_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { CloseSteamController(device->dev); } -static void -HIDAPI_DriverSteam_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverSteam_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSteam = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSteam = { SDL_HINT_JOYSTICK_HIDAPI_STEAM, SDL_TRUE, HIDAPI_DriverSteam_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c index 39add50..6a983c8 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c @@ -35,7 +35,6 @@ #include "SDL_hidapi_rumble.h" #include "SDL_hidapi_nintendo.h" - #ifdef SDL_JOYSTICK_HIDAPI_SWITCH /* Define this if you want to log all packets from the controller */ @@ -55,52 +54,57 @@ If you send commands more frequently than this, you can turn off the controller in Bluetooth mode, or the motors can miss the command in USB mode. */ -#define RUMBLE_WRITE_FREQUENCY_MS 30 +#define RUMBLE_WRITE_FREQUENCY_MS 30 /* How often you have to refresh a long duration rumble to keep the motors running */ #define RUMBLE_REFRESH_FREQUENCY_MS 50 -#define SWITCH_GYRO_SCALE 14.2842f -#define SWITCH_ACCEL_SCALE 4096.f +#define SWITCH_GYRO_SCALE 14.2842f +#define SWITCH_ACCEL_SCALE 4096.f -#define SWITCH_GYRO_SCALE_OFFSET 13371.0f -#define SWITCH_GYRO_SCALE_MULT 936.0f -#define SWITCH_ACCEL_SCALE_OFFSET 16384.0f -#define SWITCH_ACCEL_SCALE_MULT 4.0f +#define SWITCH_GYRO_SCALE_OFFSET 13371.0f +#define SWITCH_GYRO_SCALE_MULT 936.0f +#define SWITCH_ACCEL_SCALE_OFFSET 16384.0f +#define SWITCH_ACCEL_SCALE_MULT 4.0f -typedef enum { - k_eSwitchInputReportIDs_SubcommandReply = 0x21, - k_eSwitchInputReportIDs_FullControllerState = 0x30, +typedef enum +{ + k_eSwitchInputReportIDs_SubcommandReply = 0x21, + k_eSwitchInputReportIDs_FullControllerState = 0x30, + k_eSwitchInputReportIDs_FullControllerAndMcuState = 0x31, k_eSwitchInputReportIDs_SimpleControllerState = 0x3F, - k_eSwitchInputReportIDs_CommandAck = 0x81, + k_eSwitchInputReportIDs_CommandAck = 0x81, } ESwitchInputReportIDs; -typedef enum { +typedef enum +{ k_eSwitchOutputReportIDs_RumbleAndSubcommand = 0x01, - k_eSwitchOutputReportIDs_Rumble = 0x10, - k_eSwitchOutputReportIDs_Proprietary = 0x80, + k_eSwitchOutputReportIDs_Rumble = 0x10, + k_eSwitchOutputReportIDs_Proprietary = 0x80, } ESwitchOutputReportIDs; -typedef enum { +typedef enum +{ k_eSwitchSubcommandIDs_BluetoothManualPair = 0x01, - k_eSwitchSubcommandIDs_RequestDeviceInfo = 0x02, - k_eSwitchSubcommandIDs_SetInputReportMode = 0x03, - k_eSwitchSubcommandIDs_SetHCIState = 0x06, - k_eSwitchSubcommandIDs_SPIFlashRead = 0x10, - k_eSwitchSubcommandIDs_SetPlayerLights = 0x30, - k_eSwitchSubcommandIDs_SetHomeLight = 0x38, - k_eSwitchSubcommandIDs_EnableIMU = 0x40, - k_eSwitchSubcommandIDs_SetIMUSensitivity = 0x41, - k_eSwitchSubcommandIDs_EnableVibration = 0x48, + k_eSwitchSubcommandIDs_RequestDeviceInfo = 0x02, + k_eSwitchSubcommandIDs_SetInputReportMode = 0x03, + k_eSwitchSubcommandIDs_SetHCIState = 0x06, + k_eSwitchSubcommandIDs_SPIFlashRead = 0x10, + k_eSwitchSubcommandIDs_SetPlayerLights = 0x30, + k_eSwitchSubcommandIDs_SetHomeLight = 0x38, + k_eSwitchSubcommandIDs_EnableIMU = 0x40, + k_eSwitchSubcommandIDs_SetIMUSensitivity = 0x41, + k_eSwitchSubcommandIDs_EnableVibration = 0x48, } ESwitchSubcommandIDs; -typedef enum { - k_eSwitchProprietaryCommandIDs_Status = 0x01, +typedef enum +{ + k_eSwitchProprietaryCommandIDs_Status = 0x01, k_eSwitchProprietaryCommandIDs_Handshake = 0x02, k_eSwitchProprietaryCommandIDs_HighSpeed = 0x03, - k_eSwitchProprietaryCommandIDs_ForceUSB = 0x04, - k_eSwitchProprietaryCommandIDs_ClearUSB = 0x05, - k_eSwitchProprietaryCommandIDs_ResetMCU = 0x06, + k_eSwitchProprietaryCommandIDs_ForceUSB = 0x04, + k_eSwitchProprietaryCommandIDs_ClearUSB = 0x05, + k_eSwitchProprietaryCommandIDs_ResetMCU = 0x06, } ESwitchProprietaryCommandIDs; #define k_unSwitchOutputPacketDataLength 49 @@ -108,17 +112,21 @@ typedef enum { #define k_unSwitchBluetoothPacketLength k_unSwitchOutputPacketDataLength #define k_unSwitchUSBPacketLength k_unSwitchMaxOutputPacketLength -#define k_unSPIStickCalibrationStartOffset 0x603D -#define k_unSPIStickCalibrationEndOffset 0x604E -#define k_unSPIStickCalibrationLength (k_unSPIStickCalibrationEndOffset - k_unSPIStickCalibrationStartOffset + 1) +#define k_unSPIStickFactoryCalibrationStartOffset 0x603D +#define k_unSPIStickFactoryCalibrationEndOffset 0x604E +#define k_unSPIStickFactoryCalibrationLength (k_unSPIStickFactoryCalibrationEndOffset - k_unSPIStickFactoryCalibrationStartOffset + 1) + +#define k_unSPIStickUserCalibrationStartOffset 0x8010 +#define k_unSPIStickUserCalibrationEndOffset 0x8025 +#define k_unSPIStickUserCalibrationLength (k_unSPIStickUserCalibrationEndOffset - k_unSPIStickUserCalibrationStartOffset + 1) -#define k_unSPIIMUScaleStartOffset 0x6020 -#define k_unSPIIMUScaleEndOffset 0x6037 -#define k_unSPIIMUScaleLength (k_unSPIIMUScaleEndOffset - k_unSPIIMUScaleStartOffset + 1) +#define k_unSPIIMUScaleStartOffset 0x6020 +#define k_unSPIIMUScaleEndOffset 0x6037 +#define k_unSPIIMUScaleLength (k_unSPIIMUScaleEndOffset - k_unSPIIMUScaleStartOffset + 1) -#define k_unSPIIMUUserScaleStartOffset 0x8026 -#define k_unSPIIMUUserScaleEndOffset 0x8039 -#define k_unSPIIMUUserScaleLength (k_unSPIIMUUserScaleEndOffset - k_unSPIIMUUserScaleStartOffset + 1) +#define k_unSPIIMUUserScaleStartOffset 0x8026 +#define k_unSPIIMUUserScaleEndOffset 0x8039 +#define k_unSPIIMUUserScaleLength (k_unSPIIMUUserScaleEndOffset - k_unSPIIMUUserScaleStartOffset + 1) #pragma pack(1) typedef struct @@ -151,7 +159,8 @@ typedef struct { SwitchControllerStatePacket_t controllerState; - struct { + struct + { Sint16 sAccelX; Sint16 sAccelY; Sint16 sAccelZ; @@ -175,16 +184,19 @@ typedef struct Uint8 ucSubcommandAck; Uint8 ucSubcommandID; - #define k_unSubcommandDataBytes 35 - union { +#define k_unSubcommandDataBytes 35 + union + { Uint8 rgucSubcommandData[k_unSubcommandDataBytes]; - struct { + struct + { SwitchSPIOpData_t opData; Uint8 rgucReadData[k_unSubcommandDataBytes - sizeof(SwitchSPIOpData_t)]; } spiReadData; - struct { + struct + { Uint8 rgucFirmwareVersion[2]; Uint8 ucDeviceType; Uint8 ucFiller1; @@ -192,6 +204,22 @@ typedef struct Uint8 ucFiller2; Uint8 ucColorLocation; } deviceInfo; + + struct + { + SwitchSPIOpData_t opData; + Uint8 rgucLeftCalibration[9]; + Uint8 rgucRightCalibration[9]; + } stickFactoryCalibration; + + struct + { + SwitchSPIOpData_t opData; + Uint8 rgucLeftMagic[2]; + Uint8 rgucLeftCalibration[9]; + Uint8 rgucRightMagic[2]; + Uint8 rgucRightCalibration[9]; + } stickUserCalibration; }; } SwitchSubcommandInputPacket_t; @@ -234,16 +262,17 @@ typedef struct } SwitchProprietaryOutputPacket_t; #pragma pack() -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; SDL_bool m_bInputOnly; SDL_bool m_bIsGameCube; SDL_bool m_bUseButtonLabels; SDL_bool m_bPlayerLights; - int m_nPlayerIndex; + int m_nPlayerIndex; SDL_bool m_bSyncWrite; - int m_nMaxWriteAttempts; + int m_nMaxWriteAttempts; ESwitchDeviceInfoControllerType m_eControllerType; Uint8 m_rgucMACAddress[6]; Uint8 m_nCommandNumber; @@ -268,22 +297,27 @@ typedef struct { SwitchSimpleStatePacket_t m_lastSimpleState; SwitchStatePacket_t m_lastFullState; - struct StickCalibrationData { - struct { + struct StickCalibrationData + { + struct + { Sint16 sCenter; Sint16 sMin; Sint16 sMax; } axis[2]; } m_StickCalData[2]; - struct StickExtents { - struct { + struct StickExtents + { + struct + { Sint16 sMin; Sint16 sMax; } axis[2]; } m_StickExtents[2], m_SimpleStickExtents[2]; - struct IMUScaleData { + struct IMUScaleData + { float fAccelScaleX; float fAccelScaleY; float fAccelScaleZ; @@ -294,7 +328,6 @@ typedef struct { } m_IMUScaleData; } SDL_DriverSwitch_Context; - static int ReadInput(SDL_DriverSwitch_Context *ctx) { /* Make sure we don't try to read at the same time a write is happening */ @@ -311,7 +344,7 @@ static int WriteOutput(SDL_DriverSwitch_Context *ctx, const Uint8 *data, int siz return SDL_hid_write(ctx->device->dev, data, size); #else /* Use the rumble thread for general asynchronous writes */ - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return -1; } return SDL_HIDAPI_SendRumbleAndUnlock(ctx->device, data, size); @@ -395,14 +428,14 @@ static SDL_bool WritePacket(SDL_DriverSwitch_Context *ctx, void *pBuf, Uint8 ucL if (ucLen < unWriteSize) { SDL_memcpy(rgucBuf, pBuf, ucLen); - SDL_memset(rgucBuf+ucLen, 0, unWriteSize-ucLen); + SDL_memset(rgucBuf + ucLen, 0, unWriteSize - ucLen); pBuf = rgucBuf; ucLen = (Uint8)unWriteSize; } if (ctx->m_bSyncWrite) { - return (SDL_hid_write(ctx->device->dev, (Uint8 *)pBuf, ucLen) >= 0); + return SDL_hid_write(ctx->device->dev, (Uint8 *)pBuf, ucLen) >= 0; } else { - return (WriteOutput(ctx, (Uint8 *)pBuf, ucLen) >= 0); + return WriteOutput(ctx, (Uint8 *)pBuf, ucLen) >= 0; } } @@ -411,7 +444,7 @@ static SDL_bool WriteSubcommand(SDL_DriverSwitch_Context *ctx, ESwitchSubcommand SwitchSubcommandInputPacket_t *reply = NULL; int nTries; - for (nTries = 1; !reply && nTries <= ctx->m_nMaxWriteAttempts; ++nTries) { + for (nTries = 1; reply == NULL && nTries <= ctx->m_nMaxWriteAttempts; ++nTries) { SwitchSubcommandOutputPacket_t commandPacket; ConstructSubcommand(ctx, ucCommandID, pBuf, ucLen, &commandPacket); @@ -435,7 +468,7 @@ static SDL_bool WriteProprietary(SDL_DriverSwitch_Context *ctx, ESwitchProprieta for (nTries = 1; nTries <= ctx->m_nMaxWriteAttempts; ++nTries) { SwitchProprietaryOutputPacket_t packet; - if ((!pBuf && ucLen > 0) || ucLen > sizeof(packet.rgucProprietaryData)) { + if ((pBuf == NULL && ucLen > 0) || ucLen > sizeof(packet.rgucProprietaryData)) { return SDL_FALSE; } @@ -451,35 +484,22 @@ static SDL_bool WriteProprietary(SDL_DriverSwitch_Context *ctx, ESwitchProprieta } if (!waitForReply || ReadProprietaryReply(ctx, ucCommand)) { -//SDL_Log("Succeeded%s after %d tries\n", ctx->m_bSyncWrite ? " (sync)" : "", nTries); + // SDL_Log("Succeeded%s after %d tries\n", ctx->m_bSyncWrite ? " (sync)" : "", nTries); return SDL_TRUE; } } -//SDL_Log("Failed%s after %d tries\n", ctx->m_bSyncWrite ? " (sync)" : "", nTries); + // SDL_Log("Failed%s after %d tries\n", ctx->m_bSyncWrite ? " (sync)" : "", nTries); return SDL_FALSE; } -static Uint8 EncodeRumbleHighAmplitude(Uint16 amplitude) { +static Uint8 EncodeRumbleHighAmplitude(Uint16 amplitude) +{ /* More information about these values can be found here: * https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md */ - Uint16 hfa[101][2] = { {0, 0x0},{514, 0x2},{775, 0x4},{921, 0x6},{1096, 0x8},{1303, 0x0a},{1550, 0x0c}, - {1843, 0x0e},{2192, 0x10},{2606, 0x12},{3100, 0x14},{3686, 0x16},{4383, 0x18},{5213, 0x1a}, - {6199, 0x1c},{7372, 0x1e},{7698, 0x20},{8039, 0x22},{8395, 0x24},{8767, 0x26},{9155, 0x28}, - {9560, 0x2a},{9984, 0x2c},{10426, 0x2e},{10887, 0x30},{11369, 0x32},{11873, 0x34},{12398, 0x36}, - {12947, 0x38},{13520, 0x3a},{14119, 0x3c},{14744, 0x3e},{15067, 0x40},{15397, 0x42},{15734, 0x44}, - {16079, 0x46},{16431, 0x48},{16790, 0x4a},{17158, 0x4c},{17534, 0x4e},{17918, 0x50},{18310, 0x52}, - {18711, 0x54},{19121, 0x56},{19540, 0x58},{19967, 0x5a},{20405, 0x5c},{20851, 0x5e},{21308, 0x60}, - {21775, 0x62},{22251, 0x64},{22739, 0x66},{23236, 0x68},{23745, 0x6a},{24265, 0x6c},{24797, 0x6e}, - {25340, 0x70},{25894, 0x72},{26462, 0x74},{27041, 0x76},{27633, 0x78},{28238, 0x7a},{28856, 0x7c}, - {29488, 0x7e},{30134, 0x80},{30794, 0x82},{31468, 0x84},{32157, 0x86},{32861, 0x88},{33581, 0x8a}, - {34316, 0x8c},{35068, 0x8e},{35836, 0x90},{36620, 0x92},{37422, 0x94},{38242, 0x96},{39079, 0x98}, - {39935, 0x9a},{40809, 0x9c},{41703, 0x9e},{42616, 0xa0},{43549, 0xa2},{44503, 0xa4},{45477, 0xa6}, - {46473, 0xa8},{47491, 0xaa},{48531, 0xac},{49593, 0xae},{50679, 0xb0},{51789, 0xb2},{52923, 0xb4}, - {54082, 0xb6},{55266, 0xb8},{56476, 0xba},{57713, 0xbc},{58977, 0xbe},{60268, 0xc0},{61588, 0xc2}, - {62936, 0xc4},{64315, 0xc6},{65535, 0xc8} }; + Uint16 hfa[101][2] = { { 0, 0x0 }, { 514, 0x2 }, { 775, 0x4 }, { 921, 0x6 }, { 1096, 0x8 }, { 1303, 0x0a }, { 1550, 0x0c }, { 1843, 0x0e }, { 2192, 0x10 }, { 2606, 0x12 }, { 3100, 0x14 }, { 3686, 0x16 }, { 4383, 0x18 }, { 5213, 0x1a }, { 6199, 0x1c }, { 7372, 0x1e }, { 7698, 0x20 }, { 8039, 0x22 }, { 8395, 0x24 }, { 8767, 0x26 }, { 9155, 0x28 }, { 9560, 0x2a }, { 9984, 0x2c }, { 10426, 0x2e }, { 10887, 0x30 }, { 11369, 0x32 }, { 11873, 0x34 }, { 12398, 0x36 }, { 12947, 0x38 }, { 13520, 0x3a }, { 14119, 0x3c }, { 14744, 0x3e }, { 15067, 0x40 }, { 15397, 0x42 }, { 15734, 0x44 }, { 16079, 0x46 }, { 16431, 0x48 }, { 16790, 0x4a }, { 17158, 0x4c }, { 17534, 0x4e }, { 17918, 0x50 }, { 18310, 0x52 }, { 18711, 0x54 }, { 19121, 0x56 }, { 19540, 0x58 }, { 19967, 0x5a }, { 20405, 0x5c }, { 20851, 0x5e }, { 21308, 0x60 }, { 21775, 0x62 }, { 22251, 0x64 }, { 22739, 0x66 }, { 23236, 0x68 }, { 23745, 0x6a }, { 24265, 0x6c }, { 24797, 0x6e }, { 25340, 0x70 }, { 25894, 0x72 }, { 26462, 0x74 }, { 27041, 0x76 }, { 27633, 0x78 }, { 28238, 0x7a }, { 28856, 0x7c }, { 29488, 0x7e }, { 30134, 0x80 }, { 30794, 0x82 }, { 31468, 0x84 }, { 32157, 0x86 }, { 32861, 0x88 }, { 33581, 0x8a }, { 34316, 0x8c }, { 35068, 0x8e }, { 35836, 0x90 }, { 36620, 0x92 }, { 37422, 0x94 }, { 38242, 0x96 }, { 39079, 0x98 }, { 39935, 0x9a }, { 40809, 0x9c }, { 41703, 0x9e }, { 42616, 0xa0 }, { 43549, 0xa2 }, { 44503, 0xa4 }, { 45477, 0xa6 }, { 46473, 0xa8 }, { 47491, 0xaa }, { 48531, 0xac }, { 49593, 0xae }, { 50679, 0xb0 }, { 51789, 0xb2 }, { 52923, 0xb4 }, { 54082, 0xb6 }, { 55266, 0xb8 }, { 56476, 0xba }, { 57713, 0xbc }, { 58977, 0xbe }, { 60268, 0xc0 }, { 61588, 0xc2 }, { 62936, 0xc4 }, { 64315, 0xc6 }, { 65535, 0xc8 } }; int index = 0; - for ( ; index < 101; index++) { + for (; index < 101; index++) { if (amplitude <= hfa[index][0]) { return (Uint8)hfa[index][1]; } @@ -487,27 +507,12 @@ static Uint8 EncodeRumbleHighAmplitude(Uint16 amplitude) { return (Uint8)hfa[100][1]; } -static Uint16 EncodeRumbleLowAmplitude(Uint16 amplitude) { +static Uint16 EncodeRumbleLowAmplitude(Uint16 amplitude) +{ /* More information about these values can be found here: * https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md */ - Uint16 lfa[101][2] = { {0, 0x0040},{514, 0x8040},{775, 0x0041},{921, 0x8041},{1096, 0x0042}, - {1303, 0x8042},{1550, 0x0043},{1843, 0x8043},{2192, 0x0044},{2606, 0x8044},{3100, 0x0045}, - {3686, 0x8045},{4383, 0x0046},{5213, 0x8046},{6199, 0x0047},{7372, 0x8047},{7698, 0x0048}, - {8039, 0x8048},{8395, 0x0049},{8767, 0x8049},{9155, 0x004a},{9560, 0x804a},{9984, 0x004b}, - {10426, 0x804b},{10887, 0x004c},{11369, 0x804c},{11873, 0x004d},{12398, 0x804d},{12947, 0x004e}, - {13520, 0x804e},{14119, 0x004f},{14744, 0x804f},{15067, 0x0050},{15397, 0x8050},{15734, 0x0051}, - {16079, 0x8051},{16431, 0x0052},{16790, 0x8052},{17158, 0x0053},{17534, 0x8053},{17918, 0x0054}, - {18310, 0x8054},{18711, 0x0055},{19121, 0x8055},{19540, 0x0056},{19967, 0x8056},{20405, 0x0057}, - {20851, 0x8057},{21308, 0x0058},{21775, 0x8058},{22251, 0x0059},{22739, 0x8059},{23236, 0x005a}, - {23745, 0x805a},{24265, 0x005b},{24797, 0x805b},{25340, 0x005c},{25894, 0x805c},{26462, 0x005d}, - {27041, 0x805d},{27633, 0x005e},{28238, 0x805e},{28856, 0x005f},{29488, 0x805f},{30134, 0x0060}, - {30794, 0x8060},{31468, 0x0061},{32157, 0x8061},{32861, 0x0062},{33581, 0x8062},{34316, 0x0063}, - {35068, 0x8063},{35836, 0x0064},{36620, 0x8064},{37422, 0x0065},{38242, 0x8065},{39079, 0x0066}, - {39935, 0x8066},{40809, 0x0067},{41703, 0x8067},{42616, 0x0068},{43549, 0x8068},{44503, 0x0069}, - {45477, 0x8069},{46473, 0x006a},{47491, 0x806a},{48531, 0x006b},{49593, 0x806b},{50679, 0x006c}, - {51789, 0x806c},{52923, 0x006d},{54082, 0x806d},{55266, 0x006e},{56476, 0x806e},{57713, 0x006f}, - {58977, 0x806f},{60268, 0x0070},{61588, 0x8070},{62936, 0x0071},{64315, 0x8071},{65535, 0x0072} }; + Uint16 lfa[101][2] = { { 0, 0x0040 }, { 514, 0x8040 }, { 775, 0x0041 }, { 921, 0x8041 }, { 1096, 0x0042 }, { 1303, 0x8042 }, { 1550, 0x0043 }, { 1843, 0x8043 }, { 2192, 0x0044 }, { 2606, 0x8044 }, { 3100, 0x0045 }, { 3686, 0x8045 }, { 4383, 0x0046 }, { 5213, 0x8046 }, { 6199, 0x0047 }, { 7372, 0x8047 }, { 7698, 0x0048 }, { 8039, 0x8048 }, { 8395, 0x0049 }, { 8767, 0x8049 }, { 9155, 0x004a }, { 9560, 0x804a }, { 9984, 0x004b }, { 10426, 0x804b }, { 10887, 0x004c }, { 11369, 0x804c }, { 11873, 0x004d }, { 12398, 0x804d }, { 12947, 0x004e }, { 13520, 0x804e }, { 14119, 0x004f }, { 14744, 0x804f }, { 15067, 0x0050 }, { 15397, 0x8050 }, { 15734, 0x0051 }, { 16079, 0x8051 }, { 16431, 0x0052 }, { 16790, 0x8052 }, { 17158, 0x0053 }, { 17534, 0x8053 }, { 17918, 0x0054 }, { 18310, 0x8054 }, { 18711, 0x0055 }, { 19121, 0x8055 }, { 19540, 0x0056 }, { 19967, 0x8056 }, { 20405, 0x0057 }, { 20851, 0x8057 }, { 21308, 0x0058 }, { 21775, 0x8058 }, { 22251, 0x0059 }, { 22739, 0x8059 }, { 23236, 0x005a }, { 23745, 0x805a }, { 24265, 0x005b }, { 24797, 0x805b }, { 25340, 0x005c }, { 25894, 0x805c }, { 26462, 0x005d }, { 27041, 0x805d }, { 27633, 0x005e }, { 28238, 0x805e }, { 28856, 0x005f }, { 29488, 0x805f }, { 30134, 0x0060 }, { 30794, 0x8060 }, { 31468, 0x0061 }, { 32157, 0x8061 }, { 32861, 0x0062 }, { 33581, 0x8062 }, { 34316, 0x0063 }, { 35068, 0x8063 }, { 35836, 0x0064 }, { 36620, 0x8064 }, { 37422, 0x0065 }, { 38242, 0x8065 }, { 39079, 0x0066 }, { 39935, 0x8066 }, { 40809, 0x0067 }, { 41703, 0x8067 }, { 42616, 0x0068 }, { 43549, 0x8068 }, { 44503, 0x0069 }, { 45477, 0x8069 }, { 46473, 0x006a }, { 47491, 0x806a }, { 48531, 0x006b }, { 49593, 0x806b }, { 50679, 0x006c }, { 51789, 0x806c }, { 52923, 0x006d }, { 54082, 0x806d }, { 55266, 0x006e }, { 56476, 0x806e }, { 57713, 0x006f }, { 58977, 0x806f }, { 60268, 0x0070 }, { 61588, 0x8070 }, { 62936, 0x0071 }, { 64315, 0x8071 }, { 65535, 0x0072 } }; int index = 0; for (; index < 101; index++) { if (amplitude <= lfa[index][0]) { @@ -533,13 +538,13 @@ static void EncodeRumble(SwitchRumbleData_t *pRumble, Uint16 usHighFreq, Uint8 u pRumble->rgucData[0] = usHighFreq & 0xFF; pRumble->rgucData[1] = ucHighFreqAmp | ((usHighFreq >> 8) & 0x01); - pRumble->rgucData[2] = ucLowFreq | ((usLowFreqAmp >> 8) & 0x80); - pRumble->rgucData[3] = usLowFreqAmp & 0xFF; + pRumble->rgucData[2] = ucLowFreq | ((usLowFreqAmp >> 8) & 0x80); + pRumble->rgucData[3] = usLowFreqAmp & 0xFF; #ifdef DEBUG_RUMBLE SDL_Log("Freq: %.2X %.2X %.2X, Amp: %.2X %.2X %.2X\n", - usHighFreq & 0xFF, ((usHighFreq >> 8) & 0x01), ucLowFreq, - ucHighFreqAmp, ((usLowFreqAmp >> 8) & 0x80), usLowFreqAmp & 0xFF); + usHighFreq & 0xFF, ((usHighFreq >> 8) & 0x01), ucLowFreq, + ucHighFreqAmp, ((usLowFreqAmp >> 8) & 0x80), usLowFreqAmp & 0xFF); #endif } else { SetNeutralRumble(pRumble); @@ -596,8 +601,9 @@ static SDL_bool BReadDeviceInfo(SDL_DriverSwitch_Context *ctx) ctx->m_eControllerType = CalculateControllerType(ctx, (ESwitchDeviceInfoControllerType)status->ucDeviceType); - for (i = 0; i < sizeof (ctx->m_rgucMACAddress); ++i) - ctx->m_rgucMACAddress[i] = status->rgucMACAddress[ sizeof(ctx->m_rgucMACAddress) - i - 1 ]; + for (i = 0; i < sizeof(ctx->m_rgucMACAddress); ++i) { + ctx->m_rgucMACAddress[i] = status->rgucMACAddress[sizeof(ctx->m_rgucMACAddress) - i - 1]; + } return SDL_TRUE; } @@ -614,8 +620,6 @@ static SDL_bool BReadDeviceInfo(SDL_DriverSwitch_Context *ctx) return SDL_TRUE; } - ctx->device->is_bluetooth = SDL_FALSE; - return SDL_FALSE; } @@ -646,7 +650,6 @@ static SDL_bool BTrySetupUSB(SDL_DriverSwitch_Context *ctx) static SDL_bool SetVibrationEnabled(SDL_DriverSwitch_Context *ctx, Uint8 enabled) { return WriteSubcommand(ctx, k_eSwitchSubcommandIDs_EnableVibration, &enabled, sizeof(enabled), NULL); - } static SDL_bool SetInputMode(SDL_DriverSwitch_Context *ctx, Uint8 input_mode) { @@ -666,10 +669,10 @@ static SDL_bool SetHomeLED(SDL_DriverSwitch_Context *ctx, Uint8 brightness) } } - rgucBuffer[0] = (0x0 << 4) | 0x1; /* 0 mini cycles (besides first), cycle duration 8ms */ - rgucBuffer[1] = ((ucLedIntensity & 0xF) << 4) | 0x0; /* LED start intensity (0x0-0xF), 0 cycles (LED stays on at start intensity after first cycle) */ - rgucBuffer[2] = ((ucLedIntensity & 0xF) << 4) | 0x0; /* First cycle LED intensity, 0x0 intensity for second cycle */ - rgucBuffer[3] = (0x0 << 4) | 0x0; /* 8ms fade transition to first cycle, 8ms first cycle LED duration */ + rgucBuffer[0] = (0x0 << 4) | 0x1; /* 0 mini cycles (besides first), cycle duration 8ms */ + rgucBuffer[1] = ((ucLedIntensity & 0xF) << 4) | 0x0; /* LED start intensity (0x0-0xF), 0 cycles (LED stays on at start intensity after first cycle) */ + rgucBuffer[2] = ((ucLedIntensity & 0xF) << 4) | 0x0; /* First cycle LED intensity, 0x0 intensity for second cycle */ + rgucBuffer[3] = (0x0 << 4) | 0x0; /* 8ms fade transition to first cycle, 8ms first cycle LED duration */ return WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SetHomeLight, rgucBuffer, sizeof(rgucBuffer), NULL); } @@ -696,7 +699,7 @@ static void UpdateSlotLED(SDL_DriverSwitch_Context *ctx) { if (!ctx->m_bInputOnly) { Uint8 led_data = 0; - + if (ctx->m_bPlayerLights && ctx->m_nPlayerIndex >= 0) { led_data = (1 << (ctx->m_nPlayerIndex % 4)); } @@ -716,49 +719,93 @@ static void SDLCALL SDL_PlayerLEDHintChanged(void *userdata, const char *name, c } } -static SDL_bool SetIMUEnabled(SDL_DriverSwitch_Context* ctx, SDL_bool enabled) +static Uint8 GetDefaultInputMode(SDL_DriverSwitch_Context *ctx) +{ + Uint8 input_mode; + + /* Determine the desired input mode */ + if (ctx->device->is_bluetooth) { + input_mode = k_eSwitchInputReportIDs_SimpleControllerState; + } else { + input_mode = k_eSwitchInputReportIDs_FullControllerState; + } + + /* The official Nintendo Switch Pro Controller supports FullControllerState over Bluetooth + * just fine. We really should use that, or else the epowerlevel code in HandleFullControllerState + * is completely pointless. We need full state if we want battery level and we only care about + * battery level over Bluetooth anyway. + */ + if (ctx->device->vendor_id == USB_VENDOR_NINTENDO) { + input_mode = k_eSwitchInputReportIDs_FullControllerState; + } + return input_mode; +} + +static SDL_bool SetIMUEnabled(SDL_DriverSwitch_Context *ctx, SDL_bool enabled) { Uint8 imu_data = enabled ? 1 : 0; return WriteSubcommand(ctx, k_eSwitchSubcommandIDs_EnableIMU, &imu_data, sizeof(imu_data), NULL); } -static SDL_bool LoadStickCalibration(SDL_DriverSwitch_Context *ctx, Uint8 input_mode) +static SDL_bool LoadStickCalibration(SDL_DriverSwitch_Context *ctx) { - Uint8 *pStickCal; + Uint8 *pLeftStickCal; + Uint8 *pRightStickCal; size_t stick, axis; - SwitchSubcommandInputPacket_t *reply = NULL; + SwitchSubcommandInputPacket_t *user_reply = NULL; + SwitchSubcommandInputPacket_t *factory_reply = NULL; + SwitchSPIOpData_t readUserParams; + SwitchSPIOpData_t readFactoryParams; - /* Read Calibration Info */ - SwitchSPIOpData_t readParams; - readParams.unAddress = k_unSPIStickCalibrationStartOffset; - readParams.ucLength = k_unSPIStickCalibrationLength; + /* Read User Calibration Info */ + readUserParams.unAddress = k_unSPIStickUserCalibrationStartOffset; + readUserParams.ucLength = k_unSPIStickUserCalibrationLength; + + /* This isn't readable on all controllers, so ignore failure */ + WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t *)&readUserParams, sizeof(readUserParams), &user_reply); - if (!WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t *)&readParams, sizeof(readParams), &reply)) { + /* Read Factory Calibration Info */ + readFactoryParams.unAddress = k_unSPIStickFactoryCalibrationStartOffset; + readFactoryParams.ucLength = k_unSPIStickFactoryCalibrationLength; + + if (!WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t *)&readFactoryParams, sizeof(readFactoryParams), &factory_reply)) { return SDL_FALSE; } + /* Automatically select the user calibration if magic bytes are set */ + if (user_reply && user_reply->stickUserCalibration.rgucLeftMagic[0] == 0xB2 && user_reply->stickUserCalibration.rgucLeftMagic[1] == 0xA1) { + pLeftStickCal = user_reply->stickUserCalibration.rgucLeftCalibration; + } else { + pLeftStickCal = factory_reply->stickFactoryCalibration.rgucLeftCalibration; + } + + if (user_reply && user_reply->stickUserCalibration.rgucRightMagic[0] == 0xB2 && user_reply->stickUserCalibration.rgucRightMagic[1] == 0xA1) { + pRightStickCal = user_reply->stickUserCalibration.rgucRightCalibration; + } else { + pRightStickCal = factory_reply->stickFactoryCalibration.rgucRightCalibration; + } + /* Stick calibration values are 12-bits each and are packed by bit * For whatever reason the fields are in a different order for each stick * Left: X-Max, Y-Max, X-Center, Y-Center, X-Min, Y-Min * Right: X-Center, Y-Center, X-Min, Y-Min, X-Max, Y-Max */ - pStickCal = reply->spiReadData.rgucReadData; /* Left stick */ - ctx->m_StickCalData[0].axis[0].sMax = ((pStickCal[1] << 8) & 0xF00) | pStickCal[0]; /* X Axis max above center */ - ctx->m_StickCalData[0].axis[1].sMax = (pStickCal[2] << 4) | (pStickCal[1] >> 4); /* Y Axis max above center */ - ctx->m_StickCalData[0].axis[0].sCenter = ((pStickCal[4] << 8) & 0xF00) | pStickCal[3]; /* X Axis center */ - ctx->m_StickCalData[0].axis[1].sCenter = (pStickCal[5] << 4) | (pStickCal[4] >> 4); /* Y Axis center */ - ctx->m_StickCalData[0].axis[0].sMin = ((pStickCal[7] << 8) & 0xF00) | pStickCal[6]; /* X Axis min below center */ - ctx->m_StickCalData[0].axis[1].sMin = (pStickCal[8] << 4) | (pStickCal[7] >> 4); /* Y Axis min below center */ + ctx->m_StickCalData[0].axis[0].sMax = ((pLeftStickCal[1] << 8) & 0xF00) | pLeftStickCal[0]; /* X Axis max above center */ + ctx->m_StickCalData[0].axis[1].sMax = (pLeftStickCal[2] << 4) | (pLeftStickCal[1] >> 4); /* Y Axis max above center */ + ctx->m_StickCalData[0].axis[0].sCenter = ((pLeftStickCal[4] << 8) & 0xF00) | pLeftStickCal[3]; /* X Axis center */ + ctx->m_StickCalData[0].axis[1].sCenter = (pLeftStickCal[5] << 4) | (pLeftStickCal[4] >> 4); /* Y Axis center */ + ctx->m_StickCalData[0].axis[0].sMin = ((pLeftStickCal[7] << 8) & 0xF00) | pLeftStickCal[6]; /* X Axis min below center */ + ctx->m_StickCalData[0].axis[1].sMin = (pLeftStickCal[8] << 4) | (pLeftStickCal[7] >> 4); /* Y Axis min below center */ /* Right stick */ - ctx->m_StickCalData[1].axis[0].sCenter = ((pStickCal[10] << 8) & 0xF00) | pStickCal[9]; /* X Axis center */ - ctx->m_StickCalData[1].axis[1].sCenter = (pStickCal[11] << 4) | (pStickCal[10] >> 4); /* Y Axis center */ - ctx->m_StickCalData[1].axis[0].sMin = ((pStickCal[13] << 8) & 0xF00) | pStickCal[12]; /* X Axis min below center */ - ctx->m_StickCalData[1].axis[1].sMin = (pStickCal[14] << 4) | (pStickCal[13] >> 4); /* Y Axis min below center */ - ctx->m_StickCalData[1].axis[0].sMax = ((pStickCal[16] << 8) & 0xF00) | pStickCal[15]; /* X Axis max above center */ - ctx->m_StickCalData[1].axis[1].sMax = (pStickCal[17] << 4) | (pStickCal[16] >> 4); /* Y Axis max above center */ + ctx->m_StickCalData[1].axis[0].sCenter = ((pRightStickCal[1] << 8) & 0xF00) | pRightStickCal[0]; /* X Axis center */ + ctx->m_StickCalData[1].axis[1].sCenter = (pRightStickCal[2] << 4) | (pRightStickCal[1] >> 4); /* Y Axis center */ + ctx->m_StickCalData[1].axis[0].sMin = ((pRightStickCal[4] << 8) & 0xF00) | pRightStickCal[3]; /* X Axis min below center */ + ctx->m_StickCalData[1].axis[1].sMin = (pRightStickCal[5] << 4) | (pRightStickCal[4] >> 4); /* Y Axis min below center */ + ctx->m_StickCalData[1].axis[0].sMax = ((pRightStickCal[7] << 8) & 0xF00) | pRightStickCal[6]; /* X Axis max above center */ + ctx->m_StickCalData[1].axis[1].sMax = (pRightStickCal[8] << 4) | (pRightStickCal[7] >> 4); /* Y Axis max above center */ /* Filter out any values that were uninitialized (0xFFF) in the SPI read */ for (stick = 0; stick < 2; ++stick) { @@ -776,14 +823,14 @@ static SDL_bool LoadStickCalibration(SDL_DriverSwitch_Context *ctx, Uint8 input_ } for (stick = 0; stick < 2; ++stick) { - for(axis = 0; axis < 2; ++axis) { + for (axis = 0; axis < 2; ++axis) { ctx->m_StickExtents[stick].axis[axis].sMin = -(Sint16)(ctx->m_StickCalData[stick].axis[axis].sMin * 0.7f); ctx->m_StickExtents[stick].axis[axis].sMax = (Sint16)(ctx->m_StickCalData[stick].axis[axis].sMax * 0.7f); } } for (stick = 0; stick < 2; ++stick) { - for(axis = 0; axis < 2; ++axis) { + for (axis = 0; axis < 2; ++axis) { ctx->m_SimpleStickExtents[stick].axis[axis].sMin = (Sint16)(SDL_MIN_SINT16 * 0.5f); ctx->m_SimpleStickExtents[stick].axis[axis].sMax = (Sint16)(SDL_MAX_SINT16 * 0.5f); } @@ -792,72 +839,71 @@ static SDL_bool LoadStickCalibration(SDL_DriverSwitch_Context *ctx, Uint8 input_ return SDL_TRUE; } -static SDL_bool LoadIMUCalibration(SDL_DriverSwitch_Context* ctx) +static SDL_bool LoadIMUCalibration(SDL_DriverSwitch_Context *ctx) { - Uint8* pIMUScale; - SwitchSubcommandInputPacket_t* reply = NULL; - Sint16 sAccelRawX, sAccelRawY, sAccelRawZ, sGyroRawX, sGyroRawY, sGyroRawZ; + SwitchSubcommandInputPacket_t *reply = NULL; /* Read Calibration Info */ SwitchSPIOpData_t readParams; readParams.unAddress = k_unSPIIMUScaleStartOffset; readParams.ucLength = k_unSPIIMUScaleLength; - if (!WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t*)&readParams, sizeof(readParams), &reply)) { - const float accelScale = SDL_STANDARD_GRAVITY / SWITCH_ACCEL_SCALE; - const float gyroScale = (float)M_PI / 180.0f / SWITCH_GYRO_SCALE; + if (WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t *)&readParams, sizeof(readParams), &reply)) { + Uint8 *pIMUScale; + Sint16 sAccelRawX, sAccelRawY, sAccelRawZ, sGyroRawX, sGyroRawY, sGyroRawZ; - ctx->m_IMUScaleData.fAccelScaleX = accelScale; - ctx->m_IMUScaleData.fAccelScaleY = accelScale; - ctx->m_IMUScaleData.fAccelScaleZ = accelScale; + /* IMU scale gives us multipliers for converting raw values to real world values */ + pIMUScale = reply->spiReadData.rgucReadData; - ctx->m_IMUScaleData.fGyroScaleX = gyroScale; - ctx->m_IMUScaleData.fGyroScaleY = gyroScale; - ctx->m_IMUScaleData.fGyroScaleZ = gyroScale; + sAccelRawX = (pIMUScale[1] << 8) | pIMUScale[0]; + sAccelRawY = (pIMUScale[3] << 8) | pIMUScale[2]; + sAccelRawZ = (pIMUScale[5] << 8) | pIMUScale[4]; - return SDL_FALSE; - } + sGyroRawX = (pIMUScale[13] << 8) | pIMUScale[12]; + sGyroRawY = (pIMUScale[15] << 8) | pIMUScale[14]; + sGyroRawZ = (pIMUScale[17] << 8) | pIMUScale[16]; - /* IMU scale gives us multipliers for converting raw values to real world values */ - pIMUScale = reply->spiReadData.rgucReadData; + /* Check for user calibration data. If it's present and set, it'll override the factory settings */ + readParams.unAddress = k_unSPIIMUUserScaleStartOffset; + readParams.ucLength = k_unSPIIMUUserScaleLength; + if (WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t *)&readParams, sizeof(readParams), &reply) && (pIMUScale[0] | pIMUScale[1] << 8) == 0xA1B2) { + pIMUScale = reply->spiReadData.rgucReadData; - sAccelRawX = (pIMUScale[1] << 8) | pIMUScale[0]; - sAccelRawY = (pIMUScale[3] << 8) | pIMUScale[2]; - sAccelRawZ = (pIMUScale[5] << 8) | pIMUScale[4]; + sAccelRawX = (pIMUScale[3] << 8) | pIMUScale[2]; + sAccelRawY = (pIMUScale[5] << 8) | pIMUScale[4]; + sAccelRawZ = (pIMUScale[7] << 8) | pIMUScale[6]; - sGyroRawX = (pIMUScale[13] << 8) | pIMUScale[12]; - sGyroRawY = (pIMUScale[15] << 8) | pIMUScale[14]; - sGyroRawZ = (pIMUScale[17] << 8) | pIMUScale[16]; + sGyroRawX = (pIMUScale[15] << 8) | pIMUScale[14]; + sGyroRawY = (pIMUScale[17] << 8) | pIMUScale[16]; + sGyroRawZ = (pIMUScale[19] << 8) | pIMUScale[18]; + } - /* Check for user calibration data. If it's present and set, it'll override the factory settings */ - readParams.unAddress = k_unSPIIMUUserScaleStartOffset; - readParams.ucLength = k_unSPIIMUUserScaleLength; - if (WriteSubcommand(ctx, k_eSwitchSubcommandIDs_SPIFlashRead, (uint8_t*)&readParams, sizeof(readParams), &reply) && (pIMUScale[0] | pIMUScale[1] << 8) == 0xA1B2) { - pIMUScale = reply->spiReadData.rgucReadData; - - sAccelRawX = (pIMUScale[3] << 8) | pIMUScale[2]; - sAccelRawY = (pIMUScale[5] << 8) | pIMUScale[4]; - sAccelRawZ = (pIMUScale[7] << 8) | pIMUScale[6]; + /* Accelerometer scale */ + ctx->m_IMUScaleData.fAccelScaleX = SWITCH_ACCEL_SCALE_MULT / (SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawX) * SDL_STANDARD_GRAVITY; + ctx->m_IMUScaleData.fAccelScaleY = SWITCH_ACCEL_SCALE_MULT / (SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawY) * SDL_STANDARD_GRAVITY; + ctx->m_IMUScaleData.fAccelScaleZ = SWITCH_ACCEL_SCALE_MULT / (SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawZ) * SDL_STANDARD_GRAVITY; - sGyroRawX = (pIMUScale[15] << 8) | pIMUScale[14]; - sGyroRawY = (pIMUScale[17] << 8) | pIMUScale[16]; - sGyroRawZ = (pIMUScale[19] << 8) | pIMUScale[18]; - } + /* Gyro scale */ + ctx->m_IMUScaleData.fGyroScaleX = SWITCH_GYRO_SCALE_MULT / (SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawX) * (float)M_PI / 180.0f; + ctx->m_IMUScaleData.fGyroScaleY = SWITCH_GYRO_SCALE_MULT / (SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawY) * (float)M_PI / 180.0f; + ctx->m_IMUScaleData.fGyroScaleZ = SWITCH_GYRO_SCALE_MULT / (SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawZ) * (float)M_PI / 180.0f; - /* Accelerometer scale */ - ctx->m_IMUScaleData.fAccelScaleX = SWITCH_ACCEL_SCALE_MULT / (float)(SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawX) * SDL_STANDARD_GRAVITY; - ctx->m_IMUScaleData.fAccelScaleY = SWITCH_ACCEL_SCALE_MULT / (float)(SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawY) * SDL_STANDARD_GRAVITY; - ctx->m_IMUScaleData.fAccelScaleZ = SWITCH_ACCEL_SCALE_MULT / (float)(SWITCH_ACCEL_SCALE_OFFSET - (float)sAccelRawZ) * SDL_STANDARD_GRAVITY; + } else { + /* Use default values */ + const float accelScale = SDL_STANDARD_GRAVITY / SWITCH_ACCEL_SCALE; + const float gyroScale = (float)M_PI / 180.0f / SWITCH_GYRO_SCALE; - /* Gyro scale */ - ctx->m_IMUScaleData.fGyroScaleX = SWITCH_GYRO_SCALE_MULT / (float)(SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawX) * (float)M_PI / 180.0f; - ctx->m_IMUScaleData.fGyroScaleY = SWITCH_GYRO_SCALE_MULT / (float)(SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawY) * (float)M_PI / 180.0f; - ctx->m_IMUScaleData.fGyroScaleZ = SWITCH_GYRO_SCALE_MULT / (float)(SWITCH_GYRO_SCALE_OFFSET - (float)sGyroRawZ) * (float)M_PI / 180.0f; + ctx->m_IMUScaleData.fAccelScaleX = accelScale; + ctx->m_IMUScaleData.fAccelScaleY = accelScale; + ctx->m_IMUScaleData.fAccelScaleZ = accelScale; + ctx->m_IMUScaleData.fGyroScaleX = gyroScale; + ctx->m_IMUScaleData.fGyroScaleY = gyroScale; + ctx->m_IMUScaleData.fGyroScaleZ = gyroScale; + } return SDL_TRUE; } - static Sint16 ApplyStickCalibration(SDL_DriverSwitch_Context *ctx, int nStick, int nAxis, Sint16 sRawValue) { sRawValue -= ctx->m_StickCalData[nStick].axis[nAxis].sCenter; @@ -869,7 +915,8 @@ static Sint16 ApplyStickCalibration(SDL_DriverSwitch_Context *ctx, int nStick, i ctx->m_StickExtents[nStick].axis[nAxis].sMin = sRawValue; } - return (Sint16)HIDAPI_RemapVal(sRawValue, ctx->m_StickExtents[nStick].axis[nAxis].sMin, ctx->m_StickExtents[nStick].axis[nAxis].sMax, SDL_MIN_SINT16, SDL_MAX_SINT16); + return (Sint16)HIDAPI_RemapVal(sRawValue, ctx->m_StickExtents[nStick].axis[nAxis].sMin, ctx->m_StickExtents[nStick].axis[nAxis].sMax, + SDL_MIN_SINT16, SDL_MAX_SINT16); } static Sint16 ApplySimpleStickCalibration(SDL_DriverSwitch_Context *ctx, int nStick, int nAxis, Sint16 sRawValue) @@ -886,7 +933,8 @@ static Sint16 ApplySimpleStickCalibration(SDL_DriverSwitch_Context *ctx, int nSt ctx->m_SimpleStickExtents[nStick].axis[nAxis].sMin = sRawValue; } - return (Sint16)HIDAPI_RemapVal(sRawValue, ctx->m_SimpleStickExtents[nStick].axis[nAxis].sMin, ctx->m_SimpleStickExtents[nStick].axis[nAxis].sMax, SDL_MIN_SINT16, SDL_MAX_SINT16); + return (Sint16)HIDAPI_RemapVal(sRawValue, ctx->m_SimpleStickExtents[nStick].axis[nAxis].sMin, ctx->m_SimpleStickExtents[nStick].axis[nAxis].sMax, + SDL_MIN_SINT16, SDL_MAX_SINT16); } static void SDLCALL SDL_GameControllerButtonReportingHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint) @@ -925,9 +973,8 @@ static Uint8 RemapButton(SDL_DriverSwitch_Context *ctx, Uint8 button) } return button; } - -static int -GetMaxWriteAttempts(SDL_HIDAPI_Device *device) + +static int GetMaxWriteAttempts(SDL_HIDAPI_Device *device) { if (device->vendor_id == USB_VENDOR_NINTENDO && device->product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP) { @@ -938,8 +985,7 @@ GetMaxWriteAttempts(SDL_HIDAPI_Device *device) } } -static ESwitchDeviceInfoControllerType -ReadJoyConControllerType(SDL_HIDAPI_Device *device) +static ESwitchDeviceInfoControllerType ReadJoyConControllerType(SDL_HIDAPI_Device *device) { ESwitchDeviceInfoControllerType eControllerType = k_eSwitchDeviceInfoControllerType_Unknown; const int MAX_ATTEMPTS = 1; /* Don't try too long, in case this is a zombie Bluetooth controller */ @@ -952,7 +998,9 @@ ReadJoyConControllerType(SDL_HIDAPI_Device *device) ctx->m_bSyncWrite = SDL_TRUE; ctx->m_nMaxWriteAttempts = GetMaxWriteAttempts(device); - for (attempts = 0; attempts < MAX_ATTEMPTS; ++attempts) { + for ( ; ; ) { + ++attempts; + device->is_bluetooth = SDL_FALSE; if (WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_Status, NULL, 0, SDL_TRUE)) { SwitchProprietaryStatusPacket_t *status = (SwitchProprietaryStatusPacket_t *)&ctx->m_rgucReadBuffer[0]; @@ -965,21 +1013,19 @@ ReadJoyConControllerType(SDL_HIDAPI_Device *device) eControllerType = CalculateControllerType(ctx, (ESwitchDeviceInfoControllerType)reply->deviceInfo.ucDeviceType); } } - if (eControllerType == k_eSwitchDeviceInfoControllerType_Unknown) { + if (eControllerType == k_eSwitchDeviceInfoControllerType_Unknown && attempts < MAX_ATTEMPTS) { /* Wait a bit and try again */ SDL_Delay(100); continue; - } else { - break; } + break; } SDL_free(ctx); } return eControllerType; } -static SDL_bool -HasHomeLED(SDL_DriverSwitch_Context *ctx) +static SDL_bool HasHomeLED(SDL_DriverSwitch_Context *ctx) { Uint16 vendor_id = ctx->device->vendor_id; Uint16 product_id = ctx->device->product_id; @@ -994,6 +1040,12 @@ HasHomeLED(SDL_DriverSwitch_Context *ctx) return SDL_FALSE; } + /* Third party controllers don't have a home LED and will shut off if we try to set it */ + if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_Unknown || + ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_LicProController) { + return SDL_FALSE; + } + /* The Nintendo Online classic controllers don't have a Home LED */ if (vendor_id == USB_VENDOR_NINTENDO && ctx->m_eControllerType > k_eSwitchDeviceInfoControllerType_ProController) { @@ -1003,11 +1055,12 @@ HasHomeLED(SDL_DriverSwitch_Context *ctx) return SDL_TRUE; } -static SDL_bool -AlwaysUsesLabels(int vendor_id, int product_id, ESwitchDeviceInfoControllerType eControllerType) +static SDL_bool AlwaysUsesLabels(int vendor_id, int product_id, ESwitchDeviceInfoControllerType eControllerType) { /* These controllers don't have a diamond button configuration, so always use labels */ switch (eControllerType) { + case k_eSwitchDeviceInfoControllerType_HVCLeft: + case k_eSwitchDeviceInfoControllerType_HVCRight: case k_eSwitchDeviceInfoControllerType_NESLeft: case k_eSwitchDeviceInfoControllerType_NESRight: case k_eSwitchDeviceInfoControllerType_N64: @@ -1018,12 +1071,11 @@ AlwaysUsesLabels(int vendor_id, int product_id, ESwitchDeviceInfoControllerType } } -static SDL_bool -IsGameCubeFormFactor(int vendor_id, int product_id) +static SDL_bool IsGameCubeFormFactor(int vendor_id, int product_id) { static Uint32 gamecube_formfactor[] = { - MAKE_VIDPID(0x0e6f, 0x0185), /* PDP Wired Fight Pad Pro for Nintendo Switch */ - MAKE_VIDPID(0x20d6, 0xa711), /* Core (Plus) Wired Controller */ + MAKE_VIDPID(0x0e6f, 0x0185), /* PDP Wired Fight Pad Pro for Nintendo Switch */ + MAKE_VIDPID(0x20d6, 0xa711), /* Core (Plus) Wired Controller */ }; Uint32 id = MAKE_VIDPID(vendor_id, product_id); int i; @@ -1036,32 +1088,27 @@ IsGameCubeFormFactor(int vendor_id, int product_id) return SDL_FALSE; } -static void -HIDAPI_DriverNintendoClassic_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverNintendoClassic_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, callback, userdata); } -static void -HIDAPI_DriverNintendoClassic_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverNintendoClassic_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, callback, userdata); } -static SDL_bool -HIDAPI_DriverNintendoClassic_IsEnabled(void) +static SDL_bool HIDAPI_DriverNintendoClassic_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverNintendoClassic_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverNintendoClassic_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { if (vendor_id == USB_VENDOR_NINTENDO) { if (product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT) { - if (SDL_strncmp(name, "NES Controller", 14) == 0) { + if (SDL_strncmp(name, "NES Controller", 14) == 0 || + SDL_strncmp(name, "HVC Controller", 14) == 0) { return SDL_TRUE; } } @@ -1082,28 +1129,22 @@ HIDAPI_DriverNintendoClassic_IsSupportedDevice(SDL_HIDAPI_Device *device, const return SDL_FALSE; } -static void -HIDAPI_DriverJoyCons_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverJoyCons_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, callback, userdata); } -static void -HIDAPI_DriverJoyCons_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverJoyCons_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, callback, userdata); } -static SDL_bool -HIDAPI_DriverJoyCons_IsEnabled(void) +static SDL_bool HIDAPI_DriverJoyCons_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverJoyCons_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverJoyCons_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { if (vendor_id == USB_VENDOR_NINTENDO) { if (product_id == USB_PRODUCT_NINTENDO_SWITCH_PRO && device && device->dev) { @@ -1124,28 +1165,22 @@ HIDAPI_DriverJoyCons_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *na return SDL_FALSE; } -static void -HIDAPI_DriverSwitch_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverSwitch_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, callback, userdata); } -static void -HIDAPI_DriverSwitch_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverSwitch_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, callback, userdata); } -static SDL_bool -HIDAPI_DriverSwitch_IsEnabled(void) +static SDL_bool HIDAPI_DriverSwitch_IsEnabled(void) { - return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); } -static SDL_bool -HIDAPI_DriverSwitch_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverSwitch_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { /* The HORI Wireless Switch Pad enumerates as a HID device when connected via USB with the same VID/PID as when connected over Bluetooth but doesn't actually @@ -1166,8 +1201,7 @@ HIDAPI_DriverSwitch_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *nam return (type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO) ? SDL_TRUE : SDL_FALSE; } -static void -UpdateDeviceIdentity(SDL_HIDAPI_Device *device) +static void UpdateDeviceIdentity(SDL_HIDAPI_Device *device) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; char serial[18]; @@ -1175,19 +1209,28 @@ UpdateDeviceIdentity(SDL_HIDAPI_Device *device) switch (ctx->m_eControllerType) { case k_eSwitchDeviceInfoControllerType_JoyConLeft: HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (L)"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT); device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT; break; case k_eSwitchDeviceInfoControllerType_JoyConRight: HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (R)"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT); device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT; break; case k_eSwitchDeviceInfoControllerType_ProController: + case k_eSwitchDeviceInfoControllerType_LicProController: HIDAPI_SetDeviceName(device, "Nintendo Switch Pro Controller"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_PRO); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_PRO); device->type = SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO; break; + case k_eSwitchDeviceInfoControllerType_HVCLeft: + HIDAPI_SetDeviceName(device, "Nintendo HVC Controller (1)"); + device->type = SDL_CONTROLLER_TYPE_UNKNOWN; + break; + case k_eSwitchDeviceInfoControllerType_HVCRight: + HIDAPI_SetDeviceName(device, "Nintendo HVC Controller (2)"); + device->type = SDL_CONTROLLER_TYPE_UNKNOWN; + break; case k_eSwitchDeviceInfoControllerType_NESLeft: HIDAPI_SetDeviceName(device, "Nintendo NES Controller (L)"); device->type = SDL_CONTROLLER_TYPE_UNKNOWN; @@ -1198,41 +1241,44 @@ UpdateDeviceIdentity(SDL_HIDAPI_Device *device) break; case k_eSwitchDeviceInfoControllerType_SNES: HIDAPI_SetDeviceName(device, "Nintendo SNES Controller"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SNES_CONTROLLER); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SNES_CONTROLLER); device->type = SDL_CONTROLLER_TYPE_UNKNOWN; break; case k_eSwitchDeviceInfoControllerType_N64: HIDAPI_SetDeviceName(device, "Nintendo N64 Controller"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_N64_CONTROLLER); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_N64_CONTROLLER); device->type = SDL_CONTROLLER_TYPE_UNKNOWN; break; case k_eSwitchDeviceInfoControllerType_SEGA_Genesis: HIDAPI_SetDeviceName(device, "Nintendo SEGA Genesis Controller"); - HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER); + HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER); device->type = SDL_CONTROLLER_TYPE_UNKNOWN; break; + case k_eSwitchDeviceInfoControllerType_Unknown: + /* We couldn't read the device info for this controller, might not be fully compliant */ + return; default: + device->type = SDL_CONTROLLER_TYPE_UNKNOWN; break; } device->guid.data[15] = ctx->m_eControllerType; - SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", - ctx->m_rgucMACAddress[0], - ctx->m_rgucMACAddress[1], - ctx->m_rgucMACAddress[2], - ctx->m_rgucMACAddress[3], - ctx->m_rgucMACAddress[4], - ctx->m_rgucMACAddress[5]); + (void)SDL_snprintf(serial, sizeof(serial), "%.2x-%.2x-%.2x-%.2x-%.2x-%.2x", + ctx->m_rgucMACAddress[0], + ctx->m_rgucMACAddress[1], + ctx->m_rgucMACAddress[2], + ctx->m_rgucMACAddress[3], + ctx->m_rgucMACAddress[4], + ctx->m_rgucMACAddress[5]); HIDAPI_SetDeviceSerial(device, serial); } -static SDL_bool -HIDAPI_DriverSwitch_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverSwitch_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverSwitch_Context *ctx; ctx = (SDL_DriverSwitch_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -1250,12 +1296,11 @@ HIDAPI_DriverSwitch_InitDevice(SDL_HIDAPI_Device *device) /* Find out whether or not we can send output reports */ ctx->m_bInputOnly = SDL_IsJoystickNintendoSwitchProInputOnly(device->vendor_id, device->product_id); if (!ctx->m_bInputOnly) { - if (!BReadDeviceInfo(ctx)) { - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, - "HIDAPI_DriverSwitch_InitDevice(): Couldn't read device info"); - return SDL_FALSE; - } + /* Initialize rumble data, important for reading device info on the MOBAPAD M073 */ + SetNeutralRumble(&ctx->m_RumblePacket.rumbleData[0]); + SetNeutralRumble(&ctx->m_RumblePacket.rumbleData[1]); + BReadDeviceInfo(ctx); UpdateDeviceIdentity(device); } @@ -1270,14 +1315,12 @@ HIDAPI_DriverSwitch_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverSwitch_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverSwitch_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverSwitch_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverSwitch_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; @@ -1290,11 +1333,11 @@ HIDAPI_DriverSwitch_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joystick UpdateSlotLED(ctx); } -static SDL_bool -HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; - Uint8 input_mode; + + SDL_AssertJoysticksLocked(); ctx->joystick = joystick; @@ -1312,63 +1355,45 @@ HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti } } - /* Determine the desired input mode (needed before loading stick calibration) */ - if (device->is_bluetooth) { - input_mode = k_eSwitchInputReportIDs_SimpleControllerState; - } else { - input_mode = k_eSwitchInputReportIDs_FullControllerState; + if (!LoadStickCalibration(ctx)) { + SDL_SetError("Couldn't load stick calibration"); + return SDL_FALSE; } - /* The official Nintendo Switch Pro Controller supports FullControllerState over bluetooth - * just fine. We really should use that, or else the epowerlevel code in - * HandleFullControllerState is completely pointless. We need full state if we want battery - * level and we only care about battery level over bluetooth anyway. - */ - if (device->vendor_id == USB_VENDOR_NINTENDO) { - input_mode = k_eSwitchInputReportIDs_FullControllerState; - } - - if (input_mode == k_eSwitchInputReportIDs_FullControllerState && + if (ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_HVCLeft && + ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_HVCRight && ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_NESLeft && ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_NESRight && ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_SNES && ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_N64 && ctx->m_eControllerType != k_eSwitchDeviceInfoControllerType_SEGA_Genesis) { - /* Use the right sensor in the combined Joy-Con pair */ - if (!device->parent || - ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) { - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO, 200.0f); - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 200.0f); - } - if (device->parent && - ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft) { - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO_L, 200.0f); - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL_L, 200.0f); - } - if (device->parent && - ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) { - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO_R, 200.0f); - SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL_R, 200.0f); + if (LoadIMUCalibration(ctx)) { + /* Use the right sensor in the combined Joy-Con pair */ + if (!device->parent || + ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) { + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO, 200.0f); + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 200.0f); + } + if (device->parent && + ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft) { + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO_L, 200.0f); + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL_L, 200.0f); + } + if (device->parent && + ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) { + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_GYRO_R, 200.0f); + SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL_R, 200.0f); + } } } - if (!LoadStickCalibration(ctx, input_mode)) { - SDL_SetError("Couldn't load stick calibration"); - return SDL_FALSE; - } - - if (!LoadIMUCalibration(ctx)) { - SDL_SetError("Couldn't load sensor calibration"); - return SDL_FALSE; - } - if (!SetVibrationEnabled(ctx, 1)) { SDL_SetError("Couldn't enable vibration"); return SDL_FALSE; } /* Set desired input mode */ - if (!SetInputMode(ctx, input_mode)) { + if (!SetInputMode(ctx, GetDefaultInputMode(ctx))) { SDL_SetError("Couldn't set input mode"); return SDL_FALSE; } @@ -1426,8 +1451,7 @@ HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti return SDL_TRUE; } -static int -HIDAPI_DriverSwitch_ActuallyRumbleJoystick(SDL_DriverSwitch_Context *ctx, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverSwitch_ActuallyRumbleJoystick(SDL_DriverSwitch_Context *ctx, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { /* Experimentally determined rumble values. These will only matter on some controllers as tested ones * seem to disregard these and just use any non-zero rumble values as a binary flag for constant rumble @@ -1436,8 +1460,8 @@ HIDAPI_DriverSwitch_ActuallyRumbleJoystick(SDL_DriverSwitch_Context *ctx, Uint16 * https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md */ const Uint16 k_usHighFreq = 0x0074; - const Uint8 k_ucHighFreqAmp = EncodeRumbleHighAmplitude(high_frequency_rumble); - const Uint8 k_ucLowFreq = 0x3D; + const Uint8 k_ucHighFreqAmp = EncodeRumbleHighAmplitude(high_frequency_rumble); + const Uint8 k_ucLowFreq = 0x3D; const Uint16 k_usLowFreqAmp = EncodeRumbleLowAmplitude(low_frequency_rumble); if (low_frequency_rumble || high_frequency_rumble) { @@ -1456,8 +1480,7 @@ HIDAPI_DriverSwitch_ActuallyRumbleJoystick(SDL_DriverSwitch_Context *ctx, Uint16 return 0; } -static int -HIDAPI_DriverSwitch_SendPendingRumble(SDL_DriverSwitch_Context *ctx) +static int HIDAPI_DriverSwitch_SendPendingRumble(SDL_DriverSwitch_Context *ctx) { if (!SDL_TICKS_PASSED(SDL_GetTicks(), ctx->m_unRumbleSent + RUMBLE_WRITE_FREQUENCY_MS)) { return 0; @@ -1488,8 +1511,7 @@ HIDAPI_DriverSwitch_SendPendingRumble(SDL_DriverSwitch_Context *ctx) return 0; } -static int -HIDAPI_DriverSwitch_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverSwitch_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; @@ -1537,14 +1559,12 @@ HIDAPI_DriverSwitch_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys return HIDAPI_DriverSwitch_ActuallyRumbleJoystick(ctx, low_frequency_rumble, high_frequency_rumble); } -static int -HIDAPI_DriverSwitch_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverSwitch_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverSwitch_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverSwitch_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; Uint32 result = 0; @@ -1552,28 +1572,35 @@ HIDAPI_DriverSwitch_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joyst if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_ProController && !ctx->m_bInputOnly) { /* Doesn't have an RGB LED, so don't return SDL_JOYCAP_LED here */ result |= SDL_JOYCAP_RUMBLE; + } else if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft || + ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) { + result |= SDL_JOYCAP_RUMBLE; } - return result; } -static int -HIDAPI_DriverSwitch_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverSwitch_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverSwitch_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverSwitch_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverSwitch_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverSwitch_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { - SDL_DriverSwitch_Context* ctx = (SDL_DriverSwitch_Context*)device->context; - + SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; + Uint8 input_mode; + + if (enabled) { + input_mode = k_eSwitchInputReportIDs_FullControllerState; + } else { + input_mode = GetDefaultInputMode(ctx); + } + SetInputMode(ctx, input_mode); + SetIMUEnabled(ctx, enabled); ctx->m_bReportSensors = enabled; ctx->m_unIMUSamples = 0; @@ -1768,7 +1795,7 @@ static void HandleSimpleControllerState(SDL_Joystick *joystick, SDL_DriverSwitch ctx->m_lastSimpleState = *packet; } -static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SDL_SensorType type, Uint64 timestamp_us, Sint16 *values) +static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SDL_SensorType type, Uint64 timestamp_us, const Sint16 *values) { float data[3]; @@ -1776,7 +1803,7 @@ static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *c * since that's our de facto standard from already supporting those controllers, and * users will want consistent axis mappings across devices. */ - if (type == SDL_SENSOR_GYRO || type == SDL_SENSOR_GYRO_L || type == SDL_SENSOR_GYRO_R ) { + if (type == SDL_SENSOR_GYRO || type == SDL_SENSOR_GYRO_L || type == SDL_SENSOR_GYRO_R) { data[0] = -(ctx->m_IMUScaleData.fGyroScaleY * (float)values[1]); data[1] = ctx->m_IMUScaleData.fGyroScaleZ * (float)values[2]; data[2] = -(ctx->m_IMUScaleData.fGyroScaleX * (float)values[0]); @@ -1941,7 +1968,7 @@ static void HandleMiniControllerStateR(SDL_Joystick *joystick, SDL_DriverSwitch_ SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); } -static void HandleFullControllerState(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SwitchStatePacket_t *packet) +static void HandleFullControllerState(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SwitchStatePacket_t *packet) SDL_NO_THREAD_SAFETY_ANALYSIS /* We unlock and lock the device lock to be able to change IMU state */ { if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft) { if (ctx->device->parent || ctx->m_bVerticalMode) { @@ -2122,8 +2149,7 @@ static void HandleFullControllerState(SDL_Joystick *joystick, SDL_DriverSwitch_C ctx->m_lastFullState = *packet; } -static SDL_bool -HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -2142,7 +2168,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) ++packet_count; ctx->m_unLastInput = now; - if (!joystick) { + if (joystick == NULL) { continue; } @@ -2154,6 +2180,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) HandleSimpleControllerState(joystick, ctx, (SwitchSimpleStatePacket_t *)&ctx->m_rgucReadBuffer[1]); break; case k_eSwitchInputReportIDs_FullControllerState: + case k_eSwitchInputReportIDs_FullControllerAndMcuState: HandleFullControllerState(joystick, ctx, (SwitchStatePacket_t *)&ctx->m_rgucReadBuffer[1]); break; default: @@ -2169,7 +2196,11 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) const Uint32 INPUT_WAIT_TIMEOUT_MS = 100; if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) { /* Steam may have put the controller back into non-reporting mode */ + SDL_bool wasSyncWrite = ctx->m_bSyncWrite; + + ctx->m_bSyncWrite = SDL_TRUE; WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE); + ctx->m_bSyncWrite = wasSyncWrite; } } else if (device->is_bluetooth) { const Uint32 INPUT_WAIT_TIMEOUT_MS = 3000; @@ -2201,11 +2232,10 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverSwitch_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverSwitch_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverSwitch_Context *ctx = (SDL_DriverSwitch_Context *)device->context; @@ -2232,13 +2262,11 @@ HIDAPI_DriverSwitch_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joyst ctx->joystick = NULL; } -static void -HIDAPI_DriverSwitch_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverSwitch_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverNintendoClassic = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverNintendoClassic = { SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, SDL_TRUE, HIDAPI_DriverNintendoClassic_RegisterHints, @@ -2260,8 +2288,7 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverNintendoClassic = HIDAPI_DriverSwitch_FreeDevice, }; -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverJoyCons = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverJoyCons = { SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, SDL_TRUE, HIDAPI_DriverJoyCons_RegisterHints, @@ -2283,8 +2310,7 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverJoyCons = HIDAPI_DriverSwitch_FreeDevice, }; -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSwitch = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSwitch = { SDL_HINT_JOYSTICK_HIDAPI_SWITCH, SDL_TRUE, HIDAPI_DriverSwitch_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_wii.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_wii.c index 740fb6b..3471b77 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_wii.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_wii.c @@ -33,7 +33,6 @@ #include "SDL_hidapi_rumble.h" #include "SDL_hidapi_nintendo.h" - #ifdef SDL_JOYSTICK_HIDAPI_WII /* Define this if you want to log all packets from the controller */ @@ -41,27 +40,27 @@ #define ENABLE_CONTINUOUS_REPORTING SDL_TRUE -#define INPUT_WAIT_TIMEOUT_MS (3 * 1000) -#define MOTION_PLUS_UPDATE_TIME_MS (8 * 1000) -#define STATUS_UPDATE_TIME_MS (15 * 60 * 1000) - -#define WII_EXTENSION_NONE 0x2E2E -#define WII_EXTENSION_UNINITIALIZED 0xFFFF -#define WII_EXTENSION_NUNCHUK 0x0000 -#define WII_EXTENSION_GAMEPAD 0x0101 -#define WII_EXTENSION_WIIUPRO 0x0120 -#define WII_EXTENSION_MOTIONPLUS_MASK 0xF0FF -#define WII_EXTENSION_MOTIONPLUS_ID 0x0005 +#define INPUT_WAIT_TIMEOUT_MS (3 * 1000) +#define MOTION_PLUS_UPDATE_TIME_MS (8 * 1000) +#define STATUS_UPDATE_TIME_MS (15 * 60 * 1000) -#define WII_MOTIONPLUS_MODE_NONE 0x00 -#define WII_MOTIONPLUS_MODE_STANDARD 0x04 -#define WII_MOTIONPLUS_MODE_NUNCHUK 0x05 -#define WII_MOTIONPLUS_MODE_GAMEPAD 0x07 +#define WII_EXTENSION_NONE 0x2E2E +#define WII_EXTENSION_UNINITIALIZED 0xFFFF +#define WII_EXTENSION_NUNCHUK 0x0000 +#define WII_EXTENSION_GAMEPAD 0x0101 +#define WII_EXTENSION_WIIUPRO 0x0120 +#define WII_EXTENSION_MOTIONPLUS_MASK 0xF0FF +#define WII_EXTENSION_MOTIONPLUS_ID 0x0005 +#define WII_MOTIONPLUS_MODE_NONE 0x00 +#define WII_MOTIONPLUS_MODE_STANDARD 0x04 +#define WII_MOTIONPLUS_MODE_NUNCHUK 0x05 +#define WII_MOTIONPLUS_MODE_GAMEPAD 0x07 -typedef enum { - k_eWiiInputReportIDs_Status = 0x20, - k_eWiiInputReportIDs_ReadMemory = 0x21, +typedef enum +{ + k_eWiiInputReportIDs_Status = 0x20, + k_eWiiInputReportIDs_ReadMemory = 0x21, k_eWiiInputReportIDs_Acknowledge = 0x22, k_eWiiInputReportIDs_ButtonData0 = 0x30, k_eWiiInputReportIDs_ButtonData1 = 0x31, @@ -76,34 +75,38 @@ typedef enum { k_eWiiInputReportIDs_ButtonDataF = 0x3F, } EWiiInputReportIDs; -typedef enum { - k_eWiiOutputReportIDs_Rumble = 0x10, - k_eWiiOutputReportIDs_LEDs = 0x11, +typedef enum +{ + k_eWiiOutputReportIDs_Rumble = 0x10, + k_eWiiOutputReportIDs_LEDs = 0x11, k_eWiiOutputReportIDs_DataReportingMode = 0x12, - k_eWiiOutputReportIDs_IRCameraEnable = 0x13, - k_eWiiOutputReportIDs_SpeakerEnable = 0x14, - k_eWiiOutputReportIDs_StatusRequest = 0x15, - k_eWiiOutputReportIDs_WriteMemory = 0x16, - k_eWiiOutputReportIDs_ReadMemory = 0x17, - k_eWiiOutputReportIDs_SpeakerData = 0x18, - k_eWiiOutputReportIDs_SpeakerMute = 0x19, - k_eWiiOutputReportIDs_IRCameraEnable2 = 0x1a, + k_eWiiOutputReportIDs_IRCameraEnable = 0x13, + k_eWiiOutputReportIDs_SpeakerEnable = 0x14, + k_eWiiOutputReportIDs_StatusRequest = 0x15, + k_eWiiOutputReportIDs_WriteMemory = 0x16, + k_eWiiOutputReportIDs_ReadMemory = 0x17, + k_eWiiOutputReportIDs_SpeakerData = 0x18, + k_eWiiOutputReportIDs_SpeakerMute = 0x19, + k_eWiiOutputReportIDs_IRCameraEnable2 = 0x1a, } EWiiOutputReportIDs; -typedef enum { +typedef enum +{ k_eWiiPlayerLEDs_P1 = 0x10, k_eWiiPlayerLEDs_P2 = 0x20, k_eWiiPlayerLEDs_P3 = 0x40, k_eWiiPlayerLEDs_P4 = 0x80, } EWiiPlayerLEDs; -typedef enum { +typedef enum +{ k_eWiiCommunicationState_None, /* No special communications happening */ k_eWiiCommunicationState_CheckMotionPlusStage1, /* Sent standard extension identify request */ k_eWiiCommunicationState_CheckMotionPlusStage2, /* Sent Motion Plus extension identify request */ } EWiiCommunicationState; -typedef enum { +typedef enum +{ k_eWiiButtons_A = SDL_CONTROLLER_BUTTON_MISC1, k_eWiiButtons_B, k_eWiiButtons_One, @@ -120,7 +123,8 @@ typedef enum { #define k_unWiiPacketDataLength 22 -typedef struct { +typedef struct +{ Uint8 rgucBaseButtons[2]; Uint8 rgucAccelerometer[3]; Uint8 rgucExtension[21]; @@ -129,7 +133,8 @@ typedef struct { Uint8 ucNExtensionBytes; } WiiButtonData; -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; EWiiCommunicationState m_eCommState; @@ -139,7 +144,7 @@ typedef struct { int m_nPlayerIndex; SDL_bool m_bRumbleActive; SDL_bool m_bMotionPlusPresent; - Uint8 m_ucMotionPlusMode; + Uint8 m_ucMotionPlusMode; SDL_bool m_bReportSensors; Uint8 m_rgucReadBuffer[k_unWiiPacketDataLength]; Uint32 m_unLastInput; @@ -147,7 +152,8 @@ typedef struct { Uint32 m_unNextMotionPlusCheck; SDL_bool m_bDisconnected; - struct StickCalibrationData { + struct StickCalibrationData + { Uint16 min; Uint16 max; Uint16 center; @@ -155,32 +161,28 @@ typedef struct { } m_StickCalibrationData[6]; } SDL_DriverWii_Context; -static void -HIDAPI_DriverWii_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverWii_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII, callback, userdata); } -static void -HIDAPI_DriverWii_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverWii_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII, callback, userdata); } -static SDL_bool -HIDAPI_DriverWii_IsEnabled(void) +static SDL_bool HIDAPI_DriverWii_IsEnabled(void) { #if 1 /* This doesn't work with the dolphinbar, so don't enable by default right now */ return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_WII, SDL_FALSE); #else return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_WII, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)); + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, + SDL_HIDAPI_DEFAULT)); #endif } -static SDL_bool -HIDAPI_DriverWii_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverWii_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { if (vendor_id == USB_VENDOR_NINTENDO && (product_id == USB_PRODUCT_NINTENDO_WII_REMOTE || @@ -216,17 +218,17 @@ static SDL_bool WriteOutput(SDL_DriverWii_Context *ctx, const Uint8 *data, int s } #endif if (sync) { - return (SDL_hid_write(ctx->device->dev, data, size) >= 0); + return SDL_hid_write(ctx->device->dev, data, size) >= 0; } else { /* Use the rumble thread for general asynchronous writes */ - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return SDL_FALSE; } - return (SDL_HIDAPI_SendRumbleAndUnlock(ctx->device, data, size) >= 0); + return SDL_HIDAPI_SendRumbleAndUnlock(ctx->device, data, size) >= 0; } } -static SDL_bool ReadInputSync(SDL_DriverWii_Context *ctx, EWiiInputReportIDs expectedID, SDL_bool(*isMine)(const Uint8 *)) +static SDL_bool ReadInputSync(SDL_DriverWii_Context *ctx, EWiiInputReportIDs expectedID, SDL_bool (*isMine)(const Uint8 *)) { Uint32 TimeoutMs = 250; /* Seeing successful reads after about 200 ms */ Uint32 startTicks = SDL_GetTicks(); @@ -234,7 +236,7 @@ static SDL_bool ReadInputSync(SDL_DriverWii_Context *ctx, EWiiInputReportIDs exp int nRead = 0; while ((nRead = ReadInput(ctx)) != -1) { if (nRead > 0) { - if (ctx->m_rgucReadBuffer[0] == expectedID && (!isMine || isMine(ctx->m_rgucReadBuffer))) { + if (ctx->m_rgucReadBuffer[0] == expectedID && (isMine == NULL || isMine(ctx->m_rgucReadBuffer))) { return SDL_TRUE; } } else { @@ -511,7 +513,7 @@ static void UpdatePowerLevelWii(SDL_Joystick *joystick, Uint8 batteryLevelByte) static void UpdatePowerLevelWiiU(SDL_Joystick *joystick, Uint8 extensionBatteryByte) { - SDL_bool charging = extensionBatteryByte & 0x08 ? SDL_FALSE : SDL_TRUE; + SDL_bool charging = extensionBatteryByte & 0x08 ? SDL_FALSE : SDL_TRUE; SDL_bool pluggedIn = extensionBatteryByte & 0x04 ? SDL_FALSE : SDL_TRUE; Uint8 batteryLevel = extensionBatteryByte >> 4; @@ -580,32 +582,32 @@ static void InitStickCalibrationData(SDL_DriverWii_Context *ctx) { int i; switch (ctx->m_eExtensionControllerType) { - case k_eWiiExtensionControllerType_WiiUPro: - for (i = 0; i < 4; i++) { - ctx->m_StickCalibrationData[i].min = 1000; - ctx->m_StickCalibrationData[i].max = 3000; - ctx->m_StickCalibrationData[i].center = 0; - ctx->m_StickCalibrationData[i].deadzone = 100; - } - break; - case k_eWiiExtensionControllerType_Gamepad: - for (i = 0; i < 4; i++) { - ctx->m_StickCalibrationData[i].min = i < 2 ? 9 : 5; - ctx->m_StickCalibrationData[i].max = i < 2 ? 54 : 26; - ctx->m_StickCalibrationData[i].center = 0; - ctx->m_StickCalibrationData[i].deadzone = i < 2 ? 4 : 2; - } - break; - case k_eWiiExtensionControllerType_Nunchuk: - for (i = 0; i < 2; i++) { - ctx->m_StickCalibrationData[i].min = 40; - ctx->m_StickCalibrationData[i].max = 215; - ctx->m_StickCalibrationData[i].center = 0; - ctx->m_StickCalibrationData[i].deadzone = 10; - } - break; - default: - break; + case k_eWiiExtensionControllerType_WiiUPro: + for (i = 0; i < 4; i++) { + ctx->m_StickCalibrationData[i].min = 1000; + ctx->m_StickCalibrationData[i].max = 3000; + ctx->m_StickCalibrationData[i].center = 0; + ctx->m_StickCalibrationData[i].deadzone = 100; + } + break; + case k_eWiiExtensionControllerType_Gamepad: + for (i = 0; i < 4; i++) { + ctx->m_StickCalibrationData[i].min = i < 2 ? 9 : 5; + ctx->m_StickCalibrationData[i].max = i < 2 ? 54 : 26; + ctx->m_StickCalibrationData[i].center = 0; + ctx->m_StickCalibrationData[i].deadzone = i < 2 ? 4 : 2; + } + break; + case k_eWiiExtensionControllerType_Nunchuk: + for (i = 0; i < 2; i++) { + ctx->m_StickCalibrationData[i].min = 40; + ctx->m_StickCalibrationData[i].max = 215; + ctx->m_StickCalibrationData[i].center = 0; + ctx->m_StickCalibrationData[i].deadzone = 10; + } + break; + default: + break; } } @@ -667,8 +669,7 @@ static void SDLCALL SDL_PlayerLEDHintChanged(void *userdata, const char *name, c } } -static EWiiExtensionControllerType -ReadExtensionControllerType(SDL_HIDAPI_Device *device) +static EWiiExtensionControllerType ReadExtensionControllerType(SDL_HIDAPI_Device *device) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; EWiiExtensionControllerType eExtensionControllerType = k_eWiiExtensionControllerType_Unknown; @@ -703,8 +704,7 @@ ReadExtensionControllerType(SDL_HIDAPI_Device *device) return eExtensionControllerType; } -static void -UpdateDeviceIdentity(SDL_HIDAPI_Device *device) +static void UpdateDeviceIdentity(SDL_HIDAPI_Device *device) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; @@ -728,13 +728,12 @@ UpdateDeviceIdentity(SDL_HIDAPI_Device *device) device->guid.data[15] = ctx->m_eExtensionControllerType; } -static SDL_bool -HIDAPI_DriverWii_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverWii_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverWii_Context *ctx; ctx = (SDL_DriverWii_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -749,14 +748,12 @@ HIDAPI_DriverWii_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverWii_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverWii_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverWii_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverWii_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; @@ -769,11 +766,12 @@ HIDAPI_DriverWii_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID UpdateSlotLED(ctx); } -static SDL_bool -HIDAPI_DriverWii_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverWii_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->joystick = joystick; InitializeExtension(ctx); @@ -821,8 +819,7 @@ HIDAPI_DriverWii_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) return SDL_TRUE; } -static int -HIDAPI_DriverWii_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverWii_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; SDL_bool active = (low_frequency_rumble || high_frequency_rumble) ? SDL_TRUE : SDL_FALSE; @@ -839,32 +836,27 @@ HIDAPI_DriverWii_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return 0; } -static int -HIDAPI_DriverWii_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverWii_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverWii_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverWii_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { return SDL_JOYCAP_RUMBLE; } -static int -HIDAPI_DriverWii_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverWii_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverWii_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverWii_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverWii_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverWii_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; @@ -926,7 +918,7 @@ static void PostStickCalibrated(SDL_Joystick *joystick, struct StickCalibrationD *`on` is the joystick value to be sent if a bit is on *`off` is the joystick value to be sent if a bit is off */ -static void PostPackedButtonData(SDL_Joystick *joystick, const Uint8 defs[][8], const Uint8* data, int size, Uint8 on, Uint8 off) +static void PostPackedButtonData(SDL_Joystick *joystick, const Uint8 defs[][8], const Uint8 *data, int size, Uint8 on, Uint8 off) { int i, j; @@ -943,70 +935,163 @@ static void PostPackedButtonData(SDL_Joystick *joystick, const Uint8 defs[][8], static const Uint8 GAMEPAD_BUTTON_DEFS[3][8] = { { - 0xFF /* Unused */, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - }, { - SDL_CONTROLLER_BUTTON_DPAD_UP, SDL_CONTROLLER_BUTTON_DPAD_LEFT, 0xFF /* ZR */, SDL_CONTROLLER_BUTTON_X, - SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_Y, SDL_CONTROLLER_BUTTON_B, 0xFF /*ZL*/, - }, { - SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_LEFTSTICK, 0xFF /* Charging */, 0xFF /* Plugged In */, - 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, + 0xFF /* Unused */, + SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, + SDL_CONTROLLER_BUTTON_START, + SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_BACK, + SDL_CONTROLLER_BUTTON_LEFTSHOULDER, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + }, + { + SDL_CONTROLLER_BUTTON_DPAD_UP, + SDL_CONTROLLER_BUTTON_DPAD_LEFT, + 0xFF /* ZR */, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_A, + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_B, + 0xFF /*ZL*/, + }, + { + SDL_CONTROLLER_BUTTON_RIGHTSTICK, + SDL_CONTROLLER_BUTTON_LEFTSTICK, + 0xFF /* Charging */, + 0xFF /* Plugged In */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, } }; static const Uint8 GAMEPAD_BUTTON_DEFS_POSITIONAL[3][8] = { { - 0xFF /* Unused */, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - }, { - SDL_CONTROLLER_BUTTON_DPAD_UP, SDL_CONTROLLER_BUTTON_DPAD_LEFT, 0xFF /* ZR */, SDL_CONTROLLER_BUTTON_Y, - SDL_CONTROLLER_BUTTON_B, SDL_CONTROLLER_BUTTON_X, SDL_CONTROLLER_BUTTON_A, 0xFF /*ZL*/, - }, { - SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_LEFTSTICK, 0xFF /* Charging */, 0xFF /* Plugged In */, - 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, + 0xFF /* Unused */, + SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, + SDL_CONTROLLER_BUTTON_START, + SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_BACK, + SDL_CONTROLLER_BUTTON_LEFTSHOULDER, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + }, + { + SDL_CONTROLLER_BUTTON_DPAD_UP, + SDL_CONTROLLER_BUTTON_DPAD_LEFT, + 0xFF /* ZR */, + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_B, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_A, + 0xFF /*ZL*/, + }, + { + SDL_CONTROLLER_BUTTON_RIGHTSTICK, + SDL_CONTROLLER_BUTTON_LEFTSTICK, + 0xFF /* Charging */, + 0xFF /* Plugged In */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, } }; static const Uint8 MP_GAMEPAD_BUTTON_DEFS[3][8] = { { - 0xFF /* Unused */, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - }, { - 0xFF /* Motion Plus data */, 0xFF /* Motion Plus data */, 0xFF /* ZR */, SDL_CONTROLLER_BUTTON_X, - SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_Y, SDL_CONTROLLER_BUTTON_B, 0xFF /*ZL*/, - }, { - SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_LEFTSTICK, 0xFF /* Charging */, 0xFF /* Plugged In */, - 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, + 0xFF /* Unused */, + SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, + SDL_CONTROLLER_BUTTON_START, + SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_BACK, + SDL_CONTROLLER_BUTTON_LEFTSHOULDER, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + }, + { + 0xFF /* Motion Plus data */, + 0xFF /* Motion Plus data */, + 0xFF /* ZR */, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_A, + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_B, + 0xFF /*ZL*/, + }, + { + SDL_CONTROLLER_BUTTON_RIGHTSTICK, + SDL_CONTROLLER_BUTTON_LEFTSTICK, + 0xFF /* Charging */, + 0xFF /* Plugged In */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, } }; static const Uint8 MP_GAMEPAD_BUTTON_DEFS_POSITIONAL[3][8] = { { - 0xFF /* Unused */, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - }, { - 0xFF /* Motion Plus data */, 0xFF /* Motion Plus data */, 0xFF /* ZR */, SDL_CONTROLLER_BUTTON_Y, - SDL_CONTROLLER_BUTTON_B, SDL_CONTROLLER_BUTTON_X, SDL_CONTROLLER_BUTTON_A, 0xFF /*ZL*/, - }, { - SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_LEFTSTICK, 0xFF /* Charging */, 0xFF /* Plugged In */, - 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, + 0xFF /* Unused */, + SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, + SDL_CONTROLLER_BUTTON_START, + SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_BACK, + SDL_CONTROLLER_BUTTON_LEFTSHOULDER, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + }, + { + 0xFF /* Motion Plus data */, + 0xFF /* Motion Plus data */, + 0xFF /* ZR */, + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_B, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_A, + 0xFF /*ZL*/, + }, + { + SDL_CONTROLLER_BUTTON_RIGHTSTICK, + SDL_CONTROLLER_BUTTON_LEFTSTICK, + 0xFF /* Charging */, + 0xFF /* Plugged In */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, } }; static const Uint8 MP_FIXUP_DPAD_BUTTON_DEFS[2][8] = { { - SDL_CONTROLLER_BUTTON_DPAD_UP, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - }, { - SDL_CONTROLLER_BUTTON_DPAD_LEFT, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, + SDL_CONTROLLER_BUTTON_DPAD_UP, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + }, + { + SDL_CONTROLLER_BUTTON_DPAD_LEFT, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, } }; static void HandleWiiUProButtonData(SDL_DriverWii_Context *ctx, SDL_Joystick *joystick, const WiiButtonData *data) { static const Uint8 axes[] = { SDL_CONTROLLER_AXIS_LEFTX, SDL_CONTROLLER_AXIS_RIGHTX, SDL_CONTROLLER_AXIS_LEFTY, SDL_CONTROLLER_AXIS_RIGHTY }; - const Uint8 (*buttons)[8] = ctx->m_bUseButtonLabels ? GAMEPAD_BUTTON_DEFS : GAMEPAD_BUTTON_DEFS_POSITIONAL; + const Uint8(*buttons)[8] = ctx->m_bUseButtonLabels ? GAMEPAD_BUTTON_DEFS : GAMEPAD_BUTTON_DEFS_POSITIONAL; Uint8 zl, zr; int i; @@ -1020,7 +1105,7 @@ static void HandleWiiUProButtonData(SDL_DriverWii_Context *ctx, SDL_Joystick *jo /* Triggers */ zl = data->rgucExtension[9] & 0x80; zr = data->rgucExtension[9] & 0x04; - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, zl ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, zl ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, zr ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); /* Sticks */ @@ -1035,9 +1120,7 @@ static void HandleWiiUProButtonData(SDL_DriverWii_Context *ctx, SDL_Joystick *jo static void HandleGamepadControllerButtonData(SDL_DriverWii_Context *ctx, SDL_Joystick *joystick, const WiiButtonData *data) { - const Uint8 (*buttons)[8] = ctx->m_bUseButtonLabels ? - ((ctx->m_ucMotionPlusMode == WII_MOTIONPLUS_MODE_GAMEPAD) ? MP_GAMEPAD_BUTTON_DEFS : GAMEPAD_BUTTON_DEFS) : - ((ctx->m_ucMotionPlusMode == WII_MOTIONPLUS_MODE_GAMEPAD) ? MP_GAMEPAD_BUTTON_DEFS_POSITIONAL : GAMEPAD_BUTTON_DEFS_POSITIONAL); + const Uint8(*buttons)[8] = ctx->m_bUseButtonLabels ? ((ctx->m_ucMotionPlusMode == WII_MOTIONPLUS_MODE_GAMEPAD) ? MP_GAMEPAD_BUTTON_DEFS : GAMEPAD_BUTTON_DEFS) : ((ctx->m_ucMotionPlusMode == WII_MOTIONPLUS_MODE_GAMEPAD) ? MP_GAMEPAD_BUTTON_DEFS_POSITIONAL : GAMEPAD_BUTTON_DEFS_POSITIONAL); Uint8 lx, ly, rx, ry, zl, zr; if (data->ucNExtensionBytes < 6) { @@ -1053,7 +1136,7 @@ static void HandleGamepadControllerButtonData(SDL_DriverWii_Context *ctx, SDL_Jo /* Triggers */ zl = data->rgucExtension[5] & 0x80; zr = data->rgucExtension[5] & 0x04; - SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, zl ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); + SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, zl ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, zr ? SDL_JOYSTICK_AXIS_MIN : SDL_JOYSTICK_AXIS_MAX); /* Sticks */ @@ -1076,11 +1159,24 @@ static void HandleWiiRemoteButtonData(SDL_DriverWii_Context *ctx, SDL_Joystick * { static const Uint8 buttons[2][8] = { { - k_eWiiButtons_DPad_Left, k_eWiiButtons_DPad_Right, k_eWiiButtons_DPad_Down, k_eWiiButtons_DPad_Up, - k_eWiiButtons_Plus, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, - }, { - k_eWiiButtons_Two, k_eWiiButtons_One, k_eWiiButtons_B, k_eWiiButtons_A, - k_eWiiButtons_Minus, 0xFF /* Unused */, 0xFF /* Unused */, k_eWiiButtons_Home, + k_eWiiButtons_DPad_Left, + k_eWiiButtons_DPad_Right, + k_eWiiButtons_DPad_Down, + k_eWiiButtons_DPad_Up, + k_eWiiButtons_Plus, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + }, + { + k_eWiiButtons_Two, + k_eWiiButtons_One, + k_eWiiButtons_B, + k_eWiiButtons_A, + k_eWiiButtons_Minus, + 0xFF /* Unused */, + 0xFF /* Unused */, + k_eWiiButtons_Home, } }; if (data->hasBaseButtons) { @@ -1096,11 +1192,24 @@ static void HandleWiiRemoteButtonDataAsMainController(SDL_DriverWii_Context *ctx */ static const Uint8 buttons[2][8] = { { - SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_UP, - SDL_CONTROLLER_BUTTON_START, 0xFF /* Unused */, 0xFF /* Unused */, 0xFF /* Unused */, - }, { - SDL_CONTROLLER_BUTTON_Y, SDL_CONTROLLER_BUTTON_X, SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_B, - SDL_CONTROLLER_BUTTON_BACK, 0xFF /* Unused */, 0xFF /* Unused */, SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_DPAD_LEFT, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_UP, + SDL_CONTROLLER_BUTTON_START, + 0xFF /* Unused */, + 0xFF /* Unused */, + 0xFF /* Unused */, + }, + { + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_A, + SDL_CONTROLLER_BUTTON_B, + SDL_CONTROLLER_BUTTON_BACK, + 0xFF /* Unused */, + 0xFF /* Unused */, + SDL_CONTROLLER_BUTTON_GUIDE, } }; if (data->hasBaseButtons) { @@ -1355,38 +1464,37 @@ static void HandleResponse(SDL_DriverWii_Context *ctx, SDL_Joystick *joystick) case k_eWiiCommunicationState_CheckMotionPlusStage1: case k_eWiiCommunicationState_CheckMotionPlusStage2: - { - Uint16 extension = 0; - if (ParseExtensionIdentifyResponse(ctx, &extension)) { - if ((extension & WII_EXTENSION_MOTIONPLUS_MASK) == WII_EXTENSION_MOTIONPLUS_ID) { - /* Motion Plus is currently active */ - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Motion Plus CONNECTED (stage %d)\n", ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1 ? 1 : 2); + { + Uint16 extension = 0; + if (ParseExtensionIdentifyResponse(ctx, &extension)) { + if ((extension & WII_EXTENSION_MOTIONPLUS_MASK) == WII_EXTENSION_MOTIONPLUS_ID) { + /* Motion Plus is currently active */ + SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Motion Plus CONNECTED (stage %d)\n", ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1 ? 1 : 2); - if (!ctx->m_bMotionPlusPresent) { - /* Reinitialize to get new sensor availability */ - ctx->m_bDisconnected = SDL_TRUE; - } - ctx->m_eCommState = k_eWiiCommunicationState_None; + if (!ctx->m_bMotionPlusPresent) { + /* Reinitialize to get new sensor availability */ + ctx->m_bDisconnected = SDL_TRUE; + } + ctx->m_eCommState = k_eWiiCommunicationState_None; - } else if (ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1) { - /* Check to see if Motion Plus is present */ - ReadRegister(ctx, 0xA600FE, 2, SDL_FALSE); + } else if (ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1) { + /* Check to see if Motion Plus is present */ + ReadRegister(ctx, 0xA600FE, 2, SDL_FALSE); - ctx->m_eCommState = k_eWiiCommunicationState_CheckMotionPlusStage2; + ctx->m_eCommState = k_eWiiCommunicationState_CheckMotionPlusStage2; - } else { - /* Motion Plus is not present */ - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Motion Plus DISCONNECTED (stage %d)\n", ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1 ? 1 : 2); - - if (ctx->m_bMotionPlusPresent) { - /* Reinitialize to get new sensor availability */ - ctx->m_bDisconnected = SDL_TRUE; - } - ctx->m_eCommState = k_eWiiCommunicationState_None; + } else { + /* Motion Plus is not present */ + SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Motion Plus DISCONNECTED (stage %d)\n", ctx->m_eCommState == k_eWiiCommunicationState_CheckMotionPlusStage1 ? 1 : 2); + + if (ctx->m_bMotionPlusPresent) { + /* Reinitialize to get new sensor availability */ + ctx->m_bDisconnected = SDL_TRUE; } + ctx->m_eCommState = k_eWiiCommunicationState_None; } } - break; + } break; default: /* Should never happen */ break; @@ -1407,43 +1515,43 @@ static void HandleButtonPacket(SDL_DriverWii_Context *ctx, SDL_Joystick *joystic /* IR camera data is not supported */ SDL_zero(data); switch (ctx->m_rgucReadBuffer[0]) { - case k_eWiiInputReportIDs_ButtonData0: /* 30 BB BB */ - GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); - break; - case k_eWiiInputReportIDs_ButtonData1: /* 31 BB BB AA AA AA */ - case k_eWiiInputReportIDs_ButtonData3: /* 33 BB BB AA AA AA II II II II II II II II II II II II */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetAccelerometer(&data, ctx->m_rgucReadBuffer + 3); - break; - case k_eWiiInputReportIDs_ButtonData2: /* 32 BB BB EE EE EE EE EE EE EE EE */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetExtensionData(&data, ctx->m_rgucReadBuffer + 3, 8); - break; - case k_eWiiInputReportIDs_ButtonData4: /* 34 BB BB EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetExtensionData(&data, ctx->m_rgucReadBuffer + 3, 19); - break; - case k_eWiiInputReportIDs_ButtonData5: /* 35 BB BB AA AA AA EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetAccelerometer(&data, ctx->m_rgucReadBuffer + 3); - GetExtensionData(&data, ctx->m_rgucReadBuffer + 6, 16); - break; - case k_eWiiInputReportIDs_ButtonData6: /* 36 BB BB II II II II II II II II II II EE EE EE EE EE EE EE EE EE */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetExtensionData(&data, ctx->m_rgucReadBuffer + 13, 9); - break; - case k_eWiiInputReportIDs_ButtonData7: /* 37 BB BB AA AA AA II II II II II II II II II II EE EE EE EE EE EE */ - GetBaseButtons (&data, ctx->m_rgucReadBuffer + 1); - GetExtensionData(&data, ctx->m_rgucReadBuffer + 16, 6); - break; - case k_eWiiInputReportIDs_ButtonDataD: /* 3d EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ - GetExtensionData(&data, ctx->m_rgucReadBuffer + 1, 21); - break; - case k_eWiiInputReportIDs_ButtonDataE: - case k_eWiiInputReportIDs_ButtonDataF: - default: - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Unsupported button data type %02x", ctx->m_rgucReadBuffer[0]); - return; + case k_eWiiInputReportIDs_ButtonData0: /* 30 BB BB */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + break; + case k_eWiiInputReportIDs_ButtonData1: /* 31 BB BB AA AA AA */ + case k_eWiiInputReportIDs_ButtonData3: /* 33 BB BB AA AA AA II II II II II II II II II II II II */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetAccelerometer(&data, ctx->m_rgucReadBuffer + 3); + break; + case k_eWiiInputReportIDs_ButtonData2: /* 32 BB BB EE EE EE EE EE EE EE EE */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetExtensionData(&data, ctx->m_rgucReadBuffer + 3, 8); + break; + case k_eWiiInputReportIDs_ButtonData4: /* 34 BB BB EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetExtensionData(&data, ctx->m_rgucReadBuffer + 3, 19); + break; + case k_eWiiInputReportIDs_ButtonData5: /* 35 BB BB AA AA AA EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetAccelerometer(&data, ctx->m_rgucReadBuffer + 3); + GetExtensionData(&data, ctx->m_rgucReadBuffer + 6, 16); + break; + case k_eWiiInputReportIDs_ButtonData6: /* 36 BB BB II II II II II II II II II II EE EE EE EE EE EE EE EE EE */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetExtensionData(&data, ctx->m_rgucReadBuffer + 13, 9); + break; + case k_eWiiInputReportIDs_ButtonData7: /* 37 BB BB AA AA AA II II II II II II II II II II EE EE EE EE EE EE */ + GetBaseButtons(&data, ctx->m_rgucReadBuffer + 1); + GetExtensionData(&data, ctx->m_rgucReadBuffer + 16, 6); + break; + case k_eWiiInputReportIDs_ButtonDataD: /* 3d EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE */ + GetExtensionData(&data, ctx->m_rgucReadBuffer + 1, 21); + break; + case k_eWiiInputReportIDs_ButtonDataE: + case k_eWiiInputReportIDs_ButtonDataF: + default: + SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI Wii: Unsupported button data type %02x", ctx->m_rgucReadBuffer[0]); + return; } HandleButtonData(ctx, joystick, &data); } @@ -1462,8 +1570,7 @@ static void HandleInput(SDL_DriverWii_Context *ctx, SDL_Joystick *joystick) } } -static SDL_bool -HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -1529,11 +1636,10 @@ HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverWii_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverWii_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context; @@ -1546,13 +1652,11 @@ HIDAPI_DriverWii_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick ctx->joystick = NULL; } -static void -HIDAPI_DriverWii_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverWii_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverWii = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverWii = { SDL_HINT_JOYSTICK_HIDAPI_WII, SDL_TRUE, HIDAPI_DriverWii_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c index e9af3bc..843819f 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c @@ -31,14 +31,13 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_XBOX360 /* Define this if you want to log all packets from the controller */ /*#define DEBUG_XBOX_PROTOCOL*/ - -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_Joystick *joystick; int player_index; @@ -46,34 +45,32 @@ typedef struct { Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverXbox360_Context; -static void -HIDAPI_DriverXbox360_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXbox360_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); } -static void -HIDAPI_DriverXbox360_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXbox360_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); } -static SDL_bool -HIDAPI_DriverXbox360_IsEnabled(void) +static SDL_bool HIDAPI_DriverXbox360_IsEnabled(void) { return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT))); + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT))); } -static SDL_bool -HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */ + if (vendor_id == USB_VENDOR_ASTRO && product_id == USB_PRODUCT_ASTRO_C40_XBOX360) { + /* This is the ASTRO C40 in Xbox 360 mode */ + return SDL_TRUE; + } if (vendor_id == USB_VENDOR_NVIDIA) { /* This is the NVIDIA Shield controller which doesn't talk Xbox controller protocol */ return SDL_FALSE; @@ -87,13 +84,11 @@ HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *na /* This is the chatpad or other input interface, not the Xbox 360 interface */ return SDL_FALSE; } -#if defined(__MACOSX__) || defined(__WIN32__) - if (vendor_id == USB_VENDOR_MICROSOFT && product_id == 0x028e && version == 1) { +#ifdef __MACOSX__ + if (vendor_id == USB_VENDOR_MICROSOFT && product_id == USB_PRODUCT_XBOX360_WIRED_CONTROLLER && version == 1) { /* This is the Steam Virtual Gamepad, which isn't supported by this driver */ return SDL_FALSE; } -#endif -#if defined(__MACOSX__) /* Wired Xbox One controllers are handled by this driver, interfacing with the 360Controller driver available from: https://github.com/360Controller/360Controller/releases @@ -143,13 +138,12 @@ static void SDLCALL SDL_PlayerLEDHintChanged(void *userdata, const char *name, c } } -static SDL_bool -HIDAPI_DriverXbox360_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXbox360_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverXbox360_Context *ctx; ctx = (SDL_DriverXbox360_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -162,14 +156,12 @@ HIDAPI_DriverXbox360_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverXbox360_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverXbox360_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverXbox360_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverXbox360_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; @@ -182,11 +174,12 @@ HIDAPI_DriverXbox360_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joystic UpdateSlotLED(ctx); } -static SDL_bool -HIDAPI_DriverXbox360_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverXbox360_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->joystick = joystick; SDL_zeroa(ctx->last_state); @@ -206,8 +199,7 @@ HIDAPI_DriverXbox360_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joyst return SDL_TRUE; } -static int -HIDAPI_DriverXbox360_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverXbox360_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { #ifdef __MACOSX__ if (SDL_IsJoystickBluetoothXboxOne(device->vendor_id, device->product_id)) { @@ -225,8 +217,8 @@ HIDAPI_DriverXbox360_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy */ Uint8 rumble_packet[] = { 'M', 'A', 'G', 'I', 'C', '0', 0x00, 0x04, 0x00, 0x00 }; - rumble_packet[6+2] = (low_frequency_rumble >> 8); - rumble_packet[6+3] = (high_frequency_rumble >> 8); + rumble_packet[6 + 2] = (low_frequency_rumble >> 8); + rumble_packet[6 + 3] = (high_frequency_rumble >> 8); if (SDL_HIDAPI_SendRumble(device, rumble_packet, sizeof(rumble_packet)) != sizeof(rumble_packet)) { return SDL_SetError("Couldn't send rumble packet"); @@ -245,39 +237,33 @@ HIDAPI_DriverXbox360_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy return 0; } -static int -HIDAPI_DriverXbox360_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverXbox360_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverXbox360_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverXbox360_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { /* Doesn't have an RGB LED, so don't return SDL_JOYCAP_LED here */ return SDL_JOYCAP_RUMBLE; } -static int -HIDAPI_DriverXbox360_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverXbox360_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverXbox360_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverXbox360_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverXbox360_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverXbox360_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXbox360_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXbox360_Context *ctx, Uint8 *data, int size) { Sint16 axis; #ifdef __MACOSX__ @@ -311,16 +297,16 @@ HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXbox360 SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); axis = ((int)data[5] * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[6])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[6])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[8])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[8])); if (invert_y_axes) { axis = ~axis; } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[10])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[10])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[12])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[12])); if (invert_y_axes) { axis = ~axis; } @@ -329,8 +315,7 @@ HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXbox360 SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -347,7 +332,7 @@ HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device) #ifdef DEBUG_XBOX_PROTOCOL HIDAPI_DumpPacket("Xbox 360 packet: size = %d", data, size); #endif - if (!joystick) { + if (joystick == NULL) { continue; } @@ -360,11 +345,10 @@ HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverXbox360_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverXbox360_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; @@ -374,13 +358,11 @@ HIDAPI_DriverXbox360_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys ctx->joystick = NULL; } -static void -HIDAPI_DriverXbox360_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverXbox360_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXbox360 = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXbox360 = { SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, SDL_TRUE, HIDAPI_DriverXbox360_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360w.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360w.c index ffc4e11..5223d1a 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360w.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360w.c @@ -31,14 +31,13 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_XBOX360 /* Define this if you want to log all packets from the controller */ /*#define DEBUG_XBOX_PROTOCOL*/ - -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; SDL_bool connected; int player_index; @@ -46,35 +45,27 @@ typedef struct { Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverXbox360W_Context; - -static void -HIDAPI_DriverXbox360W_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXbox360W_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, callback, userdata); } -static void -HIDAPI_DriverXbox360W_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXbox360W_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, callback, userdata); } -static SDL_bool -HIDAPI_DriverXbox360W_IsEnabled(void) +static SDL_bool HIDAPI_DriverXbox360W_IsEnabled(void) { return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT)))); + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)))); } -static SDL_bool -HIDAPI_DriverXbox360W_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverXbox360W_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */ @@ -119,8 +110,7 @@ static void SDLCALL SDL_PlayerLEDHintChanged(void *userdata, const char *name, c } } -static void -UpdatePowerLevel(SDL_Joystick *joystick, Uint8 level) +static void UpdatePowerLevel(SDL_Joystick *joystick, Uint8 level) { float normalized_level = (float)level / 255.0f; @@ -135,8 +125,7 @@ UpdatePowerLevel(SDL_Joystick *joystick, Uint8 level) } } -static SDL_bool -HIDAPI_DriverXbox360W_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXbox360W_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverXbox360W_Context *ctx; @@ -146,7 +135,7 @@ HIDAPI_DriverXbox360W_InitDevice(SDL_HIDAPI_Device *device) HIDAPI_SetDeviceName(device, "Xbox 360 Wireless Controller"); ctx = (SDL_DriverXbox360W_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -164,18 +153,16 @@ HIDAPI_DriverXbox360W_InitDevice(SDL_HIDAPI_Device *device) return SDL_TRUE; } -static int -HIDAPI_DriverXbox360W_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverXbox360W_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverXbox360W_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverXbox360W_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { SDL_DriverXbox360W_Context *ctx = (SDL_DriverXbox360W_Context *)device->context; - if (!ctx) { + if (ctx == NULL) { return; } @@ -184,11 +171,12 @@ HIDAPI_DriverXbox360W_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joysti UpdateSlotLED(ctx); } -static SDL_bool -HIDAPI_DriverXbox360W_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverXbox360W_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXbox360W_Context *ctx = (SDL_DriverXbox360W_Context *)device->context; + SDL_AssertJoysticksLocked(); + SDL_zeroa(ctx->last_state); /* Initialize player index (needed for setting LEDs) */ @@ -207,8 +195,7 @@ HIDAPI_DriverXbox360W_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys return SDL_TRUE; } -static int -HIDAPI_DriverXbox360W_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverXbox360W_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { Uint8 rumble_packet[] = { 0x00, 0x01, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -221,39 +208,33 @@ HIDAPI_DriverXbox360W_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *jo return 0; } -static int -HIDAPI_DriverXbox360W_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverXbox360W_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -HIDAPI_DriverXbox360W_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverXbox360W_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { /* Doesn't have an RGB LED, so don't return SDL_JOYCAP_LED here */ return SDL_JOYCAP_RUMBLE; } -static int -HIDAPI_DriverXbox360W_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverXbox360W_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -HIDAPI_DriverXbox360W_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverXbox360W_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverXbox360W_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverXbox360W_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverXbox360W_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverXbox360W_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXbox360W_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverXbox360W_Context *ctx, Uint8 *data, int size) { Sint16 axis; const SDL_bool invert_y_axes = SDL_TRUE; @@ -283,16 +264,16 @@ HIDAPI_DriverXbox360W_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device * SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); axis = ((int)data[5] * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[6])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[6])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[8])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[8])); if (invert_y_axes) { axis = ~axis; } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[10])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[10])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[12])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[12])); if (invert_y_axes) { axis = ~axis; } @@ -301,8 +282,7 @@ HIDAPI_DriverXbox360W_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device * SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static SDL_bool -HIDAPI_DriverXbox360W_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXbox360W_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverXbox360W_Context *ctx = (SDL_DriverXbox360W_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -351,7 +331,7 @@ HIDAPI_DriverXbox360W_UpdateDevice(SDL_HIDAPI_Device *device) } } else if (size == 29 && data[0] == 0x00 && (data[1] & 0x01) == 0x01) { if (joystick) { - HIDAPI_DriverXbox360W_HandleStatePacket(joystick, device->dev, ctx, data+4, size-4); + HIDAPI_DriverXbox360W_HandleStatePacket(joystick, device->dev, ctx, data + 4, size - 4); } } } @@ -360,11 +340,10 @@ HIDAPI_DriverXbox360W_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverXbox360W_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverXbox360W_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXbox360W_Context *ctx = (SDL_DriverXbox360W_Context *)device->context; @@ -372,13 +351,11 @@ HIDAPI_DriverXbox360W_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy SDL_PlayerLEDHintChanged, ctx); } -static void -HIDAPI_DriverXbox360W_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverXbox360W_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXbox360W = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXbox360W = { SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, SDL_TRUE, HIDAPI_DriverXbox360W_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c index 052c7d0..755daa5 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c @@ -31,7 +31,6 @@ #include "SDL_hidapijoystick_c.h" #include "SDL_hidapi_rumble.h" - #ifdef SDL_JOYSTICK_HIDAPI_XBOXONE /* Define this if you want verbose logging of the init sequence */ @@ -77,7 +76,8 @@ static const Uint8 security_passed_packet[] = { * sent. The correct sequence number will be added when the * packet is going to be sent. */ -typedef struct { +typedef struct +{ Uint16 vendor_id; Uint16 product_id; Uint16 exclude_vendor_id; @@ -87,7 +87,6 @@ typedef struct { const Uint8 response[2]; } SDL_DriverXboxOne_InitPacket; - static const SDL_DriverXboxOne_InitPacket xboxone_init_packets[] = { { 0x0000, 0x0000, 0x0000, 0x0000, xboxone_init0, sizeof(xboxone_init0), { 0x00, 0x00 } }, { 0x0000, 0x0000, 0x0000, 0x0000, xboxone_init1, sizeof(xboxone_init1), { 0x00, 0x00 } }, @@ -99,20 +98,23 @@ static const SDL_DriverXboxOne_InitPacket xboxone_init_packets[] = { { 0x0000, 0x0000, 0x0000, 0x0000, xboxone_init2, sizeof(xboxone_init2), { 0x00, 0x00 } }, }; -typedef enum { +typedef enum +{ XBOX_ONE_INIT_STATE_START_NEGOTIATING, XBOX_ONE_INIT_STATE_NEGOTIATING, XBOX_ONE_INIT_STATE_PREPARE_INPUT, XBOX_ONE_INIT_STATE_COMPLETE, } SDL_XboxOneInitState; -typedef enum { +typedef enum +{ XBOX_ONE_RUMBLE_STATE_IDLE, XBOX_ONE_RUMBLE_STATE_QUEUED, XBOX_ONE_RUMBLE_STATE_BUSY } SDL_XboxOneRumbleState; -typedef struct { +typedef struct +{ SDL_HIDAPI_Device *device; Uint16 vendor_id; Uint16 product_id; @@ -125,8 +127,10 @@ typedef struct { SDL_bool has_guide_packet; SDL_bool has_color_led; SDL_bool has_paddles; + SDL_bool has_unmapped_state; SDL_bool has_trigger_rumble; SDL_bool has_share_button; + Uint8 last_paddle_state; Uint8 low_frequency_rumble; Uint8 high_frequency_rumble; Uint8 left_trigger_rumble; @@ -137,20 +141,17 @@ typedef struct { Uint8 last_state[USB_PACKET_LENGTH]; } SDL_DriverXboxOne_Context; -static SDL_bool -ControllerHasColorLED(Uint16 vendor_id, Uint16 product_id) +static SDL_bool ControllerHasColorLED(Uint16 vendor_id, Uint16 product_id) { - return (vendor_id == USB_VENDOR_MICROSOFT && product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2); + return vendor_id == USB_VENDOR_MICROSOFT && product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2; } -static SDL_bool -ControllerHasPaddles(Uint16 vendor_id, Uint16 product_id) +static SDL_bool ControllerHasPaddles(Uint16 vendor_id, Uint16 product_id) { return SDL_IsJoystickXboxOneElite(vendor_id, product_id); } -static SDL_bool -ControllerHasTriggerRumble(Uint16 vendor_id, Uint16 product_id) +static SDL_bool ControllerHasTriggerRumble(Uint16 vendor_id, Uint16 product_id) { /* All the Microsoft Xbox One controllers have trigger rumble */ if (vendor_id == USB_VENDOR_MICROSOFT) { @@ -165,8 +166,7 @@ ControllerHasTriggerRumble(Uint16 vendor_id, Uint16 product_id) return SDL_FALSE; } -static SDL_bool -ControllerHasShareButton(Uint16 vendor_id, Uint16 product_id) +static SDL_bool ControllerHasShareButton(Uint16 vendor_id, Uint16 product_id) { return SDL_IsJoystickXboxSeriesX(vendor_id, product_id); } @@ -206,8 +206,7 @@ static void SDLCALL SDL_HomeLEDHintChanged(void *userdata, const char *name, con } } -static void -SetInitState(SDL_DriverXboxOne_Context *ctx, SDL_XboxOneInitState state) +static void SetInitState(SDL_DriverXboxOne_Context *ctx, SDL_XboxOneInitState state) { #ifdef DEBUG_JOYSTICK SDL_Log("Setting init state %d\n", state); @@ -215,8 +214,7 @@ SetInitState(SDL_DriverXboxOne_Context *ctx, SDL_XboxOneInitState state) ctx->init_state = state; } -static void -SendAckIfNeeded(SDL_HIDAPI_Device *device, Uint8 *data, int size) +static void SendAckIfNeeded(SDL_HIDAPI_Device *device, const Uint8 *data, int size) { #if defined(__WIN32__) || defined(__WINGDK__) /* The Windows driver is taking care of acks */ @@ -236,7 +234,7 @@ SendAckIfNeeded(SDL_HIDAPI_Device *device, Uint8 *data, int size) #ifdef DEBUG_XBOX_PROTOCOL HIDAPI_DumpPacket("Xbox One sending ACK packet: size = %d", ack_packet, sizeof(ack_packet)); #endif - if (SDL_HIDAPI_LockRumble() < 0 || + if (SDL_HIDAPI_LockRumble() != 0 || SDL_HIDAPI_SendRumbleAndUnlock(device, ack_packet, sizeof(ack_packet)) != sizeof(ack_packet)) { SDL_SetError("Couldn't send ack packet"); } @@ -245,8 +243,7 @@ SendAckIfNeeded(SDL_HIDAPI_Device *device, Uint8 *data, int size) } #if 0 -static SDL_bool -SendSerialRequest(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) +static SDL_bool SendSerialRequest(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) { Uint8 serial_packet[] = { 0x1E, 0x30, 0x07, 0x01, 0x04 }; @@ -257,7 +254,7 @@ SendSerialRequest(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) * It will cancel the announce packet if sent before that, and will be * ignored if sent during the negotiation. */ - if (SDL_HIDAPI_LockRumble() < 0 || + if (SDL_HIDAPI_LockRumble() != 0 || SDL_HIDAPI_SendRumbleAndUnlock(device, serial_packet, sizeof(serial_packet)) != sizeof(serial_packet)) { SDL_SetError("Couldn't send serial packet"); return SDL_FALSE; @@ -266,8 +263,7 @@ SendSerialRequest(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) } #endif -static SDL_bool -ControllerNeedsNegotiation(SDL_DriverXboxOne_Context *ctx) +static SDL_bool ControllerNeedsNegotiation(SDL_DriverXboxOne_Context *ctx) { if (ctx->vendor_id == USB_VENDOR_PDP && ctx->product_id == 0x0246) { /* The PDP Rock Candy (PID 0x0246) doesn't send the announce packet on Linux for some reason */ @@ -276,14 +272,13 @@ ControllerNeedsNegotiation(SDL_DriverXboxOne_Context *ctx) return SDL_FALSE; } -static SDL_bool -SendControllerInit(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) +static SDL_bool SendControllerInit(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) { Uint16 vendor_id = ctx->vendor_id; Uint16 product_id = ctx->product_id; Uint8 init_packet[USB_PACKET_LENGTH]; - for ( ; ctx->init_packet < SDL_arraysize(xboxone_init_packets); ++ctx->init_packet) { + for (; ctx->init_packet < SDL_arraysize(xboxone_init_packets); ++ctx->init_packet) { const SDL_DriverXboxOne_InitPacket *packet = &xboxone_init_packets[ctx->init_packet]; if (packet->vendor_id && (vendor_id != packet->vendor_id)) { @@ -317,7 +312,7 @@ SendControllerInit(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) #endif ctx->send_time = SDL_GetTicks(); - if (SDL_HIDAPI_LockRumble() < 0 || + if (SDL_HIDAPI_LockRumble() != 0 || SDL_HIDAPI_SendRumbleAndUnlock(device, init_packet, packet->size) != packet->size) { SDL_SetError("Couldn't write Xbox One initialization packet"); return SDL_FALSE; @@ -339,31 +334,25 @@ SendControllerInit(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) return SDL_TRUE; } -static void -HIDAPI_DriverXboxOne_RegisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXboxOne_RegisterHints(SDL_HintCallback callback, void *userdata) { SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_AddHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, callback, userdata); } -static void -HIDAPI_DriverXboxOne_UnregisterHints(SDL_HintCallback callback, void *userdata) +static void HIDAPI_DriverXboxOne_UnregisterHints(SDL_HintCallback callback, void *userdata) { SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, callback, userdata); } -static SDL_bool -HIDAPI_DriverXboxOne_IsEnabled(void) +static SDL_bool HIDAPI_DriverXboxOne_IsEnabled(void) { return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, - SDL_HIDAPI_DEFAULT))); + SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_XBOX, SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT))); } -static SDL_bool -HIDAPI_DriverXboxOne_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_bool HIDAPI_DriverXboxOne_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { #ifdef __MACOSX__ /* Wired Xbox One controllers are handled by the 360Controller driver */ @@ -374,13 +363,12 @@ HIDAPI_DriverXboxOne_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *na return (type == SDL_CONTROLLER_TYPE_XBOXONE) ? SDL_TRUE : SDL_FALSE; } -static SDL_bool -HIDAPI_DriverXboxOne_InitDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXboxOne_InitDevice(SDL_HIDAPI_Device *device) { SDL_DriverXboxOne_Context *ctx; ctx = (SDL_DriverXboxOne_Context *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } @@ -414,22 +402,21 @@ HIDAPI_DriverXboxOne_InitDevice(SDL_HIDAPI_Device *device) return HIDAPI_JoystickConnected(device, NULL); } -static int -HIDAPI_DriverXboxOne_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) +static int HIDAPI_DriverXboxOne_GetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id) { return -1; } -static void -HIDAPI_DriverXboxOne_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) +static void HIDAPI_DriverXboxOne_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_JoystickID instance_id, int player_index) { } -static SDL_bool -HIDAPI_DriverXboxOne_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static SDL_bool HIDAPI_DriverXboxOne_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; + SDL_AssertJoysticksLocked(); + ctx->low_frequency_rumble = 0; ctx->high_frequency_rumble = 0; ctx->left_trigger_rumble = 0; @@ -458,15 +445,13 @@ HIDAPI_DriverXboxOne_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joyst return SDL_TRUE; } -static void -HIDAPI_DriverXboxOne_RumbleSent(void *userdata) +static void HIDAPI_DriverXboxOne_RumbleSent(void *userdata) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)userdata; ctx->rumble_time = SDL_GetTicks(); } -static int -HIDAPI_DriverXboxOne_UpdateRumble(SDL_HIDAPI_Device *device) +static int HIDAPI_DriverXboxOne_UpdateRumble(SDL_HIDAPI_Device *device) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; @@ -495,7 +480,7 @@ HIDAPI_DriverXboxOne_UpdateRumble(SDL_HIDAPI_Device *device) /* We're no longer pending, even if we fail to send the rumble below */ ctx->rumble_pending = SDL_FALSE; - if (SDL_HIDAPI_LockRumble() < 0) { + if (SDL_HIDAPI_LockRumble() != 0) { return -1; } @@ -528,8 +513,7 @@ HIDAPI_DriverXboxOne_UpdateRumble(SDL_HIDAPI_Device *device) return 0; } -static int -HIDAPI_DriverXboxOne_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int HIDAPI_DriverXboxOne_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; @@ -541,8 +525,7 @@ HIDAPI_DriverXboxOne_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joy return HIDAPI_DriverXboxOne_UpdateRumble(device); } -static int -HIDAPI_DriverXboxOne_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_DriverXboxOne_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; @@ -558,8 +541,7 @@ HIDAPI_DriverXboxOne_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joyst return HIDAPI_DriverXboxOne_UpdateRumble(device); } -static Uint32 -HIDAPI_DriverXboxOne_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static Uint32 HIDAPI_DriverXboxOne_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; Uint32 result = 0; @@ -576,8 +558,7 @@ HIDAPI_DriverXboxOne_GetJoystickCapabilities(SDL_HIDAPI_Device *device, SDL_Joys return result; } -static int -HIDAPI_DriverXboxOne_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_DriverXboxOne_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; @@ -598,23 +579,92 @@ HIDAPI_DriverXboxOne_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joy } } -static int -HIDAPI_DriverXboxOne_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_DriverXboxOne_SendJoystickEffect(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -HIDAPI_DriverXboxOne_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_DriverXboxOne_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +/* + * The Xbox One Elite controller with 5.13+ firmware sends the unmapped state in a separate packet. + * We can use this to send the paddle state when they aren't mapped + */ +static void HIDAPI_DriverXboxOne_HandleUnmappedStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +{ + Uint8 profile; + int paddle_index; + int button1_bit; + int button2_bit; + int button3_bit; + int button4_bit; + SDL_bool paddles_mapped; + + if (size == 21) { + /* XBox One Elite Series 2 */ + paddle_index = 18; + button1_bit = 0x01; + button2_bit = 0x02; + button3_bit = 0x04; + button4_bit = 0x08; + profile = data[19]; + + if (profile == 0) { + paddles_mapped = SDL_FALSE; + } else if (SDL_memcmp(&data[4], &ctx->last_state[4], 14) == 0) { + /* We're using a profile, but paddles aren't mapped */ + paddles_mapped = SDL_FALSE; + } else { + /* Something is mapped, we can't use the paddles */ + paddles_mapped = SDL_TRUE; + } + + } else { + /* Unknown format */ + return; + } +#ifdef DEBUG_XBOX_PROTOCOL + SDL_Log(">>> Paddles: %d,%d,%d,%d mapped = %s\n", + (data[paddle_index] & button1_bit) ? 1 : 0, + (data[paddle_index] & button2_bit) ? 1 : 0, + (data[paddle_index] & button3_bit) ? 1 : 0, + (data[paddle_index] & button4_bit) ? 1 : 0, + paddles_mapped ? "TRUE" : "FALSE"); +#endif + + if (paddles_mapped) { + /* Respect that the paddles are being used for other controls and don't pass them on to the app */ + data[paddle_index] = 0; + } + + if (ctx->last_paddle_state != data[paddle_index]) { + int nButton = SDL_CONTROLLER_BUTTON_MISC1 + ctx->has_share_button; /* Next available button */ + SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button1_bit) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button2_bit) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button3_bit) ? SDL_PRESSED : SDL_RELEASED); + SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button4_bit) ? SDL_PRESSED : SDL_RELEASED); + ctx->last_paddle_state = data[paddle_index]; + } + ctx->has_unmapped_state = SDL_TRUE; +} + +static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) { Sint16 axis; + /* Some controllers have larger packets over NDIS, but the real size is in data[3] */ + size = SDL_min(4 + data[3], size); + + /* Enable paddles on the Xbox Elite controller when connected over USB */ + if (ctx->has_paddles && !ctx->has_unmapped_state && size == 50) { + Uint8 packet[] = { 0x4d, 0x00, 0x00, 0x02, 0x07, 0x00 }; + + SDL_HIDAPI_SendRumble(ctx->device, packet, sizeof(packet)); + } + if (ctx->last_state[4] != data[4]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_START, (data[4] & 0x04) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_BACK, (data[4] & 0x08) ? SDL_PRESSED : SDL_RELEASED); @@ -646,6 +696,7 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne * Xbox Series X firmware version 5.1, report is 44 bytes, share button is in byte 18 * Xbox Series X firmware version 5.5, report is 48 bytes, share button is in byte 22 * Victrix Gambit Tournament Controller, report is 50 bytes, share button is in byte 32 + * ThrustMaster eSwap PRO Controller Xbox, report is 64 bytes, share button is in byte 46 */ if (size < 48) { if (ctx->last_state[18] != data[18]) { @@ -659,6 +710,10 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne if (ctx->last_state[32] != data[32]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[32] & 0x01) ? SDL_PRESSED : SDL_RELEASED); } + } else if (size == 64) { + if (ctx->last_state[46] != data[46]) { + SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[46] & 0x01) ? SDL_PRESSED : SDL_RELEASED); + } } } @@ -676,7 +731,7 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne P3: 0x04 (A) P1: 0x01 (B) P4: 0x08 (X) P2: 0x02 (Y) */ - if (ctx->has_paddles && (size == 33 || size == 38 || size == 50)) { + if (ctx->has_paddles && !ctx->has_unmapped_state && (size == 33 || size == 38 || size == 50)) { int paddle_index; int button1_bit; int button2_bit; @@ -704,7 +759,7 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne button4_bit = 0x08; paddles_mapped = (data[19] != 0); - } else /* if (size == 50) */{ + } else /* if (size == 50) */ { /* XBox One Elite Series 2 */ paddle_index = 22; button1_bit = 0x01; @@ -715,12 +770,11 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne } #ifdef DEBUG_XBOX_PROTOCOL SDL_Log(">>> Paddles: %d,%d,%d,%d mapped = %s\n", - (data[paddle_index] & button1_bit) ? 1 : 0, - (data[paddle_index] & button2_bit) ? 1 : 0, - (data[paddle_index] & button3_bit) ? 1 : 0, - (data[paddle_index] & button4_bit) ? 1 : 0, - paddles_mapped ? "TRUE" : "FALSE" - ); + (data[paddle_index] & button1_bit) ? 1 : 0, + (data[paddle_index] & button2_bit) ? 1 : 0, + (data[paddle_index] & button3_bit) ? 1 : 0, + (data[paddle_index] & button4_bit) ? 1 : 0, + paddles_mapped ? "TRUE" : "FALSE"); #endif if (paddles_mapped) { @@ -728,26 +782,27 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne data[paddle_index] = 0; } - if (ctx->last_state[paddle_index] != data[paddle_index]) { + if (ctx->last_paddle_state != data[paddle_index]) { int nButton = SDL_CONTROLLER_BUTTON_MISC1 + ctx->has_share_button; /* Next available button */ SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button1_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button2_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button3_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button4_bit) ? SDL_PRESSED : SDL_RELEASED); + ctx->last_paddle_state = data[paddle_index]; } } - axis = ((int)SDL_SwapLE16(*(Sint16*)(&data[6])) * 64) - 32768; + axis = ((int)SDL_SwapLE16(*(Sint16 *)(&data[6])) * 64) - 32768; if (axis == 32704) { axis = 32767; } - if (axis == -32768 && size == 30 && (data[22] & 0x80) != 0) { + if (axis == -32768 && size == 30 && (data[22] & 0x80)) { axis = 32767; } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); - axis = ((int)SDL_SwapLE16(*(Sint16*)(&data[8])) * 64) - 32768; - if (axis == -32768 && size == 30 && (data[22] & 0x40) != 0) { + axis = ((int)SDL_SwapLE16(*(Sint16 *)(&data[8])) * 64) - 32768; + if (axis == -32768 && size == 30 && (data[22] & 0x40)) { axis = 32767; } if (axis == 32704) { @@ -755,28 +810,29 @@ HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[10])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[10])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[12])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[12])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, ~axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[14])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[14])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, axis); - axis = SDL_SwapLE16(*(Sint16*)(&data[16])); + axis = SDL_SwapLE16(*(Sint16 *)(&data[16])); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, ~axis); SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); + + /* We don't have the unmapped state for this packet */ + ctx->has_unmapped_state = SDL_FALSE; } -static void -HIDAPI_DriverXboxOne_HandleStatusPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOne_HandleStatusPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) { if (ctx->init_state < XBOX_ONE_INIT_STATE_COMPLETE) { SetInitState(ctx, XBOX_ONE_INIT_STATE_COMPLETE); } } -static void -HIDAPI_DriverXboxOne_HandleModePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOne_HandleModePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, const Uint8 *data, int size) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data[4] & 0x01) ? SDL_PRESSED : SDL_RELEASED); } @@ -784,8 +840,7 @@ HIDAPI_DriverXboxOne_HandleModePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_ /* * Xbox One S with firmware 3.1.1221 uses a 16 byte packet and the GUIDE button in a separate packet */ -static void -HIDAPI_DriverXboxOneBluetooth_HandleButtons16(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOneBluetooth_HandleButtons16(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, const Uint8 *data, int size) { if (ctx->last_state[14] != data[14]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A, (data[14] & 0x01) ? SDL_PRESSED : SDL_RELEASED); @@ -802,7 +857,6 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons16(SDL_Joystick *joystick, SDL_Driver SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_LEFTSTICK, (data[15] & 0x01) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSTICK, (data[15] & 0x02) ? SDL_PRESSED : SDL_RELEASED); } - } /* @@ -813,8 +867,7 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons16(SDL_Joystick *joystick, SDL_Driver * Xbox One Elite Series 2 with firmware 5.11.3112 uses a 19 byte packet with BACK and GUIDE buttons in byte 15 * Xbox Series X with firmware 5.5.2641 uses a 17 byte packet with BACK and GUIDE buttons in byte 15, and SHARE button in byte 17 */ -static void -HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) { if (ctx->last_state[14] != data[14]) { SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A, (data[14] & 0x01) ? SDL_PRESSED : SDL_RELEASED); @@ -846,7 +899,7 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXb P3: 0x04 (A) P1: 0x01 (B) P4: 0x08 (X) P2: 0x02 (Y) */ - if (ctx->has_paddles && (size == 39 || size == 55)) { + if (ctx->has_paddles && (size == 20 || size == 39 || size == 55)) { int paddle_index; int button1_bit; int button2_bit; @@ -862,7 +915,7 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXb button3_bit = 0x04; button4_bit = 0x08; paddles_mapped = (data[35] != 0); - } else /* if (size == 39) */ { + } else if (size == 39) { /* Updated firmware for the Xbox Elite Series 2 controller */ paddle_index = 17; button1_bit = 0x01; @@ -870,16 +923,23 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXb button3_bit = 0x04; button4_bit = 0x08; paddles_mapped = (data[19] != 0); + } else /* if (size == 20) */ { + /* Updated firmware for the Xbox Elite Series 2 controller (5.13+) */ + paddle_index = 19; + button1_bit = 0x01; + button2_bit = 0x02; + button3_bit = 0x04; + button4_bit = 0x08; + paddles_mapped = (data[17] != 0); } #ifdef DEBUG_XBOX_PROTOCOL SDL_Log(">>> Paddles: %d,%d,%d,%d mapped = %s\n", - (data[paddle_index] & button1_bit) ? 1 : 0, - (data[paddle_index] & button2_bit) ? 1 : 0, - (data[paddle_index] & button3_bit) ? 1 : 0, - (data[paddle_index] & button4_bit) ? 1 : 0, - paddles_mapped ? "TRUE" : "FALSE" - ); + (data[paddle_index] & button1_bit) ? 1 : 0, + (data[paddle_index] & button2_bit) ? 1 : 0, + (data[paddle_index] & button3_bit) ? 1 : 0, + (data[paddle_index] & button4_bit) ? 1 : 0, + paddles_mapped ? "TRUE" : "FALSE"); #endif if (paddles_mapped) { @@ -887,18 +947,18 @@ HIDAPI_DriverXboxOneBluetooth_HandleButtons(SDL_Joystick *joystick, SDL_DriverXb data[paddle_index] = 0; } - if (ctx->last_state[paddle_index] != data[paddle_index]) { + if (ctx->last_paddle_state != data[paddle_index]) { int nButton = SDL_CONTROLLER_BUTTON_MISC1; /* Next available button */ SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button1_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button2_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button3_bit) ? SDL_PRESSED : SDL_RELEASED); SDL_PrivateJoystickButton(joystick, nButton++, (data[paddle_index] & button4_bit) ? SDL_PRESSED : SDL_RELEASED); + ctx->last_paddle_state = data[paddle_index]; } } } -static void -HIDAPI_DriverXboxOneBluetooth_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOneBluetooth_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) { Sint16 axis; @@ -958,39 +1018,37 @@ HIDAPI_DriverXboxOneBluetooth_HandleStatePacket(SDL_Joystick *joystick, SDL_Driv SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_DPAD_LEFT, dpad_left); } - axis = ((int)SDL_SwapLE16(*(Sint16*)(&data[9])) * 64) - 32768; + axis = ((int)SDL_SwapLE16(*(Sint16 *)(&data[9])) * 64) - 32768; if (axis == 32704) { axis = 32767; } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); - axis = ((int)SDL_SwapLE16(*(Sint16*)(&data[11])) * 64) - 32768; + axis = ((int)SDL_SwapLE16(*(Sint16 *)(&data[11])) * 64) - 32768; if (axis == 32704) { axis = 32767; } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); - axis = (int)SDL_SwapLE16(*(Uint16*)(&data[1])) - 0x8000; + axis = (int)SDL_SwapLE16(*(Uint16 *)(&data[1])) - 0x8000; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); - axis = (int)SDL_SwapLE16(*(Uint16*)(&data[3])) - 0x8000; + axis = (int)SDL_SwapLE16(*(Uint16 *)(&data[3])) - 0x8000; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, axis); - axis = (int)SDL_SwapLE16(*(Uint16*)(&data[5])) - 0x8000; + axis = (int)SDL_SwapLE16(*(Uint16 *)(&data[5])) - 0x8000; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, axis); - axis = (int)SDL_SwapLE16(*(Uint16*)(&data[7])) - 0x8000; + axis = (int)SDL_SwapLE16(*(Uint16 *)(&data[7])) - 0x8000; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state))); } -static void -HIDAPI_DriverXboxOneBluetooth_HandleGuidePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOneBluetooth_HandleGuidePacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, const Uint8 *data, int size) { ctx->has_guide_packet = SDL_TRUE; SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_GUIDE, (data[1] & 0x01) ? SDL_PRESSED : SDL_RELEASED); } -static void -HIDAPI_DriverXboxOneBluetooth_HandleBatteryPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOneBluetooth_HandleBatteryPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, const Uint8 *data, int size) { Uint8 flags = data[1]; SDL_bool on_usb = (((flags & 0x0C) >> 2) == 0); @@ -1014,14 +1072,13 @@ HIDAPI_DriverXboxOneBluetooth_HandleBatteryPacket(SDL_Joystick *joystick, SDL_Dr } #ifdef SET_SERIAL_AFTER_OPEN -static void -HIDAPI_DriverXboxOne_HandleSerialIDPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) +static void HIDAPI_DriverXboxOne_HandleSerialIDPacket(SDL_Joystick *joystick, SDL_DriverXboxOne_Context *ctx, Uint8 *data, int size) { - char serial[ 29 ]; + char serial[29]; int i; for (i = 0; i < 14; ++i) { - SDL_uitoa( data[6 + i], &serial[i * 2], 16 ); + SDL_uitoa(data[6 + i], &serial[i * 2], 16); } serial[i * 2] = '\0'; @@ -1034,12 +1091,10 @@ HIDAPI_DriverXboxOne_HandleSerialIDPacket(SDL_Joystick *joystick, SDL_DriverXbox } #endif /* SET_SERIAL_AFTER_OPEN */ -static SDL_bool -HIDAPI_DriverXboxOne_UpdateInitState(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) +static SDL_bool HIDAPI_DriverXboxOne_UpdateInitState(SDL_HIDAPI_Device *device, SDL_DriverXboxOne_Context *ctx) { SDL_XboxOneInitState prev_state; - do - { + do { prev_state = ctx->init_state; switch (ctx->init_state) { @@ -1084,8 +1139,7 @@ HIDAPI_DriverXboxOne_UpdateInitState(SDL_HIDAPI_Device *device, SDL_DriverXboxOn return SDL_TRUE; } -static SDL_bool -HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; SDL_Joystick *joystick = NULL; @@ -1105,7 +1159,7 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) if (ctx->bluetooth) { switch (data[0]) { case 0x01: - if (!joystick) { + if (joystick == NULL) { break; } if (size >= 16) { @@ -1117,13 +1171,13 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) } break; case 0x02: - if (!joystick) { + if (joystick == NULL) { break; } HIDAPI_DriverXboxOneBluetooth_HandleGuidePacket(joystick, ctx, data, size); break; case 0x04: - if (!joystick) { + if (joystick == NULL) { break; } HIDAPI_DriverXboxOneBluetooth_HandleBatteryPacket(joystick, ctx, data, size); @@ -1171,7 +1225,7 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) break; case 0x03: /* Controller status update */ - if (!joystick) { + if (joystick == NULL) { /* We actually want to handle this packet any time it arrives */ /*break;*/ } @@ -1184,11 +1238,17 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) /* Unknown chatty controller information, sent by both sides */ break; case 0x07: - if (!joystick) { + if (joystick == NULL) { break; } HIDAPI_DriverXboxOne_HandleModePacket(joystick, ctx, data, size); break; + case 0x0C: + if (joystick == NULL) { + break; + } + HIDAPI_DriverXboxOne_HandleUnmappedStatePacket(joystick, ctx, data, size); + break; case 0x1E: /* If the packet starts with this: 0x1E 0x30 0x07 0x10 0x04 0x00 @@ -1199,7 +1259,7 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) The controller sends that in response to this request: 0x1E 0x30 0x07 0x01 0x04 */ - if (!joystick) { + if (joystick == NULL) { break; } #ifdef SET_SERIAL_AFTER_OPEN @@ -1218,7 +1278,7 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) #endif break; } - if (!joystick) { + if (joystick == NULL) { break; } HIDAPI_DriverXboxOne_HandleStatePacket(joystick, ctx, data, size); @@ -1253,11 +1313,10 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) /* Read error, device is disconnected */ HIDAPI_JoystickDisconnected(device, device->joysticks[0]); } - return (size >= 0); + return size >= 0; } -static void -HIDAPI_DriverXboxOne_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) +static void HIDAPI_DriverXboxOne_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; @@ -1265,13 +1324,11 @@ HIDAPI_DriverXboxOne_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys SDL_HomeLEDHintChanged, ctx); } -static void -HIDAPI_DriverXboxOne_FreeDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DriverXboxOne_FreeDevice(SDL_HIDAPI_Device *device) { } -SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXboxOne = -{ +SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXboxOne = { SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, SDL_TRUE, HIDAPI_DriverXboxOne_RegisterHints, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c b/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c index fdff880..c0e5cd5 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c @@ -91,35 +91,112 @@ static int SDL_HIDAPI_numdrivers = 0; static SDL_SpinLock SDL_HIDAPI_spinlock; static SDL_bool SDL_HIDAPI_hints_changed = SDL_FALSE; static Uint32 SDL_HIDAPI_change_count = 0; -static SDL_HIDAPI_Device *SDL_HIDAPI_devices; +static SDL_HIDAPI_Device *SDL_HIDAPI_devices SDL_GUARDED_BY(SDL_joystick_lock); +static char SDL_HIDAPI_device_magic; static int SDL_HIDAPI_numjoysticks = 0; static SDL_bool SDL_HIDAPI_combine_joycons = SDL_TRUE; static SDL_bool initialized = SDL_FALSE; static SDL_bool shutting_down = SDL_FALSE; -void -HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size) +static char *HIDAPI_ConvertString(const wchar_t *wide_string) +{ + char *string = NULL; + + if (wide_string) { + string = SDL_iconv_string("UTF-8", "WCHAR_T", (char *)wide_string, (SDL_wcslen(wide_string) + 1) * sizeof(wchar_t)); + if (string == NULL) { + switch (sizeof(wchar_t)) { + case 2: + string = SDL_iconv_string("UTF-8", "UCS-2-INTERNAL", (char *)wide_string, (SDL_wcslen(wide_string) + 1) * sizeof(wchar_t)); + break; + case 4: + string = SDL_iconv_string("UTF-8", "UCS-4-INTERNAL", (char *)wide_string, (SDL_wcslen(wide_string) + 1) * sizeof(wchar_t)); + break; + } + } + } + return string; +} + +void HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size) { int i; char *buffer; - size_t length = SDL_strlen(prefix) + 11*(USB_PACKET_LENGTH/8) + (5*USB_PACKET_LENGTH*2) + 1 + 1; + size_t length = SDL_strlen(prefix) + 11 * (USB_PACKET_LENGTH / 8) + (5 * USB_PACKET_LENGTH * 2) + 1 + 1; int start = 0, amount = size; + size_t current_len; buffer = (char *)SDL_malloc(length); - SDL_snprintf(buffer, length, prefix, size); - for (i = start; i < start+amount; ++i) { + current_len = SDL_snprintf(buffer, length, prefix, size); + for (i = start; i < start + amount; ++i) { if ((i % 8) == 0) { - SDL_snprintf(&buffer[SDL_strlen(buffer)], length - SDL_strlen(buffer), "\n%.2d: ", i); + current_len += SDL_snprintf(&buffer[current_len], length - current_len, "\n%.2d: ", i); } - SDL_snprintf(&buffer[SDL_strlen(buffer)], length - SDL_strlen(buffer), " 0x%.2x", data[i]); + current_len += SDL_snprintf(&buffer[current_len], length - current_len, " 0x%.2x", data[i]); } SDL_strlcat(buffer, "\n", length); SDL_Log("%s", buffer); SDL_free(buffer); } -float -HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float output_max) +SDL_bool HIDAPI_SupportsPlaystationDetection(Uint16 vendor, Uint16 product) +{ + /* If we already know the controller is a different type, don't try to detect it. + * This fixes a hang with the HORIPAD for Nintendo Switch (0x0f0d/0x00c1) + */ + if (SDL_GetJoystickGameControllerTypeFromVIDPID(vendor, product, NULL, SDL_FALSE) != SDL_CONTROLLER_TYPE_UNKNOWN) { + return SDL_FALSE; + } + + switch (vendor) { + case USB_VENDOR_DRAGONRISE: + return SDL_TRUE; + case USB_VENDOR_HORI: + return SDL_TRUE; + case USB_VENDOR_LOGITECH: + /* Most Logitech devices are fine with this, but the F310 will lock up */ + if (product == USB_PRODUCT_LOGITECH_F310) { + return SDL_FALSE; + } + return SDL_TRUE; + case USB_VENDOR_MADCATZ: + return SDL_TRUE; + case USB_VENDOR_NACON: + return SDL_TRUE; + case USB_VENDOR_PDP: + return SDL_TRUE; + case USB_VENDOR_POWERA: + return SDL_TRUE; + case USB_VENDOR_POWERA_ALT: + return SDL_TRUE; + case USB_VENDOR_QANBA: + return SDL_TRUE; + case USB_VENDOR_RAZER: + /* Most Razer devices are not game controllers, and some of them lock up + * or reset when we send them the Sony third-party query feature report, + * so don't include that vendor here. Instead add devices as appropriate + * to controller_type.c + * + * Reference: https://github.com/libsdl-org/SDL/issues/6733 + * https://github.com/libsdl-org/SDL/issues/6799 + */ + return SDL_FALSE; + case USB_VENDOR_SHANWAN: + return SDL_TRUE; + case USB_VENDOR_SHANWAN_ALT: + return SDL_TRUE; + case USB_VENDOR_THRUSTMASTER: + return SDL_TRUE; + case USB_VENDOR_ZEROPLUS: + return SDL_TRUE; + case 0x7545 /* SZ-MYPOWER */: + return SDL_TRUE; + default: + return SDL_FALSE; + } +} + +float HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float output_max) { return output_min + (output_max - output_min) * (val - val_min) / (val_max - val_min); } @@ -127,12 +204,11 @@ HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float static void HIDAPI_UpdateDeviceList(void); static void HIDAPI_JoystickClose(SDL_Joystick *joystick); -static SDL_GameControllerType -SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 product, int interface_number, int interface_class, int interface_subclass, int interface_protocol) +static SDL_GameControllerType SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 product, int interface_number, int interface_class, int interface_subclass, int interface_protocol) { static const int LIBUSB_CLASS_VENDOR_SPEC = 0xFF; static const int XB360_IFACE_SUBCLASS = 93; - static const int XB360_IFACE_PROTOCOL = 1; /* Wired */ + static const int XB360_IFACE_PROTOCOL = 1; /* Wired */ static const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */ static const int XBONE_IFACE_SUBCLASS = 71; static const int XBONE_IFACE_PROTOCOL = 208; @@ -170,6 +246,8 @@ SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 pr 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ 0x2c22, /* Qanba */ + 0x2dc8, /* 8BitDo */ + 0x9886, /* ASTRO Gaming */ }; int i; @@ -187,10 +265,12 @@ SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 pr interface_protocol == XBONE_IFACE_PROTOCOL) { static const int SUPPORTED_VENDORS[] = { + 0x044f, /* Thrustmaster */ 0x045e, /* Microsoft */ 0x0738, /* Mad Catz */ 0x0e6f, /* PDP */ 0x0f0d, /* Hori */ + 0x10f5, /* Turtle Beach */ 0x1532, /* Razer */ 0x20d6, /* PowerA */ 0x24c6, /* PowerA */ @@ -213,8 +293,7 @@ SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 pr return type; } -static SDL_bool -HIDAPI_IsDeviceSupported(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) +static SDL_bool HIDAPI_IsDeviceSupported(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) { int i; SDL_GameControllerType type = SDL_GetJoystickGameControllerProtocol(name, vendor_id, product_id, -1, 0, 0, 0); @@ -228,8 +307,7 @@ HIDAPI_IsDeviceSupported(Uint16 vendor_id, Uint16 product_id, Uint16 version, co return SDL_FALSE; } -static SDL_HIDAPI_DeviceDriver * -HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device) +static SDL_HIDAPI_DeviceDriver *HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device) { const Uint16 USAGE_PAGE_GENERIC_DESKTOP = 0x0001; const Uint16 USAGE_JOYSTICK = 0x0004; @@ -263,11 +341,12 @@ HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device) return NULL; } -static SDL_HIDAPI_Device * -HIDAPI_GetDeviceByIndex(int device_index, SDL_JoystickID *pJoystickID) +static SDL_HIDAPI_Device *HIDAPI_GetDeviceByIndex(int device_index, SDL_JoystickID *pJoystickID) { SDL_HIDAPI_Device *device; + SDL_AssertJoysticksLocked(); + for (device = SDL_HIDAPI_devices; device; device = device->next) { if (device->parent) { continue; @@ -285,11 +364,12 @@ HIDAPI_GetDeviceByIndex(int device_index, SDL_JoystickID *pJoystickID) return NULL; } -static SDL_HIDAPI_Device * -HIDAPI_GetJoystickByInfo(const char *path, Uint16 vendor_id, Uint16 product_id) +static SDL_HIDAPI_Device *HIDAPI_GetJoystickByInfo(const char *path, Uint16 vendor_id, Uint16 product_id) { SDL_HIDAPI_Device *device; + SDL_AssertJoysticksLocked(); + for (device = SDL_HIDAPI_devices; device; device = device->next) { if (device->vendor_id == vendor_id && device->product_id == product_id && SDL_strcmp(device->path, path) == 0) { @@ -299,8 +379,7 @@ HIDAPI_GetJoystickByInfo(const char *path, Uint16 vendor_id, Uint16 product_id) return device; } -static void -HIDAPI_CleanupDeviceDriver(SDL_HIDAPI_Device *device) +static void HIDAPI_CleanupDeviceDriver(SDL_HIDAPI_Device *device) { if (!device->driver) { return; /* Already cleaned up */ @@ -329,8 +408,7 @@ HIDAPI_CleanupDeviceDriver(SDL_HIDAPI_Device *device) SDL_UnlockMutex(device->dev_lock); } -static void -HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device, SDL_bool *removed) +static void HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device, SDL_bool *removed) SDL_NO_THREAD_SAFETY_ANALYSIS /* We unlock the joystick lock to be able to open the HID device on Android */ { *removed = SDL_FALSE; @@ -362,47 +440,64 @@ HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device, SDL_bool *removed) if (HIDAPI_GetDeviceDriver(device)) { /* We might have a device driver for this device, try opening it and see */ if (device->num_children == 0) { + SDL_hid_device *dev; + + /* Wait a little bit for the device to initialize */ + SDL_Delay(10); + +#ifdef __ANDROID__ /* On Android we need to leave joysticks unlocked because it calls * out to the main thread for permissions and the main thread can * be in the process of handling controller input. * * See https://github.com/libsdl-org/SDL/issues/6347 for details */ - int lock_count = 0; - SDL_HIDAPI_Device *curr; - SDL_hid_device *dev; - char *path = SDL_strdup(device->path); - - /* Wait a little bit for the device to initialize */ - SDL_Delay(10); - - SDL_AssertJoysticksLocked(); - while (SDL_JoysticksLocked()) { - ++lock_count; - SDL_UnlockJoysticks(); - } + { + SDL_HIDAPI_Device *curr; + int lock_count = 0; + char *path = SDL_strdup(device->path); + + SDL_AssertJoysticksLocked(); + while (SDL_JoysticksLocked()) { + ++lock_count; + SDL_UnlockJoysticks(); + } - dev = SDL_hid_open_path(path, 0); + dev = SDL_hid_open_path(path, 0); - while (lock_count > 0) { - --lock_count; - SDL_LockJoysticks(); - } - SDL_free(path); + while (lock_count > 0) { + --lock_count; + SDL_LockJoysticks(); + } + SDL_free(path); - /* Make sure the device didn't get removed while opening the HID path */ - for (curr = SDL_HIDAPI_devices; curr && curr != device; curr = curr->next) { - continue; - } - if (!curr) { - *removed = SDL_TRUE; - if (dev) { - SDL_hid_close(dev); + /* Make sure the device didn't get removed while opening the HID path */ + for (curr = SDL_HIDAPI_devices; curr && curr != device; curr = curr->next) { + continue; + } + if (curr == NULL) { + *removed = SDL_TRUE; + if (dev) { + SDL_hid_close(dev); + } + return; } - return; } +#else + /* On other platforms we want to keep the lock so other threads wait for + * us to finish opening the controller before checking to see whether the + * HIDAPI driver is handling the device. + * + * On Windows, for example, the main thread can be enumerating DirectInput + * devices while the Windows.Gaming.Input thread is calling back with a new + * controller available. + * + * See https://github.com/libsdl-org/SDL/issues/7304 for details. + */ + dev = SDL_hid_open_path(device->path, 0); +#endif - if (!dev) { + if (dev == NULL) { SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "HIDAPI_SetupDeviceDriver() couldn't open %s: %s\n", device->path, SDL_GetError()); @@ -428,13 +523,14 @@ HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device, SDL_bool *removed) } } -static void -SDL_HIDAPI_UpdateDrivers(void) +static void SDL_HIDAPI_UpdateDrivers(void) { int i; SDL_HIDAPI_Device *device; SDL_bool removed; + SDL_AssertJoysticksLocked(); + SDL_HIDAPI_numdrivers = 0; for (i = 0; i < SDL_arraysize(SDL_HIDAPI_drivers); ++i) { SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i]; @@ -455,8 +551,7 @@ SDL_HIDAPI_UpdateDrivers(void) } while (removed); } -static void SDLCALL -SDL_HIDAPIDriverHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_HIDAPIDriverHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { if (SDL_strcmp(name, SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS) == 0) { SDL_HIDAPI_combine_joycons = SDL_GetStringBoolean(hint, SDL_TRUE); @@ -465,8 +560,7 @@ SDL_HIDAPIDriverHintChanged(void *userdata, const char *name, const char *oldVal SDL_HIDAPI_change_count = 0; } -static int -HIDAPI_JoystickInit(void) +static int HIDAPI_JoystickInit(void) { int i; @@ -514,11 +608,10 @@ HIDAPI_JoystickInit(void) return 0; } -static SDL_bool -HIDAPI_AddJoystickInstanceToDevice(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) +static SDL_bool HIDAPI_AddJoystickInstanceToDevice(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) { - SDL_JoystickID *joysticks = (SDL_JoystickID *)SDL_realloc(device->joysticks, (device->num_joysticks + 1)*sizeof(*device->joysticks)); - if (!joysticks) { + SDL_JoystickID *joysticks = (SDL_JoystickID *)SDL_realloc(device->joysticks, (device->num_joysticks + 1) * sizeof(*device->joysticks)); + if (joysticks == NULL) { return SDL_FALSE; } @@ -527,15 +620,14 @@ HIDAPI_AddJoystickInstanceToDevice(SDL_HIDAPI_Device *device, SDL_JoystickID joy return SDL_TRUE; } -static SDL_bool -HIDAPI_DelJoystickInstanceFromDevice(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) +static SDL_bool HIDAPI_DelJoystickInstanceFromDevice(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) { int i, size; for (i = 0; i < device->num_joysticks; ++i) { if (device->joysticks[i] == joystickID) { size = (device->num_joysticks - i - 1) * sizeof(SDL_JoystickID); - SDL_memmove(&device->joysticks[i], &device->joysticks[i+1], size); + SDL_memmove(&device->joysticks[i], &device->joysticks[i + 1], size); --device->num_joysticks; if (device->num_joysticks == 0) { SDL_free(device->joysticks); @@ -547,8 +639,7 @@ HIDAPI_DelJoystickInstanceFromDevice(SDL_HIDAPI_Device *device, SDL_JoystickID j return SDL_FALSE; } -static SDL_bool -HIDAPI_JoystickInstanceIsUnique(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) +static SDL_bool HIDAPI_JoystickInstanceIsUnique(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) { if (device->parent && device->num_joysticks == 1 && device->parent->num_joysticks == 1 && device->joysticks[0] == device->parent->joysticks[0]) { @@ -557,8 +648,7 @@ HIDAPI_JoystickInstanceIsUnique(SDL_HIDAPI_Device *device, SDL_JoystickID joysti return SDL_TRUE; } -void -HIDAPI_SetDeviceName(SDL_HIDAPI_Device *device, const char *name) +void HIDAPI_SetDeviceName(SDL_HIDAPI_Device *device, const char *name) { if (name && *name && SDL_strcmp(name, device->name) != 0) { SDL_free(device->name); @@ -567,28 +657,81 @@ HIDAPI_SetDeviceName(SDL_HIDAPI_Device *device, const char *name) } } -void -HIDAPI_SetDeviceProduct(SDL_HIDAPI_Device *device, Uint16 product_id) +void HIDAPI_SetDeviceProduct(SDL_HIDAPI_Device *device, Uint16 vendor_id, Uint16 product_id) { /* Don't set the device product ID directly, or we'll constantly re-enumerate this device */ - SDL_SetJoystickGUIDProduct(&device->guid, product_id); + device->guid = SDL_CreateJoystickGUID(device->guid.data[0], vendor_id, product_id, device->version, device->name, 'h', 0); +} + +static void HIDAPI_UpdateJoystickSerial(SDL_HIDAPI_Device *device) +{ + int i; + + for (i = 0; i < device->num_joysticks; ++i) { + SDL_Joystick *joystick = SDL_JoystickFromInstanceID(device->joysticks[i]); + if (joystick && device->serial) { + SDL_free(joystick->serial); + joystick->serial = SDL_strdup(device->serial); + } + } +} + +static SDL_bool HIDAPI_SerialIsEmpty(SDL_HIDAPI_Device *device) +{ + SDL_bool all_zeroes = SDL_TRUE; + + if (device->serial) { + const char *serial = device->serial; + for (serial = device->serial; *serial; ++serial) { + if (*serial != '0') { + all_zeroes = SDL_FALSE; + break; + } + } + } + return all_zeroes; } -void -HIDAPI_SetDeviceSerial(SDL_HIDAPI_Device *device, const char *serial) +void HIDAPI_SetDeviceSerial(SDL_HIDAPI_Device *device, const char *serial) { if (serial && *serial && (!device->serial || SDL_strcmp(serial, device->serial) != 0)) { SDL_free(device->serial); device->serial = SDL_strdup(serial); + HIDAPI_UpdateJoystickSerial(device); + } +} + +static int wcstrcmp(const wchar_t *str1, const char *str2) +{ + int result; + + while (1) { + result = (*str1 - *str2); + if (result != 0 || *str1 == 0) { + break; + } + ++str1; + ++str2; + } + return result; +} + +static void HIDAPI_SetDeviceSerialW(SDL_HIDAPI_Device *device, const wchar_t *serial) +{ + if (serial && *serial && (!device->serial || wcstrcmp(serial, device->serial) != 0)) { + SDL_free(device->serial); + device->serial = HIDAPI_ConvertString(serial); + HIDAPI_UpdateJoystickSerial(device); } } -SDL_bool -HIDAPI_HasConnectedUSBDevice(const char *serial) +SDL_bool HIDAPI_HasConnectedUSBDevice(const char *serial) { SDL_HIDAPI_Device *device; - if (!serial) { + SDL_AssertJoysticksLocked(); + + if (serial == NULL) { return SDL_FALSE; } @@ -608,12 +751,13 @@ HIDAPI_HasConnectedUSBDevice(const char *serial) return SDL_FALSE; } -void -HIDAPI_DisconnectBluetoothDevice(const char *serial) +void HIDAPI_DisconnectBluetoothDevice(const char *serial) { SDL_HIDAPI_Device *device; - if (!serial) { + SDL_AssertJoysticksLocked(); + + if (serial == NULL) { return; } @@ -634,15 +778,16 @@ HIDAPI_DisconnectBluetoothDevice(const char *serial) } } -SDL_bool -HIDAPI_JoystickConnected(SDL_HIDAPI_Device *device, SDL_JoystickID *pJoystickID) +SDL_bool HIDAPI_JoystickConnected(SDL_HIDAPI_Device *device, SDL_JoystickID *pJoystickID) { int i, j; SDL_JoystickID joystickID; + SDL_AssertJoysticksLocked(); + for (i = 0; i < device->num_children; ++i) { SDL_HIDAPI_Device *child = device->children[i]; - for (j = child->num_joysticks; j--; ) { + for (j = child->num_joysticks; j--;) { HIDAPI_JoystickDisconnected(child, child->joysticks[j]); } } @@ -665,11 +810,10 @@ HIDAPI_JoystickConnected(SDL_HIDAPI_Device *device, SDL_JoystickID *pJoystickID) return SDL_TRUE; } -void -HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) +void HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID) { int i, j; - + SDL_LockJoysticks(); if (!HIDAPI_JoystickInstanceIsUnique(device, joystickID)) { @@ -705,48 +849,27 @@ HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID SDL_UnlockJoysticks(); } -static int -HIDAPI_JoystickGetCount(void) +static int HIDAPI_JoystickGetCount(void) { return SDL_HIDAPI_numjoysticks; } -static char * -HIDAPI_ConvertString(const wchar_t *wide_string) -{ - char *string = NULL; - - if (wide_string) { - string = SDL_iconv_string("UTF-8", "WCHAR_T", (char*)wide_string, (SDL_wcslen(wide_string)+1)*sizeof(wchar_t)); - if (!string) { - switch (sizeof(wchar_t)) { - case 2: - string = SDL_iconv_string("UTF-8", "UCS-2-INTERNAL", (char*)wide_string, (SDL_wcslen(wide_string)+1)*sizeof(wchar_t)); - break; - case 4: - string = SDL_iconv_string("UTF-8", "UCS-4-INTERNAL", (char*)wide_string, (SDL_wcslen(wide_string)+1)*sizeof(wchar_t)); - break; - } - } - } - return string; -} - -static SDL_HIDAPI_Device * -HIDAPI_AddDevice(const struct SDL_hid_device_info *info, int num_children, SDL_HIDAPI_Device **children) +static SDL_HIDAPI_Device *HIDAPI_AddDevice(const struct SDL_hid_device_info *info, int num_children, SDL_HIDAPI_Device **children) { SDL_HIDAPI_Device *device; SDL_HIDAPI_Device *curr, *last = NULL; SDL_bool removed; + SDL_AssertJoysticksLocked(); + for (curr = SDL_HIDAPI_devices, last = NULL; curr; last = curr, curr = curr->next) { - continue; } device = (SDL_HIDAPI_Device *)SDL_calloc(1, sizeof(*device)); - if (!device) { + if (device == NULL) { return NULL; } + device->magic = &SDL_HIDAPI_device_magic; device->path = SDL_strdup(info->path); if (!device->path) { SDL_free(device); @@ -828,13 +951,13 @@ HIDAPI_AddDevice(const struct SDL_hid_device_info *info, int num_children, SDL_H return device; } - -static void -HIDAPI_DelDevice(SDL_HIDAPI_Device *device) +static void HIDAPI_DelDevice(SDL_HIDAPI_Device *device) { SDL_HIDAPI_Device *curr, *last; int i; + SDL_AssertJoysticksLocked(); + #ifdef DEBUG_HIDAPI SDL_Log("Removing HIDAPI device '%s' VID 0x%.4x, PID 0x%.4x, version %d, serial %s, interface %d, interface_class %d, interface_subclass %d, interface_protocol %d, usage page 0x%.4x, usage 0x%.4x, path = %s, driver = %s (%s)\n", device->name, device->vendor_id, device->product_id, device->version, device->serial ? device->serial : "NONE", device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol, device->usage_page, device->usage, device->path, device->driver ? device->driver->name : "NONE", device->driver && device->driver->enabled ? "ENABLED" : "DISABLED"); #endif @@ -858,6 +981,7 @@ HIDAPI_DelDevice(SDL_HIDAPI_Device *device) device->children[i]->parent = NULL; } + device->magic = NULL; SDL_DestroyMutex(device->dev_lock); SDL_free(device->serial); SDL_free(device->name); @@ -869,12 +993,13 @@ HIDAPI_DelDevice(SDL_HIDAPI_Device *device) } } -static SDL_bool -HIDAPI_CreateCombinedJoyCons() +static SDL_bool HIDAPI_CreateCombinedJoyCons() { SDL_HIDAPI_Device *device, *combined; SDL_HIDAPI_Device *joycons[2] = { NULL, NULL }; + SDL_AssertJoysticksLocked(); + if (!SDL_HIDAPI_combine_joycons) { return SDL_FALSE; } @@ -908,7 +1033,7 @@ HIDAPI_CreateCombinedJoyCons() if (joycons[0] && joycons[1]) { SDL_hid_device_info info; SDL_HIDAPI_Device **children = (SDL_HIDAPI_Device **)SDL_malloc(2 * sizeof(SDL_HIDAPI_Device *)); - if (!children) { + if (children == NULL) { return SDL_FALSE; } children[0] = joycons[0]; @@ -940,8 +1065,7 @@ HIDAPI_CreateCombinedJoyCons() return SDL_FALSE; } -static void -HIDAPI_UpdateDeviceList(void) +static void HIDAPI_UpdateDeviceList(void) { SDL_HIDAPI_Device *device; struct SDL_hid_device_info *devs, *info; @@ -969,6 +1093,11 @@ HIDAPI_UpdateDeviceList(void) device = HIDAPI_GetJoystickByInfo(info->path, info->vendor_id, info->product_id); if (device) { device->seen = SDL_TRUE; + + /* Check to see if the serial number is available now */ + if(HIDAPI_SerialIsEmpty(device)) { + HIDAPI_SetDeviceSerialW(device, info->serial_number); + } } else { HIDAPI_AddDevice(info, 0, NULL); } @@ -1011,14 +1140,12 @@ check_removed: /* See if we can create any combined Joy-Con controllers */ while (HIDAPI_CreateCombinedJoyCons()) { - continue; } SDL_UnlockJoysticks(); } -static SDL_bool -HIDAPI_IsEquivalentToDevice(Uint16 vendor_id, Uint16 product_id, SDL_HIDAPI_Device *device) +static SDL_bool HIDAPI_IsEquivalentToDevice(Uint16 vendor_id, Uint16 product_id, SDL_HIDAPI_Device *device) { if (vendor_id == device->vendor_id && product_id == device->product_id) { return SDL_TRUE; @@ -1054,8 +1181,7 @@ HIDAPI_IsEquivalentToDevice(Uint16 vendor_id, Uint16 product_id, SDL_HIDAPI_Devi return SDL_FALSE; } -SDL_bool -HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type) +SDL_bool HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type) { SDL_HIDAPI_Device *device; SDL_bool result = SDL_FALSE; @@ -1085,8 +1211,7 @@ HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type) return result; } -SDL_bool -HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) +SDL_bool HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) { SDL_HIDAPI_Device *device; SDL_bool supported = SDL_FALSE; @@ -1098,8 +1223,8 @@ HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, cons } /* Only update the device list for devices we know might be supported. - If we did this for every device, it would hit the USB driver too hard and potentially - lock up the system. This won't catch devices that we support but can only detect using + If we did this for every device, it would hit the USB driver too hard and potentially + lock up the system. This won't catch devices that we support but can only detect using USB interface details, like Xbox controllers, but hopefully the device list update is responsive enough to catch those. */ @@ -1137,8 +1262,7 @@ HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, cons return result; } -SDL_JoystickType -HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid) +SDL_JoystickType HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid) { SDL_HIDAPI_Device *device; SDL_JoystickType type = SDL_JOYSTICK_TYPE_UNKNOWN; @@ -1155,8 +1279,7 @@ HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid) return type; } -SDL_GameControllerType -HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid) +SDL_GameControllerType HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid) { SDL_HIDAPI_Device *device; SDL_GameControllerType type = SDL_CONTROLLER_TYPE_UNKNOWN; @@ -1173,8 +1296,7 @@ HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid) return type; } -static void -HIDAPI_JoystickDetect(void) +static void HIDAPI_JoystickDetect(void) { if (SDL_AtomicTryLock(&SDL_HIDAPI_spinlock)) { Uint32 count = SDL_hid_device_change_count(); @@ -1186,11 +1308,12 @@ HIDAPI_JoystickDetect(void) } } -void -HIDAPI_UpdateDevices(void) +void HIDAPI_UpdateDevices(void) { SDL_HIDAPI_Device *device; + SDL_AssertJoysticksLocked(); + /* Update the devices, which may change connected joysticks and send events */ /* Prepare the existing device list */ @@ -1212,8 +1335,7 @@ HIDAPI_UpdateDevices(void) } } -static const char * -HIDAPI_JoystickGetDeviceName(int device_index) +static const char *HIDAPI_JoystickGetDeviceName(int device_index) { SDL_HIDAPI_Device *device; const char *name = NULL; @@ -1227,8 +1349,7 @@ HIDAPI_JoystickGetDeviceName(int device_index) return name; } -static const char * -HIDAPI_JoystickGetDevicePath(int device_index) +static const char *HIDAPI_JoystickGetDevicePath(int device_index) { SDL_HIDAPI_Device *device; const char *path = NULL; @@ -1242,8 +1363,7 @@ HIDAPI_JoystickGetDevicePath(int device_index) return path; } -static int -HIDAPI_JoystickGetDevicePlayerIndex(int device_index) +static int HIDAPI_JoystickGetDevicePlayerIndex(int device_index) { SDL_HIDAPI_Device *device; SDL_JoystickID instance_id; @@ -1257,8 +1377,7 @@ HIDAPI_JoystickGetDevicePlayerIndex(int device_index) return player_index; } -static void -HIDAPI_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void HIDAPI_JoystickSetDevicePlayerIndex(int device_index, int player_index) { SDL_HIDAPI_Device *device; SDL_JoystickID instance_id; @@ -1269,8 +1388,7 @@ HIDAPI_JoystickSetDevicePlayerIndex(int device_index, int player_index) } } -static SDL_JoystickGUID -HIDAPI_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID HIDAPI_JoystickGetDeviceGUID(int device_index) { SDL_HIDAPI_Device *device; SDL_JoystickGUID guid; @@ -1285,28 +1403,28 @@ HIDAPI_JoystickGetDeviceGUID(int device_index) return guid; } -static SDL_JoystickID -HIDAPI_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID HIDAPI_JoystickGetDeviceInstanceID(int device_index) { SDL_JoystickID joystickID = -1; HIDAPI_GetDeviceByIndex(device_index, &joystickID); return joystickID; } -static int -HIDAPI_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int HIDAPI_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_JoystickID joystickID = -1; SDL_HIDAPI_Device *device = HIDAPI_GetDeviceByIndex(device_index, &joystickID); struct joystick_hwdata *hwdata; - if (!device || !device->driver) { + SDL_AssertJoysticksLocked(); + + if (device == NULL || !device->driver) { /* This should never happen - validated before being called */ return SDL_SetError("Couldn't find HIDAPI device at index %d\n", device_index); } hwdata = (struct joystick_hwdata *)SDL_calloc(1, sizeof(*hwdata)); - if (!hwdata) { + if (hwdata == NULL) { return SDL_OutOfMemory(); } hwdata->device = device; @@ -1325,7 +1443,7 @@ HIDAPI_JoystickOpen(SDL_Joystick *joystick, int device_index) return -1; } - if (!joystick->serial && device->serial) { + if (device->serial) { joystick->serial = SDL_strdup(device->serial); } @@ -1333,14 +1451,25 @@ HIDAPI_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static int -HIDAPI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static SDL_bool HIDAPI_GetJoystickDevice(SDL_Joystick *joystick, SDL_HIDAPI_Device **device) { - int result; + SDL_AssertJoysticksLocked(); - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; + if (joystick && joystick->hwdata) { + *device = joystick->hwdata->device; + if (*device && (*device)->magic == &SDL_HIDAPI_device_magic && (*device)->driver != NULL) { + return SDL_TRUE; + } + } + return SDL_FALSE; +} + +static int HIDAPI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +{ + int result; + SDL_HIDAPI_Device *device = NULL; + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->RumbleJoystick(device, joystick, low_frequency_rumble, high_frequency_rumble); } else { result = SDL_SetError("Rumble failed, device disconnected"); @@ -1349,14 +1478,12 @@ HIDAPI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint1 return result; } -static int -HIDAPI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int HIDAPI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { int result; + SDL_HIDAPI_Device *device = NULL; - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; - + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->RumbleJoystickTriggers(device, joystick, left_rumble, right_rumble); } else { result = SDL_SetError("Rumble failed, device disconnected"); @@ -1365,28 +1492,24 @@ HIDAPI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 return result; } -static Uint32 -HIDAPI_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 HIDAPI_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; + SDL_HIDAPI_Device *device = NULL; - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; - + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->GetJoystickCapabilities(device, joystick); } return result; } -static int -HIDAPI_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int HIDAPI_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { int result; + SDL_HIDAPI_Device *device = NULL; - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; - + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->SetJoystickLED(device, joystick, red, green, blue); } else { result = SDL_SetError("SetLED failed, device disconnected"); @@ -1395,14 +1518,12 @@ HIDAPI_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue return result; } -static int -HIDAPI_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int HIDAPI_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { int result; + SDL_HIDAPI_Device *device = NULL; - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; - + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->SendJoystickEffect(device, joystick, data, size); } else { result = SDL_SetError("SendEffect failed, device disconnected"); @@ -1411,14 +1532,12 @@ HIDAPI_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) return result; } -static int -HIDAPI_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int HIDAPI_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { int result; + SDL_HIDAPI_Device *device = NULL; - if (joystick->hwdata) { - SDL_HIDAPI_Device *device = joystick->hwdata->device; - + if (HIDAPI_GetJoystickDevice(joystick, &device)) { result = device->driver->SetJoystickSensorsEnabled(device, joystick, enabled); } else { result = SDL_SetError("SetSensorsEnabled failed, device disconnected"); @@ -1427,15 +1546,15 @@ HIDAPI_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) return result; } -static void -HIDAPI_JoystickUpdate(SDL_Joystick *joystick) +static void HIDAPI_JoystickUpdate(SDL_Joystick *joystick) { /* This is handled in SDL_HIDAPI_UpdateDevices() */ } -static void -HIDAPI_JoystickClose(SDL_Joystick *joystick) +static void HIDAPI_JoystickClose(SDL_Joystick *joystick) SDL_NO_THREAD_SAFETY_ANALYSIS /* We unlock the device lock so rumble can complete */ { + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { SDL_HIDAPI_Device *device = joystick->hwdata->device; int i; @@ -1462,11 +1581,12 @@ HIDAPI_JoystickClose(SDL_Joystick *joystick) } } -static void -HIDAPI_JoystickQuit(void) +static void HIDAPI_JoystickQuit(void) { int i; + SDL_AssertJoysticksLocked(); + shutting_down = SDL_TRUE; SDL_HIDAPI_QuitRumble(); @@ -1504,14 +1624,12 @@ HIDAPI_JoystickQuit(void) initialized = SDL_FALSE; } -static SDL_bool -HIDAPI_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool HIDAPI_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_HIDAPI_JoystickDriver = -{ +SDL_JoystickDriver SDL_HIDAPI_JoystickDriver = { HIDAPI_JoystickInit, HIDAPI_JoystickGetCount, HIDAPI_JoystickDetect, diff --git a/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h b/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h index 380b1cf..d17203f 100644 --- a/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h +++ b/modules/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h @@ -38,7 +38,7 @@ #define SDL_JOYSTICK_HIDAPI_PS4 #define SDL_JOYSTICK_HIDAPI_PS5 #define SDL_JOYSTICK_HIDAPI_STADIA -#define SDL_JOYSTICK_HIDAPI_STEAM /* Simple support for BLE Steam Controller, hint is disabled by default */ +#define SDL_JOYSTICK_HIDAPI_STEAM /* Simple support for BLE Steam Controller, hint is disabled by default */ #define SDL_JOYSTICK_HIDAPI_SWITCH #define SDL_JOYSTICK_HIDAPI_WII #define SDL_JOYSTICK_HIDAPI_XBOX360 @@ -46,16 +46,17 @@ #define SDL_JOYSTICK_HIDAPI_SHIELD /* Whether HIDAPI is enabled by default */ -#define SDL_HIDAPI_DEFAULT SDL_TRUE +#define SDL_HIDAPI_DEFAULT SDL_TRUE /* The maximum size of a USB packet for HID devices */ -#define USB_PACKET_LENGTH 64 +#define USB_PACKET_LENGTH 64 /* Forward declaration */ struct _SDL_HIDAPI_DeviceDriver; typedef struct _SDL_HIDAPI_Device { + const void *magic; char *name; char *path; Uint16 vendor_id; @@ -63,7 +64,7 @@ typedef struct _SDL_HIDAPI_Device Uint16 version; char *serial; SDL_JoystickGUID guid; - int interface_number; /* Available on Windows and Linux */ + int interface_number; /* Available on Windows and Linux */ int interface_class; int interface_subclass; int interface_protocol; @@ -118,7 +119,6 @@ typedef struct _SDL_HIDAPI_DeviceDriver } SDL_HIDAPI_DeviceDriver; - /* HIDAPI device support */ extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverCombined; extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverGameCube; @@ -152,7 +152,7 @@ extern SDL_GameControllerType HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickG extern void HIDAPI_UpdateDevices(void); extern void HIDAPI_SetDeviceName(SDL_HIDAPI_Device *device, const char *name); -extern void HIDAPI_SetDeviceProduct(SDL_HIDAPI_Device *device, Uint16 product_id); +extern void HIDAPI_SetDeviceProduct(SDL_HIDAPI_Device *device, Uint16 vendor_id, Uint16 product_id); extern void HIDAPI_SetDeviceSerial(SDL_HIDAPI_Device *device, const char *serial); extern SDL_bool HIDAPI_HasConnectedUSBDevice(const char *serial); extern void HIDAPI_DisconnectBluetoothDevice(const char *serial); @@ -161,6 +161,8 @@ extern void HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickI extern void HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size); +extern SDL_bool HIDAPI_SupportsPlaystationDetection(Uint16 vendor, Uint16 product); + extern float HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float output_max); #endif /* SDL_JOYSTICK_HIDAPI_H */ diff --git a/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick.m b/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick.m index 4b23bed..b9aeed7 100644 --- a/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick.m +++ b/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick.m @@ -25,6 +25,7 @@ #include "SDL_joystick.h" #include "SDL_hints.h" #include "SDL_stdinc.h" +#include "SDL_timer.h" #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" #include "../hidapi/SDL_hidapijoystick_c.h" @@ -75,20 +76,20 @@ static NSString *GCInputXboxShareButton = @"Button Share"; @end @interface GCExtendedGamepad (SDL) #if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 121000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 121000) || (__MAC_OS_VERSION_MAX_ALLOWED >= 1401000)) -@property (nonatomic, readonly, nullable) GCControllerButtonInput *leftThumbstickButton; -@property (nonatomic, readonly, nullable) GCControllerButtonInput *rightThumbstickButton; +@property(nonatomic, readonly, nullable) GCControllerButtonInput *leftThumbstickButton; +@property(nonatomic, readonly, nullable) GCControllerButtonInput *rightThumbstickButton; #endif #if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 130000) || (__MAC_OS_VERSION_MAX_ALLOWED >= 1500000)) -@property (nonatomic, readonly) GCControllerButtonInput *buttonMenu; -@property (nonatomic, readonly, nullable) GCControllerButtonInput *buttonOptions; +@property(nonatomic, readonly) GCControllerButtonInput *buttonMenu; +@property(nonatomic, readonly, nullable) GCControllerButtonInput *buttonOptions; #endif #if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 140000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 140000) || (__MAC_OS_VERSION_MAX_ALLOWED > 1500000)) -@property (nonatomic, readonly, nullable) GCControllerButtonInput *buttonHome; +@property(nonatomic, readonly, nullable) GCControllerButtonInput *buttonHome; #endif @end @interface GCMicroGamepad (SDL) #if !((__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000) || (__APPLETV_OS_VERSION_MAX_ALLOWED >= 130000) || (__MAC_OS_VERSION_MAX_ALLOWED >= 1500000)) -@property (nonatomic, readonly) GCControllerButtonInput *buttonMenu; +@property(nonatomic, readonly) GCControllerButtonInput *buttonMenu; #endif @end @@ -117,8 +118,7 @@ static SDL_JoystickDeviceItem *deviceList = NULL; static int numjoysticks = 0; int SDL_AppleTVRemoteOpenedAsJoystick = 0; -static SDL_JoystickDeviceItem * -GetDeviceForIndex(int device_index) +static SDL_JoystickDeviceItem *GetDeviceForIndex(int device_index) { SDL_JoystickDeviceItem *device = deviceList; int i = 0; @@ -135,50 +135,46 @@ GetDeviceForIndex(int device_index) } #ifdef SDL_JOYSTICK_MFI -static BOOL -IsControllerPS4(GCController *controller) +static BOOL IsControllerPS4(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"DualShock 4"]) { return TRUE; } } else { - if ([controller.vendorName containsString: @"DUALSHOCK"]) { + if ([controller.vendorName containsString:@"DUALSHOCK"]) { return TRUE; } } return FALSE; } -static BOOL -IsControllerPS5(GCController *controller) +static BOOL IsControllerPS5(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"DualSense"]) { return TRUE; } } else { - if ([controller.vendorName containsString: @"DualSense"]) { + if ([controller.vendorName containsString:@"DualSense"]) { return TRUE; } } return FALSE; } -static BOOL -IsControllerXbox(GCController *controller) +static BOOL IsControllerXbox(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"Xbox One"]) { return TRUE; } } else { - if ([controller.vendorName containsString: @"Xbox"]) { + if ([controller.vendorName containsString:@"Xbox"]) { return TRUE; } } return FALSE; } -static BOOL -IsControllerSwitchPro(GCController *controller) +static BOOL IsControllerSwitchPro(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"Switch Pro Controller"]) { @@ -187,8 +183,7 @@ IsControllerSwitchPro(GCController *controller) } return FALSE; } -static BOOL -IsControllerSwitchJoyConL(GCController *controller) +static BOOL IsControllerSwitchJoyConL(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"Nintendo Switch Joy-Con (L)"]) { @@ -197,8 +192,7 @@ IsControllerSwitchJoyConL(GCController *controller) } return FALSE; } -static BOOL -IsControllerSwitchJoyConR(GCController *controller) +static BOOL IsControllerSwitchJoyConR(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"Nintendo Switch Joy-Con (R)"]) { @@ -207,8 +201,7 @@ IsControllerSwitchJoyConR(GCController *controller) } return FALSE; } -static BOOL -IsControllerSwitchJoyConPair(GCController *controller) +static BOOL IsControllerSwitchJoyConPair(GCController *controller) { if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { if ([controller.productCategory isEqualToString:@"Nintendo Switch Joy-Con (L/R)"]) { @@ -217,8 +210,21 @@ IsControllerSwitchJoyConPair(GCController *controller) } return FALSE; } -static BOOL -IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controller) +static BOOL IsControllerStadia(GCController *controller) +{ + if ([controller.vendorName hasPrefix:@"Stadia"]) { + return TRUE; + } + return FALSE; +} +static BOOL IsControllerBackboneOne(GCController *controller) +{ + if ([controller.vendorName hasPrefix:@"Backbone One"]) { + return TRUE; + } + return FALSE; +} +static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controller) { Uint16 vendor = 0; Uint16 product = 0; @@ -233,7 +239,7 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle /* Explicitly retain the controller because SDL_JoystickDeviceItem is a * struct, and ARC doesn't work with structs. */ - device->controller = (__bridge GCController *) CFBridgingRetain(controller); + device->controller = (__bridge GCController *)CFBridgingRetain(controller); if (controller.vendorName) { name = controller.vendorName.UTF8String; @@ -265,6 +271,8 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle BOOL is_ps5 = IsControllerPS5(controller); BOOL is_switch_pro = IsControllerSwitchPro(controller); BOOL is_switch_joycon_pair = IsControllerSwitchJoyConPair(controller); + BOOL is_stadia = IsControllerStadia(controller); + BOOL is_backbone_one = IsControllerBackboneOne(controller); int nbuttons = 0; BOOL has_direct_menu; @@ -272,7 +280,9 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle if ((is_xbox && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_XBOXONE)) || (is_ps4 && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_PS4)) || (is_ps5 && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_PS5)) || - (is_switch_pro && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO))) { + (is_switch_pro && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO)) || + (is_switch_joycon_pair && HIDAPI_IsDevicePresent(USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR, 0, "")) || + (is_stadia && HIDAPI_IsDeviceTypePresent(SDL_CONTROLLER_TYPE_GOOGLE_STADIA))) { /* The HIDAPI driver is taking care of this device */ return FALSE; } @@ -357,7 +367,15 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle #endif #pragma clang diagnostic pop - if (is_xbox) { + if (is_backbone_one) { + vendor = USB_VENDOR_BACKBONE; + if (is_ps5) { + product = USB_PRODUCT_BACKBONE_ONE_IOS_PS5; + } else { + product = USB_PRODUCT_BACKBONE_ONE_IOS; + } + subtype = 0; + } else if (is_xbox) { vendor = USB_VENDOR_MICROSOFT; if (device->has_xbox_paddles) { /* Assume Xbox One Elite Series 2 Controller unless/until GCController flows VID/PID */ @@ -399,7 +417,7 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle subtype = 1; } - if (SDL_strcmp(name, "Backbone One") == 0) { + if (is_backbone_one) { /* The Backbone app uses share button */ if ((device->button_mask & (1 << SDL_CONTROLLER_BUTTON_MISC1)) != 0) { device->button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_MISC1); @@ -417,6 +435,17 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle BOOL is_switch_joyconR = IsControllerSwitchJoyConR(controller); int nbuttons = 0; +#ifdef SDL_JOYSTICK_HIDAPI + if ((is_switch_joyconL && HIDAPI_IsDevicePresent(USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT, 0, "")) || + (is_switch_joyconR && HIDAPI_IsDevicePresent(USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT, 0, ""))) { + /* The HIDAPI driver is taking care of this device */ + return FALSE; + } +#else + (void)is_switch_joyconL; + (void)is_switch_joyconR; +#endif + if (is_switch_joyconL) { vendor = USB_VENDOR_NINTENDO; product = USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT; @@ -495,8 +524,7 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle #endif /* SDL_JOYSTICK_MFI */ #if defined(SDL_JOYSTICK_iOS_ACCELEROMETER) || defined(SDL_JOYSTICK_MFI) -static void -IOS_AddJoystickDevice(GCController *controller, SDL_bool accelerometer) +static void IOS_AddJoystickDevice(GCController *controller, SDL_bool accelerometer) { SDL_JoystickDeviceItem *device = deviceList; @@ -516,7 +544,7 @@ IOS_AddJoystickDevice(GCController *controller, SDL_bool accelerometer) device = device->next; } - device = (SDL_JoystickDeviceItem *) SDL_calloc(1, sizeof(SDL_JoystickDeviceItem)); + device = (SDL_JoystickDeviceItem *)SDL_calloc(1, sizeof(SDL_JoystickDeviceItem)); if (device == NULL) { return; } @@ -565,8 +593,7 @@ IOS_AddJoystickDevice(GCController *controller, SDL_bool accelerometer) } #endif /* SDL_JOYSTICK_iOS_ACCELEROMETER || SDL_JOYSTICK_MFI */ -static SDL_JoystickDeviceItem * -IOS_RemoveJoystickDevice(SDL_JoystickDeviceItem *device) +static SDL_JoystickDeviceItem *IOS_RemoveJoystickDevice(SDL_JoystickDeviceItem *device) { SDL_JoystickDeviceItem *prev = NULL; SDL_JoystickDeviceItem *next = NULL; @@ -620,8 +647,7 @@ IOS_RemoveJoystickDevice(SDL_JoystickDeviceItem *device) } #if TARGET_OS_TV -static void SDLCALL -SDL_AppleTVRemoteRotationHintChanged(void *udata, const char *name, const char *oldValue, const char *newValue) +static void SDLCALL SDL_AppleTVRemoteRotationHintChanged(void *udata, const char *name, const char *oldValue, const char *newValue) { BOOL allowRotation = newValue != NULL && *newValue != '0'; @@ -635,8 +661,7 @@ SDL_AppleTVRemoteRotationHintChanged(void *udata, const char *name, const char * } #endif /* TARGET_OS_TV */ -static int -IOS_JoystickInit(void) +static int IOS_JoystickInit(void) { #if defined(__MACOSX__) #if _SDL_HAS_BUILTIN(__builtin_available) @@ -685,26 +710,26 @@ IOS_JoystickInit(void) object:nil queue:nil usingBlock:^(NSNotification *note) { - GCController *controller = note.object; - SDL_LockJoysticks(); - IOS_AddJoystickDevice(controller, SDL_FALSE); - SDL_UnlockJoysticks(); + GCController *controller = note.object; + SDL_LockJoysticks(); + IOS_AddJoystickDevice(controller, SDL_FALSE); + SDL_UnlockJoysticks(); }]; disconnectObserver = [center addObserverForName:GCControllerDidDisconnectNotification object:nil queue:nil usingBlock:^(NSNotification *note) { - GCController *controller = note.object; - SDL_JoystickDeviceItem *device; - SDL_LockJoysticks(); - for (device = deviceList; device != NULL; device = device->next) { - if (device->controller == controller) { - IOS_RemoveJoystickDevice(device); - break; - } - } - SDL_UnlockJoysticks(); + GCController *controller = note.object; + SDL_JoystickDeviceItem *device; + SDL_LockJoysticks(); + for (device = deviceList; device != NULL; device = device->next) { + if (device->controller == controller) { + IOS_RemoveJoystickDevice(device); + break; + } + } + SDL_UnlockJoysticks(); }]; #endif /* SDL_JOYSTICK_MFI */ } @@ -712,32 +737,27 @@ IOS_JoystickInit(void) return 0; } -static int -IOS_JoystickGetCount(void) +static int IOS_JoystickGetCount(void) { return numjoysticks; } -static void -IOS_JoystickDetect(void) +static void IOS_JoystickDetect(void) { } -static const char * -IOS_JoystickGetDeviceName(int device_index) +static const char *IOS_JoystickGetDeviceName(int device_index) { SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); return device ? device->name : "Unknown"; } -static const char * -IOS_JoystickGetDevicePath(int device_index) +static const char *IOS_JoystickGetDevicePath(int device_index) { return NULL; } -static int -IOS_JoystickGetDevicePlayerIndex(int device_index) +static int IOS_JoystickGetDevicePlayerIndex(int device_index) { #ifdef SDL_JOYSTICK_MFI SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); @@ -748,8 +768,7 @@ IOS_JoystickGetDevicePlayerIndex(int device_index) return -1; } -static void -IOS_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void IOS_JoystickSetDevicePlayerIndex(int device_index, int player_index) { #ifdef SDL_JOYSTICK_MFI SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); @@ -759,8 +778,7 @@ IOS_JoystickSetDevicePlayerIndex(int device_index, int player_index) #endif } -static SDL_JoystickGUID -IOS_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID IOS_JoystickGetDeviceGUID(int device_index) { SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); SDL_JoystickGUID guid; @@ -772,15 +790,13 @@ IOS_JoystickGetDeviceGUID(int device_index) return guid; } -static SDL_JoystickID -IOS_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID IOS_JoystickGetDeviceInstanceID(int device_index) { SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); return device ? device->instance_id : -1; } -static int -IOS_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int IOS_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index); if (device == NULL) { @@ -817,9 +833,9 @@ IOS_JoystickOpen(SDL_Joystick *joystick, int device_index) if (device->uses_pause_handler) { GCController *controller = device->controller; controller.controllerPausedHandler = ^(GCController *c) { - if (joystick->hwdata) { - ++joystick->hwdata->num_pause_presses; - } + if (joystick->hwdata) { + ++joystick->hwdata->num_pause_presses; + } }; } @@ -858,8 +874,7 @@ IOS_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static void -IOS_AccelerometerUpdate(SDL_Joystick *joystick) +static void IOS_AccelerometerUpdate(SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_iOS_ACCELEROMETER const float maxgforce = SDL_IPHONE_MAX_GFORCE; @@ -896,15 +911,14 @@ IOS_AccelerometerUpdate(SDL_Joystick *joystick) accel.z = SDL_clamp(accel.z, -maxgforce, maxgforce); /* pass in data mapped to range of SInt16 */ - SDL_PrivateJoystickAxis(joystick, 0, (accel.x / maxgforce) * maxsint16); + SDL_PrivateJoystickAxis(joystick, 0, (accel.x / maxgforce) * maxsint16); SDL_PrivateJoystickAxis(joystick, 1, -(accel.y / maxgforce) * maxsint16); - SDL_PrivateJoystickAxis(joystick, 2, (accel.z / maxgforce) * maxsint16); + SDL_PrivateJoystickAxis(joystick, 2, (accel.z / maxgforce) * maxsint16); #endif /* SDL_JOYSTICK_iOS_ACCELEROMETER */ } #ifdef SDL_JOYSTICK_MFI -static Uint8 -IOS_MFIJoystickHatStateForDPad(GCControllerDirectionPad *dpad) +static Uint8 IOS_MFIJoystickHatStateForDPad(GCControllerDirectionPad *dpad) { Uint8 hat = 0; @@ -928,8 +942,7 @@ IOS_MFIJoystickHatStateForDPad(GCControllerDirectionPad *dpad) } #endif -static void -IOS_MFIJoystickUpdate(SDL_Joystick *joystick) +static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick) { #if SDL_JOYSTICK_MFI @autoreleasepool { @@ -961,12 +974,12 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) /* Axis order matches the XInput Windows mappings. */ Sint16 axes[] = { - (Sint16) (gamepad.leftThumbstick.xAxis.value * 32767), - (Sint16) (gamepad.leftThumbstick.yAxis.value * -32767), - (Sint16) ((gamepad.leftTrigger.value * 65535) - 32768), - (Sint16) (gamepad.rightThumbstick.xAxis.value * 32767), - (Sint16) (gamepad.rightThumbstick.yAxis.value * -32767), - (Sint16) ((gamepad.rightTrigger.value * 65535) - 32768), + (Sint16)(gamepad.leftThumbstick.xAxis.value * 32767), + (Sint16)(gamepad.leftThumbstick.yAxis.value * -32767), + (Sint16)((gamepad.leftTrigger.value * 65535) - 32768), + (Sint16)(gamepad.rightThumbstick.xAxis.value * 32767), + (Sint16)(gamepad.rightThumbstick.yAxis.value * -32767), + (Sint16)((gamepad.rightTrigger.value * 65535) - 32768), }; /* Button order matches the XInput Windows mappings. */ @@ -1130,8 +1143,8 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) GCMicroGamepad *gamepad = controller.microGamepad; Sint16 axes[] = { - (Sint16) (gamepad.dpad.xAxis.value * 32767), - (Sint16) (gamepad.dpad.yAxis.value * -32767), + (Sint16)(gamepad.dpad.xAxis.value * 32767), + (Sint16)(gamepad.dpad.yAxis.value * -32767), }; for (i = 0; i < SDL_arraysize(axes); i++) { @@ -1181,19 +1194,18 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) switch (battery.batteryState) { case GCDeviceBatteryStateDischarging: - { - float power_level = battery.batteryLevel; - if (power_level <= 0.05f) { - ePowerLevel = SDL_JOYSTICK_POWER_EMPTY; - } else if (power_level <= 0.20f) { - ePowerLevel = SDL_JOYSTICK_POWER_LOW; - } else if (power_level <= 0.70f) { - ePowerLevel = SDL_JOYSTICK_POWER_MEDIUM; - } else { - ePowerLevel = SDL_JOYSTICK_POWER_FULL; - } + { + float power_level = battery.batteryLevel; + if (power_level <= 0.05f) { + ePowerLevel = SDL_JOYSTICK_POWER_EMPTY; + } else if (power_level <= 0.20f) { + ePowerLevel = SDL_JOYSTICK_POWER_LOW; + } else if (power_level <= 0.70f) { + ePowerLevel = SDL_JOYSTICK_POWER_MEDIUM; + } else { + ePowerLevel = SDL_JOYSTICK_POWER_FULL; } - break; + } break; case GCDeviceBatteryStateCharging: ePowerLevel = SDL_JOYSTICK_POWER_WIRED; break; @@ -1215,15 +1227,16 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) #ifdef ENABLE_MFI_RUMBLE @interface SDL_RumbleMotor : NSObject - @property(nonatomic,strong) CHHapticEngine *engine API_AVAILABLE(macos(10.16), ios(13.0), tvos(14.0)); - @property(nonatomic,strong) id player API_AVAILABLE(macos(10.16), ios(13.0), tvos(14.0)); - @property bool active; +@property(nonatomic, strong) CHHapticEngine *engine API_AVAILABLE(macos(10.16), ios(13.0), tvos(14.0)); +@property(nonatomic, strong) id player API_AVAILABLE(macos(10.16), ios(13.0), tvos(14.0)); +@property bool active; @end -@implementation SDL_RumbleMotor { +@implementation SDL_RumbleMotor +{ } --(void)cleanup +- (void)cleanup { @autoreleasepool { if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { @@ -1239,7 +1252,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) } } --(int)setIntensity:(float)intensity +- (int)setIntensity:(float)intensity { @autoreleasepool { if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { @@ -1289,7 +1302,7 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) } } --(id) initWithController:(GCController*)controller locality:(GCHapticsLocality)locality API_AVAILABLE(macos(10.16), ios(14.0), tvos(14.0)) +- (id)initWithController:(GCController *)controller locality:(GCHapticsLocality)locality API_AVAILABLE(macos(10.16), ios(14.0), tvos(14.0)) { @autoreleasepool { NSError *error; @@ -1310,22 +1323,22 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) } self.engine.stoppedHandler = ^(CHHapticEngineStoppedReason stoppedReason) { - SDL_RumbleMotor *_this = weakSelf; - if (_this == nil) { - return; - } + SDL_RumbleMotor *_this = weakSelf; + if (_this == nil) { + return; + } - _this.player = nil; - _this.engine = nil; + _this.player = nil; + _this.engine = nil; }; self.engine.resetHandler = ^{ - SDL_RumbleMotor *_this = weakSelf; - if (_this == nil) { - return; - } + SDL_RumbleMotor *_this = weakSelf; + if (_this == nil) { + return; + } - _this.player = nil; - [_this.engine startAndReturnError:nil]; + _this.player = nil; + [_this.engine startAndReturnError:nil]; }; return self; @@ -1335,54 +1348,55 @@ IOS_MFIJoystickUpdate(SDL_Joystick *joystick) @end @interface SDL_RumbleContext : NSObject - @property(nonatomic,strong) SDL_RumbleMotor *m_low_frequency_motor; - @property(nonatomic,strong) SDL_RumbleMotor *m_high_frequency_motor; - @property(nonatomic,strong) SDL_RumbleMotor *m_left_trigger_motor; - @property(nonatomic,strong) SDL_RumbleMotor *m_right_trigger_motor; +@property(nonatomic, strong) SDL_RumbleMotor *lowFrequencyMotor; +@property(nonatomic, strong) SDL_RumbleMotor *highFrequencyMotor; +@property(nonatomic, strong) SDL_RumbleMotor *leftTriggerMotor; +@property(nonatomic, strong) SDL_RumbleMotor *rightTriggerMotor; @end -@implementation SDL_RumbleContext { +@implementation SDL_RumbleContext +{ } --(id) initWithLowFrequencyMotor:(SDL_RumbleMotor*)low_frequency_motor - HighFrequencyMotor:(SDL_RumbleMotor*)high_frequency_motor - LeftTriggerMotor:(SDL_RumbleMotor*)left_trigger_motor - RightTriggerMotor:(SDL_RumbleMotor*)right_trigger_motor +- (id)initWithLowFrequencyMotor:(SDL_RumbleMotor *)low_frequency_motor + HighFrequencyMotor:(SDL_RumbleMotor *)high_frequency_motor + LeftTriggerMotor:(SDL_RumbleMotor *)left_trigger_motor + RightTriggerMotor:(SDL_RumbleMotor *)right_trigger_motor { self = [super init]; - self.m_low_frequency_motor = low_frequency_motor; - self.m_high_frequency_motor = high_frequency_motor; - self.m_left_trigger_motor = left_trigger_motor; - self.m_right_trigger_motor = right_trigger_motor; + self.lowFrequencyMotor = low_frequency_motor; + self.highFrequencyMotor = high_frequency_motor; + self.leftTriggerMotor = left_trigger_motor; + self.rightTriggerMotor = right_trigger_motor; return self; } --(int) rumbleWithLowFrequency:(Uint16)low_frequency_rumble andHighFrequency:(Uint16)high_frequency_rumble +- (int)rumbleWithLowFrequency:(Uint16)low_frequency_rumble andHighFrequency:(Uint16)high_frequency_rumble { int result = 0; - result += [self.m_low_frequency_motor setIntensity:((float)low_frequency_rumble / 65535.0f)]; - result += [self.m_high_frequency_motor setIntensity:((float)high_frequency_rumble / 65535.0f)]; + result += [self.lowFrequencyMotor setIntensity:((float)low_frequency_rumble / 65535.0f)]; + result += [self.highFrequencyMotor setIntensity:((float)high_frequency_rumble / 65535.0f)]; return ((result < 0) ? -1 : 0); } --(int) rumbleLeftTrigger:(Uint16)left_rumble andRightTrigger:(Uint16)right_rumble +- (int)rumbleLeftTrigger:(Uint16)left_rumble andRightTrigger:(Uint16)right_rumble { int result = 0; - if (self.m_left_trigger_motor && self.m_right_trigger_motor) { - result += [self.m_left_trigger_motor setIntensity:((float)left_rumble / 65535.0f)]; - result += [self.m_right_trigger_motor setIntensity:((float)right_rumble / 65535.0f)]; + if (self.leftTriggerMotor && self.rightTriggerMotor) { + result += [self.leftTriggerMotor setIntensity:((float)left_rumble / 65535.0f)]; + result += [self.rightTriggerMotor setIntensity:((float)right_rumble / 65535.0f)]; } else { result = SDL_Unsupported(); } return ((result < 0) ? -1 : 0); } --(void)cleanup +- (void)cleanup { - [self.m_low_frequency_motor cleanup]; - [self.m_high_frequency_motor cleanup]; + [self.lowFrequencyMotor cleanup]; + [self.highFrequencyMotor cleanup]; } @end @@ -1408,8 +1422,7 @@ static SDL_RumbleContext *IOS_JoystickInitRumble(GCController *controller) #endif /* ENABLE_MFI_RUMBLE */ -static int -IOS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int IOS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { #ifdef ENABLE_MFI_RUMBLE SDL_JoystickDeviceItem *device = joystick->hwdata; @@ -1438,8 +1451,7 @@ IOS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 h #endif } -static int -IOS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int IOS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { #ifdef ENABLE_MFI_RUMBLE SDL_JoystickDeviceItem *device = joystick->hwdata; @@ -1468,8 +1480,7 @@ IOS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 ri #endif } -static Uint32 -IOS_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 IOS_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; @@ -1483,13 +1494,13 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick) if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { GCController *controller = device->controller; - #ifdef ENABLE_MFI_LIGHT +#ifdef ENABLE_MFI_LIGHT if (controller.light) { result |= SDL_JOYCAP_LED; } - #endif +#endif - #ifdef ENABLE_MFI_RUMBLE +#ifdef ENABLE_MFI_RUMBLE if (controller.haptics) { for (GCHapticsLocality locality in controller.haptics.supportedLocalities) { if ([locality isEqualToString:GCHapticsLocalityHandles]) { @@ -1499,7 +1510,7 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick) } } } - #endif +#endif } } #endif /* ENABLE_MFI_LIGHT || ENABLE_MFI_RUMBLE */ @@ -1507,8 +1518,7 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick) return result; } -static int -IOS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int IOS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { #ifdef ENABLE_MFI_LIGHT @autoreleasepool { @@ -1534,14 +1544,12 @@ IOS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) return SDL_Unsupported(); } -static int -IOS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int IOS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -IOS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int IOS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { #ifdef ENABLE_MFI_SENSORS @autoreleasepool { @@ -1565,8 +1573,7 @@ IOS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) return SDL_Unsupported(); } -static void -IOS_JoystickUpdate(SDL_Joystick *joystick) +static void IOS_JoystickUpdate(SDL_Joystick *joystick) { SDL_JoystickDeviceItem *device = joystick->hwdata; @@ -1581,8 +1588,7 @@ IOS_JoystickUpdate(SDL_Joystick *joystick) } } -static void -IOS_JoystickClose(SDL_Joystick *joystick) +static void IOS_JoystickClose(SDL_Joystick *joystick) { SDL_JoystickDeviceItem *device = joystick->hwdata; @@ -1632,8 +1638,7 @@ IOS_JoystickClose(SDL_Joystick *joystick) } } -static void -IOS_JoystickQuit(void) +static void IOS_JoystickQuit(void) { @autoreleasepool { #ifdef SDL_JOYSTICK_MFI @@ -1667,8 +1672,7 @@ IOS_JoystickQuit(void) numjoysticks = 0; } -static SDL_bool -IOS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool IOS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } @@ -1677,31 +1681,14 @@ IOS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) SDL_bool IOS_SupportedHIDDevice(IOHIDDeviceRef device) { if (@available(macOS 10.16, *)) { - if ([GCController supportsHIDDevice:device]) { - return SDL_TRUE; - } - - /* GCController supportsHIDDevice may return false if the device hasn't been - * seen by the framework yet, so check a few controllers we know are supported. - */ - { - Sint32 vendor = 0; - Sint32 product = 0; - CFTypeRef refCF = NULL; - - refCF = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVendorIDKey)); - if (refCF) { - CFNumberGetValue(refCF, kCFNumberSInt32Type, &vendor); - } - - refCF = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductIDKey)); - if (refCF) { - CFNumberGetValue(refCF, kCFNumberSInt32Type, &product); - } - - if (vendor == USB_VENDOR_MICROSOFT && SDL_IsJoystickXboxSeriesX(vendor, product)) { + const int MAX_ATTEMPTS = 3; + for (int attempt = 0; attempt < MAX_ATTEMPTS; ++attempt) { + if ([GCController supportsHIDDevice:device]) { return SDL_TRUE; } + + /* The framework may not have seen the device yet */ + SDL_Delay(10); } } return SDL_FALSE; @@ -1709,18 +1696,17 @@ SDL_bool IOS_SupportedHIDDevice(IOHIDDeviceRef device) #endif #if defined(SDL_JOYSTICK_MFI) && defined(ENABLE_PHYSICAL_INPUT_PROFILE) -static void -GetAppleSFSymbolsNameForElement(GCControllerElement *element, char *name) +/* NOLINTNEXTLINE(readability-non-const-parameter): getCString takes a non-const char* */ +static void GetAppleSFSymbolsNameForElement(GCControllerElement *element, char *name) { if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { if (element) { - [element.sfSymbolsName getCString: name maxLength: 255 encoding: NSASCIIStringEncoding]; + [element.sfSymbolsName getCString:name maxLength:255 encoding:NSASCIIStringEncoding]; } } } -static GCControllerDirectionPad * -GetDirectionalPadForController(GCController *controller) +static GCControllerDirectionPad *GetDirectionalPadForController(GCController *controller) { if (controller.extendedGamepad) { return controller.extendedGamepad.dpad; @@ -1740,8 +1726,7 @@ GetDirectionalPadForController(GCController *controller) static char elementName[256]; -const char * -IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) +const char *IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button) { elementName[0] = '\0'; #if defined(SDL_JOYSTICK_MFI) && defined(ENABLE_PHYSICAL_INPUT_PROFILE) @@ -1749,9 +1734,8 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { GCController *controller = SDL_GameControllerGetJoystick(gamecontroller)->hwdata->controller; if ([controller respondsToSelector:@selector(physicalInputProfile)]) { - NSDictionary *elements = controller.physicalInputProfile.elements; - switch (button) - { + NSDictionary *elements = controller.physicalInputProfile.elements; + switch (button) { case SDL_CONTROLLER_BUTTON_A: GetAppleSFSymbolsNameForElement(elements[GCInputButtonA], elementName); break; @@ -1785,8 +1769,9 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER: GetAppleSFSymbolsNameForElement(elements[GCInputRightShoulder], elementName); break; - case SDL_CONTROLLER_BUTTON_DPAD_UP: { - GCControllerDirectionPad * dpad = GetDirectionalPadForController(controller); + case SDL_CONTROLLER_BUTTON_DPAD_UP: + { + GCControllerDirectionPad *dpad = GetDirectionalPadForController(controller); if (dpad) { GetAppleSFSymbolsNameForElement(dpad.up, elementName); if (SDL_strlen(elementName) == 0) { @@ -1795,8 +1780,9 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol } break; } - case SDL_CONTROLLER_BUTTON_DPAD_DOWN: { - GCControllerDirectionPad * dpad = GetDirectionalPadForController(controller); + case SDL_CONTROLLER_BUTTON_DPAD_DOWN: + { + GCControllerDirectionPad *dpad = GetDirectionalPadForController(controller); if (dpad) { GetAppleSFSymbolsNameForElement(dpad.down, elementName); if (SDL_strlen(elementName) == 0) { @@ -1805,8 +1791,9 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol } break; } - case SDL_CONTROLLER_BUTTON_DPAD_LEFT: { - GCControllerDirectionPad * dpad = GetDirectionalPadForController(controller); + case SDL_CONTROLLER_BUTTON_DPAD_LEFT: + { + GCControllerDirectionPad *dpad = GetDirectionalPadForController(controller); if (dpad) { GetAppleSFSymbolsNameForElement(dpad.left, elementName); if (SDL_strlen(elementName) == 0) { @@ -1815,8 +1802,9 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol } break; } - case SDL_CONTROLLER_BUTTON_DPAD_RIGHT: { - GCControllerDirectionPad * dpad = GetDirectionalPadForController(controller); + case SDL_CONTROLLER_BUTTON_DPAD_RIGHT: + { + GCControllerDirectionPad *dpad = GetDirectionalPadForController(controller); if (dpad) { GetAppleSFSymbolsNameForElement(dpad.right, elementName); if (SDL_strlen(elementName) == 0) { @@ -1853,8 +1841,7 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol return elementName; } -const char * -IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) +const char *IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) { elementName[0] = '\0'; #if defined(SDL_JOYSTICK_MFI) && defined(ENABLE_PHYSICAL_INPUT_PROFILE) @@ -1862,9 +1849,8 @@ IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontrolle if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) { GCController *controller = SDL_GameControllerGetJoystick(gamecontroller)->hwdata->controller; if ([controller respondsToSelector:@selector(physicalInputProfile)]) { - NSDictionary *elements = controller.physicalInputProfile.elements; - switch (axis) - { + NSDictionary *elements = controller.physicalInputProfile.elements; + switch (axis) { case SDL_CONTROLLER_AXIS_LEFTX: GetAppleSFSymbolsNameForElement(elements[GCInputLeftThumbstick], elementName); break; @@ -1893,9 +1879,7 @@ IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontrolle return *elementName ? elementName : NULL; } - -SDL_JoystickDriver SDL_IOS_JoystickDriver = -{ +SDL_JoystickDriver SDL_IOS_JoystickDriver = { IOS_JoystickInit, IOS_JoystickGetCount, IOS_JoystickDetect, diff --git a/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick_c.h b/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick_c.h index c8e212f..bf5311c 100644 --- a/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick_c.h +++ b/modules/SDL2/src/joystick/iphoneos/SDL_mfijoystick_c.h @@ -59,5 +59,4 @@ typedef joystick_hwdata SDL_JoystickDeviceItem; #endif /* SDL_JOYSTICK_IOS_H */ - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/joystick/linux/SDL_sysjoystick.c b/modules/SDL2/src/joystick/linux/SDL_sysjoystick.c index dc534ba..479beb1 100644 --- a/modules/SDL2/src/joystick/linux/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/linux/SDL_sysjoystick.c @@ -29,9 +29,9 @@ /* This is the Linux implementation of the SDL joystick API */ #include -#include /* errno, strerror */ +#include /* errno, strerror */ #include -#include /* For the definition of PATH_MAX */ +#include /* For the definition of PATH_MAX */ #ifdef HAVE_INOTIFY #include #endif @@ -57,22 +57,66 @@ #define SYN_DROPPED 3 #endif #ifndef BTN_NORTH -#define BTN_NORTH 0x133 +#define BTN_NORTH 0x133 #endif #ifndef BTN_WEST -#define BTN_WEST 0x134 +#define BTN_WEST 0x134 #endif #ifndef BTN_DPAD_UP -#define BTN_DPAD_UP 0x220 +#define BTN_DPAD_UP 0x220 #endif #ifndef BTN_DPAD_DOWN -#define BTN_DPAD_DOWN 0x221 +#define BTN_DPAD_DOWN 0x221 #endif #ifndef BTN_DPAD_LEFT -#define BTN_DPAD_LEFT 0x222 +#define BTN_DPAD_LEFT 0x222 #endif #ifndef BTN_DPAD_RIGHT -#define BTN_DPAD_RIGHT 0x223 +#define BTN_DPAD_RIGHT 0x223 +#endif + +#ifndef BTN_TRIGGER_HAPPY +#define BTN_TRIGGER_HAPPY 0x2c0 +#define BTN_TRIGGER_HAPPY1 0x2c0 +#define BTN_TRIGGER_HAPPY2 0x2c1 +#define BTN_TRIGGER_HAPPY3 0x2c2 +#define BTN_TRIGGER_HAPPY4 0x2c3 +#define BTN_TRIGGER_HAPPY5 0x2c4 +#define BTN_TRIGGER_HAPPY6 0x2c5 +#define BTN_TRIGGER_HAPPY7 0x2c6 +#define BTN_TRIGGER_HAPPY8 0x2c7 +#define BTN_TRIGGER_HAPPY9 0x2c8 +#define BTN_TRIGGER_HAPPY10 0x2c9 +#define BTN_TRIGGER_HAPPY11 0x2ca +#define BTN_TRIGGER_HAPPY12 0x2cb +#define BTN_TRIGGER_HAPPY13 0x2cc +#define BTN_TRIGGER_HAPPY14 0x2cd +#define BTN_TRIGGER_HAPPY15 0x2ce +#define BTN_TRIGGER_HAPPY16 0x2cf +#define BTN_TRIGGER_HAPPY17 0x2d0 +#define BTN_TRIGGER_HAPPY18 0x2d1 +#define BTN_TRIGGER_HAPPY19 0x2d2 +#define BTN_TRIGGER_HAPPY20 0x2d3 +#define BTN_TRIGGER_HAPPY21 0x2d4 +#define BTN_TRIGGER_HAPPY22 0x2d5 +#define BTN_TRIGGER_HAPPY23 0x2d6 +#define BTN_TRIGGER_HAPPY24 0x2d7 +#define BTN_TRIGGER_HAPPY25 0x2d8 +#define BTN_TRIGGER_HAPPY26 0x2d9 +#define BTN_TRIGGER_HAPPY27 0x2da +#define BTN_TRIGGER_HAPPY28 0x2db +#define BTN_TRIGGER_HAPPY29 0x2dc +#define BTN_TRIGGER_HAPPY30 0x2dd +#define BTN_TRIGGER_HAPPY31 0x2de +#define BTN_TRIGGER_HAPPY32 0x2df +#define BTN_TRIGGER_HAPPY33 0x2e0 +#define BTN_TRIGGER_HAPPY34 0x2e1 +#define BTN_TRIGGER_HAPPY35 0x2e2 +#define BTN_TRIGGER_HAPPY36 0x2e3 +#define BTN_TRIGGER_HAPPY37 0x2e4 +#define BTN_TRIGGER_HAPPY38 0x2e5 +#define BTN_TRIGGER_HAPPY39 0x2e6 +#define BTN_TRIGGER_HAPPY40 0x2e7 #endif #include "../../core/linux/SDL_evdev_capabilities.h" @@ -104,8 +148,8 @@ static int MaybeRemoveDevice(const char *path); typedef struct SDL_joylist_item { SDL_JoystickID device_instance; - char *path; /* "/dev/input/event2" or whatever */ - char *name; /* "SideWinder 3D Pro" or whatever */ + char *path; /* "/dev/input/event2" or whatever */ + char *name; /* "SideWinder 3D Pro" or whatever */ SDL_JoystickGUID guid; dev_t devnum; struct joystick_hwdata *hwdata; @@ -127,8 +171,7 @@ static int inotify_fd = -1; static Uint32 last_joy_detect_time; static time_t last_input_dir_mtime; -static void -FixupDeviceInfoForMapping(int fd, struct input_id *inpid) +static void FixupDeviceInfoForMapping(int fd, struct input_id *inpid) { if (inpid->vendor == 0x045e && inpid->product == 0x0b05 && inpid->version == 0x0903) { /* This is a Microsoft Xbox One Elite Series 2 controller */ @@ -145,15 +188,13 @@ FixupDeviceInfoForMapping(int fd, struct input_id *inpid) /* For Atari vcs modern and classic controllers have the version reflecting * firmware version, but the mapping stays stable so ignore * version information */ - if (inpid->vendor == 0x3250 - && (inpid->product == 0x1001 || inpid->product == 0x1002)) { + if (inpid->vendor == 0x3250 && (inpid->product == 0x1001 || inpid->product == 0x1002)) { inpid->version = 0; } } #ifdef SDL_JOYSTICK_HIDAPI -static SDL_bool -IsVirtualJoystick(Uint16 vendor, Uint16 product, Uint16 version, const char *name) +static SDL_bool IsVirtualJoystick(Uint16 vendor, Uint16 product, Uint16 version, const char *name) { if (vendor == USB_VENDOR_MICROSOFT && product == USB_PRODUCT_XBOX_ONE_S && version == 0 && SDL_strcmp(name, "Xbox One S Controller") == 0) { @@ -164,8 +205,7 @@ IsVirtualJoystick(Uint16 vendor, Uint16 product, Uint16 version, const char *nam } #endif /* SDL_JOYSTICK_HIDAPI */ -static int -GuessIsJoystick(int fd) +static int GuessIsJoystick(int fd) { unsigned long evbit[NBITS(EV_MAX)] = { 0 }; unsigned long keybit[NBITS(KEY_MAX)] = { 0 }; @@ -177,7 +217,7 @@ GuessIsJoystick(int fd) (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(relbit)), relbit) < 0) || (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) { - return (0); + return 0; } devclass = SDL_EVDEV_GuessDeviceClass(evbit, absbit, keybit, relbit); @@ -189,8 +229,7 @@ GuessIsJoystick(int fd) return 0; } -static int -IsJoystick(const char *path, int fd, char **name_return, SDL_JoystickGUID *guid) +static int IsJoystick(const char *path, int fd, char **name_return, SDL_JoystickGUID *guid) { struct input_id inpid; char *name; @@ -217,7 +256,7 @@ IsJoystick(const char *path, int fd, char **name_return, SDL_JoystickGUID *guid) } name = SDL_CreateJoystickName(inpid.vendor, inpid.product, NULL, product_string); - if (!name) { + if (name == NULL) { return 0; } @@ -254,39 +293,37 @@ static void joystick_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_clas } switch (udev_type) { - case SDL_UDEV_DEVICEADDED: - if (!(udev_class & SDL_UDEV_DEVICE_JOYSTICK)) { + case SDL_UDEV_DEVICEADDED: + if (!(udev_class & SDL_UDEV_DEVICE_JOYSTICK)) { + return; + } + if (SDL_classic_joysticks) { + if (!IsJoystickJSNode(devpath)) { return; } - if (SDL_classic_joysticks) { - if (!IsJoystickJSNode(devpath)) { - return; - } - } else { - if (IsJoystickJSNode(devpath)) { - return; - } + } else { + if (IsJoystickJSNode(devpath)) { + return; } + } + + /* Wait a bit for the hidraw udev node to initialize */ + SDL_Delay(10); - /* Wait a bit for the hidraw udev node to initialize */ - SDL_Delay(10); + MaybeAddDevice(devpath); + break; - MaybeAddDevice(devpath); - break; - - case SDL_UDEV_DEVICEREMOVED: - MaybeRemoveDevice(devpath); - break; - - default: - break; + case SDL_UDEV_DEVICEREMOVED: + MaybeRemoveDevice(devpath); + break; + + default: + break; } - } #endif /* SDL_USE_LIBUDEV */ -static void -FreeJoylistItem(SDL_joylist_item *item) +static void FreeJoylistItem(SDL_joylist_item *item) { SDL_free(item->mapping); SDL_free(item->path); @@ -294,8 +331,7 @@ FreeJoylistItem(SDL_joylist_item *item) SDL_free(item); } -static int -MaybeAddDevice(const char *path) +static int MaybeAddDevice(const char *path) { struct stat sb; int fd = -1; @@ -315,7 +351,7 @@ MaybeAddDevice(const char *path) /* Check to make sure it's not already in list. */ for (item = SDL_joylist; item != NULL; item = item->next) { if (sb.st_rdev == item->devnum) { - return -1; /* already have this one */ + return -1; /* already have this one */ } } @@ -334,7 +370,7 @@ MaybeAddDevice(const char *path) return -1; } - item = (SDL_joylist_item *) SDL_calloc(1, sizeof (SDL_joylist_item)); + item = (SDL_joylist_item *)SDL_calloc(1, sizeof(SDL_joylist_item)); if (item == NULL) { SDL_free(name); return -1; @@ -346,8 +382,8 @@ MaybeAddDevice(const char *path) item->guid = guid; if ((item->path == NULL) || (item->name == NULL)) { - FreeJoylistItem(item); - return -1; + FreeJoylistItem(item); + return -1; } item->device_instance = SDL_GetNextJoystickInstanceID(); @@ -366,8 +402,7 @@ MaybeAddDevice(const char *path) return numjoysticks; } -static void -RemoveJoylistItem(SDL_joylist_item *item, SDL_joylist_item *prev) +static void RemoveJoylistItem(SDL_joylist_item *item, SDL_joylist_item *prev) { if (item->hwdata) { item->hwdata->item = NULL; @@ -391,8 +426,7 @@ RemoveJoylistItem(SDL_joylist_item *item, SDL_joylist_item *prev) FreeJoylistItem(item); } -static int -MaybeRemoveDevice(const char *path) +static int MaybeRemoveDevice(const char *path) { SDL_joylist_item *item; SDL_joylist_item *prev = NULL; @@ -414,8 +448,7 @@ MaybeRemoveDevice(const char *path) return -1; } -static void -HandlePendingRemovals(void) +static void HandlePendingRemovals(void) { SDL_joylist_item *prev = NULL; SDL_joylist_item *item = SDL_joylist; @@ -440,7 +473,7 @@ static SDL_bool SteamControllerConnectedCallback(const char *name, SDL_JoystickG { SDL_joylist_item *item; - item = (SDL_joylist_item *) SDL_calloc(1, sizeof (SDL_joylist_item)); + item = (SDL_joylist_item *)SDL_calloc(1, sizeof(SDL_joylist_item)); if (item == NULL) { return SDL_FALSE; } @@ -451,8 +484,8 @@ static SDL_bool SteamControllerConnectedCallback(const char *name, SDL_JoystickG item->m_bSteamController = SDL_TRUE; if ((item->path == NULL) || (item->name == NULL)) { - FreeJoylistItem(item); - return SDL_FALSE; + FreeJoylistItem(item); + return SDL_FALSE; } *device_instance = item->device_instance = SDL_GetNextJoystickInstanceID(); @@ -486,14 +519,12 @@ static void SteamControllerDisconnectedCallback(int device_instance) } } -static int -StrHasPrefix(const char *string, const char *prefix) +static int StrHasPrefix(const char *string, const char *prefix) { - return (SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0); + return SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0; } -static int -StrIsInteger(const char *string) +static int StrIsInteger(const char *string) { const char *p; @@ -510,28 +541,25 @@ StrIsInteger(const char *string) return 1; } -static SDL_bool -IsJoystickJSNode(const char *node) +static SDL_bool IsJoystickJSNode(const char *node) { const char *last_slash = SDL_strrchr(node, '/'); if (last_slash) { node = last_slash + 1; } - return (StrHasPrefix(node, "js") && StrIsInteger(node + 2)); + return StrHasPrefix(node, "js") && StrIsInteger(node + 2); } -static SDL_bool -IsJoystickEventNode(const char *node) +static SDL_bool IsJoystickEventNode(const char *node) { const char *last_slash = SDL_strrchr(node, '/'); if (last_slash) { node = last_slash + 1; } - return (StrHasPrefix(node, "event") && StrIsInteger(node + 5)); + return StrHasPrefix(node, "event") && StrIsInteger(node + 5); } -static SDL_bool -IsJoystickDeviceNode(const char *node) +static SDL_bool IsJoystickDeviceNode(const char *node) { if (SDL_classic_joysticks) { return IsJoystickJSNode(node); @@ -542,58 +570,60 @@ IsJoystickDeviceNode(const char *node) #ifdef HAVE_INOTIFY #ifdef HAVE_INOTIFY_INIT1 -static int SDL_inotify_init1(void) { +static int SDL_inotify_init1(void) +{ return inotify_init1(IN_NONBLOCK | IN_CLOEXEC); } #else -static int SDL_inotify_init1(void) { +static int SDL_inotify_init1(void) +{ int fd = inotify_init(); - if (fd < 0) return -1; + if (fd < 0) { + return -1; + } fcntl(fd, F_SETFL, O_NONBLOCK); fcntl(fd, F_SETFD, FD_CLOEXEC); return fd; } #endif -static void -LINUX_InotifyJoystickDetect(void) +static void LINUX_InotifyJoystickDetect(void) { union { struct inotify_event event; char storage[4096]; - char enough_for_inotify[sizeof (struct inotify_event) + NAME_MAX + 1]; + char enough_for_inotify[sizeof(struct inotify_event) + NAME_MAX + 1]; } buf; ssize_t bytes; size_t remain = 0; size_t len; char path[PATH_MAX]; - bytes = read(inotify_fd, &buf, sizeof (buf)); + bytes = read(inotify_fd, &buf, sizeof(buf)); if (bytes > 0) { - remain = (size_t) bytes; + remain = (size_t)bytes; } while (remain > 0) { if (buf.event.len > 0) { if (IsJoystickDeviceNode(buf.event.name)) { - SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", buf.event.name); + (void)SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", buf.event.name); if (buf.event.mask & (IN_CREATE | IN_MOVED_TO | IN_ATTRIB)) { MaybeAddDevice(path); - } - else if (buf.event.mask & (IN_DELETE | IN_MOVED_FROM)) { + } else if (buf.event.mask & (IN_DELETE | IN_MOVED_FROM)) { MaybeRemoveDevice(path); } } } - len = sizeof (struct inotify_event) + buf.event.len; + len = sizeof(struct inotify_event) + buf.event.len; remain -= len; if (remain != 0) { - SDL_memmove (&buf.storage[0], &buf.storage[len], remain); + SDL_memmove(&buf.storage[0], &buf.storage[len], remain); } } } @@ -606,11 +636,11 @@ static int get_event_joystick_index(int event) struct dirent **entries = NULL; char path[PATH_MAX]; - SDL_snprintf(path, SDL_arraysize(path), "/sys/class/input/event%d/device", event); + (void)SDL_snprintf(path, SDL_arraysize(path), "/sys/class/input/event%d/device", event); count = scandir(path, &entries, NULL, alphasort); for (i = 0; i < count; ++i) { if (SDL_strncmp(entries[i]->d_name, "js", 2) == 0) { - joystick_index = SDL_atoi(entries[i]->d_name+2); + joystick_index = SDL_atoi(entries[i]->d_name + 2); } free(entries[i]); /* This should NOT be SDL_free() */ } @@ -623,13 +653,11 @@ static int get_event_joystick_index(int event) * have to do this the first time, to detect devices that already existed * before we started; in the non-inotify code path we do this repeatedly * (polling). */ -static int -filter_entries(const struct dirent *entry) +static int filter_entries(const struct dirent *entry) { return IsJoystickDeviceNode(entry->d_name); } -static int -sort_entries(const void *_a, const void *_b) +static int sort_entries(const void *_a, const void *_b) { const struct dirent **a = (const struct dirent **)_a; const struct dirent **b = (const struct dirent **)_b; @@ -638,12 +666,12 @@ sort_entries(const void *_a, const void *_b) if (SDL_classic_joysticks) { offset = 2; /* strlen("js") */ - numA = SDL_atoi((*a)->d_name+offset); - numB = SDL_atoi((*b)->d_name+offset); + numA = SDL_atoi((*a)->d_name + offset); + numB = SDL_atoi((*b)->d_name + offset); } else { offset = 5; /* strlen("event") */ - numA = SDL_atoi((*a)->d_name+offset); - numB = SDL_atoi((*b)->d_name+offset); + numA = SDL_atoi((*a)->d_name + offset); + numB = SDL_atoi((*b)->d_name + offset); /* See if we can get the joystick ordering */ { @@ -659,13 +687,12 @@ sort_entries(const void *_a, const void *_b) } } } - return (numA - numB); + return numA - numB; } -static void -LINUX_FallbackJoystickDetect(void) +static void LINUX_FallbackJoystickDetect(void) { - const Uint32 SDL_JOY_DETECT_INTERVAL_MS = 3000; /* Update every 3 seconds */ + const Uint32 SDL_JOY_DETECT_INTERVAL_MS = 3000; /* Update every 3 seconds */ Uint32 now = SDL_GetTicks(); if (!last_joy_detect_time || SDL_TICKS_PASSED(now, last_joy_detect_time + SDL_JOY_DETECT_INTERVAL_MS)) { @@ -682,7 +709,7 @@ LINUX_FallbackJoystickDetect(void) qsort(entries, count, sizeof(*entries), sort_entries); } for (i = 0; i < count; ++i) { - SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", entries[i]->d_name); + (void)SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", entries[i]->d_name); MaybeAddDevice(path); free(entries[i]); /* This should NOT be SDL_free() */ @@ -696,20 +723,17 @@ LINUX_FallbackJoystickDetect(void) } } -static void -LINUX_JoystickDetect(void) +static void LINUX_JoystickDetect(void) { #if SDL_USE_LIBUDEV if (enumeration_method == ENUMERATION_LIBUDEV) { SDL_UDEV_Poll(); - } - else + } else #endif #ifdef HAVE_INOTIFY - if (inotify_fd >= 0 && last_joy_detect_time != 0) { + if (inotify_fd >= 0 && last_joy_detect_time != 0) { LINUX_InotifyJoystickDetect(); - } - else + } else #endif { LINUX_FallbackJoystickDetect(); @@ -720,8 +744,7 @@ LINUX_JoystickDetect(void) SDL_UpdateSteamControllers(); } -static int -LINUX_JoystickInit(void) +static int LINUX_JoystickInit(void) { const char *devices = SDL_GetHint(SDL_HINT_JOYSTICK_DEVICE); @@ -786,8 +809,7 @@ LINUX_JoystickInit(void) /* Force a scan to build the initial device list */ SDL_UDEV_Scan(); - } - else + } else #endif { #if defined(HAVE_INOTIFY) @@ -796,7 +818,7 @@ LINUX_JoystickInit(void) if (inotify_fd < 0) { SDL_LogWarn(SDL_LOG_CATEGORY_INPUT, "Unable to initialize inotify, falling back to polling: %s", - strerror (errno)); + strerror(errno)); } else { /* We need to watch for attribute changes in addition to * creation, because when a device is first created, it has @@ -809,7 +831,7 @@ LINUX_JoystickInit(void) inotify_fd = -1; SDL_LogWarn(SDL_LOG_CATEGORY_INPUT, "Unable to add inotify watch, falling back to polling: %s", - strerror (errno)); + strerror(errno)); } } #endif /* HAVE_INOTIFY */ @@ -818,14 +840,12 @@ LINUX_JoystickInit(void) return 0; } -static int -LINUX_JoystickGetCount(void) +static int LINUX_JoystickGetCount(void) { return numjoysticks; } -static SDL_joylist_item * -JoystickByDevIndex(int device_index) +static SDL_joylist_item *JoystickByDevIndex(int device_index) { SDL_joylist_item *item = SDL_joylist; @@ -842,80 +862,75 @@ JoystickByDevIndex(int device_index) return item; } -static const char * -LINUX_JoystickGetDeviceName(int device_index) +static const char *LINUX_JoystickGetDeviceName(int device_index) { return JoystickByDevIndex(device_index)->name; } -static const char * -LINUX_JoystickGetDevicePath(int device_index) +static const char *LINUX_JoystickGetDevicePath(int device_index) { return JoystickByDevIndex(device_index)->path; } -static int -LINUX_JoystickGetDevicePlayerIndex(int device_index) +static int LINUX_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -LINUX_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void LINUX_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -LINUX_JoystickGetDeviceGUID( int device_index ) +static SDL_JoystickGUID LINUX_JoystickGetDeviceGUID(int device_index) { return JoystickByDevIndex(device_index)->guid; } /* Function to perform the mapping from device index to the instance id for this index */ -static SDL_JoystickID -LINUX_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID LINUX_JoystickGetDeviceInstanceID(int device_index) { return JoystickByDevIndex(device_index)->device_instance; } -static int -allocate_hatdata(SDL_Joystick *joystick) +static int allocate_hatdata(SDL_Joystick *joystick) { int i; + SDL_AssertJoysticksLocked(); + joystick->hwdata->hats = - (struct hwdata_hat *) SDL_malloc(joystick->nhats * - sizeof(struct hwdata_hat)); + (struct hwdata_hat *)SDL_malloc(joystick->nhats * + sizeof(struct hwdata_hat)); if (joystick->hwdata->hats == NULL) { - return (-1); + return -1; } for (i = 0; i < joystick->nhats; ++i) { joystick->hwdata->hats[i].axis[0] = 1; joystick->hwdata->hats[i].axis[1] = 1; } - return (0); + return 0; } -static int -allocate_balldata(SDL_Joystick *joystick) +static int allocate_balldata(SDL_Joystick *joystick) { int i; + SDL_AssertJoysticksLocked(); + joystick->hwdata->balls = - (struct hwdata_ball *) SDL_malloc(joystick->nballs * - sizeof(struct hwdata_ball)); + (struct hwdata_ball *)SDL_malloc(joystick->nballs * + sizeof(struct hwdata_ball)); if (joystick->hwdata->balls == NULL) { - return (-1); + return -1; } for (i = 0; i < joystick->nballs; ++i) { joystick->hwdata->balls[i].axis[0] = 0; joystick->hwdata->balls[i].axis[1] = 0; } - return (0); + return 0; } -static SDL_bool -GuessIfAxesAreDigitalHat(struct input_absinfo *absinfo_x, struct input_absinfo *absinfo_y) +static SDL_bool GuessIfAxesAreDigitalHat(struct input_absinfo *absinfo_x, struct input_absinfo *absinfo_y) { /* A "hat" is assumed to be a digital input with at most 9 possible states * (3 per axis: negative/zero/positive), as opposed to a true "axis" which @@ -924,29 +939,30 @@ GuessIfAxesAreDigitalHat(struct input_absinfo *absinfo_x, struct input_absinfo * * other continuous analog axis, so we have to guess. */ /* If both axes are missing, they're not anything. */ - if (!absinfo_x && !absinfo_y) + if (absinfo_x == NULL && absinfo_y == NULL) { return SDL_FALSE; + } /* If the hint says so, treat all hats as digital. */ - if (SDL_GetHintBoolean(SDL_HINT_LINUX_DIGITAL_HATS, SDL_FALSE)) + if (SDL_GetHintBoolean(SDL_HINT_LINUX_DIGITAL_HATS, SDL_FALSE)) { return SDL_TRUE; + } /* If both axes have ranges constrained between -1 and 1, they're definitely digital. */ - if ((!absinfo_x || (absinfo_x->minimum == -1 && absinfo_x->maximum == 1)) && - (!absinfo_y || (absinfo_y->minimum == -1 && absinfo_y->maximum == 1))) + if ((absinfo_x == NULL || (absinfo_x->minimum == -1 && absinfo_x->maximum == 1)) && (absinfo_y == NULL || (absinfo_y->minimum == -1 && absinfo_y->maximum == 1))) { return SDL_TRUE; + } /* If both axes lack fuzz, flat, and resolution values, they're probably digital. */ - if ((!absinfo_x || (!absinfo_x->fuzz && !absinfo_x->flat && !absinfo_x->resolution)) && - (!absinfo_y || (!absinfo_y->fuzz && !absinfo_y->flat && !absinfo_y->resolution))) + if ((absinfo_x == NULL || (!absinfo_x->fuzz && !absinfo_x->flat && !absinfo_x->resolution)) && (absinfo_y == NULL || (!absinfo_y->fuzz && !absinfo_y->flat && !absinfo_y->resolution))) { return SDL_TRUE; + } /* Otherwise, treat them as analog. */ return SDL_FALSE; } -static void -ConfigJoystick(SDL_Joystick *joystick, int fd) +static void ConfigJoystick(SDL_Joystick *joystick, int fd) { int i, t; unsigned long keybit[NBITS(KEY_MAX)] = { 0 }; @@ -957,6 +973,8 @@ ConfigJoystick(SDL_Joystick *joystick, int fd) SDL_bool use_deadzones = SDL_GetHintBoolean(SDL_HINT_LINUX_JOYSTICK_DEADZONES, SDL_FALSE); SDL_bool use_hat_deadzones = SDL_GetHintBoolean(SDL_HINT_LINUX_HAT_DEADZONES, SDL_TRUE); + SDL_AssertJoysticksLocked(); + /* See if this device uses the new unified event API */ if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) >= 0) && (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) && @@ -988,12 +1006,14 @@ ConfigJoystick(SDL_Joystick *joystick, int fd) int hat_y = -1; struct input_absinfo absinfo_x; struct input_absinfo absinfo_y; - if (test_bit(i, absbit)) + if (test_bit(i, absbit)) { hat_x = ioctl(fd, EVIOCGABS(i), &absinfo_x); - if (test_bit(i + 1, absbit)) + } + if (test_bit(i + 1, absbit)) { hat_y = ioctl(fd, EVIOCGABS(i + 1), &absinfo_y); - if (GuessIfAxesAreDigitalHat((hat_x < 0 ? (void*)0 : &absinfo_x), - (hat_y < 0 ? (void*)0 : &absinfo_y))) { + } + if (GuessIfAxesAreDigitalHat((hat_x < 0 ? (void *)0 : &absinfo_x), + (hat_y < 0 ? (void *)0 : &absinfo_y))) { const int hat_index = (i - ABS_HAT0X) / 2; struct hat_axis_correct *correct = &joystick->hwdata->hat_correct[hat_index]; #ifdef DEBUG_INPUT_EVENTS @@ -1013,15 +1033,15 @@ ConfigJoystick(SDL_Joystick *joystick, int fd) joystick->hwdata->has_hat[hat_index] = SDL_TRUE; correct->use_deadzones = use_hat_deadzones; correct->minimum[0] = (hat_x < 0) ? -1 : absinfo_x.minimum; - correct->maximum[0] = (hat_x < 0) ? 1 : absinfo_x.maximum; + correct->maximum[0] = (hat_x < 0) ? 1 : absinfo_x.maximum; correct->minimum[1] = (hat_y < 0) ? -1 : absinfo_y.minimum; - correct->maximum[1] = (hat_y < 0) ? 1 : absinfo_y.maximum; + correct->maximum[1] = (hat_y < 0) ? 1 : absinfo_y.maximum; ++joystick->nhats; } } for (i = 0; i < ABS_MAX; ++i) { /* Skip digital hats */ - if (joystick->hwdata->has_hat[(i - ABS_HAT0X) / 2]) { + if (i >= ABS_HAT0X && i <= ABS_HAT3Y && joystick->hwdata->has_hat[(i - ABS_HAT0X) / 2]) { continue; } if (test_bit(i, absbit)) { @@ -1118,9 +1138,9 @@ ConfigJoystick(SDL_Joystick *joystick, int fd) joystick->hwdata->hats_indices[hat_index] = joystick->nhats++; joystick->hwdata->has_hat[hat_index] = SDL_TRUE; joystick->hwdata->hat_correct[hat_index].minimum[0] = -1; - joystick->hwdata->hat_correct[hat_index].maximum[0] = 1; + joystick->hwdata->hat_correct[hat_index].maximum[0] = 1; joystick->hwdata->hat_correct[hat_index].minimum[1] = -1; - joystick->hwdata->hat_correct[hat_index].maximum[1] = 1; + joystick->hwdata->hat_correct[hat_index].maximum[1] = 1; } } else { #ifdef DEBUG_INPUT_EVENTS @@ -1155,15 +1175,15 @@ ConfigJoystick(SDL_Joystick *joystick, int fd) } } - /* This is used to do the heavy lifting for LINUX_JoystickOpen and also LINUX_JoystickGetGamepadMapping, so we can query the hardware without adding an opened SDL_Joystick object to the system. This expects `joystick->hwdata` to be allocated and will not free it on error. Returns -1 on error, 0 on success. */ -static int -PrepareJoystickHwdata(SDL_Joystick *joystick, SDL_joylist_item *item) +static int PrepareJoystickHwdata(SDL_Joystick *joystick, SDL_joylist_item *item) { + SDL_AssertJoysticksLocked(); + joystick->hwdata->item = item; joystick->hwdata->guid = item->guid; joystick->hwdata->effect.id = -1; @@ -1203,17 +1223,17 @@ PrepareJoystickHwdata(SDL_Joystick *joystick, SDL_joylist_item *item) return 0; } - /* Function to open a joystick for use. The joystick to open is specified by the device index. This should fill the nbuttons and naxes fields of the joystick structure. It returns 0, or -1 if there is an error. */ -static int -LINUX_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int LINUX_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_joylist_item *item = JoystickByDevIndex(device_index); + SDL_AssertJoysticksLocked(); + if (item == NULL) { return SDL_SetError("No such device"); } @@ -1228,7 +1248,7 @@ LINUX_JoystickOpen(SDL_Joystick *joystick, int device_index) if (PrepareJoystickHwdata(joystick, item) == -1) { SDL_free(joystick->hwdata); joystick->hwdata = NULL; - return -1; /* SDL_SetError will already have been called */ + return -1; /* SDL_SetError will already have been called */ } SDL_assert(item->hwdata == NULL); @@ -1240,11 +1260,12 @@ LINUX_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static int -LINUX_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int LINUX_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { struct input_event event; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata->ff_rumble) { struct ff_effect *effect = &joystick->hwdata->effect; @@ -1282,17 +1303,17 @@ LINUX_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 return 0; } -static int -LINUX_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int LINUX_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -LINUX_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 LINUX_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata->ff_rumble || joystick->hwdata->ff_sine) { result |= SDL_JOYCAP_RUMBLE; } @@ -1300,36 +1321,35 @@ LINUX_JoystickGetCapabilities(SDL_Joystick *joystick) return result; } -static int -LINUX_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int LINUX_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -LINUX_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int LINUX_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -LINUX_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int LINUX_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -HandleHat(SDL_Joystick *stick, int hatidx, int axis, int value) +static void HandleHat(SDL_Joystick *stick, int hatidx, int axis, int value) { - const int hatnum = stick->hwdata->hats_indices[hatidx]; + int hatnum; struct hwdata_hat *the_hat; struct hat_axis_correct *correct; const Uint8 position_map[3][3] = { - {SDL_HAT_LEFTUP, SDL_HAT_UP, SDL_HAT_RIGHTUP}, - {SDL_HAT_LEFT, SDL_HAT_CENTERED, SDL_HAT_RIGHT}, - {SDL_HAT_LEFTDOWN, SDL_HAT_DOWN, SDL_HAT_RIGHTDOWN} + { SDL_HAT_LEFTUP, SDL_HAT_UP, SDL_HAT_RIGHTUP }, + { SDL_HAT_LEFT, SDL_HAT_CENTERED, SDL_HAT_RIGHT }, + { SDL_HAT_LEFTDOWN, SDL_HAT_DOWN, SDL_HAT_RIGHTDOWN } }; + SDL_AssertJoysticksLocked(); + + hatnum = stick->hwdata->hats_indices[hatidx]; the_hat = &stick->hwdata->hats[hatnum]; correct = &stick->hwdata->hat_correct[hatidx]; /* Hopefully we detected any analog axes and left them as is rather than trying @@ -1365,18 +1385,19 @@ HandleHat(SDL_Joystick *stick, int hatidx, int axis, int value) } } -static void -HandleBall(SDL_Joystick *stick, Uint8 ball, int axis, int value) +static void HandleBall(SDL_Joystick *stick, Uint8 ball, int axis, int value) { + SDL_AssertJoysticksLocked(); + stick->hwdata->balls[ball].axis[axis] += value; } - -static int -AxisCorrect(SDL_Joystick *joystick, int which, int value) +static int AxisCorrect(SDL_Joystick *joystick, int which, int value) { struct axis_correct *correct; + SDL_AssertJoysticksLocked(); + correct = &joystick->hwdata->abs_correct[which]; if (correct->minimum != correct->maximum) { if (correct->use_deadzones) { @@ -1406,13 +1427,14 @@ AxisCorrect(SDL_Joystick *joystick, int which, int value) return value; } -static void -PollAllValues(SDL_Joystick *joystick) +static void PollAllValues(SDL_Joystick *joystick) { struct input_absinfo absinfo; unsigned long keyinfo[NBITS(KEY_MAX)]; int i; + SDL_AssertJoysticksLocked(); + /* Poll all axis */ for (i = ABS_X; i < ABS_MAX; i++) { /* We don't need to test for digital hats here, they won't have has_abs[] set */ @@ -1422,11 +1444,11 @@ PollAllValues(SDL_Joystick *joystick) #ifdef DEBUG_INPUT_EVENTS SDL_Log("Joystick : Re-read Axis %d (%d) val= %d\n", - joystick->hwdata->abs_map[i], i, absinfo.value); + joystick->hwdata->abs_map[i], i, absinfo.value); #endif SDL_PrivateJoystickAxis(joystick, - joystick->hwdata->abs_map[i], - absinfo.value); + joystick->hwdata->abs_map[i], + absinfo.value); } } } @@ -1447,16 +1469,16 @@ PollAllValues(SDL_Joystick *joystick) /* Poll all buttons */ SDL_zeroa(keyinfo); - if (ioctl(joystick->hwdata->fd, EVIOCGKEY(sizeof (keyinfo)), keyinfo) >= 0) { + if (ioctl(joystick->hwdata->fd, EVIOCGKEY(sizeof(keyinfo)), keyinfo) >= 0) { for (i = 0; i < KEY_MAX; i++) { if (joystick->hwdata->has_key[i]) { const Uint8 value = test_bit(i, keyinfo) ? SDL_PRESSED : SDL_RELEASED; #ifdef DEBUG_INPUT_EVENTS SDL_Log("Joystick : Re-read Button %d (%d) val= %d\n", - joystick->hwdata->key_map[i], i, value); + joystick->hwdata->key_map[i], i, value); #endif SDL_PrivateJoystickButton(joystick, - joystick->hwdata->key_map[i], value); + joystick->hwdata->key_map[i], value); } } } @@ -1464,26 +1486,27 @@ PollAllValues(SDL_Joystick *joystick) /* Joyballs are relative input, so there's no poll state. Events only! */ } -static void -HandleInputEvents(SDL_Joystick *joystick) +static void HandleInputEvents(SDL_Joystick *joystick) { struct input_event events[32]; int i, len, code, hat_index; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata->fresh) { PollAllValues(joystick); joystick->hwdata->fresh = SDL_FALSE; } - while ((len = read(joystick->hwdata->fd, events, (sizeof events))) > 0) { + while ((len = read(joystick->hwdata->fd, events, sizeof(events))) > 0) { len /= sizeof(events[0]); for (i = 0; i < len; ++i) { code = events[i].code; /* If the kernel sent a SYN_DROPPED, we are supposed to ignore the rest of the packet (the end of it signified by a SYN_REPORT) */ - if ( joystick->hwdata->recovering_from_dropped && - ((events[i].type != EV_SYN) || (code != SYN_REPORT)) ) { + if (joystick->hwdata->recovering_from_dropped && + ((events[i].type != EV_SYN) || (code != SYN_REPORT))) { continue; } @@ -1508,6 +1531,7 @@ HandleInputEvents(SDL_Joystick *joystick) HandleHat(joystick, hat_index, code % 2, events[i].value); break; } + SDL_FALLTHROUGH; default: events[i].value = AxisCorrect(joystick, code, events[i].value); SDL_PrivateJoystickAxis(joystick, @@ -1529,16 +1553,16 @@ HandleInputEvents(SDL_Joystick *joystick) break; case EV_SYN: switch (code) { - case SYN_DROPPED : + case SYN_DROPPED: #ifdef DEBUG_INPUT_EVENTS SDL_Log("Event SYN_DROPPED detected\n"); #endif joystick->hwdata->recovering_from_dropped = SDL_TRUE; break; - case SYN_REPORT : + case SYN_REPORT: if (joystick->hwdata->recovering_from_dropped) { joystick->hwdata->recovering_from_dropped = SDL_FALSE; - PollAllValues(joystick); /* try to sync up to current state now */ + PollAllValues(joystick); /* try to sync up to current state now */ } break; default: @@ -1556,14 +1580,15 @@ HandleInputEvents(SDL_Joystick *joystick) } } -static void -HandleClassicEvents(SDL_Joystick *joystick) +static void HandleClassicEvents(SDL_Joystick *joystick) { struct js_event events[32]; int i, len, code, hat_index; + SDL_AssertJoysticksLocked(); + joystick->hwdata->fresh = SDL_FALSE; - while ((len = read(joystick->hwdata->fd, events, (sizeof events))) > 0) { + while ((len = read(joystick->hwdata->fd, events, sizeof(events))) > 0) { len /= sizeof(events[0]); for (i = 0; i < len; ++i) { switch (events[i].type) { @@ -1589,6 +1614,7 @@ HandleClassicEvents(SDL_Joystick *joystick) HandleHat(joystick, hat_index, code % 2, events[i].value); break; } + SDL_FALLTHROUGH; default: SDL_PrivateJoystickAxis(joystick, joystick->hwdata->abs_map[code], @@ -1600,11 +1626,12 @@ HandleClassicEvents(SDL_Joystick *joystick) } } -static void -LINUX_JoystickUpdate(SDL_Joystick *joystick) +static void LINUX_JoystickUpdate(SDL_Joystick *joystick) { int i; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata->m_bSteamController) { SDL_UpdateSteamController(joystick); return; @@ -1625,15 +1652,16 @@ LINUX_JoystickUpdate(SDL_Joystick *joystick) if (xrel || yrel) { joystick->hwdata->balls[i].axis[0] = 0; joystick->hwdata->balls[i].axis[1] = 0; - SDL_PrivateJoystickBall(joystick, (Uint8) i, xrel, yrel); + SDL_PrivateJoystickBall(joystick, (Uint8)i, xrel, yrel); } } } /* Function to close a joystick after use */ -static void -LINUX_JoystickClose(SDL_Joystick *joystick) +static void LINUX_JoystickClose(SDL_Joystick *joystick) { + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { if (joystick->hwdata->effect.id >= 0) { ioctl(joystick->hwdata->fd, EVIOCRMFF, joystick->hwdata->effect.id); @@ -1655,8 +1683,7 @@ LINUX_JoystickClose(SDL_Joystick *joystick) } /* Function to perform any system-specific joystick related cleanup */ -static void -LINUX_JoystickQuit(void) +static void LINUX_JoystickQuit(void) { SDL_joylist_item *item = NULL; SDL_joylist_item *next = NULL; @@ -1688,14 +1715,28 @@ LINUX_JoystickQuit(void) /* This is based on the Linux Gamepad Specification available at: https://www.kernel.org/doc/html/v4.15/input/gamepad.html + and the Android gamepad documentation, + https://developer.android.com/develop/ui/views/touch-and-input/game-controllers/controller-input */ -static SDL_bool -LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { SDL_Joystick *joystick; SDL_joylist_item *item = JoystickByDevIndex(device_index); + enum { + MAPPED_TRIGGER_LEFT = 0x1, + MAPPED_TRIGGER_RIGHT = 0x2, + MAPPED_TRIGGER_BOTH = 0x3, + + MAPPED_DPAD_UP = 0x1, + MAPPED_DPAD_DOWN = 0x2, + MAPPED_DPAD_LEFT = 0x4, + MAPPED_DPAD_RIGHT = 0x8, + MAPPED_DPAD_ALL = 0xF, + }; unsigned int mapped; + SDL_AssertJoysticksLocked(); + if (item->checked_mapping) { if (item->mapping) { SDL_memcpy(out, item->mapping, sizeof(*out)); @@ -1710,7 +1751,8 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) /* We temporarily open the device to check how it's configured. Make a fake SDL_Joystick object to do so. */ - joystick = (SDL_Joystick *) SDL_calloc(sizeof(*joystick), 1); + joystick = (SDL_Joystick *)SDL_calloc(sizeof(*joystick), 1); + joystick->magic = &SDL_joystick_magic; if (joystick == NULL) { SDL_OutOfMemory(); return SDL_FALSE; @@ -1730,7 +1772,7 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) if (PrepareJoystickHwdata(joystick, item) == -1) { SDL_free(joystick->hwdata); SDL_free(joystick); - return SDL_FALSE; /* SDL_SetError will already have been called */ + return SDL_FALSE; /* SDL_SetError will already have been called */ } /* don't assign `item->hwdata` so it's not in any global state. */ @@ -1746,6 +1788,10 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) /* We have a gamepad, start filling out the mappings */ +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapping %s (VID/PID 0x%.4x/0x%.4x)", item->name, SDL_JoystickGetVendor(joystick), SDL_JoystickGetProduct(joystick)); +#endif + if (joystick->hwdata->has_key[BTN_A]) { out->a.kind = EMappingKind_Button; out->a.target = joystick->hwdata->key_map[BTN_A]; @@ -1896,63 +1942,94 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) /* Prefer analog triggers, but settle for digital hat or buttons. */ mapped = 0; + /* Unfortunately there are several conventions for how analog triggers + * are represented as absolute axes: + * + * - Linux Gamepad Specification: + * LT = ABS_HAT2Y, RT = ABS_HAT2X + * - Android (and therefore many Bluetooth controllers): + * LT = ABS_BRAKE, RT = ABS_GAS + * - De facto standard for older Xbox and Playstation controllers: + * LT = ABS_Z, RT = ABS_RZ + * + * We try each one in turn. */ if (joystick->hwdata->has_abs[ABS_HAT2Y]) { + /* Linux Gamepad Specification */ out->lefttrigger.kind = EMappingKind_Axis; out->lefttrigger.target = joystick->hwdata->abs_map[ABS_HAT2Y]; - mapped |= 0x1; + mapped |= MAPPED_TRIGGER_LEFT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped LEFTTRIGGER to axis %d (ABS_HAT2Y)", out->lefttrigger.target); +#endif + } else if (joystick->hwdata->has_abs[ABS_BRAKE]) { + /* Android convention */ + out->lefttrigger.kind = EMappingKind_Axis; + out->lefttrigger.target = joystick->hwdata->abs_map[ABS_BRAKE]; + mapped |= MAPPED_TRIGGER_LEFT; +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapped LEFTTRIGGER to axis %d (ABS_BRAKE)", out->lefttrigger.target); #endif } else if (joystick->hwdata->has_abs[ABS_Z]) { + /* De facto standard for Xbox 360 and Playstation gamepads */ out->lefttrigger.kind = EMappingKind_Axis; out->lefttrigger.target = joystick->hwdata->abs_map[ABS_Z]; - mapped |= 0x1; + mapped |= MAPPED_TRIGGER_LEFT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped LEFTTRIGGER to axis %d (ABS_Z)", out->lefttrigger.target); #endif } if (joystick->hwdata->has_abs[ABS_HAT2X]) { + /* Linux Gamepad Specification */ out->righttrigger.kind = EMappingKind_Axis; out->righttrigger.target = joystick->hwdata->abs_map[ABS_HAT2X]; - mapped |= 0x2; + mapped |= MAPPED_TRIGGER_RIGHT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped RIGHTTRIGGER to axis %d (ABS_HAT2X)", out->righttrigger.target); +#endif + } else if (joystick->hwdata->has_abs[ABS_GAS]) { + /* Android convention */ + out->righttrigger.kind = EMappingKind_Axis; + out->righttrigger.target = joystick->hwdata->abs_map[ABS_GAS]; + mapped |= MAPPED_TRIGGER_RIGHT; +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapped RIGHTTRIGGER to axis %d (ABS_GAS)", out->righttrigger.target); #endif } else if (joystick->hwdata->has_abs[ABS_RZ]) { + /* De facto standard for Xbox 360 and Playstation gamepads */ out->righttrigger.kind = EMappingKind_Axis; out->righttrigger.target = joystick->hwdata->abs_map[ABS_RZ]; - mapped |= 0x2; + mapped |= MAPPED_TRIGGER_RIGHT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped RIGHTTRIGGER to axis %d (ABS_RZ)", out->righttrigger.target); #endif } - if (mapped != 0x3 && joystick->hwdata->has_hat[2]) { + if (mapped != MAPPED_TRIGGER_BOTH && joystick->hwdata->has_hat[2]) { int hat = joystick->hwdata->hats_indices[2] << 4; out->lefttrigger.kind = EMappingKind_Hat; out->righttrigger.kind = EMappingKind_Hat; out->lefttrigger.target = hat | 0x4; out->righttrigger.target = hat | 0x2; - mapped |= 0x3; + mapped |= MAPPED_TRIGGER_BOTH; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped LEFT+RIGHTTRIGGER to hat 2 (ABS_HAT2X, ABS_HAT2Y)"); #endif } - if (!(mapped & 0x1) && joystick->hwdata->has_key[BTN_TL2]) { + if (!(mapped & MAPPED_TRIGGER_LEFT) && joystick->hwdata->has_key[BTN_TL2]) { out->lefttrigger.kind = EMappingKind_Button; out->lefttrigger.target = joystick->hwdata->key_map[BTN_TL2]; - mapped |= 0x1; + mapped |= MAPPED_TRIGGER_LEFT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped LEFTTRIGGER to button %d (BTN_TL2)", out->lefttrigger.target); #endif } - if (!(mapped & 0x2) && joystick->hwdata->has_key[BTN_TR2]) { + if (!(mapped & MAPPED_TRIGGER_RIGHT) && joystick->hwdata->has_key[BTN_TR2]) { out->righttrigger.kind = EMappingKind_Button; out->righttrigger.target = joystick->hwdata->key_map[BTN_TR2]; - mapped |= 0x2; + mapped |= MAPPED_TRIGGER_RIGHT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped RIGHTTRIGGER to button %d (BTN_TR2)", out->righttrigger.target); #endif @@ -1964,7 +2041,7 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) if (joystick->hwdata->has_key[BTN_DPAD_UP]) { out->dpup.kind = EMappingKind_Button; out->dpup.target = joystick->hwdata->key_map[BTN_DPAD_UP]; - mapped |= 0x1; + mapped |= MAPPED_DPAD_UP; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped DPUP to button %d (BTN_DPAD_UP)", out->dpup.target); #endif @@ -1973,7 +2050,7 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) if (joystick->hwdata->has_key[BTN_DPAD_DOWN]) { out->dpdown.kind = EMappingKind_Button; out->dpdown.target = joystick->hwdata->key_map[BTN_DPAD_DOWN]; - mapped |= 0x2; + mapped |= MAPPED_DPAD_DOWN; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped DPDOWN to button %d (BTN_DPAD_DOWN)", out->dpdown.target); #endif @@ -1982,7 +2059,7 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) if (joystick->hwdata->has_key[BTN_DPAD_LEFT]) { out->dpleft.kind = EMappingKind_Button; out->dpleft.target = joystick->hwdata->key_map[BTN_DPAD_LEFT]; - mapped |= 0x4; + mapped |= MAPPED_DPAD_LEFT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped DPLEFT to button %d (BTN_DPAD_LEFT)", out->dpleft.target); #endif @@ -1991,13 +2068,13 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) if (joystick->hwdata->has_key[BTN_DPAD_RIGHT]) { out->dpright.kind = EMappingKind_Button; out->dpright.target = joystick->hwdata->key_map[BTN_DPAD_RIGHT]; - mapped |= 0x8; + mapped |= MAPPED_DPAD_RIGHT; #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped DPRIGHT to button %d (BTN_DPAD_RIGHT)", out->dpright.target); #endif } - if (mapped != 0xF) { + if (mapped != MAPPED_DPAD_ALL) { if (joystick->hwdata->has_hat[0]) { int hat = joystick->hwdata->hats_indices[0] << 4; out->dpleft.kind = EMappingKind_Hat; @@ -2008,9 +2085,9 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) out->dpright.target = hat | 0x2; out->dpup.target = hat | 0x1; out->dpdown.target = hat | 0x4; - mapped |= 0xF; + mapped |= MAPPED_DPAD_ALL; #ifdef DEBUG_GAMEPAD_MAPPING - SDL_Log("Mapped DPUP+DOWN+LEFT+RIGHT to hat 0 (ABS_HAT0X, ABS_HAT0Y)"); + SDL_Log("Mapped DPUP+DOWN+LEFT+RIGHT to hat 0 (ABS_HAT0X, ABS_HAT0Y)"); #endif } else if (joystick->hwdata->has_abs[ABS_HAT0X] && joystick->hwdata->has_abs[ABS_HAT0Y]) { out->dpleft.kind = EMappingKind_Axis; @@ -2021,10 +2098,10 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) out->dpright.target = joystick->hwdata->abs_map[ABS_HAT0X]; out->dpup.target = joystick->hwdata->abs_map[ABS_HAT0Y]; out->dpdown.target = joystick->hwdata->abs_map[ABS_HAT0Y]; - mapped |= 0xF; + mapped |= MAPPED_DPAD_ALL; #ifdef DEBUG_GAMEPAD_MAPPING - SDL_Log("Mapped DPUP+DOWN to axis %d (ABS_HAT0Y)", out->dpup.target); - SDL_Log("Mapped DPLEFT+RIGHT to axis %d (ABS_HAT0X)", out->dpleft.target); + SDL_Log("Mapped DPUP+DOWN to axis %d (ABS_HAT0Y)", out->dpup.target); + SDL_Log("Mapped DPLEFT+RIGHT to axis %d (ABS_HAT0X)", out->dpleft.target); #endif } } @@ -2040,7 +2117,16 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) #endif } + /* The Linux Gamepad Specification uses the RX and RY axes, + * originally intended to represent X and Y rotation, as a second + * joystick. This is common for USB gamepads, and also many Bluetooth + * gamepads, particularly older ones. + * + * The Android mapping convention used by many Bluetooth controllers + * instead uses the Z axis as a secondary X axis, and the RZ axis as + * a secondary Y axis. */ if (joystick->hwdata->has_abs[ABS_RX] && joystick->hwdata->has_abs[ABS_RY]) { + /* Linux Gamepad Specification, Xbox 360, Playstation etc. */ out->rightx.kind = EMappingKind_Axis; out->righty.kind = EMappingKind_Axis; out->rightx.target = joystick->hwdata->abs_map[ABS_RX]; @@ -2048,9 +2134,51 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) #ifdef DEBUG_GAMEPAD_MAPPING SDL_Log("Mapped RIGHTX to axis %d (ABS_RX)", out->rightx.target); SDL_Log("Mapped RIGHTY to axis %d (ABS_RY)", out->righty.target); +#endif + } else if (joystick->hwdata->has_abs[ABS_Z] && joystick->hwdata->has_abs[ABS_RZ]) { + /* Android convention */ + out->rightx.kind = EMappingKind_Axis; + out->righty.kind = EMappingKind_Axis; + out->rightx.target = joystick->hwdata->abs_map[ABS_Z]; + out->righty.target = joystick->hwdata->abs_map[ABS_RZ]; +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapped RIGHTX to axis %d (ABS_Z)", out->rightx.target); + SDL_Log("Mapped RIGHTY to axis %d (ABS_RZ)", out->righty.target); #endif } + if (SDL_JoystickGetVendor(joystick) == USB_VENDOR_MICROSOFT) { + /* The Xbox Elite controllers have the paddles as BTN_TRIGGER_HAPPY5 - BTN_TRIGGER_HAPPY8 */ + if (joystick->hwdata->has_key[BTN_TRIGGER_HAPPY5] && + joystick->hwdata->has_key[BTN_TRIGGER_HAPPY6] && + joystick->hwdata->has_key[BTN_TRIGGER_HAPPY7] && + joystick->hwdata->has_key[BTN_TRIGGER_HAPPY8]) { + out->paddle1.kind = EMappingKind_Button; + out->paddle1.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY5]; + out->paddle2.kind = EMappingKind_Button; + out->paddle2.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY7]; + out->paddle3.kind = EMappingKind_Button; + out->paddle3.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY6]; + out->paddle4.kind = EMappingKind_Button; + out->paddle4.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY8]; +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapped PADDLE1 to button %d (BTN_TRIGGER_HAPPY5)", out->paddle1.target); + SDL_Log("Mapped PADDLE2 to button %d (BTN_TRIGGER_HAPPY7)", out->paddle2.target); + SDL_Log("Mapped PADDLE3 to button %d (BTN_TRIGGER_HAPPY6)", out->paddle3.target); + SDL_Log("Mapped PADDLE4 to button %d (BTN_TRIGGER_HAPPY8)", out->paddle4.target); +#endif + } + + /* The Xbox Series X controllers have the Share button as KEY_RECORD */ + if (joystick->hwdata->has_key[KEY_RECORD]) { + out->misc1.kind = EMappingKind_Button; + out->misc1.target = joystick->hwdata->key_map[KEY_RECORD]; +#ifdef DEBUG_GAMEPAD_MAPPING + SDL_Log("Mapped MISC1 to button %d (KEY_RECORD)", out->misc1.target); +#endif + } + } + LINUX_JoystickClose(joystick); SDL_free(joystick); @@ -2066,8 +2194,7 @@ LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) return SDL_TRUE; } -SDL_JoystickDriver SDL_LINUX_JoystickDriver = -{ +SDL_JoystickDriver SDL_LINUX_JoystickDriver = { LINUX_JoystickInit, LINUX_JoystickGetCount, LINUX_JoystickDetect, diff --git a/modules/SDL2/src/joystick/linux/SDL_sysjoystick_c.h b/modules/SDL2/src/joystick/linux/SDL_sysjoystick_c.h index 79e7ab4..a567312 100644 --- a/modules/SDL2/src/joystick/linux/SDL_sysjoystick_c.h +++ b/modules/SDL2/src/joystick/linux/SDL_sysjoystick_c.h @@ -32,7 +32,7 @@ struct joystick_hwdata int fd; struct SDL_joylist_item *item; SDL_JoystickGUID guid; - char *fname; /* Used in haptic subsystem */ + char *fname; /* Used in haptic subsystem */ SDL_bool ff_rumble; SDL_bool ff_sine; diff --git a/modules/SDL2/src/joystick/n3ds/SDL_sysjoystick.c b/modules/SDL2/src/joystick/n3ds/SDL_sysjoystick.c index 5897bee..49b9937 100644 --- a/modules/SDL2/src/joystick/n3ds/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/n3ds/SDL_sysjoystick.c @@ -50,40 +50,34 @@ SDL_FORCE_INLINE void UpdateN3DSReleasedButtons(SDL_Joystick *joystick); SDL_FORCE_INLINE void UpdateN3DSCircle(SDL_Joystick *joystick); SDL_FORCE_INLINE void UpdateN3DSCStick(SDL_Joystick *joystick); -static int -N3DS_JoystickInit(void) +static int N3DS_JoystickInit(void) { hidInit(); return 0; } -static const char * -N3DS_JoystickGetDeviceName(int device_index) +static const char *N3DS_JoystickGetDeviceName(int device_index) { return "Nintendo 3DS"; } -static int -N3DS_JoystickGetCount(void) +static int N3DS_JoystickGetCount(void) { return 1; } -static SDL_JoystickGUID -N3DS_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID N3DS_JoystickGetDeviceGUID(int device_index) { SDL_JoystickGUID guid = SDL_CreateJoystickGUIDForName("Nintendo 3DS"); return guid; } -static SDL_JoystickID -N3DS_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID N3DS_JoystickGetDeviceInstanceID(int device_index) { return device_index; } -static int -N3DS_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int N3DS_JoystickOpen(SDL_Joystick *joystick, int device_index) { joystick->nbuttons = NB_BUTTONS; joystick->naxes = 4; @@ -93,14 +87,12 @@ N3DS_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static int -N3DS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int N3DS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -N3DS_JoystickUpdate(SDL_Joystick *joystick) +static void N3DS_JoystickUpdate(SDL_Joystick *joystick) { UpdateN3DSPressedButtons(joystick); UpdateN3DSReleasedButtons(joystick); @@ -180,19 +172,16 @@ UpdateN3DSCStick(SDL_Joystick *joystick) previous_state = current_state; } -static void -N3DS_JoystickClose(SDL_Joystick *joystick) +static void N3DS_JoystickClose(SDL_Joystick *joystick) { } -static void -N3DS_JoystickQuit(void) +static void N3DS_JoystickQuit(void) { hidExit(); } -static SDL_bool -N3DS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool N3DS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { /* There is only one possible mapping. */ *out = (SDL_GamepadMapping){ @@ -226,54 +215,45 @@ N3DS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) return SDL_TRUE; } -static void -N3DS_JoystickDetect(void) +static void N3DS_JoystickDetect(void) { } -static const char * -N3DS_JoystickGetDevicePath(int device_index) +static const char *N3DS_JoystickGetDevicePath(int device_index) { return NULL; } -static int -N3DS_JoystickGetDevicePlayerIndex(int device_index) +static int N3DS_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -N3DS_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void N3DS_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static Uint32 -N3DS_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 N3DS_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -static int -N3DS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int N3DS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -static int -N3DS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int N3DS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static int -N3DS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int N3DS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -N3DS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int N3DS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } diff --git a/modules/SDL2/src/joystick/os2/SDL_os2joystick.c b/modules/SDL2/src/joystick/os2/SDL_os2joystick.c index d793997..b7e0376 100644 --- a/modules/SDL2/src/joystick/os2/SDL_os2joystick.c +++ b/modules/SDL2/src/joystick/os2/SDL_os2joystick.c @@ -93,29 +93,29 @@ typedef struct { #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" -static HFILE hJoyPort = NULLHANDLE; /* Joystick GAME$ Port Address */ -#define MAX_JOYSTICKS 2 /* Maximum of two joysticks */ -#define MAX_AXES 4 /* each joystick can have up to 4 axes */ -#define MAX_BUTTONS 8 /* 8 buttons */ -#define MAX_HATS 0 /* 0 hats - OS/2 doesn't support it */ -#define MAX_BALLS 0 /* and 0 balls - OS/2 doesn't support it */ -#define MAX_JOYNAME 128 /* Joystick name may have 128 characters */ +static HFILE hJoyPort = NULLHANDLE; /* Joystick GAME$ Port Address */ +#define MAX_JOYSTICKS 2 /* Maximum of two joysticks */ +#define MAX_AXES 4 /* each joystick can have up to 4 axes */ +#define MAX_BUTTONS 8 /* 8 buttons */ +#define MAX_HATS 0 /* 0 hats - OS/2 doesn't support it */ +#define MAX_BALLS 0 /* and 0 balls - OS/2 doesn't support it */ +#define MAX_JOYNAME 128 /* Joystick name may have 128 characters */ /* Calc Button Flag for buttons A to D */ #define JOY_BUTTON_FLAG(n) (1< MAX_JOYSTICKS) maxdevs = MAX_JOYSTICKS; - - /* Defines min/max axes values (callibration) */ - ulDataLen = sizeof(stGameCalib); - rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_GET_CALIB, - NULL, 0, NULL, &stGameCalib, ulDataLen, &ulDataLen); - if (rc != 0) - { - joyPortClose(&hJoyPort); - return SDL_SetError("Could not read callibration data."); - } - - /* Determine how many joysticks are active */ - numdevs = 0; /* Points no device */ - ucNewJoystickMask = 0x0F; /* read all 4 joystick axis */ - ulDataLen = sizeof(ucNewJoystickMask); - rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_RESET, - &ucNewJoystickMask, ulDataLen, &ulDataLen, NULL, 0, NULL); - if (rc == 0) - { - ulDataLen = sizeof(stJoyStatus); - rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_GET, - NULL, 0, NULL, &stJoyStatus, ulDataLen, &ulDataLen); - if (rc != 0) - { - joyPortClose(&hJoyPort); - return SDL_SetError("Could not call joystick port."); - } - ulLastTick = stJoyStatus.ulJs_Ticks; - while (stJoyStatus.ulJs_Ticks == ulLastTick) - { - rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_GET, - NULL, 0, NULL, &stJoyStatus, ulDataLen, &ulDataLen); - } - if ((stJoyStatus.ucJs_JoyStickMask & 0x03) > 0) numdevs++; - if (((stJoyStatus.ucJs_JoyStickMask >> 2) & 0x03) > 0) numdevs++; - } - - if (numdevs > maxdevs) numdevs = maxdevs; - - /* If *any* joystick was detected... Let's configure SDL for them */ - if (numdevs > 0) - { - /* Verify if it is a "user defined" joystick */ - if (joyGetEnv(&joycfg)) - { - GAME_3POS_STRUCT * axis[4]; - axis[0] = &stGameCalib.Ax; - axis[1] = &stGameCalib.Ay; - axis[2] = &stGameCalib.Bx; - axis[3] = &stGameCalib.By; - - /* Say it has one device only (user defined is always one device only) */ - numdevs = 1; - - /* Define Device 0 as... */ - SYS_JoyData[0].id = 0; - - /* Define Number of Axes... up to 4 */ - if (joycfg.axes>MAX_AXES) joycfg.axes = MAX_AXES; - SYS_JoyData[0].axes = joycfg.axes; - - /* Define number of buttons... 8 if 2 axes, 6 if 3 axes and 4 if 4 axes */ - maxbut = MAX_BUTTONS; - if (joycfg.axes>2) maxbut -= ((joycfg.axes - 2)<<1); /* MAX_BUTTONS - 2*(axes-2) */ - if (joycfg.buttons > maxbut) joycfg.buttons = maxbut; - SYS_JoyData[0].buttons = joycfg.buttons; - - /* Define number of hats */ - if (joycfg.hats > MAX_HATS) joycfg.hats = MAX_HATS; - SYS_JoyData[0].hats = joycfg.hats; - - /* Define number of balls */ - if (joycfg.balls > MAX_BALLS) joycfg.balls = MAX_BALLS; - SYS_JoyData[0].balls = joycfg.balls; - - /* Initialize Axes Callibration Values */ - for (i=0; ilower; - SYS_JoyData[0].axes_med[i] = axis[i]->centre; - SYS_JoyData[0].axes_max[i] = axis[i]->upper; - } - /* Initialize Buttons 5 to 8 structures */ - if (joycfg.buttons>=5) SYS_JoyData[0].buttoncalc[0] = ((axis[2]->lower+axis[3]->centre)>>1); - if (joycfg.buttons>=6) SYS_JoyData[0].buttoncalc[1] = ((axis[3]->lower+axis[3]->centre)>>1); - if (joycfg.buttons>=7) SYS_JoyData[0].buttoncalc[2] = ((axis[2]->upper+axis[3]->centre)>>1); - if (joycfg.buttons>=8) SYS_JoyData[0].buttoncalc[3] = ((axis[3]->upper+axis[3]->centre)>>1); - /* Intialize Joystick Name */ - SDL_strlcpy (SYS_JoyData[0].szDeviceName,joycfg.name, SDL_arraysize(SYS_JoyData[0].szDeviceName)); - } - /* Default Init ... autoconfig */ - else - { - /* if two devices were detected... configure as Joy1 4 axis and Joy2 2 axis */ - if (numdevs == 2) - { - /* Define Device 0 as 4 axes, 4 buttons */ - SYS_JoyData[0].id=0; - SYS_JoyData[0].axes = 4; - SYS_JoyData[0].buttons = 4; - SYS_JoyData[0].hats = 0; - SYS_JoyData[0].balls = 0; - SYS_JoyData[0].axes_min[0] = stGameCalib.Ax.lower; - SYS_JoyData[0].axes_med[0] = stGameCalib.Ax.centre; - SYS_JoyData[0].axes_max[0] = stGameCalib.Ax.upper; - SYS_JoyData[0].axes_min[1] = stGameCalib.Ay.lower; - SYS_JoyData[0].axes_med[1] = stGameCalib.Ay.centre; - SYS_JoyData[0].axes_max[1] = stGameCalib.Ay.upper; - SYS_JoyData[0].axes_min[2] = stGameCalib.Bx.lower; - SYS_JoyData[0].axes_med[2] = stGameCalib.Bx.centre; - SYS_JoyData[0].axes_max[2] = stGameCalib.Bx.upper; - SYS_JoyData[0].axes_min[3] = stGameCalib.By.lower; - SYS_JoyData[0].axes_med[3] = stGameCalib.By.centre; - SYS_JoyData[0].axes_max[3] = stGameCalib.By.upper; - /* Define Device 1 as 2 axes, 2 buttons */ - SYS_JoyData[1].id=1; - SYS_JoyData[1].axes = 2; - SYS_JoyData[1].buttons = 2; - SYS_JoyData[1].hats = 0; - SYS_JoyData[1].balls = 0; - SYS_JoyData[1].axes_min[0] = stGameCalib.Bx.lower; - SYS_JoyData[1].axes_med[0] = stGameCalib.Bx.centre; - SYS_JoyData[1].axes_max[0] = stGameCalib.Bx.upper; - SYS_JoyData[1].axes_min[1] = stGameCalib.By.lower; - SYS_JoyData[1].axes_med[1] = stGameCalib.By.centre; - SYS_JoyData[1].axes_max[1] = stGameCalib.By.upper; - } - /* One joystick only? */ - else - { - /* If it is joystick A... */ - if ((stJoyStatus.ucJs_JoyStickMask & 0x03) > 0) - { - /* Define Device 0 as 2 axes, 4 buttons */ - SYS_JoyData[0].id=0; - SYS_JoyData[0].axes = 2; - SYS_JoyData[0].buttons = 4; - SYS_JoyData[0].hats = 0; - SYS_JoyData[0].balls = 0; - SYS_JoyData[0].axes_min[0] = stGameCalib.Ax.lower; - SYS_JoyData[0].axes_med[0] = stGameCalib.Ax.centre; - SYS_JoyData[0].axes_max[0] = stGameCalib.Ax.upper; - SYS_JoyData[0].axes_min[1] = stGameCalib.Ay.lower; - SYS_JoyData[0].axes_med[1] = stGameCalib.Ay.centre; - SYS_JoyData[0].axes_max[1] = stGameCalib.Ay.upper; - } - /* If not, it is joystick B */ - else - { - /* Define Device 1 as 2 axes, 2 buttons */ - SYS_JoyData[0].id=1; - SYS_JoyData[0].axes = 2; - SYS_JoyData[0].buttons = 2; - SYS_JoyData[0].hats = 0; - SYS_JoyData[0].balls = 0; - SYS_JoyData[0].axes_min[0] = stGameCalib.Bx.lower; - SYS_JoyData[0].axes_med[0] = stGameCalib.Bx.centre; - SYS_JoyData[0].axes_max[0] = stGameCalib.Bx.upper; - SYS_JoyData[0].axes_min[1] = stGameCalib.By.lower; - SYS_JoyData[0].axes_med[1] = stGameCalib.By.centre; - SYS_JoyData[0].axes_max[1] = stGameCalib.By.upper; - } - } - - /* Hack to define Joystick Port Names */ - if (numdevs > maxdevs) numdevs = maxdevs; - - for (i = 0; i < numdevs; i++) - { - SDL_snprintf(SYS_JoyData[i].szDeviceName, - SDL_arraysize(SYS_JoyData[i].szDeviceName), - "Default Joystick %c", 'A'+SYS_JoyData[i].id); - } - } - } - /* Return the number of devices found */ - numjoysticks = numdevs; - return numdevs; + APIRET rc; /* Generic OS/2 return code */ + GAME_PORT_STRUCT stJoyStatus; /* Joystick Status Structure */ + GAME_PARM_STRUCT stGameParms; /* Joystick Parameter Structure */ + GAME_CALIB_STRUCT stGameCalib; /* Calibration Struct */ + ULONG ulDataLen; /* Size of data */ + ULONG ulLastTick; /* Tick Counter for timing operations */ + Uint8 maxdevs; /* Maximum number of devices */ + Uint8 numdevs; /* Number of present devices */ + Uint8 maxbut; /* Maximum number of buttons... */ + Uint8 i; /* Temporary Count Vars */ + Uint8 ucNewJoystickMask; /* Mask for Joystick Detection */ + struct _joycfg joycfg; /* Joy Configuration from envvar */ + + /* Open GAME$ port */ + if (joyPortOpen(&hJoyPort) < 0) { + return 0; /* Cannot open... report no joystick */ + } + /* Get Max Number of Devices */ + ulDataLen = sizeof(stGameParms); + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_GET_PARMS, + NULL, 0, NULL, &stGameParms, ulDataLen, &ulDataLen); /* Ask device info */ + if (rc != 0) { + joyPortClose(&hJoyPort); + return SDL_SetError("Could not read joystick port."); + } + maxdevs = 0; + if (stGameParms.useA != 0) { + maxdevs++; + } + if (stGameParms.useB != 0) { + maxdevs++; + } + if (maxdevs > MAX_JOYSTICKS) { + maxdevs = MAX_JOYSTICKS; + } + + /* Defines min/max axes values (callibration) */ + ulDataLen = sizeof(stGameCalib); + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_GET_CALIB, + NULL, 0, NULL, &stGameCalib, ulDataLen, &ulDataLen); + if (rc != 0) { + joyPortClose(&hJoyPort); + return SDL_SetError("Could not read callibration data."); + } + + /* Determine how many joysticks are active */ + numdevs = 0; /* Points no device */ + ucNewJoystickMask = 0x0F; /* read all 4 joystick axis */ + ulDataLen = sizeof(ucNewJoystickMask); + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_RESET, + &ucNewJoystickMask, ulDataLen, &ulDataLen, NULL, 0, NULL); + if (rc == 0) { + ulDataLen = sizeof(stJoyStatus); + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_GET, + NULL, 0, NULL, &stJoyStatus, ulDataLen, &ulDataLen); + if (rc != 0) { + joyPortClose(&hJoyPort); + return SDL_SetError("Could not call joystick port."); + } + ulLastTick = stJoyStatus.ulJs_Ticks; + while (stJoyStatus.ulJs_Ticks == ulLastTick) { + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_PORT_GET, + NULL, 0, NULL, &stJoyStatus, ulDataLen, &ulDataLen); + } + if ((stJoyStatus.ucJs_JoyStickMask & 0x03) > 0) { + numdevs++; + } + if (((stJoyStatus.ucJs_JoyStickMask >> 2) & 0x03) > 0) { + numdevs++; + } + } + + if (numdevs > maxdevs) { + numdevs = maxdevs; + } + + /* If *any* joystick was detected... Let's configure SDL for them */ + if (numdevs > 0) { + /* Verify if it is a "user defined" joystick */ + if (joyGetEnv(&joycfg)) { + GAME_3POS_STRUCT * axis[4]; + axis[0] = &stGameCalib.Ax; + axis[1] = &stGameCalib.Ay; + axis[2] = &stGameCalib.Bx; + axis[3] = &stGameCalib.By; + + /* Say it has one device only (user defined is always one device only) */ + numdevs = 1; + + /* Define Device 0 as... */ + SYS_JoyData[0].id = 0; + + /* Define Number of Axes... up to 4 */ + if (joycfg.axes>MAX_AXES) { + joycfg.axes = MAX_AXES; + } + SYS_JoyData[0].axes = joycfg.axes; + + /* Define number of buttons... 8 if 2 axes, 6 if 3 axes and 4 if 4 axes */ + maxbut = MAX_BUTTONS; + if (joycfg.axes > 2) { + maxbut -= ((joycfg.axes - 2) << 1); /* MAX_BUTTONS - 2*(axes-2) */ + } + if (joycfg.buttons > maxbut) { + joycfg.buttons = maxbut; + } + SYS_JoyData[0].buttons = joycfg.buttons; + + /* Define number of hats */ + if (joycfg.hats > MAX_HATS) { + joycfg.hats = MAX_HATS; + } + SYS_JoyData[0].hats = joycfg.hats; + + /* Define number of balls */ + if (joycfg.balls > MAX_BALLS) { + joycfg.balls = MAX_BALLS; + } + SYS_JoyData[0].balls = joycfg.balls; + + /* Initialize Axes Callibration Values */ + for (i = 0; i < joycfg.axes; i++) { + SYS_JoyData[0].axes_min[i] = axis[i]->lower; + SYS_JoyData[0].axes_med[i] = axis[i]->centre; + SYS_JoyData[0].axes_max[i] = axis[i]->upper; + } + /* Initialize Buttons 5 to 8 structures */ + if (joycfg.buttons >=5 ) { + SYS_JoyData[0].buttoncalc[0] = ((axis[2]->lower + axis[3]->centre) >> 1); + } + if (joycfg.buttons >=6 ) { + SYS_JoyData[0].buttoncalc[1] = ((axis[3]->lower + axis[3]->centre) >> 1); + } + if (joycfg.buttons >=7 ) { + SYS_JoyData[0].buttoncalc[2] = ((axis[2]->upper + axis[3]->centre) >> 1); + } + if (joycfg.buttons >=8 ) { + SYS_JoyData[0].buttoncalc[3] = ((axis[3]->upper + axis[3]->centre) >> 1); + } + /* Intialize Joystick Name */ + SDL_strlcpy (SYS_JoyData[0].szDeviceName,joycfg.name, SDL_arraysize(SYS_JoyData[0].szDeviceName)); + } + /* Default Init ... autoconfig */ + else { + /* if two devices were detected... configure as Joy1 4 axis and Joy2 2 axis */ + if (numdevs == 2) { + /* Define Device 0 as 4 axes, 4 buttons */ + SYS_JoyData[0].id = 0; + SYS_JoyData[0].axes = 4; + SYS_JoyData[0].buttons = 4; + SYS_JoyData[0].hats = 0; + SYS_JoyData[0].balls = 0; + SYS_JoyData[0].axes_min[0] = stGameCalib.Ax.lower; + SYS_JoyData[0].axes_med[0] = stGameCalib.Ax.centre; + SYS_JoyData[0].axes_max[0] = stGameCalib.Ax.upper; + SYS_JoyData[0].axes_min[1] = stGameCalib.Ay.lower; + SYS_JoyData[0].axes_med[1] = stGameCalib.Ay.centre; + SYS_JoyData[0].axes_max[1] = stGameCalib.Ay.upper; + SYS_JoyData[0].axes_min[2] = stGameCalib.Bx.lower; + SYS_JoyData[0].axes_med[2] = stGameCalib.Bx.centre; + SYS_JoyData[0].axes_max[2] = stGameCalib.Bx.upper; + SYS_JoyData[0].axes_min[3] = stGameCalib.By.lower; + SYS_JoyData[0].axes_med[3] = stGameCalib.By.centre; + SYS_JoyData[0].axes_max[3] = stGameCalib.By.upper; + /* Define Device 1 as 2 axes, 2 buttons */ + SYS_JoyData[1].id = 1; + SYS_JoyData[1].axes = 2; + SYS_JoyData[1].buttons = 2; + SYS_JoyData[1].hats = 0; + SYS_JoyData[1].balls = 0; + SYS_JoyData[1].axes_min[0] = stGameCalib.Bx.lower; + SYS_JoyData[1].axes_med[0] = stGameCalib.Bx.centre; + SYS_JoyData[1].axes_max[0] = stGameCalib.Bx.upper; + SYS_JoyData[1].axes_min[1] = stGameCalib.By.lower; + SYS_JoyData[1].axes_med[1] = stGameCalib.By.centre; + SYS_JoyData[1].axes_max[1] = stGameCalib.By.upper; + } + /* One joystick only? */ + else { + /* If it is joystick A... */ + if ((stJoyStatus.ucJs_JoyStickMask & 0x03) > 0) { + /* Define Device 0 as 2 axes, 4 buttons */ + SYS_JoyData[0].id = 0; + SYS_JoyData[0].axes = 2; + SYS_JoyData[0].buttons = 4; + SYS_JoyData[0].hats = 0; + SYS_JoyData[0].balls = 0; + SYS_JoyData[0].axes_min[0] = stGameCalib.Ax.lower; + SYS_JoyData[0].axes_med[0] = stGameCalib.Ax.centre; + SYS_JoyData[0].axes_max[0] = stGameCalib.Ax.upper; + SYS_JoyData[0].axes_min[1] = stGameCalib.Ay.lower; + SYS_JoyData[0].axes_med[1] = stGameCalib.Ay.centre; + SYS_JoyData[0].axes_max[1] = stGameCalib.Ay.upper; + } + /* If not, it is joystick B */ + else { + /* Define Device 1 as 2 axes, 2 buttons */ + SYS_JoyData[0].id = 1; + SYS_JoyData[0].axes = 2; + SYS_JoyData[0].buttons = 2; + SYS_JoyData[0].hats = 0; + SYS_JoyData[0].balls = 0; + SYS_JoyData[0].axes_min[0] = stGameCalib.Bx.lower; + SYS_JoyData[0].axes_med[0] = stGameCalib.Bx.centre; + SYS_JoyData[0].axes_max[0] = stGameCalib.Bx.upper; + SYS_JoyData[0].axes_min[1] = stGameCalib.By.lower; + SYS_JoyData[0].axes_med[1] = stGameCalib.By.centre; + SYS_JoyData[0].axes_max[1] = stGameCalib.By.upper; + } + } + + /* Hack to define Joystick Port Names */ + if (numdevs > maxdevs) { + numdevs = maxdevs; + } + + for (i = 0; i < numdevs; i++) { + SDL_snprintf(SYS_JoyData[i].szDeviceName, SDL_arraysize(SYS_JoyData[i].szDeviceName), + "Default Joystick %c", 'A'+SYS_JoyData[i].id); + } + } + } + + /* Return the number of devices found */ + numjoysticks = numdevs; + return numdevs; } static int OS2_NumJoysticks(void) { - return numjoysticks; + return numjoysticks; } static void OS2_JoystickDetect(void) @@ -379,18 +399,18 @@ static void OS2_JoystickDetect(void) static const char *OS2_JoystickGetDeviceName(int device_index) { - /* No need to verify if device exists, already done in upper layer */ - return SYS_JoyData[device_index].szDeviceName; + /* No need to verify if device exists, already done in upper layer */ + return SYS_JoyData[device_index].szDeviceName; } static const char *OS2_JoystickGetDevicePath(int device_index) { - return NULL; + return NULL; } static int OS2_JoystickGetDevicePlayerIndex(int device_index) { - return -1; + return -1; } static void OS2_JoystickSetDevicePlayerIndex(int device_index, int player_index) @@ -406,80 +426,75 @@ static SDL_JoystickGUID OS2_JoystickGetDeviceGUID(int device_index) static SDL_JoystickID OS2_JoystickGetDeviceInstanceID(int device_index) { - return device_index; + return device_index; } /******************************************************************************/ -/* Function to open a joystick for use. */ -/* The joystick to open is specified by the device index. */ -/* This should fill the nbuttons and naxes fields of the joystick structure. */ -/* It returns 0, or -1 if there is an error. */ +/* Function to open a joystick for use. */ +/* The joystick to open is specified by the device index. */ +/* This should fill the nbuttons and naxes fields of the joystick structure. */ +/* It returns 0, or -1 if there is an error. */ /******************************************************************************/ static int OS2_JoystickOpen(SDL_Joystick *joystick, int device_index) { - int index; /* Index shortcut for index in joystick structure */ - int i; /* Generic Counter */ - - /* allocate memory for system specific hardware data */ - joystick->hwdata = (struct joystick_hwdata *) SDL_calloc(1, sizeof(*joystick->hwdata)); - if (!joystick->hwdata) - { - return SDL_OutOfMemory(); - } - - /* ShortCut Pointer */ - index = device_index; - joystick->instance_id = device_index; - - /* Define offsets and scales for all axes */ - joystick->hwdata->id = SYS_JoyData[index].id; - for (i = 0; i < MAX_AXES; ++i) - { - if ((i < 2) || i < SYS_JoyData[index].axes) - { - joystick->hwdata->transaxes[i].offset = ((SDL_JOYSTICK_AXIS_MAX + SDL_JOYSTICK_AXIS_MIN)>>1) - SYS_JoyData[index].axes_med[i]; - joystick->hwdata->transaxes[i].scale1 = (float)SDL_abs((SDL_JOYSTICK_AXIS_MIN/SYS_JoyData[index].axes_min[i])); - joystick->hwdata->transaxes[i].scale2 = (float)SDL_abs((SDL_JOYSTICK_AXIS_MAX/SYS_JoyData[index].axes_max[i])); - } - else - { - joystick->hwdata->transaxes[i].offset = 0; - joystick->hwdata->transaxes[i].scale1 = 1.0f; /* Just in case */ - joystick->hwdata->transaxes[i].scale2 = 1.0f; /* Just in case */ - } - } - - /* fill nbuttons, naxes, and nhats fields */ - joystick->nbuttons = SYS_JoyData[index].buttons; - joystick->naxes = SYS_JoyData[index].axes; - - /* joystick->nhats = SYS_JoyData[index].hats; */ - joystick->nhats = 0; /* No support for hats at this time */ - - /* joystick->nballs = SYS_JoyData[index].balls; */ - joystick->nballs = 0; /* No support for balls at this time */ - - return 0; + int index; /* Index shortcut for index in joystick structure */ + int i; /* Generic Counter */ + + /* allocate memory for system specific hardware data */ + joystick->hwdata = (struct joystick_hwdata *) SDL_calloc(1, sizeof(*joystick->hwdata)); + if (!joystick->hwdata) { + return SDL_OutOfMemory(); + } + + /* ShortCut Pointer */ + index = device_index; + joystick->instance_id = device_index; + + /* Define offsets and scales for all axes */ + joystick->hwdata->id = SYS_JoyData[index].id; + for (i = 0; i < MAX_AXES; ++i) { + if ((i < 2) || i < SYS_JoyData[index].axes) { + joystick->hwdata->transaxes[i].offset = ((SDL_JOYSTICK_AXIS_MAX + SDL_JOYSTICK_AXIS_MIN)>>1) - SYS_JoyData[index].axes_med[i]; + joystick->hwdata->transaxes[i].scale1 = (float)SDL_abs((SDL_JOYSTICK_AXIS_MIN/SYS_JoyData[index].axes_min[i])); + joystick->hwdata->transaxes[i].scale2 = (float)SDL_abs((SDL_JOYSTICK_AXIS_MAX/SYS_JoyData[index].axes_max[i])); + } else { + joystick->hwdata->transaxes[i].offset = 0; + joystick->hwdata->transaxes[i].scale1 = 1.0f; /* Just in case */ + joystick->hwdata->transaxes[i].scale2 = 1.0f; /* Just in case */ + } + } + + /* fill nbuttons, naxes, and nhats fields */ + joystick->nbuttons = SYS_JoyData[index].buttons; + joystick->naxes = SYS_JoyData[index].axes; + + /* joystick->nhats = SYS_JoyData[index].hats; */ + joystick->nhats = 0; /* No support for hats at this time */ + + /* joystick->nballs = SYS_JoyData[index].balls; */ + joystick->nballs = 0; /* No support for balls at this time */ + + return 0; } static int OS2_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { - return SDL_Unsupported(); + return SDL_Unsupported(); } static int OS2_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { - return SDL_Unsupported(); + return SDL_Unsupported(); } static Uint32 OS2_JoystickGetCapabilities(SDL_Joystick *joystick) { - return 0; + return 0; } static int OS2_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { - return SDL_Unsupported(); + return SDL_Unsupported(); } static int OS2_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) @@ -489,133 +504,145 @@ static int OS2_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int static int OS2_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { - return SDL_Unsupported(); + return SDL_Unsupported(); } /***************************************************************************/ -/* Function to update the state of a joystick - called as a device poll. */ -/* This function shouldn't update the joystick structure directly, */ -/* but instead should call SDL_PrivateJoystick*() to deliver events */ -/* and update joystick device state. */ +/* Function to update the state of a joystick - called as a device poll. */ +/* This function shouldn't update the joystick structure directly, */ +/* but instead should call SDL_PrivateJoystick*() to deliver events */ +/* and update joystick device state. */ /***************************************************************************/ static void OS2_JoystickUpdate(SDL_Joystick *joystick) { - APIRET rc; /* Generic OS/2 return code */ - int index; /* index shortcurt to joystick index */ - int i; /* Generic counter */ - int normbut; /* Number of buttons reported by joystick */ - int corr; /* Correction for button names */ - Sint16 value; /* Values used to update axis values */ - struct _transaxes *transaxes; /* Shortcut for Correction structure */ - Uint32 pos[MAX_AXES]; /* Vector to inform the Axis status */ - ULONG ulDataLen; /* Size of data */ - GAME_STATUS_STRUCT stGameStatus; /* Joystick Status Structure */ - - ulDataLen = sizeof(stGameStatus); - rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_GET_STATUS, - NULL, 0, NULL, &stGameStatus, ulDataLen, &ulDataLen); - if (rc != 0) - { - SDL_SetError("Could not read joystick status."); - return; /* Could not read data */ - } - - /* Shortcut pointer */ - index = joystick->instance_id; - - /* joystick motion events */ - - if (SYS_JoyData[index].id == 0) - { - pos[0] = stGameStatus.curdata.A.x; - pos[1] = stGameStatus.curdata.A.y; - if (SYS_JoyData[index].axes >= 3) pos[2] = stGameStatus.curdata.B.x; - else pos[2] = 0; - if (SYS_JoyData[index].axes >= 4) pos[3] = stGameStatus.curdata.B.y; - else pos[3] = 0; - /* OS/2 basic drivers do not support more than 4 axes joysticks */ - } - else if (SYS_JoyData[index].id == 1) - { - pos[0] = stGameStatus.curdata.B.x; - pos[1] = stGameStatus.curdata.B.y; - pos[2] = 0; - pos[3] = 0; - } - - /* Corrects the movements using the callibration */ - transaxes = joystick->hwdata->transaxes; - for (i = 0; i < joystick->naxes; i++) - { - value = pos[i] + transaxes[i].offset; - if (value < 0) - { - value *= transaxes[i].scale1; - if (value > 0) value = SDL_JOYSTICK_AXIS_MIN; - } - else - { - value *= transaxes[i].scale2; - if (value < 0) value = SDL_JOYSTICK_AXIS_MAX; - } - SDL_PrivateJoystickAxis(joystick, (Uint8)i, (Sint16)value); - } - - /* joystick button A to D events */ - if (SYS_JoyData[index].id == 1) corr = 2; - else corr = 0; - normbut = 4; /* Number of normal buttons */ - if (joystick->nbuttons < normbut) normbut = joystick->nbuttons; - for (i = corr; (i-corr) < normbut; ++i) - { - /* - Button A: 1110 0000 - Button B: 1101 0000 - Button C: 1011 0000 - Button D: 0111 0000 - */ - if ((~stGameStatus.curdata.butMask)>>4 & JOY_BUTTON_FLAG(i)) - { - SDL_PrivateJoystickButton(joystick, (Uint8)(i-corr), SDL_PRESSED); - } - else - { - SDL_PrivateJoystickButton(joystick, (Uint8)(i-corr), SDL_RELEASED); - } - } - - /* Joystick button E to H buttons */ - /* - Button E: Axis 2 X Left - Button F: Axis 2 Y Up - Button G: Axis 2 X Right - Button H: Axis 2 Y Down - */ - if (joystick->nbuttons >= 5) - { - if (stGameStatus.curdata.B.x < SYS_JoyData[index].buttoncalc[0]) SDL_PrivateJoystickButton(joystick, (Uint8)4, SDL_PRESSED); - else SDL_PrivateJoystickButton(joystick, (Uint8)4, SDL_RELEASED); - } - if (joystick->nbuttons >= 6) - { - if (stGameStatus.curdata.B.y < SYS_JoyData[index].buttoncalc[1]) SDL_PrivateJoystickButton(joystick, (Uint8)5, SDL_PRESSED); - else SDL_PrivateJoystickButton(joystick, (Uint8)5, SDL_RELEASED); - } - if (joystick->nbuttons >= 7) - { - if (stGameStatus.curdata.B.x > SYS_JoyData[index].buttoncalc[2]) SDL_PrivateJoystickButton(joystick, (Uint8)6, SDL_PRESSED); - else SDL_PrivateJoystickButton(joystick, (Uint8)6, SDL_RELEASED); - } - if (joystick->nbuttons >= 8) - { - if (stGameStatus.curdata.B.y > SYS_JoyData[index].buttoncalc[3]) SDL_PrivateJoystickButton(joystick, (Uint8)7, SDL_PRESSED); - else SDL_PrivateJoystickButton(joystick, (Uint8)7, SDL_RELEASED); - } - - /* joystick hat events */ - /* Not Supported under OS/2 */ - /* joystick ball events */ - /* Not Supported under OS/2 */ + APIRET rc; /* Generic OS/2 return code */ + int index; /* index shortcurt to joystick index */ + int i; /* Generic counter */ + int normbut; /* Number of buttons reported by joystick */ + int corr; /* Correction for button names */ + Sint16 value; /* Values used to update axis values */ + struct _transaxes *transaxes; /* Shortcut for Correction structure */ + Uint32 pos[MAX_AXES]; /* Vector to inform the Axis status */ + ULONG ulDataLen; /* Size of data */ + GAME_STATUS_STRUCT stGameStatus; /* Joystick Status Structure */ + + ulDataLen = sizeof(stGameStatus); + rc = DosDevIOCtl(hJoyPort, IOCTL_CAT_USER, GAME_GET_STATUS, + NULL, 0, NULL, &stGameStatus, ulDataLen, &ulDataLen); + if (rc != 0) { + SDL_SetError("Could not read joystick status."); + return; /* Could not read data */ + } + + /* Shortcut pointer */ + index = joystick->instance_id; + + /* joystick motion events */ + + if (SYS_JoyData[index].id == 0) { + pos[0] = stGameStatus.curdata.A.x; + pos[1] = stGameStatus.curdata.A.y; + if (SYS_JoyData[index].axes >= 3) { + pos[2] = stGameStatus.curdata.B.x; + } else { + pos[2] = 0; + } + if (SYS_JoyData[index].axes >= 4) { + pos[3] = stGameStatus.curdata.B.y; + } else { + pos[3] = 0; + } + /* OS/2 basic drivers do not support more than 4 axes joysticks */ + } + else if (SYS_JoyData[index].id == 1) { + pos[0] = stGameStatus.curdata.B.x; + pos[1] = stGameStatus.curdata.B.y; + pos[2] = 0; + pos[3] = 0; + } + + /* Corrects the movements using the callibration */ + transaxes = joystick->hwdata->transaxes; + for (i = 0; i < joystick->naxes; i++) { + value = pos[i] + transaxes[i].offset; + if (value < 0) { + value *= transaxes[i].scale1; + if (value > 0) { + value = SDL_JOYSTICK_AXIS_MIN; + } + } else { + value *= transaxes[i].scale2; + if (value < 0) { + value = SDL_JOYSTICK_AXIS_MAX; + } + } + SDL_PrivateJoystickAxis(joystick, (Uint8)i, (Sint16)value); + } + + /* joystick button A to D events */ + if (SYS_JoyData[index].id == 1) { + corr = 2; + } else { + corr = 0; + } + normbut = 4; /* Number of normal buttons */ + if (joystick->nbuttons < normbut) { + normbut = joystick->nbuttons; + } + for (i = corr; (i-corr) < normbut; ++i) { + /* + Button A: 1110 0000 + Button B: 1101 0000 + Button C: 1011 0000 + Button D: 0111 0000 + */ + if ((~stGameStatus.curdata.butMask)>>4 & JOY_BUTTON_FLAG(i)) { + SDL_PrivateJoystickButton(joystick, (Uint8)(i-corr), SDL_PRESSED); + } else { + SDL_PrivateJoystickButton(joystick, (Uint8)(i-corr), SDL_RELEASED); + } + } + + /* Joystick button E to H buttons */ + /* + Button E: Axis 2 X Left + Button F: Axis 2 Y Up + Button G: Axis 2 X Right + Button H: Axis 2 Y Down + */ + if (joystick->nbuttons >= 5) { + if (stGameStatus.curdata.B.x < SYS_JoyData[index].buttoncalc[0]) { + SDL_PrivateJoystickButton(joystick, (Uint8)4, SDL_PRESSED); + } else { + SDL_PrivateJoystickButton(joystick, (Uint8)4, SDL_RELEASED); + } + } + if (joystick->nbuttons >= 6) { + if (stGameStatus.curdata.B.y < SYS_JoyData[index].buttoncalc[1]) { + SDL_PrivateJoystickButton(joystick, (Uint8)5, SDL_PRESSED); + } else { + SDL_PrivateJoystickButton(joystick, (Uint8)5, SDL_RELEASED); + } + } + if (joystick->nbuttons >= 7) { + if (stGameStatus.curdata.B.x > SYS_JoyData[index].buttoncalc[2]) { + SDL_PrivateJoystickButton(joystick, (Uint8)6, SDL_PRESSED); + } else { + SDL_PrivateJoystickButton(joystick, (Uint8)6, SDL_RELEASED); + } + } + if (joystick->nbuttons >= 8) { + if (stGameStatus.curdata.B.y > SYS_JoyData[index].buttoncalc[3]) { + SDL_PrivateJoystickButton(joystick, (Uint8)7, SDL_PRESSED); + } else { + SDL_PrivateJoystickButton(joystick, (Uint8)7, SDL_RELEASED); + } + } + + /* joystick hat events */ + /* Not Supported under OS/2 */ + /* joystick ball events */ + /* Not Supported under OS/2 */ } /******************************************/ @@ -623,8 +650,8 @@ static void OS2_JoystickUpdate(SDL_Joystick *joystick) /******************************************/ static void OS2_JoystickClose(SDL_Joystick *joystick) { - /* free system specific hardware data */ - SDL_free(joystick->hwdata); + /* free system specific hardware data */ + SDL_free(joystick->hwdata); } /********************************************************************/ @@ -632,12 +659,12 @@ static void OS2_JoystickClose(SDL_Joystick *joystick) /********************************************************************/ static void OS2_JoystickQuit(void) { - joyPortClose(&hJoyPort); + joyPortClose(&hJoyPort); } static SDL_bool OS2_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { - return SDL_FALSE; + return SDL_FALSE; } @@ -650,38 +677,38 @@ static SDL_bool OS2_JoystickGetGamepadMapping(int device_index, SDL_GamepadMappi /*****************************************/ static int joyPortOpen(HFILE * hGame) { - APIRET rc; /* Generic Return Code */ - ULONG ulAction; /* ? */ - ULONG ulVersion; /* Version of joystick driver */ - ULONG ulDataLen; /* Size of version data */ - - /* Verifies if joyport is not already open... */ - if (*hGame != NULLHANDLE) return 0; - - /* Open GAME$ for read */ - rc = DosOpen("GAME$ ", hGame, &ulAction, 0, FILE_READONLY, - FILE_OPEN, OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, NULL); - if (rc != 0) - { - return SDL_SetError("Could not open Joystick Port."); - } - - /* Get Joystick Driver Version... must be 2.0 or higher */ - ulVersion = 0; - ulDataLen = sizeof(ulVersion); - rc = DosDevIOCtl(*hGame, IOCTL_CAT_USER, GAME_GET_VERSION, - NULL, 0, NULL, &ulVersion, ulDataLen, &ulDataLen); - if (rc != 0) - { - joyPortClose(hGame); - return SDL_SetError("Could not get Joystick Driver version."); - } - if (ulVersion < 0x20) - { - joyPortClose(hGame); - return SDL_SetError("Driver too old. At least IBM driver version 2.0 required."); - } - return 0; + APIRET rc; /* Generic Return Code */ + ULONG ulAction; /* ? */ + ULONG ulVersion; /* Version of joystick driver */ + ULONG ulDataLen; /* Size of version data */ + + /* Verifies if joyport is not already open... */ + if (*hGame != NULLHANDLE) { + return 0; + } + + /* Open GAME$ for read */ + rc = DosOpen("GAME$ ", hGame, &ulAction, 0, FILE_READONLY, + FILE_OPEN, OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, NULL); + if (rc != 0) { + return SDL_SetError("Could not open Joystick Port."); + } + + /* Get Joystick Driver Version... must be 2.0 or higher */ + ulVersion = 0; + ulDataLen = sizeof(ulVersion); + rc = DosDevIOCtl(*hGame, IOCTL_CAT_USER, GAME_GET_VERSION, + NULL, 0, NULL, &ulVersion, ulDataLen, &ulDataLen); + if (rc != 0) { + joyPortClose(hGame); + return SDL_SetError("Could not get Joystick Driver version."); + } + if (ulVersion < 0x20) { + joyPortClose(hGame); + return SDL_SetError("Driver too old. At least IBM driver version 2.0 required."); + } + + return 0; } /****************************/ @@ -689,8 +716,10 @@ static int joyPortOpen(HFILE * hGame) /****************************/ static void joyPortClose(HFILE * hGame) { - if (*hGame != NULLHANDLE) DosClose(*hGame); - *hGame = NULLHANDLE; + if (*hGame != NULLHANDLE) { + DosClose(*hGame); + } + *hGame = NULLHANDLE; } /***************************/ @@ -698,102 +727,111 @@ static void joyPortClose(HFILE * hGame) /***************************/ static int joyGetEnv(struct _joycfg * joydata) { - const char *joyenv; /* Pointer to tested character */ - char tempnumber[5]; /* Temporary place to put numeric texts */ - - joyenv = SDL_getenv("SDL_OS2_JOYSTICK"); - if (joyenv == NULL) return 0; - - /* Joystick Environment is defined! */ - while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ - - /* If the string name starts with '... get if fully */ - if (*joyenv == '\'') { - joyenv++; - joyenv += joyGetData(joyenv,joydata->name,'\'',sizeof(joydata->name)); - } - /* If not, get it until the next space */ - else if (*joyenv == '\"') { - joyenv++; - joyenv += joyGetData(joyenv,joydata->name,'\"',sizeof(joydata->name)); - } - else { - joyenv += joyGetData(joyenv,joydata->name, ' ',sizeof(joydata->name)); - } - - /* Now get the number of axes */ - while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ - joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); - joydata->axes = SDL_atoi(tempnumber); - - /* Now get the number of buttons */ - while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ - joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); - joydata->buttons = SDL_atoi(tempnumber); - - /* Now get the number of hats */ - while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ - joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); - joydata->hats = SDL_atoi(tempnumber); - - /* Now get the number of balls */ - while (*joyenv==' ' && *joyenv != 0) joyenv++; /* jump spaces... */ - joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); - joydata->balls = SDL_atoi(tempnumber); - return 1; + const char *joyenv; /* Pointer to tested character */ + char tempnumber[5]; /* Temporary place to put numeric texts */ + + joyenv = SDL_getenv("SDL_OS2_JOYSTICK"); + if (joyenv == NULL) { + return 0; + } + + /* Joystick Environment is defined! */ + while (*joyenv == ' ' && *joyenv != 0) { + joyenv++; /* jump spaces... */ + } + + /* If the string name starts with '... get if fully */ + if (*joyenv == '\'') { + joyenv++; + joyenv += joyGetData(joyenv,joydata->name,'\'',sizeof(joydata->name)); + } + /* If not, get it until the next space */ + else if (*joyenv == '\"') { + joyenv++; + joyenv += joyGetData(joyenv,joydata->name,'\"',sizeof(joydata->name)); + } + else { + joyenv += joyGetData(joyenv,joydata->name, ' ',sizeof(joydata->name)); + } + + /* Now get the number of axes */ + while (*joyenv == ' ' && *joyenv != 0) { + joyenv++; /* jump spaces... */ + } + joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); + joydata->axes = SDL_atoi(tempnumber); + + /* Now get the number of buttons */ + while (*joyenv == ' ' && *joyenv != 0) { + joyenv++; /* jump spaces... */ + } + joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); + joydata->buttons = SDL_atoi(tempnumber); + + /* Now get the number of hats */ + while (*joyenv == ' ' && *joyenv != 0) { + joyenv++; /* jump spaces... */ + } + joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); + joydata->hats = SDL_atoi(tempnumber); + + /* Now get the number of balls */ + while (*joyenv==' ' && *joyenv != 0) { + joyenv++; /* jump spaces... */ + } + joyenv += joyGetData(joyenv,tempnumber,' ',sizeof(tempnumber)); + joydata->balls = SDL_atoi(tempnumber); + + return 1; } /************************************************************************/ -/* Get a text from in the string starting in joyenv until it finds */ -/* the stopchar or maxchars is reached. The result is placed in name. */ +/* Get a text from in the string starting in joyenv until it finds */ +/* the stopchar or maxchars is reached. The result is placed in name. */ /************************************************************************/ static int joyGetData(const char *joyenv, char *name, char stopchar, size_t maxchars) { - char *nameptr; /* Pointer to the selected character */ - int chcnt = 0; /* Count how many characters where copied */ - - nameptr = name; - while (*joyenv!=stopchar && *joyenv!=0) - { - if (nameptr < (name + (maxchars-1))) - { - *nameptr = *joyenv; /* Only copy if smaller than maximum */ - nameptr++; - } - chcnt++; - joyenv++; - } - if (*joyenv == stopchar) - { - joyenv++; /* Jump stopchar */ - chcnt++; - } - *nameptr = 0; /* Mark last byte */ - return chcnt; + char *nameptr; /* Pointer to the selected character */ + int chcnt = 0; /* Count how many characters where copied */ + + nameptr = name; + while (*joyenv!=stopchar && *joyenv != 0) { + if (nameptr < (name + (maxchars-1))) { + *nameptr = *joyenv; /* Only copy if smaller than maximum */ + nameptr++; + } + chcnt++; + joyenv++; + } + if (*joyenv == stopchar) { + joyenv++; /* Jump stopchar */ + chcnt++; + } + *nameptr = 0; /* Mark last byte */ + return chcnt; } -SDL_JoystickDriver SDL_OS2_JoystickDriver = -{ - OS2_JoystickInit, - OS2_NumJoysticks, - OS2_JoystickDetect, - OS2_JoystickGetDeviceName, - OS2_JoystickGetDevicePath, - OS2_JoystickGetDevicePlayerIndex, - OS2_JoystickSetDevicePlayerIndex, - OS2_JoystickGetDeviceGUID, - OS2_JoystickGetDeviceInstanceID, - OS2_JoystickOpen, - OS2_JoystickRumble, - OS2_JoystickRumbleTriggers, - OS2_JoystickGetCapabilities, - OS2_JoystickSetLED, - OS2_JoystickSendEffect, - OS2_JoystickSetSensorsEnabled, - OS2_JoystickUpdate, - OS2_JoystickClose, - OS2_JoystickQuit, - OS2_JoystickGetGamepadMapping +SDL_JoystickDriver SDL_OS2_JoystickDriver = { + OS2_JoystickInit, + OS2_NumJoysticks, + OS2_JoystickDetect, + OS2_JoystickGetDeviceName, + OS2_JoystickGetDevicePath, + OS2_JoystickGetDevicePlayerIndex, + OS2_JoystickSetDevicePlayerIndex, + OS2_JoystickGetDeviceGUID, + OS2_JoystickGetDeviceInstanceID, + OS2_JoystickOpen, + OS2_JoystickRumble, + OS2_JoystickRumbleTriggers, + OS2_JoystickGetCapabilities, + OS2_JoystickSetLED, + OS2_JoystickSendEffect, + OS2_JoystickSetSensorsEnabled, + OS2_JoystickUpdate, + OS2_JoystickClose, + OS2_JoystickQuit, + OS2_JoystickGetGamepadMapping }; #endif /* SDL_JOYSTICK_OS2 */ diff --git a/modules/SDL2/src/joystick/ps2/SDL_sysjoystick.c b/modules/SDL2/src/joystick/ps2/SDL_sysjoystick.c index 86fe4aa..698d632 100644 --- a/modules/SDL2/src/joystick/ps2/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/ps2/SDL_sysjoystick.c @@ -27,7 +27,7 @@ #include #include -#include /* For the definition of NULL */ +#include /* For the definition of NULL */ #include #include @@ -41,11 +41,12 @@ #define PS2_MAX_SLOT 4 /* maximum - 4 slots in one multitap */ #define MAX_CONTROLLERS (PS2_MAX_PORT * PS2_MAX_SLOT) #define PS2_ANALOG_STICKS 2 -#define PS2_ANALOG_AXIS 2 -#define PS2_BUTTONS 16 -#define PS2_TOTAL_AXIS (PS2_ANALOG_STICKS * PS2_ANALOG_AXIS) +#define PS2_ANALOG_AXIS 2 +#define PS2_BUTTONS 16 +#define PS2_TOTAL_AXIS (PS2_ANALOG_STICKS * PS2_ANALOG_AXIS) -struct JoyInfo { +struct JoyInfo +{ uint8_t padBuf[256]; uint16_t btns; uint8_t analog_state[PS2_TOTAL_AXIS]; @@ -53,19 +54,20 @@ struct JoyInfo { uint8_t slot; int8_t rumble_ready; int8_t opened; -} __attribute__ ((aligned (64))); +} __attribute__((aligned(64))); static uint8_t enabled_pads = 0; static struct JoyInfo joyInfo[MAX_CONTROLLERS]; static inline int16_t convert_u8_to_s16(uint8_t val) { - if (val == 0) - return -0x7fff; - return val * 0x0101 - 0x8000; + if (val == 0) { + return -0x7fff; + } + return val * 0x0101 - 0x8000; } -static inline uint8_t rumble_status(uint8_t index) +static inline uint8_t rumble_status(uint8_t index) { char actAlign[6]; int res; @@ -78,7 +80,7 @@ static inline uint8_t rumble_status(uint8_t index) actAlign[3] = 0xff; actAlign[4] = 0xff; actAlign[5] = 0xff; - + res = padSetActAlign(info->port, info->slot, actAlign); info->rumble_ready = res <= 0 ? -1 : 1; } @@ -87,19 +89,21 @@ static inline uint8_t rumble_status(uint8_t index) } /* Function to scan the system for joysticks. -* Joystick 0 should be the system default joystick. -* This function should return 0, or -1 on an unrecoverable error. -*/ + * Joystick 0 should be the system default joystick. + * This function should return 0, or -1 on an unrecoverable error. + */ static int PS2_JoystickInit(void) { uint32_t port = 0; uint32_t slot = 0; - if(init_joystick_driver(true) < 0) + if (init_joystick_driver(true) < 0) { return -1; + } - for (port = 0; port < PS2_MAX_PORT; port++) + for (port = 0; port < PS2_MAX_PORT; port++) { mtapPortOpen(port); + } /* it can fail - we dont care, we will check it more strictly when padPortOpen */ for (slot = 0; slot < PS2_MAX_SLOT; slot++) { @@ -116,7 +120,7 @@ static int PS2_JoystickInit(void) */ struct JoyInfo *info = &joyInfo[enabled_pads]; - if(padPortOpen(port, slot, (void *)info->padBuf) > 0) { + if (padPortOpen(port, slot, (void *)info->padBuf) > 0) { info->port = (uint8_t)port; info->slot = (uint8_t)slot; info->opened = 1; @@ -142,8 +146,9 @@ static void PS2_JoystickDetect() /* Function to get the device-dependent name of a joystick */ static const char *PS2_JoystickGetDeviceName(int index) { - if (index >= 0 && index < enabled_pads) + if (index >= 0 && index < enabled_pads) { return "PS2 Controller"; + } SDL_SetError("No joystick available with that index"); return NULL; @@ -201,7 +206,7 @@ static int PS2_JoystickOpen(SDL_Joystick *joystick, int device_index) joystick->naxes = PS2_TOTAL_AXIS; joystick->nhats = 0; joystick->instance_id = device_index; - + return 0; } @@ -218,13 +223,13 @@ static int PS2_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl } // Initial value - actAlign[0] = low_frequency_rumble >> 8; // Enable small engine - actAlign[1] = high_frequency_rumble >> 8; // Enable big engine + actAlign[0] = low_frequency_rumble >> 8; // Enable small engine + actAlign[1] = high_frequency_rumble >> 8; // Enable big engine actAlign[2] = 0xff; actAlign[3] = 0xff; actAlign[4] = 0xff; actAlign[5] = 0xff; - + res = padSetActDirect(info->port, info->slot, actAlign); return res == 1 ? 0 : -1; } @@ -238,7 +243,7 @@ static int PS2_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left, Uint1 /* Capability detection */ static Uint32 PS2_JoystickGetCapabilities(SDL_Joystick *joystick) { - return SDL_JOYCAP_RUMBLE; + return SDL_JOYCAP_RUMBLE; } /* LED functionality */ @@ -260,10 +265,10 @@ static int PS2_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enable } /* Function to update the state of a joystick - called as a device poll. -* This function shouldn't update the joystick structure directly, -* but instead should call SDL_PrivateJoystick*() to deliver events -* and update joystick device state. -*/ + * This function shouldn't update the joystick structure directly, + * but instead should call SDL_PrivateJoystick*() to deliver events + * and update joystick device state. + */ static void PS2_JoystickUpdate(SDL_Joystick *joystick) { uint8_t i; @@ -279,14 +284,16 @@ static void PS2_JoystickUpdate(SDL_Joystick *joystick) int ret = padRead(info->port, info->slot, &buttons); /* port, slot, buttons */ if (ret != 0) { /* Buttons */ - int32_t pressed_buttons = 0xffff ^ buttons.btns;; + int32_t pressed_buttons = 0xffff ^ buttons.btns; + ; if (info->btns != pressed_buttons) { for (i = 0; i < PS2_BUTTONS; i++) { mask = (1 << i); previous = info->btns & mask; current = pressed_buttons & mask; - if (previous != current) + if (previous != current) { SDL_PrivateJoystickButton(joystick, i, current ? SDL_PRESSED : SDL_RELEASED); + } } } info->btns = pressed_buttons; @@ -300,9 +307,10 @@ static void PS2_JoystickUpdate(SDL_Joystick *joystick) for (i = 0; i < PS2_TOTAL_AXIS; i++) { previous_axis = info->analog_state[i]; current_axis = all_axis[i]; - if (previous_axis != current_axis) + if (previous_axis != current_axis) { SDL_PrivateJoystickAxis(joystick, i, convert_u8_to_s16(current_axis)); - + } + info->analog_state[i] = current_axis; } } @@ -324,13 +332,12 @@ static void PS2_JoystickQuit(void) deinit_joystick_driver(true); } -static SDL_bool PS2_GetGamepadMapping(int device_index, SDL_GamepadMapping * out) +static SDL_bool PS2_GetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_PS2_JoystickDriver = -{ +SDL_JoystickDriver SDL_PS2_JoystickDriver = { PS2_JoystickInit, PS2_JoystickGetCount, PS2_JoystickDetect, diff --git a/modules/SDL2/src/joystick/psp/SDL_sysjoystick.c b/modules/SDL2/src/joystick/psp/SDL_sysjoystick.c index f6553f0..3478ca8 100644 --- a/modules/SDL2/src/joystick/psp/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/psp/SDL_sysjoystick.c @@ -25,7 +25,7 @@ /* This is the PSP implementation of the SDL joystick API */ #include -#include /* For the definition of NULL */ +#include /* For the definition of NULL */ #include #include "../SDL_sysjoystick.h" @@ -40,38 +40,39 @@ static const enum PspCtrlButtons button_map[] = { PSP_CTRL_TRIANGLE, PSP_CTRL_CIRCLE, PSP_CTRL_CROSS, PSP_CTRL_SQUARE, PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, PSP_CTRL_DOWN, PSP_CTRL_LEFT, PSP_CTRL_UP, PSP_CTRL_RIGHT, - PSP_CTRL_SELECT, PSP_CTRL_START, PSP_CTRL_HOME, PSP_CTRL_HOLD }; -static int analog_map[256]; /* Map analog inputs to -32768 -> 32767 */ + PSP_CTRL_SELECT, PSP_CTRL_START, PSP_CTRL_HOME, PSP_CTRL_HOLD +}; +static int analog_map[256]; /* Map analog inputs to -32768 -> 32767 */ typedef struct { - int x; - int y; + int x; + int y; } point; /* 4 points define the bezier-curve. */ static point a = { 0, 0 }; -static point b = { 50, 0 }; +static point b = { 50, 0 }; static point c = { 78, 32767 }; static point d = { 128, 32767 }; /* simple linear interpolation between two points */ -static SDL_INLINE void lerp (point *dest, point *pt_a, point *pt_b, float t) +static SDL_INLINE void lerp(point *dest, point *pt_a, point *pt_b, float t) { - dest->x = pt_a->x + (pt_b->x - pt_a->x)*t; - dest->y = pt_a->y + (pt_b->y - pt_a->y)*t; + dest->x = pt_a->x + (pt_b->x - pt_a->x) * t; + dest->y = pt_a->y + (pt_b->y - pt_a->y) * t; } /* evaluate a point on a bezier-curve. t goes from 0 to 1.0 */ static int calc_bezier_y(float t) { point ab, bc, cd, abbc, bccd, dest; - lerp (&ab, &a, &b, t); /* point between a and b */ - lerp (&bc, &b, &c, t); /* point between b and c */ - lerp (&cd, &c, &d, t); /* point between c and d */ - lerp (&abbc, &ab, &bc, t); /* point between ab and bc */ - lerp (&bccd, &bc, &cd, t); /* point between bc and cd */ - lerp (&dest, &abbc, &bccd, t); /* point on the bezier-curve */ + lerp(&ab, &a, &b, t); /* point between a and b */ + lerp(&bc, &b, &c, t); /* point between b and c */ + lerp(&cd, &c, &d, t); /* point between c and d */ + lerp(&abbc, &ab, &bc, t); /* point between ab and bc */ + lerp(&bccd, &bc, &cd, t); /* point between bc and cd */ + lerp(&dest, &abbc, &bccd, t); /* point on the bezier-curve */ return dest.y; } @@ -89,11 +90,10 @@ static int PSP_JoystickInit(void) /* Create an accurate map from analog inputs (0 to 255) to SDL joystick positions (-32768 to 32767) */ - for (i = 0; i < 128; i++) - { - float t = (float)i/127.0f; - analog_map[i+128] = calc_bezier_y(t); - analog_map[127-i] = -1 * analog_map[i+128]; + for (i = 0; i < 128; i++) { + float t = (float)i / 127.0f; + analog_map[i + 128] = calc_bezier_y(t); + analog_map[127 - i] = -1 * analog_map[i + 128]; } return 1; @@ -111,11 +111,12 @@ static void PSP_JoystickDetect(void) /* Function to get the device-dependent name of a joystick */ static const char *PSP_JoystickGetDeviceName(int device_index) { - if (device_index == 0) + if (device_index == 0) { return "PSP builtin joypad"; + } SDL_SetError("No joystick available with that index"); - return(NULL); + return NULL; } static const char *PSP_JoystickGetDevicePath(int index) @@ -210,11 +211,11 @@ static void PSP_JoystickUpdate(SDL_Joystick *joystick) y = pad.Ly; /* Axes */ - if(old_x != x) { + if (old_x != x) { SDL_PrivateJoystickAxis(joystick, 0, analog_map[x]); old_x = x; } - if(old_y != y) { + if (old_y != y) { SDL_PrivateJoystickAxis(joystick, 1, analog_map[y]); old_y = y; } @@ -222,13 +223,12 @@ static void PSP_JoystickUpdate(SDL_Joystick *joystick) /* Buttons */ changed = old_buttons ^ buttons; old_buttons = buttons; - if(changed) { + if (changed) { for (i = 0; i < SDL_arraysize(button_map); i++) { if (changed & button_map[i]) { SDL_PrivateJoystickButton( joystick, i, - (buttons & button_map[i]) ? - SDL_PRESSED : SDL_RELEASED); + (buttons & button_map[i]) ? SDL_PRESSED : SDL_RELEASED); } } } @@ -244,14 +244,12 @@ static void PSP_JoystickQuit(void) { } -static SDL_bool -PSP_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool PSP_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_PSP_JoystickDriver = -{ +SDL_JoystickDriver SDL_PSP_JoystickDriver = { PSP_JoystickInit, PSP_JoystickGetCount, PSP_JoystickDetect, diff --git a/modules/SDL2/src/joystick/sort_controllers.py b/modules/SDL2/src/joystick/sort_controllers.py index f550df2..c354a22 100644 --- a/modules/SDL2/src/joystick/sort_controllers.py +++ b/modules/SDL2/src/joystick/sort_controllers.py @@ -13,7 +13,18 @@ controllers = [] controller_guids = {} conditionals = [] split_pattern = re.compile(r'([^"]*")([^,]*,)([^,]*,)([^"]*)(".*)') -guid_crc_pattern = re.compile(r'^([0-9a-zA-Z]{4})([0-9a-zA-Z]{2})([0-9a-zA-Z]{2})([0-9a-zA-Z]{24},)$') +# BUS (1) CRC (3,2) VID (5,4) (6) PID (8,7) (9) VERSION (11,10) MISC (12) +standard_guid_pattern = re.compile(r'^([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})(0000)([0-9a-fA-F]{2})([0-9a-fA-F]{2})(0000)([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{4},)$') + +# These chipsets are used in multiple controllers with different mappings, +# without enough unique information to differentiate them. e.g. +# https://github.com/gabomdq/SDL_GameControllerDB/issues/202 +invalid_controllers = ( + ('0079', '0006', '0000'), # DragonRise Inc. Generic USB Joystick + ('0079', '0006', '6120'), # DragonRise Inc. Generic USB Joystick + ('04b4', '2412', 'c529'), # Flydigi Vader 2, Vader 2 Pro, Apex 2, Apex 3 + ('16c0', '05e1', '0000'), # Xinmotek Controller +) def find_element(prefix, bindings): i=0 @@ -23,7 +34,7 @@ def find_element(prefix, bindings): i=(i + 1) return -1 - + def save_controller(line): global controllers match = split_pattern.match(line) @@ -32,18 +43,34 @@ def save_controller(line): if (bindings[0] == ""): bindings.pop(0) + name = entry[2].rstrip(',') + crc = "" pos = find_element("crc:", bindings) if pos >= 0: crc = bindings[pos] + "," bindings.pop(pos) - # Look for CRC embedded in the GUID and convert to crc element - crc_match = guid_crc_pattern.match(entry[1]) - if crc_match and crc_match.group(2) != '00' and crc_match.group(3) != '00': - print("Extracting CRC from GUID of " + entry[2]) - entry[1] = crc_match.group(1) + '0000' + crc_match.group(4) - crc = "crc:" + crc_match.group(3) + crc_match.group(2) + "," + guid_match = standard_guid_pattern.match(entry[1]) + if guid_match: + groups = guid_match.groups() + crc_value = groups[2] + groups[1] + vid_value = groups[4] + groups[3] + pid_value = groups[7] + groups[6] + version_value = groups[10] + groups[9] + #print("CRC: %s, VID: %s, PID: %s, VERSION: %s" % (crc_value, vid_value, pid_value, version_value)) + + if crc_value == "0000": + if crc != "": + crc_value = crc[4:-1] + else: + print("Extracting CRC from GUID of " + name) + entry[1] = groups[0] + "0000" + "".join(groups[3:]) + crc = "crc:" + crc_value + "," + + if (vid_value, pid_value, crc_value) in invalid_controllers: + print("Controller '%s' not unique, skipping" % name) + return pos = find_element("sdk", bindings) if pos >= 0: @@ -108,7 +135,7 @@ for line in input: else: save_controller(line) else: - if (line.startswith("static const char *s_ControllerMappings")): + if (line.startswith("static const char *")): parsing_controllers = True output.write(line) diff --git a/modules/SDL2/src/joystick/steam/SDL_steamcontroller.c b/modules/SDL2/src/joystick/steam/SDL_steamcontroller.c index f59007a..256aa7d 100644 --- a/modules/SDL2/src/joystick/steam/SDL_steamcontroller.c +++ b/modules/SDL2/src/joystick/steam/SDL_steamcontroller.c @@ -24,7 +24,6 @@ #include "../SDL_joystick_c.h" #include "SDL_steamcontroller.h" - void SDL_InitSteamControllers(SteamControllerConnectedCallback_t connectedCallback, SteamControllerDisconnectedCallback_t disconnectedCallback) { diff --git a/modules/SDL2/src/joystick/usb_ids.h b/modules/SDL2/src/joystick/usb_ids.h index 1ee9ef5..bc9e319 100644 --- a/modules/SDL2/src/joystick/usb_ids.h +++ b/modules/SDL2/src/joystick/usb_ids.h @@ -27,10 +27,13 @@ #define USB_VENDOR_8BITDO 0x2dc8 #define USB_VENDOR_AMAZON 0x1949 #define USB_VENDOR_APPLE 0x05ac +#define USB_VENDOR_ASTRO 0x9886 +#define USB_VENDOR_BACKBONE 0x358a #define USB_VENDOR_DRAGONRISE 0x0079 #define USB_VENDOR_GOOGLE 0x18d1 #define USB_VENDOR_HORI 0x0f0d #define USB_VENDOR_HYPERKIN 0x2e24 +#define USB_VENDOR_LOGITECH 0x046d #define USB_VENDOR_MADCATZ 0x0738 #define USB_VENDOR_MICROSOFT 0x045e #define USB_VENDOR_NACON 0x146b @@ -45,117 +48,115 @@ #define USB_VENDOR_SHANWAN_ALT 0x20bc #define USB_VENDOR_SONY 0x054c #define USB_VENDOR_THRUSTMASTER 0x044f +#define USB_VENDOR_TURTLE_BEACH 0x10f5 #define USB_VENDOR_VALVE 0x28de #define USB_VENDOR_ZEROPLUS 0x0c12 -// Most Razer devices are not game controllers, and some of them lock up or reset -// when we send them the Sony third-party query feature report, so don't include that -// vendor here. Instead add devices as appropriate to controller_type.c -// Reference: https://github.com/libsdl-org/SDL/issues/6733 -// https://github.com/libsdl-org/SDL/issues/6799 -#define SONY_THIRDPARTY_VENDOR(X) \ - (X == USB_VENDOR_DRAGONRISE || \ - X == USB_VENDOR_HORI || \ - X == USB_VENDOR_MADCATZ || \ - X == USB_VENDOR_NACON || \ - X == USB_VENDOR_PDP || \ - X == USB_VENDOR_POWERA || \ - X == USB_VENDOR_POWERA_ALT || \ - X == USB_VENDOR_QANBA || \ - X == USB_VENDOR_SHANWAN || \ - X == USB_VENDOR_SHANWAN_ALT || \ - X == USB_VENDOR_THRUSTMASTER || \ - X == USB_VENDOR_ZEROPLUS || \ - X == 0x7545 /* SZ-MYPOWER */) - -#define USB_PRODUCT_8BITDO_XBOX_CONTROLLER 0x2002 -#define USB_PRODUCT_AMAZON_LUNA_CONTROLLER 0x0419 -#define USB_PRODUCT_GOOGLE_STADIA_CONTROLLER 0x9400 -#define USB_PRODUCT_EVORETRO_GAMECUBE_ADAPTER 0x1846 -#define USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X 0x0150 -#define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS4 0x011c -#define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5 0x0184 -#define USB_PRODUCT_NINTENDO_GAMECUBE_ADAPTER 0x0337 -#define USB_PRODUCT_NINTENDO_N64_CONTROLLER 0x2019 -#define USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER 0x201e -#define USB_PRODUCT_NINTENDO_SNES_CONTROLLER 0x2017 -#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP 0x200e -#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT 0x2006 -#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR 0x2008 /* Used by joycond */ -#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT 0x2007 -#define USB_PRODUCT_NINTENDO_SWITCH_PRO 0x2009 -#define USB_PRODUCT_NINTENDO_WII_REMOTE 0x0306 -#define USB_PRODUCT_NINTENDO_WII_REMOTE2 0x0330 -#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V103 0x7210 -#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V104 0x7214 -#define USB_PRODUCT_RAZER_ATROX 0x0a00 -#define USB_PRODUCT_RAZER_PANTHERA 0x0401 -#define USB_PRODUCT_RAZER_PANTHERA_EVO 0x1008 -#define USB_PRODUCT_RAZER_RAIJU 0x1000 -#define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_USB 0x1007 -#define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH 0x100a -#define USB_PRODUCT_RAZER_ULTIMATE_EDITION_USB 0x1004 -#define USB_PRODUCT_RAZER_ULTIMATE_EDITION_BLUETOOTH 0x1009 -#define USB_PRODUCT_SHANWAN_DS3 0x0523 -#define USB_PRODUCT_SONY_DS3 0x0268 -#define USB_PRODUCT_SONY_DS4 0x05c4 -#define USB_PRODUCT_SONY_DS4_DONGLE 0x0ba0 -#define USB_PRODUCT_SONY_DS4_SLIM 0x09cc -#define USB_PRODUCT_SONY_DS5 0x0ce6 -#define USB_PRODUCT_VICTRIX_FS_PRO_V2 0x0207 -#define USB_PRODUCT_XBOX360_XUSB_CONTROLLER 0x02a1 /* XUSB driver software PID */ -#define USB_PRODUCT_XBOX360_WIRED_CONTROLLER 0x028e -#define USB_PRODUCT_XBOX360_WIRELESS_RECEIVER 0x0719 -#define USB_PRODUCT_XBOX_ONE_ADAPTIVE 0x0b0a -#define USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLUETOOTH 0x0b0c -#define USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLE 0x0b21 -#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1 0x02e3 -#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2 0x0b00 -#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH 0x0b05 -#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLE 0x0b22 -#define USB_PRODUCT_XBOX_ONE_S 0x02ea -#define USB_PRODUCT_XBOX_ONE_S_REV1_BLUETOOTH 0x02e0 -#define USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH 0x02fd -#define USB_PRODUCT_XBOX_ONE_S_REV2_BLE 0x0b20 -#define USB_PRODUCT_XBOX_SERIES_X 0x0b12 -#define USB_PRODUCT_XBOX_SERIES_X_BLE 0x0b13 -#define USB_PRODUCT_XBOX_SERIES_X_VICTRIX_GAMBIT 0x02d6 -#define USB_PRODUCT_XBOX_SERIES_X_PDP_BLUE 0x02d9 -#define USB_PRODUCT_XBOX_SERIES_X_PDP_AFTERGLOW 0x02da -#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 0x4001 -#define USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA 0x4002 -#define USB_PRODUCT_XBOX_ONE_XBOXGIP_CONTROLLER 0x02ff /* XBOXGIP driver software PID */ -#define USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 0x02fe /* Made up product ID for XInput */ -#define USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD 0x11ff +#define USB_PRODUCT_8BITDO_XBOX_CONTROLLER 0x2002 +#define USB_PRODUCT_AMAZON_LUNA_CONTROLLER 0x0419 +#define USB_PRODUCT_ASTRO_C40_XBOX360 0x0024 +#define USB_PRODUCT_BACKBONE_ONE_IOS 0x0103 +#define USB_PRODUCT_BACKBONE_ONE_IOS_PS5 0x0104 +#define USB_PRODUCT_GOOGLE_STADIA_CONTROLLER 0x9400 +#define USB_PRODUCT_EVORETRO_GAMECUBE_ADAPTER 0x1846 +#define USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X 0x0150 +#define USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X 0x014f +#define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS4 0x011c +#define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5 0x0184 +#define USB_PRODUCT_LOGITECH_F310 0xc216 +#define USB_PRODUCT_LOGITECH_CHILLSTREAM 0xcad1 +#define USB_PRODUCT_NINTENDO_GAMECUBE_ADAPTER 0x0337 +#define USB_PRODUCT_NINTENDO_N64_CONTROLLER 0x2019 +#define USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER 0x201e +#define USB_PRODUCT_NINTENDO_SNES_CONTROLLER 0x2017 +#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP 0x200e +#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT 0x2006 +#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR 0x2008 /* Used by joycond */ +#define USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT 0x2007 +#define USB_PRODUCT_NINTENDO_SWITCH_PRO 0x2009 +#define USB_PRODUCT_NINTENDO_WII_REMOTE 0x0306 +#define USB_PRODUCT_NINTENDO_WII_REMOTE2 0x0330 +#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V103 0x7210 +#define USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V104 0x7214 +#define USB_PRODUCT_RAZER_ATROX 0x0a00 +#define USB_PRODUCT_RAZER_PANTHERA 0x0401 +#define USB_PRODUCT_RAZER_PANTHERA_EVO 0x1008 +#define USB_PRODUCT_RAZER_RAIJU 0x1000 +#define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_USB 0x1007 +#define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH 0x100a +#define USB_PRODUCT_RAZER_ULTIMATE_EDITION_USB 0x1004 +#define USB_PRODUCT_RAZER_ULTIMATE_EDITION_BLUETOOTH 0x1009 +#define USB_PRODUCT_RAZER_WOLVERINE_V2 0x0a29 +#define USB_PRODUCT_RAZER_WOLVERINE_V2_CHROMA 0x0a2e +#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRED 0x100b +#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRELESS 0x100c +#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRED 0x1010 +#define USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRELESS 0x1011 +#define USB_PRODUCT_SHANWAN_DS3 0x0523 +#define USB_PRODUCT_SONY_DS3 0x0268 +#define USB_PRODUCT_SONY_DS4 0x05c4 +#define USB_PRODUCT_SONY_DS4_DONGLE 0x0ba0 +#define USB_PRODUCT_SONY_DS4_SLIM 0x09cc +#define USB_PRODUCT_SONY_DS4_STRIKEPAD 0x05c5 +#define USB_PRODUCT_SONY_DS5 0x0ce6 +#define USB_PRODUCT_SONY_DS5_EDGE 0x0df2 +#define USB_PRODUCT_THRUSTMASTER_ESWAPX_PRO 0xd012 +#define USB_PRODUCT_TURTLE_BEACH_SERIES_X_REACT_R 0x7013 +#define USB_PRODUCT_TURTLE_BEACH_SERIES_X_RECON 0x7009 +#define USB_PRODUCT_VICTRIX_FS_PRO_V2 0x0207 +#define USB_PRODUCT_XBOX360_XUSB_CONTROLLER 0x02a1 /* XUSB driver software PID */ +#define USB_PRODUCT_XBOX360_WIRED_CONTROLLER 0x028e +#define USB_PRODUCT_XBOX360_WIRELESS_RECEIVER 0x0719 +#define USB_PRODUCT_XBOX_ONE_ADAPTIVE 0x0b0a +#define USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLUETOOTH 0x0b0c +#define USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLE 0x0b21 +#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1 0x02e3 +#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2 0x0b00 +#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH 0x0b05 +#define USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLE 0x0b22 +#define USB_PRODUCT_XBOX_ONE_S 0x02ea +#define USB_PRODUCT_XBOX_ONE_S_REV1_BLUETOOTH 0x02e0 +#define USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH 0x02fd +#define USB_PRODUCT_XBOX_ONE_S_REV2_BLE 0x0b20 +#define USB_PRODUCT_XBOX_SERIES_X 0x0b12 +#define USB_PRODUCT_XBOX_SERIES_X_BLE 0x0b13 +#define USB_PRODUCT_XBOX_SERIES_X_VICTRIX_GAMBIT 0x02d6 +#define USB_PRODUCT_XBOX_SERIES_X_PDP_BLUE 0x02d9 +#define USB_PRODUCT_XBOX_SERIES_X_PDP_AFTERGLOW 0x02da +#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 0x4001 +#define USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA 0x4002 +#define USB_PRODUCT_XBOX_ONE_XBOXGIP_CONTROLLER 0x02ff /* XBOXGIP driver software PID */ +#define USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 0x02fe /* Made up product ID for XInput */ +#define USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD 0x11ff /* USB usage pages */ -#define USB_USAGEPAGE_GENERIC_DESKTOP 0x0001 -#define USB_USAGEPAGE_BUTTON 0x0009 +#define USB_USAGEPAGE_GENERIC_DESKTOP 0x0001 +#define USB_USAGEPAGE_BUTTON 0x0009 /* USB usages for USAGE_PAGE_GENERIC_DESKTOP */ -#define USB_USAGE_GENERIC_POINTER 0x0001 -#define USB_USAGE_GENERIC_MOUSE 0x0002 -#define USB_USAGE_GENERIC_JOYSTICK 0x0004 -#define USB_USAGE_GENERIC_GAMEPAD 0x0005 -#define USB_USAGE_GENERIC_KEYBOARD 0x0006 -#define USB_USAGE_GENERIC_KEYPAD 0x0007 -#define USB_USAGE_GENERIC_MULTIAXISCONTROLLER 0x0008 -#define USB_USAGE_GENERIC_X 0x0030 -#define USB_USAGE_GENERIC_Y 0x0031 -#define USB_USAGE_GENERIC_Z 0x0032 -#define USB_USAGE_GENERIC_RX 0x0033 -#define USB_USAGE_GENERIC_RY 0x0034 -#define USB_USAGE_GENERIC_RZ 0x0035 -#define USB_USAGE_GENERIC_SLIDER 0x0036 -#define USB_USAGE_GENERIC_DIAL 0x0037 -#define USB_USAGE_GENERIC_WHEEL 0x0038 -#define USB_USAGE_GENERIC_HAT 0x0039 +#define USB_USAGE_GENERIC_POINTER 0x0001 +#define USB_USAGE_GENERIC_MOUSE 0x0002 +#define USB_USAGE_GENERIC_JOYSTICK 0x0004 +#define USB_USAGE_GENERIC_GAMEPAD 0x0005 +#define USB_USAGE_GENERIC_KEYBOARD 0x0006 +#define USB_USAGE_GENERIC_KEYPAD 0x0007 +#define USB_USAGE_GENERIC_MULTIAXISCONTROLLER 0x0008 +#define USB_USAGE_GENERIC_X 0x0030 +#define USB_USAGE_GENERIC_Y 0x0031 +#define USB_USAGE_GENERIC_Z 0x0032 +#define USB_USAGE_GENERIC_RX 0x0033 +#define USB_USAGE_GENERIC_RY 0x0034 +#define USB_USAGE_GENERIC_RZ 0x0035 +#define USB_USAGE_GENERIC_SLIDER 0x0036 +#define USB_USAGE_GENERIC_DIAL 0x0037 +#define USB_USAGE_GENERIC_WHEEL 0x0038 +#define USB_USAGE_GENERIC_HAT 0x0039 /* Bluetooth SIG assigned Company Identifiers https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/ */ -#define BLUETOOTH_VENDOR_AMAZON 0x0171 +#define BLUETOOTH_VENDOR_AMAZON 0x0171 -#define BLUETOOTH_PRODUCT_LUNA_CONTROLLER 0x0419 +#define BLUETOOTH_PRODUCT_LUNA_CONTROLLER 0x0419 #endif /* usb_ids_h_ */ diff --git a/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick.c b/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick.c index 2d78f9e..71095e8 100644 --- a/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick.c +++ b/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick.c @@ -29,36 +29,36 @@ #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" +static joystick_hwdata *g_VJoys SDL_GUARDED_BY(SDL_joystick_lock) = NULL; -static joystick_hwdata * g_VJoys = NULL; +static joystick_hwdata *VIRTUAL_HWDataForIndex(int device_index) +{ + joystick_hwdata *vjoy; + SDL_AssertJoysticksLocked(); -static joystick_hwdata * -VIRTUAL_HWDataForIndex(int device_index) -{ - joystick_hwdata *vjoy = g_VJoys; - while (vjoy) { - if (device_index == 0) + for (vjoy = g_VJoys; vjoy; vjoy = vjoy->next) { + if (device_index == 0) { break; + } --device_index; - vjoy = vjoy->next; } return vjoy; } - -static void -VIRTUAL_FreeHWData(joystick_hwdata *hwdata) +static void VIRTUAL_FreeHWData(joystick_hwdata *hwdata) { - joystick_hwdata * cur = g_VJoys; - joystick_hwdata * prev = NULL; - - if (!hwdata) { + joystick_hwdata *cur; + joystick_hwdata *prev = NULL; + + SDL_AssertJoysticksLocked(); + + if (hwdata == NULL) { return; } /* Remove hwdata from SDL-global list */ - while (cur) { + for (cur = g_VJoys; cur; prev = cur, cur = cur->next) { if (hwdata == cur) { if (prev) { prev->next = cur->next; @@ -67,8 +67,6 @@ VIRTUAL_FreeHWData(joystick_hwdata *hwdata) } break; } - prev = cur; - cur = cur->next; } if (hwdata->joystick) { @@ -94,9 +92,7 @@ VIRTUAL_FreeHWData(joystick_hwdata *hwdata) SDL_free(hwdata); } - -int -SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) +int SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) { joystick_hwdata *hwdata = NULL; int device_index = -1; @@ -104,7 +100,9 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) int axis_triggerleft = -1; int axis_triggerright = -1; - if (!desc) { + SDL_AssertJoysticksLocked(); + + if (desc == NULL) { return SDL_InvalidParamError("desc"); } if (desc->version != SDL_VIRTUAL_JOYSTICK_DESC_VERSION) { @@ -113,7 +111,7 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) } hwdata = SDL_calloc(1, sizeof(joystick_hwdata)); - if (!hwdata) { + if (hwdata == NULL) { VIRTUAL_FreeHWData(hwdata); return SDL_OutOfMemory(); } @@ -161,7 +159,7 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) int i, axis; if (hwdata->desc.button_mask == 0) { - for (i = 0; i < hwdata->desc.nbuttons && i < sizeof(hwdata->desc.button_mask)*8; ++i) { + for (i = 0; i < hwdata->desc.nbuttons && i < sizeof(hwdata->desc.button_mask) * 8; ++i) { hwdata->desc.button_mask |= (1 << i); } } @@ -234,7 +232,6 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) joystick_hwdata *last; for (last = g_VJoys; last->next; last = last->next) { - continue; } last->next = hwdata; } else { @@ -247,13 +244,11 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc) return device_index; } - -int -SDL_JoystickDetachVirtualInner(int device_index) +int SDL_JoystickDetachVirtualInner(int device_index) { SDL_JoystickID instance_id; joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); - if (!hwdata) { + if (hwdata == NULL) { return SDL_SetError("Virtual joystick data not found"); } instance_id = hwdata->instance_id; @@ -262,15 +257,13 @@ SDL_JoystickDetachVirtualInner(int device_index) return 0; } - -int -SDL_JoystickSetVirtualAxisInner(SDL_Joystick *joystick, int axis, Sint16 value) +int SDL_JoystickSetVirtualAxisInner(SDL_Joystick *joystick, int axis, Sint16 value) { joystick_hwdata *hwdata; SDL_LockJoysticks(); - if (!joystick || !joystick->hwdata) { + if (joystick == NULL || !joystick->hwdata) { SDL_UnlockJoysticks(); return SDL_SetError("Invalid joystick"); } @@ -287,15 +280,13 @@ SDL_JoystickSetVirtualAxisInner(SDL_Joystick *joystick, int axis, Sint16 value) return 0; } - -int -SDL_JoystickSetVirtualButtonInner(SDL_Joystick *joystick, int button, Uint8 value) +int SDL_JoystickSetVirtualButtonInner(SDL_Joystick *joystick, int button, Uint8 value) { joystick_hwdata *hwdata; SDL_LockJoysticks(); - if (!joystick || !joystick->hwdata) { + if (joystick == NULL || !joystick->hwdata) { SDL_UnlockJoysticks(); return SDL_SetError("Invalid joystick"); } @@ -312,15 +303,13 @@ SDL_JoystickSetVirtualButtonInner(SDL_Joystick *joystick, int button, Uint8 valu return 0; } - -int -SDL_JoystickSetVirtualHatInner(SDL_Joystick *joystick, int hat, Uint8 value) +int SDL_JoystickSetVirtualHatInner(SDL_Joystick *joystick, int hat, Uint8 value) { joystick_hwdata *hwdata; SDL_LockJoysticks(); - if (!joystick || !joystick->hwdata) { + if (joystick == NULL || !joystick->hwdata) { SDL_UnlockJoysticks(); return SDL_SetError("Invalid joystick"); } @@ -337,60 +326,48 @@ SDL_JoystickSetVirtualHatInner(SDL_Joystick *joystick, int hat, Uint8 value) return 0; } - -static int -VIRTUAL_JoystickInit(void) +static int VIRTUAL_JoystickInit(void) { return 0; } - -static int -VIRTUAL_JoystickGetCount(void) +static int VIRTUAL_JoystickGetCount(void) { + joystick_hwdata *cur; int count = 0; - joystick_hwdata *cur = g_VJoys; - while (cur) { + + SDL_AssertJoysticksLocked(); + + for (cur = g_VJoys; cur; cur = cur->next) { ++count; - cur = cur->next; } return count; } - -static void -VIRTUAL_JoystickDetect(void) +static void VIRTUAL_JoystickDetect(void) { } - -static const char * -VIRTUAL_JoystickGetDeviceName(int device_index) +static const char *VIRTUAL_JoystickGetDeviceName(int device_index) { joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); - if (!hwdata) { + if (hwdata == NULL) { return NULL; } return hwdata->name; } - -static const char * -VIRTUAL_JoystickGetDevicePath(int device_index) +static const char *VIRTUAL_JoystickGetDevicePath(int device_index) { return NULL; } - -static int -VIRTUAL_JoystickGetDevicePlayerIndex(int device_index) +static int VIRTUAL_JoystickGetDevicePlayerIndex(int device_index) { return -1; } - -static void -VIRTUAL_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void VIRTUAL_JoystickSetDevicePlayerIndex(int device_index, int player_index) { joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); @@ -399,12 +376,10 @@ VIRTUAL_JoystickSetDevicePlayerIndex(int device_index, int player_index) } } - -static SDL_JoystickGUID -VIRTUAL_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID VIRTUAL_JoystickGetDeviceGUID(int device_index) { joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); - if (!hwdata) { + if (hwdata == NULL) { SDL_JoystickGUID guid; SDL_zero(guid); return guid; @@ -412,23 +387,23 @@ VIRTUAL_JoystickGetDeviceGUID(int device_index) return hwdata->guid; } - -static SDL_JoystickID -VIRTUAL_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID VIRTUAL_JoystickGetDeviceInstanceID(int device_index) { joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); - if (!hwdata) { + if (hwdata == NULL) { return -1; } return hwdata->instance_id; } - -static int -VIRTUAL_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int VIRTUAL_JoystickOpen(SDL_Joystick *joystick, int device_index) { - joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); - if (!hwdata) { + joystick_hwdata *hwdata; + + SDL_AssertJoysticksLocked(); + + hwdata = VIRTUAL_HWDataForIndex(device_index); + if (hwdata == NULL) { return SDL_SetError("No such device"); } joystick->instance_id = hwdata->instance_id; @@ -440,12 +415,12 @@ VIRTUAL_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } - -static int -VIRTUAL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int VIRTUAL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { int result; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { joystick_hwdata *hwdata = joystick->hwdata; if (hwdata->desc.Rumble) { @@ -460,11 +435,12 @@ VIRTUAL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint return result; } -static int -VIRTUAL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int VIRTUAL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { int result; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { joystick_hwdata *hwdata = joystick->hwdata; if (hwdata->desc.RumbleTriggers) { @@ -479,13 +455,14 @@ VIRTUAL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint1 return result; } - -static Uint32 -VIRTUAL_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 VIRTUAL_JoystickGetCapabilities(SDL_Joystick *joystick) { - joystick_hwdata *hwdata = joystick->hwdata; + joystick_hwdata *hwdata; Uint32 caps = 0; + SDL_AssertJoysticksLocked(); + + hwdata = joystick->hwdata; if (hwdata) { if (hwdata->desc.Rumble) { caps |= SDL_JOYCAP_RUMBLE; @@ -500,12 +477,12 @@ VIRTUAL_JoystickGetCapabilities(SDL_Joystick *joystick) return caps; } - -static int -VIRTUAL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int VIRTUAL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { int result; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { joystick_hwdata *hwdata = joystick->hwdata; if (hwdata->desc.SetLED) { @@ -520,11 +497,12 @@ VIRTUAL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blu return result; } -static int -VIRTUAL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int VIRTUAL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { int result; + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { joystick_hwdata *hwdata = joystick->hwdata; if (hwdata->desc.SendEffect) { @@ -539,20 +517,19 @@ VIRTUAL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) return result; } -static int -VIRTUAL_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int VIRTUAL_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } - -static void -VIRTUAL_JoystickUpdate(SDL_Joystick *joystick) +static void VIRTUAL_JoystickUpdate(SDL_Joystick *joystick) { joystick_hwdata *hwdata; int i; - if (!joystick) { + SDL_AssertJoysticksLocked(); + + if (joystick == NULL) { return; } if (!joystick->hwdata) { @@ -576,10 +553,10 @@ VIRTUAL_JoystickUpdate(SDL_Joystick *joystick) } } - -static void -VIRTUAL_JoystickClose(SDL_Joystick *joystick) +static void VIRTUAL_JoystickClose(SDL_Joystick *joystick) { + SDL_AssertJoysticksLocked(); + if (joystick->hwdata) { joystick_hwdata *hwdata = joystick->hwdata; hwdata->joystick = NULL; @@ -587,17 +564,16 @@ VIRTUAL_JoystickClose(SDL_Joystick *joystick) } } - -static void -VIRTUAL_JoystickQuit(void) +static void VIRTUAL_JoystickQuit(void) { + SDL_AssertJoysticksLocked(); + while (g_VJoys) { VIRTUAL_FreeHWData(g_VJoys); } } -static SDL_bool -VIRTUAL_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool VIRTUAL_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { joystick_hwdata *hwdata = VIRTUAL_HWDataForIndex(device_index); int current_button = 0; @@ -740,8 +716,7 @@ VIRTUAL_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) return SDL_TRUE; } -SDL_JoystickDriver SDL_VIRTUAL_JoystickDriver = -{ +SDL_JoystickDriver SDL_VIRTUAL_JoystickDriver = { VIRTUAL_JoystickInit, VIRTUAL_JoystickGetCount, VIRTUAL_JoystickDetect, diff --git a/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick_c.h b/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick_c.h index aba5f8f..9fa0594 100644 --- a/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick_c.h +++ b/modules/SDL2/src/joystick/virtual/SDL_virtualjoystick_c.h @@ -49,12 +49,12 @@ typedef struct joystick_hwdata int SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc); int SDL_JoystickDetachVirtualInner(int device_index); -int SDL_JoystickSetVirtualAxisInner(SDL_Joystick * joystick, int axis, Sint16 value); -int SDL_JoystickSetVirtualButtonInner(SDL_Joystick * joystick, int button, Uint8 value); -int SDL_JoystickSetVirtualHatInner(SDL_Joystick * joystick, int hat, Uint8 value); +int SDL_JoystickSetVirtualAxisInner(SDL_Joystick *joystick, int axis, Sint16 value); +int SDL_JoystickSetVirtualButtonInner(SDL_Joystick *joystick, int button, Uint8 value); +int SDL_JoystickSetVirtualHatInner(SDL_Joystick *joystick, int hat, Uint8 value); -#endif /* SDL_JOYSTICK_VIRTUAL */ +#endif /* SDL_JOYSTICK_VIRTUAL */ -#endif /* SDL_VIRTUALJOYSTICK_C_H */ +#endif /* SDL_VIRTUALJOYSTICK_C_H */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/joystick/vita/SDL_sysjoystick.c b/modules/SDL2/src/joystick/vita/SDL_sysjoystick.c index a6a88aa..ce66c7c 100644 --- a/modules/SDL2/src/joystick/vita/SDL_sysjoystick.c +++ b/modules/SDL2/src/joystick/vita/SDL_sysjoystick.c @@ -27,7 +27,7 @@ #include #include -#include /* For the definition of NULL */ +#include /* For the definition of NULL */ #include #include "../SDL_sysjoystick.h" @@ -45,7 +45,7 @@ static SceCtrlData pad1 = { .lx = 0, .ly = 0, .rx = 0, .ry = 0, .lt = 0, .rt = 0 static SceCtrlData pad2 = { .lx = 0, .ly = 0, .rx = 0, .ry = 0, .lt = 0, .rt = 0, .buttons = 0 }; static SceCtrlData pad3 = { .lx = 0, .ly = 0, .rx = 0, .ry = 0, .lt = 0, .rt = 0, .buttons = 0 }; -static int ext_port_map[4]= { 1, 2, 3, 4 }; //index: SDL joy number, entry: Vita port number. For external controllers +static int ext_port_map[4] = { 1, 2, 3, 4 }; // index: SDL joy number, entry: Vita port number. For external controllers static int SDL_numjoysticks = 1; @@ -68,23 +68,23 @@ static const unsigned int ext_button_map[] = { SCE_CTRL_R3 }; -static int analog_map[256]; /* Map analog inputs to -32768 -> 32767 */ +static int analog_map[256]; /* Map analog inputs to -32768 -> 32767 */ typedef struct { - int x; - int y; + int x; + int y; } point; /* 4 points define the bezier-curve. */ /* The Vita has a good amount of analog travel, so use a linear curve */ static point a = { 0, 0 }; -static point b = { 0, 0 }; +static point b = { 0, 0 }; static point c = { 128, 32767 }; static point d = { 128, 32767 }; /* simple linear interpolation between two points */ -static SDL_INLINE void lerp (point *dest, point *first, point *second, float t) +static SDL_INLINE void lerp(point *dest, point *first, point *second, float t) { dest->x = first->x + (second->x - first->x) * t; dest->y = first->y + (second->y - first->y) * t; @@ -94,12 +94,12 @@ static SDL_INLINE void lerp (point *dest, point *first, point *second, float t) static int calc_bezier_y(float t) { point ab, bc, cd, abbc, bccd, dest; - lerp (&ab, &a, &b, t); /* point between a and b */ - lerp (&bc, &b, &c, t); /* point between b and c */ - lerp (&cd, &c, &d, t); /* point between c and d */ - lerp (&abbc, &ab, &bc, t); /* point between ab and bc */ - lerp (&bccd, &bc, &cd, t); /* point between bc and cd */ - lerp (&dest, &abbc, &bccd, t); /* point on the bezier-curve */ + lerp(&ab, &a, &b, t); /* point between a and b */ + lerp(&bc, &b, &c, t); /* point between b and c */ + lerp(&cd, &c, &d, t); /* point between c and d */ + lerp(&abbc, &ab, &bc, t); /* point between ab and bc */ + lerp(&bccd, &bc, &cd, t); /* point between bc and cd */ + lerp(&dest, &abbc, &bccd, t); /* point on the bezier-curve */ return dest.y; } @@ -118,11 +118,10 @@ int VITA_JoystickInit(void) /* Create an accurate map from analog inputs (0 to 255) to SDL joystick positions (-32768 to 32767) */ - for (i = 0; i < 128; i++) - { - float t = (float)i/127.0f; - analog_map[i+128] = calc_bezier_y(t); - analog_map[127-i] = -1 * analog_map[i+128]; + for (i = 0; i < 128; i++) { + float t = (float)i / 127.0f; + analog_map[i + 128] = calc_bezier_y(t); + analog_map[127 - i] = -1 * analog_map[i + 128]; } // Assume we have at least one controller, even when nothing is paired @@ -137,10 +136,8 @@ int VITA_JoystickInit(void) // On Vita TV, port 0 and 1 are the same controller // and that is the first one, so start at port 2 - for (i=2; i<=4; i++) - { - if (myPortInfo.port[i]!=SCE_CTRL_TYPE_UNPAIRED) - { + for (i = 2; i <= 4; i++) { + if (myPortInfo.port[i] != SCE_CTRL_TYPE_UNPAIRED) { SDL_PrivateJoystickAdded(SDL_numjoysticks); SDL_numjoysticks++; } @@ -165,17 +162,21 @@ SDL_JoystickID VITA_JoystickGetDeviceInstanceID(int device_index) const char *VITA_JoystickGetDeviceName(int index) { - if (index == 0) + if (index == 0) { return "PSVita Controller"; + } - if (index == 1) + if (index == 1) { return "PSVita Controller"; + } - if (index == 2) + if (index == 2) { return "PSVita Controller"; + } - if (index == 3) + if (index == 3) { return "PSVita Controller"; + } SDL_SetError("No joystick available with that index"); return NULL; @@ -186,14 +187,12 @@ const char *VITA_JoystickGetDevicePath(int index) return NULL; } -static int -VITA_JoystickGetDevicePlayerIndex(int device_index) +static int VITA_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -VITA_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void VITA_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } @@ -232,13 +231,18 @@ static void VITA_JoystickUpdate(SDL_Joystick *joystick) static unsigned char old_rt[] = { 0, 0, 0, 0 }; SceCtrlData *pad = NULL; - int index = (int) SDL_JoystickInstanceID(joystick); + int index = (int)SDL_JoystickInstanceID(joystick); - if (index == 0) pad = &pad0; - else if (index == 1) pad = &pad1; - else if (index == 2) pad = &pad2; - else if (index == 3) pad = &pad3; - else return; + if (index == 0) + pad = &pad0; + else if (index == 1) + pad = &pad1; + else if (index == 2) + pad = &pad2; + else if (index == 3) + pad = &pad3; + else + return; if (index == 0) { if (sceCtrlPeekBufferPositive2(ext_port_map[index], pad, 1) < 0) { @@ -295,8 +299,7 @@ static void VITA_JoystickUpdate(SDL_Joystick *joystick) if (changed & ext_button_map[i]) { SDL_PrivateJoystickButton( joystick, i, - (buttons & ext_button_map[i]) ? - SDL_PRESSED : SDL_RELEASED); + (buttons & ext_button_map[i]) ? SDL_PRESSED : SDL_RELEASED); } } } @@ -319,10 +322,9 @@ SDL_JoystickGUID VITA_JoystickGetDeviceGUID(int device_index) return SDL_CreateJoystickGUIDForName(name); } -static int -VITA_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int VITA_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { - int index = (int) SDL_JoystickInstanceID(joystick); + int index = (int)SDL_JoystickInstanceID(joystick); SceCtrlActuator act; SDL_zero(act); @@ -334,50 +336,42 @@ VITA_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 return 0; } -static int -VITA_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left, Uint16 right) +static int VITA_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left, Uint16 right) { return SDL_Unsupported(); } -static Uint32 -VITA_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 VITA_JoystickGetCapabilities(SDL_Joystick *joystick) { // always return LED and rumble supported for now return SDL_JOYCAP_LED | SDL_JOYCAP_RUMBLE; } - -static int -VITA_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int VITA_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { - int index = (int) SDL_JoystickInstanceID(joystick); + int index = (int)SDL_JoystickInstanceID(joystick); if (sceCtrlSetLightBar(ext_port_map[index], red, green, blue) < 0) { return SDL_Unsupported(); } return 0; } -static int -VITA_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int VITA_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -VITA_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int VITA_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static SDL_bool -VITA_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool VITA_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_VITA_JoystickDriver = -{ +SDL_JoystickDriver SDL_VITA_JoystickDriver = { VITA_JoystickInit, VITA_JoystickGetCount, VITA_JoystickDetect, diff --git a/modules/SDL2/src/joystick/windows/SDL_dinputjoystick.c b/modules/SDL2/src/joystick/windows/SDL_dinputjoystick.c index 3396ea1..9299619 100644 --- a/modules/SDL2/src/joystick/windows/SDL_dinputjoystick.c +++ b/modules/SDL2/src/joystick/windows/SDL_dinputjoystick.c @@ -33,16 +33,20 @@ #include "../hidapi/SDL_hidapijoystick_c.h" #ifndef DIDFT_OPTIONAL -#define DIDFT_OPTIONAL 0x80000000 +#define DIDFT_OPTIONAL 0x80000000 #endif -#define INPUT_QSIZE 128 /* Buffer up to 128 input messages */ -#define JOY_AXIS_THRESHOLD (((SDL_JOYSTICK_AXIS_MAX)-(SDL_JOYSTICK_AXIS_MIN))/100) /* 1% motion */ +#define INPUT_QSIZE 128 /* Buffer up to 128 input messages */ +#define JOY_AXIS_THRESHOLD (((SDL_JOYSTICK_AXIS_MAX) - (SDL_JOYSTICK_AXIS_MIN)) / 100) /* 1% motion */ -#define CONVERT_MAGNITUDE(x) (((x)*10000) / 0x7FFF) +#define CONVERT_MAGNITUDE(x) (((x)*10000) / 0x7FFF) /* external variables referenced. */ +#ifdef SDL_VIDEO_DRIVER_WINDOWS extern HWND SDL_HelperWindow; +#else +static const HWND SDL_HelperWindow = NULL; +#endif /* local variables */ static SDL_bool coinitialized = SDL_FALSE; @@ -229,16 +233,14 @@ const DIDATAFORMAT SDL_c_dfDIJoystick2 = { }; /* Convert a DirectInput return code to a text message */ -static int -SetDIerror(const char *function, HRESULT code) +static int SetDIerror(const char *function, HRESULT code) { return SDL_SetError("%s() DirectX error 0x%8.8lx", function, code); } -static SDL_bool -SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char* hidPath) +static SDL_bool SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char *hidPath) { -#ifdef SDL_JOYSTICK_XINPUT +#if defined(SDL_JOYSTICK_XINPUT) || defined(SDL_JOYSTICK_RAWINPUT) SDL_GameControllerType type; /* XInput and RawInput backends will pick up XInput-compatible devices */ @@ -246,7 +248,7 @@ SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char* hidPath) #ifdef SDL_JOYSTICK_RAWINPUT && !RAWINPUT_IsEnabled() #endif - ) { + ) { return SDL_FALSE; } @@ -262,17 +264,16 @@ SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char* hidPath) (vendor_id == USB_VENDOR_VALVE && product_id == USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD)) { return SDL_TRUE; } -#endif /* SDL_JOYSTICK_XINPUT */ +#endif /* SDL_JOYSTICK_XINPUT || SDL_JOYSTICK_RAWINPUT */ return SDL_FALSE; } -static SDL_bool -QueryDeviceName(LPDIRECTINPUTDEVICE8 device, char** device_name) +static SDL_bool QueryDeviceName(LPDIRECTINPUTDEVICE8 device, char **device_name) { DIPROPSTRING dipstr; - if (!device || !device_name) { + if (!device || device_name == NULL) { return SDL_FALSE; } @@ -290,12 +291,11 @@ QueryDeviceName(LPDIRECTINPUTDEVICE8 device, char** device_name) return SDL_TRUE; } -static SDL_bool -QueryDevicePath(LPDIRECTINPUTDEVICE8 device, char** device_path) +static SDL_bool QueryDevicePath(LPDIRECTINPUTDEVICE8 device, char **device_path) { DIPROPGUIDANDPATH dippath; - if (!device || !device_path) { + if (!device || device_path == NULL) { return SDL_FALSE; } @@ -316,12 +316,11 @@ QueryDevicePath(LPDIRECTINPUTDEVICE8 device, char** device_path) return SDL_TRUE; } -static SDL_bool -QueryDeviceInfo(LPDIRECTINPUTDEVICE8 device, Uint16* vendor_id, Uint16* product_id) +static SDL_bool QueryDeviceInfo(LPDIRECTINPUTDEVICE8 device, Uint16 *vendor_id, Uint16 *product_id) { DIPROPDWORD dipdw; - if (!device || !vendor_id || !product_id) { + if (!device || vendor_id == NULL || product_id == NULL) { return SDL_FALSE; } @@ -343,7 +342,7 @@ QueryDeviceInfo(LPDIRECTINPUTDEVICE8 device, Uint16* vendor_id, Uint16* product_ void FreeRumbleEffectData(DIEFFECT *effect) { - if (!effect) { + if (effect == NULL) { return; } SDL_free(effect->rgdwAxes); @@ -359,7 +358,7 @@ DIEFFECT *CreateRumbleEffectData(Sint16 magnitude) /* Create the effect */ effect = (DIEFFECT *)SDL_calloc(1, sizeof(*effect)); - if (!effect) { + if (effect == NULL) { return NULL; } effect->dwSize = sizeof(*effect); @@ -383,7 +382,7 @@ DIEFFECT *CreateRumbleEffectData(Sint16 magnitude) effect->dwFlags |= DIEFF_CARTESIAN; periodic = (DIPERIODIC *)SDL_calloc(1, sizeof(*periodic)); - if (!periodic) { + if (periodic == NULL) { FreeRumbleEffectData(effect); return NULL; } @@ -396,8 +395,7 @@ DIEFFECT *CreateRumbleEffectData(Sint16 magnitude) return effect; } -int -SDL_DINPUT_JoystickInit(void) +int SDL_DINPUT_JoystickInit(void) { HRESULT result; HINSTANCE instance; @@ -416,7 +414,7 @@ SDL_DINPUT_JoystickInit(void) coinitialized = SDL_TRUE; result = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectInput8, (LPVOID *)&dinput); + &IID_IDirectInput8, (LPVOID *)&dinput); if (FAILED(result)) { return SetDIerror("CoCreateInstance", result); @@ -440,10 +438,13 @@ SDL_DINPUT_JoystickInit(void) } /* helper function for direct input, gets called for each connected joystick */ -static BOOL CALLBACK -EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) +static BOOL CALLBACK EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) { -#define CHECK(expression) { if(!(expression)) goto err; } +#define CHECK(expression) \ + { \ + if (!(expression)) \ + goto err; \ + } JoyStick_DeviceData *pNewJoystick = NULL; JoyStick_DeviceData *pPrevJoystick = NULL; Uint16 vendor = 0; @@ -452,26 +453,33 @@ EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) char *hidPath = NULL; char *name = NULL; LPDIRECTINPUTDEVICE8 device = NULL; + DIDEVCAPS caps; /* We are only supporting HID devices. */ - CHECK((pDeviceInstance->dwDevType & DIDEVTYPE_HID) != 0); + CHECK(pDeviceInstance->dwDevType & DIDEVTYPE_HID); CHECK(SUCCEEDED(IDirectInput8_CreateDevice(dinput, &pDeviceInstance->guidInstance, &device, NULL))); CHECK(QueryDeviceName(device, &name)); CHECK(QueryDevicePath(device, &hidPath)); CHECK(QueryDeviceInfo(device, &vendor, &product)); + /* Check to make sure the device has buttons and axes. + * This fixes incorrectly detecting the ROG CHAKRAM X mouse as a game controller on Windows 10 + */ + caps.dwSize = sizeof(caps); + CHECK(SUCCEEDED(IDirectInputDevice8_GetCapabilities(device, &caps))); + CHECK(caps.dwAxes > 0 && caps.dwButtons > 0); + CHECK(!SDL_IsXInputDevice(vendor, product, hidPath)); - pNewJoystick = *(JoyStick_DeviceData**)pContext; + pNewJoystick = *(JoyStick_DeviceData **)pContext; while (pNewJoystick) { /* update GUIDs of joysticks with matching paths, in case they're not open yet */ if (SDL_strcmp(pNewJoystick->path, hidPath) == 0) { /* if we are replacing the front of the list then update it */ - if (pNewJoystick == *(JoyStick_DeviceData**)pContext) { - *(JoyStick_DeviceData**)pContext = pNewJoystick->pNext; - } - else if (pPrevJoystick) { + if (pNewJoystick == *(JoyStick_DeviceData **)pContext) { + *(JoyStick_DeviceData **)pContext = pNewJoystick->pNext; + } else if (pPrevJoystick) { pPrevJoystick->pNext = pNewJoystick->pNext; } @@ -535,8 +543,7 @@ err: #undef CHECK } -void -SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext) +void SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext) { if (dinput == NULL) { return; @@ -553,10 +560,13 @@ typedef struct SDL_bool present; } Joystick_PresentData; -static BOOL CALLBACK -EnumJoystickPresentCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) +static BOOL CALLBACK EnumJoystickPresentCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) { -#define CHECK(expression) { if(!(expression)) goto err; } +#define CHECK(expression) \ + { \ + if (!(expression)) \ + goto err; \ + } Joystick_PresentData *pData = (Joystick_PresentData *)pContext; Uint16 vendor = 0; Uint16 product = 0; @@ -564,7 +574,7 @@ EnumJoystickPresentCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext BOOL result = DIENUM_CONTINUE; /* We are only supporting HID devices. */ - CHECK((pDeviceInstance->dwDevType & DIDEVTYPE_HID) != 0); + CHECK(pDeviceInstance->dwDevType & DIDEVTYPE_HID); CHECK(SUCCEEDED(IDirectInput8_CreateDevice(dinput, &pDeviceInstance->guidInstance, &device, NULL))); CHECK(QueryDeviceInfo(device, &vendor, &product)); @@ -583,8 +593,7 @@ err: #undef CHECK } -SDL_bool -SDL_DINPUT_JoystickPresent(Uint16 vendor_id, Uint16 product_id, Uint16 version_number) +SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor_id, Uint16 product_id, Uint16 version_number) { Joystick_PresentData data; @@ -599,8 +608,7 @@ SDL_DINPUT_JoystickPresent(Uint16 vendor_id, Uint16 product_id, Uint16 version_n return data.present; } -static BOOL CALLBACK -EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) +static BOOL CALLBACK EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) { SDL_Joystick *joystick = (SDL_Joystick *)pContext; HRESULT result; @@ -622,19 +630,19 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) in->type = AXIS; in->num = joystick->naxes; - if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_XAxis, sizeof(pDeviceObject->guidType))) + if (SDL_memcmp(&pDeviceObject->guidType, &GUID_XAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_X; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_YAxis, sizeof(pDeviceObject->guidType))) + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_YAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_Y; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_ZAxis, sizeof(pDeviceObject->guidType))) + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_ZAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_Z; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_RxAxis, sizeof(pDeviceObject->guidType))) + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_RxAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_RX; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_RyAxis, sizeof(pDeviceObject->guidType))) + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_RyAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_RY; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_RzAxis, sizeof(pDeviceObject->guidType))) + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_RzAxis, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_RZ; - else if (!SDL_memcmp(&pDeviceObject->guidType, &GUID_Slider, sizeof(pDeviceObject->guidType))) { + } else if (SDL_memcmp(&pDeviceObject->guidType, &GUID_Slider, sizeof(pDeviceObject->guidType)) == 0) { in->ofs = DIJOFS_SLIDER(joystick->hwdata->NumSliders); ++joystick->hwdata->NumSliders; } else { @@ -650,9 +658,9 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) result = IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_RANGE, &diprg.diph); + DIPROP_RANGE, &diprg.diph); if (FAILED(result)) { - return DIENUM_CONTINUE; /* don't use this axis */ + return DIENUM_CONTINUE; /* don't use this axis */ } /* Set dead zone to 0. */ @@ -663,9 +671,9 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) dilong.dwData = 0; result = IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_DEADZONE, &dilong.diph); + DIPROP_DEADZONE, &dilong.diph); if (FAILED(result)) { - return DIENUM_CONTINUE; /* don't use this axis */ + return DIENUM_CONTINUE; /* don't use this axis */ } joystick->naxes++; @@ -677,7 +685,7 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) joystick->hwdata->NumInputs++; if (joystick->hwdata->NumInputs == MAX_INPUTS) { - return DIENUM_STOP; /* too many */ + return DIENUM_STOP; /* too many */ } return DIENUM_CONTINUE; @@ -686,22 +694,22 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE pDeviceObject, LPVOID pContext) /* Sort using the data offset into the DInput struct. * This gives a reasonable ordering for the inputs. */ -static int SDLCALL -SortDevFunc(const void *a, const void *b) +static int SDLCALL SortDevFunc(const void *a, const void *b) { - const input_t *inputA = (const input_t*)a; - const input_t *inputB = (const input_t*)b; + const input_t *inputA = (const input_t *)a; + const input_t *inputB = (const input_t *)b; - if (inputA->ofs < inputB->ofs) + if (inputA->ofs < inputB->ofs) { return -1; - if (inputA->ofs > inputB->ofs) + } + if (inputA->ofs > inputB->ofs) { return 1; + } return 0; } /* Sort the input objects and recalculate the indices for each input. */ -static void -SortDevObjects(SDL_Joystick *joystick) +static void SortDevObjects(SDL_Joystick *joystick) { input_t *inputs = joystick->hwdata->Inputs; int nButtons = 0; @@ -731,8 +739,7 @@ SortDevObjects(SDL_Joystick *joystick) } } -int -SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice) +int SDL_DINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice) { HRESULT result; DIPROPDWORD dipdw; @@ -746,20 +753,19 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde result = IDirectInput8_CreateDevice(dinput, - &joystickdevice->dxdevice.guidInstance, - &joystick->hwdata->InputDevice, - NULL); + &joystickdevice->dxdevice.guidInstance, + &joystick->hwdata->InputDevice, + NULL); if (FAILED(result)) { return SetDIerror("IDirectInput::CreateDevice", result); } /* Acquire shared access. Exclusive access is required for forces, - * though. */ + * though. */ result = - IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata-> - InputDevice, SDL_HelperWindow, - DISCL_EXCLUSIVE | - DISCL_BACKGROUND); + IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata->InputDevice, SDL_HelperWindow, + DISCL_EXCLUSIVE | + DISCL_BACKGROUND); if (FAILED(result)) { return SetDIerror("IDirectInputDevice8::SetCooperativeLevel", result); } @@ -767,7 +773,7 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde /* Use the extended data structure: DIJOYSTATE2. */ result = IDirectInputDevice8_SetDataFormat(joystick->hwdata->InputDevice, - &SDL_c_dfDIJoystick2); + &SDL_c_dfDIJoystick2); if (FAILED(result)) { return SetDIerror("IDirectInputDevice8::SetDataFormat", result); } @@ -775,7 +781,7 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde /* Get device capabilities */ result = IDirectInputDevice8_GetCapabilities(joystick->hwdata->InputDevice, - &joystick->hwdata->Capabilities); + &joystick->hwdata->Capabilities); if (FAILED(result)) { return SetDIerror("IDirectInputDevice8::GetCapabilities", result); } @@ -789,9 +795,8 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde /* reset all actuators. */ result = - IDirectInputDevice8_SendForceFeedbackCommand(joystick->hwdata-> - InputDevice, - DISFFC_RESET); + IDirectInputDevice8_SendForceFeedbackCommand(joystick->hwdata->InputDevice, + DISFFC_RESET); /* Not necessarily supported, ignore if not supported. if (FAILED(result)) { @@ -806,14 +811,14 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde } /* Turn on auto-centering for a ForceFeedback device (until told - * otherwise). */ + * otherwise). */ dipdw.diph.dwObj = 0; dipdw.diph.dwHow = DIPH_DEVICE; dipdw.dwData = DIPROPAUTOCENTER_ON; result = IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_AUTOCENTER, &dipdw.diph); + DIPROP_AUTOCENTER, &dipdw.diph); /* Not necessarily supported, ignore if not supported. if (FAILED(result)) { @@ -824,11 +829,11 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde /* What buttons and axes does it have? */ IDirectInputDevice8_EnumObjects(joystick->hwdata->InputDevice, - EnumDevObjectsCallback, joystick, - DIDFT_BUTTON | DIDFT_AXIS | DIDFT_POV); + EnumDevObjectsCallback, joystick, + DIDFT_BUTTON | DIDFT_AXIS | DIDFT_POV); /* Reorder the input objects. Some devices do not report the X axis as - * the first axis, for example. */ + * the first axis, for example. */ SortDevObjects(joystick); dipdw.diph.dwObj = 0; @@ -838,7 +843,7 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde /* Set the buffer size */ result = IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_BUFFERSIZE, &dipdw.diph); + DIPROP_BUFFERSIZE, &dipdw.diph); if (result == DI_POLLEDDEVICE) { /* This device doesn't support buffering, so we're forced @@ -859,8 +864,7 @@ SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde return 0; } -static int -SDL_DINPUT_JoystickInitRumble(SDL_Joystick * joystick, Sint16 magnitude) +static int SDL_DINPUT_JoystickInitRumble(SDL_Joystick *joystick, Sint16 magnitude) { HRESULT result; @@ -895,8 +899,7 @@ SDL_DINPUT_JoystickInitRumble(SDL_Joystick * joystick, Sint16 magnitude) return 0; } -int -SDL_DINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { HRESULT result; @@ -941,8 +944,7 @@ SDL_DINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, return 0; } -Uint32 -SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick * joystick) +Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; @@ -953,8 +955,7 @@ SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick * joystick) return result; } -static Uint8 -TranslatePOV(DWORD value) +static Uint8 TranslatePOV(DWORD value) { const int HAT_VALS[] = { SDL_HAT_UP, @@ -967,16 +968,18 @@ TranslatePOV(DWORD value) SDL_HAT_UP | SDL_HAT_LEFT }; - if (LOWORD(value) == 0xFFFF) + if (LOWORD(value) == 0xFFFF) { return SDL_HAT_CENTERED; + } /* Round the value up: */ value += 4500 / 2; value %= 36000; value /= 4500; - if (value >= 8) - return SDL_HAT_CENTERED; /* shouldn't happen */ + if (value >= 8) { + return SDL_HAT_CENTERED; /* shouldn't happen */ + } return HAT_VALS[value]; } @@ -986,8 +989,7 @@ TranslatePOV(DWORD value) * but instead should call SDL_PrivateJoystick*() to deliver events * and update joystick device state. */ -static void -UpdateDINPUTJoystickState_Polled(SDL_Joystick * joystick) +static void UpdateDINPUTJoystickState_Polled(SDL_Joystick *joystick) { DIJOYSTATE2 state; HRESULT result; @@ -995,12 +997,12 @@ UpdateDINPUTJoystickState_Polled(SDL_Joystick * joystick) result = IDirectInputDevice8_GetDeviceState(joystick->hwdata->InputDevice, - sizeof(DIJOYSTATE2), &state); + sizeof(DIJOYSTATE2), &state); if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) { IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); result = IDirectInputDevice8_GetDeviceState(joystick->hwdata->InputDevice, - sizeof(DIJOYSTATE2), &state); + sizeof(DIJOYSTATE2), &state); } if (result != DI_OK) { @@ -1043,7 +1045,7 @@ UpdateDINPUTJoystickState_Polled(SDL_Joystick * joystick) case BUTTON: SDL_PrivateJoystickButton(joystick, in->num, - (Uint8)(state.rgbButtons[in->ofs - DIJOFS_BUTTON0] ? SDL_PRESSED : SDL_RELEASED)); + (Uint8)(state.rgbButtons[in->ofs - DIJOFS_BUTTON0] ? SDL_PRESSED : SDL_RELEASED)); break; case HAT: { @@ -1055,8 +1057,7 @@ UpdateDINPUTJoystickState_Polled(SDL_Joystick * joystick) } } -static void -UpdateDINPUTJoystickState_Buffered(SDL_Joystick * joystick) +static void UpdateDINPUTJoystickState_Buffered(SDL_Joystick *joystick) { int i; HRESULT result; @@ -1066,14 +1067,14 @@ UpdateDINPUTJoystickState_Buffered(SDL_Joystick * joystick) numevents = INPUT_QSIZE; result = IDirectInputDevice8_GetDeviceData(joystick->hwdata->InputDevice, - sizeof(DIDEVICEOBJECTDATA), evtbuf, - &numevents, 0); + sizeof(DIDEVICEOBJECTDATA), evtbuf, + &numevents, 0); if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) { IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); result = IDirectInputDevice8_GetDeviceData(joystick->hwdata->InputDevice, - sizeof(DIDEVICEOBJECTDATA), - evtbuf, &numevents, 0); + sizeof(DIDEVICEOBJECTDATA), + evtbuf, &numevents, 0); } /* Handle the events or punt */ @@ -1087,8 +1088,9 @@ UpdateDINPUTJoystickState_Buffered(SDL_Joystick * joystick) for (j = 0; j < joystick->hwdata->NumInputs; ++j) { const input_t *in = &joystick->hwdata->Inputs[j]; - if (evtbuf[i].dwOfs != in->ofs) + if (evtbuf[i].dwOfs != in->ofs) { continue; + } switch (in->type) { case AXIS: @@ -1096,14 +1098,13 @@ UpdateDINPUTJoystickState_Buffered(SDL_Joystick * joystick) break; case BUTTON: SDL_PrivateJoystickButton(joystick, in->num, - (Uint8)(evtbuf[i].dwData ? SDL_PRESSED : SDL_RELEASED)); + (Uint8)(evtbuf[i].dwData ? SDL_PRESSED : SDL_RELEASED)); break; case HAT: - { - Uint8 pos = TranslatePOV(evtbuf[i].dwData); - SDL_PrivateJoystickHat(joystick, in->num, pos); - } - break; + { + Uint8 pos = TranslatePOV(evtbuf[i].dwData); + SDL_PrivateJoystickHat(joystick, in->num, pos); + } break; } } } @@ -1116,8 +1117,7 @@ UpdateDINPUTJoystickState_Buffered(SDL_Joystick * joystick) } } -void -SDL_DINPUT_JoystickUpdate(SDL_Joystick * joystick) +void SDL_DINPUT_JoystickUpdate(SDL_Joystick *joystick) { HRESULT result; @@ -1134,8 +1134,7 @@ SDL_DINPUT_JoystickUpdate(SDL_Joystick * joystick) } } -void -SDL_DINPUT_JoystickClose(SDL_Joystick * joystick) +void SDL_DINPUT_JoystickClose(SDL_Joystick *joystick) { if (joystick->hwdata->ffeffect_ref) { IDirectInputEffect_Unload(joystick->hwdata->ffeffect_ref); @@ -1150,8 +1149,7 @@ SDL_DINPUT_JoystickClose(SDL_Joystick * joystick) joystick->hwdata->ff_initialized = SDL_FALSE; } -void -SDL_DINPUT_JoystickQuit(void) +void SDL_DINPUT_JoystickQuit(void) { if (dinput != NULL) { IDirectInput8_Release(dinput); @@ -1168,53 +1166,44 @@ SDL_DINPUT_JoystickQuit(void) typedef struct JoyStick_DeviceData JoyStick_DeviceData; -int -SDL_DINPUT_JoystickInit(void) +int SDL_DINPUT_JoystickInit(void) { return 0; } -void -SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext) +void SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext) { } -SDL_bool -SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version) +SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version) { return SDL_FALSE; } -int -SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice) +int SDL_DINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice) { return SDL_Unsupported(); } -int -SDL_DINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -Uint32 -SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick * joystick) +Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -void -SDL_DINPUT_JoystickUpdate(SDL_Joystick * joystick) +void SDL_DINPUT_JoystickUpdate(SDL_Joystick *joystick) { } -void -SDL_DINPUT_JoystickClose(SDL_Joystick * joystick) +void SDL_DINPUT_JoystickClose(SDL_Joystick *joystick) { } -void -SDL_DINPUT_JoystickQuit(void) +void SDL_DINPUT_JoystickQuit(void) { } diff --git a/modules/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h b/modules/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h index e13fa08..59ead46 100644 --- a/modules/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h +++ b/modules/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h @@ -28,11 +28,11 @@ extern "C" { extern int SDL_DINPUT_JoystickInit(void); extern void SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext); extern SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version); -extern int SDL_DINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice); -extern int SDL_DINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); -extern Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick * joystick); -extern void SDL_DINPUT_JoystickUpdate(SDL_Joystick * joystick); -extern void SDL_DINPUT_JoystickClose(SDL_Joystick * joystick); +extern int SDL_DINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice); +extern int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); +extern Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick); +extern void SDL_DINPUT_JoystickUpdate(SDL_Joystick *joystick); +extern void SDL_DINPUT_JoystickClose(SDL_Joystick *joystick); extern void SDL_DINPUT_JoystickQuit(void); /* Ends C function definitions when using C++ */ diff --git a/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick.c b/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick.c index 1ccd6fd..167a1c5 100644 --- a/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick.c +++ b/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick.c @@ -33,6 +33,7 @@ #if SDL_JOYSTICK_RAWINPUT +#include "SDL_atomic.h" #include "SDL_endian.h" #include "SDL_events.h" #include "SDL_hints.h" @@ -43,6 +44,10 @@ #include "../../core/windows/SDL_hid.h" #include "../hidapi/SDL_hidapijoystick_c.h" +/* SDL_JOYSTICK_RAWINPUT_XINPUT is disabled because using XInput at the same time as + raw input will turn off the Xbox Series X controller when it is connected via the + Xbox One Wireless Adapter. + */ #ifdef HAVE_XINPUT_H #define SDL_JOYSTICK_RAWINPUT_XINPUT #endif @@ -74,26 +79,31 @@ typedef struct WindowsGamingInputGamepadState WindowsGamingInputGamepadState; #endif #endif -/*#define DEBUG_RAWINPUT*/ +#if 0 +#define DEBUG_RAWINPUT +#endif #ifndef RIDEV_EXINPUTSINK -#define RIDEV_EXINPUTSINK 0x00001000 -#define RIDEV_DEVNOTIFY 0x00002000 +#define RIDEV_EXINPUTSINK 0x00001000 +#define RIDEV_DEVNOTIFY 0x00002000 #endif #ifndef WM_INPUT_DEVICE_CHANGE -#define WM_INPUT_DEVICE_CHANGE 0x00FE +#define WM_INPUT_DEVICE_CHANGE 0x00FE #endif #ifndef WM_INPUT -#define WM_INPUT 0x00FF +#define WM_INPUT 0x00FF #endif #ifndef GIDC_ARRIVAL -#define GIDC_ARRIVAL 1 -#define GIDC_REMOVAL 2 +#define GIDC_ARRIVAL 1 +#define GIDC_REMOVAL 2 #endif +extern void WINDOWS_RAWINPUTEnabledChanged(void); +extern void WINDOWS_JoystickDetect(void); static SDL_bool SDL_RAWINPUT_inited = SDL_FALSE; +static SDL_bool SDL_RAWINPUT_remote_desktop = SDL_FALSE; static int SDL_RAWINPUT_numjoysticks = 0; static void RAWINPUT_JoystickClose(SDL_Joystick *joystick); @@ -170,13 +180,15 @@ static const Uint16 subscribed_devices[] = { #ifdef SDL_JOYSTICK_RAWINPUT_MATCHING -static struct { +static struct +{ Uint32 last_state_packet; SDL_Joystick *joystick; SDL_Joystick *last_joystick; } guide_button_candidate; -typedef struct WindowsMatchState { +typedef struct WindowsMatchState +{ #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_AXES SHORT match_axes[SDL_JOYSTICK_RAWINPUT_MATCH_COUNT]; #endif @@ -219,11 +231,11 @@ static void RAWINPUT_FillMatchState(WindowsMatchState *state, Uint64 match_state #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT /* Match axes by checking if the distance between the high 4 bits of axis and the 4 bits from match_state is 1 or less */ -#define XInputAxesMatch(gamepad) (\ - (Uint32)(gamepad.sThumbLX - state->match_axes[0] + 0x1000) <= 0x2fff && \ - (Uint32)(~gamepad.sThumbLY - state->match_axes[1] + 0x1000) <= 0x2fff && \ - (Uint32)(gamepad.sThumbRX - state->match_axes[2] + 0x1000) <= 0x2fff && \ - (Uint32)(~gamepad.sThumbRY - state->match_axes[3] + 0x1000) <= 0x2fff) +#define XInputAxesMatch(gamepad) ( \ + (Uint32)(gamepad.sThumbLX - state->match_axes[0] + 0x1000) <= 0x2fff && \ + (Uint32)(~gamepad.sThumbLY - state->match_axes[1] + 0x1000) <= 0x2fff && \ + (Uint32)(gamepad.sThumbRX - state->match_axes[2] + 0x1000) <= 0x2fff && \ + (Uint32)(~gamepad.sThumbRY - state->match_axes[3] + 0x1000) <= 0x2fff) /* Explicit #define XInputAxesMatch(gamepad) (\ SDL_abs((Sint8)((gamepad.sThumbLX & 0xF000) >> 8) - ((match_state & 0x000F0000) >> 12)) <= 0x10 && \ @@ -232,9 +244,9 @@ static void RAWINPUT_FillMatchState(WindowsMatchState *state, Uint64 match_state SDL_abs((Sint8)((~gamepad.sThumbRY & 0xF000) >> 8) - ((match_state & 0xF0000000) >> 24)) <= 0x10) */ /* Can only match trigger values if a single trigger has a value. */ -#define XInputTriggersMatch(gamepad) ( \ - ((state->match_axes[4] == SDL_MIN_SINT16) && (state->match_axes[5] == SDL_MIN_SINT16)) || \ - ((gamepad.bLeftTrigger != 0) && (gamepad.bRightTrigger != 0)) || \ +#define XInputTriggersMatch(gamepad) ( \ + ((state->match_axes[4] == SDL_MIN_SINT16) && (state->match_axes[5] == SDL_MIN_SINT16)) || \ + ((gamepad.bLeftTrigger != 0) && (gamepad.bRightTrigger != 0)) || \ ((Uint32)((((int)gamepad.bLeftTrigger * 257) - 32768) - state->match_axes[4]) <= 0x2fff) || \ ((Uint32)((((int)gamepad.bRightTrigger * 257) - 32768) - state->match_axes[5]) <= 0x2fff)) @@ -258,21 +270,22 @@ static void RAWINPUT_FillMatchState(WindowsMatchState *state, Uint64 match_state ((match_state & (1<xinput_buttons) + if (state->xinput_buttons) { state->any_data = SDL_TRUE; + } #endif #ifdef SDL_JOYSTICK_RAWINPUT_WGI /* Match axes by checking if the distance between the high 4 bits of axis and the 4 bits from match_state is 1 or less */ -#define WindowsGamingInputAxesMatch(gamepad) (\ - (Uint16)(((Sint16)(gamepad.LeftThumbstickX * SDL_MAX_SINT16) & 0xF000) - state->match_axes[0] + 0x1000) <= 0x2fff && \ +#define WindowsGamingInputAxesMatch(gamepad) ( \ + (Uint16)(((Sint16)(gamepad.LeftThumbstickX * SDL_MAX_SINT16) & 0xF000) - state->match_axes[0] + 0x1000) <= 0x2fff && \ (Uint16)((~(Sint16)(gamepad.LeftThumbstickY * SDL_MAX_SINT16) & 0xF000) - state->match_axes[1] + 0x1000) <= 0x2fff && \ (Uint16)(((Sint16)(gamepad.RightThumbstickX * SDL_MAX_SINT16) & 0xF000) - state->match_axes[2] + 0x1000) <= 0x2fff && \ (Uint16)((~(Sint16)(gamepad.RightThumbstickY * SDL_MAX_SINT16) & 0xF000) - state->match_axes[3] + 0x1000) <= 0x2fff) -#define WindowsGamingInputTriggersMatch(gamepad) ( \ - ((state->match_axes[4] == SDL_MIN_SINT16) && (state->match_axes[5] == SDL_MIN_SINT16)) || \ - ((gamepad.LeftTrigger == 0.0f) && (gamepad.RightTrigger == 0.0f)) || \ +#define WindowsGamingInputTriggersMatch(gamepad) ( \ + ((state->match_axes[4] == SDL_MIN_SINT16) && (state->match_axes[5] == SDL_MIN_SINT16)) || \ + ((gamepad.LeftTrigger == 0.0f) && (gamepad.RightTrigger == 0.0f)) || \ ((Uint16)((((int)(gamepad.LeftTrigger * SDL_MAX_UINT16)) - 32768) - state->match_axes[4]) <= 0x2fff) || \ ((Uint16)((((int)(gamepad.RightTrigger * SDL_MAX_UINT16)) - 32768) - state->match_axes[5]) <= 0x2fff)) @@ -296,28 +309,28 @@ static void RAWINPUT_FillMatchState(WindowsMatchState *state, Uint64 match_state ((match_state & (1<wgi_buttons) + if (state->wgi_buttons) { state->any_data = SDL_TRUE; + } #endif - } #endif /* SDL_JOYSTICK_RAWINPUT_MATCHING */ #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT -static struct { +static struct +{ XINPUT_STATE_EX state; XINPUT_BATTERY_INFORMATION_EX battery; SDL_bool connected; /* Currently has an active XInput device */ - SDL_bool used; /* Is currently mapped to an SDL device */ + SDL_bool used; /* Is currently mapped to an SDL device */ Uint8 correlation_id; } xinput_state[XUSER_MAX_COUNT]; static SDL_bool xinput_device_change = SDL_TRUE; static SDL_bool xinput_state_dirty = SDL_TRUE; -static void -RAWINPUT_UpdateXInput() +static void RAWINPUT_UpdateXInput() { DWORD user_index; if (xinput_device_change) { @@ -344,23 +357,20 @@ RAWINPUT_UpdateXInput() } } -static void -RAWINPUT_MarkXInputSlotUsed(Uint8 xinput_slot) +static void RAWINPUT_MarkXInputSlotUsed(Uint8 xinput_slot) { if (xinput_slot != XUSER_INDEX_ANY) { xinput_state[xinput_slot].used = SDL_TRUE; } } -static void -RAWINPUT_MarkXInputSlotFree(Uint8 xinput_slot) +static void RAWINPUT_MarkXInputSlotFree(Uint8 xinput_slot) { if (xinput_slot != XUSER_INDEX_ANY) { xinput_state[xinput_slot].used = SDL_FALSE; } } -static SDL_bool -RAWINPUT_MissingXInputSlot() +static SDL_bool RAWINPUT_MissingXInputSlot() { int ii; for (ii = 0; ii < SDL_arraysize(xinput_state); ii++) { @@ -371,8 +381,7 @@ RAWINPUT_MissingXInputSlot() return SDL_FALSE; } -static SDL_bool -RAWINPUT_XInputSlotMatches(const WindowsMatchState *state, Uint8 slot_idx) +static SDL_bool RAWINPUT_XInputSlotMatches(const WindowsMatchState *state, Uint8 slot_idx) { if (xinput_state[slot_idx].connected) { WORD xinput_buttons = xinput_state[slot_idx].state.Gamepad.wButtons; @@ -383,20 +392,33 @@ RAWINPUT_XInputSlotMatches(const WindowsMatchState *state, Uint8 slot_idx) #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_TRIGGERS && XInputTriggersMatch(xinput_state[slot_idx].state.Gamepad) #endif - ) { + ) { return SDL_TRUE; } } return SDL_FALSE; } - -static SDL_bool -RAWINPUT_GuessXInputSlot(const WindowsMatchState *state, Uint8 *correlation_id, Uint8 *slot_idx) +static SDL_bool RAWINPUT_GuessXInputSlot(const WindowsMatchState *state, Uint8 *correlation_id, Uint8 *slot_idx) { int user_index; int match_count; + /* If there is only one available slot, let's use that + * That will be right most of the time, and uncorrelation will fix any bad guesses + */ + match_count = 0; + for (user_index = 0; user_index < XUSER_MAX_COUNT; ++user_index) { + if (xinput_state[user_index].connected && !xinput_state[user_index].used) { + *slot_idx = user_index; + ++match_count; + } + } + if (match_count == 1) { + *correlation_id = ++xinput_state[*slot_idx].correlation_id; + return SDL_TRUE; + } + *slot_idx = 0; match_count = 0; @@ -421,17 +443,19 @@ RAWINPUT_GuessXInputSlot(const WindowsMatchState *state, Uint8 *correlation_id, #ifdef SDL_JOYSTICK_RAWINPUT_WGI -typedef struct WindowsGamingInputGamepadState { +typedef struct WindowsGamingInputGamepadState +{ __x_ABI_CWindows_CGaming_CInput_CIGamepad *gamepad; struct __x_ABI_CWindows_CGaming_CInput_CGamepadReading state; RAWINPUT_DeviceContext *correlated_context; - SDL_bool used; /* Is currently mapped to an SDL device */ + SDL_bool used; /* Is currently mapped to an SDL device */ SDL_bool connected; /* Just used during update to track disconnected */ Uint8 correlation_id; struct __x_ABI_CWindows_CGaming_CInput_CGamepadVibration vibration; } WindowsGamingInputGamepadState; -static struct { +static struct +{ WindowsGamingInputGamepadState **per_gamepad; int per_gamepad_count; SDL_bool initialized; @@ -439,24 +463,99 @@ static struct { SDL_bool need_device_list_update; int ref_count; __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics *gamepad_statics; + EventRegistrationToken gamepad_added_token; + EventRegistrationToken gamepad_removed_token; } wgi_state; -static void -RAWINPUT_MarkWindowsGamingInputSlotUsed(WindowsGamingInputGamepadState *wgi_slot, RAWINPUT_DeviceContext *ctx) +typedef struct GamepadDelegate +{ + __FIEventHandler_1_Windows__CGaming__CInput__CGamepad iface; + SDL_atomic_t refcount; +} GamepadDelegate; + +static const IID IID_IEventHandler_Gamepad = { 0x8a7639ee, 0x624a, 0x501a, { 0xbb, 0x53, 0x56, 0x2d, 0x1e, 0xc1, 0x1b, 0x52 } }; + +static HRESULT STDMETHODCALLTYPE IEventHandler_CGamepadVtbl_QueryInterface(__FIEventHandler_1_Windows__CGaming__CInput__CGamepad *This, REFIID riid, void **ppvObject) +{ + if (ppvObject == NULL) { + return E_INVALIDARG; + } + + *ppvObject = NULL; + if (WIN_IsEqualIID(riid, &IID_IUnknown) || WIN_IsEqualIID(riid, &IID_IAgileObject) || WIN_IsEqualIID(riid, &IID_IEventHandler_Gamepad)) { + *ppvObject = This; + __FIEventHandler_1_Windows__CGaming__CInput__CGamepad_AddRef(This); + return S_OK; + } else if (WIN_IsEqualIID(riid, &IID_IMarshal)) { + /* This seems complicated. Let's hope it doesn't happen. */ + return E_OUTOFMEMORY; + } else { + return E_NOINTERFACE; + } +} + +static ULONG STDMETHODCALLTYPE IEventHandler_CGamepadVtbl_AddRef(__FIEventHandler_1_Windows__CGaming__CInput__CGamepad *This) +{ + GamepadDelegate *self = (GamepadDelegate *)This; + return SDL_AtomicAdd(&self->refcount, 1) + 1UL; +} + +static ULONG STDMETHODCALLTYPE IEventHandler_CGamepadVtbl_Release(__FIEventHandler_1_Windows__CGaming__CInput__CGamepad *This) +{ + GamepadDelegate *self = (GamepadDelegate *)This; + int rc = SDL_AtomicAdd(&self->refcount, -1) - 1; + /* Should never free the static delegate objects */ + SDL_assert(rc > 0); + return rc; +} + +static HRESULT STDMETHODCALLTYPE IEventHandler_CGamepadVtbl_InvokeAdded(__FIEventHandler_1_Windows__CGaming__CInput__CGamepad *This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIGamepad *e) +{ + wgi_state.need_device_list_update = SDL_TRUE; + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE IEventHandler_CGamepadVtbl_InvokeRemoved(__FIEventHandler_1_Windows__CGaming__CInput__CGamepad *This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIGamepad *e) +{ + wgi_state.need_device_list_update = SDL_TRUE; + return S_OK; +} + +static __FIEventHandler_1_Windows__CGaming__CInput__CGamepadVtbl gamepad_added_vtbl = { + IEventHandler_CGamepadVtbl_QueryInterface, + IEventHandler_CGamepadVtbl_AddRef, + IEventHandler_CGamepadVtbl_Release, + IEventHandler_CGamepadVtbl_InvokeAdded +}; +static GamepadDelegate gamepad_added = { + { &gamepad_added_vtbl }, + { 1 } +}; + +static __FIEventHandler_1_Windows__CGaming__CInput__CGamepadVtbl gamepad_removed_vtbl = { + IEventHandler_CGamepadVtbl_QueryInterface, + IEventHandler_CGamepadVtbl_AddRef, + IEventHandler_CGamepadVtbl_Release, + IEventHandler_CGamepadVtbl_InvokeRemoved +}; +static GamepadDelegate gamepad_removed = { + { &gamepad_removed_vtbl }, + { 1 } +}; + +static void RAWINPUT_MarkWindowsGamingInputSlotUsed(WindowsGamingInputGamepadState *wgi_slot, RAWINPUT_DeviceContext *ctx) { wgi_slot->used = SDL_TRUE; wgi_slot->correlated_context = ctx; } -static void -RAWINPUT_MarkWindowsGamingInputSlotFree(WindowsGamingInputGamepadState *wgi_slot) +static void RAWINPUT_MarkWindowsGamingInputSlotFree(WindowsGamingInputGamepadState *wgi_slot) { wgi_slot->used = SDL_FALSE; wgi_slot->correlated_context = NULL; } -static SDL_bool -RAWINPUT_MissingWindowsGamingInputSlot() +static SDL_bool RAWINPUT_MissingWindowsGamingInputSlot() { int ii; for (ii = 0; ii < wgi_state.per_gamepad_count; ii++) { @@ -467,15 +566,16 @@ RAWINPUT_MissingWindowsGamingInputSlot() return SDL_FALSE; } -static void -RAWINPUT_UpdateWindowsGamingInput() +static void RAWINPUT_UpdateWindowsGamingInput() { int ii; - if (!wgi_state.gamepad_statics) + if (!wgi_state.gamepad_statics) { return; + } - if (!wgi_state.dirty) + if (!wgi_state.dirty) { return; + } wgi_state.dirty = SDL_FALSE; @@ -501,7 +601,7 @@ RAWINPUT_UpdateWindowsGamingInput() if (SUCCEEDED(hr)) { SDL_bool found = SDL_FALSE; int jj; - for (jj = 0; jj < wgi_state.per_gamepad_count ; jj++) { + for (jj = 0; jj < wgi_state.per_gamepad_count; jj++) { if (wgi_state.per_gamepad[jj]->gamepad == gamepad) { found = SDL_TRUE; wgi_state.per_gamepad[jj]->connected = SDL_TRUE; @@ -519,7 +619,7 @@ RAWINPUT_UpdateWindowsGamingInput() return; } gamepad_state = SDL_calloc(1, sizeof(*gamepad_state)); - if (!gamepad_state) { + if (gamepad_state == NULL) { SDL_OutOfMemory(); return; } @@ -558,10 +658,12 @@ RAWINPUT_UpdateWindowsGamingInput() } } } -static void -RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) +static void RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) { - wgi_state.need_device_list_update = SDL_TRUE; + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_WGI, SDL_TRUE)) { + return; + } + wgi_state.ref_count++; if (!wgi_state.initialized) { static const IID SDL_IID_IGamepadStatics = { 0x8BBCE529, 0xD49C, 0x39E9, { 0x95, 0x60, 0xE4, 0x7D, 0xDE, 0x96, 0xB7, 0xC8 } }; @@ -574,8 +676,8 @@ RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) wgi_state.dirty = SDL_TRUE; { - typedef HRESULT (WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING* string); - typedef HRESULT (WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void** factory); + typedef HRESULT(WINAPI * WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER * hstringHeader, HSTRING * string); + typedef HRESULT(WINAPI * RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory); #ifdef __WINRT__ WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = WindowsCreateStringReference; @@ -593,37 +695,66 @@ RAWINPUT_InitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) if (SUCCEEDED(hr)) { RoGetActivationFactoryFunc(hNamespaceString, &SDL_IID_IGamepadStatics, (void **)&wgi_state.gamepad_statics); } + + if (wgi_state.gamepad_statics) { + wgi_state.need_device_list_update = SDL_TRUE; + + hr = __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_add_GamepadAdded(wgi_state.gamepad_statics, &gamepad_added.iface, &wgi_state.gamepad_added_token); + if (!SUCCEEDED(hr)) { + SDL_SetError("add_GamepadAdded() failed: 0x%lx\n", hr); + } + + hr = __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_add_GamepadRemoved(wgi_state.gamepad_statics, &gamepad_removed.iface, &wgi_state.gamepad_removed_token); + if (!SUCCEEDED(hr)) { + SDL_SetError("add_GamepadRemoved() failed: 0x%lx\n", hr); + } + } } } } } -static SDL_bool -RAWINPUT_WindowsGamingInputSlotMatches(const WindowsMatchState *state, WindowsGamingInputGamepadState *slot, SDL_bool xinput_correlated) +static SDL_bool RAWINPUT_WindowsGamingInputSlotMatches(const WindowsMatchState *state, WindowsGamingInputGamepadState *slot, SDL_bool xinput_correlated) { Uint32 wgi_buttons = slot->state.Buttons; if ((wgi_buttons & 0x3FFF) == state->wgi_buttons #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_AXES - && WindowsGamingInputAxesMatch(slot->state) + && WindowsGamingInputAxesMatch(slot->state) #endif #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_TRIGGERS - // Don't try to match WGI triggers if getting values from XInput - && (xinput_correlated || WindowsGamingInputTriggersMatch(slot->state)) + // Don't try to match WGI triggers if getting values from XInput + && (xinput_correlated || WindowsGamingInputTriggersMatch(slot->state)) #endif - ) { + ) { return SDL_TRUE; } return SDL_FALSE; } -static SDL_bool -RAWINPUT_GuessWindowsGamingInputSlot(const WindowsMatchState *state, Uint8 *correlation_id, WindowsGamingInputGamepadState **slot, SDL_bool xinput_correlated) +static SDL_bool RAWINPUT_GuessWindowsGamingInputSlot(const WindowsMatchState *state, Uint8 *correlation_id, WindowsGamingInputGamepadState **slot, SDL_bool xinput_correlated) { int match_count, user_index; + WindowsGamingInputGamepadState *gamepad_state = NULL; + + /* If there is only one available slot, let's use that + * That will be right most of the time, and uncorrelation will fix any bad guesses + */ + match_count = 0; + for (user_index = 0; user_index < wgi_state.per_gamepad_count; ++user_index) { + gamepad_state = wgi_state.per_gamepad[user_index]; + if (gamepad_state->connected && !gamepad_state->used) { + *slot = gamepad_state; + ++match_count; + } + } + if (match_count == 1) { + *correlation_id = ++gamepad_state->correlation_id; + return SDL_TRUE; + } match_count = 0; for (user_index = 0; user_index < wgi_state.per_gamepad_count; ++user_index) { - WindowsGamingInputGamepadState *gamepad_state = wgi_state.per_gamepad[user_index]; + gamepad_state = wgi_state.per_gamepad[user_index]; if (RAWINPUT_WindowsGamingInputSlotMatches(state, gamepad_state, xinput_correlated)) { ++match_count; *slot = gamepad_state; @@ -640,10 +771,8 @@ RAWINPUT_GuessWindowsGamingInputSlot(const WindowsMatchState *state, Uint8 *corr return SDL_FALSE; } -static void -RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) +static void RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) { - wgi_state.need_device_list_update = SDL_TRUE; --wgi_state.ref_count; if (!wgi_state.ref_count && wgi_state.initialized) { int ii; @@ -656,6 +785,8 @@ RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) } wgi_state.per_gamepad_count = 0; if (wgi_state.gamepad_statics) { + __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_remove_GamepadAdded(wgi_state.gamepad_statics, wgi_state.gamepad_added_token); + __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_remove_GamepadRemoved(wgi_state.gamepad_statics, wgi_state.gamepad_removed_token); __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_Release(wgi_state.gamepad_statics); wgi_state.gamepad_statics = NULL; } @@ -666,16 +797,13 @@ RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx) #endif /* SDL_JOYSTICK_RAWINPUT_WGI */ - -static SDL_RAWINPUT_Device * -RAWINPUT_AcquireDevice(SDL_RAWINPUT_Device *device) +static SDL_RAWINPUT_Device *RAWINPUT_AcquireDevice(SDL_RAWINPUT_Device *device) { SDL_AtomicIncRef(&device->refcount); return device; } -static void -RAWINPUT_ReleaseDevice(SDL_RAWINPUT_Device *device) +static void RAWINPUT_ReleaseDevice(SDL_RAWINPUT_Device *device) { #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT if (device->joystick) { @@ -696,22 +824,25 @@ RAWINPUT_ReleaseDevice(SDL_RAWINPUT_Device *device) } } -static SDL_RAWINPUT_Device * -RAWINPUT_DeviceFromHandle(HANDLE hDevice) +static SDL_RAWINPUT_Device *RAWINPUT_DeviceFromHandle(HANDLE hDevice) { SDL_RAWINPUT_Device *curr; for (curr = SDL_RAWINPUT_devices; curr; curr = curr->next) { - if (curr->hDevice == hDevice) + if (curr->hDevice == hDevice) { return curr; + } } return NULL; } -static void -RAWINPUT_AddDevice(HANDLE hDevice) +static void RAWINPUT_AddDevice(HANDLE hDevice) { -#define CHECK(expression) { if(!(expression)) goto err; } +#define CHECK(expression) \ + { \ + if (!(expression)) \ + goto err; \ + } SDL_RAWINPUT_Device *device = NULL; SDL_RAWINPUT_Device *curr, *last; RID_DEVICE_INFO rdi; @@ -738,8 +869,8 @@ RAWINPUT_AddDevice(HANDLE hDevice) /* Don't take devices handled by HIDAPI */ CHECK(!HIDAPI_IsDevicePresent((Uint16)rdi.hid.dwVendorId, (Uint16)rdi.hid.dwProductId, (Uint16)rdi.hid.dwVersionNumber, "")); #endif - - CHECK(device = (SDL_RAWINPUT_Device *)SDL_calloc(1, sizeof(SDL_RAWINPUT_Device))); + device = (SDL_RAWINPUT_Device *)SDL_calloc(1, sizeof(SDL_RAWINPUT_Device)); + CHECK(device); device->hDevice = hDevice; device->vendor_id = (Uint16)rdi.hid.dwVendorId; device->product_id = (Uint16)rdi.hid.dwProductId; @@ -750,10 +881,11 @@ RAWINPUT_AddDevice(HANDLE hDevice) /* Get HID Top-Level Collection Preparsed Data */ size = 0; CHECK(GetRawInputDeviceInfoA(hDevice, RIDI_PREPARSEDDATA, NULL, &size) != (UINT)-1); - CHECK(device->preparsed_data = (PHIDP_PREPARSED_DATA)SDL_calloc(size, sizeof(BYTE))); + device->preparsed_data = (PHIDP_PREPARSED_DATA)SDL_calloc(size, sizeof(BYTE)); + CHECK(device->preparsed_data); CHECK(GetRawInputDeviceInfoA(hDevice, RIDI_PREPARSEDDATA, device->preparsed_data, &size) != (UINT)-1); - hFile = CreateFileA(dev_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + hFile = CreateFileA(dev_name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); CHECK(hFile != INVALID_HANDLE_VALUE); { @@ -794,7 +926,6 @@ RAWINPUT_AddDevice(HANDLE hDevice) /* Add it to the list */ RAWINPUT_AcquireDevice(device); for (curr = SDL_RAWINPUT_devices, last = NULL; curr; last = curr, curr = curr->next) { - continue; } if (last) { last->next = device; @@ -824,8 +955,7 @@ err: #undef CHECK } -static void -RAWINPUT_DelDevice(SDL_RAWINPUT_Device *device, SDL_bool send_event) +static void RAWINPUT_DelDevice(SDL_RAWINPUT_Device *device, SDL_bool send_event) { SDL_RAWINPUT_Device *curr, *last; for (curr = SDL_RAWINPUT_devices, last = NULL; curr; last = curr, curr = curr->next) { @@ -848,28 +978,10 @@ RAWINPUT_DelDevice(SDL_RAWINPUT_Device *device, SDL_bool send_event) } } -static int -RAWINPUT_JoystickInit(void) +static void RAWINPUT_DetectDevices(void) { UINT device_count = 0; - SDL_assert(!SDL_RAWINPUT_inited); - - if (!WIN_IsWindowsVistaOrGreater()) { - /* According to bug 6400, this doesn't work on Windows XP */ - return -1; - } - - if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_TRUE)) { - return -1; - } - - if (WIN_LoadHIDDLL() < 0) { - return -1; - } - - SDL_RAWINPUT_inited = SDL_TRUE; - if ((GetRawInputDeviceList(NULL, &device_count, sizeof(RAWINPUTDEVICELIST)) != -1) && device_count > 0) { PRAWINPUTDEVICELIST devices = NULL; UINT i; @@ -884,24 +996,51 @@ RAWINPUT_JoystickInit(void) SDL_free(devices); } } +} + +static void RAWINPUT_RemoveDevices(void) +{ + while (SDL_RAWINPUT_devices) { + RAWINPUT_DelDevice(SDL_RAWINPUT_devices, SDL_FALSE); + } + SDL_assert(SDL_RAWINPUT_numjoysticks == 0); +} + +static int RAWINPUT_JoystickInit(void) +{ + SDL_assert(!SDL_RAWINPUT_inited); + + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_TRUE)) { + return 0; + } + + if (!WIN_IsWindowsVistaOrGreater()) { + /* According to bug 6400, this doesn't work on Windows XP */ + return -1; + } + + if (WIN_LoadHIDDLL() < 0) { + return -1; + } + + SDL_RAWINPUT_inited = SDL_TRUE; + + RAWINPUT_DetectDevices(); return 0; } -static int -RAWINPUT_JoystickGetCount(void) +static int RAWINPUT_JoystickGetCount(void) { return SDL_RAWINPUT_numjoysticks; } -SDL_bool -RAWINPUT_IsEnabled() +SDL_bool RAWINPUT_IsEnabled() { - return SDL_RAWINPUT_inited; + return SDL_RAWINPUT_inited && !SDL_RAWINPUT_remote_desktop; } -SDL_bool -RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) +SDL_bool RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name) { SDL_RAWINPUT_Device *device; @@ -909,13 +1048,10 @@ RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, co #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT xinput_device_change = SDL_TRUE; #endif -#ifdef SDL_JOYSTICK_RAWINPUT_WGI - wgi_state.need_device_list_update = SDL_TRUE; -#endif device = SDL_RAWINPUT_devices; while (device) { - if (vendor_id == device->vendor_id && product_id == device->product_id ) { + if (vendor_id == device->vendor_id && product_id == device->product_id) { return SDL_TRUE; } @@ -940,8 +1076,7 @@ RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, co return SDL_FALSE; } -static void -RAWINPUT_PostUpdate(void) +static void RAWINPUT_PostUpdate(void) { #ifdef SDL_JOYSTICK_RAWINPUT_MATCHING SDL_bool unmapped_guide_pressed = SDL_FALSE; @@ -999,14 +1134,32 @@ RAWINPUT_PostUpdate(void) #endif /* SDL_JOYSTICK_RAWINPUT_MATCHING */ } -static void -RAWINPUT_JoystickDetect(void) +static void RAWINPUT_JoystickDetect(void) { + SDL_bool remote_desktop; + + if (!SDL_RAWINPUT_inited) { + return; + } + + remote_desktop = GetSystemMetrics(SM_REMOTESESSION) ? SDL_TRUE : SDL_FALSE; + if (remote_desktop != SDL_RAWINPUT_remote_desktop) { + SDL_RAWINPUT_remote_desktop = remote_desktop; + + WINDOWS_RAWINPUTEnabledChanged(); + + if (remote_desktop) { + RAWINPUT_RemoveDevices(); + WINDOWS_JoystickDetect(); + } else { + WINDOWS_JoystickDetect(); + RAWINPUT_DetectDevices(); + } + } RAWINPUT_PostUpdate(); } -static SDL_RAWINPUT_Device * -RAWINPUT_GetDeviceByIndex(int device_index) +static SDL_RAWINPUT_Device *RAWINPUT_GetDeviceByIndex(int device_index) { SDL_RAWINPUT_Device *device = SDL_RAWINPUT_devices; while (device) { @@ -1019,44 +1172,36 @@ RAWINPUT_GetDeviceByIndex(int device_index) return device; } -static const char * -RAWINPUT_JoystickGetDeviceName(int device_index) +static const char *RAWINPUT_JoystickGetDeviceName(int device_index) { return RAWINPUT_GetDeviceByIndex(device_index)->name; } -static const char * -RAWINPUT_JoystickGetDevicePath(int device_index) +static const char *RAWINPUT_JoystickGetDevicePath(int device_index) { return RAWINPUT_GetDeviceByIndex(device_index)->path; } -static int -RAWINPUT_JoystickGetDevicePlayerIndex(int device_index) +static int RAWINPUT_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -RAWINPUT_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void RAWINPUT_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } - -static SDL_JoystickGUID -RAWINPUT_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID RAWINPUT_JoystickGetDeviceGUID(int device_index) { return RAWINPUT_GetDeviceByIndex(device_index)->guid; } -static SDL_JoystickID -RAWINPUT_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID RAWINPUT_JoystickGetDeviceInstanceID(int device_index) { return RAWINPUT_GetDeviceByIndex(device_index)->joystick_id; } -static int SDLCALL -RAWINPUT_SortValueCaps(const void *A, const void *B) +static int SDLCALL RAWINPUT_SortValueCaps(const void *A, const void *B) { HIDP_VALUE_CAPS *capsA = (HIDP_VALUE_CAPS *)A; HIDP_VALUE_CAPS *capsB = (HIDP_VALUE_CAPS *)B; @@ -1065,8 +1210,7 @@ RAWINPUT_SortValueCaps(const void *A, const void *B) return (int)capsA->NotRange.Usage - capsB->NotRange.Usage; } -static int -RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) { SDL_RAWINPUT_Device *device = RAWINPUT_GetDeviceByIndex(device_index); RAWINPUT_DeviceContext *ctx; @@ -1076,7 +1220,7 @@ RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) ULONG i; ctx = (RAWINPUT_DeviceContext *)SDL_calloc(1, sizeof(RAWINPUT_DeviceContext)); - if (!ctx) { + if (ctx == NULL) { return SDL_OutOfMemory(); } joystick->hwdata = ctx; @@ -1089,7 +1233,7 @@ RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT xinput_device_change = SDL_TRUE; ctx->xinput_enabled = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT, SDL_TRUE); - if (ctx->xinput_enabled && (WIN_LoadXInputDLL() < 0 || !XINPUTGETSTATE)) { + if (ctx->xinput_enabled && (WIN_LoadXInputDLL() < 0 || XINPUTGETSTATE == NULL)) { ctx->xinput_enabled = SDL_FALSE; } ctx->xinput_slot = XUSER_INDEX_ANY; @@ -1101,6 +1245,9 @@ RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) ctx->is_xinput = device->is_xinput; ctx->is_xboxone = device->is_xboxone; +#ifdef SDL_JOYSTICK_RAWINPUT_MATCHING + ctx->match_state = 0x0000008800000000ULL; /* Trigger axes at rest */ +#endif ctx->preparsed_data = device->preparsed_data; ctx->max_data_length = SDL_HidP_MaxDataListLength(HidP_Input, ctx->preparsed_data); ctx->data = (HIDP_DATA *)SDL_malloc(ctx->max_data_length * sizeof(*ctx->data)); @@ -1260,32 +1407,19 @@ RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static int -RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { #if defined(SDL_JOYSTICK_RAWINPUT_WGI) || defined(SDL_JOYSTICK_RAWINPUT_XINPUT) RAWINPUT_DeviceContext *ctx = joystick->hwdata; #endif SDL_bool rumbled = SDL_FALSE; -#ifdef SDL_JOYSTICK_RAWINPUT_WGI - if (!rumbled && ctx->wgi_correlated) { - WindowsGamingInputGamepadState *gamepad_state = ctx->wgi_slot; - HRESULT hr; - gamepad_state->vibration.LeftMotor = (DOUBLE)low_frequency_rumble / SDL_MAX_UINT16; - gamepad_state->vibration.RightMotor = (DOUBLE)high_frequency_rumble / SDL_MAX_UINT16; - hr = __x_ABI_CWindows_CGaming_CInput_CIGamepad_put_Vibration(gamepad_state->gamepad, gamepad_state->vibration); - if (SUCCEEDED(hr)) { - rumbled = SDL_TRUE; - } - } -#endif - #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT + /* Prefer XInput over WGI because it allows rumble in the background */ if (!rumbled && ctx->xinput_correlated) { XINPUT_VIBRATION XVibration; - if (!XINPUTSETSTATE) { + if (XINPUTSETSTATE == NULL) { return SDL_Unsupported(); } @@ -1299,6 +1433,19 @@ RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uin } #endif /* SDL_JOYSTICK_RAWINPUT_XINPUT */ +#ifdef SDL_JOYSTICK_RAWINPUT_WGI + if (!rumbled && ctx->wgi_correlated) { + WindowsGamingInputGamepadState *gamepad_state = ctx->wgi_slot; + HRESULT hr; + gamepad_state->vibration.LeftMotor = (DOUBLE)low_frequency_rumble / SDL_MAX_UINT16; + gamepad_state->vibration.RightMotor = (DOUBLE)high_frequency_rumble / SDL_MAX_UINT16; + hr = __x_ABI_CWindows_CGaming_CInput_CIGamepad_put_Vibration(gamepad_state->gamepad, gamepad_state->vibration); + if (SUCCEEDED(hr)) { + rumbled = SDL_TRUE; + } + } +#endif + if (!rumbled) { #if defined(SDL_JOYSTICK_RAWINPUT_WGI) || defined(SDL_JOYSTICK_RAWINPUT_XINPUT) return SDL_SetError("Controller isn't correlated yet, try hitting a button first"); @@ -1309,8 +1456,7 @@ RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uin return 0; } -static int -RAWINPUT_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int RAWINPUT_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { #if defined(SDL_JOYSTICK_RAWINPUT_WGI) RAWINPUT_DeviceContext *ctx = joystick->hwdata; @@ -1333,8 +1479,7 @@ RAWINPUT_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint #endif } -static Uint32 -RAWINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 RAWINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; #if defined(SDL_JOYSTICK_RAWINPUT_XINPUT) || defined(SDL_JOYSTICK_RAWINPUT_WGI) @@ -1359,20 +1504,17 @@ RAWINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) return result; } -static int -RAWINPUT_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int RAWINPUT_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -RAWINPUT_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int RAWINPUT_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -RAWINPUT_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int RAWINPUT_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } @@ -1401,8 +1543,7 @@ static HIDP_DATA *GetData(USHORT index, HIDP_DATA *data, ULONG length) We use XInput and Windows.Gaming.Input to make up for these shortcomings. */ -static void -RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) +static void RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) { RAWINPUT_DeviceContext *ctx = joystick->hwdata; #ifdef SDL_JOYSTICK_RAWINPUT_MATCHING @@ -1434,11 +1575,22 @@ RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) }; Uint64 match_state = ctx->match_state; /* Update match_state with button bit, then fall through */ -#define SDL_PrivateJoystickButton(joystick, button, state) if (button < SDL_arraysize(button_map)) { Uint64 button_bit = 1ull << button_map[button]; match_state = (match_state & ~button_bit) | (button_bit * (state)); } SDL_PrivateJoystickButton(joystick, button, state) +#define SDL_PrivateJoystickButton(joystick, button, state) \ + if (button < SDL_arraysize(button_map)) { \ + Uint64 button_bit = 1ull << button_map[button]; \ + match_state = (match_state & ~button_bit) | (button_bit * (state)); \ + } \ + SDL_PrivateJoystickButton(joystick, button, state) #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_AXES /* Grab high 4 bits of value, then fall through */ -#define AddAxisToMatchState(axis, value) { match_state = (match_state & ~(0xFull << (4 * axis + 16))) | ((value) & 0xF000ull) << (4 * axis + 4); } -#define SDL_PrivateJoystickAxis(joystick, axis, value) if (axis < 4) AddAxisToMatchState(axis, value); SDL_PrivateJoystickAxis(joystick, axis, value) +#define AddAxisToMatchState(axis, value) \ + { \ + match_state = (match_state & ~(0xFull << (4 * axis + 16))) | ((value)&0xF000ull) << (4 * axis + 4); \ + } +#define SDL_PrivateJoystickAxis(joystick, axis, value) \ + if (axis < 4) \ + AddAxisToMatchState(axis, value); \ + SDL_PrivateJoystickAxis(joystick, axis, value) #endif #endif /* SDL_JOYSTICK_RAWINPUT_MATCHING */ @@ -1507,7 +1659,11 @@ RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) #endif #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_TRIGGERS -#define AddTriggerToMatchState(axis, value) { int match_axis = axis + SDL_JOYSTICK_RAWINPUT_MATCH_COUNT - joystick->naxes; AddAxisToMatchState(match_axis, value); } +#define AddTriggerToMatchState(axis, value) \ + { \ + int match_axis = axis + SDL_JOYSTICK_RAWINPUT_MATCH_COUNT - joystick->naxes; \ + AddAxisToMatchState(match_axis, value); \ + } #endif /* SDL_JOYSTICK_RAWINPUT_MATCH_TRIGGERS */ if (ctx->trigger_hack) { @@ -1537,7 +1693,7 @@ RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) Sint16 value = (int)(Uint16)item->RawValue - 0x8000; Sint16 left_value = (value > 0) ? (value * 2 - 32767) : SDL_MIN_SINT16; Sint16 right_value = (value < 0) ? (-value * 2 - 32769) : SDL_MIN_SINT16; - + #ifdef SDL_JOYSTICK_RAWINPUT_MATCH_TRIGGERS AddTriggerToMatchState(left_trigger, left_value); AddTriggerToMatchState(right_trigger, right_value); @@ -1566,8 +1722,7 @@ RAWINPUT_HandleStatePacket(SDL_Joystick *joystick, Uint8 *data, int size) #endif } -static void -RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) +static void RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) { #ifdef SDL_JOYSTICK_RAWINPUT_MATCHING RAWINPUT_DeviceContext *ctx = joystick->hwdata; @@ -1584,11 +1739,11 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) RAWINPUT_FillMatchState(&match_state_xinput, ctx->match_state); #ifdef SDL_JOYSTICK_RAWINPUT_WGI - #ifdef SDL_JOYSTICK_RAWINPUT_XINPUT +#ifdef SDL_JOYSTICK_RAWINPUT_XINPUT xinput_correlated = ctx->xinput_correlated; - #else +#else xinput_correlated = SDL_FALSE; - #endif +#endif /* Parallel logic to WINDOWS_XINPUT below */ RAWINPUT_UpdateWindowsGamingInput(); if (ctx->wgi_correlated && @@ -1622,7 +1777,7 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) if (!ctx->wgi_correlated) { SDL_bool new_correlation_count = 0; if (RAWINPUT_MissingWindowsGamingInputSlot()) { - Uint8 correlation_id; + Uint8 correlation_id = 0; WindowsGamingInputGamepadState *slot_idx = NULL; if (RAWINPUT_GuessWindowsGamingInputSlot(&match_state_xinput, &correlation_id, &slot_idx, xinput_correlated)) { /* we match exactly one WindowsGamingInput device */ @@ -1642,10 +1797,12 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) correlated = SDL_TRUE; RAWINPUT_MarkWindowsGamingInputSlotUsed(ctx->wgi_slot, ctx); /* If the generalized Guide button was using us, it doesn't need to anymore */ - if (guide_button_candidate.joystick == joystick) + if (guide_button_candidate.joystick == joystick) { guide_button_candidate.joystick = NULL; - if (guide_button_candidate.last_joystick == joystick) + } + if (guide_button_candidate.last_joystick == joystick) { guide_button_candidate.last_joystick = NULL; + } } } else { /* someone else also possibly correlated to this device, start over */ @@ -1736,10 +1893,12 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) correlated = SDL_TRUE; RAWINPUT_MarkXInputSlotUsed(ctx->xinput_slot); /* If the generalized Guide button was using us, it doesn't need to anymore */ - if (guide_button_candidate.joystick == joystick) + if (guide_button_candidate.joystick == joystick) { guide_button_candidate.joystick = NULL; - if (guide_button_candidate.last_joystick == joystick) + } + if (guide_button_candidate.last_joystick == joystick) { guide_button_candidate.last_joystick = NULL; + } } } else { /* someone else also possibly correlated to this device, start over */ @@ -1810,7 +1969,7 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) #ifdef SDL_JOYSTICK_RAWINPUT_WGI if (!has_trigger_data && ctx->wgi_correlated) { RAWINPUT_UpdateWindowsGamingInput(); /* May detect disconnect / cause uncorrelation */ - if (ctx->wgi_correlated) { /* Still connected */ + if (ctx->wgi_correlated) { /* Still connected */ struct __x_ABI_CWindows_CGaming_CInput_CGamepadReading *state = &ctx->wgi_slot->state; if (ctx->guide_hack) { @@ -1827,11 +1986,8 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) if (!correlated) { if (!guide_button_candidate.joystick || - (ctx->last_state_packet && ( - !guide_button_candidate.last_state_packet || - SDL_TICKS_PASSED(ctx->last_state_packet, guide_button_candidate.last_state_packet) - )) - ) { + (ctx->last_state_packet && (!guide_button_candidate.last_state_packet || + SDL_TICKS_PASSED(ctx->last_state_packet, guide_button_candidate.last_state_packet)))) { guide_button_candidate.joystick = joystick; guide_button_candidate.last_state_packet = ctx->last_state_packet; } @@ -1839,22 +1995,22 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick) #endif /* SDL_JOYSTICK_RAWINPUT_MATCHING */ } -static void -RAWINPUT_JoystickUpdate(SDL_Joystick *joystick) +static void RAWINPUT_JoystickUpdate(SDL_Joystick *joystick) { RAWINPUT_UpdateOtherAPIs(joystick); } -static void -RAWINPUT_JoystickClose(SDL_Joystick *joystick) +static void RAWINPUT_JoystickClose(SDL_Joystick *joystick) { RAWINPUT_DeviceContext *ctx = joystick->hwdata; #ifdef SDL_JOYSTICK_RAWINPUT_MATCHING - if (guide_button_candidate.joystick == joystick) + if (guide_button_candidate.joystick == joystick) { guide_button_candidate.joystick = NULL; - if (guide_button_candidate.last_joystick == joystick) + } + if (guide_button_candidate.last_joystick == joystick) { guide_button_candidate.last_joystick = NULL; + } #endif if (ctx) { @@ -1889,11 +2045,14 @@ RAWINPUT_JoystickClose(SDL_Joystick *joystick) } } -SDL_bool -RAWINPUT_RegisterNotifications(HWND hWnd) +int RAWINPUT_RegisterNotifications(HWND hWnd) { - RAWINPUTDEVICE rid[SDL_arraysize(subscribed_devices)]; int i; + RAWINPUTDEVICE rid[SDL_arraysize(subscribed_devices)]; + + if (!SDL_RAWINPUT_inited) { + return 0; + } for (i = 0; i < SDL_arraysize(subscribed_devices); i++) { rid[i].usUsagePage = USB_USAGEPAGE_GENERIC_DESKTOP; @@ -1903,18 +2062,20 @@ RAWINPUT_RegisterNotifications(HWND hWnd) } if (!RegisterRawInputDevices(rid, SDL_arraysize(rid), sizeof(RAWINPUTDEVICE))) { - SDL_SetError("Couldn't register for raw input events"); - return SDL_FALSE; + return SDL_SetError("Couldn't register for raw input events"); } - return SDL_TRUE; + return 0; } -void -RAWINPUT_UnregisterNotifications() +int RAWINPUT_UnregisterNotifications() { int i; RAWINPUTDEVICE rid[SDL_arraysize(subscribed_devices)]; + if (!SDL_RAWINPUT_inited) { + return 0; + } + for (i = 0; i < SDL_arraysize(subscribed_devices); i++) { rid[i].usUsagePage = USB_USAGEPAGE_GENERIC_DESKTOP; rid[i].usUsage = subscribed_devices[i]; @@ -1923,9 +2084,9 @@ RAWINPUT_UnregisterNotifications() } if (!RegisterRawInputDevices(rid, SDL_arraysize(rid), sizeof(RAWINPUTDEVICE))) { - SDL_SetError("Couldn't unregister for raw input events"); - return; + return SDL_SetError("Couldn't unregister for raw input events"); } + return 0; } LRESULT CALLBACK @@ -1937,45 +2098,45 @@ RAWINPUT_WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) SDL_LockJoysticks(); switch (msg) { - case WM_INPUT_DEVICE_CHANGE: + case WM_INPUT_DEVICE_CHANGE: + { + HANDLE hDevice = (HANDLE)lParam; + switch (wParam) { + case GIDC_ARRIVAL: + RAWINPUT_AddDevice(hDevice); + break; + case GIDC_REMOVAL: { - HANDLE hDevice = (HANDLE)lParam; - switch (wParam) { - case GIDC_ARRIVAL: - RAWINPUT_AddDevice(hDevice); - break; - case GIDC_REMOVAL: - { - SDL_RAWINPUT_Device *device; - device = RAWINPUT_DeviceFromHandle(hDevice); - if (device) { - RAWINPUT_DelDevice(device, SDL_TRUE); - } - break; - } - default: - break; + SDL_RAWINPUT_Device *device; + device = RAWINPUT_DeviceFromHandle(hDevice); + if (device) { + RAWINPUT_DelDevice(device, SDL_TRUE); } + break; } + default: + break; + } + } result = 0; break; - case WM_INPUT: - { - Uint8 data[sizeof(RAWINPUTHEADER) + sizeof(RAWHID) + USB_PACKET_LENGTH]; - UINT buffer_size = SDL_arraysize(data); - - if ((int)GetRawInputData((HRAWINPUT)lParam, RID_INPUT, data, &buffer_size, sizeof(RAWINPUTHEADER)) > 0) { - PRAWINPUT raw_input = (PRAWINPUT)data; - SDL_RAWINPUT_Device *device = RAWINPUT_DeviceFromHandle(raw_input->header.hDevice); - if (device) { - SDL_Joystick *joystick = device->joystick; - if (joystick) { - RAWINPUT_HandleStatePacket(joystick, raw_input->data.hid.bRawData, raw_input->data.hid.dwSizeHid); - } + case WM_INPUT: + { + Uint8 data[sizeof(RAWINPUTHEADER) + sizeof(RAWHID) + USB_PACKET_LENGTH]; + UINT buffer_size = SDL_arraysize(data); + + if ((int)GetRawInputData((HRAWINPUT)lParam, RID_INPUT, data, &buffer_size, sizeof(RAWINPUTHEADER)) > 0) { + PRAWINPUT raw_input = (PRAWINPUT)data; + SDL_RAWINPUT_Device *device = RAWINPUT_DeviceFromHandle(raw_input->header.hDevice); + if (device) { + SDL_Joystick *joystick = device->joystick; + if (joystick) { + RAWINPUT_HandleStatePacket(joystick, raw_input->data.hid.bRawData, raw_input->data.hid.dwSizeHid); } } } + } result = 0; break; } @@ -1989,32 +2150,25 @@ RAWINPUT_WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) return CallWindowProc(DefWindowProc, hWnd, msg, wParam, lParam); } -static void -RAWINPUT_JoystickQuit(void) +static void RAWINPUT_JoystickQuit(void) { if (!SDL_RAWINPUT_inited) { return; } - while (SDL_RAWINPUT_devices) { - RAWINPUT_DelDevice(SDL_RAWINPUT_devices, SDL_FALSE); - } + RAWINPUT_RemoveDevices(); WIN_UnloadHIDDLL(); - SDL_RAWINPUT_numjoysticks = 0; - SDL_RAWINPUT_inited = SDL_FALSE; } -static SDL_bool -RAWINPUT_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool RAWINPUT_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_RAWINPUT_JoystickDriver = -{ +SDL_JoystickDriver SDL_RAWINPUT_JoystickDriver = { RAWINPUT_JoystickInit, RAWINPUT_JoystickGetCount, RAWINPUT_JoystickDetect, diff --git a/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick_c.h b/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick_c.h index 43bb23d..be08c33 100644 --- a/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick_c.h +++ b/modules/SDL2/src/joystick/windows/SDL_rawinputjoystick_c.h @@ -28,11 +28,10 @@ extern SDL_bool RAWINPUT_IsEnabled(); extern SDL_bool RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name); /* Registers for input events */ -extern SDL_bool RAWINPUT_RegisterNotifications(HWND hWnd); -extern void RAWINPUT_UnregisterNotifications(); +extern int RAWINPUT_RegisterNotifications(HWND hWnd); +extern int RAWINPUT_UnregisterNotifications(); /* Returns 0 if message was handled */ extern LRESULT CALLBACK RAWINPUT_WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/joystick/windows/SDL_windows_gaming_input.c b/modules/SDL2/src/joystick/windows/SDL_windows_gaming_input.c index 5df4aec..6f01b4e 100644 --- a/modules/SDL2/src/joystick/windows/SDL_windows_gaming_input.c +++ b/modules/SDL2/src/joystick/windows/SDL_windows_gaming_input.c @@ -37,12 +37,11 @@ #include #include - #ifdef ____FIReference_1_INT32_INTERFACE_DEFINED__ /* MinGW-64 uses __FIReference_1_INT32 instead of Microsoft's __FIReference_1_int */ -#define __FIReference_1_int __FIReference_1_INT32 +#define __FIReference_1_int __FIReference_1_INT32 #define __FIReference_1_int_get_Value __FIReference_1_INT32_get_Value -#define __FIReference_1_int_Release __FIReference_1_INT32_Release +#define __FIReference_1_int_Release __FIReference_1_INT32_Release #endif struct joystick_hwdata @@ -55,7 +54,8 @@ struct joystick_hwdata UINT64 timestamp; }; -typedef struct WindowsGamingInputControllerState { +typedef struct WindowsGamingInputControllerState +{ SDL_JoystickID instance_id; __x_ABI_CWindows_CGaming_CInput_CIRawGameController *controller; char *name; @@ -66,7 +66,8 @@ typedef struct WindowsGamingInputControllerState { int nbuttons; } WindowsGamingInputControllerState; -static struct { +static struct +{ __x_ABI_CWindows_CGaming_CInput_CIRawGameControllerStatics *statics; __x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics *arcade_stick_statics; __x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics2 *arcade_stick_statics2; @@ -100,13 +101,17 @@ static const IID IID_IRacingWheelStatics = { 0x3AC12CD5, 0x581B, 0x4936, { 0x9F, static const IID IID_IRacingWheelStatics2 = { 0xE666BCAA, 0xEDFD, 0x4323, { 0xA9, 0xF6, 0x3C, 0x38, 0x40, 0x48, 0xD1, 0xED } }; /*static const IID IID_IRacingWheel = { 0xF546656F, 0xE106, 0x4C82, { 0xA9, 0x0F, 0x55, 0x40, 0x12, 0x90, 0x4B, 0x85 } };*/ +typedef HRESULT(WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING *string); +typedef HRESULT(WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory); + + extern SDL_bool SDL_XINPUT_Enabled(void); extern SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version); -static SDL_bool -SDL_IsXInputDevice(Uint16 vendor, Uint16 product) + +static SDL_bool SDL_IsXInputDevice(Uint16 vendor, Uint16 product) { -#ifdef SDL_JOYSTICK_XINPUT +#if defined(SDL_JOYSTICK_XINPUT) || defined(SDL_JOYSTICK_RAWINPUT) PRAWINPUTDEVICELIST raw_devices = NULL; UINT i, raw_device_count = 0; LONG vidpid = MAKELONG(vendor, product); @@ -116,13 +121,13 @@ SDL_IsXInputDevice(Uint16 vendor, Uint16 product) #ifdef SDL_JOYSTICK_RAWINPUT && !RAWINPUT_IsEnabled() #endif - ) { + ) { return SDL_FALSE; } /* Go through RAWINPUT (WinXP and later) to find HID devices. */ if ((GetRawInputDeviceList(NULL, &raw_device_count, sizeof(RAWINPUTDEVICELIST)) == -1) || (!raw_device_count)) { - return SDL_FALSE; /* oh well. */ + return SDL_FALSE; /* oh well. */ } raw_devices = (PRAWINPUTDEVICELIST)SDL_malloc(sizeof(RAWINPUTDEVICELIST) * raw_device_count); @@ -134,7 +139,7 @@ SDL_IsXInputDevice(Uint16 vendor, Uint16 product) if (GetRawInputDeviceList(raw_devices, &raw_device_count, sizeof(RAWINPUTDEVICELIST)) == -1) { SDL_free(raw_devices); raw_devices = NULL; - return SDL_FALSE; /* oh well. */ + return SDL_FALSE; /* oh well. */ } for (i = 0; i < raw_device_count; i++) { @@ -189,7 +194,7 @@ SDL_IsXInputDevice(Uint16 vendor, Uint16 product) continue; } - SDL_snprintf(devVidPidString, sizeof(devVidPidString), "VID_%04X&PID_%04X", vendor, product); + (void)SDL_snprintf(devVidPidString, sizeof(devVidPidString), "VID_%04X&PID_%04X", vendor, product); while (CM_Get_Parent(&devNode, devNode, 0) == CR_SUCCESS) { char deviceId[MAX_DEVICE_ID_LEN]; @@ -204,26 +209,157 @@ SDL_IsXInputDevice(Uint16 vendor, Uint16 product) } SDL_free(raw_devices); -#endif /* SDL_JOYSTICK_XINPUT */ +#endif /* SDL_JOYSTICK_XINPUT || SDL_JOYSTICK_RAWINPUT */ return SDL_FALSE; } -typedef struct RawGameControllerDelegate { +static void WGI_LoadRawGameControllerStatics() +{ + WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = NULL; + RoGetActivationFactory_t RoGetActivationFactoryFunc = NULL; + HRESULT hr; + +#ifdef __WINRT__ + WindowsCreateStringReferenceFunc = WindowsCreateStringReference; + RoGetActivationFactoryFunc = RoGetActivationFactory; +#else + { + WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference"); + RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory"); + } +#endif /* __WINRT__ */ + if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { + PCWSTR pNamespace; + HSTRING_HEADER hNamespaceStringHeader; + HSTRING hNamespaceString; + + pNamespace = L"Windows.Gaming.Input.RawGameController"; + hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); + if (SUCCEEDED(hr)) { + hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IRawGameControllerStatics, (void **)&wgi.statics); + if (!SUCCEEDED(hr)) { + SDL_SetError("Couldn't find IRawGameControllerStatics: 0x%lx", hr); + } + } + } +} + +static void WGI_LoadOtherControllerStatics() +{ + WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = NULL; + RoGetActivationFactory_t RoGetActivationFactoryFunc = NULL; + HRESULT hr; + +#ifdef __WINRT__ + WindowsCreateStringReferenceFunc = WindowsCreateStringReference; + RoGetActivationFactoryFunc = RoGetActivationFactory; +#else + { + WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference"); + RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory"); + } +#endif /* __WINRT__ */ + if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { + PCWSTR pNamespace; + HSTRING_HEADER hNamespaceStringHeader; + HSTRING hNamespaceString; + + pNamespace = L"Windows.Gaming.Input.ArcadeStick"; + hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); + if (SUCCEEDED(hr)) { + hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IArcadeStickStatics, (void **)&wgi.arcade_stick_statics); + if (SUCCEEDED(hr)) { + __x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics_QueryInterface(wgi.arcade_stick_statics, &IID_IArcadeStickStatics2, (void **)&wgi.arcade_stick_statics2); + } else { + SDL_SetError("Couldn't find IID_IArcadeStickStatics: 0x%lx", hr); + } + } + + pNamespace = L"Windows.Gaming.Input.FlightStick"; + hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); + if (SUCCEEDED(hr)) { + hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IFlightStickStatics, (void **)&wgi.flight_stick_statics); + if (!SUCCEEDED(hr)) { + SDL_SetError("Couldn't find IID_IFlightStickStatics: 0x%lx", hr); + } + } + + pNamespace = L"Windows.Gaming.Input.Gamepad"; + hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); + if (SUCCEEDED(hr)) { + hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IGamepadStatics, (void **)&wgi.gamepad_statics); + if (SUCCEEDED(hr)) { + __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_QueryInterface(wgi.gamepad_statics, &IID_IGamepadStatics2, (void **)&wgi.gamepad_statics2); + } else { + SDL_SetError("Couldn't find IGamepadStatics: 0x%lx", hr); + } + } + + pNamespace = L"Windows.Gaming.Input.RacingWheel"; + hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); + if (SUCCEEDED(hr)) { + hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IRacingWheelStatics, (void **)&wgi.racing_wheel_statics); + if (SUCCEEDED(hr)) { + __x_ABI_CWindows_CGaming_CInput_CIRacingWheelStatics_QueryInterface(wgi.racing_wheel_statics, &IID_IRacingWheelStatics2, (void **)&wgi.racing_wheel_statics2); + } else { + SDL_SetError("Couldn't find IRacingWheelStatics: 0x%lx", hr); + } + } + } +} + +static SDL_JoystickType GetGameControllerType(__x_ABI_CWindows_CGaming_CInput_CIGameController *gamecontroller) +{ + __x_ABI_CWindows_CGaming_CInput_CIArcadeStick *arcade_stick = NULL; + __x_ABI_CWindows_CGaming_CInput_CIFlightStick *flight_stick = NULL; + __x_ABI_CWindows_CGaming_CInput_CIGamepad *gamepad = NULL; + __x_ABI_CWindows_CGaming_CInput_CIRacingWheel *racing_wheel = NULL; + + /* Wait to initialize these interfaces until we need them. + * Initializing the gamepad interface will switch Bluetooth PS4 controllers into enhanced mode, breaking DirectInput + */ + WGI_LoadOtherControllerStatics(); + + if (wgi.gamepad_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2_FromGameController(wgi.gamepad_statics2, gamecontroller, &gamepad)) && gamepad) { + __x_ABI_CWindows_CGaming_CInput_CIGamepad_Release(gamepad); + return SDL_JOYSTICK_TYPE_GAMECONTROLLER; + } + + if (wgi.arcade_stick_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics2_FromGameController(wgi.arcade_stick_statics2, gamecontroller, &arcade_stick)) && arcade_stick) { + __x_ABI_CWindows_CGaming_CInput_CIArcadeStick_Release(arcade_stick); + return SDL_JOYSTICK_TYPE_ARCADE_STICK; + } + + if (wgi.flight_stick_statics && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIFlightStickStatics_FromGameController(wgi.flight_stick_statics, gamecontroller, &flight_stick)) && flight_stick) { + __x_ABI_CWindows_CGaming_CInput_CIFlightStick_Release(flight_stick); + return SDL_JOYSTICK_TYPE_FLIGHT_STICK; + } + + if (wgi.racing_wheel_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIRacingWheelStatics2_FromGameController(wgi.racing_wheel_statics2, gamecontroller, &racing_wheel)) && racing_wheel) { + __x_ABI_CWindows_CGaming_CInput_CIRacingWheel_Release(racing_wheel); + return SDL_JOYSTICK_TYPE_WHEEL; + } + + return SDL_JOYSTICK_TYPE_UNKNOWN; +} + +typedef struct RawGameControllerDelegate +{ __FIEventHandler_1_Windows__CGaming__CInput__CRawGameController iface; SDL_atomic_t refcount; } RawGameControllerDelegate; -static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_QueryInterface(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController * This, REFIID riid, void **ppvObject) +static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_QueryInterface(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This, REFIID riid, void **ppvObject) { - if (!ppvObject) { + if (ppvObject == NULL) { return E_INVALIDARG; } *ppvObject = NULL; if (WIN_IsEqualIID(riid, &IID_IUnknown) || WIN_IsEqualIID(riid, &IID_IAgileObject) || WIN_IsEqualIID(riid, &IID_IEventHandler_RawGameController)) { *ppvObject = This; - __x_ABI_CWindows_CGaming_CInput_CIRawGameControllerStatics_AddRef(This); + __FIEventHandler_1_Windows__CGaming__CInput__CRawGameController_AddRef(This); return S_OK; } else if (WIN_IsEqualIID(riid, &IID_IMarshal)) { /* This seems complicated. Let's hope it doesn't happen. */ @@ -233,13 +369,13 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_QueryInter } } -static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_AddRef(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController * This) +static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_AddRef(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This) { RawGameControllerDelegate *self = (RawGameControllerDelegate *)This; - return SDL_AtomicAdd(&self->refcount, 1) + 1; + return SDL_AtomicAdd(&self->refcount, 1) + 1UL; } -static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_Release(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController * This) +static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_Release(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This) { RawGameControllerDelegate *self = (RawGameControllerDelegate *)This; int rc = SDL_AtomicAdd(&self->refcount, -1) - 1; @@ -248,7 +384,7 @@ static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_Release(__FI return rc; } -static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdded(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController * This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIRawGameController *e) +static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdded(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIRawGameController *e) { HRESULT hr; __x_ABI_CWindows_CGaming_CInput_CIRawGameController *controller = NULL; @@ -279,8 +415,8 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_QueryInterface(controller, &IID_IRawGameController2, (void **)&controller2); if (SUCCEEDED(hr)) { - typedef PCWSTR (WINAPI *WindowsGetStringRawBuffer_t)(HSTRING string, UINT32 *length); - typedef HRESULT (WINAPI *WindowsDeleteString_t)(HSTRING string); + typedef PCWSTR(WINAPI * WindowsGetStringRawBuffer_t)(HSTRING string, UINT32 * length); + typedef HRESULT(WINAPI * WindowsDeleteString_t)(HSTRING string); WindowsGetStringRawBuffer_t WindowsGetStringRawBufferFunc = NULL; WindowsDeleteString_t WindowsDeleteStringFunc = NULL; @@ -306,42 +442,10 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde } __x_ABI_CWindows_CGaming_CInput_CIRawGameController2_Release(controller2); } - if (!name) { + if (name == NULL) { name = SDL_strdup(""); } - hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_QueryInterface(controller, &IID_IGameController, (void **)&gamecontroller); - if (SUCCEEDED(hr)) { - __x_ABI_CWindows_CGaming_CInput_CIArcadeStick *arcade_stick = NULL; - __x_ABI_CWindows_CGaming_CInput_CIFlightStick *flight_stick = NULL; - __x_ABI_CWindows_CGaming_CInput_CIGamepad *gamepad = NULL; - __x_ABI_CWindows_CGaming_CInput_CIRacingWheel *racing_wheel = NULL; - boolean wireless; - - if (wgi.gamepad_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2_FromGameController(wgi.gamepad_statics2, gamecontroller, &gamepad)) && gamepad) { - type = SDL_JOYSTICK_TYPE_GAMECONTROLLER; - __x_ABI_CWindows_CGaming_CInput_CIGamepad_Release(gamepad); - } else if (wgi.arcade_stick_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics2_FromGameController(wgi.arcade_stick_statics2, gamecontroller, &arcade_stick)) && arcade_stick) { - type = SDL_JOYSTICK_TYPE_ARCADE_STICK; - __x_ABI_CWindows_CGaming_CInput_CIArcadeStick_Release(arcade_stick); - } else if (wgi.flight_stick_statics && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIFlightStickStatics_FromGameController(wgi.flight_stick_statics, gamecontroller, &flight_stick)) && flight_stick) { - type = SDL_JOYSTICK_TYPE_FLIGHT_STICK; - __x_ABI_CWindows_CGaming_CInput_CIFlightStick_Release(flight_stick); - } else if (wgi.racing_wheel_statics2 && SUCCEEDED(__x_ABI_CWindows_CGaming_CInput_CIRacingWheelStatics2_FromGameController(wgi.racing_wheel_statics2, gamecontroller, &racing_wheel)) && racing_wheel) { - type = SDL_JOYSTICK_TYPE_WHEEL; - __x_ABI_CWindows_CGaming_CInput_CIRacingWheel_Release(racing_wheel); - } - - hr = __x_ABI_CWindows_CGaming_CInput_CIGameController_get_IsWireless(gamecontroller, &wireless); - if (SUCCEEDED(hr) && wireless) { - bus = SDL_HARDWARE_BUS_BLUETOOTH; - } - - __x_ABI_CWindows_CGaming_CInput_CIGameController_Release(gamecontroller); - } - - guid = SDL_CreateJoystickGUID(bus, vendor, product, version, name, 'w', (Uint8) type); - #ifdef SDL_JOYSTICK_HIDAPI if (!ignore_joystick && HIDAPI_IsDevicePresent(vendor, product, version, name)) { ignore_joystick = SDL_TRUE; @@ -362,13 +466,29 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde ignore_joystick = SDL_TRUE; } - if (!ignore_joystick && SDL_ShouldIgnoreJoystick(name, guid)) { - ignore_joystick = SDL_TRUE; + if (!ignore_joystick) { + hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_QueryInterface(controller, &IID_IGameController, (void **)&gamecontroller); + if (SUCCEEDED(hr)) { + boolean wireless; + + type = GetGameControllerType(gamecontroller); + + hr = __x_ABI_CWindows_CGaming_CInput_CIGameController_get_IsWireless(gamecontroller, &wireless); + if (SUCCEEDED(hr) && wireless) { + bus = SDL_HARDWARE_BUS_BLUETOOTH; + } + + __x_ABI_CWindows_CGaming_CInput_CIGameController_Release(gamecontroller); + } + + guid = SDL_CreateJoystickGUID(bus, vendor, product, version, name, 'w', (Uint8)type); + + if (SDL_ShouldIgnoreJoystick(name, guid)) { + ignore_joystick = SDL_TRUE; + } } - if (ignore_joystick) { - SDL_free(name); - } else { + if (!ignore_joystick) { /* New device, add it */ WindowsGamingInputControllerState *controllers = SDL_realloc(wgi.controllers, sizeof(wgi.controllers[0]) * (wgi.controller_count + 1)); if (controllers) { @@ -392,7 +512,11 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde wgi.controllers = controllers; SDL_PrivateJoystickAdded(joystickID); + } else { + SDL_free(name); } + } else { + SDL_free(name); } __x_ABI_CWindows_CGaming_CInput_CIRawGameController_Release(controller); @@ -403,7 +527,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde return S_OK; } -static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeRemoved(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController * This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIRawGameController *e) +static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeRemoved(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This, IInspectable *sender, __x_ABI_CWindows_CGaming_CInput_CIRawGameController *e) { HRESULT hr; __x_ABI_CWindows_CGaming_CInput_CIRawGameController *controller = NULL; @@ -420,7 +544,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeRemo if (SUCCEEDED(hr)) { int i; - for (i = 0; i < wgi.controller_count ; i++) { + for (i = 0; i < wgi.controller_count; i++) { if (wgi.controllers[i].controller == controller) { WindowsGamingInputControllerState *state = &wgi.controllers[i]; SDL_JoystickID joystickID = state->instance_id; @@ -469,16 +593,14 @@ static RawGameControllerDelegate controller_removed = { { 1 } }; -static int -WGI_JoystickInit(void) +static int WGI_JoystickInit(void) { - typedef HRESULT (WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING* string); - typedef HRESULT (WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void** factory); - - WindowsCreateStringReference_t WindowsCreateStringReferenceFunc = NULL; - RoGetActivationFactory_t RoGetActivationFactoryFunc = NULL; HRESULT hr; + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_WGI, SDL_TRUE)) { + return 0; + } + if (FAILED(WIN_RoInitialize())) { return SDL_SetError("RoInitialize() failed"); } @@ -493,7 +615,7 @@ WGI_JoystickInit(void) */ static PVOID cookie = NULL; if (!cookie) { - typedef HRESULT (WINAPI *CoIncrementMTAUsage_t)(PVOID* pCookie); + typedef HRESULT(WINAPI * CoIncrementMTAUsage_t)(PVOID * pCookie); CoIncrementMTAUsage_t CoIncrementMTAUsageFunc = (CoIncrementMTAUsage_t)WIN_LoadComBaseFunction("CoIncrementMTAUsage"); if (CoIncrementMTAUsageFunc) { if (FAILED(CoIncrementMTAUsageFunc(&cookie))) { @@ -507,71 +629,7 @@ WGI_JoystickInit(void) } #endif -#ifdef __WINRT__ - WindowsCreateStringReferenceFunc = WindowsCreateStringReference; - RoGetActivationFactoryFunc = RoGetActivationFactory; -#else - { - WindowsCreateStringReferenceFunc = (WindowsCreateStringReference_t)WIN_LoadComBaseFunction("WindowsCreateStringReference"); - RoGetActivationFactoryFunc = (RoGetActivationFactory_t)WIN_LoadComBaseFunction("RoGetActivationFactory"); - } -#endif /* __WINRT__ */ - if (WindowsCreateStringReferenceFunc && RoGetActivationFactoryFunc) { - PCWSTR pNamespace; - HSTRING_HEADER hNamespaceStringHeader; - HSTRING hNamespaceString; - - pNamespace = L"Windows.Gaming.Input.RawGameController"; - hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); - if (SUCCEEDED(hr)) { - hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IRawGameControllerStatics, (void **)&wgi.statics); - if (!SUCCEEDED(hr)) { - SDL_SetError("Couldn't find IRawGameControllerStatics: 0x%lx", hr); - } - } - - pNamespace = L"Windows.Gaming.Input.ArcadeStick"; - hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); - if (SUCCEEDED(hr)) { - hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IArcadeStickStatics, (void **)&wgi.arcade_stick_statics); - if (SUCCEEDED(hr)) { - __x_ABI_CWindows_CGaming_CInput_CIArcadeStickStatics_QueryInterface(wgi.arcade_stick_statics, &IID_IArcadeStickStatics2, (void **)&wgi.arcade_stick_statics2); - } else { - SDL_SetError("Couldn't find IID_IArcadeStickStatics: 0x%lx", hr); - } - } - - pNamespace = L"Windows.Gaming.Input.FlightStick"; - hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); - if (SUCCEEDED(hr)) { - hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IFlightStickStatics, (void **)&wgi.flight_stick_statics); - if (!SUCCEEDED(hr)) { - SDL_SetError("Couldn't find IID_IFlightStickStatics: 0x%lx", hr); - } - } - - pNamespace = L"Windows.Gaming.Input.Gamepad"; - hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); - if (SUCCEEDED(hr)) { - hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IGamepadStatics, (void **)&wgi.gamepad_statics); - if (SUCCEEDED(hr)) { - __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_QueryInterface(wgi.gamepad_statics, &IID_IGamepadStatics2, (void **)&wgi.gamepad_statics2); - } else { - SDL_SetError("Couldn't find IGamepadStatics: 0x%lx", hr); - } - } - - pNamespace = L"Windows.Gaming.Input.RacingWheel"; - hr = WindowsCreateStringReferenceFunc(pNamespace, (UINT32)SDL_wcslen(pNamespace), &hNamespaceStringHeader, &hNamespaceString); - if (SUCCEEDED(hr)) { - hr = RoGetActivationFactoryFunc(hNamespaceString, &IID_IRacingWheelStatics, (void **)&wgi.racing_wheel_statics); - if (SUCCEEDED(hr)) { - __x_ABI_CWindows_CGaming_CInput_CIRacingWheelStatics_QueryInterface(wgi.racing_wheel_statics, &IID_IRacingWheelStatics2, (void **)&wgi.racing_wheel_statics2); - } else { - SDL_SetError("Couldn't find IRacingWheelStatics: 0x%lx", hr); - } - } - } + WGI_LoadRawGameControllerStatics(); if (wgi.statics) { __FIVectorView_1_Windows__CGaming__CInput__CRawGameController *controllers; @@ -610,61 +668,52 @@ WGI_JoystickInit(void) return 0; } -static int -WGI_JoystickGetCount(void) +static int WGI_JoystickGetCount(void) { return wgi.controller_count; } -static void -WGI_JoystickDetect(void) +static void WGI_JoystickDetect(void) { } -static const char * -WGI_JoystickGetDeviceName(int device_index) +static const char *WGI_JoystickGetDeviceName(int device_index) { return wgi.controllers[device_index].name; } -static const char * -WGI_JoystickGetDevicePath(int device_index) +static const char *WGI_JoystickGetDevicePath(int device_index) { return NULL; } -static int -WGI_JoystickGetDevicePlayerIndex(int device_index) +static int WGI_JoystickGetDevicePlayerIndex(int device_index) { return -1; } -static void -WGI_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void WGI_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } -static SDL_JoystickGUID -WGI_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID WGI_JoystickGetDeviceGUID(int device_index) { return wgi.controllers[device_index].guid; } -static SDL_JoystickID -WGI_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID WGI_JoystickGetDeviceInstanceID(int device_index) { return wgi.controllers[device_index].instance_id; } -static int -WGI_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int WGI_JoystickOpen(SDL_Joystick *joystick, int device_index) { WindowsGamingInputControllerState *state = &wgi.controllers[device_index]; struct joystick_hwdata *hwdata; boolean wireless = SDL_FALSE; hwdata = (struct joystick_hwdata *)SDL_calloc(1, sizeof(*hwdata)); - if (!hwdata) { + if (hwdata == NULL) { return SDL_OutOfMemory(); } joystick->hwdata = hwdata; @@ -728,8 +777,7 @@ WGI_JoystickOpen(SDL_Joystick *joystick, int device_index) return 0; } -static int -WGI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int WGI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { struct joystick_hwdata *hwdata = joystick->hwdata; @@ -749,8 +797,7 @@ WGI_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 h } } -static int -WGI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int WGI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { struct joystick_hwdata *hwdata = joystick->hwdata; @@ -770,8 +817,7 @@ WGI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 ri } } -static Uint32 -WGI_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 WGI_JoystickGetCapabilities(SDL_Joystick *joystick) { struct joystick_hwdata *hwdata = joystick->hwdata; @@ -783,26 +829,22 @@ WGI_JoystickGetCapabilities(SDL_Joystick *joystick) } } -static int -WGI_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int WGI_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -WGI_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int WGI_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -WGI_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int WGI_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static Uint8 -ConvertHatValue(__x_ABI_CWindows_CGaming_CInput_CGameControllerSwitchPosition value) +static Uint8 ConvertHatValue(__x_ABI_CWindows_CGaming_CInput_CGameControllerSwitchPosition value) { switch (value) { case GameControllerSwitchPosition_Up: @@ -826,8 +868,7 @@ ConvertHatValue(__x_ABI_CWindows_CGaming_CInput_CGameControllerSwitchPosition va } } -static void -WGI_JoystickUpdate(SDL_Joystick *joystick) +static void WGI_JoystickUpdate(SDL_Joystick *joystick) { struct joystick_hwdata *hwdata = joystick->hwdata; HRESULT hr; @@ -850,28 +891,31 @@ WGI_JoystickUpdate(SDL_Joystick *joystick) } hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_GetCurrentReading(hwdata->controller, nbuttons, buttons, nhats, hats, naxes, axes, ×tamp); - if (SUCCEEDED(hr) && timestamp != hwdata->timestamp) { + if (SUCCEEDED(hr) && (!timestamp || timestamp != hwdata->timestamp)) { UINT32 i; - SDL_bool all_zero = SDL_TRUE; + SDL_bool all_zero = SDL_FALSE; /* The axes are all zero when the application loses focus */ - for (i = 0; i < naxes; ++i) { - if (axes[i] != 0.0f) { - all_zero = SDL_FALSE; - break; + if (naxes > 0) { + all_zero = SDL_TRUE; + for (i = 0; i < naxes; ++i) { + if (axes[i] != 0.0f) { + all_zero = SDL_FALSE; + break; + } } } if (all_zero) { SDL_PrivateJoystickForceRecentering(joystick); } else { for (i = 0; i < nbuttons; ++i) { - SDL_PrivateJoystickButton(joystick, (Uint8) i, buttons[i]); + SDL_PrivateJoystickButton(joystick, (Uint8)i, buttons[i]); } for (i = 0; i < nhats; ++i) { - SDL_PrivateJoystickHat(joystick, (Uint8) i, ConvertHatValue(hats[i])); + SDL_PrivateJoystickHat(joystick, (Uint8)i, ConvertHatValue(hats[i])); } for (i = 0; i < naxes; ++i) { - SDL_PrivateJoystickAxis(joystick, (Uint8)i, (Sint16)((int) (axes[i] * 65535) - 32768)); + SDL_PrivateJoystickAxis(joystick, (Uint8)i, (Sint16)((int)(axes[i] * 65535) - 32768)); } } hwdata->timestamp = timestamp; @@ -882,8 +926,7 @@ WGI_JoystickUpdate(SDL_Joystick *joystick) SDL_stack_free(axes); } -static void -WGI_JoystickClose(SDL_Joystick *joystick) +static void WGI_JoystickClose(SDL_Joystick *joystick) { struct joystick_hwdata *hwdata = joystick->hwdata; @@ -905,8 +948,7 @@ WGI_JoystickClose(SDL_Joystick *joystick) joystick->hwdata = NULL; } -static void -WGI_JoystickQuit(void) +static void WGI_JoystickQuit(void) { if (wgi.statics) { while (wgi.controller_count > 0) { @@ -950,14 +992,12 @@ WGI_JoystickQuit(void) SDL_zero(wgi); } -static SDL_bool -WGI_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool WGI_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_WGI_JoystickDriver = -{ +SDL_JoystickDriver SDL_WGI_JoystickDriver = { WGI_JoystickInit, WGI_JoystickGetCount, WGI_JoystickDetect, diff --git a/modules/SDL2/src/joystick/windows/SDL_windowsjoystick.c b/modules/SDL2/src/joystick/windows/SDL_windowsjoystick.c index ebfb2f8..d94b314 100644 --- a/modules/SDL2/src/joystick/windows/SDL_windowsjoystick.c +++ b/modules/SDL2/src/joystick/windows/SDL_windowsjoystick.c @@ -51,9 +51,8 @@ #include "SDL_xinputjoystick_c.h" #include "SDL_rawinputjoystick_c.h" -#include "../../haptic/windows/SDL_dinputhaptic_c.h" /* For haptic hot plugging */ -#include "../../haptic/windows/SDL_xinputhaptic_c.h" /* For haptic hot plugging */ - +#include "../../haptic/windows/SDL_dinputhaptic_c.h" /* For haptic hot plugging */ +#include "../../haptic/windows/SDL_xinputhaptic_c.h" /* For haptic hot plugging */ #ifndef DEVICE_NOTIFY_WINDOW_HANDLE #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000 @@ -69,34 +68,42 @@ extern "C" { #endif DECLARE_HANDLE(HCMNOTIFICATION); -typedef HCMNOTIFICATION* PHCMNOTIFICATION; +typedef HCMNOTIFICATION *PHCMNOTIFICATION; -typedef enum _CM_NOTIFY_FILTER_TYPE { +typedef enum _CM_NOTIFY_FILTER_TYPE +{ CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE = 0, CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE, CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE, CM_NOTIFY_FILTER_TYPE_MAX -} CM_NOTIFY_FILTER_TYPE, * PCM_NOTIFY_FILTER_TYPE; +} CM_NOTIFY_FILTER_TYPE, + *PCM_NOTIFY_FILTER_TYPE; -typedef struct _CM_NOTIFY_FILTER { +typedef struct _CM_NOTIFY_FILTER +{ DWORD cbSize; DWORD Flags; CM_NOTIFY_FILTER_TYPE FilterType; DWORD Reserved; - union { - struct { + union + { + struct + { GUID ClassGuid; } DeviceInterface; - struct { - HANDLE hTarget; + struct + { + HANDLE hTarget; } DeviceHandle; - struct { + struct + { WCHAR InstanceId[200]; } DeviceInstance; } u; -} CM_NOTIFY_FILTER, * PCM_NOTIFY_FILTER; +} CM_NOTIFY_FILTER, *PCM_NOTIFY_FILTER; -typedef enum _CM_NOTIFY_ACTION { +typedef enum _CM_NOTIFY_ACTION +{ CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL = 0, CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL, CM_NOTIFY_ACTION_DEVICEQUERYREMOVE, @@ -108,32 +115,38 @@ typedef enum _CM_NOTIFY_ACTION { CM_NOTIFY_ACTION_DEVICEINSTANCESTARTED, CM_NOTIFY_ACTION_DEVICEINSTANCEREMOVED, CM_NOTIFY_ACTION_MAX -} CM_NOTIFY_ACTION, * PCM_NOTIFY_ACTION; +} CM_NOTIFY_ACTION, + *PCM_NOTIFY_ACTION; -typedef struct _CM_NOTIFY_EVENT_DATA { +typedef struct _CM_NOTIFY_EVENT_DATA +{ CM_NOTIFY_FILTER_TYPE FilterType; DWORD Reserved; - union { - struct { + union + { + struct + { GUID ClassGuid; WCHAR SymbolicLink[ANYSIZE_ARRAY]; } DeviceInterface; - struct { + struct + { GUID EventGuid; LONG NameOffset; DWORD DataSize; BYTE Data[ANYSIZE_ARRAY]; } DeviceHandle; - struct { + struct + { WCHAR InstanceId[ANYSIZE_ARRAY]; } DeviceInstance; } u; -} CM_NOTIFY_EVENT_DATA, * PCM_NOTIFY_EVENT_DATA; +} CM_NOTIFY_EVENT_DATA, *PCM_NOTIFY_EVENT_DATA; -typedef DWORD (CALLBACK *PCM_NOTIFY_CALLBACK)(HCMNOTIFICATION hNotify, PVOID Context, CM_NOTIFY_ACTION Action, PCM_NOTIFY_EVENT_DATA EventData, DWORD EventDataSize); +typedef DWORD(CALLBACK *PCM_NOTIFY_CALLBACK)(HCMNOTIFICATION hNotify, PVOID Context, CM_NOTIFY_ACTION Action, PCM_NOTIFY_EVENT_DATA EventData, DWORD EventDataSize); -typedef DWORD (WINAPI *CM_Register_NotificationFunc)(PCM_NOTIFY_FILTER pFilter, PVOID pContext, PCM_NOTIFY_CALLBACK pCallback, PHCMNOTIFICATION pNotifyContext); -typedef DWORD (WINAPI *CM_Unregister_NotificationFunc)(HCMNOTIFICATION NotifyContext); +typedef DWORD(WINAPI *CM_Register_NotificationFunc)(PCM_NOTIFY_FILTER pFilter, PVOID pContext, PCM_NOTIFY_CALLBACK pCallback, PHCMNOTIFICATION pNotifyContext); +typedef DWORD(WINAPI *CM_Unregister_NotificationFunc)(HCMNOTIFICATION NotifyContext); /* local variables */ static SDL_bool s_bJoystickThread = SDL_FALSE; @@ -144,7 +157,7 @@ static SDL_Thread *s_joystickThread = NULL; static SDL_bool s_bJoystickThreadQuit = SDL_FALSE; static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2L, 0xF16F, 0x11CF, { 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 } }; -JoyStick_DeviceData *SYS_Joystick; /* array to hold joystick ID values */ +JoyStick_DeviceData *SYS_Joystick; /* array to hold joystick ID values */ #if !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) static HMODULE cfgmgr32_lib_handle; @@ -152,8 +165,12 @@ static CM_Register_NotificationFunc CM_Register_Notification; static CM_Unregister_NotificationFunc CM_Unregister_Notification; static HCMNOTIFICATION s_DeviceNotificationFuncHandle; -static DWORD CALLBACK -SDL_DeviceNotificationFunc(HCMNOTIFICATION hNotify, PVOID context, CM_NOTIFY_ACTION action, PCM_NOTIFY_EVENT_DATA eventData, DWORD event_data_size) +void WINDOWS_RAWINPUTEnabledChanged(void) +{ + s_bWindowsDeviceChanged = SDL_TRUE; +} + +static DWORD CALLBACK SDL_DeviceNotificationFunc(HCMNOTIFICATION hNotify, PVOID context, CM_NOTIFY_ACTION action, PCM_NOTIFY_EVENT_DATA eventData, DWORD event_data_size) { if (action == CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL || action == CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL) { @@ -162,11 +179,10 @@ SDL_DeviceNotificationFunc(HCMNOTIFICATION hNotify, PVOID context, CM_NOTIFY_ACT return ERROR_SUCCESS; } -static void -SDL_CleanupDeviceNotificationFunc(void) +static void SDL_CleanupDeviceNotificationFunc(void) { if (cfgmgr32_lib_handle) { - if (s_DeviceNotificationFuncHandle) { + if (s_DeviceNotificationFuncHandle != NULL && CM_Unregister_Notification != NULL) { CM_Unregister_Notification(s_DeviceNotificationFuncHandle); s_DeviceNotificationFuncHandle = NULL; } @@ -176,8 +192,7 @@ SDL_CleanupDeviceNotificationFunc(void) } } -static SDL_bool -SDL_CreateDeviceNotificationFunc(void) +static SDL_bool SDL_CreateDeviceNotificationFunc(void) { cfgmgr32_lib_handle = LoadLibraryA("cfgmgr32.dll"); if (cfgmgr32_lib_handle) { @@ -212,15 +227,14 @@ typedef struct #define IDT_SDL_DEVICE_CHANGE_TIMER_2 1201 /* windowproc for our joystick detect thread message only window, to detect any USB device addition/removal */ -static LRESULT CALLBACK -SDL_PrivateJoystickDetectProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +static LRESULT CALLBACK SDL_PrivateJoystickDetectProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_DEVICECHANGE: switch (wParam) { case DBT_DEVICEARRIVAL: case DBT_DEVICEREMOVECOMPLETE: - if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { + if (((DEV_BROADCAST_HDR *)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { /* notify 300ms and 2 seconds later to ensure all APIs have updated status */ SetTimer(hwnd, IDT_SDL_DEVICE_CHANGE_TIMER_1, 300, NULL); SetTimer(hwnd, IDT_SDL_DEVICE_CHANGE_TIMER_2, 2000, NULL); @@ -245,18 +259,19 @@ SDL_PrivateJoystickDetectProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) #endif } -static void -SDL_CleanupDeviceNotification(SDL_DeviceNotificationData *data) +static void SDL_CleanupDeviceNotification(SDL_DeviceNotificationData *data) { #if SDL_JOYSTICK_RAWINPUT RAWINPUT_UnregisterNotifications(); #endif - if (data->hNotify) + if (data->hNotify) { UnregisterDeviceNotification(data->hNotify); + } - if (data->messageWindow) + if (data->messageWindow) { DestroyWindow(data->messageWindow); + } UnregisterClass(data->wincl.lpszClassName, data->wincl.hInstance); @@ -265,8 +280,7 @@ SDL_CleanupDeviceNotification(SDL_DeviceNotificationData *data) } } -static int -SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data) +static int SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data) { DEV_BROADCAST_DEVICEINTERFACE dbh; @@ -276,8 +290,8 @@ SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data) data->wincl.hInstance = GetModuleHandle(NULL); data->wincl.lpszClassName = TEXT("Message"); - data->wincl.lpfnWndProc = SDL_PrivateJoystickDetectProc; /* This function is called by windows */ - data->wincl.cbSize = sizeof (WNDCLASSEX); + data->wincl.lpfnWndProc = SDL_PrivateJoystickDetectProc; /* This function is called by windows */ + data->wincl.cbSize = sizeof(WNDCLASSEX); if (!RegisterClassEx(&data->wincl)) { WIN_SetError("Failed to create register class for joystick autodetect"); @@ -285,8 +299,8 @@ SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data) return -1; } - data->messageWindow = (HWND)CreateWindowEx(0, TEXT("Message"), NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); - if (!data->messageWindow) { + data->messageWindow = CreateWindowEx(0, TEXT("Message"), NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); + if (data->messageWindow == NULL) { WIN_SetError("Failed to create message window for joystick autodetect"); SDL_CleanupDeviceNotification(data); return -1; @@ -310,8 +324,7 @@ SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data) return 0; } -static SDL_bool -SDL_WaitForDeviceNotification(SDL_DeviceNotificationData *data, SDL_mutex *mutex) +static SDL_bool SDL_WaitForDeviceNotification(SDL_DeviceNotificationData *data, SDL_mutex *mutex) { MSG msg; int lastret = 1; @@ -334,7 +347,6 @@ SDL_WaitForDeviceNotification(SDL_DeviceNotificationData *data, SDL_mutex *mutex #endif /* !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) */ - #if !defined(__WINRT__) #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -342,8 +354,7 @@ static SDL_DeviceNotificationData s_notification_data; #endif /* Function/thread to scan the system for joysticks. */ -static int SDLCALL -SDL_JoystickThread(void *_data) +static int SDLCALL SDL_JoystickThread(void *_data) { #if SDL_JOYSTICK_XINPUT SDL_bool bOpenedXInputDevices[XUSER_MAX_COUNT]; @@ -396,31 +407,29 @@ SDL_JoystickThread(void *_data) } /* spin up the thread to detect hotplug of devices */ -static int -SDL_StartJoystickThread(void) +static int SDL_StartJoystickThread(void) { s_mutexJoyStickEnum = SDL_CreateMutex(); - if (!s_mutexJoyStickEnum) { + if (s_mutexJoyStickEnum == NULL) { return -1; } s_condJoystickThread = SDL_CreateCond(); - if (!s_condJoystickThread) { + if (s_condJoystickThread == NULL) { return -1; } s_bJoystickThreadQuit = SDL_FALSE; s_joystickThread = SDL_CreateThreadInternal(SDL_JoystickThread, "SDL_joystick", 64 * 1024, NULL); - if (!s_joystickThread) { + if (s_joystickThread == NULL) { return -1; } return 0; } -static void -SDL_StopJoystickThread(void) +static void SDL_StopJoystickThread(void) { - if (!s_joystickThread) { + if (s_joystickThread == NULL) { return; } @@ -455,15 +464,14 @@ void WINDOWS_AddJoystickDevice(JoyStick_DeviceData *device) SYS_Joystick = device; } -static void WINDOWS_JoystickDetect(void); -static void WINDOWS_JoystickQuit(void); +void WINDOWS_JoystickDetect(void); +void WINDOWS_JoystickQuit(void); /* Function to scan the system for joysticks. * Joystick 0 should be the system default joystick. * It should return 0, or -1 on an unrecoverable fatal error. */ -static int -WINDOWS_JoystickInit(void) +static int WINDOWS_JoystickInit(void) { if (SDL_DINPUT_JoystickInit() < 0) { WINDOWS_JoystickQuit(); @@ -505,8 +513,7 @@ WINDOWS_JoystickInit(void) } /* return the number of joysticks that are connected right now */ -static int -WINDOWS_JoystickGetCount(void) +static int WINDOWS_JoystickGetCount(void) { int nJoysticks = 0; JoyStick_DeviceData *device = SYS_Joystick; @@ -519,14 +526,13 @@ WINDOWS_JoystickGetCount(void) } /* detect any new joysticks being inserted into the system */ -static void -WINDOWS_JoystickDetect(void) +void WINDOWS_JoystickDetect(void) { JoyStick_DeviceData *pCurList = NULL; /* only enum the devices if the joystick thread told us something changed */ if (!s_bWindowsDeviceChanged) { - return; /* thread hasn't signaled, nothing to do right now. */ + return; /* thread hasn't signaled, nothing to do right now. */ } if (s_mutexJoyStickEnum) { @@ -588,69 +594,68 @@ WINDOWS_JoystickDetect(void) } } -static const char * -WINDOWS_JoystickGetDeviceName(int device_index) +static const char *WINDOWS_JoystickGetDeviceName(int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } return device->joystickname; } -static const char * -WINDOWS_JoystickGetDevicePath(int device_index) +static const char *WINDOWS_JoystickGetDevicePath(int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } return device->path; } -static int -WINDOWS_JoystickGetDevicePlayerIndex(int device_index) +static int WINDOWS_JoystickGetDevicePlayerIndex(int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } return device->bXInputDevice ? (int)device->XInputUserId : -1; } -static void -WINDOWS_JoystickSetDevicePlayerIndex(int device_index, int player_index) +static void WINDOWS_JoystickSetDevicePlayerIndex(int device_index, int player_index) { } /* return the stable device guid for this device index */ -static SDL_JoystickGUID -WINDOWS_JoystickGetDeviceGUID(int device_index) +static SDL_JoystickGUID WINDOWS_JoystickGetDeviceGUID(int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } return device->guid; } /* Function to perform the mapping between current device instance and this joysticks instance id */ -static SDL_JoystickID -WINDOWS_JoystickGetDeviceInstanceID(int device_index) +static SDL_JoystickID WINDOWS_JoystickGetDeviceInstanceID(int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } return device->nInstanceID; } @@ -660,19 +665,19 @@ WINDOWS_JoystickGetDeviceInstanceID(int device_index) This should fill the nbuttons and naxes fields of the joystick structure. It returns 0, or -1 if there is an error. */ -static int -WINDOWS_JoystickOpen(SDL_Joystick *joystick, int device_index) +static int WINDOWS_JoystickOpen(SDL_Joystick *joystick, int device_index) { JoyStick_DeviceData *device = SYS_Joystick; int index; - for (index = device_index; index > 0; index--) + for (index = device_index; index > 0; index--) { device = device->pNext; + } /* allocate memory for system specific hardware data */ joystick->instance_id = device->nInstanceID; joystick->hwdata = - (struct joystick_hwdata *) SDL_malloc(sizeof(struct joystick_hwdata)); + (struct joystick_hwdata *)SDL_malloc(sizeof(struct joystick_hwdata)); if (joystick->hwdata == NULL) { return SDL_OutOfMemory(); } @@ -686,8 +691,7 @@ WINDOWS_JoystickOpen(SDL_Joystick *joystick, int device_index) } } -static int -WINDOWS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +static int WINDOWS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { if (joystick->hwdata->bXInputDevice) { return SDL_XINPUT_JoystickRumble(joystick, low_frequency_rumble, high_frequency_rumble); @@ -696,14 +700,12 @@ WINDOWS_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint } } -static int -WINDOWS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +static int WINDOWS_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) { return SDL_Unsupported(); } -static Uint32 -WINDOWS_JoystickGetCapabilities(SDL_Joystick *joystick) +static Uint32 WINDOWS_JoystickGetCapabilities(SDL_Joystick *joystick) { if (joystick->hwdata->bXInputDevice) { return SDL_XINPUT_JoystickGetCapabilities(joystick); @@ -712,26 +714,22 @@ WINDOWS_JoystickGetCapabilities(SDL_Joystick *joystick) } } -static int -WINDOWS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) +static int WINDOWS_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue) { return SDL_Unsupported(); } -static int -WINDOWS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) +static int WINDOWS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size) { return SDL_Unsupported(); } -static int -WINDOWS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) +static int WINDOWS_JoystickSetSensorsEnabled(SDL_Joystick *joystick, SDL_bool enabled) { return SDL_Unsupported(); } -static void -WINDOWS_JoystickUpdate(SDL_Joystick *joystick) +static void WINDOWS_JoystickUpdate(SDL_Joystick *joystick) { if (!joystick->hwdata) { return; @@ -745,8 +743,7 @@ WINDOWS_JoystickUpdate(SDL_Joystick *joystick) } /* Function to close a joystick after use */ -static void -WINDOWS_JoystickClose(SDL_Joystick *joystick) +static void WINDOWS_JoystickClose(SDL_Joystick *joystick) { if (joystick->hwdata->bXInputDevice) { SDL_XINPUT_JoystickClose(joystick); @@ -758,8 +755,7 @@ WINDOWS_JoystickClose(SDL_Joystick *joystick) } /* Function to perform any system-specific joystick related cleanup */ -static void -WINDOWS_JoystickQuit(void) +void WINDOWS_JoystickQuit(void) { JoyStick_DeviceData *device = SYS_Joystick; @@ -793,14 +789,12 @@ WINDOWS_JoystickQuit(void) s_bWindowsDeviceChanged = SDL_FALSE; } -static SDL_bool -WINDOWS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) +static SDL_bool WINDOWS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMapping *out) { return SDL_FALSE; } -SDL_JoystickDriver SDL_WINDOWS_JoystickDriver = -{ +SDL_JoystickDriver SDL_WINDOWS_JoystickDriver = { WINDOWS_JoystickInit, WINDOWS_JoystickGetCount, WINDOWS_JoystickDetect, diff --git a/modules/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h b/modules/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h index 13cfa91..8c601a4 100644 --- a/modules/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h +++ b/modules/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h @@ -25,7 +25,7 @@ #include "../../core/windows/SDL_windows.h" #include "../../core/windows/SDL_directx.h" -#define MAX_INPUTS 256 /* each joystick can have up to 256 inputs */ +#define MAX_INPUTS 256 /* each joystick can have up to 256 inputs */ /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -46,7 +46,7 @@ typedef struct JoyStick_DeviceData struct JoyStick_DeviceData *pNext; } JoyStick_DeviceData; -extern JoyStick_DeviceData *SYS_Joystick; /* array to hold joystick ID values */ +extern JoyStick_DeviceData *SYS_Joystick; /* array to hold joystick ID values */ typedef enum Type { @@ -86,7 +86,7 @@ struct joystick_hwdata SDL_bool bXInputDevice; /* SDL_TRUE if this device supports using the xinput API rather than DirectInput */ SDL_bool bXInputHaptic; /* Supports force feedback via XInput. */ - Uint8 userid; /* XInput userid index for this joystick */ + Uint8 userid; /* XInput userid index for this joystick */ DWORD dwPacketNumber; }; diff --git a/modules/SDL2/src/joystick/windows/SDL_xinputjoystick.c b/modules/SDL2/src/joystick/windows/SDL_xinputjoystick.c index c5053f4..8d1a87f 100644 --- a/modules/SDL2/src/joystick/windows/SDL_xinputjoystick.c +++ b/modules/SDL2/src/joystick/windows/SDL_xinputjoystick.c @@ -42,14 +42,12 @@ extern "C" { static SDL_bool s_bXInputEnabled = SDL_TRUE; static char *s_arrXInputDevicePath[XUSER_MAX_COUNT]; - -static SDL_bool -SDL_XInputUseOldJoystickMapping() +static SDL_bool SDL_XInputUseOldJoystickMapping() { #ifdef __WINRT__ /* TODO: remove this __WINRT__ block, but only after integrating with UWP/WinRT's HID API */ /* FIXME: Why are Win8/10 different here? -flibit */ - return (NTDDI_VERSION < NTDDI_WIN10); + return NTDDI_VERSION < NTDDI_WIN10; #elif defined(__XBOXONE__) || defined(__XBOXSERIES__) return SDL_FALSE; #else @@ -57,7 +55,7 @@ SDL_XInputUseOldJoystickMapping() if (s_XInputUseOldJoystickMapping < 0) { s_XInputUseOldJoystickMapping = SDL_GetHintBoolean(SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING, SDL_FALSE); } - return (s_XInputUseOldJoystickMapping > 0); + return s_XInputUseOldJoystickMapping > 0; #endif } @@ -66,61 +64,52 @@ SDL_bool SDL_XINPUT_Enabled(void) return s_bXInputEnabled; } -int -SDL_XINPUT_JoystickInit(void) +int SDL_XINPUT_JoystickInit(void) { s_bXInputEnabled = SDL_GetHintBoolean(SDL_HINT_XINPUT_ENABLED, SDL_TRUE); -#ifdef SDL_JOYSTICK_RAWINPUT - if (RAWINPUT_IsEnabled()) { - /* The raw input driver handles more than 4 controllers, so prefer that when available */ - s_bXInputEnabled = SDL_FALSE; - } -#endif - if (s_bXInputEnabled && WIN_LoadXInputDLL() < 0) { - s_bXInputEnabled = SDL_FALSE; /* oh well. */ + s_bXInputEnabled = SDL_FALSE; /* oh well. */ } return 0; } -static const char * -GetXInputName(const Uint8 userid, BYTE SubType) +static const char *GetXInputName(const Uint8 userid, BYTE SubType) { static char name[32]; if (SDL_XInputUseOldJoystickMapping()) { - SDL_snprintf(name, sizeof(name), "X360 Controller #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "X360 Controller #%u", 1 + userid); } else { switch (SubType) { case XINPUT_DEVSUBTYPE_GAMEPAD: - SDL_snprintf(name, sizeof(name), "XInput Controller #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput Controller #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_WHEEL: - SDL_snprintf(name, sizeof(name), "XInput Wheel #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput Wheel #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_ARCADE_STICK: - SDL_snprintf(name, sizeof(name), "XInput ArcadeStick #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput ArcadeStick #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_FLIGHT_STICK: - SDL_snprintf(name, sizeof(name), "XInput FlightStick #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput FlightStick #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_DANCE_PAD: - SDL_snprintf(name, sizeof(name), "XInput DancePad #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput DancePad #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_GUITAR: case XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE: case XINPUT_DEVSUBTYPE_GUITAR_BASS: - SDL_snprintf(name, sizeof(name), "XInput Guitar #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput Guitar #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_DRUM_KIT: - SDL_snprintf(name, sizeof(name), "XInput DrumKit #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput DrumKit #%u", 1 + userid); break; case XINPUT_DEVSUBTYPE_ARCADE_PAD: - SDL_snprintf(name, sizeof(name), "XInput ArcadePad #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput ArcadePad #%u", 1 + userid); break; default: - SDL_snprintf(name, sizeof(name), "XInput Device #%u", 1 + userid); + (void)SDL_snprintf(name, sizeof(name), "XInput Device #%u", 1 + userid); break; } } @@ -130,15 +119,14 @@ GetXInputName(const Uint8 userid, BYTE SubType) /* We can't really tell what device is being used for XInput, but we can guess and we'll be correct for the case where only one device is connected. */ -static void -GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) +static void GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) { #if !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* TODO: remove this ifndef __WINRT__ block, but only after integrating with UWP/WinRT's HID API */ PRAWINPUTDEVICELIST devices = NULL; UINT i, j, device_count = 0; if ((GetRawInputDeviceList(NULL, &device_count, sizeof(RAWINPUTDEVICELIST)) == -1) || (!device_count)) { - return; /* oh well. */ + return; /* oh well. */ } devices = (PRAWINPUTDEVICELIST)SDL_malloc(sizeof(RAWINPUTDEVICELIST) * device_count); @@ -148,7 +136,7 @@ GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) if (GetRawInputDeviceList(devices, &device_count, sizeof(RAWINPUTDEVICELIST)) == -1) { SDL_free(devices); - return; /* oh well. */ + return; /* oh well. */ } /* First see if we have a cached entry for this index */ @@ -212,7 +200,7 @@ GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) /* Steam encodes the real device in the path */ int realVID = rdi.hid.dwVendorId; int realPID = rdi.hid.dwProductId; - SDL_sscanf(devName, "\\\\.\\pipe\\HID#VID_045E&PID_028E&IG_00#%x&%x&", &realVID, &realPID); + (void)SDL_sscanf(devName, "\\\\.\\pipe\\HID#VID_045E&PID_028E&IG_00#%x&%x&", &realVID, &realPID); *pVID = (Uint16)realVID; *pPID = (Uint16)realPID; *pVersion = 0; @@ -231,7 +219,7 @@ GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) } } SDL_free(devices); -#endif /* !__WINRT__ */ +#endif /* !__WINRT__ */ /* The device wasn't in the raw HID device list, it's probably Bluetooth */ *pVID = 0x045e; /* Microsoft */ @@ -239,8 +227,7 @@ GuessXInputDevice(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Uint16 *pVersion) *pVersion = 0; } -static void -AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) +static void AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) { Uint16 vendor = 0; Uint16 product = 0; @@ -248,11 +235,27 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) JoyStick_DeviceData *pPrevJoystick = NULL; JoyStick_DeviceData *pNewJoystick = *pContext; - if (SDL_XInputUseOldJoystickMapping() && SubType != XINPUT_DEVSUBTYPE_GAMEPAD) +#ifdef SDL_JOYSTICK_RAWINPUT + if (RAWINPUT_IsEnabled()) { + /* The raw input driver handles more than 4 controllers, so prefer that when available */ + /* We do this check here rather than at the top of SDL_XINPUT_JoystickDetect() because + we need to check XInput state before RAWINPUT gets a hold of the device, otherwise + when a controller is connected via the wireless adapter, it will shut down at the + first subsequent XInput call. This seems like a driver stack bug? + + Reference: https://github.com/libsdl-org/SDL/issues/3468 + */ return; + } +#endif - if (SubType == XINPUT_DEVSUBTYPE_UNKNOWN) + if (SDL_XInputUseOldJoystickMapping() && SubType != XINPUT_DEVSUBTYPE_GAMEPAD) { return; + } + + if (SubType == XINPUT_DEVSUBTYPE_UNKNOWN) { + return; + } while (pNewJoystick) { if (pNewJoystick->bXInputDevice && (pNewJoystick->XInputUserId == userid) && (pNewJoystick->SubType == SubType)) { @@ -265,7 +268,7 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) pNewJoystick->pNext = SYS_Joystick; SYS_Joystick = pNewJoystick; - return; /* already in the list. */ + return; /* already in the list. */ } pPrevJoystick = pNewJoystick; @@ -273,7 +276,7 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) } pNewJoystick = (JoyStick_DeviceData *)SDL_calloc(1, sizeof(JoyStick_DeviceData)); - if (!pNewJoystick) { + if (pNewJoystick == NULL) { return; /* better luck next time? */ } @@ -283,7 +286,7 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) SDL_free(pNewJoystick); return; /* better luck next time? */ } - SDL_snprintf(pNewJoystick->path, sizeof(pNewJoystick->path), "XInput#%d", userid); + (void)SDL_snprintf(pNewJoystick->path, sizeof(pNewJoystick->path), "XInput#%d", userid); if (!SDL_XInputUseOldJoystickMapping()) { GuessXInputDevice(userid, &vendor, &product, &version); @@ -317,8 +320,7 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext) WINDOWS_AddJoystickDevice(pNewJoystick); } -static void -DelXInputDevice(Uint8 userid) +static void DelXInputDevice(Uint8 userid) { if (s_arrXInputDevicePath[userid]) { SDL_free(s_arrXInputDevicePath[userid]); @@ -326,8 +328,7 @@ DelXInputDevice(Uint8 userid) } } -void -SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext) +void SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext) { int iuserid; @@ -359,8 +360,7 @@ SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext) } } -int -SDL_XINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice) +int SDL_XINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice) { const Uint8 userId = joystickdevice->XInputUserId; XINPUT_CAPABILITIES capabilities; @@ -394,8 +394,7 @@ SDL_XINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickde return 0; } -static void -UpdateXInputJoystickBatteryInformation(SDL_Joystick * joystick, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) +static void UpdateXInputJoystickBatteryInformation(SDL_Joystick *joystick, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) { if (pBatteryInformation->BatteryType != BATTERY_TYPE_UNKNOWN) { SDL_JoystickPowerLevel ePowerLevel = SDL_JOYSTICK_POWER_UNKNOWN; @@ -423,8 +422,7 @@ UpdateXInputJoystickBatteryInformation(SDL_Joystick * joystick, XINPUT_BATTERY_I } } -static void -UpdateXInputJoystickState_OLD(SDL_Joystick * joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) +static void UpdateXInputJoystickState_OLD(SDL_Joystick *joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) { static WORD s_XInputButtons[] = { XINPUT_GAMEPAD_DPAD_UP, XINPUT_GAMEPAD_DPAD_DOWN, XINPUT_GAMEPAD_DPAD_LEFT, XINPUT_GAMEPAD_DPAD_RIGHT, @@ -443,15 +441,14 @@ UpdateXInputJoystickState_OLD(SDL_Joystick * joystick, XINPUT_STATE_EX *pXInputS SDL_PrivateJoystickAxis(joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger * 65535 / 255) - 32768)); SDL_PrivateJoystickAxis(joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger * 65535 / 255) - 32768)); - for (button = 0; button < SDL_arraysize(s_XInputButtons); ++button) { + for (button = 0; button < (Uint8)SDL_arraysize(s_XInputButtons); ++button) { SDL_PrivateJoystickButton(joystick, button, (wButtons & s_XInputButtons[button]) ? SDL_PRESSED : SDL_RELEASED); } UpdateXInputJoystickBatteryInformation(joystick, pBatteryInformation); } -static void -UpdateXInputJoystickState(SDL_Joystick * joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) +static void UpdateXInputJoystickState(SDL_Joystick *joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation) { static WORD s_XInputButtons[] = { XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y, @@ -470,7 +467,7 @@ UpdateXInputJoystickState(SDL_Joystick * joystick, XINPUT_STATE_EX *pXInputState SDL_PrivateJoystickAxis(joystick, 4, ~pXInputState->Gamepad.sThumbRY); SDL_PrivateJoystickAxis(joystick, 5, ((int)pXInputState->Gamepad.bRightTrigger * 257) - 32768); - for (button = 0; button < SDL_arraysize(s_XInputButtons); ++button) { + for (button = 0; button < (Uint8)SDL_arraysize(s_XInputButtons); ++button) { SDL_PrivateJoystickButton(joystick, button, (wButtons & s_XInputButtons[button]) ? SDL_PRESSED : SDL_RELEASED); } @@ -491,8 +488,7 @@ UpdateXInputJoystickState(SDL_Joystick * joystick, XINPUT_STATE_EX *pXInputState UpdateXInputJoystickBatteryInformation(joystick, pBatteryInformation); } -int -SDL_XINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { XINPUT_VIBRATION XVibration; @@ -508,21 +504,20 @@ SDL_XINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, return 0; } -Uint32 -SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick * joystick) +Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return SDL_JOYCAP_RUMBLE; } -void -SDL_XINPUT_JoystickUpdate(SDL_Joystick * joystick) +void SDL_XINPUT_JoystickUpdate(SDL_Joystick *joystick) { HRESULT result; XINPUT_STATE_EX XInputState; XINPUT_BATTERY_INFORMATION_EX XBatteryInformation; - if (!XINPUTGETSTATE) + if (!XINPUTGETSTATE) { return; + } result = XINPUTGETSTATE(joystick->hwdata->userid, &XInputState); if (result == ERROR_DEVICE_NOT_CONNECTED) { @@ -550,13 +545,11 @@ SDL_XINPUT_JoystickUpdate(SDL_Joystick * joystick) #endif } -void -SDL_XINPUT_JoystickClose(SDL_Joystick * joystick) +void SDL_XINPUT_JoystickClose(SDL_Joystick *joystick) { } -void -SDL_XINPUT_JoystickQuit(void) +void SDL_XINPUT_JoystickQuit(void) { if (s_bXInputEnabled) { WIN_UnloadXInputDLL(); @@ -577,47 +570,39 @@ SDL_bool SDL_XINPUT_Enabled(void) return SDL_FALSE; } -int -SDL_XINPUT_JoystickInit(void) +int SDL_XINPUT_JoystickInit(void) { return 0; } -void -SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext) +void SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext) { } -int -SDL_XINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice) +int SDL_XINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice) { return SDL_Unsupported(); } -int -SDL_XINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) +int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) { return SDL_Unsupported(); } -Uint32 -SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick * joystick) +Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } -void -SDL_XINPUT_JoystickUpdate(SDL_Joystick * joystick) +void SDL_XINPUT_JoystickUpdate(SDL_Joystick *joystick) { } -void -SDL_XINPUT_JoystickClose(SDL_Joystick * joystick) +void SDL_XINPUT_JoystickClose(SDL_Joystick *joystick) { } -void -SDL_XINPUT_JoystickQuit(void) +void SDL_XINPUT_JoystickQuit(void) { } diff --git a/modules/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h b/modules/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h index ab2eb5d..05950fd 100644 --- a/modules/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h +++ b/modules/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h @@ -30,11 +30,11 @@ extern "C" { extern SDL_bool SDL_XINPUT_Enabled(void); extern int SDL_XINPUT_JoystickInit(void); extern void SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext); -extern int SDL_XINPUT_JoystickOpen(SDL_Joystick * joystick, JoyStick_DeviceData *joystickdevice); -extern int SDL_XINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); -extern Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick * joystick); -extern void SDL_XINPUT_JoystickUpdate(SDL_Joystick * joystick); -extern void SDL_XINPUT_JoystickClose(SDL_Joystick * joystick); +extern int SDL_XINPUT_JoystickOpen(SDL_Joystick *joystick, JoyStick_DeviceData *joystickdevice); +extern int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); +extern Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick); +extern void SDL_XINPUT_JoystickUpdate(SDL_Joystick *joystick); +extern void SDL_XINPUT_JoystickClose(SDL_Joystick *joystick); extern void SDL_XINPUT_JoystickQuit(void); /* Ends C function definitions when using C++ */ diff --git a/modules/SDL2/src/loadso/dlopen/SDL_sysloadso.c b/modules/SDL2/src/loadso/dlopen/SDL_sysloadso.c index 796b606..7e80cbf 100644 --- a/modules/SDL2/src/loadso/dlopen/SDL_sysloadso.c +++ b/modules/SDL2/src/loadso/dlopen/SDL_sysloadso.c @@ -34,8 +34,7 @@ #include "../../video/uikit/SDL_uikitvideo.h" #endif -void * -SDL_LoadObject(const char *sofile) +void *SDL_LoadObject(const char *sofile) { void *handle; const char *loaderror; @@ -47,16 +46,15 @@ SDL_LoadObject(const char *sofile) } #endif - handle = dlopen(sofile, RTLD_NOW|RTLD_LOCAL); + handle = dlopen(sofile, RTLD_NOW | RTLD_LOCAL); loaderror = dlerror(); if (handle == NULL) { SDL_SetError("Failed loading %s: %s", sofile, loaderror); } - return (handle); + return handle; } -void * -SDL_LoadFunction(void *handle, const char *name) +void *SDL_LoadFunction(void *handle, const char *name) { void *symbol = dlsym(handle, name); if (symbol == NULL) { @@ -70,14 +68,13 @@ SDL_LoadFunction(void *handle, const char *name) SDL_small_free(_name, isstack); if (symbol == NULL) { SDL_SetError("Failed loading %s: %s", name, - (const char *) dlerror()); + (const char *)dlerror()); } } - return (symbol); + return symbol; } -void -SDL_UnloadObject(void *handle) +void SDL_UnloadObject(void *handle) { if (handle != NULL) { dlclose(handle); diff --git a/modules/SDL2/src/loadso/dummy/SDL_sysloadso.c b/modules/SDL2/src/loadso/dummy/SDL_sysloadso.c index d05994d..e9c2e28 100644 --- a/modules/SDL2/src/loadso/dummy/SDL_sysloadso.c +++ b/modules/SDL2/src/loadso/dummy/SDL_sysloadso.c @@ -27,24 +27,21 @@ #include "SDL_loadso.h" -void * -SDL_LoadObject(const char *sofile) +void *SDL_LoadObject(const char *sofile) { const char *loaderror = "SDL_LoadObject() not implemented"; SDL_SetError("Failed loading %s: %s", sofile, loaderror); - return (NULL); + return NULL; } -void * -SDL_LoadFunction(void *handle, const char *name) +void *SDL_LoadFunction(void *handle, const char *name) { const char *loaderror = "SDL_LoadFunction() not implemented"; SDL_SetError("Failed loading %s: %s", name, loaderror); - return (NULL); + return NULL; } -void -SDL_UnloadObject(void *handle) +void SDL_UnloadObject(void *handle) { /* no-op. */ } diff --git a/modules/SDL2/src/loadso/os2/SDL_sysloadso.c b/modules/SDL2/src/loadso/os2/SDL_sysloadso.c index 56c1271..c5c8b3b 100644 --- a/modules/SDL2/src/loadso/os2/SDL_sysloadso.c +++ b/modules/SDL2/src/loadso/os2/SDL_sysloadso.c @@ -32,8 +32,7 @@ #define INCL_DOSERRORS #include -void * -SDL_LoadObject(const char *sofile) +void *SDL_LoadObject(const char *sofile) { ULONG ulRC; HMODULE hModule; @@ -65,8 +64,7 @@ SDL_LoadObject(const char *sofile) return (void *)hModule; } -void * -SDL_LoadFunction(void *handle, const char *name) +void *SDL_LoadFunction(void *handle, const char *name) { ULONG ulRC; PFN pFN; @@ -90,8 +88,7 @@ SDL_LoadFunction(void *handle, const char *name) return (void *)pFN; } -void -SDL_UnloadObject(void *handle) +void SDL_UnloadObject(void *handle) { if (handle != NULL) { DosFreeModule((HMODULE)handle); diff --git a/modules/SDL2/src/loadso/windows/SDL_sysloadso.c b/modules/SDL2/src/loadso/windows/SDL_sysloadso.c index 5e66393..ca43370 100644 --- a/modules/SDL2/src/loadso/windows/SDL_sysloadso.c +++ b/modules/SDL2/src/loadso/windows/SDL_sysloadso.c @@ -29,13 +29,12 @@ #include "SDL_loadso.h" -void * -SDL_LoadObject(const char *sofile) +void *SDL_LoadObject(const char *sofile) { void *handle; LPTSTR tstr; - if (!sofile) { + if (sofile == NULL) { SDL_InvalidParamError("sofile"); return NULL; } @@ -45,9 +44,9 @@ SDL_LoadObject(const char *sofile) files. LoadLibrary() is a private API, and not available for apps (that can be published to MS' Windows Store.) */ - handle = (void *) LoadPackagedLibrary(tstr, 0); + handle = (void *)LoadPackagedLibrary(tstr, 0); #else - handle = (void *) LoadLibrary(tstr); + handle = (void *)LoadLibrary(tstr); #endif SDL_free(tstr); @@ -61,10 +60,9 @@ SDL_LoadObject(const char *sofile) return handle; } -void * -SDL_LoadFunction(void *handle, const char *name) +void *SDL_LoadFunction(void *handle, const char *name) { - void *symbol = (void *) GetProcAddress((HMODULE) handle, name); + void *symbol = (void *)GetProcAddress((HMODULE)handle, name); if (symbol == NULL) { char errbuf[512]; SDL_strlcpy(errbuf, "Failed loading ", SDL_arraysize(errbuf)); @@ -74,11 +72,10 @@ SDL_LoadFunction(void *handle, const char *name) return symbol; } -void -SDL_UnloadObject(void *handle) +void SDL_UnloadObject(void *handle) { if (handle != NULL) { - FreeLibrary((HMODULE) handle); + FreeLibrary((HMODULE)handle); } } diff --git a/modules/SDL2/src/locale/SDL_locale.c b/modules/SDL2/src/locale/SDL_locale.c index 790ab8c..0c8f611 100644 --- a/modules/SDL2/src/locale/SDL_locale.c +++ b/modules/SDL2/src/locale/SDL_locale.c @@ -23,18 +23,17 @@ #include "SDL_syslocale.h" #include "SDL_hints.h" -static SDL_Locale * -build_locales_from_csv_string(char *csv) +static SDL_Locale *build_locales_from_csv_string(char *csv) { - size_t num_locales = 1; /* at least one */ + size_t num_locales = 1; /* at least one */ size_t slen; size_t alloclen; char *ptr; SDL_Locale *loc; SDL_Locale *retval; - if (!csv || !csv[0]) { - return NULL; /* nothing to report */ + if (csv == NULL || !csv[0]) { + return NULL; /* nothing to report */ } for (ptr = csv; *ptr; ptr++) { @@ -43,21 +42,24 @@ build_locales_from_csv_string(char *csv) } } - num_locales++; /* one more for terminator */ + num_locales++; /* one more for terminator */ - slen = ((size_t) (ptr - csv)) + 1; /* SDL_strlen(csv) + 1 */ - alloclen = slen + (num_locales * sizeof (SDL_Locale)); + slen = ((size_t)(ptr - csv)) + 1; /* SDL_strlen(csv) + 1 */ + alloclen = slen + (num_locales * sizeof(SDL_Locale)); - loc = retval = (SDL_Locale *) SDL_calloc(1, alloclen); - if (!retval) { + loc = retval = (SDL_Locale *)SDL_calloc(1, alloclen); + if (retval == NULL) { SDL_OutOfMemory(); - return NULL; /* oh well */ + return NULL; /* oh well */ } - ptr = (char *) (retval + num_locales); + ptr = (char *)(retval + num_locales); SDL_strlcpy(ptr, csv, slen); - while (SDL_TRUE) { /* parse out the string */ - while (*ptr == ' ') ptr++; /* skip whitespace. */ + while (SDL_TRUE) { /* parse out the string */ + while (*ptr == ' ') { + ptr++; /* skip whitespace. */ + } + if (*ptr == '\0') { break; } @@ -68,7 +70,7 @@ build_locales_from_csv_string(char *csv) *(ptr++) = '\0'; loc->country = ptr; } else if (ch == ' ') { - *(ptr++) = '\0'; /* trim ending whitespace and keep going. */ + *(ptr++) = '\0'; /* trim ending whitespace and keep going. */ } else if (ch == ',') { *(ptr++) = '\0'; loc++; @@ -77,7 +79,7 @@ build_locales_from_csv_string(char *csv) loc++; break; } else { - ptr++; /* just keep going, still a valid string */ + ptr++; /* just keep going, still a valid string */ } } } @@ -85,19 +87,17 @@ build_locales_from_csv_string(char *csv) return retval; } -SDL_Locale * -SDL_GetPreferredLocales(void) +SDL_Locale *SDL_GetPreferredLocales(void) { - char locbuf[128]; /* enough for 21 "xx_YY," language strings. */ + char locbuf[128]; /* enough for 21 "xx_YY," language strings. */ const char *hint = SDL_GetHint(SDL_HINT_PREFERRED_LOCALES); if (hint) { - SDL_strlcpy(locbuf, hint, sizeof (locbuf)); + SDL_strlcpy(locbuf, hint, sizeof(locbuf)); } else { SDL_zeroa(locbuf); - SDL_SYS_GetPreferredLocales(locbuf, sizeof (locbuf)); + SDL_SYS_GetPreferredLocales(locbuf, sizeof(locbuf)); } return build_locales_from_csv_string(locbuf); } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/android/SDL_syslocale.c b/modules/SDL2/src/locale/android/SDL_syslocale.c index 2b990e8..d8c6ebf 100644 --- a/modules/SDL2/src/locale/android/SDL_syslocale.c +++ b/modules/SDL2/src/locale/android/SDL_syslocale.c @@ -23,11 +23,9 @@ #include "../SDL_syslocale.h" #include "../../core/android/SDL_android.h" -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { Android_JNI_GetLocale(buf, buflen); } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/dummy/SDL_syslocale.c b/modules/SDL2/src/locale/dummy/SDL_syslocale.c index a59f040..f5cf9da 100644 --- a/modules/SDL2/src/locale/dummy/SDL_syslocale.c +++ b/modules/SDL2/src/locale/dummy/SDL_syslocale.c @@ -22,12 +22,10 @@ #include "../../SDL_internal.h" #include "../SDL_syslocale.h" -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { /* dummy implementation. Caller already zero'd out buffer. */ SDL_Unsupported(); } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/emscripten/SDL_syslocale.c b/modules/SDL2/src/locale/emscripten/SDL_syslocale.c index 4c3d0b9..dee403c 100644 --- a/modules/SDL2/src/locale/emscripten/SDL_syslocale.c +++ b/modules/SDL2/src/locale/emscripten/SDL_syslocale.c @@ -24,9 +24,9 @@ #include "../../SDL_internal.h" #include "../SDL_syslocale.h" -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { + /* *INDENT-OFF* */ /* clang-format off */ EM_ASM({ var buf = $0; var buflen = $1; @@ -66,7 +66,7 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) setValue(buf + i, str.charCodeAt(i), "i8"); /* fill in C array. */ } }, buf, buflen); + /* *INDENT-ON* */ /* clang-format on */ } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/haiku/SDL_syslocale.cc b/modules/SDL2/src/locale/haiku/SDL_syslocale.cc index 6dc4ad2..70af4df 100644 --- a/modules/SDL2/src/locale/haiku/SDL_syslocale.cc +++ b/modules/SDL2/src/locale/haiku/SDL_syslocale.cc @@ -26,8 +26,7 @@ #include "../../SDL_internal.h" #include "../SDL_syslocale.h" -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { BLocaleRoster *roster = BLocaleRoster::Default(); roster->Refresh(); diff --git a/modules/SDL2/src/locale/macosx/SDL_syslocale.m b/modules/SDL2/src/locale/macosx/SDL_syslocale.m index f2afbfa..3a0e5db 100644 --- a/modules/SDL2/src/locale/macosx/SDL_syslocale.m +++ b/modules/SDL2/src/locale/macosx/SDL_syslocale.m @@ -24,53 +24,54 @@ #import -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) -{ @autoreleasepool { - NSArray *languages = NSLocale.preferredLanguages; - size_t numlangs = 0; - size_t i; - - numlangs = (size_t) [languages count]; - - for (i = 0; i < numlangs; i++) { - NSString *nsstr = [languages objectAtIndex:i]; - size_t len; - char *ptr; - - if (nsstr == nil) { - break; - } +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +{ + @autoreleasepool { + NSArray *languages = NSLocale.preferredLanguages; + size_t numlangs = 0; + size_t i; + + numlangs = (size_t)[languages count]; + + for (i = 0; i < numlangs; i++) { + NSString *nsstr = [languages objectAtIndex:i]; + size_t len; + char *ptr; + + if (nsstr == nil) { + break; + } - [nsstr getCString:buf maxLength:buflen encoding:NSASCIIStringEncoding]; - len = SDL_strlen(buf); + [nsstr getCString:buf maxLength:buflen encoding:NSASCIIStringEncoding]; + len = SDL_strlen(buf); - // convert '-' to '_'... - // These are always full lang-COUNTRY, so we search from the back, - // so things like zh-Hant-CN find the right '-' to convert. - if ((ptr = SDL_strrchr(buf, '-')) != NULL) { - *ptr = '_'; - } - - if (buflen <= len) { - *buf = '\0'; // drop this one and stop, we can't fit anymore. - break; - } + // convert '-' to '_'... + // These are always full lang-COUNTRY, so we search from the back, + // so things like zh-Hant-CN find the right '-' to convert. + ptr = SDL_strrchr(buf, '-'); + if (ptr != NULL) { + *ptr = '_'; + } - buf += len; - buflen -= len; + if (buflen <= len) { + *buf = '\0'; // drop this one and stop, we can't fit anymore. + break; + } - if (i < (numlangs - 1)) { - if (buflen <= 1) { - break; // out of room, stop looking. + buf += len; + buflen -= len; + + if (i < (numlangs - 1)) { + if (buflen <= 1) { + break; // out of room, stop looking. + } + buf[0] = ','; // add a comma between entries. + buf[1] = '\0'; + buf++; + buflen--; } - buf[0] = ','; // add a comma between entries. - buf[1] = '\0'; - buf++; - buflen--; } } -}} +} /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/n3ds/SDL_syslocale.c b/modules/SDL2/src/locale/n3ds/SDL_syslocale.c index 194a6b7..fcc01fd 100644 --- a/modules/SDL2/src/locale/n3ds/SDL_syslocale.c +++ b/modules/SDL2/src/locale/n3ds/SDL_syslocale.c @@ -29,8 +29,7 @@ SDL_FORCE_INLINE u8 GetLocaleIndex(void); -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { /* The 3DS only supports these 12 languages, only one can be active at a time */ static const char AVAILABLE_LOCALES[][6] = { "ja_JP", "en_US", "fr_FR", "de_DE", diff --git a/modules/SDL2/src/locale/unix/SDL_syslocale.c b/modules/SDL2/src/locale/unix/SDL_syslocale.c index b4c36d1..2b9f877 100644 --- a/modules/SDL2/src/locale/unix/SDL_syslocale.c +++ b/modules/SDL2/src/locale/unix/SDL_syslocale.c @@ -22,17 +22,16 @@ #include "../../SDL_internal.h" #include "../SDL_syslocale.h" -static void -normalize_locale_str(char *dst, char *str, size_t buflen) +static void normalize_locale_str(char *dst, char *str, size_t buflen) { char *ptr; - ptr = SDL_strchr(str, '.'); /* chop off encoding if specified. */ + ptr = SDL_strchr(str, '.'); /* chop off encoding if specified. */ if (ptr != NULL) { *ptr = '\0'; } - ptr = SDL_strchr(str, '@'); /* chop off extra bits if specified. */ + ptr = SDL_strchr(str, '@'); /* chop off extra bits if specified. */ if (ptr != NULL) { *ptr = '\0'; } @@ -44,14 +43,13 @@ normalize_locale_str(char *dst, char *str, size_t buflen) if (*str) { if (*dst) { - SDL_strlcat(dst, ",", buflen); /* SDL has these split by commas */ + SDL_strlcat(dst, ",", buflen); /* SDL has these split by commas */ } SDL_strlcat(dst, str, buflen); } } -static void -normalize_locales(char *dst, char *src, size_t buflen) +static void normalize_locales(char *dst, char *src, size_t buflen) { char *ptr; @@ -64,8 +62,7 @@ normalize_locales(char *dst, char *src, size_t buflen) normalize_locale_str(dst, src, buflen); } -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { /* !!! FIXME: should we be using setlocale()? Or some D-Bus thing? */ SDL_bool isstack; @@ -74,7 +71,7 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) SDL_assert(buflen > 0); tmp = SDL_small_alloc(char, buflen, &isstack); - if (!tmp) { + if (tmp == NULL) { SDL_OutOfMemory(); return; } @@ -106,4 +103,3 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/vita/SDL_syslocale.c b/modules/SDL2/src/locale/vita/SDL_syslocale.c index ef931e0..d0d91e0 100644 --- a/modules/SDL2/src/locale/vita/SDL_syslocale.c +++ b/modules/SDL2/src/locale/vita/SDL_syslocale.c @@ -25,8 +25,7 @@ #include #include -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { const char *vita_locales[] = { "ja_JP", @@ -59,8 +58,9 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) sceAppUtilInit(&initParam, &bootParam); sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &language); - if (language < 0 || language > SCE_SYSTEM_PARAM_LANG_TURKISH) + if (language < 0 || language > SCE_SYSTEM_PARAM_LANG_TURKISH) { language = SCE_SYSTEM_PARAM_LANG_ENGLISH_US; // default to english + } SDL_strlcpy(buf, vita_locales[language], buflen); @@ -68,4 +68,3 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/windows/SDL_syslocale.c b/modules/SDL2/src/locale/windows/SDL_syslocale.c index 48b4d3b..169df91 100644 --- a/modules/SDL2/src/locale/windows/SDL_syslocale.c +++ b/modules/SDL2/src/locale/windows/SDL_syslocale.c @@ -23,7 +23,7 @@ #include "../../core/windows/SDL_windows.h" #include "../SDL_syslocale.h" -typedef BOOL (WINAPI *pfnGetUserPreferredUILanguages)(DWORD,PULONG,WCHAR*,PULONG); +typedef BOOL(WINAPI *pfnGetUserPreferredUILanguages)(DWORD, PULONG, WCHAR *, PULONG); #ifndef MUI_LANGUAGE_NAME #define MUI_LANGUAGE_NAME 0x8 #endif @@ -31,33 +31,30 @@ typedef BOOL (WINAPI *pfnGetUserPreferredUILanguages)(DWORD,PULONG,WCHAR*,PULONG static pfnGetUserPreferredUILanguages pGetUserPreferredUILanguages = NULL; static HMODULE kernel32 = 0; - /* this is the fallback for WinXP...one language, not a list. */ -static void -SDL_SYS_GetPreferredLocales_winxp(char *buf, size_t buflen) +static void SDL_SYS_GetPreferredLocales_winxp(char *buf, size_t buflen) { char lang[16]; char country[16]; const int langrc = GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, - lang, sizeof (lang)); + lang, sizeof(lang)); - const int ctryrc = GetLocaleInfoA(LOCALE_USER_DEFAULT, - LOCALE_SISO3166CTRYNAME, - country, sizeof (country)); + const int ctryrc = GetLocaleInfoA(LOCALE_USER_DEFAULT, + LOCALE_SISO3166CTRYNAME, + country, sizeof(country)); /* Win95 systems will fail, because they don't have LOCALE_SISO*NAME ... */ if (langrc == 0) { SDL_SetError("Couldn't obtain language info"); } else { - SDL_snprintf(buf, buflen, "%s%s%s", lang, ctryrc ? "_" : "", ctryrc ? country : ""); + (void)SDL_snprintf(buf, buflen, "%s%s%s", lang, ctryrc ? "_" : "", ctryrc ? country : ""); } } /* this works on Windows Vista and later. */ -static void -SDL_SYS_GetPreferredLocales_vista(char *buf, size_t buflen) +static void SDL_SYS_GetPreferredLocales_vista(char *buf, size_t buflen) { ULONG numlangs = 0; WCHAR *wbuf = NULL; @@ -68,50 +65,48 @@ SDL_SYS_GetPreferredLocales_vista(char *buf, size_t buflen) pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numlangs, NULL, &wbuflen); wbuf = SDL_small_alloc(WCHAR, wbuflen, &isstack); - if (!wbuf) { + if (wbuf == NULL) { SDL_OutOfMemory(); return; } if (!pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numlangs, wbuf, &wbuflen)) { - SDL_SYS_GetPreferredLocales_winxp(buf, buflen); /* oh well, try the fallback. */ + SDL_SYS_GetPreferredLocales_winxp(buf, buflen); /* oh well, try the fallback. */ } else { - const ULONG endidx = (ULONG) SDL_min(buflen, wbuflen - 1); + const ULONG endidx = (ULONG)SDL_min(buflen, wbuflen - 1); ULONG str_start = 0; ULONG i; for (i = 0; i < endidx; i++) { - const char ch = (char) wbuf[i]; /* these should all be low-ASCII, safe to cast */ + const char ch = (char)wbuf[i]; /* these should all be low-ASCII, safe to cast */ if (ch == '\0') { - buf[i] = ','; /* change null separators to commas */ + buf[i] = ','; /* change null separators to commas */ str_start = i; } else if (ch == '-') { - buf[i] = '_'; /* change '-' to '_' */ + buf[i] = '_'; /* change '-' to '_' */ } else { - buf[i] = ch; /* copy through as-is. */ + buf[i] = ch; /* copy through as-is. */ } } - buf[str_start] = '\0'; /* terminate string, chop off final ',' */ + buf[str_start] = '\0'; /* terminate string, chop off final ',' */ } SDL_small_free(wbuf, isstack); } -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { if (!kernel32) { kernel32 = GetModuleHandle(TEXT("kernel32.dll")); if (kernel32) { - pGetUserPreferredUILanguages = (pfnGetUserPreferredUILanguages) GetProcAddress(kernel32, "GetUserPreferredUILanguages"); + pGetUserPreferredUILanguages = (pfnGetUserPreferredUILanguages)GetProcAddress(kernel32, "GetUserPreferredUILanguages"); } } if (pGetUserPreferredUILanguages == NULL) { - SDL_SYS_GetPreferredLocales_winxp(buf, buflen); /* this is always available */ + SDL_SYS_GetPreferredLocales_winxp(buf, buflen); /* this is always available */ } else { - SDL_SYS_GetPreferredLocales_vista(buf, buflen); /* available on Vista and later. */ + SDL_SYS_GetPreferredLocales_vista(buf, buflen); /* available on Vista and later. */ } } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/locale/winrt/SDL_syslocale.c b/modules/SDL2/src/locale/winrt/SDL_syslocale.c index 6e37910..3995f9a 100644 --- a/modules/SDL2/src/locale/winrt/SDL_syslocale.c +++ b/modules/SDL2/src/locale/winrt/SDL_syslocale.c @@ -27,32 +27,29 @@ /*using namespace Windows::Graphics::Display;*/ #include -void -SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) +void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) { WCHAR wbuffer[128] = L""; int ret = 0; /* !!! FIXME: do we not have GetUserPreferredUILanguages on WinPhone or UWP? */ -# if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP ret = GetLocaleInfoEx(LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_SNAME, wbuffer, SDL_arraysize(wbuffer)); -# else +#else ret = GetSystemDefaultLocaleName(wbuffer, SDL_arraysize(wbuffer)); -# endif +#endif - if (ret > 0) - { + if (ret > 0) { /* Need to convert LPWSTR to LPSTR, that is wide char to char. */ int i; - if ( ((size_t) ret) >= (buflen - 1) ) { - ret = (int) (buflen - 1); + if (((size_t)ret) >= (buflen - 1)) { + ret = (int)(buflen - 1); } for (i = 0; i < ret; i++) { - buf[i] = (char) wbuffer[i]; /* assume this was ASCII anyhow. */ + buf[i] = (char)wbuffer[i]; /* assume this was ASCII anyhow. */ } } } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/main/dummy/SDL_dummy_main.c b/modules/SDL2/src/main/dummy/SDL_dummy_main.c index b78d8db..097b210 100644 --- a/modules/SDL2/src/main/dummy/SDL_dummy_main.c +++ b/modules/SDL2/src/main/dummy/SDL_dummy_main.c @@ -8,15 +8,13 @@ #ifdef main #undef main -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { - return (SDL_main(argc, argv)); + return SDL_main(argc, argv); } #else /* Nothing to do on this platform */ -int -SDL_main_stub_symbol(void) +int SDL_main_stub_symbol(void) { return 0; } diff --git a/modules/SDL2/src/main/gdk/SDL_gdk_main.c b/modules/SDL2/src/main/gdk/SDL_gdk_main.c index 42ceaac..a38afa4 100644 --- a/modules/SDL2/src/main/gdk/SDL_gdk_main.c +++ b/modules/SDL2/src/main/gdk/SDL_gdk_main.c @@ -28,7 +28,7 @@ #include "SDL_main.h" #ifdef main -# undef main +#undef main #endif /* main */ /* This is where execution begins */ diff --git a/modules/SDL2/src/main/haiku/SDL_BApp.h b/modules/SDL2/src/main/haiku/SDL_BApp.h index 868b4ed..0368081 100644 --- a/modules/SDL2/src/main/haiku/SDL_BApp.h +++ b/modules/SDL2/src/main/haiku/SDL_BApp.h @@ -30,7 +30,6 @@ #include "../../video/haiku/SDL_bkeyboard.h" - #ifdef __cplusplus extern "C" { #endif @@ -49,28 +48,27 @@ extern "C" { #include - - - /* Forward declarations */ +class SDL_BLooper; class SDL_BWin; /* Message constants */ -enum ToSDL { +enum ToSDL +{ /* Intercepted by BWindow on its way to BView */ BAPP_MOUSE_MOVED, BAPP_MOUSE_BUTTON, BAPP_MOUSE_WHEEL, BAPP_KEY, - BAPP_REPAINT, /* from _UPDATE_ */ + BAPP_REPAINT, /* from _UPDATE_ */ /* From BWindow */ - BAPP_MAXIMIZE, /* from B_ZOOM */ + BAPP_MAXIMIZE, /* from B_ZOOM */ BAPP_MINIMIZE, - BAPP_RESTORE, /* TODO: IMPLEMENT! */ + BAPP_RESTORE, /* TODO: IMPLEMENT! */ BAPP_SHOW, BAPP_HIDE, - BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ - BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ + BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ + BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ BAPP_WINDOW_CLOSE_REQUESTED, BAPP_WINDOW_MOVED, BAPP_WINDOW_RESIZED, @@ -78,36 +76,29 @@ enum ToSDL { }; +extern "C" SDL_BLooper *SDL_Looper; + -/* Create a descendant of BApplication */ -class SDL_BApp : public BApplication { -public: - SDL_BApp(const char* signature) : - BApplication(signature) { +/* Create a descendant of BLooper */ +class SDL_BLooper : public BLooper +{ + public: + SDL_BLooper(const char* name) : BLooper(name) + { #if SDL_VIDEO_OPENGL _current_context = NULL; #endif } - - virtual ~SDL_BApp() { + virtual ~SDL_BLooper() + { } - - virtual void RefsReceived(BMessage* message) { - char filePath[512]; - entry_ref entryRef; - for (int32 i = 0; message->FindRef("refs", i, &entryRef) == B_OK; i++) { - BPath referencePath = BPath(&entryRef); - SDL_SendDropFile(NULL, referencePath.Path()); - } - return; - } - - /* Event-handling functions */ - virtual void MessageReceived(BMessage* message) { + /* Event-handling functions */ + virtual void MessageReceived(BMessage *message) + { /* Sort out SDL-related messages */ - switch ( message->what ) { + switch (message->what) { case BAPP_MOUSE_MOVED: _HandleMouseMove(message); break; @@ -173,23 +164,24 @@ public: break; default: - BApplication::MessageReceived(message); - break; + BLooper::MessageReceived(message); + break; } } /* Window creation/destruction methods */ - int32 GetID(SDL_Window *win) { + int32 GetID(SDL_Window *win) + { int32 i; - for(i = 0; i < _GetNumWindowSlots(); ++i) { - if( GetSDLWindow(i) == NULL ) { + for (i = 0; i < _GetNumWindowSlots(); ++i) { + if (GetSDLWindow(i) == NULL) { _SetSDLWindow(win, i); return i; } } /* Expand the vector if all slots are full */ - if( i == _GetNumWindowSlots() ) { + if (i == _GetNumWindowSlots()) { _PushBackWindow(win); return i; } @@ -202,18 +194,20 @@ public: there another way to do this? */ void ClearID(SDL_BWin *bwin); /* Defined in SDL_BeApp.cc */ - - SDL_Window *GetSDLWindow(int32 winID) { + SDL_Window *GetSDLWindow(int32 winID) + { return _window_map[winID]; } #if SDL_VIDEO_OPENGL - BGLView *GetCurrentContext() { + BGLView *GetCurrentContext() + { return _current_context; } - - void SetCurrentContext(BGLView *newContext) { - if(_current_context) + + void SetCurrentContext(BGLView *newContext) + { + if (_current_context) _current_context->UnlockGL(); _current_context = newContext; if (_current_context) @@ -221,25 +215,26 @@ public: } #endif -private: + private: /* Event management */ - void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) { + void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) + { SDL_Window *win; int32 winID; - if( - !_GetWinID(msg, &winID) - ) { + if ( + !_GetWinID(msg, &winID)) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, sdlEventType, 0, 0); } - void _HandleMouseMove(BMessage *msg) { + void _HandleMouseMove(BMessage *msg) + { SDL_Window *win; int32 winID; int32 x = 0, y = 0; - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("x", &x) != B_OK || /* x movement */ msg->FindInt32("y", &y) != B_OK /* y movement */ @@ -266,47 +261,47 @@ private: } } - void _HandleMouseButton(BMessage *msg) { + void _HandleMouseButton(BMessage *msg) + { SDL_Window *win; int32 winID; - int32 button, state; /* left/middle/right, pressed/released */ - if( + int32 button, state; /* left/middle/right, pressed/released */ + if ( !_GetWinID(msg, &winID) || msg->FindInt32("button-id", &button) != B_OK || - msg->FindInt32("button-state", &state) != B_OK - ) { + msg->FindInt32("button-state", &state) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendMouseButton(win, 0, state, button); } - void _HandleMouseWheel(BMessage *msg) { + void _HandleMouseWheel(BMessage *msg) + { SDL_Window *win; int32 winID; int32 xTicks, yTicks; - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("xticks", &xTicks) != B_OK || - msg->FindInt32("yticks", &yTicks) != B_OK - ) { + msg->FindInt32("yticks", &yTicks) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendMouseWheel(win, 0, xTicks, -yTicks, SDL_MOUSEWHEEL_NORMAL); } - void _HandleKey(BMessage *msg) { - int32 scancode, state; /* scancode, pressed/released */ - if( + void _HandleKey(BMessage *msg) + { + int32 scancode, state; /* scancode, pressed/released */ + if ( msg->FindInt32("key-state", &state) != B_OK || - msg->FindInt32("key-scancode", &scancode) != B_OK - ) { + msg->FindInt32("key-scancode", &scancode) != B_OK) { return; } /* Make sure this isn't a repeated event (key pressed and held) */ - if(state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) { + if (state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) { return; } HAIKU_SetKeyState(scancode, state); @@ -315,7 +310,7 @@ private: if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { const int8 *keyUtf8; ssize_t count; - if (msg->FindData("key-utf8", B_INT8_TYPE, (const void**)&keyUtf8, &count) == B_OK) { + if (msg->FindData("key-utf8", B_INT8_TYPE, (const void **)&keyUtf8, &count) == B_OK) { char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; SDL_zeroa(text); SDL_memcpy(text, keyUtf8, count); @@ -324,107 +319,108 @@ private: } } - void _HandleMouseFocus(BMessage *msg) { + void _HandleMouseFocus(BMessage *msg) + { SDL_Window *win; int32 winID; bool bSetFocus; /* If false, lose focus */ - if( + if ( !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { + msg->FindBool("focusGained", &bSetFocus) != B_OK) { return; } win = GetSDLWindow(winID); - if(bSetFocus) { + if (bSetFocus) { SDL_SetMouseFocus(win); - } else if(SDL_GetMouseFocus() == win) { + } else if (SDL_GetMouseFocus() == win) { /* Only lose all focus if this window was the current focus */ SDL_SetMouseFocus(NULL); } } - void _HandleKeyboardFocus(BMessage *msg) { + void _HandleKeyboardFocus(BMessage *msg) + { SDL_Window *win; int32 winID; bool bSetFocus; /* If false, lose focus */ - if( + if ( !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { + msg->FindBool("focusGained", &bSetFocus) != B_OK) { return; } win = GetSDLWindow(winID); - if(bSetFocus) { + if (bSetFocus) { SDL_SetKeyboardFocus(win); - } else if(SDL_GetKeyboardFocus() == win) { + } else if (SDL_GetKeyboardFocus() == win) { /* Only lose all focus if this window was the current focus */ SDL_SetKeyboardFocus(NULL); } } - void _HandleWindowMoved(BMessage *msg) { + void _HandleWindowMoved(BMessage *msg) + { SDL_Window *win; int32 winID; int32 xPos, yPos; /* Get the window id and new x/y position of the window */ - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("window-x", &xPos) != B_OK || - msg->FindInt32("window-y", &yPos) != B_OK - ) { + msg->FindInt32("window-y", &yPos) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, SDL_WINDOWEVENT_MOVED, xPos, yPos); } - void _HandleWindowResized(BMessage *msg) { + void _HandleWindowResized(BMessage *msg) + { SDL_Window *win; int32 winID; int32 w, h; /* Get the window id ]and new x/y position of the window */ - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("window-w", &w) != B_OK || - msg->FindInt32("window-h", &h) != B_OK - ) { + msg->FindInt32("window-h", &h) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, SDL_WINDOWEVENT_RESIZED, w, h); } - bool _GetWinID(BMessage *msg, int32 *winID) { + bool _GetWinID(BMessage *msg, int32 *winID) + { return msg->FindInt32("window-id", winID) == B_OK; } - - /* Vector functions: Wraps vector stuff in case we need to change implementation */ - void _SetSDLWindow(SDL_Window *win, int32 winID) { + void _SetSDLWindow(SDL_Window *win, int32 winID) + { _window_map[winID] = win; } - int32 _GetNumWindowSlots() { + int32 _GetNumWindowSlots() + { return _window_map.size(); } - - void _PopBackWindow() { + void _PopBackWindow() + { _window_map.pop_back(); } - void _PushBackWindow(SDL_Window *win) { + void _PushBackWindow(SDL_Window *win) + { _window_map.push_back(win); } - /* Members */ - std::vector _window_map; /* Keeps track of SDL_Windows by index-id */ + std::vector _window_map; /* Keeps track of SDL_Windows by index-id */ #if SDL_VIDEO_OPENGL - BGLView *_current_context; + BGLView *_current_context; #endif }; diff --git a/modules/SDL2/src/main/haiku/SDL_BeApp.cc b/modules/SDL2/src/main/haiku/SDL_BeApp.cc index 9acbc54..63af36b 100644 --- a/modules/SDL2/src/main/haiku/SDL_BeApp.cc +++ b/modules/SDL2/src/main/haiku/SDL_BeApp.cc @@ -31,7 +31,7 @@ #include #include -#include "SDL_BApp.h" /* SDL_BApp class definition */ +#include "SDL_BApp.h" /* SDL_BLooper class definition */ #include "SDL_BeApp.h" #include "SDL_timer.h" #include "SDL_error.h" @@ -44,15 +44,40 @@ extern "C" { #include "../../thread/SDL_systhread.h" -/* Flag to tell whether or not the Be application is active or not */ +/* Flag to tell whether or not the Be application and looper are active or not */ static int SDL_BeAppActive = 0; static SDL_Thread *SDL_AppThread = NULL; +SDL_BLooper *SDL_Looper = NULL; + /* Default application signature */ -const char *signature = "application/x-SDL-executable"; +const char *SDL_signature = "application/x-SDL-executable"; + + +/* Create a descendant of BApplication */ +class SDL_BApp : public BApplication { +public: + SDL_BApp(const char* signature) : + BApplication(signature) { + } + + + virtual ~SDL_BApp() { + } + + + virtual void RefsReceived(BMessage* message) { + entry_ref entryRef; + for (int32 i = 0; message->FindRef("refs", i, &entryRef) == B_OK; i++) { + BPath referencePath = BPath(&entryRef); + SDL_SendDropFile(NULL, referencePath.Path()); + } + return; + } +}; + -static int -StartBeApp(void *unused) +static int StartBeApp(void *unused) { BApplication *App; @@ -65,48 +90,61 @@ StartBeApp(void *unused) BAppFileInfo app_info(&f); if (app_info.InitCheck() == B_OK) { char sig[B_MIME_TYPE_LENGTH]; - if (app_info.GetSignature(sig) == B_OK) - signature = strndup(sig, B_MIME_TYPE_LENGTH); + if (app_info.GetSignature(sig) == B_OK) { + SDL_signature = strndup(sig, B_MIME_TYPE_LENGTH); + } } } } - App = new SDL_BApp(signature); + App = new SDL_BApp(SDL_signature); App->Run(); delete App; - return (0); + return 0; } -/* Initialize the Be Application, if it's not already started */ -int -SDL_InitBeApp(void) + +static int StartBeLooper() { - /* Create the BApplication that handles appserver interaction */ - if (SDL_BeAppActive <= 0) { + if (!be_app) { SDL_AppThread = SDL_CreateThreadInternal(StartBeApp, "SDLApplication", 0, NULL); if (SDL_AppThread == NULL) { return SDL_SetError("Couldn't create BApplication thread"); } - /* Change working directory to that of executable */ - app_info info; - if (B_OK == be_app->GetAppInfo(&info)) { - entry_ref ref = info.ref; - BEntry entry; - if (B_OK == entry.SetTo(&ref)) { - BPath path; - if (B_OK == path.SetTo(&entry)) { - if (B_OK == path.GetParent(&path)) { - chdir(path.Path()); - } + do { + SDL_Delay(10); + } while ((be_app == NULL) || be_app->IsLaunching()); + } + + /* Change working directory to that of executable */ + app_info info; + if (B_OK == be_app->GetAppInfo(&info)) { + entry_ref ref = info.ref; + BEntry entry; + if (B_OK == entry.SetTo(&ref)) { + BPath path; + if (B_OK == path.SetTo(&entry)) { + if (B_OK == path.GetParent(&path)) { + chdir(path.Path()); } } } + } + + SDL_Looper = new SDL_BLooper("SDLLooper"); + SDL_Looper->Run(); + return (0); +} - do { - SDL_Delay(10); - } while ((be_app == NULL) || be_app->IsLaunching()); + +/* Initialize the Be Application, if it's not already started */ +int SDL_InitBeApp(void) +{ + /* Create the BApplication that handles appserver interaction */ + if (SDL_BeAppActive <= 0) { + StartBeLooper(); /* Mark the application active */ SDL_BeAppActive = 0; @@ -116,18 +154,20 @@ SDL_InitBeApp(void) ++SDL_BeAppActive; /* The app is running, and we're ready to go */ - return (0); + return 0; } /* Quit the Be Application, if there's nothing left to do */ -void -SDL_QuitBeApp(void) +void SDL_QuitBeApp(void) { /* Decrement the application reference count */ --SDL_BeAppActive; /* If the reference count reached zero, clean up the app */ if (SDL_BeAppActive == 0) { + SDL_Looper->Lock(); + SDL_Looper->Quit(); + SDL_Looper = NULL; if (SDL_AppThread != NULL) { if (be_app != NULL) { /* Not tested */ be_app->PostMessage(B_QUIT_REQUESTED); @@ -144,10 +184,10 @@ SDL_QuitBeApp(void) #endif /* SDL_BApp functions */ -void SDL_BApp::ClearID(SDL_BWin *bwin) { +void SDL_BLooper::ClearID(SDL_BWin *bwin) { _SetSDLWindow(NULL, bwin->GetID()); int32 i = _GetNumWindowSlots() - 1; - while(i >= 0 && GetSDLWindow(i) == NULL) { + while (i >= 0 && GetSDLWindow(i) == NULL) { _PopBackWindow(); --i; } diff --git a/modules/SDL2/src/main/haiku/SDL_BeApp.h b/modules/SDL2/src/main/haiku/SDL_BeApp.h index 819fa39..9a5adb8 100644 --- a/modules/SDL2/src/main/haiku/SDL_BeApp.h +++ b/modules/SDL2/src/main/haiku/SDL_BeApp.h @@ -32,7 +32,7 @@ extern int SDL_InitBeApp(void); extern void SDL_QuitBeApp(void); /* Be Application Signature*/ -extern const char *signature; +extern const char *SDL_signature; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/main/n3ds/SDL_n3ds_main.c b/modules/SDL2/src/main/n3ds/SDL_n3ds_main.c index 014f23e..db8177c 100644 --- a/modules/SDL2/src/main/n3ds/SDL_n3ds_main.c +++ b/modules/SDL2/src/main/n3ds/SDL_n3ds_main.c @@ -33,8 +33,7 @@ SDL_FORCE_INLINE void N3DS_Init(void); SDL_FORCE_INLINE void N3DS_Quit(void); -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int result; N3DS_Init(); diff --git a/modules/SDL2/src/main/nacl/SDL_nacl_main.c b/modules/SDL2/src/main/nacl/SDL_nacl_main.c index 3d7833d..10d94e2 100644 --- a/modules/SDL2/src/main/nacl/SDL_nacl_main.c +++ b/modules/SDL2/src/main/nacl/SDL_nacl_main.c @@ -33,20 +33,19 @@ extern void NACL_SetScreenResolution(int width, int height, Uint32 format); -int -nacl_main(int argc, char *argv[]) +int nacl_main(int argc, char *argv[]) { int status; PSEvent* ps_event; - PP_Resource event; + PP_Resource event; struct PP_Rect rect; int ready = 0; const PPB_View *ppb_view = PSInterfaceView(); - + /* This is started in a worker thread by ppapi_simple! */ - + /* Wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before starting the app */ - + PSEventSetFilter(PSE_INSTANCE_DIDCHANGEVIEW); while (!ready) { /* Process all waiting events without blocking */ @@ -65,13 +64,13 @@ nacl_main(int argc, char *argv[]) PSEventRelease(ps_event); } } - - /* Do a default httpfs mount on /, - * apps can override this by unmounting / + + /* Do a default httpfs mount on /, + * apps can override this by unmounting / * and remounting with the desired configuration */ nacl_io_init_ppapi(PSGetInstanceId(), PSGetInterface); - + umount("/"); mount( "", /* source */ @@ -79,7 +78,7 @@ nacl_main(int argc, char *argv[]) "httpfs", /* filesystemtype */ 0, /* mountflags */ ""); /* data specific to the html5fs type */ - + /* Everything is ready, start the user main function */ SDL_SetMainReady(); status = SDL_main(argc, argv); diff --git a/modules/SDL2/src/main/ngage/SDL_ngage_main.cpp b/modules/SDL2/src/main/ngage/SDL_ngage_main.cpp index 6dbf2f1..10d8488 100644 --- a/modules/SDL2/src/main/ngage/SDL_ngage_main.cpp +++ b/modules/SDL2/src/main/ngage/SDL_ngage_main.cpp @@ -23,17 +23,17 @@ extern "C" int main(int argc, char *argv[]); TInt E32Main() { /* Get the clean-up stack */ - CTrapCleanup* cleanup = CTrapCleanup::New(); + CTrapCleanup *cleanup = CTrapCleanup::New(); /* Arrange for multi-threaded operation */ SpawnPosixServerThread(); /* Get args and environment */ - int argc = 0; - char** argv = 0; - char** envp = 0; + int argc = 0; + char **argv = 0; + char **envp = 0; - __crt0(argc,argv,envp); + __crt0(argc, argv, envp); /* Start the application! */ @@ -42,29 +42,26 @@ TInt E32Main() /* Set process and thread priority and name */ - RThread currentThread; + RThread currentThread; RProcess thisProcess; - TParse exeName; + TParse exeName; exeName.Set(thisProcess.FileName(), NULL, NULL); currentThread.Rename(exeName.Name()); currentThread.SetProcessPriority(EPriorityLow); currentThread.SetPriority(EPriorityMuchLess); /* Increase heap size */ - RHeap* newHeap = NULL; - RHeap* oldHeap = NULL; - TInt heapSize = 7500000; - int ret; + RHeap *newHeap = NULL; + RHeap *oldHeap = NULL; + TInt heapSize = 7500000; + int ret; newHeap = User::ChunkHeap(NULL, heapSize, heapSize, KMinHeapGrowBy); - if (NULL == newHeap) - { + if (newHeap == NULL) { ret = 3; goto cleanup; - } - else - { + } else { oldHeap = User::SwitchHeap(newHeap); /* Call stdlib main */ SDL_SetMainReady(); diff --git a/modules/SDL2/src/main/ps2/SDL_ps2_main.c b/modules/SDL2/src/main/ps2/SDL_ps2_main.c index e9a4b51..b237eea 100644 --- a/modules/SDL2/src/main/ps2/SDL_ps2_main.c +++ b/modules/SDL2/src/main/ps2/SDL_ps2_main.c @@ -1,5 +1,5 @@ /* - SDL_ps2_main.c, fjtrujy@gmail.com + SDL_ps2_main.c, fjtrujy@gmail.com */ #include "SDL_config.h" @@ -17,20 +17,18 @@ #include #include #include -#include -#include -#include +#include #ifdef main - #undef main +#undef main #endif -__attribute__((weak)) -void reset_IOP() { +__attribute__((weak)) void reset_IOP() +{ SifInitRpc(0); - while(!SifIopReset(NULL, 0)) { + while (!SifIopReset(NULL, 0)) { } - while(!SifIopSync()){ + while (!SifIopSync()) { } } @@ -43,29 +41,14 @@ static void prepare_IOP() sbv_patch_fileio(); } -static void init_drivers() { - init_memcard_driver(true); - init_usb_driver(true); -} - -static void deinit_drivers() { - deinit_usb_driver(true); - deinit_memcard_driver(true); +static void init_drivers() +{ + init_ps2_filesystem_driver(); } -static void waitUntilDeviceIsReady(char *path) +static void deinit_drivers() { - struct stat buffer; - int ret = -1; - int retries = 50; - - while(ret != 0 && retries > 0) { - ret = stat(path, &buffer); - /* Wait until the device is ready */ - nopdelay(); - - retries--; - } + deinit_ps2_filesystem_driver(); } int main(int argc, char *argv[]) @@ -75,14 +58,14 @@ int main(int argc, char *argv[]) prepare_IOP(); init_drivers(); - + getcwd(cwd, sizeof(cwd)); waitUntilDeviceIsReady(cwd); res = SDL_main(argc, argv); - deinit_drivers(); - + deinit_drivers(); + return res; } diff --git a/modules/SDL2/src/main/psp/SDL_psp_main.c b/modules/SDL2/src/main/psp/SDL_psp_main.c index 8eb173f..3d083cc 100644 --- a/modules/SDL2/src/main/psp/SDL_psp_main.c +++ b/modules/SDL2/src/main/psp/SDL_psp_main.c @@ -10,7 +10,7 @@ #include #ifdef main - #undef main +#undef main #endif /* If application's main() is redefined as SDL_main, and libSDLmain is @@ -36,7 +36,7 @@ int sdl_psp_callback_thread(SceSize args, void *argp) { int cbid; cbid = sceKernelCreateCallback("Exit Callback", - sdl_psp_exit_callback, NULL); + sdl_psp_exit_callback, NULL); sceKernelRegisterExitCallback(cbid); sceKernelSleepThreadCB(); return 0; @@ -46,9 +46,10 @@ int sdl_psp_setup_callbacks(void) { int thid; thid = sceKernelCreateThread("update_thread", - sdl_psp_callback_thread, 0x11, 0xFA0, 0, 0); - if(thid >= 0) + sdl_psp_callback_thread, 0x11, 0xFA0, 0, 0); + if (thid >= 0) { sceKernelStartThread(thid, 0, 0); + } return thid; } diff --git a/modules/SDL2/src/main/uikit/SDL_uikit_main.c b/modules/SDL2/src/main/uikit/SDL_uikit_main.c index 90c20d1..6ce3492 100644 --- a/modules/SDL2/src/main/uikit/SDL_uikit_main.c +++ b/modules/SDL2/src/main/uikit/SDL_uikit_main.c @@ -12,8 +12,7 @@ #undef main #endif -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { return SDL_UIKitRunApp(argc, argv, SDL_main); } diff --git a/modules/SDL2/src/main/windows/SDL_windows_main.c b/modules/SDL2/src/main/windows/SDL_windows_main.c index 70fb9b9..189b954 100644 --- a/modules/SDL2/src/main/windows/SDL_windows_main.c +++ b/modules/SDL2/src/main/windows/SDL_windows_main.c @@ -16,12 +16,11 @@ #include "SDL_main.h" #ifdef main -# undef main +#undef main #endif /* main */ /* Pop up an out of memory message, returns to Windows */ -static BOOL -OutOfMemory(void) +static BOOL OutOfMemory(void) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Fatal Error", "Out of memory - aborting", NULL); return FALSE; @@ -29,16 +28,15 @@ OutOfMemory(void) #if defined(_MSC_VER) /* The VC++ compiler needs main/wmain defined */ -# define console_ansi_main main -# if UNICODE -# define console_wmain wmain -# endif +#define console_ansi_main main +#if UNICODE +#define console_wmain wmain +#endif #endif /* Gets the arguments with GetCommandLine, converts them to argc and argv and calls SDL_main */ -static int -main_getcmdline(void) +static int main_getcmdline(void) { LPWSTR *argvw; char **argv; @@ -56,17 +54,17 @@ main_getcmdline(void) /* Parse it into argv and argc */ argv = (char **)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (argc + 1) * sizeof(*argv)); - if (!argv) { + if (argv == NULL) { return OutOfMemory(); } for (i = 0; i < argc; ++i) { DWORD len; char *arg = WIN_StringToUTF8W(argvw[i]); - if (!arg) { + if (arg == NULL) { return OutOfMemory(); } len = (DWORD)SDL_strlen(arg); - argv[i] = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 1); + argv[i] = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (size_t)len + 1); if (!argv[i]) { return OutOfMemory(); } @@ -91,25 +89,22 @@ main_getcmdline(void) } /* This is where execution begins [console apps, ansi] */ -int -console_ansi_main(int argc, char *argv[]) +int console_ansi_main(int argc, char *argv[]) { return main_getcmdline(); } - #if UNICODE /* This is where execution begins [console apps, unicode] */ -int -console_wmain(int argc, wchar_t *wargv[], wchar_t *wenvp) +int console_wmain(int argc, wchar_t *wargv[], wchar_t *wenvp) { return main_getcmdline(); } #endif /* This is where execution begins [windowed apps] */ -int WINAPI -WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) +int WINAPI MINGW32_FORCEALIGN +WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) /* NOLINT(readability-inconsistent-declaration-parameter-name) */ { return main_getcmdline(); } diff --git a/modules/SDL2/src/main/windows/version.rc b/modules/SDL2/src/main/windows/version.rc index a93eecf..a914799 100644 --- a/modules/SDL2/src/main/windows/version.rc +++ b/modules/SDL2/src/main/windows/version.rc @@ -1,4 +1,4 @@ - +// This file is public domain. Do what you like with it. #include "winresrc.h" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US @@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,26,3,0 - PRODUCTVERSION 2,26,3,0 + FILEVERSION 2,28,3,0 + PRODUCTVERSION 2,28,3,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "SDL\0" - VALUE "FileVersion", "2, 26, 3, 0\0" + VALUE "FileVersion", "2, 28, 3, 0\0" VALUE "InternalName", "SDL\0" VALUE "LegalCopyright", "Copyright (C) 2023 Sam Lantinga\0" VALUE "OriginalFilename", "SDL2.dll\0" VALUE "ProductName", "Simple DirectMedia Layer\0" - VALUE "ProductVersion", "2, 26, 3, 0\0" + VALUE "ProductVersion", "2, 28, 3, 0\0" END END BLOCK "VarFileInfo" diff --git a/modules/SDL2/src/main/winrt/SDL_winrt_main_NonXAML.cpp b/modules/SDL2/src/main/winrt/SDL_winrt_main_NonXAML.cpp index 19d2250..575a62c 100644 --- a/modules/SDL2/src/main/winrt/SDL_winrt_main_NonXAML.cpp +++ b/modules/SDL2/src/main/winrt/SDL_winrt_main_NonXAML.cpp @@ -40,7 +40,7 @@ is compiled with C++/CX enabled (via the /ZW compiler flag). */ #ifdef _MSC_VER -#pragma warning(disable:4447) +#pragma warning(disable : 4447) #endif /* Make sure the function to initialize the Windows Runtime gets linked in. */ diff --git a/modules/SDL2/src/misc/SDL_url.c b/modules/SDL2/src/misc/SDL_url.c index 1925fba..22faa84 100644 --- a/modules/SDL2/src/misc/SDL_url.c +++ b/modules/SDL2/src/misc/SDL_url.c @@ -21,12 +21,9 @@ #include "SDL_sysurl.h" -extern int SDL_SYS_OpenURL(const char *url); - -int -SDL_OpenURL(const char *url) +int SDL_OpenURL(const char *url) { - if (!url) { + if (url == NULL) { return SDL_InvalidParamError("url"); } return SDL_SYS_OpenURL(url); diff --git a/modules/SDL2/src/misc/android/SDL_sysurl.c b/modules/SDL2/src/misc/android/SDL_sysurl.c index a7e2751..577e0c3 100644 --- a/modules/SDL2/src/misc/android/SDL_sysurl.c +++ b/modules/SDL2/src/misc/android/SDL_sysurl.c @@ -22,11 +22,9 @@ #include "../SDL_sysurl.h" #include "../../core/android/SDL_android.h" -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { return Android_JNI_OpenURL(url); } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/dummy/SDL_sysurl.c b/modules/SDL2/src/misc/dummy/SDL_sysurl.c index 0124d80..3f43628 100644 --- a/modules/SDL2/src/misc/dummy/SDL_sysurl.c +++ b/modules/SDL2/src/misc/dummy/SDL_sysurl.c @@ -21,11 +21,9 @@ #include "../SDL_sysurl.h" -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { return SDL_Unsupported(); } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/emscripten/SDL_sysurl.c b/modules/SDL2/src/misc/emscripten/SDL_sysurl.c index 88a5ad7..12cb156 100644 --- a/modules/SDL2/src/misc/emscripten/SDL_sysurl.c +++ b/modules/SDL2/src/misc/emscripten/SDL_sysurl.c @@ -23,15 +23,14 @@ #include -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { EM_ASM({ window.open(UTF8ToString($0), "_blank"); - }, url); + }, + url); return 0; } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/haiku/SDL_sysurl.cc b/modules/SDL2/src/misc/haiku/SDL_sysurl.cc index 08a2e55..68b0310 100644 --- a/modules/SDL2/src/misc/haiku/SDL_sysurl.cc +++ b/modules/SDL2/src/misc/haiku/SDL_sysurl.cc @@ -22,8 +22,7 @@ #include "../SDL_sysurl.h" #include -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { BUrl burl(url); const status_t rc = burl.OpenWithPreferredApplication(false); diff --git a/modules/SDL2/src/misc/ios/SDL_sysurl.m b/modules/SDL2/src/misc/ios/SDL_sysurl.m index 6c57835..61c931e 100644 --- a/modules/SDL2/src/misc/ios/SDL_sysurl.m +++ b/modules/SDL2/src/misc/ios/SDL_sysurl.m @@ -23,14 +23,14 @@ #import -int -SDL_SYS_OpenURL(const char *url) -{ @autoreleasepool { +int SDL_SYS_OpenURL(const char *url) +{ + @autoreleasepool { - NSString *nsstr = [NSString stringWithUTF8String:url]; - NSURL *nsurl = [NSURL URLWithString:nsstr]; - return [[UIApplication sharedApplication] openURL:nsurl] ? 0 : -1; -}} + NSString *nsstr = [NSString stringWithUTF8String:url]; + NSURL *nsurl = [NSURL URLWithString:nsstr]; + return [[UIApplication sharedApplication] openURL:nsurl] ? 0 : -1; + } +} /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/macosx/SDL_sysurl.m b/modules/SDL2/src/misc/macosx/SDL_sysurl.m index eba4365..657c8f5 100644 --- a/modules/SDL2/src/misc/macosx/SDL_sysurl.m +++ b/modules/SDL2/src/misc/macosx/SDL_sysurl.m @@ -23,14 +23,14 @@ #import -int -SDL_SYS_OpenURL(const char *url) -{ @autoreleasepool +int SDL_SYS_OpenURL(const char *url) { - CFURLRef cfurl = CFURLCreateWithBytes(NULL, (const UInt8 *) url, SDL_strlen(url), kCFStringEncodingUTF8, NULL); - OSStatus status = LSOpenCFURLRef(cfurl, NULL); - CFRelease(cfurl); - return status == noErr ? 0 : -1; -}} + @autoreleasepool { + CFURLRef cfurl = CFURLCreateWithBytes(NULL, (const UInt8 *)url, SDL_strlen(url), kCFStringEncodingUTF8, NULL); + OSStatus status = LSOpenCFURLRef(cfurl, NULL); + CFRelease(cfurl); + return status == noErr ? 0 : -1; + } +} /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/misc/riscos/SDL_sysurl.c b/modules/SDL2/src/misc/riscos/SDL_sysurl.c index 923a2b2..f4d588e 100644 --- a/modules/SDL2/src/misc/riscos/SDL_sysurl.c +++ b/modules/SDL2/src/misc/riscos/SDL_sysurl.c @@ -28,8 +28,7 @@ #define URI_Dispatch 0x4e381 #endif -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { _kernel_swi_regs regs; _kernel_oserror *error; @@ -46,4 +45,3 @@ SDL_SYS_OpenURL(const char *url) } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/unix/SDL_sysurl.c b/modules/SDL2/src/misc/unix/SDL_sysurl.c index a0e80b0..75d692b 100644 --- a/modules/SDL2/src/misc/unix/SDL_sysurl.c +++ b/modules/SDL2/src/misc/unix/SDL_sysurl.c @@ -28,20 +28,19 @@ #include #include -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { const pid_t pid1 = fork(); - if (pid1 == 0) { /* child process */ + if (pid1 == 0) { /* child process */ pid_t pid2; /* Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam */ unsetenv("LD_PRELOAD"); /* Notice this is vfork and not fork! */ pid2 = vfork(); - if (pid2 == 0) { /* Grandchild process will try to launch the url */ + if (pid2 == 0) { /* Grandchild process will try to launch the url */ execlp("xdg-open", "xdg-open", url, NULL); _exit(EXIT_FAILURE); - } else if (pid2 < 0) { /* There was an error forking */ + } else if (pid2 < 0) { /* There was an error forking */ _exit(EXIT_FAILURE); } else { /* Child process doesn't wait for possibly-blocking grandchild. */ @@ -53,14 +52,14 @@ SDL_SYS_OpenURL(const char *url) int status; if (waitpid(pid1, &status, 0) == pid1) { if (WIFEXITED(status)) { - if (WEXITSTATUS(status) == 0) { - return 0; /* success! */ - } else { - return SDL_SetError("xdg-open reported error or failed to launch: %d", WEXITSTATUS(status)); - } - } else { + if (WEXITSTATUS(status) == 0) { + return 0; /* success! */ + } else { + return SDL_SetError("xdg-open reported error or failed to launch: %d", WEXITSTATUS(status)); + } + } else { return SDL_SetError("xdg-open failed for some reason"); - } + } } else { return SDL_SetError("Waiting on xdg-open failed: %s", strerror(errno)); } @@ -68,4 +67,3 @@ SDL_SYS_OpenURL(const char *url) } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/vita/SDL_sysurl.c b/modules/SDL2/src/misc/vita/SDL_sysurl.c index 4dcf4c7..e96c18e 100644 --- a/modules/SDL2/src/misc/vita/SDL_sysurl.c +++ b/modules/SDL2/src/misc/vita/SDL_sysurl.c @@ -24,8 +24,7 @@ #include #include -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { SceAppUtilInitParam init_param; SceAppUtilBootParam boot_param; @@ -41,4 +40,3 @@ SDL_SYS_OpenURL(const char *url) } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/windows/SDL_sysurl.c b/modules/SDL2/src/misc/windows/SDL_sysurl.c index 0fb8518..6f9c46d 100644 --- a/modules/SDL2/src/misc/windows/SDL_sysurl.c +++ b/modules/SDL2/src/misc/windows/SDL_sysurl.c @@ -25,18 +25,16 @@ #include #if defined(__XBOXONE__) || defined(__XBOXSERIES__) -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { /* Not supported */ return SDL_Unsupported(); } #else /* https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx */ -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { - WCHAR* wurl; + WCHAR *wurl; HINSTANCE rc; /* MSDN says for safety's sake, make sure COM is initialized. */ @@ -55,9 +53,8 @@ SDL_SYS_OpenURL(const char *url) rc = ShellExecuteW(NULL, L"open", wurl, NULL, NULL, SW_SHOWNORMAL); SDL_free(wurl); WIN_CoUninitialize(); - return (rc > ((HINSTANCE) 32)) ? 0 : WIN_SetError("Couldn't open given URL."); + return (rc > ((HINSTANCE)32)) ? 0 : WIN_SetError("Couldn't open given URL."); } #endif /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/misc/winrt/SDL_sysurl.cpp b/modules/SDL2/src/misc/winrt/SDL_sysurl.cpp index 8e4ce08..93fd7b0 100644 --- a/modules/SDL2/src/misc/winrt/SDL_sysurl.cpp +++ b/modules/SDL2/src/misc/winrt/SDL_sysurl.cpp @@ -22,8 +22,7 @@ #include "../SDL_sysurl.h" #include "../../core/windows/SDL_windows.h" -int -SDL_SYS_OpenURL(const char *url) +int SDL_SYS_OpenURL(const char *url) { WCHAR *wurl = WIN_UTF8ToStringW(url); if (!wurl) { @@ -34,8 +33,7 @@ SDL_SYS_OpenURL(const char *url) auto uri = ref new Windows::Foundation::Uri(strurl); Windows::System::Launcher::LaunchUriAsync(uri); - return 0; // oh well, we're not waiting on an async task here. + return 0; // oh well, we're not waiting on an async task here. } /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/power/SDL_power.c b/modules/SDL2/src/power/SDL_power.c index a31f842..63ba382 100644 --- a/modules/SDL2/src/power/SDL_power.c +++ b/modules/SDL2/src/power/SDL_power.c @@ -26,15 +26,13 @@ * Returns SDL_TRUE if we have a definitive answer. * SDL_FALSE to try next implementation. */ -typedef SDL_bool - (*SDL_GetPowerInfo_Impl) (SDL_PowerState * state, int *seconds, - int *percent); +typedef SDL_bool (*SDL_GetPowerInfo_Impl)(SDL_PowerState *state, int *seconds, + int *percent); #ifndef SDL_POWER_DISABLED #ifdef SDL_POWER_HARDWIRED /* This is for things that _never_ have a battery */ -static SDL_bool -SDL_GetPowerInfo_Hardwired(SDL_PowerState * state, int *seconds, int *percent) +static SDL_bool SDL_GetPowerInfo_Hardwired(SDL_PowerState *state, int *seconds, int *percent) { *seconds = -1; *percent = -1; @@ -44,40 +42,40 @@ SDL_GetPowerInfo_Hardwired(SDL_PowerState * state, int *seconds, int *percent) #endif static SDL_GetPowerInfo_Impl implementations[] = { -#ifdef SDL_POWER_LINUX /* in order of preference. More than could work. */ +#ifdef SDL_POWER_LINUX /* in order of preference. More than could work. */ SDL_GetPowerInfo_Linux_org_freedesktop_upower, SDL_GetPowerInfo_Linux_sys_class_power_supply, SDL_GetPowerInfo_Linux_proc_acpi, SDL_GetPowerInfo_Linux_proc_apm, #endif -#ifdef SDL_POWER_WINDOWS /* handles Win32, Win64, PocketPC. */ +#ifdef SDL_POWER_WINDOWS /* handles Win32, Win64, PocketPC. */ SDL_GetPowerInfo_Windows, #endif -#ifdef SDL_POWER_UIKIT /* handles iPhone/iPad/etc */ +#ifdef SDL_POWER_UIKIT /* handles iPhone/iPad/etc */ SDL_GetPowerInfo_UIKit, #endif #ifdef SDL_POWER_MACOSX /* handles Mac OS X, Darwin. */ SDL_GetPowerInfo_MacOSX, #endif -#ifdef SDL_POWER_HAIKU /* with BeOS euc.jp apm driver. Does this work on Haiku? */ +#ifdef SDL_POWER_HAIKU /* with BeOS euc.jp apm driver. Does this work on Haiku? */ SDL_GetPowerInfo_Haiku, #endif -#ifdef SDL_POWER_ANDROID /* handles Android. */ +#ifdef SDL_POWER_ANDROID /* handles Android. */ SDL_GetPowerInfo_Android, #endif -#ifdef SDL_POWER_PSP /* handles PSP. */ +#ifdef SDL_POWER_PSP /* handles PSP. */ SDL_GetPowerInfo_PSP, #endif -#ifdef SDL_POWER_VITA /* handles PSVita. */ +#ifdef SDL_POWER_VITA /* handles PSVita. */ SDL_GetPowerInfo_VITA, #endif -#ifdef SDL_POWER_N3DS /* handles N3DS. */ +#ifdef SDL_POWER_N3DS /* handles N3DS. */ SDL_GetPowerInfo_N3DS, #endif -#ifdef SDL_POWER_WINRT /* handles WinRT */ +#ifdef SDL_POWER_WINRT /* handles WinRT */ SDL_GetPowerInfo_WinRT, #endif -#ifdef SDL_POWER_EMSCRIPTEN /* handles Emscripten */ +#ifdef SDL_POWER_EMSCRIPTEN /* handles Emscripten */ SDL_GetPowerInfo_Emscripten, #endif @@ -87,8 +85,7 @@ static SDL_GetPowerInfo_Impl implementations[] = { }; #endif -SDL_PowerState -SDL_GetPowerInfo(int *seconds, int *percent) +SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent) { #ifndef SDL_POWER_DISABLED const int total = sizeof(implementations) / sizeof(implementations[0]); diff --git a/modules/SDL2/src/power/android/SDL_syspower.c b/modules/SDL2/src/power/android/SDL_syspower.c index 23e2873..3dccdec 100644 --- a/modules/SDL2/src/power/android/SDL_syspower.c +++ b/modules/SDL2/src/power/android/SDL_syspower.c @@ -28,8 +28,7 @@ #include "../../core/android/SDL_android.h" -SDL_bool -SDL_GetPowerInfo_Android(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *state, int *seconds, int *percent) { int battery; int plugged; diff --git a/modules/SDL2/src/power/emscripten/SDL_syspower.c b/modules/SDL2/src/power/emscripten/SDL_syspower.c index 354150a..6a1f317 100644 --- a/modules/SDL2/src/power/emscripten/SDL_syspower.c +++ b/modules/SDL2/src/power/emscripten/SDL_syspower.c @@ -27,14 +27,14 @@ #include "SDL_power.h" -SDL_bool -SDL_GetPowerInfo_Emscripten(SDL_PowerState *state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *state, int *seconds, int *percent) { EmscriptenBatteryEvent batteryState; int haveBattery = 0; - if (emscripten_get_battery_status(&batteryState) == EMSCRIPTEN_RESULT_NOT_SUPPORTED) + if (emscripten_get_battery_status(&batteryState) == EMSCRIPTEN_RESULT_NOT_SUPPORTED) { return SDL_FALSE; + } haveBattery = batteryState.level != 1.0 || !batteryState.charging || batteryState.chargingTime != 0.0; diff --git a/modules/SDL2/src/power/haiku/SDL_syspower.c b/modules/SDL2/src/power/haiku/SDL_syspower.c index 986ce87..6e7dd92 100644 --- a/modules/SDL2/src/power/haiku/SDL_syspower.c +++ b/modules/SDL2/src/power/haiku/SDL_syspower.c @@ -34,16 +34,15 @@ #include /* These values are from apm.h ... */ -#define APM_DEVICE_PATH "/dev/misc/apm" -#define APM_FUNC_OFFSET 0x5300 +#define APM_DEVICE_PATH "/dev/misc/apm" +#define APM_FUNC_OFFSET 0x5300 #define APM_FUNC_GET_POWER_STATUS 10 #define APM_DEVICE_ALL 1 #define APM_BIOS_CALL (B_DEVICE_OP_CODES_END + 3) #include "SDL_power.h" -SDL_bool -SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *state, int *seconds, int *percent) { const int fd = open("/dev/misc/apm", O_RDONLY | O_CLOEXEC); SDL_bool need_details = SDL_FALSE; @@ -56,7 +55,7 @@ SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent) int rc; if (fd == -1) { - return SDL_FALSE; /* maybe some other method will work? */ + return SDL_FALSE; /* maybe some other method will work? */ } SDL_memset(regs, '\0', sizeof(regs)); @@ -73,10 +72,10 @@ SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent) battery_status = regs[1] & 0xFF; battery_flags = regs[2] >> 8; battery_life = regs[2] & 0xFF; - battery_time = (uint32) regs[3]; + battery_time = (uint32)regs[3]; /* in theory, _something_ should be set in battery_flags, right? */ - if (battery_flags == 0x00) { /* older APM BIOS? Less fields. */ + if (battery_flags == 0x00) { /* older APM BIOS? Less fields. */ battery_time = 0xFFFF; if (battery_status == 0xFF) { battery_flags = 0xFF; @@ -90,36 +89,36 @@ SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent) battery_time = (battery_time & 0x7FFF) * 60; } - if (battery_flags == 0xFF) { /* unknown state */ + if (battery_flags == 0xFF) { /* unknown state */ *state = SDL_POWERSTATE_UNKNOWN; - } else if (battery_flags & (1 << 7)) { /* no battery */ + } else if (battery_flags & (1 << 7)) { /* no battery */ *state = SDL_POWERSTATE_NO_BATTERY; - } else if (battery_flags & (1 << 3)) { /* charging */ + } else if (battery_flags & (1 << 3)) { /* charging */ *state = SDL_POWERSTATE_CHARGING; need_details = SDL_TRUE; } else if (ac_status == 1) { - *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ + *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ need_details = SDL_TRUE; } else { - *state = SDL_POWERSTATE_ON_BATTERY; /* not on AC. */ + *state = SDL_POWERSTATE_ON_BATTERY; /* not on AC. */ need_details = SDL_TRUE; } *percent = -1; *seconds = -1; if (need_details) { - const int pct = (int) battery_life; - const int secs = (int) battery_time; + const int pct = (int)battery_life; + const int secs = (int)battery_time; - if (pct != 255) { /* 255 == unknown */ + if (pct != 255) { /* 255 == unknown */ *percent = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ } - if (secs != 0xFFFF) { /* 0xFFFF == unknown */ + if (secs != 0xFFFF) { /* 0xFFFF == unknown */ *seconds = secs; } } - return SDL_TRUE; /* the definitive answer if APM driver replied. */ + return SDL_TRUE; /* the definitive answer if APM driver replied. */ } #endif /* SDL_POWER_HAIKU */ diff --git a/modules/SDL2/src/power/linux/SDL_syspower.c b/modules/SDL2/src/power/linux/SDL_syspower.c index bff60d3..84100e8 100644 --- a/modules/SDL2/src/power/linux/SDL_syspower.c +++ b/modules/SDL2/src/power/linux/SDL_syspower.c @@ -41,53 +41,48 @@ static const char *proc_acpi_battery_path = "/proc/acpi/battery"; static const char *proc_acpi_ac_adapter_path = "/proc/acpi/ac_adapter"; static const char *sys_class_power_supply_path = "/sys/class/power_supply"; -static int -open_power_file(const char *base, const char *node, const char *key) +static int open_power_file(const char *base, const char *node, const char *key) { int fd; const size_t pathlen = SDL_strlen(base) + SDL_strlen(node) + SDL_strlen(key) + 3; char *path = SDL_stack_alloc(char, pathlen); if (path == NULL) { - return -1; /* oh well. */ + return -1; /* oh well. */ } - SDL_snprintf(path, pathlen, "%s/%s/%s", base, node, key); + (void)SDL_snprintf(path, pathlen, "%s/%s/%s", base, node, key); fd = open(path, O_RDONLY | O_CLOEXEC); SDL_stack_free(path); return fd; } - -static SDL_bool -read_power_file(const char *base, const char *node, const char *key, - char *buf, size_t buflen) +static SDL_bool read_power_file(const char *base, const char *node, const char *key, + char *buf, size_t buflen) { ssize_t br = 0; const int fd = open_power_file(base, node, key); if (fd == -1) { return SDL_FALSE; } - br = read(fd, buf, buflen-1); + br = read(fd, buf, buflen - 1); close(fd); if (br < 0) { return SDL_FALSE; } - buf[br] = '\0'; /* null-terminate the string. */ + buf[br] = '\0'; /* null-terminate the string. */ return SDL_TRUE; } - -static SDL_bool -make_proc_acpi_key_val(char **_ptr, char **_key, char **_val) +static SDL_bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val) { char *ptr = *_ptr; while (*ptr == ' ') { - ptr++; /* skip whitespace. */ + ptr++; /* skip whitespace. */ } if (*ptr == '\0') { - return SDL_FALSE; /* EOF. */ + return SDL_FALSE; /* EOF. */ } *_key = ptr; @@ -97,17 +92,17 @@ make_proc_acpi_key_val(char **_ptr, char **_key, char **_val) } if (*ptr == '\0') { - return SDL_FALSE; /* (unexpected) EOF. */ + return SDL_FALSE; /* (unexpected) EOF. */ } - *(ptr++) = '\0'; /* terminate the key. */ + *(ptr++) = '\0'; /* terminate the key. */ while (*ptr == ' ') { - ptr++; /* skip whitespace. */ + ptr++; /* skip whitespace. */ } if (*ptr == '\0') { - return SDL_FALSE; /* (unexpected) EOF. */ + return SDL_FALSE; /* (unexpected) EOF. */ } *_val = ptr; @@ -117,16 +112,15 @@ make_proc_acpi_key_val(char **_ptr, char **_key, char **_val) } if (*ptr != '\0') { - *(ptr++) = '\0'; /* terminate the value. */ + *(ptr++) = '\0'; /* terminate the value. */ } - *_ptr = ptr; /* store for next time. */ + *_ptr = ptr; /* store for next time. */ return SDL_TRUE; } -static void -check_proc_acpi_battery(const char * node, SDL_bool * have_battery, - SDL_bool * charging, int *seconds, int *percent) +static void check_proc_acpi_battery(const char *node, SDL_bool *have_battery, + SDL_bool *charging, int *seconds, int *percent) { const char *base = proc_acpi_battery_path; char info[1024]; @@ -141,28 +135,28 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, int secs = -1; int pct = -1; - if (!read_power_file(base, node, "state", state, sizeof (state))) { + if (!read_power_file(base, node, "state", state, sizeof(state))) { return; - } else if (!read_power_file(base, node, "info", info, sizeof (info))) { + } else if (!read_power_file(base, node, "info", info, sizeof(info))) { return; } ptr = &state[0]; while (make_proc_acpi_key_val(&ptr, &key, &val)) { - if (SDL_strcmp(key, "present") == 0) { - if (SDL_strcmp(val, "yes") == 0) { + if (SDL_strcasecmp(key, "present") == 0) { + if (SDL_strcasecmp(val, "yes") == 0) { *have_battery = SDL_TRUE; } - } else if (SDL_strcmp(key, "charging state") == 0) { + } else if (SDL_strcasecmp(key, "charging state") == 0) { /* !!! FIXME: what exactly _does_ charging/discharging mean? */ - if (SDL_strcmp(val, "charging/discharging") == 0) { + if (SDL_strcasecmp(val, "charging/discharging") == 0) { charge = SDL_TRUE; - } else if (SDL_strcmp(val, "charging") == 0) { + } else if (SDL_strcasecmp(val, "charging") == 0) { charge = SDL_TRUE; } - } else if (SDL_strcmp(key, "remaining capacity") == 0) { + } else if (SDL_strcasecmp(key, "remaining capacity") == 0) { char *endptr = NULL; - const int cvt = (int) SDL_strtol(val, &endptr, 10); + const int cvt = (int)SDL_strtol(val, &endptr, 10); if (*endptr == ' ') { remaining = cvt; } @@ -171,9 +165,9 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, ptr = &info[0]; while (make_proc_acpi_key_val(&ptr, &key, &val)) { - if (SDL_strcmp(key, "design capacity") == 0) { + if (SDL_strcasecmp(key, "design capacity") == 0) { char *endptr = NULL; - const int cvt = (int) SDL_strtol(val, &endptr, 10); + const int cvt = (int)SDL_strtol(val, &endptr, 10); if (*endptr == ' ') { maximum = cvt; } @@ -181,7 +175,7 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, } if ((maximum >= 0) && (remaining >= 0)) { - pct = (int) ((((float) remaining) / ((float) maximum)) * 100.0f); + pct = (int)((((float)remaining) / ((float)maximum)) * 100.0f); if (pct < 0) { pct = 0; } else if (pct > 100) { @@ -197,7 +191,7 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, */ if ((secs < 0) && (*seconds < 0)) { if ((pct < 0) && (*percent < 0)) { - choose = SDL_TRUE; /* at least we know there's a battery. */ + choose = SDL_TRUE; /* at least we know there's a battery. */ } if (pct > *percent) { choose = SDL_TRUE; @@ -213,8 +207,7 @@ check_proc_acpi_battery(const char * node, SDL_bool * have_battery, } } -static void -check_proc_acpi_ac_adapter(const char * node, SDL_bool * have_ac) +static void check_proc_acpi_ac_adapter(const char *node, SDL_bool *have_ac) { const char *base = proc_acpi_ac_adapter_path; char state[256]; @@ -222,24 +215,21 @@ check_proc_acpi_ac_adapter(const char * node, SDL_bool * have_ac) char *key = NULL; char *val = NULL; - if (!read_power_file(base, node, "state", state, sizeof (state))) { + if (!read_power_file(base, node, "state", state, sizeof(state))) { return; } ptr = &state[0]; while (make_proc_acpi_key_val(&ptr, &key, &val)) { - if (SDL_strcmp(key, "state") == 0) { - if (SDL_strcmp(val, "on-line") == 0) { + if (SDL_strcasecmp(key, "state") == 0) { + if (SDL_strcasecmp(val, "on-line") == 0) { *have_ac = SDL_TRUE; } } } } - -SDL_bool -SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState * state, - int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *state, int *seconds, int *percent) { struct dirent *dent = NULL; DIR *dirp = NULL; @@ -253,7 +243,7 @@ SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState * state, dirp = opendir(proc_acpi_battery_path); if (dirp == NULL) { - return SDL_FALSE; /* can't use this interface. */ + return SDL_FALSE; /* can't use this interface. */ } else { while ((dent = readdir(dirp)) != NULL) { const char *node = dent->d_name; @@ -265,7 +255,7 @@ SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState * state, dirp = opendir(proc_acpi_ac_adapter_path); if (dirp == NULL) { - return SDL_FALSE; /* can't use this interface. */ + return SDL_FALSE; /* can't use this interface. */ } else { while ((dent = readdir(dirp)) != NULL) { const char *node = dent->d_name; @@ -284,17 +274,15 @@ SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState * state, *state = SDL_POWERSTATE_ON_BATTERY; } - return SDL_TRUE; /* definitive answer. */ + return SDL_TRUE; /* definitive answer. */ } - -static SDL_bool -next_string(char **_ptr, char **_str) +static SDL_bool next_string(char **_ptr, char **_str) { char *ptr = *_ptr; char *str; - while (*ptr == ' ') { /* skip any spaces... */ + while (*ptr == ' ') { /* skip any spaces... */ ptr++; } @@ -303,29 +291,28 @@ next_string(char **_ptr, char **_str) } str = ptr; - while ((*ptr != ' ') && (*ptr != '\n') && (*ptr != '\0')) + while ((*ptr != ' ') && (*ptr != '\n') && (*ptr != '\0')) { ptr++; + } - if (*ptr != '\0') + if (*ptr != '\0') { *(ptr++) = '\0'; + } *_str = str; *_ptr = ptr; return SDL_TRUE; } -static SDL_bool -int_string(char *str, int *val) +static SDL_bool int_string(char *str, int *val) { char *endptr = NULL; - *val = (int) SDL_strtol(str, &endptr, 0); - return ((*str != '\0') && (*endptr == '\0')); + *val = (int)SDL_strtol(str, &endptr, 0); + return (*str != '\0') && (*endptr == '\0'); } /* http://lxr.linux.no/linux+v2.6.29/drivers/char/apm-emulation.c */ -SDL_bool -SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, - int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state, int *seconds, int *percent) { SDL_bool need_details = SDL_FALSE; int ac_status = 0; @@ -340,44 +327,44 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, ssize_t br; if (fd == -1) { - return SDL_FALSE; /* can't use this interface. */ + return SDL_FALSE; /* can't use this interface. */ } - br = read(fd, buf, sizeof (buf) - 1); + br = read(fd, buf, sizeof(buf) - 1); close(fd); if (br < 0) { return SDL_FALSE; } - buf[br] = '\0'; /* null-terminate the string. */ - if (!next_string(&ptr, &str)) { /* driver version */ + buf[br] = '\0'; /* null-terminate the string. */ + if (!next_string(&ptr, &str)) { /* driver version */ return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* BIOS version */ + if (!next_string(&ptr, &str)) { /* BIOS version */ return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* APM flags */ + if (!next_string(&ptr, &str)) { /* APM flags */ return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* AC line status */ + if (!next_string(&ptr, &str)) { /* AC line status */ return SDL_FALSE; } else if (!int_string(str, &ac_status)) { return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* battery status */ + if (!next_string(&ptr, &str)) { /* battery status */ return SDL_FALSE; } else if (!int_string(str, &battery_status)) { return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* battery flag */ + if (!next_string(&ptr, &str)) { /* battery flag */ return SDL_FALSE; } else if (!int_string(str, &battery_flag)) { return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* remaining battery life percent */ + if (!next_string(&ptr, &str)) { /* remaining battery life percent */ return SDL_FALSE; } if (str[SDL_strlen(str) - 1] == '%') { @@ -387,27 +374,27 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* remaining battery life time */ + if (!next_string(&ptr, &str)) { /* remaining battery life time */ return SDL_FALSE; } else if (!int_string(str, &battery_time)) { return SDL_FALSE; } - if (!next_string(&ptr, &str)) { /* remaining battery life time units */ + if (!next_string(&ptr, &str)) { /* remaining battery life time units */ return SDL_FALSE; - } else if (SDL_strcmp(str, "min") == 0) { + } else if (SDL_strcasecmp(str, "min") == 0) { battery_time *= 60; } if (battery_flag == 0xFF) { /* unknown state */ *state = SDL_POWERSTATE_UNKNOWN; - } else if (battery_flag & (1 << 7)) { /* no battery */ + } else if (battery_flag & (1 << 7)) { /* no battery */ *state = SDL_POWERSTATE_NO_BATTERY; - } else if (battery_flag & (1 << 3)) { /* charging */ + } else if (battery_flag & (1 << 3)) { /* charging */ *state = SDL_POWERSTATE_CHARGING; need_details = SDL_TRUE; } else if (ac_status == 1) { - *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ + *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ need_details = SDL_TRUE; } else { *state = SDL_POWERSTATE_ON_BATTERY; @@ -420,10 +407,10 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, const int pct = battery_percent; const int secs = battery_time; - if (pct >= 0) { /* -1 == unknown */ + if (pct >= 0) { /* -1 == unknown */ *percent = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ } - if (secs >= 0) { /* -1 == unknown */ + if (secs >= 0) { /* -1 == unknown */ *seconds = secs; } } @@ -431,19 +418,18 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, return SDL_TRUE; } -SDL_bool -SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *seconds, int *percent) { const char *base = sys_class_power_supply_path; struct dirent *dent; DIR *dirp; dirp = opendir(base); - if (!dirp) { + if (dirp == NULL) { return SDL_FALSE; } - *state = SDL_POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ + *state = SDL_POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ *seconds = -1; *percent = -1; @@ -458,52 +444,52 @@ SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *second int power; if ((SDL_strcmp(name, ".") == 0) || (SDL_strcmp(name, "..") == 0)) { - continue; /* skip these, of course. */ - } else if (!read_power_file(base, name, "type", str, sizeof (str))) { - continue; /* Don't know _what_ we're looking at. Give up on it. */ - } else if (SDL_strcmp(str, "Battery\n") != 0) { - continue; /* we don't care about UPS and such. */ + continue; /* skip these, of course. */ + } else if (!read_power_file(base, name, "type", str, sizeof(str))) { + continue; /* Don't know _what_ we're looking at. Give up on it. */ + } else if (SDL_strcasecmp(str, "Battery\n") != 0) { + continue; /* we don't care about UPS and such. */ } /* if the scope is "device," it might be something like a PS4 controller reporting its own battery, and not something that powers the system. Most system batteries don't list a scope at all; we assume it's a system battery if not specified. */ - if (read_power_file(base, name, "scope", str, sizeof (str))) { - if (SDL_strcmp(str, "device\n") == 0) { - continue; /* skip external devices with their own batteries. */ + if (read_power_file(base, name, "scope", str, sizeof(str))) { + if (SDL_strcasecmp(str, "Device\n") == 0) { + continue; /* skip external devices with their own batteries. */ } } /* some drivers don't offer this, so if it's not explicitly reported assume it's present. */ - if (read_power_file(base, name, "present", str, sizeof (str)) && (SDL_strcmp(str, "0\n") == 0)) { + if (read_power_file(base, name, "present", str, sizeof(str)) && (SDL_strcmp(str, "0\n") == 0)) { st = SDL_POWERSTATE_NO_BATTERY; - } else if (!read_power_file(base, name, "status", str, sizeof (str))) { - st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ - } else if (SDL_strcmp(str, "Charging\n") == 0) { + } else if (!read_power_file(base, name, "status", str, sizeof(str))) { + st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ + } else if (SDL_strcasecmp(str, "Charging\n") == 0) { st = SDL_POWERSTATE_CHARGING; - } else if (SDL_strcmp(str, "Discharging\n") == 0) { + } else if (SDL_strcasecmp(str, "Discharging\n") == 0) { st = SDL_POWERSTATE_ON_BATTERY; - } else if ((SDL_strcmp(str, "Full\n") == 0) || (SDL_strcmp(str, "Not charging\n") == 0)) { + } else if ((SDL_strcasecmp(str, "Full\n") == 0) || (SDL_strcasecmp(str, "Not charging\n") == 0)) { st = SDL_POWERSTATE_CHARGED; } else { - st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ + st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ } - if (!read_power_file(base, name, "capacity", str, sizeof (str))) { + if (!read_power_file(base, name, "capacity", str, sizeof(str))) { pct = -1; } else { pct = SDL_atoi(str); pct = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ } - if (read_power_file(base, name, "time_to_empty_now", str, sizeof (str))) { + if (read_power_file(base, name, "time_to_empty_now", str, sizeof(str))) { secs = SDL_atoi(str); - secs = (secs <= 0) ? -1 : secs; /* 0 == unknown */ + secs = (secs <= 0) ? -1 : secs; /* 0 == unknown */ } else if (st == SDL_POWERSTATE_ON_BATTERY) { /* energy is Watt*hours and power is Watts */ - energy = (read_power_file(base, name, "energy_now", str, sizeof (str))) ? SDL_atoi(str) : -1; - power = (read_power_file(base, name, "power_now", str, sizeof (str))) ? SDL_atoi(str) : -1; + energy = (read_power_file(base, name, "energy_now", str, sizeof(str))) ? SDL_atoi(str) : -1; + power = (read_power_file(base, name, "power_now", str, sizeof(str))) ? SDL_atoi(str) : -1; secs = (energy >= 0 && power > 0) ? (3600LL * energy) / power : -1; } else { secs = -1; @@ -515,7 +501,7 @@ SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *second */ if ((secs < 0) && (*seconds < 0)) { if ((pct < 0) && (*percent < 0)) { - choose = SDL_TRUE; /* at least we know there's a battery. */ + choose = SDL_TRUE; /* at least we know there's a battery. */ } else if (pct > *percent) { choose = SDL_TRUE; } @@ -531,19 +517,17 @@ SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *second } closedir(dirp); - return SDL_TRUE; /* don't look any further. */ + return SDL_TRUE; /* don't look any further. */ } - /* d-bus queries to org.freedesktop.UPower. */ #if SDL_USE_LIBDBUS -#define UPOWER_DBUS_NODE "org.freedesktop.UPower" -#define UPOWER_DBUS_PATH "/org/freedesktop/UPower" -#define UPOWER_DBUS_INTERFACE "org.freedesktop.UPower" +#define UPOWER_DBUS_NODE "org.freedesktop.UPower" +#define UPOWER_DBUS_PATH "/org/freedesktop/UPower" +#define UPOWER_DBUS_INTERFACE "org.freedesktop.UPower" #define UPOWER_DEVICE_DBUS_INTERFACE "org.freedesktop.UPower.Device" -static void -check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *state, int *seconds, int *percent) +static void check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *state, int *seconds, int *percent) { SDL_bool choose = SDL_FALSE; SDL_PowerState st; @@ -554,13 +538,13 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat double d = 0.0; if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "Type", DBUS_TYPE_UINT32, &ui32)) { - return; /* Don't know _what_ we're looking at. Give up on it. */ - } else if (ui32 != 2) { /* 2==Battery*/ - return; /* we don't care about UPS and such. */ + return; /* Don't know _what_ we're looking at. Give up on it. */ + } else if (ui32 != 2) { /* 2==Battery*/ + return; /* we don't care about UPS and such. */ } else if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "PowerSupply", DBUS_TYPE_BOOLEAN, &ui32)) { return; } else if (!ui32) { - return; /* we don't care about random devices with batteries, like wireless controllers, etc */ + return; /* we don't care about random devices with batteries, like wireless controllers, etc */ } if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "IsPresent", DBUS_TYPE_BOOLEAN, &ui32)) { @@ -575,30 +559,30 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat SDL_DBus_CallMethodOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "Refresh", DBUS_TYPE_INVALID, DBUS_TYPE_INVALID); if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "State", DBUS_TYPE_UINT32, &ui32)) { - st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ - } else if (ui32 == 1) { /* 1 == charging */ + st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ + } else if (ui32 == 1) { /* 1 == charging */ st = SDL_POWERSTATE_CHARGING; - } else if ((ui32 == 2) || (ui32 == 3)) { /* 2 == discharging, 3 == empty. */ + } else if ((ui32 == 2) || (ui32 == 3)) { /* 2 == discharging, 3 == empty. */ st = SDL_POWERSTATE_ON_BATTERY; - } else if (ui32 == 4) { /* 4 == full */ + } else if (ui32 == 4) { /* 4 == full */ st = SDL_POWERSTATE_CHARGED; } else { - st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ + st = SDL_POWERSTATE_UNKNOWN; /* uh oh */ } } if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "Percentage", DBUS_TYPE_DOUBLE, &d)) { - pct = -1; /* some old/cheap batteries don't set this property. */ + pct = -1; /* some old/cheap batteries don't set this property. */ } else { - pct = (int) d; + pct = (int)d; pct = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ } if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "TimeToEmpty", DBUS_TYPE_INT64, &si64)) { secs = -1; } else { - secs = (int) si64; - secs = (secs <= 0) ? -1 : secs; /* 0 == unknown */ + secs = (int)si64; + secs = (secs <= 0) ? -1 : secs; /* 0 == unknown */ } /* @@ -607,7 +591,7 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat */ if ((secs < 0) && (*seconds < 0)) { if ((pct < 0) && (*percent < 0)) { - choose = SDL_TRUE; /* at least we know there's a battery. */ + choose = SDL_TRUE; /* at least we know there's a battery. */ } else if (pct > *percent) { choose = SDL_TRUE; } @@ -623,8 +607,7 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat } #endif -SDL_bool -SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *seconds, int *percent) { SDL_bool retval = SDL_FALSE; @@ -633,14 +616,14 @@ SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *second char **paths = NULL; int i, numpaths = 0; - if (!dbus || !SDL_DBus_CallMethodOnConnection(dbus->system_conn, UPOWER_DBUS_NODE, UPOWER_DBUS_PATH, UPOWER_DBUS_INTERFACE, "EnumerateDevices", - DBUS_TYPE_INVALID, - DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &paths, &numpaths, DBUS_TYPE_INVALID)) { - return SDL_FALSE; /* try a different approach than UPower. */ + if (dbus == NULL || !SDL_DBus_CallMethodOnConnection(dbus->system_conn, UPOWER_DBUS_NODE, UPOWER_DBUS_PATH, UPOWER_DBUS_INTERFACE, "EnumerateDevices", + DBUS_TYPE_INVALID, + DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &paths, &numpaths, DBUS_TYPE_INVALID)) { + return SDL_FALSE; /* try a different approach than UPower. */ } - retval = SDL_TRUE; /* Clearly we can use this interface. */ - *state = SDL_POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ + retval = SDL_TRUE; /* Clearly we can use this interface. */ + *state = SDL_POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ *seconds = -1; *percent = -1; @@ -649,7 +632,7 @@ SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *second } dbus->free_string_array(paths); -#endif /* SDL_USE_LIBDBUS */ +#endif /* SDL_USE_LIBDBUS */ return retval; } diff --git a/modules/SDL2/src/power/macosx/SDL_syspower.c b/modules/SDL2/src/power/macosx/SDL_syspower.c index 4905eae..b6af768 100644 --- a/modules/SDL2/src/power/macosx/SDL_syspower.c +++ b/modules/SDL2/src/power/macosx/SDL_syspower.c @@ -30,16 +30,15 @@ #include "SDL_power.h" /* CoreFoundation is so verbose... */ -#define STRMATCH(a,b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo) -#define GETVAL(k,v) \ - CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **) v) +#define STRMATCH(a, b) (CFStringCompare(a, b, 0) == kCFCompareEqualTo) +#define GETVAL(k, v) \ + CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **)v) /* Note that AC power sources also include a laptop battery it is charging. */ -static void -checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, - SDL_bool * charging, int *seconds, int *percent) +static void checkps(CFDictionaryRef dict, SDL_bool *have_ac, SDL_bool *have_battery, + SDL_bool *charging, int *seconds, int *percent) { - CFStringRef strval; /* don't CFRelease() this. */ + CFStringRef strval; /* don't CFRelease() this. */ CFBooleanRef bval; CFNumberRef numval; SDL_bool charge = SDL_FALSE; @@ -50,7 +49,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, int pct = -1; if ((GETVAL(kIOPSIsPresentKey, &bval)) && (bval == kCFBooleanFalse)) { - return; /* nothing to see here. */ + return; /* nothing to see here. */ } if (!GETVAL(kIOPSPowerSourceStateKey, &strval)) { @@ -60,7 +59,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, if (STRMATCH(strval, CFSTR(kIOPSACPowerValue))) { is_ac = *have_ac = SDL_TRUE; } else if (!STRMATCH(strval, CFSTR(kIOPSBatteryPowerValue))) { - return; /* not a battery? */ + return; /* not a battery? */ } if ((GETVAL(kIOPSIsChargingKey, &bval)) && (bval == kCFBooleanTrue)) { @@ -72,7 +71,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, CFNumberGetValue(numval, kCFNumberSInt32Type, &val); if (val > 0) { *have_battery = SDL_TRUE; - maxpct = (int) val; + maxpct = (int)val; } } @@ -81,7 +80,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, CFNumberGetValue(numval, kCFNumberSInt32Type, &val); if (val > 0) { *have_battery = SDL_TRUE; - maxpct = (int) val; + maxpct = (int)val; } } @@ -91,23 +90,23 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, /* Mac OS X reports 0 minutes until empty if you're plugged in. :( */ if ((val == 0) && (is_ac)) { - val = -1; /* !!! FIXME: calc from timeToFull and capacity? */ + val = -1; /* !!! FIXME: calc from timeToFull and capacity? */ } - secs = (int) val; + secs = (int)val; if (secs > 0) { - secs *= 60; /* value is in minutes, so convert to seconds. */ + secs *= 60; /* value is in minutes, so convert to seconds. */ } } if (GETVAL(kIOPSCurrentCapacityKey, &numval)) { SInt32 val = -1; CFNumberGetValue(numval, kCFNumberSInt32Type, &val); - pct = (int) val; + pct = (int)val; } if ((pct > 0) && (maxpct > 0)) { - pct = (int) ((((double) pct) / ((double) maxpct)) * 100.0); + pct = (int)((((double)pct) / ((double)maxpct)) * 100.0); } if (pct > 100) { @@ -120,7 +119,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, */ if ((secs < 0) && (*seconds < 0)) { if ((pct < 0) && (*percent < 0)) { - choose = SDL_TRUE; /* at least we know there's a battery. */ + choose = SDL_TRUE; /* at least we know there's a battery. */ } if (pct > *percent) { choose = SDL_TRUE; @@ -139,9 +138,7 @@ checkps(CFDictionaryRef dict, SDL_bool * have_ac, SDL_bool * have_battery, #undef GETVAL #undef STRMATCH - -SDL_bool -SDL_GetPowerInfo_MacOSX(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *state, int *seconds, int *percent) { CFTypeRef blob = IOPSCopyPowerSourcesInfo(); @@ -159,7 +156,7 @@ SDL_GetPowerInfo_MacOSX(SDL_PowerState * state, int *seconds, int *percent) const CFIndex total = CFArrayGetCount(list); CFIndex i; for (i = 0; i < total; i++) { - CFTypeRef ps = (CFTypeRef) CFArrayGetValueAtIndex(list, i); + CFTypeRef ps = (CFTypeRef)CFArrayGetValueAtIndex(list, i); CFDictionaryRef dict = IOPSGetPowerSourceDescription(blob, ps); if (dict != NULL) { diff --git a/modules/SDL2/src/power/n3ds/SDL_syspower.c b/modules/SDL2/src/power/n3ds/SDL_syspower.c index 0b2f5d4..b565643 100644 --- a/modules/SDL2/src/power/n3ds/SDL_syspower.c +++ b/modules/SDL2/src/power/n3ds/SDL_syspower.c @@ -35,8 +35,7 @@ SDL_FORCE_INLINE int GetBatteryPercentage(void); #define BATTERY_PERCENT_REG 0xB #define BATTERY_PERCENT_REG_SIZE 2 -SDL_bool -SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent) { *state = GetPowerState(); *percent = GetBatteryPercentage(); @@ -45,8 +44,7 @@ SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent) return SDL_TRUE; } -SDL_FORCE_INLINE SDL_PowerState -GetPowerState(void) +static SDL_PowerState GetPowerState(void) { bool is_plugged; u8 is_charging; @@ -66,8 +64,7 @@ GetPowerState(void) return SDL_POWERSTATE_ON_BATTERY; } -SDL_FORCE_INLINE int -ReadStateFromPTMU(bool *is_plugged, u8 *is_charging) +static int ReadStateFromPTMU(bool *is_plugged, u8 *is_charging) { if (R_FAILED(ptmuInit())) { return SDL_SetError("Failed to initialise PTMU service"); @@ -103,7 +100,7 @@ GetBatteryPercentage(void) mcuHwcExit(); - return (int) SDL_round(data[0] + data[1] / 256.0); + return (int)SDL_round(data[0] + data[1] / 256.0); } #endif /* !SDL_POWER_DISABLED && SDL_POWER_N3DS */ diff --git a/modules/SDL2/src/power/psp/SDL_syspower.c b/modules/SDL2/src/power/psp/SDL_syspower.c index 9ff93e0..2811978 100644 --- a/modules/SDL2/src/power/psp/SDL_syspower.c +++ b/modules/SDL2/src/power/psp/SDL_syspower.c @@ -27,10 +27,7 @@ #include "SDL_power.h" #include - -SDL_bool -SDL_GetPowerInfo_PSP(SDL_PowerState * state, int *seconds, - int *percent) +SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *state, int *seconds, int *percent) { int battery = scePowerIsBatteryExist(); int plugged = scePowerIsPowerOnline(); @@ -47,19 +44,18 @@ SDL_GetPowerInfo_PSP(SDL_PowerState * state, int *seconds, } else if (charging) { *state = SDL_POWERSTATE_CHARGING; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } else if (plugged) { *state = SDL_POWERSTATE_CHARGED; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } else { *state = SDL_POWERSTATE_ON_BATTERY; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } - - return SDL_TRUE; /* always the definitive answer on PSP. */ + return SDL_TRUE; /* always the definitive answer on PSP. */ } #endif /* SDL_POWER_PSP */ diff --git a/modules/SDL2/src/power/uikit/SDL_syspower.h b/modules/SDL2/src/power/uikit/SDL_syspower.h index aeb0368..73149c8 100644 --- a/modules/SDL2/src/power/uikit/SDL_syspower.h +++ b/modules/SDL2/src/power/uikit/SDL_syspower.h @@ -25,7 +25,7 @@ #include "SDL_power.h" void SDL_UIKit_UpdateBatteryMonitoring(void); -SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent); +SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *state, int *seconds, int *percent); #endif /* SDL_POWER_UIKIT */ diff --git a/modules/SDL2/src/power/uikit/SDL_syspower.m b/modules/SDL2/src/power/uikit/SDL_syspower.m index dfc2fc6..5b9076b 100644 --- a/modules/SDL2/src/power/uikit/SDL_syspower.m +++ b/modules/SDL2/src/power/uikit/SDL_syspower.m @@ -34,8 +34,7 @@ static const int BATTERY_MONITORING_TIMEOUT = 3000; static Uint32 SDL_UIKitLastPowerInfoQuery = 0; -void -SDL_UIKit_UpdateBatteryMonitoring(void) +void SDL_UIKit_UpdateBatteryMonitoring(void) { if (SDL_UIKitLastPowerInfoQuery) { if (SDL_TICKS_PASSED(SDL_GetTicks(), SDL_UIKitLastPowerInfoQuery + BATTERY_MONITORING_TIMEOUT)) { @@ -47,21 +46,19 @@ SDL_UIKit_UpdateBatteryMonitoring(void) } } #else -void -SDL_UIKit_UpdateBatteryMonitoring(void) +void SDL_UIKit_UpdateBatteryMonitoring(void) { /* Do nothing. */ } #endif /* !TARGET_OS_TV */ -SDL_bool -SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *state, int *seconds, int *percent) { #if TARGET_OS_TV *state = SDL_POWERSTATE_NO_BATTERY; *seconds = -1; *percent = -1; -#else /* TARGET_OS_TV */ +#else /* TARGET_OS_TV */ @autoreleasepool { UIDevice *uidev = [UIDevice currentDevice]; @@ -77,7 +74,7 @@ SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent) */ SDL_UIKitLastPowerInfoQuery = SDL_GetTicks(); - *seconds = -1; /* no API to estimate this in UIKit. */ + *seconds = -1; /* no API to estimate this in UIKit. */ switch (uidev.batteryState) { case UIDeviceBatteryStateCharging: @@ -99,7 +96,7 @@ SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent) } const float level = uidev.batteryLevel; - *percent = ( (level < 0.0f) ? -1 : ((int) ((level * 100) + 0.5f)) ); + *percent = ((level < 0.0f) ? -1 : ((int)((level * 100) + 0.5f))); } #endif /* TARGET_OS_TV */ diff --git a/modules/SDL2/src/power/vita/SDL_syspower.c b/modules/SDL2/src/power/vita/SDL_syspower.c index 6a2f17a..6c28e92 100644 --- a/modules/SDL2/src/power/vita/SDL_syspower.c +++ b/modules/SDL2/src/power/vita/SDL_syspower.c @@ -27,10 +27,7 @@ #include "SDL_power.h" #include - -SDL_bool -SDL_GetPowerInfo_VITA(SDL_PowerState * state, int *seconds, - int *percent) +SDL_bool SDL_GetPowerInfo_VITA(SDL_PowerState *state, int *seconds, int *percent) { int battery = 1; int plugged = scePowerIsPowerOnline(); @@ -47,19 +44,18 @@ SDL_GetPowerInfo_VITA(SDL_PowerState * state, int *seconds, } else if (charging) { *state = SDL_POWERSTATE_CHARGING; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } else if (plugged) { *state = SDL_POWERSTATE_CHARGED; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } else { *state = SDL_POWERSTATE_ON_BATTERY; *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *seconds = scePowerGetBatteryLifeTime() * 60; } - - return SDL_TRUE; /* always the definitive answer on VITA. */ + return SDL_TRUE; /* always the definitive answer on VITA. */ } #endif /* SDL_POWER_VITA */ diff --git a/modules/SDL2/src/power/windows/SDL_syspower.c b/modules/SDL2/src/power/windows/SDL_syspower.c index b4b59d6..f1d7d88 100644 --- a/modules/SDL2/src/power/windows/SDL_syspower.c +++ b/modules/SDL2/src/power/windows/SDL_syspower.c @@ -27,18 +27,16 @@ #include "SDL_power.h" -SDL_bool -SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *state, int *seconds, int *percent) { SYSTEM_POWER_STATUS status; SDL_bool need_details = SDL_FALSE; /* This API should exist back to Win95. */ - if (!GetSystemPowerStatus(&status)) - { + if (!GetSystemPowerStatus(&status)) { /* !!! FIXME: push GetLastError() into SDL_GetError() */ *state = SDL_POWERSTATE_UNKNOWN; - } else if (status.BatteryFlag == 0xFF) { /* unknown state */ + } else if (status.BatteryFlag == 0xFF) { /* unknown state */ *state = SDL_POWERSTATE_UNKNOWN; } else if (status.BatteryFlag & (1 << 7)) { /* no battery */ *state = SDL_POWERSTATE_NO_BATTERY; @@ -46,28 +44,28 @@ SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent) *state = SDL_POWERSTATE_CHARGING; need_details = SDL_TRUE; } else if (status.ACLineStatus == 1) { - *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ + *state = SDL_POWERSTATE_CHARGED; /* on AC, not charging. */ need_details = SDL_TRUE; } else { - *state = SDL_POWERSTATE_ON_BATTERY; /* not on AC. */ + *state = SDL_POWERSTATE_ON_BATTERY; /* not on AC. */ need_details = SDL_TRUE; } *percent = -1; *seconds = -1; if (need_details) { - const int pct = (int) status.BatteryLifePercent; - const int secs = (int) status.BatteryLifeTime; + const int pct = (int)status.BatteryLifePercent; + const int secs = (int)status.BatteryLifeTime; - if (pct != 255) { /* 255 == unknown */ + if (pct != 255) { /* 255 == unknown */ *percent = (pct > 100) ? 100 : pct; /* clamp between 0%, 100% */ } - if (secs != 0xFFFFFFFF) { /* ((DWORD)-1) == unknown */ + if (secs != 0xFFFFFFFF) { /* ((DWORD)-1) == unknown */ *seconds = secs; } } - return SDL_TRUE; /* always the definitive answer on Windows. */ + return SDL_TRUE; /* always the definitive answer on Windows. */ } #endif /* SDL_POWER_WINDOWS */ diff --git a/modules/SDL2/src/power/winrt/SDL_syspower.cpp b/modules/SDL2/src/power/winrt/SDL_syspower.cpp index 8d3629c..2a46de7 100644 --- a/modules/SDL2/src/power/winrt/SDL_syspower.cpp +++ b/modules/SDL2/src/power/winrt/SDL_syspower.cpp @@ -26,8 +26,7 @@ #include "SDL_power.h" extern "C" -SDL_bool -SDL_GetPowerInfo_WinRT(SDL_PowerState * state, int *seconds, int *percent) +SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState * state, int *seconds, int *percent) { /* TODO, WinRT: Battery info is available on at least one WinRT platform (Windows Phone 8). Implement SDL_GetPowerInfo_WinRT as appropriate. */ /* Notes: diff --git a/modules/SDL2/src/render/SDL_d3dmath.c b/modules/SDL2/src/render/SDL_d3dmath.c index 550514a..d1cac13 100644 --- a/modules/SDL2/src/render/SDL_d3dmath.c +++ b/modules/SDL2/src/render/SDL_d3dmath.c @@ -128,7 +128,6 @@ Float4X4 MatrixRotationZ(float r) m.v._33 = 1.0f; m.v._44 = 1.0f; return m; - } #endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED */ diff --git a/modules/SDL2/src/render/SDL_d3dmath.h b/modules/SDL2/src/render/SDL_d3dmath.h index 1b1a610..7383873 100644 --- a/modules/SDL2/src/render/SDL_d3dmath.h +++ b/modules/SDL2/src/render/SDL_d3dmath.h @@ -52,8 +52,10 @@ typedef struct typedef struct { - union { - struct { + union + { + struct + { float _11, _12, _13, _14; float _21, _22, _23, _24; float _31, _32, _33, _34; @@ -63,7 +65,6 @@ typedef struct }; } Float4X4; - Float4X4 MatrixIdentity(); Float4X4 MatrixMultiply(Float4X4 M1, Float4X4 M2); Float4X4 MatrixScaling(float x, float y, float z); diff --git a/modules/SDL2/src/render/SDL_render.c b/modules/SDL2/src/render/SDL_render.c index 5d1c841..21d6324 100644 --- a/modules/SDL2/src/render/SDL_render.c +++ b/modules/SDL2/src/render/SDL_render.c @@ -30,7 +30,7 @@ #include "../video/SDL_pixels_c.h" #if defined(__ANDROID__) -# include "../core/android/SDL_android.h" +#include "../core/android/SDL_android.h" #endif /* as a courtesy to iOS apps, we don't try to draw when in the background, as @@ -45,49 +45,49 @@ this should probably be removed at some point in the future. --ryan. */ #define DONT_DRAW_WHILE_HIDDEN 0 #endif -#define SDL_WINDOWRENDERDATA "_SDL_WindowRenderData" +#define SDL_WINDOWRENDERDATA "_SDL_WindowRenderData" -#define CHECK_RENDERER_MAGIC(renderer, retval) \ +#define CHECK_RENDERER_MAGIC(renderer, retval) \ if (!renderer || renderer->magic != &renderer_magic) { \ - SDL_InvalidParamError("renderer"); \ - return retval; \ + SDL_InvalidParamError("renderer"); \ + return retval; \ } -#define CHECK_TEXTURE_MAGIC(texture, retval) \ +#define CHECK_TEXTURE_MAGIC(texture, retval) \ if (!texture || texture->magic != &texture_magic) { \ - SDL_InvalidParamError("texture"); \ - return retval; \ + SDL_InvalidParamError("texture"); \ + return retval; \ } /* Predefined blend modes */ #define SDL_COMPOSE_BLENDMODE(srcColorFactor, dstColorFactor, colorOperation, \ srcAlphaFactor, dstAlphaFactor, alphaOperation) \ - (SDL_BlendMode)(((Uint32)colorOperation << 0) | \ - ((Uint32)srcColorFactor << 4) | \ - ((Uint32)dstColorFactor << 8) | \ - ((Uint32)alphaOperation << 16) | \ - ((Uint32)srcAlphaFactor << 20) | \ + (SDL_BlendMode)(((Uint32)colorOperation << 0) | \ + ((Uint32)srcColorFactor << 4) | \ + ((Uint32)dstColorFactor << 8) | \ + ((Uint32)alphaOperation << 16) | \ + ((Uint32)srcAlphaFactor << 20) | \ ((Uint32)dstAlphaFactor << 24)) -#define SDL_BLENDMODE_NONE_FULL \ +#define SDL_BLENDMODE_NONE_FULL \ SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ZERO, SDL_BLENDOPERATION_ADD, \ SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ZERO, SDL_BLENDOPERATION_ADD) -#define SDL_BLENDMODE_BLEND_FULL \ +#define SDL_BLENDMODE_BLEND_FULL \ SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, \ SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD) -#define SDL_BLENDMODE_ADD_FULL \ +#define SDL_BLENDMODE_ADD_FULL \ SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD, \ SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD) -#define SDL_BLENDMODE_MOD_FULL \ +#define SDL_BLENDMODE_MOD_FULL \ SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_SRC_COLOR, SDL_BLENDOPERATION_ADD, \ SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD) -#define SDL_BLENDMODE_MUL_FULL \ +#define SDL_BLENDMODE_MUL_FULL \ SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_DST_COLOR, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, \ - SDL_BLENDFACTOR_DST_ALPHA, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD) + SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD) #if !SDL_RENDER_DISABLED static const SDL_RenderDriver *render_drivers[] = { @@ -115,7 +115,7 @@ static const SDL_RenderDriver *render_drivers[] = { #if SDL_VIDEO_RENDER_DIRECTFB &DirectFB_RenderDriver, #endif -#if SDL_VIDEO_RENDER_PS2 && !SDL_RENDER_DISABLED +#if SDL_VIDEO_RENDER_PS2 &PS2_RenderDriver, #endif #if SDL_VIDEO_RENDER_PSP @@ -133,8 +133,7 @@ static const SDL_RenderDriver *render_drivers[] = { static char renderer_magic; static char texture_magic; -static SDL_INLINE void -DebugLogRenderCommands(const SDL_RenderCommand *cmd) +static SDL_INLINE void DebugLogRenderCommands(const SDL_RenderCommand *cmd) { #if 0 unsigned int i = 1; @@ -234,14 +233,13 @@ DebugLogRenderCommands(const SDL_RenderCommand *cmd) #endif } -static int -FlushRenderCommands(SDL_Renderer *renderer) +static int FlushRenderCommands(SDL_Renderer *renderer) { int retval; SDL_assert((renderer->render_commands == NULL) == (renderer->render_commands_tail == NULL)); - if (renderer->render_commands == NULL) { /* nothing to do! */ + if (renderer->render_commands == NULL) { /* nothing to do! */ SDL_assert(renderer->vertex_data_used == 0); return 0; } @@ -265,8 +263,7 @@ FlushRenderCommands(SDL_Renderer *renderer) return retval; } -static int -FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture) +static int FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture) { SDL_Renderer *renderer = texture->renderer; if (texture->last_command_generation == renderer->render_command_generation) { @@ -276,20 +273,17 @@ FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture) return 0; } -static SDL_INLINE int -FlushRenderCommandsIfNotBatching(SDL_Renderer *renderer) +static SDL_INLINE int FlushRenderCommandsIfNotBatching(SDL_Renderer *renderer) { return renderer->batching ? 0 : FlushRenderCommands(renderer); } -int -SDL_RenderFlush(SDL_Renderer * renderer) +int SDL_RenderFlush(SDL_Renderer *renderer) { return FlushRenderCommands(renderer); } -void * -SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset) +void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset) { const size_t needed = renderer->vertex_data_used + numbytes + alignment; const size_t current_offset = renderer->vertex_data_used; @@ -321,11 +315,10 @@ SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const renderer->vertex_data_used += aligner + numbytes; - return ((Uint8 *) renderer->vertex_data) + aligned; + return ((Uint8 *)renderer->vertex_data) + aligned; } -static SDL_RenderCommand * -AllocateRenderCommand(SDL_Renderer *renderer) +static SDL_RenderCommand *AllocateRenderCommand(SDL_Renderer *renderer) { SDL_RenderCommand *retval = NULL; @@ -335,8 +328,8 @@ AllocateRenderCommand(SDL_Renderer *renderer) renderer->render_commands_pool = retval->next; retval->next = NULL; } else { - retval = SDL_calloc(1, sizeof (*retval)); - if (!retval) { + retval = SDL_calloc(1, sizeof(*retval)); + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -353,16 +346,15 @@ AllocateRenderCommand(SDL_Renderer *renderer) return retval; } -static int -QueueCmdSetViewport(SDL_Renderer *renderer) +static int QueueCmdSetViewport(SDL_Renderer *renderer) { int retval = 0; - if (!renderer->viewport_queued || (SDL_memcmp(&renderer->viewport, &renderer->last_queued_viewport, sizeof (SDL_DRect)) != 0)) { + if (!renderer->viewport_queued || (SDL_memcmp(&renderer->viewport, &renderer->last_queued_viewport, sizeof(SDL_DRect)) != 0)) { SDL_RenderCommand *cmd = AllocateRenderCommand(renderer); retval = -1; if (cmd != NULL) { cmd->command = SDL_RENDERCMD_SETVIEWPORT; - cmd->data.viewport.first = 0; /* render backend will fill this in. */ + cmd->data.viewport.first = 0; /* render backend will fill this in. */ /* Convert SDL_DRect to SDL_Rect */ cmd->data.viewport.rect.x = (int)SDL_floor(renderer->viewport.x); cmd->data.viewport.rect.y = (int)SDL_floor(renderer->viewport.y); @@ -380,13 +372,12 @@ QueueCmdSetViewport(SDL_Renderer *renderer) return retval; } -static int -QueueCmdSetClipRect(SDL_Renderer *renderer) +static int QueueCmdSetClipRect(SDL_Renderer *renderer) { int retval = 0; if ((!renderer->cliprect_queued) || - (renderer->clipping_enabled != renderer->last_queued_cliprect_enabled) || - (SDL_memcmp(&renderer->clip_rect, &renderer->last_queued_cliprect, sizeof (SDL_DRect)) != 0)) { + (renderer->clipping_enabled != renderer->last_queued_cliprect_enabled) || + (SDL_memcmp(&renderer->clip_rect, &renderer->last_queued_cliprect, sizeof(SDL_DRect)) != 0)) { SDL_RenderCommand *cmd = AllocateRenderCommand(renderer); if (cmd == NULL) { retval = -1; @@ -406,8 +397,7 @@ QueueCmdSetClipRect(SDL_Renderer *renderer) return retval; } -static int -QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_Color *col) +static int QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_Color *col) { const Uint32 color = (((Uint32)col->a << 24) | (col->r << 16) | (col->g << 8) | col->b); int retval = 0; @@ -418,7 +408,7 @@ QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_Color *col) if (cmd != NULL) { cmd->command = SDL_RENDERCMD_SETDRAWCOLOR; - cmd->data.color.first = 0; /* render backend will fill this in. */ + cmd->data.color.first = 0; /* render backend will fill this in. */ cmd->data.color.r = col->r; cmd->data.color.g = col->g; cmd->data.color.b = col->b; @@ -435,8 +425,7 @@ QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_Color *col) return retval; } -static int -QueueCmdClear(SDL_Renderer *renderer) +static int QueueCmdClear(SDL_Renderer *renderer) { SDL_RenderCommand *cmd = AllocateRenderCommand(renderer); if (cmd == NULL) { @@ -452,8 +441,7 @@ QueueCmdClear(SDL_Renderer *renderer) return 0; } -static SDL_RenderCommand * -PrepQueueCmdDraw(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype, SDL_Texture *texture) +static SDL_RenderCommand *PrepQueueCmdDraw(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype, SDL_Texture *texture) { SDL_RenderCommand *cmd = NULL; int retval = 0; @@ -486,8 +474,8 @@ PrepQueueCmdDraw(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype, SD cmd = AllocateRenderCommand(renderer); if (cmd != NULL) { cmd->command = cmdtype; - cmd->data.draw.first = 0; /* render backend will fill this in. */ - cmd->data.draw.count = 0; /* render backend will fill this in. */ + cmd->data.draw.first = 0; /* render backend will fill this in. */ + cmd->data.draw.count = 0; /* render backend will fill this in. */ cmd->data.draw.r = color->r; cmd->data.draw.g = color->g; cmd->data.draw.b = color->b; @@ -499,8 +487,7 @@ PrepQueueCmdDraw(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype, SD return cmd; } -static int -QueueCmdDrawPoints(SDL_Renderer *renderer, const SDL_FPoint * points, const int count) +static int QueueCmdDrawPoints(SDL_Renderer *renderer, const SDL_FPoint *points, const int count) { SDL_RenderCommand *cmd = PrepQueueCmdDraw(renderer, SDL_RENDERCMD_DRAW_POINTS, NULL); int retval = -1; @@ -513,8 +500,7 @@ QueueCmdDrawPoints(SDL_Renderer *renderer, const SDL_FPoint * points, const int return retval; } -static int -QueueCmdDrawLines(SDL_Renderer *renderer, const SDL_FPoint * points, const int count) +static int QueueCmdDrawLines(SDL_Renderer *renderer, const SDL_FPoint *points, const int count) { SDL_RenderCommand *cmd = PrepQueueCmdDraw(renderer, SDL_RENDERCMD_DRAW_LINES, NULL); int retval = -1; @@ -527,8 +513,7 @@ QueueCmdDrawLines(SDL_Renderer *renderer, const SDL_FPoint * points, const int c return retval; } -static int -QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int count) +static int QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, const int count) { SDL_RenderCommand *cmd; int retval = -1; @@ -547,7 +532,7 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou int i; float *ptr_xy = xy; int *ptr_indices = indices; - const int xy_stride = 2 * sizeof (float); + const int xy_stride = 2 * sizeof(float); const int num_vertices = 4 * count; const int num_indices = 6 * count; const int size_indices = 4; @@ -581,9 +566,9 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou } retval = renderer->QueueGeometry(renderer, cmd, NULL, - xy, xy_stride, &renderer->color, 0 /* color_stride */, NULL, 0, - num_vertices, indices, num_indices, size_indices, - 1.0f, 1.0f); + xy, xy_stride, &renderer->color, 0 /* color_stride */, NULL, 0, + num_vertices, indices, num_indices, size_indices, + 1.0f, 1.0f); if (retval < 0) { cmd->command = SDL_RENDERCMD_NO_OP; @@ -591,7 +576,7 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou } SDL_small_free(xy, isstack1); SDL_small_free(indices, isstack2); - + } else { retval = renderer->QueueFillRects(renderer, cmd, rects, count); if (retval < 0) { @@ -602,8 +587,7 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou return retval; } -static int -QueueCmdCopy(SDL_Renderer *renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect) +static int QueueCmdCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_FRect *dstrect) { SDL_RenderCommand *cmd = PrepQueueCmdDraw(renderer, SDL_RENDERCMD_COPY, texture); int retval = -1; @@ -616,10 +600,9 @@ QueueCmdCopy(SDL_Renderer *renderer, SDL_Texture * texture, const SDL_Rect * src return retval; } -static int -QueueCmdCopyEx(SDL_Renderer *renderer, SDL_Texture * texture, - const SDL_Rect * srcquad, const SDL_FRect * dstrect, - const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) +static int QueueCmdCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *srcquad, const SDL_FRect *dstrect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) { SDL_RenderCommand *cmd = PrepQueueCmdDraw(renderer, SDL_RENDERCMD_COPY_EX, texture); int retval = -1; @@ -632,24 +615,23 @@ QueueCmdCopyEx(SDL_Renderer *renderer, SDL_Texture * texture, return retval; } -static int -QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture, - const float *xy, int xy_stride, - const SDL_Color *color, int color_stride, - const float *uv, int uv_stride, - int num_vertices, - const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture, + const float *xy, int xy_stride, + const SDL_Color *color, int color_stride, + const float *uv, int uv_stride, + int num_vertices, + const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { SDL_RenderCommand *cmd; int retval = -1; cmd = PrepQueueCmdDraw(renderer, SDL_RENDERCMD_GEOMETRY, texture); if (cmd != NULL) { retval = renderer->QueueGeometry(renderer, cmd, texture, - xy, xy_stride, - color, color_stride, uv, uv_stride, - num_vertices, indices, num_indices, size_indices, - scale_x, scale_y); + xy, xy_stride, + color, color_stride, uv, uv_stride, + num_vertices, indices, num_indices, size_indices, + scale_x, scale_y); if (retval < 0) { cmd->command = SDL_RENDERCMD_NO_OP; } @@ -659,8 +641,7 @@ QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture, static int UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd); -int -SDL_GetNumRenderDrivers(void) +int SDL_GetNumRenderDrivers(void) { #if !SDL_RENDER_DISABLED return SDL_arraysize(render_drivers); @@ -669,8 +650,7 @@ SDL_GetNumRenderDrivers(void) #endif } -int -SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info) +int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo *info) { #if !SDL_RENDER_DISABLED if (index < 0 || index >= SDL_GetNumRenderDrivers()) { @@ -694,8 +674,7 @@ static void GetWindowViewportValues(SDL_Renderer *renderer, int *logical_w, int SDL_UnlockMutex(renderer->target_mutex); } -static int SDLCALL -SDL_RendererEventWatch(void *userdata, SDL_Event *event) +static int SDLCALL SDL_RendererEventWatch(void *userdata, SDL_Event *event) { SDL_Renderer *renderer = (SDL_Renderer *)userdata; @@ -795,13 +774,13 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event) float rel = renderer->xrel + event->motion.xrel / (scale.x * renderer->dpi_scale.x); float truncated = SDL_truncf(rel); renderer->xrel = rel - truncated; - event->motion.xrel = (Sint32) truncated; + event->motion.xrel = (Sint32)truncated; } if (event->motion.yrel != 0 && renderer->relative_scaling) { float rel = renderer->yrel + event->motion.yrel / (scale.y * renderer->dpi_scale.y); float truncated = SDL_truncf(rel); renderer->yrel = rel - truncated; - event->motion.yrel = (Sint32) truncated; + event->motion.yrel = (Sint32)truncated; } } } @@ -839,38 +818,38 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event) if (renderer->GetOutputSize) { int w, h; renderer->GetOutputSize(renderer, &w, &h); - physical_w = (float) w; - physical_h = (float) h; + physical_w = (float)w; + physical_h = (float)h; } else { int w, h; SDL_GetWindowSize(renderer->window, &w, &h); - physical_w = ((float) w) * renderer->dpi_scale.x; - physical_h = ((float) h) * renderer->dpi_scale.y; + physical_w = ((float)w) * renderer->dpi_scale.x; + physical_h = ((float)h) * renderer->dpi_scale.y; } - if (physical_w == 0.0f) { /* nowhere for the touch to go, avoid division by zero and put it dead center. */ + if (physical_w == 0.0f) { /* nowhere for the touch to go, avoid division by zero and put it dead center. */ event->tfinger.x = 0.5f; } else { - const float normalized_viewport_x = ((float) viewport.x) / physical_w; - const float normalized_viewport_w = ((float) viewport.w) / physical_w; + const float normalized_viewport_x = ((float)viewport.x) / physical_w; + const float normalized_viewport_w = ((float)viewport.w) / physical_w; if (event->tfinger.x <= normalized_viewport_x) { - event->tfinger.x = 0.0f; /* to the left of the viewport, clamp to the edge. */ + event->tfinger.x = 0.0f; /* to the left of the viewport, clamp to the edge. */ } else if (event->tfinger.x >= (normalized_viewport_x + normalized_viewport_w)) { - event->tfinger.x = 1.0f; /* to the right of the viewport, clamp to the edge. */ + event->tfinger.x = 1.0f; /* to the right of the viewport, clamp to the edge. */ } else { event->tfinger.x = (event->tfinger.x - normalized_viewport_x) / normalized_viewport_w; } } - if (physical_h == 0.0f) { /* nowhere for the touch to go, avoid division by zero and put it dead center. */ + if (physical_h == 0.0f) { /* nowhere for the touch to go, avoid division by zero and put it dead center. */ event->tfinger.y = 0.5f; } else { - const float normalized_viewport_y = ((float) viewport.y) / physical_h; - const float normalized_viewport_h = ((float) viewport.h) / physical_h; + const float normalized_viewport_y = ((float)viewport.y) / physical_h; + const float normalized_viewport_h = ((float)viewport.h) / physical_h; if (event->tfinger.y <= normalized_viewport_y) { - event->tfinger.y = 0.0f; /* to the left of the viewport, clamp to the edge. */ + event->tfinger.y = 0.0f; /* to the left of the viewport, clamp to the edge. */ } else if (event->tfinger.y >= (normalized_viewport_y + normalized_viewport_h)) { - event->tfinger.y = 1.0f; /* to the right of the viewport, clamp to the edge. */ + event->tfinger.y = 1.0f; /* to the right of the viewport, clamp to the edge. */ } else { event->tfinger.y = (event->tfinger.y - normalized_viewport_y) / normalized_viewport_h; } @@ -880,13 +859,12 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event) return 0; } -int -SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags, - SDL_Window **window, SDL_Renderer **renderer) +int SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags, + SDL_Window **window, SDL_Renderer **renderer) { *window = SDL_CreateWindow(NULL, SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, - width, height, window_flags); + SDL_WINDOWPOS_UNDEFINED, + width, height, window_flags); if (!*window) { *renderer = NULL; return -1; @@ -901,8 +879,7 @@ SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags, } #if !SDL_RENDER_DISABLED -static SDL_INLINE -void VerifyDrawQueueFunctions(const SDL_Renderer *renderer) +static SDL_INLINE void VerifyDrawQueueFunctions(const SDL_Renderer *renderer) { /* all of these functions are required to be implemented, even as no-ops, so we don't have to check that they aren't NULL over and over. */ @@ -956,8 +933,7 @@ static void SDL_CalculateSimulatedVSyncInterval(SDL_Renderer *renderer, SDL_Wind } #endif /* !SDL_RENDER_DISABLED */ -SDL_Renderer * -SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) +SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags) { #if !SDL_RENDER_DISABLED SDL_Renderer *renderer = NULL; @@ -969,11 +945,16 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) Android_ActivityMutex_Lock_Running(); #endif - if (!window) { + if (window == NULL) { SDL_InvalidParamError("window"); goto error; } + if (SDL_HasWindowSurface(window)) { + SDL_SetError("Surface already associated with window"); + goto error; + } + if (SDL_GetRenderer(window)) { SDL_SetError("Renderer already associated with window"); goto error; @@ -1005,7 +986,7 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) } } - if (!renderer) { + if (renderer == NULL) { for (index = 0; index < n; ++index) { const SDL_RenderDriver *driver = render_drivers[index]; @@ -1019,7 +1000,7 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) } } } - if (!renderer) { + if (renderer == NULL) { SDL_SetError("Couldn't find matching render driver"); goto error; } @@ -1032,15 +1013,15 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) /* Create a new renderer instance */ renderer = render_drivers[index]->CreateRenderer(window, flags); batching = SDL_FALSE; - if (!renderer) { + if (renderer == NULL) { goto error; } } - if ((flags & SDL_RENDERER_PRESENTVSYNC) != 0) { + if (flags & SDL_RENDERER_PRESENTVSYNC) { renderer->wanted_vsync = SDL_TRUE; - if ((renderer->info.flags & SDL_RENDERER_PRESENTVSYNC) == 0) { + if (!(renderer->info.flags & SDL_RENDERER_PRESENTVSYNC)) { renderer->simulate_vsync = SDL_TRUE; renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; } @@ -1092,7 +1073,7 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) renderer->line_method = SDL_GetRenderLineMethod(); - if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) { + if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN | SDL_WINDOW_MINIMIZED)) { renderer->hidden = SDL_TRUE; } else { renderer->hidden = SDL_FALSE; @@ -1125,8 +1106,7 @@ error: #endif } -SDL_Renderer * -SDL_CreateSoftwareRenderer(SDL_Surface * surface) +SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface) { #if !SDL_RENDER_DISABLED && SDL_VIDEO_RENDER_SW SDL_Renderer *renderer; @@ -1155,21 +1135,18 @@ SDL_CreateSoftwareRenderer(SDL_Surface * surface) #endif /* !SDL_RENDER_DISABLED */ } -SDL_Renderer * -SDL_GetRenderer(SDL_Window * window) +SDL_Renderer *SDL_GetRenderer(SDL_Window *window) { return (SDL_Renderer *)SDL_GetWindowData(window, SDL_WINDOWRENDERDATA); } -SDL_Window * -SDL_RenderGetWindow(SDL_Renderer *renderer) +SDL_Window *SDL_RenderGetWindow(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, NULL); return renderer->window; } -int -SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info) +int SDL_GetRendererInfo(SDL_Renderer *renderer, SDL_RendererInfo *info) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -1177,8 +1154,7 @@ SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info) return 0; } -int -SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h) +int SDL_GetRendererOutputSize(SDL_Renderer *renderer, int *w, int *h) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -1195,11 +1171,9 @@ SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h) } } -static SDL_bool -IsSupportedBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool IsSupportedBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { - switch (blendMode) - { + switch (blendMode) { /* These are required to be supported by all renderers */ case SDL_BLENDMODE_NONE: case SDL_BLENDMODE_BLEND: @@ -1213,8 +1187,7 @@ IsSupportedBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) } } -static SDL_bool -IsSupportedFormat(SDL_Renderer * renderer, Uint32 format) +static SDL_bool IsSupportedFormat(SDL_Renderer *renderer, Uint32 format) { Uint32 i; @@ -1226,8 +1199,7 @@ IsSupportedFormat(SDL_Renderer * renderer, Uint32 format) return SDL_FALSE; } -static Uint32 -GetClosestSupportedFormat(SDL_Renderer * renderer, Uint32 format) +static Uint32 GetClosestSupportedFormat(SDL_Renderer *renderer, Uint32 format) { Uint32 i; @@ -1252,12 +1224,11 @@ GetClosestSupportedFormat(SDL_Renderer * renderer, Uint32 format) return renderer->info.texture_formats[0]; } - static SDL_ScaleMode SDL_GetScaleMode(void) { const char *hint = SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY); - if (!hint || SDL_strcasecmp(hint, "nearest") == 0) { + if (hint == NULL || SDL_strcasecmp(hint, "nearest") == 0) { return SDL_ScaleModeNearest; } else if (SDL_strcasecmp(hint, "linear") == 0) { return SDL_ScaleModeLinear; @@ -1268,8 +1239,7 @@ static SDL_ScaleMode SDL_GetScaleMode(void) } } -SDL_Texture * -SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h) +SDL_Texture *SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int h) { SDL_Texture *texture; SDL_bool texture_is_fourcc_and_target; @@ -1298,8 +1268,8 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int SDL_SetError("Texture dimensions are limited to %dx%d", renderer->info.max_texture_width, renderer->info.max_texture_height); return NULL; } - texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture)); - if (!texture) { + texture = (SDL_Texture *)SDL_calloc(1, sizeof(*texture)); + if (texture == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1369,7 +1339,7 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int } else if (access == SDL_TEXTUREACCESS_STREAMING) { /* The pitch is 4 byte aligned */ texture->pitch = (((w * SDL_BYTESPERPIXEL(format)) + 3) & ~3); - texture->pixels = SDL_calloc(1, texture->pitch * h); + texture->pixels = SDL_calloc(1, (size_t)texture->pitch * h); if (!texture->pixels) { SDL_DestroyTexture(texture); return NULL; @@ -1379,8 +1349,7 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int return texture; } -SDL_Texture * -SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) +SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface) { const SDL_PixelFormat *fmt; SDL_bool needAlpha; @@ -1391,7 +1360,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) CHECK_RENDERER_MAGIC(renderer, NULL); - if (!surface) { + if (surface == NULL) { SDL_InvalidParamError("SDL_CreateTextureFromSurface(): surface"); return NULL; } @@ -1446,7 +1415,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) format = renderer->info.texture_formats[0]; for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) { if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) && - SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) { + SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) { format = renderer->info.texture_formats[i]; break; } @@ -1455,13 +1424,13 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) texture = SDL_CreateTexture(renderer, format, SDL_TEXTUREACCESS_STATIC, surface->w, surface->h); - if (!texture) { + if (texture == NULL) { return NULL; } if (format == surface->format->format) { if (surface->format->Amask && SDL_HasColorKey(surface)) { - /* Surface and Renderer formats are identicals. + /* Surface and Renderer formats are identicals. * Intermediate conversion is needed to convert color key to alpha (SDL_ConvertColorkeyToAlpha()). */ direct_update = SDL_FALSE; } else { @@ -1499,9 +1468,9 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) /* Set up a destination surface for the texture update */ dst_fmt = SDL_AllocFormat(format); - if (!dst_fmt) { - SDL_DestroyTexture(texture); - return NULL; + if (dst_fmt == NULL) { + SDL_DestroyTexture(texture); + return NULL; } temp = SDL_ConvertSurface(surface, dst_fmt, 0); SDL_FreeFormat(dst_fmt); @@ -1535,9 +1504,8 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface) return texture; } -int -SDL_QueryTexture(SDL_Texture * texture, Uint32 * format, int *access, - int *w, int *h) +int SDL_QueryTexture(SDL_Texture *texture, Uint32 *format, int *access, + int *w, int *h) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1556,8 +1524,7 @@ SDL_QueryTexture(SDL_Texture * texture, Uint32 * format, int *access, return 0; } -int -SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b) +int SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1575,9 +1542,8 @@ SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b) return 0; } -int -SDL_GetTextureColorMod(SDL_Texture * texture, Uint8 * r, Uint8 * g, - Uint8 * b) +int SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, + Uint8 *b) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1593,8 +1559,7 @@ SDL_GetTextureColorMod(SDL_Texture * texture, Uint8 * r, Uint8 * g, return 0; } -int -SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha) +int SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1610,8 +1575,7 @@ SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha) return 0; } -int -SDL_GetTextureAlphaMod(SDL_Texture * texture, Uint8 * alpha) +int SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1621,8 +1585,7 @@ SDL_GetTextureAlphaMod(SDL_Texture * texture, Uint8 * alpha) return 0; } -int -SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode) +int SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode) { SDL_Renderer *renderer; @@ -1639,8 +1602,7 @@ SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode) return 0; } -int -SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode) +int SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1650,8 +1612,7 @@ SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode) return 0; } -int -SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode) +int SDL_SetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode scaleMode) { SDL_Renderer *renderer; @@ -1667,8 +1628,7 @@ SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode) return 0; } -int -SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode) +int SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1678,8 +1638,7 @@ SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode) return 0; } -int -SDL_SetTextureUserData(SDL_Texture * texture, void *userdata) +int SDL_SetTextureUserData(SDL_Texture *texture, void *userdata) { CHECK_TEXTURE_MAGIC(texture, -1); @@ -1687,8 +1646,7 @@ SDL_SetTextureUserData(SDL_Texture * texture, void *userdata) return 0; } -void * -SDL_GetTextureUserData(SDL_Texture * texture) +void *SDL_GetTextureUserData(SDL_Texture *texture) { CHECK_TEXTURE_MAGIC(texture, NULL); @@ -1696,9 +1654,8 @@ SDL_GetTextureUserData(SDL_Texture * texture) } #if SDL_HAVE_YUV -static int -SDL_UpdateTextureYUV(SDL_Texture * texture, const SDL_Rect * rect, - const void *pixels, int pitch) +static int SDL_UpdateTextureYUV(SDL_Texture *texture, const SDL_Rect *rect, + const void *pixels, int pitch) { SDL_Texture *native = texture->native; SDL_Rect full_rect; @@ -1727,10 +1684,10 @@ SDL_UpdateTextureYUV(SDL_Texture * texture, const SDL_Rect * rect, } else { /* Use a temporary buffer for updating */ const int temp_pitch = (((rect->w * SDL_BYTESPERPIXEL(native->format)) + 3) & ~3); - const size_t alloclen = rect->h * temp_pitch; + const size_t alloclen = (size_t)rect->h * temp_pitch; if (alloclen > 0) { void *temp_pixels = SDL_malloc(alloclen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_SW_CopyYUVToRGB(texture->yuv, rect, native->format, @@ -1743,14 +1700,13 @@ SDL_UpdateTextureYUV(SDL_Texture * texture, const SDL_Rect * rect, } #endif /* SDL_HAVE_YUV */ -static int -SDL_UpdateTextureNative(SDL_Texture * texture, const SDL_Rect * rect, - const void *pixels, int pitch) +static int SDL_UpdateTextureNative(SDL_Texture *texture, const SDL_Rect *rect, + const void *pixels, int pitch) { SDL_Texture *native = texture->native; if (!rect->w || !rect->h) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (texture->access == SDL_TEXTUREACCESS_STREAMING) { @@ -1768,10 +1724,10 @@ SDL_UpdateTextureNative(SDL_Texture * texture, const SDL_Rect * rect, } else { /* Use a temporary buffer for updating */ const int temp_pitch = (((rect->w * SDL_BYTESPERPIXEL(native->format)) + 3) & ~3); - const size_t alloclen = rect->h * temp_pitch; + const size_t alloclen = (size_t)rect->h * temp_pitch; if (alloclen > 0) { void *temp_pixels = SDL_malloc(alloclen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_ConvertPixels(rect->w, rect->h, @@ -1784,15 +1740,14 @@ SDL_UpdateTextureNative(SDL_Texture * texture, const SDL_Rect * rect, return 0; } -int -SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, - const void *pixels, int pitch) +int SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, + const void *pixels, int pitch) { SDL_Rect real_rect; CHECK_TEXTURE_MAGIC(texture, -1); - if (!pixels) { + if (pixels == NULL) { return SDL_InvalidParamError("pixels"); } if (!pitch) { @@ -1810,7 +1765,7 @@ SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, } if (real_rect.w == 0 || real_rect.h == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ #if SDL_HAVE_YUV } else if (texture->yuv) { return SDL_UpdateTextureYUV(texture, &real_rect, pixels, pitch); @@ -1827,11 +1782,10 @@ SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, } #if SDL_HAVE_YUV -static int -SDL_UpdateTextureYUVPlanar(SDL_Texture * texture, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int SDL_UpdateTextureYUVPlanar(SDL_Texture *texture, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { SDL_Texture *native = texture->native; SDL_Rect full_rect; @@ -1847,7 +1801,7 @@ SDL_UpdateTextureYUVPlanar(SDL_Texture * texture, const SDL_Rect * rect, rect = &full_rect; if (!rect->w || !rect->h) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (texture->access == SDL_TEXTUREACCESS_STREAMING) { @@ -1864,10 +1818,10 @@ SDL_UpdateTextureYUVPlanar(SDL_Texture * texture, const SDL_Rect * rect, } else { /* Use a temporary buffer for updating */ const int temp_pitch = (((rect->w * SDL_BYTESPERPIXEL(native->format)) + 3) & ~3); - const size_t alloclen = rect->h * temp_pitch; + const size_t alloclen = (size_t)rect->h * temp_pitch; if (alloclen > 0) { void *temp_pixels = SDL_malloc(alloclen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_SW_CopyYUVToRGB(texture->yuv, rect, native->format, @@ -1879,10 +1833,9 @@ SDL_UpdateTextureYUVPlanar(SDL_Texture * texture, const SDL_Rect * rect, return 0; } -static int -SDL_UpdateTextureNVPlanar(SDL_Texture * texture, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int SDL_UpdateTextureNVPlanar(SDL_Texture *texture, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { SDL_Texture *native = texture->native; SDL_Rect full_rect; @@ -1898,7 +1851,7 @@ SDL_UpdateTextureNVPlanar(SDL_Texture * texture, const SDL_Rect * rect, rect = &full_rect; if (!rect->w || !rect->h) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (texture->access == SDL_TEXTUREACCESS_STREAMING) { @@ -1915,10 +1868,10 @@ SDL_UpdateTextureNVPlanar(SDL_Texture * texture, const SDL_Rect * rect, } else { /* Use a temporary buffer for updating */ const int temp_pitch = (((rect->w * SDL_BYTESPERPIXEL(native->format)) + 3) & ~3); - const size_t alloclen = rect->h * temp_pitch; + const size_t alloclen = (size_t)rect->h * temp_pitch; if (alloclen > 0) { void *temp_pixels = SDL_malloc(alloclen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_SW_CopyYUVToRGB(texture->yuv, rect, native->format, @@ -1930,10 +1883,9 @@ SDL_UpdateTextureNVPlanar(SDL_Texture * texture, const SDL_Rect * rect, return 0; } - #endif /* SDL_HAVE_YUV */ -int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, +int SDL_UpdateYUVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch) @@ -1944,19 +1896,19 @@ int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, CHECK_TEXTURE_MAGIC(texture, -1); - if (!Yplane) { + if (Yplane == NULL) { return SDL_InvalidParamError("Yplane"); } if (!Ypitch) { return SDL_InvalidParamError("Ypitch"); } - if (!Uplane) { + if (Uplane == NULL) { return SDL_InvalidParamError("Uplane"); } if (!Upitch) { return SDL_InvalidParamError("Upitch"); } - if (!Vplane) { + if (Vplane == NULL) { return SDL_InvalidParamError("Vplane"); } if (!Vpitch) { @@ -1977,7 +1929,7 @@ int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, } if (real_rect.w == 0 || real_rect.h == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (texture->yuv) { @@ -2000,9 +1952,9 @@ int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, #endif } -int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +int SDL_UpdateNVTexture(SDL_Texture *texture, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { #if SDL_HAVE_YUV SDL_Renderer *renderer; @@ -2010,13 +1962,13 @@ int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, CHECK_TEXTURE_MAGIC(texture, -1); - if (!Yplane) { + if (Yplane == NULL) { return SDL_InvalidParamError("Yplane"); } if (!Ypitch) { return SDL_InvalidParamError("Ypitch"); } - if (!UVplane) { + if (UVplane == NULL) { return SDL_InvalidParamError("UVplane"); } if (!UVpitch) { @@ -2037,7 +1989,7 @@ int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, } if (real_rect.w == 0 || real_rect.h == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (texture->yuv) { @@ -2060,32 +2012,27 @@ int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, #endif } - - #if SDL_HAVE_YUV -static int -SDL_LockTextureYUV(SDL_Texture * texture, const SDL_Rect * rect, - void **pixels, int *pitch) +static int SDL_LockTextureYUV(SDL_Texture *texture, const SDL_Rect *rect, + void **pixels, int *pitch) { return SDL_SW_LockYUVTexture(texture->yuv, rect, pixels, pitch); } #endif /* SDL_HAVE_YUV */ -static int -SDL_LockTextureNative(SDL_Texture * texture, const SDL_Rect * rect, - void **pixels, int *pitch) +static int SDL_LockTextureNative(SDL_Texture *texture, const SDL_Rect *rect, + void **pixels, int *pitch) { texture->locked_rect = *rect; - *pixels = (void *) ((Uint8 *) texture->pixels + - rect->y * texture->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + *pixels = (void *)((Uint8 *)texture->pixels + + rect->y * texture->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = texture->pitch; return 0; } -int -SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, - void **pixels, int *pitch) +int SDL_LockTexture(SDL_Texture *texture, const SDL_Rect *rect, + void **pixels, int *pitch) { SDL_Rect full_rect; @@ -2095,7 +2042,7 @@ SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, return SDL_SetError("SDL_LockTexture(): texture must be streaming"); } - if (!rect) { + if (rect == NULL) { full_rect.x = 0; full_rect.y = 0; full_rect.w = texture->w; @@ -2111,7 +2058,7 @@ SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, return SDL_LockTextureYUV(texture, rect, pixels, pitch); } else #endif - if (texture->native) { + if (texture->native) { /* Calls a real SDL_LockTexture/SDL_UnlockTexture on unlock, flushing then. */ return SDL_LockTextureNative(texture, rect, pixels, pitch); } else { @@ -2123,9 +2070,8 @@ SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, } } -int -SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, - SDL_Surface **surface) +int SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, + SDL_Surface **surface) { SDL_Rect real_rect; void *pixels = NULL; @@ -2160,8 +2106,7 @@ SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, } #if SDL_HAVE_YUV -static void -SDL_UnlockTextureYUV(SDL_Texture * texture) +static void SDL_UnlockTextureYUV(SDL_Texture *texture) { SDL_Texture *native = texture->native; void *native_pixels = NULL; @@ -2182,16 +2127,15 @@ SDL_UnlockTextureYUV(SDL_Texture * texture) } #endif /* SDL_HAVE_YUV */ -static void -SDL_UnlockTextureNative(SDL_Texture * texture) +static void SDL_UnlockTextureNative(SDL_Texture *texture) { SDL_Texture *native = texture->native; void *native_pixels = NULL; int native_pitch = 0; const SDL_Rect *rect = &texture->locked_rect; - const void* pixels = (void *) ((Uint8 *) texture->pixels + - rect->y * texture->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + const void *pixels = (void *)((Uint8 *)texture->pixels + + rect->y * texture->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); int pitch = texture->pitch; if (SDL_LockTexture(native, rect, &native_pixels, &native_pitch) < 0) { @@ -2203,8 +2147,7 @@ SDL_UnlockTextureNative(SDL_Texture * texture) SDL_UnlockTexture(native); } -void -SDL_UnlockTexture(SDL_Texture * texture) +void SDL_UnlockTexture(SDL_Texture *texture) { CHECK_TEXTURE_MAGIC(texture, ); @@ -2216,7 +2159,7 @@ SDL_UnlockTexture(SDL_Texture * texture) SDL_UnlockTextureYUV(texture); } else #endif - if (texture->native) { + if (texture->native) { SDL_UnlockTextureNative(texture); } else { SDL_Renderer *renderer = texture->renderer; @@ -2227,17 +2170,15 @@ SDL_UnlockTexture(SDL_Texture * texture) texture->locked_surface = NULL; } -SDL_bool -SDL_RenderTargetSupported(SDL_Renderer *renderer) +SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer) { - if (!renderer || !renderer->SetRenderTarget) { + if (renderer == NULL || !renderer->SetRenderTarget) { return SDL_FALSE; } return (renderer->info.flags & SDL_RENDERER_TARGETTEXTURE) != 0; } -int -SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) +int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { if (!SDL_RenderTargetSupported(renderer)) { return SDL_Unsupported(); @@ -2263,7 +2204,7 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) return 0; } - FlushRenderCommands(renderer); /* time to send everything to the GPU! */ + FlushRenderCommands(renderer); /* time to send everything to the GPU! */ SDL_LockMutex(renderer->target_mutex); @@ -2316,16 +2257,14 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) return FlushRenderCommandsIfNotBatching(renderer); } -SDL_Texture * -SDL_GetRenderTarget(SDL_Renderer *renderer) +SDL_Texture *SDL_GetRenderTarget(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, NULL); return renderer->target; } -static int -UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) +static int UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) { int w = 1, h = 1; float want_aspect; @@ -2344,7 +2283,7 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) } hint = SDL_GetHint(SDL_HINT_RENDER_LOGICAL_SIZE_MODE); - if (hint && (*hint == '1' || SDL_strcasecmp(hint, "overscan") == 0)) { + if (hint && (*hint == '1' || SDL_strcasecmp(hint, "overscan") == 0)) { #if SDL_VIDEO_RENDER_D3D SDL_bool overscan_supported = SDL_TRUE; /* Unfortunately, Direct3D 9 doesn't support negative viewport numbers @@ -2369,9 +2308,9 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) if (renderer->integer_scale) { if (want_aspect > real_aspect) { - scale = (float)(w / renderer->logical_w); + scale = (float)(w / renderer->logical_w); /* This an integer division! */ } else { - scale = (float)(h / renderer->logical_h); + scale = (float)(h / renderer->logical_h); /* This an integer division! */ } if (scale < 1.0f) { @@ -2382,7 +2321,7 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) viewport.x = (w - viewport.w) / 2; viewport.h = (int)SDL_floor(renderer->logical_h * scale); viewport.y = (h - viewport.h) / 2; - } else if (SDL_fabs(want_aspect-real_aspect) < 0.0001) { + } else if (SDL_fabs(want_aspect - real_aspect) < 0.0001) { /* The aspect ratios are the same, just scale appropriately */ scale = (float)w / renderer->logical_w; @@ -2390,9 +2329,9 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) SDL_GetRendererOutputSize(renderer, &viewport.w, &viewport.h); } else if (want_aspect > real_aspect) { if (scale_policy == 1) { - /* We want a wider aspect ratio than is available - - zoom so logical height matches the real height - and the width will grow off the screen + /* We want a wider aspect ratio than is available - + zoom so logical height matches the real height + and the width will grow off the screen */ scale = (float)h / renderer->logical_h; viewport.y = 0; @@ -2420,11 +2359,11 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) viewport.y = (h - viewport.h) / 2; } else { /* We want a narrower aspect ratio than is available - use side-bars */ - scale = (float)h / renderer->logical_h; - viewport.y = 0; - viewport.h = h; - viewport.w = (int)SDL_floor(renderer->logical_w * scale); - viewport.x = (w - viewport.w) / 2; + scale = (float)h / renderer->logical_h; + viewport.y = 0; + viewport.h = h; + viewport.w = (int)SDL_floor(renderer->logical_w * scale); + viewport.x = (w - viewport.w) / 2; } } @@ -2444,8 +2383,7 @@ UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd) return 0; } -int -SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h) +int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2464,8 +2402,7 @@ SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h) return UpdateLogicalSize(renderer, SDL_TRUE); } -void -SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h) +void SDL_RenderGetLogicalSize(SDL_Renderer *renderer, int *w, int *h) { CHECK_RENDERER_MAGIC(renderer, ); @@ -2477,8 +2414,7 @@ SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h) } } -int -SDL_RenderSetIntegerScale(SDL_Renderer * renderer, SDL_bool enable) +int SDL_RenderSetIntegerScale(SDL_Renderer *renderer, SDL_bool enable) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2487,16 +2423,14 @@ SDL_RenderSetIntegerScale(SDL_Renderer * renderer, SDL_bool enable) return UpdateLogicalSize(renderer, SDL_TRUE); } -SDL_bool -SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer) +SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, SDL_FALSE); return renderer->integer_scale; } -int -SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect) +int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect) { int retval; CHECK_RENDERER_MAGIC(renderer, -1); @@ -2511,17 +2445,18 @@ SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect) if (SDL_GetRendererOutputSize(renderer, &w, &h) < 0) { return -1; } - renderer->viewport.x = (double)0; - renderer->viewport.y = (double)0; + renderer->viewport.x = 0.0; + renderer->viewport.y = 0.0; + /* NOLINTBEGIN(clang-analyzer-core.uninitialized.Assign): SDL_GetRendererOutputSize cannot fail */ renderer->viewport.w = (double)w; renderer->viewport.h = (double)h; + /* NOLINTEND(clang-analyzer-core.uninitialized.Assign) */ } retval = QueueCmdSetViewport(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -void -SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect) +void SDL_RenderGetViewport(SDL_Renderer *renderer, SDL_Rect *rect) { CHECK_RENDERER_MAGIC(renderer, ); @@ -2533,8 +2468,7 @@ SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect) } } -static void -RenderGetViewportSize(SDL_Renderer * renderer, SDL_FRect * rect) +static void RenderGetViewportSize(SDL_Renderer *renderer, SDL_FRect *rect) { rect->x = 0.0f; rect->y = 0.0f; @@ -2542,13 +2476,12 @@ RenderGetViewportSize(SDL_Renderer * renderer, SDL_FRect * rect) rect->h = (float)(renderer->viewport.h / renderer->scale.y); } -int -SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect) +int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect) { int retval; CHECK_RENDERER_MAGIC(renderer, -1) - if (rect) { + if (rect && rect->w > 0 && rect->h > 0) { renderer->clipping_enabled = SDL_TRUE; renderer->clip_rect.x = (double)rect->x * renderer->scale.x; renderer->clip_rect.y = (double)rect->y * renderer->scale.y; @@ -2563,8 +2496,7 @@ SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect) return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -void -SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect) +void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect) { CHECK_RENDERER_MAGIC(renderer, ) @@ -2576,15 +2508,13 @@ SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect) } } -SDL_bool -SDL_RenderIsClipEnabled(SDL_Renderer * renderer) +SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, SDL_FALSE) return renderer->clipping_enabled; } -int -SDL_RenderSetScale(SDL_Renderer * renderer, float scaleX, float scaleY) +int SDL_RenderSetScale(SDL_Renderer *renderer, float scaleX, float scaleY) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2593,8 +2523,7 @@ SDL_RenderSetScale(SDL_Renderer * renderer, float scaleX, float scaleY) return 0; } -void -SDL_RenderGetScale(SDL_Renderer * renderer, float *scaleX, float *scaleY) +void SDL_RenderGetScale(SDL_Renderer *renderer, float *scaleX, float *scaleY) { CHECK_RENDERER_MAGIC(renderer, ); @@ -2606,15 +2535,14 @@ SDL_RenderGetScale(SDL_Renderer * renderer, float *scaleX, float *scaleY) } } -void -SDL_RenderWindowToLogical(SDL_Renderer * renderer, int windowX, int windowY, float *logicalX, float *logicalY) +void SDL_RenderWindowToLogical(SDL_Renderer *renderer, int windowX, int windowY, float *logicalX, float *logicalY) { float window_physical_x, window_physical_y; CHECK_RENDERER_MAGIC(renderer, ); - window_physical_x = ((float) windowX) / renderer->dpi_scale.x; - window_physical_y = ((float) windowY) / renderer->dpi_scale.y; + window_physical_x = ((float)windowX) / renderer->dpi_scale.x; + window_physical_y = ((float)windowY) / renderer->dpi_scale.y; if (logicalX) { *logicalX = (float)((window_physical_x - renderer->viewport.x) / renderer->scale.x); @@ -2624,8 +2552,7 @@ SDL_RenderWindowToLogical(SDL_Renderer * renderer, int windowX, int windowY, flo } } -void -SDL_RenderLogicalToWindow(SDL_Renderer * renderer, float logicalX, float logicalY, int *windowX, int *windowY) +void SDL_RenderLogicalToWindow(SDL_Renderer *renderer, float logicalX, float logicalY, int *windowX, int *windowY) { float window_physical_x, window_physical_y; @@ -2642,9 +2569,8 @@ SDL_RenderLogicalToWindow(SDL_Renderer * renderer, float logicalX, float logical } } -int -SDL_SetRenderDrawColor(SDL_Renderer * renderer, - Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_SetRenderDrawColor(SDL_Renderer *renderer, + Uint8 r, Uint8 g, Uint8 b, Uint8 a) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2655,9 +2581,8 @@ SDL_SetRenderDrawColor(SDL_Renderer * renderer, return 0; } -int -SDL_GetRenderDrawColor(SDL_Renderer * renderer, - Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a) +int SDL_GetRenderDrawColor(SDL_Renderer *renderer, + Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2676,8 +2601,7 @@ SDL_GetRenderDrawColor(SDL_Renderer * renderer, return 0; } -int -SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +int SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2688,8 +2612,7 @@ SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) return 0; } -int -SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode *blendMode) +int SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -2697,8 +2620,7 @@ SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode *blendMode) return 0; } -int -SDL_RenderClear(SDL_Renderer * renderer) +int SDL_RenderClear(SDL_Renderer *renderer) { int retval; CHECK_RENDERER_MAGIC(renderer, -1); @@ -2706,21 +2628,18 @@ SDL_RenderClear(SDL_Renderer * renderer) return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } - /* !!! FIXME: delete all the duplicate code for the integer versions in 2.1, !!! FIXME: making the floating point versions the only available APIs. */ -int -SDL_RenderDrawPoint(SDL_Renderer * renderer, int x, int y) +int SDL_RenderDrawPoint(SDL_Renderer *renderer, int x, int y) { SDL_FPoint fpoint; - fpoint.x = (float) x; - fpoint.y = (float) y; + fpoint.x = (float)x; + fpoint.y = (float)y; return SDL_RenderDrawPointsF(renderer, &fpoint, 1); } -int -SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y) +int SDL_RenderDrawPointF(SDL_Renderer *renderer, float x, float y) { SDL_FPoint fpoint; fpoint.x = x; @@ -2728,9 +2647,8 @@ SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y) return SDL_RenderDrawPointsF(renderer, &fpoint, 1); } -static int -RenderDrawPointsWithRects(SDL_Renderer * renderer, - const SDL_Point * points, const int count) +static int RenderDrawPointsWithRects(SDL_Renderer *renderer, + const SDL_Point *points, const int count) { int retval; SDL_bool isstack; @@ -2742,7 +2660,7 @@ RenderDrawPointsWithRects(SDL_Renderer * renderer, } frects = SDL_small_alloc(SDL_FRect, count, &isstack); - if (!frects) { + if (frects == NULL) { return SDL_OutOfMemory(); } @@ -2760,9 +2678,8 @@ RenderDrawPointsWithRects(SDL_Renderer * renderer, return retval; } -int -SDL_RenderDrawPoints(SDL_Renderer * renderer, - const SDL_Point * points, int count) +int SDL_RenderDrawPoints(SDL_Renderer *renderer, + const SDL_Point *points, int count) { SDL_FPoint *fpoints; int i; @@ -2771,7 +2688,7 @@ SDL_RenderDrawPoints(SDL_Renderer * renderer, CHECK_RENDERER_MAGIC(renderer, -1); - if (!points) { + if (points == NULL) { return SDL_InvalidParamError("SDL_RenderDrawPoints(): points"); } if (count < 1) { @@ -2789,12 +2706,12 @@ SDL_RenderDrawPoints(SDL_Renderer * renderer, retval = RenderDrawPointsWithRects(renderer, points, count); } else { fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack); - if (!fpoints) { + if (fpoints == NULL) { return SDL_OutOfMemory(); } for (i = 0; i < count; ++i) { - fpoints[i].x = (float) points[i].x; - fpoints[i].y = (float) points[i].y; + fpoints[i].x = (float)points[i].x; + fpoints[i].y = (float)points[i].y; } retval = QueueCmdDrawPoints(renderer, fpoints, count); @@ -2804,9 +2721,8 @@ SDL_RenderDrawPoints(SDL_Renderer * renderer, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -static int -RenderDrawPointsWithRectsF(SDL_Renderer * renderer, - const SDL_FPoint * fpoints, const int count) +static int RenderDrawPointsWithRectsF(SDL_Renderer *renderer, + const SDL_FPoint *fpoints, const int count) { int retval; SDL_bool isstack; @@ -2818,7 +2734,7 @@ RenderDrawPointsWithRectsF(SDL_Renderer * renderer, } frects = SDL_small_alloc(SDL_FRect, count, &isstack); - if (!frects) { + if (frects == NULL) { return SDL_OutOfMemory(); } @@ -2836,15 +2752,14 @@ RenderDrawPointsWithRectsF(SDL_Renderer * renderer, return retval; } -int -SDL_RenderDrawPointsF(SDL_Renderer * renderer, - const SDL_FPoint * points, int count) +int SDL_RenderDrawPointsF(SDL_Renderer *renderer, + const SDL_FPoint *points, int count) { int retval; CHECK_RENDERER_MAGIC(renderer, -1); - if (!points) { + if (points == NULL) { return SDL_InvalidParamError("SDL_RenderDrawPointsF(): points"); } if (count < 1) { @@ -2866,19 +2781,17 @@ SDL_RenderDrawPointsF(SDL_Renderer * renderer, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) +int SDL_RenderDrawLine(SDL_Renderer *renderer, int x1, int y1, int x2, int y2) { SDL_FPoint points[2]; - points[0].x = (float) x1; - points[0].y = (float) y1; - points[1].x = (float) x2; - points[1].y = (float) y2; + points[0].x = (float)x1; + points[0].y = (float)y1; + points[1].x = (float)x2; + points[1].y = (float)y2; return SDL_RenderDrawLinesF(renderer, points, 2); } -int -SDL_RenderDrawLineF(SDL_Renderer * renderer, float x1, float y1, float x2, float y2) +int SDL_RenderDrawLineF(SDL_Renderer *renderer, float x1, float y1, float x2, float y2) { SDL_FPoint points[2]; points[0].x = x1; @@ -2938,7 +2851,7 @@ static int RenderDrawLineBresenham(SDL_Renderer *renderer, int x1, int y1, int x } points = SDL_small_alloc(SDL_FPoint, numpixels, &isstack); - if (!points) { + if (points == NULL) { return SDL_OutOfMemory(); } for (i = 0; i < numpixels; ++i) { @@ -2967,9 +2880,8 @@ static int RenderDrawLineBresenham(SDL_Renderer *renderer, int x1, int y1, int x return retval; } -static int -RenderDrawLinesWithRectsF(SDL_Renderer * renderer, - const SDL_FPoint * points, const int count) +static int RenderDrawLinesWithRectsF(SDL_Renderer *renderer, + const SDL_FPoint *points, const int count) { const float scale_x = renderer->scale.x; const float scale_y = renderer->scale.y; @@ -2981,17 +2893,17 @@ RenderDrawLinesWithRectsF(SDL_Renderer * renderer, SDL_bool drew_line = SDL_FALSE; SDL_bool draw_last = SDL_FALSE; - frects = SDL_small_alloc(SDL_FRect, count-1, &isstack); - if (!frects) { + frects = SDL_small_alloc(SDL_FRect, count - 1, &isstack); + if (frects == NULL) { return SDL_OutOfMemory(); } - for (i = 0; i < count-1; ++i) { - SDL_bool same_x = (points[i].x == points[i+1].x); - SDL_bool same_y = (points[i].y == points[i+1].y); + for (i = 0; i < count - 1; ++i) { + SDL_bool same_x = (points[i].x == points[i + 1].x); + SDL_bool same_y = (points[i].y == points[i + 1].y); if (i == (count - 2)) { - if (!drew_line || points[i+1].x != points[0].x || points[i+1].y != points[0].y) { + if (!drew_line || points[i + 1].x != points[0].x || points[i + 1].y != points[0].y) { draw_last = SDL_TRUE; } } else { @@ -3000,32 +2912,32 @@ RenderDrawLinesWithRectsF(SDL_Renderer * renderer, } } if (same_x) { - const float minY = SDL_min(points[i].y, points[i+1].y); - const float maxY = SDL_max(points[i].y, points[i+1].y); + const float minY = SDL_min(points[i].y, points[i + 1].y); + const float maxY = SDL_max(points[i].y, points[i + 1].y); frect = &frects[nrects++]; frect->x = points[i].x * scale_x; frect->y = minY * scale_y; frect->w = scale_x; frect->h = (maxY - minY + draw_last) * scale_y; - if (!draw_last && points[i+1].y < points[i].y) { + if (!draw_last && points[i + 1].y < points[i].y) { frect->y += scale_y; } } else if (same_y) { - const float minX = SDL_min(points[i].x, points[i+1].x); - const float maxX = SDL_max(points[i].x, points[i+1].x); + const float minX = SDL_min(points[i].x, points[i + 1].x); + const float maxX = SDL_max(points[i].x, points[i + 1].x); frect = &frects[nrects++]; frect->x = minX * scale_x; frect->y = points[i].y * scale_y; frect->w = (maxX - minX + draw_last) * scale_x; frect->h = scale_y; - if (!draw_last && points[i+1].x < points[i].x) { + if (!draw_last && points[i + 1].x < points[i].x) { frect->x += scale_x; } } else { retval += RenderDrawLineBresenham(renderer, (int)SDL_roundf(points[i].x), (int)SDL_roundf(points[i].y), - (int)SDL_roundf(points[i+1].x), (int)SDL_roundf(points[i+1].y), draw_last); + (int)SDL_roundf(points[i + 1].x), (int)SDL_roundf(points[i + 1].y), draw_last); } drew_line = SDL_TRUE; } @@ -3042,9 +2954,8 @@ RenderDrawLinesWithRectsF(SDL_Renderer * renderer, return retval; } -int -SDL_RenderDrawLines(SDL_Renderer * renderer, - const SDL_Point * points, int count) +int SDL_RenderDrawLines(SDL_Renderer *renderer, + const SDL_Point *points, int count) { SDL_FPoint *fpoints; int i; @@ -3053,7 +2964,7 @@ SDL_RenderDrawLines(SDL_Renderer * renderer, CHECK_RENDERER_MAGIC(renderer, -1); - if (!points) { + if (points == NULL) { return SDL_InvalidParamError("SDL_RenderDrawLines(): points"); } if (count < 2) { @@ -3068,13 +2979,13 @@ SDL_RenderDrawLines(SDL_Renderer * renderer, #endif fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack); - if (!fpoints) { + if (fpoints == NULL) { return SDL_OutOfMemory(); } for (i = 0; i < count; ++i) { - fpoints[i].x = (float) points[i].x; - fpoints[i].y = (float) points[i].y; + fpoints[i].x = (float)points[i].x; + fpoints[i].y = (float)points[i].y; } retval = SDL_RenderDrawLinesF(renderer, fpoints, count); @@ -3084,15 +2995,14 @@ SDL_RenderDrawLines(SDL_Renderer * renderer, return retval; } -int -SDL_RenderDrawLinesF(SDL_Renderer * renderer, - const SDL_FPoint * points, int count) +int SDL_RenderDrawLinesF(SDL_Renderer *renderer, + const SDL_FPoint *points, int count) { int retval = 0; CHECK_RENDERER_MAGIC(renderer, -1); - if (!points) { + if (points == NULL) { return SDL_InvalidParamError("SDL_RenderDrawLinesF(): points"); } if (count < 2) { @@ -3115,15 +3025,13 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer, const float scale_y = renderer->scale.y; float *xy = SDL_small_alloc(float, 4 * 2 * count, &isstack1); int *indices = SDL_small_alloc(int, - (4) * 3 * (count - 1) - + (2) * 3 * (count) - , &isstack2); + (4) * 3 * (count - 1) + (2) * 3 * (count), &isstack2); if (xy && indices) { int i; float *ptr_xy = xy; int *ptr_indices = indices; - const int xy_stride = 2 * sizeof (float); + const int xy_stride = 2 * sizeof(float); int num_vertices = 4 * count; int num_indices = 0; const int size_indices = 4; @@ -3153,11 +3061,11 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer, *ptr_xy++ = q.x; *ptr_xy++ = q.y + scale_y; -#define ADD_TRIANGLE(i1, i2, i3) \ - *ptr_indices++ = cur_index + i1; \ - *ptr_indices++ = cur_index + i2; \ - *ptr_indices++ = cur_index + i3; \ - num_indices += 3; \ +#define ADD_TRIANGLE(i1, i2, i3) \ + *ptr_indices++ = cur_index + i1; \ + *ptr_indices++ = cur_index + i2; \ + *ptr_indices++ = cur_index + i3; \ + num_indices += 3; /* closed polyline, don´t draw twice the point */ if (i || is_looping == 0) { @@ -3222,10 +3130,9 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer, } retval = QueueCmdGeometry(renderer, NULL, - xy, xy_stride, &renderer->color, 0 /* color_stride */, NULL, 0, - num_vertices, indices, num_indices, size_indices, - 1.0f, 1.0f); - + xy, xy_stride, &renderer->color, 0 /* color_stride */, NULL, 0, + num_vertices, indices, num_indices, size_indices, + 1.0f, 1.0f); } SDL_small_free(xy, isstack1); @@ -3240,25 +3147,23 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderDrawRect(SDL_Renderer * renderer, const SDL_Rect * rect) +int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect) { SDL_FRect frect; SDL_FRect *prect = NULL; if (rect) { - frect.x = (float) rect->x; - frect.y = (float) rect->y; - frect.w = (float) rect->w; - frect.h = (float) rect->h; + frect.x = (float)rect->x; + frect.y = (float)rect->y; + frect.w = (float)rect->w; + frect.h = (float)rect->h; prect = &frect; } return SDL_RenderDrawRectF(renderer, prect); } -int -SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect) +int SDL_RenderDrawRectF(SDL_Renderer *renderer, const SDL_FRect *rect) { SDL_FRect frect; SDL_FPoint points[5]; @@ -3266,33 +3171,32 @@ SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect) CHECK_RENDERER_MAGIC(renderer, -1); /* If 'rect' == NULL, then outline the whole surface */ - if (!rect) { + if (rect == NULL) { RenderGetViewportSize(renderer, &frect); rect = &frect; } points[0].x = rect->x; points[0].y = rect->y; - points[1].x = rect->x+rect->w-1; + points[1].x = rect->x + rect->w - 1; points[1].y = rect->y; - points[2].x = rect->x+rect->w-1; - points[2].y = rect->y+rect->h-1; + points[2].x = rect->x + rect->w - 1; + points[2].y = rect->y + rect->h - 1; points[3].x = rect->x; - points[3].y = rect->y+rect->h-1; + points[3].y = rect->y + rect->h - 1; points[4].x = rect->x; points[4].y = rect->y; return SDL_RenderDrawLinesF(renderer, points, 5); } -int -SDL_RenderDrawRects(SDL_Renderer * renderer, - const SDL_Rect * rects, int count) +int SDL_RenderDrawRects(SDL_Renderer *renderer, + const SDL_Rect *rects, int count) { int i; CHECK_RENDERER_MAGIC(renderer, -1); - if (!rects) { + if (rects == NULL) { return SDL_InvalidParamError("SDL_RenderDrawRects(): rects"); } if (count < 1) { @@ -3314,15 +3218,14 @@ SDL_RenderDrawRects(SDL_Renderer * renderer, return 0; } -int -SDL_RenderDrawRectsF(SDL_Renderer * renderer, - const SDL_FRect * rects, int count) +int SDL_RenderDrawRectsF(SDL_Renderer *renderer, + const SDL_FRect *rects, int count) { int i; CHECK_RENDERER_MAGIC(renderer, -1); - if (!rects) { + if (rects == NULL) { return SDL_InvalidParamError("SDL_RenderDrawRectsF(): rects"); } if (count < 1) { @@ -3344,8 +3247,7 @@ SDL_RenderDrawRectsF(SDL_Renderer * renderer, return 0; } -int -SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect) +int SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_Rect *rect) { SDL_FRect frect; @@ -3353,34 +3255,32 @@ SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect) /* If 'rect' == NULL, then outline the whole surface */ if (rect) { - frect.x = (float) rect->x; - frect.y = (float) rect->y; - frect.w = (float) rect->w; - frect.h = (float) rect->h; + frect.x = (float)rect->x; + frect.y = (float)rect->y; + frect.w = (float)rect->w; + frect.h = (float)rect->h; } else { RenderGetViewportSize(renderer, &frect); } return SDL_RenderFillRectsF(renderer, &frect, 1); } -int -SDL_RenderFillRectF(SDL_Renderer * renderer, const SDL_FRect * rect) +int SDL_RenderFillRectF(SDL_Renderer *renderer, const SDL_FRect *rect) { SDL_FRect frect; CHECK_RENDERER_MAGIC(renderer, -1); /* If 'rect' == NULL, then outline the whole surface */ - if (!rect) { + if (rect == NULL) { RenderGetViewportSize(renderer, &frect); rect = &frect; } return SDL_RenderFillRectsF(renderer, rect, 1); } -int -SDL_RenderFillRects(SDL_Renderer * renderer, - const SDL_Rect * rects, int count) +int SDL_RenderFillRects(SDL_Renderer *renderer, + const SDL_Rect *rects, int count) { SDL_FRect *frects; int i; @@ -3389,7 +3289,7 @@ SDL_RenderFillRects(SDL_Renderer * renderer, CHECK_RENDERER_MAGIC(renderer, -1); - if (!rects) { + if (rects == NULL) { return SDL_InvalidParamError("SDL_RenderFillRects(): rects"); } if (count < 1) { @@ -3404,7 +3304,7 @@ SDL_RenderFillRects(SDL_Renderer * renderer, #endif frects = SDL_small_alloc(SDL_FRect, count, &isstack); - if (!frects) { + if (frects == NULL) { return SDL_OutOfMemory(); } for (i = 0; i < count; ++i) { @@ -3421,9 +3321,8 @@ SDL_RenderFillRects(SDL_Renderer * renderer, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderFillRectsF(SDL_Renderer * renderer, - const SDL_FRect * rects, int count) +int SDL_RenderFillRectsF(SDL_Renderer *renderer, + const SDL_FRect *rects, int count) { SDL_FRect *frects; int i; @@ -3432,7 +3331,7 @@ SDL_RenderFillRectsF(SDL_Renderer * renderer, CHECK_RENDERER_MAGIC(renderer, -1); - if (!rects) { + if (rects == NULL) { return SDL_InvalidParamError("SDL_RenderFillRectsF(): rects"); } if (count < 1) { @@ -3447,7 +3346,7 @@ SDL_RenderFillRectsF(SDL_Renderer * renderer, #endif frects = SDL_small_alloc(SDL_FRect, count, &isstack); - if (!frects) { + if (frects == NULL) { return SDL_OutOfMemory(); } for (i = 0; i < count; ++i) { @@ -3464,32 +3363,29 @@ SDL_RenderFillRectsF(SDL_Renderer * renderer, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_Rect * dstrect) +int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_Rect *dstrect) { SDL_FRect dstfrect; SDL_FRect *pdstfrect = NULL; if (dstrect) { - dstfrect.x = (float) dstrect->x; - dstfrect.y = (float) dstrect->y; - dstfrect.w = (float) dstrect->w; - dstfrect.h = (float) dstrect->h; + dstfrect.x = (float)dstrect->x; + dstfrect.y = (float)dstrect->y; + dstfrect.w = (float)dstrect->w; + dstfrect.h = (float)dstrect->h; pdstfrect = &dstfrect; } return SDL_RenderCopyF(renderer, texture, srcrect, pdstfrect); } -int -SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect) +int SDL_RenderCopyF(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect) { SDL_Rect real_srcrect; SDL_FRect real_dstrect; int retval; int use_rendergeometry; - CHECK_RENDERER_MAGIC(renderer, -1); CHECK_TEXTURE_MAGIC(texture, -1); @@ -3532,9 +3428,9 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, if (use_rendergeometry) { float xy[8]; - const int xy_stride = 2 * sizeof (float); + const int xy_stride = 2 * sizeof(float); float uv[8]; - const int uv_stride = 2 * sizeof (float); + const int uv_stride = 2 * sizeof(float); const int num_vertices = 4; const int *indices = renderer->rect_index_order; const int num_indices = 6; @@ -3542,10 +3438,10 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, float minu, minv, maxu, maxv; float minx, miny, maxx, maxy; - minu = (float) (real_srcrect.x) / (float) texture->w; - minv = (float) (real_srcrect.y) / (float) texture->h; - maxu = (float) (real_srcrect.x + real_srcrect.w) / (float) texture->w; - maxv = (float) (real_srcrect.y + real_srcrect.h) / (float) texture->h; + minu = (float)(real_srcrect.x) / (float)texture->w; + minv = (float)(real_srcrect.y) / (float)texture->h; + maxu = (float)(real_srcrect.x + real_srcrect.w) / (float)texture->w; + maxv = (float)(real_srcrect.y + real_srcrect.h) / (float)texture->h; minx = real_dstrect.x; miny = real_dstrect.y; @@ -3571,10 +3467,10 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, xy[7] = maxy; retval = QueueCmdGeometry(renderer, texture, - xy, xy_stride, &texture->color, 0 /* color_stride */, uv, uv_stride, - num_vertices, - indices, num_indices, size_indices, - renderer->scale.x, renderer->scale.y); + xy, xy_stride, &texture->color, 0 /* color_stride */, uv, uv_stride, + num_vertices, + indices, num_indices, size_indices, + renderer->scale.x, renderer->scale.y); } else { real_dstrect.x *= renderer->scale.x; @@ -3587,10 +3483,9 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_Rect * dstrect, - const double angle, const SDL_Point *center, const SDL_RendererFlip flip) +int SDL_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_Rect *dstrect, + const double angle, const SDL_Point *center, const SDL_RendererFlip flip) { SDL_FRect dstfrect; SDL_FRect *pdstfrect = NULL; @@ -3598,26 +3493,25 @@ SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, SDL_FPoint *pfcenter = NULL; if (dstrect) { - dstfrect.x = (float) dstrect->x; - dstfrect.y = (float) dstrect->y; - dstfrect.w = (float) dstrect->w; - dstfrect.h = (float) dstrect->h; + dstfrect.x = (float)dstrect->x; + dstfrect.y = (float)dstrect->y; + dstfrect.w = (float)dstrect->w; + dstfrect.h = (float)dstrect->h; pdstfrect = &dstfrect; } if (center) { - fcenter.x = (float) center->x; - fcenter.y = (float) center->y; + fcenter.x = (float)center->x; + fcenter.y = (float)center->y; pfcenter = &fcenter; } return SDL_RenderCopyExF(renderer, texture, srcrect, pdstfrect, angle, pfcenter, flip); } -int -SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect, - const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip) +int SDL_RenderCopyExF(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip) { SDL_Rect real_srcrect; SDL_FRect real_dstrect; @@ -3625,7 +3519,7 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, int retval; int use_rendergeometry; - if (flip == SDL_FLIP_NONE && (int)(angle/360) == angle/360) { /* fast path when we don't need rotation or flipping */ + if (flip == SDL_FLIP_NONE && (int)(angle / 360) == angle / 360) { /* fast path when we don't need rotation or flipping */ return SDL_RenderCopyF(renderer, texture, srcrect, dstrect); } @@ -3680,9 +3574,9 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, if (use_rendergeometry) { float xy[8]; - const int xy_stride = 2 * sizeof (float); + const int xy_stride = 2 * sizeof(float); float uv[8]; - const int uv_stride = 2 * sizeof (float); + const int uv_stride = 2 * sizeof(float); const int num_vertices = 4; const int *indices = renderer->rect_index_order; const int num_indices = 6; @@ -3698,10 +3592,10 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, const float s = SDL_sinf(radian_angle); const float c = SDL_cosf(radian_angle); - minu = (float) (real_srcrect.x) / (float) texture->w; - minv = (float) (real_srcrect.y) / (float) texture->h; - maxu = (float) (real_srcrect.x + real_srcrect.w) / (float) texture->w; - maxv = (float) (real_srcrect.y + real_srcrect.h) / (float) texture->h; + minu = (float)(real_srcrect.x) / (float)texture->w; + minv = (float)(real_srcrect.y) / (float)texture->h; + maxu = (float)(real_srcrect.x + real_srcrect.w) / (float)texture->w; + maxv = (float)(real_srcrect.y + real_srcrect.h) / (float)texture->h; centerx = real_center.x + real_dstrect.x; centery = real_center.y + real_dstrect.y; @@ -3756,10 +3650,10 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, xy[7] = (s_minx + c_maxy) + centery; retval = QueueCmdGeometry(renderer, texture, - xy, xy_stride, &texture->color, 0 /* color_stride */, uv, uv_stride, - num_vertices, - indices, num_indices, size_indices, - renderer->scale.x, renderer->scale.y); + xy, xy_stride, &texture->color, 0 /* color_stride */, uv, uv_stride, + num_vertices, + indices, num_indices, size_indices, + renderer->scale.x, renderer->scale.y); } else { retval = QueueCmdCopyEx(renderer, texture, &real_srcrect, &real_dstrect, angle, &real_center, flip, renderer->scale.x, renderer->scale.y); @@ -3767,19 +3661,18 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } -int -SDL_RenderGeometry(SDL_Renderer *renderer, - SDL_Texture *texture, - const SDL_Vertex *vertices, int num_vertices, - const int *indices, int num_indices) +int SDL_RenderGeometry(SDL_Renderer *renderer, + SDL_Texture *texture, + const SDL_Vertex *vertices, int num_vertices, + const int *indices, int num_indices) { if (vertices) { const float *xy = &vertices->position.x; - int xy_stride = sizeof (SDL_Vertex); + int xy_stride = sizeof(SDL_Vertex); const SDL_Color *color = &vertices->color; - int color_stride = sizeof (SDL_Vertex); + int color_stride = sizeof(SDL_Vertex); const float *uv = &vertices->tex_coord.x; - int uv_stride = sizeof (SDL_Vertex); + int uv_stride = sizeof(SDL_Vertex); int size_indices = 4; return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indices); } else { @@ -3787,19 +3680,18 @@ SDL_RenderGeometry(SDL_Renderer *renderer, } } -static int -remap_one_indice( - int prev, - int k, - SDL_Texture *texture, - const float *xy, int xy_stride, - const SDL_Color *color, int color_stride, - const float *uv, int uv_stride) +static int remap_one_indice( + int prev, + int k, + SDL_Texture *texture, + const float *xy, int xy_stride, + const SDL_Color *color, int color_stride, + const float *uv, int uv_stride) { const float *xy0_, *xy1_, *uv0_, *uv1_; int col0_, col1_; - xy0_ = (const float *)((const char*)xy + prev * xy_stride); - xy1_ = (const float *)((const char*)xy + k * xy_stride); + xy0_ = (const float *)((const char *)xy + prev * xy_stride); + xy1_ = (const float *)((const char *)xy + k * xy_stride); if (xy0_[0] != xy1_[0]) { return k; } @@ -3807,8 +3699,8 @@ remap_one_indice( return k; } if (texture) { - uv0_ = (const float *)((const char*)uv + prev * uv_stride); - uv1_ = (const float *)((const char*)uv + k * uv_stride); + uv0_ = (const float *)((const char *)uv + prev * uv_stride); + uv1_ = (const float *)((const char *)uv + k * uv_stride); if (uv0_[0] != uv1_[0]) { return k; } @@ -3816,8 +3708,8 @@ remap_one_indice( return k; } } - col0_ = *(const int *)((const char*)color + prev * color_stride); - col1_ = *(const int *)((const char*)color + k * color_stride); + col0_ = *(const int *)((const char *)color + prev * color_stride); + col1_ = *(const int *)((const char *)color + k * color_stride); if (col0_ != col1_) { return k; @@ -3826,14 +3718,13 @@ remap_one_indice( return prev; } -static int -remap_indices( - int prev[3], - int k, - SDL_Texture *texture, - const float *xy, int xy_stride, - const SDL_Color *color, int color_stride, - const float *uv, int uv_stride) +static int remap_indices( + int prev[3], + int k, + SDL_Texture *texture, + const float *xy, int xy_stride, + const SDL_Color *color, int color_stride, + const float *uv, int uv_stride) { int i; if (prev[0] == -1) { @@ -3851,14 +3742,13 @@ remap_indices( #define DEBUG_SW_RENDER_GEOMETRY 0 /* For the software renderer, try to reinterpret triangles as SDL_Rect */ -static int SDLCALL -SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, - SDL_Texture *texture, - const float *xy, int xy_stride, - const SDL_Color *color, int color_stride, - const float *uv, int uv_stride, - int num_vertices, - const void *indices, int num_indices, int size_indices) +static int SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, + SDL_Texture *texture, + const float *xy, int xy_stride, + const SDL_Color *color, int color_stride, + const float *uv, int uv_stride, + int num_vertices, + const void *indices, int num_indices, int size_indices) { int i; int retval = 0; @@ -3876,7 +3766,9 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, SDL_QueryTexture(texture, NULL, NULL, &texw, &texh); } - prev[0] = -1; prev[1] = -1; prev[2] = -1; + prev[0] = -1; + prev[1] = -1; + prev[2] = -1; size_indices = indices ? size_indices : 0; for (i = 0; i < count; i += 3) { @@ -3936,12 +3828,15 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, const float *xy0_, *xy1_, *xy2_; float x0, x1, x2; float y0, y1, y2; - xy0_ = (const float *)((const char*)xy + k0 * xy_stride); - xy1_ = (const float *)((const char*)xy + k1 * xy_stride); - xy2_ = (const float *)((const char*)xy + k2 * xy_stride); - x0 = xy0_[0]; y0 = xy0_[1]; - x1 = xy1_[0]; y1 = xy1_[1]; - x2 = xy2_[0]; y2 = xy2_[1]; + xy0_ = (const float *)((const char *)xy + k0 * xy_stride); + xy1_ = (const float *)((const char *)xy + k1 * xy_stride); + xy2_ = (const float *)((const char *)xy + k2 * xy_stride); + x0 = xy0_[0]; + y0 = xy0_[1]; + x1 = xy1_[0]; + y1 = xy1_[1]; + x2 = xy2_[0]; + y2 = xy2_[1]; /* Find top-left */ if (x0 <= x1 && y0 <= y1) { @@ -3991,15 +3886,18 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, C2 = prev[2]; } - xy0_ = (const float *)((const char*)xy + A * xy_stride); - xy1_ = (const float *)((const char*)xy + B * xy_stride); - xy2_ = (const float *)((const char*)xy + C * xy_stride); - x0 = xy0_[0]; y0 = xy0_[1]; - x1 = xy1_[0]; y1 = xy1_[1]; - x2 = xy2_[0]; y2 = xy2_[1]; + xy0_ = (const float *)((const char *)xy + A * xy_stride); + xy1_ = (const float *)((const char *)xy + B * xy_stride); + xy2_ = (const float *)((const char *)xy + C * xy_stride); + x0 = xy0_[0]; + y0 = xy0_[1]; + x1 = xy1_[0]; + y1 = xy1_[1]; + x2 = xy2_[0]; + y2 = xy2_[1]; /* Check if triangle A B C is rectangle */ - if ((x0 == x2 && y1 == y2) || (y0 == y2 && x1 == x2)){ + if ((x0 == x2 && y1 == y2) || (y0 == y2 && x1 == x2)) { /* ok */ } else { is_quad = 0; @@ -4008,11 +3906,12 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, #endif } - xy2_ = (const float *)((const char*)xy + C2 * xy_stride); - x2 = xy2_[0]; y2 = xy2_[1]; + xy2_ = (const float *)((const char *)xy + C2 * xy_stride); + x2 = xy2_[0]; + y2 = xy2_[1]; /* Check if triangle A B C2 is rectangle */ - if ((x0 == x2 && y1 == y2) || (y0 == y2 && x1 == x2)){ + if ((x0 == x2 && y1 == y2) || (y0 == y2 && x1 == x2)) { /* ok */ } else { is_quad = 0; @@ -4024,10 +3923,10 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, /* Check if uniformly colored */ if (is_quad) { - const int col0_ = *(const int *)((const char*)color + A * color_stride); - const int col1_ = *(const int *)((const char*)color + B * color_stride); - const int col2_ = *(const int *)((const char*)color + C * color_stride); - const int col3_ = *(const int *)((const char*)color + C2 * color_stride); + const int col0_ = *(const int *)((const char *)color + A * color_stride); + const int col1_ = *(const int *)((const char *)color + B * color_stride); + const int col2_ = *(const int *)((const char *)color + C * color_stride); + const int col3_ = *(const int *)((const char *)color + C2 * color_stride); if (col0_ == col1_ && col0_ == col2_ && col0_ == col3_) { /* ok */ } else { @@ -4043,18 +3942,18 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Rect s; SDL_FRect d; const float *xy0_, *xy1_, *uv0_, *uv1_; - SDL_Color col0_ = *(const SDL_Color *)((const char*)color + k0 * color_stride); + SDL_Color col0_ = *(const SDL_Color *)((const char *)color + k0 * color_stride); - xy0_ = (const float *)((const char*)xy + A * xy_stride); - xy1_ = (const float *)((const char*)xy + B * xy_stride); + xy0_ = (const float *)((const char *)xy + A * xy_stride); + xy1_ = (const float *)((const char *)xy + B * xy_stride); if (texture) { - uv0_ = (const float *)((const char*)uv + A * uv_stride); - uv1_ = (const float *)((const char*)uv + B * uv_stride); - s.x = (int) (uv0_[0] * texw); - s.y = (int) (uv0_[1] * texh); - s.w = (int) (uv1_[0] * texw - s.x); - s.h = (int) (uv1_[1] * texh - s.y); + uv0_ = (const float *)((const char *)uv + A * uv_stride); + uv1_ = (const float *)((const char *)uv + B * uv_stride); + s.x = (int)(uv0_[0] * texw); + s.y = (int)(uv0_[1] * texh); + s.w = (int)(uv1_[0] * texw - s.x); + s.h = (int)(uv1_[1] * texh - s.y); } d.x = xy0_[0]; @@ -4121,7 +4020,7 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, prev[1] = k1; prev[2] = k2; } - } /* End for(), next triangle */ + } /* End for (), next triangle */ if (prev[0] != -1) { /* flush the last triangle */ @@ -4146,14 +4045,13 @@ end: return retval; } -int -SDL_RenderGeometryRaw(SDL_Renderer *renderer, - SDL_Texture *texture, - const float *xy, int xy_stride, - const SDL_Color *color, int color_stride, - const float *uv, int uv_stride, - int num_vertices, - const void *indices, int num_indices, int size_indices) +int SDL_RenderGeometryRaw(SDL_Renderer *renderer, + SDL_Texture *texture, + const float *xy, int xy_stride, + const SDL_Color *color, int color_stride, + const float *uv, int uv_stride, + int num_vertices, + const void *indices, int num_indices, int size_indices) { int i; int retval = 0; @@ -4173,15 +4071,15 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, } } - if (!xy) { + if (xy == NULL) { return SDL_InvalidParamError("xy"); } - if (!color) { + if (color == NULL) { return SDL_InvalidParamError("color"); } - if (texture && !uv) { + if (texture && uv == NULL) { return SDL_InvalidParamError("uv"); } @@ -4214,7 +4112,7 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, if (texture) { for (i = 0; i < num_vertices; ++i) { - const float *uv_ = (const float *)((const char*)uv + i * uv_stride); + const float *uv_ = (const float *)((const char *)uv + i * uv_stride); float u = uv_[0]; float v = uv_[1]; if (u < 0.0f || v < 0.0f || u > 1.0f || v > 1.0f) { @@ -4246,23 +4144,21 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, /* For the software renderer, try to reinterpret triangles as SDL_Rect */ if (renderer->info.flags & SDL_RENDERER_SOFTWARE) { return SDL_SW_RenderGeometryRaw(renderer, texture, - xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, - indices, num_indices, size_indices); + xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, + indices, num_indices, size_indices); } retval = QueueCmdGeometry(renderer, texture, - xy, xy_stride, color, color_stride, uv, uv_stride, - num_vertices, - indices, num_indices, size_indices, - renderer->scale.x, renderer->scale.y); + xy, xy_stride, color, color_stride, uv, uv_stride, + num_vertices, + indices, num_indices, size_indices, + renderer->scale.x, renderer->scale.y); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); } - -int -SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +int SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { SDL_Rect real_rect; @@ -4272,7 +4168,7 @@ SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return SDL_Unsupported(); } - FlushRenderCommands(renderer); /* we need to render before we read the results. */ + FlushRenderCommands(renderer); /* we need to render before we read the results. */ if (!format) { if (renderer->target == NULL) { @@ -4303,8 +4199,7 @@ SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, format, pixels, pitch); } -static void -SDL_RenderSimulateVSync(SDL_Renderer * renderer) +static void SDL_RenderSimulateVSync(SDL_Renderer *renderer) { Uint32 now, elapsed; const Uint32 interval = renderer->simulate_vsync_interval; @@ -4331,14 +4226,13 @@ SDL_RenderSimulateVSync(SDL_Renderer * renderer) } } -void -SDL_RenderPresent(SDL_Renderer * renderer) +void SDL_RenderPresent(SDL_Renderer *renderer) { SDL_bool presented = SDL_TRUE; CHECK_RENDERER_MAGIC(renderer, ); - FlushRenderCommands(renderer); /* time to send everything to the GPU! */ + FlushRenderCommands(renderer); /* time to send everything to the GPU! */ #if DONT_DRAW_WHILE_HIDDEN /* Don't present while we're hidden */ @@ -4346,18 +4240,17 @@ SDL_RenderPresent(SDL_Renderer * renderer) presented = SDL_FALSE; } else #endif - if (renderer->RenderPresent(renderer) < 0) { + if (renderer->RenderPresent(renderer) < 0) { presented = SDL_FALSE; } - if (renderer->simulate_vsync || + if (renderer->simulate_vsync || (!presented && renderer->wanted_vsync)) { SDL_RenderSimulateVSync(renderer); } } -void -SDL_DestroyTexture(SDL_Texture * texture) +void SDL_DestroyTexture(SDL_Texture *texture) { SDL_Renderer *renderer; @@ -4365,7 +4258,7 @@ SDL_DestroyTexture(SDL_Texture * texture) renderer = texture->renderer; if (texture == renderer->target) { - SDL_SetRenderTarget(renderer, NULL); /* implies command queue flush */ + SDL_SetRenderTarget(renderer, NULL); /* implies command queue flush */ } else { FlushRenderCommandsIfTextureNeeded(texture); } @@ -4399,8 +4292,7 @@ SDL_DestroyTexture(SDL_Texture * texture) SDL_free(texture); } -void -SDL_DestroyRenderer(SDL_Renderer * renderer) +void SDL_DestroyRenderer(SDL_Renderer *renderer) { SDL_RenderCommand *cmd; @@ -4429,9 +4321,10 @@ SDL_DestroyRenderer(SDL_Renderer * renderer) /* Free existing textures for this renderer */ while (renderer->textures) { - SDL_Texture *tex = renderer->textures; (void) tex; + SDL_Texture *tex = renderer->textures; + (void)tex; SDL_DestroyTexture(renderer->textures); - SDL_assert(tex != renderer->textures); /* satisfy static analysis. */ + SDL_assert(tex != renderer->textures); /* satisfy static analysis. */ } if (renderer->window) { @@ -4458,7 +4351,7 @@ int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh) if (texture->native) { return SDL_GL_BindTexture(texture->native, texw, texh); } else if (renderer && renderer->GL_BindTexture) { - FlushRenderCommandsIfTextureNeeded(texture); /* in case the app is going to mess with it. */ + FlushRenderCommandsIfTextureNeeded(texture); /* in case the app is going to mess with it. */ return renderer->GL_BindTexture(renderer, texture, texw, texh); } else { return SDL_Unsupported(); @@ -4474,39 +4367,36 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture) if (texture->native) { return SDL_GL_UnbindTexture(texture->native); } else if (renderer && renderer->GL_UnbindTexture) { - FlushRenderCommandsIfTextureNeeded(texture); /* in case the app messed with it. */ + FlushRenderCommandsIfTextureNeeded(texture); /* in case the app messed with it. */ return renderer->GL_UnbindTexture(renderer, texture); } return SDL_Unsupported(); } -void * -SDL_RenderGetMetalLayer(SDL_Renderer * renderer) +void *SDL_RenderGetMetalLayer(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, NULL); if (renderer->GetMetalLayer) { - FlushRenderCommands(renderer); /* in case the app is going to mess with it. */ + FlushRenderCommands(renderer); /* in case the app is going to mess with it. */ return renderer->GetMetalLayer(renderer); } return NULL; } -void * -SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer) +void *SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer) { CHECK_RENDERER_MAGIC(renderer, NULL); if (renderer->GetMetalCommandEncoder) { - FlushRenderCommands(renderer); /* in case the app is going to mess with it. */ + FlushRenderCommands(renderer); /* in case the app is going to mess with it. */ return renderer->GetMetalCommandEncoder(renderer); } return NULL; } -static SDL_BlendMode -SDL_GetShortBlendMode(SDL_BlendMode blendMode) +static SDL_BlendMode SDL_GetShortBlendMode(SDL_BlendMode blendMode) { if (blendMode == SDL_BLENDMODE_NONE_FULL) { return SDL_BLENDMODE_NONE; @@ -4526,8 +4416,7 @@ SDL_GetShortBlendMode(SDL_BlendMode blendMode) return blendMode; } -static SDL_BlendMode -SDL_GetLongBlendMode(SDL_BlendMode blendMode) +static SDL_BlendMode SDL_GetLongBlendMode(SDL_BlendMode blendMode) { if (blendMode == SDL_BLENDMODE_NONE) { return SDL_BLENDMODE_NONE_FULL; @@ -4547,8 +4436,7 @@ SDL_GetLongBlendMode(SDL_BlendMode blendMode) return blendMode; } -SDL_BlendMode -SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, +SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation) @@ -4558,50 +4446,43 @@ SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstCo return SDL_GetShortBlendMode(blendMode); } -SDL_BlendFactor -SDL_GetBlendModeSrcColorFactor(SDL_BlendMode blendMode) +SDL_BlendFactor SDL_GetBlendModeSrcColorFactor(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendFactor)(((Uint32)blendMode >> 4) & 0xF); } -SDL_BlendFactor -SDL_GetBlendModeDstColorFactor(SDL_BlendMode blendMode) +SDL_BlendFactor SDL_GetBlendModeDstColorFactor(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendFactor)(((Uint32)blendMode >> 8) & 0xF); } -SDL_BlendOperation -SDL_GetBlendModeColorOperation(SDL_BlendMode blendMode) +SDL_BlendOperation SDL_GetBlendModeColorOperation(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendOperation)(((Uint32)blendMode >> 0) & 0xF); } -SDL_BlendFactor -SDL_GetBlendModeSrcAlphaFactor(SDL_BlendMode blendMode) +SDL_BlendFactor SDL_GetBlendModeSrcAlphaFactor(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendFactor)(((Uint32)blendMode >> 20) & 0xF); } -SDL_BlendFactor -SDL_GetBlendModeDstAlphaFactor(SDL_BlendMode blendMode) +SDL_BlendFactor SDL_GetBlendModeDstAlphaFactor(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendFactor)(((Uint32)blendMode >> 24) & 0xF); } -SDL_BlendOperation -SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode) +SDL_BlendOperation SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode) { blendMode = SDL_GetLongBlendMode(blendMode); return (SDL_BlendOperation)(((Uint32)blendMode >> 16) & 0xF); } -int -SDL_RenderSetVSync(SDL_Renderer * renderer, int vsync) +int SDL_RenderSetVSync(SDL_Renderer *renderer, int vsync) { CHECK_RENDERER_MAGIC(renderer, -1); @@ -4612,8 +4493,13 @@ SDL_RenderSetVSync(SDL_Renderer * renderer, int vsync) renderer->wanted_vsync = vsync ? SDL_TRUE : SDL_FALSE; if (!renderer->SetVSync || - renderer->SetVSync(renderer, vsync) < 0) { + renderer->SetVSync(renderer, vsync) != 0) { renderer->simulate_vsync = vsync ? SDL_TRUE : SDL_FALSE; + if (renderer->simulate_vsync) { + renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; + } else { + renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC; + } } else { renderer->simulate_vsync = SDL_FALSE; } diff --git a/modules/SDL2/src/render/SDL_sysrender.h b/modules/SDL2/src/render/SDL_sysrender.h index 245b9f1..36e9555 100644 --- a/modules/SDL2/src/render/SDL_sysrender.h +++ b/modules/SDL2/src/render/SDL_sysrender.h @@ -44,7 +44,6 @@ typedef struct SDL_DRect double h; } SDL_DRect; - /* The SDL 2D rendering system */ typedef struct SDL_RenderDriver SDL_RenderDriver; @@ -53,14 +52,14 @@ typedef struct SDL_RenderDriver SDL_RenderDriver; struct SDL_Texture { const void *magic; - Uint32 format; /**< The pixel format of the texture */ - int access; /**< SDL_TextureAccess */ - int w; /**< The width of the texture */ - int h; /**< The height of the texture */ - int modMode; /**< The texture modulation mode */ - SDL_BlendMode blendMode; /**< The texture blend mode */ - SDL_ScaleMode scaleMode; /**< The texture scale mode */ - SDL_Color color; /**< Texture modulation values */ + Uint32 format; /**< The pixel format of the texture */ + int access; /**< SDL_TextureAccess */ + int w; /**< The width of the texture */ + int h; /**< The height of the texture */ + int modMode; /**< The texture modulation mode */ + SDL_BlendMode blendMode; /**< The texture blend mode */ + SDL_ScaleMode scaleMode; /**< The texture scale mode */ + SDL_Color color; /**< Texture modulation values */ SDL_Renderer *renderer; @@ -70,11 +69,11 @@ struct SDL_Texture void *pixels; int pitch; SDL_Rect locked_rect; - SDL_Surface *locked_surface; /**< Locked region exposed as a SDL surface */ + SDL_Surface *locked_surface; /**< Locked region exposed as a SDL surface */ Uint32 last_command_generation; /* last command queue generation this texture was in. */ - void *driverdata; /**< Driver specific texture representation */ + void *driverdata; /**< Driver specific texture representation */ void *userdata; SDL_Texture *prev; @@ -99,23 +98,28 @@ typedef enum typedef struct SDL_RenderCommand { SDL_RenderCommandType command; - union { - struct { + union + { + struct + { size_t first; SDL_Rect rect; } viewport; - struct { + struct + { SDL_bool enabled; SDL_Rect rect; } cliprect; - struct { + struct + { size_t first; size_t count; Uint8 r, g, b, a; SDL_BlendMode blend; SDL_Texture *texture; } draw; - struct { + struct + { size_t first; Uint8 r, g, b, a; } color; @@ -123,14 +127,12 @@ typedef struct SDL_RenderCommand struct SDL_RenderCommand *next; } SDL_RenderCommand; - typedef struct SDL_VertexSolid { SDL_FPoint position; - SDL_Color color; + SDL_Color color; } SDL_VertexSolid; - typedef enum { SDL_RENDERLINEMETHOD_POINTS, @@ -138,68 +140,67 @@ typedef enum SDL_RENDERLINEMETHOD_GEOMETRY, } SDL_RenderLineMethod; - /* Define the SDL renderer structure */ struct SDL_Renderer { const void *magic; - void (*WindowEvent) (SDL_Renderer * renderer, const SDL_WindowEvent *event); - int (*GetOutputSize) (SDL_Renderer * renderer, int *w, int *h); - SDL_bool (*SupportsBlendMode)(SDL_Renderer * renderer, SDL_BlendMode blendMode); - int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture); - int (*QueueSetViewport) (SDL_Renderer * renderer, SDL_RenderCommand *cmd); - int (*QueueSetDrawColor) (SDL_Renderer * renderer, SDL_RenderCommand *cmd); - int (*QueueDrawPoints) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, - int count); - int (*QueueDrawLines) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, - int count); - int (*QueueFillRects) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, - int count); - int (*QueueCopy) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect); - int (*QueueCopyEx) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcquad, const SDL_FRect * dstrect, - const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y); - int (*QueueGeometry) (SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y); - - int (*RunCommandQueue) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize); - int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, - int pitch); + void (*WindowEvent)(SDL_Renderer *renderer, const SDL_WindowEvent *event); + int (*GetOutputSize)(SDL_Renderer *renderer, int *w, int *h); + SDL_bool (*SupportsBlendMode)(SDL_Renderer *renderer, SDL_BlendMode blendMode); + int (*CreateTexture)(SDL_Renderer *renderer, SDL_Texture *texture); + int (*QueueSetViewport)(SDL_Renderer *renderer, SDL_RenderCommand *cmd); + int (*QueueSetDrawColor)(SDL_Renderer *renderer, SDL_RenderCommand *cmd); + int (*QueueDrawPoints)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, + int count); + int (*QueueDrawLines)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, + int count); + int (*QueueFillRects)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FRect *rects, + int count); + int (*QueueCopy)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect); + int (*QueueCopyEx)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcquad, const SDL_FRect *dstrect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y); + int (*QueueGeometry)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y); + + int (*RunCommandQueue)(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize); + int (*UpdateTexture)(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, + int pitch); #if SDL_HAVE_YUV - int (*UpdateTextureYUV) (SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, + int (*UpdateTextureYUV)(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch); - int (*UpdateTextureNV) (SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch); + int (*UpdateTextureNV)(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch); #endif - int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch); - void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); - void (*SetTextureScaleMode) (SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode); - int (*SetRenderTarget) (SDL_Renderer * renderer, SDL_Texture * texture); - int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch); - int (*RenderPresent) (SDL_Renderer * renderer); - void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture); + int (*LockTexture)(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch); + void (*UnlockTexture)(SDL_Renderer *renderer, SDL_Texture *texture); + void (*SetTextureScaleMode)(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode); + int (*SetRenderTarget)(SDL_Renderer *renderer, SDL_Texture *texture); + int (*RenderReadPixels)(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch); + int (*RenderPresent)(SDL_Renderer *renderer); + void (*DestroyTexture)(SDL_Renderer *renderer, SDL_Texture *texture); - void (*DestroyRenderer) (SDL_Renderer * renderer); + void (*DestroyRenderer)(SDL_Renderer *renderer); - int (*SetVSync) (SDL_Renderer * renderer, int vsync); + int (*SetVSync)(SDL_Renderer *renderer, int vsync); - int (*GL_BindTexture) (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh); - int (*GL_UnbindTexture) (SDL_Renderer * renderer, SDL_Texture *texture); + int (*GL_BindTexture)(SDL_Renderer *renderer, SDL_Texture *texture, float *texw, float *texh); + int (*GL_UnbindTexture)(SDL_Renderer *renderer, SDL_Texture *texture); - void *(*GetMetalLayer) (SDL_Renderer * renderer); - void *(*GetMetalCommandEncoder) (SDL_Renderer * renderer); + void *(*GetMetalLayer)(SDL_Renderer *renderer); + void *(*GetMetalCommandEncoder)(SDL_Renderer *renderer); /* The current renderer info */ SDL_RendererInfo info; @@ -260,8 +261,8 @@ struct SDL_Renderer SDL_Texture *target; SDL_mutex *target_mutex; - SDL_Color color; /**< Color for drawing operations values */ - SDL_BlendMode blendMode; /**< The drawing blend mode */ + SDL_Color color; /**< Color for drawing operations values */ + SDL_BlendMode blendMode; /**< The drawing blend mode */ SDL_bool always_batch; SDL_bool batching; @@ -287,7 +288,7 @@ struct SDL_Renderer /* Define the SDL render driver structure */ struct SDL_RenderDriver { - SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags); + SDL_Renderer *(*CreateRenderer)(SDL_Window *window, Uint32 flags); /* Info about the renderer capabilities */ SDL_RendererInfo info; @@ -320,8 +321,8 @@ extern SDL_BlendOperation SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode the next call, because it might be in an array that gets realloc()'d. */ extern void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset); -extern int SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect, SDL_ScaleMode scaleMode); -extern int SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect, SDL_ScaleMode scaleMode); +extern int SDL_PrivateLowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, SDL_ScaleMode scaleMode); +extern int SDL_PrivateUpperBlitScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, SDL_ScaleMode scaleMode); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/render/SDL_yuv_sw.c b/modules/SDL2/src/render/SDL_yuv_sw.c index 302e07d..c4385e2 100644 --- a/modules/SDL2/src/render/SDL_yuv_sw.c +++ b/modules/SDL2/src/render/SDL_yuv_sw.c @@ -24,13 +24,11 @@ #if SDL_HAVE_YUV - #include "SDL_yuv_sw_c.h" +#include "../video/SDL_yuv_c.h" #include "SDL_cpuinfo.h" - -SDL_SW_YUVTexture * -SDL_SW_CreateYUVTexture(Uint32 format, int w, int h) +SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h) { SDL_SW_YUVTexture *swdata; @@ -48,8 +46,8 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h) return NULL; } - swdata = (SDL_SW_YUVTexture *) SDL_calloc(1, sizeof(*swdata)); - if (!swdata) { + swdata = (SDL_SW_YUVTexture *)SDL_calloc(1, sizeof(*swdata)); + if (swdata == NULL) { SDL_OutOfMemory(); return NULL; } @@ -59,33 +57,13 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h) swdata->w = w; swdata->h = h; { - const int sz_plane = w * h; - const int sz_plane_chroma = ((w + 1) / 2) * ((h + 1) / 2); - const int sz_plane_packed = ((w + 1) / 2) * h; - int dst_size = 0; - switch(format) - { - case SDL_PIXELFORMAT_YV12: /**< Planar mode: Y + V + U (3 planes) */ - case SDL_PIXELFORMAT_IYUV: /**< Planar mode: Y + U + V (3 planes) */ - dst_size = sz_plane + sz_plane_chroma + sz_plane_chroma; - break; - - case SDL_PIXELFORMAT_YUY2: /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */ - case SDL_PIXELFORMAT_UYVY: /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */ - case SDL_PIXELFORMAT_YVYU: /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */ - dst_size = 4 * sz_plane_packed; - break; - - case SDL_PIXELFORMAT_NV12: /**< Planar mode: Y + U/V interleaved (2 planes) */ - case SDL_PIXELFORMAT_NV21: /**< Planar mode: Y + V/U interleaved (2 planes) */ - dst_size = sz_plane + sz_plane_chroma + sz_plane_chroma; - break; - - default: - SDL_assert(0 && "We should never get here (caught above)"); - break; + size_t dst_size; + if (SDL_CalculateYUVSize(format, w, h, &dst_size, NULL) < 0) { + SDL_SW_DestroyYUVTexture(swdata); + SDL_OutOfMemory(); + return NULL; } - swdata->pixels = (Uint8 *) SDL_SIMDAlloc(dst_size); + swdata->pixels = (Uint8 *)SDL_SIMDAlloc(dst_size); if (!swdata->pixels) { SDL_SW_DestroyYUVTexture(swdata); SDL_OutOfMemory(); @@ -125,36 +103,34 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h) } /* We're all done.. */ - return (swdata); + return swdata; } -int -SDL_SW_QueryYUVTexturePixels(SDL_SW_YUVTexture * swdata, void **pixels, - int *pitch) +int SDL_SW_QueryYUVTexturePixels(SDL_SW_YUVTexture *swdata, void **pixels, + int *pitch) { *pixels = swdata->planes[0]; *pitch = swdata->pitches[0]; return 0; } -int -SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, - const void *pixels, int pitch) +int SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, + const void *pixels, int pitch) { switch (swdata->format) { case SDL_PIXELFORMAT_YV12: case SDL_PIXELFORMAT_IYUV: if (rect->x == 0 && rect->y == 0 && rect->w == swdata->w && rect->h == swdata->h) { - SDL_memcpy(swdata->pixels, pixels, - (swdata->h * swdata->w) + 2* ((swdata->h + 1) /2) * ((swdata->w + 1) / 2)); + SDL_memcpy(swdata->pixels, pixels, + (size_t)(swdata->h * swdata->w) + 2 * ((swdata->h + 1) / 2) * ((swdata->w + 1) / 2)); } else { Uint8 *src, *dst; int row; size_t length; /* Copy the Y plane */ - src = (Uint8 *) pixels; + src = (Uint8 *)pixels; dst = swdata->pixels + rect->y * swdata->w + rect->x; length = rect->w; for (row = 0; row < rect->h; ++row) { @@ -162,94 +138,92 @@ SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, src += pitch; dst += swdata->w; } - + /* Copy the next plane */ - src = (Uint8 *) pixels + rect->h * pitch; + src = (Uint8 *)pixels + rect->h * pitch; dst = swdata->pixels + swdata->h * swdata->w; - dst += rect->y/2 * ((swdata->w + 1) / 2) + rect->x/2; + dst += rect->y / 2 * ((swdata->w + 1) / 2) + rect->x / 2; length = (rect->w + 1) / 2; - for (row = 0; row < (rect->h + 1)/2; ++row) { + for (row = 0; row < (rect->h + 1) / 2; ++row) { SDL_memcpy(dst, src, length); - src += (pitch + 1)/2; - dst += (swdata->w + 1)/2; + src += (pitch + 1) / 2; + dst += (swdata->w + 1) / 2; } /* Copy the next plane */ - src = (Uint8 *) pixels + rect->h * pitch + ((rect->h + 1) / 2) * ((pitch + 1) / 2); + src = (Uint8 *)pixels + rect->h * pitch + ((rect->h + 1) / 2) * ((pitch + 1) / 2); dst = swdata->pixels + swdata->h * swdata->w + - ((swdata->h + 1)/2) * ((swdata->w+1) / 2); - dst += rect->y/2 * ((swdata->w + 1)/2) + rect->x/2; + ((swdata->h + 1) / 2) * ((swdata->w + 1) / 2); + dst += rect->y / 2 * ((swdata->w + 1) / 2) + rect->x / 2; length = (rect->w + 1) / 2; - for (row = 0; row < (rect->h + 1)/2; ++row) { + for (row = 0; row < (rect->h + 1) / 2; ++row) { SDL_memcpy(dst, src, length); - src += (pitch + 1)/2; - dst += (swdata->w + 1)/2; + src += (pitch + 1) / 2; + dst += (swdata->w + 1) / 2; } } break; case SDL_PIXELFORMAT_YUY2: case SDL_PIXELFORMAT_UYVY: case SDL_PIXELFORMAT_YVYU: - { + { + Uint8 *src, *dst; + int row; + size_t length; + + src = (Uint8 *)pixels; + dst = + swdata->planes[0] + rect->y * swdata->pitches[0] + + rect->x * 2; + length = 4 * (((size_t)rect->w + 1) / 2); + for (row = 0; row < rect->h; ++row) { + SDL_memcpy(dst, src, length); + src += pitch; + dst += swdata->pitches[0]; + } + } break; + case SDL_PIXELFORMAT_NV12: + case SDL_PIXELFORMAT_NV21: + { + if (rect->x == 0 && rect->y == 0 && rect->w == swdata->w && rect->h == swdata->h) { + SDL_memcpy(swdata->pixels, pixels, + (size_t)(swdata->h * swdata->w) + 2 * ((swdata->h + 1) / 2) * ((swdata->w + 1) / 2)); + } else { + Uint8 *src, *dst; int row; size_t length; - src = (Uint8 *) pixels; - dst = - swdata->planes[0] + rect->y * swdata->pitches[0] + - rect->x * 2; - length = 4 * ((rect->w + 1) / 2); + /* Copy the Y plane */ + src = (Uint8 *)pixels; + dst = swdata->pixels + rect->y * swdata->w + rect->x; + length = rect->w; for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, src, length); src += pitch; - dst += swdata->pitches[0]; + dst += swdata->w; } - } - break; - case SDL_PIXELFORMAT_NV12: - case SDL_PIXELFORMAT_NV21: - { - if (rect->x == 0 && rect->y == 0 && rect->w == swdata->w && rect->h == swdata->h) { - SDL_memcpy(swdata->pixels, pixels, - (swdata->h * swdata->w) + 2* ((swdata->h + 1) /2) * ((swdata->w + 1) / 2)); - } else { - - Uint8 *src, *dst; - int row; - size_t length; - - /* Copy the Y plane */ - src = (Uint8 *) pixels; - dst = swdata->pixels + rect->y * swdata->w + rect->x; - length = rect->w; - for (row = 0; row < rect->h; ++row) { - SDL_memcpy(dst, src, length); - src += pitch; - dst += swdata->w; - } - - /* Copy the next plane */ - src = (Uint8 *) pixels + rect->h * pitch; - dst = swdata->pixels + swdata->h * swdata->w; - dst += 2 * ((rect->y + 1)/2) * ((swdata->w + 1) / 2) + 2 * (rect->x/2); - length = 2 * ((rect->w + 1) / 2); - for (row = 0; row < (rect->h + 1)/2; ++row) { - SDL_memcpy(dst, src, length); - src += 2 * ((pitch + 1)/2); - dst += 2 * ((swdata->w + 1)/2); - } + + /* Copy the next plane */ + src = (Uint8 *)pixels + rect->h * pitch; + dst = swdata->pixels + swdata->h * swdata->w; + dst += 2 * ((rect->y + 1) / 2) * ((swdata->w + 1) / 2) + 2 * (rect->x / 2); + length = 2 * (((size_t)rect->w + 1) / 2); + for (row = 0; row < (rect->h + 1) / 2; ++row) { + SDL_memcpy(dst, src, length); + src += 2 * ((pitch + 1) / 2); + dst += 2 * ((swdata->w + 1) / 2); } } } + } return 0; } -int -SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +int SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { const Uint8 *src; Uint8 *dst; @@ -274,12 +248,12 @@ SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, dst = swdata->pixels + swdata->h * swdata->w + ((swdata->h + 1) / 2) * ((swdata->w + 1) / 2); } - dst += rect->y/2 * ((swdata->w + 1)/2) + rect->x/2; + dst += rect->y / 2 * ((swdata->w + 1) / 2) + rect->x / 2; length = (rect->w + 1) / 2; - for (row = 0; row < (rect->h + 1)/2; ++row) { + for (row = 0; row < (rect->h + 1) / 2; ++row) { SDL_memcpy(dst, src, length); src += Upitch; - dst += (swdata->w + 1)/2; + dst += (swdata->w + 1) / 2; } /* Copy the V plane */ @@ -290,19 +264,19 @@ SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, dst = swdata->pixels + swdata->h * swdata->w + ((swdata->h + 1) / 2) * ((swdata->w + 1) / 2); } - dst += rect->y/2 * ((swdata->w + 1)/2) + rect->x/2; + dst += rect->y / 2 * ((swdata->w + 1) / 2) + rect->x / 2; length = (rect->w + 1) / 2; - for (row = 0; row < (rect->h + 1)/2; ++row) { + for (row = 0; row < (rect->h + 1) / 2; ++row) { SDL_memcpy(dst, src, length); src += Vpitch; - dst += (swdata->w + 1)/2; + dst += (swdata->w + 1) / 2; } return 0; } -int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { const Uint8 *src; Uint8 *dst; @@ -322,32 +296,28 @@ int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * re /* Copy the UV or VU plane */ src = UVplane; dst = swdata->pixels + swdata->h * swdata->w; - dst += rect->y * ((swdata->w + 1)/2) + rect->x; + dst += rect->y * ((swdata->w + 1) / 2) + rect->x; length = (rect->w + 1) / 2; length *= 2; - for (row = 0; row < (rect->h + 1)/2; ++row) { + for (row = 0; row < (rect->h + 1) / 2; ++row) { SDL_memcpy(dst, src, length); src += UVpitch; - dst += 2 * ((swdata->w + 1)/2); + dst += 2 * ((swdata->w + 1) / 2); } return 0; } -int -SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, - void **pixels, int *pitch) +int SDL_SW_LockYUVTexture(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, + void **pixels, int *pitch) { switch (swdata->format) { case SDL_PIXELFORMAT_YV12: case SDL_PIXELFORMAT_IYUV: case SDL_PIXELFORMAT_NV12: case SDL_PIXELFORMAT_NV21: - if (rect - && (rect->x != 0 || rect->y != 0 || rect->w != swdata->w - || rect->h != swdata->h)) { - return SDL_SetError - ("YV12, IYUV, NV12, NV21 textures only support full surface locks"); + if (rect && (rect->x != 0 || rect->y != 0 || rect->w != swdata->w || rect->h != swdata->h)) { + return SDL_SetError("YV12, IYUV, NV12, NV21 textures only support full surface locks"); } break; } @@ -361,15 +331,13 @@ SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, return 0; } -void -SDL_SW_UnlockYUVTexture(SDL_SW_YUVTexture * swdata) +void SDL_SW_UnlockYUVTexture(SDL_SW_YUVTexture *swdata) { } -int -SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect, - Uint32 target_format, int w, int h, void *pixels, - int pitch) +int SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture *swdata, const SDL_Rect *srcrect, + Uint32 target_format, int w, int h, void *pixels, + int pitch) { int stretch; @@ -407,7 +375,7 @@ SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect, SDL_CreateRGBSurfaceFrom(pixels, w, h, bpp, pitch, Rmask, Gmask, Bmask, Amask); if (!swdata->display) { - return (-1); + return -1; } } if (!swdata->stretch) { @@ -418,14 +386,14 @@ SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect, SDL_CreateRGBSurface(0, swdata->w, swdata->h, bpp, Rmask, Gmask, Bmask, Amask); if (!swdata->stretch) { - return (-1); + return -1; } } pixels = swdata->stretch->pixels; pitch = swdata->stretch->pitch; } if (SDL_ConvertPixels(swdata->w, swdata->h, swdata->format, - swdata->planes[0], swdata->pitches[0], + swdata->planes[0], swdata->pitches[0], target_format, pixels, pitch) < 0) { return -1; } @@ -436,8 +404,7 @@ SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect, return 0; } -void -SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture * swdata) +void SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture *swdata) { if (swdata) { SDL_SIMDFree(swdata->pixels); diff --git a/modules/SDL2/src/render/SDL_yuv_sw_c.h b/modules/SDL2/src/render/SDL_yuv_sw_c.h index ff718fc..8b7b0ba 100644 --- a/modules/SDL2/src/render/SDL_yuv_sw_c.h +++ b/modules/SDL2/src/render/SDL_yuv_sw_c.h @@ -47,24 +47,24 @@ struct SDL_SW_YUVTexture typedef struct SDL_SW_YUVTexture SDL_SW_YUVTexture; SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h); -int SDL_SW_QueryYUVTexturePixels(SDL_SW_YUVTexture * swdata, void **pixels, +int SDL_SW_QueryYUVTexturePixels(SDL_SW_YUVTexture *swdata, void **pixels, int *pitch); -int SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, +int SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, const void *pixels, int pitch); -int SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, +int SDL_SW_UpdateYUVTexturePlanar(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch); -int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch); -int SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect, +int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch); +int SDL_SW_LockYUVTexture(SDL_SW_YUVTexture *swdata, const SDL_Rect *rect, void **pixels, int *pitch); -void SDL_SW_UnlockYUVTexture(SDL_SW_YUVTexture * swdata); -int SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect, +void SDL_SW_UnlockYUVTexture(SDL_SW_YUVTexture *swdata); +int SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture *swdata, const SDL_Rect *srcrect, Uint32 target_format, int w, int h, void *pixels, int pitch); -void SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture * swdata); +void SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture *swdata); #endif /* SDL_yuv_sw_c_h_ */ diff --git a/modules/SDL2/src/render/direct3d/SDL_render_d3d.c b/modules/SDL2/src/render/direct3d/SDL_render_d3d.c index c752999..5470a7d 100644 --- a/modules/SDL2/src/render/direct3d/SDL_render_d3d.c +++ b/modules/SDL2/src/render/direct3d/SDL_render_d3d.c @@ -54,12 +54,11 @@ typedef struct LPDIRECT3DPIXELSHADER9 shader; } D3D_DrawStateCache; - /* Direct3D renderer implementation */ typedef struct { - void* d3dDLL; + void *d3dDLL; IDirect3D9 *d3d; IDirect3DDevice9 *device; UINT adapter; @@ -70,7 +69,7 @@ typedef struct D3DTEXTUREFILTERTYPE scaleMode[8]; IDirect3DSurface9 *defaultRenderTarget; IDirect3DSurface9 *currentRenderTarget; - void* d3dxDLL; + void *d3dxDLL; #if SDL_HAVE_YUV LPDIRECT3DPIXELSHADER9 shaders[NUM_SHADERS]; #endif @@ -115,8 +114,7 @@ typedef struct float u, v; } Vertex; -static int -D3D_SetError(const char *prefix, HRESULT result) +static int D3D_SetError(const char *prefix, HRESULT result) { const char *error; @@ -194,8 +192,7 @@ D3D_SetError(const char *prefix, HRESULT result) return SDL_SetError("%s: %s", prefix, error); } -static D3DFORMAT -PixelFormatToD3DFMT(Uint32 format) +static D3DFORMAT PixelFormatToD3DFMT(Uint32 format) { switch (format) { case SDL_PIXELFORMAT_RGB565: @@ -214,8 +211,7 @@ PixelFormatToD3DFMT(Uint32 format) } } -static Uint32 -D3DFMTToPixelFormat(D3DFORMAT format) +static Uint32 D3DFMTToPixelFormat(D3DFORMAT format) { switch (format) { case D3DFMT_R5G6B5: @@ -229,8 +225,7 @@ D3DFMTToPixelFormat(D3DFORMAT format) } } -static void -D3D_InitRenderState(D3D_RenderData *data) +static void D3D_InitRenderState(D3D_RenderData *data) { D3DMATRIX matrix; @@ -288,12 +283,11 @@ D3D_InitRenderState(D3D_RenderData *data) data->beginScene = SDL_TRUE; } -static int D3D_Reset(SDL_Renderer * renderer); +static int D3D_Reset(SDL_Renderer *renderer); -static int -D3D_ActivateRenderer(SDL_Renderer * renderer) +static int D3D_ActivateRenderer(SDL_Renderer *renderer) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; HRESULT result; if (data->updateSize) { @@ -337,25 +331,22 @@ D3D_ActivateRenderer(SDL_Renderer * renderer) return 0; } -static void -D3D_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void D3D_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { data->updateSize = SDL_TRUE; } } -static int -D3D_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int D3D_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GetWindowSizeInPixels(renderer->window, w, h); return 0; } -static D3DBLEND -GetBlendFunc(SDL_BlendFactor factor) +static D3DBLEND GetBlendFunc(SDL_BlendFactor factor) { switch (factor) { case SDL_BLENDFACTOR_ZERO: @@ -378,13 +369,13 @@ GetBlendFunc(SDL_BlendFactor factor) return D3DBLEND_DESTALPHA; case SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA: return D3DBLEND_INVDESTALPHA; - default: break; + default: + break; } - return (D3DBLEND) 0; + return (D3DBLEND)0; } -static D3DBLENDOP -GetBlendEquation(SDL_BlendOperation operation) +static D3DBLENDOP GetBlendEquation(SDL_BlendOperation operation) { switch (operation) { case SDL_BLENDOPERATION_ADD: @@ -397,15 +388,15 @@ GetBlendEquation(SDL_BlendOperation operation) return D3DBLENDOP_MIN; case SDL_BLENDOPERATION_MAXIMUM: return D3DBLENDOP_MAX; - default: break; + default: + break; } - return (D3DBLENDOP) 0; + return (D3DBLENDOP)0; } -static SDL_bool -D3D_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool D3D_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode); @@ -428,8 +419,7 @@ D3D_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) return SDL_TRUE; } -static int -D3D_CreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD usage, Uint32 format, D3DFORMAT d3dfmt, int w, int h) +static int D3D_CreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD usage, Uint32 format, D3DFORMAT d3dfmt, int w, int h) { HRESULT result; @@ -441,23 +431,21 @@ D3D_CreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD us texture->d3dfmt = d3dfmt; result = IDirect3DDevice9_CreateTexture(device, w, h, 1, usage, - PixelFormatToD3DFMT(format), - D3DPOOL_DEFAULT, &texture->texture, NULL); + PixelFormatToD3DFMT(format), + D3DPOOL_DEFAULT, &texture->texture, NULL); if (FAILED(result)) { return D3D_SetError("CreateTexture(D3DPOOL_DEFAULT)", result); } return 0; } - -static int -D3D_CreateStagingTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) +static int D3D_CreateStagingTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) { HRESULT result; if (texture->staging == NULL) { result = IDirect3DDevice9_CreateTexture(device, texture->w, texture->h, 1, 0, - texture->d3dfmt, D3DPOOL_SYSTEMMEM, &texture->staging, NULL); + texture->d3dfmt, D3DPOOL_SYSTEMMEM, &texture->staging, NULL); if (FAILED(result)) { return D3D_SetError("CreateTexture(D3DPOOL_SYSTEMMEM)", result); } @@ -465,8 +453,7 @@ D3D_CreateStagingTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) return 0; } -static int -D3D_RecreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture) +static int D3D_RecreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture) { if (texture->texture) { IDirect3DTexture9_Release(texture->texture); @@ -479,8 +466,7 @@ D3D_RecreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture) return 0; } -static int -D3D_UpdateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, int x, int y, int w, int h, const void *pixels, int pitch) +static int D3D_UpdateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, int x, int y, int w, int h, const void *pixels, int pitch) { RECT d3drect; D3DLOCKED_RECT locked; @@ -494,10 +480,10 @@ D3D_UpdateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, int x, i } d3drect.left = x; - d3drect.right = x + w; + d3drect.right = (LONG)x + w; d3drect.top = y; - d3drect.bottom = y + h; - + d3drect.bottom = (LONG)y + h; + result = IDirect3DTexture9_LockRect(texture->staging, 0, &locked, &d3drect, 0); if (FAILED(result)) { return D3D_SetError("LockRect()", result); @@ -507,7 +493,7 @@ D3D_UpdateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, int x, i dst = (Uint8 *)locked.pBits; length = w * SDL_BYTESPERPIXEL(texture->format); if (length == pitch && length == locked.Pitch) { - SDL_memcpy(dst, src, length*h); + SDL_memcpy(dst, src, (size_t)length * h); } else { if (length > pitch) { length = pitch; @@ -530,8 +516,7 @@ D3D_UpdateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, int x, i return 0; } -static void -D3D_DestroyTextureRep(D3D_TextureRep *texture) +static void D3D_DestroyTextureRep(D3D_TextureRep *texture) { if (texture->texture) { IDirect3DTexture9_Release(texture->texture); @@ -543,15 +528,14 @@ D3D_DestroyTextureRep(D3D_TextureRep *texture) } } -static int -D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3D_TextureData *texturedata; DWORD usage; - texturedata = (D3D_TextureData *) SDL_calloc(1, sizeof(*texturedata)); - if (!texturedata) { + texturedata = (D3D_TextureData *)SDL_calloc(1, sizeof(*texturedata)); + if (texturedata == NULL) { return SDL_OutOfMemory(); } texturedata->scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? D3DTEXF_POINT : D3DTEXF_LINEAR; @@ -584,13 +568,12 @@ D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D_RecreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return 0; } @@ -611,14 +594,13 @@ D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int D3D_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; - D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata; + D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -628,14 +610,14 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, #if SDL_HAVE_YUV if (texturedata->yuv) { /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + rect->h * pitch); + pixels = (const void *)((const Uint8 *)pixels + rect->h * pitch); if (D3D_UpdateTextureRep(data->device, texture->format == SDL_PIXELFORMAT_YV12 ? &texturedata->vtexture : &texturedata->utexture, rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, pixels, (pitch + 1) / 2) < 0) { return -1; } /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2)); + pixels = (const void *)((const Uint8 *)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2)); if (D3D_UpdateTextureRep(data->device, texture->format == SDL_PIXELFORMAT_YV12 ? &texturedata->utexture : &texturedata->vtexture, rect->x / 2, (rect->y + 1) / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, pixels, (pitch + 1) / 2) < 0) { return -1; } @@ -645,17 +627,16 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, } #if SDL_HAVE_YUV -static int -D3D_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int D3D_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; - D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata; + D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -672,15 +653,14 @@ D3D_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, } #endif -static int -D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int D3D_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; IDirect3DDevice9 *device = data->device; - if (!texturedata) { + if (texturedata == NULL) { return SDL_SetError("Texture is not currently available"); } #if SDL_HAVE_YUV @@ -696,8 +676,8 @@ D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, } } *pixels = - (void *) ((Uint8 *) texturedata->pixels + rect->y * texturedata->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(texturedata->pixels + rect->y * texturedata->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = texturedata->pitch; } else #endif @@ -711,9 +691,9 @@ D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, } d3drect.left = rect->x; - d3drect.right = rect->x + rect->w; + d3drect.right = (LONG)rect->x + rect->w; d3drect.top = rect->y; - d3drect.bottom = rect->y + rect->h; + d3drect.bottom = (LONG)rect->y + rect->h; result = IDirect3DTexture9_LockRect(texturedata->texture.staging, 0, &locked, &d3drect, 0); if (FAILED(result)) { @@ -725,24 +705,22 @@ D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static void -D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void D3D_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return; } #if SDL_HAVE_YUV if (texturedata->yuv) { const SDL_Rect *rect = &texturedata->locked_rect; void *pixels = - (void *) ((Uint8 *) texturedata->pixels + rect->y * texturedata->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(texturedata->pixels + rect->y * texturedata->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); D3D_UpdateTexture(renderer, texture, rect, pixels, texturedata->pitch); - } - else + } else #endif { IDirect3DTexture9_UnlockRect(texturedata->texture.staging, 0); @@ -756,22 +734,20 @@ D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) } } -static void -D3D_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void D3D_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return; } texturedata->scaleMode = (scaleMode == SDL_ScaleModeNearest) ? D3DTEXF_POINT : D3DTEXF_LINEAR; } -static int -D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D_SetRenderTargetInternal(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3D_TextureData *texturedata; D3D_TextureRep *texturerep; HRESULT result; @@ -789,7 +765,7 @@ D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture) } texturedata = (D3D_TextureData *)texture->driverdata; - if (!texturedata) { + if (texturedata == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -798,7 +774,7 @@ D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture) if (texturerep->dirty && texturerep->staging) { if (!texturerep->texture) { result = IDirect3DDevice9_CreateTexture(device, texturerep->w, texturerep->h, 1, texturerep->usage, - PixelFormatToD3DFMT(texturerep->format), D3DPOOL_DEFAULT, &texturerep->texture, NULL); + PixelFormatToD3DFMT(texturerep->format), D3DPOOL_DEFAULT, &texturerep->texture, NULL); if (FAILED(result)) { return D3D_SetError("CreateTexture(D3DPOOL_DEFAULT)", result); } @@ -812,19 +788,18 @@ D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture) } result = IDirect3DTexture9_GetSurfaceLevel(texturedata->texture.texture, 0, &data->currentRenderTarget); - if(FAILED(result)) { + if (FAILED(result)) { return D3D_SetError("GetSurfaceLevel()", result); } result = IDirect3DDevice9_SetRenderTarget(data->device, 0, data->currentRenderTarget); - if(FAILED(result)) { + if (FAILED(result)) { return D3D_SetError("SetRenderTarget()", result); } return 0; } -static int -D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { if (D3D_ActivateRenderer(renderer) < 0) { return -1; @@ -833,22 +808,19 @@ D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return D3D_SetRenderTargetInternal(renderer, texture); } - -static int -D3D_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int D3D_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -D3D_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int D3D_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { const DWORD color = D3DCOLOR_ARGB(cmd->data.draw.a, cmd->data.draw.r, cmd->data.draw.g, cmd->data.draw.b); - const size_t vertslen = count * sizeof (Vertex); - Vertex *verts = (Vertex *) SDL_AllocateRenderVertices(renderer, vertslen, 0, &cmd->data.draw.first); + const size_t vertslen = count * sizeof(Vertex); + Vertex *verts = (Vertex *)SDL_AllocateRenderVertices(renderer, vertslen, 0, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -864,17 +836,16 @@ D3D_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F return 0; } -static int -D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; - Vertex *verts = (Vertex *) SDL_AllocateRenderVertices(renderer, count * sizeof (Vertex), 0, &cmd->data.draw.first); + Vertex *verts = (Vertex *)SDL_AllocateRenderVertices(renderer, count * sizeof(Vertex), 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } @@ -895,8 +866,8 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); verts->x = xy_[0] * scale_x - 0.5f; verts->y = xy_[1] * scale_y - 0.5f; @@ -904,7 +875,7 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t verts->color = D3DCOLOR_ARGB(col_.a, col_.r, col_.g, col_.b); if (texture) { - float *uv_ = (float *)((char*)uv + j * uv_stride); + float *uv_ = (float *)((char *)uv + j * uv_stride); verts->u = uv_[0]; verts->v = uv_[1]; } else { @@ -917,14 +888,13 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t return 0; } -static int -UpdateDirtyTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) +static int UpdateDirtyTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) { if (texture->dirty && texture->staging) { HRESULT result; if (!texture->texture) { result = IDirect3DDevice9_CreateTexture(device, texture->w, texture->h, 1, texture->usage, - PixelFormatToD3DFMT(texture->format), D3DPOOL_DEFAULT, &texture->texture, NULL); + PixelFormatToD3DFMT(texture->format), D3DPOOL_DEFAULT, &texture->texture, NULL); if (FAILED(result)) { return D3D_SetError("CreateTexture(D3DPOOL_DEFAULT)", result); } @@ -939,8 +909,7 @@ UpdateDirtyTexture(IDirect3DDevice9 *device, D3D_TextureRep *texture) return 0; } -static int -BindTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD sampler) +static int BindTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD sampler) { HRESULT result; UpdateDirtyTexture(device, texture); @@ -951,8 +920,7 @@ BindTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD sampler) return 0; } -static void -UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsigned index) +static void UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsigned index) { if (texturedata->scaleMode != data->scaleMode[index]) { IDirect3DDevice9_SetSamplerState(data->device, index, D3DSAMP_MINFILTER, @@ -967,14 +935,13 @@ UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsig } } -static int -SetupTextureState(D3D_RenderData *data, SDL_Texture * texture, LPDIRECT3DPIXELSHADER9 *shader) +static int SetupTextureState(D3D_RenderData *data, SDL_Texture *texture, LPDIRECT3DPIXELSHADER9 *shader) { D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; SDL_assert(*shader == NULL); - if (!texturedata) { + if (texturedata == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1013,16 +980,15 @@ SetupTextureState(D3D_RenderData *data, SDL_Texture * texture, LPDIRECT3DPIXELSH return 0; } -static int -SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) +static int SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) { SDL_Texture *texture = cmd->data.draw.texture; const SDL_BlendMode blend = cmd->data.draw.blend; if (texture != data->drawstate.texture) { #if SDL_HAVE_YUV - D3D_TextureData *oldtexturedata = data->drawstate.texture ? (D3D_TextureData *) data->drawstate.texture->driverdata : NULL; - D3D_TextureData *newtexturedata = texture ? (D3D_TextureData *) texture->driverdata : NULL; + D3D_TextureData *oldtexturedata = data->drawstate.texture ? (D3D_TextureData *)data->drawstate.texture->driverdata : NULL; + D3D_TextureData *newtexturedata = texture ? (D3D_TextureData *)texture->driverdata : NULL; #endif LPDIRECT3DPIXELSHADER9 shader = NULL; @@ -1031,7 +997,7 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) IDirect3DDevice9_SetTexture(data->device, 0, NULL); } #if SDL_HAVE_YUV - if ((!newtexturedata || !newtexturedata->yuv) && (oldtexturedata && oldtexturedata->yuv)) { + if ((newtexturedata == NULL || !newtexturedata->yuv) && (oldtexturedata && oldtexturedata->yuv)) { IDirect3DDevice9_SetTexture(data->device, 1, NULL); IDirect3DDevice9_SetTexture(data->device, 2, NULL); } @@ -1050,7 +1016,7 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) data->drawstate.texture = texture; } else if (texture) { - D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata; + D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata; UpdateDirtyTexture(data->device, &texturedata->texture); #if SDL_HAVE_YUV if (texturedata->yuv) { @@ -1120,10 +1086,10 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) const SDL_Rect *viewport = &data->drawstate.viewport; const SDL_Rect *rect = &data->drawstate.cliprect; RECT d3drect; - d3drect.left = viewport->x + rect->x; - d3drect.top = viewport->y + rect->y; - d3drect.right = viewport->x + rect->x + rect->w; - d3drect.bottom = viewport->y + rect->y + rect->h; + d3drect.left = (LONG)viewport->x + rect->x; + d3drect.top = (LONG)viewport->y + rect->y; + d3drect.right = (LONG)viewport->x + rect->x + rect->w; + d3drect.bottom = (LONG)viewport->y + rect->y + rect->h; IDirect3DDevice9_SetScissorRect(data->device, &d3drect); data->drawstate.cliprect_dirty = SDL_FALSE; } @@ -1131,10 +1097,9 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd) return 0; } -static int -D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int D3D_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; const int vboidx = data->currentVertexBuffer; IDirect3DVertexBuffer9 *vbo = NULL; const SDL_bool istarget = renderer->target != NULL; @@ -1143,7 +1108,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti return -1; } - if (vertices) { + if (vertsize > 0) { /* upload the new VBO data for this set of commands. */ vbo = data->vertexBuffers[vboidx]; if (data->vertexBufferSize[vboidx] < vertsize) { @@ -1153,7 +1118,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti IDirect3DVertexBuffer9_Release(vbo); } - if (FAILED(IDirect3DDevice9_CreateVertexBuffer(data->device, (UINT) vertsize, usage, fvf, D3DPOOL_DEFAULT, &vbo, NULL))) { + if (FAILED(IDirect3DDevice9_CreateVertexBuffer(data->device, (UINT)vertsize, usage, fvf, D3DPOOL_DEFAULT, &vbo, NULL))) { vbo = NULL; } data->vertexBuffers[vboidx] = vbo; @@ -1162,12 +1127,12 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti if (vbo) { void *ptr; - if (FAILED(IDirect3DVertexBuffer9_Lock(vbo, 0, (UINT) vertsize, &ptr, D3DLOCK_DISCARD))) { - vbo = NULL; /* oh well, we'll do immediate mode drawing. :( */ + if (FAILED(IDirect3DVertexBuffer9_Lock(vbo, 0, (UINT)vertsize, &ptr, D3DLOCK_DISCARD))) { + vbo = NULL; /* oh well, we'll do immediate mode drawing. :( */ } else { SDL_memcpy(ptr, vertices, vertsize); if (FAILED(IDirect3DVertexBuffer9_Unlock(vbo))) { - vbo = NULL; /* oh well, we'll do immediate mode drawing. :( */ + vbo = NULL; /* oh well, we'll do immediate mode drawing. :( */ } } } @@ -1187,130 +1152,138 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti } } - IDirect3DDevice9_SetStreamSource(data->device, 0, vbo, 0, sizeof (Vertex)); + IDirect3DDevice9_SetStreamSource(data->device, 0, vbo, 0, sizeof(Vertex)); while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - /* currently this is sent with each vertex, but if we move to - shaders, we can put this in a uniform here and reduce vertex - buffer bandwidth */ - break; - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + /* currently this is sent with each vertex, but if we move to + shaders, we can put this in a uniform here and reduce vertex + buffer bandwidth */ + break; + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &data->drawstate.viewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - data->drawstate.viewport_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &data->drawstate.viewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + data->drawstate.viewport_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { - data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; - data->drawstate.cliprect_enabled_dirty = SDL_TRUE; - } + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { + data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; + data->drawstate.cliprect_enabled_dirty = SDL_TRUE; + } - if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&data->drawstate.cliprect, rect); - data->drawstate.cliprect_dirty = SDL_TRUE; - } - break; + if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&data->drawstate.cliprect, rect); + data->drawstate.cliprect_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_CLEAR: { - const DWORD color = D3DCOLOR_ARGB(cmd->data.color.a, cmd->data.color.r, cmd->data.color.g, cmd->data.color.b); - const SDL_Rect *viewport = &data->drawstate.viewport; - const int backw = istarget ? renderer->target->w : data->pparams.BackBufferWidth; - const int backh = istarget ? renderer->target->h : data->pparams.BackBufferHeight; - const SDL_bool viewport_equal = ((viewport->x == 0) && (viewport->y == 0) && (viewport->w == backw) && (viewport->h == backh)) ? SDL_TRUE : SDL_FALSE; + case SDL_RENDERCMD_CLEAR: + { + const DWORD color = D3DCOLOR_ARGB(cmd->data.color.a, cmd->data.color.r, cmd->data.color.g, cmd->data.color.b); + const SDL_Rect *viewport = &data->drawstate.viewport; + const int backw = istarget ? renderer->target->w : data->pparams.BackBufferWidth; + const int backh = istarget ? renderer->target->h : data->pparams.BackBufferHeight; + const SDL_bool viewport_equal = ((viewport->x == 0) && (viewport->y == 0) && (viewport->w == backw) && (viewport->h == backh)) ? SDL_TRUE : SDL_FALSE; + + if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { + IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE); + data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; + } - if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { - IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE); - data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; - } + /* Don't reset the viewport if we don't have to! */ + if (!data->drawstate.viewport_dirty && viewport_equal) { + IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0); + } else { + /* Clear is defined to clear the entire render target */ + D3DVIEWPORT9 wholeviewport = { 0, 0, 0, 0, 0.0f, 1.0f }; + wholeviewport.Width = backw; + wholeviewport.Height = backh; + IDirect3DDevice9_SetViewport(data->device, &wholeviewport); + data->drawstate.viewport_dirty = SDL_TRUE; /* we still need to (re)set orthographic projection, so always mark it dirty. */ + IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0); + } - /* Don't reset the viewport if we don't have to! */ - if (!data->drawstate.viewport_dirty && viewport_equal) { - IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0); - } else { - /* Clear is defined to clear the entire render target */ - D3DVIEWPORT9 wholeviewport = { 0, 0, 0, 0, 0.0f, 1.0f }; - wholeviewport.Width = backw; - wholeviewport.Height = backh; - IDirect3DDevice9_SetViewport(data->device, &wholeviewport); - data->drawstate.viewport_dirty = SDL_TRUE; /* we still need to (re)set orthographic projection, so always mark it dirty. */ - IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0); - } + break; + } - break; + case SDL_RENDERCMD_DRAW_POINTS: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + SetDrawState(data, cmd); + if (vbo) { + IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_POINTLIST, (UINT)(first / sizeof(Vertex)), (UINT)count); + } else { + const Vertex *verts = (Vertex *)(((Uint8 *)vertices) + first); + IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, (UINT)count, verts, sizeof(Vertex)); } + break; + } - case SDL_RENDERCMD_DRAW_POINTS: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - SetDrawState(data, cmd); - if (vbo) { - IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_POINTLIST, (UINT) (first / sizeof (Vertex)), (UINT) count); - } else { - const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first); - IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, (UINT) count, verts, sizeof (Vertex)); - } - break; - } + case SDL_RENDERCMD_DRAW_LINES: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const Vertex *verts = (Vertex *)(((Uint8 *)vertices) + first); + + /* DirectX 9 has the same line rasterization semantics as GDI, + so we need to close the endpoint of the line with a second draw call. + NOLINTNEXTLINE(clang-analyzer-core.NullDereference): FIXME: Can verts truly not be NULL ? */ + const SDL_bool close_endpoint = ((count == 2) || (verts[0].x != verts[count - 1].x) || (verts[0].y != verts[count - 1].y)); - case SDL_RENDERCMD_DRAW_LINES: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first); - - /* DirectX 9 has the same line rasterization semantics as GDI, - so we need to close the endpoint of the line with a second draw call. */ - const SDL_bool close_endpoint = ((count == 2) || (verts[0].x != verts[count-1].x) || (verts[0].y != verts[count-1].y)); - - SetDrawState(data, cmd); - - if (vbo) { - IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_LINESTRIP, (UINT) (first / sizeof (Vertex)), (UINT) (count - 1)); - if (close_endpoint) { - IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_POINTLIST, (UINT) ((first / sizeof (Vertex)) + (count - 1)), 1); - } - } else { - IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_LINESTRIP, (UINT) (count - 1), verts, sizeof (Vertex)); - if (close_endpoint) { - IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, 1, &verts[count-1], sizeof (Vertex)); - } + SetDrawState(data, cmd); + + if (vbo) { + IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_LINESTRIP, (UINT)(first / sizeof(Vertex)), (UINT)(count - 1)); + if (close_endpoint) { + IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_POINTLIST, (UINT)((first / sizeof(Vertex)) + (count - 1)), 1); + } + } else { + IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_LINESTRIP, (UINT)(count - 1), verts, sizeof(Vertex)); + if (close_endpoint) { + IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, 1, &verts[count - 1], sizeof(Vertex)); } - break; } + break; + } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - case SDL_RENDERCMD_COPY: /* unused */ - break; + case SDL_RENDERCMD_COPY: /* unused */ + break; - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - case SDL_RENDERCMD_GEOMETRY: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - SetDrawState(data, cmd); - if (vbo) { - IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLELIST, (UINT) (first / sizeof (Vertex)), (UINT) count / 3); - } else { - const Vertex* verts = (Vertex*)(((Uint8*)vertices) + first); - IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLELIST, (UINT) count / 3, verts, sizeof(Vertex)); - } - break; + case SDL_RENDERCMD_GEOMETRY: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + SetDrawState(data, cmd); + if (vbo) { + IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLELIST, (UINT)(first / sizeof(Vertex)), (UINT)count / 3); + } else { + const Vertex *verts = (Vertex *)(((Uint8 *)vertices) + first); + IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLELIST, (UINT)count / 3, verts, sizeof(Vertex)); } + break; + } - case SDL_RENDERCMD_NO_OP: - break; + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -1319,12 +1292,10 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti return 0; } - -static int -D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +static int D3D_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; D3DSURFACE_DESC desc; LPDIRECT3DSURFACE9 backBuffer; LPDIRECT3DSURFACE9 surface; @@ -1356,9 +1327,9 @@ D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, } d3drect.left = rect->x; - d3drect.right = rect->x + rect->w; + d3drect.right = (LONG)rect->x + rect->w; d3drect.top = rect->y; - d3drect.bottom = rect->y + rect->h; + d3drect.bottom = (LONG)rect->y + rect->h; result = IDirect3DSurface9_LockRect(surface, &locked, &d3drect, D3DLOCK_READONLY); if (FAILED(result)) { @@ -1367,8 +1338,8 @@ D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, } status = SDL_ConvertPixels(rect->w, rect->h, - D3DFMTToPixelFormat(desc.Format), locked.pBits, locked.Pitch, - format, pixels, pitch); + D3DFMTToPixelFormat(desc.Format), locked.pBits, locked.Pitch, + format, pixels, pitch); IDirect3DSurface9_UnlockRect(surface); @@ -1377,10 +1348,9 @@ D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return status; } -static int -D3D_RenderPresent(SDL_Renderer * renderer) +static int D3D_RenderPresent(SDL_Renderer *renderer) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; HRESULT result; if (!data->beginScene) { @@ -1403,11 +1373,10 @@ D3D_RenderPresent(SDL_Renderer * renderer) return 0; } -static void -D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void D3D_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata; - D3D_TextureData *data = (D3D_TextureData *) texture->driverdata; + D3D_RenderData *renderdata = (D3D_RenderData *)renderer->driverdata; + D3D_TextureData *data = (D3D_TextureData *)texture->driverdata; if (renderdata->drawstate.texture == texture) { renderdata->drawstate.texture = NULL; @@ -1422,7 +1391,7 @@ D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) #endif } - if (!data) { + if (data == NULL) { return; } @@ -1436,10 +1405,9 @@ D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture->driverdata = NULL; } -static void -D3D_DestroyRenderer(SDL_Renderer * renderer) +static void D3D_DestroyRenderer(SDL_Renderer *renderer) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; if (data) { int i; @@ -1481,10 +1449,9 @@ D3D_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int -D3D_Reset(SDL_Renderer * renderer) +static int D3D_Reset(SDL_Renderer *renderer) { - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; const Float4X4 d3dmatrix = MatrixIdentity(); HRESULT result; SDL_Texture *texture; @@ -1550,7 +1517,7 @@ D3D_Reset(SDL_Renderer * renderer) data->drawstate.texture = NULL; data->drawstate.shader = NULL; data->drawstate.blend = SDL_BLENDMODE_INVALID; - IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)&d3dmatrix); + IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX *)&d3dmatrix); /* Let the application know that render targets were reset */ { @@ -1562,8 +1529,7 @@ D3D_Reset(SDL_Renderer * renderer) return 0; } -static int -D3D_SetVSync(SDL_Renderer * renderer, const int vsync) +static int D3D_SetVSync(SDL_Renderer *renderer, const int vsync) { D3D_RenderData *data = renderer->driverdata; if (vsync) { @@ -1580,8 +1546,7 @@ D3D_SetVSync(SDL_Renderer * renderer, const int vsync) return 0; } -SDL_Renderer * -D3D_CreateRenderer(SDL_Window * window, Uint32 flags) +SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; D3D_RenderData *data; @@ -1597,13 +1562,13 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) int displayIndex; renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (D3D_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (D3D_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); return NULL; @@ -1629,9 +1594,9 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = D3D_SetTextureScaleMode; renderer->SetRenderTarget = D3D_SetRenderTarget; renderer->QueueSetViewport = D3D_QueueSetViewport; - renderer->QueueSetDrawColor = D3D_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = D3D_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = D3D_QueueDrawPoints; - renderer->QueueDrawLines = D3D_QueueDrawPoints; /* lines and points queue vertices the same way. */ + renderer->QueueDrawLines = D3D_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D_QueueGeometry; renderer->RunCommandQueue = D3D_RunCommandQueue; renderer->RenderReadPixels = D3D_RenderReadPixels; @@ -1759,25 +1724,23 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_RenderDriver D3D_RenderDriver = { D3D_CreateRenderer, - { - "direct3d", - (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), - 1, - {SDL_PIXELFORMAT_ARGB8888}, - 0, - 0} + { "direct3d", + (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), + 1, + { SDL_PIXELFORMAT_ARGB8888 }, + 0, + 0 } }; #endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */ #if defined(__WIN32__) || defined(__WINGDK__) /* This function needs to always exist on Windows, for the Dynamic API. */ -IDirect3DDevice9 * -SDL_RenderGetD3D9Device(SDL_Renderer * renderer) +IDirect3DDevice9 *SDL_RenderGetD3D9Device(SDL_Renderer *renderer) { IDirect3DDevice9 *device = NULL; #if SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED - D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata; /* Make sure that this is a D3D renderer */ if (renderer->DestroyRenderer != D3D_DestroyRenderer) { diff --git a/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.c b/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.c index ca3b99d..e8fd6ae 100644 --- a/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.c +++ b/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.c @@ -257,7 +257,6 @@ static const DWORD D3D9_PixelShader_YUV_BT709[] = { 0x90e40000, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff }; - static const DWORD *D3D9_shaders[] = { D3D9_PixelShader_YUV_JPEG, D3D9_PixelShader_YUV_BT601, diff --git a/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.h b/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.h index d8345fc..03b5634 100644 --- a/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.h +++ b/modules/SDL2/src/render/direct3d/SDL_shaders_d3d.h @@ -22,7 +22,8 @@ /* D3D9 shader implementation */ -typedef enum { +typedef enum +{ SHADER_YUV_JPEG, SHADER_YUV_BT601, SHADER_YUV_BT709, diff --git a/modules/SDL2/src/render/direct3d11/SDL_render_d3d11.c b/modules/SDL2/src/render/direct3d11/SDL_render_d3d11.c index ff4a57e..2d8ee3c 100644 --- a/modules/SDL2/src/render/direct3d11/SDL_render_d3d11.c +++ b/modules/SDL2/src/render/direct3d11/SDL_render_d3d11.c @@ -51,11 +51,10 @@ #if WINAPI_FAMILY == WINAPI_FAMILY_APP #include /* TODO, WinRT, XAML: get the ISwapChainBackgroundPanelNative from something other than a global var */ -extern ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNative; -#endif /* WINAPI_FAMILY == WINAPI_FAMILY_APP */ - -#endif /* __WINRT__ */ +extern ISwapChainBackgroundPanelNative *WINRT_GlobalSwapChainBackgroundPanelNative; +#endif /* WINAPI_FAMILY == WINAPI_FAMILY_APP */ +#endif /* __WINRT__ */ #if defined(_MSC_VER) && !defined(__clang__) #define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str @@ -63,8 +62,11 @@ extern ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNat #define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str #endif -#define SAFE_RELEASE(X) if ((X)) { IUnknown_Release(SDL_static_cast(IUnknown*, X)); X = NULL; } - +#define SAFE_RELEASE(X) \ + if ((X)) { \ + IUnknown_Release(SDL_static_cast(IUnknown *, X)); \ + X = NULL; \ + } /* !!! FIXME: vertex buffer bandwidth could be lower; only use UV coords when !!! FIXME: textures are needed. */ @@ -170,15 +172,14 @@ typedef struct int currentVertexBuffer; } D3D11_RenderData; - /* Define D3D GUIDs here so we don't have to include uuid.lib. -* -* Fix for SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3437: -* The extra 'SDL_' was added to the start of each IID's name, in order -* to prevent build errors on both MinGW-w64 and WinRT/UWP. -* (SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3336 led to -* linker errors in WinRT/UWP builds.) -*/ + * + * Fix for SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3437: + * The extra 'SDL_' was added to the start of each IID's name, in order + * to prevent build errors on both MinGW-w64 and WinRT/UWP. + * (SDL bug https://bugzilla.libsdl.org/show_bug.cgi?id=3336 led to + * linker errors in WinRT/UWP builds.) + */ #ifdef __GNUC__ #pragma GCC diagnostic push @@ -199,45 +200,40 @@ static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { #pragma GCC diagnostic pop #endif - - -Uint32 -D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) +Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) { switch (dxgiFormat) { - case DXGI_FORMAT_B8G8R8A8_UNORM: - return SDL_PIXELFORMAT_ARGB8888; - case DXGI_FORMAT_B8G8R8X8_UNORM: - return SDL_PIXELFORMAT_RGB888; - default: - return SDL_PIXELFORMAT_UNKNOWN; + case DXGI_FORMAT_B8G8R8A8_UNORM: + return SDL_PIXELFORMAT_ARGB8888; + case DXGI_FORMAT_B8G8R8X8_UNORM: + return SDL_PIXELFORMAT_RGB888; + default: + return SDL_PIXELFORMAT_UNKNOWN; } } -static DXGI_FORMAT -SDLPixelFormatToDXGIFormat(Uint32 sdlFormat) +static DXGI_FORMAT SDLPixelFormatToDXGIFormat(Uint32 sdlFormat) { switch (sdlFormat) { - case SDL_PIXELFORMAT_ARGB8888: - return DXGI_FORMAT_B8G8R8A8_UNORM; - case SDL_PIXELFORMAT_RGB888: - return DXGI_FORMAT_B8G8R8X8_UNORM; - case SDL_PIXELFORMAT_YV12: - case SDL_PIXELFORMAT_IYUV: - case SDL_PIXELFORMAT_NV12: /* For the Y texture */ - case SDL_PIXELFORMAT_NV21: /* For the Y texture */ - return DXGI_FORMAT_R8_UNORM; - default: - return DXGI_FORMAT_UNKNOWN; + case SDL_PIXELFORMAT_ARGB8888: + return DXGI_FORMAT_B8G8R8A8_UNORM; + case SDL_PIXELFORMAT_RGB888: + return DXGI_FORMAT_B8G8R8X8_UNORM; + case SDL_PIXELFORMAT_YV12: + case SDL_PIXELFORMAT_IYUV: + case SDL_PIXELFORMAT_NV12: /* For the Y texture */ + case SDL_PIXELFORMAT_NV21: /* For the Y texture */ + return DXGI_FORMAT_R8_UNORM; + default: + return DXGI_FORMAT_UNKNOWN; } } -static void D3D11_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); +static void D3D11_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture); -static void -D3D11_ReleaseAll(SDL_Renderer * renderer) +static void D3D11_ReleaseAll(SDL_Renderer *renderer) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; SDL_Texture *texture = NULL; /* Release all textures */ @@ -278,7 +274,7 @@ D3D11_ReleaseAll(SDL_Renderer * renderer) SAFE_RELEASE(data->clippedRasterizer); SAFE_RELEASE(data->vertexShaderConstants); - data->swapEffect = (DXGI_SWAP_EFFECT) 0; + data->swapEffect = (DXGI_SWAP_EFFECT)0; data->rotation = DXGI_MODE_ROTATION_UNSPECIFIED; data->currentRenderTargetView = NULL; data->currentRasterizerState = NULL; @@ -301,10 +297,9 @@ D3D11_ReleaseAll(SDL_Renderer * renderer) } } -static void -D3D11_DestroyRenderer(SDL_Renderer * renderer) +static void D3D11_DestroyRenderer(SDL_Renderer *renderer) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; D3D11_ReleaseAll(renderer); if (data) { SDL_free(data); @@ -358,10 +353,9 @@ static D3D11_BLEND_OP GetBlendEquation(SDL_BlendOperation operation) } } -static ID3D11BlendState * -D3D11_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static ID3D11BlendState *D3D11_CreateBlendState(SDL_Renderer *renderer, SDL_BlendMode blendMode) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode); @@ -391,7 +385,7 @@ D3D11_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode) } blendModes = (D3D11_BlendMode *)SDL_realloc(data->blendModes, (data->blendModesCount + 1) * sizeof(*blendModes)); - if (!blendModes) { + if (blendModes == NULL) { SAFE_RELEASE(blendState); SDL_OutOfMemory(); return NULL; @@ -405,12 +399,11 @@ D3D11_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode) } /* Create resources that depend on the device. */ -static HRESULT -D3D11_CreateDeviceResources(SDL_Renderer * renderer) +static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer) { - typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); + typedef HRESULT(WINAPI * PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); PFN_CREATE_DXGI_FACTORY CreateDXGIFactoryFunc; - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; PFN_D3D11_CREATE_DEVICE D3D11CreateDeviceFunc; ID3D11Device *d3dDevice = NULL; ID3D11DeviceContext *d3dContext = NULL; @@ -424,8 +417,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) * Don't forget to declare your application's minimum required feature level in its * description. All applications are assumed to support 9.1 unless otherwise stated. */ - D3D_FEATURE_LEVEL featureLevels[] = - { + D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, @@ -450,7 +442,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) } CreateDXGIFactoryFunc = (PFN_CREATE_DXGI_FACTORY)SDL_LoadFunction(data->hDXGIMod, "CreateDXGIFactory"); - if (!CreateDXGIFactoryFunc) { + if (CreateDXGIFactoryFunc == NULL) { result = E_FAIL; goto done; } @@ -504,11 +496,11 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) creationFlags, /* Set set debug and Direct2D compatibility flags. */ featureLevels, /* List of feature levels this app can support. */ SDL_arraysize(featureLevels), - D3D11_SDK_VERSION, /* Always set this to D3D11_SDK_VERSION for Windows Store apps. */ - &d3dDevice, /* Returns the Direct3D device created. */ + D3D11_SDK_VERSION, /* Always set this to D3D11_SDK_VERSION for Windows Store apps. */ + &d3dDevice, /* Returns the Direct3D device created. */ &data->featureLevel, /* Returns feature level of device created. */ - &d3dContext /* Returns the device immediate context. */ - ); + &d3dContext /* Returns the device immediate context. */ + ); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("D3D11CreateDevice"), result); goto done; @@ -546,29 +538,29 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) * http://msdn.microsoft.com/en-us/library/windows/apps/ff476876.aspx */ switch (data->featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - renderer->info.max_texture_width = renderer->info.max_texture_height = 16384; - break; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + renderer->info.max_texture_width = renderer->info.max_texture_height = 16384; + break; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - renderer->info.max_texture_width = renderer->info.max_texture_height = 8192; - break; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + renderer->info.max_texture_width = renderer->info.max_texture_height = 8192; + break; - case D3D_FEATURE_LEVEL_9_3: - renderer->info.max_texture_width = renderer->info.max_texture_height = 4096; - break; + case D3D_FEATURE_LEVEL_9_3: + renderer->info.max_texture_width = renderer->info.max_texture_height = 4096; + break; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - renderer->info.max_texture_width = renderer->info.max_texture_height = 2048; - break; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + renderer->info.max_texture_width = renderer->info.max_texture_height = 2048; + break; - default: - SDL_SetError("%s, Unexpected feature level: %d", __FUNCTION__, data->featureLevel); - result = E_FAIL; - goto done; + default: + SDL_SetError("%s, Unexpected feature level: %d", __FUNCTION__, data->featureLevel); + result = E_FAIL; + goto done; } if (D3D11_CreateVertexShader(data->d3dDevice, &data->vertexShader, &data->inputLayout) < 0) { @@ -587,10 +579,9 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) constantBufferDesc.Usage = D3D11_USAGE_DEFAULT; constantBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; result = ID3D11Device_CreateBuffer(data->d3dDevice, - &constantBufferDesc, - NULL, - &data->vertexShaderConstants - ); + &constantBufferDesc, + NULL, + &data->vertexShaderConstants); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateBuffer [vertex shader constants]"), result); goto done; @@ -608,9 +599,8 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) samplerDesc.MinLOD = 0.0f; samplerDesc.MaxLOD = D3D11_FLOAT32_MAX; result = ID3D11Device_CreateSamplerState(data->d3dDevice, - &samplerDesc, - &data->nearestPixelSampler - ); + &samplerDesc, + &data->nearestPixelSampler); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateSamplerState [nearest-pixel filter]"), result); goto done; @@ -618,9 +608,8 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; result = ID3D11Device_CreateSamplerState(data->d3dDevice, - &samplerDesc, - &data->linearSampler - ); + &samplerDesc, + &data->linearSampler); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateSamplerState [linear filter]"), result); goto done; @@ -674,8 +663,7 @@ done: #if defined(__WIN32__) || defined(__WINGDK__) -static DXGI_MODE_ROTATION -D3D11_GetCurrentRotation() +static DXGI_MODE_ROTATION D3D11_GetCurrentRotation() { /* FIXME */ return DXGI_MODE_ROTATION_IDENTITY; @@ -683,20 +671,18 @@ D3D11_GetCurrentRotation() #endif /* defined(__WIN32__) || defined(__WINGDK__) */ -static BOOL -D3D11_IsDisplayRotated90Degrees(DXGI_MODE_ROTATION rotation) +static BOOL D3D11_IsDisplayRotated90Degrees(DXGI_MODE_ROTATION rotation) { switch (rotation) { - case DXGI_MODE_ROTATION_ROTATE90: - case DXGI_MODE_ROTATION_ROTATE270: - return TRUE; - default: - return FALSE; + case DXGI_MODE_ROTATION_ROTATE90: + case DXGI_MODE_ROTATION_ROTATE270: + return TRUE; + default: + return FALSE; } } -static int -D3D11_GetRotationForCurrentRenderTarget(SDL_Renderer * renderer) +static int D3D11_GetRotationForCurrentRenderTarget(SDL_Renderer *renderer) { D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; if (data->currentOffscreenRenderTargetView) { @@ -706,52 +692,50 @@ D3D11_GetRotationForCurrentRenderTarget(SDL_Renderer * renderer) } } -static int -D3D11_GetViewportAlignedD3DRect(SDL_Renderer * renderer, const SDL_Rect * sdlRect, D3D11_RECT * outRect, BOOL includeViewportOffset) +static int D3D11_GetViewportAlignedD3DRect(SDL_Renderer *renderer, const SDL_Rect *sdlRect, D3D11_RECT *outRect, BOOL includeViewportOffset) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; const int rotation = D3D11_GetRotationForCurrentRenderTarget(renderer); const SDL_Rect *viewport = &data->currentViewport; switch (rotation) { - case DXGI_MODE_ROTATION_IDENTITY: - outRect->left = sdlRect->x; - outRect->right = sdlRect->x + sdlRect->w; - outRect->top = sdlRect->y; - outRect->bottom = sdlRect->y + sdlRect->h; - if (includeViewportOffset) { - outRect->left += viewport->x; - outRect->right += viewport->x; - outRect->top += viewport->y; - outRect->bottom += viewport->y; - } - break; - case DXGI_MODE_ROTATION_ROTATE270: - outRect->left = sdlRect->y; - outRect->right = sdlRect->y + sdlRect->h; - outRect->top = viewport->w - sdlRect->x - sdlRect->w; - outRect->bottom = viewport->w - sdlRect->x; - break; - case DXGI_MODE_ROTATION_ROTATE180: - outRect->left = viewport->w - sdlRect->x - sdlRect->w; - outRect->right = viewport->w - sdlRect->x; - outRect->top = viewport->h - sdlRect->y - sdlRect->h; - outRect->bottom = viewport->h - sdlRect->y; - break; - case DXGI_MODE_ROTATION_ROTATE90: - outRect->left = viewport->h - sdlRect->y - sdlRect->h; - outRect->right = viewport->h - sdlRect->y; - outRect->top = sdlRect->x; - outRect->bottom = sdlRect->x + sdlRect->h; - break; - default: - return SDL_SetError("The physical display is in an unknown or unsupported rotation"); + case DXGI_MODE_ROTATION_IDENTITY: + outRect->left = sdlRect->x; + outRect->right = (LONG)sdlRect->x + sdlRect->w; + outRect->top = sdlRect->y; + outRect->bottom = (LONG)sdlRect->y + sdlRect->h; + if (includeViewportOffset) { + outRect->left += viewport->x; + outRect->right += viewport->x; + outRect->top += viewport->y; + outRect->bottom += viewport->y; + } + break; + case DXGI_MODE_ROTATION_ROTATE270: + outRect->left = sdlRect->y; + outRect->right = (LONG)sdlRect->y + sdlRect->h; + outRect->top = viewport->w - sdlRect->x - sdlRect->w; + outRect->bottom = viewport->w - sdlRect->x; + break; + case DXGI_MODE_ROTATION_ROTATE180: + outRect->left = viewport->w - sdlRect->x - sdlRect->w; + outRect->right = viewport->w - sdlRect->x; + outRect->top = viewport->h - sdlRect->y - sdlRect->h; + outRect->bottom = viewport->h - sdlRect->y; + break; + case DXGI_MODE_ROTATION_ROTATE90: + outRect->left = viewport->h - sdlRect->y - sdlRect->h; + outRect->right = viewport->h - sdlRect->y; + outRect->top = sdlRect->x; + outRect->bottom = (LONG)sdlRect->x + sdlRect->h; + break; + default: + return SDL_SetError("The physical display is in an unknown or unsupported rotation"); } return 0; } -static HRESULT -D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) +static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h) { D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; #ifdef __WINRT__ @@ -775,7 +759,7 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; swapChainDesc.BufferCount = 2; /* Use double-buffering to minimize latency. */ #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - swapChainDesc.Scaling = DXGI_SCALING_STRETCH; /* On phone, only stretch and aspect-ratio stretch scaling are allowed. */ + swapChainDesc.Scaling = DXGI_SCALING_STRETCH; /* On phone, only stretch and aspect-ratio stretch scaling are allowed. */ swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; /* On phone, no swap effects are supported. */ /* TODO, WinRT: see if Win 8.x DXGI_SWAP_CHAIN_DESC1 settings are available on Windows Phone 8.1, and if there's any advantage to having them on */ #else @@ -794,29 +778,28 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) if (coreWindow) { result = IDXGIFactory2_CreateSwapChainForCoreWindow(data->dxgiFactory, - (IUnknown *)data->d3dDevice, - coreWindow, - &swapChainDesc, - NULL, /* Allow on all displays. */ - &data->swapChain - ); + (IUnknown *)data->d3dDevice, + coreWindow, + &swapChainDesc, + NULL, /* Allow on all displays. */ + &data->swapChain); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForCoreWindow"), result); goto done; } } else if (usingXAML) { result = IDXGIFactory2_CreateSwapChainForComposition(data->dxgiFactory, - (IUnknown *)data->d3dDevice, - &swapChainDesc, - NULL, - &data->swapChain); + (IUnknown *)data->d3dDevice, + &swapChainDesc, + NULL, + &data->swapChain); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForComposition"), result); goto done; } #if WINAPI_FAMILY == WINAPI_FAMILY_APP - result = ISwapChainBackgroundPanelNative_SetSwapChain(WINRT_GlobalSwapChainBackgroundPanelNative, (IDXGISwapChain *) data->swapChain); + result = ISwapChainBackgroundPanelNative_SetSwapChain(WINRT_GlobalSwapChainBackgroundPanelNative, (IDXGISwapChain *)data->swapChain); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ISwapChainBackgroundPanelNative::SetSwapChain"), result); goto done; @@ -833,13 +816,12 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) SDL_GetWindowWMInfo(renderer->window, &windowinfo); result = IDXGIFactory2_CreateSwapChainForHwnd(data->dxgiFactory, - (IUnknown *)data->d3dDevice, - windowinfo.info.win.window, - &swapChainDesc, - NULL, - NULL, /* Allow on all displays. */ - &data->swapChain - ); + (IUnknown *)data->d3dDevice, + windowinfo.info.win.window, + &swapChainDesc, + NULL, + NULL, /* Allow on all displays. */ + &data->swapChain); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForHwnd"), result); goto done; @@ -847,9 +829,9 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) IDXGIFactory_MakeWindowAssociation(data->dxgiFactory, windowinfo.info.win.window, DXGI_MWA_NO_WINDOW_CHANGES); #else - SDL_SetError(__FUNCTION__", Unable to find something to attach a swap chain to"); + SDL_SetError(__FUNCTION__ ", Unable to find something to attach a swap chain to"); goto done; -#endif /* defined(__WIN32__) || defined(__WINGDK__) / else */ +#endif /* defined(__WIN32__) || defined(__WINGDK__) / else */ } data->swapEffect = swapChainDesc.SwapEffect; @@ -858,19 +840,17 @@ done: return result; } -static void -D3D11_ReleaseMainRenderTargetView(SDL_Renderer * renderer) +static void D3D11_ReleaseMainRenderTargetView(SDL_Renderer *renderer) { D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; ID3D11DeviceContext_OMSetRenderTargets(data->d3dContext, 0, NULL, NULL); SAFE_RELEASE(data->mainRenderTargetView); } -static HRESULT D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer); - +static HRESULT D3D11_UpdateForWindowSizeChange(SDL_Renderer *renderer); HRESULT -D3D11_HandleDeviceLost(SDL_Renderer * renderer) +D3D11_HandleDeviceLost(SDL_Renderer *renderer) { HRESULT result = S_OK; @@ -899,8 +879,7 @@ D3D11_HandleDeviceLost(SDL_Renderer * renderer) } /* Initialize all resources that change when the window's size changes. */ -static HRESULT -D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) +static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer) { D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; ID3D11Texture2D *backBuffer = NULL; @@ -931,16 +910,15 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) #if !defined(__WINRT__) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) /* If the swap chain already exists, resize it. */ result = IDXGISwapChain_ResizeBuffers(data->swapChain, - 0, - w, h, - DXGI_FORMAT_UNKNOWN, - 0 - ); + 0, + w, h, + DXGI_FORMAT_UNKNOWN, + 0); if (result == DXGI_ERROR_DEVICE_REMOVED) { /* If the device was removed for any reason, a new device and swap chain will need to be created. */ D3D11_HandleDeviceLost(renderer); - /* Everything is set up now. Do not continue execution of this method. HandleDeviceLost will reenter this method + /* Everything is set up now. Do not continue execution of this method. HandleDeviceLost will reenter this method * and correctly set up the new device. */ goto done; @@ -951,11 +929,11 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) #endif } else { result = D3D11_CreateSwapChain(renderer, w, h); - if (FAILED(result)) { + if (FAILED(result) || data->swapChain == NULL) { goto done; } } - + #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* Set the proper rotation for the swap chain. * @@ -985,10 +963,9 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) #endif result = IDXGISwapChain_GetBuffer(data->swapChain, - 0, - &SDL_IID_ID3D11Texture2D, - (void **)&backBuffer - ); + 0, + &SDL_IID_ID3D11Texture2D, + (void **)&backBuffer); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGISwapChain::GetBuffer [back-buffer]"), result); goto done; @@ -996,10 +973,9 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) /* Create a render target view of the swap chain back buffer. */ result = ID3D11Device_CreateRenderTargetView(data->d3dDevice, - (ID3D11Resource *)backBuffer, - NULL, - &data->mainRenderTargetView - ); + (ID3D11Resource *)backBuffer, + NULL, + &data->mainRenderTargetView); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device::CreateRenderTargetView"), result); goto done; @@ -1010,10 +986,9 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) * null references in places like ReadPixels! */ ID3D11DeviceContext_OMSetRenderTargets(data->d3dContext, - 1, - &data->mainRenderTargetView, - NULL - ); + 1, + &data->mainRenderTargetView, + NULL); data->viewportDirty = SDL_TRUE; @@ -1023,14 +998,12 @@ done: } /* This method is called when the window's size changes. */ -static HRESULT -D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer) +static HRESULT D3D11_UpdateForWindowSizeChange(SDL_Renderer *renderer) { return D3D11_CreateWindowSizeDependentResources(renderer); } -void -D3D11_Trim(SDL_Renderer * renderer) +void D3D11_Trim(SDL_Renderer *renderer) { #ifdef __WINRT__ #if NTDDI_VERSION > NTDDI_WIN8 @@ -1040,7 +1013,7 @@ D3D11_Trim(SDL_Renderer * renderer) result = ID3D11Device_QueryInterface(data->d3dDevice, &SDL_IID_IDXGIDevice3, &dxgiDevice); if (FAILED(result)) { - //WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to IDXGIDevice3", result); + // WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to IDXGIDevice3", result); return; } @@ -1050,8 +1023,7 @@ D3D11_Trim(SDL_Renderer * renderer) #endif } -static void -D3D11_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void D3D11_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { D3D11_UpdateForWindowSizeChange(renderer); @@ -1059,16 +1031,14 @@ D3D11_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } #if !defined(__WINRT__) -static int -D3D11_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int D3D11_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GetWindowSizeInPixels(renderer->window, w, h); return 0; } #endif -static SDL_bool -D3D11_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool D3D11_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); @@ -1086,10 +1056,9 @@ D3D11_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) return SDL_TRUE; } -static int -D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D11_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; D3D11_TextureData *textureData; HRESULT result; DXGI_FORMAT textureFormat = SDLPixelFormatToDXGIFormat(texture->format); @@ -1098,15 +1067,15 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) if (textureFormat == DXGI_FORMAT_UNKNOWN) { return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", - __FUNCTION__, texture->format); + __FUNCTION__, texture->format); } - textureData = (D3D11_TextureData*) SDL_calloc(1, sizeof(*textureData)); - if (!textureData) { + textureData = (D3D11_TextureData *)SDL_calloc(1, sizeof(*textureData)); + if (textureData == NULL) { SDL_OutOfMemory(); return -1; } - textureData->scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? D3D11_FILTER_MIN_MAG_MIP_POINT : D3D11_FILTER_MIN_MAG_MIP_LINEAR; + textureData->scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? D3D11_FILTER_MIN_MAG_MIP_POINT : D3D11_FILTER_MIN_MAG_MIP_LINEAR; texture->driverdata = textureData; @@ -1135,10 +1104,9 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &textureDesc, - NULL, - &textureData->mainTexture - ); + &textureDesc, + NULL, + &textureData->mainTexture); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D"), result); @@ -1152,20 +1120,18 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) textureDesc.Height = (textureDesc.Height + 1) / 2; result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &textureDesc, - NULL, - &textureData->mainTextureU - ); + &textureDesc, + NULL, + &textureData->mainTextureU); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D"), result); } result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &textureDesc, - NULL, - &textureData->mainTextureV - ); + &textureDesc, + NULL, + &textureData->mainTextureV); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D"), result); @@ -1183,10 +1149,9 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) nvTextureDesc.Height = (textureDesc.Height + 1) / 2; result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &nvTextureDesc, - NULL, - &textureData->mainTextureNV - ); + &nvTextureDesc, + NULL, + &textureData->mainTextureNV); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D"), result); @@ -1199,10 +1164,9 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) resourceViewDesc.Texture2D.MostDetailedMip = 0; resourceViewDesc.Texture2D.MipLevels = textureDesc.MipLevels; result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, - (ID3D11Resource *)textureData->mainTexture, - &resourceViewDesc, - &textureData->mainTextureResourceView - ); + (ID3D11Resource *)textureData->mainTexture, + &resourceViewDesc, + &textureData->mainTextureResourceView); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateShaderResourceView"), result); @@ -1210,19 +1174,17 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) #if SDL_HAVE_YUV if (textureData->yuv) { result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, - (ID3D11Resource *)textureData->mainTextureU, - &resourceViewDesc, - &textureData->mainTextureResourceViewU - ); + (ID3D11Resource *)textureData->mainTextureU, + &resourceViewDesc, + &textureData->mainTextureResourceViewU); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateShaderResourceView"), result); } result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, - (ID3D11Resource *)textureData->mainTextureV, - &resourceViewDesc, - &textureData->mainTextureResourceViewV - ); + (ID3D11Resource *)textureData->mainTextureV, + &resourceViewDesc, + &textureData->mainTextureResourceViewV); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateShaderResourceView"), result); @@ -1235,10 +1197,9 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) nvResourceViewDesc.Format = DXGI_FORMAT_R8G8_UNORM; result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, - (ID3D11Resource *)textureData->mainTextureNV, - &nvResourceViewDesc, - &textureData->mainTextureResourceViewNV - ); + (ID3D11Resource *)textureData->mainTextureNV, + &nvResourceViewDesc, + &textureData->mainTextureResourceViewNV); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateShaderResourceView"), result); @@ -1254,9 +1215,9 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderTargetViewDesc.Texture2D.MipSlice = 0; result = ID3D11Device_CreateRenderTargetView(rendererData->d3dDevice, - (ID3D11Resource *)textureData->mainTexture, - &renderTargetViewDesc, - &textureData->mainTextureRenderTargetView); + (ID3D11Resource *)textureData->mainTexture, + &renderTargetViewDesc, + &textureData->mainTextureRenderTargetView); if (FAILED(result)) { D3D11_DestroyTexture(renderer, texture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateRenderTargetView"), result); @@ -1266,13 +1227,12 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static void -D3D11_DestroyTexture(SDL_Renderer * renderer, - SDL_Texture * texture) +static void D3D11_DestroyTexture(SDL_Renderer *renderer, + SDL_Texture *texture) { D3D11_TextureData *data = (D3D11_TextureData *)texture->driverdata; - if (!data) { + if (data == NULL) { return; } @@ -1293,8 +1253,7 @@ D3D11_DestroyTexture(SDL_Renderer * renderer, texture->driverdata = NULL; } -static int -D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *texture, int bpp, int x, int y, int w, int h, const void *pixels, int pitch) +static int D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *texture, int bpp, int x, int y, int w, int h, const void *pixels, int pitch) { ID3D11Texture2D *stagingTexture; const Uint8 *src; @@ -1314,21 +1273,20 @@ D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *tex stagingTextureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; stagingTextureDesc.Usage = D3D11_USAGE_STAGING; result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &stagingTextureDesc, - NULL, - &stagingTexture); + &stagingTextureDesc, + NULL, + &stagingTexture); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D [create staging texture]"), result); } /* Get a write-only pointer to data in the staging texture: */ result = ID3D11DeviceContext_Map(rendererData->d3dContext, - (ID3D11Resource *)stagingTexture, - 0, - D3D11_MAP_WRITE, - 0, - &textureMemory - ); + (ID3D11Resource *)stagingTexture, + 0, + D3D11_MAP_WRITE, + 0, + &textureMemory); if (FAILED(result)) { SAFE_RELEASE(stagingTexture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11DeviceContext1::Map [map staging texture]"), result); @@ -1338,7 +1296,7 @@ D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *tex dst = textureMemory.pData; length = w * bpp; if (length == pitch && length == textureMemory.RowPitch) { - SDL_memcpy(dst, src, length*h); + SDL_memcpy(dst, src, (size_t)length * h); } else { if (length > (UINT)pitch) { length = pitch; @@ -1355,34 +1313,33 @@ D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *tex /* Commit the pixel buffer's changes back to the staging texture: */ ID3D11DeviceContext_Unmap(rendererData->d3dContext, - (ID3D11Resource *)stagingTexture, - 0); + (ID3D11Resource *)stagingTexture, + 0); /* Copy the staging texture's contents back to the texture: */ ID3D11DeviceContext_CopySubresourceRegion(rendererData->d3dContext, - (ID3D11Resource *)texture, - 0, - x, - y, - 0, - (ID3D11Resource *)stagingTexture, - 0, - NULL); + (ID3D11Resource *)texture, + 0, + x, + y, + 0, + (ID3D11Resource *)stagingTexture, + 0, + NULL); SAFE_RELEASE(stagingTexture); return 0; } -static int -D3D11_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void * srcPixels, - int srcPitch) +static int D3D11_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *srcPixels, + int srcPitch) { D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1392,14 +1349,14 @@ D3D11_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, #if SDL_HAVE_YUV if (textureData->yuv) { /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + rect->h * srcPitch); + srcPixels = (const void *)((const Uint8 *)srcPixels + rect->h * srcPitch); if (D3D11_UpdateTextureInternal(rendererData, texture->format == SDL_PIXELFORMAT_YV12 ? textureData->mainTextureV : textureData->mainTextureU, SDL_BYTESPERPIXEL(texture->format), rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, srcPixels, (srcPitch + 1) / 2) < 0) { return -1; } /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + ((rect->h + 1) / 2) * ((srcPitch + 1) / 2)); + srcPixels = (const void *)((const Uint8 *)srcPixels + ((rect->h + 1) / 2) * ((srcPitch + 1) / 2)); if (D3D11_UpdateTextureInternal(rendererData, texture->format == SDL_PIXELFORMAT_YV12 ? textureData->mainTextureU : textureData->mainTextureV, SDL_BYTESPERPIXEL(texture->format), rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, srcPixels, (srcPitch + 1) / 2) < 0) { return -1; } @@ -1407,9 +1364,9 @@ D3D11_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, if (textureData->nv12) { /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + rect->h * srcPitch); + srcPixels = (const void *)((const Uint8 *)srcPixels + rect->h * srcPitch); - if (D3D11_UpdateTextureInternal(rendererData, textureData->mainTextureNV, 2, rect->x / 2, rect->y / 2, ((rect->w + 1) / 2), (rect->h + 1) / 2, srcPixels, 2*((srcPitch + 1) / 2)) < 0) { + if (D3D11_UpdateTextureInternal(rendererData, textureData->mainTextureNV, 2, rect->x / 2, rect->y / 2, ((rect->w + 1) / 2), (rect->h + 1) / 2, srcPixels, 2 * ((srcPitch + 1) / 2)) < 0) { return -1; } } @@ -1418,17 +1375,16 @@ D3D11_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, } #if SDL_HAVE_YUV -static int -D3D11_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int D3D11_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1444,16 +1400,15 @@ D3D11_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static int -D3D11_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int D3D11_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1468,17 +1423,16 @@ D3D11_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, } #endif -static int -D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int D3D11_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; - D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; + D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; HRESULT result = S_OK; D3D11_TEXTURE2D_DESC stagingTextureDesc; D3D11_MAPPED_SUBRESOURCE textureMemory; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } #if SDL_HAVE_YUV @@ -1493,8 +1447,8 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, } textureData->locked_rect = *rect; *pixels = - (void *)((Uint8 *)textureData->pixels + rect->y * textureData->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(textureData->pixels + rect->y * textureData->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = textureData->pitch; return 0; } @@ -1502,7 +1456,7 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, if (textureData->stagingTexture) { return SDL_SetError("texture is already locked"); } - + /* Create a 'staging' texture, which will be used to write to a portion * of the main texture. This is necessary, as Direct3D 11.1 does not * have the ability to write a CPU-bound pixel buffer to a rectangular @@ -1519,27 +1473,26 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, stagingTextureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; stagingTextureDesc.Usage = D3D11_USAGE_STAGING; result = ID3D11Device_CreateTexture2D(rendererData->d3dDevice, - &stagingTextureDesc, - NULL, - &textureData->stagingTexture); + &stagingTextureDesc, + NULL, + &textureData->stagingTexture); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D [create staging texture]"), result); } /* Get a write-only pointer to data in the staging texture: */ result = ID3D11DeviceContext_Map(rendererData->d3dContext, - (ID3D11Resource *)textureData->stagingTexture, - 0, - D3D11_MAP_WRITE, - 0, - &textureMemory - ); + (ID3D11Resource *)textureData->stagingTexture, + 0, + D3D11_MAP_WRITE, + 0, + &textureMemory); if (FAILED(result)) { SAFE_RELEASE(textureData->stagingTexture); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11DeviceContext1::Map [map staging texture]"), result); } - /* Make note of where the staging texture will be written to + /* Make note of where the staging texture will be written to * (on a call to SDL_UnlockTexture): */ textureData->lockedTexturePositionX = rect->x; @@ -1553,60 +1506,57 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static void -D3D11_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void D3D11_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; - D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata; - - if (!textureData) { + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; + D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; + + if (textureData == NULL) { return; } #if SDL_HAVE_YUV if (textureData->yuv || textureData->nv12) { const SDL_Rect *rect = &textureData->locked_rect; void *pixels = - (void *) ((Uint8 *) textureData->pixels + rect->y * textureData->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(textureData->pixels + rect->y * textureData->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); D3D11_UpdateTexture(renderer, texture, rect, pixels, textureData->pitch); return; } #endif /* Commit the pixel buffer's changes back to the staging texture: */ ID3D11DeviceContext_Unmap(rendererData->d3dContext, - (ID3D11Resource *)textureData->stagingTexture, - 0); + (ID3D11Resource *)textureData->stagingTexture, + 0); /* Copy the staging texture's contents back to the main texture: */ ID3D11DeviceContext_CopySubresourceRegion(rendererData->d3dContext, - (ID3D11Resource *)textureData->mainTexture, - 0, - textureData->lockedTexturePositionX, - textureData->lockedTexturePositionY, - 0, - (ID3D11Resource *)textureData->stagingTexture, - 0, - NULL); + (ID3D11Resource *)textureData->mainTexture, + 0, + textureData->lockedTexturePositionX, + textureData->lockedTexturePositionY, + 0, + (ID3D11Resource *)textureData->stagingTexture, + 0, + NULL); SAFE_RELEASE(textureData->stagingTexture); } -static void -D3D11_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void D3D11_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata; - - if (!textureData) { + D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; + + if (textureData == NULL) { return; } - textureData->scaleMode = (scaleMode == SDL_ScaleModeNearest) ? D3D11_FILTER_MIN_MAG_MIP_POINT : D3D11_FILTER_MIN_MAG_MIP_LINEAR; + textureData->scaleMode = (scaleMode == SDL_ScaleModeNearest) ? D3D11_FILTER_MIN_MAG_MIP_POINT : D3D11_FILTER_MIN_MAG_MIP_LINEAR; } -static int -D3D11_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D11_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; D3D11_TextureData *textureData = NULL; if (texture == NULL) { @@ -1614,7 +1564,7 @@ D3D11_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } - textureData = (D3D11_TextureData *) texture->driverdata; + textureData = (D3D11_TextureData *)texture->driverdata; if (!textureData->mainTextureRenderTargetView) { return SDL_SetError("specified texture is not a render target"); @@ -1625,16 +1575,14 @@ D3D11_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -D3D11_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int D3D11_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -D3D11_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int D3D11_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertexPositionColor), 0, &cmd->data.draw.first); + VertexPositionColor *verts = (VertexPositionColor *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertexPositionColor), 0, &cmd->data.draw.first); int i; SDL_Color color; color.r = cmd->data.draw.r; @@ -1642,7 +1590,7 @@ D3D11_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL color.b = cmd->data.draw.b; color.a = cmd->data.draw.a; - if (!verts) { + if (verts == NULL) { return -1; } @@ -1660,17 +1608,16 @@ D3D11_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL return 0; } -static int -D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; - VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertexPositionColor), 0, &cmd->data.draw.first); + VertexPositionColor *verts = (VertexPositionColor *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertexPositionColor), 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } @@ -1690,14 +1637,14 @@ D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); + xy_ = (float *)((char *)xy + j * xy_stride); verts->pos.x = xy_[0] * scale_x; verts->pos.y = xy_[1] * scale_y; - verts->color = *(SDL_Color*)((char*)color + j * color_stride); + verts->color = *(SDL_Color *)((char *)color + j * color_stride); if (texture) { - float *uv_ = (float *)((char*)uv + j * uv_stride); + float *uv_ = (float *)((char *)uv + j * uv_stride); verts->tex.x = uv_[0]; verts->tex.y = uv_[1]; } else { @@ -1710,29 +1657,27 @@ D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture return 0; } -static int -D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, - const void * vertexData, size_t dataSizeInBytes) +static int D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, + const void *vertexData, size_t dataSizeInBytes) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; HRESULT result = S_OK; const int vbidx = rendererData->currentVertexBuffer; const UINT stride = sizeof(VertexPositionColor); const UINT offset = 0; if (dataSizeInBytes == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (rendererData->vertexBuffers[vbidx] && rendererData->vertexBufferSizes[vbidx] >= dataSizeInBytes) { D3D11_MAPPED_SUBRESOURCE mappedResource; result = ID3D11DeviceContext_Map(rendererData->d3dContext, - (ID3D11Resource *)rendererData->vertexBuffers[vbidx], - 0, - D3D11_MAP_WRITE_DISCARD, - 0, - &mappedResource - ); + (ID3D11Resource *)rendererData->vertexBuffers[vbidx], + 0, + D3D11_MAP_WRITE_DISCARD, + 0, + &mappedResource); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11DeviceContext1::Map [vertex buffer]"), result); } @@ -1745,7 +1690,7 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, SAFE_RELEASE(rendererData->vertexBuffers[vbidx]); SDL_zero(vertexBufferDesc); - vertexBufferDesc.ByteWidth = (UINT) dataSizeInBytes; + vertexBufferDesc.ByteWidth = (UINT)dataSizeInBytes; vertexBufferDesc.Usage = D3D11_USAGE_DYNAMIC; vertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; vertexBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; @@ -1756,10 +1701,9 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, vertexBufferData.SysMemSlicePitch = 0; result = ID3D11Device_CreateBuffer(rendererData->d3dDevice, - &vertexBufferDesc, - &vertexBufferData, - &rendererData->vertexBuffers[vbidx] - ); + &vertexBufferDesc, + &vertexBufferData, + &rendererData->vertexBuffers[vbidx]); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateBuffer [vertex buffer]"), result); } @@ -1768,12 +1712,11 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, } ID3D11DeviceContext_IASetVertexBuffers(rendererData->d3dContext, - 0, - 1, - &rendererData->vertexBuffers[vbidx], - &stride, - &offset - ); + 0, + 1, + &rendererData->vertexBuffers[vbidx], + &stride, + &offset); rendererData->currentVertexBuffer++; if (rendererData->currentVertexBuffer >= SDL_arraysize(rendererData->vertexBuffers)) { @@ -1783,10 +1726,9 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, return 0; } -static int -D3D11_UpdateViewport(SDL_Renderer * renderer) +static int D3D11_UpdateViewport(SDL_Renderer *renderer) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; const SDL_Rect *viewport = &data->currentViewport; Float4X4 projection; Float4X4 view; @@ -1840,8 +1782,8 @@ D3D11_UpdateViewport(SDL_Renderer * renderer) * for eventual transfer to the GPU. */ data->vertexShaderConstantsData.projectionAndView = MatrixMultiply( - view, - projection); + view, + projection); /* Update the Direct3D viewport, which seems to be aligned to the * swap buffer's coordinate space, which is always in either @@ -1850,15 +1792,15 @@ D3D11_UpdateViewport(SDL_Renderer * renderer) */ swapDimensions = D3D11_IsDisplayRotated90Degrees(rotation); if (swapDimensions) { - orientationAlignedViewport.x = (float) viewport->y; - orientationAlignedViewport.y = (float) viewport->x; - orientationAlignedViewport.w = (float) viewport->h; - orientationAlignedViewport.h = (float) viewport->w; + orientationAlignedViewport.x = (float)viewport->y; + orientationAlignedViewport.y = (float)viewport->x; + orientationAlignedViewport.w = (float)viewport->h; + orientationAlignedViewport.h = (float)viewport->w; } else { - orientationAlignedViewport.x = (float) viewport->x; - orientationAlignedViewport.y = (float) viewport->y; - orientationAlignedViewport.w = (float) viewport->w; - orientationAlignedViewport.h = (float) viewport->h; + orientationAlignedViewport.x = (float)viewport->x; + orientationAlignedViewport.y = (float)viewport->y; + orientationAlignedViewport.w = (float)viewport->w; + orientationAlignedViewport.h = (float)viewport->h; } /* TODO, WinRT: get custom viewports working with non-Landscape modes (Portrait, PortraitFlipped, and LandscapeFlipped) */ @@ -1876,22 +1818,19 @@ D3D11_UpdateViewport(SDL_Renderer * renderer) return 0; } -static ID3D11RenderTargetView * -D3D11_GetCurrentRenderTargetView(SDL_Renderer * renderer) +static ID3D11RenderTargetView *D3D11_GetCurrentRenderTargetView(SDL_Renderer *renderer) { D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; if (data->currentOffscreenRenderTargetView) { return data->currentOffscreenRenderTargetView; - } - else { + } else { return data->mainRenderTargetView; } } -static int -D3D11_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, ID3D11PixelShader * shader, - const int numShaderResources, ID3D11ShaderResourceView ** shaderResources, - ID3D11SamplerState * sampler, const Float4X4 *matrix) +static int D3D11_SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, ID3D11PixelShader *shader, + const int numShaderResources, ID3D11ShaderResourceView **shaderResources, + ID3D11SamplerState *sampler, const Float4X4 *matrix) { D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; @@ -1905,10 +1844,9 @@ D3D11_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, ID3D11 if (renderTargetView != rendererData->currentRenderTargetView) { ID3D11DeviceContext_OMSetRenderTargets(rendererData->d3dContext, - 1, - &renderTargetView, - NULL - ); + 1, + &renderTargetView, + NULL); rendererData->currentRenderTargetView = renderTargetView; } @@ -1951,9 +1889,9 @@ D3D11_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, ID3D11 break; } } - if (!blendState) { + if (blendState == NULL) { blendState = D3D11_CreateBlendState(renderer, blendMode); - if (!blendState) { + if (blendState == NULL) { return -1; } } @@ -1981,27 +1919,25 @@ D3D11_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, ID3D11 rendererData->currentSampler = sampler; } - if (updateSubresource == SDL_TRUE || SDL_memcmp(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof (*newmatrix)) != 0) { + if (updateSubresource == SDL_TRUE || SDL_memcmp(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof(*newmatrix)) != 0) { SDL_copyp(&rendererData->vertexShaderConstantsData.model, newmatrix); ID3D11DeviceContext_UpdateSubresource(rendererData->d3dContext, - (ID3D11Resource *)rendererData->vertexShaderConstants, - 0, - NULL, - &rendererData->vertexShaderConstantsData, - 0, - 0 - ); + (ID3D11Resource *)rendererData->vertexShaderConstants, + 0, + NULL, + &rendererData->vertexShaderConstantsData, + 0, + 0); } return 0; } -static int -D3D11_SetCopyState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, const Float4X4 *matrix) +static int D3D11_SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const Float4X4 *matrix) { SDL_Texture *texture = cmd->data.draw.texture; - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; - D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; + D3D11_TextureData *textureData = (D3D11_TextureData *)texture->driverdata; ID3D11SamplerState *textureSampler; switch (textureData->scaleMode) { @@ -2063,25 +1999,22 @@ D3D11_SetCopyState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, const return D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[shader], SDL_arraysize(shaderResources), shaderResources, textureSampler, matrix); - } #endif /* SDL_HAVE_YUV */ return D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_RGB], 1, &textureData->mainTextureResourceView, textureSampler, matrix); } -static void -D3D11_DrawPrimitives(SDL_Renderer * renderer, D3D11_PRIMITIVE_TOPOLOGY primitiveTopology, const size_t vertexStart, const size_t vertexCount) +static void D3D11_DrawPrimitives(SDL_Renderer *renderer, D3D11_PRIMITIVE_TOPOLOGY primitiveTopology, const size_t vertexStart, const size_t vertexCount) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; ID3D11DeviceContext_IASetPrimitiveTopology(rendererData->d3dContext, primitiveTopology); - ID3D11DeviceContext_Draw(rendererData->d3dContext, (UINT) vertexCount, (UINT) vertexStart); + ID3D11DeviceContext_Draw(rendererData->d3dContext, (UINT)vertexCount, (UINT)vertexStart); } -static int -D3D11_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int D3D11_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata; const int viewportRotation = D3D11_GetRotationForCurrentRenderTarget(renderer); if (rendererData->currentViewportRotation != viewportRotation) { @@ -2095,92 +2028,99 @@ D3D11_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; /* this isn't currently used in this render backend. */ - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; /* this isn't currently used in this render backend. */ + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &rendererData->currentViewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - rendererData->viewportDirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &rendererData->currentViewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + rendererData->viewportDirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (rendererData->currentCliprectEnabled != cmd->data.cliprect.enabled) { - rendererData->currentCliprectEnabled = cmd->data.cliprect.enabled; - rendererData->cliprectDirty = SDL_TRUE; - } - if (SDL_memcmp(&rendererData->currentCliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&rendererData->currentCliprect, rect); - rendererData->cliprectDirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (rendererData->currentCliprectEnabled != cmd->data.cliprect.enabled) { + rendererData->currentCliprectEnabled = cmd->data.cliprect.enabled; + rendererData->cliprectDirty = SDL_TRUE; } - - case SDL_RENDERCMD_CLEAR: { - const float colorRGBA[] = { - (cmd->data.color.r / 255.0f), - (cmd->data.color.g / 255.0f), - (cmd->data.color.b / 255.0f), - (cmd->data.color.a / 255.0f) - }; - ID3D11DeviceContext_ClearRenderTargetView(rendererData->d3dContext, D3D11_GetCurrentRenderTargetView(renderer), colorRGBA); - break; + if (SDL_memcmp(&rendererData->currentCliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&rendererData->currentCliprect, rect); + rendererData->cliprectDirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_DRAW_POINTS: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); - D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); - D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, start, count); - break; - } + case SDL_RENDERCMD_CLEAR: + { + const float colorRGBA[] = { + (cmd->data.color.r / 255.0f), + (cmd->data.color.g / 255.0f), + (cmd->data.color.b / 255.0f), + (cmd->data.color.a / 255.0f) + }; + ID3D11DeviceContext_ClearRenderTargetView(rendererData->d3dContext, D3D11_GetCurrentRenderTargetView(renderer), colorRGBA); + break; + } - case SDL_RENDERCMD_DRAW_LINES: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); - const VertexPositionColor *verts = (VertexPositionColor *) (((Uint8 *) vertices) + first); - D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); - D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, start, count); - if (verts[0].pos.x != verts[count - 1].pos.x || verts[0].pos.y != verts[count - 1].pos.y) { - D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, start + (count-1), 1); - } - break; - } + case SDL_RENDERCMD_DRAW_POINTS: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); + D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); + D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, start, count); + break; + } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + case SDL_RENDERCMD_DRAW_LINES: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); + const VertexPositionColor *verts = (VertexPositionColor *)(((Uint8 *)vertices) + first); + D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); + D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, start, count); + if (verts[0].pos.x != verts[count - 1].pos.x || verts[0].pos.y != verts[count - 1].pos.y) { + D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, start + (count - 1), 1); + } + break; + } - case SDL_RENDERCMD_COPY: /* unused */ - break; + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_COPY: /* unused */ + break; - case SDL_RENDERCMD_GEOMETRY: { - SDL_Texture *texture = cmd->data.draw.texture; - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - if (texture) { - D3D11_SetCopyState(renderer, cmd, NULL); - } else { - D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); - } + case SDL_RENDERCMD_GEOMETRY: + { + SDL_Texture *texture = cmd->data.draw.texture; + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); - D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, start, count); - break; + if (texture) { + D3D11_SetCopyState(renderer, cmd, NULL); + } else { + D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL); } - case SDL_RENDERCMD_NO_OP: - break; + D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, start, count); + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -2189,28 +2129,27 @@ D3D11_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver return 0; } -static int -D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +static int D3D11_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { - D3D11_RenderData * data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; ID3D11RenderTargetView *renderTargetView = NULL; ID3D11Texture2D *backBuffer = NULL; ID3D11Texture2D *stagingTexture = NULL; HRESULT result; int status = -1; D3D11_TEXTURE2D_DESC stagingTextureDesc; - D3D11_RECT srcRect = {0, 0, 0, 0}; + D3D11_RECT srcRect = { 0, 0, 0, 0 }; D3D11_BOX srcBox; D3D11_MAPPED_SUBRESOURCE textureMemory; - ID3D11DeviceContext_OMGetRenderTargets(data->d3dContext, 1, &renderTargetView, NULL); + renderTargetView = D3D11_GetCurrentRenderTargetView(renderer); if (renderTargetView == NULL) { SDL_SetError("%s, ID3D11DeviceContext::OMGetRenderTargets failed", __FUNCTION__); goto done; } - ID3D11View_GetResource(renderTargetView, (ID3D11Resource**)&backBuffer); + ID3D11View_GetResource(renderTargetView, (ID3D11Resource **)&backBuffer); if (backBuffer == NULL) { SDL_SetError("%s, ID3D11View::GetResource failed", __FUNCTION__); goto done; @@ -2225,9 +2164,9 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, stagingTextureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; stagingTextureDesc.Usage = D3D11_USAGE_STAGING; result = ID3D11Device_CreateTexture2D(data->d3dDevice, - &stagingTextureDesc, - NULL, - &stagingTexture); + &stagingTextureDesc, + NULL, + &stagingTexture); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateTexture2D [create staging texture]"), result); goto done; @@ -2246,20 +2185,20 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, srcBox.front = 0; srcBox.back = 1; ID3D11DeviceContext_CopySubresourceRegion(data->d3dContext, - (ID3D11Resource *)stagingTexture, - 0, - 0, 0, 0, - (ID3D11Resource *)backBuffer, - 0, - &srcBox); + (ID3D11Resource *)stagingTexture, + 0, + 0, 0, 0, + (ID3D11Resource *)backBuffer, + 0, + &srcBox); /* Map the staging texture's data to CPU-accessible memory: */ result = ID3D11DeviceContext_Map(data->d3dContext, - (ID3D11Resource *)stagingTexture, - 0, - D3D11_MAP_READ, - 0, - &textureMemory); + (ID3D11Resource *)stagingTexture, + 0, + D3D11_MAP_READ, + 0, + &textureMemory); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11DeviceContext1::Map [map staging texture]"), result); goto done; @@ -2279,8 +2218,8 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, /* Unmap the texture: */ ID3D11DeviceContext_Unmap(data->d3dContext, - (ID3D11Resource *)stagingTexture, - 0); + (ID3D11Resource *)stagingTexture, + 0); done: SAFE_RELEASE(backBuffer); @@ -2288,10 +2227,9 @@ done: return status; } -static int -D3D11_RenderPresent(SDL_Renderer * renderer) +static int D3D11_RenderPresent(SDL_Renderer *renderer) { - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; UINT syncInterval; UINT presentFlags; HRESULT result; @@ -2323,13 +2261,13 @@ D3D11_RenderPresent(SDL_Renderer * renderer) * This is a valid operation only when the existing contents will be entirely * overwritten. If dirty or scroll rects are used, this call should be removed. */ - ID3D11DeviceContext1_DiscardView(data->d3dContext, (ID3D11View*)data->mainRenderTargetView); + ID3D11DeviceContext1_DiscardView(data->d3dContext, (ID3D11View *)data->mainRenderTargetView); /* When the present flips, it unbinds the current view, so bind it again on the next draw call */ data->currentRenderTargetView = NULL; if (FAILED(result) && result != DXGI_ERROR_WAS_STILL_DRAWING) { - /* If the device was removed either by a disconnect or a driver upgrade, we + /* If the device was removed either by a disconnect or a driver upgrade, we * must recreate all device resources. * * TODO, WinRT: consider throwing an exception if D3D11_RenderPresent fails, especially if there is a way to salvage debug info from users' machines @@ -2348,10 +2286,9 @@ D3D11_RenderPresent(SDL_Renderer * renderer) } #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP - /* no-op. */ +/* no-op. */ #else -static int -D3D11_SetVSync(SDL_Renderer * renderer, const int vsync) +static int D3D11_SetVSync(SDL_Renderer *renderer, const int vsync) { if (vsync) { renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; @@ -2362,20 +2299,19 @@ D3D11_SetVSync(SDL_Renderer * renderer, const int vsync) } #endif -SDL_Renderer * -D3D11_CreateRenderer(SDL_Window * window, Uint32 flags) +SDL_Renderer *D3D11_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; D3D11_RenderData *data; - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (D3D11_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (D3D11_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); return NULL; @@ -2399,9 +2335,9 @@ D3D11_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = D3D11_SetTextureScaleMode; renderer->SetRenderTarget = D3D11_SetRenderTarget; renderer->QueueSetViewport = D3D11_QueueSetViewport; - renderer->QueueSetDrawColor = D3D11_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = D3D11_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = D3D11_QueueDrawPoints; - renderer->QueueDrawLines = D3D11_QueueDrawPoints; /* lines and points queue vertices the same way. */ + renderer->QueueDrawLines = D3D11_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D11_QueueGeometry; renderer->RunCommandQueue = D3D11_RunCommandQueue; renderer->RenderReadPixels = D3D11_RenderReadPixels; @@ -2421,12 +2357,12 @@ D3D11_CreateRenderer(SDL_Window * window, Uint32 flags) * * - with the D3D11 debug runtime turned ON, vsync gets automatically * turned back on, and the following gets output to the debug console: - * - * DXGI ERROR: IDXGISwapChain::Present: Interval 0 is not supported, changed to Interval 1. [ UNKNOWN ERROR #1024: ] + * + * DXGI ERROR: IDXGISwapChain::Present: Interval 0 is not supported, changed to Interval 1. [ UNKNOWN ERROR #1024: ] */ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; #else - if ((flags & SDL_RENDERER_PRESENTVSYNC)) { + if (flags & SDL_RENDERER_PRESENTVSYNC) { renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; } renderer->SetVSync = D3D11_SetVSync; @@ -2457,19 +2393,17 @@ SDL_RenderDriver D3D11_RenderDriver = { ( SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | - SDL_RENDERER_TARGETTEXTURE - ), /* flags. see SDL_RendererFlags */ - 6, /* num_texture_formats */ - { /* texture_formats */ - SDL_PIXELFORMAT_ARGB8888, - SDL_PIXELFORMAT_RGB888, - SDL_PIXELFORMAT_YV12, - SDL_PIXELFORMAT_IYUV, - SDL_PIXELFORMAT_NV12, - SDL_PIXELFORMAT_NV21 - }, - 0, /* max_texture_width: will be filled in later */ - 0 /* max_texture_height: will be filled in later */ + SDL_RENDERER_TARGETTEXTURE), /* flags. see SDL_RendererFlags */ + 6, /* num_texture_formats */ + { /* texture_formats */ + SDL_PIXELFORMAT_ARGB8888, + SDL_PIXELFORMAT_RGB888, + SDL_PIXELFORMAT_YV12, + SDL_PIXELFORMAT_IYUV, + SDL_PIXELFORMAT_NV12, + SDL_PIXELFORMAT_NV21 }, + 0, /* max_texture_width: will be filled in later */ + 0 /* max_texture_height: will be filled in later */ } }; @@ -2477,13 +2411,12 @@ SDL_RenderDriver D3D11_RenderDriver = { #if defined(__WIN32__) || defined(__WINGDK__) /* This function needs to always exist on Windows, for the Dynamic API. */ -ID3D11Device * -SDL_RenderGetD3D11Device(SDL_Renderer * renderer) +ID3D11Device *SDL_RenderGetD3D11Device(SDL_Renderer *renderer) { ID3D11Device *device = NULL; #if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED - D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata; + D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata; /* Make sure that this is a D3D renderer */ if (renderer->DestroyRenderer != D3D11_DestroyRenderer) { diff --git a/modules/SDL2/src/render/direct3d11/SDL_render_winrt.cpp b/modules/SDL2/src/render/direct3d11/SDL_render_winrt.cpp index fc2852f..3f24d0f 100644 --- a/modules/SDL2/src/render/direct3d11/SDL_render_winrt.cpp +++ b/modules/SDL2/src/render/direct3d11/SDL_render_winrt.cpp @@ -42,12 +42,11 @@ using namespace Windows::Graphics::Display; #include "SDL_render_winrt.h" - extern "C" void * -D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer * renderer) +D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer *renderer) { - SDL_Window * sdlWindow = renderer->window; - if ( ! renderer->window ) { + SDL_Window *sdlWindow = renderer->window; + if (renderer->window == NULL) { return NULL; } @@ -110,7 +109,6 @@ D3D11_GetCurrentRotation() return DXGI_MODE_ROTATION_IDENTITY; } - #endif /* SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/render/direct3d11/SDL_render_winrt.h b/modules/SDL2/src/render/direct3d11/SDL_render_winrt.h index d139f4c..efc8c90 100644 --- a/modules/SDL2/src/render/direct3d11/SDL_render_winrt.h +++ b/modules/SDL2/src/render/direct3d11/SDL_render_winrt.h @@ -28,7 +28,7 @@ extern "C" { #endif -void * D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer * renderer); +void *D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer *renderer); DXGI_MODE_ROTATION D3D11_GetCurrentRotation(); #ifdef __cplusplus diff --git a/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c b/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c index 62bec6c..e8c0a48 100644 --- a/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c +++ b/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c @@ -32,7 +32,6 @@ #define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str - /* Direct3D 11.x shaders SDL's shaders are compiled into SDL itself, to simplify distribution. @@ -52,7 +51,7 @@ - vs_4_0_level_9_1: Vertex shader for Windows 8+, including Windows RT - ps_4_0_level_9_3: Pixel shader for Windows Phone 8 - vs_4_0_level_9_3: Vertex shader for Windows Phone 8 - + Shader object code was converted to a list of DWORDs via the following *nix style command (available separately from Windows + MSVC): @@ -1905,8 +1904,7 @@ static struct int D3D11_CreateVertexShader(ID3D11Device1 *d3dDevice, ID3D11VertexShader **vertexShader, ID3D11InputLayout **inputLayout) { /* Declare how the input layout for SDL's vertex shader will be setup: */ - const D3D11_INPUT_ELEMENT_DESC vertexDesc[] = - { + const D3D11_INPUT_ELEMENT_DESC vertexDesc[] = { { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0 }, @@ -1915,23 +1913,21 @@ int D3D11_CreateVertexShader(ID3D11Device1 *d3dDevice, ID3D11VertexShader **vert /* Load in SDL's one and only vertex shader: */ result = ID3D11Device_CreateVertexShader(d3dDevice, - D3D11_VertexShader, - sizeof(D3D11_VertexShader), - NULL, - vertexShader - ); + D3D11_VertexShader, + sizeof(D3D11_VertexShader), + NULL, + vertexShader); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateVertexShader"), result); } /* Create an input layout for SDL's vertex shader: */ result = ID3D11Device_CreateInputLayout(d3dDevice, - vertexDesc, - ARRAYSIZE(vertexDesc), - D3D11_VertexShader, - sizeof(D3D11_VertexShader), - inputLayout - ); + vertexDesc, + ARRAYSIZE(vertexDesc), + D3D11_VertexShader, + sizeof(D3D11_VertexShader), + inputLayout); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateInputLayout"), result); } @@ -1943,11 +1939,10 @@ int D3D11_CreatePixelShader(ID3D11Device1 *d3dDevice, D3D11_Shader shader, ID3D1 HRESULT result; result = ID3D11Device_CreatePixelShader(d3dDevice, - D3D11_shaders[shader].shader_data, - D3D11_shaders[shader].shader_size, - NULL, - pixelShader - ); + D3D11_shaders[shader].shader_data, + D3D11_shaders[shader].shader_size, + NULL, + pixelShader); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreatePixelShader"), result); } diff --git a/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h b/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h index eb35190..9c35bad 100644 --- a/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h +++ b/modules/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h @@ -22,7 +22,8 @@ /* D3D11 shader implementation */ -typedef enum { +typedef enum +{ SHADER_SOLID, SHADER_RGB, #if SDL_HAVE_YUV diff --git a/modules/SDL2/src/render/direct3d12/SDL_render_d3d12.c b/modules/SDL2/src/render/direct3d12/SDL_render_d3d12.c index 3d526f6..5ad8e26 100644 --- a/modules/SDL2/src/render/direct3d12/SDL_render_d3d12.c +++ b/modules/SDL2/src/render/direct3d12/SDL_render_d3d12.c @@ -25,9 +25,9 @@ #if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED -#define SDL_D3D12_NUM_BUFFERS 2 +#define SDL_D3D12_NUM_BUFFERS 2 #define SDL_D3D12_NUM_VERTEX_BUFFERS 256 -#define SDL_D3D12_MAX_NUM_TEXTURES 16384 +#define SDL_D3D12_MAX_NUM_TEXTURES 16384 #define SDL_D3D12_NUM_UPLOAD_BUFFERS 32 #include "../../core/windows/SDL_windows.h" @@ -59,15 +59,23 @@ #endif #ifdef __cplusplus -#define SAFE_RELEASE(X) if (X) { (X)->Release(); X = NULL; } -#define D3D_CALL(THIS, FUNC, ...) (THIS)->FUNC(__VA_ARGS__) +#define SAFE_RELEASE(X) \ + if (X) { \ + (X)->Release(); \ + X = NULL; \ + } +#define D3D_CALL(THIS, FUNC, ...) (THIS)->FUNC(__VA_ARGS__) #define D3D_CALL_RET(THIS, FUNC, RETVAL, ...) *(RETVAL) = (THIS)->FUNC(__VA_ARGS__) -#define D3D_GUID(X) (X) +#define D3D_GUID(X) (X) #else -#define SAFE_RELEASE(X) if (X) { (X)->lpVtbl->Release(X); X = NULL; } -#define D3D_CALL(THIS, FUNC, ...) (THIS)->lpVtbl->FUNC((THIS), ##__VA_ARGS__) +#define SAFE_RELEASE(X) \ + if (X) { \ + (X)->lpVtbl->Release(X); \ + X = NULL; \ + } +#define D3D_CALL(THIS, FUNC, ...) (THIS)->lpVtbl->FUNC((THIS), ##__VA_ARGS__) #define D3D_CALL_RET(THIS, FUNC, ...) (THIS)->lpVtbl->FUNC((THIS), ##__VA_ARGS__) -#define D3D_GUID(X) &(X) +#define D3D_GUID(X) &(X) #endif /* Set up for C function definitions, even when using C++ */ @@ -141,7 +149,7 @@ typedef struct } D3D12_PipelineState; /* Vertex Buffer */ -typedef struct +typedef struct { ID3D12Resource *resource; D3D12_VERTEX_BUFFER_VIEW view; @@ -176,12 +184,12 @@ typedef struct UINT swapFlags; /* Descriptor heaps */ - ID3D12DescriptorHeap* rtvDescriptorHeap; + ID3D12DescriptorHeap *rtvDescriptorHeap; UINT rtvDescriptorSize; - ID3D12DescriptorHeap* textureRTVDescriptorHeap; - ID3D12DescriptorHeap* srvDescriptorHeap; + ID3D12DescriptorHeap *textureRTVDescriptorHeap; + ID3D12DescriptorHeap *srvDescriptorHeap; UINT srvDescriptorSize; - ID3D12DescriptorHeap* samplerDescriptorHeap; + ID3D12DescriptorHeap *samplerDescriptorHeap; UINT samplerDescriptorSize; /* Data needed per backbuffer */ @@ -189,7 +197,7 @@ typedef struct ID3D12Resource *renderTargets[SDL_D3D12_NUM_BUFFERS]; UINT64 fenceValue; int currentBackBufferIndex; - + /* Fences */ ID3D12Fence *fence; HANDLE fenceEvent; @@ -214,10 +222,10 @@ typedef struct /* Vertex buffer constants */ VertexShaderConstants vertexShaderConstantsData; - + /* Cached renderer properties */ DXGI_MODE_ROTATION rotation; - D3D12_TextureData* textureRenderTarget; + D3D12_TextureData *textureRenderTarget; D3D12_CPU_DESCRIPTOR_HANDLE currentRenderTargetView; D3D12_CPU_DESCRIPTOR_HANDLE currentShaderResource; D3D12_CPU_DESCRIPTOR_HANDLE currentSampler; @@ -232,7 +240,6 @@ typedef struct SDL_bool issueBatch; } D3D12_RenderData; - /* Define D3D GUIDs here so we don't have to include uuid.lib. */ #if defined(__GNUC__) || defined(__clang__) @@ -246,7 +253,7 @@ static const GUID SDL_IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0 static const GUID SDL_IID_ID3D12Device1 = { 0x77acce80, 0x638e, 0x4e65, { 0x88, 0x95, 0xc1, 0xf2, 0x33, 0x86, 0x86, 0x3e } }; static const GUID SDL_IID_IDXGISwapChain4 = { 0x3D585D5A, 0xBD4A, 0x489E, { 0xB1, 0xF4, 0x3D, 0xBC, 0xB6, 0x45, 0x2F, 0xFB } }; static const GUID SDL_IID_IDXGIDebug1 = { 0xc5a05f0c, 0x16f2, 0x4adf, { 0x9f, 0x4d, 0xa8, 0xc4, 0xd5, 0x8a, 0xc5, 0x50 } }; -static const GUID SDL_IID_IDXGIInfoQueue = { 0xD67441C7,0x672A,0x476f, { 0x9E,0x82,0xCD,0x55,0xB4,0x49,0x49,0xCE } }; +static const GUID SDL_IID_IDXGIInfoQueue = { 0xD67441C7, 0x672A, 0x476f, { 0x9E, 0x82, 0xCD, 0x55, 0xB4, 0x49, 0x49, 0xCE } }; static const GUID SDL_IID_ID3D12Debug = { 0x344488b7, 0x6846, 0x474b, { 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0 } }; static const GUID SDL_DXGI_DEBUG_ALL = { 0xe48ae283, 0xda80, 0x490b, { 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x8 } }; static const GUID SDL_IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } }; @@ -264,50 +271,45 @@ static const GUID SDL_IID_ID3D12InfoQueue = { 0x0742a90b, 0xc387, 0x483f, { 0xb9 #pragma GCC diagnostic pop #endif - -UINT -D3D12_Align(UINT location, UINT alignment) +UINT D3D12_Align(UINT location, UINT alignment) { - return ((location + (alignment - 1)) & ~(alignment - 1)); + return (location + (alignment - 1)) & ~(alignment - 1); } -Uint32 -D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) +Uint32 D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) { switch (dxgiFormat) { - case DXGI_FORMAT_B8G8R8A8_UNORM: - return SDL_PIXELFORMAT_ARGB8888; - case DXGI_FORMAT_B8G8R8X8_UNORM: - return SDL_PIXELFORMAT_RGB888; - default: - return SDL_PIXELFORMAT_UNKNOWN; + case DXGI_FORMAT_B8G8R8A8_UNORM: + return SDL_PIXELFORMAT_ARGB8888; + case DXGI_FORMAT_B8G8R8X8_UNORM: + return SDL_PIXELFORMAT_RGB888; + default: + return SDL_PIXELFORMAT_UNKNOWN; } } -static DXGI_FORMAT -SDLPixelFormatToDXGIFormat(Uint32 sdlFormat) +static DXGI_FORMAT SDLPixelFormatToDXGIFormat(Uint32 sdlFormat) { switch (sdlFormat) { - case SDL_PIXELFORMAT_ARGB8888: - return DXGI_FORMAT_B8G8R8A8_UNORM; - case SDL_PIXELFORMAT_RGB888: - return DXGI_FORMAT_B8G8R8X8_UNORM; - case SDL_PIXELFORMAT_YV12: - case SDL_PIXELFORMAT_IYUV: - case SDL_PIXELFORMAT_NV12: /* For the Y texture */ - case SDL_PIXELFORMAT_NV21: /* For the Y texture */ - return DXGI_FORMAT_R8_UNORM; - default: - return DXGI_FORMAT_UNKNOWN; + case SDL_PIXELFORMAT_ARGB8888: + return DXGI_FORMAT_B8G8R8A8_UNORM; + case SDL_PIXELFORMAT_RGB888: + return DXGI_FORMAT_B8G8R8X8_UNORM; + case SDL_PIXELFORMAT_YV12: + case SDL_PIXELFORMAT_IYUV: + case SDL_PIXELFORMAT_NV12: /* For the Y texture */ + case SDL_PIXELFORMAT_NV21: /* For the Y texture */ + return DXGI_FORMAT_R8_UNORM; + default: + return DXGI_FORMAT_UNKNOWN; } } -static void D3D12_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); +static void D3D12_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture); -static void -D3D12_ReleaseAll(SDL_Renderer * renderer) +static void D3D12_ReleaseAll(SDL_Renderer *renderer) { - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; SDL_Texture *texture = NULL; /* Release all textures */ @@ -355,8 +357,8 @@ D3D12_ReleaseAll(SDL_Renderer * renderer) SAFE_RELEASE(data->vertexBuffers[i].resource); data->vertexBuffers[i].size = 0; } - - data->swapEffect = (DXGI_SWAP_EFFECT) 0; + + data->swapEffect = (DXGI_SWAP_EFFECT)0; data->swapFlags = 0; data->currentRenderTargetView.ptr = 0; data->currentSampler.ptr = 0; @@ -384,34 +386,30 @@ D3D12_ReleaseAll(SDL_Renderer * renderer) } } -static D3D12_GPU_DESCRIPTOR_HANDLE -D3D12_CPUtoGPUHandle(ID3D12DescriptorHeap * heap, D3D12_CPU_DESCRIPTOR_HANDLE CPUHandle) +static D3D12_GPU_DESCRIPTOR_HANDLE D3D12_CPUtoGPUHandle(ID3D12DescriptorHeap *heap, D3D12_CPU_DESCRIPTOR_HANDLE CPUHandle) { D3D12_CPU_DESCRIPTOR_HANDLE CPUHeapStart; D3D12_GPU_DESCRIPTOR_HANDLE GPUHandle; SIZE_T offset; - + /* Calculate the correct offset into the heap */ D3D_CALL_RET(heap, GetCPUDescriptorHandleForHeapStart, &CPUHeapStart); offset = CPUHandle.ptr - CPUHeapStart.ptr; - + D3D_CALL_RET(heap, GetGPUDescriptorHandleForHeapStart, &GPUHandle); GPUHandle.ptr += offset; return GPUHandle; } -static void -D3D12_WaitForGPU(D3D12_RenderData * data) +static void D3D12_WaitForGPU(D3D12_RenderData *data) { - if (data->commandQueue && data->fence && data->fenceEvent) - { + if (data->commandQueue && data->fence && data->fenceEvent) { D3D_CALL(data->commandQueue, Signal, data->fence, data->fenceValue); if (D3D_CALL(data->fence, GetCompletedValue) < data->fenceValue) { D3D_CALL(data->fence, SetEventOnCompletion, - data->fenceValue, - data->fenceEvent - ); + data->fenceValue, + data->fenceEvent); WaitForSingleObjectEx(data->fenceEvent, INFINITE, FALSE); } @@ -419,10 +417,9 @@ D3D12_WaitForGPU(D3D12_RenderData * data) } } -static D3D12_CPU_DESCRIPTOR_HANDLE -D3D12_GetCurrentRenderTargetView(SDL_Renderer * renderer) +static D3D12_CPU_DESCRIPTOR_HANDLE D3D12_GetCurrentRenderTargetView(SDL_Renderer *renderer) { - D3D12_RenderData* data = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor; if (data->textureRenderTarget) { @@ -435,12 +432,10 @@ D3D12_GetCurrentRenderTargetView(SDL_Renderer * renderer) return rtvDescriptor; } -static void -D3D12_TransitionResource(D3D12_RenderData * data, - ID3D12Resource * resource, - D3D12_RESOURCE_STATES beforeState, - D3D12_RESOURCE_STATES afterState -) +static void D3D12_TransitionResource(D3D12_RenderData *data, + ID3D12Resource *resource, + D3D12_RESOURCE_STATES beforeState, + D3D12_RESOURCE_STATES afterState) { D3D12_RESOURCE_BARRIER barrier; @@ -456,8 +451,7 @@ D3D12_TransitionResource(D3D12_RenderData * data, } } -static void -D3D12_ResetCommandList(D3D12_RenderData * data) +static void D3D12_ResetCommandList(D3D12_RenderData *data) { int i; ID3D12DescriptorHeap *rootDescriptorHeaps[] = { data->srvDescriptorHeap, data->samplerDescriptorHeap }; @@ -481,8 +475,7 @@ D3D12_ResetCommandList(D3D12_RenderData * data) D3D_CALL(data->commandList, SetDescriptorHeaps, 2, rootDescriptorHeaps); } -static int -D3D12_IssueBatch(D3D12_RenderData * data) +static int D3D12_IssueBatch(D3D12_RenderData *data) { HRESULT result = S_OK; @@ -492,19 +485,18 @@ D3D12_IssueBatch(D3D12_RenderData * data) WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("D3D12_IssueBatch"), result); return result; } - D3D_CALL(data->commandQueue, ExecuteCommandLists, 1, (ID3D12CommandList* const*)&data->commandList); + D3D_CALL(data->commandQueue, ExecuteCommandLists, 1, (ID3D12CommandList *const *)&data->commandList); D3D12_WaitForGPU(data); - + D3D12_ResetCommandList(data); return result; } -static void -D3D12_DestroyRenderer(SDL_Renderer * renderer) +static void D3D12_DestroyRenderer(SDL_Renderer *renderer) { - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; D3D12_WaitForGPU(data); D3D12_ReleaseAll(renderer); if (data) { @@ -513,15 +505,13 @@ D3D12_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int -D3D12_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) +static int D3D12_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GetWindowSizeInPixels(renderer->window, w, h); return 0; } -static D3D12_BLEND -GetBlendFunc(SDL_BlendFactor factor) +static D3D12_BLEND GetBlendFunc(SDL_BlendFactor factor) { switch (factor) { case SDL_BLENDFACTOR_ZERO: @@ -549,8 +539,7 @@ GetBlendFunc(SDL_BlendFactor factor) } } -static D3D12_BLEND_OP -GetBlendEquation(SDL_BlendOperation operation) +static D3D12_BLEND_OP GetBlendEquation(SDL_BlendOperation operation) { switch (operation) { case SDL_BLENDOPERATION_ADD: @@ -568,8 +557,7 @@ GetBlendEquation(SDL_BlendOperation operation) } } -static void -D3D12_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode, D3D12_BLEND_DESC * outBlendDesc) +static void D3D12_CreateBlendState(SDL_Renderer *renderer, SDL_BlendMode blendMode, D3D12_BLEND_DESC *outBlendDesc) { SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); @@ -591,23 +579,21 @@ D3D12_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode, D3D12_B outBlendDesc->RenderTarget[0].RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL; } -static D3D12_PipelineState * -D3D12_CreatePipelineState(SDL_Renderer * renderer, - D3D12_Shader shader, - SDL_BlendMode blendMode, - D3D12_PRIMITIVE_TOPOLOGY_TYPE topology, - DXGI_FORMAT rtvFormat - ) +static D3D12_PipelineState *D3D12_CreatePipelineState(SDL_Renderer *renderer, + D3D12_Shader shader, + SDL_BlendMode blendMode, + D3D12_PRIMITIVE_TOPOLOGY_TYPE topology, + DXGI_FORMAT rtvFormat) { const D3D12_INPUT_ELEMENT_DESC vertexDesc[] = { { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 16, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, }; - D3D12_RenderData* data = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; D3D12_GRAPHICS_PIPELINE_STATE_DESC pipelineDesc; - ID3D12PipelineState* pipelineState = NULL; - D3D12_PipelineState* pipelineStates; + ID3D12PipelineState *pipelineState = NULL; + D3D12_PipelineState *pipelineStates; HRESULT result = S_OK; SDL_zero(pipelineDesc); @@ -638,17 +624,16 @@ D3D12_CreatePipelineState(SDL_Renderer * renderer, pipelineDesc.SampleDesc.Quality = 0; result = D3D_CALL(data->d3dDevice, CreateGraphicsPipelineState, - &pipelineDesc, - D3D_GUID(SDL_IID_ID3D12PipelineState), - (void **)&pipelineState - ); + &pipelineDesc, + D3D_GUID(SDL_IID_ID3D12PipelineState), + (void **)&pipelineState); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateGraphicsPipelineState"), result); return NULL; } - pipelineStates = (D3D12_PipelineState*)SDL_realloc(data->pipelineStates, (data->pipelineStateCount + 1) * sizeof(*pipelineStates)); - if (!pipelineStates) { + pipelineStates = (D3D12_PipelineState *)SDL_realloc(data->pipelineStates, (data->pipelineStateCount + 1) * sizeof(*pipelineStates)); + if (pipelineStates == NULL) { SAFE_RELEASE(pipelineState); SDL_OutOfMemory(); return NULL; @@ -665,8 +650,7 @@ D3D12_CreatePipelineState(SDL_Renderer * renderer, return &pipelineStates[data->pipelineStateCount - 1]; } -static HRESULT -D3D12_CreateVertexBuffer(D3D12_RenderData *data, size_t vbidx, size_t size) +static HRESULT D3D12_CreateVertexBuffer(D3D12_RenderData *data, size_t vbidx, size_t size) { D3D12_HEAP_PROPERTIES vbufferHeapProps; D3D12_RESOURCE_DESC vbufferDesc; @@ -693,14 +677,13 @@ D3D12_CreateVertexBuffer(D3D12_RenderData *data, size_t vbidx, size_t size) vbufferDesc.Flags = D3D12_RESOURCE_FLAG_NONE; result = D3D_CALL(data->d3dDevice, CreateCommittedResource, - &vbufferHeapProps, - D3D12_HEAP_FLAG_NONE, - &vbufferDesc, - D3D12_RESOURCE_STATE_GENERIC_READ, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **) &data->vertexBuffers[vbidx].resource - ); + &vbufferHeapProps, + D3D12_HEAP_FLAG_NONE, + &vbufferDesc, + D3D12_RESOURCE_STATE_GENERIC_READ, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&data->vertexBuffers[vbidx].resource); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreatePlacedResource [vertex buffer]"), result); @@ -715,19 +698,18 @@ D3D12_CreateVertexBuffer(D3D12_RenderData *data, size_t vbidx, size_t size) } /* Create resources that depend on the device. */ -static HRESULT -D3D12_CreateDeviceResources(SDL_Renderer* renderer) +static HRESULT D3D12_CreateDeviceResources(SDL_Renderer *renderer) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - typedef HRESULT(WINAPI* PFN_CREATE_DXGI_FACTORY)(UINT flags, REFIID riid, void** ppFactory); + typedef HRESULT(WINAPI * PFN_CREATE_DXGI_FACTORY)(UINT flags, REFIID riid, void **ppFactory); PFN_CREATE_DXGI_FACTORY CreateDXGIFactoryFunc; PFN_D3D12_CREATE_DEVICE D3D12CreateDeviceFunc; #endif - typedef HANDLE(WINAPI* PFN_CREATE_EVENT_EX)(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); + typedef HANDLE(WINAPI * PFN_CREATE_EVENT_EX)(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); PFN_CREATE_EVENT_EX CreateEventExFunc; - D3D12_RenderData* data = (D3D12_RenderData*)renderer->driverdata; - ID3D12Device* d3dDevice = NULL; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; + ID3D12Device *d3dDevice = NULL; HRESULT result = S_OK; UINT creationFlags = 0; int i, j, k, l; @@ -762,11 +744,11 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll")); CreateEventExFunc = NULL; if (kernel32) { - CreateEventExFunc = (PFN_CREATE_EVENT_EX) GetProcAddress(kernel32, "CreateEventExW"); + CreateEventExFunc = (PFN_CREATE_EVENT_EX)GetProcAddress(kernel32, "CreateEventExW"); } } #endif - if (!CreateEventExFunc) { + if (CreateEventExFunc == NULL) { result = E_FAIL; goto done; } @@ -779,7 +761,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) } CreateDXGIFactoryFunc = (PFN_CREATE_DXGI_FACTORY)SDL_LoadFunction(data->hDXGIMod, "CreateDXGIFactory2"); - if (!CreateDXGIFactoryFunc) { + if (CreateDXGIFactoryFunc == NULL) { result = E_FAIL; goto done; } @@ -804,7 +786,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) result = E_FAIL; goto done; } - D3D12GetDebugInterfaceFunc(D3D_GUID(SDL_IID_ID3D12Debug), (void**)&data->debugInterface); + D3D12GetDebugInterfaceFunc(D3D_GUID(SDL_IID_ID3D12Debug), (void **)&data->debugInterface); D3D_CALL(data->debugInterface, EnableDebugLayer); } #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ @@ -823,7 +805,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* If the debug hint is set, also create the DXGI factory in debug mode */ DXGIGetDebugInterfaceFunc = (PFN_CREATE_DXGI_FACTORY)SDL_LoadFunction(data->hDXGIMod, "DXGIGetDebugInterface1"); - if (!DXGIGetDebugInterfaceFunc) { + if (DXGIGetDebugInterfaceFunc == NULL) { result = E_FAIL; goto done; } @@ -847,7 +829,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) creationFlags = DXGI_CREATE_FACTORY_DEBUG; } - result = CreateDXGIFactoryFunc(creationFlags, D3D_GUID(SDL_IID_IDXGIFactory6), (void**)&data->dxgiFactory); + result = CreateDXGIFactoryFunc(creationFlags, D3D_GUID(SDL_IID_IDXGIFactory6), (void **)&data->dxgiFactory); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("CreateDXGIFactory"), result); goto done; @@ -855,21 +837,19 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* Prefer a high performance adapter if there are multiple choices */ result = D3D_CALL(data->dxgiFactory, EnumAdapterByGpuPreference, - 0, - DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, - D3D_GUID(SDL_IID_IDXGIAdapter4), - (void **)&data->dxgiAdapter - ); + 0, + DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, + D3D_GUID(SDL_IID_IDXGIAdapter4), + (void **)&data->dxgiAdapter); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("D3D12CreateDevice"), result); goto done; } - + result = D3D12CreateDeviceFunc((IUnknown *)data->dxgiAdapter, - D3D_FEATURE_LEVEL_11_0, /* Request minimum feature level 11.0 for maximum compatibility */ - D3D_GUID(SDL_IID_ID3D12Device1), - (void **)&d3dDevice - ); + D3D_FEATURE_LEVEL_11_0, /* Request minimum feature level 11.0 for maximum compatibility */ + D3D_GUID(SDL_IID_ID3D12Device1), + (void **)&d3dDevice); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("D3D12CreateDevice"), result); goto done; @@ -911,10 +891,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; result = D3D_CALL(data->d3dDevice, CreateCommandQueue, - &queueDesc, - D3D_GUID(SDL_IID_ID3D12CommandQueue), - (void **)&data->commandQueue - ); + &queueDesc, + D3D_GUID(SDL_IID_ID3D12CommandQueue), + (void **)&data->commandQueue); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateCommandQueue"), result); goto done; @@ -925,10 +904,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) descriptorHeapDesc.NumDescriptors = SDL_D3D12_NUM_BUFFERS; descriptorHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; result = D3D_CALL(data->d3dDevice, CreateDescriptorHeap, - &descriptorHeapDesc, - D3D_GUID(SDL_IID_ID3D12DescriptorHeap), - (void **)&data->rtvDescriptorHeap - ); + &descriptorHeapDesc, + D3D_GUID(SDL_IID_ID3D12DescriptorHeap), + (void **)&data->rtvDescriptorHeap); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateDescriptorHeap [rtv]"), result); goto done; @@ -937,10 +915,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) descriptorHeapDesc.NumDescriptors = SDL_D3D12_MAX_NUM_TEXTURES; result = D3D_CALL(data->d3dDevice, CreateDescriptorHeap, - &descriptorHeapDesc, - D3D_GUID(SDL_IID_ID3D12DescriptorHeap), - (void **)&data->textureRTVDescriptorHeap - ); + &descriptorHeapDesc, + D3D_GUID(SDL_IID_ID3D12DescriptorHeap), + (void **)&data->textureRTVDescriptorHeap); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateDescriptorHeap [texture rtv]"), result); goto done; @@ -951,10 +928,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) descriptorHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV; descriptorHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; result = D3D_CALL(data->d3dDevice, CreateDescriptorHeap, - &descriptorHeapDesc, - D3D_GUID(SDL_IID_ID3D12DescriptorHeap), - (void **)&data->srvDescriptorHeap - ); + &descriptorHeapDesc, + D3D_GUID(SDL_IID_ID3D12DescriptorHeap), + (void **)&data->srvDescriptorHeap); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateDescriptorHeap [srv]"), result); goto done; @@ -967,10 +943,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) descriptorHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER; descriptorHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; result = D3D_CALL(data->d3dDevice, CreateDescriptorHeap, - &descriptorHeapDesc, - D3D_GUID(SDL_IID_ID3D12DescriptorHeap), - (void **)&data->samplerDescriptorHeap - ); + &descriptorHeapDesc, + D3D_GUID(SDL_IID_ID3D12DescriptorHeap), + (void **)&data->samplerDescriptorHeap); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateDescriptorHeap [sampler]"), result); goto done; @@ -981,10 +956,9 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* Create a command allocator for each back buffer */ for (i = 0; i < SDL_D3D12_NUM_BUFFERS; ++i) { result = D3D_CALL(data->d3dDevice, CreateCommandAllocator, - D3D12_COMMAND_LIST_TYPE_DIRECT, - D3D_GUID(SDL_IID_ID3D12CommandAllocator), - (void **)&data->commandAllocators[i] - ); + D3D12_COMMAND_LIST_TYPE_DIRECT, + D3D_GUID(SDL_IID_ID3D12CommandAllocator), + (void **)&data->commandAllocators[i]); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateCommandAllocator"), result); goto done; @@ -993,13 +967,12 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* Create the command list */ result = D3D_CALL(data->d3dDevice, CreateCommandList, - 0, - D3D12_COMMAND_LIST_TYPE_DIRECT, - data->commandAllocators[0], - NULL, - D3D_GUID(SDL_IID_ID3D12GraphicsCommandList2), - (void **)&data->commandList - ); + 0, + D3D12_COMMAND_LIST_TYPE_DIRECT, + data->commandAllocators[0], + NULL, + D3D_GUID(SDL_IID_ID3D12GraphicsCommandList2), + (void **)&data->commandList); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateCommandList"), result); goto done; @@ -1010,11 +983,10 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* Create the fence and fence event */ result = D3D_CALL(data->d3dDevice, CreateFence, - data->fenceValue, - D3D12_FENCE_FLAG_NONE, - D3D_GUID(SDL_IID_ID3D12Fence), - (void **)&data->fence - ); + data->fenceValue, + D3D12_FENCE_FLAG_NONE, + D3D_GUID(SDL_IID_ID3D12Fence), + (void **)&data->fence); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateFence"), result); goto done; @@ -1031,14 +1003,13 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* Create all the root signatures */ for (i = 0; i < NUM_ROOTSIGS; ++i) { D3D12_SHADER_BYTECODE rootSigData; - D3D12_GetRootSignatureData((D3D12_RootSignature) i, &rootSigData); + D3D12_GetRootSignatureData((D3D12_RootSignature)i, &rootSigData); result = D3D_CALL(data->d3dDevice, CreateRootSignature, - 0, - rootSigData.pShaderBytecode, - rootSigData.BytecodeLength, - D3D_GUID(SDL_IID_ID3D12RootSignature), - (void **)&data->rootSignatures[i] - ); + 0, + rootSigData.pShaderBytecode, + rootSigData.BytecodeLength, + D3D_GUID(SDL_IID_ID3D12RootSignature), + (void **)&data->rootSignatures[i]); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateRootSignature"), result); goto done; @@ -1051,7 +1022,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) for (j = 0; j < SDL_arraysize(defaultBlendModes); ++j) { for (k = D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT; k < D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH; ++k) { for (l = 0; l < SDL_arraysize(defaultRTVFormats); ++l) { - if (!D3D12_CreatePipelineState(renderer, (D3D12_Shader) i, defaultBlendModes[j], (D3D12_PRIMITIVE_TOPOLOGY_TYPE) k, defaultRTVFormats[l])) { + if (!D3D12_CreatePipelineState(renderer, (D3D12_Shader)i, defaultBlendModes[j], (D3D12_PRIMITIVE_TOPOLOGY_TYPE)k, defaultRTVFormats[l])) { /* D3D12_CreatePipelineState will set the SDL error, if it fails */ goto done; } @@ -1096,27 +1067,24 @@ done: return result; } -static DXGI_MODE_ROTATION -D3D12_GetCurrentRotation() +static DXGI_MODE_ROTATION D3D12_GetCurrentRotation() { /* FIXME */ return DXGI_MODE_ROTATION_IDENTITY; } -static BOOL -D3D12_IsDisplayRotated90Degrees(DXGI_MODE_ROTATION rotation) +static BOOL D3D12_IsDisplayRotated90Degrees(DXGI_MODE_ROTATION rotation) { switch (rotation) { - case DXGI_MODE_ROTATION_ROTATE90: - case DXGI_MODE_ROTATION_ROTATE270: - return TRUE; - default: - return FALSE; + case DXGI_MODE_ROTATION_ROTATE90: + case DXGI_MODE_ROTATION_ROTATE270: + return TRUE; + default: + return FALSE; } } -static int -D3D12_GetRotationForCurrentRenderTarget(SDL_Renderer * renderer) +static int D3D12_GetRotationForCurrentRenderTarget(SDL_Renderer *renderer) { D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; if (data->textureRenderTarget) { @@ -1126,53 +1094,51 @@ D3D12_GetRotationForCurrentRenderTarget(SDL_Renderer * renderer) } } -static int -D3D12_GetViewportAlignedD3DRect(SDL_Renderer * renderer, const SDL_Rect * sdlRect, D3D12_RECT * outRect, BOOL includeViewportOffset) +static int D3D12_GetViewportAlignedD3DRect(SDL_Renderer *renderer, const SDL_Rect *sdlRect, D3D12_RECT *outRect, BOOL includeViewportOffset) { - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; const int rotation = D3D12_GetRotationForCurrentRenderTarget(renderer); const SDL_Rect *viewport = &data->currentViewport; switch (rotation) { - case DXGI_MODE_ROTATION_IDENTITY: - outRect->left = sdlRect->x; - outRect->right = sdlRect->x + sdlRect->w; - outRect->top = sdlRect->y; - outRect->bottom = sdlRect->y + sdlRect->h; - if (includeViewportOffset) { - outRect->left += viewport->x; - outRect->right += viewport->x; - outRect->top += viewport->y; - outRect->bottom += viewport->y; - } - break; - case DXGI_MODE_ROTATION_ROTATE270: - outRect->left = sdlRect->y; - outRect->right = sdlRect->y + sdlRect->h; - outRect->top = viewport->w - sdlRect->x - sdlRect->w; - outRect->bottom = viewport->w - sdlRect->x; - break; - case DXGI_MODE_ROTATION_ROTATE180: - outRect->left = viewport->w - sdlRect->x - sdlRect->w; - outRect->right = viewport->w - sdlRect->x; - outRect->top = viewport->h - sdlRect->y - sdlRect->h; - outRect->bottom = viewport->h - sdlRect->y; - break; - case DXGI_MODE_ROTATION_ROTATE90: - outRect->left = viewport->h - sdlRect->y - sdlRect->h; - outRect->right = viewport->h - sdlRect->y; - outRect->top = sdlRect->x; - outRect->bottom = sdlRect->x + sdlRect->h; - break; - default: - return SDL_SetError("The physical display is in an unknown or unsupported rotation"); + case DXGI_MODE_ROTATION_IDENTITY: + outRect->left = sdlRect->x; + outRect->right = (LONG)sdlRect->x + sdlRect->w; + outRect->top = sdlRect->y; + outRect->bottom = (LONG)sdlRect->y + sdlRect->h; + if (includeViewportOffset) { + outRect->left += viewport->x; + outRect->right += viewport->x; + outRect->top += viewport->y; + outRect->bottom += viewport->y; + } + break; + case DXGI_MODE_ROTATION_ROTATE270: + outRect->left = sdlRect->y; + outRect->right = (LONG)sdlRect->y + sdlRect->h; + outRect->top = viewport->w - sdlRect->x - sdlRect->w; + outRect->bottom = viewport->w - sdlRect->x; + break; + case DXGI_MODE_ROTATION_ROTATE180: + outRect->left = viewport->w - sdlRect->x - sdlRect->w; + outRect->right = viewport->w - sdlRect->x; + outRect->top = viewport->h - sdlRect->y - sdlRect->h; + outRect->bottom = viewport->h - sdlRect->y; + break; + case DXGI_MODE_ROTATION_ROTATE90: + outRect->left = viewport->h - sdlRect->y - sdlRect->h; + outRect->right = viewport->h - sdlRect->y; + outRect->top = sdlRect->x; + outRect->bottom = (LONG)sdlRect->x + sdlRect->h; + break; + default: + return SDL_SetError("The physical display is in an unknown or unsupported rotation"); } return 0; } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -static HRESULT -D3D12_CreateSwapChain(SDL_Renderer * renderer, int w, int h) +static HRESULT D3D12_CreateSwapChain(SDL_Renderer *renderer, int w, int h) { D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; IDXGISwapChain1* swapChain; @@ -1195,21 +1161,20 @@ D3D12_CreateSwapChain(SDL_Renderer * renderer, int w, int h) } else { swapChainDesc.Scaling = DXGI_SCALING_STRETCH; } - swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; /* All Windows Store apps must use this SwapEffect. */ + swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; /* All Windows Store apps must use this SwapEffect. */ swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT | /* To support SetMaximumFrameLatency */ - DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING; /* To support presenting with allow tearing on */ + DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING; /* To support presenting with allow tearing on */ SDL_VERSION(&windowinfo.version); SDL_GetWindowWMInfo(renderer->window, &windowinfo); result = D3D_CALL(data->dxgiFactory, CreateSwapChainForHwnd, - (IUnknown *)data->commandQueue, - windowinfo.info.win.window, - &swapChainDesc, - NULL, - NULL, /* Allow on all displays. */ - &swapChain - ); + (IUnknown *)data->commandQueue, + windowinfo.info.win.window, + &swapChainDesc, + NULL, + NULL, /* Allow on all displays. */ + &swapChain); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory2::CreateSwapChainForHwnd"), result); goto done; @@ -1241,11 +1206,10 @@ done: } #endif -static HRESULT D3D12_UpdateForWindowSizeChange(SDL_Renderer * renderer); - +static HRESULT D3D12_UpdateForWindowSizeChange(SDL_Renderer *renderer); HRESULT -D3D12_HandleDeviceLost(SDL_Renderer * renderer) +D3D12_HandleDeviceLost(SDL_Renderer *renderer) { HRESULT result = S_OK; @@ -1274,8 +1238,7 @@ D3D12_HandleDeviceLost(SDL_Renderer * renderer) } /* Initialize all resources that change when the window's size changes. */ -static HRESULT -D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer) +static HRESULT D3D12_CreateWindowSizeDependentResources(SDL_Renderer *renderer) { D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; HRESULT result = S_OK; @@ -1308,16 +1271,15 @@ D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer) if (data->swapChain) { /* If the swap chain already exists, resize it. */ result = D3D_CALL(data->swapChain, ResizeBuffers, - 0, - w, h, - DXGI_FORMAT_UNKNOWN, - data->swapFlags - ); + 0, + w, h, + DXGI_FORMAT_UNKNOWN, + data->swapFlags); if (result == DXGI_ERROR_DEVICE_REMOVED) { /* If the device was removed for any reason, a new device and swap chain will need to be created. */ D3D12_HandleDeviceLost(renderer); - /* Everything is set up now. Do not continue execution of this method. HandleDeviceLost will reenter this method + /* Everything is set up now. Do not continue execution of this method. HandleDeviceLost will reenter this method * and correctly set up the new device. */ goto done; @@ -1331,11 +1293,11 @@ D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer) goto done; } } - + /* Set the proper rotation for the swap chain. */ if (WIN_IsWindows8OrGreater()) { if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) { - result = D3D_CALL(data->swapChain, SetRotation, data->rotation); + result = D3D_CALL(data->swapChain, SetRotation, data->rotation); /* NOLINT(clang-analyzer-core.NullDereference) */ if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGISwapChain4::SetRotation"), result); goto done; @@ -1347,17 +1309,16 @@ D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer) /* Get each back buffer render target and create render target views */ for (i = 0; i < SDL_D3D12_NUM_BUFFERS; ++i) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) - result = D3D12_XBOX_CreateBackBufferTarget(data->d3dDevice, renderer->window->w, renderer->window->h, (void **) &data->renderTargets[i]); + result = D3D12_XBOX_CreateBackBufferTarget(data->d3dDevice, renderer->window->w, renderer->window->h, (void **)&data->renderTargets[i]); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("D3D12_XBOX_CreateBackBufferTarget"), result); goto done; } #else - result = D3D_CALL(data->swapChain, GetBuffer, - i, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **) &data->renderTargets[i] - ); + result = D3D_CALL(data->swapChain, GetBuffer, /* NOLINT(clang-analyzer-core.NullDereference) */ + i, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&data->renderTargets[i]); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGISwapChain4::GetBuffer"), result); goto done; @@ -1388,10 +1349,9 @@ D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer) data->currentRenderTargetView = D3D12_GetCurrentRenderTargetView(renderer); D3D_CALL(data->commandList, OMSetRenderTargets, 1, &data->currentRenderTargetView, FALSE, NULL); D3D12_TransitionResource(data, - data->renderTargets[data->currentBackBufferIndex], - D3D12_RESOURCE_STATE_PRESENT, - D3D12_RESOURCE_STATE_RENDER_TARGET - ); + data->renderTargets[data->currentBackBufferIndex], + D3D12_RESOURCE_STATE_PRESENT, + D3D12_RESOURCE_STATE_RENDER_TARGET); data->viewportDirty = SDL_TRUE; @@ -1404,25 +1364,22 @@ done: } /* This method is called when the window's size changes. */ -static HRESULT -D3D12_UpdateForWindowSizeChange(SDL_Renderer * renderer) +static HRESULT D3D12_UpdateForWindowSizeChange(SDL_Renderer *renderer) { - D3D12_RenderData* data = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; /* If the GPU has previous work, wait for it to be done first */ D3D12_WaitForGPU(data); return D3D12_CreateWindowSizeDependentResources(renderer); } -static void -D3D12_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void D3D12_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { D3D12_UpdateForWindowSizeChange(renderer); } } -static SDL_bool -D3D12_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool D3D12_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); @@ -1440,13 +1397,12 @@ D3D12_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) return SDL_TRUE; } -static SIZE_T -D3D12_GetAvailableSRVIndex(SDL_Renderer * renderer) +static SIZE_T D3D12_GetAvailableSRVIndex(SDL_Renderer *renderer) { - D3D12_RenderData* rendererData = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; if (rendererData->srvPoolHead) { SIZE_T index = rendererData->srvPoolHead->index; - rendererData->srvPoolHead = (D3D12_SRVPoolNode*)(rendererData->srvPoolHead->next); + rendererData->srvPoolHead = (D3D12_SRVPoolNode *)(rendererData->srvPoolHead->next); return index; } else { SDL_SetError("[d3d12] Cannot allocate more than %d textures!", SDL_D3D12_MAX_NUM_TEXTURES); @@ -1454,18 +1410,16 @@ D3D12_GetAvailableSRVIndex(SDL_Renderer * renderer) } } -static void -D3D12_FreeSRVIndex(SDL_Renderer * renderer, SIZE_T index) +static void D3D12_FreeSRVIndex(SDL_Renderer *renderer, SIZE_T index) { - D3D12_RenderData* rendererData = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; rendererData->srvPoolNodes[index].next = rendererData->srvPoolHead; rendererData->srvPoolHead = &rendererData->srvPoolNodes[index]; } -static int -D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData; HRESULT result; DXGI_FORMAT textureFormat = SDLPixelFormatToDXGIFormat(texture->format); @@ -1474,16 +1428,15 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) D3D12_SHADER_RESOURCE_VIEW_DESC resourceViewDesc; if (textureFormat == DXGI_FORMAT_UNKNOWN) { - return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", - __FUNCTION__, texture->format); + return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", __FUNCTION__, texture->format); } - textureData = (D3D12_TextureData*) SDL_calloc(1, sizeof(*textureData)); - if (!textureData) { + textureData = (D3D12_TextureData *)SDL_calloc(1, sizeof(*textureData)); + if (textureData == NULL) { SDL_OutOfMemory(); return -1; } - textureData->scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? D3D12_FILTER_MIN_MAG_MIP_POINT : D3D12_FILTER_MIN_MAG_MIP_LINEAR; + textureData->scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? D3D12_FILTER_MIN_MAG_MIP_POINT : D3D12_FILTER_MIN_MAG_MIP_LINEAR; texture->driverdata = textureData; textureData->mainTextureFormat = textureFormat; @@ -1509,14 +1462,13 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) heapProps.VisibleNodeMask = 1; result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &textureDesc, - D3D12_RESOURCE_STATE_COPY_DEST, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&textureData->mainTexture - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &textureDesc, + D3D12_RESOURCE_STATE_COPY_DEST, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&textureData->mainTexture); textureData->mainResourceState = D3D12_RESOURCE_STATE_COPY_DEST; if (FAILED(result)) { D3D12_DestroyTexture(renderer, texture); @@ -1531,14 +1483,13 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) textureDesc.Height = (textureDesc.Height + 1) / 2; result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &textureDesc, - D3D12_RESOURCE_STATE_COPY_DEST, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&textureData->mainTextureU - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &textureDesc, + D3D12_RESOURCE_STATE_COPY_DEST, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&textureData->mainTextureU); textureData->mainResourceStateU = D3D12_RESOURCE_STATE_COPY_DEST; if (FAILED(result)) { D3D12_DestroyTexture(renderer, texture); @@ -1546,14 +1497,13 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &textureDesc, - D3D12_RESOURCE_STATE_COPY_DEST, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&textureData->mainTextureV - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &textureDesc, + D3D12_RESOURCE_STATE_COPY_DEST, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&textureData->mainTextureV); textureData->mainResourceStateV = D3D12_RESOURCE_STATE_COPY_DEST; if (FAILED(result)) { D3D12_DestroyTexture(renderer, texture); @@ -1572,14 +1522,13 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) nvTextureDesc.Height = (textureDesc.Height + 1) / 2; result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &nvTextureDesc, - D3D12_RESOURCE_STATE_COPY_DEST, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&textureData->mainTextureNV - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &nvTextureDesc, + D3D12_RESOURCE_STATE_COPY_DEST, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&textureData->mainTextureNV); textureData->mainResourceStateNV = D3D12_RESOURCE_STATE_COPY_DEST; if (FAILED(result)) { D3D12_DestroyTexture(renderer, texture); @@ -1599,29 +1548,26 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) textureData->mainTextureResourceView.ptr += textureData->mainSRVIndex * rendererData->srvDescriptorSize; D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView, - textureData->mainTexture, - &resourceViewDesc, - textureData->mainTextureResourceView - ); + textureData->mainTexture, + &resourceViewDesc, + textureData->mainTextureResourceView); #if SDL_HAVE_YUV if (textureData->yuv) { D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceViewU); textureData->mainSRVIndexU = D3D12_GetAvailableSRVIndex(renderer); textureData->mainTextureResourceViewU.ptr += textureData->mainSRVIndexU * rendererData->srvDescriptorSize; D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView, - textureData->mainTextureU, - &resourceViewDesc, - textureData->mainTextureResourceViewU - ); + textureData->mainTextureU, + &resourceViewDesc, + textureData->mainTextureResourceViewU); D3D_CALL_RET(rendererData->srvDescriptorHeap, GetCPUDescriptorHandleForHeapStart, &textureData->mainTextureResourceViewV); textureData->mainSRVIndexV = D3D12_GetAvailableSRVIndex(renderer); textureData->mainTextureResourceViewV.ptr += textureData->mainSRVIndexV * rendererData->srvDescriptorSize; D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView, - textureData->mainTextureV, - &resourceViewDesc, - textureData->mainTextureResourceViewV - ); + textureData->mainTextureV, + &resourceViewDesc, + textureData->mainTextureResourceViewV); } if (textureData->nv12) { @@ -1633,10 +1579,9 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) textureData->mainSRVIndexNV = D3D12_GetAvailableSRVIndex(renderer); textureData->mainTextureResourceViewNV.ptr += textureData->mainSRVIndexNV * rendererData->srvDescriptorSize; D3D_CALL(rendererData->d3dDevice, CreateShaderResourceView, - textureData->mainTextureNV, - &nvResourceViewDesc, - textureData->mainTextureResourceViewNV - ); + textureData->mainTextureNV, + &nvResourceViewDesc, + textureData->mainTextureResourceViewNV); } #endif /* SDL_HAVE_YUV */ @@ -1651,22 +1596,21 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) textureData->mainTextureRenderTargetView.ptr += textureData->mainSRVIndex * rendererData->rtvDescriptorSize; D3D_CALL(rendererData->d3dDevice, CreateRenderTargetView, - (ID3D12Resource*)textureData->mainTexture, - &renderTargetViewDesc, - textureData->mainTextureRenderTargetView); + (ID3D12Resource *)textureData->mainTexture, + &renderTargetViewDesc, + textureData->mainTextureRenderTargetView); } return 0; } -static void -D3D12_DestroyTexture(SDL_Renderer * renderer, - SDL_Texture * texture) +static void D3D12_DestroyTexture(SDL_Renderer *renderer, + SDL_Texture *texture) { - D3D12_RenderData *rendererData = (D3D12_RenderData*)renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return; } @@ -1694,8 +1638,7 @@ D3D12_DestroyTexture(SDL_Renderer * renderer, texture->driverdata = NULL; } -static int -D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * texture, int bpp, int x, int y, int w, int h, const void *pixels, int pitch, D3D12_RESOURCE_STATES *resourceState) +static int D3D12_UpdateTextureInternal(D3D12_RenderData *rendererData, ID3D12Resource *texture, int bpp, int x, int y, int w, int h, const void *pixels, int pitch, D3D12_RESOURCE_STATES *resourceState) { const Uint8 *src; Uint8 *dst; @@ -1732,15 +1675,14 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te /* Figure out how much we need to allocate for the upload buffer */ D3D_CALL(rendererData->d3dDevice, GetCopyableFootprints, - &textureDesc, - 0, - 1, - 0, - NULL, - NULL, - NULL, - &uploadDesc.Width - ); + &textureDesc, + 0, + 1, + 0, + NULL, + NULL, + NULL, + &uploadDesc.Width); SDL_zero(heapProps); heapProps.Type = D3D12_HEAP_TYPE_UPLOAD; @@ -1749,14 +1691,13 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te /* Create the upload buffer */ result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &uploadDesc, - D3D12_RESOURCE_STATE_GENERIC_READ, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&rendererData->uploadBuffers[rendererData->currentUploadBuffer] - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &uploadDesc, + D3D12_RESOURCE_STATE_GENERIC_READ, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&rendererData->uploadBuffers[rendererData->currentUploadBuffer]); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateCommittedResource [create upload buffer]"), result); } @@ -1764,10 +1705,9 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te /* Get a write-only pointer to data in the upload buffer: */ uploadBuffer = rendererData->uploadBuffers[rendererData->currentUploadBuffer]; result = D3D_CALL(uploadBuffer, Map, - 0, - NULL, - (void **)&textureMemory - ); + 0, + NULL, + (void **)&textureMemory); if (FAILED(result)) { SAFE_RELEASE(rendererData->uploadBuffers[rendererData->currentUploadBuffer]); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Resource::Map [map staging texture]"), result); @@ -1788,7 +1728,7 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te dst = textureMemory; length = w * bpp; if (length == pitch && length == pitchedDesc.RowPitch) { - SDL_memcpy(dst, src, length*h); + SDL_memcpy(dst, src, (size_t)length * h); } else { if (length > (UINT)pitch) { length = pitch; @@ -1821,18 +1761,17 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te srcLocation.PlacedFootprint = placedTextureDesc; D3D_CALL(rendererData->commandList, CopyTextureRegion, - &dstLocation, - x, - y, - 0, - &srcLocation, - NULL - ); + &dstLocation, + x, + y, + 0, + &srcLocation, + NULL); /* Transition the texture to be shader accessible */ D3D12_TransitionResource(rendererData, texture, *resourceState, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); *resourceState = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; - + rendererData->currentUploadBuffer++; /* If we've used up all the upload buffers, we need to issue the batch */ if (rendererData->currentUploadBuffer == SDL_D3D12_NUM_UPLOAD_BUFFERS) { @@ -1842,15 +1781,14 @@ D3D12_UpdateTextureInternal(D3D12_RenderData * rendererData, ID3D12Resource * te return 0; } -static int -D3D12_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void * srcPixels, - int srcPitch) +static int D3D12_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *srcPixels, + int srcPitch) { D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1860,14 +1798,14 @@ D3D12_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, #if SDL_HAVE_YUV if (textureData->yuv) { /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + rect->h * srcPitch); + srcPixels = (const void *)((const Uint8 *)srcPixels + rect->h * srcPitch); if (D3D12_UpdateTextureInternal(rendererData, texture->format == SDL_PIXELFORMAT_YV12 ? textureData->mainTextureV : textureData->mainTextureU, SDL_BYTESPERPIXEL(texture->format), rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, srcPixels, (srcPitch + 1) / 2, texture->format == SDL_PIXELFORMAT_YV12 ? &textureData->mainResourceStateV : &textureData->mainResourceStateU) < 0) { return -1; } /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + ((rect->h + 1) / 2) * ((srcPitch + 1) / 2)); + srcPixels = (const void *)((const Uint8 *)srcPixels + ((rect->h + 1) / 2) * ((srcPitch + 1) / 2)); if (D3D12_UpdateTextureInternal(rendererData, texture->format == SDL_PIXELFORMAT_YV12 ? textureData->mainTextureU : textureData->mainTextureV, SDL_BYTESPERPIXEL(texture->format), rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2, srcPixels, (srcPitch + 1) / 2, texture->format == SDL_PIXELFORMAT_YV12 ? &textureData->mainResourceStateU : &textureData->mainResourceStateV) < 0) { return -1; } @@ -1875,9 +1813,9 @@ D3D12_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, if (textureData->nv12) { /* Skip to the correct offset into the next texture */ - srcPixels = (const void*)((const Uint8*)srcPixels + rect->h * srcPitch); + srcPixels = (const void *)((const Uint8 *)srcPixels + rect->h * srcPitch); - if (D3D12_UpdateTextureInternal(rendererData, textureData->mainTextureNV, 2, rect->x / 2, rect->y / 2, ((rect->w + 1) / 2), (rect->h + 1) / 2, srcPixels, 2*((srcPitch + 1) / 2), &textureData->mainResourceStateNV) < 0) { + if (D3D12_UpdateTextureInternal(rendererData, textureData->mainTextureNV, 2, rect->x / 2, rect->y / 2, ((rect->w + 1) / 2), (rect->h + 1) / 2, srcPixels, 2 * ((srcPitch + 1) / 2), &textureData->mainResourceStateNV) < 0) { return -1; } } @@ -1886,17 +1824,16 @@ D3D12_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, } #if SDL_HAVE_YUV -static int -D3D12_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int D3D12_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1912,16 +1849,15 @@ D3D12_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static int -D3D12_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int D3D12_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } @@ -1936,12 +1872,11 @@ D3D12_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, } #endif -static int -D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int D3D12_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; - D3D12_TextureData *textureData = (D3D12_TextureData *) texture->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; + D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; HRESULT result = S_OK; D3D12_RESOURCE_DESC textureDesc; @@ -1951,7 +1886,7 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, BYTE *textureMemory; int bpp; - if (!textureData) { + if (textureData == NULL) { return SDL_SetError("Texture is not currently available"); } #if SDL_HAVE_YUV @@ -1966,8 +1901,8 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, } textureData->lockedRect = *rect; *pixels = - (void *)((Uint8 *)textureData->pixels + rect->y * textureData->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(textureData->pixels + rect->y * textureData->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = textureData->pitch; return 0; } @@ -1975,7 +1910,7 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, if (textureData->stagingBuffer) { return SDL_SetError("texture is already locked"); } - + /* Create an upload buffer, which will be used to write to the main texture. */ SDL_zero(textureDesc); D3D_CALL_RET(textureData->mainTexture, GetDesc, &textureDesc); @@ -1996,15 +1931,14 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, /* Figure out how much we need to allocate for the upload buffer */ D3D_CALL(rendererData->d3dDevice, GetCopyableFootprints, - &textureDesc, - 0, - 1, - 0, - NULL, - NULL, - NULL, - &uploadDesc.Width - ); + &textureDesc, + 0, + 1, + 0, + NULL, + NULL, + NULL, + &uploadDesc.Width); SDL_zero(heapProps); heapProps.Type = D3D12_HEAP_TYPE_UPLOAD; @@ -2013,24 +1947,22 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, /* Create the upload buffer */ result = D3D_CALL(rendererData->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &uploadDesc, - D3D12_RESOURCE_STATE_GENERIC_READ, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&textureData->stagingBuffer - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &uploadDesc, + D3D12_RESOURCE_STATE_GENERIC_READ, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&textureData->stagingBuffer); if (FAILED(result)) { return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateCommittedResource [create upload buffer]"), result); } /* Get a write-only pointer to data in the upload buffer: */ result = D3D_CALL(textureData->stagingBuffer, Map, - 0, - NULL, - (void **)&textureMemory - ); + 0, + NULL, + (void **)&textureMemory); if (FAILED(result)) { SAFE_RELEASE(rendererData->uploadBuffers[rendererData->currentUploadBuffer]); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Resource::Map [map staging texture]"), result); @@ -2043,13 +1975,12 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, pitchedDesc.Depth = 1; if (pitchedDesc.Format == DXGI_FORMAT_R8_UNORM) { bpp = 1; - } - else { + } else { bpp = 4; } pitchedDesc.RowPitch = D3D12_Align(rect->w * bpp, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - /* Make note of where the staging texture will be written to + /* Make note of where the staging texture will be written to * (on a call to SDL_UnlockTexture): */ textureData->lockedRect = *rect; @@ -2062,11 +1993,10 @@ D3D12_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static void -D3D12_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void D3D12_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; - D3D12_TextureData *textureData = (D3D12_TextureData *) texture->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; + D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; D3D12_RESOURCE_DESC textureDesc; D3D12_SUBRESOURCE_FOOTPRINT pitchedDesc; @@ -2074,16 +2004,16 @@ D3D12_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) D3D12_TEXTURE_COPY_LOCATION srcLocation; D3D12_TEXTURE_COPY_LOCATION dstLocation; int bpp; - - if (!textureData) { + + if (textureData == NULL) { return; } #if SDL_HAVE_YUV if (textureData->yuv || textureData->nv12) { const SDL_Rect *rect = &textureData->lockedRect; void *pixels = - (void *) ((Uint8 *) textureData->pixels + rect->y * textureData->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)(textureData->pixels + rect->y * textureData->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); D3D12_UpdateTexture(renderer, texture, rect, pixels, textureData->pitch); return; } @@ -2103,8 +2033,7 @@ D3D12_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) pitchedDesc.Depth = 1; if (pitchedDesc.Format == DXGI_FORMAT_R8_UNORM) { bpp = 1; - } - else { + } else { bpp = 4; } pitchedDesc.RowPitch = D3D12_Align(textureData->lockedRect.w * bpp, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); @@ -2127,13 +2056,12 @@ D3D12_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) srcLocation.PlacedFootprint = placedTextureDesc; D3D_CALL(rendererData->commandList, CopyTextureRegion, - &dstLocation, - textureData->lockedRect.x, - textureData->lockedRect.y, - 0, - &srcLocation, - NULL - ); + &dstLocation, + textureData->lockedRect.x, + textureData->lockedRect.y, + 0, + &srcLocation, + NULL); /* Transition the texture to be shader accessible */ D3D12_TransitionResource(rendererData, textureData->mainTexture, textureData->mainResourceState, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); @@ -2144,38 +2072,35 @@ D3D12_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) SAFE_RELEASE(textureData->stagingBuffer); } -static void -D3D12_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void D3D12_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - D3D12_TextureData *textureData = (D3D12_TextureData *) texture->driverdata; - - if (!textureData) { + D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; + + if (textureData == NULL) { return; } - textureData->scaleMode = (scaleMode == SDL_ScaleModeNearest) ? D3D12_FILTER_MIN_MAG_MIP_POINT : D3D12_FILTER_MIN_MAG_MIP_LINEAR; + textureData->scaleMode = (scaleMode == SDL_ScaleModeNearest) ? D3D12_FILTER_MIN_MAG_MIP_POINT : D3D12_FILTER_MIN_MAG_MIP_LINEAR; } -static int -D3D12_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int D3D12_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; D3D12_TextureData *textureData = NULL; if (texture == NULL) { if (rendererData->textureRenderTarget) { D3D12_TransitionResource(rendererData, - rendererData->textureRenderTarget->mainTexture, - rendererData->textureRenderTarget->mainResourceState, - D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE - ); + rendererData->textureRenderTarget->mainTexture, + rendererData->textureRenderTarget->mainResourceState, + D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); rendererData->textureRenderTarget->mainResourceState = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; } rendererData->textureRenderTarget = NULL; return 0; } - textureData = (D3D12_TextureData *) texture->driverdata; + textureData = (D3D12_TextureData *)texture->driverdata; if (!textureData->mainTextureRenderTargetView.ptr) { return SDL_SetError("specified texture is not a render target"); @@ -2183,26 +2108,22 @@ D3D12_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) rendererData->textureRenderTarget = textureData; D3D12_TransitionResource(rendererData, - rendererData->textureRenderTarget->mainTexture, - rendererData->textureRenderTarget->mainResourceState, - D3D12_RESOURCE_STATE_RENDER_TARGET - ); + rendererData->textureRenderTarget->mainTexture, + rendererData->textureRenderTarget->mainResourceState, + D3D12_RESOURCE_STATE_RENDER_TARGET); rendererData->textureRenderTarget->mainResourceState = D3D12_RESOURCE_STATE_RENDER_TARGET; - return 0; } -static int -D3D12_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int D3D12_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -D3D12_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int D3D12_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertexPositionColor), 0, &cmd->data.draw.first); + VertexPositionColor *verts = (VertexPositionColor *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertexPositionColor), 0, &cmd->data.draw.first); int i; SDL_Color color; color.r = cmd->data.draw.r; @@ -2210,7 +2131,7 @@ D3D12_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL color.b = cmd->data.draw.b; color.a = cmd->data.draw.a; - if (!verts) { + if (verts == NULL) { return -1; } @@ -2228,17 +2149,16 @@ D3D12_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL return 0; } -static int -D3D12_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int D3D12_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; - VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertexPositionColor), 0, &cmd->data.draw.first); + VertexPositionColor *verts = (VertexPositionColor *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertexPositionColor), 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } @@ -2258,14 +2178,14 @@ D3D12_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); + xy_ = (float *)((char *)xy + j * xy_stride); verts->pos.x = xy_[0] * scale_x; verts->pos.y = xy_[1] * scale_y; - verts->color = *(SDL_Color*)((char*)color + j * color_stride); + verts->color = *(SDL_Color *)((char *)color + j * color_stride); if (texture) { - float *uv_ = (float *)((char*)uv + j * uv_stride); + float *uv_ = (float *)((char *)uv + j * uv_stride); verts->tex.x = uv_[0]; verts->tex.y = uv_[1]; } else { @@ -2275,25 +2195,24 @@ D3D12_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture verts += 1; } - return 0; + return 0; } -static int -D3D12_UpdateVertexBuffer(SDL_Renderer *renderer, - const void * vertexData, size_t dataSizeInBytes) +static int D3D12_UpdateVertexBuffer(SDL_Renderer *renderer, + const void *vertexData, size_t dataSizeInBytes) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; HRESULT result = S_OK; const int vbidx = rendererData->currentVertexBuffer; - UINT8* vertexBufferData = NULL; + UINT8 *vertexBufferData = NULL; D3D12_RANGE range; ID3D12Resource *vertexBuffer; range.Begin = 0; range.End = 0; - + if (dataSizeInBytes == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } if (rendererData->issueBatch) { @@ -2329,10 +2248,9 @@ D3D12_UpdateVertexBuffer(SDL_Renderer *renderer, return S_OK; } -static int -D3D12_UpdateViewport(SDL_Renderer * renderer) +static int D3D12_UpdateViewport(SDL_Renderer *renderer) { - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; const SDL_Rect *viewport = &data->currentViewport; Float4X4 projection; Float4X4 view; @@ -2386,25 +2304,25 @@ D3D12_UpdateViewport(SDL_Renderer * renderer) * for eventual transfer to the GPU. */ data->vertexShaderConstantsData.projectionAndView = MatrixMultiply( - view, - projection); + view, + projection); /* Update the Direct3D viewport, which seems to be aligned to the * swap buffer's coordinate space, which is always in either * a landscape mode, for all Windows 8/RT devices, or a portrait mode, * for Windows Phone devices. */ - swapDimensions = D3D12_IsDisplayRotated90Degrees((DXGI_MODE_ROTATION) rotation); + swapDimensions = D3D12_IsDisplayRotated90Degrees((DXGI_MODE_ROTATION)rotation); if (swapDimensions) { - orientationAlignedViewport.x = (float) viewport->y; - orientationAlignedViewport.y = (float) viewport->x; - orientationAlignedViewport.w = (float) viewport->h; - orientationAlignedViewport.h = (float) viewport->w; + orientationAlignedViewport.x = (float)viewport->y; + orientationAlignedViewport.y = (float)viewport->x; + orientationAlignedViewport.w = (float)viewport->h; + orientationAlignedViewport.h = (float)viewport->w; } else { - orientationAlignedViewport.x = (float) viewport->x; - orientationAlignedViewport.y = (float) viewport->y; - orientationAlignedViewport.w = (float) viewport->w; - orientationAlignedViewport.h = (float) viewport->h; + orientationAlignedViewport.x = (float)viewport->x; + orientationAlignedViewport.y = (float)viewport->y; + orientationAlignedViewport.w = (float)viewport->w; + orientationAlignedViewport.h = (float)viewport->h; } d3dviewport.TopLeftX = orientationAlignedViewport.x; @@ -2421,11 +2339,10 @@ D3D12_UpdateViewport(SDL_Renderer * renderer) return 0; } -static int -D3D12_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, D3D12_Shader shader, - D3D12_PRIMITIVE_TOPOLOGY_TYPE topology, - const int numShaderResources, D3D12_CPU_DESCRIPTOR_HANDLE * shaderResources, - D3D12_CPU_DESCRIPTOR_HANDLE * sampler, const Float4X4 *matrix) +static int D3D12_SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, D3D12_Shader shader, + D3D12_PRIMITIVE_TOPOLOGY_TYPE topology, + const int numShaderResources, D3D12_CPU_DESCRIPTOR_HANDLE *shaderResources, + D3D12_CPU_DESCRIPTOR_HANDLE *sampler, const Float4X4 *matrix) { D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; @@ -2447,7 +2364,7 @@ D3D12_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, D3D12_ rendererData->currentPipelineState->blendMode != blendMode || rendererData->currentPipelineState->topology != topology || rendererData->currentPipelineState->rtvFormat != rtvFormat) { - + /* Find the matching pipeline. NOTE: Although it may seem inefficient to linearly search through ~450 pipelines to find the correct one, in profiling this doesn't come up at all. @@ -2456,7 +2373,7 @@ D3D12_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, D3D12_ */ rendererData->currentPipelineState = NULL; for (i = 0; i < rendererData->pipelineStateCount; ++i) { - D3D12_PipelineState* candidatePiplineState = &rendererData->pipelineStates[i]; + D3D12_PipelineState *candidatePiplineState = &rendererData->pipelineStates[i]; if (candidatePiplineState->shader == shader && candidatePiplineState->blendMode == blendMode && candidatePiplineState->topology == topology && @@ -2477,7 +2394,7 @@ D3D12_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, D3D12_ D3D_CALL(rendererData->commandList, SetPipelineState, rendererData->currentPipelineState->pipelineState); D3D_CALL(rendererData->commandList, SetGraphicsRootSignature, - rendererData->rootSignatures[D3D12_GetRootSignatureType(rendererData->currentPipelineState->shader)]); + rendererData->rootSignatures[D3D12_GetRootSignatureType(rendererData->currentPipelineState->shader)]); /* When we change these we will need to re-upload the constant buffer and reset any descriptors */ updateSubresource = SDL_TRUE; rendererData->currentSampler.ptr = 0; @@ -2525,52 +2442,50 @@ D3D12_SetDrawState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, D3D12_ /* Figure out the correct sampler descriptor table index based on the type of shader */ switch (shader) { - case SHADER_RGB: - tableIndex = 2; - break; + case SHADER_RGB: + tableIndex = 2; + break; #if SDL_HAVE_YUV - case SHADER_YUV_JPEG: - case SHADER_YUV_BT601: - case SHADER_YUV_BT709: - tableIndex = 4; - break; - case SHADER_NV12_JPEG: - case SHADER_NV12_BT601: - case SHADER_NV12_BT709: - case SHADER_NV21_JPEG: - case SHADER_NV21_BT601: - case SHADER_NV21_BT709: - tableIndex = 3; - break; + case SHADER_YUV_JPEG: + case SHADER_YUV_BT601: + case SHADER_YUV_BT709: + tableIndex = 4; + break; + case SHADER_NV12_JPEG: + case SHADER_NV12_BT601: + case SHADER_NV12_BT709: + case SHADER_NV21_JPEG: + case SHADER_NV21_BT601: + case SHADER_NV21_BT709: + tableIndex = 3; + break; #endif - default: - return SDL_SetError("[direct3d12] Trying to set a sampler for a shader which doesn't have one"); - break; + default: + return SDL_SetError("[direct3d12] Trying to set a sampler for a shader which doesn't have one"); + break; } D3D_CALL(rendererData->commandList, SetGraphicsRootDescriptorTable, tableIndex, GPUHandle); rendererData->currentSampler = *sampler; } - if (updateSubresource == SDL_TRUE || SDL_memcmp(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof (*newmatrix)) != 0) { - SDL_memcpy(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof (*newmatrix)); + if (updateSubresource == SDL_TRUE || SDL_memcmp(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof(*newmatrix)) != 0) { + SDL_memcpy(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof(*newmatrix)); D3D_CALL(rendererData->commandList, SetGraphicsRoot32BitConstants, - 0, - 32, - &rendererData->vertexShaderConstantsData, - 0 - ); + 0, + 32, + &rendererData->vertexShaderConstantsData, + 0); } return 0; } -static int -D3D12_SetCopyState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, const Float4X4 *matrix) +static int D3D12_SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const Float4X4 *matrix) { SDL_Texture *texture = cmd->data.draw.texture; - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; - D3D12_TextureData *textureData = (D3D12_TextureData *) texture->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; + D3D12_TextureData *textureData = (D3D12_TextureData *)texture->driverdata; D3D12_CPU_DESCRIPTOR_HANDLE *textureSampler; switch (textureData->scaleMode) { @@ -2614,8 +2529,8 @@ D3D12_SetCopyState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, const D3D12_TransitionResource(rendererData, textureData->mainTextureV, textureData->mainResourceStateV, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); textureData->mainResourceStateV = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; - return D3D12_SetDrawState(renderer, cmd, shader, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, - SDL_arraysize(shaderResources), shaderResources, textureSampler, matrix); + return D3D12_SetDrawState(renderer, cmd, shader, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, SDL_arraysize(shaderResources), shaderResources, + textureSampler, matrix); } else if (textureData->nv12) { D3D12_CPU_DESCRIPTOR_HANDLE shaderResources[] = { textureData->mainTextureResourceView, @@ -2643,28 +2558,26 @@ D3D12_SetCopyState(SDL_Renderer * renderer, const SDL_RenderCommand *cmd, const D3D12_TransitionResource(rendererData, textureData->mainTextureNV, textureData->mainResourceStateNV, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); textureData->mainResourceStateNV = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; - return D3D12_SetDrawState(renderer, cmd, shader, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, - SDL_arraysize(shaderResources), shaderResources, textureSampler, matrix); + return D3D12_SetDrawState(renderer, cmd, shader, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, SDL_arraysize(shaderResources), shaderResources, + textureSampler, matrix); } #endif /* SDL_HAVE_YUV */ D3D12_TransitionResource(rendererData, textureData->mainTexture, textureData->mainResourceState, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); textureData->mainResourceState = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; - return D3D12_SetDrawState(renderer, cmd, SHADER_RGB, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, - 1, &textureData->mainTextureResourceView, textureSampler, matrix); + return D3D12_SetDrawState(renderer, cmd, SHADER_RGB, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, 1, &textureData->mainTextureResourceView, + textureSampler, matrix); } -static void -D3D12_DrawPrimitives(SDL_Renderer * renderer, D3D12_PRIMITIVE_TOPOLOGY primitiveTopology, const size_t vertexStart, const size_t vertexCount) +static void D3D12_DrawPrimitives(SDL_Renderer *renderer, D3D12_PRIMITIVE_TOPOLOGY primitiveTopology, const size_t vertexStart, const size_t vertexCount) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; - D3D_CALL(rendererData->commandList, IASetPrimitiveTopology, primitiveTopology); - D3D_CALL(rendererData->commandList, DrawInstanced, (UINT)vertexCount, 1, (UINT)vertexStart, 0); + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; + D3D_CALL(rendererData->commandList, IASetPrimitiveTopology, primitiveTopology); + D3D_CALL(rendererData->commandList, DrawInstanced, (UINT)vertexCount, 1, (UINT)vertexStart, 0); } -static int -D3D12_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int D3D12_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - D3D12_RenderData *rendererData = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *rendererData = (D3D12_RenderData *)renderer->driverdata; const int viewportRotation = D3D12_GetRotationForCurrentRenderTarget(renderer); if (rendererData->currentViewportRotation != viewportRotation) { @@ -2678,99 +2591,111 @@ D3D12_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; /* this isn't currently used in this render backend. */ - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; /* this isn't currently used in this render backend. */ + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &rendererData->currentViewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - rendererData->viewportDirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &rendererData->currentViewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + rendererData->viewportDirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (rendererData->currentCliprectEnabled != cmd->data.cliprect.enabled) { - rendererData->currentCliprectEnabled = cmd->data.cliprect.enabled; - rendererData->cliprectDirty = SDL_TRUE; - } - if (!rendererData->currentCliprectEnabled) { - /* If the clip rect is disabled, then the scissor rect should be the whole viewport, - since direct3d12 doesn't allow disabling the scissor rectangle */ - rect = &rendererData->currentViewport; - } - if (SDL_memcmp(&rendererData->currentCliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&rendererData->currentCliprect, rect); - rendererData->cliprectDirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + SDL_Rect viewport_cliprect; + if (rendererData->currentCliprectEnabled != cmd->data.cliprect.enabled) { + rendererData->currentCliprectEnabled = cmd->data.cliprect.enabled; + rendererData->cliprectDirty = SDL_TRUE; } - - case SDL_RENDERCMD_CLEAR: { - const float colorRGBA[] = { - (cmd->data.color.r / 255.0f), - (cmd->data.color.g / 255.0f), - (cmd->data.color.b / 255.0f), - (cmd->data.color.a / 255.0f) - }; - - D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = D3D12_GetCurrentRenderTargetView(renderer); - D3D_CALL(rendererData->commandList, ClearRenderTargetView, rtvDescriptor, colorRGBA, 0, NULL); - break; + if (!rendererData->currentCliprectEnabled) { + /* If the clip rect is disabled, then the scissor rect should be the whole viewport, + since direct3d12 doesn't allow disabling the scissor rectangle */ + viewport_cliprect.x = 0; + viewport_cliprect.y = 0; + viewport_cliprect.w = rendererData->currentViewport.w; + viewport_cliprect.h = rendererData->currentViewport.h; + rect = &viewport_cliprect; } - - case SDL_RENDERCMD_DRAW_POINTS: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); - D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT, 0, NULL, NULL, NULL); - D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_POINTLIST, start, count); - break; + if (SDL_memcmp(&rendererData->currentCliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&rendererData->currentCliprect, rect); + rendererData->cliprectDirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_DRAW_LINES: { - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); - const VertexPositionColor *verts = (VertexPositionColor *) (((Uint8 *) vertices) + first); - D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE, 0, NULL, NULL, NULL); - D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, start, count); - if (verts[0].pos.x != verts[count - 1].pos.x || verts[0].pos.y != verts[count - 1].pos.y) { - D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_POINTLIST, start + (count-1), 1); - } - break; - } + case SDL_RENDERCMD_CLEAR: + { + const float colorRGBA[] = { + (cmd->data.color.r / 255.0f), + (cmd->data.color.g / 255.0f), + (cmd->data.color.b / 255.0f), + (cmd->data.color.a / 255.0f) + }; + + D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = D3D12_GetCurrentRenderTargetView(renderer); + D3D_CALL(rendererData->commandList, ClearRenderTargetView, rtvDescriptor, colorRGBA, 0, NULL); + break; + } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + case SDL_RENDERCMD_DRAW_POINTS: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); + D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT, 0, NULL, NULL, NULL); + D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_POINTLIST, start, count); + break; + } - case SDL_RENDERCMD_COPY: /* unused */ - break; + case SDL_RENDERCMD_DRAW_LINES: + { + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); + const VertexPositionColor *verts = (VertexPositionColor *)(((Uint8 *)vertices) + first); + D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE, 0, NULL, NULL, NULL); + D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, start, count); + if (verts[0].pos.x != verts[count - 1].pos.x || verts[0].pos.y != verts[count - 1].pos.y) { + D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_POINTLIST, start + (count - 1), 1); + } + break; + } - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - case SDL_RENDERCMD_GEOMETRY: { - SDL_Texture *texture = cmd->data.draw.texture; - const size_t count = cmd->data.draw.count; - const size_t first = cmd->data.draw.first; - const size_t start = first / sizeof (VertexPositionColor); + case SDL_RENDERCMD_COPY: /* unused */ + break; - if (texture) { - D3D12_SetCopyState(renderer, cmd, NULL); - } else { - D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, 0, NULL, NULL, NULL); - } + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, start, count); - break; + case SDL_RENDERCMD_GEOMETRY: + { + SDL_Texture *texture = cmd->data.draw.texture; + const size_t count = cmd->data.draw.count; + const size_t first = cmd->data.draw.first; + const size_t start = first / sizeof(VertexPositionColor); + + if (texture) { + D3D12_SetCopyState(renderer, cmd, NULL); + } else { + D3D12_SetDrawState(renderer, cmd, SHADER_SOLID, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, 0, NULL, NULL, NULL); } - case SDL_RENDERCMD_NO_OP: - break; + D3D12_DrawPrimitives(renderer, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, start, count); + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -2779,11 +2704,10 @@ D3D12_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver return 0; } -static int -D3D12_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +static int D3D12_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { - D3D12_RenderData * data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; ID3D12Resource *backBuffer = NULL; ID3D12Resource *readbackBuffer = NULL; HRESULT result; @@ -2791,7 +2715,7 @@ D3D12_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, D3D12_RESOURCE_DESC textureDesc; D3D12_RESOURCE_DESC readbackDesc; D3D12_HEAP_PROPERTIES heapProps; - D3D12_RECT srcRect = {0, 0, 0, 0}; + D3D12_RECT srcRect = { 0, 0, 0, 0 }; D3D12_BOX srcBox; D3D12_TEXTURE_COPY_LOCATION dstLocation; D3D12_TEXTURE_COPY_LOCATION srcLocation; @@ -2826,30 +2750,28 @@ D3D12_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, /* Figure out how much we need to allocate for the upload buffer */ D3D_CALL(data->d3dDevice, GetCopyableFootprints, - &textureDesc, - 0, - 1, - 0, - NULL, - NULL, - NULL, - &readbackDesc.Width - ); - + &textureDesc, + 0, + 1, + 0, + NULL, + NULL, + NULL, + &readbackDesc.Width); + SDL_zero(heapProps); heapProps.Type = D3D12_HEAP_TYPE_READBACK; heapProps.CreationNodeMask = 1; heapProps.VisibleNodeMask = 1; result = D3D_CALL(data->d3dDevice, CreateCommittedResource, - &heapProps, - D3D12_HEAP_FLAG_NONE, - &readbackDesc, - D3D12_RESOURCE_STATE_COPY_DEST, - NULL, - D3D_GUID(SDL_IID_ID3D12Resource), - (void **)&readbackBuffer - ); + &heapProps, + D3D12_HEAP_FLAG_NONE, + &readbackDesc, + D3D12_RESOURCE_STATE_COPY_DEST, + NULL, + D3D_GUID(SDL_IID_ID3D12Resource), + (void **)&readbackBuffer); if (FAILED(result)) { WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Device::CreateTexture2D [create staging texture]"), result); goto done; @@ -2898,24 +2820,22 @@ D3D12_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, srcLocation.SubresourceIndex = 0; D3D_CALL(data->commandList, CopyTextureRegion, - &dstLocation, - 0, 0, 0, - &srcLocation, - &srcBox - ); + &dstLocation, + 0, 0, 0, + &srcLocation, + &srcBox); /* We need to issue the command list for the copy to finish */ D3D12_IssueBatch(data); /* Transition the render target back to a render target */ - D3D12_TransitionResource(data, backBuffer, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET ); + D3D12_TransitionResource(data, backBuffer, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); /* Map the staging texture's data to CPU-accessible memory: */ result = D3D_CALL(readbackBuffer, Map, - 0, - NULL, - (void **)&textureMemory - ); + 0, + NULL, + (void **)&textureMemory); if (FAILED(result)) { SAFE_RELEASE(readbackBuffer); return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Resource::Map [map staging texture]"), result); @@ -2941,10 +2861,9 @@ done: return status; } -static int -D3D12_RenderPresent(SDL_Renderer * renderer) +static int D3D12_RenderPresent(SDL_Renderer *renderer) { - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) UINT syncInterval; UINT presentFlags; @@ -2953,14 +2872,13 @@ D3D12_RenderPresent(SDL_Renderer * renderer) /* Transition the render target to present state */ D3D12_TransitionResource(data, - data->renderTargets[data->currentBackBufferIndex], - D3D12_RESOURCE_STATE_RENDER_TARGET, - D3D12_RESOURCE_STATE_PRESENT - ); + data->renderTargets[data->currentBackBufferIndex], + D3D12_RESOURCE_STATE_RENDER_TARGET, + D3D12_RESOURCE_STATE_PRESENT); /* Issue the command list */ result = D3D_CALL(data->commandList, Close); - D3D_CALL(data->commandQueue, ExecuteCommandLists, 1, (ID3D12CommandList * const *)&data->commandList); + D3D_CALL(data->commandQueue, ExecuteCommandLists, 1, (ID3D12CommandList *const *)&data->commandList); #if defined(__XBOXONE__) || defined(__XBOXSERIES__) result = D3D12_XBOX_PresentFrame(data->commandQueue, data->frameToken, data->renderTargets[data->currentBackBufferIndex]); @@ -2980,10 +2898,10 @@ D3D12_RenderPresent(SDL_Renderer * renderer) #endif if (FAILED(result) && result != DXGI_ERROR_WAS_STILL_DRAWING) { - /* If the device was removed either by a disconnect or a driver upgrade, we + /* If the device was removed either by a disconnect or a driver upgrade, we * must recreate all device resources. */ - if ( result == DXGI_ERROR_DEVICE_REMOVED ) { + if (result == DXGI_ERROR_DEVICE_REMOVED) { D3D12_HandleDeviceLost(renderer); } else if (result == DXGI_ERROR_INVALID_CALL) { /* We probably went through a fullscreen <-> windowed transition */ @@ -2998,9 +2916,8 @@ D3D12_RenderPresent(SDL_Renderer * renderer) if (D3D_CALL(data->fence, GetCompletedValue) < data->fenceValue) { result = D3D_CALL(data->fence, SetEventOnCompletion, - data->fenceValue, - data->fenceEvent - ); + data->fenceValue, + data->fenceEvent); WaitForSingleObjectEx(data->fenceEvent, INFINITE, FALSE); } @@ -3015,10 +2932,9 @@ D3D12_RenderPresent(SDL_Renderer * renderer) /* Reset the command allocator and command list, and transition back to render target */ D3D12_ResetCommandList(data); D3D12_TransitionResource(data, - data->renderTargets[data->currentBackBufferIndex], - D3D12_RESOURCE_STATE_PRESENT, - D3D12_RESOURCE_STATE_RENDER_TARGET - ); + data->renderTargets[data->currentBackBufferIndex], + D3D12_RESOURCE_STATE_PRESENT, + D3D12_RESOURCE_STATE_RENDER_TARGET); #if defined(__XBOXONE__) || defined(__XBOXSERIES__) D3D12_XBOX_StartFrame(data->d3dDevice, &data->frameToken); @@ -3027,8 +2943,7 @@ D3D12_RenderPresent(SDL_Renderer * renderer) } } -static int -D3D12_SetVSync(SDL_Renderer * renderer, const int vsync) +static int D3D12_SetVSync(SDL_Renderer *renderer, const int vsync) { if (vsync) { renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; @@ -3038,20 +2953,19 @@ D3D12_SetVSync(SDL_Renderer * renderer, const int vsync) return 0; } -SDL_Renderer * -D3D12_CreateRenderer(SDL_Window * window, Uint32 flags) +SDL_Renderer *D3D12_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; D3D12_RenderData *data; - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (D3D12_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (D3D12_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); return NULL; @@ -3073,9 +2987,9 @@ D3D12_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = D3D12_SetTextureScaleMode; renderer->SetRenderTarget = D3D12_SetRenderTarget; renderer->QueueSetViewport = D3D12_QueueSetViewport; - renderer->QueueSetDrawColor = D3D12_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = D3D12_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = D3D12_QueueDrawPoints; - renderer->QueueDrawLines = D3D12_QueueDrawPoints; /* lines and points queue vertices the same way. */ + renderer->QueueDrawLines = D3D12_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = D3D12_QueueGeometry; renderer->RunCommandQueue = D3D12_RunCommandQueue; renderer->RenderReadPixels = D3D12_RenderReadPixels; @@ -3086,7 +3000,7 @@ D3D12_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE); renderer->driverdata = data; - if ((flags & SDL_RENDERER_PRESENTVSYNC)) { + if (flags & SDL_RENDERER_PRESENTVSYNC) { renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; } renderer->SetVSync = D3D12_SetVSync; @@ -3116,19 +3030,17 @@ SDL_RenderDriver D3D12_RenderDriver = { ( SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | - SDL_RENDERER_TARGETTEXTURE - ), /* flags. see SDL_RendererFlags */ - 6, /* num_texture_formats */ - { /* texture_formats */ - SDL_PIXELFORMAT_ARGB8888, - SDL_PIXELFORMAT_RGB888, - SDL_PIXELFORMAT_YV12, - SDL_PIXELFORMAT_IYUV, - SDL_PIXELFORMAT_NV12, - SDL_PIXELFORMAT_NV21 - }, - 16384, /* max_texture_width */ - 16384 /* max_texture_height */ + SDL_RENDERER_TARGETTEXTURE), /* flags. see SDL_RendererFlags */ + 6, /* num_texture_formats */ + { /* texture_formats */ + SDL_PIXELFORMAT_ARGB8888, + SDL_PIXELFORMAT_RGB888, + SDL_PIXELFORMAT_YV12, + SDL_PIXELFORMAT_IYUV, + SDL_PIXELFORMAT_NV12, + SDL_PIXELFORMAT_NV21 }, + 16384, /* max_texture_width */ + 16384 /* max_texture_height */ } }; @@ -3143,14 +3055,14 @@ SDL_RenderDriver D3D12_RenderDriver = { #ifdef __cplusplus extern "C" #endif -/* This function needs to always exist on Windows, for the Dynamic API. */ -ID3D12Device * -SDL_RenderGetD3D12Device(SDL_Renderer * renderer) + /* This function needs to always exist on Windows, for the Dynamic API. */ + ID3D12Device * + SDL_RenderGetD3D12Device(SDL_Renderer *renderer) { ID3D12Device *device = NULL; #if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED - D3D12_RenderData *data = (D3D12_RenderData *) renderer->driverdata; + D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata; /* Make sure that this is a D3D renderer */ if (renderer->DestroyRenderer != D3D12_DestroyRenderer) { diff --git a/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.c b/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.c index a0764f9..3b13272 100644 --- a/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.c +++ b/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.c @@ -31,7 +31,6 @@ #define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str - /* Direct3D 12 shaders SDL's shaders are compiled into SDL itself, to simplify distribution. @@ -51,7 +50,7 @@ Shader types: - ps_6_0: Pixel shader - vs_6_0: Vertex shader - + Shader object code was converted to unsigned chars via the following *nix style command (available separately from Windows + MSVC): @@ -1729,7 +1728,7 @@ static unsigned char D3D12_PixelShader_YUV_BT601[] = { float2 tex : TEXCOORD0; float4 color : COLOR0; }; - + #define YUVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ @@ -6770,7 +6769,7 @@ static unsigned char D3D12_VertexShader_NV[] = { /* Root signature blobs extracted from Vertex Shader dxc command line is: dxc -E -T rootsig_1_1 -rootsig-define -Fo D3D12_VertexShader.hlsl - + Variables: - : the root signature define - : the output file name. @@ -6858,78 +6857,57 @@ static struct { const void *ps_shader_data; SIZE_T ps_shader_size; - const void* vs_shader_data; + const void *vs_shader_data; SIZE_T vs_shader_size; D3D12_RootSignature root_sig; } D3D12_shaders[NUM_SHADERS] = { - { - D3D12_PixelShader_Colors, sizeof(D3D12_PixelShader_Colors), - D3D12_VertexShader_Colors, sizeof(D3D12_VertexShader_Colors), - ROOTSIG_COLOR - }, - { - D3D12_PixelShader_Textures, sizeof(D3D12_PixelShader_Textures), - D3D12_VertexShader_Textures, sizeof(D3D12_VertexShader_Textures), - ROOTSIG_TEXTURE - }, + { D3D12_PixelShader_Colors, sizeof(D3D12_PixelShader_Colors), + D3D12_VertexShader_Colors, sizeof(D3D12_VertexShader_Colors), + ROOTSIG_COLOR }, + { D3D12_PixelShader_Textures, sizeof(D3D12_PixelShader_Textures), + D3D12_VertexShader_Textures, sizeof(D3D12_VertexShader_Textures), + ROOTSIG_TEXTURE }, #if SDL_HAVE_YUV - { - D3D12_PixelShader_YUV_JPEG, sizeof(D3D12_PixelShader_YUV_JPEG), - D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), - ROOTSIG_YUV - }, - { - D3D12_PixelShader_YUV_BT601, sizeof(D3D12_PixelShader_YUV_BT601), - D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), - ROOTSIG_YUV - }, - { - D3D12_PixelShader_YUV_BT709, sizeof(D3D12_PixelShader_YUV_BT709), - D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), - ROOTSIG_YUV - }, - { - D3D12_PixelShader_NV12_JPEG, sizeof(D3D12_PixelShader_NV12_JPEG), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, - { - D3D12_PixelShader_NV12_BT601, sizeof(D3D12_PixelShader_NV12_BT601), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, - { - D3D12_PixelShader_NV12_BT709, sizeof(D3D12_PixelShader_NV12_BT709), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, - { - D3D12_PixelShader_NV21_JPEG, sizeof(D3D12_PixelShader_NV21_JPEG), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, - { - D3D12_PixelShader_NV21_BT601, sizeof(D3D12_PixelShader_NV21_BT601), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, - { - D3D12_PixelShader_NV21_BT709, sizeof(D3D12_PixelShader_NV21_BT709), - D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), - ROOTSIG_NV - }, + { D3D12_PixelShader_YUV_JPEG, sizeof(D3D12_PixelShader_YUV_JPEG), + D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), + ROOTSIG_YUV }, + { D3D12_PixelShader_YUV_BT601, sizeof(D3D12_PixelShader_YUV_BT601), + D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), + ROOTSIG_YUV }, + { D3D12_PixelShader_YUV_BT709, sizeof(D3D12_PixelShader_YUV_BT709), + D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), + ROOTSIG_YUV }, + { D3D12_PixelShader_NV12_JPEG, sizeof(D3D12_PixelShader_NV12_JPEG), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, + { D3D12_PixelShader_NV12_BT601, sizeof(D3D12_PixelShader_NV12_BT601), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, + { D3D12_PixelShader_NV12_BT709, sizeof(D3D12_PixelShader_NV12_BT709), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, + { D3D12_PixelShader_NV21_JPEG, sizeof(D3D12_PixelShader_NV21_JPEG), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, + { D3D12_PixelShader_NV21_BT601, sizeof(D3D12_PixelShader_NV21_BT601), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, + { D3D12_PixelShader_NV21_BT709, sizeof(D3D12_PixelShader_NV21_BT709), + D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), + ROOTSIG_NV }, #endif }; -static struct { - const void* rs_shader_data; +static struct +{ + const void *rs_shader_data; SIZE_T rs_shader_size; } D3D12_rootsigs[NUM_ROOTSIGS] = { - {D3D12_RootSig_Color, sizeof(D3D12_RootSig_Color)}, - {D3D12_RootSig_Texture, sizeof(D3D12_RootSig_Texture)}, + { D3D12_RootSig_Color, sizeof(D3D12_RootSig_Color) }, + { D3D12_RootSig_Texture, sizeof(D3D12_RootSig_Texture) }, #if SDL_HAVE_YUV - {D3D12_RootSig_YUV, sizeof(D3D12_RootSig_YUV)}, - {D3D12_RootSig_NV, sizeof(D3D12_RootSig_NV)}, + { D3D12_RootSig_YUV, sizeof(D3D12_RootSig_YUV) }, + { D3D12_RootSig_NV, sizeof(D3D12_RootSig_NV) }, #endif }; diff --git a/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.h b/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.h index a94148e..f91179f 100644 --- a/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.h +++ b/modules/SDL2/src/render/direct3d12/SDL_shaders_d3d12.h @@ -27,7 +27,8 @@ extern "C" { #endif -typedef enum { +typedef enum +{ SHADER_SOLID, SHADER_RGB, #if SDL_HAVE_YUV @@ -44,7 +45,8 @@ typedef enum { NUM_SHADERS } D3D12_Shader; -typedef enum { +typedef enum +{ ROOTSIG_COLOR, ROOTSIG_TEXTURE, #if SDL_HAVE_YUV @@ -57,7 +59,7 @@ typedef enum { extern void D3D12_GetVertexShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode); extern void D3D12_GetPixelShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode); extern D3D12_RootSignature D3D12_GetRootSignatureType(D3D12_Shader shader); -extern void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE* outBytecode); +extern void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE *outBytecode); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/render/metal/SDL_render_metal.m b/modules/SDL2/src/render/metal/SDL_render_metal.m index 1444b17..76d1d83 100644 --- a/modules/SDL2/src/render/metal/SDL_render_metal.m +++ b/modules/SDL2/src/render/metal/SDL_render_metal.m @@ -159,8 +159,7 @@ typedef struct METAL_ShaderPipelines @implementation METAL_TextureData @end -static int -IsMetalAvailable(const SDL_SysWMinfo *syswm) +static int IsMetalAvailable(const SDL_SysWMinfo *syswm) { if (syswm->subsystem != SDL_SYSWM_COCOA && syswm->subsystem != SDL_SYSWM_UIKIT) { return SDL_SetError("Metal render target only supports Cocoa and UIKit video targets at the moment."); @@ -179,8 +178,7 @@ IsMetalAvailable(const SDL_SysWMinfo *syswm) static const MTLBlendOperation invalidBlendOperation = (MTLBlendOperation)0xFFFFFFFF; static const MTLBlendFactor invalidBlendFactor = (MTLBlendFactor)0xFFFFFFFF; -static MTLBlendOperation -GetBlendOperation(SDL_BlendOperation operation) +static MTLBlendOperation GetBlendOperation(SDL_BlendOperation operation) { switch (operation) { case SDL_BLENDOPERATION_ADD: return MTLBlendOperationAdd; @@ -192,8 +190,7 @@ GetBlendOperation(SDL_BlendOperation operation) } } -static MTLBlendFactor -GetBlendFactor(SDL_BlendFactor factor) +static MTLBlendFactor GetBlendFactor(SDL_BlendFactor factor) { switch (factor) { case SDL_BLENDFACTOR_ZERO: return MTLBlendFactorZero; @@ -210,8 +207,7 @@ GetBlendFactor(SDL_BlendFactor factor) } } -static NSString * -GetVertexFunctionName(SDL_MetalVertexFunction function) +static NSString *GetVertexFunctionName(SDL_MetalVertexFunction function) { switch (function) { case SDL_METAL_VERTEX_SOLID: return @"SDL_Solid_vertex"; @@ -220,8 +216,7 @@ GetVertexFunctionName(SDL_MetalVertexFunction function) } } -static NSString * -GetFragmentFunctionName(SDL_MetalFragmentFunction function) +static NSString *GetFragmentFunctionName(SDL_MetalFragmentFunction function) { switch (function) { case SDL_METAL_FRAGMENT_SOLID: return @"SDL_Solid_fragment"; @@ -233,9 +228,7 @@ GetFragmentFunctionName(SDL_MetalFragmentFunction function) } } -static id -MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, - NSString *blendlabel, SDL_BlendMode blendmode) +static id MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, NSString *blendlabel, SDL_BlendMode blendmode) { MTLRenderPipelineDescriptor *mtlpipedesc; MTLVertexDescriptor *vertdesc; @@ -259,7 +252,7 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, switch (cache->vertexFunction) { case SDL_METAL_VERTEX_SOLID: /* position (float2), color (uchar4normalized) */ - vertdesc.layouts[0].stride = sizeof(float) * 2 + sizeof (int); + vertdesc.layouts[0].stride = sizeof(float) * 2 + sizeof(int); vertdesc.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex; vertdesc.attributes[0].format = MTLVertexFormatFloat2; @@ -267,13 +260,13 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, vertdesc.attributes[0].bufferIndex = 0; vertdesc.attributes[1].format = MTLVertexFormatUChar4Normalized; - vertdesc.attributes[1].offset = sizeof (float) * 2; + vertdesc.attributes[1].offset = sizeof(float) * 2; vertdesc.attributes[1].bufferIndex = 0; break; case SDL_METAL_VERTEX_COPY: /* position (float2), color (uchar4normalized), texcoord (float2) */ - vertdesc.layouts[0].stride = sizeof(float) * 2 + sizeof (int) + sizeof (float) * 2; + vertdesc.layouts[0].stride = sizeof(float) * 2 + sizeof(int) + sizeof(float) * 2; vertdesc.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex; vertdesc.attributes[0].format = MTLVertexFormatFloat2; @@ -281,11 +274,11 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, vertdesc.attributes[0].bufferIndex = 0; vertdesc.attributes[1].format = MTLVertexFormatUChar4Normalized; - vertdesc.attributes[1].offset = sizeof (float) * 2; + vertdesc.attributes[1].offset = sizeof(float) * 2; vertdesc.attributes[1].bufferIndex = 0; vertdesc.attributes[2].format = MTLVertexFormatFloat2; - vertdesc.attributes[2].offset = sizeof(float) * 2 + sizeof (int); + vertdesc.attributes[2].offset = sizeof(float) * 2 + sizeof(int); vertdesc.attributes[2].bufferIndex = 0; break; } @@ -328,8 +321,7 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, } } -static void -MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char *label, +static void MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char *label, MTLPixelFormat rtformat, SDL_MetalVertexFunction vertfn, SDL_MetalFragmentFunction fragfn) { SDL_zerop(cache); @@ -348,8 +340,7 @@ MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char MakePipelineState(data, cache, @" (blend=mul)", SDL_BLENDMODE_MUL); } -static void -DestroyPipelineCache(METAL_PipelineCache *cache) +static void DestroyPipelineCache(METAL_PipelineCache *cache) { if (cache != NULL) { for (int i = 0; i < cache->count; i++) { @@ -360,8 +351,7 @@ DestroyPipelineCache(METAL_PipelineCache *cache) } } -void -MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MTLPixelFormat rtformat) +static void MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MTLPixelFormat rtformat) { SDL_zerop(pipelines); @@ -374,8 +364,7 @@ MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MT MakePipelineCache(data, &pipelines->caches[SDL_METAL_FRAGMENT_NV21], "SDL NV21 pipeline", rtformat, SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_NV21); } -static METAL_ShaderPipelines * -ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat) +static METAL_ShaderPipelines *ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat) { METAL_ShaderPipelines *allpipelines = data.allpipelines; int count = data.pipelinescount; @@ -401,8 +390,7 @@ ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat) return &data.allpipelines[count]; } -static void -DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count) +static void DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count) { if (allpipelines != NULL) { for (int i = 0; i < count; i++) { @@ -415,8 +403,7 @@ DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count) } } -static inline id -ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SDL_MetalFragmentFunction fragfn, SDL_BlendMode blendmode) +static inline id ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SDL_MetalFragmentFunction fragfn, SDL_BlendMode blendmode) { METAL_PipelineCache *cache = &pipelines->caches[fragfn]; @@ -429,8 +416,7 @@ ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SD return MakePipelineState(data, cache, [NSString stringWithFormat:@" (blend=custom 0x%x)", blendmode], blendmode); } -static SDL_bool -METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, MTLClearColor *clear_color, id vertex_buffer) +static SDL_bool METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, MTLClearColor *clear_color, id vertex_buffer) { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -497,13 +483,11 @@ METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, return SDL_TRUE; } -static void -METAL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void METAL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) { } -static int -METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; if (w) { @@ -515,8 +499,7 @@ METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) return 0; }} -static SDL_bool -METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) { SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); @@ -536,8 +519,7 @@ METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) return SDL_TRUE; } -static int -METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; MTLPixelFormat pixfmt; @@ -645,8 +627,7 @@ METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; }} -static void -METAL_UploadTextureData(id texture, SDL_Rect rect, int slice, +static void METAL_UploadTextureData(id texture, SDL_Rect rect, int slice, const void * pixels, int pitch) { [texture replaceRegion:MTLRegionMake2D(rect.x, rect.y, rect.w, rect.h) @@ -657,8 +638,7 @@ METAL_UploadTextureData(id texture, SDL_Rect rect, int slice, bytesPerImage:0]; } -static MTLStorageMode -METAL_GetStorageMode(id resource) +static MTLStorageMode METAL_GetStorageMode(id resource) { /* iOS 8 does not have this method. */ if ([resource respondsToSelector:@selector(storageMode)]) { @@ -667,8 +647,7 @@ METAL_GetStorageMode(id resource) return MTLStorageModeShared; } -static int -METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *texturedata, +static int METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *texturedata, id texture, SDL_Rect rect, int slice, const void * pixels, int pitch) { @@ -736,8 +715,7 @@ METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *textured return 0; } -static int -METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, +static int METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) { @autoreleasepool { METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata; @@ -782,8 +760,7 @@ METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, }} #if SDL_HAVE_YUV -static int -METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, +static int METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, @@ -814,8 +791,7 @@ METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, return 0; }} -static int -METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, +static int METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch) @@ -842,8 +818,7 @@ METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, }} #endif -static int -METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, +static int METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -877,8 +852,7 @@ METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; }} -static void -METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata; @@ -961,8 +935,7 @@ METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) texturedata.hasdata = YES; }} -static void -METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata; @@ -974,8 +947,7 @@ METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Sc } }} -static int -METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -996,13 +968,12 @@ METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) }} -static int -METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) { float projection[4][4]; /* Prepare an orthographic projection */ const int w = cmd->data.viewport.rect.w; const int h = cmd->data.viewport.rect.h; - const size_t matrixlen = sizeof (projection); + const size_t matrixlen = sizeof(projection); float *matrix = (float *) SDL_AllocateRenderVertices(renderer, matrixlen, CONSTANT_ALIGN(16), &cmd->data.viewport.first); if (!matrix) { return -1; @@ -1021,16 +992,15 @@ METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) return 0; } -static int -METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - const size_t vertlen = sizeof (float) * 4; + const size_t vertlen = sizeof(float) * 4; float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, DEVICE_ALIGN(16), &cmd->data.color.first); if (!verts) { return -1; } /* - * FIXME: not needed anymore, some cleanup to do + * FIXME: not needed anymore, some cleanup to do * *(verts++) = ((float)cmd->data.color.r) / 255.0f; *(verts++) = ((float)cmd->data.color.g) / 255.0f; @@ -1040,8 +1010,7 @@ METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) return 0; } -static int -METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) { const SDL_Color color = { cmd->data.draw.r, @@ -1050,7 +1019,7 @@ METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL cmd->data.draw.a }; - const size_t vertlen = (2 * sizeof (float) + sizeof (SDL_Color)) * count; + const size_t vertlen = (2 * sizeof(float) + sizeof(SDL_Color)) * count; float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, DEVICE_ALIGN(8), &cmd->data.draw.first); if (!verts) { return -1; @@ -1065,8 +1034,7 @@ METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL return 0; } -static int -METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) { const SDL_Color color = { cmd->data.draw.r, @@ -1079,7 +1047,7 @@ METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_ SDL_assert(count >= 2); /* should have been checked at the higher level. */ - vertlen = (2 * sizeof (float) + sizeof (SDL_Color)) * count; + vertlen = (2 * sizeof(float) + sizeof(SDL_Color)) * count; verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, DEVICE_ALIGN(8), &cmd->data.draw.first); if (!verts) { return -1; @@ -1119,14 +1087,13 @@ METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_ return 0; } -static int -METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, +static int METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int count = indices ? num_indices : num_vertices; - const size_t vertlen = (2 * sizeof (float) + sizeof (int) + (texture ? 2 : 0) * sizeof (float)) * count; + const size_t vertlen = (2 * sizeof(float) + sizeof(int) + (texture ? 2 : 0) * sizeof(float)) * count; float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, DEVICE_ALIGN(8), &cmd->data.draw.first); if (!verts) { return -1; @@ -1181,8 +1148,7 @@ typedef struct size_t color_offset; } METAL_DrawStateCache; -static SDL_bool -SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_MetalFragmentFunction shader, +static SDL_bool SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_MetalFragmentFunction shader, const size_t constants_offset, id mtlbufvertex, METAL_DrawStateCache *statecache) { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -1262,8 +1228,7 @@ SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_Met return SDL_TRUE; } -static SDL_bool -SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t constants_offset, +static SDL_bool SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t constants_offset, id mtlbufvertex, METAL_DrawStateCache *statecache) { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -1295,8 +1260,7 @@ SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t return SDL_TRUE; } -static int -METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; id mtlbufvertex = nil; @@ -1338,7 +1302,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver while (cmd) { switch (cmd->command) { case SDL_RENDERCMD_SETVIEWPORT: { - SDL_memcpy(&statecache.viewport, &cmd->data.viewport.rect, sizeof (statecache.viewport)); + SDL_memcpy(&statecache.viewport, &cmd->data.viewport.rect, sizeof(statecache.viewport)); statecache.projection_offset = cmd->data.viewport.first; statecache.viewport_dirty = SDL_TRUE; statecache.cliprect_dirty = SDL_TRUE; @@ -1346,7 +1310,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver } case SDL_RENDERCMD_SETCLIPRECT: { - SDL_memcpy(&statecache.cliprect, &cmd->data.cliprect.rect, sizeof (statecache.cliprect)); + SDL_memcpy(&statecache.cliprect, &cmd->data.cliprect.rect, sizeof(statecache.cliprect)); statecache.cliprect_enabled = cmd->data.cliprect.enabled; statecache.cliprect_dirty = SDL_TRUE; break; @@ -1437,8 +1401,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver return 0; }} -static int -METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, +static int METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 pixel_format, void * pixels, int pitch) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; @@ -1490,8 +1453,7 @@ METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return status; }} -static int -METAL_RenderPresent(SDL_Renderer * renderer) +static int METAL_RenderPresent(SDL_Renderer * renderer) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; SDL_bool ready = SDL_TRUE; @@ -1528,15 +1490,13 @@ METAL_RenderPresent(SDL_Renderer * renderer) return 0; }} -static void -METAL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void METAL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) { @autoreleasepool { CFBridgingRelease(texture->driverdata); texture->driverdata = NULL; }} -static void -METAL_DestroyRenderer(SDL_Renderer * renderer) +static void METAL_DestroyRenderer(SDL_Renderer * renderer) { @autoreleasepool { if (renderer->driverdata) { METAL_RenderData *data = CFBridgingRelease(renderer->driverdata); @@ -1557,15 +1517,13 @@ METAL_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); }} -static void * -METAL_GetMetalLayer(SDL_Renderer * renderer) +static void *METAL_GetMetalLayer(SDL_Renderer * renderer) { @autoreleasepool { METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata; return (__bridge void*)data.mtllayer; }} -static void * -METAL_GetMetalCommandEncoder(SDL_Renderer * renderer) +static void *METAL_GetMetalCommandEncoder(SDL_Renderer * renderer) { @autoreleasepool { // note that data.mtlcmdencoder can be nil if METAL_ActivateRenderCommandEncoder fails. // Before SDL 2.0.18, it might have returned a non-nil encoding that might not have been @@ -1576,8 +1534,7 @@ METAL_GetMetalCommandEncoder(SDL_Renderer * renderer) return (__bridge void*)data.mtlcmdencoder; }} -static int -METAL_SetVSync(SDL_Renderer * renderer, const int vsync) +static int METAL_SetVSync(SDL_Renderer * renderer, const int vsync) { #if (defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)) || TARGET_OS_MACCATALYST if (@available(macOS 10.13, *)) { @@ -1623,8 +1580,7 @@ static SDL_MetalView GetWindowView(SDL_Window *window) return nil; } -static SDL_Renderer * -METAL_CreateRenderer(SDL_Window * window, Uint32 flags) +static SDL_Renderer *METAL_CreateRenderer(SDL_Window * window, Uint32 flags) { @autoreleasepool { SDL_Renderer *renderer = NULL; METAL_RenderData *data = NULL; @@ -1698,8 +1654,22 @@ METAL_CreateRenderer(SDL_Window * window, Uint32 flags) return NULL; } - // !!! FIXME: MTLCopyAllDevices() can find other GPUs on macOS... - mtldevice = MTLCreateSystemDefaultDevice(); +#ifdef __MACOSX__ + if (SDL_GetHintBoolean(SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE, SDL_TRUE)) { + NSArray> *devices = MTLCopyAllDevices(); + + for (id device in devices) { + if (device.isLowPower) { + mtldevice = device; + break; + } + } + } +#endif + + if (mtldevice == nil) { + mtldevice = MTLCreateSystemDefaultDevice(); + } if (mtldevice == nil) { SDL_free(renderer); diff --git a/modules/SDL2/src/render/opengl/SDL_glfuncs.h b/modules/SDL2/src/render/opengl/SDL_glfuncs.h index 6dc07fd..42f9ef1 100644 --- a/modules/SDL2/src/render/opengl/SDL_glfuncs.h +++ b/modules/SDL2/src/render/opengl/SDL_glfuncs.h @@ -23,7 +23,7 @@ If you need to use a GL function from the SDL video subsystem, change its entry from SDL_PROC_UNUSED to SDL_PROC and rebuild. */ -#define SDL_PROC_UNUSED(ret,func,params) +#define SDL_PROC_UNUSED(ret, func, params) SDL_PROC_UNUSED(void, glAccum, (GLenum, GLfloat)) SDL_PROC_UNUSED(void, glAlphaFunc, (GLenum, GLclampf)) @@ -74,21 +74,21 @@ SDL_PROC_UNUSED(void, glColor4iv, (const GLint *)) SDL_PROC_UNUSED(void, glColor4s, (GLshort, GLshort, GLshort, GLshort)) SDL_PROC_UNUSED(void, glColor4sv, (const GLshort *)) SDL_PROC(void, glColor4ub, - (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) -SDL_PROC_UNUSED(void, glColor4ubv, (const GLubyte * v)) + (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) +SDL_PROC_UNUSED(void, glColor4ubv, (const GLubyte *v)) SDL_PROC_UNUSED(void, glColor4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha)) -SDL_PROC_UNUSED(void, glColor4uiv, (const GLuint * v)) +SDL_PROC_UNUSED(void, glColor4uiv, (const GLuint *v)) SDL_PROC_UNUSED(void, glColor4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha)) -SDL_PROC_UNUSED(void, glColor4usv, (const GLushort * v)) +SDL_PROC_UNUSED(void, glColor4usv, (const GLushort *v)) SDL_PROC_UNUSED(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) SDL_PROC_UNUSED(void, glColorMaterial, (GLenum face, GLenum mode)) SDL_PROC(void, glColorPointer, - (GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer)) + (GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer)) SDL_PROC_UNUSED(void, glCopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) @@ -106,7 +106,7 @@ SDL_PROC_UNUSED(void, glCopyTexSubImage2D, GLint x, GLint y, GLsizei width, GLsizei height)) SDL_PROC_UNUSED(void, glCullFace, (GLenum mode)) SDL_PROC_UNUSED(void, glDeleteLists, (GLuint list, GLsizei range)) -SDL_PROC(void, glDeleteTextures, (GLsizei n, const GLuint * textures)) +SDL_PROC(void, glDeleteTextures, (GLsizei n, const GLuint *textures)) SDL_PROC(void, glDepthFunc, (GLenum func)) SDL_PROC_UNUSED(void, glDepthMask, (GLboolean flag)) SDL_PROC_UNUSED(void, glDepthRange, (GLclampd zNear, GLclampd zFar)) @@ -116,141 +116,141 @@ SDL_PROC(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) SDL_PROC_UNUSED(void, glDrawBuffer, (GLenum mode)) SDL_PROC_UNUSED(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, - const GLvoid * indices)) + const GLvoid *indices)) SDL_PROC(void, glDrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, - const GLvoid * pixels)) + const GLvoid *pixels)) SDL_PROC_UNUSED(void, glEdgeFlag, (GLboolean flag)) SDL_PROC_UNUSED(void, glEdgeFlagPointer, - (GLsizei stride, const GLvoid * pointer)) -SDL_PROC_UNUSED(void, glEdgeFlagv, (const GLboolean * flag)) + (GLsizei stride, const GLvoid *pointer)) +SDL_PROC_UNUSED(void, glEdgeFlagv, (const GLboolean *flag)) SDL_PROC(void, glEnable, (GLenum cap)) SDL_PROC(void, glEnableClientState, (GLenum array)) SDL_PROC(void, glEnd, (void)) SDL_PROC_UNUSED(void, glEndList, (void)) SDL_PROC_UNUSED(void, glEvalCoord1d, (GLdouble u)) -SDL_PROC_UNUSED(void, glEvalCoord1dv, (const GLdouble * u)) +SDL_PROC_UNUSED(void, glEvalCoord1dv, (const GLdouble *u)) SDL_PROC_UNUSED(void, glEvalCoord1f, (GLfloat u)) -SDL_PROC_UNUSED(void, glEvalCoord1fv, (const GLfloat * u)) +SDL_PROC_UNUSED(void, glEvalCoord1fv, (const GLfloat *u)) SDL_PROC_UNUSED(void, glEvalCoord2d, (GLdouble u, GLdouble v)) -SDL_PROC_UNUSED(void, glEvalCoord2dv, (const GLdouble * u)) +SDL_PROC_UNUSED(void, glEvalCoord2dv, (const GLdouble *u)) SDL_PROC_UNUSED(void, glEvalCoord2f, (GLfloat u, GLfloat v)) -SDL_PROC_UNUSED(void, glEvalCoord2fv, (const GLfloat * u)) +SDL_PROC_UNUSED(void, glEvalCoord2fv, (const GLfloat *u)) SDL_PROC_UNUSED(void, glEvalMesh1, (GLenum mode, GLint i1, GLint i2)) SDL_PROC_UNUSED(void, glEvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) SDL_PROC_UNUSED(void, glEvalPoint1, (GLint i)) SDL_PROC_UNUSED(void, glEvalPoint2, (GLint i, GLint j)) SDL_PROC_UNUSED(void, glFeedbackBuffer, - (GLsizei size, GLenum type, GLfloat * buffer)) + (GLsizei size, GLenum type, GLfloat *buffer)) SDL_PROC_UNUSED(void, glFinish, (void)) SDL_PROC_UNUSED(void, glFlush, (void)) SDL_PROC_UNUSED(void, glFogf, (GLenum pname, GLfloat param)) -SDL_PROC_UNUSED(void, glFogfv, (GLenum pname, const GLfloat * params)) +SDL_PROC_UNUSED(void, glFogfv, (GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glFogi, (GLenum pname, GLint param)) -SDL_PROC_UNUSED(void, glFogiv, (GLenum pname, const GLint * params)) +SDL_PROC_UNUSED(void, glFogiv, (GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glFrontFace, (GLenum mode)) SDL_PROC_UNUSED(void, glFrustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) SDL_PROC_UNUSED(GLuint, glGenLists, (GLsizei range)) -SDL_PROC(void, glGenTextures, (GLsizei n, GLuint * textures)) -SDL_PROC_UNUSED(void, glGetBooleanv, (GLenum pname, GLboolean * params)) -SDL_PROC_UNUSED(void, glGetClipPlane, (GLenum plane, GLdouble * equation)) -SDL_PROC_UNUSED(void, glGetDoublev, (GLenum pname, GLdouble * params)) +SDL_PROC(void, glGenTextures, (GLsizei n, GLuint *textures)) +SDL_PROC_UNUSED(void, glGetBooleanv, (GLenum pname, GLboolean *params)) +SDL_PROC_UNUSED(void, glGetClipPlane, (GLenum plane, GLdouble *equation)) +SDL_PROC_UNUSED(void, glGetDoublev, (GLenum pname, GLdouble *params)) SDL_PROC(GLenum, glGetError, (void)) -SDL_PROC(void, glGetFloatv, (GLenum pname, GLfloat * params)) -SDL_PROC(void, glGetIntegerv, (GLenum pname, GLint * params)) +SDL_PROC(void, glGetFloatv, (GLenum pname, GLfloat *params)) +SDL_PROC(void, glGetIntegerv, (GLenum pname, GLint *params)) SDL_PROC_UNUSED(void, glGetLightfv, - (GLenum light, GLenum pname, GLfloat * params)) + (GLenum light, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetLightiv, - (GLenum light, GLenum pname, GLint * params)) -SDL_PROC_UNUSED(void, glGetMapdv, (GLenum target, GLenum query, GLdouble * v)) -SDL_PROC_UNUSED(void, glGetMapfv, (GLenum target, GLenum query, GLfloat * v)) -SDL_PROC_UNUSED(void, glGetMapiv, (GLenum target, GLenum query, GLint * v)) + (GLenum light, GLenum pname, GLint *params)) +SDL_PROC_UNUSED(void, glGetMapdv, (GLenum target, GLenum query, GLdouble *v)) +SDL_PROC_UNUSED(void, glGetMapfv, (GLenum target, GLenum query, GLfloat *v)) +SDL_PROC_UNUSED(void, glGetMapiv, (GLenum target, GLenum query, GLint *v)) SDL_PROC_UNUSED(void, glGetMaterialfv, - (GLenum face, GLenum pname, GLfloat * params)) + (GLenum face, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetMaterialiv, - (GLenum face, GLenum pname, GLint * params)) -SDL_PROC_UNUSED(void, glGetPixelMapfv, (GLenum map, GLfloat * values)) -SDL_PROC_UNUSED(void, glGetPixelMapuiv, (GLenum map, GLuint * values)) -SDL_PROC_UNUSED(void, glGetPixelMapusv, (GLenum map, GLushort * values)) -SDL_PROC(void, glGetPointerv, (GLenum pname, GLvoid * *params)) + (GLenum face, GLenum pname, GLint *params)) +SDL_PROC_UNUSED(void, glGetPixelMapfv, (GLenum map, GLfloat *values)) +SDL_PROC_UNUSED(void, glGetPixelMapuiv, (GLenum map, GLuint *values)) +SDL_PROC_UNUSED(void, glGetPixelMapusv, (GLenum map, GLushort *values)) +SDL_PROC(void, glGetPointerv, (GLenum pname, GLvoid **params)) SDL_PROC_UNUSED(void, glGetPolygonStipple, (GLubyte * mask)) SDL_PROC(const GLubyte *, glGetString, (GLenum name)) SDL_PROC_UNUSED(void, glGetTexEnvfv, - (GLenum target, GLenum pname, GLfloat * params)) + (GLenum target, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetTexEnviv, - (GLenum target, GLenum pname, GLint * params)) + (GLenum target, GLenum pname, GLint *params)) SDL_PROC_UNUSED(void, glGetTexGendv, - (GLenum coord, GLenum pname, GLdouble * params)) + (GLenum coord, GLenum pname, GLdouble *params)) SDL_PROC_UNUSED(void, glGetTexGenfv, - (GLenum coord, GLenum pname, GLfloat * params)) + (GLenum coord, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetTexGeniv, - (GLenum coord, GLenum pname, GLint * params)) + (GLenum coord, GLenum pname, GLint *params)) SDL_PROC_UNUSED(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, - GLvoid * pixels)) + GLvoid *pixels)) SDL_PROC_UNUSED(void, glGetTexLevelParameterfv, - (GLenum target, GLint level, GLenum pname, GLfloat * params)) + (GLenum target, GLint level, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetTexLevelParameteriv, - (GLenum target, GLint level, GLenum pname, GLint * params)) + (GLenum target, GLint level, GLenum pname, GLint *params)) SDL_PROC_UNUSED(void, glGetTexParameterfv, - (GLenum target, GLenum pname, GLfloat * params)) + (GLenum target, GLenum pname, GLfloat *params)) SDL_PROC_UNUSED(void, glGetTexParameteriv, - (GLenum target, GLenum pname, GLint * params)) + (GLenum target, GLenum pname, GLint *params)) SDL_PROC_UNUSED(void, glHint, (GLenum target, GLenum mode)) SDL_PROC_UNUSED(void, glIndexMask, (GLuint mask)) SDL_PROC_UNUSED(void, glIndexPointer, - (GLenum type, GLsizei stride, const GLvoid * pointer)) + (GLenum type, GLsizei stride, const GLvoid *pointer)) SDL_PROC_UNUSED(void, glIndexd, (GLdouble c)) -SDL_PROC_UNUSED(void, glIndexdv, (const GLdouble * c)) +SDL_PROC_UNUSED(void, glIndexdv, (const GLdouble *c)) SDL_PROC_UNUSED(void, glIndexf, (GLfloat c)) -SDL_PROC_UNUSED(void, glIndexfv, (const GLfloat * c)) +SDL_PROC_UNUSED(void, glIndexfv, (const GLfloat *c)) SDL_PROC_UNUSED(void, glIndexi, (GLint c)) -SDL_PROC_UNUSED(void, glIndexiv, (const GLint * c)) +SDL_PROC_UNUSED(void, glIndexiv, (const GLint *c)) SDL_PROC_UNUSED(void, glIndexs, (GLshort c)) -SDL_PROC_UNUSED(void, glIndexsv, (const GLshort * c)) +SDL_PROC_UNUSED(void, glIndexsv, (const GLshort *c)) SDL_PROC_UNUSED(void, glIndexub, (GLubyte c)) -SDL_PROC_UNUSED(void, glIndexubv, (const GLubyte * c)) +SDL_PROC_UNUSED(void, glIndexubv, (const GLubyte *c)) SDL_PROC_UNUSED(void, glInitNames, (void)) SDL_PROC_UNUSED(void, glInterleavedArrays, - (GLenum format, GLsizei stride, const GLvoid * pointer)) + (GLenum format, GLsizei stride, const GLvoid *pointer)) SDL_PROC_UNUSED(GLboolean, glIsEnabled, (GLenum cap)) SDL_PROC_UNUSED(GLboolean, glIsList, (GLuint list)) SDL_PROC_UNUSED(GLboolean, glIsTexture, (GLuint texture)) SDL_PROC_UNUSED(void, glLightModelf, (GLenum pname, GLfloat param)) -SDL_PROC_UNUSED(void, glLightModelfv, (GLenum pname, const GLfloat * params)) +SDL_PROC_UNUSED(void, glLightModelfv, (GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glLightModeli, (GLenum pname, GLint param)) -SDL_PROC_UNUSED(void, glLightModeliv, (GLenum pname, const GLint * params)) +SDL_PROC_UNUSED(void, glLightModeliv, (GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glLightf, (GLenum light, GLenum pname, GLfloat param)) SDL_PROC_UNUSED(void, glLightfv, - (GLenum light, GLenum pname, const GLfloat * params)) + (GLenum light, GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glLighti, (GLenum light, GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glLightiv, - (GLenum light, GLenum pname, const GLint * params)) + (GLenum light, GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glLineStipple, (GLint factor, GLushort pattern)) SDL_PROC(void, glLineWidth, (GLfloat width)) SDL_PROC_UNUSED(void, glListBase, (GLuint base)) SDL_PROC(void, glLoadIdentity, (void)) -SDL_PROC_UNUSED(void, glLoadMatrixd, (const GLdouble * m)) -SDL_PROC_UNUSED(void, glLoadMatrixf, (const GLfloat * m)) +SDL_PROC_UNUSED(void, glLoadMatrixd, (const GLdouble *m)) +SDL_PROC_UNUSED(void, glLoadMatrixf, (const GLfloat *m)) SDL_PROC_UNUSED(void, glLoadName, (GLuint name)) SDL_PROC_UNUSED(void, glLogicOp, (GLenum opcode)) SDL_PROC_UNUSED(void, glMap1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble * points)) + GLint order, const GLdouble *points)) SDL_PROC_UNUSED(void, glMap1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat * points)) + GLint order, const GLfloat *points)) SDL_PROC_UNUSED(void, glMap2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, - GLint vorder, const GLdouble * points)) + GLint vorder, const GLdouble *points)) SDL_PROC_UNUSED(void, glMap2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, - GLint vorder, const GLfloat * points)) + GLint vorder, const GLfloat *points)) SDL_PROC_UNUSED(void, glMapGrid1d, (GLint un, GLdouble u1, GLdouble u2)) SDL_PROC_UNUSED(void, glMapGrid1f, (GLint un, GLfloat u1, GLfloat u2)) SDL_PROC_UNUSED(void, glMapGrid2d, @@ -261,36 +261,36 @@ SDL_PROC_UNUSED(void, glMapGrid2f, GLfloat v2)) SDL_PROC_UNUSED(void, glMaterialf, (GLenum face, GLenum pname, GLfloat param)) SDL_PROC_UNUSED(void, glMaterialfv, - (GLenum face, GLenum pname, const GLfloat * params)) + (GLenum face, GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glMateriali, (GLenum face, GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glMaterialiv, - (GLenum face, GLenum pname, const GLint * params)) + (GLenum face, GLenum pname, const GLint *params)) SDL_PROC(void, glMatrixMode, (GLenum mode)) -SDL_PROC_UNUSED(void, glMultMatrixd, (const GLdouble * m)) -SDL_PROC_UNUSED(void, glMultMatrixf, (const GLfloat * m)) +SDL_PROC_UNUSED(void, glMultMatrixd, (const GLdouble *m)) +SDL_PROC_UNUSED(void, glMultMatrixf, (const GLfloat *m)) SDL_PROC_UNUSED(void, glNewList, (GLuint list, GLenum mode)) SDL_PROC_UNUSED(void, glNormal3b, (GLbyte nx, GLbyte ny, GLbyte nz)) -SDL_PROC_UNUSED(void, glNormal3bv, (const GLbyte * v)) +SDL_PROC_UNUSED(void, glNormal3bv, (const GLbyte *v)) SDL_PROC_UNUSED(void, glNormal3d, (GLdouble nx, GLdouble ny, GLdouble nz)) -SDL_PROC_UNUSED(void, glNormal3dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glNormal3dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz)) -SDL_PROC_UNUSED(void, glNormal3fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glNormal3fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glNormal3i, (GLint nx, GLint ny, GLint nz)) -SDL_PROC_UNUSED(void, glNormal3iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glNormal3iv, (const GLint *v)) SDL_PROC_UNUSED(void, glNormal3s, (GLshort nx, GLshort ny, GLshort nz)) -SDL_PROC_UNUSED(void, glNormal3sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glNormal3sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glNormalPointer, - (GLenum type, GLsizei stride, const GLvoid * pointer)) + (GLenum type, GLsizei stride, const GLvoid *pointer)) SDL_PROC(void, glOrtho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) SDL_PROC_UNUSED(void, glPassThrough, (GLfloat token)) SDL_PROC_UNUSED(void, glPixelMapfv, - (GLenum map, GLsizei mapsize, const GLfloat * values)) + (GLenum map, GLsizei mapsize, const GLfloat *values)) SDL_PROC_UNUSED(void, glPixelMapuiv, - (GLenum map, GLsizei mapsize, const GLuint * values)) + (GLenum map, GLsizei mapsize, const GLuint *values)) SDL_PROC_UNUSED(void, glPixelMapusv, - (GLenum map, GLsizei mapsize, const GLushort * values)) + (GLenum map, GLsizei mapsize, const GLushort *values)) SDL_PROC_UNUSED(void, glPixelStoref, (GLenum pname, GLfloat param)) SDL_PROC(void, glPixelStorei, (GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glPixelTransferf, (GLenum pname, GLfloat param)) @@ -299,180 +299,180 @@ SDL_PROC_UNUSED(void, glPixelZoom, (GLfloat xfactor, GLfloat yfactor)) SDL_PROC(void, glPointSize, (GLfloat size)) SDL_PROC_UNUSED(void, glPolygonMode, (GLenum face, GLenum mode)) SDL_PROC_UNUSED(void, glPolygonOffset, (GLfloat factor, GLfloat units)) -SDL_PROC_UNUSED(void, glPolygonStipple, (const GLubyte * mask)) +SDL_PROC_UNUSED(void, glPolygonStipple, (const GLubyte *mask)) SDL_PROC_UNUSED(void, glPopAttrib, (void)) SDL_PROC_UNUSED(void, glPopClientAttrib, (void)) SDL_PROC_UNUSED(void, glPopMatrix, (void)) SDL_PROC_UNUSED(void, glPopName, (void)) SDL_PROC_UNUSED(void, glPrioritizeTextures, - (GLsizei n, const GLuint * textures, - const GLclampf * priorities)) + (GLsizei n, const GLuint *textures, + const GLclampf *priorities)) SDL_PROC_UNUSED(void, glPushAttrib, (GLbitfield mask)) SDL_PROC_UNUSED(void, glPushClientAttrib, (GLbitfield mask)) SDL_PROC_UNUSED(void, glPushMatrix, (void)) SDL_PROC_UNUSED(void, glPushName, (GLuint name)) SDL_PROC_UNUSED(void, glRasterPos2d, (GLdouble x, GLdouble y)) -SDL_PROC_UNUSED(void, glRasterPos2dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glRasterPos2dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glRasterPos2f, (GLfloat x, GLfloat y)) -SDL_PROC_UNUSED(void, glRasterPos2fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glRasterPos2fv, (const GLfloat *v)) SDL_PROC(void, glRasterPos2i, (GLint x, GLint y)) -SDL_PROC_UNUSED(void, glRasterPos2iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glRasterPos2iv, (const GLint *v)) SDL_PROC_UNUSED(void, glRasterPos2s, (GLshort x, GLshort y)) -SDL_PROC_UNUSED(void, glRasterPos2sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glRasterPos2sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glRasterPos3d, (GLdouble x, GLdouble y, GLdouble z)) -SDL_PROC_UNUSED(void, glRasterPos3dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glRasterPos3dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glRasterPos3f, (GLfloat x, GLfloat y, GLfloat z)) -SDL_PROC_UNUSED(void, glRasterPos3fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glRasterPos3fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glRasterPos3i, (GLint x, GLint y, GLint z)) -SDL_PROC_UNUSED(void, glRasterPos3iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glRasterPos3iv, (const GLint *v)) SDL_PROC_UNUSED(void, glRasterPos3s, (GLshort x, GLshort y, GLshort z)) -SDL_PROC_UNUSED(void, glRasterPos3sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glRasterPos3sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glRasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) -SDL_PROC_UNUSED(void, glRasterPos4dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glRasterPos4dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glRasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -SDL_PROC_UNUSED(void, glRasterPos4fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glRasterPos4fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glRasterPos4i, (GLint x, GLint y, GLint z, GLint w)) -SDL_PROC_UNUSED(void, glRasterPos4iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glRasterPos4iv, (const GLint *v)) SDL_PROC_UNUSED(void, glRasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w)) -SDL_PROC_UNUSED(void, glRasterPos4sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glRasterPos4sv, (const GLshort *v)) SDL_PROC(void, glReadBuffer, (GLenum mode)) SDL_PROC(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid * pixels)) + GLenum format, GLenum type, GLvoid *pixels)) SDL_PROC_UNUSED(void, glRectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) -SDL_PROC_UNUSED(void, glRectdv, (const GLdouble * v1, const GLdouble * v2)) +SDL_PROC_UNUSED(void, glRectdv, (const GLdouble *v1, const GLdouble *v2)) SDL_PROC(void, glRectf, - (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) -SDL_PROC_UNUSED(void, glRectfv, (const GLfloat * v1, const GLfloat * v2)) + (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) +SDL_PROC_UNUSED(void, glRectfv, (const GLfloat *v1, const GLfloat *v2)) SDL_PROC_UNUSED(void, glRecti, (GLint x1, GLint y1, GLint x2, GLint y2)) -SDL_PROC_UNUSED(void, glRectiv, (const GLint * v1, const GLint * v2)) +SDL_PROC_UNUSED(void, glRectiv, (const GLint *v1, const GLint *v2)) SDL_PROC_UNUSED(void, glRects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2)) -SDL_PROC_UNUSED(void, glRectsv, (const GLshort * v1, const GLshort * v2)) +SDL_PROC_UNUSED(void, glRectsv, (const GLshort *v1, const GLshort *v2)) SDL_PROC_UNUSED(GLint, glRenderMode, (GLenum mode)) SDL_PROC_UNUSED(void, glRotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) SDL_PROC(void, glRotatef, - (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) + (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) SDL_PROC_UNUSED(void, glScaled, (GLdouble x, GLdouble y, GLdouble z)) SDL_PROC_UNUSED(void, glScalef, (GLfloat x, GLfloat y, GLfloat z)) SDL_PROC(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)) -SDL_PROC_UNUSED(void, glSelectBuffer, (GLsizei size, GLuint * buffer)) +SDL_PROC_UNUSED(void, glSelectBuffer, (GLsizei size, GLuint *buffer)) SDL_PROC(void, glShadeModel, (GLenum mode)) SDL_PROC_UNUSED(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask)) SDL_PROC_UNUSED(void, glStencilMask, (GLuint mask)) SDL_PROC_UNUSED(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) SDL_PROC_UNUSED(void, glTexCoord1d, (GLdouble s)) -SDL_PROC_UNUSED(void, glTexCoord1dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glTexCoord1dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glTexCoord1f, (GLfloat s)) -SDL_PROC_UNUSED(void, glTexCoord1fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glTexCoord1fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glTexCoord1i, (GLint s)) -SDL_PROC_UNUSED(void, glTexCoord1iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glTexCoord1iv, (const GLint *v)) SDL_PROC_UNUSED(void, glTexCoord1s, (GLshort s)) -SDL_PROC_UNUSED(void, glTexCoord1sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glTexCoord1sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glTexCoord2d, (GLdouble s, GLdouble t)) -SDL_PROC_UNUSED(void, glTexCoord2dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glTexCoord2dv, (const GLdouble *v)) SDL_PROC(void, glTexCoord2f, (GLfloat s, GLfloat t)) -SDL_PROC_UNUSED(void, glTexCoord2fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glTexCoord2fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glTexCoord2i, (GLint s, GLint t)) -SDL_PROC_UNUSED(void, glTexCoord2iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glTexCoord2iv, (const GLint *v)) SDL_PROC_UNUSED(void, glTexCoord2s, (GLshort s, GLshort t)) -SDL_PROC_UNUSED(void, glTexCoord2sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glTexCoord2sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glTexCoord3d, (GLdouble s, GLdouble t, GLdouble r)) -SDL_PROC_UNUSED(void, glTexCoord3dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glTexCoord3dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glTexCoord3f, (GLfloat s, GLfloat t, GLfloat r)) -SDL_PROC_UNUSED(void, glTexCoord3fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glTexCoord3fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glTexCoord3i, (GLint s, GLint t, GLint r)) -SDL_PROC_UNUSED(void, glTexCoord3iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glTexCoord3iv, (const GLint *v)) SDL_PROC_UNUSED(void, glTexCoord3s, (GLshort s, GLshort t, GLshort r)) -SDL_PROC_UNUSED(void, glTexCoord3sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glTexCoord3sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glTexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q)) -SDL_PROC_UNUSED(void, glTexCoord4dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glTexCoord4dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glTexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q)) -SDL_PROC_UNUSED(void, glTexCoord4fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glTexCoord4fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glTexCoord4i, (GLint s, GLint t, GLint r, GLint q)) -SDL_PROC_UNUSED(void, glTexCoord4iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glTexCoord4iv, (const GLint *v)) SDL_PROC_UNUSED(void, glTexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q)) -SDL_PROC_UNUSED(void, glTexCoord4sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glTexCoord4sv, (const GLshort *v)) SDL_PROC(void, glTexCoordPointer, - (GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer)) + (GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer)) SDL_PROC(void, glTexEnvf, (GLenum target, GLenum pname, GLfloat param)) SDL_PROC_UNUSED(void, glTexEnvfv, - (GLenum target, GLenum pname, const GLfloat * params)) + (GLenum target, GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glTexEnvi, (GLenum target, GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glTexEnviv, - (GLenum target, GLenum pname, const GLint * params)) + (GLenum target, GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glTexGend, (GLenum coord, GLenum pname, GLdouble param)) SDL_PROC_UNUSED(void, glTexGendv, - (GLenum coord, GLenum pname, const GLdouble * params)) + (GLenum coord, GLenum pname, const GLdouble *params)) SDL_PROC_UNUSED(void, glTexGenf, (GLenum coord, GLenum pname, GLfloat param)) SDL_PROC_UNUSED(void, glTexGenfv, - (GLenum coord, GLenum pname, const GLfloat * params)) + (GLenum coord, GLenum pname, const GLfloat *params)) SDL_PROC_UNUSED(void, glTexGeni, (GLenum coord, GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glTexGeniv, - (GLenum coord, GLenum pname, const GLint * params)) + (GLenum coord, GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, - const GLvoid * pixels)) + const GLvoid *pixels)) SDL_PROC(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, - const GLvoid * pixels)) + const GLvoid *pixels)) SDL_PROC_UNUSED(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param)) SDL_PROC_UNUSED(void, glTexParameterfv, - (GLenum target, GLenum pname, const GLfloat * params)) + (GLenum target, GLenum pname, const GLfloat *params)) SDL_PROC(void, glTexParameteri, (GLenum target, GLenum pname, GLint param)) SDL_PROC_UNUSED(void, glTexParameteriv, - (GLenum target, GLenum pname, const GLint * params)) + (GLenum target, GLenum pname, const GLint *params)) SDL_PROC_UNUSED(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, - GLenum format, GLenum type, const GLvoid * pixels)) + GLenum format, GLenum type, const GLvoid *pixels)) SDL_PROC(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, - const GLvoid * pixels)) + const GLvoid *pixels)) SDL_PROC_UNUSED(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z)) SDL_PROC_UNUSED(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z)) SDL_PROC_UNUSED(void, glVertex2d, (GLdouble x, GLdouble y)) -SDL_PROC_UNUSED(void, glVertex2dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glVertex2dv, (const GLdouble *v)) SDL_PROC(void, glVertex2f, (GLfloat x, GLfloat y)) -SDL_PROC_UNUSED(void, glVertex2fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glVertex2fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glVertex2i, (GLint x, GLint y)) -SDL_PROC_UNUSED(void, glVertex2iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glVertex2iv, (const GLint *v)) SDL_PROC_UNUSED(void, glVertex2s, (GLshort x, GLshort y)) -SDL_PROC_UNUSED(void, glVertex2sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glVertex2sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glVertex3d, (GLdouble x, GLdouble y, GLdouble z)) -SDL_PROC_UNUSED(void, glVertex3dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glVertex3dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glVertex3f, (GLfloat x, GLfloat y, GLfloat z)) -SDL_PROC(void, glVertex3fv, (const GLfloat * v)) +SDL_PROC(void, glVertex3fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glVertex3i, (GLint x, GLint y, GLint z)) -SDL_PROC_UNUSED(void, glVertex3iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glVertex3iv, (const GLint *v)) SDL_PROC_UNUSED(void, glVertex3s, (GLshort x, GLshort y, GLshort z)) -SDL_PROC_UNUSED(void, glVertex3sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glVertex3sv, (const GLshort *v)) SDL_PROC_UNUSED(void, glVertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) -SDL_PROC_UNUSED(void, glVertex4dv, (const GLdouble * v)) +SDL_PROC_UNUSED(void, glVertex4dv, (const GLdouble *v)) SDL_PROC_UNUSED(void, glVertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -SDL_PROC_UNUSED(void, glVertex4fv, (const GLfloat * v)) +SDL_PROC_UNUSED(void, glVertex4fv, (const GLfloat *v)) SDL_PROC_UNUSED(void, glVertex4i, (GLint x, GLint y, GLint z, GLint w)) -SDL_PROC_UNUSED(void, glVertex4iv, (const GLint * v)) +SDL_PROC_UNUSED(void, glVertex4iv, (const GLint *v)) SDL_PROC_UNUSED(void, glVertex4s, (GLshort x, GLshort y, GLshort z, GLshort w)) -SDL_PROC_UNUSED(void, glVertex4sv, (const GLshort * v)) +SDL_PROC_UNUSED(void, glVertex4sv, (const GLshort *v)) SDL_PROC(void, glVertexPointer, - (GLint size, GLenum type, GLsizei stride, - const GLvoid * pointer)) + (GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer)) SDL_PROC(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/render/opengl/SDL_render_gl.c b/modules/SDL2/src/render/opengl/SDL_render_gl.c index 6ba6e1d..291afba 100644 --- a/modules/SDL2/src/render/opengl/SDL_render_gl.c +++ b/modules/SDL2/src/render/opengl/SDL_render_gl.c @@ -37,8 +37,8 @@ #include #endif -/* To prevent unnecessary window recreation, - * these should match the defaults selected in SDL_GL_ResetAttributes +/* To prevent unnecessary window recreation, + * these should match the defaults selected in SDL_GL_ResetAttributes */ #define RENDERER_CONTEXT_MAJOR 2 @@ -50,9 +50,6 @@ http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html */ -/* Used to re-create the window with OpenGL capability */ -extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); - static const float inv255f = 1.0f / 255.0f; typedef struct GL_FBOList GL_FBOList; @@ -105,7 +102,7 @@ typedef struct GL_FBOList *framebuffers; /* OpenGL functions */ -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; #include "SDL_glfuncs.h" #undef SDL_PROC @@ -149,32 +146,33 @@ typedef struct GL_FBOList *fbo; } GL_TextureData; -SDL_FORCE_INLINE const char* -GL_TranslateError (GLenum error) +SDL_FORCE_INLINE const char * +GL_TranslateError(GLenum error) { -#define GL_ERROR_TRANSLATE(e) case e: return #e; +#define GL_ERROR_TRANSLATE(e) \ + case e: \ + return #e; switch (error) { - GL_ERROR_TRANSLATE(GL_INVALID_ENUM) - GL_ERROR_TRANSLATE(GL_INVALID_VALUE) - GL_ERROR_TRANSLATE(GL_INVALID_OPERATION) - GL_ERROR_TRANSLATE(GL_OUT_OF_MEMORY) - GL_ERROR_TRANSLATE(GL_NO_ERROR) - GL_ERROR_TRANSLATE(GL_STACK_OVERFLOW) - GL_ERROR_TRANSLATE(GL_STACK_UNDERFLOW) - GL_ERROR_TRANSLATE(GL_TABLE_TOO_LARGE) + GL_ERROR_TRANSLATE(GL_INVALID_ENUM) + GL_ERROR_TRANSLATE(GL_INVALID_VALUE) + GL_ERROR_TRANSLATE(GL_INVALID_OPERATION) + GL_ERROR_TRANSLATE(GL_OUT_OF_MEMORY) + GL_ERROR_TRANSLATE(GL_NO_ERROR) + GL_ERROR_TRANSLATE(GL_STACK_OVERFLOW) + GL_ERROR_TRANSLATE(GL_STACK_UNDERFLOW) + GL_ERROR_TRANSLATE(GL_TABLE_TOO_LARGE) default: return "UNKNOWN"; -} + } #undef GL_ERROR_TRANSLATE } SDL_FORCE_INLINE void GL_ClearErrors(SDL_Renderer *renderer) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; - if (!data->debug_enabled) - { + if (!data->debug_enabled) { return; } if (data->GL_ARB_debug_output_supported) { @@ -196,13 +194,12 @@ GL_ClearErrors(SDL_Renderer *renderer) } SDL_FORCE_INLINE int -GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function) +GL_CheckAllErrors(const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; int ret = 0; - if (!data->debug_enabled) - { + if (!data->debug_enabled) { return 0; } if (data->GL_ARB_debug_output_supported) { @@ -238,20 +235,19 @@ GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, SDL_FILE, SDL_LINE, SDL_FUNCTION) #endif -static int -GL_LoadFunctions(GL_RenderData * data) +static int GL_LoadFunctions(GL_RenderData *data) { #ifdef __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; #else int retval = 0; -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ retval = SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); + } \ + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "SDL_glfuncs.h" @@ -259,10 +255,9 @@ GL_LoadFunctions(GL_RenderData * data) return retval; } -static int -GL_ActivateRenderer(SDL_Renderer * renderer) +static int GL_ActivateRenderer(SDL_Renderer *renderer) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; if (SDL_GL_GetCurrentContext() != data->context) { if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) { @@ -275,11 +270,10 @@ GL_ActivateRenderer(SDL_Renderer * renderer) return 0; } -static void APIENTRY -GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, const void *userParam) +static void APIENTRY GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, const void *userParam) { - SDL_Renderer *renderer = (SDL_Renderer *) userParam; - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + SDL_Renderer *renderer = (SDL_Renderer *)userParam; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; if (type == GL_DEBUG_TYPE_ERROR_ARB) { /* Record this error */ @@ -288,7 +282,7 @@ GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GL if (error_messages) { data->errors = errors; data->error_messages = error_messages; - data->error_messages[data->errors-1] = SDL_strdup(message); + data->error_messages[data->errors - 1] = SDL_strdup(message); } } @@ -304,8 +298,7 @@ GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GL } } -static GL_FBOList * -GL_GetFBO(GL_RenderData *data, Uint32 w, Uint32 h) +static GL_FBOList *GL_GetFBO(GL_RenderData *data, Uint32 w, Uint32 h) { GL_FBOList *result = data->framebuffers; @@ -313,7 +306,7 @@ GL_GetFBO(GL_RenderData *data, Uint32 w, Uint32 h) result = result->next; } - if (!result) { + if (result == NULL) { result = SDL_malloc(sizeof(GL_FBOList)); if (result) { result->w = w; @@ -326,8 +319,7 @@ GL_GetFBO(GL_RenderData *data, Uint32 w, Uint32 h) return result; } -static void -GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void GL_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { /* If the window x/y/w/h changed at all, assume the viewport has been * changed behind our backs. x/y changes might seem weird but viewport @@ -335,13 +327,12 @@ GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) */ if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED || event->event == SDL_WINDOWEVENT_MOVED) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; data->drawstate.viewport_dirty = SDL_TRUE; } } -static int -GL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int GL_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GL_GetDrawableSize(renderer->window, w, h); return 0; @@ -384,13 +375,16 @@ static GLenum GetBlendEquation(SDL_BlendOperation operation) return GL_FUNC_SUBTRACT; case SDL_BLENDOPERATION_REV_SUBTRACT: return GL_FUNC_REVERSE_SUBTRACT; + case SDL_BLENDOPERATION_MINIMUM: + return GL_MIN; + case SDL_BLENDOPERATION_MAXIMUM: + return GL_MAX; default: return GL_INVALID_ENUM; } } -static SDL_bool -GL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool GL_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); @@ -415,7 +409,7 @@ GL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) SDL_FORCE_INLINE SDL_bool convert_format(GL_RenderData *renderdata, Uint32 pixel_format, - GLint* internalFormat, GLenum* format, GLenum* type) + GLint *internalFormat, GLenum *format, GLenum *type) { switch (pixel_format) { case SDL_PIXELFORMAT_ARGB8888: @@ -451,10 +445,9 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format, return SDL_TRUE; } -static int -GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int GL_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; const GLenum textype = renderdata->textype; GL_TextureData *data; GLint internalFormat; @@ -464,7 +457,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) GL_ActivateRenderer(renderer); - renderdata->drawstate.texture = NULL; /* we trash this state. */ + renderdata->drawstate.texture = NULL; /* we trash this state. */ if (texture->access == SDL_TEXTUREACCESS_TARGET && !renderdata->GL_EXT_framebuffer_object_supported) { @@ -477,15 +470,15 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) SDL_GetPixelFormatName(texture->format)); } - data = (GL_TextureData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (GL_TextureData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { return SDL_OutOfMemory(); } if (texture->access == SDL_TEXTUREACCESS_STREAMING) { size_t size; data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format); - size = texture->h * data->pitch; + size = (size_t)texture->h * data->pitch; if (texture->format == SDL_PIXELFORMAT_YV12 || texture->format == SDL_PIXELFORMAT_IYUV) { /* Need to add size for the U and V planes */ @@ -528,13 +521,13 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } else if (renderdata->GL_ARB_texture_rectangle_supported) { texture_w = texture->w; texture_h = texture->h; - data->texw = (GLfloat) texture_w; - data->texh = (GLfloat) texture_h; + data->texw = (GLfloat)texture_w; + data->texh = (GLfloat)texture_h; } else { texture_w = SDL_powerof2(texture->w); texture_h = SDL_powerof2(texture->h); - data->texw = (GLfloat) (texture->w) / texture_w; - data->texh = (GLfloat) texture->h / texture_h; + data->texw = (GLfloat)(texture->w) / texture_w; + data->texh = (GLfloat)texture->h / texture_h; } data->format = format; @@ -555,13 +548,13 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } #ifdef __MACOSX__ #ifndef GL_TEXTURE_STORAGE_HINT_APPLE -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC #endif #ifndef STORAGE_CACHED_APPLE -#define STORAGE_CACHED_APPLE 0x85BE +#define STORAGE_CACHED_APPLE 0x85BE #endif #ifndef STORAGE_SHARED_APPLE -#define STORAGE_SHARED_APPLE 0x85BF +#define STORAGE_SHARED_APPLE 0x85BF #endif if (texture->access == SDL_TEXTUREACCESS_STREAMING) { renderdata->glTexParameteri(textype, GL_TEXTURE_STORAGE_HINT_APPLE, @@ -570,18 +563,15 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->glTexParameteri(textype, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_CACHED_APPLE); } - if (texture->access == SDL_TEXTUREACCESS_STREAMING - && texture->format == SDL_PIXELFORMAT_ARGB8888 - && (texture->w % 8) == 0) { + if (texture->access == SDL_TEXTUREACCESS_STREAMING && texture->format == SDL_PIXELFORMAT_ARGB8888 && (texture->w % 8) == 0) { renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, - (data->pitch / SDL_BYTESPERPIXEL(texture->format))); + (data->pitch / SDL_BYTESPERPIXEL(texture->format))); renderdata->glTexImage2D(textype, 0, internalFormat, texture_w, texture_h, 0, format, type, data->pixels); renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - } - else + } else #endif { renderdata->glTexImage2D(textype, 0, internalFormat, texture_w, @@ -609,8 +599,8 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) GL_CLAMP_TO_EDGE); renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w+1)/2, - (texture_h+1)/2, 0, format, type, NULL); + renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w + 1) / 2, + (texture_h + 1) / 2, 0, format, type, NULL); renderdata->glBindTexture(textype, data->vtexture); renderdata->glTexParameteri(textype, GL_TEXTURE_MIN_FILTER, @@ -621,8 +611,8 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) GL_CLAMP_TO_EDGE); renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w+1)/2, - (texture_h+1)/2, 0, format, type, NULL); + renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w + 1) / 2, + (texture_h + 1) / 2, 0, format, type, NULL); } if (texture->format == SDL_PIXELFORMAT_NV12 || @@ -639,8 +629,8 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) GL_CLAMP_TO_EDGE); renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - renderdata->glTexImage2D(textype, 0, GL_LUMINANCE_ALPHA, (texture_w+1)/2, - (texture_h+1)/2, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NULL); + renderdata->glTexImage2D(textype, 0, GL_LUMINANCE_ALPHA, (texture_w + 1) / 2, + (texture_h + 1) / 2, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NULL); } #endif @@ -653,44 +643,44 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) #if SDL_HAVE_YUV if (data->yuv || data->nv12) { switch (SDL_GetYUVConversionModeForResolution(texture->w, texture->h)) { - case SDL_YUV_CONVERSION_JPEG: - if (data->yuv) { - data->shader = SHADER_YUV_JPEG; - } else if (texture->format == SDL_PIXELFORMAT_NV12) { - data->shader = SHADER_NV12_JPEG; - } else { - data->shader = SHADER_NV21_JPEG; - } - break; - case SDL_YUV_CONVERSION_BT601: - if (data->yuv) { - data->shader = SHADER_YUV_BT601; - } else if (texture->format == SDL_PIXELFORMAT_NV12) { - if (SDL_GetHintBoolean("SDL_RENDER_OPENGL_NV12_RG_SHADER", SDL_FALSE)) { - data->shader = SHADER_NV12_RG_BT601; - } else { - data->shader = SHADER_NV12_RA_BT601; - } + case SDL_YUV_CONVERSION_JPEG: + if (data->yuv) { + data->shader = SHADER_YUV_JPEG; + } else if (texture->format == SDL_PIXELFORMAT_NV12) { + data->shader = SHADER_NV12_JPEG; + } else { + data->shader = SHADER_NV21_JPEG; + } + break; + case SDL_YUV_CONVERSION_BT601: + if (data->yuv) { + data->shader = SHADER_YUV_BT601; + } else if (texture->format == SDL_PIXELFORMAT_NV12) { + if (SDL_GetHintBoolean("SDL_RENDER_OPENGL_NV12_RG_SHADER", SDL_FALSE)) { + data->shader = SHADER_NV12_RG_BT601; } else { - data->shader = SHADER_NV21_BT601; + data->shader = SHADER_NV12_RA_BT601; } - break; - case SDL_YUV_CONVERSION_BT709: - if (data->yuv) { - data->shader = SHADER_YUV_BT709; - } else if (texture->format == SDL_PIXELFORMAT_NV12) { - if (SDL_GetHintBoolean("SDL_RENDER_OPENGL_NV12_RG_SHADER", SDL_FALSE)) { - data->shader = SHADER_NV12_RG_BT709; - } else { - data->shader = SHADER_NV12_RA_BT709; - } + } else { + data->shader = SHADER_NV21_BT601; + } + break; + case SDL_YUV_CONVERSION_BT709: + if (data->yuv) { + data->shader = SHADER_YUV_BT709; + } else if (texture->format == SDL_PIXELFORMAT_NV12) { + if (SDL_GetHintBoolean("SDL_RENDER_OPENGL_NV12_RG_SHADER", SDL_FALSE)) { + data->shader = SHADER_NV12_RG_BT709; } else { - data->shader = SHADER_NV21_BT709; + data->shader = SHADER_NV12_RA_BT709; } - break; - default: - SDL_assert(!"unsupported YUV conversion mode"); - break; + } else { + data->shader = SHADER_NV21_BT709; + } + break; + default: + SDL_assert(!"unsupported YUV conversion mode"); + break; } } #endif /* SDL_HAVE_YUV */ @@ -698,20 +688,19 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return GL_CheckError("", renderer); } -static int -GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int GL_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; const GLenum textype = renderdata->textype; - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; const int texturebpp = SDL_BYTESPERPIXEL(texture->format); - SDL_assert(texturebpp != 0); /* otherwise, division by zero later. */ + SDL_assert_release(texturebpp != 0); /* otherwise, division by zero later. */ GL_ActivateRenderer(renderer); - renderdata->drawstate.texture = NULL; /* we trash this state. */ + renderdata->drawstate.texture = NULL; /* we trash this state. */ renderdata->glBindTexture(textype, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -724,25 +713,25 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, ((pitch + 1) / 2)); /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + rect->h * pitch); + pixels = (const void *)((const Uint8 *)pixels + rect->h * pitch); if (texture->format == SDL_PIXELFORMAT_YV12) { renderdata->glBindTexture(textype, data->vtexture); } else { renderdata->glBindTexture(textype, data->utexture); } - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w+1)/2, (rect->h+1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, data->format, data->formattype, pixels); /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2)); + pixels = (const void *)((const Uint8 *)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2)); if (texture->format == SDL_PIXELFORMAT_YV12) { renderdata->glBindTexture(textype, data->utexture); } else { renderdata->glBindTexture(textype, data->vtexture); } - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w+1)/2, (rect->h+1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, data->format, data->formattype, pixels); } @@ -750,10 +739,10 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, ((pitch + 1) / 2)); /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + rect->h * pitch); + pixels = (const void *)((const Uint8 *)pixels + rect->h * pitch); renderdata->glBindTexture(textype, data->utexture); - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w + 1)/2, (rect->h + 1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, pixels); } #endif @@ -761,20 +750,19 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, } #if SDL_HAVE_YUV -static int -GL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int GL_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; const GLenum textype = renderdata->textype; - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; GL_ActivateRenderer(renderer); - renderdata->drawstate.texture = NULL; /* we trash this state. */ + renderdata->drawstate.texture = NULL; /* we trash this state. */ renderdata->glBindTexture(textype, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -785,32 +773,31 @@ GL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, Upitch); renderdata->glBindTexture(textype, data->utexture); - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w + 1)/2, (rect->h + 1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, data->format, data->formattype, Uplane); renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, Vpitch); renderdata->glBindTexture(textype, data->vtexture); - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w + 1)/2, (rect->h + 1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, data->format, data->formattype, Vplane); return GL_CheckError("glTexSubImage2D()", renderer); } -static int -GL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int GL_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; const GLenum textype = renderdata->textype; - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; GL_ActivateRenderer(renderer); - renderdata->drawstate.texture = NULL; /* we trash this state. */ + renderdata->drawstate.texture = NULL; /* we trash this state. */ renderdata->glBindTexture(textype, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -819,51 +806,47 @@ GL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, rect->h, data->format, data->formattype, Yplane); - renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, UVpitch / 2); renderdata->glBindTexture(textype, data->utexture); - renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2, - (rect->w + 1)/2, (rect->h + 1)/2, + renderdata->glTexSubImage2D(textype, 0, rect->x / 2, rect->y / 2, + (rect->w + 1) / 2, (rect->h + 1) / 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, UVplane); return GL_CheckError("glTexSubImage2D()", renderer); } #endif -static int -GL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int GL_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; data->locked_rect = *rect; *pixels = - (void *) ((Uint8 *) data->pixels + rect->y * data->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)data->pixels + rect->y * data->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = data->pitch; return 0; } -static void -GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void GL_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; const SDL_Rect *rect; void *pixels; rect = &data->locked_rect; pixels = - (void *) ((Uint8 *) data->pixels + rect->y * data->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)data->pixels + rect->y * data->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); GL_UpdateTexture(renderer, texture, rect, pixels, data->pitch); } -static void -GL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void GL_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; const GLenum textype = renderdata->textype; - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; GLenum glScaleMode = (scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR; renderdata->glBindTexture(textype, data->texture); @@ -891,10 +874,9 @@ GL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Scale #endif } -static int -GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int GL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; GL_TextureData *texturedata; GLenum status; @@ -911,7 +893,7 @@ GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } - texturedata = (GL_TextureData *) texture->driverdata; + texturedata = (GL_TextureData *)texture->driverdata; data->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, texturedata->fbo->FBO); /* TODO: check if texture pixel format allows this operation */ data->glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, data->textype, texturedata->texture, 0); @@ -926,19 +908,17 @@ GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) /* !!! FIXME: all these Queue* calls set up the vertex buffer the way the immediate mode !!! FIXME: renderer wants it, but this might want to operate differently if we move to !!! FIXME: VBOs at some point. */ -static int -GL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int GL_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -GL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GL_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (GLfloat), 0, &cmd->data.draw.first); + GLfloat *verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, count * 2 * sizeof(GLfloat), 0, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -951,15 +931,14 @@ GL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FP return 0; } -static int -GL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GL_QueueDrawLines(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { int i; GLfloat prevx, prevy; - const size_t vertlen = (sizeof (GLfloat) * 2) * count; - GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first); + const size_t vertlen = (sizeof(GLfloat) * 2) * count; + GLfloat *verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } cmd->data.draw.count = count; @@ -977,7 +956,7 @@ GL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPo for (i = 1; i < count; i++) { const GLfloat xstart = prevx; const GLfloat ystart = prevy; - const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ + const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ const GLfloat yend = points[i].y + 0.5f; /* bump a little in the direction we are moving in. */ const GLfloat deltax = xend - xstart; @@ -992,11 +971,10 @@ GL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPo return 0; } -static int -GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { GL_TextureData *texturedata = NULL; int i; @@ -1004,13 +982,13 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te GLfloat *verts; size_t sz = 2 * sizeof(GLfloat) + 4 * sizeof(Uint8) + (texture ? 2 : 0) * sizeof(GLfloat); - verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * sz, 0, &cmd->data.draw.first); - if (!verts) { + verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, count * sz, 0, &cmd->data.draw.first); + if (verts == NULL) { return -1; } if (texture) { - texturedata = (GL_TextureData *) texture->driverdata; + texturedata = (GL_TextureData *)texture->driverdata; } cmd->data.draw.count = count; @@ -1029,18 +1007,18 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); + xy_ = (float *)((char *)xy + j * xy_stride); *(verts++) = xy_[0] * scale_x; *(verts++) = xy_[1] * scale_y; /* Not really a float, but it is still 4 bytes and will be cast to the right type in the graphics driver. */ - SDL_memcpy(verts, ((char*)color + j * color_stride), sizeof(*color)); + SDL_memcpy(verts, ((char *)color + j * color_stride), sizeof(*color)); ++verts; if (texture) { - float *uv_ = (float *)((char*)uv + j * uv_stride); + float *uv_ = (float *)((char *)uv + j * uv_stride); *(verts++) = uv_[0] * texturedata->texw; *(verts++) = uv_[1] * texturedata->texh; } @@ -1048,8 +1026,7 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te return 0; } -static int -SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader shader) +static int SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader shader) { const SDL_BlendMode blend = cmd->data.draw.blend; SDL_bool vertex_array; @@ -1065,9 +1042,9 @@ SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader istarget ? viewport->y : (data->drawstate.drawableh - viewport->y - viewport->h), viewport->w, viewport->h); if (viewport->w && viewport->h) { - data->glOrtho((GLdouble) 0, (GLdouble) viewport->w, - (GLdouble) istarget ? 0 : viewport->h, - (GLdouble) istarget ? viewport->h : 0, + data->glOrtho((GLdouble)0, (GLdouble)viewport->w, + (GLdouble)istarget ? 0 : viewport->h, + (GLdouble)istarget ? viewport->h : 0, 0.0, 1.0); } data->glMatrixMode(GL_MODELVIEW); @@ -1121,9 +1098,7 @@ SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader } } - vertex_array = cmd->command == SDL_RENDERCMD_DRAW_POINTS - || cmd->command == SDL_RENDERCMD_DRAW_LINES - || cmd->command == SDL_RENDERCMD_GEOMETRY; + vertex_array = cmd->command == SDL_RENDERCMD_DRAW_POINTS || cmd->command == SDL_RENDERCMD_DRAW_LINES || cmd->command == SDL_RENDERCMD_GEOMETRY; color_array = cmd->command == SDL_RENDERCMD_GEOMETRY; texture_array = cmd->data.draw.texture != NULL; @@ -1159,11 +1134,10 @@ SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader return 0; } -static int -SetCopyState(GL_RenderData *data, const SDL_RenderCommand *cmd) +static int SetCopyState(GL_RenderData *data, const SDL_RenderCommand *cmd) { SDL_Texture *texture = cmd->data.draw.texture; - const GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata; + const GL_TextureData *texturedata = (GL_TextureData *)texture->driverdata; SetDrawState(data, cmd, texturedata->shader); @@ -1199,11 +1173,10 @@ SetCopyState(GL_RenderData *data, const SDL_RenderCommand *cmd) return 0; } -static int -GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int GL_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { /* !!! FIXME: it'd be nice to use a vertex buffer instead of immediate mode... */ - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; if (GL_ActivateRenderer(renderer) < 0) { return -1; @@ -1214,7 +1187,7 @@ GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic int w, h; SDL_GL_GetDrawableSize(renderer->window, &w, &h); if ((w != data->drawstate.drawablew) || (h != data->drawstate.drawableh)) { - data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. + data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. data->drawstate.cliprect_dirty = SDL_TRUE; data->drawstate.drawablew = w; data->drawstate.drawableh = h; @@ -1230,185 +1203,191 @@ GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - const Uint8 r = cmd->data.color.r; - const Uint8 g = cmd->data.color.g; - const Uint8 b = cmd->data.color.b; - const Uint8 a = cmd->data.color.a; - const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); - if (color != data->drawstate.color) { - data->glColor4ub((GLubyte) r, (GLubyte) g, (GLubyte) b, (GLubyte) a); - data->drawstate.color = color; - } - break; + case SDL_RENDERCMD_SETDRAWCOLOR: + { + const Uint8 r = cmd->data.color.r; + const Uint8 g = cmd->data.color.g; + const Uint8 b = cmd->data.color.b; + const Uint8 a = cmd->data.color.a; + const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); + if (color != data->drawstate.color) { + data->glColor4ub((GLubyte)r, (GLubyte)g, (GLubyte)b, (GLubyte)a); + data->drawstate.color = color; } + break; + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &data->drawstate.viewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - data->drawstate.viewport_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &data->drawstate.viewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + data->drawstate.viewport_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { - data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; - data->drawstate.cliprect_enabled_dirty = SDL_TRUE; - } - - if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&data->drawstate.cliprect, rect); - data->drawstate.cliprect_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { + data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; + data->drawstate.cliprect_enabled_dirty = SDL_TRUE; } - case SDL_RENDERCMD_CLEAR: { - const Uint8 r = cmd->data.color.r; - const Uint8 g = cmd->data.color.g; - const Uint8 b = cmd->data.color.b; - const Uint8 a = cmd->data.color.a; - const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); - if (color != data->drawstate.clear_color) { - const GLfloat fr = ((GLfloat) r) * inv255f; - const GLfloat fg = ((GLfloat) g) * inv255f; - const GLfloat fb = ((GLfloat) b) * inv255f; - const GLfloat fa = ((GLfloat) a) * inv255f; - data->glClearColor(fr, fg, fb, fa); - data->drawstate.clear_color = color; - } + if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&data->drawstate.cliprect, rect); + data->drawstate.cliprect_dirty = SDL_TRUE; + } + break; + } - if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { - data->glDisable(GL_SCISSOR_TEST); - data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; - } + case SDL_RENDERCMD_CLEAR: + { + const Uint8 r = cmd->data.color.r; + const Uint8 g = cmd->data.color.g; + const Uint8 b = cmd->data.color.b; + const Uint8 a = cmd->data.color.a; + const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); + if (color != data->drawstate.clear_color) { + const GLfloat fr = ((GLfloat)r) * inv255f; + const GLfloat fg = ((GLfloat)g) * inv255f; + const GLfloat fb = ((GLfloat)b) * inv255f; + const GLfloat fa = ((GLfloat)a) * inv255f; + data->glClearColor(fr, fg, fb, fa); + data->drawstate.clear_color = color; + } - data->glClear(GL_COLOR_BUFFER_BIT); - break; + if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { + data->glDisable(GL_SCISSOR_TEST); + data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + data->glClear(GL_COLOR_BUFFER_BIT); + break; + } - case SDL_RENDERCMD_COPY: /* unused */ - break; + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_COPY: /* unused */ + break; - case SDL_RENDERCMD_DRAW_LINES: { - if (SetDrawState(data, cmd, SHADER_SOLID) == 0) { - size_t count = cmd->data.draw.count; - const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first); + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - /* SetDrawState handles glEnableClientState. */ - data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 2, verts); + case SDL_RENDERCMD_DRAW_LINES: + { + if (SetDrawState(data, cmd, SHADER_SOLID) == 0) { + size_t count = cmd->data.draw.count; + const GLfloat *verts = (GLfloat *)(((Uint8 *)vertices) + cmd->data.draw.first); - if (count > 2) { - /* joined lines cannot be grouped */ - data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)count); - } else { - /* let's group non joined lines */ - SDL_RenderCommand *finalcmd = cmd; - SDL_RenderCommand *nextcmd = cmd->next; - SDL_BlendMode thisblend = cmd->data.draw.blend; - - while (nextcmd != NULL) { - const SDL_RenderCommandType nextcmdtype = nextcmd->command; - if (nextcmdtype != SDL_RENDERCMD_DRAW_LINES) { - break; /* can't go any further on this draw call, different render command up next. */ - } else if (nextcmd->data.draw.count != 2) { - break; /* can't go any further on this draw call, those are joined lines */ - } else if (nextcmd->data.draw.blend != thisblend) { - break; /* can't go any further on this draw call, different blendmode copy up next. */ - } else { - finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ - count += nextcmd->data.draw.count; - } - nextcmd = nextcmd->next; - } + /* SetDrawState handles glEnableClientState. */ + data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 2, verts); - data->glDrawArrays(GL_LINES, 0, (GLsizei)count); - cmd = finalcmd; /* skip any copy commands we just combined in here. */ + if (count > 2) { + /* joined lines cannot be grouped */ + data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)count); + } else { + /* let's group non joined lines */ + SDL_RenderCommand *finalcmd = cmd; + SDL_RenderCommand *nextcmd = cmd->next; + SDL_BlendMode thisblend = cmd->data.draw.blend; + + while (nextcmd != NULL) { + const SDL_RenderCommandType nextcmdtype = nextcmd->command; + if (nextcmdtype != SDL_RENDERCMD_DRAW_LINES) { + break; /* can't go any further on this draw call, different render command up next. */ + } else if (nextcmd->data.draw.count != 2) { + break; /* can't go any further on this draw call, those are joined lines */ + } else if (nextcmd->data.draw.blend != thisblend) { + break; /* can't go any further on this draw call, different blendmode copy up next. */ + } else { + finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ + count += nextcmd->data.draw.count; + } + nextcmd = nextcmd->next; } - } - break; - } - case SDL_RENDERCMD_DRAW_POINTS: - case SDL_RENDERCMD_GEOMETRY: { - /* as long as we have the same copy command in a row, with the - same texture, we can combine them all into a single draw call. */ - SDL_Texture *thistexture = cmd->data.draw.texture; - SDL_BlendMode thisblend = cmd->data.draw.blend; - const SDL_RenderCommandType thiscmdtype = cmd->command; - SDL_RenderCommand *finalcmd = cmd; - SDL_RenderCommand *nextcmd = cmd->next; - size_t count = cmd->data.draw.count; - int ret; - while (nextcmd != NULL) { - const SDL_RenderCommandType nextcmdtype = nextcmd->command; - if (nextcmdtype != thiscmdtype) { - break; /* can't go any further on this draw call, different render command up next. */ - } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { - break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ - } else { - finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ - count += nextcmd->data.draw.count; - } - nextcmd = nextcmd->next; + data->glDrawArrays(GL_LINES, 0, (GLsizei)count); + cmd = finalcmd; /* skip any copy commands we just combined in here. */ } + } + break; + } - if (thistexture) { - ret = SetCopyState(data, cmd); + case SDL_RENDERCMD_DRAW_POINTS: + case SDL_RENDERCMD_GEOMETRY: + { + /* as long as we have the same copy command in a row, with the + same texture, we can combine them all into a single draw call. */ + SDL_Texture *thistexture = cmd->data.draw.texture; + SDL_BlendMode thisblend = cmd->data.draw.blend; + const SDL_RenderCommandType thiscmdtype = cmd->command; + SDL_RenderCommand *finalcmd = cmd; + SDL_RenderCommand *nextcmd = cmd->next; + size_t count = cmd->data.draw.count; + int ret; + while (nextcmd != NULL) { + const SDL_RenderCommandType nextcmdtype = nextcmd->command; + if (nextcmdtype != thiscmdtype) { + break; /* can't go any further on this draw call, different render command up next. */ + } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { + break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ } else { - ret = SetDrawState(data, cmd, SHADER_SOLID); + finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ + count += nextcmd->data.draw.count; } + nextcmd = nextcmd->next; + } - if (ret == 0) { - const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first); - int op = GL_TRIANGLES; /* SDL_RENDERCMD_GEOMETRY */ - if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { - op = GL_POINTS; - } + if (thistexture) { + ret = SetCopyState(data, cmd); + } else { + ret = SetDrawState(data, cmd, SHADER_SOLID); + } - if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { - /* SetDrawState handles glEnableClientState. */ - data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 2, verts); + if (ret == 0) { + const GLfloat *verts = (GLfloat *)(((Uint8 *)vertices) + cmd->data.draw.first); + int op = GL_TRIANGLES; /* SDL_RENDERCMD_GEOMETRY */ + if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { + op = GL_POINTS; + } + + if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { + /* SetDrawState handles glEnableClientState. */ + data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 2, verts); + } else { + /* SetDrawState handles glEnableClientState. */ + if (thistexture) { + data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 5, verts + 0); + data->glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(float) * 5, verts + 2); + data->glTexCoordPointer(2, GL_FLOAT, sizeof(float) * 5, verts + 3); } else { - /* SetDrawState handles glEnableClientState. */ - if (thistexture) { - data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 5, verts + 0); - data->glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(float) * 5, verts + 2); - data->glTexCoordPointer(2, GL_FLOAT, sizeof(float) * 5, verts + 3); - } else { - data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 3, verts + 0); - data->glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(float) * 3, verts + 2); - } + data->glVertexPointer(2, GL_FLOAT, sizeof(float) * 3, verts + 0); + data->glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(float) * 3, verts + 2); } + } - data->glDrawArrays(op, 0, (GLsizei) count); + data->glDrawArrays(op, 0, (GLsizei)count); - /* Restore previously set color when we're done. */ - if (thiscmdtype != SDL_RENDERCMD_DRAW_POINTS) { - Uint32 color = data->drawstate.color; - GLubyte a = (GLubyte)((color >> 24) & 0xFF); - GLubyte r = (GLubyte)((color >> 16) & 0xFF); - GLubyte g = (GLubyte)((color >> 8) & 0xFF); - GLubyte b = (GLubyte)((color >> 0) & 0xFF); - data->glColor4ub(r, g, b, a); - } + /* Restore previously set color when we're done. */ + if (thiscmdtype != SDL_RENDERCMD_DRAW_POINTS) { + Uint32 color = data->drawstate.color; + GLubyte a = (GLubyte)((color >> 24) & 0xFF); + GLubyte r = (GLubyte)((color >> 16) & 0xFF); + GLubyte g = (GLubyte)((color >> 8) & 0xFF); + GLubyte b = (GLubyte)((color >> 0) & 0xFF); + data->glColor4ub(r, g, b, a); } - - cmd = finalcmd; /* skip any copy commands we just combined in here. */ - break; } - case SDL_RENDERCMD_NO_OP: - break; + cmd = finalcmd; /* skip any copy commands we just combined in here. */ + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -1432,11 +1411,10 @@ GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic return GL_CheckError("", renderer); } -static int -GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 pixel_format, void * pixels, int pitch) +static int GL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 pixel_format, void *pixels, int pitch) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ARGB8888; void *temp_pixels; int temp_pitch; @@ -1453,13 +1431,13 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, SDL_GetPixelFormatName(temp_format)); } - if (!rect->w || !rect->h) { - return 0; /* nothing to do. */ + if (rect->w == 0 || rect->h == 0) { + return 0; /* nothing to do. */ } temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format); - temp_pixels = SDL_malloc(rect->h * temp_pitch); - if (!temp_pixels) { + temp_pixels = SDL_malloc((size_t)rect->h * temp_pitch); + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } @@ -1469,7 +1447,7 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, data->glPixelStorei(GL_PACK_ROW_LENGTH, (temp_pitch / SDL_BYTESPERPIXEL(temp_format))); - data->glReadPixels(rect->x, renderer->target ? rect->y : (h-rect->y)-rect->h, + data->glReadPixels(rect->x, renderer->target ? rect->y : (h - rect->y) - rect->h, rect->w, rect->h, format, type, temp_pixels); if (GL_CheckError("glReadPixels()", renderer) < 0) { @@ -1481,8 +1459,8 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, if (!renderer->target) { SDL_bool isstack; length = rect->w * SDL_BYTESPERPIXEL(temp_format); - src = (Uint8*)temp_pixels + (rect->h-1)*temp_pitch; - dst = (Uint8*)temp_pixels; + src = (Uint8 *)temp_pixels + (rect->h - 1) * temp_pitch; + dst = (Uint8 *)temp_pixels; tmp = SDL_small_alloc(Uint8, length, &isstack); rows = rect->h / 2; while (rows--) { @@ -1503,19 +1481,17 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return status; } -static int -GL_RenderPresent(SDL_Renderer * renderer) +static int GL_RenderPresent(SDL_Renderer *renderer) { GL_ActivateRenderer(renderer); return SDL_GL_SwapWindowWithResult(renderer->window); } -static void -GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void GL_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata; - GL_TextureData *data = (GL_TextureData *) texture->driverdata; + GL_RenderData *renderdata = (GL_RenderData *)renderer->driverdata; + GL_TextureData *data = (GL_TextureData *)texture->driverdata; GL_ActivateRenderer(renderer); @@ -1526,7 +1502,7 @@ GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->drawstate.target = NULL; } - if (!data) { + if (data == NULL) { return; } if (data->texture) { @@ -1543,10 +1519,9 @@ GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture->driverdata = NULL; } -static void -GL_DestroyRenderer(SDL_Renderer * renderer) +static void GL_DestroyRenderer(SDL_Renderer *renderer) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; if (data) { if (data->context != NULL) { @@ -1556,7 +1531,7 @@ GL_DestroyRenderer(SDL_Renderer * renderer) GL_ClearErrors(renderer); if (data->GL_ARB_debug_output_supported) { - PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); + PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC)SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); /* Uh oh, we don't have a safe way of removing ourselves from the callback chain, if it changed after we set our callback. */ /* For now, just always replace the callback with the original one */ @@ -1581,11 +1556,10 @@ GL_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int -GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh) +static int GL_BindTexture(SDL_Renderer *renderer, SDL_Texture *texture, float *texw, float *texh) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; - GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; + GL_TextureData *texturedata = (GL_TextureData *)texture->driverdata; const GLenum textype = data->textype; GL_ActivateRenderer(renderer); @@ -1632,11 +1606,10 @@ GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, floa return 0; } -static int -GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) +static int GL_UnbindTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; - GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata; + GL_RenderData *data = (GL_RenderData *)renderer->driverdata; + GL_TextureData *texturedata = (GL_TextureData *)texture->driverdata; const GLenum textype = data->textype; GL_ActivateRenderer(renderer); @@ -1680,8 +1653,7 @@ GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) return 0; } -static int -GL_SetVSync(SDL_Renderer * renderer, const int vsync) +static int GL_SetVSync(SDL_Renderer *renderer, const int vsync) { int retval; if (vsync) { @@ -1700,26 +1672,25 @@ GL_SetVSync(SDL_Renderer * renderer, const int vsync) return retval; } -static SDL_bool -GL_IsProbablyAccelerated(const GL_RenderData *data) +static SDL_bool GL_IsProbablyAccelerated(const GL_RenderData *data) { /*const char *vendor = (const char *) data->glGetString(GL_VENDOR);*/ - const char *renderer = (const char *) data->glGetString(GL_RENDERER); + const char *renderer = (const char *)data->glGetString(GL_RENDERER); #if defined(__WINDOWS__) || defined(__WINGDK__) if (SDL_strcmp(renderer, "GDI Generic") == 0) { - return SDL_FALSE; /* Microsoft's fallback software renderer. Fix your system! */ + return SDL_FALSE; /* Microsoft's fallback software renderer. Fix your system! */ } #endif #ifdef __APPLE__ if (SDL_strcmp(renderer, "Apple Software Renderer") == 0) { - return SDL_FALSE; /* (a probably very old) Apple software-based OpenGL. */ + return SDL_FALSE; /* (a probably very old) Apple software-based OpenGL. */ } #endif - if (SDL_strcmp(renderer, "Software Rasterizer") == 0) { - return SDL_FALSE; /* (a probably very old) Software Mesa, or some other generic thing. */ + if (SDL_strcmp(renderer, "Software Rasterizer") == 0) { + return SDL_FALSE; /* (a probably very old) Software Mesa, or some other generic thing. */ } /* !!! FIXME: swrast? llvmpipe? softpipe? */ @@ -1727,8 +1698,7 @@ GL_IsProbablyAccelerated(const GL_RenderData *data) return SDL_TRUE; } -static SDL_Renderer * -GL_CreateRenderer(SDL_Window * window, Uint32 flags) +static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; GL_RenderData *data; @@ -1759,14 +1729,14 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) } #endif - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); goto error; } - data = (GL_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (GL_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); goto error; @@ -1786,7 +1756,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = GL_SetTextureScaleMode; renderer->SetRenderTarget = GL_SetRenderTarget; renderer->QueueSetViewport = GL_QueueSetViewport; - renderer->QueueSetDrawColor = GL_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = GL_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = GL_QueueDrawPoints; renderer->QueueDrawLines = GL_QueueDrawLines; renderer->QueueGeometry = GL_QueueGeometry; @@ -1799,7 +1769,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->GL_BindTexture = GL_BindTexture; renderer->GL_UnbindTexture = GL_UnbindTexture; renderer->info = GL_RenderDriver.info; - renderer->info.flags = 0; /* will set some flags below. */ + renderer->info.flags = 0; /* will set some flags below. */ renderer->driverdata = data; renderer->window = window; @@ -1849,7 +1819,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) data->debug_enabled = SDL_TRUE; } if (data->debug_enabled && SDL_GL_ExtensionSupported("GL_ARB_debug_output")) { - PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); + PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC)SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); data->GL_ARB_debug_output_supported = SDL_TRUE; data->glGetPointerv(GL_DEBUG_CALLBACK_FUNCTION_ARB, (GLvoid **)(char *)&data->next_error_callback); @@ -1861,13 +1831,13 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) } hint = SDL_getenv("GL_ARB_texture_non_power_of_two"); - if (!hint || *hint != '0') { + if (hint == NULL || *hint != '0') { SDL_bool isGL2 = SDL_FALSE; const char *verstr = (const char *)data->glGetString(GL_VERSION); if (verstr) { char verbuf[16]; char *ptr; - SDL_strlcpy(verbuf, verstr, sizeof (verbuf)); + SDL_strlcpy(verbuf, verstr, sizeof(verbuf)); ptr = SDL_strchr(verbuf, '.'); if (ptr) { *ptr = '\0'; @@ -1902,7 +1872,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) /* Check for multitexture support */ if (SDL_GL_ExtensionSupported("GL_ARB_multitexture")) { - data->glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) SDL_GL_GetProcAddress("glActiveTextureARB"); + data->glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)SDL_GL_GetProcAddress("glActiveTextureARB"); if (data->glActiveTextureARB) { data->GL_ARB_multitexture_supported = SDL_TRUE; data->glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &data->num_texture_units); @@ -1985,24 +1955,19 @@ error: return NULL; } - SDL_RenderDriver GL_RenderDriver = { GL_CreateRenderer, - { - "opengl", - (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), - 4, - { - SDL_PIXELFORMAT_ARGB8888, - SDL_PIXELFORMAT_ABGR8888, - SDL_PIXELFORMAT_RGB888, - SDL_PIXELFORMAT_BGR888 - }, - 0, - 0} + { "opengl", + (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), + 4, + { SDL_PIXELFORMAT_ARGB8888, + SDL_PIXELFORMAT_ABGR8888, + SDL_PIXELFORMAT_RGB888, + SDL_PIXELFORMAT_BGR888 }, + 0, + 0 } }; - #endif /* SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/render/opengl/SDL_shaders_gl.c b/modules/SDL2/src/render/opengl/SDL_shaders_gl.c index f5c01a2..82b04ce 100644 --- a/modules/SDL2/src/render/opengl/SDL_shaders_gl.c +++ b/modules/SDL2/src/render/opengl/SDL_shaders_gl.c @@ -61,6 +61,8 @@ struct GL_ShaderContext GL_ShaderData shaders[NUM_SHADERS]; }; +/* *INDENT-OFF* */ /* clang-format off */ + #define COLOR_VERTEX_SHADER \ "varying vec4 v_color;\n" \ "\n" \ @@ -235,8 +237,7 @@ struct GL_ShaderContext * NOTE: Always use sampler2D, etc here. We'll #define them to the * texture_rectangle versions if we choose to use that extension. */ -static const char *shader_source[NUM_SHADERS][2] = -{ +static const char *shader_source[NUM_SHADERS][2] = { /* SHADER_NONE */ { NULL, NULL }, @@ -387,8 +388,9 @@ static const char *shader_source[NUM_SHADERS][2] = #endif /* SDL_HAVE_YUV */ }; -static SDL_bool -CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, const char *source) +/* *INDENT-ON* */ /* clang-format on */ + +static SDL_bool CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, const char *source) { GLint status; const char *sources[2]; @@ -405,13 +407,13 @@ CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, co char *info; ctx->glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); - info = SDL_small_alloc(char, length+1, &isstack); + info = SDL_small_alloc(char, length + 1, &isstack); ctx->glGetInfoLogARB(shader, length, NULL, info); SDL_LogError(SDL_LOG_CATEGORY_RENDER, - "Failed to compile shader:\n%s%s\n%s", defines, source, info); + "Failed to compile shader:\n%s%s\n%s", defines, source, info); #ifdef DEBUG_SHADERS fprintf(stderr, - "Failed to compile shader:\n%s%s\n%s", defines, source, info); + "Failed to compile shader:\n%s%s\n%s", defines, source, info); #endif SDL_small_free(info, isstack); @@ -421,8 +423,7 @@ CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, co } } -static SDL_bool -CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) +static SDL_bool CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) { const int num_tmus_bound = 4; const char *vert_defines = ""; @@ -439,12 +440,12 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) /* Make sure we use the correct sampler type for our texture type */ if (ctx->GL_ARB_texture_rectangle_supported) { frag_defines = -"#define sampler2D sampler2DRect\n" -"#define texture2D texture2DRect\n" -"#define UVCoordScale 0.5\n"; + "#define sampler2D sampler2DRect\n" + "#define texture2D texture2DRect\n" + "#define UVCoordScale 0.5\n"; } else { - frag_defines = -"#define UVCoordScale 1.0\n"; + frag_defines = + "#define UVCoordScale 1.0\n"; } /* Create one program object to rule them all */ @@ -471,7 +472,7 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) ctx->glUseProgramObjectARB(data->program); for (i = 0; i < num_tmus_bound; ++i) { char tex_name[10]; - SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i); + (void)SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i); location = ctx->glGetUniformLocationARB(data->program, tex_name); if (location >= 0) { ctx->glUniform1iARB(location, i); @@ -479,26 +480,24 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) } ctx->glUseProgramObjectARB(0); - return (ctx->glGetError() == GL_NO_ERROR); + return ctx->glGetError() == GL_NO_ERROR; } -static void -DestroyShaderProgram(GL_ShaderContext *ctx, GL_ShaderData *data) +static void DestroyShaderProgram(GL_ShaderContext *ctx, GL_ShaderData *data) { ctx->glDeleteObjectARB(data->vert_shader); ctx->glDeleteObjectARB(data->frag_shader); ctx->glDeleteObjectARB(data->program); } -GL_ShaderContext * -GL_CreateShaderContext(void) +GL_ShaderContext *GL_CreateShaderContext(void) { GL_ShaderContext *ctx; SDL_bool shaders_supported; int i; ctx = (GL_ShaderContext *)SDL_calloc(1, sizeof(*ctx)); - if (!ctx) { + if (ctx == NULL) { return NULL; } @@ -514,20 +513,20 @@ GL_CreateShaderContext(void) SDL_GL_ExtensionSupported("GL_ARB_shading_language_100") && SDL_GL_ExtensionSupported("GL_ARB_vertex_shader") && SDL_GL_ExtensionSupported("GL_ARB_fragment_shader")) { - ctx->glGetError = (GLenum (*)(void)) SDL_GL_GetProcAddress("glGetError"); - ctx->glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) SDL_GL_GetProcAddress("glAttachObjectARB"); - ctx->glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) SDL_GL_GetProcAddress("glCompileShaderARB"); - ctx->glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress("glCreateProgramObjectARB"); - ctx->glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) SDL_GL_GetProcAddress("glCreateShaderObjectARB"); - ctx->glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) SDL_GL_GetProcAddress("glDeleteObjectARB"); - ctx->glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) SDL_GL_GetProcAddress("glGetInfoLogARB"); - ctx->glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) SDL_GL_GetProcAddress("glGetObjectParameterivARB"); - ctx->glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) SDL_GL_GetProcAddress("glGetUniformLocationARB"); - ctx->glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) SDL_GL_GetProcAddress("glLinkProgramARB"); - ctx->glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) SDL_GL_GetProcAddress("glShaderSourceARB"); - ctx->glUniform1iARB = (PFNGLUNIFORM1IARBPROC) SDL_GL_GetProcAddress("glUniform1iARB"); - ctx->glUniform1fARB = (PFNGLUNIFORM1FARBPROC) SDL_GL_GetProcAddress("glUniform1fARB"); - ctx->glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress("glUseProgramObjectARB"); + ctx->glGetError = (GLenum(*)(void))SDL_GL_GetProcAddress("glGetError"); + ctx->glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)SDL_GL_GetProcAddress("glAttachObjectARB"); + ctx->glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)SDL_GL_GetProcAddress("glCompileShaderARB"); + ctx->glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glCreateProgramObjectARB"); + ctx->glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)SDL_GL_GetProcAddress("glCreateShaderObjectARB"); + ctx->glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)SDL_GL_GetProcAddress("glDeleteObjectARB"); + ctx->glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)SDL_GL_GetProcAddress("glGetInfoLogARB"); + ctx->glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)SDL_GL_GetProcAddress("glGetObjectParameterivARB"); + ctx->glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC)SDL_GL_GetProcAddress("glGetUniformLocationARB"); + ctx->glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)SDL_GL_GetProcAddress("glLinkProgramARB"); + ctx->glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)SDL_GL_GetProcAddress("glShaderSourceARB"); + ctx->glUniform1iARB = (PFNGLUNIFORM1IARBPROC)SDL_GL_GetProcAddress("glUniform1iARB"); + ctx->glUniform1fARB = (PFNGLUNIFORM1FARBPROC)SDL_GL_GetProcAddress("glUniform1fARB"); + ctx->glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glUseProgramObjectARB"); if (ctx->glGetError && ctx->glAttachObjectARB && ctx->glCompileShaderARB && @@ -563,14 +562,12 @@ GL_CreateShaderContext(void) return ctx; } -void -GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader) +void GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader) { ctx->glUseProgramObjectARB(ctx->shaders[shader].program); } -void -GL_DestroyShaderContext(GL_ShaderContext *ctx) +void GL_DestroyShaderContext(GL_ShaderContext *ctx) { int i; diff --git a/modules/SDL2/src/render/opengl/SDL_shaders_gl.h b/modules/SDL2/src/render/opengl/SDL_shaders_gl.h index 3f84d4e..abc34b3 100644 --- a/modules/SDL2/src/render/opengl/SDL_shaders_gl.h +++ b/modules/SDL2/src/render/opengl/SDL_shaders_gl.h @@ -26,7 +26,8 @@ /* OpenGL shader implementation */ -typedef enum { +typedef enum +{ SHADER_INVALID = -1, SHADER_NONE, SHADER_SOLID, @@ -50,7 +51,7 @@ typedef enum { typedef struct GL_ShaderContext GL_ShaderContext; -extern GL_ShaderContext * GL_CreateShaderContext(void); +extern GL_ShaderContext *GL_CreateShaderContext(void); extern void GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader); extern void GL_DestroyShaderContext(GL_ShaderContext *ctx); diff --git a/modules/SDL2/src/render/opengles/SDL_glesfuncs.h b/modules/SDL2/src/render/opengles/SDL_glesfuncs.h index d6b36e2..2b81b85 100644 --- a/modules/SDL2/src/render/opengles/SDL_glesfuncs.h +++ b/modules/SDL2/src/render/opengles/SDL_glesfuncs.h @@ -44,7 +44,7 @@ SDL_PROC(void, glLoadIdentity, (void)) SDL_PROC(void, glMatrixMode, (GLenum)) SDL_PROC(void, glOrthof, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) SDL_PROC(void, glPixelStorei, (GLenum, GLint)) -SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) +SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) SDL_PROC(void, glTexCoordPointer, (GLint, GLenum, GLsizei, const GLvoid *)) SDL_PROC(void, glTexEnvf, (GLenum, GLenum, GLfloat)) @@ -57,6 +57,6 @@ SDL_PROC(void, glViewport, (GLint, GLint, GLsizei, GLsizei)) SDL_PROC_OES(void, glBindFramebufferOES, (GLenum, GLuint)) SDL_PROC_OES(void, glFramebufferTexture2DOES, (GLenum, GLenum, GLenum, GLuint, GLint)) SDL_PROC_OES(GLenum, glCheckFramebufferStatusOES, (GLenum)) -SDL_PROC_OES(void, glDeleteFramebuffersOES, (GLsizei, const GLuint*)) +SDL_PROC_OES(void, glDeleteFramebuffersOES, (GLsizei, const GLuint *)) /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/render/opengles/SDL_render_gles.c b/modules/SDL2/src/render/opengles/SDL_render_gles.c index 8910d32..962acba 100644 --- a/modules/SDL2/src/render/opengles/SDL_render_gles.c +++ b/modules/SDL2/src/render/opengles/SDL_render_gles.c @@ -50,7 +50,7 @@ glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) /* OpenGL ES 1.1 renderer implementation, based on the OpenGL renderer */ /* Used to re-create the window with OpenGL ES capability */ -extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); +extern int SDL_RecreateWindow(SDL_Window *window, Uint32 flags); static const float inv255f = 1.0f / 255.0f; @@ -58,9 +58,9 @@ typedef struct GLES_FBOList GLES_FBOList; struct GLES_FBOList { - Uint32 w, h; - GLuint FBO; - GLES_FBOList *next; + Uint32 w, h; + GLuint FBO; + GLES_FBOList *next; }; typedef struct @@ -85,8 +85,8 @@ typedef struct { SDL_GLContext context; -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; -#define SDL_PROC_OES SDL_PROC +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; +#define SDL_PROC_OES SDL_PROC #include "SDL_glesfuncs.h" #undef SDL_PROC #undef SDL_PROC_OES @@ -97,6 +97,7 @@ typedef struct SDL_bool GL_OES_blend_func_separate_supported; SDL_bool GL_OES_blend_equation_separate_supported; SDL_bool GL_OES_blend_subtract_supported; + SDL_bool GL_EXT_blend_minmax_supported; GLES_DrawStateCache drawstate; } GLES_RenderData; @@ -114,8 +115,7 @@ typedef struct GLES_FBOList *fbo; } GLES_TextureData; -static int -GLES_SetError(const char *prefix, GLenum result) +static int GLES_SetError(const char *prefix, GLenum result) { const char *error; @@ -148,7 +148,7 @@ GLES_SetError(const char *prefix, GLenum result) return SDL_SetError("%s: %s", prefix, error); } -static int GLES_LoadFunctions(GLES_RenderData * data) +static int GLES_LoadFunctions(GLES_RenderData *data) { #if SDL_VIDEO_DRIVER_UIKIT #define __SDL_NOGETPROCADDR__ @@ -159,20 +159,20 @@ static int GLES_LoadFunctions(GLES_RenderData * data) #endif #ifdef __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; -#define SDL_PROC_OES(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; +#define SDL_PROC_OES(ret, func, params) data->func = func; #else -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ return SDL_SetError("Couldn't load GLES function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); -#define SDL_PROC_OES(ret,func,params) \ - do { \ + } \ + } while (0); +#define SDL_PROC_OES(ret, func, params) \ + do { \ data->func = SDL_GL_GetProcAddress(#func); \ - } while ( 0 ); + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "SDL_glesfuncs.h" @@ -181,29 +181,26 @@ static int GLES_LoadFunctions(GLES_RenderData * data) return 0; } -static GLES_FBOList * -GLES_GetFBO(GLES_RenderData *data, Uint32 w, Uint32 h) +static GLES_FBOList *GLES_GetFBO(GLES_RenderData *data, Uint32 w, Uint32 h) { - GLES_FBOList *result = data->framebuffers; - while ((result) && ((result->w != w) || (result->h != h)) ) { - result = result->next; - } - if (result == NULL) { - result = SDL_malloc(sizeof(GLES_FBOList)); - result->w = w; - result->h = h; - data->glGenFramebuffersOES(1, &result->FBO); - result->next = data->framebuffers; - data->framebuffers = result; - } - return result; + GLES_FBOList *result = data->framebuffers; + while ((result) && ((result->w != w) || (result->h != h))) { + result = result->next; + } + if (result == NULL) { + result = SDL_malloc(sizeof(GLES_FBOList)); + result->w = w; + result->h = h; + data->glGenFramebuffersOES(1, &result->FBO); + result->next = data->framebuffers; + data->framebuffers = result; + } + return result; } - -static int -GLES_ActivateRenderer(SDL_Renderer * renderer) +static int GLES_ActivateRenderer(SDL_Renderer *renderer) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; if (SDL_GL_GetCurrentContext() != data->context) { if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) { @@ -214,10 +211,9 @@ GLES_ActivateRenderer(SDL_Renderer * renderer) return 0; } -static void -GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void GLES_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; if (event->event == SDL_WINDOWEVENT_MINIMIZED) { /* According to Apple documentation, we need to finish drawing NOW! */ @@ -225,8 +221,7 @@ GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } } -static int -GLES_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int GLES_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GL_GetDrawableSize(renderer->window, w, h); return 0; @@ -269,15 +264,18 @@ static GLenum GetBlendEquation(SDL_BlendOperation operation) return GL_FUNC_SUBTRACT_OES; case SDL_BLENDOPERATION_REV_SUBTRACT: return GL_FUNC_REVERSE_SUBTRACT_OES; + case SDL_BLENDOPERATION_MINIMUM: + return GL_MIN_EXT; + case SDL_BLENDOPERATION_MAXIMUM: + return GL_MAX_EXT; default: return GL_INVALID_ENUM; } } -static SDL_bool -GLES_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool GLES_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode); @@ -302,13 +300,18 @@ GLES_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) if (colorOperation != SDL_BLENDOPERATION_ADD && !data->GL_OES_blend_subtract_supported) { return SDL_FALSE; } + if (colorOperation == SDL_BLENDOPERATION_MINIMUM && !data->GL_EXT_blend_minmax_supported) { + return SDL_FALSE; + } + if (colorOperation == SDL_BLENDOPERATION_MAXIMUM && !data->GL_EXT_blend_minmax_supported) { + return SDL_FALSE; + } return SDL_TRUE; } -static int -GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int GLES_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES_RenderData *renderdata = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *renderdata = (GLES_RenderData *)renderer->driverdata; GLES_TextureData *data; GLint internalFormat; GLenum format, type; @@ -328,8 +331,8 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return SDL_SetError("Texture format not supported"); } - data = (GLES_TextureData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (GLES_TextureData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { return SDL_OutOfMemory(); } @@ -342,7 +345,6 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } } - if (texture->access == SDL_TEXTUREACCESS_TARGET) { if (!renderdata->GL_OES_framebuffer_object_supported) { SDL_free(data); @@ -353,7 +355,6 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) data->fbo = NULL; } - renderdata->glGetError(); renderdata->glEnable(GL_TEXTURE_2D); renderdata->glGenTextures(1, &data->texture); @@ -370,8 +371,8 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) /* no NPOV textures allowed in OpenGL ES (yet) */ texture_w = SDL_powerof2(texture->w); texture_h = SDL_powerof2(texture->h); - data->texw = (GLfloat) texture->w / texture_w; - data->texh = (GLfloat) texture->h / texture_h; + data->texw = (GLfloat)texture->w / texture_w; + data->texh = (GLfloat)texture->h / texture_h; data->format = format; data->formattype = type; @@ -401,12 +402,11 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int GLES_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { - GLES_RenderData *renderdata = (GLES_RenderData *) renderer->driverdata; - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; + GLES_RenderData *renderdata = (GLES_RenderData *)renderer->driverdata; + GLES_TextureData *data = (GLES_TextureData *)texture->driverdata; Uint8 *blob = NULL; Uint8 *src; int srcPitch; @@ -424,7 +424,7 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, src = (Uint8 *)pixels; if (pitch != srcPitch) { blob = (Uint8 *)SDL_malloc(srcPitch * rect->h); - if (!blob) { + if (blob == NULL) { return SDL_OutOfMemory(); } src = blob; @@ -442,14 +442,14 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, renderdata->glBindTexture(data->type, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); renderdata->glTexSubImage2D(data->type, - 0, - rect->x, - rect->y, - rect->w, - rect->h, - data->format, - data->formattype, - src); + 0, + rect->x, + rect->y, + rect->w, + rect->h, + data->format, + data->formattype, + src); renderdata->glDisable(data->type); SDL_free(blob); @@ -462,23 +462,21 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static int -GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int GLES_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; + GLES_TextureData *data = (GLES_TextureData *)texture->driverdata; *pixels = - (void *) ((Uint8 *) data->pixels + rect->y * data->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)data->pixels + rect->y * data->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = data->pitch; return 0; } -static void -GLES_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void GLES_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; + GLES_TextureData *data = (GLES_TextureData *)texture->driverdata; SDL_Rect rect; /* We do whole texture updates, at least for now */ @@ -489,11 +487,10 @@ GLES_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) GLES_UpdateTexture(renderer, texture, &rect, data->pixels, data->pitch); } -static void -GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void GLES_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - GLES_RenderData *renderdata = (GLES_RenderData *) renderer->driverdata; - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; + GLES_RenderData *renderdata = (GLES_RenderData *)renderer->driverdata; + GLES_TextureData *data = (GLES_TextureData *)texture->driverdata; GLenum glScaleMode = (scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR; renderdata->glBindTexture(data->type, data->texture); @@ -501,10 +498,9 @@ GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Sca renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER, glScaleMode); } -static int -GLES_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int GLES_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; GLES_TextureData *texturedata = NULL; GLenum status; @@ -519,7 +515,7 @@ GLES_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } - texturedata = (GLES_TextureData *) texture->driverdata; + texturedata = (GLES_TextureData *)texture->driverdata; data->glBindFramebufferOES(GL_FRAMEBUFFER_OES, texturedata->fbo->FBO); /* TODO: check if texture pixel format allows this operation */ data->glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, texturedata->type, texturedata->texture, 0); @@ -531,20 +527,17 @@ GLES_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } - -static int -GLES_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int GLES_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -GLES_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GLES_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (GLfloat), 0, &cmd->data.draw.first); + GLfloat *verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, count * 2 * sizeof(GLfloat), 0, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -557,15 +550,14 @@ GLES_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_ return 0; } -static int -GLES_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GLES_QueueDrawLines(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { int i; GLfloat prevx, prevy; - const size_t vertlen = (sizeof (GLfloat) * 2) * count; - GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first); + const size_t vertlen = (sizeof(GLfloat) * 2) * count; + GLfloat *verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } cmd->data.draw.count = count; @@ -583,7 +575,7 @@ GLES_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F for (i = 1; i < count; i++) { const GLfloat xstart = prevx; const GLfloat ystart = prevy; - const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ + const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ const GLfloat yend = points[i].y + 0.5f; /* bump a little in the direction we are moving in. */ const GLfloat deltax = xend - xstart; @@ -598,11 +590,10 @@ GLES_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F return 0; } -static int -GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { GLES_TextureData *texturedata = NULL; int i; @@ -610,13 +601,13 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture * GLfloat *verts; int sz = 2 + 4 + (texture ? 2 : 0); - verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * sz * sizeof (GLfloat), 0, &cmd->data.draw.first); - if (!verts) { + verts = (GLfloat *)SDL_AllocateRenderVertices(renderer, count * sz * sizeof(GLfloat), 0, &cmd->data.draw.first); + if (verts == NULL) { return -1; } if (texture) { - texturedata = (GLES_TextureData *) texture->driverdata; + texturedata = (GLES_TextureData *)texture->driverdata; } cmd->data.draw.count = count; @@ -636,8 +627,8 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture * j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); *(verts++) = xy_[0] * scale_x; *(verts++) = xy_[1] * scale_y; @@ -648,7 +639,7 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture * *(verts++) = col_.a * inv255f; if (texture) { - float *uv_ = (float *)((char*)uv + j * uv_stride); + float *uv_ = (float *)((char *)uv + j * uv_stride); *(verts++) = uv_[0] * texturedata->texw; *(verts++) = uv_[1] * texturedata->texh; } @@ -656,8 +647,7 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture * return 0; } -static void -SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd) +static void SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd) { const SDL_BlendMode blend = cmd->data.draw.blend; const Uint8 r = cmd->data.draw.r; @@ -667,10 +657,10 @@ SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd) const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); if (color != data->drawstate.color) { - const GLfloat fr = ((GLfloat) r) * inv255f; - const GLfloat fg = ((GLfloat) g) * inv255f; - const GLfloat fb = ((GLfloat) b) * inv255f; - const GLfloat fa = ((GLfloat) a) * inv255f; + const GLfloat fr = ((GLfloat)r) * inv255f; + const GLfloat fg = ((GLfloat)g) * inv255f; + const GLfloat fb = ((GLfloat)b) * inv255f; + const GLfloat fa = ((GLfloat)a) * inv255f; data->glColor4f(fr, fg, fb, fa); data->drawstate.color = color; } @@ -684,9 +674,9 @@ SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd) istarget ? viewport->y : (data->drawstate.drawableh - viewport->y - viewport->h), viewport->w, viewport->h); if (viewport->w && viewport->h) { - data->glOrthof((GLfloat) 0, (GLfloat) viewport->w, - (GLfloat) (istarget ? 0 : viewport->h), - (GLfloat) (istarget ? viewport->h : 0), + data->glOrthof((GLfloat)0, (GLfloat)viewport->w, + (GLfloat)(istarget ? 0 : viewport->h), + (GLfloat)(istarget ? viewport->h : 0), 0.0, 1.0); } data->glMatrixMode(GL_MODELVIEW); @@ -749,23 +739,21 @@ SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd) } } -static void -SetCopyState(GLES_RenderData *data, const SDL_RenderCommand *cmd) +static void SetCopyState(GLES_RenderData *data, const SDL_RenderCommand *cmd) { SDL_Texture *texture = cmd->data.draw.texture; SetDrawState(data, cmd); if (texture != data->drawstate.texture) { - GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata; + GLES_TextureData *texturedata = (GLES_TextureData *)texture->driverdata; data->glBindTexture(GL_TEXTURE_2D, texturedata->texture); data->drawstate.texture = texture; } } -static int -GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int GLES_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; if (GLES_ActivateRenderer(renderer) < 0) { return -1; @@ -777,123 +765,129 @@ GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vert int w, h; SDL_GL_GetDrawableSize(renderer->window, &w, &h); if ((w != data->drawstate.drawablew) || (h != data->drawstate.drawableh)) { - data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. + data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. data->drawstate.cliprect_dirty = SDL_TRUE; data->drawstate.drawablew = w; data->drawstate.drawableh = h; } - } while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; /* not used in this render backend. */ - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; /* not used in this render backend. */ + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &data->drawstate.viewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - data->drawstate.viewport_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &data->drawstate.viewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + data->drawstate.viewport_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { - data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; - data->drawstate.cliprect_enabled_dirty = SDL_TRUE; - } - if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&data->drawstate.cliprect, rect); - data->drawstate.cliprect_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { + data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; + data->drawstate.cliprect_enabled_dirty = SDL_TRUE; } - - case SDL_RENDERCMD_CLEAR: { - const Uint8 r = cmd->data.color.r; - const Uint8 g = cmd->data.color.g; - const Uint8 b = cmd->data.color.b; - const Uint8 a = cmd->data.color.a; - const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); - if (color != data->drawstate.clear_color) { - const GLfloat fr = ((GLfloat) r) * inv255f; - const GLfloat fg = ((GLfloat) g) * inv255f; - const GLfloat fb = ((GLfloat) b) * inv255f; - const GLfloat fa = ((GLfloat) a) * inv255f; - data->glClearColor(fr, fg, fb, fa); - data->drawstate.clear_color = color; - } - - if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { - data->glDisable(GL_SCISSOR_TEST); - data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; - } - - data->glClear(GL_COLOR_BUFFER_BIT); - - break; + if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&data->drawstate.cliprect, rect); + data->drawstate.cliprect_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_DRAW_POINTS: { - const size_t count = cmd->data.draw.count; - const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first); - SetDrawState(data, cmd); - data->glVertexPointer(2, GL_FLOAT, 0, verts); - data->glDrawArrays(GL_POINTS, 0, (GLsizei) count); - break; + case SDL_RENDERCMD_CLEAR: + { + const Uint8 r = cmd->data.color.r; + const Uint8 g = cmd->data.color.g; + const Uint8 b = cmd->data.color.b; + const Uint8 a = cmd->data.color.a; + const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); + if (color != data->drawstate.clear_color) { + const GLfloat fr = ((GLfloat)r) * inv255f; + const GLfloat fg = ((GLfloat)g) * inv255f; + const GLfloat fb = ((GLfloat)b) * inv255f; + const GLfloat fa = ((GLfloat)a) * inv255f; + data->glClearColor(fr, fg, fb, fa); + data->drawstate.clear_color = color; } - case SDL_RENDERCMD_DRAW_LINES: { - const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first); - const size_t count = cmd->data.draw.count; - SDL_assert(count >= 2); - SetDrawState(data, cmd); - data->glVertexPointer(2, GL_FLOAT, 0, verts); - data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count); - break; + if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { + data->glDisable(GL_SCISSOR_TEST); + data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + data->glClear(GL_COLOR_BUFFER_BIT); - case SDL_RENDERCMD_COPY: /* unused */ - break; + break; + } - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_DRAW_POINTS: + { + const size_t count = cmd->data.draw.count; + const GLfloat *verts = (GLfloat *)(((Uint8 *)vertices) + cmd->data.draw.first); + SetDrawState(data, cmd); + data->glVertexPointer(2, GL_FLOAT, 0, verts); + data->glDrawArrays(GL_POINTS, 0, (GLsizei)count); + break; + } - case SDL_RENDERCMD_GEOMETRY: { - const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first); - SDL_Texture *texture = cmd->data.draw.texture; - const size_t count = cmd->data.draw.count; - int stride = (2 + 4 + (texture ? 2 : 0)) * sizeof (float); + case SDL_RENDERCMD_DRAW_LINES: + { + const GLfloat *verts = (GLfloat *)(((Uint8 *)vertices) + cmd->data.draw.first); + const size_t count = cmd->data.draw.count; + SDL_assert(count >= 2); + SetDrawState(data, cmd); + data->glVertexPointer(2, GL_FLOAT, 0, verts); + data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)count); + break; + } - if (texture) { - SetCopyState(data, cmd); - } else { - SetDrawState(data, cmd); - } + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - data->glEnableClientState(GL_COLOR_ARRAY); + case SDL_RENDERCMD_COPY: /* unused */ + break; - data->glVertexPointer(2, GL_FLOAT, stride, verts); - data->glColorPointer(4, GL_FLOAT, stride, verts + 2); - if (texture) { - data->glTexCoordPointer(2, GL_FLOAT, stride, verts + 2 + 4); - } + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - data->glDrawArrays(GL_TRIANGLES, 0, (GLsizei) count); + case SDL_RENDERCMD_GEOMETRY: + { + const GLfloat *verts = (GLfloat *)(((Uint8 *)vertices) + cmd->data.draw.first); + SDL_Texture *texture = cmd->data.draw.texture; + const size_t count = cmd->data.draw.count; + int stride = (2 + 4 + (texture ? 2 : 0)) * sizeof(float); - data->glDisableClientState(GL_COLOR_ARRAY); - break; + if (texture) { + SetCopyState(data, cmd); + } else { + SetDrawState(data, cmd); } - case SDL_RENDERCMD_NO_OP: - break; + data->glEnableClientState(GL_COLOR_ARRAY); + + data->glVertexPointer(2, GL_FLOAT, stride, verts); + data->glColorPointer(4, GL_FLOAT, stride, verts + 2); + if (texture) { + data->glTexCoordPointer(2, GL_FLOAT, stride, verts + 2 + 4); + } + + data->glDrawArrays(GL_TRIANGLES, 0, (GLsizei)count); + + data->glDisableClientState(GL_COLOR_ARRAY); + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -902,11 +896,10 @@ GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vert return 0; } -static int -GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 pixel_format, void * pixels, int pitch) +static int GLES_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 pixel_format, void *pixels, int pitch) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ABGR8888; void *temp_pixels; int temp_pitch; @@ -918,7 +911,7 @@ GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format); temp_pixels = SDL_malloc(rect->h * temp_pitch); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } @@ -926,15 +919,15 @@ GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, data->glPixelStorei(GL_PACK_ALIGNMENT, 1); - data->glReadPixels(rect->x, renderer->target ? rect->y : (h-rect->y)-rect->h, + data->glReadPixels(rect->x, renderer->target ? rect->y : (h - rect->y) - rect->h, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, temp_pixels); /* Flip the rows to be top-down if necessary */ if (!renderer->target) { SDL_bool isstack; length = rect->w * SDL_BYTESPERPIXEL(temp_format); - src = (Uint8*)temp_pixels + (rect->h-1)*temp_pitch; - dst = (Uint8*)temp_pixels; + src = (Uint8 *)temp_pixels + (rect->h - 1) * temp_pitch; + dst = (Uint8 *)temp_pixels; tmp = SDL_small_alloc(Uint8, length, &isstack); rows = rect->h / 2; while (rows--) { @@ -955,20 +948,18 @@ GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return status; } -static int -GLES_RenderPresent(SDL_Renderer * renderer) +static int GLES_RenderPresent(SDL_Renderer *renderer) { GLES_ActivateRenderer(renderer); return SDL_GL_SwapWindowWithResult(renderer->window); } -static void -GLES_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void GLES_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES_RenderData *renderdata = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *renderdata = (GLES_RenderData *)renderer->driverdata; - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; + GLES_TextureData *data = (GLES_TextureData *)texture->driverdata; GLES_ActivateRenderer(renderer); @@ -979,7 +970,7 @@ GLES_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->drawstate.target = NULL; } - if (!data) { + if (data == NULL) { return; } if (data->texture) { @@ -990,18 +981,17 @@ GLES_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture->driverdata = NULL; } -static void -GLES_DestroyRenderer(SDL_Renderer * renderer) +static void GLES_DestroyRenderer(SDL_Renderer *renderer) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; if (data) { if (data->context) { while (data->framebuffers) { - GLES_FBOList *nextnode = data->framebuffers->next; - data->glDeleteFramebuffersOES(1, &data->framebuffers->FBO); - SDL_free(data->framebuffers); - data->framebuffers = nextnode; + GLES_FBOList *nextnode = data->framebuffers->next; + data->glDeleteFramebuffersOES(1, &data->framebuffers->FBO); + SDL_free(data->framebuffers); + data->framebuffers = nextnode; } SDL_GL_DeleteContext(data->context); } @@ -1010,10 +1000,10 @@ GLES_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int GLES_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh) +static int GLES_BindTexture(SDL_Renderer *renderer, SDL_Texture *texture, float *texw, float *texh) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; - GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; + GLES_TextureData *texturedata = (GLES_TextureData *)texture->driverdata; GLES_ActivateRenderer(renderer); data->glEnable(GL_TEXTURE_2D); @@ -1032,10 +1022,10 @@ static int GLES_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, floa return 0; } -static int GLES_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) +static int GLES_UnbindTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; - GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata; + GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata; + GLES_TextureData *texturedata = (GLES_TextureData *)texture->driverdata; GLES_ActivateRenderer(renderer); data->glDisable(texturedata->type); @@ -1045,8 +1035,7 @@ static int GLES_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) return 0; } -static int -GLES_SetVSync(SDL_Renderer * renderer, const int vsync) +static int GLES_SetVSync(SDL_Renderer *renderer, const int vsync) { int retval; if (vsync) { @@ -1065,9 +1054,7 @@ GLES_SetVSync(SDL_Renderer * renderer, const int vsync) return retval; } - -static SDL_Renderer * -GLES_CreateRenderer(SDL_Window * window, Uint32 flags) +static SDL_Renderer *GLES_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; GLES_RenderData *data; @@ -1094,14 +1081,14 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags) } } - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); goto error; } - data = (GLES_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (GLES_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { GLES_DestroyRenderer(renderer); SDL_OutOfMemory(); goto error; @@ -1117,7 +1104,7 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = GLES_SetTextureScaleMode; renderer->SetRenderTarget = GLES_SetRenderTarget; renderer->QueueSetViewport = GLES_QueueSetViewport; - renderer->QueueSetDrawColor = GLES_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = GLES_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = GLES_QueueDrawPoints; renderer->QueueDrawLines = GLES_QueueDrawLines; renderer->QueueGeometry = GLES_QueueGeometry; @@ -1185,6 +1172,9 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags) if (SDL_GL_ExtensionSupported("GL_OES_blend_subtract")) { data->GL_OES_blend_subtract_supported = SDL_TRUE; } + if (SDL_GL_ExtensionSupported("GL_EXT_blend_minmax")) { + data->GL_EXT_blend_minmax_supported = SDL_TRUE; + } /* Set up parameters for rendering */ data->glDisable(GL_DEPTH_TEST); @@ -1217,14 +1207,12 @@ error: SDL_RenderDriver GLES_RenderDriver = { GLES_CreateRenderer, - { - "opengles", - (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC), - 1, - {SDL_PIXELFORMAT_ABGR8888}, - 0, - 0 - } + { "opengles", + (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC), + 1, + { SDL_PIXELFORMAT_ABGR8888 }, + 0, + 0 } }; #endif /* SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED */ diff --git a/modules/SDL2/src/render/opengles2/SDL_gles2funcs.h b/modules/SDL2/src/render/opengles2/SDL_gles2funcs.h index 9b52896..4a90bce 100644 --- a/modules/SDL2/src/render/opengles2/SDL_gles2funcs.h +++ b/modules/SDL2/src/render/opengles2/SDL_gles2funcs.h @@ -50,7 +50,7 @@ SDL_PROC(void, glGetShaderiv, (GLuint, GLenum, GLint *)) SDL_PROC(GLint, glGetUniformLocation, (GLuint, const char *)) SDL_PROC(void, glLinkProgram, (GLuint)) SDL_PROC(void, glPixelStorei, (GLenum, GLint)) -SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) +SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei)) #if __NACL__ @@ -72,7 +72,7 @@ SDL_PROC(void, glFramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) SDL_PROC(GLenum, glCheckFramebufferStatus, (GLenum)) SDL_PROC(void, glDeleteFramebuffers, (GLsizei, const GLuint *)) SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *)) -SDL_PROC(void, glGetProgramInfoLog, (GLuint, GLsizei, GLsizei*, GLchar*)) +SDL_PROC(void, glGetProgramInfoLog, (GLuint, GLsizei, GLsizei *, GLchar *)) SDL_PROC(void, glGenBuffers, (GLsizei, GLuint *)) SDL_PROC(void, glDeleteBuffers, (GLsizei, const GLuint *)) SDL_PROC(void, glBindBuffer, (GLenum, GLuint)) diff --git a/modules/SDL2/src/render/opengles2/SDL_render_gles2.c b/modules/SDL2/src/render/opengles2/SDL_render_gles2.c index f5865ee..c5f53af 100644 --- a/modules/SDL2/src/render/opengles2/SDL_render_gles2.c +++ b/modules/SDL2/src/render/opengles2/SDL_render_gles2.c @@ -46,9 +46,6 @@ #define RENDERER_CONTEXT_MAJOR 2 #define RENDERER_CONTEXT_MINOR 0 -/* Used to re-create the window with OpenGL ES capability */ -extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); - /************************************************************************************************* * Context structures * *************************************************************************************************/ @@ -57,9 +54,9 @@ typedef struct GLES2_FBOList GLES2_FBOList; struct GLES2_FBOList { - Uint32 w, h; - GLuint FBO; - GLES2_FBOList *next; + Uint32 w, h; + GLuint FBO; + GLES2_FBOList *next; }; typedef struct GLES2_TextureData @@ -152,7 +149,9 @@ typedef struct GLES2_RenderData SDL_bool debug_enabled; -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; + SDL_bool GL_EXT_blend_minmax_supported; + +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; #include "SDL_gles2funcs.h" #undef SDL_PROC GLES2_FBOList *framebuffers; @@ -177,27 +176,28 @@ typedef struct GLES2_RenderData static const float inv255f = 1.0f / 255.0f; - -SDL_FORCE_INLINE const char* -GL_TranslateError (GLenum error) +SDL_FORCE_INLINE const char * +GL_TranslateError(GLenum error) { -#define GL_ERROR_TRANSLATE(e) case e: return #e; +#define GL_ERROR_TRANSLATE(e) \ + case e: \ + return #e; switch (error) { - GL_ERROR_TRANSLATE(GL_INVALID_ENUM) - GL_ERROR_TRANSLATE(GL_INVALID_VALUE) - GL_ERROR_TRANSLATE(GL_INVALID_OPERATION) - GL_ERROR_TRANSLATE(GL_OUT_OF_MEMORY) - GL_ERROR_TRANSLATE(GL_NO_ERROR) + GL_ERROR_TRANSLATE(GL_INVALID_ENUM) + GL_ERROR_TRANSLATE(GL_INVALID_VALUE) + GL_ERROR_TRANSLATE(GL_INVALID_OPERATION) + GL_ERROR_TRANSLATE(GL_OUT_OF_MEMORY) + GL_ERROR_TRANSLATE(GL_NO_ERROR) default: return "UNKNOWN"; -} + } #undef GL_ERROR_TRANSLATE } SDL_FORCE_INLINE void GL_ClearErrors(SDL_Renderer *renderer) { - GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata; + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; if (!data->debug_enabled) { return; @@ -208,9 +208,9 @@ GL_ClearErrors(SDL_Renderer *renderer) } SDL_FORCE_INLINE int -GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function) +GL_CheckAllErrors(const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function) { - GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata; + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; int ret = 0; if (!data->debug_enabled) { @@ -238,12 +238,11 @@ GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, SDL_FILE, SDL_LINE, SDL_FUNCTION) #endif - /************************************************************************************************* * Renderer state APIs * *************************************************************************************************/ -static int GLES2_LoadFunctions(GLES2_RenderData * data) +static int GLES2_LoadFunctions(GLES2_RenderData *data) { #if SDL_VIDEO_DRIVER_UIKIT #define __SDL_NOGETPROCADDR__ @@ -254,15 +253,15 @@ static int GLES2_LoadFunctions(GLES2_RenderData * data) #endif #if defined __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; #else -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); + } \ + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "SDL_gles2funcs.h" @@ -270,26 +269,24 @@ static int GLES2_LoadFunctions(GLES2_RenderData * data) return 0; } -static GLES2_FBOList * -GLES2_GetFBO(GLES2_RenderData *data, Uint32 w, Uint32 h) +static GLES2_FBOList *GLES2_GetFBO(GLES2_RenderData *data, Uint32 w, Uint32 h) { - GLES2_FBOList *result = data->framebuffers; - while ((result) && ((result->w != w) || (result->h != h)) ) { - result = result->next; - } - if (result == NULL) { - result = SDL_malloc(sizeof(GLES2_FBOList)); - result->w = w; - result->h = h; - data->glGenFramebuffers(1, &result->FBO); - result->next = data->framebuffers; - data->framebuffers = result; - } - return result; + GLES2_FBOList *result = data->framebuffers; + while ((result) && ((result->w != w) || (result->h != h))) { + result = result->next; + } + if (result == NULL) { + result = SDL_malloc(sizeof(GLES2_FBOList)); + result->w = w; + result->h = h; + data->glGenFramebuffers(1, &result->FBO); + result->next = data->framebuffers; + data->framebuffers = result; + } + return result; } -static int -GLES2_ActivateRenderer(SDL_Renderer * renderer) +static int GLES2_ActivateRenderer(SDL_Renderer *renderer) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; @@ -307,8 +304,7 @@ GLES2_ActivateRenderer(SDL_Renderer * renderer) return 0; } -static void -GLES2_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void GLES2_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; @@ -318,8 +314,7 @@ GLES2_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } } -static int -GLES2_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int GLES2_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { SDL_GL_GetDrawableSize(renderer->window, w, h); return 0; @@ -362,14 +357,19 @@ static GLenum GetBlendEquation(SDL_BlendOperation operation) return GL_FUNC_SUBTRACT; case SDL_BLENDOPERATION_REV_SUBTRACT: return GL_FUNC_REVERSE_SUBTRACT; + case SDL_BLENDOPERATION_MINIMUM: + return GL_MIN_EXT; + case SDL_BLENDOPERATION_MAXIMUM: + return GL_MAX_EXT; default: return GL_INVALID_ENUM; } } -static SDL_bool -GLES2_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool GLES2_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; + SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode); SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode); SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode); @@ -385,12 +385,18 @@ GLES2_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) GetBlendEquation(alphaOperation) == GL_INVALID_ENUM) { return SDL_FALSE; } + + if (colorOperation == SDL_BLENDOPERATION_MINIMUM && !data->GL_EXT_blend_minmax_supported) { + return SDL_FALSE; + } + if (colorOperation == SDL_BLENDOPERATION_MAXIMUM && !data->GL_EXT_blend_minmax_supported) { + return SDL_FALSE; + } + return SDL_TRUE; } - -static GLES2_ProgramCacheEntry * -GLES2_CacheProgram(GLES2_RenderData *data, GLuint vertex, GLuint fragment) +static GLES2_ProgramCacheEntry *GLES2_CacheProgram(GLES2_RenderData *data, GLuint vertex, GLuint fragment) { GLES2_ProgramCacheEntry *entry; GLint linkSuccessful; @@ -421,7 +427,7 @@ GLES2_CacheProgram(GLES2_RenderData *data, GLuint vertex, GLuint fragment) /* Create a program cache entry */ entry = (GLES2_ProgramCacheEntry *)SDL_calloc(1, sizeof(GLES2_ProgramCacheEntry)); - if (!entry) { + if (entry == NULL) { SDL_OutOfMemory(); return NULL; } @@ -456,13 +462,13 @@ GLES2_CacheProgram(GLES2_RenderData *data, GLuint vertex, GLuint fragment) data->glUseProgram(entry->id); if (entry->uniform_locations[GLES2_UNIFORM_TEXTURE_V] != -1) { - data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_V], 2); /* always texture unit 2. */ + data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_V], 2); /* always texture unit 2. */ } if (entry->uniform_locations[GLES2_UNIFORM_TEXTURE_U] != -1) { - data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_U], 1); /* always texture unit 1. */ + data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_U], 1); /* always texture unit 1. */ } if (entry->uniform_locations[GLES2_UNIFORM_TEXTURE] != -1) { - data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE], 0); /* always texture unit 0. */ + data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE], 0); /* always texture unit 0. */ } if (entry->uniform_locations[GLES2_UNIFORM_PROJECTION] != -1) { data->glUniformMatrix4fv(entry->uniform_locations[GLES2_UNIFORM_PROJECTION], 1, GL_FALSE, (GLfloat *)entry->projection); @@ -491,8 +497,7 @@ GLES2_CacheProgram(GLES2_RenderData *data, GLuint vertex, GLuint fragment) return entry; } -static GLuint -GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_type) +static GLuint GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_type) { GLuint id = 0; GLint compileSuccessful = GL_FALSE; @@ -500,7 +505,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t const GLchar *shader_src_list[3]; const GLchar *shader_body = GLES2_GetShader(type); - if (!shader_body) { + if (shader_body == NULL) { SDL_SetError("No shader body src"); return 0; } @@ -573,7 +578,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t return id; } -static int GLES2_CacheShaders(GLES2_RenderData * data) +static int GLES2_CacheShaders(GLES2_RenderData *data) { int shader; @@ -587,15 +592,14 @@ static int GLES2_CacheShaders(GLES2_RenderData * data) } else { shader_type = GL_FRAGMENT_SHADER; } - if (!GLES2_CacheShader(data, (GLES2_ShaderType) shader, shader_type)) { + if (!GLES2_CacheShader(data, (GLES2_ShaderType)shader, shader_type)) { return -1; } } return 0; } -static int -GLES2_SelectProgram(GLES2_RenderData *data, GLES2_ImageSource source, int w, int h) +static int GLES2_SelectProgram(GLES2_RenderData *data, GLES2_ImageSource source, int w, int h) { GLuint vertex; GLuint fragment; @@ -711,7 +715,7 @@ GLES2_SelectProgram(GLES2_RenderData *data, GLES2_ImageSource source, int w, int /* Generate a matching program */ program = GLES2_CacheProgram(data, vertex, fragment); - if (!program) { + if (program == NULL) { goto fault; } @@ -728,17 +732,15 @@ fault: return -1; } -static int -GLES2_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int GLES2_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -GLES2_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GLES2_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { const SDL_bool colorswap = (renderer->target && (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 || renderer->target->format == SDL_PIXELFORMAT_RGB888)); - SDL_VertexSolid *verts = (SDL_VertexSolid *) SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); + SDL_VertexSolid *verts = (SDL_VertexSolid *)SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); int i; SDL_Color color; color.r = cmd->data.draw.r; @@ -746,7 +748,7 @@ GLES2_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL color.b = cmd->data.draw.b; color.a = cmd->data.draw.a; - if (!verts) { + if (verts == NULL) { return -1; } @@ -767,20 +769,19 @@ GLES2_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL return 0; } -static int -GLES2_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int GLES2_QueueDrawLines(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { const SDL_bool colorswap = (renderer->target && (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 || renderer->target->format == SDL_PIXELFORMAT_RGB888)); int i; GLfloat prevx, prevy; - SDL_VertexSolid *verts = (SDL_VertexSolid *) SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); + SDL_VertexSolid *verts = (SDL_VertexSolid *)SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); SDL_Color color; color.r = cmd->data.draw.r; color.g = cmd->data.draw.g; color.b = cmd->data.draw.b; color.a = cmd->data.draw.a; - if (!verts) { + if (verts == NULL) { return -1; } @@ -807,7 +808,7 @@ GLES2_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_ for (i = 1; i < count; i++) { const GLfloat xstart = prevx; const GLfloat ystart = prevy; - const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ + const GLfloat xend = points[i].x + 0.5f; /* 0.5f to hit pixel center. */ const GLfloat yend = points[i].y + 0.5f; /* bump a little in the direction we are moving in. */ const GLfloat deltax = xend - xstart; @@ -824,11 +825,10 @@ GLES2_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_ return 0; } -static int -GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; const SDL_bool colorswap = (renderer->target && (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 || renderer->target->format == SDL_PIXELFORMAT_RGB888)); @@ -838,8 +838,8 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture size_indices = indices ? size_indices : 0; if (texture) { - SDL_Vertex *verts = (SDL_Vertex *) SDL_AllocateRenderVertices(renderer, count * sizeof (*verts), 0, &cmd->data.draw.first); - if (!verts) { + SDL_Vertex *verts = (SDL_Vertex *)SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -858,9 +858,9 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); - uv_ = (float *)((char*)uv + j * uv_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); + uv_ = (float *)((char *)uv + j * uv_stride); verts->position.x = xy_[0] * scale_x; verts->position.y = xy_[1] * scale_y; @@ -878,8 +878,8 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture } } else { - SDL_VertexSolid *verts = (SDL_VertexSolid *) SDL_AllocateRenderVertices(renderer, count * sizeof (*verts), 0, &cmd->data.draw.first); - if (!verts) { + SDL_VertexSolid *verts = (SDL_VertexSolid *)SDL_AllocateRenderVertices(renderer, count * sizeof(*verts), 0, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -898,8 +898,8 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); verts->position.x = xy_[0] * scale_x; verts->position.y = xy_[1] * scale_y; @@ -918,8 +918,7 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture return 0; } -static int -SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_ImageSource imgsrc, void *vertices) +static int SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_ImageSource imgsrc, void *vertices) { SDL_Texture *texture = cmd->data.draw.texture; const SDL_BlendMode blend = cmd->data.draw.blend; @@ -961,10 +960,10 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I if ((texture != NULL) != data->drawstate.texturing) { if (texture == NULL) { - data->glDisableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_TEXCOORD); + data->glDisableVertexAttribArray((GLenum)GLES2_ATTRIBUTE_TEXCOORD); data->drawstate.texturing = SDL_FALSE; } else { - data->glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_TEXCOORD); + data->glEnableVertexAttribArray((GLenum)GLES2_ATTRIBUTE_TEXCOORD); data->drawstate.texturing = SDL_TRUE; } } @@ -976,7 +975,7 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I } if (texture) { - SDL_Vertex *verts = (SDL_Vertex *) (((Uint8 *) vertices) + cmd->data.draw.first); + SDL_Vertex *verts = (SDL_Vertex *)(((Uint8 *)vertices) + cmd->data.draw.first); data->glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, stride, (const GLvoid *)&verts->tex_coord); } @@ -987,9 +986,9 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I program = data->drawstate.program; if (program->uniform_locations[GLES2_UNIFORM_PROJECTION] != -1) { - if (SDL_memcmp(program->projection, data->drawstate.projection, sizeof (data->drawstate.projection)) != 0) { + if (SDL_memcmp(program->projection, data->drawstate.projection, sizeof(data->drawstate.projection)) != 0) { data->glUniformMatrix4fv(program->uniform_locations[GLES2_UNIFORM_PROJECTION], 1, GL_FALSE, (GLfloat *)data->drawstate.projection); - SDL_memcpy(program->projection, data->drawstate.projection, sizeof (data->drawstate.projection)); + SDL_memcpy(program->projection, data->drawstate.projection, sizeof(data->drawstate.projection)); } } @@ -1010,18 +1009,17 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I /* all drawing commands use this */ { - SDL_VertexSolid *verts = (SDL_VertexSolid *) (((Uint8 *) vertices) + cmd->data.draw.first); - data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, stride, (const GLvoid *) &verts->position); - data->glVertexAttribPointer(GLES2_ATTRIBUTE_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE /* Normalized */, stride, (const GLvoid *) &verts->color); + SDL_VertexSolid *verts = (SDL_VertexSolid *)(((Uint8 *)vertices) + cmd->data.draw.first); + data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, stride, (const GLvoid *)&verts->position); + data->glVertexAttribPointer(GLES2_ATTRIBUTE_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE /* Normalized */, stride, (const GLvoid *)&verts->color); } return 0; } -static int -SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, void *vertices) +static int SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, void *vertices) { - GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata; + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_ImageSource sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; SDL_Texture *texture = cmd->data.draw.texture; int ret; @@ -1098,46 +1096,46 @@ SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, void *vertice return SDL_SetError("Unsupported texture format"); } } else { - sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; /* Texture formats match, use the non color mapping shader (even if the formats are not ABGR) */ + sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; /* Texture formats match, use the non color mapping shader (even if the formats are not ABGR) */ } } else { switch (texture->format) { - case SDL_PIXELFORMAT_ARGB8888: - sourceType = GLES2_IMAGESOURCE_TEXTURE_ARGB; - break; - case SDL_PIXELFORMAT_ABGR8888: - sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; - break; - case SDL_PIXELFORMAT_RGB888: - sourceType = GLES2_IMAGESOURCE_TEXTURE_RGB; - break; - case SDL_PIXELFORMAT_BGR888: - sourceType = GLES2_IMAGESOURCE_TEXTURE_BGR; - break; + case SDL_PIXELFORMAT_ARGB8888: + sourceType = GLES2_IMAGESOURCE_TEXTURE_ARGB; + break; + case SDL_PIXELFORMAT_ABGR8888: + sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; + break; + case SDL_PIXELFORMAT_RGB888: + sourceType = GLES2_IMAGESOURCE_TEXTURE_RGB; + break; + case SDL_PIXELFORMAT_BGR888: + sourceType = GLES2_IMAGESOURCE_TEXTURE_BGR; + break; #if SDL_HAVE_YUV - case SDL_PIXELFORMAT_IYUV: - case SDL_PIXELFORMAT_YV12: - sourceType = GLES2_IMAGESOURCE_TEXTURE_YUV; - break; - case SDL_PIXELFORMAT_NV12: - sourceType = GLES2_IMAGESOURCE_TEXTURE_NV12; - break; - case SDL_PIXELFORMAT_NV21: - sourceType = GLES2_IMAGESOURCE_TEXTURE_NV21; - break; + case SDL_PIXELFORMAT_IYUV: + case SDL_PIXELFORMAT_YV12: + sourceType = GLES2_IMAGESOURCE_TEXTURE_YUV; + break; + case SDL_PIXELFORMAT_NV12: + sourceType = GLES2_IMAGESOURCE_TEXTURE_NV12; + break; + case SDL_PIXELFORMAT_NV21: + sourceType = GLES2_IMAGESOURCE_TEXTURE_NV21; + break; #endif - case SDL_PIXELFORMAT_EXTERNAL_OES: - sourceType = GLES2_IMAGESOURCE_TEXTURE_EXTERNAL_OES; - break; - default: - return SDL_SetError("Unsupported texture format"); + case SDL_PIXELFORMAT_EXTERNAL_OES: + sourceType = GLES2_IMAGESOURCE_TEXTURE_EXTERNAL_OES; + break; + default: + return SDL_SetError("Unsupported texture format"); } } ret = SetDrawState(data, cmd, sourceType, vertices); if (texture != data->drawstate.texture) { - GLES2_TextureData *tdata = (GLES2_TextureData *) texture->driverdata; + GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; #if SDL_HAVE_YUV if (tdata->yuv) { data->glActiveTexture(GL_TEXTURE2); @@ -1161,10 +1159,9 @@ SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, void *vertice return ret; } -static int -GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int GLES2_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata; + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; const SDL_bool colorswap = (renderer->target && (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 || renderer->target->format == SDL_PIXELFORMAT_RGB888)); #if USE_VERTEX_BUFFER_OBJECTS @@ -1181,7 +1178,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver int w, h; SDL_GL_GetDrawableSize(renderer->window, &w, &h); if ((w != data->drawstate.drawablew) || (h != data->drawstate.drawableh)) { - data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. + data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. data->drawstate.cliprect_dirty = SDL_TRUE; data->drawstate.drawablew = w; data->drawstate.drawableh = h; @@ -1203,149 +1200,155 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver if (data->current_vertex_buffer >= SDL_arraysize(data->vertex_buffers)) { data->current_vertex_buffer = 0; } - vertices = NULL; /* attrib pointers will be offsets into the VBO. */ + vertices = NULL; /* attrib pointers will be offsets into the VBO. */ #endif while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &data->drawstate.viewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - data->drawstate.viewport_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &data->drawstate.viewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + data->drawstate.viewport_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { - data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; - data->drawstate.cliprect_enabled_dirty = SDL_TRUE; - } - - if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&data->drawstate.cliprect, rect); - data->drawstate.cliprect_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { + data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; + data->drawstate.cliprect_enabled_dirty = SDL_TRUE; } - case SDL_RENDERCMD_CLEAR: { - const Uint8 r = colorswap ? cmd->data.color.b : cmd->data.color.r; - const Uint8 g = cmd->data.color.g; - const Uint8 b = colorswap ? cmd->data.color.r : cmd->data.color.b; - const Uint8 a = cmd->data.color.a; - const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); - if (color != data->drawstate.clear_color) { - const GLfloat fr = ((GLfloat) r) * inv255f; - const GLfloat fg = ((GLfloat) g) * inv255f; - const GLfloat fb = ((GLfloat) b) * inv255f; - const GLfloat fa = ((GLfloat) a) * inv255f; - data->glClearColor(fr, fg, fb, fa); - data->drawstate.clear_color = color; - } - - if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { - data->glDisable(GL_SCISSOR_TEST); - data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; - } + if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&data->drawstate.cliprect, rect); + data->drawstate.cliprect_dirty = SDL_TRUE; + } + break; + } - data->glClear(GL_COLOR_BUFFER_BIT); - break; + case SDL_RENDERCMD_CLEAR: + { + const Uint8 r = colorswap ? cmd->data.color.b : cmd->data.color.r; + const Uint8 g = cmd->data.color.g; + const Uint8 b = colorswap ? cmd->data.color.r : cmd->data.color.b; + const Uint8 a = cmd->data.color.a; + const Uint32 color = (((Uint32)a << 24) | (r << 16) | (g << 8) | b); + if (color != data->drawstate.clear_color) { + const GLfloat fr = ((GLfloat)r) * inv255f; + const GLfloat fg = ((GLfloat)g) * inv255f; + const GLfloat fb = ((GLfloat)b) * inv255f; + const GLfloat fa = ((GLfloat)a) * inv255f; + data->glClearColor(fr, fg, fb, fa); + data->drawstate.clear_color = color; } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; + if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) { + data->glDisable(GL_SCISSOR_TEST); + data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled; + } - case SDL_RENDERCMD_COPY: /* unused */ - break; + data->glClear(GL_COLOR_BUFFER_BIT); + break; + } - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - case SDL_RENDERCMD_DRAW_LINES: { - if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID, vertices) == 0) { - size_t count = cmd->data.draw.count; - if (count > 2) { - /* joined lines cannot be grouped */ - data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)count); - } else { - /* let's group non joined lines */ - SDL_RenderCommand *finalcmd = cmd; - SDL_RenderCommand *nextcmd = cmd->next; - SDL_BlendMode thisblend = cmd->data.draw.blend; - - while (nextcmd != NULL) { - const SDL_RenderCommandType nextcmdtype = nextcmd->command; - if (nextcmdtype != SDL_RENDERCMD_DRAW_LINES) { - break; /* can't go any further on this draw call, different render command up next. */ - } else if (nextcmd->data.draw.count != 2) { - break; /* can't go any further on this draw call, those are joined lines */ - } else if (nextcmd->data.draw.blend != thisblend) { - break; /* can't go any further on this draw call, different blendmode copy up next. */ - } else { - finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ - count += nextcmd->data.draw.count; - } - nextcmd = nextcmd->next; - } + case SDL_RENDERCMD_COPY: /* unused */ + break; - data->glDrawArrays(GL_LINES, 0, (GLsizei)count); - cmd = finalcmd; /* skip any copy commands we just combined in here. */ - } - } - break; - } + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - case SDL_RENDERCMD_DRAW_POINTS: - case SDL_RENDERCMD_GEOMETRY: { - /* as long as we have the same copy command in a row, with the - same texture, we can combine them all into a single draw call. */ - SDL_Texture *thistexture = cmd->data.draw.texture; - SDL_BlendMode thisblend = cmd->data.draw.blend; - const SDL_RenderCommandType thiscmdtype = cmd->command; - SDL_RenderCommand *finalcmd = cmd; - SDL_RenderCommand *nextcmd = cmd->next; + case SDL_RENDERCMD_DRAW_LINES: + { + if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID, vertices) == 0) { size_t count = cmd->data.draw.count; - int ret; - while (nextcmd != NULL) { - const SDL_RenderCommandType nextcmdtype = nextcmd->command; - if (nextcmdtype != thiscmdtype) { - break; /* can't go any further on this draw call, different render command up next. */ - } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { - break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ - } else { - finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ - count += nextcmd->data.draw.count; + if (count > 2) { + /* joined lines cannot be grouped */ + data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)count); + } else { + /* let's group non joined lines */ + SDL_RenderCommand *finalcmd = cmd; + SDL_RenderCommand *nextcmd = cmd->next; + SDL_BlendMode thisblend = cmd->data.draw.blend; + + while (nextcmd != NULL) { + const SDL_RenderCommandType nextcmdtype = nextcmd->command; + if (nextcmdtype != SDL_RENDERCMD_DRAW_LINES) { + break; /* can't go any further on this draw call, different render command up next. */ + } else if (nextcmd->data.draw.count != 2) { + break; /* can't go any further on this draw call, those are joined lines */ + } else if (nextcmd->data.draw.blend != thisblend) { + break; /* can't go any further on this draw call, different blendmode copy up next. */ + } else { + finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ + count += nextcmd->data.draw.count; + } + nextcmd = nextcmd->next; } - nextcmd = nextcmd->next; + + data->glDrawArrays(GL_LINES, 0, (GLsizei)count); + cmd = finalcmd; /* skip any copy commands we just combined in here. */ } + } + break; + } - if (thistexture) { - ret = SetCopyState(renderer, cmd, vertices); + case SDL_RENDERCMD_DRAW_POINTS: + case SDL_RENDERCMD_GEOMETRY: + { + /* as long as we have the same copy command in a row, with the + same texture, we can combine them all into a single draw call. */ + SDL_Texture *thistexture = cmd->data.draw.texture; + SDL_BlendMode thisblend = cmd->data.draw.blend; + const SDL_RenderCommandType thiscmdtype = cmd->command; + SDL_RenderCommand *finalcmd = cmd; + SDL_RenderCommand *nextcmd = cmd->next; + size_t count = cmd->data.draw.count; + int ret; + while (nextcmd != NULL) { + const SDL_RenderCommandType nextcmdtype = nextcmd->command; + if (nextcmdtype != thiscmdtype) { + break; /* can't go any further on this draw call, different render command up next. */ + } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { + break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ } else { - ret = SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID, vertices); + finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ + count += nextcmd->data.draw.count; } + nextcmd = nextcmd->next; + } - if (ret == 0) { - int op = GL_TRIANGLES; /* SDL_RENDERCMD_GEOMETRY */ - if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { - op = GL_POINTS; - } - data->glDrawArrays(op, 0, (GLsizei) count); - } + if (thistexture) { + ret = SetCopyState(renderer, cmd, vertices); + } else { + ret = SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID, vertices); + } - cmd = finalcmd; /* skip any copy commands we just combined in here. */ - break; + if (ret == 0) { + int op = GL_TRIANGLES; /* SDL_RENDERCMD_GEOMETRY */ + if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { + op = GL_POINTS; + } + data->glDrawArrays(op, 0, (GLsizei)count); } - case SDL_RENDERCMD_NO_OP: - break; + cmd = finalcmd; /* skip any copy commands we just combined in here. */ + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -1354,8 +1357,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver return GL_CheckError("", renderer); } -static void -GLES2_DestroyRenderer(SDL_Renderer *renderer) +static void GLES2_DestroyRenderer(SDL_Renderer *renderer) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; @@ -1406,8 +1408,7 @@ GLES2_DestroyRenderer(SDL_Renderer *renderer) SDL_free(renderer); } -static int -GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static int GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { GLES2_RenderData *renderdata = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *data; @@ -1417,11 +1418,10 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) GLES2_ActivateRenderer(renderer); - renderdata->drawstate.texture = NULL; /* we trash this state. */ + renderdata->drawstate.texture = NULL; /* we trash this state. */ /* Determine the corresponding GLES texture format params */ - switch (texture->format) - { + switch (texture->format) { case SDL_PIXELFORMAT_ARGB8888: case SDL_PIXELFORMAT_ABGR8888: case SDL_PIXELFORMAT_RGB888: @@ -1455,7 +1455,7 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) /* Allocate a texture struct */ data = (GLES2_TextureData *)SDL_calloc(1, sizeof(GLES2_TextureData)); - if (!data) { + if (data == NULL) { return SDL_OutOfMemory(); } data->texture = 0; @@ -1478,7 +1478,7 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) if (texture->access == SDL_TEXTUREACCESS_STREAMING) { size_t size; data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format); - size = texture->h * data->pitch; + size = (size_t)texture->h * data->pitch; #if SDL_HAVE_YUV if (data->yuv) { /* Need to add size for the U and V planes */ @@ -1563,40 +1563,38 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) } if (texture->access == SDL_TEXTUREACCESS_TARGET) { - data->fbo = GLES2_GetFBO(renderer->driverdata, texture->w, texture->h); + data->fbo = GLES2_GetFBO(renderer->driverdata, texture->w, texture->h); } else { - data->fbo = NULL; + data->fbo = NULL; } return GL_CheckError("", renderer); } -static int -GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, GLint pitch, GLint bpp) +static int GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, GLint pitch, GLint bpp) { Uint8 *blob = NULL; #if SDL_BYTEORDER == SDL_BIG_ENDIAN Uint32 *blob2 = NULL; #endif Uint8 *src; - int src_pitch; + size_t src_pitch; int y; if ((width == 0) || (height == 0) || (bpp == 0)) { - return 0; /* nothing to do */ + return 0; /* nothing to do */ } /* Reformat the texture data into a tightly packed array */ - src_pitch = width * bpp; + src_pitch = (size_t)width * bpp; src = (Uint8 *)pixels; if (pitch != src_pitch) { blob = (Uint8 *)SDL_malloc(src_pitch * height); - if (!blob) { + if (blob == NULL) { return SDL_OutOfMemory(); } src = blob; - for (y = 0; y < height; ++y) - { + for (y = 0; y < height; ++y) { SDL_memcpy(src, pixels, src_pitch); src += src_pitch; pixels = (Uint8 *)pixels + pitch; @@ -1609,7 +1607,7 @@ GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint int i; Uint32 *src32 = (Uint32 *)src; blob2 = (Uint32 *)SDL_malloc(src_pitch * height); - if (!blob2) { + if (blob2 == NULL) { if (blob) { SDL_free(blob); } @@ -1618,7 +1616,7 @@ GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint for (i = 0; i < (src_pitch * height) / 4; i++) { blob2[i] = SDL_Swap32(src32[i]); } - src = (Uint8 *) blob2; + src = (Uint8 *)blob2; } #endif @@ -1634,9 +1632,8 @@ GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint return 0; } -static int -GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect, - const void *pixels, int pitch) +static int GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect, + const void *pixels, int pitch) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; @@ -1648,65 +1645,64 @@ GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect return 0; } - data->drawstate.texture = NULL; /* we trash this state. */ + data->drawstate.texture = NULL; /* we trash this state. */ /* Create a texture subimage with the supplied data */ data->glBindTexture(tdata->texture_type, tdata->texture); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x, - rect->y, - rect->w, - rect->h, - tdata->pixel_format, - tdata->pixel_type, - pixels, pitch, SDL_BYTESPERPIXEL(texture->format)); + rect->x, + rect->y, + rect->w, + rect->h, + tdata->pixel_format, + tdata->pixel_type, + pixels, pitch, SDL_BYTESPERPIXEL(texture->format)); #if SDL_HAVE_YUV if (tdata->yuv) { /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + rect->h * pitch); + pixels = (const void *)((const Uint8 *)pixels + rect->h * pitch); if (texture->format == SDL_PIXELFORMAT_YV12) { data->glBindTexture(tdata->texture_type, tdata->texture_v); } else { data->glBindTexture(tdata->texture_type, tdata->texture_u); } GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - tdata->pixel_format, - tdata->pixel_type, - pixels, (pitch + 1) / 2, 1); - + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + tdata->pixel_format, + tdata->pixel_type, + pixels, (pitch + 1) / 2, 1); /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + ((rect->h + 1) / 2) * ((pitch + 1)/2)); + pixels = (const void *)((const Uint8 *)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2)); if (texture->format == SDL_PIXELFORMAT_YV12) { data->glBindTexture(tdata->texture_type, tdata->texture_u); } else { data->glBindTexture(tdata->texture_type, tdata->texture_v); } GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - tdata->pixel_format, - tdata->pixel_type, - pixels, (pitch + 1) / 2, 1); + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + tdata->pixel_format, + tdata->pixel_type, + pixels, (pitch + 1) / 2, 1); } else if (tdata->nv12) { /* Skip to the correct offset into the next texture */ - pixels = (const void*)((const Uint8*)pixels + rect->h * pitch); + pixels = (const void *)((const Uint8 *)pixels + rect->h * pitch); data->glBindTexture(tdata->texture_type, tdata->texture_u); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - GL_LUMINANCE_ALPHA, - GL_UNSIGNED_BYTE, - pixels, 2 * ((pitch + 1) / 2), 2); + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + GL_LUMINANCE_ALPHA, + GL_UNSIGNED_BYTE, + pixels, 2 * ((pitch + 1) / 2), 2); } #endif @@ -1714,12 +1710,11 @@ GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect } #if SDL_HAVE_YUV -static int -GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int GLES2_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; @@ -1731,46 +1726,45 @@ GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } - data->drawstate.texture = NULL; /* we trash this state. */ + data->drawstate.texture = NULL; /* we trash this state. */ data->glBindTexture(tdata->texture_type, tdata->texture_v); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - tdata->pixel_format, - tdata->pixel_type, - Vplane, Vpitch, 1); + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + tdata->pixel_format, + tdata->pixel_type, + Vplane, Vpitch, 1); data->glBindTexture(tdata->texture_type, tdata->texture_u); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - tdata->pixel_format, - tdata->pixel_type, - Uplane, Upitch, 1); + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + tdata->pixel_format, + tdata->pixel_type, + Uplane, Upitch, 1); data->glBindTexture(tdata->texture_type, tdata->texture); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x, - rect->y, - rect->w, - rect->h, - tdata->pixel_format, - tdata->pixel_type, - Yplane, Ypitch, 1); + rect->x, + rect->y, + rect->w, + rect->h, + tdata->pixel_format, + tdata->pixel_type, + Yplane, Ypitch, 1); return GL_CheckError("glTexSubImage2D()", renderer); } -static int -GLES2_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int GLES2_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; @@ -1782,35 +1776,34 @@ GLES2_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } - data->drawstate.texture = NULL; /* we trash this state. */ + data->drawstate.texture = NULL; /* we trash this state. */ data->glBindTexture(tdata->texture_type, tdata->texture_u); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x / 2, - rect->y / 2, - (rect->w + 1) / 2, - (rect->h + 1) / 2, - GL_LUMINANCE_ALPHA, - GL_UNSIGNED_BYTE, - UVplane, UVpitch, 2); + rect->x / 2, + rect->y / 2, + (rect->w + 1) / 2, + (rect->h + 1) / 2, + GL_LUMINANCE_ALPHA, + GL_UNSIGNED_BYTE, + UVplane, UVpitch, 2); data->glBindTexture(tdata->texture_type, tdata->texture); GLES2_TexSubImage2D(data, tdata->texture_type, - rect->x, - rect->y, - rect->w, - rect->h, - tdata->pixel_format, - tdata->pixel_type, - Yplane, Ypitch, 1); + rect->x, + rect->y, + rect->w, + rect->h, + tdata->pixel_format, + tdata->pixel_type, + Yplane, Ypitch, 1); return GL_CheckError("glTexSubImage2D()", renderer); } #endif -static int -GLES2_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect, - void **pixels, int *pitch) +static int GLES2_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect, + void **pixels, int *pitch) { GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; @@ -1823,8 +1816,7 @@ GLES2_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect * return 0; } -static void -GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static void GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; SDL_Rect rect; @@ -1837,11 +1829,10 @@ GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) GLES2_UpdateTexture(renderer, texture, &rect, tdata->pixel_data, tdata->pitch); } -static void -GLES2_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void GLES2_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - GLES2_RenderData *renderdata = (GLES2_RenderData *) renderer->driverdata; - GLES2_TextureData *data = (GLES2_TextureData *) texture->driverdata; + GLES2_RenderData *renderdata = (GLES2_RenderData *)renderer->driverdata; + GLES2_TextureData *data = (GLES2_TextureData *)texture->driverdata; GLenum glScaleMode = (scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR; #if SDL_HAVE_YUV @@ -1869,10 +1860,9 @@ GLES2_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Sc renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, glScaleMode); } -static int -GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int GLES2_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata; + GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *texturedata = NULL; GLenum status; @@ -1881,7 +1871,7 @@ GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) if (texture == NULL) { data->glBindFramebuffer(GL_FRAMEBUFFER, data->window_framebuffer); } else { - texturedata = (GLES2_TextureData *) texture->driverdata; + texturedata = (GLES2_TextureData *)texture->driverdata; data->glBindFramebuffer(GL_FRAMEBUFFER, texturedata->fbo->FBO); /* TODO: check if texture pixel format allows this operation */ data->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texturedata->texture_type, texturedata->texture, 0); @@ -1894,8 +1884,7 @@ GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static void -GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static void GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata; @@ -1926,9 +1915,8 @@ GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) } } -static int -GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 pixel_format, void * pixels, int pitch) +static int GLES2_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 pixel_format, void *pixels, int pitch) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ABGR8888; @@ -1940,19 +1928,19 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, int status; temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format); - buflen = rect->h * temp_pitch; + buflen = (size_t)rect->h * temp_pitch; if (buflen == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } temp_pixels = SDL_malloc(buflen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_GetRendererOutputSize(renderer, &w, &h); - data->glReadPixels(rect->x, renderer->target ? rect->y : (h-rect->y)-rect->h, + data->glReadPixels(rect->x, renderer->target ? rect->y : (h - rect->y) - rect->h, rect->w, rect->h, GL_RGBA, GL_UNSIGNED_BYTE, temp_pixels); if (GL_CheckError("glReadPixels()", renderer) < 0) { return -1; @@ -1962,8 +1950,8 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, if (!renderer->target) { SDL_bool isstack; length = rect->w * SDL_BYTESPERPIXEL(temp_format); - src = (Uint8*)temp_pixels + (rect->h-1)*temp_pitch; - dst = (Uint8*)temp_pixels; + src = (Uint8 *)temp_pixels + (rect->h - 1) * temp_pitch; + dst = (Uint8 *)temp_pixels; tmp = SDL_small_alloc(Uint8, length, &isstack); rows = rect->h / 2; while (rows--) { @@ -1984,15 +1972,13 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, return status; } -static int -GLES2_RenderPresent(SDL_Renderer *renderer) +static int GLES2_RenderPresent(SDL_Renderer *renderer) { /* Tell the video driver to swap buffers */ return SDL_GL_SwapWindowWithResult(renderer->window); } -static int -GLES2_SetVSync(SDL_Renderer * renderer, const int vsync) +static int GLES2_SetVSync(SDL_Renderer *renderer, const int vsync) { int retval; if (vsync) { @@ -2011,14 +1997,13 @@ GLES2_SetVSync(SDL_Renderer * renderer, const int vsync) return retval; } - /************************************************************************************************* * Bind/unbinding of textures *************************************************************************************************/ -static int GLES2_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh); -static int GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture); +static int GLES2_BindTexture(SDL_Renderer *renderer, SDL_Texture *texture, float *texw, float *texh); +static int GLES2_UnbindTexture(SDL_Renderer *renderer, SDL_Texture *texture); -static int GLES2_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh) +static int GLES2_BindTexture(SDL_Renderer *renderer, SDL_Texture *texture, float *texw, float *texh) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *texturedata = (GLES2_TextureData *)texture->driverdata; @@ -2054,7 +2039,7 @@ static int GLES2_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, flo return 0; } -static int GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) +static int GLES2_UnbindTexture(SDL_Renderer *renderer, SDL_Texture *texture) { GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata; GLES2_TextureData *texturedata = (GLES2_TextureData *)texture->driverdata; @@ -2066,13 +2051,11 @@ static int GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) return 0; } - /************************************************************************************************* * Renderer instantiation * *************************************************************************************************/ -static SDL_Renderer * -GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) +static SDL_Renderer *GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; GLES2_RenderData *data; @@ -2110,13 +2093,13 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) /* Create the renderer struct */ renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(SDL_Renderer)); - if (!renderer) { + if (renderer == NULL) { SDL_OutOfMemory(); goto error; } data = (GLES2_RenderData *)SDL_calloc(1, sizeof(GLES2_RenderData)); - if (!data) { + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); goto error; @@ -2194,32 +2177,32 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) data->window_framebuffer = (GLuint)window_framebuffer; /* Populate the function pointers for the module */ - renderer->WindowEvent = GLES2_WindowEvent; - renderer->GetOutputSize = GLES2_GetOutputSize; - renderer->SupportsBlendMode = GLES2_SupportsBlendMode; - renderer->CreateTexture = GLES2_CreateTexture; - renderer->UpdateTexture = GLES2_UpdateTexture; + renderer->WindowEvent = GLES2_WindowEvent; + renderer->GetOutputSize = GLES2_GetOutputSize; + renderer->SupportsBlendMode = GLES2_SupportsBlendMode; + renderer->CreateTexture = GLES2_CreateTexture; + renderer->UpdateTexture = GLES2_UpdateTexture; #if SDL_HAVE_YUV - renderer->UpdateTextureYUV = GLES2_UpdateTextureYUV; - renderer->UpdateTextureNV = GLES2_UpdateTextureNV; + renderer->UpdateTextureYUV = GLES2_UpdateTextureYUV; + renderer->UpdateTextureNV = GLES2_UpdateTextureNV; #endif - renderer->LockTexture = GLES2_LockTexture; - renderer->UnlockTexture = GLES2_UnlockTexture; + renderer->LockTexture = GLES2_LockTexture; + renderer->UnlockTexture = GLES2_UnlockTexture; renderer->SetTextureScaleMode = GLES2_SetTextureScaleMode; - renderer->SetRenderTarget = GLES2_SetRenderTarget; - renderer->QueueSetViewport = GLES2_QueueSetViewport; - renderer->QueueSetDrawColor = GLES2_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ - renderer->QueueDrawPoints = GLES2_QueueDrawPoints; - renderer->QueueDrawLines = GLES2_QueueDrawLines; - renderer->QueueGeometry = GLES2_QueueGeometry; - renderer->RunCommandQueue = GLES2_RunCommandQueue; - renderer->RenderReadPixels = GLES2_RenderReadPixels; - renderer->RenderPresent = GLES2_RenderPresent; - renderer->DestroyTexture = GLES2_DestroyTexture; - renderer->DestroyRenderer = GLES2_DestroyRenderer; - renderer->SetVSync = GLES2_SetVSync; - renderer->GL_BindTexture = GLES2_BindTexture; - renderer->GL_UnbindTexture = GLES2_UnbindTexture; + renderer->SetRenderTarget = GLES2_SetRenderTarget; + renderer->QueueSetViewport = GLES2_QueueSetViewport; + renderer->QueueSetDrawColor = GLES2_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueDrawPoints = GLES2_QueueDrawPoints; + renderer->QueueDrawLines = GLES2_QueueDrawLines; + renderer->QueueGeometry = GLES2_QueueGeometry; + renderer->RunCommandQueue = GLES2_RunCommandQueue; + renderer->RenderReadPixels = GLES2_RenderReadPixels; + renderer->RenderPresent = GLES2_RenderPresent; + renderer->DestroyTexture = GLES2_DestroyTexture; + renderer->DestroyRenderer = GLES2_DestroyRenderer; + renderer->SetVSync = GLES2_SetVSync; + renderer->GL_BindTexture = GLES2_BindTexture; + renderer->GL_UnbindTexture = GLES2_UnbindTexture; #if SDL_HAVE_YUV renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12; renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV; @@ -2239,6 +2222,10 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) renderer->rect_index_order[4] = 3; renderer->rect_index_order[5] = 2; + if (SDL_GL_ExtensionSupported("GL_EXT_blend_minmax")) { + data->GL_EXT_blend_minmax_supported = SDL_TRUE; + } + /* Set up parameters for rendering */ data->glActiveTexture(GL_TEXTURE0); data->glPixelStorei(GL_PACK_ALIGNMENT, 1); @@ -2272,22 +2259,17 @@ error: SDL_RenderDriver GLES2_RenderDriver = { GLES2_CreateRenderer, - { - "opengles2", - (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), - 4, - { - SDL_PIXELFORMAT_ARGB8888, + { "opengles2", + (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE), + 4, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, - SDL_PIXELFORMAT_BGR888 - }, - 0, - 0 - } + SDL_PIXELFORMAT_BGR888 }, + 0, + 0 } }; #endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/render/opengles2/SDL_shaders_gles2.c b/modules/SDL2/src/render/opengles2/SDL_shaders_gles2.c index 752c3f0..50c86d6 100644 --- a/modules/SDL2/src/render/opengles2/SDL_shaders_gles2.c +++ b/modules/SDL2/src/render/opengles2/SDL_shaders_gles2.c @@ -28,6 +28,8 @@ #include "SDL_shaders_gles2.h" #include "SDL_stdinc.h" +/* *INDENT-OFF* */ /* clang-format off */ + /************************************************************************************************* * Vertex/fragment shader source * *************************************************************************************************/ @@ -346,6 +348,7 @@ static const char GLES2_Fragment_TextureExternalOES[] = \ "}\n" \ ; +/* *INDENT-ON* */ /* clang-format on */ /************************************************************************************************* * Shader selector * @@ -382,12 +385,15 @@ GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint() const char *texcoord_hint = SDL_GetHint("SDL_RENDER_OPENGLES2_TEXCOORD_PRECISION"); GLES2_ShaderIncludeType value = GLES2_SHADER_FRAGMENT_INCLUDE_BEST_TEXCOORD_PRECISION; if (texcoord_hint) { - if (SDL_strcmp(texcoord_hint, "undefined") == 0) + if (SDL_strcmp(texcoord_hint, "undefined") == 0) { return GLES2_SHADER_FRAGMENT_INCLUDE_UNDEF_PRECISION; - if (SDL_strcmp(texcoord_hint, "high") == 0) + } + if (SDL_strcmp(texcoord_hint, "high") == 0) { return GLES2_SHADER_FRAGMENT_INCLUDE_HIGH_TEXCOORD_PRECISION; - if (SDL_strcmp(texcoord_hint, "medium") == 0) + } + if (SDL_strcmp(texcoord_hint, "medium") == 0) { return GLES2_SHADER_FRAGMENT_INCLUDE_MEDIUM_TEXCOORD_PRECISION; + } } return value; } @@ -441,4 +447,3 @@ const char *GLES2_GetShader(GLES2_ShaderType type) #endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/render/ps2/SDL_render_ps2.c b/modules/SDL2/src/render/ps2/SDL_render_ps2.c index 1acb6a3..dc4bafa 100644 --- a/modules/SDL2/src/render/ps2/SDL_render_ps2.c +++ b/modules/SDL2/src/render/ps2/SDL_render_ps2.c @@ -51,43 +51,40 @@ typedef struct uint8_t vsync; /* 0 (Disabled), 1 (Enabled), 2 (Dynamic) */ } PS2_RenderData; - static int vsync_sema_id = 0; /* PRIVATE METHODS */ static int vsync_handler() { - iSignalSema(vsync_sema_id); + iSignalSema(vsync_sema_id); - ExitHandler(); - return 0; + ExitHandler(); + return 0; } /* Copy of gsKit_sync_flip, but without the 'flip' */ static void gsKit_sync(GSGLOBAL *gsGlobal) { - if (!gsGlobal->FirstFrame) WaitSema(vsync_sema_id); - while (PollSema(vsync_sema_id) >= 0) - ; + if (!gsGlobal->FirstFrame) { + WaitSema(vsync_sema_id); + } + while (PollSema(vsync_sema_id) >= 0) + ; } /* Copy of gsKit_sync_flip, but without the 'sync' */ static void gsKit_flip(GSGLOBAL *gsGlobal) { - if (!gsGlobal->FirstFrame) - { - if (gsGlobal->DoubleBuffering == GS_SETTING_ON) - { - GS_SET_DISPFB2( gsGlobal->ScreenBuffer[ - gsGlobal->ActiveBuffer & 1] / 8192, - gsGlobal->Width / 64, gsGlobal->PSM, 0, 0 ); + if (!gsGlobal->FirstFrame) { + if (gsGlobal->DoubleBuffering == GS_SETTING_ON) { + GS_SET_DISPFB2(gsGlobal->ScreenBuffer[gsGlobal->ActiveBuffer & 1] / 8192, + gsGlobal->Width / 64, gsGlobal->PSM, 0, 0); - gsGlobal->ActiveBuffer ^= 1; - } - - } + gsGlobal->ActiveBuffer ^= 1; + } + } - gsKit_setactive(gsGlobal); + gsKit_setactive(gsGlobal); } static int PixelFormatToPS2PSM(Uint32 format) @@ -100,27 +97,24 @@ static int PixelFormatToPS2PSM(Uint32 format) } } -static void -PS2_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void PS2_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { - } -static int -PS2_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int PS2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GSTEXTURE* ps2_tex = (GSTEXTURE*) SDL_calloc(1, sizeof(GSTEXTURE)); + GSTEXTURE *ps2_tex = (GSTEXTURE *)SDL_calloc(1, sizeof(GSTEXTURE)); - if (!ps2_tex) + if (ps2_tex == NULL) { return SDL_OutOfMemory(); + } ps2_tex->Width = texture->w; ps2_tex->Height = texture->h; ps2_tex->PSM = PixelFormatToPS2PSM(texture->format); ps2_tex->Mem = memalign(128, gsKit_texture_size_ee(ps2_tex->Width, ps2_tex->Height, ps2_tex->PSM)); - if (!ps2_tex->Mem) - { + if (!ps2_tex->Mem) { SDL_free(ps2_tex); return SDL_OutOfMemory(); } @@ -130,41 +124,38 @@ PS2_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -PS2_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int PS2_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata; + GSTEXTURE *ps2_texture = (GSTEXTURE *)texture->driverdata; *pixels = - (void *) ((Uint8 *) ps2_texture->Mem + rect->y * ps2_texture->Width * SDL_BYTESPERPIXEL(texture->format) + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)ps2_texture->Mem + rect->y * ps2_texture->Width * SDL_BYTESPERPIXEL(texture->format) + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = ps2_texture->Width * SDL_BYTESPERPIXEL(texture->format); return 0; } -static void -PS2_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void PS2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata; - PS2_RenderData *data = (PS2_RenderData *) renderer->driverdata; + GSTEXTURE *ps2_texture = (GSTEXTURE *)texture->driverdata; + PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; gsKit_TexManager_invalidate(data->gsGlobal, ps2_texture); } -static int -PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int PS2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { const Uint8 *src; Uint8 *dst; - int row, length,dpitch; + int row, length, dpitch; src = pixels; PS2_LockTexture(renderer, texture, rect, (void **)&dst, &dpitch); length = rect->w * SDL_BYTESPERPIXEL(texture->format); if (length == pitch && length == dpitch) { - SDL_memcpy(dst, src, length*rect->h); + SDL_memcpy(dst, src, length * rect->h); } else { for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, src, length); @@ -178,10 +169,9 @@ PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static void -PS2_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void PS2_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata; + GSTEXTURE *ps2_texture = (GSTEXTURE *)texture->driverdata; /* set texture filtering according to scaleMode suported hint values are nearest (0, default) or linear (1) @@ -189,33 +179,30 @@ PS2_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Scal or GS_FILTER_LINEAR (good for scaling) */ uint32_t gsKitScaleMode = (scaleMode == SDL_ScaleModeNearest - ? GS_FILTER_NEAREST - : GS_FILTER_LINEAR); + ? GS_FILTER_NEAREST + : GS_FILTER_LINEAR); ps2_texture->Filter = gsKitScaleMode; } -static int -PS2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int PS2_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { return 0; } -static int -PS2_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int PS2_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -PS2_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int PS2_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - PS2_RenderData *data = (PS2_RenderData *) renderer->driverdata; - GSPRIMPOINT *vertices = (GSPRIMPOINT *) SDL_AllocateRenderVertices(renderer, count * sizeof (GSPRIMPOINT), 4, &cmd->data.draw.first); + PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; + GSPRIMPOINT *vertices = (GSPRIMPOINT *)SDL_AllocateRenderVertices(renderer, count * sizeof(GSPRIMPOINT), 4, &cmd->data.draw.first); uint8_t colorR, colorG, colorB, colorA; gs_rgbaq rgbaq; int i; - if (!vertices) { + if (vertices == NULL) { return -1; } @@ -234,11 +221,10 @@ PS2_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F return 0; } -static int -PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; @@ -248,9 +234,10 @@ PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t size_indices = indices ? size_indices : 0; if (texture) { - GSPRIMSTQPOINT *vertices = (GSPRIMSTQPOINT *) SDL_AllocateRenderVertices(renderer, count * sizeof (GSPRIMSTQPOINT), 4, &cmd->data.draw.first); - - if (!vertices) { + GSPRIMUVPOINT *vertices = (GSPRIMUVPOINT *) SDL_AllocateRenderVertices(renderer, count * sizeof(GSPRIMUVPOINT), 4, &cmd->data.draw.first); + GSTEXTURE *ps2_tex = (GSTEXTURE *) texture->driverdata; + + if (vertices == NULL) { return -1; } @@ -269,21 +256,21 @@ PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); - uv_ = (float *)((char*)uv + j * uv_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); + uv_ = (float *)((char *)uv + j * uv_stride); vertices->xyz2 = vertex_to_XYZ2(data->gsGlobal, xy_[0] * scale_x, xy_[1] * scale_y, 0); - vertices->stq = vertex_to_STQ(uv_[0], uv_[1]); - vertices->rgbaq = color_to_RGBAQ(col_.r >> 1, col_.g >> 1, col_.b >> 1, col_.a >> 1, 1.0f); + vertices->rgbaq = color_to_RGBAQ(col_.r >> 1, col_.g >> 1, col_.b >> 1, col_.a >> 1, 0); + vertices->uv = vertex_to_UV(ps2_tex, uv_[0] * ps2_tex->Width, uv_[1] * ps2_tex->Height); vertices++; } - + } else { - GSPRIMPOINT *vertices = (GSPRIMPOINT *) SDL_AllocateRenderVertices(renderer, count * sizeof (GSPRIMPOINT), 4, &cmd->data.draw.first); + GSPRIMPOINT *vertices = (GSPRIMPOINT *)SDL_AllocateRenderVertices(renderer, count * sizeof(GSPRIMPOINT), 4, &cmd->data.draw.first); - if (!vertices) { + if (vertices == NULL) { return -1; } @@ -301,8 +288,8 @@ PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); vertices->xyz2 = vertex_to_XYZ2(data->gsGlobal, xy_[0] * scale_x, xy_[1] * scale_y, 0); vertices->rgbaq = color_to_RGBAQ(col_.r >> 1, col_.g >> 1, col_.b >> 1, col_.a >> 1, 0.0f); @@ -314,8 +301,7 @@ PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t return 0; } -static int -PS2_RenderSetViewPort(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int PS2_RenderSetViewPort(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; const SDL_Rect *viewport = &cmd->data.viewport.rect; @@ -326,14 +312,13 @@ PS2_RenderSetViewPort(SDL_Renderer *renderer, SDL_RenderCommand *cmd) return 0; } -static int -PS2_RenderSetClipRect(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int PS2_RenderSetClipRect(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; const SDL_Rect *rect = &cmd->data.cliprect.rect; - if(cmd->data.cliprect.enabled){ + if (cmd->data.cliprect.enabled) { gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(rect->x, rect->y, rect->w, rect->h)); } else { gsKit_set_scissor(data->gsGlobal, GS_SCISSOR_RESET); @@ -342,14 +327,12 @@ PS2_RenderSetClipRect(SDL_Renderer *renderer, SDL_RenderCommand *cmd) return 0; } - -static int -PS2_RenderSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int PS2_RenderSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { int colorR, colorG, colorB, colorA; PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; - + colorR = (cmd->data.color.r) >> 1; colorG = (cmd->data.color.g) >> 1; colorB = (cmd->data.color.b) >> 1; @@ -358,60 +341,60 @@ PS2_RenderSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) return 0; } -static int -PS2_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int PS2_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { int colorR, colorG, colorB, colorA; PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; - + colorR = (cmd->data.color.r) >> 1; colorG = (cmd->data.color.g) >> 1; colorB = (cmd->data.color.b) >> 1; colorA = (cmd->data.color.a) >> 1; gsKit_clear(data->gsGlobal, GS_SETREG_RGBAQ(colorR, colorG, colorB, colorA, 0x00)); - + return 0; } -static void -PS2_SetBlendMode(PS2_RenderData *data, int blendMode) +static void PS2_SetBlendMode(PS2_RenderData *data, int blendMode) { - #define A_COLOR_SOURCE 0 - #define A_COLOR_DEST 1 - #define A_COLOR_NULL 2 - #define A_ALPHA_SOURCE 0 - #define A_ALPHA_DEST 1 - #define A_ALPHA_FIX 2 - - switch (blendMode) +#define A_COLOR_SOURCE 0 +#define A_COLOR_DEST 1 +#define A_COLOR_NULL 2 +#define A_ALPHA_SOURCE 0 +#define A_ALPHA_DEST 1 +#define A_ALPHA_FIX 2 + + switch (blendMode) { + case SDL_BLENDMODE_NONE: { - case SDL_BLENDMODE_NONE: { - data->gsGlobal->PrimAlphaEnable = GS_SETTING_OFF; - break; - } - case SDL_BLENDMODE_BLEND:{ - gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_SOURCE, A_COLOR_DEST, A_ALPHA_SOURCE, A_COLOR_DEST, 0), 0); - data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; - break; - } - case SDL_BLENDMODE_ADD: { - gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_SOURCE, A_COLOR_NULL, A_ALPHA_FIX, A_COLOR_DEST, 0x80), 0); - data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; - break; - } - case SDL_BLENDMODE_MUL: - case SDL_BLENDMODE_MOD: { - /* We don't fully support MOD and MUL, however this is the best we can do */ - gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_DEST, A_COLOR_NULL, A_ALPHA_SOURCE, A_COLOR_SOURCE, 0x80), 0); - data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; - break; - } + data->gsGlobal->PrimAlphaEnable = GS_SETTING_OFF; + break; + } + case SDL_BLENDMODE_BLEND: + { + gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_SOURCE, A_COLOR_DEST, A_ALPHA_SOURCE, A_COLOR_DEST, 0), 0); + data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; + break; + } + case SDL_BLENDMODE_ADD: + { + gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_SOURCE, A_COLOR_NULL, A_ALPHA_FIX, A_COLOR_DEST, 0x80), 0); + data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; + break; + } + case SDL_BLENDMODE_MUL: + case SDL_BLENDMODE_MOD: + { + /* We don't fully support MOD and MUL, however this is the best we can do */ + gsKit_set_primalpha(data->gsGlobal, GS_SETREG_ALPHA(A_COLOR_DEST, A_COLOR_NULL, A_ALPHA_SOURCE, A_COLOR_SOURCE, 0x80), 0); + data->gsGlobal->PrimAlphaEnable = GS_SETTING_ON; + break; + } } } -static int -PS2_RenderGeometry(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand *cmd) +static int PS2_RenderGeometry(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand *cmd) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; const size_t count = cmd->data.draw.count; @@ -419,26 +402,24 @@ PS2_RenderGeometry(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand *cm PS2_SetBlendMode(data, cmd->data.draw.blend); if (cmd->data.draw.texture) { - const GSPRIMSTQPOINT *verts = (GSPRIMSTQPOINT *) (vertices + cmd->data.draw.first); - GSTEXTURE *ps2_tex = (GSTEXTURE *) cmd->data.draw.texture->driverdata; + const GSPRIMUVPOINT *verts = (GSPRIMUVPOINT *) (vertices + cmd->data.draw.first); + GSTEXTURE *ps2_tex = (GSTEXTURE *)cmd->data.draw.texture->driverdata; gsKit_TexManager_bind(data->gsGlobal, ps2_tex); - gsKit_prim_list_triangle_goraud_texture_stq_3d(data->gsGlobal, ps2_tex, count, verts); + gsKit_prim_list_triangle_goraud_texture_uv_3d(data->gsGlobal, ps2_tex, count, verts); } else { - const GSPRIMPOINT *verts = (GSPRIMPOINT *) (vertices + cmd->data.draw.first); + const GSPRIMPOINT *verts = (GSPRIMPOINT *)(vertices + cmd->data.draw.first); gsKit_prim_list_triangle_gouraud_3d(data->gsGlobal, count, verts); - } - + } + return 0; } - -int -PS2_RenderLines(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand * cmd) +int PS2_RenderLines(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand *cmd) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; const size_t count = cmd->data.draw.count; - const GSPRIMPOINT *verts = (GSPRIMPOINT *) (vertices + cmd->data.draw.first); + const GSPRIMPOINT *verts = (GSPRIMPOINT *)(vertices + cmd->data.draw.first); PS2_SetBlendMode(data, cmd->data.draw.blend); gsKit_prim_list_line_goraud_3d(data->gsGlobal, count, verts); @@ -447,12 +428,11 @@ PS2_RenderLines(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand * cmd) return 0; } -int -PS2_RenderPoints(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand * cmd) +int PS2_RenderPoints(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand *cmd) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; const size_t count = cmd->data.draw.count; - const GSPRIMPOINT *verts = (GSPRIMPOINT *) (vertices + cmd->data.draw.first); + const GSPRIMPOINT *verts = (GSPRIMPOINT *)(vertices + cmd->data.draw.first); PS2_SetBlendMode(data, cmd->data.draw.blend); gsKit_prim_list_points(data->gsGlobal, count, verts); @@ -461,107 +441,113 @@ PS2_RenderPoints(SDL_Renderer *renderer, void *vertices, SDL_RenderCommand * cmd return 0; } -static int -PS2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int PS2_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETVIEWPORT: { - PS2_RenderSetViewPort(renderer, cmd); - break; - } - case SDL_RENDERCMD_SETCLIPRECT: { - PS2_RenderSetClipRect(renderer, cmd); - break; - } - case SDL_RENDERCMD_SETDRAWCOLOR: { - PS2_RenderSetDrawColor(renderer, cmd); - break; - } - case SDL_RENDERCMD_CLEAR: { - PS2_RenderClear(renderer, cmd); - break; - } - case SDL_RENDERCMD_DRAW_POINTS: { - PS2_RenderPoints(renderer, vertices, cmd); - break; - } - case SDL_RENDERCMD_DRAW_LINES: { - PS2_RenderLines(renderer, vertices, cmd); - break; - } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; - case SDL_RENDERCMD_COPY: /* unused */ - break; - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; - case SDL_RENDERCMD_GEOMETRY: { - PS2_RenderGeometry(renderer, vertices, cmd); - break; - } - case SDL_RENDERCMD_NO_OP: - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + PS2_RenderSetViewPort(renderer, cmd); + break; + } + case SDL_RENDERCMD_SETCLIPRECT: + { + PS2_RenderSetClipRect(renderer, cmd); + break; + } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + PS2_RenderSetDrawColor(renderer, cmd); + break; + } + case SDL_RENDERCMD_CLEAR: + { + PS2_RenderClear(renderer, cmd); + break; + } + case SDL_RENDERCMD_DRAW_POINTS: + { + PS2_RenderPoints(renderer, vertices, cmd); + break; + } + case SDL_RENDERCMD_DRAW_LINES: + { + PS2_RenderLines(renderer, vertices, cmd); + break; + } + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; + case SDL_RENDERCMD_COPY: /* unused */ + break; + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; + case SDL_RENDERCMD_GEOMETRY: + { + PS2_RenderGeometry(renderer, vertices, cmd); + break; + } + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; } return 0; } -static int -PS2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +static int PS2_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { return SDL_Unsupported(); } -static int -PS2_RenderPresent(SDL_Renderer * renderer) +static int PS2_RenderPresent(SDL_Renderer *renderer) { - PS2_RenderData *data = (PS2_RenderData *) renderer->driverdata; + PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; if (data->gsGlobal->DoubleBuffering == GS_SETTING_OFF) { - if (data->vsync == 2) // Dynamic + if (data->vsync == 2) { // Dynamic gsKit_sync(data->gsGlobal); - else if (data->vsync == 1) + } else if (data->vsync == 1) { gsKit_vsync_wait(); - gsKit_queue_exec(data->gsGlobal); + } + gsKit_queue_exec(data->gsGlobal); } else { - gsKit_queue_exec(data->gsGlobal); - gsKit_finish(); - if (data->vsync == 2) // Dynamic + gsKit_queue_exec(data->gsGlobal); + gsKit_finish(); + if (data->vsync == 2) { // Dynamic gsKit_sync(data->gsGlobal); - else if (data->vsync == 1) + } else if (data->vsync == 1) { gsKit_vsync_wait(); - gsKit_flip(data->gsGlobal); - } - gsKit_TexManager_nextFrame(data->gsGlobal); + } + gsKit_flip(data->gsGlobal); + } + gsKit_TexManager_nextFrame(data->gsGlobal); gsKit_clear(data->gsGlobal, GS_BLACK); return 0; } -static void -PS2_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void PS2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata; + GSTEXTURE *ps2_texture = (GSTEXTURE *)texture->driverdata; PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; - if (data == NULL) + if (data == NULL) { return; + } - if(ps2_texture == NULL) + if (ps2_texture == NULL) { return; + } // Free from vram gsKit_TexManager_free(data->gsGlobal, ps2_texture); - + SDL_free(ps2_texture->Mem); SDL_free(ps2_texture); texture->driverdata = NULL; } -static void -PS2_DestroyRenderer(SDL_Renderer * renderer) +static void PS2_DestroyRenderer(SDL_Renderer *renderer) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; @@ -574,14 +560,14 @@ PS2_DestroyRenderer(SDL_Renderer * renderer) SDL_free(data); } - if (vsync_sema_id >= 0) + if (vsync_sema_id >= 0) { DeleteSema(vsync_sema_id); + } SDL_free(renderer); } -static int -PS2_SetVSync(SDL_Renderer * renderer, const int vsync) +static int PS2_SetVSync(SDL_Renderer *renderer, const int vsync) { PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata; SDL_bool dynamicVsync = SDL_GetHintBoolean(SDL_HINT_PS2_DYNAMIC_VSYNC, SDL_FALSE); @@ -589,8 +575,7 @@ PS2_SetVSync(SDL_Renderer * renderer, const int vsync) return 0; } -static SDL_Renderer * -PS2_CreateRenderer(SDL_Window * window, Uint32 flags) +static SDL_Renderer *PS2_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; PS2_RenderData *data; @@ -598,14 +583,14 @@ PS2_CreateRenderer(SDL_Window * window, Uint32 flags) ee_sema_t sema; SDL_bool dynamicVsync; - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (PS2_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (PS2_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { PS2_DestroyRenderer(renderer); SDL_OutOfMemory(); return NULL; @@ -616,35 +601,35 @@ PS2_CreateRenderer(SDL_Window * window, Uint32 flags) sema.max_count = 1; sema.option = 0; vsync_sema_id = CreateSema(&sema); - + gsGlobal = gsKit_init_global_custom(RENDER_QUEUE_OS_POOLSIZE, RENDER_QUEUE_PER_POOLSIZE); - gsGlobal->Mode = GS_MODE_NTSC; + gsGlobal->Mode = GS_MODE_NTSC; gsGlobal->Height = 448; - gsGlobal->PSM = GS_PSM_CT24; - gsGlobal->PSMZ = GS_PSMZ_16S; - gsGlobal->ZBuffering = GS_SETTING_OFF; - gsGlobal->DoubleBuffering = GS_SETTING_ON; - gsGlobal->PrimAlphaEnable = GS_SETTING_ON; - gsGlobal->Dithering = GS_SETTING_OFF; + gsGlobal->PSM = GS_PSM_CT24; + gsGlobal->PSMZ = GS_PSMZ_16S; + gsGlobal->ZBuffering = GS_SETTING_OFF; + gsGlobal->DoubleBuffering = GS_SETTING_ON; + gsGlobal->PrimAlphaEnable = GS_SETTING_ON; + gsGlobal->Dithering = GS_SETTING_OFF; - gsKit_set_primalpha(gsGlobal, GS_SETREG_ALPHA(0, 1, 0, 1, 0), 0); + gsKit_set_primalpha(gsGlobal, GS_SETREG_ALPHA(0, 1, 0, 1, 0), 0); - dmaKit_init(D_CTRL_RELE_OFF, D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC, D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF); - dmaKit_chan_init(DMA_CHANNEL_GIF); + dmaKit_init(D_CTRL_RELE_OFF, D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC, D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF); + dmaKit_chan_init(DMA_CHANNEL_GIF); - gsKit_set_clamp(gsGlobal, GS_CMODE_REPEAT); + gsKit_set_clamp(gsGlobal, GS_CMODE_REPEAT); - gsKit_vram_clear(gsGlobal); + gsKit_vram_clear(gsGlobal); - gsKit_init_screen(gsGlobal); + gsKit_init_screen(gsGlobal); - gsKit_TexManager_init(gsGlobal); + gsKit_TexManager_init(gsGlobal); - data->vsync_callback_id = gsKit_add_vsync_handler(vsync_handler); + data->vsync_callback_id = gsKit_add_vsync_handler(vsync_handler); - gsKit_mode_switch(gsGlobal, GS_ONESHOT); + gsKit_mode_switch(gsGlobal, GS_ONESHOT); gsKit_clear(gsGlobal, GS_BLACK); @@ -683,7 +668,7 @@ SDL_RenderDriver PS2_RenderDriver = { .name = "PS2 gsKit", .flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE, .num_texture_formats = 2, - .texture_formats = { + .texture_formats = { [0] = SDL_PIXELFORMAT_ABGR1555, [1] = SDL_PIXELFORMAT_ABGR8888, }, diff --git a/modules/SDL2/src/render/psp/SDL_render_psp.c b/modules/SDL2/src/render/psp/SDL_render_psp.c index d735eb4..95a48d9 100644 --- a/modules/SDL2/src/render/psp/SDL_render_psp.c +++ b/modules/SDL2/src/render/psp/SDL_render_psp.c @@ -37,24 +37,20 @@ #include #include - - - /* PSP renderer implementation, based on the PGE */ -#define PSP_SCREEN_WIDTH 480 -#define PSP_SCREEN_HEIGHT 272 +#define PSP_SCREEN_WIDTH 480 +#define PSP_SCREEN_HEIGHT 272 -#define PSP_FRAME_BUFFER_WIDTH 512 -#define PSP_FRAME_BUFFER_SIZE (PSP_FRAME_BUFFER_WIDTH*PSP_SCREEN_HEIGHT) +#define PSP_FRAME_BUFFER_WIDTH 512 +#define PSP_FRAME_BUFFER_SIZE (PSP_FRAME_BUFFER_WIDTH * PSP_SCREEN_HEIGHT) static unsigned int __attribute__((aligned(16))) DisplayList[262144]; - -#define COL5650(r,g,b,a) ((r>>3) | ((g>>2)<<5) | ((b>>3)<<11)) -#define COL5551(r,g,b,a) ((r>>3) | ((g>>3)<<5) | ((b>>3)<<10) | (a>0?0x7000:0)) -#define COL4444(r,g,b,a) ((r>>4) | ((g>>4)<<4) | ((b>>4)<<8) | ((a>>4)<<12)) -#define COL8888(r,g,b,a) ((r) | ((g)<<8) | ((b)<<16) | ((a)<<24)) +#define COL5650(r, g, b, a) ((r >> 3) | ((g >> 2) << 5) | ((b >> 3) << 11)) +#define COL5551(r, g, b, a) ((r >> 3) | ((g >> 3) << 5) | ((b >> 3) << 10) | (a > 0 ? 0x7000 : 0)) +#define COL4444(r, g, b, a) ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8) | ((a >> 4) << 12)) +#define COL8888(r, g, b, a) ((r) | ((g) << 8) | ((b) << 16) | ((a) << 24)) /** * Holds psp specific texture data @@ -64,18 +60,18 @@ static unsigned int __attribute__((aligned(16))) DisplayList[262144]; */ typedef struct PSP_TextureData { - void *data; /**< Image data. */ - unsigned int size; /**< Size of data in bytes. */ - unsigned int width; /**< Image width. */ - unsigned int height; /**< Image height. */ - unsigned int textureWidth; /**< Texture width (power of two). */ - unsigned int textureHeight; /**< Texture height (power of two). */ - unsigned int bits; /**< Image bits per pixel. */ - unsigned int format; /**< Image format - one of ::pgePixelFormat. */ - unsigned int pitch; - SDL_bool swizzled; /**< Is image swizzled. */ - struct PSP_TextureData* prevhotw; /**< More recently used render target */ - struct PSP_TextureData* nexthotw; /**< Less recently used render target */ + void *data; /**< Image data. */ + unsigned int size; /**< Size of data in bytes. */ + unsigned int width; /**< Image width. */ + unsigned int height; /**< Image height. */ + unsigned int textureWidth; /**< Texture width (power of two). */ + unsigned int textureHeight; /**< Texture height (power of two). */ + unsigned int bits; /**< Image bits per pixel. */ + unsigned int format; /**< Image format - one of ::pgePixelFormat. */ + unsigned int pitch; + SDL_bool swizzled; /**< Is image swizzled. */ + struct PSP_TextureData *prevhotw; /**< More recently used render target */ + struct PSP_TextureData *nexthotw; /**< Less recently used render target */ } PSP_TextureData; typedef struct @@ -83,123 +79,118 @@ typedef struct SDL_BlendMode mode; unsigned int color; int shadeModel; - SDL_Texture* texture; + SDL_Texture *texture; } PSP_BlendState; typedef struct { - void* frontbuffer; /**< main screen buffer */ - void* backbuffer; /**< buffer presented to display */ - SDL_Texture* boundTarget; /**< currently bound rendertarget */ - SDL_bool initialized; /**< is driver initialized */ - SDL_bool displayListAvail; /**< is the display list already initialized for this frame */ - unsigned int psm; /**< format of the display buffers */ - unsigned int bpp; /**< bits per pixel of the main display */ - - SDL_bool vsync; /**< whether we do vsync */ - PSP_BlendState blendState; /**< current blend mode */ - PSP_TextureData* most_recent_target; /**< start of render target LRU double linked list */ - PSP_TextureData* least_recent_target; /**< end of the LRU list */ - - SDL_bool vblank_not_reached; /**< whether vblank wasn't reached */ + void *frontbuffer; /**< main screen buffer */ + void *backbuffer; /**< buffer presented to display */ + SDL_Texture *boundTarget; /**< currently bound rendertarget */ + SDL_bool initialized; /**< is driver initialized */ + SDL_bool displayListAvail; /**< is the display list already initialized for this frame */ + unsigned int psm; /**< format of the display buffers */ + unsigned int bpp; /**< bits per pixel of the main display */ + + SDL_bool vsync; /**< whether we do vsync */ + PSP_BlendState blendState; /**< current blend mode */ + PSP_TextureData *most_recent_target; /**< start of render target LRU double linked list */ + PSP_TextureData *least_recent_target; /**< end of the LRU list */ + + SDL_bool vblank_not_reached; /**< whether vblank wasn't reached */ } PSP_RenderData; - typedef struct { - float x, y, z; + float x, y, z; } VertV; - typedef struct { - float u, v; - float x, y, z; + float u, v; + float x, y, z; } VertTV; typedef struct { SDL_Color col; - float x, y, z; + float x, y, z; } VertCV; - typedef struct { - float u, v; + float u, v; SDL_Color col; - float x, y, z; + float x, y, z; } VertTCV; -#define PI 3.14159265358979f +#define PI 3.14159265358979f -#define radToDeg(x) ((x)*180.f/PI) -#define degToRad(x) ((x)*PI/180.f) +#define radToDeg(x) ((x)*180.f / PI) +#define degToRad(x) ((x)*PI / 180.f) -static float -MathAbs(float x) +static float MathAbs(float x) { float result; - __asm__ volatile ( + __asm__ volatile( "mtv %1, S000\n" "vabs.s S000, S000\n" "mfv %0, S000\n" - : "=r"(result) : "r"(x)); + : "=r"(result) + : "r"(x)); return result; } -static void -MathSincos(float r, float *s, float *c) +static void MathSincos(float r, float *s, float *c) { - __asm__ volatile ( + __asm__ volatile( "mtv %2, S002\n" "vcst.s S003, VFPU_2_PI\n" "vmul.s S002, S002, S003\n" "vrot.p C000, S002, [s, c]\n" "mfv %0, S000\n" "mfv %1, S001\n" - : "=r"(*s), "=r"(*c): "r"(r)); + : "=r"(*s), "=r"(*c) + : "r"(r)); } -static void -Swap(float *a, float *b) +static void Swap(float *a, float *b) { - float n=*a; + float n = *a; *a = *b; *b = n; } -static inline int -InVram(void* data) +static inline int InVram(void *data) { - return data < (void*)0x04200000; + return data < (void *)0x04200000; } /* Return next power of 2 */ -static int -TextureNextPow2(unsigned int w) +static int TextureNextPow2(unsigned int w) { unsigned int n = 2; - if(w == 0) + if (w == 0) { return 0; + } - while(w > n) + while (w > n) { n <<= 1; + } return n; } static void psp_on_vblank(u32 sub, PSP_RenderData *data) { - if (data) - data->vblank_not_reached = SDL_FALSE; + if (data) { + data->vblank_not_reached = SDL_FALSE; + } } - -static int -PixelFormatToPSPFMT(Uint32 format) +static int PixelFormatToPSPFMT(Uint32 format) { switch (format) { case SDL_PIXELFORMAT_BGR565: @@ -215,62 +206,61 @@ PixelFormatToPSPFMT(Uint32 format) } } -///SECTION render target LRU management -static void -LRUTargetRelink(PSP_TextureData* psp_texture) { - if(psp_texture->prevhotw) { +/// SECTION render target LRU management +static void LRUTargetRelink(PSP_TextureData *psp_texture) +{ + if (psp_texture->prevhotw) { psp_texture->prevhotw->nexthotw = psp_texture->nexthotw; } - if(psp_texture->nexthotw) { + if (psp_texture->nexthotw) { psp_texture->nexthotw->prevhotw = psp_texture->prevhotw; } } -static void -LRUTargetPushFront(PSP_RenderData* data, PSP_TextureData* psp_texture) { +static void LRUTargetPushFront(PSP_RenderData *data, PSP_TextureData *psp_texture) +{ psp_texture->nexthotw = data->most_recent_target; - if(data->most_recent_target) { + if (data->most_recent_target) { data->most_recent_target->prevhotw = psp_texture; } data->most_recent_target = psp_texture; - if(!data->least_recent_target) { + if (!data->least_recent_target) { data->least_recent_target = psp_texture; } } -static void -LRUTargetRemove(PSP_RenderData* data, PSP_TextureData* psp_texture) { +static void LRUTargetRemove(PSP_RenderData *data, PSP_TextureData *psp_texture) +{ LRUTargetRelink(psp_texture); - if(data->most_recent_target == psp_texture) { + if (data->most_recent_target == psp_texture) { data->most_recent_target = psp_texture->nexthotw; } - if(data->least_recent_target == psp_texture) { + if (data->least_recent_target == psp_texture) { data->least_recent_target = psp_texture->prevhotw; } psp_texture->prevhotw = NULL; psp_texture->nexthotw = NULL; } -static void -LRUTargetBringFront(PSP_RenderData* data, PSP_TextureData* psp_texture) { - if(data->most_recent_target == psp_texture) { - return; //nothing to do +static void LRUTargetBringFront(PSP_RenderData *data, PSP_TextureData *psp_texture) +{ + if (data->most_recent_target == psp_texture) { + return; // nothing to do } LRUTargetRemove(data, psp_texture); LRUTargetPushFront(data, psp_texture); } -static void -TextureStorageFree(void* storage) { - if(InVram(storage)) { +static void TextureStorageFree(void *storage) +{ + if (InVram(storage)) { vfree(storage); } else { SDL_free(storage); } } -static int -TextureSwizzle(PSP_TextureData *psp_texture, void* dst) +static int TextureSwizzle(PSP_TextureData *psp_texture, void *dst) { int bytewidth, height; int rowblocks, rowblocksadd; @@ -279,34 +269,33 @@ TextureSwizzle(PSP_TextureData *psp_texture, void* dst) unsigned int *src = NULL; unsigned char *data = NULL; - if(psp_texture->swizzled) + if (psp_texture->swizzled) { return 1; + } - bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); + bytewidth = psp_texture->textureWidth * (psp_texture->bits >> 3); height = psp_texture->size / bytewidth; - rowblocks = (bytewidth>>4); - rowblocksadd = (rowblocks-1)<<7; + rowblocks = (bytewidth >> 4); + rowblocksadd = (rowblocks - 1) << 7; - src = (unsigned int*) psp_texture->data; + src = (unsigned int *)psp_texture->data; data = dst; - if(!data) { + if (data == NULL) { data = SDL_malloc(psp_texture->size); } - if(!data) { + if (data == NULL) { return SDL_OutOfMemory(); } - for(j = 0; j < height; j++, blockaddress += 16) - { + for (j = 0; j < height; j++, blockaddress += 16) { unsigned int *block; - block = (unsigned int*)&data[blockaddress]; + block = (unsigned int *)&data[blockaddress]; - for(i = 0; i < rowblocks; i++) - { + for (i = 0; i < rowblocks; i++) { *block++ = *src++; *block++ = *src++; *block++ = *src++; @@ -314,8 +303,9 @@ TextureSwizzle(PSP_TextureData *psp_texture, void* dst) block += 28; } - if((j & 0x7) == 0x7) + if ((j & 0x7) == 0x7) { blockaddress += rowblocksadd; + } } TextureStorageFree(psp_texture->data); @@ -326,8 +316,7 @@ TextureSwizzle(PSP_TextureData *psp_texture, void* dst) return 1; } -static int -TextureUnswizzle(PSP_TextureData *psp_texture, void* dst) +static int TextureUnswizzle(PSP_TextureData *psp_texture, void *dst) { int bytewidth, height; int widthblocks, heightblocks; @@ -338,43 +327,42 @@ TextureUnswizzle(PSP_TextureData *psp_texture, void* dst) unsigned char *data = NULL; unsigned char *ydst = NULL; - if(!psp_texture->swizzled) + if (!psp_texture->swizzled) { return 1; + } - bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); + bytewidth = psp_texture->textureWidth * (psp_texture->bits >> 3); height = psp_texture->size / bytewidth; - widthblocks = bytewidth/16; - heightblocks = height/8; + widthblocks = bytewidth / 16; + heightblocks = height / 8; - dstpitch = (bytewidth - 16)/4; + dstpitch = (bytewidth - 16) / 4; dstrow = bytewidth * 8; - src = (unsigned int*) psp_texture->data; + src = (unsigned int *)psp_texture->data; data = dst; - if(!data) { + if (data == NULL) { data = SDL_malloc(psp_texture->size); } - if(!data) + if (data == NULL) { return SDL_OutOfMemory(); + } ydst = (unsigned char *)data; - for(blocky = 0; blocky < heightblocks; ++blocky) - { + for (blocky = 0; blocky < heightblocks; ++blocky) { unsigned char *xdst = ydst; - for(blockx = 0; blockx < widthblocks; ++blockx) - { + for (blockx = 0; blockx < widthblocks; ++blockx) { unsigned int *block; - block = (unsigned int*)xdst; + block = (unsigned int *)xdst; - for(j = 0; j < 8; ++j) - { + for (j = 0; j < 8; ++j) { *(block++) = *(src++); *(block++) = *(src++); *(block++) = *(src++); @@ -398,14 +386,13 @@ TextureUnswizzle(PSP_TextureData *psp_texture, void* dst) return 1; } -static int -TextureSpillToSram(PSP_RenderData* data, PSP_TextureData* psp_texture) +static int TextureSpillToSram(PSP_RenderData *data, PSP_TextureData *psp_texture) { // Assumes the texture is in VRAM - if(psp_texture->swizzled) { - //Texture was swizzled in vram, just copy to system memory - void* sdata = SDL_malloc(psp_texture->size); - if(!sdata) { + if (psp_texture->swizzled) { + // Texture was swizzled in vram, just copy to system memory + void *sdata = SDL_malloc(psp_texture->size); + if (sdata == NULL) { return SDL_OutOfMemory(); } @@ -414,16 +401,15 @@ TextureSpillToSram(PSP_RenderData* data, PSP_TextureData* psp_texture) psp_texture->data = sdata; return 0; } else { - return TextureSwizzle(psp_texture, NULL); //Will realloc in sysram + return TextureSwizzle(psp_texture, NULL); // Will realloc in sysram } } -static int -TexturePromoteToVram(PSP_RenderData* data, PSP_TextureData* psp_texture, SDL_bool target) +static int TexturePromoteToVram(PSP_RenderData *data, PSP_TextureData *psp_texture, SDL_bool target) { // Assumes texture in sram and a large enough continuous block in vram - void* tdata = vramalloc(psp_texture->size); - if(psp_texture->swizzled && target) { + void *tdata = vramalloc(psp_texture->size); + if (psp_texture->swizzled && target) { return TextureUnswizzle(psp_texture, tdata); } else { SDL_memcpy(tdata, psp_texture->data, psp_texture->size); @@ -433,42 +419,41 @@ TexturePromoteToVram(PSP_RenderData* data, PSP_TextureData* psp_texture, SDL_boo } } -static int -TextureSpillLRU(PSP_RenderData* data, size_t wanted) { - PSP_TextureData* lru = data->least_recent_target; - if(lru) { - if(TextureSpillToSram(data, lru) < 0) { +static int TextureSpillLRU(PSP_RenderData *data, size_t wanted) +{ + PSP_TextureData *lru = data->least_recent_target; + if (lru) { + if (TextureSpillToSram(data, lru) < 0) { return -1; } LRUTargetRemove(data, lru); } else { // Asked to spill but there nothing to spill - return SDL_SetError("Could not spill more VRAM to system memory. VRAM : %dKB,(%dKB), wanted %dKB", vmemavail()/1024, vlargestblock()/1024, wanted/1024); + return SDL_SetError("Could not spill more VRAM to system memory. VRAM : %dKB,(%dKB), wanted %dKB", vmemavail() / 1024, vlargestblock() / 1024, wanted / 1024); } return 0; } -static int -TextureSpillTargetsForSpace(PSP_RenderData* data, size_t size) +static int TextureSpillTargetsForSpace(PSP_RenderData *data, size_t size) { - while(vlargestblock() < size) { - if(TextureSpillLRU(data, size) < 0) { + while (vlargestblock() < size) { + if (TextureSpillLRU(data, size) < 0) { return -1; } } return 0; } -static int -TextureBindAsTarget(PSP_RenderData* data, PSP_TextureData* psp_texture) { +static int TextureBindAsTarget(PSP_RenderData *data, PSP_TextureData *psp_texture) +{ unsigned int dstFormat; - if(!InVram(psp_texture->data)) { + if (!InVram(psp_texture->data)) { // Bring back the texture in vram - if(TextureSpillTargetsForSpace(data, psp_texture->size) < 0) { + if (TextureSpillTargetsForSpace(data, psp_texture->size) < 0) { return -1; } - if(TexturePromoteToVram(data, psp_texture, SDL_TRUE) < 0) { + if (TexturePromoteToVram(data, psp_texture, SDL_TRUE) < 0) { return -1; } } @@ -477,7 +462,7 @@ TextureBindAsTarget(PSP_RenderData* data, PSP_TextureData* psp_texture) { // Stencil alpha dst hack dstFormat = psp_texture->format; - if(dstFormat == GU_PSM_5551) { + if (dstFormat == GU_PSM_5551) { sceGuEnable(GU_STENCIL_TEST); sceGuStencilOp(GU_REPLACE, GU_REPLACE, GU_REPLACE); sceGuStencilFunc(GU_GEQUAL, 0xff, 0xff); @@ -490,20 +475,18 @@ TextureBindAsTarget(PSP_RenderData* data, PSP_TextureData* psp_texture) { return 0; } -static void -PSP_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void PSP_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { } - -static int -PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int PSP_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { PSP_RenderData *data = renderer->driverdata; - PSP_TextureData* psp_texture = (PSP_TextureData*) SDL_calloc(1, sizeof(*psp_texture)); + PSP_TextureData *psp_texture = (PSP_TextureData *)SDL_calloc(1, sizeof(*psp_texture)); - if(!psp_texture) + if (psp_texture == NULL) { return SDL_OutOfMemory(); + } psp_texture->swizzled = SDL_FALSE; psp_texture->width = texture->w; @@ -512,40 +495,38 @@ PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) psp_texture->textureWidth = TextureNextPow2(texture->w); psp_texture->format = PixelFormatToPSPFMT(texture->format); - switch(psp_texture->format) - { - case GU_PSM_5650: - case GU_PSM_5551: - case GU_PSM_4444: - psp_texture->bits = 16; - break; + switch (psp_texture->format) { + case GU_PSM_5650: + case GU_PSM_5551: + case GU_PSM_4444: + psp_texture->bits = 16; + break; - case GU_PSM_8888: - psp_texture->bits = 32; - break; + case GU_PSM_8888: + psp_texture->bits = 32; + break; - default: - SDL_free(psp_texture); - return -1; + default: + SDL_free(psp_texture); + return -1; } psp_texture->pitch = psp_texture->textureWidth * SDL_BYTESPERPIXEL(texture->format); - psp_texture->size = psp_texture->textureHeight*psp_texture->pitch; - if(texture->access & SDL_TEXTUREACCESS_TARGET) { - if(TextureSpillTargetsForSpace(renderer->driverdata, psp_texture->size) < 0){ + psp_texture->size = psp_texture->textureHeight * psp_texture->pitch; + if (texture->access & SDL_TEXTUREACCESS_TARGET) { + if (TextureSpillTargetsForSpace(renderer->driverdata, psp_texture->size) < 0) { SDL_free(psp_texture); return -1; } psp_texture->data = vramalloc(psp_texture->size); - if(psp_texture->data) { + if (psp_texture->data) { LRUTargetPushFront(data, psp_texture); } } else { psp_texture->data = SDL_calloc(1, psp_texture->size); } - if(!psp_texture->data) - { + if (!psp_texture->data) { SDL_free(psp_texture); return SDL_OutOfMemory(); } @@ -554,51 +535,44 @@ PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -TextureShouldSwizzle(PSP_TextureData* psp_texture, SDL_Texture *texture) +static int TextureShouldSwizzle(PSP_TextureData *psp_texture, SDL_Texture *texture) { - return !((texture->access == SDL_TEXTUREACCESS_TARGET) && InVram(psp_texture->data)) - && texture->access != SDL_TEXTUREACCESS_STREAMING - && (texture->w >= 16 || texture->h >= 16); + return !((texture->access == SDL_TEXTUREACCESS_TARGET) && InVram(psp_texture->data)) && texture->access != SDL_TEXTUREACCESS_STREAMING && (texture->w >= 16 || texture->h >= 16); } -static void -TextureActivate(SDL_Texture * texture) +static void TextureActivate(SDL_Texture *texture) { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; int scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? GU_NEAREST : GU_LINEAR; /* Swizzling is useless with small textures. */ - if (TextureShouldSwizzle(psp_texture, texture)) - { + if (TextureShouldSwizzle(psp_texture, texture)) { TextureSwizzle(psp_texture, NULL); } sceGuTexWrap(GU_REPEAT, GU_REPEAT); sceGuTexMode(psp_texture->format, 0, 0, psp_texture->swizzled); sceGuTexFilter(scaleMode, scaleMode); /* GU_NEAREST good for tile-map */ - /* GU_LINEAR good for scaling */ + /* GU_LINEAR good for scaling */ sceGuTexImage(0, psp_texture->textureWidth, psp_texture->textureHeight, psp_texture->textureWidth, psp_texture->data); } -static int -PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch); +static int PSP_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch); -static int -PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int PSP_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { -/* PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; */ + /* PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; */ const Uint8 *src; Uint8 *dst; - int row, length,dpitch; + int row, length, dpitch; src = pixels; - PSP_LockTexture(renderer, texture,rect,(void **)&dst, &dpitch); + PSP_LockTexture(renderer, texture, rect, (void **)&dst, &dpitch); length = rect->w * SDL_BYTESPERPIXEL(texture->format); if (length == pitch && length == dpitch) { - SDL_memcpy(dst, src, length*rect->h); + SDL_memcpy(dst, src, length * rect->h); } else { for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, src, length); @@ -611,23 +585,21 @@ PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } -static int -PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int PSP_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; *pixels = - (void *) ((Uint8 *) psp_texture->data + rect->y * psp_texture->pitch + - rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)psp_texture->data + rect->y * psp_texture->pitch + + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = psp_texture->pitch; return 0; } -static void -PSP_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void PSP_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; SDL_Rect rect; /* We do whole texture updates, at least for now */ @@ -638,31 +610,27 @@ PSP_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) PSP_UpdateTexture(renderer, texture, &rect, psp_texture->data, psp_texture->pitch); } -static void -PSP_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void PSP_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { /* Nothing to do because TextureActivate takes care of it */ } -static int -PSP_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int PSP_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { return 0; } -static int -PSP_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int PSP_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -PSP_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int PSP_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - VertV *verts = (VertV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertV), 4, &cmd->data.draw.first); + VertV *verts = (VertV *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertV), 4, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -677,11 +645,10 @@ PSP_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F return 0; } -static int -PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; @@ -691,8 +658,8 @@ PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t if (texture == NULL) { VertCV *verts; - verts = (VertCV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertCV), 4, &cmd->data.draw.first); - if (!verts) { + verts = (VertCV *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertCV), 4, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -710,8 +677,8 @@ PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); verts->x = xy_[0] * scale_x; verts->y = xy_[1] * scale_y; @@ -722,10 +689,10 @@ PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t verts++; } } else { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; VertTCV *verts; - verts = (VertTCV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertTCV), 4, &cmd->data.draw.first); - if (!verts) { + verts = (VertTCV *)SDL_AllocateRenderVertices(renderer, count * sizeof(VertTCV), 4, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -745,9 +712,9 @@ PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); - uv_ = (float *)((char*)uv + j * uv_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); + uv_ = (float *)((char *)uv + j * uv_stride); verts->x = xy_[0] * scale_x; verts->y = xy_[1] * scale_y; @@ -765,13 +732,12 @@ PSP_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t return 0; } -static int -PSP_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count) +static int PSP_QueueFillRects(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FRect *rects, int count) { - VertV *verts = (VertV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertV), 4, &cmd->data.draw.first); + VertV *verts = (VertV *)SDL_AllocateRenderVertices(renderer, count * 2 * sizeof(VertV), 4, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -791,9 +757,8 @@ PSP_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FR return 0; } -static int -PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect) +static int PSP_QueueCopy(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect) { VertTV *verts; const float x = dstrect->x; @@ -806,10 +771,9 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex const float u1 = srcrect->x + srcrect->w; const float v1 = srcrect->y + srcrect->h; - if((MathAbs(u1) - MathAbs(u0)) < 64.0f) - { - verts = (VertTV *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (VertTV), 4, &cmd->data.draw.first); - if (!verts) { + if ((MathAbs(u1) - MathAbs(u0)) < 64.0f) { + verts = (VertTV *)SDL_AllocateRenderVertices(renderer, 2 * sizeof(VertTV), 4, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -828,9 +792,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex verts->y = y + height; verts->z = 0; verts++; - } - else - { + } else { float start, end; float curU = u0; float curX = x; @@ -838,21 +800,20 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex const float slice = 64.0f; const size_t count = SDL_ceilf(width / slice); size_t i; - float ustep = (u1 - u0)/width * slice; + float ustep = (u1 - u0) / width * slice; - if(ustep < 0.0f) + if (ustep < 0.0f) { ustep = -ustep; + } cmd->data.draw.count = count; - verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertTV), 4, &cmd->data.draw.first); - if (!verts) { + verts = (VertTV *)SDL_AllocateRenderVertices(renderer, count * 2 * sizeof(VertTV), 4, &cmd->data.draw.first); + if (verts == NULL) { return -1; } - - for(i = 0, start = 0, end = width; i < count; i++, start += slice) - { + for (i = 0, start = 0, end = width; i < count; i++, start += slice) { const float polyWidth = ((curX + slice) > endX) ? (endX - curX) : slice; const float sourceWidth = ((curU + ustep) > u1) ? (u1 - curU) : ustep; @@ -880,12 +841,11 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex return 0; } -static int -PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect, - const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) +static int PSP_QueueCopyEx(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) { - VertTV *verts = (VertTV *) SDL_AllocateRenderVertices(renderer, 4 * sizeof (VertTV), 4, &cmd->data.draw.first); + VertTV *verts = (VertTV *)SDL_AllocateRenderVertices(renderer, 4 * sizeof(VertTV), 4, &cmd->data.draw.first); const float centerx = center->x; const float centery = center->y; const float x = dstrect->x + centerx; @@ -900,13 +860,13 @@ PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t float u1 = srcrect->x + srcrect->w; float v1 = srcrect->y + srcrect->h; - if (!verts) { + if (verts == NULL) { return -1; } cmd->data.draw.count = 1; - MathSincos(degToRad(360-angle), &s, &c); + MathSincos(degToRad(360 - angle), &s, &c); cw1 = c * -centerx; sw1 = s * -centerx; @@ -969,8 +929,8 @@ PSP_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t return 0; } -static void -ResetBlendState(PSP_BlendState* state) { +static void ResetBlendState(PSP_BlendState *state) +{ sceGuColor(0xffffffff); state->color = 0xffffffff; state->mode = SDL_BLENDMODE_INVALID; @@ -980,23 +940,22 @@ ResetBlendState(PSP_BlendState* state) { state->shadeModel = GU_SMOOTH; } -static void -StartDrawing(SDL_Renderer * renderer) +static void StartDrawing(SDL_Renderer *renderer) { - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + PSP_RenderData *data = (PSP_RenderData *)renderer->driverdata; // Check if we need to start GU displaylist - if(!data->displayListAvail) { + if (!data->displayListAvail) { sceGuStart(GU_DIRECT, DisplayList); data->displayListAvail = SDL_TRUE; - //ResetBlendState(&data->blendState); + // ResetBlendState(&data->blendState); } // Check if we need a draw buffer change - if(renderer->target != data->boundTarget) { - SDL_Texture* texture = renderer->target; - if(texture) { - PSP_TextureData* psp_texture = (PSP_TextureData*) texture->driverdata; + if (renderer->target != data->boundTarget) { + SDL_Texture *texture = renderer->target; + if (texture) { + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; // Set target, registering LRU TextureBindAsTarget(data, psp_texture); } else { @@ -1007,11 +966,9 @@ StartDrawing(SDL_Renderer * renderer) } } - -static void -PSP_SetBlendState(PSP_RenderData* data, PSP_BlendState* state) +static void PSP_SetBlendState(PSP_RenderData *data, PSP_BlendState *state) { - PSP_BlendState* current = &data->blendState; + PSP_BlendState *current = &data->blendState; if (state->mode != current->mode) { switch (state->mode) { @@ -1021,21 +978,22 @@ PSP_SetBlendState(PSP_RenderData* data, PSP_BlendState* state) break; case SDL_BLENDMODE_BLEND: sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); - sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0 ); + sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); sceGuEnable(GU_BLEND); break; case SDL_BLENDMODE_ADD: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); - sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF ); + sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); + sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF); sceGuEnable(GU_BLEND); break; case SDL_BLENDMODE_MOD: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); + sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); sceGuBlendFunc(GU_ADD, GU_FIX, GU_SRC_COLOR, 0, 0); sceGuEnable(GU_BLEND); break; case SDL_BLENDMODE_MUL: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); + sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); + /* FIXME SDL_BLENDMODE_MUL is simplified, and dstA is in fact un-changed.*/ sceGuBlendFunc(GU_ADD, GU_DST_COLOR, GU_ONE_MINUS_SRC_ALPHA, 0, 0); sceGuEnable(GU_BLEND); break; @@ -1044,16 +1002,16 @@ PSP_SetBlendState(PSP_RenderData* data, PSP_BlendState* state) } } - if(state->color != current->color) { + if (state->color != current->color) { sceGuColor(state->color); } - if(state->shadeModel != current->shadeModel) { + if (state->shadeModel != current->shadeModel) { sceGuShadeModel(state->shadeModel); } - if(state->texture != current->texture) { - if(state->texture != NULL) { + if (state->texture != current->texture) { + if (state->texture != NULL) { TextureActivate(state->texture); sceGuEnable(GU_TEXTURE_2D); } else { @@ -1064,10 +1022,9 @@ PSP_SetBlendState(PSP_RenderData* data, PSP_BlendState* state) *current = *state; } -static int -PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int PSP_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + PSP_RenderData *data = (PSP_RenderData *)renderer->driverdata; Uint8 *gpumem = NULL; StartDrawing(renderer); @@ -1077,166 +1034,176 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti I don't know what the limits on PSP hardware are. It might be useful to have rendering backends report a reasonable maximum, so the higher level can flush if we appear to be exceeding that. */ - gpumem = (Uint8 *) sceGuGetMemory(vertsize); - if (!gpumem) { - return SDL_SetError("Couldn't obtain a %d-byte vertex buffer!", (int) vertsize); + gpumem = (Uint8 *)sceGuGetMemory(vertsize); + if (gpumem == NULL) { + return SDL_SetError("Couldn't obtain a %d-byte vertex buffer!", (int)vertsize); } SDL_memcpy(gpumem, vertices, vertsize); while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; /* !!! FIXME: we could cache drawstate like color */ - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; /* !!! FIXME: we could cache drawstate like color */ + } - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &cmd->data.viewport.rect; - sceGuOffset(2048 - (viewport->w >> 1), 2048 - (viewport->h >> 1)); - sceGuViewport(2048, 2048, viewport->w, viewport->h); - sceGuScissor(viewport->x, viewport->y, viewport->w, viewport->h); - break; - } + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &cmd->data.viewport.rect; + sceGuOffset(2048 - (viewport->w >> 1), 2048 - (viewport->h >> 1)); + sceGuViewport(2048, 2048, viewport->w, viewport->h); + sceGuScissor(viewport->x, viewport->y, viewport->w, viewport->h); + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if(cmd->data.cliprect.enabled){ - sceGuEnable(GU_SCISSOR_TEST); - sceGuScissor(rect->x, rect->y, rect->w, rect->h); - } else { - sceGuDisable(GU_SCISSOR_TEST); - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (cmd->data.cliprect.enabled) { + sceGuEnable(GU_SCISSOR_TEST); + sceGuScissor(rect->x, rect->y, rect->w, rect->h); + } else { + sceGuDisable(GU_SCISSOR_TEST); } + break; + } - case SDL_RENDERCMD_CLEAR: { - const Uint8 r = cmd->data.color.r; - const Uint8 g = cmd->data.color.g; - const Uint8 b = cmd->data.color.b; - const Uint8 a = cmd->data.color.a; - sceGuClearColor(GU_RGBA(r,g,b,a)); - sceGuClearStencil(a); - sceGuClear(GU_COLOR_BUFFER_BIT | GU_STENCIL_BUFFER_BIT); - break; - } + case SDL_RENDERCMD_CLEAR: + { + const Uint8 r = cmd->data.color.r; + const Uint8 g = cmd->data.color.g; + const Uint8 b = cmd->data.color.b; + const Uint8 a = cmd->data.color.a; + sceGuClearColor(GU_RGBA(r, g, b, a)); + sceGuClearStencil(a); + sceGuClear(GU_COLOR_BUFFER_BIT | GU_STENCIL_BUFFER_BIT); + break; + } - case SDL_RENDERCMD_DRAW_POINTS: { - const size_t count = cmd->data.draw.count; - const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first); - const Uint8 r = cmd->data.draw.r; - const Uint8 g = cmd->data.draw.g; - const Uint8 b = cmd->data.draw.b; - const Uint8 a = cmd->data.draw.a; - PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = NULL, - .mode = cmd->data.draw.blend, - .shadeModel = GU_FLAT - }; - PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts); - break; - } + case SDL_RENDERCMD_DRAW_POINTS: + { + const size_t count = cmd->data.draw.count; + const VertV *verts = (VertV *)(gpumem + cmd->data.draw.first); + const Uint8 r = cmd->data.draw.r; + const Uint8 g = cmd->data.draw.g; + const Uint8 b = cmd->data.draw.b; + const Uint8 a = cmd->data.draw.a; + PSP_BlendState state = { + .color = GU_RGBA(r, g, b, a), + .texture = NULL, + .mode = cmd->data.draw.blend, + .shadeModel = GU_FLAT + }; + PSP_SetBlendState(data, &state); + sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF | GU_TRANSFORM_2D, count, 0, verts); + break; + } - case SDL_RENDERCMD_DRAW_LINES: { - const size_t count = cmd->data.draw.count; - const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first); - const Uint8 r = cmd->data.draw.r; - const Uint8 g = cmd->data.draw.g; - const Uint8 b = cmd->data.draw.b; - const Uint8 a = cmd->data.draw.a; - PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = NULL, - .mode = cmd->data.draw.blend, - .shadeModel = GU_FLAT - }; - PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts); - break; - } + case SDL_RENDERCMD_DRAW_LINES: + { + const size_t count = cmd->data.draw.count; + const VertV *verts = (VertV *)(gpumem + cmd->data.draw.first); + const Uint8 r = cmd->data.draw.r; + const Uint8 g = cmd->data.draw.g; + const Uint8 b = cmd->data.draw.b; + const Uint8 a = cmd->data.draw.a; + PSP_BlendState state = { + .color = GU_RGBA(r, g, b, a), + .texture = NULL, + .mode = cmd->data.draw.blend, + .shadeModel = GU_FLAT + }; + PSP_SetBlendState(data, &state); + sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF | GU_TRANSFORM_2D, count, 0, verts); + break; + } - case SDL_RENDERCMD_FILL_RECTS: { - const size_t count = cmd->data.draw.count; - const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first); - const Uint8 r = cmd->data.draw.r; - const Uint8 g = cmd->data.draw.g; - const Uint8 b = cmd->data.draw.b; - const Uint8 a = cmd->data.draw.a; - PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = NULL, - .mode = cmd->data.draw.blend, - .shadeModel = GU_FLAT - }; - PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2 * count, 0, verts); - break; - } + case SDL_RENDERCMD_FILL_RECTS: + { + const size_t count = cmd->data.draw.count; + const VertV *verts = (VertV *)(gpumem + cmd->data.draw.first); + const Uint8 r = cmd->data.draw.r; + const Uint8 g = cmd->data.draw.g; + const Uint8 b = cmd->data.draw.b; + const Uint8 a = cmd->data.draw.a; + PSP_BlendState state = { + .color = GU_RGBA(r, g, b, a), + .texture = NULL, + .mode = cmd->data.draw.blend, + .shadeModel = GU_FLAT + }; + PSP_SetBlendState(data, &state); + sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF | GU_TRANSFORM_2D, 2 * count, 0, verts); + break; + } - case SDL_RENDERCMD_COPY: { - const size_t count = cmd->data.draw.count; - const VertTV *verts = (VertTV *) (gpumem + cmd->data.draw.first); - const Uint8 a = cmd->data.draw.a; - const Uint8 r = cmd->data.draw.r; - const Uint8 g = cmd->data.draw.g; - const Uint8 b = cmd->data.draw.b; - PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = cmd->data.draw.texture, - .mode = cmd->data.draw.blend, - .shadeModel = GU_SMOOTH - }; - PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2 * count, 0, verts); - break; - } + case SDL_RENDERCMD_COPY: + { + const size_t count = cmd->data.draw.count; + const VertTV *verts = (VertTV *)(gpumem + cmd->data.draw.first); + const Uint8 a = cmd->data.draw.a; + const Uint8 r = cmd->data.draw.r; + const Uint8 g = cmd->data.draw.g; + const Uint8 b = cmd->data.draw.b; + PSP_BlendState state = { + .color = GU_RGBA(r, g, b, a), + .texture = cmd->data.draw.texture, + .mode = cmd->data.draw.blend, + .shadeModel = GU_SMOOTH + }; + PSP_SetBlendState(data, &state); + sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF | GU_VERTEX_32BITF | GU_TRANSFORM_2D, 2 * count, 0, verts); + break; + } - case SDL_RENDERCMD_COPY_EX: { - const VertTV *verts = (VertTV *) (gpumem + cmd->data.draw.first); + case SDL_RENDERCMD_COPY_EX: + { + const VertTV *verts = (VertTV *)(gpumem + cmd->data.draw.first); + const Uint8 a = cmd->data.draw.a; + const Uint8 r = cmd->data.draw.r; + const Uint8 g = cmd->data.draw.g; + const Uint8 b = cmd->data.draw.b; + PSP_BlendState state = { + .color = GU_RGBA(r, g, b, a), + .texture = cmd->data.draw.texture, + .mode = cmd->data.draw.blend, + .shadeModel = GU_SMOOTH + }; + PSP_SetBlendState(data, &state); + sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF | GU_VERTEX_32BITF | GU_TRANSFORM_2D, 4, 0, verts); + break; + } + + case SDL_RENDERCMD_GEOMETRY: + { + const size_t count = cmd->data.draw.count; + if (cmd->data.draw.texture == NULL) { + const VertCV *verts = (VertCV *)(gpumem + cmd->data.draw.first); + sceGuDisable(GU_TEXTURE_2D); + /* In GU_SMOOTH mode */ + sceGuDrawArray(GU_TRIANGLES, GU_COLOR_8888 | GU_VERTEX_32BITF | GU_TRANSFORM_2D, count, 0, verts); + sceGuEnable(GU_TEXTURE_2D); + } else { + const VertTCV *verts = (VertTCV *)(gpumem + cmd->data.draw.first); const Uint8 a = cmd->data.draw.a; const Uint8 r = cmd->data.draw.r; const Uint8 g = cmd->data.draw.g; const Uint8 b = cmd->data.draw.b; PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = cmd->data.draw.texture, + .color = GU_RGBA(r, g, b, a), + .texture = NULL, .mode = cmd->data.draw.blend, - .shadeModel = GU_SMOOTH + .shadeModel = GU_FLAT }; + TextureActivate(cmd->data.draw.texture); PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 4, 0, verts); - break; - } - - case SDL_RENDERCMD_GEOMETRY: { - const size_t count = cmd->data.draw.count; - if (cmd->data.draw.texture == NULL) { - const VertCV *verts = (VertCV *) (gpumem + cmd->data.draw.first); - sceGuDisable(GU_TEXTURE_2D); - /* In GU_SMOOTH mode */ - sceGuDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts); - sceGuEnable(GU_TEXTURE_2D); - } else { - const VertTCV *verts = (VertTCV *) (gpumem + cmd->data.draw.first); - const Uint8 a = cmd->data.draw.a; - const Uint8 r = cmd->data.draw.r; - const Uint8 g = cmd->data.draw.g; - const Uint8 b = cmd->data.draw.b; - PSP_BlendState state = { - .color = GU_RGBA(r,g,b,a), - .texture = NULL, - .mode = cmd->data.draw.blend, - .shadeModel = GU_FLAT - }; - TextureActivate(cmd->data.draw.texture); - PSP_SetBlendState(data, &state); - sceGuDrawArray(GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts); - } - break; + sceGuDrawArray(GU_TRIANGLES, GU_TEXTURE_32BITF | GU_COLOR_8888 | GU_VERTEX_32BITF | GU_TRANSFORM_2D, count, 0, verts); } + break; + } - case SDL_RENDERCMD_NO_OP: - break; + case SDL_RENDERCMD_NO_OP: + break; } cmd = cmd->next; @@ -1245,27 +1212,26 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti return 0; } -static int -PSP_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 pixel_format, void * pixels, int pitch) +static int PSP_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 pixel_format, void *pixels, int pitch) { return SDL_Unsupported(); } -static int -PSP_RenderPresent(SDL_Renderer * renderer) +static int PSP_RenderPresent(SDL_Renderer *renderer) { - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + PSP_RenderData *data = (PSP_RenderData *)renderer->driverdata; if (!data->displayListAvail) { return -1; } data->displayListAvail = SDL_FALSE; sceGuFinish(); - sceGuSync(0,0); + sceGuSync(0, 0); - if ((data->vsync) && (data->vblank_not_reached)) + if ((data->vsync) && (data->vblank_not_reached)) { sceDisplayWaitVblankStart(); + } data->vblank_not_reached = SDL_TRUE; data->backbuffer = data->frontbuffer; @@ -1274,17 +1240,18 @@ PSP_RenderPresent(SDL_Renderer * renderer) return 0; } -static void -PSP_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void PSP_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - PSP_RenderData *renderdata = (PSP_RenderData *) renderer->driverdata; - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_RenderData *renderdata = (PSP_RenderData *)renderer->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *)texture->driverdata; - if (renderdata == NULL) + if (renderdata == NULL) { return; + } - if(psp_texture == NULL) + if (psp_texture == NULL) { return; + } LRUTargetRemove(renderdata, psp_texture); TextureStorageFree(psp_texture->data); @@ -1292,18 +1259,18 @@ PSP_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture->driverdata = NULL; } -static void -PSP_DestroyRenderer(SDL_Renderer * renderer) +static void PSP_DestroyRenderer(SDL_Renderer *renderer) { - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + PSP_RenderData *data = (PSP_RenderData *)renderer->driverdata; if (data) { - if (!data->initialized) + if (!data->initialized) { return; + } StartDrawing(renderer); sceKernelDisableSubIntr(PSP_VBLANK_INT, 0); - sceKernelReleaseSubIntrHandler(PSP_VBLANK_INT,0); + sceKernelReleaseSubIntrHandler(PSP_VBLANK_INT, 0); sceDisplayWaitVblankStart(); sceGuDisplay(GU_FALSE); sceGuTerm(); @@ -1317,37 +1284,34 @@ PSP_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int -PSP_SetVSync(SDL_Renderer * renderer, const int vsync) +static int PSP_SetVSync(SDL_Renderer *renderer, const int vsync) { PSP_RenderData *data = renderer->driverdata; data->vsync = vsync; return 0; } -SDL_Renderer * -PSP_CreateRenderer(SDL_Window * window, Uint32 flags) +SDL_Renderer *PSP_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; PSP_RenderData *data; int pixelformat; - void* doublebuffer = NULL; + void *doublebuffer = NULL; - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (PSP_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (PSP_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { PSP_DestroyRenderer(renderer); SDL_OutOfMemory(); return NULL; } - renderer->WindowEvent = PSP_WindowEvent; renderer->CreateTexture = PSP_CreateTexture; renderer->UpdateTexture = PSP_UpdateTexture; @@ -1356,9 +1320,9 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SetTextureScaleMode = PSP_SetTextureScaleMode; renderer->SetRenderTarget = PSP_SetRenderTarget; renderer->QueueSetViewport = PSP_QueueSetViewport; - renderer->QueueSetDrawColor = PSP_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = PSP_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = PSP_QueueDrawPoints; - renderer->QueueDrawLines = PSP_QueueDrawPoints; /* lines and points queue vertices the same way. */ + renderer->QueueDrawLines = PSP_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueGeometry = PSP_QueueGeometry; renderer->QueueFillRects = PSP_QueueFillRects; renderer->QueueCopy = PSP_QueueCopy; @@ -1384,24 +1348,23 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) data->vsync = SDL_FALSE; } - pixelformat=PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window)); - switch(pixelformat) - { - case GU_PSM_4444: - case GU_PSM_5650: - case GU_PSM_5551: - data->bpp = 2; - data->psm = pixelformat; - break; - default: - data->bpp = 4; - data->psm = GU_PSM_8888; - break; + pixelformat = PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window)); + switch (pixelformat) { + case GU_PSM_4444: + case GU_PSM_5650: + case GU_PSM_5551: + data->bpp = 2; + data->psm = pixelformat; + break; + default: + data->bpp = 4; + data->psm = GU_PSM_8888; + break; } - doublebuffer = vramalloc(PSP_FRAME_BUFFER_SIZE*data->bpp*2); + doublebuffer = vramalloc(PSP_FRAME_BUFFER_SIZE * data->bpp * 2); data->backbuffer = doublebuffer; - data->frontbuffer = ((uint8_t*)doublebuffer)+PSP_FRAME_BUFFER_SIZE*data->bpp; + data->frontbuffer = ((uint8_t *)doublebuffer) + PSP_FRAME_BUFFER_SIZE * data->bpp; sceGuInit(); /* setup GU */ @@ -1409,11 +1372,9 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) sceGuDrawBuffer(data->psm, vrelptr(data->frontbuffer), PSP_FRAME_BUFFER_WIDTH); sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, vrelptr(data->backbuffer), PSP_FRAME_BUFFER_WIDTH); - - sceGuOffset(2048 - (PSP_SCREEN_WIDTH>>1), 2048 - (PSP_SCREEN_HEIGHT>>1)); + sceGuOffset(2048 - (PSP_SCREEN_WIDTH >> 1), 2048 - (PSP_SCREEN_HEIGHT >> 1)); sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); - sceGuDisable(GU_DEPTH_TEST); /* Scissoring */ @@ -1427,11 +1388,11 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) sceGuEnable(GU_CULL_FACE); */ - //Setup initial blend state + // Setup initial blend state ResetBlendState(&data->blendState); sceGuFinish(); - sceGuSync(0,0); + sceGuSync(0, 0); sceDisplayWaitVblankStartCB(); sceGuDisplay(GU_TRUE); @@ -1449,17 +1410,17 @@ SDL_RenderDriver PSP_RenderDriver = { .name = "PSP", .flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE, .num_texture_formats = 4, - .texture_formats = { [0] = SDL_PIXELFORMAT_BGR565, - [1] = SDL_PIXELFORMAT_ABGR1555, - [2] = SDL_PIXELFORMAT_ABGR4444, - [3] = SDL_PIXELFORMAT_ABGR8888, + .texture_formats = { + [0] = SDL_PIXELFORMAT_BGR565, + [1] = SDL_PIXELFORMAT_ABGR1555, + [2] = SDL_PIXELFORMAT_ABGR4444, + [3] = SDL_PIXELFORMAT_ABGR8888, }, .max_texture_width = 512, .max_texture_height = 512, - } + } }; #endif /* SDL_VIDEO_RENDER_PSP */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/render/software/SDL_blendfillrect.c b/modules/SDL2/src/render/software/SDL_blendfillrect.c index d9c6a73..2489eb1 100644 --- a/modules/SDL2/src/render/software/SDL_blendfillrect.c +++ b/modules/SDL2/src/render/software/SDL_blendfillrect.c @@ -25,10 +25,8 @@ #include "SDL_draw.h" #include "SDL_blendfillrect.h" - -static int -SDL_BlendFillRect_RGB555(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_RGB555(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -52,9 +50,8 @@ SDL_BlendFillRect_RGB555(SDL_Surface * dst, const SDL_Rect * rect, return 0; } -static int -SDL_BlendFillRect_RGB565(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_RGB565(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -78,9 +75,8 @@ SDL_BlendFillRect_RGB565(SDL_Surface * dst, const SDL_Rect * rect, return 0; } -static int -SDL_BlendFillRect_RGB888(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_RGB888(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -104,9 +100,8 @@ SDL_BlendFillRect_RGB888(SDL_Surface * dst, const SDL_Rect * rect, return 0; } -static int -SDL_BlendFillRect_ARGB8888(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_ARGB8888(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -130,9 +125,8 @@ SDL_BlendFillRect_ARGB8888(SDL_Surface * dst, const SDL_Rect * rect, return 0; } -static int -SDL_BlendFillRect_RGB(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_RGB(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { SDL_PixelFormat *fmt = dst->format; unsigned inva = 0xff - a; @@ -181,9 +175,8 @@ SDL_BlendFillRect_RGB(SDL_Surface * dst, const SDL_Rect * rect, } } -static int -SDL_BlendFillRect_RGBA(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendFillRect_RGBA(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { SDL_PixelFormat *fmt = dst->format; unsigned inva = 0xff - a; @@ -213,13 +206,12 @@ SDL_BlendFillRect_RGBA(SDL_Surface * dst, const SDL_Rect * rect, } } -int -SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendFillRect(SDL_Surface *dst, const SDL_Rect *rect, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { SDL_Rect clipped; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_BlendFillRect(): dst"); } @@ -280,17 +272,16 @@ SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect, } } -int -SDL_BlendFillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { SDL_Rect rect; int i; - int (*func)(SDL_Surface * dst, const SDL_Rect * rect, + int (*func)(SDL_Surface * dst, const SDL_Rect *rect, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL; int status = 0; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_BlendFillRects(): dst"); } @@ -334,7 +325,7 @@ SDL_BlendFillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, break; } - if (!func) { + if (func == NULL) { if (!dst->format->Amask) { func = SDL_BlendFillRect_RGB; } else { diff --git a/modules/SDL2/src/render/software/SDL_blendfillrect.h b/modules/SDL2/src/render/software/SDL_blendfillrect.h index 9eb8de1..4379a8e 100644 --- a/modules/SDL2/src/render/software/SDL_blendfillrect.h +++ b/modules/SDL2/src/render/software/SDL_blendfillrect.h @@ -24,9 +24,8 @@ #include "../../SDL_internal.h" - -extern int SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); -extern int SDL_BlendFillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendFillRect(SDL_Surface *dst, const SDL_Rect *rect, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /* SDL_blendfillrect_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_blendline.c b/modules/SDL2/src/render/software/SDL_blendline.c index 6be591a..0d63656 100644 --- a/modules/SDL2/src/render/software/SDL_blendline.c +++ b/modules/SDL2/src/render/software/SDL_blendline.c @@ -26,11 +26,9 @@ #include "SDL_blendline.h" #include "SDL_blendpoint.h" - -static void -SDL_BlendLine_RGB2(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGB2(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { const SDL_PixelFormat *fmt = dst->format; unsigned r, g, b, a, inva; @@ -133,10 +131,9 @@ SDL_BlendLine_RGB2(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGB555(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { unsigned r, g, b, a, inva; @@ -238,10 +235,9 @@ SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGB565(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { unsigned r, g, b, a, inva; @@ -343,10 +339,9 @@ SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_RGB4(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGB4(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { const SDL_PixelFormat *fmt = dst->format; unsigned r, g, b, a, inva; @@ -449,10 +444,9 @@ SDL_BlendLine_RGB4(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_RGBA4(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGBA4(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { const SDL_PixelFormat *fmt = dst->format; unsigned r, g, b, a, inva; @@ -555,10 +549,9 @@ SDL_BlendLine_RGBA4(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_RGB888(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { unsigned r, g, b, a, inva; @@ -660,10 +653,9 @@ SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -static void -SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, - SDL_bool draw_end) +static void SDL_BlendLine_ARGB8888(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, + SDL_bool draw_end) { unsigned r, g, b, a, inva; @@ -765,14 +757,13 @@ SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2, } } -typedef void (*BlendLineFunc) (SDL_Surface * dst, - int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, - Uint8 r, Uint8 g, Uint8 b, Uint8 a, - SDL_bool draw_end); +typedef void (*BlendLineFunc)(SDL_Surface *dst, + int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, + Uint8 r, Uint8 g, Uint8 b, Uint8 a, + SDL_bool draw_end); -static BlendLineFunc -SDL_CalculateBlendLineFunc(const SDL_PixelFormat * fmt) +static BlendLineFunc SDL_CalculateBlendLineFunc(const SDL_PixelFormat *fmt) { switch (fmt->BytesPerPixel) { case 2: @@ -802,18 +793,17 @@ SDL_CalculateBlendLineFunc(const SDL_PixelFormat * fmt) return NULL; } -int -SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { BlendLineFunc func; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_BlendLine(): dst"); } func = SDL_CalculateBlendLineFunc(dst->format); - if (!func) { + if (func == NULL) { return SDL_SetError("SDL_BlendLine(): Unsupported surface format"); } @@ -827,9 +817,8 @@ SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, return 0; } -int -SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int i; int x1, y1; @@ -837,18 +826,18 @@ SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count, SDL_bool draw_end; BlendLineFunc func; - if (!dst) { + if (dst == NULL) { return SDL_SetError("SDL_BlendLines(): Passed NULL destination surface"); } func = SDL_CalculateBlendLineFunc(dst->format); - if (!func) { + if (func == NULL) { return SDL_SetError("SDL_BlendLines(): Unsupported surface format"); } for (i = 1; i < count; ++i) { - x1 = points[i-1].x; - y1 = points[i-1].y; + x1 = points[i - 1].x; + y1 = points[i - 1].y; x2 = points[i].x; y2 = points[i].y; @@ -863,8 +852,8 @@ SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count, func(dst, x1, y1, x2, y2, blendMode, r, g, b, a, draw_end); } - if (points[0].x != points[count-1].x || points[0].y != points[count-1].y) { - SDL_BlendPoint(dst, points[count-1].x, points[count-1].y, + if (points[0].x != points[count - 1].x || points[0].y != points[count - 1].y) { + SDL_BlendPoint(dst, points[count - 1].x, points[count - 1].y, blendMode, r, g, b, a); } return 0; diff --git a/modules/SDL2/src/render/software/SDL_blendline.h b/modules/SDL2/src/render/software/SDL_blendline.h index 46bc9aa..4abcbb5 100644 --- a/modules/SDL2/src/render/software/SDL_blendline.h +++ b/modules/SDL2/src/render/software/SDL_blendline.h @@ -24,9 +24,8 @@ #include "../../SDL_internal.h" - -extern int SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); -extern int SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /* SDL_blendline_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_blendpoint.c b/modules/SDL2/src/render/software/SDL_blendpoint.c index d2d3323..3fc68f4 100644 --- a/modules/SDL2/src/render/software/SDL_blendpoint.c +++ b/modules/SDL2/src/render/software/SDL_blendpoint.c @@ -25,10 +25,8 @@ #include "SDL_draw.h" #include "SDL_blendpoint.h" - -static int -SDL_BlendPoint_RGB555(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_RGB555(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -52,9 +50,8 @@ SDL_BlendPoint_RGB555(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, return 0; } -static int -SDL_BlendPoint_RGB565(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_RGB565(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -78,9 +75,8 @@ SDL_BlendPoint_RGB565(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, return 0; } -static int -SDL_BlendPoint_RGB888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_RGB888(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -104,9 +100,8 @@ SDL_BlendPoint_RGB888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, return 0; } -static int -SDL_BlendPoint_ARGB8888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, - Uint8 r, Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_ARGB8888(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, + Uint8 r, Uint8 g, Uint8 b, Uint8 a) { unsigned inva = 0xff - a; @@ -130,9 +125,8 @@ SDL_BlendPoint_ARGB8888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode return 0; } -static int -SDL_BlendPoint_RGB(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_RGB(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { SDL_PixelFormat *fmt = dst->format; unsigned inva = 0xff - a; @@ -181,9 +175,8 @@ SDL_BlendPoint_RGB(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uin } } -static int -SDL_BlendPoint_RGBA(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +static int SDL_BlendPoint_RGBA(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { SDL_PixelFormat *fmt = dst->format; unsigned inva = 0xff - a; @@ -213,11 +206,10 @@ SDL_BlendPoint_RGBA(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Ui } } -int -SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, - Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendPoint(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, + Uint8 g, Uint8 b, Uint8 a) { - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_BlendPoint(): dst"); } @@ -274,9 +266,8 @@ SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r } } -int -SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count, - SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +int SDL_BlendPoints(SDL_Surface *dst, const SDL_Point *points, int count, + SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int minx, miny; int maxx, maxy; @@ -286,7 +277,7 @@ SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL; int status = 0; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_BlendPoints(): dst"); } @@ -332,7 +323,7 @@ SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count, break; } - if (!func) { + if (func == NULL) { if (!dst->format->Amask) { func = SDL_BlendPoint_RGB; } else { diff --git a/modules/SDL2/src/render/software/SDL_blendpoint.h b/modules/SDL2/src/render/software/SDL_blendpoint.h index fcdce75..74ed964 100644 --- a/modules/SDL2/src/render/software/SDL_blendpoint.h +++ b/modules/SDL2/src/render/software/SDL_blendpoint.h @@ -24,9 +24,8 @@ #include "../../SDL_internal.h" - -extern int SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); -extern int SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendPoint(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern int SDL_BlendPoints(SDL_Surface *dst, const SDL_Point *points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /* SDL_blendpoint_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_draw.h b/modules/SDL2/src/render/software/SDL_draw.h index 66d3f8a..db593f4 100644 --- a/modules/SDL2/src/render/software/SDL_draw.h +++ b/modules/SDL2/src/render/software/SDL_draw.h @@ -26,77 +26,90 @@ * and in the blend and add case, the RGB values are premultiplied by a. */ -#define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255) +#define DRAW_MUL(_a, _b) (((unsigned)(_a) * (_b)) / 255) #define DRAW_FASTSETPIXEL(type) \ - *pixel = (type) color + *pixel = (type)color #define DRAW_FASTSETPIXEL1 DRAW_FASTSETPIXEL(Uint8) #define DRAW_FASTSETPIXEL2 DRAW_FASTSETPIXEL(Uint16) #define DRAW_FASTSETPIXEL4 DRAW_FASTSETPIXEL(Uint32) #define DRAW_FASTSETPIXELXY(x, y, type, bpp, color) \ - *(type *)((Uint8 *)dst->pixels + (y) * dst->pitch \ - + (x) * bpp) = (type) color + *(type *)((Uint8 *)dst->pixels + (y)*dst->pitch + (x)*bpp) = (type)color #define DRAW_FASTSETPIXELXY1(x, y) DRAW_FASTSETPIXELXY(x, y, Uint8, 1, color) #define DRAW_FASTSETPIXELXY2(x, y) DRAW_FASTSETPIXELXY(x, y, Uint16, 2, color) #define DRAW_FASTSETPIXELXY4(x, y) DRAW_FASTSETPIXELXY(x, y, Uint32, 4, color) -#define DRAW_SETPIXEL(setpixel) \ -do { \ - unsigned sr = r, sg = g, sb = b, sa = a; (void) sa; \ - setpixel; \ -} while (0) +#define DRAW_SETPIXEL(setpixel) \ + do { \ + unsigned sr = r, sg = g, sb = b, sa = a; \ + (void)sa; \ + setpixel; \ + } while (0) #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \ -do { \ - unsigned sr, sg, sb, sa = 0xFF; \ - getpixel; \ - sr = DRAW_MUL(inva, sr) + r; \ - sg = DRAW_MUL(inva, sg) + g; \ - sb = DRAW_MUL(inva, sb) + b; \ - sa = DRAW_MUL(inva, sa) + a; \ - setpixel; \ -} while (0) + do { \ + unsigned sr, sg, sb, sa = 0xFF; \ + getpixel; \ + sr = DRAW_MUL(inva, sr) + r; \ + sg = DRAW_MUL(inva, sg) + g; \ + sb = DRAW_MUL(inva, sb) + b; \ + sa = DRAW_MUL(inva, sa) + a; \ + setpixel; \ + } while (0) #define DRAW_SETPIXEL_ADD(getpixel, setpixel) \ -do { \ - unsigned sr, sg, sb, sa; (void) sa; \ - getpixel; \ - sr += r; if (sr > 0xff) sr = 0xff; \ - sg += g; if (sg > 0xff) sg = 0xff; \ - sb += b; if (sb > 0xff) sb = 0xff; \ - setpixel; \ -} while (0) + do { \ + unsigned sr, sg, sb, sa; \ + (void)sa; \ + getpixel; \ + sr += r; \ + if (sr > 0xff) \ + sr = 0xff; \ + sg += g; \ + if (sg > 0xff) \ + sg = 0xff; \ + sb += b; \ + if (sb > 0xff) \ + sb = 0xff; \ + setpixel; \ + } while (0) #define DRAW_SETPIXEL_MOD(getpixel, setpixel) \ -do { \ - unsigned sr, sg, sb, sa; (void) sa; \ - getpixel; \ - sr = DRAW_MUL(sr, r); \ - sg = DRAW_MUL(sg, g); \ - sb = DRAW_MUL(sb, b); \ - setpixel; \ -} while (0) - -#define DRAW_SETPIXEL_MUL(getpixel, setpixel) \ -do { \ - unsigned sr, sg, sb, sa; sa = 0xFF; \ - getpixel; \ - sr = DRAW_MUL(sr, r) + DRAW_MUL(inva, sr); if (sr > 0xff) sr = 0xff; \ - sg = DRAW_MUL(sg, g) + DRAW_MUL(inva, sg); if (sg > 0xff) sg = 0xff; \ - sb = DRAW_MUL(sb, b) + DRAW_MUL(inva, sb); if (sb > 0xff) sb = 0xff; \ - sa = DRAW_MUL(sa, a) + DRAW_MUL(inva, sa); if (sa > 0xff) sa = 0xff; \ - setpixel; \ -} while (0) - -#define DRAW_SETPIXELXY(x, y, type, bpp, op) \ -do { \ - type *pixel = (type *)((Uint8 *)dst->pixels + (y) * dst->pitch \ - + (x) * bpp); \ - op; \ -} while (0) + do { \ + unsigned sr, sg, sb, sa; \ + (void)sa; \ + getpixel; \ + sr = DRAW_MUL(sr, r); \ + sg = DRAW_MUL(sg, g); \ + sb = DRAW_MUL(sb, b); \ + setpixel; \ + } while (0) + +#define DRAW_SETPIXEL_MUL(getpixel, setpixel) \ + do { \ + unsigned sr, sg, sb, sa; \ + (void)sa; \ + getpixel; \ + sr = DRAW_MUL(sr, r) + DRAW_MUL(inva, sr); \ + if (sr > 0xff) \ + sr = 0xff; \ + sg = DRAW_MUL(sg, g) + DRAW_MUL(inva, sg); \ + if (sg > 0xff) \ + sg = 0xff; \ + sb = DRAW_MUL(sb, b) + DRAW_MUL(inva, sb); \ + if (sb > 0xff) \ + sb = 0xff; \ + setpixel; \ + } while (0) + +#define DRAW_SETPIXELXY(x, y, type, bpp, op) \ + do { \ + type *pixel = (type *)((Uint8 *)dst->pixels + (y)*dst->pitch + (x)*bpp); \ + op; \ + } while (0) /* * Define draw operators for RGB555 @@ -105,19 +118,19 @@ do { \ #define DRAW_SETPIXEL_RGB555 \ DRAW_SETPIXEL(RGB555_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_BLEND_RGB555 \ +#define DRAW_SETPIXEL_BLEND_RGB555 \ DRAW_SETPIXEL_BLEND(RGB_FROM_RGB555(*pixel, sr, sg, sb), \ RGB555_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_ADD_RGB555 \ +#define DRAW_SETPIXEL_ADD_RGB555 \ DRAW_SETPIXEL_ADD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \ RGB555_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MOD_RGB555 \ +#define DRAW_SETPIXEL_MOD_RGB555 \ DRAW_SETPIXEL_MOD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \ RGB555_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MUL_RGB555 \ +#define DRAW_SETPIXEL_MUL_RGB555 \ DRAW_SETPIXEL_MUL(RGB_FROM_RGB555(*pixel, sr, sg, sb), \ RGB555_FROM_RGB(*pixel, sr, sg, sb)) @@ -143,19 +156,19 @@ do { \ #define DRAW_SETPIXEL_RGB565 \ DRAW_SETPIXEL(RGB565_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_BLEND_RGB565 \ +#define DRAW_SETPIXEL_BLEND_RGB565 \ DRAW_SETPIXEL_BLEND(RGB_FROM_RGB565(*pixel, sr, sg, sb), \ RGB565_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_ADD_RGB565 \ +#define DRAW_SETPIXEL_ADD_RGB565 \ DRAW_SETPIXEL_ADD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \ RGB565_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MOD_RGB565 \ +#define DRAW_SETPIXEL_MOD_RGB565 \ DRAW_SETPIXEL_MOD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \ RGB565_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MUL_RGB565 \ +#define DRAW_SETPIXEL_MUL_RGB565 \ DRAW_SETPIXEL_MUL(RGB_FROM_RGB565(*pixel, sr, sg, sb), \ RGB565_FROM_RGB(*pixel, sr, sg, sb)) @@ -181,19 +194,19 @@ do { \ #define DRAW_SETPIXEL_RGB888 \ DRAW_SETPIXEL(RGB888_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_BLEND_RGB888 \ +#define DRAW_SETPIXEL_BLEND_RGB888 \ DRAW_SETPIXEL_BLEND(RGB_FROM_RGB888(*pixel, sr, sg, sb), \ RGB888_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_ADD_RGB888 \ +#define DRAW_SETPIXEL_ADD_RGB888 \ DRAW_SETPIXEL_ADD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \ RGB888_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MOD_RGB888 \ +#define DRAW_SETPIXEL_MOD_RGB888 \ DRAW_SETPIXEL_MOD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \ RGB888_FROM_RGB(*pixel, sr, sg, sb)) -#define DRAW_SETPIXEL_MUL_RGB888 \ +#define DRAW_SETPIXEL_MUL_RGB888 \ DRAW_SETPIXEL_MUL(RGB_FROM_RGB888(*pixel, sr, sg, sb), \ RGB888_FROM_RGB(*pixel, sr, sg, sb)) @@ -219,19 +232,19 @@ do { \ #define DRAW_SETPIXEL_ARGB8888 \ DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_BLEND_ARGB8888 \ +#define DRAW_SETPIXEL_BLEND_ARGB8888 \ DRAW_SETPIXEL_BLEND(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_ADD_ARGB8888 \ +#define DRAW_SETPIXEL_ADD_ARGB8888 \ DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_MOD_ARGB8888 \ +#define DRAW_SETPIXEL_MOD_ARGB8888 \ DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_MUL_ARGB8888 \ +#define DRAW_SETPIXEL_MUL_ARGB8888 \ DRAW_SETPIXEL_MUL(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) @@ -257,19 +270,19 @@ do { \ #define DRAW_SETPIXEL_RGB \ DRAW_SETPIXEL(PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb)) -#define DRAW_SETPIXEL_BLEND_RGB \ +#define DRAW_SETPIXEL_BLEND_RGB \ DRAW_SETPIXEL_BLEND(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \ PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb)) -#define DRAW_SETPIXEL_ADD_RGB \ +#define DRAW_SETPIXEL_ADD_RGB \ DRAW_SETPIXEL_ADD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \ PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb)) -#define DRAW_SETPIXEL_MOD_RGB \ +#define DRAW_SETPIXEL_MOD_RGB \ DRAW_SETPIXEL_MOD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \ PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb)) -#define DRAW_SETPIXEL_MUL_RGB \ +#define DRAW_SETPIXEL_MUL_RGB \ DRAW_SETPIXEL_MUL(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \ PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb)) @@ -303,7 +316,6 @@ do { \ #define DRAW_SETPIXELXY4_MUL_RGB(x, y) \ DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGB) - /* * Define draw operators for general RGBA */ @@ -311,19 +323,19 @@ do { \ #define DRAW_SETPIXEL_RGBA \ DRAW_SETPIXEL(PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_BLEND_RGBA \ +#define DRAW_SETPIXEL_BLEND_RGBA \ DRAW_SETPIXEL_BLEND(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \ PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_ADD_RGBA \ +#define DRAW_SETPIXEL_ADD_RGBA \ DRAW_SETPIXEL_ADD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \ PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_MOD_RGBA \ +#define DRAW_SETPIXEL_MOD_RGBA \ DRAW_SETPIXEL_MOD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \ PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa)) -#define DRAW_SETPIXEL_MUL_RGBA \ +#define DRAW_SETPIXEL_MUL_RGBA \ DRAW_SETPIXEL_MUL(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \ PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa)) @@ -349,284 +361,301 @@ do { \ #define ABS(_x) ((_x) < 0 ? -(_x) : (_x)) /* Horizontal line */ -#define HLINE(type, op, draw_end) \ -{ \ - int length; \ - int pitch = (dst->pitch / dst->format->BytesPerPixel); \ - type *pixel; \ - if (x1 <= x2) { \ - pixel = (type *)dst->pixels + y1 * pitch + x1; \ - length = draw_end ? (x2-x1+1) : (x2-x1); \ - } else { \ - pixel = (type *)dst->pixels + y1 * pitch + x2; \ - if (!draw_end) { \ - ++pixel; \ - } \ - length = draw_end ? (x1-x2+1) : (x1-x2); \ - } \ - while (length--) { \ - op; \ - ++pixel; \ - } \ -} +#define HLINE(type, op, draw_end) \ + { \ + int length; \ + int pitch = (dst->pitch / dst->format->BytesPerPixel); \ + type *pixel; \ + if (x1 <= x2) { \ + pixel = (type *)dst->pixels + y1 * pitch + x1; \ + length = draw_end ? (x2 - x1 + 1) : (x2 - x1); \ + } else { \ + pixel = (type *)dst->pixels + y1 * pitch + x2; \ + if (!draw_end) { \ + ++pixel; \ + } \ + length = draw_end ? (x1 - x2 + 1) : (x1 - x2); \ + } \ + while (length--) { \ + op; \ + ++pixel; \ + } \ + } /* Vertical line */ -#define VLINE(type, op, draw_end) \ -{ \ - int length; \ - int pitch = (dst->pitch / dst->format->BytesPerPixel); \ - type *pixel; \ - if (y1 <= y2) { \ - pixel = (type *)dst->pixels + y1 * pitch + x1; \ - length = draw_end ? (y2-y1+1) : (y2-y1); \ - } else { \ - pixel = (type *)dst->pixels + y2 * pitch + x1; \ - if (!draw_end) { \ - pixel += pitch; \ - } \ - length = draw_end ? (y1-y2+1) : (y1-y2); \ - } \ - while (length--) { \ - op; \ - pixel += pitch; \ - } \ -} +#define VLINE(type, op, draw_end) \ + { \ + int length; \ + int pitch = (dst->pitch / dst->format->BytesPerPixel); \ + type *pixel; \ + if (y1 <= y2) { \ + pixel = (type *)dst->pixels + y1 * pitch + x1; \ + length = draw_end ? (y2 - y1 + 1) : (y2 - y1); \ + } else { \ + pixel = (type *)dst->pixels + y2 * pitch + x1; \ + if (!draw_end) { \ + pixel += pitch; \ + } \ + length = draw_end ? (y1 - y2 + 1) : (y1 - y2); \ + } \ + while (length--) { \ + op; \ + pixel += pitch; \ + } \ + } /* Diagonal line */ -#define DLINE(type, op, draw_end) \ -{ \ - int length; \ - int pitch = (dst->pitch / dst->format->BytesPerPixel); \ - type *pixel; \ - if (y1 <= y2) { \ - pixel = (type *)dst->pixels + y1 * pitch + x1; \ - if (x1 <= x2) { \ - ++pitch; \ - } else { \ - --pitch; \ - } \ - length = (y2-y1); \ - } else { \ - pixel = (type *)dst->pixels + y2 * pitch + x2; \ - if (x2 <= x1) { \ - ++pitch; \ - } else { \ - --pitch; \ - } \ - if (!draw_end) { \ - pixel += pitch; \ - } \ - length = (y1-y2); \ - } \ - if (draw_end) { \ - ++length; \ - } \ - while (length--) { \ - op; \ - pixel += pitch; \ - } \ -} +#define DLINE(type, op, draw_end) \ + { \ + int length; \ + int pitch = (dst->pitch / dst->format->BytesPerPixel); \ + type *pixel; \ + if (y1 <= y2) { \ + pixel = (type *)dst->pixels + y1 * pitch + x1; \ + if (x1 <= x2) { \ + ++pitch; \ + } else { \ + --pitch; \ + } \ + length = (y2 - y1); \ + } else { \ + pixel = (type *)dst->pixels + y2 * pitch + x2; \ + if (x2 <= x1) { \ + ++pitch; \ + } else { \ + --pitch; \ + } \ + if (!draw_end) { \ + pixel += pitch; \ + } \ + length = (y1 - y2); \ + } \ + if (draw_end) { \ + ++length; \ + } \ + while (length--) { \ + op; \ + pixel += pitch; \ + } \ + } /* Bresenham's line algorithm */ #define BLINE(x1, y1, x2, y2, op, draw_end) \ -{ \ - int i, deltax, deltay, numpixels; \ - int d, dinc1, dinc2; \ - int x, xinc1, xinc2; \ - int y, yinc1, yinc2; \ - \ - deltax = ABS(x2 - x1); \ - deltay = ABS(y2 - y1); \ - \ - if (deltax >= deltay) { \ - numpixels = deltax + 1; \ - d = (2 * deltay) - deltax; \ - dinc1 = deltay * 2; \ - dinc2 = (deltay - deltax) * 2; \ - xinc1 = 1; \ - xinc2 = 1; \ - yinc1 = 0; \ - yinc2 = 1; \ - } else { \ - numpixels = deltay + 1; \ - d = (2 * deltax) - deltay; \ - dinc1 = deltax * 2; \ - dinc2 = (deltax - deltay) * 2; \ - xinc1 = 0; \ - xinc2 = 1; \ - yinc1 = 1; \ - yinc2 = 1; \ - } \ - \ - if (x1 > x2) { \ - xinc1 = -xinc1; \ - xinc2 = -xinc2; \ - } \ - if (y1 > y2) { \ - yinc1 = -yinc1; \ - yinc2 = -yinc2; \ - } \ - \ - x = x1; \ - y = y1; \ - \ - if (!draw_end) { \ - --numpixels; \ - } \ - for (i = 0; i < numpixels; ++i) { \ - op(x, y); \ - if (d < 0) { \ - d += dinc1; \ - x += xinc1; \ - y += yinc1; \ - } else { \ - d += dinc2; \ - x += xinc2; \ - y += yinc2; \ - } \ - } \ -} + { \ + int i, deltax, deltay, numpixels; \ + int d, dinc1, dinc2; \ + int x, xinc1, xinc2; \ + int y, yinc1, yinc2; \ + \ + deltax = ABS(x2 - x1); \ + deltay = ABS(y2 - y1); \ + \ + if (deltax >= deltay) { \ + numpixels = deltax + 1; \ + d = (2 * deltay) - deltax; \ + dinc1 = deltay * 2; \ + dinc2 = (deltay - deltax) * 2; \ + xinc1 = 1; \ + xinc2 = 1; \ + yinc1 = 0; \ + yinc2 = 1; \ + } else { \ + numpixels = deltay + 1; \ + d = (2 * deltax) - deltay; \ + dinc1 = deltax * 2; \ + dinc2 = (deltax - deltay) * 2; \ + xinc1 = 0; \ + xinc2 = 1; \ + yinc1 = 1; \ + yinc2 = 1; \ + } \ + \ + if (x1 > x2) { \ + xinc1 = -xinc1; \ + xinc2 = -xinc2; \ + } \ + if (y1 > y2) { \ + yinc1 = -yinc1; \ + yinc2 = -yinc2; \ + } \ + \ + x = x1; \ + y = y1; \ + \ + if (!draw_end) { \ + --numpixels; \ + } \ + for (i = 0; i < numpixels; ++i) { \ + op(x, y); \ + if (d < 0) { \ + d += dinc1; \ + x += xinc1; \ + y += yinc1; \ + } else { \ + d += dinc2; \ + x += xinc2; \ + y += yinc2; \ + } \ + } \ + } /* Xiaolin Wu's line algorithm, based on Michael Abrash's implementation */ -#define WULINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) \ -{ \ - Uint16 ErrorAdj, ErrorAcc; \ - Uint16 ErrorAccTemp, Weighting; \ - int DeltaX, DeltaY, Temp, XDir; \ - unsigned r, g, b, a, inva; \ - \ - /* Draw the initial pixel, which is always exactly intersected by \ - the line and so needs no weighting */ \ - opaque_op(x1, y1); \ - \ - /* Draw the final pixel, which is always exactly intersected by the line \ - and so needs no weighting */ \ - if (draw_end) { \ - opaque_op(x2, y2); \ - } \ - \ - /* Make sure the line runs top to bottom */ \ - if (y1 > y2) { \ - Temp = y1; y1 = y2; y2 = Temp; \ - Temp = x1; x1 = x2; x2 = Temp; \ - } \ - DeltaY = y2 - y1; \ - \ - if ((DeltaX = x2 - x1) >= 0) { \ - XDir = 1; \ - } else { \ - XDir = -1; \ - DeltaX = -DeltaX; /* make DeltaX positive */ \ - } \ - \ - /* line is not horizontal, diagonal, or vertical */ \ - ErrorAcc = 0; /* initialize the line error accumulator to 0 */ \ - \ - /* Is this an X-major or Y-major line? */ \ - if (DeltaY > DeltaX) { \ - /* Y-major line; calculate 16-bit fixed-point fractional part of a \ - pixel that X advances each time Y advances 1 pixel, truncating the \ - result so that we won't overrun the endpoint along the X axis */ \ - ErrorAdj = ((unsigned long) DeltaX << 16) / (unsigned long) DeltaY; \ - /* Draw all pixels other than the first and last */ \ - while (--DeltaY) { \ - ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \ - ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \ - if (ErrorAcc <= ErrorAccTemp) { \ - /* The error accumulator turned over, so advance the X coord */ \ - x1 += XDir; \ - } \ - y1++; /* Y-major, so always advance Y */ \ - /* The IntensityBits most significant bits of ErrorAcc give us the \ - intensity weighting for this pixel, and the complement of the \ - weighting for the paired pixel */ \ - Weighting = ErrorAcc >> 8; \ - { \ - a = DRAW_MUL(_a, (Weighting ^ 255)); \ - r = DRAW_MUL(_r, a); \ - g = DRAW_MUL(_g, a); \ - b = DRAW_MUL(_b, a); \ - inva = (a ^ 0xFF); \ - blend_op(x1, y1); \ - } \ - { \ - a = DRAW_MUL(_a, Weighting); \ - r = DRAW_MUL(_r, a); \ - g = DRAW_MUL(_g, a); \ - b = DRAW_MUL(_b, a); \ - inva = (a ^ 0xFF); \ - blend_op(x1 + XDir, y1); \ - } \ - } \ - } else { \ - /* X-major line; calculate 16-bit fixed-point fractional part of a \ - pixel that Y advances each time X advances 1 pixel, truncating the \ - result to avoid overrunning the endpoint along the X axis */ \ - ErrorAdj = ((unsigned long) DeltaY << 16) / (unsigned long) DeltaX; \ - /* Draw all pixels other than the first and last */ \ - while (--DeltaX) { \ - ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \ - ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \ - if (ErrorAcc <= ErrorAccTemp) { \ - /* The error accumulator turned over, so advance the Y coord */ \ - y1++; \ - } \ - x1 += XDir; /* X-major, so always advance X */ \ - /* The IntensityBits most significant bits of ErrorAcc give us the \ - intensity weighting for this pixel, and the complement of the \ - weighting for the paired pixel */ \ - Weighting = ErrorAcc >> 8; \ - { \ - a = DRAW_MUL(_a, (Weighting ^ 255)); \ - r = DRAW_MUL(_r, a); \ - g = DRAW_MUL(_g, a); \ - b = DRAW_MUL(_b, a); \ - inva = (a ^ 0xFF); \ - blend_op(x1, y1); \ - } \ - { \ - a = DRAW_MUL(_a, Weighting); \ - r = DRAW_MUL(_r, a); \ - g = DRAW_MUL(_g, a); \ - b = DRAW_MUL(_b, a); \ - inva = (a ^ 0xFF); \ - blend_op(x1, y1 + 1); \ - } \ - } \ - } \ -} +#define WULINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) \ + { \ + Uint16 ErrorAdj, ErrorAcc; \ + Uint16 ErrorAccTemp, Weighting; \ + int DeltaX, DeltaY, Temp, XDir; \ + unsigned r, g, b, a, inva; \ + \ + /* Draw the initial pixel, which is always exactly intersected by \ + the line and so needs no weighting */ \ + opaque_op(x1, y1); \ + \ + /* Draw the final pixel, which is always exactly intersected by the line \ + and so needs no weighting */ \ + if (draw_end) { \ + opaque_op(x2, y2); \ + } \ + \ + /* Make sure the line runs top to bottom */ \ + if (y1 > y2) { \ + Temp = y1; \ + y1 = y2; \ + y2 = Temp; \ + Temp = x1; \ + x1 = x2; \ + x2 = Temp; \ + } \ + DeltaY = y2 - y1; \ + \ + if ((DeltaX = x2 - x1) >= 0) { \ + XDir = 1; \ + } else { \ + XDir = -1; \ + DeltaX = -DeltaX; /* make DeltaX positive */ \ + } \ + \ + /* line is not horizontal, diagonal, or vertical */ \ + ErrorAcc = 0; /* initialize the line error accumulator to 0 */ \ + \ + /* Is this an X-major or Y-major line? */ \ + if (DeltaY > DeltaX) { \ + /* Y-major line; calculate 16-bit fixed-point fractional part of a \ + pixel that X advances each time Y advances 1 pixel, truncating the \ + result so that we won't overrun the endpoint along the X axis */ \ + ErrorAdj = ((unsigned long)DeltaX << 16) / (unsigned long)DeltaY; \ + /* Draw all pixels other than the first and last */ \ + while (--DeltaY) { \ + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \ + ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \ + if (ErrorAcc <= ErrorAccTemp) { \ + /* The error accumulator turned over, so advance the X coord */ \ + x1 += XDir; \ + } \ + y1++; /* Y-major, so always advance Y */ \ + /* The IntensityBits most significant bits of ErrorAcc give us the \ + intensity weighting for this pixel, and the complement of the \ + weighting for the paired pixel */ \ + Weighting = ErrorAcc >> 8; \ + { \ + a = DRAW_MUL(_a, (Weighting ^ 255)); \ + r = DRAW_MUL(_r, a); \ + g = DRAW_MUL(_g, a); \ + b = DRAW_MUL(_b, a); \ + inva = (a ^ 0xFF); \ + blend_op(x1, y1); \ + } \ + { \ + a = DRAW_MUL(_a, Weighting); \ + r = DRAW_MUL(_r, a); \ + g = DRAW_MUL(_g, a); \ + b = DRAW_MUL(_b, a); \ + inva = (a ^ 0xFF); \ + blend_op(x1 + XDir, y1); \ + } \ + } \ + } else { \ + /* X-major line; calculate 16-bit fixed-point fractional part of a \ + pixel that Y advances each time X advances 1 pixel, truncating the \ + result to avoid overrunning the endpoint along the X axis */ \ + ErrorAdj = ((unsigned long)DeltaY << 16) / (unsigned long)DeltaX; \ + /* Draw all pixels other than the first and last */ \ + while (--DeltaX) { \ + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \ + ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \ + if (ErrorAcc <= ErrorAccTemp) { \ + /* The error accumulator turned over, so advance the Y coord */ \ + y1++; \ + } \ + x1 += XDir; /* X-major, so always advance X */ \ + /* The IntensityBits most significant bits of ErrorAcc give us the \ + intensity weighting for this pixel, and the complement of the \ + weighting for the paired pixel */ \ + Weighting = ErrorAcc >> 8; \ + { \ + a = DRAW_MUL(_a, (Weighting ^ 255)); \ + r = DRAW_MUL(_r, a); \ + g = DRAW_MUL(_g, a); \ + b = DRAW_MUL(_b, a); \ + inva = (a ^ 0xFF); \ + blend_op(x1, y1); \ + } \ + { \ + a = DRAW_MUL(_a, Weighting); \ + r = DRAW_MUL(_r, a); \ + g = DRAW_MUL(_g, a); \ + b = DRAW_MUL(_b, a); \ + inva = (a ^ 0xFF); \ + blend_op(x1, y1 + 1); \ + } \ + } \ + } \ + } #ifdef AA_LINES #define AALINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) \ - WULINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) + WULINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) #else #define AALINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end) \ - BLINE(x1, y1, x2, y2, opaque_op, draw_end) + BLINE(x1, y1, x2, y2, opaque_op, draw_end) #endif /* * Define fill rect macro */ -#define FILLRECT(type, op) \ -do { \ - int width = rect->w; \ - int height = rect->h; \ - int pitch = (dst->pitch / dst->format->BytesPerPixel); \ - int skip = pitch - width; \ - type *pixel = (type *)dst->pixels + rect->y * pitch + rect->x; \ - while (height--) { \ - { int n = (width+3)/4; \ - switch (width & 3) { \ - case 0: do { op; pixel++; SDL_FALLTHROUGH; \ - case 3: op; pixel++; SDL_FALLTHROUGH; \ - case 2: op; pixel++; SDL_FALLTHROUGH; \ - case 1: op; pixel++; \ - } while ( --n > 0 ); \ - } \ - } \ - pixel += skip; \ - } \ -} while (0) +#define FILLRECT(type, op) \ + do { \ + int width = rect->w; \ + int height = rect->h; \ + int pitch = (dst->pitch / dst->format->BytesPerPixel); \ + int skip = pitch - width; \ + type *pixel = (type *)dst->pixels + rect->y * pitch + rect->x; \ + while (height--) { \ + { \ + int n = (width + 3) / 4; \ + switch (width & 3) { \ + case 0: \ + do { \ + op; \ + pixel++; \ + SDL_FALLTHROUGH; \ + case 3: \ + op; \ + pixel++; \ + SDL_FALLTHROUGH; \ + case 2: \ + op; \ + pixel++; \ + SDL_FALLTHROUGH; \ + case 1: \ + op; \ + pixel++; \ + } while (--n > 0); \ + } \ + } \ + pixel += skip; \ + } \ + } while (0) /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/render/software/SDL_drawline.c b/modules/SDL2/src/render/software/SDL_drawline.c index cc6399a..8acf5ee 100644 --- a/modules/SDL2/src/render/software/SDL_drawline.c +++ b/modules/SDL2/src/render/software/SDL_drawline.c @@ -26,10 +26,8 @@ #include "SDL_drawline.h" #include "SDL_drawpoint.h" - -static void -SDL_DrawLine1(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, - SDL_bool draw_end) +static void SDL_DrawLine1(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color, + SDL_bool draw_end) { if (y1 == y2) { int length; @@ -37,13 +35,13 @@ SDL_DrawLine1(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, Uint8 *pixel; if (x1 <= x2) { pixel = (Uint8 *)dst->pixels + y1 * pitch + x1; - length = draw_end ? (x2-x1+1) : (x2-x1); + length = draw_end ? (x2 - x1 + 1) : (x2 - x1); } else { pixel = (Uint8 *)dst->pixels + y1 * pitch + x2; if (!draw_end) { ++pixel; } - length = draw_end ? (x1-x2+1) : (x1-x2); + length = draw_end ? (x1 - x2 + 1) : (x1 - x2); } SDL_memset(pixel, color, length); } else if (x1 == x2) { @@ -55,9 +53,8 @@ SDL_DrawLine1(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, } } -static void -SDL_DrawLine2(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, - SDL_bool draw_end) +static void SDL_DrawLine2(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color, + SDL_bool draw_end) { if (y1 == y2) { HLINE(Uint16, DRAW_FASTSETPIXEL2, draw_end); @@ -67,7 +64,7 @@ SDL_DrawLine2(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, DLINE(Uint16, DRAW_FASTSETPIXEL2, draw_end); } else { Uint8 _r, _g, _b, _a; - const SDL_PixelFormat * fmt = dst->format; + const SDL_PixelFormat *fmt = dst->format; SDL_GetRGBA(color, fmt, &_r, &_g, &_b, &_a); if (fmt->Rmask == 0x7C00) { AALINE(x1, y1, x2, y2, @@ -85,9 +82,8 @@ SDL_DrawLine2(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, } } -static void -SDL_DrawLine4(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, - SDL_bool draw_end) +static void SDL_DrawLine4(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color, + SDL_bool draw_end) { if (y1 == y2) { HLINE(Uint32, DRAW_FASTSETPIXEL4, draw_end); @@ -97,7 +93,7 @@ SDL_DrawLine4(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, DLINE(Uint32, DRAW_FASTSETPIXEL4, draw_end); } else { Uint8 _r, _g, _b, _a; - const SDL_PixelFormat * fmt = dst->format; + const SDL_PixelFormat *fmt = dst->format; SDL_GetRGBA(color, fmt, &_r, &_g, &_b, &_a); if (fmt->Rmask == 0x00FF0000) { if (!fmt->Amask) { @@ -117,12 +113,11 @@ SDL_DrawLine4(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, } } -typedef void (*DrawLineFunc) (SDL_Surface * dst, - int x1, int y1, int x2, int y2, - Uint32 color, SDL_bool draw_end); +typedef void (*DrawLineFunc)(SDL_Surface *dst, + int x1, int y1, int x2, int y2, + Uint32 color, SDL_bool draw_end); -static DrawLineFunc -SDL_CalculateDrawLineFunc(const SDL_PixelFormat * fmt) +static DrawLineFunc SDL_CalculateDrawLineFunc(const SDL_PixelFormat *fmt) { switch (fmt->BytesPerPixel) { case 1: @@ -138,17 +133,16 @@ SDL_CalculateDrawLineFunc(const SDL_PixelFormat * fmt) return NULL; } -int -SDL_DrawLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color) +int SDL_DrawLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color) { DrawLineFunc func; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_DrawLine(): dst"); } func = SDL_CalculateDrawLineFunc(dst->format); - if (!func) { + if (func == NULL) { return SDL_SetError("SDL_DrawLine(): Unsupported surface format"); } @@ -162,9 +156,8 @@ SDL_DrawLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color) return 0; } -int -SDL_DrawLines(SDL_Surface * dst, const SDL_Point * points, int count, - Uint32 color) +int SDL_DrawLines(SDL_Surface *dst, const SDL_Point *points, int count, + Uint32 color) { int i; int x1, y1; @@ -172,18 +165,18 @@ SDL_DrawLines(SDL_Surface * dst, const SDL_Point * points, int count, SDL_bool draw_end; DrawLineFunc func; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_DrawLines(): dst"); } func = SDL_CalculateDrawLineFunc(dst->format); - if (!func) { + if (func == NULL) { return SDL_SetError("SDL_DrawLines(): Unsupported surface format"); } for (i = 1; i < count; ++i) { - x1 = points[i-1].x; - y1 = points[i-1].y; + x1 = points[i - 1].x; + y1 = points[i - 1].y; x2 = points[i].x; y2 = points[i].y; @@ -198,8 +191,8 @@ SDL_DrawLines(SDL_Surface * dst, const SDL_Point * points, int count, func(dst, x1, y1, x2, y2, color, draw_end); } - if (points[0].x != points[count-1].x || points[0].y != points[count-1].y) { - SDL_DrawPoint(dst, points[count-1].x, points[count-1].y, color); + if (points[0].x != points[count - 1].x || points[0].y != points[count - 1].y) { + SDL_DrawPoint(dst, points[count - 1].x, points[count - 1].y, color); } return 0; } diff --git a/modules/SDL2/src/render/software/SDL_drawline.h b/modules/SDL2/src/render/software/SDL_drawline.h index cdc0800..5ef98ad 100644 --- a/modules/SDL2/src/render/software/SDL_drawline.h +++ b/modules/SDL2/src/render/software/SDL_drawline.h @@ -24,9 +24,8 @@ #include "../../SDL_internal.h" - -extern int SDL_DrawLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color); -extern int SDL_DrawLines(SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color); +extern int SDL_DrawLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color); +extern int SDL_DrawLines(SDL_Surface *dst, const SDL_Point *points, int count, Uint32 color); #endif /* SDL_drawline_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_drawpoint.c b/modules/SDL2/src/render/software/SDL_drawpoint.c index a3dcf60..7740442 100644 --- a/modules/SDL2/src/render/software/SDL_drawpoint.c +++ b/modules/SDL2/src/render/software/SDL_drawpoint.c @@ -25,11 +25,9 @@ #include "SDL_draw.h" #include "SDL_drawpoint.h" - -int -SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color) +int SDL_DrawPoint(SDL_Surface *dst, int x, int y, Uint32 color) { - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_DrawPoint(): dst"); } @@ -61,16 +59,15 @@ SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color) return 0; } -int -SDL_DrawPoints(SDL_Surface * dst, const SDL_Point * points, int count, - Uint32 color) +int SDL_DrawPoints(SDL_Surface *dst, const SDL_Point *points, int count, + Uint32 color) { int minx, miny; int maxx, maxy; int i; int x, y; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_DrawPoints(): dst"); } diff --git a/modules/SDL2/src/render/software/SDL_drawpoint.h b/modules/SDL2/src/render/software/SDL_drawpoint.h index b024237..1a1c8d6 100644 --- a/modules/SDL2/src/render/software/SDL_drawpoint.h +++ b/modules/SDL2/src/render/software/SDL_drawpoint.h @@ -24,9 +24,8 @@ #include "../../SDL_internal.h" - -extern int SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color); -extern int SDL_DrawPoints(SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color); +extern int SDL_DrawPoint(SDL_Surface *dst, int x, int y, Uint32 color); +extern int SDL_DrawPoints(SDL_Surface *dst, const SDL_Point *points, int count, Uint32 color); #endif /* SDL_drawpoint_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_render_sw.c b/modules/SDL2/src/render/software/SDL_render_sw.c index 05b6304..edf4923 100644 --- a/modules/SDL2/src/render/software/SDL_render_sw.c +++ b/modules/SDL2/src/render/software/SDL_render_sw.c @@ -50,11 +50,9 @@ typedef struct SDL_Surface *window; } SW_RenderData; - -static SDL_Surface * -SW_ActivateRenderer(SDL_Renderer * renderer) +static SDL_Surface *SW_ActivateRenderer(SDL_Renderer *renderer) { - SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SW_RenderData *data = (SW_RenderData *)renderer->driverdata; if (!data->surface) { data->surface = data->window; @@ -68,10 +66,9 @@ SW_ActivateRenderer(SDL_Renderer * renderer) return data->surface; } -static void -SW_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void SW_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { - SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SW_RenderData *data = (SW_RenderData *)renderer->driverdata; if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { data->surface = NULL; @@ -79,10 +76,9 @@ SW_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } } -static int -SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) +static int SW_GetOutputSize(SDL_Renderer *renderer, int *w, int *h) { - SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SW_RenderData *data = (SW_RenderData *)renderer->driverdata; if (data->surface) { if (w) { @@ -95,21 +91,19 @@ SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h) } if (renderer->window) { - SDL_GetWindowSize(renderer->window, w, h); + SDL_GetWindowSizeInPixels(renderer->window, w, h); return 0; } return SDL_SetError("Software renderer doesn't have an output surface"); } -static int -SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int SW_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { int bpp; Uint32 Rmask, Gmask, Bmask, Amask; - if (!SDL_PixelFormatEnumToMasks - (texture->format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { + if (!SDL_PixelFormatEnumToMasks(texture->format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { return SDL_SetError("Unknown texture format"); } @@ -133,81 +127,76 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) return 0; } -static int -SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, const void *pixels, int pitch) +static int SW_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { - SDL_Surface *surface = (SDL_Surface *) texture->driverdata; + SDL_Surface *surface = (SDL_Surface *)texture->driverdata; Uint8 *src, *dst; int row; size_t length; - if(SDL_MUSTLOCK(surface)) + if (SDL_MUSTLOCK(surface)) { SDL_LockSurface(surface); - src = (Uint8 *) pixels; - dst = (Uint8 *) surface->pixels + - rect->y * surface->pitch + - rect->x * surface->format->BytesPerPixel; - length = rect->w * surface->format->BytesPerPixel; + } + src = (Uint8 *)pixels; + dst = (Uint8 *)surface->pixels + + rect->y * surface->pitch + + rect->x * surface->format->BytesPerPixel; + length = (size_t)rect->w * surface->format->BytesPerPixel; for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, src, length); src += pitch; dst += surface->pitch; } - if(SDL_MUSTLOCK(surface)) + if (SDL_MUSTLOCK(surface)) { SDL_UnlockSurface(surface); + } return 0; } -static int -SW_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, void **pixels, int *pitch) +static int SW_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - SDL_Surface *surface = (SDL_Surface *) texture->driverdata; + SDL_Surface *surface = (SDL_Surface *)texture->driverdata; *pixels = - (void *) ((Uint8 *) surface->pixels + rect->y * surface->pitch + - rect->x * surface->format->BytesPerPixel); + (void *)((Uint8 *)surface->pixels + rect->y * surface->pitch + + rect->x * surface->format->BytesPerPixel); *pitch = surface->pitch; return 0; } -static void -SW_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void SW_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { } -static void -SW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void SW_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { } -static int -SW_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +static int SW_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { - SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SW_RenderData *data = (SW_RenderData *)renderer->driverdata; if (texture) { - data->surface = (SDL_Surface *) texture->driverdata; + data->surface = (SDL_Surface *)texture->driverdata; } else { data->surface = data->window; } return 0; } -static int -SW_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int SW_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - return 0; /* nothing to do in this backend. */ + return 0; /* nothing to do in this backend. */ } -static int -SW_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int SW_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - SDL_Point *verts = (SDL_Point *) SDL_AllocateRenderVertices(renderer, count * sizeof (SDL_Point), 0, &cmd->data.draw.first); + SDL_Point *verts = (SDL_Point *)SDL_AllocateRenderVertices(renderer, count * sizeof(SDL_Point), 0, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -221,13 +210,12 @@ SW_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FP return 0; } -static int -SW_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count) +static int SW_QueueFillRects(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FRect *rects, int count) { - SDL_Rect *verts = (SDL_Rect *) SDL_AllocateRenderVertices(renderer, count * sizeof (SDL_Rect), 0, &cmd->data.draw.first); + SDL_Rect *verts = (SDL_Rect *)SDL_AllocateRenderVertices(renderer, count * sizeof(SDL_Rect), 0, &cmd->data.draw.first); int i; - if (!verts) { + if (verts == NULL) { return -1; } @@ -243,13 +231,12 @@ SW_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRe return 0; } -static int -SW_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect) +static int SW_QueueCopy(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect) { - SDL_Rect *verts = (SDL_Rect *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (SDL_Rect), 0, &cmd->data.draw.first); + SDL_Rect *verts = (SDL_Rect *)SDL_AllocateRenderVertices(renderer, 2 * sizeof(SDL_Rect), 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } @@ -277,14 +264,13 @@ typedef struct CopyExData float scale_y; } CopyExData; -static int -SW_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_FRect * dstrect, - const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) +static int SW_QueueCopyEx(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_FRect *dstrect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) { - CopyExData *verts = (CopyExData *) SDL_AllocateRenderVertices(renderer, sizeof (CopyExData), 0, &cmd->data.draw.first); + CopyExData *verts = (CopyExData *)SDL_AllocateRenderVertices(renderer, sizeof(CopyExData), 0, &cmd->data.draw.first); - if (!verts) { + if (verts == NULL) { return -1; } @@ -305,18 +291,17 @@ SW_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * te return 0; } -static int -Blit_to_Screen(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *surface, SDL_Rect *dstrect, - float scale_x, float scale_y, SDL_ScaleMode scaleMode) +static int Blit_to_Screen(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *surface, SDL_Rect *dstrect, + float scale_x, float scale_y, SDL_ScaleMode scaleMode) { int retval; /* Renderer scaling, if needed */ if (scale_x != 1.0f || scale_y != 1.0f) { SDL_Rect r; - r.x = (int)((float) dstrect->x * scale_x); - r.y = (int)((float) dstrect->y * scale_y); - r.w = (int)((float) dstrect->w * scale_x); - r.h = (int)((float) dstrect->h * scale_y); + r.x = (int)((float)dstrect->x * scale_x); + r.y = (int)((float)dstrect->y * scale_y); + r.w = (int)((float)dstrect->w * scale_x); + r.h = (int)((float)dstrect->h * scale_y); retval = SDL_PrivateUpperBlitScaled(src, srcrect, surface, &r, scaleMode); } else { retval = SDL_BlitSurface(src, srcrect, surface, dstrect); @@ -324,12 +309,11 @@ Blit_to_Screen(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *surface, SDL_Re return retval; } -static int -SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Surface *surface, SDL_Texture * texture, - const SDL_Rect * srcrect, const SDL_Rect * final_rect, - const double angle, const SDL_FPoint * center, const SDL_RendererFlip flip, float scale_x, float scale_y) +static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Texture *texture, + const SDL_Rect *srcrect, const SDL_Rect *final_rect, + const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip, float scale_x, float scale_y) { - SDL_Surface *src = (SDL_Surface *) texture->driverdata; + SDL_Surface *src = (SDL_Surface *)texture->driverdata; SDL_Rect tmp_rect; SDL_Surface *src_clone, *src_rotated, *src_scaled; SDL_Surface *mask = NULL, *mask_rotated = NULL; @@ -340,7 +324,7 @@ SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Surface *surface, SDL_Texture * tex int blitRequired = SDL_FALSE; int isOpaque = SDL_FALSE; - if (!surface) { + if (surface == NULL) { return -1; } @@ -439,18 +423,18 @@ SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Surface *surface, SDL_Texture * tex double cangle, sangle; SDLgfx_rotozoomSurfaceSizeTrig(tmp_rect.w, tmp_rect.h, angle, center, - &rect_dest, &cangle, &sangle); + &rect_dest, &cangle, &sangle); src_rotated = SDLgfx_rotateSurface(src_clone, angle, - (texture->scaleMode == SDL_ScaleModeNearest) ? 0 : 1, flip & SDL_FLIP_HORIZONTAL, flip & SDL_FLIP_VERTICAL, - &rect_dest, cangle, sangle, center); + (texture->scaleMode == SDL_ScaleModeNearest) ? 0 : 1, flip & SDL_FLIP_HORIZONTAL, flip & SDL_FLIP_VERTICAL, + &rect_dest, cangle, sangle, center); if (src_rotated == NULL) { retval = -1; } if (!retval && mask != NULL) { /* The mask needed for the NONE blend mode gets rotated with the same parameters. */ mask_rotated = SDLgfx_rotateSurface(mask, angle, - SDL_FALSE, 0, 0, - &rect_dest, cangle, sangle, center); + SDL_FALSE, 0, 0, + &rect_dest, cangle, sangle, center); if (mask_rotated == NULL) { retval = -1; } @@ -533,7 +517,6 @@ SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Surface *surface, SDL_Texture * tex return retval; } - typedef struct GeometryFillData { SDL_Point dst; @@ -547,19 +530,18 @@ typedef struct GeometryCopyData SDL_Color color; } GeometryCopyData; -static int -SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { int i; int count = indices ? num_indices : num_vertices; void *verts; - int sz = texture ? sizeof (GeometryCopyData) : sizeof (GeometryFillData); + size_t sz = texture != NULL ? sizeof(GeometryCopyData) : sizeof(GeometryFillData); - verts = (void *) SDL_AllocateRenderVertices(renderer, count * sz, 0, &cmd->data.draw.first); - if (!verts) { + verts = SDL_AllocateRenderVertices(renderer, count * sz, 0, &cmd->data.draw.first); + if (verts == NULL) { return -1; } @@ -567,7 +549,7 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te size_indices = indices ? size_indices : 0; if (texture) { - GeometryCopyData *ptr = (GeometryCopyData *) verts; + GeometryCopyData *ptr = (GeometryCopyData *)verts; for (i = 0; i < count; i++) { int j; float *xy_; @@ -583,10 +565,10 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); - uv_ = (float *)((char*)uv + j * uv_stride); + uv_ = (float *)((char *)uv + j * uv_stride); ptr->src.x = (int)(uv_[0] * texture->w); ptr->src.y = (int)(uv_[1] * texture->h); @@ -598,9 +580,9 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te ptr->color = col_; ptr++; - } + } } else { - GeometryFillData *ptr = (GeometryFillData *) verts; + GeometryFillData *ptr = (GeometryFillData *)verts; for (i = 0; i < count; i++) { int j; @@ -616,8 +598,8 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); ptr->dst.x = (int)(xy_[0] * scale_x); ptr->dst.y = (int)(xy_[1] * scale_y); @@ -626,13 +608,12 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te ptr->color = col_; ptr++; - } + } } return 0; } -static void -PrepTextureForCopy(const SDL_RenderCommand *cmd) +static void PrepTextureForCopy(const SDL_RenderCommand *cmd) { const Uint8 r = cmd->data.draw.r; const Uint8 g = cmd->data.draw.g; @@ -640,7 +621,7 @@ PrepTextureForCopy(const SDL_RenderCommand *cmd) const Uint8 a = cmd->data.draw.a; const SDL_BlendMode blend = cmd->data.draw.blend; SDL_Texture *texture = cmd->data.draw.texture; - SDL_Surface *surface = (SDL_Surface *) texture->driverdata; + SDL_Surface *surface = (SDL_Surface *)texture->driverdata; const SDL_bool colormod = ((r & g & b) != 0xFF); const SDL_bool alphamod = (a != 0xFF); const SDL_bool blending = ((blend == SDL_BLENDMODE_ADD) || (blend == SDL_BLENDMODE_MOD) || (blend == SDL_BLENDMODE_MUL)); @@ -655,13 +636,12 @@ PrepTextureForCopy(const SDL_RenderCommand *cmd) SDL_SetSurfaceBlendMode(surface, blend); } -static void -SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate) +static void SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate) { if (drawstate->surface_cliprect_dirty) { const SDL_Rect *viewport = drawstate->viewport; const SDL_Rect *cliprect = drawstate->cliprect; - SDL_assert(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */ + SDL_assert_release(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */ if (cliprect != NULL) { SDL_Rect clip_rect; @@ -678,13 +658,12 @@ SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate) } } -static int -SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { SDL_Surface *surface = SW_ActivateRenderer(renderer); SW_DrawStateCache drawstate; - if (!surface) { + if (surface == NULL) { return -1; } @@ -952,15 +931,14 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic return 0; } -static int -SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 format, void * pixels, int pitch) +static int SW_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 format, void *pixels, int pitch) { SDL_Surface *surface = SW_ActivateRenderer(renderer); Uint32 src_format; void *src_pixels; - if (!surface) { + if (surface == NULL) { return -1; } @@ -968,68 +946,64 @@ SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, * SDL_RenderReadPixels. */ - if (rect->x < 0 || rect->x+rect->w > surface->w || - rect->y < 0 || rect->y+rect->h > surface->h) { + if (rect->x < 0 || rect->x + rect->w > surface->w || + rect->y < 0 || rect->y + rect->h > surface->h) { return SDL_SetError("Tried to read outside of surface bounds"); } src_format = surface->format->format; - src_pixels = (void*)((Uint8 *) surface->pixels + - rect->y * surface->pitch + - rect->x * surface->format->BytesPerPixel); + src_pixels = (void *)((Uint8 *)surface->pixels + + rect->y * surface->pitch + + rect->x * surface->format->BytesPerPixel); return SDL_ConvertPixels(rect->w, rect->h, src_format, src_pixels, surface->pitch, format, pixels, pitch); } -static int -SW_RenderPresent(SDL_Renderer * renderer) +static int SW_RenderPresent(SDL_Renderer *renderer) { SDL_Window *window = renderer->window; - if (!window) { + if (window == NULL) { return -1; } return SDL_UpdateWindowSurface(window); } -static void -SW_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void SW_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - SDL_Surface *surface = (SDL_Surface *) texture->driverdata; + SDL_Surface *surface = (SDL_Surface *)texture->driverdata; SDL_FreeSurface(surface); } -static void -SW_DestroyRenderer(SDL_Renderer * renderer) +static void SW_DestroyRenderer(SDL_Renderer *renderer) { - SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SW_RenderData *data = (SW_RenderData *)renderer->driverdata; SDL_free(data); SDL_free(renderer); } -SDL_Renderer * -SW_CreateRendererForSurface(SDL_Surface * surface) +SDL_Renderer *SW_CreateRendererForSurface(SDL_Surface *surface) { SDL_Renderer *renderer; SW_RenderData *data; - if (!surface) { + if (surface == NULL) { SDL_InvalidParamError("surface"); return NULL; } - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (SW_RenderData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (SW_RenderData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { SW_DestroyRenderer(renderer); SDL_OutOfMemory(); return NULL; @@ -1046,9 +1020,9 @@ SW_CreateRendererForSurface(SDL_Surface * surface) renderer->SetTextureScaleMode = SW_SetTextureScaleMode; renderer->SetRenderTarget = SW_SetRenderTarget; renderer->QueueSetViewport = SW_QueueSetViewport; - renderer->QueueSetDrawColor = SW_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ + renderer->QueueSetDrawColor = SW_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */ renderer->QueueDrawPoints = SW_QueueDrawPoints; - renderer->QueueDrawLines = SW_QueueDrawPoints; /* lines and points queue vertices the same way. */ + renderer->QueueDrawLines = SW_QueueDrawPoints; /* lines and points queue vertices the same way. */ renderer->QueueFillRects = SW_QueueFillRects; renderer->QueueCopy = SW_QueueCopy; renderer->QueueCopyEx = SW_QueueCopyEx; @@ -1066,8 +1040,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface) return renderer; } -static SDL_Renderer * -SW_CreateRenderer(SDL_Window * window, Uint32 flags) +static SDL_Renderer *SW_CreateRenderer(SDL_Window *window, Uint32 flags) { const char *hint; SDL_Surface *surface; @@ -1075,7 +1048,7 @@ SW_CreateRenderer(SDL_Window * window, Uint32 flags) /* Set the vsync hint based on our flags, if it's not already set */ hint = SDL_GetHint(SDL_HINT_RENDER_VSYNC); - if (!hint || !*hint) { + if (hint == NULL || !*hint) { no_hint_set = SDL_TRUE; } else { no_hint_set = SDL_FALSE; @@ -1092,7 +1065,7 @@ SW_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_SetHint(SDL_HINT_RENDER_VSYNC, ""); } - if (!surface) { + if (surface == NULL) { return NULL; } return SW_CreateRendererForSurface(surface); diff --git a/modules/SDL2/src/render/software/SDL_render_sw_c.h b/modules/SDL2/src/render/software/SDL_render_sw_c.h index 8b1365d..f6c54c0 100644 --- a/modules/SDL2/src/render/software/SDL_render_sw_c.h +++ b/modules/SDL2/src/render/software/SDL_render_sw_c.h @@ -22,7 +22,7 @@ #ifndef SDL_render_sw_c_h_ #define SDL_render_sw_c_h_ -extern SDL_Renderer * SW_CreateRendererForSurface(SDL_Surface * surface); +extern SDL_Renderer *SW_CreateRendererForSurface(SDL_Surface *surface); #endif /* SDL_render_sw_c_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_rotate.c b/modules/SDL2/src/render/software/SDL_rotate.c index ade0872..d51df2f 100644 --- a/modules/SDL2/src/render/software/SDL_rotate.c +++ b/modules/SDL2/src/render/software/SDL_rotate.c @@ -47,7 +47,8 @@ Andreas Schiffler -- aschiffler at ferzkopp dot net /* ! \brief A 32 bit RGBA pixel. */ -typedef struct tColorRGBA { +typedef struct tColorRGBA +{ Uint8 r; Uint8 g; Uint8 b; @@ -57,7 +58,8 @@ typedef struct tColorRGBA { /* ! \brief A 8bit Y/palette pixel. */ -typedef struct tColorY { +typedef struct tColorY +{ Uint8 y; } tColorY; @@ -76,8 +78,7 @@ to a situation where the program can segfault. /* ! \brief Returns colorkey info for a surface */ -static Uint32 -get_colorkey(SDL_Surface *src) +static Uint32 get_colorkey(SDL_Surface *src) { Uint32 key = 0; if (SDL_HasColorKey(src)) { @@ -87,8 +88,8 @@ get_colorkey(SDL_Surface *src) } /* rotate (sx, sy) by (angle, center) into (dx, dy) */ -static void -rotate(double sx, double sy, double sinangle, double cosangle, const SDL_FPoint *center, double *dx, double *dy) { +static void rotate(double sx, double sy, double sinangle, double cosangle, const SDL_FPoint *center, double *dx, double *dy) +{ sx -= center->x; sy -= center->y; @@ -111,9 +112,8 @@ rotate(double sx, double sy, double sinangle, double cosangle, const SDL_FPoint \param sangle The cosine of the angle */ -void -SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FPoint *center, - SDL_Rect *rect_dest, double *cangle, double *sangle) +void SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FPoint *center, + SDL_Rect *rect_dest, double *cangle, double *sangle) { int minx, maxx, miny, maxy; double radangle; @@ -129,16 +129,16 @@ SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FP /* * Determine destination width and height by rotating a source box, at pixel center */ - rotate(0.5, 0.5, sinangle, cosangle, center, &x0, &y0); - rotate(width - 0.5, 0.5, sinangle, cosangle, center, &x1, &y1); - rotate(0.5, height - 0.5, sinangle, cosangle, center, &x2, &y2); + rotate(0.5, 0.5, sinangle, cosangle, center, &x0, &y0); + rotate(width - 0.5, 0.5, sinangle, cosangle, center, &x1, &y1); + rotate(0.5, height - 0.5, sinangle, cosangle, center, &x2, &y2); rotate(width - 0.5, height - 0.5, sinangle, cosangle, center, &x3, &y3); - minx = (int)SDL_floor( SDL_min( SDL_min(x0, x1), SDL_min(x2, x3) ) ); - maxx = (int)SDL_ceil( SDL_max( SDL_max(x0, x1), SDL_max(x2, x3) ) ); + minx = (int)SDL_floor(SDL_min(SDL_min(x0, x1), SDL_min(x2, x3))); + maxx = (int)SDL_ceil(SDL_max(SDL_max(x0, x1), SDL_max(x2, x3))); - miny = (int)SDL_floor( SDL_min( SDL_min(y0, y1), SDL_min(y2, y3) ) ); - maxy = (int)SDL_ceil( SDL_max( SDL_max(y0, y1), SDL_max(y2, y3) ) ); + miny = (int)SDL_floor(SDL_min(SDL_min(y0, y1), SDL_min(y2, y3))); + maxy = (int)SDL_ceil(SDL_max(SDL_max(y0, y1), SDL_max(y2, y3))); rect_dest->w = maxx - minx; rect_dest->h = maxy - miny; @@ -151,17 +151,20 @@ SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FP { /* The trig code below gets the wrong size (due to FP inaccuracy?) when angle is a multiple of 90 degrees */ - int angle90 = (int)(angle/90); - if(angle90 == angle/90) { /* if the angle is a multiple of 90 degrees */ + int angle90 = (int)(angle / 90); + if (angle90 == angle / 90) { /* if the angle is a multiple of 90 degrees */ angle90 %= 4; - if(angle90 < 0) angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */ - if(angle90 & 1) { - rect_dest->w = height; + if (angle90 < 0) { + angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */ + } + + if (angle90 & 1) { + rect_dest->w = height; rect_dest->h = width; *cangle = 0; *sangle = angle90 == 1 ? -1 : 1; /* reversed because our rotations are clockwise */ } else { - rect_dest->w = width; + rect_dest->w = width; rect_dest->h = height; *cangle = angle90 == 0 ? 1 : -1; *sangle = 0; @@ -171,19 +174,37 @@ SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FP } /* Computes source pointer X/Y increments for a rotation that's a multiple of 90 degrees. */ -static void -computeSourceIncrements90(SDL_Surface * src, int bpp, int angle, int flipx, int flipy, - int *sincx, int *sincy, int *signx, int *signy) +static void computeSourceIncrements90(SDL_Surface *src, int bpp, int angle, int flipx, int flipy, + int *sincx, int *sincy, int *signx, int *signy) { int pitch = flipy ? -src->pitch : src->pitch; if (flipx) { bpp = -bpp; } switch (angle) { /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */ - case 0: *sincx = bpp; *sincy = pitch - src->w * *sincx; *signx = *signy = 1; break; - case 1: *sincx = -pitch; *sincy = bpp - *sincx * src->h; *signx = 1; *signy = -1; break; - case 2: *sincx = -bpp; *sincy = -src->w * *sincx - pitch; *signx = *signy = -1; break; - case 3: default: *sincx = pitch; *sincy = -*sincx * src->h - bpp; *signx = -1; *signy = 1; break; + case 0: + *sincx = bpp; + *sincy = pitch - src->w * *sincx; + *signx = *signy = 1; + break; + case 1: + *sincx = -pitch; + *sincy = bpp - *sincx * src->h; + *signx = 1; + *signy = -1; + break; + case 2: + *sincx = -bpp; + *sincy = -src->w * *sincx - pitch; + *signx = *signy = -1; + break; + case 3: + default: + *sincx = pitch; + *sincy = -*sincx * src->h - bpp; + *signx = -1; + *signy = 1; + break; } if (flipx) { *signx = -*signx; @@ -194,34 +215,34 @@ computeSourceIncrements90(SDL_Surface * src, int bpp, int angle, int flipx, int } /* Performs a relatively fast rotation/flip when the angle is a multiple of 90 degrees. */ -#define TRANSFORM_SURFACE_90(pixelType) \ - int dy, dincy = dst->pitch - dst->w*sizeof(pixelType), sincx, sincy, signx, signy; \ - Uint8 *sp = (Uint8*)src->pixels, *dp = (Uint8*)dst->pixels, *de; \ +#define TRANSFORM_SURFACE_90(pixelType) \ + int dy, dincy = dst->pitch - dst->w * sizeof(pixelType), sincx, sincy, signx, signy; \ + Uint8 *sp = (Uint8 *)src->pixels, *dp = (Uint8 *)dst->pixels, *de; \ \ computeSourceIncrements90(src, sizeof(pixelType), angle, flipx, flipy, &sincx, &sincy, &signx, &signy); \ - if (signx < 0) sp += (src->w-1)*sizeof(pixelType); \ - if (signy < 0) sp += (src->h-1)*src->pitch; \ + if (signx < 0) \ + sp += (src->w - 1) * sizeof(pixelType); \ + if (signy < 0) \ + sp += (src->h - 1) * src->pitch; \ \ for (dy = 0; dy < dst->h; sp += sincy, dp += dincy, dy++) { \ if (sincx == sizeof(pixelType)) { /* if advancing src and dest equally, use SDL_memcpy */ \ - SDL_memcpy(dp, sp, dst->w*sizeof(pixelType)); \ - sp += dst->w*sizeof(pixelType); \ - dp += dst->w*sizeof(pixelType); \ + SDL_memcpy(dp, sp, dst->w * sizeof(pixelType)); \ + sp += dst->w * sizeof(pixelType); \ + dp += dst->w * sizeof(pixelType); \ } else { \ - for (de = dp + dst->w*sizeof(pixelType); dp != de; sp += sincx, dp += sizeof(pixelType)) { \ - *(pixelType*)dp = *(pixelType*)sp; \ + for (de = dp + dst->w * sizeof(pixelType); dp != de; sp += sincx, dp += sizeof(pixelType)) { \ + *(pixelType *)dp = *(pixelType *)sp; \ } \ } \ } -static void -transformSurfaceRGBA90(SDL_Surface * src, SDL_Surface * dst, int angle, int flipx, int flipy) +static void transformSurfaceRGBA90(SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy) { TRANSFORM_SURFACE_90(tColorRGBA); } -static void -transformSurfaceY90(SDL_Surface * src, SDL_Surface * dst, int angle, int flipx, int flipy) +static void transformSurfaceY90(SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy) { TRANSFORM_SURFACE_90(tColorY); } @@ -247,32 +268,31 @@ Assumes dst surface was allocated with the correct dimensions. \param dst_rect destination coordinates \param center true center. */ -static void -transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, - int flipx, int flipy, int smooth, - const SDL_Rect *rect_dest, - const SDL_FPoint *center) +static void transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int isin, int icos, + int flipx, int flipy, int smooth, + const SDL_Rect *rect_dest, + const SDL_FPoint *center) { int sw, sh; int cx, cy; tColorRGBA c00, c01, c10, c11, cswap; tColorRGBA *pc, *sp; int gap; - const int fp_half = (1<<15); + const int fp_half = (1 << 15); /* - * Variable setup - */ + * Variable setup + */ sw = src->w - 1; sh = src->h - 1; - pc = (tColorRGBA*) dst->pixels; + pc = (tColorRGBA *)dst->pixels; gap = dst->pitch - dst->w * 4; cx = (int)(center->x * 65536.0); cy = (int)(center->y * 65536.0); /* - * Switch between interpolating and non-interpolating code - */ + * Switch between interpolating and non-interpolating code + */ if (smooth) { int y; for (y = 0; y < dst->h; y++) { @@ -284,30 +304,42 @@ transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, for (x = 0; x < dst->w; x++) { int dx = (sdx >> 16); int dy = (sdy >> 16); - if (flipx) dx = sw - dx; - if (flipy) dy = sh - dy; - if ((dx > -1) && (dy > -1) && (dx < (src->w-1)) && (dy < (src->h-1))) { + if (flipx) { + dx = sw - dx; + } + if (flipy) { + dy = sh - dy; + } + if ((dx > -1) && (dy > -1) && (dx < (src->w - 1)) && (dy < (src->h - 1))) { int ex, ey; int t1, t2; - sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy) + dx; + sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy) + dx; c00 = *sp; sp += 1; c01 = *sp; - sp += (src->pitch/4); + sp += (src->pitch / 4); c11 = *sp; sp -= 1; c10 = *sp; if (flipx) { - cswap = c00; c00=c01; c01=cswap; - cswap = c10; c10=c11; c11=cswap; + cswap = c00; + c00 = c01; + c01 = cswap; + cswap = c10; + c10 = c11; + c11 = cswap; } if (flipy) { - cswap = c00; c00=c10; c10=cswap; - cswap = c01; c01=c11; c11=cswap; + cswap = c00; + c00 = c10; + c10 = cswap; + cswap = c01; + c01 = c11; + c11 = cswap; } /* - * Interpolate colors - */ + * Interpolate colors + */ ex = (sdx & 0xffff); ey = (sdy & 0xffff); t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff; @@ -327,7 +359,7 @@ transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, sdy += isin; pc++; } - pc = (tColorRGBA *) ((Uint8 *) pc + gap); + pc = (tColorRGBA *)((Uint8 *)pc + gap); } } else { int y; @@ -341,15 +373,19 @@ transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, int dx = (sdx >> 16); int dy = (sdy >> 16); if ((unsigned)dx < (unsigned)src->w && (unsigned)dy < (unsigned)src->h) { - if(flipx) dx = sw - dx; - if(flipy) dy = sh - dy; + if (flipx) { + dx = sw - dx; + } + if (flipy) { + dy = sh - dy; + } *pc = *((tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy) + dx); } sdx += icos; sdy += isin; pc++; } - pc = (tColorRGBA *) ((Uint8 *) pc + gap); + pc = (tColorRGBA *)((Uint8 *)pc + gap); } } } @@ -372,35 +408,34 @@ Assumes dst surface was allocated with the correct dimensions. \param dst_rect destination coordinates \param center true center. */ -static void -transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, int flipx, int flipy, - const SDL_Rect *rect_dest, - const SDL_FPoint *center) +static void transformSurfaceY(SDL_Surface *src, SDL_Surface *dst, int isin, int icos, int flipx, int flipy, + const SDL_Rect *rect_dest, + const SDL_FPoint *center) { int sw, sh; int cx, cy; tColorY *pc; int gap; - const int fp_half = (1<<15); + const int fp_half = (1 << 15); int y; /* - * Variable setup - */ + * Variable setup + */ sw = src->w - 1; sh = src->h - 1; - pc = (tColorY*) dst->pixels; + pc = (tColorY *)dst->pixels; gap = dst->pitch - dst->w; cx = (int)(center->x * 65536.0); cy = (int)(center->y * 65536.0); /* - * Clear surface to colorkey - */ - SDL_memset(pc, (int)(get_colorkey(src) & 0xff), dst->pitch * dst->h); + * Clear surface to colorkey + */ + SDL_memset(pc, (int)(get_colorkey(src) & 0xff), (size_t)dst->pitch * dst->h); /* - * Iterate through destination surface - */ + * Iterate through destination surface + */ for (y = 0; y < dst->h; y++) { int x; double src_x = (rect_dest->x + 0 + 0.5 - center->x); @@ -411,8 +446,12 @@ transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, int int dx = (sdx >> 16); int dy = (sdy >> 16); if ((unsigned)dx < (unsigned)src->w && (unsigned)dy < (unsigned)src->h) { - if (flipx) dx = sw - dx; - if (flipy) dy = sh- dy; + if (flipx) { + dx = sw - dx; + } + if (flipy) { + dy = sh - dy; + } *pc = *((tColorY *)src->pixels + src->pitch * dy + dx); } sdx += icos; @@ -423,7 +462,6 @@ transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int isin, int icos, int } } - /* ! \brief Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. @@ -450,9 +488,8 @@ When using the NONE and MOD modes, color and alpha modulation must be applied be */ -SDL_Surface * -SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int flipy, - const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center) +SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, int flipx, int flipy, + const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center) { SDL_Surface *rz_dst; int is8bit, angle90; @@ -463,8 +500,9 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int double sangleinv, cangleinv; /* Sanity check */ - if (src == NULL) + if (src == NULL) { return NULL; + } if (SDL_HasColorKey(src)) { if (SDL_GetColorKey(src, &colorkey) == 0) { @@ -473,12 +511,13 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int } /* This function requires a 32-bit surface or 8-bit surface with a colorkey */ is8bit = src->format->BitsPerPixel == 8 && colorKeyAvailable; - if (!(is8bit || (src->format->BitsPerPixel == 32 && src->format->Amask))) + if (!(is8bit || (src->format->BitsPerPixel == 32 && src->format->Amask))) { return NULL; + } /* Calculate target factors from sine/cosine and zoom */ - sangleinv = sangle*65536.0; - cangleinv = cangle*65536.0; + sangleinv = sangle * 65536.0; + cangleinv = cangle * 65536.0; /* Alloc space to completely contain the rotated surface */ rz_dst = NULL; @@ -501,8 +540,9 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int } /* Check target */ - if (rz_dst == NULL) + if (rz_dst == NULL) { return NULL; + } /* Adjust for guard rows */ rz_dst->h = rect_dest->h; @@ -539,17 +579,20 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int * the off-by-one problem in transformSurfaceRGBA that expresses itself when the rotation is near * multiples of 90 degrees. */ - angle90 = (int)(angle/90); - if (angle90 == angle/90) { + angle90 = (int)(angle / 90); + if (angle90 == angle / 90) { angle90 %= 4; - if (angle90 < 0) angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */ + if (angle90 < 0) { + angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */ + } + } else { angle90 = -1; } if (is8bit) { /* Call the 8-bit transformation routine to do the rotation */ - if(angle90 >= 0) { + if (angle90 >= 0) { transformSurfaceY90(src, rz_dst, angle90, flipx, flipy); } else { transformSurfaceY(src, rz_dst, (int)sangleinv, (int)cangleinv, @@ -561,7 +604,7 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int transformSurfaceRGBA90(src, rz_dst, angle90, flipx, flipy); } else { transformSurfaceRGBA(src, rz_dst, (int)sangleinv, (int)cangleinv, - flipx, flipy, smooth, rect_dest, center); + flipx, flipy, smooth, rect_dest, center); } } diff --git a/modules/SDL2/src/render/software/SDL_rotate.h b/modules/SDL2/src/render/software/SDL_rotate.h index bf0d47a..43e90e8 100644 --- a/modules/SDL2/src/render/software/SDL_rotate.h +++ b/modules/SDL2/src/render/software/SDL_rotate.h @@ -22,9 +22,9 @@ #ifndef SDL_rotate_h_ #define SDL_rotate_h_ -extern SDL_Surface *SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int flipy, - const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center); +extern SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, int flipx, int flipy, + const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center); extern void SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FPoint *center, - SDL_Rect *rect_dest, double *cangle, double *sangle); + SDL_Rect *rect_dest, double *cangle, double *sangle); #endif /* SDL_rotate_h_ */ diff --git a/modules/SDL2/src/render/software/SDL_triangle.c b/modules/SDL2/src/render/software/SDL_triangle.c index 1c99317..fc429db 100644 --- a/modules/SDL2/src/render/software/SDL_triangle.c +++ b/modules/SDL2/src/render/software/SDL_triangle.c @@ -33,16 +33,15 @@ * But, if increased too much, it overflows (srcx, srcy) coordinates used for filling with texture. * (which could be turned to int64). */ -#define FP_BITS 1 +#define FP_BITS 1 +#define COLOR_EQ(c1, c2) ((c1).r == (c2).r && (c1).g == (c2).g && (c1).b == (c2).b && (c1).a == (c2).a) -#define COLOR_EQ(c1, c2) ((c1).r == (c2).r && (c1).g == (c2).g && (c1).b == (c2).b && (c1).a == (c2).a) - -static void SDL_BlitTriangle_Slow(SDL_BlitInfo * info, - SDL_Point s2_x_area, SDL_Rect dstrect, int area, int bias_w0, int bias_w1, int bias_w2, - int d2d1_y, int d1d2_x, int d0d2_y, int d2d0_x, int d1d0_y, int d0d1_x, - int s2s0_x, int s2s1_x, int s2s0_y, int s2s1_y, int w0_row, int w1_row, int w2_row, - SDL_Color c0, SDL_Color c1, SDL_Color c2, int is_uniform); +static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info, + SDL_Point s2_x_area, SDL_Rect dstrect, int area, int bias_w0, int bias_w1, int bias_w2, + int d2d1_y, int d1d2_x, int d0d2_y, int d2d0_x, int d1d0_y, int d0d1_x, + int s2s0_x, int s2s1_x, int s2s0_y, int s2s1_y, int w0_row, int w1_row, int w2_row, + SDL_Color c0, SDL_Color c1, SDL_Color c2, int is_uniform); #if 0 int SDL_BlitTriangle(SDL_Surface *src, const SDL_Point srcpoints[3], SDL_Surface *dst, const SDL_Point dstpoints[3]) @@ -114,7 +113,8 @@ static int is_top_left(const SDL_Point *a, const SDL_Point *b, int is_clockwise) return 0; } -void trianglepoint_2_fixedpoint(SDL_Point *a) { +void trianglepoint_2_fixedpoint(SDL_Point *a) +{ a->x <<= FP_BITS; a->y <<= FP_BITS; } @@ -146,7 +146,6 @@ static void bounding_rect(const SDL_Point *a, const SDL_Point *b, const SDL_Poin r->h = (max_y - min_y); } - /* Triangle rendering, using Barycentric coordinates (w0, w1, w2) * * The cross product isn't computed from scratch at each iteration, @@ -154,53 +153,51 @@ static void bounding_rect(const SDL_Point *a, const SDL_Point *b, const SDL_Poin * */ -#define TRIANGLE_BEGIN_LOOP \ - { \ - int x, y; \ - for (y = 0; y < dstrect.h; y++) { \ - /* y start */ \ - int w0 = w0_row; \ - int w1 = w1_row; \ - int w2 = w2_row; \ - for (x = 0; x < dstrect.w; x++) { \ - /* In triangle */ \ - if (w0 + bias_w0 >= 0 && w1 + bias_w1 >= 0 && w2 + bias_w2 >= 0) { \ - Uint8 *dptr = (Uint8 *) dst_ptr + x * dstbpp; \ - +#define TRIANGLE_BEGIN_LOOP \ + { \ + int x, y; \ + for (y = 0; y < dstrect.h; y++) { \ + /* y start */ \ + int w0 = w0_row; \ + int w1 = w1_row; \ + int w2 = w2_row; \ + for (x = 0; x < dstrect.w; x++) { \ + /* In triangle */ \ + if (w0 + bias_w0 >= 0 && w1 + bias_w1 >= 0 && w2 + bias_w2 >= 0) { \ + Uint8 *dptr = (Uint8 *)dst_ptr + x * dstbpp; /* Use 64 bits precision to prevent overflow when interpolating color / texture with wide triangles */ -#define TRIANGLE_GET_TEXTCOORD \ - int srcx = (int)(((Sint64)w0 * s2s0_x + (Sint64)w1 * s2s1_x + s2_x_area.x) / area); \ - int srcy = (int)(((Sint64)w0 * s2s0_y + (Sint64)w1 * s2s1_y + s2_x_area.y) / area); \ - -#define TRIANGLE_GET_MAPPED_COLOR \ - int r = (int)(((Sint64)w0 * c0.r + (Sint64)w1 * c1.r + (Sint64)w2 * c2.r) / area); \ - int g = (int)(((Sint64)w0 * c0.g + (Sint64)w1 * c1.g + (Sint64)w2 * c2.g) / area); \ - int b = (int)(((Sint64)w0 * c0.b + (Sint64)w1 * c1.b + (Sint64)w2 * c2.b) / area); \ - int a = (int)(((Sint64)w0 * c0.a + (Sint64)w1 * c1.a + (Sint64)w2 * c2.a) / area); \ - int color = SDL_MapRGBA(format, r, g, b, a); \ - -#define TRIANGLE_GET_COLOR \ - int r = (int)(((Sint64)w0 * c0.r + (Sint64)w1 * c1.r + (Sint64)w2 * c2.r) / area); \ - int g = (int)(((Sint64)w0 * c0.g + (Sint64)w1 * c1.g + (Sint64)w2 * c2.g) / area); \ - int b = (int)(((Sint64)w0 * c0.b + (Sint64)w1 * c1.b + (Sint64)w2 * c2.b) / area); \ - int a = (int)(((Sint64)w0 * c0.a + (Sint64)w1 * c1.a + (Sint64)w2 * c2.a) / area); \ - - -#define TRIANGLE_END_LOOP \ - } \ - /* x += 1 */ \ - w0 += d2d1_y; \ - w1 += d0d2_y; \ - w2 += d1d0_y; \ - } \ - /* y += 1 */ \ - w0_row += d1d2_x; \ - w1_row += d2d0_x; \ - w2_row += d0d1_x; \ - dst_ptr += dst_pitch; \ - } \ - } \ +#define TRIANGLE_GET_TEXTCOORD \ + int srcx = (int)(((Sint64)w0 * s2s0_x + (Sint64)w1 * s2s1_x + s2_x_area.x) / area); \ + int srcy = (int)(((Sint64)w0 * s2s0_y + (Sint64)w1 * s2s1_y + s2_x_area.y) / area); + +#define TRIANGLE_GET_MAPPED_COLOR \ + int r = (int)(((Sint64)w0 * c0.r + (Sint64)w1 * c1.r + (Sint64)w2 * c2.r) / area); \ + int g = (int)(((Sint64)w0 * c0.g + (Sint64)w1 * c1.g + (Sint64)w2 * c2.g) / area); \ + int b = (int)(((Sint64)w0 * c0.b + (Sint64)w1 * c1.b + (Sint64)w2 * c2.b) / area); \ + int a = (int)(((Sint64)w0 * c0.a + (Sint64)w1 * c1.a + (Sint64)w2 * c2.a) / area); \ + int color = SDL_MapRGBA(format, r, g, b, a); + +#define TRIANGLE_GET_COLOR \ + int r = (int)(((Sint64)w0 * c0.r + (Sint64)w1 * c1.r + (Sint64)w2 * c2.r) / area); \ + int g = (int)(((Sint64)w0 * c0.g + (Sint64)w1 * c1.g + (Sint64)w2 * c2.g) / area); \ + int b = (int)(((Sint64)w0 * c0.b + (Sint64)w1 * c1.b + (Sint64)w2 * c2.b) / area); \ + int a = (int)(((Sint64)w0 * c0.a + (Sint64)w1 * c1.a + (Sint64)w2 * c2.a) / area); + +#define TRIANGLE_END_LOOP \ + } \ + /* x += 1 */ \ + w0 += d2d1_y; \ + w1 += d0d2_y; \ + w2 += d1d0_y; \ + } \ + /* y += 1 */ \ + w0_row += d1d2_x; \ + w1_row += d2d0_x; \ + w2_row += d0d1_x; \ + dst_ptr += dst_pitch; \ + } \ + } int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, SDL_BlendMode blend, SDL_Color c0, SDL_Color c1, SDL_Color c2) { @@ -265,12 +262,11 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin SDL_IntersectRect(&dstrect, &rect, &dstrect); } - if (blend != SDL_BLENDMODE_NONE) { int format = dst->format->format; /* need an alpha format */ - if (! dst->format->Amask) { + if (!dst->format->Amask) { format = SDL_PIXELFORMAT_ARGB8888; } @@ -323,7 +319,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin } /* Handle anti-clockwise triangles */ - if (! is_clockwise) { + if (!is_clockwise) { d2d1_y *= -1; d0d2_y *= -1; d1d0_y *= -1; @@ -346,7 +342,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin if (dst->format->Amask) { color = SDL_MapRGBA(tmp->format, c0.r, c0.g, c0.b, c0.a); } else { - //color = SDL_MapRGB(tmp->format, c0.r, c0.g, c0.b); + // color = SDL_MapRGB(tmp->format, c0.r, c0.g, c0.b); color = SDL_MapRGBA(tmp->format, c0.r, c0.g, c0.b, c0.a); } } else { @@ -362,7 +358,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin } else if (dstbpp == 3) { TRIANGLE_BEGIN_LOOP { - Uint8 *s = (Uint8*)&color; + Uint8 *s = (Uint8 *)&color; dptr[0] = s[0]; dptr[1] = s[1]; dptr[2] = s[2]; @@ -397,7 +393,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin TRIANGLE_BEGIN_LOOP { TRIANGLE_GET_MAPPED_COLOR - Uint8 *s = (Uint8*)&color; + Uint8 *s = (Uint8 *)&color; dptr[0] = s[0]; dptr[1] = s[1]; dptr[2] = s[2]; @@ -433,18 +429,12 @@ end: return ret; } - - - - - - int SDL_SW_BlitTriangle( - SDL_Surface *src, - SDL_Point *s0, SDL_Point *s1, SDL_Point *s2, - SDL_Surface *dst, - SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, - SDL_Color c0, SDL_Color c1, SDL_Color c2) + SDL_Surface *src, + SDL_Point *s0, SDL_Point *s1, SDL_Point *s2, + SDL_Surface *dst, + SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, + SDL_Color c0, SDL_Color c1, SDL_Color c2) { int ret = 0; int src_locked = 0; @@ -520,14 +510,26 @@ int SDL_SW_BlitTriangle( maxx = srcrect.x + srcrect.w; maxy = srcrect.y + srcrect.h; if (srcrect.w > 0) { - if (s0->x == maxx) s0->x--; - if (s1->x == maxx) s1->x--; - if (s2->x == maxx) s2->x--; + if (s0->x == maxx) { + s0->x--; + } + if (s1->x == maxx) { + s1->x--; + } + if (s2->x == maxx) { + s2->x--; + } } if (srcrect.h > 0) { - if (s0->y == maxy) s0->y--; - if (s1->y == maxy) s1->y--; - if (s2->y == maxy) s2->y--; + if (s0->y == maxy) { + s0->y--; + } + if (s1->y == maxy) { + s1->y--; + } + if (s2->y == maxy) { + s2->y--; + } } } @@ -572,7 +574,6 @@ int SDL_SW_BlitTriangle( d0d2_y = (d2->y - d0->y) << FP_BITS; d1d0_y = (d0->y - d1->y) << FP_BITS; - d1d2_x = (d2->x - d1->x) << FP_BITS; d2d0_x = (d0->x - d2->x) << FP_BITS; d0d1_x = (d1->x - d0->x) << FP_BITS; @@ -596,7 +597,7 @@ int SDL_SW_BlitTriangle( } /* Handle anti-clockwise triangles */ - if (! is_clockwise) { + if (!is_clockwise) { d2d1_y *= -1; d0d2_y *= -1; d1d0_y *= -1; @@ -617,7 +618,7 @@ int SDL_SW_BlitTriangle( s2_x_area.x = s2->x * area; s2_x_area.y = s2->y * area; - if (blend != SDL_BLENDMODE_NONE || src->format->format != dst->format->format || has_modulation || ! is_uniform) { + if (blend != SDL_BLENDMODE_NONE || src->format->format != dst->format->format || has_modulation || !is_uniform) { /* Use SDL_BlitTriangle_Slow */ SDL_BlitInfo *info = &src->map->info; @@ -639,12 +640,11 @@ int SDL_SW_BlitTriangle( tmp_info.b = c0.b; tmp_info.a = c0.a; - tmp_info.flags &= ~(SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA); - if (c0.r != 255 || c1.r != 255 || c2.r != 255 || - c0.g != 255 || c1.g != 255 || c2.g != 255 || - c0.b != 255 || c1.b != 255 || c2.b != 255) { + if (c0.r != 255 || c1.r != 255 || c2.r != 255 || + c0.g != 255 || c1.g != 255 || c2.g != 255 || + c0.b != 255 || c1.b != 255 || c2.b != 255) { tmp_info.flags |= SDL_COPY_MODULATE_COLOR; } @@ -655,17 +655,17 @@ int SDL_SW_BlitTriangle( tmp_info.colorkey = info->colorkey; /* src */ - tmp_info.src = (Uint8 *) src_ptr; + tmp_info.src = (Uint8 *)src_ptr; tmp_info.src_pitch = src_pitch; /* dst */ - tmp_info.dst = (Uint8 *) dst_ptr; + tmp_info.dst = dst_ptr; tmp_info.dst_pitch = dst_pitch; SDL_BlitTriangle_Slow(&tmp_info, s2_x_area, dstrect, area, bias_w0, bias_w1, bias_w2, - d2d1_y, d1d2_x, d0d2_y, d2d0_x, d1d0_y, d0d1_x, - s2s0_x, s2s1_x, s2s0_y, s2s1_y, w0_row, w1_row, w2_row, - c0, c1, c2, is_uniform); + d2d1_y, d1d2_x, d0d2_y, d2d0_x, d1d0_y, d0d1_x, + s2s0_x, s2s1_x, s2s0_y, s2s1_y, w0_row, w1_row, w2_row, + c0, c1, c2, is_uniform); goto end; } @@ -674,7 +674,7 @@ int SDL_SW_BlitTriangle( TRIANGLE_BEGIN_LOOP { TRIANGLE_GET_TEXTCOORD - Uint32 *sptr = (Uint32 *)((Uint8 *) src_ptr + srcy * src_pitch); + Uint32 *sptr = (Uint32 *)((Uint8 *)src_ptr + srcy * src_pitch); *(Uint32 *)dptr = sptr[srcx]; } TRIANGLE_END_LOOP @@ -682,7 +682,7 @@ int SDL_SW_BlitTriangle( TRIANGLE_BEGIN_LOOP { TRIANGLE_GET_TEXTCOORD - Uint8 *sptr = (Uint8 *)((Uint8 *) src_ptr + srcy * src_pitch); + Uint8 *sptr = (Uint8 *)src_ptr + srcy * src_pitch; dptr[0] = sptr[3 * srcx]; dptr[1] = sptr[3 * srcx + 1]; dptr[2] = sptr[3 * srcx + 2]; @@ -692,7 +692,7 @@ int SDL_SW_BlitTriangle( TRIANGLE_BEGIN_LOOP { TRIANGLE_GET_TEXTCOORD - Uint16 *sptr = (Uint16 *)((Uint8 *) src_ptr + srcy * src_pitch); + Uint16 *sptr = (Uint16 *)((Uint8 *)src_ptr + srcy * src_pitch); *(Uint16 *)dptr = sptr[srcx]; } TRIANGLE_END_LOOP @@ -700,7 +700,7 @@ int SDL_SW_BlitTriangle( TRIANGLE_BEGIN_LOOP { TRIANGLE_GET_TEXTCOORD - Uint8 *sptr = (Uint8 *)((Uint8 *) src_ptr + srcy * src_pitch); + Uint8 *sptr = (Uint8 *)src_ptr + srcy * src_pitch; *dptr = sptr[srcx]; } TRIANGLE_END_LOOP @@ -717,13 +717,13 @@ end: return ret; } - -#define FORMAT_ALPHA 0 -#define FORMAT_NO_ALPHA -1 -#define FORMAT_2101010 1 -#define FORMAT_HAS_ALPHA(format) format == 0 -#define FORMAT_HAS_NO_ALPHA(format) format < 0 -static int SDL_INLINE detect_format(SDL_PixelFormat *pf) { +#define FORMAT_ALPHA 0 +#define FORMAT_NO_ALPHA -1 +#define FORMAT_2101010 1 +#define FORMAT_HAS_ALPHA(format) format == 0 +#define FORMAT_HAS_NO_ALPHA(format) format < 0 +static int SDL_INLINE detect_format(SDL_PixelFormat *pf) +{ if (pf->format == SDL_PIXELFORMAT_ARGB2101010) { return FORMAT_2101010; } else if (pf->Amask) { @@ -733,12 +733,11 @@ static int SDL_INLINE detect_format(SDL_PixelFormat *pf) { } } -static void -SDL_BlitTriangle_Slow(SDL_BlitInfo *info, - SDL_Point s2_x_area, SDL_Rect dstrect, int area, int bias_w0, int bias_w1, int bias_w2, - int d2d1_y, int d1d2_x, int d0d2_y, int d2d0_x, int d1d0_y, int d0d1_x, - int s2s0_x, int s2s1_x, int s2s0_y, int s2s1_y, int w0_row, int w1_row, int w2_row, - SDL_Color c0, SDL_Color c1, SDL_Color c2, int is_uniform) +static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info, + SDL_Point s2_x_area, SDL_Rect dstrect, int area, int bias_w0, int bias_w1, int bias_w2, + int d2d1_y, int d1d2_x, int d0d2_y, int d2d0_x, int d1d0_y, int d0d1_x, + int s2s0_x, int s2s1_x, int s2s0_y, int s2s1_y, int w0_row, int w1_row, int w2_row, + SDL_Color c0, SDL_Color c1, SDL_Color c2, int is_uniform) { const int flags = info->flags; Uint32 modulateR = info->r; @@ -784,7 +783,7 @@ SDL_BlitTriangle_Slow(SDL_BlitInfo *info, /* srcpixel isn't set for 24 bpp */ if (srcbpp == 3) { srcpixel = (srcR << src_fmt->Rshift) | - (srcG << src_fmt->Gshift) | (srcB << src_fmt->Bshift); + (srcG << src_fmt->Gshift) | (srcB << src_fmt->Bshift); } if ((srcpixel & rgbmask) == ckey) { continue; @@ -801,7 +800,7 @@ SDL_BlitTriangle_Slow(SDL_BlitInfo *info, RGBA_FROM_ARGB2101010(dstpixel, dstR, dstG, dstB, dstA); } - if (! is_uniform) { + if (!is_uniform) { TRIANGLE_GET_COLOR modulateR = r; modulateG = g; @@ -840,14 +839,17 @@ SDL_BlitTriangle_Slow(SDL_BlitInfo *info, break; case SDL_COPY_ADD: dstR = srcR + dstR; - if (dstR > 255) + if (dstR > 255) { dstR = 255; + } dstG = srcG + dstG; - if (dstG > 255) + if (dstG > 255) { dstG = 255; + } dstB = srcB + dstB; - if (dstB > 255) + if (dstB > 255) { dstB = 255; + } break; case SDL_COPY_MOD: dstR = (srcR * dstR) / 255; @@ -856,17 +858,17 @@ SDL_BlitTriangle_Slow(SDL_BlitInfo *info, break; case SDL_COPY_MUL: dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; - if (dstR > 255) + if (dstR > 255) { dstR = 255; + } dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; - if (dstG > 255) + if (dstG > 255) { dstG = 255; + } dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; - if (dstB > 255) + if (dstB > 255) { dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; - if (dstA > 255) - dstA = 255; + } break; } if (FORMAT_HAS_ALPHA(dstfmt_val)) { diff --git a/modules/SDL2/src/render/software/SDL_triangle.h b/modules/SDL2/src/render/software/SDL_triangle.h index 54c2261..f72fda5 100644 --- a/modules/SDL2/src/render/software/SDL_triangle.h +++ b/modules/SDL2/src/render/software/SDL_triangle.h @@ -25,15 +25,15 @@ #include "../../SDL_internal.h" extern int SDL_SW_FillTriangle(SDL_Surface *dst, - SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, - SDL_BlendMode blend, SDL_Color c0, SDL_Color c1, SDL_Color c2); + SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, + SDL_BlendMode blend, SDL_Color c0, SDL_Color c1, SDL_Color c2); extern int SDL_SW_BlitTriangle( - SDL_Surface *src, - SDL_Point *s0, SDL_Point *s1, SDL_Point *s2, - SDL_Surface *dst, - SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, - SDL_Color c0, SDL_Color c1, SDL_Color c2); + SDL_Surface *src, + SDL_Point *s0, SDL_Point *s1, SDL_Point *s2, + SDL_Surface *dst, + SDL_Point *d0, SDL_Point *d1, SDL_Point *d2, + SDL_Color c0, SDL_Color c1, SDL_Color c2); extern void trianglepoint_2_fixedpoint(SDL_Point *a); diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm.c b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm.c index d4448ae..434a7e4 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm.c +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm.c @@ -48,63 +48,58 @@ static SDL_Renderer *VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags); static void VITA_GXM_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event); -static SDL_bool VITA_GXM_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode); +static SDL_bool VITA_GXM_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode); static int VITA_GXM_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture); static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, - const SDL_Rect *rect, const void *pixels, int pitch); + const SDL_Rect *rect, const void *pixels, int pitch); -static int VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch); +static int VITA_GXM_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch); -static int VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch); +static int VITA_GXM_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch); static int VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, - const SDL_Rect *rect, void **pixels, int *pitch); + const SDL_Rect *rect, void **pixels, int *pitch); static void VITA_GXM_UnlockTexture(SDL_Renderer *renderer, - SDL_Texture *texture); + SDL_Texture *texture); -static void VITA_GXM_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode); +static void VITA_GXM_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode); static int VITA_GXM_SetRenderTarget(SDL_Renderer *renderer, - SDL_Texture *texture); + SDL_Texture *texture); +static int VITA_GXM_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd); -static int VITA_GXM_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd); +static int VITA_GXM_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd); -static int VITA_GXM_QueueSetDrawColor(SDL_Renderer * renderer, SDL_RenderCommand *cmd); +static int VITA_GXM_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count); +static int VITA_GXM_QueueDrawLines(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count); - -static int VITA_GXM_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count); -static int VITA_GXM_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count); - -static int -VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y); +static int VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y); static int VITA_GXM_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd); -static int VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize); +static int VITA_GXM_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize); static int VITA_GXM_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, - Uint32 pixel_format, void *pixels, int pitch); - + Uint32 pixel_format, void *pixels, int pitch); static int VITA_GXM_RenderPresent(SDL_Renderer *renderer); static void VITA_GXM_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture); static void VITA_GXM_DestroyRenderer(SDL_Renderer *renderer); - SDL_RenderDriver VITA_GXM_RenderDriver = { .CreateRenderer = VITA_GXM_CreateRenderer, .info = { @@ -123,11 +118,10 @@ SDL_RenderDriver VITA_GXM_RenderDriver = { }, .max_texture_width = 4096, .max_texture_height = 4096, - } + } }; -static int -PixelFormatToVITAFMT(Uint32 format) +static int PixelFormatToVITAFMT(Uint32 format) { switch (format) { case SDL_PIXELFORMAT_ARGB8888: @@ -156,10 +150,9 @@ PixelFormatToVITAFMT(Uint32 format) } } -void -StartDrawing(SDL_Renderer *renderer) +void StartDrawing(SDL_Renderer *renderer) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; if (data->drawing) { return; } @@ -171,10 +164,10 @@ StartDrawing(SDL_Renderer *renderer) data->drawstate.viewport_dirty = SDL_TRUE; // reset blend mode -// data->currentBlendMode = SDL_BLENDMODE_BLEND; -// fragment_programs *in = &data->blendFragmentPrograms.blend_mode_blend; -// data->colorFragmentProgram = in->color; -// data->textureFragmentProgram = in->texture; + // data->currentBlendMode = SDL_BLENDMODE_BLEND; + // fragment_programs *in = &data->blendFragmentPrograms.blend_mode_blend; + // data->colorFragmentProgram = in->color; + // data->textureFragmentProgram = in->texture; if (renderer->target == NULL) { sceGxmBeginScene( @@ -185,10 +178,9 @@ StartDrawing(SDL_Renderer *renderer) NULL, data->displayBufferSync[data->backBufferIndex], &data->displaySurface[data->backBufferIndex], - &data->depthSurface - ); + &data->depthSurface); } else { - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) renderer->target->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)renderer->target->driverdata; sceGxmBeginScene( data->gxm_context, @@ -198,17 +190,15 @@ StartDrawing(SDL_Renderer *renderer) NULL, NULL, &vita_texture->tex->gxm_colorsurface, - &vita_texture->tex->gxm_depthstencil - ); + &vita_texture->tex->gxm_depthstencil); } -// unset_clip_rectangle(data); + // unset_clip_rectangle(data); data->drawing = SDL_TRUE; } -static int -VITA_GXM_SetVSync(SDL_Renderer * renderer, const int vsync) +static int VITA_GXM_SetVSync(SDL_Renderer *renderer, const int vsync) { VITA_GXM_RenderData *data = renderer->driverdata; if (vsync) { @@ -221,20 +211,19 @@ VITA_GXM_SetVSync(SDL_Renderer * renderer, const int vsync) return 0; } -SDL_Renderer * -VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags) +SDL_Renderer *VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags) { SDL_Renderer *renderer; VITA_GXM_RenderData *data; - renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); - if (!renderer) { + renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer)); + if (renderer == NULL) { SDL_OutOfMemory(); return NULL; } - data = (VITA_GXM_RenderData *) SDL_calloc(1, sizeof(VITA_GXM_RenderData)); - if (!data) { + data = (VITA_GXM_RenderData *)SDL_calloc(1, sizeof(VITA_GXM_RenderData)); + if (data == NULL) { SDL_free(renderer); SDL_OutOfMemory(); return NULL; @@ -278,12 +267,11 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags) } #if DEBUG_RAZOR - sceSysmoduleLoadModule( SCE_SYSMODULE_RAZOR_HUD ); - sceSysmoduleLoadModule( SCE_SYSMODULE_RAZOR_CAPTURE ); + sceSysmoduleLoadModule(SCE_SYSMODULE_RAZOR_HUD); + sceSysmoduleLoadModule(SCE_SYSMODULE_RAZOR_CAPTURE); #endif - if (gxm_init(renderer) != 0) - { + if (gxm_init(renderer) != 0) { SDL_free(data); SDL_free(renderer); return NULL; @@ -292,25 +280,22 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags) return renderer; } -static void -VITA_GXM_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) +static void VITA_GXM_WindowEvent(SDL_Renderer *renderer, const SDL_WindowEvent *event) { } -static SDL_bool -VITA_GXM_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode) +static SDL_bool VITA_GXM_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode) { // only for custom modes. we build all modes on init, so no custom modes, sorry return SDL_FALSE; } -static int -VITA_GXM_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static int VITA_GXM_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; - VITA_GXM_TextureData* vita_texture = (VITA_GXM_TextureData*) SDL_calloc(1, sizeof(VITA_GXM_TextureData)); + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)SDL_calloc(1, sizeof(VITA_GXM_TextureData)); - if (!vita_texture) { + if (vita_texture == NULL) { return SDL_OutOfMemory(); } @@ -323,8 +308,7 @@ VITA_GXM_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) &(vita_texture->w), &(vita_texture->h), &(vita_texture->pitch), - &(vita_texture->wscale) - ); + &(vita_texture->wscale)); if (!vita_texture->tex) { SDL_free(vita_texture); @@ -343,9 +327,9 @@ VITA_GXM_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture) return 0; } -static void VITA_GXM_SetYUVProfile(SDL_Renderer * renderer, SDL_Texture *texture) +static void VITA_GXM_SetYUVProfile(SDL_Renderer *renderer, SDL_Texture *texture) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; int ret = 0; switch (SDL_GetYUVConversionModeForResolution(texture->w, texture->h)) { case SDL_YUV_CONVERSION_BT601: @@ -358,18 +342,17 @@ static void VITA_GXM_SetYUVProfile(SDL_Renderer * renderer, SDL_Texture *texture default: SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Unsupported YUV profile: %d\n", SDL_GetYUVConversionModeForResolution(texture->w, texture->h)); break; - } + } - if (ret < 0) { - SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Setting YUV profile failed: %x\n", ret); - } + if (ret < 0) { + SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Setting YUV profile failed: %x\n", ret); + } } -static int -VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, - const SDL_Rect *rect, const void *pixels, int pitch) +static int VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, const void *pixels, int pitch) { - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; Uint8 *dst; int row, length, dpitch; @@ -382,7 +365,7 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, VITA_GXM_LockTexture(renderer, texture, rect, (void **)&dst, &dpitch); length = rect->w * SDL_BYTESPERPIXEL(texture->format); if (length == pitch && length == dpitch) { - SDL_memcpy(dst, pixels, length*rect->h); + SDL_memcpy(dst, pixels, length * rect->h); } else { for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, pixels, length); @@ -395,9 +378,9 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, if (vita_texture->yuv) { void *Udst; void *Vdst; - int uv_pitch = (dpitch+1) / 2; - int uv_src_pitch = (pitch+1) / 2; - SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2}; + int uv_pitch = (dpitch + 1) / 2; + int uv_src_pitch = (pitch + 1) / 2; + SDL_Rect UVrect = { rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2 }; // skip Y plane Uint8 *Dpixels = gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h); @@ -409,7 +392,7 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, // U plane if (length == uv_src_pitch && length == uv_pitch) { - SDL_memcpy(Udst, pixels, length*UVrect.h); + SDL_memcpy(Udst, pixels, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(Udst, pixels, length); @@ -420,7 +403,7 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, // V plane if (length == uv_src_pitch && length == uv_pitch) { - SDL_memcpy(Vdst, pixels, length*UVrect.h); + SDL_memcpy(Vdst, pixels, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(Vdst, pixels, length); @@ -431,19 +414,19 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, } else if (vita_texture->nv12) { void *UVdst; - int uv_pitch = 2 * ((dpitch+1) / 2); - int uv_src_pitch = 2 * ((pitch+1) / 2); - SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2 , (rect->h + 1) / 2}; + int uv_pitch = 2 * ((dpitch + 1) / 2); + int uv_src_pitch = 2 * ((pitch + 1) / 2); + SDL_Rect UVrect = { rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2 }; // skip Y plane - void *Dpixels = (void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); + void *Dpixels = (void *)((Uint8 *)gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); UVdst = Dpixels + (UVrect.y * uv_pitch) + UVrect.x; - length = UVrect.w*2; + length = UVrect.w * 2; // UV plane if (length == uv_src_pitch && length == uv_pitch) { - SDL_memcpy(UVdst, pixels, length*UVrect.h); + SDL_memcpy(UVdst, pixels, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(UVdst, pixels, length); @@ -458,16 +441,15 @@ VITA_GXM_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, } #if SDL_HAVE_YUV -static int -VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch) +static int VITA_GXM_UpdateTextureYUV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *Uplane, int Upitch, + const Uint8 *Vplane, int Vpitch) { Uint8 *dst; int row, length, dpitch; - SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2}; + SDL_Rect UVrect = { rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2 }; VITA_GXM_SetYUVProfile(renderer, texture); @@ -478,7 +460,7 @@ VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, length = rect->w; if (length == Ypitch && length == dpitch) { - SDL_memcpy(dst, Yplane, length*rect->h); + SDL_memcpy(dst, Yplane, length * rect->h); } else { for (row = 0; row < rect->h; ++row) { SDL_memcpy(dst, Yplane, length); @@ -491,11 +473,11 @@ VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, { void *Udst; void *Vdst; - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; - int uv_pitch = (dpitch+1) / 2; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; + int uv_pitch = (dpitch + 1) / 2; // skip Y plane - void *pixels = (void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); + void *pixels = (void *)((Uint8 *)gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); if (texture->format == SDL_PIXELFORMAT_YV12) { // YVU Vdst = pixels + (UVrect.y * uv_pitch) + UVrect.x; @@ -509,7 +491,7 @@ VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, // U plane if (length == Upitch && length == uv_pitch) { - SDL_memcpy(Udst, Uplane, length*UVrect.h); + SDL_memcpy(Udst, Uplane, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(Udst, Uplane, length); @@ -520,7 +502,7 @@ VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, // V plane if (length == Vpitch && length == uv_pitch) { - SDL_memcpy(Vdst, Vplane, length*UVrect.h); + SDL_memcpy(Vdst, Vplane, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(Vdst, Vplane, length); @@ -528,22 +510,20 @@ VITA_GXM_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, Vdst += uv_pitch; } } - } return 0; } -static int -VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *UVplane, int UVpitch) +static int VITA_GXM_UpdateTextureNV(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, + const Uint8 *Yplane, int Ypitch, + const Uint8 *UVplane, int UVpitch) { Uint8 *dst; int row, length, dpitch; - SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2}; + SDL_Rect UVrect = { rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2 }; VITA_GXM_SetYUVProfile(renderer, texture); @@ -553,10 +533,10 @@ VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, length = rect->w * SDL_BYTESPERPIXEL(texture->format); if (length == Ypitch && length == dpitch) { - SDL_memcpy(dst, Yplane, length*rect->h); + SDL_memcpy(dst, Yplane, length * rect->h); } else { for (row = 0; row < rect->h; ++row) { - SDL_memcpy(dst, Yplane, length); + SDL_memcpy(dst, Yplane, length); Yplane += Ypitch; dst += dpitch; } @@ -565,11 +545,11 @@ VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, // UV plane { void *UVdst; - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; - int uv_pitch = 2 * ((dpitch+1) / 2); + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; + int uv_pitch = 2 * ((dpitch + 1) / 2); // skip Y plane - void *pixels = (void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); + void *pixels = (void *)((Uint8 *)gxm_texture_get_datap(vita_texture->tex) + (vita_texture->pitch * vita_texture->h)); UVdst = pixels + (UVrect.y * uv_pitch) + UVrect.x; @@ -577,7 +557,7 @@ VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, // UV plane if (length == UVpitch && length == uv_pitch) { - SDL_memcpy(UVdst, UVplane, length*UVrect.h); + SDL_memcpy(UVdst, UVplane, length * UVrect.h); } else { for (row = 0; row < UVrect.h; ++row) { SDL_memcpy(UVdst, UVplane, length); @@ -592,16 +572,14 @@ VITA_GXM_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, #endif -static int -VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, - const SDL_Rect *rect, void **pixels, int *pitch) +static int VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, + const SDL_Rect *rect, void **pixels, int *pitch) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; *pixels = - (void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex) - + (rect->y * vita_texture->pitch) + rect->x * SDL_BYTESPERPIXEL(texture->format)); + (void *)((Uint8 *)gxm_texture_get_datap(vita_texture->tex) + (rect->y * vita_texture->pitch) + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = vita_texture->pitch; // make sure that rendering is finished on render target textures @@ -612,18 +590,16 @@ VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, return 0; } -static void -VITA_GXM_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static void VITA_GXM_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture) { // No need to update texture data on ps vita. // VITA_GXM_LockTexture already returns a pointer to the texture pixels buffer. // This really improves framerate when using lock/unlock. } -static void -VITA_GXM_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode) +static void VITA_GXM_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode) { - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; /* set texture filtering according to scaleMode @@ -633,43 +609,39 @@ VITA_GXM_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL */ int vitaScaleMode = (scaleMode == SDL_ScaleModeNearest - ? SCE_GXM_TEXTURE_FILTER_POINT - : SCE_GXM_TEXTURE_FILTER_LINEAR); + ? SCE_GXM_TEXTURE_FILTER_POINT + : SCE_GXM_TEXTURE_FILTER_LINEAR); gxm_texture_set_filters(vita_texture->tex, vitaScaleMode, vitaScaleMode); return; } -static int -VITA_GXM_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) +static int VITA_GXM_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) { return 0; } -static void -VITA_GXM_SetBlendMode(VITA_GXM_RenderData *data, int blendMode) +static void VITA_GXM_SetBlendMode(VITA_GXM_RenderData *data, int blendMode) { - if (blendMode != data->currentBlendMode) - { + if (blendMode != data->currentBlendMode) { fragment_programs *in = &data->blendFragmentPrograms.blend_mode_blend; - switch (blendMode) - { - case SDL_BLENDMODE_NONE: - in = &data->blendFragmentPrograms.blend_mode_none; - break; - case SDL_BLENDMODE_BLEND: - in = &data->blendFragmentPrograms.blend_mode_blend; - break; - case SDL_BLENDMODE_ADD: - in = &data->blendFragmentPrograms.blend_mode_add; - break; - case SDL_BLENDMODE_MOD: - in = &data->blendFragmentPrograms.blend_mode_mod; - break; - case SDL_BLENDMODE_MUL: - in = &data->blendFragmentPrograms.blend_mode_mul; - break; + switch (blendMode) { + case SDL_BLENDMODE_NONE: + in = &data->blendFragmentPrograms.blend_mode_none; + break; + case SDL_BLENDMODE_BLEND: + in = &data->blendFragmentPrograms.blend_mode_blend; + break; + case SDL_BLENDMODE_ADD: + in = &data->blendFragmentPrograms.blend_mode_add; + break; + case SDL_BLENDMODE_MOD: + in = &data->blendFragmentPrograms.blend_mode_mod; + break; + case SDL_BLENDMODE_MUL: + in = &data->blendFragmentPrograms.blend_mode_mul; + break; } data->colorFragmentProgram = in->color; data->textureFragmentProgram = in->texture; @@ -677,16 +649,14 @@ VITA_GXM_SetBlendMode(VITA_GXM_RenderData *data, int blendMode) } } -static int -VITA_GXM_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int VITA_GXM_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { return 0; } -static int -VITA_GXM_QueueSetDrawColor(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int VITA_GXM_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; data->drawstate.color.r = cmd->data.color.r; data->drawstate.color.g = cmd->data.color.g; @@ -696,23 +666,20 @@ VITA_GXM_QueueSetDrawColor(SDL_Renderer * renderer, SDL_RenderCommand *cmd) return 0; } -static int -VITA_GXM_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int VITA_GXM_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; SDL_Color color = data->drawstate.color; color_vertex *vertex = (color_vertex *)pool_malloc( data, - count * sizeof(color_vertex) - ); + count * sizeof(color_vertex)); cmd->data.draw.first = (size_t)vertex; cmd->data.draw.count = count; - for (int i = 0; i < count; i++) - { + for (int i = 0; i < count; i++) { vertex[i].x = points[i].x; vertex[i].y = points[i].y; vertex[i].color = color; @@ -721,41 +688,37 @@ VITA_GXM_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const return 0; } -static int -VITA_GXM_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count) +static int VITA_GXM_QueueDrawLines(SDL_Renderer *renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; SDL_Color color = data->drawstate.color; color_vertex *vertex = (color_vertex *)pool_malloc( data, - (count-1) * 2 * sizeof(color_vertex) - ); + (count - 1) * 2 * sizeof(color_vertex)); cmd->data.draw.first = (size_t)vertex; - cmd->data.draw.count = (count-1) * 2; + cmd->data.draw.count = (count - 1) * 2; - for (int i = 0; i < count - 1; i++) - { - vertex[i*2].x = points[i].x; - vertex[i*2].y = points[i].y; - vertex[i*2].color = color; + for (int i = 0; i < count - 1; i++) { + vertex[i * 2].x = points[i].x; + vertex[i * 2].y = points[i].y; + vertex[i * 2].color = color; - vertex[i*2+1].x = points[i+1].x; - vertex[i*2+1].y = points[i+1].y; - vertex[i*2+1].color = color; + vertex[i * 2 + 1].x = points[i + 1].x; + vertex[i * 2 + 1].y = points[i + 1].y; + vertex[i * 2 + 1].color = color; } return 0; } -static int -VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, - const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indices, - float scale_x, float scale_y) +static int VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, + const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, + int num_vertices, const void *indices, int num_indices, int size_indices, + float scale_x, float scale_y) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; int i; int count = indices ? num_indices : num_vertices; @@ -763,18 +726,17 @@ VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu size_indices = indices ? size_indices : 0; if (texture) { - VITA_GXM_TextureData* vita_texture = (VITA_GXM_TextureData*) texture->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; texture_vertex *vertices; vertices = (texture_vertex *)pool_malloc( - data, - count * sizeof(texture_vertex)); + data, + count * sizeof(texture_vertex)); - if (!vertices) { + if (vertices == NULL) { return -1; } - for (i = 0; i < count; i++) { int j; float *xy_; @@ -790,9 +752,9 @@ VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); - uv_ = (float *)((char*)uv + j * uv_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); + uv_ = (float *)((char *)uv + j * uv_stride); vertices[i].x = xy_[0] * scale_x; vertices[i].y = xy_[1] * scale_y; @@ -807,14 +769,13 @@ VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu color_vertex *vertices; vertices = (color_vertex *)pool_malloc( - data, - count * sizeof(color_vertex)); + data, + count * sizeof(color_vertex)); - if (!vertices) { + if (vertices == NULL) { return -1; } - for (i = 0; i < count; i++) { int j; float *xy_; @@ -829,8 +790,8 @@ VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu j = i; } - xy_ = (float *)((char*)xy + j * xy_stride); - col_ = *(SDL_Color *)((char*)color + j * color_stride); + xy_ = (float *)((char *)xy + j * xy_stride); + col_ = *(SDL_Color *)((char *)color + j * color_stride); vertices[i].x = xy_[0] * scale_x; vertices[i].y = xy_[1] * scale_y; @@ -839,23 +800,21 @@ VITA_GXM_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu cmd->data.draw.first = (size_t)vertices; } - return 0; } -static int -VITA_GXM_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd) +static int VITA_GXM_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd) { void *color_buffer; float clear_color[4]; - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; unset_clip_rectangle(data); - clear_color[0] = (cmd->data.color.r)/255.0f; - clear_color[1] = (cmd->data.color.g)/255.0f; - clear_color[2] = (cmd->data.color.b)/255.0f; - clear_color[3] = (cmd->data.color.a)/255.0f; + clear_color[0] = (cmd->data.color.r) / 255.0f; + clear_color[1] = (cmd->data.color.g) / 255.0f; + clear_color[2] = (cmd->data.color.b) / 255.0f; + clear_color[3] = (cmd->data.color.a) / 255.0f; // set clear shaders data->drawstate.fragment_program = data->clearFragmentProgram; @@ -875,9 +834,7 @@ VITA_GXM_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd) return 0; } - -static int -SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) +static int SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) { SDL_Texture *texture = cmd->data.draw.texture; const SDL_BlendMode blend = cmd->data.draw.blend; @@ -889,8 +846,7 @@ SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) if (data->drawstate.viewport_dirty) { const SDL_Rect *viewport = &data->drawstate.viewport; - - float sw = viewport->w / 2.; + float sw = viewport->w / 2.; float sh = viewport->h / 2.; float x_scale = sw; @@ -902,11 +858,11 @@ SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) if (viewport->w && viewport->h) { init_orthographic_matrix(data->ortho_matrix, - (float) 0, - (float) viewport->w, - (float) viewport->h, - (float) 0, - 0.0f, 1.0f); + (float)0, + (float)viewport->w, + (float)viewport->h, + (float)0, + 0.0f, 1.0f); matrix_updated = SDL_TRUE; } @@ -948,7 +904,6 @@ SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) program_updated = SDL_TRUE; } - if (program_updated || matrix_updated) { if (data->drawstate.fragment_program == data->textureFragmentProgram) { void *vertex_wvp_buffer; @@ -963,22 +918,21 @@ SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd) if (texture != data->drawstate.texture) { if (texture) { - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) cmd->data.draw.texture->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)cmd->data.draw.texture->driverdata; sceGxmSetFragmentTexture(data->gxm_context, 0, &vita_texture->tex->gxm_tex); } data->drawstate.texture = texture; } /* all drawing commands use this */ - sceGxmSetVertexStream(data->gxm_context, 0, (const void*)cmd->data.draw.first); + sceGxmSetVertexStream(data->gxm_context, 0, (const void *)cmd->data.draw.first); return 0; } -static int -VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int VITA_GXM_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; StartDrawing(renderer); data->drawstate.target = renderer->target; @@ -986,108 +940,111 @@ VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void * int w, h; SDL_GL_GetDrawableSize(renderer->window, &w, &h); if ((w != data->drawstate.drawablew) || (h != data->drawstate.drawableh)) { - data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. + data->drawstate.viewport_dirty = SDL_TRUE; // if the window dimensions changed, invalidate the current viewport, etc. data->drawstate.cliprect_dirty = SDL_TRUE; data->drawstate.drawablew = w; data->drawstate.drawableh = h; } - } while (cmd) { switch (cmd->command) { - case SDL_RENDERCMD_SETVIEWPORT: { - SDL_Rect *viewport = &data->drawstate.viewport; - if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { - SDL_copyp(viewport, &cmd->data.viewport.rect); - data->drawstate.viewport_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETVIEWPORT: + { + SDL_Rect *viewport = &data->drawstate.viewport; + if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof(cmd->data.viewport.rect)) != 0) { + SDL_copyp(viewport, &cmd->data.viewport.rect); + data->drawstate.viewport_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_SETCLIPRECT: { - const SDL_Rect *rect = &cmd->data.cliprect.rect; - if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { - data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; - data->drawstate.cliprect_enabled_dirty = SDL_TRUE; - } - - if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { - SDL_copyp(&data->drawstate.cliprect, rect); - data->drawstate.cliprect_dirty = SDL_TRUE; - } - break; + case SDL_RENDERCMD_SETCLIPRECT: + { + const SDL_Rect *rect = &cmd->data.cliprect.rect; + if (data->drawstate.cliprect_enabled != cmd->data.cliprect.enabled) { + data->drawstate.cliprect_enabled = cmd->data.cliprect.enabled; + data->drawstate.cliprect_enabled_dirty = SDL_TRUE; } - case SDL_RENDERCMD_SETDRAWCOLOR: { - break; + if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) { + SDL_copyp(&data->drawstate.cliprect, rect); + data->drawstate.cliprect_dirty = SDL_TRUE; } + break; + } - case SDL_RENDERCMD_CLEAR: { - VITA_GXM_RenderClear(renderer, cmd); - break; - } + case SDL_RENDERCMD_SETDRAWCOLOR: + { + break; + } - case SDL_RENDERCMD_FILL_RECTS: /* unused */ - break; - - case SDL_RENDERCMD_COPY: /* unused */ - break; - - case SDL_RENDERCMD_COPY_EX: /* unused */ - break; - - case SDL_RENDERCMD_DRAW_POINTS: - case SDL_RENDERCMD_DRAW_LINES: - case SDL_RENDERCMD_GEOMETRY: { - SDL_Texture *thistexture = cmd->data.draw.texture; - SDL_BlendMode thisblend = cmd->data.draw.blend; - const SDL_RenderCommandType thiscmdtype = cmd->command; - SDL_RenderCommand *finalcmd = cmd; - SDL_RenderCommand *nextcmd = cmd->next; - size_t count = cmd->data.draw.count; - int ret; - while (nextcmd != NULL) { - const SDL_RenderCommandType nextcmdtype = nextcmd->command; - if (nextcmdtype != thiscmdtype) { - break; /* can't go any further on this draw call, different render command up next. */ - } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { - break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ - } else { - finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ - count += nextcmd->data.draw.count; - } - nextcmd = nextcmd->next; - } + case SDL_RENDERCMD_CLEAR: + { + VITA_GXM_RenderClear(renderer, cmd); + break; + } + + case SDL_RENDERCMD_FILL_RECTS: /* unused */ + break; - ret = SetDrawState(data, cmd); + case SDL_RENDERCMD_COPY: /* unused */ + break; - if (ret == 0) { - int op = SCE_GXM_PRIMITIVE_TRIANGLES; + case SDL_RENDERCMD_COPY_EX: /* unused */ + break; - if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { - sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_POINT); - op = SCE_GXM_PRIMITIVE_POINTS; - } else if (thiscmdtype == SDL_RENDERCMD_DRAW_LINES) { - sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_LINE); - op = SCE_GXM_PRIMITIVE_LINES; - } + case SDL_RENDERCMD_DRAW_POINTS: + case SDL_RENDERCMD_DRAW_LINES: + case SDL_RENDERCMD_GEOMETRY: + { + SDL_Texture *thistexture = cmd->data.draw.texture; + SDL_BlendMode thisblend = cmd->data.draw.blend; + const SDL_RenderCommandType thiscmdtype = cmd->command; + SDL_RenderCommand *finalcmd = cmd; + SDL_RenderCommand *nextcmd = cmd->next; + size_t count = cmd->data.draw.count; + int ret; + while (nextcmd != NULL) { + const SDL_RenderCommandType nextcmdtype = nextcmd->command; + if (nextcmdtype != thiscmdtype) { + break; /* can't go any further on this draw call, different render command up next. */ + } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) { + break; /* can't go any further on this draw call, different texture/blendmode copy up next. */ + } else { + finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */ + count += nextcmd->data.draw.count; + } + nextcmd = nextcmd->next; + } - sceGxmDraw(data->gxm_context, op, SCE_GXM_INDEX_FORMAT_U16, data->linearIndices, count); + ret = SetDrawState(data, cmd); - if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS || thiscmdtype == SDL_RENDERCMD_DRAW_LINES) { - sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_TRIANGLE_FILL); - } + if (ret == 0) { + int op = SCE_GXM_PRIMITIVE_TRIANGLES; + if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) { + sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_POINT); + op = SCE_GXM_PRIMITIVE_POINTS; + } else if (thiscmdtype == SDL_RENDERCMD_DRAW_LINES) { + sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_LINE); + op = SCE_GXM_PRIMITIVE_LINES; } - cmd = finalcmd; /* skip any copy commands we just combined in here. */ - break; + sceGxmDraw(data->gxm_context, op, SCE_GXM_INDEX_FORMAT_U16, data->linearIndices, count); + + if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS || thiscmdtype == SDL_RENDERCMD_DRAW_LINES) { + sceGxmSetFrontPolygonMode(data->gxm_context, SCE_GXM_POLYGON_MODE_TRIANGLE_FILL); + } } - case SDL_RENDERCMD_NO_OP: - break; + cmd = finalcmd; /* skip any copy commands we just combined in here. */ + break; + } + + case SDL_RENDERCMD_NO_OP: + break; } data->drawstate.last_command = cmd->command; cmd = cmd->next; @@ -1099,7 +1056,8 @@ VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void * return 0; } -void read_pixels(int x, int y, size_t width, size_t height, void *data) { +void read_pixels(int x, int y, size_t width, size_t height, void *data) +{ SceDisplayFrameBuf pParam; int i, j; Uint32 *out32; @@ -1122,10 +1080,8 @@ void read_pixels(int x, int y, size_t width, size_t height, void *data) { } } - -static int -VITA_GXM_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, - Uint32 pixel_format, void *pixels, int pitch) +static int VITA_GXM_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, + Uint32 pixel_format, void *pixels, int pitch) { Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ABGR8888; size_t buflen; @@ -1140,30 +1096,29 @@ VITA_GXM_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, return SDL_Unsupported(); } - temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format); buflen = rect->h * temp_pitch; if (buflen == 0) { - return 0; /* nothing to do. */ + return 0; /* nothing to do. */ } temp_pixels = SDL_malloc(buflen); - if (!temp_pixels) { + if (temp_pixels == NULL) { return SDL_OutOfMemory(); } SDL_GetRendererOutputSize(renderer, &w, &h); - read_pixels(rect->x, renderer->target ? rect->y : (h-rect->y)-rect->h, - rect->w, rect->h, temp_pixels); + read_pixels(rect->x, renderer->target ? rect->y : (h - rect->y) - rect->h, + rect->w, rect->h, temp_pixels); /* Flip the rows to be top-down if necessary */ if (!renderer->target) { SDL_bool isstack; length = rect->w * SDL_BYTESPERPIXEL(temp_format); - src = (Uint8*)temp_pixels + (rect->h-1)*temp_pitch; - dst = (Uint8*)temp_pixels; + src = (Uint8 *)temp_pixels + (rect->h - 1) * temp_pitch; + dst = (Uint8 *)temp_pixels; tmp = SDL_small_alloc(Uint8, length, &isstack); rows = rect->h / 2; while (rows--) { @@ -1184,21 +1139,19 @@ VITA_GXM_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, return status; } - -static int -VITA_GXM_RenderPresent(SDL_Renderer *renderer) +static int VITA_GXM_RenderPresent(SDL_Renderer *renderer) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; SceCommonDialogUpdateParam updateParam; data->displayData.address = data->displayBufferData[data->backBufferIndex]; SDL_memset(&updateParam, 0, sizeof(updateParam)); - updateParam.renderTarget.colorFormat = VITA_GXM_COLOR_FORMAT; - updateParam.renderTarget.surfaceType = SCE_GXM_COLOR_SURFACE_LINEAR; - updateParam.renderTarget.width = VITA_GXM_SCREEN_WIDTH; - updateParam.renderTarget.height = VITA_GXM_SCREEN_HEIGHT; + updateParam.renderTarget.colorFormat = VITA_GXM_COLOR_FORMAT; + updateParam.renderTarget.surfaceType = SCE_GXM_COLOR_SURFACE_LINEAR; + updateParam.renderTarget.width = VITA_GXM_SCREEN_WIDTH; + updateParam.renderTarget.height = VITA_GXM_SCREEN_HEIGHT; updateParam.renderTarget.strideInPixels = VITA_GXM_SCREEN_STRIDE; updateParam.renderTarget.colorSurfaceData = data->displayBufferData[data->backBufferIndex]; @@ -1211,15 +1164,13 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer) #if DEBUG_RAZOR sceGxmPadHeartbeat( (const SceGxmColorSurface *)&data->displaySurface[data->backBufferIndex], - (SceGxmSyncObject *)data->displayBufferSync[data->backBufferIndex] - ); + (SceGxmSyncObject *)data->displayBufferSync[data->backBufferIndex]); #endif sceGxmDisplayQueueAddEntry( - data->displayBufferSync[data->frontBufferIndex], // OLD fb - data->displayBufferSync[data->backBufferIndex], // NEW fb - &data->displayData - ); + data->displayBufferSync[data->frontBufferIndex], // OLD fb + data->displayBufferSync[data->backBufferIndex], // NEW fb + &data->displayData); // update buffer indices data->frontBufferIndex = data->backBufferIndex; @@ -1230,20 +1181,22 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer) return 0; } -static void -VITA_GXM_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) +static void VITA_GXM_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; - VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; + VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *)texture->driverdata; - if (data == NULL) + if (data == NULL) { return; + } - if(vita_texture == NULL) + if (vita_texture == NULL) { return; + } - if(vita_texture->tex == NULL) + if (vita_texture->tex == NULL) { return; + } sceGxmFinish(data->gxm_context); @@ -1254,13 +1207,13 @@ VITA_GXM_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture) texture->driverdata = NULL; } -static void -VITA_GXM_DestroyRenderer(SDL_Renderer *renderer) +static void VITA_GXM_DestroyRenderer(SDL_Renderer *renderer) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; if (data) { - if (!data->initialized) + if (!data->initialized) { return; + } gxm_finish(renderer); diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.c b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.c index 1538253..a5a4aac 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.c +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.c @@ -25,43 +25,44 @@ #include "SDL_render_vita_gxm_memory.h" -void * -vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid) +void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid) { void *mem; if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW) { - size = ALIGN(size, 256*1024); + size = ALIGN(size, 256 * 1024); } else { - size = ALIGN(size, 4*1024); + size = ALIGN(size, 4 * 1024); } *uid = sceKernelAllocMemBlock("gpu_mem", type, size, NULL); - if (*uid < 0) + if (*uid < 0) { return NULL; + } - if (sceKernelGetMemBlockBase(*uid, &mem) < 0) + if (sceKernelGetMemBlockBase(*uid, &mem) < 0) { return NULL; + } - if (sceGxmMapMemory(mem, size, attribs) < 0) + if (sceGxmMapMemory(mem, size, attribs) < 0) { return NULL; + } return mem; } -void -vita_mem_free(SceUID uid) +void vita_mem_free(SceUID uid) { void *mem = NULL; - if (sceKernelGetMemBlockBase(uid, &mem) < 0) + if (sceKernelGetMemBlockBase(uid, &mem) < 0) { return; + } sceGxmUnmapMemory(mem); sceKernelFreeMemBlock(uid); } -void * -vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) +void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) { void *mem; @@ -72,9 +73,9 @@ vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) info.size = sizeof(SceKernelFreeMemorySizeInfo); sceKernelGetFreeMemorySize(&info); - poolsize = ALIGN(info.size_cdram, 256*1024); + poolsize = ALIGN(info.size_cdram, 256 * 1024); if (poolsize > info.size_cdram) { - poolsize = ALIGN(info.size_cdram - 256*1024, 256*1024); + poolsize = ALIGN(info.size_cdram - 256 * 1024, 256 * 1024); } data->texturePoolUID = sceKernelAllocMemBlock("gpu_texture_pool", SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, poolsize, NULL); if (data->texturePoolUID < 0) { @@ -82,8 +83,7 @@ vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) } ret = sceKernelGetMemBlockBase(data->texturePoolUID, &mem); - if ( ret < 0) - { + if (ret < 0) { return NULL; } data->texturePool = sceClibMspaceCreate(mem, poolsize); @@ -92,86 +92,84 @@ vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) return NULL; } ret = sceGxmMapMemory(mem, poolsize, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE); - if (ret < 0) - { + if (ret < 0) { return NULL; } } return sceClibMspaceMemalign(data->texturePool, SCE_GXM_TEXTURE_ALIGNMENT, size); } -void -vita_gpu_mem_free(VITA_GXM_RenderData *data, void* ptr) +void vita_gpu_mem_free(VITA_GXM_RenderData *data, void *ptr) { - if (data->texturePool != NULL) - { + if (data->texturePool != NULL) { sceClibMspaceFree(data->texturePool, ptr); } } -void -vita_gpu_mem_destroy(VITA_GXM_RenderData *data) +void vita_gpu_mem_destroy(VITA_GXM_RenderData *data) { void *mem = NULL; - if (data->texturePool != NULL) - { + if (data->texturePool != NULL) { sceClibMspaceDestroy(data->texturePool); data->texturePool = NULL; - if (sceKernelGetMemBlockBase(data->texturePoolUID, &mem) < 0) + if (sceKernelGetMemBlockBase(data->texturePoolUID, &mem) < 0) { return; + } sceGxmUnmapMemory(mem); sceKernelFreeMemBlock(data->texturePoolUID); } } -void * -vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) +void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) { void *mem = NULL; size = ALIGN(size, 4096); *uid = sceKernelAllocMemBlock("vertex_usse", SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, size, NULL); - if (sceKernelGetMemBlockBase(*uid, &mem) < 0) + if (sceKernelGetMemBlockBase(*uid, &mem) < 0) { return NULL; - if (sceGxmMapVertexUsseMemory(mem, size, usse_offset) < 0) + } + if (sceGxmMapVertexUsseMemory(mem, size, usse_offset) < 0) { return NULL; + } return mem; } -void -vita_mem_vertex_usse_free(SceUID uid) +void vita_mem_vertex_usse_free(SceUID uid) { void *mem = NULL; - if (sceKernelGetMemBlockBase(uid, &mem) < 0) + if (sceKernelGetMemBlockBase(uid, &mem) < 0) { return; + } sceGxmUnmapVertexUsseMemory(mem); sceKernelFreeMemBlock(uid); } -void * -vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) +void *vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) { void *mem = NULL; size = ALIGN(size, 4096); *uid = sceKernelAllocMemBlock("fragment_usse", SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, size, NULL); - if (sceKernelGetMemBlockBase(*uid, &mem) < 0) + if (sceKernelGetMemBlockBase(*uid, &mem) < 0) { return NULL; - if (sceGxmMapFragmentUsseMemory(mem, size, usse_offset) < 0) + } + if (sceGxmMapFragmentUsseMemory(mem, size, usse_offset) < 0) { return NULL; + } return mem; } -void -vita_mem_fragment_usse_free(SceUID uid) +void vita_mem_fragment_usse_free(SceUID uid) { void *mem = NULL; - if (sceKernelGetMemBlockBase(uid, &mem) < 0) + if (sceKernelGetMemBlockBase(uid, &mem) < 0) { return; + } sceGxmUnmapFragmentUsseMemory(mem); sceKernelFreeMemBlock(uid); } diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.h b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.h index 703fa84..dc3d99f 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.h +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_memory.h @@ -27,12 +27,12 @@ #include #include "SDL_render_vita_gxm_types.h" -#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +#define ALIGN(x, a) (((x) + ((a)-1)) & ~((a)-1)) void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid); void vita_mem_free(SceUID uid); void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size); -void vita_gpu_mem_free(VITA_GXM_RenderData *data, void* ptr); +void vita_gpu_mem_free(VITA_GXM_RenderData *data, void *ptr); void vita_gpu_mem_destroy(VITA_GXM_RenderData *data); void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset); void vita_mem_vertex_usse_free(SceUID uid); diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_shaders.h b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_shaders.h index 2f04af3..1710ca6 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_shaders.h +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_shaders.h @@ -24,6 +24,8 @@ #include +/* *INDENT-OFF* */ /* clang-format off */ + #define gxm_shader_clear_f_size 232 static const unsigned char gxm_shader_clear_f[gxm_shader_clear_f_size] = { 0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x50, 0x03, @@ -268,12 +270,14 @@ static const unsigned char gxm_shader_texture_v[gxm_shader_texture_v_size] = { 0x6f, 0x72, 0x00, 0x77, 0x76, 0x70, 0x00, 0x00, }; -static const SceGxmProgram *const clearVertexProgramGxp = (const SceGxmProgram *)gxm_shader_clear_v; -static const SceGxmProgram *const clearFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_clear_f; -static const SceGxmProgram *const colorVertexProgramGxp = (const SceGxmProgram *)gxm_shader_color_v; -static const SceGxmProgram *const colorFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_color_f; -static const SceGxmProgram *const textureVertexProgramGxp = (const SceGxmProgram *)gxm_shader_texture_v; -static const SceGxmProgram *const textureFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_texture_f; +/* *INDENT-ON* */ /* clang-format on */ + +static const SceGxmProgram *const clearVertexProgramGxp = (const SceGxmProgram *)gxm_shader_clear_v; +static const SceGxmProgram *const clearFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_clear_f; +static const SceGxmProgram *const colorVertexProgramGxp = (const SceGxmProgram *)gxm_shader_color_v; +static const SceGxmProgram *const colorFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_color_f; +static const SceGxmProgram *const textureVertexProgramGxp = (const SceGxmProgram *)gxm_shader_texture_v; +static const SceGxmProgram *const textureFragmentProgramGxp = (const SceGxmProgram *)gxm_shader_texture_f; #endif // SDL_RENDER_VITA_GXM_SHADERS_H diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.c index e0c3813..772a703 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -45,23 +45,22 @@ #include "SDL_render_vita_gxm_memory.h" #include "SDL_render_vita_gxm_shaders.h" -void -init_orthographic_matrix(float *m, float left, float right, float bottom, float top, float near, float far) +void init_orthographic_matrix(float *m, float left, float right, float bottom, float top, float near, float far) { - m[0x0] = 2.0f/(right-left); + m[0x0] = 2.0f / (right - left); m[0x4] = 0.0f; m[0x8] = 0.0f; - m[0xC] = -(right+left)/(right-left); + m[0xC] = -(right + left) / (right - left); m[0x1] = 0.0f; - m[0x5] = 2.0f/(top-bottom); + m[0x5] = 2.0f / (top - bottom); m[0x9] = 0.0f; - m[0xD] = -(top+bottom)/(top-bottom); + m[0xD] = -(top + bottom) / (top - bottom); m[0x2] = 0.0f; m[0x6] = 0.0f; - m[0xA] = -2.0f/(far-near); - m[0xE] = (far+near)/(far-near); + m[0xA] = -2.0f / (far - near); + m[0xE] = (far + near) / (far - near); m[0x3] = 0.0f; m[0x7] = 0.0f; @@ -69,23 +68,20 @@ init_orthographic_matrix(float *m, float left, float right, float bottom, float m[0xF] = 1.0f; } -static void * -patcher_host_alloc(void *user_data, unsigned int size) +static void *patcher_host_alloc(void *user_data, unsigned int size) { void *mem = SDL_malloc(size); (void)user_data; return mem; } -static void -patcher_host_free(void *user_data, void *mem) +static void patcher_host_free(void *user_data, void *mem) { (void)user_data; SDL_free(mem); } -void * -pool_malloc(VITA_GXM_RenderData *data, unsigned int size) +void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size) { if ((data->pool_index + size) < VITA_GXM_POOL_SIZE) { @@ -97,8 +93,7 @@ pool_malloc(VITA_GXM_RenderData *data, unsigned int size) return NULL; } -void * -pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment) +void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment) { unsigned int new_index = (data->pool_index + alignment - 1) & ~(alignment - 1); if ((new_index + size) < VITA_GXM_POOL_SIZE) { @@ -110,8 +105,7 @@ pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignme return NULL; } -static int -tex_format_to_bytespp(SceGxmTextureFormat format) +static int tex_format_to_bytespp(SceGxmTextureFormat format) { switch (format & 0x9f000000U) { case SCE_GXM_TEXTURE_BASE_FORMAT_U8: @@ -141,19 +135,18 @@ tex_format_to_bytespp(SceGxmTextureFormat format) } } -static void -display_callback(const void *callback_data) +static void display_callback(const void *callback_data) { SceDisplayFrameBuf framebuf; const VITA_GXM_DisplayData *display_data = (const VITA_GXM_DisplayData *)callback_data; SDL_memset(&framebuf, 0x00, sizeof(SceDisplayFrameBuf)); - framebuf.size = sizeof(SceDisplayFrameBuf); - framebuf.base = display_data->address; - framebuf.pitch = VITA_GXM_SCREEN_STRIDE; + framebuf.size = sizeof(SceDisplayFrameBuf); + framebuf.base = display_data->address; + framebuf.pitch = VITA_GXM_SCREEN_STRIDE; framebuf.pixelformat = VITA_GXM_PIXEL_FORMAT; - framebuf.width = VITA_GXM_SCREEN_WIDTH; - framebuf.height = VITA_GXM_SCREEN_HEIGHT; + framebuf.width = VITA_GXM_SCREEN_WIDTH; + framebuf.height = VITA_GXM_SCREEN_HEIGHT; sceDisplaySetFrameBuf(&framebuf, SCE_DISPLAY_SETBUF_NEXTFRAME); if (display_data->wait_vblank) { @@ -161,16 +154,14 @@ display_callback(const void *callback_data) } } -static void -free_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out) +static void free_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out) { sceGxmShaderPatcherReleaseFragmentProgram(data->shaderPatcher, out->color); sceGxmShaderPatcherReleaseFragmentProgram(data->shaderPatcher, out->texture); } -static void -make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out, - const SceGxmBlendInfo *blend_info) +static void make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out, + const SceGxmBlendInfo *blend_info) { int err; @@ -181,8 +172,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out, 0, blend_info, colorVertexProgramGxp, - &out->color - ); + &out->color); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err); @@ -196,8 +186,7 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out, 0, blend_info, textureVertexProgramGxp, - &out->texture - ); + &out->texture); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Patcher create fragment failed: %d\n", err); @@ -205,16 +194,13 @@ make_fragment_programs(VITA_GXM_RenderData *data, fragment_programs *out, } } - -static void -set_stencil_mask(VITA_GXM_RenderData *data, float x, float y, float w, float h) +static void set_stencil_mask(VITA_GXM_RenderData *data, float x, float y, float w, float h) { void *vertexDefaultBuffer; color_vertex *vertices = (color_vertex *)pool_memalign( data, 4 * sizeof(color_vertex), // 4 vertices - sizeof(color_vertex) - ); + sizeof(color_vertex)); vertices[0].x = x; vertices[0].y = y; @@ -256,11 +242,9 @@ set_stencil_mask(VITA_GXM_RenderData *data, float x, float y, float w, float h) sceGxmDraw(data->gxm_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, data->linearIndices, 4); } - -void -set_clip_rectangle(VITA_GXM_RenderData *data, int x_min, int y_min, int x_max, int y_max) +void set_clip_rectangle(VITA_GXM_RenderData *data, int x_min, int y_min, int x_max, int y_max) { - if(data->drawing) { + if (data->drawing) { // clear the stencil buffer to 0 sceGxmSetFrontStencilFunc( data->gxm_context, @@ -269,8 +253,7 @@ set_clip_rectangle(VITA_GXM_RenderData *data, int x_min, int y_min, int x_max, i SCE_GXM_STENCIL_OP_ZERO, SCE_GXM_STENCIL_OP_ZERO, 0xFF, - 0xFF - ); + 0xFF); set_stencil_mask(data, 0, 0, VITA_GXM_SCREEN_WIDTH, VITA_GXM_SCREEN_HEIGHT); @@ -282,8 +265,7 @@ set_clip_rectangle(VITA_GXM_RenderData *data, int x_min, int y_min, int x_max, i SCE_GXM_STENCIL_OP_REPLACE, SCE_GXM_STENCIL_OP_REPLACE, 0xFF, - 0xFF - ); + 0xFF); set_stencil_mask(data, x_min, y_min, x_max - x_min, y_max - y_min); @@ -295,13 +277,11 @@ set_clip_rectangle(VITA_GXM_RenderData *data, int x_min, int y_min, int x_max, i SCE_GXM_STENCIL_OP_KEEP, SCE_GXM_STENCIL_OP_KEEP, 0xFF, - 0xFF - ); + 0xFF); } } -void -unset_clip_rectangle(VITA_GXM_RenderData *data) +void unset_clip_rectangle(VITA_GXM_RenderData *data) { sceGxmSetFrontStencilFunc( data->gxm_context, @@ -310,12 +290,10 @@ unset_clip_rectangle(VITA_GXM_RenderData *data) SCE_GXM_STENCIL_OP_KEEP, SCE_GXM_STENCIL_OP_KEEP, 0xFF, - 0xFF - ); + 0xFF); } -int -gxm_init(SDL_Renderer *renderer) +int gxm_init(SDL_Renderer *renderer) { unsigned int i, x, y; int err; @@ -341,38 +319,38 @@ gxm_init(SDL_Renderer *renderer) unsigned int depthStrideInSamples = alignedWidth; // set buffer sizes for this sample - const unsigned int patcherBufferSize = 64*1024; - const unsigned int patcherVertexUsseSize = 64*1024; - const unsigned int patcherFragmentUsseSize = 64*1024; + const unsigned int patcherBufferSize = 64 * 1024; + const unsigned int patcherVertexUsseSize = 64 * 1024; + const unsigned int patcherFragmentUsseSize = 64 * 1024; // Fill SceGxmBlendInfo static const SceGxmBlendInfo blend_info_none = { .colorFunc = SCE_GXM_BLEND_FUNC_NONE, .alphaFunc = SCE_GXM_BLEND_FUNC_NONE, - .colorSrc = SCE_GXM_BLEND_FACTOR_ZERO, - .colorDst = SCE_GXM_BLEND_FACTOR_ZERO, - .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, - .alphaDst = SCE_GXM_BLEND_FACTOR_ZERO, + .colorSrc = SCE_GXM_BLEND_FACTOR_ZERO, + .colorDst = SCE_GXM_BLEND_FACTOR_ZERO, + .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, + .alphaDst = SCE_GXM_BLEND_FACTOR_ZERO, .colorMask = SCE_GXM_COLOR_MASK_ALL }; static const SceGxmBlendInfo blend_info_blend = { .colorFunc = SCE_GXM_BLEND_FUNC_ADD, .alphaFunc = SCE_GXM_BLEND_FUNC_ADD, - .colorSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA, - .colorDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, - .alphaSrc = SCE_GXM_BLEND_FACTOR_ONE, - .alphaDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + .colorSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA, + .colorDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + .alphaSrc = SCE_GXM_BLEND_FACTOR_ONE, + .alphaDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, .colorMask = SCE_GXM_COLOR_MASK_ALL }; static const SceGxmBlendInfo blend_info_add = { .colorFunc = SCE_GXM_BLEND_FUNC_ADD, .alphaFunc = SCE_GXM_BLEND_FUNC_ADD, - .colorSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA, - .colorDst = SCE_GXM_BLEND_FACTOR_ONE, - .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, - .alphaDst = SCE_GXM_BLEND_FACTOR_ONE, + .colorSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA, + .colorDst = SCE_GXM_BLEND_FACTOR_ONE, + .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, + .alphaDst = SCE_GXM_BLEND_FACTOR_ONE, .colorMask = SCE_GXM_COLOR_MASK_ALL }; @@ -380,33 +358,33 @@ gxm_init(SDL_Renderer *renderer) .colorFunc = SCE_GXM_BLEND_FUNC_ADD, .alphaFunc = SCE_GXM_BLEND_FUNC_ADD, - .colorSrc = SCE_GXM_BLEND_FACTOR_ZERO, - .colorDst = SCE_GXM_BLEND_FACTOR_SRC_COLOR, + .colorSrc = SCE_GXM_BLEND_FACTOR_ZERO, + .colorDst = SCE_GXM_BLEND_FACTOR_SRC_COLOR, - .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, - .alphaDst = SCE_GXM_BLEND_FACTOR_ONE, + .alphaSrc = SCE_GXM_BLEND_FACTOR_ZERO, + .alphaDst = SCE_GXM_BLEND_FACTOR_ONE, .colorMask = SCE_GXM_COLOR_MASK_ALL }; static const SceGxmBlendInfo blend_info_mul = { .colorFunc = SCE_GXM_BLEND_FUNC_ADD, .alphaFunc = SCE_GXM_BLEND_FUNC_ADD, - .colorSrc = SCE_GXM_BLEND_FACTOR_DST_COLOR, - .colorDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, - .alphaSrc = SCE_GXM_BLEND_FACTOR_DST_ALPHA, - .alphaDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + .colorSrc = SCE_GXM_BLEND_FACTOR_DST_COLOR, + .colorDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + .alphaSrc = SCE_GXM_BLEND_FACTOR_DST_ALPHA, + .alphaDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, .colorMask = SCE_GXM_COLOR_MASK_ALL }; - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; SceGxmInitializeParams initializeParams; SDL_memset(&initializeParams, 0, sizeof(SceGxmInitializeParams)); - initializeParams.flags = 0; - initializeParams.displayQueueMaxPendingCount = VITA_GXM_PENDING_SWAPS; - initializeParams.displayQueueCallback = display_callback; - initializeParams.displayQueueCallbackDataSize = sizeof(VITA_GXM_DisplayData); - initializeParams.parameterBufferSize = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; + initializeParams.flags = 0; + initializeParams.displayQueueMaxPendingCount = VITA_GXM_PENDING_SWAPS; + initializeParams.displayQueueCallback = display_callback; + initializeParams.displayQueueCallbackDataSize = sizeof(VITA_GXM_DisplayData); + initializeParams.parameterBufferSize = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; err = sceGxmInitialize(&initializeParams); @@ -443,17 +421,17 @@ gxm_init(SDL_Renderer *renderer) &fragmentUsseRingBufferOffset); SDL_memset(&data->contextParams, 0, sizeof(SceGxmContextParams)); - data->contextParams.hostMem = SDL_malloc(SCE_GXM_MINIMUM_CONTEXT_HOST_MEM_SIZE); - data->contextParams.hostMemSize = SCE_GXM_MINIMUM_CONTEXT_HOST_MEM_SIZE; - data->contextParams.vdmRingBufferMem = vdmRingBuffer; - data->contextParams.vdmRingBufferMemSize = SCE_GXM_DEFAULT_VDM_RING_BUFFER_SIZE; - data->contextParams.vertexRingBufferMem = vertexRingBuffer; - data->contextParams.vertexRingBufferMemSize = SCE_GXM_DEFAULT_VERTEX_RING_BUFFER_SIZE; - data->contextParams.fragmentRingBufferMem = fragmentRingBuffer; - data->contextParams.fragmentRingBufferMemSize = SCE_GXM_DEFAULT_FRAGMENT_RING_BUFFER_SIZE; - data->contextParams.fragmentUsseRingBufferMem = fragmentUsseRingBuffer; + data->contextParams.hostMem = SDL_malloc(SCE_GXM_MINIMUM_CONTEXT_HOST_MEM_SIZE); + data->contextParams.hostMemSize = SCE_GXM_MINIMUM_CONTEXT_HOST_MEM_SIZE; + data->contextParams.vdmRingBufferMem = vdmRingBuffer; + data->contextParams.vdmRingBufferMemSize = SCE_GXM_DEFAULT_VDM_RING_BUFFER_SIZE; + data->contextParams.vertexRingBufferMem = vertexRingBuffer; + data->contextParams.vertexRingBufferMemSize = SCE_GXM_DEFAULT_VERTEX_RING_BUFFER_SIZE; + data->contextParams.fragmentRingBufferMem = fragmentRingBuffer; + data->contextParams.fragmentRingBufferMemSize = SCE_GXM_DEFAULT_FRAGMENT_RING_BUFFER_SIZE; + data->contextParams.fragmentUsseRingBufferMem = fragmentUsseRingBuffer; data->contextParams.fragmentUsseRingBufferMemSize = SCE_GXM_DEFAULT_FRAGMENT_USSE_RING_BUFFER_SIZE; - data->contextParams.fragmentUsseRingBufferOffset = fragmentUsseRingBufferOffset; + data->contextParams.fragmentUsseRingBufferOffset = fragmentUsseRingBufferOffset; err = sceGxmCreateContext(&data->contextParams, &data->gxm_context); if (err != 0) { @@ -463,13 +441,13 @@ gxm_init(SDL_Renderer *renderer) // set up parameters SDL_memset(&renderTargetParams, 0, sizeof(SceGxmRenderTargetParams)); - renderTargetParams.flags = 0; - renderTargetParams.width = VITA_GXM_SCREEN_WIDTH; - renderTargetParams.height = VITA_GXM_SCREEN_HEIGHT; - renderTargetParams.scenesPerFrame = 1; - renderTargetParams.multisampleMode = 0; + renderTargetParams.flags = 0; + renderTargetParams.width = VITA_GXM_SCREEN_WIDTH; + renderTargetParams.height = VITA_GXM_SCREEN_HEIGHT; + renderTargetParams.scenesPerFrame = 1; + renderTargetParams.multisampleMode = 0; renderTargetParams.multisampleLocations = 0; - renderTargetParams.driverMemBlock = -1; // Invalid UID + renderTargetParams.driverMemBlock = -1; // Invalid UID // create the render target err = sceGxmCreateRenderTarget(&renderTargetParams, &data->renderTarget); @@ -507,25 +485,21 @@ gxm_init(SDL_Renderer *renderer) VITA_GXM_SCREEN_WIDTH, VITA_GXM_SCREEN_HEIGHT, VITA_GXM_SCREEN_STRIDE, - data->displayBufferData[i] - ); + data->displayBufferData[i]); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "color surface init failed: %d\n", err); return err; } - // create a sync object that we will associate with this buffer err = sceGxmSyncObjectCreate(&data->displayBufferSync[i]); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "sync object creation failed: %d\n", err); return err; } - } - // allocate the depth buffer data->depthBufferData = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, @@ -554,7 +528,6 @@ gxm_init(SDL_Renderer *renderer) // set the stencil test reference (this is currently assumed to always remain 1 after here for region clipping) sceGxmSetFrontStencilRef(data->gxm_context, 1); - // set the stencil function (this wouldn't actually be needed, as the set clip rectangle function has to call this at the begginning of every scene) sceGxmSetFrontStencilFunc( data->gxm_context, @@ -565,7 +538,6 @@ gxm_init(SDL_Renderer *renderer) 0xFF, 0xFF); - // allocate memory for buffers and USSE code patcherBuffer = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, @@ -586,23 +558,23 @@ gxm_init(SDL_Renderer *renderer) // create a shader patcher SDL_memset(&patcherParams, 0, sizeof(SceGxmShaderPatcherParams)); - patcherParams.userData = NULL; - patcherParams.hostAllocCallback = &patcher_host_alloc; - patcherParams.hostFreeCallback = &patcher_host_free; - patcherParams.bufferAllocCallback = NULL; - patcherParams.bufferFreeCallback = NULL; - patcherParams.bufferMem = patcherBuffer; - patcherParams.bufferMemSize = patcherBufferSize; - patcherParams.vertexUsseAllocCallback = NULL; - patcherParams.vertexUsseFreeCallback = NULL; - patcherParams.vertexUsseMem = patcherVertexUsse; - patcherParams.vertexUsseMemSize = patcherVertexUsseSize; - patcherParams.vertexUsseOffset = patcherVertexUsseOffset; + patcherParams.userData = NULL; + patcherParams.hostAllocCallback = &patcher_host_alloc; + patcherParams.hostFreeCallback = &patcher_host_free; + patcherParams.bufferAllocCallback = NULL; + patcherParams.bufferFreeCallback = NULL; + patcherParams.bufferMem = patcherBuffer; + patcherParams.bufferMemSize = patcherBufferSize; + patcherParams.vertexUsseAllocCallback = NULL; + patcherParams.vertexUsseFreeCallback = NULL; + patcherParams.vertexUsseMem = patcherVertexUsse; + patcherParams.vertexUsseMemSize = patcherVertexUsseSize; + patcherParams.vertexUsseOffset = patcherVertexUsseOffset; patcherParams.fragmentUsseAllocCallback = NULL; - patcherParams.fragmentUsseFreeCallback = NULL; - patcherParams.fragmentUsseMem = patcherFragmentUsse; - patcherParams.fragmentUsseMemSize = patcherFragmentUsseSize; - patcherParams.fragmentUsseOffset = patcherFragmentUsseOffset; + patcherParams.fragmentUsseFreeCallback = NULL; + patcherParams.fragmentUsseMem = patcherFragmentUsse; + patcherParams.fragmentUsseMemSize = patcherFragmentUsseSize; + patcherParams.fragmentUsseOffset = patcherFragmentUsseOffset; err = sceGxmShaderPatcherCreate(&patcherParams, &data->shaderPatcher); if (err != 0) { @@ -610,7 +582,6 @@ gxm_init(SDL_Renderer *renderer) return err; } - // check the shaders err = sceGxmProgramCheck(clearVertexProgramGxp); if (err != 0) { @@ -692,13 +663,13 @@ gxm_init(SDL_Renderer *renderer) // create clear vertex format SceGxmVertexAttribute clearVertexAttributes[1]; SceGxmVertexStream clearVertexStreams[1]; - clearVertexAttributes[0].streamIndex = 0; - clearVertexAttributes[0].offset = 0; - clearVertexAttributes[0].format = SCE_GXM_ATTRIBUTE_FORMAT_F32; + clearVertexAttributes[0].streamIndex = 0; + clearVertexAttributes[0].offset = 0; + clearVertexAttributes[0].format = SCE_GXM_ATTRIBUTE_FORMAT_F32; clearVertexAttributes[0].componentCount = 2; - clearVertexAttributes[0].regIndex = sceGxmProgramParameterGetResourceIndex(paramClearPositionAttribute); - clearVertexStreams[0].stride = sizeof(clear_vertex); - clearVertexStreams[0].indexSource = SCE_GXM_INDEX_SOURCE_INDEX_16BIT; + clearVertexAttributes[0].regIndex = sceGxmProgramParameterGetResourceIndex(paramClearPositionAttribute); + clearVertexStreams[0].stride = sizeof(clear_vertex); + clearVertexStreams[0].indexSource = SCE_GXM_INDEX_SOURCE_INDEX_16BIT; // create clear programs err = sceGxmShaderPatcherCreateVertexProgram( @@ -708,8 +679,7 @@ gxm_init(SDL_Renderer *renderer) 1, clearVertexStreams, 1, - &data->clearVertexProgram - ); + &data->clearVertexProgram); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear vertex) failed: %d\n", err); return err; @@ -722,8 +692,7 @@ gxm_init(SDL_Renderer *renderer) 0, NULL, clearVertexProgramGxp, - &data->clearFragmentProgram - ); + &data->clearFragmentProgram); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (clear fragment) failed: %d\n", err); return err; @@ -732,11 +701,10 @@ gxm_init(SDL_Renderer *renderer) // create the clear triangle vertex/index data data->clearVertices = (clear_vertex *)vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, - 3*sizeof(clear_vertex), + 3 * sizeof(clear_vertex), 4, SCE_GXM_MEMORY_ATTRIB_READ, - &data->clearVerticesUid - ); + &data->clearVerticesUid); } // Allocate a 64k * 2 bytes = 128 KiB buffer and store all possible @@ -744,23 +712,21 @@ gxm_init(SDL_Renderer *renderer) // all drawing operations where we don't want to use indexing. data->linearIndices = (uint16_t *)vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, - UINT16_MAX*sizeof(uint16_t), + UINT16_MAX * sizeof(uint16_t), sizeof(uint16_t), SCE_GXM_MEMORY_ATTRIB_READ, - &data->linearIndicesUid - ); + &data->linearIndicesUid); - for (i = 0; i <= UINT16_MAX; ++i) - { + for (i = 0; i <= UINT16_MAX; ++i) { data->linearIndices[i] = i; } data->clearVertices[0].x = -1.0f; data->clearVertices[0].y = -1.0f; - data->clearVertices[1].x = 3.0f; + data->clearVertices[1].x = 3.0f; data->clearVertices[1].y = -1.0f; data->clearVertices[2].x = -1.0f; - data->clearVertices[2].y = 3.0f; + data->clearVertices[2].y = 3.0f; { const SceGxmProgramParameter *paramColorPositionAttribute = sceGxmProgramFindParameterByName(colorVertexProgramGxp, "aPosition"); @@ -794,16 +760,13 @@ gxm_init(SDL_Renderer *renderer) 2, colorVertexStreams, 1, - &data->colorVertexProgram - ); + &data->colorVertexProgram); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (color vertex) failed: %d\n", err); return err; } - } - { const SceGxmProgramParameter *paramTexturePositionAttribute = sceGxmProgramFindParameterByName(textureVertexProgramGxp, "aPosition"); const SceGxmProgramParameter *paramTextureTexcoordAttribute = sceGxmProgramFindParameterByName(textureVertexProgramGxp, "aTexcoord"); @@ -842,13 +805,11 @@ gxm_init(SDL_Renderer *renderer) 3, textureVertexStreams, 1, - &data->textureVertexProgram - ); + &data->textureVertexProgram); if (err != 0) { SDL_LogError(SDL_LOG_CATEGORY_RENDER, "create program (texture vertex) failed: %x\n", err); return err; } - } // Create variations of the fragment program based on blending mode @@ -864,7 +825,6 @@ gxm_init(SDL_Renderer *renderer) data->colorFragmentProgram = in->color; data->textureFragmentProgram = in->texture; - } // find vertex uniforms by name and cache parameter information @@ -878,16 +838,14 @@ gxm_init(SDL_Renderer *renderer) VITA_GXM_POOL_SIZE, sizeof(void *), SCE_GXM_MEMORY_ATTRIB_READ, - &data->poolUid[0] - ); + &data->poolUid[0]); data->pool_addr[1] = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW, VITA_GXM_POOL_SIZE, sizeof(void *), SCE_GXM_MEMORY_ATTRIB_READ, - &data->poolUid[1] - ); + &data->poolUid[1]); init_orthographic_matrix(data->ortho_matrix, 0.0f, VITA_GXM_SCREEN_WIDTH, VITA_GXM_SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f); @@ -902,7 +860,7 @@ gxm_init(SDL_Renderer *renderer) void gxm_finish(SDL_Renderer *renderer) { - VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; + VITA_GXM_RenderData *data = (VITA_GXM_RenderData *)renderer->driverdata; // wait until rendering is done sceGxmFinish(data->gxm_context); @@ -913,7 +871,6 @@ void gxm_finish(SDL_Renderer *renderer) sceGxmShaderPatcherReleaseVertexProgram(data->shaderPatcher, data->colorVertexProgram); sceGxmShaderPatcherReleaseVertexProgram(data->shaderPatcher, data->textureVertexProgram); - free_fragment_programs(data, &data->blendFragmentPrograms.blend_mode_none); free_fragment_programs(data, &data->blendFragmentPrograms.blend_mode_blend); free_fragment_programs(data, &data->blendFragmentPrograms.blend_mode_add); @@ -929,8 +886,7 @@ void gxm_finish(SDL_Renderer *renderer) // clean up display queue vita_mem_free(data->depthBufferUid); - for (size_t i = 0; i < VITA_GXM_BUFFERS; i++) - { + for (size_t i = 0; i < VITA_GXM_BUFFERS; i++) { // clear the buffer then deallocate SDL_memset(data->displayBufferData[i], 0, VITA_GXM_SCREEN_HEIGHT * VITA_GXM_SCREEN_STRIDE * 4); vita_mem_free(data->displayBufferUid[i]); @@ -977,8 +933,7 @@ void gxm_finish(SDL_Renderer *renderer) // textures -void -free_gxm_texture(VITA_GXM_RenderData *data, gxm_texture *texture) +void free_gxm_texture(VITA_GXM_RenderData *data, gxm_texture *texture) { if (texture) { if (texture->gxm_rendertarget) { @@ -1002,8 +957,7 @@ gxm_texture_get_format(const gxm_texture *texture) return sceGxmTextureGetFormat(&texture->gxm_tex); } -void * -gxm_texture_get_datap(const gxm_texture *texture) +void *gxm_texture_get_datap(const gxm_texture *texture) { return sceGxmTextureGetData(&texture->gxm_tex); } @@ -1028,30 +982,30 @@ static SceGxmColorFormat tex_format_to_color_format(SceGxmTextureFormat format) } } -gxm_texture * -create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget, unsigned int *return_w, unsigned int *return_h, unsigned int *return_pitch, float *return_wscale) +gxm_texture *create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget, unsigned int *return_w, unsigned int *return_h, unsigned int *return_pitch, float *return_wscale) { gxm_texture *texture = SDL_calloc(1, sizeof(gxm_texture)); int aligned_w = ALIGN(w, 8); int texture_w = w; - int tex_size = aligned_w * h * tex_format_to_bytespp(format); + int tex_size = aligned_w * h * tex_format_to_bytespp(format); void *texture_data; int ret; *return_wscale = 1.0f; // SCE_GXM_TEXTURE_BASE_FORMAT_YUV420P3/P2 based formats require width aligned to 16 - if ( (format & 0x9f000000U) == SCE_GXM_TEXTURE_BASE_FORMAT_YUV420P3 || (format & 0x9f000000U) == SCE_GXM_TEXTURE_BASE_FORMAT_YUV420P2) { + if ((format & 0x9f000000U) == SCE_GXM_TEXTURE_BASE_FORMAT_YUV420P3 || (format & 0x9f000000U) == SCE_GXM_TEXTURE_BASE_FORMAT_YUV420P2) { aligned_w = ALIGN(w, 16); texture_w = aligned_w; - tex_size = aligned_w * h * tex_format_to_bytespp(format); - *return_wscale = (float) (w) / texture_w; + tex_size = aligned_w * h * tex_format_to_bytespp(format); + *return_wscale = (float)(w) / texture_w; // add storage for UV planes tex_size += (((aligned_w + 1) / 2) * ((h + 1) / 2)) * 2; } - if (!texture) + if (texture == NULL) { return NULL; + } *return_w = w; *return_h = h; @@ -1060,25 +1014,23 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc /* Allocate a GPU buffer for the texture */ texture_data = vita_gpu_mem_alloc( data, - tex_size - ); + tex_size); /* Try SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE in case we're out of VRAM */ - if (!texture_data) { + if (texture_data == NULL) { SDL_LogWarn(SDL_LOG_CATEGORY_RENDER, "CDRAM texture allocation failed\n"); texture_data = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, tex_size, SCE_GXM_TEXTURE_ALIGNMENT, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE, - &texture->data_UID - ); + &texture->data_UID); texture->cdram = 0; } else { texture->cdram = 1; } - if (!texture_data) { + if (texture_data == NULL) { SDL_free(texture); return NULL; } @@ -1087,22 +1039,21 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc SDL_memset(texture_data, 0, tex_size); /* Create the gxm texture */ - ret = sceGxmTextureInitLinear( &texture->gxm_tex, texture_data, format, texture_w, h, 0); + ret = sceGxmTextureInitLinear(&texture->gxm_tex, texture_data, format, texture_w, h, 0); if (ret < 0) { - free_gxm_texture(data, texture); - SDL_LogError(SDL_LOG_CATEGORY_RENDER, "texture init failed: %x\n", ret); - return NULL; + free_gxm_texture(data, texture); + SDL_LogError(SDL_LOG_CATEGORY_RENDER, "texture init failed: %x\n", ret); + return NULL; } if (isRenderTarget) { void *depthBufferData; const uint32_t alignedWidth = ALIGN(w, SCE_GXM_TILE_SIZEX); const uint32_t alignedHeight = ALIGN(h, SCE_GXM_TILE_SIZEY); - uint32_t sampleCount = alignedWidth*alignedHeight; + uint32_t sampleCount = alignedWidth * alignedHeight; uint32_t depthStrideInSamples = alignedWidth; const uint32_t alignedColorSurfaceStride = ALIGN(w, 8); - int err = sceGxmColorSurfaceInit( &texture->gxm_colorsurface, tex_format_to_color_format(format), @@ -1112,8 +1063,7 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc w, h, alignedColorSurfaceStride, - texture_data - ); + texture_data); if (err < 0) { free_gxm_texture(data, texture); @@ -1124,7 +1074,7 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc // allocate it depthBufferData = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE, - 4*sampleCount, + 4 * sampleCount, SCE_GXM_DEPTHSTENCIL_SURFACE_ALIGNMENT, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE, &texture->depth_UID); @@ -1169,14 +1119,12 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc return NULL; } } - } return texture; } -void -gxm_texture_set_filters(gxm_texture *texture, SceGxmTextureFilter min_filter, SceGxmTextureFilter mag_filter) +void gxm_texture_set_filters(gxm_texture *texture, SceGxmTextureFilter min_filter, SceGxmTextureFilter mag_filter) { sceGxmTextureSetMinFilter(&texture->gxm_tex, min_filter); sceGxmTextureSetMagFilter(&texture->gxm_tex, mag_filter); @@ -1187,7 +1135,7 @@ static unsigned int front_buffer_index_for_common_dialog = 0; struct { VITA_GXM_DisplayData displayData; - SceGxmSyncObject* sync; + SceGxmSyncObject *sync; SceGxmColorSurface surf; SceUID uid; } buffer_for_common_dialog[VITA_GXM_BUFFERS]; @@ -1196,11 +1144,11 @@ void gxm_minimal_init_for_common_dialog(void) { SceGxmInitializeParams initializeParams; SDL_zero(initializeParams); - initializeParams.flags = 0; - initializeParams.displayQueueMaxPendingCount = VITA_GXM_PENDING_SWAPS; - initializeParams.displayQueueCallback = display_callback; - initializeParams.displayQueueCallbackDataSize = sizeof(VITA_GXM_DisplayData); - initializeParams.parameterBufferSize = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; + initializeParams.flags = 0; + initializeParams.displayQueueMaxPendingCount = VITA_GXM_PENDING_SWAPS; + initializeParams.displayQueueCallback = display_callback; + initializeParams.displayQueueCallbackDataSize = sizeof(VITA_GXM_DisplayData); + initializeParams.parameterBufferSize = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; sceGxmInitialize(&initializeParams); } @@ -1211,8 +1159,7 @@ void gxm_minimal_term_for_common_dialog(void) void gxm_init_for_common_dialog(void) { - for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) - { + for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) { buffer_for_common_dialog[i].displayData.wait_vblank = SDL_TRUE; buffer_for_common_dialog[i].displayData.address = vita_mem_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, @@ -1229,8 +1176,7 @@ void gxm_init_for_common_dialog(void) VITA_GXM_SCREEN_WIDTH, VITA_GXM_SCREEN_HEIGHT, VITA_GXM_SCREEN_STRIDE, - buffer_for_common_dialog[i].displayData.address - ); + buffer_for_common_dialog[i].displayData.address); sceGxmSyncObjectCreate(&buffer_for_common_dialog[i].sync); } sceGxmDisplayQueueFinish(); @@ -1240,10 +1186,10 @@ void gxm_swap_for_common_dialog(void) { SceCommonDialogUpdateParam updateParam; SDL_zero(updateParam); - updateParam.renderTarget.colorFormat = VITA_GXM_PIXEL_FORMAT; - updateParam.renderTarget.surfaceType = SCE_GXM_COLOR_SURFACE_LINEAR; - updateParam.renderTarget.width = VITA_GXM_SCREEN_WIDTH; - updateParam.renderTarget.height = VITA_GXM_SCREEN_HEIGHT; + updateParam.renderTarget.colorFormat = VITA_GXM_PIXEL_FORMAT; + updateParam.renderTarget.surfaceType = SCE_GXM_COLOR_SURFACE_LINEAR; + updateParam.renderTarget.width = VITA_GXM_SCREEN_WIDTH; + updateParam.renderTarget.height = VITA_GXM_SCREEN_HEIGHT; updateParam.renderTarget.strideInPixels = VITA_GXM_SCREEN_STRIDE; updateParam.renderTarget.colorSurfaceData = buffer_for_common_dialog[back_buffer_index_for_common_dialog].displayData.address; @@ -1260,8 +1206,7 @@ void gxm_swap_for_common_dialog(void) void gxm_term_for_common_dialog(void) { sceGxmDisplayQueueFinish(); - for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) - { + for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) { vita_mem_free(buffer_for_common_dialog[i].uid); sceGxmSyncObjectDestroy(buffer_for_common_dialog[i].sync); } diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.h b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.h index b8db6fb..7890611 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.h +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_tools.h @@ -36,8 +36,7 @@ #include "SDL_render_vita_gxm_types.h" -void -init_orthographic_matrix(float *m, float left, float right, float bottom, float top, float near, float far); +void init_orthographic_matrix(float *m, float left, float right, float bottom, float top, float near, float far); void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size); void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment); diff --git a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_types.h b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_types.h index bb20711..63d4bd2 100644 --- a/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_types.h +++ b/modules/SDL2/src/render/vitagxm/SDL_render_vita_gxm_types.h @@ -37,35 +37,38 @@ #include -#define VITA_GXM_SCREEN_WIDTH 960 -#define VITA_GXM_SCREEN_HEIGHT 544 -#define VITA_GXM_SCREEN_STRIDE 960 +#define VITA_GXM_SCREEN_WIDTH 960 +#define VITA_GXM_SCREEN_HEIGHT 544 +#define VITA_GXM_SCREEN_STRIDE 960 -#define VITA_GXM_COLOR_FORMAT SCE_GXM_COLOR_FORMAT_A8B8G8R8 -#define VITA_GXM_PIXEL_FORMAT SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 +#define VITA_GXM_COLOR_FORMAT SCE_GXM_COLOR_FORMAT_A8B8G8R8 +#define VITA_GXM_PIXEL_FORMAT SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 -#define VITA_GXM_BUFFERS 3 -#define VITA_GXM_PENDING_SWAPS 2 -#define VITA_GXM_POOL_SIZE 2 * 1024 * 1024 +#define VITA_GXM_BUFFERS 3 +#define VITA_GXM_PENDING_SWAPS 2 +#define VITA_GXM_POOL_SIZE 2 * 1024 * 1024 typedef struct { - void *address; - Uint8 wait_vblank; + void *address; + Uint8 wait_vblank; } VITA_GXM_DisplayData; -typedef struct clear_vertex { +typedef struct clear_vertex +{ float x; float y; } clear_vertex; -typedef struct color_vertex { +typedef struct color_vertex +{ float x; float y; SDL_Color color; } color_vertex; -typedef struct texture_vertex { +typedef struct texture_vertex +{ float x; float y; float u; @@ -73,7 +76,8 @@ typedef struct texture_vertex { SDL_Color color; } texture_vertex; -typedef struct gxm_texture { +typedef struct gxm_texture +{ SceGxmTexture gxm_tex; SceUID data_UID; SceGxmRenderTarget *gxm_rendertarget; @@ -83,12 +87,14 @@ typedef struct gxm_texture { SDL_bool cdram; } gxm_texture; -typedef struct fragment_programs { +typedef struct fragment_programs +{ SceGxmFragmentProgram *color; SceGxmFragmentProgram *texture; } fragment_programs; -typedef struct blend_fragment_programs { +typedef struct blend_fragment_programs +{ fragment_programs blend_mode_none; fragment_programs blend_mode_blend; fragment_programs blend_mode_add; @@ -119,13 +125,13 @@ typedef struct typedef struct { - SDL_bool initialized; - SDL_bool drawing; + SDL_bool initialized; + SDL_bool drawing; - unsigned int psm; - unsigned int bpp; + unsigned int psm; + unsigned int bpp; - int currentBlendMode; + int currentBlendMode; VITA_GXM_DisplayData displayData; @@ -150,12 +156,12 @@ typedef struct unsigned int backBufferIndex; unsigned int frontBufferIndex; - void* pool_addr[2]; + void *pool_addr[2]; SceUID poolUid[2]; unsigned int pool_index; unsigned int current_pool; - float ortho_matrix[4*4]; + float ortho_matrix[4 * 4]; SceGxmVertexProgram *colorVertexProgram; SceGxmFragmentProgram *colorFragmentProgram; @@ -194,13 +200,13 @@ typedef struct typedef struct { - gxm_texture *tex; + gxm_texture *tex; unsigned int pitch; unsigned int w; unsigned int h; float wscale; - SDL_bool yuv; - SDL_bool nv12; + SDL_bool yuv; + SDL_bool nv12; } VITA_GXM_TextureData; #endif /* SDL_RENDER_VITA_GXM_TYPES_H */ diff --git a/modules/SDL2/src/sensor/SDL_sensor.c b/modules/SDL2/src/sensor/SDL_sensor.c index aaccd9f..6e978ac 100644 --- a/modules/SDL2/src/sensor/SDL_sensor.c +++ b/modules/SDL2/src/sensor/SDL_sensor.c @@ -51,35 +51,27 @@ static SDL_SensorDriver *SDL_sensor_drivers[] = { &SDL_DUMMY_SensorDriver #endif }; -static SDL_Sensor *SDL_sensors = NULL; -static SDL_bool SDL_updating_sensor = SDL_FALSE; static SDL_mutex *SDL_sensor_lock = NULL; /* This needs to support recursive locks */ -static SDL_atomic_t SDL_next_sensor_instance_id; +static SDL_Sensor *SDL_sensors SDL_GUARDED_BY(SDL_sensor_lock) = NULL; +static SDL_atomic_t SDL_next_sensor_instance_id SDL_GUARDED_BY(SDL_sensor_lock); +static SDL_bool SDL_updating_sensor SDL_GUARDED_BY(SDL_sensor_lock) = SDL_FALSE; -void -SDL_LockSensors(void) +void SDL_LockSensors(void) SDL_ACQUIRE(SDL_sensor_lock) { - if (SDL_sensor_lock) { - SDL_LockMutex(SDL_sensor_lock); - } + SDL_LockMutex(SDL_sensor_lock); } -void -SDL_UnlockSensors(void) +void SDL_UnlockSensors(void) SDL_RELEASE(SDL_sensor_lock) { - if (SDL_sensor_lock) { - SDL_UnlockMutex(SDL_sensor_lock); - } + SDL_UnlockMutex(SDL_sensor_lock); } - -int -SDL_SensorInit(void) +int SDL_SensorInit(void) { int i, status; /* Create the sensor list lock */ - if (!SDL_sensor_lock) { + if (SDL_sensor_lock == NULL) { SDL_sensor_lock = SDL_CreateMutex(); } @@ -101,8 +93,7 @@ SDL_SensorInit(void) /* * Count the number of sensors attached to the system */ -int -SDL_NumSensors(void) +int SDL_NumSensors(void) { int i, total_sensors = 0; SDL_LockSensors(); @@ -126,8 +117,7 @@ SDL_SensorID SDL_GetNextSensorInstanceID() * Get the driver and device index for an API device index * This should be called while the sensor lock is held, to prevent another thread from updating the list */ -static SDL_bool -SDL_GetDriverAndSensorIndex(int device_index, SDL_SensorDriver **driver, int *driver_index) +static SDL_bool SDL_GetDriverAndSensorIndex(int device_index, SDL_SensorDriver **driver, int *driver_index) { int i, num_sensors, total_sensors = 0; @@ -151,8 +141,7 @@ SDL_GetDriverAndSensorIndex(int device_index, SDL_SensorDriver **driver, int *dr /* * Get the implementation dependent name of a sensor */ -const char * -SDL_SensorGetDeviceName(int device_index) +const char *SDL_SensorGetDeviceName(int device_index) { SDL_SensorDriver *driver; const char *name = NULL; @@ -167,8 +156,7 @@ SDL_SensorGetDeviceName(int device_index) return name; } -SDL_SensorType -SDL_SensorGetDeviceType(int device_index) +SDL_SensorType SDL_SensorGetDeviceType(int device_index) { SDL_SensorDriver *driver; SDL_SensorType type = SDL_SENSOR_INVALID; @@ -182,8 +170,7 @@ SDL_SensorGetDeviceType(int device_index) return type; } -int -SDL_SensorGetDeviceNonPortableType(int device_index) +int SDL_SensorGetDeviceNonPortableType(int device_index) { SDL_SensorDriver *driver; int type = -1; @@ -197,8 +184,7 @@ SDL_SensorGetDeviceNonPortableType(int device_index) return type; } -SDL_SensorID -SDL_SensorGetDeviceInstanceID(int device_index) +SDL_SensorID SDL_SensorGetDeviceInstanceID(int device_index) { SDL_SensorDriver *driver; SDL_SensorID instance_id = -1; @@ -219,8 +205,7 @@ SDL_SensorGetDeviceInstanceID(int device_index) * * This function returns a sensor identifier, or NULL if an error occurred. */ -SDL_Sensor * -SDL_SensorOpen(int device_index) +SDL_Sensor *SDL_SensorOpen(int device_index) { SDL_SensorDriver *driver; SDL_SensorID instance_id; @@ -242,16 +227,16 @@ SDL_SensorOpen(int device_index) instance_id = driver->GetDeviceInstanceID(device_index); while (sensorlist) { if (instance_id == sensorlist->instance_id) { - sensor = sensorlist; - ++sensor->ref_count; - SDL_UnlockSensors(); - return sensor; + sensor = sensorlist; + ++sensor->ref_count; + SDL_UnlockSensors(); + return sensor; } sensorlist = sensorlist->next; } /* Create and initialize the sensor */ - sensor = (SDL_Sensor *) SDL_calloc(sizeof(*sensor), 1); + sensor = (SDL_Sensor *)SDL_calloc(sizeof(*sensor), 1); if (sensor == NULL) { SDL_OutOfMemory(); SDL_UnlockSensors(); @@ -291,8 +276,7 @@ SDL_SensorOpen(int device_index) /* * Find the SDL_Sensor that owns this instance id */ -SDL_Sensor * -SDL_SensorFromInstanceID(SDL_SensorID instance_id) +SDL_Sensor *SDL_SensorFromInstanceID(SDL_SensorID instance_id) { SDL_Sensor *sensor; @@ -309,8 +293,7 @@ SDL_SensorFromInstanceID(SDL_SensorID instance_id) /* * Checks to make sure the sensor is valid. */ -static int -SDL_PrivateSensorValid(SDL_Sensor *sensor) +static int SDL_PrivateSensorValid(SDL_Sensor *sensor) { int valid; @@ -327,8 +310,7 @@ SDL_PrivateSensorValid(SDL_Sensor *sensor) /* * Get the friendly name of this sensor */ -const char * -SDL_SensorGetName(SDL_Sensor *sensor) +const char *SDL_SensorGetName(SDL_Sensor *sensor) { if (!SDL_PrivateSensorValid(sensor)) { return NULL; @@ -340,8 +322,7 @@ SDL_SensorGetName(SDL_Sensor *sensor) /* * Get the type of this sensor */ -SDL_SensorType -SDL_SensorGetType(SDL_Sensor *sensor) +SDL_SensorType SDL_SensorGetType(SDL_Sensor *sensor) { if (!SDL_PrivateSensorValid(sensor)) { return SDL_SENSOR_INVALID; @@ -353,8 +334,7 @@ SDL_SensorGetType(SDL_Sensor *sensor) /* * Get the platform dependent type of this sensor */ -int -SDL_SensorGetNonPortableType(SDL_Sensor *sensor) +int SDL_SensorGetNonPortableType(SDL_Sensor *sensor) { if (!SDL_PrivateSensorValid(sensor)) { return -1; @@ -366,8 +346,7 @@ SDL_SensorGetNonPortableType(SDL_Sensor *sensor) /* * Get the instance id for this opened sensor */ -SDL_SensorID -SDL_SensorGetInstanceID(SDL_Sensor *sensor) +SDL_SensorID SDL_SensorGetInstanceID(SDL_Sensor *sensor) { if (!SDL_PrivateSensorValid(sensor)) { return -1; @@ -379,8 +358,7 @@ SDL_SensorGetInstanceID(SDL_Sensor *sensor) /* * Get the current state of this sensor */ -int -SDL_SensorGetData(SDL_Sensor *sensor, float *data, int num_values) +int SDL_SensorGetData(SDL_Sensor *sensor, float *data, int num_values) { return SDL_SensorGetDataWithTimestamp(sensor, NULL, data, num_values); } @@ -388,15 +366,14 @@ SDL_SensorGetData(SDL_Sensor *sensor, float *data, int num_values) /* * Get the current state of this sensor */ -int -SDL_SensorGetDataWithTimestamp(SDL_Sensor *sensor, Uint64 *timestamp, float *data, int num_values) +int SDL_SensorGetDataWithTimestamp(SDL_Sensor *sensor, Uint64 *timestamp, float *data, int num_values) { if (!SDL_PrivateSensorValid(sensor)) { return -1; } num_values = SDL_min(num_values, SDL_arraysize(sensor->data)); - SDL_memcpy(data, sensor->data, num_values*sizeof(*data)); + SDL_memcpy(data, sensor->data, num_values * sizeof(*data)); if (timestamp) { *timestamp = sensor->timestamp_us; } @@ -406,8 +383,7 @@ SDL_SensorGetDataWithTimestamp(SDL_Sensor *sensor, Uint64 *timestamp, float *dat /* * Close a sensor previously opened with SDL_SensorOpen() */ -void -SDL_SensorClose(SDL_Sensor *sensor) +void SDL_SensorClose(SDL_Sensor *sensor) { SDL_Sensor *sensorlist; SDL_Sensor *sensorlistprev; @@ -456,16 +432,15 @@ SDL_SensorClose(SDL_Sensor *sensor) SDL_UnlockSensors(); } -void -SDL_SensorQuit(void) +void SDL_SensorQuit(void) { int i; + SDL_LockSensors(); + /* Make sure we're not getting called in the middle of updating sensors */ SDL_assert(!SDL_updating_sensor); - SDL_LockSensors(); - /* Stop the event polling */ while (SDL_sensors) { SDL_sensors->ref_count = 1; @@ -474,7 +449,7 @@ SDL_SensorQuit(void) /* Quit the sensor setup */ for (i = 0; i < SDL_arraysize(SDL_sensor_drivers); ++i) { - SDL_sensor_drivers[i]->Quit(); + SDL_sensor_drivers[i]->Quit(); } SDL_UnlockSensors(); @@ -489,11 +464,9 @@ SDL_SensorQuit(void) } } - /* These are global for SDL_syssensor.c and SDL_events.c */ -int -SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data, int num_values) +int SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data, int num_values) { int posted; @@ -501,7 +474,7 @@ SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data, in /* Update internal sensor state */ num_values = SDL_min(num_values, SDL_arraysize(sensor->data)); - SDL_memcpy(sensor->data, data, num_values*sizeof(*data)); + SDL_memcpy(sensor->data, data, num_values * sizeof(*data)); sensor->timestamp_us = timestamp_us; /* Post the event, if desired */ @@ -513,7 +486,7 @@ SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data, in event.sensor.which = sensor->instance_id; num_values = SDL_min(num_values, SDL_arraysize(event.sensor.data)); SDL_memset(event.sensor.data, 0, sizeof(event.sensor.data)); - SDL_memcpy(event.sensor.data, data, num_values*sizeof(*data)); + SDL_memcpy(event.sensor.data, data, num_values * sizeof(*data)); event.sensor.timestamp_us = timestamp_us; posted = SDL_PushEvent(&event) == 1; } @@ -521,8 +494,7 @@ SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data, in return posted; } -void -SDL_SensorUpdate(void) +void SDL_SensorUpdate(void) { int i; SDL_Sensor *sensor, *next; @@ -541,15 +513,10 @@ SDL_SensorUpdate(void) SDL_updating_sensor = SDL_TRUE; - /* Make sure the list is unlocked while dispatching events to prevent application deadlocks */ - SDL_UnlockSensors(); - for (sensor = SDL_sensors; sensor; sensor = sensor->next) { sensor->driver->Update(sensor); } - SDL_LockSensors(); - SDL_updating_sensor = SDL_FALSE; /* If any sensors were closed while updating, free them here */ diff --git a/modules/SDL2/src/sensor/SDL_syssensor.h b/modules/SDL2/src/sensor/SDL_syssensor.h index c27e39c..46ed1ce 100644 --- a/modules/SDL2/src/sensor/SDL_syssensor.h +++ b/modules/SDL2/src/sensor/SDL_syssensor.h @@ -32,21 +32,21 @@ /* The SDL sensor structure */ struct _SDL_Sensor { - SDL_SensorID instance_id; /* Device instance, monotonically increasing from 0 */ - char *name; /* Sensor name - system dependent */ - SDL_SensorType type; /* Type of the sensor */ - int non_portable_type; /* Platform dependent type of the sensor */ + SDL_SensorID instance_id; /* Device instance, monotonically increasing from 0 */ + char *name; /* Sensor name - system dependent */ + SDL_SensorType type; /* Type of the sensor */ + int non_portable_type; /* Platform dependent type of the sensor */ - Uint64 timestamp_us; /* The timestamp of the last sensor update */ - float data[16]; /* The current state of the sensor */ + Uint64 timestamp_us; /* The timestamp of the last sensor update */ + float data[16]; /* The current state of the sensor */ struct _SDL_SensorDriver *driver; - struct sensor_hwdata *hwdata; /* Driver dependent information */ + struct sensor_hwdata *hwdata; /* Driver dependent information */ - int ref_count; /* Reference count for multiple opens */ + int ref_count; /* Reference count for multiple opens */ - struct _SDL_Sensor *next; /* pointer to next sensor we have allocated */ + struct _SDL_Sensor *next; /* pointer to next sensor we have allocated */ }; typedef struct _SDL_SensorDriver @@ -79,17 +79,17 @@ typedef struct _SDL_SensorDriver The sensor to open is specified by the device index. It returns 0, or -1 if there is an error. */ - int (*Open)(SDL_Sensor * sensor, int device_index); + int (*Open)(SDL_Sensor *sensor, int device_index); /* Function to update the state of a sensor - called as a device poll. * This function shouldn't update the sensor structure directly, * but instead should call SDL_PrivateSensorUpdate() to deliver events * and update sensor device state. */ - void (*Update)(SDL_Sensor * sensor); + void (*Update)(SDL_Sensor *sensor); /* Function to close a sensor after use */ - void (*Close)(SDL_Sensor * sensor); + void (*Close)(SDL_Sensor *sensor); /* Function to perform any system-specific sensor related cleanup */ void (*Quit)(void); diff --git a/modules/SDL2/src/sensor/android/SDL_androidsensor.c b/modules/SDL2/src/sensor/android/SDL_androidsensor.c index c8c519f..1b19791 100644 --- a/modules/SDL2/src/sensor/android/SDL_androidsensor.c +++ b/modules/SDL2/src/sensor/android/SDL_androidsensor.c @@ -32,10 +32,9 @@ #include "SDL_androidsensor.h" #include "../SDL_syssensor.h" #include "../SDL_sensor_c.h" -//#include "../../core/android/SDL_android.h" #ifndef LOOPER_ID_USER -#define LOOPER_ID_USER 3 +#define LOOPER_ID_USER 3 #endif typedef struct @@ -44,26 +43,25 @@ typedef struct SDL_SensorID instance_id; } SDL_AndroidSensor; -static ASensorManager* SDL_sensor_manager; -static ALooper* SDL_sensor_looper; +static ASensorManager *SDL_sensor_manager; +static ALooper *SDL_sensor_looper; static SDL_AndroidSensor *SDL_sensors; static int SDL_sensors_count; -static int -SDL_ANDROID_SensorInit(void) +static int SDL_ANDROID_SensorInit(void) { int i, sensors_count; ASensorList sensors; SDL_sensor_manager = ASensorManager_getInstance(); - if (!SDL_sensor_manager) { + if (SDL_sensor_manager == NULL) { return SDL_SetError("Couldn't create sensor manager"); } SDL_sensor_looper = ALooper_forThread(); - if (!SDL_sensor_looper) { + if (SDL_sensor_looper == NULL) { SDL_sensor_looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS); - if (!SDL_sensor_looper) { + if (SDL_sensor_looper == NULL) { return SDL_SetError("Couldn't create sensor event loop"); } } @@ -72,7 +70,7 @@ SDL_ANDROID_SensorInit(void) sensors_count = ASensorManager_getSensorList(SDL_sensor_manager, &sensors); if (sensors_count > 0) { SDL_sensors = (SDL_AndroidSensor *)SDL_calloc(sensors_count, sizeof(*SDL_sensors)); - if (!SDL_sensors) { + if (SDL_sensors == NULL) { return SDL_OutOfMemory(); } @@ -85,25 +83,21 @@ SDL_ANDROID_SensorInit(void) return 0; } -static int -SDL_ANDROID_SensorGetCount(void) +static int SDL_ANDROID_SensorGetCount(void) { return SDL_sensors_count; } -static void -SDL_ANDROID_SensorDetect(void) +static void SDL_ANDROID_SensorDetect(void) { } -static const char * -SDL_ANDROID_SensorGetDeviceName(int device_index) +static const char *SDL_ANDROID_SensorGetDeviceName(int device_index) { return ASensor_getName(SDL_sensors[device_index].asensor); } -static SDL_SensorType -SDL_ANDROID_SensorGetDeviceType(int device_index) +static SDL_SensorType SDL_ANDROID_SensorGetDeviceType(int device_index) { switch (ASensor_getType(SDL_sensors[device_index].asensor)) { case 0x00000001: @@ -115,20 +109,17 @@ SDL_ANDROID_SensorGetDeviceType(int device_index) } } -static int -SDL_ANDROID_SensorGetDeviceNonPortableType(int device_index) +static int SDL_ANDROID_SensorGetDeviceNonPortableType(int device_index) { return ASensor_getType(SDL_sensors[device_index].asensor); } -static SDL_SensorID -SDL_ANDROID_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID SDL_ANDROID_SensorGetDeviceInstanceID(int device_index) { return SDL_sensors[device_index].instance_id; } -static int -SDL_ANDROID_SensorOpen(SDL_Sensor *sensor, int device_index) +static int SDL_ANDROID_SensorOpen(SDL_Sensor *sensor, int device_index) { struct sensor_hwdata *hwdata; int delay_us, min_delay_us; @@ -163,15 +154,14 @@ SDL_ANDROID_SensorOpen(SDL_Sensor *sensor, int device_index) sensor->hwdata = hwdata; return 0; } - -static void -SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor) + +static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor) { int events; ASensorEvent event; - struct android_poll_source* source; + struct android_poll_source *source; - if (ALooper_pollAll(0, NULL, &events, (void**)&source) == LOOPER_ID_USER) { + if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) { SDL_zero(event); while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) { SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data)); @@ -179,8 +169,7 @@ SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor) } } -static void -SDL_ANDROID_SensorClose(SDL_Sensor *sensor) +static void SDL_ANDROID_SensorClose(SDL_Sensor *sensor) { if (sensor->hwdata) { ASensorEventQueue_disableSensor(sensor->hwdata->eventqueue, sensor->hwdata->asensor); @@ -190,8 +179,7 @@ SDL_ANDROID_SensorClose(SDL_Sensor *sensor) } } -static void -SDL_ANDROID_SensorQuit(void) +static void SDL_ANDROID_SensorQuit(void) { if (SDL_sensors) { SDL_free(SDL_sensors); @@ -200,8 +188,7 @@ SDL_ANDROID_SensorQuit(void) } } -SDL_SensorDriver SDL_ANDROID_SensorDriver = -{ +SDL_SensorDriver SDL_ANDROID_SensorDriver = { SDL_ANDROID_SensorInit, SDL_ANDROID_SensorGetCount, SDL_ANDROID_SensorDetect, diff --git a/modules/SDL2/src/sensor/android/SDL_androidsensor.h b/modules/SDL2/src/sensor/android/SDL_androidsensor.h index 20d61c2..64a497b 100644 --- a/modules/SDL2/src/sensor/android/SDL_androidsensor.h +++ b/modules/SDL2/src/sensor/android/SDL_androidsensor.h @@ -27,5 +27,4 @@ struct sensor_hwdata ASensorEventQueue *eventqueue; }; - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h b/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h index aeb68b5..befacdd 100644 --- a/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h +++ b/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h @@ -26,5 +26,4 @@ struct sensor_hwdata float data[3]; }; - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m b/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m index 1fb00c9..a8bfe3a 100644 --- a/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m +++ b/modules/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m @@ -42,8 +42,7 @@ static CMMotionManager *SDL_motion_manager; static SDL_CoreMotionSensor *SDL_sensors; static int SDL_sensors_count; -static int -SDL_COREMOTION_SensorInit(void) +static int SDL_COREMOTION_SensorInit(void) { int i, sensors_count = 0; @@ -80,19 +79,16 @@ SDL_COREMOTION_SensorInit(void) return 0; } -static int -SDL_COREMOTION_SensorGetCount(void) +static int SDL_COREMOTION_SensorGetCount(void) { return SDL_sensors_count; } -static void -SDL_COREMOTION_SensorDetect(void) +static void SDL_COREMOTION_SensorDetect(void) { } -static const char * -SDL_COREMOTION_SensorGetDeviceName(int device_index) +static const char *SDL_COREMOTION_SensorGetDeviceName(int device_index) { switch (SDL_sensors[device_index].type) { case SDL_SENSOR_ACCEL: @@ -104,26 +100,22 @@ SDL_COREMOTION_SensorGetDeviceName(int device_index) } } -static SDL_SensorType -SDL_COREMOTION_SensorGetDeviceType(int device_index) +static SDL_SensorType SDL_COREMOTION_SensorGetDeviceType(int device_index) { return SDL_sensors[device_index].type; } -static int -SDL_COREMOTION_SensorGetDeviceNonPortableType(int device_index) +static int SDL_COREMOTION_SensorGetDeviceNonPortableType(int device_index) { return SDL_sensors[device_index].type; } -static SDL_SensorID -SDL_COREMOTION_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID SDL_COREMOTION_SensorGetDeviceInstanceID(int device_index) { return SDL_sensors[device_index].instance_id; } -static int -SDL_COREMOTION_SensorOpen(SDL_Sensor *sensor, int device_index) +static int SDL_COREMOTION_SensorOpen(SDL_Sensor *sensor, int device_index) { struct sensor_hwdata *hwdata; @@ -133,8 +125,7 @@ SDL_COREMOTION_SensorOpen(SDL_Sensor *sensor, int device_index) } sensor->hwdata = hwdata; - switch (sensor->type) - { + switch (sensor->type) { case SDL_SENSOR_ACCEL: [SDL_motion_manager startAccelerometerUpdates]; break; @@ -146,55 +137,49 @@ SDL_COREMOTION_SensorOpen(SDL_Sensor *sensor, int device_index) } return 0; } - -static void -SDL_COREMOTION_SensorUpdate(SDL_Sensor *sensor) + +static void SDL_COREMOTION_SensorUpdate(SDL_Sensor *sensor) { - switch (sensor->type) - { + switch (sensor->type) { case SDL_SENSOR_ACCEL: - { - CMAccelerometerData *accelerometerData = SDL_motion_manager.accelerometerData; - if (accelerometerData) { - CMAcceleration acceleration = accelerometerData.acceleration; - float data[3]; - data[0] = -acceleration.x * SDL_STANDARD_GRAVITY; - data[1] = -acceleration.y * SDL_STANDARD_GRAVITY; - data[2] = -acceleration.z * SDL_STANDARD_GRAVITY; - if (SDL_memcmp(data, sensor->hwdata->data, sizeof(data)) != 0) { - SDL_PrivateSensorUpdate(sensor, 0, data, SDL_arraysize(data)); - SDL_memcpy(sensor->hwdata->data, data, sizeof(data)); - } + { + CMAccelerometerData *accelerometerData = SDL_motion_manager.accelerometerData; + if (accelerometerData) { + CMAcceleration acceleration = accelerometerData.acceleration; + float data[3]; + data[0] = -acceleration.x * SDL_STANDARD_GRAVITY; + data[1] = -acceleration.y * SDL_STANDARD_GRAVITY; + data[2] = -acceleration.z * SDL_STANDARD_GRAVITY; + if (SDL_memcmp(data, sensor->hwdata->data, sizeof(data)) != 0) { + SDL_PrivateSensorUpdate(sensor, 0, data, SDL_arraysize(data)); + SDL_memcpy(sensor->hwdata->data, data, sizeof(data)); } } - break; + } break; case SDL_SENSOR_GYRO: - { - CMGyroData *gyroData = SDL_motion_manager.gyroData; - if (gyroData) { - CMRotationRate rotationRate = gyroData.rotationRate; - float data[3]; - data[0] = rotationRate.x; - data[1] = rotationRate.y; - data[2] = rotationRate.z; - if (SDL_memcmp(data, sensor->hwdata->data, sizeof(data)) != 0) { - SDL_PrivateSensorUpdate(sensor, 0, data, SDL_arraysize(data)); - SDL_memcpy(sensor->hwdata->data, data, sizeof(data)); - } + { + CMGyroData *gyroData = SDL_motion_manager.gyroData; + if (gyroData) { + CMRotationRate rotationRate = gyroData.rotationRate; + float data[3]; + data[0] = rotationRate.x; + data[1] = rotationRate.y; + data[2] = rotationRate.z; + if (SDL_memcmp(data, sensor->hwdata->data, sizeof(data)) != 0) { + SDL_PrivateSensorUpdate(sensor, 0, data, SDL_arraysize(data)); + SDL_memcpy(sensor->hwdata->data, data, sizeof(data)); } } - break; + } break; default: break; } } -static void -SDL_COREMOTION_SensorClose(SDL_Sensor *sensor) +static void SDL_COREMOTION_SensorClose(SDL_Sensor *sensor) { if (sensor->hwdata) { - switch (sensor->type) - { + switch (sensor->type) { case SDL_SENSOR_ACCEL: [SDL_motion_manager stopAccelerometerUpdates]; break; @@ -209,13 +194,11 @@ SDL_COREMOTION_SensorClose(SDL_Sensor *sensor) } } -static void -SDL_COREMOTION_SensorQuit(void) +static void SDL_COREMOTION_SensorQuit(void) { } -SDL_SensorDriver SDL_COREMOTION_SensorDriver = -{ +SDL_SensorDriver SDL_COREMOTION_SensorDriver = { SDL_COREMOTION_SensorInit, SDL_COREMOTION_SensorGetCount, SDL_COREMOTION_SensorDetect, diff --git a/modules/SDL2/src/sensor/dummy/SDL_dummysensor.c b/modules/SDL2/src/sensor/dummy/SDL_dummysensor.c index 914f5a2..a3983e4 100644 --- a/modules/SDL2/src/sensor/dummy/SDL_dummysensor.c +++ b/modules/SDL2/src/sensor/dummy/SDL_dummysensor.c @@ -29,70 +29,58 @@ #include "SDL_dummysensor.h" #include "../SDL_syssensor.h" -static int -SDL_DUMMY_SensorInit(void) +static int SDL_DUMMY_SensorInit(void) { return 0; } -static int -SDL_DUMMY_SensorGetCount(void) +static int SDL_DUMMY_SensorGetCount(void) { return 0; } -static void -SDL_DUMMY_SensorDetect(void) +static void SDL_DUMMY_SensorDetect(void) { } -static const char * -SDL_DUMMY_SensorGetDeviceName(int device_index) +static const char *SDL_DUMMY_SensorGetDeviceName(int device_index) { return NULL; } -static SDL_SensorType -SDL_DUMMY_SensorGetDeviceType(int device_index) +static SDL_SensorType SDL_DUMMY_SensorGetDeviceType(int device_index) { return SDL_SENSOR_INVALID; } -static int -SDL_DUMMY_SensorGetDeviceNonPortableType(int device_index) +static int SDL_DUMMY_SensorGetDeviceNonPortableType(int device_index) { return -1; } -static SDL_SensorID -SDL_DUMMY_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID SDL_DUMMY_SensorGetDeviceInstanceID(int device_index) { return -1; } -static int -SDL_DUMMY_SensorOpen(SDL_Sensor *sensor, int device_index) +static int SDL_DUMMY_SensorOpen(SDL_Sensor *sensor, int device_index) { return SDL_Unsupported(); } - -static void -SDL_DUMMY_SensorUpdate(SDL_Sensor *sensor) + +static void SDL_DUMMY_SensorUpdate(SDL_Sensor *sensor) { } -static void -SDL_DUMMY_SensorClose(SDL_Sensor *sensor) +static void SDL_DUMMY_SensorClose(SDL_Sensor *sensor) { } -static void -SDL_DUMMY_SensorQuit(void) +static void SDL_DUMMY_SensorQuit(void) { } -SDL_SensorDriver SDL_DUMMY_SensorDriver = -{ +SDL_SensorDriver SDL_DUMMY_SensorDriver = { SDL_DUMMY_SensorInit, SDL_DUMMY_SensorGetCount, SDL_DUMMY_SensorDetect, diff --git a/modules/SDL2/src/sensor/n3ds/SDL_n3dssensor.c b/modules/SDL2/src/sensor/n3ds/SDL_n3dssensor.c index 8a4756a..2664758 100644 --- a/modules/SDL2/src/sensor/n3ds/SDL_n3dssensor.c +++ b/modules/SDL2/src/sensor/n3ds/SDL_n3dssensor.c @@ -48,8 +48,7 @@ IsDeviceIndexValid(int device_index) return device_index >= 0 && device_index < N3DS_SENSOR_COUNT; } -static int -N3DS_SensorInit(void) +static int N3DS_SensorInit(void) { if (InitN3DSServices() < 0) { return SDL_SetError("Failed to initialise N3DS services"); @@ -79,19 +78,16 @@ InitN3DSServices(void) return 0; } -static int -N3DS_SensorGetCount(void) +static int N3DS_SensorGetCount(void) { return N3DS_SENSOR_COUNT; } -static void -N3DS_SensorDetect(void) +static void N3DS_SensorDetect(void) { } -static const char * -N3DS_SensorGetDeviceName(int device_index) +static const char *N3DS_SensorGetDeviceName(int device_index) { if (IsDeviceIndexValid(device_index)) { switch (N3DS_sensors[device_index].type) { @@ -107,8 +103,7 @@ N3DS_SensorGetDeviceName(int device_index) return NULL; } -static SDL_SensorType -N3DS_SensorGetDeviceType(int device_index) +static SDL_SensorType N3DS_SensorGetDeviceType(int device_index) { if (IsDeviceIndexValid(device_index)) { return N3DS_sensors[device_index].type; @@ -116,14 +111,12 @@ N3DS_SensorGetDeviceType(int device_index) return SDL_SENSOR_INVALID; } -static int -N3DS_SensorGetDeviceNonPortableType(int device_index) +static int N3DS_SensorGetDeviceNonPortableType(int device_index) { - return (int) N3DS_SensorGetDeviceType(device_index); + return (int)N3DS_SensorGetDeviceType(device_index); } -static SDL_SensorID -N3DS_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID N3DS_SensorGetDeviceInstanceID(int device_index) { if (IsDeviceIndexValid(device_index)) { return N3DS_sensors[device_index].instance_id; @@ -131,14 +124,12 @@ N3DS_SensorGetDeviceInstanceID(int device_index) return -1; } -static int -N3DS_SensorOpen(SDL_Sensor *sensor, int device_index) +static int N3DS_SensorOpen(SDL_Sensor *sensor, int device_index) { return 0; } -static void -N3DS_SensorUpdate(SDL_Sensor *sensor) +static void N3DS_SensorUpdate(SDL_Sensor *sensor) { switch (sensor->type) { case SDL_SENSOR_ACCEL: @@ -162,10 +153,10 @@ UpdateN3DSAccelerometer(SDL_Sensor *sensor) hidAccelRead(¤t_state); if (SDL_memcmp(&previous_state, ¤t_state, sizeof(accelVector)) != 0) { SDL_memcpy(&previous_state, ¤t_state, sizeof(accelVector)); - data[0] = (float) current_state.x * SDL_STANDARD_GRAVITY; - data[1] = (float) current_state.y * SDL_STANDARD_GRAVITY; - data[2] = (float) current_state.z * SDL_STANDARD_GRAVITY; - SDL_PrivateSensorUpdate(sensor, 0, data, sizeof data); + data[0] = (float)current_state.x * SDL_STANDARD_GRAVITY; + data[1] = (float)current_state.y * SDL_STANDARD_GRAVITY; + data[2] = (float)current_state.z * SDL_STANDARD_GRAVITY; + SDL_PrivateSensorUpdate(sensor, 0, data, sizeof(data)); } } @@ -179,20 +170,18 @@ UpdateN3DSGyroscope(SDL_Sensor *sensor) hidGyroRead(¤t_state); if (SDL_memcmp(&previous_state, ¤t_state, sizeof(angularRate)) != 0) { SDL_memcpy(&previous_state, ¤t_state, sizeof(angularRate)); - data[0] = (float) current_state.x; - data[1] = (float) current_state.y; - data[2] = (float) current_state.z; - SDL_PrivateSensorUpdate(sensor, 0, data, sizeof data); + data[0] = (float)current_state.x; + data[1] = (float)current_state.y; + data[2] = (float)current_state.z; + SDL_PrivateSensorUpdate(sensor, 0, data, sizeof(data)); } } -static void -N3DS_SensorClose(SDL_Sensor *sensor) +static void N3DS_SensorClose(SDL_Sensor *sensor) { } -static void -N3DS_SensorQuit(void) +static void N3DS_SensorQuit(void) { HIDUSER_DisableGyroscope(); HIDUSER_DisableAccelerometer(); diff --git a/modules/SDL2/src/sensor/vita/SDL_vitasensor.c b/modules/SDL2/src/sensor/vita/SDL_vitasensor.c index 5bba67f..6513f9e 100644 --- a/modules/SDL2/src/sensor/vita/SDL_vitasensor.c +++ b/modules/SDL2/src/sensor/vita/SDL_vitasensor.c @@ -42,8 +42,7 @@ typedef struct static SDL_VitaSensor *SDL_sensors; static int SDL_sensors_count; -static int -SDL_VITA_SensorInit(void) +static int SDL_VITA_SensorInit(void) { sceMotionReset(); sceMotionStartSampling(); @@ -55,7 +54,7 @@ SDL_VITA_SensorInit(void) SDL_sensors_count = 2; SDL_sensors = (SDL_VitaSensor *)SDL_calloc(SDL_sensors_count, sizeof(*SDL_sensors)); - if (!SDL_sensors) { + if (SDL_sensors == NULL) { return SDL_OutOfMemory(); } @@ -67,36 +66,32 @@ SDL_VITA_SensorInit(void) return 0; } -static int -SDL_VITA_SensorGetCount(void) +static int SDL_VITA_SensorGetCount(void) { return SDL_sensors_count; } -static void -SDL_VITA_SensorDetect(void) +static void SDL_VITA_SensorDetect(void) { } -static const char * -SDL_VITA_SensorGetDeviceName(int device_index) +static const char *SDL_VITA_SensorGetDeviceName(int device_index) { if (device_index < SDL_sensors_count) { switch (SDL_sensors[device_index].type) { - case SDL_SENSOR_ACCEL: - return "Accelerometer"; - case SDL_SENSOR_GYRO: - return "Gyro"; - default: - return "Unknown"; + case SDL_SENSOR_ACCEL: + return "Accelerometer"; + case SDL_SENSOR_GYRO: + return "Gyro"; + default: + return "Unknown"; } } return NULL; } -static SDL_SensorType -SDL_VITA_SensorGetDeviceType(int device_index) +static SDL_SensorType SDL_VITA_SensorGetDeviceType(int device_index) { if (device_index < SDL_sensors_count) { return SDL_sensors[device_index].type; @@ -105,8 +100,7 @@ SDL_VITA_SensorGetDeviceType(int device_index) return SDL_SENSOR_INVALID; } -static int -SDL_VITA_SensorGetDeviceNonPortableType(int device_index) +static int SDL_VITA_SensorGetDeviceNonPortableType(int device_index) { if (device_index < SDL_sensors_count) { return SDL_sensors[device_index].type; @@ -114,8 +108,7 @@ SDL_VITA_SensorGetDeviceNonPortableType(int device_index) return -1; } -static SDL_SensorID -SDL_VITA_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID SDL_VITA_SensorGetDeviceInstanceID(int device_index) { if (device_index < SDL_sensors_count) { return SDL_sensors[device_index].instance_id; @@ -123,8 +116,7 @@ SDL_VITA_SensorGetDeviceInstanceID(int device_index) return -1; } -static int -SDL_VITA_SensorOpen(SDL_Sensor *sensor, int device_index) +static int SDL_VITA_SensorOpen(SDL_Sensor *sensor, int device_index) { struct sensor_hwdata *hwdata; @@ -137,23 +129,19 @@ SDL_VITA_SensorOpen(SDL_Sensor *sensor, int device_index) return 0; } -static void -SDL_VITA_SensorUpdate(SDL_Sensor *sensor) +static void SDL_VITA_SensorUpdate(SDL_Sensor *sensor) { int err = 0; SceMotionSensorState motionState[SCE_MOTION_MAX_NUM_STATES]; SDL_memset(motionState, 0, sizeof(motionState)); err = sceMotionGetSensorState(motionState, SCE_MOTION_MAX_NUM_STATES); - if (err != 0) - { + if (err != 0) { return; } - for (int i = 0; i < SCE_MOTION_MAX_NUM_STATES; i++) - { - if (sensor->hwdata->counter < motionState[i].counter) - { + for (int i = 0; i < SCE_MOTION_MAX_NUM_STATES; i++) { + if (sensor->hwdata->counter < motionState[i].counter) { unsigned int timestamp = motionState[i].timestamp; sensor->hwdata->counter = motionState[i].counter; @@ -172,46 +160,40 @@ SDL_VITA_SensorUpdate(SDL_Sensor *sensor) } sensor->hwdata->last_timestamp = timestamp; - switch (sensor->type) + switch (sensor->type) { + case SDL_SENSOR_ACCEL: { - case SDL_SENSOR_ACCEL: - { - float data[3]; - data[0] = motionState[i].accelerometer.x * SDL_STANDARD_GRAVITY; - data[1] = motionState[i].accelerometer.y * SDL_STANDARD_GRAVITY; - data[2] = motionState[i].accelerometer.z * SDL_STANDARD_GRAVITY; - SDL_PrivateSensorUpdate(sensor, sensor->hwdata->timestamp_us, data, SDL_arraysize(data)); - } - break; - case SDL_SENSOR_GYRO: - { - float data[3]; - data[0] = motionState[i].gyro.x; - data[1] = motionState[i].gyro.y; - data[2] = motionState[i].gyro.z; - SDL_PrivateSensorUpdate(sensor, sensor->hwdata->timestamp_us, data, SDL_arraysize(data)); - } - break; - default: + float data[3]; + data[0] = motionState[i].accelerometer.x * SDL_STANDARD_GRAVITY; + data[1] = motionState[i].accelerometer.y * SDL_STANDARD_GRAVITY; + data[2] = motionState[i].accelerometer.z * SDL_STANDARD_GRAVITY; + SDL_PrivateSensorUpdate(sensor, sensor->hwdata->timestamp_us, data, SDL_arraysize(data)); + } break; + case SDL_SENSOR_GYRO: + { + float data[3]; + data[0] = motionState[i].gyro.x; + data[1] = motionState[i].gyro.y; + data[2] = motionState[i].gyro.z; + SDL_PrivateSensorUpdate(sensor, sensor->hwdata->timestamp_us, data, SDL_arraysize(data)); + } break; + default: break; } } } } -static void -SDL_VITA_SensorClose(SDL_Sensor *sensor) +static void SDL_VITA_SensorClose(SDL_Sensor *sensor) { } -static void -SDL_VITA_SensorQuit(void) +static void SDL_VITA_SensorQuit(void) { sceMotionStopSampling(); } -SDL_SensorDriver SDL_VITA_SensorDriver = -{ +SDL_SensorDriver SDL_VITA_SensorDriver = { SDL_VITA_SensorInit, SDL_VITA_SensorGetCount, SDL_VITA_SensorDetect, diff --git a/modules/SDL2/src/sensor/windows/SDL_windowssensor.c b/modules/SDL2/src/sensor/windows/SDL_windowssensor.c index d7d4db4..29195a0 100644 --- a/modules/SDL2/src/sensor/windows/SDL_windowssensor.c +++ b/modules/SDL2/src/sensor/windows/SDL_windowssensor.c @@ -65,9 +65,9 @@ static SDL_Windows_Sensor *SDL_sensors; static int ConnectSensor(ISensor *sensor); static int DisconnectSensor(ISensor *sensor); -static HRESULT STDMETHODCALLTYPE ISensorManagerEventsVtbl_QueryInterface(ISensorManagerEvents * This, REFIID riid, void **ppvObject) +static HRESULT STDMETHODCALLTYPE ISensorManagerEventsVtbl_QueryInterface(ISensorManagerEvents *This, REFIID riid, void **ppvObject) { - if (!ppvObject) { + if (ppvObject == NULL) { return E_INVALIDARG; } @@ -79,17 +79,17 @@ static HRESULT STDMETHODCALLTYPE ISensorManagerEventsVtbl_QueryInterface(ISensor return E_NOINTERFACE; } -static ULONG STDMETHODCALLTYPE ISensorManagerEventsVtbl_AddRef(ISensorManagerEvents * This) +static ULONG STDMETHODCALLTYPE ISensorManagerEventsVtbl_AddRef(ISensorManagerEvents *This) { return 1; } -static ULONG STDMETHODCALLTYPE ISensorManagerEventsVtbl_Release(ISensorManagerEvents * This) +static ULONG STDMETHODCALLTYPE ISensorManagerEventsVtbl_Release(ISensorManagerEvents *This) { return 1; } -static HRESULT STDMETHODCALLTYPE ISensorManagerEventsVtbl_OnSensorEnter(ISensorManagerEvents * This, ISensor *pSensor, SensorState state) +static HRESULT STDMETHODCALLTYPE ISensorManagerEventsVtbl_OnSensorEnter(ISensorManagerEvents *This, ISensor *pSensor, SensorState state) { ConnectSensor(pSensor); return S_OK; @@ -105,9 +105,9 @@ static ISensorManagerEvents sensor_manager_events = { &sensor_manager_events_vtbl }; -static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_QueryInterface(ISensorEvents * This, REFIID riid, void **ppvObject) +static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_QueryInterface(ISensorEvents *This, REFIID riid, void **ppvObject) { - if (!ppvObject) { + if (ppvObject == NULL) { return E_INVALIDARG; } @@ -119,17 +119,17 @@ static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_QueryInterface(ISensorEvents return E_NOINTERFACE; } -static ULONG STDMETHODCALLTYPE ISensorEventsVtbl_AddRef(ISensorEvents * This) +static ULONG STDMETHODCALLTYPE ISensorEventsVtbl_AddRef(ISensorEvents *This) { return 1; } -static ULONG STDMETHODCALLTYPE ISensorEventsVtbl_Release(ISensorEvents * This) +static ULONG STDMETHODCALLTYPE ISensorEventsVtbl_Release(ISensorEvents *This) { return 1; } -static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnStateChanged(ISensorEvents * This, ISensor *pSensor, SensorState state) +static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnStateChanged(ISensorEvents *This, ISensor *pSensor, SensorState state) { #ifdef DEBUG_SENSORS int i; @@ -145,7 +145,7 @@ static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnStateChanged(ISensorEvents return S_OK; } -static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnDataUpdated(ISensorEvents * This, ISensor *pSensor, ISensorDataReport *pNewData) +static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnDataUpdated(ISensorEvents *This, ISensor *pSensor, ISensorDataReport *pNewData) { int i; @@ -202,7 +202,7 @@ static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnDataUpdated(ISensorEvents * return S_OK; } -static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnEvent(ISensorEvents * This, ISensor *pSensor, REFGUID eventID, IPortableDeviceValues *pEventData) +static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnEvent(ISensorEvents *This, ISensor *pSensor, REFGUID eventID, IPortableDeviceValues *pEventData) { #ifdef DEBUG_SENSORS int i; @@ -218,7 +218,7 @@ static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnEvent(ISensorEvents * This, return S_OK; } -static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnLeave(ISensorEvents * This, REFSENSOR_ID ID) +static HRESULT STDMETHODCALLTYPE ISensorEventsVtbl_OnLeave(ISensorEvents *This, REFSENSOR_ID ID) { int i; @@ -286,7 +286,7 @@ static int ConnectSensor(ISensor *sensor) if (bstr_name != NULL) { SysFreeString(bstr_name); } - if (!name) { + if (name == NULL) { return SDL_OutOfMemory(); } @@ -343,8 +343,7 @@ static int DisconnectSensor(ISensor *sensor) return 0; } -static int -SDL_WINDOWS_SensorInit(void) +static int SDL_WINDOWS_SensorInit(void) { HRESULT hr; ISensorCollection *sensor_collection = NULL; @@ -353,7 +352,7 @@ SDL_WINDOWS_SensorInit(void) SDL_windowscoinit = SDL_TRUE; } - hr = CoCreateInstance(&SDL_CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_SensorManager, (LPVOID *) &SDL_sensor_manager); + hr = CoCreateInstance(&SDL_CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_SensorManager, (LPVOID *)&SDL_sensor_manager); if (FAILED(hr)) { /* If we can't create a sensor manager (i.e. on Wine), we won't have any sensors, but don't fail the init */ return 0; /* WIN_SetErrorFromHRESULT("Couldn't create the sensor manager", hr); */ @@ -392,55 +391,46 @@ SDL_WINDOWS_SensorInit(void) return 0; } -static int -SDL_WINDOWS_SensorGetCount(void) +static int SDL_WINDOWS_SensorGetCount(void) { return SDL_num_sensors; } -static void -SDL_WINDOWS_SensorDetect(void) +static void SDL_WINDOWS_SensorDetect(void) { } -static const char * -SDL_WINDOWS_SensorGetDeviceName(int device_index) +static const char *SDL_WINDOWS_SensorGetDeviceName(int device_index) { return SDL_sensors[device_index].name; } -static SDL_SensorType -SDL_WINDOWS_SensorGetDeviceType(int device_index) +static SDL_SensorType SDL_WINDOWS_SensorGetDeviceType(int device_index) { return SDL_sensors[device_index].type; } -static int -SDL_WINDOWS_SensorGetDeviceNonPortableType(int device_index) +static int SDL_WINDOWS_SensorGetDeviceNonPortableType(int device_index) { return -1; } -static SDL_SensorID -SDL_WINDOWS_SensorGetDeviceInstanceID(int device_index) +static SDL_SensorID SDL_WINDOWS_SensorGetDeviceInstanceID(int device_index) { return SDL_sensors[device_index].id; } -static int -SDL_WINDOWS_SensorOpen(SDL_Sensor *sensor, int device_index) +static int SDL_WINDOWS_SensorOpen(SDL_Sensor *sensor, int device_index) { SDL_sensors[device_index].sensor_opened = sensor; return 0; } -static void -SDL_WINDOWS_SensorUpdate(SDL_Sensor *sensor) +static void SDL_WINDOWS_SensorUpdate(SDL_Sensor *sensor) { } -static void -SDL_WINDOWS_SensorClose(SDL_Sensor *sensor) +static void SDL_WINDOWS_SensorClose(SDL_Sensor *sensor) { int i; @@ -452,8 +442,7 @@ SDL_WINDOWS_SensorClose(SDL_Sensor *sensor) } } -static void -SDL_WINDOWS_SensorQuit(void) +static void SDL_WINDOWS_SensorQuit(void) { while (SDL_num_sensors > 0) { DisconnectSensor(SDL_sensors[0].sensor); @@ -470,8 +459,7 @@ SDL_WINDOWS_SensorQuit(void) } } -SDL_SensorDriver SDL_WINDOWS_SensorDriver = -{ +SDL_SensorDriver SDL_WINDOWS_SensorDriver = { SDL_WINDOWS_SensorInit, SDL_WINDOWS_SensorGetCount, SDL_WINDOWS_SensorDetect, diff --git a/modules/SDL2/src/stdlib/SDL_crc16.c b/modules/SDL2/src/stdlib/SDL_crc16.c index 12b4206..f37c2d1 100644 --- a/modules/SDL2/src/stdlib/SDL_crc16.c +++ b/modules/SDL2/src/stdlib/SDL_crc16.c @@ -38,7 +38,7 @@ static Uint16 crc16_for_byte(Uint8 r) Uint16 crc = 0; int i; for (i = 0; i < 8; ++i) { - crc = ((crc ^ r) & 1? 0xA001 : 0) ^ crc >> 1; + crc = ((crc ^ r) & 1 ? 0xA001 : 0) ^ crc >> 1; r >>= 1; } return crc; @@ -48,8 +48,8 @@ Uint16 SDL_crc16(Uint16 crc, const void *data, size_t len) { /* As an optimization we can precalculate a 256 entry table for each byte */ size_t i; - for(i = 0; i < len; ++i) { - crc = crc16_for_byte((Uint8)crc ^ ((const Uint8*)data)[i]) ^ crc >> 8; + for (i = 0; i < len; ++i) { + crc = crc16_for_byte((Uint8)crc ^ ((const Uint8 *)data)[i]) ^ crc >> 8; } return crc; } diff --git a/modules/SDL2/src/stdlib/SDL_crc32.c b/modules/SDL2/src/stdlib/SDL_crc32.c index f2533b2..f28b863 100644 --- a/modules/SDL2/src/stdlib/SDL_crc32.c +++ b/modules/SDL2/src/stdlib/SDL_crc32.c @@ -37,7 +37,7 @@ static Uint32 crc32_for_byte(Uint32 r) { int i; for (i = 0; i < 8; ++i) { - r = (r & 1? 0: (Uint32)0xEDB88320L) ^ r >> 1; + r = (r & 1 ? 0 : (Uint32)0xEDB88320L) ^ r >> 1; } return r ^ (Uint32)0xFF000000L; } @@ -46,8 +46,8 @@ Uint32 SDL_crc32(Uint32 crc, const void *data, size_t len) { /* As an optimization we can precalculate a 256 entry table for each byte */ size_t i; - for(i = 0; i < len; ++i) { - crc = crc32_for_byte((Uint8)crc ^ ((const Uint8*)data)[i]) ^ crc >> 8; + for (i = 0; i < len; ++i) { + crc = crc32_for_byte((Uint8)crc ^ ((const Uint8 *)data)[i]) ^ crc >> 8; } return crc; } diff --git a/modules/SDL2/src/stdlib/SDL_getenv.c b/modules/SDL2/src/stdlib/SDL_getenv.c index 643bffa..466867a 100644 --- a/modules/SDL2/src/stdlib/SDL_getenv.c +++ b/modules/SDL2/src/stdlib/SDL_getenv.c @@ -44,28 +44,26 @@ static size_t SDL_envmemlen = 0; /* Put a variable into the environment */ /* Note: Name may not contain a '=' character. (Reference: http://www.unix.com/man-page/Linux/3/setenv/) */ #if defined(HAVE_SETENV) -int -SDL_setenv(const char *name, const char *value, int overwrite) +int SDL_setenv(const char *name, const char *value, int overwrite) { /* Input validation */ - if (!name || *name == '\0' || SDL_strchr(name, '=') != NULL || !value) { - return (-1); + if (name == NULL || *name == '\0' || SDL_strchr(name, '=') != NULL || value == NULL) { + return -1; } - + return setenv(name, value, overwrite); } #elif defined(__WIN32__) || defined(__WINGDK__) -int -SDL_setenv(const char *name, const char *value, int overwrite) +int SDL_setenv(const char *name, const char *value, int overwrite) { /* Input validation */ - if (!name || *name == '\0' || SDL_strchr(name, '=') != NULL || !value) { - return (-1); + if (name == NULL || *name == '\0' || SDL_strchr(name, '=') != NULL || value == NULL) { + return -1; } - + if (!overwrite) { if (GetEnvironmentVariableA(name, NULL, 0) > 0) { - return 0; /* asked not to overwrite existing value. */ + return 0; /* asked not to overwrite existing value. */ } } if (!SetEnvironmentVariableA(name, *value ? value : NULL)) { @@ -75,39 +73,37 @@ SDL_setenv(const char *name, const char *value, int overwrite) } /* We have a real environment table, but no real setenv? Fake it w/ putenv. */ #elif (defined(HAVE_GETENV) && defined(HAVE_PUTENV) && !defined(HAVE_SETENV)) -int -SDL_setenv(const char *name, const char *value, int overwrite) +int SDL_setenv(const char *name, const char *value, int overwrite) { size_t len; char *new_variable; /* Input validation */ - if (!name || *name == '\0' || SDL_strchr(name, '=') != NULL || !value) { - return (-1); + if (name == NULL || *name == '\0' || SDL_strchr(name, '=') != NULL || value == NULL) { + return -1; } - + if (getenv(name) != NULL) { if (overwrite) { unsetenv(name); } else { - return 0; /* leave the existing one there. */ + return 0; /* leave the existing one there. */ } } /* This leaks. Sorry. Get a better OS so we don't have to do this. */ len = SDL_strlen(name) + SDL_strlen(value) + 2; - new_variable = (char *) SDL_malloc(len); - if (!new_variable) { - return (-1); + new_variable = (char *)SDL_malloc(len); + if (new_variable == NULL) { + return -1; } SDL_snprintf(new_variable, len, "%s=%s", name, value); return putenv(new_variable); } #else /* roll our own */ -static char **SDL_env = (char **) 0; -int -SDL_setenv(const char *name, const char *value, int overwrite) +static char **SDL_env = (char **)0; +int SDL_setenv(const char *name, const char *value, int overwrite) { int added; size_t len, i; @@ -115,8 +111,8 @@ SDL_setenv(const char *name, const char *value, int overwrite) char *new_variable; /* Input validation */ - if (!name || *name == '\0' || SDL_strchr(name, '=') != NULL || !value) { - return (-1); + if (name == NULL || *name == '\0' || SDL_strchr(name, '=') != NULL || value == NULL) { + return -1; } /* See if it already exists */ @@ -126,9 +122,9 @@ SDL_setenv(const char *name, const char *value, int overwrite) /* Allocate memory for the variable */ len = SDL_strlen(name) + SDL_strlen(value) + 2; - new_variable = (char *) SDL_malloc(len); - if (!new_variable) { - return (-1); + new_variable = (char *)SDL_malloc(len); + if (new_variable == NULL) { + return -1; } SDL_snprintf(new_variable, len, "%s=%s", name, value); @@ -160,20 +156,19 @@ SDL_setenv(const char *name, const char *value, int overwrite) if (new_env) { SDL_env = new_env; SDL_env[i++] = new_variable; - SDL_env[i++] = (char *) 0; + SDL_env[i++] = (char *)0; added = 1; } else { SDL_free(new_variable); } } - return (added ? 0 : -1); + return added ? 0 : -1; } #endif /* Retrieve a variable named "name" from the environment */ #if defined(HAVE_GETENV) -char * -SDL_getenv(const char *name) +char *SDL_getenv(const char *name) { #if defined(__ANDROID__) /* Make sure variables from the application manifest are available */ @@ -181,55 +176,53 @@ SDL_getenv(const char *name) #endif /* Input validation */ - if (!name || *name == '\0') { + if (name == NULL || *name == '\0') { return NULL; } return getenv(name); } #elif defined(__WIN32__) || defined(__WINGDK__) -char * -SDL_getenv(const char *name) +char *SDL_getenv(const char *name) { size_t bufferlen; /* Input validation */ - if (!name || *name == '\0') { + if (name == NULL || *name == '\0') { return NULL; } - + bufferlen = - GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen); + GetEnvironmentVariableA(name, SDL_envmem, (DWORD)SDL_envmemlen); if (bufferlen == 0) { return NULL; } if (bufferlen > SDL_envmemlen) { - char *newmem = (char *) SDL_realloc(SDL_envmem, bufferlen); + char *newmem = (char *)SDL_realloc(SDL_envmem, bufferlen); if (newmem == NULL) { return NULL; } SDL_envmem = newmem; SDL_envmemlen = bufferlen; - GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen); + GetEnvironmentVariableA(name, SDL_envmem, (DWORD)SDL_envmemlen); } return SDL_envmem; } #else -char * -SDL_getenv(const char *name) +char *SDL_getenv(const char *name) { size_t len, i; char *value; /* Input validation */ - if (!name || *name == '\0') { + if (name == NULL || *name == '\0') { return NULL; } - - value = (char *) 0; + + value = (char *)0; if (SDL_env) { len = SDL_strlen(name); - for (i = 0; SDL_env[i] && !value; ++i) { + for (i = 0; SDL_env[i] && value == NULL; ++i) { if ((SDL_strncmp(SDL_env[i], name, len) == 0) && (SDL_env[i][len] == '=')) { value = &SDL_env[i][len + 1]; @@ -240,12 +233,10 @@ SDL_getenv(const char *name) } #endif - #ifdef TEST_MAIN #include -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { char *value; @@ -308,7 +299,7 @@ main(int argc, char *argv[]) } else { printf("failed\n"); } - return (0); + return 0; } #endif /* TEST_MAIN */ diff --git a/modules/SDL2/src/stdlib/SDL_iconv.c b/modules/SDL2/src/stdlib/SDL_iconv.c index b22e33f..9448afc 100644 --- a/modules/SDL2/src/stdlib/SDL_iconv.c +++ b/modules/SDL2/src/stdlib/SDL_iconv.c @@ -38,29 +38,26 @@ #include #include -SDL_COMPILE_TIME_ASSERT(iconv_t, sizeof (iconv_t) <= sizeof (SDL_iconv_t)); +SDL_COMPILE_TIME_ASSERT(iconv_t, sizeof(iconv_t) <= sizeof(SDL_iconv_t)); -SDL_iconv_t -SDL_iconv_open(const char *tocode, const char *fromcode) +SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode) { - return (SDL_iconv_t) ((uintptr_t) iconv_open(tocode, fromcode)); + return (SDL_iconv_t)((uintptr_t)iconv_open(tocode, fromcode)); } -int -SDL_iconv_close(SDL_iconv_t cd) +int SDL_iconv_close(SDL_iconv_t cd) { - return iconv_close((iconv_t) ((uintptr_t) cd)); + return iconv_close((iconv_t)((uintptr_t)cd)); } -size_t -SDL_iconv(SDL_iconv_t cd, - const char **inbuf, size_t * inbytesleft, - char **outbuf, size_t * outbytesleft) +size_t SDL_iconv(SDL_iconv_t cd, + const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft) { /* iconv's second parameter may or may not be `const char const *` depending on the C runtime's whims. Casting to void * seems to make everyone happy, though. */ - const size_t retCode = iconv((iconv_t) ((uintptr_t) cd), (void *) inbuf, inbytesleft, outbuf, outbytesleft); - if (retCode == (size_t) - 1) { + const size_t retCode = iconv((iconv_t)((uintptr_t)cd), (void *)inbuf, inbytesleft, outbuf, outbytesleft); + if (retCode == (size_t)-1) { switch (errno) { case E2BIG: return SDL_ICONV_E2BIG; @@ -81,10 +78,10 @@ SDL_iconv(SDL_iconv_t cd, http://www.cl.cam.ac.uk/~mgk25/unicode.html */ -#define UNICODE_BOM 0xFEFF +#define UNICODE_BOM 0xFEFF -#define UNKNOWN_ASCII '?' -#define UNKNOWN_UNICODE 0xFFFD +#define UNKNOWN_ASCII '?' +#define UNKNOWN_UNICODE 0xFFFD enum { @@ -92,10 +89,10 @@ enum ENCODING_ASCII, ENCODING_LATIN1, ENCODING_UTF8, - ENCODING_UTF16, /* Needs byte order marker */ + ENCODING_UTF16, /* Needs byte order marker */ ENCODING_UTF16BE, ENCODING_UTF16LE, - ENCODING_UTF32, /* Needs byte order marker */ + ENCODING_UTF32, /* Needs byte order marker */ ENCODING_UTF32BE, ENCODING_UTF32LE, ENCODING_UCS2BE, @@ -104,15 +101,15 @@ enum ENCODING_UCS4LE, }; #if SDL_BYTEORDER == SDL_BIG_ENDIAN -#define ENCODING_UTF16NATIVE ENCODING_UTF16BE -#define ENCODING_UTF32NATIVE ENCODING_UTF32BE -#define ENCODING_UCS2NATIVE ENCODING_UCS2BE -#define ENCODING_UCS4NATIVE ENCODING_UCS4BE +#define ENCODING_UTF16NATIVE ENCODING_UTF16BE +#define ENCODING_UTF32NATIVE ENCODING_UTF32BE +#define ENCODING_UCS2NATIVE ENCODING_UCS2BE +#define ENCODING_UCS4NATIVE ENCODING_UCS4BE #else -#define ENCODING_UTF16NATIVE ENCODING_UTF16LE -#define ENCODING_UTF32NATIVE ENCODING_UTF32LE -#define ENCODING_UCS2NATIVE ENCODING_UCS2LE -#define ENCODING_UCS4NATIVE ENCODING_UCS4LE +#define ENCODING_UTF16NATIVE ENCODING_UTF16LE +#define ENCODING_UTF32NATIVE ENCODING_UTF32LE +#define ENCODING_UCS2NATIVE ENCODING_UCS2LE +#define ENCODING_UCS4NATIVE ENCODING_UCS4LE #endif struct _SDL_iconv_t @@ -126,7 +123,7 @@ static struct const char *name; int format; } encodings[] = { -/* *INDENT-OFF* */ /* clang-format off */ + /* *INDENT-OFF* */ /* clang-format off */ { "ASCII", ENCODING_ASCII }, { "US-ASCII", ENCODING_ASCII }, { "8859-1", ENCODING_LATIN1 }, @@ -163,23 +160,22 @@ static struct /* *INDENT-ON* */ /* clang-format on */ }; -static const char * -getlocale(char *buffer, size_t bufsize) +static const char *getlocale(char *buffer, size_t bufsize) { const char *lang; char *ptr; lang = SDL_getenv("LC_ALL"); - if (!lang) { + if (lang == NULL) { lang = SDL_getenv("LC_CTYPE"); } - if (!lang) { + if (lang == NULL) { lang = SDL_getenv("LC_MESSAGES"); } - if (!lang) { + if (lang == NULL) { lang = SDL_getenv("LANG"); } - if (!lang || !*lang || SDL_strcmp(lang, "C") == 0) { + if (lang == NULL || !*lang || SDL_strcmp(lang, "C") == 0) { lang = "ASCII"; } @@ -192,14 +188,13 @@ getlocale(char *buffer, size_t bufsize) SDL_strlcpy(buffer, lang, bufsize); ptr = SDL_strchr(buffer, '@'); if (ptr != NULL) { - *ptr = '\0'; /* chop end of string. */ + *ptr = '\0'; /* chop end of string. */ } return buffer; } -SDL_iconv_t -SDL_iconv_open(const char *tocode, const char *fromcode) +SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode) { int src_fmt = ENCODING_UNKNOWN; int dst_fmt = ENCODING_UNKNOWN; @@ -207,10 +202,10 @@ SDL_iconv_open(const char *tocode, const char *fromcode) char fromcode_buffer[64]; char tocode_buffer[64]; - if (!fromcode || !*fromcode) { + if (fromcode == NULL || !*fromcode) { fromcode = getlocale(fromcode_buffer, sizeof(fromcode_buffer)); } - if (!tocode || !*tocode) { + if (tocode == NULL || !*tocode) { tocode = getlocale(tocode_buffer, sizeof(tocode_buffer)); } for (i = 0; i < SDL_arraysize(encodings); ++i) { @@ -228,20 +223,20 @@ SDL_iconv_open(const char *tocode, const char *fromcode) } } if (src_fmt != ENCODING_UNKNOWN && dst_fmt != ENCODING_UNKNOWN) { - SDL_iconv_t cd = (SDL_iconv_t) SDL_malloc(sizeof(*cd)); + SDL_iconv_t cd = (SDL_iconv_t)SDL_malloc(sizeof(*cd)); if (cd) { cd->src_fmt = src_fmt; cd->dst_fmt = dst_fmt; return cd; } } - return (SDL_iconv_t) - 1; + return (SDL_iconv_t)-1; } size_t SDL_iconv(SDL_iconv_t cd, - const char **inbuf, size_t * inbytesleft, - char **outbuf, size_t * outbytesleft) + const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft) { /* For simplicity, we'll convert everything to and from UCS-4 */ const char *src; @@ -250,11 +245,11 @@ SDL_iconv(SDL_iconv_t cd, Uint32 ch = 0; size_t total; - if (!inbuf || !*inbuf) { + if (inbuf == NULL || !*inbuf) { /* Reset the context */ return 0; } - if (!outbuf || !*outbuf || !outbytesleft || !*outbytesleft) { + if (outbuf == NULL || !*outbuf || outbytesleft == NULL || !*outbytesleft) { return SDL_ICONV_E2BIG; } src = *inbuf; @@ -266,7 +261,7 @@ SDL_iconv(SDL_iconv_t cd, case ENCODING_UTF16: /* Scan for a byte order marker */ { - Uint8 *p = (Uint8 *) src; + Uint8 *p = (Uint8 *)src; size_t n = srclen / 2; while (n) { if (p[0] == 0xFF && p[1] == 0xFE) { @@ -288,7 +283,7 @@ SDL_iconv(SDL_iconv_t cd, case ENCODING_UTF32: /* Scan for a byte order marker */ { - Uint8 *p = (Uint8 *) src; + Uint8 *p = (Uint8 *)src; size_t n = srclen / 4; while (n) { if (p[0] == 0xFF && p[1] == 0xFE && @@ -317,7 +312,7 @@ SDL_iconv(SDL_iconv_t cd, if (dstlen < 2) { return SDL_ICONV_E2BIG; } - *(Uint16 *) dst = UNICODE_BOM; + *(Uint16 *)dst = UNICODE_BOM; dst += 2; dstlen -= 2; cd->dst_fmt = ENCODING_UTF16NATIVE; @@ -327,7 +322,7 @@ SDL_iconv(SDL_iconv_t cd, if (dstlen < 4) { return SDL_ICONV_E2BIG; } - *(Uint32 *) dst = UNICODE_BOM; + *(Uint32 *)dst = UNICODE_BOM; dst += 4; dstlen -= 4; cd->dst_fmt = ENCODING_UTF32NATIVE; @@ -339,406 +334,392 @@ SDL_iconv(SDL_iconv_t cd, /* Decode a character */ switch (cd->src_fmt) { case ENCODING_ASCII: - { - Uint8 *p = (Uint8 *) src; - ch = (Uint32) (p[0] & 0x7F); - ++src; - --srclen; - } - break; + { + Uint8 *p = (Uint8 *)src; + ch = (Uint32)(p[0] & 0x7F); + ++src; + --srclen; + } break; case ENCODING_LATIN1: - { - Uint8 *p = (Uint8 *) src; - ch = (Uint32) p[0]; - ++src; - --srclen; - } - break; - case ENCODING_UTF8: /* RFC 3629 */ - { - Uint8 *p = (Uint8 *) src; - size_t left = 0; - SDL_bool overlong = SDL_FALSE; - if (p[0] >= 0xF0) { - if ((p[0] & 0xF8) != 0xF0) { - /* Skip illegal sequences - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - } else { - if (p[0] == 0xF0 && srclen > 1 && (p[1] & 0xF0) == 0x80) { - overlong = SDL_TRUE; - } - ch = (Uint32) (p[0] & 0x07); - left = 3; - } - } else if (p[0] >= 0xE0) { - if ((p[0] & 0xF0) != 0xE0) { - /* Skip illegal sequences - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - } else { - if (p[0] == 0xE0 && srclen > 1 && (p[1] & 0xE0) == 0x80) { - overlong = SDL_TRUE; - } - ch = (Uint32) (p[0] & 0x0F); - left = 2; - } - } else if (p[0] >= 0xC0) { - if ((p[0] & 0xE0) != 0xC0) { - /* Skip illegal sequences - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - } else { - if ((p[0] & 0xDE) == 0xC0) { - overlong = SDL_TRUE; - } - ch = (Uint32) (p[0] & 0x1F); - left = 1; - } - } else { - if ((p[0] & 0x80) != 0x00) { - /* Skip illegal sequences - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - } else { - ch = (Uint32) p[0]; - } - } - ++src; - --srclen; - if (srclen < left) { - return SDL_ICONV_EINVAL; - } - while (left--) { - ++p; - if ((p[0] & 0xC0) != 0x80) { - /* Skip illegal sequences - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - break; - } - ch <<= 6; - ch |= (p[0] & 0x3F); - ++src; - --srclen; - } - if (overlong) { - /* Potential security risk - return SDL_ICONV_EILSEQ; - */ - ch = UNKNOWN_UNICODE; - } - if ((ch >= 0xD800 && ch <= 0xDFFF) || - (ch == 0xFFFE || ch == 0xFFFF) || ch > 0x10FFFF) { + { + Uint8 *p = (Uint8 *)src; + ch = (Uint32)p[0]; + ++src; + --srclen; + } break; + case ENCODING_UTF8: /* RFC 3629 */ + { + Uint8 *p = (Uint8 *)src; + size_t left = 0; + SDL_bool overlong = SDL_FALSE; + if (p[0] >= 0xF0) { + if ((p[0] & 0xF8) != 0xF0) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ ch = UNKNOWN_UNICODE; + } else { + if (p[0] == 0xF0 && srclen > 1 && (p[1] & 0xF0) == 0x80) { + overlong = SDL_TRUE; + } + ch = (Uint32)(p[0] & 0x07); + left = 3; } - } - break; - case ENCODING_UTF16BE: /* RFC 2781 */ - { - Uint8 *p = (Uint8 *) src; - Uint16 W1, W2; - if (srclen < 2) { - return SDL_ICONV_EINVAL; - } - W1 = ((Uint16) p[0] << 8) | (Uint16) p[1]; - src += 2; - srclen -= 2; - if (W1 < 0xD800 || W1 > 0xDFFF) { - ch = (Uint32) W1; - break; - } - if (W1 > 0xDBFF) { + } else if (p[0] >= 0xE0) { + if ((p[0] & 0xF0) != 0xE0) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ ch = UNKNOWN_UNICODE; - break; - } - if (srclen < 2) { - return SDL_ICONV_EINVAL; + } else { + if (p[0] == 0xE0 && srclen > 1 && (p[1] & 0xE0) == 0x80) { + overlong = SDL_TRUE; + } + ch = (Uint32)(p[0] & 0x0F); + left = 2; } - p = (Uint8 *) src; - W2 = ((Uint16) p[0] << 8) | (Uint16) p[1]; - src += 2; - srclen -= 2; - if (W2 < 0xDC00 || W2 > 0xDFFF) { + } else if (p[0] >= 0xC0) { + if ((p[0] & 0xE0) != 0xC0) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ ch = UNKNOWN_UNICODE; - break; - } - ch = (((Uint32) (W1 & 0x3FF) << 10) | - (Uint32) (W2 & 0x3FF)) + 0x10000; - } - break; - case ENCODING_UTF16LE: /* RFC 2781 */ - { - Uint8 *p = (Uint8 *) src; - Uint16 W1, W2; - if (srclen < 2) { - return SDL_ICONV_EINVAL; - } - W1 = ((Uint16) p[1] << 8) | (Uint16) p[0]; - src += 2; - srclen -= 2; - if (W1 < 0xD800 || W1 > 0xDFFF) { - ch = (Uint32) W1; - break; + } else { + if ((p[0] & 0xDE) == 0xC0) { + overlong = SDL_TRUE; + } + ch = (Uint32)(p[0] & 0x1F); + left = 1; } - if (W1 > 0xDBFF) { + } else { + if (p[0] & 0x80) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ ch = UNKNOWN_UNICODE; - break; - } - if (srclen < 2) { - return SDL_ICONV_EINVAL; + } else { + ch = (Uint32)p[0]; } - p = (Uint8 *) src; - W2 = ((Uint16) p[1] << 8) | (Uint16) p[0]; - src += 2; - srclen -= 2; - if (W2 < 0xDC00 || W2 > 0xDFFF) { + } + ++src; + --srclen; + if (srclen < left) { + return SDL_ICONV_EINVAL; + } + while (left--) { + ++p; + if ((p[0] & 0xC0) != 0x80) { /* Skip illegal sequences return SDL_ICONV_EILSEQ; */ ch = UNKNOWN_UNICODE; break; } - ch = (((Uint32) (W1 & 0x3FF) << 10) | - (Uint32) (W2 & 0x3FF)) + 0x10000; + ch <<= 6; + ch |= (p[0] & 0x3F); + ++src; + --srclen; } - break; + if (overlong) { + /* Potential security risk + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + } + if ((ch >= 0xD800 && ch <= 0xDFFF) || + (ch == 0xFFFE || ch == 0xFFFF) || ch > 0x10FFFF) { + /* Skip illegal sequences + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + } + } break; + case ENCODING_UTF16BE: /* RFC 2781 */ + { + Uint8 *p = (Uint8 *)src; + Uint16 W1, W2; + if (srclen < 2) { + return SDL_ICONV_EINVAL; + } + W1 = ((Uint16)p[0] << 8) | (Uint16)p[1]; + src += 2; + srclen -= 2; + if (W1 < 0xD800 || W1 > 0xDFFF) { + ch = (Uint32)W1; + break; + } + if (W1 > 0xDBFF) { + /* Skip illegal sequences + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + break; + } + if (srclen < 2) { + return SDL_ICONV_EINVAL; + } + p = (Uint8 *)src; + W2 = ((Uint16)p[0] << 8) | (Uint16)p[1]; + src += 2; + srclen -= 2; + if (W2 < 0xDC00 || W2 > 0xDFFF) { + /* Skip illegal sequences + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + break; + } + ch = (((Uint32)(W1 & 0x3FF) << 10) | + (Uint32)(W2 & 0x3FF)) + + 0x10000; + } break; + case ENCODING_UTF16LE: /* RFC 2781 */ + { + Uint8 *p = (Uint8 *)src; + Uint16 W1, W2; + if (srclen < 2) { + return SDL_ICONV_EINVAL; + } + W1 = ((Uint16)p[1] << 8) | (Uint16)p[0]; + src += 2; + srclen -= 2; + if (W1 < 0xD800 || W1 > 0xDFFF) { + ch = (Uint32)W1; + break; + } + if (W1 > 0xDBFF) { + /* Skip illegal sequences + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + break; + } + if (srclen < 2) { + return SDL_ICONV_EINVAL; + } + p = (Uint8 *)src; + W2 = ((Uint16)p[1] << 8) | (Uint16)p[0]; + src += 2; + srclen -= 2; + if (W2 < 0xDC00 || W2 > 0xDFFF) { + /* Skip illegal sequences + return SDL_ICONV_EILSEQ; + */ + ch = UNKNOWN_UNICODE; + break; + } + ch = (((Uint32)(W1 & 0x3FF) << 10) | + (Uint32)(W2 & 0x3FF)) + + 0x10000; + } break; case ENCODING_UCS2LE: - { - Uint8 *p = (Uint8 *) src; - if (srclen < 2) { - return SDL_ICONV_EINVAL; - } - ch = ((Uint32) p[1] << 8) | (Uint32) p[0]; - src += 2; - srclen -= 2; + { + Uint8 *p = (Uint8 *)src; + if (srclen < 2) { + return SDL_ICONV_EINVAL; } - break; + ch = ((Uint32)p[1] << 8) | (Uint32)p[0]; + src += 2; + srclen -= 2; + } break; case ENCODING_UCS2BE: - { - Uint8 *p = (Uint8 *) src; - if (srclen < 2) { - return SDL_ICONV_EINVAL; - } - ch = ((Uint32) p[0] << 8) | (Uint32) p[1]; - src += 2; - srclen -= 2; + { + Uint8 *p = (Uint8 *)src; + if (srclen < 2) { + return SDL_ICONV_EINVAL; } - break; + ch = ((Uint32)p[0] << 8) | (Uint32)p[1]; + src += 2; + srclen -= 2; + } break; case ENCODING_UCS4BE: case ENCODING_UTF32BE: - { - Uint8 *p = (Uint8 *) src; - if (srclen < 4) { - return SDL_ICONV_EINVAL; - } - ch = ((Uint32) p[0] << 24) | - ((Uint32) p[1] << 16) | - ((Uint32) p[2] << 8) | (Uint32) p[3]; - src += 4; - srclen -= 4; + { + Uint8 *p = (Uint8 *)src; + if (srclen < 4) { + return SDL_ICONV_EINVAL; } - break; + ch = ((Uint32)p[0] << 24) | + ((Uint32)p[1] << 16) | + ((Uint32)p[2] << 8) | (Uint32)p[3]; + src += 4; + srclen -= 4; + } break; case ENCODING_UCS4LE: case ENCODING_UTF32LE: - { - Uint8 *p = (Uint8 *) src; - if (srclen < 4) { - return SDL_ICONV_EINVAL; - } - ch = ((Uint32) p[3] << 24) | - ((Uint32) p[2] << 16) | - ((Uint32) p[1] << 8) | (Uint32) p[0]; - src += 4; - srclen -= 4; + { + Uint8 *p = (Uint8 *)src; + if (srclen < 4) { + return SDL_ICONV_EINVAL; } - break; + ch = ((Uint32)p[3] << 24) | + ((Uint32)p[2] << 16) | + ((Uint32)p[1] << 8) | (Uint32)p[0]; + src += 4; + srclen -= 4; + } break; } /* Encode a character */ switch (cd->dst_fmt) { case ENCODING_ASCII: - { - Uint8 *p = (Uint8 *) dst; - if (dstlen < 1) { - return SDL_ICONV_E2BIG; - } - if (ch > 0x7F) { - *p = UNKNOWN_ASCII; - } else { - *p = (Uint8) ch; - } - ++dst; - --dstlen; + { + Uint8 *p = (Uint8 *)dst; + if (dstlen < 1) { + return SDL_ICONV_E2BIG; } - break; + if (ch > 0x7F) { + *p = UNKNOWN_ASCII; + } else { + *p = (Uint8)ch; + } + ++dst; + --dstlen; + } break; case ENCODING_LATIN1: - { - Uint8 *p = (Uint8 *) dst; + { + Uint8 *p = (Uint8 *)dst; + if (dstlen < 1) { + return SDL_ICONV_E2BIG; + } + if (ch > 0xFF) { + *p = UNKNOWN_ASCII; + } else { + *p = (Uint8)ch; + } + ++dst; + --dstlen; + } break; + case ENCODING_UTF8: /* RFC 3629 */ + { + Uint8 *p = (Uint8 *)dst; + if (ch > 0x10FFFF) { + ch = UNKNOWN_UNICODE; + } + if (ch <= 0x7F) { if (dstlen < 1) { return SDL_ICONV_E2BIG; } - if (ch > 0xFF) { - *p = UNKNOWN_ASCII; - } else { - *p = (Uint8) ch; - } + *p = (Uint8)ch; ++dst; --dstlen; - } - break; - case ENCODING_UTF8: /* RFC 3629 */ - { - Uint8 *p = (Uint8 *) dst; - if (ch > 0x10FFFF) { - ch = UNKNOWN_UNICODE; - } - if (ch <= 0x7F) { - if (dstlen < 1) { - return SDL_ICONV_E2BIG; - } - *p = (Uint8) ch; - ++dst; - --dstlen; - } else if (ch <= 0x7FF) { - if (dstlen < 2) { - return SDL_ICONV_E2BIG; - } - p[0] = 0xC0 | (Uint8) ((ch >> 6) & 0x1F); - p[1] = 0x80 | (Uint8) (ch & 0x3F); - dst += 2; - dstlen -= 2; - } else if (ch <= 0xFFFF) { - if (dstlen < 3) { - return SDL_ICONV_E2BIG; - } - p[0] = 0xE0 | (Uint8) ((ch >> 12) & 0x0F); - p[1] = 0x80 | (Uint8) ((ch >> 6) & 0x3F); - p[2] = 0x80 | (Uint8) (ch & 0x3F); - dst += 3; - dstlen -= 3; - } else { - if (dstlen < 4) { - return SDL_ICONV_E2BIG; - } - p[0] = 0xF0 | (Uint8) ((ch >> 18) & 0x07); - p[1] = 0x80 | (Uint8) ((ch >> 12) & 0x3F); - p[2] = 0x80 | (Uint8) ((ch >> 6) & 0x3F); - p[3] = 0x80 | (Uint8) (ch & 0x3F); - dst += 4; - dstlen -= 4; + } else if (ch <= 0x7FF) { + if (dstlen < 2) { + return SDL_ICONV_E2BIG; } - } - break; - case ENCODING_UTF16BE: /* RFC 2781 */ - { - Uint8 *p = (Uint8 *) dst; - if (ch > 0x10FFFF) { - ch = UNKNOWN_UNICODE; + p[0] = 0xC0 | (Uint8)((ch >> 6) & 0x1F); + p[1] = 0x80 | (Uint8)(ch & 0x3F); + dst += 2; + dstlen -= 2; + } else if (ch <= 0xFFFF) { + if (dstlen < 3) { + return SDL_ICONV_E2BIG; } - if (ch < 0x10000) { - if (dstlen < 2) { - return SDL_ICONV_E2BIG; - } - p[0] = (Uint8) (ch >> 8); - p[1] = (Uint8) ch; - dst += 2; - dstlen -= 2; - } else { - Uint16 W1, W2; - if (dstlen < 4) { - return SDL_ICONV_E2BIG; - } - ch = ch - 0x10000; - W1 = 0xD800 | (Uint16) ((ch >> 10) & 0x3FF); - W2 = 0xDC00 | (Uint16) (ch & 0x3FF); - p[0] = (Uint8) (W1 >> 8); - p[1] = (Uint8) W1; - p[2] = (Uint8) (W2 >> 8); - p[3] = (Uint8) W2; - dst += 4; - dstlen -= 4; + p[0] = 0xE0 | (Uint8)((ch >> 12) & 0x0F); + p[1] = 0x80 | (Uint8)((ch >> 6) & 0x3F); + p[2] = 0x80 | (Uint8)(ch & 0x3F); + dst += 3; + dstlen -= 3; + } else { + if (dstlen < 4) { + return SDL_ICONV_E2BIG; } + p[0] = 0xF0 | (Uint8)((ch >> 18) & 0x07); + p[1] = 0x80 | (Uint8)((ch >> 12) & 0x3F); + p[2] = 0x80 | (Uint8)((ch >> 6) & 0x3F); + p[3] = 0x80 | (Uint8)(ch & 0x3F); + dst += 4; + dstlen -= 4; } - break; - case ENCODING_UTF16LE: /* RFC 2781 */ - { - Uint8 *p = (Uint8 *) dst; - if (ch > 0x10FFFF) { - ch = UNKNOWN_UNICODE; - } - if (ch < 0x10000) { - if (dstlen < 2) { - return SDL_ICONV_E2BIG; - } - p[1] = (Uint8) (ch >> 8); - p[0] = (Uint8) ch; - dst += 2; - dstlen -= 2; - } else { - Uint16 W1, W2; - if (dstlen < 4) { - return SDL_ICONV_E2BIG; - } - ch = ch - 0x10000; - W1 = 0xD800 | (Uint16) ((ch >> 10) & 0x3FF); - W2 = 0xDC00 | (Uint16) (ch & 0x3FF); - p[1] = (Uint8) (W1 >> 8); - p[0] = (Uint8) W1; - p[3] = (Uint8) (W2 >> 8); - p[2] = (Uint8) W2; - dst += 4; - dstlen -= 4; - } + } break; + case ENCODING_UTF16BE: /* RFC 2781 */ + { + Uint8 *p = (Uint8 *)dst; + if (ch > 0x10FFFF) { + ch = UNKNOWN_UNICODE; } - break; - case ENCODING_UCS2BE: - { - Uint8 *p = (Uint8 *) dst; - if (ch > 0xFFFF) { - ch = UNKNOWN_UNICODE; - } + if (ch < 0x10000) { if (dstlen < 2) { return SDL_ICONV_E2BIG; } - p[0] = (Uint8) (ch >> 8); - p[1] = (Uint8) ch; + p[0] = (Uint8)(ch >> 8); + p[1] = (Uint8)ch; dst += 2; dstlen -= 2; - } - break; - case ENCODING_UCS2LE: - { - Uint8 *p = (Uint8 *) dst; - if (ch > 0xFFFF) { - ch = UNKNOWN_UNICODE; + } else { + Uint16 W1, W2; + if (dstlen < 4) { + return SDL_ICONV_E2BIG; } + ch = ch - 0x10000; + W1 = 0xD800 | (Uint16)((ch >> 10) & 0x3FF); + W2 = 0xDC00 | (Uint16)(ch & 0x3FF); + p[0] = (Uint8)(W1 >> 8); + p[1] = (Uint8)W1; + p[2] = (Uint8)(W2 >> 8); + p[3] = (Uint8)W2; + dst += 4; + dstlen -= 4; + } + } break; + case ENCODING_UTF16LE: /* RFC 2781 */ + { + Uint8 *p = (Uint8 *)dst; + if (ch > 0x10FFFF) { + ch = UNKNOWN_UNICODE; + } + if (ch < 0x10000) { if (dstlen < 2) { return SDL_ICONV_E2BIG; } - p[1] = (Uint8) (ch >> 8); - p[0] = (Uint8) ch; + p[1] = (Uint8)(ch >> 8); + p[0] = (Uint8)ch; dst += 2; dstlen -= 2; + } else { + Uint16 W1, W2; + if (dstlen < 4) { + return SDL_ICONV_E2BIG; + } + ch = ch - 0x10000; + W1 = 0xD800 | (Uint16)((ch >> 10) & 0x3FF); + W2 = 0xDC00 | (Uint16)(ch & 0x3FF); + p[1] = (Uint8)(W1 >> 8); + p[0] = (Uint8)W1; + p[3] = (Uint8)(W2 >> 8); + p[2] = (Uint8)W2; + dst += 4; + dstlen -= 4; } - break; + } break; + case ENCODING_UCS2BE: + { + Uint8 *p = (Uint8 *)dst; + if (ch > 0xFFFF) { + ch = UNKNOWN_UNICODE; + } + if (dstlen < 2) { + return SDL_ICONV_E2BIG; + } + p[0] = (Uint8)(ch >> 8); + p[1] = (Uint8)ch; + dst += 2; + dstlen -= 2; + } break; + case ENCODING_UCS2LE: + { + Uint8 *p = (Uint8 *)dst; + if (ch > 0xFFFF) { + ch = UNKNOWN_UNICODE; + } + if (dstlen < 2) { + return SDL_ICONV_E2BIG; + } + p[1] = (Uint8)(ch >> 8); + p[0] = (Uint8)ch; + dst += 2; + dstlen -= 2; + } break; case ENCODING_UTF32BE: if (ch > 0x10FFFF) { ch = UNKNOWN_UNICODE; @@ -749,14 +730,14 @@ SDL_iconv(SDL_iconv_t cd, ch = UNKNOWN_UNICODE; } { - Uint8 *p = (Uint8 *) dst; + Uint8 *p = (Uint8 *)dst; if (dstlen < 4) { return SDL_ICONV_E2BIG; } - p[0] = (Uint8) (ch >> 24); - p[1] = (Uint8) (ch >> 16); - p[2] = (Uint8) (ch >> 8); - p[3] = (Uint8) ch; + p[0] = (Uint8)(ch >> 24); + p[1] = (Uint8)(ch >> 16); + p[2] = (Uint8)(ch >> 8); + p[3] = (Uint8)ch; dst += 4; dstlen -= 4; } @@ -771,14 +752,14 @@ SDL_iconv(SDL_iconv_t cd, ch = UNKNOWN_UNICODE; } { - Uint8 *p = (Uint8 *) dst; + Uint8 *p = (Uint8 *)dst; if (dstlen < 4) { return SDL_ICONV_E2BIG; } - p[3] = (Uint8) (ch >> 24); - p[2] = (Uint8) (ch >> 16); - p[1] = (Uint8) (ch >> 8); - p[0] = (Uint8) ch; + p[3] = (Uint8)(ch >> 24); + p[2] = (Uint8)(ch >> 16); + p[1] = (Uint8)(ch >> 8); + p[0] = (Uint8)ch; dst += 4; dstlen -= 4; } @@ -795,8 +776,7 @@ SDL_iconv(SDL_iconv_t cd, return total; } -int -SDL_iconv_close(SDL_iconv_t cd) +int SDL_iconv_close(SDL_iconv_t cd) { if (cd != (SDL_iconv_t)-1) { SDL_free(cd); @@ -806,9 +786,7 @@ SDL_iconv_close(SDL_iconv_t cd) #endif /* !HAVE_ICONV */ -char * -SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, - size_t inbytesleft) +char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft) { SDL_iconv_t cd; char *string; @@ -818,23 +796,23 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t retCode = 0; cd = SDL_iconv_open(tocode, fromcode); - if (cd == (SDL_iconv_t) - 1) { + if (cd == (SDL_iconv_t)-1) { /* See if we can recover here (fixes iconv on Solaris 11) */ - if (!tocode || !*tocode) { + if (tocode == NULL || !*tocode) { tocode = "UTF-8"; } - if (!fromcode || !*fromcode) { + if (fromcode == NULL || !*fromcode) { fromcode = "UTF-8"; } cd = SDL_iconv_open(tocode, fromcode); } - if (cd == (SDL_iconv_t) - 1) { + if (cd == (SDL_iconv_t)-1) { return NULL; } stringsize = inbytesleft > 4 ? inbytesleft : 4; - string = (char *) SDL_malloc(stringsize); - if (!string) { + string = (char *)SDL_malloc(stringsize + 1); + if (string == NULL) { SDL_iconv_close(cd); return NULL; } @@ -847,20 +825,20 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, retCode = SDL_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); switch (retCode) { case SDL_ICONV_E2BIG: - { - char *oldstring = string; - stringsize *= 2; - string = (char *) SDL_realloc(string, stringsize); - if (!string) { - SDL_free(oldstring); - SDL_iconv_close(cd); - return NULL; - } - outbuf = string + (outbuf - oldstring); - outbytesleft = stringsize - (outbuf - string); - SDL_memset(outbuf, 0, 4); + { + char *oldstring = string; + stringsize *= 2; + string = (char *)SDL_realloc(string, stringsize + 1); + if (string == NULL) { + SDL_free(oldstring); + SDL_iconv_close(cd); + return NULL; } - break; + outbuf = string + (outbuf - oldstring); + outbytesleft = stringsize - (outbuf - string); + SDL_memset(outbuf, 0, 4); + continue; + } case SDL_ICONV_EILSEQ: /* Try skipping some input data - not perfect, but... */ ++inbuf; @@ -877,6 +855,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, break; } } + *outbuf = '\0'; SDL_iconv_close(cd); return string; diff --git a/modules/SDL2/src/stdlib/SDL_malloc.c b/modules/SDL2/src/stdlib/SDL_malloc.c index 07d95fa..c1aa444 100644 --- a/modules/SDL2/src/stdlib/SDL_malloc.c +++ b/modules/SDL2/src/stdlib/SDL_malloc.c @@ -405,9 +405,9 @@ MALLINFO_FIELD_TYPE default: size_t size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set REALLOC_ZERO_BYTES_FREES default: not defined - This should be set if a call to realloc with zero bytes should - be the same as a call to free. Some people think it should. Otherwise, - since this malloc returns a unique pointer for malloc(0), so does + This should be set if a call to realloc with zero bytes should + be the same as a call to free. Some people think it should. Otherwise, + since this malloc returns a unique pointer for malloc(0), so does realloc(p, 0). LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H @@ -483,9 +483,8 @@ DEFAULT_MMAP_THRESHOLD default: 256K #ifndef WIN32 #ifdef _WIN32 #define WIN32 1 -#endif /* _WIN32 */ -#endif /* WIN32 */ - +#endif /* _WIN32 */ +#endif /* WIN32 */ #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN @@ -502,8 +501,8 @@ DEFAULT_MMAP_THRESHOLD default: 256K #define LACKS_ERRNO_H #define LACKS_FCNTL_H #define MALLOC_FAILURE_ACTION -#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ -#endif /* WIN32 */ +#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ +#endif /* WIN32 */ #ifdef __OS2__ #define INCL_DOS @@ -518,113 +517,113 @@ DEFAULT_MMAP_THRESHOLD default: 256K #ifndef HAVE_MORECORE #define HAVE_MORECORE 0 #define HAVE_MMAP 1 -#endif /* HAVE_MORECORE */ -#endif /* DARWIN */ +#endif /* HAVE_MORECORE */ +#endif /* DARWIN */ #ifndef LACKS_SYS_TYPES_H -#include /* For size_t */ -#endif /* LACKS_SYS_TYPES_H */ +#include /* For size_t */ +#endif /* LACKS_SYS_TYPES_H */ /* The maximum possible size_t value has all bits set */ #define MAX_SIZE_T (~(size_t)0) #ifndef ONLY_MSPACES #define ONLY_MSPACES 0 -#endif /* ONLY_MSPACES */ +#endif /* ONLY_MSPACES */ #ifndef MSPACES #if ONLY_MSPACES #define MSPACES 1 -#else /* ONLY_MSPACES */ +#else /* ONLY_MSPACES */ #define MSPACES 0 -#endif /* ONLY_MSPACES */ -#endif /* MSPACES */ +#endif /* ONLY_MSPACES */ +#endif /* MSPACES */ #ifndef MALLOC_ALIGNMENT #define MALLOC_ALIGNMENT ((size_t)8U) -#endif /* MALLOC_ALIGNMENT */ +#endif /* MALLOC_ALIGNMENT */ #ifndef FOOTERS #define FOOTERS 0 -#endif /* FOOTERS */ +#endif /* FOOTERS */ #ifndef ABORT #define ABORT abort() -#endif /* ABORT */ +#endif /* ABORT */ #ifndef ABORT_ON_ASSERT_FAILURE #define ABORT_ON_ASSERT_FAILURE 1 -#endif /* ABORT_ON_ASSERT_FAILURE */ +#endif /* ABORT_ON_ASSERT_FAILURE */ #ifndef PROCEED_ON_ERROR #define PROCEED_ON_ERROR 0 -#endif /* PROCEED_ON_ERROR */ +#endif /* PROCEED_ON_ERROR */ #ifndef USE_LOCKS #define USE_LOCKS 0 -#endif /* USE_LOCKS */ +#endif /* USE_LOCKS */ #ifndef INSECURE #define INSECURE 0 -#endif /* INSECURE */ +#endif /* INSECURE */ #ifndef HAVE_MMAP #define HAVE_MMAP 1 -#endif /* HAVE_MMAP */ +#endif /* HAVE_MMAP */ #ifndef MMAP_CLEARS #define MMAP_CLEARS 1 -#endif /* MMAP_CLEARS */ +#endif /* MMAP_CLEARS */ #ifndef HAVE_MREMAP #ifdef linux #define HAVE_MREMAP 1 -#else /* linux */ +#else /* linux */ #define HAVE_MREMAP 0 -#endif /* linux */ -#endif /* HAVE_MREMAP */ +#endif /* linux */ +#endif /* HAVE_MREMAP */ #ifndef MALLOC_FAILURE_ACTION #define MALLOC_FAILURE_ACTION errno = ENOMEM; -#endif /* MALLOC_FAILURE_ACTION */ +#endif /* MALLOC_FAILURE_ACTION */ #ifndef HAVE_MORECORE #if ONLY_MSPACES #define HAVE_MORECORE 0 -#else /* ONLY_MSPACES */ +#else /* ONLY_MSPACES */ #define HAVE_MORECORE 1 -#endif /* ONLY_MSPACES */ -#endif /* HAVE_MORECORE */ +#endif /* ONLY_MSPACES */ +#endif /* HAVE_MORECORE */ #if !HAVE_MORECORE #define MORECORE_CONTIGUOUS 0 -#else /* !HAVE_MORECORE */ +#else /* !HAVE_MORECORE */ #ifndef MORECORE #define MORECORE sbrk -#endif /* MORECORE */ +#endif /* MORECORE */ #ifndef MORECORE_CONTIGUOUS #define MORECORE_CONTIGUOUS 1 -#endif /* MORECORE_CONTIGUOUS */ -#endif /* HAVE_MORECORE */ +#endif /* MORECORE_CONTIGUOUS */ +#endif /* HAVE_MORECORE */ #ifndef DEFAULT_GRANULARITY #if MORECORE_CONTIGUOUS -#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ -#else /* MORECORE_CONTIGUOUS */ +#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ +#else /* MORECORE_CONTIGUOUS */ #define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U) -#endif /* MORECORE_CONTIGUOUS */ -#endif /* DEFAULT_GRANULARITY */ +#endif /* MORECORE_CONTIGUOUS */ +#endif /* DEFAULT_GRANULARITY */ #ifndef DEFAULT_TRIM_THRESHOLD #ifndef MORECORE_CANNOT_TRIM #define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) -#else /* MORECORE_CANNOT_TRIM */ +#else /* MORECORE_CANNOT_TRIM */ #define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T -#endif /* MORECORE_CANNOT_TRIM */ -#endif /* DEFAULT_TRIM_THRESHOLD */ +#endif /* MORECORE_CANNOT_TRIM */ +#endif /* DEFAULT_TRIM_THRESHOLD */ #ifndef DEFAULT_MMAP_THRESHOLD #if HAVE_MMAP #define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) -#else /* HAVE_MMAP */ +#else /* HAVE_MMAP */ #define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T -#endif /* HAVE_MMAP */ -#endif /* DEFAULT_MMAP_THRESHOLD */ +#endif /* HAVE_MMAP */ +#endif /* DEFAULT_MMAP_THRESHOLD */ #ifndef USE_BUILTIN_FFS #define USE_BUILTIN_FFS 0 -#endif /* USE_BUILTIN_FFS */ +#endif /* USE_BUILTIN_FFS */ #ifndef USE_DEV_RANDOM #define USE_DEV_RANDOM 0 -#endif /* USE_DEV_RANDOM */ +#endif /* USE_DEV_RANDOM */ #ifndef NO_MALLINFO #define NO_MALLINFO 0 -#endif /* NO_MALLINFO */ +#endif /* NO_MALLINFO */ #ifndef MALLINFO_FIELD_TYPE #define MALLINFO_FIELD_TYPE size_t -#endif /* MALLINFO_FIELD_TYPE */ +#endif /* MALLINFO_FIELD_TYPE */ #ifndef memset #define memset SDL_memset @@ -675,27 +674,25 @@ DEFAULT_MMAP_THRESHOLD default: 256K #include "/usr/include/malloc.h" #else /* HAVE_USR_INCLUDE_MALLOC_H */ -struct mallinfo -{ - MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */ - MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */ - MALLINFO_FIELD_TYPE smblks; /* always 0 */ - MALLINFO_FIELD_TYPE hblks; /* always 0 */ - MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */ - MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */ - MALLINFO_FIELD_TYPE fsmblks; /* always 0 */ - MALLINFO_FIELD_TYPE uordblks; /* total allocated space */ - MALLINFO_FIELD_TYPE fordblks; /* total free space */ - MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */ +struct mallinfo { + MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */ + MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */ + MALLINFO_FIELD_TYPE smblks; /* always 0 */ + MALLINFO_FIELD_TYPE hblks; /* always 0 */ + MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */ + MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */ + MALLINFO_FIELD_TYPE fsmblks; /* always 0 */ + MALLINFO_FIELD_TYPE uordblks; /* total allocated space */ + MALLINFO_FIELD_TYPE fordblks; /* total free space */ + MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */ }; #endif /* HAVE_USR_INCLUDE_MALLOC_H */ #endif /* NO_MALLINFO */ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #if !ONLY_MSPACES @@ -718,7 +715,7 @@ extern "C" #define dlmalloc_max_footprint malloc_max_footprint #define dlindependent_calloc independent_calloc #define dlindependent_comalloc independent_comalloc -#endif /* USE_DL_PREFIX */ +#endif /* USE_DL_PREFIX */ /* @@ -735,7 +732,7 @@ extern "C" maximum supported value of n differs across systems, but is in all cases less than the maximum representable value of a size_t. */ - void * SDLCALL dlmalloc(size_t); +void* SDLCALL dlmalloc(size_t); /* free(void* p) @@ -744,14 +741,14 @@ extern "C" It has no effect if p is null. If p was not malloced or already freed, free(p) will by default cause the current program to abort. */ - void SDLCALL dlfree(void *); +void SDLCALL dlfree(void*); /* calloc(size_t n_elements, size_t element_size); Returns a pointer to n_elements * element_size bytes, with all locations set to zero. */ - void * SDLCALL dlcalloc(size_t, size_t); +void* SDLCALL dlcalloc(size_t, size_t); /* realloc(void* p, size_t n) @@ -776,7 +773,7 @@ extern "C" to be used as an argument to realloc is not supported. */ - void * SDLCALL dlrealloc(void *, size_t); +void* SDLCALL dlrealloc(void*, size_t); /* memalign(size_t alignment, size_t n); @@ -790,14 +787,14 @@ extern "C" Overreliance on memalign is a sure way to fragment space. */ - void *dlmemalign(size_t, size_t); +void* dlmemalign(size_t, size_t); /* valloc(size_t n); Equivalent to memalign(pagesize, n), where pagesize is the page size of the system. If the pagesize is unknown, 4096 is used. */ - void *dlvalloc(size_t); +void* dlvalloc(size_t); /* mallopt(int parameter_number, int parameter_value) @@ -817,7 +814,7 @@ extern "C" M_GRANULARITY -2 page size any power of 2 >= page size M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support) */ - int dlmallopt(int, int); +int dlmallopt(int, int); /* malloc_footprint(); @@ -828,7 +825,7 @@ extern "C" Even if locks are otherwise defined, this function does not use them, so results might not be up to date. */ - size_t dlmalloc_footprint(void); +size_t dlmalloc_footprint(void); /* malloc_max_footprint(); @@ -841,7 +838,7 @@ extern "C" otherwise defined, this function does not use them, so results might not be up to date. */ - size_t dlmalloc_max_footprint(void); +size_t dlmalloc_max_footprint(void); #if !NO_MALLINFO /* @@ -866,8 +863,8 @@ extern "C" be kept as longs, the reported values may wrap around zero and thus be inaccurate. */ - struct mallinfo dlmallinfo(void); -#endif /* NO_MALLINFO */ +struct mallinfo dlmallinfo(void); +#endif /* NO_MALLINFO */ /* independent_calloc(size_t n_elements, size_t element_size, void* chunks[]); @@ -921,7 +918,7 @@ extern "C" return first; } */ - void **dlindependent_calloc(size_t, size_t, void **); +void** dlindependent_calloc(size_t, size_t, void**); /* independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]); @@ -982,7 +979,7 @@ extern "C" since it cannot reuse existing noncontiguous small chunks that might be available for some of the elements. */ - void **dlindependent_comalloc(size_t, size_t *, void **); +void** dlindependent_comalloc(size_t, size_t*, void**); /* @@ -990,7 +987,7 @@ extern "C" Equivalent to valloc(minimum-page-that-holds(n)), that is, round up n to nearest pagesize. */ - void *dlpvalloc(size_t); +void* dlpvalloc(size_t); /* malloc_trim(size_t pad); @@ -1013,7 +1010,7 @@ extern "C" Malloc_trim returns 1 if it actually released any memory, else 0. */ - int dlmalloc_trim(size_t); +int dlmalloc_trim(size_t); /* malloc_usable_size(void* p); @@ -1029,7 +1026,7 @@ extern "C" p = malloc(n); assert(malloc_usable_size(p) >= 256); */ - size_t dlmalloc_usable_size(void *); +size_t dlmalloc_usable_size(void*); /* malloc_stats(); @@ -1050,9 +1047,9 @@ extern "C" malloc_stats prints only the most commonly interesting statistics. More information can be obtained by calling mallinfo. */ - void dlmalloc_stats(void); +void dlmalloc_stats(void); -#endif /* ONLY_MSPACES */ +#endif /* ONLY_MSPACES */ #if MSPACES @@ -1060,7 +1057,7 @@ extern "C" mspace is an opaque type representing an independent region of space that supports mspace_malloc, etc. */ - typedef void *mspace; +typedef void* mspace; /* create_mspace creates and returns a new independent space with the @@ -1073,7 +1070,7 @@ extern "C" compiling with a different DEFAULT_GRANULARITY or dynamically setting with mallopt(M_GRANULARITY, value). */ - mspace create_mspace(size_t capacity, int locked); +mspace create_mspace(size_t capacity, int locked); /* destroy_mspace destroys the given space, and attempts to return all @@ -1081,7 +1078,7 @@ extern "C" bytes freed. After destruction, the results of access to all memory used by the space become undefined. */ - size_t destroy_mspace(mspace msp); +size_t destroy_mspace(mspace msp); /* create_mspace_with_base uses the memory supplied as the initial base @@ -1092,13 +1089,13 @@ extern "C" Destroying this space will deallocate all additionally allocated space (if possible) but not the initial base. */ - mspace create_mspace_with_base(void *base, size_t capacity, int locked); +mspace create_mspace_with_base(void* base, size_t capacity, int locked); /* mspace_malloc behaves as malloc, but operates within the given space. */ - void *mspace_malloc(mspace msp, size_t bytes); +void* mspace_malloc(mspace msp, size_t bytes); /* mspace_free behaves as free, but operates within @@ -1108,7 +1105,7 @@ extern "C" free may be called instead of mspace_free because freed chunks from any space are handled by their originating spaces. */ - void mspace_free(mspace msp, void *mem); +void mspace_free(mspace msp, void* mem); /* mspace_realloc behaves as realloc, but operates within @@ -1119,45 +1116,45 @@ extern "C" realloced chunks from any space are handled by their originating spaces. */ - void *mspace_realloc(mspace msp, void *mem, size_t newsize); +void* mspace_realloc(mspace msp, void* mem, size_t newsize); /* mspace_calloc behaves as calloc, but operates within the given space. */ - void *mspace_calloc(mspace msp, size_t n_elements, size_t elem_size); +void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size); /* mspace_memalign behaves as memalign, but operates within the given space. */ - void *mspace_memalign(mspace msp, size_t alignment, size_t bytes); +void* mspace_memalign(mspace msp, size_t alignment, size_t bytes); /* mspace_independent_calloc behaves as independent_calloc, but operates within the given space. */ - void **mspace_independent_calloc(mspace msp, size_t n_elements, - size_t elem_size, void *chunks[]); +void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]); /* mspace_independent_comalloc behaves as independent_comalloc, but operates within the given space. */ - void **mspace_independent_comalloc(mspace msp, size_t n_elements, - size_t sizes[], void *chunks[]); +void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]); /* mspace_footprint() returns the number of bytes obtained from the system for this space. */ - size_t mspace_footprint(mspace msp); +size_t mspace_footprint(mspace msp); /* mspace_max_footprint() returns the peak number of bytes obtained from the system for this space. */ - size_t mspace_max_footprint(mspace msp); +size_t mspace_max_footprint(mspace msp); #if !NO_MALLINFO @@ -1165,30 +1162,30 @@ extern "C" mspace_mallinfo behaves as mallinfo, but reports properties of the given space. */ - struct mallinfo mspace_mallinfo(mspace msp); -#endif /* NO_MALLINFO */ +struct mallinfo mspace_mallinfo(mspace msp); +#endif /* NO_MALLINFO */ /* mspace_malloc_stats behaves as malloc_stats, but reports properties of the given space. */ - void mspace_malloc_stats(mspace msp); +void mspace_malloc_stats(mspace msp); /* mspace_trim behaves as malloc_trim, but operates within the given space. */ - int mspace_trim(mspace msp, size_t pad); +int mspace_trim(mspace msp, size_t pad); /* An alias for mallopt. */ - int mspace_mallopt(int, int); +int mspace_mallopt(int, int); -#endif /* MSPACES */ +#endif /* MSPACES */ #ifdef __cplusplus -}; /* end of extern "C" */ +}; /* end of extern "C" */ #endif /* __cplusplus */ /* @@ -1204,21 +1201,21 @@ extern "C" /*------------------------------ internal #includes ---------------------- */ #ifdef _MSC_VER -#pragma warning( disable : 4146 ) /* no "unsigned" warnings */ +#pragma warning( disable : 4146 ) /* no "unsigned" warnings */ #endif /* _MSC_VER */ #ifndef LACKS_STDIO_H -#include /* for printing in malloc_stats */ +#include /* for printing in malloc_stats */ #endif #ifndef LACKS_ERRNO_H -#include /* for MALLOC_FAILURE_ACTION */ +#include /* for MALLOC_FAILURE_ACTION */ #endif /* LACKS_ERRNO_H */ #if FOOTERS -#include /* for magic initialization */ +#include /* for magic initialization */ #endif /* FOOTERS */ #ifndef LACKS_STDLIB_H -#include /* for abort() */ +#include /* for abort() */ #endif /* LACKS_STDLIB_H */ #ifdef DEBUG #if ABORT_ON_ASSERT_FAILURE @@ -1226,20 +1223,20 @@ extern "C" #else /* ABORT_ON_ASSERT_FAILURE */ #include #endif /* ABORT_ON_ASSERT_FAILURE */ -#else /* DEBUG */ +#else /* DEBUG */ #define assert(x) #endif /* DEBUG */ #ifndef LACKS_STRING_H -#include /* for memset etc */ -#endif /* LACKS_STRING_H */ +#include /* for memset etc */ +#endif /* LACKS_STRING_H */ #if USE_BUILTIN_FFS #ifndef LACKS_STRINGS_H -#include /* for ffs */ +#include /* for ffs */ #endif /* LACKS_STRINGS_H */ #endif /* USE_BUILTIN_FFS */ #if HAVE_MMAP #ifndef LACKS_SYS_MMAN_H -#include /* for mmap */ +#include /* for mmap */ #endif /* LACKS_SYS_MMAN_H */ #ifndef LACKS_FCNTL_H #include @@ -1247,17 +1244,17 @@ extern "C" #endif /* HAVE_MMAP */ #if HAVE_MORECORE #ifndef LACKS_UNISTD_H -#include /* for sbrk */ +#include /* for sbrk */ #else /* LACKS_UNISTD_H */ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) -extern void *sbrk(ptrdiff_t); +extern void* sbrk(ptrdiff_t); #endif /* FreeBSD etc */ #endif /* LACKS_UNISTD_H */ #endif /* HAVE_MMAP */ #ifndef WIN32 #ifndef malloc_getpagesize -# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ +# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ # ifndef _SC_PAGE_SIZE # define _SC_PAGE_SIZE _SC_PAGESIZE # endif @@ -1266,10 +1263,10 @@ extern void *sbrk(ptrdiff_t); # define malloc_getpagesize sysconf(_SC_PAGE_SIZE) # else # if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE) -extern size_t getpagesize(); + extern size_t getpagesize(); # define malloc_getpagesize getpagesize() # else -# ifdef WIN32 /* use supplied emulation of getpagesize */ +# ifdef WIN32 /* use supplied emulation of getpagesize */ # define malloc_getpagesize getpagesize() # else # ifndef LACKS_SYS_PARAM_H @@ -1340,7 +1337,7 @@ extern size_t getpagesize(); /* MORECORE and MMAP must return MFAIL on failure */ #define MFAIL ((void*)(MAX_SIZE_T)) -#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */ +#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */ #if !HAVE_MMAP #define IS_MMAPPED_BIT (SIZE_T_ZERO) @@ -1353,7 +1350,7 @@ extern size_t getpagesize(); #define IS_MMAPPED_BIT (SIZE_T_ONE) #define USE_MMAP_BIT (SIZE_T_ONE) -#if !defined(WIN32) && !defined (__OS2__) +#if !defined(WIN32) && !defined(__OS2__) #define CALL_MUNMAP(a, s) munmap((a), (s)) #define MMAP_PROT (PROT_READ|PROT_WRITE) #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) @@ -1368,7 +1365,7 @@ extern size_t getpagesize(); is unlikely to be needed, but is supplied just in case. */ #define MMAP_FLAGS (MAP_PRIVATE) -static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */ +static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */ #define CALL_MMAP(s) ((dev_zero_fd < 0) ? \ (dev_zero_fd = open("/dev/zero", O_RDWR), \ mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \ @@ -1415,41 +1412,34 @@ static int os2munmap(void* ptr, size_t size) { #else /* WIN32 */ /* Win32 MMAP via VirtualAlloc */ -static void * -win32mmap(size_t size) -{ - void *ptr = - VirtualAlloc(0, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); - return (ptr != 0) ? ptr : MFAIL; +static void* win32mmap(size_t size) { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); + return (ptr != 0)? ptr: MFAIL; } /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ -static void * -win32direct_mmap(size_t size) -{ - void *ptr = VirtualAlloc(0, size, MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, - PAGE_READWRITE); - return (ptr != 0) ? ptr : MFAIL; +static void* win32direct_mmap(size_t size) { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, + PAGE_READWRITE); + return (ptr != 0)? ptr: MFAIL; } /* This function supports releasing coalesed segments */ -static int -win32munmap(void *ptr, size_t size) -{ - MEMORY_BASIC_INFORMATION minfo; - char *cptr = ptr; - while (size) { - if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) - return -1; - if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || - minfo.State != MEM_COMMIT || minfo.RegionSize > size) - return -1; - if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) - return -1; - cptr += minfo.RegionSize; - size -= minfo.RegionSize; - } - return 0; +static int win32munmap(void* ptr, size_t size) { + MEMORY_BASIC_INFORMATION minfo; + char* cptr = ptr; + while (size) { + if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) + return -1; + if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || + minfo.State != MEM_COMMIT || minfo.RegionSize > size) + return -1; + if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) + return -1; + cptr += minfo.RegionSize; + size -= minfo.RegionSize; + } + return 0; } #define CALL_MMAP(s) win32mmap(s) @@ -1460,13 +1450,13 @@ win32munmap(void *ptr, size_t size) #if HAVE_MMAP && HAVE_MREMAP #define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv)) -#else /* HAVE_MMAP && HAVE_MREMAP */ +#else /* HAVE_MMAP && HAVE_MREMAP */ #define CALL_MREMAP(addr, osz, nsz, mv) MFAIL #endif /* HAVE_MMAP && HAVE_MREMAP */ #if HAVE_MORECORE #define CALL_MORECORE(S) MORECORE(S) -#else /* HAVE_MORECORE */ +#else /* HAVE_MORECORE */ #define CALL_MORECORE(S) MFAIL #endif /* HAVE_MORECORE */ @@ -1526,25 +1516,21 @@ static MLOCK_T magic_init_mutex; */ #define MLOCK_T long -static int -win32_acquire_lock(MLOCK_T * sl) -{ - for (;;) { +static int win32_acquire_lock (MLOCK_T *sl) { + for (;;) { #ifdef InterlockedCompareExchangePointer - if (!InterlockedCompareExchange(sl, 1, 0)) - return 0; -#else /* Use older void* version */ - if (!InterlockedCompareExchange((void **) sl, (void *) 1, (void *) 0)) - return 0; + if (!InterlockedCompareExchange(sl, 1, 0)) + return 0; +#else /* Use older void* version */ + if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0)) + return 0; #endif /* InterlockedCompareExchangePointer */ - Sleep(0); - } + Sleep (0); + } } -static void -win32_release_lock(MLOCK_T * sl) -{ - InterlockedExchange(sl, 0); +static void win32_release_lock (MLOCK_T *sl) { + InterlockedExchange (sl, 0); } #define INITIAL_LOCK(l) *(l)=0 @@ -1557,7 +1543,7 @@ static MLOCK_T magic_init_mutex; #endif /* WIN32 */ #define USE_LOCK_BIT (2U) -#else /* USE_LOCKS */ +#else /* USE_LOCKS */ #define USE_LOCK_BIT (0U) #define INITIAL_LOCK(l) #endif /* USE_LOCKS */ @@ -1573,7 +1559,7 @@ static MLOCK_T magic_init_mutex; #if USE_LOCKS #define ACQUIRE_MAGIC_INIT_LOCK() ACQUIRE_LOCK(&magic_init_mutex); #define RELEASE_MAGIC_INIT_LOCK() RELEASE_LOCK(&magic_init_mutex); -#else /* USE_LOCKS */ +#else /* USE_LOCKS */ #define ACQUIRE_MAGIC_INIT_LOCK() #define RELEASE_MAGIC_INIT_LOCK() #endif /* USE_LOCKS */ @@ -1716,20 +1702,19 @@ static MLOCK_T magic_init_mutex; */ -struct malloc_chunk -{ - size_t prev_foot; /* Size of previous chunk (if free). */ - size_t head; /* Size and inuse bits. */ - struct malloc_chunk *fd; /* double links -- used only if free. */ - struct malloc_chunk *bk; +struct malloc_chunk { + size_t prev_foot; /* Size of previous chunk (if free). */ + size_t head; /* Size and inuse bits. */ + struct malloc_chunk* fd; /* double links -- used only if free. */ + struct malloc_chunk* bk; }; -typedef struct malloc_chunk mchunk; -typedef struct malloc_chunk *mchunkptr; -typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */ -typedef size_t bindex_t; /* Described below */ -typedef unsigned int binmap_t; /* Described below */ -typedef unsigned int flag_t; /* The type of various bit flag sets */ +typedef struct malloc_chunk mchunk; +typedef struct malloc_chunk* mchunkptr; +typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */ +typedef size_t bindex_t; /* Described below */ +typedef unsigned int binmap_t; /* Described below */ +typedef unsigned int flag_t; /* The type of various bit flag sets */ /* ------------------- Chunks sizes and alignments ----------------------- */ @@ -1922,22 +1907,21 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ is of course much better. */ -struct malloc_tree_chunk -{ - /* The first four fields must be compatible with malloc_chunk */ - size_t prev_foot; - size_t head; - struct malloc_tree_chunk *fd; - struct malloc_tree_chunk *bk; - - struct malloc_tree_chunk *child[2]; - struct malloc_tree_chunk *parent; - bindex_t index; +struct malloc_tree_chunk { + /* The first four fields must be compatible with malloc_chunk */ + size_t prev_foot; + size_t head; + struct malloc_tree_chunk* fd; + struct malloc_tree_chunk* bk; + + struct malloc_tree_chunk* child[2]; + struct malloc_tree_chunk* parent; + bindex_t index; }; -typedef struct malloc_tree_chunk tchunk; -typedef struct malloc_tree_chunk *tchunkptr; -typedef struct malloc_tree_chunk *tbinptr; /* The type of bins of trees */ +typedef struct malloc_tree_chunk tchunk; +typedef struct malloc_tree_chunk* tchunkptr; +typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */ /* A little helper macro for trees */ #define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1]) @@ -1999,19 +1983,18 @@ typedef struct malloc_tree_chunk *tbinptr; /* The type of bins of trees */ and deallocated/trimmed using MORECORE with negative arguments. */ -struct malloc_segment -{ - char *base; /* base address */ - size_t size; /* allocated size */ - struct malloc_segment *next; /* ptr to next segment */ - flag_t sflags; /* mmap and extern flag */ +struct malloc_segment { + char* base; /* base address */ + size_t size; /* allocated size */ + struct malloc_segment* next; /* ptr to next segment */ + flag_t sflags; /* mmap and extern flag */ }; #define is_mmapped_segment(S) ((S)->sflags & IS_MMAPPED_BIT) #define is_extern_segment(S) ((S)->sflags & EXTERN_BIT) -typedef struct malloc_segment msegment; -typedef struct malloc_segment *msegmentptr; +typedef struct malloc_segment msegment; +typedef struct malloc_segment* msegmentptr; /* ---------------------------- malloc_state ----------------------------- */ @@ -2098,29 +2081,28 @@ typedef struct malloc_segment *msegmentptr; #define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE) #define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD) -struct malloc_state -{ - binmap_t smallmap; - binmap_t treemap; - size_t dvsize; - size_t topsize; - char *least_addr; - mchunkptr dv; - mchunkptr top; - size_t trim_check; - size_t magic; - mchunkptr smallbins[(NSMALLBINS + 1) * 2]; - tbinptr treebins[NTREEBINS]; - size_t footprint; - size_t max_footprint; - flag_t mflags; +struct malloc_state { + binmap_t smallmap; + binmap_t treemap; + size_t dvsize; + size_t topsize; + char* least_addr; + mchunkptr dv; + mchunkptr top; + size_t trim_check; + size_t magic; + mchunkptr smallbins[(NSMALLBINS+1)*2]; + tbinptr treebins[NTREEBINS]; + size_t footprint; + size_t max_footprint; + flag_t mflags; #if USE_LOCKS - MLOCK_T mutex; /* locate lock among fields that rarely change */ -#endif /* USE_LOCKS */ - msegment seg; + MLOCK_T mutex; /* locate lock among fields that rarely change */ +#endif /* USE_LOCKS */ + msegment seg; }; -typedef struct malloc_state *mstate; +typedef struct malloc_state* mstate; /* ------------- Global malloc_state and malloc_params ------------------- */ @@ -2130,14 +2112,13 @@ typedef struct malloc_state *mstate; initialized in init_mparams. */ -struct malloc_params -{ - size_t magic; - size_t page_size; - size_t granularity; - size_t mmap_threshold; - size_t trim_threshold; - flag_t default_mflags; +struct malloc_params { + size_t magic; + size_t page_size; + size_t granularity; + size_t mmap_threshold; + size_t trim_threshold; + flag_t default_mflags; }; static struct malloc_params mparams; @@ -2186,34 +2167,30 @@ static struct malloc_state _gm_; ((char*)(A) >= S->base && (char*)(A) < S->base + S->size) /* Return segment holding given address */ -static msegmentptr -segment_holding(mstate m, char *addr) -{ - msegmentptr sp = &m->seg; - for (;;) { - if (addr >= sp->base && addr < sp->base + sp->size) - return sp; - if ((sp = sp->next) == 0) - return 0; - } +static msegmentptr segment_holding(mstate m, char* addr) { + msegmentptr sp = &m->seg; + for (;;) { + if (addr >= sp->base && addr < sp->base + sp->size) + return sp; + if ((sp = sp->next) == 0) + return 0; + } } /* Return true if segment contains a segment link */ -static int -has_segment_link(mstate m, msegmentptr ss) -{ - msegmentptr sp = &m->seg; - for (;;) { - if ((char *) sp >= ss->base && (char *) sp < ss->base + ss->size) - return 1; - if ((sp = sp->next) == 0) - return 0; - } +static int has_segment_link(mstate m, msegmentptr ss) { + msegmentptr sp = &m->seg; + for (;;) { + if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size) + return 1; + if ((sp = sp->next) == 0) + return 0; + } } #ifndef MORECORE_CANNOT_TRIM #define should_trim(M,s) ((s) > (M)->trim_check) -#else /* MORECORE_CANNOT_TRIM */ +#else /* MORECORE_CANNOT_TRIM */ #define should_trim(M,s) (0) #endif /* MORECORE_CANNOT_TRIM */ @@ -2245,11 +2222,11 @@ has_segment_link(mstate m, msegmentptr ss) #ifndef PREACTION #define PREACTION(M) (0) -#endif /* PREACTION */ +#endif /* PREACTION */ #ifndef POSTACTION #define POSTACTION(M) -#endif /* POSTACTION */ +#endif /* POSTACTION */ #endif /* USE_LOCKS */ @@ -2303,17 +2280,17 @@ static void reset_on_error(mstate m); #define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P) #define check_malloc_state(M) do_check_malloc_state(M) -static void do_check_any_chunk(mstate m, mchunkptr p); -static void do_check_top_chunk(mstate m, mchunkptr p); -static void do_check_mmapped_chunk(mstate m, mchunkptr p); -static void do_check_inuse_chunk(mstate m, mchunkptr p); -static void do_check_free_chunk(mstate m, mchunkptr p); -static void do_check_malloced_chunk(mstate m, void *mem, size_t s); -static void do_check_tree(mstate m, tchunkptr t); -static void do_check_treebin(mstate m, bindex_t i); -static void do_check_smallbin(mstate m, bindex_t i); -static void do_check_malloc_state(mstate m); -static int bin_find(mstate m, mchunkptr x); +static void do_check_any_chunk(mstate m, mchunkptr p); +static void do_check_top_chunk(mstate m, mchunkptr p); +static void do_check_mmapped_chunk(mstate m, mchunkptr p); +static void do_check_inuse_chunk(mstate m, mchunkptr p); +static void do_check_free_chunk(mstate m, mchunkptr p); +static void do_check_malloced_chunk(mstate m, void* mem, size_t s); +static void do_check_tree(mstate m, tchunkptr t); +static void do_check_treebin(mstate m, bindex_t i); +static void do_check_smallbin(mstate m, bindex_t i); +static void do_check_malloc_state(mstate m); +static int bin_find(mstate m, mchunkptr x); static size_t traverse_and_check(mstate m); #endif /* DEBUG */ @@ -2479,7 +2456,7 @@ static size_t traverse_and_check(mstate m); #if (FOOTERS && !INSECURE) /* Check if (alleged) mstate m has expected magic field */ #define ok_magic(M) ((M)->magic == mparams.magic) -#else /* (FOOTERS && !INSECURE) */ +#else /* (FOOTERS && !INSECURE) */ #define ok_magic(M) (1) #endif /* (FOOTERS && !INSECURE) */ @@ -2544,485 +2521,460 @@ static size_t traverse_and_check(mstate m); /* ---------------------------- setting mparams -------------------------- */ /* Initialize mparams */ -static int -init_mparams(void) -{ - if (mparams.page_size == 0) { - size_t s; +static int init_mparams(void) { + if (mparams.page_size == 0) { + size_t s; - mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD; - mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD; + mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD; + mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD; #if MORECORE_CONTIGUOUS - mparams.default_mflags = USE_LOCK_BIT | USE_MMAP_BIT; -#else /* MORECORE_CONTIGUOUS */ - mparams.default_mflags = - USE_LOCK_BIT | USE_MMAP_BIT | USE_NONCONTIGUOUS_BIT; + mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT; +#else /* MORECORE_CONTIGUOUS */ + mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT; #endif /* MORECORE_CONTIGUOUS */ #if (FOOTERS && !INSECURE) - { + { #if USE_DEV_RANDOM - int fd; - unsigned char buf[sizeof(size_t)]; - /* Try to use /dev/urandom, else fall back on using time */ - if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 && - read(fd, buf, sizeof(buf)) == sizeof(buf)) { - s = *((size_t *) buf); - close(fd); - } else + int fd; + unsigned char buf[sizeof(size_t)]; + /* Try to use /dev/urandom, else fall back on using time */ + if ((fd = open("/dev/urandom", O_RDONLY)) < 0) { + s = 0; + } else { + s = read(fd, buf, sizeof(buf)); + close(fd); + } + if (s == sizeof(buf)) + s = *((size_t *)buf); + else #endif /* USE_DEV_RANDOM */ - s = (size_t) (time(0) ^ (size_t) 0x55555555U); + s = (size_t)(time(0) ^ (size_t)0x55555555U); - s |= (size_t) 8U; /* ensure nonzero */ - s &= ~(size_t) 7U; /* improve chances of fault for bad values */ + s |= (size_t)8U; /* ensure nonzero */ + s &= ~(size_t)7U; /* improve chances of fault for bad values */ - } + } #else /* (FOOTERS && !INSECURE) */ - s = (size_t) 0x58585858U; + s = (size_t)0x58585858U; #endif /* (FOOTERS && !INSECURE) */ - (void)ACQUIRE_MAGIC_INIT_LOCK(); - if (mparams.magic == 0) { - mparams.magic = s; - /* Set up lock for main malloc area */ - INITIAL_LOCK(&gm->mutex); - gm->mflags = mparams.default_mflags; - } - RELEASE_MAGIC_INIT_LOCK(); + (void)ACQUIRE_MAGIC_INIT_LOCK(); + if (mparams.magic == 0) { + mparams.magic = s; + /* Set up lock for main malloc area */ + INITIAL_LOCK(&gm->mutex); + gm->mflags = mparams.default_mflags; + } + RELEASE_MAGIC_INIT_LOCK(); #if !defined(WIN32) && !defined(__OS2__) - mparams.page_size = malloc_getpagesize; - mparams.granularity = ((DEFAULT_GRANULARITY != 0) ? - DEFAULT_GRANULARITY : mparams.page_size); + mparams.page_size = malloc_getpagesize; + mparams.granularity = ((DEFAULT_GRANULARITY != 0)? + DEFAULT_GRANULARITY : mparams.page_size); #elif defined (__OS2__) - /* if low-memory is used, os2munmap() would break - if it were anything other than 64k */ - mparams.page_size = 4096u; - mparams.granularity = 65536u; + /* if low-memory is used, os2munmap() would break + if it were anything other than 64k */ + mparams.page_size = 4096u; + mparams.granularity = 65536u; #else /* WIN32 */ - { - SYSTEM_INFO system_info; - GetSystemInfo(&system_info); - mparams.page_size = system_info.dwPageSize; - mparams.granularity = system_info.dwAllocationGranularity; - } + { + SYSTEM_INFO system_info; + GetSystemInfo(&system_info); + mparams.page_size = system_info.dwPageSize; + mparams.granularity = system_info.dwAllocationGranularity; + } #endif /* WIN32 */ - /* Sanity-check configuration: - size_t must be unsigned and as wide as pointer type. - ints must be at least 4 bytes. - alignment must be at least 8. - Alignment, min chunk size, and page size must all be powers of 2. - */ - if ((sizeof(size_t) != sizeof(char *)) || - (MAX_SIZE_T < MIN_CHUNK_SIZE) || - (sizeof(int) < 4) || - (MALLOC_ALIGNMENT < (size_t) 8U) || - ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT - SIZE_T_ONE)) != 0) || - ((MCHUNK_SIZE & (MCHUNK_SIZE - SIZE_T_ONE)) != 0) || - ((mparams.granularity & (mparams.granularity - SIZE_T_ONE)) != 0) - || ((mparams.page_size & (mparams.page_size - SIZE_T_ONE)) != 0)) - ABORT; - } - return 0; + /* Sanity-check configuration: + size_t must be unsigned and as wide as pointer type. + ints must be at least 4 bytes. + alignment must be at least 8. + Alignment, min chunk size, and page size must all be powers of 2. + */ + if ((sizeof(size_t) != sizeof(char*)) || + (MAX_SIZE_T < MIN_CHUNK_SIZE) || + (sizeof(int) < 4) || + (MALLOC_ALIGNMENT < (size_t)8U) || + ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) || + ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) || + ((mparams.granularity & (mparams.granularity-SIZE_T_ONE)) != 0) || + ((mparams.page_size & (mparams.page_size-SIZE_T_ONE)) != 0)) + ABORT; + } + return 0; } /* support for mallopt */ -static int -change_mparam(int param_number, int value) -{ - size_t val = (size_t) value; - init_mparams(); - switch (param_number) { - case M_TRIM_THRESHOLD: - mparams.trim_threshold = val; - return 1; - case M_GRANULARITY: - if (val >= mparams.page_size && ((val & (val - 1)) == 0)) { - mparams.granularity = val; - return 1; - } else - return 0; - case M_MMAP_THRESHOLD: - mparams.mmap_threshold = val; - return 1; - default: - return 0; +static int change_mparam(int param_number, int value) { + size_t val = (size_t)value; + init_mparams(); + switch(param_number) { + case M_TRIM_THRESHOLD: + mparams.trim_threshold = val; + return 1; + case M_GRANULARITY: + if (val >= mparams.page_size && ((val & (val-1)) == 0)) { + mparams.granularity = val; + return 1; } + else + return 0; + case M_MMAP_THRESHOLD: + mparams.mmap_threshold = val; + return 1; + default: + return 0; + } } #if DEBUG /* ------------------------- Debugging Support --------------------------- */ /* Check properties of any chunk, whether free, inuse, mmapped etc */ -static void -do_check_any_chunk(mstate m, mchunkptr p) -{ - assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); - assert(ok_address(m, p)); +static void do_check_any_chunk(mstate m, mchunkptr p) { + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); } /* Check properties of top chunk */ -static void -do_check_top_chunk(mstate m, mchunkptr p) -{ - msegmentptr sp = segment_holding(m, (char *) p); - size_t sz = chunksize(p); - assert(sp != 0); - assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); - assert(ok_address(m, p)); - assert(sz == m->topsize); - assert(sz > 0); - assert(sz == ((sp->base + sp->size) - (char *) p) - TOP_FOOT_SIZE); - assert(pinuse(p)); - assert(!next_pinuse(p)); +static void do_check_top_chunk(mstate m, mchunkptr p) { + msegmentptr sp = segment_holding(m, (char*)p); + size_t sz = chunksize(p); + assert(sp != 0); + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); + assert(sz == m->topsize); + assert(sz > 0); + assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE); + assert(pinuse(p)); + assert(!next_pinuse(p)); } /* Check properties of (inuse) mmapped chunks */ -static void -do_check_mmapped_chunk(mstate m, mchunkptr p) -{ - size_t sz = chunksize(p); - size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD); - assert(is_mmapped(p)); - assert(use_mmap(m)); - assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); - assert(ok_address(m, p)); - assert(!is_small(sz)); - assert((len & (mparams.page_size - SIZE_T_ONE)) == 0); - assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD); - assert(chunk_plus_offset(p, sz + SIZE_T_SIZE)->head == 0); +static void do_check_mmapped_chunk(mstate m, mchunkptr p) { + size_t sz = chunksize(p); + size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD); + assert(is_mmapped(p)); + assert(use_mmap(m)); + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); + assert(!is_small(sz)); + assert((len & (mparams.page_size-SIZE_T_ONE)) == 0); + assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD); + assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0); } /* Check properties of inuse chunks */ -static void -do_check_inuse_chunk(mstate m, mchunkptr p) -{ - do_check_any_chunk(m, p); - assert(cinuse(p)); - assert(next_pinuse(p)); - /* If not pinuse and not mmapped, previous chunk has OK offset */ - assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); - if (is_mmapped(p)) - do_check_mmapped_chunk(m, p); +static void do_check_inuse_chunk(mstate m, mchunkptr p) { + do_check_any_chunk(m, p); + assert(cinuse(p)); + assert(next_pinuse(p)); + /* If not pinuse and not mmapped, previous chunk has OK offset */ + assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); + if (is_mmapped(p)) + do_check_mmapped_chunk(m, p); } /* Check properties of free chunks */ -static void -do_check_free_chunk(mstate m, mchunkptr p) -{ - size_t sz = p->head & ~(PINUSE_BIT | CINUSE_BIT); - mchunkptr next = chunk_plus_offset(p, sz); - do_check_any_chunk(m, p); - assert(!cinuse(p)); - assert(!next_pinuse(p)); - assert(!is_mmapped(p)); - if (p != m->dv && p != m->top) { - if (sz >= MIN_CHUNK_SIZE) { - assert((sz & CHUNK_ALIGN_MASK) == 0); - assert(is_aligned(chunk2mem(p))); - assert(next->prev_foot == sz); - assert(pinuse(p)); - assert(next == m->top || cinuse(next)); - assert(p->fd->bk == p); - assert(p->bk->fd == p); - } else /* markers are always of size SIZE_T_SIZE */ - assert(sz == SIZE_T_SIZE); +static void do_check_free_chunk(mstate m, mchunkptr p) { + size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); + mchunkptr next = chunk_plus_offset(p, sz); + do_check_any_chunk(m, p); + assert(!cinuse(p)); + assert(!next_pinuse(p)); + assert (!is_mmapped(p)); + if (p != m->dv && p != m->top) { + if (sz >= MIN_CHUNK_SIZE) { + assert((sz & CHUNK_ALIGN_MASK) == 0); + assert(is_aligned(chunk2mem(p))); + assert(next->prev_foot == sz); + assert(pinuse(p)); + assert (next == m->top || cinuse(next)); + assert(p->fd->bk == p); + assert(p->bk->fd == p); } + else /* markers are always of size SIZE_T_SIZE */ + assert(sz == SIZE_T_SIZE); + } } /* Check properties of malloced chunks at the point they are malloced */ -static void -do_check_malloced_chunk(mstate m, void *mem, size_t s) -{ - if (mem != 0) { - mchunkptr p = mem2chunk(mem); - size_t sz = p->head & ~(PINUSE_BIT | CINUSE_BIT); - do_check_inuse_chunk(m, p); - assert((sz & CHUNK_ALIGN_MASK) == 0); - assert(sz >= MIN_CHUNK_SIZE); - assert(sz >= s); - /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ - assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); - } +static void do_check_malloced_chunk(mstate m, void* mem, size_t s) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); + size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); + do_check_inuse_chunk(m, p); + assert((sz & CHUNK_ALIGN_MASK) == 0); + assert(sz >= MIN_CHUNK_SIZE); + assert(sz >= s); + /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ + assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); + } } /* Check a tree and its subtrees. */ -static void -do_check_tree(mstate m, tchunkptr t) -{ - tchunkptr head = 0; - tchunkptr u = t; - bindex_t tindex = t->index; - size_t tsize = chunksize(t); - bindex_t idx; - compute_tree_index(tsize, idx); - assert(tindex == idx); - assert(tsize >= MIN_LARGE_SIZE); - assert(tsize >= minsize_for_tree_index(idx)); - assert((idx == NTREEBINS - 1) - || (tsize < minsize_for_tree_index((idx + 1)))); - - do { /* traverse through chain of same-sized nodes */ - do_check_any_chunk(m, ((mchunkptr) u)); - assert(u->index == tindex); - assert(chunksize(u) == tsize); - assert(!cinuse(u)); - assert(!next_pinuse(u)); - assert(u->fd->bk == u); - assert(u->bk->fd == u); - if (u->parent == 0) { - assert(u->child[0] == 0); - assert(u->child[1] == 0); - } else { - assert(head == 0); /* only one node on chain has parent */ - head = u; - assert(u->parent != u); - assert(u->parent->child[0] == u || - u->parent->child[1] == u || - *((tbinptr *) (u->parent)) == u); - if (u->child[0] != 0) { - assert(u->child[0]->parent == u); - assert(u->child[0] != u); - do_check_tree(m, u->child[0]); - } - if (u->child[1] != 0) { - assert(u->child[1]->parent == u); - assert(u->child[1] != u); - do_check_tree(m, u->child[1]); - } - if (u->child[0] != 0 && u->child[1] != 0) { - assert(chunksize(u->child[0]) < chunksize(u->child[1])); - } - } - u = u->fd; - } while (u != t); - assert(head != 0); +static void do_check_tree(mstate m, tchunkptr t) { + tchunkptr head = 0; + tchunkptr u = t; + bindex_t tindex = t->index; + size_t tsize = chunksize(t); + bindex_t idx; + compute_tree_index(tsize, idx); + assert(tindex == idx); + assert(tsize >= MIN_LARGE_SIZE); + assert(tsize >= minsize_for_tree_index(idx)); + assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1)))); + + do { /* traverse through chain of same-sized nodes */ + do_check_any_chunk(m, ((mchunkptr)u)); + assert(u->index == tindex); + assert(chunksize(u) == tsize); + assert(!cinuse(u)); + assert(!next_pinuse(u)); + assert(u->fd->bk == u); + assert(u->bk->fd == u); + if (u->parent == 0) { + assert(u->child[0] == 0); + assert(u->child[1] == 0); + } + else { + assert(head == 0); /* only one node on chain has parent */ + head = u; + assert(u->parent != u); + assert (u->parent->child[0] == u || + u->parent->child[1] == u || + *((tbinptr*)(u->parent)) == u); + if (u->child[0] != 0) { + assert(u->child[0]->parent == u); + assert(u->child[0] != u); + do_check_tree(m, u->child[0]); + } + if (u->child[1] != 0) { + assert(u->child[1]->parent == u); + assert(u->child[1] != u); + do_check_tree(m, u->child[1]); + } + if (u->child[0] != 0 && u->child[1] != 0) { + assert(chunksize(u->child[0]) < chunksize(u->child[1])); + } + } + u = u->fd; + } while (u != t); + assert(head != 0); } /* Check all the chunks in a treebin. */ -static void -do_check_treebin(mstate m, bindex_t i) -{ - tbinptr *tb = treebin_at(m, i); - tchunkptr t = *tb; - int empty = (m->treemap & (1U << i)) == 0; - if (t == 0) - assert(empty); - if (!empty) - do_check_tree(m, t); +static void do_check_treebin(mstate m, bindex_t i) { + tbinptr* tb = treebin_at(m, i); + tchunkptr t = *tb; + int empty = (m->treemap & (1U << i)) == 0; + if (t == 0) + assert(empty); + if (!empty) + do_check_tree(m, t); } /* Check all the chunks in a smallbin. */ -static void -do_check_smallbin(mstate m, bindex_t i) -{ - sbinptr b = smallbin_at(m, i); - mchunkptr p = b->bk; - unsigned int empty = (m->smallmap & (1U << i)) == 0; - if (p == b) - assert(empty); - if (!empty) { - for (; p != b; p = p->bk) { - size_t size = chunksize(p); - mchunkptr q; - /* each chunk claims to be free */ - do_check_free_chunk(m, p); - /* chunk belongs in bin */ - assert(small_index(size) == i); - assert(p->bk == b || chunksize(p->bk) == chunksize(p)); - /* chunk is followed by an inuse chunk */ - q = next_chunk(p); - if (q->head != FENCEPOST_HEAD) - do_check_inuse_chunk(m, q); - } +static void do_check_smallbin(mstate m, bindex_t i) { + sbinptr b = smallbin_at(m, i); + mchunkptr p = b->bk; + unsigned int empty = (m->smallmap & (1U << i)) == 0; + if (p == b) + assert(empty); + if (!empty) { + for (; p != b; p = p->bk) { + size_t size = chunksize(p); + mchunkptr q; + /* each chunk claims to be free */ + do_check_free_chunk(m, p); + /* chunk belongs in bin */ + assert(small_index(size) == i); + assert(p->bk == b || chunksize(p->bk) == chunksize(p)); + /* chunk is followed by an inuse chunk */ + q = next_chunk(p); + if (q->head != FENCEPOST_HEAD) + do_check_inuse_chunk(m, q); } + } } /* Find x in a bin. Used in other check functions. */ -static int -bin_find(mstate m, mchunkptr x) -{ - size_t size = chunksize(x); - if (is_small(size)) { - bindex_t sidx = small_index(size); - sbinptr b = smallbin_at(m, sidx); - if (smallmap_is_marked(m, sidx)) { - mchunkptr p = b; - do { - if (p == x) - return 1; - } while ((p = p->fd) != b); - } - } else { - bindex_t tidx; - compute_tree_index(size, tidx); - if (treemap_is_marked(m, tidx)) { - tchunkptr t = *treebin_at(m, tidx); - size_t sizebits = size << leftshift_for_tree_index(tidx); - while (t != 0 && chunksize(t) != size) { - t = t->child[(sizebits >> (SIZE_T_BITSIZE - SIZE_T_ONE)) & 1]; - sizebits <<= 1; - } - if (t != 0) { - tchunkptr u = t; - do { - if (u == (tchunkptr) x) - return 1; - } while ((u = u->fd) != t); - } - } +static int bin_find(mstate m, mchunkptr x) { + size_t size = chunksize(x); + if (is_small(size)) { + bindex_t sidx = small_index(size); + sbinptr b = smallbin_at(m, sidx); + if (smallmap_is_marked(m, sidx)) { + mchunkptr p = b; + do { + if (p == x) + return 1; + } while ((p = p->fd) != b); } - return 0; + } + else { + bindex_t tidx; + compute_tree_index(size, tidx); + if (treemap_is_marked(m, tidx)) { + tchunkptr t = *treebin_at(m, tidx); + size_t sizebits = size << leftshift_for_tree_index(tidx); + while (t != 0 && chunksize(t) != size) { + t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; + sizebits <<= 1; + } + if (t != 0) { + tchunkptr u = t; + do { + if (u == (tchunkptr)x) + return 1; + } while ((u = u->fd) != t); + } + } + } + return 0; } /* Traverse each chunk and check it; return total */ -static size_t -traverse_and_check(mstate m) -{ - size_t sum = 0; - if (is_initialized(m)) { - msegmentptr s = &m->seg; - sum += m->topsize + TOP_FOOT_SIZE; - while (s != 0) { - mchunkptr q = align_as_chunk(s->base); - mchunkptr lastq = 0; - assert(pinuse(q)); - while (segment_holds(s, q) && - q != m->top && q->head != FENCEPOST_HEAD) { - sum += chunksize(q); - if (cinuse(q)) { - assert(!bin_find(m, q)); - do_check_inuse_chunk(m, q); - } else { - assert(q == m->dv || bin_find(m, q)); - assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */ - do_check_free_chunk(m, q); - } - lastq = q; - q = next_chunk(q); - } - s = s->next; +static size_t traverse_and_check(mstate m) { + size_t sum = 0; + if (is_initialized(m)) { + msegmentptr s = &m->seg; + sum += m->topsize + TOP_FOOT_SIZE; + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + mchunkptr lastq = 0; + assert(pinuse(q)); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + sum += chunksize(q); + if (cinuse(q)) { + assert(!bin_find(m, q)); + do_check_inuse_chunk(m, q); + } + else { + assert(q == m->dv || bin_find(m, q)); + assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */ + do_check_free_chunk(m, q); } + lastq = q; + q = next_chunk(q); + } + s = s->next; } - return sum; + } + return sum; } /* Check all properties of malloc_state. */ -static void -do_check_malloc_state(mstate m) -{ - bindex_t i; - size_t total; - /* check bins */ - for (i = 0; i < NSMALLBINS; ++i) - do_check_smallbin(m, i); - for (i = 0; i < NTREEBINS; ++i) - do_check_treebin(m, i); - - if (m->dvsize != 0) { /* check dv chunk */ - do_check_any_chunk(m, m->dv); - assert(m->dvsize == chunksize(m->dv)); - assert(m->dvsize >= MIN_CHUNK_SIZE); - assert(bin_find(m, m->dv) == 0); - } +static void do_check_malloc_state(mstate m) { + bindex_t i; + size_t total; + /* check bins */ + for (i = 0; i < NSMALLBINS; ++i) + do_check_smallbin(m, i); + for (i = 0; i < NTREEBINS; ++i) + do_check_treebin(m, i); + + if (m->dvsize != 0) { /* check dv chunk */ + do_check_any_chunk(m, m->dv); + assert(m->dvsize == chunksize(m->dv)); + assert(m->dvsize >= MIN_CHUNK_SIZE); + assert(bin_find(m, m->dv) == 0); + } - if (m->top != 0) { /* check top chunk */ - do_check_top_chunk(m, m->top); - assert(m->topsize == chunksize(m->top)); - assert(m->topsize > 0); - assert(bin_find(m, m->top) == 0); - } + if (m->top != 0) { /* check top chunk */ + do_check_top_chunk(m, m->top); + assert(m->topsize == chunksize(m->top)); + assert(m->topsize > 0); + assert(bin_find(m, m->top) == 0); + } - total = traverse_and_check(m); - assert(total <= m->footprint); - assert(m->footprint <= m->max_footprint); + total = traverse_and_check(m); + assert(total <= m->footprint); + assert(m->footprint <= m->max_footprint); } #endif /* DEBUG */ /* ----------------------------- statistics ------------------------------ */ #if !NO_MALLINFO -static struct mallinfo -internal_mallinfo(mstate m) -{ - struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - if (!PREACTION(m)) { - check_malloc_state(m); - if (is_initialized(m)) { - size_t nfree = SIZE_T_ONE; /* top always free */ - size_t mfree = m->topsize + TOP_FOOT_SIZE; - size_t sum = mfree; - msegmentptr s = &m->seg; - while (s != 0) { - mchunkptr q = align_as_chunk(s->base); - while (segment_holds(s, q) && - q != m->top && q->head != FENCEPOST_HEAD) { - size_t sz = chunksize(q); - sum += sz; - if (!cinuse(q)) { - mfree += sz; - ++nfree; - } - q = next_chunk(q); - } - s = s->next; - } - - nm.arena = sum; - nm.ordblks = nfree; - nm.hblkhd = m->footprint - sum; - nm.usmblks = m->max_footprint; - nm.uordblks = m->footprint - mfree; - nm.fordblks = mfree; - nm.keepcost = m->topsize; +static struct mallinfo internal_mallinfo(mstate m) { + struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + if (!PREACTION(m)) { + check_malloc_state(m); + if (is_initialized(m)) { + size_t nfree = SIZE_T_ONE; /* top always free */ + size_t mfree = m->topsize + TOP_FOOT_SIZE; + size_t sum = mfree; + msegmentptr s = &m->seg; + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + size_t sz = chunksize(q); + sum += sz; + if (!cinuse(q)) { + mfree += sz; + ++nfree; + } + q = next_chunk(q); } + s = s->next; + } - POSTACTION(m); + nm.arena = sum; + nm.ordblks = nfree; + nm.hblkhd = m->footprint - sum; + nm.usmblks = m->max_footprint; + nm.uordblks = m->footprint - mfree; + nm.fordblks = mfree; + nm.keepcost = m->topsize; } - return nm; + + POSTACTION(m); + } + return nm; } #endif /* !NO_MALLINFO */ -static void -internal_malloc_stats(mstate m) -{ - if (!PREACTION(m)) { +static void internal_malloc_stats(mstate m) { + if (!PREACTION(m)) { #ifndef LACKS_STDIO_H - size_t maxfp = 0; + size_t maxfp = 0; #endif - size_t fp = 0; - size_t used = 0; - check_malloc_state(m); - if (is_initialized(m)) { - msegmentptr s = &m->seg; + size_t fp = 0; + size_t used = 0; + check_malloc_state(m); + if (is_initialized(m)) { + msegmentptr s = &m->seg; #ifndef LACKS_STDIO_H - maxfp = m->max_footprint; + maxfp = m->max_footprint; #endif - fp = m->footprint; - used = fp - (m->topsize + TOP_FOOT_SIZE); - - while (s != 0) { - mchunkptr q = align_as_chunk(s->base); - while (segment_holds(s, q) && - q != m->top && q->head != FENCEPOST_HEAD) { - if (!cinuse(q)) - used -= chunksize(q); - q = next_chunk(q); - } - s = s->next; - } + fp = m->footprint; + used = fp - (m->topsize + TOP_FOOT_SIZE); + + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + if (!cinuse(q)) + used -= chunksize(q); + q = next_chunk(q); } + s = s->next; + } + } + #ifndef LACKS_STDIO_H - fprintf(stderr, "max system bytes = %10lu\n", - (unsigned long) (maxfp)); - fprintf(stderr, "system bytes = %10lu\n", (unsigned long) (fp)); - fprintf(stderr, "in use bytes = %10lu\n", (unsigned long) (used)); + fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp)); + fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp)); + fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used)); #else - (void)used; + (void)used; #endif - POSTACTION(m); - } + POSTACTION(m); + } } /* ----------------------- Operations on smallbins ----------------------- */ @@ -3286,933 +3238,911 @@ internal_malloc_stats(mstate m) */ /* Malloc using mmap */ -static void * -mmap_alloc(mstate m, size_t nb) -{ - size_t mmsize = - granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); - if (mmsize > nb) { /* Check for wrap around 0 */ - char *mm = (char *) (DIRECT_MMAP(mmsize)); - if (mm != CMFAIL) { - size_t offset = align_offset(chunk2mem(mm)); - size_t psize = mmsize - offset - MMAP_FOOT_PAD; - mchunkptr p = (mchunkptr) (mm + offset); - p->prev_foot = offset | IS_MMAPPED_BIT; - (p)->head = (psize | CINUSE_BIT); - mark_inuse_foot(m, p, psize); - chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; - chunk_plus_offset(p, psize + SIZE_T_SIZE)->head = 0; - - if (mm < m->least_addr) - m->least_addr = mm; - if ((m->footprint += mmsize) > m->max_footprint) - m->max_footprint = m->footprint; - assert(is_aligned(chunk2mem(p))); - check_mmapped_chunk(m, p); - return chunk2mem(p); - } +static void* mmap_alloc(mstate m, size_t nb) { + size_t mmsize = granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); + if (mmsize > nb) { /* Check for wrap around 0 */ + char* mm = (char*)(DIRECT_MMAP(mmsize)); + if (mm != CMFAIL) { + size_t offset = align_offset(chunk2mem(mm)); + size_t psize = mmsize - offset - MMAP_FOOT_PAD; + mchunkptr p = (mchunkptr)(mm + offset); + p->prev_foot = offset | IS_MMAPPED_BIT; + (p)->head = (psize|CINUSE_BIT); + mark_inuse_foot(m, p, psize); + chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; + chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0; + + if (mm < m->least_addr) + m->least_addr = mm; + if ((m->footprint += mmsize) > m->max_footprint) + m->max_footprint = m->footprint; + assert(is_aligned(chunk2mem(p))); + check_mmapped_chunk(m, p); + return chunk2mem(p); } - return 0; + } + return 0; } /* Realloc using mmap */ -static mchunkptr -mmap_resize(mstate m, mchunkptr oldp, size_t nb) -{ - size_t oldsize = chunksize(oldp); - if (is_small(nb)) /* Can't shrink mmap regions below small size */ - return 0; - /* Keep old chunk if big enough but not too big */ - if (oldsize >= nb + SIZE_T_SIZE && - (oldsize - nb) <= (mparams.granularity << 1)) - return oldp; - else { - size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT; - size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD; - size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES + - CHUNK_ALIGN_MASK); - char *cp = (char *) CALL_MREMAP((char *) oldp - offset, - oldmmsize, newmmsize, 1); - if (cp != CMFAIL) { - mchunkptr newp = (mchunkptr) (cp + offset); - size_t psize = newmmsize - offset - MMAP_FOOT_PAD; - newp->head = (psize | CINUSE_BIT); - mark_inuse_foot(m, newp, psize); - chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD; - chunk_plus_offset(newp, psize + SIZE_T_SIZE)->head = 0; - - if (cp < m->least_addr) - m->least_addr = cp; - if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint) - m->max_footprint = m->footprint; - check_mmapped_chunk(m, newp); - return newp; - } - } +static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) { + size_t oldsize = chunksize(oldp); + if (is_small(nb)) /* Can't shrink mmap regions below small size */ return 0; + /* Keep old chunk if big enough but not too big */ + if (oldsize >= nb + SIZE_T_SIZE && + (oldsize - nb) <= (mparams.granularity << 1)) + return oldp; + else { + size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT; + size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD; + size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES + + CHUNK_ALIGN_MASK); + char* cp = (char*)CALL_MREMAP((char*)oldp - offset, + oldmmsize, newmmsize, 1); + if (cp != CMFAIL) { + mchunkptr newp = (mchunkptr)(cp + offset); + size_t psize = newmmsize - offset - MMAP_FOOT_PAD; + newp->head = (psize|CINUSE_BIT); + mark_inuse_foot(m, newp, psize); + chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD; + chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0; + + if (cp < m->least_addr) + m->least_addr = cp; + if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint) + m->max_footprint = m->footprint; + check_mmapped_chunk(m, newp); + return newp; + } + } + return 0; } /* -------------------------- mspace management -------------------------- */ /* Initialize top chunk and its size */ -static void -init_top(mstate m, mchunkptr p, size_t psize) -{ - /* Ensure alignment */ - size_t offset = align_offset(chunk2mem(p)); - p = (mchunkptr) ((char *) p + offset); - psize -= offset; - - m->top = p; - m->topsize = psize; - p->head = psize | PINUSE_BIT; - /* set size of fake trailing chunk holding overhead space only once */ - chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; - m->trim_check = mparams.trim_threshold; /* reset on each update */ +static void init_top(mstate m, mchunkptr p, size_t psize) { + /* Ensure alignment */ + size_t offset = align_offset(chunk2mem(p)); + p = (mchunkptr)((char*)p + offset); + psize -= offset; + + m->top = p; + m->topsize = psize; + p->head = psize | PINUSE_BIT; + /* set size of fake trailing chunk holding overhead space only once */ + chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; + m->trim_check = mparams.trim_threshold; /* reset on each update */ } /* Initialize bins for a new mstate that is otherwise zeroed out */ -static void -init_bins(mstate m) -{ - /* Establish circular links for smallbins */ - bindex_t i; - for (i = 0; i < NSMALLBINS; ++i) { - sbinptr bin = smallbin_at(m, i); - bin->fd = bin->bk = bin; - } +static void init_bins(mstate m) { + /* Establish circular links for smallbins */ + bindex_t i; + for (i = 0; i < NSMALLBINS; ++i) { + sbinptr bin = smallbin_at(m,i); + bin->fd = bin->bk = bin; + } } #if PROCEED_ON_ERROR /* default corruption action */ -static void -reset_on_error(mstate m) -{ - int i; - ++malloc_corruption_error_count; - /* Reinitialize fields to forget about all memory */ - m->smallbins = m->treebins = 0; - m->dvsize = m->topsize = 0; - m->seg.base = 0; - m->seg.size = 0; - m->seg.next = 0; - m->top = m->dv = 0; - for (i = 0; i < NTREEBINS; ++i) - *treebin_at(m, i) = 0; - init_bins(m); +static void reset_on_error(mstate m) { + int i; + ++malloc_corruption_error_count; + /* Reinitialize fields to forget about all memory */ + m->smallbins = m->treebins = 0; + m->dvsize = m->topsize = 0; + m->seg.base = 0; + m->seg.size = 0; + m->seg.next = 0; + m->top = m->dv = 0; + for (i = 0; i < NTREEBINS; ++i) + *treebin_at(m, i) = 0; + init_bins(m); } #endif /* PROCEED_ON_ERROR */ /* Allocate chunk and prepend remainder with chunk in successor base. */ -static void * -prepend_alloc(mstate m, char *newbase, char *oldbase, size_t nb) -{ - mchunkptr p = align_as_chunk(newbase); - mchunkptr oldfirst = align_as_chunk(oldbase); - size_t psize = (char *) oldfirst - (char *) p; - mchunkptr q = chunk_plus_offset(p, nb); - size_t qsize = psize - nb; - set_size_and_pinuse_of_inuse_chunk(m, p, nb); - - assert((char *) oldfirst > (char *) q); - assert(pinuse(oldfirst)); - assert(qsize >= MIN_CHUNK_SIZE); - - /* consolidate remainder with first chunk of old base */ - if (oldfirst == m->top) { - size_t tsize = m->topsize += qsize; - m->top = q; - q->head = tsize | PINUSE_BIT; - check_top_chunk(m, q); - } else if (oldfirst == m->dv) { - size_t dsize = m->dvsize += qsize; - m->dv = q; - set_size_and_pinuse_of_free_chunk(q, dsize); - } else { - if (!cinuse(oldfirst)) { - size_t nsize = chunksize(oldfirst); - unlink_chunk(m, oldfirst, nsize); - oldfirst = chunk_plus_offset(oldfirst, nsize); - qsize += nsize; - } - set_free_with_pinuse(q, qsize, oldfirst); - insert_chunk(m, q, qsize); - check_free_chunk(m, q); +static void* prepend_alloc(mstate m, char* newbase, char* oldbase, + size_t nb) { + mchunkptr p = align_as_chunk(newbase); + mchunkptr oldfirst = align_as_chunk(oldbase); + size_t psize = (char*)oldfirst - (char*)p; + mchunkptr q = chunk_plus_offset(p, nb); + size_t qsize = psize - nb; + set_size_and_pinuse_of_inuse_chunk(m, p, nb); + + assert((char*)oldfirst > (char*)q); + assert(pinuse(oldfirst)); + assert(qsize >= MIN_CHUNK_SIZE); + + /* consolidate remainder with first chunk of old base */ + if (oldfirst == m->top) { + size_t tsize = m->topsize += qsize; + m->top = q; + q->head = tsize | PINUSE_BIT; + check_top_chunk(m, q); + } + else if (oldfirst == m->dv) { + size_t dsize = m->dvsize += qsize; + m->dv = q; + set_size_and_pinuse_of_free_chunk(q, dsize); + } + else { + if (!cinuse(oldfirst)) { + size_t nsize = chunksize(oldfirst); + unlink_chunk(m, oldfirst, nsize); + oldfirst = chunk_plus_offset(oldfirst, nsize); + qsize += nsize; } + set_free_with_pinuse(q, qsize, oldfirst); + insert_chunk(m, q, qsize); + check_free_chunk(m, q); + } - check_malloced_chunk(m, chunk2mem(p), nb); - return chunk2mem(p); + check_malloced_chunk(m, chunk2mem(p), nb); + return chunk2mem(p); } /* Add a segment to hold a new noncontiguous region */ -static void -add_segment(mstate m, char *tbase, size_t tsize, flag_t mmapped) -{ - /* Determine locations and sizes of segment, fenceposts, old top */ - char *old_top = (char *) m->top; - msegmentptr oldsp = segment_holding(m, old_top); - char *old_end = oldsp->base + oldsp->size; - size_t ssize = pad_request(sizeof(struct malloc_segment)); - char *rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); - size_t offset = align_offset(chunk2mem(rawsp)); - char *asp = rawsp + offset; - char *csp = (asp < (old_top + MIN_CHUNK_SIZE)) ? old_top : asp; - mchunkptr sp = (mchunkptr) csp; - msegmentptr ss = (msegmentptr) (chunk2mem(sp)); - mchunkptr tnext = chunk_plus_offset(sp, ssize); - mchunkptr p = tnext; +static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) { + /* Determine locations and sizes of segment, fenceposts, old top */ + char* old_top = (char*)m->top; + msegmentptr oldsp = segment_holding(m, old_top); + char* old_end = oldsp->base + oldsp->size; + size_t ssize = pad_request(sizeof(struct malloc_segment)); + char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); + size_t offset = align_offset(chunk2mem(rawsp)); + char* asp = rawsp + offset; + char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp; + mchunkptr sp = (mchunkptr)csp; + msegmentptr ss = (msegmentptr)(chunk2mem(sp)); + mchunkptr tnext = chunk_plus_offset(sp, ssize); + mchunkptr p = tnext; #ifdef DEBUG - int nfences = 0; + int nfences = 0; #endif - /* reset top to new space */ - init_top(m, (mchunkptr) tbase, tsize - TOP_FOOT_SIZE); - - /* Set up segment record */ - assert(is_aligned(ss)); - set_size_and_pinuse_of_inuse_chunk(m, sp, ssize); - *ss = m->seg; /* Push current record */ - m->seg.base = tbase; - m->seg.size = tsize; - m->seg.sflags = mmapped; - m->seg.next = ss; - - /* Insert trailing fenceposts */ - for (;;) { - mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); - p->head = FENCEPOST_HEAD; + /* reset top to new space */ + init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); + + /* Set up segment record */ + assert(is_aligned(ss)); + set_size_and_pinuse_of_inuse_chunk(m, sp, ssize); + *ss = m->seg; /* Push current record */ + m->seg.base = tbase; + m->seg.size = tsize; + m->seg.sflags = mmapped; + m->seg.next = ss; + + /* Insert trailing fenceposts */ + for (;;) { + mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); + p->head = FENCEPOST_HEAD; #ifdef DEBUG - ++nfences; + ++nfences; #endif - if ((char *) (&(nextp->head)) < old_end) - p = nextp; - else - break; - } + if ((char*)(&(nextp->head)) < old_end) + p = nextp; + else + break; + } #ifdef DEBUG - assert(nfences >= 2); + assert(nfences >= 2); #endif - /* Insert the rest of old top into a bin as an ordinary free chunk */ - if (csp != old_top) { - mchunkptr q = (mchunkptr) old_top; - size_t psize = csp - old_top; - mchunkptr tn = chunk_plus_offset(q, psize); - set_free_with_pinuse(q, psize, tn); - insert_chunk(m, q, psize); - } + /* Insert the rest of old top into a bin as an ordinary free chunk */ + if (csp != old_top) { + mchunkptr q = (mchunkptr)old_top; + size_t psize = csp - old_top; + mchunkptr tn = chunk_plus_offset(q, psize); + set_free_with_pinuse(q, psize, tn); + insert_chunk(m, q, psize); + } - check_top_chunk(m, m->top); + check_top_chunk(m, m->top); } /* -------------------------- System allocation -------------------------- */ /* Get memory from system using MORECORE or MMAP */ -static void * -sys_alloc(mstate m, size_t nb) -{ - char *tbase = CMFAIL; - size_t tsize = 0; - flag_t mmap_flag = 0; - - init_mparams(); - - /* Directly map large chunks */ - if (use_mmap(m) && nb >= mparams.mmap_threshold) { - void *mem = mmap_alloc(m, nb); - if (mem != 0) - return mem; - } +static void* sys_alloc(mstate m, size_t nb) { + char* tbase = CMFAIL; + size_t tsize = 0; + flag_t mmap_flag = 0; + + init_mparams(); + + /* Directly map large chunks */ + if (use_mmap(m) && nb >= mparams.mmap_threshold) { + void* mem = mmap_alloc(m, nb); + if (mem != 0) + return mem; + } - /* - Try getting memory in any of three ways (in most-preferred to - least-preferred order): - 1. A call to MORECORE that can normally contiguously extend memory. + /* + Try getting memory in any of three ways (in most-preferred to + least-preferred order): + 1. A call to MORECORE that can normally contiguously extend memory. (disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or or main space is mmapped or a previous contiguous call failed) - 2. A call to MMAP new space (disabled if not HAVE_MMAP). + 2. A call to MMAP new space (disabled if not HAVE_MMAP). Note that under the default settings, if MORECORE is unable to fulfill a request, and HAVE_MMAP is true, then mmap is used as a noncontiguous system allocator. This is a useful backup strategy for systems with holes in address spaces -- in this case sbrk cannot contiguously expand the heap, but mmap may be able to find space. - 3. A call to MORECORE that cannot usually contiguously extend memory. + 3. A call to MORECORE that cannot usually contiguously extend memory. (disabled if not HAVE_MORECORE) - */ - - if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) { - char *br = CMFAIL; - msegmentptr ss = - (m->top == 0) ? 0 : segment_holding(m, (char *) m->top); - size_t asize = 0; - ACQUIRE_MORECORE_LOCK(); - - if (ss == 0) { /* First time through or recovery */ - char *base = (char *) CALL_MORECORE(0); - if (base != CMFAIL) { - asize = - granularity_align(nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + - SIZE_T_ONE); - /* Adjust to end on a page boundary */ - if (!is_page_aligned(base)) - asize += (page_align((size_t) base) - (size_t) base); - /* Can't call MORECORE if size is negative when treated as signed */ - if (asize < HALF_MAX_SIZE_T && - (br = (char *) (CALL_MORECORE(asize))) == base) { - tbase = base; - tsize = asize; - } - } - } else { - /* Subtract out existing available top space from MORECORE request. */ - asize = - granularity_align(nb - m->topsize + TOP_FOOT_SIZE + - MALLOC_ALIGNMENT + SIZE_T_ONE); - /* Use mem here only if it did continuously extend old space */ - if (asize < HALF_MAX_SIZE_T && - (br = - (char *) (CALL_MORECORE(asize))) == ss->base + ss->size) { - tbase = br; - tsize = asize; - } + */ + + if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) { + char* br = CMFAIL; + msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top); + size_t asize = 0; + ACQUIRE_MORECORE_LOCK(); + + if (ss == 0) { /* First time through or recovery */ + char* base = (char*)CALL_MORECORE(0); + if (base != CMFAIL) { + asize = granularity_align(nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE); + /* Adjust to end on a page boundary */ + if (!is_page_aligned(base)) + asize += (page_align((size_t)base) - (size_t)base); + /* Can't call MORECORE if size is negative when treated as signed */ + if (asize < HALF_MAX_SIZE_T && + (br = (char*)(CALL_MORECORE(asize))) == base) { + tbase = base; + tsize = asize; } + } + } + else { + /* Subtract out existing available top space from MORECORE request. */ + asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE); + /* Use mem here only if it did continuously extend old space */ + if (asize < HALF_MAX_SIZE_T && + (br = (char*)(CALL_MORECORE(asize))) == ss->base+ss->size) { + tbase = br; + tsize = asize; + } + } - if (tbase == CMFAIL) { /* Cope with partial failure */ - if (br != CMFAIL) { /* Try to use/extend the space we did get */ - if (asize < HALF_MAX_SIZE_T && - asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) { - size_t esize = - granularity_align(nb + TOP_FOOT_SIZE + - MALLOC_ALIGNMENT + SIZE_T_ONE - - asize); - if (esize < HALF_MAX_SIZE_T) { - char *end = (char *) CALL_MORECORE(esize); - if (end != CMFAIL) - asize += esize; - else { /* Can't use; try to release */ - end = (char *) CALL_MORECORE(-asize); - br = CMFAIL; - } - } - } + if (tbase == CMFAIL) { /* Cope with partial failure */ + if (br != CMFAIL) { /* Try to use/extend the space we did get */ + if (asize < HALF_MAX_SIZE_T && + asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) { + size_t esize = granularity_align(nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE - asize); + if (esize < HALF_MAX_SIZE_T) { + char* end = (char*)CALL_MORECORE(esize); + if (end != CMFAIL) + asize += esize; + else { /* Can't use; try to release */ + end = (char*)CALL_MORECORE(-asize); + br = CMFAIL; } - if (br != CMFAIL) { /* Use the space we did get */ - tbase = br; - tsize = asize; - } else - disable_contiguous(m); /* Don't try contiguous path in the future */ + } } - - RELEASE_MORECORE_LOCK(); + } + if (br != CMFAIL) { /* Use the space we did get */ + tbase = br; + tsize = asize; + } + else + disable_contiguous(m); /* Don't try contiguous path in the future */ } - if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */ - size_t req = nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE; - size_t rsize = granularity_align(req); - if (rsize > nb) { /* Fail if wraps around zero */ - char *mp = (char *) (CALL_MMAP(rsize)); - if (mp != CMFAIL) { - tbase = mp; - tsize = rsize; - mmap_flag = IS_MMAPPED_BIT; - } - } + RELEASE_MORECORE_LOCK(); + } + + if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */ + size_t req = nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE; + size_t rsize = granularity_align(req); + if (rsize > nb) { /* Fail if wraps around zero */ + char* mp = (char*)(CALL_MMAP(rsize)); + if (mp != CMFAIL) { + tbase = mp; + tsize = rsize; + mmap_flag = IS_MMAPPED_BIT; + } } + } - if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */ - size_t asize = - granularity_align(nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + - SIZE_T_ONE); - if (asize < HALF_MAX_SIZE_T) { - char *br = CMFAIL; - char *end = CMFAIL; - ACQUIRE_MORECORE_LOCK(); - br = (char *) (CALL_MORECORE(asize)); - end = (char *) (CALL_MORECORE(0)); - RELEASE_MORECORE_LOCK(); - if (br != CMFAIL && end != CMFAIL && br < end) { - size_t ssize = end - br; - if (ssize > nb + TOP_FOOT_SIZE) { - tbase = br; - tsize = ssize; - } - } + if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */ + size_t asize = granularity_align(nb + TOP_FOOT_SIZE + MALLOC_ALIGNMENT + SIZE_T_ONE); + if (asize < HALF_MAX_SIZE_T) { + char* br = CMFAIL; + char* end = CMFAIL; + ACQUIRE_MORECORE_LOCK(); + br = (char*)(CALL_MORECORE(asize)); + end = (char*)(CALL_MORECORE(0)); + RELEASE_MORECORE_LOCK(); + if (br != CMFAIL && end != CMFAIL && br < end) { + size_t ssize = end - br; + if (ssize > nb + TOP_FOOT_SIZE) { + tbase = br; + tsize = ssize; } + } } + } - if (tbase != CMFAIL) { - - if ((m->footprint += tsize) > m->max_footprint) - m->max_footprint = m->footprint; - - if (!is_initialized(m)) { /* first-time initialization */ - m->seg.base = m->least_addr = tbase; - m->seg.size = tsize; - m->seg.sflags = mmap_flag; - m->magic = mparams.magic; - init_bins(m); - if (is_global(m)) - init_top(m, (mchunkptr) tbase, tsize - TOP_FOOT_SIZE); - else { - /* Offset top by embedded malloc_state */ - mchunkptr mn = next_chunk(mem2chunk(m)); - init_top(m, mn, - (size_t) ((tbase + tsize) - (char *) mn) - - TOP_FOOT_SIZE); - } - } + if (tbase != CMFAIL) { + + if ((m->footprint += tsize) > m->max_footprint) + m->max_footprint = m->footprint; + + if (!is_initialized(m)) { /* first-time initialization */ + m->seg.base = m->least_addr = tbase; + m->seg.size = tsize; + m->seg.sflags = mmap_flag; + m->magic = mparams.magic; + init_bins(m); + if (is_global(m)) + init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); + else { + /* Offset top by embedded malloc_state */ + mchunkptr mn = next_chunk(mem2chunk(m)); + init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE); + } + } - else { - /* Try to merge with an existing segment */ - msegmentptr sp = &m->seg; - while (sp != 0 && tbase != sp->base + sp->size) - sp = sp->next; - if (sp != 0 && !is_extern_segment(sp) && (sp->sflags & IS_MMAPPED_BIT) == mmap_flag && segment_holds(sp, m->top)) { /* append */ - sp->size += tsize; - init_top(m, m->top, m->topsize + tsize); - } else { - if (tbase < m->least_addr) - m->least_addr = tbase; - sp = &m->seg; - while (sp != 0 && sp->base != tbase + tsize) - sp = sp->next; - if (sp != 0 && - !is_extern_segment(sp) && - (sp->sflags & IS_MMAPPED_BIT) == mmap_flag) { - char *oldbase = sp->base; - sp->base = tbase; - sp->size += tsize; - return prepend_alloc(m, tbase, oldbase, nb); - } else - add_segment(m, tbase, tsize, mmap_flag); - } + else { + /* Try to merge with an existing segment */ + msegmentptr sp = &m->seg; + while (sp != 0 && tbase != sp->base + sp->size) + sp = sp->next; + if (sp != 0 && + !is_extern_segment(sp) && + (sp->sflags & IS_MMAPPED_BIT) == mmap_flag && + segment_holds(sp, m->top)) { /* append */ + sp->size += tsize; + init_top(m, m->top, m->topsize + tsize); + } + else { + if (tbase < m->least_addr) + m->least_addr = tbase; + sp = &m->seg; + while (sp != 0 && sp->base != tbase + tsize) + sp = sp->next; + if (sp != 0 && + !is_extern_segment(sp) && + (sp->sflags & IS_MMAPPED_BIT) == mmap_flag) { + char* oldbase = sp->base; + sp->base = tbase; + sp->size += tsize; + return prepend_alloc(m, tbase, oldbase, nb); } + else + add_segment(m, tbase, tsize, mmap_flag); + } + } - if (nb < m->topsize) { /* Allocate from new or extended top space */ - size_t rsize = m->topsize -= nb; - mchunkptr p = m->top; - mchunkptr r = m->top = chunk_plus_offset(p, nb); - r->head = rsize | PINUSE_BIT; - set_size_and_pinuse_of_inuse_chunk(m, p, nb); - check_top_chunk(m, m->top); - check_malloced_chunk(m, chunk2mem(p), nb); - return chunk2mem(p); - } + if (nb < m->topsize) { /* Allocate from new or extended top space */ + size_t rsize = m->topsize -= nb; + mchunkptr p = m->top; + mchunkptr r = m->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(m, p, nb); + check_top_chunk(m, m->top); + check_malloced_chunk(m, chunk2mem(p), nb); + return chunk2mem(p); } + } - MALLOC_FAILURE_ACTION; - return 0; + MALLOC_FAILURE_ACTION; + return 0; } /* ----------------------- system deallocation -------------------------- */ /* Unmap and unlink any mmapped segments that don't contain used chunks */ -static size_t -release_unused_segments(mstate m) -{ - size_t released = 0; - msegmentptr pred = &m->seg; - msegmentptr sp = pred->next; - while (sp != 0) { - char *base = sp->base; - size_t size = sp->size; - msegmentptr next = sp->next; - if (is_mmapped_segment(sp) && !is_extern_segment(sp)) { - mchunkptr p = align_as_chunk(base); - size_t psize = chunksize(p); - /* Can unmap if first chunk holds entire segment and not pinned */ - if (!cinuse(p) - && (char *) p + psize >= base + size - TOP_FOOT_SIZE) { - tchunkptr tp = (tchunkptr) p; - assert(segment_holds(sp, (char *) sp)); - if (p == m->dv) { - m->dv = 0; - m->dvsize = 0; - } else { - unlink_large_chunk(m, tp); - } - if (CALL_MUNMAP(base, size) == 0) { - released += size; - m->footprint -= size; - /* unlink obsoleted record */ - sp = pred; - sp->next = next; - } else { /* back out if cannot unmap */ - insert_large_chunk(m, tp, psize); - } - } +static size_t release_unused_segments(mstate m) { + size_t released = 0; + msegmentptr pred = &m->seg; + msegmentptr sp = pred->next; + while (sp != 0) { + char* base = sp->base; + size_t size = sp->size; + msegmentptr next = sp->next; + if (is_mmapped_segment(sp) && !is_extern_segment(sp)) { + mchunkptr p = align_as_chunk(base); + size_t psize = chunksize(p); + /* Can unmap if first chunk holds entire segment and not pinned */ + if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) { + tchunkptr tp = (tchunkptr)p; + assert(segment_holds(sp, (char*)sp)); + if (p == m->dv) { + m->dv = 0; + m->dvsize = 0; + } + else { + unlink_large_chunk(m, tp); + } + if (CALL_MUNMAP(base, size) == 0) { + released += size; + m->footprint -= size; + /* unlink obsoleted record */ + sp = pred; + sp->next = next; } - pred = sp; - sp = next; + else { /* back out if cannot unmap */ + insert_large_chunk(m, tp, psize); + } + } } - return released; + pred = sp; + sp = next; + } + return released; } -static int -sys_trim(mstate m, size_t pad) -{ - size_t released = 0; - if (pad < MAX_REQUEST && is_initialized(m)) { - pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ - - if (m->topsize > pad) { - /* Shrink top space in granularity-size units, keeping at least one */ - size_t unit = mparams.granularity; - size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit - - SIZE_T_ONE) * unit; - msegmentptr sp = segment_holding(m, (char *) m->top); - - if (!is_extern_segment(sp)) { - if (is_mmapped_segment(sp)) { - if (HAVE_MMAP && sp->size >= extra && !has_segment_link(m, sp)) { /* can't shrink if pinned */ - size_t newsize = sp->size - extra; - /* Prefer mremap, fall back to munmap */ - if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != - MFAIL) - || (CALL_MUNMAP(sp->base + newsize, extra) == 0)) { - released = extra; - } - } - } else if (HAVE_MORECORE) { - if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */ - extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit; - ACQUIRE_MORECORE_LOCK(); - { - /* Make sure end of memory is where we last set it. */ - char *old_br = (char *) (CALL_MORECORE(0)); - if (old_br == sp->base + sp->size) { - char *rel_br = (char *) (CALL_MORECORE(-extra)); - char *new_br = (char *) (CALL_MORECORE(0)); - if (rel_br != CMFAIL && new_br < old_br) - released = old_br - new_br; - } - } - RELEASE_MORECORE_LOCK(); - } +static int sys_trim(mstate m, size_t pad) { + size_t released = 0; + if (pad < MAX_REQUEST && is_initialized(m)) { + pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ + + if (m->topsize > pad) { + /* Shrink top space in granularity-size units, keeping at least one */ + size_t unit = mparams.granularity; + size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit - + SIZE_T_ONE) * unit; + msegmentptr sp = segment_holding(m, (char*)m->top); + + if (!is_extern_segment(sp)) { + if (is_mmapped_segment(sp)) { + if (HAVE_MMAP && + sp->size >= extra && + !has_segment_link(m, sp)) { /* can't shrink if pinned */ + size_t newsize = sp->size - extra; + /* Prefer mremap, fall back to munmap */ + if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) || + (CALL_MUNMAP(sp->base + newsize, extra) == 0)) { + released = extra; } - - if (released != 0) { - sp->size -= released; - m->footprint -= released; - init_top(m, m->top, m->topsize - released); - check_top_chunk(m, m->top); + } + } + else if (HAVE_MORECORE) { + if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */ + extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit; + ACQUIRE_MORECORE_LOCK(); + { + /* Make sure end of memory is where we last set it. */ + char* old_br = (char*)(CALL_MORECORE(0)); + if (old_br == sp->base + sp->size) { + char* rel_br = (char*)(CALL_MORECORE(-extra)); + char* new_br = (char*)(CALL_MORECORE(0)); + if (rel_br != CMFAIL && new_br < old_br) + released = old_br - new_br; } + } + RELEASE_MORECORE_LOCK(); } + } - /* Unmap any unused mmapped segments */ - if (HAVE_MMAP) - released += release_unused_segments(m); - - /* On failure, disable autotrim to avoid repeated failed future calls */ - if (released == 0) - m->trim_check = MAX_SIZE_T; + if (released != 0) { + sp->size -= released; + m->footprint -= released; + init_top(m, m->top, m->topsize - released); + check_top_chunk(m, m->top); + } } - return (released != 0) ? 1 : 0; + /* Unmap any unused mmapped segments */ + if (HAVE_MMAP) + released += release_unused_segments(m); + + /* On failure, disable autotrim to avoid repeated failed future calls */ + if (released == 0) + m->trim_check = MAX_SIZE_T; + } + + return (released != 0)? 1 : 0; } /* ---------------------------- malloc support --------------------------- */ /* allocate a large request from the best fitting chunk in a treebin */ -static void * -tmalloc_large(mstate m, size_t nb) -{ - tchunkptr v = 0; - size_t rsize = -nb; /* Unsigned negation */ - tchunkptr t; - bindex_t idx; - compute_tree_index(nb, idx); - - if ((t = *treebin_at(m, idx)) != 0) { - /* Traverse tree for this bin looking for node with size == nb */ - size_t sizebits = nb << leftshift_for_tree_index(idx); - tchunkptr rst = 0; /* The deepest untaken right subtree */ - for (;;) { - tchunkptr rt; - size_t trem = chunksize(t) - nb; - if (trem < rsize) { - v = t; - if ((rsize = trem) == 0) - break; - } - rt = t->child[1]; - t = t->child[(sizebits >> (SIZE_T_BITSIZE - SIZE_T_ONE)) & 1]; - if (rt != 0 && rt != t) - rst = rt; - if (t == 0) { - t = rst; /* set t to least subtree holding sizes > nb */ - break; - } - sizebits <<= 1; - } - } - - if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */ - binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap; - if (leftbits != 0) { - bindex_t i; - binmap_t leastbit = least_bit(leftbits); - compute_bit2idx(leastbit, i); - t = *treebin_at(m, i); - } +static void* tmalloc_large(mstate m, size_t nb) { + tchunkptr v = 0; + size_t rsize = -nb; /* Unsigned negation */ + tchunkptr t; + bindex_t idx; + compute_tree_index(nb, idx); + + if ((t = *treebin_at(m, idx)) != 0) { + /* Traverse tree for this bin looking for node with size == nb */ + size_t sizebits = nb << leftshift_for_tree_index(idx); + tchunkptr rst = 0; /* The deepest untaken right subtree */ + for (;;) { + tchunkptr rt; + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + v = t; + if ((rsize = trem) == 0) + break; + } + rt = t->child[1]; + t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; + if (rt != 0 && rt != t) + rst = rt; + if (t == 0) { + t = rst; /* set t to least subtree holding sizes > nb */ + break; + } + sizebits <<= 1; } + } - while (t != 0) { /* find smallest of tree or subtree */ - size_t trem = chunksize(t) - nb; - if (trem < rsize) { - rsize = trem; - v = t; - } - t = leftmost_child(t); + if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */ + binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap; + if (leftbits != 0) { + bindex_t i; + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + t = *treebin_at(m, i); } + } - /* If dv is a better fit, return 0 so malloc will use it */ - if (v != 0 && rsize < (size_t) (m->dvsize - nb)) { - if (RTCHECK(ok_address(m, v))) { /* split */ - mchunkptr r = chunk_plus_offset(v, nb); - assert(chunksize(v) == rsize + nb); - if (RTCHECK(ok_next(v, r))) { - unlink_large_chunk(m, v); - if (rsize < MIN_CHUNK_SIZE) - set_inuse_and_pinuse(m, v, (rsize + nb)); - else { - set_size_and_pinuse_of_inuse_chunk(m, v, nb); - set_size_and_pinuse_of_free_chunk(r, rsize); - insert_chunk(m, r, rsize); - } - return chunk2mem(v); - } + while (t != 0) { /* find smallest of tree or subtree */ + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + rsize = trem; + v = t; + } + t = leftmost_child(t); + } + + /* If dv is a better fit, return 0 so malloc will use it */ + if (v != 0 && rsize < (size_t)(m->dvsize - nb)) { + if (RTCHECK(ok_address(m, v))) { /* split */ + mchunkptr r = chunk_plus_offset(v, nb); + assert(chunksize(v) == rsize + nb); + if (RTCHECK(ok_next(v, r))) { + unlink_large_chunk(m, v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(m, v, (rsize + nb)); + else { + set_size_and_pinuse_of_inuse_chunk(m, v, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + insert_chunk(m, r, rsize); } - CORRUPTION_ERROR_ACTION(m); + return chunk2mem(v); + } } - return 0; + CORRUPTION_ERROR_ACTION(m); + } + return 0; } /* allocate a small request from the best fitting chunk in a treebin */ -static void * -tmalloc_small(mstate m, size_t nb) -{ - tchunkptr t, v; - size_t rsize; - bindex_t i; - binmap_t leastbit = least_bit(m->treemap); - compute_bit2idx(leastbit, i); - - v = t = *treebin_at(m, i); - rsize = chunksize(t) - nb; - - while ((t = leftmost_child(t)) != 0) { - size_t trem = chunksize(t) - nb; - if (trem < rsize) { - rsize = trem; - v = t; - } +static void* tmalloc_small(mstate m, size_t nb) { + tchunkptr t, v; + size_t rsize; + bindex_t i; + binmap_t leastbit = least_bit(m->treemap); + compute_bit2idx(leastbit, i); + + v = t = *treebin_at(m, i); + rsize = chunksize(t) - nb; + + while ((t = leftmost_child(t)) != 0) { + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + rsize = trem; + v = t; } + } - if (RTCHECK(ok_address(m, v))) { - mchunkptr r = chunk_plus_offset(v, nb); - assert(chunksize(v) == rsize + nb); - if (RTCHECK(ok_next(v, r))) { - unlink_large_chunk(m, v); - if (rsize < MIN_CHUNK_SIZE) - set_inuse_and_pinuse(m, v, (rsize + nb)); - else { - set_size_and_pinuse_of_inuse_chunk(m, v, nb); - set_size_and_pinuse_of_free_chunk(r, rsize); - replace_dv(m, r, rsize); - } - return chunk2mem(v); - } + if (RTCHECK(ok_address(m, v))) { + mchunkptr r = chunk_plus_offset(v, nb); + assert(chunksize(v) == rsize + nb); + if (RTCHECK(ok_next(v, r))) { + unlink_large_chunk(m, v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(m, v, (rsize + nb)); + else { + set_size_and_pinuse_of_inuse_chunk(m, v, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(m, r, rsize); + } + return chunk2mem(v); } + } - CORRUPTION_ERROR_ACTION(m); - return 0; + CORRUPTION_ERROR_ACTION(m); + return 0; } /* --------------------------- realloc support --------------------------- */ -static void * -internal_realloc(mstate m, void *oldmem, size_t bytes) -{ - if (bytes >= MAX_REQUEST) { - MALLOC_FAILURE_ACTION; - return 0; - } - if (!PREACTION(m)) { - mchunkptr oldp = mem2chunk(oldmem); - size_t oldsize = chunksize(oldp); - mchunkptr next = chunk_plus_offset(oldp, oldsize); - mchunkptr newp = 0; - void *extra = 0; - - /* Try to either shrink or extend into top. Else malloc-copy-free */ - - if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) && - ok_next(oldp, next) && ok_pinuse(next))) { - size_t nb = request2size(bytes); - if (is_mmapped(oldp)) - newp = mmap_resize(m, oldp, nb); - else if (oldsize >= nb) { /* already big enough */ - size_t rsize = oldsize - nb; - newp = oldp; - if (rsize >= MIN_CHUNK_SIZE) { - mchunkptr remainder = chunk_plus_offset(newp, nb); - set_inuse(m, newp, nb); - set_inuse(m, remainder, rsize); - extra = chunk2mem(remainder); - } - } else if (next == m->top && oldsize + m->topsize > nb) { - /* Expand into top */ - size_t newsize = oldsize + m->topsize; - size_t newtopsize = newsize - nb; - mchunkptr newtop = chunk_plus_offset(oldp, nb); - set_inuse(m, oldp, nb); - newtop->head = newtopsize | PINUSE_BIT; - m->top = newtop; - m->topsize = newtopsize; - newp = oldp; - } - } else { - USAGE_ERROR_ACTION(m, oldmem); - POSTACTION(m); - return 0; +static void* internal_realloc(mstate m, void* oldmem, size_t bytes) { + if (bytes >= MAX_REQUEST) { + MALLOC_FAILURE_ACTION; + return 0; + } + if (!PREACTION(m)) { + mchunkptr oldp = mem2chunk(oldmem); + size_t oldsize = chunksize(oldp); + mchunkptr next = chunk_plus_offset(oldp, oldsize); + mchunkptr newp = 0; + void* extra = 0; + + /* Try to either shrink or extend into top. Else malloc-copy-free */ + + if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) && + ok_next(oldp, next) && ok_pinuse(next))) { + size_t nb = request2size(bytes); + if (is_mmapped(oldp)) + newp = mmap_resize(m, oldp, nb); + else if (oldsize >= nb) { /* already big enough */ + size_t rsize = oldsize - nb; + newp = oldp; + if (rsize >= MIN_CHUNK_SIZE) { + mchunkptr remainder = chunk_plus_offset(newp, nb); + set_inuse(m, newp, nb); + set_inuse(m, remainder, rsize); + extra = chunk2mem(remainder); } + } + else if (next == m->top && oldsize + m->topsize > nb) { + /* Expand into top */ + size_t newsize = oldsize + m->topsize; + size_t newtopsize = newsize - nb; + mchunkptr newtop = chunk_plus_offset(oldp, nb); + set_inuse(m, oldp, nb); + newtop->head = newtopsize |PINUSE_BIT; + m->top = newtop; + m->topsize = newtopsize; + newp = oldp; + } + } + else { + USAGE_ERROR_ACTION(m, oldmem); + POSTACTION(m); + return 0; + } - POSTACTION(m); + POSTACTION(m); - if (newp != 0) { - if (extra != 0) { - internal_free(m, extra); - } - check_inuse_chunk(m, newp); - return chunk2mem(newp); - } else { - void *newmem = internal_malloc(m, bytes); - if (newmem != 0) { - size_t oc = oldsize - overhead_for(oldp); - memcpy(newmem, oldmem, (oc < bytes) ? oc : bytes); - internal_free(m, oldmem); - } - return newmem; - } + if (newp != 0) { + if (extra != 0) { + internal_free(m, extra); + } + check_inuse_chunk(m, newp); + return chunk2mem(newp); } - return 0; + else { + void* newmem = internal_malloc(m, bytes); + if (newmem != 0) { + size_t oc = oldsize - overhead_for(oldp); + memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); + internal_free(m, oldmem); + } + return newmem; + } + } + return 0; } /* --------------------------- memalign support -------------------------- */ -static void * -internal_memalign(mstate m, size_t alignment, size_t bytes) -{ - if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */ - return internal_malloc(m, bytes); - if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ - alignment = MIN_CHUNK_SIZE; - if ((alignment & (alignment - SIZE_T_ONE)) != 0) { /* Ensure a power of 2 */ - size_t a = MALLOC_ALIGNMENT << 1; - while (a < alignment) - a <<= 1; - alignment = a; +static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { + if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */ + return internal_malloc(m, bytes); + if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ + alignment = MIN_CHUNK_SIZE; + if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */ + size_t a = MALLOC_ALIGNMENT << 1; + while (a < alignment) a <<= 1; + alignment = a; + } + + if (bytes >= MAX_REQUEST - alignment) { + if (m != 0) { /* Test isn't needed but avoids compiler warning */ + MALLOC_FAILURE_ACTION; } - - if (bytes >= MAX_REQUEST - alignment) { - if (m != 0) { /* Test isn't needed but avoids compiler warning */ - MALLOC_FAILURE_ACTION; + } + else { + size_t nb = request2size(bytes); + size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; + char* mem = (char*)internal_malloc(m, req); + if (mem != 0) { + void* leader = 0; + void* trailer = 0; + mchunkptr p = mem2chunk(mem); + + if (PREACTION(m)) return 0; + if ((((size_t)(mem)) % alignment) != 0) { /* misaligned */ + /* + Find an aligned spot inside chunk. Since we need to give + back leading space in a chunk of at least MIN_CHUNK_SIZE, if + the first calculation places us at a spot with less than + MIN_CHUNK_SIZE leader, we can move to the next aligned spot. + We've allocated enough total room so that this is always + possible. + */ + char* br = (char*)mem2chunk((size_t)(((size_t)(mem + + alignment - + SIZE_T_ONE)) & + -alignment)); + char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)? + br : br+alignment; + mchunkptr newp = (mchunkptr)pos; + size_t leadsize = pos - (char*)(p); + size_t newsize = chunksize(p) - leadsize; + + if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */ + newp->prev_foot = p->prev_foot + leadsize; + newp->head = (newsize|CINUSE_BIT); } - } else { - size_t nb = request2size(bytes); - size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; - char *mem = (char *) internal_malloc(m, req); - if (mem != 0) { - void *leader = 0; - void *trailer = 0; - mchunkptr p = mem2chunk(mem); - - if (PREACTION(m)) - return 0; - if ((((size_t) (mem)) % alignment) != 0) { /* misaligned */ - /* - Find an aligned spot inside chunk. Since we need to give - back leading space in a chunk of at least MIN_CHUNK_SIZE, if - the first calculation places us at a spot with less than - MIN_CHUNK_SIZE leader, we can move to the next aligned spot. - We've allocated enough total room so that this is always - possible. - */ - char *br = (char *) mem2chunk((size_t) (((size_t) (mem + - alignment - - SIZE_T_ONE)) - & -alignment)); - char *pos = - ((size_t) (br - (char *) (p)) >= - MIN_CHUNK_SIZE) ? br : br + alignment; - mchunkptr newp = (mchunkptr) pos; - size_t leadsize = pos - (char *) (p); - size_t newsize = chunksize(p) - leadsize; - - if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */ - newp->prev_foot = p->prev_foot + leadsize; - newp->head = (newsize | CINUSE_BIT); - } else { /* Otherwise, give back leader, use the rest */ - set_inuse(m, newp, newsize); - set_inuse(m, p, leadsize); - leader = chunk2mem(p); - } - p = newp; - } - - /* Give back spare room at the end */ - if (!is_mmapped(p)) { - size_t size = chunksize(p); - if (size > nb + MIN_CHUNK_SIZE) { - size_t remainder_size = size - nb; - mchunkptr remainder = chunk_plus_offset(p, nb); - set_inuse(m, p, nb); - set_inuse(m, remainder, remainder_size); - trailer = chunk2mem(remainder); - } - } + else { /* Otherwise, give back leader, use the rest */ + set_inuse(m, newp, newsize); + set_inuse(m, p, leadsize); + leader = chunk2mem(p); + } + p = newp; + } - assert(chunksize(p) >= nb); - assert((((size_t) (chunk2mem(p))) % alignment) == 0); - check_inuse_chunk(m, p); - POSTACTION(m); - if (leader != 0) { - internal_free(m, leader); - } - if (trailer != 0) { - internal_free(m, trailer); - } - return chunk2mem(p); + /* Give back spare room at the end */ + if (!is_mmapped(p)) { + size_t size = chunksize(p); + if (size > nb + MIN_CHUNK_SIZE) { + size_t remainder_size = size - nb; + mchunkptr remainder = chunk_plus_offset(p, nb); + set_inuse(m, p, nb); + set_inuse(m, remainder, remainder_size); + trailer = chunk2mem(remainder); } + } + + assert (chunksize(p) >= nb); + assert((((size_t)(chunk2mem(p))) % alignment) == 0); + check_inuse_chunk(m, p); + POSTACTION(m); + if (leader != 0) { + internal_free(m, leader); + } + if (trailer != 0) { + internal_free(m, trailer); + } + return chunk2mem(p); } - return 0; + } + return 0; } /* ------------------------ comalloc/coalloc support --------------------- */ -static void ** -ialloc(mstate m, size_t n_elements, size_t * sizes, int opts, void *chunks[]) -{ - /* - This provides common support for independent_X routines, handling - all of the combinations that can result. - - The opts arg has: - bit 0 set if all elements are same size (using sizes[0]) - bit 1 set if elements should be zeroed - */ - - size_t element_size; /* chunksize of each element, if all same */ - size_t contents_size; /* total size of elements */ - size_t array_size; /* request size of pointer array */ - void *mem; /* malloced aggregate space */ - mchunkptr p; /* corresponding chunk */ - size_t remainder_size; /* remaining bytes while splitting */ - void **marray; /* either "chunks" or malloced ptr array */ - mchunkptr array_chunk; /* chunk for malloced ptr array */ - flag_t was_enabled; /* to disable mmap */ - size_t size; - size_t i; - - /* compute array length, if needed */ - if (chunks != 0) { - if (n_elements == 0) - return chunks; /* nothing to do */ - marray = chunks; - array_size = 0; - } else { - /* if empty req, must still return chunk representing empty array */ - if (n_elements == 0) - return (void **) internal_malloc(m, 0); - marray = 0; - array_size = request2size(n_elements * (sizeof(void *))); - } +static void** ialloc(mstate m, + size_t n_elements, + size_t* sizes, + int opts, + void* chunks[]) { + /* + This provides common support for independent_X routines, handling + all of the combinations that can result. + + The opts arg has: + bit 0 set if all elements are same size (using sizes[0]) + bit 1 set if elements should be zeroed + */ + + size_t element_size; /* chunksize of each element, if all same */ + size_t contents_size; /* total size of elements */ + size_t array_size; /* request size of pointer array */ + void* mem; /* malloced aggregate space */ + mchunkptr p; /* corresponding chunk */ + size_t remainder_size; /* remaining bytes while splitting */ + void** marray; /* either "chunks" or malloced ptr array */ + mchunkptr array_chunk; /* chunk for malloced ptr array */ + flag_t was_enabled; /* to disable mmap */ + size_t size; + size_t i; + + /* compute array length, if needed */ + if (chunks != 0) { + if (n_elements == 0) + return chunks; /* nothing to do */ + marray = chunks; + array_size = 0; + } + else { + /* if empty req, must still return chunk representing empty array */ + if (n_elements == 0) + return (void**)internal_malloc(m, 0); + marray = 0; + array_size = request2size(n_elements * (sizeof(void*))); + } - /* compute total element size */ - if (opts & 0x1) { /* all-same-size */ - element_size = request2size(*sizes); - contents_size = n_elements * element_size; - } else { /* add up all the sizes */ - element_size = 0; - contents_size = 0; - for (i = 0; i != n_elements; ++i) - contents_size += request2size(sizes[i]); - } + /* compute total element size */ + if (opts & 0x1) { /* all-same-size */ + element_size = request2size(*sizes); + contents_size = n_elements * element_size; + } + else { /* add up all the sizes */ + element_size = 0; + contents_size = 0; + for (i = 0; i != n_elements; ++i) + contents_size += request2size(sizes[i]); + } - size = contents_size + array_size; - - /* - Allocate the aggregate chunk. First disable direct-mmapping so - malloc won't use it, since we would not be able to later - free/realloc space internal to a segregated mmap region. - */ - was_enabled = use_mmap(m); - disable_mmap(m); - mem = internal_malloc(m, size - CHUNK_OVERHEAD); - if (was_enabled) - enable_mmap(m); - if (mem == 0) - return 0; - - if (PREACTION(m)) - return 0; - p = mem2chunk(mem); - remainder_size = chunksize(p); - - assert(!is_mmapped(p)); - - if (opts & 0x2) { /* optionally clear the elements */ - memset((size_t *) mem, 0, remainder_size - SIZE_T_SIZE - array_size); - } + size = contents_size + array_size; + + /* + Allocate the aggregate chunk. First disable direct-mmapping so + malloc won't use it, since we would not be able to later + free/realloc space internal to a segregated mmap region. + */ + was_enabled = use_mmap(m); + disable_mmap(m); + mem = internal_malloc(m, size - CHUNK_OVERHEAD); + if (was_enabled) + enable_mmap(m); + if (mem == 0) + return 0; - /* If not provided, allocate the pointer array as final part of chunk */ - if (marray == 0) { - size_t array_chunk_size; - array_chunk = chunk_plus_offset(p, contents_size); - array_chunk_size = remainder_size - contents_size; - marray = (void **) (chunk2mem(array_chunk)); - set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size); - remainder_size = contents_size; - } + if (PREACTION(m)) return 0; + p = mem2chunk(mem); + remainder_size = chunksize(p); - /* split out elements */ - for (i = 0;; ++i) { - marray[i] = chunk2mem(p); - if (i != n_elements - 1) { - if (element_size != 0) - size = element_size; - else - size = request2size(sizes[i]); - remainder_size -= size; - set_size_and_pinuse_of_inuse_chunk(m, p, size); - p = chunk_plus_offset(p, size); - } else { /* the final element absorbs any overallocation slop */ - set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size); - break; - } + assert(!is_mmapped(p)); + + if (opts & 0x2) { /* optionally clear the elements */ + memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size); + } + + /* If not provided, allocate the pointer array as final part of chunk */ + if (marray == 0) { + size_t array_chunk_size; + array_chunk = chunk_plus_offset(p, contents_size); + array_chunk_size = remainder_size - contents_size; + marray = (void**) (chunk2mem(array_chunk)); + set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size); + remainder_size = contents_size; + } + + /* split out elements */ + for (i = 0; ; ++i) { + marray[i] = chunk2mem(p); + if (i != n_elements-1) { + if (element_size != 0) + size = element_size; + else + size = request2size(sizes[i]); + remainder_size -= size; + set_size_and_pinuse_of_inuse_chunk(m, p, size); + p = chunk_plus_offset(p, size); + } + else { /* the final element absorbs any overallocation slop */ + set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size); + break; } + } #if DEBUG - if (marray != chunks) { - /* final element must have exactly exhausted chunk */ - if (element_size != 0) { - assert(remainder_size == element_size); - } else { - assert(remainder_size == request2size(sizes[i])); - } - check_inuse_chunk(m, mem2chunk(marray)); + if (marray != chunks) { + /* final element must have exactly exhausted chunk */ + if (element_size != 0) { + assert(remainder_size == element_size); } - for (i = 0; i != n_elements; ++i) - check_inuse_chunk(m, mem2chunk(marray[i])); + else { + assert(remainder_size == request2size(sizes[i])); + } + check_inuse_chunk(m, mem2chunk(marray)); + } + for (i = 0; i != n_elements; ++i) + check_inuse_chunk(m, mem2chunk(marray[i])); #endif /* DEBUG */ - POSTACTION(m); - return marray; + POSTACTION(m); + return marray; } @@ -4220,369 +4150,343 @@ ialloc(mstate m, size_t n_elements, size_t * sizes, int opts, void *chunks[]) #if !ONLY_MSPACES -void * -dlmalloc(size_t bytes) -{ - /* - Basic algorithm: - If a small request (< 256 bytes minus per-chunk overhead): +void* dlmalloc(size_t bytes) { + /* + Basic algorithm: + If a small request (< 256 bytes minus per-chunk overhead): 1. If one exists, use a remainderless chunk in associated smallbin. - (Remainderless means that there are too few excess bytes to - represent as a chunk.) + (Remainderless means that there are too few excess bytes to + represent as a chunk.) 2. If it is big enough, use the dv chunk, which is normally the - chunk adjacent to the one used for the most recent small request. + chunk adjacent to the one used for the most recent small request. 3. If one exists, split the smallest available chunk in a bin, - saving remainder in dv. + saving remainder in dv. 4. If it is big enough, use the top chunk. 5. If available, get memory from system and use it - Otherwise, for a large request: + Otherwise, for a large request: 1. Find the smallest available binned chunk that fits, and use it - if it is better fitting than dv chunk, splitting if necessary. + if it is better fitting than dv chunk, splitting if necessary. 2. If better fitting than any binned chunk, use the dv chunk. 3. If it is big enough, use the top chunk. 4. If request size >= mmap threshold, try to directly mmap this chunk. 5. If available, get memory from system and use it - The ugly goto's here ensure that postaction occurs along all paths. - */ - - if (!PREACTION(gm)) { - void *mem; - size_t nb; - if (bytes <= MAX_SMALL_REQUEST) { - bindex_t idx; - binmap_t smallbits; - nb = (bytes < MIN_REQUEST) ? MIN_CHUNK_SIZE : pad_request(bytes); - idx = small_index(nb); - smallbits = gm->smallmap >> idx; - - if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ - mchunkptr b, p; - idx += ~smallbits & 1; /* Uses next bin if idx empty */ - b = smallbin_at(gm, idx); - p = b->fd; - assert(chunksize(p) == small_index2size(idx)); - unlink_first_small_chunk(gm, b, p, idx); - set_inuse_and_pinuse(gm, p, small_index2size(idx)); - mem = chunk2mem(p); - check_malloced_chunk(gm, mem, nb); - goto postaction; - } - - else if (nb > gm->dvsize) { - if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ - mchunkptr b, p, r; - size_t rsize; - bindex_t i; - binmap_t leftbits = - (smallbits << idx) & left_bits(idx2bit(idx)); - binmap_t leastbit = least_bit(leftbits); - compute_bit2idx(leastbit, i); - b = smallbin_at(gm, i); - p = b->fd; - assert(chunksize(p) == small_index2size(i)); - unlink_first_small_chunk(gm, b, p, i); - rsize = small_index2size(i) - nb; - /* Fit here cannot be remainderless if 4byte sizes */ - if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) - set_inuse_and_pinuse(gm, p, small_index2size(i)); - else { - set_size_and_pinuse_of_inuse_chunk(gm, p, nb); - r = chunk_plus_offset(p, nb); - set_size_and_pinuse_of_free_chunk(r, rsize); - replace_dv(gm, r, rsize); - } - mem = chunk2mem(p); - check_malloced_chunk(gm, mem, nb); - goto postaction; - } - - else if (gm->treemap != 0 - && (mem = tmalloc_small(gm, nb)) != 0) { - check_malloced_chunk(gm, mem, nb); - goto postaction; - } - } - } else if (bytes >= MAX_REQUEST) - nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ - else { - nb = pad_request(bytes); - if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) { - check_malloced_chunk(gm, mem, nb); - goto postaction; - } - } + The ugly goto's here ensure that postaction occurs along all paths. + */ + + if (!PREACTION(gm)) { + void* mem; + size_t nb; + if (bytes <= MAX_SMALL_REQUEST) { + bindex_t idx; + binmap_t smallbits; + nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); + idx = small_index(nb); + smallbits = gm->smallmap >> idx; + + if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ + mchunkptr b, p; + idx += ~smallbits & 1; /* Uses next bin if idx empty */ + b = smallbin_at(gm, idx); + p = b->fd; + assert(chunksize(p) == small_index2size(idx)); + unlink_first_small_chunk(gm, b, p, idx); + set_inuse_and_pinuse(gm, p, small_index2size(idx)); + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } - if (nb <= gm->dvsize) { - size_t rsize = gm->dvsize - nb; - mchunkptr p = gm->dv; - if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ - mchunkptr r = gm->dv = chunk_plus_offset(p, nb); - gm->dvsize = rsize; - set_size_and_pinuse_of_free_chunk(r, rsize); - set_size_and_pinuse_of_inuse_chunk(gm, p, nb); - } else { /* exhaust dv */ - size_t dvs = gm->dvsize; - gm->dvsize = 0; - gm->dv = 0; - set_inuse_and_pinuse(gm, p, dvs); - } - mem = chunk2mem(p); - check_malloced_chunk(gm, mem, nb); - goto postaction; + else if (nb > gm->dvsize) { + if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ + mchunkptr b, p, r; + size_t rsize; + bindex_t i; + binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + b = smallbin_at(gm, i); + p = b->fd; + assert(chunksize(p) == small_index2size(i)); + unlink_first_small_chunk(gm, b, p, i); + rsize = small_index2size(i) - nb; + /* Fit here cannot be remainderless if 4byte sizes */ + if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(gm, p, small_index2size(i)); + else { + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + r = chunk_plus_offset(p, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(gm, r, rsize); + } + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; } - else if (nb < gm->topsize) { /* Split top */ - size_t rsize = gm->topsize -= nb; - mchunkptr p = gm->top; - mchunkptr r = gm->top = chunk_plus_offset(p, nb); - r->head = rsize | PINUSE_BIT; - set_size_and_pinuse_of_inuse_chunk(gm, p, nb); - mem = chunk2mem(p); - check_top_chunk(gm, gm->top); - check_malloced_chunk(gm, mem, nb); - goto postaction; + else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) { + check_malloced_chunk(gm, mem, nb); + goto postaction; } + } + } + else if (bytes >= MAX_REQUEST) + nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ + else { + nb = pad_request(bytes); + if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) { + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + } - mem = sys_alloc(gm, nb); + if (nb <= gm->dvsize) { + size_t rsize = gm->dvsize - nb; + mchunkptr p = gm->dv; + if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ + mchunkptr r = gm->dv = chunk_plus_offset(p, nb); + gm->dvsize = rsize; + set_size_and_pinuse_of_free_chunk(r, rsize); + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + } + else { /* exhaust dv */ + size_t dvs = gm->dvsize; + gm->dvsize = 0; + gm->dv = 0; + set_inuse_and_pinuse(gm, p, dvs); + } + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } - postaction: - POSTACTION(gm); - return mem; + else if (nb < gm->topsize) { /* Split top */ + size_t rsize = gm->topsize -= nb; + mchunkptr p = gm->top; + mchunkptr r = gm->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + mem = chunk2mem(p); + check_top_chunk(gm, gm->top); + check_malloced_chunk(gm, mem, nb); + goto postaction; } - return 0; + mem = sys_alloc(gm, nb); + + postaction: + POSTACTION(gm); + return mem; + } + + return 0; } -void -dlfree(void *mem) -{ - /* - Consolidate freed chunks with preceeding or succeeding bordering - free chunks, if they exist, and then place in a bin. Intermixed - with special cases for top, dv, mmapped chunks, and usage errors. - */ +void dlfree(void* mem) { + /* + Consolidate freed chunks with preceeding or succeeding bordering + free chunks, if they exist, and then place in a bin. Intermixed + with special cases for top, dv, mmapped chunks, and usage errors. + */ - if (mem != 0) { - mchunkptr p = mem2chunk(mem); + if (mem != 0) { + mchunkptr p = mem2chunk(mem); #if FOOTERS - mstate fm = get_mstate_for(p); - if (!ok_magic(fm)) { - USAGE_ERROR_ACTION(fm, p); - return; - } + mstate fm = get_mstate_for(p); + if (!ok_magic(fm)) { + USAGE_ERROR_ACTION(fm, p); + return; + } #else /* FOOTERS */ #define fm gm #endif /* FOOTERS */ - if (!PREACTION(fm)) { - check_inuse_chunk(fm, p); - if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { - size_t psize = chunksize(p); - mchunkptr next = chunk_plus_offset(p, psize); - if (!pinuse(p)) { - size_t prevsize = p->prev_foot; - if ((prevsize & IS_MMAPPED_BIT) != 0) { - prevsize &= ~IS_MMAPPED_BIT; - psize += prevsize + MMAP_FOOT_PAD; - if (CALL_MUNMAP((char *) p - prevsize, psize) == 0) - fm->footprint -= psize; - goto postaction; - } else { - mchunkptr prev = chunk_minus_offset(p, prevsize); - psize += prevsize; - p = prev; - if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ - if (p != fm->dv) { - unlink_chunk(fm, p, prevsize); - } else if ((next->head & INUSE_BITS) == - INUSE_BITS) { - fm->dvsize = psize; - set_free_with_pinuse(p, psize, next); - goto postaction; - } - } else - goto erroraction; - } - } - - if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { - if (!cinuse(next)) { /* consolidate forward */ - if (next == fm->top) { - size_t tsize = fm->topsize += psize; - fm->top = p; - p->head = tsize | PINUSE_BIT; - if (p == fm->dv) { - fm->dv = 0; - fm->dvsize = 0; - } - if (should_trim(fm, tsize)) - sys_trim(fm, 0); - goto postaction; - } else if (next == fm->dv) { - size_t dsize = fm->dvsize += psize; - fm->dv = p; - set_size_and_pinuse_of_free_chunk(p, dsize); - goto postaction; - } else { - size_t nsize = chunksize(next); - psize += nsize; - unlink_chunk(fm, next, nsize); - set_size_and_pinuse_of_free_chunk(p, psize); - if (p == fm->dv) { - fm->dvsize = psize; - goto postaction; - } - } - } else - set_free_with_pinuse(p, psize, next); - insert_chunk(fm, p, psize); - check_free_chunk(fm, p); - goto postaction; - } + if (!PREACTION(fm)) { + check_inuse_chunk(fm, p); + if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { + size_t psize = chunksize(p); + mchunkptr next = chunk_plus_offset(p, psize); + if (!pinuse(p)) { + size_t prevsize = p->prev_foot; + if ((prevsize & IS_MMAPPED_BIT) != 0) { + prevsize &= ~IS_MMAPPED_BIT; + psize += prevsize + MMAP_FOOT_PAD; + if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) + fm->footprint -= psize; + goto postaction; + } + else { + mchunkptr prev = chunk_minus_offset(p, prevsize); + psize += prevsize; + p = prev; + if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ + if (p != fm->dv) { + unlink_chunk(fm, p, prevsize); + } + else if ((next->head & INUSE_BITS) == INUSE_BITS) { + fm->dvsize = psize; + set_free_with_pinuse(p, psize, next); + goto postaction; + } + } + else + goto erroraction; + } + } + + if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { + if (!cinuse(next)) { /* consolidate forward */ + if (next == fm->top) { + size_t tsize = fm->topsize += psize; + fm->top = p; + p->head = tsize | PINUSE_BIT; + if (p == fm->dv) { + fm->dv = 0; + fm->dvsize = 0; + } + if (should_trim(fm, tsize)) + sys_trim(fm, 0); + goto postaction; + } + else if (next == fm->dv) { + size_t dsize = fm->dvsize += psize; + fm->dv = p; + set_size_and_pinuse_of_free_chunk(p, dsize); + goto postaction; } - erroraction: - USAGE_ERROR_ACTION(fm, p); - postaction: - POSTACTION(fm); + else { + size_t nsize = chunksize(next); + psize += nsize; + unlink_chunk(fm, next, nsize); + set_size_and_pinuse_of_free_chunk(p, psize); + if (p == fm->dv) { + fm->dvsize = psize; + goto postaction; + } + } + } + else + set_free_with_pinuse(p, psize, next); + insert_chunk(fm, p, psize); + check_free_chunk(fm, p); + goto postaction; } + } + erroraction: + USAGE_ERROR_ACTION(fm, p); + postaction: + POSTACTION(fm); } + } #if !FOOTERS #undef fm #endif /* FOOTERS */ } -void * -dlcalloc(size_t n_elements, size_t elem_size) -{ - void *mem; - size_t req = 0; - if (n_elements != 0) { - req = n_elements * elem_size; - if (((n_elements | elem_size) & ~(size_t) 0xffff) && - (req / n_elements != elem_size)) - req = MAX_SIZE_T; /* force downstream failure on overflow */ - } - mem = dlmalloc(req); - if (mem != 0 && calloc_must_clear(mem2chunk(mem))) - memset(mem, 0, req); - return mem; +void* dlcalloc(size_t n_elements, size_t elem_size) { + void* mem; + size_t req = 0; + if (n_elements != 0) { + req = n_elements * elem_size; + if (((n_elements | elem_size) & ~(size_t)0xffff) && + (req / n_elements != elem_size)) + req = MAX_SIZE_T; /* force downstream failure on overflow */ + } + mem = dlmalloc(req); + if (mem != 0 && calloc_must_clear(mem2chunk(mem))) + memset(mem, 0, req); + return mem; } -void * -dlrealloc(void *oldmem, size_t bytes) -{ - if (oldmem == 0) - return dlmalloc(bytes); +void* dlrealloc(void* oldmem, size_t bytes) { + if (oldmem == 0) + return dlmalloc(bytes); #ifdef REALLOC_ZERO_BYTES_FREES - if (bytes == 0) { - dlfree(oldmem); - return 0; - } + if (bytes == 0) { + dlfree(oldmem); + return 0; + } #endif /* REALLOC_ZERO_BYTES_FREES */ - else { + else { #if ! FOOTERS - mstate m = gm; + mstate m = gm; #else /* FOOTERS */ - mstate m = get_mstate_for(mem2chunk(oldmem)); - if (!ok_magic(m)) { - USAGE_ERROR_ACTION(m, oldmem); - return 0; - } -#endif /* FOOTERS */ - return internal_realloc(m, oldmem, bytes); + mstate m = get_mstate_for(mem2chunk(oldmem)); + if (!ok_magic(m)) { + USAGE_ERROR_ACTION(m, oldmem); + return 0; } +#endif /* FOOTERS */ + return internal_realloc(m, oldmem, bytes); + } } -void * -dlmemalign(size_t alignment, size_t bytes) -{ - return internal_memalign(gm, alignment, bytes); +void* dlmemalign(size_t alignment, size_t bytes) { + return internal_memalign(gm, alignment, bytes); } -void ** -dlindependent_calloc(size_t n_elements, size_t elem_size, void *chunks[]) -{ - size_t sz = elem_size; /* serves as 1-element array */ - return ialloc(gm, n_elements, &sz, 3, chunks); +void** dlindependent_calloc(size_t n_elements, size_t elem_size, + void* chunks[]) { + size_t sz = elem_size; /* serves as 1-element array */ + return ialloc(gm, n_elements, &sz, 3, chunks); } -void ** -dlindependent_comalloc(size_t n_elements, size_t sizes[], void *chunks[]) -{ - return ialloc(gm, n_elements, sizes, 0, chunks); +void** dlindependent_comalloc(size_t n_elements, size_t sizes[], + void* chunks[]) { + return ialloc(gm, n_elements, sizes, 0, chunks); } -void * -dlvalloc(size_t bytes) -{ - size_t pagesz; - init_mparams(); - pagesz = mparams.page_size; - return dlmemalign(pagesz, bytes); +void* dlvalloc(size_t bytes) { + size_t pagesz; + init_mparams(); + pagesz = mparams.page_size; + return dlmemalign(pagesz, bytes); } -void * -dlpvalloc(size_t bytes) -{ - size_t pagesz; - init_mparams(); - pagesz = mparams.page_size; - return dlmemalign(pagesz, - (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE)); +void* dlpvalloc(size_t bytes) { + size_t pagesz; + init_mparams(); + pagesz = mparams.page_size; + return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE)); } -int -dlmalloc_trim(size_t pad) -{ - int result = 0; - if (!PREACTION(gm)) { - result = sys_trim(gm, pad); - POSTACTION(gm); - } - return result; +int dlmalloc_trim(size_t pad) { + int result = 0; + if (!PREACTION(gm)) { + result = sys_trim(gm, pad); + POSTACTION(gm); + } + return result; } -size_t -dlmalloc_footprint(void) -{ - return gm->footprint; +size_t dlmalloc_footprint(void) { + return gm->footprint; } -size_t -dlmalloc_max_footprint(void) -{ - return gm->max_footprint; +size_t dlmalloc_max_footprint(void) { + return gm->max_footprint; } #if !NO_MALLINFO -struct mallinfo -dlmallinfo(void) -{ - return internal_mallinfo(gm); +struct mallinfo dlmallinfo(void) { + return internal_mallinfo(gm); } #endif /* NO_MALLINFO */ -void -dlmalloc_stats() -{ - internal_malloc_stats(gm); +void dlmalloc_stats() { + internal_malloc_stats(gm); } -size_t -dlmalloc_usable_size(void *mem) -{ - if (mem != 0) { - mchunkptr p = mem2chunk(mem); - if (cinuse(p)) - return chunksize(p) - overhead_for(p); - } - return 0; +size_t dlmalloc_usable_size(void* mem) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); + if (cinuse(p)) + return chunksize(p) - overhead_for(p); + } + return 0; } -int -dlmallopt(int param_number, int value) -{ - return change_mparam(param_number, value); +int dlmallopt(int param_number, int value) { + return change_mparam(param_number, value); } #endif /* !ONLY_MSPACES */ @@ -4591,85 +4495,78 @@ dlmallopt(int param_number, int value) #if MSPACES -static mstate -init_user_mstate(char *tbase, size_t tsize) -{ - size_t msize = pad_request(sizeof(struct malloc_state)); - mchunkptr mn; - mchunkptr msp = align_as_chunk(tbase); - mstate m = (mstate) (chunk2mem(msp)); - memset(m, 0, msize); - INITIAL_LOCK(&m->mutex); - msp->head = (msize | PINUSE_BIT | CINUSE_BIT); - m->seg.base = m->least_addr = tbase; - m->seg.size = m->footprint = m->max_footprint = tsize; - m->magic = mparams.magic; - m->mflags = mparams.default_mflags; - disable_contiguous(m); - init_bins(m); - mn = next_chunk(mem2chunk(m)); - init_top(m, mn, (size_t) ((tbase + tsize) - (char *) mn) - TOP_FOOT_SIZE); - check_top_chunk(m, m->top); - return m; +static mstate init_user_mstate(char* tbase, size_t tsize) { + size_t msize = pad_request(sizeof(struct malloc_state)); + mchunkptr mn; + mchunkptr msp = align_as_chunk(tbase); + mstate m = (mstate)(chunk2mem(msp)); + memset(m, 0, msize); + INITIAL_LOCK(&m->mutex); + msp->head = (msize|PINUSE_BIT|CINUSE_BIT); + m->seg.base = m->least_addr = tbase; + m->seg.size = m->footprint = m->max_footprint = tsize; + m->magic = mparams.magic; + m->mflags = mparams.default_mflags; + disable_contiguous(m); + init_bins(m); + mn = next_chunk(mem2chunk(m)); + init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE); + check_top_chunk(m, m->top); + return m; } -mspace -create_mspace(size_t capacity, int locked) -{ - mstate m = 0; - size_t msize = pad_request(sizeof(struct malloc_state)); - init_mparams(); /* Ensure pagesize etc initialized */ - - if (capacity < (size_t) - (msize + TOP_FOOT_SIZE + mparams.page_size)) { - size_t rs = ((capacity == 0) ? mparams.granularity : - (capacity + TOP_FOOT_SIZE + msize)); - size_t tsize = granularity_align(rs); - char *tbase = (char *) (CALL_MMAP(tsize)); - if (tbase != CMFAIL) { - m = init_user_mstate(tbase, tsize); - m->seg.sflags = IS_MMAPPED_BIT; - set_lock(m, locked); - } +mspace create_mspace(size_t capacity, int locked) { + mstate m = 0; + size_t msize = pad_request(sizeof(struct malloc_state)); + init_mparams(); /* Ensure pagesize etc initialized */ + + if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { + size_t rs = ((capacity == 0)? mparams.granularity : + (capacity + TOP_FOOT_SIZE + msize)); + size_t tsize = granularity_align(rs); + char* tbase = (char*)(CALL_MMAP(tsize)); + if (tbase != CMFAIL) { + m = init_user_mstate(tbase, tsize); + m->seg.sflags = IS_MMAPPED_BIT; + set_lock(m, locked); } - return (mspace) m; + } + return (mspace)m; } -mspace -create_mspace_with_base(void *base, size_t capacity, int locked) -{ - mstate m = 0; - size_t msize = pad_request(sizeof(struct malloc_state)); - init_mparams(); /* Ensure pagesize etc initialized */ - - if (capacity > msize + TOP_FOOT_SIZE && - capacity < (size_t) - (msize + TOP_FOOT_SIZE + mparams.page_size)) { - m = init_user_mstate((char *) base, capacity); - m->seg.sflags = EXTERN_BIT; - set_lock(m, locked); - } - return (mspace) m; +mspace create_mspace_with_base(void* base, size_t capacity, int locked) { + mstate m = 0; + size_t msize = pad_request(sizeof(struct malloc_state)); + init_mparams(); /* Ensure pagesize etc initialized */ + + if (capacity > msize + TOP_FOOT_SIZE && + capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { + m = init_user_mstate((char*)base, capacity); + m->seg.sflags = EXTERN_BIT; + set_lock(m, locked); + } + return (mspace)m; } -size_t -destroy_mspace(mspace msp) -{ - size_t freed = 0; - mstate ms = (mstate) msp; - if (ok_magic(ms)) { - msegmentptr sp = &ms->seg; - while (sp != 0) { - char *base = sp->base; - size_t size = sp->size; - flag_t flag = sp->sflags; - sp = sp->next; - if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) && - CALL_MUNMAP(base, size) == 0) - freed += size; - } - } else { - USAGE_ERROR_ACTION(ms, ms); +size_t destroy_mspace(mspace msp) { + size_t freed = 0; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + msegmentptr sp = &ms->seg; + while (sp != 0) { + char* base = sp->base; + size_t size = sp->size; + flag_t flag = sp->sflags; + sp = sp->next; + if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) && + CALL_MUNMAP(base, size) == 0) + freed += size; } - return freed; + } + else { + USAGE_ERROR_ACTION(ms,ms); + } + return freed; } /* @@ -4678,363 +4575,344 @@ destroy_mspace(mspace msp) */ -void * -mspace_malloc(mspace msp, size_t bytes) -{ - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - if (!PREACTION(ms)) { - void *mem; - size_t nb; - if (bytes <= MAX_SMALL_REQUEST) { - bindex_t idx; - binmap_t smallbits; - nb = (bytes < MIN_REQUEST) ? MIN_CHUNK_SIZE : pad_request(bytes); - idx = small_index(nb); - smallbits = ms->smallmap >> idx; - - if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ - mchunkptr b, p; - idx += ~smallbits & 1; /* Uses next bin if idx empty */ - b = smallbin_at(ms, idx); - p = b->fd; - assert(chunksize(p) == small_index2size(idx)); - unlink_first_small_chunk(ms, b, p, idx); - set_inuse_and_pinuse(ms, p, small_index2size(idx)); - mem = chunk2mem(p); - check_malloced_chunk(ms, mem, nb); - goto postaction; - } - - else if (nb > ms->dvsize) { - if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ - mchunkptr b, p, r; - size_t rsize; - bindex_t i; - binmap_t leftbits = - (smallbits << idx) & left_bits(idx2bit(idx)); - binmap_t leastbit = least_bit(leftbits); - compute_bit2idx(leastbit, i); - b = smallbin_at(ms, i); - p = b->fd; - assert(chunksize(p) == small_index2size(i)); - unlink_first_small_chunk(ms, b, p, i); - rsize = small_index2size(i) - nb; - /* Fit here cannot be remainderless if 4byte sizes */ - if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) - set_inuse_and_pinuse(ms, p, small_index2size(i)); - else { - set_size_and_pinuse_of_inuse_chunk(ms, p, nb); - r = chunk_plus_offset(p, nb); - set_size_and_pinuse_of_free_chunk(r, rsize); - replace_dv(ms, r, rsize); - } - mem = chunk2mem(p); - check_malloced_chunk(ms, mem, nb); - goto postaction; - } - - else if (ms->treemap != 0 - && (mem = tmalloc_small(ms, nb)) != 0) { - check_malloced_chunk(ms, mem, nb); - goto postaction; - } - } - } else if (bytes >= MAX_REQUEST) - nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ - else { - nb = pad_request(bytes); - if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) { - check_malloced_chunk(ms, mem, nb); - goto postaction; - } - } +void* mspace_malloc(mspace msp, size_t bytes) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + if (!PREACTION(ms)) { + void* mem; + size_t nb; + if (bytes <= MAX_SMALL_REQUEST) { + bindex_t idx; + binmap_t smallbits; + nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); + idx = small_index(nb); + smallbits = ms->smallmap >> idx; + + if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ + mchunkptr b, p; + idx += ~smallbits & 1; /* Uses next bin if idx empty */ + b = smallbin_at(ms, idx); + p = b->fd; + assert(chunksize(p) == small_index2size(idx)); + unlink_first_small_chunk(ms, b, p, idx); + set_inuse_and_pinuse(ms, p, small_index2size(idx)); + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } - if (nb <= ms->dvsize) { - size_t rsize = ms->dvsize - nb; - mchunkptr p = ms->dv; - if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ - mchunkptr r = ms->dv = chunk_plus_offset(p, nb); - ms->dvsize = rsize; - set_size_and_pinuse_of_free_chunk(r, rsize); - set_size_and_pinuse_of_inuse_chunk(ms, p, nb); - } else { /* exhaust dv */ - size_t dvs = ms->dvsize; - ms->dvsize = 0; - ms->dv = 0; - set_inuse_and_pinuse(ms, p, dvs); - } - mem = chunk2mem(p); - check_malloced_chunk(ms, mem, nb); - goto postaction; + else if (nb > ms->dvsize) { + if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ + mchunkptr b, p, r; + size_t rsize; + bindex_t i; + binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + b = smallbin_at(ms, i); + p = b->fd; + assert(chunksize(p) == small_index2size(i)); + unlink_first_small_chunk(ms, b, p, i); + rsize = small_index2size(i) - nb; + /* Fit here cannot be remainderless if 4byte sizes */ + if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(ms, p, small_index2size(i)); + else { + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + r = chunk_plus_offset(p, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(ms, r, rsize); + } + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; } - else if (nb < ms->topsize) { /* Split top */ - size_t rsize = ms->topsize -= nb; - mchunkptr p = ms->top; - mchunkptr r = ms->top = chunk_plus_offset(p, nb); - r->head = rsize | PINUSE_BIT; - set_size_and_pinuse_of_inuse_chunk(ms, p, nb); - mem = chunk2mem(p); - check_top_chunk(ms, ms->top); - check_malloced_chunk(ms, mem, nb); - goto postaction; + else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) { + check_malloced_chunk(ms, mem, nb); + goto postaction; } + } + } + else if (bytes >= MAX_REQUEST) + nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ + else { + nb = pad_request(bytes); + if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) { + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + } - mem = sys_alloc(ms, nb); + if (nb <= ms->dvsize) { + size_t rsize = ms->dvsize - nb; + mchunkptr p = ms->dv; + if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ + mchunkptr r = ms->dv = chunk_plus_offset(p, nb); + ms->dvsize = rsize; + set_size_and_pinuse_of_free_chunk(r, rsize); + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + } + else { /* exhaust dv */ + size_t dvs = ms->dvsize; + ms->dvsize = 0; + ms->dv = 0; + set_inuse_and_pinuse(ms, p, dvs); + } + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } - postaction: - POSTACTION(ms); - return mem; + else if (nb < ms->topsize) { /* Split top */ + size_t rsize = ms->topsize -= nb; + mchunkptr p = ms->top; + mchunkptr r = ms->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + mem = chunk2mem(p); + check_top_chunk(ms, ms->top); + check_malloced_chunk(ms, mem, nb); + goto postaction; } - return 0; + mem = sys_alloc(ms, nb); + + postaction: + POSTACTION(ms); + return mem; + } + + return 0; } -void -mspace_free(mspace msp, void *mem) -{ - if (mem != 0) { - mchunkptr p = mem2chunk(mem); +void mspace_free(mspace msp, void* mem) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); #if FOOTERS - mstate fm = get_mstate_for(p); + mstate fm = get_mstate_for(p); #else /* FOOTERS */ - mstate fm = (mstate) msp; + mstate fm = (mstate)msp; #endif /* FOOTERS */ - if (!ok_magic(fm)) { - USAGE_ERROR_ACTION(fm, p); - return; + if (!ok_magic(fm)) { + USAGE_ERROR_ACTION(fm, p); + return; + } + if (!PREACTION(fm)) { + check_inuse_chunk(fm, p); + if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { + size_t psize = chunksize(p); + mchunkptr next = chunk_plus_offset(p, psize); + if (!pinuse(p)) { + size_t prevsize = p->prev_foot; + if ((prevsize & IS_MMAPPED_BIT) != 0) { + prevsize &= ~IS_MMAPPED_BIT; + psize += prevsize + MMAP_FOOT_PAD; + if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) + fm->footprint -= psize; + goto postaction; + } + else { + mchunkptr prev = chunk_minus_offset(p, prevsize); + psize += prevsize; + p = prev; + if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ + if (p != fm->dv) { + unlink_chunk(fm, p, prevsize); + } + else if ((next->head & INUSE_BITS) == INUSE_BITS) { + fm->dvsize = psize; + set_free_with_pinuse(p, psize, next); + goto postaction; + } + } + else + goto erroraction; + } } - if (!PREACTION(fm)) { - check_inuse_chunk(fm, p); - if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { - size_t psize = chunksize(p); - mchunkptr next = chunk_plus_offset(p, psize); - if (!pinuse(p)) { - size_t prevsize = p->prev_foot; - if ((prevsize & IS_MMAPPED_BIT) != 0) { - prevsize &= ~IS_MMAPPED_BIT; - psize += prevsize + MMAP_FOOT_PAD; - if (CALL_MUNMAP((char *) p - prevsize, psize) == 0) - fm->footprint -= psize; - goto postaction; - } else { - mchunkptr prev = chunk_minus_offset(p, prevsize); - psize += prevsize; - p = prev; - if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ - if (p != fm->dv) { - unlink_chunk(fm, p, prevsize); - } else if ((next->head & INUSE_BITS) == - INUSE_BITS) { - fm->dvsize = psize; - set_free_with_pinuse(p, psize, next); - goto postaction; - } - } else - goto erroraction; - } - } - - if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { - if (!cinuse(next)) { /* consolidate forward */ - if (next == fm->top) { - size_t tsize = fm->topsize += psize; - fm->top = p; - p->head = tsize | PINUSE_BIT; - if (p == fm->dv) { - fm->dv = 0; - fm->dvsize = 0; - } - if (should_trim(fm, tsize)) - sys_trim(fm, 0); - goto postaction; - } else if (next == fm->dv) { - size_t dsize = fm->dvsize += psize; - fm->dv = p; - set_size_and_pinuse_of_free_chunk(p, dsize); - goto postaction; - } else { - size_t nsize = chunksize(next); - psize += nsize; - unlink_chunk(fm, next, nsize); - set_size_and_pinuse_of_free_chunk(p, psize); - if (p == fm->dv) { - fm->dvsize = psize; - goto postaction; - } - } - } else - set_free_with_pinuse(p, psize, next); - insert_chunk(fm, p, psize); - check_free_chunk(fm, p); - goto postaction; - } + + if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { + if (!cinuse(next)) { /* consolidate forward */ + if (next == fm->top) { + size_t tsize = fm->topsize += psize; + fm->top = p; + p->head = tsize | PINUSE_BIT; + if (p == fm->dv) { + fm->dv = 0; + fm->dvsize = 0; + } + if (should_trim(fm, tsize)) + sys_trim(fm, 0); + goto postaction; + } + else if (next == fm->dv) { + size_t dsize = fm->dvsize += psize; + fm->dv = p; + set_size_and_pinuse_of_free_chunk(p, dsize); + goto postaction; } - erroraction: - USAGE_ERROR_ACTION(fm, p); - postaction: - POSTACTION(fm); + else { + size_t nsize = chunksize(next); + psize += nsize; + unlink_chunk(fm, next, nsize); + set_size_and_pinuse_of_free_chunk(p, psize); + if (p == fm->dv) { + fm->dvsize = psize; + goto postaction; + } + } + } + else + set_free_with_pinuse(p, psize, next); + insert_chunk(fm, p, psize); + check_free_chunk(fm, p); + goto postaction; } + } + erroraction: + USAGE_ERROR_ACTION(fm, p); + postaction: + POSTACTION(fm); } + } } -void * -mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) -{ - void *mem; - size_t req = 0; - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - if (n_elements != 0) { - req = n_elements * elem_size; - if (((n_elements | elem_size) & ~(size_t) 0xffff) && - (req / n_elements != elem_size)) - req = MAX_SIZE_T; /* force downstream failure on overflow */ - } - mem = internal_malloc(ms, req); - if (mem != 0 && calloc_must_clear(mem2chunk(mem))) - memset(mem, 0, req); - return mem; +void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) { + void* mem; + size_t req = 0; + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + if (n_elements != 0) { + req = n_elements * elem_size; + if (((n_elements | elem_size) & ~(size_t)0xffff) && + (req / n_elements != elem_size)) + req = MAX_SIZE_T; /* force downstream failure on overflow */ + } + mem = internal_malloc(ms, req); + if (mem != 0 && calloc_must_clear(mem2chunk(mem))) + memset(mem, 0, req); + return mem; } -void * -mspace_realloc(mspace msp, void *oldmem, size_t bytes) -{ - if (oldmem == 0) - return mspace_malloc(msp, bytes); +void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) { + if (oldmem == 0) + return mspace_malloc(msp, bytes); #ifdef REALLOC_ZERO_BYTES_FREES - if (bytes == 0) { - mspace_free(msp, oldmem); - return 0; - } + if (bytes == 0) { + mspace_free(msp, oldmem); + return 0; + } #endif /* REALLOC_ZERO_BYTES_FREES */ - else { + else { #if FOOTERS - mchunkptr p = mem2chunk(oldmem); - mstate ms = get_mstate_for(p); + mchunkptr p = mem2chunk(oldmem); + mstate ms = get_mstate_for(p); #else /* FOOTERS */ - mstate ms = (mstate) msp; + mstate ms = (mstate)msp; #endif /* FOOTERS */ - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - return internal_realloc(ms, oldmem, bytes); + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; } + return internal_realloc(ms, oldmem, bytes); + } } -void * -mspace_memalign(mspace msp, size_t alignment, size_t bytes) -{ - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - return internal_memalign(ms, alignment, bytes); +void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return internal_memalign(ms, alignment, bytes); } -void ** -mspace_independent_calloc(mspace msp, size_t n_elements, - size_t elem_size, void *chunks[]) -{ - size_t sz = elem_size; /* serves as 1-element array */ - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - return ialloc(ms, n_elements, &sz, 3, chunks); +void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]) { + size_t sz = elem_size; /* serves as 1-element array */ + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return ialloc(ms, n_elements, &sz, 3, chunks); } -void ** -mspace_independent_comalloc(mspace msp, size_t n_elements, - size_t sizes[], void *chunks[]) -{ - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - return 0; - } - return ialloc(ms, n_elements, sizes, 0, chunks); +void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return ialloc(ms, n_elements, sizes, 0, chunks); } -int -mspace_trim(mspace msp, size_t pad) -{ - int result = 0; - mstate ms = (mstate) msp; - if (ok_magic(ms)) { - if (!PREACTION(ms)) { - result = sys_trim(ms, pad); - POSTACTION(ms); - } - } else { - USAGE_ERROR_ACTION(ms, ms); +int mspace_trim(mspace msp, size_t pad) { + int result = 0; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + if (!PREACTION(ms)) { + result = sys_trim(ms, pad); + POSTACTION(ms); } - return result; + } + else { + USAGE_ERROR_ACTION(ms,ms); + } + return result; } -void -mspace_malloc_stats(mspace msp) -{ - mstate ms = (mstate) msp; - if (ok_magic(ms)) { - internal_malloc_stats(ms); - } else { - USAGE_ERROR_ACTION(ms, ms); - } +void mspace_malloc_stats(mspace msp) { + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + internal_malloc_stats(ms); + } + else { + USAGE_ERROR_ACTION(ms,ms); + } } -size_t -mspace_footprint(mspace msp) -{ - size_t result; - mstate ms = (mstate) msp; - if (ok_magic(ms)) { - result = ms->footprint; - } - USAGE_ERROR_ACTION(ms, ms); - return result; +size_t mspace_footprint(mspace msp) { + size_t result; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + result = ms->footprint; + } + USAGE_ERROR_ACTION(ms,ms); + return result; } -size_t -mspace_max_footprint(mspace msp) -{ - size_t result; - mstate ms = (mstate) msp; - if (ok_magic(ms)) { - result = ms->max_footprint; - } - USAGE_ERROR_ACTION(ms, ms); - return result; +size_t mspace_max_footprint(mspace msp) { + size_t result; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + result = ms->max_footprint; + } + USAGE_ERROR_ACTION(ms,ms); + return result; } #if !NO_MALLINFO -struct mallinfo -mspace_mallinfo(mspace msp) -{ - mstate ms = (mstate) msp; - if (!ok_magic(ms)) { - USAGE_ERROR_ACTION(ms, ms); - } - return internal_mallinfo(ms); +struct mallinfo mspace_mallinfo(mspace msp) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + } + return internal_mallinfo(ms); } #endif /* NO_MALLINFO */ -int -mspace_mallopt(int param_number, int value) -{ - return change_mparam(param_number, value); +int mspace_mallopt(int param_number, int value) { + return change_mparam(param_number, value); } #endif /* MSPACES */ @@ -5309,7 +5187,7 @@ History: Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu) * Based loosely on libg++-1.2X malloc. (It retains some of the overall structure of old version, but most details differ.) - + */ #endif /* !HAVE_MALLOC */ diff --git a/modules/SDL2/src/stdlib/SDL_mslibc.c b/modules/SDL2/src/stdlib/SDL_mslibc.c index 541f55d..677f401 100644 --- a/modules/SDL2/src/stdlib/SDL_mslibc.c +++ b/modules/SDL2/src/stdlib/SDL_mslibc.c @@ -41,26 +41,28 @@ __declspec(selectany) int _fltused = 1; /* The optimizer on Visual Studio 2005 and later generates memcpy() and memset() calls. Always provide it for the SDL2 DLL, but skip it when building static lib w/ static runtime. */ #if (_MSC_VER >= 1400) && (!defined(_MT) || defined(DLL_EXPORT)) -extern void *memcpy(void* dst, const void* src, size_t len); +/* NOLINTNEXTLINE(readability-redundant-declaration) */ +extern void *memcpy(void *dst, const void *src, size_t len); #pragma intrinsic(memcpy) #if !defined(__clang__) #pragma function(memcpy) #endif -void * -memcpy(void *dst, const void *src, size_t len) +/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */ +void *memcpy(void *dst, const void *src, size_t len) { return SDL_memcpy(dst, src, len); } -extern void *memset(void* dst, int c, size_t len); +/* NOLINTNEXTLINE(readability-redundant-declaration) */ +extern void *memset(void *dst, int c, size_t len); #pragma intrinsic(memset) #if !defined(__clang__) #pragma function(memset) #endif -void * -memset(void *dst, int c, size_t len) +/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */ +void *memset(void *dst, int c, size_t len) { return SDL_memset(dst, c, len); } @@ -69,9 +71,7 @@ memset(void *dst, int c, size_t len) #ifdef _M_IX86 /* Float to long */ -void -__declspec(naked) -_ftol() +void __declspec(naked) _ftol() { /* *INDENT-OFF* */ __asm { @@ -120,22 +120,18 @@ localexit: /* *INDENT-ON* */ } -void -_ftol2_sse() +void _ftol2_sse() { _ftol(); } -void -_ftol2() +void _ftol2() { _ftol(); } /* 64-bit math operators for 32-bit systems */ -void -__declspec(naked) -_allmul() +void __declspec(naked) _allmul() { /* *INDENT-OFF* */ __asm { @@ -163,9 +159,7 @@ hard: /* *INDENT-ON* */ } -void -__declspec(naked) -_alldiv() +void __declspec(naked) _alldiv() { /* *INDENT-OFF* */ __asm { @@ -251,9 +245,7 @@ L8: /* *INDENT-ON* */ } -void -__declspec(naked) -_aulldiv() +void __declspec(naked) _aulldiv() { /* *INDENT-OFF* */ __asm { @@ -309,9 +301,7 @@ L2: /* *INDENT-ON* */ } -void -__declspec(naked) -_allrem() +void __declspec(naked) _allrem() { /* *INDENT-OFF* */ __asm { @@ -396,9 +386,7 @@ L8: /* *INDENT-ON* */ } -void -__declspec(naked) -_aullrem() +void __declspec(naked) _aullrem() { /* *INDENT-OFF* */ __asm { @@ -455,9 +443,7 @@ L2: /* *INDENT-ON* */ } -void -__declspec(naked) -_alldvrm() +void __declspec(naked) _alldvrm() { /* *INDENT-OFF* */ __asm { @@ -565,9 +551,7 @@ L8: /* *INDENT-ON* */ } -void -__declspec(naked) -_aulldvrm() +void __declspec(naked) _aulldvrm() { /* *INDENT-OFF* */ __asm { @@ -638,9 +622,7 @@ L2: /* *INDENT-ON* */ } -void -__declspec(naked) -_allshl() +void __declspec(naked) _allshl() { /* *INDENT-OFF* */ __asm { @@ -665,9 +647,7 @@ RETZERO: /* *INDENT-ON* */ } -void -__declspec(naked) -_allshr() +void __declspec(naked) _allshr() { /* *INDENT-OFF* */ __asm { @@ -692,9 +672,7 @@ RETSIGN: /* *INDENT-ON* */ } -void -__declspec(naked) -_aullshr() +void __declspec(naked) _aullshr() { /* *INDENT-OFF* */ __asm { @@ -723,6 +701,19 @@ RETZERO: #endif /* MSC_VER */ +#if defined(__ICL) +/* The classic Intel compiler generates calls to _intel_fast_memcpy + * and _intel_fast_memset when building an optimized SDL library */ +void *_intel_fast_memcpy(void *dst, const void *src, size_t len) +{ + return SDL_memcpy(dst, src, len); +} +void *_intel_fast_memset(void *dst, int c, size_t len) +{ + return SDL_memset(dst, c, len); +} +#endif + #endif /* !HAVE_LIBC && !SDL_STATIC_LIB */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/stdlib/SDL_qsort.c b/modules/SDL2/src/stdlib/SDL_qsort.c index 17180a9..5d1c7ef 100644 --- a/modules/SDL2/src/stdlib/SDL_qsort.c +++ b/modules/SDL2/src/stdlib/SDL_qsort.c @@ -28,8 +28,7 @@ #include "SDL_stdinc.h" #if defined(HAVE_QSORT) -void -SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) +void SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) { qsort(base, nmemb, size, compare); } @@ -534,8 +533,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size, #endif /* HAVE_QSORT */ -void * -SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *)) +void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *)) { #if defined(HAVE_BSEARCH) return bsearch(key, base, nmemb, size, compare); diff --git a/modules/SDL2/src/stdlib/SDL_stdlib.c b/modules/SDL2/src/stdlib/SDL_stdlib.c index fc59e20..8c9d196 100644 --- a/modules/SDL2/src/stdlib/SDL_stdlib.c +++ b/modules/SDL2/src/stdlib/SDL_stdlib.c @@ -30,7 +30,6 @@ #include "SDL_stdinc.h" #include "../libm/math_libm.h" - double SDL_atan(double x) { @@ -41,8 +40,7 @@ SDL_atan(double x) #endif } -float -SDL_atanf(float x) +float SDL_atanf(float x) { #if defined(HAVE_ATANF) return atanf(x); @@ -61,8 +59,7 @@ SDL_atan2(double y, double x) #endif } -float -SDL_atan2f(float y, float x) +float SDL_atan2f(float y, float x) { #if defined(HAVE_ATAN2F) return atan2f(y, x); @@ -91,8 +88,7 @@ SDL_acos(double val) #endif } -float -SDL_acosf(float val) +float SDL_acosf(float val) { #if defined(HAVE_ACOSF) return acosf(val); @@ -117,8 +113,7 @@ SDL_asin(double val) #endif } -float -SDL_asinf(float val) +float SDL_asinf(float val) { #if defined(HAVE_ASINF) return asinf(val); @@ -142,8 +137,7 @@ SDL_ceil(double x) #endif /* HAVE_CEIL */ } -float -SDL_ceilf(float x) +float SDL_ceilf(float x) { #if defined(HAVE_CEILF) return ceilf(x); @@ -161,8 +155,8 @@ SDL_copysign(double x, double y) return _copysign(x, y); #elif defined(__WATCOMC__) && defined(__386__) /* this is nasty as hell, but it works.. */ - unsigned int *xi = (unsigned int *) &x, - *yi = (unsigned int *) &y; + unsigned int *xi = (unsigned int *)&x, + *yi = (unsigned int *)&y; xi[1] = (yi[1] & 0x80000000) | (xi[1] & 0x7fffffff); return x; #else @@ -170,8 +164,7 @@ SDL_copysign(double x, double y) #endif /* HAVE_COPYSIGN */ } -float -SDL_copysignf(float x, float y) +float SDL_copysignf(float x, float y) { #if defined(HAVE_COPYSIGNF) return copysignf(x, y); @@ -190,8 +183,7 @@ SDL_cos(double x) #endif } -float -SDL_cosf(float x) +float SDL_cosf(float x) { #if defined(HAVE_COSF) return cosf(x); @@ -210,8 +202,7 @@ SDL_exp(double x) #endif } -float -SDL_expf(float x) +float SDL_expf(float x) { #if defined(HAVE_EXPF) return expf(x); @@ -230,8 +221,7 @@ SDL_fabs(double x) #endif } -float -SDL_fabsf(float x) +float SDL_fabsf(float x) { #if defined(HAVE_FABSF) return fabsf(x); @@ -250,8 +240,7 @@ SDL_floor(double x) #endif } -float -SDL_floorf(float x) +float SDL_floorf(float x) { #if defined(HAVE_FLOORF) return floorf(x); @@ -274,8 +263,7 @@ SDL_trunc(double x) #endif } -float -SDL_truncf(float x) +float SDL_truncf(float x) { #if defined(HAVE_TRUNCF) return truncf(x); @@ -294,8 +282,7 @@ SDL_fmod(double x, double y) #endif } -float -SDL_fmodf(float x, float y) +float SDL_fmodf(float x, float y) { #if defined(HAVE_FMODF) return fmodf(x, y); @@ -314,8 +301,7 @@ SDL_log(double x) #endif } -float -SDL_logf(float x) +float SDL_logf(float x) { #if defined(HAVE_LOGF) return logf(x); @@ -334,8 +320,7 @@ SDL_log10(double x) #endif } -float -SDL_log10f(float x) +float SDL_log10f(float x) { #if defined(HAVE_LOG10F) return log10f(x); @@ -354,8 +339,7 @@ SDL_pow(double x, double y) #endif } -float -SDL_powf(float x, float y) +float SDL_powf(float x, float y) { #if defined(HAVE_POWF) return powf(x, y); @@ -378,8 +362,7 @@ SDL_round(double arg) #endif } -float -SDL_roundf(float arg) +float SDL_roundf(float arg) { #if defined HAVE_ROUNDF return roundf(arg); @@ -388,8 +371,7 @@ SDL_roundf(float arg) #endif } -long -SDL_lround(double arg) +long SDL_lround(double arg) { #if defined HAVE_LROUND return lround(arg); @@ -398,8 +380,7 @@ SDL_lround(double arg) #endif } -long -SDL_lroundf(float arg) +long SDL_lroundf(float arg) { #if defined HAVE_LROUNDF return lroundf(arg); @@ -416,16 +397,15 @@ SDL_scalbn(double x, int n) #elif defined(HAVE__SCALB) return _scalb(x, n); #elif defined(HAVE_LIBC) && defined(HAVE_FLOAT_H) && (FLT_RADIX == 2) -/* from scalbn(3): If FLT_RADIX equals 2 (which is - * usual), then scalbn() is equivalent to ldexp(3). */ + /* from scalbn(3): If FLT_RADIX equals 2 (which is + * usual), then scalbn() is equivalent to ldexp(3). */ return ldexp(x, n); #else return SDL_uclibc_scalbn(x, n); #endif } -float -SDL_scalbnf(float x, int n) +float SDL_scalbnf(float x, int n) { #if defined(HAVE_SCALBNF) return scalbnf(x, n); @@ -444,8 +424,7 @@ SDL_sin(double x) #endif } -float -SDL_sinf(float x) +float SDL_sinf(float x) { #if defined(HAVE_SINF) return sinf(x); @@ -464,8 +443,7 @@ SDL_sqrt(double x) #endif } -float -SDL_sqrtf(float x) +float SDL_sqrtf(float x) { #if defined(HAVE_SQRTF) return sqrtf(x); @@ -484,8 +462,7 @@ SDL_tan(double x) #endif } -float -SDL_tanf(float x) +float SDL_tanf(float x) { #if defined(HAVE_TANF) return tanf(x); @@ -504,7 +481,10 @@ int SDL_abs(int x) } #if defined(HAVE_CTYPE_H) -int SDL_isalpha(int x) { return isalpha(x); } +int SDL_isalpha(int x) +{ + return isalpha(x); +} int SDL_isalnum(int x) { return isalnum(x); } int SDL_isdigit(int x) { return isdigit(x); } int SDL_isxdigit(int x) { return isxdigit(x); } @@ -518,7 +498,10 @@ int SDL_iscntrl(int x) { return iscntrl(x); } int SDL_toupper(int x) { return toupper(x); } int SDL_tolower(int x) { return tolower(x); } #else -int SDL_isalpha(int x) { return (SDL_isupper(x)) || (SDL_islower(x)); } +int SDL_isalpha(int x) +{ + return (SDL_isupper(x)) || (SDL_islower(x)); +} int SDL_isalnum(int x) { return (SDL_isalpha(x)) || (SDL_isdigit(x)); } int SDL_isdigit(int x) { return ((x) >= '0') && ((x) <= '9'); } int SDL_isxdigit(int x) { return (((x) >= 'A') && ((x) <= 'F')) || (((x) >= 'a') && ((x) <= 'f')) || (SDL_isdigit(x)); } @@ -529,14 +512,13 @@ int SDL_islower(int x) { return ((x) >= 'a') && ((x) <= 'z'); } int SDL_isprint(int x) { return ((x) >= ' ') && ((x) < '\x7f'); } int SDL_isgraph(int x) { return (SDL_isprint(x)) && ((x) != ' '); } int SDL_iscntrl(int x) { return (((x) >= '\0') && ((x) <= '\x1f')) || ((x) == '\x7f'); } -int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); } -int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); } +int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A' + ((x) - 'a')) : (x); } +int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a' + ((x) - 'A')) : (x); } #endif /* This file contains a portable memcpy manipulation function for SDL */ -void * -SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) +void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) { #ifdef __GNUC__ /* Presumably this is well tuned for speed. @@ -566,15 +548,15 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, Uint32 *srcp4, *dstp4; Uint8 *srcp1, *dstp1; - srcp4 = (Uint32 *) src; - dstp4 = (Uint32 *) dst; + srcp4 = (Uint32 *)src; + dstp4 = (Uint32 *)dst; len /= 4; while (len--) { *dstp4++ = *srcp4++; } - srcp1 = (Uint8 *) srcp4; - dstp1 = (Uint8 *) dstp4; + srcp1 = (Uint8 *)srcp4; + dstp1 = (Uint8 *)dstp4; switch (left) { case 3: *dstp1++ = *srcp1++; @@ -588,15 +570,14 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, #endif /* __GNUC__ */ } -void * -SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) +void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) { #if defined(HAVE_MEMSET) return memset(dst, c, len); #else size_t left; Uint32 *dstp4; - Uint8 *dstp1 = (Uint8 *) dst; + Uint8 *dstp1 = (Uint8 *)dst; Uint8 value1; Uint32 value4; @@ -616,14 +597,14 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) } value4 = ((Uint32)c | ((Uint32)c << 8) | ((Uint32)c << 16) | ((Uint32)c << 24)); - dstp4 = (Uint32 *) dstp1; + dstp4 = (Uint32 *)dstp1; left = (len % 4); len /= 4; while (len--) { *dstp4++ = value4; } - dstp1 = (Uint8 *) dstp4; + dstp1 = (Uint8 *)dstp4; switch (left) { case 3: *dstp1++ = value1; @@ -638,9 +619,15 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) } #if defined(HAVE_CTYPE_H) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -int SDL_isblank(int x) { return isblank(x); } +int SDL_isblank(int x) +{ + return isblank(x); +} #else -int SDL_isblank(int x) { return ((x) == ' ') || ((x) == '\t'); } +int SDL_isblank(int x) +{ + return ((x) == ' ') || ((x) == '\t'); +} #endif /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/stdlib/SDL_string.c b/modules/SDL2/src/stdlib/SDL_string.c index 5c3f012..09c4489 100644 --- a/modules/SDL2/src/stdlib/SDL_string.c +++ b/modules/SDL2/src/stdlib/SDL_string.c @@ -34,28 +34,28 @@ #endif #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) || !defined(HAVE_STRTOLL) || !defined(HAVE_STRTOULL) -#define SDL_isupperhex(X) (((X) >= 'A') && ((X) <= 'F')) -#define SDL_islowerhex(X) (((X) >= 'a') && ((X) <= 'f')) +#define SDL_isupperhex(X) (((X) >= 'A') && ((X) <= 'F')) +#define SDL_islowerhex(X) (((X) >= 'a') && ((X) <= 'f')) #endif -#define UTF8_IsLeadByte(c) ((c) >= 0xC0 && (c) <= 0xF4) +#define UTF8_IsLeadByte(c) ((c) >= 0xC0 && (c) <= 0xF4) #define UTF8_IsTrailingByte(c) ((c) >= 0x80 && (c) <= 0xBF) -static unsigned UTF8_TrailingBytes(unsigned char c) +static size_t UTF8_TrailingBytes(unsigned char c) { - if (c >= 0xC0 && c <= 0xDF) + if (c >= 0xC0 && c <= 0xDF) { return 1; - else if (c >= 0xE0 && c <= 0xEF) + } else if (c >= 0xE0 && c <= 0xEF) { return 2; - else if (c >= 0xF0 && c <= 0xF4) + } else if (c >= 0xF0 && c <= 0xF4) { return 3; - else - return 0; + } + + return 0; } #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) -static size_t -SDL_ScanLong(const char *text, int count, int radix, long *valuep) +static size_t SDL_ScanLong(const char *text, int count, int radix, long *valuep) { const char *textstart = text; long value = 0; @@ -70,7 +70,7 @@ SDL_ScanLong(const char *text, int count, int radix, long *valuep) } for (;;) { int v; - if (SDL_isdigit((unsigned char) *text)) { + if (SDL_isdigit((unsigned char)*text)) { v = *text - '0'; } else if (radix == 16 && SDL_isupperhex(*text)) { v = 10 + (*text - 'A'); @@ -94,13 +94,12 @@ SDL_ScanLong(const char *text, int count, int radix, long *valuep) *valuep = value; } } - return (text - textstart); + return text - textstart; } #endif #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) -static size_t -SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valuep) +static size_t SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valuep) { const char *textstart = text; unsigned long value = 0; @@ -114,7 +113,7 @@ SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valu } for (;;) { int v; - if (SDL_isdigit((unsigned char) *text)) { + if (SDL_isdigit((unsigned char)*text)) { v = *text - '0'; } else if (radix == 16 && SDL_isupperhex(*text)) { v = 10 + (*text - 'A'); @@ -134,13 +133,12 @@ SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valu if (valuep && text > textstart) { *valuep = value; } - return (text - textstart); + return text - textstart; } #endif #ifndef HAVE_VSSCANF -static size_t -SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep) +static size_t SDL_ScanUintPtrT(const char *text, int radix, uintptr_t *valuep) { const char *textstart = text; uintptr_t value = 0; @@ -150,7 +148,7 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep) } for (;;) { int v; - if (SDL_isdigit((unsigned char) *text)) { + if (SDL_isdigit((unsigned char)*text)) { v = *text - '0'; } else if (radix == 16 && SDL_isupperhex(*text)) { v = 10 + (*text - 'A'); @@ -166,13 +164,12 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep) if (valuep && text > textstart) { *valuep = value; } - return (text - textstart); + return text - textstart; } #endif #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOLL) || !defined(HAVE_STRTOULL) -static size_t -SDL_ScanLongLong(const char *text, int count, int radix, Sint64 * valuep) +static size_t SDL_ScanLongLong(const char *text, int count, int radix, Sint64 *valuep) { const char *textstart = text; Sint64 value = 0; @@ -187,7 +184,7 @@ SDL_ScanLongLong(const char *text, int count, int radix, Sint64 * valuep) } for (;;) { int v; - if (SDL_isdigit((unsigned char) *text)) { + if (SDL_isdigit((unsigned char)*text)) { v = *text - '0'; } else if (radix == 16 && SDL_isupperhex(*text)) { v = 10 + (*text - 'A'); @@ -211,13 +208,12 @@ SDL_ScanLongLong(const char *text, int count, int radix, Sint64 * valuep) *valuep = value; } } - return (text - textstart); + return text - textstart; } #endif #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOULL) -static size_t -SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 * valuep) +static size_t SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 *valuep) { const char *textstart = text; Uint64 value = 0; @@ -231,7 +227,7 @@ SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 * valuep } for (;;) { int v; - if (SDL_isdigit((unsigned char) *text)) { + if (SDL_isdigit((unsigned char)*text)) { v = *text - '0'; } else if (radix == 16 && SDL_isupperhex(*text)) { v = 10 + (*text - 'A'); @@ -251,13 +247,12 @@ SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 * valuep if (valuep && text > textstart) { *valuep = value; } - return (text - textstart); + return text - textstart; } #endif #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOD) -static size_t -SDL_ScanFloat(const char *text, double *valuep) +static size_t SDL_ScanFloat(const char *text, double *valuep) { const char *textstart = text; unsigned long lvalue = 0; @@ -273,9 +268,9 @@ SDL_ScanFloat(const char *text, double *valuep) if (*text == '.') { int mult = 10; ++text; - while (SDL_isdigit((unsigned char) *text)) { + while (SDL_isdigit((unsigned char)*text)) { lvalue = *text - '0'; - value += (double) lvalue / mult; + value += (double)lvalue / mult; mult *= 10; ++text; } @@ -287,18 +282,17 @@ SDL_ScanFloat(const char *text, double *valuep) *valuep = value; } } - return (text - textstart); + return text - textstart; } #endif -void * -SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) +void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) { #if defined(HAVE_MEMMOVE) return memmove(dst, src, len); #else - char *srcp = (char *) src; - char *dstp = (char *) dst; + char *srcp = (char *)src; + char *dstp = (char *)dst; if (src < dst) { srcp += len - 1; @@ -315,8 +309,7 @@ SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, #endif /* HAVE_MEMMOVE */ } -int -SDL_memcmp(const void *s1, const void *s2, size_t len) +int SDL_memcmp(const void *s1, const void *s2, size_t len) { #if defined(__vita__) /* @@ -332,11 +325,11 @@ SDL_memcmp(const void *s1, const void *s2, size_t len) #elif defined(HAVE_MEMCMP) return memcmp(s1, s2, len); #else - char *s1p = (char *) s1; - char *s2p = (char *) s2; + char *s1p = (char *)s1; + char *s2p = (char *)s2; while (len--) { if (*s1p != *s2p) { - return (*s1p - *s2p); + return *s1p - *s2p; } ++s1p; ++s2p; @@ -360,7 +353,7 @@ SDL_strlen(const char *string) } size_t -SDL_wcslen(const wchar_t * string) +SDL_wcslen(const wchar_t *string) { #if defined(HAVE_WCSLEN) return wcslen(string); @@ -404,8 +397,7 @@ SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t max #endif /* HAVE_WCSLCAT */ } -wchar_t * -SDL_wcsdup(const wchar_t *string) +wchar_t *SDL_wcsdup(const wchar_t *string) { size_t len = ((SDL_wcslen(string) + 1) * sizeof(wchar_t)); wchar_t *newstr = (wchar_t *)SDL_malloc(len); @@ -415,11 +407,10 @@ SDL_wcsdup(const wchar_t *string) return newstr; } -wchar_t * -SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle) +wchar_t *SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle) { #if defined(HAVE_WCSSTR) - return SDL_const_cast(wchar_t*,wcsstr(haystack, needle)); + return SDL_const_cast(wchar_t *, wcsstr(haystack, needle)); #else size_t length = SDL_wcslen(needle); while (*haystack) { @@ -432,31 +423,31 @@ SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle) #endif /* HAVE_WCSSTR */ } -int -SDL_wcscmp(const wchar_t *str1, const wchar_t *str2) +int SDL_wcscmp(const wchar_t *str1, const wchar_t *str2) { #if defined(HAVE_WCSCMP) return wcscmp(str1, str2); #else while (*str1 && *str2) { - if (*str1 != *str2) + if (*str1 != *str2) { break; + } ++str1; ++str2; } - return (int)(*str1 - *str2); + return *str1 - *str2; #endif /* HAVE_WCSCMP */ } -int -SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) +int SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) { #if defined(HAVE_WCSNCMP) return wcsncmp(str1, str2, maxlen); #else while (*str1 && *str2 && maxlen) { - if (*str1 != *str2) + if (*str1 != *str2) { break; + } ++str1; ++str2; --maxlen; @@ -464,13 +455,12 @@ SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) if (!maxlen) { return 0; } - return (int) (*str1 - *str2); + return *str1 - *str2; #endif /* HAVE_WCSNCMP */ } -int -SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2) +int SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2) { #if defined(HAVE_WCSCASECMP) return wcscasecmp(str1, str2); @@ -485,11 +475,12 @@ SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2) a = *str1; b = *str2; } else { - a = SDL_toupper((unsigned char) *str1); - b = SDL_toupper((unsigned char) *str2); + a = SDL_toupper((unsigned char)*str1); + b = SDL_toupper((unsigned char)*str2); } - if (a != b) + if (a != b) { break; + } ++str1; ++str2; } @@ -499,15 +490,14 @@ SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2) a = *str1; b = *str2; } else { - a = SDL_toupper((unsigned char) *str1); - b = SDL_toupper((unsigned char) *str2); + a = SDL_toupper((unsigned char)*str1); + b = SDL_toupper((unsigned char)*str2); } - return (int) ((unsigned int) a - (unsigned int) b); + return (int)((unsigned int)a - (unsigned int)b); #endif /* HAVE__WCSICMP */ } -int -SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) +int SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) { #if defined(HAVE_WCSNCASECMP) return wcsncasecmp(str1, str2, maxlen); @@ -522,11 +512,12 @@ SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) a = *str1; b = *str2; } else { - a = SDL_toupper((unsigned char) *str1); - b = SDL_toupper((unsigned char) *str2); + a = SDL_toupper((unsigned char)*str1); + b = SDL_toupper((unsigned char)*str2); } - if (a != b) + if (a != b) { break; + } ++str1; ++str2; --maxlen; @@ -540,10 +531,10 @@ SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen) a = *str1; b = *str2; } else { - a = SDL_toupper((unsigned char) *str1); - b = SDL_toupper((unsigned char) *str2); + a = SDL_toupper((unsigned char)*str1); + b = SDL_toupper((unsigned char)*str2); } - return (int) ((unsigned int) a - (unsigned int) b); + return (int)((unsigned int)a - (unsigned int)b); } #endif /* HAVE__WCSNICMP */ } @@ -570,7 +561,7 @@ SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_ size_t src_bytes = SDL_strlen(src); size_t bytes = SDL_min(src_bytes, dst_bytes - 1); size_t i = 0; - unsigned char trailing_bytes = 0; + size_t trailing_bytes = 0; if (bytes) { unsigned char c = (unsigned char)src[bytes - 1]; @@ -581,8 +572,9 @@ SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_ c = (unsigned char)src[i]; trailing_bytes = UTF8_TrailingBytes(c); if (trailing_bytes) { - if (bytes - i != trailing_bytes + 1) + if (bytes - i != trailing_bytes + 1) { bytes = i; + } break; } @@ -608,7 +600,7 @@ SDL_utf8strlen(const char *str) retval++; } } - + return retval; } @@ -644,8 +636,7 @@ SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen) #endif /* HAVE_STRLCAT */ } -char * -SDL_strdup(const char *string) +char *SDL_strdup(const char *string) { size_t len = SDL_strlen(string) + 1; char *newstr = (char *)SDL_malloc(len); @@ -655,8 +646,7 @@ SDL_strdup(const char *string) return newstr; } -char * -SDL_strrev(char *string) +char *SDL_strrev(char *string) { #if defined(HAVE__STRREV) return _strrev(string); @@ -666,7 +656,7 @@ SDL_strrev(char *string) char *b = &string[len - 1]; len /= 2; while (len--) { - char c = *a; + char c = *a; /* NOLINT(clang-analyzer-core.uninitialized.Assign) */ *a++ = *b; *b-- = c; } @@ -674,69 +664,65 @@ SDL_strrev(char *string) #endif /* HAVE__STRREV */ } -char * -SDL_strupr(char *string) +char *SDL_strupr(char *string) { #if defined(HAVE__STRUPR) return _strupr(string); #else char *bufp = string; while (*bufp) { - *bufp = SDL_toupper((unsigned char) *bufp); + *bufp = SDL_toupper((unsigned char)*bufp); ++bufp; } return string; #endif /* HAVE__STRUPR */ } -char * -SDL_strlwr(char *string) +char *SDL_strlwr(char *string) { #if defined(HAVE__STRLWR) return _strlwr(string); #else char *bufp = string; while (*bufp) { - *bufp = SDL_tolower((unsigned char) *bufp); + *bufp = SDL_tolower((unsigned char)*bufp); ++bufp; } return string; #endif /* HAVE__STRLWR */ } -char * -SDL_strchr(const char *string, int c) +char *SDL_strchr(const char *string, int c) { #ifdef HAVE_STRCHR - return SDL_const_cast(char*,strchr(string, c)); + return SDL_const_cast(char *, strchr(string, c)); #elif defined(HAVE_INDEX) - return SDL_const_cast(char*,index(string, c)); + return SDL_const_cast(char *, index(string, c)); #else while (*string) { if (*string == c) { - return (char *) string; + return (char *)string; } ++string; } if (c == '\0') { - return (char *) string; + return (char *)string; } return NULL; #endif /* HAVE_STRCHR */ } -char * -SDL_strrchr(const char *string, int c) +char *SDL_strrchr(const char *string, int c) { #ifdef HAVE_STRRCHR - return SDL_const_cast(char*,strrchr(string, c)); + return SDL_const_cast(char *, strrchr(string, c)); #elif defined(HAVE_RINDEX) - return SDL_const_cast(char*,rindex(string, c)); + return SDL_const_cast(char *, rindex(string, c)); #else const char *bufp = string + SDL_strlen(string); while (bufp >= string) { if (*bufp == c) { - return (char *) bufp; + return (char *)bufp; } --bufp; } @@ -744,16 +730,15 @@ SDL_strrchr(const char *string, int c) #endif /* HAVE_STRRCHR */ } -char * -SDL_strstr(const char *haystack, const char *needle) +char *SDL_strstr(const char *haystack, const char *needle) { #if defined(HAVE_STRSTR) - return SDL_const_cast(char*,strstr(haystack, needle)); + return SDL_const_cast(char *, strstr(haystack, needle)); #else size_t length = SDL_strlen(needle); while (*haystack) { if (SDL_strncmp(haystack, needle, length) == 0) { - return (char *) haystack; + return (char *)haystack; } ++haystack; } @@ -761,16 +746,15 @@ SDL_strstr(const char *haystack, const char *needle) #endif /* HAVE_STRSTR */ } -char * -SDL_strcasestr(const char *haystack, const char *needle) +char *SDL_strcasestr(const char *haystack, const char *needle) { #if defined(HAVE_STRCASESTR) - return SDL_const_cast(char*,strcasestr(haystack, needle)); + return SDL_const_cast(char *, strcasestr(haystack, needle)); #else size_t length = SDL_strlen(needle); while (*haystack) { if (SDL_strncasecmp(haystack, needle, length) == 0) { - return (char *) haystack; + return (char *)haystack; } ++haystack; } @@ -788,8 +772,7 @@ static const char ntoa_table[] = { }; #endif /* ntoa() conversion table */ -char * -SDL_itoa(int value, char *string, int radix) +char *SDL_itoa(int value, char *string, int radix) { #ifdef HAVE_ITOA return itoa(value, string, radix); @@ -798,8 +781,7 @@ SDL_itoa(int value, char *string, int radix) #endif /* HAVE_ITOA */ } -char * -SDL_uitoa(unsigned int value, char *string, int radix) +char *SDL_uitoa(unsigned int value, char *string, int radix) { #ifdef HAVE__UITOA return _uitoa(value, string, radix); @@ -808,8 +790,7 @@ SDL_uitoa(unsigned int value, char *string, int radix) #endif /* HAVE__UITOA */ } -char * -SDL_ltoa(long value, char *string, int radix) +char *SDL_ltoa(long value, char *string, int radix) { #if defined(HAVE__LTOA) return _ltoa(value, string, radix); @@ -827,8 +808,7 @@ SDL_ltoa(long value, char *string, int radix) #endif /* HAVE__LTOA */ } -char * -SDL_ultoa(unsigned long value, char *string, int radix) +char *SDL_ultoa(unsigned long value, char *string, int radix) { #if defined(HAVE__ULTOA) return _ultoa(value, string, radix); @@ -852,8 +832,7 @@ SDL_ultoa(unsigned long value, char *string, int radix) #endif /* HAVE__ULTOA */ } -char * -SDL_lltoa(Sint64 value, char *string, int radix) +char *SDL_lltoa(Sint64 value, char *string, int radix) { #if defined(HAVE__I64TOA) return _i64toa(value, string, radix); @@ -871,8 +850,7 @@ SDL_lltoa(Sint64 value, char *string, int radix) #endif /* HAVE__I64TOA */ } -char * -SDL_ulltoa(Uint64 value, char *string, int radix) +char *SDL_ulltoa(Uint64 value, char *string, int radix) { #if defined(HAVE__UI64TOA) return _ui64toa(value, string, radix); @@ -914,8 +892,7 @@ double SDL_atof(const char *string) #endif /* HAVE_ATOF */ } -long -SDL_strtol(const char *string, char **endp, int base) +long SDL_strtol(const char *string, char **endp, int base) { #if defined(HAVE_STRTOL) return strtol(string, endp, base); @@ -933,7 +910,7 @@ SDL_strtol(const char *string, char **endp, int base) len = SDL_ScanLong(string, 0, base, &value); if (endp) { - *endp = (char *) string + len; + *endp = (char *)string + len; } return value; #endif /* HAVE_STRTOL */ @@ -958,14 +935,13 @@ SDL_strtoul(const char *string, char **endp, int base) len = SDL_ScanUnsignedLong(string, 0, base, &value); if (endp) { - *endp = (char *) string + len; + *endp = (char *)string + len; } return value; #endif /* HAVE_STRTOUL */ } -Sint64 -SDL_strtoll(const char *string, char **endp, int base) +Sint64 SDL_strtoll(const char *string, char **endp, int base) { #if defined(HAVE_STRTOLL) return strtoll(string, endp, base); @@ -983,14 +959,13 @@ SDL_strtoll(const char *string, char **endp, int base) len = SDL_ScanLongLong(string, 0, base, &value); if (endp) { - *endp = (char *) string + len; + *endp = (char *)string + len; } return value; #endif /* HAVE_STRTOLL */ } -Uint64 -SDL_strtoull(const char *string, char **endp, int base) +Uint64 SDL_strtoull(const char *string, char **endp, int base) { #if defined(HAVE_STRTOULL) return strtoull(string, endp, base); @@ -1008,7 +983,7 @@ SDL_strtoull(const char *string, char **endp, int base) len = SDL_ScanUnsignedLongLong(string, 0, base, &value); if (endp) { - *endp = (char *) string + len; + *endp = (char *)string + len; } return value; #endif /* HAVE_STRTOULL */ @@ -1025,24 +1000,24 @@ SDL_strtod(const char *string, char **endp) len = SDL_ScanFloat(string, &value); if (endp) { - *endp = (char *) string + len; + *endp = (char *)string + len; } return value; #endif /* HAVE_STRTOD */ } -int -SDL_strcmp(const char *str1, const char *str2) +int SDL_strcmp(const char *str1, const char *str2) { #if defined(HAVE_STRCMP) return strcmp(str1, str2); #else int result; - while(1) { - result = (int)((unsigned char) *str1 - (unsigned char) *str2); - if (result != 0 || (*str1 == '\0'/* && *str2 == '\0'*/)) + while (1) { + result = ((unsigned char)*str1 - (unsigned char)*str2); + if (result != 0 || (*str1 == '\0' /* && *str2 == '\0'*/)) { break; + } ++str1; ++str2; } @@ -1050,8 +1025,7 @@ SDL_strcmp(const char *str1, const char *str2) #endif /* HAVE_STRCMP */ } -int -SDL_strncmp(const char *str1, const char *str2, size_t maxlen) +int SDL_strncmp(const char *str1, const char *str2, size_t maxlen) { #if defined(HAVE_STRNCMP) return strncmp(str1, str2, maxlen); @@ -1059,9 +1033,10 @@ SDL_strncmp(const char *str1, const char *str2, size_t maxlen) int result; while (maxlen) { - result = (int) (unsigned char) *str1 - (unsigned char) *str2; - if (result != 0 || *str1 == '\0'/* && *str2 == '\0'*/) + result = (int)(unsigned char)*str1 - (unsigned char)*str2; + if (result != 0 || *str1 == '\0' /* && *str2 == '\0'*/) { break; + } ++str1; ++str2; --maxlen; @@ -1073,8 +1048,7 @@ SDL_strncmp(const char *str1, const char *str2, size_t maxlen) #endif /* HAVE_STRNCMP */ } -int -SDL_strcasecmp(const char *str1, const char *str2) +int SDL_strcasecmp(const char *str1, const char *str2) { #ifdef HAVE_STRCASECMP return strcasecmp(str1, str2); @@ -1084,11 +1058,12 @@ SDL_strcasecmp(const char *str1, const char *str2) int a, b, result; while (1) { - a = SDL_toupper((unsigned char) *str1); - b = SDL_toupper((unsigned char) *str2); + a = SDL_toupper((unsigned char)*str1); + b = SDL_toupper((unsigned char)*str2); result = a - b; - if (result != 0 || a == 0 /*&& b == 0*/) + if (result != 0 || a == 0 /*&& b == 0*/) { break; + } ++str1; ++str2; } @@ -1096,8 +1071,7 @@ SDL_strcasecmp(const char *str1, const char *str2) #endif /* HAVE_STRCASECMP */ } -int -SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) +int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) { #ifdef HAVE_STRNCASECMP return strncasecmp(str1, str2, maxlen); @@ -1107,23 +1081,24 @@ SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) int a, b, result; while (maxlen) { - a = SDL_tolower((unsigned char) *str1); - b = SDL_tolower((unsigned char) *str2); + a = SDL_tolower((unsigned char)*str1); + b = SDL_tolower((unsigned char)*str2); result = a - b; - if (result != 0 || a == 0 /*&& b == 0*/) + if (result != 0 || a == 0 /*&& b == 0*/) { break; + } ++str1; ++str2; --maxlen; } - if (maxlen == 0) + if (maxlen == 0) { result = 0; + } return result; #endif /* HAVE_STRNCASECMP */ } -int -SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) +int SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) { int rc; va_list ap; @@ -1134,24 +1109,23 @@ SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) } #ifdef HAVE_VSSCANF -int -SDL_vsscanf(const char *text, const char *fmt, va_list ap) +int SDL_vsscanf(const char *text, const char *fmt, va_list ap) { return vsscanf(text, fmt, ap); } #else -int -SDL_vsscanf(const char *text, const char *fmt, va_list ap) +/* NOLINTNEXTLINE(readability-non-const-parameter) */ +int SDL_vsscanf(const char *text, const char *fmt, va_list ap) { int retval = 0; - if (!text || !*text) { + if (text == NULL || !*text) { return -1; } while (*fmt) { if (*fmt == ' ') { - while (SDL_isspace((unsigned char) *text)) { + while (SDL_isspace((unsigned char)*text)) { ++text; } ++fmt; @@ -1205,7 +1179,7 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) continue; } - while (SDL_isspace((unsigned char) *text)) { + while (SDL_isspace((unsigned char)*text)) { ++text; } @@ -1216,7 +1190,9 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) suppress = SDL_TRUE; break; case 'h': - if (inttype > DO_SHORT) { + if (inttype == DO_INT) { + inttype = DO_SHORT; + } else if (inttype > DO_SHORT) { ++inttype; } break; @@ -1235,19 +1211,19 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) inttype = DO_SIZE_T; break; case 'i': - { - int index = 0; - if (text[index] == '-') { - ++index; - } - if (text[index] == '0') { - if (SDL_tolower((unsigned char) text[index + 1]) == 'x') { - radix = 16; - } else { - radix = 8; - } + { + int index = 0; + if (text[index] == '-') { + ++index; + } + if (text[index] == '0') { + if (SDL_tolower((unsigned char)text[index + 1]) == 'x') { + radix = 16; + } else { + radix = 8; } } + } SDL_FALLTHROUGH; case 'd': if (inttype == DO_LONGLONG) { @@ -1275,23 +1251,20 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) if (advance && !suppress) { switch (inttype) { case DO_SHORT: - { - short *valuep = va_arg(ap, short *); - *valuep = (short) value; - } - break; + { + short *valuep = va_arg(ap, short *); + *valuep = (short)value; + } break; case DO_INT: - { - int *valuep = va_arg(ap, int *); - *valuep = (int) value; - } - break; + { + int *valuep = va_arg(ap, int *); + *valuep = (int)value; + } break; case DO_LONG: - { - long *valuep = va_arg(ap, long *); - *valuep = value; - } - break; + { + long *valuep = va_arg(ap, long *); + *valuep = value; + } break; case DO_LONGLONG: case DO_SIZE_T: /* Handled above */ @@ -1339,23 +1312,20 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) if (advance && !suppress) { switch (inttype) { case DO_SHORT: - { - short *valuep = va_arg(ap, short *); - *valuep = (short) value; - } - break; + { + short *valuep = va_arg(ap, short *); + *valuep = (short)value; + } break; case DO_INT: - { - int *valuep = va_arg(ap, int *); - *valuep = (int) value; - } - break; + { + int *valuep = va_arg(ap, int *); + *valuep = (int)value; + } break; case DO_LONG: - { - long *valuep = va_arg(ap, long *); - *valuep = value; - } - break; + { + long *valuep = va_arg(ap, long *); + *valuep = value; + } break; case DO_LONGLONG: case DO_SIZE_T: /* Handled above */ @@ -1367,34 +1337,34 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) done = SDL_TRUE; break; case 'p': - { - uintptr_t value = 0; - advance = SDL_ScanUintPtrT(text, 16, &value); - text += advance; - if (advance && !suppress) { - void **valuep = va_arg(ap, void **); - *valuep = (void *) value; - ++retval; - } + { + uintptr_t value = 0; + advance = SDL_ScanUintPtrT(text, 16, &value); + text += advance; + if (advance && !suppress) { + void **valuep = va_arg(ap, void **); + *valuep = (void *)value; + ++retval; } + } done = SDL_TRUE; break; case 'f': - { - double value = 0.0; - advance = SDL_ScanFloat(text, &value); - text += advance; - if (advance && !suppress) { - float *valuep = va_arg(ap, float *); - *valuep = (float) value; - ++retval; - } + { + double value = 0.0; + advance = SDL_ScanFloat(text, &value); + text += advance; + if (advance && !suppress) { + float *valuep = va_arg(ap, float *); + *valuep = (float)value; + ++retval; } + } done = SDL_TRUE; break; case 's': if (suppress) { - while (!SDL_isspace((unsigned char) *text)) { + while (!SDL_isspace((unsigned char)*text)) { ++text; if (count) { if (--count == 0) { @@ -1404,7 +1374,7 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) } } else { char *valuep = va_arg(ap, char *); - while (!SDL_isspace((unsigned char) *text)) { + while (!SDL_isspace((unsigned char)*text)) { *valuep++ = *text++; if (count) { if (--count == 0) { @@ -1438,8 +1408,7 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap) } #endif /* HAVE_VSSCANF */ -int -SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +int SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; int retval; @@ -1456,10 +1425,16 @@ SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_ int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap) { int retval; - if (!fmt) fmt = ""; + if (!fmt) { + fmt = ""; + } retval = _vsnprintf(text, maxlen, fmt, ap); - if (maxlen > 0) text[maxlen-1] = '\0'; - if (retval < 0) retval = (int) maxlen; + if (maxlen > 0) { + text[maxlen - 1] = '\0'; + } + if (retval < 0) { + retval = (int)maxlen; + } return retval; } #elif defined(HAVE_VSNPRINTF) @@ -1471,9 +1446,9 @@ int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *f return vsnprintf(text, maxlen, fmt, ap); } #else -#define TEXT_AND_LEN_ARGS (length < maxlen) ? &text[length] : NULL, (length < maxlen) ? (maxlen - length) : 0 +#define TEXT_AND_LEN_ARGS (length < maxlen) ? &text[length] : NULL, (length < maxlen) ? (maxlen - length) : 0 - /* FIXME: implement more of the format specifiers */ +/* FIXME: implement more of the format specifiers */ typedef enum { SDL_CASE_NOCHANGE, @@ -1485,7 +1460,7 @@ typedef struct { SDL_bool left_justify; /* for now: ignored. */ SDL_bool force_sign; - SDL_bool force_type; /* for now: used only by float printer, ignored otherwise. */ + SDL_bool force_type; /* for now: used only by float printer, ignored otherwise. */ SDL_bool pad_zeroes; SDL_letter_case force_case; int width; @@ -1493,8 +1468,7 @@ typedef struct int precision; } SDL_FormatInfo; -static size_t -SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string) +static size_t SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string) { size_t length = 0; size_t slen, sz; @@ -1509,8 +1483,9 @@ SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *str size_t width = info->width - sz; size_t filllen; - if (info->precision >= 0 && (size_t)info->precision < sz) + if (info->precision >= 0 && (size_t)info->precision < sz) { width += sz - (size_t)info->precision; + } filllen = SDL_min(width, maxlen); SDL_memset(text, fill, filllen); @@ -1541,13 +1516,26 @@ SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *str return length; } -static void -SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *info) -{/* left-pad num with zeroes. */ +static size_t SDL_PrintStringW(char *text, size_t maxlen, SDL_FormatInfo *info, const wchar_t *wide_string) +{ + size_t length = 0; + if (wide_string) { + char *string = SDL_iconv_string("UTF-8", "WCHAR_T", (char *)(wide_string), (SDL_wcslen(wide_string) + 1) * sizeof(*wide_string)); + length = SDL_PrintString(TEXT_AND_LEN_ARGS, info, string); + SDL_free(string); + } else { + length = SDL_PrintString(TEXT_AND_LEN_ARGS, info, NULL); + } + return length; +} + +static void SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *info) +{ /* left-pad num with zeroes. */ size_t sz, pad, have_sign; - if (!info) + if (info == NULL) { return; + } have_sign = 0; if (*num == '-' || *num == '+') { @@ -1563,12 +1551,12 @@ SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *info) SDL_memset(num, '0', pad); } } - info->precision = -1;/* so that SDL_PrintString() doesn't make a mess. */ + info->precision = -1; /* so that SDL_PrintString() doesn't make a mess. */ if (info->pad_zeroes && info->width > 0 && (size_t)info->width > sz + have_sign) { - /* handle here: spaces are added before the sign - but zeroes must be placed _after_ the sign. */ - /* sz hasn't changed: we ignore pad_zeroes if a precision is given. */ + /* handle here: spaces are added before the sign + but zeroes must be placed _after_ the sign. */ + /* sz hasn't changed: we ignore pad_zeroes if a precision is given. */ pad = (size_t)info->width - sz - have_sign; if (pad + sz + 1 <= maxlen) { SDL_memmove(num + pad, num, sz + 1); @@ -1578,8 +1566,7 @@ SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *info) } } -static size_t -SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value) +static size_t SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value) { char num[130], *p = num; @@ -1592,8 +1579,7 @@ SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value) return SDL_PrintString(text, maxlen, info, num); } -static size_t -SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value) +static size_t SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value) { char num[130]; @@ -1602,8 +1588,7 @@ SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned return SDL_PrintString(text, maxlen, info, num); } -static size_t -SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value) +static size_t SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value) { char num[130], *p = num; @@ -1616,8 +1601,7 @@ SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value) return SDL_PrintString(text, maxlen, info, num); } -static size_t -SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value) +static size_t SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value) { char num[130]; @@ -1626,8 +1610,7 @@ SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint6 return SDL_PrintString(text, maxlen, info, num); } -static size_t -SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) +static size_t SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) { size_t length = 0; @@ -1646,7 +1629,7 @@ SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) } ++length; } - value = (unsigned long) arg; + value = (unsigned long)arg; length += SDL_PrintUnsignedLong(TEXT_AND_LEN_ARGS, NULL, value); arg -= value; if (info->precision < 0) { @@ -1659,9 +1642,9 @@ SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) } ++length; while (info->precision-- > 0) { - value = (unsigned long) (arg * mult); + value = (unsigned long)(arg * mult); length += SDL_PrintUnsignedLong(TEXT_AND_LEN_ARGS, NULL, value); - arg -= (double) value / mult; + arg -= (double)value / mult; mult *= 10; } } @@ -1681,8 +1664,8 @@ SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) return length; } -int -SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap) +/* NOLINTNEXTLINE(readability-non-const-parameter) */ +int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap) { size_t length = 0; @@ -1733,8 +1716,7 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, if (*fmt >= '0' && *fmt <= '9') { info.width = SDL_strtol(fmt, (char **)&fmt, 0); - } - else if (*fmt == '*') { + } else if (*fmt == '*') { ++fmt; info.width = va_arg(ap, int); } @@ -1766,7 +1748,7 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, case 'c': /* char is promoted to int when passed through (...) */ if (length < maxlen) { - text[length] = (char) va_arg(ap, int); + text[length] = (char)va_arg(ap, int); } ++length; done = SDL_TRUE; @@ -1796,15 +1778,15 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, switch (inttype) { case DO_INT: length += SDL_PrintLong(TEXT_AND_LEN_ARGS, &info, - (long) va_arg(ap, int)); + (long)va_arg(ap, int)); break; case DO_LONG: length += SDL_PrintLong(TEXT_AND_LEN_ARGS, &info, - va_arg(ap, long)); + va_arg(ap, long)); break; case DO_LONGLONG: length += SDL_PrintLongLong(TEXT_AND_LEN_ARGS, &info, - va_arg(ap, Sint64)); + va_arg(ap, Sint64)); break; case DO_SIZE_T: length += SDL_PrintLongLong(TEXT_AND_LEN_ARGS, &info, @@ -1841,16 +1823,16 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, switch (inttype) { case DO_INT: length += SDL_PrintUnsignedLong(TEXT_AND_LEN_ARGS, &info, - (unsigned long) - va_arg(ap, unsigned int)); + (unsigned long) + va_arg(ap, unsigned int)); break; case DO_LONG: length += SDL_PrintUnsignedLong(TEXT_AND_LEN_ARGS, &info, - va_arg(ap, unsigned long)); + va_arg(ap, unsigned long)); break; case DO_LONGLONG: length += SDL_PrintUnsignedLongLong(TEXT_AND_LEN_ARGS, &info, - va_arg(ap, Uint64)); + va_arg(ap, Uint64)); break; case DO_SIZE_T: length += SDL_PrintUnsignedLongLong(TEXT_AND_LEN_ARGS, &info, @@ -1864,24 +1846,17 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, done = SDL_TRUE; break; case 'S': - { - /* In practice this is used on Windows for WCHAR strings */ - wchar_t *wide_arg = va_arg(ap, wchar_t *); - if (wide_arg) { - char *arg = SDL_iconv_string("UTF-8", "UTF-16LE", (char *)(wide_arg), (SDL_wcslen(wide_arg)+1)*sizeof(*wide_arg)); - info.pad_zeroes = SDL_FALSE; - length += SDL_PrintString(TEXT_AND_LEN_ARGS, &info, arg); - SDL_free(arg); - } else { - info.pad_zeroes = SDL_FALSE; - length += SDL_PrintString(TEXT_AND_LEN_ARGS, &info, NULL); - } - done = SDL_TRUE; - } + info.pad_zeroes = SDL_FALSE; + length += SDL_PrintStringW(TEXT_AND_LEN_ARGS, &info, va_arg(ap, wchar_t *)); + done = SDL_TRUE; break; case 's': info.pad_zeroes = SDL_FALSE; - length += SDL_PrintString(TEXT_AND_LEN_ARGS, &info, va_arg(ap, char *)); + if (inttype > DO_INT) { + length += SDL_PrintStringW(TEXT_AND_LEN_ARGS, &info, va_arg(ap, wchar_t *)); + } else { + length += SDL_PrintString(TEXT_AND_LEN_ARGS, &info, va_arg(ap, char *)); + } done = SDL_TRUE; break; default: @@ -1904,14 +1879,12 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, text[maxlen - 1] = '\0'; } return (int)length; - } #undef TEXT_AND_LEN_ARGS #endif /* HAVE_VSNPRINTF */ -int -SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) +int SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { va_list ap; int retval; @@ -1923,19 +1896,19 @@ SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) return retval; } -int -SDL_vasprintf(char **strp, const char *fmt, va_list ap) +int SDL_vasprintf(char **strp, const char *fmt, va_list ap) { int retval; - int size = 100; /* Guess we need no more than 100 bytes */ + int size = 100; /* Guess we need no more than 100 bytes */ char *p, *np; va_list aq; *strp = NULL; p = (char *)SDL_malloc(size); - if (p == NULL) + if (p == NULL) { return -1; + } while (1) { /* Try to print in the allocated space */ @@ -1944,8 +1917,9 @@ SDL_vasprintf(char **strp, const char *fmt, va_list ap) va_end(aq); /* Check error code */ - if (retval < 0) + if (retval < 0) { return retval; + } /* If that worked, return the string */ if (retval < size) { @@ -1954,7 +1928,7 @@ SDL_vasprintf(char **strp, const char *fmt, va_list ap) } /* Else try again with more space */ - size = retval + 1; /* Precisely what is needed */ + size = retval + 1; /* Precisely what is needed */ np = (char *)SDL_realloc(p, size); if (np == NULL) { diff --git a/modules/SDL2/src/stdlib/SDL_vacopy.h b/modules/SDL2/src/stdlib/SDL_vacopy.h index ce7157c..dd08a3f 100644 --- a/modules/SDL2/src/stdlib/SDL_vacopy.h +++ b/modules/SDL2/src/stdlib/SDL_vacopy.h @@ -22,15 +22,15 @@ /* Do our best to make sure va_copy is working */ #if defined(__NGAGE__) #undef va_copy -#define va_copy(dst, src) dst = src +#define va_copy(dst, src) dst = src #elif defined(_MSC_VER) && _MSC_VER <= 1800 /* Visual Studio 2013 tries to link with _vacopy in the C runtime. Newer versions do an inline assignment */ #undef va_copy -#define va_copy(dst, src) dst = src +#define va_copy(dst, src) dst = src #elif defined(__GNUC__) && (__GNUC__ < 3) -#define va_copy(dst, src) __va_copy(dst, src) +#define va_copy(dst, src) __va_copy(dst, src) #endif /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_assert.c b/modules/SDL2/src/test/SDL_test_assert.c index f136f65..dc1eb64 100644 --- a/modules/SDL2/src/test/SDL_test_assert.c +++ b/modules/SDL2/src/test/SDL_test_assert.c @@ -52,7 +52,7 @@ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *as /* Print assert description into a buffer */ SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + (void)SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); va_end(list); /* Log, then assert and break on failure */ @@ -70,17 +70,14 @@ int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char /* Print assert description into a buffer */ SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + (void)SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); va_end(list); /* Log pass or fail message */ - if (assertCondition == ASSERT_FAIL) - { + if (assertCondition == ASSERT_FAIL) { SDLTest_AssertsFailed++; SDLTest_LogError(SDLTEST_ASSERT_CHECK_FORMAT, logMessage, "Failed"); - } - else - { + } else { SDLTest_AssertsPassed++; SDLTest_Log(SDLTEST_ASSERT_CHECK_FORMAT, logMessage, "Passed"); } @@ -99,10 +96,10 @@ void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, /* Print assert description into a buffer */ SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + (void)SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); va_end(list); - /* Log pass message */ + /* Log pass message */ SDLTest_AssertsPassed++; SDLTest_Log(SDLTEST_ASSERT_CHECK_FORMAT, logMessage, "Passed"); } @@ -123,12 +120,9 @@ void SDLTest_ResetAssertSummary() void SDLTest_LogAssertSummary() { int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed; - if (SDLTest_AssertsFailed == 0) - { + if (SDLTest_AssertsFailed == 0) { SDLTest_Log(SDLTEST_ASSERT_SUMMARY_FORMAT, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); - } - else - { + } else { SDLTest_LogError(SDLTEST_ASSERT_SUMMARY_FORMAT, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); } } diff --git a/modules/SDL2/src/test/SDL_test_common.c b/modules/SDL2/src/test/SDL_test_common.c index 2629b36..8781cc5 100644 --- a/modules/SDL2/src/test/SDL_test_common.c +++ b/modules/SDL2/src/test/SDL_test_common.c @@ -46,7 +46,7 @@ static const char *audio_usage[] = { "[--channels N]", "[--samples N]" }; -static void SDL_snprintfcat(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) +static void SDL_snprintfcat(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { size_t length = SDL_strlen(text); va_list ap; @@ -54,12 +54,11 @@ static void SDL_snprintfcat(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL va_start(ap, fmt); text += length; maxlen -= length; - SDL_vsnprintf(text, maxlen, fmt, ap); + (void)SDL_vsnprintf(text, maxlen, fmt, ap); va_end(ap); } -SDLTest_CommonState * -SDLTest_CommonCreateState(char **argv, Uint32 flags) +SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags) { int i; SDLTest_CommonState *state; @@ -73,7 +72,7 @@ SDLTest_CommonCreateState(char **argv, Uint32 flags) } state = (SDLTest_CommonState *)SDL_calloc(1, sizeof(*state)); - if (!state) { + if (state == NULL) { SDL_OutOfMemory(); return NULL; } @@ -116,8 +115,16 @@ SDLTest_CommonCreateState(char **argv, Uint32 flags) return state; } -int -SDLTest_CommonArg(SDLTest_CommonState * state, int index) +#define SEARCHARG(dim) \ + while (*dim && *dim != ',') { \ + ++dim; \ + } \ + if (!*dim) { \ + return -1; \ + } \ + *dim++ = '\0'; + +int SDLTest_CommonArg(SDLTest_CommonState *state, int index) { char **argv = state->argv; @@ -253,7 +260,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) } if (SDL_strcasecmp(argv[index], "--windows") == 0) { ++index; - if (!argv[index] || !SDL_isdigit((unsigned char) *argv[index])) { + if (!argv[index] || !SDL_isdigit((unsigned char)*argv[index])) { return -1; } if (!(state->window_flags & SDL_WINDOW_FULLSCREEN)) { @@ -309,20 +316,11 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) } x = argv[index]; y = argv[index]; - #define SEARCHARG(dim) \ - while (*dim && *dim != ',') { \ - ++dim; \ - } \ - if (!*dim) { \ - return -1; \ - } \ - *dim++ = '\0'; SEARCHARG(y) w = y; SEARCHARG(w) h = w; SEARCHARG(h) - #undef SEARCHARG state->confine.x = SDL_atoi(x); state->confine.y = SDL_atoi(y); state->confine.w = SDL_atoi(w); @@ -538,7 +536,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) if (!argv[index]) { return -1; } - state->audiospec.channels = (Uint8) SDL_atoi(argv[index]); + state->audiospec.channels = (Uint8)SDL_atoi(argv[index]); return 2; } if (SDL_strcasecmp(argv[index], "--samples") == 0) { @@ -546,27 +544,25 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) if (!argv[index]) { return -1; } - state->audiospec.samples = (Uint16) SDL_atoi(argv[index]); + state->audiospec.samples = (Uint16)SDL_atoi(argv[index]); return 2; } if (SDL_strcasecmp(argv[index], "--trackmem") == 0) { /* Already handled in SDLTest_CommonCreateState() */ return 1; } - if ((SDL_strcasecmp(argv[index], "-h") == 0) - || (SDL_strcasecmp(argv[index], "--help") == 0)) { + if ((SDL_strcasecmp(argv[index], "-h") == 0) || (SDL_strcasecmp(argv[index], "--help") == 0)) { /* Print the usage message */ return -1; } if (SDL_strcmp(argv[index], "-NSDocumentRevisionsDebugMode") == 0) { - /* Debug flag sent by Xcode */ + /* Debug flag sent by Xcode */ return 2; } return 0; } -void -SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options) +void SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const char **options) { int i; @@ -592,11 +588,10 @@ SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const cha } } -static const char * -BuildCommonUsageString(char **pstr, const char **strlist, const int numitems, const char **strlist2, const int numitems2) +static const char *BuildCommonUsageString(char **pstr, const char **strlist, const int numitems, const char **strlist2, const int numitems2) { char *str = *pstr; - if (!str) { + if (str == NULL) { size_t len = SDL_strlen("[--trackmem]") + 2; int i; for (i = 0; i < numitems; i++) { @@ -607,19 +602,19 @@ BuildCommonUsageString(char **pstr, const char **strlist, const int numitems, co len += SDL_strlen(strlist2[i]) + 1; } } - str = (char *) SDL_calloc(1, len); - if (!str) { - return ""; /* oh well. */ + str = (char *)SDL_calloc(1, len); + if (str == NULL) { + return ""; /* oh well. */ } SDL_strlcat(str, "[--trackmem] ", len); - for (i = 0; i < numitems-1; i++) { + for (i = 0; i < numitems - 1; i++) { SDL_strlcat(str, strlist[i], len); SDL_strlcat(str, " ", len); } SDL_strlcat(str, strlist[i], len); if (strlist2) { SDL_strlcat(str, " ", len); - for (i = 0; i < numitems2-1; i++) { + for (i = 0; i < numitems2 - 1; i++) { SDL_strlcat(str, strlist2[i], len); SDL_strlcat(str, " ", len); } @@ -634,25 +629,22 @@ static char *common_usage_video = NULL; static char *common_usage_audio = NULL; static char *common_usage_videoaudio = NULL; -const char * -SDLTest_CommonUsage(SDLTest_CommonState * state) +const char *SDLTest_CommonUsage(SDLTest_CommonState *state) { switch (state->flags & (SDL_INIT_VIDEO | SDL_INIT_AUDIO)) { - case SDL_INIT_VIDEO: - return BuildCommonUsageString(&common_usage_video, video_usage, SDL_arraysize(video_usage), NULL, 0); - case SDL_INIT_AUDIO: - return BuildCommonUsageString(&common_usage_audio, audio_usage, SDL_arraysize(audio_usage), NULL, 0); - case (SDL_INIT_VIDEO | SDL_INIT_AUDIO): - return BuildCommonUsageString(&common_usage_videoaudio, video_usage, SDL_arraysize(video_usage), audio_usage, SDL_arraysize(audio_usage)); - default: - return "[--trackmem]"; + case SDL_INIT_VIDEO: + return BuildCommonUsageString(&common_usage_video, video_usage, SDL_arraysize(video_usage), NULL, 0); + case SDL_INIT_AUDIO: + return BuildCommonUsageString(&common_usage_audio, audio_usage, SDL_arraysize(audio_usage), NULL, 0); + case (SDL_INIT_VIDEO | SDL_INIT_AUDIO): + return BuildCommonUsageString(&common_usage_videoaudio, video_usage, SDL_arraysize(video_usage), audio_usage, SDL_arraysize(audio_usage)); + default: + return "[--trackmem]"; } } - -SDL_bool -SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv) +SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv) { int i = 1; while (i < argc) { @@ -666,8 +658,7 @@ SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **arg return SDL_TRUE; } -static void -SDLTest_PrintDisplayOrientation(char* text, size_t maxlen, SDL_DisplayOrientation orientation) +static void SDLTest_PrintDisplayOrientation(char *text, size_t maxlen, SDL_DisplayOrientation orientation) { switch (orientation) { case SDL_ORIENTATION_UNKNOWN: @@ -691,8 +682,7 @@ SDLTest_PrintDisplayOrientation(char* text, size_t maxlen, SDL_DisplayOrientatio } } -static void -SDLTest_PrintWindowFlag(char* text, size_t maxlen, Uint32 flag) +static void SDLTest_PrintWindowFlag(char *text, size_t maxlen, Uint32 flag) { switch (flag) { case SDL_WINDOW_FULLSCREEN: @@ -770,8 +760,7 @@ SDLTest_PrintWindowFlag(char* text, size_t maxlen, Uint32 flag) } } -static void -SDLTest_PrintWindowFlags(char* text, size_t maxlen, Uint32 flags) +static void SDLTest_PrintWindowFlags(char *text, size_t maxlen, Uint32 flags) { const Uint32 window_flags[] = { SDL_WINDOW_FULLSCREEN, @@ -813,8 +802,7 @@ SDLTest_PrintWindowFlags(char* text, size_t maxlen, Uint32 flags) } } -static void -SDLTest_PrintButtonMask(char* text, size_t maxlen, Uint32 flags) +static void SDLTest_PrintButtonMask(char *text, size_t maxlen, Uint32 flags) { int i; int count = 0; @@ -830,8 +818,7 @@ SDLTest_PrintButtonMask(char* text, size_t maxlen, Uint32 flags) } } -static void -SDLTest_PrintRendererFlag(char *text, size_t maxlen, Uint32 flag) +static void SDLTest_PrintRendererFlag(char *text, size_t maxlen, Uint32 flag) { switch (flag) { case SDL_RENDERER_SOFTWARE: @@ -852,8 +839,7 @@ SDLTest_PrintRendererFlag(char *text, size_t maxlen, Uint32 flag) } } -static void -SDLTest_PrintPixelFormat(char *text, size_t maxlen, Uint32 format) +static void SDLTest_PrintPixelFormat(char *text, size_t maxlen, Uint32 format) { switch (format) { case SDL_PIXELFORMAT_UNKNOWN: @@ -961,18 +947,17 @@ SDLTest_PrintPixelFormat(char *text, size_t maxlen, Uint32 format) } } -static void -SDLTest_PrintRenderer(SDL_RendererInfo * info) +static void SDLTest_PrintRenderer(SDL_RendererInfo *info) { int i, count; char text[1024]; SDL_Log(" Renderer %s:\n", info->name); - SDL_snprintf(text, sizeof(text), " Flags: 0x%8.8" SDL_PRIX32, info->flags); + (void)SDL_snprintf(text, sizeof(text), " Flags: 0x%8.8" SDL_PRIX32, info->flags); SDL_snprintfcat(text, sizeof(text), " ("); count = 0; - for (i = 0; i < sizeof(info->flags) * 8; ++i) { + for (i = 0; i < 8 * sizeof(info->flags); ++i) { Uint32 flag = (1 << i); if (info->flags & flag) { if (count > 0) { @@ -985,8 +970,8 @@ SDLTest_PrintRenderer(SDL_RendererInfo * info) SDL_snprintfcat(text, sizeof(text), ")"); SDL_Log("%s\n", text); - SDL_snprintf(text, sizeof(text), " Texture formats (%" SDL_PRIu32 "): ", info->num_texture_formats); - for (i = 0; i < (int) info->num_texture_formats; ++i) { + (void)SDL_snprintf(text, sizeof(text), " Texture formats (%" SDL_PRIu32 "): ", info->num_texture_formats); + for (i = 0; i < (int)info->num_texture_formats; ++i) { if (i > 0) { SDL_snprintfcat(text, sizeof(text), ", "); } @@ -1000,8 +985,7 @@ SDLTest_PrintRenderer(SDL_RendererInfo * info) } } -static SDL_Surface * -SDLTest_LoadIcon(const char *file) +static SDL_Surface *SDLTest_LoadIcon(const char *file) { SDL_Surface *icon; @@ -1009,19 +993,18 @@ SDLTest_LoadIcon(const char *file) icon = SDL_LoadBMP(file); if (icon == NULL) { SDL_Log("Couldn't load %s: %s\n", file, SDL_GetError()); - return (NULL); + return NULL; } if (icon->format->palette) { /* Set the colorkey */ - SDL_SetColorKey(icon, 1, *((Uint8 *) icon->pixels)); + SDL_SetColorKey(icon, 1, *((Uint8 *)icon->pixels)); } - return (icon); + return icon; } -static SDL_HitTestResult SDLCALL -SDLTest_ExampleHitTestCallback(SDL_Window *win, const SDL_Point *area, void *data) +static SDL_HitTestResult SDLCALL SDLTest_ExampleHitTestCallback(SDL_Window *win, const SDL_Point *area, void *data) { int w, h; const int RESIZE_BORDER = 8; @@ -1035,25 +1018,25 @@ SDLTest_ExampleHitTestCallback(SDL_Window *win, const SDL_Point *area, void *dat if (area->y < RESIZE_BORDER) { SDL_Log("SDL_HITTEST_RESIZE_TOPLEFT\n"); return SDL_HITTEST_RESIZE_TOPLEFT; - } else if (area->y >= (h-RESIZE_BORDER)) { + } else if (area->y >= (h - RESIZE_BORDER)) { SDL_Log("SDL_HITTEST_RESIZE_BOTTOMLEFT\n"); return SDL_HITTEST_RESIZE_BOTTOMLEFT; } else { SDL_Log("SDL_HITTEST_RESIZE_LEFT\n"); return SDL_HITTEST_RESIZE_LEFT; } - } else if (area->x >= (w-RESIZE_BORDER)) { + } else if (area->x >= (w - RESIZE_BORDER)) { if (area->y < RESIZE_BORDER) { SDL_Log("SDL_HITTEST_RESIZE_TOPRIGHT\n"); return SDL_HITTEST_RESIZE_TOPRIGHT; - } else if (area->y >= (h-RESIZE_BORDER)) { + } else if (area->y >= (h - RESIZE_BORDER)) { SDL_Log("SDL_HITTEST_RESIZE_BOTTOMRIGHT\n"); return SDL_HITTEST_RESIZE_BOTTOMRIGHT; } else { SDL_Log("SDL_HITTEST_RESIZE_RIGHT\n"); return SDL_HITTEST_RESIZE_RIGHT; } - } else if (area->y >= (h-RESIZE_BORDER)) { + } else if (area->y >= (h - RESIZE_BORDER)) { SDL_Log("SDL_HITTEST_RESIZE_BOTTOM\n"); return SDL_HITTEST_RESIZE_BOTTOM; } else if (area->y < RESIZE_BORDER) { @@ -1066,8 +1049,7 @@ SDLTest_ExampleHitTestCallback(SDL_Window *win, const SDL_Point *area, void *dat return SDL_HITTEST_NORMAL; } -SDL_bool -SDLTest_CommonInit(SDLTest_CommonState * state) +SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state) { int i, j, m, n, w, h; SDL_DisplayMode fullscreen_mode; @@ -1079,7 +1061,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) if (n == 0) { SDL_Log("No built-in video drivers\n"); } else { - SDL_snprintf(text, sizeof(text), "Built-in video drivers:"); + (void)SDL_snprintf(text, sizeof(text), "Built-in video drivers:"); for (i = 0; i < n; ++i) { if (i > 0) { SDL_snprintfcat(text, sizeof(text), ","); @@ -1169,8 +1151,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state) SDL_Log(" Red Mask = 0x%.8" SDL_PRIx32 "\n", Rmask); SDL_Log(" Green Mask = 0x%.8" SDL_PRIx32 "\n", Gmask); SDL_Log(" Blue Mask = 0x%.8" SDL_PRIx32 "\n", Bmask); - if (Amask) + if (Amask) { SDL_Log(" Alpha Mask = 0x%.8" SDL_PRIx32 "\n", Amask); + } } /* Print available fullscreen video modes */ @@ -1193,16 +1176,16 @@ SDLTest_CommonInit(SDLTest_CommonState * state) Gmask); SDL_Log(" Blue Mask = 0x%.8" SDL_PRIx32 "\n", Bmask); - if (Amask) - SDL_Log(" Alpha Mask = 0x%.8" SDL_PRIx32 "\n", - Amask); + if (Amask) { + SDL_Log(" Alpha Mask = 0x%.8" SDL_PRIx32 "\n", Amask); + } } } } #if SDL_VIDEO_DRIVER_WINDOWS && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* Print the D3D9 adapter index */ - adapterIndex = SDL_Direct3D9GetAdapterIndex( i ); + adapterIndex = SDL_Direct3D9GetAdapterIndex(i); SDL_Log("D3D9 Adapter Index: %d", adapterIndex); /* Print the DXGI adapter and output indices */ @@ -1248,14 +1231,14 @@ SDLTest_CommonInit(SDLTest_CommonState * state) fullscreen_mode.refresh_rate = state->refresh_rate; state->windows = - (SDL_Window **) SDL_calloc(state->num_windows, - sizeof(*state->windows)); + (SDL_Window **)SDL_calloc(state->num_windows, + sizeof(*state->windows)); state->renderers = - (SDL_Renderer **) SDL_calloc(state->num_windows, + (SDL_Renderer **)SDL_calloc(state->num_windows, sizeof(*state->renderers)); state->targets = - (SDL_Texture **) SDL_calloc(state->num_windows, - sizeof(*state->targets)); + (SDL_Texture **)SDL_calloc(state->num_windows, + sizeof(*state->targets)); if (!state->windows || !state->renderers) { SDL_Log("Out of memory!\n"); return SDL_FALSE; @@ -1275,8 +1258,8 @@ SDLTest_CommonInit(SDLTest_CommonState * state) } if (state->num_windows > 1) { - SDL_snprintf(title, SDL_arraysize(title), "%s %d", - state->window_title, i + 1); + (void)SDL_snprintf(title, SDL_arraysize(title), "%s %d", + state->window_title, i + 1); } else { SDL_strlcpy(title, state->window_title, SDL_arraysize(title)); } @@ -1300,6 +1283,8 @@ SDLTest_CommonInit(SDLTest_CommonState * state) state->window_w = w; state->window_h = h; } + fullscreen_mode.w = state->window_w; + fullscreen_mode.h = state->window_h; if (SDL_SetWindowDisplayMode(state->windows[i], &fullscreen_mode) < 0) { SDL_Log("Can't set up fullscreen display mode: %s\n", SDL_GetError()); @@ -1307,8 +1292,8 @@ SDLTest_CommonInit(SDLTest_CommonState * state) } /* Add resize/drag areas for windows that are borderless and resizable */ - if ((state->window_flags & (SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS)) == - (SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS)) { + if ((state->window_flags & (SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS)) == + (SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS)) { SDL_SetWindowHitTest(state->windows[i], SDLTest_ExampleHitTestCallback, NULL); } @@ -1326,9 +1311,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) SDL_SetWindowMouseRect(state->windows[i], &state->confine); } - if (!state->skip_renderer - && (state->renderdriver - || !(state->window_flags & (SDL_WINDOW_OPENGL | SDL_WINDOW_VULKAN | SDL_WINDOW_METAL)))) { + if (!state->skip_renderer && (state->renderdriver || !(state->window_flags & (SDL_WINDOW_OPENGL | SDL_WINDOW_VULKAN | SDL_WINDOW_METAL)))) { m = -1; if (state->renderdriver) { SDL_RendererInfo info; @@ -1347,7 +1330,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) } } state->renderers[i] = SDL_CreateRenderer(state->windows[i], - m, state->render_flags); + m, state->render_flags); if (!state->renderers[i]) { SDL_Log("Couldn't create renderer: %s\n", SDL_GetError()); @@ -1375,7 +1358,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) if (n == 0) { SDL_Log("No built-in audio drivers\n"); } else { - SDL_snprintf(text, sizeof(text), "Built-in audio drivers:"); + (void)SDL_snprintf(text, sizeof(text), "Built-in audio drivers:"); for (i = 0; i < n; ++i) { if (i > 0) { SDL_snprintfcat(text, sizeof(text), ","); @@ -1404,28 +1387,29 @@ SDLTest_CommonInit(SDLTest_CommonState * state) return SDL_TRUE; } -static const char * -DisplayOrientationName(int orientation) +static const char *DisplayOrientationName(int orientation) { - switch (orientation) - { -#define CASE(X) case SDL_ORIENTATION_##X: return #X + switch (orientation) { +#define CASE(X) \ + case SDL_ORIENTATION_##X: \ + return #X CASE(UNKNOWN); CASE(LANDSCAPE); CASE(LANDSCAPE_FLIPPED); CASE(PORTRAIT); CASE(PORTRAIT_FLIPPED); #undef CASE -default: return "???"; + default: + return "???"; } } -static const char * -ControllerAxisName(const SDL_GameControllerAxis axis) +static const char *ControllerAxisName(const SDL_GameControllerAxis axis) { - switch (axis) - { -#define AXIS_CASE(ax) case SDL_CONTROLLER_AXIS_##ax: return #ax + switch (axis) { +#define AXIS_CASE(ax) \ + case SDL_CONTROLLER_AXIS_##ax: \ + return #ax AXIS_CASE(INVALID); AXIS_CASE(LEFTX); AXIS_CASE(LEFTY); @@ -1434,16 +1418,17 @@ ControllerAxisName(const SDL_GameControllerAxis axis) AXIS_CASE(TRIGGERLEFT); AXIS_CASE(TRIGGERRIGHT); #undef AXIS_CASE -default: return "???"; + default: + return "???"; } } -static const char * -ControllerButtonName(const SDL_GameControllerButton button) +static const char *ControllerButtonName(const SDL_GameControllerButton button) { - switch (button) - { -#define BUTTON_CASE(btn) case SDL_CONTROLLER_BUTTON_##btn: return #btn + switch (button) { +#define BUTTON_CASE(btn) \ + case SDL_CONTROLLER_BUTTON_##btn: \ + return #btn BUTTON_CASE(INVALID); BUTTON_CASE(A); BUTTON_CASE(B); @@ -1461,12 +1446,12 @@ ControllerButtonName(const SDL_GameControllerButton button) BUTTON_CASE(DPAD_LEFT); BUTTON_CASE(DPAD_RIGHT); #undef BUTTON_CASE -default: return "???"; + default: + return "???"; } } -static void -SDLTest_PrintEvent(SDL_Event * event) +static void SDLTest_PrintEvent(SDL_Event *event) { switch (event->type) { case SDL_DISPLAYEVENT: @@ -1475,6 +1460,10 @@ SDLTest_PrintEvent(SDL_Event * event) SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " connected", event->display.display); break; + case SDL_DISPLAYEVENT_MOVED: + SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed position", + event->display.display); + break; case SDL_DISPLAYEVENT_ORIENTATION: SDL_Log("SDL EVENT: Display %" SDL_PRIu32 " changed orientation to %s", event->display.display, DisplayOrientationName(event->display.data1)); @@ -1545,6 +1534,12 @@ SDLTest_PrintEvent(SDL_Event * event) case SDL_WINDOWEVENT_HIT_TEST: SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " hit test", event->window.windowID); break; + case SDL_WINDOWEVENT_ICCPROF_CHANGED: + SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " ICC profile changed", event->window.windowID); + break; + case SDL_WINDOWEVENT_DISPLAY_CHANGED: + SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " display changed to %" SDL_PRIs32 "", event->window.windowID, event->window.data1); + break; default: SDL_Log("SDL EVENT: Window %" SDL_PRIu32 " got unknown event 0x%4.4x", event->window.windowID, event->window.event); @@ -1598,11 +1593,11 @@ SDLTest_PrintEvent(SDL_Event * event) break; case SDL_JOYDEVICEADDED: SDL_Log("SDL EVENT: Joystick index %" SDL_PRIs32 " attached", - event->jdevice.which); + event->jdevice.which); break; case SDL_JOYDEVICEREMOVED: SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 " removed", - event->jdevice.which); + event->jdevice.which); break; case SDL_JOYBALLMOTION: SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": ball %d moved by %d,%d", @@ -1610,41 +1605,40 @@ SDLTest_PrintEvent(SDL_Event * event) event->jball.yrel); break; case SDL_JOYHATMOTION: - { - const char *position = "UNKNOWN"; - switch (event->jhat.value) { - case SDL_HAT_CENTERED: - position = "CENTER"; - break; - case SDL_HAT_UP: - position = "UP"; - break; - case SDL_HAT_RIGHTUP: - position = "RIGHTUP"; - break; - case SDL_HAT_RIGHT: - position = "RIGHT"; - break; - case SDL_HAT_RIGHTDOWN: - position = "RIGHTDOWN"; - break; - case SDL_HAT_DOWN: - position = "DOWN"; - break; - case SDL_HAT_LEFTDOWN: - position = "LEFTDOWN"; - break; - case SDL_HAT_LEFT: - position = "LEFT"; - break; - case SDL_HAT_LEFTUP: - position = "LEFTUP"; - break; - } - SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": hat %d moved to %s", - event->jhat.which, event->jhat.hat, position); + { + const char *position = "UNKNOWN"; + switch (event->jhat.value) { + case SDL_HAT_CENTERED: + position = "CENTER"; + break; + case SDL_HAT_UP: + position = "UP"; + break; + case SDL_HAT_RIGHTUP: + position = "RIGHTUP"; + break; + case SDL_HAT_RIGHT: + position = "RIGHT"; + break; + case SDL_HAT_RIGHTDOWN: + position = "RIGHTDOWN"; + break; + case SDL_HAT_DOWN: + position = "DOWN"; + break; + case SDL_HAT_LEFTDOWN: + position = "LEFTDOWN"; + break; + case SDL_HAT_LEFT: + position = "LEFT"; + break; + case SDL_HAT_LEFTUP: + position = "LEFTUP"; + break; } - break; + SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": hat %d moved to %s", + event->jhat.which, event->jhat.hat, position); + } break; case SDL_JOYBUTTONDOWN: SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": button %d pressed", event->jbutton.which, event->jbutton.button); @@ -1655,28 +1649,28 @@ SDLTest_PrintEvent(SDL_Event * event) break; case SDL_CONTROLLERDEVICEADDED: SDL_Log("SDL EVENT: Controller index %" SDL_PRIs32 " attached", - event->cdevice.which); + event->cdevice.which); break; case SDL_CONTROLLERDEVICEREMOVED: SDL_Log("SDL EVENT: Controller %" SDL_PRIs32 " removed", - event->cdevice.which); + event->cdevice.which); break; case SDL_CONTROLLERAXISMOTION: SDL_Log("SDL EVENT: Controller %" SDL_PRIs32 " axis %d ('%s') value: %d", - event->caxis.which, - event->caxis.axis, - ControllerAxisName((SDL_GameControllerAxis)event->caxis.axis), - event->caxis.value); + event->caxis.which, + event->caxis.axis, + ControllerAxisName((SDL_GameControllerAxis)event->caxis.axis), + event->caxis.value); break; case SDL_CONTROLLERBUTTONDOWN: SDL_Log("SDL EVENT: Controller %" SDL_PRIs32 "button %d ('%s') down", - event->cbutton.which, event->cbutton.button, - ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); + event->cbutton.which, event->cbutton.button, + ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); break; case SDL_CONTROLLERBUTTONUP: SDL_Log("SDL EVENT: Controller %" SDL_PRIs32 " button %d ('%s') up", - event->cbutton.which, event->cbutton.button, - ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); + event->cbutton.which, event->cbutton.button, + ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); break; case SDL_CLIPBOARDUPDATE: SDL_Log("SDL EVENT: Clipboard updated"); @@ -1684,8 +1678,8 @@ SDLTest_PrintEvent(SDL_Event * event) case SDL_FINGERMOTION: SDL_Log("SDL EVENT: Finger: motion touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f", - (long) event->tfinger.touchId, - (long) event->tfinger.fingerId, + (long)event->tfinger.touchId, + (long)event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure); break; @@ -1693,16 +1687,16 @@ SDLTest_PrintEvent(SDL_Event * event) case SDL_FINGERUP: SDL_Log("SDL EVENT: Finger: %s touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f", (event->type == SDL_FINGERDOWN) ? "down" : "up", - (long) event->tfinger.touchId, - (long) event->tfinger.fingerId, + (long)event->tfinger.touchId, + (long)event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure); break; case SDL_DOLLARGESTURE: - SDL_Log("SDL_EVENT: Dollar gesture detect: %ld", (long) event->dgesture.gestureId); + SDL_Log("SDL_EVENT: Dollar gesture detect: %ld", (long)event->dgesture.gestureId); break; case SDL_DOLLARRECORD: - SDL_Log("SDL_EVENT: Dollar gesture record: %ld", (long) event->dgesture.gestureId); + SDL_Log("SDL_EVENT: Dollar gesture record: %ld", (long)event->dgesture.gestureId); break; case SDL_MULTIGESTURE: SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers); @@ -1757,25 +1751,24 @@ SDLTest_PrintEvent(SDL_Event * event) } } -static void -SDLTest_ScreenShot(SDL_Renderer *renderer) +static void SDLTest_ScreenShot(SDL_Renderer *renderer) { SDL_Rect viewport; SDL_Surface *surface; - if (!renderer) { + if (renderer == NULL) { return; } SDL_RenderGetViewport(renderer, &viewport); surface = SDL_CreateRGBSurface(0, viewport.w, viewport.h, 24, #if SDL_BYTEORDER == SDL_LIL_ENDIAN - 0x00FF0000, 0x0000FF00, 0x000000FF, + 0x00FF0000, 0x0000FF00, 0x000000FF, #else - 0x000000FF, 0x0000FF00, 0x00FF0000, + 0x000000FF, 0x0000FF00, 0x00FF0000, #endif - 0x00000000); - if (!surface) { + 0x00000000); + if (surface == NULL) { SDL_Log("Couldn't create surface: %s\n", SDL_GetError()); return; } @@ -1794,30 +1787,28 @@ SDLTest_ScreenShot(SDL_Renderer *renderer) } } -static void -FullscreenTo(int index, int windowId) +static void FullscreenTo(int index, int windowId) { Uint32 flags; struct SDL_Rect rect = { 0, 0, 0, 0 }; SDL_Window *window = SDL_GetWindowFromID(windowId); - if (!window) { + if (window == NULL) { return; } - SDL_GetDisplayBounds( index, &rect ); + SDL_GetDisplayBounds(index, &rect); flags = SDL_GetWindowFlags(window); if (flags & SDL_WINDOW_FULLSCREEN) { - SDL_SetWindowFullscreen( window, 0); - SDL_Delay( 15 ); + SDL_SetWindowFullscreen(window, 0); + SDL_Delay(15); } - SDL_SetWindowPosition( window, rect.x, rect.y ); - SDL_SetWindowFullscreen( window, SDL_WINDOW_FULLSCREEN ); + SDL_SetWindowPosition(window, rect.x, rect.y); + SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); } -void -SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) +void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done) { int i; static SDL_MouseMotionEvent lastEvent; @@ -1834,27 +1825,26 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) case SDL_WINDOWEVENT: switch (event->window.event) { case SDL_WINDOWEVENT_CLOSE: - { - SDL_Window *window = SDL_GetWindowFromID(event->window.windowID); - if (window) { - for (i = 0; i < state->num_windows; ++i) { - if (window == state->windows[i]) { - if (state->targets[i]) { - SDL_DestroyTexture(state->targets[i]); - state->targets[i] = NULL; - } - if (state->renderers[i]) { - SDL_DestroyRenderer(state->renderers[i]); - state->renderers[i] = NULL; - } - SDL_DestroyWindow(state->windows[i]); - state->windows[i] = NULL; - break; + { + SDL_Window *window = SDL_GetWindowFromID(event->window.windowID); + if (window) { + for (i = 0; i < state->num_windows; ++i) { + if (window == state->windows[i]) { + if (state->targets[i]) { + SDL_DestroyTexture(state->targets[i]); + state->targets[i] = NULL; } + if (state->renderers[i]) { + SDL_DestroyRenderer(state->renderers[i]); + state->renderers[i] = NULL; + } + SDL_DestroyWindow(state->windows[i]); + state->windows[i] = NULL; + break; } } } - break; + } break; case SDL_WINDOWEVENT_FOCUS_LOST: if (state->flash_on_focus_loss) { SDL_Window *window = SDL_GetWindowFromID(event->window.windowID); @@ -1867,24 +1857,25 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) break; } break; - case SDL_KEYDOWN: { + case SDL_KEYDOWN: + { SDL_bool withControl = !!(event->key.keysym.mod & KMOD_CTRL); SDL_bool withShift = !!(event->key.keysym.mod & KMOD_SHIFT); SDL_bool withAlt = !!(event->key.keysym.mod & KMOD_ALT); switch (event->key.keysym.sym) { /* Add hotkeys here */ - case SDLK_PRINTSCREEN: { - SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); - if (window) { - for (i = 0; i < state->num_windows; ++i) { - if (window == state->windows[i]) { - SDLTest_ScreenShot(state->renderers[i]); - } + case SDLK_PRINTSCREEN: + { + SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); + if (window) { + for (i = 0; i < state->num_windows; ++i) { + if (window == state->windows[i]) { + SDLTest_ScreenShot(state->renderers[i]); } } } - break; + } break; case SDLK_EQUALS: if (withControl) { /* Ctrl-+ double the size of the window */ @@ -1892,7 +1883,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) if (window) { int w, h; SDL_GetWindowSize(window, &w, &h); - SDL_SetWindowSize(window, w*2, h*2); + SDL_SetWindowSize(window, w * 2, h * 2); } } break; @@ -1903,7 +1894,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) if (window) { int w, h; SDL_GetWindowSize(window, &w, &h); - SDL_SetWindowSize(window, w/2, h/2); + SDL_SetWindowSize(window, w / 2, h / 2); } } break; @@ -1927,8 +1918,8 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) } SDL_Log("Centering on display %d\n", dest); SDL_SetWindowPosition(window, - SDL_WINDOWPOS_CENTERED_DISPLAY(dest), - SDL_WINDOWPOS_CENTERED_DISPLAY(dest)); + SDL_WINDOWPOS_CENTERED_DISPLAY(dest), + SDL_WINDOWPOS_CENTERED_DISPLAY(dest)); } } } @@ -1940,10 +1931,18 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) int x, y; SDL_GetWindowPosition(window, &x, &y); - if (event->key.keysym.sym == SDLK_UP) y -= delta; - if (event->key.keysym.sym == SDLK_DOWN) y += delta; - if (event->key.keysym.sym == SDLK_LEFT) x -= delta; - if (event->key.keysym.sym == SDLK_RIGHT) x += delta; + if (event->key.keysym.sym == SDLK_UP) { + y -= delta; + } + if (event->key.keysym.sym == SDLK_DOWN) { + y += delta; + } + if (event->key.keysym.sym == SDLK_LEFT) { + x -= delta; + } + if (event->key.keysym.sym == SDLK_RIGHT) { + x += delta; + } SDL_Log("Setting position to (%d, %d)\n", x, y); SDL_SetWindowPosition(window, x, y); @@ -1983,10 +1982,10 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) SDL_GetWindowSize(state->windows[i], &w, &h); SDL_RenderGetClipRect(state->renderers[i], &clip); if (SDL_RectEmpty(&clip)) { - clip.x = w/4; - clip.y = h/4; - clip.w = w/2; - clip.h = h/2; + clip.x = w / 4; + clip.y = h / 4; + clip.w = w / 2; + clip.h = h / 2; SDL_RenderSetClipRect(state->renderers[i], &clip); } else { SDL_RenderSetClipRect(state->renderers[i], NULL); @@ -2036,7 +2035,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) case SDLK_k: if (withControl) { /* Ctrl-K toggle keyboard grab */ - SDL_Window* window = SDL_GetWindowFromID(event->key.windowID); + SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); if (window) { SDL_SetWindowKeyboardGrab(window, !SDL_GetWindowKeyboardGrab(window) ? SDL_TRUE : SDL_FALSE); } @@ -2128,7 +2127,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); if (window) { const Uint32 flags = SDL_GetWindowFlags(window); - const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0) ? SDL_TRUE : SDL_FALSE; + const SDL_bool b = (flags & SDL_WINDOW_BORDERLESS) ? SDL_TRUE : SDL_FALSE; SDL_SetWindowBordered(window, b); } } @@ -2170,8 +2169,8 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) char message[256]; SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); - SDL_snprintf(message, sizeof(message), "(%" SDL_PRIs32 ", %" SDL_PRIs32 "), rel (%" SDL_PRIs32 ", %" SDL_PRIs32 ")\n", - lastEvent.x, lastEvent.y, lastEvent.xrel, lastEvent.yrel); + (void)SDL_snprintf(message, sizeof(message), "(%" SDL_PRIs32 ", %" SDL_PRIs32 "), rel (%" SDL_PRIs32 ", %" SDL_PRIs32 ")\n", + lastEvent.x, lastEvent.y, lastEvent.xrel, lastEvent.yrel); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Last mouse position", message, window); break; } @@ -2194,8 +2193,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) } } -void -SDLTest_CommonQuit(SDLTest_CommonState * state) +void SDLTest_CommonQuit(SDLTest_CommonState *state) { int i; @@ -2234,8 +2232,7 @@ SDLTest_CommonQuit(SDLTest_CommonState * state) SDLTest_LogAllocations(); } -void -SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * usedHeight) +void SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, int *usedHeight) { char text[1024]; int textY = 0; @@ -2257,7 +2254,7 @@ SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * SDL_SetRenderDrawColor(renderer, 170, 170, 170, 255); - SDL_snprintf(text, sizeof(text), "SDL_GetCurrentVideoDriver: %s", SDL_GetCurrentVideoDriver()); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetCurrentVideoDriver: %s", SDL_GetCurrentVideoDriver()); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; @@ -2270,31 +2267,31 @@ SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * SDL_SetRenderDrawColor(renderer, 170, 170, 170, 255); if (0 == SDL_GetRendererInfo(renderer, &info)) { - SDL_snprintf(text, sizeof(text), "SDL_GetRendererInfo: name: %s", info.name); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetRendererInfo: name: %s", info.name); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } if (0 == SDL_GetRendererOutputSize(renderer, &w, &h)) { - SDL_snprintf(text, sizeof(text), "SDL_GetRendererOutputSize: %dx%d", w, h); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetRendererOutputSize: %dx%d", w, h); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } SDL_RenderGetViewport(renderer, &rect); - SDL_snprintf(text, sizeof(text), "SDL_RenderGetViewport: %d,%d, %dx%d", - rect.x, rect.y, rect.w, rect.h); + (void)SDL_snprintf(text, sizeof(text), "SDL_RenderGetViewport: %d,%d, %dx%d", + rect.x, rect.y, rect.w, rect.h); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; SDL_RenderGetScale(renderer, &scaleX, &scaleY); - SDL_snprintf(text, sizeof(text), "SDL_RenderGetScale: %f,%f", - scaleX, scaleY); + (void)SDL_snprintf(text, sizeof(text), "SDL_RenderGetScale: %f,%f", + scaleX, scaleY); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; SDL_RenderGetLogicalSize(renderer, &w, &h); - SDL_snprintf(text, sizeof(text), "SDL_RenderGetLogicalSize: %dx%d", w, h); + (void)SDL_snprintf(text, sizeof(text), "SDL_RenderGetLogicalSize: %dx%d", w, h); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; @@ -2307,23 +2304,23 @@ SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * SDL_SetRenderDrawColor(renderer, 170, 170, 170, 255); SDL_GetWindowPosition(window, &x, &y); - SDL_snprintf(text, sizeof(text), "SDL_GetWindowPosition: %d,%d", x, y); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetWindowPosition: %d,%d", x, y); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; SDL_GetWindowSize(window, &w, &h); - SDL_snprintf(text, sizeof(text), "SDL_GetWindowSize: %dx%d", w, h); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetWindowSize: %dx%d", w, h); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; - SDL_snprintf(text, sizeof(text), "SDL_GetWindowFlags: "); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetWindowFlags: "); SDLTest_PrintWindowFlags(text, sizeof(text), SDL_GetWindowFlags(window)); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; if (0 == SDL_GetWindowDisplayMode(window, &mode)) { - SDL_snprintf(text, sizeof(text), "SDL_GetWindowDisplayMode: %dx%d@%dHz (%s)", - mode.w, mode.h, mode.refresh_rate, SDL_GetPixelFormatName(mode.format)); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetWindowDisplayMode: %dx%d@%dHz (%s)", + mode.w, mode.h, mode.refresh_rate, SDL_GetPixelFormatName(mode.format)); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } @@ -2336,43 +2333,43 @@ SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * SDL_SetRenderDrawColor(renderer, 170, 170, 170, 255); - SDL_snprintf(text, sizeof(text), "SDL_GetWindowDisplayIndex: %d", windowDisplayIndex); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetWindowDisplayIndex: %d", windowDisplayIndex); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; - SDL_snprintf(text, sizeof(text), "SDL_GetDisplayName: %s", SDL_GetDisplayName(windowDisplayIndex)); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetDisplayName: %s", SDL_GetDisplayName(windowDisplayIndex)); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; if (0 == SDL_GetDisplayBounds(windowDisplayIndex, &rect)) { - SDL_snprintf(text, sizeof(text), "SDL_GetDisplayBounds: %d,%d, %dx%d", - rect.x, rect.y, rect.w, rect.h); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetDisplayBounds: %d,%d, %dx%d", + rect.x, rect.y, rect.w, rect.h); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } if (0 == SDL_GetCurrentDisplayMode(windowDisplayIndex, &mode)) { - SDL_snprintf(text, sizeof(text), "SDL_GetCurrentDisplayMode: %dx%d@%d", - mode.w, mode.h, mode.refresh_rate); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetCurrentDisplayMode: %dx%d@%d", + mode.w, mode.h, mode.refresh_rate); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } if (0 == SDL_GetDesktopDisplayMode(windowDisplayIndex, &mode)) { - SDL_snprintf(text, sizeof(text), "SDL_GetDesktopDisplayMode: %dx%d@%d", - mode.w, mode.h, mode.refresh_rate); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetDesktopDisplayMode: %dx%d@%d", + mode.w, mode.h, mode.refresh_rate); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } if (0 == SDL_GetDisplayDPI(windowDisplayIndex, &ddpi, &hdpi, &vdpi)) { - SDL_snprintf(text, sizeof(text), "SDL_GetDisplayDPI: ddpi: %f, hdpi: %f, vdpi: %f", - ddpi, hdpi, vdpi); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetDisplayDPI: ddpi: %f, hdpi: %f, vdpi: %f", + ddpi, hdpi, vdpi); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; } - SDL_snprintf(text, sizeof(text), "SDL_GetDisplayOrientation: "); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetDisplayOrientation: "); SDLTest_PrintDisplayOrientation(text, sizeof(text), SDL_GetDisplayOrientation(windowDisplayIndex)); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; @@ -2386,13 +2383,13 @@ SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window, int * SDL_SetRenderDrawColor(renderer, 170, 170, 170, 255); flags = SDL_GetMouseState(&x, &y); - SDL_snprintf(text, sizeof(text), "SDL_GetMouseState: %d,%d ", x, y); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetMouseState: %d,%d ", x, y); SDLTest_PrintButtonMask(text, sizeof(text), flags); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; flags = SDL_GetGlobalMouseState(&x, &y); - SDL_snprintf(text, sizeof(text), "SDL_GetGlobalMouseState: %d,%d ", x, y); + (void)SDL_snprintf(text, sizeof(text), "SDL_GetGlobalMouseState: %d,%d ", x, y); SDLTest_PrintButtonMask(text, sizeof(text), flags); SDLTest_DrawString(renderer, 0, textY, text); textY += lineHeight; diff --git a/modules/SDL2/src/test/SDL_test_compare.c b/modules/SDL2/src/test/SDL_test_compare.c index 13fc3b6..9c4adf2 100644 --- a/modules/SDL2/src/test/SDL_test_compare.c +++ b/modules/SDL2/src/test/SDL_test_compare.c @@ -31,6 +31,7 @@ #include "SDL_test.h" +#define FILENAME_SIZE 128 /* Counter for _CompareSurface calls; used for filename creation when comparisons fail */ static int _CompareSurfaceCount = 0; @@ -38,80 +39,80 @@ static int _CompareSurfaceCount = 0; /* Compare surfaces */ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error) { - int ret; - int i,j; - int bpp, bpp_reference; - Uint8 *p, *p_reference; - int dist; - int sampleErrorX = 0, sampleErrorY = 0, sampleDist = 0; - Uint8 R, G, B, A; - Uint8 Rd, Gd, Bd, Ad; - char imageFilename[128]; - char referenceFilename[128]; - - /* Validate input surfaces */ - if (surface == NULL || referenceSurface == NULL) { - return -1; - } - - /* Make sure surface size is the same. */ - if ((surface->w != referenceSurface->w) || (surface->h != referenceSurface->h)) { - return -2; - } - - /* Sanitize input value */ - if (allowable_error<0) { - allowable_error = 0; - } - - SDL_LockSurface( surface ); - SDL_LockSurface( referenceSurface ); - - ret = 0; - bpp = surface->format->BytesPerPixel; - bpp_reference = referenceSurface->format->BytesPerPixel; - /* Compare image - should be same format. */ - for (j=0; jh; j++) { - for (i=0; iw; i++) { - p = (Uint8 *)surface->pixels + j * surface->pitch + i * bpp; - p_reference = (Uint8 *)referenceSurface->pixels + j * referenceSurface->pitch + i * bpp_reference; - - SDL_GetRGBA(*(Uint32*)p, surface->format, &R, &G, &B, &A); - SDL_GetRGBA(*(Uint32*)p_reference, referenceSurface->format, &Rd, &Gd, &Bd, &Ad); - - dist = 0; - dist += (R-Rd)*(R-Rd); - dist += (G-Gd)*(G-Gd); - dist += (B-Bd)*(B-Bd); - - /* Allow some difference in blending accuracy */ - if (dist > allowable_error) { - ret++; - if (ret == 1) { - sampleErrorX = i; - sampleErrorY = j; - sampleDist = dist; + int ret; + int i, j; + int bpp, bpp_reference; + Uint8 *p, *p_reference; + int dist; + int sampleErrorX = 0, sampleErrorY = 0, sampleDist = 0; + Uint8 R, G, B, A; + Uint8 Rd, Gd, Bd, Ad; + char imageFilename[FILENAME_SIZE]; + char referenceFilename[FILENAME_SIZE]; + + /* Validate input surfaces */ + if (surface == NULL || referenceSurface == NULL) { + return -1; + } + + /* Make sure surface size is the same. */ + if ((surface->w != referenceSurface->w) || (surface->h != referenceSurface->h)) { + return -2; + } + + /* Sanitize input value */ + if (allowable_error < 0) { + allowable_error = 0; + } + + SDL_LockSurface(surface); + SDL_LockSurface(referenceSurface); + + ret = 0; + bpp = surface->format->BytesPerPixel; + bpp_reference = referenceSurface->format->BytesPerPixel; + /* Compare image - should be same format. */ + for (j = 0; j < surface->h; j++) { + for (i = 0; i < surface->w; i++) { + p = (Uint8 *)surface->pixels + j * surface->pitch + i * bpp; + p_reference = (Uint8 *)referenceSurface->pixels + j * referenceSurface->pitch + i * bpp_reference; + + SDL_GetRGBA(*(Uint32 *)p, surface->format, &R, &G, &B, &A); + SDL_GetRGBA(*(Uint32 *)p_reference, referenceSurface->format, &Rd, &Gd, &Bd, &Ad); + + dist = 0; + dist += (R - Rd) * (R - Rd); + dist += (G - Gd) * (G - Gd); + dist += (B - Bd) * (B - Bd); + + /* Allow some difference in blending accuracy */ + if (dist > allowable_error) { + ret++; + if (ret == 1) { + sampleErrorX = i; + sampleErrorY = j; + sampleDist = dist; + } } - } - } - } - - SDL_UnlockSurface( surface ); - SDL_UnlockSurface( referenceSurface ); - - /* Save test image and reference for analysis on failures */ - _CompareSurfaceCount++; - if (ret != 0) { - SDLTest_LogError("Comparison of pixels with allowable error of %i failed %i times.", allowable_error, ret); - SDLTest_LogError("First detected occurrence at position %i,%i with a squared RGB-difference of %i.", sampleErrorX, sampleErrorY, sampleDist); - SDL_snprintf(imageFilename, 127, "CompareSurfaces%04d_TestOutput.bmp", _CompareSurfaceCount); - SDL_SaveBMP(surface, imageFilename); - SDL_snprintf(referenceFilename, 127, "CompareSurfaces%04d_Reference.bmp", _CompareSurfaceCount); - SDL_SaveBMP(referenceSurface, referenceFilename); - SDLTest_LogError("Surfaces from failed comparison saved as '%s' and '%s'", imageFilename, referenceFilename); - } - - return ret; + } + } + + SDL_UnlockSurface(surface); + SDL_UnlockSurface(referenceSurface); + + /* Save test image and reference for analysis on failures */ + _CompareSurfaceCount++; + if (ret != 0) { + SDLTest_LogError("Comparison of pixels with allowable error of %i failed %i times.", allowable_error, ret); + SDLTest_LogError("First detected occurrence at position %i,%i with a squared RGB-difference of %i.", sampleErrorX, sampleErrorY, sampleDist); + (void)SDL_snprintf(imageFilename, FILENAME_SIZE - 1, "CompareSurfaces%04d_TestOutput.bmp", _CompareSurfaceCount); + SDL_SaveBMP(surface, imageFilename); + (void)SDL_snprintf(referenceFilename, FILENAME_SIZE - 1, "CompareSurfaces%04d_Reference.bmp", _CompareSurfaceCount); + SDL_SaveBMP(referenceSurface, referenceFilename); + SDLTest_LogError("Surfaces from failed comparison saved as '%s' and '%s'", imageFilename, referenceFilename); + } + + return ret; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_crc32.c b/modules/SDL2/src/test/SDL_test_crc32.c index 426202b..453124b 100644 --- a/modules/SDL2/src/test/SDL_test_crc32.c +++ b/modules/SDL2/src/test/SDL_test_crc32.c @@ -30,137 +30,136 @@ #include "SDL_test.h" - int SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext) { - int i,j; - CrcUint32 c; + int i, j; + CrcUint32 c; - /* Sanity check context pointer */ - if (crcContext==NULL) { - return -1; - } + /* Sanity check context pointer */ + if (crcContext == NULL) { + return -1; + } - /* - * Build auxiliary table for parallel byte-at-a-time CRC-32 - */ + /* + * Build auxiliary table for parallel byte-at-a-time CRC-32 + */ #ifdef ORIGINAL_METHOD - for (i = 0; i < 256; ++i) { - for (c = i << 24, j = 8; j > 0; --j) { - c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); + for (i = 0; i < 256; ++i) { + for (c = i << 24, j = 8; j > 0; --j) { + c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); + } + crcContext->crc32_table[i] = c; } - crcContext->crc32_table[i] = c; - } #else - for (i=0; i<256; i++) { - c = i; - for (j=8; j>0; j--) { - if (c & 1) { - c = (c >> 1) ^ CRC32_POLY; - } else { - c >>= 1; + for (i = 0; i < 256; i++) { + c = i; + for (j = 8; j > 0; j--) { + if (c & 1) { + c = (c >> 1) ^ CRC32_POLY; + } else { + c >>= 1; + } + } + crcContext->crc32_table[i] = c; } - } - crcContext->crc32_table[i] = c; - } #endif - return 0; + return 0; } /* Complete CRC32 calculation on a memory block */ -int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) +int SDLTest_Crc32Calc(SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) { - if (SDLTest_Crc32CalcStart(crcContext,crc32)) { - return -1; - } + if (SDLTest_Crc32CalcStart(crcContext, crc32)) { + return -1; + } - if (SDLTest_Crc32CalcBuffer(crcContext, inBuf, inLen, crc32)) { - return -1; - } + if (SDLTest_Crc32CalcBuffer(crcContext, inBuf, inLen, crc32)) { + return -1; + } - if (SDLTest_Crc32CalcEnd(crcContext, crc32)) { - return -1; - } + if (SDLTest_Crc32CalcEnd(crcContext, crc32)) { + return -1; + } - return 0; + return 0; } /* Start crc calculation */ -int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32) +int SDLTest_Crc32CalcStart(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32) { - /* Sanity check pointers */ - if (crcContext==NULL) { - *crc32=0; - return -1; - } - - /* - * Preload shift register, per CRC-32 spec - */ - *crc32 = 0xffffffff; - - return 0; + /* Sanity check pointers */ + if (crcContext == NULL) { + *crc32 = 0; + return -1; + } + + /* + * Preload shift register, per CRC-32 spec + */ + *crc32 = 0xffffffff; + + return 0; } /* Finish crc calculation */ -int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32) +int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32) { - /* Sanity check pointers */ - if (crcContext==NULL) { - *crc32=0; - return -1; - } - - /* - * Return complement, per CRC-32 spec - */ - *crc32 = (~(*crc32)); - - return 0; + /* Sanity check pointers */ + if (crcContext == NULL) { + *crc32 = 0; + return -1; + } + + /* + * Return complement, per CRC-32 spec + */ + *crc32 = (~(*crc32)); + + return 0; } /* Include memory block in crc */ -int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) +int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) { - CrcUint8 *p; - register CrcUint32 crc; - - if (crcContext==NULL) { - *crc32=0; - return -1; - } - - if (inBuf==NULL) { - return -1; - } - - /* - * Calculate CRC from data - */ - crc = *crc32; - for (p = inBuf; inLen > 0; ++p, --inLen) { + CrcUint8 *p; + register CrcUint32 crc; + + if (crcContext == NULL) { + *crc32 = 0; + return -1; + } + + if (inBuf == NULL) { + return -1; + } + + /* + * Calculate CRC from data + */ + crc = *crc32; + for (p = inBuf; inLen > 0; ++p, --inLen) { #ifdef ORIGINAL_METHOD - crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; + crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; #else - crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[ (crc ^ *p) & 0xFF ]; + crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[(crc ^ *p) & 0xFF]; #endif - } - *crc32 = crc; + } + *crc32 = crc; - return 0; + return 0; } -int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext) +int SDLTest_Crc32Done(SDLTest_Crc32Context *crcContext) { - if (crcContext==NULL) { - return -1; - } + if (crcContext == NULL) { + return -1; + } - return 0; + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_font.c b/modules/SDL2/src/test/SDL_test_font.c index 6bd6692..d3bdad6 100644 --- a/modules/SDL2/src/test/SDL_test_font.c +++ b/modules/SDL2/src/test/SDL_test_font.c @@ -42,3085 +42,3085 @@ static unsigned char SDLTest_FontData[] = { /* * 0 0x00 '^@' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 1 0x01 '^A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 2 0x02 '^B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 3 0x03 '^C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 4 0x04 '^D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 5 0x05 '^E' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 6 0x06 '^F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 7 0x07 '^G' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 8 0x08 '^H' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 9 0x09 '^I' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 10 0x0a '^J' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 11 0x0b '^K' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 12 0x0c '^L' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 13 0x0d '^M' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 14 0x0e '^N' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 15 0x0f '^O' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 16 0x10 '^P' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 17 0x11 '^Q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 18 0x12 '^R' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 19 0x13 '^S' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 20 0x14 '^T' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 21 0x15 '^U' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 22 0x16 '^V' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 23 0x17 '^W' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 24 0x18 '^X' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 25 0x19 '^Y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 26 0x1a '^Z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 27 0x1b '^[' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 28 0x1c '^\' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 29 0x1d '^]' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 30 0x1e '^^' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 31 0x1f '^_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 32 0x20 ' ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 33 0x21 '!' */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 34 0x22 '"' */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 35 0x23 '#' */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x7f, /* 11111110 */ - 0x36, /* 01101100 */ - 0x7f, /* 11111110 */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x7f, /* 11111110 */ + 0x36, /* 01101100 */ + 0x7f, /* 11111110 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ /* * 36 0x24 '$' */ - 0x0c, /* 00110000 */ - 0x3e, /* 01111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x3e, /* 01111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 37 0x25 '%' */ - 0x00, /* 00000000 */ - 0x63, /* 11000110 */ - 0x33, /* 11001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x66, /* 01100110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x33, /* 11001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x66, /* 01100110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 38 0x26 '&' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x33, /* 11001100 */ - 0x6e, /* 01110110 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x33, /* 11001100 */ + 0x6e, /* 01110110 */ + 0x00, /* 00000000 */ /* * 39 0x27 ''' */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 40 0x28 '(' */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 41 0x29 ')' */ - 0x06, /* 01100000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x00, /* 00000000 */ + 0x06, /* 01100000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x00, /* 00000000 */ /* * 42 0x2a '*' */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0xff, /* 11111111 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 43 0x2b '+' */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x3f, /* 11111100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x3f, /* 11111100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 44 0x2c ',' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ /* * 45 0x2d '-' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 46 0x2e '.' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 47 0x2f '/' */ - 0x60, /* 00000110 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ - 0x01, /* 10000000 */ - 0x00, /* 00000000 */ + 0x60, /* 00000110 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ + 0x01, /* 10000000 */ + 0x00, /* 00000000 */ /* * 48 0x30 '0' */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x73, /* 11001110 */ - 0x7b, /* 11011110 */ - 0x6f, /* 11110110 */ - 0x67, /* 11100110 */ - 0x3e, /* 01111100 */ - 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x73, /* 11001110 */ + 0x7b, /* 11011110 */ + 0x6f, /* 11110110 */ + 0x67, /* 11100110 */ + 0x3e, /* 01111100 */ + 0x00, /* 00000000 */ /* * 49 0x31 '1' */ - 0x0c, /* 00110000 */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 50 0x32 '2' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x30, /* 00001100 */ - 0x1c, /* 00111000 */ - 0x06, /* 01100000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x30, /* 00001100 */ + 0x1c, /* 00111000 */ + 0x06, /* 01100000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 51 0x33 '3' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x30, /* 00001100 */ - 0x1c, /* 00111000 */ - 0x30, /* 00001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x30, /* 00001100 */ + 0x1c, /* 00111000 */ + 0x30, /* 00001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 52 0x34 '4' */ - 0x38, /* 00011100 */ - 0x3c, /* 00111100 */ - 0x36, /* 01101100 */ - 0x33, /* 11001100 */ - 0x7f, /* 11111110 */ - 0x30, /* 00001100 */ - 0x78, /* 00011110 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x36, /* 01101100 */ + 0x33, /* 11001100 */ + 0x7f, /* 11111110 */ + 0x30, /* 00001100 */ + 0x78, /* 00011110 */ + 0x00, /* 00000000 */ /* * 53 0x35 '5' */ - 0x3f, /* 11111100 */ - 0x03, /* 11000000 */ - 0x1f, /* 11111000 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x03, /* 11000000 */ + 0x1f, /* 11111000 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 54 0x36 '6' */ - 0x1c, /* 00111000 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ - 0x1f, /* 11111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ + 0x1f, /* 11111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 55 0x37 '7' */ - 0x3f, /* 11111100 */ - 0x33, /* 11001100 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x33, /* 11001100 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 56 0x38 '8' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 57 0x39 '9' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0e, /* 01110000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0e, /* 01110000 */ + 0x00, /* 00000000 */ /* * 58 0x3a ':' */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 59 0x3b ';' */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ /* * 60 0x3c '<' */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ - 0x06, /* 01100000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ + 0x06, /* 01100000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 61 0x3d '=' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 62 0x3e '>' */ - 0x06, /* 01100000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x00, /* 00000000 */ + 0x06, /* 01100000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x00, /* 00000000 */ /* * 63 0x3f '?' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 64 0x40 '@' */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x7b, /* 11011110 */ - 0x7b, /* 11011110 */ - 0x7b, /* 11011110 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x7b, /* 11011110 */ + 0x7b, /* 11011110 */ + 0x7b, /* 11011110 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 65 0x41 'A' */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 66 0x42 'B' */ - 0x3f, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 67 0x43 'C' */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 68 0x44 'D' */ - 0x1f, /* 11111000 */ - 0x36, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x36, /* 01101100 */ - 0x1f, /* 11111000 */ - 0x00, /* 00000000 */ + 0x1f, /* 11111000 */ + 0x36, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x36, /* 01101100 */ + 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ /* * 69 0x45 'E' */ - 0x7f, /* 11111110 */ - 0x46, /* 01100010 */ - 0x16, /* 01101000 */ - 0x1e, /* 01111000 */ - 0x16, /* 01101000 */ - 0x46, /* 01100010 */ - 0x7f, /* 11111110 */ - 0x00, /* 00000000 */ + 0x7f, /* 11111110 */ + 0x46, /* 01100010 */ + 0x16, /* 01101000 */ + 0x1e, /* 01111000 */ + 0x16, /* 01101000 */ + 0x46, /* 01100010 */ + 0x7f, /* 11111110 */ + 0x00, /* 00000000 */ /* * 70 0x46 'F' */ - 0x7f, /* 11111110 */ - 0x46, /* 01100010 */ - 0x16, /* 01101000 */ - 0x1e, /* 01111000 */ - 0x16, /* 01101000 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ - 0x00, /* 00000000 */ + 0x7f, /* 11111110 */ + 0x46, /* 01100010 */ + 0x16, /* 01101000 */ + 0x1e, /* 01111000 */ + 0x16, /* 01101000 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ + 0x00, /* 00000000 */ /* * 71 0x47 'G' */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ - 0x73, /* 11001110 */ - 0x66, /* 01100110 */ - 0x7c, /* 00111110 */ - 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ + 0x73, /* 11001110 */ + 0x66, /* 01100110 */ + 0x7c, /* 00111110 */ + 0x00, /* 00000000 */ /* * 72 0x48 'H' */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 73 0x49 'I' */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 74 0x4a 'J' */ - 0x78, /* 00011110 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x78, /* 00011110 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 75 0x4b 'K' */ - 0x67, /* 11100110 */ - 0x66, /* 01100110 */ - 0x36, /* 01101100 */ - 0x1e, /* 01111000 */ - 0x36, /* 01101100 */ - 0x66, /* 01100110 */ - 0x67, /* 11100110 */ - 0x00, /* 00000000 */ + 0x67, /* 11100110 */ + 0x66, /* 01100110 */ + 0x36, /* 01101100 */ + 0x1e, /* 01111000 */ + 0x36, /* 01101100 */ + 0x66, /* 01100110 */ + 0x67, /* 11100110 */ + 0x00, /* 00000000 */ /* * 76 0x4c 'L' */ - 0x0f, /* 11110000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x46, /* 01100010 */ - 0x66, /* 01100110 */ - 0x7f, /* 11111110 */ - 0x00, /* 00000000 */ + 0x0f, /* 11110000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x46, /* 01100010 */ + 0x66, /* 01100110 */ + 0x7f, /* 11111110 */ + 0x00, /* 00000000 */ /* * 77 0x4d 'M' */ - 0x63, /* 11000110 */ - 0x77, /* 11101110 */ - 0x7f, /* 11111110 */ - 0x7f, /* 11111110 */ - 0x6b, /* 11010110 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x77, /* 11101110 */ + 0x7f, /* 11111110 */ + 0x7f, /* 11111110 */ + 0x6b, /* 11010110 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 78 0x4e 'N' */ - 0x63, /* 11000110 */ - 0x67, /* 11100110 */ - 0x6f, /* 11110110 */ - 0x7b, /* 11011110 */ - 0x73, /* 11001110 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x67, /* 11100110 */ + 0x6f, /* 11110110 */ + 0x7b, /* 11011110 */ + 0x73, /* 11001110 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 79 0x4f 'O' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ /* * 80 0x50 'P' */ - 0x3f, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ + 0x00, /* 00000000 */ /* * 81 0x51 'Q' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3b, /* 11011100 */ - 0x1e, /* 01111000 */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3b, /* 11011100 */ + 0x1e, /* 01111000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ /* * 82 0x52 'R' */ - 0x3f, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x36, /* 01101100 */ - 0x66, /* 01100110 */ - 0x67, /* 11100110 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x36, /* 01101100 */ + 0x66, /* 01100110 */ + 0x67, /* 11100110 */ + 0x00, /* 00000000 */ /* * 83 0x53 'S' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x07, /* 11100000 */ - 0x0e, /* 01110000 */ - 0x38, /* 00011100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x07, /* 11100000 */ + 0x0e, /* 01110000 */ + 0x38, /* 00011100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 84 0x54 'T' */ - 0x3f, /* 11111100 */ - 0x2d, /* 10110100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x2d, /* 10110100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 85 0x55 'U' */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 86 0x56 'V' */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 87 0x57 'W' */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x6b, /* 11010110 */ - 0x7f, /* 11111110 */ - 0x77, /* 11101110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x6b, /* 11010110 */ + 0x7f, /* 11111110 */ + 0x77, /* 11101110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 88 0x58 'X' */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 89 0x59 'Y' */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 90 0x5a 'Z' */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x31, /* 10001100 */ - 0x18, /* 00011000 */ - 0x4c, /* 00110010 */ - 0x66, /* 01100110 */ - 0x7f, /* 11111110 */ - 0x00, /* 00000000 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x31, /* 10001100 */ + 0x18, /* 00011000 */ + 0x4c, /* 00110010 */ + 0x66, /* 01100110 */ + 0x7f, /* 11111110 */ + 0x00, /* 00000000 */ /* * 91 0x5b '[' */ - 0x1e, /* 01111000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 92 0x5c '\' */ - 0x03, /* 11000000 */ - 0x06, /* 01100000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x30, /* 00001100 */ - 0x60, /* 00000110 */ - 0x40, /* 00000010 */ - 0x00, /* 00000000 */ + 0x03, /* 11000000 */ + 0x06, /* 01100000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x30, /* 00001100 */ + 0x60, /* 00000110 */ + 0x40, /* 00000010 */ + 0x00, /* 00000000 */ /* * 93 0x5d ']' */ - 0x1e, /* 01111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 94 0x5e '^' */ - 0x08, /* 00010000 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x08, /* 00010000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 95 0x5f '_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ /* * 96 0x60 '`' */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 97 0x61 'a' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x6e, /* 01110110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x6e, /* 01110110 */ + 0x00, /* 00000000 */ /* * 98 0x62 'b' */ - 0x07, /* 11100000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x3e, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3b, /* 11011100 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x3e, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3b, /* 11011100 */ + 0x00, /* 00000000 */ /* * 99 0x63 'c' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x03, /* 11000000 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x03, /* 11000000 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 100 0x64 'd' */ - 0x38, /* 00011100 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x6e, /* 01110110 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x6e, /* 01110110 */ + 0x00, /* 00000000 */ /* * 101 0x65 'e' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 102 0x66 'f' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ - 0x06, /* 01100000 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ + 0x06, /* 01100000 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ + 0x00, /* 00000000 */ /* * 103 0x67 'g' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6e, /* 01110110 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ /* * 104 0x68 'h' */ - 0x07, /* 11100000 */ - 0x06, /* 01100000 */ - 0x36, /* 01101100 */ - 0x6e, /* 01110110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x67, /* 11100110 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x06, /* 01100000 */ + 0x36, /* 01101100 */ + 0x6e, /* 01110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x67, /* 11100110 */ + 0x00, /* 00000000 */ /* * 105 0x69 'i' */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 106 0x6a 'j' */ - 0x30, /* 00001100 */ - 0x00, /* 00000000 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x00, /* 00000000 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ /* * 107 0x6b 'k' */ - 0x07, /* 11100000 */ - 0x06, /* 01100000 */ - 0x66, /* 01100110 */ - 0x36, /* 01101100 */ - 0x1e, /* 01111000 */ - 0x36, /* 01101100 */ - 0x67, /* 11100110 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x06, /* 01100000 */ + 0x66, /* 01100110 */ + 0x36, /* 01101100 */ + 0x1e, /* 01111000 */ + 0x36, /* 01101100 */ + 0x67, /* 11100110 */ + 0x00, /* 00000000 */ /* * 108 0x6c 'l' */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 109 0x6d 'm' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x7f, /* 11111110 */ - 0x7f, /* 11111110 */ - 0x6b, /* 11010110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x7f, /* 11111110 */ + 0x7f, /* 11111110 */ + 0x6b, /* 11010110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 110 0x6e 'n' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 11111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 11111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 111 0x6f 'o' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 112 0x70 'p' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3b, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3b, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ /* * 113 0x71 'q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6e, /* 01110110 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x78, /* 00011110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x78, /* 00011110 */ /* * 114 0x72 'r' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3b, /* 11011100 */ - 0x6e, /* 01110110 */ - 0x66, /* 01100110 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3b, /* 11011100 */ + 0x6e, /* 01110110 */ + 0x66, /* 01100110 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ + 0x00, /* 00000000 */ /* * 115 0x73 's' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3e, /* 01111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ /* * 116 0x74 't' */ - 0x08, /* 00010000 */ - 0x0c, /* 00110000 */ - 0x3e, /* 01111100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x2c, /* 00110100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x08, /* 00010000 */ + 0x0c, /* 00110000 */ + 0x3e, /* 01111100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x2c, /* 00110100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 117 0x75 'u' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x6e, /* 01110110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x6e, /* 01110110 */ + 0x00, /* 00000000 */ /* * 118 0x76 'v' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ /* * 119 0x77 'w' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x63, /* 11000110 */ - 0x6b, /* 11010110 */ - 0x7f, /* 11111110 */ - 0x7f, /* 11111110 */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x6b, /* 11010110 */ + 0x7f, /* 11111110 */ + 0x7f, /* 11111110 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ /* * 120 0x78 'x' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x63, /* 11000110 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 121 0x79 'y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ /* * 122 0x7a 'z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x19, /* 10011000 */ - 0x0c, /* 00110000 */ - 0x26, /* 01100100 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x19, /* 10011000 */ + 0x0c, /* 00110000 */ + 0x26, /* 01100100 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 123 0x7b '{' */ - 0x38, /* 00011100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x07, /* 11100000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x07, /* 11100000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ /* * 124 0x7c '|' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 125 0x7d '}' */ - 0x07, /* 11100000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x38, /* 00011100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x38, /* 00011100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ /* * 126 0x7e '~' */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 127 0x7f '^?' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 128 0x80 '€' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 129 0x81 '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 130 0x82 '‚' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 131 0x83 'ƒ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 132 0x84 '„' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 133 0x85 ' ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 134 0x86 '†' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 135 0x87 '‡' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 136 0x88 'ˆ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 137 0x89 '‰' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 138 0x8a 'Š' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 139 0x8b '‹' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 140 0x8c 'Œ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 141 0x8d '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 142 0x8e 'Ž' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 143 0x8f '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 144 0x90 '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 145 0x91 '‘' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 146 0x92 '’' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 147 0x93 '“' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 148 0x94 '”' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 149 0x95 '•' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 150 0x96 '–' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 151 0x97 '—' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 152 0x98 '˜' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 153 0x99 '™' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 154 0x9a 'š' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 155 0x9b '›' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 156 0x9c 'œ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 157 0x9d '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 158 0x9e 'ž' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 159 0x9f 'Ÿ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 160 0xa0 ' ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 161 0xa1 '¡' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 162 0xa2 '¢' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ /* * 163 0xa3 '£' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x26, /* 01100100 */ - 0x0f, /* 11110000 */ - 0x06, /* 01100000 */ - 0x67, /* 11100110 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x26, /* 01100100 */ + 0x0f, /* 11110000 */ + 0x06, /* 01100000 */ + 0x67, /* 11100110 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 164 0xa4 '¤' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x63, /* 11000110 */ - 0x3e, /* 01111100 */ - 0x36, /* 01101100 */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x3e, /* 01111100 */ + 0x36, /* 01101100 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 165 0xa5 '¥' */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x3f, /* 11111100 */ - 0x0c, /* 00110000 */ - 0x3f, /* 11111100 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x3f, /* 11111100 */ + 0x0c, /* 00110000 */ + 0x3f, /* 11111100 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ /* * 166 0xa6 '¦' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 167 0xa7 '§' */ - 0x7c, /* 00111110 */ - 0xc6, /* 01100011 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ + 0x7c, /* 00111110 */ + 0xc6, /* 01100011 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ /* * 168 0xa8 '¨' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 169 0xa9 '©' */ - 0x3c, /* 00111100 */ - 0x42, /* 01000010 */ - 0x99, /* 10011001 */ - 0x85, /* 10100001 */ - 0x85, /* 10100001 */ - 0x99, /* 10011001 */ - 0x42, /* 01000010 */ - 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x42, /* 01000010 */ + 0x99, /* 10011001 */ + 0x85, /* 10100001 */ + 0x85, /* 10100001 */ + 0x99, /* 10011001 */ + 0x42, /* 01000010 */ + 0x3c, /* 00111100 */ /* * 170 0xaa 'ª' */ - 0x3c, /* 00111100 */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x7c, /* 00111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x7c, /* 00111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 171 0xab '«' */ - 0x00, /* 00000000 */ - 0xcc, /* 00110011 */ - 0x66, /* 01100110 */ - 0x33, /* 11001100 */ - 0x66, /* 01100110 */ - 0xcc, /* 00110011 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 00110011 */ + 0x66, /* 01100110 */ + 0x33, /* 11001100 */ + 0x66, /* 01100110 */ + 0xcc, /* 00110011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 172 0xac '¬' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x30, /* 00001100 */ - 0x30, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x30, /* 00001100 */ + 0x30, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 173 0xad '­' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 174 0xae '®' */ - 0x3c, /* 00111100 */ - 0x42, /* 01000010 */ - 0x9d, /* 10111001 */ - 0xa5, /* 10100101 */ - 0x9d, /* 10111001 */ - 0xa5, /* 10100101 */ - 0x42, /* 01000010 */ - 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x42, /* 01000010 */ + 0x9d, /* 10111001 */ + 0xa5, /* 10100101 */ + 0x9d, /* 10111001 */ + 0xa5, /* 10100101 */ + 0x42, /* 01000010 */ + 0x3c, /* 00111100 */ /* * 175 0xaf '¯' */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 176 0xb0 '°' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 177 0xb1 '±' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 178 0xb2 '²' */ - 0x1c, /* 00111000 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 179 0xb3 '³' */ - 0x1c, /* 00111000 */ - 0x30, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00001100 */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x30, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00001100 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 180 0xb4 '´' */ - 0x18, /* 00011000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 181 0xb5 'µ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ /* * 182 0xb6 '¶' */ - 0xfe, /* 01111111 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xde, /* 01111011 */ - 0xd8, /* 00011011 */ - 0xd8, /* 00011011 */ - 0xd8, /* 00011011 */ - 0x00, /* 00000000 */ + 0xfe, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0xde, /* 01111011 */ + 0xd8, /* 00011011 */ + 0xd8, /* 00011011 */ + 0xd8, /* 00011011 */ + 0x00, /* 00000000 */ /* * 183 0xb7 '·' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 184 0xb8 '¸' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00001100 */ - 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x30, /* 00001100 */ + 0x1e, /* 01111000 */ /* * 185 0xb9 '¹' */ - 0x08, /* 00010000 */ - 0x0c, /* 00110000 */ - 0x08, /* 00010000 */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x08, /* 00010000 */ + 0x0c, /* 00110000 */ + 0x08, /* 00010000 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 186 0xba 'º' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 187 0xbb '»' */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x66, /* 01100110 */ - 0xcc, /* 00110011 */ - 0x66, /* 01100110 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x66, /* 01100110 */ + 0xcc, /* 00110011 */ + 0x66, /* 01100110 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 188 0xbc '¼' */ - 0xc3, /* 11000011 */ - 0x63, /* 11000110 */ - 0x33, /* 11001100 */ - 0xbd, /* 10111101 */ - 0xec, /* 00110111 */ - 0xf6, /* 01101111 */ - 0xf3, /* 11001111 */ - 0x03, /* 11000000 */ + 0xc3, /* 11000011 */ + 0x63, /* 11000110 */ + 0x33, /* 11001100 */ + 0xbd, /* 10111101 */ + 0xec, /* 00110111 */ + 0xf6, /* 01101111 */ + 0xf3, /* 11001111 */ + 0x03, /* 11000000 */ /* * 189 0xbd '½' */ - 0xc3, /* 11000011 */ - 0x63, /* 11000110 */ - 0x33, /* 11001100 */ - 0x7b, /* 11011110 */ - 0xcc, /* 00110011 */ - 0x66, /* 01100110 */ - 0x33, /* 11001100 */ - 0xf0, /* 00001111 */ + 0xc3, /* 11000011 */ + 0x63, /* 11000110 */ + 0x33, /* 11001100 */ + 0x7b, /* 11011110 */ + 0xcc, /* 00110011 */ + 0x66, /* 01100110 */ + 0x33, /* 11001100 */ + 0xf0, /* 00001111 */ /* * 190 0xbe '¾' */ - 0x03, /* 11000000 */ - 0xc4, /* 00100011 */ - 0x63, /* 11000110 */ - 0xb4, /* 00101101 */ - 0xdb, /* 11011011 */ - 0xac, /* 00110101 */ - 0xe6, /* 01100111 */ - 0x80, /* 00000001 */ + 0x03, /* 11000000 */ + 0xc4, /* 00100011 */ + 0x63, /* 11000110 */ + 0xb4, /* 00101101 */ + 0xdb, /* 11011011 */ + 0xac, /* 00110101 */ + 0xe6, /* 01100111 */ + 0x80, /* 00000001 */ /* * 191 0xbf '¿' */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00110000 */ - 0x06, /* 01100000 */ - 0x03, /* 11000000 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x06, /* 01100000 */ + 0x03, /* 11000000 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 192 0xc0 'À' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 193 0xc1 'Á' */ - 0x70, /* 00001110 */ - 0x00, /* 00000000 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x70, /* 00001110 */ + 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 194 0xc2 'Â' */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 195 0xc3 'Ã' */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x00, /* 00000000 */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 196 0xc4 'Ä' */ - 0x63, /* 11000110 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x63, /* 11000110 */ - 0x7f, /* 11111110 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x00, /* 00000000 */ + 0x63, /* 11000110 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x63, /* 11000110 */ + 0x7f, /* 11111110 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x00, /* 00000000 */ /* * 197 0xc5 'Å' */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 198 0xc6 'Æ' */ - 0x7c, /* 00111110 */ - 0x36, /* 01101100 */ - 0x33, /* 11001100 */ - 0x7f, /* 11111110 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x73, /* 11001110 */ - 0x00, /* 00000000 */ + 0x7c, /* 00111110 */ + 0x36, /* 01101100 */ + 0x33, /* 11001100 */ + 0x7f, /* 11111110 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x73, /* 11001110 */ + 0x00, /* 00000000 */ /* * 199 0xc7 'Ç' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x03, /* 11000000 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x18, /* 00011000 */ - 0x30, /* 00001100 */ - 0x1e, /* 01111000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x03, /* 11000000 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x18, /* 00011000 */ + 0x30, /* 00001100 */ + 0x1e, /* 01111000 */ /* * 200 0xc8 'È' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x06, /* 01100000 */ - 0x1e, /* 01111000 */ - 0x06, /* 01100000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x06, /* 01100000 */ + 0x1e, /* 01111000 */ + 0x06, /* 01100000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 201 0xc9 'É' */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x06, /* 01100000 */ - 0x1e, /* 01111000 */ - 0x06, /* 01100000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x06, /* 01100000 */ + 0x1e, /* 01111000 */ + 0x06, /* 01100000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 202 0xca 'Ê' */ - 0x0c, /* 00110000 */ - 0x12, /* 01001000 */ - 0x3f, /* 11111100 */ - 0x06, /* 01100000 */ - 0x1e, /* 01111000 */ - 0x06, /* 01100000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x12, /* 01001000 */ + 0x3f, /* 11111100 */ + 0x06, /* 01100000 */ + 0x1e, /* 01111000 */ + 0x06, /* 01100000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 203 0xcb 'Ë' */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ - 0x3f, /* 11111100 */ - 0x06, /* 01100000 */ - 0x1e, /* 01111000 */ - 0x06, /* 01100000 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x06, /* 01100000 */ + 0x1e, /* 01111000 */ + 0x06, /* 01100000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 204 0xcc 'Ì' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 205 0xcd 'Í' */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 206 0xce 'Î' */ - 0x0c, /* 00110000 */ - 0x12, /* 01001000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x12, /* 01001000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 207 0xcf 'Ï' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 208 0xd0 'Ð' */ - 0x3f, /* 11111100 */ - 0x66, /* 01100110 */ - 0x6f, /* 11110110 */ - 0x6f, /* 11110110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x66, /* 01100110 */ + 0x6f, /* 11110110 */ + 0x6f, /* 11110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ /* * 209 0xd1 'Ñ' */ - 0x3f, /* 11111100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x37, /* 11101100 */ - 0x3f, /* 11111100 */ - 0x3b, /* 11011100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x3f, /* 11111100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x37, /* 11101100 */ + 0x3f, /* 11111100 */ + 0x3b, /* 11011100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 210 0xd2 'Ò' */ - 0x0e, /* 01110000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 211 0xd3 'Ó' */ - 0x70, /* 00001110 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x70, /* 00001110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 212 0xd4 'Ô' */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 213 0xd5 'Õ' */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x00, /* 00000000 */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x63, /* 11000110 */ - 0x3e, /* 01111100 */ - 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x63, /* 11000110 */ + 0x3e, /* 01111100 */ + 0x00, /* 00000000 */ /* * 214 0xd6 'Ö' */ - 0xc3, /* 11000011 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0xc3, /* 11000011 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 215 0xd7 '×' */ - 0x00, /* 00000000 */ - 0x36, /* 01101100 */ - 0x1c, /* 00111000 */ - 0x08, /* 00010000 */ - 0x1c, /* 00111000 */ - 0x36, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x36, /* 01101100 */ + 0x1c, /* 00111000 */ + 0x08, /* 00010000 */ + 0x1c, /* 00111000 */ + 0x36, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ /* * 216 0xd8 'Ø' */ - 0x5c, /* 00111010 */ - 0x36, /* 01101100 */ - 0x73, /* 11001110 */ - 0x7b, /* 11011110 */ - 0x6f, /* 11110110 */ - 0x36, /* 01101100 */ - 0x1d, /* 10111000 */ - 0x00, /* 00000000 */ + 0x5c, /* 00111010 */ + 0x36, /* 01101100 */ + 0x73, /* 11001110 */ + 0x7b, /* 11011110 */ + 0x6f, /* 11110110 */ + 0x36, /* 01101100 */ + 0x1d, /* 10111000 */ + 0x00, /* 00000000 */ /* * 217 0xd9 'Ù' */ - 0x0e, /* 01110000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 218 0xda 'Ú' */ - 0x70, /* 00001110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x70, /* 00001110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 219 0xdb 'Û' */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 220 0xdc 'Ü' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 221 0xdd 'Ý' */ - 0x70, /* 00001110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x70, /* 00001110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 222 0xde 'Þ' */ - 0x0f, /* 11110000 */ - 0x06, /* 01100000 */ - 0x3e, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x06, /* 01100000 */ - 0x0f, /* 11110000 */ + 0x0f, /* 11110000 */ + 0x06, /* 01100000 */ + 0x3e, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x06, /* 01100000 */ + 0x0f, /* 11110000 */ /* * 223 0xdf 'ß' */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x1f, /* 11111000 */ - 0x33, /* 11001100 */ - 0x1f, /* 11111000 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x1f, /* 11111000 */ + 0x33, /* 11001100 */ + 0x1f, /* 11111000 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ /* * 224 0xe0 'à' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 225 0xe1 'á' */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 226 0xe2 'â' */ - 0x7e, /* 01111110 */ - 0xc3, /* 11000011 */ - 0x3c, /* 00111100 */ - 0x60, /* 00000110 */ - 0x7c, /* 00111110 */ - 0x66, /* 01100110 */ - 0xfc, /* 00111111 */ - 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc3, /* 11000011 */ + 0x3c, /* 00111100 */ + 0x60, /* 00000110 */ + 0x7c, /* 00111110 */ + 0x66, /* 01100110 */ + 0xfc, /* 00111111 */ + 0x00, /* 00000000 */ /* * 227 0xe3 'ã' */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 228 0xe4 'ä' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 229 0xe5 'å' */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 230 0xe6 'æ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 01111111 */ - 0x30, /* 00001100 */ - 0xfe, /* 01111111 */ - 0x33, /* 11001100 */ - 0xfe, /* 01111111 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 01111111 */ + 0x30, /* 00001100 */ + 0xfe, /* 01111111 */ + 0x33, /* 11001100 */ + 0xfe, /* 01111111 */ + 0x00, /* 00000000 */ /* * 231 0xe7 'ç' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x03, /* 11000000 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x30, /* 00001100 */ - 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x03, /* 11000000 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x30, /* 00001100 */ + 0x1c, /* 00111000 */ /* * 232 0xe8 'è' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 233 0xe9 'é' */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 234 0xea 'ê' */ - 0x7e, /* 01111110 */ - 0xc3, /* 11000011 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x7e, /* 01111110 */ - 0x06, /* 01100000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc3, /* 11000011 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x7e, /* 01111110 */ + 0x06, /* 01100000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 235 0xeb 'ë' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x3f, /* 11111100 */ - 0x03, /* 11000000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x3f, /* 11111100 */ + 0x03, /* 11000000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 236 0xec 'ì' */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 237 0xed 'í' */ - 0x1c, /* 00111000 */ - 0x00, /* 00000000 */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1c, /* 00111000 */ + 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 238 0xee 'î' */ - 0x3e, /* 01111100 */ - 0x63, /* 11000110 */ - 0x1c, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ + 0x3e, /* 01111100 */ + 0x63, /* 11000110 */ + 0x1c, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ /* * 239 0xef 'ï' */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x0e, /* 01110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x0c, /* 00110000 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x0e, /* 01110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x0c, /* 00110000 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 240 0xf0 'ð' */ - 0x1b, /* 11011000 */ - 0x0e, /* 01110000 */ - 0x1b, /* 11011000 */ - 0x30, /* 00001100 */ - 0x3e, /* 01111100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1b, /* 11011000 */ + 0x0e, /* 01110000 */ + 0x1b, /* 11011000 */ + 0x30, /* 00001100 */ + 0x3e, /* 01111100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 241 0xf1 'ñ' */ - 0x00, /* 00000000 */ - 0x1f, /* 11111000 */ - 0x00, /* 00000000 */ - 0x1f, /* 11111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ + 0x1f, /* 11111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ /* * 242 0xf2 'ò' */ - 0x00, /* 00000000 */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 243 0xf3 'ó' */ - 0x00, /* 00000000 */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 244 0xf4 'ô' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 245 0xf5 'õ' */ - 0x6e, /* 01110110 */ - 0x3b, /* 11011100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x6e, /* 01110110 */ + 0x3b, /* 11011100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 246 0xf6 'ö' */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x1e, /* 01111000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x1e, /* 01111000 */ + 0x00, /* 00000000 */ /* * 247 0xf7 '÷' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ /* * 248 0xf8 'ø' */ - 0x00, /* 00000000 */ - 0x60, /* 00000110 */ - 0x3c, /* 00111100 */ - 0x76, /* 01101110 */ - 0x7e, /* 01111110 */ - 0x6e, /* 01110110 */ - 0x3c, /* 00111100 */ - 0x06, /* 01100000 */ + 0x00, /* 00000000 */ + 0x60, /* 00000110 */ + 0x3c, /* 00111100 */ + 0x76, /* 01101110 */ + 0x7e, /* 01111110 */ + 0x6e, /* 01110110 */ + 0x3c, /* 00111100 */ + 0x06, /* 01100000 */ /* * 249 0xf9 'ù' */ - 0x00, /* 00000000 */ - 0x07, /* 11100000 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x07, /* 11100000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 250 0xfa 'ú' */ - 0x00, /* 00000000 */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 251 0xfb 'û' */ - 0x1e, /* 01111000 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x1e, /* 01111000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 252 0xfc 'ü' */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ /* * 253 0xfd 'ý' */ - 0x00, /* 00000000 */ - 0x38, /* 00011100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ + 0x38, /* 00011100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ /* * 254 0xfe 'þ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x06, /* 01100000 */ - 0x3e, /* 01111100 */ - 0x66, /* 01100110 */ - 0x3e, /* 01111100 */ - 0x06, /* 01100000 */ - 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x06, /* 01100000 */ + 0x3e, /* 01111100 */ + 0x66, /* 01100110 */ + 0x3e, /* 01111100 */ + 0x06, /* 01100000 */ + 0x00, /* 00000000 */ /* * 255 0xff 'ÿ' */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x00, /* 00000000 */ - 0x33, /* 11001100 */ - 0x33, /* 11001100 */ - 0x3e, /* 01111100 */ - 0x30, /* 00001100 */ - 0x1f, /* 11111000 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x00, /* 00000000 */ + 0x33, /* 11001100 */ + 0x33, /* 11001100 */ + 0x3e, /* 01111100 */ + 0x30, /* 00001100 */ + 0x1f, /* 11111000 */ }; - /* ---- Character */ -struct SDLTest_CharTextureCache { - SDL_Renderer* renderer; - SDL_Texture* charTextureCache[256]; - struct SDLTest_CharTextureCache* next; +struct SDLTest_CharTextureCache +{ + SDL_Renderer *renderer; + SDL_Texture *charTextureCache[256]; + struct SDLTest_CharTextureCache *next; }; /*! @@ -3173,8 +3173,8 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c) } /* Allocate a new cache for this renderer if needed */ - if (cache == NULL) { - cache = (struct SDLTest_CharTextureCache*)SDL_calloc(1, sizeof(struct SDLTest_CharTextureCache)); + if (cache == NULL) { + cache = (struct SDLTest_CharTextureCache *)SDL_calloc(1, sizeof(struct SDLTest_CharTextureCache)); cache->renderer = renderer; cache->next = SDLTest_CharTextureCacheList; SDLTest_CharTextureCacheList = cache; @@ -3191,7 +3191,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c) charWidth, charHeight, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); if (character == NULL) { - return (-1); + return -1; } charpos = SDLTest_FontData + ci * charSize; @@ -3215,7 +3215,6 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c) ++charpos; } - /* Convert temp surface into texture */ cache->charTextureCache[ci] = SDL_CreateTextureFromSurface(renderer, character); SDL_FreeSurface(character); @@ -3224,7 +3223,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c) * Check pointer */ if (cache->charTextureCache[ci] == NULL) { - return (-1); + return -1; } } @@ -3241,7 +3240,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c) */ result |= SDL_RenderCopy(renderer, cache->charTextureCache[ci], &srect, &drect); - return (result); + return result; } /* Gets a unicode value from a UTF-8 encoded string @@ -3264,7 +3263,7 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) if (p[0] == 0xFC && (p[1] & 0xFC) == 0x80) { overlong = SDL_TRUE; } - ch = (Uint32) (p[0] & 0x01); + ch = (Uint32)(p[0] & 0x01); left = 5; } } else if (p[0] >= 0xF8) { @@ -3272,7 +3271,7 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) if (p[0] == 0xF8 && (p[1] & 0xF8) == 0x80) { overlong = SDL_TRUE; } - ch = (Uint32) (p[0] & 0x03); + ch = (Uint32)(p[0] & 0x03); left = 4; } } else if (p[0] >= 0xF0) { @@ -3280,7 +3279,7 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) if (p[0] == 0xF0 && (p[1] & 0xF0) == 0x80) { overlong = SDL_TRUE; } - ch = (Uint32) (p[0] & 0x07); + ch = (Uint32)(p[0] & 0x07); left = 3; } } else if (p[0] >= 0xE0) { @@ -3288,7 +3287,7 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) if (p[0] == 0xE0 && (p[1] & 0xE0) == 0x80) { overlong = SDL_TRUE; } - ch = (Uint32) (p[0] & 0x0F); + ch = (Uint32)(p[0] & 0x0F); left = 2; } } else if (p[0] >= 0xC0) { @@ -3296,12 +3295,12 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) if ((p[0] & 0xDE) == 0xC0) { overlong = SDL_TRUE; } - ch = (Uint32) (p[0] & 0x1F); + ch = (Uint32)(p[0] & 0x1F); left = 1; } } else { - if ((p[0] & 0x80) == 0x00) { - ch = (Uint32) p[0]; + if (!(p[0] & 0x80)) { + ch = (Uint32)p[0]; } } --srclen; @@ -3333,7 +3332,7 @@ static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) #define UTF8_IsTrailingByte(c) ((c) >= 0x80 && (c) <= 0xBF) -int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s) +int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s) { const Uint32 charWidth = FONT_CHARACTER_SIZE; int result = 0; @@ -3352,14 +3351,14 @@ int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s) len -= advance; } - return (result); + return result; } SDLTest_TextWindow *SDLTest_TextWindowCreate(int x, int y, int w, int h) { SDLTest_TextWindow *textwin = (SDLTest_TextWindow *)SDL_malloc(sizeof(*textwin)); - if ( !textwin ) { + if (textwin == NULL) { return NULL; } @@ -3370,7 +3369,7 @@ SDLTest_TextWindow *SDLTest_TextWindowCreate(int x, int y, int w, int h) textwin->current = 0; textwin->numlines = (h / FONT_LINE_HEIGHT); textwin->lines = (char **)SDL_calloc(textwin->numlines, sizeof(*textwin->lines)); - if ( !textwin->lines ) { + if (!textwin->lines) { SDL_free(textwin); return NULL; } @@ -3381,8 +3380,8 @@ void SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer *render { int i, y; - for ( y = textwin->rect.y, i = 0; i < textwin->numlines; ++i, y += FONT_LINE_HEIGHT ) { - if ( textwin->lines[i] ) { + for (y = textwin->rect.y, i = 0; i < textwin->numlines; ++i, y += FONT_LINE_HEIGHT) { + if (textwin->lines[i]) { SDLTest_DrawString(renderer, textwin->rect.x, y, textwin->lines[i]); } } @@ -3390,12 +3389,12 @@ void SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer *render void SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, const char *fmt, ...) { - char text[1024]; - va_list ap; + char text[1024]; + va_list ap; - va_start(ap, fmt); - SDL_vsnprintf(text, sizeof(text), fmt, ap); - va_end(ap); + va_start(ap, fmt); + (void)SDL_vsnprintf(text, sizeof(text), fmt, ap); + va_end(ap); SDLTest_TextWindowAddTextWithLength(textwin, text, SDL_strlen(text)); } @@ -3406,19 +3405,19 @@ void SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, const char SDL_bool newline = SDL_FALSE; char *line; - if ( len > 0 && text[len - 1] == '\n' ) { + if (len > 0 && text[len - 1] == '\n') { --len; newline = SDL_TRUE; } - if ( textwin->lines[textwin->current] ) { + if (textwin->lines[textwin->current]) { existing = SDL_strlen(textwin->lines[textwin->current]); } else { existing = 0; } - if ( *text == '\b' ) { - if ( existing ) { + if (*text == '\b') { + if (existing) { while (existing > 1 && UTF8_IsTrailingByte((Uint8)textwin->lines[textwin->current][existing - 1])) { --existing; } @@ -3433,14 +3432,14 @@ void SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, const char } line = (char *)SDL_realloc(textwin->lines[textwin->current], existing + len + 1); - if ( line ) { + if (line) { SDL_memcpy(&line[existing], text, len); line[existing + len] = '\0'; textwin->lines[textwin->current] = line; - if ( newline ) { + if (newline) { if (textwin->current == textwin->numlines - 1) { SDL_free(textwin->lines[0]); - SDL_memcpy(&textwin->lines[0], &textwin->lines[1], (textwin->numlines-1) * sizeof(textwin->lines[1])); + SDL_memcpy(&textwin->lines[0], &textwin->lines[1], (textwin->numlines - 1) * sizeof(textwin->lines[1])); textwin->lines[textwin->current] = NULL; } else { ++textwin->current; @@ -3453,9 +3452,8 @@ void SDLTest_TextWindowClear(SDLTest_TextWindow *textwin) { int i; - for ( i = 0; i < textwin->numlines; ++i ) - { - if ( textwin->lines[i] ) { + for (i = 0; i < textwin->numlines; ++i) { + if (textwin->lines[i]) { SDL_free(textwin->lines[i]); textwin->lines[i] = NULL; } @@ -3465,7 +3463,7 @@ void SDLTest_TextWindowClear(SDLTest_TextWindow *textwin) void SDLTest_TextWindowDestroy(SDLTest_TextWindow *textwin) { - if ( textwin ) { + if (textwin) { SDLTest_TextWindowClear(textwin); SDL_free(textwin->lines); SDL_free(textwin); @@ -3475,7 +3473,7 @@ void SDLTest_TextWindowDestroy(SDLTest_TextWindow *textwin) void SDLTest_CleanupTextDrawing(void) { unsigned int i; - struct SDLTest_CharTextureCache* cache, *next; + struct SDLTest_CharTextureCache *cache, *next; cache = SDLTest_CharTextureCacheList; while (cache) { diff --git a/modules/SDL2/src/test/SDL_test_fuzzer.c b/modules/SDL2/src/test/SDL_test_fuzzer.c index 602cc8b..b59cbb3 100644 --- a/modules/SDL2/src/test/SDL_test_fuzzer.c +++ b/modules/SDL2/src/test/SDL_test_fuzzer.c @@ -59,8 +59,7 @@ static SDLTest_RandomContext rndContext; * Note: doxygen documentation markup for functions is in the header file. */ -void -SDLTest_FuzzerInit(Uint64 execKey) +void SDLTest_FuzzerInit(Uint64 execKey) { Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; Uint32 b = execKey & 0x00000000FFFFFFFF; @@ -69,64 +68,57 @@ SDLTest_FuzzerInit(Uint64 execKey) fuzzerInvocationCounter = 0; } -int -SDLTest_GetFuzzerInvocationCount() +int SDLTest_GetFuzzerInvocationCount() { return fuzzerInvocationCounter; } -Uint8 -SDLTest_RandomUint8() +Uint8 SDLTest_RandomUint8() { fuzzerInvocationCounter++; - return (Uint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; + return (Uint8)SDLTest_RandomInt(&rndContext) & 0x000000FF; } -Sint8 -SDLTest_RandomSint8() +Sint8 SDLTest_RandomSint8() { fuzzerInvocationCounter++; - return (Sint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; + return (Sint8)SDLTest_RandomInt(&rndContext) & 0x000000FF; } -Uint16 -SDLTest_RandomUint16() +Uint16 SDLTest_RandomUint16() { fuzzerInvocationCounter++; - return (Uint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; + return (Uint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } -Sint16 -SDLTest_RandomSint16() +Sint16 SDLTest_RandomSint16() { fuzzerInvocationCounter++; - return (Sint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; + return (Sint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } -Sint32 -SDLTest_RandomSint32() +Sint32 SDLTest_RandomSint32() { fuzzerInvocationCounter++; - return (Sint32) SDLTest_RandomInt(&rndContext); + return (Sint32)SDLTest_RandomInt(&rndContext); } -Uint32 -SDLTest_RandomUint32() +Uint32 SDLTest_RandomUint32() { fuzzerInvocationCounter++; - return (Uint32) SDLTest_RandomInt(&rndContext); + return (Uint32)SDLTest_RandomInt(&rndContext); } -Uint64 -SDLTest_RandomUint64() +Uint64 SDLTest_RandomUint64() { - union { + union + { Uint64 v64; Uint32 v32[2]; } value; @@ -140,10 +132,10 @@ SDLTest_RandomUint64() return value.v64; } -Sint64 -SDLTest_RandomSint64() +Sint64 SDLTest_RandomSint64() { - union { + union + { Uint64 v64; Uint32 v32[2]; } value; @@ -157,21 +149,18 @@ SDLTest_RandomSint64() return (Sint64)value.v64; } - - -Sint32 -SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) +Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) { Sint64 min = pMin; Sint64 max = pMax; Sint64 temp; Sint64 number; - if(pMin > pMax) { + if (pMin > pMax) { temp = min; min = max; max = temp; - } else if(pMin == pMax) { + } else if (pMin == pMax) { return (Sint32)min; } @@ -204,48 +193,47 @@ SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) * * \returns Returns a random boundary value for the domain or 0 in case of error */ -static Uint64 -SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) +static Uint64 SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { - Uint64 b1, b2; + Uint64 b1, b2; Uint64 delta; Uint64 tempBuf[4]; Uint8 index; - /* Maybe swap */ + /* Maybe swap */ if (boundary1 > boundary2) { b1 = boundary2; b2 = boundary1; } else { b1 = boundary1; b2 = boundary2; - } + } index = 0; if (validDomain == SDL_TRUE) { - if (b1 == b2) { - return b1; - } - - /* Generate up to 4 values within bounds */ - delta = b2 - b1; - if (delta < 4) { - do { + if (b1 == b2) { + return b1; + } + + /* Generate up to 4 values within bounds */ + delta = b2 - b1; + if (delta < 4) { + do { tempBuf[index] = b1 + index; index++; - } while (index < delta); - } else { - tempBuf[index] = b1; - index++; - tempBuf[index] = b1 + 1; - index++; - tempBuf[index] = b2 - 1; - index++; - tempBuf[index] = b2; - index++; - } + } while (index < delta); } else { - /* Generate up to 2 values outside of bounds */ + tempBuf[index] = b1; + index++; + tempBuf[index] = b1 + 1; + index++; + tempBuf[index] = b2 - 1; + index++; + tempBuf[index] = b2; + index++; + } + } else { + /* Generate up to 2 values outside of bounds */ if (b1 > 0) { tempBuf[index] = b1 - 1; index++; @@ -266,49 +254,44 @@ SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1, return tempBuf[SDLTest_RandomUint8() % index]; } - -Uint8 -SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain) +Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain) { /* max value for Uint8 */ const Uint64 maxValue = UCHAR_MAX; return (Uint8)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + (Uint64)boundary1, (Uint64)boundary2, + validDomain); } -Uint16 -SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) +Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) { /* max value for Uint16 */ const Uint64 maxValue = USHRT_MAX; return (Uint16)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + (Uint64)boundary1, (Uint64)boundary2, + validDomain); } -Uint32 -SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) +Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) { - /* max value for Uint32 */ - #if ((ULONG_MAX) == (UINT_MAX)) - const Uint64 maxValue = ULONG_MAX; - #else - const Uint64 maxValue = UINT_MAX; - #endif +/* max value for Uint32 */ +#if ((ULONG_MAX) == (UINT_MAX)) + const Uint64 maxValue = ULONG_MAX; +#else + const Uint64 maxValue = UINT_MAX; +#endif return (Uint32)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + (Uint64)boundary1, (Uint64)boundary2, + validDomain); } -Uint64 -SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) +Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { /* max value for Uint64 */ const Uint64 maxValue = UINT64_MAX; return SDLTest_GenerateUnsignedBoundaryValues(maxValue, - boundary1, boundary2, - validDomain); + boundary1, boundary2, + validDomain); } /* ! @@ -336,48 +319,47 @@ SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool v * * \returns Returns a random boundary value for the domain or 0 in case of error */ -static Sint64 -SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) +static Sint64 SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { - Sint64 b1, b2; + Sint64 b1, b2; Sint64 delta; Sint64 tempBuf[4]; Uint8 index; - /* Maybe swap */ + /* Maybe swap */ if (boundary1 > boundary2) { b1 = boundary2; b2 = boundary1; } else { b1 = boundary1; b2 = boundary2; - } + } index = 0; if (validDomain == SDL_TRUE) { - if (b1 == b2) { - return b1; - } - - /* Generate up to 4 values within bounds */ - delta = b2 - b1; - if (delta < 4) { - do { + if (b1 == b2) { + return b1; + } + + /* Generate up to 4 values within bounds */ + delta = b2 - b1; + if (delta < 4) { + do { tempBuf[index] = b1 + index; index++; - } while (index < delta); - } else { - tempBuf[index] = b1; - index++; - tempBuf[index] = b1 + 1; - index++; - tempBuf[index] = b2 - 1; - index++; - tempBuf[index] = b2; - index++; - } + } while (index < delta); } else { - /* Generate up to 2 values outside of bounds */ + tempBuf[index] = b1; + index++; + tempBuf[index] = b1 + 1; + index++; + tempBuf[index] = b2 - 1; + index++; + tempBuf[index] = b2; + index++; + } + } else { + /* Generate up to 2 values outside of bounds */ if (b1 > minValue) { tempBuf[index] = b1 - 1; index++; @@ -398,72 +380,65 @@ SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValu return tempBuf[SDLTest_RandomUint8() % index]; } - -Sint8 -SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain) +Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain) { /* min & max values for Sint8 */ const Sint64 maxValue = SCHAR_MAX; const Sint64 minValue = SCHAR_MIN; return (Sint8)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + (Sint64)boundary1, (Sint64)boundary2, + validDomain); } -Sint16 -SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) +Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) { /* min & max values for Sint16 */ const Sint64 maxValue = SHRT_MAX; const Sint64 minValue = SHRT_MIN; return (Sint16)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + (Sint64)boundary1, (Sint64)boundary2, + validDomain); } -Sint32 -SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) +Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) { - /* min & max values for Sint32 */ - #if ((ULONG_MAX) == (UINT_MAX)) - const Sint64 maxValue = LONG_MAX; - const Sint64 minValue = LONG_MIN; - #else - const Sint64 maxValue = INT_MAX; - const Sint64 minValue = INT_MIN; - #endif +/* min & max values for Sint32 */ +#if ((ULONG_MAX) == (UINT_MAX)) + const Sint64 maxValue = LONG_MAX; + const Sint64 minValue = LONG_MIN; +#else + const Sint64 maxValue = INT_MAX; + const Sint64 minValue = INT_MIN; +#endif return (Sint32)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + (Sint64)boundary1, (Sint64)boundary2, + validDomain); } -Sint64 -SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) +Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { /* min & max values for Sint64 */ const Sint64 maxValue = INT64_MAX; const Sint64 minValue = INT64_MIN; return SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - boundary1, boundary2, - validDomain); + boundary1, boundary2, + validDomain); } -float -SDLTest_RandomUnitFloat() +float SDLTest_RandomUnitFloat() { - return SDLTest_RandomUint32() / (float) UINT_MAX; + return SDLTest_RandomUint32() / (float)UINT_MAX; } -float -SDLTest_RandomFloat() +float SDLTest_RandomFloat() { - return (float) (SDLTest_RandomUnitDouble() * 2.0 * (double)FLT_MAX - (double)(FLT_MAX)); + return (float)(SDLTest_RandomUnitDouble() * 2.0 * (double)FLT_MAX - (double)(FLT_MAX)); } double SDLTest_RandomUnitDouble() { - return (double) (SDLTest_RandomUint64() >> 11) * (1.0/9007199254740992.0); + return (double)(SDLTest_RandomUint64() >> 11) * (1.0 / 9007199254740992.0); } double @@ -472,8 +447,8 @@ SDLTest_RandomDouble() double r = 0.0; double s = 1.0; do { - s /= UINT_MAX + 1.0; - r += (double)SDLTest_RandomInt(&rndContext) * s; + s /= UINT_MAX + 1.0; + r += (double)SDLTest_RandomInt(&rndContext) * s; } while (s > DBL_EPSILON); fuzzerInvocationCounter++; @@ -481,20 +456,17 @@ SDLTest_RandomDouble() return r; } - -char * -SDLTest_RandomAsciiString() +char *SDLTest_RandomAsciiString() { return SDLTest_RandomAsciiStringWithMaximumLength(255); } -char * -SDLTest_RandomAsciiStringWithMaximumLength(int maxLength) +char *SDLTest_RandomAsciiStringWithMaximumLength(int maxLength) { int size; - if(maxLength < 1) { - SDL_InvalidParamError("maxLength"); + if (maxLength < 1) { + SDL_InvalidParamError("maxLength"); return NULL; } @@ -503,24 +475,22 @@ SDLTest_RandomAsciiStringWithMaximumLength(int maxLength) return SDLTest_RandomAsciiStringOfSize(size); } -char * -SDLTest_RandomAsciiStringOfSize(int size) +char *SDLTest_RandomAsciiStringOfSize(int size) { char *string; int counter; - - if(size < 1) { - SDL_InvalidParamError("size"); + if (size < 1) { + SDL_InvalidParamError("size"); return NULL; } string = (char *)SDL_malloc((size + 1) * sizeof(char)); - if (string==NULL) { - return NULL; - } + if (string == NULL) { + return NULL; + } - for(counter = 0; counter < size; ++counter) { + for (counter = 0; counter < size; ++counter) { string[counter] = (char)SDLTest_RandomIntegerInRange(32, 126); } diff --git a/modules/SDL2/src/test/SDL_test_harness.c b/modules/SDL2/src/test/SDL_test_harness.c index 95df0e2..6141513 100644 --- a/modules/SDL2/src/test/SDL_test_harness.c +++ b/modules/SDL2/src/test/SDL_test_harness.c @@ -41,17 +41,16 @@ static Uint32 SDLTest_TestCaseTimeout = 3600; /** -* Generates a random run seed string for the harness. The generated seed -* will contain alphanumeric characters (0-9A-Z). -* -* Note: The returned string needs to be deallocated by the caller. -* -* \param length The length of the seed string to generate -* -* \returns The generated seed string -*/ -char * -SDLTest_GenerateRunSeed(const int length) + * Generates a random run seed string for the harness. The generated seed + * will contain alphanumeric characters (0-9A-Z). + * + * Note: The returned string needs to be deallocated by the caller. + * + * \param length The length of the seed string to generate + * + * \returns The generated seed string + */ +char *SDLTest_GenerateRunSeed(const int length) { char *seed = NULL; SDLTest_RandomContext randomContext; @@ -75,7 +74,7 @@ SDLTest_GenerateRunSeed(const int length) SDLTest_RandomInitTime(&randomContext); for (counter = 0; counter < length; counter++) { unsigned int number = SDLTest_Random(&randomContext); - char ch = (char) (number % (91 - 48)) + 48; + char ch = (char)(number % (91 - 48)) + 48; if (ch >= 58 && ch <= 64) { ch = 65; } @@ -87,18 +86,17 @@ SDLTest_GenerateRunSeed(const int length) } /** -* Generates an execution key for the fuzzer. -* -* \param runSeed The run seed to use -* \param suiteName The name of the test suite -* \param testName The name of the test -* \param iteration The iteration count -* -* \returns The generated execution key to initialize the fuzzer with. -* -*/ -static Uint64 -SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName, const char *testName, int iteration) + * Generates an execution key for the fuzzer. + * + * \param runSeed The run seed to use + * \param suiteName The name of the test suite + * \param testName The name of the test + * \param iteration The iteration count + * + * \returns The generated execution key to initialize the fuzzer with. + * + */ +static Uint64 SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName, const char *testName, int iteration) { SDLTest_Md5Context md5Context; Uint64 *keys; @@ -132,25 +130,25 @@ SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName, const char * /* Convert iteration number into a string */ SDL_memset(iterationString, 0, sizeof(iterationString)); - SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration); + (void)SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration); /* Combine the parameters into single string */ runSeedLength = SDL_strlen(runSeed); suiteNameLength = SDL_strlen(suiteName); testNameLength = SDL_strlen(testName); iterationStringLength = SDL_strlen(iterationString); - entireStringLength = runSeedLength + suiteNameLength + testNameLength + iterationStringLength + 1; + entireStringLength = runSeedLength + suiteNameLength + testNameLength + iterationStringLength + 1; buffer = (char *)SDL_malloc(entireStringLength); if (buffer == NULL) { SDLTest_LogError("Failed to allocate buffer for execKey generation."); SDL_Error(SDL_ENOMEM); return 0; } - SDL_snprintf(buffer, entireStringLength, "%s%s%s%d", runSeed, suiteName, testName, iteration); + (void)SDL_snprintf(buffer, entireStringLength, "%s%s%s%d", runSeed, suiteName, testName, iteration); /* Hash string and use half of the digest as 64bit exec key */ SDLTest_Md5Init(&md5Context); - SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, (unsigned int) entireStringLength); + SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, (unsigned int)entireStringLength); SDLTest_Md5Final(&md5Context); SDL_free(buffer); keys = (Uint64 *)md5Context.digest; @@ -159,17 +157,16 @@ SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName, const char * } /** -* \brief Set timeout handler for test. -* -* Note: SDL_Init(SDL_INIT_TIMER) will be called if it wasn't done so before. -* -* \param timeout Timeout interval in seconds. -* \param callback Function that will be called after timeout has elapsed. -* -* \return Timer id or -1 on failure. -*/ -static SDL_TimerID -SDLTest_SetTestTimeout(int timeout, void (SDLCALL *callback)(void)) + * \brief Set timeout handler for test. + * + * Note: SDL_Init(SDL_INIT_TIMER) will be called if it wasn't done so before. + * + * \param timeout Timeout interval in seconds. + * \param callback Function that will be called after timeout has elapsed. + * + * \return Timer id or -1 on failure. + */ +static SDL_TimerID SDLTest_SetTestTimeout(int timeout, void(SDLCALL *callback)(void)) { Uint32 timeoutInMilliseconds; SDL_TimerID timerID; @@ -204,44 +201,40 @@ SDLTest_SetTestTimeout(int timeout, void (SDLCALL *callback)(void)) } /** -* \brief Timeout handler. Aborts test run and exits harness process. -*/ + * \brief Timeout handler. Aborts test run and exits harness process. + */ #if defined(__WATCOMC__) #pragma aux SDLTest_BailOut aborts; #endif -static SDL_NORETURN void SDLCALL -SDLTest_BailOut(void) +static SDL_NORETURN void SDLCALL SDLTest_BailOut(void) { SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run."); exit(TEST_ABORTED); /* bail out from the test */ } /** -* \brief Execute a test using the given execution key. -* -* \param testSuite Suite containing the test case. -* \param testCase Case to execute. -* \param execKey Execution key for the fuzzer. -* \param forceTestRun Force test to run even if test was disabled in suite. -* -* \returns Test case result. -*/ -static int -SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_TestCaseReference *testCase, Uint64 execKey, SDL_bool forceTestRun) + * \brief Execute a test using the given execution key. + * + * \param testSuite Suite containing the test case. + * \param testCase Case to execute. + * \param execKey Execution key for the fuzzer. + * \param forceTestRun Force test to run even if test was disabled in suite. + * + * \returns Test case result. + */ +static int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_TestCaseReference *testCase, Uint64 execKey, SDL_bool forceTestRun) { SDL_TimerID timer = 0; int testCaseResult = 0; int testResult = 0; int fuzzerCount; - if (testSuite==NULL || testCase==NULL || testSuite->name==NULL || testCase->name==NULL) - { + if (testSuite == NULL || testCase == NULL || testSuite->name == NULL || testCase->name == NULL) { SDLTest_LogError("Setup failure: testSuite or testCase references NULL"); return TEST_RESULT_SETUP_FAILURE; } - if (!testCase->enabled && forceTestRun == SDL_FALSE) - { + if (!testCase->enabled && forceTestRun == SDL_FALSE) { SDLTest_Log(SDLTEST_FINAL_RESULT_FORMAT, "Test", testCase->name, "Skipped (Disabled)"); return TEST_RESULT_SKIPPED; } @@ -326,7 +319,7 @@ static void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) /* Loop over all suites */ suiteCounter = 0; - while(&testSuites[suiteCounter]) { + while (&testSuites[suiteCounter]) { testSuite=&testSuites[suiteCounter]; suiteCounter++; SDLTest_Log("Test Suite %i - %s\n", suiteCounter, @@ -334,8 +327,7 @@ static void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) /* Loop over all test cases */ testCounter = 0; - while(testSuite->testCases[testCounter]) - { + while (testSuite->testCases[testCounter]) { testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; testCounter++; SDLTest_Log(" Test Case %i - %s: %s", testCounter, @@ -349,24 +341,24 @@ static void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) /* Gets a timer value in seconds */ static float GetClock() { - float currentClock = SDL_GetPerformanceCounter() / (float) SDL_GetPerformanceFrequency(); + float currentClock = SDL_GetPerformanceCounter() / (float)SDL_GetPerformanceFrequency(); return currentClock; } /** -* \brief Execute a test suite using the given run seed and execution key. -* -* The filter string is matched to the suite name (full comparison) to select a single suite, -* or if no suite matches, it is matched to the test names (full comparison) to select a single test. -* -* \param testSuites Suites containing the test case. -* \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one. -* \param userExecKey Custom execution key provided by user, or 0 to autogenerate one. -* \param filter Filter specification. NULL disables. Case sensitive. -* \param testIterations Number of iterations to run each test case. -* -* \returns Test run result; 0 when all tests passed, 1 if any tests failed. -*/ + * \brief Execute a test suite using the given run seed and execution key. + * + * The filter string is matched to the suite name (full comparison) to select a single suite, + * or if no suite matches, it is matched to the test names (full comparison) to select a single test. + * + * \param testSuites Suites containing the test case. + * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one. + * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one. + * \param filter Filter specification. NULL disables. Case sensitive. + * \param testIterations Number of iterations to run each test case. + * + * \returns Test run result; 0 when all tests passed, 1 if any tests failed. + */ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations) { int totalNumberOfTests = 0; @@ -402,6 +394,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user int testSkippedCount = 0; int countSum = 0; const SDLTest_TestCaseReference **failedTests; + char generatedSeed[16 + 1]; /* Sanitize test iterations */ if (testIterations < 1) { @@ -410,11 +403,14 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Generate run see if we don't have one already */ if (userRunSeed == NULL || userRunSeed[0] == '\0') { - runSeed = SDLTest_GenerateRunSeed(16); - if (runSeed == NULL) { + char *tmp = SDLTest_GenerateRunSeed(16); + if (tmp == NULL) { SDLTest_LogError("Generating a random seed failed"); return 2; } + SDL_memcpy(generatedSeed, tmp, 16 + 1); + SDL_free(tmp); + runSeed = generatedSeed; } else { runSeed = userRunSeed; } @@ -436,8 +432,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user testSuite = testSuites[suiteCounter]; suiteCounter++; testCounter = 0; - while (testSuite->testCases[testCounter]) - { + while (testSuite->testCases[testCounter]) { testCounter++; totalNumberOfTests++; } @@ -450,10 +445,10 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Pre-allocate an array for tracking failed tests (potentially all test cases) */ failedTests = (const SDLTest_TestCaseReference **)SDL_malloc(totalNumberOfTests * sizeof(SDLTest_TestCaseReference *)); - if (failedTests == NULL) { - SDLTest_LogError("Unable to allocate cache for failed tests"); - SDL_Error(SDL_ENOMEM); - return -1; + if (failedTests == NULL) { + SDLTest_LogError("Unable to allocate cache for failed tests"); + SDL_Error(SDL_ENOMEM); + return -1; } /* Initialize filtering */ @@ -503,14 +498,14 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } } SDLTest_Log("Exit code: 2"); - SDL_free((void *) failedTests); + SDL_free((void *)failedTests); return 2; } } /* Loop over all suites */ suiteCounter = 0; - while(testSuites[suiteCounter]) { + while (testSuites[suiteCounter]) { testSuite = testSuites[suiteCounter]; currentSuiteName = (testSuite->name ? testSuite->name : SDLTEST_INVALID_NAME_FORMAT); suiteCounter++; @@ -518,10 +513,10 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Filter suite if flag set and we have a name */ if (suiteFilter == 1 && suiteFilterName != NULL && testSuite->name != NULL && SDL_strcasecmp(suiteFilterName, testSuite->name) != 0) { - /* Skip suite */ - SDLTest_Log("===== Test Suite %i: '%s' skipped\n", - suiteCounter, - currentSuiteName); + /* Skip suite */ + SDLTest_Log("===== Test Suite %i: '%s' skipped\n", + suiteCounter, + currentSuiteName); } else { /* Reset per-suite counters */ @@ -534,13 +529,12 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Log suite started */ SDLTest_Log("===== Test Suite %i: '%s' started\n", - suiteCounter, - currentSuiteName); + suiteCounter, + currentSuiteName); /* Loop over all test cases */ testCounter = 0; - while(testSuite->testCases[testCounter]) - { + while (testSuite->testCases[testCounter]) { testCase = testSuite->testCases[testCounter]; currentTestName = (testCase->name ? testCase->name : SDLTEST_INVALID_NAME_FORMAT); testCounter++; @@ -548,11 +542,11 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Filter tests if flag set and we have a name */ if (testFilter == 1 && testFilterName != NULL && testCase->name != NULL && SDL_strcasecmp(testFilterName, testCase->name) != 0) { - /* Skip test */ - SDLTest_Log("===== Test Case %i.%i: '%s' skipped\n", - suiteCounter, - testCounter, - currentTestName); + /* Skip test */ + SDLTest_Log("===== Test Case %i.%i: '%s' skipped\n", + suiteCounter, + testCounter, + currentTestName); } else { /* Override 'disabled' flag if we specified a test filter (i.e. force run for debugging) */ if (testFilter == 1 && !testCase->enabled) { @@ -565,18 +559,17 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Log test started */ SDLTest_Log("----- Test Case %i.%i: '%s' started", - suiteCounter, - testCounter, - currentTestName); + suiteCounter, + testCounter, + currentTestName); if (testCase->description != NULL && testCase->description[0] != '\0') { SDLTest_Log("Test Description: '%s'", - (testCase->description) ? testCase->description : SDLTEST_INVALID_NAME_FORMAT); + (testCase->description) ? testCase->description : SDLTEST_INVALID_NAME_FORMAT); } /* Loop over all iterations */ iterationCounter = 0; - while(iterationCounter < testIterations) - { + while (iterationCounter < testIterations) { iterationCounter++; if (userExecKey != 0) { @@ -603,7 +596,9 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Take time - test end */ testEndSeconds = GetClock(); runtime = testEndSeconds - testStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + if (runtime < 0.0f) { + runtime = 0.0f; + } if (testIterations > 1) { /* Log test runtime */ @@ -623,7 +618,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user SDLTest_LogError(SDLTEST_FINAL_RESULT_FORMAT, "Test", currentTestName, "Failed"); break; case TEST_RESULT_NO_ASSERT: - SDLTest_LogError(SDLTEST_FINAL_RESULT_FORMAT,"Test", currentTestName, "No Asserts"); + SDLTest_LogError(SDLTEST_FINAL_RESULT_FORMAT, "Test", currentTestName, "No Asserts"); break; } @@ -638,45 +633,42 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user /* Take time - suite end */ suiteEndSeconds = GetClock(); runtime = suiteEndSeconds - suiteStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + if (runtime < 0.0f) { + runtime = 0.0f; + } /* Log suite runtime */ SDLTest_Log("Total Suite runtime: %.1f sec", runtime); /* Log summary and final Suite result */ countSum = testPassedCount + testFailedCount + testSkippedCount; - if (testFailedCount == 0) - { + if (testFailedCount == 0) { SDLTest_Log(SDLTEST_LOG_SUMMARY_FORMAT, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); SDLTest_Log(SDLTEST_FINAL_RESULT_FORMAT, "Suite", currentSuiteName, "Passed"); - } - else - { + } else { SDLTest_LogError(SDLTEST_LOG_SUMMARY_FORMAT, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); SDLTest_LogError(SDLTEST_FINAL_RESULT_FORMAT, "Suite", currentSuiteName, "Failed"); } - } } /* Take time - run end */ runEndSeconds = GetClock(); runtime = runEndSeconds - runStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + if (runtime < 0.0f) { + runtime = 0.0f; + } /* Log total runtime */ SDLTest_Log("Total Run runtime: %.1f sec", runtime); /* Log summary and final run result */ countSum = totalTestPassedCount + totalTestFailedCount + totalTestSkippedCount; - if (totalTestFailedCount == 0) - { + if (totalTestFailedCount == 0) { runResult = 0; SDLTest_Log(SDLTEST_LOG_SUMMARY_FORMAT, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); SDLTest_Log(SDLTEST_FINAL_RESULT_FORMAT, "Run /w seed", runSeed, "Passed"); - } - else - { + } else { runResult = 1; SDLTest_LogError(SDLTEST_LOG_SUMMARY_FORMAT, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); SDLTest_LogError(SDLTEST_FINAL_RESULT_FORMAT, "Run /w seed", runSeed, "Failed"); @@ -686,10 +678,10 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user if (failedNumberOfTests > 0) { SDLTest_Log("Harness input to repro failures:"); for (testCounter = 0; testCounter < failedNumberOfTests; testCounter++) { - SDLTest_Log(" --seed %s --filter %s", runSeed, failedTests[testCounter]->name); + SDLTest_Log(" --seed %s --filter %s", runSeed, failedTests[testCounter]->name); } } - SDL_free((void *) failedTests); + SDL_free((void *)failedTests); SDLTest_Log("Exit code: %d", runResult); return runResult; diff --git a/modules/SDL2/src/test/SDL_test_imageBlit.c b/modules/SDL2/src/test/SDL_test_imageBlit.c index 7456bcd..0a08670 100644 --- a/modules/SDL2/src/test/SDL_test_imageBlit.c +++ b/modules/SDL2/src/test/SDL_test_imageBlit.c @@ -25,514 +25,516 @@ /* GIMP RGB C-Source image dump (blit.c) */ static const SDLTest_SurfaceImage_t SDLTest_imageBlit = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" + "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0" + "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" + "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\0\0\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" + "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" + "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" + "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" + "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0", }; /** @@ -540,482 +542,484 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlit = { */ SDL_Surface *SDLTest_ImageBlit() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlit.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlit.pixel_data, SDLTest_imageBlit.width, SDLTest_imageBlit.height, SDLTest_imageBlit.bytes_per_pixel * 8, SDLTest_imageBlit.width * SDLTest_imageBlit.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitColor = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\0\0\0\0" - "\0\0(\0\0(\0\0\0\0\0\0\0\0<\0\0<\0\0\0\0\0\0\0\0P\0\0P\0\0\0\0\0\0\0\0d\0" - "\0d\0\0\0\0\0\0\0\0x\0\0x\0\0\0\0\0\0\0\0\214\0\0\214\0\0\0\0\0\0\0\0\240" - "\0\0\240\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0\310\0\0\310\0\0\0\0" - "\0\0\0\0\334\0\0\334\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360" - "\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0\0\0(\0\0" - "(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0d\0\0d\0\0" - "\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0\0\240\0\0" - "\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310\0\0\0\0" - "\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0" - "\0\0(\0\0(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0" - "d\0\0d\0\0\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0" - "\0\240\0\0\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310" - "\0\0\0\0\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0\0\0\0$\24\0" - "$\24\0\0\0\0\0\0\0$(\0$(\0\0\0\0\0\0\0$<\0$<\0\0\0\0\0\0\0$P\0$P\0\0\0\0" - "\0\0\0$d\0$d\0\0\0\0\0\0\0$x\0$x\0\0\0\0\0\0\0$\214\0$\214\0\0\0\0\0\0\0" - "$\240\0$\240\0\0\0\0\0\0\0$\264\0$\264\0\0\0\0\0\0\0$\310\0$\310\0\0\0\0" - "\0\0\0$\334\0$\334\0\0\0\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360" - "\0$\360\0$\360\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0" - "$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0" - "$\214\0$\214\0$\214\0\0\0\0$\240\0$\240\0$\240\0\0\0\0$\264\0$\264\0$\264" - "\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334\0$\334\0$\334\0\0\0\0$\360\0$\360" - "\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0" - "\0\0\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0" - "$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0" - "$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0$\214\0$\214\0$\214\0\0\0\0$\240\0$\240" - "\0$\240\0\0\0\0$\264\0$\264\0$\264\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334" - "\0$\334\0$\334\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$" - "\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0" - "\0\0\0\0H\0\0H\0\0\0\0\0\0\0\0H\24\0H\24\0\0\0\0\0\0\0H(\0H(\0\0\0\0\0\0" - "\0H<\0H<\0\0\0\0\0\0\0HP\0HP\0\0\0\0\0\0\0Hd\0Hd\0\0\0\0\0\0\0Hx\0Hx\0\0" - "\0\0\0\0\0H\214\0H\214\0\0\0\0\0\0\0H\240\0H\240\0\0\0\0\0\0\0H\264\0H\264" - "\0\0\0\0\0\0\0H\310\0H\310\0\0\0\0\0\0\0H\334\0H\334\0\0\0\0\0\0\0H\360\0" - "H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0\0\0\0\0\0\0$\360\0$\360" - "\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0H\24\0H\24\0H\24" - "\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd" - "\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0H\214\0\0\0\0H\240\0H\240\0H\240" - "\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310\0H\310\0H\310\0\0\0\0H\334\0H\334" - "\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H" - "\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0" - "H\0\0H\0\0\0\0\0H\24\0H\24\0H\24\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0" - "\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0" - "H\214\0\0\0\0H\240\0H\240\0H\240\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310" - "\0H\310\0H\310\0\0\0\0H\334\0H\334\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360" - "\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0" - "\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0H\0\0H\0\0H\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\0\0\0l\24\0l\24\0\0\0\0\0\0" - "\0l(\0l(\0\0\0\0\0\0\0l<\0l<\0\0\0\0\0\0\0lP\0lP\0\0\0\0\0\0\0ld\0ld\0\0" - "\0\0\0\0\0lx\0lx\0\0\0\0\0\0\0l\214\0l\214\0\0\0\0\0\0\0l\240\0l\240\0\0" - "\0\0\0\0\0l\264\0l\264\0\0\0\0\0\0\0l\310\0l\310\0\0\0\0\0\0\0l\334\0l\334" - "\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0" - "\0\0\0\0\0H\360\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0" - "\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0\0\0l<\0l<\0l<\0\0\0\0lP\0lP" - "\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0\0\0l\214\0l\214\0l\214\0\0\0" - "\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0l\264\0\0\0\0l\310\0l\310\0l\310" - "\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0" - "\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0" - "\0\0l<\0l<\0l<\0\0\0\0lP\0lP\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0" - "\0\0l\214\0l\214\0l\214\0\0\0\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0" - "l\264\0\0\0\0l\310\0l\310\0l\310\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0" - "l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360" - "\0\0\0\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\0\0" - "\0\220\24\0\220\24\0\0\0\0\0\0\0\220(\0\220(\0\0\0\0\0\0\0\220<\0\220<\0" - "\0\0\0\0\0\0\220P\0\220P\0\0\0\0\0\0\0\220d\0\220d\0\0\0\0\0\0\0\220x\0\220" - "x\0\0\0\0\0\0\0\220\214\0\220\214\0\0\0\0\0\0\0\220\240\0\220\240\0\0\0\0" - "\0\0\0\220\264\0\220\264\0\0\0\0\0\0\0\220\310\0\220\310\0\0\0\0\0\0\0\220" - "\334\0\220\334\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\0\0\0\0\0\0l\360\0l\360\0l\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\220\24\0\220\24\0" - "\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220<\0\220<\0\220<\0\0\0\0\220" - "P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0\0\0\220x\0\220x\0\220x\0\0" - "\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240\0\220\240\0\220\240\0\0" - "\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310\0\220\310\0\220\310\0\0" - "\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360" - "\0\220\360\0\0\0\0l\360\0l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220" - "\0\0\0\0\0\220\24\0\220\24\0\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220" - "<\0\220<\0\220<\0\0\0\0\220P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0" - "\0\0\220x\0\220x\0\220x\0\0\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240" - "\0\220\240\0\220\240\0\0\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310" - "\0\220\310\0\220\310\0\0\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360" - "\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0" - "\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360\0" - "l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0" - "\264\24\0\264\24\0\0\0\0\0\0\0\264(\0\264(\0\0\0\0\0\0\0\264<\0\264<\0\0" - "\0\0\0\0\0\264P\0\264P\0\0\0\0\0\0\0\264d\0\264d\0\0\0\0\0\0\0\264x\0\264" - "x\0\0\0\0\0\0\0\264\214\0\264\214\0\0\0\0\0\0\0\264\240\0\264\240\0\0\0\0" - "\0\0\0\264\264\0\264\264\0\0\0\0\0\0\0\264\310\0\264\310\0\0\0\0\0\0\0\264" - "\334\0\264\334\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\220\360\0\220\360\0\220" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264" - "\24\0\264\24\0\264\24\0\0\0\0\264(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264" - "<\0\0\0\0\264P\0\264P\0\264P\0\0\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264" - "x\0\264x\0\0\0\0\264\214\0\264\214\0\264\214\0\0\0\0\264\240\0\264\240\0" - "\264\240\0\0\0\0\264\264\0\264\264\0\264\264\0\0\0\0\264\310\0\264\310\0" - "\264\310\0\0\0\0\264\334\0\264\334\0\264\334\0\0\0\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\220\0" - "\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264\24\0\264\24\0\264\24\0\0\0\0\264" - "(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264<\0\0\0\0\264P\0\264P\0\264P\0\0" - "\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264x\0\264x\0\0\0\0\264\214\0\264" - "\214\0\264\214\0\0\0\0\264\240\0\264\240\0\264\240\0\0\0\0\264\264\0\264" - "\264\0\264\264\0\0\0\0\264\310\0\264\310\0\264\310\0\0\0\0\264\334\0\264" - "\334\0\264\334\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\0\0\0\264\0\0\264\0\0" - "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\0\0\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\264" - "\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\0\0\0\330\24\0\330\24\0\0\0\0\0\0" - "\0\330(\0\330(\0\0\0\0\0\0\0\330<\0\330<\0\0\0\0\0\0\0\330P\0\330P\0\0\0" - "\0\0\0\0\330d\0\330d\0\0\0\0\0\0\0\330x\0\330x\0\0\0\0\0\0\0\330\214\0\330" - "\214\0\0\0\0\0\0\0\330\240\0\330\240\0\0\0\0\0\0\0\330\264\0\330\264\0\0" - "\0\0\0\0\0\330\310\0\330\310\0\0\0\0\0\0\0\330\334\0\330\334\0\0\0\0\0\0" - "\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0" - "\330\360\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0" - "\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0" - "\0\0\330(\0\330(\0\330(\0\0\0\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0" - "\330P\0\0\0\0\330d\0\330d\0\330d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214" - "\0\330\214\0\330\214\0\0\0\0\330\240\0\330\240\0\330\240\0\0\0\0\330\264" - "\0\330\264\0\330\264\0\0\0\0\330\310\0\330\310\0\330\310\0\0\0\0\330\334" - "\0\330\334\0\330\334\0\0\0\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360" - "\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\330\0\0\330\0\0" - "\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0\0\0\330(\0\330(\0\330(\0\0\0" - "\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0\330P\0\0\0\0\330d\0\330d\0\330" - "d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214\0\330\214\0\330\214\0\0\0\0" - "\330\240\0\330\240\0\330\240\0\0\0\0\330\264\0\330\264\0\330\264\0\0\0\0" - "\330\310\0\330\310\0\330\310\0\0\0\0\330\334\0\330\334\0\330\334\0\0\0\0" - "\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\0\0\0" - "\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\374\0\0" - "\374\0\0\0\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0" - "\0\0\374<\0\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0" - "\0\0\0\0\0\374x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374" - "\240\0\374\240\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374" - "\310\0\0\0\0\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330" - "\360\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0" - "\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0" - "\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x" - "\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374" - "\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374" - "\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330" - "\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0" - "\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374" - "P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0" - "\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0" - "\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0" - "\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0" - "\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374" - "<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374" - "x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374" - "\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374" - "\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374" - "(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0" - "\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374" - "\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374" - "\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374" - "\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0" - "\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0" - "\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214" - "\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264" - "\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334" - "\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24" - "\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0" - "\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0" - "\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0" - "\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334" - "\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0" - "\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0" - "\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374" - "x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240" - "\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0" - "\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24\0" - "\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0\0" - "\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0\0" - "\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0\374" - "\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334\0\374" - "\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0" - "\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P" - "\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374" - "\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374" - "\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374" - "\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0" - "\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0" - "\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374" - "x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0" - "\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374" - "\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\0\0\0\0" + "\0\0(\0\0(\0\0\0\0\0\0\0\0<\0\0<\0\0\0\0\0\0\0\0P\0\0P\0\0\0\0\0\0\0\0d\0" + "\0d\0\0\0\0\0\0\0\0x\0\0x\0\0\0\0\0\0\0\0\214\0\0\214\0\0\0\0\0\0\0\0\240" + "\0\0\240\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0\310\0\0\310\0\0\0\0" + "\0\0\0\0\334\0\0\334\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360" + "\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0\0\0(\0\0" + "(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0d\0\0d\0\0" + "\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0\0\240\0\0" + "\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310\0\0\0\0" + "\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" + "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0" + "\0\0(\0\0(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0" + "d\0\0d\0\0\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0" + "\0\240\0\0\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310" + "\0\0\0\0\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0" + "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0\0\0\0$\24\0" + "$\24\0\0\0\0\0\0\0$(\0$(\0\0\0\0\0\0\0$<\0$<\0\0\0\0\0\0\0$P\0$P\0\0\0\0" + "\0\0\0$d\0$d\0\0\0\0\0\0\0$x\0$x\0\0\0\0\0\0\0$\214\0$\214\0\0\0\0\0\0\0" + "$\240\0$\240\0\0\0\0\0\0\0$\264\0$\264\0\0\0\0\0\0\0$\310\0$\310\0\0\0\0" + "\0\0\0$\334\0$\334\0\0\0\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360" + "\0$\360\0$\360\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0" + "$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0" + "$\214\0$\214\0$\214\0\0\0\0$\240\0$\240\0$\240\0\0\0\0$\264\0$\264\0$\264" + "\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334\0$\334\0$\334\0\0\0\0$\360\0$\360" + "\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0" + "\0\0\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0" + "$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0" + "$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0$\214\0$\214\0$\214\0\0\0\0$\240\0$\240" + "\0$\240\0\0\0\0$\264\0$\264\0$\264\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334" + "\0$\334\0$\334\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$" + "\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\360\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0" + "\0\0\0\0H\0\0H\0\0\0\0\0\0\0\0H\24\0H\24\0\0\0\0\0\0\0H(\0H(\0\0\0\0\0\0" + "\0H<\0H<\0\0\0\0\0\0\0HP\0HP\0\0\0\0\0\0\0Hd\0Hd\0\0\0\0\0\0\0Hx\0Hx\0\0" + "\0\0\0\0\0H\214\0H\214\0\0\0\0\0\0\0H\240\0H\240\0\0\0\0\0\0\0H\264\0H\264" + "\0\0\0\0\0\0\0H\310\0H\310\0\0\0\0\0\0\0H\334\0H\334\0\0\0\0\0\0\0H\360\0" + "H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0\0\0\0\0\0\0$\360\0$\360" + "\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0H\24\0H\24\0H\24" + "\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd" + "\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0H\214\0\0\0\0H\240\0H\240\0H\240" + "\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310\0H\310\0H\310\0\0\0\0H\334\0H\334" + "\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H" + "\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0" + "H\0\0H\0\0\0\0\0H\24\0H\24\0H\24\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0" + "\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0" + "H\214\0\0\0\0H\240\0H\240\0H\240\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310" + "\0H\310\0H\310\0\0\0\0H\334\0H\334\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360" + "\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0" + "\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0H\0\0H\0\0H\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\0\0\0l\24\0l\24\0\0\0\0\0\0" + "\0l(\0l(\0\0\0\0\0\0\0l<\0l<\0\0\0\0\0\0\0lP\0lP\0\0\0\0\0\0\0ld\0ld\0\0" + "\0\0\0\0\0lx\0lx\0\0\0\0\0\0\0l\214\0l\214\0\0\0\0\0\0\0l\240\0l\240\0\0" + "\0\0\0\0\0l\264\0l\264\0\0\0\0\0\0\0l\310\0l\310\0\0\0\0\0\0\0l\334\0l\334" + "\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0" + "\0\0\0\0\0H\360\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0" + "\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0\0\0l<\0l<\0l<\0\0\0\0lP\0lP" + "\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0\0\0l\214\0l\214\0l\214\0\0\0" + "\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0l\264\0\0\0\0l\310\0l\310\0l\310" + "\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360" + "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0" + "\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0" + "\0\0l<\0l<\0l<\0\0\0\0lP\0lP\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0" + "\0\0l\214\0l\214\0l\214\0\0\0\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0" + "l\264\0\0\0\0l\310\0l\310\0l\310\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360" + "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0" + "l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360" + "\0\0\0\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\0\0" + "\0\220\24\0\220\24\0\0\0\0\0\0\0\220(\0\220(\0\0\0\0\0\0\0\220<\0\220<\0" + "\0\0\0\0\0\0\220P\0\220P\0\0\0\0\0\0\0\220d\0\220d\0\0\0\0\0\0\0\220x\0\220" + "x\0\0\0\0\0\0\0\220\214\0\220\214\0\0\0\0\0\0\0\220\240\0\220\240\0\0\0\0" + "\0\0\0\220\264\0\220\264\0\0\0\0\0\0\0\220\310\0\220\310\0\0\0\0\0\0\0\220" + "\334\0\220\334\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\220" + "\360\0\220\360\0\220\360\0\220\360\0\0\0\0\0\0\0l\360\0l\360\0l\360\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\220\24\0\220\24\0" + "\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220<\0\220<\0\220<\0\0\0\0\220" + "P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0\0\0\220x\0\220x\0\220x\0\0" + "\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240\0\220\240\0\220\240\0\0" + "\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310\0\220\310\0\220\310\0\0" + "\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360\0\220\360\0\220\360\0\220" + "\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360" + "\0\220\360\0\0\0\0l\360\0l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220" + "\0\0\0\0\0\220\24\0\220\24\0\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220" + "<\0\220<\0\220<\0\0\0\0\220P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0" + "\0\0\220x\0\220x\0\220x\0\0\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240" + "\0\220\240\0\220\240\0\0\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310" + "\0\220\310\0\220\310\0\0\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360" + "\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0" + "\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360\0" + "l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0" + "\264\24\0\264\24\0\0\0\0\0\0\0\264(\0\264(\0\0\0\0\0\0\0\264<\0\264<\0\0" + "\0\0\0\0\0\264P\0\264P\0\0\0\0\0\0\0\264d\0\264d\0\0\0\0\0\0\0\264x\0\264" + "x\0\0\0\0\0\0\0\264\214\0\264\214\0\0\0\0\0\0\0\264\240\0\264\240\0\0\0\0" + "\0\0\0\264\264\0\264\264\0\0\0\0\0\0\0\264\310\0\264\310\0\0\0\0\0\0\0\264" + "\334\0\264\334\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264" + "\360\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\220\360\0\220\360\0\220" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264" + "\24\0\264\24\0\264\24\0\0\0\0\264(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264" + "<\0\0\0\0\264P\0\264P\0\264P\0\0\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264" + "x\0\264x\0\0\0\0\264\214\0\264\214\0\264\214\0\0\0\0\264\240\0\264\240\0" + "\264\240\0\0\0\0\264\264\0\264\264\0\264\264\0\0\0\0\264\310\0\264\310\0" + "\264\310\0\0\0\0\264\334\0\264\334\0\264\334\0\0\0\0\264\360\0\264\360\0" + "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" + "\360\0\264\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\220\0" + "\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264\24\0\264\24\0\264\24\0\0\0\0\264" + "(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264<\0\0\0\0\264P\0\264P\0\264P\0\0" + "\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264x\0\264x\0\0\0\0\264\214\0\264" + "\214\0\264\214\0\0\0\0\264\240\0\264\240\0\264\240\0\0\0\0\264\264\0\264" + "\264\0\264\264\0\0\0\0\264\310\0\264\310\0\264\310\0\0\0\0\264\334\0\264" + "\334\0\264\334\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0" + "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" + "\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\0\0\0\264\0\0\264\0\0" + "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0" + "\264\360\0\264\360\0\264\360\0\0\0\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\264" + "\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\0\0\0\330\24\0\330\24\0\0\0\0\0\0" + "\0\330(\0\330(\0\0\0\0\0\0\0\330<\0\330<\0\0\0\0\0\0\0\330P\0\330P\0\0\0" + "\0\0\0\0\330d\0\330d\0\0\0\0\0\0\0\330x\0\330x\0\0\0\0\0\0\0\330\214\0\330" + "\214\0\0\0\0\0\0\0\330\240\0\330\240\0\0\0\0\0\0\0\330\264\0\330\264\0\0" + "\0\0\0\0\0\330\310\0\330\310\0\0\0\0\0\0\0\330\334\0\330\334\0\0\0\0\0\0" + "\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0" + "\330\360\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0" + "\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0" + "\0\0\330(\0\330(\0\330(\0\0\0\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0" + "\330P\0\0\0\0\330d\0\330d\0\330d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214" + "\0\330\214\0\330\214\0\0\0\0\330\240\0\330\240\0\330\240\0\0\0\0\330\264" + "\0\330\264\0\330\264\0\0\0\0\330\310\0\330\310\0\330\310\0\0\0\0\330\334" + "\0\330\334\0\330\334\0\0\0\0\330\360\0\330\360\0\330\360\0\330\360\0\330" + "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360" + "\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\330\0\0\330\0\0" + "\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0\0\0\330(\0\330(\0\330(\0\0\0" + "\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0\330P\0\0\0\0\330d\0\330d\0\330" + "d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214\0\330\214\0\330\214\0\0\0\0" + "\330\240\0\330\240\0\330\240\0\0\0\0\330\264\0\330\264\0\330\264\0\0\0\0" + "\330\310\0\330\310\0\330\310\0\0\0\0\330\334\0\330\334\0\330\334\0\0\0\0" + "\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330" + "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\0\0\0" + "\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" + "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\374\0\0" + "\374\0\0\0\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0" + "\0\0\374<\0\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0" + "\0\0\0\0\0\374x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374" + "\240\0\374\240\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374" + "\310\0\0\0\0\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330" + "\360\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374" + "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" + "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" + "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" + "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" + "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" + "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0" + "\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0" + "\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x" + "\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374" + "\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374" + "\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330" + "\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0" + "\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374" + "P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0" + "\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0" + "\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0" + "\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" + "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" + "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" + "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" + "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" + "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" + "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" + "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" + "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" + "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" + "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" + "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" + "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" + "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" + "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" + "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" + "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" + "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334" + "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334\0\0" + "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0" + "\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374" + "<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374" + "x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374" + "\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374" + "\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374" + "(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0" + "\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374" + "\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374" + "\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374" + "\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0" + "\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0" + "\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214" + "\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264" + "\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334" + "\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" + "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" + "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" + "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" + "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" + "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" + "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" + "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" + "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" + "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" + "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" + "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" + "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" + "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" + "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" + "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" + "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" + "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" + "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" + "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" + "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" + "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24" + "\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0" + "\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0" + "\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0" + "\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334" + "\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" + "\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0" + "\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0" + "\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374" + "x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240" + "\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0" + "\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24\0" + "\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0\0" + "\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0\0" + "\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0\374" + "\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334\0\374" + "\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0" + "\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P" + "\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374" + "\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374" + "\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374" + "\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0" + "\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0" + "\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374" + "x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0" + "\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374" + "\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -1023,511 +1027,647 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitColor = { */ SDL_Surface *SDLTest_ImageBlitColor() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitColor.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitColor.pixel_data, SDLTest_imageBlitColor.width, SDLTest_imageBlitColor.height, SDLTest_imageBlitColor.bytes_per_pixel * 8, SDLTest_imageBlitColor.width * SDLTest_imageBlitColor.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\20\20\0" - "\20\20\0""88\0""88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0II\0\224\224\0\224" - "\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302\302\0HH\0HH\0\324" - "\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0""00\0""00\0\356\356\0\356\356" - "\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16\0\374\374\0\374\374" - "\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0""88\0""88\0**\0ff\0ff\0ff\0FF\0" - "\215\215\0\215\215\0\215\215\0UU\0\255\255\0\255\255\0\255\255\0[[\0\306" - "\306\0\306\306\0\306\306\0YY\0\331\331\0\331\331\0\331\331\0PP\0\350\350" - "\0\350\350\0\350\350\0DD\0\362\362\0\362\362\0\362\362\0""44\0\370\370\0" - "\370\370\0\370\370\0\"\"\0\374\374\0\374\374\0\374\374\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\374\374\0" - "\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0" - """88\0""88\0**\0ff\0ff\0ff\0FF\0\226\226\0\226\226\0\215\215\0UU\0\271\271" - "\0\271\271\0\255\255\0[[\0\323\323\0\323\323\0\306\306\0YY\0\345\345\0\345" - "\345\0\331\331\0PP\0\360\360\0\360\360\0\350\350\0DD\0\370\370\0\370\370" - "\0\362\362\0""44\0\374\374\0\374\374\0\370\370\0\"\"\0\376\376\0\376\376" - "\0\374\374\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\24\24\0\20\20\0""33\0""33\0""33\0&&\0OO\0OO\0OO\0""55\0``\0``" - "\0``\0::\0``\0``\0``\0""22\0WW\0WW\0WW\0''\0II\0II\0II\0\33\33\0""99\0""9" - "9\0""99\0\20\20\0))\0))\0))\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17" - "\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0" - "\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\360\360\0\360\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\16\16" - "\0""33\0GG\0GG\0""00\0``\0\210\210\0\210\210\0TT\0\204\204\0\263\263\0\263" - "\263\0ee\0\222\222\0\315\315\0\312\312\0gg\0\216\216\0\331\331\0\327\327" - "\0cc\0\202\202\0\340\340\0\337\337\0YY\0qq\0\345\345\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0@@\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24" - "\24\0\24\24\0\22\22\0\24\24\0""88\0""88\0//\0BB\0pp\0pp\0UU\0ss\0\242\242" - "\0\242\242\0oo\0\230\230\0\306\306\0\306\306\0ww\0\265\265\0\335\335\0\335" - "\335\0ss\0\313\313\0\353\353\0\353\353\0ii\0\333\333\0\364\364\0\364\364" - "\0ZZ\0\351\351\0\371\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""6" - "6\0\370\370\0\376\376\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376" - "\0\376\376\0\360\360\0\360\360\0\360\360\0\360\360\0\16\16\0\360\360\0\360" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\22\22\0\"\"\0""88\0" - """88\0//\0OO\0pp\0pp\0WW\0\203\203\0\242\242\0\242\242\0qq\0\256\256\0\312" - "\312\0\301\301\0||\0\313\313\0\342\342\0\325\325\0yy\0\336\336\0\360\360" - "\0\342\342\0mm\0\353\353\0\367\367\0\354\354\0\\\\\0\363\363\0\373\373\0" - "\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373" - "\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375" - "\0\360\360\0\374\374\0\360\360\0\376\376\0\16\16\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\22\22\0&&\0\"\"\0""88\0//\0PP\0HH\0gg\0NN" - "\0pp\0ee\0}}\0VV\0{{\0oo\0\202\202\0NN\0qq\0jj\0vv\0>>\0``\0\\\\\0cc\0,," - "\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0" - "\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7" - "\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360" - "\360\0\376\376\0\376\376\0\16\16\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0&&\0&&\0\"\"\0""66\0[[\0oo\0ee\0``\0\220\220\0\270\270\0\250\250\0xx\0" - "\250\250\0\327\327\0\311\311\0zz\0\246\246\0\341\341\0\325\325\0rr\0\230" - "\230\0\343\343\0\334\334\0gg\0\205\205\0\344\344\0\340\340\0[[\0rr\0\346" - "\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" - """11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16" - "\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362\0\376" - "\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\22\22\0&&\0&&\0\37\37\0;;\0``\0``\0HH\0qq\0\237\237" - "\0\237\237\0nn\0\227\227\0\306\306\0\306\306\0}}\0\254\254\0\334\334\0\334" - "\334\0}}\0\275\275\0\347\347\0\347\347\0vv\0\316\316\0\357\357\0\357\357" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0&&\0##\0--\0``\0``\0TT\0cc\0\237\237\0\231\231\0||\0\223\223\0\306\306" - "\0\301\301\0\217\217\0\267\267\0\336\336\0\322\322\0\220\220\0\317\317\0" - "\352\352\0\334\334\0\202\202\0\337\337\0\362\362\0\345\345\0qq\0\353\353" - "\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371\371\0\375" - "\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376\376\0\376" - "\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0\376\376\0" - "\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0##\0""77\0--\0``\0PP\0nn\0[[\0\222\222\0kk\0\211\211\0qq\0\231\231\0" - "ff\0\210\210\0uu\0\217\217\0UU\0vv\0ll\0zz\0@@\0aa\0]]\0dd\0,,\0MM\0KK\0" - "OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0\33\33\0\33" - "\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2" - "\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\376" - "\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0##\0""77\0""77" - "\0--\0UU\0zz\0\216\216\0ww\0}}\0\254\254\0\324\324\0\264\264\0\207\207\0" - "\266\266\0\345\345\0\316\316\0\177\177\0\254\254\0\346\346\0\326\326\0rr" - "\0\231\231\0\344\344\0\334\334\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr" - "\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357" - "\357\0""11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0" - "\16\16\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0--\0CC\0~~\0~~\0\\\\\0||\0" - "\274\274\0\274\274\0||\0\235\235\0\325\325\0\325\325\0\204\204\0\256\256" - "\0\340\340\0\340\340\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316" - "\0\360\360\0\360\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371" - "\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376" - "\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0" - "\360\360\0\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0pp\0gg\0\243\243\0\255\255" - "\0\225\225\0\231\231\0\311\311\0\314\314\0\235\235\0\271\271\0\337\337\0" - "\326\326\0\224\224\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362" - "\362\0\345\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373" - "\0\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0" - "\373\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0" - "\375\375\0\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376" - "\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222" - "\222\0kk\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm" - "\0zz\0@@\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0" - "))\0**\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0" - "\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16" - "\0\16\16\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203" - "\203\0\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317" - "\0\200\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334" - "\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0""77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302" - "\302\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341" - "\341\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360" - "\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371" - "\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0" - "\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0" - "\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235" - "\0\234\234\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0" - "\225\225\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345" - "\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362" - "\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0" - "\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0" - "\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk" - "\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@" - "\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0" - "\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7" - "\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0" - "\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200" - "\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg" - "\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352" - "\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364" - "\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0" - "\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" - """77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302" - "\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341" - "\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\213\213\0mm\0\237\237\0uu\0\275\275" - "\0\232\232\0\306\306\0\204\204\0\331\331\0\272\272\0\336\336\0\205\205\0" - "\345\345\0\320\320\0\352\352\0{{\0\355\355\0\337\337\0\362\362\0mm\0\363" - "\363\0\353\353\0\370\370\0\\\\\0\367\367\0\363\363\0\373\373\0II\0\373\373" - "\0\371\371\0\375\375\0""66\0\375\375\0\374\374\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\375\375\0\375\375" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0gg\0\205\205\0\205\205\0ww\0\224\224\0" - "\310\310\0\310\310\0\247\247\0\240\240\0\354\354\0\354\354\0\306\306\0\227" - "\227\0\372\372\0\372\372\0\325\325\0\205\205\0\375\375\0\375\375\0\342\342" - "\0rr\0\376\376\0\376\376\0\354\354\0^^\0\376\376\0\376\376\0\363\363\0JJ" - "\0\376\376\0\376\376\0\370\370\0""66\0\376\376\0\376\376\0\374\374\0\"\"" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375" - "\0\376\376\0\376\376\0\376\376\0\362\362\0\376\376\0\376\376\0\376\376\0" - "\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0""11\0>>\0~~\0~~\0bb" - "\0__\0\261\261\0\261\261\0\212\212\0``\0\277\277\0\277\277\0\230\230\0SS" - "\0\275\275\0\275\275\0\233\233\0@@\0\273\273\0\273\273\0\240\240\0//\0\274" - "\274\0\274\274\0\252\252\0!!\0\301\301\0\301\301\0\266\266\0\25\25\0\311" - "\311\0\311\311\0\303\303\0\14\14\0\324\324\0\324\324\0\322\322\0\6\6\0\342" - "\342\0\342\342\0\341\341\0\1\1\0\361\361\0\361\361\0\361\361\0\15\15\0\15" - "\15\0\15\15\0\15\15\0\362\362\0\362\362\0\362\362\0\360\360\0\16\16\0\16" - "\16\0\16\16\0\2\2\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""77\0\34\34\0SS\0kk\0\206\206\0BB\0\214\214\0\232\232" - "\0\302\302\0YY\0\250\250\0\255\255\0\340\340\0XX\0\264\264\0\264\264\0\355" - "\355\0SS\0\265\265\0\266\266\0\364\364\0JJ\0\270\270\0\272\272\0\371\371" - "\0AA\0\277\277\0\300\300\0\374\374\0""66\0\310\310\0\311\311\0\375\375\0" - "**\0\324\324\0\324\324\0\376\376\0\34\34\0\341\341\0\342\342\0\376\376\0" - "\15\15\0\361\361\0\361\361\0\376\376\0\361\361\0\15\15\0\15\15\0\376\376" - "\0\15\15\0\361\361\0\361\361\0\373\373\0\362\362\0\15\15\0\16\16\0\376\376" - "\0\16\16\0\361\361\0\376\376\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0&&\0&&\0""77\0))\0SS\0SS\0kk\0DD\0\205\205\0}}\0\222\222\0WW\0\241\241" - "\0\230\230\0\245\245\0XX\0\261\261\0\252\252\0\261\261\0SS\0\264\264\0\263" - "\263\0\265\265\0JJ\0\270\270\0\271\271\0\272\272\0AA\0\276\276\0\300\300" - "\0\300\300\0""66\0\310\310\0\311\311\0\311\311\0**\0\324\324\0\324\324\0" - "\324\324\0\34\34\0\341\341\0\342\342\0\342\342\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\361\361\0\15\15\0\15\15\0\15\15\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\362\362\0\15\15\0\16\16\0\16\16\0\16\16\0\361\361\0\376\376" - "\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0&&\0&&\0))\0pp\0cc\0cc" - "\0QQ\0\261\261\0\244\244\0\244\244\0ll\0\335\335\0\323\323\0\323\323\0ww" - "\0\364\364\0\356\356\0\356\356\0ss\0\370\370\0\371\371\0\371\371\0ii\0\372" - "\372\0\375\375\0\375\375\0YY\0\374\374\0\376\376\0\376\376\0HH\0\375\375" - "\0\376\376\0\376\376\0""66\0\376\376\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\40\40\0QQ\0pp\0pp\0KK" - "\0\215\215\0\261\261\0\261\261\0pp\0\274\274\0\337\337\0\337\337\0\200\200" - "\0\332\332\0\364\364\0\364\364\0}}\0\350\350\0\373\373\0\373\373\0oo\0\361" - "\361\0\375\375\0\375\375\0]]\0\367\367\0\376\376\0\376\376\0JJ\0\373\373" - "\0\376\376\0\376\376\0""66\0\375\375\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\20\20\0""88\0WW\0pp\0" - "==\0ss\0\212\212\0\252\252\0dd\0\250\250\0\264\264\0\312\312\0rr\0\313\313" - "\0\315\315\0\331\331\0rr\0\340\340\0\331\331\0\340\340\0hh\0\355\355\0\341" - "\341\0\345\345\0YY\0\366\366\0\350\350\0\352\352\0HH\0\372\372\0\356\356" - "\0\357\357\0""66\0\375\375\0\364\364\0\364\364\0\"\"\0\376\376\0\371\371" - "\0\371\371\0\16\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361" - "\361\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\375\375\0" - "\376\376\0\375\375\0\374\374\0\360\360\0\376\376\0\376\376\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0&&\0\40\40\0""88\0""88\0WW\0BB\0ff" - "\0ZZ\0}}\0^^\0\226\226\0\201\201\0\241\241\0nn\0\301\301\0\246\246\0\277" - "\277\0rr\0\333\333\0\301\301\0\321\321\0ii\0\353\353\0\323\323\0\335\335" - "\0[[\0\365\365\0\341\341\0\346\346\0II\0\372\372\0\353\353\0\356\356\0""6" - "6\0\375\375\0\363\363\0\364\364\0\"\"\0\376\376\0\371\371\0\371\371\0\16" - "\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361\361\0\361\361" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\374\374\0\375\375\0\374" - "\374\0\374\374\0\361\361\0\376\376\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0""88\0""88\0BB\0~~\0ff\0ff\0" - "^^\0\256\256\0\226\226\0\226\226\0qq\0\325\325\0\277\277\0\277\277\0ss\0" - "\350\350\0\331\331\0\331\331\0jj\0\363\363\0\353\353\0\353\353\0[[\0\371" - "\371\0\365\365\0\365\365\0II\0\374\374\0\372\372\0\372\372\0""66\0\375\375" - "\0\375\375\0\375\375\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\376" - "\376\0\361\361\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0HH\0""88\0BB\0~~\0~~\0ff\0^^\0\263" - "\263\0\263\263\0\231\231\0nn\0\330\330\0\330\330\0\274\274\0pp\0\353\353" - "\0\353\353\0\324\324\0hh\0\365\365\0\365\365\0\345\345\0ZZ\0\373\373\0\373" - "\373\0\361\361\0II\0\375\375\0\375\375\0\370\370\0""66\0\376\376\0\376\376" - "\0\374\374\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\374\374\0\374\374\0\376\376\0\376\376\0\361\361\0\360\360\0\360" - "\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0" - "\0\0\0\0((\0HH\0\40\40\0\25\25\0QQ\0\207\207\0KK\0--\0}}\0\262\262\0bb\0" - """44\0\235\235\0\320\320\0ff\0""00\0\257\257\0\341\341\0cc\0))\0\272\272" - "\0\354\354\0ZZ\0\37\37\0\303\303\0\363\363\0OO\0\26\26\0\314\314\0\370\370" - "\0AA\0\15\15\0\326\326\0\373\373\0""22\0\6\6\0\343\343\0\375\375\0!!\0\1" - "\1\0\362\362\0\376\376\0\16\16\0\16\16\0\16\16\0\375\375\0\375\375\0\375" - "\375\0\376\376\0\362\362\0\360\360\0\361\361\0\376\376\0\14\14\0\0\0\0\0" - "\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0PP\0PP\0\10" - "\10\0\4\4\0dd\0dd\0\14\14\0\6\6\0xx\0xx\0\14\14\0\5\5\0\214\214\0\214\214" - "\0\13\13\0\4\4\0\240\240\0\240\240\0\10\10\0\2\2\0\264\264\0\264\264\0\5" - "\5\0\1\1\0\310\310\0\310\310\0\3\3\0\0\0\0\334\334\0\334\334\0\1\1\0\0\0" - "\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\1\1\0\0\0\0\0\0\0\14" - "\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0" - "\0<<\0<<\0\0\0\0\0\0\0XX\0XX\0\0\0\0\0\0\0pp\0pp\0\0\0\0\0\0\0\204\204\0" - "\204\204\0\0\0\0\0\0\0\227\227\0\227\227\0\0\0\0\0\0\0\250\250\0\250\250" - "\0\0\0\0\0\0\0\271\271\0\271\271\0\0\0\0\0\0\0\313\313\0\313\313\0\0\0\0" - "\0\0\0\335\335\0\335\335\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\1" - "\1\0\1\1\0\0\0\0\0\0\0\14\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\24\24\0\0\0\0((\0((\0((\0\0\0\0<<\0HH\0HH\0\10\10\0PP\0dd\0dd\0" - "\14\14\0dd\0||\0||\0\14\14\0xx\0\221\221\0\221\221\0\13\13\0\214\214\0\243" - "\243\0\243\243\0\10\10\0\240\240\0\264\264\0\264\264\0\5\5\0\264\264\0\303" - "\303\0\303\303\0\3\3\0\310\310\0\322\322\0\322\322\0\1\1\0\334\334\0\341" - "\341\0\341\341\0\0\0\0\360\360\0\361\361\0\361\361\0\1\1\0\0\0\0\14\14\0" - "\14\14\0\14\14\0\0\0\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\20\20\0\20\20\0""88\0""88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0" - "II\0\224\224\0\224\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302" - "\302\0HH\0HH\0\324\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0""00\0""00" - "\0\356\356\0\356\356\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16" - "\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\20\20\0" + "\20\20\0" + "88\0" + "88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0II\0\224\224\0\224" + "\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302\302\0HH\0HH\0\324" + "\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0" + "00\0" + "00\0\356\356\0\356\356" + "\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16\0\374\374\0\374\374" + "\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\24\24\0\24\24\0\24\24\0\20\20\0" + "88\0" + "88\0" + "88\0**\0ff\0ff\0ff\0FF\0" + "\215\215\0\215\215\0\215\215\0UU\0\255\255\0\255\255\0\255\255\0[[\0\306" + "\306\0\306\306\0\306\306\0YY\0\331\331\0\331\331\0\331\331\0PP\0\350\350" + "\0\350\350\0\350\350\0DD\0\362\362\0\362\362\0\362\362\0" + "44\0\370\370\0" + "\370\370\0\370\370\0\"\"\0\374\374\0\374\374\0\374\374\0\16\16\0\376\376" + "\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\374\374\0" + "\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\20\20\0" + "88\0" + "" + "88\0" + "88\0**\0ff\0ff\0ff\0FF\0\226\226\0\226\226\0\215\215\0UU\0\271\271" + "\0\271\271\0\255\255\0[[\0\323\323\0\323\323\0\306\306\0YY\0\345\345\0\345" + "\345\0\331\331\0PP\0\360\360\0\360\360\0\350\350\0DD\0\370\370\0\370\370" + "\0\362\362\0" + "44\0\374\374\0\374\374\0\370\370\0\"\"\0\376\376\0\376\376" + "\0\374\374\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360" + "\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" + "\0\24\24\0\24\24\0\20\20\0" + "33\0" + "33\0" + "33\0&&\0OO\0OO\0OO\0" + "55\0``\0``" + "\0``\0::\0``\0``\0``\0" + "22\0WW\0WW\0WW\0''\0II\0II\0II\0\33\33\0" + "99\0" + "9" + "9\0" + "99\0\20\20\0))\0))\0))\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17" + "\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0" + "\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\360\360\0\360\360\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\16\16" + "\0" + "33\0GG\0GG\0" + "00\0``\0\210\210\0\210\210\0TT\0\204\204\0\263\263\0\263" + "\263\0ee\0\222\222\0\315\315\0\312\312\0gg\0\216\216\0\331\331\0\327\327" + "\0cc\0\202\202\0\340\340\0\337\337\0YY\0qq\0\345\345\0\344\344\0NN\0^^\0" + "\352\352\0\352\352\0@@\0JJ\0\357\357\0\357\357\0" + "11\0" + "66\0\364\364\0\364" + "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" + "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" + "\16\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24" + "\24\0\24\24\0\22\22\0\24\24\0" + "88\0" + "88\0//\0BB\0pp\0pp\0UU\0ss\0\242\242" + "\0\242\242\0oo\0\230\230\0\306\306\0\306\306\0ww\0\265\265\0\335\335\0\335" + "\335\0ss\0\313\313\0\353\353\0\353\353\0ii\0\333\333\0\364\364\0\364\364" + "\0ZZ\0\351\351\0\371\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0" + "6" + "6\0\370\370\0\376\376\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16" + "\16\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376" + "\0\376\376\0\360\360\0\360\360\0\360\360\0\360\360\0\16\16\0\360\360\0\360" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\22\22\0\"\"\0" + "88\0" + "" + "88\0//\0OO\0pp\0pp\0WW\0\203\203\0\242\242\0\242\242\0qq\0\256\256\0\312" + "\312\0\301\301\0||\0\313\313\0\342\342\0\325\325\0yy\0\336\336\0\360\360" + "\0\342\342\0mm\0\353\353\0\367\367\0\354\354\0\\\\\0\363\363\0\373\373\0" + "\362\362\0JJ\0\371\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373" + "\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376" + "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375" + "\0\360\360\0\374\374\0\360\360\0\376\376\0\16\16\0\360\360\0\360\360\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\22\22\0&&\0\"\"\0" + "88\0//\0PP\0HH\0gg\0NN" + "\0pp\0ee\0}}\0VV\0{{\0oo\0\202\202\0NN\0qq\0jj\0vv\0>>\0``\0\\\\\0cc\0,," + "\0MM\0KK\0OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0" + "\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7" + "\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360" + "\360\0\376\376\0\376\376\0\16\16\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" + "\0&&\0&&\0\"\"\0" + "66\0[[\0oo\0ee\0``\0\220\220\0\270\270\0\250\250\0xx\0" + "\250\250\0\327\327\0\311\311\0zz\0\246\246\0\341\341\0\325\325\0rr\0\230" + "\230\0\343\343\0\334\334\0gg\0\205\205\0\344\344\0\340\340\0[[\0rr\0\346" + "\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" + "" + "11\0" + "66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16" + "\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362\0\376" + "\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\22\22\0&&\0&&\0\37\37\0;;\0``\0``\0HH\0qq\0\237\237" + "\0\237\237\0nn\0\227\227\0\306\306\0\306\306\0}}\0\254\254\0\334\334\0\334" + "\334\0}}\0\275\275\0\347\347\0\347\347\0vv\0\316\316\0\357\357\0\357\357" + "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" + "\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376\0\376\376\0\"\"" + "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" + "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "&&\0&&\0##\0--\0``\0``\0TT\0cc\0\237\237\0\231\231\0||\0\223\223\0\306\306" + "\0\301\301\0\217\217\0\267\267\0\336\336\0\322\322\0\220\220\0\317\317\0" + "\352\352\0\334\334\0\202\202\0\337\337\0\362\362\0\345\345\0qq\0\353\353" + "\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371\371\0\375" + "\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373\373\0\"\"\0\376\376\0\376" + "\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0\376\376\0" + "\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "&&\0##\0" + "77\0--\0``\0PP\0nn\0[[\0\222\222\0kk\0\211\211\0qq\0\231\231\0" + "ff\0\210\210\0uu\0\217\217\0UU\0vv\0ll\0zz\0@@\0aa\0]]\0dd\0,,\0MM\0KK\0" + "OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0\33\33\0\33" + "\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2" + "\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\376" + "\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0##\0" + "77\0" + "77" + "\0--\0UU\0zz\0\216\216\0ww\0}}\0\254\254\0\324\324\0\264\264\0\207\207\0" + "\266\266\0\345\345\0\316\316\0\177\177\0\254\254\0\346\346\0\326\326\0rr" + "\0\231\231\0\344\344\0\334\334\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr" + "\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357" + "\357\0" + "11\0" + "66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0" + "\16\16\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362" + "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" + "77\0" + "77\0--\0CC\0~~\0~~\0\\\\\0||\0" + "\274\274\0\274\274\0||\0\235\235\0\325\325\0\325\325\0\204\204\0\256\256" + "\0\340\340\0\340\340\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316" + "\0\360\360\0\360\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371" + "\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376" + "\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0" + "\360\360\0\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0&&\0" + "77\0" + "22\0--\0``\0vv\0pp\0gg\0\243\243\0\255\255" + "\0\225\225\0\231\231\0\311\311\0\314\314\0\235\235\0\271\271\0\337\337\0" + "\326\326\0\224\224\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362" + "\362\0\345\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373" + "\0\362\362\0JJ\0\371\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0" + "\373\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0" + "\375\375\0\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376" + "\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0" + "99\0``\0PP\0\200\200\0dd\0\222" + "\222\0kk\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm" + "\0zz\0@@\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0" + "))\0**\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0" + "\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16" + "\0\16\16\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0##\0" + "77\0" + "77\0" + "99\0^^\0zz\0\216\216\0\201\201\0\203" + "\203\0\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317" + "\0\200\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334" + "\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0" + "\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" + "11\0" + "66\0\364\364\0\364" + "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" + "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" + "\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" + "\0" + "77\0" + "77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302" + "\302\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341" + "\341\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360" + "\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371" + "\0II\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376\0\376\376\0" + "\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0" + "\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0&&\0" + "77\0" + "22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235" + "\0\234\234\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0" + "\225\225\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345" + "\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362" + "\0JJ\0\371\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373\373\0" + "\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0" + "\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0" + "99\0``\0PP\0\200\200\0dd\0\222\222\0kk" + "\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@" + "\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0))\0**\0" + "\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7" + "\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16" + "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0##\0" + "77\0" + "77\0" + "99\0^^\0zz\0\216\216\0\201\201\0\203\203\0" + "\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200" + "\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg" + "\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352" + "\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" + "11\0" + "66\0\364\364\0\364\364" + "\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0" + "\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16" + "\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" + "" + "77\0" + "77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302" + "\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341" + "\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" + "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" + "\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376\0\376\376\0\"\"" + "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" + "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "&&\0" + "77\0" + "22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" + "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" + "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" + "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" + "\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" + "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" + "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0&&\0##\0FF\0" + "99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" + "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" + "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" + "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" + "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" + "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0##\0" + "77\0" + "77\0" + "99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" + "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" + "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" + "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" + "\352\0AA\0JJ\0\357\357\0\357\357\0" + "11\0" + "66\0\364\364\0\364\364\0\40\40" + "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" + "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" + "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" + "77\0" + "" + "77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" + "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" + "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" + "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" + "\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376\0\376\376\0\"\"" + "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" + "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "&&\0" + "77\0" + "22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" + "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" + "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" + "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" + "\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" + "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" + "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0&&\0##\0FF\0" + "99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" + "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" + "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0" + "99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" + "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" + "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" + "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0##\0" + "77\0" + "77\0" + "99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" + "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" + "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" + "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" + "\352\0AA\0JJ\0\357\357\0\357\357\0" + "11\0" + "66\0\364\364\0\364\364\0\40\40" + "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" + "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" + "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" + "77\0" + "" + "77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" + "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" + "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" + "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" + "\0\362\362\0\374\374\0\374\374\0" + "66\0\370\370\0\376\376\0\376\376\0\"\"" + "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" + "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "&&\0" + "77\0" + "22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" + "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" + "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" + "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" + "\371\0\375\375\0\367\367\0" + "66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" + "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" + "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0&&\0##\0FF\0" + "99\0``\0PP\0\213\213\0mm\0\237\237\0uu\0\275\275" + "\0\232\232\0\306\306\0\204\204\0\331\331\0\272\272\0\336\336\0\205\205\0" + "\345\345\0\320\320\0\352\352\0{{\0\355\355\0\337\337\0\362\362\0mm\0\363" + "\363\0\353\353\0\370\370\0\\\\\0\367\367\0\363\363\0\373\373\0II\0\373\373" + "\0\371\371\0\375\375\0" + "66\0\375\375\0\374\374\0\376\376\0\"\"\0\376\376" + "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\375\375\0\375\375" + "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0##\0" + "77\0" + "77\0" + "99\0gg\0\205\205\0\205\205\0ww\0\224\224\0" + "\310\310\0\310\310\0\247\247\0\240\240\0\354\354\0\354\354\0\306\306\0\227" + "\227\0\372\372\0\372\372\0\325\325\0\205\205\0\375\375\0\375\375\0\342\342" + "\0rr\0\376\376\0\376\376\0\354\354\0^^\0\376\376\0\376\376\0\363\363\0JJ" + "\0\376\376\0\376\376\0\370\370\0" + "66\0\376\376\0\376\376\0\374\374\0\"\"" + "\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375" + "\0\376\376\0\376\376\0\376\376\0\362\362\0\376\376\0\376\376\0\376\376\0" + "\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" + "77\0" + "77\0" + "11\0>>\0~~\0~~\0bb" + "\0__\0\261\261\0\261\261\0\212\212\0``\0\277\277\0\277\277\0\230\230\0SS" + "\0\275\275\0\275\275\0\233\233\0@@\0\273\273\0\273\273\0\240\240\0//\0\274" + "\274\0\274\274\0\252\252\0!!\0\301\301\0\301\301\0\266\266\0\25\25\0\311" + "\311\0\311\311\0\303\303\0\14\14\0\324\324\0\324\324\0\322\322\0\6\6\0\342" + "\342\0\342\342\0\341\341\0\1\1\0\361\361\0\361\361\0\361\361\0\15\15\0\15" + "\15\0\15\15\0\15\15\0\362\362\0\362\362\0\362\362\0\360\360\0\16\16\0\16" + "\16\0\16\16\0\2\2\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0&&\0" + "77\0" + "77\0\34\34\0SS\0kk\0\206\206\0BB\0\214\214\0\232\232" + "\0\302\302\0YY\0\250\250\0\255\255\0\340\340\0XX\0\264\264\0\264\264\0\355" + "\355\0SS\0\265\265\0\266\266\0\364\364\0JJ\0\270\270\0\272\272\0\371\371" + "\0AA\0\277\277\0\300\300\0\374\374\0" + "66\0\310\310\0\311\311\0\375\375\0" + "**\0\324\324\0\324\324\0\376\376\0\34\34\0\341\341\0\342\342\0\376\376\0" + "\15\15\0\361\361\0\361\361\0\376\376\0\361\361\0\15\15\0\15\15\0\376\376" + "\0\15\15\0\361\361\0\361\361\0\373\373\0\362\362\0\15\15\0\16\16\0\376\376" + "\0\16\16\0\361\361\0\376\376\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0&&\0&&\0" + "77\0))\0SS\0SS\0kk\0DD\0\205\205\0}}\0\222\222\0WW\0\241\241" + "\0\230\230\0\245\245\0XX\0\261\261\0\252\252\0\261\261\0SS\0\264\264\0\263" + "\263\0\265\265\0JJ\0\270\270\0\271\271\0\272\272\0AA\0\276\276\0\300\300" + "\0\300\300\0" + "66\0\310\310\0\311\311\0\311\311\0**\0\324\324\0\324\324\0" + "\324\324\0\34\34\0\341\341\0\342\342\0\342\342\0\15\15\0\361\361\0\361\361" + "\0\361\361\0\361\361\0\15\15\0\15\15\0\15\15\0\15\15\0\361\361\0\361\361" + "\0\361\361\0\362\362\0\15\15\0\16\16\0\16\16\0\16\16\0\361\361\0\376\376" + "\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0&&\0&&\0))\0pp\0cc\0cc" + "\0QQ\0\261\261\0\244\244\0\244\244\0ll\0\335\335\0\323\323\0\323\323\0ww" + "\0\364\364\0\356\356\0\356\356\0ss\0\370\370\0\371\371\0\371\371\0ii\0\372" + "\372\0\375\375\0\375\375\0YY\0\374\374\0\376\376\0\376\376\0HH\0\375\375" + "\0\376\376\0\376\376\0" + "66\0\376\376\0\376\376\0\376\376\0\"\"\0\376\376" + "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" + "\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\40\40\0QQ\0pp\0pp\0KK" + "\0\215\215\0\261\261\0\261\261\0pp\0\274\274\0\337\337\0\337\337\0\200\200" + "\0\332\332\0\364\364\0\364\364\0}}\0\350\350\0\373\373\0\373\373\0oo\0\361" + "\361\0\375\375\0\375\375\0]]\0\367\367\0\376\376\0\376\376\0JJ\0\373\373" + "\0\376\376\0\376\376\0" + "66\0\375\375\0\376\376\0\376\376\0\"\"\0\376\376" + "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" + "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" + "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" + "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\20\20\0" + "88\0WW\0pp\0" + "==\0ss\0\212\212\0\252\252\0dd\0\250\250\0\264\264\0\312\312\0rr\0\313\313" + "\0\315\315\0\331\331\0rr\0\340\340\0\331\331\0\340\340\0hh\0\355\355\0\341" + "\341\0\345\345\0YY\0\366\366\0\350\350\0\352\352\0HH\0\372\372\0\356\356" + "\0\357\357\0" + "66\0\375\375\0\364\364\0\364\364\0\"\"\0\376\376\0\371\371" + "\0\371\371\0\16\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361" + "\361\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\375\375\0" + "\376\376\0\375\375\0\374\374\0\360\360\0\376\376\0\376\376\0\360\360\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0&&\0\40\40\0" + "88\0" + "88\0WW\0BB\0ff" + "\0ZZ\0}}\0^^\0\226\226\0\201\201\0\241\241\0nn\0\301\301\0\246\246\0\277" + "\277\0rr\0\333\333\0\301\301\0\321\321\0ii\0\353\353\0\323\323\0\335\335" + "\0[[\0\365\365\0\341\341\0\346\346\0II\0\372\372\0\353\353\0\356\356\0" + "6" + "6\0\375\375\0\363\363\0\364\364\0\"\"\0\376\376\0\371\371\0\371\371\0\16" + "\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361\361\0\361\361" + "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\374\374\0\375\375\0\374" + "\374\0\374\374\0\361\361\0\376\376\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0" + "88\0" + "88\0BB\0~~\0ff\0ff\0" + "^^\0\256\256\0\226\226\0\226\226\0qq\0\325\325\0\277\277\0\277\277\0ss\0" + "\350\350\0\331\331\0\331\331\0jj\0\363\363\0\353\353\0\353\353\0[[\0\371" + "\371\0\365\365\0\365\365\0II\0\374\374\0\372\372\0\372\372\0" + "66\0\375\375" + "\0\375\375\0\375\375\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376" + "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" + "\376\376\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\376" + "\376\0\361\361\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0HH\0" + "88\0BB\0~~\0~~\0ff\0^^\0\263" + "\263\0\263\263\0\231\231\0nn\0\330\330\0\330\330\0\274\274\0pp\0\353\353" + "\0\353\353\0\324\324\0hh\0\365\365\0\365\365\0\345\345\0ZZ\0\373\373\0\373" + "\373\0\361\361\0II\0\375\375\0\375\375\0\370\370\0" + "66\0\376\376\0\376\376" + "\0\374\374\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" + "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" + "\376\376\0\374\374\0\374\374\0\376\376\0\376\376\0\361\361\0\360\360\0\360" + "\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0" + "\0\0\0\0((\0HH\0\40\40\0\25\25\0QQ\0\207\207\0KK\0--\0}}\0\262\262\0bb\0" + "" + "44\0\235\235\0\320\320\0ff\0" + "00\0\257\257\0\341\341\0cc\0))\0\272\272" + "\0\354\354\0ZZ\0\37\37\0\303\303\0\363\363\0OO\0\26\26\0\314\314\0\370\370" + "\0AA\0\15\15\0\326\326\0\373\373\0" + "22\0\6\6\0\343\343\0\375\375\0!!\0\1" + "\1\0\362\362\0\376\376\0\16\16\0\16\16\0\16\16\0\375\375\0\375\375\0\375" + "\375\0\376\376\0\362\362\0\360\360\0\361\361\0\376\376\0\14\14\0\0\0\0\0" + "\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" + "\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0PP\0PP\0\10" + "\10\0\4\4\0dd\0dd\0\14\14\0\6\6\0xx\0xx\0\14\14\0\5\5\0\214\214\0\214\214" + "\0\13\13\0\4\4\0\240\240\0\240\240\0\10\10\0\2\2\0\264\264\0\264\264\0\5" + "\5\0\1\1\0\310\310\0\310\310\0\3\3\0\0\0\0\334\334\0\334\334\0\1\1\0\0\0" + "\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\1\1\0\0\0\0\0\0\0\14" + "\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0" + "\0<<\0<<\0\0\0\0\0\0\0XX\0XX\0\0\0\0\0\0\0pp\0pp\0\0\0\0\0\0\0\204\204\0" + "\204\204\0\0\0\0\0\0\0\227\227\0\227\227\0\0\0\0\0\0\0\250\250\0\250\250" + "\0\0\0\0\0\0\0\271\271\0\271\271\0\0\0\0\0\0\0\313\313\0\313\313\0\0\0\0" + "\0\0\0\335\335\0\335\335\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\1" + "\1\0\1\1\0\0\0\0\0\0\0\14\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" + "\24\24\0\24\24\0\0\0\0((\0((\0((\0\0\0\0<<\0HH\0HH\0\10\10\0PP\0dd\0dd\0" + "\14\14\0dd\0||\0||\0\14\14\0xx\0\221\221\0\221\221\0\13\13\0\214\214\0\243" + "\243\0\243\243\0\10\10\0\240\240\0\264\264\0\264\264\0\5\5\0\264\264\0\303" + "\303\0\303\303\0\3\3\0\310\310\0\322\322\0\322\322\0\1\1\0\334\334\0\341" + "\341\0\341\341\0\0\0\0\360\360\0\361\361\0\361\361\0\1\1\0\0\0\0\14\14\0" + "\14\14\0\14\14\0\0\0\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" + "\24\24\0\20\20\0\20\20\0" + "88\0" + "88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0" + "II\0\224\224\0\224\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302" + "\302\0HH\0HH\0\324\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0" + "00\0" + "00" + "\0\356\356\0\356\356\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16" + "\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0" + "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -1535,25 +1675,25 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha = { */ SDL_Surface *SDLTest_ImageBlitAlpha() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitAlpha.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitAlpha.pixel_data, SDLTest_imageBlitAlpha.width, SDLTest_imageBlitAlpha.height, SDLTest_imageBlitAlpha.bytes_per_pixel * 8, SDLTest_imageBlitAlpha.width * SDLTest_imageBlitAlpha.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_imageBlitBlend.c b/modules/SDL2/src/test/SDL_test_imageBlitBlend.c index 6645373..b0e7e4a 100644 --- a/modules/SDL2/src/test/SDL_test_imageBlitBlend.c +++ b/modules/SDL2/src/test/SDL_test_imageBlitBlend.c @@ -25,554 +25,556 @@ /* GIMP RGB C-Source image dump (alpha.c) */ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0" - "dd\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0dd\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310" - "\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0\310\310\0dd" - "\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\377\377\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\377\377\0\377\377\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd" - "\0\0\0\0\0\0\0dd\0\377\377\0\310\310\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0dd\0\0" - "\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" - "\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0" - "dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0" - "\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0" - "\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0" - "\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0\310\310\0\310" - "\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310" - "\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0" - "dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310" - "\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0" - "\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" + "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" + "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" + "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" + "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" + "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" + "\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd" + "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0" + "\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" + "\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0" + "dd\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" + "dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd" + "\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" + "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310" + "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" + "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310" + "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310" + "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" + "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" + "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" + "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" + "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" + "\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" + "\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" + "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310" + "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" + "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\310\310\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" + "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" + "\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0dd\0\310\310\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" + "dd\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310" + "\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\310\310\0\310\310" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0\310\310\0dd" + "\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\377\377\0\310\310\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\310\310\0\377\377\0\377\377\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd" + "\0\0\0\0\0\0\0dd\0\377\377\0\310\310\0\310\310\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0dd\0\0" + "\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" + "\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" + "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" + "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0" + "dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0" + "\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0" + "\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310" + "\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310" + "\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0" + "\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0" + "\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0\310\310\0\310" + "\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310" + "\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0" + "dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310" + "\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0" + "\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" + "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" + "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" + "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" + "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" + "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" + "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -580,529 +582,601 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = { */ SDL_Surface *SDLTest_ImageBlitBlendAdd() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitBlendAdd.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitBlendAdd.pixel_data, SDLTest_imageBlitBlendAdd.width, SDLTest_imageBlitBlendAdd.height, SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8, SDLTest_imageBlitBlendAdd.width * SDLTest_imageBlitBlendAdd.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240" - "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" - "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240" - "\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240\0\240\240\0\240\240" - "\0aa\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww" - "\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305" - "\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305" - "\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305" - "\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305" - "\0\305\305\0\305\305\0\240\240\0\240\240\0\240\240\0\240\240\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240" - "\0\240\240\0\240\240\0aa\0\305\305\0\305\305\0\305\305\0ww\0\333\333\0\333" - "\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333" - "\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305" - "\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305" - "\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww" - "\0\333\333\0\333\333\0\305\305\0\305\305\0\305\305\0\305\305\0\240\240\0" - "\240\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0dd\0<<\0aa\0aa\0aa\0::\0HH\0HH\0HH\0++\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0PP\0HH\0HH\0HH\0HH\0aa\0aa\0aa\0aa\0dd\0dd\0dd\0dd\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0dd\0dd\0dd\0$$\0aa\0\305\305\0\305\305\0``\0\205\205\0\351\351\0" - "\351\351\0||\0\222\222\0\321\321\0\321\321\0\177\177\0\225\225\0\324\324" - "\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0" - "\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225" - "\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177" - "\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0" - "\177\177\0\225\225\0\324\324\0\321\321\0\222\222\0\222\222\0\321\321\0\314" - "\314\0\351\351\0\351\351\0\254\254\0\236\236\0\305\305\0\305\305\0aa\0<<" - "\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0dd\0\240\240\0\240\240\0aa\0\255\255" - "\0\322\322\0\322\322\0\177\177\0\315\315\0\343\343\0\343\343\0\211\211\0" - "\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211" - "\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346" - "\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0" - "\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346" - "\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\320\320" - "\0\327\327\0\327\327\0\322\322\0\276\276\0\322\322\0\322\322\0\305\305\0" - "yy\0\210\210\0\210\210\0dd\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0\210\210\0\240" - "\240\0\240\240\0aa\0\266\266\0\322\322\0\322\322\0\205\205\0\327\327\0\343" - "\343\0\343\343\0\215\215\0\346\346\0\357\357\0\331\331\0\222\222\0\347\347" - "\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0" - "\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222" - "\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331" - "\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0" - "\331\331\0\222\222\0\357\357\0\346\346\0\320\320\0\351\351\0\327\327\0\343" - "\343\0\276\276\0\333\333\0\322\322\0\266\266\0yy\0\240\240\0\210\210\0\240" - "\240\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0<<\0\240\240\0\210\210\0\240\240\0aa\0ww\0nn\0\177" - "\177\0MM\0SS\0OO\0SS\0""22\0WW\0TT\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0XX\0TT\0TT\0LL\0OO\0SS" - "\0SS\0ss\0\177\177\0nn\0nn\0yy\0\210\210\0\240\240\0\240\240\0<<\0dd\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<" - "\0\240\240\0\240\240\0\210\210\0HH\0\205\205\0\351\351\0\333\333\0pp\0\225" - "\225\0\371\371\0\363\363\0\202\202\0\231\231\0\330\330\0\325\325\0\203\203" - "\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0" - "\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324" - "\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331" - "\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0" - "\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\325\325\0\231\231\0\231" - "\231\0\330\330\0\323\323\0\371\371\0\371\371\0\274\274\0\257\257\0\351\351" - "\0\351\351\0\205\205\0``\0\240\240\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\240\240" - "\0\240\240\0RR\0\207\207\0\304\304\0\304\304\0nn\0\275\275\0\343\343\0\343" - "\343\0\205\205\0\324\324\0\352\352\0\352\352\0\214\214\0\316\316\0\352\352" - "\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0" - "\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316" - "\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213" - "\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0" - "\213\213\0\316\316\0\352\352\0\352\352\0\214\214\0\324\324\0\336\336\0\336" - "\336\0\331\331\0\310\310\0\343\343\0\343\343\0\325\325\0\217\217\0\254\254" - "\0\254\254\0\207\207\0aa\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0aa" - "\0\225\225\0\304\304\0\304\304\0\205\205\0\276\276\0\343\343\0\340\340\0" - "\222\222\0\333\333\0\352\352\0\351\351\0\226\226\0\347\347\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\366\366\0\336\336\0\351\351\0\304\304\0\351\351\0\343\343\0\304\304\0\217" - "\217\0\333\333\0\254\254\0\266\266\0aa\0\240\240\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\305\305\0\225\225\0\304\304\0ww\0\205\205\0ss\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0||\0\217\217\0\254\254\0\266\266\0\305\305\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\225\225\0UU\0\222\222\0\366\366\0\340\340\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0mm\0\266\266\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\214\214\0\321\321\0\321\321\0rr\0\277\277\0\346\346\0\346" - "\346\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\331\331\0\312\312\0\346\346\0\346\346\0\330\330\0\224\224\0\271\271" - "\0\271\271\0\217\217\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\222\222\0\277\277\0\343\343\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\336\336\0\352\352\0\306\306\0\354\354\0\344\344\0\305\305\0\227" - "\227\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\340\340\0\300\300\0\343\343\0\210\210" - "\0\354\354\0\333\333\0\352\352\0\215\215\0\361\361\0\350\350\0\362\362\0" - "\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361" - "\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351" - "\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0" - "\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351" - "\351\0\351\351\0\361\361\0\223\223\0\351\351\0\362\362\0\351\351\0\351\351" - "\0\323\323\0\336\336\0\351\351\0\351\351\0\304\304\0\343\343\0\305\305\0" - "\317\317\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0\222\222\0\361\361\0\361\361\0\316\316\0\230\230" - "\0\373\373\0\373\373\0\344\344\0\231\231\0\375\375\0\375\375\0\357\357\0" - "\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347" - "\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375" - "\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0" - "\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375" - "\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\360\360\0\373\373" - "\0\375\375\0\375\375\0\347\347\0\367\367\0\373\373\0\373\373\0\326\326\0" - "\351\351\0\361\361\0\361\361\0\271\271\0\276\276\0\305\305\0\305\305\0aa" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0<<\0\305\305\0\305\305\0\236\236\0HH\0\271\271\0\271\271\0\224\224\0VV" - "\0\277\277\0\277\277\0\251\251\0DD\0\252\252\0\252\252\0\235\235\0FF\0\253" - "\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253" - "\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253" - "\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253" - "\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\235" - "\235\0rr\0uu\0uu\0^^\0\272\272\0\277\277\0\277\277\0\230\230\0\205\205\0" - "\222\222\0\222\222\0MM\0\266\266\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305" - "\305\0\305\305\0RR\0\236\236\0\254\254\0\361\361\0VV\0\267\267\0\263\263" - "\0\356\356\0ee\0\247\247\0\244\244\0\356\356\0^^\0\251\251\0\247\247\0\365" - "\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365" - "\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb" - "\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242" - "\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0\252\252\0ee" - "\0jj\0\345\345\0tt\0\246\246\0\251\251\0\321\321\0\272\272\0ff\0\222\222" - "\0\322\322\0ww\0\210\210\0\305\305\0\305\305\0\240\240\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240" - "\0\305\305\0``\0\236\236\0\236\236\0\254\254\0VV\0\264\264\0\254\254\0\261" - "\261\0dd\0\246\246\0\240\240\0\243\243\0^^\0\251\251\0\246\246\0\246\246" - "\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb" - "\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242" - "\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242" - "\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0\251\251\0dd\0hh" - "\0hh\0pp\0\243\243\0\240\240\0\236\236\0\264\264\0cc\0\177\177\0ww\0ww\0" - "\225\225\0\305\305\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0\240\240\0``" - "\0\351\351\0\333\333\0\333\333\0||\0\366\366\0\361\361\0\361\361\0\211\211" - "\0\373\373\0\371\371\0\371\371\0\221\221\0\375\375\0\374\374\0\374\374\0" - "\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374" - "\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374" - "\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0" - "\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365" - "\365\0\374\374\0\374\374\0\375\375\0\356\356\0\371\371\0\371\371\0\372\372" - "\0\340\340\0\361\361\0\361\361\0\364\364\0\307\307\0\333\333\0\333\333\0" - "\351\351\0\225\225\0\240\240\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240\240" - "\0aa\0\304\304\0\351\351\0\351\351\0\205\205\0\340\340\0\366\366\0\366\366" - "\0\222\222\0\355\355\0\373\373\0\373\373\0\227\227\0\364\364\0\375\375\0" - "\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375" - "\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360" - "\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0" - "\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230" - "\230\0\360\360\0\375\375\0\375\375\0\373\373\0\356\356\0\373\373\0\373\373" - "\0\367\367\0\340\340\0\364\364\0\364\364\0\354\354\0\304\304\0\351\351\0" - "\351\351\0\322\322\0\210\210\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240" - "\240\0<<\0\240\240\0\305\305\0\351\351\0ww\0\320\320\0\301\301\0\324\324" - "\0\211\211\0\345\345\0\316\316\0\324\324\0\217\217\0\356\356\0\323\323\0" - "\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323" - "\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354" - "\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0" - "\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223" - "\223\0\354\354\0\323\323\0\326\326\0\362\362\0\344\344\0\261\261\0\272\272" - "\0\364\364\0\340\340\0\225\225\0\205\205\0\340\340\0\276\276\0\351\351\0" - "\266\266\0\240\240\0dd\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\240\240\0aa\0\240" - "\240\0\240\240\0\305\305\0ww\0\305\305\0\240\240\0\266\266\0\205\205\0\333" - "\333\0\266\266\0\304\304\0\215\215\0\352\352\0\305\305\0\314\314\0\222\222" - "\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0" - "\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314" - "\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305" - "\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0" - "\305\305\0\314\314\0\361\361\0\335\335\0\242\242\0\236\236\0\333\333\0\312" - "\312\0ii\0aa\0\305\305\0\255\255\0\266\266\0\240\240\0\240\240\0\210\210" - "\0\240\240\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0aa\0\305\305\0\240\240\0\240\240\0ww\0\333" - "\333\0\305\305\0\305\305\0\205\205\0\351\351\0\333\333\0\333\333\0\217\217" - "\0\363\363\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0" - "\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351" - "\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351" - "\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0" - "\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\363\363\0\345" - "\345\0\333\333\0\333\333\0\340\340\0\312\312\0\305\305\0\305\305\0\322\322" - "\0\255\255\0\240\240\0\240\240\0\305\305\0\210\210\0dd\0dd\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd" - "\0dd\0dd\0aa\0\305\305\0\305\305\0\240\240\0ww\0\333\333\0\333\333\0\305" - "\305\0\205\205\0\355\355\0\355\355\0\336\336\0\215\215\0\364\364\0\364\364" - "\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0" - "\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364" - "\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215" - "\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0" - "\215\215\0\364\364\0\364\364\0\335\335\0\351\351\0\355\355\0\355\355\0\312" - "\312\0\305\305\0\322\322\0\322\322\0\255\255\0\240\240\0\305\305\0\305\305" - "\0\210\210\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0\305\305\0aa" - "\0""11\0\225\225\0\351\351\0\205\205\0HH\0\254\254\0\333\333\0ww\0BB\0\264" - "\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0" - "nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264" - "\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0" - "BB\0\264\264\0\340\340\0nn\0nn\0\205\205\0\314\314\0\266\266\0\304\304\0" - "\351\351\0\236\236\0yy\0\210\210\0\305\305\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\25\25\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0" - "\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0" - "\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0" - "yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0" - "\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0" - "yy\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd" - "\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210" - "\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210" - "\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25" - "\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210" - "\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0$$\0\0\0\0<<\0<<\0<<\0\0" - "\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240" - "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" - "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0\240\240\0\240\240" - "\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240" + "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" + "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240" + "\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" + "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" + "\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240\0\240\240\0\240\240" + "\0aa\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww" + "\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305" + "\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305" + "\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305" + "\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305" + "\0\305\305\0\305\305\0\240\240\0\240\240\0\240\240\0\240\240\0dd\0dd\0dd" + "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240" + "\0\240\240\0\240\240\0aa\0\305\305\0\305\305\0\305\305\0ww\0\333\333\0\333" + "\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333" + "\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305" + "\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305" + "\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww" + "\0\333\333\0\333\333\0\305\305\0\305\305\0\305\305\0\305\305\0\240\240\0" + "\240\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0dd\0dd\0dd\0<<\0aa\0aa\0aa\0::\0HH\0HH\0HH\0++\0PP\0PP\0PP\0" + "00\0PP" + "\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP" + "\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP\0PP\0PP\0" + "00\0PP" + "\0PP\0PP\0PP\0HH\0HH\0HH\0HH\0aa\0aa\0aa\0aa\0dd\0dd\0dd\0dd\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0dd\0dd\0dd\0$$\0aa\0\305\305\0\305\305\0``\0\205\205\0\351\351\0" + "\351\351\0||\0\222\222\0\321\321\0\321\321\0\177\177\0\225\225\0\324\324" + "\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0" + "\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225" + "\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177" + "\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0" + "\177\177\0\225\225\0\324\324\0\321\321\0\222\222\0\222\222\0\321\321\0\314" + "\314\0\351\351\0\351\351\0\254\254\0\236\236\0\305\305\0\305\305\0aa\0<<" + "\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0dd\0\240\240\0\240\240\0aa\0\255\255" + "\0\322\322\0\322\322\0\177\177\0\315\315\0\343\343\0\343\343\0\211\211\0" + "\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211" + "\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346" + "\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0" + "\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346" + "\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\320\320" + "\0\327\327\0\327\327\0\322\322\0\276\276\0\322\322\0\322\322\0\305\305\0" + "yy\0\210\210\0\210\210\0dd\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0\210\210\0\240" + "\240\0\240\240\0aa\0\266\266\0\322\322\0\322\322\0\205\205\0\327\327\0\343" + "\343\0\343\343\0\215\215\0\346\346\0\357\357\0\331\331\0\222\222\0\347\347" + "\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0" + "\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222" + "\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331" + "\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0" + "\331\331\0\222\222\0\357\357\0\346\346\0\320\320\0\351\351\0\327\327\0\343" + "\343\0\276\276\0\333\333\0\322\322\0\266\266\0yy\0\240\240\0\210\210\0\240" + "\240\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0dd\0<<\0\240\240\0\210\210\0\240\240\0aa\0ww\0nn\0\177" + "\177\0MM\0SS\0OO\0SS\0" + "22\0WW\0TT\0XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0UU\0" + "XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0UU\0" + "XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0UU\0XX\0" + "55\0UU\0XX\0TT\0TT\0LL\0OO\0SS" + "\0SS\0ss\0\177\177\0nn\0nn\0yy\0\210\210\0\240\240\0\240\240\0<<\0dd\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<" + "\0\240\240\0\240\240\0\210\210\0HH\0\205\205\0\351\351\0\333\333\0pp\0\225" + "\225\0\371\371\0\363\363\0\202\202\0\231\231\0\330\330\0\325\325\0\203\203" + "\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0" + "\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324" + "\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331" + "\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0" + "\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\325\325\0\231\231\0\231" + "\231\0\330\330\0\323\323\0\371\371\0\371\371\0\274\274\0\257\257\0\351\351" + "\0\351\351\0\205\205\0``\0\240\240\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\240\240" + "\0\240\240\0RR\0\207\207\0\304\304\0\304\304\0nn\0\275\275\0\343\343\0\343" + "\343\0\205\205\0\324\324\0\352\352\0\352\352\0\214\214\0\316\316\0\352\352" + "\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0" + "\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316" + "\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213" + "\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0" + "\213\213\0\316\316\0\352\352\0\352\352\0\214\214\0\324\324\0\336\336\0\336" + "\336\0\331\331\0\310\310\0\343\343\0\343\343\0\325\325\0\217\217\0\254\254" + "\0\254\254\0\207\207\0aa\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0aa" + "\0\225\225\0\304\304\0\304\304\0\205\205\0\276\276\0\343\343\0\340\340\0" + "\222\222\0\333\333\0\352\352\0\351\351\0\226\226\0\347\347\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\366\366\0\336\336\0\351\351\0\304\304\0\351\351\0\343\343\0\304\304\0\217" + "\217\0\333\333\0\254\254\0\266\266\0aa\0\240\240\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\305\305\0\225\225\0\304\304\0ww\0\205\205\0ss\0\211\211\0RR\0VV\0PP\0" + "VV\0" + "33\0XX\0UU\0YY\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" + "\0ww\0||\0\217\217\0\254\254\0\266\266\0\305\305\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\225\225\0UU\0\222\222\0\366\366\0\340\340\0tt\0\231\231" + "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" + "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" + "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" + "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" + "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" + "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" + "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" + "\366\366\0\222\222\0mm\0\266\266\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" + "\305\305\0``\0\214\214\0\321\321\0\321\321\0rr\0\277\277\0\346\346\0\346" + "\346\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" + "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" + "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" + "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" + "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" + "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" + "\337\0\331\331\0\312\312\0\346\346\0\346\346\0\330\330\0\224\224\0\271\271" + "\0\271\271\0\217\217\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" + "\0\225\225\0\304\304\0\314\314\0\222\222\0\277\277\0\343\343\0\342\342\0" + "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\370\370\0\336\336\0\352\352\0\306\306\0\354\354\0\344\344\0\305\305\0\227" + "\227\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" + "VV\0" + "33\0XX\0UU\0YY\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" + "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" + "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" + "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" + "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" + "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" + "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" + "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" + "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" + "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" + "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" + "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" + "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" + "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" + "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" + "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" + "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" + "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" + "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" + "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" + "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" + "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" + "VV\0" + "33\0XX\0UU\0YY\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" + "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" + "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" + "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" + "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" + "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" + "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" + "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" + "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" + "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" + "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" + "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" + "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" + "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" + "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" + "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" + "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" + "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" + "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" + "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" + "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" + "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" + "VV\0" + "33\0XX\0UU\0YY\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" + "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" + "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" + "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" + "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" + "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" + "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" + "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" + "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" + "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" + "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" + "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" + "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" + "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" + "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" + "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" + "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" + "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" + "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" + "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" + "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" + "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" + "VV\0" + "33\0XX\0UU\0YY\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0UU\0" + "XX\0" + "66\0UU\0UU\0XX\0" + "66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" + "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" + "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" + "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" + "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" + "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" + "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" + "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" + "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" + "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" + "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" + "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" + "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" + "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" + "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" + "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" + "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" + "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" + "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" + "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" + "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" + "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" + "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" + "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" + "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" + "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" + "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" + "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" + "\0\333\333\0\236\236\0\304\304\0ww\0\340\340\0\300\300\0\343\343\0\210\210" + "\0\354\354\0\333\333\0\352\352\0\215\215\0\361\361\0\350\350\0\362\362\0" + "\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361" + "\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351" + "\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0" + "\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351" + "\351\0\351\351\0\361\361\0\223\223\0\351\351\0\362\362\0\351\351\0\351\351" + "\0\323\323\0\336\336\0\351\351\0\351\351\0\304\304\0\343\343\0\305\305\0" + "\317\317\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" + "\305\0\305\305\0\236\236\0\222\222\0\361\361\0\361\361\0\316\316\0\230\230" + "\0\373\373\0\373\373\0\344\344\0\231\231\0\375\375\0\375\375\0\357\357\0" + "\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347" + "\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375" + "\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0" + "\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375" + "\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\360\360\0\373\373" + "\0\375\375\0\375\375\0\347\347\0\367\367\0\373\373\0\373\373\0\326\326\0" + "\351\351\0\361\361\0\361\361\0\271\271\0\276\276\0\305\305\0\305\305\0aa" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0<<\0\305\305\0\305\305\0\236\236\0HH\0\271\271\0\271\271\0\224\224\0VV" + "\0\277\277\0\277\277\0\251\251\0DD\0\252\252\0\252\252\0\235\235\0FF\0\253" + "\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253" + "\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253" + "\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253" + "\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\235" + "\235\0rr\0uu\0uu\0^^\0\272\272\0\277\277\0\277\277\0\230\230\0\205\205\0" + "\222\222\0\222\222\0MM\0\266\266\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305" + "\305\0\305\305\0RR\0\236\236\0\254\254\0\361\361\0VV\0\267\267\0\263\263" + "\0\356\356\0ee\0\247\247\0\244\244\0\356\356\0^^\0\251\251\0\247\247\0\365" + "\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365" + "\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb" + "\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242" + "\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0\252\252\0ee" + "\0jj\0\345\345\0tt\0\246\246\0\251\251\0\321\321\0\272\272\0ff\0\222\222" + "\0\322\322\0ww\0\210\210\0\305\305\0\305\305\0\240\240\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240" + "\0\305\305\0``\0\236\236\0\236\236\0\254\254\0VV\0\264\264\0\254\254\0\261" + "\261\0dd\0\246\246\0\240\240\0\243\243\0^^\0\251\251\0\246\246\0\246\246" + "\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb" + "\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242" + "\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242" + "\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0\251\251\0dd\0hh" + "\0hh\0pp\0\243\243\0\240\240\0\236\236\0\264\264\0cc\0\177\177\0ww\0ww\0" + "\225\225\0\305\305\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0\240\240\0``" + "\0\351\351\0\333\333\0\333\333\0||\0\366\366\0\361\361\0\361\361\0\211\211" + "\0\373\373\0\371\371\0\371\371\0\221\221\0\375\375\0\374\374\0\374\374\0" + "\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374" + "\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374" + "\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0" + "\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365" + "\365\0\374\374\0\374\374\0\375\375\0\356\356\0\371\371\0\371\371\0\372\372" + "\0\340\340\0\361\361\0\361\361\0\364\364\0\307\307\0\333\333\0\333\333\0" + "\351\351\0\225\225\0\240\240\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240\240" + "\0aa\0\304\304\0\351\351\0\351\351\0\205\205\0\340\340\0\366\366\0\366\366" + "\0\222\222\0\355\355\0\373\373\0\373\373\0\227\227\0\364\364\0\375\375\0" + "\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375" + "\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360" + "\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0" + "\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230" + "\230\0\360\360\0\375\375\0\375\375\0\373\373\0\356\356\0\373\373\0\373\373" + "\0\367\367\0\340\340\0\364\364\0\364\364\0\354\354\0\304\304\0\351\351\0" + "\351\351\0\322\322\0\210\210\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240" + "\240\0<<\0\240\240\0\305\305\0\351\351\0ww\0\320\320\0\301\301\0\324\324" + "\0\211\211\0\345\345\0\316\316\0\324\324\0\217\217\0\356\356\0\323\323\0" + "\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323" + "\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354" + "\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0" + "\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223" + "\223\0\354\354\0\323\323\0\326\326\0\362\362\0\344\344\0\261\261\0\272\272" + "\0\364\364\0\340\340\0\225\225\0\205\205\0\340\340\0\276\276\0\351\351\0" + "\266\266\0\240\240\0dd\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\240\240\0aa\0\240" + "\240\0\240\240\0\305\305\0ww\0\305\305\0\240\240\0\266\266\0\205\205\0\333" + "\333\0\266\266\0\304\304\0\215\215\0\352\352\0\305\305\0\314\314\0\222\222" + "\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0" + "\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314" + "\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305" + "\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0" + "\305\305\0\314\314\0\361\361\0\335\335\0\242\242\0\236\236\0\333\333\0\312" + "\312\0ii\0aa\0\305\305\0\255\255\0\266\266\0\240\240\0\240\240\0\210\210" + "\0\240\240\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0aa\0\305\305\0\240\240\0\240\240\0ww\0\333" + "\333\0\305\305\0\305\305\0\205\205\0\351\351\0\333\333\0\333\333\0\217\217" + "\0\363\363\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0" + "\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351" + "\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351" + "\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0" + "\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\363\363\0\345" + "\345\0\333\333\0\333\333\0\340\340\0\312\312\0\305\305\0\305\305\0\322\322" + "\0\255\255\0\240\240\0\240\240\0\305\305\0\210\210\0dd\0dd\0dd\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd" + "\0dd\0dd\0aa\0\305\305\0\305\305\0\240\240\0ww\0\333\333\0\333\333\0\305" + "\305\0\205\205\0\355\355\0\355\355\0\336\336\0\215\215\0\364\364\0\364\364" + "\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0" + "\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364" + "\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215" + "\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0" + "\215\215\0\364\364\0\364\364\0\335\335\0\351\351\0\355\355\0\355\355\0\312" + "\312\0\305\305\0\322\322\0\322\322\0\255\255\0\240\240\0\305\305\0\305\305" + "\0\210\210\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0\305\305\0aa" + "\0" + "11\0\225\225\0\351\351\0\205\205\0HH\0\254\254\0\333\333\0ww\0BB\0\264" + "\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0" + "nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264" + "\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0" + "BB\0\264\264\0\340\340\0nn\0nn\0\205\205\0\314\314\0\266\266\0\304\304\0" + "\351\351\0\236\236\0yy\0\210\210\0\305\305\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0" + "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" + "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" + "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" + "\0dd\0dd\0\25\25\0\25\25\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0" + "\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0" + "\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0" + "yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0" + "\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0" + "yy\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd" + "\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210" + "\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210" + "\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25" + "\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210" + "\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0$$\0\0\0\0<<\0<<\0<<\0\0" + "\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" + "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" + "\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240" + "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" + "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0\240\240\0\240\240" + "\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -1110,429 +1184,431 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = { */ SDL_Surface *SDLTest_ImageBlitBlend() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitBlend.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitBlend.pixel_data, SDLTest_imageBlitBlend.width, SDLTest_imageBlitBlend.height, SDLTest_imageBlitBlend.bytes_per_pixel * 8, SDLTest_imageBlitBlend.width * SDLTest_imageBlitBlend.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -1540,812 +1616,814 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = { */ SDL_Surface *SDLTest_ImageBlitBlendMod() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitBlendMod.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitBlendMod.pixel_data, SDLTest_imageBlitBlendMod.width, SDLTest_imageBlitBlendMod.height, SDLTest_imageBlitBlendMod.bytes_per_pixel * 8, SDLTest_imageBlitBlendMod.width * SDLTest_imageBlitBlendMod.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = { - 80, 60, 3, - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377", + 80, + 60, + 3, + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0" + "\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" + "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377" + "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377" + "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0" + "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" + "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377", }; /** @@ -2353,467 +2431,546 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = { */ SDL_Surface *SDLTest_ImageBlitBlendNone() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitBlendNone.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitBlendNone.pixel_data, SDLTest_imageBlitBlendNone.width, SDLTest_imageBlitBlendNone.height, SDLTest_imageBlitBlendNone.bytes_per_pixel * 8, SDLTest_imageBlitBlendNone.width * SDLTest_imageBlitBlendNone.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\0\0\0\0\0" - "\0\11\0\0\11\0\0\0\0\0\0\0\0\16\0\0\16\0\0\0\0\0\0\0\0\11\0\0\11\0\0\0\0" - "\0\0\0\0\14\0\0\14\0\0\0\0\0\0\0\0\17\0\0\17\0\0\0\0\0\0\0\0\21\0\0\21\0" - "\0\0\0\0\0\0\0K\0\0K\0\0\0\0\0\0\0\0T\0\0T\0\0\0\0\0\0\0\0^\0\0^\0\0\0\0" - "\0\0\0\0g\0\0g\0\0\0\0\0\0\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" - "\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\11\0\0\11\0\0\11" - "\0\0\0\0\0\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\11\0\0\0\0\0\14\0\0\14" - "\0\0\14\0\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24" - "\0\0\24\0\0K\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0" - "\0g\0\0\0\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" - "\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\11\0\0\11\0\0\11\0\0\0\0\0" - "\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\22\0\0\0\0\0\14\0\0\14\0\0\14\0" - "\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24\0\0\24" - "\0\0\24\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0\0g\0" - "\0\0\0\0q\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" - "\0\0\317\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\10\0\0\10\0\0\10\0\0\0\0\0\15" - "\0\0\15\0\0\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0J\0\0J\0\0J\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\317" - "\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1" - "\0\0\4\0\0\4\0\0\0\0\0\0\0\0\7\0\0\7\0\0\0\0\0\0\0\0&\0\0&\0\0\32\0\0\32" - "\0\0&\0\0&\0\0&\0\0&\0\0C\0\0C\0\0\0\0\0\0\0\0^\0\0^\0\0\0\0\0\0\0\17\251" - "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\0\0\0\0" - "\0\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\6\2\0\6\2\0\0\1\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0" - "\17\0\0\0\0\0\4\0\0\11\0\0\11\0\0\0\0\6+\0\6+\0\0&\0\0\32\0\0&\0\0&\0\0&" - "\0\0&\0\0""5\0\0""5\0\2\210\0\0\0\0\0C\0\0|\0\0|\0\0\0\0\17\251\0\17\251" - "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251" - "\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" - "\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\6\2\0\6\2\0\6\2\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1" - "\0\0\1\0\0\0\0\0\17\0\0\17\0\0\4\0\0\0\0\6+\0\6+\0\6+\0\0\32\0\0&\0\0&\0" - "\0&\0\0&\0\0""5\0\0""5\0\0""5\0\0\0\0\2\210\0\2\210\0\0C\0\0\0\0\17\251\0" - "\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0" - "\17\251\0\17\251\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "$\360\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0" - "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\1\0\14\1\0\14\1" - "\0\14\1\0\15\1\0\15\1\0\0\0\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16" - "\2\0\0\0\0\0\0\0\14!\0\14!\0\14!\0\14!\0\17(\0\17(\0\0\0\0\0\0\0\14+\0\14" - "+\0\14+\0\14+\0\20""9\0\20""9\0\0\0\0\0\0\0\36\215\0\36\215\0\36\215\0\36" - "\215\0(\264\0(\264\0\0\0\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\0\0\0\0\0\0$\360\0$\360\0$\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3" - "\0\36\3\0\14\1\0\14\1\0\15\1\0\15\1\0\15\1\0\0\0\0\14\2\0\14\2\0\14\2\0\14" - "\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14\3\0\14!\0\14!\0\17(\0\17(\0\17" - "(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0\20""9\0\20""9\0\0\0\0\14""7\0\14" - """7\0\36\215\0\36\215\0(\264\0(\264\0(\264\0\0\0\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0H\360\0" - "H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3\0\36\3\0\36\3\0\14\1\0\15\1\0\15\1\0\15\1" - "\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14" - "\3\0\14\3\0\14!\0\17(\0\17(\0\17(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0" - "\20""9\0\20""9\0\0\0\0\14""7\0\14""7\0\14""7\0\36\215\0(\264\0(\264\0(\264" - "\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36" - "\251\0\36\251\0\36\251\0\36\251\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\1\0\13\1\0\13\1\0\13\1\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11!\0" - "\11!\0\11!\0\11!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\23n\0\23n\0\23n\0\23n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\25\0\0\25\0\0\25\0\0\27\0" - "\0\13\0\0\13\0\0\1\0\0\11\0\0\4\0\0\4\0\0\0\0\0\0\0\0\25\3\0\25\3\0\0\0\0" - "\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\3\1\0\3\1\0\2\1\0\7\5\0\7\3\0\7\3\0\0" - "\0\0\0\0\0\25""4\0\25""4\0\0\0\0\0\0\0\25""4\0\25""4\0\25""4\0\25""4\0\20" - "\35\0\20\35\0\11\22\0\23F\0\34""6\0\34""6\0\0\0\0\0\0\0L\317\0L\317\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0\0\0\0""2\317\0""2\317\0""2\317" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\0\0\0\0\0\0\0\0\0\25\0\0\25" - "\0\0\25\0\0\4\0\0\5\0\0\2\0\0\1\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7\0\37\7" - "\0\25\3\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\15\4\0\11\3\0\7" - "\3\0\14\10\0\14\10\0\0\0\0\25\16\0\25\16\0\25""4\0\0\0\0\25""4\0\25""4\0" - "\25""4\0\25""4\0&Q\0&Q\0&Q\0\31""5\0\34""6\0&j\0&j\0\0\0\0""5q\0""5q\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0""2" - "\317\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\1\0\0\0\0\0\0\0\25\0" - "\0\25\0\0\25\0\0\31\1\0\5\0\0\5\0\0\2\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7" - "\0\37\7\0\37\7\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\37\6\0\11" - "\3\0\16\6\0\16\6\0\7\3\0\0\0\0\25\16\0\25\16\0\25\16\0\0\0\0\25""4\0\25""4" - "\0\25""4\0\25""4\0&Q\0&Q\0&Q\0\31""5\0+X\0+X\0\34""6\0\0\0\0""5q\0""5q\0" - """5q\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317" - "\0L\317\0\0\0\0""2\317\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0" - "\0\0\0\0\25\0\0\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0L\317\0L\317\0L\317\0L\317" - "\0\0\0\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0e\4\0e\4\0\0\0\0\0\0\0e\11\0e\11\0\0\0\0\0\0\0e\16\0e\16\0\0\0\0\0\0" - "\0G\11\0G\11\0\0\0\0\0\0\0G\14\0G\14\0\0\0\0\0\0\0G\17\0G\17\0\0\0\0\0\0" - "\0G\21\0G\21\0\0\0\0\0\0\0GK\0GK\0\0\0\0\0\0\0GT\0GT\0\0\0\0\0\0\0G^\0G^" - "\0\0\0\0\0\0\0Gg\0Gg\0\0\0\0\0\0\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" - "\0e\317\0e\317\0\0\0\0\0\0\0L\317\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0e\4\0e\4\0e\4\0\0\0\0e\11\0e\11\0e\11\0\0\0" - "\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0G\11\0\0\0\0G\14\0G\14\0G\14\0\0\0" - "\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0\0G\24\0G\24\0GK\0\0\0\0" - "GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg\0\0\0\0Gq\0Gq\0e\317\0e\317" - "\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0\0\0\0L\317\0L" - "\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0e\4\0e\4\0e\4\0\0\0" - "\0e\11\0e\11\0e\11\0\0\0\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0e\22\0\0\0" - "\0G\14\0G\14\0G\14\0\0\0\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0" - "\0G\24\0G\24\0G\24\0\0\0\0GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg" - "\0\0\0\0Gq\0Gq\0Gq\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" - "\0e\317\0e\317\0e\317\0\0\0\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0e\4\0e\4\0e\4\0\0\0\0b\10\0b\10\0b\10\0\0\0\0b\15\0b\15\0b\15\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0<\16\0<\16\0<\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0""2J\0""2J\0""2J\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0e\317\0e\317\0e\317\0e" - "\317\0\0\0\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0c\0\0c\0\0\0\0\0" - "`\0\0c\0\0c\0\0\2\0\0c\1\0i\0\0i\0\0\0\0\0\0\0\0e\0\0e\0\0\0\0\0\0\0\0{\1" - "\0{\1\0f\0\0f\0\0z\1\0z\1\0z\1\0z\1\0)\4\0)\4\0\0\0\0\0\0\0Q\7\0Q\7\0\0\0" - "\0\0\0\0{&\0{&\0W\32\0W\32\0z&\0z&\0z&\0z&\0IC\0IC\0\0\0\0\0\0\0X^\0X^\0" - "\0\0\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0" - "\261\251\0\261\251\0\0\0\0\0\0\0e\317\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\216\1\0c\0\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0k\1\0i\0\0" - "\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0{\1\0f\0\0z\1\0z\1\0z\1\0z\1" - "\0\221\1\0\221\1\0\221\17\0\0\0\0)\4\0c\11\0c\11\0\0\0\0\256+\0\256+\0{&" - "\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\243\210\0\0\0\0IC\0{|\0{|\0\0\0\0" - "\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0" - "k\1\0k\1\0\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0\256\2\0f\0\0z\1\0" - "z\1\0z\1\0z\1\0\221\1\0\221\1\0\221\1\0\0\0\0\221\17\0\221\17\0)\4\0\0\0" - "\0\256+\0\256+\0\256+\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\2415\0\0\0\0" - "\243\210\0\243\210\0IC\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1" - "\0\211\1\0c\0\0\2\0\0c\0\0c\0\0k\0\0\12\0\0k\1\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216\1" - "\0c\0\0\2\0\0c\0\0k\0\0q\0\0\20\0\0\0\0\0\0\0\0\322\1\0\322\1\0\322\1\0\322" - "\1\0\346\1\0\346\1\0\0\0\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0" - "\363\2\0\0\0\0\0\0\0\322!\0\322!\0\322!\0\322!\0\371(\0\371(\0\0\0\0\0\0" - "\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\0\0\0\0\0\0\325\215\0\325\215" - "\0\325\215\0\325\215\0\374\264\0\374\264\0\0\0\0\0\0\0\325\251\0\325\251" - "\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\0\0\0\0\0" - "\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216" - "\1\0c\0\0\2\0\0f\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\322\1\0\322\1\0\346" - "\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0\363\2" - "\0\363\2\0\0\0\0\322\3\0\322\3\0\322!\0\322!\0\371(\0\371(\0\371(\0\0\0\0" - "\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\3227\0\3227\0\325" - "\215\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\330\360\0\330\360\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\216\1\0\216\1\0c\0\0\10\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\325" - "\3\0\322\1\0\346\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2" - "\0\363\2\0\363\2\0\363\2\0\0\0\0\322\3\0\322\3\0\322\3\0\322!\0\371(\0\371" - "(\0\371(\0\0\0\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\322" - "7\0\3227\0\3227\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\325\251\0\325\251\0\330\360\0\330\360\0\330\360\0\0\0\0\264\360\0" - "\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0i\0\0\10\0\0m\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\275\1\0\275\1\0\275\1\0" - "\275\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\244!\0\244!\0\244!\0\244!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213n\0\213n\0\213n\0\213n\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\224\1\0i\0\0\10\0" - "\0\0\0\0\0\0\0\325\3\0\325\3\0\325\3\0\351\3\0\365\1\0\365\1\0\14\0\0\313" - "\2\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0\304-\0Y!\0Y!\0\0\0\0\0\0\0\371p\0" - "\371p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0""3(\0\247\227\0\211" - "s\0\211s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\224\1\0i\0\0\0\0\0\0\0\0\325\3\0\325" - "\3\0\325\3\0\17\2\0\"\2\0!\0\0\35\0\0#\2\0\342\4\0\342\4\0\0\0\0\371\37\0" - "\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775" - "\0\374%\0\304\34\0Y!\0\373C\0\373C\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371" - "p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\211s\0\375" - "\342\0\375\342\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\224\1\0\0\0" - "\0\0\0\0\325\3\0\325\3\0\325\3\0\344\5\0\"\2\0\"\2\0\200\0\0#\2\0\342\4\0" - "\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\371\37\0\3775\0\3775\0\3775\0\304\34\0\3732\0\3732\0Y!\0\0\0\0\371p\0" - "\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377" - "\256\0\247q\0\375\274\0\375\274\0\211s\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\12\0\0\0\0\0i\0\0\0\0\0\325\3\0\325\3\0\344\5\0\344\5" - "\0\"\2\0\36\1\0""4\2\0#\2\0\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\3732\0" - "\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371" - "p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0" - "\10\0\0\0\0\0\325\3\0\344\5\0\344\5\0\344\5\0\340\4\0\367\11\0\364\3\0#\2" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371" - "\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\3732\0\3732\0\0\0\0\371p\0\371p" - "\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0" - "\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\10\0\0\0\0\0\0\0\0\17\2\0\17" - "\2\0\17\2\0\323\2\0\352\7\0\347\2\0\26\1\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0\0\0\0""7\36\0""6\25\0" - """6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0" - "O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\12\0" - "\0\10\0\0\0\0\0\17\2\0\17\2\0\344\5\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\362\4\0\0\0\0/\26\0/\26\0" - "\3775\0$\21\0""7\36\0""7\36\0\3672\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\370A\0\0\0\0O>\0O>\0\377\256\0""3(\0VK\0VK\0\372\264\0\0\0\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\341\271\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\343\350\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\10\0\0\0\0" - "\0\17\2\0\17\2\0\17\2\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0$\21\0""7\36" - "\0""7\36\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0O>\0O>\0O>\0""3(\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\5\0\0\5\0\0\5\0\0\0\0\0\344\5\0\344\5\0\344\5\0\316\4\0\367" - "\11\0\367\11\0\364\3\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0" - "\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377" - "\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "\0\0\5\0\0\5\0\0\17\2\0\344\5\0\344\5\0\316\4\0\345\11\0\367\11\0\364\3\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37" - "\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371" - "p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q" - "\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\0\0\0\17\2" - "\0\344\5\0\344\5\0\15\1\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37\0\371\37\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0\307)\0\376" - "G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0" - "\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0" - "\5\0\0\17\2\0\17\2\0\344\5\0\316\4\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0" - "\307)\0\376G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\5\0\0\24\2\0\17\2\0\17\2\0\316\4\0\345\11\0$\6\0#\2\0\0\0\0\371" - "\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0" - "\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274" - "\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\24\2\0\24" - "\2\0\17\2\0\316\4\0\345\11\0\342\3\0#\2\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0" - "\376G\0\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\24\2\0\5\0\0\0\0\0\27\5\0\342\3\0\313" - "\1\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\371\37\0\0\0\0\0\0\0/\26\0" - "\3775\0\371\37\0\302\30\0\3716\0Y!\0#\14\0\0\0\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\371p\0\0\0\0\0\0\0O>\0\377\256\0\371p\0\243I\0\371\224\0\211s\0" - """3(\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0\0\0\0" - "\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0" - "\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0" - "\0\0\0\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\16\0\0\0\0\0\26\1\0\26\1\0\26" - "\1\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0" - "/\26\0.\17\0\0\0\0""6\25\0""6\25\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\14\0\0\14" - "\0\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0#\14\0Y!\0Y!\0\0\0\0\0\0\0\371p\0\371" - "p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0""3(\0""3(\0\211s\0\211" - "s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + 80, + 60, + 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\0\0\0\0\0" + "\0\11\0\0\11\0\0\0\0\0\0\0\0\16\0\0\16\0\0\0\0\0\0\0\0\11\0\0\11\0\0\0\0" + "\0\0\0\0\14\0\0\14\0\0\0\0\0\0\0\0\17\0\0\17\0\0\0\0\0\0\0\0\21\0\0\21\0" + "\0\0\0\0\0\0\0K\0\0K\0\0\0\0\0\0\0\0T\0\0T\0\0\0\0\0\0\0\0^\0\0^\0\0\0\0" + "\0\0\0\0g\0\0g\0\0\0\0\0\0\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" + "\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\11\0\0\11\0\0\11" + "\0\0\0\0\0\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\11\0\0\0\0\0\14\0\0\14" + "\0\0\14\0\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24" + "\0\0\24\0\0K\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0" + "\0g\0\0\0\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" + "\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\11\0\0\11\0\0\11\0\0\0\0\0" + "\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\22\0\0\0\0\0\14\0\0\14\0\0\14\0" + "\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24\0\0\24" + "\0\0\24\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0\0g\0" + "\0\0\0\0q\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" + "\0\0\317\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\10\0\0\10\0\0\10\0\0\0\0\0\15" + "\0\0\15\0\0\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0J\0\0J\0\0J\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\317" + "\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1" + "\0\0\4\0\0\4\0\0\0\0\0\0\0\0\7\0\0\7\0\0\0\0\0\0\0\0&\0\0&\0\0\32\0\0\32" + "\0\0&\0\0&\0\0&\0\0&\0\0C\0\0C\0\0\0\0\0\0\0\0^\0\0^\0\0\0\0\0\0\0\17\251" + "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\0\0\0\0" + "\0\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\6\2\0\6\2\0\0\1\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0" + "\17\0\0\0\0\0\4\0\0\11\0\0\11\0\0\0\0\6+\0\6+\0\0&\0\0\32\0\0&\0\0&\0\0&" + "\0\0&\0\0" + "5\0\0" + "5\0\2\210\0\0\0\0\0C\0\0|\0\0|\0\0\0\0\17\251\0\17\251" + "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251" + "\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" + "\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\6\2\0\6\2\0\6\2\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1" + "\0\0\1\0\0\0\0\0\17\0\0\17\0\0\4\0\0\0\0\6+\0\6+\0\6+\0\0\32\0\0&\0\0&\0" + "\0&\0\0&\0\0" + "5\0\0" + "5\0\0" + "5\0\0\0\0\2\210\0\2\210\0\0C\0\0\0\0\17\251\0" + "\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0" + "\17\251\0\17\251\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "$\360\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0" + "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\1\0\14\1\0\14\1" + "\0\14\1\0\15\1\0\15\1\0\0\0\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16" + "\2\0\0\0\0\0\0\0\14!\0\14!\0\14!\0\14!\0\17(\0\17(\0\0\0\0\0\0\0\14+\0\14" + "+\0\14+\0\14+\0\20" + "9\0\20" + "9\0\0\0\0\0\0\0\36\215\0\36\215\0\36\215\0\36" + "\215\0(\264\0(\264\0\0\0\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251" + "\0\36\251\0\36\251\0\36\251\0\0\0\0\0\0\0$\360\0$\360\0$\360\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3" + "\0\36\3\0\14\1\0\14\1\0\15\1\0\15\1\0\15\1\0\0\0\0\14\2\0\14\2\0\14\2\0\14" + "\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14\3\0\14!\0\14!\0\17(\0\17(\0\17" + "(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20" + "9\0\20" + "9\0\20" + "9\0\0\0\0\14" + "7\0\14" + "" + "7\0\36\215\0\36\215\0(\264\0(\264\0(\264\0\0\0\0\36\251\0\36\251\0\36\251" + "\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0H\360\0" + "H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3\0\36\3\0\36\3\0\14\1\0\15\1\0\15\1\0\15\1" + "\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14" + "\3\0\14\3\0\14!\0\17(\0\17(\0\17(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20" + "9\0" + "\20" + "9\0\20" + "9\0\0\0\0\14" + "7\0\14" + "7\0\14" + "7\0\36\215\0(\264\0(\264\0(\264" + "\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36" + "\251\0\36\251\0\36\251\0\36\251\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\1\0\13\1\0\13\1\0\13\1\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11!\0" + "\11!\0\11!\0\11!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\23n\0\23n\0\23n\0\23n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\1\0\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\25\0\0\25\0\0\25\0\0\27\0" + "\0\13\0\0\13\0\0\1\0\0\11\0\0\4\0\0\4\0\0\0\0\0\0\0\0\25\3\0\25\3\0\0\0\0" + "\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\3\1\0\3\1\0\2\1\0\7\5\0\7\3\0\7\3\0\0" + "\0\0\0\0\0\25" + "4\0\25" + "4\0\0\0\0\0\0\0\25" + "4\0\25" + "4\0\25" + "4\0\25" + "4\0\20" + "\35\0\20\35\0\11\22\0\23F\0\34" + "6\0\34" + "6\0\0\0\0\0\0\0L\317\0L\317\0L\317" + "\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0\0\0\0" + "2\317\0" + "2\317\0" + "2\317" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\0\0\0\0\0\0\0\0\0\25\0\0\25" + "\0\0\25\0\0\4\0\0\5\0\0\2\0\0\1\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7\0\37\7" + "\0\25\3\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\15\4\0\11\3\0\7" + "\3\0\14\10\0\14\10\0\0\0\0\25\16\0\25\16\0\25" + "4\0\0\0\0\25" + "4\0\25" + "4\0" + "\25" + "4\0\25" + "4\0&Q\0&Q\0&Q\0\31" + "5\0\34" + "6\0&j\0&j\0\0\0\0" + "5q\0" + "5q\0L\317" + "\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0" + "2" + "\317\0" + "2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\1\0\0\0\0\0\0\0\25\0" + "\0\25\0\0\25\0\0\31\1\0\5\0\0\5\0\0\2\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7" + "\0\37\7\0\37\7\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\37\6\0\11" + "\3\0\16\6\0\16\6\0\7\3\0\0\0\0\25\16\0\25\16\0\25\16\0\0\0\0\25" + "4\0\25" + "4" + "\0\25" + "4\0\25" + "4\0&Q\0&Q\0&Q\0\31" + "5\0+X\0+X\0\34" + "6\0\0\0\0" + "5q\0" + "5q\0" + "" + "5q\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317" + "\0L\317\0\0\0\0" + "2\317\0" + "2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0" + "\0\0\0\0\25\0\0\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0L\317\0L\317\0L\317\0L\317" + "\0\0\0\0" + "2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0e\4\0e\4\0\0\0\0\0\0\0e\11\0e\11\0\0\0\0\0\0\0e\16\0e\16\0\0\0\0\0\0" + "\0G\11\0G\11\0\0\0\0\0\0\0G\14\0G\14\0\0\0\0\0\0\0G\17\0G\17\0\0\0\0\0\0" + "\0G\21\0G\21\0\0\0\0\0\0\0GK\0GK\0\0\0\0\0\0\0GT\0GT\0\0\0\0\0\0\0G^\0G^" + "\0\0\0\0\0\0\0Gg\0Gg\0\0\0\0\0\0\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" + "\0e\317\0e\317\0\0\0\0\0\0\0L\317\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0e\4\0e\4\0e\4\0\0\0\0e\11\0e\11\0e\11\0\0\0" + "\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0G\11\0\0\0\0G\14\0G\14\0G\14\0\0\0" + "\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0\0G\24\0G\24\0GK\0\0\0\0" + "GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg\0\0\0\0Gq\0Gq\0e\317\0e\317" + "\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0\0\0\0L\317\0L" + "\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0e\4\0e\4\0e\4\0\0\0" + "\0e\11\0e\11\0e\11\0\0\0\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0e\22\0\0\0" + "\0G\14\0G\14\0G\14\0\0\0\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0" + "\0G\24\0G\24\0G\24\0\0\0\0GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg" + "\0\0\0\0Gq\0Gq\0Gq\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" + "\0e\317\0e\317\0e\317\0\0\0\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0e\4\0e\4\0e\4\0\0\0\0b\10\0b\10\0b\10\0\0\0\0b\15\0b\15\0b\15\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0<\16\0<\16\0<\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0" + "2J\0" + "2J\0" + "2J\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0e\317\0e\317\0e\317\0e" + "\317\0\0\0\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0c\0\0c\0\0\0\0\0" + "`\0\0c\0\0c\0\0\2\0\0c\1\0i\0\0i\0\0\0\0\0\0\0\0e\0\0e\0\0\0\0\0\0\0\0{\1" + "\0{\1\0f\0\0f\0\0z\1\0z\1\0z\1\0z\1\0)\4\0)\4\0\0\0\0\0\0\0Q\7\0Q\7\0\0\0" + "\0\0\0\0{&\0{&\0W\32\0W\32\0z&\0z&\0z&\0z&\0IC\0IC\0\0\0\0\0\0\0X^\0X^\0" + "\0\0\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0" + "\261\251\0\261\251\0\0\0\0\0\0\0e\317\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\216\1\0c\0\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0k\1\0i\0\0" + "\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0{\1\0f\0\0z\1\0z\1\0z\1\0z\1" + "\0\221\1\0\221\1\0\221\17\0\0\0\0)\4\0c\11\0c\11\0\0\0\0\256+\0\256+\0{&" + "\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\243\210\0\0\0\0IC\0{|\0{|\0\0\0\0" + "\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261" + "\251\0\261\251\0\261\251\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0" + "k\1\0k\1\0\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0\256\2\0f\0\0z\1\0" + "z\1\0z\1\0z\1\0\221\1\0\221\1\0\221\1\0\0\0\0\221\17\0\221\17\0)\4\0\0\0" + "\0\256+\0\256+\0\256+\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\2415\0\0\0\0" + "\243\210\0\243\210\0IC\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261" + "\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\264\360" + "\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1" + "\0\211\1\0c\0\0\2\0\0c\0\0c\0\0k\0\0\12\0\0k\1\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0\264\360" + "\0\264\360\0\264\360\0\0\0\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216\1" + "\0c\0\0\2\0\0c\0\0k\0\0q\0\0\20\0\0\0\0\0\0\0\0\322\1\0\322\1\0\322\1\0\322" + "\1\0\346\1\0\346\1\0\0\0\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0" + "\363\2\0\0\0\0\0\0\0\322!\0\322!\0\322!\0\322!\0\371(\0\371(\0\0\0\0\0\0" + "\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\0\0\0\0\0\0\325\215\0\325\215" + "\0\325\215\0\325\215\0\374\264\0\374\264\0\0\0\0\0\0\0\325\251\0\325\251" + "\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\0\0\0\0\0" + "\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216" + "\1\0c\0\0\2\0\0f\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\322\1\0\322\1\0\346" + "\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0\363\2" + "\0\363\2\0\0\0\0\322\3\0\322\3\0\322!\0\322!\0\371(\0\371(\0\371(\0\0\0\0" + "\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\3227\0\3227\0\325" + "\215\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0\325\251\0" + "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" + "\251\0\330\360\0\330\360\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\216\1\0\216\1\0c\0\0\10\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\325" + "\3\0\322\1\0\346\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2" + "\0\363\2\0\363\2\0\363\2\0\0\0\0\322\3\0\322\3\0\322\3\0\322!\0\371(\0\371" + "(\0\371(\0\0\0\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\322" + "7\0\3227\0\3227\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0" + "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" + "\251\0\325\251\0\325\251\0\330\360\0\330\360\0\330\360\0\0\0\0\264\360\0" + "\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0i\0\0\10\0\0m\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\275\1\0\275\1\0\275\1\0" + "\275\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\244!\0\244!\0\244!\0\244!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213n\0\213n\0\213n\0\213n\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" + "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\224\1\0i\0\0\10\0" + "\0\0\0\0\0\0\0\325\3\0\325\3\0\325\3\0\351\3\0\365\1\0\365\1\0\14\0\0\313" + "\2\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" + "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0\304-\0Y!\0Y!\0\0\0\0\0\0\0\371p\0" + "\371p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0" + "3(\0\247\227\0\211" + "s\0\211s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\224\1\0i\0\0\0\0\0\0\0\0\325\3\0\325" + "\3\0\325\3\0\17\2\0\"\2\0!\0\0\35\0\0#\2\0\342\4\0\342\4\0\0\0\0\371\37\0" + "\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775" + "\0\374%\0\304\34\0Y!\0\373C\0\373C\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371" + "p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\211s\0\375" + "\342\0\375\342\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" + "\0\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\224\1\0\0\0" + "\0\0\0\0\325\3\0\325\3\0\325\3\0\344\5\0\"\2\0\"\2\0\200\0\0#\2\0\342\4\0" + "\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37" + "\0\371\37\0\3775\0\3775\0\3775\0\304\34\0\3732\0\3732\0Y!\0\0\0\0\371p\0" + "\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377" + "\256\0\247q\0\375\274\0\375\274\0\211s\0\0\0\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\12\0\0\0\0\0i\0\0\0\0\0\325\3\0\325\3\0\344\5\0\344\5" + "\0\"\2\0\36\1\0" + "4\2\0#\2\0\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0" + "\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\3732\0" + "\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371" + "p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0" + "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0" + "\10\0\0\0\0\0\325\3\0\344\5\0\344\5\0\344\5\0\340\4\0\367\11\0\364\3\0#\2" + "\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371" + "\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\3732\0\3732\0\0\0\0\371p\0\371p" + "\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0" + "\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\10\0\0\0\0\0\0\0\0\17\2\0\17" + "\2\0\17\2\0\323\2\0\352\7\0\347\2\0\26\1\0\0\0\0\371\37\0\371\37\0\371\37" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0\0\0\0" + "7\36\0" + "6\25\0" + "" + "6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0" + "O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\12\0" + "\0\10\0\0\0\0\0\17\2\0\17\2\0\344\5\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0" + "\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\362\4\0\0\0\0/\26\0/\26\0" + "\3775\0$\21\0" + "7\36\0" + "7\36\0\3672\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0" + "\0\0\0\0\370A\0\0\0\0O>\0O>\0\377\256\0" + "3(\0VK\0VK\0\372\264\0\0\0\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\341\271\0\0\0\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\343\350\0\0\0\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\10\0\0\0\0" + "\0\17\2\0\17\2\0\17\2\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0\0\371\37\0\371" + "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0$\21\0" + "7\36" + "\0" + "7\36\0" + "6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0O>\0O>\0O>\0" + "3(\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\5\0\0\5\0\0\5\0\0\0\0\0\344\5\0\344\5\0\344\5\0\316\4\0\367" + "\11\0\367\11\0\364\3\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371" + "\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0" + "\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377" + "\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" + "\0\0\5\0\0\5\0\0\17\2\0\344\5\0\344\5\0\316\4\0\345\11\0\367\11\0\364\3\0" + "\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37" + "\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371" + "p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q" + "\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\0\0\0\17\2" + "\0\344\5\0\344\5\0\15\1\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37\0\371\37\0" + "\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0\307)\0\376" + "G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0" + "\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0" + "\5\0\0\17\2\0\17\2\0\344\5\0\316\4\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37" + "\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0" + "\307)\0\376G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" + "p\0\371p\0\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\5\0\0\24\2\0\17\2\0\17\2\0\316\4\0\345\11\0$\6\0#\2\0\0\0\0\371" + "\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0" + "\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0" + "\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274" + "\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" + "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\24\2\0\24" + "\2\0\17\2\0\316\4\0\345\11\0\342\3\0#\2\0\0\0\0\371\37\0\371\37\0\371\37" + "\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0" + "\376G\0\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" + "p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274" + "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\24\2\0\5\0\0\0\0\0\27\5\0\342\3\0\313" + "\1\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\371\37\0\0\0\0\0\0\0/\26\0" + "\3775\0\371\37\0\302\30\0\3716\0Y!\0#\14\0\0\0\0\371p\0\371p\0\0\0\0\0\0" + "\0\0\0\0\371p\0\0\0\0\0\0\0O>\0\377\256\0\371p\0\243I\0\371\224\0\211s\0" + "" + "3(\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" + "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" + "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0\0\371" + "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0\0\0\0" + "\0" + "6\25\0" + "6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374" + "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0" + "\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0" + "\0\0\0\0" + "6\25\0" + "6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0" + "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\16\0\0\0\0\0\26\1\0\26\1\0\26" + "\1\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0" + "/\26\0.\17\0\0\0\0" + "6\25\0" + "6\25\0" + "6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0" + "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360" + "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\14\0\0\14" + "\0\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" + "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0#\14\0Y!\0Y!\0\0\0\0\0\0\0\371p\0\371" + "p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0" + "3(\0" + "3(\0\211s\0\211" + "s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" + "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", }; /** @@ -2821,25 +2978,25 @@ static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = { */ SDL_Surface *SDLTest_ImageBlitBlendAll() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageBlitBlendAll.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageBlitBlendAll.pixel_data, SDLTest_imageBlitBlendAll.width, SDLTest_imageBlitBlendAll.height, SDLTest_imageBlitBlendAll.bytes_per_pixel * 8, SDLTest_imageBlitBlendAll.width * SDLTest_imageBlitBlendAll.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_imageFace.c b/modules/SDL2/src/test/SDL_test_imageFace.c index ff6b7f1..0a95e7c 100644 --- a/modules/SDL2/src/test/SDL_test_imageFace.c +++ b/modules/SDL2/src/test/SDL_test_imageFace.c @@ -25,197 +25,199 @@ /* GIMP RGBA C-Source image dump (face.c) */ static const SDLTest_SurfaceImage_t SDLTest_imageFace = { - 32, 32, 4, - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0" - "\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0" - "\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0", + 32, + 32, + 4, + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0" + "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0" + "\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" + "\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\0\0\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0" + "\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" + "\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" + "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0" + "\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" + "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0" + "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377" + "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" + "\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" + "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" + "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0" + "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0" + "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" + "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" + "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" + "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" + "\377\377\0\377\377\377\0", }; /** @@ -223,25 +225,25 @@ static const SDLTest_SurfaceImage_t SDLTest_imageFace = { */ SDL_Surface *SDLTest_ImageFace() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imageFace.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imageFace.pixel_data, SDLTest_imageFace.width, SDLTest_imageFace.height, SDLTest_imageFace.bytes_per_pixel * 8, SDLTest_imageFace.width * SDLTest_imageFace.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_imagePrimitives.c b/modules/SDL2/src/test/SDL_test_imagePrimitives.c index c3b7761..416eb99 100644 --- a/modules/SDL2/src/test/SDL_test_imagePrimitives.c +++ b/modules/SDL2/src/test/SDL_test_imagePrimitives.c @@ -25,464 +25,480 @@ /* GIMP RGB C-Source image dump (primitives.c) */ static const SDLTest_SurfaceImage_t SDLTest_imagePrimitives = { - 80, 60, 3, - "\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15" - "I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310" - "\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0" - "\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0" - "\0\5ii\0\0\0\5ii\0\0\0\3\1\1\0\0\0\5\2\1\0\0\0\7\3\2\0\0\0\11\4\3\0\0\0\13" - "\5\3\0\0\0\15\6\4\0\0\0\17\7\5\0\0\0\21\10\5\0\0\0\23\11\6\0\0\0\25\12\7" - "\0\0\0\27\13\7\0\0\0\31\14\10\0\0\0\33\15\11\0\0\0\35\16\11\0\0\0\37\17\12" - "\0\0\0!\20\13\0\0\0#\21\13\0\0\0%\22\14\0\0\0'\23\15\15I\310)\24\15\15I\310" - "+\25\16\15I\310-\26\17\15I\310/\27\17\15I\3101\30\20\15I\3103\31\21\15I\310" - "5\32\21\15I\3107\33\22\15I\3109\34\23\15I\310;\35\23\15I\310=\36\24\15I\310" - "?\37\25\15I\310A\40\25\15I\310C!\26\15I\310E\"\27\15I\310G#\27\15I\310I$" - "\30\15I\310K%\31\15I\310M&\31\5iiO'\32\0\0\0\0\0\0\5ii\0\0\0\10\4\2\0\0\0" - "\14\6\4\0\0\0\20\10\5\0\0\0\24\12\6\0\0\0\30\14\10\0\0\0\34\16\11\0\0\0\40" - "\20\12\0\0\0$\22\14\0\0\0(\24\15\0\0\0,\26\16\0\0\0""0\30\20\0\0\0""4\32" - "\21\0\0\0""8\34\22\0\0\0<\36\24\0\0\0@\40\25\0\0\0D\"\26\0\0\0H$\30\0\0\0" - "L&\31\0\0\0P(\32\15I\310T*\34\15I\310X,\35\15I\310\\.\36\15I\310`0\40\15" - "I\310d2!\15I\310h4\"\15I\310l6$\15I\310p8%\15I\310t:&\15I\310x<(\15I\310" - "|>)\15I\310\200@*\15I\310\204B,\15I\310\210D-\15I\310\214F.\15I\310\220H" - "0\15I\310\224J1\15I\310\230L2\5ii\234N4\15I\310\0\0\0\0\0\0\0\0\0\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0""77\5\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5i" - "i\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d7" - "7\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\5ii\15I\310\15I\310\15I\310\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii", + 80, + 60, + 3, + "\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15" + "I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310" + "\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0" + "\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0" + "\0\5ii\0\0\0\5ii\0\0\0\3\1\1\0\0\0\5\2\1\0\0\0\7\3\2\0\0\0\11\4\3\0\0\0\13" + "\5\3\0\0\0\15\6\4\0\0\0\17\7\5\0\0\0\21\10\5\0\0\0\23\11\6\0\0\0\25\12\7" + "\0\0\0\27\13\7\0\0\0\31\14\10\0\0\0\33\15\11\0\0\0\35\16\11\0\0\0\37\17\12" + "\0\0\0!\20\13\0\0\0#\21\13\0\0\0%\22\14\0\0\0'\23\15\15I\310)\24\15\15I\310" + "+\25\16\15I\310-\26\17\15I\310/\27\17\15I\3101\30\20\15I\3103\31\21\15I\310" + "5\32\21\15I\3107\33\22\15I\3109\34\23\15I\310;\35\23\15I\310=\36\24\15I\310" + "?\37\25\15I\310A\40\25\15I\310C!\26\15I\310E\"\27\15I\310G#\27\15I\310I$" + "\30\15I\310K%\31\15I\310M&\31\5iiO'\32\0\0\0\0\0\0\5ii\0\0\0\10\4\2\0\0\0" + "\14\6\4\0\0\0\20\10\5\0\0\0\24\12\6\0\0\0\30\14\10\0\0\0\34\16\11\0\0\0\40" + "\20\12\0\0\0$\22\14\0\0\0(\24\15\0\0\0,\26\16\0\0\0" + "0\30\20\0\0\0" + "4\32" + "\21\0\0\0" + "8\34\22\0\0\0<\36\24\0\0\0@\40\25\0\0\0D\"\26\0\0\0H$\30\0\0\0" + "L&\31\0\0\0P(\32\15I\310T*\34\15I\310X,\35\15I\310\\.\36\15I\310`0\40\15" + "I\310d2!\15I\310h4\"\15I\310l6$\15I\310p8%\15I\310t:&\15I\310x<(\15I\310" + "|>)\15I\310\200@*\15I\310\204B,\15I\310\210D-\15I\310\214F.\15I\310\220H" + "0\15I\310\224J1\15I\310\230L2\5ii\234N4\15I\310\0\0\0\0\0\0\0\0\0\5ii\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" + "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" + "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d" + "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d" + "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d" + "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" + "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" + "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" + "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" + "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" + "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" + "\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377\0\0\377\0\0\377" + "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" + "77\5\0\377\0\0\377\0\0\377\0" + "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377" + "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" + "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" + "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" + "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" + "\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5i" + "i\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" + "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" + "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\5ii\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" + "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" + "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d7" + "7\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" + "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" + "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310" + "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" + "ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" + "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\0\0\0\0" + "\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\5ii\15I\310\15I\310\15I\310\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" + "\15I\310\15I\310\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\5ii\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0" + "77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" + "\310\15I\310\15I\310\15I\310\15I\310\5ii", }; /** @@ -490,25 +506,25 @@ static const SDLTest_SurfaceImage_t SDLTest_imagePrimitives = { */ SDL_Surface *SDLTest_ImagePrimitives() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( - (void*)SDLTest_imagePrimitives.pixel_data, + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + (void *)SDLTest_imagePrimitives.pixel_data, SDLTest_imagePrimitives.width, SDLTest_imagePrimitives.height, SDLTest_imagePrimitives.bytes_per_pixel * 8, SDLTest_imagePrimitives.width * SDLTest_imagePrimitives.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ #endif - ); - return surface; + ); + return surface; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_imagePrimitivesBlend.c b/modules/SDL2/src/test/SDL_test_imagePrimitivesBlend.c index 942cb26..fe65bdc 100644 --- a/modules/SDL2/src/test/SDL_test_imagePrimitivesBlend.c +++ b/modules/SDL2/src/test/SDL_test_imagePrimitivesBlend.c @@ -25,646 +25,653 @@ /* GIMP RGB C-Source image dump (alpha.c) */ static const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend = { - 80, 60, 3, - "\260e\15\222\356/\37\313\15\36\330\17K\3745D\3471\0\20\0D\3502D\3502<\321" - ",\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0-\0\377\377" - "\377\377\377\377\311\324\311\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0H\0\377\377\377\377\377\377\256\307\256\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0c\0\377\377\377\377\377\377" - "\223\300\223\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0~\0\377\377\377\377\377\377x\277x\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\231\0\377\377\377\377\377\377]\303]\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\264\0\377\377\377\377\377" - "\377B\316B\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0" - "\317\0\377\377\377\377\377\377'\335'\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\352\0\377\377\377#\262\6\260d\15\260e\15\224\357" - "/&\262\6\34\300\5.\314\22\40\315\12[\3747M\332/\27\331\12\27\331\12K\374" - "5K\3745K\3745D\3471D\3471D\3471D\3471D\3471D\3502D\3502D\3502D\3502D\350" - "2D\3502D\3502D\3502D\3502D\3502\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377,\372\27\273\3465\327" - "Q.\260d\15\213\213\40\241\3601\200\366*=\265\13?\301\25s\375\265\14\177\252+\201\210\16\245\204" - "*\377\314U\312\\,\224'\11\260i\17\244\210\40\232\2211\331\353J\215\2351\377" - "\377\276\200\2521\200\2542\375\377\310u\2661t\2702t\2702\367\377\324\325" - "\355\305h\3021h\3042h\3042\377\377\377\377\377\377\364\377\336\335\364\323" - "\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377" - "\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\3342\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\27\331\12Y\316-h\3021\243\370Cg\230\15\230\224\"\245" - "\204*\377\314U\310J\21\327Q.\260b\21\245\2041\370\343N\230\2242\331\353J" - "\214\2402\377\377\276\200\2521\200\2542\375\377\310\317\344\266u\2661t\270" - "2\377\377\377\367\377\324\325\355\305h\3021h\3042h\3042h\3042\377\377\377" - "\377\377\377\364\377\336\335\364\323\335\364\323\335\364\323\335\364\323" - "\\\3202\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371" - "\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377\377" - "\377\377\377\377\377\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\334" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377K\3745!\315\13d\304,p\270)\177\252+\23\13\6\232\2211\245\204" - "1\347\270O\377\277Y\324<\22\265V\24\377\330Q\244\210\40#(\13\230\224\"\331" - "\353Ju\211.\377\377\276\200\2521\210\273:\200\2542\375\377\310\20""3\6u\266" - "1t\2702\271\307\271\367\377\324\325\355\305\341\377\321h\3021h\3042\16L\7" - "h\3042\377\377\377\242\300\242\377\377\377\335\364\323\355\377\343\335\364" - "\323\335\364\323\14f\7\\\3202\\\3202>\250*\\\3202\377\377\377\377\377\377" - "\377\377\377\377\377\377$\231$\377\377\377\377\377\377s\303s\377\377\377" - "\346\371\342\376\377\372\346\371\342\346\371\342\40\257\37\346\371\342\346" - "\371\342\\\316\\\377\377\377\377\377\377\377\377\377\377\377\377P\3342\13" - "\262\7P\3342P\3342*\327%P\3342P\3342o\377Q\377\377\377\377\377\377$\352$" - "\377\377\377\377\377\377K\3745]\3749s\375<\212\373@\243\370C\274\363G\331" - "\353J\370\343N\377\330Q\377\314U\377\277Y\377\260\\\224(\11\260|\36\245\204" - "1\377\377\250\232\2211\230\224\"\215\2351\214\2402\377\377\276\312\332\250" - "\200\2521\200\2542\377\377\377\317\344\266u\2661t\2702t\2702\377\377\377" - "\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\3042h\3042\377\377" - "\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364\323\335\364" - "\323\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342" - "\346\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377P\3342P\3342" - "P\3342P\3342\377\377\377K\3745O\3321\\\3161h\3021t\2702~\254'\214\240%\377" - "\377\262\370\343N\377\330Q\262x1\277l1\312`1\327R.\260X\23\377\330Q\244\210" - "2\377\377\250\230\2242\377\377\262\215\2351\214\2402\377\377\377\312\332" - "\250\200\2521\200\2542\377\377\377\375\377\310\317\344\266u\2661t\2702t\270" - "2\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\304" - "2h\3042h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\\\3202\\\320" - "2\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3471O\3321\21\7\11c\304+\367\377\324o\2520\200\252" - "1\214\2402\235\226'\377\377\250\377\330Q!\20\11\277l1\310d2\266?\33\224(" - "\11\260|\36\257\217;\377\377\250\232\2211\34$\11\377\377\262\215\2351q\206" - "0\377\377\377\312\332\250\217\303@\200\2542\200\25420Z0\317\344\266\317\344" - "\266X\2260t\2702t\2702\377\377\377\377\377\377\325\355\305(l%\325\355\305" - "\325\355\305K\2410h\3042h\3042\377\377\377\377\377\377\377\377\3770\2200" - "\377\377\377\377\377\377t\274p\335\364\323\335\364\323\373\377\361\377\377" - "\377\377\377\377\21\213\11\\\3202\\\3202<\274/\\\3202\377\377\377\377\377" - "\377\377\377\377\377\377\3770\3060\377\377\377\377\377\377V\330V\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\3770\3410\346\371\342\346" - "\371\342>\352>\346\371\342\377\377\377D\3471P\3342\364\377\352s\375\3369\\\3202\377\377\377\377\377\377\377\377\377\377\377\377D\3502\371\377" - "\364O\3321\\\3202\364\377\336h\3042\367\377\324u\2661\200\2542\377\377\276" - "\215\2351\230\2242\307\300\213\244\2102\377\377\234\262x1\274p2\377\337\207" - "\312`1\324E\30\327T1\260|2\377\377\234\245\2041\244\2102\377\377\250\232" - "\2211\230\2242\377\377\377\310\316\231\215\2351\214\2402\377\377\377\377" - "\377\377\312\332\250\312\332\250\200\2542\200\2542\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266t\2702t\2702t\2702\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355" - "\305\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\377\377" - "\377\377\377\377\377\377\377\\\3202\\\3202\\\3202\377\377\377D\3502\371\377" - "\364O\3321\377\377\377\\\3161h\3042\367\377\324t\2702\375\377\310\200\252" - "1\377\377\377\215\2351\230\2242\377\377\250\244\2102\377\377\234\262x1\274" - "p2\316\214_\310d2\377\310|\327T1\227/\14\377\377\377\307\260|\244\2102\377" - "\377\377\307\300\213\230\2242\230\2242\377\377\377\310\316\231\214\2402\214" - "\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\2542\377" - "\377\377\377\377\377\377\377\377\317\344\266\317\344\266\317\344\266t\270" - "2t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377h\3042h\3042" - "h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364" - "\323\335\364\323\335\364\323\377\377\377\377\377\377\377\377\377\377\377" - "\377D\3502\371\377\364R\3344\364\377\352\\\3161H\22Hh\3021\377\377\377o\244" - "2\200\2542\312\332\250\226\245<\377\377\262\230\2242H-/\245\2041\377\377" - "\377\233i5\274p2\277l1\331sC\377\310|\324X2*\15\3\260|2\377\377\234\206s" - "7\244\2102\377\377\250\340\337\244\230\2242\377\377\377Hc2\310\316\231\214" - "\2402n\211:\377\377\377\377\377\377\353\377\311\312\332\250\200\2542$T\16" - "\377\377\377\377\377\377\236\277\236\377\377\377\317\344\266\367\377\336" - "\377\377\377t\2702\40n\16t\2702\377\377\377\212\303\212\377\377\377\377\377" - "\377\377\377\377\325\355\305\325\355\305<\2477\377\377\377\377\377\377O\276" - "Ah\3042h\3042\237\377i\377\377\377\377\377\377H\317H\377\377\377\377\377" - "\377c\335c\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323>\337" - ";\335\364\323\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\364" - "\377\336h\3042\367\377\324t\2702\375\377\310\200\2542\377\377\276\214\240" - "2\377\377\262\232\2211\377\377\377\245\2041\377\377\377\262x1\377\377\377" - "\277l1\310d2\312`1\324X2\327T1\260|2\377\377\377\307\260|\244\2102\377\377" - "\377\307\300\213\232\2211\230\2242\377\377\377\377\377\262\310\316\231\214" - "\2402\214\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200" - "\2542\200\2542\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266" - "\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\325\355" - "\305\377\377\377\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\335" - "\364\323h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377" - "\377\215\2351\377\377\377\232\2211\377\377\377\245\2041\377\377\377\262x" - "1\377\377\377\277l1\377\377\377\312`1\377\310|\327T1\227/\14\377\377\377" - "\307\260|\244\2102\244\2102\377\377\377\307\300\213\230\2242\230\2242\377" - "\377\377\310\316\231\310\316\231\214\2402\214\2402\377\377\377\377\377\377" - "\312\332\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042h\3042h\3042\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360" - "T\11TO\3321\377\377\377Z\3002\377\377\377h\3042\377\377\334t\2702\375\377" - "\310*\30\20\312\332\250\214\2402\262\260\214\230\2242\307\300\213\377\377" - "\377\245\2041\377\377\377:\35\20\377\377\377\277l1\316\264w\310d2\377\310" - "|\356qL\227/\14\260|2TZ3\307\260|\244\2102\274\302\274\307\300\213\307\300" - "\213\273\301U\377\377\377\377\377\377A^2\310\316\231\214\2402o\216B\377\377" - "\377\377\377\377\366\377\324\312\332\250\312\332\250*a\20\200\2542\377\377" - "\377\230\301\230\377\377\377\377\377\377\377\377\353\317\344\266\317\344" - "\266T\253Tt\2702t\2702]\265I\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377T\306T\377\377\377\325\355\305l\324i\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042\"\254\20h\3042h\3042b\353b\377\377\377" - "\377\377\377D\3502\362\375\360\377\377\377O\3321\377\377\377\\\3202\364\377" - "\336h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377\377" - "\214\2402\377\377\262\230\2242\307\300\213\244\2102\307\260|\377\377\377" - "\262x1\377\377\377\274p2\377\337\207\310d2\377\310|\324X2\333bB\260|2\377" - "\377\377\307\260|\244\2102\244\2102\377\377\377\307\300\213\232\2211\230" - "\2242\377\377\377\377\377\377\310\316\231\310\316\231\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\254" - "2\200\2542\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\325\355\305" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377\377\377\377" - "h\3042h\3042\377\377\377\377\377\377D\3471\377\377\377P\3342\364\377\352" - "\\\3202\335\364\323\377\377\377h\3021\377\377\377t\2702\375\377\310\200\254" - "2\312\332\250\377\377\377\215\2351\377\377\377\230\2242\377\377\250\244\210" - "2\307\260|\377\377\377\262x1\377\377\377\274p2\377\337\207\310d2\323xQ\324" - "X2\327T1\227/\14\260|2\377\377\234\307\260|\244\2102\377\377\377\377\377" - "\377\307\300\213\230\2242\230\2242\377\377\377\377\377\377\310\316\231\310" - "\316\231\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250" - "\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325" - "\355\305\377\377\377\377\377\377`\0`\377\377\377D\3471\371\366\371P\3342" - "\346\371\342\377\377\377\\\3161\377\377\377'\24\22\325\355\305t\2702\276" - "\310\251\377\377\377\200\2542\377\377\316\214\2402\310\316\231`6`\230\224" - "2\377\377\250\222u<\307\260|\377\377\377\315\214L\377\377\377\274p2M,#\310" - "d2\312`1\306\304\306\324X2\333bB\325\242W\377\377\377\307\260|=9\22\244\210" - "2\377\377\377\227\234w\307\300\213\230\2242\307\322a\377\377\377\377\377" - "\377Km9\310\316\231\214\2402r\226K\377\377\377\377\377\377\377\377\377\312" - "\332\250\312\332\250`\242`\200\2542\200\2542\224\306\224\377\377\377\377" - "\377\377\377\377\377\377\377\377\317\344\266M\250D\317\344\266\377\377\377" - "\203\322\203t\2702t\2702\301\377\177\377\377\377\377\377\377`\330`\377\377" - "\377\377\377\377r\344r\377\377\377\377\377\377\377\377\377\325\355\305\377" - "\377\377\377\377\377D\3502\371\377\364P\3342\346\371\342\377\377\377\\\320" - "2\364\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231\230\2242\307\300\213\377\377\377" - "\244\2102\307\260|\377\377\377\200U0\220^\377\7\4/\227U[\246]\377\255Q1\377" - "\242y\10\3/\306M@\6\4/{^\377mVvmVv\6\5/h\\\377h\\\377\\U\204\12\12\360\5" - "\5/VX\377VX\377\12\12\360LR\221\12\12\360\5\6/\214\2402\377\377\377\377\377" - "\377\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200" - "\2542\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344" - "\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371" - "\342\377\377\377\\\3202\335\364\323\377\377\377h\3042\367\377\324t\2702\317" - "\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402\377\377\262" - "\230\2242\307\300\213\377\377\377\244\2102\307\260|{^\377\200U0\220^\377" - "\7\4/\227U[\246]\377\7\3/\377\242y\236\37""2\306M0\210%\14T-2{^\377mVv\6" - "\5/\6\5/h\\\377\\U\204\\U\204\5\5/\5\5/VX\377VX\377LR\221LR\221\377\377\377" - "\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266\377" - "\377\377\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377D\3502\365\375\363\377\377" - "\377O\3321l\22l\\\3202\335\364\323\357\346\357h\3042\325\355\305\377\377" - "\377t\2702\317\344\266l-l\200\2521\377\377\377\204\211=\310\316\231\377\377" - "\377\262\243L\307\300\213\377\377\377E&\25mVv{^\377ySB\220^\377\7\4/\275" - "t\201\246]\377\7\3/I\37!\277Z\377\10\3/\237YQ\6\4/{^\377\236\213\247mVv\6" - "\5/,-lh\\\377\\U\204dow\5\5/\5\5/\222\251\377VX\377\310\316\231T{@\377\377" - "\377\214\2402w\240V\377\377\377\377\377\377\377\377\377\377\377\377\312\332" - "\250U\231G\377\377\377\200\2542q\270\\\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377l\317l\317\344\266\317\344\266z\330v\377\377\377" - "\377\377\377\323\377\221t\2702t\2702l\352l\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\364" - "\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200" - "\2542\312\332\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\307" - "\300\213\377\377\377\6\5/mVv{^\377\200U0\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\277Z\377\10\3/\306M@\6\4/{^\377{^\377mVv\6\5/\6\5/h\\\377h\\\377" - "\\U\204\12\12\360\5\5/\12\12\360\377\377\377\377\377\377\310\316\231\310" - "\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377" - "\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200\254" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702" - "\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\3342\346\371\342" - "\377\377\377\\\3202\335\364\323\377\377\377h\3042\325\355\305\377\377\377" - "t\2702\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402" - "\310\316\231\377\377\377\230\2242\307\300\213h\\\377\6\5/mVv{^\377\200U0" - "\220^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{" - "^\377mVvmVv\6\5/\12\12\360h\\\377\\U\204\\U\204\5\5/\230\2242\377\377\377" - "\377\377\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214" - "\2402\377\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\377\377\377\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\377\377\377\377\377\377\377\377\377\377\377\377D\3502q\10p\377\377" - "\377P\3342\335\350\332\377\377\377\\\3202\351\366\337\377\377\377h\3042d" - "!\\\377\377\377t\2702\277\302\252\377\377\377\200\2542\343\345\301\377\377" - "\377\214\2402^2H\377\377\377\230\2242\257\235\204h\\\377\6\5/\223o\234{^" - "\377\6\4/<\36""1\377\252\215j)2\211XK\377\250\203\202$2\337~c\377\242y\236" - "\37""2]#\26\306M@\6\4/ym\274{^\377mVvELn\6\5/h\\\37703x\\U\204\307\300\213" - "\204\226\\\230\2242\377\377\377\377\377\377\377\377\377\310\316\231^\212" - "H\377\377\377\214\2402}\256b\377\377\377\377\377\377\377\377\377\377\377" - "\377\312\332\250_\251O\377\377\377\377\377\377y\310j\200\2542\377\377\377" - "\377\377\377\377\377\377\377\377\377x\341x\377\377\377\377\377\377\177\350" - "|\317\344\266\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\334" - "2\346\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\304" - "2\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200\2542\312\332" - "\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\\U\204h\\\377" - "\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\255" - "RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377mVvmVv\6\5/\12\12\360h\\\377" - "\377\377\377\307\300\213\377\377\377\230\2242\230\2242\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\312" - "\332\250\377\377\377\200\2542\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\350" - "2\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377\377\377\\\320" - "2\335\364\323\377\377\377h\3042\325\355\305\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\214\2402\310\316" - "\231\377\377\377\5\5/\\U\204h\\\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220" - "^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{^\377" - "\12\12\360mVv\6\5/\6\5/\377\377\377\377\377\377\307\300\213\307\300\213\377" - "\377\377\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377" - "\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377\377\377\377\377" - "\204\0\204\377\377\377D\3502\355\364\353\377\377\377\377\377\377Y\335;\346" - "\371\342\377\377\377/\26\31\335\364\323\377\377\377k\255<\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\2046\204\200\2542\312\332\250\340" - "\317\340\214\2402\310\316\231\377\377\377VX\377\5\5//\33Dh\\\377\6\5/tVz" - "{^\377\6\4/=0\377\201Vi\220^\377\3\1\30\227U[\246]\377?6U\255RN\277Z\377" - "\337]s\306M0\306M@\3\2\30{^\377{^\377yv}mVv\244\2102\377\377\377\377\377" - "\377\377\377\377gyG\307\300\213\230\2242\212\242h\377\377\377\377\377\377" - "\377\377\377\377\377\377\310\316\231g\230O\377\377\377\214\2402\205\274q" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377h\270V\312\332" - "\250\377\377\377\222\344\222\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346" - "\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\3042\325" - "\355\305\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\255RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377\12\12\360\307\260" - "|\244\2102\244\2102\377\377\377\377\377\377\377\377\377\307\300\213\377\377" - "\377\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310" - "\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377" - "\377\377\377\200\2542\200\2542\377\377\377\377\377\377D\3502\377\377\377" - "\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\377\377\377" - "\335\364\323\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702" - "\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\377\377\377\214" - "\2402LR\221VX\377\5\5/\\U\204\12\12\360h\\\377\6\5/mVv{^\377\6\4/\12\12\360" - "\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\7\3/\255RN\277Z\377\10\3/\306M@" - "\6\4/\6\4/{^\377\377\377\377\307\260|\377\377\377\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\377\377" - "\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231\377\377" - "\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377\377-\17\34\346" - "\371\342\377\377\377\363\346\363\\\3202\335\364\323\377\377\377h\3042\377" - "\377\377x)o\377\377\377t\2702\301\276\255\377\377\377\377\377\377\243\273" - "U\312\332\250\377\377\377O-\34\12\12\360LR\221gU\333\5\5/\\U\204<)\377h\\" - "\377\6\5/=!B{^\377\6\4/A2\306\201Vi\220^\377I9q\227U[\246]\377]-\220\7\3" - "/\255RN\245q\304\10\3/\306M0\377\236\221\6\4/\377\377\377\220\231\220\307" - "\260|\307\260|\226\227m\244\2102\377\377\377\377\377\377\377\377\377\307" - "\300\213p\207N\230\2242\230\2242\254\316\254\377\377\377\377\377\377\377" - "\377\377\310\316\231\310\316\231\220\317\220\377\377\377\214\2402\216\316" - "\200\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377r\310^\312" - "\332\250\377\377\377\377\377\377\377\377\377D\3502\362\375\360\377\377\377" - "P\3342\377\377\377\346\371\342\377\377\377\\\3202\335\364\323\377\377\377" - "\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\5\6/LR\221\12\12" - "\360VX\377\5\5/\\U\204h\\\377\12\12\360\6\5/mVv{^\377\6\4/\12\12\360\201" - "Vi\220^\377\7\4/\227U[\12\12\360\246]\377\7\3/\255RN\277Z\377\277Z\377\10" - "\3/\306M@\260|2\260|2\377\377\377\377\377\377\307\260|\377\377\377\244\210" - "2\377\377\377\377\377\377\377\377\377\377\377\377\307\300\213\377\377\377" - "\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377D\3502\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377" - "\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\12\12\360\5\6/LR\221VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/\12\12\360mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\227" - "U[\246]\377\7\3/\255RN\12\12\360\277Z\377\10\3/\333bB\377\377\377\260|2\377" - "\377\377\377\377\377\307\260|\307\260|\244\2102\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\230\224" - "2\377\377\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231" - "\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377)\10\36\362\375\360\377\377\377\370" - "\356\370P\3342\346\371\342\377\377\377\377\377\377\\\3202\207\"\201\377\377" - "\377\377\377\377p\250D\325\355\305\377\377\377\377\377\377t\2702\317\344" - "\266\234?\234\200\2542\377\377\377\274\260\244FS\377\5\6/;#\377LR\221VX\377" - "\3\1\34\12\12\360\\U\204{^\330\6\5/\12\12\360\257\203\270{^\377\6\4/\6\4" - "\222\201Vi\220^\377P@d\12\12\360\227U[\370\244\377\7\3/\255RNi./\277Z\377" - "\324X2\264\202w\333bB\260|2\377\377\377\377\377\377\377\377\377yvK\377\377" - "\377\244\2102\236\247|\377\377\377\377\377\377\377\377\377\307\300\213\307" - "\300\213\234\306\234\230\2242\377\377\377\256\330\256\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\234\341\234\377\377\377\214\240" - "2\232\343\223\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375" - "\360\377\377\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\" - "\3202\335\364\323\377\377\377\377\377\377h\3042\325\355\305\377\377\377\377" - "\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312\332\250\12" - "\12\360FS\377\5\6/LR\221\12\12\360RW\255\3\5\35\6\11\224ZT\\d[\261\3\4\35" - "\6\11\224lVTw]\264\4\4\35\6\11\224\200VN\214]\270\4\3\35\6\11\224\226UG\242" - "\\\274\4\3\35\4\3\35\254R@\377\377\311\203U\36\203U\36\323a:my\36my\36\377" - "\377\276\377\377\276\243\255X\243\255X\236\371\236e\204\36\236\371\236\374" - "\377\273\236\371\236\236\371\236\234\275`\236\371\236^\220\36^\220\36\236" - "\371\236\352\377\267\352\377\267\236\371\236\236\371\236\310\316\231\310" - "\316\231\377\377\377\377\377\377\214\2402\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346\371\342\377\377" - "\377\377\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\377\377" - "\377\325\355\305\377\377\377t\2702\377\377\377\317\344\266\377\377\377\377" - "\377\377\200\2542\346\3\4\35lVT\4\4hw]\264\4\4\35aK\244\200VN\214]\270kZ\371\4\3\35" - "\270\212Io\225o\377\377\306{a\36\253\300\253\304wB\377\377\311\377\377\377" - "\203U\36\323a:\224D(my\36\236\371\236\307\316\266\377\377\276\236\371\236" - "\377\377\343\236\371\236e\204\36Gk\25\236\371\236\374\377\273\260\334\260" - "\236\371\236\234\275`\377\377\377\377\377\377\230\2242k\207#\377\377\377" - "\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377" - "\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\\3202\377\377" - "\377\335\364\323\377\377\377\377\377\377h\3042\377\377\377\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\3778L\377\12\12\360\5\6/<" - "L\237\12\12\360BR\252\3\5\35\6\11\224JQbRW\255\6\11\224\3\5\35ZT\\\6\11\224" - "d[\261\6\11\224\3\4\35lVT\6\11\224w]\264\4\4\35\6\11\224\200VN\214]\270\6" - "\11\224tm\36\270\212I\270\212I\377\377\306{a\36{a\36\304wB\236\371\236\377" - "\377\311\203U\36\236\371\236\323a:my\36my\36\236\371\236\377\377\276\236" - "\371\236\243\255X\243\255X\236\371\236e\204\36\236\371\236\374\377\273\374" - "\377\273\236\371\236\307\300\213\307\300\213\377\377\377\377\377\377\230" - "\2242\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377" - "\377\377\377\377\377P\3342\377\377\377\346\371\342\377\377\377\377\377\377" - "\\\3202\335\364\323\377\377\377\377\377\377\377\377\377h\3042\325\355\305" - "\377\377\377\377\377\377t\2702\377\377\377\317\344\2668L\377\12\12\360\5" - "\6/\12\12\360\265\14\177\252+\201\210\16\245\204" + "*\377\314U\312\\,\224'\11\260i\17\244\210\40\232\2211\331\353J\215\2351\377" + "\377\276\200\2521\200\2542\375\377\310u\2661t\2702t\2702\367\377\324\325" + "\355\305h\3021h\3042h\3042\377\377\377\377\377\377\364\377\336\335\364\323" + "\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346" + "\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377" + "\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\3342\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\27\331\12Y\316-h\3021\243\370Cg\230\15\230\224\"\245" + "\204*\377\314U\310J\21\327Q.\260b\21\245\2041\370\343N\230\2242\331\353J" + "\214\2402\377\377\276\200\2521\200\2542\375\377\310\317\344\266u\2661t\270" + "2\377\377\377\367\377\324\325\355\305h\3021h\3042h\3042h\3042\377\377\377" + "\377\377\377\364\377\336\335\364\323\335\364\323\335\364\323\335\364\323" + "\\\3202\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371" + "\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377\377" + "\377\377\377\377\377\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\334" + "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377K\3745!\315\13d\304,p\270)\177\252+\23\13\6\232\2211\245\204" + "1\347\270O\377\277Y\324<\22\265V\24\377\330Q\244\210\40#(\13\230\224\"\331" + "\353Ju\211.\377\377\276\200\2521\210\273:\200\2542\375\377\310\20" + "3\6u\266" + "1t\2702\271\307\271\367\377\324\325\355\305\341\377\321h\3021h\3042\16L\7" + "h\3042\377\377\377\242\300\242\377\377\377\335\364\323\355\377\343\335\364" + "\323\335\364\323\14f\7\\\3202\\\3202>\250*\\\3202\377\377\377\377\377\377" + "\377\377\377\377\377\377$\231$\377\377\377\377\377\377s\303s\377\377\377" + "\346\371\342\376\377\372\346\371\342\346\371\342\40\257\37\346\371\342\346" + "\371\342\\\316\\\377\377\377\377\377\377\377\377\377\377\377\377P\3342\13" + "\262\7P\3342P\3342*\327%P\3342P\3342o\377Q\377\377\377\377\377\377$\352$" + "\377\377\377\377\377\377K\3745]\3749s\375<\212\373@\243\370C\274\363G\331" + "\353J\370\343N\377\330Q\377\314U\377\277Y\377\260\\\224(\11\260|\36\245\204" + "1\377\377\250\232\2211\230\224\"\215\2351\214\2402\377\377\276\312\332\250" + "\200\2521\200\2542\377\377\377\317\344\266u\2661t\2702t\2702\377\377\377" + "\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\3042h\3042\377\377" + "\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364\323\335\364" + "\323\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342" + "\346\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377P\3342P\3342" + "P\3342P\3342\377\377\377K\3745O\3321\\\3161h\3021t\2702~\254'\214\240%\377" + "\377\262\370\343N\377\330Q\262x1\277l1\312`1\327R.\260X\23\377\330Q\244\210" + "2\377\377\250\230\2242\377\377\262\215\2351\214\2402\377\377\377\312\332" + "\250\200\2521\200\2542\377\377\377\375\377\310\317\344\266u\2661t\2702t\270" + "2\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\304" + "2h\3042h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\\\3202\\\320" + "2\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346\371\342\346" + "\371\342\346\371\342\346\371\342\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377D\3471O\3321\21\7\11c\304+\367\377\324o\2520\200\252" + "1\214\2402\235\226'\377\377\250\377\330Q!\20\11\277l1\310d2\266?\33\224(" + "\11\260|\36\257\217;\377\377\250\232\2211\34$\11\377\377\262\215\2351q\206" + "0\377\377\377\312\332\250\217\303@\200\2542\200\25420Z0\317\344\266\317\344" + "\266X\2260t\2702t\2702\377\377\377\377\377\377\325\355\305(l%\325\355\305" + "\325\355\305K\2410h\3042h\3042\377\377\377\377\377\377\377\377\3770\2200" + "\377\377\377\377\377\377t\274p\335\364\323\335\364\323\373\377\361\377\377" + "\377\377\377\377\21\213\11\\\3202\\\3202<\274/\\\3202\377\377\377\377\377" + "\377\377\377\377\377\377\3770\3060\377\377\377\377\377\377V\330V\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\3770\3410\346\371\342\346" + "\371\342>\352>\346\371\342\377\377\377D\3471P\3342\364\377\352s\375\3369\\\3202\377\377\377\377\377\377\377\377\377\377\377\377D\3502\371\377" + "\364O\3321\\\3202\364\377\336h\3042\367\377\324u\2661\200\2542\377\377\276" + "\215\2351\230\2242\307\300\213\244\2102\377\377\234\262x1\274p2\377\337\207" + "\312`1\324E\30\327T1\260|2\377\377\234\245\2041\244\2102\377\377\250\232" + "\2211\230\2242\377\377\377\310\316\231\215\2351\214\2402\377\377\377\377" + "\377\377\312\332\250\312\332\250\200\2542\200\2542\377\377\377\377\377\377" + "\317\344\266\317\344\266\317\344\266t\2702t\2702t\2702\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355" + "\305\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\377\377" + "\377\377\377\377\377\377\377\\\3202\\\3202\\\3202\377\377\377D\3502\371\377" + "\364O\3321\377\377\377\\\3161h\3042\367\377\324t\2702\375\377\310\200\252" + "1\377\377\377\215\2351\230\2242\377\377\250\244\2102\377\377\234\262x1\274" + "p2\316\214_\310d2\377\310|\327T1\227/\14\377\377\377\307\260|\244\2102\377" + "\377\377\307\300\213\230\2242\230\2242\377\377\377\310\316\231\214\2402\214" + "\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\2542\377" + "\377\377\377\377\377\377\377\377\317\344\266\317\344\266\317\344\266t\270" + "2t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377h\3042h\3042" + "h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364" + "\323\335\364\323\335\364\323\377\377\377\377\377\377\377\377\377\377\377" + "\377D\3502\371\377\364R\3344\364\377\352\\\3161H\22Hh\3021\377\377\377o\244" + "2\200\2542\312\332\250\226\245<\377\377\262\230\2242H-/\245\2041\377\377" + "\377\233i5\274p2\277l1\331sC\377\310|\324X2*\15\3\260|2\377\377\234\206s" + "7\244\2102\377\377\250\340\337\244\230\2242\377\377\377Hc2\310\316\231\214" + "\2402n\211:\377\377\377\377\377\377\353\377\311\312\332\250\200\2542$T\16" + "\377\377\377\377\377\377\236\277\236\377\377\377\317\344\266\367\377\336" + "\377\377\377t\2702\40n\16t\2702\377\377\377\212\303\212\377\377\377\377\377" + "\377\377\377\377\325\355\305\325\355\305<\2477\377\377\377\377\377\377O\276" + "Ah\3042h\3042\237\377i\377\377\377\377\377\377H\317H\377\377\377\377\377" + "\377c\335c\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323>\337" + ";\335\364\323\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\364" + "\377\336h\3042\367\377\324t\2702\375\377\310\200\2542\377\377\276\214\240" + "2\377\377\262\232\2211\377\377\377\245\2041\377\377\377\262x1\377\377\377" + "\277l1\310d2\312`1\324X2\327T1\260|2\377\377\377\307\260|\244\2102\377\377" + "\377\307\300\213\232\2211\230\2242\377\377\377\377\377\262\310\316\231\214" + "\2402\214\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200" + "\2542\200\2542\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266" + "\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\325\355" + "\305\377\377\377\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\335" + "\364\323h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377" + "\377\215\2351\377\377\377\232\2211\377\377\377\245\2041\377\377\377\262x" + "1\377\377\377\277l1\377\377\377\312`1\377\310|\327T1\227/\14\377\377\377" + "\307\260|\244\2102\244\2102\377\377\377\307\300\213\230\2242\230\2242\377" + "\377\377\310\316\231\310\316\231\214\2402\214\2402\377\377\377\377\377\377" + "\312\332\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377" + "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" + "\377t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\377\377" + "\377\377\377\377\377\377\377h\3042h\3042h\3042\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360" + "T\11TO\3321\377\377\377Z\3002\377\377\377h\3042\377\377\334t\2702\375\377" + "\310*\30\20\312\332\250\214\2402\262\260\214\230\2242\307\300\213\377\377" + "\377\245\2041\377\377\377:\35\20\377\377\377\277l1\316\264w\310d2\377\310" + "|\356qL\227/\14\260|2TZ3\307\260|\244\2102\274\302\274\307\300\213\307\300" + "\213\273\301U\377\377\377\377\377\377A^2\310\316\231\214\2402o\216B\377\377" + "\377\377\377\377\366\377\324\312\332\250\312\332\250*a\20\200\2542\377\377" + "\377\230\301\230\377\377\377\377\377\377\377\377\353\317\344\266\317\344" + "\266T\253Tt\2702t\2702]\265I\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377T\306T\377\377\377\325\355\305l\324i\325\355\305\377\377" + "\377\377\377\377\377\377\377h\3042\"\254\20h\3042h\3042b\353b\377\377\377" + "\377\377\377D\3502\362\375\360\377\377\377O\3321\377\377\377\\\3202\364\377" + "\336h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377\377" + "\214\2402\377\377\262\230\2242\307\300\213\244\2102\307\260|\377\377\377" + "\262x1\377\377\377\274p2\377\337\207\310d2\377\310|\324X2\333bB\260|2\377" + "\377\377\307\260|\244\2102\244\2102\377\377\377\307\300\213\232\2211\230" + "\2242\377\377\377\377\377\377\310\316\231\310\316\231\214\2402\214\2402\377" + "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\254" + "2\200\2542\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" + "\344\266\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\325\355\305" + "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377\377\377\377" + "h\3042h\3042\377\377\377\377\377\377D\3471\377\377\377P\3342\364\377\352" + "\\\3202\335\364\323\377\377\377h\3021\377\377\377t\2702\375\377\310\200\254" + "2\312\332\250\377\377\377\215\2351\377\377\377\230\2242\377\377\250\244\210" + "2\307\260|\377\377\377\262x1\377\377\377\274p2\377\337\207\310d2\323xQ\324" + "X2\327T1\227/\14\260|2\377\377\234\307\260|\244\2102\377\377\377\377\377" + "\377\307\300\213\230\2242\230\2242\377\377\377\377\377\377\310\316\231\310" + "\316\231\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250" + "\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" + "\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325" + "\355\305\377\377\377\377\377\377`\0`\377\377\377D\3471\371\366\371P\3342" + "\346\371\342\377\377\377\\\3161\377\377\377'\24\22\325\355\305t\2702\276" + "\310\251\377\377\377\200\2542\377\377\316\214\2402\310\316\231`6`\230\224" + "2\377\377\250\222u<\307\260|\377\377\377\315\214L\377\377\377\274p2M,#\310" + "d2\312`1\306\304\306\324X2\333bB\325\242W\377\377\377\307\260|=9\22\244\210" + "2\377\377\377\227\234w\307\300\213\230\2242\307\322a\377\377\377\377\377" + "\377Km9\310\316\231\214\2402r\226K\377\377\377\377\377\377\377\377\377\312" + "\332\250\312\332\250`\242`\200\2542\200\2542\224\306\224\377\377\377\377" + "\377\377\377\377\377\377\377\377\317\344\266M\250D\317\344\266\377\377\377" + "\203\322\203t\2702t\2702\301\377\177\377\377\377\377\377\377`\330`\377\377" + "\377\377\377\377r\344r\377\377\377\377\377\377\377\377\377\325\355\305\377" + "\377\377\377\377\377D\3502\371\377\364P\3342\346\371\342\377\377\377\\\320" + "2\364\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\200\2542\312" + "\332\250\377\377\377\214\2402\310\316\231\230\2242\307\300\213\377\377\377" + "\244\2102\307\260|\377\377\377\200U0\220^\377\7\4/\227U[\246]\377\255Q1\377" + "\242y\10\3/\306M@\6\4/{^\377mVvmVv\6\5/h\\\377h\\\377\\U\204\12\12\360\5" + "\5/VX\377VX\377\12\12\360LR\221\12\12\360\5\6/\214\2402\377\377\377\377\377" + "\377\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200" + "\2542\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344" + "\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371" + "\342\377\377\377\\\3202\335\364\323\377\377\377h\3042\367\377\324t\2702\317" + "\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402\377\377\262" + "\230\2242\307\300\213\377\377\377\244\2102\307\260|{^\377\200U0\220^\377" + "\7\4/\227U[\246]\377\7\3/\377\242y\236\37" + "2\306M0\210%\14T-2{^\377mVv\6" + "\5/\6\5/h\\\377\\U\204\\U\204\5\5/\5\5/VX\377VX\377LR\221LR\221\377\377\377" + "\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250\312\332" + "\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266\377" + "\377\377\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377D\3502\365\375\363\377\377" + "\377O\3321l\22l\\\3202\335\364\323\357\346\357h\3042\325\355\305\377\377" + "\377t\2702\317\344\266l-l\200\2521\377\377\377\204\211=\310\316\231\377\377" + "\377\262\243L\307\300\213\377\377\377E&\25mVv{^\377ySB\220^\377\7\4/\275" + "t\201\246]\377\7\3/I\37!\277Z\377\10\3/\237YQ\6\4/{^\377\236\213\247mVv\6" + "\5/,-lh\\\377\\U\204dow\5\5/\5\5/\222\251\377VX\377\310\316\231T{@\377\377" + "\377\214\2402w\240V\377\377\377\377\377\377\377\377\377\377\377\377\312\332" + "\250U\231G\377\377\377\200\2542q\270\\\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377l\317l\317\344\266\317\344\266z\330v\377\377\377" + "\377\377\377\323\377\221t\2702t\2702l\352l\377\377\377\377\377\377\377\377" + "\377D\3502\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\364" + "\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200" + "\2542\312\332\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\307" + "\300\213\377\377\377\6\5/mVv{^\377\200U0\220^\377\7\4/\227U[\246]\377\7\3" + "/\255RN\277Z\377\10\3/\306M@\6\4/{^\377{^\377mVv\6\5/\6\5/h\\\377h\\\377" + "\\U\204\12\12\360\5\5/\12\12\360\377\377\377\377\377\377\310\316\231\310" + "\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377" + "\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200\254" + "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\317\344\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702" + "\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\3342\346\371\342" + "\377\377\377\\\3202\335\364\323\377\377\377h\3042\325\355\305\377\377\377" + "t\2702\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402" + "\310\316\231\377\377\377\230\2242\307\300\213h\\\377\6\5/mVv{^\377\200U0" + "\220^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{" + "^\377mVvmVv\6\5/\12\12\360h\\\377\\U\204\\U\204\5\5/\230\2242\377\377\377" + "\377\377\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214" + "\2402\377\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332" + "\250\377\377\377\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" + "\344\266\377\377\377\377\377\377\377\377\377\377\377\377D\3502q\10p\377\377" + "\377P\3342\335\350\332\377\377\377\\\3202\351\366\337\377\377\377h\3042d" + "!\\\377\377\377t\2702\277\302\252\377\377\377\200\2542\343\345\301\377\377" + "\377\214\2402^2H\377\377\377\230\2242\257\235\204h\\\377\6\5/\223o\234{^" + "\377\6\4/<\36" + "1\377\252\215j)2\211XK\377\250\203\202$2\337~c\377\242y\236" + "\37" + "2]#\26\306M@\6\4/ym\274{^\377mVvELn\6\5/h\\\37703x\\U\204\307\300\213" + "\204\226\\\230\2242\377\377\377\377\377\377\377\377\377\310\316\231^\212" + "H\377\377\377\214\2402}\256b\377\377\377\377\377\377\377\377\377\377\377" + "\377\312\332\250_\251O\377\377\377\377\377\377y\310j\200\2542\377\377\377" + "\377\377\377\377\377\377\377\377\377x\341x\377\377\377\377\377\377\177\350" + "|\317\344\266\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\334" + "2\346\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\304" + "2\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200\2542\312\332" + "\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\\U\204h\\\377" + "\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\255" + "RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377mVvmVv\6\5/\12\12\360h\\\377" + "\377\377\377\307\300\213\377\377\377\230\2242\230\2242\377\377\377\377\377" + "\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214\2402\377" + "\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\312" + "\332\250\377\377\377\200\2542\200\2542\200\2542\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\350" + "2\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377\377\377\\\320" + "2\335\364\323\377\377\377h\3042\325\355\305\377\377\377t\2702\317\344\266" + "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\214\2402\310\316" + "\231\377\377\377\5\5/\\U\204h\\\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220" + "^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{^\377" + "\12\12\360mVv\6\5/\6\5/\377\377\377\377\377\377\307\300\213\307\300\213\377" + "\377\377\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" + "\231\310\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377" + "\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377\377\377\377\377" + "\204\0\204\377\377\377D\3502\355\364\353\377\377\377\377\377\377Y\335;\346" + "\371\342\377\377\377/\26\31\335\364\323\377\377\377k\255<\325\355\305\377" + "\377\377\377\377\377t\2702\317\344\266\2046\204\200\2542\312\332\250\340" + "\317\340\214\2402\310\316\231\377\377\377VX\377\5\5//\33Dh\\\377\6\5/tVz" + "{^\377\6\4/=0\377\201Vi\220^\377\3\1\30\227U[\246]\377?6U\255RN\277Z\377" + "\337]s\306M0\306M@\3\2\30{^\377{^\377yv}mVv\244\2102\377\377\377\377\377" + "\377\377\377\377gyG\307\300\213\230\2242\212\242h\377\377\377\377\377\377" + "\377\377\377\377\377\377\310\316\231g\230O\377\377\377\214\2402\205\274q" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377h\270V\312\332" + "\250\377\377\377\222\344\222\200\2542\200\2542\377\377\377\377\377\377\377" + "\377\377\377\377\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346" + "\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\3042\325" + "\355\305\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" + "\332\250\377\377\377\214\2402\310\316\231VX\377\12\12\360\5\5/\\U\204h\\" + "\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3" + "/\255RN\255RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377\12\12\360\307\260" + "|\244\2102\244\2102\377\377\377\377\377\377\377\377\377\307\300\213\377\377" + "\377\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310" + "\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377" + "\377\377\377\200\2542\200\2542\377\377\377\377\377\377D\3502\377\377\377" + "\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\377\377\377" + "\335\364\323\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702" + "\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\377\377\377\214" + "\2402LR\221VX\377\5\5/\\U\204\12\12\360h\\\377\6\5/mVv{^\377\6\4/\12\12\360" + "\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\7\3/\255RN\277Z\377\10\3/\306M@" + "\6\4/\6\4/{^\377\377\377\377\307\260|\377\377\377\244\2102\377\377\377\377" + "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\377\377" + "\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231\377\377" + "\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377\377\377\377" + "\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377\377-\17\34\346" + "\371\342\377\377\377\363\346\363\\\3202\335\364\323\377\377\377h\3042\377" + "\377\377x)o\377\377\377t\2702\301\276\255\377\377\377\377\377\377\243\273" + "U\312\332\250\377\377\377O-\34\12\12\360LR\221gU\333\5\5/\\U\204<)\377h\\" + "\377\6\5/=!B{^\377\6\4/A2\306\201Vi\220^\377I9q\227U[\246]\377]-\220\7\3" + "/\255RN\245q\304\10\3/\306M0\377\236\221\6\4/\377\377\377\220\231\220\307" + "\260|\307\260|\226\227m\244\2102\377\377\377\377\377\377\377\377\377\307" + "\300\213p\207N\230\2242\230\2242\254\316\254\377\377\377\377\377\377\377" + "\377\377\310\316\231\310\316\231\220\317\220\377\377\377\214\2402\216\316" + "\200\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377r\310^\312" + "\332\250\377\377\377\377\377\377\377\377\377D\3502\362\375\360\377\377\377" + "P\3342\377\377\377\346\371\342\377\377\377\\\3202\335\364\323\377\377\377" + "\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702\317\344\266" + "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\5\6/LR\221\12\12" + "\360VX\377\5\5/\\U\204h\\\377\12\12\360\6\5/mVv{^\377\6\4/\12\12\360\201" + "Vi\220^\377\7\4/\227U[\12\12\360\246]\377\7\3/\255RN\277Z\377\277Z\377\10" + "\3/\306M@\260|2\260|2\377\377\377\377\377\377\307\260|\377\377\377\244\210" + "2\377\377\377\377\377\377\377\377\377\377\377\377\307\300\213\377\377\377" + "\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" + "\231\310\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + "\377\377D\3502\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377" + "\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\325\355\305\377" + "\377\377\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" + "\332\250\377\377\377\12\12\360\5\6/LR\221VX\377\12\12\360\5\5/\\U\204h\\" + "\377\6\5/\12\12\360mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\227" + "U[\246]\377\7\3/\255RN\12\12\360\277Z\377\10\3/\333bB\377\377\377\260|2\377" + "\377\377\377\377\377\307\260|\307\260|\244\2102\244\2102\377\377\377\377" + "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\230\224" + "2\377\377\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231" + "\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377" + "\377\377\377\377\377\377\377\377\377\377)\10\36\362\375\360\377\377\377\370" + "\356\370P\3342\346\371\342\377\377\377\377\377\377\\\3202\207\"\201\377\377" + "\377\377\377\377p\250D\325\355\305\377\377\377\377\377\377t\2702\317\344" + "\266\234?\234\200\2542\377\377\377\274\260\244FS\377\5\6/;#\377LR\221VX\377" + "\3\1\34\12\12\360\\U\204{^\330\6\5/\12\12\360\257\203\270{^\377\6\4/\6\4" + "\222\201Vi\220^\377P@d\12\12\360\227U[\370\244\377\7\3/\255RNi./\277Z\377" + "\324X2\264\202w\333bB\260|2\377\377\377\377\377\377\377\377\377yvK\377\377" + "\377\244\2102\236\247|\377\377\377\377\377\377\377\377\377\307\300\213\307" + "\300\213\234\306\234\230\2242\377\377\377\256\330\256\377\377\377\377\377" + "\377\377\377\377\310\316\231\310\316\231\234\341\234\377\377\377\214\240" + "2\232\343\223\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375" + "\360\377\377\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\" + "\3202\335\364\323\377\377\377\377\377\377h\3042\325\355\305\377\377\377\377" + "\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312\332\250\12" + "\12\360FS\377\5\6/LR\221\12\12\360RW\255\3\5\35\6\11\224ZT\\d[\261\3\4\35" + "\6\11\224lVTw]\264\4\4\35\6\11\224\200VN\214]\270\4\3\35\6\11\224\226UG\242" + "\\\274\4\3\35\4\3\35\254R@\377\377\311\203U\36\203U\36\323a:my\36my\36\377" + "\377\276\377\377\276\243\255X\243\255X\236\371\236e\204\36\236\371\236\374" + "\377\273\236\371\236\236\371\236\234\275`\236\371\236^\220\36^\220\36\236" + "\371\236\352\377\267\352\377\267\236\371\236\236\371\236\310\316\231\310" + "\316\231\377\377\377\377\377\377\214\2402\377\377\377\377\377\377\377\377" + "\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346\371\342\377\377" + "\377\377\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\377\377" + "\377\325\355\305\377\377\377t\2702\377\377\377\317\344\266\377\377\377\377" + "\377\377\200\2542\346\3\4\35lVT\4\4hw]\264\4\4\35aK\244\200VN\214]\270kZ\371\4\3\35" + "\270\212Io\225o\377\377\306{a\36\253\300\253\304wB\377\377\311\377\377\377" + "\203U\36\323a:\224D(my\36\236\371\236\307\316\266\377\377\276\236\371\236" + "\377\377\343\236\371\236e\204\36Gk\25\236\371\236\374\377\273\260\334\260" + "\236\371\236\234\275`\377\377\377\377\377\377\230\2242k\207#\377\377\377" + "\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377" + "\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\\3202\377\377" + "\377\335\364\323\377\377\377\377\377\377h\3042\377\377\377\325\355\305\377" + "\377\377\377\377\377t\2702\317\344\266\377\377\3778L\377\12\12\360\5\6/<" + "L\237\12\12\360BR\252\3\5\35\6\11\224JQbRW\255\6\11\224\3\5\35ZT\\\6\11\224" + "d[\261\6\11\224\3\4\35lVT\6\11\224w]\264\4\4\35\6\11\224\200VN\214]\270\6" + "\11\224tm\36\270\212I\270\212I\377\377\306{a\36{a\36\304wB\236\371\236\377" + "\377\311\203U\36\236\371\236\323a:my\36my\36\236\371\236\377\377\276\236" + "\371\236\243\255X\243\255X\236\371\236e\204\36\236\371\236\374\377\273\374" + "\377\273\236\371\236\307\300\213\307\300\213\377\377\377\377\377\377\230" + "\2242\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377" + "\377\377\377\377\377P\3342\377\377\377\346\371\342\377\377\377\377\377\377" + "\\\3202\335\364\323\377\377\377\377\377\377\377\377\377h\3042\325\355\305" + "\377\377\377\377\377\377t\2702\377\377\377\317\344\2668L\377\12\12\360\5" + "\6/\12\12\360> (32-(n)))) +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */ /* Rotation is separate from addition to prevent recomputation */ -#define FF(a, b, c, d, x, s, ac) \ - {(a) += F ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define GG(a, b, c, d, x, s, ac) \ - {(a) += G ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define HH(a, b, c, d, x, s, ac) \ - {(a) += H ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define II(a, b, c, d, x, s, ac) \ - {(a) += I ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } +#define FF(a, b, c, d, x, s, ac) \ + { \ + (a) += F((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ + (a) = ROTATE_LEFT((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) \ + { \ + (a) += G((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ + (a) = ROTATE_LEFT((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) \ + { \ + (a) += H((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ + (a) = ROTATE_LEFT((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) \ + { \ + (a) += I((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ + (a) = ROTATE_LEFT((a), (s)); \ + (a) += (b); \ + } /* The routine MD5Init initializes the message-digest context mdContext. All fields are set to zero. */ -void SDLTest_Md5Init(SDLTest_Md5Context * mdContext) +void SDLTest_Md5Init(SDLTest_Md5Context *mdContext) { - if (mdContext==NULL) return; + if (mdContext == NULL) { + return; + } - mdContext->i[0] = mdContext->i[1] = (MD5UINT4) 0; + mdContext->i[0] = mdContext->i[1] = (MD5UINT4)0; - /* - * Load magic initialization constants. - */ - mdContext->buf[0] = (MD5UINT4) 0x67452301; - mdContext->buf[1] = (MD5UINT4) 0xefcdab89; - mdContext->buf[2] = (MD5UINT4) 0x98badcfe; - mdContext->buf[3] = (MD5UINT4) 0x10325476; + /* + * Load magic initialization constants. + */ + mdContext->buf[0] = (MD5UINT4)0x67452301; + mdContext->buf[1] = (MD5UINT4)0xefcdab89; + mdContext->buf[2] = (MD5UINT4)0x98badcfe; + mdContext->buf[3] = (MD5UINT4)0x10325476; } /* @@ -128,48 +134,51 @@ void SDLTest_Md5Init(SDLTest_Md5Context * mdContext) in the message whose digest is being computed. */ -void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, - unsigned int inLen) +void SDLTest_Md5Update(SDLTest_Md5Context *mdContext, unsigned char *inBuf, + unsigned int inLen) { - MD5UINT4 in[16]; - int mdi; - unsigned int i, ii; - - if (mdContext == NULL) return; - if (inBuf == NULL || inLen < 1) return; - - /* - * compute number of bytes mod 64 - */ - mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); - - /* - * update number of bits - */ - if ((mdContext->i[0] + ((MD5UINT4) inLen << 3)) < mdContext->i[0]) - mdContext->i[1]++; - mdContext->i[0] += ((MD5UINT4) inLen << 3); - mdContext->i[1] += ((MD5UINT4) inLen >> 29); - - while (inLen--) { + MD5UINT4 in[16]; + int mdi; + unsigned int i, ii; + + if (mdContext == NULL) { + return; + } + if (inBuf == NULL || inLen < 1) { + return; + } + /* - * add new character to buffer, increment mdi + * compute number of bytes mod 64 */ - mdContext->in[mdi++] = *inBuf++; + mdi = (int)((mdContext->i[0] >> 3) & 0x3F); /* - * transform if necessary + * update number of bits */ - if (mdi == 0x40) { - for (i = 0, ii = 0; i < 16; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); - SDLTest_Md5Transform(mdContext->buf, in); - mdi = 0; + if ((mdContext->i[0] + ((MD5UINT4)inLen << 3)) < mdContext->i[0]) { + mdContext->i[1]++; + } + mdContext->i[0] += ((MD5UINT4)inLen << 3); + mdContext->i[1] += ((MD5UINT4)inLen >> 29); + + while (inLen--) { + /* + * add new character to buffer, increment mdi + */ + mdContext->in[mdi++] = *inBuf++; + + /* + * transform if necessary + */ + if (mdi == 0x40) { + for (i = 0, ii = 0; i < 16; i++, ii += 4) { + in[i] = (((MD5UINT4)mdContext->in[ii + 3]) << 24) | (((MD5UINT4)mdContext->in[ii + 2]) << 16) | (((MD5UINT4)mdContext->in[ii + 1]) << 8) | ((MD5UINT4)mdContext->in[ii]); + } + SDLTest_Md5Transform(mdContext->buf, in); + mdi = 0; + } } - } } /* @@ -177,162 +186,162 @@ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, ends with the desired message digest in mdContext->digest[0...15]. */ -void SDLTest_Md5Final(SDLTest_Md5Context * mdContext) +void SDLTest_Md5Final(SDLTest_Md5Context *mdContext) { - MD5UINT4 in[16]; - int mdi; - unsigned int i, ii; - unsigned int padLen; - - if (mdContext == NULL) return; - - /* - * save number of bits - */ - in[14] = mdContext->i[0]; - in[15] = mdContext->i[1]; - - /* - * compute number of bytes mod 64 - */ - mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); - - /* - * pad out to 56 mod 64 - */ - padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); - SDLTest_Md5Update(mdContext, MD5PADDING, padLen); - - /* - * append length in bits and transform - */ - for (i = 0, ii = 0; i < 14; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); - SDLTest_Md5Transform(mdContext->buf, in); - - /* - * store buffer in digest - */ - for (i = 0, ii = 0; i < 4; i++, ii += 4) { - mdContext->digest[ii] = (unsigned char) (mdContext->buf[i] & 0xFF); - mdContext->digest[ii + 1] = - (unsigned char) ((mdContext->buf[i] >> 8) & 0xFF); - mdContext->digest[ii + 2] = - (unsigned char) ((mdContext->buf[i] >> 16) & 0xFF); - mdContext->digest[ii + 3] = - (unsigned char) ((mdContext->buf[i] >> 24) & 0xFF); - } + MD5UINT4 in[16]; + int mdi; + unsigned int i, ii; + unsigned int padLen; + + if (mdContext == NULL) { + return; + } + + /* + * save number of bits + */ + in[14] = mdContext->i[0]; + in[15] = mdContext->i[1]; + + /* + * compute number of bytes mod 64 + */ + mdi = (int)((mdContext->i[0] >> 3) & 0x3F); + + /* + * pad out to 56 mod 64 + */ + padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); + SDLTest_Md5Update(mdContext, MD5PADDING, padLen); + + /* + * append length in bits and transform + */ + for (i = 0, ii = 0; i < 14; i++, ii += 4) { + in[i] = (((MD5UINT4)mdContext->in[ii + 3]) << 24) | (((MD5UINT4)mdContext->in[ii + 2]) << 16) | (((MD5UINT4)mdContext->in[ii + 1]) << 8) | ((MD5UINT4)mdContext->in[ii]); + } + SDLTest_Md5Transform(mdContext->buf, in); + + /* + * store buffer in digest + */ + for (i = 0, ii = 0; i < 4; i++, ii += 4) { + mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF); + mdContext->digest[ii + 1] = + (unsigned char)((mdContext->buf[i] >> 8) & 0xFF); + mdContext->digest[ii + 2] = + (unsigned char)((mdContext->buf[i] >> 16) & 0xFF); + mdContext->digest[ii + 3] = + (unsigned char)((mdContext->buf[i] >> 24) & 0xFF); + } } /* Basic MD5 step. Transforms buf based on in. */ -static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in) +static void SDLTest_Md5Transform(MD5UINT4 *buf, const MD5UINT4 *in) { - MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; + MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; - /* - * Round 1 - */ + /* + * Round 1 + */ #define S11 7 #define S12 12 #define S13 17 #define S14 22 - FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ - FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ - FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ - FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ - FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ - FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ - FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ - FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ - FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ - FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ - FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ - FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ - FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ - FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ - FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ - FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ - - /* - * Round 2 - */ + FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ + FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ + FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ + FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ + FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ + FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ + FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ + FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ + FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ + FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ + FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ + FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ + FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ + FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ + FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ + FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ + + /* + * Round 2 + */ #define S21 5 #define S22 9 #define S23 14 #define S24 20 - GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ - GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ - GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ - GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ - GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ - GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ - GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ - GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ - GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ - GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ - GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ - GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ - GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ - GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ - GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ - GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ - - /* - * Round 3 - */ + GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ + GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ + GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ + GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ + GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ + GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ + GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ + GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ + GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ + GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ + GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ + GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ + GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ + GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ + GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ + GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ + + /* + * Round 3 + */ #define S31 4 #define S32 11 #define S33 16 #define S34 23 - HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ - HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ - HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ - HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ - HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ - HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ - HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ - HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ - HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ - HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ - HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ - HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ - HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ - HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ - HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ - HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ - - /* - * Round 4 - */ + HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ + HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ + HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ + HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ + HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ + HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ + HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ + HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ + HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ + HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ + HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ + HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ + HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ + HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ + HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ + HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ + + /* + * Round 4 + */ #define S41 6 #define S42 10 #define S43 15 #define S44 21 - II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ - II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ - II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ - II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ - II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ - II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ - II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ - II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ - II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ - II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ - II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ - II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ - II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ - II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ - II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ - II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; + II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ + II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ + II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ + II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ + II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ + II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ + II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ + II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ + II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ + II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ + II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ + II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ + II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ + II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ + II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ + II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/test/SDL_test_memory.c b/modules/SDL2/src/test/SDL_test_memory.c index 13d49c5..bb773a6 100644 --- a/modules/SDL2/src/test/SDL_test_memory.c +++ b/modules/SDL2/src/test/SDL_test_memory.c @@ -62,7 +62,7 @@ static unsigned int get_allocation_bucket(void *mem) index = (crc_value & (SDL_arraysize(s_tracked_allocations) - 1)); return index; } - + static SDL_bool SDL_IsAllocationTracked(void *mem) { SDL_tracked_allocation *entry; @@ -84,7 +84,7 @@ static void SDL_TrackAllocation(void *mem, size_t size) return; } entry = (SDL_tracked_allocation *)SDL_malloc_orig(sizeof(*entry)); - if (!entry) { + if (entry == NULL) { return; } entry->mem = mem; @@ -145,7 +145,7 @@ static void SDL_UntrackAllocation(void *mem) } } -static void * SDLCALL SDLTest_TrackedMalloc(size_t size) +static void *SDLCALL SDLTest_TrackedMalloc(size_t size) { void *mem; @@ -156,7 +156,7 @@ static void * SDLCALL SDLTest_TrackedMalloc(size_t size) return mem; } -static void * SDLCALL SDLTest_TrackedCalloc(size_t nmemb, size_t size) +static void *SDLCALL SDLTest_TrackedCalloc(size_t nmemb, size_t size) { void *mem; @@ -167,11 +167,11 @@ static void * SDLCALL SDLTest_TrackedCalloc(size_t nmemb, size_t size) return mem; } -static void * SDLCALL SDLTest_TrackedRealloc(void *ptr, size_t size) +static void *SDLCALL SDLTest_TrackedRealloc(void *ptr, size_t size) { void *mem; - SDL_assert(!ptr || SDL_IsAllocationTracked(ptr)); + SDL_assert(ptr == NULL || SDL_IsAllocationTracked(ptr)); mem = SDL_realloc_orig(ptr, size); if (mem && mem != ptr) { if (ptr) { @@ -184,7 +184,7 @@ static void * SDLCALL SDLTest_TrackedRealloc(void *ptr, size_t size) static void SDLCALL SDLTest_TrackedFree(void *ptr) { - if (!ptr) { + if (ptr == NULL) { return; } @@ -233,13 +233,19 @@ void SDLTest_LogAllocations() return; } -#define ADD_LINE() \ - message_size += (SDL_strlen(line) + 1); \ + message = SDL_realloc_orig(NULL, 1); + if (!message) { + return; + } + *message = 0; + +#define ADD_LINE() \ + message_size += (SDL_strlen(line) + 1); \ tmp = (char *)SDL_realloc_orig(message, message_size); \ - if (!tmp) { \ - return; \ - } \ - message = tmp; \ + if (!tmp) { \ + return; \ + } \ + message = tmp; \ SDL_strlcat(message, line, message_size) SDL_strlcpy(line, "Memory allocations:\n", sizeof(line)); @@ -251,21 +257,21 @@ void SDLTest_LogAllocations() total_allocated = 0; for (index = 0; index < SDL_arraysize(s_tracked_allocations); ++index) { for (entry = s_tracked_allocations[index]; entry; entry = entry->next) { - SDL_snprintf(line, sizeof(line), "Allocation %d: %d bytes\n", count, (int)entry->size); + (void)SDL_snprintf(line, sizeof(line), "Allocation %d: %d bytes\n", count, (int)entry->size); ADD_LINE(); /* Start at stack index 1 to skip our tracking functions */ for (stack_index = 1; stack_index < SDL_arraysize(entry->stack); ++stack_index) { if (!entry->stack[stack_index]) { break; } - SDL_snprintf(line, sizeof(line), "\t0x%"SDL_PRIx64": %s\n", entry->stack[stack_index], entry->stack_names[stack_index]); + (void)SDL_snprintf(line, sizeof(line), "\t0x%" SDL_PRIx64 ": %s\n", entry->stack[stack_index], entry->stack_names[stack_index]); ADD_LINE(); } total_allocated += entry->size; ++count; } } - SDL_snprintf(line, sizeof(line), "Total: %.2f Kb in %d allocations\n", (float)total_allocated / 1024, count); + (void)SDL_snprintf(line, sizeof(line), "Total: %.2f Kb in %d allocations\n", total_allocated / 1024.0, count); ADD_LINE(); #undef ADD_LINE diff --git a/modules/SDL2/src/test/SDL_test_random.c b/modules/SDL2/src/test/SDL_test_random.c index 67dcd42..ab3fec5 100644 --- a/modules/SDL2/src/test/SDL_test_random.c +++ b/modules/SDL2/src/test/SDL_test_random.c @@ -38,60 +38,67 @@ /* Initialize random number generator with two integer variables */ -void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, unsigned int ci) +void SDLTest_RandomInit(SDLTest_RandomContext *rndContext, unsigned int xi, unsigned int ci) { - if (rndContext==NULL) return; - - /* - * Choose a value for 'a' from this list - * 1791398085 1929682203 1683268614 1965537969 1675393560 - * 1967773755 1517746329 1447497129 1655692410 1606218150 - * 2051013963 1075433238 1557985959 1781943330 1893513180 - * 1631296680 2131995753 2083801278 1873196400 1554115554 - */ - rndContext->a = 1655692410; - rndContext->x = 30903; - rndContext->c = 0; - if (xi != 0) { - rndContext->x = xi; - } - rndContext->c = ci; - rndContext->ah = rndContext->a >> 16; - rndContext->al = rndContext->a & 65535; + if (rndContext == NULL) { + return; + } + + /* + * Choose a value for 'a' from this list + * 1791398085 1929682203 1683268614 1965537969 1675393560 + * 1967773755 1517746329 1447497129 1655692410 1606218150 + * 2051013963 1075433238 1557985959 1781943330 1893513180 + * 1631296680 2131995753 2083801278 1873196400 1554115554 + */ + rndContext->a = 1655692410; + rndContext->x = 30903; + rndContext->c = 0; + if (xi != 0) { + rndContext->x = xi; + } + rndContext->c = ci; + rndContext->ah = rndContext->a >> 16; + rndContext->al = rndContext->a & 65535; } /* Initialize random number generator from system time */ -void SDLTest_RandomInitTime(SDLTest_RandomContext * rndContext) +void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext) { - int a, b; + int a, b; - if (rndContext==NULL) return; + if (rndContext == NULL) { + return; + } - srand((unsigned int)time(NULL)); - a=rand(); - srand((unsigned int)SDL_GetPerformanceCounter()); - b=rand(); - SDLTest_RandomInit(rndContext, a, b); + srand((unsigned int)time(NULL)); + a = rand(); + srand((unsigned int)SDL_GetPerformanceCounter()); + b = rand(); + SDLTest_RandomInit(rndContext, a, b); } /* Returns random numbers */ -unsigned int SDLTest_Random(SDLTest_RandomContext * rndContext) +unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext) { - unsigned int xh, xl; - - if (rndContext==NULL) return -1; - - xh = rndContext->x >> 16; - xl = rndContext->x & 65535; - rndContext->x = rndContext->x * rndContext->a + rndContext->c; - rndContext->c = - xh * rndContext->ah + ((xh * rndContext->al) >> 16) + - ((xl * rndContext->ah) >> 16); - if (xl * rndContext->al >= (~rndContext->c + 1)) - rndContext->c++; - return (rndContext->x); + unsigned int xh, xl; + + if (rndContext == NULL) { + return -1; + } + + xh = rndContext->x >> 16; + xl = rndContext->x & 65535; + rndContext->x = rndContext->x * rndContext->a + rndContext->c; + rndContext->c = + xh * rndContext->ah + ((xh * rndContext->al) >> 16) + + ((xl * rndContext->ah) >> 16); + if (xl * rndContext->al >= (~rndContext->c + 1)) { + rndContext->c++; + } + return rndContext->x; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/thread/SDL_systhread.h b/modules/SDL2/src/thread/SDL_systhread.h index 8b1aadf..bee2567 100644 --- a/modules/SDL2/src/thread/SDL_systhread.h +++ b/modules/SDL2/src/thread/SDL_systhread.h @@ -38,11 +38,11 @@ extern "C" { on success. */ #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD -extern int SDL_SYS_CreateThread(SDL_Thread * thread, +extern int SDL_SYS_CreateThread(SDL_Thread *thread, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread); #else -extern int SDL_SYS_CreateThread(SDL_Thread * thread); +extern int SDL_SYS_CreateThread(SDL_Thread *thread); #endif /* This function does any necessary setup in the child thread */ @@ -54,10 +54,10 @@ extern int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority); /* This function waits for the thread to finish and frees any data allocated by SDL_SYS_CreateThread() */ -extern void SDL_SYS_WaitThread(SDL_Thread * thread); +extern void SDL_SYS_WaitThread(SDL_Thread *thread); /* Mark thread as cleaned up as soon as it exits, without joining. */ -extern void SDL_SYS_DetachThread(SDL_Thread * thread); +extern void SDL_SYS_DetachThread(SDL_Thread *thread); /* Get the thread local storage for this thread */ extern SDL_TLSData *SDL_SYS_GetTLSData(void); @@ -67,7 +67,7 @@ extern int SDL_SYS_SetTLSData(SDL_TLSData *data); /* This is for internal SDL use, so we don't need #ifdefs everywhere. */ extern SDL_Thread * -SDL_CreateThreadInternal(int (SDLCALL * fn) (void *), const char *name, +SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name, const size_t stacksize, void *data); /* Ends C function definitions when using C++ */ diff --git a/modules/SDL2/src/thread/SDL_thread.c b/modules/SDL2/src/thread/SDL_thread.c index 36883a6..aa8e2b1 100644 --- a/modules/SDL2/src/thread/SDL_thread.c +++ b/modules/SDL2/src/thread/SDL_thread.c @@ -28,28 +28,24 @@ #include "SDL_hints.h" #include "../SDL_error_c.h" - -SDL_TLSID -SDL_TLSCreate() +SDL_TLSID SDL_TLSCreate() { static SDL_atomic_t SDL_tls_id; - return SDL_AtomicIncRef(&SDL_tls_id)+1; + return SDL_AtomicIncRef(&SDL_tls_id) + 1; } -void * -SDL_TLSGet(SDL_TLSID id) +void *SDL_TLSGet(SDL_TLSID id) { SDL_TLSData *storage; storage = SDL_SYS_GetTLSData(); - if (!storage || id == 0 || id > storage->limit) { + if (storage == NULL || id == 0 || id > storage->limit) { return NULL; } - return storage->array[id-1].data; + return storage->array[id - 1].data; } -int -SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void *)) +int SDL_TLSSet(SDL_TLSID id, const void *value, void(SDLCALL *destructor)(void *)) { SDL_TLSData *storage; @@ -58,13 +54,13 @@ SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void *)) } storage = SDL_SYS_GetTLSData(); - if (!storage || (id > storage->limit)) { + if (storage == NULL || (id > storage->limit)) { unsigned int i, oldlimit, newlimit; oldlimit = storage ? storage->limit : 0; newlimit = (id + TLS_ALLOC_CHUNKSIZE); - storage = (SDL_TLSData *)SDL_realloc(storage, sizeof(*storage)+(newlimit-1)*sizeof(storage->array[0])); - if (!storage) { + storage = (SDL_TLSData *)SDL_realloc(storage, sizeof(*storage) + (newlimit - 1) * sizeof(storage->array[0])); + if (storage == NULL) { return SDL_OutOfMemory(); } storage->limit = newlimit; @@ -77,13 +73,12 @@ SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void *)) } } - storage->array[id-1].data = SDL_const_cast(void*, value); - storage->array[id-1].destructor = destructor; + storage->array[id - 1].data = SDL_const_cast(void *, value); + storage->array[id - 1].destructor = destructor; return 0; } -void -SDL_TLSCleanup() +void SDL_TLSCleanup() { SDL_TLSData *storage; @@ -100,7 +95,6 @@ SDL_TLSCleanup() } } - /* This is a generic implementation of thread-local storage which doesn't require additional OS support. @@ -109,7 +103,8 @@ SDL_TLSCleanup() storage this implementation should be improved to be production quality. */ -typedef struct SDL_TLSEntry { +typedef struct SDL_TLSEntry +{ SDL_threadID thread; SDL_TLSData *storage; struct SDL_TLSEntry *next; @@ -118,23 +113,21 @@ typedef struct SDL_TLSEntry { static SDL_mutex *SDL_generic_TLS_mutex; static SDL_TLSEntry *SDL_generic_TLS; - -SDL_TLSData * -SDL_Generic_GetTLSData(void) +SDL_TLSData *SDL_Generic_GetTLSData(void) { SDL_threadID thread = SDL_ThreadID(); SDL_TLSEntry *entry; SDL_TLSData *storage = NULL; #if !SDL_THREADS_DISABLED - if (!SDL_generic_TLS_mutex) { + if (SDL_generic_TLS_mutex == NULL) { static SDL_SpinLock tls_lock; SDL_AtomicLock(&tls_lock); - if (!SDL_generic_TLS_mutex) { + if (SDL_generic_TLS_mutex == NULL) { SDL_mutex *mutex = SDL_CreateMutex(); SDL_MemoryBarrierRelease(); SDL_generic_TLS_mutex = mutex; - if (!SDL_generic_TLS_mutex) { + if (SDL_generic_TLS_mutex == NULL) { SDL_AtomicUnlock(&tls_lock); return NULL; } @@ -158,8 +151,7 @@ SDL_Generic_GetTLSData(void) return storage; } -int -SDL_Generic_SetTLSData(SDL_TLSData *storage) +int SDL_Generic_SetTLSData(SDL_TLSData *data) { SDL_threadID thread = SDL_ThreadID(); SDL_TLSEntry *prev, *entry; @@ -169,10 +161,10 @@ SDL_Generic_SetTLSData(SDL_TLSData *storage) prev = NULL; for (entry = SDL_generic_TLS; entry; entry = entry->next) { if (entry->thread == thread) { - if (storage) { - entry->storage = storage; + if (data != NULL) { + entry->storage = data; } else { - if (prev) { + if (prev != NULL) { prev->next = entry->next; } else { SDL_generic_TLS = entry->next; @@ -183,26 +175,25 @@ SDL_Generic_SetTLSData(SDL_TLSData *storage) } prev = entry; } - if (!entry) { + if (entry == NULL) { entry = (SDL_TLSEntry *)SDL_malloc(sizeof(*entry)); if (entry) { entry->thread = thread; - entry->storage = storage; + entry->storage = data; entry->next = SDL_generic_TLS; SDL_generic_TLS = entry; } } SDL_UnlockMutex(SDL_generic_TLS_mutex); - if (!entry) { + if (entry == NULL) { return SDL_OutOfMemory(); } return 0; } /* Non-thread-safe global error variable */ -static SDL_error * -SDL_GetStaticErrBuf() +static SDL_error *SDL_GetStaticErrBuf() { static SDL_error SDL_global_error; static char SDL_global_error_str[128]; @@ -212,8 +203,7 @@ SDL_GetStaticErrBuf() } #if !SDL_THREADS_DISABLED -static void SDLCALL -SDL_FreeErrBuf(void *data) +static void SDLCALL SDL_FreeErrBuf(void *data) { SDL_error *errbuf = (SDL_error *)data; @@ -225,8 +215,7 @@ SDL_FreeErrBuf(void *data) #endif /* Routine to get the thread-specific error variable */ -SDL_error * -SDL_GetErrBuf(void) +SDL_error *SDL_GetErrBuf(void) { #if SDL_THREADS_DISABLED return SDL_GetStaticErrBuf(); @@ -262,7 +251,7 @@ SDL_GetErrBuf(void) if (errbuf == ALLOCATION_IN_PROGRESS) { return SDL_GetStaticErrBuf(); } - if (!errbuf) { + if (errbuf == NULL) { /* Get the original memory functions for this allocation because the lifetime * of the error buffer may span calls to SDL_SetMemoryFunctions() by the app */ @@ -273,7 +262,7 @@ SDL_GetErrBuf(void) /* Mark that we're in the middle of allocating our buffer */ SDL_TLSSet(tls_errbuf, ALLOCATION_IN_PROGRESS, NULL); errbuf = (SDL_error *)realloc_func(NULL, sizeof(*errbuf)); - if (!errbuf) { + if (errbuf == NULL) { SDL_TLSSet(tls_errbuf, NULL, NULL); return SDL_GetStaticErrBuf(); } @@ -286,12 +275,10 @@ SDL_GetErrBuf(void) #endif /* SDL_THREADS_DISABLED */ } - -void -SDL_RunThread(SDL_Thread *thread) +void SDL_RunThread(SDL_Thread *thread) { void *userdata = thread->userdata; - int (SDLCALL * userfunc) (void *) = thread->userfunc; + int(SDLCALL * userfunc)(void *) = thread->userfunc; int *statusloc = &thread->status; @@ -324,27 +311,25 @@ SDL_RunThread(SDL_Thread *thread) #undef SDL_CreateThreadWithStackSize #endif #if SDL_DYNAMIC_API -#define SDL_CreateThread SDL_CreateThread_REAL +#define SDL_CreateThread SDL_CreateThread_REAL #define SDL_CreateThreadWithStackSize SDL_CreateThreadWithStackSize_REAL #endif #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD -SDL_Thread * -SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), - const char *name, const size_t stacksize, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread) +SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *), + const char *name, const size_t stacksize, void *data, + pfnSDL_CurrentBeginThread pfnBeginThread, + pfnSDL_CurrentEndThread pfnEndThread) #else -SDL_Thread * -SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), - const char *name, const size_t stacksize, void *data) +SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *), + const char *name, const size_t stacksize, void *data) #endif { SDL_Thread *thread; int ret; /* Allocate memory for the thread info structure */ - thread = (SDL_Thread *) SDL_calloc(1, sizeof(*thread)); + thread = (SDL_Thread *)SDL_calloc(1, sizeof(*thread)); if (thread == NULL) { SDL_OutOfMemory(); return NULL; @@ -384,14 +369,12 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), } #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD -DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(int (SDLCALL * fn) (void *), +DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *), const char *name, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) #else -DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(int (SDLCALL * fn) (void *), +DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *), const char *name, void *data) #endif { @@ -403,9 +386,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *), if (stackhint != NULL) { char *endp = NULL; const Sint64 hintval = SDL_strtoll(stackhint, &endp, 10); - if ((*stackhint != '\0') && (*endp == '\0')) { /* a valid number? */ - if (hintval > 0) { /* reject bogus values. */ - stacksize = (size_t) hintval; + if ((*stackhint != '\0') && (*endp == '\0')) { /* a valid number? */ + if (hintval > 0) { /* reject bogus values. */ + stacksize = (size_t)hintval; } } } @@ -417,9 +400,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *), #endif } -SDL_Thread * -SDL_CreateThreadInternal(int (SDLCALL * fn) (void *), const char *name, - const size_t stacksize, void *data) { +SDL_Thread *SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name, + const size_t stacksize, void *data) +{ #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD return SDL_CreateThreadWithStackSize(fn, name, stacksize, data, NULL, NULL); #else @@ -427,8 +410,7 @@ SDL_CreateThreadInternal(int (SDLCALL * fn) (void *), const char *name, #endif } -SDL_threadID -SDL_GetThreadID(SDL_Thread * thread) +SDL_threadID SDL_GetThreadID(SDL_Thread *thread) { SDL_threadID id; @@ -440,8 +422,7 @@ SDL_GetThreadID(SDL_Thread * thread) return id; } -const char * -SDL_GetThreadName(SDL_Thread * thread) +const char *SDL_GetThreadName(SDL_Thread *thread) { if (thread) { return thread->name; @@ -450,14 +431,12 @@ SDL_GetThreadName(SDL_Thread * thread) } } -int -SDL_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SetThreadPriority(SDL_ThreadPriority priority) { return SDL_SYS_SetThreadPriority(priority); } -void -SDL_WaitThread(SDL_Thread * thread, int *status) +void SDL_WaitThread(SDL_Thread *thread, int *status) { if (thread) { SDL_SYS_WaitThread(thread); @@ -471,10 +450,9 @@ SDL_WaitThread(SDL_Thread * thread, int *status) } } -void -SDL_DetachThread(SDL_Thread * thread) +void SDL_DetachThread(SDL_Thread *thread) { - if (!thread) { + if (thread == NULL) { return; } @@ -485,9 +463,9 @@ SDL_DetachThread(SDL_Thread * thread) /* all other states are pretty final, see where we landed. */ const int thread_state = SDL_AtomicGet(&thread->state); if ((thread_state == SDL_THREAD_STATE_DETACHED) || (thread_state == SDL_THREAD_STATE_CLEANED)) { - return; /* already detached (you shouldn't call this twice!) */ + return; /* already detached (you shouldn't call this twice!) */ } else if (thread_state == SDL_THREAD_STATE_ZOMBIE) { - SDL_WaitThread(thread, NULL); /* already done, clean it up. */ + SDL_WaitThread(thread, NULL); /* already done, clean it up. */ } else { SDL_assert(0 && "Unexpected thread state"); } diff --git a/modules/SDL2/src/thread/SDL_thread_c.h b/modules/SDL2/src/thread/SDL_thread_c.h index 013c75b..278a680 100644 --- a/modules/SDL2/src/thread/SDL_thread_c.h +++ b/modules/SDL2/src/thread/SDL_thread_c.h @@ -66,25 +66,27 @@ struct SDL_Thread SDL_threadID threadid; SYS_ThreadHandle handle; int status; - SDL_atomic_t state; /* SDL_THREAD_STATE_* */ + SDL_atomic_t state; /* SDL_THREAD_STATE_* */ SDL_error errbuf; char *name; - size_t stacksize; /* 0 for default, >0 for user-specified stack size. */ - int (SDLCALL * userfunc) (void *); + size_t stacksize; /* 0 for default, >0 for user-specified stack size. */ + int(SDLCALL *userfunc)(void *); void *userdata; void *data; - void *endfunc; /* only used on some platforms. */ + void *endfunc; /* only used on some platforms. */ }; /* This is the function called to run a thread */ extern void SDL_RunThread(SDL_Thread *thread); /* This is the system-independent thread local storage structure */ -typedef struct { +typedef struct +{ unsigned int limit; - struct { + struct + { void *data; - void (SDLCALL *destructor)(void*); + void(SDLCALL *destructor)(void *); } array[1]; } SDL_TLSData; diff --git a/modules/SDL2/src/thread/generic/SDL_syscond.c b/modules/SDL2/src/thread/generic/SDL_syscond.c index 934383e..a192929 100644 --- a/modules/SDL2/src/thread/generic/SDL_syscond.c +++ b/modules/SDL2/src/thread/generic/SDL_syscond.c @@ -53,12 +53,11 @@ typedef struct SDL_cond_generic } SDL_cond_generic; /* Create a condition variable */ -SDL_cond * -SDL_CreateCond_generic(void) +SDL_cond *SDL_CreateCond_generic(void) { SDL_cond_generic *cond; - cond = (SDL_cond_generic *) SDL_malloc(sizeof(SDL_cond_generic)); + cond = (SDL_cond_generic *)SDL_malloc(sizeof(SDL_cond_generic)); if (cond) { cond->lock = SDL_CreateMutex(); cond->wait_sem = SDL_CreateSemaphore(0); @@ -75,8 +74,7 @@ SDL_CreateCond_generic(void) } /* Destroy a condition variable */ -void -SDL_DestroyCond_generic(SDL_cond * _cond) +void SDL_DestroyCond_generic(SDL_cond *_cond) { SDL_cond_generic *cond = (SDL_cond_generic *)_cond; if (cond) { @@ -94,11 +92,10 @@ SDL_DestroyCond_generic(SDL_cond * _cond) } /* Restart one of the threads that are waiting on the condition variable */ -int -SDL_CondSignal_generic(SDL_cond * _cond) +int SDL_CondSignal_generic(SDL_cond *_cond) { SDL_cond_generic *cond = (SDL_cond_generic *)_cond; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -119,11 +116,10 @@ SDL_CondSignal_generic(SDL_cond * _cond) } /* Restart all threads that are waiting on the condition variable */ -int -SDL_CondBroadcast_generic(SDL_cond * _cond) +int SDL_CondBroadcast_generic(SDL_cond *_cond) { SDL_cond_generic *cond = (SDL_cond_generic *)_cond; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -174,13 +170,12 @@ Thread B: SDL_CondSignal(cond); SDL_UnlockMutex(lock); */ -int -SDL_CondWaitTimeout_generic(SDL_cond * _cond, SDL_mutex * mutex, Uint32 ms) +int SDL_CondWaitTimeout_generic(SDL_cond *_cond, SDL_mutex *mutex, Uint32 ms) { SDL_cond_generic *cond = (SDL_cond_generic *)_cond; int retval; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -230,8 +225,7 @@ SDL_CondWaitTimeout_generic(SDL_cond * _cond, SDL_mutex * mutex, Uint32 ms) } /* Wait on the condition variable forever */ -int -SDL_CondWait_generic(SDL_cond * cond, SDL_mutex * mutex) +int SDL_CondWait_generic(SDL_cond *cond, SDL_mutex *mutex) { return SDL_CondWaitTimeout_generic(cond, mutex, SDL_MUTEX_MAXWAIT); } diff --git a/modules/SDL2/src/thread/generic/SDL_syscond_c.h b/modules/SDL2/src/thread/generic/SDL_syscond_c.h index 04212e6..953f9bc 100644 --- a/modules/SDL2/src/thread/generic/SDL_syscond_c.h +++ b/modules/SDL2/src/thread/generic/SDL_syscond_c.h @@ -27,13 +27,13 @@ #if SDL_THREAD_GENERIC_COND_SUFFIX -SDL_cond * SDL_CreateCond_generic(void); -void SDL_DestroyCond_generic(SDL_cond * cond); -int SDL_CondSignal_generic(SDL_cond * cond); -int SDL_CondBroadcast_generic(SDL_cond * cond); -int SDL_CondWait_generic(SDL_cond * cond, SDL_mutex * mutex); -int SDL_CondWaitTimeout_generic(SDL_cond * cond, - SDL_mutex * mutex, Uint32 ms); +SDL_cond *SDL_CreateCond_generic(void); +void SDL_DestroyCond_generic(SDL_cond *cond); +int SDL_CondSignal_generic(SDL_cond *cond); +int SDL_CondBroadcast_generic(SDL_cond *cond); +int SDL_CondWait_generic(SDL_cond *cond, SDL_mutex *mutex); +int SDL_CondWaitTimeout_generic(SDL_cond *cond, + SDL_mutex *mutex, Uint32 ms); #endif /* SDL_THREAD_GENERIC_COND_SUFFIX */ diff --git a/modules/SDL2/src/thread/generic/SDL_sysmutex.c b/modules/SDL2/src/thread/generic/SDL_sysmutex.c index e852578..daafbb6 100644 --- a/modules/SDL2/src/thread/generic/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/generic/SDL_sysmutex.c @@ -25,7 +25,6 @@ #include "SDL_thread.h" #include "SDL_systhread_c.h" - struct SDL_mutex { int recursive; @@ -34,13 +33,12 @@ struct SDL_mutex }; /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex; /* Allocate mutex memory */ - mutex = (SDL_mutex *) SDL_calloc(1, sizeof(*mutex)); + mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex)); #if !SDL_THREADS_DISABLED if (mutex) { @@ -61,8 +59,7 @@ SDL_CreateMutex(void) } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { if (mutex) { if (mutex->sem) { @@ -73,8 +70,7 @@ SDL_DestroyMutex(SDL_mutex * mutex) } /* Lock the mutex */ -int -SDL_LockMutex(SDL_mutex * mutex) +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; @@ -82,7 +78,7 @@ SDL_LockMutex(SDL_mutex * mutex) SDL_threadID this_thread; if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } this_thread = SDL_ThreadID(); @@ -103,8 +99,7 @@ SDL_LockMutex(SDL_mutex * mutex) } /* try Lock the mutex */ -int -SDL_TryLockMutex(SDL_mutex * mutex) +int SDL_TryLockMutex(SDL_mutex *mutex) { #if SDL_THREADS_DISABLED return 0; @@ -113,7 +108,7 @@ SDL_TryLockMutex(SDL_mutex * mutex) SDL_threadID this_thread; if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } this_thread = SDL_ThreadID(); @@ -136,14 +131,13 @@ SDL_TryLockMutex(SDL_mutex * mutex) } /* Unlock the mutex */ -int -SDL_mutexV(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; #else if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } /* If we don't own the mutex, we can't unlock it */ diff --git a/modules/SDL2/src/thread/generic/SDL_syssem.c b/modules/SDL2/src/thread/generic/SDL_syssem.c index a3c4b2e..fc9794e 100644 --- a/modules/SDL2/src/thread/generic/SDL_syssem.c +++ b/modules/SDL2/src/thread/generic/SDL_syssem.c @@ -26,47 +26,39 @@ #include "SDL_thread.h" #include "SDL_systhread_c.h" - #if SDL_THREADS_DISABLED -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { SDL_SetError("SDL not built with thread support"); - return (SDL_sem *) 0; + return (SDL_sem *)0; } -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem *sem) { } -int -SDL_SemTryWait(SDL_sem * sem) +int SDL_SemTryWait(SDL_sem *sem) { return SDL_SetError("SDL not built with thread support"); } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { return SDL_SetError("SDL not built with thread support"); } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem *sem) { return SDL_SetError("SDL not built with thread support"); } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem *sem) { return 0; } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem *sem) { return SDL_SetError("SDL not built with thread support"); } @@ -81,13 +73,12 @@ struct SDL_semaphore SDL_cond *count_nonzero; }; -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { SDL_sem *sem; - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); - if (!sem) { + sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); + if (sem == NULL) { SDL_OutOfMemory(); return NULL; } @@ -107,8 +98,7 @@ SDL_CreateSemaphore(Uint32 initial_value) /* WARNING: You cannot call this function when another thread is using the semaphore. */ -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem *sem) { if (sem) { sem->count = 0xFFFFFFFF; @@ -126,12 +116,11 @@ SDL_DestroySemaphore(SDL_sem * sem) } } -int -SDL_SemTryWait(SDL_sem * sem) +int SDL_SemTryWait(SDL_sem *sem) { int retval; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -146,12 +135,11 @@ SDL_SemTryWait(SDL_sem * sem) return retval; } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { int retval; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -176,14 +164,12 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) return retval; } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem *sem) { return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem *sem) { Uint32 value; @@ -196,10 +182,9 @@ SDL_SemValue(SDL_sem * sem) return value; } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem *sem) { - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } diff --git a/modules/SDL2/src/thread/generic/SDL_systhread.c b/modules/SDL2/src/thread/generic/SDL_systhread.c index 51c22a2..98c5d65 100644 --- a/modules/SDL2/src/thread/generic/SDL_systhread.c +++ b/modules/SDL2/src/thread/generic/SDL_systhread.c @@ -26,44 +26,37 @@ #include "../SDL_systhread.h" #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD -int -SDL_SYS_CreateThread(SDL_Thread * thread, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread) +int SDL_SYS_CreateThread(SDL_Thread *thread, + pfnSDL_CurrentBeginThread pfnBeginThread, + pfnSDL_CurrentEndThread pfnEndThread) #else -int -SDL_SYS_CreateThread(SDL_Thread * thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) #endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */ { return SDL_SetError("Threads are not supported on this platform"); } -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { return; } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { - return (0); + return 0; } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { - return (0); + return 0; } -void -SDL_SYS_WaitThread(SDL_Thread * thread) +void SDL_SYS_WaitThread(SDL_Thread *thread) { return; } -void -SDL_SYS_DetachThread(SDL_Thread * thread) +void SDL_SYS_DetachThread(SDL_Thread *thread) { return; } diff --git a/modules/SDL2/src/thread/generic/SDL_systls.c b/modules/SDL2/src/thread/generic/SDL_systls.c index fa4f230..612ad37 100644 --- a/modules/SDL2/src/thread/generic/SDL_systls.c +++ b/modules/SDL2/src/thread/generic/SDL_systls.c @@ -22,15 +22,12 @@ #include "../../SDL_internal.h" #include "../SDL_thread_c.h" - -SDL_TLSData * -SDL_SYS_GetTLSData(void) +SDL_TLSData *SDL_SYS_GetTLSData(void) { return SDL_Generic_GetTLSData(); } -int -SDL_SYS_SetTLSData(SDL_TLSData *data) +int SDL_SYS_SetTLSData(SDL_TLSData *data) { return SDL_Generic_SetTLSData(data); } diff --git a/modules/SDL2/src/thread/n3ds/SDL_syscond.c b/modules/SDL2/src/thread/n3ds/SDL_syscond.c index fff6691..05e0462 100644 --- a/modules/SDL2/src/thread/n3ds/SDL_syscond.c +++ b/modules/SDL2/src/thread/n3ds/SDL_syscond.c @@ -32,10 +32,9 @@ struct SDL_cond }; /* Create a condition variable */ -SDL_cond * -SDL_CreateCond(void) +SDL_cond *SDL_CreateCond(void) { - SDL_cond *cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond)); + SDL_cond *cond = (SDL_cond *)SDL_malloc(sizeof(SDL_cond)); if (cond) { CondVar_Init(&cond->cond_variable); } else { @@ -45,8 +44,7 @@ SDL_CreateCond(void) } /* Destroy a condition variable */ -void -SDL_DestroyCond(SDL_cond *cond) +void SDL_DestroyCond(SDL_cond *cond) { if (cond) { SDL_free(cond); @@ -54,11 +52,10 @@ SDL_DestroyCond(SDL_cond *cond) } /* Restart one of the threads that are waiting on the condition variable */ -int -SDL_CondSignal(SDL_cond *cond) +int SDL_CondSignal(SDL_cond *cond) { - if (!cond) { - return SDL_SetError("Passed a NULL condition variable"); + if (cond == NULL) { + return SDL_InvalidParamError("cond"); } CondVar_Signal(&cond->cond_variable); @@ -66,11 +63,10 @@ SDL_CondSignal(SDL_cond *cond) } /* Restart all threads that are waiting on the condition variable */ -int -SDL_CondBroadcast(SDL_cond *cond) +int SDL_CondBroadcast(SDL_cond *cond) { - if (!cond) { - return SDL_SetError("Passed a NULL condition variable"); + if (cond == NULL) { + return SDL_InvalidParamError("cond"); } CondVar_Broadcast(&cond->cond_variable); @@ -98,16 +94,15 @@ Thread B: SDL_CondSignal(cond); SDL_UnlockMutex(lock); */ -int -SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) +int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { Result res; - if (!cond) { - return SDL_SetError("Passed a NULL condition variable"); + if (cond == NULL) { + return SDL_InvalidParamError("cond"); } - if (!mutex) { - return SDL_SetError("Passed a NULL mutex"); + if (mutex == NULL) { + return SDL_InvalidParamError("mutex"); } res = 0; @@ -115,15 +110,14 @@ SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) CondVar_Wait(&cond->cond_variable, &mutex->lock.lock); } else { res = CondVar_WaitTimeout(&cond->cond_variable, &mutex->lock.lock, - (s64) ms * 1000000LL); + (s64)ms * 1000000LL); } return R_SUCCEEDED(res) ? 0 : SDL_MUTEX_TIMEDOUT; } /* Wait on the condition variable forever */ -int -SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) +int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT); } diff --git a/modules/SDL2/src/thread/n3ds/SDL_sysmutex.c b/modules/SDL2/src/thread/n3ds/SDL_sysmutex.c index 825f406..09e0e0a 100644 --- a/modules/SDL2/src/thread/n3ds/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/n3ds/SDL_sysmutex.c @@ -27,13 +27,12 @@ #include "SDL_sysmutex_c.h" /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex; /* Allocate mutex memory */ - mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex)); + mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex)); if (mutex) { RecursiveLock_Init(&mutex->lock); } else { @@ -43,8 +42,7 @@ SDL_CreateMutex(void) } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex *mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { if (mutex) { SDL_free(mutex); @@ -52,11 +50,10 @@ SDL_DestroyMutex(SDL_mutex *mutex) } /* Lock the mutex */ -int -SDL_LockMutex(SDL_mutex *mutex) +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { if (mutex == NULL) { - return SDL_SetError("Passed a NULL mutex"); + return 0; } RecursiveLock_Lock(&mutex->lock); @@ -65,22 +62,20 @@ SDL_LockMutex(SDL_mutex *mutex) } /* try Lock the mutex */ -int -SDL_TryLockMutex(SDL_mutex *mutex) +int SDL_TryLockMutex(SDL_mutex *mutex) { if (mutex == NULL) { - return SDL_SetError("Passed a NULL mutex"); + return 0; } return RecursiveLock_TryLock(&mutex->lock); } /* Unlock the mutex */ -int -SDL_mutexV(SDL_mutex *mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { if (mutex == NULL) { - return SDL_SetError("Passed a NULL mutex"); + return 0; } RecursiveLock_Unlock(&mutex->lock); diff --git a/modules/SDL2/src/thread/n3ds/SDL_syssem.c b/modules/SDL2/src/thread/n3ds/SDL_syssem.c index 975875c..e7615e4 100644 --- a/modules/SDL2/src/thread/n3ds/SDL_syssem.c +++ b/modules/SDL2/src/thread/n3ds/SDL_syssem.c @@ -27,14 +27,16 @@ #include <3ds.h> #include "SDL_thread.h" +#include "SDL_timer.h" + +int WaitOnSemaphoreFor(SDL_sem *sem, Uint32 timeout); struct SDL_semaphore { LightSemaphore semaphore; }; -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { SDL_sem *sem; @@ -43,8 +45,8 @@ SDL_CreateSemaphore(Uint32 initial_value) return NULL; } - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); - if (!sem) { + sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); + if (sem == NULL) { SDL_OutOfMemory(); return NULL; } @@ -57,73 +59,80 @@ SDL_CreateSemaphore(Uint32 initial_value) /* WARNING: You cannot call this function when another thread is using the semaphore. */ -void -SDL_DestroySemaphore(SDL_sem *sem) +void SDL_DestroySemaphore(SDL_sem *sem) { - if (sem) { - SDL_free(sem); - } + SDL_free(sem); } -int -SDL_SemTryWait(SDL_sem *sem) +int SDL_SemTryWait(SDL_sem *sem) { - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); + if (sem == NULL) { + return SDL_InvalidParamError("sem"); + } + + if (LightSemaphore_TryAcquire(&sem->semaphore, 1) != 0) { + /* If we failed, yield to avoid starvation on busy waits */ + svcSleepThread(1); + return SDL_MUTEX_TIMEDOUT; } - return SDL_SemWaitTimeout(sem, 0); + return 0; } -int -SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { - int retval; - - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); + if (sem == NULL) { + return SDL_InvalidParamError("sem"); } if (timeout == SDL_MUTEX_MAXWAIT) { LightSemaphore_Acquire(&sem->semaphore, 1); - retval = 0; - } else { - int return_code = LightSemaphore_TryAcquire(&sem->semaphore, 1); - if (return_code != 0) { - for (u32 i = 0; i < timeout; i++) { - svcSleepThread(1000000LL); - return_code = LightSemaphore_TryAcquire(&sem->semaphore, 1); - if (return_code == 0) { - break; - } - } + return 0; + } + + if (LightSemaphore_TryAcquire(&sem->semaphore, 1) != 0) { + return WaitOnSemaphoreFor(sem, timeout); + } + + return 0; +} + +int WaitOnSemaphoreFor(SDL_sem *sem, Uint32 timeout) +{ + Uint64 stop_time = SDL_GetTicks64() + timeout; + Uint64 current_time = SDL_GetTicks64(); + while (current_time < stop_time) { + if (LightSemaphore_TryAcquire(&sem->semaphore, 1) == 0) { + return 0; } - retval = return_code != 0 ? SDL_MUTEX_TIMEDOUT : 0; + /* 100 microseconds seems to be the sweet spot */ + svcSleepThread(100000LL); + current_time = SDL_GetTicks64(); } - return retval; + /* If we failed, yield to avoid starvation on busy waits */ + svcSleepThread(1); + return SDL_MUTEX_TIMEDOUT; } -int -SDL_SemWait(SDL_sem *sem) +int SDL_SemWait(SDL_sem *sem) { return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); } -Uint32 -SDL_SemValue(SDL_sem *sem) +Uint32 SDL_SemValue(SDL_sem *sem) { - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); + if (sem == NULL) { + SDL_InvalidParamError("sem"); + return 0; } return sem->semaphore.current_count; } -int -SDL_SemPost(SDL_sem *sem) +int SDL_SemPost(SDL_sem *sem) { - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); + if (sem == NULL) { + return SDL_InvalidParamError("sem"); } LightSemaphore_Release(&sem->semaphore, 1); return 0; diff --git a/modules/SDL2/src/thread/n3ds/SDL_systhread.c b/modules/SDL2/src/thread/n3ds/SDL_systhread.c index cadcdb5..4dfb8fc 100644 --- a/modules/SDL2/src/thread/n3ds/SDL_systhread.c +++ b/modules/SDL2/src/thread/n3ds/SDL_systhread.c @@ -37,10 +37,9 @@ static size_t GetStackSize(size_t requested_size); -static void -ThreadEntry(void *arg) +static void ThreadEntry(void *arg) { - SDL_RunThread((SDL_Thread *) arg); + SDL_RunThread((SDL_Thread *)arg); threadExit(0); } @@ -48,11 +47,11 @@ ThreadEntry(void *arg) #error "SDL_PASSED_BEGINTHREAD_ENDTHREAD is not supported on N3DS" #endif -int -SDL_SYS_CreateThread(SDL_Thread *thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) { - s32 priority = N3DS_THREAD_PRIORITY_MEDIUM; + s32 priority; size_t stack_size = GetStackSize(thread->stacksize); + svcGetThreadPriority(&priority, CUR_THREAD_HANDLE); thread->handle = threadCreate(ThreadEntry, thread, @@ -68,8 +67,7 @@ SDL_SYS_CreateThread(SDL_Thread *thread) return 0; } -static size_t -GetStackSize(size_t requested_size) +static size_t GetStackSize(size_t requested_size) { if (requested_size == 0) { return N3DS_THREAD_STACK_SIZE_DEFAULT; @@ -86,22 +84,19 @@ GetStackSize(size_t requested_size) return requested_size; } -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { return; } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { u32 thread_ID = 0; svcGetThreadId(&thread_ID, CUR_THREAD_HANDLE); - return (SDL_threadID) thread_ID; + return (SDL_threadID)thread_ID; } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority sdl_priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority sdl_priority) { s32 svc_priority; switch (sdl_priority) { @@ -120,11 +115,10 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority sdl_priority) default: svc_priority = N3DS_THREAD_PRIORITY_MEDIUM; } - return (int) svcSetThreadPriority(CUR_THREAD_HANDLE, svc_priority); + return (int)svcSetThreadPriority(CUR_THREAD_HANDLE, svc_priority); } -void -SDL_SYS_WaitThread(SDL_Thread *thread) +void SDL_SYS_WaitThread(SDL_Thread *thread) { Result res = threadJoin(thread->handle, U64_MAX); @@ -137,8 +131,7 @@ SDL_SYS_WaitThread(SDL_Thread *thread) } } -void -SDL_SYS_DetachThread(SDL_Thread *thread) +void SDL_SYS_DetachThread(SDL_Thread *thread) { threadDetach(thread->handle); } diff --git a/modules/SDL2/src/thread/ngage/SDL_sysmutex.cpp b/modules/SDL2/src/thread/ngage/SDL_sysmutex.cpp index 92ff9f9..7261704 100644 --- a/modules/SDL2/src/thread/ngage/SDL_sysmutex.cpp +++ b/modules/SDL2/src/thread/ngage/SDL_sysmutex.cpp @@ -32,90 +32,81 @@ struct SDL_mutex TInt handle; }; -extern TInt CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny*, TAny*); +extern TInt CreateUnique(TInt (*aFunc)(const TDesC &aName, TAny *, TAny *), TAny *, TAny *); -static TInt NewMutex(const TDesC& aName, TAny* aPtr1, TAny*) +static TInt NewMutex(const TDesC &aName, TAny *aPtr1, TAny *) { - return ((RMutex*)aPtr1)->CreateGlobal(aName); + return ((RMutex *)aPtr1)->CreateGlobal(aName); } /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { RMutex rmutex; TInt status = CreateUnique(NewMutex, &rmutex, NULL); - if(status != KErrNone) - { + if (status != KErrNone) { SDL_SetError("Couldn't create mutex."); + return NULL; } - SDL_mutex* mutex = new /*(ELeave)*/ SDL_mutex; + SDL_mutex *mutex = new /*(ELeave)*/ SDL_mutex; mutex->handle = rmutex.Handle(); - return(mutex); + return mutex; } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { - if (mutex) - { + if (mutex) { RMutex rmutex; rmutex.SetHandle(mutex->handle); rmutex.Signal(); rmutex.Close(); - delete(mutex); + delete (mutex); mutex = NULL; } } -/* Try to lock the mutex */ -#if 0 -int -SDL_TryLockMutex(SDL_mutex * mutex) +/* Lock the mutex */ +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { - if (mutex == NULL) - { - SDL_SetError("Passed a NULL mutex."); - return -1; + if (mutex == NULL) { + return 0; } - // Not yet implemented. + RMutex rmutex; + rmutex.SetHandle(mutex->handle); + rmutex.Wait(); + return 0; } -#endif -/* Lock the mutex */ -int -SDL_LockMutex(SDL_mutex * mutex) +/* Try to lock the mutex */ +#if 0 +int SDL_TryLockMutex(SDL_mutex *mutex) { if (mutex == NULL) { - return SDL_SetError("Passed a NULL mutex."); + return 0; } - RMutex rmutex; - rmutex.SetHandle(mutex->handle); - rmutex.Wait(); - - return(0); + // Not yet implemented. + return 0; } +#endif /* Unlock the mutex */ -int -SDL_UnlockMutex(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { - if ( mutex == NULL ) - { - return SDL_SetError("Passed a NULL mutex."); + if (mutex == NULL) { + return 0; } RMutex rmutex; rmutex.SetHandle(mutex->handle); rmutex.Signal(); - return(0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/thread/ngage/SDL_syssem.cpp b/modules/SDL2/src/thread/ngage/SDL_syssem.cpp index ee72c96..20133c6 100644 --- a/modules/SDL2/src/thread/ngage/SDL_syssem.cpp +++ b/modules/SDL2/src/thread/ngage/SDL_syssem.cpp @@ -37,18 +37,17 @@ struct SDL_semaphore struct TInfo { - TInfo(TInt aTime, TInt aHandle) : - iTime(aTime), iHandle(aHandle), iVal(0) {} + TInfo(TInt aTime, TInt aHandle) : iTime(aTime), iHandle(aHandle), iVal(0) {} TInt iTime; TInt iHandle; TInt iVal; }; -extern TInt CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny*, TAny*); +extern TInt CreateUnique(TInt (*aFunc)(const TDesC &aName, TAny *, TAny *), TAny *, TAny *); -static TBool RunThread(TAny* aInfo) +static TBool RunThread(TAny *aInfo) { - TInfo* info = STATIC_CAST(TInfo*, aInfo); + TInfo *info = STATIC_CAST(TInfo *, aInfo); User::After(info->iTime); RSemaphore sema; sema.SetHandle(info->iHandle); @@ -57,21 +56,15 @@ static TBool RunThread(TAny* aInfo) return 0; } -static TInt -NewThread(const TDesC& aName, TAny* aPtr1, TAny* aPtr2) +static TInt NewThread(const TDesC &aName, TAny *aPtr1, TAny *aPtr2) { - return ((RThread*)(aPtr1))->Create - (aName, - RunThread, - KDefaultStackSize, - NULL, - aPtr2); + return ((RThread *)(aPtr1))->Create(aName, RunThread, KDefaultStackSize, NULL, aPtr2); } -static TInt NewSema(const TDesC& aName, TAny* aPtr1, TAny* aPtr2) +static TInt NewSema(const TDesC &aName, TAny *aPtr1, TAny *aPtr2) { - TInt value = *((TInt*) aPtr2); - return ((RSemaphore*)aPtr1)->CreateGlobal(aName, value); + TInt value = *((TInt *)aPtr2); + return ((RSemaphore *)aPtr1)->CreateGlobal(aName, value); } static void WaitAll(SDL_sem *sem) @@ -79,32 +72,27 @@ static void WaitAll(SDL_sem *sem) RSemaphore sema; sema.SetHandle(sem->handle); sema.Wait(); - while(sem->count < 0) - { + while (sem->count < 0) { sema.Wait(); } } -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { RSemaphore s; TInt status = CreateUnique(NewSema, &s, &initial_value); - if(status != KErrNone) - { + if (status != KErrNone) { SDL_SetError("Couldn't create semaphore"); } - SDL_semaphore* sem = new /*(ELeave)*/ SDL_semaphore; + SDL_semaphore *sem = new /*(ELeave)*/ SDL_semaphore; sem->handle = s.Handle(); sem->count = initial_value; - return(sem); + return sem; } -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem *sem) { - if (sem) - { + if (sem != NULL) { RSemaphore sema; sema.SetHandle(sem->handle); sema.Signal(sema.Count()); @@ -114,34 +102,29 @@ SDL_DestroySemaphore(SDL_sem * sem) } } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { - if (! sem) - { - return SDL_SetError("Passed a NULL sem"); + if (sem == NULL) { + return SDL_InvalidParamError("sem"); } - if (timeout == SDL_MUTEX_MAXWAIT) - { + if (timeout == SDL_MUTEX_MAXWAIT) { WaitAll(sem); return SDL_MUTEX_MAXWAIT; } RThread thread; - TInfo* info = new (ELeave)TInfo(timeout, sem->handle); - TInt status = CreateUnique(NewThread, &thread, info); + TInfo *info = new (ELeave) TInfo(timeout, sem->handle); + TInt status = CreateUnique(NewThread, &thread, info); - if(status != KErrNone) - { + if (status != KErrNone) { return status; } thread.Resume(); WaitAll(sem); - if(thread.ExitType() == EExitPending) - { + if (thread.ExitType() == EExitPending) { thread.Kill(SDL_MUTEX_TIMEOUT); } @@ -149,39 +132,36 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) return info->iVal; } -int -SDL_SemTryWait(SDL_sem *sem) +int SDL_SemTryWait(SDL_sem *sem) { - if(sem->count > 0) - { + if (sem == NULL) { + return SDL_InvalidParamError("sem"); + } + + if (sem->count > 0) { sem->count--; } return SDL_MUTEX_TIMEOUT; } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem *sem) { return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem *sem) { - if (! sem) - { - SDL_SetError("Passed a NULL sem."); + if (sem == NULL) { + SDL_InvalidParamError("sem"); return 0; } return sem->count; } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem *sem) { - if (! sem) - { - return SDL_SetError("Passed a NULL sem."); + if (sem == NULL) { + return SDL_InvalidParamError("sem"); } sem->count++; RSemaphore sema; diff --git a/modules/SDL2/src/thread/ngage/SDL_systhread.cpp b/modules/SDL2/src/thread/ngage/SDL_systhread.cpp index e8c728f..fb2958d 100644 --- a/modules/SDL2/src/thread/ngage/SDL_systhread.cpp +++ b/modules/SDL2/src/thread/ngage/SDL_systhread.cpp @@ -36,85 +36,67 @@ extern "C" { static int object_count; -static int -RunThread(TAny* data) +static int RunThread(TAny *data) { - SDL_RunThread((SDL_Thread*)data); - return(0); + SDL_RunThread((SDL_Thread *)data); + return 0; } -static TInt -NewThread(const TDesC& aName, TAny* aPtr1, TAny* aPtr2) +static TInt NewThread(const TDesC &aName, TAny *aPtr1, TAny *aPtr2) { - return ((RThread*)(aPtr1))->Create - (aName, - RunThread, - KDefaultStackSize, - NULL, - aPtr2); + return ((RThread *)(aPtr1))->Create(aName, RunThread, KDefaultStackSize, NULL, aPtr2); } -int -CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny* aPtr1, TAny* aPtr2) +int CreateUnique(TInt (*aFunc)(const TDesC &aName, TAny *, TAny *), TAny *aPtr1, TAny *aPtr2) { TBuf<16> name; - TInt status = KErrNone; - do - { + TInt status = KErrNone; + do { object_count++; name.Format(_L("SDL_%x"), object_count); status = aFunc(name, aPtr1, aPtr2); - } - while(status == KErrAlreadyExists); + } while (status == KErrAlreadyExists); return status; } -int -SDL_SYS_CreateThread(SDL_Thread *thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) { RThread rthread; TInt status = CreateUnique(NewThread, &rthread, thread); - if (status != KErrNone) - { - delete(((RThread*)(thread->handle))); + if (status != KErrNone) { + delete (RThread *)thread->handle; thread->handle = NULL; - SDL_SetError("Not enough resources to create thread"); - return(-1); + return SDL_SetError("Not enough resources to create thread"); } rthread.Resume(); thread->handle = rthread.Handle(); - return(0); + return 0; } -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { return; } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { - RThread current; + RThread current; TThreadId id = current.Id(); return id; } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { - return (0); + return 0; } -void -SDL_SYS_WaitThread(SDL_Thread * thread) +void SDL_SYS_WaitThread(SDL_Thread *thread) { RThread t; t.Open(thread->threadid); - if(t.ExitReason() == EExitPending) - { + if (t.ExitReason() == EExitPending) { TRequestStatus status; t.Logon(status); User::WaitForRequest(status); @@ -122,8 +104,7 @@ SDL_SYS_WaitThread(SDL_Thread * thread) t.Close(); } -void -SDL_SYS_DetachThread(SDL_Thread * thread) +void SDL_SYS_DetachThread(SDL_Thread *thread) { return; } diff --git a/modules/SDL2/src/thread/os2/SDL_sysmutex.c b/modules/SDL2/src/thread/os2/SDL_sysmutex.c index 9193290..4a7f6e8 100644 --- a/modules/SDL2/src/thread/os2/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/os2/SDL_sysmutex.c @@ -37,8 +37,7 @@ struct SDL_mutex { }; /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { ULONG ulRC; HMTX hMtx; @@ -53,8 +52,7 @@ SDL_CreateMutex(void) } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex * mutex) { HMTX hMtx = (HMTX)mutex; if (hMtx != NULLHANDLE) { @@ -66,14 +64,13 @@ SDL_DestroyMutex(SDL_mutex * mutex) } /* Lock the mutex */ -int -SDL_LockMutex(SDL_mutex * mutex) +int SDL_LockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { ULONG ulRC; HMTX hMtx = (HMTX)mutex; if (hMtx == NULLHANDLE) - return SDL_InvalidParamError("mutex"); + return 0; ulRC = DosRequestMutexSem(hMtx, SEM_INDEFINITE_WAIT); if (ulRC != NO_ERROR) { @@ -85,14 +82,13 @@ SDL_LockMutex(SDL_mutex * mutex) } /* try Lock the mutex */ -int -SDL_TryLockMutex(SDL_mutex * mutex) +int SDL_TryLockMutex(SDL_mutex * mutex) { ULONG ulRC; HMTX hMtx = (HMTX)mutex; if (hMtx == NULLHANDLE) - return SDL_InvalidParamError("mutex"); + return 0; ulRC = DosRequestMutexSem(hMtx, SEM_IMMEDIATE_RETURN); @@ -108,14 +104,13 @@ SDL_TryLockMutex(SDL_mutex * mutex) } /* Unlock the mutex */ -int -SDL_UnlockMutex(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { ULONG ulRC; HMTX hMtx = (HMTX)mutex; if (hMtx == NULLHANDLE) - return SDL_InvalidParamError("mutex"); + return 0; ulRC = DosReleaseMutexSem(hMtx); if (ulRC != NO_ERROR) diff --git a/modules/SDL2/src/thread/os2/SDL_syssem.c b/modules/SDL2/src/thread/os2/SDL_syssem.c index 3c9cdbd..407867d 100644 --- a/modules/SDL2/src/thread/os2/SDL_syssem.c +++ b/modules/SDL2/src/thread/os2/SDL_syssem.c @@ -39,8 +39,7 @@ struct SDL_semaphore { }; -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { ULONG ulRC; SDL_sem *pSDLSem = SDL_malloc(sizeof(SDL_sem)); @@ -70,8 +69,7 @@ SDL_CreateSemaphore(Uint32 initial_value) return pSDLSem; } -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem * sem) { if (!sem) return; @@ -80,8 +78,7 @@ SDL_DestroySemaphore(SDL_sem * sem) SDL_free(sem); } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) { ULONG ulRC; ULONG ulStartTime, ulCurTime; @@ -129,20 +126,17 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) return 0; } -int -SDL_SemTryWait(SDL_sem * sem) +int SDL_SemTryWait(SDL_sem * sem) { return SDL_SemWaitTimeout(sem, 0); } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem * sem) { return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem * sem) { ULONG ulRC; @@ -161,8 +155,7 @@ SDL_SemValue(SDL_sem * sem) return ulRC; } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem * sem) { ULONG ulRC; diff --git a/modules/SDL2/src/thread/os2/SDL_systhread.c b/modules/SDL2/src/thread/os2/SDL_systhread.c index 69296ff..b255589 100644 --- a/modules/SDL2/src/thread/os2/SDL_systhread.c +++ b/modules/SDL2/src/thread/os2/SDL_systhread.c @@ -54,8 +54,7 @@ static void RunThread(void *data) pfnEndThread(); } -int -SDL_SYS_CreateThread(SDL_Thread * thread, +int SDL_SYS_CreateThread(SDL_Thread * thread, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) { @@ -80,14 +79,12 @@ SDL_SYS_CreateThread(SDL_Thread * thread, return 0; } -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { /* nothing. */ } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { PTIB tib; PPIB pib; @@ -96,8 +93,7 @@ SDL_ThreadID(void) return tib->tib_ptib2->tib2_ultid; } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { ULONG ulRC; @@ -112,8 +108,7 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) return 0; } -void -SDL_SYS_WaitThread(SDL_Thread * thread) +void SDL_SYS_WaitThread(SDL_Thread * thread) { ULONG ulRC = DosWaitThread((PTID)&thread->handle, DCWW_WAIT); @@ -122,8 +117,7 @@ SDL_SYS_WaitThread(SDL_Thread * thread) } } -void -SDL_SYS_DetachThread(SDL_Thread * thread) +void SDL_SYS_DetachThread(SDL_Thread * thread) { /* nothing. */ } diff --git a/modules/SDL2/src/thread/ps2/SDL_syssem.c b/modules/SDL2/src/thread/ps2/SDL_syssem.c index 6b49f3b..bba13a5 100644 --- a/modules/SDL2/src/thread/ps2/SDL_syssem.c +++ b/modules/SDL2/src/thread/ps2/SDL_syssem.c @@ -33,11 +33,13 @@ #include -struct SDL_semaphore { - s32 semid; +struct SDL_semaphore +{ + s32 semid; }; -static void usercb(struct timer_alarm_t *alarm, void *arg) { +static void usercb(struct timer_alarm_t *alarm, void *arg) +{ iReleaseWaitThread((int)arg); } @@ -47,12 +49,12 @@ SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) SDL_sem *sem; ee_sema_t sema; - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); + sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); if (sem != NULL) { /* TODO: Figure out the limit on the maximum value. */ sema.init_count = initial_value; - sema.max_count = 255; - sema.option = 0; + sema.max_count = 255; + sema.option = 0; sem->semid = CreateSema(&sema); if (sem->semid < 0) { @@ -85,10 +87,9 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) int ret; struct timer_alarm_t alarm; InitializeTimerAlarm(&alarm); - + if (sem == NULL) { - SDL_InvalidParamError("sem"); - return 0; + return SDL_InvalidParamError("sem"); } if (timeout == 0) { @@ -105,9 +106,10 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) ret = WaitSema(sem->semid); StopTimerAlarm(&alarm); - if (ret < 0) + if (ret < 0) { return SDL_MUTEX_TIMEDOUT; - return 0; //Wait condition satisfied. + } + return 0; // Wait condition satisfied. } int SDL_SemTryWait(SDL_sem *sem) diff --git a/modules/SDL2/src/thread/ps2/SDL_systhread.c b/modules/SDL2/src/thread/ps2/SDL_systhread.c index b87b889..3d2f685 100644 --- a/modules/SDL2/src/thread/ps2/SDL_systhread.c +++ b/modules/SDL2/src/thread/ps2/SDL_systhread.c @@ -33,7 +33,8 @@ #include "../SDL_thread_c.h" #include -static void FinishThread(SDL_Thread *thread) { +static void FinishThread(SDL_Thread *thread) +{ ee_thread_status_t info; int res; @@ -69,18 +70,17 @@ int SDL_SYS_CreateThread(SDL_Thread *thread) priority = status.current_priority; } - stack_size = thread->stacksize ? ((int) thread->stacksize) : 0x1800; - + stack_size = thread->stacksize ? ((int)thread->stacksize) : 0x1800; /* Create EE Thread */ - eethread.attr = 0; - eethread.option = 0; - eethread.func = &childThread; - eethread.stack = SDL_malloc(stack_size); - eethread.stack_size = stack_size; - eethread.gp_reg = &_gp; - eethread.initial_priority = priority; - thread->handle = CreateThread(&eethread); + eethread.attr = 0; + eethread.option = 0; + eethread.func = &childThread; + eethread.stack = SDL_malloc(stack_size); + eethread.stack_size = stack_size; + eethread.gp_reg = &_gp; + eethread.initial_priority = priority; + thread->handle = CreateThread(&eethread); if (thread->handle < 0) { return SDL_SetError("CreateThread() failed"); @@ -88,8 +88,8 @@ int SDL_SYS_CreateThread(SDL_Thread *thread) // Prepare el semaphore for the ending function sema.init_count = 0; - sema.max_count = 1; - sema.option = 0; + sema.max_count = 1; + sema.option = 0; thread->endfunc = (void *)CreateSema(&sema); return StartThread(thread->handle, thread); @@ -102,7 +102,7 @@ void SDL_SYS_SetupThread(const char *name) SDL_threadID SDL_ThreadID(void) { - return (SDL_threadID) GetThreadId(); + return (SDL_threadID)GetThreadId(); } void SDL_SYS_WaitThread(SDL_Thread *thread) @@ -131,7 +131,7 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) value = 50; } - return ChangeThreadPriority(GetThreadId(),value); + return ChangeThreadPriority(GetThreadId(), value); } #endif /* SDL_THREAD_PS2 */ diff --git a/modules/SDL2/src/thread/psp/SDL_syscond.c b/modules/SDL2/src/thread/psp/SDL_syscond.c index 00368e7..a16187c 100644 --- a/modules/SDL2/src/thread/psp/SDL_syscond.c +++ b/modules/SDL2/src/thread/psp/SDL_syscond.c @@ -40,12 +40,11 @@ struct SDL_cond }; /* Create a condition variable */ -SDL_cond * -SDL_CreateCond(void) +SDL_cond *SDL_CreateCond(void) { SDL_cond *cond; - cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond)); + cond = (SDL_cond *)SDL_malloc(sizeof(SDL_cond)); if (cond) { cond->lock = SDL_CreateMutex(); cond->wait_sem = SDL_CreateSemaphore(0); @@ -58,12 +57,11 @@ SDL_CreateCond(void) } else { SDL_OutOfMemory(); } - return (cond); + return cond; } /* Destroy a condition variable */ -void -SDL_DestroyCond(SDL_cond * cond) +void SDL_DestroyCond(SDL_cond *cond) { if (cond) { if (cond->wait_sem) { @@ -80,10 +78,9 @@ SDL_DestroyCond(SDL_cond * cond) } /* Restart one of the threads that are waiting on the condition variable */ -int -SDL_CondSignal(SDL_cond * cond) +int SDL_CondSignal(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -104,10 +101,9 @@ SDL_CondSignal(SDL_cond * cond) } /* Restart all threads that are waiting on the condition variable */ -int -SDL_CondBroadcast(SDL_cond * cond) +int SDL_CondBroadcast(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -158,12 +154,11 @@ Thread B: SDL_CondSignal(cond); SDL_UnlockMutex(lock); */ -int -SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) +int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { int retval; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -213,8 +208,7 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) } /* Wait on the condition variable forever */ -int -SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex) +int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT); } diff --git a/modules/SDL2/src/thread/psp/SDL_sysmutex.c b/modules/SDL2/src/thread/psp/SDL_sysmutex.c index 2152328..3b3cf37 100644 --- a/modules/SDL2/src/thread/psp/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/psp/SDL_sysmutex.c @@ -38,14 +38,13 @@ struct SDL_mutex }; /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex = NULL; SceInt32 res = 0; /* Allocate mutex memory */ - mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex)); + mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex)); if (mutex) { res = sceKernelCreateLwMutex( @@ -53,8 +52,7 @@ SDL_CreateMutex(void) "SDL mutex", SCE_KERNEL_MUTEX_ATTR_RECURSIVE, 0, - NULL - ); + NULL); if (res < 0) { SDL_SetError("Error trying to create mutex: %lx", res); @@ -66,8 +64,7 @@ SDL_CreateMutex(void) } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { if (mutex) { sceKernelDeleteLwMutex(&mutex->lock); @@ -75,60 +72,58 @@ SDL_DestroyMutex(SDL_mutex * mutex) } } -/* Try to lock the mutex */ -int -SDL_TryLockMutex(SDL_mutex * mutex) +/* Lock the mutex */ +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; #else SceInt32 res = 0; + if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } - res = sceKernelTryLockLwMutex(&mutex->lock, 1); - switch (res) { - case SCE_KERNEL_ERROR_OK: - return 0; - break; - case SCE_KERNEL_ERROR_WAIT_TIMEOUT: - return SDL_MUTEX_TIMEDOUT; - break; - default: - return SDL_SetError("Error trying to lock mutex: %lx", res); - break; + res = sceKernelLockLwMutex(&mutex->lock, 1, NULL); + if (res != SCE_KERNEL_ERROR_OK) { + return SDL_SetError("Error trying to lock mutex: %lx", res); } - return -1; + return 0; #endif /* SDL_THREADS_DISABLED */ } - -/* Lock the mutex */ -int -SDL_mutexP(SDL_mutex * mutex) +/* Try to lock the mutex */ +int SDL_TryLockMutex(SDL_mutex *mutex) { #if SDL_THREADS_DISABLED return 0; #else SceInt32 res = 0; + if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } - res = sceKernelLockLwMutex(&mutex->lock, 1, NULL); - if (res != SCE_KERNEL_ERROR_OK) { + res = sceKernelTryLockLwMutex(&mutex->lock, 1); + switch (res) { + case SCE_KERNEL_ERROR_OK: + return 0; + break; + case SCE_KERNEL_ERROR_WAIT_TIMEOUT: + return SDL_MUTEX_TIMEDOUT; + break; + default: return SDL_SetError("Error trying to lock mutex: %lx", res); + break; } - return 0; + return -1; #endif /* SDL_THREADS_DISABLED */ } /* Unlock the mutex */ -int -SDL_mutexV(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; @@ -136,7 +131,7 @@ SDL_mutexV(SDL_mutex * mutex) SceInt32 res = 0; if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } res = sceKernelUnlockLwMutex(&mutex->lock, 1); @@ -147,6 +142,7 @@ SDL_mutexV(SDL_mutex * mutex) return 0; #endif /* SDL_THREADS_DISABLED */ } + #endif /* SDL_THREAD_PSP */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/thread/psp/SDL_syssem.c b/modules/SDL2/src/thread/psp/SDL_syssem.c index 2e20ed7..131f6b7 100644 --- a/modules/SDL2/src/thread/psp/SDL_syssem.c +++ b/modules/SDL2/src/thread/psp/SDL_syssem.c @@ -33,17 +33,17 @@ #include #include -struct SDL_semaphore { - SceUID semid; +struct SDL_semaphore +{ + SceUID semid; }; - /* Create a semaphore */ SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { SDL_sem *sem; - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); + sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); if (sem != NULL) { /* TODO: Figure out the limit on the maximum value. */ sem->semid = sceKernelCreateSema("SDL sema", 0, initial_value, 255, NULL); @@ -82,8 +82,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) int res; if (sem == NULL) { - SDL_InvalidParamError("sem"); - return 0; + return SDL_InvalidParamError("sem"); } if (timeout == 0) { @@ -97,18 +96,18 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) if (timeout == SDL_MUTEX_MAXWAIT) { pTimeout = NULL; } else { - timeout *= 1000; /* Convert to microseconds. */ + timeout *= 1000; /* Convert to microseconds. */ pTimeout = &timeout; } - res = sceKernelWaitSema(sem->semid, 1, (SceUInt *) pTimeout); - switch (res) { - case SCE_KERNEL_ERROR_OK: - return 0; - case SCE_KERNEL_ERROR_WAIT_TIMEOUT: - return SDL_MUTEX_TIMEDOUT; - default: - return SDL_SetError("sceKernelWaitSema() failed"); + res = sceKernelWaitSema(sem->semid, 1, (SceUInt *)pTimeout); + switch (res) { + case SCE_KERNEL_ERROR_OK: + return 0; + case SCE_KERNEL_ERROR_WAIT_TIMEOUT: + return SDL_MUTEX_TIMEDOUT; + default: + return SDL_SetError("sceKernelWaitSema() failed"); } } diff --git a/modules/SDL2/src/thread/psp/SDL_systhread.c b/modules/SDL2/src/thread/psp/SDL_systhread.c index 297cb7b..f29efff 100644 --- a/modules/SDL2/src/thread/psp/SDL_systhread.c +++ b/modules/SDL2/src/thread/psp/SDL_systhread.c @@ -34,10 +34,9 @@ #include #include - static int ThreadEntry(SceSize args, void *argp) { - SDL_RunThread(*(SDL_Thread **) argp); + SDL_RunThread(*(SDL_Thread **)argp); return 0; } @@ -53,8 +52,8 @@ int SDL_SYS_CreateThread(SDL_Thread *thread) } thread->handle = sceKernelCreateThread(thread->name, ThreadEntry, - priority, thread->stacksize ? ((int) thread->stacksize) : 0x8000, - PSP_THREAD_ATTR_VFPU, NULL); + priority, thread->stacksize ? ((int)thread->stacksize) : 0x8000, + PSP_THREAD_ATTR_VFPU, NULL); if (thread->handle < 0) { return SDL_SetError("sceKernelCreateThread() failed"); } @@ -70,7 +69,7 @@ void SDL_SYS_SetupThread(const char *name) SDL_threadID SDL_ThreadID(void) { - return (SDL_threadID) sceKernelGetThreadId(); + return (SDL_threadID)sceKernelGetThreadId(); } void SDL_SYS_WaitThread(SDL_Thread *thread) @@ -104,8 +103,7 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) value = 50; } - return sceKernelChangeThreadPriority(sceKernelGetThreadId(),value); - + return sceKernelChangeThreadPriority(sceKernelGetThreadId(), value); } #endif /* SDL_THREAD_PSP */ diff --git a/modules/SDL2/src/thread/pthread/SDL_syscond.c b/modules/SDL2/src/thread/pthread/SDL_syscond.c index 9953575..5b8aeb4 100644 --- a/modules/SDL2/src/thread/pthread/SDL_syscond.c +++ b/modules/SDL2/src/thread/pthread/SDL_syscond.c @@ -35,12 +35,11 @@ struct SDL_cond }; /* Create a condition variable */ -SDL_cond * -SDL_CreateCond(void) +SDL_cond *SDL_CreateCond(void) { SDL_cond *cond; - cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond)); + cond = (SDL_cond *)SDL_malloc(sizeof(SDL_cond)); if (cond) { if (pthread_cond_init(&cond->cond, NULL) != 0) { SDL_SetError("pthread_cond_init() failed"); @@ -48,12 +47,11 @@ SDL_CreateCond(void) cond = NULL; } } - return (cond); + return cond; } /* Destroy a condition variable */ -void -SDL_DestroyCond(SDL_cond * cond) +void SDL_DestroyCond(SDL_cond *cond) { if (cond) { pthread_cond_destroy(&cond->cond); @@ -62,12 +60,11 @@ SDL_DestroyCond(SDL_cond * cond) } /* Restart one of the threads that are waiting on the condition variable */ -int -SDL_CondSignal(SDL_cond * cond) +int SDL_CondSignal(SDL_cond *cond) { int retval; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -79,12 +76,11 @@ SDL_CondSignal(SDL_cond * cond) } /* Restart all threads that are waiting on the condition variable */ -int -SDL_CondBroadcast(SDL_cond * cond) +int SDL_CondBroadcast(SDL_cond *cond) { int retval; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -95,8 +91,7 @@ SDL_CondBroadcast(SDL_cond * cond) return retval; } -int -SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) +int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { int retval; #ifndef HAVE_CLOCK_GETTIME @@ -104,7 +99,7 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) #endif struct timespec abstime; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -117,14 +112,14 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) gettimeofday(&delta, NULL); abstime.tv_sec = delta.tv_sec + (ms / 1000); - abstime.tv_nsec = (delta.tv_usec + (ms % 1000) * 1000) * 1000; + abstime.tv_nsec = (long)(delta.tv_usec + (ms % 1000) * 1000) * 1000; #endif if (abstime.tv_nsec > 1000000000) { abstime.tv_sec += 1; abstime.tv_nsec -= 1000000000; } - tryagain: +tryagain: retval = pthread_cond_timedwait(&cond->cond, &mutex->id, &abstime); switch (retval) { case EINTR: @@ -144,10 +139,9 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) /* Wait on the condition variable, unlocking the provided mutex. The mutex must be locked before entering this function! */ -int -SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex) +int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } else if (pthread_cond_wait(&cond->cond, &mutex->id) != 0) { return SDL_SetError("pthread_cond_wait() failed"); diff --git a/modules/SDL2/src/thread/pthread/SDL_sysmutex.c b/modules/SDL2/src/thread/pthread/SDL_sysmutex.c index 141ee25..9b24e16 100644 --- a/modules/SDL2/src/thread/pthread/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/pthread/SDL_sysmutex.c @@ -39,14 +39,13 @@ struct SDL_mutex #endif }; -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex; pthread_mutexattr_t attr; /* Allocate the structure */ - mutex = (SDL_mutex *) SDL_calloc(1, sizeof(*mutex)); + mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex)); if (mutex) { pthread_mutexattr_init(&attr); #if SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @@ -64,11 +63,10 @@ SDL_CreateMutex(void) } else { SDL_OutOfMemory(); } - return (mutex); + return mutex; } -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { if (mutex) { pthread_mutex_destroy(&mutex->id); @@ -77,15 +75,14 @@ SDL_DestroyMutex(SDL_mutex * mutex) } /* Lock the mutex */ -int -SDL_LockMutex(SDL_mutex * mutex) +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if FAKE_RECURSIVE_MUTEX pthread_t this_thread; #endif if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } #if FAKE_RECURSIVE_MUTEX @@ -112,8 +109,7 @@ SDL_LockMutex(SDL_mutex * mutex) return 0; } -int -SDL_TryLockMutex(SDL_mutex * mutex) +int SDL_TryLockMutex(SDL_mutex *mutex) { int retval; int result; @@ -122,7 +118,7 @@ SDL_TryLockMutex(SDL_mutex * mutex) #endif if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } retval = 0; @@ -158,11 +154,10 @@ SDL_TryLockMutex(SDL_mutex * mutex) return retval; } -int -SDL_UnlockMutex(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } #if FAKE_RECURSIVE_MUTEX diff --git a/modules/SDL2/src/thread/pthread/SDL_syssem.c b/modules/SDL2/src/thread/pthread/SDL_syssem.c index 57e8f48..fee50bb 100644 --- a/modules/SDL2/src/thread/pthread/SDL_syssem.c +++ b/modules/SDL2/src/thread/pthread/SDL_syssem.c @@ -42,11 +42,10 @@ struct SDL_semaphore }; /* Create a semaphore, initialized with value */ -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { - SDL_sem *sem = (SDL_sem *) SDL_malloc(sizeof(SDL_sem)); - if (sem) { + SDL_sem *sem = (SDL_sem *)SDL_malloc(sizeof(SDL_sem)); + if (sem != NULL) { if (sem_init(&sem->sem, 0, initial_value) < 0) { SDL_SetError("sem_init() failed"); SDL_free(sem); @@ -58,21 +57,19 @@ SDL_CreateSemaphore(Uint32 initial_value) return sem; } -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem *sem) { - if (sem) { + if (sem != NULL) { sem_destroy(&sem->sem); SDL_free(sem); } } -int -SDL_SemTryWait(SDL_sem * sem) +int SDL_SemTryWait(SDL_sem *sem) { int retval; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } retval = SDL_MUTEX_TIMEDOUT; @@ -82,12 +79,11 @@ SDL_SemTryWait(SDL_sem * sem) return retval; } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem *sem) { int retval; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -101,10 +97,9 @@ SDL_SemWait(SDL_sem * sem) return retval; } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { - int retval; + int retval = 0; #ifdef HAVE_SEM_TIMEDWAIT #ifndef HAVE_CLOCK_GETTIME struct timeval now; @@ -114,7 +109,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) Uint32 end; #endif - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -128,9 +123,9 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) #ifdef HAVE_SEM_TIMEDWAIT /* Setup the timeout. sem_timedwait doesn't wait for - * a lapse of time, but until we reach a certain time. - * This time is now plus the timeout. - */ + * a lapse of time, but until we reach a certain time. + * This time is now plus the timeout. + */ #ifdef HAVE_CLOCK_GETTIME clock_gettime(CLOCK_REALTIME, &ts_timeout); @@ -176,25 +171,27 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) return retval; } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem *sem) { int ret = 0; - if (sem) { - sem_getvalue(&sem->sem, &ret); - if (ret < 0) { - ret = 0; - } + + if (sem == NULL) { + SDL_InvalidParamError("sem"); + return 0; + } + + sem_getvalue(&sem->sem, &ret); + if (ret < 0) { + ret = 0; } - return (Uint32) ret; + return (Uint32)ret; } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem *sem) { int retval; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } diff --git a/modules/SDL2/src/thread/pthread/SDL_systhread.c b/modules/SDL2/src/thread/pthread/SDL_systhread.c index 4a73b5a..5316807 100644 --- a/modules/SDL2/src/thread/pthread/SDL_systhread.c +++ b/modules/SDL2/src/thread/pthread/SDL_systhread.c @@ -68,25 +68,23 @@ static const int sig_list[] = { }; #endif -static void * -RunThread(void *data) +static void *RunThread(void *data) { #ifdef __ANDROID__ Android_JNI_SetupThread(); #endif - SDL_RunThread((SDL_Thread *) data); + SDL_RunThread((SDL_Thread *)data); return NULL; } #if (defined(__MACOSX__) || defined(__IPHONEOS__)) && defined(HAVE_DLOPEN) static SDL_bool checked_setname = SDL_FALSE; -static int (*ppthread_setname_np)(const char*) = NULL; +static int (*ppthread_setname_np)(const char *) = NULL; #elif defined(__LINUX__) && defined(HAVE_DLOPEN) static SDL_bool checked_setname = SDL_FALSE; -static int (*ppthread_setname_np)(pthread_t, const char*) = NULL; +static int (*ppthread_setname_np)(pthread_t, const char *) = NULL; #endif -int -SDL_SYS_CreateThread(SDL_Thread * thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) { pthread_attr_t type; @@ -101,14 +99,14 @@ SDL_SYS_CreateThread(SDL_Thread * thread) #endif checked_setname = SDL_TRUE; } - #endif +#endif /* Set the thread attributes */ if (pthread_attr_init(&type) != 0) { return SDL_SetError("Couldn't initialize pthread attributes"); } pthread_attr_setdetachstate(&type, PTHREAD_CREATE_JOINABLE); - + /* Set caller-requested stack size. Otherwise: use the system default. */ if (thread->stacksize) { pthread_attr_setstacksize(&type, thread->stacksize); @@ -122,8 +120,7 @@ SDL_SYS_CreateThread(SDL_Thread * thread) return 0; } -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { #if !defined(__NACL__) int i; @@ -136,32 +133,32 @@ SDL_SYS_SetupThread(const char *name) if (ppthread_setname_np != NULL) { #if defined(__MACOSX__) || defined(__IPHONEOS__) ppthread_setname_np(name); - #elif defined(__LINUX__) +#elif defined(__LINUX__) if (ppthread_setname_np(pthread_self(), name) == ERANGE) { char namebuf[16]; /* Limited to 16 char */ - SDL_strlcpy(namebuf, name, sizeof (namebuf)); + SDL_strlcpy(namebuf, name, sizeof(namebuf)); ppthread_setname_np(pthread_self(), namebuf); } - #endif +#endif } - #elif HAVE_PTHREAD_SETNAME_NP - #if defined(__NETBSD__) - pthread_setname_np(pthread_self(), "%s", name); - #else - if (pthread_setname_np(pthread_self(), name) == ERANGE) { - char namebuf[16]; /* Limited to 16 char */ - SDL_strlcpy(namebuf, name, sizeof (namebuf)); - pthread_setname_np(pthread_self(), namebuf); - } - #endif - #elif HAVE_PTHREAD_SET_NAME_NP - pthread_set_name_np(pthread_self(), name); - #elif defined(__HAIKU__) - /* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */ - char namebuf[B_OS_NAME_LENGTH]; - SDL_strlcpy(namebuf, name, sizeof (namebuf)); - rename_thread(find_thread(NULL), namebuf); - #endif +#elif HAVE_PTHREAD_SETNAME_NP +#if defined(__NETBSD__) + pthread_setname_np(pthread_self(), "%s", name); +#else + if (pthread_setname_np(pthread_self(), name) == ERANGE) { + char namebuf[16]; /* Limited to 16 char */ + SDL_strlcpy(namebuf, name, sizeof(namebuf)); + pthread_setname_np(pthread_self(), namebuf); + } +#endif +#elif HAVE_PTHREAD_SET_NAME_NP + pthread_set_name_np(pthread_self(), name); +#elif defined(__HAIKU__) + /* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */ + char namebuf[B_OS_NAME_LENGTH]; + SDL_strlcpy(namebuf, name, sizeof(namebuf)); + rename_thread(find_thread(NULL), namebuf); +#endif } /* NativeClient does not yet support signals.*/ @@ -184,14 +181,12 @@ SDL_SYS_SetupThread(const char *name) #endif } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { - return ((SDL_threadID) pthread_self()); + return (SDL_threadID)pthread_self(); } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { #if __NACL__ || __RISCOS__ || __OS2__ /* FIXME: Setting thread priority does not seem to be supported in NACL */ @@ -290,14 +285,12 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) #endif /* #if __NACL__ || __RISCOS__ */ } -void -SDL_SYS_WaitThread(SDL_Thread * thread) +void SDL_SYS_WaitThread(SDL_Thread *thread) { pthread_join(thread->handle, 0); } -void -SDL_SYS_DetachThread(SDL_Thread * thread) +void SDL_SYS_DetachThread(SDL_Thread *thread) { pthread_detach(thread->handle); } diff --git a/modules/SDL2/src/thread/pthread/SDL_systls.c b/modules/SDL2/src/thread/pthread/SDL_systls.c index 9868f3e..f0be2f8 100644 --- a/modules/SDL2/src/thread/pthread/SDL_systls.c +++ b/modules/SDL2/src/thread/pthread/SDL_systls.c @@ -25,14 +25,12 @@ #include - #define INVALID_PTHREAD_KEY ((pthread_key_t)-1) static pthread_key_t thread_local_storage = INVALID_PTHREAD_KEY; static SDL_bool generic_local_storage = SDL_FALSE; -SDL_TLSData * -SDL_SYS_GetTLSData(void) +SDL_TLSData *SDL_SYS_GetTLSData(void) { if (thread_local_storage == INVALID_PTHREAD_KEY && !generic_local_storage) { static SDL_SpinLock lock; @@ -55,8 +53,7 @@ SDL_SYS_GetTLSData(void) return (SDL_TLSData *)pthread_getspecific(thread_local_storage); } -int -SDL_SYS_SetTLSData(SDL_TLSData *data) +int SDL_SYS_SetTLSData(SDL_TLSData *data) { if (generic_local_storage) { return SDL_Generic_SetTLSData(data); diff --git a/modules/SDL2/src/thread/stdcpp/SDL_syscond.cpp b/modules/SDL2/src/thread/stdcpp/SDL_syscond.cpp index c049e6b..ebd03cf 100644 --- a/modules/SDL2/src/thread/stdcpp/SDL_syscond.cpp +++ b/modules/SDL2/src/thread/stdcpp/SDL_syscond.cpp @@ -37,15 +37,14 @@ struct SDL_cond }; /* Create a condition variable */ -extern "C" -SDL_cond * +extern "C" SDL_cond * SDL_CreateCond(void) { /* Allocate and initialize the condition variable */ try { - SDL_cond * cond = new SDL_cond; + SDL_cond *cond = new SDL_cond; return cond; - } catch (std::system_error & ex) { + } catch (std::system_error &ex) { SDL_SetError("unable to create a C++ condition variable: code=%d; %s", ex.code(), ex.what()); return NULL; } catch (std::bad_alloc &) { @@ -55,21 +54,19 @@ SDL_CreateCond(void) } /* Destroy a condition variable */ -extern "C" -void -SDL_DestroyCond(SDL_cond * cond) +extern "C" void +SDL_DestroyCond(SDL_cond *cond) { - if (cond) { + if (cond != NULL) { delete cond; } } /* Restart one of the threads that are waiting on the condition variable */ -extern "C" -int -SDL_CondSignal(SDL_cond * cond) +extern "C" int +SDL_CondSignal(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -78,11 +75,10 @@ SDL_CondSignal(SDL_cond * cond) } /* Restart all threads that are waiting on the condition variable */ -extern "C" -int -SDL_CondBroadcast(SDL_cond * cond) +extern "C" int +SDL_CondBroadcast(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -111,15 +107,14 @@ Thread B: SDL_CondSignal(cond); SDL_UnlockMutex(lock); */ -extern "C" -int -SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) +extern "C" int +SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } - if (!mutex) { + if (mutex == NULL) { return SDL_InvalidParamError("mutex"); } @@ -127,15 +122,13 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) std::unique_lock cpp_lock(mutex->cpp_mutex, std::adopt_lock_t()); if (ms == SDL_MUTEX_MAXWAIT) { cond->cpp_cond.wait( - cpp_lock - ); + cpp_lock); cpp_lock.release(); return 0; } else { auto wait_result = cond->cpp_cond.wait_for( cpp_lock, - std::chrono::duration(ms) - ); + std::chrono::duration(ms)); cpp_lock.release(); if (wait_result == std::cv_status::timeout) { return SDL_MUTEX_TIMEDOUT; @@ -143,15 +136,14 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) return 0; } } - } catch (std::system_error & ex) { + } catch (std::system_error &ex) { return SDL_SetError("unable to wait on a C++ condition variable: code=%d; %s", ex.code(), ex.what()); } } /* Wait on the condition variable forever */ -extern "C" -int -SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex) +extern "C" int +SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT); } diff --git a/modules/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp b/modules/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp index 78310f6..e74627b 100644 --- a/modules/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp +++ b/modules/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp @@ -30,17 +30,15 @@ extern "C" { #include "SDL_sysmutex_c.h" #include - /* Create a mutex */ -extern "C" -SDL_mutex * +extern "C" SDL_mutex * SDL_CreateMutex(void) { /* Allocate and initialize the mutex */ try { - SDL_mutex * mutex = new SDL_mutex; + SDL_mutex *mutex = new SDL_mutex; return mutex; - } catch (std::system_error & ex) { + } catch (std::system_error &ex) { SDL_SetError("unable to create a C++ mutex: code=%d; %s", ex.code(), ex.what()); return NULL; } catch (std::bad_alloc &) { @@ -50,39 +48,37 @@ SDL_CreateMutex(void) } /* Free the mutex */ -extern "C" -void -SDL_DestroyMutex(SDL_mutex * mutex) +extern "C" void +SDL_DestroyMutex(SDL_mutex *mutex) { - if (mutex) { + if (mutex != NULL) { delete mutex; } } -/* Lock the semaphore */ -extern "C" -int -SDL_mutexP(SDL_mutex * mutex) +/* Lock the mutex */ +extern "C" int +SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } try { mutex->cpp_mutex.lock(); return 0; - } catch (std::system_error & ex) { + } catch (std::system_error &ex) { return SDL_SetError("unable to lock a C++ mutex: code=%d; %s", ex.code(), ex.what()); } } /* TryLock the mutex */ -int -SDL_TryLockMutex(SDL_mutex * mutex) +int SDL_TryLockMutex(SDL_mutex *mutex) { int retval = 0; + if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } if (mutex->cpp_mutex.try_lock() == false) { @@ -92,12 +88,11 @@ SDL_TryLockMutex(SDL_mutex * mutex) } /* Unlock the mutex */ -extern "C" -int -SDL_mutexV(SDL_mutex * mutex) +extern "C" int +SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } mutex->cpp_mutex.unlock(); diff --git a/modules/SDL2/src/thread/stdcpp/SDL_systhread.cpp b/modules/SDL2/src/thread/stdcpp/SDL_systhread.cpp index 5070010..49b91d2 100644 --- a/modules/SDL2/src/thread/stdcpp/SDL_systhread.cpp +++ b/modules/SDL2/src/thread/stdcpp/SDL_systhread.cpp @@ -36,30 +36,27 @@ extern "C" { #include #endif -static void -RunThread(void *args) +static void RunThread(void *args) { - SDL_RunThread((SDL_Thread *) args); + SDL_RunThread((SDL_Thread *)args); } -extern "C" -int -SDL_SYS_CreateThread(SDL_Thread * thread) +extern "C" int +SDL_SYS_CreateThread(SDL_Thread *thread) { try { // !!! FIXME: no way to set a thread stack size here. std::thread cpp_thread(RunThread, thread); - thread->handle = (void *) new std::thread(std::move(cpp_thread)); + thread->handle = (void *)new std::thread(std::move(cpp_thread)); return 0; - } catch (std::system_error & ex) { + } catch (std::system_error &ex) { return SDL_SetError("unable to start a C++ thread: code=%d; %s", ex.code(), ex.what()); } catch (std::bad_alloc &) { return SDL_OutOfMemory(); } } -extern "C" -void +extern "C" void SDL_SYS_SetupThread(const char *name) { // Make sure a thread ID gets assigned ASAP, for debugging purposes: @@ -67,8 +64,7 @@ SDL_SYS_SetupThread(const char *name) return; } -extern "C" -SDL_threadID +extern "C" SDL_threadID SDL_ThreadID(void) { #ifdef __WINRT__ @@ -89,8 +85,7 @@ SDL_ThreadID(void) #endif } -extern "C" -int +extern "C" int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { #ifdef __WINRT__ @@ -98,16 +93,13 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) if (priority == SDL_THREAD_PRIORITY_LOW) { value = THREAD_PRIORITY_LOWEST; - } - else if (priority == SDL_THREAD_PRIORITY_HIGH) { + } else if (priority == SDL_THREAD_PRIORITY_HIGH) { value = THREAD_PRIORITY_HIGHEST; - } - else if (priority == SDL_THREAD_PRIORITY_TIME_CRITICAL) { + } else if (priority == SDL_THREAD_PRIORITY_TIME_CRITICAL) { // FIXME: WinRT does not support TIME_CRITICAL! -flibit SDL_LogWarn(SDL_LOG_CATEGORY_SYSTEM, "TIME_CRITICAL unsupported, falling back to HIGHEST"); value = THREAD_PRIORITY_HIGHEST; - } - else { + } else { value = THREAD_PRIORITY_NORMAL; } if (!SetThreadPriority(GetCurrentThread(), value)) { @@ -119,16 +111,15 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) #endif } -extern "C" -void -SDL_SYS_WaitThread(SDL_Thread * thread) +extern "C" void +SDL_SYS_WaitThread(SDL_Thread *thread) { - if ( ! thread) { + if (!thread) { return; } try { - std::thread * cpp_thread = (std::thread *) thread->handle; + std::thread *cpp_thread = (std::thread *)thread->handle; if (cpp_thread->joinable()) { cpp_thread->join(); } @@ -139,16 +130,15 @@ SDL_SYS_WaitThread(SDL_Thread * thread) } } -extern "C" -void -SDL_SYS_DetachThread(SDL_Thread * thread) +extern "C" void +SDL_SYS_DetachThread(SDL_Thread *thread) { - if ( ! thread) { + if (!thread) { return; } try { - std::thread * cpp_thread = (std::thread *) thread->handle; + std::thread *cpp_thread = (std::thread *)thread->handle; if (cpp_thread->joinable()) { cpp_thread->detach(); } @@ -159,15 +149,13 @@ SDL_SYS_DetachThread(SDL_Thread * thread) } } -extern "C" -SDL_TLSData * +extern "C" SDL_TLSData * SDL_SYS_GetTLSData(void) { return SDL_Generic_GetTLSData(); } -extern "C" -int +extern "C" int SDL_SYS_SetTLSData(SDL_TLSData *data) { return SDL_Generic_SetTLSData(data); diff --git a/modules/SDL2/src/thread/stdcpp/SDL_systhread_c.h b/modules/SDL2/src/thread/stdcpp/SDL_systhread_c.h index 4c9ae2b..14e0c74 100644 --- a/modules/SDL2/src/thread/stdcpp/SDL_systhread_c.h +++ b/modules/SDL2/src/thread/stdcpp/SDL_systhread_c.h @@ -21,6 +21,6 @@ #include "SDL_config.h" /* For a thread handle, use a void pointer to a std::thread */ -typedef void * SYS_ThreadHandle; +typedef void *SYS_ThreadHandle; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/thread/vita/SDL_syscond.c b/modules/SDL2/src/thread/vita/SDL_syscond.c index 185e754..6327565 100644 --- a/modules/SDL2/src/thread/vita/SDL_syscond.c +++ b/modules/SDL2/src/thread/vita/SDL_syscond.c @@ -40,13 +40,12 @@ struct SDL_cond }; /* Create a condition variable */ -SDL_cond * -SDL_CreateCond(void) +SDL_cond *SDL_CreateCond(void) { SDL_cond *cond; - cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond)); - if (cond) { + cond = (SDL_cond *)SDL_malloc(sizeof(SDL_cond)); + if (cond != NULL) { cond->lock = SDL_CreateMutex(); cond->wait_sem = SDL_CreateSemaphore(0); cond->wait_done = SDL_CreateSemaphore(0); @@ -58,14 +57,13 @@ SDL_CreateCond(void) } else { SDL_OutOfMemory(); } - return (cond); + return cond; } /* Destroy a condition variable */ -void -SDL_DestroyCond(SDL_cond * cond) +void SDL_DestroyCond(SDL_cond *cond) { - if (cond) { + if (cond != NULL) { if (cond->wait_sem) { SDL_DestroySemaphore(cond->wait_sem); } @@ -80,10 +78,9 @@ SDL_DestroyCond(SDL_cond * cond) } /* Restart one of the threads that are waiting on the condition variable */ -int -SDL_CondSignal(SDL_cond * cond) +int SDL_CondSignal(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -104,10 +101,9 @@ SDL_CondSignal(SDL_cond * cond) } /* Restart all threads that are waiting on the condition variable */ -int -SDL_CondBroadcast(SDL_cond * cond) +int SDL_CondBroadcast(SDL_cond *cond) { - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -158,12 +154,11 @@ Thread B: SDL_CondSignal(cond); SDL_UnlockMutex(lock); */ -int -SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) +int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { int retval; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -213,8 +208,7 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) } /* Wait on the condition variable forever */ -int -SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex) +int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT); } diff --git a/modules/SDL2/src/thread/vita/SDL_sysmutex.c b/modules/SDL2/src/thread/vita/SDL_sysmutex.c index 8eb6198..232ae04 100644 --- a/modules/SDL2/src/thread/vita/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/vita/SDL_sysmutex.c @@ -34,23 +34,21 @@ struct SDL_mutex }; /* Create a mutex */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex = NULL; SceInt32 res = 0; /* Allocate mutex memory */ - mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex)); - if (mutex) { + mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex)); + if (mutex != NULL) { res = sceKernelCreateLwMutex( &mutex->lock, "SDL mutex", SCE_KERNEL_MUTEX_ATTR_RECURSIVE, 0, - NULL - ); + NULL); if (res < 0) { SDL_SetError("Error trying to create mutex: %x", res); @@ -62,69 +60,66 @@ SDL_CreateMutex(void) } /* Free the mutex */ -void -SDL_DestroyMutex(SDL_mutex * mutex) +void SDL_DestroyMutex(SDL_mutex *mutex) { - if (mutex) { + if (mutex != NULL) { sceKernelDeleteLwMutex(&mutex->lock); SDL_free(mutex); } } -/* Try to lock the mutex */ -int -SDL_TryLockMutex(SDL_mutex * mutex) +/* Lock the mutex */ +int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; #else SceInt32 res = 0; + if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } - res = sceKernelTryLockLwMutex(&mutex->lock, 1); - switch (res) { - case SCE_KERNEL_OK: - return 0; - break; - case SCE_KERNEL_ERROR_MUTEX_FAILED_TO_OWN: - return SDL_MUTEX_TIMEDOUT; - break; - default: - return SDL_SetError("Error trying to lock mutex: %x", res); - break; + res = sceKernelLockLwMutex(&mutex->lock, 1, NULL); + if (res != SCE_KERNEL_OK) { + return SDL_SetError("Error trying to lock mutex: %x", res); } - return -1; + return 0; #endif /* SDL_THREADS_DISABLED */ } - -/* Lock the mutex */ -int -SDL_mutexP(SDL_mutex * mutex) +/* Try to lock the mutex */ +int SDL_TryLockMutex(SDL_mutex *mutex) { #if SDL_THREADS_DISABLED return 0; #else SceInt32 res = 0; + if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } - res = sceKernelLockLwMutex(&mutex->lock, 1, NULL); - if (res != SCE_KERNEL_OK) { + res = sceKernelTryLockLwMutex(&mutex->lock, 1); + switch (res) { + case SCE_KERNEL_OK: + return 0; + break; + case SCE_KERNEL_ERROR_MUTEX_FAILED_TO_OWN: + return SDL_MUTEX_TIMEDOUT; + break; + default: return SDL_SetError("Error trying to lock mutex: %x", res); + break; } - return 0; + return -1; #endif /* SDL_THREADS_DISABLED */ } /* Unlock the mutex */ -int -SDL_mutexV(SDL_mutex * mutex) +int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { #if SDL_THREADS_DISABLED return 0; @@ -132,7 +127,7 @@ SDL_mutexV(SDL_mutex * mutex) SceInt32 res = 0; if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); + return 0; } res = sceKernelUnlockLwMutex(&mutex->lock, 1); diff --git a/modules/SDL2/src/thread/vita/SDL_syssem.c b/modules/SDL2/src/thread/vita/SDL_syssem.c index 0e5a961..453afa9 100644 --- a/modules/SDL2/src/thread/vita/SDL_syssem.c +++ b/modules/SDL2/src/thread/vita/SDL_syssem.c @@ -34,17 +34,17 @@ #include #include -struct SDL_semaphore { - SceUID semid; +struct SDL_semaphore +{ + SceUID semid; }; - /* Create a semaphore */ SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { SDL_sem *sem; - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); + sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); if (sem != NULL) { /* TODO: Figure out the limit on the maximum value. */ sem->semid = sceKernelCreateSema("SDL sema", 0, initial_value, 255, NULL); @@ -80,11 +80,10 @@ void SDL_DestroySemaphore(SDL_sem *sem) int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { Uint32 *pTimeout; - unsigned int res; + int res; if (sem == NULL) { - SDL_InvalidParamError("sem"); - return 0; + return SDL_InvalidParamError("sem"); } if (timeout == 0) { @@ -98,18 +97,18 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) if (timeout == SDL_MUTEX_MAXWAIT) { pTimeout = NULL; } else { - timeout *= 1000; /* Convert to microseconds. */ + timeout *= 1000; /* Convert to microseconds. */ pTimeout = &timeout; } res = sceKernelWaitSema(sem->semid, 1, pTimeout); - switch (res) { - case SCE_KERNEL_OK: - return 0; - case SCE_KERNEL_ERROR_WAIT_TIMEOUT: - return SDL_MUTEX_TIMEDOUT; - default: - return SDL_SetError("WaitForSingleObject() failed"); + switch (res) { + case SCE_KERNEL_OK: + return 0; + case SCE_KERNEL_ERROR_WAIT_TIMEOUT: + return SDL_MUTEX_TIMEDOUT; + default: + return SDL_SetError("WaitForSingleObject() failed"); } } diff --git a/modules/SDL2/src/thread/vita/SDL_systhread.c b/modules/SDL2/src/thread/vita/SDL_systhread.c index aa9e72b..31f7ab0 100644 --- a/modules/SDL2/src/thread/vita/SDL_systhread.c +++ b/modules/SDL2/src/thread/vita/SDL_systhread.c @@ -34,19 +34,19 @@ #include #include -#define VITA_THREAD_STACK_SIZE_MIN 0x1000 // 4KiB -#define VITA_THREAD_STACK_SIZE_MAX 0x2000000 // 32MiB -#define VITA_THREAD_STACK_SIZE_DEFAULT 0x10000 // 64KiB -#define VITA_THREAD_NAME_MAX 32 - -#define VITA_THREAD_PRIORITY_LOW 191 -#define VITA_THREAD_PRIORITY_NORMAL 160 -#define VITA_THREAD_PRIORITY_HIGH 112 +#define VITA_THREAD_STACK_SIZE_MIN 0x1000 // 4KiB +#define VITA_THREAD_STACK_SIZE_MAX 0x2000000 // 32MiB +#define VITA_THREAD_STACK_SIZE_DEFAULT 0x10000 // 64KiB +#define VITA_THREAD_NAME_MAX 32 + +#define VITA_THREAD_PRIORITY_LOW 191 +#define VITA_THREAD_PRIORITY_NORMAL 160 +#define VITA_THREAD_PRIORITY_HIGH 112 #define VITA_THREAD_PRIORITY_TIME_CRITICAL 64 static int ThreadEntry(SceSize args, void *argp) { - SDL_RunThread(*(SDL_Thread **) argp); + SDL_RunThread(*(SDL_Thread **)argp); return 0; } @@ -74,11 +74,11 @@ int SDL_SYS_CreateThread(SDL_Thread *thread) thread->handle = sceKernelCreateThread( thread_name, // name ThreadEntry, // function to run - 0, // priority. 0 means priority of calling thread - stack_size, // stack size - 0, // attibutes. always 0 - 0, // cpu affinity mask. 0 = all CPUs - NULL // opt. always NULL + 0, // priority. 0 means priority of calling thread + stack_size, // stack size + 0, // attibutes. always 0 + 0, // cpu affinity mask. 0 = all CPUs + NULL // opt. always NULL ); if (thread->handle < 0) { @@ -96,7 +96,7 @@ void SDL_SYS_SetupThread(const char *name) SDL_threadID SDL_ThreadID(void) { - return (SDL_threadID) sceKernelGetThreadId(); + return (SDL_threadID)sceKernelGetThreadId(); } void SDL_SYS_WaitThread(SDL_Thread *thread) @@ -114,23 +114,22 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { int value = VITA_THREAD_PRIORITY_NORMAL; - switch(priority) { - case SDL_THREAD_PRIORITY_LOW: - value = VITA_THREAD_PRIORITY_LOW; - break; - case SDL_THREAD_PRIORITY_NORMAL: - value = VITA_THREAD_PRIORITY_NORMAL; - break; - case SDL_THREAD_PRIORITY_HIGH: - value = VITA_THREAD_PRIORITY_HIGH; - break; - case SDL_THREAD_PRIORITY_TIME_CRITICAL: - value = VITA_THREAD_PRIORITY_TIME_CRITICAL; - break; + switch (priority) { + case SDL_THREAD_PRIORITY_LOW: + value = VITA_THREAD_PRIORITY_LOW; + break; + case SDL_THREAD_PRIORITY_NORMAL: + value = VITA_THREAD_PRIORITY_NORMAL; + break; + case SDL_THREAD_PRIORITY_HIGH: + value = VITA_THREAD_PRIORITY_HIGH; + break; + case SDL_THREAD_PRIORITY_TIME_CRITICAL: + value = VITA_THREAD_PRIORITY_TIME_CRITICAL; + break; } return sceKernelChangeThreadPriority(0, value); - } #endif /* SDL_THREAD_VITA */ diff --git a/modules/SDL2/src/thread/windows/SDL_syscond_cv.c b/modules/SDL2/src/thread/windows/SDL_syscond_cv.c index e784a03..905d416 100644 --- a/modules/SDL2/src/thread/windows/SDL_syscond_cv.c +++ b/modules/SDL2/src/thread/windows/SDL_syscond_cv.c @@ -26,7 +26,7 @@ #include "../generic/SDL_syscond_c.h" #include "SDL_sysmutex_c.h" -typedef SDL_cond * (*pfnSDL_CreateCond)(void); +typedef SDL_cond *(*pfnSDL_CreateCond)(void); typedef void (*pfnSDL_DestroyCond)(SDL_cond *); typedef int (*pfnSDL_CondSignal)(SDL_cond *); typedef int (*pfnSDL_CondBroadcast)(SDL_cond *); @@ -35,39 +35,42 @@ typedef int (*pfnSDL_CondWaitTimeout)(SDL_cond *, SDL_mutex *, Uint32); typedef struct SDL_cond_impl_t { - pfnSDL_CreateCond Create; - pfnSDL_DestroyCond Destroy; - pfnSDL_CondSignal Signal; - pfnSDL_CondBroadcast Broadcast; - pfnSDL_CondWait Wait; - pfnSDL_CondWaitTimeout WaitTimeout; + pfnSDL_CreateCond Create; + pfnSDL_DestroyCond Destroy; + pfnSDL_CondSignal Signal; + pfnSDL_CondBroadcast Broadcast; + pfnSDL_CondWait Wait; + pfnSDL_CondWaitTimeout WaitTimeout; } SDL_cond_impl_t; /* Implementation will be chosen at runtime based on available Kernel features */ -static SDL_cond_impl_t SDL_cond_impl_active = {0}; - +static SDL_cond_impl_t SDL_cond_impl_active = { 0 }; /** * Native Windows Condition Variable (SRW Locks) */ #ifndef CONDITION_VARIABLE_INIT -#define CONDITION_VARIABLE_INIT {0} -typedef struct CONDITION_VARIABLE { +#define CONDITION_VARIABLE_INIT \ + { \ + 0 \ + } +typedef struct CONDITION_VARIABLE +{ PVOID Ptr; } CONDITION_VARIABLE, *PCONDITION_VARIABLE; #endif #if __WINRT__ -#define pWakeConditionVariable WakeConditionVariable -#define pWakeAllConditionVariable WakeAllConditionVariable +#define pWakeConditionVariable WakeConditionVariable +#define pWakeAllConditionVariable WakeAllConditionVariable #define pSleepConditionVariableSRW SleepConditionVariableSRW -#define pSleepConditionVariableCS SleepConditionVariableCS +#define pSleepConditionVariableCS SleepConditionVariableCS #else typedef VOID(WINAPI *pfnWakeConditionVariable)(PCONDITION_VARIABLE); typedef VOID(WINAPI *pfnWakeAllConditionVariable)(PCONDITION_VARIABLE); typedef BOOL(WINAPI *pfnSleepConditionVariableSRW)(PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG); -typedef BOOL(WINAPI* pfnSleepConditionVariableCS)(PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD); +typedef BOOL(WINAPI *pfnSleepConditionVariableCS)(PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD); static pfnWakeConditionVariable pWakeConditionVariable = NULL; static pfnWakeAllConditionVariable pWakeAllConditionVariable = NULL; @@ -80,35 +83,31 @@ typedef struct SDL_cond_cv CONDITION_VARIABLE cond; } SDL_cond_cv; - -static SDL_cond * -SDL_CreateCond_cv(void) +static SDL_cond *SDL_CreateCond_cv(void) { SDL_cond_cv *cond; /* Relies on CONDITION_VARIABLE_INIT == 0. */ - cond = (SDL_cond_cv *) SDL_calloc(1, sizeof(*cond)); - if (!cond) { + cond = (SDL_cond_cv *)SDL_calloc(1, sizeof(*cond)); + if (cond == NULL) { SDL_OutOfMemory(); } return (SDL_cond *)cond; } -static void -SDL_DestroyCond_cv(SDL_cond * cond) +static void SDL_DestroyCond_cv(SDL_cond *cond) { - if (cond) { + if (cond != NULL) { /* There are no kernel allocated resources */ SDL_free(cond); } } -static int -SDL_CondSignal_cv(SDL_cond * _cond) +static int SDL_CondSignal_cv(SDL_cond *_cond) { SDL_cond_cv *cond = (SDL_cond_cv *)_cond; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -117,11 +116,10 @@ SDL_CondSignal_cv(SDL_cond * _cond) return 0; } -static int -SDL_CondBroadcast_cv(SDL_cond * _cond) +static int SDL_CondBroadcast_cv(SDL_cond *_cond) { SDL_cond_cv *cond = (SDL_cond_cv *)_cond; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } @@ -130,24 +128,23 @@ SDL_CondBroadcast_cv(SDL_cond * _cond) return 0; } -static int -SDL_CondWaitTimeout_cv(SDL_cond * _cond, SDL_mutex * _mutex, Uint32 ms) +static int SDL_CondWaitTimeout_cv(SDL_cond *_cond, SDL_mutex *_mutex, Uint32 ms) { SDL_cond_cv *cond = (SDL_cond_cv *)_cond; DWORD timeout; int ret; - if (!cond) { + if (cond == NULL) { return SDL_InvalidParamError("cond"); } - if (!_mutex) { + if (_mutex == NULL) { return SDL_InvalidParamError("mutex"); } if (ms == SDL_MUTEX_MAXWAIT) { timeout = INFINITE; } else { - timeout = (DWORD) ms; + timeout = (DWORD)ms; } if (SDL_mutex_impl_active.Type == SDL_MUTEX_SRW) { @@ -194,13 +191,12 @@ SDL_CondWaitTimeout_cv(SDL_cond * _cond, SDL_mutex * _mutex, Uint32 ms) return ret; } -static int -SDL_CondWait_cv(SDL_cond * cond, SDL_mutex * mutex) { +static int SDL_CondWait_cv(SDL_cond *cond, SDL_mutex *mutex) +{ return SDL_CondWaitTimeout_cv(cond, mutex, SDL_MUTEX_MAXWAIT); } -static const SDL_cond_impl_t SDL_cond_impl_cv = -{ +static const SDL_cond_impl_t SDL_cond_impl_cv = { &SDL_CreateCond_cv, &SDL_DestroyCond_cv, &SDL_CondSignal_cv, @@ -213,8 +209,7 @@ static const SDL_cond_impl_t SDL_cond_impl_cv = * Generic Condition Variable implementation using SDL_mutex and SDL_sem */ -static const SDL_cond_impl_t SDL_cond_impl_generic = -{ +static const SDL_cond_impl_t SDL_cond_impl_generic = { &SDL_CreateCond_generic, &SDL_DestroyCond_generic, &SDL_CondSignal_generic, @@ -223,18 +218,16 @@ static const SDL_cond_impl_t SDL_cond_impl_generic = &SDL_CondWaitTimeout_generic, }; - -SDL_cond * -SDL_CreateCond(void) +SDL_cond *SDL_CreateCond(void) { if (SDL_cond_impl_active.Create == NULL) { /* Default to generic implementation, works with all mutex implementations */ - const SDL_cond_impl_t * impl = &SDL_cond_impl_generic; + const SDL_cond_impl_t *impl = &SDL_cond_impl_generic; if (SDL_mutex_impl_active.Type == SDL_MUTEX_INVALID) { /* The mutex implementation isn't decided yet, trigger it */ SDL_mutex *mutex = SDL_CreateMutex(); - if (!mutex) { + if (mutex == NULL) { return NULL; } SDL_DestroyMutex(mutex); @@ -249,10 +242,10 @@ SDL_CreateCond(void) { HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll")); if (kernel32) { - pWakeConditionVariable = (pfnWakeConditionVariable) GetProcAddress(kernel32, "WakeConditionVariable"); - pWakeAllConditionVariable = (pfnWakeAllConditionVariable) GetProcAddress(kernel32, "WakeAllConditionVariable"); - pSleepConditionVariableSRW = (pfnSleepConditionVariableSRW) GetProcAddress(kernel32, "SleepConditionVariableSRW"); - pSleepConditionVariableCS = (pfnSleepConditionVariableCS) GetProcAddress(kernel32, "SleepConditionVariableCS"); + pWakeConditionVariable = (pfnWakeConditionVariable)GetProcAddress(kernel32, "WakeConditionVariable"); + pWakeAllConditionVariable = (pfnWakeAllConditionVariable)GetProcAddress(kernel32, "WakeAllConditionVariable"); + pSleepConditionVariableSRW = (pfnSleepConditionVariableSRW)GetProcAddress(kernel32, "SleepConditionVariableSRW"); + pSleepConditionVariableCS = (pfnSleepConditionVariableCS)GetProcAddress(kernel32, "SleepConditionVariableCS"); if (pWakeConditionVariable && pWakeAllConditionVariable && pSleepConditionVariableSRW && pSleepConditionVariableCS) { /* Use the Windows provided API */ impl = &SDL_cond_impl_cv; @@ -266,32 +259,27 @@ SDL_CreateCond(void) return SDL_cond_impl_active.Create(); } -void -SDL_DestroyCond(SDL_cond * cond) +void SDL_DestroyCond(SDL_cond *cond) { SDL_cond_impl_active.Destroy(cond); } -int -SDL_CondSignal(SDL_cond * cond) +int SDL_CondSignal(SDL_cond *cond) { return SDL_cond_impl_active.Signal(cond); } -int -SDL_CondBroadcast(SDL_cond * cond) +int SDL_CondBroadcast(SDL_cond *cond) { return SDL_cond_impl_active.Broadcast(cond); } -int -SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms) +int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms) { return SDL_cond_impl_active.WaitTimeout(cond, mutex, ms); } -int -SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex) +int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) { return SDL_cond_impl_active.Wait(cond, mutex); } diff --git a/modules/SDL2/src/thread/windows/SDL_sysmutex.c b/modules/SDL2/src/thread/windows/SDL_sysmutex.c index 773e0f6..6091819 100644 --- a/modules/SDL2/src/thread/windows/SDL_sysmutex.c +++ b/modules/SDL2/src/thread/windows/SDL_sysmutex.c @@ -35,10 +35,8 @@ #include "SDL_sysmutex_c.h" - /* Implementation will be chosen at runtime based on available Kernel features */ -SDL_mutex_impl_t SDL_mutex_impl_active = {0}; - +SDL_mutex_impl_t SDL_mutex_impl_active = { 0 }; /** * Implementation based on Slim Reader/Writer (SRW) Locks for Win 7 and newer. @@ -46,8 +44,8 @@ SDL_mutex_impl_t SDL_mutex_impl_active = {0}; #if __WINRT__ /* Functions are guaranteed to be available */ -#define pReleaseSRWLockExclusive ReleaseSRWLockExclusive -#define pAcquireSRWLockExclusive AcquireSRWLockExclusive +#define pReleaseSRWLockExclusive ReleaseSRWLockExclusive +#define pAcquireSRWLockExclusive AcquireSRWLockExclusive #define pTryAcquireSRWLockExclusive TryAcquireSRWLockExclusive #else typedef VOID(WINAPI *pfnReleaseSRWLockExclusive)(PSRWLOCK); @@ -58,39 +56,30 @@ static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL; static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL; #endif -static SDL_mutex * -SDL_CreateMutex_srw(void) +static SDL_mutex *SDL_CreateMutex_srw(void) { SDL_mutex_srw *mutex; /* Relies on SRWLOCK_INIT == 0. */ - mutex = (SDL_mutex_srw *) SDL_calloc(1, sizeof(*mutex)); - if (!mutex) { + mutex = (SDL_mutex_srw *)SDL_calloc(1, sizeof(*mutex)); + if (mutex == NULL) { SDL_OutOfMemory(); } return (SDL_mutex *)mutex; } -static void -SDL_DestroyMutex_srw(SDL_mutex * mutex) +static void SDL_DestroyMutex_srw(SDL_mutex *mutex) { - if (mutex) { - /* There are no kernel allocated resources */ - SDL_free(mutex); - } + /* There are no kernel allocated resources */ + SDL_free(mutex); } -static int -SDL_LockMutex_srw(SDL_mutex * _mutex) +static int SDL_LockMutex_srw(SDL_mutex *_mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { SDL_mutex_srw *mutex = (SDL_mutex_srw *)_mutex; DWORD this_thread; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } - this_thread = GetCurrentThreadId(); if (mutex->owner == this_thread) { ++mutex->count; @@ -107,17 +96,12 @@ SDL_LockMutex_srw(SDL_mutex * _mutex) return 0; } -static int -SDL_TryLockMutex_srw(SDL_mutex * _mutex) +static int SDL_TryLockMutex_srw(SDL_mutex *_mutex) { SDL_mutex_srw *mutex = (SDL_mutex_srw *)_mutex; DWORD this_thread; int retval = 0; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } - this_thread = GetCurrentThreadId(); if (mutex->owner == this_thread) { ++mutex->count; @@ -133,15 +117,10 @@ SDL_TryLockMutex_srw(SDL_mutex * _mutex) return retval; } -static int -SDL_UnlockMutex_srw(SDL_mutex * _mutex) +static int SDL_UnlockMutex_srw(SDL_mutex *_mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { SDL_mutex_srw *mutex = (SDL_mutex_srw *)_mutex; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } - if (mutex->owner == GetCurrentThreadId()) { if (--mutex->count == 0) { mutex->owner = 0; @@ -154,8 +133,7 @@ SDL_UnlockMutex_srw(SDL_mutex * _mutex) return 0; } -static const SDL_mutex_impl_t SDL_mutex_impl_srw = -{ +static const SDL_mutex_impl_t SDL_mutex_impl_srw = { &SDL_CreateMutex_srw, &SDL_DestroyMutex_srw, &SDL_LockMutex_srw, @@ -164,20 +142,18 @@ static const SDL_mutex_impl_t SDL_mutex_impl_srw = SDL_MUTEX_SRW, }; - /** * Fallback Mutex implementation using Critical Sections (before Win 7) */ /* Create a mutex */ -static SDL_mutex * -SDL_CreateMutex_cs(void) +static SDL_mutex *SDL_CreateMutex_cs(void) { SDL_mutex_cs *mutex; /* Allocate mutex memory */ - mutex = (SDL_mutex_cs *) SDL_malloc(sizeof(*mutex)); - if (mutex) { + mutex = (SDL_mutex_cs *)SDL_malloc(sizeof(*mutex)); + if (mutex != NULL) { /* Initialize */ /* On SMP systems, a non-zero spin count generally helps performance */ #if __WINRT__ @@ -192,38 +168,28 @@ SDL_CreateMutex_cs(void) } /* Free the mutex */ -static void -SDL_DestroyMutex_cs(SDL_mutex * mutex_) +static void SDL_DestroyMutex_cs(SDL_mutex *mutex_) { SDL_mutex_cs *mutex = (SDL_mutex_cs *)mutex_; - if (mutex) { - DeleteCriticalSection(&mutex->cs); - SDL_free(mutex); - } + + DeleteCriticalSection(&mutex->cs); + SDL_free(mutex); } /* Lock the mutex */ -static int -SDL_LockMutex_cs(SDL_mutex * mutex_) +static int SDL_LockMutex_cs(SDL_mutex *mutex_) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { SDL_mutex_cs *mutex = (SDL_mutex_cs *)mutex_; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } EnterCriticalSection(&mutex->cs); return 0; } /* TryLock the mutex */ -static int -SDL_TryLockMutex_cs(SDL_mutex * mutex_) +static int SDL_TryLockMutex_cs(SDL_mutex *mutex_) { SDL_mutex_cs *mutex = (SDL_mutex_cs *)mutex_; int retval = 0; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } if (TryEnterCriticalSection(&mutex->cs) == 0) { retval = SDL_MUTEX_TIMEDOUT; @@ -232,20 +198,15 @@ SDL_TryLockMutex_cs(SDL_mutex * mutex_) } /* Unlock the mutex */ -static int -SDL_UnlockMutex_cs(SDL_mutex * mutex_) +static int SDL_UnlockMutex_cs(SDL_mutex *mutex_) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */ { SDL_mutex_cs *mutex = (SDL_mutex_cs *)mutex_; - if (mutex == NULL) { - return SDL_InvalidParamError("mutex"); - } LeaveCriticalSection(&mutex->cs); return 0; } -static const SDL_mutex_impl_t SDL_mutex_impl_cs = -{ +static const SDL_mutex_impl_t SDL_mutex_impl_cs = { &SDL_CreateMutex_cs, &SDL_DestroyMutex_cs, &SDL_LockMutex_cs, @@ -254,17 +215,15 @@ static const SDL_mutex_impl_t SDL_mutex_impl_cs = SDL_MUTEX_CS, }; - /** * Runtime selection and redirection */ -SDL_mutex * -SDL_CreateMutex(void) +SDL_mutex *SDL_CreateMutex(void) { if (SDL_mutex_impl_active.Create == NULL) { /* Default to fallback implementation */ - const SDL_mutex_impl_t * impl = &SDL_mutex_impl_cs; + const SDL_mutex_impl_t *impl = &SDL_mutex_impl_cs; if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS, SDL_FALSE)) { #if __WINRT__ @@ -275,10 +234,10 @@ SDL_CreateMutex(void) HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll")); if (kernel32) { /* Requires Vista: */ - pReleaseSRWLockExclusive = (pfnReleaseSRWLockExclusive) GetProcAddress(kernel32, "ReleaseSRWLockExclusive"); - pAcquireSRWLockExclusive = (pfnAcquireSRWLockExclusive) GetProcAddress(kernel32, "AcquireSRWLockExclusive"); + pReleaseSRWLockExclusive = (pfnReleaseSRWLockExclusive)GetProcAddress(kernel32, "ReleaseSRWLockExclusive"); + pAcquireSRWLockExclusive = (pfnAcquireSRWLockExclusive)GetProcAddress(kernel32, "AcquireSRWLockExclusive"); /* Requires 7: */ - pTryAcquireSRWLockExclusive = (pfnTryAcquireSRWLockExclusive) GetProcAddress(kernel32, "TryAcquireSRWLockExclusive"); + pTryAcquireSRWLockExclusive = (pfnTryAcquireSRWLockExclusive)GetProcAddress(kernel32, "TryAcquireSRWLockExclusive"); if (pReleaseSRWLockExclusive && pAcquireSRWLockExclusive && pTryAcquireSRWLockExclusive) { impl = &SDL_mutex_impl_srw; } @@ -292,23 +251,37 @@ SDL_CreateMutex(void) return SDL_mutex_impl_active.Create(); } -void -SDL_DestroyMutex(SDL_mutex * mutex) { - SDL_mutex_impl_active.Destroy(mutex); +void SDL_DestroyMutex(SDL_mutex *mutex) +{ + if (mutex) { + SDL_mutex_impl_active.Destroy(mutex); + } } -int -SDL_LockMutex(SDL_mutex * mutex) { +int SDL_LockMutex(SDL_mutex *mutex) +{ + if (mutex == NULL) { + return 0; + } + return SDL_mutex_impl_active.Lock(mutex); } -int -SDL_TryLockMutex(SDL_mutex * mutex) { +int SDL_TryLockMutex(SDL_mutex *mutex) +{ + if (mutex == NULL) { + return 0; + } + return SDL_mutex_impl_active.TryLock(mutex); } -int -SDL_UnlockMutex(SDL_mutex * mutex) { +int SDL_UnlockMutex(SDL_mutex *mutex) +{ + if (mutex == NULL) { + return 0; + } + return SDL_mutex_impl_active.Unlock(mutex); } diff --git a/modules/SDL2/src/thread/windows/SDL_sysmutex_c.h b/modules/SDL2/src/thread/windows/SDL_sysmutex_c.h index b3902d9..c5f28d0 100644 --- a/modules/SDL2/src/thread/windows/SDL_sysmutex_c.h +++ b/modules/SDL2/src/thread/windows/SDL_sysmutex_c.h @@ -39,21 +39,24 @@ typedef enum typedef struct SDL_mutex_impl_t { - pfnSDL_CreateMutex Create; + pfnSDL_CreateMutex Create; pfnSDL_DestroyMutex Destroy; - pfnSDL_LockMutex Lock; + pfnSDL_LockMutex Lock; pfnSDL_TryLockMutex TryLock; - pfnSDL_UnlockMutex Unlock; + pfnSDL_UnlockMutex Unlock; /* Needed by SDL_cond: */ - SDL_MutexType Type; + SDL_MutexType Type; } SDL_mutex_impl_t; extern SDL_mutex_impl_t SDL_mutex_impl_active; - #ifndef SRWLOCK_INIT -#define SRWLOCK_INIT {0} -typedef struct _SRWLOCK { +#define SRWLOCK_INIT \ + { \ + 0 \ + } +typedef struct _SRWLOCK +{ PVOID Ptr; } SRWLOCK, *PSRWLOCK; #endif diff --git a/modules/SDL2/src/thread/windows/SDL_syssem.c b/modules/SDL2/src/thread/windows/SDL_syssem.c index 7be671e..6853549 100644 --- a/modules/SDL2/src/thread/windows/SDL_syssem.c +++ b/modules/SDL2/src/thread/windows/SDL_syssem.c @@ -31,7 +31,7 @@ * Faster due to significantly less context switches. * Requires Windows 8 or newer. * which are chosen at runtime. -*/ + */ #include "../../core/windows/SDL_windows.h" @@ -49,18 +49,17 @@ typedef int (*pfnSDL_SemPost)(SDL_sem *); typedef struct SDL_semaphore_impl_t { - pfnSDL_CreateSemaphore Create; + pfnSDL_CreateSemaphore Create; pfnSDL_DestroySemaphore Destroy; - pfnSDL_SemWaitTimeout WaitTimeout; - pfnSDL_SemTryWait TryWait; - pfnSDL_SemWait Wait; - pfnSDL_SemValue Value; - pfnSDL_SemPost Post; + pfnSDL_SemWaitTimeout WaitTimeout; + pfnSDL_SemTryWait TryWait; + pfnSDL_SemWait Wait; + pfnSDL_SemValue Value; + pfnSDL_SemPost Post; } SDL_sem_impl_t; /* Implementation will be chosen at runtime based on available Kernel features */ -static SDL_sem_impl_t SDL_sem_impl_active = {0}; - +static SDL_sem_impl_t SDL_sem_impl_active = { 0 }; /** * Atomic + WaitOnAddress implementation @@ -70,7 +69,7 @@ static SDL_sem_impl_t SDL_sem_impl_active = {0}; /* https://www.microsoft.com/en-us/download/details.aspx?id=47328 */ #if (HAVE_WINAPIFAMILY_H) && defined(WINAPI_FAMILY_PHONE_APP) -#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) +#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) #else #define SDL_WINAPI_FAMILY_PHONE 0 #endif @@ -78,10 +77,10 @@ static SDL_sem_impl_t SDL_sem_impl_active = {0}; #if !SDL_WINAPI_FAMILY_PHONE #if __WINRT__ /* Functions are guaranteed to be available */ -#define pWaitOnAddress WaitOnAddress +#define pWaitOnAddress WaitOnAddress #define pWakeByAddressSingle WakeByAddressSingle #else -typedef BOOL(WINAPI *pfnWaitOnAddress)(volatile VOID*, PVOID, SIZE_T, DWORD); +typedef BOOL(WINAPI *pfnWaitOnAddress)(volatile VOID *, PVOID, SIZE_T, DWORD); typedef VOID(WINAPI *pfnWakeByAddressSingle)(PVOID); static pfnWaitOnAddress pWaitOnAddress = NULL; @@ -93,13 +92,12 @@ typedef struct SDL_semaphore_atom LONG count; } SDL_sem_atom; -static SDL_sem * -SDL_CreateSemaphore_atom(Uint32 initial_value) +static SDL_sem *SDL_CreateSemaphore_atom(Uint32 initial_value) { SDL_sem_atom *sem; - sem = (SDL_sem_atom *) SDL_malloc(sizeof(*sem)); - if (sem) { + sem = (SDL_sem_atom *)SDL_malloc(sizeof(*sem)); + if (sem != NULL) { sem->count = initial_value; } else { SDL_OutOfMemory(); @@ -107,21 +105,19 @@ SDL_CreateSemaphore_atom(Uint32 initial_value) return (SDL_sem *)sem; } -static void -SDL_DestroySemaphore_atom(SDL_sem * sem) +static void SDL_DestroySemaphore_atom(SDL_sem *sem) { - if (sem) { + if (sem != NULL) { SDL_free(sem); } } -static int -SDL_SemTryWait_atom(SDL_sem * _sem) +static int SDL_SemTryWait_atom(SDL_sem *_sem) { SDL_sem_atom *sem = (SDL_sem_atom *)_sem; LONG count; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -137,13 +133,12 @@ SDL_SemTryWait_atom(SDL_sem * _sem) return SDL_MUTEX_TIMEDOUT; } -static int -SDL_SemWait_atom(SDL_sem * _sem) +static int SDL_SemWait_atom(SDL_sem *_sem) { SDL_sem_atom *sem = (SDL_sem_atom *)_sem; LONG count; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -162,8 +157,7 @@ SDL_SemWait_atom(SDL_sem * _sem) } } -static int -SDL_SemWaitTimeout_atom(SDL_sem * _sem, Uint32 timeout) +static int SDL_SemWaitTimeout_atom(SDL_sem *_sem, Uint32 timeout) { SDL_sem_atom *sem = (SDL_sem_atom *)_sem; LONG count; @@ -175,7 +169,7 @@ SDL_SemWaitTimeout_atom(SDL_sem * _sem, Uint32 timeout) return SDL_SemWait_atom(_sem); } - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -184,7 +178,7 @@ SDL_SemWaitTimeout_atom(SDL_sem * _sem, Uint32 timeout) * need to recalculate the effective timeout before every wait */ now = SDL_GetTicks(); - deadline = now + (DWORD) timeout; + deadline = now + (DWORD)timeout; for (;;) { count = sem->count; @@ -213,12 +207,11 @@ SDL_SemWaitTimeout_atom(SDL_sem * _sem, Uint32 timeout) } } -static Uint32 -SDL_SemValue_atom(SDL_sem * _sem) +static Uint32 SDL_SemValue_atom(SDL_sem *_sem) { SDL_sem_atom *sem = (SDL_sem_atom *)_sem; - if (!sem) { + if (sem == NULL) { SDL_InvalidParamError("sem"); return 0; } @@ -226,12 +219,11 @@ SDL_SemValue_atom(SDL_sem * _sem) return (Uint32)sem->count; } -static int -SDL_SemPost_atom(SDL_sem * _sem) +static int SDL_SemPost_atom(SDL_sem *_sem) { SDL_sem_atom *sem = (SDL_sem_atom *)_sem; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } @@ -241,8 +233,7 @@ SDL_SemPost_atom(SDL_sem * _sem) return 0; } -static const SDL_sem_impl_t SDL_sem_impl_atom = -{ +static const SDL_sem_impl_t SDL_sem_impl_atom = { &SDL_CreateSemaphore_atom, &SDL_DestroySemaphore_atom, &SDL_SemWaitTimeout_atom, @@ -253,7 +244,6 @@ static const SDL_sem_impl_t SDL_sem_impl_atom = }; #endif /* !SDL_WINAPI_FAMILY_PHONE */ - /** * Fallback Semaphore implementation using Kernel Semaphores */ @@ -265,14 +255,13 @@ typedef struct SDL_semaphore_kern } SDL_sem_kern; /* Create a semaphore */ -static SDL_sem * -SDL_CreateSemaphore_kern(Uint32 initial_value) +static SDL_sem *SDL_CreateSemaphore_kern(Uint32 initial_value) { SDL_sem_kern *sem; /* Allocate sem memory */ - sem = (SDL_sem_kern *) SDL_malloc(sizeof(*sem)); - if (sem) { + sem = (SDL_sem_kern *)SDL_malloc(sizeof(*sem)); + if (sem != NULL) { /* Create the semaphore, with max value 32K */ #if __WINRT__ sem->id = CreateSemaphoreEx(NULL, initial_value, 32 * 1024, NULL, 0, SEMAPHORE_ALL_ACCESS); @@ -292,11 +281,10 @@ SDL_CreateSemaphore_kern(Uint32 initial_value) } /* Free the semaphore */ -static void -SDL_DestroySemaphore_kern(SDL_sem * _sem) +static void SDL_DestroySemaphore_kern(SDL_sem *_sem) { SDL_sem_kern *sem = (SDL_sem_kern *)_sem; - if (sem) { + if (sem != NULL) { if (sem->id) { CloseHandle(sem->id); sem->id = 0; @@ -305,21 +293,20 @@ SDL_DestroySemaphore_kern(SDL_sem * _sem) } } -static int -SDL_SemWaitTimeout_kern(SDL_sem * _sem, Uint32 timeout) +static int SDL_SemWaitTimeout_kern(SDL_sem *_sem, Uint32 timeout) { SDL_sem_kern *sem = (SDL_sem_kern *)_sem; int retval; DWORD dwMilliseconds; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } if (timeout == SDL_MUTEX_MAXWAIT) { dwMilliseconds = INFINITE; } else { - dwMilliseconds = (DWORD) timeout; + dwMilliseconds = (DWORD)timeout; } switch (WaitForSingleObjectEx(sem->id, dwMilliseconds, FALSE)) { case WAIT_OBJECT_0: @@ -336,35 +323,31 @@ SDL_SemWaitTimeout_kern(SDL_sem * _sem, Uint32 timeout) return retval; } -static int -SDL_SemTryWait_kern(SDL_sem * sem) +static int SDL_SemTryWait_kern(SDL_sem *sem) { return SDL_SemWaitTimeout_kern(sem, 0); } -static int -SDL_SemWait_kern(SDL_sem * sem) +static int SDL_SemWait_kern(SDL_sem *sem) { return SDL_SemWaitTimeout_kern(sem, SDL_MUTEX_MAXWAIT); } /* Returns the current count of the semaphore */ -static Uint32 -SDL_SemValue_kern(SDL_sem * _sem) +static Uint32 SDL_SemValue_kern(SDL_sem *_sem) { SDL_sem_kern *sem = (SDL_sem_kern *)_sem; - if (!sem) { + if (sem == NULL) { SDL_InvalidParamError("sem"); return 0; } return (Uint32)sem->count; } -static int -SDL_SemPost_kern(SDL_sem * _sem) +static int SDL_SemPost_kern(SDL_sem *_sem) { SDL_sem_kern *sem = (SDL_sem_kern *)_sem; - if (!sem) { + if (sem == NULL) { return SDL_InvalidParamError("sem"); } /* Increase the counter in the first place, because @@ -374,14 +357,13 @@ SDL_SemPost_kern(SDL_sem * _sem) */ InterlockedIncrement(&sem->count); if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) { - InterlockedDecrement(&sem->count); /* restore */ + InterlockedDecrement(&sem->count); /* restore */ return SDL_SetError("ReleaseSemaphore() failed"); } return 0; } -static const SDL_sem_impl_t SDL_sem_impl_kern = -{ +static const SDL_sem_impl_t SDL_sem_impl_kern = { &SDL_CreateSemaphore_kern, &SDL_DestroySemaphore_kern, &SDL_SemWaitTimeout_kern, @@ -391,17 +373,15 @@ static const SDL_sem_impl_t SDL_sem_impl_kern = &SDL_SemPost_kern, }; - /** * Runtime selection and redirection */ -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) +SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { if (SDL_sem_impl_active.Create == NULL) { /* Default to fallback implementation */ - const SDL_sem_impl_t * impl = &SDL_sem_impl_kern; + const SDL_sem_impl_t *impl = &SDL_sem_impl_kern; #if !SDL_WINAPI_FAMILY_PHONE if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL, SDL_FALSE)) { @@ -418,10 +398,10 @@ SDL_CreateSemaphore(Uint32 initial_value) HMODULE synch120 = GetModuleHandle(TEXT("api-ms-win-core-synch-l1-2-0.dll")); if (synch120) { /* Try to load required functions provided by Win 8 or newer */ - pWaitOnAddress = (pfnWaitOnAddress) GetProcAddress(synch120, "WaitOnAddress"); - pWakeByAddressSingle = (pfnWakeByAddressSingle) GetProcAddress(synch120, "WakeByAddressSingle"); + pWaitOnAddress = (pfnWaitOnAddress)GetProcAddress(synch120, "WaitOnAddress"); + pWakeByAddressSingle = (pfnWakeByAddressSingle)GetProcAddress(synch120, "WakeByAddressSingle"); - if(pWaitOnAddress && pWakeByAddressSingle) { + if (pWaitOnAddress && pWakeByAddressSingle) { impl = &SDL_sem_impl_atom; } } @@ -435,38 +415,32 @@ SDL_CreateSemaphore(Uint32 initial_value) return SDL_sem_impl_active.Create(initial_value); } -void -SDL_DestroySemaphore(SDL_sem * sem) +void SDL_DestroySemaphore(SDL_sem *sem) { SDL_sem_impl_active.Destroy(sem); } -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) +int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { return SDL_sem_impl_active.WaitTimeout(sem, timeout); } -int -SDL_SemTryWait(SDL_sem * sem) +int SDL_SemTryWait(SDL_sem *sem) { return SDL_sem_impl_active.TryWait(sem); } -int -SDL_SemWait(SDL_sem * sem) +int SDL_SemWait(SDL_sem *sem) { return SDL_sem_impl_active.Wait(sem); } -Uint32 -SDL_SemValue(SDL_sem * sem) +Uint32 SDL_SemValue(SDL_sem *sem) { return SDL_sem_impl_active.Value(sem); } -int -SDL_SemPost(SDL_sem * sem) +int SDL_SemPost(SDL_sem *sem) { return SDL_sem_impl_active.Post(sem); } diff --git a/modules/SDL2/src/thread/windows/SDL_systhread.c b/modules/SDL2/src/thread/windows/SDL_systhread.c index 8a2748a..b55eb13 100644 --- a/modules/SDL2/src/thread/windows/SDL_systhread.c +++ b/modules/SDL2/src/thread/windows/SDL_systhread.c @@ -30,55 +30,24 @@ #include "../SDL_systhread.h" #include "SDL_systhread_c.h" -#ifndef SDL_PASSED_BEGINTHREAD_ENDTHREAD -/* We'll use the C library from this DLL */ -#include - #ifndef STACK_SIZE_PARAM_IS_A_RESERVATION #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 #endif -/* Cygwin gcc-3 ... MingW64 (even with a i386 host) does this like MSVC. */ -#if (defined(__MINGW32__) && (__GNUC__ < 4)) -typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall *func)(void *), void *arg, - unsigned, unsigned *threadID); -typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code); - -#elif defined(__WATCOMC__) -/* This is for Watcom targets except OS2 */ -#if __WATCOMC__ < 1240 -#define __watcall -#endif -typedef unsigned long (__watcall * pfnSDL_CurrentBeginThread) (void *, - unsigned, - unsigned - (__stdcall * - func) (void - *), - void *arg, - unsigned, - unsigned - *threadID); -typedef void (__watcall * pfnSDL_CurrentEndThread) (unsigned code); - -#else -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall * - func) (void - *), - void *arg, unsigned, - unsigned *threadID); -typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); -#endif +#ifndef SDL_PASSED_BEGINTHREAD_ENDTHREAD +/* We'll use the C library from this DLL */ +#include +typedef uintptr_t(__cdecl *pfnSDL_CurrentBeginThread)(void *, unsigned, + unsigned(__stdcall *func)(void*), + void *arg, unsigned, + unsigned *threadID); +typedef void(__cdecl *pfnSDL_CurrentEndThread)(unsigned code); #endif /* !SDL_PASSED_BEGINTHREAD_ENDTHREAD */ - -static DWORD -RunThread(void *data) +static DWORD RunThread(void *data) { - SDL_Thread *thread = (SDL_Thread *) data; - pfnSDL_CurrentEndThread pfnEndThread = (pfnSDL_CurrentEndThread) thread->endfunc; + SDL_Thread *thread = (SDL_Thread *)data; + pfnSDL_CurrentEndThread pfnEndThread = (pfnSDL_CurrentEndThread)thread->endfunc; SDL_RunThread(thread); if (pfnEndThread != NULL) { pfnEndThread(0); @@ -86,33 +55,28 @@ RunThread(void *data) return 0; } -static DWORD WINAPI -RunThreadViaCreateThread(LPVOID data) +static DWORD WINAPI MINGW32_FORCEALIGN RunThreadViaCreateThread(LPVOID data) { - return RunThread(data); + return RunThread(data); } -static unsigned __stdcall -RunThreadViaBeginThreadEx(void *data) +static unsigned __stdcall MINGW32_FORCEALIGN RunThreadViaBeginThreadEx(void *data) { - return (unsigned) RunThread(data); + return (unsigned)RunThread(data); } #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD -int -SDL_SYS_CreateThread(SDL_Thread * thread, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread) +int SDL_SYS_CreateThread(SDL_Thread *thread, + pfnSDL_CurrentBeginThread pfnBeginThread, + pfnSDL_CurrentEndThread pfnEndThread) { #elif defined(__CYGWIN__) || defined(__WINRT__) -int -SDL_SYS_CreateThread(SDL_Thread * thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) { pfnSDL_CurrentBeginThread pfnBeginThread = NULL; pfnSDL_CurrentEndThread pfnEndThread = NULL; #else -int -SDL_SYS_CreateThread(SDL_Thread * thread) +int SDL_SYS_CreateThread(SDL_Thread *thread) { pfnSDL_CurrentBeginThread pfnBeginThread = (pfnSDL_CurrentBeginThread)_beginthreadex; pfnSDL_CurrentEndThread pfnEndThread = (pfnSDL_CurrentEndThread)_endthreadex; @@ -125,10 +89,9 @@ SDL_SYS_CreateThread(SDL_Thread * thread) /* thread->stacksize == 0 means "system default", same as win32 expects */ if (pfnBeginThread) { unsigned threadid = 0; - thread->handle = (SYS_ThreadHandle) - ((size_t) pfnBeginThread(NULL, (unsigned int) thread->stacksize, - RunThreadViaBeginThreadEx, - thread, flags, &threadid)); + thread->handle = (SYS_ThreadHandle)((size_t)pfnBeginThread(NULL, (unsigned int)thread->stacksize, + RunThreadViaBeginThreadEx, + thread, flags, &threadid)); } else { DWORD threadid = 0; thread->handle = CreateThread(NULL, thread->stacksize, @@ -141,31 +104,29 @@ SDL_SYS_CreateThread(SDL_Thread * thread) return 0; } -#pragma pack(push,8) +#pragma pack(push, 8) typedef struct tagTHREADNAME_INFO { - DWORD dwType; /* must be 0x1000 */ - LPCSTR szName; /* pointer to name (in user addr space) */ + DWORD dwType; /* must be 0x1000 */ + LPCSTR szName; /* pointer to name (in user addr space) */ DWORD dwThreadID; /* thread ID (-1=caller thread) */ - DWORD dwFlags; /* reserved for future use, must be zero */ + DWORD dwFlags; /* reserved for future use, must be zero */ } THREADNAME_INFO; #pragma pack(pop) +typedef HRESULT(WINAPI *pfnSetThreadDescription)(HANDLE, PCWSTR); -typedef HRESULT (WINAPI *pfnSetThreadDescription)(HANDLE, PCWSTR); - -void -SDL_SYS_SetupThread(const char *name) +void SDL_SYS_SetupThread(const char *name) { if (name != NULL) { - #ifndef __WINRT__ /* !!! FIXME: There's no LoadLibrary() in WinRT; don't know if SetThreadDescription is available there at all at the moment. */ +#ifndef __WINRT__ /* !!! FIXME: There's no LoadLibrary() in WinRT; don't know if SetThreadDescription is available there at all at the moment. */ static pfnSetThreadDescription pSetThreadDescription = NULL; - static HMODULE kernel32 = 0; + static HMODULE kernel32 = NULL; if (!kernel32) { kernel32 = GetModuleHandle(TEXT("kernel32.dll")); if (kernel32) { - pSetThreadDescription = (pfnSetThreadDescription) GetProcAddress(kernel32, "SetThreadDescription"); + pSetThreadDescription = (pfnSetThreadDescription)GetProcAddress(kernel32, "SetThreadDescription"); } } @@ -176,7 +137,7 @@ SDL_SYS_SetupThread(const char *name) SDL_free(strw); } } - #endif +#endif /* Presumably some version of Visual Studio will understand SetThreadDescription(), but we still need to deal with older OSes and debuggers. Set it with the arcane @@ -194,23 +155,21 @@ SDL_SYS_SetupThread(const char *name) SDL_zero(inf); inf.dwType = 0x1000; inf.szName = name; - inf.dwThreadID = (DWORD) -1; + inf.dwThreadID = (DWORD)-1; inf.dwFlags = 0; /* The debugger catches this, renames the thread, continues on. */ - RaiseException(0x406D1388, 0, sizeof(inf) / sizeof(ULONG), (const ULONG_PTR*) &inf); + RaiseException(0x406D1388, 0, sizeof(inf) / sizeof(ULONG), (const ULONG_PTR *)&inf); } } } -SDL_threadID -SDL_ThreadID(void) +SDL_threadID SDL_ThreadID(void) { - return ((SDL_threadID) GetCurrentThreadId()); + return (SDL_threadID)GetCurrentThreadId(); } -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) +int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) { int value; @@ -229,15 +188,13 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) return 0; } -void -SDL_SYS_WaitThread(SDL_Thread * thread) +void SDL_SYS_WaitThread(SDL_Thread *thread) { WaitForSingleObjectEx(thread->handle, INFINITE, FALSE); CloseHandle(thread->handle); } -void -SDL_SYS_DetachThread(SDL_Thread * thread) +void SDL_SYS_DetachThread(SDL_Thread *thread) { CloseHandle(thread->handle); } diff --git a/modules/SDL2/src/thread/windows/SDL_systls.c b/modules/SDL2/src/thread/windows/SDL_systls.c index f3d2b3c..b4be434 100644 --- a/modules/SDL2/src/thread/windows/SDL_systls.c +++ b/modules/SDL2/src/thread/windows/SDL_systls.c @@ -32,7 +32,7 @@ #include #ifndef TLS_OUT_OF_INDEXES -#define TLS_OUT_OF_INDEXES FLS_OUT_OF_INDEXES +#define TLS_OUT_OF_INDEXES FLS_OUT_OF_INDEXES #endif #define TlsAlloc() FlsAlloc(NULL) @@ -43,8 +43,7 @@ static DWORD thread_local_storage = TLS_OUT_OF_INDEXES; static SDL_bool generic_local_storage = SDL_FALSE; -SDL_TLSData * -SDL_SYS_GetTLSData(void) +SDL_TLSData *SDL_SYS_GetTLSData(void) { if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) { static SDL_SpinLock lock; @@ -67,8 +66,7 @@ SDL_SYS_GetTLSData(void) return (SDL_TLSData *)TlsGetValue(thread_local_storage); } -int -SDL_SYS_SetTLSData(SDL_TLSData *data) +int SDL_SYS_SetTLSData(SDL_TLSData *data) { if (generic_local_storage) { return SDL_Generic_SetTLSData(data); diff --git a/modules/SDL2/src/timer/SDL_timer.c b/modules/SDL2/src/timer/SDL_timer.c index a3278e5..874f154 100644 --- a/modules/SDL2/src/timer/SDL_timer.c +++ b/modules/SDL2/src/timer/SDL_timer.c @@ -49,7 +49,8 @@ typedef struct _SDL_TimerMap } SDL_TimerMap; /* The timers are kept in a sorted list */ -typedef struct { +typedef struct +{ /* Data used by the main thread */ SDL_Thread *thread; SDL_atomic_t nextID; @@ -78,14 +79,13 @@ static SDL_TimerData SDL_timer_data; * Timers are removed by simply setting a canceled flag */ -static void -SDL_AddTimerInternal(SDL_TimerData *data, SDL_Timer *timer) +static void SDL_AddTimerInternal(SDL_TimerData *data, SDL_Timer *timer) { SDL_Timer *prev, *curr; prev = NULL; for (curr = data->timers; curr; prev = curr, curr = curr->next) { - if ((Sint32)(timer->scheduled-curr->scheduled) < 0) { + if ((Sint32)(timer->scheduled - curr->scheduled) < 0) { break; } } @@ -99,8 +99,7 @@ SDL_AddTimerInternal(SDL_TimerData *data, SDL_Timer *timer) timer->next = curr; } -static int SDLCALL -SDL_TimerThread(void *_data) +static int SDLCALL SDL_TimerThread(void *_data) { SDL_TimerData *data = (SDL_TimerData *)_data; SDL_Timer *pending; @@ -114,7 +113,7 @@ SDL_TimerThread(void *_data) * 2. Handle any timers that should dispatch this cycle * 3. Wait until next dispatch time or new timer arrives */ - for ( ; ; ) { + for (;;) { /* Pending and freelist maintenance */ SDL_AtomicLock(&data->lock); { @@ -153,7 +152,7 @@ SDL_TimerThread(void *_data) while (data->timers) { current = data->timers; - if ((Sint32)(tick-current->scheduled) < 0) { + if ((Sint32)(tick - current->scheduled) < 0) { /* Scheduled for the future, wait a bit */ delay = (current->scheduled - tick); break; @@ -174,7 +173,7 @@ SDL_TimerThread(void *_data) current->scheduled = tick + interval; SDL_AddTimerInternal(data, current); } else { - if (!freelist_head) { + if (freelist_head == NULL) { freelist_head = current; } if (freelist_tail) { @@ -205,8 +204,7 @@ SDL_TimerThread(void *_data) return 0; } -int -SDL_TimerInit(void) +int SDL_TimerInit(void) { SDL_TimerData *data = &SDL_timer_data; @@ -237,14 +235,13 @@ SDL_TimerInit(void) return 0; } -void -SDL_TimerQuit(void) +void SDL_TimerQuit(void) { SDL_TimerData *data = &SDL_timer_data; SDL_Timer *timer; SDL_TimerMap *entry; - if (SDL_AtomicCAS(&data->active, 1, 0)) { /* active? Move to inactive. */ + if (SDL_AtomicCAS(&data->active, 1, 0)) { /* active? Move to inactive. */ /* Shutdown the timer thread */ if (data->thread) { SDL_SemPost(data->sem); @@ -277,8 +274,7 @@ SDL_TimerQuit(void) } } -SDL_TimerID -SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) +SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) { SDL_TimerData *data = &SDL_timer_data; SDL_Timer *timer; @@ -302,7 +298,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) SDL_RemoveTimer(timer->timerID); } else { timer = (SDL_Timer *)SDL_malloc(sizeof(*timer)); - if (!timer) { + if (timer == NULL) { SDL_OutOfMemory(); return 0; } @@ -315,7 +311,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) SDL_AtomicSet(&timer->canceled, 0); entry = (SDL_TimerMap *)SDL_malloc(sizeof(*entry)); - if (!entry) { + if (entry == NULL) { SDL_free(timer); SDL_OutOfMemory(); return 0; @@ -340,8 +336,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) return entry->timerID; } -SDL_bool -SDL_RemoveTimer(SDL_TimerID id) +SDL_bool SDL_RemoveTimer(SDL_TimerID id) { SDL_TimerData *data = &SDL_timer_data; SDL_TimerMap *prev, *entry; @@ -387,17 +382,17 @@ typedef struct _SDL_TimerMap struct _SDL_TimerMap *next; } SDL_TimerMap; -typedef struct { +typedef struct +{ int nextID; SDL_TimerMap *timermap; } SDL_TimerData; static SDL_TimerData SDL_timer_data; -static void -SDL_Emscripten_TimerHelper(void *userdata) +static void SDL_Emscripten_TimerHelper(void *userdata) { - SDL_TimerMap *entry = (SDL_TimerMap*)userdata; + SDL_TimerMap *entry = (SDL_TimerMap *)userdata; entry->interval = entry->callback(entry->interval, entry->param); if (entry->interval > 0) { entry->timeoutID = emscripten_set_timeout(&SDL_Emscripten_TimerHelper, @@ -406,14 +401,12 @@ SDL_Emscripten_TimerHelper(void *userdata) } } -int -SDL_TimerInit(void) +int SDL_TimerInit(void) { return 0; } -void -SDL_TimerQuit(void) +void SDL_TimerQuit(void) { SDL_TimerData *data = &SDL_timer_data; SDL_TimerMap *entry; @@ -425,14 +418,13 @@ SDL_TimerQuit(void) } } -SDL_TimerID -SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) +SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) { SDL_TimerData *data = &SDL_timer_data; SDL_TimerMap *entry; entry = (SDL_TimerMap *)SDL_malloc(sizeof(*entry)); - if (!entry) { + if (entry == NULL) { SDL_OutOfMemory(); return 0; } @@ -451,8 +443,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) return entry->timerID; } -SDL_bool -SDL_RemoveTimer(SDL_TimerID id) +SDL_bool SDL_RemoveTimer(SDL_TimerID id) { SDL_TimerData *data = &SDL_timer_data; SDL_TimerMap *prev, *entry; @@ -485,10 +476,9 @@ SDL_RemoveTimer(SDL_TimerID id) which wraps back to zero every ~49 days. The newer SDL_GetTicks64() doesn't have this problem, so we just wrap that function and clamp to the low 32-bits for binary compatibility. */ -Uint32 -SDL_GetTicks(void) +Uint32 SDL_GetTicks(void) { - return (Uint32) (SDL_GetTicks64() & 0xFFFFFFFF); + return (Uint32)(SDL_GetTicks64() & 0xFFFFFFFF); } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/timer/SDL_timer_c.h b/modules/SDL2/src/timer/SDL_timer_c.h index 50d1b2e..c6de568 100644 --- a/modules/SDL2/src/timer/SDL_timer_c.h +++ b/modules/SDL2/src/timer/SDL_timer_c.h @@ -28,7 +28,7 @@ #include "SDL_timer.h" #define ROUND_RESOLUTION(X) \ - (((X+TIMER_RESOLUTION-1)/TIMER_RESOLUTION)*TIMER_RESOLUTION) + (((X + TIMER_RESOLUTION - 1) / TIMER_RESOLUTION) * TIMER_RESOLUTION) extern void SDL_TicksInit(void); extern void SDL_TicksQuit(void); diff --git a/modules/SDL2/src/timer/dummy/SDL_systimer.c b/modules/SDL2/src/timer/dummy/SDL_systimer.c index c8a985b..8b32357 100644 --- a/modules/SDL2/src/timer/dummy/SDL_systimer.c +++ b/modules/SDL2/src/timer/dummy/SDL_systimer.c @@ -26,8 +26,7 @@ static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -35,14 +34,12 @@ SDL_TicksInit(void) ticks_started = SDL_TRUE; } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { if (!ticks_started) { SDL_TicksInit(); @@ -52,20 +49,17 @@ SDL_GetTicks64(void) return 0; } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return SDL_GetTicks(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { SDL_Unsupported(); } diff --git a/modules/SDL2/src/timer/haiku/SDL_systimer.c b/modules/SDL2/src/timer/haiku/SDL_systimer.c index 8c52d55..1c2970b 100644 --- a/modules/SDL2/src/timer/haiku/SDL_systimer.c +++ b/modules/SDL2/src/timer/haiku/SDL_systimer.c @@ -29,8 +29,7 @@ static bigtime_t start; static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -41,36 +40,31 @@ SDL_TicksInit(void) start = system_time(); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { if (!ticks_started) { SDL_TicksInit(); } - return (Uint64) ((system_time() - start) / 1000); + return (Uint64)((system_time() - start) / 1000); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return system_time(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000000; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { snooze(ms * 1000); } diff --git a/modules/SDL2/src/timer/n3ds/SDL_systimer.c b/modules/SDL2/src/timer/n3ds/SDL_systimer.c index d294ea9..2a9c38b 100644 --- a/modules/SDL2/src/timer/n3ds/SDL_systimer.c +++ b/modules/SDL2/src/timer/n3ds/SDL_systimer.c @@ -29,8 +29,7 @@ static u64 start_tick; #define NSEC_PER_MSEC 1000000ULL -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -40,14 +39,12 @@ SDL_TicksInit(void) start_tick = svcGetSystemTick(); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { u64 elapsed; if (!ticks_started) { @@ -58,20 +55,17 @@ SDL_GetTicks64(void) return elapsed / CPU_TICKS_PER_MSEC; } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return svcGetSystemTick(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SYSCLOCK_ARM11; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { svcSleepThread(ms * NSEC_PER_MSEC); } diff --git a/modules/SDL2/src/timer/ngage/SDL_systimer.cpp b/modules/SDL2/src/timer/ngage/SDL_systimer.cpp index 76f2a1b..e2a45ce 100644 --- a/modules/SDL2/src/timer/ngage/SDL_systimer.cpp +++ b/modules/SDL2/src/timer/ngage/SDL_systimer.cpp @@ -28,42 +28,37 @@ #include "SDL_timer.h" static SDL_bool ticks_started = SDL_FALSE; -static TUint start = 0; -static TInt tickPeriodMilliSeconds; +static TUint start = 0; +static TInt tickPeriodMilliSeconds; #ifdef __cplusplus extern "C" { #endif -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { - if (ticks_started) - { + if (ticks_started) { return; } ticks_started = SDL_TRUE; - start = User::TickCount(); + start = User::TickCount(); TTimeIntervalMicroSeconds32 period; - TInt tmp = UserHal::TickPeriod(period); + TInt tmp = UserHal::TickPeriod(period); (void)tmp; /* Suppress redundant warning. */ tickPeriodMilliSeconds = period.Int() / 1000; } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { - if (! ticks_started) - { + if (!ticks_started) { SDL_TicksInit(); } @@ -73,20 +68,17 @@ SDL_GetTicks64(void) return (Uint64)(deltaTics * tickPeriodMilliSeconds); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return (Uint64)User::TickCount(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000000; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { User::After(TTimeIntervalMicroSeconds32(ms * 1000)); } diff --git a/modules/SDL2/src/timer/os2/SDL_systimer.c b/modules/SDL2/src/timer/os2/SDL_systimer.c index a8c9958..0828300 100644 --- a/modules/SDL2/src/timer/os2/SDL_systimer.c +++ b/modules/SDL2/src/timer/os2/SDL_systimer.c @@ -43,8 +43,7 @@ static SDL_bool ticks_started = SDL_FALSE; static ULONG ulTmrFreq = 0; static ULLONG ullTmrStart = 0; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { ULONG ulTmrStart; /* for 32-bit fallback. */ ULONG ulRC; @@ -66,18 +65,16 @@ SDL_TicksInit(void) } ulTmrFreq = 0; /* Error - use DosQuerySysInfo() for timer. */ - DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulTmrStart, sizeof (ULONG)); + DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulTmrStart, sizeof(ULONG)); ullTmrStart = (ULLONG) ulTmrStart; } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { Uint64 ui64Result; ULLONG ullTmrNow; @@ -92,15 +89,14 @@ SDL_GetTicks64(void) } else { /* note that this counter rolls over to 0 every ~49 days. Fix your system so DosTmrQueryTime works if you need to avoid this. */ ULONG ulTmrNow; - DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulTmrNow, sizeof (ULONG)); + DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulTmrNow, sizeof(ULONG)); ui64Result = (((Uint64) ulTmrNow) - ullTmrStart); } return ui64Result; } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { QWORD qwTmrNow; @@ -110,14 +106,12 @@ SDL_GetPerformanceCounter(void) return *((Uint64 *)&qwTmrNow); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return (ulTmrFreq == 0)? 1000 : (Uint64)ulTmrFreq; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { HTIMER hTimer = NULLHANDLE; ULONG ulRC; diff --git a/modules/SDL2/src/timer/ps2/SDL_systimer.c b/modules/SDL2/src/timer/ps2/SDL_systimer.c index bdf3808..910f7a6 100644 --- a/modules/SDL2/src/timer/ps2/SDL_systimer.c +++ b/modules/SDL2/src/timer/ps2/SDL_systimer.c @@ -34,8 +34,7 @@ static uint64_t start; static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -45,14 +44,12 @@ SDL_TicksInit(void) start = GetTimerSystemTime(); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { uint64_t now; @@ -64,23 +61,21 @@ SDL_GetTicks64(void) return (Uint64)((now - start) / (kBUSCLK / CLOCKS_PER_SEC)); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return SDL_GetTicks64(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000; } void SDL_Delay(Uint32 ms) { - struct timespec tv = {0}; - tv.tv_sec = ms / 1000; - tv.tv_nsec = (ms % 1000) * 1000000; + struct timespec tv = { 0 }; + tv.tv_sec = ms / 1000; + tv.tv_nsec = (ms % 1000) * 1000000; nanosleep(&tv, NULL); } diff --git a/modules/SDL2/src/timer/psp/SDL_systimer.c b/modules/SDL2/src/timer/psp/SDL_systimer.c index 5d2d4b8..5337c77 100644 --- a/modules/SDL2/src/timer/psp/SDL_systimer.c +++ b/modules/SDL2/src/timer/psp/SDL_systimer.c @@ -34,8 +34,7 @@ static struct timeval start; static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -45,14 +44,12 @@ SDL_TicksInit(void) gettimeofday(&start, NULL); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { struct timeval now; @@ -64,14 +61,12 @@ SDL_GetTicks64(void) return (Uint64)(((Sint64)(now.tv_sec - start.tv_sec) * 1000) + ((now.tv_usec - start.tv_usec) / 1000)); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return SDL_GetTicks64(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000; } @@ -79,8 +74,9 @@ SDL_GetPerformanceFrequency(void) void SDL_Delay(Uint32 ms) { const Uint32 max_delay = 0xffffffffUL / 1000; - if(ms > max_delay) + if (ms > max_delay) { ms = max_delay; + } sceKernelDelayThreadCB(ms * 1000); } diff --git a/modules/SDL2/src/timer/unix/SDL_systimer.c b/modules/SDL2/src/timer/unix/SDL_systimer.c index a072d3b..5fe367e 100644 --- a/modules/SDL2/src/timer/unix/SDL_systimer.c +++ b/modules/SDL2/src/timer/unix/SDL_systimer.c @@ -73,8 +73,7 @@ static SDL_bool has_monotonic_time = SDL_FALSE; static struct timeval start_tv; static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -97,14 +96,12 @@ SDL_TicksInit(void) } } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { if (!ticks_started) { SDL_TicksInit(); @@ -117,7 +114,7 @@ SDL_GetTicks64(void) return (Uint64)(((Sint64)(now.tv_sec - start_ts.tv_sec) * 1000) + ((now.tv_nsec - start_ts.tv_nsec) / 1000000)); #elif defined(__APPLE__) const uint64_t now = mach_absolute_time(); - return ((((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000); + return (((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000; #else SDL_assert(SDL_FALSE); return 0; @@ -129,8 +126,7 @@ SDL_GetTicks64(void) } } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { Uint64 ticks; if (!ticks_started) { @@ -159,11 +155,10 @@ SDL_GetPerformanceCounter(void) ticks *= 1000000; ticks += now.tv_usec; } - return (ticks); + return ticks; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { if (!ticks_started) { SDL_TicksInit(); @@ -178,13 +173,12 @@ SDL_GetPerformanceFrequency(void) freq /= mach_base_info.numer; return freq; #endif - } - + } + return 1000000; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { int was_error; diff --git a/modules/SDL2/src/timer/vita/SDL_systimer.c b/modules/SDL2/src/timer/vita/SDL_systimer.c index c702798..f954bb7 100644 --- a/modules/SDL2/src/timer/vita/SDL_systimer.c +++ b/modules/SDL2/src/timer/vita/SDL_systimer.c @@ -34,8 +34,7 @@ static uint64_t start; static SDL_bool ticks_started = SDL_FALSE; -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { if (ticks_started) { return; @@ -45,14 +44,12 @@ SDL_TicksInit(void) start = sceKernelGetProcessTimeWide(); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { uint64_t now; @@ -61,17 +58,15 @@ SDL_GetTicks64(void) } now = sceKernelGetProcessTimeWide(); - return (Uint64) ((now - start) / 1000); + return (Uint64)((now - start) / 1000); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return sceKernelGetProcessTimeWide(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1000000; } @@ -79,8 +74,9 @@ SDL_GetPerformanceFrequency(void) void SDL_Delay(Uint32 ms) { const Uint32 max_delay = 0xffffffffUL / 1000; - if(ms > max_delay) + if (ms > max_delay) { ms = max_delay; + } sceKernelDelayThreadCB(ms * 1000); } diff --git a/modules/SDL2/src/timer/windows/SDL_systimer.c b/modules/SDL2/src/timer/windows/SDL_systimer.c index 8cf4267..e51c891 100644 --- a/modules/SDL2/src/timer/windows/SDL_systimer.c +++ b/modules/SDL2/src/timer/windows/SDL_systimer.c @@ -31,15 +31,14 @@ /* The first (low-resolution) ticks value of the application */ static DWORD start = 0; -static BOOL ticks_started = FALSE; +static BOOL ticks_started = FALSE; /* The first high-resolution ticks value of the application */ static LARGE_INTEGER start_ticks; /* The number of ticks per second of the high-resolution performance counter */ static LARGE_INTEGER ticks_per_second; -static void -SDL_SetSystemTimerResolution(const UINT uPeriod) +static void SDL_SetSystemTimerResolution(const UINT uPeriod) { #if !defined(__WINRT__) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) static UINT timer_period = 0; @@ -58,8 +57,7 @@ SDL_SetSystemTimerResolution(const UINT uPeriod) #endif } -static void SDLCALL -SDL_TimerResolutionChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL SDL_TimerResolutionChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { UINT uPeriod; @@ -74,8 +72,7 @@ SDL_TimerResolutionChanged(void *userdata, const char *name, const char *oldValu } } -void -SDL_TicksInit(void) +void SDL_TicksInit(void) { BOOL rc; @@ -94,24 +91,22 @@ SDL_TicksInit(void) so we'll rely on it here. */ rc = QueryPerformanceFrequency(&ticks_per_second); - SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ + SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ QueryPerformanceCounter(&start_ticks); } -void -SDL_TicksQuit(void) +void SDL_TicksQuit(void) { SDL_DelHintCallback(SDL_HINT_TIMER_RESOLUTION, SDL_TimerResolutionChanged, NULL); - SDL_SetSystemTimerResolution(0); /* always release our timer resolution request. */ + SDL_SetSystemTimerResolution(0); /* always release our timer resolution request. */ start = 0; ticks_started = SDL_FALSE; } -Uint64 -SDL_GetTicks64(void) +Uint64 SDL_GetTicks64(void) { LARGE_INTEGER now; BOOL rc; @@ -121,30 +116,27 @@ SDL_GetTicks64(void) } rc = QueryPerformanceCounter(&now); - SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ - return (Uint64) (((now.QuadPart - start_ticks.QuadPart) * 1000) / ticks_per_second.QuadPart); + SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ + return (Uint64)(((now.QuadPart - start_ticks.QuadPart) * 1000) / ticks_per_second.QuadPart); } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { LARGE_INTEGER counter; const BOOL rc = QueryPerformanceCounter(&counter); - SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ - return (Uint64) counter.QuadPart; + SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ + return (Uint64)counter.QuadPart; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { LARGE_INTEGER frequency; const BOOL rc = QueryPerformanceFrequency(&frequency); - SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ - return (Uint64) frequency.QuadPart; + SDL_assert(rc != 0); /* this should _never_ fail if you're on XP or later. */ + return (Uint64)frequency.QuadPart; } -void -SDL_Delay(Uint32 ms) +void SDL_Delay(Uint32 ms) { /* Sleep() is not publicly available to apps in early versions of WinRT. * diff --git a/modules/SDL2/src/video/SDL_RLEaccel.c b/modules/SDL2/src/video/SDL_RLEaccel.c index 891ef90..9f861eb 100644 --- a/modules/SDL2/src/video/SDL_RLEaccel.c +++ b/modules/SDL2/src/video/SDL_RLEaccel.c @@ -92,14 +92,14 @@ #include "SDL_blit.h" #include "SDL_RLEaccel_c.h" -#define PIXEL_COPY(to, from, len, bpp) \ +#define PIXEL_COPY(to, from, len, bpp) \ SDL_memcpy(to, from, (size_t)(len) * (bpp)) /* * Various colorkey blit methods, for opaque and per-surface alpha */ -#define OPAQUE_BLIT(to, from, length, bpp, alpha) \ +#define OPAQUE_BLIT(to, from, length, bpp, alpha) \ PIXEL_COPY(to, from, length, bpp) /* @@ -109,22 +109,22 @@ * of each component, so the bits from the multiplication don't collide. * This can be used for any RGB permutation of course. */ -#define ALPHA_BLIT32_888(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint32 *src = (Uint32 *)(from); \ - Uint32 *dst = (Uint32 *)(to); \ - for (i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - Uint32 s1 = s & 0xff00ff; \ - Uint32 d1 = d & 0xff00ff; \ +#define ALPHA_BLIT32_888(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint32 *src = (Uint32 *)(from); \ + Uint32 *dst = (Uint32 *)(to); \ + for (i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + Uint32 s1 = s & 0xff00ff; \ + Uint32 d1 = d & 0xff00ff; \ d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ - s &= 0xff00; \ - d &= 0xff00; \ - d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ - *dst++ = d1 | d; \ - } \ + s &= 0xff00; \ + d &= 0xff00; \ + d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ + *dst++ = d1 | d; \ + } \ } while (0) /* @@ -133,99 +133,99 @@ * components at the same time. Since the smallest gap is here just * 5 bits, we have to scale alpha down to 5 bits as well. */ -#define ALPHA_BLIT16_565(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - Uint32 ALPHA = alpha >> 3; \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - s = (s | s << 16) & 0x07e0f81f; \ - d = (d | d << 16) & 0x07e0f81f; \ - d += (s - d) * ALPHA >> 5; \ - d &= 0x07e0f81f; \ - *dst++ = (Uint16)(d | d >> 16); \ - } \ - } while(0) - -#define ALPHA_BLIT16_555(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - Uint32 ALPHA = alpha >> 3; \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - s = (s | s << 16) & 0x03e07c1f; \ - d = (d | d << 16) & 0x03e07c1f; \ - d += (s - d) * ALPHA >> 5; \ - d &= 0x03e07c1f; \ - *dst++ = (Uint16)(d | d >> 16); \ - } \ - } while(0) +#define ALPHA_BLIT16_565(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + Uint32 ALPHA = alpha >> 3; \ + for (i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + s = (s | s << 16) & 0x07e0f81f; \ + d = (d | d << 16) & 0x07e0f81f; \ + d += (s - d) * ALPHA >> 5; \ + d &= 0x07e0f81f; \ + *dst++ = (Uint16)(d | d >> 16); \ + } \ + } while (0) + +#define ALPHA_BLIT16_555(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + Uint32 ALPHA = alpha >> 3; \ + for (i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + s = (s | s << 16) & 0x03e07c1f; \ + d = (d | d << 16) & 0x03e07c1f; \ + d += (s - d) * ALPHA >> 5; \ + d &= 0x03e07c1f; \ + *dst++ = (Uint16)(d | d >> 16); \ + } \ + } while (0) /* * The general slow catch-all function, for remaining depths and formats */ -#define ALPHA_BLIT_ANY(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint8 *src = from; \ - Uint8 *dst = to; \ - for (i = 0; i < (int)(length); i++) { \ - Uint32 s, d; \ - unsigned rs, gs, bs, rd, gd, bd; \ - switch (bpp) { \ - case 2: \ - s = *(Uint16 *)src; \ - d = *(Uint16 *)dst; \ - break; \ - case 3: \ - if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ +#define ALPHA_BLIT_ANY(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint8 *src = from; \ + Uint8 *dst = to; \ + for (i = 0; i < (int)(length); i++) { \ + Uint32 s, d; \ + unsigned rs, gs, bs, rd, gd, bd; \ + switch (bpp) { \ + case 2: \ + s = *(Uint16 *)src; \ + d = *(Uint16 *)dst; \ + break; \ + case 3: \ + if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ s = (src[0] << 16) | (src[1] << 8) | src[2]; \ d = (dst[0] << 16) | (dst[1] << 8) | dst[2]; \ - } else { \ + } else { \ s = (src[2] << 16) | (src[1] << 8) | src[0]; \ d = (dst[2] << 16) | (dst[1] << 8) | dst[0]; \ - } \ - break; \ - case 4: \ - s = *(Uint32 *)src; \ - d = *(Uint32 *)dst; \ - break; \ - } \ - RGB_FROM_PIXEL(s, fmt, rs, gs, bs); \ - RGB_FROM_PIXEL(d, fmt, rd, gd, bd); \ - rd += (rs - rd) * alpha >> 8; \ - gd += (gs - gd) * alpha >> 8; \ - bd += (bs - bd) * alpha >> 8; \ - PIXEL_FROM_RGB(d, fmt, rd, gd, bd); \ - switch (bpp) { \ - case 2: \ - *(Uint16 *)dst = (Uint16)d; \ - break; \ - case 3: \ - if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ - dst[0] = (Uint8)(d >> 16); \ - dst[1] = (Uint8)(d >> 8); \ - dst[2] = (Uint8)(d); \ - } else { \ - dst[0] = (Uint8)d; \ - dst[1] = (Uint8)(d >> 8); \ - dst[2] = (Uint8)(d >> 16); \ - } \ - break; \ - case 4: \ - *(Uint32 *)dst = d; \ - break; \ - } \ - src += bpp; \ - dst += bpp; \ - } \ - } while(0) + } \ + break; \ + case 4: \ + s = *(Uint32 *)src; \ + d = *(Uint32 *)dst; \ + break; \ + } \ + RGB_FROM_PIXEL(s, fmt, rs, gs, bs); \ + RGB_FROM_PIXEL(d, fmt, rd, gd, bd); \ + rd += (rs - rd) * alpha >> 8; \ + gd += (gs - gd) * alpha >> 8; \ + bd += (bs - bd) * alpha >> 8; \ + PIXEL_FROM_RGB(d, fmt, rd, gd, bd); \ + switch (bpp) { \ + case 2: \ + *(Uint16 *)dst = (Uint16)d; \ + break; \ + case 3: \ + if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ + dst[0] = (Uint8)(d >> 16); \ + dst[1] = (Uint8)(d >> 8); \ + dst[2] = (Uint8)(d); \ + } else { \ + dst[0] = (Uint8)d; \ + dst[1] = (Uint8)(d >> 8); \ + dst[2] = (Uint8)(d >> 16); \ + } \ + break; \ + case 4: \ + *(Uint32 *)dst = d; \ + break; \ + } \ + src += bpp; \ + dst += bpp; \ + } \ + } while (0) /* * Special case: 50% alpha (alpha=128) @@ -235,18 +235,17 @@ * First zero the lowest bit of each component, which gives us room to * add them. Then shift right and add the sum of the lowest bits. */ -#define ALPHA_BLIT32_888_50(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint32 *src = (Uint32 *)(from); \ - Uint32 *dst = (Uint32 *)(to); \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - *dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) \ - + (s & d & 0x00010101); \ - } \ - } while(0) +#define ALPHA_BLIT32_888_50(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint32 *src = (Uint32 *)(from); \ + Uint32 *dst = (Uint32 *)(to); \ + for (i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + *dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) + (s & d & 0x00010101); \ + } \ + } while (0) /* * For 16bpp, we can actually blend two pixels in parallel, if we take @@ -254,198 +253,198 @@ */ /* helper: blend a single 16 bit pixel at 50% */ -#define BLEND16_50(dst, src, mask) \ - do { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - *dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \ - (s & d & (~mask & 0xffff))); \ - } while(0) +#define BLEND16_50(dst, src, mask) \ + do { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + *dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \ + (s & d & (~mask & 0xffff))); \ + } while (0) /* basic 16bpp blender. mask is the pixels to keep when adding. */ -#define ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) \ - do { \ - unsigned n = (length); \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - if (((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ - /* source and destination not in phase, blit one by one */ \ - while (n--) \ - BLEND16_50(dst, src, mask); \ - } else { \ - if ((uintptr_t)src & 3) { \ - /* first odd pixel */ \ - BLEND16_50(dst, src, mask); \ - n--; \ - } \ - for (; n > 1; n -= 2) { \ - Uint32 s = *(Uint32 *)src; \ - Uint32 d = *(Uint32 *)dst; \ - *(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) \ - + ((d & (mask | mask << 16)) >> 1) \ - + (s & d & (~(mask | mask << 16))); \ - src += 2; \ - dst += 2; \ - } \ - if (n) \ - BLEND16_50(dst, src, mask); /* last odd pixel */ \ - } \ - } while(0) - -#define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \ +#define ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) \ + do { \ + unsigned n = (length); \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + if (((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ + /* source and destination not in phase, blit one by one */ \ + while (n--) \ + BLEND16_50(dst, src, mask); \ + } else { \ + if ((uintptr_t)src & 3) { \ + /* first odd pixel */ \ + BLEND16_50(dst, src, mask); \ + n--; \ + } \ + for (; n > 1; n -= 2) { \ + Uint32 s = *(Uint32 *)src; \ + Uint32 d = *(Uint32 *)dst; \ + *(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) + ((d & (mask | mask << 16)) >> 1) + (s & d & (~(mask | mask << 16))); \ + src += 2; \ + dst += 2; \ + } \ + if (n) \ + BLEND16_50(dst, src, mask); /* last odd pixel */ \ + } \ + } while (0) + +#define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \ ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7deU) -#define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \ +#define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \ ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbdeU) -#define CHOOSE_BLIT(blitter, alpha, fmt) \ - do { \ - if (alpha == 255) { \ - switch (fmt->BytesPerPixel) { \ - case 1: blitter(1, Uint8, OPAQUE_BLIT); break; \ - case 2: blitter(2, Uint8, OPAQUE_BLIT); break; \ - case 3: blitter(3, Uint8, OPAQUE_BLIT); break; \ - case 4: blitter(4, Uint16, OPAQUE_BLIT); break; \ - } \ - } else { \ - switch (fmt->BytesPerPixel) { \ - case 1: \ - /* No 8bpp alpha blitting */ \ - break; \ - \ - case 2: \ - switch (fmt->Rmask | fmt->Gmask | fmt->Bmask) { \ - case 0xffff: \ - if (fmt->Gmask == 0x07e0 \ - || fmt->Rmask == 0x07e0 \ - || fmt->Bmask == 0x07e0) { \ - if (alpha == 128) { \ - blitter(2, Uint8, ALPHA_BLIT16_565_50); \ - } else { \ - blitter(2, Uint8, ALPHA_BLIT16_565); \ - } \ - } else \ - goto general16; \ - break; \ - \ - case 0x7fff: \ - if (fmt->Gmask == 0x03e0 \ - || fmt->Rmask == 0x03e0 \ - || fmt->Bmask == 0x03e0) { \ - if (alpha == 128) { \ - blitter(2, Uint8, ALPHA_BLIT16_555_50); \ - } else { \ - blitter(2, Uint8, ALPHA_BLIT16_555); \ - } \ - break; \ - } else \ - goto general16; \ - break; \ - \ - default: \ - general16: \ - blitter(2, Uint8, ALPHA_BLIT_ANY); \ - } \ - break; \ - \ - case 3: \ - blitter(3, Uint8, ALPHA_BLIT_ANY); \ - break; \ - \ - case 4: \ - if ((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff \ - && (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 \ - || fmt->Bmask == 0xff00)) { \ - if (alpha == 128) { \ - blitter(4, Uint16, ALPHA_BLIT32_888_50); \ - } else { \ - blitter(4, Uint16, ALPHA_BLIT32_888); \ - } \ - } else \ - blitter(4, Uint16, ALPHA_BLIT_ANY); \ - break; \ - } \ - } \ - } while(0) +#define CHOOSE_BLIT(blitter, alpha, fmt) \ + do { \ + if (alpha == 255) { \ + switch (fmt->BytesPerPixel) { \ + case 1: \ + blitter(1, Uint8, OPAQUE_BLIT); \ + break; \ + case 2: \ + blitter(2, Uint8, OPAQUE_BLIT); \ + break; \ + case 3: \ + blitter(3, Uint8, OPAQUE_BLIT); \ + break; \ + case 4: \ + blitter(4, Uint16, OPAQUE_BLIT); \ + break; \ + } \ + } else { \ + switch (fmt->BytesPerPixel) { \ + case 1: \ + /* No 8bpp alpha blitting */ \ + break; \ + \ + case 2: \ + switch (fmt->Rmask | fmt->Gmask | fmt->Bmask) { \ + case 0xffff: \ + if (fmt->Gmask == 0x07e0 || fmt->Rmask == 0x07e0 || fmt->Bmask == 0x07e0) { \ + if (alpha == 128) { \ + blitter(2, Uint8, ALPHA_BLIT16_565_50); \ + } else { \ + blitter(2, Uint8, ALPHA_BLIT16_565); \ + } \ + } else { \ + goto general16; \ + } \ + break; \ + \ + case 0x7fff: \ + if (fmt->Gmask == 0x03e0 || fmt->Rmask == 0x03e0 || fmt->Bmask == 0x03e0) { \ + if (alpha == 128) { \ + blitter(2, Uint8, ALPHA_BLIT16_555_50); \ + } else { \ + blitter(2, Uint8, ALPHA_BLIT16_555); \ + } \ + break; \ + } else { \ + goto general16; \ + } \ + break; \ + \ + default: \ + general16: \ + blitter(2, Uint8, ALPHA_BLIT_ANY); \ + } \ + break; \ + \ + case 3: \ + blitter(3, Uint8, ALPHA_BLIT_ANY); \ + break; \ + \ + case 4: \ + if ((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff && (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 || fmt->Bmask == 0xff00)) { \ + if (alpha == 128) { \ + blitter(4, Uint16, ALPHA_BLIT32_888_50); \ + } else { \ + blitter(4, Uint16, ALPHA_BLIT32_888); \ + } \ + } else { \ + blitter(4, Uint16, ALPHA_BLIT_ANY); \ + } \ + break; \ + } \ + } \ + } while (0) /* * Set a pixel value using the given format, except that the alpha value is * placed in the top byte. This is the format used for RLE with alpha. */ -#define RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ -{ \ - Pixel = ((r>>fmt->Rloss)<Rshift)| \ - ((g>>fmt->Gloss)<Gshift)| \ - ((b>>fmt->Bloss)<Bshift)| \ - (a<<24); \ -} +#define RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ + { \ + Pixel = ((r >> fmt->Rloss) << fmt->Rshift) | \ + ((g >> fmt->Gloss) << fmt->Gshift) | \ + ((b >> fmt->Bloss) << fmt->Bshift) | \ + (a << 24); \ + } /* * This takes care of the case when the surface is clipped on the left and/or * right. Top clipping has already been taken care of. */ -static void -RLEClipBlit(int w, Uint8 * srcbuf, SDL_Surface * surf_dst, - Uint8 * dstbuf, SDL_Rect * srcrect, unsigned alpha) +#define RLECLIPBLIT(bpp, Type, do_blit) \ + do { \ + int linecount = srcrect->h; \ + int ofs = 0; \ + int left = srcrect->x; \ + int right = left + srcrect->w; \ + dstbuf -= left * bpp; \ + for (;;) { \ + int run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Type); \ + if (run) { \ + /* clip to left and right borders */ \ + if (ofs < right) { \ + int start = 0; \ + int len = run; \ + int startcol; \ + if (left - ofs > 0) { \ + start = left - ofs; \ + len -= start; \ + if (len <= 0) \ + goto nocopy##bpp##do_blit; \ + } \ + startcol = ofs + start; \ + if (len > right - startcol) \ + len = right - startcol; \ + do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \ + len, bpp, alpha); \ + } \ + nocopy##bpp##do_blit : srcbuf += run * bpp; \ + ofs += run; \ + } else if (!ofs) { \ + break; \ + } \ + \ + if (ofs == w) { \ + ofs = 0; \ + dstbuf += surf_dst->pitch; \ + if (!--linecount) { \ + break; \ + } \ + } \ + } \ + } while (0) + +static void RLEClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, + Uint8 *dstbuf, SDL_Rect *srcrect, unsigned alpha) { SDL_PixelFormat *fmt = surf_dst->format; -#define RLECLIPBLIT(bpp, Type, do_blit) \ - do { \ - int linecount = srcrect->h; \ - int ofs = 0; \ - int left = srcrect->x; \ - int right = left + srcrect->w; \ - dstbuf -= left * bpp; \ - for (;;) { \ - int run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Type); \ - if (run) { \ - /* clip to left and right borders */ \ - if (ofs < right) { \ - int start = 0; \ - int len = run; \ - int startcol; \ - if (left - ofs > 0) { \ - start = left - ofs; \ - len -= start; \ - if (len <= 0) \ - goto nocopy ## bpp ## do_blit; \ - } \ - startcol = ofs + start; \ - if (len > right - startcol) \ - len = right - startcol; \ - do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \ - len, bpp, alpha); \ - } \ - nocopy ## bpp ## do_blit: \ - srcbuf += run * bpp; \ - ofs += run; \ - } else if (!ofs) \ - break; \ - \ - if (ofs == w) { \ - ofs = 0; \ - dstbuf += surf_dst->pitch; \ - if (!--linecount) \ - break; \ - } \ - } \ - } while(0) - CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt); - -#undef RLECLIPBLIT - } +#undef RLECLIPBLIT /* blit a colorkeyed RLE surface */ -static int SDLCALL -SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, - SDL_Surface * surf_dst, SDL_Rect * dstrect) +static int SDLCALL SDL_RLEBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, + SDL_Surface *surf_dst, SDL_Rect *dstrect) { Uint8 *dstbuf; Uint8 *srcbuf; @@ -456,16 +455,15 @@ SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, /* Lock the destination if necessary */ if (SDL_MUSTLOCK(surf_dst)) { if (SDL_LockSurface(surf_dst) < 0) { - return (-1); + return -1; } } /* Set up the source and destination pointers */ x = dstrect->x; y = dstrect->y; - dstbuf = (Uint8 *) surf_dst->pixels - + y * surf_dst->pitch + x * surf_src->format->BytesPerPixel; - srcbuf = (Uint8 *) surf_src->map->data; + dstbuf = (Uint8 *)surf_dst->pixels + y * surf_dst->pitch + x * surf_src->format->BytesPerPixel; + srcbuf = (Uint8 *)surf_src->map->data; { /* skip lines at the top if necessary */ @@ -474,22 +472,22 @@ SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, if (vskip) { #define RLESKIP(bpp, Type) \ - for(;;) { \ - int run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += sizeof(Type) * 2; \ - if(run) { \ + for (;;) { \ + int run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += sizeof(Type) * 2; \ + if (run) { \ srcbuf += run * bpp; \ - ofs += run; \ - } else if(!ofs) \ - goto done; \ - if(ofs == w) { \ - ofs = 0; \ - if(!--vskip) \ - break; \ - } \ - } + ofs += run; \ + } else if (!ofs) \ + goto done; \ + if (ofs == w) { \ + ofs = 0; \ + if (!--vskip) \ + break; \ + } \ + } switch (surf_src->format->BytesPerPixel) { case 1: @@ -507,7 +505,6 @@ SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, } #undef RLESKIP - } } @@ -518,41 +515,41 @@ SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, } else { SDL_PixelFormat *fmt = surf_src->format; -#define RLEBLIT(bpp, Type, do_blit) \ - do { \ - int linecount = srcrect->h; \ - int ofs = 0; \ - for(;;) { \ - unsigned run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Type); \ - if(run) { \ - do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \ - srcbuf += run * bpp; \ - ofs += run; \ - } else if(!ofs) \ - break; \ - if(ofs == w) { \ - ofs = 0; \ - dstbuf += surf_dst->pitch; \ - if(!--linecount) \ - break; \ - } \ - } \ - } while(0) +#define RLEBLIT(bpp, Type, do_blit) \ + do { \ + int linecount = srcrect->h; \ + int ofs = 0; \ + for (;;) { \ + unsigned run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Type); \ + if (run) { \ + do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \ + srcbuf += run * bpp; \ + ofs += run; \ + } else if (!ofs) \ + break; \ + if (ofs == w) { \ + ofs = 0; \ + dstbuf += surf_dst->pitch; \ + if (!--linecount) \ + break; \ + } \ + } \ + } while (0) CHOOSE_BLIT(RLEBLIT, alpha, fmt); #undef RLEBLIT } - done: +done: /* Unlock the destination if necessary */ if (SDL_MUSTLOCK(surf_dst)) { SDL_UnlockSurface(surf_dst); } - return (0); + return 0; } #undef OPAQUE_BLIT @@ -566,47 +563,47 @@ SDL_RLEBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, * For 32bpp pixels, we have made sure the alpha is stored in the top * 8 bits, so proceed as usual */ -#define BLIT_TRANSL_888(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = s >> 24; \ - Uint32 s1 = s & 0xff00ff; \ - Uint32 d1 = d & 0xff00ff; \ - d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ - s &= 0xff00; \ - d &= 0xff00; \ - d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ - dst = d1 | d | 0xff000000; \ - } while(0) +#define BLIT_TRANSL_888(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = s >> 24; \ + Uint32 s1 = s & 0xff00ff; \ + Uint32 d1 = d & 0xff00ff; \ + d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ + s &= 0xff00; \ + d &= 0xff00; \ + d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ + dst = d1 | d | 0xff000000; \ + } while (0) /* * For 16bpp pixels, we have stored the 5 most significant alpha bits in * bits 5-10. As before, we can process all 3 RGB components at the same time. */ -#define BLIT_TRANSL_565(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = (s & 0x3e0) >> 5; \ - s &= 0x07e0f81f; \ - d = (d | d << 16) & 0x07e0f81f; \ - d += (s - d) * alpha >> 5; \ - d &= 0x07e0f81f; \ - dst = (Uint16)(d | d >> 16); \ - } while(0) - -#define BLIT_TRANSL_555(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = (s & 0x3e0) >> 5; \ - s &= 0x03e07c1f; \ - d = (d | d << 16) & 0x03e07c1f; \ - d += (s - d) * alpha >> 5; \ - d &= 0x03e07c1f; \ - dst = (Uint16)(d | d >> 16); \ - } while(0) +#define BLIT_TRANSL_565(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = (s & 0x3e0) >> 5; \ + s &= 0x07e0f81f; \ + d = (d | d << 16) & 0x07e0f81f; \ + d += (s - d) * alpha >> 5; \ + d &= 0x07e0f81f; \ + dst = (Uint16)(d | d >> 16); \ + } while (0) + +#define BLIT_TRANSL_555(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = (s & 0x3e0) >> 5; \ + s &= 0x03e07c1f; \ + d = (d | d << 16) & 0x03e07c1f; \ + d += (s - d) * alpha >> 5; \ + d &= 0x03e07c1f; \ + dst = (Uint16)(d | d >> 16); \ + } while (0) /* used to save the destination format in the encoding. Designed to be macro-compatible with SDL_PixelFormat but without the unneeded fields */ @@ -629,9 +626,8 @@ typedef struct } RLEDestFormat; /* blit a pixel-alpha RLE surface clipped at the right and/or left edges */ -static void -RLEAlphaClipBlit(int w, Uint8 * srcbuf, SDL_Surface * surf_dst, - Uint8 * dstbuf, SDL_Rect * srcrect) +static void RLEAlphaClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, + Uint8 *dstbuf, SDL_Rect *srcrect) { SDL_PixelFormat *df = surf_dst->format; /* @@ -639,80 +635,81 @@ RLEAlphaClipBlit(int w, Uint8 * srcbuf, SDL_Surface * surf_dst, * Ctype the translucent count type, and do_blend the macro * to blend one pixel. */ -#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \ - do { \ - int linecount = srcrect->h; \ - int left = srcrect->x; \ - int right = left + srcrect->w; \ - dstbuf -= left * sizeof(Ptype); \ - do { \ - int ofs = 0; \ - /* blit opaque pixels on one line */ \ - do { \ - unsigned run; \ - ofs += ((Ctype *)srcbuf)[0]; \ - run = ((Ctype *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Ctype); \ - if(run) { \ - /* clip to left and right borders */ \ - int cofs = ofs; \ - int crun = run; \ - if(left - cofs > 0) { \ - crun -= left - cofs; \ - cofs = left; \ - } \ - if(crun > right - cofs) \ - crun = right - cofs; \ - if(crun > 0) \ - PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \ - srcbuf + (cofs - ofs) * sizeof(Ptype), \ - (unsigned)crun, sizeof(Ptype)); \ - srcbuf += run * sizeof(Ptype); \ - ofs += run; \ - } else if(!ofs) \ - return; \ - } while(ofs < w); \ - /* skip padding if necessary */ \ - if(sizeof(Ptype) == 2) \ - srcbuf += (uintptr_t)srcbuf & 2; \ - /* blit translucent pixels on the same line */ \ - ofs = 0; \ - do { \ - unsigned run; \ - ofs += ((Uint16 *)srcbuf)[0]; \ - run = ((Uint16 *)srcbuf)[1]; \ - srcbuf += 4; \ - if(run) { \ - /* clip to left and right borders */ \ - int cofs = ofs; \ - int crun = run; \ - if(left - cofs > 0) { \ - crun -= left - cofs; \ - cofs = left; \ - } \ - if(crun > right - cofs) \ - crun = right - cofs; \ - if(crun > 0) { \ - Ptype *dst = (Ptype *)dstbuf + cofs; \ - Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \ - int i; \ - for(i = 0; i < crun; i++) \ - do_blend(src[i], dst[i]); \ - } \ - srcbuf += run * 4; \ - ofs += run; \ - } \ - } while(ofs < w); \ - dstbuf += surf_dst->pitch; \ - } while(--linecount); \ - } while(0) +#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \ + do { \ + int linecount = srcrect->h; \ + int left = srcrect->x; \ + int right = left + srcrect->w; \ + dstbuf -= left * sizeof(Ptype); \ + do { \ + int ofs = 0; \ + /* blit opaque pixels on one line */ \ + do { \ + unsigned run; \ + ofs += ((Ctype *)srcbuf)[0]; \ + run = ((Ctype *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Ctype); \ + if (run) { \ + /* clip to left and right borders */ \ + int cofs = ofs; \ + int crun = run; \ + if (left - cofs > 0) { \ + crun -= left - cofs; \ + cofs = left; \ + } \ + if (crun > right - cofs) \ + crun = right - cofs; \ + if (crun > 0) \ + PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \ + srcbuf + (cofs - ofs) * sizeof(Ptype), \ + (unsigned)crun, sizeof(Ptype)); \ + srcbuf += run * sizeof(Ptype); \ + ofs += run; \ + } else if (!ofs) \ + return; \ + } while (ofs < w); \ + /* skip padding if necessary */ \ + if (sizeof(Ptype) == 2) \ + srcbuf += (uintptr_t)srcbuf & 2; \ + /* blit translucent pixels on the same line */ \ + ofs = 0; \ + do { \ + unsigned run; \ + ofs += ((Uint16 *)srcbuf)[0]; \ + run = ((Uint16 *)srcbuf)[1]; \ + srcbuf += 4; \ + if (run) { \ + /* clip to left and right borders */ \ + int cofs = ofs; \ + int crun = run; \ + if (left - cofs > 0) { \ + crun -= left - cofs; \ + cofs = left; \ + } \ + if (crun > right - cofs) \ + crun = right - cofs; \ + if (crun > 0) { \ + Ptype *dst = (Ptype *)dstbuf + cofs; \ + Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \ + int i; \ + for (i = 0; i < crun; i++) \ + do_blend(src[i], dst[i]); \ + } \ + srcbuf += run * 4; \ + ofs += run; \ + } \ + } while (ofs < w); \ + dstbuf += surf_dst->pitch; \ + } while (--linecount); \ + } while (0) switch (df->BytesPerPixel) { case 2: - if (df->Gmask == 0x07e0 || df->Rmask == 0x07e0 || df->Bmask == 0x07e0) + if (df->Gmask == 0x07e0 || df->Rmask == 0x07e0 || df->Bmask == 0x07e0) { RLEALPHACLIPBLIT(Uint16, Uint8, BLIT_TRANSL_565); - else + } else { RLEALPHACLIPBLIT(Uint16, Uint8, BLIT_TRANSL_555); + } break; case 4: RLEALPHACLIPBLIT(Uint32, Uint16, BLIT_TRANSL_888); @@ -721,9 +718,8 @@ RLEAlphaClipBlit(int w, Uint8 * srcbuf, SDL_Surface * surf_dst, } /* blit a pixel-alpha RLE surface */ -static int SDLCALL -SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, - SDL_Surface * surf_dst, SDL_Rect * dstrect) +static int SDLCALL SDL_RLEAlphaBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, + SDL_Surface *surf_dst, SDL_Rect *dstrect) { int x, y; int w = surf_src->w; @@ -739,8 +735,8 @@ SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, x = dstrect->x; y = dstrect->y; - dstbuf = (Uint8 *) surf_dst->pixels + y * surf_dst->pitch + x * df->BytesPerPixel; - srcbuf = (Uint8 *) surf_src->map->data + sizeof(RLEDestFormat); + dstbuf = (Uint8 *)surf_dst->pixels + y * surf_dst->pitch + x * df->BytesPerPixel; + srcbuf = (Uint8 *)surf_src->map->data + sizeof(RLEDestFormat); { /* skip lines at the top if necessary */ @@ -760,38 +756,40 @@ SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, if (run) { srcbuf += 2 * run; ofs += run; - } else if (!ofs) + } else if (ofs == 0) { goto done; + } } while (ofs < w); /* skip padding */ - srcbuf += (uintptr_t) srcbuf & 2; + srcbuf += (uintptr_t)srcbuf & 2; /* skip translucent line */ ofs = 0; do { int run; - ofs += ((Uint16 *) srcbuf)[0]; - run = ((Uint16 *) srcbuf)[1]; + ofs += ((Uint16 *)srcbuf)[0]; + run = ((Uint16 *)srcbuf)[1]; srcbuf += 4 * (run + 1); ofs += run; } while (ofs < w); } while (--vskip); } else { /* the 32/32 interleaved format */ - vskip <<= 1; /* opaque and translucent have same format */ + vskip <<= 1; /* opaque and translucent have same format */ do { ofs = 0; do { int run; - ofs += ((Uint16 *) srcbuf)[0]; - run = ((Uint16 *) srcbuf)[1]; + ofs += ((Uint16 *)srcbuf)[0]; + run = ((Uint16 *)srcbuf)[1]; srcbuf += 4; if (run) { srcbuf += 4 * run; ofs += run; - } else if (!ofs) + } else if (ofs == 0) { goto done; + } } while (ofs < w); } while (--vskip); } @@ -808,58 +806,58 @@ SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, * Ctype the translucent count type, and do_blend the * macro to blend one pixel. */ -#define RLEALPHABLIT(Ptype, Ctype, do_blend) \ - do { \ - int linecount = srcrect->h; \ - do { \ - int ofs = 0; \ - /* blit opaque pixels on one line */ \ - do { \ - unsigned run; \ - ofs += ((Ctype *)srcbuf)[0]; \ - run = ((Ctype *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Ctype); \ - if(run) { \ - PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \ - run, sizeof(Ptype)); \ - srcbuf += run * sizeof(Ptype); \ - ofs += run; \ - } else if(!ofs) \ - goto done; \ - } while(ofs < w); \ - /* skip padding if necessary */ \ - if(sizeof(Ptype) == 2) \ - srcbuf += (uintptr_t)srcbuf & 2; \ - /* blit translucent pixels on the same line */ \ - ofs = 0; \ - do { \ - unsigned run; \ - ofs += ((Uint16 *)srcbuf)[0]; \ - run = ((Uint16 *)srcbuf)[1]; \ - srcbuf += 4; \ - if(run) { \ - Ptype *dst = (Ptype *)dstbuf + ofs; \ - unsigned i; \ - for(i = 0; i < run; i++) { \ - Uint32 src = *(Uint32 *)srcbuf; \ - do_blend(src, *dst); \ - srcbuf += 4; \ - dst++; \ - } \ - ofs += run; \ - } \ - } while(ofs < w); \ - dstbuf += surf_dst->pitch; \ - } while(--linecount); \ - } while(0) +#define RLEALPHABLIT(Ptype, Ctype, do_blend) \ + do { \ + int linecount = srcrect->h; \ + do { \ + int ofs = 0; \ + /* blit opaque pixels on one line */ \ + do { \ + unsigned run; \ + ofs += ((Ctype *)srcbuf)[0]; \ + run = ((Ctype *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Ctype); \ + if (run) { \ + PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \ + run, sizeof(Ptype)); \ + srcbuf += run * sizeof(Ptype); \ + ofs += run; \ + } else if (!ofs) \ + goto done; \ + } while (ofs < w); \ + /* skip padding if necessary */ \ + if (sizeof(Ptype) == 2) \ + srcbuf += (uintptr_t)srcbuf & 2; \ + /* blit translucent pixels on the same line */ \ + ofs = 0; \ + do { \ + unsigned run; \ + ofs += ((Uint16 *)srcbuf)[0]; \ + run = ((Uint16 *)srcbuf)[1]; \ + srcbuf += 4; \ + if (run) { \ + Ptype *dst = (Ptype *)dstbuf + ofs; \ + unsigned i; \ + for (i = 0; i < run; i++) { \ + Uint32 src = *(Uint32 *)srcbuf; \ + do_blend(src, *dst); \ + srcbuf += 4; \ + dst++; \ + } \ + ofs += run; \ + } \ + } while (ofs < w); \ + dstbuf += surf_dst->pitch; \ + } while (--linecount); \ + } while (0) switch (df->BytesPerPixel) { case 2: - if (df->Gmask == 0x07e0 || df->Rmask == 0x07e0 - || df->Bmask == 0x07e0) + if (df->Gmask == 0x07e0 || df->Rmask == 0x07e0 || df->Bmask == 0x07e0) { RLEALPHABLIT(Uint16, Uint8, BLIT_TRANSL_565); - else + } else { RLEALPHABLIT(Uint16, Uint8, BLIT_TRANSL_555); + } break; case 4: RLEALPHABLIT(Uint32, Uint16, BLIT_TRANSL_888); @@ -867,7 +865,7 @@ SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, } } - done: +done: /* Unlock the destination if necessary */ if (SDL_MUSTLOCK(surf_dst)) { SDL_UnlockSurface(surf_dst); @@ -886,9 +884,8 @@ SDL_RLEAlphaBlit(SDL_Surface * surf_src, SDL_Rect * srcrect, */ /* encode 32bpp rgb + a into 16bpp rgb, losing alpha */ -static int -copy_opaque_16(void *dst, Uint32 * src, int n, - SDL_PixelFormat * sfmt, SDL_PixelFormat * dfmt) +static int copy_opaque_16(void *dst, Uint32 *src, int n, + SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint16 *d = dst; @@ -903,9 +900,8 @@ copy_opaque_16(void *dst, Uint32 * src, int n, } /* decode opaque pixels from 16bpp to 32bpp rgb + a */ -static int -uncopy_opaque_16(Uint32 * dst, void *src, int n, - RLEDestFormat * sfmt, SDL_PixelFormat * dfmt) +static int uncopy_opaque_16(Uint32 *dst, void *src, int n, + RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint16 *s = src; @@ -920,12 +916,9 @@ uncopy_opaque_16(Uint32 * dst, void *src, int n, return n * 2; } - - /* encode 32bpp rgb + a into 32bpp G0RAB format for blitting into 565 */ -static int -copy_transl_565(void *dst, Uint32 * src, int n, - SDL_PixelFormat * sfmt, SDL_PixelFormat * dfmt) +static int copy_transl_565(void *dst, Uint32 *src, int n, + SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint32 *d = dst; @@ -942,9 +935,8 @@ copy_transl_565(void *dst, Uint32 * src, int n, } /* encode 32bpp rgb + a into 32bpp G0RAB format for blitting into 555 */ -static int -copy_transl_555(void *dst, Uint32 * src, int n, - SDL_PixelFormat * sfmt, SDL_PixelFormat * dfmt) +static int copy_transl_555(void *dst, Uint32 *src, int n, + SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint32 *d = dst; @@ -961,9 +953,8 @@ copy_transl_555(void *dst, Uint32 * src, int n, } /* decode translucent pixels from 32bpp GORAB to 32bpp rgb + a */ -static int -uncopy_transl_16(Uint32 * dst, void *src, int n, - RLEDestFormat * sfmt, SDL_PixelFormat * dfmt) +static int uncopy_transl_16(Uint32 *dst, void *src, int n, + RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint32 *s = src; @@ -980,9 +971,8 @@ uncopy_transl_16(Uint32 * dst, void *src, int n, } /* encode 32bpp rgba into 32bpp rgba, keeping alpha (dual purpose) */ -static int -copy_32(void *dst, Uint32 * src, int n, - SDL_PixelFormat * sfmt, SDL_PixelFormat * dfmt) +static int copy_32(void *dst, Uint32 *src, int n, + SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint32 *d = dst; @@ -997,9 +987,8 @@ copy_32(void *dst, Uint32 * src, int n, } /* decode 32bpp rgba into 32bpp rgba, keeping alpha (dual purpose) */ -static int -uncopy_32(Uint32 * dst, void *src, int n, - RLEDestFormat * sfmt, SDL_PixelFormat * dfmt) +static int uncopy_32(Uint32 *dst, void *src, int n, + RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) { int i; Uint32 *s = src; @@ -1014,14 +1003,13 @@ uncopy_32(Uint32 * dst, void *src, int n, return n * 4; } -#define ISOPAQUE(pixel, fmt) ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) +#define ISOPAQUE(pixel, fmt) ((((pixel)&fmt->Amask) >> fmt->Ashift) == 255) -#define ISTRANSL(pixel, fmt) \ - ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) +#define ISTRANSL(pixel, fmt) \ + ((unsigned)((((pixel)&fmt->Amask) >> fmt->Ashift) - 1U) < 254U) /* convert surface to be quickly alpha-blittable onto dest, if possible */ -static int -RLEAlphaSurface(SDL_Surface * surface) +static int RLEAlphaSurface(SDL_Surface *surface) { SDL_Surface *dest; SDL_PixelFormat *df; @@ -1030,17 +1018,19 @@ RLEAlphaSurface(SDL_Surface * surface) int max_transl_run = 65535; unsigned masksum; Uint8 *rlebuf, *dst; - int (*copy_opaque) (void *, Uint32 *, int, - SDL_PixelFormat *, SDL_PixelFormat *); - int (*copy_transl) (void *, Uint32 *, int, - SDL_PixelFormat *, SDL_PixelFormat *); + int (*copy_opaque)(void *, Uint32 *, int, + SDL_PixelFormat *, SDL_PixelFormat *); + int (*copy_transl)(void *, Uint32 *, int, + SDL_PixelFormat *, SDL_PixelFormat *); dest = surface->map->dst; - if (!dest) + if (dest == NULL) { return -1; + } df = dest->format; - if (surface->format->BitsPerPixel != 32) - return -1; /* only 32bpp source supported */ + if (surface->format->BitsPerPixel != 32) { + return -1; /* only 32bpp source supported */ + } /* find out whether the destination is one we support, and determine the max size of the encoded result */ @@ -1050,52 +1040,53 @@ RLEAlphaSurface(SDL_Surface * surface) /* 16bpp: only support 565 and 555 formats */ switch (masksum) { case 0xffff: - if (df->Gmask == 0x07e0 - || df->Rmask == 0x07e0 || df->Bmask == 0x07e0) { + if (df->Gmask == 0x07e0 || df->Rmask == 0x07e0 || df->Bmask == 0x07e0) { copy_opaque = copy_opaque_16; copy_transl = copy_transl_565; - } else + } else { return -1; + } break; case 0x7fff: - if (df->Gmask == 0x03e0 - || df->Rmask == 0x03e0 || df->Bmask == 0x03e0) { + if (df->Gmask == 0x03e0 || df->Rmask == 0x03e0 || df->Bmask == 0x03e0) { copy_opaque = copy_opaque_16; copy_transl = copy_transl_555; - } else + } else { return -1; + } break; default: return -1; } - max_opaque_run = 255; /* runs stored as bytes */ + max_opaque_run = 255; /* runs stored as bytes */ /* worst case is alternating opaque and translucent pixels, with room for alignment padding between lines */ maxsize = surface->h * (2 + (4 + 2) * (surface->w + 1)) + 2; break; case 4: - if (masksum != 0x00ffffff) - return -1; /* requires unused high byte */ + if (masksum != 0x00ffffff) { + return -1; /* requires unused high byte */ + } copy_opaque = copy_32; copy_transl = copy_32; - max_opaque_run = 255; /* runs stored as short ints */ + max_opaque_run = 255; /* runs stored as short ints */ /* worst case is alternating opaque and translucent pixels */ maxsize = surface->h * 2 * 4 * (surface->w + 1) + 4; break; default: - return -1; /* anything else unsupported right now */ + return -1; /* anything else unsupported right now */ } maxsize += sizeof(RLEDestFormat); - rlebuf = (Uint8 *) SDL_malloc(maxsize); - if (!rlebuf) { + rlebuf = (Uint8 *)SDL_malloc(maxsize); + if (rlebuf == NULL) { return SDL_OutOfMemory(); } { /* save the destination format so we can undo the encoding later */ - RLEDestFormat *r = (RLEDestFormat *) rlebuf; + RLEDestFormat *r = (RLEDestFormat *)rlebuf; r->BytesPerPixel = df->BytesPerPixel; r->Rmask = df->Rmask; r->Gmask = df->Gmask; @@ -1117,23 +1108,23 @@ RLEAlphaSurface(SDL_Surface * surface) int x, y; int h = surface->h, w = surface->w; SDL_PixelFormat *sf = surface->format; - Uint32 *src = (Uint32 *) surface->pixels; - Uint8 *lastline = dst; /* end of last non-blank line */ + Uint32 *src = (Uint32 *)surface->pixels; + Uint8 *lastline = dst; /* end of last non-blank line */ /* opaque counts are 8 or 16 bits, depending on target depth */ -#define ADD_OPAQUE_COUNTS(n, m) \ - if(df->BytesPerPixel == 4) { \ - ((Uint16 *)dst)[0] = n; \ - ((Uint16 *)dst)[1] = m; \ - dst += 4; \ - } else { \ - dst[0] = n; \ - dst[1] = m; \ - dst += 2; \ +#define ADD_OPAQUE_COUNTS(n, m) \ + if (df->BytesPerPixel == 4) { \ + ((Uint16 *)dst)[0] = n; \ + ((Uint16 *)dst)[1] = m; \ + dst += 4; \ + } else { \ + dst[0] = n; \ + dst[1] = m; \ + dst += 2; \ } /* translucent counts are always 16 bit */ -#define ADD_TRANSL_COUNTS(n, m) \ +#define ADD_TRANSL_COUNTS(n, m) \ (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4) for (y = 0; y < h; y++) { @@ -1144,14 +1135,17 @@ RLEAlphaSurface(SDL_Surface * surface) do { int run, skip, len; skipstart = x; - while (x < w && !ISOPAQUE(src[x], sf)) + while (x < w && !ISOPAQUE(src[x], sf)) { x++; + } runstart = x; - while (x < w && ISOPAQUE(src[x], sf)) + while (x < w && ISOPAQUE(src[x], sf)) { x++; + } skip = runstart - skipstart; - if (skip == w) + if (skip == w) { blankline = 1; + } run = x - runstart; while (skip > max_opaque_run) { ADD_OPAQUE_COUNTS(max_opaque_run, 0); @@ -1172,18 +1166,20 @@ RLEAlphaSurface(SDL_Surface * surface) } while (x < w); /* Make sure the next output address is 32-bit aligned */ - dst += (uintptr_t) dst & 2; + dst += (uintptr_t)dst & 2; /* Next, encode all translucent pixels of the same scan line */ x = 0; do { int run, skip, len; skipstart = x; - while (x < w && !ISTRANSL(src[x], sf)) + while (x < w && !ISTRANSL(src[x], sf)) { x++; + } runstart = x; - while (x < w && ISTRANSL(src[x], sf)) + while (x < w && ISTRANSL(src[x], sf)) { x++; + } skip = runstart - skipstart; blankline &= (skip == w); run = x - runstart; @@ -1203,13 +1199,14 @@ RLEAlphaSurface(SDL_Surface * surface) runstart += len; run -= len; } - if (!blankline) + if (!blankline) { lastline = dst; + } } while (x < w); src += surface->pitch >> 2; } - dst = lastline; /* back up past trailing blank lines */ + dst = lastline; /* back up past trailing blank lines */ ADD_OPAQUE_COUNTS(0, 0); } @@ -1230,28 +1227,26 @@ RLEAlphaSurface(SDL_Surface * surface) /* reallocate the buffer to release unused memory */ { Uint8 *p = SDL_realloc(rlebuf, dst - rlebuf); - if (!p) + if (p == NULL) { p = rlebuf; + } surface->map->data = p; } return 0; } -static Uint32 -getpix_8(const Uint8 * srcbuf) +static Uint32 getpix_8(const Uint8 *srcbuf) { return *srcbuf; } -static Uint32 -getpix_16(const Uint8 * srcbuf) +static Uint32 getpix_16(const Uint8 *srcbuf) { - return *(const Uint16 *) srcbuf; + return *(const Uint16 *)srcbuf; } -static Uint32 -getpix_24(const Uint8 * srcbuf) +static Uint32 getpix_24(const Uint8 *srcbuf) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16); @@ -1260,20 +1255,18 @@ getpix_24(const Uint8 * srcbuf) #endif } -static Uint32 -getpix_32(const Uint8 * srcbuf) +static Uint32 getpix_32(const Uint8 *srcbuf) { - return *(const Uint32 *) srcbuf; + return *(const Uint32 *)srcbuf; } -typedef Uint32(*getpix_func) (const Uint8 *); +typedef Uint32 (*getpix_func)(const Uint8 *); static const getpix_func getpixes[4] = { getpix_8, getpix_16, getpix_24, getpix_32 }; -static int -RLEColorkeySurface(SDL_Surface * surface) +static int RLEColorkeySurface(SDL_Surface *surface) { Uint8 *rlebuf, *dst; int maxn; @@ -1295,26 +1288,24 @@ RLEColorkeySurface(SDL_Surface * surface) case 2: case 3: /* worst case is solid runs, at most 255 pixels wide */ - maxsize = surface->h * (2 * (surface->w / 255 + 1) - + surface->w * bpp) + 2; + maxsize = surface->h * (2 * (surface->w / 255 + 1) + surface->w * bpp) + 2; break; case 4: /* worst case is solid runs, at most 65535 pixels wide */ - maxsize = surface->h * (4 * (surface->w / 65535 + 1) - + surface->w * 4) + 4; + maxsize = surface->h * (4 * (surface->w / 65535 + 1) + surface->w * 4) + 4; break; default: return -1; } - rlebuf = (Uint8 *) SDL_malloc(maxsize); + rlebuf = (Uint8 *)SDL_malloc(maxsize); if (rlebuf == NULL) { return SDL_OutOfMemory(); } /* Set up the conversion */ - srcbuf = (Uint8 *) surface->pixels; + srcbuf = (Uint8 *)surface->pixels; maxn = bpp == 4 ? 65535 : 255; dst = rlebuf; rgbmask = ~surface->format->Amask; @@ -1324,12 +1315,12 @@ RLEColorkeySurface(SDL_Surface * surface) w = surface->w; h = surface->h; -#define ADD_COUNTS(n, m) \ - if(bpp == 4) { \ - ((Uint16 *)dst)[0] = n; \ - ((Uint16 *)dst)[1] = m; \ +#define ADD_COUNTS(n, m) \ + if (bpp == 4) { \ + ((Uint16 *)dst)[0] = n; \ + ((Uint16 *)dst)[1] = m; \ dst += 4; \ - } else { \ + } else { \ dst[0] = n; \ dst[1] = m; \ dst += 2; \ @@ -1339,19 +1330,23 @@ RLEColorkeySurface(SDL_Surface * surface) int x = 0; int blankline = 0; do { - int run, skip, len; + int run, skip; + int len; int runstart; int skipstart = x; /* find run of transparent, then opaque pixels */ - while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) == ckey) + while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) == ckey) { x++; + } runstart = x; - while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) != ckey) + while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) != ckey) { x++; + } skip = runstart - skipstart; - if (skip == w) + if (skip == w) { blankline = 1; + } run = x - runstart; /* encode segment */ @@ -1361,25 +1356,26 @@ RLEColorkeySurface(SDL_Surface * surface) } len = SDL_min(run, maxn); ADD_COUNTS(skip, len); - SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp); + SDL_memcpy(dst, srcbuf + runstart * bpp, (size_t)len * bpp); dst += len * bpp; run -= len; runstart += len; while (run) { len = SDL_min(run, maxn); ADD_COUNTS(0, len); - SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp); + SDL_memcpy(dst, srcbuf + runstart * bpp, (size_t)len * bpp); dst += len * bpp; runstart += len; run -= len; } - if (!blankline) + if (!blankline) { lastline = dst; + } } while (x < w); srcbuf += surface->pitch; } - dst = lastline; /* back up bast trailing blank lines */ + dst = lastline; /* back up bast trailing blank lines */ ADD_COUNTS(0, 0); #undef ADD_COUNTS @@ -1399,16 +1395,16 @@ RLEColorkeySurface(SDL_Surface * surface) { /* If SDL_realloc returns NULL, the original block is left intact */ Uint8 *p = SDL_realloc(rlebuf, dst - rlebuf); - if (!p) + if (p == NULL) { p = rlebuf; + } surface->map->data = p; } return 0; } -int -SDL_RLESurface(SDL_Surface * surface) +int SDL_RLESurface(SDL_Surface *surface) { int flags; @@ -1466,7 +1462,7 @@ SDL_RLESurface(SDL_Surface * surface) /* The surface is now accelerated */ surface->flags |= SDL_RLEACCEL; - return (0); + return 0; } /* @@ -1475,17 +1471,16 @@ SDL_RLESurface(SDL_Surface * surface) * completely transparent pixels will be lost, and color and alpha depth * may have been reduced (when encoding for 16bpp targets). */ -static SDL_bool -UnRLEAlpha(SDL_Surface * surface) +static SDL_bool UnRLEAlpha(SDL_Surface *surface) { Uint8 *srcbuf; Uint32 *dst; SDL_PixelFormat *sf = surface->format; RLEDestFormat *df = surface->map->data; - int (*uncopy_opaque) (Uint32 *, void *, int, - RLEDestFormat *, SDL_PixelFormat *); - int (*uncopy_transl) (Uint32 *, void *, int, - RLEDestFormat *, SDL_PixelFormat *); + int (*uncopy_opaque)(Uint32 *, void *, int, + RLEDestFormat *, SDL_PixelFormat *); + int (*uncopy_transl)(Uint32 *, void *, int, + RLEDestFormat *, SDL_PixelFormat *); int w = surface->w; int bpp = df->BytesPerPixel; @@ -1496,16 +1491,16 @@ UnRLEAlpha(SDL_Surface * surface) uncopy_opaque = uncopy_transl = uncopy_32; } - surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch); - if (!surface->pixels) { - return (SDL_FALSE); + surface->pixels = SDL_SIMDAlloc((size_t)surface->h * surface->pitch); + if (surface->pixels == NULL) { + return SDL_FALSE; } surface->flags |= SDL_SIMD_ALIGNED; /* fill background with transparent pixels */ - SDL_memset(surface->pixels, 0, surface->h * surface->pitch); + SDL_memset(surface->pixels, 0, (size_t)surface->h * surface->pitch); dst = surface->pixels; - srcbuf = (Uint8 *) (df + 1); + srcbuf = (Uint8 *)(df + 1); for (;;) { /* copy opaque pixels */ int ofs = 0; @@ -1516,8 +1511,8 @@ UnRLEAlpha(SDL_Surface * surface) run = srcbuf[1]; srcbuf += 2; } else { - ofs += ((Uint16 *) srcbuf)[0]; - run = ((Uint16 *) srcbuf)[1]; + ofs += ((Uint16 *)srcbuf)[0]; + run = ((Uint16 *)srcbuf)[1]; srcbuf += 4; } if (run) { @@ -1529,15 +1524,16 @@ UnRLEAlpha(SDL_Surface * surface) } while (ofs < w); /* skip padding if needed */ - if (bpp == 2) - srcbuf += (uintptr_t) srcbuf & 2; + if (bpp == 2) { + srcbuf += (uintptr_t)srcbuf & 2; + } /* copy translucent pixels */ ofs = 0; do { unsigned run; - ofs += ((Uint16 *) srcbuf)[0]; - run = ((Uint16 *) srcbuf)[1]; + ofs += ((Uint16 *)srcbuf)[0]; + run = ((Uint16 *)srcbuf)[1]; srcbuf += 4; if (run) { srcbuf += uncopy_transl(dst + ofs, srcbuf, run, df, sf); @@ -1548,11 +1544,10 @@ UnRLEAlpha(SDL_Surface * surface) } end_function: - return (SDL_TRUE); + return SDL_TRUE; } -void -SDL_UnRLESurface(SDL_Surface * surface, int recode) +void SDL_UnRLESurface(SDL_Surface *surface, int recode) { if (surface->flags & SDL_RLEACCEL) { surface->flags &= ~SDL_RLEACCEL; @@ -1562,8 +1557,8 @@ SDL_UnRLESurface(SDL_Surface * surface, int recode) SDL_Rect full; /* re-create the original surface */ - surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch); - if (!surface->pixels) { + surface->pixels = SDL_SIMDAlloc((size_t)surface->h * surface->pitch); + if (surface->pixels == NULL) { /* Oh crap... */ surface->flags |= SDL_RLEACCEL; return; diff --git a/modules/SDL2/src/video/SDL_RLEaccel_c.h b/modules/SDL2/src/video/SDL_RLEaccel_c.h index 731820c..eaaeed2 100644 --- a/modules/SDL2/src/video/SDL_RLEaccel_c.h +++ b/modules/SDL2/src/video/SDL_RLEaccel_c.h @@ -26,8 +26,8 @@ /* Useful functions and variables from SDL_RLEaccel.c */ -extern int SDL_RLESurface(SDL_Surface * surface); -extern void SDL_UnRLESurface(SDL_Surface * surface, int recode); +extern int SDL_RLESurface(SDL_Surface *surface); +extern void SDL_UnRLESurface(SDL_Surface *surface, int recode); #endif /* SDL_RLEaccel_c_h_ */ diff --git a/modules/SDL2/src/video/SDL_blit.c b/modules/SDL2/src/video/SDL_blit.c index 450669b..88b7f73 100644 --- a/modules/SDL2/src/video/SDL_blit.c +++ b/modules/SDL2/src/video/SDL_blit.c @@ -30,9 +30,8 @@ #include "SDL_pixels_c.h" /* The general purpose software blit routine */ -static int SDLCALL -SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect) +static int SDLCALL SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) { int okay; int src_locked; @@ -66,23 +65,23 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, SDL_BlitInfo *info = &src->map->info; /* Set up the blit information */ - info->src = (Uint8 *) src->pixels + - (Uint16) srcrect->y * src->pitch + - (Uint16) srcrect->x * info->src_fmt->BytesPerPixel; + info->src = (Uint8 *)src->pixels + + (Uint16)srcrect->y * src->pitch + + (Uint16)srcrect->x * info->src_fmt->BytesPerPixel; info->src_w = srcrect->w; info->src_h = srcrect->h; info->src_pitch = src->pitch; info->src_skip = info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel; info->dst = - (Uint8 *) dst->pixels + (Uint16) dstrect->y * dst->pitch + - (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel; + (Uint8 *)dst->pixels + (Uint16)dstrect->y * dst->pitch + + (Uint16)dstrect->x * info->dst_fmt->BytesPerPixel; info->dst_w = dstrect->w; info->dst_h = dstrect->h; info->dst_pitch = dst->pitch; info->dst_skip = info->dst_pitch - info->dst_w * info->dst_fmt->BytesPerPixel; - RunBlit = (SDL_BlitFunc) src->map->data; + RunBlit = (SDL_BlitFunc)src->map->data; /* Run the actual software blit */ RunBlit(info); @@ -96,7 +95,7 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, SDL_UnlockSurface(src); } /* Blit is done! */ - return (okay ? 0 : -1); + return okay ? 0 : -1; } #if SDL_HAVE_BLIT_AUTO @@ -104,8 +103,7 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, #ifdef __MACOSX__ #include -static SDL_bool -SDL_UseAltivecPrefetch() +static SDL_bool SDL_UseAltivecPrefetch() { const char key[] = "hw.l3cachesize"; u_int64_t result = 0; @@ -118,17 +116,15 @@ SDL_UseAltivecPrefetch() } } #else -static SDL_bool -SDL_UseAltivecPrefetch() +static SDL_bool SDL_UseAltivecPrefetch() { /* Just guess G4 */ return SDL_TRUE; } #endif /* __MACOSX__ */ -static SDL_BlitFunc -SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, - SDL_BlitFuncEntry * entries) +static SDL_BlitFunc SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, + SDL_BlitFuncEntry *entries) { int i, flagcheck = (flags & (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL | SDL_COPY_COLORKEY | SDL_COPY_NEAREST)); static int features = 0x7fffffff; @@ -141,7 +137,7 @@ SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, /* Allow an override for testing .. */ if (override) { - SDL_sscanf(override, "%u", &features); + (void)SDL_sscanf(override, "%u", &features); } else { if (SDL_HasMMX()) { features |= SDL_CPU_MMX; @@ -192,8 +188,7 @@ SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, #endif /* SDL_HAVE_BLIT_AUTO */ /* Figure out which of many blit routines to set up on a surface */ -int -SDL_CalculateBlit(SDL_Surface * surface) +int SDL_CalculateBlit(SDL_Surface *surface) { SDL_BlitFunc blit = NULL; SDL_BlitMap *map = surface->map; @@ -235,13 +230,13 @@ SDL_CalculateBlit(SDL_Surface * surface) } #if SDL_HAVE_BLIT_0 else if (surface->format->BitsPerPixel < 8 && - SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { + SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { blit = SDL_CalculateBlit0(surface); } #endif #if SDL_HAVE_BLIT_1 else if (surface->format->BytesPerPixel == 1 && - SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { + SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { blit = SDL_CalculateBlit1(surface); } #endif diff --git a/modules/SDL2/src/video/SDL_blit.h b/modules/SDL2/src/video/SDL_blit.h index 00a4e04..fb4bb67 100644 --- a/modules/SDL2/src/video/SDL_blit.h +++ b/modules/SDL2/src/video/SDL_blit.h @@ -28,36 +28,36 @@ #include "SDL_surface.h" /* pixman ARM blitters are 32 bit only : */ -#if defined(__aarch64__)||defined(_M_ARM64) +#if defined(__aarch64__) || defined(_M_ARM64) #undef SDL_ARM_SIMD_BLITTERS #undef SDL_ARM_NEON_BLITTERS #endif /* Table to do pixel byte expansion */ -extern Uint8* SDL_expand_byte[9]; +extern Uint8 *SDL_expand_byte[9]; /* SDL blit copy flags */ -#define SDL_COPY_MODULATE_COLOR 0x00000001 -#define SDL_COPY_MODULATE_ALPHA 0x00000002 -#define SDL_COPY_BLEND 0x00000010 -#define SDL_COPY_ADD 0x00000020 -#define SDL_COPY_MOD 0x00000040 -#define SDL_COPY_MUL 0x00000080 -#define SDL_COPY_COLORKEY 0x00000100 -#define SDL_COPY_NEAREST 0x00000200 -#define SDL_COPY_RLE_DESIRED 0x00001000 -#define SDL_COPY_RLE_COLORKEY 0x00002000 -#define SDL_COPY_RLE_ALPHAKEY 0x00004000 -#define SDL_COPY_RLE_MASK (SDL_COPY_RLE_DESIRED|SDL_COPY_RLE_COLORKEY|SDL_COPY_RLE_ALPHAKEY) +#define SDL_COPY_MODULATE_COLOR 0x00000001 +#define SDL_COPY_MODULATE_ALPHA 0x00000002 +#define SDL_COPY_BLEND 0x00000010 +#define SDL_COPY_ADD 0x00000020 +#define SDL_COPY_MOD 0x00000040 +#define SDL_COPY_MUL 0x00000080 +#define SDL_COPY_COLORKEY 0x00000100 +#define SDL_COPY_NEAREST 0x00000200 +#define SDL_COPY_RLE_DESIRED 0x00001000 +#define SDL_COPY_RLE_COLORKEY 0x00002000 +#define SDL_COPY_RLE_ALPHAKEY 0x00004000 +#define SDL_COPY_RLE_MASK (SDL_COPY_RLE_DESIRED | SDL_COPY_RLE_COLORKEY | SDL_COPY_RLE_ALPHAKEY) /* SDL blit CPU flags */ -#define SDL_CPU_ANY 0x00000000 -#define SDL_CPU_MMX 0x00000001 -#define SDL_CPU_3DNOW 0x00000002 -#define SDL_CPU_SSE 0x00000004 -#define SDL_CPU_SSE2 0x00000008 -#define SDL_CPU_ALTIVEC_PREFETCH 0x00000010 -#define SDL_CPU_ALTIVEC_NOPREFETCH 0x00000020 +#define SDL_CPU_ANY 0x00000000 +#define SDL_CPU_MMX 0x00000001 +#define SDL_CPU_3DNOW 0x00000002 +#define SDL_CPU_SSE 0x00000004 +#define SDL_CPU_SSE2 0x00000008 +#define SDL_CPU_ALTIVEC_PREFETCH 0x00000010 +#define SDL_CPU_ALTIVEC_NOPREFETCH 0x00000020 typedef struct { @@ -77,8 +77,7 @@ typedef struct Uint8 r, g, b, a; } SDL_BlitInfo; -typedef void (*SDL_BlitFunc) (SDL_BlitInfo *info); - +typedef void (*SDL_BlitFunc)(SDL_BlitInfo *info); typedef struct { @@ -106,367 +105,365 @@ struct SDL_BlitMap }; /* Functions found in SDL_blit.c */ -extern int SDL_CalculateBlit(SDL_Surface * surface); +extern int SDL_CalculateBlit(SDL_Surface *surface); /* Functions found in SDL_blit_*.c */ -extern SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface * surface); -extern SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface * surface); -extern SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface * surface); -extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface * surface); +extern SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface); +extern SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface); +extern SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface); +extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface); /* * Useful macros for blitting routines */ #if defined(__GNUC__) -#define DECLARE_ALIGNED(t,v,a) t __attribute__((aligned(a))) v +#define DECLARE_ALIGNED(t, v, a) t __attribute__((aligned(a))) v #elif defined(_MSC_VER) -#define DECLARE_ALIGNED(t,v,a) __declspec(align(a)) t v +#define DECLARE_ALIGNED(t, v, a) __declspec(align(a)) t v #else -#define DECLARE_ALIGNED(t,v,a) t v +#define DECLARE_ALIGNED(t, v, a) t v #endif /* Load pixel of the specified format from a buffer and get its R-G-B values */ -#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b) \ -{ \ - r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ - g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ - b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ -} -#define RGB_FROM_RGB565(Pixel, r, g, b) \ -{ \ - r = SDL_expand_byte[3][((Pixel&0xF800)>>11)]; \ - g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)]; \ - b = SDL_expand_byte[3][(Pixel&0x001F)]; \ -} -#define RGB_FROM_RGB555(Pixel, r, g, b) \ -{ \ - r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)]; \ - g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)]; \ - b = SDL_expand_byte[3][(Pixel&0x001F)]; \ -} -#define RGB_FROM_RGB888(Pixel, r, g, b) \ -{ \ - r = ((Pixel&0xFF0000)>>16); \ - g = ((Pixel&0xFF00)>>8); \ - b = (Pixel&0xFF); \ -} -#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel) \ -do { \ - switch (bpp) { \ - case 1: \ - Pixel = *((Uint8 *)(buf)); \ - break; \ - \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - break; \ - \ - case 3: { \ - Uint8 *B = (Uint8 *)(buf); \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \ - } else { \ - Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \ - } \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - break; \ - \ - default: \ - Pixel = 0; /* stop gcc complaints */ \ - break; \ - } \ -} while (0) - -#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b) \ -do { \ - switch (bpp) { \ - case 1: \ - Pixel = *((Uint8 *)(buf)); \ - RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ - break; \ - \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ - break; \ - \ - case 3: { \ - Pixel = 0; \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - r = *((buf)+fmt->Rshift/8); \ - g = *((buf)+fmt->Gshift/8); \ - b = *((buf)+fmt->Bshift/8); \ - } else { \ - r = *((buf)+2-fmt->Rshift/8); \ - g = *((buf)+2-fmt->Gshift/8); \ - b = *((buf)+2-fmt->Bshift/8); \ - } \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ - break; \ - \ - default: \ - /* stop gcc complaints */ \ - Pixel = 0; \ - r = g = b = 0; \ - break; \ - } \ -} while (0) +#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b) \ + { \ + r = SDL_expand_byte[fmt->Rloss][((Pixel & fmt->Rmask) >> fmt->Rshift)]; \ + g = SDL_expand_byte[fmt->Gloss][((Pixel & fmt->Gmask) >> fmt->Gshift)]; \ + b = SDL_expand_byte[fmt->Bloss][((Pixel & fmt->Bmask) >> fmt->Bshift)]; \ + } +#define RGB_FROM_RGB565(Pixel, r, g, b) \ + { \ + r = SDL_expand_byte[3][((Pixel & 0xF800) >> 11)]; \ + g = SDL_expand_byte[2][((Pixel & 0x07E0) >> 5)]; \ + b = SDL_expand_byte[3][(Pixel & 0x001F)]; \ + } +#define RGB_FROM_RGB555(Pixel, r, g, b) \ + { \ + r = SDL_expand_byte[3][((Pixel & 0x7C00) >> 10)]; \ + g = SDL_expand_byte[3][((Pixel & 0x03E0) >> 5)]; \ + b = SDL_expand_byte[3][(Pixel & 0x001F)]; \ + } +#define RGB_FROM_RGB888(Pixel, r, g, b) \ + { \ + r = ((Pixel & 0xFF0000) >> 16); \ + g = ((Pixel & 0xFF00) >> 8); \ + b = (Pixel & 0xFF); \ + } +#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel) \ + do { \ + switch (bpp) { \ + case 1: \ + Pixel = *((Uint8 *)(buf)); \ + break; \ + \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + break; \ + \ + case 3: \ + { \ + Uint8 *B = (Uint8 *)(buf); \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \ + } else { \ + Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \ + } \ + } break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + break; \ + \ + default: \ + Pixel = 0; /* stop gcc complaints */ \ + break; \ + } \ + } while (0) + +#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b) \ + do { \ + switch (bpp) { \ + case 1: \ + Pixel = *((Uint8 *)(buf)); \ + RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ + break; \ + \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ + break; \ + \ + case 3: \ + { \ + Pixel = 0; \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + r = *((buf) + fmt->Rshift / 8); \ + g = *((buf) + fmt->Gshift / 8); \ + b = *((buf) + fmt->Bshift / 8); \ + } else { \ + r = *((buf) + 2 - fmt->Rshift / 8); \ + g = *((buf) + 2 - fmt->Gshift / 8); \ + b = *((buf) + 2 - fmt->Bshift / 8); \ + } \ + } break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ + break; \ + \ + default: \ + /* stop gcc complaints */ \ + Pixel = 0; \ + r = g = b = 0; \ + break; \ + } \ + } while (0) /* Assemble R-G-B values into a specified pixel format and store them */ -#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \ -{ \ - Pixel = ((r>>fmt->Rloss)<Rshift)| \ - ((g>>fmt->Gloss)<Gshift)| \ - ((b>>fmt->Bloss)<Bshift)| \ - fmt->Amask; \ -} -#define RGB565_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3); \ -} -#define RGB555_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3); \ -} -#define RGB888_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = (r<<16)|(g<<8)|b; \ -} -#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (a<<24)|(r<<16)|(g<<8)|b; \ -} -#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (r<<24)|(g<<16)|(b<<8)|a; \ -} -#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (a<<24)|(b<<16)|(g<<8)|r; \ -} -#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (b<<24)|(g<<16)|(r<<8)|a; \ -} -#define ARGB2101010_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - r = r ? ((r << 2) | 0x3) : 0; \ - g = g ? ((g << 2) | 0x3) : 0; \ - b = b ? ((b << 2) | 0x3) : 0; \ - a = (a * 3) / 255; \ - Pixel = (a<<30)|(r<<20)|(g<<10)|b; \ -} -#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b) \ -{ \ - switch (bpp) { \ - case 1: { \ - Uint8 _pixel; \ - \ - PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ - *((Uint8 *)(buf)) = _pixel; \ - } \ - break; \ - \ - case 2: { \ - Uint16 _pixel; \ - \ - PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ - *((Uint16 *)(buf)) = _pixel; \ - } \ - break; \ - \ - case 3: { \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - *((buf)+fmt->Rshift/8) = r; \ - *((buf)+fmt->Gshift/8) = g; \ - *((buf)+fmt->Bshift/8) = b; \ - } else { \ - *((buf)+2-fmt->Rshift/8) = r; \ - *((buf)+2-fmt->Gshift/8) = g; \ - *((buf)+2-fmt->Bshift/8) = b; \ - } \ - } \ - break; \ - \ - case 4: { \ - Uint32 _pixel; \ - \ - PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ - *((Uint32 *)(buf)) = _pixel; \ - } \ - break; \ - } \ -} +#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \ + { \ + Pixel = ((r >> fmt->Rloss) << fmt->Rshift) | \ + ((g >> fmt->Gloss) << fmt->Gshift) | \ + ((b >> fmt->Bloss) << fmt->Bshift) | \ + fmt->Amask; \ + } +#define RGB565_FROM_RGB(Pixel, r, g, b) \ + { \ + Pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); \ + } +#define RGB555_FROM_RGB(Pixel, r, g, b) \ + { \ + Pixel = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); \ + } +#define RGB888_FROM_RGB(Pixel, r, g, b) \ + { \ + Pixel = (r << 16) | (g << 8) | b; \ + } +#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a) \ + { \ + Pixel = (a << 24) | (r << 16) | (g << 8) | b; \ + } +#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a) \ + { \ + Pixel = (r << 24) | (g << 16) | (b << 8) | a; \ + } +#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a) \ + { \ + Pixel = (a << 24) | (b << 16) | (g << 8) | r; \ + } +#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a) \ + { \ + Pixel = (b << 24) | (g << 16) | (r << 8) | a; \ + } +#define ARGB2101010_FROM_RGBA(Pixel, r, g, b, a) \ + { \ + r = r ? ((r << 2) | 0x3) : 0; \ + g = g ? ((g << 2) | 0x3) : 0; \ + b = b ? ((b << 2) | 0x3) : 0; \ + a = (a * 3) / 255; \ + Pixel = (a << 30) | (r << 20) | (g << 10) | b; \ + } +#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b) \ + { \ + switch (bpp) { \ + case 1: \ + { \ + Uint8 _pixel; \ + \ + PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ + *((Uint8 *)(buf)) = _pixel; \ + } break; \ + \ + case 2: \ + { \ + Uint16 _pixel; \ + \ + PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ + *((Uint16 *)(buf)) = _pixel; \ + } break; \ + \ + case 3: \ + { \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + *((buf) + fmt->Rshift / 8) = r; \ + *((buf) + fmt->Gshift / 8) = g; \ + *((buf) + fmt->Bshift / 8) = b; \ + } else { \ + *((buf) + 2 - fmt->Rshift / 8) = r; \ + *((buf) + 2 - fmt->Gshift / 8) = g; \ + *((buf) + 2 - fmt->Bshift / 8) = b; \ + } \ + } break; \ + \ + case 4: \ + { \ + Uint32 _pixel; \ + \ + PIXEL_FROM_RGB(_pixel, fmt, r, g, b); \ + *((Uint32 *)(buf)) = _pixel; \ + } break; \ + } \ + } /* FIXME: Should we rescale alpha into 0..255 here? */ -#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \ -{ \ - r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ - g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ - b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ - a = SDL_expand_byte[fmt->Aloss][((Pixel&fmt->Amask)>>fmt->Ashift)]; \ -} -#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a) \ -{ \ - r = (Pixel&fmt->Rmask)>>fmt->Rshift; \ - g = (Pixel&fmt->Gmask)>>fmt->Gshift; \ - b = (Pixel&fmt->Bmask)>>fmt->Bshift; \ - a = (Pixel&fmt->Amask)>>fmt->Ashift; \ -} -#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a) \ -{ \ - r = (Pixel>>24); \ - g = ((Pixel>>16)&0xFF); \ - b = ((Pixel>>8)&0xFF); \ - a = (Pixel&0xFF); \ -} -#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a) \ -{ \ - r = ((Pixel>>16)&0xFF); \ - g = ((Pixel>>8)&0xFF); \ - b = (Pixel&0xFF); \ - a = (Pixel>>24); \ -} -#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a) \ -{ \ - r = (Pixel&0xFF); \ - g = ((Pixel>>8)&0xFF); \ - b = ((Pixel>>16)&0xFF); \ - a = (Pixel>>24); \ -} -#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a) \ -{ \ - r = ((Pixel>>8)&0xFF); \ - g = ((Pixel>>16)&0xFF); \ - b = (Pixel>>24); \ - a = (Pixel&0xFF); \ -} -#define RGBA_FROM_ARGB2101010(Pixel, r, g, b, a) \ -{ \ - r = ((Pixel>>22)&0xFF); \ - g = ((Pixel>>12)&0xFF); \ - b = ((Pixel>>2)&0xFF); \ - a = SDL_expand_byte[6][(Pixel>>30)]; \ -} -#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a) \ -do { \ - switch (bpp) { \ - case 1: \ - Pixel = *((Uint8 *)(buf)); \ - RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ - break; \ - \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ - break; \ - \ - case 3: { \ - Pixel = 0; \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - r = *((buf)+fmt->Rshift/8); \ - g = *((buf)+fmt->Gshift/8); \ - b = *((buf)+fmt->Bshift/8); \ - } else { \ - r = *((buf)+2-fmt->Rshift/8); \ - g = *((buf)+2-fmt->Gshift/8); \ - b = *((buf)+2-fmt->Bshift/8); \ - } \ - a = 0xFF; \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ - break; \ - \ - default: \ - /* stop gcc complaints */ \ - Pixel = 0; \ - r = g = b = a = 0; \ - break; \ - } \ -} while (0) +#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \ + { \ + r = SDL_expand_byte[fmt->Rloss][((Pixel & fmt->Rmask) >> fmt->Rshift)]; \ + g = SDL_expand_byte[fmt->Gloss][((Pixel & fmt->Gmask) >> fmt->Gshift)]; \ + b = SDL_expand_byte[fmt->Bloss][((Pixel & fmt->Bmask) >> fmt->Bshift)]; \ + a = SDL_expand_byte[fmt->Aloss][((Pixel & fmt->Amask) >> fmt->Ashift)]; \ + } +#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a) \ + { \ + r = (Pixel & fmt->Rmask) >> fmt->Rshift; \ + g = (Pixel & fmt->Gmask) >> fmt->Gshift; \ + b = (Pixel & fmt->Bmask) >> fmt->Bshift; \ + a = (Pixel & fmt->Amask) >> fmt->Ashift; \ + } +#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a) \ + { \ + r = (Pixel >> 24); \ + g = ((Pixel >> 16) & 0xFF); \ + b = ((Pixel >> 8) & 0xFF); \ + a = (Pixel & 0xFF); \ + } +#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a) \ + { \ + r = ((Pixel >> 16) & 0xFF); \ + g = ((Pixel >> 8) & 0xFF); \ + b = (Pixel & 0xFF); \ + a = (Pixel >> 24); \ + } +#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a) \ + { \ + r = (Pixel & 0xFF); \ + g = ((Pixel >> 8) & 0xFF); \ + b = ((Pixel >> 16) & 0xFF); \ + a = (Pixel >> 24); \ + } +#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a) \ + { \ + r = ((Pixel >> 8) & 0xFF); \ + g = ((Pixel >> 16) & 0xFF); \ + b = (Pixel >> 24); \ + a = (Pixel & 0xFF); \ + } +#define RGBA_FROM_ARGB2101010(Pixel, r, g, b, a) \ + { \ + r = ((Pixel >> 22) & 0xFF); \ + g = ((Pixel >> 12) & 0xFF); \ + b = ((Pixel >> 2) & 0xFF); \ + a = SDL_expand_byte[6][(Pixel >> 30)]; \ + } +#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a) \ + do { \ + switch (bpp) { \ + case 1: \ + Pixel = *((Uint8 *)(buf)); \ + RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ + break; \ + \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ + break; \ + \ + case 3: \ + { \ + Pixel = 0; \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + r = *((buf) + fmt->Rshift / 8); \ + g = *((buf) + fmt->Gshift / 8); \ + b = *((buf) + fmt->Bshift / 8); \ + } else { \ + r = *((buf) + 2 - fmt->Rshift / 8); \ + g = *((buf) + 2 - fmt->Gshift / 8); \ + b = *((buf) + 2 - fmt->Bshift / 8); \ + } \ + a = 0xFF; \ + } break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ + break; \ + \ + default: \ + /* stop gcc complaints */ \ + Pixel = 0; \ + r = g = b = a = 0; \ + break; \ + } \ + } while (0) /* FIXME: this isn't correct, especially for Alpha (maximum != 255) */ -#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ -{ \ - Pixel = ((r>>fmt->Rloss)<Rshift)| \ - ((g>>fmt->Gloss)<Gshift)| \ - ((b>>fmt->Bloss)<Bshift)| \ - ((a>>fmt->Aloss)<Ashift); \ -} -#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \ -{ \ - switch (bpp) { \ - case 1: { \ - Uint8 _pixel; \ - \ - PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ - *((Uint8 *)(buf)) = _pixel; \ - } \ - break; \ - \ - case 2: { \ - Uint16 _pixel; \ - \ - PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ - *((Uint16 *)(buf)) = _pixel; \ - } \ - break; \ - \ - case 3: { \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - *((buf)+fmt->Rshift/8) = r; \ - *((buf)+fmt->Gshift/8) = g; \ - *((buf)+fmt->Bshift/8) = b; \ - } else { \ - *((buf)+2-fmt->Rshift/8) = r; \ - *((buf)+2-fmt->Gshift/8) = g; \ - *((buf)+2-fmt->Bshift/8) = b; \ - } \ - } \ - break; \ - \ - case 4: { \ - Uint32 _pixel; \ - \ - PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ - *((Uint32 *)(buf)) = _pixel; \ - } \ - break; \ - } \ -} +#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ + { \ + Pixel = ((r >> fmt->Rloss) << fmt->Rshift) | \ + ((g >> fmt->Gloss) << fmt->Gshift) | \ + ((b >> fmt->Bloss) << fmt->Bshift) | \ + ((a >> fmt->Aloss) << fmt->Ashift); \ + } +#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \ + { \ + switch (bpp) { \ + case 1: \ + { \ + Uint8 _pixel; \ + \ + PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ + *((Uint8 *)(buf)) = _pixel; \ + } break; \ + \ + case 2: \ + { \ + Uint16 _pixel; \ + \ + PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ + *((Uint16 *)(buf)) = _pixel; \ + } break; \ + \ + case 3: \ + { \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + *((buf) + fmt->Rshift / 8) = r; \ + *((buf) + fmt->Gshift / 8) = g; \ + *((buf) + fmt->Bshift / 8) = b; \ + } else { \ + *((buf) + 2 - fmt->Rshift / 8) = r; \ + *((buf) + 2 - fmt->Gshift / 8) = g; \ + *((buf) + 2 - fmt->Bshift / 8) = b; \ + } \ + } break; \ + \ + case 4: \ + { \ + Uint32 _pixel; \ + \ + PIXEL_FROM_RGBA(_pixel, fmt, r, g, b, a); \ + *((Uint32 *)(buf)) = _pixel; \ + } break; \ + } \ + } /* Blend the RGB values of two pixels with an alpha value */ -#define ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB) \ -do { \ - dR = (Uint8)((((int)(sR-dR)*(int)A)/255)+dR); \ - dG = (Uint8)((((int)(sG-dG)*(int)A)/255)+dG); \ - dB = (Uint8)((((int)(sB-dB)*(int)A)/255)+dB); \ -} while(0) - +#define ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB) \ + do { \ + dR = (Uint8)((((int)(sR - dR) * (int)A) / 255) + dR); \ + dG = (Uint8)((((int)(sG - dG) * (int)A) / 255) + dG); \ + dB = (Uint8)((((int)(sB - dB) * (int)A) / 255) + dB); \ + } while (0) /* Blend the RGBA values of two pixels */ -#define ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA) \ -do { \ - dR = (Uint8)((((int)(sR-dR)*(int)sA)/255)+dR); \ - dG = (Uint8)((((int)(sG-dG)*(int)sA)/255)+dG); \ - dB = (Uint8)((((int)(sB-dB)*(int)sA)/255)+dB); \ - dA = (Uint8)((int)sA+dA-((int)sA*dA)/255); \ -} while(0) - +#define ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA) \ + do { \ + dR = (Uint8)((((int)(sR - dR) * (int)sA) / 255) + dR); \ + dG = (Uint8)((((int)(sG - dG) * (int)sA) / 255) + dG); \ + dB = (Uint8)((((int)(sB - dB) * (int)sA) / 255) + dB); \ + dA = (Uint8)((int)sA + dA - ((int)sA * dA) / 255); \ + } while (0) /* This is a very useful loop for optimizing blitters */ #if defined(_MSC_VER) && (_MSC_VER == 1300) @@ -477,83 +474,114 @@ do { \ #ifdef USE_DUFFS_LOOP /* 8-times unrolled loop */ -#define DUFFS_LOOP8(pixel_copy_increment, width) \ -{ int n = (width+7)/8; \ - switch (width & 7) { \ - case 0: do { pixel_copy_increment; SDL_FALLTHROUGH; \ - case 7: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 6: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 5: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 4: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 3: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 2: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 1: pixel_copy_increment; \ - } while ( --n > 0 ); \ - } \ -} +#define DUFFS_LOOP8(pixel_copy_increment, width) \ + { \ + int n = (width + 7) / 8; \ + switch (width & 7) { \ + case 0: \ + do { \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 7: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 6: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 5: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 4: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 3: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 2: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 1: \ + pixel_copy_increment; \ + } while (--n > 0); \ + } \ + } /* 4-times unrolled loop */ -#define DUFFS_LOOP4(pixel_copy_increment, width) \ -{ int n = (width+3)/4; \ - switch (width & 3) { \ - case 0: do { pixel_copy_increment; SDL_FALLTHROUGH; \ - case 3: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 2: pixel_copy_increment; SDL_FALLTHROUGH; \ - case 1: pixel_copy_increment; \ - } while (--n > 0); \ - } \ -} +#define DUFFS_LOOP4(pixel_copy_increment, width) \ + { \ + int n = (width + 3) / 4; \ + switch (width & 3) { \ + case 0: \ + do { \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 3: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 2: \ + pixel_copy_increment; \ + SDL_FALLTHROUGH; \ + case 1: \ + pixel_copy_increment; \ + } while (--n > 0); \ + } \ + } /* Use the 8-times version of the loop by default */ -#define DUFFS_LOOP(pixel_copy_increment, width) \ +#define DUFFS_LOOP(pixel_copy_increment, width) \ DUFFS_LOOP8(pixel_copy_increment, width) /* Special version of Duff's device for even more optimization */ -#define DUFFS_LOOP_124(pixel_copy_increment1, \ - pixel_copy_increment2, \ - pixel_copy_increment4, width) \ -{ int n = width; \ - if (n & 1) { \ - pixel_copy_increment1; n -= 1; \ - } \ - if (n & 2) { \ - pixel_copy_increment2; n -= 2; \ - } \ - if (n & 4) { \ - pixel_copy_increment4; n -= 4; \ - } \ - if (n) { \ - n /= 8; \ - do { \ - pixel_copy_increment4; \ - pixel_copy_increment4; \ - } while (--n > 0); \ - } \ -} +#define DUFFS_LOOP_124(pixel_copy_increment1, \ + pixel_copy_increment2, \ + pixel_copy_increment4, width) \ + { \ + int n = width; \ + if (n & 1) { \ + pixel_copy_increment1; \ + n -= 1; \ + } \ + if (n & 2) { \ + pixel_copy_increment2; \ + n -= 2; \ + } \ + if (n & 4) { \ + pixel_copy_increment4; \ + n -= 4; \ + } \ + if (n) { \ + n /= 8; \ + do { \ + pixel_copy_increment4; \ + pixel_copy_increment4; \ + } while (--n > 0); \ + } \ + } #else /* Don't use Duff's device to unroll loops */ -#define DUFFS_LOOP(pixel_copy_increment, width) \ -{ int n; \ - for ( n=width; n > 0; --n ) { \ - pixel_copy_increment; \ - } \ -} -#define DUFFS_LOOP8(pixel_copy_increment, width) \ +#define DUFFS_LOOP(pixel_copy_increment, width) \ + { \ + int n; \ + for (n = width; n > 0; --n) { \ + pixel_copy_increment; \ + } \ + } +#define DUFFS_LOOP8(pixel_copy_increment, width) \ DUFFS_LOOP(pixel_copy_increment, width) -#define DUFFS_LOOP4(pixel_copy_increment, width) \ +#define DUFFS_LOOP4(pixel_copy_increment, width) \ DUFFS_LOOP(pixel_copy_increment, width) -#define DUFFS_LOOP_124(pixel_copy_increment1, \ - pixel_copy_increment2, \ - pixel_copy_increment4, width) \ +#define DUFFS_LOOP_124(pixel_copy_increment1, \ + pixel_copy_increment2, \ + pixel_copy_increment4, width) \ DUFFS_LOOP(pixel_copy_increment1, width) #endif /* USE_DUFFS_LOOP */ /* Prevent Visual C++ 6.0 from printing out stupid warnings */ #if defined(_MSC_VER) && (_MSC_VER >= 600) -#pragma warning(disable: 4550) +#pragma warning(disable : 4550) #endif #endif /* SDL_blit_h_ */ diff --git a/modules/SDL2/src/video/SDL_blit_0.c b/modules/SDL2/src/video/SDL_blit_0.c index e2bd60c..8be3091 100644 --- a/modules/SDL2/src/video/SDL_blit_0.c +++ b/modules/SDL2/src/video/SDL_blit_0.c @@ -27,8 +27,7 @@ /* Functions to blit from bitmaps to other surfaces */ -static void -BlitBto1(SDL_BlitInfo * info) +static void BlitBto1(SDL_BlitInfo *info) { int c; int width, height; @@ -46,44 +45,81 @@ BlitBto1(SDL_BlitInfo * info) srcskip += width - (width + 7) / 8; if (map) { - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + *dst = map[bit]; + } + dst++; + byte >>= 1; } - bit = (byte & 0x80) >> 7; - if (1) { - *dst = map[bit]; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + *dst = map[bit]; + } + dst++; + byte <<= 1; } - dst++; - byte <<= 1; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } else { - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + *dst = bit; + } + dst++; + byte >>= 1; } - bit = (byte & 0x80) >> 7; - if (1) { - *dst = bit; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + *dst = bit; + } + dst++; + byte <<= 1; } - dst++; - byte <<= 1; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } } -static void -BlitBto2(SDL_BlitInfo * info) +static void BlitBto2(SDL_BlitInfo *info) { int c; int width, height; @@ -96,31 +132,49 @@ BlitBto2(SDL_BlitInfo * info) height = info->dst_h; src = info->src; srcskip = info->src_skip; - dst = (Uint16 *) info->dst; + dst = (Uint16 *)info->dst; dstskip = info->dst_skip / 2; - map = (Uint16 *) info->table; + map = (Uint16 *)info->table; srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + *dst = map[bit]; + } + byte >>= 1; + dst++; } - bit = (byte & 0x80) >> 7; - if (1) { - *dst = map[bit]; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + *dst = map[bit]; + } + byte <<= 1; + dst++; } - byte <<= 1; - dst++; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } -static void -BlitBto3(SDL_BlitInfo * info) +static void BlitBto3(SDL_BlitInfo *info) { int c, o; int width, height; @@ -137,29 +191,50 @@ BlitBto3(SDL_BlitInfo * info) map = info->table; srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + o = bit * 4; + dst[0] = map[o++]; + dst[1] = map[o++]; + dst[2] = map[o++]; + } + byte >>= 1; + dst += 3; } - bit = (byte & 0x80) >> 7; - if (1) { - o = bit * 4; - dst[0] = map[o++]; - dst[1] = map[o++]; - dst[2] = map[o++]; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + o = bit * 4; + dst[0] = map[o++]; + dst[1] = map[o++]; + dst[2] = map[o++]; + } + byte <<= 1; + dst += 3; } - byte <<= 1; - dst += 3; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } -static void -BlitBto4(SDL_BlitInfo * info) +static void BlitBto4(SDL_BlitInfo *info) { int width, height; Uint8 *src; @@ -172,31 +247,49 @@ BlitBto4(SDL_BlitInfo * info) height = info->dst_h; src = info->src; srcskip = info->src_skip; - dst = (Uint32 *) info->dst; + dst = (Uint32 *)info->dst; dstskip = info->dst_skip / 4; - map = (Uint32 *) info->table; + map = (Uint32 *)info->table; srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + *dst = map[bit]; + } + byte >>= 1; + dst++; } - bit = (byte & 0x80) >> 7; - if (1) { - *dst = map[bit]; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + *dst = map[bit]; + } + byte <<= 1; + dst++; } - byte <<= 1; - dst++; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } -static void -BlitBto1Key(SDL_BlitInfo * info) +static void BlitBto1Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -212,49 +305,86 @@ BlitBto1Key(SDL_BlitInfo * info) srcskip += width - (width + 7) / 8; if (palmap) { - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + *dst = palmap[bit]; + } + dst++; + byte >>= 1; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - *dst = palmap[bit]; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + *dst = palmap[bit]; + } + dst++; + byte <<= 1; } - dst++; - byte <<= 1; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } else { - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + *dst = bit; + } + dst++; + byte >>= 1; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - *dst = bit; + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + *dst = bit; + } + dst++; + byte <<= 1; } - dst++; - byte <<= 1; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } } -static void -BlitBto2Key(SDL_BlitInfo * info) +static void BlitBto2Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int srcskip = info->src_skip; int dstskip = info->dst_skip; Uint32 ckey = info->colorkey; @@ -265,26 +395,44 @@ BlitBto2Key(SDL_BlitInfo * info) srcskip += width - (width + 7) / 8; dstskip /= 2; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + *dstp = ((Uint16 *)palmap)[bit]; + } + byte >>= 1; + dstp++; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - *dstp = ((Uint16 *) palmap)[bit]; + src += srcskip; + dstp += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + *dstp = ((Uint16 *)palmap)[bit]; + } + byte <<= 1; + dstp++; } - byte <<= 1; - dstp++; + src += srcskip; + dstp += dstskip; } - src += srcskip; - dstp += dstskip; } } -static void -BlitBto3Key(SDL_BlitInfo * info) +static void BlitBto3Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -299,31 +447,49 @@ BlitBto3Key(SDL_BlitInfo * info) /* Set up some basic variables */ srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + SDL_memcpy(dst, &palmap[bit * 4], 3); + } + byte >>= 1; + dst += 3; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - SDL_memcpy(dst, &palmap[bit * 4], 3); + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + SDL_memcpy(dst, &palmap[bit * 4], 3); + } + byte <<= 1; + dst += 3; } - byte <<= 1; - dst += 3; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } -static void -BlitBto4Key(SDL_BlitInfo * info) +static void BlitBto4Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int srcskip = info->src_skip; int dstskip = info->dst_skip; Uint32 ckey = info->colorkey; @@ -334,26 +500,44 @@ BlitBto4Key(SDL_BlitInfo * info) srcskip += width - (width + 7) / 8; dstskip /= 4; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + *dstp = ((Uint32 *)palmap)[bit]; + } + byte >>= 1; + dstp++; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - *dstp = ((Uint32 *) palmap)[bit]; + src += srcskip; + dstp += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + *dstp = ((Uint32 *)palmap)[bit]; + } + byte <<= 1; + dstp++; } - byte <<= 1; - dstp++; + src += srcskip; + dstp += dstskip; } - src += srcskip; - dstp += dstskip; } } -static void -BlitBtoNAlpha(SDL_BlitInfo * info) +static void BlitBtoNAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -374,31 +558,54 @@ BlitBtoNAlpha(SDL_BlitInfo * info) dstbpp = dstfmt->BytesPerPixel; srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (1) { + sR = srcpal[bit].r; + sG = srcpal[bit].g; + sB = srcpal[bit].b; + DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); + ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + } + byte >>= 1; + dst += dstbpp; } - bit = (byte & 0x80) >> 7; - if (1) { - sR = srcpal[bit].r; - sG = srcpal[bit].g; - sB = srcpal[bit].b; - DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); - ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); - ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (1) { + sR = srcpal[bit].r; + sG = srcpal[bit].g; + sB = srcpal[bit].b; + DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); + ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + } + byte <<= 1; + dst += dstbpp; } - byte <<= 1; - dst += dstbpp; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } -static void -BlitBtoNAlphaKey(SDL_BlitInfo * info) +static void BlitBtoNAlphaKey(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -421,48 +628,70 @@ BlitBtoNAlphaKey(SDL_BlitInfo * info) dstbpp = dstfmt->BytesPerPixel; srcskip += width - (width + 7) / 8; - while (height--) { - Uint8 byte = 0, bit; - for (c = 0; c < width; ++c) { - if ((c & 7) == 0) { - byte = *src++; + if (info->src_fmt->format == SDL_PIXELFORMAT_INDEX1LSB) { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x01); + if (bit != ckey) { + sR = srcpal[bit].r; + sG = srcpal[bit].g; + sB = srcpal[bit].b; + DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); + ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + } + byte >>= 1; + dst += dstbpp; } - bit = (byte & 0x80) >> 7; - if (bit != ckey) { - sR = srcpal[bit].r; - sG = srcpal[bit].g; - sB = srcpal[bit].b; - DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); - ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); - ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + src += srcskip; + dst += dstskip; + } + } else { + while (height--) { + Uint8 byte = 0, bit; + for (c = 0; c < width; ++c) { + if (!(c & 7)) { + byte = *src++; + } + bit = (byte & 0x80) >> 7; + if (bit != ckey) { + sR = srcpal[bit].r; + sG = srcpal[bit].g; + sB = srcpal[bit].b; + DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA); + ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA); + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); + } + byte <<= 1; + dst += dstbpp; } - byte <<= 1; - dst += dstbpp; + src += srcskip; + dst += dstskip; } - src += srcskip; - dst += dstskip; } } static const SDL_BlitFunc bitmap_blit[] = { - (SDL_BlitFunc) NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4 + (SDL_BlitFunc)NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4 }; static const SDL_BlitFunc colorkey_blit[] = { - (SDL_BlitFunc) NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key + (SDL_BlitFunc)NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key }; - -static void -Blit4bto4(SDL_BlitInfo * info) +static void Blit4bto4(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; - Uint32 *dst = (Uint32 *) info->dst; + Uint32 *dst = (Uint32 *)info->dst; int srcskip = info->src_skip; int dstskip = info->dst_skip; - Uint32 *map = (Uint32 *) info->table; + Uint32 *map = (Uint32 *)info->table; int c; /* Set up some basic variables */ @@ -471,7 +700,7 @@ Blit4bto4(SDL_BlitInfo * info) while (height--) { Uint8 byte = 0, bit; for (c = 0; c < width; ++c) { - if ((c & 0x1) == 0) { + if (!(c & 0x1)) { byte = *src++; } bit = (byte & 0xF0) >> 4; @@ -482,21 +711,20 @@ Blit4bto4(SDL_BlitInfo * info) dst++; } src += srcskip; - dst = (Uint32 *) ((Uint8 *) dst + dstskip); + dst = (Uint32 *)((Uint8 *)dst + dstskip); } } -static void -Blit4bto4Key(SDL_BlitInfo * info) +static void Blit4bto4Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; - Uint32 *dst = (Uint32 *) info->dst; + Uint32 *dst = (Uint32 *)info->dst; int srcskip = info->src_skip; int dstskip = info->dst_skip; Uint32 ckey = info->colorkey; - Uint32 *map = (Uint32 *) info->table; + Uint32 *map = (Uint32 *)info->table; int c; /* Set up some basic variables */ @@ -505,7 +733,7 @@ Blit4bto4Key(SDL_BlitInfo * info) while (height--) { Uint8 byte = 0, bit; for (c = 0; c < width; ++c) { - if ((c & 0x1) == 0) { + if (!(c & 0x1)) { byte = *src++; } bit = (byte & 0xF0) >> 4; @@ -516,12 +744,11 @@ Blit4bto4Key(SDL_BlitInfo * info) dst++; } src += srcskip; - dst = (Uint32 *) ((Uint8 *) dst + dstskip); + dst = (Uint32 *)((Uint8 *)dst + dstskip); } } -SDL_BlitFunc -SDL_CalculateBlit0(SDL_Surface * surface) +SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface) { int which; @@ -529,11 +756,11 @@ SDL_CalculateBlit0(SDL_Surface * surface) if (surface->format->BitsPerPixel == 4) { if (surface->map->dst->format->BytesPerPixel == 4) { switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) { - case 0: - return Blit4bto4; + case 0: + return Blit4bto4; - case SDL_COPY_COLORKEY: - return Blit4bto4Key; + case SDL_COPY_COLORKEY: + return Blit4bto4Key; } } /* We don't fully support 4-bit packed pixel modes */ diff --git a/modules/SDL2/src/video/SDL_blit_1.c b/modules/SDL2/src/video/SDL_blit_1.c index 3406f69..a616067 100644 --- a/modules/SDL2/src/video/SDL_blit_1.c +++ b/modules/SDL2/src/video/SDL_blit_1.c @@ -29,8 +29,7 @@ /* Functions to blit from 8-bit surfaces to other surfaces */ -static void -Blit1to1(SDL_BlitInfo * info) +static void Blit1to1(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -73,16 +72,15 @@ Blit1to1(SDL_BlitInfo * info) /* This is now endian dependent */ #ifndef USE_DUFFS_LOOP -# if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) -# define HI 1 -# define LO 0 -# else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */ -# define HI 0 -# define LO 1 -# endif +#if (SDL_BYTEORDER == SDL_LIL_ENDIAN) +#define HI 1 +#define LO 0 +#else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */ +#define HI 0 +#define LO 1 #endif -static void -Blit1to2(SDL_BlitInfo * info) +#endif +static void Blit1to2(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -99,7 +97,7 @@ Blit1to2(SDL_BlitInfo * info) srcskip = info->src_skip; dst = info->dst; dstskip = info->dst_skip; - map = (Uint16 *) info->table; + map = (Uint16 *)info->table; #ifdef USE_DUFFS_LOOP while (height--) { @@ -116,7 +114,7 @@ Blit1to2(SDL_BlitInfo * info) } #else /* Memory align at 4-byte boundary, if necessary */ - if ((long) dst & 0x03) { + if ((long)dst & 0x03) { /* Don't do anything if width is 0 */ if (width == 0) { return; @@ -125,30 +123,31 @@ Blit1to2(SDL_BlitInfo * info) while (height--) { /* Perform copy alignment */ - *(Uint16 *) dst = map[*src++]; + *(Uint16 *)dst = map[*src++]; dst += 2; /* Copy in 4 pixel chunks */ for (c = width / 4; c; --c) { - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; } /* Get any leftovers */ switch (width & 3) { case 3: - *(Uint16 *) dst = map[*src++]; + *(Uint16 *)dst = map[*src++]; dst += 2; + SDL_FALLTHROUGH; case 2: - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; break; case 1: - *(Uint16 *) dst = map[*src++]; + *(Uint16 *)dst = map[*src++]; dst += 2; break; } @@ -159,25 +158,26 @@ Blit1to2(SDL_BlitInfo * info) while (height--) { /* Copy in 4 pixel chunks */ for (c = width / 4; c; --c) { - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; } /* Get any leftovers */ switch (width & 3) { case 3: - *(Uint16 *) dst = map[*src++]; + *(Uint16 *)dst = map[*src++]; dst += 2; + SDL_FALLTHROUGH; case 2: - *(Uint32 *) dst = (map[src[HI]] << 16) | (map[src[LO]]); + *(Uint32 *)dst = (map[src[HI]] << 16) | (map[src[LO]]); src += 2; dst += 4; break; case 1: - *(Uint16 *) dst = map[*src++]; + *(Uint16 *)dst = map[*src++]; dst += 2; break; } @@ -188,8 +188,7 @@ Blit1to2(SDL_BlitInfo * info) #endif /* USE_DUFFS_LOOP */ } -static void -Blit1to3(SDL_BlitInfo * info) +static void Blit1to3(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -237,8 +236,7 @@ Blit1to3(SDL_BlitInfo * info) } } -static void -Blit1to4(SDL_BlitInfo * info) +static void Blit1to4(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -253,9 +251,9 @@ Blit1to4(SDL_BlitInfo * info) height = info->dst_h; src = info->src; srcskip = info->src_skip; - dst = (Uint32 *) info->dst; + dst = (Uint32 *)info->dst; dstskip = info->dst_skip / 4; - map = (Uint32 *) info->table; + map = (Uint32 *)info->table; while (height--) { #ifdef USE_DUFFS_LOOP @@ -274,8 +272,10 @@ Blit1to4(SDL_BlitInfo * info) switch (width & 3) { case 3: *dst++ = map[*src++]; + SDL_FALLTHROUGH; case 2: *dst++ = map[*src++]; + SDL_FALLTHROUGH; case 1: *dst++ = map[*src++]; } @@ -285,8 +285,7 @@ Blit1to4(SDL_BlitInfo * info) } } -static void -Blit1to1Key(SDL_BlitInfo * info) +static void Blit1to1Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -332,16 +331,15 @@ Blit1to1Key(SDL_BlitInfo * info) } } -static void -Blit1to2Key(SDL_BlitInfo * info) +static void Blit1to2Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; int srcskip = info->src_skip; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip; - Uint16 *palmap = (Uint16 *) info->table; + Uint16 *palmap = (Uint16 *)info->table; Uint32 ckey = info->colorkey; /* Set up some basic variables */ @@ -364,8 +362,7 @@ Blit1to2Key(SDL_BlitInfo * info) } } -static void -Blit1to3Key(SDL_BlitInfo * info) +static void Blit1to3Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -397,16 +394,15 @@ Blit1to3Key(SDL_BlitInfo * info) } } -static void -Blit1to4Key(SDL_BlitInfo * info) +static void Blit1to4Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; Uint8 *src = info->src; int srcskip = info->src_skip; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip; - Uint32 *palmap = (Uint32 *) info->table; + Uint32 *palmap = (Uint32 *)info->table; Uint32 ckey = info->colorkey; /* Set up some basic variables */ @@ -429,8 +425,7 @@ Blit1to4Key(SDL_BlitInfo * info) } } -static void -Blit1toNAlpha(SDL_BlitInfo * info) +static void Blit1toNAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -469,8 +464,7 @@ Blit1toNAlpha(SDL_BlitInfo * info) } } -static void -Blit1toNAlphaKey(SDL_BlitInfo * info) +static void Blit1toNAlphaKey(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -513,15 +507,14 @@ Blit1toNAlphaKey(SDL_BlitInfo * info) } static const SDL_BlitFunc one_blit[] = { - (SDL_BlitFunc) NULL, Blit1to1, Blit1to2, Blit1to3, Blit1to4 + (SDL_BlitFunc)NULL, Blit1to1, Blit1to2, Blit1to3, Blit1to4 }; static const SDL_BlitFunc one_blitkey[] = { - (SDL_BlitFunc) NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key + (SDL_BlitFunc)NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key }; -SDL_BlitFunc -SDL_CalculateBlit1(SDL_Surface * surface) +SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface) { int which; SDL_PixelFormat *dstfmt; @@ -539,16 +532,19 @@ SDL_CalculateBlit1(SDL_Surface * surface) case SDL_COPY_COLORKEY: return one_blitkey[which]; + case SDL_COPY_COLORKEY | SDL_COPY_BLEND: /* this is not super-robust but handles a specific case we found sdl12-compat. */ + return (surface->map->info.a == 255) ? one_blitkey[which] : (SDL_BlitFunc)NULL; + case SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND: /* Supporting 8bpp->8bpp alpha is doable but requires lots of tables which consume space and takes time to precompute, so is better left to the user */ - return which >= 2 ? Blit1toNAlpha : (SDL_BlitFunc) NULL; + return which >= 2 ? Blit1toNAlpha : (SDL_BlitFunc)NULL; case SDL_COPY_COLORKEY | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND: - return which >= 2 ? Blit1toNAlphaKey : (SDL_BlitFunc) NULL; + return which >= 2 ? Blit1toNAlphaKey : (SDL_BlitFunc)NULL; } - return (SDL_BlitFunc) NULL; + return (SDL_BlitFunc)NULL; } #endif /* SDL_HAVE_BLIT_1 */ diff --git a/modules/SDL2/src/video/SDL_blit_A.c b/modules/SDL2/src/video/SDL_blit_A.c index d4d4f52..316f3f3 100644 --- a/modules/SDL2/src/video/SDL_blit_A.c +++ b/modules/SDL2/src/video/SDL_blit_A.c @@ -28,8 +28,7 @@ /* Functions to perform alpha blended blitting */ /* N->1 blending with per-surface alpha */ -static void -BlitNto1SurfaceAlpha(SDL_BlitInfo * info) +static void BlitNto1SurfaceAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -75,8 +74,7 @@ BlitNto1SurfaceAlpha(SDL_BlitInfo * info) } /* N->1 blending with pixel alpha */ -static void -BlitNto1PixelAlpha(SDL_BlitInfo * info) +static void BlitNto1PixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -121,8 +119,7 @@ BlitNto1PixelAlpha(SDL_BlitInfo * info) } /* colorkeyed N->1 blending with per-surface alpha */ -static void -BlitNto1SurfaceAlphaKey(SDL_BlitInfo * info) +static void BlitNto1SurfaceAlphaKey(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -173,51 +170,49 @@ BlitNto1SurfaceAlphaKey(SDL_BlitInfo * info) #ifdef __MMX__ /* fast RGB888->(A)RGB888 blending with surface alpha=128 special case */ -static void -BlitRGBtoRGBSurfaceAlpha128MMX(SDL_BlitInfo * info) +static void BlitRGBtoRGBSurfaceAlpha128MMX(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; Uint32 dalpha = info->dst_fmt->Amask; __m64 src1, src2, dst1, dst2, lmask, hmask, dsta; - hmask = _mm_set_pi32(0x00fefefe, 0x00fefefe); /* alpha128 mask -> hmask */ - lmask = _mm_set_pi32(0x00010101, 0x00010101); /* !alpha128 mask -> lmask */ - dsta = _mm_set_pi32(dalpha, dalpha); /* dst alpha mask -> dsta */ + hmask = _mm_set_pi32(0x00fefefe, 0x00fefefe); /* alpha128 mask -> hmask */ + lmask = _mm_set_pi32(0x00010101, 0x00010101); /* !alpha128 mask -> lmask */ + dsta = _mm_set_pi32(dalpha, dalpha); /* dst alpha mask -> dsta */ while (height--) { int n = width; if (n & 1) { Uint32 s = *srcp++; Uint32 d = *dstp; - *dstp++ = ((((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) - + (s & d & 0x00010101)) | dalpha; + *dstp++ = ((((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) + (s & d & 0x00010101)) | dalpha; n--; } for (n >>= 1; n > 0; --n) { - dst1 = *(__m64 *) dstp; /* 2 x dst -> dst1(ARGBARGB) */ - dst2 = dst1; /* 2 x dst -> dst2(ARGBARGB) */ + dst1 = *(__m64 *)dstp; /* 2 x dst -> dst1(ARGBARGB) */ + dst2 = dst1; /* 2 x dst -> dst2(ARGBARGB) */ - src1 = *(__m64 *) srcp; /* 2 x src -> src1(ARGBARGB) */ - src2 = src1; /* 2 x src -> src2(ARGBARGB) */ + src1 = *(__m64 *)srcp; /* 2 x src -> src1(ARGBARGB) */ + src2 = src1; /* 2 x src -> src2(ARGBARGB) */ - dst2 = _mm_and_si64(dst2, hmask); /* dst & mask -> dst2 */ - src2 = _mm_and_si64(src2, hmask); /* src & mask -> src2 */ - src2 = _mm_add_pi32(src2, dst2); /* dst2 + src2 -> src2 */ - src2 = _mm_srli_pi32(src2, 1); /* src2 >> 1 -> src2 */ + dst2 = _mm_and_si64(dst2, hmask); /* dst & mask -> dst2 */ + src2 = _mm_and_si64(src2, hmask); /* src & mask -> src2 */ + src2 = _mm_add_pi32(src2, dst2); /* dst2 + src2 -> src2 */ + src2 = _mm_srli_pi32(src2, 1); /* src2 >> 1 -> src2 */ - dst1 = _mm_and_si64(dst1, src1); /* src & dst -> dst1 */ - dst1 = _mm_and_si64(dst1, lmask); /* dst1 & !mask -> dst1 */ - dst1 = _mm_add_pi32(dst1, src2); /* src2 + dst1 -> dst1 */ - dst1 = _mm_or_si64(dst1, dsta); /* dsta(full alpha) | dst1 -> dst1 */ + dst1 = _mm_and_si64(dst1, src1); /* src & dst -> dst1 */ + dst1 = _mm_and_si64(dst1, lmask); /* dst1 & !mask -> dst1 */ + dst1 = _mm_add_pi32(dst1, src2); /* src2 + dst1 -> dst1 */ + dst1 = _mm_or_si64(dst1, dsta); /* dsta(full alpha) | dst1 -> dst1 */ - *(__m64 *) dstp = dst1; /* dst1 -> 2 x dst pixels */ + *(__m64 *)dstp = dst1; /* dst1 -> 2 x dst pixels */ dstp += 2; srcp += 2; } @@ -229,8 +224,7 @@ BlitRGBtoRGBSurfaceAlpha128MMX(SDL_BlitInfo * info) } /* fast RGB888->(A)RGB888 blending with surface alpha */ -static void -BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info) +static void BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo *info) { SDL_PixelFormat *df = info->dst_fmt; Uint32 chanmask; @@ -242,45 +236,44 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info) } else { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; Uint32 dalpha = df->Amask; Uint32 amult; __m64 src1, src2, dst1, dst2, mm_alpha, mm_zero, dsta; - mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ + mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ /* form the alpha mult */ amult = alpha | (alpha << 8); amult = amult | (amult << 16); chanmask = - (0xff << df->Rshift) | (0xff << df-> - Gshift) | (0xff << df->Bshift); + (0xff << df->Rshift) | (0xff << df->Gshift) | (0xff << df->Bshift); mm_alpha = _mm_set_pi32(0, amult & chanmask); /* 0000AAAA -> mm_alpha, minus 1 chan */ mm_alpha = _mm_unpacklo_pi8(mm_alpha, mm_zero); /* 0A0A0A0A -> mm_alpha, minus 1 chan */ /* at this point mm_alpha can be 000A0A0A or 0A0A0A00 or another combo */ - dsta = _mm_set_pi32(dalpha, dalpha); /* dst alpha mask -> dsta */ + dsta = _mm_set_pi32(dalpha, dalpha); /* dst alpha mask -> dsta */ while (height--) { int n = width; if (n & 1) { /* One Pixel Blend */ - src2 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src2 (0000ARGB) */ + src2 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src2 (0000ARGB) */ src2 = _mm_unpacklo_pi8(src2, mm_zero); /* 0A0R0G0B -> src2 */ - dst1 = _mm_cvtsi32_si64(*dstp); /* dst(ARGB) -> dst1 (0000ARGB) */ + dst1 = _mm_cvtsi32_si64(*dstp); /* dst(ARGB) -> dst1 (0000ARGB) */ dst1 = _mm_unpacklo_pi8(dst1, mm_zero); /* 0A0R0G0B -> dst1 */ - src2 = _mm_sub_pi16(src2, dst1); /* src2 - dst2 -> src2 */ - src2 = _mm_mullo_pi16(src2, mm_alpha); /* src2 * alpha -> src2 */ - src2 = _mm_srli_pi16(src2, 8); /* src2 >> 8 -> src2 */ - dst1 = _mm_add_pi8(src2, dst1); /* src2 + dst1 -> dst1 */ + src2 = _mm_sub_pi16(src2, dst1); /* src2 - dst2 -> src2 */ + src2 = _mm_mullo_pi16(src2, mm_alpha); /* src2 * alpha -> src2 */ + src2 = _mm_srli_pi16(src2, 8); /* src2 >> 8 -> src2 */ + dst1 = _mm_add_pi8(src2, dst1); /* src2 + dst1 -> dst1 */ - dst1 = _mm_packs_pu16(dst1, mm_zero); /* 0000ARGB -> dst1 */ - dst1 = _mm_or_si64(dst1, dsta); /* dsta | dst1 -> dst1 */ - *dstp = _mm_cvtsi64_si32(dst1); /* dst1 -> pixel */ + dst1 = _mm_packs_pu16(dst1, mm_zero); /* 0000ARGB -> dst1 */ + dst1 = _mm_or_si64(dst1, dsta); /* dsta | dst1 -> dst1 */ + *dstp = _mm_cvtsi64_si32(dst1); /* dst1 -> pixel */ ++srcp; ++dstp; @@ -290,30 +283,30 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info) for (n >>= 1; n > 0; --n) { /* Two Pixels Blend */ - src1 = *(__m64 *) srcp; /* 2 x src -> src1(ARGBARGB) */ - src2 = src1; /* 2 x src -> src2(ARGBARGB) */ + src1 = *(__m64 *)srcp; /* 2 x src -> src1(ARGBARGB) */ + src2 = src1; /* 2 x src -> src2(ARGBARGB) */ src1 = _mm_unpacklo_pi8(src1, mm_zero); /* low - 0A0R0G0B -> src1 */ src2 = _mm_unpackhi_pi8(src2, mm_zero); /* high - 0A0R0G0B -> src2 */ - dst1 = *(__m64 *) dstp; /* 2 x dst -> dst1(ARGBARGB) */ - dst2 = dst1; /* 2 x dst -> dst2(ARGBARGB) */ + dst1 = *(__m64 *)dstp; /* 2 x dst -> dst1(ARGBARGB) */ + dst2 = dst1; /* 2 x dst -> dst2(ARGBARGB) */ dst1 = _mm_unpacklo_pi8(dst1, mm_zero); /* low - 0A0R0G0B -> dst1 */ dst2 = _mm_unpackhi_pi8(dst2, mm_zero); /* high - 0A0R0G0B -> dst2 */ - src1 = _mm_sub_pi16(src1, dst1); /* src1 - dst1 -> src1 */ - src1 = _mm_mullo_pi16(src1, mm_alpha); /* src1 * alpha -> src1 */ - src1 = _mm_srli_pi16(src1, 8); /* src1 >> 8 -> src1 */ - dst1 = _mm_add_pi8(src1, dst1); /* src1 + dst1(dst1) -> dst1 */ + src1 = _mm_sub_pi16(src1, dst1); /* src1 - dst1 -> src1 */ + src1 = _mm_mullo_pi16(src1, mm_alpha); /* src1 * alpha -> src1 */ + src1 = _mm_srli_pi16(src1, 8); /* src1 >> 8 -> src1 */ + dst1 = _mm_add_pi8(src1, dst1); /* src1 + dst1(dst1) -> dst1 */ - src2 = _mm_sub_pi16(src2, dst2); /* src2 - dst2 -> src2 */ - src2 = _mm_mullo_pi16(src2, mm_alpha); /* src2 * alpha -> src2 */ - src2 = _mm_srli_pi16(src2, 8); /* src2 >> 8 -> src2 */ - dst2 = _mm_add_pi8(src2, dst2); /* src2 + dst2(dst2) -> dst2 */ + src2 = _mm_sub_pi16(src2, dst2); /* src2 - dst2 -> src2 */ + src2 = _mm_mullo_pi16(src2, mm_alpha); /* src2 * alpha -> src2 */ + src2 = _mm_srli_pi16(src2, 8); /* src2 >> 8 -> src2 */ + dst2 = _mm_add_pi8(src2, dst2); /* src2 + dst2(dst2) -> dst2 */ - dst1 = _mm_packs_pu16(dst1, dst2); /* 0A0R0G0B(res1), 0A0R0G0B(res2) -> dst1(ARGBARGB) */ - dst1 = _mm_or_si64(dst1, dsta); /* dsta | dst1 -> dst1 */ + dst1 = _mm_packs_pu16(dst1, dst2); /* 0A0R0G0B(res1), 0A0R0G0B(res2) -> dst1(ARGBARGB) */ + dst1 = _mm_or_si64(dst1, dsta); /* dsta | dst1 -> dst1 */ - *(__m64 *) dstp = dst1; /* dst1 -> 2 x pixel */ + *(__m64 *)dstp = dst1; /* dst1 -> 2 x pixel */ srcp += 2; dstp += 2; @@ -326,23 +319,32 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info) } /* fast ARGB888->(A)RGB888 blending with pixel alpha */ -static void -BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo * info) +static void BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; SDL_PixelFormat *sf = info->src_fmt; Uint32 amask = sf->Amask; Uint32 ashift = sf->Ashift; Uint64 multmask, multmask2; - __m64 src1, dst1, mm_alpha, mm_zero, mm_alpha2; + __m64 src1, dst1, mm_alpha, mm_zero, mm_alpha2, mm_one_alpha; + + mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ + if (amask == 0xFF000000) { /* 1 in the alpha channel -> mm_one_alpha */ + mm_one_alpha = _mm_set_pi16(1, 0, 0, 0); + } else if (amask == 0x00FF0000) { + mm_one_alpha = _mm_set_pi16(0, 1, 0, 0); + } else if (amask == 0x0000FF00) { + mm_one_alpha = _mm_set_pi16(0, 0, 1, 0); + } else { + mm_one_alpha = _mm_set_pi16(0, 0, 0, 1); + } - mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ multmask = 0x00FF; multmask <<= (ashift * 2); multmask2 = 0x00FF00FF00FF00FFULL; @@ -369,14 +371,33 @@ BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo * info) mm_alpha = _mm_or_si64(mm_alpha2, *(__m64 *) & multmask); /* 0F0A0A0A -> mm_alpha */ mm_alpha2 = _mm_xor_si64(mm_alpha2, *(__m64 *) & multmask2); /* 255 - mm_alpha -> mm_alpha */ - /* blend */ + /* + Alpha blending is: + dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) + dstA = srcA + (dstA * (1-srcA)) * + + Here, 'src1' is: + srcRGB * srcA + srcA + And 'dst1' is: + dstRGB * (1-srcA) + dstA * (1-srcA) + so that *dstp is 'src1 + dst1' + + src1 is computed using mullo_pi16: (X * mask) >> 8, but is approximate for srcA ((srcA * 255) >> 8). + + need to a 1 to get an exact result: (srcA * 256) >> 8 == srcA + */ + mm_alpha = _mm_add_pi16(mm_alpha, mm_one_alpha); + + /* blend */ src1 = _mm_mullo_pi16(src1, mm_alpha); src1 = _mm_srli_pi16(src1, 8); dst1 = _mm_mullo_pi16(dst1, mm_alpha2); dst1 = _mm_srli_pi16(dst1, 8); dst1 = _mm_add_pi16(src1, dst1); dst1 = _mm_packs_pu16(dst1, mm_zero); - + *dstp = _mm_cvtsi64_si32(dst1); /* dst1 -> pixel */ } ++srcp; @@ -394,8 +415,7 @@ BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo * info) #if SDL_ARM_SIMD_BLITTERS void BlitARGBto565PixelAlphaARMSIMDAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); -static void -BlitARGBto565PixelAlphaARMSIMD(SDL_BlitInfo * info) +static void BlitARGBto565PixelAlphaARMSIMD(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -409,8 +429,7 @@ BlitARGBto565PixelAlphaARMSIMD(SDL_BlitInfo * info) void BlitRGBtoRGBPixelAlphaARMSIMDAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); -static void -BlitRGBtoRGBPixelAlphaARMSIMD(SDL_BlitInfo * info) +static void BlitRGBtoRGBPixelAlphaARMSIMD(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -426,8 +445,7 @@ BlitRGBtoRGBPixelAlphaARMSIMD(SDL_BlitInfo * info) #if SDL_ARM_NEON_BLITTERS void BlitARGBto565PixelAlphaARMNEONAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); -static void -BlitARGBto565PixelAlphaARMNEON(SDL_BlitInfo * info) +static void BlitARGBto565PixelAlphaARMNEON(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -441,8 +459,7 @@ BlitARGBto565PixelAlphaARMNEON(SDL_BlitInfo * info) void BlitRGBtoRGBPixelAlphaARMNEONAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); -static void -BlitRGBtoRGBPixelAlphaARMNEON(SDL_BlitInfo * info) +static void BlitRGBtoRGBPixelAlphaARMNEON(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -456,14 +473,13 @@ BlitRGBtoRGBPixelAlphaARMNEON(SDL_BlitInfo * info) #endif /* fast RGB888->(A)RGB888 blending with surface alpha=128 special case */ -static void -BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo * info) +static void BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; while (height--) { @@ -481,8 +497,7 @@ BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo * info) } /* fast RGB888->(A)RGB888 blending with surface alpha */ -static void -BlitRGBtoRGBSurfaceAlpha(SDL_BlitInfo * info) +static void BlitRGBtoRGBSurfaceAlpha(SDL_BlitInfo *info) { unsigned alpha = info->a; if (alpha == 128) { @@ -490,9 +505,9 @@ BlitRGBtoRGBSurfaceAlpha(SDL_BlitInfo * info) } else { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; Uint32 s; Uint32 d; @@ -523,14 +538,13 @@ BlitRGBtoRGBSurfaceAlpha(SDL_BlitInfo * info) } /* fast ARGB888->(A)RGB888 blending with pixel alpha */ -static void -BlitRGBtoRGBPixelAlpha(SDL_BlitInfo * info) +static void BlitRGBtoRGBPixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; while (height--) { @@ -576,14 +590,13 @@ BlitRGBtoRGBPixelAlpha(SDL_BlitInfo * info) } /* fast ARGB888->(A)BGR888 blending with pixel alpha */ -static void -BlitRGBtoBGRPixelAlpha(SDL_BlitInfo * info) +static void BlitRGBtoBGRPixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; while (height--) { @@ -632,23 +645,32 @@ BlitRGBtoBGRPixelAlpha(SDL_BlitInfo * info) #ifdef __3dNOW__ /* fast (as in MMX with prefetch) ARGB888->(A)RGB888 blending with pixel alpha */ -static void -BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo * info) +static void BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip >> 2; SDL_PixelFormat *sf = info->src_fmt; Uint32 amask = sf->Amask; Uint32 ashift = sf->Ashift; Uint64 multmask, multmask2; - __m64 src1, dst1, mm_alpha, mm_zero, mm_alpha2; + __m64 src1, dst1, mm_alpha, mm_zero, mm_alpha2, mm_one_alpha; + + mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ + if (amask == 0xFF000000) { /* 1 in the alpha channel -> mm_one_alpha */ + mm_one_alpha = _mm_set_pi16(1, 0, 0, 0); + } else if (amask == 0x00FF0000) { + mm_one_alpha = _mm_set_pi16(0, 1, 0, 0); + } else if (amask == 0x0000FF00) { + mm_one_alpha = _mm_set_pi16(0, 0, 1, 0); + } else { + mm_one_alpha = _mm_set_pi16(0, 0, 0, 1); + } - mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ multmask = 0x00FF; multmask <<= (ashift * 2); multmask2 = 0x00FF00FF00FF00FFULL; @@ -680,15 +702,33 @@ BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo * info) mm_alpha = _mm_or_si64(mm_alpha2, *(__m64 *) & multmask); /* 0F0A0A0A -> mm_alpha */ mm_alpha2 = _mm_xor_si64(mm_alpha2, *(__m64 *) & multmask2); /* 255 - mm_alpha -> mm_alpha */ + /* + Alpha blending is: + dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) + dstA = srcA + (dstA * (1-srcA)) * + + Here, 'src1' is: + srcRGB * srcA + srcA + And 'dst1' is: + dstRGB * (1-srcA) + dstA * (1-srcA) + so that *dstp is 'src1 + dst1' + + src1 is computed using mullo_pi16: (X * mask) >> 8, but is approximate for srcA ((srcA * 255) >> 8). + + need to a 1 to get an exact result: (srcA * 256) >> 8 == srcA + */ + mm_alpha = _mm_add_pi16(mm_alpha, mm_one_alpha); - /* blend */ + /* blend */ src1 = _mm_mullo_pi16(src1, mm_alpha); src1 = _mm_srli_pi16(src1, 8); dst1 = _mm_mullo_pi16(dst1, mm_alpha2); dst1 = _mm_srli_pi16(dst1, 8); dst1 = _mm_add_pi16(src1, dst1); dst1 = _mm_packs_pu16(dst1, mm_zero); - + *dstp = _mm_cvtsi64_si32(dst1); /* dst1 -> pixel */ } ++srcp; @@ -706,26 +746,24 @@ BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo * info) /* 16bpp special case for per-surface alpha=50%: blend 2 pixels in parallel */ /* blend a single 16 bit pixel at 50% */ -#define BLEND16_50(d, s, mask) \ +#define BLEND16_50(d, s, mask) \ ((((s & mask) + (d & mask)) >> 1) + (s & d & (~mask & 0xffff))) /* blend two 16 bit pixels at 50% */ -#define BLEND2x16_50(d, s, mask) \ - (((s & (mask | mask << 16)) >> 1) + ((d & (mask | mask << 16)) >> 1) \ - + (s & d & (~(mask | mask << 16)))) +#define BLEND2x16_50(d, s, mask) \ + (((s & (mask | mask << 16)) >> 1) + ((d & (mask | mask << 16)) >> 1) + (s & d & (~(mask | mask << 16)))) -static void -Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) +static void Blit16to16SurfaceAlpha128(SDL_BlitInfo *info, Uint16 mask) { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip >> 1; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; while (height--) { - if (((uintptr_t) srcp ^ (uintptr_t) dstp) & 2) { + if (((uintptr_t)srcp ^ (uintptr_t)dstp) & 2) { /* * Source and destination not aligned, pipeline it. * This is mostly a win for big blits but no loss for @@ -735,29 +773,29 @@ Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) int w = width; /* handle odd destination */ - if ((uintptr_t) dstp & 2) { + if ((uintptr_t)dstp & 2) { Uint16 d = *dstp, s = *srcp; *dstp = BLEND16_50(d, s, mask); dstp++; srcp++; w--; } - srcp++; /* srcp is now 32-bit aligned */ + srcp++; /* srcp is now 32-bit aligned */ /* bootstrap pipeline with first halfword */ - prev_sw = ((Uint32 *) srcp)[-1]; + prev_sw = ((Uint32 *)srcp)[-1]; while (w > 1) { Uint32 sw, dw, s; - sw = *(Uint32 *) srcp; - dw = *(Uint32 *) dstp; + sw = *(Uint32 *)srcp; + dw = *(Uint32 *)dstp; #if SDL_BYTEORDER == SDL_BIG_ENDIAN s = (prev_sw << 16) + (sw >> 16); #else s = (prev_sw >> 16) + (sw << 16); #endif prev_sw = sw; - *(Uint32 *) dstp = BLEND2x16_50(dw, s, mask); + *(Uint32 *)dstp = BLEND2x16_50(dw, s, mask); dstp += 2; srcp += 2; w -= 2; @@ -767,9 +805,9 @@ Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) if (w) { Uint16 d = *dstp, s; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - s = (Uint16) prev_sw; + s = (Uint16)prev_sw; #else - s = (Uint16) (prev_sw >> 16); + s = (Uint16)(prev_sw >> 16); #endif *dstp = BLEND16_50(d, s, mask); srcp++; @@ -782,7 +820,7 @@ Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) int w = width; /* first odd pixel? */ - if ((uintptr_t) srcp & 2) { + if ((uintptr_t)srcp & 2) { Uint16 d = *dstp, s = *srcp; *dstp = BLEND16_50(d, s, mask); srcp++; @@ -792,9 +830,9 @@ Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) /* srcp and dstp are now 32-bit aligned */ while (w > 1) { - Uint32 sw = *(Uint32 *) srcp; - Uint32 dw = *(Uint32 *) dstp; - *(Uint32 *) dstp = BLEND2x16_50(dw, sw, mask); + Uint32 sw = *(Uint32 *)srcp; + Uint32 dw = *(Uint32 *)dstp; + *(Uint32 *)dstp = BLEND2x16_50(dw, sw, mask); srcp += 2; dstp += 2; w -= 2; @@ -816,8 +854,7 @@ Blit16to16SurfaceAlpha128(SDL_BlitInfo * info, Uint16 mask) #ifdef __MMX__ /* fast RGB565->RGB565 blending with surface alpha */ -static void -Blit565to565SurfaceAlphaMMX(SDL_BlitInfo * info) +static void Blit565to565SurfaceAlphaMMX(SDL_BlitInfo *info) { unsigned alpha = info->a; if (alpha == 128) { @@ -825,27 +862,29 @@ Blit565to565SurfaceAlphaMMX(SDL_BlitInfo * info) } else { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip >> 1; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; Uint32 s, d; +#ifdef USE_DUFFS_LOOP __m64 src1, dst1, src2, dst2, gmask, bmask, mm_res, mm_alpha; - alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ - mm_alpha = _mm_set_pi32(0, alpha); /* 0000000A -> mm_alpha */ - alpha >>= 3; /* downscale alpha to 5 bits */ + alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ + mm_alpha = _mm_set_pi32(0, alpha); /* 0000000A -> mm_alpha */ + alpha >>= 3; /* downscale alpha to 5 bits */ - mm_alpha = _mm_unpacklo_pi16(mm_alpha, mm_alpha); /* 00000A0A -> mm_alpha */ - mm_alpha = _mm_unpacklo_pi32(mm_alpha, mm_alpha); /* 0A0A0A0A -> mm_alpha */ + mm_alpha = _mm_unpacklo_pi16(mm_alpha, mm_alpha); /* 00000A0A -> mm_alpha */ + mm_alpha = _mm_unpacklo_pi32(mm_alpha, mm_alpha); /* 0A0A0A0A -> mm_alpha */ /* position alpha to allow for mullo and mulhi on diff channels to reduce the number of operations */ mm_alpha = _mm_slli_si64(mm_alpha, 3); /* Setup the 565 color channel masks */ - gmask = _mm_set_pi32(0x07E007E0, 0x07E007E0); /* MASKGREEN -> gmask */ - bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ + gmask = _mm_set_pi32(0x07E007E0, 0x07E007E0); /* MASKGREEN -> gmask */ + bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ +#endif while (height--) { /* *INDENT-OFF* */ /* clang-format off */ @@ -953,8 +992,7 @@ Blit565to565SurfaceAlphaMMX(SDL_BlitInfo * info) } /* fast RGB555->RGB555 blending with surface alpha */ -static void -Blit555to555SurfaceAlphaMMX(SDL_BlitInfo * info) +static void Blit555to555SurfaceAlphaMMX(SDL_BlitInfo *info) { unsigned alpha = info->a; if (alpha == 128) { @@ -962,29 +1000,30 @@ Blit555to555SurfaceAlphaMMX(SDL_BlitInfo * info) } else { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip >> 1; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; Uint32 s, d; +#ifdef USE_DUFFS_LOOP __m64 src1, dst1, src2, dst2, rmask, gmask, bmask, mm_res, mm_alpha; - alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ - mm_alpha = _mm_set_pi32(0, alpha); /* 0000000A -> mm_alpha */ - alpha >>= 3; /* downscale alpha to 5 bits */ + alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ + mm_alpha = _mm_set_pi32(0, alpha); /* 0000000A -> mm_alpha */ + alpha >>= 3; /* downscale alpha to 5 bits */ - mm_alpha = _mm_unpacklo_pi16(mm_alpha, mm_alpha); /* 00000A0A -> mm_alpha */ - mm_alpha = _mm_unpacklo_pi32(mm_alpha, mm_alpha); /* 0A0A0A0A -> mm_alpha */ + mm_alpha = _mm_unpacklo_pi16(mm_alpha, mm_alpha); /* 00000A0A -> mm_alpha */ + mm_alpha = _mm_unpacklo_pi32(mm_alpha, mm_alpha); /* 0A0A0A0A -> mm_alpha */ /* position alpha to allow for mullo and mulhi on diff channels to reduce the number of operations */ mm_alpha = _mm_slli_si64(mm_alpha, 3); /* Setup the 555 color channel masks */ - rmask = _mm_set_pi32(0x7C007C00, 0x7C007C00); /* MASKRED -> rmask */ - gmask = _mm_set_pi32(0x03E003E0, 0x03E003E0); /* MASKGREEN -> gmask */ - bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ - + rmask = _mm_set_pi32(0x7C007C00, 0x7C007C00); /* MASKRED -> rmask */ + gmask = _mm_set_pi32(0x03E003E0, 0x03E003E0); /* MASKGREEN -> gmask */ + bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ +#endif while (height--) { /* *INDENT-OFF* */ /* clang-format off */ DUFFS_LOOP_124( @@ -1045,7 +1084,7 @@ Blit555to555SurfaceAlphaMMX(SDL_BlitInfo * info) dst2 = _mm_and_si64(dst2, rmask); /* dst2 & MASKRED -> dst2 */ mm_res = dst2; /* RED -> mm_res */ - + /* green -- process the bits in place */ src2 = src1; src2 = _mm_and_si64(src2, gmask); /* src & MASKGREEN -> src2 */ @@ -1093,8 +1132,7 @@ Blit555to555SurfaceAlphaMMX(SDL_BlitInfo * info) #endif /* __MMX__ */ /* fast RGB565->RGB565 blending with surface alpha */ -static void -Blit565to565SurfaceAlpha(SDL_BlitInfo * info) +static void Blit565to565SurfaceAlpha(SDL_BlitInfo *info) { unsigned alpha = info->a; if (alpha == 128) { @@ -1102,11 +1140,11 @@ Blit565to565SurfaceAlpha(SDL_BlitInfo * info) } else { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip >> 1; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; - alpha >>= 3; /* downscale alpha to 5 bits */ + alpha >>= 3; /* downscale alpha to 5 bits */ while (height--) { /* *INDENT-OFF* */ /* clang-format off */ @@ -1132,20 +1170,19 @@ Blit565to565SurfaceAlpha(SDL_BlitInfo * info) } /* fast RGB555->RGB555 blending with surface alpha */ -static void -Blit555to555SurfaceAlpha(SDL_BlitInfo * info) +static void Blit555to555SurfaceAlpha(SDL_BlitInfo *info) { - unsigned alpha = info->a; /* downscale alpha to 5 bits */ + unsigned alpha = info->a; /* downscale alpha to 5 bits */ if (alpha == 128) { Blit16to16SurfaceAlpha128(info, 0xfbde); } else { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip >> 1; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; - alpha >>= 3; /* downscale alpha to 5 bits */ + alpha >>= 3; /* downscale alpha to 5 bits */ while (height--) { /* *INDENT-OFF* */ /* clang-format off */ @@ -1171,14 +1208,13 @@ Blit555to555SurfaceAlpha(SDL_BlitInfo * info) } /* fast ARGB8888->RGB565 blending with pixel alpha */ -static void -BlitARGBto565PixelAlpha(SDL_BlitInfo * info) +static void BlitARGBto565PixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; while (height--) { @@ -1190,8 +1226,8 @@ BlitARGBto565PixelAlpha(SDL_BlitInfo * info) compositioning used (>>8 instead of /255) doesn't handle it correctly. Also special-case alpha=0 for speed? Benchmark this! */ - if(alpha) { - if(alpha == (SDL_ALPHA_OPAQUE >> 3)) { + if (alpha) { + if (alpha == (SDL_ALPHA_OPAQUE >> 3)) { *dstp = (Uint16)((s >> 8 & 0xf800) + (s >> 5 & 0x7e0) + (s >> 3 & 0x1f)); } else { Uint32 d = *dstp; @@ -1217,14 +1253,13 @@ BlitARGBto565PixelAlpha(SDL_BlitInfo * info) } /* fast ARGB8888->RGB555 blending with pixel alpha */ -static void -BlitARGBto555PixelAlpha(SDL_BlitInfo * info) +static void BlitARGBto555PixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip >> 2; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip >> 1; while (height--) { @@ -1237,8 +1272,8 @@ BlitARGBto555PixelAlpha(SDL_BlitInfo * info) compositioning used (>>8 instead of /255) doesn't handle it correctly. Also special-case alpha=0 for speed? Benchmark this! */ - if(alpha) { - if(alpha == (SDL_ALPHA_OPAQUE >> 3)) { + if (alpha) { + if (alpha == (SDL_ALPHA_OPAQUE >> 3)) { *dstp = (Uint16)((s >> 9 & 0x7c00) + (s >> 6 & 0x3e0) + (s >> 3 & 0x1f)); } else { Uint32 d = *dstp; @@ -1264,8 +1299,7 @@ BlitARGBto555PixelAlpha(SDL_BlitInfo * info) } /* General (slow) N->N blending with per-surface alpha */ -static void -BlitNtoNSurfaceAlpha(SDL_BlitInfo * info) +static void BlitNtoNSurfaceAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -1284,7 +1318,7 @@ BlitNtoNSurfaceAlpha(SDL_BlitInfo * info) if (sA) { while (height--) { - /* *INDENT-OFF* */ /* clang-format off */ + /* *INDENT-OFF* */ /* clang-format off */ DUFFS_LOOP4( { DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB); @@ -1303,8 +1337,7 @@ BlitNtoNSurfaceAlpha(SDL_BlitInfo * info) } /* General (slow) colorkeyed N->N blending with per-surface alpha */ -static void -BlitNtoNSurfaceAlphaKey(SDL_BlitInfo * info) +static void BlitNtoNSurfaceAlphaKey(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -1327,7 +1360,7 @@ BlitNtoNSurfaceAlphaKey(SDL_BlitInfo * info) DUFFS_LOOP4( { RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel); - if(sA && Pixel != ckey) { + if (sA && Pixel != ckey) { RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA); ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA); @@ -1344,8 +1377,7 @@ BlitNtoNSurfaceAlphaKey(SDL_BlitInfo * info) } /* General (slow) N->N blending with pixel alpha */ -static void -BlitNtoNPixelAlpha(SDL_BlitInfo * info) +static void BlitNtoNPixelAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -1370,7 +1402,7 @@ BlitNtoNPixelAlpha(SDL_BlitInfo * info) DUFFS_LOOP4( { DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA); - if(sA) { + if (sA) { DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA); ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA); ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA); @@ -1385,9 +1417,7 @@ BlitNtoNPixelAlpha(SDL_BlitInfo * info) } } - -SDL_BlitFunc -SDL_CalculateBlitA(SDL_Surface * surface) +SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface) { SDL_PixelFormat *sf = surface->format; SDL_PixelFormat *df = surface->map->dst->format; @@ -1406,65 +1436,58 @@ SDL_CalculateBlitA(SDL_Surface * surface) case 2: #if SDL_ARM_NEON_BLITTERS || SDL_ARM_SIMD_BLITTERS - if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000 - && sf->Gmask == 0xff00 && df->Gmask == 0x7e0 - && ((sf->Rmask == 0xff && df->Rmask == 0x1f) - || (sf->Bmask == 0xff && df->Bmask == 0x1f))) - { + if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000 && sf->Gmask == 0xff00 && df->Gmask == 0x7e0 && ((sf->Rmask == 0xff && df->Rmask == 0x1f) || (sf->Bmask == 0xff && df->Bmask == 0x1f))) { #if SDL_ARM_NEON_BLITTERS - if (SDL_HasNEON()) - return BlitARGBto565PixelAlphaARMNEON; + if (SDL_HasNEON()) { + return BlitARGBto565PixelAlphaARMNEON; + } #endif #if SDL_ARM_SIMD_BLITTERS - if (SDL_HasARMSIMD()) - return BlitARGBto565PixelAlphaARMSIMD; -#endif + if (SDL_HasARMSIMD()) { + return BlitARGBto565PixelAlphaARMSIMD; } #endif - if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000 - && sf->Gmask == 0xff00 - && ((sf->Rmask == 0xff && df->Rmask == 0x1f) - || (sf->Bmask == 0xff && df->Bmask == 0x1f))) { - if (df->Gmask == 0x7e0) + } +#endif + if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000 && sf->Gmask == 0xff00 && ((sf->Rmask == 0xff && df->Rmask == 0x1f) || (sf->Bmask == 0xff && df->Bmask == 0x1f))) { + if (df->Gmask == 0x7e0) { return BlitARGBto565PixelAlpha; - else if (df->Gmask == 0x3e0) + } else if (df->Gmask == 0x3e0) { return BlitARGBto555PixelAlpha; + } } return BlitNtoNPixelAlpha; case 4: - if (sf->Rmask == df->Rmask - && sf->Gmask == df->Gmask - && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) { + if (sf->Rmask == df->Rmask && sf->Gmask == df->Gmask && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) { #if defined(__MMX__) || defined(__3dNOW__) - if (sf->Rshift % 8 == 0 - && sf->Gshift % 8 == 0 - && sf->Bshift % 8 == 0 - && sf->Ashift % 8 == 0 && sf->Aloss == 0) { + if (sf->Rshift % 8 == 0 && sf->Gshift % 8 == 0 && sf->Bshift % 8 == 0 && sf->Ashift % 8 == 0 && sf->Aloss == 0) { #ifdef __3dNOW__ - if (SDL_Has3DNow()) + if (SDL_Has3DNow()) { return BlitRGBtoRGBPixelAlphaMMX3DNOW; + } #endif #ifdef __MMX__ - if (SDL_HasMMX()) + if (SDL_HasMMX()) { return BlitRGBtoRGBPixelAlphaMMX; + } #endif } #endif /* __MMX__ || __3dNOW__ */ if (sf->Amask == 0xff000000) { #if SDL_ARM_NEON_BLITTERS - if (SDL_HasNEON()) + if (SDL_HasNEON()) { return BlitRGBtoRGBPixelAlphaARMNEON; + } #endif #if SDL_ARM_SIMD_BLITTERS - if (SDL_HasARMSIMD()) + if (SDL_HasARMSIMD()) { return BlitRGBtoRGBPixelAlphaARMSIMD; + } #endif return BlitRGBtoRGBPixelAlpha; } - } else if (sf->Rmask == df->Bmask - && sf->Gmask == df->Gmask - && sf->Bmask == df->Rmask && sf->BytesPerPixel == 4) { + } else if (sf->Rmask == df->Bmask && sf->Gmask == df->Gmask && sf->Bmask == df->Rmask && sf->BytesPerPixel == 4) { if (sf->Amask == 0xff000000) { return BlitRGBtoBGRPixelAlpha; } @@ -1493,31 +1516,32 @@ SDL_CalculateBlitA(SDL_Surface * surface) if (surface->map->identity) { if (df->Gmask == 0x7e0) { #ifdef __MMX__ - if (SDL_HasMMX()) + if (SDL_HasMMX()) { return Blit565to565SurfaceAlphaMMX; - else + } else #endif + { return Blit565to565SurfaceAlpha; + } } else if (df->Gmask == 0x3e0) { #ifdef __MMX__ - if (SDL_HasMMX()) + if (SDL_HasMMX()) { return Blit555to555SurfaceAlphaMMX; - else + } else #endif + { return Blit555to555SurfaceAlpha; + } } } return BlitNtoNSurfaceAlpha; case 4: - if (sf->Rmask == df->Rmask - && sf->Gmask == df->Gmask - && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) { + if (sf->Rmask == df->Rmask && sf->Gmask == df->Gmask && sf->Bmask == df->Bmask && sf->BytesPerPixel == 4) { #ifdef __MMX__ - if (sf->Rshift % 8 == 0 - && sf->Gshift % 8 == 0 - && sf->Bshift % 8 == 0 && SDL_HasMMX()) + if (sf->Rshift % 8 == 0 && sf->Gshift % 8 == 0 && sf->Bshift % 8 == 0 && SDL_HasMMX()) { return BlitRGBtoRGBSurfaceAlphaMMX; + } #endif if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) { return BlitRGBtoRGBSurfaceAlpha; diff --git a/modules/SDL2/src/video/SDL_blit_N.c b/modules/SDL2/src/video/SDL_blit_N.c index ea0bdb7..7c0b010 100644 --- a/modules/SDL2/src/video/SDL_blit_N.c +++ b/modules/SDL2/src/video/SDL_blit_N.c @@ -28,19 +28,19 @@ #include "SDL_blit.h" #include "SDL_blit_copy.h" - /* General optimized routines that write char by char */ #define HAVE_FAST_WRITE_INT8 1 /* On some CPU, it's slower than combining and write a word */ -#if defined(__MIPS__) -# undef HAVE_FAST_WRITE_INT8 -# define HAVE_FAST_WRITE_INT8 0 +#if defined(__MIPS__) +#undef HAVE_FAST_WRITE_INT8 +#define HAVE_FAST_WRITE_INT8 0 #endif /* Functions to blit from N-bit surfaces to other surfaces */ -enum blit_features { +enum blit_features +{ BLIT_FEATURE_NONE = 0, BLIT_FEATURE_HAS_MMX = 1, BLIT_FEATURE_HAS_ALTIVEC = 2, @@ -54,23 +54,21 @@ enum blit_features { #endif #ifdef __MACOSX__ #include -static size_t -GetL3CacheSize(void) +static size_t GetL3CacheSize(void) { const char key[] = "hw.l3cachesize"; u_int64_t result = 0; size_t typeSize = sizeof(result); - int err = sysctlbyname(key, &result, &typeSize, NULL, 0); - if (0 != err) + if (0 != err) { return 0; + } return result; } #else -static size_t -GetL3CacheSize(void) +static size_t GetL3CacheSize(void) { /* XXX: Just guess G4 */ return 2097152; @@ -83,24 +81,29 @@ GetL3CacheSize(void) #define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \ (vector unsigned short) ( a,b,c,d,e,f,g,h ) #else -#define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \ - (vector unsigned char) { a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p } -#define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \ - (vector unsigned short) { a,b,c,d,e,f,g,h } +#define VECUINT8_LITERAL(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \ + (vector unsigned char) \ + { \ + a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p \ + } +#define VECUINT16_LITERAL(a, b, c, d, e, f, g, h) \ + (vector unsigned short) \ + { \ + a, b, c, d, e, f, g, h \ + } #endif -#define UNALIGNED_PTR(x) (((size_t) x) & 0x0000000F) -#define VSWIZZLE32(a,b,c,d) (vector unsigned char) \ - ( 0x00+a, 0x00+b, 0x00+c, 0x00+d, \ - 0x04+a, 0x04+b, 0x04+c, 0x04+d, \ - 0x08+a, 0x08+b, 0x08+c, 0x08+d, \ - 0x0C+a, 0x0C+b, 0x0C+c, 0x0C+d ) +#define UNALIGNED_PTR(x) (((size_t)x) & 0x0000000F) +#define VSWIZZLE32(a, b, c, d) (vector unsigned char)(0x00 + a, 0x00 + b, 0x00 + c, 0x00 + d, \ + 0x04 + a, 0x04 + b, 0x04 + c, 0x04 + d, \ + 0x08 + a, 0x08 + b, 0x08 + c, 0x08 + d, \ + 0x0C + a, 0x0C + b, 0x0C + c, 0x0C + d) -#define MAKE8888(dstfmt, r, g, b, a) \ - ( ((r<Rshift)&dstfmt->Rmask) | \ - ((g<Gshift)&dstfmt->Gmask) | \ - ((b<Bshift)&dstfmt->Bmask) | \ - ((a<Ashift)&dstfmt->Amask) ) +#define MAKE8888(dstfmt, r, g, b, a) \ + (((r << dstfmt->Rshift) & dstfmt->Rmask) | \ + ((g << dstfmt->Gshift) & dstfmt->Gmask) | \ + ((b << dstfmt->Bshift) & dstfmt->Bmask) | \ + ((a << dstfmt->Ashift) & dstfmt->Amask)) /* * Data Stream Touch...Altivec cache prefetching. @@ -108,20 +111,19 @@ GetL3CacheSize(void) * Don't use this on a G5...however, the speed boost is very significant * on a G4. */ -#define DST_CHAN_SRC 1 +#define DST_CHAN_SRC 1 #define DST_CHAN_DEST 2 /* macro to set DST control word value... */ #define DST_CTRL(size, count, stride) \ (((size) << 24) | ((count) << 16) | (stride)) -#define VEC_ALIGNER(src) ((UNALIGNED_PTR(src)) \ - ? vec_lvsl(0, src) \ - : vec_add(vec_lvsl(8, src), vec_splat_u8(8))) +#define VEC_ALIGNER(src) ((UNALIGNED_PTR(src)) \ + ? vec_lvsl(0, src) \ + : vec_add(vec_lvsl(8, src), vec_splat_u8(8))) /* Calculate the permute vector used for 32->32 swizzling */ -static vector unsigned char -calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) +static vector unsigned char calc_swizzle32(const SDL_PixelFormat *srcfmt, const SDL_PixelFormat *dstfmt) { /* * We have to assume that the bits that aren't used by other @@ -130,12 +132,7 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) */ /* ARGB */ static const struct SDL_PixelFormat default_pixel_format = { - 0, NULL, 0, 0, - {0, 0}, - 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000, - 0, 0, 0, 0, - 16, 8, 0, 24, - 0, NULL + 0, NULL, 0, 0, { 0, 0 }, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000, 0, 0, 0, 0, 16, 8, 0, 24, 0, NULL }; const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, @@ -161,8 +158,7 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) /* Use zero for alpha if either surface doesn't have alpha */ if (dstfmt->Amask) { amask = - ((srcfmt->Amask) ? RESHIFT(srcfmt-> - Ashift) : 0x10) << (dstfmt->Ashift); + ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->Ashift); } else { amask = 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ @@ -170,19 +166,19 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) } #undef RESHIFT - ((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask); - vswiz = vec_add(plus, (vector unsigned char) vec_splat(srcvec, 0)); + ((unsigned int *)(char *)&srcvec)[0] = (rmask | gmask | bmask | amask); + vswiz = vec_add(plus, (vector unsigned char)vec_splat(srcvec, 0)); return (vswiz); } -#if defined(__powerpc__) && (SDL_BYTEORDER == SDL_LIL_ENDIAN) +#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* reorder bytes for PowerPC little endian */ static vector unsigned char reorder_ppc64le_vec(vector unsigned char vpermute) { /* The result vector of calc_swizzle32 reorder bytes using vec_perm. The LE transformation for vec_perm has an implicit assumption that the permutation is being used to reorder vector elements, - not to reorder bytes within those elements. + not to reorder bytes within those elements. Unfortunatly the result order is not the expected one for powerpc little endian when the two first vector parameters of vec_perm are not of type 'vector char'. This is because the numbering from the @@ -192,25 +188,24 @@ static vector unsigned char reorder_ppc64le_vec(vector unsigned char vpermute) */ const vector unsigned char ppc64le_reorder = VECUINT8_LITERAL( - 0x01, 0x00, 0x03, 0x02, - 0x05, 0x04, 0x07, 0x06, - 0x09, 0x08, 0x0B, 0x0A, - 0x0D, 0x0C, 0x0F, 0x0E ); + 0x01, 0x00, 0x03, 0x02, + 0x05, 0x04, 0x07, 0x06, + 0x09, 0x08, 0x0B, 0x0A, + 0x0D, 0x0C, 0x0F, 0x0E); vector unsigned char vswiz_ppc64le; vswiz_ppc64le = vec_perm(vpermute, vpermute, ppc64le_reorder); - return(vswiz_ppc64le); + return (vswiz_ppc64le); } #endif -static void Blit_RGB888_RGB565(SDL_BlitInfo * info); -static void -Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info) +static void Blit_RGB888_RGB565(SDL_BlitInfo *info); +static void Blit_RGB888_RGB565Altivec(SDL_BlitInfo *info) { int height = info->dst_h; - Uint8 *src = (Uint8 *) info->src; + Uint8 *src = (Uint8 *)info->src; int srcskip = info->src_skip; - Uint8 *dst = (Uint8 *) info->dst; + Uint8 *dst = (Uint8 *)info->dst; int dstskip = info->dst_skip; SDL_PixelFormat *srcfmt = info->src_fmt; vector unsigned char valpha = vec_splat_u8(0); @@ -227,7 +222,7 @@ Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info) vector unsigned short vfc = VECUINT16_LITERAL(0x00fc, 0x00fc, 0x00fc, 0x00fc, 0x00fc, 0x00fc, 0x00fc, 0x00fc); - vector unsigned short vf800 = (vector unsigned short) vec_splat_u8(-7); + vector unsigned short vf800 = (vector unsigned short)vec_splat_u8(-7); vf800 = vec_sl(vf800, vec_splat_u16(8)); while (height--) { @@ -239,24 +234,24 @@ Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info) int extrawidth; /* do scalar until we can align... */ -#define ONE_PIXEL_BLEND(condition, widthvar) \ - while (condition) { \ - Uint32 Pixel; \ - unsigned sR, sG, sB, sA; \ - DISEMBLE_RGBA((Uint8 *)src, 4, srcfmt, Pixel, \ - sR, sG, sB, sA); \ - *(Uint16 *)(dst) = (((sR << 8) & 0x0000F800) | \ - ((sG << 3) & 0x000007E0) | \ - ((sB >> 3) & 0x0000001F)); \ - dst += 2; \ - src += 4; \ - widthvar--; \ - } +#define ONE_PIXEL_BLEND(condition, widthvar) \ + while (condition) { \ + Uint32 Pixel; \ + unsigned sR, sG, sB, sA; \ + DISEMBLE_RGBA((Uint8 *)src, 4, srcfmt, Pixel, \ + sR, sG, sB, sA); \ + *(Uint16 *)(dst) = (((sR << 8) & 0x0000F800) | \ + ((sG << 3) & 0x000007E0) | \ + ((sB >> 3) & 0x0000001F)); \ + dst += 2; \ + src += 4; \ + widthvar--; \ + } ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width); /* After all that work, here's the vector part! */ - extrawidth = (width % 8); /* trailing unaligned stores */ + extrawidth = (width % 8); /* trailing unaligned stores */ width -= extrawidth; vsrc = vec_ld(0, src); valigner = VEC_ALIGNER(src); @@ -268,25 +263,25 @@ Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info) voverflow = vec_ld(15, src); vsrc = vec_perm(vsrc, voverflow, valigner); - vsrc1 = (vector unsigned int) vec_perm(vsrc, valpha, vpermute); + vsrc1 = (vector unsigned int)vec_perm(vsrc, valpha, vpermute); src += 16; vsrc = voverflow; voverflow = vec_ld(15, src); vsrc = vec_perm(vsrc, voverflow, valigner); - vsrc2 = (vector unsigned int) vec_perm(vsrc, valpha, vpermute); + vsrc2 = (vector unsigned int)vec_perm(vsrc, valpha, vpermute); /* 1555 */ - vpixel = (vector unsigned short) vec_packpx(vsrc1, vsrc2); - vgpixel = (vector unsigned short) vec_perm(vsrc1, vsrc2, vgmerge); + vpixel = (vector unsigned short)vec_packpx(vsrc1, vsrc2); + vgpixel = (vector unsigned short)vec_perm(vsrc1, vsrc2, vgmerge); vgpixel = vec_and(vgpixel, vfc); vgpixel = vec_sl(vgpixel, v3); vrpixel = vec_sl(vpixel, v1); vrpixel = vec_and(vrpixel, vf800); vbpixel = vec_and(vpixel, v3f); vdst = - vec_or((vector unsigned char) vrpixel, - (vector unsigned char) vgpixel); + vec_or((vector unsigned char)vrpixel, + (vector unsigned char)vgpixel); /* 565 */ - vdst = vec_or(vdst, (vector unsigned char) vbpixel); + vdst = vec_or(vdst, (vector unsigned char)vbpixel); vec_st(vdst, 0, dst); width -= 8; @@ -301,20 +296,17 @@ Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info) ONE_PIXEL_BLEND((extrawidth), extrawidth); #undef ONE_PIXEL_BLEND - src += srcskip; /* move to next row, accounting for pitch. */ + src += srcskip; /* move to next row, accounting for pitch. */ dst += dstskip; } - - } -static void -Blit_RGB565_32Altivec(SDL_BlitInfo * info) +static void Blit_RGB565_32Altivec(SDL_BlitInfo *info) { int height = info->dst_h; - Uint8 *src = (Uint8 *) info->src; + Uint8 *src = (Uint8 *)info->src; int srcskip = info->src_skip; - Uint8 *dst = (Uint8 *) info->dst; + Uint8 *dst = (Uint8 *)info->dst; int dstskip = info->dst_skip; SDL_PixelFormat *srcfmt = info->src_fmt; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -337,9 +329,7 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) 0x10, 0x06, 0x01, 0x01); vector unsigned char vredalpha2 = - (vector unsigned - char) (vec_add((vector unsigned int) vredalpha1, vec_sl(v8, v16)) - ); + (vector unsigned char)(vec_add((vector unsigned int)vredalpha1, vec_sl(v8, v16))); /* 0x00 - 0x0f is ARxx ARxx ARxx ARxx 0x11 - 0x0f odds are blue @@ -349,8 +339,7 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) 0x08, 0x09, 0x0a, 0x15, 0x0c, 0x0d, 0x0e, 0x17); vector unsigned char vblue2 = - (vector unsigned char) (vec_add((vector unsigned int) vblue1, v8) - ); + (vector unsigned char)(vec_add((vector unsigned int)vblue1, v8)); /* 0x00 - 0x0f is ARxB ARxB ARxB ARxB 0x10 - 0x0e evens are green @@ -360,18 +349,16 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) 0x08, 0x09, 0x14, 0x0b, 0x0c, 0x0d, 0x16, 0x0f); vector unsigned char vgreen2 = - (vector unsigned - char) (vec_add((vector unsigned int) vgreen1, vec_sl(v8, v8)) - ); + (vector unsigned char)(vec_add((vector unsigned int)vgreen1, vec_sl(v8, v8))); SDL_assert(srcfmt->BytesPerPixel == 2); SDL_assert(dstfmt->BytesPerPixel == 4); - vf800 = (vector unsigned short) vec_splat_u8(-7); + vf800 = (vector unsigned short)vec_splat_u8(-7); vf800 = vec_sl(vf800, vec_splat_u16(8)); if (dstfmt->Amask && info->a) { - ((unsigned char *) &valpha)[0] = alpha = info->a; + ((unsigned char *)&valpha)[0] = alpha = info->a; valpha = vec_splat(valpha, 0); } else { alpha = 0; @@ -388,22 +375,22 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) int extrawidth; /* do scalar until we can align... */ -#define ONE_PIXEL_BLEND(condition, widthvar) \ - while (condition) { \ - unsigned sR, sG, sB; \ - unsigned short Pixel = *((unsigned short *)src); \ - sR = (Pixel >> 8) & 0xf8; \ - sG = (Pixel >> 3) & 0xfc; \ - sB = (Pixel << 3) & 0xf8; \ - ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ - src += 2; \ - dst += 4; \ - widthvar--; \ - } +#define ONE_PIXEL_BLEND(condition, widthvar) \ + while (condition) { \ + unsigned sR, sG, sB; \ + unsigned short Pixel = *((unsigned short *)src); \ + sR = (Pixel >> 8) & 0xf8; \ + sG = (Pixel >> 3) & 0xfc; \ + sB = (Pixel << 3) & 0xf8; \ + ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ + src += 2; \ + dst += 4; \ + widthvar--; \ + } ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width); /* After all that work, here's the vector part! */ - extrawidth = (width % 8); /* trailing unaligned stores */ + extrawidth = (width % 8); /* trailing unaligned stores */ width -= extrawidth; vsrc = vec_ld(0, src); valigner = VEC_ALIGNER(src); @@ -415,23 +402,23 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) voverflow = vec_ld(15, src); vsrc = vec_perm(vsrc, voverflow, valigner); - vR = vec_and((vector unsigned short) vsrc, vf800); - vB = vec_sl((vector unsigned short) vsrc, v3); + vR = vec_and((vector unsigned short)vsrc, vf800); + vB = vec_sl((vector unsigned short)vsrc, v3); vG = vec_sl(vB, v2); vdst1 = - (vector unsigned char) vec_perm((vector unsigned char) vR, - valpha, vredalpha1); - vdst1 = vec_perm(vdst1, (vector unsigned char) vB, vblue1); - vdst1 = vec_perm(vdst1, (vector unsigned char) vG, vgreen1); + (vector unsigned char)vec_perm((vector unsigned char)vR, + valpha, vredalpha1); + vdst1 = vec_perm(vdst1, (vector unsigned char)vB, vblue1); + vdst1 = vec_perm(vdst1, (vector unsigned char)vG, vgreen1); vdst1 = vec_perm(vdst1, valpha, vpermute); vec_st(vdst1, 0, dst); vdst2 = - (vector unsigned char) vec_perm((vector unsigned char) vR, - valpha, vredalpha2); - vdst2 = vec_perm(vdst2, (vector unsigned char) vB, vblue2); - vdst2 = vec_perm(vdst2, (vector unsigned char) vG, vgreen2); + (vector unsigned char)vec_perm((vector unsigned char)vR, + valpha, vredalpha2); + vdst2 = vec_perm(vdst2, (vector unsigned char)vB, vblue2); + vdst2 = vec_perm(vdst2, (vector unsigned char)vG, vgreen2); vdst2 = vec_perm(vdst2, valpha, vpermute); vec_st(vdst2, 16, dst); @@ -443,25 +430,21 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) SDL_assert(width == 0); - /* do scalar until we can align... */ ONE_PIXEL_BLEND((extrawidth), extrawidth); #undef ONE_PIXEL_BLEND - src += srcskip; /* move to next row, accounting for pitch. */ + src += srcskip; /* move to next row, accounting for pitch. */ dst += dstskip; } - } - -static void -Blit_RGB555_32Altivec(SDL_BlitInfo * info) +static void Blit_RGB555_32Altivec(SDL_BlitInfo *info) { int height = info->dst_h; - Uint8 *src = (Uint8 *) info->src; + Uint8 *src = (Uint8 *)info->src; int srcskip = info->src_skip; - Uint8 *dst = (Uint8 *) info->dst; + Uint8 *dst = (Uint8 *)info->dst; int dstskip = info->dst_skip; SDL_PixelFormat *srcfmt = info->src_fmt; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -484,9 +467,7 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) 0x10, 0x06, 0x01, 0x01); vector unsigned char vredalpha2 = - (vector unsigned - char) (vec_add((vector unsigned int) vredalpha1, vec_sl(v8, v16)) - ); + (vector unsigned char)(vec_add((vector unsigned int)vredalpha1, vec_sl(v8, v16))); /* 0x00 - 0x0f is ARxx ARxx ARxx ARxx 0x11 - 0x0f odds are blue @@ -496,8 +477,7 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) 0x08, 0x09, 0x0a, 0x15, 0x0c, 0x0d, 0x0e, 0x17); vector unsigned char vblue2 = - (vector unsigned char) (vec_add((vector unsigned int) vblue1, v8) - ); + (vector unsigned char)(vec_add((vector unsigned int)vblue1, v8)); /* 0x00 - 0x0f is ARxB ARxB ARxB ARxB 0x10 - 0x0e evens are green @@ -507,18 +487,16 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) 0x08, 0x09, 0x14, 0x0b, 0x0c, 0x0d, 0x16, 0x0f); vector unsigned char vgreen2 = - (vector unsigned - char) (vec_add((vector unsigned int) vgreen1, vec_sl(v8, v8)) - ); + (vector unsigned char)(vec_add((vector unsigned int)vgreen1, vec_sl(v8, v8))); SDL_assert(srcfmt->BytesPerPixel == 2); SDL_assert(dstfmt->BytesPerPixel == 4); - vf800 = (vector unsigned short) vec_splat_u8(-7); + vf800 = (vector unsigned short)vec_splat_u8(-7); vf800 = vec_sl(vf800, vec_splat_u16(8)); if (dstfmt->Amask && info->a) { - ((unsigned char *) &valpha)[0] = alpha = info->a; + ((unsigned char *)&valpha)[0] = alpha = info->a; valpha = vec_splat(valpha, 0); } else { alpha = 0; @@ -535,22 +513,22 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) int extrawidth; /* do scalar until we can align... */ -#define ONE_PIXEL_BLEND(condition, widthvar) \ - while (condition) { \ - unsigned sR, sG, sB; \ - unsigned short Pixel = *((unsigned short *)src); \ - sR = (Pixel >> 7) & 0xf8; \ - sG = (Pixel >> 2) & 0xf8; \ - sB = (Pixel << 3) & 0xf8; \ - ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ - src += 2; \ - dst += 4; \ - widthvar--; \ - } +#define ONE_PIXEL_BLEND(condition, widthvar) \ + while (condition) { \ + unsigned sR, sG, sB; \ + unsigned short Pixel = *((unsigned short *)src); \ + sR = (Pixel >> 7) & 0xf8; \ + sG = (Pixel >> 2) & 0xf8; \ + sB = (Pixel << 3) & 0xf8; \ + ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ + src += 2; \ + dst += 4; \ + widthvar--; \ + } ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width); /* After all that work, here's the vector part! */ - extrawidth = (width % 8); /* trailing unaligned stores */ + extrawidth = (width % 8); /* trailing unaligned stores */ width -= extrawidth; vsrc = vec_ld(0, src); valigner = VEC_ALIGNER(src); @@ -562,23 +540,23 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) voverflow = vec_ld(15, src); vsrc = vec_perm(vsrc, voverflow, valigner); - vR = vec_and(vec_sl((vector unsigned short) vsrc, v1), vf800); - vB = vec_sl((vector unsigned short) vsrc, v3); + vR = vec_and(vec_sl((vector unsigned short)vsrc, v1), vf800); + vB = vec_sl((vector unsigned short)vsrc, v3); vG = vec_sl(vB, v3); vdst1 = - (vector unsigned char) vec_perm((vector unsigned char) vR, - valpha, vredalpha1); - vdst1 = vec_perm(vdst1, (vector unsigned char) vB, vblue1); - vdst1 = vec_perm(vdst1, (vector unsigned char) vG, vgreen1); + (vector unsigned char)vec_perm((vector unsigned char)vR, + valpha, vredalpha1); + vdst1 = vec_perm(vdst1, (vector unsigned char)vB, vblue1); + vdst1 = vec_perm(vdst1, (vector unsigned char)vG, vgreen1); vdst1 = vec_perm(vdst1, valpha, vpermute); vec_st(vdst1, 0, dst); vdst2 = - (vector unsigned char) vec_perm((vector unsigned char) vR, - valpha, vredalpha2); - vdst2 = vec_perm(vdst2, (vector unsigned char) vB, vblue2); - vdst2 = vec_perm(vdst2, (vector unsigned char) vG, vgreen2); + (vector unsigned char)vec_perm((vector unsigned char)vR, + valpha, vredalpha2); + vdst2 = vec_perm(vdst2, (vector unsigned char)vB, vblue2); + vdst2 = vec_perm(vdst2, (vector unsigned char)vG, vgreen2); vdst2 = vec_perm(vdst2, valpha, vpermute); vec_st(vdst2, 16, dst); @@ -590,26 +568,23 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) SDL_assert(width == 0); - /* do scalar until we can align... */ ONE_PIXEL_BLEND((extrawidth), extrawidth); #undef ONE_PIXEL_BLEND - src += srcskip; /* move to next row, accounting for pitch. */ + src += srcskip; /* move to next row, accounting for pitch. */ dst += dstskip; } - } -static void BlitNtoNKey(SDL_BlitInfo * info); -static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info); -static void -Blit32to32KeyAltivec(SDL_BlitInfo * info) +static void BlitNtoNKey(SDL_BlitInfo *info); +static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info); +static void Blit32to32KeyAltivec(SDL_BlitInfo *info) { int height = info->dst_h; - Uint32 *srcp = (Uint32 *) info->src; + Uint32 *srcp = (Uint32 *)info->src; int srcskip = info->src_skip / 4; - Uint32 *dstp = (Uint32 *) info->dst; + Uint32 *dstp = (Uint32 *)info->dst; int dstskip = info->dst_skip / 4; SDL_PixelFormat *srcfmt = info->src_fmt; int srcbpp = srcfmt->BytesPerPixel; @@ -635,49 +610,54 @@ Blit32to32KeyAltivec(SDL_BlitInfo * info) } vzero = vec_splat_u8(0); if (alpha) { - ((unsigned char *) &valpha)[0] = (unsigned char) alpha; + ((unsigned char *)&valpha)[0] = (unsigned char)alpha; valpha = - (vector unsigned int) vec_splat((vector unsigned char) valpha, 0); + (vector unsigned int)vec_splat((vector unsigned char)valpha, 0); } else { - valpha = (vector unsigned int) vzero; + valpha = (vector unsigned int)vzero; } ckey &= rgbmask; - ((unsigned int *) (char *) &vckey)[0] = ckey; + ((unsigned int *)(char *)&vckey)[0] = ckey; vckey = vec_splat(vckey, 0); - ((unsigned int *) (char *) &vrgbmask)[0] = rgbmask; + ((unsigned int *)(char *)&vrgbmask)[0] = rgbmask; vrgbmask = vec_splat(vrgbmask, 0); +#if SDL_BYTEORDER == SDL_LIL_ENDIAN + /* reorder bytes for PowerPC little endian */ + vpermute = reorder_ppc64le_vec(vpermute); +#endif + while (height--) { -#define ONE_PIXEL_BLEND(condition, widthvar) \ - if (copy_alpha) { \ - while (condition) { \ - Uint32 Pixel; \ - unsigned sR, sG, sB, sA; \ - DISEMBLE_RGBA((Uint8 *)srcp, srcbpp, srcfmt, Pixel, \ - sR, sG, sB, sA); \ - if ( (Pixel & rgbmask) != ckey ) { \ - ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ - sR, sG, sB, sA); \ - } \ - dstp = (Uint32 *) (((Uint8 *) dstp) + dstbpp); \ - srcp = (Uint32 *) (((Uint8 *) srcp) + srcbpp); \ - widthvar--; \ - } \ - } else { \ - while (condition) { \ - Uint32 Pixel; \ - unsigned sR, sG, sB; \ - RETRIEVE_RGB_PIXEL((Uint8 *)srcp, srcbpp, Pixel); \ - if ( Pixel != ckey ) { \ - RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); \ - ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ - sR, sG, sB, alpha); \ - } \ - dstp = (Uint32 *) (((Uint8 *)dstp) + dstbpp); \ - srcp = (Uint32 *) (((Uint8 *)srcp) + srcbpp); \ - widthvar--; \ - } \ - } +#define ONE_PIXEL_BLEND(condition, widthvar) \ + if (copy_alpha) { \ + while (condition) { \ + Uint32 Pixel; \ + unsigned sR, sG, sB, sA; \ + DISEMBLE_RGBA((Uint8 *)srcp, srcbpp, srcfmt, Pixel, \ + sR, sG, sB, sA); \ + if ((Pixel & rgbmask) != ckey) { \ + ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ + sR, sG, sB, sA); \ + } \ + dstp = (Uint32 *)(((Uint8 *)dstp) + dstbpp); \ + srcp = (Uint32 *)(((Uint8 *)srcp) + srcbpp); \ + widthvar--; \ + } \ + } else { \ + while (condition) { \ + Uint32 Pixel; \ + unsigned sR, sG, sB; \ + RETRIEVE_RGB_PIXEL((Uint8 *)srcp, srcbpp, Pixel); \ + if (Pixel != ckey) { \ + RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); \ + ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ + sR, sG, sB, alpha); \ + } \ + dstp = (Uint32 *)(((Uint8 *)dstp) + dstbpp); \ + srcp = (Uint32 *)(((Uint8 *)srcp) + srcbpp); \ + widthvar--; \ + } \ + } int width = info->dst_w; ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width); SDL_assert(width > 0); @@ -694,20 +674,16 @@ Blit32to32KeyAltivec(SDL_BlitInfo * info) /* load the source vec */ vs = vec_perm(vs, voverflow, valigner); /* vsel is set for items that match the key */ - vsel = (vector unsigned char) vec_and(vs, vrgbmask); - vsel = (vector unsigned char) vec_cmpeq(vs, vckey); -#if defined(__powerpc__) && (SDL_BYTEORDER == SDL_LIL_ENDIAN) - /* reorder bytes for PowerPC little endian */ - vpermute = reorder_ppc64le_vec(vpermute); -#endif + vsel = (vector unsigned char)vec_and(vs, vrgbmask); + vsel = (vector unsigned char)vec_cmpeq(vs, vckey); /* permute the src vec to the dest format */ vs = vec_perm(vs, valpha, vpermute); /* load the destination vec */ vd = vec_ld(0, dstp); /* select the source and dest into vs */ - vd = (vector unsigned int) vec_sel((vector unsigned char) vs, - (vector unsigned char) vd, - vsel); + vd = (vector unsigned int)vec_sel((vector unsigned char)vs, + (vector unsigned char)vd, + vsel); vec_st(vd, 0, dstp); srcp += 4; @@ -725,13 +701,12 @@ Blit32to32KeyAltivec(SDL_BlitInfo * info) /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */ /* Use this on a G5 */ -static void -ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) +static void ConvertAltivec32to32_noprefetch(SDL_BlitInfo *info) { int height = info->dst_h; - Uint32 *src = (Uint32 *) info->src; + Uint32 *src = (Uint32 *)info->src; int srcskip = info->src_skip / 4; - Uint32 *dst = (Uint32 *) info->dst; + Uint32 *dst = (Uint32 *)info->dst; int dstskip = info->dst_skip / 4; SDL_PixelFormat *srcfmt = info->src_fmt; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -740,14 +715,19 @@ ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) if (dstfmt->Amask && !srcfmt->Amask) { if (info->a) { vector unsigned char valpha; - ((unsigned char *) &valpha)[0] = info->a; - vzero = (vector unsigned int) vec_splat(valpha, 0); + ((unsigned char *)&valpha)[0] = info->a; + vzero = (vector unsigned int)vec_splat(valpha, 0); } } SDL_assert(srcfmt->BytesPerPixel == 4); SDL_assert(dstfmt->BytesPerPixel == 4); +#if SDL_BYTEORDER == SDL_LIL_ENDIAN + /* reorder bytes for PowerPC little endian */ + vpermute = reorder_ppc64le_vec(vpermute); +#endif + while (height--) { vector unsigned char valigner; vector unsigned int vbits; @@ -762,8 +742,8 @@ ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) while ((UNALIGNED_PTR(dst)) && (width)) { bits = *(src++); RGBA_FROM_8888(bits, srcfmt, r, g, b, a); - if(!srcfmt->Amask) - a = info->a; + if (!srcfmt->Amask) + a = info->a; *(dst++) = MAKE8888(dstfmt, r, g, b, a); width--; } @@ -778,13 +758,9 @@ ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) voverflow = vec_ld(15, src); src += 4; width -= 4; - vbits = vec_perm(vbits, voverflow, valigner); /* src is ready. */ -#if defined(__powerpc__) && (SDL_BYTEORDER == SDL_LIL_ENDIAN) - /* reorder bytes for PowerPC little endian */ - vpermute = reorder_ppc64le_vec(vpermute); -#endif - vbits = vec_perm(vbits, vzero, vpermute); /* swizzle it. */ - vec_st(vbits, 0, dst); /* store it back out. */ + vbits = vec_perm(vbits, voverflow, valigner); /* src is ready. */ + vbits = vec_perm(vbits, vzero, vpermute); /* swizzle it. */ + vec_st(vbits, 0, dst); /* store it back out. */ dst += 4; vbits = voverflow; } @@ -793,10 +769,10 @@ ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) /* cover pixels at the end of the row that didn't fit in 16 bytes. */ while (extrawidth) { - bits = *(src++); /* max 7 pixels, don't bother with prefetch. */ + bits = *(src++); /* max 7 pixels, don't bother with prefetch. */ RGBA_FROM_8888(bits, srcfmt, r, g, b, a); - if(!srcfmt->Amask) - a = info->a; + if (!srcfmt->Amask) + a = info->a; *(dst++) = MAKE8888(dstfmt, r, g, b, a); extrawidth--; } @@ -804,21 +780,19 @@ ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info) src += srcskip; dst += dstskip; } - } /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */ /* Use this on a G4 */ -static void -ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) +static void ConvertAltivec32to32_prefetch(SDL_BlitInfo *info) { const int scalar_dst_lead = sizeof(Uint32) * 4; const int vector_dst_lead = sizeof(Uint32) * 16; int height = info->dst_h; - Uint32 *src = (Uint32 *) info->src; + Uint32 *src = (Uint32 *)info->src; int srcskip = info->src_skip / 4; - Uint32 *dst = (Uint32 *) info->dst; + Uint32 *dst = (Uint32 *)info->dst; int dstskip = info->dst_skip / 4; SDL_PixelFormat *srcfmt = info->src_fmt; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -827,14 +801,19 @@ ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) if (dstfmt->Amask && !srcfmt->Amask) { if (info->a) { vector unsigned char valpha; - ((unsigned char *) &valpha)[0] = info->a; - vzero = (vector unsigned int) vec_splat(valpha, 0); + ((unsigned char *)&valpha)[0] = info->a; + vzero = (vector unsigned int)vec_splat(valpha, 0); } } SDL_assert(srcfmt->BytesPerPixel == 4); SDL_assert(dstfmt->BytesPerPixel == 4); +#if SDL_BYTEORDER == SDL_LIL_ENDIAN + /* reorder bytes for PowerPC little endian */ + vpermute = reorder_ppc64le_vec(vpermute); +#endif + while (height--) { vector unsigned char valigner; vector unsigned int vbits; @@ -853,8 +832,8 @@ ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) DST_CHAN_DEST); bits = *(src++); RGBA_FROM_8888(bits, srcfmt, r, g, b, a); - if(!srcfmt->Amask) - a = info->a; + if (!srcfmt->Amask) + a = info->a; *(dst++) = MAKE8888(dstfmt, r, g, b, a); width--; } @@ -873,13 +852,9 @@ ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) voverflow = vec_ld(15, src); src += 4; width -= 4; - vbits = vec_perm(vbits, voverflow, valigner); /* src is ready. */ -#if defined(__powerpc__) && (SDL_BYTEORDER == SDL_LIL_ENDIAN) - /* reorder bytes for PowerPC little endian */ - vpermute = reorder_ppc64le_vec(vpermute); -#endif - vbits = vec_perm(vbits, vzero, vpermute); /* swizzle it. */ - vec_st(vbits, 0, dst); /* store it back out. */ + vbits = vec_perm(vbits, voverflow, valigner); /* src is ready. */ + vbits = vec_perm(vbits, vzero, vpermute); /* swizzle it. */ + vec_st(vbits, 0, dst); /* store it back out. */ dst += 4; vbits = voverflow; } @@ -888,10 +863,10 @@ ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) /* cover pixels at the end of the row that didn't fit in 16 bytes. */ while (extrawidth) { - bits = *(src++); /* max 7 pixels, don't bother with prefetch. */ + bits = *(src++); /* max 7 pixels, don't bother with prefetch. */ RGBA_FROM_8888(bits, srcfmt, r, g, b, a); - if(!srcfmt->Amask) - a = info->a; + if (!srcfmt->Amask) + a = info->a; *(dst++) = MAKE8888(dstfmt, r, g, b, a); extrawidth--; } @@ -904,27 +879,25 @@ ConvertAltivec32to32_prefetch(SDL_BlitInfo * info) vec_dss(DST_CHAN_DEST); } -static enum blit_features -GetBlitFeatures(void) +static enum blit_features GetBlitFeatures(void) { static enum blit_features features = -1; - if (features == (enum blit_features) -1) { + if (features == (enum blit_features) - 1) { /* Provide an override for testing .. */ char *override = SDL_getenv("SDL_ALTIVEC_BLIT_FEATURES"); if (override) { unsigned int features_as_uint = 0; SDL_sscanf(override, "%u", &features_as_uint); - features = (enum blit_features) features_as_uint; + features = (enum blit_features)features_as_uint; } else { features = (0 /* Feature 1 is has-MMX */ - | ((SDL_HasMMX())? BLIT_FEATURE_HAS_MMX : 0) + | ((SDL_HasMMX()) ? BLIT_FEATURE_HAS_MMX : 0) /* Feature 2 is has-AltiVec */ - | ((SDL_HasAltiVec())? BLIT_FEATURE_HAS_ALTIVEC : 0) + | ((SDL_HasAltiVec()) ? BLIT_FEATURE_HAS_ALTIVEC : 0) /* Feature 4 is dont-use-prefetch */ /* !!!! FIXME: Check for G5 or later, not the cache size! Always prefetch on a G4. */ - | ((GetL3CacheSize() == 0) ? BLIT_FEATURE_ALTIVEC_DONT_USE_PREFETCH : 0) - ); + | ((GetL3CacheSize() == 0) ? BLIT_FEATURE_ALTIVEC_DONT_USE_PREFETCH : 0)); } } return features; @@ -941,8 +914,7 @@ GetBlitFeatures(void) #if SDL_ARM_SIMD_BLITTERS void Blit_BGR888_RGB888ARMSIMDAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); -static void -Blit_BGR888_RGB888ARMSIMD(SDL_BlitInfo * info) +static void Blit_BGR888_RGB888ARMSIMD(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -956,8 +928,7 @@ Blit_BGR888_RGB888ARMSIMD(SDL_BlitInfo * info) void Blit_RGB444_RGB888ARMSIMDAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint16_t *src, int32_t src_stride); -static void -Blit_RGB444_RGB888ARMSIMD(SDL_BlitInfo * info) +static void Blit_RGB444_RGB888ARMSIMD(SDL_BlitInfo *info) { int32_t width = info->dst_w; int32_t height = info->dst_h; @@ -972,21 +943,21 @@ Blit_RGB444_RGB888ARMSIMD(SDL_BlitInfo * info) /* This is now endian dependent */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define HI 1 -#define LO 0 +#define HI 1 +#define LO 0 #else /* SDL_BYTEORDER == SDL_BIG_ENDIAN */ -#define HI 0 -#define LO 1 +#define HI 0 +#define LO 1 #endif /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */ -#define RGB888_RGB332(dst, src) { \ - dst = (Uint8)((((src)&0x00E00000)>>16)| \ - (((src)&0x0000E000)>>11)| \ - (((src)&0x000000C0)>>6)); \ -} -static void -Blit_RGB888_index8(SDL_BlitInfo * info) +#define RGB888_RGB332(dst, src) \ + { \ + dst = (Uint8)((((src)&0x00E00000) >> 16) | \ + (((src)&0x0000E000) >> 11) | \ + (((src)&0x000000C0) >> 6)); \ + } +static void Blit_RGB888_index8(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -1000,7 +971,7 @@ Blit_RGB888_index8(SDL_BlitInfo * info) /* Set up some basic variables */ width = info->dst_w; height = info->dst_h; - src = (Uint32 *) info->src; + src = (Uint32 *)info->src; srcskip = info->src_skip / 4; dst = info->dst; dstskip = info->dst_skip; @@ -1029,9 +1000,11 @@ Blit_RGB888_index8(SDL_BlitInfo * info) case 3: RGB888_RGB332(*dst++, *src); ++src; + SDL_FALLTHROUGH; case 2: RGB888_RGB332(*dst++, *src); ++src; + SDL_FALLTHROUGH; case 1: RGB888_RGB332(*dst++, *src); ++src; @@ -1073,10 +1046,12 @@ Blit_RGB888_index8(SDL_BlitInfo * info) RGB888_RGB332(Pixel, *src); *dst++ = map[Pixel]; ++src; + SDL_FALLTHROUGH; case 2: RGB888_RGB332(Pixel, *src); *dst++ = map[Pixel]; ++src; + SDL_FALLTHROUGH; case 1: RGB888_RGB332(Pixel, *src); *dst++ = map[Pixel]; @@ -1090,13 +1065,13 @@ Blit_RGB888_index8(SDL_BlitInfo * info) } /* Special optimized blit for RGB 10-10-10 --> RGB 3-3-2 */ -#define RGB101010_RGB332(dst, src) { \ - dst = (Uint8)((((src)&0x38000000)>>22)| \ - (((src)&0x000E0000)>>15)| \ - (((src)&0x00000300)>>8)); \ -} -static void -Blit_RGB101010_index8(SDL_BlitInfo * info) +#define RGB101010_RGB332(dst, src) \ + { \ + dst = (Uint8)((((src)&0x38000000) >> 22) | \ + (((src)&0x000E0000) >> 15) | \ + (((src)&0x00000300) >> 8)); \ + } +static void Blit_RGB101010_index8(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -1110,7 +1085,7 @@ Blit_RGB101010_index8(SDL_BlitInfo * info) /* Set up some basic variables */ width = info->dst_w; height = info->dst_h; - src = (Uint32 *) info->src; + src = (Uint32 *)info->src; srcskip = info->src_skip / 4; dst = info->dst; dstskip = info->dst_skip; @@ -1139,9 +1114,11 @@ Blit_RGB101010_index8(SDL_BlitInfo * info) case 3: RGB101010_RGB332(*dst++, *src); ++src; + SDL_FALLTHROUGH; case 2: RGB101010_RGB332(*dst++, *src); ++src; + SDL_FALLTHROUGH; case 1: RGB101010_RGB332(*dst++, *src); ++src; @@ -1183,10 +1160,12 @@ Blit_RGB101010_index8(SDL_BlitInfo * info) RGB101010_RGB332(Pixel, *src); *dst++ = map[Pixel]; ++src; + SDL_FALLTHROUGH; case 2: RGB101010_RGB332(Pixel, *src); *dst++ = map[Pixel]; ++src; + SDL_FALLTHROUGH; case 1: RGB101010_RGB332(Pixel, *src); *dst++ = map[Pixel]; @@ -1200,23 +1179,25 @@ Blit_RGB101010_index8(SDL_BlitInfo * info) } /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */ -#define RGB888_RGB555(dst, src) { \ - *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \ - (((*src)&0x0000F800)>>6)| \ - (((*src)&0x000000F8)>>3)); \ -} +#define RGB888_RGB555(dst, src) \ + { \ + *(Uint16 *)(dst) = (Uint16)((((*src) & 0x00F80000) >> 9) | \ + (((*src) & 0x0000F800) >> 6) | \ + (((*src) & 0x000000F8) >> 3)); \ + } #ifndef USE_DUFFS_LOOP -#define RGB888_RGB555_TWO(dst, src) { \ - *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \ - (((src[HI])&0x0000F800)>>6)| \ - (((src[HI])&0x000000F8)>>3))<<16)| \ - (((src[LO])&0x00F80000)>>9)| \ - (((src[LO])&0x0000F800)>>6)| \ - (((src[LO])&0x000000F8)>>3); \ -} +#define RGB888_RGB555_TWO(dst, src) \ + { \ + *(Uint32 *)(dst) = (((((src[HI]) & 0x00F80000) >> 9) | \ + (((src[HI]) & 0x0000F800) >> 6) | \ + (((src[HI]) & 0x000000F8) >> 3)) \ + << 16) | \ + (((src[LO]) & 0x00F80000) >> 9) | \ + (((src[LO]) & 0x0000F800) >> 6) | \ + (((src[LO]) & 0x000000F8) >> 3); \ + } #endif -static void -Blit_RGB888_RGB555(SDL_BlitInfo * info) +static void Blit_RGB888_RGB555(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -1229,9 +1210,9 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) /* Set up some basic variables */ width = info->dst_w; height = info->dst_h; - src = (Uint32 *) info->src; + src = (Uint32 *)info->src; srcskip = info->src_skip / 4; - dst = (Uint16 *) info->dst; + dst = (Uint16 *)info->dst; dstskip = info->dst_skip / 2; #ifdef USE_DUFFS_LOOP @@ -1248,7 +1229,7 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) } #else /* Memory align at 4-byte boundary, if necessary */ - if ((long) dst & 0x03) { + if ((long)dst & 0x03) { /* Don't do anything if width is 0 */ if (width == 0) { return; @@ -1276,6 +1257,7 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) RGB888_RGB555(dst, src); ++src; ++dst; + SDL_FALLTHROUGH; case 2: RGB888_RGB555_TWO(dst, src); src += 2; @@ -1307,6 +1289,7 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) RGB888_RGB555(dst, src); ++src; ++dst; + SDL_FALLTHROUGH; case 2: RGB888_RGB555_TWO(dst, src); src += 2; @@ -1326,23 +1309,25 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) } /* Special optimized blit for RGB 8-8-8 --> RGB 5-6-5 */ -#define RGB888_RGB565(dst, src) { \ - *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \ - (((*src)&0x0000FC00)>>5)| \ - (((*src)&0x000000F8)>>3)); \ -} +#define RGB888_RGB565(dst, src) \ + { \ + *(Uint16 *)(dst) = (Uint16)((((*src) & 0x00F80000) >> 8) | \ + (((*src) & 0x0000FC00) >> 5) | \ + (((*src) & 0x000000F8) >> 3)); \ + } #ifndef USE_DUFFS_LOOP -#define RGB888_RGB565_TWO(dst, src) { \ - *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \ - (((src[HI])&0x0000FC00)>>5)| \ - (((src[HI])&0x000000F8)>>3))<<16)| \ - (((src[LO])&0x00F80000)>>8)| \ - (((src[LO])&0x0000FC00)>>5)| \ - (((src[LO])&0x000000F8)>>3); \ -} +#define RGB888_RGB565_TWO(dst, src) \ + { \ + *(Uint32 *)(dst) = (((((src[HI]) & 0x00F80000) >> 8) | \ + (((src[HI]) & 0x0000FC00) >> 5) | \ + (((src[HI]) & 0x000000F8) >> 3)) \ + << 16) | \ + (((src[LO]) & 0x00F80000) >> 8) | \ + (((src[LO]) & 0x0000FC00) >> 5) | \ + (((src[LO]) & 0x000000F8) >> 3); \ + } #endif -static void -Blit_RGB888_RGB565(SDL_BlitInfo * info) +static void Blit_RGB888_RGB565(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -1355,9 +1340,9 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) /* Set up some basic variables */ width = info->dst_w; height = info->dst_h; - src = (Uint32 *) info->src; + src = (Uint32 *)info->src; srcskip = info->src_skip / 4; - dst = (Uint16 *) info->dst; + dst = (Uint16 *)info->dst; dstskip = info->dst_skip / 2; #ifdef USE_DUFFS_LOOP @@ -1374,7 +1359,7 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) } #else /* Memory align at 4-byte boundary, if necessary */ - if ((long) dst & 0x03) { + if ((long)dst & 0x03) { /* Don't do anything if width is 0 */ if (width == 0) { return; @@ -1402,6 +1387,7 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) RGB888_RGB565(dst, src); ++src; ++dst; + SDL_FALLTHROUGH; case 2: RGB888_RGB565_TWO(dst, src); src += 2; @@ -1433,6 +1419,7 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) RGB888_RGB565(dst, src); ++src; ++dst; + SDL_FALLTHROUGH; case 2: RGB888_RGB565_TWO(dst, src); src += 2; @@ -1451,13 +1438,11 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) #endif /* USE_DUFFS_LOOP */ } - #if SDL_HAVE_BLIT_N_RGB565 /* Special optimized blit for RGB 5-6-5 --> 32-bit RGB surfaces */ -#define RGB565_32(dst, src, map) (map[src[LO]*2] + map[src[HI]*2+1]) -static void -Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map) +#define RGB565_32(dst, src, map) (map[src[LO] * 2] + map[src[HI] * 2 + 1]) +static void Blit_RGB565_32(SDL_BlitInfo *info, const Uint32 *map) { #ifndef USE_DUFFS_LOOP int c; @@ -1472,7 +1457,7 @@ Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map) height = info->dst_h; src = info->src; srcskip = info->src_skip; - dst = (Uint32 *) info->dst; + dst = (Uint32 *)info->dst; dstskip = info->dst_skip / 4; #ifdef USE_DUFFS_LOOP @@ -1506,9 +1491,11 @@ Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map) case 3: *dst++ = RGB565_32(dst, src, map); src += 2; + SDL_FALLTHROUGH; case 2: *dst++ = RGB565_32(dst, src, map); src += 2; + SDL_FALLTHROUGH; case 1: *dst++ = RGB565_32(dst, src, map); src += 2; @@ -1520,6 +1507,8 @@ Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map) #endif /* USE_DUFFS_LOOP */ } +/* *INDENT-OFF* */ /* clang-format off */ + /* Special optimized blit for RGB 5-6-5 --> ARGB 8-8-8-8 */ static const Uint32 RGB565_ARGB8888_LUT[512] = { 0x00000000, 0xff000000, 0x00000008, 0xff002000, @@ -1652,8 +1641,7 @@ static const Uint32 RGB565_ARGB8888_LUT[512] = { 0x00001cf6, 0xffffc200, 0x00001cff, 0xffffe200 }; -static void -Blit_RGB565_ARGB8888(SDL_BlitInfo * info) +static void Blit_RGB565_ARGB8888(SDL_BlitInfo * info) { Blit_RGB565_32(info, RGB565_ARGB8888_LUT); } @@ -1790,8 +1778,7 @@ static const Uint32 RGB565_ABGR8888_LUT[512] = { 0xfff61c00, 0x0000c2ff, 0xffff1c00, 0x0000e2ff }; -static void -Blit_RGB565_ABGR8888(SDL_BlitInfo * info) +static void Blit_RGB565_ABGR8888(SDL_BlitInfo * info) { Blit_RGB565_32(info, RGB565_ABGR8888_LUT); } @@ -1928,8 +1915,7 @@ static const Uint32 RGB565_RGBA8888_LUT[512] = { 0x001cf6ff, 0xffc20000, 0x001cffff, 0xffe20000, }; -static void -Blit_RGB565_RGBA8888(SDL_BlitInfo * info) +static void Blit_RGB565_RGBA8888(SDL_BlitInfo * info) { Blit_RGB565_32(info, RGB565_RGBA8888_LUT); } @@ -2066,23 +2052,23 @@ static const Uint32 RGB565_BGRA8888_LUT[512] = { 0xf61c0000, 0x00c2ffff, 0xff1c0000, 0x00e2ffff }; -static void -Blit_RGB565_BGRA8888(SDL_BlitInfo * info) +static void Blit_RGB565_BGRA8888(SDL_BlitInfo * info) { Blit_RGB565_32(info, RGB565_BGRA8888_LUT); } +/* *INDENT-ON* */ /* clang-format on */ + #endif /* SDL_HAVE_BLIT_N_RGB565 */ /* RGB555->ARGB1555, and BGR555->ABGR1555, SET_ALPHA */ -static void -Blit_RGB555_ARGB1555(SDL_BlitInfo * info) +static void Blit_RGB555_ARGB1555(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint16 *src = (Uint16 *) info->src; + Uint16 *src = (Uint16 *)info->src; int srcskip = info->src_skip; - Uint16 *dst = (Uint16 *) info->dst; + Uint16 *dst = (Uint16 *)info->dst; int dstskip = info->dst_skip; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -2098,13 +2084,12 @@ Blit_RGB555_ARGB1555(SDL_BlitInfo * info) }, width); /* *INDENT-ON* */ /* clang-format on */ - src = (Uint16 *) ((Uint8 *) src + srcskip); - dst = (Uint16 *) ((Uint8 *) dst + dstskip); + src = (Uint16 *)((Uint8 *)src + srcskip); + dst = (Uint16 *)((Uint8 *)dst + dstskip); } } -static void -BlitNto1(SDL_BlitInfo * info) +static void BlitNto1(SDL_BlitInfo *info) { #ifndef USE_DUFFS_LOOP int c; @@ -2153,7 +2138,7 @@ BlitNto1(SDL_BlitInfo * info) if (1) { /* Pack RGB into 8bit pixel */ *dst = ((sR >> 5) << (3 + 2)) | - ((sG >> 5) << (2)) | ((sB >> 6) << (0)); + ((sG >> 5) << (2)) | ((sB >> 6) << (0)); } dst++; src += srcbpp; @@ -2198,14 +2183,13 @@ BlitNto1(SDL_BlitInfo * info) } /* blits 32 bit RGB<->RGBA with both surfaces having the same R,G,B fields */ -static void -Blit4to4MaskAlpha(SDL_BlitInfo * info) +static void Blit4to4MaskAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint32 *src = (Uint32 *) info->src; + Uint32 *src = (Uint32 *)info->src; int srcskip = info->src_skip; - Uint32 *dst = (Uint32 *) info->dst; + Uint32 *dst = (Uint32 *)info->dst; int dstskip = info->dst_skip; SDL_PixelFormat *srcfmt = info->src_fmt; SDL_PixelFormat *dstfmt = info->dst_fmt; @@ -2224,8 +2208,8 @@ Blit4to4MaskAlpha(SDL_BlitInfo * info) }, width); /* *INDENT-ON* */ /* clang-format on */ - src = (Uint32 *) ((Uint8 *) src + srcskip); - dst = (Uint32 *) ((Uint8 *) dst + dstskip); + src = (Uint32 *)((Uint8 *)src + srcskip); + dst = (Uint32 *)((Uint8 *)dst + dstskip); } } else { /* RGBA->RGB, NO_ALPHA */ @@ -2241,16 +2225,15 @@ Blit4to4MaskAlpha(SDL_BlitInfo * info) }, width); /* *INDENT-ON* */ /* clang-format on */ - src = (Uint32 *) ((Uint8 *) src + srcskip); - dst = (Uint32 *) ((Uint8 *) dst + dstskip); + src = (Uint32 *)((Uint8 *)src + srcskip); + dst = (Uint32 *)((Uint8 *)dst + dstskip); } } } /* permutation for mapping srcfmt to dstfmt, overloading or not the alpha channel */ -static void -get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt, - int *_p0 , int *_p1, int *_p2, int *_p3, int *_alpha_channel) +static void get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt, + int *_p0, int *_p1, int *_p2, int *_p3, int *_alpha_channel) { int alpha_channel = 0, p0, p1, p2, p3; #if SDL_BYTEORDER == SDL_LIL_ENDIAN @@ -2307,10 +2290,18 @@ get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt, #if SDL_BYTEORDER == SDL_LIL_ENDIAN #else if (srcbpp == 3 && dstbpp == 4) { - if (p0 != 1) p0--; - if (p1 != 1) p1--; - if (p2 != 1) p2--; - if (p3 != 1) p3--; + if (p0 != 1) { + p0--; + } + if (p1 != 1) { + p1--; + } + if (p2 != 1) { + p2--; + } + if (p3 != 1) { + p3--; + } } else if (srcbpp == 4 && dstbpp == 3) { p0 = p1; p1 = p2; @@ -2327,9 +2318,7 @@ get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt, } } - -static void -BlitNtoN(SDL_BlitInfo * info) +static void BlitNtoN(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -2447,8 +2436,7 @@ BlitNtoN(SDL_BlitInfo * info) } } -static void -BlitNtoNCopyAlpha(SDL_BlitInfo * info) +static void BlitNtoNCopyAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -2505,8 +2493,7 @@ BlitNtoNCopyAlpha(SDL_BlitInfo * info) } } -static void -BlitNto1Key(SDL_BlitInfo * info) +static void BlitNto1Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -2571,14 +2558,13 @@ BlitNto1Key(SDL_BlitInfo * info) } } -static void -Blit2to2Key(SDL_BlitInfo * info) +static void Blit2to2Key(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; - Uint16 *srcp = (Uint16 *) info->src; + Uint16 *srcp = (Uint16 *)info->src; int srcskip = info->src_skip; - Uint16 *dstp = (Uint16 *) info->dst; + Uint16 *dstp = (Uint16 *)info->dst; int dstskip = info->dst_skip; Uint32 ckey = info->colorkey; Uint32 rgbmask = ~info->src_fmt->Amask; @@ -2605,8 +2591,7 @@ Blit2to2Key(SDL_BlitInfo * info) } } -static void -BlitNtoNKey(SDL_BlitInfo * info) +static void BlitNtoNKey(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -2629,8 +2614,8 @@ BlitNtoNKey(SDL_BlitInfo * info) /* BPP 4, same rgb */ if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask) { - Uint32 *src32 = (Uint32*)src; - Uint32 *dst32 = (Uint32*)dst; + Uint32 *src32 = (Uint32 *)src; + Uint32 *dst32 = (Uint32 *)dst; if (dstfmt->Amask) { /* RGB->RGBA, SET_ALPHA */ @@ -2646,8 +2631,8 @@ BlitNtoNKey(SDL_BlitInfo * info) ++src32; }, width); /* *INDENT-ON* */ /* clang-format on */ - src32 = (Uint32 *) ((Uint8 *) src32 + srcskip); - dst32 = (Uint32 *) ((Uint8 *) dst32 + dstskip); + src32 = (Uint32 *)((Uint8 *)src32 + srcskip); + dst32 = (Uint32 *)((Uint8 *)dst32 + dstskip); } return; } else { @@ -2664,8 +2649,8 @@ BlitNtoNKey(SDL_BlitInfo * info) ++src32; }, width); /* *INDENT-ON* */ /* clang-format on */ - src32 = (Uint32 *) ((Uint8 *) src32 + srcskip); - dst32 = (Uint32 *) ((Uint8 *) dst32 + dstskip); + src32 = (Uint32 *)((Uint8 *)src32 + srcskip); + dst32 = (Uint32 *)((Uint8 *)dst32 + dstskip); } return; } @@ -2711,7 +2696,7 @@ BlitNtoNKey(SDL_BlitInfo * info) #if SDL_BYTEORDER == SDL_LIL_ENDIAN Uint8 k0 = ckey & 0xFF; - Uint8 k1 = (ckey >> 8) & 0xFF; + Uint8 k1 = (ckey >> 8) & 0xFF; Uint8 k2 = (ckey >> 16) & 0xFF; #else Uint8 k0 = (ckey >> 16) & 0xFF; @@ -2749,7 +2734,7 @@ BlitNtoNKey(SDL_BlitInfo * info) #if SDL_BYTEORDER == SDL_LIL_ENDIAN Uint8 k0 = ckey & 0xFF; - Uint8 k1 = (ckey >> 8) & 0xFF; + Uint8 k1 = (ckey >> 8) & 0xFF; Uint8 k2 = (ckey >> 16) & 0xFF; #else Uint8 k0 = (ckey >> 16) & 0xFF; @@ -2816,12 +2801,12 @@ BlitNtoNKey(SDL_BlitInfo * info) #if SDL_BYTEORDER == SDL_LIL_ENDIAN Uint8 k0 = ckey & 0xFF; - Uint8 k1 = (ckey >> 8) & 0xFF; + Uint8 k1 = (ckey >> 8) & 0xFF; Uint8 k2 = (ckey >> 16) & 0xFF; #else Uint8 k0 = (ckey >> 16) & 0xFF; Uint8 k1 = (ckey >> 8) & 0xFF; - Uint8 k2 = ckey & 0xFF; + Uint8 k2 = ckey & 0xFF; #endif /* Find the appropriate permutation */ @@ -2877,8 +2862,7 @@ BlitNtoNKey(SDL_BlitInfo * info) } } -static void -BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info) +static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -2909,8 +2893,8 @@ BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info) srcfmt->format == SDL_PIXELFORMAT_BGRA8888 || srcfmt->format == SDL_PIXELFORMAT_RGBA8888) { - Uint32 *src32 = (Uint32*)src; - Uint32 *dst32 = (Uint32*)dst; + Uint32 *src32 = (Uint32 *)src; + Uint32 *dst32 = (Uint32 *)dst; while (height--) { /* *INDENT-OFF* */ /* clang-format off */ DUFFS_LOOP( @@ -2981,8 +2965,7 @@ BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info) } /* Special optimized blit for ARGB 2-10-10-10 --> RGBA */ -static void -Blit2101010toN(SDL_BlitInfo * info) +static void Blit2101010toN(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -3013,8 +2996,7 @@ Blit2101010toN(SDL_BlitInfo * info) } /* Special optimized blit for RGBA --> ARGB 2-10-10-10 */ -static void -BlitNto2101010(SDL_BlitInfo * info) +static void BlitNto2101010(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -3045,8 +3027,7 @@ BlitNto2101010(SDL_BlitInfo * info) } /* Blit_3or4_to_3or4__same_rgb: 3 or 4 bpp, same RGB triplet */ -static void -Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info) +static void Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -3119,8 +3100,7 @@ Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info) } /* Blit_3or4_to_3or4__inversed_rgb: 3 or 4 bpp, inversed RGB triplet */ -static void -Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info) +static void Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo *info) { int width = info->dst_w; int height = info->dst_h; @@ -3233,126 +3213,126 @@ struct blit_table Uint32 dstR, dstG, dstB; enum blit_features blit_features; SDL_BlitFunc blitfunc; - Uint32 alpha; /* bitwise NO_ALPHA, SET_ALPHA, COPY_ALPHA */ + Uint32 alpha; /* bitwise NO_ALPHA, SET_ALPHA, COPY_ALPHA */ }; static const struct blit_table normal_blit_1[] = { /* Default for 8-bit RGB source, never optimized */ - {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0} + { 0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0 } }; static const struct blit_table normal_blit_2[] = { #if SDL_ALTIVEC_BLITTERS /* has-altivec */ - {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, - BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, - {0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, - BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, + { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, + BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, + { 0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, + BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, #endif #if SDL_ARM_SIMD_BLITTERS - {0x00000F00, 0x000000F0, 0x0000000F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - BLIT_FEATURE_HAS_ARM_SIMD, Blit_RGB444_RGB888ARMSIMD, NO_ALPHA | COPY_ALPHA}, + { 0x00000F00, 0x000000F0, 0x0000000F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + BLIT_FEATURE_HAS_ARM_SIMD, Blit_RGB444_RGB888ARMSIMD, NO_ALPHA | COPY_ALPHA }, #endif #if SDL_HAVE_BLIT_N_RGB565 - {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_RGB565_ARGB8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, - {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_RGB565_ABGR8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, - {0x0000F800, 0x000007E0, 0x0000001F, 4, 0xFF000000, 0x00FF0000, 0x0000FF00, - 0, Blit_RGB565_RGBA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, - {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000, 0xFF000000, - 0, Blit_RGB565_BGRA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, + { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_RGB565_ARGB8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, + { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_RGB565_ABGR8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, + { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0xFF000000, 0x00FF0000, 0x0000FF00, + 0, Blit_RGB565_RGBA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, + { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000, 0xFF000000, + 0, Blit_RGB565_BGRA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, #endif - {0x00007C00, 0x000003E0, 0x0000001F, 2, 0x00007C00, 0x000003E0, 0x0000001F, - 0, Blit_RGB555_ARGB1555, SET_ALPHA}, - {0x0000001F, 0x000003E0, 0x00007C00, 2, 0x0000001F, 0x000003E0, 0x00007C00, - 0, Blit_RGB555_ARGB1555, SET_ALPHA}, + { 0x00007C00, 0x000003E0, 0x0000001F, 2, 0x00007C00, 0x000003E0, 0x0000001F, + 0, Blit_RGB555_ARGB1555, SET_ALPHA }, + { 0x0000001F, 0x000003E0, 0x00007C00, 2, 0x0000001F, 0x000003E0, 0x00007C00, + 0, Blit_RGB555_ARGB1555, SET_ALPHA }, /* Default for 16-bit RGB source, used if no other blitter matches */ - {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0} + { 0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0 } }; static const struct blit_table normal_blit_3[] = { /* 3->4 with same rgb triplet */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__same_rgb, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__same_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__same_rgb, + SET_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__same_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA}, + SET_ALPHA }, /* 3->4 with inversed rgb triplet */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__inversed_rgb, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__inversed_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__inversed_rgb, + SET_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__inversed_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA}, + SET_ALPHA }, /* 3->3 to switch RGB 24 <-> BGR 24 */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA }, - {0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA }, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA }, /* Default for 24-bit RGB source, never optimized */ - {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0} + { 0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0 } }; static const struct blit_table normal_blit_4[] = { #if SDL_ALTIVEC_BLITTERS /* has-altivec | dont-use-prefetch */ - {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000, - BLIT_FEATURE_HAS_ALTIVEC | BLIT_FEATURE_ALTIVEC_DONT_USE_PREFETCH, ConvertAltivec32to32_noprefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, + { 0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000, + BLIT_FEATURE_HAS_ALTIVEC | BLIT_FEATURE_ALTIVEC_DONT_USE_PREFETCH, ConvertAltivec32to32_noprefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, /* has-altivec */ - {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000, - BLIT_FEATURE_HAS_ALTIVEC, ConvertAltivec32to32_prefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA}, + { 0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000, + BLIT_FEATURE_HAS_ALTIVEC, ConvertAltivec32to32_prefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, /* has-altivec */ - {0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0, 0x0000001F, - BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB888_RGB565Altivec, NO_ALPHA}, + { 0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0, 0x0000001F, + BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB888_RGB565Altivec, NO_ALPHA }, #endif #if SDL_ARM_SIMD_BLITTERS - {0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - BLIT_FEATURE_HAS_ARM_SIMD, Blit_BGR888_RGB888ARMSIMD, NO_ALPHA | COPY_ALPHA }, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + BLIT_FEATURE_HAS_ARM_SIMD, Blit_BGR888_RGB888ARMSIMD, NO_ALPHA | COPY_ALPHA }, #endif /* 4->3 with same rgb triplet */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__same_rgb, NO_ALPHA | SET_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__same_rgb, NO_ALPHA | SET_ALPHA}, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__same_rgb, NO_ALPHA | SET_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__same_rgb, NO_ALPHA | SET_ALPHA }, /* 4->3 with inversed rgb triplet */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA | SET_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA | SET_ALPHA}, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 3, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA | SET_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__inversed_rgb, NO_ALPHA | SET_ALPHA }, /* 4->4 with inversed rgb triplet, and COPY_ALPHA to switch ABGR8888 <-> ARGB8888 */ - {0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, - 0, Blit_3or4_to_3or4__inversed_rgb, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, + 0, Blit_3or4_to_3or4__inversed_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA | COPY_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, - 0, Blit_3or4_to_3or4__inversed_rgb, + SET_ALPHA | COPY_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00, 0x00FF0000, + 0, Blit_3or4_to_3or4__inversed_rgb, #if HAVE_FAST_WRITE_INT8 - NO_ALPHA | + NO_ALPHA | #endif - SET_ALPHA | COPY_ALPHA}, + SET_ALPHA | COPY_ALPHA }, /* RGB 888 and RGB 565 */ - {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0, 0x0000001F, - 0, Blit_RGB888_RGB565, NO_ALPHA}, - {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0, 0x0000001F, - 0, Blit_RGB888_RGB555, NO_ALPHA}, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0, 0x0000001F, + 0, Blit_RGB888_RGB565, NO_ALPHA }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0, 0x0000001F, + 0, Blit_RGB888_RGB555, NO_ALPHA }, /* Default for 32-bit RGB source, used if no other blitter matches */ - {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0} + { 0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0 } }; static const struct blit_table *const normal_blit[] = { @@ -3362,8 +3342,7 @@ static const struct blit_table *const normal_blit[] = { /* Mask matches table, or table entry is zero */ #define MASKOK(x, y) (((x) == (y)) || ((y) == 0x00000000)) -SDL_BlitFunc -SDL_CalculateBlitN(SDL_Surface * surface) +SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface) { SDL_PixelFormat *srcfmt; SDL_PixelFormat *dstfmt; @@ -3377,7 +3356,7 @@ SDL_CalculateBlitN(SDL_Surface * surface) /* We don't support destinations less than 8-bits */ if (dstfmt->BitsPerPixel < 8) { - return (NULL); + return NULL; } switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) { @@ -3390,9 +3369,9 @@ SDL_CalculateBlitN(SDL_Surface * surface) (srcfmt->Bmask == 0x000000FF)) { blitfun = Blit_RGB888_index8; } else if ((srcfmt->BytesPerPixel == 4) && - (srcfmt->Rmask == 0x3FF00000) && - (srcfmt->Gmask == 0x000FFC00) && - (srcfmt->Bmask == 0x000003FF)) { + (srcfmt->Rmask == 0x3FF00000) && + (srcfmt->Gmask == 0x000FFC00) && + (srcfmt->Bmask == 0x000003FF)) { blitfun = Blit_RGB101010_index8; } else { blitfun = BlitNto1; @@ -3400,8 +3379,9 @@ SDL_CalculateBlitN(SDL_Surface * surface) } else { /* Now the meat, choose the blitter we want */ Uint32 a_need = NO_ALPHA; - if (dstfmt->Amask) + if (dstfmt->Amask) { a_need = srcfmt->Amask ? COPY_ALPHA : SET_ALPHA; + } table = normal_blit[srcfmt->BytesPerPixel - 1]; for (which = 0; table[which].dstbpp; ++which) { if (MASKOK(srcfmt->Rmask, table[which].srcR) && @@ -3413,21 +3393,22 @@ SDL_CalculateBlitN(SDL_Surface * surface) dstfmt->BytesPerPixel == table[which].dstbpp && (a_need & table[which].alpha) == a_need && ((table[which].blit_features & GetBlitFeatures()) == - table[which].blit_features)) + table[which].blit_features)) { break; + } } blitfun = table[which].blitfunc; - if (blitfun == BlitNtoN) { /* default C fallback catch-all. Slow! */ + if (blitfun == BlitNtoN) { /* default C fallback catch-all. Slow! */ if (srcfmt->format == SDL_PIXELFORMAT_ARGB2101010) { blitfun = Blit2101010toN; } else if (dstfmt->format == SDL_PIXELFORMAT_ARGB2101010) { blitfun = BlitNto2101010; } else if (srcfmt->BytesPerPixel == 4 && - dstfmt->BytesPerPixel == 4 && - srcfmt->Rmask == dstfmt->Rmask && - srcfmt->Gmask == dstfmt->Gmask && - srcfmt->Bmask == dstfmt->Bmask) { + dstfmt->BytesPerPixel == 4 && + srcfmt->Rmask == dstfmt->Rmask && + srcfmt->Gmask == dstfmt->Gmask && + srcfmt->Bmask == dstfmt->Bmask) { if (a_need == COPY_ALPHA) { if (srcfmt->Amask == dstfmt->Amask) { /* Fastpath C fallback: 32bit RGBA<->RGBA blit with matching RGBA */ @@ -3444,25 +3425,24 @@ SDL_CalculateBlitN(SDL_Surface * surface) } } } - return (blitfun); + return blitfun; case SDL_COPY_COLORKEY: /* colorkey blit: Here we don't have too many options, mostly because RLE is the preferred fast way to deal with this. If a particular case turns out to be useful we'll add it. */ - if (srcfmt->BytesPerPixel == 2 && surface->map->identity) + if (srcfmt->BytesPerPixel == 2 && surface->map->identity != 0) { return Blit2to2Key; - else if (dstfmt->BytesPerPixel == 1) + } else if (dstfmt->BytesPerPixel == 1) { return BlitNto1Key; - else { + } else { #if SDL_ALTIVEC_BLITTERS - if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) - && SDL_HasAltiVec()) { + if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) && SDL_HasAltiVec()) { return Blit32to32KeyAltivec; } else #endif - if (srcfmt->Amask && dstfmt->Amask) { + if (srcfmt->Amask && dstfmt->Amask) { return BlitNtoNKeyCopyAlpha; } else { return BlitNtoNKey; diff --git a/modules/SDL2/src/video/SDL_blit_auto.c b/modules/SDL2/src/video/SDL_blit_auto.c index 4e57726..1561d10 100644 --- a/modules/SDL2/src/video/SDL_blit_auto.c +++ b/modules/SDL2/src/video/SDL_blit_auto.c @@ -823,7 +823,6 @@ static void SDL_Blit_RGB888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = (srcR * dstR) / 255; dstG = (srcG * dstG) / 255; dstB = (srcB * dstB) / 255; - dstA = 0xFF; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -886,7 +885,6 @@ static void SDL_Blit_RGB888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = (srcR * dstR) / 255; dstG = (srcG * dstG) / 255; dstB = (srcB * dstB) / 255; - dstA = 0xFF; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -1033,7 +1031,6 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -1114,7 +1111,6 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -1923,7 +1919,6 @@ static void SDL_Blit_BGR888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = (srcR * dstR) / 255; dstG = (srcG * dstG) / 255; dstB = (srcB * dstB) / 255; - dstA = 0xFF; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -1986,7 +1981,6 @@ static void SDL_Blit_BGR888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = (srcR * dstR) / 255; dstG = (srcG * dstG) / 255; dstB = (srcB * dstB) / 255; - dstA = 0xFF; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -2133,7 +2127,6 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -2214,7 +2207,6 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -3068,7 +3060,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -3139,7 +3130,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -3292,7 +3282,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -3375,7 +3364,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -4232,7 +4220,6 @@ static void SDL_Blit_RGBA8888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -4303,7 +4290,6 @@ static void SDL_Blit_RGBA8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -4456,7 +4442,6 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -4539,7 +4524,6 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -5398,7 +5382,6 @@ static void SDL_Blit_ABGR8888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -5469,7 +5452,6 @@ static void SDL_Blit_ABGR8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -5622,7 +5604,6 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -5705,7 +5686,6 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -6564,7 +6544,6 @@ static void SDL_Blit_BGRA8888_ARGB8888_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -6635,7 +6614,6 @@ static void SDL_Blit_BGRA8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -6788,7 +6766,6 @@ static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; @@ -6871,7 +6848,6 @@ static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; if (dstR > 255) dstR = 255; dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; if (dstG > 255) dstG = 255; dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; if (dstB > 255) dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; if (dstA > 255) dstA = 255; break; } dstpixel = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; diff --git a/modules/SDL2/src/video/SDL_blit_auto.h b/modules/SDL2/src/video/SDL_blit_auto.h index 465df74..f7f89c7 100644 --- a/modules/SDL2/src/video/SDL_blit_auto.h +++ b/modules/SDL2/src/video/SDL_blit_auto.h @@ -23,11 +23,11 @@ #if SDL_HAVE_BLIT_AUTO -/* *INDENT-OFF* */ +/* *INDENT-OFF* */ /* clang-format off */ extern SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]; -/* *INDENT-ON* */ +/* *INDENT-ON* */ /* clang-format on */ #endif /* SDL_HAVE_BLIT_AUTO */ diff --git a/modules/SDL2/src/video/SDL_blit_copy.c b/modules/SDL2/src/video/SDL_blit_copy.c index eba0865..b772a55 100644 --- a/modules/SDL2/src/video/SDL_blit_copy.c +++ b/modules/SDL2/src/video/SDL_blit_copy.c @@ -24,48 +24,46 @@ #include "SDL_blit.h" #include "SDL_blit_copy.h" - #ifdef __SSE__ /* This assumes 16-byte aligned src and dst */ -static SDL_INLINE void -SDL_memcpySSE(Uint8 * dst, const Uint8 * src, int len) +static SDL_INLINE void SDL_memcpySSE(Uint8 *dst, const Uint8 *src, int len) { int i; __m128 values[4]; for (i = len / 64; i--;) { _mm_prefetch((const char *)src, _MM_HINT_NTA); - values[0] = *(__m128 *) (src + 0); - values[1] = *(__m128 *) (src + 16); - values[2] = *(__m128 *) (src + 32); - values[3] = *(__m128 *) (src + 48); - _mm_stream_ps((float *) (dst + 0), values[0]); - _mm_stream_ps((float *) (dst + 16), values[1]); - _mm_stream_ps((float *) (dst + 32), values[2]); - _mm_stream_ps((float *) (dst + 48), values[3]); + values[0] = *(__m128 *)(src + 0); + values[1] = *(__m128 *)(src + 16); + values[2] = *(__m128 *)(src + 32); + values[3] = *(__m128 *)(src + 48); + _mm_stream_ps((float *)(dst + 0), values[0]); + _mm_stream_ps((float *)(dst + 16), values[1]); + _mm_stream_ps((float *)(dst + 32), values[2]); + _mm_stream_ps((float *)(dst + 48), values[3]); src += 64; dst += 64; } - if (len & 63) + if (len & 63) { SDL_memcpy(dst, src, len & 63); + } } #endif /* __SSE__ */ #ifdef __MMX__ #ifdef _MSC_VER -#pragma warning(disable:4799) +#pragma warning(disable : 4799) #endif -static SDL_INLINE void -SDL_memcpyMMX(Uint8 * dst, const Uint8 * src, int len) +static SDL_INLINE void SDL_memcpyMMX(Uint8 *dst, const Uint8 *src, int len) { - const int remain = (len & 63); + int remain = len & 63; int i; - __m64* d64 = (__m64*)dst; - __m64* s64 = (__m64*)src; + __m64 *d64 = (__m64 *)dst; + __m64 *s64 = (__m64 *)src; - for(i= len / 64; i--;) { + for (i = len / 64; i--;) { d64[0] = s64[0]; d64[1] = s64[1]; d64[2] = s64[2]; @@ -79,16 +77,18 @@ SDL_memcpyMMX(Uint8 * dst, const Uint8 * src, int len) s64 += 8; } - if (remain) - { + if (remain) { const int skip = len - remain; - SDL_memcpy(dst + skip, src + skip, remain); + dst += skip; + src += skip; + while (remain--) { + *dst++ = *src++; + } } } #endif /* __MMX__ */ -void -SDL_BlitCopy(SDL_BlitInfo * info) +void SDL_BlitCopy(SDL_BlitInfo *info) { SDL_bool overlap; Uint8 *src, *dst; @@ -104,33 +104,33 @@ SDL_BlitCopy(SDL_BlitInfo * info) /* Properly handle overlapping blits */ if (src < dst) { - overlap = (dst < (src + h*srcskip)); + overlap = (dst < (src + h * srcskip)); } else { - overlap = (src < (dst + h*dstskip)); + overlap = (src < (dst + h * dstskip)); } if (overlap) { - if ( dst < src ) { - while ( h-- ) { - SDL_memmove(dst, src, w); - src += srcskip; - dst += dstskip; - } + if (dst < src) { + while (h--) { + SDL_memmove(dst, src, w); + src += srcskip; + dst += dstskip; + } } else { - src += ((h-1) * srcskip); - dst += ((h-1) * dstskip); - while ( h-- ) { - SDL_memmove(dst, src, w); - src -= srcskip; - dst -= dstskip; - } + src += ((h - 1) * srcskip); + dst += ((h - 1) * dstskip); + while (h--) { + SDL_memmove(dst, src, w); + src -= srcskip; + dst -= dstskip; + } } return; } #ifdef __SSE__ if (SDL_HasSSE() && - !((uintptr_t) src & 15) && !(srcskip & 15) && - !((uintptr_t) dst & 15) && !(dstskip & 15)) { + !((uintptr_t)src & 15) && !(srcskip & 15) && + !((uintptr_t)dst & 15) && !(dstskip & 15)) { while (h--) { SDL_memcpySSE(dst, src, w); src += srcskip; diff --git a/modules/SDL2/src/video/SDL_blit_copy.h b/modules/SDL2/src/video/SDL_blit_copy.h index 56baf7f..a245db8 100644 --- a/modules/SDL2/src/video/SDL_blit_copy.h +++ b/modules/SDL2/src/video/SDL_blit_copy.h @@ -22,7 +22,7 @@ #ifndef SDL_blit_copy_h_ #define SDL_blit_copy_h_ -void SDL_BlitCopy(SDL_BlitInfo * info); +void SDL_BlitCopy(SDL_BlitInfo *info); #endif /* SDL_blit_copy_h_ */ diff --git a/modules/SDL2/src/video/SDL_blit_slow.c b/modules/SDL2/src/video/SDL_blit_slow.c index 98cc94a..9ea5c38 100644 --- a/modules/SDL2/src/video/SDL_blit_slow.c +++ b/modules/SDL2/src/video/SDL_blit_slow.c @@ -24,12 +24,13 @@ #include "SDL_blit.h" #include "SDL_blit_slow.h" -#define FORMAT_ALPHA 0 -#define FORMAT_NO_ALPHA -1 -#define FORMAT_2101010 1 -#define FORMAT_HAS_ALPHA(format) format == 0 -#define FORMAT_HAS_NO_ALPHA(format) format < 0 -static int SDL_INLINE detect_format(SDL_PixelFormat *pf) { +#define FORMAT_ALPHA 0 +#define FORMAT_NO_ALPHA -1 +#define FORMAT_2101010 1 +#define FORMAT_HAS_ALPHA(format) format == 0 +#define FORMAT_HAS_NO_ALPHA(format) format < 0 +static int SDL_INLINE detect_format(SDL_PixelFormat *pf) +{ if (pf->format == SDL_PIXELFORMAT_ARGB2101010) { return FORMAT_2101010; } else if (pf->Amask) { @@ -42,8 +43,7 @@ static int SDL_INLINE detect_format(SDL_PixelFormat *pf) { /* The ONE TRUE BLITTER * This puppy has to handle all the unoptimized cases - yes, it's slow. */ -void -SDL_Blit_Slow(SDL_BlitInfo * info) +void SDL_Blit_Slow(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -98,7 +98,7 @@ SDL_Blit_Slow(SDL_BlitInfo * info) /* srcpixel isn't set for 24 bpp */ if (srcbpp == 3) { srcpixel = (srcR << src_fmt->Rshift) | - (srcG << src_fmt->Gshift) | (srcB << src_fmt->Bshift); + (srcG << src_fmt->Gshift) | (srcB << src_fmt->Bshift); } if ((srcpixel & rgbmask) == ckey) { posx += incx; @@ -148,14 +148,17 @@ SDL_Blit_Slow(SDL_BlitInfo * info) break; case SDL_COPY_ADD: dstR = srcR + dstR; - if (dstR > 255) + if (dstR > 255) { dstR = 255; + } dstG = srcG + dstG; - if (dstG > 255) + if (dstG > 255) { dstG = 255; + } dstB = srcB + dstB; - if (dstB > 255) + if (dstB > 255) { dstB = 255; + } break; case SDL_COPY_MOD: dstR = (srcR * dstR) / 255; @@ -164,17 +167,17 @@ SDL_Blit_Slow(SDL_BlitInfo * info) break; case SDL_COPY_MUL: dstR = ((srcR * dstR) + (dstR * (255 - srcA))) / 255; - if (dstR > 255) + if (dstR > 255) { dstR = 255; + } dstG = ((srcG * dstG) + (dstG * (255 - srcA))) / 255; - if (dstG > 255) + if (dstG > 255) { dstG = 255; + } dstB = ((srcB * dstB) + (dstB * (255 - srcA))) / 255; - if (dstB > 255) + if (dstB > 255) { dstB = 255; - dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255; - if (dstA > 255) - dstA = 255; + } break; } if (FORMAT_HAS_ALPHA(dstfmt_val)) { diff --git a/modules/SDL2/src/video/SDL_blit_slow.h b/modules/SDL2/src/video/SDL_blit_slow.h index 3b4616d..37bc7ca 100644 --- a/modules/SDL2/src/video/SDL_blit_slow.h +++ b/modules/SDL2/src/video/SDL_blit_slow.h @@ -24,7 +24,7 @@ #include "../SDL_internal.h" -extern void SDL_Blit_Slow(SDL_BlitInfo * info); +extern void SDL_Blit_Slow(SDL_BlitInfo *info); #endif /* SDL_blit_slow_h_ */ diff --git a/modules/SDL2/src/video/SDL_bmp.c b/modules/SDL2/src/video/SDL_bmp.c index ccc5364..82147a5 100644 --- a/modules/SDL2/src/video/SDL_bmp.c +++ b/modules/SDL2/src/video/SDL_bmp.c @@ -41,19 +41,19 @@ /* Compression encodings for BMP files */ #ifndef BI_RGB -#define BI_RGB 0 -#define BI_RLE8 1 -#define BI_RLE4 2 -#define BI_BITFIELDS 3 +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 #endif /* Logical color space values for BMP files */ #ifndef LCS_WINDOWS_COLOR_SPACE /* 0x57696E20 == "Win " */ -#define LCS_WINDOWS_COLOR_SPACE 0x57696E20 +#define LCS_WINDOWS_COLOR_SPACE 0x57696E20 #endif -static SDL_bool readRlePixels(SDL_Surface * surface, SDL_RWops * src, int isRle8) +static SDL_bool readRlePixels(SDL_Surface *surface, SDL_RWops *src, int isRle8) { /* | Sets the surface pixels from src. A bmp image is upside down. @@ -61,35 +61,46 @@ static SDL_bool readRlePixels(SDL_Surface * surface, SDL_RWops * src, int isRle8 int pitch = surface->pitch; int height = surface->h; Uint8 *start = (Uint8 *)surface->pixels; - Uint8 *end = start + (height*pitch); - Uint8 *bits = end-pitch, *spot; + Uint8 *end = start + (height * pitch); + Uint8 *bits = end - pitch, *spot; int ofs = 0; Uint8 ch; Uint8 needsPad; -#define COPY_PIXEL(x) spot = &bits[ofs++]; if(spot >= start && spot < end) *spot = (x) +#define COPY_PIXEL(x) \ + spot = &bits[ofs++]; \ + if (spot >= start && spot < end) \ + *spot = (x) for (;;) { - if (!SDL_RWread(src, &ch, 1, 1)) return SDL_TRUE; + if (!SDL_RWread(src, &ch, 1, 1)) { + return SDL_TRUE; + } /* | encoded mode starts with a run length, and then a byte | with two colour indexes to alternate between for the run */ if (ch) { Uint8 pixel; - if (!SDL_RWread(src, &pixel, 1, 1)) return SDL_TRUE; - if (isRle8) { /* 256-color bitmap, compressed */ + if (!SDL_RWread(src, &pixel, 1, 1)) { + return SDL_TRUE; + } + if (isRle8) { /* 256-color bitmap, compressed */ do { COPY_PIXEL(pixel); } while (--ch); - } else { /* 16-color bitmap, compressed */ + } else { /* 16-color bitmap, compressed */ Uint8 pixel0 = pixel >> 4; Uint8 pixel1 = pixel & 0x0F; for (;;) { COPY_PIXEL(pixel0); /* even count, high nibble */ - if (!--ch) break; + if (!--ch) { + break; + } COPY_PIXEL(pixel1); /* odd count, low nibble */ - if (!--ch) break; + if (!--ch) { + break; + } } } } else { @@ -98,41 +109,57 @@ static SDL_bool readRlePixels(SDL_Surface * surface, SDL_RWops * src, int isRle8 | a cursor move, or some absolute data. | zero tag may be absolute mode or an escape */ - if (!SDL_RWread(src, &ch, 1, 1)) return SDL_TRUE; + if (!SDL_RWread(src, &ch, 1, 1)) { + return SDL_TRUE; + } switch (ch) { - case 0: /* end of line */ + case 0: /* end of line */ ofs = 0; - bits -= pitch; /* go to previous */ + bits -= pitch; /* go to previous */ break; - case 1: /* end of bitmap */ - return SDL_FALSE; /* success! */ - case 2: /* delta */ - if (!SDL_RWread(src, &ch, 1, 1)) return SDL_TRUE; + case 1: /* end of bitmap */ + return SDL_FALSE; /* success! */ + case 2: /* delta */ + if (!SDL_RWread(src, &ch, 1, 1)) { + return SDL_TRUE; + } ofs += ch; - if (!SDL_RWread(src, &ch, 1, 1)) return SDL_TRUE; + if (!SDL_RWread(src, &ch, 1, 1)) { + return SDL_TRUE; + } bits -= (ch * pitch); break; - default: /* no compression */ + default: /* no compression */ if (isRle8) { needsPad = (ch & 1); do { Uint8 pixel; - if (!SDL_RWread(src, &pixel, 1, 1)) return SDL_TRUE; + if (!SDL_RWread(src, &pixel, 1, 1)) { + return SDL_TRUE; + } COPY_PIXEL(pixel); } while (--ch); } else { - needsPad = (((ch+1)>>1) & 1); /* (ch+1)>>1: bytes size */ + needsPad = (((ch + 1) >> 1) & 1); /* (ch+1)>>1: bytes size */ for (;;) { Uint8 pixel; - if (!SDL_RWread(src, &pixel, 1, 1)) return SDL_TRUE; + if (!SDL_RWread(src, &pixel, 1, 1)) { + return SDL_TRUE; + } COPY_PIXEL(pixel >> 4); - if (!--ch) break; + if (!--ch) { + break; + } COPY_PIXEL(pixel & 0x0F); - if (!--ch) break; + if (!--ch) { + break; + } } } /* pad at even boundary */ - if (needsPad && !SDL_RWread(src, &ch, 1, 1)) return SDL_TRUE; + if (needsPad && !SDL_RWread(src, &ch, 1, 1)) { + return SDL_TRUE; + } break; } } @@ -148,7 +175,7 @@ static void CorrectAlphaChannel(SDL_Surface *surface) #else int alphaChannelOffset = 3; #endif - Uint8 *alpha = ((Uint8*)surface->pixels) + alphaChannelOffset; + Uint8 *alpha = ((Uint8 *)surface->pixels) + alphaChannelOffset; Uint8 *end = alpha + surface->h * surface->pitch; while (alpha < end) { @@ -160,7 +187,7 @@ static void CorrectAlphaChannel(SDL_Surface *surface) } if (!hasAlpha) { - alpha = ((Uint8*)surface->pixels) + alphaChannelOffset; + alpha = ((Uint8 *)surface->pixels) + alphaChannelOffset; while (alpha < end) { *alpha = SDL_ALPHA_OPAQUE; alpha += 4; @@ -168,8 +195,7 @@ static void CorrectAlphaChannel(SDL_Surface *surface) } } -SDL_Surface * -SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) +SDL_Surface *SDL_LoadBMP_RW(SDL_RWops *src, int freesrc) { SDL_bool was_error; Sint64 fp_offset = 0; @@ -238,13 +264,13 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) /* bfSize = */ SDL_ReadLE32(src); /* bfReserved1 = */ SDL_ReadLE16(src); /* bfReserved2 = */ SDL_ReadLE16(src); - bfOffBits = SDL_ReadLE32(src); + bfOffBits = SDL_ReadLE32(src); /* Read the Win32 BITMAPINFOHEADER */ biSize = SDL_ReadLE32(src); - if (biSize == 12) { /* really old BITMAPCOREHEADER */ - biWidth = (Uint32) SDL_ReadLE16(src); - biHeight = (Uint32) SDL_ReadLE16(src); + if (biSize == 12) { /* really old BITMAPCOREHEADER */ + biWidth = (Uint32)SDL_ReadLE16(src); + biHeight = (Uint32)SDL_ReadLE16(src); /* biPlanes = */ SDL_ReadLE16(src); biBitCount = SDL_ReadLE16(src); biCompression = BI_RGB; @@ -253,7 +279,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) /* biYPelsPerMeter = 0; */ biClrUsed = 0; /* biClrImportant = 0; */ - } else if (biSize >= 40) { /* some version of BITMAPINFOHEADER */ + } else if (biSize >= 40) { /* some version of BITMAPINFOHEADER */ Uint32 headerSize; biWidth = SDL_ReadLE32(src); biHeight = SDL_ReadLE32(src); @@ -282,18 +308,18 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) Bmask = SDL_ReadLE32(src); /* ...v3 adds an alpha mask. */ - if (biSize >= 56) { /* BITMAPV3INFOHEADER; adds alpha mask */ + if (biSize >= 56) { /* BITMAPV3INFOHEADER; adds alpha mask */ haveAlphaMask = SDL_TRUE; Amask = SDL_ReadLE32(src); } } else { /* the mask fields are ignored for v2+ headers if not BI_BITFIELD. */ - if (biSize >= 52) { /* BITMAPV2INFOHEADER; adds RGB masks */ + if (biSize >= 52) { /* BITMAPV2INFOHEADER; adds RGB masks */ /*Rmask = */ SDL_ReadLE32(src); /*Gmask = */ SDL_ReadLE32(src); /*Bmask = */ SDL_ReadLE32(src); } - if (biSize >= 56) { /* BITMAPV3INFOHEADER; adds alpha mask */ + if (biSize >= 56) { /* BITMAPV3INFOHEADER; adds alpha mask */ /*Amask = */ SDL_ReadLE32(src); } } @@ -305,7 +331,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) } /* skip any header bytes we didn't handle... */ - headerSize = (Uint32) (SDL_RWtell(src) - (fp_offset + 14)); + headerSize = (Uint32)(SDL_RWtell(src) - (fp_offset + 14)); if (biSize > headerSize) { SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); } @@ -388,7 +414,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) break; case BI_BITFIELDS: - break; /* we handled this in the info header. */ + break; /* we handled this in the info header. */ default: break; @@ -406,13 +432,13 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) /* Load the palette, if any */ palette = (surface->format)->palette; if (palette) { - if (SDL_RWseek(src, fp_offset+14+biSize, RW_SEEK_SET) < 0) { + if (SDL_RWseek(src, fp_offset + 14 + biSize, RW_SEEK_SET) < 0) { SDL_Error(SDL_EFSEEK); was_error = SDL_TRUE; goto done; } - if (biBitCount >= 32) { /* we shift biClrUsed by this value later. */ + if (biBitCount >= 32) { /* we shift biClrUsed by this value later. */ SDL_SetError("Unsupported or incorrect biBitCount field"); was_error = SDL_TRUE; goto done; @@ -423,7 +449,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) } if (biClrUsed > (Uint32)palette->ncolors) { - biClrUsed = 1 << biBitCount; /* try forcing it? */ + biClrUsed = 1 << biBitCount; /* try forcing it? */ if (biClrUsed > (Uint32)palette->ncolors) { SDL_SetError("Unsupported or incorrect biClrUsed field"); was_error = SDL_TRUE; @@ -431,15 +457,15 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) } } - if (biSize == 12) { - for (i = 0; i < (int) biClrUsed; ++i) { + if (biSize == 12) { + for (i = 0; i < (int)biClrUsed; ++i) { SDL_RWread(src, &palette->colors[i].b, 1, 1); SDL_RWread(src, &palette->colors[i].g, 1, 1); SDL_RWread(src, &palette->colors[i].r, 1, 1); palette->colors[i].a = SDL_ALPHA_OPAQUE; } } else { - for (i = 0; i < (int) biClrUsed; ++i) { + for (i = 0; i < (int)biClrUsed; ++i) { SDL_RWread(src, &palette->colors[i].b, 1, 1); SDL_RWread(src, &palette->colors[i].g, 1, 1); SDL_RWread(src, &palette->colors[i].r, 1, 1); @@ -463,11 +489,13 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) } if ((biCompression == BI_RLE4) || (biCompression == BI_RLE8)) { was_error = readRlePixels(surface, src, biCompression == BI_RLE8); - if (was_error) SDL_Error(SDL_EFREAD); + if (was_error) { + SDL_Error(SDL_EFREAD); + } goto done; } top = (Uint8 *)surface->pixels; - end = (Uint8 *)surface->pixels+(surface->h*surface->pitch); + end = (Uint8 *)surface->pixels + (surface->h * surface->pitch); switch (ExpandBMP) { case 1: bmpPitch = (biWidth + 7) >> 3; @@ -494,27 +522,27 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) switch (ExpandBMP) { case 1: case 2: - case 4:{ - Uint8 pixel = 0; - int shift = (8 - ExpandBMP); - for (i = 0; i < surface->w; ++i) { - if (i % (8 / ExpandBMP) == 0) { - if (!SDL_RWread(src, &pixel, 1, 1)) { - SDL_Error(SDL_EFREAD); - was_error = SDL_TRUE; - goto done; - } - } - bits[i] = (pixel >> shift); - if (bits[i] >= biClrUsed) { - SDL_SetError("A BMP image contains a pixel with a color out of the palette"); + case 4: + { + Uint8 pixel = 0; + int shift = (8 - ExpandBMP); + for (i = 0; i < surface->w; ++i) { + if (i % (8 / ExpandBMP) == 0) { + if (!SDL_RWread(src, &pixel, 1, 1)) { + SDL_Error(SDL_EFREAD); was_error = SDL_TRUE; goto done; } - pixel <<= ExpandBMP; } + bits[i] = (pixel >> shift); + if (bits[i] >= biClrUsed) { + SDL_SetError("A BMP image contains a pixel with a color out of the palette"); + was_error = SDL_TRUE; + goto done; + } + pixel <<= ExpandBMP; } - break; + } break; default: if (SDL_RWread(src, bits, 1, surface->pitch) != surface->pitch) { @@ -536,19 +564,23 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) case has already been taken care of above. */ switch (biBitCount) { case 15: - case 16:{ - Uint16 *pix = (Uint16 *) bits; - for (i = 0; i < surface->w; i++) - pix[i] = SDL_Swap16(pix[i]); - break; + case 16: + { + Uint16 *pix = (Uint16 *)bits; + for (i = 0; i < surface->w; i++) { + pix[i] = SDL_Swap16(pix[i]); } + break; + } - case 32:{ - Uint32 *pix = (Uint32 *) bits; - for (i = 0; i < surface->w; i++) - pix[i] = SDL_Swap32(pix[i]); - break; + case 32: + { + Uint32 *pix = (Uint32 *)bits; + for (i = 0; i < surface->w; i++) { + pix[i] = SDL_Swap32(pix[i]); } + break; + } } #endif break; @@ -569,7 +601,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) if (correctAlpha) { CorrectAlphaChannel(surface); } - done: +done: if (was_error) { if (src) { SDL_RWseek(src, fp_offset, RW_SEEK_SET); @@ -580,15 +612,14 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) if (freesrc && src) { SDL_RWclose(src); } - return (surface); + return surface; } -int -SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) +int SDL_SaveBMP_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst) { Sint64 fp_offset; int i, pad; - SDL_Surface *surface; + SDL_Surface *intermediate_surface; Uint8 *bits; SDL_bool save32bit = SDL_FALSE; SDL_bool saveLegacyBMP = SDL_FALSE; @@ -619,41 +650,42 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) Uint32 bV4BlueMask = 0; Uint32 bV4AlphaMask = 0; Uint32 bV4CSType = 0; - Sint32 bV4Endpoints[3 * 3] = {0}; + Sint32 bV4Endpoints[3 * 3] = { 0 }; Uint32 bV4GammaRed = 0; Uint32 bV4GammaGreen = 0; Uint32 bV4GammaBlue = 0; /* Make sure we have somewhere to save */ - surface = NULL; + intermediate_surface = NULL; if (dst) { #ifdef SAVE_32BIT_BMP /* We can save alpha information in a 32-bit BMP */ - if (saveme->format->BitsPerPixel >= 8 && (saveme->format->Amask || - saveme->map->info.flags & SDL_COPY_COLORKEY)) { + if (surface->format->BitsPerPixel >= 8 && + (surface->format->Amask != 0 || + surface->map->info.flags & SDL_COPY_COLORKEY)) { save32bit = SDL_TRUE; } #endif /* SAVE_32BIT_BMP */ - if (saveme->format->palette && !save32bit) { - if (saveme->format->BitsPerPixel == 8) { - surface = saveme; + if (surface->format->palette != NULL && !save32bit) { + if (surface->format->BitsPerPixel == 8) { + intermediate_surface = surface; } else { SDL_SetError("%d bpp BMP files not supported", - saveme->format->BitsPerPixel); + surface->format->BitsPerPixel); } - } else if ((saveme->format->BitsPerPixel == 24) && !save32bit && + } else if ((surface->format->BitsPerPixel == 24) && !save32bit && #if SDL_BYTEORDER == SDL_LIL_ENDIAN - (saveme->format->Rmask == 0x00FF0000) && - (saveme->format->Gmask == 0x0000FF00) && - (saveme->format->Bmask == 0x000000FF) + (surface->format->Rmask == 0x00FF0000) && + (surface->format->Gmask == 0x0000FF00) && + (surface->format->Bmask == 0x000000FF) #else - (saveme->format->Rmask == 0x000000FF) && - (saveme->format->Gmask == 0x0000FF00) && - (saveme->format->Bmask == 0x00FF0000) + (surface->format->Rmask == 0x000000FF) && + (surface->format->Gmask == 0x0000FF00) && + (surface->format->Bmask == 0x00FF0000) #endif - ) { - surface = saveme; + ) { + intermediate_surface = surface; } else { SDL_PixelFormat format; @@ -664,8 +696,8 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) } else { SDL_InitFormat(&format, SDL_PIXELFORMAT_BGR24); } - surface = SDL_ConvertSurface(saveme, &format, 0); - if (!surface) { + intermediate_surface = SDL_ConvertSurface(surface, &format, 0); + if (intermediate_surface == NULL) { SDL_SetError("Couldn't convert image to %d bpp", format.BitsPerPixel); } @@ -680,14 +712,14 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) saveLegacyBMP = SDL_GetHintBoolean(SDL_HINT_BMP_SAVE_LEGACY_FORMAT, SDL_FALSE); } - if (surface && (SDL_LockSurface(surface) == 0)) { - const int bw = surface->w * surface->format->BytesPerPixel; + if (intermediate_surface && (SDL_LockSurface(intermediate_surface) == 0)) { + const int bw = intermediate_surface->w * intermediate_surface->format->BytesPerPixel; /* Set the BMP file header values */ - bfSize = 0; /* We'll write this when we're done */ + bfSize = 0; /* We'll write this when we're done */ bfReserved1 = 0; bfReserved2 = 0; - bfOffBits = 0; /* We'll write this when we're done */ + bfOffBits = 0; /* We'll write this when we're done */ /* Write the BMP file header values */ fp_offset = SDL_RWtell(dst); @@ -700,16 +732,16 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) /* Set the BMP info values */ biSize = 40; - biWidth = surface->w; - biHeight = surface->h; + biWidth = intermediate_surface->w; + biHeight = intermediate_surface->h; biPlanes = 1; - biBitCount = surface->format->BitsPerPixel; + biBitCount = intermediate_surface->format->BitsPerPixel; biCompression = BI_RGB; - biSizeImage = surface->h * surface->pitch; + biSizeImage = intermediate_surface->h * intermediate_surface->pitch; biXPelsPerMeter = 0; biYPelsPerMeter = 0; - if (surface->format->palette) { - biClrUsed = surface->format->palette->ncolors; + if (intermediate_surface->format->palette) { + biClrUsed = intermediate_surface->format->palette->ncolors; } else { biClrUsed = 0; } @@ -720,9 +752,9 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) biSize = 108; biCompression = BI_BITFIELDS; /* The BMP format is always little endian, these masks stay the same */ - bV4RedMask = 0x00ff0000; + bV4RedMask = 0x00ff0000; bV4GreenMask = 0x0000ff00; - bV4BlueMask = 0x000000ff; + bV4BlueMask = 0x000000ff; bV4AlphaMask = 0xff000000; bV4CSType = LCS_WINDOWS_COLOR_SPACE; bV4GammaRed = 0; @@ -759,12 +791,12 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) } /* Write the palette (in BGR color order) */ - if (surface->format->palette) { + if (intermediate_surface->format->palette) { SDL_Color *colors; int ncolors; - colors = surface->format->palette->colors; - ncolors = surface->format->palette->ncolors; + colors = intermediate_surface->format->palette->colors; + ncolors = intermediate_surface->format->palette->ncolors; for (i = 0; i < ncolors; ++i) { SDL_RWwrite(dst, &colors[i].b, 1, 1); SDL_RWwrite(dst, &colors[i].g, 1, 1); @@ -784,10 +816,10 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) } /* Write the bitmap image upside down */ - bits = (Uint8 *) surface->pixels + (surface->h * surface->pitch); + bits = (Uint8 *)intermediate_surface->pixels + (intermediate_surface->h * intermediate_surface->pitch); pad = ((bw % 4) ? (4 - (bw % 4)) : 0); - while (bits > (Uint8 *) surface->pixels) { - bits -= surface->pitch; + while (bits > (Uint8 *)intermediate_surface->pixels) { + bits -= intermediate_surface->pitch; if (SDL_RWwrite(dst, bits, 1, bw) != bw) { SDL_Error(SDL_EFWRITE); break; @@ -811,16 +843,16 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) } /* Close it up.. */ - SDL_UnlockSurface(surface); - if (surface != saveme) { - SDL_FreeSurface(surface); + SDL_UnlockSurface(intermediate_surface); + if (intermediate_surface != surface) { + SDL_FreeSurface(intermediate_surface); } } if (freedst && dst) { SDL_RWclose(dst); } - return ((SDL_strcmp(SDL_GetError(), "") == 0) ? 0 : -1); + return (SDL_strcmp(SDL_GetError(), "") == 0) ? 0 : -1; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/SDL_clipboard.c b/modules/SDL2/src/video/SDL_clipboard.c index 41a6e7f..e18668c 100644 --- a/modules/SDL2/src/video/SDL_clipboard.c +++ b/modules/SDL2/src/video/SDL_clipboard.c @@ -23,17 +23,15 @@ #include "SDL_clipboard.h" #include "SDL_sysvideo.h" - -int -SDL_SetClipboardText(const char *text) +int SDL_SetClipboardText(const char *text) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { return SDL_SetError("Video subsystem must be initialized to set clipboard text"); } - if (!text) { + if (text == NULL) { text = ""; } if (_this->SetClipboardText) { @@ -45,16 +43,15 @@ SDL_SetClipboardText(const char *text) } } -int -SDL_SetPrimarySelectionText(const char *text) +int SDL_SetPrimarySelectionText(const char *text) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { return SDL_SetError("Video subsystem must be initialized to set primary selection text"); } - if (!text) { + if (text == NULL) { text = ""; } if (_this->SetPrimarySelectionText) { @@ -66,12 +63,11 @@ SDL_SetPrimarySelectionText(const char *text) } } -char * -SDL_GetClipboardText(void) +char *SDL_GetClipboardText(void) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { SDL_SetError("Video subsystem must be initialized to get clipboard text"); return SDL_strdup(""); } @@ -80,19 +76,18 @@ SDL_GetClipboardText(void) return _this->GetClipboardText(_this); } else { const char *text = _this->clipboard_text; - if (!text) { + if (text == NULL) { text = ""; } return SDL_strdup(text); } } -char * -SDL_GetPrimarySelectionText(void) +char *SDL_GetPrimarySelectionText(void) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { SDL_SetError("Video subsystem must be initialized to get primary selection text"); return SDL_strdup(""); } @@ -101,19 +96,18 @@ SDL_GetPrimarySelectionText(void) return _this->GetPrimarySelectionText(_this); } else { const char *text = _this->primary_selection_text; - if (!text) { + if (text == NULL) { text = ""; } return SDL_strdup(text); } } -SDL_bool -SDL_HasClipboardText(void) +SDL_bool SDL_HasClipboardText(void) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { SDL_SetError("Video subsystem must be initialized to check clipboard text"); return SDL_FALSE; } @@ -129,12 +123,11 @@ SDL_HasClipboardText(void) } } -SDL_bool -SDL_HasPrimarySelectionText(void) +SDL_bool SDL_HasPrimarySelectionText(void) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { + if (_this == NULL) { SDL_SetError("Video subsystem must be initialized to check primary selection text"); return SDL_FALSE; } diff --git a/modules/SDL2/src/video/SDL_egl.c b/modules/SDL2/src/video/SDL_egl.c index 500ee0e..8e5f165 100644 --- a/modules/SDL2/src/video/SDL_egl.c +++ b/modules/SDL2/src/video/SDL_egl.c @@ -1,15 +1,15 @@ /* * Simple DirectMedia Layer * Copyright (C) 1997-2023 Sam Lantinga - * + * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. - * + * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: - * + * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -47,62 +47,62 @@ #ifndef EGL_EXT_pixel_format_float #define EGL_EXT_pixel_format_float -#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 +#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 #define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A #define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B #endif #ifndef EGL_EXT_present_opaque #define EGL_EXT_present_opaque 1 -#define EGL_PRESENT_OPAQUE_EXT 0x31DF +#define EGL_PRESENT_OPAQUE_EXT 0x31DF #endif /* EGL_EXT_present_opaque */ #if SDL_VIDEO_DRIVER_RPI /* Raspbian places the OpenGL ES/EGL binaries in a non standard path */ -#define DEFAULT_EGL ( vc4 ? "libEGL.so.1" : "libbrcmEGL.so" ) -#define DEFAULT_OGL_ES2 ( vc4 ? "libGLESv2.so.2" : "libbrcmGLESv2.so" ) -#define ALT_EGL "libEGL.so" -#define ALT_OGL_ES2 "libGLESv2.so" -#define DEFAULT_OGL_ES_PVR ( vc4 ? "libGLES_CM.so.1" : "libbrcmGLESv2.so" ) -#define DEFAULT_OGL_ES ( vc4 ? "libGLESv1_CM.so.1" : "libbrcmGLESv2.so" ) +#define DEFAULT_EGL (vc4 ? "libEGL.so.1" : "libbrcmEGL.so") +#define DEFAULT_OGL_ES2 (vc4 ? "libGLESv2.so.2" : "libbrcmGLESv2.so") +#define ALT_EGL "libEGL.so" +#define ALT_OGL_ES2 "libGLESv2.so" +#define DEFAULT_OGL_ES_PVR (vc4 ? "libGLES_CM.so.1" : "libbrcmGLESv2.so") +#define DEFAULT_OGL_ES (vc4 ? "libGLESv1_CM.so.1" : "libbrcmGLESv2.so") #elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE /* Android */ -#define DEFAULT_EGL "libEGL.so" -#define DEFAULT_OGL_ES2 "libGLESv2.so" +#define DEFAULT_EGL "libEGL.so" +#define DEFAULT_OGL_ES2 "libGLESv2.so" #define DEFAULT_OGL_ES_PVR "libGLES_CM.so" -#define DEFAULT_OGL_ES "libGLESv1_CM.so" +#define DEFAULT_OGL_ES "libGLESv1_CM.so" #elif SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT /* EGL AND OpenGL ES support via ANGLE */ #define DEFAULT_EGL "libEGL.dll" #define DEFAULT_OGL_ES2 "libGLESv2.dll" #define DEFAULT_OGL_ES_PVR "libGLES_CM.dll" -#define DEFAULT_OGL_ES "libGLESv1_CM.dll" +#define DEFAULT_OGL_ES "libGLESv1_CM.dll" #elif SDL_VIDEO_DRIVER_COCOA /* EGL AND OpenGL ES support via ANGLE */ -#define DEFAULT_EGL "libEGL.dylib" -#define DEFAULT_OGL_ES2 "libGLESv2.dylib" +#define DEFAULT_EGL "libEGL.dylib" +#define DEFAULT_OGL_ES2 "libGLESv2.dylib" #define DEFAULT_OGL_ES_PVR "libGLES_CM.dylib" //??? -#define DEFAULT_OGL_ES "libGLESv1_CM.dylib" //??? +#define DEFAULT_OGL_ES "libGLESv1_CM.dylib" //??? #elif defined(__OpenBSD__) /* OpenBSD */ -#define DEFAULT_OGL "libGL.so" -#define DEFAULT_EGL "libEGL.so" -#define DEFAULT_OGL_ES2 "libGLESv2.so" +#define DEFAULT_OGL "libGL.so" +#define DEFAULT_EGL "libEGL.so" +#define DEFAULT_OGL_ES2 "libGLESv2.so" #define DEFAULT_OGL_ES_PVR "libGLES_CM.so" -#define DEFAULT_OGL_ES "libGLESv1_CM.so" +#define DEFAULT_OGL_ES "libGLESv1_CM.so" #else /* Desktop Linux/Unix-like */ -#define DEFAULT_OGL "libGL.so.1" -#define DEFAULT_EGL "libEGL.so.1" -#define ALT_OGL "libOpenGL.so.0" -#define DEFAULT_OGL_ES2 "libGLESv2.so.2" +#define DEFAULT_OGL "libGL.so.1" +#define DEFAULT_EGL "libEGL.so.1" +#define ALT_OGL "libOpenGL.so.0" +#define DEFAULT_OGL_ES2 "libGLESv2.so.2" #define DEFAULT_OGL_ES_PVR "libGLES_CM.so.1" -#define DEFAULT_OGL_ES "libGLESv1_CM.so.1" +#define DEFAULT_OGL_ES "libGLESv1_CM.so.1" #endif /* SDL_VIDEO_DRIVER_RPI */ #if SDL_VIDEO_OPENGL && !SDL_VIDEO_VITA_PVR_OGL @@ -118,23 +118,24 @@ #if defined(SDL_VIDEO_STATIC_ANGLE) || defined(SDL_VIDEO_DRIVER_VITA) #define LOAD_FUNC(NAME) \ -_this->egl_data->NAME = (void *)NAME; + _this->egl_data->NAME = (void *)NAME; #else -#define LOAD_FUNC(NAME) \ -_this->egl_data->NAME = SDL_LoadFunction(_this->egl_data->egl_dll_handle, #NAME); \ -if (!_this->egl_data->NAME) \ -{ \ - return SDL_SetError("Could not retrieve EGL function " #NAME); \ -} +#define LOAD_FUNC(NAME) \ + _this->egl_data->NAME = SDL_LoadFunction(_this->egl_data->egl_dll_handle, #NAME); \ + if (!_this->egl_data->NAME) { \ + return SDL_SetError("Could not retrieve EGL function " #NAME); \ + } #endif /* it is allowed to not have some of the EGL extensions on start - attempts to use them will fail later. */ #define LOAD_FUNC_EGLEXT(NAME) \ _this->egl_data->NAME = _this->egl_data->eglGetProcAddress(#NAME); -static const char * SDL_EGL_GetErrorName(EGLint eglErrorCode) +static const char *SDL_EGL_GetErrorName(EGLint eglErrorCode) { -#define SDL_EGL_ERROR_TRANSLATE(e) case e: return #e; +#define SDL_EGL_ERROR_TRANSLATE(e) \ + case e: \ + return #e; switch (eglErrorCode) { SDL_EGL_ERROR_TRANSLATE(EGL_SUCCESS); SDL_EGL_ERROR_TRANSLATE(EGL_NOT_INITIALIZED); @@ -155,13 +156,13 @@ static const char * SDL_EGL_GetErrorName(EGLint eglErrorCode) return ""; } -int SDL_EGL_SetErrorEx(const char * message, const char * eglFunctionName, EGLint eglErrorCode) +int SDL_EGL_SetErrorEx(const char *message, const char *eglFunctionName, EGLint eglErrorCode) { - const char * errorText = SDL_EGL_GetErrorName(eglErrorCode); + const char *errorText = SDL_EGL_GetErrorName(eglErrorCode); char altErrorText[32]; if (errorText[0] == '\0') { /* An unknown-to-SDL error code was reported. Report its hexadecimal value, instead of its name. */ - SDL_snprintf(altErrorText, SDL_arraysize(altErrorText), "0x%x", (unsigned int)eglErrorCode); + (void)SDL_snprintf(altErrorText, SDL_arraysize(altErrorText), "0x%x", (unsigned int)eglErrorCode); errorText = altErrorText; } return SDL_SetError("%s (call to %s failed, reporting an error of %s)", message, eglFunctionName, errorText); @@ -241,36 +242,34 @@ SDL_bool SDL_EGL_HasExtension(_THIS, SDL_EGL_ExtensionType type, const char *ext return SDL_FALSE; } -void * -SDL_EGL_GetProcAddress(_THIS, const char *proc) +void *SDL_EGL_GetProcAddress(_THIS, const char *proc) { void *retval = NULL; if (_this->egl_data != NULL) { - const Uint32 eglver = (((Uint32) _this->egl_data->egl_version_major) << 16) | ((Uint32) _this->egl_data->egl_version_minor); - const SDL_bool is_egl_15_or_later = eglver >= ((((Uint32) 1) << 16) | 5); + const Uint32 eglver = (((Uint32)_this->egl_data->egl_version_major) << 16) | ((Uint32)_this->egl_data->egl_version_minor); + const SDL_bool is_egl_15_or_later = eglver >= ((((Uint32)1) << 16) | 5); /* EGL 1.5 can use eglGetProcAddress() for any symbol. 1.4 and earlier can't use it for core entry points. */ - if (!retval && is_egl_15_or_later && _this->egl_data->eglGetProcAddress) { + if (retval == NULL && is_egl_15_or_later && _this->egl_data->eglGetProcAddress) { retval = _this->egl_data->eglGetProcAddress(proc); } - #if !defined(__EMSCRIPTEN__) && !defined(SDL_VIDEO_DRIVER_VITA) /* LoadFunction isn't needed on Emscripten and will call dlsym(), causing other problems. */ +#if !defined(__EMSCRIPTEN__) && !defined(SDL_VIDEO_DRIVER_VITA) /* LoadFunction isn't needed on Emscripten and will call dlsym(), causing other problems. */ /* Try SDL_LoadFunction() first for EGL <= 1.4, or as a fallback for >= 1.5. */ - if (!retval) { + if (retval == NULL) { retval = SDL_LoadFunction(_this->egl_data->opengl_dll_handle, proc); } - #endif +#endif /* Try eglGetProcAddress if we're on <= 1.4 and still searching... */ - if (!retval && !is_egl_15_or_later && _this->egl_data->eglGetProcAddress) { + if (retval == NULL && !is_egl_15_or_later && _this->egl_data->eglGetProcAddress) { retval = _this->egl_data->eglGetProcAddress(proc); } } return retval; } -void -SDL_EGL_UnloadLibrary(_THIS) +void SDL_EGL_UnloadLibrary(_THIS) { if (_this->egl_data) { if (_this->egl_data->egl_display) { @@ -286,14 +285,13 @@ SDL_EGL_UnloadLibrary(_THIS) SDL_UnloadObject(_this->egl_data->opengl_dll_handle); _this->egl_data->opengl_dll_handle = NULL; } - + SDL_free(_this->egl_data); _this->egl_data = NULL; } } -static int -SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) +static int SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) { void *egl_dll_handle = NULL, *opengl_dll_handle = NULL; const char *path = NULL; @@ -316,7 +314,8 @@ SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) if (WIN_IsWindowsVistaOrGreater()) { /* Try the newer d3d compilers first */ const char *d3dcompiler_list[] = { - "d3dcompiler_47.dll", "d3dcompiler_46.dll", + "d3dcompiler_47.dll", + "d3dcompiler_46.dll", }; int i; @@ -368,7 +367,7 @@ SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) #endif } } -#ifdef DEFAULT_OGL +#ifdef DEFAULT_OGL else { path = DEFAULT_OGL; opengl_dll_handle = SDL_LoadObject(path); @@ -379,7 +378,7 @@ SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) } #endif } -#endif +#endif } _this->egl_data->opengl_dll_handle = opengl_dll_handle; @@ -390,7 +389,7 @@ SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) /* Loading libGL* in the previous step took care of loading libEGL.so, but we future proof by double checking */ if (egl_path != NULL) { egl_dll_handle = SDL_LoadObject(egl_path); - } + } /* Try loading a EGL symbol, if it does not work try the default library paths */ if (egl_dll_handle == NULL || SDL_LoadFunction(egl_dll_handle, "eglChooseConfig") == NULL) { if (egl_dll_handle != NULL) { @@ -464,14 +463,13 @@ SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) return 0; } -int -SDL_EGL_LoadLibraryOnly(_THIS, const char *egl_path) +int SDL_EGL_LoadLibraryOnly(_THIS, const char *egl_path) { if (_this->egl_data) { return SDL_SetError("EGL context already created"); } - _this->egl_data = (struct SDL_EGL_VideoData *) SDL_calloc(1, sizeof(SDL_EGL_VideoData)); + _this->egl_data = (struct SDL_EGL_VideoData *)SDL_calloc(1, sizeof(SDL_EGL_VideoData)); if (!_this->egl_data) { return SDL_OutOfMemory(); } @@ -484,8 +482,8 @@ SDL_EGL_LoadLibraryOnly(_THIS, const char *egl_path) return 0; } -static void -SDL_EGL_GetVersion(_THIS) { +static void SDL_EGL_GetVersion(_THIS) +{ if (_this->egl_data->eglQueryString) { const char *egl_version = _this->egl_data->eglQueryString(_this->egl_data->egl_display, EGL_VERSION); if (egl_version) { @@ -500,8 +498,7 @@ SDL_EGL_GetVersion(_THIS) { } } -int -SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_display, EGLenum platform) +int SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_display, EGLenum platform) { int library_load_retcode = SDL_EGL_LoadLibraryOnly(_this, egl_path); if (library_load_retcode != 0) { @@ -570,8 +567,7 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa valid available GPU for EGL to use. */ -int -SDL_EGL_InitializeOffscreen(_THIS, int device) +int SDL_EGL_InitializeOffscreen(_THIS, int device) { void *egl_devices[SDL_EGL_MAX_DEVICES]; EGLint num_egl_devices = 0; @@ -611,8 +607,7 @@ SDL_EGL_InitializeOffscreen(_THIS, int device) if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) { return SDL_SetError("Could not initialize EGL"); } - } - else { + } else { int i; SDL_bool found = SDL_FALSE; EGLDisplay attempted_egl_display; @@ -650,63 +645,64 @@ SDL_EGL_InitializeOffscreen(_THIS, int device) return 0; } -void -SDL_EGL_SetRequiredVisualId(_THIS, int visual_id) +void SDL_EGL_SetRequiredVisualId(_THIS, int visual_id) { - _this->egl_data->egl_required_visual_id=visual_id; + _this->egl_data->egl_required_visual_id = visual_id; } #ifdef DUMP_EGL_CONFIG -#define ATTRIBUTE(_attr) { _attr, #_attr } +#define ATTRIBUTE(_attr) \ + { \ + _attr, #_attr \ + } -typedef struct { +typedef struct +{ EGLint attribute; - char const* name; + char const *name; } Attribute; -static -Attribute all_attributes[] = { - ATTRIBUTE( EGL_BUFFER_SIZE ), - ATTRIBUTE( EGL_ALPHA_SIZE ), - ATTRIBUTE( EGL_BLUE_SIZE ), - ATTRIBUTE( EGL_GREEN_SIZE ), - ATTRIBUTE( EGL_RED_SIZE ), - ATTRIBUTE( EGL_DEPTH_SIZE ), - ATTRIBUTE( EGL_STENCIL_SIZE ), - ATTRIBUTE( EGL_CONFIG_CAVEAT ), - ATTRIBUTE( EGL_CONFIG_ID ), - ATTRIBUTE( EGL_LEVEL ), - ATTRIBUTE( EGL_MAX_PBUFFER_HEIGHT ), - ATTRIBUTE( EGL_MAX_PBUFFER_WIDTH ), - ATTRIBUTE( EGL_MAX_PBUFFER_PIXELS ), - ATTRIBUTE( EGL_NATIVE_RENDERABLE ), - ATTRIBUTE( EGL_NATIVE_VISUAL_ID ), - ATTRIBUTE( EGL_NATIVE_VISUAL_TYPE ), - ATTRIBUTE( EGL_SAMPLES ), - ATTRIBUTE( EGL_SAMPLE_BUFFERS ), - ATTRIBUTE( EGL_SURFACE_TYPE ), - ATTRIBUTE( EGL_TRANSPARENT_TYPE ), - ATTRIBUTE( EGL_TRANSPARENT_BLUE_VALUE ), - ATTRIBUTE( EGL_TRANSPARENT_GREEN_VALUE ), - ATTRIBUTE( EGL_TRANSPARENT_RED_VALUE ), - ATTRIBUTE( EGL_BIND_TO_TEXTURE_RGB ), - ATTRIBUTE( EGL_BIND_TO_TEXTURE_RGBA ), - ATTRIBUTE( EGL_MIN_SWAP_INTERVAL ), - ATTRIBUTE( EGL_MAX_SWAP_INTERVAL ), - ATTRIBUTE( EGL_LUMINANCE_SIZE ), - ATTRIBUTE( EGL_ALPHA_MASK_SIZE ), - ATTRIBUTE( EGL_COLOR_BUFFER_TYPE ), - ATTRIBUTE( EGL_RENDERABLE_TYPE ), - ATTRIBUTE( EGL_MATCH_NATIVE_PIXMAP ), - ATTRIBUTE( EGL_CONFORMANT ), +static Attribute all_attributes[] = { + ATTRIBUTE(EGL_BUFFER_SIZE), + ATTRIBUTE(EGL_ALPHA_SIZE), + ATTRIBUTE(EGL_BLUE_SIZE), + ATTRIBUTE(EGL_GREEN_SIZE), + ATTRIBUTE(EGL_RED_SIZE), + ATTRIBUTE(EGL_DEPTH_SIZE), + ATTRIBUTE(EGL_STENCIL_SIZE), + ATTRIBUTE(EGL_CONFIG_CAVEAT), + ATTRIBUTE(EGL_CONFIG_ID), + ATTRIBUTE(EGL_LEVEL), + ATTRIBUTE(EGL_MAX_PBUFFER_HEIGHT), + ATTRIBUTE(EGL_MAX_PBUFFER_WIDTH), + ATTRIBUTE(EGL_MAX_PBUFFER_PIXELS), + ATTRIBUTE(EGL_NATIVE_RENDERABLE), + ATTRIBUTE(EGL_NATIVE_VISUAL_ID), + ATTRIBUTE(EGL_NATIVE_VISUAL_TYPE), + ATTRIBUTE(EGL_SAMPLES), + ATTRIBUTE(EGL_SAMPLE_BUFFERS), + ATTRIBUTE(EGL_SURFACE_TYPE), + ATTRIBUTE(EGL_TRANSPARENT_TYPE), + ATTRIBUTE(EGL_TRANSPARENT_BLUE_VALUE), + ATTRIBUTE(EGL_TRANSPARENT_GREEN_VALUE), + ATTRIBUTE(EGL_TRANSPARENT_RED_VALUE), + ATTRIBUTE(EGL_BIND_TO_TEXTURE_RGB), + ATTRIBUTE(EGL_BIND_TO_TEXTURE_RGBA), + ATTRIBUTE(EGL_MIN_SWAP_INTERVAL), + ATTRIBUTE(EGL_MAX_SWAP_INTERVAL), + ATTRIBUTE(EGL_LUMINANCE_SIZE), + ATTRIBUTE(EGL_ALPHA_MASK_SIZE), + ATTRIBUTE(EGL_COLOR_BUFFER_TYPE), + ATTRIBUTE(EGL_RENDERABLE_TYPE), + ATTRIBUTE(EGL_MATCH_NATIVE_PIXMAP), + ATTRIBUTE(EGL_CONFORMANT), }; - static void dumpconfig(_THIS, EGLConfig config) { int attr; - for (attr = 0 ; attregl_data->eglGetConfigAttrib(_this->egl_data->egl_display, config, all_attributes[attr].attribute, &value); SDL_Log("\t%-32s: %10d (0x%08x)\n", all_attributes[attr].name, value, value); @@ -715,8 +711,7 @@ static void dumpconfig(_THIS, EGLConfig config) #endif /* DUMP_EGL_CONFIG */ -static int -SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) +static int SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) { /* 64 seems nice. */ EGLint attribs[64]; @@ -789,7 +784,7 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) attribs[i++] = EGL_OPENGL_ES3_BIT_KHR; } else #endif - if (_this->gl_config.major_version >= 2) { + if (_this->gl_config.major_version >= 2) { attribs[i++] = EGL_OPENGL_ES2_BIT; } else { attribs[i++] = EGL_OPENGL_ES_BIT; @@ -810,21 +805,20 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) SDL_assert(i < SDL_arraysize(attribs)); if (_this->egl_data->eglChooseConfig(_this->egl_data->egl_display, - attribs, - configs, SDL_arraysize(configs), - &found_configs) == EGL_FALSE || + attribs, + configs, SDL_arraysize(configs), + &found_configs) == EGL_FALSE || found_configs == 0) { return -1; } /* first ensure that a found config has a matching format, or the function will fall through. */ - if (_this->egl_data->egl_required_visual_id) - { - for (i = 0; i < found_configs; i++ ) { + if (_this->egl_data->egl_required_visual_id) { + for (i = 0; i < found_configs; i++) { EGLint format; _this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, - configs[i], - EGL_NATIVE_VISUAL_ID, &format); + configs[i], + EGL_NATIVE_VISUAL_ID, &format); if (_this->egl_data->egl_required_visual_id == format) { has_matching_format = SDL_TRUE; break; @@ -835,15 +829,15 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) /* eglChooseConfig returns a number of configurations that match or exceed the requested attribs. */ /* From those, we select the one that matches our requirements more closely via a makeshift algorithm */ - for (i = 0; i < found_configs; i++ ) { + for (i = 0; i < found_configs; i++) { SDL_bool is_truecolor = SDL_FALSE; int bitdiff = 0; if (has_matching_format && _this->egl_data->egl_required_visual_id) { EGLint format; _this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, - configs[i], - EGL_NATIVE_VISUAL_ID, &format); + configs[i], + EGL_NATIVE_VISUAL_ID, &format); if (_this->egl_data->egl_required_visual_id != format) { continue; } @@ -862,16 +856,15 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) for (j = 0; j < SDL_arraysize(attribs) - 1; j += 2) { if (attribs[j] == EGL_NONE) { - break; + break; } - if ( attribs[j+1] != EGL_DONT_CARE && ( - attribs[j] == EGL_RED_SIZE || - attribs[j] == EGL_GREEN_SIZE || - attribs[j] == EGL_BLUE_SIZE || - attribs[j] == EGL_ALPHA_SIZE || - attribs[j] == EGL_DEPTH_SIZE || - attribs[j] == EGL_STENCIL_SIZE)) { + if (attribs[j + 1] != EGL_DONT_CARE && (attribs[j] == EGL_RED_SIZE || + attribs[j] == EGL_GREEN_SIZE || + attribs[j] == EGL_BLUE_SIZE || + attribs[j] == EGL_ALPHA_SIZE || + attribs[j] == EGL_DEPTH_SIZE || + attribs[j] == EGL_STENCIL_SIZE)) { _this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, configs[i], attribs[j], &value); bitdiff += value - attribs[j + 1]; /* value is always >= attrib */ } @@ -888,8 +881,8 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) } } - #define FAVOR_TRUECOLOR 1 - #if FAVOR_TRUECOLOR +#define FAVOR_TRUECOLOR 1 +#if FAVOR_TRUECOLOR /* Some apps request a low color depth, either because they _assume_ they'll get a larger one but don't want to fail if only smaller ones are available, or they just never called SDL_GL_SetAttribute at all and @@ -902,12 +895,12 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) on small hardware that all expected to actually get 16-bit color. In this case, turn off FAVOR_TRUECOLOR (and maybe send a patch to make this more flexible). */ - if ( ((_this->gl_config.red_size + _this->gl_config.blue_size + _this->gl_config.green_size) <= 16) ) { + if (((_this->gl_config.red_size + _this->gl_config.blue_size + _this->gl_config.green_size) <= 16)) { if (truecolor_config_idx != -1) { _this->egl_data->egl_config = configs[truecolor_config_idx]; } } - #endif +#endif #ifdef DUMP_EGL_CONFIG dumpconfig(_this, _this->egl_data->egl_config); @@ -916,8 +909,7 @@ SDL_EGL_PrivateChooseConfig(_THIS, SDL_bool set_config_caveat_none) return 0; } -int -SDL_EGL_ChooseConfig(_THIS) +int SDL_EGL_ChooseConfig(_THIS) { int ret; @@ -941,8 +933,7 @@ SDL_EGL_ChooseConfig(_THIS) return SDL_EGL_SetError("Couldn't find matching EGL config", "eglChooseConfig"); } -SDL_GLContext -SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) +SDL_GLContext SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) { /* max 14 values plus terminator. */ EGLint attribs[15]; @@ -964,7 +955,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) } #if SDL_VIDEO_DRIVER_ANDROID - if ((_this->gl_config.flags & SDL_GL_CONTEXT_DEBUG_FLAG) != 0) { + if (_this->gl_config.flags & SDL_GL_CONTEXT_DEBUG_FLAG) { /* If SDL_GL_CONTEXT_DEBUG_FLAG is set but EGL_KHR_debug unsupported, unset. * This is required because some Android devices like to complain about it * by "silently" failing, logging a hint which could be easily overlooked: @@ -1045,8 +1036,8 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) _this->egl_data->eglBindAPI(_this->egl_data->apitype); egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display, - _this->egl_data->egl_config, - share_context, attribs); + _this->egl_data->egl_config, + share_context, attribs); if (egl_context == EGL_NO_CONTEXT) { SDL_EGL_SetError("Could not create EGL context", "eglCreateContext"); @@ -1066,8 +1057,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) * or later, or if the EGL_KHR_surfaceless_context extension is present. */ if ((_this->egl_data->egl_version_major > 1) || ((_this->egl_data->egl_version_major == 1) && (_this->egl_data->egl_version_minor >= 5)) || - SDL_EGL_HasExtension(_this, SDL_EGL_DISPLAY_EXTENSION, "EGL_KHR_surfaceless_context")) - { + SDL_EGL_HasExtension(_this, SDL_EGL_DISPLAY_EXTENSION, "EGL_KHR_surfaceless_context")) { /* Secondary condition: The client API must support it. */ if (profile_es) { /* On OpenGL ES, the GL_OES_surfaceless_context extension must be @@ -1078,7 +1068,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) #if SDL_VIDEO_OPENGL && !defined(SDL_VIDEO_DRIVER_VITA) } else { /* Desktop OpenGL supports it by default from version 3.0 on. */ - void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params); + void(APIENTRY * glGetIntegervFunc)(GLenum pname, GLint * params); glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv"); if (glGetIntegervFunc) { GLint v = 0; @@ -1091,13 +1081,12 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) } } - return (SDL_GLContext) egl_context; + return (SDL_GLContext)egl_context; } -int -SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context) +int SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context) { - EGLContext egl_context = (EGLContext) context; + EGLContext egl_context = (EGLContext)context; if (!_this->egl_data) { return SDL_SetError("EGL not initialized"); @@ -1108,7 +1097,7 @@ SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context) /* Can't do the nothing there is to do? Probably trying to cleanup a failed startup, just return. */ return 0; } else { - return SDL_SetError("EGL not initialized"); /* something clearly went wrong somewhere. */ + return SDL_SetError("EGL not initialized"); /* something clearly went wrong somewhere. */ } } @@ -1117,14 +1106,14 @@ SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context) _this->egl_data->eglBindAPI(_this->egl_data->apitype); } - /* The android emulator crashes badly if you try to eglMakeCurrent + /* The android emulator crashes badly if you try to eglMakeCurrent * with a valid context and invalid surface, so we have to check for both here. */ if (!egl_context || (!egl_surface && !_this->gl_allow_no_surface)) { - _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); } else { if (!_this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, - egl_surface, egl_surface, egl_context)) { + egl_surface, egl_surface, egl_context)) { return SDL_EGL_SetError("Unable to make EGL context current", "eglMakeCurrent"); } } @@ -1132,11 +1121,10 @@ SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context) return 0; } -int -SDL_EGL_SetSwapInterval(_THIS, int interval) +int SDL_EGL_SetSwapInterval(_THIS, int interval) { EGLBoolean status; - + if (!_this->egl_data) { return SDL_SetError("EGL not initialized"); } @@ -1147,29 +1135,27 @@ SDL_EGL_SetSwapInterval(_THIS, int interval) if (interval < 0) { return SDL_SetError("Late swap tearing currently unsupported"); } - + status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval); if (status == EGL_TRUE) { _this->egl_data->egl_swapinterval = interval; return 0; } - + return SDL_EGL_SetError("Unable to set the EGL swap interval", "eglSwapInterval"); } -int -SDL_EGL_GetSwapInterval(_THIS) +int SDL_EGL_GetSwapInterval(_THIS) { if (!_this->egl_data) { SDL_SetError("EGL not initialized"); return 0; } - + return _this->egl_data->egl_swapinterval; } -int -SDL_EGL_SwapBuffers(_THIS, EGLSurface egl_surface) +int SDL_EGL_SwapBuffers(_THIS, EGLSurface egl_surface) { if (!_this->egl_data->eglSwapBuffers(_this->egl_data->egl_display, egl_surface)) { return SDL_EGL_SetError("unable to show color buffer in an OS-native window", "eglSwapBuffers"); @@ -1177,24 +1163,21 @@ SDL_EGL_SwapBuffers(_THIS, EGLSurface egl_surface) return 0; } -void -SDL_EGL_DeleteContext(_THIS, SDL_GLContext context) +void SDL_EGL_DeleteContext(_THIS, SDL_GLContext context) { - EGLContext egl_context = (EGLContext) context; + EGLContext egl_context = (EGLContext)context; /* Clean up GLES and EGL */ if (!_this->egl_data) { return; } - + if (egl_context != NULL && egl_context != EGL_NO_CONTEXT) { _this->egl_data->eglDestroyContext(_this->egl_data->egl_display, egl_context); } - } -EGLSurface * -SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) +EGLSurface *SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) { #if SDL_VIDEO_DRIVER_ANDROID EGLint format_wanted; @@ -1204,7 +1187,7 @@ SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) EGLint attribs[5]; int attr = 0; - EGLSurface * surface; + EGLSurface *surface; if (SDL_EGL_ChooseConfig(_this) != 0) { return EGL_NO_SURFACE; @@ -1214,8 +1197,8 @@ SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) /* On Android, EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is * guaranteed to be accepted by ANativeWindow_setBuffersGeometry(). */ _this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, - _this->egl_data->egl_config, - EGL_NATIVE_VISUAL_ID, &format_wanted); + _this->egl_data->egl_config, + EGL_NATIVE_VISUAL_ID, &format_wanted); /* Format based on selected egl config. */ ANativeWindow_setBuffersGeometry(nw, 0, 0, format_wanted); @@ -1243,11 +1226,11 @@ SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) #endif attribs[attr++] = EGL_NONE; - + surface = _this->egl_data->eglCreateWindowSurface( - _this->egl_data->egl_display, - _this->egl_data->egl_config, - nw, &attribs[0]); + _this->egl_data->egl_display, + _this->egl_data->egl_config, + nw, &attribs[0]); if (surface == EGL_NO_SURFACE) { SDL_EGL_SetError("unable to create an EGL window surface", "eglCreateWindowSurface"); } @@ -1281,13 +1264,12 @@ SDL_EGL_CreateOffscreenSurface(_THIS, int width, int height) attributes); } -void -SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface) +void SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface) { if (!_this->egl_data) { return; } - + if (egl_surface != EGL_NO_SURFACE) { _this->egl_data->eglDestroySurface(_this->egl_data->egl_display, egl_surface); } @@ -1296,4 +1278,3 @@ SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface) #endif /* SDL_VIDEO_OPENGL_EGL */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/SDL_egl_c.h b/modules/SDL2/src/video/SDL_egl_c.h index 68dbd6d..feb889a 100644 --- a/modules/SDL2/src/video/SDL_egl_c.h +++ b/modules/SDL2/src/video/SDL_egl_c.h @@ -29,7 +29,7 @@ #include "SDL_sysvideo.h" -#define SDL_EGL_MAX_DEVICES 8 +#define SDL_EGL_MAX_DEVICES 8 typedef struct SDL_EGL_VideoData { @@ -119,7 +119,8 @@ typedef struct SDL_EGL_VideoData } SDL_EGL_VideoData; /* OpenGLES functions */ -typedef enum SDL_EGL_ExtensionType { +typedef enum SDL_EGL_ExtensionType +{ SDL_EGL_DISPLAY_EXTENSION, SDL_EGL_CLIENT_EXTENSION } SDL_EGL_ExtensionType; @@ -152,28 +153,31 @@ extern int SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext cont extern int SDL_EGL_SwapBuffers(_THIS, EGLSurface egl_surface); /* SDL Error-reporting */ -extern int SDL_EGL_SetErrorEx(const char * message, const char * eglFunctionName, EGLint eglErrorCode); +extern int SDL_EGL_SetErrorEx(const char *message, const char *eglFunctionName, EGLint eglErrorCode); #define SDL_EGL_SetError(message, eglFunctionName) SDL_EGL_SetErrorEx(message, eglFunctionName, _this->egl_data->eglGetError()) /* A few of useful macros */ -#define SDL_EGL_SwapWindow_impl(BACKEND) int \ -BACKEND ## _GLES_SwapWindow(_THIS, SDL_Window * window) \ -{\ - return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);\ -} - -#define SDL_EGL_MakeCurrent_impl(BACKEND) int \ -BACKEND ## _GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) \ -{\ - return SDL_EGL_MakeCurrent(_this, window ? ((SDL_WindowData *) window->driverdata)->egl_surface : EGL_NO_SURFACE, context);\ -} - -#define SDL_EGL_CreateContext_impl(BACKEND) SDL_GLContext \ -BACKEND ## _GLES_CreateContext(_THIS, SDL_Window * window) \ -{\ - return SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);\ -} +#define SDL_EGL_SwapWindow_impl(BACKEND) \ + int \ + BACKEND##_GLES_SwapWindow(_THIS, SDL_Window *window) \ + { \ + return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); \ + } + +#define SDL_EGL_MakeCurrent_impl(BACKEND) \ + int \ + BACKEND##_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) \ + { \ + return SDL_EGL_MakeCurrent(_this, window ? ((SDL_WindowData *)window->driverdata)->egl_surface : EGL_NO_SURFACE, context); \ + } + +#define SDL_EGL_CreateContext_impl(BACKEND) \ + SDL_GLContext \ + BACKEND##_GLES_CreateContext(_THIS, SDL_Window *window) \ + { \ + return SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); \ + } #endif /* SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/SDL_fillrect.c b/modules/SDL2/src/video/SDL_fillrect.c index 78de4c8..5687fb9 100644 --- a/modules/SDL2/src/video/SDL_fillrect.c +++ b/modules/SDL2/src/video/SDL_fillrect.c @@ -24,7 +24,6 @@ #include "SDL_blit.h" #include "SDL_cpuinfo.h" - #ifdef __SSE__ /* *INDENT-OFF* */ /* clang-format off */ @@ -58,8 +57,7 @@ #define SSE_END #define DEFINE_SSE_FILLRECT(bpp, type) \ -static void \ -SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \ +static void SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \ { \ int i, n; \ Uint8 *p = NULL; \ @@ -96,8 +94,7 @@ SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \ SSE_END; \ } -static void -SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +static void SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) { int i, n; @@ -129,28 +126,29 @@ DEFINE_SSE_FILLRECT(2, Uint16) DEFINE_SSE_FILLRECT(4, Uint32) /* *INDENT-ON* */ /* clang-format on */ -#endif /* __SSE__ */ +#endif /* __SSE__ */ -static void -SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h) +static void SDL_FillRect1(Uint8 *pixels, int pitch, Uint32 color, int w, int h) { int n; Uint8 *p = NULL; - + while (h--) { n = w; p = pixels; if (n > 3) { - switch ((uintptr_t) p & 3) { + switch ((uintptr_t)p & 3) { case 1: - *p++ = (Uint8) color; - --n; SDL_FALLTHROUGH; + *p++ = (Uint8)color; + --n; + SDL_FALLTHROUGH; case 2: - *p++ = (Uint8) color; - --n; SDL_FALLTHROUGH; + *p++ = (Uint8)color; + --n; + SDL_FALLTHROUGH; case 3: - *p++ = (Uint8) color; + *p++ = (Uint8)color; --n; } SDL_memset4(p, color, (n >> 2)); @@ -159,52 +157,52 @@ SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h) p += (n & ~3); switch (n & 3) { case 3: - *p++ = (Uint8) color; SDL_FALLTHROUGH; + *p++ = (Uint8)color; + SDL_FALLTHROUGH; case 2: - *p++ = (Uint8) color; SDL_FALLTHROUGH; + *p++ = (Uint8)color; + SDL_FALLTHROUGH; case 1: - *p++ = (Uint8) color; + *p++ = (Uint8)color; } } pixels += pitch; } } -static void -SDL_FillRect2(Uint8 * pixels, int pitch, Uint32 color, int w, int h) +static void SDL_FillRect2(Uint8 *pixels, int pitch, Uint32 color, int w, int h) { int n; Uint16 *p = NULL; - + while (h--) { n = w; - p = (Uint16 *) pixels; + p = (Uint16 *)pixels; if (n > 1) { - if ((uintptr_t) p & 2) { - *p++ = (Uint16) color; + if ((uintptr_t)p & 2) { + *p++ = (Uint16)color; --n; } SDL_memset4(p, color, (n >> 1)); } if (n & 1) { - p[n - 1] = (Uint16) color; + p[n - 1] = (Uint16)color; } pixels += pitch; } } -static void -SDL_FillRect3(Uint8 * pixels, int pitch, Uint32 color, int w, int h) +static void SDL_FillRect3(Uint8 *pixels, int pitch, Uint32 color, int w, int h) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN - Uint8 b1 = (Uint8) (color & 0xFF); - Uint8 b2 = (Uint8) ((color >> 8) & 0xFF); - Uint8 b3 = (Uint8) ((color >> 16) & 0xFF); + Uint8 b1 = (Uint8)(color & 0xFF); + Uint8 b2 = (Uint8)((color >> 8) & 0xFF); + Uint8 b3 = (Uint8)((color >> 16) & 0xFF); #elif SDL_BYTEORDER == SDL_BIG_ENDIAN - Uint8 b1 = (Uint8) ((color >> 16) & 0xFF); - Uint8 b2 = (Uint8) ((color >> 8) & 0xFF); - Uint8 b3 = (Uint8) (color & 0xFF); + Uint8 b1 = (Uint8)((color >> 16) & 0xFF); + Uint8 b2 = (Uint8)((color >> 8) & 0xFF); + Uint8 b3 = (Uint8)(color & 0xFF); #endif int n; Uint8 *p = NULL; @@ -222,8 +220,7 @@ SDL_FillRect3(Uint8 * pixels, int pitch, Uint32 color, int w, int h) } } -static void -SDL_FillRect4(Uint8 * pixels, int pitch, Uint32 color, int w, int h) +static void SDL_FillRect4(Uint8 *pixels, int pitch, Uint32 color, int w, int h) { while (h--) { SDL_memset4(pixels, color, w); @@ -231,18 +228,17 @@ SDL_FillRect4(Uint8 * pixels, int pitch, Uint32 color, int w, int h) } } -/* +/* * This function performs a fast fill of the given rectangle with 'color' */ -int -SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) +int SDL_FillRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color) { - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_FillRect(): dst"); } /* If 'rect' == NULL, then fill the whole surface */ - if (!rect) { + if (rect == NULL) { rect = &dst->clip_rect; /* Don't attempt to fill if the surface's clip_rect is empty */ if (SDL_RectEmpty(rect)) { @@ -258,18 +254,21 @@ void FillRect8ARMNEONAsm(int32_t w, int32_t h, uint8_t *dst, int32_t dst_stride, void FillRect16ARMNEONAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint16_t src); void FillRect32ARMNEONAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t src); -static void fill_8_neon(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect8ARMNEONAsm(w, h, (uint8_t *) pixels, pitch >> 0, color); +static void fill_8_neon(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect8ARMNEONAsm(w, h, (uint8_t *)pixels, pitch >> 0, color); return; } -static void fill_16_neon(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect16ARMNEONAsm(w, h, (uint16_t *) pixels, pitch >> 1, color); +static void fill_16_neon(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect16ARMNEONAsm(w, h, (uint16_t *)pixels, pitch >> 1, color); return; } -static void fill_32_neon(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect32ARMNEONAsm(w, h, (uint32_t *) pixels, pitch >> 2, color); +static void fill_32_neon(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect32ARMNEONAsm(w, h, (uint32_t *)pixels, pitch >> 2, color); return; } #endif @@ -279,33 +278,35 @@ void FillRect8ARMSIMDAsm(int32_t w, int32_t h, uint8_t *dst, int32_t dst_stride, void FillRect16ARMSIMDAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint16_t src); void FillRect32ARMSIMDAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t src); -static void fill_8_simd(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect8ARMSIMDAsm(w, h, (uint8_t *) pixels, pitch >> 0, color); +static void fill_8_simd(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect8ARMSIMDAsm(w, h, (uint8_t *)pixels, pitch >> 0, color); return; } -static void fill_16_simd(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect16ARMSIMDAsm(w, h, (uint16_t *) pixels, pitch >> 1, color); +static void fill_16_simd(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect16ARMSIMDAsm(w, h, (uint16_t *)pixels, pitch >> 1, color); return; } -static void fill_32_simd(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { - FillRect32ARMSIMDAsm(w, h, (uint32_t *) pixels, pitch >> 2, color); +static void fill_32_simd(Uint8 *pixels, int pitch, Uint32 color, int w, int h) +{ + FillRect32ARMSIMDAsm(w, h, (uint32_t *)pixels, pitch >> 2, color); return; } #endif -int -SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, - Uint32 color) +int SDL_FillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, + Uint32 color) { SDL_Rect clipped; Uint8 *pixels; - const SDL_Rect* rect; + const SDL_Rect *rect; void (*fill_function)(Uint8 * pixels, int pitch, Uint32 color, int w, int h) = NULL; int i; - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("SDL_FillRects(): dst"); } @@ -319,7 +320,7 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, return SDL_SetError("SDL_FillRects(): You must lock the surface"); } - if (!rects) { + if (rects == NULL) { return SDL_InvalidParamError("SDL_FillRects(): rects"); } @@ -331,8 +332,8 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, const SDL_Rect *r = &rects[0]; if (r->x == 0 && r->y == 0 && r->w == dst->w && r->h == dst->h) { if (dst->format->BitsPerPixel == 4) { - Uint8 b = (((Uint8) color << 4) | (Uint8) color); - SDL_memset(dst->pixels, b, dst->h * dst->pitch); + Uint8 b = (((Uint8)color << 4) | (Uint8)color); + SDL_memset(dst->pixels, b, (size_t)dst->h * dst->pitch); return 1; } } @@ -374,31 +375,31 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, if (fill_function == NULL) { switch (dst->format->BytesPerPixel) { case 1: - { - color |= (color << 8); - color |= (color << 16); + { + color |= (color << 8); + color |= (color << 16); #ifdef __SSE__ - if (SDL_HasSSE()) { - fill_function = SDL_FillRect1SSE; - break; - } -#endif - fill_function = SDL_FillRect1; + if (SDL_HasSSE()) { + fill_function = SDL_FillRect1SSE; break; } +#endif + fill_function = SDL_FillRect1; + break; + } case 2: - { - color |= (color << 16); + { + color |= (color << 16); #ifdef __SSE__ - if (SDL_HasSSE()) { - fill_function = SDL_FillRect2SSE; - break; - } -#endif - fill_function = SDL_FillRect2; + if (SDL_HasSSE()) { + fill_function = SDL_FillRect2SSE; break; } +#endif + fill_function = SDL_FillRect2; + break; + } case 3: /* 24-bit RGB is a slow path, at least for now. */ @@ -408,16 +409,16 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, } case 4: - { + { #ifdef __SSE__ - if (SDL_HasSSE()) { - fill_function = SDL_FillRect4SSE; - break; - } -#endif - fill_function = SDL_FillRect4; + if (SDL_HasSSE()) { + fill_function = SDL_FillRect4SSE; break; } +#endif + fill_function = SDL_FillRect4; + break; + } default: return SDL_SetError("Unsupported pixel format"); @@ -432,8 +433,8 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count, } rect = &clipped; - pixels = (Uint8 *) dst->pixels + rect->y * dst->pitch + - rect->x * dst->format->BytesPerPixel; + pixels = (Uint8 *)dst->pixels + rect->y * dst->pitch + + rect->x * dst->format->BytesPerPixel; fill_function(pixels, dst->pitch, color, rect->w, rect->h); } diff --git a/modules/SDL2/src/video/SDL_pixels.c b/modules/SDL2/src/video/SDL_pixels.c index 088a66e..65e33ab 100644 --- a/modules/SDL2/src/video/SDL_pixels.c +++ b/modules/SDL2/src/video/SDL_pixels.c @@ -30,46 +30,45 @@ #include "SDL_RLEaccel_c.h" #include "../SDL_list.h" - /* Lookup tables to expand partial bytes to the full 0..255 range */ static Uint8 lookup_0[] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 }; static Uint8 lookup_1[] = { -0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 255 + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 255 }; static Uint8 lookup_2[] = { -0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 255 + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 255 }; static Uint8 lookup_3[] = { -0, 8, 16, 24, 32, 41, 49, 57, 65, 74, 82, 90, 98, 106, 115, 123, 131, 139, 148, 156, 164, 172, 180, 189, 197, 205, 213, 222, 230, 238, 246, 255 + 0, 8, 16, 24, 32, 41, 49, 57, 65, 74, 82, 90, 98, 106, 115, 123, 131, 139, 148, 156, 164, 172, 180, 189, 197, 205, 213, 222, 230, 238, 246, 255 }; static Uint8 lookup_4[] = { -0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255 + 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255 }; static Uint8 lookup_5[] = { -0, 36, 72, 109, 145, 182, 218, 255 + 0, 36, 72, 109, 145, 182, 218, 255 }; static Uint8 lookup_6[] = { -0, 85, 170, 255 + 0, 85, 170, 255 }; static Uint8 lookup_7[] = { -0, 255 + 0, 255 }; static Uint8 lookup_8[] = { -255 + 255 }; -Uint8* SDL_expand_byte[9] = { +Uint8 *SDL_expand_byte[9] = { lookup_0, lookup_1, lookup_2, @@ -83,59 +82,61 @@ Uint8* SDL_expand_byte[9] = { /* Helper functions */ -const char* -SDL_GetPixelFormatName(Uint32 format) +#define CASE(X) \ + case X: \ + return #X; +const char *SDL_GetPixelFormatName(Uint32 format) { switch (format) { -#define CASE(X) case X: return #X; - CASE(SDL_PIXELFORMAT_INDEX1LSB) - CASE(SDL_PIXELFORMAT_INDEX1MSB) - CASE(SDL_PIXELFORMAT_INDEX4LSB) - CASE(SDL_PIXELFORMAT_INDEX4MSB) - CASE(SDL_PIXELFORMAT_INDEX8) - CASE(SDL_PIXELFORMAT_RGB332) - CASE(SDL_PIXELFORMAT_RGB444) - CASE(SDL_PIXELFORMAT_BGR444) - CASE(SDL_PIXELFORMAT_RGB555) - CASE(SDL_PIXELFORMAT_BGR555) - CASE(SDL_PIXELFORMAT_ARGB4444) - CASE(SDL_PIXELFORMAT_RGBA4444) - CASE(SDL_PIXELFORMAT_ABGR4444) - CASE(SDL_PIXELFORMAT_BGRA4444) - CASE(SDL_PIXELFORMAT_ARGB1555) - CASE(SDL_PIXELFORMAT_RGBA5551) - CASE(SDL_PIXELFORMAT_ABGR1555) - CASE(SDL_PIXELFORMAT_BGRA5551) - CASE(SDL_PIXELFORMAT_RGB565) - CASE(SDL_PIXELFORMAT_BGR565) - CASE(SDL_PIXELFORMAT_RGB24) - CASE(SDL_PIXELFORMAT_BGR24) - CASE(SDL_PIXELFORMAT_RGB888) - CASE(SDL_PIXELFORMAT_RGBX8888) - CASE(SDL_PIXELFORMAT_BGR888) - CASE(SDL_PIXELFORMAT_BGRX8888) - CASE(SDL_PIXELFORMAT_ARGB8888) - CASE(SDL_PIXELFORMAT_RGBA8888) - CASE(SDL_PIXELFORMAT_ABGR8888) - CASE(SDL_PIXELFORMAT_BGRA8888) - CASE(SDL_PIXELFORMAT_ARGB2101010) - CASE(SDL_PIXELFORMAT_YV12) - CASE(SDL_PIXELFORMAT_IYUV) - CASE(SDL_PIXELFORMAT_YUY2) - CASE(SDL_PIXELFORMAT_UYVY) - CASE(SDL_PIXELFORMAT_YVYU) - CASE(SDL_PIXELFORMAT_NV12) - CASE(SDL_PIXELFORMAT_NV21) - CASE(SDL_PIXELFORMAT_EXTERNAL_OES) -#undef CASE + + CASE(SDL_PIXELFORMAT_INDEX1LSB) + CASE(SDL_PIXELFORMAT_INDEX1MSB) + CASE(SDL_PIXELFORMAT_INDEX4LSB) + CASE(SDL_PIXELFORMAT_INDEX4MSB) + CASE(SDL_PIXELFORMAT_INDEX8) + CASE(SDL_PIXELFORMAT_RGB332) + CASE(SDL_PIXELFORMAT_RGB444) + CASE(SDL_PIXELFORMAT_BGR444) + CASE(SDL_PIXELFORMAT_RGB555) + CASE(SDL_PIXELFORMAT_BGR555) + CASE(SDL_PIXELFORMAT_ARGB4444) + CASE(SDL_PIXELFORMAT_RGBA4444) + CASE(SDL_PIXELFORMAT_ABGR4444) + CASE(SDL_PIXELFORMAT_BGRA4444) + CASE(SDL_PIXELFORMAT_ARGB1555) + CASE(SDL_PIXELFORMAT_RGBA5551) + CASE(SDL_PIXELFORMAT_ABGR1555) + CASE(SDL_PIXELFORMAT_BGRA5551) + CASE(SDL_PIXELFORMAT_RGB565) + CASE(SDL_PIXELFORMAT_BGR565) + CASE(SDL_PIXELFORMAT_RGB24) + CASE(SDL_PIXELFORMAT_BGR24) + CASE(SDL_PIXELFORMAT_RGB888) + CASE(SDL_PIXELFORMAT_RGBX8888) + CASE(SDL_PIXELFORMAT_BGR888) + CASE(SDL_PIXELFORMAT_BGRX8888) + CASE(SDL_PIXELFORMAT_ARGB8888) + CASE(SDL_PIXELFORMAT_RGBA8888) + CASE(SDL_PIXELFORMAT_ABGR8888) + CASE(SDL_PIXELFORMAT_BGRA8888) + CASE(SDL_PIXELFORMAT_ARGB2101010) + CASE(SDL_PIXELFORMAT_YV12) + CASE(SDL_PIXELFORMAT_IYUV) + CASE(SDL_PIXELFORMAT_YUY2) + CASE(SDL_PIXELFORMAT_UYVY) + CASE(SDL_PIXELFORMAT_YVYU) + CASE(SDL_PIXELFORMAT_NV12) + CASE(SDL_PIXELFORMAT_NV21) + CASE(SDL_PIXELFORMAT_EXTERNAL_OES) + default: return "SDL_PIXELFORMAT_UNKNOWN"; } } +#undef CASE -SDL_bool -SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, - Uint32 * Gmask, Uint32 * Bmask, Uint32 * Amask) +SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask, + Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask) { Uint32 masks[4]; @@ -292,9 +293,7 @@ SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, return SDL_TRUE; } -Uint32 -SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, - Uint32 Amask) +Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) { switch (bpp) { case 1: @@ -502,8 +501,7 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, static SDL_PixelFormat *formats; static SDL_SpinLock formats_lock = 0; -SDL_PixelFormat * -SDL_AllocFormat(Uint32 pixel_format) +SDL_PixelFormat *SDL_AllocFormat(Uint32 pixel_format) { SDL_PixelFormat *format; @@ -528,7 +526,6 @@ SDL_AllocFormat(Uint32 pixel_format) if (SDL_InitFormat(format, pixel_format) < 0) { SDL_AtomicUnlock(&formats_lock); SDL_free(format); - SDL_InvalidParamError("format"); return NULL; } @@ -543,8 +540,7 @@ SDL_AllocFormat(Uint32 pixel_format) return format; } -int -SDL_InitFormat(SDL_PixelFormat * format, Uint32 pixel_format) +int SDL_InitFormat(SDL_PixelFormat *format, Uint32 pixel_format) { int bpp; Uint32 Rmask, Gmask, Bmask, Amask; @@ -565,40 +561,48 @@ SDL_InitFormat(SDL_PixelFormat * format, Uint32 pixel_format) format->Rshift = 0; format->Rloss = 8; if (Rmask) { - for (mask = Rmask; !(mask & 0x01); mask >>= 1) + for (mask = Rmask; !(mask & 0x01); mask >>= 1) { ++format->Rshift; - for (; (mask & 0x01); mask >>= 1) + } + for (; (mask & 0x01); mask >>= 1) { --format->Rloss; + } } format->Gmask = Gmask; format->Gshift = 0; format->Gloss = 8; if (Gmask) { - for (mask = Gmask; !(mask & 0x01); mask >>= 1) + for (mask = Gmask; !(mask & 0x01); mask >>= 1) { ++format->Gshift; - for (; (mask & 0x01); mask >>= 1) + } + for (; (mask & 0x01); mask >>= 1) { --format->Gloss; + } } format->Bmask = Bmask; format->Bshift = 0; format->Bloss = 8; if (Bmask) { - for (mask = Bmask; !(mask & 0x01); mask >>= 1) + for (mask = Bmask; !(mask & 0x01); mask >>= 1) { ++format->Bshift; - for (; (mask & 0x01); mask >>= 1) + } + for (; (mask & 0x01); mask >>= 1) { --format->Bloss; + } } format->Amask = Amask; format->Ashift = 0; format->Aloss = 8; if (Amask) { - for (mask = Amask; !(mask & 0x01); mask >>= 1) + for (mask = Amask; !(mask & 0x01); mask >>= 1) { ++format->Ashift; - for (; (mask & 0x01); mask >>= 1) + } + for (; (mask & 0x01); mask >>= 1) { --format->Aloss; + } } format->palette = NULL; @@ -608,12 +612,11 @@ SDL_InitFormat(SDL_PixelFormat * format, Uint32 pixel_format) return 0; } -void -SDL_FreeFormat(SDL_PixelFormat *format) +void SDL_FreeFormat(SDL_PixelFormat *format) { SDL_PixelFormat *prev; - if (!format) { + if (format == NULL) { SDL_InvalidParamError("format"); return; } @@ -645,26 +648,26 @@ SDL_FreeFormat(SDL_PixelFormat *format) SDL_free(format); } -SDL_Palette * -SDL_AllocPalette(int ncolors) +SDL_Palette *SDL_AllocPalette(int ncolors) { SDL_Palette *palette; /* Input validation */ if (ncolors < 1) { - SDL_InvalidParamError("ncolors"); - return NULL; + SDL_InvalidParamError("ncolors"); + return NULL; } - palette = (SDL_Palette *) SDL_malloc(sizeof(*palette)); - if (!palette) { + palette = (SDL_Palette *)SDL_malloc(sizeof(*palette)); + if (palette == NULL) { SDL_OutOfMemory(); return NULL; } palette->colors = - (SDL_Color *) SDL_malloc(ncolors * sizeof(*palette->colors)); + (SDL_Color *)SDL_malloc(ncolors * sizeof(*palette->colors)); if (!palette->colors) { SDL_free(palette); + SDL_OutOfMemory(); return NULL; } palette->ncolors = ncolors; @@ -676,10 +679,9 @@ SDL_AllocPalette(int ncolors) return palette; } -int -SDL_SetPixelFormatPalette(SDL_PixelFormat * format, SDL_Palette *palette) +int SDL_SetPixelFormatPalette(SDL_PixelFormat *format, SDL_Palette *palette) { - if (!format) { + if (format == NULL) { return SDL_InvalidParamError("SDL_SetPixelFormatPalette(): format"); } @@ -704,14 +706,13 @@ SDL_SetPixelFormatPalette(SDL_PixelFormat * format, SDL_Palette *palette) return 0; } -int -SDL_SetPaletteColors(SDL_Palette * palette, const SDL_Color * colors, - int firstcolor, int ncolors) +int SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, + int firstcolor, int ncolors) { int status = 0; /* Verify the parameters */ - if (!palette) { + if (palette == NULL) { return -1; } if (ncolors > (palette->ncolors - firstcolor)) { @@ -731,10 +732,9 @@ SDL_SetPaletteColors(SDL_Palette * palette, const SDL_Color * colors, return status; } -void -SDL_FreePalette(SDL_Palette * palette) +void SDL_FreePalette(SDL_Palette *palette) { - if (!palette) { + if (palette == NULL) { SDL_InvalidParamError("palette"); return; } @@ -748,12 +748,12 @@ SDL_FreePalette(SDL_Palette * palette) /* * Calculate an 8-bit (3 red, 3 green, 2 blue) dithered palette of colors */ -void -SDL_DitherColors(SDL_Color * colors, int bpp) +void SDL_DitherColors(SDL_Color *colors, int bpp) { int i; - if (bpp != 8) - return; /* only 8bpp supported right now */ + if (bpp != 8) { + return; /* only 8bpp supported right now */ + } for (i = 0; i < 256; i++) { int r, g, b; @@ -776,8 +776,7 @@ SDL_DitherColors(SDL_Color * colors, int bpp) /* * Match an RGB value to a particular palette index */ -Uint8 -SDL_FindColor(SDL_Palette * pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a) +Uint8 SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* Do colorspace distance matching */ unsigned int smallest; @@ -795,18 +794,17 @@ SDL_FindColor(SDL_Palette * pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a) distance = (rd * rd) + (gd * gd) + (bd * bd) + (ad * ad); if (distance < smallest) { pixel = i; - if (distance == 0) { /* Perfect match! */ + if (distance == 0) { /* Perfect match! */ break; } smallest = distance; } } - return (pixel); + return pixel; } /* Tell whether palette is opaque, and if it has an alpha_channel */ -void -SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alpha_channel) +void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alpha_channel) { int i; @@ -851,38 +849,36 @@ SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alpha_cha *has_alpha_channel = SDL_TRUE; } - /* Find the opaque pixel value corresponding to an RGB triple */ -Uint32 -SDL_MapRGB(const SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b) +Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b) { + if (!format) { + SDL_InvalidParamError("format"); + return 0; + } if (format->palette == NULL) { - return (r >> format->Rloss) << format->Rshift - | (g >> format->Gloss) << format->Gshift - | (b >> format->Bloss) << format->Bshift | format->Amask; + return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | format->Amask; } else { return SDL_FindColor(format->palette, r, g, b, SDL_ALPHA_OPAQUE); } } /* Find the pixel value corresponding to an RGBA quadruple */ -Uint32 -SDL_MapRGBA(const SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b, - Uint8 a) +Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { + if (!format) { + SDL_InvalidParamError("format"); + return 0; + } if (format->palette == NULL) { - return (r >> format->Rloss) << format->Rshift - | (g >> format->Gloss) << format->Gshift - | (b >> format->Bloss) << format->Bshift - | ((Uint32)(a >> format->Aloss) << format->Ashift & format->Amask); + return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | ((Uint32)(a >> format->Aloss) << format->Ashift & format->Amask); } else { return SDL_FindColor(format->palette, r, g, b, a); } } -void -SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat * format, Uint8 * r, Uint8 * g, - Uint8 * b) +void SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat *format, Uint8 *r, Uint8 *g, + Uint8 *b) { if (format->palette == NULL) { unsigned v; @@ -903,9 +899,8 @@ SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat * format, Uint8 * r, Uint8 * g, } } -void -SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat * format, - Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a) +void SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat *format, + Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a) { if (format->palette == NULL) { unsigned v; @@ -930,8 +925,7 @@ SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat * format, } /* Map from Palette to Palette */ -static Uint8 * -Map1to1(SDL_Palette * src, SDL_Palette * dst, int *identical) +static Uint8 *Map1to1(SDL_Palette *src, SDL_Palette *dst, int *identical) { Uint8 *map; int i; @@ -939,34 +933,31 @@ Map1to1(SDL_Palette * src, SDL_Palette * dst, int *identical) if (identical) { if (src->ncolors <= dst->ncolors) { /* If an identical palette, no need to map */ - if (src == dst - || - (SDL_memcmp - (src->colors, dst->colors, - src->ncolors * sizeof(SDL_Color)) == 0)) { + if (src == dst || + (SDL_memcmp(src->colors, dst->colors, + src->ncolors * sizeof(SDL_Color)) == 0)) { *identical = 1; - return (NULL); + return NULL; } } *identical = 0; } - map = (Uint8 *) SDL_calloc(256, sizeof(Uint8)); + map = (Uint8 *)SDL_calloc(256, sizeof(Uint8)); if (map == NULL) { SDL_OutOfMemory(); - return (NULL); + return NULL; } for (i = 0; i < src->ncolors; ++i) { map[i] = SDL_FindColor(dst, src->colors[i].r, src->colors[i].g, src->colors[i].b, src->colors[i].a); } - return (map); + return map; } /* Map from Palette to BitField */ -static Uint8 * -Map1toN(SDL_PixelFormat * src, Uint8 Rmod, Uint8 Gmod, Uint8 Bmod, Uint8 Amod, - SDL_PixelFormat * dst) +static Uint8 *Map1toN(SDL_PixelFormat *src, Uint8 Rmod, Uint8 Gmod, Uint8 Bmod, Uint8 Amod, + SDL_PixelFormat *dst) { Uint8 *map; int i; @@ -974,26 +965,25 @@ Map1toN(SDL_PixelFormat * src, Uint8 Rmod, Uint8 Gmod, Uint8 Bmod, Uint8 Amod, SDL_Palette *pal = src->palette; bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel); - map = (Uint8 *) SDL_calloc(256, bpp); + map = (Uint8 *)SDL_calloc(256, bpp); if (map == NULL) { SDL_OutOfMemory(); - return (NULL); + return NULL; } /* We memory copy to the pixel map so the endianness is preserved */ for (i = 0; i < pal->ncolors; ++i) { - Uint8 R = (Uint8) ((pal->colors[i].r * Rmod) / 255); - Uint8 G = (Uint8) ((pal->colors[i].g * Gmod) / 255); - Uint8 B = (Uint8) ((pal->colors[i].b * Bmod) / 255); - Uint8 A = (Uint8) ((pal->colors[i].a * Amod) / 255); + Uint8 R = (Uint8)((pal->colors[i].r * Rmod) / 255); + Uint8 G = (Uint8)((pal->colors[i].g * Gmod) / 255); + Uint8 B = (Uint8)((pal->colors[i].b * Bmod) / 255); + Uint8 A = (Uint8)((pal->colors[i].a * Amod) / 255); ASSEMBLE_RGBA(&map[i * bpp], dst->BytesPerPixel, dst, (Uint32)R, (Uint32)G, (Uint32)B, (Uint32)A); } - return (map); + return map; } /* Map from BitField to Dithered-Palette to Palette */ -static Uint8 * -MapNto1(SDL_PixelFormat * src, SDL_PixelFormat * dst, int *identical) +static Uint8 *MapNto1(SDL_PixelFormat *src, SDL_PixelFormat *dst, int *identical) { /* Generate a 256 color dither palette */ SDL_Palette dithered; @@ -1003,19 +993,18 @@ MapNto1(SDL_PixelFormat * src, SDL_PixelFormat * dst, int *identical) dithered.ncolors = 256; SDL_DitherColors(colors, 8); dithered.colors = colors; - return (Map1to1(&dithered, pal, identical)); + return Map1to1(&dithered, pal, identical); } -SDL_BlitMap * -SDL_AllocBlitMap(void) +SDL_BlitMap *SDL_AllocBlitMap(void) { SDL_BlitMap *map; /* Allocate the empty map */ - map = (SDL_BlitMap *) SDL_calloc(1, sizeof(*map)); + map = (SDL_BlitMap *)SDL_calloc(1, sizeof(*map)); if (map == NULL) { SDL_OutOfMemory(); - return (NULL); + return NULL; } map->info.r = 0xFF; map->info.g = 0xFF; @@ -1023,12 +1012,10 @@ SDL_AllocBlitMap(void) map->info.a = 0xFF; /* It's ready to go */ - return (map); + return map; } - -void -SDL_InvalidateAllBlitMap(SDL_Surface *surface) +void SDL_InvalidateAllBlitMap(SDL_Surface *surface) { SDL_ListNode *l = surface->list_blitmap; @@ -1042,10 +1029,9 @@ SDL_InvalidateAllBlitMap(SDL_Surface *surface) } } -void -SDL_InvalidateMap(SDL_BlitMap * map) +void SDL_InvalidateMap(SDL_BlitMap *map) { - if (!map) { + if (map == NULL) { return; } if (map->dst) { @@ -1059,8 +1045,7 @@ SDL_InvalidateMap(SDL_BlitMap * map) map->info.table = NULL; } -int -SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst) +int SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst) { SDL_PixelFormat *srcfmt; SDL_PixelFormat *dstfmt; @@ -1086,18 +1071,19 @@ SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst) Map1to1(srcfmt->palette, dstfmt->palette, &map->identity); if (!map->identity) { if (map->info.table == NULL) { - return (-1); + return -1; } } - if (srcfmt->BitsPerPixel != dstfmt->BitsPerPixel) + if (srcfmt->BitsPerPixel != dstfmt->BitsPerPixel) { map->identity = 0; + } } else { /* Palette --> BitField */ map->info.table = Map1toN(srcfmt, src->map->info.r, src->map->info.g, src->map->info.b, src->map->info.a, dstfmt); if (map->info.table == NULL) { - return (-1); + return -1; } } } else { @@ -1106,10 +1092,10 @@ SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst) map->info.table = MapNto1(srcfmt, dstfmt, &map->identity); if (!map->identity) { if (map->info.table == NULL) { - return (-1); + return -1; } } - map->identity = 0; /* Don't optimize to copy */ + map->identity = 0; /* Don't optimize to copy */ } else { /* BitField --> BitField */ if (srcfmt == dstfmt) { @@ -1138,11 +1124,10 @@ SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst) } /* Choose your blitters wisely */ - return (SDL_CalculateBlit(src)); + return SDL_CalculateBlit(src); } -void -SDL_FreeBlitMap(SDL_BlitMap * map) +void SDL_FreeBlitMap(SDL_BlitMap *map) { if (map) { SDL_InvalidateMap(map); @@ -1150,8 +1135,7 @@ SDL_FreeBlitMap(SDL_BlitMap * map) } } -void -SDL_CalculateGammaRamp(float gamma, Uint16 * ramp) +void SDL_CalculateGammaRamp(float gamma, Uint16 * ramp) { int i; diff --git a/modules/SDL2/src/video/SDL_pixels_c.h b/modules/SDL2/src/video/SDL_pixels_c.h index 7497359..1a6f624 100644 --- a/modules/SDL2/src/video/SDL_pixels_c.h +++ b/modules/SDL2/src/video/SDL_pixels_c.h @@ -29,19 +29,19 @@ #include "SDL_blit.h" /* Pixel format functions */ -extern int SDL_InitFormat(SDL_PixelFormat * format, Uint32 pixel_format); +extern int SDL_InitFormat(SDL_PixelFormat *format, Uint32 pixel_format); /* Blit mapping functions */ extern SDL_BlitMap *SDL_AllocBlitMap(void); -extern void SDL_InvalidateMap(SDL_BlitMap * map); -extern int SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst); -extern void SDL_FreeBlitMap(SDL_BlitMap * map); +extern void SDL_InvalidateMap(SDL_BlitMap *map); +extern int SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst); +extern void SDL_FreeBlitMap(SDL_BlitMap *map); extern void SDL_InvalidateAllBlitMap(SDL_Surface *surface); /* Miscellaneous functions */ -extern void SDL_DitherColors(SDL_Color * colors, int bpp); -extern Uint8 SDL_FindColor(SDL_Palette * pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern void SDL_DitherColors(SDL_Color *colors, int bpp); +extern Uint8 SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a); extern void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alpha_channel); #endif /* SDL_pixels_c_h_ */ diff --git a/modules/SDL2/src/video/SDL_rect.c b/modules/SDL2/src/video/SDL_rect.c index d0e86bc..1b461d2 100644 --- a/modules/SDL2/src/video/SDL_rect.c +++ b/modules/SDL2/src/video/SDL_rect.c @@ -25,9 +25,8 @@ /* There's no float version of this at the moment, because it's not a public API and internally we only need the int version. */ -SDL_bool -SDL_GetSpanEnclosingRect(int width, int height, - int numrects, const SDL_Rect * rects, SDL_Rect *span) +SDL_bool SDL_GetSpanEnclosingRect(int width, int height, + int numrects, const SDL_Rect *rects, SDL_Rect *span) { int i; int span_y1, span_y2; @@ -39,10 +38,10 @@ SDL_GetSpanEnclosingRect(int width, int height, } else if (height < 1) { SDL_InvalidParamError("height"); return SDL_FALSE; - } else if (!rects) { + } else if (rects == NULL) { SDL_InvalidParamError("rects"); return SDL_FALSE; - } else if (!span) { + } else if (span == NULL) { SDL_InvalidParamError("span"); return SDL_FALSE; } else if (numrects < 1) { @@ -80,7 +79,6 @@ SDL_GetSpanEnclosingRect(int width, int height, return SDL_FALSE; } - /* For use with the Cohen-Sutherland algorithm for line clipping, in SDL_rect_impl.h */ #define CODE_BOTTOM 1 #define CODE_TOP 2 @@ -88,27 +86,27 @@ SDL_GetSpanEnclosingRect(int width, int height, #define CODE_RIGHT 8 /* Same code twice, for float and int versions... */ -#define RECTTYPE SDL_Rect -#define POINTTYPE SDL_Point -#define SCALARTYPE int -#define COMPUTEOUTCODE ComputeOutCode -#define SDL_HASINTERSECTION SDL_HasIntersection -#define SDL_INTERSECTRECT SDL_IntersectRect -#define SDL_RECTEMPTY SDL_RectEmpty -#define SDL_UNIONRECT SDL_UnionRect -#define SDL_ENCLOSEPOINTS SDL_EnclosePoints +#define RECTTYPE SDL_Rect +#define POINTTYPE SDL_Point +#define SCALARTYPE int +#define COMPUTEOUTCODE ComputeOutCode +#define SDL_HASINTERSECTION SDL_HasIntersection +#define SDL_INTERSECTRECT SDL_IntersectRect +#define SDL_RECTEMPTY SDL_RectEmpty +#define SDL_UNIONRECT SDL_UnionRect +#define SDL_ENCLOSEPOINTS SDL_EnclosePoints #define SDL_INTERSECTRECTANDLINE SDL_IntersectRectAndLine #include "SDL_rect_impl.h" -#define RECTTYPE SDL_FRect -#define POINTTYPE SDL_FPoint -#define SCALARTYPE float -#define COMPUTEOUTCODE ComputeOutCodeF -#define SDL_HASINTERSECTION SDL_HasIntersectionF -#define SDL_INTERSECTRECT SDL_IntersectFRect -#define SDL_RECTEMPTY SDL_FRectEmpty -#define SDL_UNIONRECT SDL_UnionFRect -#define SDL_ENCLOSEPOINTS SDL_EncloseFPoints +#define RECTTYPE SDL_FRect +#define POINTTYPE SDL_FPoint +#define SCALARTYPE float +#define COMPUTEOUTCODE ComputeOutCodeF +#define SDL_HASINTERSECTION SDL_HasIntersectionF +#define SDL_INTERSECTRECT SDL_IntersectFRect +#define SDL_RECTEMPTY SDL_FRectEmpty +#define SDL_UNIONRECT SDL_UnionFRect +#define SDL_ENCLOSEPOINTS SDL_EncloseFPoints #define SDL_INTERSECTRECTANDLINE SDL_IntersectFRectAndLine #include "SDL_rect_impl.h" diff --git a/modules/SDL2/src/video/SDL_rect_c.h b/modules/SDL2/src/video/SDL_rect_c.h index 49b34c1..639bef8 100644 --- a/modules/SDL2/src/video/SDL_rect_c.h +++ b/modules/SDL2/src/video/SDL_rect_c.h @@ -24,7 +24,7 @@ #include "../SDL_internal.h" -extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect * rects, SDL_Rect *span); +extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect *rects, SDL_Rect *span); #endif /* SDL_rect_c_h_ */ diff --git a/modules/SDL2/src/video/SDL_rect_impl.h b/modules/SDL2/src/video/SDL_rect_impl.h index 19dda58..b0e3901 100644 --- a/modules/SDL2/src/video/SDL_rect_impl.h +++ b/modules/SDL2/src/video/SDL_rect_impl.h @@ -21,19 +21,18 @@ /* This file is #included twice to support int and float versions with the same code. */ -SDL_bool -SDL_HASINTERSECTION(const RECTTYPE * A, const RECTTYPE * B) +SDL_bool SDL_HASINTERSECTION(const RECTTYPE *A, const RECTTYPE *B) { SCALARTYPE Amin, Amax, Bmin, Bmax; - if (!A) { + if (A == NULL) { SDL_InvalidParamError("A"); return SDL_FALSE; - } else if (!B) { + } else if (B == NULL) { SDL_InvalidParamError("B"); return SDL_FALSE; } else if (SDL_RECTEMPTY(A) || SDL_RECTEMPTY(B)) { - return SDL_FALSE; /* Special cases for empty rects */ + return SDL_FALSE; /* Special cases for empty rects */ } /* Horizontal intersection */ @@ -67,21 +66,20 @@ SDL_HASINTERSECTION(const RECTTYPE * A, const RECTTYPE * B) return SDL_TRUE; } -SDL_bool -SDL_INTERSECTRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result) +SDL_bool SDL_INTERSECTRECT(const RECTTYPE *A, const RECTTYPE *B, RECTTYPE *result) { SCALARTYPE Amin, Amax, Bmin, Bmax; - if (!A) { + if (A == NULL) { SDL_InvalidParamError("A"); return SDL_FALSE; - } else if (!B) { + } else if (B == NULL) { SDL_InvalidParamError("B"); return SDL_FALSE; - } else if (!result) { + } else if (result == NULL) { SDL_InvalidParamError("result"); return SDL_FALSE; - } else if (SDL_RECTEMPTY(A) || SDL_RECTEMPTY(B)) { /* Special cases for empty rects */ + } else if (SDL_RECTEMPTY(A) || SDL_RECTEMPTY(B)) { /* Special cases for empty rects */ result->w = 0; result->h = 0; return SDL_FALSE; @@ -118,30 +116,29 @@ SDL_INTERSECTRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result) return !SDL_RECTEMPTY(result); } -void -SDL_UNIONRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result) +void SDL_UNIONRECT(const RECTTYPE *A, const RECTTYPE *B, RECTTYPE *result) { SCALARTYPE Amin, Amax, Bmin, Bmax; - if (!A) { + if (A == NULL) { SDL_InvalidParamError("A"); return; - } else if (!B) { + } else if (B == NULL) { SDL_InvalidParamError("B"); return; - } else if (!result) { + } else if (result == NULL) { SDL_InvalidParamError("result"); return; - } else if (SDL_RECTEMPTY(A)) { /* Special cases for empty Rects */ - if (SDL_RECTEMPTY(B)) { /* A and B empty */ + } else if (SDL_RECTEMPTY(A)) { /* Special cases for empty Rects */ + if (SDL_RECTEMPTY(B)) { /* A and B empty */ SDL_zerop(result); - } else { /* A empty, B not empty */ + } else { /* A empty, B not empty */ *result = *B; } return; - } else if (SDL_RECTEMPTY(B)) { /* A not empty, B empty */ - *result = *A; - return; + } else if (SDL_RECTEMPTY(B)) { /* A not empty, B empty */ + *result = *A; + return; } /* Horizontal union */ @@ -173,8 +170,8 @@ SDL_UNIONRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result) result->h = Amax - Amin; } -SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE * points, int count, const RECTTYPE * clip, - RECTTYPE * result) +SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE *points, int count, const RECTTYPE *clip, + RECTTYPE *result) { SCALARTYPE minx = 0; SCALARTYPE miny = 0; @@ -183,7 +180,7 @@ SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE * points, int count, const RECTTYPE * SCALARTYPE x, y; int i; - if (!points) { + if (points == NULL) { SDL_InvalidParamError("points"); return SDL_FALSE; } else if (count < 1) { @@ -195,8 +192,8 @@ SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE * points, int count, const RECTTYPE * SDL_bool added = SDL_FALSE; const SCALARTYPE clip_minx = clip->x; const SCALARTYPE clip_miny = clip->y; - const SCALARTYPE clip_maxx = clip->x+clip->w-1; - const SCALARTYPE clip_maxy = clip->y+clip->h-1; + const SCALARTYPE clip_maxx = clip->x + clip->w - 1; + const SCALARTYPE clip_maxy = clip->y + clip->h - 1; /* Special case for empty rectangle */ if (SDL_RECTEMPTY(clip)) { @@ -267,15 +264,14 @@ SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE * points, int count, const RECTTYPE * if (result) { result->x = minx; result->y = miny; - result->w = (maxx-minx)+1; - result->h = (maxy-miny)+1; + result->w = (maxx - minx) + 1; + result->h = (maxy - miny) + 1; } return SDL_TRUE; } /* Use the Cohen-Sutherland algorithm for line clipping */ -static int -COMPUTEOUTCODE(const RECTTYPE * rect, SCALARTYPE x, SCALARTYPE y) +static int COMPUTEOUTCODE(const RECTTYPE *rect, SCALARTYPE x, SCALARTYPE y) { int code = 0; if (y < rect->y) { @@ -291,9 +287,7 @@ COMPUTEOUTCODE(const RECTTYPE * rect, SCALARTYPE x, SCALARTYPE y) return code; } -SDL_bool -SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE *X2, - SCALARTYPE *Y2) +SDL_bool SDL_INTERSECTRECTANDLINE(const RECTTYPE *rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE *X2, SCALARTYPE *Y2) { SCALARTYPE x = 0; SCALARTYPE y = 0; @@ -305,23 +299,23 @@ SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE recty2; int outcode1, outcode2; - if (!rect) { + if (rect == NULL) { SDL_InvalidParamError("rect"); return SDL_FALSE; - } else if (!X1) { + } else if (X1 == NULL) { SDL_InvalidParamError("X1"); return SDL_FALSE; - } else if (!Y1) { + } else if (Y1 == NULL) { SDL_InvalidParamError("Y1"); return SDL_FALSE; - } else if (!X2) { + } else if (X2 == NULL) { SDL_InvalidParamError("X2"); return SDL_FALSE; - } else if (!Y2) { + } else if (Y2 == NULL) { SDL_InvalidParamError("Y2"); return SDL_FALSE; } else if (SDL_RECTEMPTY(rect)) { - return SDL_FALSE; /* Special case for empty rect */ + return SDL_FALSE; /* Special case for empty rect */ } x1 = *X1; @@ -345,7 +339,7 @@ SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, return SDL_FALSE; } - if (y1 == y2) { /* Horizontal line, easy to clip */ + if (y1 == y2) { /* Horizontal line, easy to clip */ if (x1 < rectx1) { *X1 = rectx1; } else if (x1 > rectx2) { @@ -359,7 +353,7 @@ SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, return SDL_TRUE; } - if (x1 == x2) { /* Vertical line, easy to clip */ + if (x1 == x2) { /* Vertical line, easy to clip */ if (y1 < recty1) { *Y1 = recty1; } else if (y1 > recty2) { @@ -400,23 +394,23 @@ SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, outcode1 = COMPUTEOUTCODE(rect, x, y); } else { if (outcode2 & CODE_TOP) { - SDL_assert(y2 != y1); /* if equal: division by zero. */ + SDL_assert(y2 != y1); /* if equal: division by zero. */ y = recty1; x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1); } else if (outcode2 & CODE_BOTTOM) { - SDL_assert(y2 != y1); /* if equal: division by zero. */ + SDL_assert(y2 != y1); /* if equal: division by zero. */ y = recty2; x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1); } else if (outcode2 & CODE_LEFT) { /* If this assertion ever fires, here's the static analysis that warned about it: http://buildbot.libsdl.org/sdl-static-analysis/sdl-macosx-static-analysis/sdl-macosx-static-analysis-1101/report-b0d01a.html#EndPath */ - SDL_assert(x2 != x1); /* if equal: division by zero. */ + SDL_assert(x2 != x1); /* if equal: division by zero. */ x = rectx1; y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1); } else if (outcode2 & CODE_RIGHT) { /* If this assertion ever fires, here's the static analysis that warned about it: http://buildbot.libsdl.org/sdl-static-analysis/sdl-macosx-static-analysis/sdl-macosx-static-analysis-1101/report-39b114.html#EndPath */ - SDL_assert(x2 != x1); /* if equal: division by zero. */ + SDL_assert(x2 != x1); /* if equal: division by zero. */ x = rectx2; y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1); } diff --git a/modules/SDL2/src/video/SDL_shape.c b/modules/SDL2/src/video/SDL_shape.c index 17b2974..a0b977b 100644 --- a/modules/SDL2/src/video/SDL_shape.c +++ b/modules/SDL2/src/video/SDL_shape.c @@ -28,154 +28,157 @@ #include "SDL_shape.h" #include "SDL_shape_internals.h" -SDL_Window* -SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) +SDL_Window *SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags) { SDL_Window *result = NULL; - result = SDL_CreateWindow(title,-1000,-1000,w,h,(flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /* & (~SDL_WINDOW_SHOWN) */); - if(result != NULL) { + result = SDL_CreateWindow(title, -1000, -1000, w, h, (flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /* & (~SDL_WINDOW_SHOWN) */); + if (result != NULL) { if (SDL_GetVideoDevice()->shape_driver.CreateShaper == NULL) { SDL_DestroyWindow(result); return NULL; } result->shaper = SDL_GetVideoDevice()->shape_driver.CreateShaper(result); - if(result->shaper != NULL) { + if (result->shaper != NULL) { result->shaper->userx = x; result->shaper->usery = y; result->shaper->mode.mode = ShapeModeDefault; result->shaper->mode.parameters.binarizationCutoff = 1; result->shaper->hasshape = SDL_FALSE; return result; - } - else { + } else { SDL_DestroyWindow(result); return NULL; } } - else - return NULL; + return NULL; } -SDL_bool -SDL_IsShapedWindow(const SDL_Window *window) +SDL_bool SDL_IsShapedWindow(const SDL_Window *window) { - if(window == NULL) + if (window == NULL) { return SDL_FALSE; - else - return (SDL_bool)(window->shaper != NULL); + } + return (SDL_bool)(window->shaper != NULL); } /* REQUIRES that bitmap point to a w-by-h bitmap with ppb pixels-per-byte. */ -void -SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb) +void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode, SDL_Surface *shape, Uint8 *bitmap, Uint8 ppb) { int x = 0; int y = 0; - Uint8 r = 0,g = 0,b = 0,alpha = 0; - Uint8* pixel = NULL; - Uint32 pixel_value = 0,mask_value = 0; - int bytes_per_scanline = (shape->w + (ppb - 1)) / ppb; + Uint8 r = 0, g = 0, b = 0, alpha = 0; + Uint8 *pixel = NULL; + Uint32 pixel_value = 0, mask_value = 0; + size_t bytes_per_scanline = (size_t)(shape->w + (ppb - 1)) / ppb; Uint8 *bitmap_scanline; SDL_Color key; - if(SDL_MUSTLOCK(shape)) + if (SDL_MUSTLOCK(shape)) { SDL_LockSurface(shape); + } SDL_memset(bitmap, 0, shape->h * bytes_per_scanline); - for(y = 0;yh;y++) { + for (y = 0; y < shape->h; y++) { bitmap_scanline = bitmap + y * bytes_per_scanline; - for(x=0;xw;x++) { + for (x = 0; x < shape->w; x++) { alpha = 0; pixel_value = 0; - pixel = (Uint8 *)(shape->pixels) + (y*shape->pitch) + (x*shape->format->BytesPerPixel); - switch(shape->format->BytesPerPixel) { - case(1): - pixel_value = *pixel; - break; - case(2): - pixel_value = *(Uint16*)pixel; - break; - case(3): - pixel_value = *(Uint32*)pixel & (~shape->format->Amask); - break; - case(4): - pixel_value = *(Uint32*)pixel; - break; + pixel = (Uint8 *)(shape->pixels) + (y * shape->pitch) + (x * shape->format->BytesPerPixel); + switch (shape->format->BytesPerPixel) { + case (1): + pixel_value = *pixel; + break; + case (2): + pixel_value = *(Uint16 *)pixel; + break; + case (3): + pixel_value = *(Uint32 *)pixel & (~shape->format->Amask); + break; + case (4): + pixel_value = *(Uint32 *)pixel; + break; } - SDL_GetRGBA(pixel_value,shape->format,&r,&g,&b,&alpha); - switch(mode.mode) { - case(ShapeModeDefault): - mask_value = (alpha >= 1 ? 1 : 0); - break; - case(ShapeModeBinarizeAlpha): - mask_value = (alpha >= mode.parameters.binarizationCutoff ? 1 : 0); - break; - case(ShapeModeReverseBinarizeAlpha): - mask_value = (alpha <= mode.parameters.binarizationCutoff ? 1 : 0); - break; - case(ShapeModeColorKey): - key = mode.parameters.colorKey; - mask_value = ((key.r != r || key.g != g || key.b != b) ? 1 : 0); - break; + SDL_GetRGBA(pixel_value, shape->format, &r, &g, &b, &alpha); + switch (mode.mode) { + case (ShapeModeDefault): + mask_value = (alpha >= 1 ? 1 : 0); + break; + case (ShapeModeBinarizeAlpha): + mask_value = (alpha >= mode.parameters.binarizationCutoff ? 1 : 0); + break; + case (ShapeModeReverseBinarizeAlpha): + mask_value = (alpha <= mode.parameters.binarizationCutoff ? 1 : 0); + break; + case (ShapeModeColorKey): + key = mode.parameters.colorKey; + mask_value = ((key.r != r || key.g != g || key.b != b) ? 1 : 0); + break; } bitmap_scanline[x / ppb] |= mask_value << (x % ppb); } } - if(SDL_MUSTLOCK(shape)) + if (SDL_MUSTLOCK(shape)) { SDL_UnlockSurface(shape); + } } -static SDL_ShapeTree* -RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* mask,SDL_Rect dimensions) { - int x = 0,y = 0; - Uint8* pixel = NULL; +static SDL_ShapeTree *RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *mask, SDL_Rect dimensions) +{ + int x = 0, y = 0; + Uint8 *pixel = NULL; Uint32 pixel_value = 0; - Uint8 r = 0,g = 0,b = 0,a = 0; + Uint8 r = 0, g = 0, b = 0, a = 0; SDL_bool pixel_opaque = SDL_FALSE; int last_opaque = -1; SDL_Color key; - SDL_ShapeTree* result = (SDL_ShapeTree*)SDL_malloc(sizeof(SDL_ShapeTree)); - SDL_Rect next = {0,0,0,0}; + SDL_ShapeTree *result = (SDL_ShapeTree *)SDL_malloc(sizeof(SDL_ShapeTree)); + SDL_Rect next = { 0, 0, 0, 0 }; - for(y=dimensions.y;ypixels) + (y*mask->pitch) + (x*mask->format->BytesPerPixel); - switch(mask->format->BytesPerPixel) { - case(1): - pixel_value = *pixel; - break; - case(2): - pixel_value = *(Uint16*)pixel; - break; - case(3): - pixel_value = *(Uint32*)pixel & (~mask->format->Amask); - break; - case(4): - pixel_value = *(Uint32*)pixel; - break; + pixel = (Uint8 *)(mask->pixels) + (y * mask->pitch) + (x * mask->format->BytesPerPixel); + switch (mask->format->BytesPerPixel) { + case (1): + pixel_value = *pixel; + break; + case (2): + pixel_value = *(Uint16 *)pixel; + break; + case (3): + pixel_value = *(Uint32 *)pixel & (~mask->format->Amask); + break; + case (4): + pixel_value = *(Uint32 *)pixel; + break; } - SDL_GetRGBA(pixel_value,mask->format,&r,&g,&b,&a); - switch(mode.mode) { - case(ShapeModeDefault): - pixel_opaque = (a >= 1 ? SDL_TRUE : SDL_FALSE); - break; - case(ShapeModeBinarizeAlpha): - pixel_opaque = (a >= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); - break; - case(ShapeModeReverseBinarizeAlpha): - pixel_opaque = (a <= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); - break; - case(ShapeModeColorKey): - key = mode.parameters.colorKey; - pixel_opaque = ((key.r != r || key.g != g || key.b != b) ? SDL_TRUE : SDL_FALSE); - break; + SDL_GetRGBA(pixel_value, mask->format, &r, &g, &b, &a); + switch (mode.mode) { + case (ShapeModeDefault): + pixel_opaque = (a >= 1 ? SDL_TRUE : SDL_FALSE); + break; + case (ShapeModeBinarizeAlpha): + pixel_opaque = (a >= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); + break; + case (ShapeModeReverseBinarizeAlpha): + pixel_opaque = (a <= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); + break; + case (ShapeModeColorKey): + key = mode.parameters.colorKey; + pixel_opaque = ((key.r != r || key.g != g || key.b != b) ? SDL_TRUE : SDL_FALSE); + break; } - if(last_opaque == -1) + if (last_opaque == -1) { last_opaque = pixel_opaque; - if(last_opaque != pixel_opaque) { + } + if (last_opaque != pixel_opaque) { const int halfwidth = dimensions.w / 2; const int halfheight = dimensions.h / 2; @@ -185,82 +188,79 @@ RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* mask,SDL_Rec next.y = dimensions.y; next.w = halfwidth; next.h = halfheight; - result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode, mask, next); next.x = dimensions.x + halfwidth; next.w = dimensions.w - halfwidth; - result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode, mask, next); next.x = dimensions.x; next.w = halfwidth; next.y = dimensions.y + halfheight; next.h = dimensions.h - halfheight; - result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode, mask, next); next.x = dimensions.x + halfwidth; next.w = dimensions.w - halfwidth; - result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode, mask, next); return result; } } } - /* If we never recursed, all the pixels in this quadrant have the same "value". */ result->kind = (last_opaque == SDL_TRUE ? OpaqueShape : TransparentShape); result->data.shape = dimensions; return result; } -SDL_ShapeTree* -SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape) +SDL_ShapeTree *SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape) { SDL_Rect dimensions; - SDL_ShapeTree* result = NULL; + SDL_ShapeTree *result = NULL; dimensions.x = 0; dimensions.y = 0; dimensions.w = shape->w; dimensions.h = shape->h; - if(SDL_MUSTLOCK(shape)) + if (SDL_MUSTLOCK(shape)) { SDL_LockSurface(shape); - result = RecursivelyCalculateShapeTree(mode,shape,dimensions); - if(SDL_MUSTLOCK(shape)) + } + result = RecursivelyCalculateShapeTree(mode, shape, dimensions); + if (SDL_MUSTLOCK(shape)) { SDL_UnlockSurface(shape); + } return result; } -void -SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) +void SDL_TraverseShapeTree(SDL_ShapeTree *tree, SDL_TraversalFunction function, void *closure) { SDL_assert(tree != NULL); - if(tree->kind == QuadShape) { - SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure); - SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright,function,closure); - SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downleft,function,closure); - SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downright,function,closure); + if (tree->kind == QuadShape) { + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft, function, closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright, function, closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downleft, function, closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downright, function, closure); + } else { + function(tree, closure); } - else - function(tree,closure); } -void -SDL_FreeShapeTree(SDL_ShapeTree** shape_tree) +void SDL_FreeShapeTree(SDL_ShapeTree **shape_tree) { - if((*shape_tree)->kind == QuadShape) { - SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.upleft); - SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.upright); - SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.downleft); - SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.downright); + if ((*shape_tree)->kind == QuadShape) { + SDL_FreeShapeTree((SDL_ShapeTree **)(char *)&(*shape_tree)->data.children.upleft); + SDL_FreeShapeTree((SDL_ShapeTree **)(char *)&(*shape_tree)->data.children.upright); + SDL_FreeShapeTree((SDL_ShapeTree **)(char *)&(*shape_tree)->data.children.downleft); + SDL_FreeShapeTree((SDL_ShapeTree **)(char *)&(*shape_tree)->data.children.downright); } SDL_free(*shape_tree); *shape_tree = NULL; } -int -SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) +int SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); int result; @@ -315,32 +315,27 @@ SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *sh return result; } -static SDL_bool -SDL_WindowHasAShape(SDL_Window *window) +static SDL_bool SDL_WindowHasAShape(SDL_Window *window) { - if (window == NULL || !SDL_IsShapedWindow(window)) + if (window == NULL || !SDL_IsShapedWindow(window)) { return SDL_FALSE; + } return window->shaper->hasshape; } -int -SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) +int SDL_GetShapedWindowMode(SDL_Window *window, SDL_WindowShapeMode *shape_mode) { - if(window != NULL && SDL_IsShapedWindow(window)) { - if(shape_mode == NULL) { - if(SDL_WindowHasAShape(window)) - /* The window given has a shape. */ - return 0; - else - /* The window given is shapeable but lacks a shape. */ - return SDL_WINDOW_LACKS_SHAPE; - } - else { + if (window != NULL && SDL_IsShapedWindow(window)) { + if (shape_mode == NULL) { + if (SDL_WindowHasAShape(window)) { + return 0; /* The window given has a shape. */ + } else { + return SDL_WINDOW_LACKS_SHAPE; /* The window given is shapeable but lacks a shape. */ + } + } else { *shape_mode = window->shaper->mode; return 0; } } - else - /* The window given is not a valid shapeable window. */ - return SDL_NONSHAPEABLE_WINDOW; + return SDL_NONSHAPEABLE_WINDOW; /* The window given is not a valid shapeable window. */ } diff --git a/modules/SDL2/src/video/SDL_shape_internals.h b/modules/SDL2/src/video/SDL_shape_internals.h index 3e7eb16..7681a04 100644 --- a/modules/SDL2/src/video/SDL_shape_internals.h +++ b/modules/SDL2/src/video/SDL_shape_internals.h @@ -37,28 +37,36 @@ extern "C" { struct SDL_ShapeTree; -typedef struct { - struct SDL_ShapeTree *upleft,*upright,*downleft,*downright; +typedef struct +{ + struct SDL_ShapeTree *upleft, *upright, *downleft, *downright; } SDL_QuadTreeChildren; -typedef union { +typedef union +{ SDL_QuadTreeChildren children; SDL_Rect shape; } SDL_ShapeUnion; -typedef enum { QuadShape,TransparentShape,OpaqueShape } SDL_ShapeKind; +typedef enum +{ + QuadShape, + TransparentShape, + OpaqueShape +} SDL_ShapeKind; -typedef struct SDL_ShapeTree { +typedef struct SDL_ShapeTree +{ SDL_ShapeKind kind; SDL_ShapeUnion data; } SDL_ShapeTree; -typedef void(*SDL_TraversalFunction)(SDL_ShapeTree*,void*); +typedef void (*SDL_TraversalFunction)(SDL_ShapeTree *, void *); -extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb); -extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape); -extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure); -extern void SDL_FreeShapeTree(SDL_ShapeTree** shape_tree); +extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode, SDL_Surface *shape, Uint8 *bitmap, Uint8 ppb); +extern SDL_ShapeTree *SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape); +extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree, SDL_TraversalFunction function, void *closure); +extern void SDL_FreeShapeTree(SDL_ShapeTree **shape_tree); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/video/SDL_stretch.c b/modules/SDL2/src/video/SDL_stretch.c index a9812a7..ec2bed5 100644 --- a/modules/SDL2/src/video/SDL_stretch.c +++ b/modules/SDL2/src/video/SDL_stretch.c @@ -26,25 +26,22 @@ static int SDL_LowerSoftStretchNearest(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect); static int SDL_LowerSoftStretchLinear(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect); -static int SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect, SDL_ScaleMode scaleMode); +static int SDL_UpperSoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode); -int -SDL_SoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, - SDL_Surface *dst, const SDL_Rect *dstrect) +int SDL_SoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, const SDL_Rect *dstrect) { return SDL_UpperSoftStretch(src, srcrect, dst, dstrect, SDL_ScaleModeNearest); } -int -SDL_SoftStretchLinear(SDL_Surface *src, const SDL_Rect *srcrect, - SDL_Surface *dst, const SDL_Rect *dstrect) +int SDL_SoftStretchLinear(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, const SDL_Rect *dstrect) { return SDL_UpperSoftStretch(src, srcrect, dst, dstrect, SDL_ScaleModeLinear); } -static int -SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, const SDL_Rect * dstrect, SDL_ScaleMode scaleMode) +static int SDL_UpperSoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode) { int ret; int src_locked; @@ -140,55 +137,53 @@ SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, Because with SSE: add-multiply: _mm_madd_epi16 works with signed int so pixels 0xb1...... are negatives and false the result same in NEON probably */ -#define PRECISION 7 - -#define FIXED_POINT(i) ((Uint32)(i) << 16) -#define SRC_INDEX(fp) ((Uint32)(fp) >> 16) -#define INTEGER(fp) ((Uint32)(fp) >> PRECISION) -#define FRAC(fp) ((Uint32)(fp >> (16 - PRECISION)) & ((1< dst_h - 1 - right_pad_h); \ - index_h = SRC_INDEX(fp_sum_h); \ - frac_h0 = FRAC(fp_sum_h); \ - \ - index_h = no_padding ? index_h : (i < left_pad_h ? 0 : src_h - 1); \ - frac_h0 = no_padding ? frac_h0 : 0; \ - incr_h1 = no_padding ? src_pitch : 0; \ - incr_h0 = index_h * src_pitch; \ - \ - src_h0 = (const Uint32 *)((const Uint8 *)src + incr_h0); \ - src_h1 = (const Uint32 *)((const Uint8 *)src_h0 + incr_h1); \ - \ - fp_sum_h += fp_step_h; \ - \ - frac_h1 = FRAC_ONE - frac_h0; \ - fp_sum_w = fp_sum_w_init; \ - right_pad_w = right_pad_w_init; \ - left_pad_w = left_pad_w_init; \ - middle = middle_init; \ - - +#define PRECISION 7 + +#define FIXED_POINT(i) ((Uint32)(i) << 16) +#define SRC_INDEX(fp) ((Uint32)(fp) >> 16) +#define INTEGER(fp) ((Uint32)(fp) >> PRECISION) +#define FRAC(fp) ((Uint32)(fp >> (16 - PRECISION)) & ((1 << PRECISION) - 1)) +#define FRAC_ZERO 0 +#define FRAC_ONE (1 << PRECISION) +#define FP_ONE FIXED_POINT(1) + +#define BILINEAR___START \ + int i; \ + int fp_sum_h, fp_step_h, left_pad_h, right_pad_h; \ + int fp_sum_w, fp_step_w, left_pad_w, right_pad_w; \ + int fp_sum_w_init, left_pad_w_init, right_pad_w_init, dst_gap, middle_init; \ + get_scaler_datas(src_h, dst_h, &fp_sum_h, &fp_step_h, &left_pad_h, &right_pad_h); \ + get_scaler_datas(src_w, dst_w, &fp_sum_w, &fp_step_w, &left_pad_w, &right_pad_w); \ + fp_sum_w_init = fp_sum_w + left_pad_w * fp_step_w; \ + left_pad_w_init = left_pad_w; \ + right_pad_w_init = right_pad_w; \ + dst_gap = dst_pitch - 4 * dst_w; \ + middle_init = dst_w - left_pad_w - right_pad_w; + +#define BILINEAR___HEIGHT \ + int index_h, frac_h0, frac_h1, middle; \ + const Uint32 *src_h0, *src_h1; \ + int no_padding, incr_h0, incr_h1; \ + \ + no_padding = !(i < left_pad_h || i > dst_h - 1 - right_pad_h); \ + index_h = SRC_INDEX(fp_sum_h); \ + frac_h0 = FRAC(fp_sum_h); \ + \ + index_h = no_padding ? index_h : (i < left_pad_h ? 0 : src_h - 1); \ + frac_h0 = no_padding ? frac_h0 : 0; \ + incr_h1 = no_padding ? src_pitch : 0; \ + incr_h0 = index_h * src_pitch; \ + \ + src_h0 = (const Uint32 *)((const Uint8 *)src + incr_h0); \ + src_h1 = (const Uint32 *)((const Uint8 *)src_h0 + incr_h1); \ + \ + fp_sum_h += fp_step_h; \ + \ + frac_h1 = FRAC_ONE - frac_h0; \ + fp_sum_w = fp_sum_w_init; \ + right_pad_w = right_pad_w_init; \ + left_pad_w = left_pad_w_init; \ + middle = middle_init; #if defined(__clang__) // Remove inlining of this function @@ -198,12 +193,11 @@ SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, // OK with clang 12.0.0 / Xcode __attribute__((noinline)) #endif -static void -get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_pad, int *right_pad) +static void get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_pad, int *right_pad) { - int step = FIXED_POINT(src_nb) / (dst_nb); /* source step in fixed point */ - int x0 = FP_ONE / 2; /* dst first pixel center at 0.5 in fixed point */ + int step = FIXED_POINT(src_nb) / (dst_nb); /* source step in fixed point */ + int x0 = FP_ONE / 2; /* dst first pixel center at 0.5 in fixed point */ int fp_sum; int i; #if 0 @@ -215,7 +209,7 @@ get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_ Sint64 tmp[2]; tmp[0] = (Sint64)step * (x0 >> 16); tmp[1] = (Sint64)step * (x0 & 0xFFFF); - x0 = (int) (tmp[0] + ((tmp[1] + 0x8000) >> 16)); /* x0 == (step + 1) / 2 */ + x0 = (int)(tmp[0] + ((tmp[1] + 0x8000) >> 16)); /* x0 == (step + 1) / 2 */ #endif /* -= 0.5, get back the pixel origin, in source coordinates */ x0 -= FP_ONE / 2; @@ -237,19 +231,19 @@ get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_ } fp_sum += step; } -// SDL_Log("%d -> %d x0=%d step=%d left_pad=%d right_pad=%d", src_nb, dst_nb, *fp_start, *fp_step, *left_pad, *right_pad); + // SDL_Log("%d -> %d x0=%d step=%d left_pad=%d right_pad=%d", src_nb, dst_nb, *fp_start, *fp_step, *left_pad, *right_pad); } -typedef struct color_t { - Uint8 a; - Uint8 b; - Uint8 c; - Uint8 d; +typedef struct color_t +{ + Uint8 a; + Uint8 b; + Uint8 c; + Uint8 d; } color_t; #if 0 -static void -printf_64(const char *str, void *var) +static void printf_64(const char *str, void *var) { uint8_t *val = (uint8_t*) var; printf(" * %s: %02x %02x %02x %02x _ %02x %02x %02x %02x\n", @@ -259,12 +253,11 @@ printf_64(const char *str, void *var) /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */ -static SDL_INLINE void -INTERPOL(const Uint32 *src_x0, const Uint32 *src_x1, int frac0, int frac1, Uint32 *dst) +static SDL_INLINE void INTERPOL(const Uint32 *src_x0, const Uint32 *src_x1, int frac0, int frac1, Uint32 *dst) { const color_t *c0 = (const color_t *)src_x0; const color_t *c1 = (const color_t *)src_x1; - color_t *cx = (color_t *)dst; + color_t *cx = (color_t *)dst; #if 0 cx->a = c0->a + INTEGER(frac0 * (c1->a - c0->a)); cx->b = c0->b + INTEGER(frac0 * (c1->b - c0->b)); @@ -278,23 +271,21 @@ INTERPOL(const Uint32 *src_x0, const Uint32 *src_x1, int frac0, int frac1, Uint3 #endif } -static SDL_INLINE void -INTERPOL_BILINEAR(const Uint32 *s0, const Uint32 *s1, int frac_w0, int frac_h0, int frac_h1, Uint32 *dst) +static SDL_INLINE void INTERPOL_BILINEAR(const Uint32 *s0, const Uint32 *s1, int frac_w0, int frac_h0, int frac_h1, Uint32 *dst) { Uint32 tmp[2]; unsigned int frac_w1 = FRAC_ONE - frac_w0; /* Vertical first, store to 'tmp' */ - INTERPOL(s0, s1, frac_h0, frac_h1, tmp); + INTERPOL(s0, s1, frac_h0, frac_h1, tmp); INTERPOL(s0 + 1, s1 + 1, frac_h0, frac_h1, tmp + 1); /* Horizontal, store to 'dst' */ - INTERPOL(tmp, tmp + 1, frac_w0, frac_w1, dst); + INTERPOL(tmp, tmp + 1, frac_w0, frac_w1, dst); } -static int -scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch, - Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch, + Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { BILINEAR___START @@ -314,14 +305,14 @@ scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch, int frac_w = FRAC(fp_sum_w); fp_sum_w += fp_step_w; -/* - x00 ... x0_ ..... x01 - . . . - . x . - . . . - . . . - x10 ... x1_ ..... x11 -*/ + /* + x00 ... x0_ ..... x01 + . . . + . x . + . . . + . . . + x10 ... x1_ ..... x11 + */ s_00_01 = (const Uint32 *)((const Uint8 *)src_h0 + index_w); s_10_11 = (const Uint32 *)((const Uint8 *)src_h1 + index_w); @@ -343,29 +334,28 @@ scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch, } #if defined(__SSE2__) -# define HAVE_SSE2_INTRINSICS 1 +#define HAVE_SSE2_INTRINSICS 1 #endif #if defined(__ARM_NEON) -# define HAVE_NEON_INTRINSICS 1 -# define CAST_uint8x8_t (uint8x8_t) -# define CAST_uint32x2_t (uint32x2_t) +#define HAVE_NEON_INTRINSICS 1 +#define CAST_uint8x8_t (uint8x8_t) +#define CAST_uint32x2_t (uint32x2_t) #endif #if defined(__WINRT__) || defined(_MSC_VER) -# if defined(HAVE_NEON_INTRINSICS) -# undef CAST_uint8x8_t -# undef CAST_uint32x2_t -# define CAST_uint8x8_t -# define CAST_uint32x2_t -# endif +#if defined(HAVE_NEON_INTRINSICS) +#undef CAST_uint8x8_t +#undef CAST_uint32x2_t +#define CAST_uint8x8_t +#define CAST_uint32x2_t +#endif #endif #if defined(HAVE_SSE2_INTRINSICS) #if 0 -static void -printf_128(const char *str, __m128i var) +static void printf_128(const char *str, __m128i var) { uint16_t *val = (uint16_t*) &var; printf(" * %s: %04x %04x %04x %04x _ %04x %04x %04x %04x\n", @@ -373,8 +363,7 @@ printf_128(const char *str, __m128i var) } #endif -static SDL_INLINE int -hasSSE2() +static SDL_INLINE int hasSSE2() { static int val = -1; if (val != -1) { @@ -384,8 +373,7 @@ hasSSE2() return val; } -static SDL_INLINE void -INTERPOL_BILINEAR_SSE(const Uint32 *s0, const Uint32 *s1, int frac_w, __m128i v_frac_h0, __m128i v_frac_h1, Uint32 *dst, __m128i zero) +static SDL_INLINE void INTERPOL_BILINEAR_SSE(const Uint32 *s0, const Uint32 *s1, int frac_w, __m128i v_frac_h0, __m128i v_frac_h1, Uint32 *dst, __m128i zero) { __m128i x_00_01, x_10_11; /* Pixels in 4*uint8 in row */ __m128i v_frac_w0, k0, l0, d0, e0; @@ -395,8 +383,7 @@ INTERPOL_BILINEAR_SSE(const Uint32 *s0, const Uint32 *s1, int frac_w, __m128i v_ f2 = FRAC_ONE - frac_w; v_frac_w0 = _mm_set_epi16(f, f2, f, f2, f, f2, f, f2); - - x_00_01 = _mm_loadl_epi64((const __m128i *)s0); /* Load x00 and x01 */ + x_00_01 = _mm_loadl_epi64((const __m128i *)s0); /* Load x00 and x01 */ x_10_11 = _mm_loadl_epi64((const __m128i *)s1); /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */ @@ -423,8 +410,7 @@ INTERPOL_BILINEAR_SSE(const Uint32 *s0, const Uint32 *s1, int frac_w, __m128i v_ *dst = _mm_cvtsi128_si32(e0); } -static int -scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { BILINEAR___START @@ -453,7 +439,7 @@ scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *ds const Uint32 *s_00_01, *s_02_03, *s_10_11, *s_12_13; - __m128i x_00_01, x_10_11, x_02_03, x_12_13;/* Pixels in 4*uint8 in row */ + __m128i x_00_01, x_10_11, x_02_03, x_12_13; /* Pixels in 4*uint8 in row */ __m128i v_frac_w0, k0, l0, d0, e0; __m128i v_frac_w1, k1, l1, d1, e1; @@ -464,15 +450,15 @@ scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *ds index_w_1 = 4 * SRC_INDEX(fp_sum_w); frac_w_1 = FRAC(fp_sum_w); fp_sum_w += fp_step_w; -/* - x00............ x01 x02...........x03 - . . . . . . - j0 f0 j1 j2 f1 j3 - . . . . . . - . . . . . . - . . . . . . - x10............ x11 x12...........x13 - */ + /* + x00............ x01 x02...........x03 + . . . . . . + j0 f0 j1 j2 f1 j3 + . . . . . . + . . . . . . + . . . . . . + x10............ x11 x12...........x13 + */ s_00_01 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_0); s_02_03 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_1); s_10_11 = (const Uint32 *)((const Uint8 *)src_h1 + index_w_0); @@ -546,8 +532,7 @@ scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *ds #if defined(HAVE_NEON_INTRINSICS) -static SDL_INLINE int -hasNEON() +static SDL_INLINE int hasNEON() { static int val = -1; if (val != -1) { @@ -557,8 +542,7 @@ hasNEON() return val; } -static SDL_INLINE void -INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1, int frac_w, uint8x8_t v_frac_h0, uint8x8_t v_frac_h1, Uint32 *dst) +static SDL_INLINE void INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1, int frac_w, uint8x8_t v_frac_h0, uint8x8_t v_frac_h1, Uint32 *dst) { uint8x8_t x_00_01, x_10_11; /* Pixels in 4*uint8 in row */ uint16x8_t k0; @@ -570,8 +554,8 @@ INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1, int frac_w, uint8x8_t x_10_11 = CAST_uint8x8_t vld1_u32(s1); /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */ - k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ - k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ + k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ + k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ /* k0 now contains 2 interpolated pixels { j0, j1 } */ l0 = vshll_n_u16(vget_low_u16(k0), PRECISION); @@ -580,9 +564,8 @@ INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1, int frac_w, uint8x8_t /* Shift and narrow */ d0 = vcombine_u16( - /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), - /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION) - ); + /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), + /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION)); /* Narrow again */ e0 = vmovn_u16(d0); @@ -591,8 +574,7 @@ INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1, int frac_w, uint8x8_t *dst = vget_lane_u32(CAST_uint32x2_t e0, 0); } - static int -scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { BILINEAR___START @@ -621,7 +603,7 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d const Uint32 *s_00_01, *s_02_03, *s_04_05, *s_06_07; const Uint32 *s_10_11, *s_12_13, *s_14_15, *s_16_17; - uint8x8_t x_00_01, x_10_11, x_02_03, x_12_13;/* Pixels in 4*uint8 in row */ + uint8x8_t x_00_01, x_10_11, x_02_03, x_12_13; /* Pixels in 4*uint8 in row */ uint8x8_t x_04_05, x_14_15, x_06_07, x_16_17; uint16x8_t k0, k1, k2, k3; @@ -631,17 +613,17 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d uint32x4_t f0; index_w_0 = 4 * SRC_INDEX(fp_sum_w); - frac_w_0 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; + frac_w_0 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; index_w_1 = 4 * SRC_INDEX(fp_sum_w); - frac_w_1 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; + frac_w_1 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; index_w_2 = 4 * SRC_INDEX(fp_sum_w); - frac_w_2 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; + frac_w_2 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; index_w_3 = 4 * SRC_INDEX(fp_sum_w); - frac_w_3 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; + frac_w_3 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; s_00_01 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_0); s_02_03 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_1); @@ -663,8 +645,8 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d x_16_17 = CAST_uint8x8_t vld1_u32(s_16_17); /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */ - k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ - k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ + k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ + k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ k1 = vmull_u8(x_02_03, v_frac_h1); k1 = vmlal_u8(k1, x_12_13, v_frac_h0); @@ -698,17 +680,15 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d /* shift and narrow */ d0 = vcombine_u16( - /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), - /* uint16x4_t */ vshrn_n_u32(l1, 2 * PRECISION) - ); + /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), + /* uint16x4_t */ vshrn_n_u32(l1, 2 * PRECISION)); /* narrow again */ e0 = vmovn_u16(d0); /* Shift and narrow */ d1 = vcombine_u16( - /* uint16x4_t */ vshrn_n_u32(l2, 2 * PRECISION), - /* uint16x4_t */ vshrn_n_u32(l3, 2 * PRECISION) - ); + /* uint16x4_t */ vshrn_n_u32(l2, 2 * PRECISION), + /* uint16x4_t */ vshrn_n_u32(l3, 2 * PRECISION)); /* Narrow again */ e1 = vmovn_u16(d1); @@ -724,41 +704,41 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d int index_w_1, frac_w_1; const Uint32 *s_00_01, *s_02_03; const Uint32 *s_10_11, *s_12_13; - uint8x8_t x_00_01, x_10_11, x_02_03, x_12_13;/* Pixels in 4*uint8 in row */ + uint8x8_t x_00_01, x_10_11, x_02_03, x_12_13; /* Pixels in 4*uint8 in row */ uint16x8_t k0, k1; uint32x4_t l0, l1; uint16x8_t d0; uint8x8_t e0; index_w_0 = 4 * SRC_INDEX(fp_sum_w); - frac_w_0 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; + frac_w_0 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; index_w_1 = 4 * SRC_INDEX(fp_sum_w); - frac_w_1 = FRAC(fp_sum_w); - fp_sum_w += fp_step_w; -/* - x00............ x01 x02...........x03 - . . . . . . - j0 dest0 j1 j2 dest1 j3 - . . . . . . - . . . . . . - . . . . . . - x10............ x11 x12...........x13 -*/ + frac_w_1 = FRAC(fp_sum_w); + fp_sum_w += fp_step_w; + /* + x00............ x01 x02...........x03 + . . . . . . + j0 dest0 j1 j2 dest1 j3 + . . . . . . + . . . . . . + . . . . . . + x10............ x11 x12...........x13 + */ s_00_01 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_0); s_02_03 = (const Uint32 *)((const Uint8 *)src_h0 + index_w_1); s_10_11 = (const Uint32 *)((const Uint8 *)src_h1 + index_w_0); s_12_13 = (const Uint32 *)((const Uint8 *)src_h1 + index_w_1); /* Interpolation vertical */ - x_00_01 = CAST_uint8x8_t vld1_u32(s_00_01);/* Load 2 pixels */ + x_00_01 = CAST_uint8x8_t vld1_u32(s_00_01); /* Load 2 pixels */ x_02_03 = CAST_uint8x8_t vld1_u32(s_02_03); x_10_11 = CAST_uint8x8_t vld1_u32(s_10_11); x_12_13 = CAST_uint8x8_t vld1_u32(s_12_13); /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */ - k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ - k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ + k0 = vmull_u8(x_00_01, v_frac_h1); /* k0 := x0 * (1 - frac) */ + k0 = vmlal_u8(k0, x_10_11, v_frac_h0); /* k0 += x1 * frac */ k1 = vmull_u8(x_02_03, v_frac_h1); k1 = vmlal_u8(k1, x_12_13, v_frac_h0); @@ -777,9 +757,8 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d /* Shift and narrow */ d0 = vcombine_u16( - /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), - /* uint16x4_t */ vshrn_n_u32(l1, 2 * PRECISION) - ); + /* uint16x4_t */ vshrn_n_u32(l0, 2 * PRECISION), + /* uint16x4_t */ vshrn_n_u32(l1, 2 * PRECISION)); /* Narrow again */ e0 = vmovn_u16(d0); @@ -813,9 +792,8 @@ scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *d } #endif -int -SDL_LowerSoftStretchLinear(SDL_Surface *s, const SDL_Rect *srcrect, - SDL_Surface *d, const SDL_Rect *dstrect) +int SDL_LowerSoftStretchLinear(SDL_Surface *s, const SDL_Rect *srcrect, + SDL_Surface *d, const SDL_Rect *dstrect) { int ret = -1; int src_w = srcrect->w; @@ -824,8 +802,8 @@ SDL_LowerSoftStretchLinear(SDL_Surface *s, const SDL_Rect *srcrect, int dst_h = dstrect->h; int src_pitch = s->pitch; int dst_pitch = d->pitch; - Uint32 *src = (Uint32 *) ((Uint8 *)s->pixels + srcrect->x * 4 + srcrect->y * src_pitch); - Uint32 *dst = (Uint32 *) ((Uint8 *)d->pixels + dstrect->x * 4 + dstrect->y * dst_pitch); + Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * 4 + srcrect->y * src_pitch); + Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * 4 + dstrect->y * dst_pitch); #if defined(HAVE_NEON_INTRINSICS) if (ret == -1 && hasNEON()) { @@ -846,30 +824,27 @@ SDL_LowerSoftStretchLinear(SDL_Surface *s, const SDL_Rect *srcrect, return ret; } - -#define SDL_SCALE_NEAREST__START \ - int i; \ - Uint32 posy, incy; \ - Uint32 posx, incx; \ - int dst_gap; \ - int srcy, n; \ - const Uint32 *src_h0; \ - incy = (src_h << 16) / dst_h; \ - incx = (src_w << 16) / dst_w; \ - dst_gap = dst_pitch - bpp * dst_w; \ - posy = incy / 2; \ - -#define SDL_SCALE_NEAREST__HEIGHT \ - srcy = (posy >> 16); \ - src_h0 = (const Uint32 *)((const Uint8 *)src_ptr + srcy * src_pitch); \ - posy += incy; \ - posx = incx / 2; \ +#define SDL_SCALE_NEAREST__START \ + int i; \ + Uint32 posy, incy; \ + Uint32 posx, incx; \ + int dst_gap; \ + int srcy, n; \ + const Uint32 *src_h0; \ + incy = (src_h << 16) / dst_h; \ + incx = (src_w << 16) / dst_w; \ + dst_gap = dst_pitch - bpp * dst_w; \ + posy = incy / 2; + +#define SDL_SCALE_NEAREST__HEIGHT \ + srcy = (posy >> 16); \ + src_h0 = (const Uint32 *)((const Uint8 *)src_ptr + srcy * src_pitch); \ + posy += incy; \ + posx = incx / 2; \ n = dst_w; - -static int -scale_mat_nearest_1(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, - Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_nearest_1(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, + Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { Uint32 bpp = 1; SDL_SCALE_NEAREST__START @@ -880,17 +855,16 @@ scale_mat_nearest_1(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, int srcx = bpp * (posx >> 16); posx += incx; src = (const Uint8 *)src_h0 + srcx; - *(Uint8*)dst = *src; - dst = (Uint32 *)((Uint8*)dst + bpp); + *(Uint8 *)dst = *src; + dst = (Uint32 *)((Uint8 *)dst + bpp); } dst = (Uint32 *)((Uint8 *)dst + dst_gap); } return 0; } -static int -scale_mat_nearest_2(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, - Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_nearest_2(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, + Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { Uint32 bpp = 2; SDL_SCALE_NEAREST__START @@ -901,17 +875,16 @@ scale_mat_nearest_2(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, int srcx = bpp * (posx >> 16); posx += incx; src = (const Uint16 *)((const Uint8 *)src_h0 + srcx); - *(Uint16*)dst = *src; - dst = (Uint32 *)((Uint8*)dst + bpp); + *(Uint16 *)dst = *src; + dst = (Uint32 *)((Uint8 *)dst + bpp); } dst = (Uint32 *)((Uint8 *)dst + dst_gap); } return 0; } -static int -scale_mat_nearest_3(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, - Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_nearest_3(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, + Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { Uint32 bpp = 3; SDL_SCALE_NEAREST__START @@ -922,19 +895,18 @@ scale_mat_nearest_3(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, int srcx = bpp * (posx >> 16); posx += incx; src = (const Uint8 *)src_h0 + srcx; - ((Uint8*)dst)[0] = src[0]; - ((Uint8*)dst)[1] = src[1]; - ((Uint8*)dst)[2] = src[2]; - dst = (Uint32 *)((Uint8*)dst + bpp); + ((Uint8 *)dst)[0] = src[0]; + ((Uint8 *)dst)[1] = src[1]; + ((Uint8 *)dst)[2] = src[2]; + dst = (Uint32 *)((Uint8 *)dst + bpp); } dst = (Uint32 *)((Uint8 *)dst + dst_gap); } return 0; } -static int -scale_mat_nearest_4(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, - Uint32 *dst, int dst_w, int dst_h, int dst_pitch) +static int scale_mat_nearest_4(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, + Uint32 *dst, int dst_w, int dst_h, int dst_pitch) { Uint32 bpp = 4; SDL_SCALE_NEAREST__START @@ -946,16 +918,15 @@ scale_mat_nearest_4(const Uint32 *src_ptr, int src_w, int src_h, int src_pitch, posx += incx; src = (const Uint32 *)((const Uint8 *)src_h0 + srcx); *dst = *src; - dst = (Uint32 *)((Uint8*)dst + bpp); + dst = (Uint32 *)((Uint8 *)dst + bpp); } dst = (Uint32 *)((Uint8 *)dst + dst_gap); } return 0; } -int -SDL_LowerSoftStretchNearest(SDL_Surface *s, const SDL_Rect *srcrect, - SDL_Surface *d, const SDL_Rect *dstrect) +int SDL_LowerSoftStretchNearest(SDL_Surface *s, const SDL_Rect *srcrect, + SDL_Surface *d, const SDL_Rect *dstrect) { int src_w = srcrect->w; int src_h = srcrect->h; @@ -963,11 +934,11 @@ SDL_LowerSoftStretchNearest(SDL_Surface *s, const SDL_Rect *srcrect, int dst_h = dstrect->h; int src_pitch = s->pitch; int dst_pitch = d->pitch; - + const int bpp = d->format->BytesPerPixel; - Uint32 *src = (Uint32 *) ((Uint8 *)s->pixels + srcrect->x * bpp + srcrect->y * src_pitch); - Uint32 *dst = (Uint32 *) ((Uint8 *)d->pixels + dstrect->x * bpp + dstrect->y * dst_pitch); + Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * bpp + srcrect->y * src_pitch); + Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * bpp + dstrect->y * dst_pitch); if (bpp == 4) { return scale_mat_nearest_4(src, src_w, src_h, src_pitch, dst, dst_w, dst_h, dst_pitch); diff --git a/modules/SDL2/src/video/SDL_surface.c b/modules/SDL2/src/video/SDL_surface.c index e0368e8..a81ff7b 100644 --- a/modules/SDL2/src/video/SDL_surface.c +++ b/modules/SDL2/src/video/SDL_surface.c @@ -28,10 +28,9 @@ #include "SDL_yuv_c.h" #include "../render/SDL_sysrender.h" - /* Check to make sure we can safely check multiplication of surface w and pitch and it won't overflow size_t */ SDL_COMPILE_TIME_ASSERT(surface_size_assumptions, - sizeof(int) == sizeof(Sint32) && sizeof(size_t) >= sizeof(Sint32)); + sizeof(int) == sizeof(Sint32) && sizeof(size_t) >= sizeof(Sint32)); SDL_COMPILE_TIME_ASSERT(can_indicate_overflow, SDL_SIZE_MAX > SDL_MAX_SINT32); @@ -40,13 +39,14 @@ SDL_COMPILE_TIME_ASSERT(can_indicate_overflow, SDL_SIZE_MAX > SDL_MAX_SINT32); /* * Calculate the pad-aligned scanline width of a surface. * Return SDL_SIZE_MAX on overflow. + * + * for FOURCC, use SDL_CalculateYUVSize() */ -static size_t -SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal) +static size_t SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal) { size_t pitch; - if (SDL_ISPIXELFORMAT_FOURCC(format) || SDL_BITSPERPIXEL(format) >= 8) { + if (SDL_BITSPERPIXEL(format) >= 8) { if (SDL_size_mul_overflow(width, SDL_BYTESPERPIXEL(format), &pitch)) { return SDL_SIZE_MAX; } @@ -74,8 +74,7 @@ SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal) * Create an empty RGB surface of the appropriate depth using the given * enum SDL_PIXELFORMAT_* format */ -SDL_Surface * -SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, +SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format) { size_t pitch; @@ -94,15 +93,20 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, return NULL; } - pitch = SDL_CalculatePitch(format, width, SDL_FALSE); - if (pitch > SDL_MAX_SINT32) { - /* Overflow... */ - SDL_OutOfMemory(); + if (SDL_ISPIXELFORMAT_FOURCC(format)) { + SDL_SetError("invalid format"); return NULL; + } else { + pitch = SDL_CalculatePitch(format, width, SDL_FALSE); + if (pitch > SDL_MAX_SINT32) { + /* Overflow... */ + SDL_OutOfMemory(); + return NULL; + } } /* Allocate the surface */ - surface = (SDL_Surface *) SDL_calloc(1, sizeof(*surface)); + surface = (SDL_Surface *)SDL_calloc(1, sizeof(*surface)); if (surface == NULL) { SDL_OutOfMemory(); return NULL; @@ -121,7 +125,7 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, if (SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { SDL_Palette *palette = SDL_AllocPalette((1 << surface->format->BitsPerPixel)); - if (!palette) { + if (palette == NULL) { SDL_FreeSurface(surface); return NULL; } @@ -181,8 +185,7 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, /* * Create an empty RGB surface of the appropriate depth */ -SDL_Surface * -SDL_CreateRGBSurface(Uint32 flags, +SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) { @@ -201,8 +204,7 @@ SDL_CreateRGBSurface(Uint32 flags, /* * Create an RGB surface from an existing memory buffer */ -SDL_Surface * -SDL_CreateRGBSurfaceFrom(void *pixels, +SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) @@ -230,7 +232,7 @@ SDL_CreateRGBSurfaceFrom(void *pixels, minimalPitch = SDL_CalculatePitch(format, width, SDL_TRUE); - if (pitch < 0 || (pitch > 0 && ((size_t) pitch) < minimalPitch)) { + if (pitch < 0 || (pitch > 0 && ((size_t)pitch) < minimalPitch)) { SDL_InvalidParamError("pitch"); return NULL; } @@ -252,8 +254,7 @@ SDL_CreateRGBSurfaceFrom(void *pixels, * Create an RGB surface from an existing memory buffer using the given given * enum SDL_PIXELFORMAT_* format */ -SDL_Surface * -SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, +SDL_Surface *SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 format) { @@ -270,9 +271,14 @@ SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, return NULL; } - minimalPitch = SDL_CalculatePitch(format, width, SDL_TRUE); + if (SDL_ISPIXELFORMAT_FOURCC(format)) { + SDL_SetError("invalid format"); + return NULL; + } else { + minimalPitch = SDL_CalculatePitch(format, width, SDL_TRUE); + } - if (pitch < 0 || (pitch > 0 && ((size_t) pitch) < minimalPitch)) { + if (pitch < 0 || (pitch > 0 && ((size_t)pitch) < minimalPitch)) { SDL_InvalidParamError("pitch"); return NULL; } @@ -289,10 +295,9 @@ SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, return surface; } -int -SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette) +int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette) { - if (!surface) { + if (surface == NULL) { return SDL_InvalidParamError("SDL_SetSurfacePalette(): surface"); } if (SDL_SetPixelFormatPalette(surface->format, palette) < 0) { @@ -303,12 +308,11 @@ SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette) return 0; } -int -SDL_SetSurfaceRLE(SDL_Surface * surface, int flag) +int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag) { int flags; - if (!surface) { + if (surface == NULL) { return -1; } @@ -324,10 +328,9 @@ SDL_SetSurfaceRLE(SDL_Surface * surface, int flag) return 0; } -SDL_bool -SDL_HasSurfaceRLE(SDL_Surface * surface) +SDL_bool SDL_HasSurfaceRLE(SDL_Surface *surface) { - if (!surface) { + if (surface == NULL) { return SDL_FALSE; } @@ -338,16 +341,15 @@ SDL_HasSurfaceRLE(SDL_Surface * surface) return SDL_TRUE; } -int -SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key) +int SDL_SetColorKey(SDL_Surface *surface, int flag, Uint32 key) { int flags; - if (!surface) { + if (surface == NULL) { return SDL_InvalidParamError("surface"); } - if (surface->format->palette && key >= ((Uint32) surface->format->palette->ncolors)) { + if (surface->format->palette && key >= ((Uint32)surface->format->palette->ncolors)) { return SDL_InvalidParamError("key"); } @@ -369,10 +371,9 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key) return 0; } -SDL_bool -SDL_HasColorKey(SDL_Surface * surface) +SDL_bool SDL_HasColorKey(SDL_Surface *surface) { - if (!surface) { + if (surface == NULL) { return SDL_FALSE; } @@ -383,10 +384,9 @@ SDL_HasColorKey(SDL_Surface * surface) return SDL_TRUE; } -int -SDL_GetColorKey(SDL_Surface * surface, Uint32 * key) +int SDL_GetColorKey(SDL_Surface *surface, Uint32 *key) { - if (!surface) { + if (surface == NULL) { return SDL_InvalidParamError("surface"); } @@ -400,14 +400,13 @@ SDL_GetColorKey(SDL_Surface * surface, Uint32 * key) return 0; } -/* This is a fairly slow function to switch from colorkey to alpha +/* This is a fairly slow function to switch from colorkey to alpha NB: it doesn't handle bpp 1 or 3, because they have no alpha channel */ -static void -SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) +static void SDL_ConvertColorkeyToAlpha(SDL_Surface *surface, SDL_bool ignore_alpha) { int x, y, bpp; - if (!surface) { + if (surface == NULL) { return; } @@ -422,13 +421,13 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) if (bpp == 2) { Uint16 *row, *spot; - Uint16 ckey = (Uint16) surface->map->info.colorkey; - Uint16 mask = (Uint16) (~surface->format->Amask); + Uint16 ckey = (Uint16)surface->map->info.colorkey; + Uint16 mask = (Uint16)(~surface->format->Amask); /* Ignore, or not, alpha in colorkey comparison */ if (ignore_alpha) { ckey &= mask; - row = (Uint16 *) surface->pixels; + row = (Uint16 *)surface->pixels; for (y = surface->h; y--;) { spot = row; for (x = surface->w; x--;) { @@ -440,7 +439,7 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) row += surface->pitch / 2; } } else { - row = (Uint16 *) surface->pixels; + row = (Uint16 *)surface->pixels; for (y = surface->h; y--;) { spot = row; for (x = surface->w; x--;) { @@ -460,7 +459,7 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) /* Ignore, or not, alpha in colorkey comparison */ if (ignore_alpha) { ckey &= mask; - row = (Uint32 *) surface->pixels; + row = (Uint32 *)surface->pixels; for (y = surface->h; y--;) { spot = row; for (x = surface->w; x--;) { @@ -472,7 +471,7 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) row += surface->pitch / 4; } } else { - row = (Uint32 *) surface->pixels; + row = (Uint32 *)surface->pixels; for (y = surface->h; y--;) { spot = row; for (x = surface->w; x--;) { @@ -492,12 +491,11 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha) SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND); } -int -SDL_SetSurfaceColorMod(SDL_Surface * surface, Uint8 r, Uint8 g, Uint8 b) +int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b) { int flags; - if (!surface) { + if (surface == NULL) { return -1; } @@ -517,11 +515,9 @@ SDL_SetSurfaceColorMod(SDL_Surface * surface, Uint8 r, Uint8 g, Uint8 b) return 0; } - -int -SDL_GetSurfaceColorMod(SDL_Surface * surface, Uint8 * r, Uint8 * g, Uint8 * b) +int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b) { - if (!surface) { + if (surface == NULL) { return -1; } @@ -537,12 +533,11 @@ SDL_GetSurfaceColorMod(SDL_Surface * surface, Uint8 * r, Uint8 * g, Uint8 * b) return 0; } -int -SDL_SetSurfaceAlphaMod(SDL_Surface * surface, Uint8 alpha) +int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha) { int flags; - if (!surface) { + if (surface == NULL) { return -1; } @@ -560,10 +555,9 @@ SDL_SetSurfaceAlphaMod(SDL_Surface * surface, Uint8 alpha) return 0; } -int -SDL_GetSurfaceAlphaMod(SDL_Surface * surface, Uint8 * alpha) +int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha) { - if (!surface) { + if (surface == NULL) { return -1; } @@ -573,12 +567,11 @@ SDL_GetSurfaceAlphaMod(SDL_Surface * surface, Uint8 * alpha) return 0; } -int -SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode) +int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode) { int flags, status; - if (!surface) { + if (surface == NULL) { return -1; } @@ -613,19 +606,17 @@ SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode) return status; } -int -SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode) +int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode) { - if (!surface) { + if (surface == NULL) { return -1; } - if (!blendMode) { + if (blendMode == NULL) { return 0; } - switch (surface->map-> - info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL)) { + switch (surface->map->info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL)) { case SDL_COPY_BLEND: *blendMode = SDL_BLENDMODE_BLEND; break; @@ -645,13 +636,12 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode) return 0; } -SDL_bool -SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect) +SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect) { SDL_Rect full_rect; /* Don't do anything if there's no surface to act on */ - if (!surface) { + if (surface == NULL) { return SDL_FALSE; } @@ -662,15 +652,14 @@ SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect) full_rect.h = surface->h; /* Set the clipping rectangle */ - if (!rect) { + if (rect == NULL) { surface->clip_rect = full_rect; return SDL_TRUE; } return SDL_IntersectRect(rect, &full_rect, &surface->clip_rect); } -void -SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect) +void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect) { if (surface && rect) { *rect = surface->clip_rect; @@ -688,9 +677,8 @@ SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect) * you know exactly what you are doing, you can optimize your code * by calling the one(s) you need. */ -int -SDL_LowerBlit(SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect) +int SDL_LowerBlit(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) { /* Check to make sure the blit mapping is valid */ if ((src->map->dst != dst) || @@ -699,27 +687,25 @@ SDL_LowerBlit(SDL_Surface * src, SDL_Rect * srcrect, (src->format->palette && src->map->src_palette_version != src->format->palette->version)) { if (SDL_MapSurface(src, dst) < 0) { - return (-1); + return -1; } /* just here for debugging */ -/* printf */ -/* ("src = 0x%08X src->flags = %08X src->map->info.flags = %08x\ndst = 0x%08X dst->flags = %08X dst->map->info.flags = %08X\nsrc->map->blit = 0x%08x\n", */ -/* src, dst->flags, src->map->info.flags, dst, dst->flags, */ -/* dst->map->info.flags, src->map->blit); */ + /* printf */ + /* ("src = 0x%08X src->flags = %08X src->map->info.flags = %08x\ndst = 0x%08X dst->flags = %08X dst->map->info.flags = %08X\nsrc->map->blit = 0x%08x\n", */ + /* src, dst->flags, src->map->info.flags, dst, dst->flags, */ + /* dst->map->info.flags, src->map->blit); */ } - return (src->map->blit(src, srcrect, dst, dstrect)); + return src->map->blit(src, srcrect, dst, dstrect); } - -int -SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect) +int SDL_UpperBlit(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) { SDL_Rect fulldst; int srcx, srcy, w, h; /* Make sure the surfaces aren't locked */ - if (!src || !dst) { + if (src == NULL || dst == NULL) { return SDL_InvalidParamError("SDL_UpperBlit(): src/dst"); } if (src->locked || dst->locked) { @@ -746,8 +732,9 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, srcx = 0; } maxw = src->w - srcx; - if (maxw < w) + if (maxw < w) { w = maxw; + } srcy = srcrect->y; h = srcrect->h; @@ -757,8 +744,9 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, srcy = 0; } maxh = src->h - srcy; - if (maxh < h) + if (maxh < h) { h = maxh; + } } else { srcx = srcy = 0; @@ -778,8 +766,9 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, srcx += dx; } dx = dstrect->x + w - clip->x - clip->w; - if (dx > 0) + if (dx > 0) { w -= dx; + } dy = clip->y - dstrect->y; if (dy > 0) { @@ -788,8 +777,9 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, srcy += dy; } dy = dstrect->y + h - clip->y - clip->h; - if (dy > 0) + if (dy > 0) { h -= dy; + } } /* Switch back to a fast blit if we were previously stretching */ @@ -810,17 +800,14 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, return 0; } -int -SDL_UpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect) +int SDL_UpperBlitScaled(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) { return SDL_PrivateUpperBlitScaled(src, srcrect, dst, dstrect, SDL_ScaleModeNearest); } - -int -SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect, SDL_ScaleMode scaleMode) +int SDL_PrivateUpperBlitScaled(SDL_Surface *src, const SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect, SDL_ScaleMode scaleMode) { double src_x0, src_y0, src_x1, src_y1; double dst_x0, dst_y0, dst_x1, dst_y1; @@ -830,14 +817,14 @@ SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, int dst_w, dst_h; /* Make sure the surfaces aren't locked */ - if (!src || !dst) { + if (src == NULL || dst == NULL) { return SDL_InvalidParamError("SDL_UpperBlitScaled(): src/dst"); } if (src->locked || dst->locked) { return SDL_SetError("Surfaces must not be locked during blit"); } - if (NULL == srcrect) { + if (srcrect == NULL) { src_w = src->w; src_h = src->h; } else { @@ -845,7 +832,7 @@ SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, src_h = srcrect->h; } - if (NULL == dstrect) { + if (dstrect == NULL) { dst_w = dst->w; dst_h = dst->h; } else { @@ -861,7 +848,7 @@ SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, scaling_w = (double)dst_w / src_w; scaling_h = (double)dst_h / src_h; - if (NULL == dstrect) { + if (dstrect == NULL) { dst_x0 = 0; dst_y0 = 0; dst_x1 = dst_w; @@ -873,7 +860,7 @@ SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, dst_y1 = dst_y0 + dst_h; } - if (NULL == srcrect) { + if (srcrect == NULL) { src_x0 = 0; src_y0 = 0; src_x1 = src_w; @@ -981,22 +968,18 @@ SDL_PrivateUpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect, * This is a semi-private blit function and it performs low-level surface * scaled blitting only. */ -int -SDL_LowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect) +int SDL_LowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) { return SDL_PrivateLowerBlitScaled(src, srcrect, dst, dstrect, SDL_ScaleModeNearest); } -int -SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect, SDL_ScaleMode scaleMode) +int SDL_PrivateLowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect, SDL_ScaleMode scaleMode) { - static const Uint32 complex_copy_flags = ( - SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | - SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL | - SDL_COPY_COLORKEY - ); + static const Uint32 complex_copy_flags = (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | + SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL | + SDL_COPY_COLORKEY); if (srcrect->w > SDL_MAX_UINT16 || srcrect->h > SDL_MAX_UINT16 || dstrect->w > SDL_MAX_UINT16 || dstrect->h > SDL_MAX_UINT16) { @@ -1009,19 +992,19 @@ SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, } if (scaleMode == SDL_ScaleModeNearest) { - if ( !(src->map->info.flags & complex_copy_flags) && - src->format->format == dst->format->format && - !SDL_ISPIXELFORMAT_INDEXED(src->format->format) ) { - return SDL_SoftStretch( src, srcrect, dst, dstrect ); + if (!(src->map->info.flags & complex_copy_flags) && + src->format->format == dst->format->format && + !SDL_ISPIXELFORMAT_INDEXED(src->format->format)) { + return SDL_SoftStretch(src, srcrect, dst, dstrect); } else { - return SDL_LowerBlit( src, srcrect, dst, dstrect ); + return SDL_LowerBlit(src, srcrect, dst, dstrect); } } else { - if ( !(src->map->info.flags & complex_copy_flags) && - src->format->format == dst->format->format && - !SDL_ISPIXELFORMAT_INDEXED(src->format->format) && - src->format->BytesPerPixel == 4 && - src->format->format != SDL_PIXELFORMAT_ARGB2101010) { + if (!(src->map->info.flags & complex_copy_flags) && + src->format->format == dst->format->format && + !SDL_ISPIXELFORMAT_INDEXED(src->format->format) && + src->format->BytesPerPixel == 4 && + src->format->format != SDL_PIXELFORMAT_ARGB2101010) { /* fast path */ return SDL_SoftStretchLinear(src, srcrect, dst, dstrect); } else { @@ -1062,7 +1045,6 @@ SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, tmp1 = SDL_CreateRGBSurfaceWithFormat(flags, src->w, src->h, 0, fmt); SDL_LowerBlit(src, srcrect, tmp1, &tmprect); - srcrect2.x = 0; srcrect2.y = 0; SDL_SetSurfaceColorMod(tmp1, r, g, b); @@ -1101,15 +1083,14 @@ SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, /* * Lock a surface to directly access the pixels */ -int -SDL_LockSurface(SDL_Surface * surface) +int SDL_LockSurface(SDL_Surface *surface) { if (!surface->locked) { #if SDL_HAVE_RLE /* Perform the lock */ if (surface->flags & SDL_RLEACCEL) { SDL_UnRLESurface(surface, 1); - surface->flags |= SDL_RLEACCEL; /* save accel'd state */ + surface->flags |= SDL_RLEACCEL; /* save accel'd state */ } #endif } @@ -1118,14 +1099,13 @@ SDL_LockSurface(SDL_Surface * surface) ++surface->locked; /* Ready to go.. */ - return (0); + return 0; } /* * Unlock a previously locked surface */ -void -SDL_UnlockSurface(SDL_Surface * surface) +void SDL_UnlockSurface(SDL_Surface *surface) { /* Only perform an unlock if we are locked */ if (!surface->locked || (--surface->locked > 0)) { @@ -1135,7 +1115,7 @@ SDL_UnlockSurface(SDL_Surface * surface) #if SDL_HAVE_RLE /* Update RLE encoded surface with new data */ if ((surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL) { - surface->flags &= ~SDL_RLEACCEL; /* stop lying */ + surface->flags &= ~SDL_RLEACCEL; /* stop lying */ SDL_RLESurface(surface); } #endif @@ -1144,8 +1124,7 @@ SDL_UnlockSurface(SDL_Surface * surface) /* * Creates a new surface identical to the existing surface */ -SDL_Surface * -SDL_DuplicateSurface(SDL_Surface * surface) +SDL_Surface *SDL_DuplicateSurface(SDL_Surface *surface) { return SDL_ConvertSurface(surface, surface->format, surface->flags); } @@ -1153,8 +1132,7 @@ SDL_DuplicateSurface(SDL_Surface * surface) /* * Convert a surface into the specified pixel format. */ -SDL_Surface * -SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, +SDL_Surface *SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, Uint32 flags) { SDL_Surface *convert; @@ -1168,11 +1146,11 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, Uint8 *palette_saved_alpha = NULL; int palette_saved_alpha_ncolors = 0; - if (!surface) { + if (surface == NULL) { SDL_InvalidParamError("surface"); return NULL; } - if (!format) { + if (format == NULL) { SDL_InvalidParamError("format"); return NULL; } @@ -1181,14 +1159,13 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, if (format->palette != NULL) { int i; for (i = 0; i < format->palette->ncolors; ++i) { - if ((format->palette->colors[i].r != 0xFF) || - (format->palette->colors[i].g != 0xFF) || - (format->palette->colors[i].b != 0xFF)) + if ((format->palette->colors[i].r != 0xFF) || (format->palette->colors[i].g != 0xFF) || (format->palette->colors[i].b != 0xFF)) { break; + } } if (i == format->palette->ncolors) { SDL_SetError("Empty destination palette"); - return (NULL); + return NULL; } } @@ -1198,7 +1175,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, format->Gmask, format->Bmask, format->Amask); if (convert == NULL) { - return (NULL); + return NULL; } /* Copy the palette if any */ @@ -1290,8 +1267,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, convert->map->info.a = copy_color.a; convert->map->info.flags = (copy_flags & - ~(SDL_COPY_COLORKEY | SDL_COPY_BLEND - | SDL_COPY_RLE_DESIRED | SDL_COPY_RLE_COLORKEY | + ~(SDL_COPY_COLORKEY | SDL_COPY_BLEND | SDL_COPY_RLE_DESIRED | SDL_COPY_RLE_COLORKEY | SDL_COPY_RLE_ALPHAKEY)); surface->map->info.r = copy_color.r; surface->map->info.g = copy_color.g; @@ -1314,7 +1290,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, if (format->palette && surface->format->palette->ncolors <= format->palette->ncolors && (SDL_memcmp(surface->format->palette->colors, format->palette->colors, - surface->format->palette->ncolors * sizeof(SDL_Color)) == 0)) { + surface->format->palette->ncolors * sizeof(SDL_Color)) == 0)) { /* The palette is identical, just set the same colorkey */ SDL_SetColorKey(convert, 1, surface->map->info.colorkey); } else if (!format->palette) { @@ -1384,11 +1360,10 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, } /* We're ready to go! */ - return (convert); + return convert; } -SDL_Surface * -SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format, +SDL_Surface *SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format, Uint32 flags) { SDL_PixelFormat *fmt; @@ -1405,10 +1380,9 @@ SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format, /* * Create a surface on the stack for quick blit operations */ -static SDL_INLINE SDL_bool -SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format, - void * pixels, int pitch, SDL_Surface * surface, - SDL_PixelFormat * format, SDL_BlitMap * blitmap) +static SDL_INLINE SDL_bool SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format, + void *pixels, int pitch, SDL_Surface *surface, + SDL_PixelFormat *format, SDL_BlitMap *blitmap) { if (SDL_ISPIXELFORMAT_INDEXED(pixel_format)) { SDL_SetError("Indexed pixel formats not supported"); @@ -1445,23 +1419,23 @@ SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format, * Copy a block of pixels of one format to another format */ int SDL_ConvertPixels(int width, int height, - Uint32 src_format, const void * src, int src_pitch, - Uint32 dst_format, void * dst, int dst_pitch) + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { SDL_Surface src_surface, dst_surface; SDL_PixelFormat src_fmt, dst_fmt; SDL_BlitMap src_blitmap, dst_blitmap; SDL_Rect rect; - void *nonconst_src = (void *) src; + void *nonconst_src = (void *)src; int ret; - if (!src) { + if (src == NULL) { return SDL_InvalidParamError("src"); } if (!src_pitch) { return SDL_InvalidParamError("src_pitch"); } - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("dst"); } if (!dst_pitch) { @@ -1489,8 +1463,8 @@ int SDL_ConvertPixels(int width, int height, width *= bpp; for (i = height; i--;) { SDL_memcpy(dst, src, width); - src = (const Uint8*)src + src_pitch; - dst = (Uint8*)dst + dst_pitch; + src = (const Uint8 *)src + src_pitch; + dst = (Uint8 *)dst + dst_pitch; } return 0; } @@ -1528,8 +1502,8 @@ int SDL_ConvertPixels(int width, int height, * https://developer.arm.com/documentation/101964/0201/Pre-multiplied-alpha-channel-data */ int SDL_PremultiplyAlpha(int width, int height, - Uint32 src_format, const void * src, int src_pitch, - Uint32 dst_format, void * dst, int dst_pitch) + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { int c; Uint32 srcpixel; @@ -1537,13 +1511,13 @@ int SDL_PremultiplyAlpha(int width, int height, Uint32 dstpixel; Uint32 dstR, dstG, dstB, dstA; - if (!src) { + if (src == NULL) { return SDL_InvalidParamError("src"); } if (!src_pitch) { return SDL_InvalidParamError("src_pitch"); } - if (!dst) { + if (dst == NULL) { return SDL_InvalidParamError("dst"); } if (!dst_pitch) { @@ -1583,8 +1557,7 @@ int SDL_PremultiplyAlpha(int width, int height, /* * Free a surface created by the above function. */ -void -SDL_FreeSurface(SDL_Surface * surface) +void SDL_FreeSurface(SDL_Surface *surface) { if (surface == NULL) { return; diff --git a/modules/SDL2/src/video/SDL_sysvideo.h b/modules/SDL2/src/video/SDL_sysvideo.h index 5475f5f..d7a42cc 100644 --- a/modules/SDL2/src/video/SDL_sysvideo.h +++ b/modules/SDL2/src/video/SDL_sysvideo.h @@ -44,7 +44,7 @@ struct SDL_WindowShaper SDL_Window *window; /* The user's specified coordinates for the window, for once we give it a shape. */ - Uint32 userx,usery; + Uint32 userx, usery; /* The parameters for shape calculation. */ SDL_WindowShapeMode mode; @@ -58,8 +58,8 @@ struct SDL_WindowShaper /* Define the SDL shape driver structure */ struct SDL_ShapeDriver { - SDL_WindowShaper *(*CreateShaper)(SDL_Window * window); - int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); + SDL_WindowShaper *(*CreateShaper)(SDL_Window *window); + int (*SetWindowShape)(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode); int (*ResizeWindowShape)(SDL_Window *window); }; @@ -101,7 +101,7 @@ struct SDL_Window SDL_bool is_hiding; SDL_bool is_destroying; - SDL_bool is_dropping; /* drag/drop in progress, expecting SDL_SendDropComplete(). */ + SDL_bool is_dropping; /* drag/drop in progress, expecting SDL_SendDropComplete(). */ SDL_Rect mouse_rect; @@ -117,9 +117,9 @@ struct SDL_Window SDL_Window *prev; SDL_Window *next; }; -#define FULLSCREEN_VISIBLE(W) \ +#define FULLSCREEN_VISIBLE(W) \ (((W)->flags & SDL_WINDOW_FULLSCREEN) && \ - ((W)->flags & SDL_WINDOW_SHOWN) && \ + ((W)->flags & SDL_WINDOW_SHOWN) && \ !((W)->flags & SDL_WINDOW_MINIMIZED)) /* @@ -147,11 +147,12 @@ struct SDL_VideoDisplay struct SDL_SysWMinfo; /* Define the SDL video driver structure */ -#define _THIS SDL_VideoDevice *_this +#define _THIS SDL_VideoDevice *_this /* Video device flags */ -typedef enum { - VIDEO_DEVICE_QUIRK_DISABLE_DISPLAY_MODE_SWITCHING = 0x01, +typedef enum +{ + VIDEO_DEVICE_QUIRK_DISABLE_DISPLAY_MODE_SWITCHING = 0x01, VIDEO_DEVICE_QUIRK_DISABLE_UNSET_FULLSCREEN_ON_MINIMIZE = 0x02, } DeviceQuirkFlags; @@ -168,43 +169,48 @@ struct SDL_VideoDevice * Initialize the native video subsystem, filling in the list of * displays for this driver, returning 0 or -1 if there's an error. */ - int (*VideoInit) (_THIS); + int (*VideoInit)(_THIS); /* * Reverse the effects VideoInit() -- called if VideoInit() fails or * if the application is shutting down the video subsystem. */ - void (*VideoQuit) (_THIS); + void (*VideoQuit)(_THIS); /* * Reinitialize the touch devices -- called if an unknown touch ID occurs. */ - void (*ResetTouch) (_THIS); + void (*ResetTouch)(_THIS); /* * * */ /* * Display functions */ + /* + * Refresh the display list + */ + void (*RefreshDisplays)(_THIS); + /* * Get the bounds of a display */ - int (*GetDisplayBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); + int (*GetDisplayBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); /* * Get the usable bounds of a display (bounds minus menubar or whatever) */ - int (*GetDisplayUsableBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); + int (*GetDisplayUsableBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); /* * Get the dots/pixels-per-inch of a display */ - int (*GetDisplayDPI) (_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi); + int (*GetDisplayDPI)(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi); /* * Get a list of the available display modes for a display. */ - void (*GetDisplayModes) (_THIS, SDL_VideoDisplay * display); + void (*GetDisplayModes)(_THIS, SDL_VideoDisplay *display); /* * Setting the display mode is independent of creating windows, so @@ -212,21 +218,21 @@ struct SDL_VideoDevice * their data updated accordingly, including the display surfaces * associated with them. */ - int (*SetDisplayMode) (_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); + int (*SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); /* * * */ /* * Window functions */ - int (*CreateSDLWindow) (_THIS, SDL_Window * window); - int (*CreateSDLWindowFrom) (_THIS, SDL_Window * window, const void *data); - void (*SetWindowTitle) (_THIS, SDL_Window * window); - void (*SetWindowIcon) (_THIS, SDL_Window * window, SDL_Surface * icon); - void (*SetWindowPosition) (_THIS, SDL_Window * window); - void (*SetWindowSize) (_THIS, SDL_Window * window); - void (*SetWindowMinimumSize) (_THIS, SDL_Window * window); - void (*SetWindowMaximumSize) (_THIS, SDL_Window * window); - int (*GetWindowBordersSize) (_THIS, SDL_Window * window, int *top, int *left, int *bottom, int *right); + int (*CreateSDLWindow)(_THIS, SDL_Window *window); + int (*CreateSDLWindowFrom)(_THIS, SDL_Window *window, const void *data); + void (*SetWindowTitle)(_THIS, SDL_Window *window); + void (*SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon); + void (*SetWindowPosition)(_THIS, SDL_Window *window); + void (*SetWindowSize)(_THIS, SDL_Window *window); + void (*SetWindowMinimumSize)(_THIS, SDL_Window *window); + void (*SetWindowMaximumSize)(_THIS, SDL_Window *window); + int (*GetWindowBordersSize)(_THIS, SDL_Window *window, int *top, int *left, int *bottom, int *right); void (*GetWindowSizeInPixels)(_THIS, SDL_Window *window, int *w, int *h); int (*SetWindowOpacity) (_THIS, SDL_Window * window, float opacity); int (*SetWindowModalFor) (_THIS, SDL_Window * modal_window, SDL_Window * parent_window); @@ -285,61 +291,61 @@ struct SDL_VideoDevice /* * Vulkan support */ - int (*Vulkan_LoadLibrary) (_THIS, const char *path); - void (*Vulkan_UnloadLibrary) (_THIS); - SDL_bool (*Vulkan_GetInstanceExtensions) (_THIS, SDL_Window *window, unsigned *count, const char **names); - SDL_bool (*Vulkan_CreateSurface) (_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface); - void (*Vulkan_GetDrawableSize) (_THIS, SDL_Window * window, int *w, int *h); + int (*Vulkan_LoadLibrary)(_THIS, const char *path); + void (*Vulkan_UnloadLibrary)(_THIS); + SDL_bool (*Vulkan_GetInstanceExtensions)(_THIS, SDL_Window *window, unsigned *count, const char **names); + SDL_bool (*Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface); + void (*Vulkan_GetDrawableSize)(_THIS, SDL_Window *window, int *w, int *h); /* * * */ /* * Metal support */ - SDL_MetalView (*Metal_CreateView) (_THIS, SDL_Window * window); - void (*Metal_DestroyView) (_THIS, SDL_MetalView view); - void *(*Metal_GetLayer) (_THIS, SDL_MetalView view); - void (*Metal_GetDrawableSize) (_THIS, SDL_Window * window, int *w, int *h); + SDL_MetalView (*Metal_CreateView)(_THIS, SDL_Window *window); + void (*Metal_DestroyView)(_THIS, SDL_MetalView view); + void *(*Metal_GetLayer)(_THIS, SDL_MetalView view); + void (*Metal_GetDrawableSize)(_THIS, SDL_Window *window, int *w, int *h); /* * * */ /* * Event manager functions */ - int (*WaitEventTimeout) (_THIS, int timeout); - void (*SendWakeupEvent) (_THIS, SDL_Window *window); - void (*PumpEvents) (_THIS); + int (*WaitEventTimeout)(_THIS, int timeout); + void (*SendWakeupEvent)(_THIS, SDL_Window *window); + void (*PumpEvents)(_THIS); /* Suspend the screensaver */ - void (*SuspendScreenSaver) (_THIS); + void (*SuspendScreenSaver)(_THIS); /* Text input */ - void (*StartTextInput) (_THIS); - void (*StopTextInput) (_THIS); - void (*SetTextInputRect) (_THIS, const SDL_Rect *rect); - void (*ClearComposition) (_THIS); - SDL_bool (*IsTextInputShown) (_THIS); + void (*StartTextInput)(_THIS); + void (*StopTextInput)(_THIS); + void (*SetTextInputRect)(_THIS, const SDL_Rect *rect); + void (*ClearComposition)(_THIS); + SDL_bool (*IsTextInputShown)(_THIS); /* Screen keyboard */ - SDL_bool (*HasScreenKeyboardSupport) (_THIS); - void (*ShowScreenKeyboard) (_THIS, SDL_Window *window); - void (*HideScreenKeyboard) (_THIS, SDL_Window *window); - SDL_bool (*IsScreenKeyboardShown) (_THIS, SDL_Window *window); + SDL_bool (*HasScreenKeyboardSupport)(_THIS); + void (*ShowScreenKeyboard)(_THIS, SDL_Window *window); + void (*HideScreenKeyboard)(_THIS, SDL_Window *window); + SDL_bool (*IsScreenKeyboardShown)(_THIS, SDL_Window *window); /* Clipboard */ - int (*SetClipboardText) (_THIS, const char *text); - char * (*GetClipboardText) (_THIS); - SDL_bool (*HasClipboardText) (_THIS); - int (*SetPrimarySelectionText) (_THIS, const char *text); - char * (*GetPrimarySelectionText) (_THIS); - SDL_bool (*HasPrimarySelectionText) (_THIS); + int (*SetClipboardText)(_THIS, const char *text); + char *(*GetClipboardText)(_THIS); + SDL_bool (*HasClipboardText)(_THIS); + int (*SetPrimarySelectionText)(_THIS, const char *text); + char *(*GetPrimarySelectionText)(_THIS); + SDL_bool (*HasPrimarySelectionText)(_THIS); /* MessageBox */ - int (*ShowMessageBox) (_THIS, const SDL_MessageBoxData *messageboxdata, int *buttonid); + int (*ShowMessageBox)(_THIS, const SDL_MessageBoxData *messageboxdata, int *buttonid); /* Hit-testing */ - int (*SetWindowHitTest)(SDL_Window * window, SDL_bool enabled); + int (*SetWindowHitTest)(SDL_Window *window, SDL_bool enabled); /* Tell window that app enabled drag'n'drop events */ - void (*AcceptDragAndDrop)(SDL_Window * window, SDL_bool accept); + void (*AcceptDragAndDrop)(SDL_Window *window, SDL_bool accept); /* * * */ /* Data common to all drivers */ @@ -437,14 +443,14 @@ struct SDL_VideoDevice /* * * */ /* The function used to dispose of this structure */ - void (*free) (_THIS); + void (*free)(_THIS); }; typedef struct VideoBootStrap { const char *name; const char *desc; - SDL_VideoDevice *(*create) (void); + SDL_VideoDevice *(*create)(void); } VideoBootStrap; /* Not all of these are available in a given build. Use #ifdefs, etc. */ @@ -480,37 +486,37 @@ extern VideoBootStrap OS2VMAN_bootstrap; /* Use SDL_OnVideoThread() sparingly, to avoid regressions in use cases that currently happen to work */ extern SDL_bool SDL_OnVideoThread(void); extern SDL_VideoDevice *SDL_GetVideoDevice(void); -extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode); -extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display, SDL_bool send_event); +extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode *desktop_mode); +extern int SDL_AddVideoDisplay(const SDL_VideoDisplay *display, SDL_bool send_event); extern void SDL_DelVideoDisplay(int index); -extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode); -extern void SDL_SetCurrentDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode); -extern void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode); +extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); +extern void SDL_SetCurrentDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); +extern void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); extern void SDL_ResetDisplayModes(int displayIndex); extern int SDL_GetIndexOfDisplay(SDL_VideoDisplay *display); extern SDL_VideoDisplay *SDL_GetDisplay(int displayIndex); extern SDL_VideoDisplay *SDL_GetDisplayForWindow(SDL_Window *window); -extern void *SDL_GetDisplayDriverData( int displayIndex ); +extern void *SDL_GetDisplayDriverData(int displayIndex); extern SDL_bool SDL_IsVideoContextExternal(void); extern int SDL_GetMessageBoxCount(void); -extern void SDL_GL_DeduceMaxSupportedESProfile(int* major, int* minor); +extern void SDL_GL_DeduceMaxSupportedESProfile(int *major, int *minor); -extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); +extern int SDL_RecreateWindow(SDL_Window *window, Uint32 flags); extern SDL_bool SDL_HasWindows(void); -extern void SDL_OnWindowShown(SDL_Window * window); -extern void SDL_OnWindowHidden(SDL_Window * window); -extern void SDL_OnWindowMoved(SDL_Window * window); -extern void SDL_OnWindowResized(SDL_Window * window); -extern void SDL_OnWindowMinimized(SDL_Window * window); -extern void SDL_OnWindowRestored(SDL_Window * window); -extern void SDL_OnWindowEnter(SDL_Window * window); -extern void SDL_OnWindowLeave(SDL_Window * window); -extern void SDL_OnWindowFocusGained(SDL_Window * window); -extern void SDL_OnWindowFocusLost(SDL_Window * window); -extern void SDL_UpdateWindowGrab(SDL_Window * window); -extern SDL_Window * SDL_GetFocusWindow(void); +extern void SDL_OnWindowShown(SDL_Window *window); +extern void SDL_OnWindowHidden(SDL_Window *window); +extern void SDL_OnWindowMoved(SDL_Window *window); +extern void SDL_OnWindowResized(SDL_Window *window); +extern void SDL_OnWindowMinimized(SDL_Window *window); +extern void SDL_OnWindowRestored(SDL_Window *window); +extern void SDL_OnWindowEnter(SDL_Window *window); +extern void SDL_OnWindowLeave(SDL_Window *window); +extern void SDL_OnWindowFocusGained(SDL_Window *window); +extern void SDL_OnWindowFocusLost(SDL_Window *window); +extern void SDL_UpdateWindowGrab(SDL_Window *window); +extern SDL_Window *SDL_GetFocusWindow(void); extern SDL_bool SDL_ShouldAllowTopmost(void); @@ -518,9 +524,9 @@ extern float SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vin extern void SDL_ToggleDragAndDropSupport(void); -extern int SDL_GetPointDisplayIndex(const SDL_Point * point); +extern int SDL_GetPointDisplayIndex(const SDL_Point *point); -extern int SDL_GL_SwapWindowWithResult(SDL_Window * window); +extern int SDL_GL_SwapWindowWithResult(SDL_Window *window); #endif /* SDL_sysvideo_h_ */ diff --git a/modules/SDL2/src/video/SDL_video.c b/modules/SDL2/src/video/SDL_video.c index ac07ccb..8065a0b 100644 --- a/modules/SDL2/src/video/SDL_video.c +++ b/modules/SDL2/src/video/SDL_video.c @@ -18,6 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ + #include "../SDL_internal.h" /* The high-level video driver subsystem */ @@ -62,7 +63,6 @@ #include #endif - /* Available video drivers */ static VideoBootStrap *bootstrap[] = { #if SDL_VIDEO_DRIVER_COCOA @@ -128,15 +128,15 @@ static VideoBootStrap *bootstrap[] = { #if SDL_VIDEO_DRIVER_QNX &QNX_bootstrap, #endif -#if SDL_VIDEO_DRIVER_OFFSCREEN - &OFFSCREEN_bootstrap, +#if SDL_VIDEO_DRIVER_OS2 + &OS2DIVE_bootstrap, + &OS2VMAN_bootstrap, #endif #if SDL_VIDEO_DRIVER_NGAGE &NGAGE_bootstrap, #endif -#if SDL_VIDEO_DRIVER_OS2 - &OS2DIVE_bootstrap, - &OS2VMAN_bootstrap, +#if SDL_VIDEO_DRIVER_OFFSCREEN + &OFFSCREEN_bootstrap, #endif #if SDL_VIDEO_DRIVER_DUMMY &DUMMY_bootstrap, @@ -147,25 +147,25 @@ static VideoBootStrap *bootstrap[] = { NULL }; -#define CHECK_WINDOW_MAGIC(window, retval) \ - if (!_this) { \ - SDL_UninitializedVideo(); \ - return retval; \ - } \ +#define CHECK_WINDOW_MAGIC(window, retval) \ + if (!_this) { \ + SDL_UninitializedVideo(); \ + return retval; \ + } \ if (!window || window->magic != &_this->window_magic) { \ - SDL_SetError("Invalid window"); \ - return retval; \ + SDL_SetError("Invalid window"); \ + return retval; \ } -#define CHECK_DISPLAY_INDEX(displayIndex, retval) \ - if (!_this) { \ - SDL_UninitializedVideo(); \ - return retval; \ - } \ +#define CHECK_DISPLAY_INDEX(displayIndex, retval) \ + if (!_this) { \ + SDL_UninitializedVideo(); \ + return retval; \ + } \ if (displayIndex < 0 || displayIndex >= _this->num_displays) { \ - SDL_SetError("displayIndex must be in the range 0 - %d", \ - _this->num_displays - 1); \ - return retval; \ + SDL_SetError("displayIndex must be in the range 0 - %d", \ + _this->num_displays - 1); \ + return retval; \ } #define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN) @@ -177,23 +177,22 @@ extern SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool sta #endif /* Convenience functions for reading driver flags */ -static SDL_bool -DisableDisplayModeSwitching(_THIS) +static SDL_bool DisableDisplayModeSwitching(_THIS) { return !!(_this->quirk_flags & VIDEO_DEVICE_QUIRK_DISABLE_DISPLAY_MODE_SWITCHING); } -static SDL_bool -DisableUnsetFullscreenOnMinimize(_THIS) +static SDL_bool DisableUnsetFullscreenOnMinimize(_THIS) { return !!(_this->quirk_flags & VIDEO_DEVICE_QUIRK_DISABLE_UNSET_FULLSCREEN_ON_MINIMIZE); } /* Support for framebuffer emulation using an accelerated renderer */ -#define SDL_WINDOWTEXTUREDATA "_SDL_WindowTextureData" +#define SDL_WINDOWTEXTUREDATA "_SDL_WindowTextureData" -typedef struct { +typedef struct +{ SDL_Renderer *renderer; SDL_Texture *texture; void *pixels; @@ -201,9 +200,7 @@ typedef struct { int bytes_per_pixel; } SDL_WindowTextureData; - -static Uint32 -SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this) +static Uint32 SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this) { #if (SDL_VIDEO_OPENGL && __MACOSX__) || (__IPHONEOS__ && !TARGET_OS_MACCATALYST) || __ANDROID__ || __NACL__ if (_this->GL_CreateContext != NULL) { @@ -218,22 +215,22 @@ SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this) return 0; } -static int -SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +static int SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { SDL_RendererInfo info; SDL_WindowTextureData *data = SDL_GetWindowData(window, SDL_WINDOWTEXTUREDATA); int i; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); - if (!data) { + if (data == NULL) { SDL_Renderer *renderer = NULL; const char *hint = SDL_GetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION); - const SDL_bool specific_accelerated_renderer = ( - hint && *hint != '0' && *hint != '1' && - SDL_strcasecmp(hint, "true") != 0 && - SDL_strcasecmp(hint, "false") != 0 && - SDL_strcasecmp(hint, "software") != 0 - ); + const SDL_bool specific_accelerated_renderer = (hint && *hint != '0' && *hint != '1' && + SDL_strcasecmp(hint, "true") != 0 && + SDL_strcasecmp(hint, "false") != 0 && + SDL_strcasecmp(hint, "software") != 0); /* Check to see if there's a specific driver requested */ if (specific_accelerated_renderer) { @@ -244,8 +241,10 @@ SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * fo break; } } - if (!renderer || (SDL_GetRendererInfo(renderer, &info) == -1)) { - if (renderer) { SDL_DestroyRenderer(renderer); } + if (renderer == NULL || (SDL_GetRendererInfo(renderer, &info) == -1)) { + if (renderer) { + SDL_DestroyRenderer(renderer); + } return SDL_SetError("Requested renderer for " SDL_HINT_FRAMEBUFFER_ACCELERATION " is not available"); } /* if it was specifically requested, even if SDL_RENDERER_ACCELERATED isn't set, we'll accept this renderer. */ @@ -255,24 +254,24 @@ SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * fo if (SDL_strcmp(info.name, "software") != 0) { renderer = SDL_CreateRenderer(window, i, 0); if (renderer && (SDL_GetRendererInfo(renderer, &info) == 0) && (info.flags & SDL_RENDERER_ACCELERATED)) { - break; /* this will work. */ + break; /* this will work. */ } - if (renderer) { /* wasn't accelerated, etc, skip it. */ + if (renderer) { /* wasn't accelerated, etc, skip it. */ SDL_DestroyRenderer(renderer); renderer = NULL; } } } - if (!renderer) { + if (renderer == NULL) { return SDL_SetError("No hardware accelerated renderers available"); } } - SDL_assert(renderer != NULL); /* should have explicitly checked this above. */ + SDL_assert(renderer != NULL); /* should have explicitly checked this above. */ /* Create the data after we successfully create the renderer (bug #1116) */ data = (SDL_WindowTextureData *)SDL_calloc(1, sizeof(*data)); - if (!data) { + if (data == NULL) { SDL_DestroyRenderer(renderer); return SDL_OutOfMemory(); } @@ -296,7 +295,7 @@ SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * fo /* Find the first format without an alpha channel */ *format = info.texture_formats[0]; - for (i = 0; i < (int) info.num_texture_formats; ++i) { + for (i = 0; i < (int)info.num_texture_formats; ++i) { if (!SDL_ISPIXELFORMAT_FOURCC(info.texture_formats[i]) && !SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) { *format = info.texture_formats[i]; @@ -306,19 +305,19 @@ SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * fo data->texture = SDL_CreateTexture(data->renderer, *format, SDL_TEXTUREACCESS_STREAMING, - window->w, window->h); + w, h); if (!data->texture) { /* codechecker_false_positive [Malloc] Static analyzer doesn't realize allocated `data` is saved to SDL_WINDOWTEXTUREDATA and not leaked here. */ - return -1; + return -1; /* NOLINT(clang-analyzer-unix.Malloc) */ } /* Create framebuffer data */ data->bytes_per_pixel = SDL_BYTESPERPIXEL(*format); - data->pitch = (((window->w * data->bytes_per_pixel) + 3) & ~3); + data->pitch = (((w * data->bytes_per_pixel) + 3) & ~3); { /* Make static analysis happy about potential SDL_malloc(0) calls. */ - const size_t allocsize = window->h * data->pitch; + const size_t allocsize = (size_t)h * data->pitch; data->pixels = SDL_malloc((allocsize > 0) ? allocsize : 1); if (!data->pixels) { return SDL_OutOfMemory(); @@ -337,23 +336,25 @@ SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window * window, Uint32 * fo static SDL_VideoDevice *_this = NULL; static SDL_atomic_t SDL_messagebox_count; -static int -SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window * window, const SDL_Rect * rects, int numrects) +static int SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window *window, const SDL_Rect *rects, int numrects) { SDL_WindowTextureData *data; SDL_Rect rect; void *src; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); data = SDL_GetWindowData(window, SDL_WINDOWTEXTUREDATA); - if (!data || !data->texture) { + if (data == NULL || !data->texture) { return SDL_SetError("No window texture data"); } /* Update a single rect that contains subrects for best DMA performance */ - if (SDL_GetSpanEnclosingRect(window->w, window->h, numrects, rects, &rect)) { + if (SDL_GetSpanEnclosingRect(w, h, numrects, rects, &rect)) { src = (void *)((Uint8 *)data->pixels + - rect.y * data->pitch + - rect.x * data->bytes_per_pixel); + rect.y * data->pitch + + rect.x * data->bytes_per_pixel); if (SDL_UpdateTexture(data->texture, &rect, src, data->pitch) < 0) { return -1; } @@ -367,13 +368,12 @@ SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window * window, const SDL_ return 0; } -static void -SDL_DestroyWindowTexture(SDL_VideoDevice *unused, SDL_Window * window) +static void SDL_DestroyWindowTexture(SDL_VideoDevice *unused, SDL_Window *window) { SDL_WindowTextureData *data; data = SDL_SetWindowData(window, SDL_WINDOWTEXTUREDATA, NULL); - if (!data) { + if (data == NULL) { return; } if (data->texture) { @@ -386,11 +386,10 @@ SDL_DestroyWindowTexture(SDL_VideoDevice *unused, SDL_Window * window) SDL_free(data); } -static int SDLCALL -cmpmodes(const void *A, const void *B) +static int SDLCALL cmpmodes(const void *A, const void *B) { - const SDL_DisplayMode *a = (const SDL_DisplayMode *) A; - const SDL_DisplayMode *b = (const SDL_DisplayMode *) B; + const SDL_DisplayMode *a = (const SDL_DisplayMode *)A; + const SDL_DisplayMode *b = (const SDL_DisplayMode *)B; if (a == b) { return 0; } else if (a->w != b->w) { @@ -407,20 +406,17 @@ cmpmodes(const void *A, const void *B) return 0; } -static int -SDL_UninitializedVideo() +static int SDL_UninitializedVideo() { return SDL_SetError("Video subsystem has not been initialized"); } -int -SDL_GetNumVideoDrivers(void) +int SDL_GetNumVideoDrivers(void) { return SDL_arraysize(bootstrap) - 1; } -const char * -SDL_GetVideoDriver(int index) +const char *SDL_GetVideoDriver(int index) { if (index >= 0 && index < SDL_GetNumVideoDrivers()) { return bootstrap[index]->name; @@ -431,8 +427,7 @@ SDL_GetVideoDriver(int index) /* * Initialize the video and event subsystems -- determine native pixel format */ -int -SDL_VideoInit(const char *driver_name) +int SDL_VideoInit(const char *driver_name) { SDL_VideoDevice *video; SDL_bool init_events = SDL_FALSE; @@ -475,8 +470,8 @@ SDL_VideoInit(const char *driver_name) } if (driver_name != NULL && *driver_name != 0) { const char *driver_attempt = driver_name; - while(driver_attempt != NULL && *driver_attempt != 0 && video == NULL) { - const char* driver_attempt_end = SDL_strchr(driver_attempt, ','); + while (driver_attempt != NULL && *driver_attempt != 0 && video == NULL) { + const char *driver_attempt_end = SDL_strchr(driver_attempt, ','); size_t driver_attempt_len = (driver_attempt_end != NULL) ? (driver_attempt_end - driver_attempt) : SDL_strlen(driver_attempt); @@ -506,7 +501,7 @@ SDL_VideoInit(const char *driver_name) SDL_SetError("No available video device"); goto pre_driver_error; } - + /* From this point on, use SDL_VideoQuit to cleanup on error, rather than pre_driver_error. */ _this = video; @@ -514,7 +509,6 @@ SDL_VideoInit(const char *driver_name) _this->next_object_id = 1; _this->thread = SDL_ThreadID(); - /* Set some very sane GL defaults */ _this->gl_config.driver_loaded = 0; _this->gl_config.dll_handle = NULL; @@ -576,30 +570,26 @@ pre_driver_error: return -1; } -const char * -SDL_GetCurrentVideoDriver() +const char *SDL_GetCurrentVideoDriver() { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } return _this->name; } -SDL_VideoDevice * -SDL_GetVideoDevice(void) +SDL_VideoDevice *SDL_GetVideoDevice(void) { return _this; } -SDL_bool -SDL_OnVideoThread() +SDL_bool SDL_OnVideoThread() { return (_this && SDL_ThreadID() == _this->thread) ? SDL_TRUE : SDL_FALSE; } -int -SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode) +int SDL_AddBasicVideoDisplay(const SDL_DisplayMode *desktop_mode) { SDL_VideoDisplay display; @@ -612,8 +602,7 @@ SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode) return SDL_AddVideoDisplay(&display, SDL_FALSE); } -int -SDL_AddVideoDisplay(const SDL_VideoDisplay * display, SDL_bool send_event) +int SDL_AddVideoDisplay(const SDL_VideoDisplay *display, SDL_bool send_event) { SDL_VideoDisplay *displays; int index = -1; @@ -645,8 +634,7 @@ SDL_AddVideoDisplay(const SDL_VideoDisplay * display, SDL_bool send_event) return index; } -void -SDL_DelVideoDisplay(int index) +void SDL_DelVideoDisplay(int index) { if (index < 0 || index >= _this->num_displays) { return; @@ -655,23 +643,22 @@ SDL_DelVideoDisplay(int index) SDL_SendDisplayEvent(&_this->displays[index], SDL_DISPLAYEVENT_DISCONNECTED, 0); if (index < (_this->num_displays - 1)) { - SDL_memmove(&_this->displays[index], &_this->displays[index+1], (_this->num_displays - index - 1)*sizeof(_this->displays[index])); + SDL_free(_this->displays[index].driverdata); + SDL_memmove(&_this->displays[index], &_this->displays[index + 1], (_this->num_displays - index - 1) * sizeof(_this->displays[index])); } --_this->num_displays; } -int -SDL_GetNumVideoDisplays(void) +int SDL_GetNumVideoDisplays(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return 0; } return _this->num_displays; } -int -SDL_GetIndexOfDisplay(SDL_VideoDisplay *display) +int SDL_GetIndexOfDisplay(SDL_VideoDisplay *display) { int displayIndex; @@ -685,36 +672,32 @@ SDL_GetIndexOfDisplay(SDL_VideoDisplay *display) return 0; } -void * -SDL_GetDisplayDriverData(int displayIndex) +void *SDL_GetDisplayDriverData(int displayIndex) { CHECK_DISPLAY_INDEX(displayIndex, NULL); return _this->displays[displayIndex].driverdata; } -SDL_bool -SDL_IsVideoContextExternal(void) +SDL_bool SDL_IsVideoContextExternal(void) { return SDL_GetHintBoolean(SDL_HINT_VIDEO_EXTERNAL_CONTEXT, SDL_FALSE); } -const char * -SDL_GetDisplayName(int displayIndex) +const char *SDL_GetDisplayName(int displayIndex) { CHECK_DISPLAY_INDEX(displayIndex, NULL); return _this->displays[displayIndex].name; } -int -SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect) +int SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect) { SDL_VideoDisplay *display; CHECK_DISPLAY_INDEX(displayIndex, -1); - if (!rect) { + if (rect == NULL) { return SDL_InvalidParamError("rect"); } @@ -731,7 +714,7 @@ SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect) rect->x = 0; rect->y = 0; } else { - SDL_GetDisplayBounds(displayIndex-1, rect); + SDL_GetDisplayBounds(displayIndex - 1, rect); rect->x += rect->w; } rect->w = display->current_mode.w; @@ -739,21 +722,19 @@ SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect) return 0; } -static int -ParseDisplayUsableBoundsHint(SDL_Rect *rect) +static int ParseDisplayUsableBoundsHint(SDL_Rect *rect) { const char *hint = SDL_GetHint(SDL_HINT_DISPLAY_USABLE_BOUNDS); return hint && (SDL_sscanf(hint, "%d,%d,%d,%d", &rect->x, &rect->y, &rect->w, &rect->h) == 4); } -int -SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect) +int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect) { SDL_VideoDisplay *display; CHECK_DISPLAY_INDEX(displayIndex, -1); - if (!rect) { + if (rect == NULL) { return SDL_InvalidParamError("rect"); } @@ -773,8 +754,7 @@ SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect) return SDL_GetDisplayBounds(displayIndex, rect); } -int -SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi) +int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi) { SDL_VideoDisplay *display; @@ -793,8 +773,7 @@ SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi) return -1; } -SDL_DisplayOrientation -SDL_GetDisplayOrientation(int displayIndex) +SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex) { SDL_VideoDisplay *display; @@ -804,8 +783,7 @@ SDL_GetDisplayOrientation(int displayIndex) return display->orientation; } -SDL_bool -SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) +SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode) { SDL_DisplayMode *modes; int i, nmodes; @@ -824,7 +802,7 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) modes = SDL_realloc(modes, (display->max_display_modes + 32) * sizeof(*modes)); - if (!modes) { + if (modes == NULL) { return SDL_FALSE; } display->display_modes = modes; @@ -840,20 +818,17 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) return SDL_TRUE; } -void -SDL_SetCurrentDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) +void SDL_SetCurrentDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode) { SDL_memcpy(&display->current_mode, mode, sizeof(*mode)); } -void -SDL_SetDesktopDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) +void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode) { SDL_memcpy(&display->desktop_mode, mode, sizeof(*mode)); } -static int -SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display) +static int SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay *display) { if (!display->num_display_modes && _this->GetDisplayModes) { _this->GetDisplayModes(_this, display); @@ -863,21 +838,19 @@ SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display) return display->num_display_modes; } -int -SDL_GetNumDisplayModes(int displayIndex) +int SDL_GetNumDisplayModes(int displayIndex) { CHECK_DISPLAY_INDEX(displayIndex, -1); return SDL_GetNumDisplayModesForDisplay(&_this->displays[displayIndex]); } -void -SDL_ResetDisplayModes(int displayIndex) +void SDL_ResetDisplayModes(int displayIndex) { SDL_VideoDisplay *display; int i; - CHECK_DISPLAY_INDEX(displayIndex,); + CHECK_DISPLAY_INDEX(displayIndex, ); display = &_this->displays[displayIndex]; for (i = display->num_display_modes; i--;) { @@ -890,8 +863,7 @@ SDL_ResetDisplayModes(int displayIndex) display->max_display_modes = 0; } -int -SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode * mode) +int SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode *mode) { SDL_VideoDisplay *display; @@ -899,8 +871,7 @@ SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode * mode) display = &_this->displays[displayIndex]; if (index < 0 || index >= SDL_GetNumDisplayModesForDisplay(display)) { - return SDL_SetError("index must be in the range of 0 - %d", - SDL_GetNumDisplayModesForDisplay(display) - 1); + return SDL_SetError("index must be in the range of 0 - %d", SDL_GetNumDisplayModesForDisplay(display) - 1); } if (mode) { *mode = display->display_modes[index]; @@ -908,8 +879,7 @@ SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode * mode) return 0; } -int -SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode) +int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode) { SDL_VideoDisplay *display; @@ -922,8 +892,7 @@ SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode) return 0; } -int -SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode) +int SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode) { SDL_VideoDisplay *display; @@ -936,17 +905,16 @@ SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode) return 0; } -static SDL_DisplayMode * -SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, - const SDL_DisplayMode * mode, - SDL_DisplayMode * closest) +static SDL_DisplayMode *SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay *display, + const SDL_DisplayMode *mode, + SDL_DisplayMode *closest) { Uint32 target_format; int target_refresh_rate; int i; SDL_DisplayMode *current, *match; - if (!mode || !closest) { + if (mode == NULL || closest == NULL) { SDL_InvalidParamError("mode/closest"); return NULL; } @@ -983,7 +951,7 @@ SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, modes may still follow. */ continue; } - if (!match || current->w < match->w || current->h < match->h) { + if (match == NULL || current->w < match->w || current->h < match->h) { match = current; continue; } @@ -991,9 +959,9 @@ SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, /* Sorted highest depth to lowest */ if (current->format == target_format || (SDL_BITSPERPIXEL(current->format) >= - SDL_BITSPERPIXEL(target_format) - && SDL_PIXELTYPE(current->format) == - SDL_PIXELTYPE(target_format))) { + SDL_BITSPERPIXEL(target_format) && + SDL_PIXELTYPE(current->format) == + SDL_PIXELTYPE(target_format))) { match = current; } continue; @@ -1043,10 +1011,9 @@ SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, return NULL; } -SDL_DisplayMode * -SDL_GetClosestDisplayMode(int displayIndex, - const SDL_DisplayMode * mode, - SDL_DisplayMode * closest) +SDL_DisplayMode *SDL_GetClosestDisplayMode(int displayIndex, + const SDL_DisplayMode *mode, + SDL_DisplayMode *closest) { SDL_VideoDisplay *display; @@ -1056,8 +1023,7 @@ SDL_GetClosestDisplayMode(int displayIndex, return SDL_GetClosestDisplayModeForDisplay(display, mode, closest); } -static int -SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode) +static int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, const SDL_DisplayMode *mode) { SDL_DisplayMode display_mode; SDL_DisplayMode current_mode; @@ -1087,8 +1053,7 @@ SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * /* Get a good video mode, the closest one possible */ if (!SDL_GetClosestDisplayModeForDisplay(display, &display_mode, &display_mode)) { - return SDL_SetError("No video mode large enough for %dx%d", - display_mode.w, display_mode.h); + return SDL_SetError("No video mode large enough for %dx%d", display_mode.w, display_mode.h); } } else { display_mode = display->desktop_mode; @@ -1114,8 +1079,7 @@ SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * return 0; } -SDL_VideoDisplay * -SDL_GetDisplay(int displayIndex) +SDL_VideoDisplay *SDL_GetDisplay(int displayIndex) { CHECK_DISPLAY_INDEX(displayIndex, NULL); @@ -1126,8 +1090,7 @@ SDL_GetDisplay(int displayIndex) * If x, y are outside of rect, snaps them to the closest point inside rect * (between rect->x, rect->y, inclusive, and rect->x + w, rect->y + h, exclusive) */ -static void -SDL_GetClosestPointOnRect(const SDL_Rect *rect, SDL_Point *point) +static void SDL_GetClosestPointOnRect(const SDL_Rect *rect, SDL_Point *point) { const int right = rect->x + rect->w - 1; const int bottom = rect->y + rect->h - 1; @@ -1145,8 +1108,7 @@ SDL_GetClosestPointOnRect(const SDL_Rect *rect, SDL_Point *point) } } -static int -GetRectDisplayIndex(int x, int y, int w, int h) +static int GetRectDisplayIndex(int x, int y, int w, int h) { int i, dist; int closest = -1; @@ -1188,20 +1150,17 @@ GetRectDisplayIndex(int x, int y, int w, int h) return closest; } -int -SDL_GetPointDisplayIndex(const SDL_Point *point) +int SDL_GetPointDisplayIndex(const SDL_Point *point) { return GetRectDisplayIndex(point->x, point->y, 1, 1); } -int -SDL_GetRectDisplayIndex(const SDL_Rect *rect) +int SDL_GetRectDisplayIndex(const SDL_Rect *rect) { return GetRectDisplayIndex(rect->x, rect->y, rect->w, rect->h); } -int -SDL_GetWindowDisplayIndex(SDL_Window * window) +int SDL_GetWindowDisplayIndex(SDL_Window *window) { int displayIndex = -1; @@ -1235,21 +1194,36 @@ SDL_GetWindowDisplayIndex(SDL_Window * window) return displayIndex; } + displayIndex = GetRectDisplayIndex(window->x, window->y, window->w, window->h); + /* Find the display containing the window if fullscreen */ for (i = 0; i < _this->num_displays; ++i) { SDL_VideoDisplay *display = &_this->displays[i]; if (display->fullscreen_window == window) { - return i; + if (displayIndex != i) { + if (displayIndex < 0) { + displayIndex = i; + } else { + SDL_VideoDisplay *new_display = &_this->displays[displayIndex]; + + /* The window was moved to a different display */ + if (new_display->fullscreen_window != NULL) { + /* Uh oh, there's already a fullscreen window here */ + } else { + new_display->fullscreen_window = window; + } + display->fullscreen_window = NULL; + } + } + break; } } - - return GetRectDisplayIndex(window->x, window->y, window->w, window->h); + return displayIndex; } } -SDL_VideoDisplay * -SDL_GetDisplayForWindow(SDL_Window *window) +SDL_VideoDisplay *SDL_GetDisplayForWindow(SDL_Window *window) { int displayIndex = SDL_GetWindowDisplayIndex(window); if (displayIndex >= 0) { @@ -1259,8 +1233,7 @@ SDL_GetDisplayForWindow(SDL_Window *window) } } -int -SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode) +int SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode) { CHECK_WINDOW_MAGIC(window, -1); @@ -1288,15 +1261,14 @@ SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode) return 0; } -int -SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode) +int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode) { SDL_DisplayMode fullscreen_mode; SDL_VideoDisplay *display; CHECK_WINDOW_MAGIC(window, -1); - if (!mode) { + if (mode == NULL) { return SDL_InvalidParamError("mode"); } @@ -1314,8 +1286,8 @@ SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode) if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) { fullscreen_mode = display->desktop_mode; } else if (!SDL_GetClosestDisplayModeForDisplay(SDL_GetDisplayForWindow(window), - &fullscreen_mode, - &fullscreen_mode)) { + &fullscreen_mode, + &fullscreen_mode)) { SDL_zerop(mode); return SDL_SetError("Couldn't find display mode match"); } @@ -1325,8 +1297,7 @@ SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode) return 0; } -void* -SDL_GetWindowICCProfile(SDL_Window * window, size_t* size) +void *SDL_GetWindowICCProfile(SDL_Window *window, size_t *size) { if (!_this->GetWindowICCProfile) { SDL_Unsupported(); @@ -1335,8 +1306,7 @@ SDL_GetWindowICCProfile(SDL_Window * window, size_t* size) return _this->GetWindowICCProfile(_this, window, size); } -Uint32 -SDL_GetWindowPixelFormat(SDL_Window * window) +Uint32 SDL_GetWindowPixelFormat(SDL_Window *window) { SDL_VideoDisplay *display; @@ -1346,8 +1316,7 @@ SDL_GetWindowPixelFormat(SDL_Window * window) return display->current_mode.format; } -static void -SDL_RestoreMousePosition(SDL_Window *window) +static void SDL_RestoreMousePosition(SDL_Window *window) { int x, y; @@ -1358,16 +1327,15 @@ SDL_RestoreMousePosition(SDL_Window *window) } #if __WINRT__ -extern Uint32 WINRT_DetectWindowFlags(SDL_Window * window); +extern Uint32 WINRT_DetectWindowFlags(SDL_Window *window); #endif -static int -SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) +static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen) { SDL_VideoDisplay *display; SDL_Window *other; - CHECK_WINDOW_MAGIC(window,-1); + CHECK_WINDOW_MAGIC(window, -1); /* if we are in the process of hiding don't go back to fullscreen */ if (window->is_hiding && fullscreen) { @@ -1378,10 +1346,11 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) /* if the window is going away and no resolution change is necessary, do nothing, or else we may trigger an ugly double-transition */ - if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */ - if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) + if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */ + if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) { return 0; - + } + /* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */ if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) { if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) { @@ -1430,6 +1399,9 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) #endif display = SDL_GetDisplayForWindow(window); + if (display == NULL) { /* No display connected, nothing to do. */ + return 0; + } if (fullscreen) { /* Hide any other fullscreen windows */ @@ -1444,6 +1416,13 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) if ((window->last_fullscreen_flags & FULLSCREEN_MASK) == (window->flags & FULLSCREEN_MASK)) { return 0; } + if (!fullscreen) { + if (_this->SetWindowFullscreen) { + _this->SetWindowFullscreen(_this, window, display, SDL_FALSE); + } + window->last_fullscreen_flags = window->flags; + return 0; + } } /* See if there are any fullscreen windows */ @@ -1470,7 +1449,7 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) } /* only do the mode change if we want exclusive fullscreen */ - if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) { + if ((other->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) { if (SDL_SetDisplayModeForDisplay(display, &fullscreen_mode) < 0) { return -1; } @@ -1534,8 +1513,7 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) #define CREATE_FLAGS \ (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_SKIP_TASKBAR | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN | SDL_WINDOW_MINIMIZED | SDL_WINDOW_METAL) -static SDL_INLINE SDL_bool -IsAcceptingDragAndDrop(void) +static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void) { if ((SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) || (SDL_GetEventState(SDL_DROPTEXT) == SDL_ENABLE)) { @@ -1545,8 +1523,7 @@ IsAcceptingDragAndDrop(void) } /* prepare a newly-created window */ -static SDL_INLINE void -PrepareDragAndDropSupport(SDL_Window *window) +static SDL_INLINE void PrepareDragAndDropSupport(SDL_Window *window) { if (_this->AcceptDragAndDrop) { _this->AcceptDragAndDrop(window, IsAcceptingDragAndDrop()); @@ -1554,8 +1531,7 @@ PrepareDragAndDropSupport(SDL_Window *window) } /* toggle d'n'd for all existing windows. */ -void -SDL_ToggleDragAndDropSupport(void) +void SDL_ToggleDragAndDropSupport(void) { if (_this && _this->AcceptDragAndDrop) { const SDL_bool enable = IsAcceptingDragAndDrop(); @@ -1566,8 +1542,7 @@ SDL_ToggleDragAndDropSupport(void) } } -static void -SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags) +static void SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags) { PrepareDragAndDropSupport(window); @@ -1596,36 +1571,45 @@ SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags) } } -static int -SDL_ContextNotSupported(const char *name) +static int SDL_ContextNotSupported(const char *name) { return SDL_SetError("%s support is either not configured in SDL " - "or not available in current SDL video driver " - "(%s) or platform", name, _this->name); + "or not available in current SDL video driver " + "(%s) or platform", + name, + _this->name); } -static int -SDL_DllNotSupported(const char *name) +static int SDL_DllNotSupported(const char *name) { return SDL_SetError("No dynamic %s support in current SDL video driver (%s)", name, _this->name); } -SDL_Window * -SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) +SDL_Window *SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) { SDL_Window *window; Uint32 type_flags, graphics_flags; - if (!_this) { + if (_this == NULL) { /* Initialize the video system if needed */ if (SDL_Init(SDL_INIT_VIDEO) < 0) { return NULL; } + + /* Make clang-tidy happy */ + if (_this == NULL) { + return NULL; + } + } + + /* Make sure the display list is up to date for window placement */ + if (_this->RefreshDisplays) { + _this->RefreshDisplays(_this); } /* ensure no more than one of these flags is set */ type_flags = flags & (SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU); - if ((type_flags & (type_flags - 1)) != 0) { + if (type_flags & (type_flags - 1)) { SDL_SetError("Conflicting window flags specified"); return NULL; } @@ -1646,7 +1630,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) /* ensure no more than one of these flags is set */ graphics_flags = flags & (SDL_WINDOW_OPENGL | SDL_WINDOW_METAL | SDL_WINDOW_VULKAN); - if ((graphics_flags & (graphics_flags - 1)) != 0) { + if (graphics_flags & (graphics_flags - 1)) { SDL_SetError("Conflicting window flags specified"); return NULL; } @@ -1693,7 +1677,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) } window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); - if (!window) { + if (window == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1734,8 +1718,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) /* for real fullscreen we might switch the resolution, so get width and height * from closest supported mode and use that instead of current resolution */ - if ((flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP - && (bounds.w != w || bounds.h != h)) { + if ((flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP && (bounds.w != w || bounds.h != h)) { SDL_DisplayMode fullscreen_mode, closest_mode; SDL_zero(fullscreen_mode); fullscreen_mode.w = w; @@ -1803,13 +1786,12 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) return window; } -SDL_Window * -SDL_CreateWindowFrom(const void *data) +SDL_Window *SDL_CreateWindowFrom(const void *data) { SDL_Window *window; Uint32 flags = SDL_WINDOW_FOREIGN; - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } @@ -1845,7 +1827,7 @@ SDL_CreateWindowFrom(const void *data) } window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); - if (!window) { + if (window == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1873,8 +1855,7 @@ SDL_CreateWindowFrom(const void *data) return window; } -int -SDL_RecreateWindow(SDL_Window * window, Uint32 flags) +int SDL_RecreateWindow(SDL_Window *window, Uint32 flags) { SDL_bool loaded_opengl = SDL_FALSE; SDL_bool need_gl_unload = SDL_FALSE; @@ -1886,7 +1867,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) /* ensure no more than one of these flags is set */ graphics_flags = flags & (SDL_WINDOW_OPENGL | SDL_WINDOW_METAL | SDL_WINDOW_VULKAN); - if ((graphics_flags & (graphics_flags - 1)) != 0) { + if (graphics_flags & (graphics_flags - 1)) { return SDL_SetError("Conflicting window flags specified"); } @@ -1913,12 +1894,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) } /* Tear down the old native window */ - if (window->surface) { - window->surface->flags &= ~SDL_DONTFREE; - SDL_FreeSurface(window->surface); - window->surface = NULL; - window->surface_valid = SDL_FALSE; - } + SDL_DestroyWindowSurface(window); if (_this->checked_texture_framebuffer) { /* never checked? No framebuffer to destroy. Don't risk calling the wrong implementation. */ if (_this->DestroyWindowFramebuffer) { @@ -1938,7 +1914,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) } } else if (window->flags & SDL_WINDOW_OPENGL) { need_gl_unload = SDL_TRUE; - need_gl_load = SDL_TRUE; + need_gl_load = SDL_TRUE; } if ((window->flags & SDL_WINDOW_VULKAN) != (flags & SDL_WINDOW_VULKAN)) { @@ -1949,7 +1925,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) } } else if (window->flags & SDL_WINDOW_VULKAN) { need_vulkan_unload = SDL_TRUE; - need_vulkan_load = SDL_TRUE; + need_vulkan_load = SDL_TRUE; } if (need_gl_unload) { @@ -2013,26 +1989,23 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) return 0; } -SDL_bool -SDL_HasWindows(void) +SDL_bool SDL_HasWindows(void) { - return (_this && _this->windows != NULL); + return _this && _this->windows != NULL; } -Uint32 -SDL_GetWindowID(SDL_Window * window) +Uint32 SDL_GetWindowID(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, 0); return window->id; } -SDL_Window * -SDL_GetWindowFromID(Uint32 id) +SDL_Window *SDL_GetWindowFromID(Uint32 id) { SDL_Window *window; - if (!_this) { + if (_this == NULL) { return NULL; } for (window = _this->windows; window; window = window->next) { @@ -2043,18 +2016,16 @@ SDL_GetWindowFromID(Uint32 id) return NULL; } -Uint32 -SDL_GetWindowFlags(SDL_Window * window) +Uint32 SDL_GetWindowFlags(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, 0); return window->flags; } -void -SDL_SetWindowTitle(SDL_Window * window, const char *title) +void SDL_SetWindowTitle(SDL_Window *window, const char *title) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (title == window->title) { return; @@ -2068,20 +2039,18 @@ SDL_SetWindowTitle(SDL_Window * window, const char *title) } } -const char * -SDL_GetWindowTitle(SDL_Window * window) +const char *SDL_GetWindowTitle(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, ""); return window->title ? window->title : ""; } -void -SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon) +void SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); - if (!icon) { + if (icon == NULL) { return; } @@ -2098,8 +2067,7 @@ SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon) } } -void* -SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata) +void *SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata) { SDL_WindowUserData *prev, *data; @@ -2107,8 +2075,8 @@ SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata) /* Input validation */ if (name == NULL || name[0] == '\0') { - SDL_InvalidParamError("name"); - return NULL; + SDL_InvalidParamError("name"); + return NULL; } /* See if the named data already exists */ @@ -2145,8 +2113,7 @@ SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata) return NULL; } -void * -SDL_GetWindowData(SDL_Window * window, const char *name) +void *SDL_GetWindowData(SDL_Window *window, const char *name) { SDL_WindowUserData *data; @@ -2154,8 +2121,8 @@ SDL_GetWindowData(SDL_Window * window, const char *name) /* Input validation */ if (name == NULL || name[0] == '\0') { - SDL_InvalidParamError("name"); - return NULL; + SDL_InvalidParamError("name"); + return NULL; } for (data = window->data; data; data = data->next) { @@ -2166,10 +2133,9 @@ SDL_GetWindowData(SDL_Window * window, const char *name) return NULL; } -void -SDL_SetWindowPosition(SDL_Window * window, int x, int y) +void SDL_SetWindowPosition(SDL_Window *window, int x, int y) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISCENTERED(y)) { int displayIndex = (x & 0xFFFF); @@ -2210,15 +2176,14 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y) } } -void -SDL_GetWindowPosition(SDL_Window * window, int *x, int *y) +void SDL_GetWindowPosition(SDL_Window *window, int *x, int *y) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); /* Fullscreen windows are always at their display's origin */ if (window->flags & SDL_WINDOW_FULLSCREEN) { int displayIndex; - + if (x) { *x = 0; } @@ -2252,30 +2217,28 @@ SDL_GetWindowPosition(SDL_Window * window, int *x, int *y) } } -void -SDL_SetWindowBordered(SDL_Window * window, SDL_bool bordered) +void SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { - const int want = (bordered != SDL_FALSE); /* normalize the flag. */ - const int have = ((window->flags & SDL_WINDOW_BORDERLESS) == 0); + const int want = (bordered != SDL_FALSE); /* normalize the flag. */ + const int have = !(window->flags & SDL_WINDOW_BORDERLESS); if ((want != have) && (_this->SetWindowBordered)) { if (want) { window->flags &= ~SDL_WINDOW_BORDERLESS; } else { window->flags |= SDL_WINDOW_BORDERLESS; } - _this->SetWindowBordered(_this, window, (SDL_bool) want); + _this->SetWindowBordered(_this, window, (SDL_bool)want); } } } -void -SDL_SetWindowResizable(SDL_Window * window, SDL_bool resizable) +void SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { - const int want = (resizable != SDL_FALSE); /* normalize the flag. */ + const int want = (resizable != SDL_FALSE); /* normalize the flag. */ const int have = ((window->flags & SDL_WINDOW_RESIZABLE) != 0); if ((want != have) && (_this->SetWindowResizable)) { if (want) { @@ -2283,17 +2246,16 @@ SDL_SetWindowResizable(SDL_Window * window, SDL_bool resizable) } else { window->flags &= ~SDL_WINDOW_RESIZABLE; } - _this->SetWindowResizable(_this, window, (SDL_bool) want); + _this->SetWindowResizable(_this, window, (SDL_bool)want); } } } -void -SDL_SetWindowAlwaysOnTop(SDL_Window * window, SDL_bool on_top) +void SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { - const int want = (on_top != SDL_FALSE); /* normalize the flag. */ + const int want = (on_top != SDL_FALSE); /* normalize the flag. */ const int have = ((window->flags & SDL_WINDOW_ALWAYS_ON_TOP) != 0); if ((want != have) && (_this->SetWindowAlwaysOnTop)) { if (want) { @@ -2301,16 +2263,15 @@ SDL_SetWindowAlwaysOnTop(SDL_Window * window, SDL_bool on_top) } else { window->flags &= ~SDL_WINDOW_ALWAYS_ON_TOP; } - - _this->SetWindowAlwaysOnTop(_this, window, (SDL_bool) want); + + _this->SetWindowAlwaysOnTop(_this, window, (SDL_bool)want); } } } -void -SDL_SetWindowSize(SDL_Window * window, int w, int h) +void SDL_SetWindowSize(SDL_Window *window, int w, int h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (w <= 0) { SDL_InvalidParamError("w"); return; @@ -2357,10 +2318,9 @@ SDL_SetWindowSize(SDL_Window * window, int w, int h) } } -void -SDL_GetWindowSize(SDL_Window * window, int *w, int *h) +void SDL_GetWindowSize(SDL_Window *window, int *w, int *h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (w) { *w = window->w; } @@ -2369,15 +2329,22 @@ SDL_GetWindowSize(SDL_Window * window, int *w, int *h) } } -int -SDL_GetWindowBordersSize(SDL_Window * window, int *top, int *left, int *bottom, int *right) +int SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right) { int dummy = 0; - if (!top) { top = &dummy; } - if (!left) { left = &dummy; } - if (!right) { right = &dummy; } - if (!bottom) { bottom = &dummy; } + if (top == NULL) { + top = &dummy; + } + if (left == NULL) { + left = &dummy; + } + if (right == NULL) { + right = &dummy; + } + if (bottom == NULL) { + bottom = &dummy; + } /* Always initialize, so applications don't have to care */ *top = *left = *bottom = *right = 0; @@ -2391,12 +2358,11 @@ SDL_GetWindowBordersSize(SDL_Window * window, int *top, int *left, int *bottom, return _this->GetWindowBordersSize(_this, window, top, left, bottom, right); } -void -SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h) +void SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h) { int filter; - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (w == NULL) { w = &filter; @@ -2413,10 +2379,9 @@ SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h) } } -void -SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h) +void SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (min_w <= 0) { SDL_InvalidParamError("min_w"); return; @@ -2444,10 +2409,9 @@ SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h) } } -void -SDL_GetWindowMinimumSize(SDL_Window * window, int *min_w, int *min_h) +void SDL_GetWindowMinimumSize(SDL_Window *window, int *min_w, int *min_h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (min_w) { *min_w = window->min_w; } @@ -2456,10 +2420,9 @@ SDL_GetWindowMinimumSize(SDL_Window * window, int *min_w, int *min_h) } } -void -SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h) +void SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (max_w <= 0) { SDL_InvalidParamError("max_w"); return; @@ -2486,10 +2449,9 @@ SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h) } } -void -SDL_GetWindowMaximumSize(SDL_Window * window, int *max_w, int *max_h) +void SDL_GetWindowMaximumSize(SDL_Window *window, int *max_w, int *max_h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (max_w) { *max_w = window->max_w; } @@ -2498,10 +2460,9 @@ SDL_GetWindowMaximumSize(SDL_Window * window, int *max_w, int *max_h) } } -void -SDL_ShowWindow(SDL_Window * window) +void SDL_ShowWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (window->flags & SDL_WINDOW_SHOWN) { return; @@ -2513,10 +2474,9 @@ SDL_ShowWindow(SDL_Window * window) SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SHOWN, 0, 0); } -void -SDL_HideWindow(SDL_Window * window) +void SDL_HideWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & SDL_WINDOW_SHOWN)) { return; @@ -2532,10 +2492,9 @@ SDL_HideWindow(SDL_Window * window) SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIDDEN, 0, 0); } -void -SDL_RaiseWindow(SDL_Window * window) +void SDL_RaiseWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & SDL_WINDOW_SHOWN)) { return; @@ -2545,10 +2504,9 @@ SDL_RaiseWindow(SDL_Window * window) } } -void -SDL_MaximizeWindow(SDL_Window * window) +void SDL_MaximizeWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (window->flags & SDL_WINDOW_MAXIMIZED) { return; @@ -2561,8 +2519,7 @@ SDL_MaximizeWindow(SDL_Window * window) } } -static SDL_bool -CanMinimizeWindow(SDL_Window * window) +static SDL_bool CanMinimizeWindow(SDL_Window *window) { if (!_this->MinimizeWindow) { return SDL_FALSE; @@ -2570,10 +2527,9 @@ CanMinimizeWindow(SDL_Window * window) return SDL_TRUE; } -void -SDL_MinimizeWindow(SDL_Window * window) +void SDL_MinimizeWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (window->flags & SDL_WINDOW_MINIMIZED) { return; @@ -2592,10 +2548,9 @@ SDL_MinimizeWindow(SDL_Window * window) } } -void -SDL_RestoreWindow(SDL_Window * window) +void SDL_RestoreWindow(SDL_Window *window) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!(window->flags & (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED))) { return; @@ -2606,8 +2561,7 @@ SDL_RestoreWindow(SDL_Window * window) } } -int -SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags) +int SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags) { Uint32 oldflags; CHECK_WINDOW_MAGIC(window, -1); @@ -2626,14 +2580,13 @@ SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags) if (SDL_UpdateFullscreenMode(window, FULLSCREEN_VISIBLE(window)) == 0) { return 0; } - + window->flags &= ~FULLSCREEN_MASK; window->flags |= oldflags; return -1; } -static SDL_Surface * -SDL_CreateWindowFramebuffer(SDL_Window * window) +static SDL_Surface *SDL_CreateWindowFramebuffer(SDL_Window *window) { Uint32 format = 0; void *pixels = NULL; @@ -2641,6 +2594,9 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) int bpp; Uint32 Rmask, Gmask, Bmask, Amask; SDL_bool created_framebuffer = SDL_FALSE; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); /* This will switch the video backend from using a software surface to using a GPU texture through the 2D render API, if we think this would @@ -2656,7 +2612,7 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) } } - if (_this->is_dummy) { /* dummy driver never has GPU support, of course. */ + if (_this->is_dummy) { /* dummy driver never has GPU support, of course. */ attempt_texture_framebuffer = SDL_FALSE; } @@ -2698,7 +2654,7 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) } } - _this->checked_texture_framebuffer = SDL_TRUE; /* don't check this again. */ + _this->checked_texture_framebuffer = SDL_TRUE; /* don't check this again. */ } if (!created_framebuffer) { @@ -2719,20 +2675,22 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) return NULL; } - return SDL_CreateRGBSurfaceFrom(pixels, window->w, window->h, bpp, pitch, Rmask, Gmask, Bmask, Amask); + return SDL_CreateRGBSurfaceFrom(pixels, w, h, bpp, pitch, Rmask, Gmask, Bmask, Amask); } -SDL_Surface * -SDL_GetWindowSurface(SDL_Window * window) +SDL_bool SDL_HasWindowSurface(SDL_Window *window) +{ + CHECK_WINDOW_MAGIC(window, SDL_FALSE); + + return window->surface ? SDL_TRUE : SDL_FALSE; +} + +SDL_Surface *SDL_GetWindowSurface(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, NULL); if (!window->surface_valid) { - if (window->surface) { - window->surface->flags &= ~SDL_DONTFREE; - SDL_FreeSurface(window->surface); - window->surface = NULL; - } + SDL_DestroyWindowSurface(window); window->surface = SDL_CreateWindowFramebuffer(window); if (window->surface) { window->surface_valid = SDL_TRUE; @@ -2742,8 +2700,7 @@ SDL_GetWindowSurface(SDL_Window * window) return window->surface; } -int -SDL_UpdateWindowSurface(SDL_Window * window) +int SDL_UpdateWindowSurface(SDL_Window *window) { SDL_Rect full_rect; @@ -2751,14 +2708,13 @@ SDL_UpdateWindowSurface(SDL_Window * window) full_rect.x = 0; full_rect.y = 0; - full_rect.w = window->w; - full_rect.h = window->h; + SDL_GetWindowSizeInPixels(window, &full_rect.w, &full_rect.h); + return SDL_UpdateWindowSurfaceRects(window, &full_rect, 1); } -int -SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, - int numrects) +int SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, + int numrects) { CHECK_WINDOW_MAGIC(window, -1); @@ -2771,8 +2727,7 @@ SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, return _this->UpdateWindowFramebuffer(_this, window, rects, numrects); } -int -SDL_SetWindowBrightness(SDL_Window * window, float brightness) +int SDL_SetWindowBrightness(SDL_Window * window, float brightness) { Uint16 ramp[256]; int status; @@ -2787,16 +2742,14 @@ SDL_SetWindowBrightness(SDL_Window * window, float brightness) return status; } -float -SDL_GetWindowBrightness(SDL_Window * window) +float SDL_GetWindowBrightness(SDL_Window * window) { CHECK_WINDOW_MAGIC(window, 1.0f); return window->brightness; } -int -SDL_SetWindowOpacity(SDL_Window * window, float opacity) +int SDL_SetWindowOpacity(SDL_Window * window, float opacity) { int retval; CHECK_WINDOW_MAGIC(window, -1); @@ -2819,8 +2772,20 @@ SDL_SetWindowOpacity(SDL_Window * window, float opacity) return retval; } -int -SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity) +int SDL_DestroyWindowSurface(SDL_Window *window) +{ + CHECK_WINDOW_MAGIC(window, -1); + + if (window->surface) { + window->surface->flags &= ~SDL_DONTFREE; + SDL_FreeSurface(window->surface); + window->surface = NULL; + window->surface_valid = SDL_FALSE; + } + return 0; +} + +int SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity) { CHECK_WINDOW_MAGIC(window, -1); @@ -2831,8 +2796,7 @@ SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity) return 0; } -int -SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window) +int SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window) { CHECK_WINDOW_MAGIC(modal_window, -1); CHECK_WINDOW_MAGIC(parent_window, -1); @@ -2840,25 +2804,23 @@ SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window) if (!_this->SetWindowModalFor) { return SDL_Unsupported(); } - + return _this->SetWindowModalFor(_this, modal_window, parent_window); } -int -SDL_SetWindowInputFocus(SDL_Window * window) +int SDL_SetWindowInputFocus(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, -1); if (!_this->SetWindowInputFocus) { return SDL_Unsupported(); } - + return _this->SetWindowInputFocus(_this, window); } -int -SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red, +int SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red, const Uint16 * green, const Uint16 * blue) { @@ -2891,8 +2853,7 @@ SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red, } } -int -SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red, +int SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red, Uint16 * green, Uint16 * blue) { @@ -2936,8 +2897,7 @@ SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red, return 0; } -void -SDL_UpdateWindowGrab(SDL_Window * window) +void SDL_UpdateWindowGrab(SDL_Window * window) { SDL_bool keyboard_grabbed, mouse_grabbed; @@ -2971,7 +2931,7 @@ SDL_UpdateWindowGrab(SDL_Window * window) } _this->grabbed_window = window; } else if (_this->grabbed_window == window) { - _this->grabbed_window = NULL; /* ungrabbing input. */ + _this->grabbed_window = NULL; /* ungrabbing input. */ } if (_this->SetWindowMouseGrab) { @@ -2982,10 +2942,9 @@ SDL_UpdateWindowGrab(SDL_Window * window) } } -void -SDL_SetWindowGrab(SDL_Window * window, SDL_bool grabbed) +void SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); SDL_SetWindowMouseGrab(window, grabbed); @@ -2994,10 +2953,9 @@ SDL_SetWindowGrab(SDL_Window * window, SDL_bool grabbed) } } -void -SDL_SetWindowKeyboardGrab(SDL_Window * window, SDL_bool grabbed) +void SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!!grabbed == !!(window->flags & SDL_WINDOW_KEYBOARD_GRABBED)) { return; @@ -3010,10 +2968,9 @@ SDL_SetWindowKeyboardGrab(SDL_Window * window, SDL_bool grabbed) SDL_UpdateWindowGrab(window); } -void -SDL_SetWindowMouseGrab(SDL_Window * window, SDL_bool grabbed) +void SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (!!grabbed == !!(window->flags & SDL_WINDOW_MOUSE_GRABBED)) { return; @@ -3026,41 +2983,34 @@ SDL_SetWindowMouseGrab(SDL_Window * window, SDL_bool grabbed) SDL_UpdateWindowGrab(window); } -SDL_bool -SDL_GetWindowGrab(SDL_Window * window) +SDL_bool SDL_GetWindowGrab(SDL_Window *window) { - return (SDL_GetWindowKeyboardGrab(window) || SDL_GetWindowMouseGrab(window)); + return SDL_GetWindowKeyboardGrab(window) || SDL_GetWindowMouseGrab(window); } -SDL_bool -SDL_GetWindowKeyboardGrab(SDL_Window * window) +SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, SDL_FALSE); - return window == _this->grabbed_window && - ((_this->grabbed_window->flags & SDL_WINDOW_KEYBOARD_GRABBED) != 0); + return window == _this->grabbed_window && (_this->grabbed_window->flags & SDL_WINDOW_KEYBOARD_GRABBED); } -SDL_bool -SDL_GetWindowMouseGrab(SDL_Window * window) +SDL_bool SDL_GetWindowMouseGrab(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, SDL_FALSE); - return window == _this->grabbed_window && - ((_this->grabbed_window->flags & SDL_WINDOW_MOUSE_GRABBED) != 0); + return window == _this->grabbed_window && (_this->grabbed_window->flags & SDL_WINDOW_MOUSE_GRABBED); } -SDL_Window * -SDL_GetGrabbedWindow(void) +SDL_Window *SDL_GetGrabbedWindow(void) { if (_this->grabbed_window && - (_this->grabbed_window->flags & (SDL_WINDOW_MOUSE_GRABBED|SDL_WINDOW_KEYBOARD_GRABBED)) != 0) { + (_this->grabbed_window->flags & (SDL_WINDOW_MOUSE_GRABBED | SDL_WINDOW_KEYBOARD_GRABBED))) { return _this->grabbed_window; } else { return NULL; } } -int -SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect) +int SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect) { CHECK_WINDOW_MAGIC(window, -1); @@ -3076,8 +3026,7 @@ SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect) return 0; } -const SDL_Rect * -SDL_GetWindowMouseRect(SDL_Window * window) +const SDL_Rect *SDL_GetWindowMouseRect(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, NULL); @@ -3088,8 +3037,7 @@ SDL_GetWindowMouseRect(SDL_Window * window) } } -int -SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation) +int SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation) { CHECK_WINDOW_MAGIC(window, -1); @@ -3100,20 +3048,17 @@ SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation) return SDL_Unsupported(); } -void -SDL_OnWindowShown(SDL_Window * window) +void SDL_OnWindowShown(SDL_Window *window) { SDL_OnWindowRestored(window); } -void -SDL_OnWindowHidden(SDL_Window * window) +void SDL_OnWindowHidden(SDL_Window *window) { SDL_UpdateFullscreenMode(window, SDL_FALSE); } -void -SDL_OnWindowResized(SDL_Window * window) +void SDL_OnWindowResized(SDL_Window *window) { int display_index = SDL_GetWindowDisplayIndex(window); window->surface_valid = SDL_FALSE; @@ -3128,8 +3073,7 @@ SDL_OnWindowResized(SDL_Window * window) } } -void -SDL_OnWindowMoved(SDL_Window * window) +void SDL_OnWindowMoved(SDL_Window *window) { int display_index = SDL_GetWindowDisplayIndex(window); @@ -3139,16 +3083,14 @@ SDL_OnWindowMoved(SDL_Window * window) } } -void -SDL_OnWindowMinimized(SDL_Window * window) +void SDL_OnWindowMinimized(SDL_Window *window) { if (!DisableUnsetFullscreenOnMinimize(_this)) { SDL_UpdateFullscreenMode(window, SDL_FALSE); } } -void -SDL_OnWindowRestored(SDL_Window * window) +void SDL_OnWindowRestored(SDL_Window *window) { /* * FIXME: Is this fine to just remove this, or should it be preserved just @@ -3163,21 +3105,18 @@ SDL_OnWindowRestored(SDL_Window * window) } } -void -SDL_OnWindowEnter(SDL_Window * window) +void SDL_OnWindowEnter(SDL_Window *window) { if (_this->OnWindowEnter) { _this->OnWindowEnter(_this, window); } } -void -SDL_OnWindowLeave(SDL_Window * window) +void SDL_OnWindowLeave(SDL_Window *window) { } -void -SDL_OnWindowFocusGained(SDL_Window * window) +void SDL_OnWindowFocusGained(SDL_Window *window) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -3188,15 +3127,14 @@ SDL_OnWindowFocusGained(SDL_Window * window) if (mouse && mouse->relative_mode) { SDL_SetMouseFocus(window); if (mouse->relative_mode_warp) { - SDL_PerformWarpMouseInWindow(window, window->w/2, window->h/2, SDL_TRUE); + SDL_PerformWarpMouseInWindow(window, window->w / 2, window->h / 2, SDL_TRUE); } } SDL_UpdateWindowGrab(window); } -static SDL_bool -ShouldMinimizeOnFocusLoss(SDL_Window * window) +static SDL_bool ShouldMinimizeOnFocusLoss(SDL_Window *window) { const char *hint; @@ -3223,7 +3161,7 @@ ShouldMinimizeOnFocusLoss(SDL_Window * window) /* Real fullscreen windows should minimize on focus loss so the desktop video mode is restored */ hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS); - if (!hint || !*hint || SDL_strcasecmp(hint, "auto") == 0) { + if (hint == NULL || !*hint || SDL_strcasecmp(hint, "auto") == 0) { if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP || DisableDisplayModeSwitching(_this) == SDL_TRUE) { return SDL_FALSE; @@ -3234,8 +3172,7 @@ ShouldMinimizeOnFocusLoss(SDL_Window * window) return SDL_GetHintBoolean(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_FALSE); } -void -SDL_OnWindowFocusLost(SDL_Window * window) +void SDL_OnWindowFocusLost(SDL_Window *window) { if (window->gamma && _this->SetWindowGammaRamp) { _this->SetWindowGammaRamp(_this, window, window->saved_gamma); @@ -3250,12 +3187,11 @@ SDL_OnWindowFocusLost(SDL_Window * window) /* !!! FIXME: is this different than SDL_GetKeyboardFocus()? !!! FIXME: Also, SDL_GetKeyboardFocus() is O(1), this isn't. */ -SDL_Window * -SDL_GetFocusWindow(void) +SDL_Window *SDL_GetFocusWindow(void) { SDL_Window *window; - if (!_this) { + if (_this == NULL) { return NULL; } for (window = _this->windows; window; window = window->next) { @@ -3266,12 +3202,11 @@ SDL_GetFocusWindow(void) return NULL; } -void -SDL_DestroyWindow(SDL_Window * window) +void SDL_DestroyWindow(SDL_Window *window) { SDL_VideoDisplay *display; - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); window->is_destroying = SDL_TRUE; @@ -3295,12 +3230,7 @@ SDL_DestroyWindow(SDL_Window * window) } } - if (window->surface) { - window->surface->flags &= ~SDL_DONTFREE; - SDL_FreeSurface(window->surface); - window->surface = NULL; - window->surface_valid = SDL_FALSE; - } + SDL_DestroyWindowSurface(window); if (_this->checked_texture_framebuffer) { /* never checked? No framebuffer to destroy. Don't risk calling the wrong implementation. */ if (_this->DestroyWindowFramebuffer) { _this->DestroyWindowFramebuffer(_this, window); @@ -3321,6 +3251,18 @@ SDL_DestroyWindow(SDL_Window * window) display->fullscreen_window = NULL; } + if (_this->grabbed_window == window) { + _this->grabbed_window = NULL; /* ungrabbing input. */ + } + + if (_this->current_glwin == window) { + _this->current_glwin = NULL; + } + + if (_this->wakeup_window == window) { + _this->wakeup_window = NULL; + } + /* Now invalidate magic */ window->magic = NULL; @@ -3349,19 +3291,17 @@ SDL_DestroyWindow(SDL_Window * window) SDL_free(window); } -SDL_bool -SDL_IsScreenSaverEnabled() +SDL_bool SDL_IsScreenSaverEnabled() { - if (!_this) { + if (_this == NULL) { return SDL_TRUE; } return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE; } -void -SDL_EnableScreenSaver() +void SDL_EnableScreenSaver() { - if (!_this) { + if (_this == NULL) { return; } if (!_this->suspend_screensaver) { @@ -3373,10 +3313,9 @@ SDL_EnableScreenSaver() } } -void -SDL_DisableScreenSaver() +void SDL_DisableScreenSaver() { - if (!_this) { + if (_this == NULL) { return; } if (_this->suspend_screensaver) { @@ -3388,12 +3327,11 @@ SDL_DisableScreenSaver() } } -void -SDL_VideoQuit(void) +void SDL_VideoQuit(void) { int i; - if (!_this) { + if (_this == NULL) { return; } @@ -3433,12 +3371,11 @@ SDL_VideoQuit(void) _this = NULL; } -int -SDL_GL_LoadLibrary(const char *path) +int SDL_GL_LoadLibrary(const char *path) { int retval; - if (!_this) { + if (_this == NULL) { return SDL_UninitializedVideo(); } if (_this->gl_config.driver_loaded) { @@ -3459,15 +3396,14 @@ SDL_GL_LoadLibrary(const char *path) _this->GL_UnloadLibrary(_this); } } - return (retval); + return retval; } -void * -SDL_GL_GetProcAddress(const char *proc) +void *SDL_GL_GetProcAddress(const char *proc) { void *func; - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } @@ -3484,10 +3420,9 @@ SDL_GL_GetProcAddress(const char *proc) return func; } -void -SDL_GL_UnloadLibrary(void) +void SDL_GL_UnloadLibrary(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return; } @@ -3502,18 +3437,16 @@ SDL_GL_UnloadLibrary(void) } #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 -static SDL_INLINE SDL_bool -isAtLeastGL3(const char *verstr) +static SDL_INLINE SDL_bool isAtLeastGL3(const char *verstr) { - return (verstr && (SDL_atoi(verstr) >= 3)); + return verstr && (SDL_atoi(verstr) >= 3); } #endif -SDL_bool -SDL_GL_ExtensionSupported(const char *extension) +SDL_bool SDL_GL_ExtensionSupported(const char *extension) { #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 - const GLubyte *(APIENTRY * glGetStringFunc) (GLenum); + const GLubyte *(APIENTRY * glGetStringFunc)(GLenum); const char *extensions; const char *start; const char *where, *terminator; @@ -3532,28 +3465,28 @@ SDL_GL_ExtensionSupported(const char *extension) /* Lookup the available extensions */ glGetStringFunc = SDL_GL_GetProcAddress("glGetString"); - if (!glGetStringFunc) { + if (glGetStringFunc == NULL) { return SDL_FALSE; } - if (isAtLeastGL3((const char *) glGetStringFunc(GL_VERSION))) { - const GLubyte *(APIENTRY * glGetStringiFunc) (GLenum, GLuint); - void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params); + if (isAtLeastGL3((const char *)glGetStringFunc(GL_VERSION))) { + const GLubyte *(APIENTRY * glGetStringiFunc)(GLenum, GLuint); + void(APIENTRY * glGetIntegervFunc)(GLenum pname, GLint * params); GLint num_exts = 0; GLint i; glGetStringiFunc = SDL_GL_GetProcAddress("glGetStringi"); glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv"); - if ((!glGetStringiFunc) || (!glGetIntegervFunc)) { + if ((glGetStringiFunc == NULL) || (glGetIntegervFunc == NULL)) { return SDL_FALSE; } - #ifndef GL_NUM_EXTENSIONS - #define GL_NUM_EXTENSIONS 0x821D - #endif +#ifndef GL_NUM_EXTENSIONS +#define GL_NUM_EXTENSIONS 0x821D +#endif glGetIntegervFunc(GL_NUM_EXTENSIONS, &num_exts); for (i = 0; i < num_exts; i++) { - const char *thisext = (const char *) glGetStringiFunc(GL_EXTENSIONS, i); + const char *thisext = (const char *)glGetStringiFunc(GL_EXTENSIONS, i); if (SDL_strcmp(thisext, extension) == 0) { return SDL_TRUE; } @@ -3564,8 +3497,8 @@ SDL_GL_ExtensionSupported(const char *extension) /* Try the old way with glGetString(GL_EXTENSIONS) ... */ - extensions = (const char *) glGetStringFunc(GL_EXTENSIONS); - if (!extensions) { + extensions = (const char *)glGetStringFunc(GL_EXTENSIONS); + if (extensions == NULL) { return SDL_FALSE; } /* @@ -3577,13 +3510,16 @@ SDL_GL_ExtensionSupported(const char *extension) for (;;) { where = SDL_strstr(start, extension); - if (!where) + if (where == NULL) { break; + } terminator = where + SDL_strlen(extension); - if (where == extensions || *(where - 1) == ' ') - if (*terminator == ' ' || *terminator == '\0') + if (where == extensions || *(where - 1) == ' ') { + if (*terminator == ' ' || *terminator == '\0') { return SDL_TRUE; + } + } start = terminator; } @@ -3595,12 +3531,11 @@ SDL_GL_ExtensionSupported(const char *extension) /* Deduce supported ES profile versions from the supported ARB_ES*_compatibility extensions. There is no direct query. - + This is normally only called when the OpenGL driver supports {GLX,WGL}_EXT_create_context_es2_profile. */ -void -SDL_GL_DeduceMaxSupportedESProfile(int* major, int* minor) +void SDL_GL_DeduceMaxSupportedESProfile(int *major, int *minor) { /* THIS REQUIRES AN EXISTING GL CONTEXT THAT HAS BEEN MADE CURRENT. */ /* Please refer to https://bugzilla.libsdl.org/show_bug.cgi?id=3725 for discussion. */ @@ -3624,10 +3559,9 @@ SDL_GL_DeduceMaxSupportedESProfile(int* major, int* minor) #endif } -void -SDL_GL_ResetAttributes() +void SDL_GL_ResetAttributes() { - if (!_this) { + if (_this == NULL) { return; } @@ -3648,7 +3582,7 @@ SDL_GL_ResetAttributes() _this->gl_config.multisamplesamples = 0; _this->gl_config.floatbuffers = 0; _this->gl_config.retained_backing = 1; - _this->gl_config.accelerated = -1; /* accelerated or not, both are fine */ + _this->gl_config.accelerated = -1; /* accelerated or not, both are fine */ #if SDL_VIDEO_OPENGL _this->gl_config.major_version = 2; @@ -3679,13 +3613,12 @@ SDL_GL_ResetAttributes() _this->gl_config.share_with_current_context = 0; } -int -SDL_GL_SetAttribute(SDL_GLattr attr, int value) +int SDL_GL_SetAttribute(SDL_GLattr attr, int value) { #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 int retval; - if (!_this) { + if (_this == NULL) { return SDL_UninitializedVideo(); } retval = 0; @@ -3803,11 +3736,10 @@ SDL_GL_SetAttribute(SDL_GLattr attr, int value) #endif /* SDL_VIDEO_OPENGL */ } -int -SDL_GL_GetAttribute(SDL_GLattr attr, int *value) +int SDL_GL_GetAttribute(SDL_GLattr attr, int *value) { #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 - GLenum (APIENTRY *glGetErrorFunc) (void); + GLenum(APIENTRY * glGetErrorFunc)(void); GLenum attrib = 0; GLenum error = 0; @@ -3818,20 +3750,20 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) * the function itself doesn't exist prior to OpenGL 3 and OpenGL ES 2. */ #if SDL_VIDEO_OPENGL - const GLubyte *(APIENTRY *glGetStringFunc) (GLenum name); - void (APIENTRY *glGetFramebufferAttachmentParameterivFunc) (GLenum target, GLenum attachment, GLenum pname, GLint* params); + const GLubyte *(APIENTRY * glGetStringFunc)(GLenum name); + void(APIENTRY * glGetFramebufferAttachmentParameterivFunc)(GLenum target, GLenum attachment, GLenum pname, GLint * params); GLenum attachment = GL_BACK_LEFT; GLenum attachmentattrib = 0; #endif - if (!value) { + if (value == NULL) { return SDL_InvalidParamError("value"); } /* Clear value in any case */ *value = 0; - if (!_this) { + if (_this == NULL) { return SDL_UninitializedVideo(); } @@ -3925,78 +3857,77 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) #endif break; case SDL_GL_BUFFER_SIZE: - { - int rsize = 0, gsize = 0, bsize = 0, asize = 0; - - /* There doesn't seem to be a single flag in OpenGL for this! */ - if (SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &rsize) < 0) { - return -1; - } - if (SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &gsize) < 0) { - return -1; - } - if (SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &bsize) < 0) { - return -1; - } - if (SDL_GL_GetAttribute(SDL_GL_ALPHA_SIZE, &asize) < 0) { - return -1; - } + { + int rsize = 0, gsize = 0, bsize = 0, asize = 0; - *value = rsize + gsize + bsize + asize; - return 0; + /* There doesn't seem to be a single flag in OpenGL for this! */ + if (SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &rsize) < 0) { + return -1; } - case SDL_GL_ACCELERATED_VISUAL: - { - /* FIXME: How do we get this information? */ - *value = (_this->gl_config.accelerated != 0); - return 0; + if (SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &gsize) < 0) { + return -1; } - case SDL_GL_RETAINED_BACKING: - { - *value = _this->gl_config.retained_backing; - return 0; + if (SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &bsize) < 0) { + return -1; } - case SDL_GL_CONTEXT_MAJOR_VERSION: - { - *value = _this->gl_config.major_version; - return 0; + if (SDL_GL_GetAttribute(SDL_GL_ALPHA_SIZE, &asize) < 0) { + return -1; } + + *value = rsize + gsize + bsize + asize; + return 0; + } + case SDL_GL_ACCELERATED_VISUAL: + { + /* FIXME: How do we get this information? */ + *value = (_this->gl_config.accelerated != 0); + return 0; + } + case SDL_GL_RETAINED_BACKING: + { + *value = _this->gl_config.retained_backing; + return 0; + } + case SDL_GL_CONTEXT_MAJOR_VERSION: + { + *value = _this->gl_config.major_version; + return 0; + } case SDL_GL_CONTEXT_MINOR_VERSION: - { - *value = _this->gl_config.minor_version; - return 0; - } + { + *value = _this->gl_config.minor_version; + return 0; + } case SDL_GL_CONTEXT_EGL: /* FIXME: SDL_GL_CONTEXT_EGL to be deprecated in SDL 2.1 */ { if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { *value = 1; - } - else { + } else { *value = 0; } return 0; } case SDL_GL_CONTEXT_FLAGS: - { - *value = _this->gl_config.flags; - return 0; - } + { + *value = _this->gl_config.flags; + return 0; + } case SDL_GL_CONTEXT_PROFILE_MASK: - { - *value = _this->gl_config.profile_mask; - return 0; - } + { + *value = _this->gl_config.profile_mask; + return 0; + } case SDL_GL_SHARE_WITH_CURRENT_CONTEXT: - { - *value = _this->gl_config.share_with_current_context; - return 0; - } + { + *value = _this->gl_config.share_with_current_context; + return 0; + } case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE: - { - *value = _this->gl_config.framebuffer_srgb_capable; - return 0; - } + { + *value = _this->gl_config.framebuffer_srgb_capable; + return 0; + } case SDL_GL_CONTEXT_NO_ERROR: { *value = _this->gl_config.no_error; @@ -4008,15 +3939,15 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) #if SDL_VIDEO_OPENGL glGetStringFunc = SDL_GL_GetProcAddress("glGetString"); - if (!glGetStringFunc) { + if (glGetStringFunc == NULL) { return -1; } - if (attachmentattrib && isAtLeastGL3((const char *) glGetStringFunc(GL_VERSION))) { + if (attachmentattrib && isAtLeastGL3((const char *)glGetStringFunc(GL_VERSION))) { /* glGetFramebufferAttachmentParameteriv needs to operate on the window framebuffer for this, so bind FBO 0 if necessary. */ GLint current_fbo = 0; - void (APIENTRY *glGetIntegervFunc) (GLenum pname, GLint * params) = SDL_GL_GetProcAddress("glGetIntegerv"); - void (APIENTRY *glBindFramebufferFunc) (GLenum target, GLuint fbo) = SDL_GL_GetProcAddress("glBindFramebuffer"); + void(APIENTRY * glGetIntegervFunc)(GLenum pname, GLint * params) = SDL_GL_GetProcAddress("glGetIntegerv"); + void(APIENTRY * glBindFramebufferFunc)(GLenum target, GLuint fbo) = SDL_GL_GetProcAddress("glBindFramebuffer"); if (glGetIntegervFunc && glBindFramebufferFunc) { glGetIntegervFunc(GL_DRAW_FRAMEBUFFER_BINDING, ¤t_fbo); } @@ -4026,7 +3957,7 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) if (glBindFramebufferFunc && (current_fbo != 0)) { glBindFramebufferFunc(GL_DRAW_FRAMEBUFFER, 0); } - glGetFramebufferAttachmentParameterivFunc(GL_FRAMEBUFFER, attachment, attachmentattrib, (GLint *) value); + glGetFramebufferAttachmentParameterivFunc(GL_FRAMEBUFFER, attachment, attachmentattrib, (GLint *)value); if (glBindFramebufferFunc && (current_fbo != 0)) { glBindFramebufferFunc(GL_DRAW_FRAMEBUFFER, current_fbo); } @@ -4036,17 +3967,17 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) } else #endif { - void (APIENTRY *glGetIntegervFunc) (GLenum pname, GLint * params); + void(APIENTRY * glGetIntegervFunc)(GLenum pname, GLint * params); glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv"); if (glGetIntegervFunc) { - glGetIntegervFunc(attrib, (GLint *) value); + glGetIntegervFunc(attrib, (GLint *)value); } else { return -1; } } glGetErrorFunc = SDL_GL_GetProcAddress("glGetError"); - if (!glGetErrorFunc) { + if (glGetErrorFunc == NULL) { return -1; } @@ -4067,8 +3998,7 @@ SDL_GL_GetAttribute(SDL_GLattr attr, int *value) #define NOT_AN_OPENGL_WINDOW "The specified window isn't an OpenGL window" -SDL_GLContext -SDL_GL_CreateContext(SDL_Window * window) +SDL_GLContext SDL_GL_CreateContext(SDL_Window *window) { SDL_GLContext ctx = NULL; CHECK_WINDOW_MAGIC(window, NULL); @@ -4090,22 +4020,21 @@ SDL_GL_CreateContext(SDL_Window * window) return ctx; } -int -SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx) +int SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context) { int retval; - if (!_this) { + if (_this == NULL) { return SDL_UninitializedVideo(); } if (window == SDL_GL_GetCurrentWindow() && - ctx == SDL_GL_GetCurrentContext()) { + context == SDL_GL_GetCurrentContext()) { /* We're already current. */ return 0; } - if (!ctx) { + if (!context) { window = NULL; } else if (window) { CHECK_WINDOW_MAGIC(window, -1); @@ -4117,30 +4046,28 @@ SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx) return SDL_SetError("Use of OpenGL without a window is not supported on this platform"); } - retval = _this->GL_MakeCurrent(_this, window, ctx); + retval = _this->GL_MakeCurrent(_this, window, context); if (retval == 0) { _this->current_glwin = window; - _this->current_glctx = ctx; + _this->current_glctx = context; SDL_TLSSet(_this->current_glwin_tls, window, NULL); - SDL_TLSSet(_this->current_glctx_tls, ctx, NULL); + SDL_TLSSet(_this->current_glctx_tls, context, NULL); } return retval; } -SDL_Window * -SDL_GL_GetCurrentWindow(void) +SDL_Window *SDL_GL_GetCurrentWindow(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } return (SDL_Window *)SDL_TLSGet(_this->current_glwin_tls); } -SDL_GLContext -SDL_GL_GetCurrentContext(void) +SDL_GLContext SDL_GL_GetCurrentContext(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } @@ -4149,7 +4076,7 @@ SDL_GL_GetCurrentContext(void) void SDL_GL_GetDrawableSize(SDL_Window * window, int *w, int *h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (_this->GL_GetDrawableSize) { _this->GL_GetDrawableSize(_this, window, w, h); @@ -4158,10 +4085,9 @@ void SDL_GL_GetDrawableSize(SDL_Window * window, int *w, int *h) } } -int -SDL_GL_SetSwapInterval(int interval) +int SDL_GL_SetSwapInterval(int interval) { - if (!_this) { + if (_this == NULL) { return SDL_UninitializedVideo(); } else if (SDL_GL_GetCurrentContext() == NULL) { return SDL_SetError("No OpenGL context has been made current"); @@ -4172,10 +4098,9 @@ SDL_GL_SetSwapInterval(int interval) } } -int -SDL_GL_GetSwapInterval(void) +int SDL_GL_GetSwapInterval(void) { - if (!_this) { + if (_this == NULL) { return 0; } else if (SDL_GL_GetCurrentContext() == NULL) { return 0; @@ -4186,8 +4111,7 @@ SDL_GL_GetSwapInterval(void) } } -int -SDL_GL_SwapWindowWithResult(SDL_Window * window) +int SDL_GL_SwapWindowWithResult(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, -1); @@ -4202,16 +4126,14 @@ SDL_GL_SwapWindowWithResult(SDL_Window * window) return _this->GL_SwapWindow(_this, window); } -void -SDL_GL_SwapWindow(SDL_Window * window) +void SDL_GL_SwapWindow(SDL_Window *window) { SDL_GL_SwapWindowWithResult(window); } -void -SDL_GL_DeleteContext(SDL_GLContext context) +void SDL_GL_DeleteContext(SDL_GLContext context) { - if (!_this || !context) { + if (_this == NULL || !context) { return; } @@ -4222,18 +4144,17 @@ SDL_GL_DeleteContext(SDL_GLContext context) _this->GL_DeleteContext(_this, context); } -#if 0 /* FIXME */ +#if 0 /* FIXME */ /* * Utility function used by SDL_WM_SetIcon(); flags & 1 for color key, flags * & 2 for alpha channel. */ -static void -CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags) +static void CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags) { int x, y; Uint32 colorkey; #define SET_MASKBIT(icon, x, y, mask) \ - mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8))) + mask[(y * ((icon->w + 7) / 8)) + (x / 8)] &= ~(0x01 << (7 - (x % 8))) colorkey = icon->format->colorkey; switch (icon->format->BytesPerPixel) { @@ -4292,8 +4213,7 @@ CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags) /* * Sets the window manager icon for the display window. */ -void -SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) +void SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) { if (icon && _this->SetIcon) { /* Generate a mask if necessary, and create the icon! */ @@ -4321,8 +4241,7 @@ SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) } #endif -SDL_bool -SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info) { CHECK_WINDOW_MAGIC(window, SDL_FALSE); @@ -4339,8 +4258,7 @@ SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info) return (_this->GetWindowWMInfo(_this, window, info)); } -void -SDL_StartTextInput(void) +void SDL_StartTextInput(void) { SDL_Window *window; @@ -4349,9 +4267,11 @@ SDL_StartTextInput(void) (void)SDL_EventState(SDL_TEXTEDITING, SDL_ENABLE); /* Then show the on-screen keyboard, if any */ - window = SDL_GetFocusWindow(); - if (window && _this && _this->ShowScreenKeyboard) { - _this->ShowScreenKeyboard(_this, window); + if (SDL_GetHintBoolean(SDL_HINT_ENABLE_SCREEN_KEYBOARD, SDL_TRUE)) { + window = SDL_GetFocusWindow(); + if (window && _this && _this->ShowScreenKeyboard) { + _this->ShowScreenKeyboard(_this, window); + } } /* Finally start the text input system */ @@ -4360,16 +4280,14 @@ SDL_StartTextInput(void) } } -void -SDL_ClearComposition(void) +void SDL_ClearComposition(void) { if (_this && _this->ClearComposition) { _this->ClearComposition(_this); } } -SDL_bool -SDL_IsTextInputShown(void) +SDL_bool SDL_IsTextInputShown(void) { if (_this && _this->IsTextInputShown) { return _this->IsTextInputShown(_this); @@ -4378,14 +4296,12 @@ SDL_IsTextInputShown(void) return SDL_FALSE; } -SDL_bool -SDL_IsTextInputActive(void) +SDL_bool SDL_IsTextInputActive(void) { - return (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE); + return SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE; } -void -SDL_StopTextInput(void) +void SDL_StopTextInput(void) { SDL_Window *window; @@ -4395,9 +4311,11 @@ SDL_StopTextInput(void) } /* Hide the on-screen keyboard, if any */ - window = SDL_GetFocusWindow(); - if (window && _this && _this->HideScreenKeyboard) { - _this->HideScreenKeyboard(_this, window); + if (SDL_GetHintBoolean(SDL_HINT_ENABLE_SCREEN_KEYBOARD, SDL_TRUE)) { + window = SDL_GetFocusWindow(); + if (window && _this && _this->HideScreenKeyboard) { + _this->HideScreenKeyboard(_this, window); + } } /* Finally disable text events */ @@ -4405,16 +4323,14 @@ SDL_StopTextInput(void) (void)SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE); } -void -SDL_SetTextInputRect(const SDL_Rect *rect) +void SDL_SetTextInputRect(const SDL_Rect *rect) { if (_this && _this->SetTextInputRect) { _this->SetTextInputRect(_this, rect); } } -SDL_bool -SDL_HasScreenKeyboardSupport(void) +SDL_bool SDL_HasScreenKeyboardSupport(void) { if (_this && _this->HasScreenKeyboardSupport) { return _this->HasScreenKeyboardSupport(_this); @@ -4422,8 +4338,7 @@ SDL_HasScreenKeyboardSupport(void) return SDL_FALSE; } -SDL_bool -SDL_IsScreenKeyboardShown(SDL_Window *window) +SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window) { if (window && _this && _this->IsScreenKeyboardShown) { return _this->IsScreenKeyboardShown(_this, window); @@ -4431,8 +4346,7 @@ SDL_IsScreenKeyboardShown(SDL_Window *window) return SDL_FALSE; } -int -SDL_GetMessageBoxCount(void) +int SDL_GetMessageBoxCount(void) { return SDL_AtomicGet(&SDL_messagebox_count); } @@ -4490,8 +4404,7 @@ static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messagebo } #endif -int -SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { int dummybutton; int retval = -1; @@ -4500,7 +4413,7 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) SDL_Window *current_window; SDL_MessageBoxData mbdata; - if (!messageboxdata) { + if (messageboxdata == NULL) { return SDL_InvalidParamError("messageboxdata"); } else if (messageboxdata->numbuttons < 0) { return SDL_SetError("Invalid number of buttons"); @@ -4515,13 +4428,17 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) show_cursor_prev = SDL_ShowCursor(1); SDL_ResetKeyboard(); - if (!buttonid) { + if (buttonid == NULL) { buttonid = &dummybutton; } SDL_memcpy(&mbdata, messageboxdata, sizeof(*messageboxdata)); - if (!mbdata.title) mbdata.title = ""; - if (!mbdata.message) mbdata.message = ""; + if (!mbdata.title) { + mbdata.title = ""; + } + if (!mbdata.message) { + mbdata.message = ""; + } messageboxdata = &mbdata; SDL_ClearError(); @@ -4627,19 +4544,23 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) return retval; } -int -SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window) +int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window) { #ifdef __EMSCRIPTEN__ /* !!! FIXME: propose a browser API for this, get this #ifdef out of here? */ /* Web browsers don't (currently) have an API for a custom message box that can block, but for the most common case (SDL_ShowSimpleMessageBox), we can use the standard Javascript alert() function. */ - if (!title) title = ""; - if (!message) message = ""; - EM_ASM_({ + if (title == NULL) { + title = ""; + } + if (message == NULL) { + message = ""; + } + EM_ASM({ alert(UTF8ToString($0) + "\n\n" + UTF8ToString($1)); - }, title, message); + }, + title, message); return 0; #else SDL_MessageBoxData data; @@ -4662,14 +4583,12 @@ SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, S #endif } -SDL_bool -SDL_ShouldAllowTopmost(void) +SDL_bool SDL_ShouldAllowTopmost(void) { return SDL_GetHintBoolean(SDL_HINT_ALLOW_TOPMOST, SDL_TRUE); } -int -SDL_SetWindowHitTest(SDL_Window * window, SDL_HitTest callback, void *userdata) +int SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data) { CHECK_WINDOW_MAGIC(window, -1); @@ -4680,21 +4599,19 @@ SDL_SetWindowHitTest(SDL_Window * window, SDL_HitTest callback, void *userdata) } window->hit_test = callback; - window->hit_test_data = userdata; + window->hit_test_data = callback_data; return 0; } -float -SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches) +float SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches) { float den2 = hinches * hinches + vinches * vinches; if (den2 <= 0.0f) { return 0.0f; } - return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) / - SDL_sqrt((double)den2)); + return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) / SDL_sqrt((double)den2)); } /* @@ -4750,7 +4667,7 @@ void SDL_OnApplicationDidBecomeActive(void) int SDL_Vulkan_LoadLibrary(const char *path) { int retval; - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return -1; } @@ -4773,7 +4690,7 @@ int SDL_Vulkan_LoadLibrary(const char *path) void *SDL_Vulkan_GetVkGetInstanceProcAddr(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return NULL; } @@ -4786,7 +4703,7 @@ void *SDL_Vulkan_GetVkGetInstanceProcAddr(void) void SDL_Vulkan_UnloadLibrary(void) { - if (!_this) { + if (_this == NULL) { SDL_UninitializedVideo(); return; } @@ -4805,14 +4722,13 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned *count, c if (window) { CHECK_WINDOW_MAGIC(window, SDL_FALSE); - if (!(window->flags & SDL_WINDOW_VULKAN)) - { + if (!(window->flags & SDL_WINDOW_VULKAN)) { SDL_SetError(NOT_A_VULKAN_WINDOW); return SDL_FALSE; } } - if (!count) { + if (count == NULL) { SDL_InvalidParamError("count"); return SDL_FALSE; } @@ -4836,7 +4752,7 @@ SDL_bool SDL_Vulkan_CreateSurface(SDL_Window *window, return SDL_FALSE; } - if (!surface) { + if (surface == NULL) { SDL_InvalidParamError("surface"); return SDL_FALSE; } @@ -4844,9 +4760,9 @@ SDL_bool SDL_Vulkan_CreateSurface(SDL_Window *window, return _this->Vulkan_CreateSurface(_this, window, instance, surface); } -void SDL_Vulkan_GetDrawableSize(SDL_Window * window, int *w, int *h) +void SDL_Vulkan_GetDrawableSize(SDL_Window *window, int *w, int *h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (_this->Vulkan_GetDrawableSize) { _this->Vulkan_GetDrawableSize(_this, window, w, h); @@ -4855,8 +4771,7 @@ void SDL_Vulkan_GetDrawableSize(SDL_Window * window, int *w, int *h) } } -SDL_MetalView -SDL_Metal_CreateView(SDL_Window * window) +SDL_MetalView SDL_Metal_CreateView(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, NULL); @@ -4876,16 +4791,14 @@ SDL_Metal_CreateView(SDL_Window * window) return _this->Metal_CreateView(_this, window); } -void -SDL_Metal_DestroyView(SDL_MetalView view) +void SDL_Metal_DestroyView(SDL_MetalView view) { if (_this && view && _this->Metal_DestroyView) { _this->Metal_DestroyView(_this, view); } } -void * -SDL_Metal_GetLayer(SDL_MetalView view) +void *SDL_Metal_GetLayer(SDL_MetalView view) { if (_this && _this->Metal_GetLayer) { if (view) { @@ -4900,9 +4813,9 @@ SDL_Metal_GetLayer(SDL_MetalView view) } } -void SDL_Metal_GetDrawableSize(SDL_Window * window, int *w, int *h) +void SDL_Metal_GetDrawableSize(SDL_Window *window, int *w, int *h) { - CHECK_WINDOW_MAGIC(window,); + CHECK_WINDOW_MAGIC(window, ); if (_this->Metal_GetDrawableSize) { _this->Metal_GetDrawableSize(_this, window, w, h); diff --git a/modules/SDL2/src/video/SDL_vulkan_internal.h b/modules/SDL2/src/video/SDL_vulkan_internal.h index cc7767e..ff731c3 100644 --- a/modules/SDL2/src/video/SDL_vulkan_internal.h +++ b/modules/SDL2/src/video/SDL_vulkan_internal.h @@ -62,7 +62,6 @@ #include "SDL_vulkan.h" - extern const char *SDL_Vulkan_GetResultString(VkResult result); extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList( @@ -88,8 +87,8 @@ extern SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr, /* No SDL Vulkan support, just include the header for typedefs */ #include "SDL_vulkan.h" -typedef void (*PFN_vkGetInstanceProcAddr) (void); -typedef int (*PFN_vkEnumerateInstanceExtensionProperties) (void); +typedef void (*PFN_vkGetInstanceProcAddr)(void); +typedef int (*PFN_vkEnumerateInstanceExtensionProperties)(void); #endif /* SDL_VIDEO_VULKAN */ diff --git a/modules/SDL2/src/video/SDL_vulkan_utils.c b/modules/SDL2/src/video/SDL_vulkan_utils.c index 2090251..3d5827f 100644 --- a/modules/SDL2/src/video/SDL_vulkan_utils.c +++ b/modules/SDL2/src/video/SDL_vulkan_utils.c @@ -28,88 +28,88 @@ const char *SDL_Vulkan_GetResultString(VkResult result) { switch ((int)result) { - case VK_SUCCESS: - return "VK_SUCCESS"; - case VK_NOT_READY: - return "VK_NOT_READY"; - case VK_TIMEOUT: - return "VK_TIMEOUT"; - case VK_EVENT_SET: - return "VK_EVENT_SET"; - case VK_EVENT_RESET: - return "VK_EVENT_RESET"; - case VK_INCOMPLETE: - return "VK_INCOMPLETE"; - case VK_ERROR_OUT_OF_HOST_MEMORY: - return "VK_ERROR_OUT_OF_HOST_MEMORY"; - case VK_ERROR_OUT_OF_DEVICE_MEMORY: - return "VK_ERROR_OUT_OF_DEVICE_MEMORY"; - case VK_ERROR_INITIALIZATION_FAILED: - return "VK_ERROR_INITIALIZATION_FAILED"; - case VK_ERROR_DEVICE_LOST: - return "VK_ERROR_DEVICE_LOST"; - case VK_ERROR_MEMORY_MAP_FAILED: - return "VK_ERROR_MEMORY_MAP_FAILED"; - case VK_ERROR_LAYER_NOT_PRESENT: - return "VK_ERROR_LAYER_NOT_PRESENT"; - case VK_ERROR_EXTENSION_NOT_PRESENT: - return "VK_ERROR_EXTENSION_NOT_PRESENT"; - case VK_ERROR_FEATURE_NOT_PRESENT: - return "VK_ERROR_FEATURE_NOT_PRESENT"; - case VK_ERROR_INCOMPATIBLE_DRIVER: - return "VK_ERROR_INCOMPATIBLE_DRIVER"; - case VK_ERROR_TOO_MANY_OBJECTS: - return "VK_ERROR_TOO_MANY_OBJECTS"; - case VK_ERROR_FORMAT_NOT_SUPPORTED: - return "VK_ERROR_FORMAT_NOT_SUPPORTED"; - case VK_ERROR_FRAGMENTED_POOL: - return "VK_ERROR_FRAGMENTED_POOL"; - case VK_ERROR_UNKNOWN: - return "VK_ERROR_UNKNOWN"; - case VK_ERROR_OUT_OF_POOL_MEMORY: - return "VK_ERROR_OUT_OF_POOL_MEMORY"; - case VK_ERROR_INVALID_EXTERNAL_HANDLE: - return "VK_ERROR_INVALID_EXTERNAL_HANDLE"; - case VK_ERROR_FRAGMENTATION: - return "VK_ERROR_FRAGMENTATION"; - case VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS: - return "VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"; - case VK_ERROR_SURFACE_LOST_KHR: - return "VK_ERROR_SURFACE_LOST_KHR"; - case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: - return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"; - case VK_SUBOPTIMAL_KHR: - return "VK_SUBOPTIMAL_KHR"; - case VK_ERROR_OUT_OF_DATE_KHR: - return "VK_ERROR_OUT_OF_DATE_KHR"; - case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: - return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"; - case VK_ERROR_VALIDATION_FAILED_EXT: - return "VK_ERROR_VALIDATION_FAILED_EXT"; - case VK_ERROR_INVALID_SHADER_NV: - return "VK_ERROR_INVALID_SHADER_NV"; + case VK_SUCCESS: + return "VK_SUCCESS"; + case VK_NOT_READY: + return "VK_NOT_READY"; + case VK_TIMEOUT: + return "VK_TIMEOUT"; + case VK_EVENT_SET: + return "VK_EVENT_SET"; + case VK_EVENT_RESET: + return "VK_EVENT_RESET"; + case VK_INCOMPLETE: + return "VK_INCOMPLETE"; + case VK_ERROR_OUT_OF_HOST_MEMORY: + return "VK_ERROR_OUT_OF_HOST_MEMORY"; + case VK_ERROR_OUT_OF_DEVICE_MEMORY: + return "VK_ERROR_OUT_OF_DEVICE_MEMORY"; + case VK_ERROR_INITIALIZATION_FAILED: + return "VK_ERROR_INITIALIZATION_FAILED"; + case VK_ERROR_DEVICE_LOST: + return "VK_ERROR_DEVICE_LOST"; + case VK_ERROR_MEMORY_MAP_FAILED: + return "VK_ERROR_MEMORY_MAP_FAILED"; + case VK_ERROR_LAYER_NOT_PRESENT: + return "VK_ERROR_LAYER_NOT_PRESENT"; + case VK_ERROR_EXTENSION_NOT_PRESENT: + return "VK_ERROR_EXTENSION_NOT_PRESENT"; + case VK_ERROR_FEATURE_NOT_PRESENT: + return "VK_ERROR_FEATURE_NOT_PRESENT"; + case VK_ERROR_INCOMPATIBLE_DRIVER: + return "VK_ERROR_INCOMPATIBLE_DRIVER"; + case VK_ERROR_TOO_MANY_OBJECTS: + return "VK_ERROR_TOO_MANY_OBJECTS"; + case VK_ERROR_FORMAT_NOT_SUPPORTED: + return "VK_ERROR_FORMAT_NOT_SUPPORTED"; + case VK_ERROR_FRAGMENTED_POOL: + return "VK_ERROR_FRAGMENTED_POOL"; + case VK_ERROR_UNKNOWN: + return "VK_ERROR_UNKNOWN"; + case VK_ERROR_OUT_OF_POOL_MEMORY: + return "VK_ERROR_OUT_OF_POOL_MEMORY"; + case VK_ERROR_INVALID_EXTERNAL_HANDLE: + return "VK_ERROR_INVALID_EXTERNAL_HANDLE"; + case VK_ERROR_FRAGMENTATION: + return "VK_ERROR_FRAGMENTATION"; + case VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS: + return "VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"; + case VK_ERROR_SURFACE_LOST_KHR: + return "VK_ERROR_SURFACE_LOST_KHR"; + case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: + return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"; + case VK_SUBOPTIMAL_KHR: + return "VK_SUBOPTIMAL_KHR"; + case VK_ERROR_OUT_OF_DATE_KHR: + return "VK_ERROR_OUT_OF_DATE_KHR"; + case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: + return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"; + case VK_ERROR_VALIDATION_FAILED_EXT: + return "VK_ERROR_VALIDATION_FAILED_EXT"; + case VK_ERROR_INVALID_SHADER_NV: + return "VK_ERROR_INVALID_SHADER_NV"; #if VK_HEADER_VERSION >= 135 && VK_HEADER_VERSION < 162 - case VK_ERROR_INCOMPATIBLE_VERSION_KHR: - return "VK_ERROR_INCOMPATIBLE_VERSION_KHR"; + case VK_ERROR_INCOMPATIBLE_VERSION_KHR: + return "VK_ERROR_INCOMPATIBLE_VERSION_KHR"; #endif - case VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: - return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"; - case VK_ERROR_NOT_PERMITTED_EXT: - return "VK_ERROR_NOT_PERMITTED_EXT"; - case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: - return "VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"; - case VK_THREAD_IDLE_KHR: - return "VK_THREAD_IDLE_KHR"; - case VK_THREAD_DONE_KHR: - return "VK_THREAD_DONE_KHR"; - case VK_OPERATION_DEFERRED_KHR: - return "VK_OPERATION_DEFERRED_KHR"; - case VK_OPERATION_NOT_DEFERRED_KHR: - return "VK_OPERATION_NOT_DEFERRED_KHR"; - case VK_PIPELINE_COMPILE_REQUIRED_EXT: - return "VK_PIPELINE_COMPILE_REQUIRED_EXT"; - default: - break; + case VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: + return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"; + case VK_ERROR_NOT_PERMITTED_EXT: + return "VK_ERROR_NOT_PERMITTED_EXT"; + case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: + return "VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"; + case VK_THREAD_IDLE_KHR: + return "VK_THREAD_IDLE_KHR"; + case VK_THREAD_DONE_KHR: + return "VK_THREAD_DONE_KHR"; + case VK_OPERATION_DEFERRED_KHR: + return "VK_OPERATION_DEFERRED_KHR"; + case VK_OPERATION_NOT_DEFERRED_KHR: + return "VK_OPERATION_NOT_DEFERRED_KHR"; + case VK_PIPELINE_COMPILE_REQUIRED_EXT: + return "VK_PIPELINE_COMPILE_REQUIRED_EXT"; + default: + break; } if (result < 0) { return "VK_ERROR_"; @@ -149,7 +149,7 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList( retval = SDL_calloc(count, sizeof(VkExtensionProperties)); } - if (!retval) { + if (retval == NULL) { SDL_OutOfMemory(); return NULL; } @@ -198,12 +198,12 @@ static const VkDisplayPlaneAlphaFlagBitsKHR alphaModes[4] = { }; SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, - VkInstance instance, - VkSurfaceKHR *surface) + VkInstance instance, + VkSurfaceKHR *surface) { PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)vkGetInstanceProcAddr_; -#define VULKAN_INSTANCE_FUNCTION(name) \ +#define VULKAN_INSTANCE_FUNCTION(name) \ PFN_##name name = (PFN_##name)vkGetInstanceProcAddr((VkInstance)instance, #name) VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices); VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceDisplayPropertiesKHR); @@ -222,17 +222,17 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, int displayId = 0; /* Counting from physical device 0, display 0 */ if (!vkEnumeratePhysicalDevices || - !vkGetPhysicalDeviceDisplayPropertiesKHR || - !vkGetDisplayModePropertiesKHR || - !vkGetPhysicalDeviceDisplayPlanePropertiesKHR || - !vkGetDisplayPlaneCapabilitiesKHR || - !vkGetDisplayPlaneSupportedDisplaysKHR || - !vkCreateDisplayPlaneSurfaceKHR) { + !vkGetPhysicalDeviceDisplayPropertiesKHR || + !vkGetDisplayModePropertiesKHR || + !vkGetPhysicalDeviceDisplayPlanePropertiesKHR || + !vkGetDisplayPlaneCapabilitiesKHR || + !vkGetDisplayPlaneSupportedDisplaysKHR || + !vkCreateDisplayPlaneSurfaceKHR) { SDL_SetError(VK_KHR_DISPLAY_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); goto error; } - - if ((chosenDisplayId = SDL_getenv("SDL_VULKAN_DISPLAY")) != NULL) { + chosenDisplayId = SDL_getenv("SDL_VULKAN_DISPLAY"); + if (chosenDisplayId != NULL) { displayId = SDL_atoi(chosenDisplayId); } @@ -249,7 +249,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, } physicalDevices = SDL_malloc(sizeof(VkPhysicalDevice) * physicalDeviceCount); - if (!physicalDevices) { + if (physicalDevices == NULL) { SDL_OutOfMemory(); goto error; } @@ -283,16 +283,16 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, continue; } SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display properties for device %u: %u", - physicalDeviceIndex, displayPropertiesCount); + physicalDeviceIndex, displayPropertiesCount); - if (displayId < 0 || (uint32_t) displayId >= displayPropertiesCount) { + if (displayId < 0 || (uint32_t)displayId >= displayPropertiesCount) { /* Display id specified was higher than number of available displays, move to next physical device. */ displayId -= displayPropertiesCount; continue; } displayProperties = SDL_malloc(sizeof(VkDisplayPropertiesKHR) * displayPropertiesCount); - if (!displayProperties) { + if (displayProperties == NULL) { SDL_OutOfMemory(); goto error; } @@ -307,22 +307,21 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, display = displayProperties[displayId].display; extent = displayProperties[displayId].physicalResolution; SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Display: %s Native resolution: %ux%u", - displayProperties[displayId].displayName, extent.width, extent.height); + displayProperties[displayId].displayName, extent.width, extent.height); SDL_free(displayProperties); displayProperties = NULL; /* Get display mode properties for the chosen display */ result = vkGetDisplayModePropertiesKHR(physicalDevice, display, &displayModePropertiesCount, NULL); - if (result != VK_SUCCESS || displayModePropertiesCount == 0) - { + if (result != VK_SUCCESS || displayModePropertiesCount == 0) { SDL_SetError("Error enumerating display modes"); goto error; } SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display modes: %u", displayModePropertiesCount); displayModeProperties = SDL_malloc(sizeof(VkDisplayModePropertiesKHR) * displayModePropertiesCount); - if (!displayModeProperties) { + if (displayModeProperties == NULL) { SDL_OutOfMemory(); goto error; } @@ -353,9 +352,9 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, SDL_zero(createInfo); createInfo.displayMode = displayModeProperties[bestMatchIndex].displayMode; SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Matching mode %ux%u with refresh rate %u", - displayModeProperties[bestMatchIndex].parameters.visibleRegion.width, - displayModeProperties[bestMatchIndex].parameters.visibleRegion.height, - refreshRate); + displayModeProperties[bestMatchIndex].parameters.visibleRegion.width, + displayModeProperties[bestMatchIndex].parameters.visibleRegion.height, + refreshRate); SDL_free(displayModeProperties); displayModeProperties = NULL; @@ -369,7 +368,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display planes: %u", displayPlanePropertiesCount); displayPlaneProperties = SDL_malloc(sizeof(VkDisplayPlanePropertiesKHR) * displayPlanePropertiesCount); - if (!displayPlaneProperties) { + if (displayPlaneProperties == NULL) { SDL_OutOfMemory(); goto error; } @@ -394,13 +393,13 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, /* Check supported displays for this plane. */ result = vkGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, i, &planeSupportedDisplaysCount, NULL); if (result != VK_SUCCESS || planeSupportedDisplaysCount == 0) { - continue; /* No supported displays, on to next plane. */ + continue; /* No supported displays, on to next plane. */ } SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of supported displays for plane %u: %u", i, planeSupportedDisplaysCount); planeSupportedDisplays = SDL_malloc(sizeof(VkDisplayKHR) * planeSupportedDisplaysCount); - if (!planeSupportedDisplays) { + if (planeSupportedDisplays == NULL) { SDL_free(displayPlaneProperties); SDL_OutOfMemory(); goto error; @@ -414,8 +413,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, goto error; } - for (j = 0; j < planeSupportedDisplaysCount && planeSupportedDisplays[j] != display; ++j) - { + for (j = 0; j < planeSupportedDisplaysCount && planeSupportedDisplays[j] != display; ++j) { } SDL_free(planeSupportedDisplays); @@ -438,8 +436,8 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, extent.width <= planeCaps.maxDstExtent.width && extent.height <= planeCaps.maxDstExtent.height) { /* If it does, choose this plane. */ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Choosing plane %d, minimum extent %dx%d maximum extent %dx%d", i, - planeCaps.minDstExtent.width, planeCaps.minDstExtent.height, - planeCaps.maxDstExtent.width, planeCaps.maxDstExtent.height); + planeCaps.minDstExtent.width, planeCaps.minDstExtent.height, + planeCaps.maxDstExtent.width, planeCaps.maxDstExtent.height); planeIndex = i; break; } diff --git a/modules/SDL2/src/video/SDL_yuv.c b/modules/SDL2/src/video/SDL_yuv.c index 464fa8d..dd79d79 100644 --- a/modules/SDL2/src/video/SDL_yuv.c +++ b/modules/SDL2/src/video/SDL_yuv.c @@ -27,11 +27,13 @@ #include "yuv2rgb/yuv_rgb.h" -#define SDL_YUV_SD_THRESHOLD 576 - +#define SDL_YUV_SD_THRESHOLD 576 static SDL_YUV_CONVERSION_MODE SDL_YUV_ConversionMode = SDL_YUV_CONVERSION_BT601; +#if SDL_HAVE_YUV +static SDL_bool IsPlanar2x2Format(Uint32 format); +#endif void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode) { @@ -56,6 +58,133 @@ SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionModeForResolution(int width, int hei return mode; } +/* + * Calculate YUV size and pitch. Check for overflow. + * Output 'pitch' that can be used with SDL_ConvertPixels() + * + * return 0 on success, -1 on error + */ +int SDL_CalculateYUVSize(Uint32 format, int w, int h, size_t *size, int *pitch) +{ +#if SDL_HAVE_YUV + int sz_plane = 0, sz_plane_chroma = 0, sz_plane_packed = 0; + + if (IsPlanar2x2Format(format) == SDL_TRUE) { + { + /* sz_plane == w * h; */ + size_t s1; + if (SDL_size_mul_overflow(w, h, &s1) < 0) { + return -1; + } + sz_plane = (int) s1; + } + + { + /* sz_plane_chroma == ((w + 1) / 2) * ((h + 1) / 2); */ + size_t s1, s2, s3; + if (SDL_size_add_overflow(w, 1, &s1) < 0) { + return -1; + } + s1 = s1 / 2; + if (SDL_size_add_overflow(h, 1, &s2) < 0) { + return -1; + } + s2 = s2 / 2; + if (SDL_size_mul_overflow(s1, s2, &s3) < 0) { + return -1; + } + sz_plane_chroma = (int) s3; + } + } else { + /* sz_plane_packed == ((w + 1) / 2) * h; */ + size_t s1, s2; + if (SDL_size_add_overflow(w, 1, &s1) < 0) { + return -1; + } + s1 = s1 / 2; + if (SDL_size_mul_overflow(s1, h, &s2) < 0) { + return -1; + } + sz_plane_packed = (int) s2; + } + + switch (format) { + case SDL_PIXELFORMAT_YV12: /**< Planar mode: Y + V + U (3 planes) */ + case SDL_PIXELFORMAT_IYUV: /**< Planar mode: Y + U + V (3 planes) */ + + if (pitch) { + *pitch = w; + } + + if (size) { + /* dst_size == sz_plane + sz_plane_chroma + sz_plane_chroma; */ + size_t s1, s2; + if (SDL_size_add_overflow(sz_plane, sz_plane_chroma, &s1) < 0) { + return -1; + } + if (SDL_size_add_overflow(s1, sz_plane_chroma, &s2) < 0) { + return -1; + } + *size = (int)s2; + } + break; + + case SDL_PIXELFORMAT_YUY2: /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */ + case SDL_PIXELFORMAT_UYVY: /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */ + case SDL_PIXELFORMAT_YVYU: /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */ + + if (pitch) { + /* pitch == ((w + 1) / 2) * 4; */ + size_t p1, p2; + if (SDL_size_add_overflow(w, 1, &p1) < 0) { + return -1; + } + p1 = p1 / 2; + if (SDL_size_mul_overflow(p1, 4, &p2) < 0) { + return -1; + } + *pitch = (int) p2; + } + + if (size) { + /* dst_size == 4 * sz_plane_packed; */ + size_t s1; + if (SDL_size_mul_overflow(sz_plane_packed, 4, &s1) < 0) { + return -1; + } + *size = (int) s1; + } + break; + + case SDL_PIXELFORMAT_NV12: /**< Planar mode: Y + U/V interleaved (2 planes) */ + case SDL_PIXELFORMAT_NV21: /**< Planar mode: Y + V/U interleaved (2 planes) */ + if (pitch) { + *pitch = w; + } + + if (size) { + /* dst_size == sz_plane + sz_plane_chroma + sz_plane_chroma; */ + size_t s1, s2; + if (SDL_size_add_overflow(sz_plane, sz_plane_chroma, &s1) < 0) { + return -1; + } + if (SDL_size_add_overflow(s1, sz_plane_chroma, &s2) < 0) { + return -1; + } + *size = (int) s2; + } + break; + + default: + return -1; + } + + return 0; +#else + return -1; +#endif +} + #if SDL_HAVE_YUV static int GetYUVConversionType(int width, int height, YCbCrType *yuv_type) @@ -78,17 +207,12 @@ static int GetYUVConversionType(int width, int height, YCbCrType *yuv_type) static SDL_bool IsPlanar2x2Format(Uint32 format) { - return (format == SDL_PIXELFORMAT_YV12 || - format == SDL_PIXELFORMAT_IYUV || - format == SDL_PIXELFORMAT_NV12 || - format == SDL_PIXELFORMAT_NV21); + return format == SDL_PIXELFORMAT_YV12 || format == SDL_PIXELFORMAT_IYUV || format == SDL_PIXELFORMAT_NV12 || format == SDL_PIXELFORMAT_NV21; } static SDL_bool IsPacked4Format(Uint32 format) { - return (format == SDL_PIXELFORMAT_YUY2 || - format == SDL_PIXELFORMAT_UYVY || - format == SDL_PIXELFORMAT_YVYU); + return format == SDL_PIXELFORMAT_YUY2 || format == SDL_PIXELFORMAT_UYVY || format == SDL_PIXELFORMAT_YVYU; } static int GetYUVPlanes(int width, int height, Uint32 format, const void *yuv, int yuv_pitch, @@ -183,9 +307,9 @@ static int GetYUVPlanes(int width, int height, Uint32 format, const void *yuv, i static SDL_bool yuv_rgb_sse( Uint32 src_format, Uint32 dst_format, - Uint32 width, Uint32 height, - const Uint8 *y, const Uint8 *u, const Uint8 *v, Uint32 y_stride, Uint32 uv_stride, - Uint8 *rgb, Uint32 rgb_stride, + Uint32 width, Uint32 height, + const Uint8 *y, const Uint8 *u, const Uint8 *v, Uint32 y_stride, Uint32 uv_stride, + Uint8 *rgb, Uint32 rgb_stride, YCbCrType yuv_type) { #ifdef __SSE2__ @@ -334,9 +458,9 @@ static SDL_bool yuv_rgb_lsx( static SDL_bool yuv_rgb_std( Uint32 src_format, Uint32 dst_format, - Uint32 width, Uint32 height, - const Uint8 *y, const Uint8 *u, const Uint8 *v, Uint32 y_stride, Uint32 uv_stride, - Uint8 *rgb, Uint32 rgb_stride, + Uint32 width, Uint32 height, + const Uint8 *y, const Uint8 *u, const Uint8 *v, Uint32 y_stride, Uint32 uv_stride, + Uint8 *rgb, Uint32 rgb_stride, YCbCrType yuv_type) { if (src_format == SDL_PIXELFORMAT_YV12 || @@ -435,10 +559,9 @@ static SDL_bool yuv_rgb_std( return SDL_FALSE; } -int -SDL_ConvertPixels_YUV_to_RGB(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +int SDL_ConvertPixels_YUV_to_RGB(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { const Uint8 *y = NULL; const Uint8 *u = NULL; @@ -455,15 +578,15 @@ SDL_ConvertPixels_YUV_to_RGB(int width, int height, return -1; } - if (yuv_rgb_sse(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8*)dst, dst_pitch, yuv_type)) { + if (yuv_rgb_sse(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8 *)dst, dst_pitch, yuv_type)) { return 0; } - if (yuv_rgb_lsx(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8*)dst, dst_pitch, yuv_type)) { + if (yuv_rgb_lsx(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8 *)dst, dst_pitch, yuv_type)) { return 0; } - if (yuv_rgb_std(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8*)dst, dst_pitch, yuv_type)) { + if (yuv_rgb_std(src_format, dst_format, width, height, y, u, v, y_stride, uv_stride, (Uint8 *)dst, dst_pitch, yuv_type)) { return 0; } @@ -473,7 +596,7 @@ SDL_ConvertPixels_YUV_to_RGB(int width, int height, void *tmp; int tmp_pitch = (width * sizeof(Uint32)); - tmp = SDL_malloc(tmp_pitch * height); + tmp = SDL_malloc((size_t)tmp_pitch * height); if (tmp == NULL) { return SDL_OutOfMemory(); } @@ -502,37 +625,35 @@ struct RGB2YUVFactors float v[3]; /* Rfactor, Gfactor, Bfactor */ }; -static int -SDL_ConvertPixels_ARGB8888_to_YUV(int width, int height, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch) +static int SDL_ConvertPixels_ARGB8888_to_YUV(int width, int height, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch) { - const int src_pitch_x_2 = src_pitch * 2; - const int height_half = height / 2; + const int src_pitch_x_2 = src_pitch * 2; + const int height_half = height / 2; const int height_remainder = (height & 0x1); - const int width_half = width / 2; - const int width_remainder = (width & 0x1); + const int width_half = width / 2; + const int width_remainder = (width & 0x1); int i, j; - - static struct RGB2YUVFactors RGB2YUVFactorTables[SDL_YUV_CONVERSION_BT709 + 1] = - { + + static struct RGB2YUVFactors RGB2YUVFactorTables[SDL_YUV_CONVERSION_BT709 + 1] = { /* ITU-T T.871 (JPEG) */ { 0, - { 0.2990f, 0.5870f, 0.1140f }, - { -0.1687f, -0.3313f, 0.5000f }, - { 0.5000f, -0.4187f, -0.0813f }, + { 0.2990f, 0.5870f, 0.1140f }, + { -0.1687f, -0.3313f, 0.5000f }, + { 0.5000f, -0.4187f, -0.0813f }, }, /* ITU-R BT.601-7 */ { 16, - { 0.2568f, 0.5041f, 0.0979f }, - { -0.1482f, -0.2910f, 0.4392f }, - { 0.4392f, -0.3678f, -0.0714f }, + { 0.2568f, 0.5041f, 0.0979f }, + { -0.1482f, -0.2910f, 0.4392f }, + { 0.4392f, -0.3678f, -0.0714f }, }, /* ITU-R BT.709-6 */ { 16, - { 0.1826f, 0.6142f, 0.0620f }, - {-0.1006f, -0.3386f, 0.4392f }, + { 0.1826f, 0.6142f, 0.0620f }, + { -0.1006f, -0.3386f, 0.4392f }, { 0.4392f, -0.3989f, -0.0403f }, }, }; @@ -542,279 +663,266 @@ SDL_ConvertPixels_ARGB8888_to_YUV(int width, int height, const void *src, int sr #define MAKE_U(r, g, b) (Uint8)((int)(cvt->u[0] * (r) + cvt->u[1] * (g) + cvt->u[2] * (b) + 0.5f) + 128) #define MAKE_V(r, g, b) (Uint8)((int)(cvt->v[0] * (r) + cvt->v[1] * (g) + cvt->v[2] * (b) + 0.5f) + 128) -#define READ_2x2_PIXELS \ - const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ - const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1]; \ - const Uint32 p3 = ((const Uint32 *)next_row)[2 * i]; \ - const Uint32 p4 = ((const Uint32 *)next_row)[2 * i + 1]; \ - const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000) + (p3 & 0x00ff0000) + (p4 & 0x00ff0000)) >> 18; \ - const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00) + (p3 & 0x0000ff00) + (p4 & 0x0000ff00)) >> 10; \ - const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff) + (p3 & 0x000000ff) + (p4 & 0x000000ff)) >> 2; \ - -#define READ_2x1_PIXELS \ - const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ - const Uint32 p2 = ((const Uint32 *)next_row)[2 * i]; \ - const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \ - const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9; \ - const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1; \ - -#define READ_1x2_PIXELS \ - const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ - const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1]; \ - const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \ - const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9; \ - const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1; \ - -#define READ_1x1_PIXEL \ - const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \ - const Uint32 r = (p & 0x00ff0000) >> 16; \ - const Uint32 g = (p & 0x0000ff00) >> 8; \ - const Uint32 b = (p & 0x000000ff); \ - -#define READ_TWO_RGB_PIXELS \ - const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \ - const Uint32 r = (p & 0x00ff0000) >> 16; \ - const Uint32 g = (p & 0x0000ff00) >> 8; \ - const Uint32 b = (p & 0x000000ff); \ - const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i + 1]; \ - const Uint32 r1 = (p1 & 0x00ff0000) >> 16; \ - const Uint32 g1 = (p1 & 0x0000ff00) >> 8; \ - const Uint32 b1 = (p1 & 0x000000ff); \ - const Uint32 R = (r + r1)/2; \ - const Uint32 G = (g + g1)/2; \ - const Uint32 B = (b + b1)/2; \ - -#define READ_ONE_RGB_PIXEL READ_1x1_PIXEL - - switch (dst_format) - { +#define READ_2x2_PIXELS \ + const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ + const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1]; \ + const Uint32 p3 = ((const Uint32 *)next_row)[2 * i]; \ + const Uint32 p4 = ((const Uint32 *)next_row)[2 * i + 1]; \ + const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000) + (p3 & 0x00ff0000) + (p4 & 0x00ff0000)) >> 18; \ + const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00) + (p3 & 0x0000ff00) + (p4 & 0x0000ff00)) >> 10; \ + const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff) + (p3 & 0x000000ff) + (p4 & 0x000000ff)) >> 2; + +#define READ_2x1_PIXELS \ + const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ + const Uint32 p2 = ((const Uint32 *)next_row)[2 * i]; \ + const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \ + const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9; \ + const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1; + +#define READ_1x2_PIXELS \ + const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ + const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1]; \ + const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \ + const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9; \ + const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1; + +#define READ_1x1_PIXEL \ + const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \ + const Uint32 r = (p & 0x00ff0000) >> 16; \ + const Uint32 g = (p & 0x0000ff00) >> 8; \ + const Uint32 b = (p & 0x000000ff); + +#define READ_TWO_RGB_PIXELS \ + const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \ + const Uint32 r = (p & 0x00ff0000) >> 16; \ + const Uint32 g = (p & 0x0000ff00) >> 8; \ + const Uint32 b = (p & 0x000000ff); \ + const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i + 1]; \ + const Uint32 r1 = (p1 & 0x00ff0000) >> 16; \ + const Uint32 g1 = (p1 & 0x0000ff00) >> 8; \ + const Uint32 b1 = (p1 & 0x000000ff); \ + const Uint32 R = (r + r1) / 2; \ + const Uint32 G = (g + g1) / 2; \ + const Uint32 B = (b + b1) / 2; + +#define READ_ONE_RGB_PIXEL READ_1x1_PIXEL + + switch (dst_format) { case SDL_PIXELFORMAT_YV12: case SDL_PIXELFORMAT_IYUV: case SDL_PIXELFORMAT_NV12: case SDL_PIXELFORMAT_NV21: - { - const Uint8 *curr_row, *next_row; - - Uint8 *plane_y; - Uint8 *plane_u; - Uint8 *plane_v; - Uint8 *plane_interleaved_uv; - Uint32 y_stride, uv_stride, y_skip, uv_skip; - - if (GetYUVPlanes(width, height, dst_format, dst, dst_pitch, - (const Uint8 **)&plane_y, (const Uint8 **)&plane_u, (const Uint8 **)&plane_v, - &y_stride, &uv_stride) != 0) { - return -1; - } + { + const Uint8 *curr_row, *next_row; - plane_interleaved_uv = (plane_y + height * y_stride); - y_skip = (y_stride - width); + Uint8 *plane_y; + Uint8 *plane_u; + Uint8 *plane_v; + Uint8 *plane_interleaved_uv; + Uint32 y_stride, uv_stride, y_skip, uv_skip; - curr_row = (const Uint8*)src; + if (GetYUVPlanes(width, height, dst_format, dst, dst_pitch, + (const Uint8 **)&plane_y, (const Uint8 **)&plane_u, (const Uint8 **)&plane_v, + &y_stride, &uv_stride) != 0) { + return -1; + } - /* Write Y plane */ - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - const Uint32 p1 = ((const Uint32 *)curr_row)[i]; - const Uint32 r = (p1 & 0x00ff0000) >> 16; - const Uint32 g = (p1 & 0x0000ff00) >> 8; - const Uint32 b = (p1 & 0x000000ff); - *plane_y++ = MAKE_Y(r, g, b); - } - plane_y += y_skip; - curr_row += src_pitch; + plane_interleaved_uv = (plane_y + height * y_stride); + y_skip = (y_stride - width); + + curr_row = (const Uint8 *)src; + + /* Write Y plane */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + const Uint32 p1 = ((const Uint32 *)curr_row)[i]; + const Uint32 r = (p1 & 0x00ff0000) >> 16; + const Uint32 g = (p1 & 0x0000ff00) >> 8; + const Uint32 b = (p1 & 0x000000ff); + *plane_y++ = MAKE_Y(r, g, b); } + plane_y += y_skip; + curr_row += src_pitch; + } - curr_row = (const Uint8*)src; - next_row = (const Uint8*)src; - next_row += src_pitch; - - if (dst_format == SDL_PIXELFORMAT_YV12 || dst_format == SDL_PIXELFORMAT_IYUV) - { - /* Write UV planes, not interleaved */ - uv_skip = (uv_stride - (width + 1)/2); - for (j = 0; j < height_half; j++) { - for (i = 0; i < width_half; i++) { - READ_2x2_PIXELS; - *plane_u++ = MAKE_U(r, g, b); - *plane_v++ = MAKE_V(r, g, b); - } - if (width_remainder) { - READ_2x1_PIXELS; - *plane_u++ = MAKE_U(r, g, b); - *plane_v++ = MAKE_V(r, g, b); - } - plane_u += uv_skip; - plane_v += uv_skip; - curr_row += src_pitch_x_2; - next_row += src_pitch_x_2; + curr_row = (const Uint8 *)src; + next_row = (const Uint8 *)src; + next_row += src_pitch; + + if (dst_format == SDL_PIXELFORMAT_YV12 || dst_format == SDL_PIXELFORMAT_IYUV) { + /* Write UV planes, not interleaved */ + uv_skip = (uv_stride - (width + 1) / 2); + for (j = 0; j < height_half; j++) { + for (i = 0; i < width_half; i++) { + READ_2x2_PIXELS; + *plane_u++ = MAKE_U(r, g, b); + *plane_v++ = MAKE_V(r, g, b); } - if (height_remainder) { - for (i = 0; i < width_half; i++) { - READ_1x2_PIXELS; - *plane_u++ = MAKE_U(r, g, b); - *plane_v++ = MAKE_V(r, g, b); - } - if (width_remainder) { - READ_1x1_PIXEL; - *plane_u++ = MAKE_U(r, g, b); - *plane_v++ = MAKE_V(r, g, b); - } - plane_u += uv_skip; - plane_v += uv_skip; + if (width_remainder) { + READ_2x1_PIXELS; + *plane_u++ = MAKE_U(r, g, b); + *plane_v++ = MAKE_V(r, g, b); } + plane_u += uv_skip; + plane_v += uv_skip; + curr_row += src_pitch_x_2; + next_row += src_pitch_x_2; } - else if (dst_format == SDL_PIXELFORMAT_NV12) - { - uv_skip = (uv_stride - ((width + 1)/2)*2); - for (j = 0; j < height_half; j++) { - for (i = 0; i < width_half; i++) { - READ_2x2_PIXELS; - *plane_interleaved_uv++ = MAKE_U(r, g, b); - *plane_interleaved_uv++ = MAKE_V(r, g, b); - } - if (width_remainder) { - READ_2x1_PIXELS; - *plane_interleaved_uv++ = MAKE_U(r, g, b); - *plane_interleaved_uv++ = MAKE_V(r, g, b); - } - plane_interleaved_uv += uv_skip; - curr_row += src_pitch_x_2; - next_row += src_pitch_x_2; + if (height_remainder) { + for (i = 0; i < width_half; i++) { + READ_1x2_PIXELS; + *plane_u++ = MAKE_U(r, g, b); + *plane_v++ = MAKE_V(r, g, b); } - if (height_remainder) { - for (i = 0; i < width_half; i++) { - READ_1x2_PIXELS; - *plane_interleaved_uv++ = MAKE_U(r, g, b); - *plane_interleaved_uv++ = MAKE_V(r, g, b); - } - if (width_remainder) { - READ_1x1_PIXEL; - *plane_interleaved_uv++ = MAKE_U(r, g, b); - *plane_interleaved_uv++ = MAKE_V(r, g, b); - } + if (width_remainder) { + READ_1x1_PIXEL; + *plane_u++ = MAKE_U(r, g, b); + *plane_v++ = MAKE_V(r, g, b); } - } - else /* dst_format == SDL_PIXELFORMAT_NV21 */ - { - uv_skip = (uv_stride - ((width + 1)/2)*2); - for (j = 0; j < height_half; j++) { - for (i = 0; i < width_half; i++) { - READ_2x2_PIXELS; - *plane_interleaved_uv++ = MAKE_V(r, g, b); - *plane_interleaved_uv++ = MAKE_U(r, g, b); - } - if (width_remainder) { - READ_2x1_PIXELS; - *plane_interleaved_uv++ = MAKE_V(r, g, b); - *plane_interleaved_uv++ = MAKE_U(r, g, b); - } - plane_interleaved_uv += uv_skip; - curr_row += src_pitch_x_2; - next_row += src_pitch_x_2; + plane_u += uv_skip; + plane_v += uv_skip; + } + } else if (dst_format == SDL_PIXELFORMAT_NV12) { + uv_skip = (uv_stride - ((width + 1) / 2) * 2); + for (j = 0; j < height_half; j++) { + for (i = 0; i < width_half; i++) { + READ_2x2_PIXELS; + *plane_interleaved_uv++ = MAKE_U(r, g, b); + *plane_interleaved_uv++ = MAKE_V(r, g, b); } - if (height_remainder) { - for (i = 0; i < width_half; i++) { - READ_1x2_PIXELS; - *plane_interleaved_uv++ = MAKE_V(r, g, b); - *plane_interleaved_uv++ = MAKE_U(r, g, b); - } - if (width_remainder) { - READ_1x1_PIXEL; - *plane_interleaved_uv++ = MAKE_V(r, g, b); - *plane_interleaved_uv++ = MAKE_U(r, g, b); - } + if (width_remainder) { + READ_2x1_PIXELS; + *plane_interleaved_uv++ = MAKE_U(r, g, b); + *plane_interleaved_uv++ = MAKE_V(r, g, b); + } + plane_interleaved_uv += uv_skip; + curr_row += src_pitch_x_2; + next_row += src_pitch_x_2; + } + if (height_remainder) { + for (i = 0; i < width_half; i++) { + READ_1x2_PIXELS; + *plane_interleaved_uv++ = MAKE_U(r, g, b); + *plane_interleaved_uv++ = MAKE_V(r, g, b); + } + if (width_remainder) { + READ_1x1_PIXEL; + *plane_interleaved_uv++ = MAKE_U(r, g, b); + *plane_interleaved_uv++ = MAKE_V(r, g, b); + } + } + } else /* dst_format == SDL_PIXELFORMAT_NV21 */ { + uv_skip = (uv_stride - ((width + 1) / 2) * 2); + for (j = 0; j < height_half; j++) { + for (i = 0; i < width_half; i++) { + READ_2x2_PIXELS; + *plane_interleaved_uv++ = MAKE_V(r, g, b); + *plane_interleaved_uv++ = MAKE_U(r, g, b); + } + if (width_remainder) { + READ_2x1_PIXELS; + *plane_interleaved_uv++ = MAKE_V(r, g, b); + *plane_interleaved_uv++ = MAKE_U(r, g, b); + } + plane_interleaved_uv += uv_skip; + curr_row += src_pitch_x_2; + next_row += src_pitch_x_2; + } + if (height_remainder) { + for (i = 0; i < width_half; i++) { + READ_1x2_PIXELS; + *plane_interleaved_uv++ = MAKE_V(r, g, b); + *plane_interleaved_uv++ = MAKE_U(r, g, b); + } + if (width_remainder) { + READ_1x1_PIXEL; + *plane_interleaved_uv++ = MAKE_V(r, g, b); + *plane_interleaved_uv++ = MAKE_U(r, g, b); } } } - break; + } break; case SDL_PIXELFORMAT_YUY2: case SDL_PIXELFORMAT_UYVY: case SDL_PIXELFORMAT_YVYU: - { - const Uint8 *curr_row = (const Uint8*) src; - Uint8 *plane = (Uint8*) dst; - const int row_size = (4 * ((width + 1) / 2)); - int plane_skip; + { + const Uint8 *curr_row = (const Uint8 *)src; + Uint8 *plane = (Uint8 *)dst; + const int row_size = (4 * ((width + 1) / 2)); + int plane_skip; - if (dst_pitch < row_size) { - return SDL_SetError("Destination pitch is too small, expected at least %d\n", row_size); + if (dst_pitch < row_size) { + return SDL_SetError("Destination pitch is too small, expected at least %d\n", row_size); + } + plane_skip = (dst_pitch - row_size); + + /* Write YUV plane, packed */ + if (dst_format == SDL_PIXELFORMAT_YUY2) { + for (j = 0; j < height; j++) { + for (i = 0; i < width_half; i++) { + READ_TWO_RGB_PIXELS; + /* Y U Y1 V */ + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_U(R, G, B); + *plane++ = MAKE_Y(r1, g1, b1); + *plane++ = MAKE_V(R, G, B); + } + if (width_remainder) { + READ_ONE_RGB_PIXEL; + /* Y U Y V */ + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_U(r, g, b); + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_V(r, g, b); + } + plane += plane_skip; + curr_row += src_pitch; } - plane_skip = (dst_pitch - row_size); - - /* Write YUV plane, packed */ - if (dst_format == SDL_PIXELFORMAT_YUY2) - { - for (j = 0; j < height; j++) { - for (i = 0; i < width_half; i++) { - READ_TWO_RGB_PIXELS; - /* Y U Y1 V */ - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_U(R, G, B); - *plane++ = MAKE_Y(r1, g1, b1); - *plane++ = MAKE_V(R, G, B); - } - if (width_remainder) { - READ_ONE_RGB_PIXEL; - /* Y U Y V */ - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_U(r, g, b); - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_V(r, g, b); - } - plane += plane_skip; - curr_row += src_pitch; + } else if (dst_format == SDL_PIXELFORMAT_UYVY) { + for (j = 0; j < height; j++) { + for (i = 0; i < width_half; i++) { + READ_TWO_RGB_PIXELS; + /* U Y V Y1 */ + *plane++ = MAKE_U(R, G, B); + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_V(R, G, B); + *plane++ = MAKE_Y(r1, g1, b1); } - } - else if (dst_format == SDL_PIXELFORMAT_UYVY) - { - for (j = 0; j < height; j++) { - for (i = 0; i < width_half; i++) { - READ_TWO_RGB_PIXELS; - /* U Y V Y1 */ - *plane++ = MAKE_U(R, G, B); - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_V(R, G, B); - *plane++ = MAKE_Y(r1, g1, b1); - } - if (width_remainder) { - READ_ONE_RGB_PIXEL; - /* U Y V Y */ - *plane++ = MAKE_U(r, g, b); - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_V(r, g, b); - *plane++ = MAKE_Y(r, g, b); - } - plane += plane_skip; - curr_row += src_pitch; + if (width_remainder) { + READ_ONE_RGB_PIXEL; + /* U Y V Y */ + *plane++ = MAKE_U(r, g, b); + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_V(r, g, b); + *plane++ = MAKE_Y(r, g, b); } + plane += plane_skip; + curr_row += src_pitch; } - else if (dst_format == SDL_PIXELFORMAT_YVYU) - { - for (j = 0; j < height; j++) { - for (i = 0; i < width_half; i++) { - READ_TWO_RGB_PIXELS; - /* Y V Y1 U */ - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_V(R, G, B); - *plane++ = MAKE_Y(r1, g1, b1); - *plane++ = MAKE_U(R, G, B); - } - if (width_remainder) { - READ_ONE_RGB_PIXEL; - /* Y V Y U */ - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_V(r, g, b); - *plane++ = MAKE_Y(r, g, b); - *plane++ = MAKE_U(r, g, b); - } - plane += plane_skip; - curr_row += src_pitch; + } else if (dst_format == SDL_PIXELFORMAT_YVYU) { + for (j = 0; j < height; j++) { + for (i = 0; i < width_half; i++) { + READ_TWO_RGB_PIXELS; + /* Y V Y1 U */ + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_V(R, G, B); + *plane++ = MAKE_Y(r1, g1, b1); + *plane++ = MAKE_U(R, G, B); + } + if (width_remainder) { + READ_ONE_RGB_PIXEL; + /* Y V Y U */ + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_V(r, g, b); + *plane++ = MAKE_Y(r, g, b); + *plane++ = MAKE_U(r, g, b); } + plane += plane_skip; + curr_row += src_pitch; } } - break; + } break; default: return SDL_SetError("Unsupported YUV destination format: %s", SDL_GetPixelFormatName(dst_format)); @@ -831,10 +939,9 @@ SDL_ConvertPixels_ARGB8888_to_YUV(int width, int height, const void *src, int sr return 0; } -int -SDL_ConvertPixels_RGB_to_YUV(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +int SDL_ConvertPixels_RGB_to_YUV(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { #if 0 /* Doesn't handle odd widths */ /* RGB24 to FOURCC */ @@ -870,7 +977,7 @@ SDL_ConvertPixels_RGB_to_YUV(int width, int height, void *tmp; int tmp_pitch = (width * sizeof(Uint32)); - tmp = SDL_malloc(tmp_pitch * height); + tmp = SDL_malloc((size_t)tmp_pitch * height); if (tmp == NULL) { return SDL_OutOfMemory(); } @@ -889,9 +996,8 @@ SDL_ConvertPixels_RGB_to_YUV(int width, int height, } } -static int -SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, - const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, + const void *src, int src_pitch, void *dst, int dst_pitch) { int i; @@ -899,8 +1005,8 @@ SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, /* Y plane */ for (i = height; i--;) { SDL_memcpy(dst, src, width); - src = (const Uint8*)src + src_pitch; - dst = (Uint8*)dst + dst_pitch; + src = (const Uint8 *)src + src_pitch; + dst = (Uint8 *)dst + dst_pitch; } if (format == SDL_PIXELFORMAT_YV12 || format == SDL_PIXELFORMAT_IYUV) { @@ -911,19 +1017,19 @@ SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, dst_pitch = (dst_pitch + 1) / 2; for (i = height * 2; i--;) { SDL_memcpy(dst, src, width); - src = (const Uint8*)src + src_pitch; - dst = (Uint8*)dst + dst_pitch; + src = (const Uint8 *)src + src_pitch; + dst = (Uint8 *)dst + dst_pitch; } } else if (format == SDL_PIXELFORMAT_NV12 || format == SDL_PIXELFORMAT_NV21) { /* U/V plane is half the height of the Y plane, rounded up */ height = (height + 1) / 2; - width = ((width + 1) / 2)*2; - src_pitch = ((src_pitch + 1) / 2)*2; - dst_pitch = ((dst_pitch + 1) / 2)*2; + width = ((width + 1) / 2) * 2; + src_pitch = ((src_pitch + 1) / 2) * 2; + dst_pitch = ((dst_pitch + 1) / 2) * 2; for (i = height; i--;) { SDL_memcpy(dst, src, width); - src = (const Uint8*)src + src_pitch; - dst = (Uint8*)dst + dst_pitch; + src = (const Uint8 *)src + src_pitch; + dst = (Uint8 *)dst + dst_pitch; } } return 0; @@ -934,8 +1040,8 @@ SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, width = 4 * ((width + 1) / 2); for (i = height; i--;) { SDL_memcpy(dst, src, width); - src = (const Uint8*)src + src_pitch; - dst = (Uint8*)dst + dst_pitch; + src = (const Uint8 *)src + src_pitch; + dst = (Uint8 *)dst + dst_pitch; } return 0; } @@ -943,26 +1049,25 @@ SDL_ConvertPixels_YUV_to_YUV_Copy(int width, int height, Uint32 format, return SDL_SetError("SDL_ConvertPixels_YUV_to_YUV_Copy: Unsupported YUV format: %s", SDL_GetPixelFormatName(format)); } -static int -SDL_ConvertPixels_SwapUVPlanes(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_SwapUVPlanes(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int y; - const int UVwidth = (width + 1)/2; - const int UVheight = (height + 1)/2; + const int UVwidth = (width + 1) / 2; + const int UVheight = (height + 1) / 2; /* Skip the Y plane */ src = (const Uint8 *)src + height * src_pitch; dst = (Uint8 *)dst + height * dst_pitch; if (src == dst) { - int UVpitch = (dst_pitch + 1)/2; + int UVpitch = (dst_pitch + 1) / 2; Uint8 *tmp; Uint8 *row1 = dst; Uint8 *row2 = (Uint8 *)dst + UVheight * UVpitch; /* Allocate a temporary row for the swap */ tmp = (Uint8 *)SDL_malloc(UVwidth); - if (!tmp) { + if (tmp == NULL) { return SDL_OutOfMemory(); } for (y = 0; y < UVheight; ++y) { @@ -976,8 +1081,8 @@ SDL_ConvertPixels_SwapUVPlanes(int width, int height, const void *src, int src_p } else { const Uint8 *srcUV; Uint8 *dstUV; - int srcUVPitch = ((src_pitch + 1)/2); - int dstUVPitch = ((dst_pitch + 1)/2); + int srcUVPitch = ((src_pitch + 1) / 2); + int dstUVPitch = ((dst_pitch + 1) / 2); /* Copy the first plane */ srcUV = (const Uint8 *)src; @@ -999,16 +1104,15 @@ SDL_ConvertPixels_SwapUVPlanes(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_PackUVPlanes_to_NV(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch, SDL_bool reverseUV) +static int SDL_ConvertPixels_PackUVPlanes_to_NV(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch, SDL_bool reverseUV) { int x, y; - const int UVwidth = (width + 1)/2; - const int UVheight = (height + 1)/2; - const int srcUVPitch = ((src_pitch + 1)/2); + const int UVwidth = (width + 1) / 2; + const int UVheight = (height + 1) / 2; + const int srcUVPitch = ((src_pitch + 1) / 2); const int srcUVPitchLeft = srcUVPitch - UVwidth; - const int dstUVPitch = ((dst_pitch + 1)/2)*2; - const int dstUVPitchLeft = dstUVPitch - UVwidth*2; + const int dstUVPitch = ((dst_pitch + 1) / 2) * 2; + const int dstUVPitchLeft = dstUVPitch - UVwidth * 2; const Uint8 *src1, *src2; Uint8 *dstUV; Uint8 *tmp = NULL; @@ -1022,11 +1126,11 @@ SDL_ConvertPixels_PackUVPlanes_to_NV(int width, int height, const void *src, int if (src == dst) { /* Need to make a copy of the buffer so we don't clobber it while converting */ - tmp = (Uint8 *)SDL_malloc(2*UVheight*srcUVPitch); - if (!tmp) { + tmp = (Uint8 *)SDL_malloc((size_t)2 * UVheight * srcUVPitch); + if (tmp == NULL) { return SDL_OutOfMemory(); } - SDL_memcpy(tmp, src, 2*UVheight*srcUVPitch); + SDL_memcpy(tmp, src, (size_t)2 * UVheight * srcUVPitch); src = tmp; } @@ -1049,8 +1153,8 @@ SDL_ConvertPixels_PackUVPlanes_to_NV(int width, int height, const void *src, int __m128i v = _mm_loadu_si128((__m128i *)src2); __m128i uv1 = _mm_unpacklo_epi8(u, v); __m128i uv2 = _mm_unpackhi_epi8(u, v); - _mm_storeu_si128((__m128i*)dstUV, uv1); - _mm_storeu_si128((__m128i*)(dstUV + 16), uv2); + _mm_storeu_si128((__m128i *)dstUV, uv1); + _mm_storeu_si128((__m128i *)(dstUV + 16), uv2); src1 += 16; src2 += 16; dstUV += 32; @@ -1073,15 +1177,14 @@ SDL_ConvertPixels_PackUVPlanes_to_NV(int width, int height, const void *src, int return 0; } -static int -SDL_ConvertPixels_SplitNV_to_UVPlanes(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch, SDL_bool reverseUV) +static int SDL_ConvertPixels_SplitNV_to_UVPlanes(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch, SDL_bool reverseUV) { int x, y; - const int UVwidth = (width + 1)/2; - const int UVheight = (height + 1)/2; - const int srcUVPitch = ((src_pitch + 1)/2)*2; - const int srcUVPitchLeft = srcUVPitch - UVwidth*2; - const int dstUVPitch = ((dst_pitch + 1)/2); + const int UVwidth = (width + 1) / 2; + const int UVheight = (height + 1) / 2; + const int srcUVPitch = ((src_pitch + 1) / 2) * 2; + const int srcUVPitchLeft = srcUVPitch - UVwidth * 2; + const int dstUVPitch = ((dst_pitch + 1) / 2); const int dstUVPitchLeft = dstUVPitch - UVwidth; const Uint8 *srcUV; Uint8 *dst1, *dst2; @@ -1096,11 +1199,11 @@ SDL_ConvertPixels_SplitNV_to_UVPlanes(int width, int height, const void *src, in if (src == dst) { /* Need to make a copy of the buffer so we don't clobber it while converting */ - tmp = (Uint8 *)SDL_malloc(UVheight*srcUVPitch); - if (!tmp) { + tmp = (Uint8 *)SDL_malloc((size_t)UVheight * srcUVPitch); + if (tmp == NULL) { return SDL_OutOfMemory(); } - SDL_memcpy(tmp, src, UVheight*srcUVPitch); + SDL_memcpy(tmp, src, (size_t)UVheight * srcUVPitch); src = tmp; } @@ -1120,16 +1223,16 @@ SDL_ConvertPixels_SplitNV_to_UVPlanes(int width, int height, const void *src, in if (use_SSE2) { __m128i mask = _mm_set1_epi16(0x00FF); while (x >= 16) { - __m128i uv1 = _mm_loadu_si128((__m128i*)srcUV); - __m128i uv2 = _mm_loadu_si128((__m128i*)(srcUV+16)); + __m128i uv1 = _mm_loadu_si128((__m128i *)srcUV); + __m128i uv2 = _mm_loadu_si128((__m128i *)(srcUV + 16)); __m128i u1 = _mm_and_si128(uv1, mask); __m128i u2 = _mm_and_si128(uv2, mask); __m128i u = _mm_packus_epi16(u1, u2); __m128i v1 = _mm_srli_epi16(uv1, 8); __m128i v2 = _mm_srli_epi16(uv2, 8); __m128i v = _mm_packus_epi16(v1, v2); - _mm_storeu_si128((__m128i*)dst1, u); - _mm_storeu_si128((__m128i*)dst2, v); + _mm_storeu_si128((__m128i *)dst1, u); + _mm_storeu_si128((__m128i *)dst2, v); srcUV += 32; dst1 += 16; dst2 += 16; @@ -1152,16 +1255,15 @@ SDL_ConvertPixels_SplitNV_to_UVPlanes(int width, int height, const void *src, in return 0; } -static int -SDL_ConvertPixels_SwapNV(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_SwapNV(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int UVwidth = (width + 1)/2; - const int UVheight = (height + 1)/2; - const int srcUVPitch = ((src_pitch + 1)/2)*2; - const int srcUVPitchLeft = (srcUVPitch - UVwidth*2)/sizeof(Uint16); - const int dstUVPitch = ((dst_pitch + 1)/2)*2; - const int dstUVPitchLeft = (dstUVPitch - UVwidth*2)/sizeof(Uint16); + const int UVwidth = (width + 1) / 2; + const int UVheight = (height + 1) / 2; + const int srcUVPitch = ((src_pitch + 1) / 2) * 2; + const int srcUVPitchLeft = (srcUVPitch - UVwidth * 2) / sizeof(Uint16); + const int dstUVPitch = ((dst_pitch + 1) / 2) * 2; + const int dstUVPitchLeft = (dstUVPitch - UVwidth * 2) / sizeof(Uint16); const Uint16 *srcUV; Uint16 *dstUV; #ifdef __SSE2__ @@ -1180,11 +1282,11 @@ SDL_ConvertPixels_SwapNV(int width, int height, const void *src, int src_pitch, #ifdef __SSE2__ if (use_SSE2) { while (x >= 8) { - __m128i uv = _mm_loadu_si128((__m128i*)srcUV); + __m128i uv = _mm_loadu_si128((__m128i *)srcUV); __m128i v = _mm_slli_epi16(uv, 8); __m128i u = _mm_srli_epi16(uv, 8); __m128i vu = _mm_or_si128(v, u); - _mm_storeu_si128((__m128i*)dstUV, vu); + _mm_storeu_si128((__m128i *)dstUV, vu); srcUV += 8; dstUV += 8; x -= 8; @@ -1200,17 +1302,16 @@ SDL_ConvertPixels_SwapNV(int width, int height, const void *src, int src_pitch, return 0; } -static int -SDL_ConvertPixels_Planar2x2_to_Planar2x2(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +static int SDL_ConvertPixels_Planar2x2_to_Planar2x2(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { if (src != dst) { /* Copy Y plane */ int i; const Uint8 *srcY = (const Uint8 *)src; Uint8 *dstY = (Uint8 *)dst; - for (i = height; i--; ) { + for (i = height; i--;) { SDL_memcpy(dstY, srcY, width); srcY += src_pitch; dstY += dst_pitch; @@ -1269,35 +1370,35 @@ SDL_ConvertPixels_Planar2x2_to_Planar2x2(int width, int height, default: break; } - return SDL_SetError("SDL_ConvertPixels_Planar2x2_to_Planar2x2: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), SDL_GetPixelFormatName(dst_format)); + return SDL_SetError("SDL_ConvertPixels_Planar2x2_to_Planar2x2: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), + SDL_GetPixelFormatName(dst_format)); } #ifdef __SSE2__ -#define PACKED4_TO_PACKED4_ROW_SSE2(shuffle) \ - while (x >= 4) { \ - __m128i yuv = _mm_loadu_si128((__m128i*)srcYUV); \ - __m128i lo = _mm_unpacklo_epi8(yuv, _mm_setzero_si128()); \ - __m128i hi = _mm_unpackhi_epi8(yuv, _mm_setzero_si128()); \ - lo = _mm_shufflelo_epi16(lo, shuffle); \ - lo = _mm_shufflehi_epi16(lo, shuffle); \ - hi = _mm_shufflelo_epi16(hi, shuffle); \ - hi = _mm_shufflehi_epi16(hi, shuffle); \ - yuv = _mm_packus_epi16(lo, hi); \ - _mm_storeu_si128((__m128i*)dstYUV, yuv); \ - srcYUV += 16; \ - dstYUV += 16; \ - x -= 4; \ - } \ +#define PACKED4_TO_PACKED4_ROW_SSE2(shuffle) \ + while (x >= 4) { \ + __m128i yuv = _mm_loadu_si128((__m128i *)srcYUV); \ + __m128i lo = _mm_unpacklo_epi8(yuv, _mm_setzero_si128()); \ + __m128i hi = _mm_unpackhi_epi8(yuv, _mm_setzero_si128()); \ + lo = _mm_shufflelo_epi16(lo, shuffle); \ + lo = _mm_shufflehi_epi16(lo, shuffle); \ + hi = _mm_shufflelo_epi16(hi, shuffle); \ + hi = _mm_shufflehi_epi16(hi, shuffle); \ + yuv = _mm_packus_epi16(lo, hi); \ + _mm_storeu_si128((__m128i *)dstYUV, yuv); \ + srcYUV += 16; \ + dstYUV += 16; \ + x -= 4; \ + } #endif -static int -SDL_ConvertPixels_YUY2_to_UYVY(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_YUY2_to_UYVY(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1333,13 +1434,12 @@ SDL_ConvertPixels_YUY2_to_UYVY(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_YUY2_to_YVYU(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_YUY2_to_YVYU(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1375,13 +1475,12 @@ SDL_ConvertPixels_YUY2_to_YVYU(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_UYVY_to_YUY2(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_UYVY_to_YUY2(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1417,13 +1516,12 @@ SDL_ConvertPixels_UYVY_to_YUY2(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_UYVY_to_YVYU(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_UYVY_to_YVYU(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1459,13 +1557,12 @@ SDL_ConvertPixels_UYVY_to_YVYU(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_YVYU_to_YUY2(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_YVYU_to_YUY2(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1501,13 +1598,12 @@ SDL_ConvertPixels_YVYU_to_YUY2(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_YVYU_to_UYVY(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) +static int SDL_ConvertPixels_YVYU_to_UYVY(int width, int height, const void *src, int src_pitch, void *dst, int dst_pitch) { int x, y; - const int YUVwidth = (width + 1)/2; - const int srcYUVPitchLeft = (src_pitch - YUVwidth*4); - const int dstYUVPitchLeft = (dst_pitch - YUVwidth*4); + const int YUVwidth = (width + 1) / 2; + const int srcYUVPitchLeft = (src_pitch - YUVwidth * 4); + const int dstYUVPitchLeft = (dst_pitch - YUVwidth * 4); const Uint8 *srcYUV = (const Uint8 *)src; Uint8 *dstYUV = (Uint8 *)dst; #ifdef __SSE2__ @@ -1543,10 +1639,9 @@ SDL_ConvertPixels_YVYU_to_UYVY(int width, int height, const void *src, int src_p return 0; } -static int -SDL_ConvertPixels_Packed4_to_Packed4(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +static int SDL_ConvertPixels_Packed4_to_Packed4(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { switch (src_format) { case SDL_PIXELFORMAT_YUY2: @@ -1582,13 +1677,13 @@ SDL_ConvertPixels_Packed4_to_Packed4(int width, int height, default: break; } - return SDL_SetError("SDL_ConvertPixels_Packed4_to_Packed4: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), SDL_GetPixelFormatName(dst_format)); + return SDL_SetError("SDL_ConvertPixels_Packed4_to_Packed4: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), + SDL_GetPixelFormatName(dst_format)); } -static int -SDL_ConvertPixels_Planar2x2_to_Packed4(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +static int SDL_ConvertPixels_Planar2x2_to_Packed4(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { int x, y; const Uint8 *srcY1, *srcY2, *srcU, *srcV; @@ -1611,10 +1706,10 @@ SDL_ConvertPixels_Planar2x2_to_Packed4(int width, int height, if (src_format == SDL_PIXELFORMAT_NV12 || src_format == SDL_PIXELFORMAT_NV21) { srcUV_pixel_stride = 2; - srcUV_pitch_left = (srcUV_pitch - 2*((width + 1)/2)); + srcUV_pitch_left = (srcUV_pitch - 2 * ((width + 1) / 2)); } else { srcUV_pixel_stride = 1; - srcUV_pitch_left = (srcUV_pitch - ((width + 1)/2)); + srcUV_pitch_left = (srcUV_pitch - ((width + 1) / 2)); } if (GetYUVPlanes(width, height, dst_format, dst, dst_pitch, @@ -1625,7 +1720,7 @@ SDL_ConvertPixels_Planar2x2_to_Packed4(int width, int height, dstY2 = dstY1 + dstY_pitch; dstU2 = dstU1 + dstUV_pitch; dstV2 = dstV1 + dstUV_pitch; - dst_pitch_left = (dstY_pitch - 4*((width + 1)/2)); + dst_pitch_left = (dstY_pitch - 4 * ((width + 1) / 2)); /* Copy 2x2 blocks of pixels at a time */ for (y = 0; y < (height - 1); y += 2) { @@ -1728,10 +1823,9 @@ SDL_ConvertPixels_Planar2x2_to_Packed4(int width, int height, return 0; } -static int -SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +static int SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { int x, y; const Uint8 *srcY1, *srcY2, *srcU1, *srcU2, *srcV1, *srcV2; @@ -1752,7 +1846,7 @@ SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, srcY2 = srcY1 + srcY_pitch; srcU2 = srcU1 + srcUV_pitch; srcV2 = srcV1 + srcUV_pitch; - src_pitch_left = (srcY_pitch - 4*((width + 1)/2)); + src_pitch_left = (srcY_pitch - 4 * ((width + 1) / 2)); if (GetYUVPlanes(width, height, dst_format, dst, dst_pitch, (const Uint8 **)&dstY1, (const Uint8 **)&dstU, (const Uint8 **)&dstV, @@ -1764,10 +1858,10 @@ SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, if (dst_format == SDL_PIXELFORMAT_NV12 || dst_format == SDL_PIXELFORMAT_NV21) { dstUV_pixel_stride = 2; - dstUV_pitch_left = (dstUV_pitch - 2*((width + 1)/2)); + dstUV_pitch_left = (dstUV_pitch - 2 * ((width + 1) / 2)); } else { dstUV_pixel_stride = 1; - dstUV_pitch_left = (dstUV_pitch - ((width + 1)/2)); + dstUV_pitch_left = (dstUV_pitch - ((width + 1) / 2)); } /* Copy 2x2 blocks of pixels at a time */ @@ -1785,8 +1879,8 @@ SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, *dstY2++ = *srcY2; srcY2 += 2; - *dstU = (Uint8)(((Uint32)*srcU1 + *srcU2)/2); - *dstV = (Uint8)(((Uint32)*srcV1 + *srcV2)/2); + *dstU = (Uint8)(((Uint32)*srcU1 + *srcU2) / 2); + *dstV = (Uint8)(((Uint32)*srcV1 + *srcV2) / 2); srcU1 += 4; srcU2 += 4; @@ -1810,8 +1904,8 @@ SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, *dstY2++ = *srcY2; srcY2 += 2; - *dstU = (Uint8)(((Uint32)*srcU1 + *srcU2)/2); - *dstV = (Uint8)(((Uint32)*srcV1 + *srcV2)/2); + *dstU = (Uint8)(((Uint32)*srcU1 + *srcU2) / 2); + *dstV = (Uint8)(((Uint32)*srcV1 + *srcV2) / 2); srcU1 += 4; srcU2 += 4; @@ -1862,10 +1956,9 @@ SDL_ConvertPixels_Packed4_to_Planar2x2(int width, int height, #endif /* SDL_HAVE_YUV */ -int -SDL_ConvertPixels_YUV_to_YUV(int width, int height, - Uint32 src_format, const void *src, int src_pitch, - Uint32 dst_format, void *dst, int dst_pitch) +int SDL_ConvertPixels_YUV_to_YUV(int width, int height, + Uint32 src_format, const void *src, int src_pitch, + Uint32 dst_format, void *dst, int dst_pitch) { #if SDL_HAVE_YUV if (src_format == dst_format) { @@ -1885,7 +1978,8 @@ SDL_ConvertPixels_YUV_to_YUV(int width, int height, } else if (IsPacked4Format(src_format) && IsPlanar2x2Format(dst_format)) { return SDL_ConvertPixels_Packed4_to_Planar2x2(width, height, src_format, src, src_pitch, dst_format, dst, dst_pitch); } else { - return SDL_SetError("SDL_ConvertPixels_YUV_to_YUV: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), SDL_GetPixelFormatName(dst_format)); + return SDL_SetError("SDL_ConvertPixels_YUV_to_YUV: Unsupported YUV conversion: %s -> %s", SDL_GetPixelFormatName(src_format), + SDL_GetPixelFormatName(dst_format)); } #else return SDL_SetError("SDL not built with YUV support"); diff --git a/modules/SDL2/src/video/SDL_yuv_c.h b/modules/SDL2/src/video/SDL_yuv_c.h index 882aa56..59ee9b6 100644 --- a/modules/SDL2/src/video/SDL_yuv_c.h +++ b/modules/SDL2/src/video/SDL_yuv_c.h @@ -24,13 +24,15 @@ #include "../SDL_internal.h" - /* YUV conversion functions */ extern int SDL_ConvertPixels_YUV_to_RGB(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch); extern int SDL_ConvertPixels_RGB_to_YUV(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch); extern int SDL_ConvertPixels_YUV_to_YUV(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch); + +extern int SDL_CalculateYUVSize(Uint32 format, int w, int h, size_t *size, int *pitch); + #endif /* SDL_yuv_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/android/SDL_androidclipboard.c b/modules/SDL2/src/video/android/SDL_androidclipboard.c index c6c3c91..bd80a01 100644 --- a/modules/SDL2/src/video/android/SDL_androidclipboard.c +++ b/modules/SDL2/src/video/android/SDL_androidclipboard.c @@ -26,14 +26,12 @@ #include "SDL_androidclipboard.h" #include "../../core/android/SDL_android.h" -int -Android_SetClipboardText(_THIS, const char *text) +int Android_SetClipboardText(_THIS, const char *text) { return Android_JNI_SetClipboardText(text); } -char * -Android_GetClipboardText(_THIS) +char *Android_GetClipboardText(_THIS) { return Android_JNI_GetClipboardText(); } diff --git a/modules/SDL2/src/video/android/SDL_androidevents.c b/modules/SDL2/src/video/android/SDL_androidevents.c index 4e03ea8..ad669f8 100644 --- a/modules/SDL2/src/video/android/SDL_androidevents.c +++ b/modules/SDL2/src/video/android/SDL_androidevents.c @@ -44,40 +44,40 @@ static void ANDROIDAUDIO_PauseDevices(void) {} extern void openslES_ResumeDevices(void); extern void openslES_PauseDevices(void); #else -static void openslES_ResumeDevices(void) {} +static void openslES_ResumeDevices(void) +{ +} static void openslES_PauseDevices(void) {} #endif #if !SDL_AUDIO_DISABLED && SDL_AUDIO_DRIVER_AAUDIO extern void aaudio_ResumeDevices(void); extern void aaudio_PauseDevices(void); -SDL_bool aaudio_DetectBrokenPlayState( void ); +SDL_bool aaudio_DetectBrokenPlayState(void); #else -static void aaudio_ResumeDevices(void) {} +static void aaudio_ResumeDevices(void) +{ +} static void aaudio_PauseDevices(void) {} -static SDL_bool aaudio_DetectBrokenPlayState( void ) { return SDL_FALSE; } +static SDL_bool aaudio_DetectBrokenPlayState(void) { return SDL_FALSE; } #endif - - /* Number of 'type' events in the event queue */ -static int -SDL_NumberOfEvents(Uint32 type) +static int SDL_NumberOfEvents(Uint32 type) { return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type); } #if SDL_VIDEO_OPENGL_EGL -static void -android_egl_context_restore(SDL_Window *window) +static void android_egl_context_restore(SDL_Window *window) { if (window) { SDL_Event event; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - if (SDL_GL_MakeCurrent(window, (SDL_GLContext) data->egl_context) < 0) { + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + if (SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context) < 0) { /* The context is no longer valid, create a new one */ - data->egl_context = (EGLContext) SDL_GL_CreateContext(window); - SDL_GL_MakeCurrent(window, (SDL_GLContext) data->egl_context); + data->egl_context = (EGLContext)SDL_GL_CreateContext(window); + SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context); event.type = SDL_RENDER_DEVICE_RESET; SDL_PushEvent(&event); } @@ -85,12 +85,11 @@ android_egl_context_restore(SDL_Window *window) } } -static void -android_egl_context_backup(SDL_Window *window) +static void android_egl_context_backup(SDL_Window *window) { if (window) { /* Keep a copy of the EGL Context so we can try to restore it when we resume */ - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; data->egl_context = SDL_GL_GetCurrentContext(); /* We need to do this so the EGLSurface can be freed */ SDL_GL_MakeCurrent(window, NULL); @@ -106,8 +105,7 @@ android_egl_context_backup(SDL_Window *window) * No polling necessary */ -void -Android_PumpEvents_Blocking(_THIS) +void Android_PumpEvents_Blocking(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; @@ -176,14 +174,13 @@ Android_PumpEvents_Blocking(_THIS) } } - if ( aaudio_DetectBrokenPlayState() ) { + if (aaudio_DetectBrokenPlayState()) { aaudio_PauseDevices(); aaudio_ResumeDevices(); } } -void -Android_PumpEvents_NonBlocking(_THIS) +void Android_PumpEvents_NonBlocking(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; static int backup_context = 0; @@ -210,7 +207,6 @@ Android_PumpEvents_NonBlocking(_THIS) backup_context = 0; } - if (SDL_SemTryWait(Android_ResumeSem) == 0) { videodata->isPaused = 0; @@ -263,7 +259,7 @@ Android_PumpEvents_NonBlocking(_THIS) } } - if ( aaudio_DetectBrokenPlayState() ) { + if (aaudio_DetectBrokenPlayState()) { aaudio_PauseDevices(); aaudio_ResumeDevices(); } diff --git a/modules/SDL2/src/video/android/SDL_androidgl.c b/modules/SDL2/src/video/android/SDL_androidgl.c index 0300ff2..e54dbbe 100644 --- a/modules/SDL2/src/video/android/SDL_androidgl.c +++ b/modules/SDL2/src/video/android/SDL_androidgl.c @@ -36,32 +36,29 @@ #include -int -Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int Android_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { if (window && context) { - return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); + return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *)window->driverdata)->egl_surface, context); } else { return SDL_EGL_MakeCurrent(_this, NULL, NULL); } } -SDL_GLContext -Android_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window *window) { SDL_GLContext ret; Android_ActivityMutex_Lock_Running(); - ret = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + ret = SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); SDL_UnlockMutex(Android_ActivityMutex); return ret; } -int -Android_GLES_SwapWindow(_THIS, SDL_Window * window) +int Android_GLES_SwapWindow(_THIS, SDL_Window *window) { int retval; @@ -74,16 +71,16 @@ Android_GLES_SwapWindow(_THIS, SDL_Window * window) /*_this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE); _this->egl_data->eglWaitGL();*/ - retval = SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + retval = SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); SDL_UnlockMutex(Android_ActivityMutex); return retval; } -int -Android_GLES_LoadLibrary(_THIS, const char *path) { - return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) 0, 0); +int Android_GLES_LoadLibrary(_THIS, const char *path) +{ + return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType)0, 0); } #endif /* SDL_VIDEO_DRIVER_ANDROID */ diff --git a/modules/SDL2/src/video/android/SDL_androidgl.h b/modules/SDL2/src/video/android/SDL_androidgl.h index 9af2e5f..34bd229 100644 --- a/modules/SDL2/src/video/android/SDL_androidgl.h +++ b/modules/SDL2/src/video/android/SDL_androidgl.h @@ -23,12 +23,11 @@ #ifndef SDL_androidgl_h_ #define SDL_androidgl_h_ -SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window * window); -int Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); -int Android_GLES_SwapWindow(_THIS, SDL_Window * window); +SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window *window); +int Android_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); +int Android_GLES_SwapWindow(_THIS, SDL_Window *window); int Android_GLES_LoadLibrary(_THIS, const char *path); - #endif /* SDL_androidgl_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/android/SDL_androidkeyboard.c b/modules/SDL2/src/video/android/SDL_androidkeyboard.c index ebc5bd5..ba65201 100644 --- a/modules/SDL2/src/video/android/SDL_androidkeyboard.c +++ b/modules/SDL2/src/video/android/SDL_androidkeyboard.c @@ -31,290 +31,289 @@ #include "../../core/android/SDL_android.h" static SDL_Scancode Android_Keycodes[] = { - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */ - SDL_SCANCODE_SOFTLEFT, /* AKEYCODE_SOFT_LEFT */ - SDL_SCANCODE_SOFTRIGHT, /* AKEYCODE_SOFT_RIGHT */ - SDL_SCANCODE_AC_HOME, /* AKEYCODE_HOME */ - SDL_SCANCODE_AC_BACK, /* AKEYCODE_BACK */ - SDL_SCANCODE_CALL, /* AKEYCODE_CALL */ - SDL_SCANCODE_ENDCALL, /* AKEYCODE_ENDCALL */ - SDL_SCANCODE_0, /* AKEYCODE_0 */ - SDL_SCANCODE_1, /* AKEYCODE_1 */ - SDL_SCANCODE_2, /* AKEYCODE_2 */ - SDL_SCANCODE_3, /* AKEYCODE_3 */ - SDL_SCANCODE_4, /* AKEYCODE_4 */ - SDL_SCANCODE_5, /* AKEYCODE_5 */ - SDL_SCANCODE_6, /* AKEYCODE_6 */ - SDL_SCANCODE_7, /* AKEYCODE_7 */ - SDL_SCANCODE_8, /* AKEYCODE_8 */ - SDL_SCANCODE_9, /* AKEYCODE_9 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STAR */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_POUND */ - SDL_SCANCODE_UP, /* AKEYCODE_DPAD_UP */ - SDL_SCANCODE_DOWN, /* AKEYCODE_DPAD_DOWN */ - SDL_SCANCODE_LEFT, /* AKEYCODE_DPAD_LEFT */ - SDL_SCANCODE_RIGHT, /* AKEYCODE_DPAD_RIGHT */ - SDL_SCANCODE_SELECT, /* AKEYCODE_DPAD_CENTER */ - SDL_SCANCODE_VOLUMEUP, /* AKEYCODE_VOLUME_UP */ - SDL_SCANCODE_VOLUMEDOWN, /* AKEYCODE_VOLUME_DOWN */ - SDL_SCANCODE_POWER, /* AKEYCODE_POWER */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CAMERA */ - SDL_SCANCODE_CLEAR, /* AKEYCODE_CLEAR */ - SDL_SCANCODE_A, /* AKEYCODE_A */ - SDL_SCANCODE_B, /* AKEYCODE_B */ - SDL_SCANCODE_C, /* AKEYCODE_C */ - SDL_SCANCODE_D, /* AKEYCODE_D */ - SDL_SCANCODE_E, /* AKEYCODE_E */ - SDL_SCANCODE_F, /* AKEYCODE_F */ - SDL_SCANCODE_G, /* AKEYCODE_G */ - SDL_SCANCODE_H, /* AKEYCODE_H */ - SDL_SCANCODE_I, /* AKEYCODE_I */ - SDL_SCANCODE_J, /* AKEYCODE_J */ - SDL_SCANCODE_K, /* AKEYCODE_K */ - SDL_SCANCODE_L, /* AKEYCODE_L */ - SDL_SCANCODE_M, /* AKEYCODE_M */ - SDL_SCANCODE_N, /* AKEYCODE_N */ - SDL_SCANCODE_O, /* AKEYCODE_O */ - SDL_SCANCODE_P, /* AKEYCODE_P */ - SDL_SCANCODE_Q, /* AKEYCODE_Q */ - SDL_SCANCODE_R, /* AKEYCODE_R */ - SDL_SCANCODE_S, /* AKEYCODE_S */ - SDL_SCANCODE_T, /* AKEYCODE_T */ - SDL_SCANCODE_U, /* AKEYCODE_U */ - SDL_SCANCODE_V, /* AKEYCODE_V */ - SDL_SCANCODE_W, /* AKEYCODE_W */ - SDL_SCANCODE_X, /* AKEYCODE_X */ - SDL_SCANCODE_Y, /* AKEYCODE_Y */ - SDL_SCANCODE_Z, /* AKEYCODE_Z */ - SDL_SCANCODE_COMMA, /* AKEYCODE_COMMA */ - SDL_SCANCODE_PERIOD, /* AKEYCODE_PERIOD */ - SDL_SCANCODE_LALT, /* AKEYCODE_ALT_LEFT */ - SDL_SCANCODE_RALT, /* AKEYCODE_ALT_RIGHT */ - SDL_SCANCODE_LSHIFT, /* AKEYCODE_SHIFT_LEFT */ - SDL_SCANCODE_RSHIFT, /* AKEYCODE_SHIFT_RIGHT */ - SDL_SCANCODE_TAB, /* AKEYCODE_TAB */ - SDL_SCANCODE_SPACE, /* AKEYCODE_SPACE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SYM */ - SDL_SCANCODE_WWW, /* AKEYCODE_EXPLORER */ - SDL_SCANCODE_MAIL, /* AKEYCODE_ENVELOPE */ - SDL_SCANCODE_RETURN, /* AKEYCODE_ENTER */ - SDL_SCANCODE_BACKSPACE, /* AKEYCODE_DEL */ - SDL_SCANCODE_GRAVE, /* AKEYCODE_GRAVE */ - SDL_SCANCODE_MINUS, /* AKEYCODE_MINUS */ - SDL_SCANCODE_EQUALS, /* AKEYCODE_EQUALS */ - SDL_SCANCODE_LEFTBRACKET, /* AKEYCODE_LEFT_BRACKET */ - SDL_SCANCODE_RIGHTBRACKET, /* AKEYCODE_RIGHT_BRACKET */ - SDL_SCANCODE_BACKSLASH, /* AKEYCODE_BACKSLASH */ - SDL_SCANCODE_SEMICOLON, /* AKEYCODE_SEMICOLON */ - SDL_SCANCODE_APOSTROPHE, /* AKEYCODE_APOSTROPHE */ - SDL_SCANCODE_SLASH, /* AKEYCODE_SLASH */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NUM */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_HEADSETHOOK */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_FOCUS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PLUS */ - SDL_SCANCODE_MENU, /* AKEYCODE_MENU */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NOTIFICATION */ - SDL_SCANCODE_AC_SEARCH, /* AKEYCODE_SEARCH */ - SDL_SCANCODE_AUDIOPLAY, /* AKEYCODE_MEDIA_PLAY_PAUSE */ - SDL_SCANCODE_AUDIOSTOP, /* AKEYCODE_MEDIA_STOP */ - SDL_SCANCODE_AUDIONEXT, /* AKEYCODE_MEDIA_NEXT */ - SDL_SCANCODE_AUDIOPREV, /* AKEYCODE_MEDIA_PREVIOUS */ - SDL_SCANCODE_AUDIOREWIND, /* AKEYCODE_MEDIA_REWIND */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */ + SDL_SCANCODE_SOFTLEFT, /* AKEYCODE_SOFT_LEFT */ + SDL_SCANCODE_SOFTRIGHT, /* AKEYCODE_SOFT_RIGHT */ + SDL_SCANCODE_AC_HOME, /* AKEYCODE_HOME */ + SDL_SCANCODE_AC_BACK, /* AKEYCODE_BACK */ + SDL_SCANCODE_CALL, /* AKEYCODE_CALL */ + SDL_SCANCODE_ENDCALL, /* AKEYCODE_ENDCALL */ + SDL_SCANCODE_0, /* AKEYCODE_0 */ + SDL_SCANCODE_1, /* AKEYCODE_1 */ + SDL_SCANCODE_2, /* AKEYCODE_2 */ + SDL_SCANCODE_3, /* AKEYCODE_3 */ + SDL_SCANCODE_4, /* AKEYCODE_4 */ + SDL_SCANCODE_5, /* AKEYCODE_5 */ + SDL_SCANCODE_6, /* AKEYCODE_6 */ + SDL_SCANCODE_7, /* AKEYCODE_7 */ + SDL_SCANCODE_8, /* AKEYCODE_8 */ + SDL_SCANCODE_9, /* AKEYCODE_9 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STAR */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_POUND */ + SDL_SCANCODE_UP, /* AKEYCODE_DPAD_UP */ + SDL_SCANCODE_DOWN, /* AKEYCODE_DPAD_DOWN */ + SDL_SCANCODE_LEFT, /* AKEYCODE_DPAD_LEFT */ + SDL_SCANCODE_RIGHT, /* AKEYCODE_DPAD_RIGHT */ + SDL_SCANCODE_SELECT, /* AKEYCODE_DPAD_CENTER */ + SDL_SCANCODE_VOLUMEUP, /* AKEYCODE_VOLUME_UP */ + SDL_SCANCODE_VOLUMEDOWN, /* AKEYCODE_VOLUME_DOWN */ + SDL_SCANCODE_POWER, /* AKEYCODE_POWER */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CAMERA */ + SDL_SCANCODE_CLEAR, /* AKEYCODE_CLEAR */ + SDL_SCANCODE_A, /* AKEYCODE_A */ + SDL_SCANCODE_B, /* AKEYCODE_B */ + SDL_SCANCODE_C, /* AKEYCODE_C */ + SDL_SCANCODE_D, /* AKEYCODE_D */ + SDL_SCANCODE_E, /* AKEYCODE_E */ + SDL_SCANCODE_F, /* AKEYCODE_F */ + SDL_SCANCODE_G, /* AKEYCODE_G */ + SDL_SCANCODE_H, /* AKEYCODE_H */ + SDL_SCANCODE_I, /* AKEYCODE_I */ + SDL_SCANCODE_J, /* AKEYCODE_J */ + SDL_SCANCODE_K, /* AKEYCODE_K */ + SDL_SCANCODE_L, /* AKEYCODE_L */ + SDL_SCANCODE_M, /* AKEYCODE_M */ + SDL_SCANCODE_N, /* AKEYCODE_N */ + SDL_SCANCODE_O, /* AKEYCODE_O */ + SDL_SCANCODE_P, /* AKEYCODE_P */ + SDL_SCANCODE_Q, /* AKEYCODE_Q */ + SDL_SCANCODE_R, /* AKEYCODE_R */ + SDL_SCANCODE_S, /* AKEYCODE_S */ + SDL_SCANCODE_T, /* AKEYCODE_T */ + SDL_SCANCODE_U, /* AKEYCODE_U */ + SDL_SCANCODE_V, /* AKEYCODE_V */ + SDL_SCANCODE_W, /* AKEYCODE_W */ + SDL_SCANCODE_X, /* AKEYCODE_X */ + SDL_SCANCODE_Y, /* AKEYCODE_Y */ + SDL_SCANCODE_Z, /* AKEYCODE_Z */ + SDL_SCANCODE_COMMA, /* AKEYCODE_COMMA */ + SDL_SCANCODE_PERIOD, /* AKEYCODE_PERIOD */ + SDL_SCANCODE_LALT, /* AKEYCODE_ALT_LEFT */ + SDL_SCANCODE_RALT, /* AKEYCODE_ALT_RIGHT */ + SDL_SCANCODE_LSHIFT, /* AKEYCODE_SHIFT_LEFT */ + SDL_SCANCODE_RSHIFT, /* AKEYCODE_SHIFT_RIGHT */ + SDL_SCANCODE_TAB, /* AKEYCODE_TAB */ + SDL_SCANCODE_SPACE, /* AKEYCODE_SPACE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SYM */ + SDL_SCANCODE_WWW, /* AKEYCODE_EXPLORER */ + SDL_SCANCODE_MAIL, /* AKEYCODE_ENVELOPE */ + SDL_SCANCODE_RETURN, /* AKEYCODE_ENTER */ + SDL_SCANCODE_BACKSPACE, /* AKEYCODE_DEL */ + SDL_SCANCODE_GRAVE, /* AKEYCODE_GRAVE */ + SDL_SCANCODE_MINUS, /* AKEYCODE_MINUS */ + SDL_SCANCODE_EQUALS, /* AKEYCODE_EQUALS */ + SDL_SCANCODE_LEFTBRACKET, /* AKEYCODE_LEFT_BRACKET */ + SDL_SCANCODE_RIGHTBRACKET, /* AKEYCODE_RIGHT_BRACKET */ + SDL_SCANCODE_BACKSLASH, /* AKEYCODE_BACKSLASH */ + SDL_SCANCODE_SEMICOLON, /* AKEYCODE_SEMICOLON */ + SDL_SCANCODE_APOSTROPHE, /* AKEYCODE_APOSTROPHE */ + SDL_SCANCODE_SLASH, /* AKEYCODE_SLASH */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NUM */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_HEADSETHOOK */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_FOCUS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PLUS */ + SDL_SCANCODE_MENU, /* AKEYCODE_MENU */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NOTIFICATION */ + SDL_SCANCODE_AC_SEARCH, /* AKEYCODE_SEARCH */ + SDL_SCANCODE_AUDIOPLAY, /* AKEYCODE_MEDIA_PLAY_PAUSE */ + SDL_SCANCODE_AUDIOSTOP, /* AKEYCODE_MEDIA_STOP */ + SDL_SCANCODE_AUDIONEXT, /* AKEYCODE_MEDIA_NEXT */ + SDL_SCANCODE_AUDIOPREV, /* AKEYCODE_MEDIA_PREVIOUS */ + SDL_SCANCODE_AUDIOREWIND, /* AKEYCODE_MEDIA_REWIND */ SDL_SCANCODE_AUDIOFASTFORWARD, /* AKEYCODE_MEDIA_FAST_FORWARD */ - SDL_SCANCODE_MUTE, /* AKEYCODE_MUTE */ - SDL_SCANCODE_PAGEUP, /* AKEYCODE_PAGE_UP */ - SDL_SCANCODE_PAGEDOWN, /* AKEYCODE_PAGE_DOWN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PICTSYMBOLS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SWITCH_CHARSET */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_A */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_B */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_C */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_X */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_Y */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_Z */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_L1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_R1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_L2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_R2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_THUMBL */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_THUMBR */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_START */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_SELECT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */ - SDL_SCANCODE_ESCAPE, /* AKEYCODE_ESCAPE */ - SDL_SCANCODE_DELETE, /* AKEYCODE_FORWARD_DEL */ - SDL_SCANCODE_LCTRL, /* AKEYCODE_CTRL_LEFT */ - SDL_SCANCODE_RCTRL, /* AKEYCODE_CTRL_RIGHT */ - SDL_SCANCODE_CAPSLOCK, /* AKEYCODE_CAPS_LOCK */ - SDL_SCANCODE_SCROLLLOCK, /* AKEYCODE_SCROLL_LOCK */ - SDL_SCANCODE_LGUI, /* AKEYCODE_META_LEFT */ - SDL_SCANCODE_RGUI, /* AKEYCODE_META_RIGHT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_FUNCTION */ - SDL_SCANCODE_PRINTSCREEN, /* AKEYCODE_SYSRQ */ - SDL_SCANCODE_PAUSE, /* AKEYCODE_BREAK */ - SDL_SCANCODE_HOME, /* AKEYCODE_MOVE_HOME */ - SDL_SCANCODE_END, /* AKEYCODE_MOVE_END */ - SDL_SCANCODE_INSERT, /* AKEYCODE_INSERT */ - SDL_SCANCODE_AC_FORWARD, /* AKEYCODE_FORWARD */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PLAY */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PAUSE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_CLOSE */ - SDL_SCANCODE_EJECT, /* AKEYCODE_MEDIA_EJECT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_RECORD */ - SDL_SCANCODE_F1, /* AKEYCODE_F1 */ - SDL_SCANCODE_F2, /* AKEYCODE_F2 */ - SDL_SCANCODE_F3, /* AKEYCODE_F3 */ - SDL_SCANCODE_F4, /* AKEYCODE_F4 */ - SDL_SCANCODE_F5, /* AKEYCODE_F5 */ - SDL_SCANCODE_F6, /* AKEYCODE_F6 */ - SDL_SCANCODE_F7, /* AKEYCODE_F7 */ - SDL_SCANCODE_F8, /* AKEYCODE_F8 */ - SDL_SCANCODE_F9, /* AKEYCODE_F9 */ - SDL_SCANCODE_F10, /* AKEYCODE_F10 */ - SDL_SCANCODE_F11, /* AKEYCODE_F11 */ - SDL_SCANCODE_F12, /* AKEYCODE_F12 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NUM_LOCK */ - SDL_SCANCODE_KP_0, /* AKEYCODE_NUMPAD_0 */ - SDL_SCANCODE_KP_1, /* AKEYCODE_NUMPAD_1 */ - SDL_SCANCODE_KP_2, /* AKEYCODE_NUMPAD_2 */ - SDL_SCANCODE_KP_3, /* AKEYCODE_NUMPAD_3 */ - SDL_SCANCODE_KP_4, /* AKEYCODE_NUMPAD_4 */ - SDL_SCANCODE_KP_5, /* AKEYCODE_NUMPAD_5 */ - SDL_SCANCODE_KP_6, /* AKEYCODE_NUMPAD_6 */ - SDL_SCANCODE_KP_7, /* AKEYCODE_NUMPAD_7 */ - SDL_SCANCODE_KP_8, /* AKEYCODE_NUMPAD_8 */ - SDL_SCANCODE_KP_9, /* AKEYCODE_NUMPAD_9 */ - SDL_SCANCODE_KP_DIVIDE, /* AKEYCODE_NUMPAD_DIVIDE */ - SDL_SCANCODE_KP_MULTIPLY, /* AKEYCODE_NUMPAD_MULTIPLY */ - SDL_SCANCODE_KP_MINUS, /* AKEYCODE_NUMPAD_SUBTRACT */ - SDL_SCANCODE_KP_PLUS, /* AKEYCODE_NUMPAD_ADD */ - SDL_SCANCODE_KP_PERIOD, /* AKEYCODE_NUMPAD_DOT */ - SDL_SCANCODE_KP_COMMA, /* AKEYCODE_NUMPAD_COMMA */ - SDL_SCANCODE_KP_ENTER, /* AKEYCODE_NUMPAD_ENTER */ - SDL_SCANCODE_KP_EQUALS, /* AKEYCODE_NUMPAD_EQUALS */ - SDL_SCANCODE_KP_LEFTPAREN, /* AKEYCODE_NUMPAD_LEFT_PAREN */ - SDL_SCANCODE_KP_RIGHTPAREN, /* AKEYCODE_NUMPAD_RIGHT_PAREN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOLUME_MUTE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_INFO */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_UP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_DOWN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_IN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_OUT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WINDOW */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_GUIDE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DVR */ - SDL_SCANCODE_AC_BOOKMARKS, /* AKEYCODE_BOOKMARK */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CAPTIONS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SETTINGS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_POWER */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STB_POWER */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STB_INPUT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AVR_POWER */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AVR_INPUT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_RED */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_GREEN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_YELLOW */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_BLUE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_APP_SWITCH */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_3 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_4 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_5 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_6 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_7 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_8 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_9 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_10 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_11 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_12 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_13 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_14 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_15 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_16 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_LANGUAGE_SWITCH */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MANNER_MODE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_3D_MODE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CONTACTS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CALENDAR */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MUSIC */ - SDL_SCANCODE_CALCULATOR, /* AKEYCODE_CALCULATOR */ - SDL_SCANCODE_LANG5, /* AKEYCODE_ZENKAKU_HANKAKU */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_EISU */ - SDL_SCANCODE_INTERNATIONAL5, /* AKEYCODE_MUHENKAN */ - SDL_SCANCODE_INTERNATIONAL4, /* AKEYCODE_HENKAN */ - SDL_SCANCODE_LANG3, /* AKEYCODE_KATAKANA_HIRAGANA */ - SDL_SCANCODE_INTERNATIONAL3, /* AKEYCODE_YEN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_RO */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_KANA */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ASSIST */ - SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */ - SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_AUDIO_TRACK */ - SDL_SCANCODE_SLEEP, /* AKEYCODE_SLEEP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WAKEUP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PAIRING */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_TOP_MENU */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_11 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_12 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_LAST_CHANNEL */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_DATA_SERVICE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOICE_ASSIST */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_RADIO_SERVICE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TELETEXT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NUMBER_ENTRY */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_ANALOG */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_DIGITAL */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_BS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_CS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_SERVICE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NETWORK */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ANTENNA_CABLE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_3 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_4 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_VGA_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ZOOM_MODE */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_CONTENTS_MENU */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_MEDIA_CONTEXT_MENU */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TIMER_PROGRAMMING */ - SDL_SCANCODE_HELP, /* AKEYCODE_HELP */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_PREVIOUS */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_NEXT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_IN */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_OUT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_PRIMARY */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_1 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_2 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_3 */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_UP_LEFT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_DOWN_LEFT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_UP_RIGHT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_DOWN_RIGHT */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_SKIP_FORWARD */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_SKIP_BACKWARD */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_STEP_FORWARD */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_STEP_BACKWARD */ - SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_SLEEP */ - SDL_SCANCODE_CUT, /* AKEYCODE_CUT */ - SDL_SCANCODE_COPY, /* AKEYCODE_COPY */ - SDL_SCANCODE_PASTE, /* AKEYCODE_PASTE */ + SDL_SCANCODE_MUTE, /* AKEYCODE_MUTE */ + SDL_SCANCODE_PAGEUP, /* AKEYCODE_PAGE_UP */ + SDL_SCANCODE_PAGEDOWN, /* AKEYCODE_PAGE_DOWN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PICTSYMBOLS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SWITCH_CHARSET */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_A */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_B */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_C */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_X */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_Y */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_Z */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_L1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_R1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_L2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_R2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_THUMBL */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_THUMBR */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_START */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_SELECT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */ + SDL_SCANCODE_ESCAPE, /* AKEYCODE_ESCAPE */ + SDL_SCANCODE_DELETE, /* AKEYCODE_FORWARD_DEL */ + SDL_SCANCODE_LCTRL, /* AKEYCODE_CTRL_LEFT */ + SDL_SCANCODE_RCTRL, /* AKEYCODE_CTRL_RIGHT */ + SDL_SCANCODE_CAPSLOCK, /* AKEYCODE_CAPS_LOCK */ + SDL_SCANCODE_SCROLLLOCK, /* AKEYCODE_SCROLL_LOCK */ + SDL_SCANCODE_LGUI, /* AKEYCODE_META_LEFT */ + SDL_SCANCODE_RGUI, /* AKEYCODE_META_RIGHT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_FUNCTION */ + SDL_SCANCODE_PRINTSCREEN, /* AKEYCODE_SYSRQ */ + SDL_SCANCODE_PAUSE, /* AKEYCODE_BREAK */ + SDL_SCANCODE_HOME, /* AKEYCODE_MOVE_HOME */ + SDL_SCANCODE_END, /* AKEYCODE_MOVE_END */ + SDL_SCANCODE_INSERT, /* AKEYCODE_INSERT */ + SDL_SCANCODE_AC_FORWARD, /* AKEYCODE_FORWARD */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PLAY */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PAUSE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_CLOSE */ + SDL_SCANCODE_EJECT, /* AKEYCODE_MEDIA_EJECT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_RECORD */ + SDL_SCANCODE_F1, /* AKEYCODE_F1 */ + SDL_SCANCODE_F2, /* AKEYCODE_F2 */ + SDL_SCANCODE_F3, /* AKEYCODE_F3 */ + SDL_SCANCODE_F4, /* AKEYCODE_F4 */ + SDL_SCANCODE_F5, /* AKEYCODE_F5 */ + SDL_SCANCODE_F6, /* AKEYCODE_F6 */ + SDL_SCANCODE_F7, /* AKEYCODE_F7 */ + SDL_SCANCODE_F8, /* AKEYCODE_F8 */ + SDL_SCANCODE_F9, /* AKEYCODE_F9 */ + SDL_SCANCODE_F10, /* AKEYCODE_F10 */ + SDL_SCANCODE_F11, /* AKEYCODE_F11 */ + SDL_SCANCODE_F12, /* AKEYCODE_F12 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NUM_LOCK */ + SDL_SCANCODE_KP_0, /* AKEYCODE_NUMPAD_0 */ + SDL_SCANCODE_KP_1, /* AKEYCODE_NUMPAD_1 */ + SDL_SCANCODE_KP_2, /* AKEYCODE_NUMPAD_2 */ + SDL_SCANCODE_KP_3, /* AKEYCODE_NUMPAD_3 */ + SDL_SCANCODE_KP_4, /* AKEYCODE_NUMPAD_4 */ + SDL_SCANCODE_KP_5, /* AKEYCODE_NUMPAD_5 */ + SDL_SCANCODE_KP_6, /* AKEYCODE_NUMPAD_6 */ + SDL_SCANCODE_KP_7, /* AKEYCODE_NUMPAD_7 */ + SDL_SCANCODE_KP_8, /* AKEYCODE_NUMPAD_8 */ + SDL_SCANCODE_KP_9, /* AKEYCODE_NUMPAD_9 */ + SDL_SCANCODE_KP_DIVIDE, /* AKEYCODE_NUMPAD_DIVIDE */ + SDL_SCANCODE_KP_MULTIPLY, /* AKEYCODE_NUMPAD_MULTIPLY */ + SDL_SCANCODE_KP_MINUS, /* AKEYCODE_NUMPAD_SUBTRACT */ + SDL_SCANCODE_KP_PLUS, /* AKEYCODE_NUMPAD_ADD */ + SDL_SCANCODE_KP_PERIOD, /* AKEYCODE_NUMPAD_DOT */ + SDL_SCANCODE_KP_COMMA, /* AKEYCODE_NUMPAD_COMMA */ + SDL_SCANCODE_KP_ENTER, /* AKEYCODE_NUMPAD_ENTER */ + SDL_SCANCODE_KP_EQUALS, /* AKEYCODE_NUMPAD_EQUALS */ + SDL_SCANCODE_KP_LEFTPAREN, /* AKEYCODE_NUMPAD_LEFT_PAREN */ + SDL_SCANCODE_KP_RIGHTPAREN, /* AKEYCODE_NUMPAD_RIGHT_PAREN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOLUME_MUTE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_INFO */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_UP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_DOWN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_IN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_OUT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WINDOW */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_GUIDE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DVR */ + SDL_SCANCODE_AC_BOOKMARKS, /* AKEYCODE_BOOKMARK */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CAPTIONS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SETTINGS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_POWER */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STB_POWER */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STB_INPUT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AVR_POWER */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_AVR_INPUT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_RED */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_GREEN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_YELLOW */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PROG_BLUE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_APP_SWITCH */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_3 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_4 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_5 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_6 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_7 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_8 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_9 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_10 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_11 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_12 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_13 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_14 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_15 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_16 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_LANGUAGE_SWITCH */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MANNER_MODE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_3D_MODE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CONTACTS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CALENDAR */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MUSIC */ + SDL_SCANCODE_CALCULATOR, /* AKEYCODE_CALCULATOR */ + SDL_SCANCODE_LANG5, /* AKEYCODE_ZENKAKU_HANKAKU */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_EISU */ + SDL_SCANCODE_INTERNATIONAL5, /* AKEYCODE_MUHENKAN */ + SDL_SCANCODE_INTERNATIONAL4, /* AKEYCODE_HENKAN */ + SDL_SCANCODE_LANG3, /* AKEYCODE_KATAKANA_HIRAGANA */ + SDL_SCANCODE_INTERNATIONAL3, /* AKEYCODE_YEN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_RO */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_KANA */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ASSIST */ + SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */ + SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_AUDIO_TRACK */ + SDL_SCANCODE_SLEEP, /* AKEYCODE_SLEEP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WAKEUP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PAIRING */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_TOP_MENU */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_11 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_12 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_LAST_CHANNEL */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_DATA_SERVICE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOICE_ASSIST */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_RADIO_SERVICE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TELETEXT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NUMBER_ENTRY */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_ANALOG */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_DIGITAL */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_BS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_CS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_SERVICE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NETWORK */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ANTENNA_CABLE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_3 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_4 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_VGA_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ZOOM_MODE */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_CONTENTS_MENU */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_MEDIA_CONTEXT_MENU */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TIMER_PROGRAMMING */ + SDL_SCANCODE_HELP, /* AKEYCODE_HELP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_PREVIOUS */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_NEXT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_IN */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NAVIGATE_OUT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_PRIMARY */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_1 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_2 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_STEM_3 */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_UP_LEFT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_DOWN_LEFT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_UP_RIGHT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_DPAD_DOWN_RIGHT */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_SKIP_FORWARD */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_SKIP_BACKWARD */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_STEP_FORWARD */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_STEP_BACKWARD */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_SLEEP */ + SDL_SCANCODE_CUT, /* AKEYCODE_CUT */ + SDL_SCANCODE_COPY, /* AKEYCODE_COPY */ + SDL_SCANCODE_PASTE, /* AKEYCODE_PASTE */ }; -static SDL_Scancode -TranslateKeycode(int keycode) +static SDL_Scancode TranslateKeycode(int keycode) { SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN; @@ -327,49 +326,42 @@ TranslateKeycode(int keycode) return scancode; } -int -Android_OnKeyDown(int keycode) +int Android_OnKeyDown(int keycode) { return SDL_SendKeyboardKey(SDL_PRESSED, TranslateKeycode(keycode)); } -int -Android_OnKeyUp(int keycode) +int Android_OnKeyUp(int keycode) { return SDL_SendKeyboardKey(SDL_RELEASED, TranslateKeycode(keycode)); } -SDL_bool -Android_HasScreenKeyboardSupport(_THIS) +SDL_bool Android_HasScreenKeyboardSupport(_THIS) { return SDL_TRUE; } -SDL_bool -Android_IsScreenKeyboardShown(_THIS, SDL_Window * window) +SDL_bool Android_IsScreenKeyboardShown(_THIS, SDL_Window *window) { return Android_JNI_IsScreenKeyboardShown(); } -void -Android_StartTextInput(_THIS) +void Android_StartTextInput(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Android_JNI_ShowTextInput(&videodata->textRect); } -void -Android_StopTextInput(_THIS) +void Android_StopTextInput(_THIS) { Android_JNI_HideTextInput(); } -void -Android_SetTextInputRect(_THIS, const SDL_Rect *rect) +void Android_SetTextInputRect(_THIS, const SDL_Rect *rect) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; - if (!rect) { + if (rect == NULL) { SDL_InvalidParamError("rect"); return; } diff --git a/modules/SDL2/src/video/android/SDL_androidkeyboard.h b/modules/SDL2/src/video/android/SDL_androidkeyboard.h index 953a67f..81b593f 100644 --- a/modules/SDL2/src/video/android/SDL_androidkeyboard.h +++ b/modules/SDL2/src/video/android/SDL_androidkeyboard.h @@ -26,7 +26,7 @@ extern int Android_OnKeyDown(int keycode); extern int Android_OnKeyUp(int keycode); extern SDL_bool Android_HasScreenKeyboardSupport(_THIS); -extern SDL_bool Android_IsScreenKeyboardShown(_THIS, SDL_Window * window); +extern SDL_bool Android_IsScreenKeyboardShown(_THIS, SDL_Window *window); extern void Android_StartTextInput(_THIS); extern void Android_StopTextInput(_THIS); diff --git a/modules/SDL2/src/video/android/SDL_androidmessagebox.c b/modules/SDL2/src/video/android/SDL_androidmessagebox.c index f0bd8a1..81f6f38 100644 --- a/modules/SDL2/src/video/android/SDL_androidmessagebox.c +++ b/modules/SDL2/src/video/android/SDL_androidmessagebox.c @@ -26,8 +26,7 @@ #include "SDL_androidmessagebox.h" #include "../../core/android/SDL_android.h" -int -Android_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int Android_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { return Android_JNI_ShowMessageBox(messageboxdata, buttonid); } diff --git a/modules/SDL2/src/video/android/SDL_androidmouse.c b/modules/SDL2/src/video/android/SDL_androidmouse.c index 9a157ac..7d9ab09 100644 --- a/modules/SDL2/src/video/android/SDL_androidmouse.c +++ b/modules/SDL2/src/video/android/SDL_androidmouse.c @@ -31,16 +31,16 @@ #include "../../core/android/SDL_android.h" /* See Android's MotionEvent class for constants */ -#define ACTION_DOWN 0 -#define ACTION_UP 1 -#define ACTION_MOVE 2 +#define ACTION_DOWN 0 +#define ACTION_UP 1 +#define ACTION_MOVE 2 #define ACTION_HOVER_MOVE 7 -#define ACTION_SCROLL 8 -#define BUTTON_PRIMARY 1 -#define BUTTON_SECONDARY 2 -#define BUTTON_TERTIARY 4 -#define BUTTON_BACK 8 -#define BUTTON_FORWARD 16 +#define ACTION_SCROLL 8 +#define BUTTON_PRIMARY 1 +#define BUTTON_SECONDARY 2 +#define BUTTON_TERTIARY 4 +#define BUTTON_BACK 8 +#define BUTTON_FORWARD 16 typedef struct { @@ -55,8 +55,7 @@ static int last_state; /* Blank cursor */ static SDL_Cursor *empty_cursor; -static SDL_Cursor * -Android_WrapCursor(int custom_cursor, int system_cursor) +static SDL_Cursor *Android_WrapCursor(int custom_cursor, int system_cursor) { SDL_Cursor *cursor; @@ -79,20 +78,18 @@ Android_WrapCursor(int custom_cursor, int system_cursor) return cursor; } -static SDL_Cursor * -Android_CreateDefaultCursor() +static SDL_Cursor *Android_CreateDefaultCursor() { return Android_WrapCursor(0, SDL_SYSTEM_CURSOR_ARROW); } -static SDL_Cursor * -Android_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *Android_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { int custom_cursor; SDL_Surface *converted; converted = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_ARGB8888, 0); - if (!converted) { + if (converted == NULL) { return NULL; } custom_cursor = Android_JNI_CreateCustomCursor(converted, hot_x, hot_y); @@ -104,16 +101,14 @@ Android_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) return Android_WrapCursor(custom_cursor, 0); } -static SDL_Cursor * -Android_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *Android_CreateSystemCursor(SDL_SystemCursor id) { return Android_WrapCursor(0, id); } -static void -Android_FreeCursor(SDL_Cursor * cursor) +static void Android_FreeCursor(SDL_Cursor *cursor) { - SDL_AndroidCursorData *data = (SDL_AndroidCursorData*) cursor->driverdata; + SDL_AndroidCursorData *data = (SDL_AndroidCursorData *)cursor->driverdata; if (data->custom_cursor != 0) { Android_JNI_DestroyCustomCursor(data->custom_cursor); } @@ -121,13 +116,12 @@ Android_FreeCursor(SDL_Cursor * cursor) SDL_free(cursor); } -static SDL_Cursor * -Android_CreateEmptyCursor() +static SDL_Cursor *Android_CreateEmptyCursor() { - if (!empty_cursor) { + if (empty_cursor == NULL) { SDL_Surface *empty_surface = SDL_CreateRGBSurfaceWithFormat(0, 1, 1, 32, SDL_PIXELFORMAT_ARGB8888); if (empty_surface) { - SDL_memset(empty_surface->pixels, 0, empty_surface->h * empty_surface->pitch); + SDL_memset(empty_surface->pixels, 0, (size_t)empty_surface->h * empty_surface->pitch); empty_cursor = Android_CreateCursor(empty_surface, 0, 0); SDL_FreeSurface(empty_surface); } @@ -135,8 +129,7 @@ Android_CreateEmptyCursor() return empty_cursor; } -static void -Android_DestroyEmptyCursor() +static void Android_DestroyEmptyCursor() { if (empty_cursor) { Android_FreeCursor(empty_cursor); @@ -144,10 +137,9 @@ Android_DestroyEmptyCursor() } } -static int -Android_ShowCursor(SDL_Cursor *cursor) +static int Android_ShowCursor(SDL_Cursor *cursor) { - if (!cursor) { + if (cursor == NULL) { cursor = Android_CreateEmptyCursor(); } if (cursor) { @@ -168,8 +160,7 @@ Android_ShowCursor(SDL_Cursor *cursor) } } -static int -Android_SetRelativeMouseMode(SDL_bool enabled) +static int Android_SetRelativeMouseMode(SDL_bool enabled) { if (!Android_JNI_SupportsRelativeMouse()) { return SDL_Unsupported(); @@ -182,8 +173,7 @@ Android_SetRelativeMouseMode(SDL_bool enabled) return 0; } -void -Android_InitMouse(void) +void Android_InitMouse(void) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -198,15 +188,13 @@ Android_InitMouse(void) last_state = 0; } -void -Android_QuitMouse(void) +void Android_QuitMouse(void) { Android_DestroyEmptyCursor(); } /* Translate Android mouse button state to SDL mouse button */ -static Uint8 -TranslateButton(int state) +static Uint8 TranslateButton(int state) { if (state & BUTTON_PRIMARY) { return SDL_BUTTON_LEFT; @@ -223,48 +211,46 @@ TranslateButton(int state) } } -void -Android_OnMouse(SDL_Window *window, int state, int action, float x, float y, SDL_bool relative) +void Android_OnMouse(SDL_Window *window, int state, int action, float x, float y, SDL_bool relative) { int changes; Uint8 button; - if (!window) { + if (window == NULL) { return; } - switch(action) { - case ACTION_DOWN: - changes = state & ~last_state; - button = TranslateButton(changes); - last_state = state; - SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); - SDL_SendMouseButton(window, 0, SDL_PRESSED, button); - break; - - case ACTION_UP: - changes = last_state & ~state; - button = TranslateButton(changes); - last_state = state; - SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); - SDL_SendMouseButton(window, 0, SDL_RELEASED, button); - break; - - case ACTION_MOVE: - case ACTION_HOVER_MOVE: - SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); - break; - - case ACTION_SCROLL: - SDL_SendMouseWheel(window, 0, x, y, SDL_MOUSEWHEEL_NORMAL); - break; - - default: - break; + switch (action) { + case ACTION_DOWN: + changes = state & ~last_state; + button = TranslateButton(changes); + last_state = state; + SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); + SDL_SendMouseButton(window, 0, SDL_PRESSED, button); + break; + + case ACTION_UP: + changes = last_state & ~state; + button = TranslateButton(changes); + last_state = state; + SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); + SDL_SendMouseButton(window, 0, SDL_RELEASED, button); + break; + + case ACTION_MOVE: + case ACTION_HOVER_MOVE: + SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y); + break; + + case ACTION_SCROLL: + SDL_SendMouseWheel(window, 0, x, y, SDL_MOUSEWHEEL_NORMAL); + break; + + default: + break; } } #endif /* SDL_VIDEO_DRIVER_ANDROID */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/android/SDL_androidtouch.c b/modules/SDL2/src/video/android/SDL_androidtouch.c index d1e42cb..a62ae9e 100644 --- a/modules/SDL2/src/video/android/SDL_androidtouch.c +++ b/modules/SDL2/src/video/android/SDL_androidtouch.c @@ -32,12 +32,12 @@ #include "../../core/android/SDL_android.h" #define ACTION_DOWN 0 -#define ACTION_UP 1 +#define ACTION_UP 1 #define ACTION_MOVE 2 /* #define ACTION_CANCEL 3 */ /* #define ACTION_OUTSIDE 4 */ #define ACTION_POINTER_DOWN 5 -#define ACTION_POINTER_UP 6 +#define ACTION_POINTER_UP 6 void Android_InitTouch(void) { @@ -54,7 +54,7 @@ void Android_OnTouch(SDL_Window *window, int touch_device_id_in, int pointer_fin SDL_TouchID touchDeviceId = 0; SDL_FingerID fingerId = 0; - if (!window) { + if (window == NULL) { return; } @@ -65,22 +65,22 @@ void Android_OnTouch(SDL_Window *window, int touch_device_id_in, int pointer_fin fingerId = (SDL_FingerID)pointer_finger_id_in; switch (action) { - case ACTION_DOWN: - case ACTION_POINTER_DOWN: - SDL_SendTouch(touchDeviceId, fingerId, window, SDL_TRUE, x, y, p); - break; - - case ACTION_MOVE: - SDL_SendTouchMotion(touchDeviceId, fingerId, window, x, y, p); - break; - - case ACTION_UP: - case ACTION_POINTER_UP: - SDL_SendTouch(touchDeviceId, fingerId, window, SDL_FALSE, x, y, p); - break; - - default: - break; + case ACTION_DOWN: + case ACTION_POINTER_DOWN: + SDL_SendTouch(touchDeviceId, fingerId, window, SDL_TRUE, x, y, p); + break; + + case ACTION_MOVE: + SDL_SendTouchMotion(touchDeviceId, fingerId, window, x, y, p); + break; + + case ACTION_UP: + case ACTION_POINTER_UP: + SDL_SendTouch(touchDeviceId, fingerId, window, SDL_FALSE, x, y, p); + break; + + default: + break; } } diff --git a/modules/SDL2/src/video/android/SDL_androidvideo.c b/modules/SDL2/src/video/android/SDL_androidvideo.c index a0170f1..714fa45 100644 --- a/modules/SDL2/src/video/android/SDL_androidvideo.c +++ b/modules/SDL2/src/video/android/SDL_androidvideo.c @@ -54,51 +54,47 @@ int Android_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float * #define Android_GLES_UnloadLibrary SDL_EGL_UnloadLibrary #define Android_GLES_SetSwapInterval SDL_EGL_SetSwapInterval #define Android_GLES_GetSwapInterval SDL_EGL_GetSwapInterval -#define Android_GLES_DeleteContext SDL_EGL_DeleteContext +#define Android_GLES_DeleteContext SDL_EGL_DeleteContext /* Android driver bootstrap functions */ - /* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */ -int Android_SurfaceWidth = 0; -int Android_SurfaceHeight = 0; -static int Android_DeviceWidth = 0; -static int Android_DeviceHeight = 0; +int Android_SurfaceWidth = 0; +int Android_SurfaceHeight = 0; +static int Android_DeviceWidth = 0; +static int Android_DeviceHeight = 0; static Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_RGB565; /* Default SurfaceView format, in case this is queried before being filled */ -static int Android_ScreenRate = 0; -SDL_sem *Android_PauseSem = NULL; -SDL_sem *Android_ResumeSem = NULL; -SDL_mutex *Android_ActivityMutex = NULL; +static int Android_ScreenRate = 0; +SDL_sem *Android_PauseSem = NULL; +SDL_sem *Android_ResumeSem = NULL; +SDL_mutex *Android_ActivityMutex = NULL; -static void -Android_SuspendScreenSaver(_THIS) +static void Android_SuspendScreenSaver(_THIS) { Android_JNI_SuspendScreenSaver(_this->suspend_screensaver); } -static void -Android_DeleteDevice(SDL_VideoDevice *device) +static void Android_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device->driverdata); SDL_free(device); } -static SDL_VideoDevice * -Android_CreateDevice(void) +static SDL_VideoDevice *Android_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *data; SDL_bool block_on_pause; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); return NULL; } - data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (!data) { + data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); + if (data == NULL) { SDL_OutOfMemory(); SDL_free(device); return NULL; @@ -173,24 +169,22 @@ VideoBootStrap Android_bootstrap = { Android_CreateDevice }; - -int -Android_VideoInit(_THIS) +int Android_VideoInit(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; int display_index; SDL_VideoDisplay *display; SDL_DisplayMode mode; - videodata->isPaused = SDL_FALSE; + videodata->isPaused = SDL_FALSE; videodata->isPausing = SDL_FALSE; videodata->pauseAudio = SDL_GetHintBoolean(SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO, SDL_TRUE); - mode.format = Android_ScreenFormat; - mode.w = Android_DeviceWidth; - mode.h = Android_DeviceHeight; - mode.refresh_rate = Android_ScreenRate; - mode.driverdata = NULL; + mode.format = Android_ScreenFormat; + mode.w = Android_DeviceWidth; + mode.h = Android_DeviceHeight; + mode.refresh_rate = Android_ScreenRate; + mode.driverdata = NULL; display_index = SDL_AddBasicVideoDisplay(&mode); if (display_index < 0) { @@ -209,33 +203,30 @@ Android_VideoInit(_THIS) return 0; } -void -Android_VideoQuit(_THIS) +void Android_VideoQuit(_THIS) { Android_QuitMouse(); Android_QuitTouch(); } -int -Android_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi) +int Android_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi) { return Android_JNI_GetDisplayDPI(ddpi, hdpi, vdpi); } -void -Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, float rate) +void Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, float rate) { - Android_SurfaceWidth = surfaceWidth; + Android_SurfaceWidth = surfaceWidth; Android_SurfaceHeight = surfaceHeight; - Android_DeviceWidth = deviceWidth; - Android_DeviceHeight = deviceHeight; - Android_ScreenRate = (int)rate; + Android_DeviceWidth = deviceWidth; + Android_DeviceHeight = deviceHeight; + Android_ScreenRate = (int)rate; } -static -Uint32 format_to_pixelFormat(int format) { +static Uint32 format_to_pixelFormat(int format) +{ Uint32 pf; - if (format == AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM) { /* 1 */ + if (format == AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM) { /* 1 */ pf = SDL_PIXELFORMAT_RGBA8888; } else if (format == AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM) { /* 2 */ pf = SDL_PIXELFORMAT_RGBX8888; @@ -258,8 +249,7 @@ Uint32 format_to_pixelFormat(int format) { return pf; } -void -Android_SetFormat(int format_wanted, int format_got) +void Android_SetFormat(int format_wanted, int format_got) { Uint32 pf_wanted; Uint32 pf_got; @@ -283,24 +273,23 @@ void Android_SendResize(SDL_Window *window) which can happen after VideoInit(). */ SDL_VideoDevice *device = SDL_GetVideoDevice(); - if (device && device->num_displays > 0) - { - SDL_VideoDisplay *display = &device->displays[0]; - display->desktop_mode.format = Android_ScreenFormat; - display->desktop_mode.w = Android_DeviceWidth; - display->desktop_mode.h = Android_DeviceHeight; + if (device && device->num_displays > 0) { + SDL_VideoDisplay *display = &device->displays[0]; + display->desktop_mode.format = Android_ScreenFormat; + display->desktop_mode.w = Android_DeviceWidth; + display->desktop_mode.h = Android_DeviceHeight; display->desktop_mode.refresh_rate = Android_ScreenRate; } if (window) { /* Force the current mode to match the resize otherwise the SDL_WINDOWEVENT_RESTORED event * will fall back to the old mode */ - SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); - display->display_modes[0].format = Android_ScreenFormat; - display->display_modes[0].w = Android_DeviceWidth; - display->display_modes[0].h = Android_DeviceHeight; + SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + display->display_modes[0].format = Android_ScreenFormat; + display->display_modes[0].w = Android_DeviceWidth; + display->display_modes[0].h = Android_DeviceHeight; display->display_modes[0].refresh_rate = Android_ScreenRate; - display->current_mode = display->display_modes[0]; + display->current_mode = display->display_modes[0]; SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, Android_SurfaceWidth, Android_SurfaceHeight); } diff --git a/modules/SDL2/src/video/android/SDL_androidvideo.h b/modules/SDL2/src/video/android/SDL_androidvideo.h index ae5aaa5..41194b4 100644 --- a/modules/SDL2/src/video/android/SDL_androidvideo.h +++ b/modules/SDL2/src/video/android/SDL_androidvideo.h @@ -37,9 +37,9 @@ extern void Android_SendResize(SDL_Window *window); typedef struct SDL_VideoData { SDL_Rect textRect; - int isPaused; - int isPausing; - int pauseAudio; + int isPaused; + int isPausing; + int pauseAudio; } SDL_VideoData; extern int Android_SurfaceWidth; diff --git a/modules/SDL2/src/video/android/SDL_androidvulkan.c b/modules/SDL2/src/video/android/SDL_androidvulkan.c index 5ad7438..088d85e 100644 --- a/modules/SDL2/src/video/android/SDL_androidvulkan.c +++ b/modules/SDL2/src/video/android/SDL_androidvulkan.c @@ -42,53 +42,55 @@ int Android_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasSurfaceExtension = SDL_FALSE; SDL_bool hasAndroidSurfaceExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan loader library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) + } + if (path == NULL) { path = "libvulkan.so"; + } _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasAndroidSurfaceExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else if(!hasAndroidSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "extension"); + } else if (!hasAndroidSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "extension"); goto fail; } return 0; @@ -101,54 +103,50 @@ fail: void Android_Vulkan_UnloadLibrary(_THIS) { - if(_this->vulkan_config.loader_handle) - { + if (_this->vulkan_config.loader_handle) { SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } } SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names) + SDL_Window *window, + unsigned *count, + const char **names) { static const char *const extensionsForAndroid[] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_ANDROID_SURFACE_EXTENSION_NAME }; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } return SDL_Vulkan_GetInstanceExtensions_Helper( - count, names, SDL_arraysize(extensionsForAndroid), - extensionsForAndroid); + count, names, SDL_arraysize(extensionsForAndroid), + extensionsForAndroid); } SDL_bool Android_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface) + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface) { SDL_WindowData *windowData = (SDL_WindowData *)window->driverdata; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr; PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)vkGetInstanceProcAddr( - instance, - "vkCreateAndroidSurfaceKHR"); + instance, + "vkCreateAndroidSurfaceKHR"); VkAndroidSurfaceCreateInfoKHR createInfo; VkResult result; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } - if(!vkCreateAndroidSurfaceKHR) - { + if (!vkCreateAndroidSurfaceKHR) { SDL_SetError(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); return SDL_FALSE; @@ -160,8 +158,7 @@ SDL_bool Android_Vulkan_CreateSurface(_THIS, createInfo.window = windowData->native_window; result = vkCreateAndroidSurfaceKHR(instance, &createInfo, NULL, surface); - if(result != VK_SUCCESS) - { + if (result != VK_SUCCESS) { SDL_SetError("vkCreateAndroidSurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result)); return SDL_FALSE; diff --git a/modules/SDL2/src/video/android/SDL_androidvulkan.h b/modules/SDL2/src/video/android/SDL_androidvulkan.h index 4b6812c..5e39d93 100644 --- a/modules/SDL2/src/video/android/SDL_androidvulkan.h +++ b/modules/SDL2/src/video/android/SDL_androidvulkan.h @@ -37,13 +37,13 @@ int Android_Vulkan_LoadLibrary(_THIS, const char *path); void Android_Vulkan_UnloadLibrary(_THIS); SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names); + SDL_Window *window, + unsigned *count, + const char **names); SDL_bool Android_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface); + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface); #endif diff --git a/modules/SDL2/src/video/android/SDL_androidwindow.c b/modules/SDL2/src/video/android/SDL_androidwindow.c index b281119..9b35739 100644 --- a/modules/SDL2/src/video/android/SDL_androidwindow.c +++ b/modules/SDL2/src/video/android/SDL_androidwindow.c @@ -36,8 +36,7 @@ /* Currently only one window */ SDL_Window *Android_Window = NULL; -int -Android_CreateWindow(_THIS, SDL_Window * window) +int Android_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *data; int retval = 0; @@ -59,14 +58,14 @@ Android_CreateWindow(_THIS, SDL_Window * window) window->h = Android_SurfaceHeight; window->flags &= ~SDL_WINDOW_HIDDEN; - window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */ + window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */ /* One window, it always has focus */ SDL_SetMouseFocus(window); SDL_SetKeyboardFocus(window); - data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (SDL_WindowData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { retval = SDL_OutOfMemory(); goto endfunction; } @@ -82,8 +81,8 @@ Android_CreateWindow(_THIS, SDL_Window * window) /* Do not create EGLSurface for Vulkan window since it will then make the window incompatible with vkCreateAndroidSurfaceKHR */ #if SDL_VIDEO_OPENGL_EGL - if ((window->flags & SDL_WINDOW_OPENGL) != 0) { - data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->native_window); + if (window->flags & SDL_WINDOW_OPENGL) { + data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)data->native_window); if (data->egl_surface == EGL_NO_SURFACE) { ANativeWindow_release(data->native_window); @@ -104,14 +103,12 @@ endfunction: return retval; } -void -Android_SetWindowTitle(_THIS, SDL_Window *window) +void Android_SetWindowTitle(_THIS, SDL_Window *window) { Android_JNI_SetActivityTitle(window->title); } -void -Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) +void Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) { SDL_LockMutex(Android_ActivityMutex); @@ -135,7 +132,7 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display } data = (SDL_WindowData *)window->driverdata; - if (!data || !data->native_window) { + if (data == NULL || !data->native_window) { if (data && !data->native_window) { SDL_SetError("Missing native window"); } @@ -162,8 +159,7 @@ endfunction: SDL_UnlockMutex(Android_ActivityMutex); } -void -Android_MinimizeWindow(_THIS, SDL_Window *window) +void Android_MinimizeWindow(_THIS, SDL_Window *window) { Android_JNI_MinizeWindow(); } @@ -174,8 +170,7 @@ void Android_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable) Android_JNI_SetOrientation(window->w, window->h, window->flags & SDL_WINDOW_RESIZABLE, SDL_GetHint(SDL_HINT_ORIENTATIONS)); } -void -Android_DestroyWindow(_THIS, SDL_Window *window) +void Android_DestroyWindow(_THIS, SDL_Window *window) { SDL_LockMutex(Android_ActivityMutex); @@ -183,7 +178,7 @@ Android_DestroyWindow(_THIS, SDL_Window *window) Android_Window = NULL; if (window->driverdata) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; #if SDL_VIDEO_OPENGL_EGL if (data->egl_surface != EGL_NO_SURFACE) { @@ -202,10 +197,9 @@ Android_DestroyWindow(_THIS, SDL_Window *window) SDL_UnlockMutex(Android_ActivityMutex); } -SDL_bool -Android_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info) +SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; if (info->version.major == SDL_MAJOR_VERSION) { info->subsystem = SDL_SYSWM_ANDROID; diff --git a/modules/SDL2/src/video/android/SDL_androidwindow.h b/modules/SDL2/src/video/android/SDL_androidwindow.h index b089db7..1d52936 100644 --- a/modules/SDL2/src/video/android/SDL_androidwindow.h +++ b/modules/SDL2/src/video/android/SDL_androidwindow.h @@ -42,9 +42,9 @@ typedef struct EGLSurface egl_surface; EGLContext egl_context; /* We use this to preserve the context when losing focus */ #endif - SDL_bool backup_done; + SDL_bool backup_done; ANativeWindow *native_window; - + } SDL_WindowData; #endif /* SDL_androidwindow_h_ */ diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoaclipboard.m b/modules/SDL2/src/video/cocoa/SDL_cocoaclipboard.m index ca50bd7..c64f2e4 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoaclipboard.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoaclipboard.m @@ -25,8 +25,7 @@ #include "SDL_cocoavideo.h" #include "../../events/SDL_clipboardevents_c.h" -int -Cocoa_SetClipboardText(_THIS, const char *text) +int Cocoa_SetClipboardText(_THIS, const char *text) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -44,8 +43,7 @@ Cocoa_SetClipboardText(_THIS, const char *text) return 0; }} -char * -Cocoa_GetClipboardText(_THIS) +char *Cocoa_GetClipboardText(_THIS) { @autoreleasepool { NSPasteboard *pasteboard; @@ -73,8 +71,7 @@ Cocoa_GetClipboardText(_THIS) return text; }} -SDL_bool -Cocoa_HasClipboardText(_THIS) +SDL_bool Cocoa_HasClipboardText(_THIS) { SDL_bool result = SDL_FALSE; char *text = Cocoa_GetClipboardText(_this); @@ -85,8 +82,7 @@ Cocoa_HasClipboardText(_THIS) return result; } -void -Cocoa_CheckClipboardUpdate(SDL_VideoData * data) +void Cocoa_CheckClipboardUpdate(SDL_VideoData * data) { @autoreleasepool { NSPasteboard *pasteboard; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoaevents.m b/modules/SDL2/src/video/cocoa/SDL_cocoaevents.m index 40adb0a..99db10c 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoaevents.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoaevents.m @@ -46,8 +46,9 @@ static SDL_Window *FindSDLWindowForNSWindow(NSWindow *win) if (device && device->windows) { for (sdlwindow = device->windows; sdlwindow; sdlwindow = sdlwindow->next) { NSWindow *nswindow = ((__bridge SDL_WindowData *) sdlwindow->driverdata).nswindow; - if (win == nswindow) + if (win == nswindow) { return sdlwindow; + } } } @@ -192,8 +193,9 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent) } /* Don't do anything if this was not an SDL window that was closed */ - if (FindSDLWindowForNSWindow(win) == NULL) + if (FindSDLWindowForNSWindow(win) == NULL) { return; + } /* HACK: Make the next window in the z-order key when the key window is * closed. The custom event loop and/or windowing code we have seems to @@ -312,8 +314,7 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent) static SDLAppDelegate *appDelegate = nil; -static NSString * -GetApplicationName(void) +static NSString *GetApplicationName(void) { NSString *appName; @@ -330,8 +331,7 @@ GetApplicationName(void) return appName; } -static bool -LoadMainMenuNibIfAvailable(void) +static bool LoadMainMenuNibIfAvailable(void) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 NSDictionary *infoDict; @@ -344,20 +344,19 @@ LoadMainMenuNibIfAvailable(void) infoDict = [[NSBundle mainBundle] infoDictionary]; if (infoDict) { mainNibFileName = [infoDict valueForKey:@"NSMainNibFile"]; - + if (mainNibFileName) { success = [[NSBundle mainBundle] loadNibNamed:mainNibFileName owner:[NSApplication sharedApplication] topLevelObjects:nil]; } } - + return success; #else return false; #endif } -static void -CreateApplicationMenus(void) +static void CreateApplicationMenus(void) { NSString *appName; NSString *title; @@ -370,7 +369,7 @@ CreateApplicationMenus(void) if (NSApp == nil) { return; } - + mainMenu = [[NSMenu alloc] init]; /* Create the main menu bar */ @@ -391,7 +390,7 @@ CreateApplicationMenus(void) [appleMenu addItem:[NSMenuItem separatorItem]]; serviceMenu = [[NSMenu alloc] initWithTitle:@""]; - menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Services" action:nil keyEquivalent:@""]; + menuItem = [appleMenu addItemWithTitle:@"Services" action:nil keyEquivalent:@""]; [menuItem setSubmenu:serviceMenu]; [NSApp setServicesMenu:serviceMenu]; @@ -428,7 +427,7 @@ CreateApplicationMenus(void) [windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; - + /* Add the fullscreen toggle menu option. */ /* Cocoa should update the title to Enter or Exit Full Screen automatically. * But if not, then just fallback to Toggle Full Screen. @@ -446,8 +445,7 @@ CreateApplicationMenus(void) [NSApp setWindowsMenu:windowMenu]; } -void -Cocoa_RegisterApp(void) +void Cocoa_RegisterApp(void) { @autoreleasepool { /* This can get called more than once! Be careful what you initialize! */ @@ -468,7 +466,7 @@ Cocoa_RegisterApp(void) */ if ([NSApp mainMenu] == nil) { bool nibLoaded; - + nibLoaded = LoadMainMenuNibIfAvailable(); if (!nibLoaded) { CreateApplicationMenus(); @@ -505,8 +503,7 @@ Cocoa_RegisterApp(void) } }} -int -Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate) +int Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate) { for ( ; ; ) { NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:expiration inMode:NSDefaultRunLoopMode dequeue:YES ]; @@ -527,8 +524,7 @@ Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate) return 1; } -int -Cocoa_WaitEventTimeout(_THIS, int timeout) +int Cocoa_WaitEventTimeout(_THIS, int timeout) { @autoreleasepool { if (timeout > 0) { @@ -543,8 +539,7 @@ Cocoa_WaitEventTimeout(_THIS, int timeout) return 1; }} -void -Cocoa_PumpEvents(_THIS) +void Cocoa_PumpEvents(_THIS) { @autoreleasepool { Cocoa_PumpEventsUntilDate(_this, [NSDate distantPast], true); @@ -566,8 +561,7 @@ void Cocoa_SendWakeupEvent(_THIS, SDL_Window *window) [NSApp postEvent: event atStart: YES]; }} -void -Cocoa_SuspendScreenSaver(_THIS) +void Cocoa_SuspendScreenSaver(_THIS) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *)_this->driverdata; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoakeyboard.m b/modules/SDL2/src/video/cocoa/SDL_cocoakeyboard.m index e7f09c6..08ee18d 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoakeyboard.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoakeyboard.m @@ -182,53 +182,61 @@ @end -static void -HandleModifiers(_THIS, unsigned short scancode, unsigned int modifierFlags) +static bool IsModifierKeyPressed(unsigned int flags, + unsigned int target_mask, + unsigned int other_mask, + unsigned int either_mask) { - SDL_Scancode code = darwin_scancode_table[scancode]; - - const SDL_Scancode codes[] = { - SDL_SCANCODE_LSHIFT, - SDL_SCANCODE_LCTRL, - SDL_SCANCODE_LALT, - SDL_SCANCODE_LGUI, - SDL_SCANCODE_RSHIFT, - SDL_SCANCODE_RCTRL, - SDL_SCANCODE_RALT, - SDL_SCANCODE_RGUI, - SDL_SCANCODE_LSHIFT, - SDL_SCANCODE_LCTRL, - SDL_SCANCODE_LALT, - SDL_SCANCODE_LGUI, }; - - const unsigned int modifiers[] = { - NX_DEVICELSHIFTKEYMASK, - NX_DEVICELCTLKEYMASK, - NX_DEVICELALTKEYMASK, - NX_DEVICELCMDKEYMASK, - NX_DEVICERSHIFTKEYMASK, - NX_DEVICERCTLKEYMASK, - NX_DEVICERALTKEYMASK, - NX_DEVICERCMDKEYMASK, - NX_SHIFTMASK, - NX_CONTROLMASK, - NX_ALTERNATEMASK, - NX_COMMANDMASK }; - - for (int i = 0; i < 12; i++) - { - if (code == codes[i]) - { - if (modifierFlags & modifiers[i]) - SDL_SendKeyboardKey(SDL_PRESSED, code); - else - SDL_SendKeyboardKey(SDL_RELEASED, code); - } + bool target_pressed = (flags & target_mask) != 0; + bool other_pressed = (flags & other_mask) != 0; + bool either_pressed = (flags & either_mask) != 0; + + if (either_pressed != (target_pressed || other_pressed)) + return either_pressed; + + return target_pressed; +} + +static void HandleModifiers(_THIS, SDL_Scancode code, unsigned int modifierFlags) +{ + bool pressed = false; + + if (code == SDL_SCANCODE_LSHIFT) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICELSHIFTKEYMASK, + NX_DEVICERSHIFTKEYMASK, NX_SHIFTMASK); + } else if (code == SDL_SCANCODE_LCTRL) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICELCTLKEYMASK, + NX_DEVICERCTLKEYMASK, NX_CONTROLMASK); + } else if (code == SDL_SCANCODE_LALT) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICELALTKEYMASK, + NX_DEVICERALTKEYMASK, NX_ALTERNATEMASK); + } else if (code == SDL_SCANCODE_LGUI) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICELCMDKEYMASK, + NX_DEVICERCMDKEYMASK, NX_COMMANDMASK); + } else if (code == SDL_SCANCODE_RSHIFT) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICERSHIFTKEYMASK, + NX_DEVICELSHIFTKEYMASK, NX_SHIFTMASK); + } else if (code == SDL_SCANCODE_RCTRL) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICERCTLKEYMASK, + NX_DEVICELCTLKEYMASK, NX_CONTROLMASK); + } else if (code == SDL_SCANCODE_RALT) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICERALTKEYMASK, + NX_DEVICELALTKEYMASK, NX_ALTERNATEMASK); + } else if (code == SDL_SCANCODE_RGUI) { + pressed = IsModifierKeyPressed(modifierFlags, NX_DEVICERCMDKEYMASK, + NX_DEVICELCMDKEYMASK, NX_COMMANDMASK); + } else { + return; + } + + if (pressed) { + SDL_SendKeyboardKey(SDL_PRESSED, code); + } else { + SDL_SendKeyboardKey(SDL_RELEASED, code); } } -static void -UpdateKeymap(SDL_VideoData *data, SDL_bool send_event) +static void UpdateKeymap(SDL_VideoData *data, SDL_bool send_event) { TISInputSourceRef key_layout; const void *chr_data; @@ -270,6 +278,17 @@ UpdateKeymap(SDL_VideoData *data, SDL_bool send_event) continue; } + /* + * Swap the scancode for these two wrongly translated keys + * UCKeyTranslate() function does not do its job properly for ISO layout keyboards, where the key '@', + * which is located in the top left corner of the keyboard right under the Escape key, and the additional + * key '<', which is on the right of the Shift key, are inverted + */ + if ((scancode == SDL_SCANCODE_NONUSBACKSLASH || scancode == SDL_SCANCODE_GRAVE) && KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) { + /* see comments in scancodes_darwin.h */ + scancode = (SDL_Scancode)((SDL_SCANCODE_NONUSBACKSLASH + SDL_SCANCODE_GRAVE) - scancode); + } + dead_key_state = 0; err = UCKeyTranslate ((UCKeyboardLayout *) chr_data, i, kUCKeyActionDown, @@ -292,8 +311,7 @@ cleanup: CFRelease(key_layout); } -void -Cocoa_InitKeyboard(_THIS) +void Cocoa_InitKeyboard(_THIS) { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -308,11 +326,10 @@ Cocoa_InitKeyboard(_THIS) SDL_SetScancodeName(SDL_SCANCODE_RGUI, "Right Command"); data.modifierFlags = (unsigned int)[NSEvent modifierFlags]; - SDL_ToggleModState(KMOD_CAPS, (data.modifierFlags & NSEventModifierFlagCapsLock) != 0); + SDL_ToggleModState(KMOD_CAPS, (data.modifierFlags & NSEventModifierFlagCapsLock) ? SDL_TRUE : SDL_FALSE); } -void -Cocoa_StartTextInput(_THIS) +void Cocoa_StartTextInput(_THIS) { @autoreleasepool { NSView *parentView; @@ -343,8 +360,7 @@ Cocoa_StartTextInput(_THIS) } }} -void -Cocoa_StopTextInput(_THIS) +void Cocoa_StopTextInput(_THIS) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -355,8 +371,7 @@ Cocoa_StopTextInput(_THIS) } }} -void -Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect) +void Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect) { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -368,8 +383,7 @@ Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect) [data.fieldEdit setInputRect:rect]; } -void -Cocoa_HandleKeyEvent(_THIS, NSEvent *event) +void Cocoa_HandleKeyEvent(_THIS, NSEvent *event) { unsigned short scancode; SDL_Scancode code; @@ -384,7 +398,7 @@ Cocoa_HandleKeyEvent(_THIS, NSEvent *event) #endif if ((scancode == 10 || scancode == 50) && KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) { - /* see comments in SDL_cocoakeys.h */ + /* see comments in scancodes_darwin.h */ scancode = 60 - scancode; } @@ -424,15 +438,14 @@ Cocoa_HandleKeyEvent(_THIS, NSEvent *event) SDL_SendKeyboardKey(SDL_RELEASED, code); break; case NSEventTypeFlagsChanged: - HandleModifiers(_this, scancode, (unsigned int)[event modifierFlags]); + HandleModifiers(_this, code, (unsigned int)[event modifierFlags]); break; default: /* just to avoid compiler warnings */ break; } } -void -Cocoa_QuitKeyboard(_THIS) +void Cocoa_QuitKeyboard(_THIS) { } @@ -445,8 +458,7 @@ typedef enum { extern CGSConnection _CGSDefaultConnection(void); extern CGError CGSSetGlobalHotKeyOperatingMode(CGSConnection connection, CGSGlobalHotKeyOperatingMode mode); -void -Cocoa_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void Cocoa_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { #if SDL_MAC_NO_SANDBOX CGSSetGlobalHotKeyOperatingMode(_CGSDefaultConnection(), grabbed ? CGSGlobalHotKeyDisable : CGSGlobalHotKeyEnable); diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoamessagebox.m b/modules/SDL2/src/video/cocoa/SDL_cocoamessagebox.m index 2de717a..a8f29a9 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoamessagebox.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoamessagebox.m @@ -32,8 +32,7 @@ NSInteger clicked; NSWindow *nswindow; } -- (id) initWithParentWindow:(SDL_Window *)window; -- (void) alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; +- (id)initWithParentWindow:(SDL_Window *)window; @end @implementation SDLMessageBoxPresenter @@ -57,40 +56,20 @@ - (void)showAlert:(NSAlert*)alert { if (nswindow) { -#ifdef MAC_OS_X_VERSION_10_9 - if ([alert respondsToSelector:@selector(beginSheetModalForWindow:completionHandler:)]) { - [alert beginSheetModalForWindow:nswindow completionHandler:^(NSModalResponse returnCode) { - self->clicked = returnCode; - }]; - } else -#endif - { -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 - [alert beginSheetModalForWindow:nswindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; -#endif - } - - while (clicked < 0) { - SDL_PumpEvents(); - SDL_Delay(100); - } - + [alert beginSheetModalForWindow:nswindow + completionHandler:^(NSModalResponse returnCode) { + [NSApp stopModalWithCode:returnCode]; + }]; + clicked = [NSApp runModalForWindow:nswindow]; nswindow = nil; } else { clicked = [alert runModal]; } } - -- (void) alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo -{ - clicked = returnCode; -} - @end -static void -Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue) +static void Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue) { NSAlert* alert; const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons; @@ -150,8 +129,7 @@ Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid } /* Display a Cocoa message box */ -int -Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { @autoreleasepool { __block int returnValue = 0; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoametalview.m b/modules/SDL2/src/video/cocoa/SDL_cocoametalview.m index 0089a72..fab4652 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoametalview.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoametalview.m @@ -81,7 +81,8 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event) highDPI:(BOOL)highDPI windowID:(Uint32)windowID; { - if ((self = [super initWithFrame:frame])) { + self = [super initWithFrame:frame]; + if (self != nil) { self.highDPI = highDPI; self.sdlWindowID = windowID; self.wantsLayer = YES; @@ -93,7 +94,7 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event) [self updateDrawableSize]; } - + return self; } @@ -130,8 +131,7 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event) @end -SDL_MetalView -Cocoa_Metal_CreateView(_THIS, SDL_Window * window) +SDL_MetalView Cocoa_Metal_CreateView(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData* data = (__bridge SDL_WindowData *)window->driverdata; NSView *view = data.nswindow.contentView; @@ -144,32 +144,33 @@ Cocoa_Metal_CreateView(_THIS, SDL_Window * window) highDPI:highDPI windowID:windowID]; if (newview == nil) { + SDL_OutOfMemory(); return NULL; } [view addSubview:newview]; + /* Make sure the drawable size is up to date after attaching the view. */ + [newview updateDrawableSize]; + metalview = (SDL_MetalView)CFBridgingRetain(newview); return metalview; }} -void -Cocoa_Metal_DestroyView(_THIS, SDL_MetalView view) +void Cocoa_Metal_DestroyView(_THIS, SDL_MetalView view) { @autoreleasepool { SDL_cocoametalview *metalview = CFBridgingRelease(view); [metalview removeFromSuperview]; }} -void * -Cocoa_Metal_GetLayer(_THIS, SDL_MetalView view) +void *Cocoa_Metal_GetLayer(_THIS, SDL_MetalView view) { @autoreleasepool { SDL_cocoametalview *cocoaview = (__bridge SDL_cocoametalview *)view; return (__bridge void *)cocoaview.layer; }} -void -Cocoa_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) +void Cocoa_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata; NSView *contentView = data.sdlContentView; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoamodes.m b/modules/SDL2/src/video/cocoa/SDL_cocoamodes.m index 7f36625..0517302 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoamodes.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoamodes.m @@ -42,8 +42,7 @@ #endif -static int -CG_SetError(const char *prefix, CGDisplayErr result) +static int CG_SetError(const char *prefix, CGDisplayErr result) { const char *error; @@ -85,8 +84,7 @@ CG_SetError(const char *prefix, CGDisplayErr result) return SDL_SetError("%s: %s", prefix, error); } -static int -GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link) +static int GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link) { int refreshRate = (int) (CGDisplayModeGetRefreshRate(vidmode) + 0.5); @@ -101,8 +99,7 @@ GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link) return refreshRate; } -static SDL_bool -HasValidDisplayModeFlags(CGDisplayModeRef vidmode) +static SDL_bool HasValidDisplayModeFlags(CGDisplayModeRef vidmode) { uint32_t ioflags = CGDisplayModeGetIOFlags(vidmode); @@ -119,8 +116,7 @@ HasValidDisplayModeFlags(CGDisplayModeRef vidmode) return SDL_TRUE; } -static Uint32 -GetDisplayModePixelFormat(CGDisplayModeRef vidmode) +static Uint32 GetDisplayModePixelFormat(CGDisplayModeRef vidmode) { /* This API is deprecated in 10.11 with no good replacement (as of 10.15). */ CFStringRef fmt = CGDisplayModeCopyPixelEncoding(vidmode); @@ -144,8 +140,7 @@ GetDisplayModePixelFormat(CGDisplayModeRef vidmode) return pixelformat; } -static SDL_bool -GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArrayRef modelist, CVDisplayLinkRef link, SDL_DisplayMode *mode) +static SDL_bool GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArrayRef modelist, CVDisplayLinkRef link, SDL_DisplayMode *mode) { SDL_DisplayModeData *data; bool usableForGUI = CGDisplayModeIsUsableForDesktopGUI(vidmode); @@ -283,8 +278,7 @@ GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArray return SDL_TRUE; } -static const char * -Cocoa_GetDisplayName(CGDirectDisplayID displayID) +static const char *Cocoa_GetDisplayName(CGDirectDisplayID displayID) { /* This API is deprecated in 10.9 with no good replacement (as of 10.15). */ io_service_t servicePort = CGDisplayIOServicePort(displayID); @@ -299,8 +293,7 @@ Cocoa_GetDisplayName(CGDirectDisplayID displayID) return displayName; } -void -Cocoa_InitModes(_THIS) +void Cocoa_InitModes(_THIS) { @autoreleasepool { CGDisplayErr result; @@ -384,8 +377,7 @@ Cocoa_InitModes(_THIS) SDL_small_free(displays, isstack); }} -int -Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +int Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) { SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; CGRect cgrect; @@ -398,8 +390,7 @@ Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) return 0; } -int -Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +int Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) { SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; const CGDirectDisplayID cgdisplay = displaydata->display; @@ -431,8 +422,7 @@ Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) return 0; } -int -Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi) +int Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi) { @autoreleasepool { const float MM_IN_INCH = 25.4f; @@ -445,7 +435,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp NSSize displayNativeSize; displayNativeSize.width = (int) CGDisplayPixelsWide(data->display); displayNativeSize.height = (int) CGDisplayPixelsHigh(data->display); - + for (NSScreen *screen in screens) { const CGDirectDisplayID dpyid = (const CGDirectDisplayID ) [[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; if (dpyid == data->display) { @@ -462,7 +452,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp CGFloat width = CGDisplayModeGetPixelWidth(m); CGFloat height = CGDisplayModeGetPixelHeight(m); CGFloat HiDPIWidth = CGDisplayModeGetWidth(m); - + //Only check 1x mode if(width == HiDPIWidth) { if (CGDisplayModeGetIOFlags(m) & kDisplayModeNativeFlag) { @@ -470,7 +460,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp displayNativeSize.height = height; break; } - + //Get the largest size even if kDisplayModeNativeFlag is not present e.g. iMac 27-Inch with 5K Retina if(width > displayNativeSize.width) { displayNativeSize.width = width; @@ -510,8 +500,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp return 0; }} -void -Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display) { SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; CVDisplayLinkRef link = NULL; @@ -591,8 +580,7 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display) CVDisplayLinkRelease(link); } -static CGError -SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data) +static CGError SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data) { /* SDL_DisplayModeData can contain multiple CGDisplayModes to try (with * identical properties), some of which might not work. See GetDisplayMode. @@ -610,8 +598,7 @@ SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data) return result; } -int -Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; @@ -676,8 +663,7 @@ ERR_NO_CAPTURE: return -1; } -void -Cocoa_QuitModes(_THIS) +void Cocoa_QuitModes(_THIS) { int i, j; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoamouse.h b/modules/SDL2/src/video/cocoa/SDL_cocoamouse.h index aeeb14d..b85ce1c 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoamouse.h +++ b/modules/SDL2/src/video/cocoa/SDL_cocoamouse.h @@ -40,6 +40,8 @@ typedef struct { /* What location we last saw the cursor move to. */ CGFloat lastMoveX; CGFloat lastMoveY; + /* If we just turned on relative mode, and should skip a single mouse motion event. */ + SDL_bool justEnabledRelative; } SDL_MouseData; @interface NSCursor (InvisibleCursor) diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoamouse.m b/modules/SDL2/src/video/cocoa/SDL_cocoamouse.m index a7f59a0..e85e16c 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoamouse.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoamouse.m @@ -63,8 +63,7 @@ @end -static SDL_Cursor * -Cocoa_CreateDefaultCursor() +static SDL_Cursor *Cocoa_CreateDefaultCursor() { @autoreleasepool { NSCursor *nscursor; @@ -82,8 +81,7 @@ Cocoa_CreateDefaultCursor() return cursor; }} -static SDL_Cursor * -Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) { @autoreleasepool { NSImage *nsimage; @@ -108,8 +106,7 @@ Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) /* there are .pdf files of some of the cursors we need, installed by default on macOS, but not available through NSCursor. If we can load them ourselves, use them, otherwise fallback to something standard but not super-great. Since these are under /System, they should be available even to sandboxed apps. */ -static NSCursor * -LoadHiddenSystemCursor(NSString *cursorName, SEL fallback) +static NSCursor *LoadHiddenSystemCursor(NSString *cursorName, SEL fallback) { NSString *cursorPath = [@"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors" stringByAppendingPathComponent:cursorName]; NSDictionary *info = [NSDictionary dictionaryWithContentsOfFile:[cursorPath stringByAppendingPathComponent:@"info.plist"]]; @@ -146,8 +143,7 @@ LoadHiddenSystemCursor(NSString *cursorName, SEL fallback) return cursor; } -static SDL_Cursor * -Cocoa_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *Cocoa_CreateSystemCursor(SDL_SystemCursor id) { @autoreleasepool { NSCursor *nscursor = NULL; @@ -206,16 +202,14 @@ Cocoa_CreateSystemCursor(SDL_SystemCursor id) return cursor; }} -static void -Cocoa_FreeCursor(SDL_Cursor * cursor) +static void Cocoa_FreeCursor(SDL_Cursor * cursor) { @autoreleasepool { CFBridgingRelease(cursor->driverdata); SDL_free(cursor); }} -static int -Cocoa_ShowCursor(SDL_Cursor * cursor) +static int Cocoa_ShowCursor(SDL_Cursor * cursor) { @autoreleasepool { SDL_VideoDevice *device = SDL_GetVideoDevice(); @@ -231,8 +225,7 @@ Cocoa_ShowCursor(SDL_Cursor * cursor) return 0; }} -static SDL_Window * -SDL_FindWindowAtPoint(const int x, const int y) +static SDL_Window *SDL_FindWindowAtPoint(const int x, const int y) { const SDL_Point pt = { x, y }; SDL_Window *i; @@ -246,8 +239,7 @@ SDL_FindWindowAtPoint(const int x, const int y) return NULL; } -static int -Cocoa_WarpMouseGlobal(int x, int y) +static int Cocoa_WarpMouseGlobal(int x, int y) { CGPoint point; SDL_Mouse *mouse = SDL_GetMouse(); @@ -288,19 +280,26 @@ Cocoa_WarpMouseGlobal(int x, int y) return 0; } -static void -Cocoa_WarpMouse(SDL_Window * window, int x, int y) +static void Cocoa_WarpMouse(SDL_Window * window, int x, int y) { Cocoa_WarpMouseGlobal(window->x + x, window->y + y); } -static int -Cocoa_SetRelativeMouseMode(SDL_bool enabled) +static int Cocoa_SetRelativeMouseMode(SDL_bool enabled) { + SDL_Window *window = SDL_GetKeyboardFocus(); CGError result; - SDL_Window *window; SDL_WindowData *data; if (enabled) { + if (window) { + /* make sure the mouse isn't at the corner of the window, as this can confuse things if macOS thinks a window resize is happening on the first click. */ + SDL_MouseData *mousedriverdata = (SDL_MouseData*)SDL_GetMouse()->driverdata; + const CGPoint point = CGPointMake((float)(window->x + (window->w / 2)), (float)(window->y + (window->h / 2))); + if (mousedriverdata) { + mousedriverdata->justEnabledRelative = SDL_TRUE; + } + CGWarpMouseCursorPosition(point); + } DLog("Turning on."); result = CGAssociateMouseAndMouseCursorPosition(NO); } else { @@ -314,7 +313,6 @@ Cocoa_SetRelativeMouseMode(SDL_bool enabled) /* We will re-apply the non-relative mode when the window gets focus, if it * doesn't have focus right now. */ - window = SDL_GetKeyboardFocus(); if (!window) { return 0; } @@ -338,16 +336,14 @@ Cocoa_SetRelativeMouseMode(SDL_bool enabled) return 0; } -static int -Cocoa_CaptureMouse(SDL_Window *window) +static int Cocoa_CaptureMouse(SDL_Window *window) { /* our Cocoa event code already tracks the mouse outside the window, so all we have to do here is say "okay" and do what we always do. */ return 0; } -static Uint32 -Cocoa_GetGlobalMouseState(int *x, int *y) +static Uint32 Cocoa_GetGlobalMouseState(int *x, int *y) { const NSUInteger cocoaButtons = [NSEvent pressedMouseButtons]; const NSPoint cocoaLocation = [NSEvent mouseLocation]; @@ -365,8 +361,7 @@ Cocoa_GetGlobalMouseState(int *x, int *y) return retval; } -int -Cocoa_InitMouse(_THIS) +int Cocoa_InitMouse(_THIS) { NSPoint location; SDL_Mouse *mouse = SDL_GetMouse(); @@ -394,8 +389,7 @@ Cocoa_InitMouse(_THIS) return 0; } -static void -Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event) +static void Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event) { SDL_Window *window; NSWindow *nswindow = [event window]; @@ -428,8 +422,7 @@ Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event) } } -void -Cocoa_HandleMouseEvent(_THIS, NSEvent *event) +void Cocoa_HandleMouseEvent(_THIS, NSEvent *event) { SDL_Mouse *mouse; SDL_MouseData *driverdata; @@ -475,6 +468,11 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event) seenWarp = driverdata->seenWarp; driverdata->seenWarp = NO; + if (driverdata->justEnabledRelative) { + driverdata->justEnabledRelative = SDL_FALSE; + return; // dump the first event back. + } + location = [NSEvent mouseLocation]; lastMoveX = driverdata->lastMoveX; lastMoveY = driverdata->lastMoveY; @@ -508,8 +506,7 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event) SDL_SendMouseMotion(mouse->focus, mouseID, 1, (int)deltaX, (int)deltaY); } -void -Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event) +void Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event) { SDL_MouseID mouseID; SDL_MouseWheelDirection direction; @@ -546,8 +543,7 @@ Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event) SDL_SendMouseWheel(window, mouseID, x, y, direction); } -void -Cocoa_HandleMouseWarp(CGFloat x, CGFloat y) +void Cocoa_HandleMouseWarp(CGFloat x, CGFloat y) { /* This makes Cocoa_HandleMouseEvent ignore the delta caused by the warp, * since it gets included in the next movement event. @@ -560,8 +556,7 @@ Cocoa_HandleMouseWarp(CGFloat x, CGFloat y) DLog("(%g, %g)", x, y); } -void -Cocoa_QuitMouse(_THIS) +void Cocoa_QuitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); if (mouse) { diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.h b/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.h index d846d46..0bd549f 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.h +++ b/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.h @@ -58,7 +58,7 @@ struct SDL_GLDriverData - (void)setWindow:(SDL_Window *)window; - (SDL_Window*)window; - (void)explicitUpdate; -- (void)dealloc; +- (void)cleanup; @property (retain, nonatomic) NSOpenGLPixelFormat* openglPixelFormat; // macOS 10.10 has -[NSOpenGLContext pixelFormat] but this handles older OS releases. diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.m b/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.m index 266123a..0ac8e3e 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoaopengl.m @@ -62,8 +62,7 @@ SDL_OpenGLAsyncDispatchChanged(void *userdata, const char *name, const char *old SDL_opengl_async_dispatch = SDL_GetStringBoolean(hint, SDL_FALSE); } -static CVReturn -DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext) +static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext) { SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *) displayLinkContext; @@ -176,11 +175,10 @@ DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const } } } else { - [self clearDrawable]; - if (self == [NSOpenGLContext currentContext]) { - [self explicitUpdate]; + if ([NSThread isMainThread]) { + [self setView:nil]; } else { - [self scheduleUpdate]; + dispatch_sync(dispatch_get_main_queue(), ^{ [self setView:nil]; }); } } } @@ -203,25 +201,29 @@ DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const } } -- (void)dealloc +- (void)cleanup { + [self setWindow:NULL]; + SDL_DelHintCallback(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, SDL_OpenGLAsyncDispatchChanged, NULL); if (self->displayLink) { CVDisplayLinkRelease(self->displayLink); + self->displayLink = nil; } if (self->swapIntervalCond) { SDL_DestroyCond(self->swapIntervalCond); + self->swapIntervalCond = NULL; } if (self->swapIntervalMutex) { SDL_DestroyMutex(self->swapIntervalMutex); + self->swapIntervalMutex = NULL; } } @end -int -Cocoa_GL_LoadLibrary(_THIS, const char *path) +int Cocoa_GL_LoadLibrary(_THIS, const char *path) { /* Load the OpenGL library */ if (path == NULL) { @@ -239,21 +241,18 @@ Cocoa_GL_LoadLibrary(_THIS, const char *path) return 0; } -void * -Cocoa_GL_GetProcAddress(_THIS, const char *proc) +void *Cocoa_GL_GetProcAddress(_THIS, const char *proc) { return SDL_LoadFunction(_this->gl_config.dll_handle, proc); } -void -Cocoa_GL_UnloadLibrary(_THIS) +void Cocoa_GL_UnloadLibrary(_THIS) { SDL_UnloadObject(_this->gl_config.dll_handle); _this->gl_config.dll_handle = NULL; } -SDL_GLContext -Cocoa_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext Cocoa_GL_CreateContext(_THIS, SDL_Window * window) { @autoreleasepool { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -283,7 +282,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) _this->GL_GetSwapInterval = Cocoa_GLES_GetSwapInterval; _this->GL_SwapWindow = Cocoa_GLES_SwapWindow; _this->GL_DeleteContext = Cocoa_GLES_DeleteContext; - + if (Cocoa_GLES_LoadLibrary(_this, NULL) != 0) { return NULL; } @@ -380,8 +379,8 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) interval = 0; [context setValues:&interval forParameter:NSOpenGLCPSwapInterval]; - if ( Cocoa_GL_MakeCurrent(_this, window, (__bridge SDL_GLContext)context) < 0 ) { - Cocoa_GL_DeleteContext(_this, (__bridge SDL_GLContext)context); + if (Cocoa_GL_MakeCurrent(_this, window, sdlcontext) < 0) { + SDL_GL_DeleteContext(sdlcontext); SDL_SetError("Failed making OpenGL context current"); return NULL; } @@ -395,27 +394,27 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) glGetStringFunc = (const GLubyte *(APIENTRY *)(GLenum)) SDL_GL_GetProcAddress("glGetString"); if (!glGetStringFunc) { - Cocoa_GL_DeleteContext(_this, (__bridge SDL_GLContext)context); + SDL_GL_DeleteContext(sdlcontext); SDL_SetError ("Failed getting OpenGL glGetString entry point"); return NULL; } glversion = (const char *)glGetStringFunc(GL_VERSION); if (glversion == NULL) { - Cocoa_GL_DeleteContext(_this, (__bridge SDL_GLContext)context); + SDL_GL_DeleteContext(sdlcontext); SDL_SetError ("Failed getting OpenGL context version"); return NULL; } if (SDL_sscanf(glversion, "%d.%d", &glversion_major, &glversion_minor) != 2) { - Cocoa_GL_DeleteContext(_this, (__bridge SDL_GLContext)context); + SDL_GL_DeleteContext(sdlcontext); SDL_SetError ("Failed parsing OpenGL context version"); return NULL; } if ((glversion_major < _this->gl_config.major_version) || ((glversion_major == _this->gl_config.major_version) && (glversion_minor < _this->gl_config.minor_version))) { - Cocoa_GL_DeleteContext(_this, (__bridge SDL_GLContext)context); + SDL_GL_DeleteContext(sdlcontext); SDL_SetError ("Failed creating OpenGL context at version requested"); return NULL; } @@ -429,8 +428,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) return sdlcontext; }} -int -Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { @autoreleasepool { if (context) { @@ -447,8 +445,7 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) return 0; }} -int -Cocoa_GL_SetSwapInterval(_THIS, int interval) +int Cocoa_GL_SetSwapInterval(_THIS, int interval) { @autoreleasepool { SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *) SDL_GL_GetCurrentContext(); @@ -467,16 +464,14 @@ Cocoa_GL_SetSwapInterval(_THIS, int interval) return status; }} -int -Cocoa_GL_GetSwapInterval(_THIS) +int Cocoa_GL_GetSwapInterval(_THIS) { @autoreleasepool { SDLOpenGLContext* nscontext = (__bridge SDLOpenGLContext*)SDL_GL_GetCurrentContext(); return nscontext ? SDL_AtomicGet(&nscontext->swapIntervalSetting) : 0; }} -int -Cocoa_GL_SwapWindow(_THIS, SDL_Window * window) +int Cocoa_GL_SwapWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDLOpenGLContext* nscontext = (__bridge SDLOpenGLContext*)SDL_GL_GetCurrentContext(); @@ -512,12 +507,12 @@ Cocoa_GL_SwapWindow(_THIS, SDL_Window * window) return 0; }} -void -Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context) +void Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context) { @autoreleasepool { - SDLOpenGLContext *nscontext = (SDLOpenGLContext *)CFBridgingRelease(context); - [nscontext setWindow:NULL]; + SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *)context; + [nscontext cleanup]; + CFRelease(context); }} /* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */ diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoaopengles.m b/modules/SDL2/src/video/cocoa/SDL_cocoaopengles.m index 3efcb47..17f0b4c 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoaopengles.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoaopengles.m @@ -28,8 +28,7 @@ /* EGL implementation of SDL OpenGL support */ -int -Cocoa_GLES_LoadLibrary(_THIS, const char *path) +int Cocoa_GLES_LoadLibrary(_THIS, const char *path) { /* If the profile requested is not GL ES, switch over to WIN_GL functions */ if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) { @@ -49,7 +48,7 @@ Cocoa_GLES_LoadLibrary(_THIS, const char *path) return SDL_SetError("SDL not configured with OpenGL/CGL support"); #endif } - + if (_this->egl_data == NULL) { return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0); } @@ -57,8 +56,7 @@ Cocoa_GLES_LoadLibrary(_THIS, const char *path) return 0; } -SDL_GLContext -Cocoa_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext Cocoa_GLES_CreateContext(_THIS, SDL_Window * window) { @autoreleasepool { SDL_GLContext context; @@ -90,30 +88,25 @@ Cocoa_GLES_CreateContext(_THIS, SDL_Window * window) return context; }} -void -Cocoa_GLES_DeleteContext(_THIS, SDL_GLContext context) +void Cocoa_GLES_DeleteContext(_THIS, SDL_GLContext context) { @autoreleasepool { SDL_EGL_DeleteContext(_this, context); - Cocoa_GLES_UnloadLibrary(_this); }} -int -Cocoa_GLES_SwapWindow(_THIS, SDL_Window * window) +int Cocoa_GLES_SwapWindow(_THIS, SDL_Window * window) { @autoreleasepool { return SDL_EGL_SwapBuffers(_this, ((__bridge SDL_WindowData *) window->driverdata).egl_surface); }} -int -Cocoa_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int Cocoa_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { @autoreleasepool { return SDL_EGL_MakeCurrent(_this, window ? ((__bridge SDL_WindowData *) window->driverdata).egl_surface : EGL_NO_SURFACE, context); }} -int -Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window) +int Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window) { NSView* v; /* The current context is lost in here; save it and reset it. */ @@ -133,7 +126,7 @@ Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window) } _this->gl_config.driver_loaded = 1; } - + /* Create the GLES window surface */ v = windowdata.nswindow.contentView; windowdata.egl_surface = SDL_EGL_CreateSurface(_this, (__bridge NativeWindowType)[v layer]); diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoashape.m b/modules/SDL2/src/video/cocoa/SDL_cocoashape.m index 8dd78b0..2fd9f59 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoashape.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoashape.m @@ -39,8 +39,7 @@ @implementation SDL_CocoaClosure @end -SDL_WindowShaper* -Cocoa_CreateShaper(SDL_Window* window) +SDL_WindowShaper *Cocoa_CreateShaper(SDL_Window* window) { @autoreleasepool { SDL_WindowShaper* result; @@ -77,8 +76,7 @@ Cocoa_CreateShaper(SDL_Window* window) return result; }} -void -ConvertRects(SDL_ShapeTree* tree, void* closure) +static void ConvertRects(SDL_ShapeTree* tree, void* closure) { SDL_CocoaClosure* data = (__bridge SDL_CocoaClosure*)closure; if(tree->kind == OpaqueShape) { @@ -87,8 +85,7 @@ ConvertRects(SDL_ShapeTree* tree, void* closure) } } -int -Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode) +int Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode) { @autoreleasepool { SDL_ShapeData* data = (__bridge SDL_ShapeData*)shaper->driverdata; @@ -118,8 +115,7 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowSha return 0; }} -int -Cocoa_ResizeWindowShape(SDL_Window *window) +int Cocoa_ResizeWindowShape(SDL_Window *window) { @autoreleasepool { SDL_ShapeData* data = (__bridge SDL_ShapeData*)window->shaper->driverdata; SDL_assert(data != NULL); diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoavideo.m b/modules/SDL2/src/video/cocoa/SDL_cocoavideo.m index db113e1..a626b1b 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoavideo.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoavideo.m @@ -44,8 +44,7 @@ static void Cocoa_VideoQuit(_THIS); /* Cocoa driver bootstrap functions */ -static void -Cocoa_DeleteDevice(SDL_VideoDevice * device) +static void Cocoa_DeleteDevice(SDL_VideoDevice * device) { @autoreleasepool { if (device->wakeup_lock) { @@ -55,8 +54,7 @@ Cocoa_DeleteDevice(SDL_VideoDevice * device) SDL_free(device); }} -static SDL_VideoDevice * -Cocoa_CreateDevice(void) +static SDL_VideoDevice *Cocoa_CreateDevice(void) { @autoreleasepool { SDL_VideoDevice *device; @@ -185,8 +183,7 @@ VideoBootStrap COCOA_bootstrap = { }; -int -Cocoa_VideoInit(_THIS) +int Cocoa_VideoInit(_THIS) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -208,8 +205,7 @@ Cocoa_VideoInit(_THIS) return 0; }} -void -Cocoa_VideoQuit(_THIS) +void Cocoa_VideoQuit(_THIS) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; @@ -221,8 +217,7 @@ Cocoa_VideoQuit(_THIS) }} /* This function assumes that it's called from within an autorelease pool */ -NSImage * -Cocoa_CreateImage(SDL_Surface * surface) +NSImage *Cocoa_CreateImage(SDL_Surface * surface) { SDL_Surface *converted; NSBitmapImageRep *imgrep; diff --git a/modules/SDL2/src/video/cocoa/SDL_cocoawindow.m b/modules/SDL2/src/video/cocoa/SDL_cocoawindow.m index af06257..f586bdb 100644 --- a/modules/SDL2/src/video/cocoa/SDL_cocoawindow.m +++ b/modules/SDL2/src/video/cocoa/SDL_cocoawindow.m @@ -102,7 +102,7 @@ SDL_Window *window = [self findSDLWindow]; if (window == NULL) { return NO; - } else if ((window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP)) != 0) { + } else if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP)) { return NO; } else if ((window->flags & SDL_WINDOW_RESIZABLE) == 0) { return NO; @@ -257,8 +257,7 @@ static void ConvertNSRect(NSScreen *screen, BOOL fullscreen, NSRect *r) r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height; } -static void -ScheduleContextUpdates(SDL_WindowData *data) +static void ScheduleContextUpdates(SDL_WindowData *data) { /* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */ #if SDL_VIDEO_OPENGL @@ -294,14 +293,12 @@ ScheduleContextUpdates(SDL_WindowData *data) } /* !!! FIXME: this should use a hint callback. */ -static int -GetHintCtrlClickEmulateRightClick() +static int GetHintCtrlClickEmulateRightClick() { return SDL_GetHintBoolean(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, SDL_FALSE); } -static NSUInteger -GetWindowWindowedStyle(SDL_Window * window) +static NSUInteger GetWindowWindowedStyle(SDL_Window * window) { /* IF YOU CHANGE ANY FLAGS IN HERE, PLEASE READ the NSWindowStyleMaskBorderless comments in SetupWindowData()! */ @@ -321,8 +318,7 @@ GetWindowWindowedStyle(SDL_Window * window) return style; } -static NSUInteger -GetWindowStyle(SDL_Window * window) +static NSUInteger GetWindowStyle(SDL_Window * window) { NSUInteger style = 0; @@ -334,8 +330,7 @@ GetWindowStyle(SDL_Window * window) return style; } -static SDL_bool -SetWindowStyle(SDL_Window * window, NSUInteger style) +static SDL_bool SetWindowStyle(SDL_Window * window, NSUInteger style) { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; NSWindow *nswindow = data.nswindow; @@ -355,8 +350,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style) return SDL_TRUE; } -static SDL_bool -ShouldAdjustCoordinatesForGrab(SDL_Window * window) +static SDL_bool ShouldAdjustCoordinatesForGrab(SDL_Window * window) { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -374,8 +368,7 @@ ShouldAdjustCoordinatesForGrab(SDL_Window * window) return SDL_FALSE; } -static SDL_bool -AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted) +static SDL_bool AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted) { if (window->mouse_rect.w > 0 && window->mouse_rect.h > 0) { SDL_Rect window_rect; @@ -400,7 +393,7 @@ AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted) } } - if ((window->flags & SDL_WINDOW_MOUSE_GRABBED) != 0) { + if (window->flags & SDL_WINDOW_MOUSE_GRABBED) { int left = window->x; int right = left + window->w - 1; int top = window->y; @@ -414,8 +407,7 @@ AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted) return SDL_FALSE; } -static void -Cocoa_UpdateClipCursor(SDL_Window * window) +static void Cocoa_UpdateClipCursor(SDL_Window * window) { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -671,7 +663,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window) -(void) clearFocusClickPending:(NSInteger) button { - if ((focusClickPending & (1 << button)) != 0) { + if (focusClickPending & (1 << button)) { focusClickPending &= ~(1 << button); if (focusClickPending == 0) { [self onMovingOrFocusClickPendingStateCleared]; @@ -817,7 +809,12 @@ Cocoa_UpdateClipCursor(SDL_Window * window) SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, w, h); - zoomed = [nswindow isZoomed]; + /* isZoomed always returns true if the window is not resizable */ + if ((window->flags & SDL_WINDOW_RESIZABLE) && [nswindow isZoomed]) { + zoomed = YES; + } else { + zoomed = NO; + } if (!zoomed) { SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); } else if (zoomed) { @@ -875,7 +872,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window) { const unsigned int newflags = [NSEvent modifierFlags] & NSEventModifierFlagCapsLock; _data.videodata.modifierFlags = (_data.videodata.modifierFlags & ~NSEventModifierFlagCapsLock) | newflags; - SDL_ToggleModState(KMOD_CAPS, newflags != 0); + SDL_ToggleModState(KMOD_CAPS, newflags ? SDL_TRUE : SDL_FALSE); } } @@ -954,7 +951,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window) isFullscreenSpace = NO; inFullscreenTransition = NO; - + [self windowDidExitFullScreen:nil]; } @@ -1004,16 +1001,16 @@ Cocoa_UpdateClipCursor(SDL_Window * window) - (void)windowDidFailToExitFullScreen:(NSNotification *)aNotification { SDL_Window *window = _data.window; - + if (window->is_destroying) { return; } SetWindowStyle(window, (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable)); - + isFullscreenSpace = YES; inFullscreenTransition = NO; - + [self windowDidEnterFullScreen:nil]; } @@ -1187,8 +1184,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window) return NO; /* not a special area, carry on. */ } -static int -Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * window, const Uint8 state, const Uint8 button) +static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * window, const Uint8 state, const Uint8 button) { const SDL_MouseID mouseID = mouse->mouseID; const int clicks = (int) [theEvent clickCount]; @@ -1617,8 +1613,7 @@ Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * w } @end -static int -SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview, SDL_bool created) +static int SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview, SDL_bool created) { @autoreleasepool { SDL_VideoData *videodata = (__bridge SDL_VideoData *) _this->driverdata; @@ -1711,8 +1706,7 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview, return 0; }} -int -Cocoa_CreateWindow(_THIS, SDL_Window * window) +int Cocoa_CreateWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_VideoData *videodata = (__bridge SDL_VideoData *) _this->driverdata; @@ -1811,7 +1805,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) if (!(window->flags & SDL_WINDOW_OPENGL)) { return 0; } - + /* The rest of this macro mess is for OpenGL or OpenGL ES windows */ #if SDL_VIDEO_OPENGL_ES2 if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { @@ -1829,8 +1823,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) return 0; }} -int -Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { @autoreleasepool { NSView* nsview = nil; @@ -1870,8 +1863,7 @@ Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) return SetupWindowData(_this, window, nswindow, nsview, SDL_FALSE); }} -void -Cocoa_SetWindowTitle(_THIS, SDL_Window * window) +void Cocoa_SetWindowTitle(_THIS, SDL_Window * window) { @autoreleasepool { const char *title = window->title ? window->title : ""; @@ -1880,8 +1872,7 @@ Cocoa_SetWindowTitle(_THIS, SDL_Window * window) [nswindow setTitle:string]; }} -void -Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) { @autoreleasepool { NSImage *nsimage = Cocoa_CreateImage(icon); @@ -1891,8 +1882,7 @@ Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) } }} -void -Cocoa_SetWindowPosition(_THIS, SDL_Window * window) +void Cocoa_SetWindowPosition(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -1914,8 +1904,7 @@ Cocoa_SetWindowPosition(_THIS, SDL_Window * window) ScheduleContextUpdates(windata); }} -void -Cocoa_SetWindowSize(_THIS, SDL_Window * window) +void Cocoa_SetWindowSize(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -1941,8 +1930,7 @@ Cocoa_SetWindowSize(_THIS, SDL_Window * window) ScheduleContextUpdates(windata); }} -void -Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window) +void Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -1954,8 +1942,7 @@ Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window) [windata.nswindow setContentMinSize:minSize]; }} -void -Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window) +void Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -1967,8 +1954,7 @@ Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window) [windata.nswindow setContentMaxSize:maxSize]; }} -void -Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) +void Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -1985,8 +1971,7 @@ Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) }} -void -Cocoa_ShowWindow(_THIS, SDL_Window * window) +void Cocoa_ShowWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windowData = ((__bridge SDL_WindowData *) window->driverdata); @@ -1999,8 +1984,7 @@ Cocoa_ShowWindow(_THIS, SDL_Window * window) } }} -void -Cocoa_HideWindow(_THIS, SDL_Window * window) +void Cocoa_HideWindow(_THIS, SDL_Window * window) { @autoreleasepool { NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow; @@ -2008,8 +1992,7 @@ Cocoa_HideWindow(_THIS, SDL_Window * window) [nswindow orderOut:nil]; }} -void -Cocoa_RaiseWindow(_THIS, SDL_Window * window) +void Cocoa_RaiseWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windowData = ((__bridge SDL_WindowData *) window->driverdata); @@ -2026,8 +2009,7 @@ Cocoa_RaiseWindow(_THIS, SDL_Window * window) [windowData.listener resumeVisibleObservation]; }} -void -Cocoa_MaximizeWindow(_THIS, SDL_Window * window) +void Cocoa_MaximizeWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -2038,8 +2020,7 @@ Cocoa_MaximizeWindow(_THIS, SDL_Window * window) ScheduleContextUpdates(windata); }} -void -Cocoa_MinimizeWindow(_THIS, SDL_Window * window) +void Cocoa_MinimizeWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2051,8 +2032,7 @@ Cocoa_MinimizeWindow(_THIS, SDL_Window * window) } }} -void -Cocoa_RestoreWindow(_THIS, SDL_Window * window) +void Cocoa_RestoreWindow(_THIS, SDL_Window * window) { @autoreleasepool { NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow; @@ -2064,8 +2044,7 @@ Cocoa_RestoreWindow(_THIS, SDL_Window * window) } }} -void -Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) +void Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) { @autoreleasepool { if (SetWindowStyle(window, GetWindowStyle(window))) { @@ -2075,8 +2054,7 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) } }} -void -Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) +void Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) { @autoreleasepool { /* Don't set this if we're in a space! @@ -2100,8 +2078,7 @@ Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) } }} -void -Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) +void Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) { @autoreleasepool { NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow; @@ -2112,8 +2089,7 @@ Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) } }} -void -Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +void Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2201,8 +2177,7 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display ScheduleContextUpdates(data); }} -int -Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) +int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) { @autoreleasepool { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -2228,8 +2203,7 @@ Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) return 0; }} -void* -Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) +void *Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2265,8 +2239,7 @@ Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) return retIccProfileData; }} -int -Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window) +int Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window) { @autoreleasepool { NSScreen *screen; @@ -2304,8 +2277,7 @@ Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window) return SDL_SetError("Couldn't find the display where the window is located."); }} -int -Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) +int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display; @@ -2328,14 +2300,12 @@ Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) return 0; } -void -Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window) +void Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window) { Cocoa_UpdateClipCursor(window); } -void -Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2356,8 +2326,7 @@ Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) } }} -void -Cocoa_DestroyWindow(_THIS, SDL_Window * window) +void Cocoa_DestroyWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (SDL_WindowData *) CFBridgingRelease(window->driverdata); @@ -2379,7 +2348,7 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window) contexts = [data.nscontexts copy]; for (SDLOpenGLContext *context in contexts) { - /* Calling setWindow:NULL causes the context to remove itself from the context list. */ + /* Calling setWindow:NULL causes the context to remove itself from the context list. */ [context setWindow:NULL]; } @@ -2394,8 +2363,7 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window) window->driverdata = NULL; }} -SDL_bool -Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { @autoreleasepool { NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow; @@ -2411,8 +2379,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) } }} -SDL_bool -Cocoa_IsWindowInFullscreenSpace(SDL_Window * window) +SDL_bool Cocoa_IsWindowInFullscreenSpace(SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2424,8 +2391,7 @@ Cocoa_IsWindowInFullscreenSpace(SDL_Window * window) } }} -SDL_bool -Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state) +SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state) { @autoreleasepool { SDL_bool succeeded = SDL_FALSE; @@ -2467,14 +2433,12 @@ Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state) return succeeded; }} -int -Cocoa_SetWindowHitTest(SDL_Window * window, SDL_bool enabled) +int Cocoa_SetWindowHitTest(SDL_Window * window, SDL_bool enabled) { return 0; /* just succeed, the real work is done elsewhere. */ } -void -Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept) +void Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -2485,8 +2449,7 @@ Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept) } }} -int -Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) +int Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) { @autoreleasepool { /* Note that this is app-wide and not window-specific! */ @@ -2513,8 +2476,7 @@ Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) return 0; }} -int -Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) +int Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_WM.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_WM.c index cf9aa10..f185cac 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_WM.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_WM.c @@ -51,8 +51,7 @@ static DFB_Theme theme_none = { NULL }; -static void -DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w) +static void DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w) { int x1, x2, x3; int y1, y2, y3; @@ -75,8 +74,7 @@ DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w) s->FillTriangle(s, x1, y1, x2, y2, x3, y3); } -static void -LoadFont(_THIS, SDL_Window * window) +static void LoadFont(_THIS, SDL_Window * window) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); @@ -101,8 +99,7 @@ LoadFont(_THIS, SDL_Window * window) } } -static void -DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text) +static void DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text) { DFBSurfaceTextFlags flags; @@ -111,8 +108,7 @@ DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text) s->DrawString(s, text, -1, x, y, flags); } -void -DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window) +void DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); IDirectFBSurface *s = windata->window_surface; @@ -180,8 +176,7 @@ DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window) windata->wm_needs_redraw = 0; } -DFBResult -DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch) +DFBResult DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch) { SDL_DFB_WINDOWDATA(window); IDirectFBWindow *dfbwin = windata->dfbwin; @@ -195,8 +190,7 @@ DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch) return DFB_OK; } -void -DirectFB_WM_AdjustWindowLayout(SDL_Window * window, int flags, int w, int h) +void DirectFB_WM_AdjustWindowLayout(SDL_Window * window, int flags, int w, int h) { SDL_DFB_WINDOWDATA(window); @@ -241,8 +235,7 @@ enum WM_POS_BOTTOM = 0x40, }; -static int -WMIsClient(DFB_WindowData * p, int x, int y) +static int WMIsClient(DFB_WindowData * p, int x, int y) { x -= p->client.x; y -= p->client.y; @@ -253,8 +246,7 @@ WMIsClient(DFB_WindowData * p, int x, int y) return 1; } -static int -WMPos(DFB_WindowData * p, int x, int y) +static int WMPos(DFB_WindowData * p, int x, int y) { int pos = WM_POS_NONE; @@ -284,8 +276,7 @@ WMPos(DFB_WindowData * p, int x, int y) return pos; } -int -DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) +int DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) { SDL_DFB_WINDOWDATA(window); SDL_Window *grabbed_window = SDL_GetGrabbedWindow(); diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_dyn.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_dyn.c index e148802..02ed371 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_dyn.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_dyn.c @@ -45,8 +45,7 @@ DFB_SYMS static void *handle = NULL; -int -SDL_DirectFB_LoadLibrary(void) +int SDL_DirectFB_LoadLibrary(void) { int retval = 0; @@ -92,8 +91,7 @@ SDL_DirectFB_LoadLibrary(void) return retval; } -void -SDL_DirectFB_UnLoadLibrary(void) +void SDL_DirectFB_UnLoadLibrary(void) { if (handle != NULL) { SDL_UnloadObject(handle); @@ -102,16 +100,16 @@ SDL_DirectFB_UnLoadLibrary(void) } #else -int -SDL_DirectFB_LoadLibrary(void) + +int SDL_DirectFB_LoadLibrary(void) { return 1; } -void -SDL_DirectFB_UnLoadLibrary(void) +void SDL_DirectFB_UnLoadLibrary(void) { } + #endif #endif /* SDL_VIDEO_DRIVER_DIRECTFB */ diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_events.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_events.c index ca69017..47a8e62 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_events.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_events.c @@ -91,8 +91,7 @@ static void UnicodeToUtf8( Uint16 w , char *utf8buf) } } -static void -FocusAllMice(_THIS, SDL_Window *window) +static void FocusAllMice(_THIS, SDL_Window *window) { #if USE_MULTI_API SDL_DFB_DEVICEDATA(_this); @@ -106,8 +105,7 @@ FocusAllMice(_THIS, SDL_Window *window) } -static void -FocusAllKeyboards(_THIS, SDL_Window *window) +static void FocusAllKeyboards(_THIS, SDL_Window *window) { #if USE_MULTI_API SDL_DFB_DEVICEDATA(_this); @@ -120,8 +118,7 @@ FocusAllKeyboards(_THIS, SDL_Window *window) #endif } -static void -MotionAllMice(_THIS, int x, int y) +static void MotionAllMice(_THIS, int x, int y) { #if USE_MULTI_API SDL_DFB_DEVICEDATA(_this); @@ -136,8 +133,7 @@ MotionAllMice(_THIS, int x, int y) #endif } -static int -KbdIndex(_THIS, int id) +static int KbdIndex(_THIS, int id) { SDL_DFB_DEVICEDATA(_this); int index; @@ -149,8 +145,7 @@ KbdIndex(_THIS, int id) return -1; } -static int -ClientXY(DFB_WindowData * p, int *x, int *y) +static int ClientXY(DFB_WindowData * p, int *x, int *y) { int cx, cy; @@ -169,8 +164,7 @@ ClientXY(DFB_WindowData * p, int *x, int *y) return 1; } -static void -ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) +static void ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(sdlwin); @@ -303,8 +297,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) printf("Event Clazz %d\n", evt->clazz); } -static void -ProcessInputEvent(_THIS, DFBInputEvent * ievt) +static void ProcessInputEvent(_THIS, DFBInputEvent * ievt) { SDL_DFB_DEVICEDATA(_this); SDL_Keysym keysym; @@ -406,8 +399,7 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt) } } -void -DirectFB_PumpEventsWindow(_THIS) +void DirectFB_PumpEventsWindow(_THIS) { SDL_DFB_DEVICEDATA(_this); DFBInputEvent ievt; @@ -448,8 +440,7 @@ DirectFB_PumpEventsWindow(_THIS) } } -void -DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys) +void DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys) { int i; @@ -576,8 +567,7 @@ DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys) } -static SDL_Keysym * -DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *unicode) +static SDL_Keysym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *unicode) { SDL_DFB_DEVICEDATA(_this); int kbd_idx = 0; /* Window events lag the device source KbdIndex(_this, evt->device_id); */ @@ -606,8 +596,7 @@ DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 * return keysym; } -static SDL_Keysym * -DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt, +static SDL_Keysym *DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt, SDL_Keysym * keysym, Uint32 *unicode) { SDL_DFB_DEVICEDATA(_this); @@ -636,8 +625,7 @@ DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt, return keysym; } -static int -DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) +static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) { switch (button) { case DIBI_LEFT: @@ -651,9 +639,7 @@ DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) } } -static DFBEnumerationResult -EnumKeyboards(DFBInputDeviceID device_id, - DFBInputDeviceDescription desc, void *callbackdata) +static DFBEnumerationResult EnumKeyboards(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, void *callbackdata) { cb_data *cb = callbackdata; DFB_DeviceData *devdata = cb->devdata; @@ -700,8 +686,7 @@ EnumKeyboards(DFBInputDeviceID device_id, return DFENUM_OK; } -void -DirectFB_InitKeyboard(_THIS) +void DirectFB_InitKeyboard(_THIS) { SDL_DFB_DEVICEDATA(_this); cb_data cb; @@ -730,8 +715,7 @@ DirectFB_InitKeyboard(_THIS) } } -void -DirectFB_QuitKeyboard(_THIS) +void DirectFB_QuitKeyboard(_THIS) { /* SDL_DFB_DEVICEDATA(_this); */ } diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_modes.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_modes.c index 7d853b3..135b084 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_modes.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_modes.c @@ -42,8 +42,7 @@ struct modes_callback_t SDL_DisplayMode *modelist; }; -static DFBEnumerationResult -EnumModesCallback(int width, int height, int bpp, void *data) +static DFBEnumerationResult EnumModesCallback(int width, int height, int bpp, void *data) { struct modes_callback_t *modedata = (struct modes_callback_t *) data; SDL_DisplayMode mode; @@ -61,9 +60,7 @@ EnumModesCallback(int width, int height, int bpp, void *data) return DFENUM_OK; } -static DFBEnumerationResult -EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc, - void *callbackdata) +static DFBEnumerationResult EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc, void *callbackdata) { struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata; @@ -71,9 +68,7 @@ EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc, return DFENUM_OK; } -static DFBEnumerationResult -EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc, - void *callbackdata) +static DFBEnumerationResult EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc, void *callbackdata) { struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata; @@ -89,8 +84,7 @@ EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc, return DFENUM_OK; } -static void -CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, SDL_DisplayMode * mode) +static void CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, SDL_DisplayMode * mode) { SDL_DFB_DEVICEDATA(_this); DFBDisplayLayerConfig config; @@ -125,8 +119,7 @@ CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, S } -void -DirectFB_SetContext(_THIS, SDL_Window *window) +void DirectFB_SetContext(_THIS, SDL_Window *window) { #if (DFB_VERSION_ATLEAST(1,0,0)) /* FIXME: does not work on 1.0/1.2 with radeon driver @@ -144,8 +137,7 @@ DirectFB_SetContext(_THIS, SDL_Window *window) #endif } -void -DirectFB_InitModes(_THIS) +void DirectFB_InitModes(_THIS) { SDL_DFB_DEVICEDATA(_this); IDirectFBDisplayLayer *layer = NULL; @@ -269,8 +261,7 @@ DirectFB_InitModes(_THIS) return; } -void -DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display) { SDL_DFB_DEVICEDATA(_this); DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; @@ -304,8 +295,7 @@ error: return; } -int -DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { /* * FIXME: video mode switch is currently broken for 1.2.0 @@ -375,8 +365,7 @@ DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mod return -1; } -void -DirectFB_QuitModes(_THIS) +void DirectFB_QuitModes(_THIS) { SDL_DisplayMode tmode; int i; diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_mouse.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_mouse.c index 4d59157..d0e1f29 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_mouse.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_mouse.c @@ -74,8 +74,7 @@ static const char *arrow[] = { " ", }; -static SDL_Cursor * -DirectFB_CreateDefaultCursor(void) +static SDL_Cursor *DirectFB_CreateDefaultCursor(void) { SDL_VideoDevice *dev = SDL_GetVideoDevice(); @@ -127,8 +126,7 @@ DirectFB_CreateDefaultCursor(void) } /* Create a cursor from a surface */ -static SDL_Cursor * -DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) { SDL_VideoDevice *dev = SDL_GetVideoDevice(); @@ -174,8 +172,7 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) } /* Show the specified cursor, or hide if cursor is NULL */ -static int -DirectFB_ShowCursor(SDL_Cursor * cursor) +static int DirectFB_ShowCursor(SDL_Cursor * cursor) { SDL_DFB_CURSORDATA(cursor); SDL_Window *window; @@ -215,8 +212,7 @@ DirectFB_ShowCursor(SDL_Cursor * cursor) } /* Free a window manager cursor */ -static void -DirectFB_FreeCursor(SDL_Cursor * cursor) +static void DirectFB_FreeCursor(SDL_Cursor * cursor) { SDL_DFB_CURSORDATA(cursor); @@ -226,8 +222,7 @@ DirectFB_FreeCursor(SDL_Cursor * cursor) } /* Warp the mouse to (x,y) */ -static void -DirectFB_WarpMouse(SDL_Window * window, int x, int y) +static void DirectFB_WarpMouse(SDL_Window * window, int x, int y) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; @@ -252,9 +247,7 @@ static void DirectFB_FreeMouse(SDL_Mouse * mouse); static int id_mask; -static DFBEnumerationResult -EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, - void *callbackdata) +static DFBEnumerationResult EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, void *callbackdata) { DFB_DeviceData *devdata = callbackdata; @@ -277,8 +270,7 @@ EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, return DFENUM_OK; } -void -DirectFB_InitMouse(_THIS) +void DirectFB_InitMouse(_THIS) { SDL_DFB_DEVICEDATA(_this); @@ -310,8 +302,7 @@ DirectFB_InitMouse(_THIS) } } -void -DirectFB_QuitMouse(_THIS) +void DirectFB_QuitMouse(_THIS) { SDL_DFB_DEVICEDATA(_this); @@ -324,15 +315,13 @@ DirectFB_QuitMouse(_THIS) /* This is called when a mouse motion event occurs */ -static void -DirectFB_MoveCursor(SDL_Cursor * cursor) +static void DirectFB_MoveCursor(SDL_Cursor * cursor) { } /* Warp the mouse to (x,y) */ -static void -DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y) +static void DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; @@ -350,16 +339,14 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y) } /* Free the mouse when it's time */ -static void -DirectFB_FreeMouse(SDL_Mouse * mouse) +static void DirectFB_FreeMouse(SDL_Mouse * mouse) { /* nothing yet */ } #else /* USE_MULTI_API */ -void -DirectFB_InitMouse(_THIS) +void DirectFB_InitMouse(_THIS) { SDL_DFB_DEVICEDATA(_this); @@ -375,12 +362,10 @@ DirectFB_InitMouse(_THIS) devdata->num_mice = 1; } -void -DirectFB_QuitMouse(_THIS) +void DirectFB_QuitMouse(_THIS) { } - #endif #endif /* SDL_VIDEO_DRIVER_DIRECTFB */ diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_opengl.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_opengl.c index 42a9d8b..1c146a0 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_opengl.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_opengl.c @@ -60,8 +60,7 @@ struct SDL_GLDriverData static void DirectFB_GL_UnloadLibrary(_THIS); -int -DirectFB_GL_Initialize(_THIS) +int DirectFB_GL_Initialize(_THIS) { if (_this->gl_data) { return 0; @@ -91,8 +90,7 @@ DirectFB_GL_Initialize(_THIS) return 0; } -void -DirectFB_GL_Shutdown(_THIS) +void DirectFB_GL_Shutdown(_THIS) { if (!_this->gl_data || (--_this->gl_data->initialized > 0)) { return; @@ -104,8 +102,7 @@ DirectFB_GL_Shutdown(_THIS) _this->gl_data = NULL; } -int -DirectFB_GL_LoadLibrary(_THIS, const char *path) +int DirectFB_GL_LoadLibrary(_THIS, const char *path) { void *handle = NULL; @@ -146,8 +143,7 @@ DirectFB_GL_LoadLibrary(_THIS, const char *path) return 0; } -static void -DirectFB_GL_UnloadLibrary(_THIS) +static void DirectFB_GL_UnloadLibrary(_THIS) { #if 0 int ret = GL_UnloadObject(_this->gl_config.dll_handle); @@ -160,8 +156,7 @@ DirectFB_GL_UnloadLibrary(_THIS) _this->gl_data = NULL; } -void * -DirectFB_GL_GetProcAddress(_THIS, const char *proc) +void *DirectFB_GL_GetProcAddress(_THIS, const char *proc) { void *handle; @@ -169,8 +164,7 @@ DirectFB_GL_GetProcAddress(_THIS, const char *proc) return GL_LoadFunction(handle, proc); } -SDL_GLContext -DirectFB_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext DirectFB_GL_CreateContext(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); DirectFB_GLContext *context; @@ -202,8 +196,7 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window) return NULL; } -int -DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { DirectFB_GLContext *ctx = (DirectFB_GLContext *) context; DirectFB_GLContext *p; @@ -227,20 +220,17 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) return -1; } -int -DirectFB_GL_SetSwapInterval(_THIS, int interval) +int DirectFB_GL_SetSwapInterval(_THIS, int interval) { return SDL_Unsupported(); } -int -DirectFB_GL_GetSwapInterval(_THIS) +int DirectFB_GL_GetSwapInterval(_THIS) { return 0; } -int -DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) +int DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); DirectFB_GLContext *p; @@ -265,8 +255,7 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) return -1; } -void -DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context) +void DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context) { DirectFB_GLContext *ctx = (DirectFB_GLContext *) context; DirectFB_GLContext *p; @@ -285,8 +274,7 @@ DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context) SDL_DFB_FREE(ctx); } -void -DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window) +void DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; @@ -299,8 +287,7 @@ DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window) } } -void -DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window) +void DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; @@ -315,8 +302,7 @@ DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window) } } -void -DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window) +void DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_render.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_render.c index 181469f..40f0e1a 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_render.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_render.c @@ -79,16 +79,14 @@ typedef struct #endif } DirectFB_TextureData; -static SDL_INLINE void -SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr) +static void SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr) { dr->x = sr->x; dr->y = sr->y; dr->h = sr->h; dr->w = sr->w; } -static SDL_INLINE void -SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr) +static void SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr) { dr->x = sr->x; dr->y = sr->y; @@ -97,8 +95,7 @@ SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr) } -static int -TextureHasAlpha(DirectFB_TextureData * data) +static int TextureHasAlpha(DirectFB_TextureData * data) { /* Drawing primitive ? */ if (!data) @@ -149,9 +146,7 @@ static SDL_INLINE IDirectFBWindow *get_dfb_window(SDL_Window *window) return wm_info.info.dfb.window; } -static void -SetBlendMode(DirectFB_RenderData * data, int blendMode, - DirectFB_TextureData * source) +static void SetBlendMode(DirectFB_RenderData * data, int blendMode, DirectFB_TextureData * source) { IDirectFBSurface *destsurf = data->target; @@ -201,6 +196,7 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode, case SDL_BLENDMODE_MUL: data->blitFlags = DSBLIT_BLEND_ALPHACHANNEL; data->drawFlags = DSDRAW_BLEND; + /* FIXME SDL_BLENDMODE_MUL is simplified, and dstA is in fact un-changed.*/ SDL_DFB_CHECK(destsurf->SetSrcBlendFunction(destsurf, DSBF_DESTCOLOR)); SDL_DFB_CHECK(destsurf->SetDstBlendFunction(destsurf, DSBF_INVSRCALPHA)); @@ -210,8 +206,7 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode, } } -static int -PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd) +static int PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd) { DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; IDirectFBSurface *destsurf = data->target; @@ -245,8 +240,7 @@ PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd) return -1; } -static void -DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) +static void DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) { SDL_DFB_RENDERERDATA(renderer); @@ -258,8 +252,7 @@ DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } } -static void -DirectFB_ActivateRenderer(SDL_Renderer * renderer) +static void DirectFB_ActivateRenderer(SDL_Renderer * renderer) { SDL_DFB_RENDERERDATA(renderer); @@ -268,8 +261,7 @@ DirectFB_ActivateRenderer(SDL_Renderer * renderer) } } -static int -DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture) +static int DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture) { SDL_Window *window = renderer->window; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -340,8 +332,7 @@ void DirectFB_SetTexturePalette(SDL_Renderer *renderer, SDL_Texture *texture, SD data->palette->SetEntries(data->palette, dfbpal, pal->ncolors, 0); } -static int -DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static int DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) { SDL_Window *window = renderer->window; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -436,8 +427,7 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } #if 0 -static int -DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) +static int DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) { #if (DFB_VERSION_ATLEAST(1,2,0)) @@ -465,8 +455,7 @@ DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) } #endif -static int -DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, +static int DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) { DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata; @@ -522,8 +511,7 @@ DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, } -static int -DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, +static int DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch) { DirectFB_TextureData *texturedata = @@ -560,8 +548,7 @@ DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, return -1; } -static void -DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) { DirectFB_TextureData *texturedata = (DirectFB_TextureData *) texture->driverdata; @@ -574,14 +561,12 @@ DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) } } -static void -DirectFB_SetTextureScaleMode() +static void DirectFB_SetTextureScaleMode() { } #if 0 -static void -DirectFB_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, +static void DirectFB_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects, const SDL_Rect * rects) { DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata; @@ -610,16 +595,14 @@ static int DirectFB_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * textu } -static int -DirectFB_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) +static int DirectFB_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd) { return 0; /* nothing to do in this backend. */ } -static int -DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) +static int DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count) { - const size_t len = count * sizeof (SDL_FPoint); + const size_t len = count * sizeof(SDL_FPoint); SDL_FPoint *verts = (SDL_FPoint *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first); if (!verts) { @@ -631,8 +614,7 @@ DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const return 0; } -static int -DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, +static int DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) @@ -642,7 +624,7 @@ DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu float *verts; int sz = 2 + 4 + (texture ? 2 : 0); - verts = (float *) SDL_AllocateRenderVertices(renderer, count * sz * sizeof (float), 0, &cmd->data.draw.first); + verts = (float *) SDL_AllocateRenderVertices(renderer, count * sz * sizeof(float), 0, &cmd->data.draw.first); if (!verts) { return -1; } @@ -684,10 +666,9 @@ DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu return 0; } -static int -DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count) +static int DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count) { - const size_t len = count * sizeof (SDL_FRect); + const size_t len = count * sizeof(SDL_FRect); SDL_FRect *verts = (SDL_FRect *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first); if (!verts) { @@ -699,11 +680,10 @@ DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const S return 0; } -static int -DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, +static int DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect) { - DFBRectangle *verts = (DFBRectangle *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (DFBRectangle), 0, &cmd->data.draw.first); + DFBRectangle *verts = (DFBRectangle *) SDL_AllocateRenderVertices(renderer, 2 * sizeof(DFBRectangle), 0, &cmd->data.draw.first); if (!verts) { return -1; @@ -717,8 +697,7 @@ DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture return 0; } -static int -DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) +static int DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize) { /* !!! FIXME: there are probably some good optimization wins in here if someone wants to look it over. */ DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; @@ -1025,8 +1004,7 @@ DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void * } -static int -DirectFB_RenderPresent(SDL_Renderer * renderer) +static int DirectFB_RenderPresent(SDL_Renderer * renderer) { DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; SDL_Window *window = renderer->window; @@ -1059,8 +1037,7 @@ DirectFB_RenderPresent(SDL_Renderer * renderer) return 0; } -static void -DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) +static void DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) { DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata; @@ -1085,8 +1062,7 @@ DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture->driverdata = NULL; } -static void -DirectFB_DestroyRenderer(SDL_Renderer * renderer) +static void DirectFB_DestroyRenderer(SDL_Renderer * renderer) { DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; #if 0 @@ -1100,8 +1076,7 @@ DirectFB_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int -DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, +static int DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, void * pixels, int pitch) { Uint32 sdl_format; @@ -1128,8 +1103,7 @@ DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, } #if 0 -static int -DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, +static int DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, const void * pixels, int pitch) { SDL_Window *window = renderer->window; @@ -1156,8 +1130,7 @@ DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, #endif -SDL_Renderer * -DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) +SDL_Renderer *DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) { IDirectFBSurface *winsurf = get_dfb_surface(window); /*SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);*/ diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_shape.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_shape.c index a9e578c..a6c9aa0 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_shape.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_shape.c @@ -28,8 +28,8 @@ #include "../SDL_shape_internals.h" -SDL_WindowShaper* -DirectFB_CreateShaper(SDL_Window* window) { +SDL_WindowShaper *DirectFB_CreateShaper(SDL_Window* window) +{ SDL_WindowShaper* result = NULL; SDL_ShapeData* data; int resized_properly; @@ -58,8 +58,8 @@ DirectFB_CreateShaper(SDL_Window* window) { return result; } -int -DirectFB_ResizeWindowShape(SDL_Window* window) { +int DirectFB_ResizeWindowShape(SDL_Window* window) +{ SDL_ShapeData* data = window->shaper->driverdata; SDL_assert(data != NULL); @@ -73,8 +73,8 @@ DirectFB_ResizeWindowShape(SDL_Window* window) { return 0; } -int -DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { +int DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) +{ if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) return -1; @@ -103,7 +103,7 @@ DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowSh dsc.pixelformat = DSPF_ARGB; SDL_DFB_CHECKERR(devdata->dfb->CreateSurface(devdata->dfb, &dsc, &data->surface)); - + SDL_DFB_CALLOC(bitmap, shape->w * shape->h, 1); /* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */ SDL_CalculateShapeBitmap(shaper->mode, shape, bitmap, 1); diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_video.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_video.c index d50e316..5292732 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_video.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_video.c @@ -74,16 +74,14 @@ static const DirectFBAccelerationMaskNames(acceleration_mask); /* DirectFB driver bootstrap functions */ -static void -DirectFB_DeleteDevice(SDL_VideoDevice * device) +static void DirectFB_DeleteDevice(SDL_VideoDevice * device) { SDL_DirectFB_UnLoadLibrary(); SDL_DFB_FREE(device->driverdata); SDL_DFB_FREE(device); } -static SDL_VideoDevice * -DirectFB_CreateDevice(void) +static SDL_VideoDevice *DirectFB_CreateDevice(void) { SDL_VideoDevice *device; @@ -154,8 +152,7 @@ DirectFB_CreateDevice(void) return (0); } -static void -DirectFB_DeviceInformation(IDirectFB * dfb) +static void DirectFB_DeviceInformation(IDirectFB * dfb) { DFBGraphicsDeviceDescription desc; int n; @@ -206,8 +203,7 @@ static int readBoolEnv(const char *env_name, int def_val) return def_val; } -static int -DirectFB_VideoInit(_THIS) +static int DirectFB_VideoInit(_THIS) { IDirectFB *dfb = NULL; DFB_DeviceData *devdata = NULL; @@ -282,8 +278,7 @@ DirectFB_VideoInit(_THIS) return -1; } -static void -DirectFB_VideoQuit(_THIS) +static void DirectFB_VideoQuit(_THIS) { DFB_DeviceData *devdata = (DFB_DeviceData *) _this->driverdata; @@ -379,8 +374,7 @@ static const struct { { DSPF_UNKNOWN, SDL_PIXELFORMAT_YVYU }, /**< Packed mode: Y0+V0+Y1+U0 (1 pla */ }; -Uint32 -DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat) +Uint32 DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat) { int i; @@ -392,8 +386,7 @@ DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat) return SDL_PIXELFORMAT_UNKNOWN; } -DFBSurfacePixelFormat -DirectFB_SDLToDFBPixelFormat(Uint32 format) +DFBSurfacePixelFormat DirectFB_SDLToDFBPixelFormat(Uint32 format) { int i; diff --git a/modules/SDL2/src/video/directfb/SDL_DirectFB_window.c b/modules/SDL2/src/video/directfb/SDL_DirectFB_window.c index f88fb9d..91be03b 100644 --- a/modules/SDL2/src/video/directfb/SDL_DirectFB_window.c +++ b/modules/SDL2/src/video/directfb/SDL_DirectFB_window.c @@ -35,8 +35,7 @@ #include "../SDL_pixels_c.h" -int -DirectFB_CreateWindow(_THIS, SDL_Window * window) +int DirectFB_CreateWindow(_THIS, SDL_Window * window) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_DISPLAYDATA(window); @@ -173,14 +172,12 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) return -1; } -int -DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { return SDL_Unsupported(); } -void -DirectFB_SetWindowTitle(_THIS, SDL_Window * window) +void DirectFB_SetWindowTitle(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); @@ -192,8 +189,7 @@ DirectFB_SetWindowTitle(_THIS, SDL_Window * window) } } -void -DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); @@ -242,8 +238,7 @@ DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) return; } -void -DirectFB_SetWindowPosition(_THIS, SDL_Window * window) +void DirectFB_SetWindowPosition(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); int x, y; @@ -255,8 +250,7 @@ DirectFB_SetWindowPosition(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->MoveTo(windata->dfbwin, x, y)); } -void -DirectFB_SetWindowSize(_THIS, SDL_Window * window) +void DirectFB_SetWindowSize(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); @@ -294,8 +288,7 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window) return; } -void -DirectFB_ShowWindow(_THIS, SDL_Window * window) +void DirectFB_ShowWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); @@ -303,8 +296,7 @@ DirectFB_ShowWindow(_THIS, SDL_Window * window) } -void -DirectFB_HideWindow(_THIS, SDL_Window * window) +void DirectFB_HideWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); @@ -312,8 +304,7 @@ DirectFB_HideWindow(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->SetOpacity(windata->dfbwin, 0)); } -void -DirectFB_RaiseWindow(_THIS, SDL_Window * window) +void DirectFB_RaiseWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); @@ -321,8 +312,7 @@ DirectFB_RaiseWindow(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->RequestFocus(windata->dfbwin)); } -void -DirectFB_MaximizeWindow(_THIS, SDL_Window * window) +void DirectFB_MaximizeWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -345,16 +335,14 @@ DirectFB_MaximizeWindow(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->SetOptions(windata->dfbwin, wopts)); } -void -DirectFB_MinimizeWindow(_THIS, SDL_Window * window) +void DirectFB_MinimizeWindow(_THIS, SDL_Window * window) { /* FIXME: Size to 32x32 ? */ SDL_Unsupported(); } -void -DirectFB_RestoreWindow(_THIS, SDL_Window * window) +void DirectFB_RestoreWindow(_THIS, SDL_Window * window) { SDL_DFB_WINDOWDATA(window); DFBWindowOptions wopts; @@ -382,8 +370,7 @@ DirectFB_RestoreWindow(_THIS, SDL_Window * window) } -void -DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { SDL_DFB_WINDOWDATA(window); @@ -394,8 +381,7 @@ DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) } } -void -DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { SDL_DFB_WINDOWDATA(window); @@ -406,8 +392,7 @@ DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) } } -void -DirectFB_DestroyWindow(_THIS, SDL_Window * window) +void DirectFB_DestroyWindow(_THIS, SDL_Window * window) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); @@ -455,8 +440,7 @@ DirectFB_DestroyWindow(_THIS, SDL_Window * window) return; } -SDL_bool -DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, +SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo * info) { const Uint32 version = ((((Uint32) info->version.major) * 1000000) + @@ -495,8 +479,7 @@ DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window, } } -void -DirectFB_AdjustWindowSurface(SDL_Window * window) +void DirectFB_AdjustWindowSurface(SDL_Window * window) { SDL_DFB_WINDOWDATA(window); int adjust = windata->wm_needs_redraw; @@ -549,8 +532,7 @@ DirectFB_AdjustWindowSurface(SDL_Window * window) return; } -int -DirectFB_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) +int DirectFB_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) { const Uint8 alpha = (Uint8) ((unsigned int) (opacity * 255.0f)); SDL_DFB_WINDOWDATA(window); diff --git a/modules/SDL2/src/video/dummy/SDL_nullevents.c b/modules/SDL2/src/video/dummy/SDL_nullevents.c index 3917a69..10712a8 100644 --- a/modules/SDL2/src/video/dummy/SDL_nullevents.c +++ b/modules/SDL2/src/video/dummy/SDL_nullevents.c @@ -30,8 +30,7 @@ #include "SDL_nullvideo.h" #include "SDL_nullevents_c.h" -void -DUMMY_PumpEvents(_THIS) +void DUMMY_PumpEvents(_THIS) { /* do nothing. */ } diff --git a/modules/SDL2/src/video/dummy/SDL_nullframebuffer.c b/modules/SDL2/src/video/dummy/SDL_nullframebuffer.c index 0762f52..be10dd1 100644 --- a/modules/SDL2/src/video/dummy/SDL_nullframebuffer.c +++ b/modules/SDL2/src/video/dummy/SDL_nullframebuffer.c @@ -25,10 +25,9 @@ #include "../SDL_sysvideo.h" #include "SDL_nullframebuffer_c.h" +#define DUMMY_SURFACE "_SDL_DummySurface" -#define DUMMY_SURFACE "_SDL_DummySurface" - -int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { SDL_Surface *surface; const Uint32 surface_format = SDL_PIXELFORMAT_RGB888; @@ -38,9 +37,9 @@ int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma SDL_DUMMY_DestroyWindowFramebuffer(_this, window); /* Create a new one */ - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowSizeInPixels(window, &w, &h); surface = SDL_CreateRGBSurfaceWithFormat(0, w, h, 0, surface_format); - if (!surface) { + if (surface == NULL) { return -1; } @@ -52,31 +51,31 @@ int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma return 0; } -int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { static int frame_number; SDL_Surface *surface; - surface = (SDL_Surface *) SDL_GetWindowData(window, DUMMY_SURFACE); - if (!surface) { + surface = (SDL_Surface *)SDL_GetWindowData(window, DUMMY_SURFACE); + if (surface == NULL) { return SDL_SetError("Couldn't find dummy surface for window"); } /* Send the data to the display */ if (SDL_getenv("SDL_VIDEO_DUMMY_SAVE_FRAMES")) { char file[128]; - SDL_snprintf(file, sizeof(file), "SDL_window%" SDL_PRIu32 "-%8.8d.bmp", - SDL_GetWindowID(window), ++frame_number); + (void)SDL_snprintf(file, sizeof(file), "SDL_window%" SDL_PRIu32 "-%8.8d.bmp", + SDL_GetWindowID(window), ++frame_number); SDL_SaveBMP(surface, file); } return 0; } -void SDL_DUMMY_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void SDL_DUMMY_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { SDL_Surface *surface; - surface = (SDL_Surface *) SDL_SetWindowData(window, DUMMY_SURFACE, NULL); + surface = (SDL_Surface *)SDL_SetWindowData(window, DUMMY_SURFACE, NULL); SDL_FreeSurface(surface); } diff --git a/modules/SDL2/src/video/dummy/SDL_nullframebuffer_c.h b/modules/SDL2/src/video/dummy/SDL_nullframebuffer_c.h index f3b8dc4..31a9432 100644 --- a/modules/SDL2/src/video/dummy/SDL_nullframebuffer_c.h +++ b/modules/SDL2/src/video/dummy/SDL_nullframebuffer_c.h @@ -24,9 +24,9 @@ #include "../../SDL_internal.h" -extern int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void SDL_DUMMY_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void SDL_DUMMY_DestroyWindowFramebuffer(_THIS, SDL_Window *window); #endif /* SDL_nullframebuffer_c_h_ */ diff --git a/modules/SDL2/src/video/dummy/SDL_nullvideo.c b/modules/SDL2/src/video/dummy/SDL_nullvideo.c index c63c4c1..109066d 100644 --- a/modules/SDL2/src/video/dummy/SDL_nullvideo.c +++ b/modules/SDL2/src/video/dummy/SDL_nullvideo.c @@ -48,12 +48,12 @@ #include "SDL_nullframebuffer_c.h" #include "SDL_hints.h" -#define DUMMYVID_DRIVER_NAME "dummy" +#define DUMMYVID_DRIVER_NAME "dummy" #define DUMMYVID_DRIVER_EVDEV_NAME "evdev" /* Initialization/Query functions */ static int DUMMY_VideoInit(_THIS); -static int DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +static int DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); static void DUMMY_VideoQuit(_THIS); #if SDL_INPUT_LINUXEV @@ -63,44 +63,41 @@ static void DUMMY_EVDEV_Poll(_THIS); /* DUMMY driver bootstrap functions */ -static int -DUMMY_Available(void) +static int DUMMY_Available(void) { const char *envr = SDL_GetHint(SDL_HINT_VIDEODRIVER); if (envr) { if (SDL_strcmp(envr, DUMMYVID_DRIVER_NAME) == 0) { return 1; } - #if SDL_INPUT_LINUXEV +#if SDL_INPUT_LINUXEV if (SDL_strcmp(envr, DUMMYVID_DRIVER_EVDEV_NAME) == 0) { evdev = 1; return 1; } - #endif +#endif } return 0; } -static void -DUMMY_DeleteDevice(SDL_VideoDevice * device) +static void DUMMY_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device); } -static SDL_VideoDevice * -DUMMY_CreateDevice(void) +static SDL_VideoDevice *DUMMY_CreateDevice(void) { SDL_VideoDevice *device; if (!DUMMY_Available()) { - return (0); + return 0; } /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } device->is_dummy = SDL_TRUE; @@ -109,11 +106,11 @@ DUMMY_CreateDevice(void) device->VideoQuit = DUMMY_VideoQuit; device->SetDisplayMode = DUMMY_SetDisplayMode; device->PumpEvents = DUMMY_PumpEvents; - #if SDL_INPUT_LINUXEV +#if SDL_INPUT_LINUXEV if (evdev) { device->PumpEvents = DUMMY_EVDEV_Poll; } - #endif +#endif device->CreateWindowFramebuffer = SDL_DUMMY_CreateWindowFramebuffer; device->UpdateWindowFramebuffer = SDL_DUMMY_UpdateWindowFramebuffer; device->DestroyWindowFramebuffer = SDL_DUMMY_DestroyWindowFramebuffer; @@ -136,14 +133,14 @@ VideoBootStrap DUMMY_evdev_bootstrap = { void SDL_EVDEV_Init(void); void SDL_EVDEV_Poll(); void SDL_EVDEV_Quit(void); -static void DUMMY_EVDEV_Poll(_THIS) { - (void) _this; +static void DUMMY_EVDEV_Poll(_THIS) +{ + (void)_this; SDL_EVDEV_Poll(); } #endif -int -DUMMY_VideoInit(_THIS) +int DUMMY_VideoInit(_THIS) { SDL_DisplayMode mode; @@ -160,27 +157,24 @@ DUMMY_VideoInit(_THIS) SDL_AddDisplayMode(&_this->displays[0], &mode); - #if SDL_INPUT_LINUXEV +#if SDL_INPUT_LINUXEV SDL_EVDEV_Init(); - #endif +#endif /* We're done! */ return 0; } -static int -DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } - -void -DUMMY_VideoQuit(_THIS) +void DUMMY_VideoQuit(_THIS) { - #if SDL_INPUT_LINUXEV +#if SDL_INPUT_LINUXEV SDL_EVDEV_Quit(); - #endif +#endif } #endif /* SDL_VIDEO_DRIVER_DUMMY */ diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.c b/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.c index 9cb9588..e08d06b 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.c +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.c @@ -44,232 +44,231 @@ https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode */ static const SDL_Keycode emscripten_keycode_table[] = { - /* 0 */ SDLK_UNKNOWN, - /* 1 */ SDLK_UNKNOWN, - /* 2 */ SDLK_UNKNOWN, - /* 3 */ SDLK_CANCEL, - /* 4 */ SDLK_UNKNOWN, - /* 5 */ SDLK_UNKNOWN, - /* 6 */ SDLK_HELP, - /* 7 */ SDLK_UNKNOWN, - /* 8 */ SDLK_BACKSPACE, - /* 9 */ SDLK_TAB, - /* 10 */ SDLK_UNKNOWN, - /* 11 */ SDLK_UNKNOWN, - /* 12 */ SDLK_KP_5, - /* 13 */ SDLK_RETURN, - /* 14 */ SDLK_UNKNOWN, - /* 15 */ SDLK_UNKNOWN, - /* 16 */ SDLK_LSHIFT, - /* 17 */ SDLK_LCTRL, - /* 18 */ SDLK_LALT, - /* 19 */ SDLK_PAUSE, - /* 20 */ SDLK_CAPSLOCK, - /* 21 */ SDLK_UNKNOWN, - /* 22 */ SDLK_UNKNOWN, - /* 23 */ SDLK_UNKNOWN, - /* 24 */ SDLK_UNKNOWN, - /* 25 */ SDLK_UNKNOWN, - /* 26 */ SDLK_UNKNOWN, - /* 27 */ SDLK_ESCAPE, - /* 28 */ SDLK_UNKNOWN, - /* 29 */ SDLK_UNKNOWN, - /* 30 */ SDLK_UNKNOWN, - /* 31 */ SDLK_UNKNOWN, - /* 32 */ SDLK_SPACE, - /* 33 */ SDLK_PAGEUP, - /* 34 */ SDLK_PAGEDOWN, - /* 35 */ SDLK_END, - /* 36 */ SDLK_HOME, - /* 37 */ SDLK_LEFT, - /* 38 */ SDLK_UP, - /* 39 */ SDLK_RIGHT, - /* 40 */ SDLK_DOWN, - /* 41 */ SDLK_UNKNOWN, - /* 42 */ SDLK_UNKNOWN, - /* 43 */ SDLK_UNKNOWN, - /* 44 */ SDLK_UNKNOWN, - /* 45 */ SDLK_INSERT, - /* 46 */ SDLK_DELETE, - /* 47 */ SDLK_UNKNOWN, - /* 48 */ SDLK_0, - /* 49 */ SDLK_1, - /* 50 */ SDLK_2, - /* 51 */ SDLK_3, - /* 52 */ SDLK_4, - /* 53 */ SDLK_5, - /* 54 */ SDLK_6, - /* 55 */ SDLK_7, - /* 56 */ SDLK_8, - /* 57 */ SDLK_9, - /* 58 */ SDLK_UNKNOWN, - /* 59 */ SDLK_SEMICOLON, - /* 60 */ SDLK_BACKSLASH /*SDL_SCANCODE_NONUSBACKSLASH*/, - /* 61 */ SDLK_EQUALS, - /* 62 */ SDLK_UNKNOWN, - /* 63 */ SDLK_MINUS, - /* 64 */ SDLK_UNKNOWN, - /* 65 */ SDLK_a, - /* 66 */ SDLK_b, - /* 67 */ SDLK_c, - /* 68 */ SDLK_d, - /* 69 */ SDLK_e, - /* 70 */ SDLK_f, - /* 71 */ SDLK_g, - /* 72 */ SDLK_h, - /* 73 */ SDLK_i, - /* 74 */ SDLK_j, - /* 75 */ SDLK_k, - /* 76 */ SDLK_l, - /* 77 */ SDLK_m, - /* 78 */ SDLK_n, - /* 79 */ SDLK_o, - /* 80 */ SDLK_p, - /* 81 */ SDLK_q, - /* 82 */ SDLK_r, - /* 83 */ SDLK_s, - /* 84 */ SDLK_t, - /* 85 */ SDLK_u, - /* 86 */ SDLK_v, - /* 87 */ SDLK_w, - /* 88 */ SDLK_x, - /* 89 */ SDLK_y, - /* 90 */ SDLK_z, - /* 91 */ SDLK_LGUI, - /* 92 */ SDLK_UNKNOWN, - /* 93 */ SDLK_APPLICATION, - /* 94 */ SDLK_UNKNOWN, - /* 95 */ SDLK_UNKNOWN, - /* 96 */ SDLK_KP_0, - /* 97 */ SDLK_KP_1, - /* 98 */ SDLK_KP_2, - /* 99 */ SDLK_KP_3, - /* 100 */ SDLK_KP_4, - /* 101 */ SDLK_KP_5, - /* 102 */ SDLK_KP_6, - /* 103 */ SDLK_KP_7, - /* 104 */ SDLK_KP_8, - /* 105 */ SDLK_KP_9, - /* 106 */ SDLK_KP_MULTIPLY, - /* 107 */ SDLK_KP_PLUS, - /* 108 */ SDLK_UNKNOWN, - /* 109 */ SDLK_KP_MINUS, - /* 110 */ SDLK_KP_PERIOD, - /* 111 */ SDLK_KP_DIVIDE, - /* 112 */ SDLK_F1, - /* 113 */ SDLK_F2, - /* 114 */ SDLK_F3, - /* 115 */ SDLK_F4, - /* 116 */ SDLK_F5, - /* 117 */ SDLK_F6, - /* 118 */ SDLK_F7, - /* 119 */ SDLK_F8, - /* 120 */ SDLK_F9, - /* 121 */ SDLK_F10, - /* 122 */ SDLK_F11, - /* 123 */ SDLK_F12, - /* 124 */ SDLK_F13, - /* 125 */ SDLK_F14, - /* 126 */ SDLK_F15, - /* 127 */ SDLK_F16, - /* 128 */ SDLK_F17, - /* 129 */ SDLK_F18, - /* 130 */ SDLK_F19, - /* 131 */ SDLK_F20, - /* 132 */ SDLK_F21, - /* 133 */ SDLK_F22, - /* 134 */ SDLK_F23, - /* 135 */ SDLK_F24, - /* 136 */ SDLK_UNKNOWN, - /* 137 */ SDLK_UNKNOWN, - /* 138 */ SDLK_UNKNOWN, - /* 139 */ SDLK_UNKNOWN, - /* 140 */ SDLK_UNKNOWN, - /* 141 */ SDLK_UNKNOWN, - /* 142 */ SDLK_UNKNOWN, - /* 143 */ SDLK_UNKNOWN, - /* 144 */ SDLK_NUMLOCKCLEAR, - /* 145 */ SDLK_SCROLLLOCK, - /* 146 */ SDLK_UNKNOWN, - /* 147 */ SDLK_UNKNOWN, - /* 148 */ SDLK_UNKNOWN, - /* 149 */ SDLK_UNKNOWN, - /* 150 */ SDLK_UNKNOWN, - /* 151 */ SDLK_UNKNOWN, - /* 152 */ SDLK_UNKNOWN, - /* 153 */ SDLK_UNKNOWN, - /* 154 */ SDLK_UNKNOWN, - /* 155 */ SDLK_UNKNOWN, - /* 156 */ SDLK_UNKNOWN, - /* 157 */ SDLK_UNKNOWN, - /* 158 */ SDLK_UNKNOWN, - /* 159 */ SDLK_UNKNOWN, - /* 160 */ SDLK_BACKQUOTE, - /* 161 */ SDLK_UNKNOWN, - /* 162 */ SDLK_UNKNOWN, - /* 163 */ SDLK_KP_HASH, /*KaiOS phone keypad*/ - /* 164 */ SDLK_UNKNOWN, - /* 165 */ SDLK_UNKNOWN, - /* 166 */ SDLK_UNKNOWN, - /* 167 */ SDLK_UNKNOWN, - /* 168 */ SDLK_UNKNOWN, - /* 169 */ SDLK_UNKNOWN, - /* 170 */ SDLK_KP_MULTIPLY, /*KaiOS phone keypad*/ - /* 171 */ SDLK_RIGHTBRACKET, - /* 172 */ SDLK_UNKNOWN, - /* 173 */ SDLK_MINUS, /*FX*/ - /* 174 */ SDLK_VOLUMEDOWN, /*IE, Chrome*/ - /* 175 */ SDLK_VOLUMEUP, /*IE, Chrome*/ - /* 176 */ SDLK_AUDIONEXT, /*IE, Chrome*/ - /* 177 */ SDLK_AUDIOPREV, /*IE, Chrome*/ - /* 178 */ SDLK_UNKNOWN, - /* 179 */ SDLK_AUDIOPLAY, /*IE, Chrome*/ - /* 180 */ SDLK_UNKNOWN, - /* 181 */ SDLK_AUDIOMUTE, /*FX*/ - /* 182 */ SDLK_VOLUMEDOWN, /*FX*/ - /* 183 */ SDLK_VOLUMEUP, /*FX*/ - /* 184 */ SDLK_UNKNOWN, - /* 185 */ SDLK_UNKNOWN, - /* 186 */ SDLK_SEMICOLON, /*IE, Chrome, D3E legacy*/ - /* 187 */ SDLK_EQUALS, /*IE, Chrome, D3E legacy*/ - /* 188 */ SDLK_COMMA, - /* 189 */ SDLK_MINUS, /*IE, Chrome, D3E legacy*/ - /* 190 */ SDLK_PERIOD, - /* 191 */ SDLK_SLASH, - /* 192 */ SDLK_BACKQUOTE, /*FX, D3E legacy (SDLK_APOSTROPHE in IE/Chrome)*/ - /* 193 */ SDLK_UNKNOWN, - /* 194 */ SDLK_UNKNOWN, - /* 195 */ SDLK_UNKNOWN, - /* 196 */ SDLK_UNKNOWN, - /* 197 */ SDLK_UNKNOWN, - /* 198 */ SDLK_UNKNOWN, - /* 199 */ SDLK_UNKNOWN, - /* 200 */ SDLK_UNKNOWN, - /* 201 */ SDLK_UNKNOWN, - /* 202 */ SDLK_UNKNOWN, - /* 203 */ SDLK_UNKNOWN, - /* 204 */ SDLK_UNKNOWN, - /* 205 */ SDLK_UNKNOWN, - /* 206 */ SDLK_UNKNOWN, - /* 207 */ SDLK_UNKNOWN, - /* 208 */ SDLK_UNKNOWN, - /* 209 */ SDLK_UNKNOWN, - /* 210 */ SDLK_UNKNOWN, - /* 211 */ SDLK_UNKNOWN, - /* 212 */ SDLK_UNKNOWN, - /* 213 */ SDLK_UNKNOWN, - /* 214 */ SDLK_UNKNOWN, - /* 215 */ SDLK_UNKNOWN, - /* 216 */ SDLK_UNKNOWN, - /* 217 */ SDLK_UNKNOWN, - /* 218 */ SDLK_UNKNOWN, - /* 219 */ SDLK_LEFTBRACKET, - /* 220 */ SDLK_BACKSLASH, - /* 221 */ SDLK_RIGHTBRACKET, - /* 222 */ SDLK_QUOTE, /*FX, D3E legacy*/ + /* 0 */ SDLK_UNKNOWN, + /* 1 */ SDLK_UNKNOWN, + /* 2 */ SDLK_UNKNOWN, + /* 3 */ SDLK_CANCEL, + /* 4 */ SDLK_UNKNOWN, + /* 5 */ SDLK_UNKNOWN, + /* 6 */ SDLK_HELP, + /* 7 */ SDLK_UNKNOWN, + /* 8 */ SDLK_BACKSPACE, + /* 9 */ SDLK_TAB, + /* 10 */ SDLK_UNKNOWN, + /* 11 */ SDLK_UNKNOWN, + /* 12 */ SDLK_KP_5, + /* 13 */ SDLK_RETURN, + /* 14 */ SDLK_UNKNOWN, + /* 15 */ SDLK_UNKNOWN, + /* 16 */ SDLK_LSHIFT, + /* 17 */ SDLK_LCTRL, + /* 18 */ SDLK_LALT, + /* 19 */ SDLK_PAUSE, + /* 20 */ SDLK_CAPSLOCK, + /* 21 */ SDLK_UNKNOWN, + /* 22 */ SDLK_UNKNOWN, + /* 23 */ SDLK_UNKNOWN, + /* 24 */ SDLK_UNKNOWN, + /* 25 */ SDLK_UNKNOWN, + /* 26 */ SDLK_UNKNOWN, + /* 27 */ SDLK_ESCAPE, + /* 28 */ SDLK_UNKNOWN, + /* 29 */ SDLK_UNKNOWN, + /* 30 */ SDLK_UNKNOWN, + /* 31 */ SDLK_UNKNOWN, + /* 32 */ SDLK_SPACE, + /* 33 */ SDLK_PAGEUP, + /* 34 */ SDLK_PAGEDOWN, + /* 35 */ SDLK_END, + /* 36 */ SDLK_HOME, + /* 37 */ SDLK_LEFT, + /* 38 */ SDLK_UP, + /* 39 */ SDLK_RIGHT, + /* 40 */ SDLK_DOWN, + /* 41 */ SDLK_UNKNOWN, + /* 42 */ SDLK_UNKNOWN, + /* 43 */ SDLK_UNKNOWN, + /* 44 */ SDLK_UNKNOWN, + /* 45 */ SDLK_INSERT, + /* 46 */ SDLK_DELETE, + /* 47 */ SDLK_UNKNOWN, + /* 48 */ SDLK_0, + /* 49 */ SDLK_1, + /* 50 */ SDLK_2, + /* 51 */ SDLK_3, + /* 52 */ SDLK_4, + /* 53 */ SDLK_5, + /* 54 */ SDLK_6, + /* 55 */ SDLK_7, + /* 56 */ SDLK_8, + /* 57 */ SDLK_9, + /* 58 */ SDLK_UNKNOWN, + /* 59 */ SDLK_SEMICOLON, + /* 60 */ SDLK_BACKSLASH /*SDL_SCANCODE_NONUSBACKSLASH*/, + /* 61 */ SDLK_EQUALS, + /* 62 */ SDLK_UNKNOWN, + /* 63 */ SDLK_MINUS, + /* 64 */ SDLK_UNKNOWN, + /* 65 */ SDLK_a, + /* 66 */ SDLK_b, + /* 67 */ SDLK_c, + /* 68 */ SDLK_d, + /* 69 */ SDLK_e, + /* 70 */ SDLK_f, + /* 71 */ SDLK_g, + /* 72 */ SDLK_h, + /* 73 */ SDLK_i, + /* 74 */ SDLK_j, + /* 75 */ SDLK_k, + /* 76 */ SDLK_l, + /* 77 */ SDLK_m, + /* 78 */ SDLK_n, + /* 79 */ SDLK_o, + /* 80 */ SDLK_p, + /* 81 */ SDLK_q, + /* 82 */ SDLK_r, + /* 83 */ SDLK_s, + /* 84 */ SDLK_t, + /* 85 */ SDLK_u, + /* 86 */ SDLK_v, + /* 87 */ SDLK_w, + /* 88 */ SDLK_x, + /* 89 */ SDLK_y, + /* 90 */ SDLK_z, + /* 91 */ SDLK_LGUI, + /* 92 */ SDLK_UNKNOWN, + /* 93 */ SDLK_APPLICATION, + /* 94 */ SDLK_UNKNOWN, + /* 95 */ SDLK_UNKNOWN, + /* 96 */ SDLK_KP_0, + /* 97 */ SDLK_KP_1, + /* 98 */ SDLK_KP_2, + /* 99 */ SDLK_KP_3, + /* 100 */ SDLK_KP_4, + /* 101 */ SDLK_KP_5, + /* 102 */ SDLK_KP_6, + /* 103 */ SDLK_KP_7, + /* 104 */ SDLK_KP_8, + /* 105 */ SDLK_KP_9, + /* 106 */ SDLK_KP_MULTIPLY, + /* 107 */ SDLK_KP_PLUS, + /* 108 */ SDLK_UNKNOWN, + /* 109 */ SDLK_KP_MINUS, + /* 110 */ SDLK_KP_PERIOD, + /* 111 */ SDLK_KP_DIVIDE, + /* 112 */ SDLK_F1, + /* 113 */ SDLK_F2, + /* 114 */ SDLK_F3, + /* 115 */ SDLK_F4, + /* 116 */ SDLK_F5, + /* 117 */ SDLK_F6, + /* 118 */ SDLK_F7, + /* 119 */ SDLK_F8, + /* 120 */ SDLK_F9, + /* 121 */ SDLK_F10, + /* 122 */ SDLK_F11, + /* 123 */ SDLK_F12, + /* 124 */ SDLK_F13, + /* 125 */ SDLK_F14, + /* 126 */ SDLK_F15, + /* 127 */ SDLK_F16, + /* 128 */ SDLK_F17, + /* 129 */ SDLK_F18, + /* 130 */ SDLK_F19, + /* 131 */ SDLK_F20, + /* 132 */ SDLK_F21, + /* 133 */ SDLK_F22, + /* 134 */ SDLK_F23, + /* 135 */ SDLK_F24, + /* 136 */ SDLK_UNKNOWN, + /* 137 */ SDLK_UNKNOWN, + /* 138 */ SDLK_UNKNOWN, + /* 139 */ SDLK_UNKNOWN, + /* 140 */ SDLK_UNKNOWN, + /* 141 */ SDLK_UNKNOWN, + /* 142 */ SDLK_UNKNOWN, + /* 143 */ SDLK_UNKNOWN, + /* 144 */ SDLK_NUMLOCKCLEAR, + /* 145 */ SDLK_SCROLLLOCK, + /* 146 */ SDLK_UNKNOWN, + /* 147 */ SDLK_UNKNOWN, + /* 148 */ SDLK_UNKNOWN, + /* 149 */ SDLK_UNKNOWN, + /* 150 */ SDLK_UNKNOWN, + /* 151 */ SDLK_UNKNOWN, + /* 152 */ SDLK_UNKNOWN, + /* 153 */ SDLK_UNKNOWN, + /* 154 */ SDLK_UNKNOWN, + /* 155 */ SDLK_UNKNOWN, + /* 156 */ SDLK_UNKNOWN, + /* 157 */ SDLK_UNKNOWN, + /* 158 */ SDLK_UNKNOWN, + /* 159 */ SDLK_UNKNOWN, + /* 160 */ SDLK_BACKQUOTE, + /* 161 */ SDLK_UNKNOWN, + /* 162 */ SDLK_UNKNOWN, + /* 163 */ SDLK_KP_HASH, /*KaiOS phone keypad*/ + /* 164 */ SDLK_UNKNOWN, + /* 165 */ SDLK_UNKNOWN, + /* 166 */ SDLK_UNKNOWN, + /* 167 */ SDLK_UNKNOWN, + /* 168 */ SDLK_UNKNOWN, + /* 169 */ SDLK_UNKNOWN, + /* 170 */ SDLK_KP_MULTIPLY, /*KaiOS phone keypad*/ + /* 171 */ SDLK_RIGHTBRACKET, + /* 172 */ SDLK_UNKNOWN, + /* 173 */ SDLK_MINUS, /*FX*/ + /* 174 */ SDLK_VOLUMEDOWN, /*IE, Chrome*/ + /* 175 */ SDLK_VOLUMEUP, /*IE, Chrome*/ + /* 176 */ SDLK_AUDIONEXT, /*IE, Chrome*/ + /* 177 */ SDLK_AUDIOPREV, /*IE, Chrome*/ + /* 178 */ SDLK_UNKNOWN, + /* 179 */ SDLK_AUDIOPLAY, /*IE, Chrome*/ + /* 180 */ SDLK_UNKNOWN, + /* 181 */ SDLK_AUDIOMUTE, /*FX*/ + /* 182 */ SDLK_VOLUMEDOWN, /*FX*/ + /* 183 */ SDLK_VOLUMEUP, /*FX*/ + /* 184 */ SDLK_UNKNOWN, + /* 185 */ SDLK_UNKNOWN, + /* 186 */ SDLK_SEMICOLON, /*IE, Chrome, D3E legacy*/ + /* 187 */ SDLK_EQUALS, /*IE, Chrome, D3E legacy*/ + /* 188 */ SDLK_COMMA, + /* 189 */ SDLK_MINUS, /*IE, Chrome, D3E legacy*/ + /* 190 */ SDLK_PERIOD, + /* 191 */ SDLK_SLASH, + /* 192 */ SDLK_BACKQUOTE, /*FX, D3E legacy (SDLK_APOSTROPHE in IE/Chrome)*/ + /* 193 */ SDLK_UNKNOWN, + /* 194 */ SDLK_UNKNOWN, + /* 195 */ SDLK_UNKNOWN, + /* 196 */ SDLK_UNKNOWN, + /* 197 */ SDLK_UNKNOWN, + /* 198 */ SDLK_UNKNOWN, + /* 199 */ SDLK_UNKNOWN, + /* 200 */ SDLK_UNKNOWN, + /* 201 */ SDLK_UNKNOWN, + /* 202 */ SDLK_UNKNOWN, + /* 203 */ SDLK_UNKNOWN, + /* 204 */ SDLK_UNKNOWN, + /* 205 */ SDLK_UNKNOWN, + /* 206 */ SDLK_UNKNOWN, + /* 207 */ SDLK_UNKNOWN, + /* 208 */ SDLK_UNKNOWN, + /* 209 */ SDLK_UNKNOWN, + /* 210 */ SDLK_UNKNOWN, + /* 211 */ SDLK_UNKNOWN, + /* 212 */ SDLK_UNKNOWN, + /* 213 */ SDLK_UNKNOWN, + /* 214 */ SDLK_UNKNOWN, + /* 215 */ SDLK_UNKNOWN, + /* 216 */ SDLK_UNKNOWN, + /* 217 */ SDLK_UNKNOWN, + /* 218 */ SDLK_UNKNOWN, + /* 219 */ SDLK_LEFTBRACKET, + /* 220 */ SDLK_BACKSLASH, + /* 221 */ SDLK_RIGHTBRACKET, + /* 222 */ SDLK_QUOTE, /*FX, D3E legacy*/ }; - /* Emscripten PK code to scancode https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent @@ -405,8 +404,7 @@ static const SDL_Scancode emscripten_scancode_table[] = { /* 0x7E "NumpadComma" */ SDL_SCANCODE_KP_COMMA }; -static SDL_Scancode -Emscripten_MapScanCode(const char *code) +static SDL_Scancode Emscripten_MapScanCode(const char *code) { const DOM_PK_CODE_TYPE pk_code = emscripten_compute_dom_pk_code(code); if (pk_code < SDL_arraysize(emscripten_scancode_table)) { @@ -414,97 +412,96 @@ Emscripten_MapScanCode(const char *code) } switch (pk_code) { - case DOM_PK_PASTE: - return SDL_SCANCODE_PASTE; - case DOM_PK_MEDIA_TRACK_PREVIOUS: - return SDL_SCANCODE_AUDIOPREV; - case DOM_PK_CUT: - return SDL_SCANCODE_CUT; - case DOM_PK_COPY: - return SDL_SCANCODE_COPY; - case DOM_PK_MEDIA_TRACK_NEXT: - return SDL_SCANCODE_AUDIONEXT; - case DOM_PK_NUMPAD_ENTER: - return SDL_SCANCODE_KP_ENTER; - case DOM_PK_CONTROL_RIGHT: - return SDL_SCANCODE_RCTRL; - case DOM_PK_AUDIO_VOLUME_MUTE: - return SDL_SCANCODE_AUDIOMUTE; - case DOM_PK_LAUNCH_APP_2: - return SDL_SCANCODE_CALCULATOR; - case DOM_PK_MEDIA_PLAY_PAUSE: - return SDL_SCANCODE_AUDIOPLAY; - case DOM_PK_MEDIA_STOP: - return SDL_SCANCODE_AUDIOSTOP; - case DOM_PK_EJECT: - return SDL_SCANCODE_EJECT; - case DOM_PK_AUDIO_VOLUME_DOWN: - return SDL_SCANCODE_VOLUMEDOWN; - case DOM_PK_AUDIO_VOLUME_UP: - return SDL_SCANCODE_VOLUMEUP; - case DOM_PK_BROWSER_HOME: - return SDL_SCANCODE_AC_HOME; - case DOM_PK_NUMPAD_DIVIDE: - return SDL_SCANCODE_KP_DIVIDE; - case DOM_PK_ALT_RIGHT: - return SDL_SCANCODE_RALT; - case DOM_PK_HELP: - return SDL_SCANCODE_HELP; - case DOM_PK_NUM_LOCK: - return SDL_SCANCODE_NUMLOCKCLEAR; - case DOM_PK_HOME: - return SDL_SCANCODE_HOME; - case DOM_PK_ARROW_UP: - return SDL_SCANCODE_UP; - case DOM_PK_PAGE_UP: - return SDL_SCANCODE_PAGEUP; - case DOM_PK_ARROW_LEFT: - return SDL_SCANCODE_LEFT; - case DOM_PK_ARROW_RIGHT: - return SDL_SCANCODE_RIGHT; - case DOM_PK_END: - return SDL_SCANCODE_END; - case DOM_PK_ARROW_DOWN: - return SDL_SCANCODE_DOWN; - case DOM_PK_PAGE_DOWN: - return SDL_SCANCODE_PAGEDOWN; - case DOM_PK_INSERT: - return SDL_SCANCODE_INSERT; - case DOM_PK_DELETE: - return SDL_SCANCODE_DELETE; - case DOM_PK_META_LEFT: - return SDL_SCANCODE_LGUI; - case DOM_PK_META_RIGHT: - return SDL_SCANCODE_RGUI; - case DOM_PK_CONTEXT_MENU: - return SDL_SCANCODE_APPLICATION; - case DOM_PK_POWER: - return SDL_SCANCODE_POWER; - case DOM_PK_BROWSER_SEARCH: - return SDL_SCANCODE_AC_SEARCH; - case DOM_PK_BROWSER_FAVORITES: - return SDL_SCANCODE_AC_BOOKMARKS; - case DOM_PK_BROWSER_REFRESH: - return SDL_SCANCODE_AC_REFRESH; - case DOM_PK_BROWSER_STOP: - return SDL_SCANCODE_AC_STOP; - case DOM_PK_BROWSER_FORWARD: - return SDL_SCANCODE_AC_FORWARD; - case DOM_PK_BROWSER_BACK: - return SDL_SCANCODE_AC_BACK; - case DOM_PK_LAUNCH_APP_1: - return SDL_SCANCODE_COMPUTER; - case DOM_PK_LAUNCH_MAIL: - return SDL_SCANCODE_MAIL; - case DOM_PK_MEDIA_SELECT: - return SDL_SCANCODE_MEDIASELECT; + case DOM_PK_PASTE: + return SDL_SCANCODE_PASTE; + case DOM_PK_MEDIA_TRACK_PREVIOUS: + return SDL_SCANCODE_AUDIOPREV; + case DOM_PK_CUT: + return SDL_SCANCODE_CUT; + case DOM_PK_COPY: + return SDL_SCANCODE_COPY; + case DOM_PK_MEDIA_TRACK_NEXT: + return SDL_SCANCODE_AUDIONEXT; + case DOM_PK_NUMPAD_ENTER: + return SDL_SCANCODE_KP_ENTER; + case DOM_PK_CONTROL_RIGHT: + return SDL_SCANCODE_RCTRL; + case DOM_PK_AUDIO_VOLUME_MUTE: + return SDL_SCANCODE_AUDIOMUTE; + case DOM_PK_LAUNCH_APP_2: + return SDL_SCANCODE_CALCULATOR; + case DOM_PK_MEDIA_PLAY_PAUSE: + return SDL_SCANCODE_AUDIOPLAY; + case DOM_PK_MEDIA_STOP: + return SDL_SCANCODE_AUDIOSTOP; + case DOM_PK_EJECT: + return SDL_SCANCODE_EJECT; + case DOM_PK_AUDIO_VOLUME_DOWN: + return SDL_SCANCODE_VOLUMEDOWN; + case DOM_PK_AUDIO_VOLUME_UP: + return SDL_SCANCODE_VOLUMEUP; + case DOM_PK_BROWSER_HOME: + return SDL_SCANCODE_AC_HOME; + case DOM_PK_NUMPAD_DIVIDE: + return SDL_SCANCODE_KP_DIVIDE; + case DOM_PK_ALT_RIGHT: + return SDL_SCANCODE_RALT; + case DOM_PK_HELP: + return SDL_SCANCODE_HELP; + case DOM_PK_NUM_LOCK: + return SDL_SCANCODE_NUMLOCKCLEAR; + case DOM_PK_HOME: + return SDL_SCANCODE_HOME; + case DOM_PK_ARROW_UP: + return SDL_SCANCODE_UP; + case DOM_PK_PAGE_UP: + return SDL_SCANCODE_PAGEUP; + case DOM_PK_ARROW_LEFT: + return SDL_SCANCODE_LEFT; + case DOM_PK_ARROW_RIGHT: + return SDL_SCANCODE_RIGHT; + case DOM_PK_END: + return SDL_SCANCODE_END; + case DOM_PK_ARROW_DOWN: + return SDL_SCANCODE_DOWN; + case DOM_PK_PAGE_DOWN: + return SDL_SCANCODE_PAGEDOWN; + case DOM_PK_INSERT: + return SDL_SCANCODE_INSERT; + case DOM_PK_DELETE: + return SDL_SCANCODE_DELETE; + case DOM_PK_META_LEFT: + return SDL_SCANCODE_LGUI; + case DOM_PK_META_RIGHT: + return SDL_SCANCODE_RGUI; + case DOM_PK_CONTEXT_MENU: + return SDL_SCANCODE_APPLICATION; + case DOM_PK_POWER: + return SDL_SCANCODE_POWER; + case DOM_PK_BROWSER_SEARCH: + return SDL_SCANCODE_AC_SEARCH; + case DOM_PK_BROWSER_FAVORITES: + return SDL_SCANCODE_AC_BOOKMARKS; + case DOM_PK_BROWSER_REFRESH: + return SDL_SCANCODE_AC_REFRESH; + case DOM_PK_BROWSER_STOP: + return SDL_SCANCODE_AC_STOP; + case DOM_PK_BROWSER_FORWARD: + return SDL_SCANCODE_AC_FORWARD; + case DOM_PK_BROWSER_BACK: + return SDL_SCANCODE_AC_BACK; + case DOM_PK_LAUNCH_APP_1: + return SDL_SCANCODE_COMPUTER; + case DOM_PK_LAUNCH_MAIL: + return SDL_SCANCODE_MAIL; + case DOM_PK_MEDIA_SELECT: + return SDL_SCANCODE_MEDIASELECT; } return SDL_SCANCODE_UNKNOWN; } -static SDL_Keycode -Emscripten_MapKeyCode(const EmscriptenKeyboardEvent *keyEvent) +static SDL_Keycode Emscripten_MapKeyCode(const EmscriptenKeyboardEvent *keyEvent) { SDL_Keycode keycode = SDLK_UNKNOWN; if (keyEvent->keyCode < SDL_arraysize(emscripten_keycode_table)) { @@ -512,66 +509,66 @@ Emscripten_MapKeyCode(const EmscriptenKeyboardEvent *keyEvent) if (keycode != SDLK_UNKNOWN) { if (keyEvent->location == DOM_KEY_LOCATION_RIGHT) { switch (keycode) { - case SDLK_LSHIFT: - keycode = SDLK_RSHIFT; - break; - case SDLK_LCTRL: - keycode = SDLK_RCTRL; - break; - case SDLK_LALT: - keycode = SDLK_RALT; - break; - case SDLK_LGUI: - keycode = SDLK_RGUI; - break; + case SDLK_LSHIFT: + keycode = SDLK_RSHIFT; + break; + case SDLK_LCTRL: + keycode = SDLK_RCTRL; + break; + case SDLK_LALT: + keycode = SDLK_RALT; + break; + case SDLK_LGUI: + keycode = SDLK_RGUI; + break; } } else if (keyEvent->location == DOM_KEY_LOCATION_NUMPAD) { switch (keycode) { - case SDLK_0: - case SDLK_INSERT: - keycode = SDLK_KP_0; - break; - case SDLK_1: - case SDLK_END: - keycode = SDLK_KP_1; - break; - case SDLK_2: - case SDLK_DOWN: - keycode = SDLK_KP_2; - break; - case SDLK_3: - case SDLK_PAGEDOWN: - keycode = SDLK_KP_3; - break; - case SDLK_4: - case SDLK_LEFT: - keycode = SDLK_KP_4; - break; - case SDLK_5: - keycode = SDLK_KP_5; - break; - case SDLK_6: - case SDLK_RIGHT: - keycode = SDLK_KP_6; - break; - case SDLK_7: - case SDLK_HOME: - keycode = SDLK_KP_7; - break; - case SDLK_8: - case SDLK_UP: - keycode = SDLK_KP_8; - break; - case SDLK_9: - case SDLK_PAGEUP: - keycode = SDLK_KP_9; - break; - case SDLK_RETURN: - keycode = SDLK_KP_ENTER; - break; - case SDLK_DELETE: - keycode = SDLK_KP_PERIOD; - break; + case SDLK_0: + case SDLK_INSERT: + keycode = SDLK_KP_0; + break; + case SDLK_1: + case SDLK_END: + keycode = SDLK_KP_1; + break; + case SDLK_2: + case SDLK_DOWN: + keycode = SDLK_KP_2; + break; + case SDLK_3: + case SDLK_PAGEDOWN: + keycode = SDLK_KP_3; + break; + case SDLK_4: + case SDLK_LEFT: + keycode = SDLK_KP_4; + break; + case SDLK_5: + keycode = SDLK_KP_5; + break; + case SDLK_6: + case SDLK_RIGHT: + keycode = SDLK_KP_6; + break; + case SDLK_7: + case SDLK_HOME: + keycode = SDLK_KP_7; + break; + case SDLK_8: + case SDLK_UP: + keycode = SDLK_KP_8; + break; + case SDLK_9: + case SDLK_PAGEUP: + keycode = SDLK_KP_9; + break; + case SDLK_RETURN: + keycode = SDLK_KP_ENTER; + break; + case SDLK_DELETE: + keycode = SDLK_KP_PERIOD; + break; } } } @@ -581,26 +578,25 @@ Emscripten_MapKeyCode(const EmscriptenKeyboardEvent *keyEvent) } /* "borrowed" from SDL_windowsevents.c */ -static int -Emscripten_ConvertUTF32toUTF8(Uint32 codepoint, char * text) +static int Emscripten_ConvertUTF32toUTF8(Uint32 codepoint, char *text) { if (codepoint <= 0x7F) { - text[0] = (char) codepoint; + text[0] = (char)codepoint; text[1] = '\0'; } else if (codepoint <= 0x7FF) { - text[0] = 0xC0 | (char) ((codepoint >> 6) & 0x1F); - text[1] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xC0 | (char)((codepoint >> 6) & 0x1F); + text[1] = 0x80 | (char)(codepoint & 0x3F); text[2] = '\0'; } else if (codepoint <= 0xFFFF) { - text[0] = 0xE0 | (char) ((codepoint >> 12) & 0x0F); - text[1] = 0x80 | (char) ((codepoint >> 6) & 0x3F); - text[2] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xE0 | (char)((codepoint >> 12) & 0x0F); + text[1] = 0x80 | (char)((codepoint >> 6) & 0x3F); + text[2] = 0x80 | (char)(codepoint & 0x3F); text[3] = '\0'; } else if (codepoint <= 0x10FFFF) { - text[0] = 0xF0 | (char) ((codepoint >> 18) & 0x0F); - text[1] = 0x80 | (char) ((codepoint >> 12) & 0x3F); - text[2] = 0x80 | (char) ((codepoint >> 6) & 0x3F); - text[3] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xF0 | (char)((codepoint >> 18) & 0x0F); + text[1] = 0x80 | (char)((codepoint >> 12) & 0x3F); + text[2] = 0x80 | (char)((codepoint >> 6) & 0x3F); + text[3] = 0x80 | (char)(codepoint & 0x3F); text[4] = '\0'; } else { return SDL_FALSE; @@ -608,18 +604,15 @@ Emscripten_ConvertUTF32toUTF8(Uint32 codepoint, char * text) return SDL_TRUE; } -static EM_BOOL -Emscripten_HandlePointerLockChange(int eventType, const EmscriptenPointerlockChangeEvent *changeEvent, void *userData) +static EM_BOOL Emscripten_HandlePointerLockChange(int eventType, const EmscriptenPointerlockChangeEvent *changeEvent, void *userData) { - SDL_WindowData *window_data = (SDL_WindowData *) userData; + SDL_WindowData *window_data = (SDL_WindowData *)userData; /* keep track of lock losses, so we can regrab if/when appropriate. */ window_data->has_pointer_lock = changeEvent->isActive; return 0; } - -static EM_BOOL -Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) +static EM_BOOL Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) { SDL_WindowData *window_data = userData; const int isPointerLocked = window_data->has_pointer_lock; @@ -649,38 +642,39 @@ Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent return 0; } -static EM_BOOL -Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) +static EM_BOOL Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) { SDL_WindowData *window_data = userData; Uint8 sdl_button; Uint8 sdl_button_state; SDL_EventType sdl_event_type; double css_w, css_h; + SDL_bool prevent_default = SDL_FALSE; /* needed for iframe implementation in Chrome-based browsers. */ switch (mouseEvent->button) { - case 0: - sdl_button = SDL_BUTTON_LEFT; - break; - case 1: - sdl_button = SDL_BUTTON_MIDDLE; - break; - case 2: - sdl_button = SDL_BUTTON_RIGHT; - break; - default: - return 0; + case 0: + sdl_button = SDL_BUTTON_LEFT; + break; + case 1: + sdl_button = SDL_BUTTON_MIDDLE; + break; + case 2: + sdl_button = SDL_BUTTON_RIGHT; + break; + default: + return 0; } if (eventType == EMSCRIPTEN_EVENT_MOUSEDOWN) { if (SDL_GetMouse()->relative_mode && !window_data->has_pointer_lock) { - emscripten_request_pointerlock(window_data->canvas_id, 0); /* try to regrab lost pointer lock. */ + emscripten_request_pointerlock(window_data->canvas_id, 0); /* try to regrab lost pointer lock. */ } sdl_button_state = SDL_PRESSED; sdl_event_type = SDL_MOUSEBUTTONDOWN; } else { sdl_button_state = SDL_RELEASED; sdl_event_type = SDL_MOUSEBUTTONUP; + prevent_default = SDL_GetEventState(sdl_event_type) == SDL_ENABLE; } SDL_SendMouseButton(window_data->window, 0, sdl_button_state, sdl_button); @@ -691,11 +685,10 @@ Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEve return 0; } - return SDL_GetEventState(sdl_event_type) == SDL_ENABLE; + return prevent_default; } -static EM_BOOL -Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) +static EM_BOOL Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) { SDL_WindowData *window_data = userData; @@ -716,31 +709,29 @@ Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEven return SDL_GetEventState(SDL_WINDOWEVENT) == SDL_ENABLE; } -static EM_BOOL -Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData) +static EM_BOOL Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData) { SDL_WindowData *window_data = userData; float deltaY = wheelEvent->deltaY; switch (wheelEvent->deltaMode) { - case DOM_DELTA_PIXEL: - deltaY /= 100; /* 100 pixels make up a step */ - break; - case DOM_DELTA_LINE: - deltaY /= 3; /* 3 lines make up a step */ - break; - case DOM_DELTA_PAGE: - deltaY *= 80; /* A page makes up 80 steps */ - break; + case DOM_DELTA_PIXEL: + deltaY /= 100; /* 100 pixels make up a step */ + break; + case DOM_DELTA_LINE: + deltaY /= 3; /* 3 lines make up a step */ + break; + case DOM_DELTA_PAGE: + deltaY *= 80; /* A page makes up 80 steps */ + break; } SDL_SendMouseWheel(window_data->window, 0, (float)wheelEvent->deltaX, -deltaY, SDL_MOUSEWHEEL_NORMAL); return SDL_GetEventState(SDL_MOUSEWHEEL) == SDL_ENABLE; } -static EM_BOOL -Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData) +static EM_BOOL Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData) { SDL_WindowData *window_data = userData; /* If the user switches away while keys are pressed (such as @@ -749,22 +740,20 @@ Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, vo SDL_ResetKeyboard(); } - SDL_SendWindowEvent(window_data->window, eventType == EMSCRIPTEN_EVENT_FOCUS ? SDL_WINDOWEVENT_FOCUS_GAINED : SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); return SDL_GetEventState(SDL_WINDOWEVENT) == SDL_ENABLE; } -static EM_BOOL -Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) +static EM_BOOL Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) { - SDL_WindowData *window_data = (SDL_WindowData *) userData; + SDL_WindowData *window_data = (SDL_WindowData *)userData; int i; double client_w, client_h; int preventDefault = 0; SDL_TouchID deviceId = 1; if (SDL_AddTouch(deviceId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) { - return 0; + return 0; } emscripten_get_element_css_size(window_data->canvas_id, &client_w, &client_h); @@ -773,8 +762,9 @@ Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, vo SDL_FingerID id; float x, y; - if (!touchEvent->touches[i].isChanged) + if (!touchEvent->touches[i].isChanged) { continue; + } id = touchEvent->touches[i].identifier; x = touchEvent->touches[i].targetX / client_w; @@ -800,8 +790,7 @@ Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, vo return preventDefault; } -static EM_BOOL -Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) +static EM_BOOL Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) { const SDL_Keycode keycode = Emscripten_MapKeyCode(keyEvent); SDL_Scancode scancode = Emscripten_MapScanCode(keyEvent->code); @@ -824,14 +813,14 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi /* if TEXTINPUT events are enabled we can't prevent keydown or we won't get keypress * we need to ALWAYS prevent backspace and tab otherwise chrome takes action and does bad navigation UX */ - if ( (scancode == SDL_SCANCODE_BACKSPACE) || - (scancode == SDL_SCANCODE_TAB) || - (scancode == SDL_SCANCODE_LEFT) || - (scancode == SDL_SCANCODE_UP) || - (scancode == SDL_SCANCODE_RIGHT) || - (scancode == SDL_SCANCODE_DOWN) || - ((scancode >= SDL_SCANCODE_F1) && (scancode <= SDL_SCANCODE_F15)) || - keyEvent->ctrlKey ) { + if ((scancode == SDL_SCANCODE_BACKSPACE) || + (scancode == SDL_SCANCODE_TAB) || + (scancode == SDL_SCANCODE_LEFT) || + (scancode == SDL_SCANCODE_UP) || + (scancode == SDL_SCANCODE_RIGHT) || + (scancode == SDL_SCANCODE_DOWN) || + ((scancode >= SDL_SCANCODE_F1) && (scancode <= SDL_SCANCODE_F15)) || + keyEvent->ctrlKey) { is_nav_key = SDL_TRUE; } @@ -842,8 +831,7 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi return prevent_default; } -static EM_BOOL -Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) +static EM_BOOL Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) { char text[5]; if (Emscripten_ConvertUTF32toUTF8(keyEvent->charCode, text)) { @@ -852,20 +840,16 @@ Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent return SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE; } -static EM_BOOL -Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData) +static EM_BOOL Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData) { SDL_WindowData *window_data = userData; SDL_VideoDisplay *display; - if(fullscreenChangeEvent->isFullscreen) - { + if (fullscreenChangeEvent->isFullscreen) { window_data->window->flags |= window_data->requested_fullscreen_mode; window_data->requested_fullscreen_mode = 0; - } - else - { + } else { window_data->window->flags &= ~FULLSCREEN_MASK; /* reset fullscreen window if the browser left fullscreen */ @@ -879,8 +863,7 @@ Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChang return 0; } -static EM_BOOL -Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData) +static EM_BOOL Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData) { SDL_WindowData *window_data = userData; SDL_bool force = SDL_FALSE; @@ -893,15 +876,13 @@ Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *u } } - if(!(window_data->window->flags & FULLSCREEN_MASK)) - { + if (!(window_data->window->flags & FULLSCREEN_MASK)) { /* this will only work if the canvas size is set through css */ - if(window_data->window->flags & SDL_WINDOW_RESIZABLE) - { + if (window_data->window->flags & SDL_WINDOW_RESIZABLE) { double w = window_data->window->w; double h = window_data->window->h; - if(window_data->external_size) { + if (window_data->external_size) { emscripten_get_element_css_size(window_data->canvas_id, &w, &h); } @@ -913,9 +894,9 @@ Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *u } if (force) { - /* force the event to trigger, so pixel ratio changes can be handled */ - window_data->window->w = 0; - window_data->window->h = 0; + /* force the event to trigger, so pixel ratio changes can be handled */ + window_data->window->w = 0; + window_data->window->h = 0; } SDL_SendWindowEvent(window_data->window, SDL_WINDOWEVENT_RESIZED, w, h); @@ -931,8 +912,7 @@ Emscripten_HandleCanvasResize(int eventType, const void *reserved, void *userDat /*this is used during fullscreen changes*/ SDL_WindowData *window_data = userData; - if(window_data->fullscreen_resize) - { + if (window_data->fullscreen_resize) { double css_w, css_h; emscripten_get_element_css_size(window_data->canvas_id, &css_w, &css_h); SDL_SendWindowEvent(window_data->window, SDL_WINDOWEVENT_RESIZED, css_w, css_h); @@ -941,16 +921,14 @@ Emscripten_HandleCanvasResize(int eventType, const void *reserved, void *userDat return 0; } -static EM_BOOL -Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChangeEvent *visEvent, void *userData) +static EM_BOOL Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChangeEvent *visEvent, void *userData) { SDL_WindowData *window_data = userData; SDL_SendWindowEvent(window_data->window, visEvent->hidden ? SDL_WINDOWEVENT_HIDDEN : SDL_WINDOWEVENT_SHOWN, 0, 0); return 0; } -static const char* -Emscripten_HandleBeforeUnload(int eventType, const void *reserved, void *userData) +static const char *Emscripten_HandleBeforeUnload(int eventType, const void *reserved, void *userData) { /* This event will need to be handled synchronously, e.g. using SDL_AddEventWatch, as the page is being closed *now*. */ @@ -959,8 +937,7 @@ Emscripten_HandleBeforeUnload(int eventType, const void *reserved, void *userDat return ""; /* don't trigger confirmation dialog */ } -void -Emscripten_RegisterEventHandlers(SDL_WindowData *data) +void Emscripten_RegisterEventHandlers(SDL_WindowData *data) { const char *keyElement; @@ -987,7 +964,9 @@ Emscripten_RegisterEventHandlers(SDL_WindowData *data) /* Keyboard events are awkward */ keyElement = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT); - if (!keyElement) keyElement = EMSCRIPTEN_EVENT_TARGET_WINDOW; + if (keyElement == NULL) { + keyElement = EMSCRIPTEN_EVENT_TARGET_WINDOW; + } emscripten_set_keydown_callback(keyElement, data, 0, Emscripten_HandleKey); emscripten_set_keyup_callback(keyElement, data, 0, Emscripten_HandleKey); @@ -1002,8 +981,7 @@ Emscripten_RegisterEventHandlers(SDL_WindowData *data) emscripten_set_beforeunload_callback(data, Emscripten_HandleBeforeUnload); } -void -Emscripten_UnregisterEventHandlers(SDL_WindowData *data) +void Emscripten_UnregisterEventHandlers(SDL_WindowData *data) { const char *target; @@ -1029,7 +1007,7 @@ Emscripten_UnregisterEventHandlers(SDL_WindowData *data) emscripten_set_pointerlockchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, 0, NULL); target = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT); - if (!target) { + if (target == NULL) { target = EMSCRIPTEN_EVENT_TARGET_WINDOW; } diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.h b/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.h index 7fccf1b..b6c4da0 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.h +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenevents.h @@ -19,7 +19,6 @@ 3. This notice may not be removed or altered from any source distribution. */ - #ifndef SDL_emscriptenevents_h_ #define SDL_emscriptenevents_h_ @@ -37,4 +36,3 @@ Emscripten_HandleCanvasResize(int eventType, const void *reserved, void *userDat #endif /* SDL_emscriptenevents_h_ */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c b/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c index 36c6044..6226198 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c @@ -28,8 +28,7 @@ #include - -int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { SDL_Surface *surface; const Uint32 surface_format = SDL_PIXELFORMAT_BGR888; @@ -38,16 +37,16 @@ int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * form Uint32 Rmask, Gmask, Bmask, Amask; /* Free the old framebuffer surface */ - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; surface = data->surface; SDL_FreeSurface(surface); /* Create a new one */ SDL_PixelFormatEnumToMasks(surface_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask); - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowSizeInPixels(window, &w, &h); surface = SDL_CreateRGBSurface(0, w, h, bpp, Rmask, Gmask, Bmask, Amask); - if (!surface) { + if (surface == NULL) { return -1; } @@ -59,18 +58,19 @@ int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * form return 0; } -int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { SDL_Surface *surface; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; surface = data->surface; - if (!surface) { + if (surface == NULL) { return SDL_SetError("Couldn't find framebuffer surface for window"); } /* Send the data to the display */ + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM({ var w = $0; var h = $1; @@ -166,9 +166,9 @@ int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rec return 0; } -void Emscripten_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void Emscripten_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_FreeSurface(data->surface); data->surface = NULL; diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h b/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h index bf5c354..f23e3ac 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h @@ -23,9 +23,9 @@ #ifndef SDL_emscriptenframebuffer_h_ #define SDL_emscriptenframebuffer_h_ -extern int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void Emscripten_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void Emscripten_DestroyWindowFramebuffer(_THIS, SDL_Window *window); #endif /* SDL_emscriptenframebuffer_h_ */ diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.c b/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.c index 1f5697f..822995c 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.c +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.c @@ -31,16 +31,15 @@ #include "../../events/SDL_mouse_c.h" -static SDL_Cursor* -Emscripten_CreateCursorFromString(const char* cursor_str, SDL_bool is_custom) +static SDL_Cursor *Emscripten_CreateCursorFromString(const char *cursor_str, SDL_bool is_custom) { - SDL_Cursor* cursor; + SDL_Cursor *cursor; Emscripten_CursorData *curdata; cursor = SDL_calloc(1, sizeof(SDL_Cursor)); if (cursor) { - curdata = (Emscripten_CursorData *) SDL_calloc(1, sizeof(*curdata)); - if (!curdata) { + curdata = (Emscripten_CursorData *)SDL_calloc(1, sizeof(*curdata)); + if (curdata == NULL) { SDL_OutOfMemory(); SDL_free(cursor); return NULL; @@ -49,33 +48,30 @@ Emscripten_CreateCursorFromString(const char* cursor_str, SDL_bool is_custom) curdata->system_cursor = cursor_str; curdata->is_custom = is_custom; cursor->driverdata = curdata; - } - else { + } else { SDL_OutOfMemory(); } return cursor; } -static SDL_Cursor* -Emscripten_CreateDefaultCursor() +static SDL_Cursor *Emscripten_CreateDefaultCursor() { return Emscripten_CreateCursorFromString("default", SDL_FALSE); } - -static SDL_Cursor* -Emscripten_CreateCursor(SDL_Surface* surface, int hot_x, int hot_y) +static SDL_Cursor *Emscripten_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { const char *cursor_url = NULL; SDL_Surface *conv_surf; conv_surf = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_ABGR8888, 0); - if (!conv_surf) { + if (conv_surf == NULL) { return NULL; } + /* *INDENT-OFF* */ /* clang-format off */ cursor_url = (const char *)MAIN_THREAD_EM_ASM_INT({ var w = $0; var h = $1; @@ -125,68 +121,67 @@ Emscripten_CreateCursor(SDL_Surface* surface, int hot_x, int hot_y) return urlBuf; }, surface->w, surface->h, hot_x, hot_y, conv_surf->pixels); + /* *INDENT-ON* */ /* clang-format on */ SDL_FreeSurface(conv_surf); return Emscripten_CreateCursorFromString(cursor_url, SDL_TRUE); } -static SDL_Cursor* -Emscripten_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *Emscripten_CreateSystemCursor(SDL_SystemCursor id) { const char *cursor_name = NULL; - switch(id) { - case SDL_SYSTEM_CURSOR_ARROW: - cursor_name = "default"; - break; - case SDL_SYSTEM_CURSOR_IBEAM: - cursor_name = "text"; - break; - case SDL_SYSTEM_CURSOR_WAIT: - cursor_name = "wait"; - break; - case SDL_SYSTEM_CURSOR_CROSSHAIR: - cursor_name = "crosshair"; - break; - case SDL_SYSTEM_CURSOR_WAITARROW: - cursor_name = "progress"; - break; - case SDL_SYSTEM_CURSOR_SIZENWSE: - cursor_name = "nwse-resize"; - break; - case SDL_SYSTEM_CURSOR_SIZENESW: - cursor_name = "nesw-resize"; - break; - case SDL_SYSTEM_CURSOR_SIZEWE: - cursor_name = "ew-resize"; - break; - case SDL_SYSTEM_CURSOR_SIZENS: - cursor_name = "ns-resize"; - break; - case SDL_SYSTEM_CURSOR_SIZEALL: - cursor_name = "move"; - break; - case SDL_SYSTEM_CURSOR_NO: - cursor_name = "not-allowed"; - break; - case SDL_SYSTEM_CURSOR_HAND: - cursor_name = "pointer"; - break; - default: - SDL_assert(0); - return NULL; + switch (id) { + case SDL_SYSTEM_CURSOR_ARROW: + cursor_name = "default"; + break; + case SDL_SYSTEM_CURSOR_IBEAM: + cursor_name = "text"; + break; + case SDL_SYSTEM_CURSOR_WAIT: + cursor_name = "wait"; + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + cursor_name = "crosshair"; + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + cursor_name = "progress"; + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + cursor_name = "nwse-resize"; + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + cursor_name = "nesw-resize"; + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + cursor_name = "ew-resize"; + break; + case SDL_SYSTEM_CURSOR_SIZENS: + cursor_name = "ns-resize"; + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + cursor_name = "move"; + break; + case SDL_SYSTEM_CURSOR_NO: + cursor_name = "not-allowed"; + break; + case SDL_SYSTEM_CURSOR_HAND: + cursor_name = "pointer"; + break; + default: + SDL_assert(0); + return NULL; } return Emscripten_CreateCursorFromString(cursor_name, SDL_FALSE); } -static void -Emscripten_FreeCursor(SDL_Cursor* cursor) +static void Emscripten_FreeCursor(SDL_Cursor *cursor) { Emscripten_CursorData *curdata; if (cursor) { - curdata = (Emscripten_CursorData *) cursor->driverdata; + curdata = (Emscripten_CursorData *)cursor->driverdata; if (curdata != NULL) { if (curdata->is_custom) { @@ -199,86 +194,83 @@ Emscripten_FreeCursor(SDL_Cursor* cursor) } } -static int -Emscripten_ShowCursor(SDL_Cursor* cursor) +static int Emscripten_ShowCursor(SDL_Cursor *cursor) { Emscripten_CursorData *curdata; if (SDL_GetMouseFocus() != NULL) { - if(cursor && cursor->driverdata) { - curdata = (Emscripten_CursorData *) cursor->driverdata; + if (cursor && cursor->driverdata) { + curdata = (Emscripten_CursorData *)cursor->driverdata; - if(curdata->system_cursor) { + if (curdata->system_cursor) { + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM({ if (Module['canvas']) { Module['canvas'].style['cursor'] = UTF8ToString($0); } }, curdata->system_cursor); + /* *INDENT-ON* */ /* clang-format on */ } - } - else { + } else { + /* *INDENT-OFF* */ /* clang-format off */ MAIN_THREAD_EM_ASM( if (Module['canvas']) { Module['canvas'].style['cursor'] = 'none'; } ); + /* *INDENT-ON* */ /* clang-format on */ } } return 0; } -static void -Emscripten_WarpMouse(SDL_Window* window, int x, int y) +static void Emscripten_WarpMouse(SDL_Window *window, int x, int y) { SDL_Unsupported(); } -static int -Emscripten_SetRelativeMouseMode(SDL_bool enabled) +static int Emscripten_SetRelativeMouseMode(SDL_bool enabled) { SDL_Window *window; SDL_WindowData *window_data; /* TODO: pointer lock isn't actually enabled yet */ - if(enabled) { + if (enabled) { window = SDL_GetMouseFocus(); if (window == NULL) { return -1; } - window_data = (SDL_WindowData *) window->driverdata; + window_data = (SDL_WindowData *)window->driverdata; - if(emscripten_request_pointerlock(window_data->canvas_id, 1) >= EMSCRIPTEN_RESULT_SUCCESS) { + if (emscripten_request_pointerlock(window_data->canvas_id, 1) >= EMSCRIPTEN_RESULT_SUCCESS) { return 0; } } else { - if(emscripten_exit_pointerlock() >= EMSCRIPTEN_RESULT_SUCCESS) { + if (emscripten_exit_pointerlock() >= EMSCRIPTEN_RESULT_SUCCESS) { return 0; } } return -1; } -void -Emscripten_InitMouse() +void Emscripten_InitMouse() { - SDL_Mouse* mouse = SDL_GetMouse(); + SDL_Mouse *mouse = SDL_GetMouse(); - mouse->CreateCursor = Emscripten_CreateCursor; - mouse->ShowCursor = Emscripten_ShowCursor; - mouse->FreeCursor = Emscripten_FreeCursor; - mouse->WarpMouse = Emscripten_WarpMouse; - mouse->CreateSystemCursor = Emscripten_CreateSystemCursor; + mouse->CreateCursor = Emscripten_CreateCursor; + mouse->ShowCursor = Emscripten_ShowCursor; + mouse->FreeCursor = Emscripten_FreeCursor; + mouse->WarpMouse = Emscripten_WarpMouse; + mouse->CreateSystemCursor = Emscripten_CreateSystemCursor; mouse->SetRelativeMouseMode = Emscripten_SetRelativeMouseMode; SDL_SetDefaultCursor(Emscripten_CreateDefaultCursor()); } -void -Emscripten_FiniMouse() +void Emscripten_FiniMouse() { } #endif /* SDL_VIDEO_DRIVER_EMSCRIPTEN */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.h b/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.h index e8f345c..8b0f656 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.h +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenmouse.h @@ -19,7 +19,6 @@ 3. This notice may not be removed or altered from any source distribution. */ - #ifndef SDL_emscriptenmouse_h_ #define SDL_emscriptenmouse_h_ diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenopengles.c b/modules/SDL2/src/video/emscripten/SDL_emscriptenopengles.c index d4bea2b..aea127f 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenopengles.c +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenopengles.c @@ -33,8 +33,8 @@ /* EGL implementation of SDL OpenGL support */ -int -Emscripten_GLES_LoadLibrary(_THIS, const char *path) { +int Emscripten_GLES_LoadLibrary(_THIS, const char *path) +{ /*we can't load EGL dynamically*/ _this->egl_data = (struct SDL_EGL_VideoData *) SDL_calloc(1, sizeof(SDL_EGL_VideoData)); if (!_this->egl_data) { @@ -68,7 +68,7 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) { if (!_this->egl_data->egl_display) { return SDL_SetError("Could not get EGL display"); } - + if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) { return SDL_SetError("Could not initialize EGL"); } @@ -78,15 +78,14 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) { } else { *_this->gl_config.driver_path = '\0'; } - + return 0; } SDL_EGL_CreateContext_impl(Emscripten) SDL_EGL_MakeCurrent_impl(Emscripten) -int -Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window) +int Emscripten_GLES_SwapWindow(_THIS, SDL_Window *window) { EGLBoolean ret = SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); if (emscripten_has_asyncify() && SDL_GetHintBoolean(SDL_HINT_EMSCRIPTEN_ASYNCIFY, SDL_TRUE)) { @@ -99,4 +98,3 @@ Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window) #endif /* SDL_VIDEO_DRIVER_EMSCRIPTEN && SDL_VIDEO_OPENGL_EGL */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/emscripten/SDL_emscriptenvideo.c b/modules/SDL2/src/video/emscripten/SDL_emscriptenvideo.c index 8b21573..8ddf910 100644 --- a/modules/SDL2/src/video/emscripten/SDL_emscriptenvideo.c +++ b/modules/SDL2/src/video/emscripten/SDL_emscriptenvideo.c @@ -40,44 +40,41 @@ /* Initialization/Query functions */ static int Emscripten_VideoInit(_THIS); -static int Emscripten_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +static int Emscripten_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); static void Emscripten_VideoQuit(_THIS); -static int Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); -static int Emscripten_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi); - -static int Emscripten_CreateWindow(_THIS, SDL_Window * window); -static void Emscripten_SetWindowSize(_THIS, SDL_Window * window); -static void Emscripten_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h); -static void Emscripten_DestroyWindow(_THIS, SDL_Window * window); -static void Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen); +static int Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); +static int Emscripten_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi); + +static int Emscripten_CreateWindow(_THIS, SDL_Window *window); +static void Emscripten_SetWindowSize(_THIS, SDL_Window *window); +static void Emscripten_GetWindowSizeInPixels(_THIS, SDL_Window *window, int *w, int *h); +static void Emscripten_DestroyWindow(_THIS, SDL_Window *window); +static void Emscripten_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen); static void Emscripten_PumpEvents(_THIS); -static void Emscripten_SetWindowTitle(_THIS, SDL_Window * window); - +static void Emscripten_SetWindowTitle(_THIS, SDL_Window *window); /* Emscripten driver bootstrap functions */ -static void -Emscripten_DeleteDevice(SDL_VideoDevice * device) +static void Emscripten_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device); } -static SDL_VideoDevice * -Emscripten_CreateDevice(void) +static SDL_VideoDevice *Emscripten_CreateDevice(void) { SDL_VideoDevice *device; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } /* Firefox sends blur event which would otherwise prevent full screen * when the user clicks to allow full screen. * See https://bugzilla.mozilla.org/show_bug.cgi?id=1144964 - */ + */ SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); /* Set the function pointers */ @@ -87,7 +84,6 @@ Emscripten_CreateDevice(void) device->GetDisplayDPI = Emscripten_GetDisplayDPI; device->SetDisplayMode = Emscripten_SetDisplayMode; - device->PumpEvents = Emscripten_PumpEvents; device->CreateSDLWindow = Emscripten_CreateWindow; @@ -132,9 +128,7 @@ VideoBootStrap Emscripten_bootstrap = { Emscripten_CreateDevice }; - -int -Emscripten_VideoInit(_THIS) +int Emscripten_VideoInit(_THIS) { SDL_DisplayMode mode; @@ -156,21 +150,18 @@ Emscripten_VideoInit(_THIS) return 0; } -static int -Emscripten_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int Emscripten_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { /* can't do this */ return 0; } -static void -Emscripten_VideoQuit(_THIS) +static void Emscripten_VideoQuit(_THIS) { Emscripten_FiniMouse(); } -static int -Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +static int Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) { if (rect) { rect->x = 0; @@ -185,8 +176,7 @@ Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * return 0; } -static int -Emscripten_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi_out, float * hdpi_out, float * vdpi_out) +static int Emscripten_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi_out, float *hdpi_out, float *vdpi_out) { const float dpi_reference = 96.0f; float dpi; @@ -206,21 +196,19 @@ Emscripten_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi_out, fl return 0; } -static void -Emscripten_PumpEvents(_THIS) +static void Emscripten_PumpEvents(_THIS) { /* do nothing. */ } -static int -Emscripten_CreateWindow(_THIS, SDL_Window * window) +static int Emscripten_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *wdata; double scaled_w, scaled_h; double css_w, css_h; /* Allocate window internal data */ - wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + wdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (wdata == NULL) { return SDL_OutOfMemory(); } @@ -289,12 +277,12 @@ Emscripten_CreateWindow(_THIS, SDL_Window * window) return 0; } -static void Emscripten_SetWindowSize(_THIS, SDL_Window * window) +static void Emscripten_SetWindowSize(_THIS, SDL_Window *window) { SDL_WindowData *data; if (window->driverdata) { - data = (SDL_WindowData *) window->driverdata; + data = (SDL_WindowData *)window->driverdata; /* update pixel ratio */ if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { data->pixel_ratio = emscripten_get_device_pixel_ratio(); @@ -308,25 +296,22 @@ static void Emscripten_SetWindowSize(_THIS, SDL_Window * window) } } - -static void -Emscripten_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) +static void Emscripten_GetWindowSizeInPixels(_THIS, SDL_Window *window, int *w, int *h) { SDL_WindowData *data; if (window->driverdata) { - data = (SDL_WindowData *) window->driverdata; + data = (SDL_WindowData *)window->driverdata; *w = window->w * data->pixel_ratio; *h = window->h * data->pixel_ratio; } } -static void -Emscripten_DestroyWindow(_THIS, SDL_Window * window) +static void Emscripten_DestroyWindow(_THIS, SDL_Window *window) { SDL_WindowData *data; - if(window->driverdata) { - data = (SDL_WindowData *) window->driverdata; + if (window->driverdata) { + data = (SDL_WindowData *)window->driverdata; Emscripten_UnregisterEventHandlers(data); #if SDL_VIDEO_OPENGL_EGL @@ -345,23 +330,22 @@ Emscripten_DestroyWindow(_THIS, SDL_Window * window) } } -static void -Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +static void Emscripten_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) { SDL_WindowData *data; - if(window->driverdata) { - data = (SDL_WindowData *) window->driverdata; + if (window->driverdata) { + data = (SDL_WindowData *)window->driverdata; - if(fullscreen) { + if (fullscreen) { EmscriptenFullscreenStrategy strategy; SDL_bool is_desktop_fullscreen = (window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP; int res; strategy.scaleMode = is_desktop_fullscreen ? EMSCRIPTEN_FULLSCREEN_SCALE_STRETCH : EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT; - if(!is_desktop_fullscreen) { + if (!is_desktop_fullscreen) { strategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_NONE; - } else if(window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { + } else if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { strategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_HIDEF; } else { strategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_STDDEF; @@ -376,18 +360,17 @@ Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * di data->fullscreen_resize = is_desktop_fullscreen; res = emscripten_request_fullscreen_strategy(data->canvas_id, 1, &strategy); - if(res != EMSCRIPTEN_RESULT_SUCCESS && res != EMSCRIPTEN_RESULT_DEFERRED) { + if (res != EMSCRIPTEN_RESULT_SUCCESS && res != EMSCRIPTEN_RESULT_DEFERRED) { /* unset flags, fullscreen failed */ window->flags &= ~(SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN); } - } - else + } else emscripten_exit_fullscreen(); } } -static void -Emscripten_SetWindowTitle(_THIS, SDL_Window * window) { +static void Emscripten_SetWindowTitle(_THIS, SDL_Window *window) +{ emscripten_set_window_title(window->title); } diff --git a/modules/SDL2/src/video/haiku/SDL_BApp.h b/modules/SDL2/src/video/haiku/SDL_BApp.h index 868b4ed..0368081 100644 --- a/modules/SDL2/src/video/haiku/SDL_BApp.h +++ b/modules/SDL2/src/video/haiku/SDL_BApp.h @@ -30,7 +30,6 @@ #include "../../video/haiku/SDL_bkeyboard.h" - #ifdef __cplusplus extern "C" { #endif @@ -49,28 +48,27 @@ extern "C" { #include - - - /* Forward declarations */ +class SDL_BLooper; class SDL_BWin; /* Message constants */ -enum ToSDL { +enum ToSDL +{ /* Intercepted by BWindow on its way to BView */ BAPP_MOUSE_MOVED, BAPP_MOUSE_BUTTON, BAPP_MOUSE_WHEEL, BAPP_KEY, - BAPP_REPAINT, /* from _UPDATE_ */ + BAPP_REPAINT, /* from _UPDATE_ */ /* From BWindow */ - BAPP_MAXIMIZE, /* from B_ZOOM */ + BAPP_MAXIMIZE, /* from B_ZOOM */ BAPP_MINIMIZE, - BAPP_RESTORE, /* TODO: IMPLEMENT! */ + BAPP_RESTORE, /* TODO: IMPLEMENT! */ BAPP_SHOW, BAPP_HIDE, - BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ - BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ + BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ + BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ BAPP_WINDOW_CLOSE_REQUESTED, BAPP_WINDOW_MOVED, BAPP_WINDOW_RESIZED, @@ -78,36 +76,29 @@ enum ToSDL { }; +extern "C" SDL_BLooper *SDL_Looper; + -/* Create a descendant of BApplication */ -class SDL_BApp : public BApplication { -public: - SDL_BApp(const char* signature) : - BApplication(signature) { +/* Create a descendant of BLooper */ +class SDL_BLooper : public BLooper +{ + public: + SDL_BLooper(const char* name) : BLooper(name) + { #if SDL_VIDEO_OPENGL _current_context = NULL; #endif } - - virtual ~SDL_BApp() { + virtual ~SDL_BLooper() + { } - - virtual void RefsReceived(BMessage* message) { - char filePath[512]; - entry_ref entryRef; - for (int32 i = 0; message->FindRef("refs", i, &entryRef) == B_OK; i++) { - BPath referencePath = BPath(&entryRef); - SDL_SendDropFile(NULL, referencePath.Path()); - } - return; - } - - /* Event-handling functions */ - virtual void MessageReceived(BMessage* message) { + /* Event-handling functions */ + virtual void MessageReceived(BMessage *message) + { /* Sort out SDL-related messages */ - switch ( message->what ) { + switch (message->what) { case BAPP_MOUSE_MOVED: _HandleMouseMove(message); break; @@ -173,23 +164,24 @@ public: break; default: - BApplication::MessageReceived(message); - break; + BLooper::MessageReceived(message); + break; } } /* Window creation/destruction methods */ - int32 GetID(SDL_Window *win) { + int32 GetID(SDL_Window *win) + { int32 i; - for(i = 0; i < _GetNumWindowSlots(); ++i) { - if( GetSDLWindow(i) == NULL ) { + for (i = 0; i < _GetNumWindowSlots(); ++i) { + if (GetSDLWindow(i) == NULL) { _SetSDLWindow(win, i); return i; } } /* Expand the vector if all slots are full */ - if( i == _GetNumWindowSlots() ) { + if (i == _GetNumWindowSlots()) { _PushBackWindow(win); return i; } @@ -202,18 +194,20 @@ public: there another way to do this? */ void ClearID(SDL_BWin *bwin); /* Defined in SDL_BeApp.cc */ - - SDL_Window *GetSDLWindow(int32 winID) { + SDL_Window *GetSDLWindow(int32 winID) + { return _window_map[winID]; } #if SDL_VIDEO_OPENGL - BGLView *GetCurrentContext() { + BGLView *GetCurrentContext() + { return _current_context; } - - void SetCurrentContext(BGLView *newContext) { - if(_current_context) + + void SetCurrentContext(BGLView *newContext) + { + if (_current_context) _current_context->UnlockGL(); _current_context = newContext; if (_current_context) @@ -221,25 +215,26 @@ public: } #endif -private: + private: /* Event management */ - void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) { + void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) + { SDL_Window *win; int32 winID; - if( - !_GetWinID(msg, &winID) - ) { + if ( + !_GetWinID(msg, &winID)) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, sdlEventType, 0, 0); } - void _HandleMouseMove(BMessage *msg) { + void _HandleMouseMove(BMessage *msg) + { SDL_Window *win; int32 winID; int32 x = 0, y = 0; - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("x", &x) != B_OK || /* x movement */ msg->FindInt32("y", &y) != B_OK /* y movement */ @@ -266,47 +261,47 @@ private: } } - void _HandleMouseButton(BMessage *msg) { + void _HandleMouseButton(BMessage *msg) + { SDL_Window *win; int32 winID; - int32 button, state; /* left/middle/right, pressed/released */ - if( + int32 button, state; /* left/middle/right, pressed/released */ + if ( !_GetWinID(msg, &winID) || msg->FindInt32("button-id", &button) != B_OK || - msg->FindInt32("button-state", &state) != B_OK - ) { + msg->FindInt32("button-state", &state) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendMouseButton(win, 0, state, button); } - void _HandleMouseWheel(BMessage *msg) { + void _HandleMouseWheel(BMessage *msg) + { SDL_Window *win; int32 winID; int32 xTicks, yTicks; - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("xticks", &xTicks) != B_OK || - msg->FindInt32("yticks", &yTicks) != B_OK - ) { + msg->FindInt32("yticks", &yTicks) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendMouseWheel(win, 0, xTicks, -yTicks, SDL_MOUSEWHEEL_NORMAL); } - void _HandleKey(BMessage *msg) { - int32 scancode, state; /* scancode, pressed/released */ - if( + void _HandleKey(BMessage *msg) + { + int32 scancode, state; /* scancode, pressed/released */ + if ( msg->FindInt32("key-state", &state) != B_OK || - msg->FindInt32("key-scancode", &scancode) != B_OK - ) { + msg->FindInt32("key-scancode", &scancode) != B_OK) { return; } /* Make sure this isn't a repeated event (key pressed and held) */ - if(state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) { + if (state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) { return; } HAIKU_SetKeyState(scancode, state); @@ -315,7 +310,7 @@ private: if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { const int8 *keyUtf8; ssize_t count; - if (msg->FindData("key-utf8", B_INT8_TYPE, (const void**)&keyUtf8, &count) == B_OK) { + if (msg->FindData("key-utf8", B_INT8_TYPE, (const void **)&keyUtf8, &count) == B_OK) { char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; SDL_zeroa(text); SDL_memcpy(text, keyUtf8, count); @@ -324,107 +319,108 @@ private: } } - void _HandleMouseFocus(BMessage *msg) { + void _HandleMouseFocus(BMessage *msg) + { SDL_Window *win; int32 winID; bool bSetFocus; /* If false, lose focus */ - if( + if ( !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { + msg->FindBool("focusGained", &bSetFocus) != B_OK) { return; } win = GetSDLWindow(winID); - if(bSetFocus) { + if (bSetFocus) { SDL_SetMouseFocus(win); - } else if(SDL_GetMouseFocus() == win) { + } else if (SDL_GetMouseFocus() == win) { /* Only lose all focus if this window was the current focus */ SDL_SetMouseFocus(NULL); } } - void _HandleKeyboardFocus(BMessage *msg) { + void _HandleKeyboardFocus(BMessage *msg) + { SDL_Window *win; int32 winID; bool bSetFocus; /* If false, lose focus */ - if( + if ( !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { + msg->FindBool("focusGained", &bSetFocus) != B_OK) { return; } win = GetSDLWindow(winID); - if(bSetFocus) { + if (bSetFocus) { SDL_SetKeyboardFocus(win); - } else if(SDL_GetKeyboardFocus() == win) { + } else if (SDL_GetKeyboardFocus() == win) { /* Only lose all focus if this window was the current focus */ SDL_SetKeyboardFocus(NULL); } } - void _HandleWindowMoved(BMessage *msg) { + void _HandleWindowMoved(BMessage *msg) + { SDL_Window *win; int32 winID; int32 xPos, yPos; /* Get the window id and new x/y position of the window */ - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("window-x", &xPos) != B_OK || - msg->FindInt32("window-y", &yPos) != B_OK - ) { + msg->FindInt32("window-y", &yPos) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, SDL_WINDOWEVENT_MOVED, xPos, yPos); } - void _HandleWindowResized(BMessage *msg) { + void _HandleWindowResized(BMessage *msg) + { SDL_Window *win; int32 winID; int32 w, h; /* Get the window id ]and new x/y position of the window */ - if( + if ( !_GetWinID(msg, &winID) || msg->FindInt32("window-w", &w) != B_OK || - msg->FindInt32("window-h", &h) != B_OK - ) { + msg->FindInt32("window-h", &h) != B_OK) { return; } win = GetSDLWindow(winID); SDL_SendWindowEvent(win, SDL_WINDOWEVENT_RESIZED, w, h); } - bool _GetWinID(BMessage *msg, int32 *winID) { + bool _GetWinID(BMessage *msg, int32 *winID) + { return msg->FindInt32("window-id", winID) == B_OK; } - - /* Vector functions: Wraps vector stuff in case we need to change implementation */ - void _SetSDLWindow(SDL_Window *win, int32 winID) { + void _SetSDLWindow(SDL_Window *win, int32 winID) + { _window_map[winID] = win; } - int32 _GetNumWindowSlots() { + int32 _GetNumWindowSlots() + { return _window_map.size(); } - - void _PopBackWindow() { + void _PopBackWindow() + { _window_map.pop_back(); } - void _PushBackWindow(SDL_Window *win) { + void _PushBackWindow(SDL_Window *win) + { _window_map.push_back(win); } - /* Members */ - std::vector _window_map; /* Keeps track of SDL_Windows by index-id */ + std::vector _window_map; /* Keeps track of SDL_Windows by index-id */ #if SDL_VIDEO_OPENGL - BGLView *_current_context; + BGLView *_current_context; #endif }; diff --git a/modules/SDL2/src/video/haiku/SDL_BWin.h b/modules/SDL2/src/video/haiku/SDL_BWin.h index e711ee0..ed1b961 100644 --- a/modules/SDL2/src/video/haiku/SDL_BWin.h +++ b/modules/SDL2/src/video/haiku/SDL_BWin.h @@ -45,8 +45,8 @@ extern "C" { #include "SDL_events.h" #include "../../main/haiku/SDL_BApp.h" - -enum WinCommands { +enum WinCommands +{ BWIN_MOVE_WINDOW, BWIN_RESIZE_WINDOW, BWIN_SHOW_WINDOW, @@ -63,12 +63,12 @@ enum WinCommands { }; // non-OpenGL framebuffer view -class SDL_BView: public BView +class SDL_BView : public BView { -public: - SDL_BView(BRect frame, const char* name, uint32 resizingMode) + public: + SDL_BView(BRect frame, const char *name, uint32 resizingMode) : BView(frame, name, resizingMode, B_WILL_DRAW), - fBitmap(NULL) + fBitmap(NULL) { } @@ -83,11 +83,11 @@ public: fBitmap = bitmap; } -private: + private: BBitmap *fBitmap; }; -class SDL_BWin: public BWindow +class SDL_BWin : public BWindow { public: /* Constructor/Destructor */ @@ -114,10 +114,10 @@ class SDL_BWin: public BWindow _bitmap = NULL; } - virtual ~ SDL_BWin() + virtual ~SDL_BWin() { Lock(); - + if (_SDL_View != NULL && _SDL_View != _cur_view) { delete _SDL_View; _SDL_View = NULL; @@ -125,8 +125,8 @@ class SDL_BWin: public BWindow #if SDL_VIDEO_OPENGL if (_SDL_GLView) { - if (((SDL_BApp*)be_app)->GetCurrentContext() == _SDL_GLView) - ((SDL_BApp*)be_app)->SetCurrentContext(NULL); + if (SDL_Looper->GetCurrentContext() == _SDL_GLView) + SDL_Looper->SetCurrentContext(NULL); if (_SDL_GLView == _cur_view) RemoveChild(_SDL_GLView); _SDL_GLView = NULL; @@ -142,7 +142,7 @@ class SDL_BWin: public BWindow _buffer_locker->Lock(); delete _buffer_locker; } - + void SetCurrentView(BView *view) { if (_cur_view != view) { @@ -165,7 +165,8 @@ class SDL_BWin: public BWindow } } - SDL_BView *CreateView() { + SDL_BView *CreateView() + { Lock(); if (_SDL_View == NULL) { _SDL_View = new SDL_BView(Bounds(), "SDL View", B_FOLLOW_ALL_SIDES); @@ -175,9 +176,10 @@ class SDL_BWin: public BWindow return _SDL_View; } - void RemoveView() { + void RemoveView() + { Lock(); - if(_SDL_View != NULL) { + if (_SDL_View != NULL) { SDL_BView *oldView = _SDL_View; _SDL_View = NULL; UpdateCurrentView(); @@ -188,13 +190,14 @@ class SDL_BWin: public BWindow /* * * * * OpenGL functionality * * * * */ #if SDL_VIDEO_OPENGL - BGLView *CreateGLView(Uint32 gl_flags) { + BGLView *CreateGLView(Uint32 gl_flags) + { Lock(); if (_SDL_GLView == NULL) { _SDL_GLView = new BGLView(Bounds(), "SDL GLView", - B_FOLLOW_ALL_SIDES, - (B_WILL_DRAW | B_FRAME_EVENTS), - gl_flags); + B_FOLLOW_ALL_SIDES, + (B_WILL_DRAW | B_FRAME_EVENTS), + gl_flags); _gl_type = gl_flags; UpdateCurrentView(); } @@ -202,11 +205,12 @@ class SDL_BWin: public BWindow return _SDL_GLView; } - void RemoveGLView() { + void RemoveGLView() + { Lock(); - if(_SDL_GLView != NULL) { - if (((SDL_BApp*)be_app)->GetCurrentContext() == _SDL_GLView) - ((SDL_BApp*)be_app)->SetCurrentContext(NULL); + if (_SDL_GLView != NULL) { + if (SDL_Looper->GetCurrentContext() == _SDL_GLView) + SDL_Looper->SetCurrentContext(NULL); _SDL_GLView = NULL; UpdateCurrentView(); // _SDL_GLView deleted by HAIKU_GL_DeleteContext @@ -214,14 +218,16 @@ class SDL_BWin: public BWindow Unlock(); } - void SwapBuffers(void) { + void SwapBuffers(void) + { _SDL_GLView->SwapBuffers(); } #endif /* * * * * Event sending * * * * */ /* Hook functions */ - virtual void FrameMoved(BPoint origin) { + virtual void FrameMoved(BPoint origin) + { /* Post a message to the BApp so that it can handle the window event */ BMessage msg(BAPP_WINDOW_MOVED); msg.AddInt32("window-x", (int)origin.x); @@ -232,7 +238,8 @@ class SDL_BWin: public BWindow BWindow::FrameMoved(origin); } - void FrameResized(float width, float height) { + void FrameResized(float width, float height) + { /* Post a message to the BApp so that it can handle the window event */ BMessage msg(BAPP_WINDOW_RESIZED); @@ -244,7 +251,8 @@ class SDL_BWin: public BWindow BWindow::FrameResized(width, height); } - bool QuitRequested() { + bool QuitRequested() + { BMessage msg(BAPP_WINDOW_CLOSE_REQUESTED); _PostWindowEvent(msg); @@ -252,20 +260,22 @@ class SDL_BWin: public BWindow return false; } - void WindowActivated(bool active) { - BMessage msg(BAPP_KEYBOARD_FOCUS); /* Mouse focus sold separately */ + void WindowActivated(bool active) + { + BMessage msg(BAPP_KEYBOARD_FOCUS); /* Mouse focus sold separately */ msg.AddBool("focusGained", active); _PostWindowEvent(msg); } void Zoom(BPoint origin, - float width, - float height) { - BMessage msg(BAPP_MAXIMIZE); /* Closest thing to maximization Haiku has */ + float width, + float height) + { + BMessage msg(BAPP_MAXIMIZE); /* Closest thing to maximization Haiku has */ _PostWindowEvent(msg); /* Before the window zooms, record its size */ - if( !_prev_frame ) + if (!_prev_frame) _prev_frame = new BRect(Frame()); /* Perform normal hook operations */ @@ -273,8 +283,9 @@ class SDL_BWin: public BWindow } /* Member functions */ - void Show() { - while(IsHidden()) { + void Show() + { + while (IsHidden()) { BWindow::Show(); } _shown = true; @@ -283,7 +294,8 @@ class SDL_BWin: public BWindow _PostWindowEvent(msg); } - void Hide() { + void Hide() + { BWindow::Hide(); _shown = false; @@ -291,7 +303,8 @@ class SDL_BWin: public BWindow _PostWindowEvent(msg); } - void Minimize(bool minimize) { + void Minimize(bool minimize) + { BWindow::Minimize(minimize); int32 minState = (minimize ? BAPP_MINIMIZE : BAPP_RESTORE); @@ -307,19 +320,17 @@ class SDL_BWin: public BWindow } } - /* BView message interruption */ - void DispatchMessage(BMessage * msg, BHandler * target) + void DispatchMessage(BMessage *msg, BHandler *target) { - BPoint where; /* Used by mouse moved */ - int32 buttons; /* Used for mouse button events */ - int32 key; /* Used for key events */ + BPoint where; /* Used by mouse moved */ + int32 buttons; /* Used for mouse button events */ + int32 key; /* Used for key events */ switch (msg->what) { case B_MOUSE_MOVED: int32 transit; - if (msg->FindPoint("where", &where) == B_OK - && msg->FindInt32("be:transit", &transit) == B_OK) { + if (msg->FindPoint("where", &where) == B_OK && msg->FindInt32("be:transit", &transit) == B_OK) { _MouseMotionEvent(where, transit); } break; @@ -338,35 +349,33 @@ class SDL_BWin: public BWindow case B_MOUSE_WHEEL_CHANGED: float x, y; - if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK - && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { - _MouseWheelEvent((int)x, (int)y); + if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { + _MouseWheelEvent((int)x, (int)y); } break; case B_KEY_DOWN: - { - int32 i = 0; - int8 byte; - int8 bytes[4] = { 0, 0, 0, 0 }; - while (i < 4 && msg->FindInt8("byte", i, &byte) == B_OK) { - bytes[i] = byte; - i++; - } - if (msg->FindInt32("key", &key) == B_OK) { - _KeyEvent((SDL_Scancode)key, &bytes[0], i, SDL_PRESSED); - } + { + int32 i = 0; + int8 byte; + int8 bytes[4] = { 0, 0, 0, 0 }; + while (i < 4 && msg->FindInt8("byte", i, &byte) == B_OK) { + bytes[i] = byte; + i++; } - break; + if (msg->FindInt32("key", &key) == B_OK) { + _KeyEvent((SDL_Scancode)key, &bytes[0], i, SDL_PRESSED); + } + } break; - case B_UNMAPPED_KEY_DOWN: /* modifier keys are unmapped */ + case B_UNMAPPED_KEY_DOWN: /* modifier keys are unmapped */ if (msg->FindInt32("key", &key) == B_OK) { _KeyEvent((SDL_Scancode)key, NULL, 0, SDL_PRESSED); } break; case B_KEY_UP: - case B_UNMAPPED_KEY_UP: /* modifier keys are unmapped */ + case B_UNMAPPED_KEY_UP: /* modifier keys are unmapped */ if (msg->FindInt32("key", &key) == B_OK) { _KeyEvent(key, NULL, 0, SDL_RELEASED); } @@ -386,80 +395,81 @@ class SDL_BWin: public BWindow } /* Handle command messages */ - void MessageReceived(BMessage* message) { + void MessageReceived(BMessage *message) + { switch (message->what) { - /* Handle commands from SDL */ - case BWIN_SET_TITLE: - _SetTitle(message); - break; - case BWIN_MOVE_WINDOW: - _MoveTo(message); - break; - case BWIN_RESIZE_WINDOW: - _ResizeTo(message); - break; - case BWIN_SET_BORDERED: { - bool bEnabled; - if (message->FindBool("window-border", &bEnabled) == B_OK) - _SetBordered(bEnabled); - break; - } - case BWIN_SET_RESIZABLE: { - bool bEnabled; - if (message->FindBool("window-resizable", &bEnabled) == B_OK) - _SetResizable(bEnabled); - break; - } - case BWIN_SHOW_WINDOW: - Show(); - break; - case BWIN_HIDE_WINDOW: - Hide(); - break; - case BWIN_MAXIMIZE_WINDOW: - BWindow::Zoom(); - break; - case BWIN_MINIMIZE_WINDOW: - Minimize(true); - break; - case BWIN_RESTORE_WINDOW: - _Restore(); - break; - case BWIN_FULLSCREEN: { - bool fullscreen; - if (message->FindBool("fullscreen", &fullscreen) == B_OK) - _SetFullScreen(fullscreen); - break; + /* Handle commands from SDL */ + case BWIN_SET_TITLE: + _SetTitle(message); + break; + case BWIN_MOVE_WINDOW: + _MoveTo(message); + break; + case BWIN_RESIZE_WINDOW: + _ResizeTo(message); + break; + case BWIN_SET_BORDERED: + { + bool bEnabled; + if (message->FindBool("window-border", &bEnabled) == B_OK) + _SetBordered(bEnabled); + break; + } + case BWIN_SET_RESIZABLE: + { + bool bEnabled; + if (message->FindBool("window-resizable", &bEnabled) == B_OK) + _SetResizable(bEnabled); + break; + } + case BWIN_SHOW_WINDOW: + Show(); + break; + case BWIN_HIDE_WINDOW: + Hide(); + break; + case BWIN_MAXIMIZE_WINDOW: + BWindow::Zoom(); + break; + case BWIN_MINIMIZE_WINDOW: + Minimize(true); + break; + case BWIN_RESTORE_WINDOW: + _Restore(); + break; + case BWIN_FULLSCREEN: + { + bool fullscreen; + if (message->FindBool("fullscreen", &fullscreen) == B_OK) + _SetFullScreen(fullscreen); + break; + } + case BWIN_MINIMUM_SIZE_WINDOW: + _SetMinimumSize(message); + break; + case BWIN_UPDATE_FRAMEBUFFER: + { + BMessage *pendingMessage; + while ((pendingMessage = MessageQueue()->FindMessage(BWIN_UPDATE_FRAMEBUFFER, 0))) { + MessageQueue()->RemoveMessage(pendingMessage); + delete pendingMessage; } - case BWIN_MINIMUM_SIZE_WINDOW: - _SetMinimumSize(message); - break; - case BWIN_UPDATE_FRAMEBUFFER: { - BMessage* pendingMessage; - while ((pendingMessage - = MessageQueue()->FindMessage(BWIN_UPDATE_FRAMEBUFFER, 0))) { - MessageQueue()->RemoveMessage(pendingMessage); - delete pendingMessage; - } - if (_bitmap != NULL) { - if (_SDL_View != NULL && _cur_view == _SDL_View) - _SDL_View->Draw(Bounds()); - else if (_SDL_GLView != NULL && _cur_view == _SDL_GLView) { - _SDL_GLView->CopyPixelsIn(_bitmap, B_ORIGIN); - } + if (_bitmap != NULL) { + if (_SDL_View != NULL && _cur_view == _SDL_View) + _SDL_View->Draw(Bounds()); + else if (_SDL_GLView != NULL && _cur_view == _SDL_GLView) { + _SDL_GLView->CopyPixelsIn(_bitmap, B_ORIGIN); } - break; } - default: - /* Perform normal message handling */ - BWindow::MessageReceived(message); - break; + break; + } + default: + /* Perform normal message handling */ + BWindow::MessageReceived(message); + break; } - } - - /* Accessor methods */ bool IsShown() { return _shown; } int32 GetID() { return _id; } @@ -467,7 +477,10 @@ class SDL_BWin: public BWindow BView *GetCurView() { return _cur_view; } SDL_BView *GetView() { return _SDL_View; } #if SDL_VIDEO_OPENGL - BGLView *GetGLView() { return _SDL_GLView; } + BGLView *GetGLView() + { + return _SDL_GLView; + } Uint32 GetGLType() { return _gl_type; } #endif @@ -475,15 +488,20 @@ class SDL_BWin: public BWindow void SetID(int32 id) { _id = id; } void LockBuffer() { _buffer_locker->Lock(); } void UnlockBuffer() { _buffer_locker->Unlock(); } - void SetBitmap(BBitmap *bitmap) { _bitmap = bitmap; if (_SDL_View != NULL) _SDL_View->SetBitmap(bitmap); } - + void SetBitmap(BBitmap *bitmap) + { + _bitmap = bitmap; + if (_SDL_View != NULL) + _SDL_View->SetBitmap(bitmap); + } -private: + private: /* Event redirection */ - void _MouseMotionEvent(BPoint &where, int32 transit) { - if(transit == B_EXITED_VIEW) { + void _MouseMotionEvent(BPoint &where, int32 transit) + { + if (transit == B_EXITED_VIEW) { /* Change mouse focus */ - if(_mouse_focused) { + if (_mouse_focused) { _MouseFocusEvent(false); } } else { @@ -499,41 +517,45 @@ private: } } - void _MouseFocusEvent(bool focusGained) { + void _MouseFocusEvent(bool focusGained) + { _mouse_focused = focusGained; BMessage msg(BAPP_MOUSE_FOCUS); msg.AddBool("focusGained", focusGained); _PostWindowEvent(msg); -/* FIXME: Why were these here? - if false: be_app->SetCursor(B_HAND_CURSOR); - if true: SDL_SetCursor(NULL); */ + /* FIXME: Why were these here? + if false: be_app->SetCursor(B_HAND_CURSOR); + if true: SDL_SetCursor(NULL); */ } - void _MouseButtonEvent(int32 buttons, Uint8 state) { + void _MouseButtonEvent(int32 buttons, Uint8 state) + { int32 buttonStateChange = buttons ^ _last_buttons; - if(buttonStateChange & B_PRIMARY_MOUSE_BUTTON) { + if (buttonStateChange & B_PRIMARY_MOUSE_BUTTON) { _SendMouseButton(SDL_BUTTON_LEFT, state); } - if(buttonStateChange & B_SECONDARY_MOUSE_BUTTON) { + if (buttonStateChange & B_SECONDARY_MOUSE_BUTTON) { _SendMouseButton(SDL_BUTTON_RIGHT, state); } - if(buttonStateChange & B_TERTIARY_MOUSE_BUTTON) { + if (buttonStateChange & B_TERTIARY_MOUSE_BUTTON) { _SendMouseButton(SDL_BUTTON_MIDDLE, state); } _last_buttons = buttons; } - void _SendMouseButton(int32 button, int32 state) { + void _SendMouseButton(int32 button, int32 state) + { BMessage msg(BAPP_MOUSE_BUTTON); msg.AddInt32("button-id", button); msg.AddInt32("button-state", state); _PostWindowEvent(msg); } - void _MouseWheelEvent(int32 x, int32 y) { + void _MouseWheelEvent(int32 x, int32 y) + { /* Create a message to pass along to the BeApp thread */ BMessage msg(BAPP_MOUSE_WHEEL); msg.AddInt32("xticks", x); @@ -541,44 +563,47 @@ private: _PostWindowEvent(msg); } - void _KeyEvent(int32 keyCode, const int8 *keyUtf8, const ssize_t & len, int32 keyState) { + void _KeyEvent(int32 keyCode, const int8 *keyUtf8, const ssize_t &len, int32 keyState) + { /* Create a message to pass along to the BeApp thread */ BMessage msg(BAPP_KEY); msg.AddInt32("key-state", keyState); msg.AddInt32("key-scancode", keyCode); if (keyUtf8 != NULL) { - msg.AddData("key-utf8", B_INT8_TYPE, (const void*)keyUtf8, len); + msg.AddData("key-utf8", B_INT8_TYPE, (const void *)keyUtf8, len); } - be_app->PostMessage(&msg); + SDL_Looper->PostMessage(&msg); } - void _RepaintEvent() { + void _RepaintEvent() + { /* Force a repaint: Call the SDL exposed event */ BMessage msg(BAPP_REPAINT); _PostWindowEvent(msg); } - void _PostWindowEvent(BMessage &msg) { + void _PostWindowEvent(BMessage &msg) + { msg.AddInt32("window-id", _id); - be_app->PostMessage(&msg); + SDL_Looper->PostMessage(&msg); } /* Command methods (functions called upon by SDL) */ - void _SetTitle(BMessage *msg) { + void _SetTitle(BMessage *msg) + { const char *title; - if( - msg->FindString("window-title", &title) != B_OK - ) { + if ( + msg->FindString("window-title", &title) != B_OK) { return; } SetTitle(title); } - void _MoveTo(BMessage *msg) { + void _MoveTo(BMessage *msg) + { int32 x, y; - if( + if ( msg->FindInt32("window-x", &x) != B_OK || - msg->FindInt32("window-y", &y) != B_OK - ) { + msg->FindInt32("window-y", &y) != B_OK) { return; } if (_fullscreen) @@ -587,12 +612,12 @@ private: MoveTo(x, y); } - void _ResizeTo(BMessage *msg) { + void _ResizeTo(BMessage *msg) + { int32 w, h; - if( + if ( msg->FindInt32("window-w", &w) != B_OK || - msg->FindInt32("window-h", &h) != B_OK - ) { + msg->FindInt32("window-h", &h) != B_OK) { return; } if (_fullscreen) { @@ -602,14 +627,16 @@ private: ResizeTo(w, h); } - void _SetBordered(bool bEnabled) { + void _SetBordered(bool bEnabled) + { if (_fullscreen) _bordered = bEnabled; else SetLook(bEnabled ? B_TITLED_WINDOW_LOOK : B_NO_BORDER_WINDOW_LOOK); } - void _SetResizable(bool bEnabled) { + void _SetResizable(bool bEnabled) + { if (_fullscreen) _resizable = bEnabled; else { @@ -621,7 +648,8 @@ private: } } - void _SetMinimumSize(BMessage *msg) { + void _SetMinimumSize(BMessage *msg) + { float maxHeight; float maxWidth; float _; @@ -639,25 +667,29 @@ private: UpdateSizeLimits(); } - void _Restore() { - if(IsMinimized()) { + void _Restore() + { + if (IsMinimized()) { Minimize(false); - } else if(IsHidden()) { + } else if (IsHidden()) { Show(); } else if (_fullscreen) { - } else if(_prev_frame != NULL) { /* Zoomed */ + } else if (_prev_frame != NULL) { /* Zoomed */ MoveTo(_prev_frame->left, _prev_frame->top); ResizeTo(_prev_frame->Width(), _prev_frame->Height()); } } - void _SetFullScreen(bool fullscreen) { + void _SetFullScreen(bool fullscreen) + { if (fullscreen != _fullscreen) { if (fullscreen) { BScreen screen(this); BRect screenFrame = screen.Frame(); - printf("screen frame: "); screenFrame.PrintToStream(); printf("\n"); + printf("screen frame: "); + screenFrame.PrintToStream(); + printf("\n"); _bordered = Look() != B_NO_BORDER_WINDOW_LOOK; _resizable = !(Flags() & B_NOT_RESIZABLE); _non_fullscreen_frame = Frame(); @@ -678,18 +710,18 @@ private: /* Members */ - BView* _cur_view; - SDL_BView* _SDL_View; + BView *_cur_view; + SDL_BView *_SDL_View; #if SDL_VIDEO_OPENGL - BGLView * _SDL_GLView; + BGLView *_SDL_GLView; Uint32 _gl_type; #endif int32 _last_buttons; - int32 _id; /* Window id used by SDL_BApp */ - bool _mouse_focused; /* Does this window have mouse focus? */ - bool _shown; - bool _inhibit_resize; + int32 _id; /* Window id used by SDL_BApp */ + bool _mouse_focused; /* Does this window have mouse focus? */ + bool _shown; + bool _inhibit_resize; BRect *_prev_frame; /* Previous position and size of the window */ bool _fullscreen; @@ -703,7 +735,6 @@ private: BBitmap *_bitmap; }; - /* FIXME: * An explanation of framebuffer flags. * diff --git a/modules/SDL2/src/video/haiku/SDL_bclipboard.cc b/modules/SDL2/src/video/haiku/SDL_bclipboard.cc index a1050a2..0fd3753 100644 --- a/modules/SDL2/src/video/haiku/SDL_bclipboard.cc +++ b/modules/SDL2/src/video/haiku/SDL_bclipboard.cc @@ -37,12 +37,12 @@ extern "C" { int HAIKU_SetClipboardText(_THIS, const char *text) { BMessage *clip = NULL; - if(be_clipboard->Lock()) { + if (be_clipboard->Lock()) { be_clipboard->Clear(); - if((clip = be_clipboard->Data())) { + if ((clip = be_clipboard->Data())) { /* Presumably the string of characters is ascii-format */ ssize_t asciiLength = 0; - for(; text[asciiLength] != 0; ++asciiLength) {} + for (; text[asciiLength] != 0; ++asciiLength) {} clip->AddData("text/plain", B_MIME_TYPE, text, asciiLength); be_clipboard->Commit(); } @@ -56,8 +56,8 @@ char *HAIKU_GetClipboardText(_THIS) { const char *text = NULL; ssize_t length; char *result; - if(be_clipboard->Lock()) { - if((clip = be_clipboard->Data())) { + if (be_clipboard->Lock()) { + if ((clip = be_clipboard->Data())) { /* Presumably the string of characters is ascii-format */ clip->FindData("text/plain", B_MIME_TYPE, (const void**)&text, &length); @@ -65,7 +65,7 @@ char *HAIKU_GetClipboardText(_THIS) { be_clipboard->Unlock(); } - if (!text) { + if (text == NULL) { result = SDL_strdup(""); } else { /* Copy the data and pass on to SDL */ diff --git a/modules/SDL2/src/video/haiku/SDL_bframebuffer.cc b/modules/SDL2/src/video/haiku/SDL_bframebuffer.cc index bf7a002..2cb4f64 100644 --- a/modules/SDL2/src/video/haiku/SDL_bframebuffer.cc +++ b/modules/SDL2/src/video/haiku/SDL_bframebuffer.cc @@ -36,11 +36,11 @@ extern "C" { #endif static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { - return ((SDL_BWin*)(window->driverdata)); + return (SDL_BWin *)(window->driverdata); } -static SDL_INLINE SDL_BApp *_GetBeApp() { - return ((SDL_BApp*)be_app); +static SDL_INLINE SDL_BLooper *_GetBeLooper() { + return SDL_Looper; } int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window, @@ -48,7 +48,7 @@ int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window, void ** pixels, int *pitch) { SDL_BWin *bwin = _ToBeWin(window); BScreen bscreen; - if(!bscreen.IsValid()) { + if (!bscreen.IsValid()) { return -1; } @@ -65,14 +65,14 @@ int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window, /* Create the new bitmap object */ BBitmap *bitmap = bwin->GetBitmap(); - if(bitmap) { + if (bitmap) { delete bitmap; } bitmap = new BBitmap(bwin->Bounds(), (color_space)bmode.space, false, /* Views not accepted */ true); /* Contiguous memory required */ - if(bitmap->InitCheck() != B_OK) { + if (bitmap->InitCheck() != B_OK) { delete bitmap; return SDL_SetError("Could not initialize back buffer!"); } @@ -94,8 +94,9 @@ int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window, int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) { - if(!window) + if (window == NULL) { return 0; + } SDL_BWin *bwin = _ToBeWin(window); diff --git a/modules/SDL2/src/video/haiku/SDL_bframebuffer.h b/modules/SDL2/src/video/haiku/SDL_bframebuffer.h index 41dc58b..72d3aab 100644 --- a/modules/SDL2/src/video/haiku/SDL_bframebuffer.h +++ b/modules/SDL2/src/video/haiku/SDL_bframebuffer.h @@ -30,12 +30,12 @@ extern "C" { #include "../SDL_sysvideo.h" -extern int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window, - Uint32 * format, - void ** pixels, int *pitch); -extern int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window, - const SDL_Rect * rects, int numrects); -extern void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window *window, + Uint32 *format, + void **pixels, int *pitch); +extern int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window *window, + const SDL_Rect *rects, int numrects); +extern void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window *window); extern int32 HAIKU_DrawThread(void *data); #ifdef __cplusplus diff --git a/modules/SDL2/src/video/haiku/SDL_bkeyboard.cc b/modules/SDL2/src/video/haiku/SDL_bkeyboard.cc index 0fbeef5..84ac3c7 100644 --- a/modules/SDL2/src/video/haiku/SDL_bkeyboard.cc +++ b/modules/SDL2/src/video/haiku/SDL_bkeyboard.cc @@ -42,11 +42,11 @@ static SDL_Scancode keymap[KEYMAP_SIZE]; static int8 keystate[KEYMAP_SIZE]; void HAIKU_InitOSKeymap(void) { - for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) { + for ( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) { keymap[i] = SDL_SCANCODE_UNKNOWN; } - for( uint i = 0; i < KEYMAP_SIZE; ++i ) { + for ( uint i = 0; i < KEYMAP_SIZE; ++i ) { keystate[i] = SDL_RELEASED; } @@ -160,7 +160,7 @@ void HAIKU_InitOSKeymap(void) { } SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey) { - if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) { + if (bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) { return keymap[bkey]; } else { return SDL_SCANCODE_UNKNOWN; @@ -168,7 +168,7 @@ SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey) { } int8 HAIKU_GetKeyState(int32 bkey) { - if(bkey > 0 && bkey < KEYMAP_SIZE) { + if (bkey > 0 && bkey < KEYMAP_SIZE) { return keystate[bkey]; } else { return SDL_RELEASED; @@ -176,7 +176,7 @@ int8 HAIKU_GetKeyState(int32 bkey) { } void HAIKU_SetKeyState(int32 bkey, int8 state) { - if(bkey > 0 && bkey < KEYMAP_SIZE) { + if (bkey > 0 && bkey < KEYMAP_SIZE) { keystate[bkey] = state; } } diff --git a/modules/SDL2/src/video/haiku/SDL_bmessagebox.cc b/modules/SDL2/src/video/haiku/SDL_bmessagebox.cc index 8f0306b..60fce00 100644 --- a/modules/SDL2/src/video/haiku/SDL_bmessagebox.cc +++ b/modules/SDL2/src/video/haiku/SDL_bmessagebox.cc @@ -131,25 +131,20 @@ class HAIKU_SDL_MessageBox : public BAlert void ParseSdlMessageBoxData(const SDL_MessageBoxData *aMessageBoxData) { - if (aMessageBoxData == NULL) - { + if (aMessageBoxData == NULL) { SetTitle(HAIKU_SDL_DefTitle); SetMessageText(HAIKU_SDL_DefMessage); AddButton(HAIKU_SDL_DefButton); return; } - if (aMessageBoxData->numbuttons <= 0) - { + if (aMessageBoxData->numbuttons <= 0) { AddButton(HAIKU_SDL_DefButton); - } - else - { + } else { AddSdlButtons(aMessageBoxData->buttons, aMessageBoxData->numbuttons); } - if (aMessageBoxData->colorScheme != NULL) - { + if (aMessageBoxData->colorScheme != NULL) { fCustomColorScheme = true; ApplyAndParseColorScheme(aMessageBoxData->colorScheme); } @@ -179,11 +174,9 @@ class HAIKU_SDL_MessageBox : public BAlert const SDL_MessageBoxColor *aTextColor, const SDL_MessageBoxColor *aSelectedColor) { - if (fCustomColorScheme) - { + if (fCustomColorScheme) { int32 countButtons = CountButtons(); - for (int i = 0; i < countButtons; ++i) - { + for (int i = 0; i < countButtons; ++i) { ButtonAt(i)->SetViewColor(ConvertColorType(aBorderColor)); ButtonAt(i)->SetLowColor(ConvertColorType(aBackgroundColor)); @@ -218,15 +211,12 @@ class HAIKU_SDL_MessageBox : public BAlert BString message = aMessage; int32 length = message.CountChars(); - for (int i = 0, c = 0; i < length; ++i) - { + for (int i = 0, c = 0; i < length; ++i) { c++; - if (*(message.CharAt(i)) == '\n') - { + if (*(message.CharAt(i)) == '\n') { c = 0; } - if (c > final) - { + if (c > final) { final = c; } } @@ -238,20 +228,17 @@ class HAIKU_SDL_MessageBox : public BAlert SetMessageText(const char *aMessage) { fThereIsLongLine = CheckLongLines(aMessage); - if (fThereIsLongLine) - { + if (fThereIsLongLine) { fMessageBoxTextView->SetWordWrap(true); } rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR); - if (fCustomColorScheme) - { + if (fCustomColorScheme) { textColor = fTextColor; } /* - if (fNoTitledWindow) - { + if (fNoTitledWindow) { fMessageBoxTextView->SetFontAndColor(be_bold_font); fMessageBoxTextView->Insert(fTitle); fMessageBoxTextView->Insert("\n\n"); @@ -269,16 +256,14 @@ class HAIKU_SDL_MessageBox : public BAlert void AddSdlButtons(const SDL_MessageBoxButtonData *aButtons, int aNumButtons) { - for (int i = 0; i < aNumButtons; ++i) - { + for (int i = 0; i < aNumButtons; ++i) { fButtons.push_back(&aButtons[i]); } std::sort(fButtons.begin(), fButtons.end(), &HAIKU_SDL_MessageBox::SortButtonsPredicate); size_t countButtons = fButtons.size(); - for (size_t i = 0; i < countButtons; ++i) - { + for (size_t i = 0; i < countButtons; ++i) { switch (fButtons[i]->flags) { case SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT: @@ -342,12 +327,9 @@ protected: virtual void FrameResized(float aNewWidth, float aNewHeight) { - if (fComputedMessageBoxWidth > aNewWidth) - { + if (fComputedMessageBoxWidth > aNewWidth) { ResizeTo(fComputedMessageBoxWidth, aNewHeight); - } - else - { + } else { BAlert::FrameResized(aNewWidth, aNewHeight); } } @@ -364,8 +346,7 @@ protected: extern "C" { #endif -int -HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { // Initialize button by closed or error value first. *buttonid = G_CLOSE_BUTTON_ID; @@ -375,38 +356,32 @@ HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) // "You need a valid BApplication object before interacting with the app_server." // "2 BApplication objects were created. Only one is allowed." BApplication *application = NULL; - if (be_app == NULL) - { - application = new(std::nothrow) BApplication(signature); - if (application == NULL) - { + if (be_app == NULL) { + application = new(std::nothrow) BApplication(SDL_signature); + if (application == NULL) { return SDL_SetError("Cannot create the BApplication object. Lack of memory?"); } } HAIKU_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) HAIKU_SDL_MessageBox(messageboxdata); - if (SDL_MessageBox == NULL) - { + if (SDL_MessageBox == NULL) { return SDL_SetError("Cannot create the HAIKU_SDL_MessageBox (BAlert inheritor) object. Lack of memory?"); } const int closeButton = SDL_MessageBox->GetCloseButtonId(); int pushedButton = SDL_MessageBox->Go(); // The close button is equivalent to pressing Escape. - if (closeButton != G_CLOSE_BUTTON_ID && pushedButton == G_CLOSE_BUTTON_ID) - { + if (closeButton != G_CLOSE_BUTTON_ID && pushedButton == G_CLOSE_BUTTON_ID) { pushedButton = closeButton; } // It's deleted by itself after the "Go()" method was executed. /* - if (messageBox != NULL) - { + if (messageBox != NULL) { delete messageBox; } */ - if (application != NULL) - { + if (application != NULL) { delete application; } diff --git a/modules/SDL2/src/video/haiku/SDL_bmodes.cc b/modules/SDL2/src/video/haiku/SDL_bmodes.cc index 62ec4ec..eb8f153 100644 --- a/modules/SDL2/src/video/haiku/SDL_bmodes.cc +++ b/modules/SDL2/src/video/haiku/SDL_bmodes.cc @@ -49,18 +49,18 @@ struct SDL_DisplayModeData { #endif static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { - return ((SDL_BWin*)(window->driverdata)); + return (SDL_BWin *)(window->driverdata); } -static SDL_INLINE SDL_BApp *_GetBeApp() { - return ((SDL_BApp*)be_app); +static SDL_INLINE SDL_BLooper *_GetBeLooper() { + return SDL_Looper; } static SDL_INLINE display_mode * _ExtractBMode(SDL_DisplayMode *mode) { #if WRAP_BMODE - return ((SDL_DisplayModeData*)mode->driverdata)->bmode; + return ((SDL_DisplayModeData *)mode->driverdata)->bmode; #else - return (display_mode*)(mode->driverdata); + return (display_mode *)(mode->driverdata); #endif } @@ -80,24 +80,24 @@ void _SpoutModeData(display_mode *bmode) { printf("\tw,h = (%i,%i)\n", bmode->virtual_width, bmode->virtual_height); printf("\th,v = (%i,%i)\n", bmode->h_display_start, bmode->v_display_start); - if(bmode->flags) { + if (bmode->flags) { printf("\tFlags:\n"); - if(bmode->flags & B_SCROLL) { + if (bmode->flags & B_SCROLL) { printf("\t\tB_SCROLL\n"); } - if(bmode->flags & B_8_BIT_DAC) { + if (bmode->flags & B_8_BIT_DAC) { printf("\t\tB_8_BIT_DAC\n"); } - if(bmode->flags & B_HARDWARE_CURSOR) { + if (bmode->flags & B_HARDWARE_CURSOR) { printf("\t\tB_HARDWARE_CURSOR\n"); } - if(bmode->flags & B_PARALLEL_ACCESS) { + if (bmode->flags & B_PARALLEL_ACCESS) { printf("\t\tB_PARALLEL_ACCESS\n"); } - if(bmode->flags & B_DPMS) { + if (bmode->flags & B_DPMS) { printf("\t\tB_DPMS\n"); } - if(bmode->flags & B_IO_FB_NA) { + if (bmode->flags & B_IO_FB_NA) { printf("\t\tB_IO_FB_NA\n"); } } @@ -109,21 +109,21 @@ void _SpoutModeData(display_mode *bmode) { printf("\t\tv - display: %i sync start: %i sync end: %i total: %i\n", bmode->timing.v_display, bmode->timing.v_sync_start, bmode->timing.v_sync_end, bmode->timing.v_total); - if(bmode->timing.flags) { + if (bmode->timing.flags) { printf("\t\tFlags:\n"); - if(bmode->timing.flags & B_BLANK_PEDESTAL) { + if (bmode->timing.flags & B_BLANK_PEDESTAL) { printf("\t\t\tB_BLANK_PEDESTAL\n"); } - if(bmode->timing.flags & B_TIMING_INTERLACED) { + if (bmode->timing.flags & B_TIMING_INTERLACED) { printf("\t\t\tB_TIMING_INTERLACED\n"); } - if(bmode->timing.flags & B_POSITIVE_HSYNC) { + if (bmode->timing.flags & B_POSITIVE_HSYNC) { printf("\t\t\tB_POSITIVE_HSYNC\n"); } - if(bmode->timing.flags & B_POSITIVE_VSYNC) { + if (bmode->timing.flags & B_POSITIVE_VSYNC) { printf("\t\t\tB_POSITIVE_VSYNC\n"); } - if(bmode->timing.flags & B_SYNC_ON_GREEN) { + if (bmode->timing.flags & B_SYNC_ON_GREEN) { printf("\t\t\tB_SYNC_ON_GREEN\n"); } } @@ -247,7 +247,7 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { bscreen.GetModeList(&bmodes, &count); bscreen.GetMode(&this_bmode); - for(i = 0; i < count; ++i) { + for (i = 0; i < count; ++i) { // FIXME: Apparently there are errors with colorspace changes if (bmodes[i].space == this_bmode.space) { _BDisplayModeToSdlDisplayMode(&bmodes[i], &mode); @@ -258,10 +258,10 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { } -int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){ +int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { /* Get the current screen */ BScreen bscreen; - if(!bscreen.IsValid()) { + if (!bscreen.IsValid()) { printf(__FILE__": %d - ERROR: BAD SCREEN\n", __LINE__); } @@ -273,8 +273,8 @@ int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode uint32 c = 0, i; display_mode *bmode_list; bscreen.GetModeList(&bmode_list, &c); - for(i = 0; i < c; ++i) { - if( bmode_list[i].space == bmode->space && + for (i = 0; i < c; ++i) { + if ( bmode_list[i].space == bmode->space && bmode_list[i].virtual_width == bmode->virtual_width && bmode_list[i].virtual_height == bmode->virtual_height ) { bmode = &bmode_list[i]; @@ -282,7 +282,7 @@ int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode } } - if(bscreen.SetMode(bmode) != B_OK) { + if (bscreen.SetMode(bmode) != B_OK) { return SDL_SetError("Bad video mode"); } diff --git a/modules/SDL2/src/video/haiku/SDL_bmodes.h b/modules/SDL2/src/video/haiku/SDL_bmodes.h index 34b7db9..6b5f581 100644 --- a/modules/SDL2/src/video/haiku/SDL_bmodes.h +++ b/modules/SDL2/src/video/haiku/SDL_bmodes.h @@ -33,10 +33,10 @@ extern int32 HAIKU_ColorSpaceToSDLPxFormat(uint32 colorspace); extern int HAIKU_InitModes(_THIS); extern int HAIKU_QuitModes(_THIS); extern int HAIKU_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, - SDL_Rect *rect); + SDL_Rect *rect); extern void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display); extern int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, - SDL_DisplayMode *mode); + SDL_DisplayMode *mode); #ifdef __cplusplus } diff --git a/modules/SDL2/src/video/haiku/SDL_bopengl.cc b/modules/SDL2/src/video/haiku/SDL_bopengl.cc index d1ab6b8..7e12ad6 100644 --- a/modules/SDL2/src/video/haiku/SDL_bopengl.cc +++ b/modules/SDL2/src/video/haiku/SDL_bopengl.cc @@ -36,11 +36,11 @@ extern "C" { static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { - return ((SDL_BWin*)(window->driverdata)); + return (SDL_BWin *)(window->driverdata); } -static SDL_INLINE SDL_BApp *_GetBeApp() { - return ((SDL_BApp*)be_app); +static SDL_INLINE SDL_BLooper *_GetBeLooper() { + return SDL_Looper; } /* Passing a NULL path means load pointers from the application */ @@ -51,7 +51,7 @@ int HAIKU_GL_LoadLibrary(_THIS, const char *path) int32 cookie = 0; while (get_next_image_info(0, &cookie, &info) == B_OK) { void *location = NULL; - if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY, + if ( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY, &location) == B_OK) { _this->gl_config.dll_handle = (void *) (addr_t) info.id; @@ -97,7 +97,7 @@ int HAIKU_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { return SDL_SetError("MakeCurrent failed"); } } - _GetBeApp()->SetCurrentContext(glView); + _GetBeLooper()->SetCurrentContext(glView); return 0; } @@ -138,7 +138,7 @@ SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window) { } #endif bwin->CreateGLView(gl_flags); - _GetBeApp()->SetCurrentContext(bwin->GetGLView()); + _GetBeLooper()->SetCurrentContext(bwin->GetGLView()); return (SDL_GLContext)(bwin->GetGLView()); } @@ -175,9 +175,9 @@ void HAIKU_GL_UnloadLibrary(_THIS) { currently in use. */ void HAIKU_GL_RebootContexts(_THIS) { SDL_Window *window = _this->windows; - while(window) { + while (window) { SDL_BWin *bwin = _ToBeWin(window); - if(bwin->GetGLView()) { + if (bwin->GetGLView()) { bwin->LockLooper(); bwin->RemoveGLView(); bwin->CreateGLView(bwin->GetGLType()); diff --git a/modules/SDL2/src/video/haiku/SDL_bopengl.h b/modules/SDL2/src/video/haiku/SDL_bopengl.h index 2b6d485..0085a1e 100644 --- a/modules/SDL2/src/video/haiku/SDL_bopengl.h +++ b/modules/SDL2/src/video/haiku/SDL_bopengl.h @@ -30,16 +30,15 @@ extern "C" { #include "../SDL_sysvideo.h" - -extern int HAIKU_GL_LoadLibrary(_THIS, const char *path); /* FIXME */ -extern void *HAIKU_GL_GetProcAddress(_THIS, const char *proc); /* FIXME */ -extern void HAIKU_GL_UnloadLibrary(_THIS); /* TODO */ -extern int HAIKU_GL_MakeCurrent(_THIS, SDL_Window * window, - SDL_GLContext context); -extern int HAIKU_GL_SetSwapInterval(_THIS, int interval); /* TODO */ -extern int HAIKU_GL_GetSwapInterval(_THIS); /* TODO */ -extern int HAIKU_GL_SwapWindow(_THIS, SDL_Window * window); -extern SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window); +extern int HAIKU_GL_LoadLibrary(_THIS, const char *path); /* FIXME */ +extern void *HAIKU_GL_GetProcAddress(_THIS, const char *proc); /* FIXME */ +extern void HAIKU_GL_UnloadLibrary(_THIS); /* TODO */ +extern int HAIKU_GL_MakeCurrent(_THIS, SDL_Window *window, + SDL_GLContext context); +extern int HAIKU_GL_SetSwapInterval(_THIS, int interval); /* TODO */ +extern int HAIKU_GL_GetSwapInterval(_THIS); /* TODO */ +extern int HAIKU_GL_SwapWindow(_THIS, SDL_Window *window); +extern SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window *window); extern void HAIKU_GL_DeleteContext(_THIS, SDL_GLContext context); extern void HAIKU_GL_RebootContexts(_THIS); diff --git a/modules/SDL2/src/video/haiku/SDL_bvideo.cc b/modules/SDL2/src/video/haiku/SDL_bvideo.cc index 4314d7f..0f23c4d 100644 --- a/modules/SDL2/src/video/haiku/SDL_bvideo.cc +++ b/modules/SDL2/src/video/haiku/SDL_bvideo.cc @@ -41,7 +41,7 @@ extern "C" { #include "SDL_bevents.h" static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { - return ((SDL_BWin*)(window->driverdata)); + return (SDL_BWin *)(window->driverdata); } /* FIXME: Undefined functions */ @@ -54,8 +54,7 @@ static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { /* End undefined functions */ -static SDL_VideoDevice * -HAIKU_CreateDevice(void) +static SDL_VideoDevice * HAIKU_CreateDevice(void) { SDL_VideoDevice *device; /*SDL_VideoData *data;*/ @@ -141,8 +140,7 @@ void HAIKU_DeleteDevice(SDL_VideoDevice * device) SDL_free(device); } -static SDL_Cursor * -HAIKU_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor * HAIKU_CreateSystemCursor(SDL_SystemCursor id) { SDL_Cursor *cursor; BCursorID cursorId = B_CURSOR_ID_SYSTEM_DEFAULT; @@ -176,14 +174,12 @@ HAIKU_CreateSystemCursor(SDL_SystemCursor id) return cursor; } -static SDL_Cursor * -HAIKU_CreateDefaultCursor() +static SDL_Cursor * HAIKU_CreateDefaultCursor() { return HAIKU_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); } -static void -HAIKU_FreeCursor(SDL_Cursor * cursor) +static void HAIKU_FreeCursor(SDL_Cursor * cursor) { if (cursor->driverdata) { delete (BCursor*) cursor->driverdata; @@ -191,14 +187,13 @@ HAIKU_FreeCursor(SDL_Cursor * cursor) SDL_free(cursor); } -static SDL_Cursor * -HAIKU_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor * HAIKU_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) { SDL_Cursor *cursor; SDL_Surface *converted; converted = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_ARGB8888, 0); - if (!converted) { + if (converted == NULL) { return NULL; } @@ -220,8 +215,9 @@ static int HAIKU_ShowCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse) + if (mouse == NULL) { return 0; + } if (cursor) { BCursor *hCursor = (BCursor*)cursor->driverdata; @@ -235,11 +231,10 @@ static int HAIKU_ShowCursor(SDL_Cursor *cursor) return 0; } -static int -HAIKU_SetRelativeMouseMode(SDL_bool enabled) +static int HAIKU_SetRelativeMouseMode(SDL_bool enabled) { SDL_Window *window = SDL_GetMouseFocus(); - if (!window) { + if (window == NULL) { return 0; } @@ -259,8 +254,9 @@ HAIKU_SetRelativeMouseMode(SDL_bool enabled) static void HAIKU_MouseInit(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse) + if (mouse == NULL) { return; + } mouse->CreateCursor = HAIKU_CreateCursor; mouse->CreateSystemCursor = HAIKU_CreateSystemCursor; mouse->ShowCursor = HAIKU_ShowCursor; @@ -292,7 +288,7 @@ int HAIKU_VideoInit(_THIS) #endif /* We're done! */ - return (0); + return 0; } void HAIKU_VideoQuit(_THIS) @@ -309,7 +305,7 @@ int HAIKU_OpenURL(const char *url) { BUrl burl(url); const status_t rc = burl.OpenWithPreferredApplication(false); - return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int) rc); + return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int)rc); } #ifdef __cplusplus diff --git a/modules/SDL2/src/video/haiku/SDL_bvideo.h b/modules/SDL2/src/video/haiku/SDL_bvideo.h index 8bfce88..0c5288f 100644 --- a/modules/SDL2/src/video/haiku/SDL_bvideo.h +++ b/modules/SDL2/src/video/haiku/SDL_bvideo.h @@ -29,7 +29,6 @@ extern "C" { #include "../../main/haiku/SDL_BeApp.h" #include "../SDL_sysvideo.h" - extern void HAIKU_VideoQuit(_THIS); extern int HAIKU_VideoInit(_THIS); extern void HAIKU_DeleteDevice(_THIS); diff --git a/modules/SDL2/src/video/haiku/SDL_bwindow.cc b/modules/SDL2/src/video/haiku/SDL_bwindow.cc index a9cc173..18e03d4 100644 --- a/modules/SDL2/src/video/haiku/SDL_bwindow.cc +++ b/modules/SDL2/src/video/haiku/SDL_bwindow.cc @@ -34,11 +34,11 @@ extern "C" { #endif static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) { - return ((SDL_BWin*)(window->driverdata)); + return (SDL_BWin *)(window->driverdata); } -static SDL_INLINE SDL_BApp *_GetBeApp() { - return ((SDL_BApp*)be_app); +static SDL_INLINE SDL_BLooper *_GetBeLooper() { + return SDL_Looper; } static int _InitWindow(_THIS, SDL_Window *window) { @@ -52,26 +52,27 @@ static int _InitWindow(_THIS, SDL_Window *window) { window->y + window->h - 1 ); - if(window->flags & SDL_WINDOW_FULLSCREEN) { + if (window->flags & SDL_WINDOW_FULLSCREEN) { /* TODO: Add support for this flag */ printf(__FILE__": %d!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",__LINE__); } - if(window->flags & SDL_WINDOW_OPENGL) { + if (window->flags & SDL_WINDOW_OPENGL) { /* TODO: Add support for this flag */ } - if(!(window->flags & SDL_WINDOW_RESIZABLE)) { + if (!(window->flags & SDL_WINDOW_RESIZABLE)) { flags |= B_NOT_RESIZABLE | B_NOT_ZOOMABLE; } - if(window->flags & SDL_WINDOW_BORDERLESS) { + if (window->flags & SDL_WINDOW_BORDERLESS) { look = B_NO_BORDER_WINDOW_LOOK; } SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, look, flags); - if(bwin == NULL) + if (bwin == NULL) { return -1; + } window->driverdata = bwin; - int32 winID = _GetBeApp()->GetID(window); + int32 winID = _GetBeLooper()->GetID(window); bwin->SetID(winID); return 0; @@ -90,8 +91,9 @@ int HAIKU_CreateWindow(_THIS, SDL_Window *window) { int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { SDL_BWin *otherBWin = (SDL_BWin*)data; - if(!otherBWin->LockLooper()) + if (!otherBWin->LockLooper()) { return -1; + } /* Create the new window and initialize its members */ window->x = (int)otherBWin->Frame().left; @@ -100,7 +102,7 @@ int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { window->h = (int)otherBWin->Frame().Height(); /* Set SDL flags */ - if(!(otherBWin->Flags() & B_NOT_RESIZABLE)) { + if (!(otherBWin->Flags() & B_NOT_RESIZABLE)) { window->flags |= SDL_WINDOW_RESIZABLE; } @@ -205,7 +207,7 @@ int HAIKU_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) { } -void HAIKU_SetWindowMinimumSize(_THIS, SDL_Window * window){ +void HAIKU_SetWindowMinimumSize(_THIS, SDL_Window * window) { BMessage msg(BWIN_MINIMUM_SIZE_WINDOW); msg.AddInt32("window-w", window->w -1); msg.AddInt32("window-h", window->h -1); @@ -218,7 +220,7 @@ void HAIKU_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { void HAIKU_DestroyWindow(_THIS, SDL_Window * window) { _ToBeWin(window)->LockLooper(); /* This MUST be locked */ - _GetBeApp()->ClearID(_ToBeWin(window)); + _GetBeLooper()->ClearID(_ToBeWin(window)); _ToBeWin(window)->Quit(); window->driverdata = NULL; } diff --git a/modules/SDL2/src/video/haiku/SDL_bwindow.h b/modules/SDL2/src/video/haiku/SDL_bwindow.h index 0ae2d0b..1f82266 100644 --- a/modules/SDL2/src/video/haiku/SDL_bwindow.h +++ b/modules/SDL2/src/video/haiku/SDL_bwindow.h @@ -22,10 +22,8 @@ #ifndef SDL_BWINDOW_H #define SDL_BWINDOW_H - #include "../SDL_sysvideo.h" - extern int HAIKU_CreateWindow(_THIS, SDL_Window *window); extern int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); extern void HAIKU_SetWindowTitle(_THIS, SDL_Window * window); @@ -49,8 +47,6 @@ extern void HAIKU_DestroyWindow(_THIS, SDL_Window * window); extern SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info); - - #endif /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan.hpp deleted file mode 100644 index eac9ff0..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan.hpp +++ /dev/null @@ -1,14537 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_HPP -#define VULKAN_HPP - -#if defined( _MSVC_LANG ) -# define VULKAN_HPP_CPLUSPLUS _MSVC_LANG -#else -# define VULKAN_HPP_CPLUSPLUS __cplusplus -#endif - -#if 201703L < VULKAN_HPP_CPLUSPLUS -# define VULKAN_HPP_CPP_VERSION 20 -#elif 201402L < VULKAN_HPP_CPLUSPLUS -# define VULKAN_HPP_CPP_VERSION 17 -#elif 201103L < VULKAN_HPP_CPLUSPLUS -# define VULKAN_HPP_CPP_VERSION 14 -#elif 199711L < VULKAN_HPP_CPLUSPLUS -# define VULKAN_HPP_CPP_VERSION 11 -#else -# error "vulkan.hpp needs at least c++ standard version 11" -#endif - -#include // ArrayWrapperND -#include // std::string -#include -#if 17 <= VULKAN_HPP_CPP_VERSION -# include // std::string_view -#endif - -#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) -# if !defined( VULKAN_HPP_NO_SMART_HANDLE ) -# define VULKAN_HPP_NO_SMART_HANDLE -# endif -#else -# include // std::tie -# include // std::vector -#endif - -#if !defined( VULKAN_HPP_NO_EXCEPTIONS ) -# include // std::is_error_code_enum -#endif - -#if !defined( VULKAN_HPP_NO_SMART_HANDLE ) -# include // std::transform -#endif - -#if defined( VULKAN_HPP_NO_CONSTRUCTORS ) -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) -# define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS -# endif -# if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) -# define VULKAN_HPP_NO_UNION_CONSTRUCTORS -# endif -#endif - -#if defined( VULKAN_HPP_NO_SETTERS ) -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) -# define VULKAN_HPP_NO_STRUCT_SETTERS -# endif -# if !defined( VULKAN_HPP_NO_UNION_SETTERS ) -# define VULKAN_HPP_NO_UNION_SETTERS -# endif -#endif - -#if !defined( VULKAN_HPP_ASSERT ) -# include -# define VULKAN_HPP_ASSERT assert -#endif - -#if !defined( VULKAN_HPP_ASSERT_ON_RESULT ) -# define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT -#endif - -#if !defined( VULKAN_HPP_STATIC_ASSERT ) -# define VULKAN_HPP_STATIC_ASSERT static_assert -#endif - -#if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL ) -# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 -#endif - -#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) -# include -# elif defined( _WIN32 ) -typedef struct HINSTANCE__ * HINSTANCE; -# if defined( _WIN64 ) -typedef int64_t( __stdcall * FARPROC )(); -# else -typedef int( __stdcall * FARPROC )(); -# endif -extern "C" __declspec( dllimport ) HINSTANCE __stdcall LoadLibraryA( char const * lpLibFileName ); -extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( HINSTANCE hLibModule ); -extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE hModule, const char * lpProcName ); -# endif -#endif - -#if !defined( __has_include ) -# define __has_include( x ) false -#endif - -#if ( 201907 <= __cpp_lib_three_way_comparison ) && __has_include( ) && !defined( VULKAN_HPP_NO_SPACESHIP_OPERATOR ) -# define VULKAN_HPP_HAS_SPACESHIP_OPERATOR -#endif -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) -# include -#endif - -#if ( 201803 <= __cpp_lib_span ) -# define VULKAN_HPP_SUPPORT_SPAN -# include -#endif - -static_assert( VK_HEADER_VERSION == 227, "Wrong VK_HEADER_VERSION!" ); - -// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default. -// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION -#if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) -# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION ) -# define VULKAN_HPP_TYPESAFE_CONVERSION -# endif -#endif - -// includes through some other header -// this results in major(x) being resolved to gnu_dev_major(x) -// which is an expression in a constructor initializer list. -#if defined( major ) -# undef major -#endif -#if defined( minor ) -# undef minor -#endif - -// Windows defines MemoryBarrier which is deprecated and collides -// with the VULKAN_HPP_NAMESPACE::MemoryBarrier struct. -#if defined( MemoryBarrier ) -# undef MemoryBarrier -#endif - -#if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS ) -# if defined( __clang__ ) -# if __has_feature( cxx_unrestricted_unions ) -# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS -# endif -# elif defined( __GNUC__ ) -# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) -# if 40600 <= GCC_VERSION -# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS -# endif -# elif defined( _MSC_VER ) -# if 1900 <= _MSC_VER -# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS -# endif -# endif -#endif - -#if !defined( VULKAN_HPP_INLINE ) -# if defined( __clang__ ) -# if __has_attribute( always_inline ) -# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__ -# else -# define VULKAN_HPP_INLINE inline -# endif -# elif defined( __GNUC__ ) -# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__ -# elif defined( _MSC_VER ) -# define VULKAN_HPP_INLINE inline -# else -# define VULKAN_HPP_INLINE inline -# endif -#endif - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) -# define VULKAN_HPP_TYPESAFE_EXPLICIT -#else -# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit -#endif - -#if defined( __cpp_constexpr ) -# define VULKAN_HPP_CONSTEXPR constexpr -# if __cpp_constexpr >= 201304 -# define VULKAN_HPP_CONSTEXPR_14 constexpr -# else -# define VULKAN_HPP_CONSTEXPR_14 -# endif -# define VULKAN_HPP_CONST_OR_CONSTEXPR constexpr -#else -# define VULKAN_HPP_CONSTEXPR -# define VULKAN_HPP_CONSTEXPR_14 -# define VULKAN_HPP_CONST_OR_CONSTEXPR const -#endif - -#if !defined( VULKAN_HPP_NOEXCEPT ) -# if defined( _MSC_VER ) && ( _MSC_VER <= 1800 ) -# define VULKAN_HPP_NOEXCEPT -# else -# define VULKAN_HPP_NOEXCEPT noexcept -# define VULKAN_HPP_HAS_NOEXCEPT 1 -# if defined( VULKAN_HPP_NO_EXCEPTIONS ) -# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept -# else -# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS -# endif -# endif -#endif - -#if 14 <= VULKAN_HPP_CPP_VERSION -# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] -#else -# define VULKAN_HPP_DEPRECATED( msg ) -#endif - -#if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS ) -# define VULKAN_HPP_NODISCARD [[nodiscard]] -# if defined( VULKAN_HPP_NO_EXCEPTIONS ) -# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS [[nodiscard]] -# else -# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS -# endif -#else -# define VULKAN_HPP_NODISCARD -# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS -#endif - -#if !defined( VULKAN_HPP_NAMESPACE ) -# define VULKAN_HPP_NAMESPACE vk -#endif - -#define VULKAN_HPP_STRINGIFY2( text ) #text -#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text ) -#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE ) - -namespace VULKAN_HPP_NAMESPACE -{ - template - class ArrayWrapper1D : public std::array - { - public: - VULKAN_HPP_CONSTEXPR ArrayWrapper1D() VULKAN_HPP_NOEXCEPT : std::array() {} - - VULKAN_HPP_CONSTEXPR ArrayWrapper1D( std::array const & data ) VULKAN_HPP_NOEXCEPT : std::array( data ) {} - -#if ( VK_USE_64_BIT_PTR_DEFINES == 0 ) - // on 32 bit compiles, needs overloads on index type int to resolve ambiguities - VULKAN_HPP_CONSTEXPR T const & operator[]( int index ) const VULKAN_HPP_NOEXCEPT - { - return std::array::operator[]( index ); - } - - T & operator[]( int index ) VULKAN_HPP_NOEXCEPT - { - return std::array::operator[]( index ); - } -#endif - - operator T const *() const VULKAN_HPP_NOEXCEPT - { - return this->data(); - } - - operator T *() VULKAN_HPP_NOEXCEPT - { - return this->data(); - } - - template ::value, int>::type = 0> - operator std::string() const - { - return std::string( this->data() ); - } - -#if 17 <= VULKAN_HPP_CPP_VERSION - template ::value, int>::type = 0> - operator std::string_view() const - { - return std::string_view( this->data() ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - template ::value, int>::type = 0> - std::strong_ordering operator<=>( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) <=> *static_cast const *>( &rhs ); - } -#else - template ::value, int>::type = 0> - bool operator<( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) < *static_cast const *>( &rhs ); - } - - template ::value, int>::type = 0> - bool operator<=( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) <= *static_cast const *>( &rhs ); - } - - template ::value, int>::type = 0> - bool operator>( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) > *static_cast const *>( &rhs ); - } - - template ::value, int>::type = 0> - bool operator>=( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) >= *static_cast const *>( &rhs ); - } -#endif - - template ::value, int>::type = 0> - bool operator==( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) == *static_cast const *>( &rhs ); - } - - template ::value, int>::type = 0> - bool operator!=( ArrayWrapper1D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return *static_cast const *>( this ) != *static_cast const *>( &rhs ); - } - }; - - // specialization of relational operators between std::string and arrays of chars - template - bool operator<( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs < rhs.data(); - } - - template - bool operator<=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs <= rhs.data(); - } - - template - bool operator>( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs > rhs.data(); - } - - template - bool operator>=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs >= rhs.data(); - } - - template - bool operator==( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs == rhs.data(); - } - - template - bool operator!=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT - { - return lhs != rhs.data(); - } - - template - class ArrayWrapper2D : public std::array, N> - { - public: - VULKAN_HPP_CONSTEXPR ArrayWrapper2D() VULKAN_HPP_NOEXCEPT : std::array, N>() {} - - VULKAN_HPP_CONSTEXPR ArrayWrapper2D( std::array, N> const & data ) VULKAN_HPP_NOEXCEPT - : std::array, N>( *reinterpret_cast, N> const *>( &data ) ) - { - } - }; - - template - struct FlagTraits - { - }; - - template - class Flags - { - public: - using MaskType = typename std::underlying_type::type; - - // constructors - VULKAN_HPP_CONSTEXPR Flags() VULKAN_HPP_NOEXCEPT : m_mask( 0 ) {} - - VULKAN_HPP_CONSTEXPR Flags( BitType bit ) VULKAN_HPP_NOEXCEPT : m_mask( static_cast( bit ) ) {} - - VULKAN_HPP_CONSTEXPR Flags( Flags const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VULKAN_HPP_CONSTEXPR explicit Flags( MaskType flags ) VULKAN_HPP_NOEXCEPT : m_mask( flags ) {} - - // relational operators -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Flags const & ) const = default; -#else - VULKAN_HPP_CONSTEXPR bool operator<( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask < rhs.m_mask; - } - - VULKAN_HPP_CONSTEXPR bool operator<=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask <= rhs.m_mask; - } - - VULKAN_HPP_CONSTEXPR bool operator>( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask > rhs.m_mask; - } - - VULKAN_HPP_CONSTEXPR bool operator>=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask >= rhs.m_mask; - } - - VULKAN_HPP_CONSTEXPR bool operator==( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask == rhs.m_mask; - } - - VULKAN_HPP_CONSTEXPR bool operator!=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_mask != rhs.m_mask; - } -#endif - - // logical operator - VULKAN_HPP_CONSTEXPR bool operator!() const VULKAN_HPP_NOEXCEPT - { - return !m_mask; - } - - // bitwise operators - VULKAN_HPP_CONSTEXPR Flags operator&( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return Flags( m_mask & rhs.m_mask ); - } - - VULKAN_HPP_CONSTEXPR Flags operator|( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return Flags( m_mask | rhs.m_mask ); - } - - VULKAN_HPP_CONSTEXPR Flags operator^( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return Flags( m_mask ^ rhs.m_mask ); - } - - VULKAN_HPP_CONSTEXPR Flags operator~() const VULKAN_HPP_NOEXCEPT - { - return Flags( m_mask ^ FlagTraits::allFlags ); - } - - // assignment operators - VULKAN_HPP_CONSTEXPR_14 Flags & operator=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VULKAN_HPP_CONSTEXPR_14 Flags & operator|=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT - { - m_mask |= rhs.m_mask; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Flags & operator&=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT - { - m_mask &= rhs.m_mask; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Flags & operator^=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT - { - m_mask ^= rhs.m_mask; - return *this; - } - - // cast operators - explicit VULKAN_HPP_CONSTEXPR operator bool() const VULKAN_HPP_NOEXCEPT - { - return !!m_mask; - } - - explicit VULKAN_HPP_CONSTEXPR operator MaskType() const VULKAN_HPP_NOEXCEPT - { - return m_mask; - } - -#if defined( VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC ) - public: -#else - private: -#endif - MaskType m_mask; - }; - -#if !defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - // relational operators only needed for pre C++20 - template - VULKAN_HPP_CONSTEXPR bool operator<( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator>( bit ); - } - - template - VULKAN_HPP_CONSTEXPR bool operator<=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator>=( bit ); - } - - template - VULKAN_HPP_CONSTEXPR bool operator>( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator<( bit ); - } - - template - VULKAN_HPP_CONSTEXPR bool operator>=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator<=( bit ); - } - - template - VULKAN_HPP_CONSTEXPR bool operator==( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator==( bit ); - } - - template - VULKAN_HPP_CONSTEXPR bool operator!=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator!=( bit ); - } -#endif - - // bitwise operators - template - VULKAN_HPP_CONSTEXPR Flags operator&( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator&( bit ); - } - - template - VULKAN_HPP_CONSTEXPR Flags operator|( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator|( bit ); - } - - template - VULKAN_HPP_CONSTEXPR Flags operator^( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT - { - return flags.operator^( bit ); - } - -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - class ArrayProxy - { - public: - VULKAN_HPP_CONSTEXPR ArrayProxy() VULKAN_HPP_NOEXCEPT - : m_count( 0 ) - , m_ptr( nullptr ) - { - } - - VULKAN_HPP_CONSTEXPR ArrayProxy( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - : m_count( 0 ) - , m_ptr( nullptr ) - { - } - - ArrayProxy( T & value ) VULKAN_HPP_NOEXCEPT - : m_count( 1 ) - , m_ptr( &value ) - { - } - - template ::value, int>::type = 0> - ArrayProxy( typename std::remove_const::type & value ) VULKAN_HPP_NOEXCEPT - : m_count( 1 ) - , m_ptr( &value ) - { - } - - ArrayProxy( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT - : m_count( count ) - , m_ptr( ptr ) - { - } - - template ::value, int>::type = 0> - ArrayProxy( uint32_t count, typename std::remove_const::type * ptr ) VULKAN_HPP_NOEXCEPT - : m_count( count ) - , m_ptr( ptr ) - { - } - - template - ArrayProxy( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT - : m_count( C ) - , m_ptr( ptr ) - { - } - - template ::value, int>::type = 0> - ArrayProxy( typename std::remove_const::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT - : m_count( C ) - , m_ptr( ptr ) - { - } - -# if __GNUC__ >= 9 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Winit-list-lifetime" -# endif - - ArrayProxy( std::initializer_list const & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - template ::value, int>::type = 0> - ArrayProxy( std::initializer_list::type> const & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - ArrayProxy( std::initializer_list & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - template ::value, int>::type = 0> - ArrayProxy( std::initializer_list::type> & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - -# if __GNUC__ >= 9 -# pragma GCC diagnostic pop -# endif - - // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly - // convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement. - template ().data() ), T *>::value && - std::is_convertible().size() ), std::size_t>::value>::type * = nullptr> - ArrayProxy( V const & v ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( v.size() ) ) - , m_ptr( v.data() ) - { - } - - template ().data() ), T *>::value && - std::is_convertible().size() ), std::size_t>::value>::type * = nullptr> - ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( v.size() ) ) - , m_ptr( v.data() ) - { - } - - const T * begin() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - - const T * end() const VULKAN_HPP_NOEXCEPT - { - return m_ptr + m_count; - } - - const T & front() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_count && m_ptr ); - return *m_ptr; - } - - const T & back() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_count && m_ptr ); - return *( m_ptr + m_count - 1 ); - } - - bool empty() const VULKAN_HPP_NOEXCEPT - { - return ( m_count == 0 ); - } - - uint32_t size() const VULKAN_HPP_NOEXCEPT - { - return m_count; - } - - T * data() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - - private: - uint32_t m_count; - T * m_ptr; - }; - - template - class ArrayProxyNoTemporaries - { - public: - VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries() VULKAN_HPP_NOEXCEPT - : m_count( 0 ) - , m_ptr( nullptr ) - { - } - - VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - : m_count( 0 ) - , m_ptr( nullptr ) - { - } - - ArrayProxyNoTemporaries( T & value ) VULKAN_HPP_NOEXCEPT - : m_count( 1 ) - , m_ptr( &value ) - { - } - - template - ArrayProxyNoTemporaries( V && value ) = delete; - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( typename std::remove_const::type & value ) VULKAN_HPP_NOEXCEPT - : m_count( 1 ) - , m_ptr( &value ) - { - } - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( typename std::remove_const::type && value ) = delete; - - ArrayProxyNoTemporaries( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT - : m_count( count ) - , m_ptr( ptr ) - { - } - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( uint32_t count, typename std::remove_const::type * ptr ) VULKAN_HPP_NOEXCEPT - : m_count( count ) - , m_ptr( ptr ) - { - } - - template - ArrayProxyNoTemporaries( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT - : m_count( C ) - , m_ptr( ptr ) - { - } - - template - ArrayProxyNoTemporaries( T( &&ptr )[C] ) = delete; - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( typename std::remove_const::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT - : m_count( C ) - , m_ptr( ptr ) - { - } - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( typename std::remove_const::type( &&ptr )[C] ) = delete; - - ArrayProxyNoTemporaries( std::initializer_list const & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - ArrayProxyNoTemporaries( std::initializer_list const && list ) = delete; - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( std::initializer_list::type> const & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( std::initializer_list::type> const && list ) = delete; - - ArrayProxyNoTemporaries( std::initializer_list & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - ArrayProxyNoTemporaries( std::initializer_list && list ) = delete; - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( std::initializer_list::type> & list ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( list.size() ) ) - , m_ptr( list.begin() ) - { - } - - template ::value, int>::type = 0> - ArrayProxyNoTemporaries( std::initializer_list::type> && list ) = delete; - - // Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly - // convertible to size_t. - template ().data() ), T *>::value && - std::is_convertible().size() ), std::size_t>::value>::type * = nullptr> - ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( v.size() ) ) - , m_ptr( v.data() ) - { - } - - const T * begin() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - - const T * end() const VULKAN_HPP_NOEXCEPT - { - return m_ptr + m_count; - } - - const T & front() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_count && m_ptr ); - return *m_ptr; - } - - const T & back() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_count && m_ptr ); - return *( m_ptr + m_count - 1 ); - } - - bool empty() const VULKAN_HPP_NOEXCEPT - { - return ( m_count == 0 ); - } - - uint32_t size() const VULKAN_HPP_NOEXCEPT - { - return m_count; - } - - T * data() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - - private: - uint32_t m_count; - T * m_ptr; - }; - - template - class Optional - { - public: - Optional( RefType & reference ) VULKAN_HPP_NOEXCEPT - { - m_ptr = &reference; - } - Optional( RefType * ptr ) VULKAN_HPP_NOEXCEPT - { - m_ptr = ptr; - } - Optional( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_ptr = nullptr; - } - - operator RefType *() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - RefType const * operator->() const VULKAN_HPP_NOEXCEPT - { - return m_ptr; - } - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return !!m_ptr; - } - - private: - RefType * m_ptr; - }; - - template - struct StructExtends - { - enum - { - value = false - }; - }; - - template - struct IsPartOfStructureChain - { - static const bool valid = false; - }; - - template - struct IsPartOfStructureChain - { - static const bool valid = std::is_same::value || IsPartOfStructureChain::valid; - }; - - template - struct StructureChainContains - { - static const bool value = std::is_same>::type>::value || - StructureChainContains::value; - }; - - template - struct StructureChainContains<0, T, ChainElements...> - { - static const bool value = std::is_same>::type>::value; - }; - - template - struct StructureChainValidation - { - using TestType = typename std::tuple_element>::type; - static const bool valid = StructExtends>::type>::value && - ( TestType::allowDuplicate || !StructureChainContains::value ) && - StructureChainValidation::valid; - }; - - template - struct StructureChainValidation<0, ChainElements...> - { - static const bool valid = true; - }; - - template - class StructureChain : public std::tuple - { - public: - StructureChain() VULKAN_HPP_NOEXCEPT - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link(); - } - - StructureChain( StructureChain const & rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( rhs ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - } - - StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( std::forward>( rhs ) ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - } - - StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple( elems... ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link(); - } - - StructureChain & operator=( StructureChain const & rhs ) VULKAN_HPP_NOEXCEPT - { - std::tuple::operator=( rhs ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - return *this; - } - - StructureChain & operator=( StructureChain && rhs ) = delete; - - template >::type, size_t Which = 0> - T & get() VULKAN_HPP_NOEXCEPT - { - return std::get::value>( static_cast &>( *this ) ); - } - - template >::type, size_t Which = 0> - T const & get() const VULKAN_HPP_NOEXCEPT - { - return std::get::value>( static_cast const &>( *this ) ); - } - - template - std::tuple get() VULKAN_HPP_NOEXCEPT - { - return std::tie( get(), get(), get()... ); - } - - template - std::tuple get() const VULKAN_HPP_NOEXCEPT - { - return std::tie( get(), get(), get()... ); - } - - template - typename std::enable_if>::type>::value && ( Which == 0 ), bool>::type - isLinked() const VULKAN_HPP_NOEXCEPT - { - return true; - } - - template - typename std::enable_if>::type>::value || ( Which != 0 ), bool>::type - isLinked() const VULKAN_HPP_NOEXCEPT - { - static_assert( IsPartOfStructureChain::valid, "Can't unlink Structure that's not part of this StructureChain!" ); - return isLinked( reinterpret_cast( &get() ) ); - } - - template - typename std::enable_if>::type>::value || ( Which != 0 ), void>::type - relink() VULKAN_HPP_NOEXCEPT - { - static_assert( IsPartOfStructureChain::valid, "Can't relink Structure that's not part of this StructureChain!" ); - auto pNext = reinterpret_cast( &get() ); - VULKAN_HPP_ASSERT( !isLinked( pNext ) ); - auto & headElement = std::get<0>( static_cast &>( *this ) ); - pNext->pNext = reinterpret_cast( headElement.pNext ); - headElement.pNext = pNext; - } - - template - typename std::enable_if>::type>::value || ( Which != 0 ), void>::type - unlink() VULKAN_HPP_NOEXCEPT - { - static_assert( IsPartOfStructureChain::valid, "Can't unlink Structure that's not part of this StructureChain!" ); - unlink( reinterpret_cast( &get() ) ); - } - - private: - template - struct ChainElementIndex : ChainElementIndex - { - }; - - template - struct ChainElementIndex::value, void>::type, First, Types...> - : ChainElementIndex - { - }; - - template - struct ChainElementIndex::value, void>::type, First, Types...> - : ChainElementIndex - { - }; - - template - struct ChainElementIndex::value, void>::type, First, Types...> - : std::integral_constant - { - }; - - bool isLinked( VkBaseInStructure const * pNext ) const VULKAN_HPP_NOEXCEPT - { - VkBaseInStructure const * elementPtr = - reinterpret_cast( &std::get<0>( static_cast const &>( *this ) ) ); - while ( elementPtr ) - { - if ( elementPtr->pNext == pNext ) - { - return true; - } - elementPtr = elementPtr->pNext; - } - return false; - } - - template - typename std::enable_if::type link() VULKAN_HPP_NOEXCEPT - { - auto & x = std::get( static_cast &>( *this ) ); - x.pNext = &std::get( static_cast &>( *this ) ); - link(); - } - - template - typename std::enable_if::type link() VULKAN_HPP_NOEXCEPT - { - } - - void link( void * dstBase, void const * srcBase, VkBaseOutStructure * dst, VkBaseInStructure const * src ) - { - while ( src->pNext ) - { - std::ptrdiff_t offset = reinterpret_cast( src->pNext ) - reinterpret_cast( srcBase ); - dst->pNext = reinterpret_cast( reinterpret_cast( dstBase ) + offset ); - dst = dst->pNext; - src = src->pNext; - } - dst->pNext = nullptr; - } - - void unlink( VkBaseOutStructure const * pNext ) VULKAN_HPP_NOEXCEPT - { - VkBaseOutStructure * elementPtr = reinterpret_cast( &std::get<0>( static_cast &>( *this ) ) ); - while ( elementPtr && ( elementPtr->pNext != pNext ) ) - { - elementPtr = elementPtr->pNext; - } - if ( elementPtr ) - { - elementPtr->pNext = pNext->pNext; - } - else - { - VULKAN_HPP_ASSERT( false ); // fires, if the ClassType member has already been unlinked ! - } - } - }; - -# if !defined( VULKAN_HPP_NO_SMART_HANDLE ) - template - class UniqueHandleTraits; - - template - class UniqueHandle : public UniqueHandleTraits::deleter - { - private: - using Deleter = typename UniqueHandleTraits::deleter; - - public: - using element_type = Type; - - UniqueHandle() : Deleter(), m_value() {} - - explicit UniqueHandle( Type const & value, Deleter const & deleter = Deleter() ) VULKAN_HPP_NOEXCEPT - : Deleter( deleter ) - , m_value( value ) - { - } - - UniqueHandle( UniqueHandle const & ) = delete; - - UniqueHandle( UniqueHandle && other ) VULKAN_HPP_NOEXCEPT - : Deleter( std::move( static_cast( other ) ) ) - , m_value( other.release() ) - { - } - - ~UniqueHandle() VULKAN_HPP_NOEXCEPT - { - if ( m_value ) - { - this->destroy( m_value ); - } - } - - UniqueHandle & operator=( UniqueHandle const & ) = delete; - - UniqueHandle & operator=( UniqueHandle && other ) VULKAN_HPP_NOEXCEPT - { - reset( other.release() ); - *static_cast( this ) = std::move( static_cast( other ) ); - return *this; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_value.operator bool(); - } - - Type const * operator->() const VULKAN_HPP_NOEXCEPT - { - return &m_value; - } - - Type * operator->() VULKAN_HPP_NOEXCEPT - { - return &m_value; - } - - Type const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_value; - } - - Type & operator*() VULKAN_HPP_NOEXCEPT - { - return m_value; - } - - const Type & get() const VULKAN_HPP_NOEXCEPT - { - return m_value; - } - - Type & get() VULKAN_HPP_NOEXCEPT - { - return m_value; - } - - void reset( Type const & value = Type() ) VULKAN_HPP_NOEXCEPT - { - if ( m_value != value ) - { - if ( m_value ) - { - this->destroy( m_value ); - } - m_value = value; - } - } - - Type release() VULKAN_HPP_NOEXCEPT - { - Type value = m_value; - m_value = nullptr; - return value; - } - - void swap( UniqueHandle & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_value, rhs.m_value ); - std::swap( static_cast( *this ), static_cast( rhs ) ); - } - - private: - Type m_value; - }; - - template - VULKAN_HPP_INLINE std::vector uniqueToRaw( std::vector const & handles ) - { - std::vector newBuffer( handles.size() ); - std::transform( handles.begin(), handles.end(), newBuffer.begin(), []( UniqueType const & handle ) { return handle.get(); } ); - return newBuffer; - } - - template - VULKAN_HPP_INLINE void swap( UniqueHandle & lhs, UniqueHandle & rhs ) VULKAN_HPP_NOEXCEPT - { - lhs.swap( rhs ); - } -# endif -#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE - - class DispatchLoaderBase - { - public: - DispatchLoaderBase() = default; - DispatchLoaderBase( std::nullptr_t ) -#if !defined( NDEBUG ) - : m_valid( false ) -#endif - { - } - -#if !defined( NDEBUG ) - size_t getVkHeaderVersion() const - { - VULKAN_HPP_ASSERT( m_valid ); - return vkHeaderVersion; - } - - private: - size_t vkHeaderVersion = VK_HEADER_VERSION; - bool m_valid = true; -#endif - }; - -#if !defined( VK_NO_PROTOTYPES ) - class DispatchLoaderStatic : public DispatchLoaderBase - { - public: - //=== VK_VERSION_1_0 === - - VkResult - vkCreateInstance( const VkInstanceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkInstance * pInstance ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateInstance( pCreateInfo, pAllocator, pInstance ); - } - - void vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyInstance( instance, pAllocator ); - } - - VkResult vkEnumeratePhysicalDevices( VkInstance instance, uint32_t * pPhysicalDeviceCount, VkPhysicalDevice * pPhysicalDevices ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumeratePhysicalDevices( instance, pPhysicalDeviceCount, pPhysicalDevices ); - } - - void vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures * pFeatures ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFeatures( physicalDevice, pFeatures ); - } - - void - vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties * pFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFormatProperties( physicalDevice, format, pFormatProperties ); - } - - VkResult vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags flags, - VkImageFormatProperties * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceImageFormatProperties( physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties ); - } - - void vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceProperties( physicalDevice, pProperties ); - } - - void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, - uint32_t * pQueueFamilyPropertyCount, - VkQueueFamilyProperties * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); - } - - void vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceMemoryProperties( physicalDevice, pMemoryProperties ); - } - - PFN_vkVoidFunction vkGetInstanceProcAddr( VkInstance instance, const char * pName ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetInstanceProcAddr( instance, pName ); - } - - PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char * pName ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceProcAddr( device, pName ); - } - - VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, - const VkDeviceCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDevice * pDevice ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDevice( physicalDevice, pCreateInfo, pAllocator, pDevice ); - } - - void vkDestroyDevice( VkDevice device, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDevice( device, pAllocator ); - } - - VkResult vkEnumerateInstanceExtensionProperties( const char * pLayerName, - uint32_t * pPropertyCount, - VkExtensionProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, pProperties ); - } - - VkResult vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, - const char * pLayerName, - uint32_t * pPropertyCount, - VkExtensionProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumerateDeviceExtensionProperties( physicalDevice, pLayerName, pPropertyCount, pProperties ); - } - - VkResult vkEnumerateInstanceLayerProperties( uint32_t * pPropertyCount, VkLayerProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumerateInstanceLayerProperties( pPropertyCount, pProperties ); - } - - VkResult - vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkLayerProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, pProperties ); - } - - void vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue * pQueue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceQueue( device, queueFamilyIndex, queueIndex, pQueue ); - } - - VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueSubmit( queue, submitCount, pSubmits, fence ); - } - - VkResult vkQueueWaitIdle( VkQueue queue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueWaitIdle( queue ); - } - - VkResult vkDeviceWaitIdle( VkDevice device ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDeviceWaitIdle( device ); - } - - VkResult vkAllocateMemory( VkDevice device, - const VkMemoryAllocateInfo * pAllocateInfo, - const VkAllocationCallbacks * pAllocator, - VkDeviceMemory * pMemory ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAllocateMemory( device, pAllocateInfo, pAllocator, pMemory ); - } - - void vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkFreeMemory( device, memory, pAllocator ); - } - - VkResult vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void ** ppData ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkMapMemory( device, memory, offset, size, flags, ppData ); - } - - void vkUnmapMemory( VkDevice device, VkDeviceMemory memory ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUnmapMemory( device, memory ); - } - - VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges ) const VULKAN_HPP_NOEXCEPT - { - return ::vkFlushMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges ); - } - - VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges ) const VULKAN_HPP_NOEXCEPT - { - return ::vkInvalidateMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges ); - } - - void vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize * pCommittedMemoryInBytes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes ); - } - - VkResult vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindBufferMemory( device, buffer, memory, memoryOffset ); - } - - VkResult vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindImageMemory( device, image, memory, memoryOffset ); - } - - void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferMemoryRequirements( device, buffer, pMemoryRequirements ); - } - - void vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageMemoryRequirements( device, image, pMemoryRequirements ); - } - - void vkGetImageSparseMemoryRequirements( VkDevice device, - VkImage image, - uint32_t * pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageSparseMemoryRequirements( device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); - } - - void vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkSampleCountFlagBits samples, - VkImageUsageFlags usage, - VkImageTiling tiling, - uint32_t * pPropertyCount, - VkSparseImageFormatProperties * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties ); - } - - VkResult vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo * pBindInfo, VkFence fence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueBindSparse( queue, bindInfoCount, pBindInfo, fence ); - } - - VkResult vkCreateFence( VkDevice device, - const VkFenceCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkFence * pFence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateFence( device, pCreateInfo, pAllocator, pFence ); - } - - void vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyFence( device, fence, pAllocator ); - } - - VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence * pFences ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetFences( device, fenceCount, pFences ); - } - - VkResult vkGetFenceStatus( VkDevice device, VkFence fence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetFenceStatus( device, fence ); - } - - VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence * pFences, VkBool32 waitAll, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout ); - } - - VkResult vkCreateSemaphore( VkDevice device, - const VkSemaphoreCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSemaphore * pSemaphore ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSemaphore( device, pCreateInfo, pAllocator, pSemaphore ); - } - - void vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySemaphore( device, semaphore, pAllocator ); - } - - VkResult vkCreateEvent( VkDevice device, - const VkEventCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkEvent * pEvent ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateEvent( device, pCreateInfo, pAllocator, pEvent ); - } - - void vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyEvent( device, event, pAllocator ); - } - - VkResult vkGetEventStatus( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetEventStatus( device, event ); - } - - VkResult vkSetEvent( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetEvent( device, event ); - } - - VkResult vkResetEvent( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetEvent( device, event ); - } - - VkResult vkCreateQueryPool( VkDevice device, - const VkQueryPoolCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkQueryPool * pQueryPool ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateQueryPool( device, pCreateInfo, pAllocator, pQueryPool ); - } - - void vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyQueryPool( device, queryPool, pAllocator ); - } - - VkResult vkGetQueryPoolResults( VkDevice device, - VkQueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - void * pData, - VkDeviceSize stride, - VkQueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetQueryPoolResults( device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags ); - } - - VkResult vkCreateBuffer( VkDevice device, - const VkBufferCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkBuffer * pBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateBuffer( device, pCreateInfo, pAllocator, pBuffer ); - } - - void vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyBuffer( device, buffer, pAllocator ); - } - - VkResult vkCreateBufferView( VkDevice device, - const VkBufferViewCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkBufferView * pView ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateBufferView( device, pCreateInfo, pAllocator, pView ); - } - - void vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyBufferView( device, bufferView, pAllocator ); - } - - VkResult vkCreateImage( VkDevice device, - const VkImageCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkImage * pImage ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateImage( device, pCreateInfo, pAllocator, pImage ); - } - - void vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyImage( device, image, pAllocator ); - } - - void vkGetImageSubresourceLayout( VkDevice device, - VkImage image, - const VkImageSubresource * pSubresource, - VkSubresourceLayout * pLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageSubresourceLayout( device, image, pSubresource, pLayout ); - } - - VkResult vkCreateImageView( VkDevice device, - const VkImageViewCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkImageView * pView ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateImageView( device, pCreateInfo, pAllocator, pView ); - } - - void vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyImageView( device, imageView, pAllocator ); - } - - VkResult vkCreateShaderModule( VkDevice device, - const VkShaderModuleCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkShaderModule * pShaderModule ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateShaderModule( device, pCreateInfo, pAllocator, pShaderModule ); - } - - void vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyShaderModule( device, shaderModule, pAllocator ); - } - - VkResult vkCreatePipelineCache( VkDevice device, - const VkPipelineCacheCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkPipelineCache * pPipelineCache ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreatePipelineCache( device, pCreateInfo, pAllocator, pPipelineCache ); - } - - void vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyPipelineCache( device, pipelineCache, pAllocator ); - } - - VkResult vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPipelineCacheData( device, pipelineCache, pDataSize, pData ); - } - - VkResult - vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache * pSrcCaches ) const VULKAN_HPP_NOEXCEPT - { - return ::vkMergePipelineCaches( device, dstCache, srcCacheCount, pSrcCaches ); - } - - VkResult vkCreateGraphicsPipelines( VkDevice device, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo * pCreateInfos, - const VkAllocationCallbacks * pAllocator, - VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateGraphicsPipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); - } - - VkResult vkCreateComputePipelines( VkDevice device, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkComputePipelineCreateInfo * pCreateInfos, - const VkAllocationCallbacks * pAllocator, - VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateComputePipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); - } - - void vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyPipeline( device, pipeline, pAllocator ); - } - - VkResult vkCreatePipelineLayout( VkDevice device, - const VkPipelineLayoutCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkPipelineLayout * pPipelineLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreatePipelineLayout( device, pCreateInfo, pAllocator, pPipelineLayout ); - } - - void vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyPipelineLayout( device, pipelineLayout, pAllocator ); - } - - VkResult vkCreateSampler( VkDevice device, - const VkSamplerCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSampler * pSampler ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSampler( device, pCreateInfo, pAllocator, pSampler ); - } - - void vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySampler( device, sampler, pAllocator ); - } - - VkResult vkCreateDescriptorSetLayout( VkDevice device, - const VkDescriptorSetLayoutCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDescriptorSetLayout * pSetLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDescriptorSetLayout( device, pCreateInfo, pAllocator, pSetLayout ); - } - - void vkDestroyDescriptorSetLayout( VkDevice device, - VkDescriptorSetLayout descriptorSetLayout, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDescriptorSetLayout( device, descriptorSetLayout, pAllocator ); - } - - VkResult vkCreateDescriptorPool( VkDevice device, - const VkDescriptorPoolCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDescriptorPool * pDescriptorPool ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDescriptorPool( device, pCreateInfo, pAllocator, pDescriptorPool ); - } - - void vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDescriptorPool( device, descriptorPool, pAllocator ); - } - - VkResult vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetDescriptorPool( device, descriptorPool, flags ); - } - - VkResult vkAllocateDescriptorSets( VkDevice device, - const VkDescriptorSetAllocateInfo * pAllocateInfo, - VkDescriptorSet * pDescriptorSets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAllocateDescriptorSets( device, pAllocateInfo, pDescriptorSets ); - } - - VkResult vkFreeDescriptorSets( VkDevice device, - VkDescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VkDescriptorSet * pDescriptorSets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkFreeDescriptorSets( device, descriptorPool, descriptorSetCount, pDescriptorSets ); - } - - void vkUpdateDescriptorSets( VkDevice device, - uint32_t descriptorWriteCount, - const VkWriteDescriptorSet * pDescriptorWrites, - uint32_t descriptorCopyCount, - const VkCopyDescriptorSet * pDescriptorCopies ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUpdateDescriptorSets( device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies ); - } - - VkResult vkCreateFramebuffer( VkDevice device, - const VkFramebufferCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkFramebuffer * pFramebuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateFramebuffer( device, pCreateInfo, pAllocator, pFramebuffer ); - } - - void vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyFramebuffer( device, framebuffer, pAllocator ); - } - - VkResult vkCreateRenderPass( VkDevice device, - const VkRenderPassCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateRenderPass( device, pCreateInfo, pAllocator, pRenderPass ); - } - - void vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyRenderPass( device, renderPass, pAllocator ); - } - - void vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D * pGranularity ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRenderAreaGranularity( device, renderPass, pGranularity ); - } - - VkResult vkCreateCommandPool( VkDevice device, - const VkCommandPoolCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkCommandPool * pCommandPool ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateCommandPool( device, pCreateInfo, pAllocator, pCommandPool ); - } - - void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyCommandPool( device, commandPool, pAllocator ); - } - - VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetCommandPool( device, commandPool, flags ); - } - - VkResult vkAllocateCommandBuffers( VkDevice device, - const VkCommandBufferAllocateInfo * pAllocateInfo, - VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAllocateCommandBuffers( device, pAllocateInfo, pCommandBuffers ); - } - - void vkFreeCommandBuffers( VkDevice device, - VkCommandPool commandPool, - uint32_t commandBufferCount, - const VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT - { - return ::vkFreeCommandBuffers( device, commandPool, commandBufferCount, pCommandBuffers ); - } - - VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo * pBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBeginCommandBuffer( commandBuffer, pBeginInfo ); - } - - VkResult vkEndCommandBuffer( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEndCommandBuffer( commandBuffer ); - } - - VkResult vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetCommandBuffer( commandBuffer, flags ); - } - - void vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindPipeline( commandBuffer, pipelineBindPoint, pipeline ); - } - - void - vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetViewport( commandBuffer, firstViewport, viewportCount, pViewports ); - } - - void vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetScissor( commandBuffer, firstScissor, scissorCount, pScissors ); - } - - void vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetLineWidth( commandBuffer, lineWidth ); - } - - void vkCmdSetDepthBias( VkCommandBuffer commandBuffer, - float depthBiasConstantFactor, - float depthBiasClamp, - float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBias( commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } - - void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetBlendConstants( commandBuffer, blendConstants ); - } - - void vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBounds( commandBuffer, minDepthBounds, maxDepthBounds ); - } - - void vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilCompareMask( commandBuffer, faceMask, compareMask ); - } - - void vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilWriteMask( commandBuffer, faceMask, writeMask ); - } - - void vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilReference( commandBuffer, faceMask, reference ); - } - - void vkCmdBindDescriptorSets( VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, - uint32_t firstSet, - uint32_t descriptorSetCount, - const VkDescriptorSet * pDescriptorSets, - uint32_t dynamicOffsetCount, - const uint32_t * pDynamicOffsets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindDescriptorSets( - commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets ); - } - - void vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindIndexBuffer( commandBuffer, buffer, offset, indexType ); - } - - void vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer * pBuffers, - const VkDeviceSize * pOffsets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindVertexBuffers( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets ); - } - - void vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDraw( commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); - } - - void vkCmdDrawIndexed( VkCommandBuffer commandBuffer, - uint32_t indexCount, - uint32_t instanceCount, - uint32_t firstIndex, - int32_t vertexOffset, - uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndexed( commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } - - void vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndirect( commandBuffer, buffer, offset, drawCount, stride ); - } - - void vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, stride ); - } - - void vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDispatch( commandBuffer, groupCountX, groupCountY, groupCountZ ); - } - - void vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDispatchIndirect( commandBuffer, buffer, offset ); - } - - void vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy * pRegions ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions ); - } - - void vkCmdCopyImage( VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); - } - - void vkCmdBlitImage( VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageBlit * pRegions, - VkFilter filter ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBlitImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter ); - } - - void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, - VkBuffer srcBuffer, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkBufferImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions ); - } - - void vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkBuffer dstBuffer, - uint32_t regionCount, - const VkBufferImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImageToBuffer( commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions ); - } - - void vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void * pData ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, pData ); - } - - void - vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdFillBuffer( commandBuffer, dstBuffer, dstOffset, size, data ); - } - - void vkCmdClearColorImage( VkCommandBuffer commandBuffer, - VkImage image, - VkImageLayout imageLayout, - const VkClearColorValue * pColor, - uint32_t rangeCount, - const VkImageSubresourceRange * pRanges ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdClearColorImage( commandBuffer, image, imageLayout, pColor, rangeCount, pRanges ); - } - - void vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, - VkImage image, - VkImageLayout imageLayout, - const VkClearDepthStencilValue * pDepthStencil, - uint32_t rangeCount, - const VkImageSubresourceRange * pRanges ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdClearDepthStencilImage( commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges ); - } - - void vkCmdClearAttachments( VkCommandBuffer commandBuffer, - uint32_t attachmentCount, - const VkClearAttachment * pAttachments, - uint32_t rectCount, - const VkClearRect * pRects ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdClearAttachments( commandBuffer, attachmentCount, pAttachments, rectCount, pRects ); - } - - void vkCmdResolveImage( VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageResolve * pRegions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResolveImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); - } - - void vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetEvent( commandBuffer, event, stageMask ); - } - - void vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResetEvent( commandBuffer, event, stageMask ); - } - - void vkCmdWaitEvents( VkCommandBuffer commandBuffer, - uint32_t eventCount, - const VkEvent * pEvents, - VkPipelineStageFlags srcStageMask, - VkPipelineStageFlags dstStageMask, - uint32_t memoryBarrierCount, - const VkMemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VkBufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VkImageMemoryBarrier * pImageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWaitEvents( commandBuffer, - eventCount, - pEvents, - srcStageMask, - dstStageMask, - memoryBarrierCount, - pMemoryBarriers, - bufferMemoryBarrierCount, - pBufferMemoryBarriers, - imageMemoryBarrierCount, - pImageMemoryBarriers ); - } - - void vkCmdPipelineBarrier( VkCommandBuffer commandBuffer, - VkPipelineStageFlags srcStageMask, - VkPipelineStageFlags dstStageMask, - VkDependencyFlags dependencyFlags, - uint32_t memoryBarrierCount, - const VkMemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VkBufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VkImageMemoryBarrier * pImageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPipelineBarrier( commandBuffer, - srcStageMask, - dstStageMask, - dependencyFlags, - memoryBarrierCount, - pMemoryBarriers, - bufferMemoryBarrierCount, - pBufferMemoryBarriers, - imageMemoryBarrierCount, - pImageMemoryBarriers ); - } - - void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginQuery( commandBuffer, queryPool, query, flags ); - } - - void vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndQuery( commandBuffer, queryPool, query ); - } - - void vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResetQueryPool( commandBuffer, queryPool, firstQuery, queryCount ); - } - - void vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, - VkPipelineStageFlagBits pipelineStage, - VkQueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteTimestamp( commandBuffer, pipelineStage, queryPool, query ); - } - - void vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, - VkQueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize stride, - VkQueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyQueryPoolResults( commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags ); - } - - void vkCmdPushConstants( VkCommandBuffer commandBuffer, - VkPipelineLayout layout, - VkShaderStageFlags stageFlags, - uint32_t offset, - uint32_t size, - const void * pValues ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPushConstants( commandBuffer, layout, stageFlags, offset, size, pValues ); - } - - void vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, - const VkRenderPassBeginInfo * pRenderPassBegin, - VkSubpassContents contents ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginRenderPass( commandBuffer, pRenderPassBegin, contents ); - } - - void vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdNextSubpass( commandBuffer, contents ); - } - - void vkCmdEndRenderPass( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndRenderPass( commandBuffer ); - } - - void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdExecuteCommands( commandBuffer, commandBufferCount, pCommandBuffers ); - } - - //=== VK_VERSION_1_1 === - - VkResult vkEnumerateInstanceVersion( uint32_t * pApiVersion ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumerateInstanceVersion( pApiVersion ); - } - - VkResult vkBindBufferMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindBufferMemory2( device, bindInfoCount, pBindInfos ); - } - - VkResult vkBindImageMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindImageMemory2( device, bindInfoCount, pBindInfos ); - } - - void vkGetDeviceGroupPeerMemoryFeatures( VkDevice device, - uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags * pPeerMemoryFeatures ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceGroupPeerMemoryFeatures( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures ); - } - - void vkCmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDeviceMask( commandBuffer, deviceMask ); - } - - void vkCmdDispatchBase( VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDispatchBase( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - - VkResult vkEnumeratePhysicalDeviceGroups( VkInstance instance, - uint32_t * pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumeratePhysicalDeviceGroups( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties ); - } - - void vkGetImageMemoryRequirements2( VkDevice device, - const VkImageMemoryRequirementsInfo2 * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageMemoryRequirements2( device, pInfo, pMemoryRequirements ); - } - - void vkGetBufferMemoryRequirements2( VkDevice device, - const VkBufferMemoryRequirementsInfo2 * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferMemoryRequirements2( device, pInfo, pMemoryRequirements ); - } - - void vkGetImageSparseMemoryRequirements2( VkDevice device, - const VkImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageSparseMemoryRequirements2( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); - } - - void vkGetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 * pFeatures ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFeatures2( physicalDevice, pFeatures ); - } - - void vkGetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceProperties2( physicalDevice, pProperties ); - } - - void vkGetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties2 * pFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFormatProperties2( physicalDevice, format, pFormatProperties ); - } - - VkResult vkGetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VkImageFormatProperties2 * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceImageFormatProperties2( physicalDevice, pImageFormatInfo, pImageFormatProperties ); - } - - void vkGetPhysicalDeviceQueueFamilyProperties2( VkPhysicalDevice physicalDevice, - uint32_t * pQueueFamilyPropertyCount, - VkQueueFamilyProperties2 * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceQueueFamilyProperties2( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); - } - - void vkGetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2 * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceMemoryProperties2( physicalDevice, pMemoryProperties ); - } - - void vkGetPhysicalDeviceSparseImageFormatProperties2( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VkSparseImageFormatProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSparseImageFormatProperties2( physicalDevice, pFormatInfo, pPropertyCount, pProperties ); - } - - void vkTrimCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkTrimCommandPool( device, commandPool, flags ); - } - - void vkGetDeviceQueue2( VkDevice device, const VkDeviceQueueInfo2 * pQueueInfo, VkQueue * pQueue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceQueue2( device, pQueueInfo, pQueue ); - } - - VkResult vkCreateSamplerYcbcrConversion( VkDevice device, - const VkSamplerYcbcrConversionCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSamplerYcbcrConversion * pYcbcrConversion ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSamplerYcbcrConversion( device, pCreateInfo, pAllocator, pYcbcrConversion ); - } - - void vkDestroySamplerYcbcrConversion( VkDevice device, - VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySamplerYcbcrConversion( device, ycbcrConversion, pAllocator ); - } - - VkResult vkCreateDescriptorUpdateTemplate( VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDescriptorUpdateTemplate * pDescriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDescriptorUpdateTemplate( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate ); - } - - void vkDestroyDescriptorUpdateTemplate( VkDevice device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDescriptorUpdateTemplate( device, descriptorUpdateTemplate, pAllocator ); - } - - void vkUpdateDescriptorSetWithTemplate( VkDevice device, - VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUpdateDescriptorSetWithTemplate( device, descriptorSet, descriptorUpdateTemplate, pData ); - } - - void vkGetPhysicalDeviceExternalBufferProperties( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VkExternalBufferProperties * pExternalBufferProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalBufferProperties( physicalDevice, pExternalBufferInfo, pExternalBufferProperties ); - } - - void vkGetPhysicalDeviceExternalFenceProperties( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VkExternalFenceProperties * pExternalFenceProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalFenceProperties( physicalDevice, pExternalFenceInfo, pExternalFenceProperties ); - } - - void vkGetPhysicalDeviceExternalSemaphoreProperties( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VkExternalSemaphoreProperties * pExternalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalSemaphoreProperties( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties ); - } - - void vkGetDescriptorSetLayoutSupport( VkDevice device, - const VkDescriptorSetLayoutCreateInfo * pCreateInfo, - VkDescriptorSetLayoutSupport * pSupport ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDescriptorSetLayoutSupport( device, pCreateInfo, pSupport ); - } - - //=== VK_VERSION_1_2 === - - void vkCmdDrawIndirectCount( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndirectCount( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - void vkCmdDrawIndexedIndirectCount( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndexedIndirectCount( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - VkResult vkCreateRenderPass2( VkDevice device, - const VkRenderPassCreateInfo2 * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateRenderPass2( device, pCreateInfo, pAllocator, pRenderPass ); - } - - void vkCmdBeginRenderPass2( VkCommandBuffer commandBuffer, - const VkRenderPassBeginInfo * pRenderPassBegin, - const VkSubpassBeginInfo * pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginRenderPass2( commandBuffer, pRenderPassBegin, pSubpassBeginInfo ); - } - - void vkCmdNextSubpass2( VkCommandBuffer commandBuffer, - const VkSubpassBeginInfo * pSubpassBeginInfo, - const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdNextSubpass2( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo ); - } - - void vkCmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndRenderPass2( commandBuffer, pSubpassEndInfo ); - } - - void vkResetQueryPool( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetQueryPool( device, queryPool, firstQuery, queryCount ); - } - - VkResult vkGetSemaphoreCounterValue( VkDevice device, VkSemaphore semaphore, uint64_t * pValue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSemaphoreCounterValue( device, semaphore, pValue ); - } - - VkResult vkWaitSemaphores( VkDevice device, const VkSemaphoreWaitInfo * pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkWaitSemaphores( device, pWaitInfo, timeout ); - } - - VkResult vkSignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo * pSignalInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSignalSemaphore( device, pSignalInfo ); - } - - VkDeviceAddress vkGetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferDeviceAddress( device, pInfo ); - } - - uint64_t vkGetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferOpaqueCaptureAddress( device, pInfo ); - } - - uint64_t vkGetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceMemoryOpaqueCaptureAddress( device, pInfo ); - } - - //=== VK_VERSION_1_3 === - - VkResult vkGetPhysicalDeviceToolProperties( VkPhysicalDevice physicalDevice, - uint32_t * pToolCount, - VkPhysicalDeviceToolProperties * pToolProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceToolProperties( physicalDevice, pToolCount, pToolProperties ); - } - - VkResult vkCreatePrivateDataSlot( VkDevice device, - const VkPrivateDataSlotCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkPrivateDataSlot * pPrivateDataSlot ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreatePrivateDataSlot( device, pCreateInfo, pAllocator, pPrivateDataSlot ); - } - - void vkDestroyPrivateDataSlot( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyPrivateDataSlot( device, privateDataSlot, pAllocator ); - } - - VkResult vkSetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkSetPrivateData( device, objectType, objectHandle, privateDataSlot, data ); - } - - void vkGetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t * pData ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkGetPrivateData( device, objectType, objectHandle, privateDataSlot, pData ); - } - - void vkCmdSetEvent2( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetEvent2( commandBuffer, event, pDependencyInfo ); - } - - void vkCmdResetEvent2( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResetEvent2( commandBuffer, event, stageMask ); - } - - void vkCmdWaitEvents2( VkCommandBuffer commandBuffer, - uint32_t eventCount, - const VkEvent * pEvents, - const VkDependencyInfo * pDependencyInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWaitEvents2( commandBuffer, eventCount, pEvents, pDependencyInfos ); - } - - void vkCmdPipelineBarrier2( VkCommandBuffer commandBuffer, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPipelineBarrier2( commandBuffer, pDependencyInfo ); - } - - void vkCmdWriteTimestamp2( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteTimestamp2( commandBuffer, stage, queryPool, query ); - } - - VkResult vkQueueSubmit2( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueSubmit2( queue, submitCount, pSubmits, fence ); - } - - void vkCmdCopyBuffer2( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2 * pCopyBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBuffer2( commandBuffer, pCopyBufferInfo ); - } - - void vkCmdCopyImage2( VkCommandBuffer commandBuffer, const VkCopyImageInfo2 * pCopyImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImage2( commandBuffer, pCopyImageInfo ); - } - - void vkCmdCopyBufferToImage2( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2 * pCopyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBufferToImage2( commandBuffer, pCopyBufferToImageInfo ); - } - - void vkCmdCopyImageToBuffer2( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2 * pCopyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImageToBuffer2( commandBuffer, pCopyImageToBufferInfo ); - } - - void vkCmdBlitImage2( VkCommandBuffer commandBuffer, const VkBlitImageInfo2 * pBlitImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBlitImage2( commandBuffer, pBlitImageInfo ); - } - - void vkCmdResolveImage2( VkCommandBuffer commandBuffer, const VkResolveImageInfo2 * pResolveImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResolveImage2( commandBuffer, pResolveImageInfo ); - } - - void vkCmdBeginRendering( VkCommandBuffer commandBuffer, const VkRenderingInfo * pRenderingInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginRendering( commandBuffer, pRenderingInfo ); - } - - void vkCmdEndRendering( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndRendering( commandBuffer ); - } - - void vkCmdSetCullMode( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetCullMode( commandBuffer, cullMode ); - } - - void vkCmdSetFrontFace( VkCommandBuffer commandBuffer, VkFrontFace frontFace ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetFrontFace( commandBuffer, frontFace ); - } - - void vkCmdSetPrimitiveTopology( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPrimitiveTopology( commandBuffer, primitiveTopology ); - } - - void vkCmdSetViewportWithCount( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetViewportWithCount( commandBuffer, viewportCount, pViewports ); - } - - void vkCmdSetScissorWithCount( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetScissorWithCount( commandBuffer, scissorCount, pScissors ); - } - - void vkCmdBindVertexBuffers2( VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer * pBuffers, - const VkDeviceSize * pOffsets, - const VkDeviceSize * pSizes, - const VkDeviceSize * pStrides ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindVertexBuffers2( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides ); - } - - void vkCmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthTestEnable( commandBuffer, depthTestEnable ); - } - - void vkCmdSetDepthWriteEnable( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthWriteEnable( commandBuffer, depthWriteEnable ); - } - - void vkCmdSetDepthCompareOp( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthCompareOp( commandBuffer, depthCompareOp ); - } - - void vkCmdSetDepthBoundsTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBoundsTestEnable( commandBuffer, depthBoundsTestEnable ); - } - - void vkCmdSetStencilTestEnable( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilTestEnable( commandBuffer, stencilTestEnable ); - } - - void vkCmdSetStencilOp( VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - VkStencilOp failOp, - VkStencilOp passOp, - VkStencilOp depthFailOp, - VkCompareOp compareOp ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilOp( commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp ); - } - - void vkCmdSetRasterizerDiscardEnable( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetRasterizerDiscardEnable( commandBuffer, rasterizerDiscardEnable ); - } - - void vkCmdSetDepthBiasEnable( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBiasEnable( commandBuffer, depthBiasEnable ); - } - - void vkCmdSetPrimitiveRestartEnable( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPrimitiveRestartEnable( commandBuffer, primitiveRestartEnable ); - } - - void vkGetDeviceBufferMemoryRequirements( VkDevice device, - const VkDeviceBufferMemoryRequirements * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceBufferMemoryRequirements( device, pInfo, pMemoryRequirements ); - } - - void vkGetDeviceImageMemoryRequirements( VkDevice device, - const VkDeviceImageMemoryRequirements * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceImageMemoryRequirements( device, pInfo, pMemoryRequirements ); - } - - void vkGetDeviceImageSparseMemoryRequirements( VkDevice device, - const VkDeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceImageSparseMemoryRequirements( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); - } - - //=== VK_KHR_surface === - - void vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySurfaceKHR( instance, surface, pAllocator ); - } - - VkResult vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - VkSurfaceKHR surface, - VkBool32 * pSupported ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported ); - } - - VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, pSurfaceCapabilities ); - } - - VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t * pSurfaceFormatCount, - VkSurfaceFormatKHR * pSurfaceFormats ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats ); - } - - VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t * pPresentModeCount, - VkPresentModeKHR * pPresentModes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, pPresentModeCount, pPresentModes ); - } - - //=== VK_KHR_swapchain === - - VkResult vkCreateSwapchainKHR( VkDevice device, - const VkSwapchainCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSwapchainKHR * pSwapchain ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSwapchainKHR( device, pCreateInfo, pAllocator, pSwapchain ); - } - - void vkDestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySwapchainKHR( device, swapchain, pAllocator ); - } - - VkResult vkGetSwapchainImagesKHR( VkDevice device, - VkSwapchainKHR swapchain, - uint32_t * pSwapchainImageCount, - VkImage * pSwapchainImages ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSwapchainImagesKHR( device, swapchain, pSwapchainImageCount, pSwapchainImages ); - } - - VkResult vkAcquireNextImageKHR( - VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t * pImageIndex ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireNextImageKHR( device, swapchain, timeout, semaphore, fence, pImageIndex ); - } - - VkResult vkQueuePresentKHR( VkQueue queue, const VkPresentInfoKHR * pPresentInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueuePresentKHR( queue, pPresentInfo ); - } - - VkResult vkGetDeviceGroupPresentCapabilitiesKHR( VkDevice device, - VkDeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceGroupPresentCapabilitiesKHR( device, pDeviceGroupPresentCapabilities ); - } - - VkResult - vkGetDeviceGroupSurfacePresentModesKHR( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR * pModes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceGroupSurfacePresentModesKHR( device, surface, pModes ); - } - - VkResult vkGetPhysicalDevicePresentRectanglesKHR( VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t * pRectCount, - VkRect2D * pRects ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDevicePresentRectanglesKHR( physicalDevice, surface, pRectCount, pRects ); - } - - VkResult vkAcquireNextImage2KHR( VkDevice device, const VkAcquireNextImageInfoKHR * pAcquireInfo, uint32_t * pImageIndex ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireNextImage2KHR( device, pAcquireInfo, pImageIndex ); - } - - //=== VK_KHR_display === - - VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physicalDevice, - uint32_t * pPropertyCount, - VkDisplayPropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceDisplayPropertiesKHR( physicalDevice, pPropertyCount, pProperties ); - } - - VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkPhysicalDevice physicalDevice, - uint32_t * pPropertyCount, - VkDisplayPlanePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, pPropertyCount, pProperties ); - } - - VkResult vkGetDisplayPlaneSupportedDisplaysKHR( VkPhysicalDevice physicalDevice, - uint32_t planeIndex, - uint32_t * pDisplayCount, - VkDisplayKHR * pDisplays ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, pDisplayCount, pDisplays ); - } - - VkResult vkGetDisplayModePropertiesKHR( VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - uint32_t * pPropertyCount, - VkDisplayModePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDisplayModePropertiesKHR( physicalDevice, display, pPropertyCount, pProperties ); - } - - VkResult vkCreateDisplayModeKHR( VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDisplayModeKHR * pMode ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDisplayModeKHR( physicalDevice, display, pCreateInfo, pAllocator, pMode ); - } - - VkResult vkGetDisplayPlaneCapabilitiesKHR( VkPhysicalDevice physicalDevice, - VkDisplayModeKHR mode, - uint32_t planeIndex, - VkDisplayPlaneCapabilitiesKHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, pCapabilities ); - } - - VkResult vkCreateDisplayPlaneSurfaceKHR( VkInstance instance, - const VkDisplaySurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDisplayPlaneSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } - - //=== VK_KHR_display_swapchain === - - VkResult vkCreateSharedSwapchainsKHR( VkDevice device, - uint32_t swapchainCount, - const VkSwapchainCreateInfoKHR * pCreateInfos, - const VkAllocationCallbacks * pAllocator, - VkSwapchainKHR * pSwapchains ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSharedSwapchainsKHR( device, swapchainCount, pCreateInfos, pAllocator, pSwapchains ); - } - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VkResult vkCreateXlibSurfaceKHR( VkInstance instance, - const VkXlibSurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateXlibSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - Display * dpy, - VisualID visualID ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID ); - } -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VkResult vkCreateXcbSurfaceKHR( VkInstance instance, - const VkXcbSurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateXcbSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - xcb_connection_t * connection, - xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id ); - } -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VkResult vkCreateWaylandSurfaceKHR( VkInstance instance, - const VkWaylandSurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateWaylandSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct wl_display * display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display ); - } -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - VkResult vkCreateAndroidSurfaceKHR( VkInstance instance, - const VkAndroidSurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateAndroidSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VkResult vkCreateWin32SurfaceKHR( VkInstance instance, - const VkWin32SurfaceCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateWin32SurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceWin32PresentationSupportKHR( physicalDevice, queueFamilyIndex ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - VkResult vkCreateDebugReportCallbackEXT( VkInstance instance, - const VkDebugReportCallbackCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDebugReportCallbackEXT * pCallback ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDebugReportCallbackEXT( instance, pCreateInfo, pAllocator, pCallback ); - } - - void vkDestroyDebugReportCallbackEXT( VkInstance instance, - VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDebugReportCallbackEXT( instance, callback, pAllocator ); - } - - void vkDebugReportMessageEXT( VkInstance instance, - VkDebugReportFlagsEXT flags, - VkDebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char * pLayerPrefix, - const char * pMessage ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDebugReportMessageEXT( instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage ); - } - - //=== VK_EXT_debug_marker === - - VkResult vkDebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT * pTagInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDebugMarkerSetObjectTagEXT( device, pTagInfo ); - } - - VkResult vkDebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT * pNameInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDebugMarkerSetObjectNameEXT( device, pNameInfo ); - } - - void vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDebugMarkerBeginEXT( commandBuffer, pMarkerInfo ); - } - - void vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDebugMarkerEndEXT( commandBuffer ); - } - - void vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDebugMarkerInsertEXT( commandBuffer, pMarkerInfo ); - } - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VkResult vkGetPhysicalDeviceVideoCapabilitiesKHR( VkPhysicalDevice physicalDevice, - const VkVideoProfileInfoKHR * pVideoProfile, - VkVideoCapabilitiesKHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceVideoCapabilitiesKHR( physicalDevice, pVideoProfile, pCapabilities ); - } - - VkResult vkGetPhysicalDeviceVideoFormatPropertiesKHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, - uint32_t * pVideoFormatPropertyCount, - VkVideoFormatPropertiesKHR * pVideoFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceVideoFormatPropertiesKHR( physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties ); - } - - VkResult vkCreateVideoSessionKHR( VkDevice device, - const VkVideoSessionCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkVideoSessionKHR * pVideoSession ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateVideoSessionKHR( device, pCreateInfo, pAllocator, pVideoSession ); - } - - void vkDestroyVideoSessionKHR( VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyVideoSessionKHR( device, videoSession, pAllocator ); - } - - VkResult vkGetVideoSessionMemoryRequirementsKHR( VkDevice device, - VkVideoSessionKHR videoSession, - uint32_t * pMemoryRequirementsCount, - VkVideoSessionMemoryRequirementsKHR * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetVideoSessionMemoryRequirementsKHR( device, videoSession, pMemoryRequirementsCount, pMemoryRequirements ); - } - - VkResult vkBindVideoSessionMemoryKHR( VkDevice device, - VkVideoSessionKHR videoSession, - uint32_t bindSessionMemoryInfoCount, - const VkBindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindVideoSessionMemoryKHR( device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos ); - } - - VkResult vkCreateVideoSessionParametersKHR( VkDevice device, - const VkVideoSessionParametersCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkVideoSessionParametersKHR * pVideoSessionParameters ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateVideoSessionParametersKHR( device, pCreateInfo, pAllocator, pVideoSessionParameters ); - } - - VkResult vkUpdateVideoSessionParametersKHR( VkDevice device, - VkVideoSessionParametersKHR videoSessionParameters, - const VkVideoSessionParametersUpdateInfoKHR * pUpdateInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUpdateVideoSessionParametersKHR( device, videoSessionParameters, pUpdateInfo ); - } - - void vkDestroyVideoSessionParametersKHR( VkDevice device, - VkVideoSessionParametersKHR videoSessionParameters, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyVideoSessionParametersKHR( device, videoSessionParameters, pAllocator ); - } - - void vkCmdBeginVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR * pBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginVideoCodingKHR( commandBuffer, pBeginInfo ); - } - - void vkCmdEndVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR * pEndCodingInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndVideoCodingKHR( commandBuffer, pEndCodingInfo ); - } - - void vkCmdControlVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR * pCodingControlInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdControlVideoCodingKHR( commandBuffer, pCodingControlInfo ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - void vkCmdDecodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR * pFrameInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDecodeVideoKHR( commandBuffer, pFrameInfo ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - void vkCmdBindTransformFeedbackBuffersEXT( VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer * pBuffers, - const VkDeviceSize * pOffsets, - const VkDeviceSize * pSizes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindTransformFeedbackBuffersEXT( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes ); - } - - void vkCmdBeginTransformFeedbackEXT( VkCommandBuffer commandBuffer, - uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VkBuffer * pCounterBuffers, - const VkDeviceSize * pCounterBufferOffsets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets ); - } - - void vkCmdEndTransformFeedbackEXT( VkCommandBuffer commandBuffer, - uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VkBuffer * pCounterBuffers, - const VkDeviceSize * pCounterBufferOffsets ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets ); - } - - void vkCmdBeginQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginQueryIndexedEXT( commandBuffer, queryPool, query, flags, index ); - } - - void vkCmdEndQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndQueryIndexedEXT( commandBuffer, queryPool, query, index ); - } - - void vkCmdDrawIndirectByteCountEXT( VkCommandBuffer commandBuffer, - uint32_t instanceCount, - uint32_t firstInstance, - VkBuffer counterBuffer, - VkDeviceSize counterBufferOffset, - uint32_t counterOffset, - uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndirectByteCountEXT( commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride ); - } - - //=== VK_NVX_binary_import === - - VkResult vkCreateCuModuleNVX( VkDevice device, - const VkCuModuleCreateInfoNVX * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkCuModuleNVX * pModule ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateCuModuleNVX( device, pCreateInfo, pAllocator, pModule ); - } - - VkResult vkCreateCuFunctionNVX( VkDevice device, - const VkCuFunctionCreateInfoNVX * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkCuFunctionNVX * pFunction ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateCuFunctionNVX( device, pCreateInfo, pAllocator, pFunction ); - } - - void vkDestroyCuModuleNVX( VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyCuModuleNVX( device, module, pAllocator ); - } - - void vkDestroyCuFunctionNVX( VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyCuFunctionNVX( device, function, pAllocator ); - } - - void vkCmdCuLaunchKernelNVX( VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX * pLaunchInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCuLaunchKernelNVX( commandBuffer, pLaunchInfo ); - } - - //=== VK_NVX_image_view_handle === - - uint32_t vkGetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageViewHandleNVX( device, pInfo ); - } - - VkResult vkGetImageViewAddressNVX( VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageViewAddressNVX( device, imageView, pProperties ); - } - - //=== VK_AMD_draw_indirect_count === - - void vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - void vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndexedIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - //=== VK_AMD_shader_info === - - VkResult vkGetShaderInfoAMD( VkDevice device, - VkPipeline pipeline, - VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, - size_t * pInfoSize, - void * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetShaderInfoAMD( device, pipeline, shaderStage, infoType, pInfoSize, pInfo ); - } - - //=== VK_KHR_dynamic_rendering === - - void vkCmdBeginRenderingKHR( VkCommandBuffer commandBuffer, const VkRenderingInfo * pRenderingInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginRenderingKHR( commandBuffer, pRenderingInfo ); - } - - void vkCmdEndRenderingKHR( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndRenderingKHR( commandBuffer ); - } - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - VkResult vkCreateStreamDescriptorSurfaceGGP( VkInstance instance, - const VkStreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateStreamDescriptorSurfaceGGP( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags flags, - VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV * pExternalImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( - physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - - VkResult vkGetMemoryWin32HandleNV( VkDevice device, - VkDeviceMemory memory, - VkExternalMemoryHandleTypeFlagsNV handleType, - HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryWin32HandleNV( device, memory, handleType, pHandle ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_get_physical_device_properties2 === - - void vkGetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 * pFeatures ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFeatures2KHR( physicalDevice, pFeatures ); - } - - void vkGetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceProperties2KHR( physicalDevice, pProperties ); - } - - void vkGetPhysicalDeviceFormatProperties2KHR( VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties2 * pFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFormatProperties2KHR( physicalDevice, format, pFormatProperties ); - } - - VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VkImageFormatProperties2 * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceImageFormatProperties2KHR( physicalDevice, pImageFormatInfo, pImageFormatProperties ); - } - - void vkGetPhysicalDeviceQueueFamilyProperties2KHR( VkPhysicalDevice physicalDevice, - uint32_t * pQueueFamilyPropertyCount, - VkQueueFamilyProperties2 * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceQueueFamilyProperties2KHR( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); - } - - void vkGetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2 * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceMemoryProperties2KHR( physicalDevice, pMemoryProperties ); - } - - void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VkSparseImageFormatProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( physicalDevice, pFormatInfo, pPropertyCount, pProperties ); - } - - //=== VK_KHR_device_group === - - void vkGetDeviceGroupPeerMemoryFeaturesKHR( VkDevice device, - uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags * pPeerMemoryFeatures ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceGroupPeerMemoryFeaturesKHR( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures ); - } - - void vkCmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDeviceMaskKHR( commandBuffer, deviceMask ); - } - - void vkCmdDispatchBaseKHR( VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDispatchBaseKHR( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - -# if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - VkResult vkCreateViSurfaceNN( VkInstance instance, - const VkViSurfaceCreateInfoNN * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateViSurfaceNN( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_maintenance1 === - - void vkTrimCommandPoolKHR( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT - { - return ::vkTrimCommandPoolKHR( device, commandPool, flags ); - } - - //=== VK_KHR_device_group_creation === - - VkResult vkEnumeratePhysicalDeviceGroupsKHR( VkInstance instance, - uint32_t * pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumeratePhysicalDeviceGroupsKHR( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties ); - } - - //=== VK_KHR_external_memory_capabilities === - - void vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VkExternalBufferProperties * pExternalBufferProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalBufferPropertiesKHR( physicalDevice, pExternalBufferInfo, pExternalBufferProperties ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - - VkResult vkGetMemoryWin32HandleKHR( VkDevice device, const VkMemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); - } - - VkResult vkGetMemoryWin32HandlePropertiesKHR( VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VkMemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryWin32HandlePropertiesKHR( device, handleType, handle, pMemoryWin32HandleProperties ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - - VkResult vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryFdKHR( device, pGetFdInfo, pFd ); - } - - VkResult vkGetMemoryFdPropertiesKHR( VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - int fd, - VkMemoryFdPropertiesKHR * pMemoryFdProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryFdPropertiesKHR( device, handleType, fd, pMemoryFdProperties ); - } - - //=== VK_KHR_external_semaphore_capabilities === - - void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VkExternalSemaphoreProperties * pExternalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - - VkResult vkImportSemaphoreWin32HandleKHR( VkDevice device, - const VkImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkImportSemaphoreWin32HandleKHR( device, pImportSemaphoreWin32HandleInfo ); - } - - VkResult - vkGetSemaphoreWin32HandleKHR( VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSemaphoreWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - - VkResult vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkImportSemaphoreFdKHR( device, pImportSemaphoreFdInfo ); - } - - VkResult vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSemaphoreFdKHR( device, pGetFdInfo, pFd ); - } - - //=== VK_KHR_push_descriptor === - - void vkCmdPushDescriptorSetKHR( VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, - uint32_t set, - uint32_t descriptorWriteCount, - const VkWriteDescriptorSet * pDescriptorWrites ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPushDescriptorSetKHR( commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites ); - } - - void vkCmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, - uint32_t set, - const void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPushDescriptorSetWithTemplateKHR( commandBuffer, descriptorUpdateTemplate, layout, set, pData ); - } - - //=== VK_EXT_conditional_rendering === - - void vkCmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, - const VkConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginConditionalRenderingEXT( commandBuffer, pConditionalRenderingBegin ); - } - - void vkCmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndConditionalRenderingEXT( commandBuffer ); - } - - //=== VK_KHR_descriptor_update_template === - - VkResult vkCreateDescriptorUpdateTemplateKHR( VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDescriptorUpdateTemplate * pDescriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDescriptorUpdateTemplateKHR( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate ); - } - - void vkDestroyDescriptorUpdateTemplateKHR( VkDevice device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDescriptorUpdateTemplateKHR( device, descriptorUpdateTemplate, pAllocator ); - } - - void vkUpdateDescriptorSetWithTemplateKHR( VkDevice device, - VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUpdateDescriptorSetWithTemplateKHR( device, descriptorSet, descriptorUpdateTemplate, pData ); - } - - //=== VK_NV_clip_space_w_scaling === - - void vkCmdSetViewportWScalingNV( VkCommandBuffer commandBuffer, - uint32_t firstViewport, - uint32_t viewportCount, - const VkViewportWScalingNV * pViewportWScalings ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetViewportWScalingNV( commandBuffer, firstViewport, viewportCount, pViewportWScalings ); - } - - //=== VK_EXT_direct_mode_display === - - VkResult vkReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkReleaseDisplayEXT( physicalDevice, display ); - } - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - - VkResult vkAcquireXlibDisplayEXT( VkPhysicalDevice physicalDevice, Display * dpy, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireXlibDisplayEXT( physicalDevice, dpy, display ); - } - - VkResult vkGetRandROutputDisplayEXT( VkPhysicalDevice physicalDevice, Display * dpy, RROutput rrOutput, VkDisplayKHR * pDisplay ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRandROutputDisplayEXT( physicalDevice, dpy, rrOutput, pDisplay ); - } -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - - VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceCapabilities2EXT( physicalDevice, surface, pSurfaceCapabilities ); - } - - //=== VK_EXT_display_control === - - VkResult vkDisplayPowerControlEXT( VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT * pDisplayPowerInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDisplayPowerControlEXT( device, display, pDisplayPowerInfo ); - } - - VkResult vkRegisterDeviceEventEXT( VkDevice device, - const VkDeviceEventInfoEXT * pDeviceEventInfo, - const VkAllocationCallbacks * pAllocator, - VkFence * pFence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkRegisterDeviceEventEXT( device, pDeviceEventInfo, pAllocator, pFence ); - } - - VkResult vkRegisterDisplayEventEXT( VkDevice device, - VkDisplayKHR display, - const VkDisplayEventInfoEXT * pDisplayEventInfo, - const VkAllocationCallbacks * pAllocator, - VkFence * pFence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkRegisterDisplayEventEXT( device, display, pDisplayEventInfo, pAllocator, pFence ); - } - - VkResult vkGetSwapchainCounterEXT( VkDevice device, - VkSwapchainKHR swapchain, - VkSurfaceCounterFlagBitsEXT counter, - uint64_t * pCounterValue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSwapchainCounterEXT( device, swapchain, counter, pCounterValue ); - } - - //=== VK_GOOGLE_display_timing === - - VkResult vkGetRefreshCycleDurationGOOGLE( VkDevice device, - VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE * pDisplayTimingProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRefreshCycleDurationGOOGLE( device, swapchain, pDisplayTimingProperties ); - } - - VkResult vkGetPastPresentationTimingGOOGLE( VkDevice device, - VkSwapchainKHR swapchain, - uint32_t * pPresentationTimingCount, - VkPastPresentationTimingGOOGLE * pPresentationTimings ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPastPresentationTimingGOOGLE( device, swapchain, pPresentationTimingCount, pPresentationTimings ); - } - - //=== VK_EXT_discard_rectangles === - - void vkCmdSetDiscardRectangleEXT( VkCommandBuffer commandBuffer, - uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, - const VkRect2D * pDiscardRectangles ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDiscardRectangleEXT( commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles ); - } - - //=== VK_EXT_hdr_metadata === - - void vkSetHdrMetadataEXT( VkDevice device, - uint32_t swapchainCount, - const VkSwapchainKHR * pSwapchains, - const VkHdrMetadataEXT * pMetadata ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetHdrMetadataEXT( device, swapchainCount, pSwapchains, pMetadata ); - } - - //=== VK_KHR_create_renderpass2 === - - VkResult vkCreateRenderPass2KHR( VkDevice device, - const VkRenderPassCreateInfo2 * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateRenderPass2KHR( device, pCreateInfo, pAllocator, pRenderPass ); - } - - void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, - const VkRenderPassBeginInfo * pRenderPassBegin, - const VkSubpassBeginInfo * pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginRenderPass2KHR( commandBuffer, pRenderPassBegin, pSubpassBeginInfo ); - } - - void vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, - const VkSubpassBeginInfo * pSubpassBeginInfo, - const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdNextSubpass2KHR( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo ); - } - - void vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndRenderPass2KHR( commandBuffer, pSubpassEndInfo ); - } - - //=== VK_KHR_shared_presentable_image === - - VkResult vkGetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSwapchainStatusKHR( device, swapchain ); - } - - //=== VK_KHR_external_fence_capabilities === - - void vkGetPhysicalDeviceExternalFencePropertiesKHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VkExternalFenceProperties * pExternalFenceProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceExternalFencePropertiesKHR( physicalDevice, pExternalFenceInfo, pExternalFenceProperties ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - - VkResult vkImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkImportFenceWin32HandleKHR( device, pImportFenceWin32HandleInfo ); - } - - VkResult vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetFenceWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - - VkResult vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR * pImportFenceFdInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkImportFenceFdKHR( device, pImportFenceFdInfo ); - } - - VkResult vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetFenceFdKHR( device, pGetFdInfo, pFd ); - } - - //=== VK_KHR_performance_query === - - VkResult - vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - uint32_t * pCounterCount, - VkPerformanceCounterKHR * pCounters, - VkPerformanceCounterDescriptionKHR * pCounterDescriptions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions ); - } - - void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( VkPhysicalDevice physicalDevice, - const VkQueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, - uint32_t * pNumPasses ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( physicalDevice, pPerformanceQueryCreateInfo, pNumPasses ); - } - - VkResult vkAcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireProfilingLockKHR( device, pInfo ); - } - - void vkReleaseProfilingLockKHR( VkDevice device ) const VULKAN_HPP_NOEXCEPT - { - return ::vkReleaseProfilingLockKHR( device ); - } - - //=== VK_KHR_get_surface_capabilities2 === - - VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VkSurfaceCapabilities2KHR * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceCapabilities2KHR( physicalDevice, pSurfaceInfo, pSurfaceCapabilities ); - } - - VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pSurfaceFormatCount, - VkSurfaceFormat2KHR * pSurfaceFormats ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfaceFormats2KHR( physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats ); - } - - //=== VK_KHR_get_display_properties2 === - - VkResult vkGetPhysicalDeviceDisplayProperties2KHR( VkPhysicalDevice physicalDevice, - uint32_t * pPropertyCount, - VkDisplayProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceDisplayProperties2KHR( physicalDevice, pPropertyCount, pProperties ); - } - - VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR( VkPhysicalDevice physicalDevice, - uint32_t * pPropertyCount, - VkDisplayPlaneProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( physicalDevice, pPropertyCount, pProperties ); - } - - VkResult vkGetDisplayModeProperties2KHR( VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - uint32_t * pPropertyCount, - VkDisplayModeProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDisplayModeProperties2KHR( physicalDevice, display, pPropertyCount, pProperties ); - } - - VkResult vkGetDisplayPlaneCapabilities2KHR( VkPhysicalDevice physicalDevice, - const VkDisplayPlaneInfo2KHR * pDisplayPlaneInfo, - VkDisplayPlaneCapabilities2KHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDisplayPlaneCapabilities2KHR( physicalDevice, pDisplayPlaneInfo, pCapabilities ); - } - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - VkResult vkCreateIOSSurfaceMVK( VkInstance instance, - const VkIOSSurfaceCreateInfoMVK * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateIOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - VkResult vkCreateMacOSSurfaceMVK( VkInstance instance, - const VkMacOSSurfaceCreateInfoMVK * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateMacOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - VkResult vkSetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT * pNameInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetDebugUtilsObjectNameEXT( device, pNameInfo ); - } - - VkResult vkSetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT * pTagInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetDebugUtilsObjectTagEXT( device, pTagInfo ); - } - - void vkQueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueBeginDebugUtilsLabelEXT( queue, pLabelInfo ); - } - - void vkQueueEndDebugUtilsLabelEXT( VkQueue queue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueEndDebugUtilsLabelEXT( queue ); - } - - void vkQueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueInsertDebugUtilsLabelEXT( queue, pLabelInfo ); - } - - void vkCmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBeginDebugUtilsLabelEXT( commandBuffer, pLabelInfo ); - } - - void vkCmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEndDebugUtilsLabelEXT( commandBuffer ); - } - - void vkCmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdInsertDebugUtilsLabelEXT( commandBuffer, pLabelInfo ); - } - - VkResult vkCreateDebugUtilsMessengerEXT( VkInstance instance, - const VkDebugUtilsMessengerCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkDebugUtilsMessengerEXT * pMessenger ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDebugUtilsMessengerEXT( instance, pCreateInfo, pAllocator, pMessenger ); - } - - void vkDestroyDebugUtilsMessengerEXT( VkInstance instance, - VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDebugUtilsMessengerEXT( instance, messenger, pAllocator ); - } - - void vkSubmitDebugUtilsMessageEXT( VkInstance instance, - VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT * pCallbackData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSubmitDebugUtilsMessageEXT( instance, messageSeverity, messageTypes, pCallbackData ); - } - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - - VkResult vkGetAndroidHardwareBufferPropertiesANDROID( VkDevice device, - const struct AHardwareBuffer * buffer, - VkAndroidHardwareBufferPropertiesANDROID * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetAndroidHardwareBufferPropertiesANDROID( device, buffer, pProperties ); - } - - VkResult vkGetMemoryAndroidHardwareBufferANDROID( VkDevice device, - const VkMemoryGetAndroidHardwareBufferInfoANDROID * pInfo, - struct AHardwareBuffer ** pBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryAndroidHardwareBufferANDROID( device, pInfo, pBuffer ); - } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - - void vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT * pSampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetSampleLocationsEXT( commandBuffer, pSampleLocationsInfo ); - } - - void vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, - VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT * pMultisampleProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceMultisamplePropertiesEXT( physicalDevice, samples, pMultisampleProperties ); - } - - //=== VK_KHR_get_memory_requirements2 === - - void vkGetImageMemoryRequirements2KHR( VkDevice device, - const VkImageMemoryRequirementsInfo2 * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageMemoryRequirements2KHR( device, pInfo, pMemoryRequirements ); - } - - void vkGetBufferMemoryRequirements2KHR( VkDevice device, - const VkBufferMemoryRequirementsInfo2 * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferMemoryRequirements2KHR( device, pInfo, pMemoryRequirements ); - } - - void vkGetImageSparseMemoryRequirements2KHR( VkDevice device, - const VkImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageSparseMemoryRequirements2KHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); - } - - //=== VK_KHR_acceleration_structure === - - VkResult vkCreateAccelerationStructureKHR( VkDevice device, - const VkAccelerationStructureCreateInfoKHR * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkAccelerationStructureKHR * pAccelerationStructure ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateAccelerationStructureKHR( device, pCreateInfo, pAllocator, pAccelerationStructure ); - } - - void vkDestroyAccelerationStructureKHR( VkDevice device, - VkAccelerationStructureKHR accelerationStructure, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyAccelerationStructureKHR( device, accelerationStructure, pAllocator ); - } - - void vkCmdBuildAccelerationStructuresKHR( VkCommandBuffer commandBuffer, - uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, - const VkAccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBuildAccelerationStructuresKHR( commandBuffer, infoCount, pInfos, ppBuildRangeInfos ); - } - - void vkCmdBuildAccelerationStructuresIndirectKHR( VkCommandBuffer commandBuffer, - uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, - const VkDeviceAddress * pIndirectDeviceAddresses, - const uint32_t * pIndirectStrides, - const uint32_t * const * ppMaxPrimitiveCounts ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBuildAccelerationStructuresIndirectKHR( - commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts ); - } - - VkResult vkBuildAccelerationStructuresKHR( VkDevice device, - VkDeferredOperationKHR deferredOperation, - uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, - const VkAccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBuildAccelerationStructuresKHR( device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos ); - } - - VkResult vkCopyAccelerationStructureKHR( VkDevice device, - VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCopyAccelerationStructureKHR( device, deferredOperation, pInfo ); - } - - VkResult vkCopyAccelerationStructureToMemoryKHR( VkDevice device, - VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureToMemoryInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCopyAccelerationStructureToMemoryKHR( device, deferredOperation, pInfo ); - } - - VkResult vkCopyMemoryToAccelerationStructureKHR( VkDevice device, - VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCopyMemoryToAccelerationStructureKHR( device, deferredOperation, pInfo ); - } - - VkResult vkWriteAccelerationStructuresPropertiesKHR( VkDevice device, - uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR * pAccelerationStructures, - VkQueryType queryType, - size_t dataSize, - void * pData, - size_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkWriteAccelerationStructuresPropertiesKHR( device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride ); - } - - void vkCmdCopyAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyAccelerationStructureKHR( commandBuffer, pInfo ); - } - - void vkCmdCopyAccelerationStructureToMemoryKHR( VkCommandBuffer commandBuffer, - const VkCopyAccelerationStructureToMemoryInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyAccelerationStructureToMemoryKHR( commandBuffer, pInfo ); - } - - void vkCmdCopyMemoryToAccelerationStructureKHR( VkCommandBuffer commandBuffer, - const VkCopyMemoryToAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyMemoryToAccelerationStructureKHR( commandBuffer, pInfo ); - } - - VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR( VkDevice device, - const VkAccelerationStructureDeviceAddressInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetAccelerationStructureDeviceAddressKHR( device, pInfo ); - } - - void vkCmdWriteAccelerationStructuresPropertiesKHR( VkCommandBuffer commandBuffer, - uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR * pAccelerationStructures, - VkQueryType queryType, - VkQueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteAccelerationStructuresPropertiesKHR( - commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery ); - } - - void vkGetDeviceAccelerationStructureCompatibilityKHR( VkDevice device, - const VkAccelerationStructureVersionInfoKHR * pVersionInfo, - VkAccelerationStructureCompatibilityKHR * pCompatibility ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceAccelerationStructureCompatibilityKHR( device, pVersionInfo, pCompatibility ); - } - - void vkGetAccelerationStructureBuildSizesKHR( VkDevice device, - VkAccelerationStructureBuildTypeKHR buildType, - const VkAccelerationStructureBuildGeometryInfoKHR * pBuildInfo, - const uint32_t * pMaxPrimitiveCounts, - VkAccelerationStructureBuildSizesInfoKHR * pSizeInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetAccelerationStructureBuildSizesKHR( device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo ); - } - - //=== VK_KHR_sampler_ycbcr_conversion === - - VkResult vkCreateSamplerYcbcrConversionKHR( VkDevice device, - const VkSamplerYcbcrConversionCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSamplerYcbcrConversion * pYcbcrConversion ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateSamplerYcbcrConversionKHR( device, pCreateInfo, pAllocator, pYcbcrConversion ); - } - - void vkDestroySamplerYcbcrConversionKHR( VkDevice device, - VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroySamplerYcbcrConversionKHR( device, ycbcrConversion, pAllocator ); - } - - //=== VK_KHR_bind_memory2 === - - VkResult vkBindBufferMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindBufferMemory2KHR( device, bindInfoCount, pBindInfos ); - } - - VkResult vkBindImageMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindImageMemory2KHR( device, bindInfoCount, pBindInfos ); - } - - //=== VK_EXT_image_drm_format_modifier === - - VkResult - vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageDrmFormatModifierPropertiesEXT( device, image, pProperties ); - } - - //=== VK_EXT_validation_cache === - - VkResult vkCreateValidationCacheEXT( VkDevice device, - const VkValidationCacheCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkValidationCacheEXT * pValidationCache ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateValidationCacheEXT( device, pCreateInfo, pAllocator, pValidationCache ); - } - - void - vkDestroyValidationCacheEXT( VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyValidationCacheEXT( device, validationCache, pAllocator ); - } - - VkResult vkMergeValidationCachesEXT( VkDevice device, - VkValidationCacheEXT dstCache, - uint32_t srcCacheCount, - const VkValidationCacheEXT * pSrcCaches ) const VULKAN_HPP_NOEXCEPT - { - return ::vkMergeValidationCachesEXT( device, dstCache, srcCacheCount, pSrcCaches ); - } - - VkResult vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetValidationCacheDataEXT( device, validationCache, pDataSize, pData ); - } - - //=== VK_NV_shading_rate_image === - - void vkCmdBindShadingRateImageNV( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindShadingRateImageNV( commandBuffer, imageView, imageLayout ); - } - - void vkCmdSetViewportShadingRatePaletteNV( VkCommandBuffer commandBuffer, - uint32_t firstViewport, - uint32_t viewportCount, - const VkShadingRatePaletteNV * pShadingRatePalettes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetViewportShadingRatePaletteNV( commandBuffer, firstViewport, viewportCount, pShadingRatePalettes ); - } - - void vkCmdSetCoarseSampleOrderNV( VkCommandBuffer commandBuffer, - VkCoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, - const VkCoarseSampleOrderCustomNV * pCustomSampleOrders ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetCoarseSampleOrderNV( commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders ); - } - - //=== VK_NV_ray_tracing === - - VkResult vkCreateAccelerationStructureNV( VkDevice device, - const VkAccelerationStructureCreateInfoNV * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkAccelerationStructureNV * pAccelerationStructure ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateAccelerationStructureNV( device, pCreateInfo, pAllocator, pAccelerationStructure ); - } - - void vkDestroyAccelerationStructureNV( VkDevice device, - VkAccelerationStructureNV accelerationStructure, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyAccelerationStructureNV( device, accelerationStructure, pAllocator ); - } - - void vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, - const VkAccelerationStructureMemoryRequirementsInfoNV * pInfo, - VkMemoryRequirements2KHR * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetAccelerationStructureMemoryRequirementsNV( device, pInfo, pMemoryRequirements ); - } - - VkResult vkBindAccelerationStructureMemoryNV( VkDevice device, - uint32_t bindInfoCount, - const VkBindAccelerationStructureMemoryInfoNV * pBindInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkBindAccelerationStructureMemoryNV( device, bindInfoCount, pBindInfos ); - } - - void vkCmdBuildAccelerationStructureNV( VkCommandBuffer commandBuffer, - const VkAccelerationStructureInfoNV * pInfo, - VkBuffer instanceData, - VkDeviceSize instanceOffset, - VkBool32 update, - VkAccelerationStructureNV dst, - VkAccelerationStructureNV src, - VkBuffer scratch, - VkDeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBuildAccelerationStructureNV( commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset ); - } - - void vkCmdCopyAccelerationStructureNV( VkCommandBuffer commandBuffer, - VkAccelerationStructureNV dst, - VkAccelerationStructureNV src, - VkCopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyAccelerationStructureNV( commandBuffer, dst, src, mode ); - } - - void vkCmdTraceRaysNV( VkCommandBuffer commandBuffer, - VkBuffer raygenShaderBindingTableBuffer, - VkDeviceSize raygenShaderBindingOffset, - VkBuffer missShaderBindingTableBuffer, - VkDeviceSize missShaderBindingOffset, - VkDeviceSize missShaderBindingStride, - VkBuffer hitShaderBindingTableBuffer, - VkDeviceSize hitShaderBindingOffset, - VkDeviceSize hitShaderBindingStride, - VkBuffer callableShaderBindingTableBuffer, - VkDeviceSize callableShaderBindingOffset, - VkDeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdTraceRaysNV( commandBuffer, - raygenShaderBindingTableBuffer, - raygenShaderBindingOffset, - missShaderBindingTableBuffer, - missShaderBindingOffset, - missShaderBindingStride, - hitShaderBindingTableBuffer, - hitShaderBindingOffset, - hitShaderBindingStride, - callableShaderBindingTableBuffer, - callableShaderBindingOffset, - callableShaderBindingStride, - width, - height, - depth ); - } - - VkResult vkCreateRayTracingPipelinesNV( VkDevice device, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV * pCreateInfos, - const VkAllocationCallbacks * pAllocator, - VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateRayTracingPipelinesNV( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); - } - - VkResult vkGetRayTracingShaderGroupHandlesNV( - VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRayTracingShaderGroupHandlesNV( device, pipeline, firstGroup, groupCount, dataSize, pData ); - } - - VkResult vkGetAccelerationStructureHandleNV( VkDevice device, - VkAccelerationStructureNV accelerationStructure, - size_t dataSize, - void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetAccelerationStructureHandleNV( device, accelerationStructure, dataSize, pData ); - } - - void vkCmdWriteAccelerationStructuresPropertiesNV( VkCommandBuffer commandBuffer, - uint32_t accelerationStructureCount, - const VkAccelerationStructureNV * pAccelerationStructures, - VkQueryType queryType, - VkQueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteAccelerationStructuresPropertiesNV( - commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery ); - } - - VkResult vkCompileDeferredNV( VkDevice device, VkPipeline pipeline, uint32_t shader ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCompileDeferredNV( device, pipeline, shader ); - } - - //=== VK_KHR_maintenance3 === - - void vkGetDescriptorSetLayoutSupportKHR( VkDevice device, - const VkDescriptorSetLayoutCreateInfo * pCreateInfo, - VkDescriptorSetLayoutSupport * pSupport ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDescriptorSetLayoutSupportKHR( device, pCreateInfo, pSupport ); - } - - //=== VK_KHR_draw_indirect_count === - - void vkCmdDrawIndirectCountKHR( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - void vkCmdDrawIndexedIndirectCountKHR( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawIndexedIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - //=== VK_EXT_external_memory_host === - - VkResult vkGetMemoryHostPointerPropertiesEXT( VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - const void * pHostPointer, - VkMemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryHostPointerPropertiesEXT( device, handleType, pHostPointer, pMemoryHostPointerProperties ); - } - - //=== VK_AMD_buffer_marker === - - void vkCmdWriteBufferMarkerAMD( VkCommandBuffer commandBuffer, - VkPipelineStageFlagBits pipelineStage, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - uint32_t marker ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteBufferMarkerAMD( commandBuffer, pipelineStage, dstBuffer, dstOffset, marker ); - } - - //=== VK_EXT_calibrated_timestamps === - - VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( VkPhysicalDevice physicalDevice, - uint32_t * pTimeDomainCount, - VkTimeDomainEXT * pTimeDomains ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physicalDevice, pTimeDomainCount, pTimeDomains ); - } - - VkResult vkGetCalibratedTimestampsEXT( VkDevice device, - uint32_t timestampCount, - const VkCalibratedTimestampInfoEXT * pTimestampInfos, - uint64_t * pTimestamps, - uint64_t * pMaxDeviation ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetCalibratedTimestampsEXT( device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation ); - } - - //=== VK_NV_mesh_shader === - - void vkCmdDrawMeshTasksNV( VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksNV( commandBuffer, taskCount, firstTask ); - } - - void vkCmdDrawMeshTasksIndirectNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksIndirectNV( commandBuffer, buffer, offset, drawCount, stride ); - } - - void vkCmdDrawMeshTasksIndirectCountNV( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksIndirectCountNV( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - //=== VK_NV_scissor_exclusive === - - void vkCmdSetExclusiveScissorNV( VkCommandBuffer commandBuffer, - uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, - const VkRect2D * pExclusiveScissors ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetExclusiveScissorNV( commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors ); - } - - //=== VK_NV_device_diagnostic_checkpoints === - - void vkCmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void * pCheckpointMarker ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetCheckpointNV( commandBuffer, pCheckpointMarker ); - } - - void vkGetQueueCheckpointDataNV( VkQueue queue, uint32_t * pCheckpointDataCount, VkCheckpointDataNV * pCheckpointData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetQueueCheckpointDataNV( queue, pCheckpointDataCount, pCheckpointData ); - } - - //=== VK_KHR_timeline_semaphore === - - VkResult vkGetSemaphoreCounterValueKHR( VkDevice device, VkSemaphore semaphore, uint64_t * pValue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSemaphoreCounterValueKHR( device, semaphore, pValue ); - } - - VkResult vkWaitSemaphoresKHR( VkDevice device, const VkSemaphoreWaitInfo * pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkWaitSemaphoresKHR( device, pWaitInfo, timeout ); - } - - VkResult vkSignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo * pSignalInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSignalSemaphoreKHR( device, pSignalInfo ); - } - - //=== VK_INTEL_performance_query === - - VkResult vkInitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL * pInitializeInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkInitializePerformanceApiINTEL( device, pInitializeInfo ); - } - - void vkUninitializePerformanceApiINTEL( VkDevice device ) const VULKAN_HPP_NOEXCEPT - { - return ::vkUninitializePerformanceApiINTEL( device ); - } - - VkResult vkCmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPerformanceMarkerINTEL( commandBuffer, pMarkerInfo ); - } - - VkResult vkCmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, - const VkPerformanceStreamMarkerInfoINTEL * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPerformanceStreamMarkerINTEL( commandBuffer, pMarkerInfo ); - } - - VkResult vkCmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL * pOverrideInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPerformanceOverrideINTEL( commandBuffer, pOverrideInfo ); - } - - VkResult vkAcquirePerformanceConfigurationINTEL( VkDevice device, - const VkPerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, - VkPerformanceConfigurationINTEL * pConfiguration ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquirePerformanceConfigurationINTEL( device, pAcquireInfo, pConfiguration ); - } - - VkResult vkReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration ) const VULKAN_HPP_NOEXCEPT - { - return ::vkReleasePerformanceConfigurationINTEL( device, configuration ); - } - - VkResult vkQueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueSetPerformanceConfigurationINTEL( queue, configuration ); - } - - VkResult - vkGetPerformanceParameterINTEL( VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL * pValue ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPerformanceParameterINTEL( device, parameter, pValue ); - } - - //=== VK_AMD_display_native_hdr === - - void vkSetLocalDimmingAMD( VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetLocalDimmingAMD( device, swapChain, localDimmingEnable ); - } - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - VkResult vkCreateImagePipeSurfaceFUCHSIA( VkInstance instance, - const VkImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateImagePipeSurfaceFUCHSIA( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - VkResult vkCreateMetalSurfaceEXT( VkInstance instance, - const VkMetalSurfaceCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateMetalSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); - } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - - VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR( VkPhysicalDevice physicalDevice, - uint32_t * pFragmentShadingRateCount, - VkPhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceFragmentShadingRatesKHR( physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates ); - } - - void vkCmdSetFragmentShadingRateKHR( VkCommandBuffer commandBuffer, - const VkExtent2D * pFragmentSize, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetFragmentShadingRateKHR( commandBuffer, pFragmentSize, combinerOps ); - } - - //=== VK_EXT_buffer_device_address === - - VkDeviceAddress vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferDeviceAddressEXT( device, pInfo ); - } - - //=== VK_EXT_tooling_info === - - VkResult vkGetPhysicalDeviceToolPropertiesEXT( VkPhysicalDevice physicalDevice, - uint32_t * pToolCount, - VkPhysicalDeviceToolProperties * pToolProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceToolPropertiesEXT( physicalDevice, pToolCount, pToolProperties ); - } - - //=== VK_KHR_present_wait === - - VkResult vkWaitForPresentKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkWaitForPresentKHR( device, swapchain, presentId, timeout ); - } - - //=== VK_NV_cooperative_matrix === - - VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDevice physicalDevice, - uint32_t * pPropertyCount, - VkCooperativeMatrixPropertiesNV * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( physicalDevice, pPropertyCount, pProperties ); - } - - //=== VK_NV_coverage_reduction_mode === - - VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - VkPhysicalDevice physicalDevice, uint32_t * pCombinationCount, VkFramebufferMixedSamplesCombinationNV * pCombinations ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( physicalDevice, pCombinationCount, pCombinations ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT( VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pPresentModeCount, - VkPresentModeKHR * pPresentModes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceSurfacePresentModes2EXT( physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes ); - } - - VkResult vkAcquireFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireFullScreenExclusiveModeEXT( device, swapchain ); - } - - VkResult vkReleaseFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT - { - return ::vkReleaseFullScreenExclusiveModeEXT( device, swapchain ); - } - - VkResult vkGetDeviceGroupSurfacePresentModes2EXT( VkDevice device, - const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VkDeviceGroupPresentModeFlagsKHR * pModes ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceGroupSurfacePresentModes2EXT( device, pSurfaceInfo, pModes ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - - VkResult vkCreateHeadlessSurfaceEXT( VkInstance instance, - const VkHeadlessSurfaceCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateHeadlessSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); - } - - //=== VK_KHR_buffer_device_address === - - VkDeviceAddress vkGetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferDeviceAddressKHR( device, pInfo ); - } - - uint64_t vkGetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferOpaqueCaptureAddressKHR( device, pInfo ); - } - - uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceMemoryOpaqueCaptureAddressKHR( device, pInfo ); - } - - //=== VK_EXT_line_rasterization === - - void vkCmdSetLineStippleEXT( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetLineStippleEXT( commandBuffer, lineStippleFactor, lineStipplePattern ); - } - - //=== VK_EXT_host_query_reset === - - void vkResetQueryPoolEXT( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - return ::vkResetQueryPoolEXT( device, queryPool, firstQuery, queryCount ); - } - - //=== VK_EXT_extended_dynamic_state === - - void vkCmdSetCullModeEXT( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetCullModeEXT( commandBuffer, cullMode ); - } - - void vkCmdSetFrontFaceEXT( VkCommandBuffer commandBuffer, VkFrontFace frontFace ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetFrontFaceEXT( commandBuffer, frontFace ); - } - - void vkCmdSetPrimitiveTopologyEXT( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPrimitiveTopologyEXT( commandBuffer, primitiveTopology ); - } - - void vkCmdSetViewportWithCountEXT( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetViewportWithCountEXT( commandBuffer, viewportCount, pViewports ); - } - - void vkCmdSetScissorWithCountEXT( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetScissorWithCountEXT( commandBuffer, scissorCount, pScissors ); - } - - void vkCmdBindVertexBuffers2EXT( VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer * pBuffers, - const VkDeviceSize * pOffsets, - const VkDeviceSize * pSizes, - const VkDeviceSize * pStrides ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindVertexBuffers2EXT( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides ); - } - - void vkCmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthTestEnableEXT( commandBuffer, depthTestEnable ); - } - - void vkCmdSetDepthWriteEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthWriteEnableEXT( commandBuffer, depthWriteEnable ); - } - - void vkCmdSetDepthCompareOpEXT( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthCompareOpEXT( commandBuffer, depthCompareOp ); - } - - void vkCmdSetDepthBoundsTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBoundsTestEnableEXT( commandBuffer, depthBoundsTestEnable ); - } - - void vkCmdSetStencilTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilTestEnableEXT( commandBuffer, stencilTestEnable ); - } - - void vkCmdSetStencilOpEXT( VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - VkStencilOp failOp, - VkStencilOp passOp, - VkStencilOp depthFailOp, - VkCompareOp compareOp ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetStencilOpEXT( commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp ); - } - - //=== VK_KHR_deferred_host_operations === - - VkResult vkCreateDeferredOperationKHR( VkDevice device, - const VkAllocationCallbacks * pAllocator, - VkDeferredOperationKHR * pDeferredOperation ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDeferredOperationKHR( device, pAllocator, pDeferredOperation ); - } - - void vkDestroyDeferredOperationKHR( VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyDeferredOperationKHR( device, operation, pAllocator ); - } - - uint32_t vkGetDeferredOperationMaxConcurrencyKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeferredOperationMaxConcurrencyKHR( device, operation ); - } - - VkResult vkGetDeferredOperationResultKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeferredOperationResultKHR( device, operation ); - } - - VkResult vkDeferredOperationJoinKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDeferredOperationJoinKHR( device, operation ); - } - - //=== VK_KHR_pipeline_executable_properties === - - VkResult vkGetPipelineExecutablePropertiesKHR( VkDevice device, - const VkPipelineInfoKHR * pPipelineInfo, - uint32_t * pExecutableCount, - VkPipelineExecutablePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPipelineExecutablePropertiesKHR( device, pPipelineInfo, pExecutableCount, pProperties ); - } - - VkResult vkGetPipelineExecutableStatisticsKHR( VkDevice device, - const VkPipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pStatisticCount, - VkPipelineExecutableStatisticKHR * pStatistics ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPipelineExecutableStatisticsKHR( device, pExecutableInfo, pStatisticCount, pStatistics ); - } - - VkResult - vkGetPipelineExecutableInternalRepresentationsKHR( VkDevice device, - const VkPipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pInternalRepresentationCount, - VkPipelineExecutableInternalRepresentationKHR * pInternalRepresentations ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPipelineExecutableInternalRepresentationsKHR( device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations ); - } - - //=== VK_NV_device_generated_commands === - - void vkGetGeneratedCommandsMemoryRequirementsNV( VkDevice device, - const VkGeneratedCommandsMemoryRequirementsInfoNV * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetGeneratedCommandsMemoryRequirementsNV( device, pInfo, pMemoryRequirements ); - } - - void vkCmdPreprocessGeneratedCommandsNV( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV * pGeneratedCommandsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPreprocessGeneratedCommandsNV( commandBuffer, pGeneratedCommandsInfo ); - } - - void vkCmdExecuteGeneratedCommandsNV( VkCommandBuffer commandBuffer, - VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoNV * pGeneratedCommandsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdExecuteGeneratedCommandsNV( commandBuffer, isPreprocessed, pGeneratedCommandsInfo ); - } - - void vkCmdBindPipelineShaderGroupNV( VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline, - uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindPipelineShaderGroupNV( commandBuffer, pipelineBindPoint, pipeline, groupIndex ); - } - - VkResult vkCreateIndirectCommandsLayoutNV( VkDevice device, - const VkIndirectCommandsLayoutCreateInfoNV * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkIndirectCommandsLayoutNV * pIndirectCommandsLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateIndirectCommandsLayoutNV( device, pCreateInfo, pAllocator, pIndirectCommandsLayout ); - } - - void vkDestroyIndirectCommandsLayoutNV( VkDevice device, - VkIndirectCommandsLayoutNV indirectCommandsLayout, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyIndirectCommandsLayoutNV( device, indirectCommandsLayout, pAllocator ); - } - - //=== VK_EXT_acquire_drm_display === - - VkResult vkAcquireDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireDrmDisplayEXT( physicalDevice, drmFd, display ); - } - - VkResult vkGetDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR * display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDrmDisplayEXT( physicalDevice, drmFd, connectorId, display ); - } - - //=== VK_EXT_private_data === - - VkResult vkCreatePrivateDataSlotEXT( VkDevice device, - const VkPrivateDataSlotCreateInfo * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkPrivateDataSlot * pPrivateDataSlot ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreatePrivateDataSlotEXT( device, pCreateInfo, pAllocator, pPrivateDataSlot ); - } - - void vkDestroyPrivateDataSlotEXT( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyPrivateDataSlotEXT( device, privateDataSlot, pAllocator ); - } - - VkResult vkSetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkSetPrivateDataEXT( device, objectType, objectHandle, privateDataSlot, data ); - } - - void vkGetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t * pData ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkGetPrivateDataEXT( device, objectType, objectHandle, privateDataSlot, pData ); - } - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - void vkCmdEncodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR * pEncodeInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdEncodeVideoKHR( commandBuffer, pEncodeInfo ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - void vkExportMetalObjectsEXT( VkDevice device, VkExportMetalObjectsInfoEXT * pMetalObjectsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkExportMetalObjectsEXT( device, pMetalObjectsInfo ); - } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - - void vkCmdSetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetEvent2KHR( commandBuffer, event, pDependencyInfo ); - } - - void vkCmdResetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResetEvent2KHR( commandBuffer, event, stageMask ); - } - - void vkCmdWaitEvents2KHR( VkCommandBuffer commandBuffer, - uint32_t eventCount, - const VkEvent * pEvents, - const VkDependencyInfo * pDependencyInfos ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWaitEvents2KHR( commandBuffer, eventCount, pEvents, pDependencyInfos ); - } - - void vkCmdPipelineBarrier2KHR( VkCommandBuffer commandBuffer, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdPipelineBarrier2KHR( commandBuffer, pDependencyInfo ); - } - - void vkCmdWriteTimestamp2KHR( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteTimestamp2KHR( commandBuffer, stage, queryPool, query ); - } - - VkResult vkQueueSubmit2KHR( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT - { - return ::vkQueueSubmit2KHR( queue, submitCount, pSubmits, fence ); - } - - void vkCmdWriteBufferMarker2AMD( - VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdWriteBufferMarker2AMD( commandBuffer, stage, dstBuffer, dstOffset, marker ); - } - - void vkGetQueueCheckpointData2NV( VkQueue queue, uint32_t * pCheckpointDataCount, VkCheckpointData2NV * pCheckpointData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetQueueCheckpointData2NV( queue, pCheckpointDataCount, pCheckpointData ); - } - - //=== VK_NV_fragment_shading_rate_enums === - - void vkCmdSetFragmentShadingRateEnumNV( VkCommandBuffer commandBuffer, - VkFragmentShadingRateNV shadingRate, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetFragmentShadingRateEnumNV( commandBuffer, shadingRate, combinerOps ); - } - - //=== VK_EXT_mesh_shader === - - void vkCmdDrawMeshTasksEXT( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksEXT( commandBuffer, groupCountX, groupCountY, groupCountZ ); - } - - void vkCmdDrawMeshTasksIndirectEXT( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const - VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksIndirectEXT( commandBuffer, buffer, offset, drawCount, stride ); - } - - void vkCmdDrawMeshTasksIndirectCountEXT( VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMeshTasksIndirectCountEXT( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); - } - - //=== VK_KHR_copy_commands2 === - - void vkCmdCopyBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2 * pCopyBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBuffer2KHR( commandBuffer, pCopyBufferInfo ); - } - - void vkCmdCopyImage2KHR( VkCommandBuffer commandBuffer, const VkCopyImageInfo2 * pCopyImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImage2KHR( commandBuffer, pCopyImageInfo ); - } - - void vkCmdCopyBufferToImage2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2 * pCopyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyBufferToImage2KHR( commandBuffer, pCopyBufferToImageInfo ); - } - - void vkCmdCopyImageToBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2 * pCopyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdCopyImageToBuffer2KHR( commandBuffer, pCopyImageToBufferInfo ); - } - - void vkCmdBlitImage2KHR( VkCommandBuffer commandBuffer, const VkBlitImageInfo2 * pBlitImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBlitImage2KHR( commandBuffer, pBlitImageInfo ); - } - - void vkCmdResolveImage2KHR( VkCommandBuffer commandBuffer, const VkResolveImageInfo2 * pResolveImageInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdResolveImage2KHR( commandBuffer, pResolveImageInfo ); - } - - //=== VK_EXT_image_compression_control === - - void vkGetImageSubresourceLayout2EXT( VkDevice device, - VkImage image, - const VkImageSubresource2EXT * pSubresource, - VkSubresourceLayout2EXT * pLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetImageSubresourceLayout2EXT( device, image, pSubresource, pLayout ); - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - - VkResult vkAcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT - { - return ::vkAcquireWinrtDisplayNV( physicalDevice, display ); - } - - VkResult vkGetWinrtDisplayNV( VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR * pDisplay ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetWinrtDisplayNV( physicalDevice, deviceRelativeId, pDisplay ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VkResult vkCreateDirectFBSurfaceEXT( VkInstance instance, - const VkDirectFBSurfaceCreateInfoEXT * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateDirectFBSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 - vkGetPhysicalDeviceDirectFBPresentationSupportEXT( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB * dfb ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceDirectFBPresentationSupportEXT( physicalDevice, queueFamilyIndex, dfb ); - } -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - void vkCmdTraceRaysKHR( VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdTraceRaysKHR( - commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth ); - } - - VkResult vkCreateRayTracingPipelinesKHR( VkDevice device, - VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR * pCreateInfos, - const VkAllocationCallbacks * pAllocator, - VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateRayTracingPipelinesKHR( device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); - } - - VkResult vkGetRayTracingShaderGroupHandlesKHR( - VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRayTracingShaderGroupHandlesKHR( device, pipeline, firstGroup, groupCount, dataSize, pData ); - } - - VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( - VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( device, pipeline, firstGroup, groupCount, dataSize, pData ); - } - - void vkCmdTraceRaysIndirectKHR( VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - VkDeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdTraceRaysIndirectKHR( - commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress ); - } - - VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR( VkDevice device, - VkPipeline pipeline, - uint32_t group, - VkShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetRayTracingShaderGroupStackSizeKHR( device, pipeline, group, groupShader ); - } - - void vkCmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetRayTracingPipelineStackSizeKHR( commandBuffer, pipelineStackSize ); - } - - //=== VK_EXT_vertex_input_dynamic_state === - - void vkCmdSetVertexInputEXT( VkCommandBuffer commandBuffer, - uint32_t vertexBindingDescriptionCount, - const VkVertexInputBindingDescription2EXT * pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VkVertexInputAttributeDescription2EXT * pVertexAttributeDescriptions ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetVertexInputEXT( - commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions ); - } - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - - VkResult vkGetMemoryZirconHandleFUCHSIA( VkDevice device, - const VkMemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryZirconHandleFUCHSIA( device, pGetZirconHandleInfo, pZirconHandle ); - } - - VkResult vkGetMemoryZirconHandlePropertiesFUCHSIA( VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - VkMemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryZirconHandlePropertiesFUCHSIA( device, handleType, zirconHandle, pMemoryZirconHandleProperties ); - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - - VkResult vkImportSemaphoreZirconHandleFUCHSIA( VkDevice device, - const VkImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkImportSemaphoreZirconHandleFUCHSIA( device, pImportSemaphoreZirconHandleInfo ); - } - - VkResult vkGetSemaphoreZirconHandleFUCHSIA( VkDevice device, - const VkSemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetSemaphoreZirconHandleFUCHSIA( device, pGetZirconHandleInfo, pZirconHandle ); - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - VkResult vkCreateBufferCollectionFUCHSIA( VkDevice device, - const VkBufferCollectionCreateInfoFUCHSIA * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkBufferCollectionFUCHSIA * pCollection ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateBufferCollectionFUCHSIA( device, pCreateInfo, pAllocator, pCollection ); - } - - VkResult vkSetBufferCollectionImageConstraintsFUCHSIA( VkDevice device, - VkBufferCollectionFUCHSIA collection, - const VkImageConstraintsInfoFUCHSIA * pImageConstraintsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetBufferCollectionImageConstraintsFUCHSIA( device, collection, pImageConstraintsInfo ); - } - - VkResult vkSetBufferCollectionBufferConstraintsFUCHSIA( VkDevice device, - VkBufferCollectionFUCHSIA collection, - const VkBufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetBufferCollectionBufferConstraintsFUCHSIA( device, collection, pBufferConstraintsInfo ); - } - - void vkDestroyBufferCollectionFUCHSIA( VkDevice device, - VkBufferCollectionFUCHSIA collection, - const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT - { - return ::vkDestroyBufferCollectionFUCHSIA( device, collection, pAllocator ); - } - - VkResult vkGetBufferCollectionPropertiesFUCHSIA( VkDevice device, - VkBufferCollectionFUCHSIA collection, - VkBufferCollectionPropertiesFUCHSIA * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetBufferCollectionPropertiesFUCHSIA( device, collection, pProperties ); - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - - VkResult - vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( VkDevice device, VkRenderPass renderpass, VkExtent2D * pMaxWorkgroupSize ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( device, renderpass, pMaxWorkgroupSize ); - } - - void vkCmdSubpassShadingHUAWEI( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSubpassShadingHUAWEI( commandBuffer ); - } - - //=== VK_HUAWEI_invocation_mask === - - void vkCmdBindInvocationMaskHUAWEI( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdBindInvocationMaskHUAWEI( commandBuffer, imageView, imageLayout ); - } - - //=== VK_NV_external_memory_rdma === - - VkResult vkGetMemoryRemoteAddressNV( VkDevice device, - const VkMemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, - VkRemoteAddressNV * pAddress ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetMemoryRemoteAddressNV( device, pMemoryGetRemoteAddressInfo, pAddress ); - } - - //=== VK_EXT_pipeline_properties === - - VkResult - vkGetPipelinePropertiesEXT( VkDevice device, const VkPipelineInfoEXT * pPipelineInfo, VkBaseOutStructure * pPipelineProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPipelinePropertiesEXT( device, pPipelineInfo, pPipelineProperties ); - } - - //=== VK_EXT_extended_dynamic_state2 === - - void vkCmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPatchControlPointsEXT( commandBuffer, patchControlPoints ); - } - - void vkCmdSetRasterizerDiscardEnableEXT( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetRasterizerDiscardEnableEXT( commandBuffer, rasterizerDiscardEnable ); - } - - void vkCmdSetDepthBiasEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetDepthBiasEnableEXT( commandBuffer, depthBiasEnable ); - } - - void vkCmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetLogicOpEXT( commandBuffer, logicOp ); - } - - void vkCmdSetPrimitiveRestartEnableEXT( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetPrimitiveRestartEnableEXT( commandBuffer, primitiveRestartEnable ); - } - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VkResult vkCreateScreenSurfaceQNX( VkInstance instance, - const VkScreenSurfaceCreateInfoQNX * pCreateInfo, - const VkAllocationCallbacks * pAllocator, - VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCreateScreenSurfaceQNX( instance, pCreateInfo, pAllocator, pSurface ); - } - - VkBool32 vkGetPhysicalDeviceScreenPresentationSupportQNX( VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct _screen_window * window ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetPhysicalDeviceScreenPresentationSupportQNX( physicalDevice, queueFamilyIndex, window ); - } -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - - void vkCmdSetColorWriteEnableEXT( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32 * pColorWriteEnables ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdSetColorWriteEnableEXT( commandBuffer, attachmentCount, pColorWriteEnables ); - } - - //=== VK_KHR_ray_tracing_maintenance1 === - - void vkCmdTraceRaysIndirect2KHR( VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdTraceRaysIndirect2KHR( commandBuffer, indirectDeviceAddress ); - } - - //=== VK_EXT_multi_draw === - - void vkCmdDrawMultiEXT( VkCommandBuffer commandBuffer, - uint32_t drawCount, - const VkMultiDrawInfoEXT * pVertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMultiEXT( commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride ); - } - - void vkCmdDrawMultiIndexedEXT( VkCommandBuffer commandBuffer, - uint32_t drawCount, - const VkMultiDrawIndexedInfoEXT * pIndexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - const int32_t * pVertexOffset ) const VULKAN_HPP_NOEXCEPT - { - return ::vkCmdDrawMultiIndexedEXT( commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset ); - } - - //=== VK_EXT_pageable_device_local_memory === - - void vkSetDeviceMemoryPriorityEXT( VkDevice device, VkDeviceMemory memory, float priority ) const VULKAN_HPP_NOEXCEPT - { - return ::vkSetDeviceMemoryPriorityEXT( device, memory, priority ); - } - - //=== VK_KHR_maintenance4 === - - void vkGetDeviceBufferMemoryRequirementsKHR( VkDevice device, - const VkDeviceBufferMemoryRequirements * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceBufferMemoryRequirementsKHR( device, pInfo, pMemoryRequirements ); - } - - void vkGetDeviceImageMemoryRequirementsKHR( VkDevice device, - const VkDeviceImageMemoryRequirements * pInfo, - VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceImageMemoryRequirementsKHR( device, pInfo, pMemoryRequirements ); - } - - void vkGetDeviceImageSparseMemoryRequirementsKHR( VkDevice device, - const VkDeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDeviceImageSparseMemoryRequirementsKHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); - } - - //=== VK_VALVE_descriptor_set_host_mapping === - - void vkGetDescriptorSetLayoutHostMappingInfoVALVE( VkDevice device, - const VkDescriptorSetBindingReferenceVALVE * pBindingReference, - VkDescriptorSetLayoutHostMappingInfoVALVE * pHostMapping ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDescriptorSetLayoutHostMappingInfoVALVE( device, pBindingReference, pHostMapping ); - } - - void vkGetDescriptorSetHostMappingVALVE( VkDevice device, VkDescriptorSet descriptorSet, void ** ppData ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDescriptorSetHostMappingVALVE( device, descriptorSet, ppData ); - } - - //=== VK_EXT_shader_module_identifier === - - void vkGetShaderModuleIdentifierEXT( VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT * pIdentifier ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetShaderModuleIdentifierEXT( device, shaderModule, pIdentifier ); - } - - void vkGetShaderModuleCreateInfoIdentifierEXT( VkDevice device, - const VkShaderModuleCreateInfo * pCreateInfo, - VkShaderModuleIdentifierEXT * pIdentifier ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetShaderModuleCreateInfoIdentifierEXT( device, pCreateInfo, pIdentifier ); - } - - //=== VK_QCOM_tile_properties === - - VkResult vkGetFramebufferTilePropertiesQCOM( VkDevice device, - VkFramebuffer framebuffer, - uint32_t * pPropertiesCount, - VkTilePropertiesQCOM * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetFramebufferTilePropertiesQCOM( device, framebuffer, pPropertiesCount, pProperties ); - } - - VkResult vkGetDynamicRenderingTilePropertiesQCOM( VkDevice device, - const VkRenderingInfo * pRenderingInfo, - VkTilePropertiesQCOM * pProperties ) const VULKAN_HPP_NOEXCEPT - { - return ::vkGetDynamicRenderingTilePropertiesQCOM( device, pRenderingInfo, pProperties ); - } - }; -#endif - - class DispatchLoaderDynamic; -#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) -# if defined( VK_NO_PROTOTYPES ) -# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -# else -# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 -# endif -#endif - -#if !defined( VULKAN_HPP_STORAGE_API ) -# if defined( VULKAN_HPP_STORAGE_SHARED ) -# if defined( _MSC_VER ) -# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT ) -# define VULKAN_HPP_STORAGE_API __declspec( dllexport ) -# else -# define VULKAN_HPP_STORAGE_API __declspec( dllimport ) -# endif -# elif defined( __clang__ ) || defined( __GNUC__ ) -# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT ) -# define VULKAN_HPP_STORAGE_API __attribute__( ( visibility( "default" ) ) ) -# else -# define VULKAN_HPP_STORAGE_API -# endif -# else -# define VULKAN_HPP_STORAGE_API -# pragma warning Unknown import / export semantics -# endif -# else -# define VULKAN_HPP_STORAGE_API -# endif -#endif - -#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) -# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 -# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic -# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ - namespace VULKAN_HPP_NAMESPACE \ - { \ - VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ - } - extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; -# else - static inline ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic & getDispatchLoaderStatic() - { - static ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic dls; - return dls; - } -# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic() -# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -# endif -#endif - -#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ) -# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 -# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic -# else -# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic -# endif -#endif - -#if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER ) -# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT -# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT -# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT -#else -# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {} -# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr -# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER -#endif - -#if !defined( VULKAN_HPP_NO_SMART_HANDLE ) - struct AllocationCallbacks; - - template - class ObjectDestroy - { - public: - ObjectDestroy() = default; - - ObjectDestroy( OwnerType owner, - Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_allocationCallbacks( allocationCallbacks ) - , m_dispatch( &dispatch ) - { - } - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - Optional getAllocator() const VULKAN_HPP_NOEXCEPT - { - return m_allocationCallbacks; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_owner && m_dispatch ); - m_owner.destroy( t, m_allocationCallbacks, *m_dispatch ); - } - - private: - OwnerType m_owner = {}; - Optional m_allocationCallbacks = nullptr; - Dispatch const * m_dispatch = nullptr; - }; - - class NoParent; - - template - class ObjectDestroy - { - public: - ObjectDestroy() = default; - - ObjectDestroy( Optional allocationCallbacks, - Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT - : m_allocationCallbacks( allocationCallbacks ) - , m_dispatch( &dispatch ) - { - } - - Optional getAllocator() const VULKAN_HPP_NOEXCEPT - { - return m_allocationCallbacks; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_dispatch ); - t.destroy( m_allocationCallbacks, *m_dispatch ); - } - - private: - Optional m_allocationCallbacks = nullptr; - Dispatch const * m_dispatch = nullptr; - }; - - template - class ObjectFree - { - public: - ObjectFree() = default; - - ObjectFree( OwnerType owner, - Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_allocationCallbacks( allocationCallbacks ) - , m_dispatch( &dispatch ) - { - } - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - - Optional getAllocator() const VULKAN_HPP_NOEXCEPT - { - return m_allocationCallbacks; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_owner && m_dispatch ); - ( m_owner.free )( t, m_allocationCallbacks, *m_dispatch ); - } - - private: - OwnerType m_owner = {}; - Optional m_allocationCallbacks = nullptr; - Dispatch const * m_dispatch = nullptr; - }; - - template - class ObjectRelease - { - public: - ObjectRelease() = default; - - ObjectRelease( OwnerType owner, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_dispatch( &dispatch ) - { - } - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( m_owner && m_dispatch ); - m_owner.release( t, *m_dispatch ); - } - - private: - OwnerType m_owner = {}; - Dispatch const * m_dispatch = nullptr; - }; - - template - class PoolFree - { - public: - PoolFree() = default; - - PoolFree( OwnerType owner, PoolType pool, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT - : m_owner( owner ) - , m_pool( pool ) - , m_dispatch( &dispatch ) - { - } - - OwnerType getOwner() const VULKAN_HPP_NOEXCEPT - { - return m_owner; - } - PoolType getPool() const VULKAN_HPP_NOEXCEPT - { - return m_pool; - } - - protected: - template - void destroy( T t ) VULKAN_HPP_NOEXCEPT - { - ( m_owner.free )( m_pool, t, *m_dispatch ); - } - - private: - OwnerType m_owner = OwnerType(); - PoolType m_pool = PoolType(); - Dispatch const * m_dispatch = nullptr; - }; - -#endif // !VULKAN_HPP_NO_SMART_HANDLE - - //================== - //=== BASE TYPEs === - //================== - - using Bool32 = uint32_t; - using DeviceAddress = uint64_t; - using DeviceSize = uint64_t; - using RemoteAddressNV = void *; - using SampleMask = uint32_t; - -} // namespace VULKAN_HPP_NAMESPACE - -#include -#if !defined( VULKAN_HPP_NO_TO_STRING ) -# include -#endif - -#ifndef VULKAN_HPP_NO_EXCEPTIONS -namespace std -{ - template <> - struct is_error_code_enum : public true_type - { - }; -} // namespace std -#endif - -namespace VULKAN_HPP_NAMESPACE -{ -#ifndef VULKAN_HPP_NO_EXCEPTIONS - class ErrorCategoryImpl : public std::error_category - { - public: - virtual const char * name() const VULKAN_HPP_NOEXCEPT override - { - return VULKAN_HPP_NAMESPACE_STRING "::Result"; - } - virtual std::string message( int ev ) const override - { -# if defined( VULKAN_HPP_NO_TO_STRING ) - return std::to_string( ev ); -# else - return VULKAN_HPP_NAMESPACE::to_string( static_cast( ev ) ); -# endif - } - }; - - class Error - { - public: - Error() VULKAN_HPP_NOEXCEPT = default; - Error( const Error & ) VULKAN_HPP_NOEXCEPT = default; - virtual ~Error() VULKAN_HPP_NOEXCEPT = default; - - virtual const char * what() const VULKAN_HPP_NOEXCEPT = 0; - }; - - class LogicError - : public Error - , public std::logic_error - { - public: - explicit LogicError( const std::string & what ) : Error(), std::logic_error( what ) {} - explicit LogicError( char const * what ) : Error(), std::logic_error( what ) {} - - virtual const char * what() const VULKAN_HPP_NOEXCEPT - { - return std::logic_error::what(); - } - }; - - class SystemError - : public Error - , public std::system_error - { - public: - SystemError( std::error_code ec ) : Error(), std::system_error( ec ) {} - SystemError( std::error_code ec, std::string const & what ) : Error(), std::system_error( ec, what ) {} - SystemError( std::error_code ec, char const * what ) : Error(), std::system_error( ec, what ) {} - SystemError( int ev, std::error_category const & ecat ) : Error(), std::system_error( ev, ecat ) {} - SystemError( int ev, std::error_category const & ecat, std::string const & what ) : Error(), std::system_error( ev, ecat, what ) {} - SystemError( int ev, std::error_category const & ecat, char const * what ) : Error(), std::system_error( ev, ecat, what ) {} - - virtual const char * what() const VULKAN_HPP_NOEXCEPT - { - return std::system_error::what(); - } - }; - - VULKAN_HPP_INLINE const std::error_category & errorCategory() VULKAN_HPP_NOEXCEPT - { - static ErrorCategoryImpl instance; - return instance; - } - - VULKAN_HPP_INLINE std::error_code make_error_code( Result e ) VULKAN_HPP_NOEXCEPT - { - return std::error_code( static_cast( e ), errorCategory() ); - } - - VULKAN_HPP_INLINE std::error_condition make_error_condition( Result e ) VULKAN_HPP_NOEXCEPT - { - return std::error_condition( static_cast( e ), errorCategory() ); - } - - class OutOfHostMemoryError : public SystemError - { - public: - OutOfHostMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfHostMemory ), message ) {} - OutOfHostMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfHostMemory ), message ) {} - }; - - class OutOfDeviceMemoryError : public SystemError - { - public: - OutOfDeviceMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfDeviceMemory ), message ) {} - OutOfDeviceMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfDeviceMemory ), message ) {} - }; - - class InitializationFailedError : public SystemError - { - public: - InitializationFailedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInitializationFailed ), message ) {} - InitializationFailedError( char const * message ) : SystemError( make_error_code( Result::eErrorInitializationFailed ), message ) {} - }; - - class DeviceLostError : public SystemError - { - public: - DeviceLostError( std::string const & message ) : SystemError( make_error_code( Result::eErrorDeviceLost ), message ) {} - DeviceLostError( char const * message ) : SystemError( make_error_code( Result::eErrorDeviceLost ), message ) {} - }; - - class MemoryMapFailedError : public SystemError - { - public: - MemoryMapFailedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorMemoryMapFailed ), message ) {} - MemoryMapFailedError( char const * message ) : SystemError( make_error_code( Result::eErrorMemoryMapFailed ), message ) {} - }; - - class LayerNotPresentError : public SystemError - { - public: - LayerNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorLayerNotPresent ), message ) {} - LayerNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorLayerNotPresent ), message ) {} - }; - - class ExtensionNotPresentError : public SystemError - { - public: - ExtensionNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorExtensionNotPresent ), message ) {} - ExtensionNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorExtensionNotPresent ), message ) {} - }; - - class FeatureNotPresentError : public SystemError - { - public: - FeatureNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFeatureNotPresent ), message ) {} - FeatureNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorFeatureNotPresent ), message ) {} - }; - - class IncompatibleDriverError : public SystemError - { - public: - IncompatibleDriverError( std::string const & message ) : SystemError( make_error_code( Result::eErrorIncompatibleDriver ), message ) {} - IncompatibleDriverError( char const * message ) : SystemError( make_error_code( Result::eErrorIncompatibleDriver ), message ) {} - }; - - class TooManyObjectsError : public SystemError - { - public: - TooManyObjectsError( std::string const & message ) : SystemError( make_error_code( Result::eErrorTooManyObjects ), message ) {} - TooManyObjectsError( char const * message ) : SystemError( make_error_code( Result::eErrorTooManyObjects ), message ) {} - }; - - class FormatNotSupportedError : public SystemError - { - public: - FormatNotSupportedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFormatNotSupported ), message ) {} - FormatNotSupportedError( char const * message ) : SystemError( make_error_code( Result::eErrorFormatNotSupported ), message ) {} - }; - - class FragmentedPoolError : public SystemError - { - public: - FragmentedPoolError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFragmentedPool ), message ) {} - FragmentedPoolError( char const * message ) : SystemError( make_error_code( Result::eErrorFragmentedPool ), message ) {} - }; - - class UnknownError : public SystemError - { - public: - UnknownError( std::string const & message ) : SystemError( make_error_code( Result::eErrorUnknown ), message ) {} - UnknownError( char const * message ) : SystemError( make_error_code( Result::eErrorUnknown ), message ) {} - }; - - class OutOfPoolMemoryError : public SystemError - { - public: - OutOfPoolMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfPoolMemory ), message ) {} - OutOfPoolMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfPoolMemory ), message ) {} - }; - - class InvalidExternalHandleError : public SystemError - { - public: - InvalidExternalHandleError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidExternalHandle ), message ) {} - InvalidExternalHandleError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidExternalHandle ), message ) {} - }; - - class FragmentationError : public SystemError - { - public: - FragmentationError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFragmentation ), message ) {} - FragmentationError( char const * message ) : SystemError( make_error_code( Result::eErrorFragmentation ), message ) {} - }; - - class InvalidOpaqueCaptureAddressError : public SystemError - { - public: - InvalidOpaqueCaptureAddressError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidOpaqueCaptureAddress ), message ) {} - InvalidOpaqueCaptureAddressError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidOpaqueCaptureAddress ), message ) {} - }; - - class SurfaceLostKHRError : public SystemError - { - public: - SurfaceLostKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorSurfaceLostKHR ), message ) {} - SurfaceLostKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorSurfaceLostKHR ), message ) {} - }; - - class NativeWindowInUseKHRError : public SystemError - { - public: - NativeWindowInUseKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorNativeWindowInUseKHR ), message ) {} - NativeWindowInUseKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorNativeWindowInUseKHR ), message ) {} - }; - - class OutOfDateKHRError : public SystemError - { - public: - OutOfDateKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfDateKHR ), message ) {} - OutOfDateKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfDateKHR ), message ) {} - }; - - class IncompatibleDisplayKHRError : public SystemError - { - public: - IncompatibleDisplayKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorIncompatibleDisplayKHR ), message ) {} - IncompatibleDisplayKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorIncompatibleDisplayKHR ), message ) {} - }; - - class ValidationFailedEXTError : public SystemError - { - public: - ValidationFailedEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorValidationFailedEXT ), message ) {} - ValidationFailedEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorValidationFailedEXT ), message ) {} - }; - - class InvalidShaderNVError : public SystemError - { - public: - InvalidShaderNVError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidShaderNV ), message ) {} - InvalidShaderNVError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidShaderNV ), message ) {} - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class ImageUsageNotSupportedKHRError : public SystemError - { - public: - ImageUsageNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorImageUsageNotSupportedKHR ), message ) {} - ImageUsageNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorImageUsageNotSupportedKHR ), message ) {} - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoPictureLayoutNotSupportedKHRError : public SystemError - { - public: - VideoPictureLayoutNotSupportedKHRError( std::string const & message ) - : SystemError( make_error_code( Result::eErrorVideoPictureLayoutNotSupportedKHR ), message ) - { - } - VideoPictureLayoutNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoPictureLayoutNotSupportedKHR ), message ) - { - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoProfileOperationNotSupportedKHRError : public SystemError - { - public: - VideoProfileOperationNotSupportedKHRError( std::string const & message ) - : SystemError( make_error_code( Result::eErrorVideoProfileOperationNotSupportedKHR ), message ) - { - } - VideoProfileOperationNotSupportedKHRError( char const * message ) - : SystemError( make_error_code( Result::eErrorVideoProfileOperationNotSupportedKHR ), message ) - { - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoProfileFormatNotSupportedKHRError : public SystemError - { - public: - VideoProfileFormatNotSupportedKHRError( std::string const & message ) - : SystemError( make_error_code( Result::eErrorVideoProfileFormatNotSupportedKHR ), message ) - { - } - VideoProfileFormatNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoProfileFormatNotSupportedKHR ), message ) - { - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoProfileCodecNotSupportedKHRError : public SystemError - { - public: - VideoProfileCodecNotSupportedKHRError( std::string const & message ) - : SystemError( make_error_code( Result::eErrorVideoProfileCodecNotSupportedKHR ), message ) - { - } - VideoProfileCodecNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoProfileCodecNotSupportedKHR ), message ) {} - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoStdVersionNotSupportedKHRError : public SystemError - { - public: - VideoStdVersionNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoStdVersionNotSupportedKHR ), message ) - { - } - VideoStdVersionNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoStdVersionNotSupportedKHR ), message ) {} - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - class InvalidDrmFormatModifierPlaneLayoutEXTError : public SystemError - { - public: - InvalidDrmFormatModifierPlaneLayoutEXTError( std::string const & message ) - : SystemError( make_error_code( Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT ), message ) - { - } - InvalidDrmFormatModifierPlaneLayoutEXTError( char const * message ) - : SystemError( make_error_code( Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT ), message ) - { - } - }; - - class NotPermittedKHRError : public SystemError - { - public: - NotPermittedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorNotPermittedKHR ), message ) {} - NotPermittedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorNotPermittedKHR ), message ) {} - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - class FullScreenExclusiveModeLostEXTError : public SystemError - { - public: - FullScreenExclusiveModeLostEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFullScreenExclusiveModeLostEXT ), message ) - { - } - FullScreenExclusiveModeLostEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorFullScreenExclusiveModeLostEXT ), message ) {} - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - class CompressionExhaustedEXTError : public SystemError - { - public: - CompressionExhaustedEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorCompressionExhaustedEXT ), message ) {} - CompressionExhaustedEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorCompressionExhaustedEXT ), message ) {} - }; - - namespace - { - [[noreturn]] void throwResultException( Result result, char const * message ) - { - switch ( result ) - { - case Result::eErrorOutOfHostMemory: throw OutOfHostMemoryError( message ); - case Result::eErrorOutOfDeviceMemory: throw OutOfDeviceMemoryError( message ); - case Result::eErrorInitializationFailed: throw InitializationFailedError( message ); - case Result::eErrorDeviceLost: throw DeviceLostError( message ); - case Result::eErrorMemoryMapFailed: throw MemoryMapFailedError( message ); - case Result::eErrorLayerNotPresent: throw LayerNotPresentError( message ); - case Result::eErrorExtensionNotPresent: throw ExtensionNotPresentError( message ); - case Result::eErrorFeatureNotPresent: throw FeatureNotPresentError( message ); - case Result::eErrorIncompatibleDriver: throw IncompatibleDriverError( message ); - case Result::eErrorTooManyObjects: throw TooManyObjectsError( message ); - case Result::eErrorFormatNotSupported: throw FormatNotSupportedError( message ); - case Result::eErrorFragmentedPool: throw FragmentedPoolError( message ); - case Result::eErrorUnknown: throw UnknownError( message ); - case Result::eErrorOutOfPoolMemory: throw OutOfPoolMemoryError( message ); - case Result::eErrorInvalidExternalHandle: throw InvalidExternalHandleError( message ); - case Result::eErrorFragmentation: throw FragmentationError( message ); - case Result::eErrorInvalidOpaqueCaptureAddress: throw InvalidOpaqueCaptureAddressError( message ); - case Result::eErrorSurfaceLostKHR: throw SurfaceLostKHRError( message ); - case Result::eErrorNativeWindowInUseKHR: throw NativeWindowInUseKHRError( message ); - case Result::eErrorOutOfDateKHR: throw OutOfDateKHRError( message ); - case Result::eErrorIncompatibleDisplayKHR: throw IncompatibleDisplayKHRError( message ); - case Result::eErrorValidationFailedEXT: throw ValidationFailedEXTError( message ); - case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError( message ); -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorImageUsageNotSupportedKHR: throw ImageUsageNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorVideoPictureLayoutNotSupportedKHR: throw VideoPictureLayoutNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorVideoProfileOperationNotSupportedKHR: throw VideoProfileOperationNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorVideoProfileFormatNotSupportedKHR: throw VideoProfileFormatNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorVideoProfileCodecNotSupportedKHR: throw VideoProfileCodecNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorVideoStdVersionNotSupportedKHR: throw VideoStdVersionNotSupportedKHRError( message ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: throw InvalidDrmFormatModifierPlaneLayoutEXTError( message ); - case Result::eErrorNotPermittedKHR: throw NotPermittedKHRError( message ); -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - case Result::eErrorFullScreenExclusiveModeLostEXT: throw FullScreenExclusiveModeLostEXTError( message ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case Result::eErrorCompressionExhaustedEXT: throw CompressionExhaustedEXTError( message ); - default: throw SystemError( make_error_code( result ) ); - } - } - } // namespace -#endif - - template - void ignore( T const & ) VULKAN_HPP_NOEXCEPT - { - } - - template - struct ResultValue - { -#ifdef VULKAN_HPP_HAS_NOEXCEPT - ResultValue( Result r, T & v ) VULKAN_HPP_NOEXCEPT( VULKAN_HPP_NOEXCEPT( T( v ) ) ) -#else - ResultValue( Result r, T & v ) -#endif - : result( r ), value( v ) - { - } - -#ifdef VULKAN_HPP_HAS_NOEXCEPT - ResultValue( Result r, T && v ) VULKAN_HPP_NOEXCEPT( VULKAN_HPP_NOEXCEPT( T( std::move( v ) ) ) ) -#else - ResultValue( Result r, T && v ) -#endif - : result( r ), value( std::move( v ) ) - { - } - - Result result; - T value; - - operator std::tuple() VULKAN_HPP_NOEXCEPT - { - return std::tuple( result, value ); - } - }; - -#if !defined( VULKAN_HPP_NO_SMART_HANDLE ) - template - struct ResultValue> - { -# ifdef VULKAN_HPP_HAS_NOEXCEPT - ResultValue( Result r, UniqueHandle && v ) VULKAN_HPP_NOEXCEPT -# else - ResultValue( Result r, UniqueHandle && v ) -# endif - : result( r ) - , value( std::move( v ) ) - { - } - - std::tuple> asTuple() - { - return std::make_tuple( result, std::move( value ) ); - } - - Result result; - UniqueHandle value; - }; - - template - struct ResultValue>> - { -# ifdef VULKAN_HPP_HAS_NOEXCEPT - ResultValue( Result r, std::vector> && v ) VULKAN_HPP_NOEXCEPT -# else - ResultValue( Result r, std::vector> && v ) -# endif - : result( r ) - , value( std::move( v ) ) - { - } - - std::tuple>> asTuple() - { - return std::make_tuple( result, std::move( value ) ); - } - - Result result; - std::vector> value; - }; -#endif - - template - struct ResultValueType - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - typedef ResultValue type; -#else - typedef T type; -#endif - }; - - template <> - struct ResultValueType - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - typedef Result type; -#else - typedef void type; -#endif - }; - - VULKAN_HPP_INLINE typename ResultValueType::type createResultValueType( Result result ) - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - return result; -#else - ignore( result ); -#endif - } - - template - VULKAN_HPP_INLINE typename ResultValueType::type createResultValueType( Result result, T & data ) - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - return ResultValue( result, data ); -#else - ignore( result ); - return data; -#endif - } - - template - VULKAN_HPP_INLINE typename ResultValueType::type createResultValueType( Result result, T && data ) - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - return ResultValue( result, std::move( data ) ); -#else - ignore( result ); - return std::move( data ); -#endif - } - - VULKAN_HPP_INLINE void resultCheck( Result result, char const * message ) - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - ignore( message ); - VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); -#else - if ( result != Result::eSuccess ) - { - throwResultException( result, message ); - } -#endif - } - - VULKAN_HPP_INLINE void resultCheck( Result result, char const * message, std::initializer_list successCodes ) - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - ignore( message ); - ignore( successCodes ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); -#else - if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) - { - throwResultException( result, message ); - } -#endif - } -} // namespace VULKAN_HPP_NAMESPACE - -// clang-format off -#include -#include -#include -// clang-format on - -namespace VULKAN_HPP_NAMESPACE -{ -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - - //======================= - //=== STRUCTS EXTENDS === - //======================= - - //=== VK_VERSION_1_0 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_VERSION_1_1 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_VERSION_1_2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_VERSION_1_3 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_swapchain === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_display_swapchain === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_debug_report === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_rasterization_order === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_dedicated_allocation === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_transform_feedback === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_AMD_texture_gather_bias_lod === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_dynamic_rendering === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_corner_sampled_image === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_external_memory === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_win32_keyed_mutex === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_validation_flags === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_astc_decode_mode === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_pipeline_robustness === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_keyed_mutex === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_push_descriptor === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_conditional_rendering === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_incremental_present === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_clip_space_w_scaling === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_display_control === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_GOOGLE_display_timing === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NVX_multiview_per_view_attributes === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_viewport_swizzle === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_discard_rectangles === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_conservative_rasterization === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_depth_clip_enable === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_shared_presentable_image === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_performance_query === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_debug_utils === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_blend_operation_advanced === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_fragment_coverage_to_color === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_acceleration_structure === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_framebuffer_mixed_samples === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_shader_sm_builtins === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_image_drm_format_modifier === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_validation_cache === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_portability_subset === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_shading_rate_image === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_ray_tracing === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_representative_fragment_test === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_filter_cubic === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_external_memory_host === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_shader_clock === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_pipeline_compiler_control === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_shader_core_properties === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h265 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_KHR_global_priority === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_memory_overallocation_behavior === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_vertex_attribute_divisor === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_frame_token === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_compute_shader_derivatives === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_mesh_shader === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_shader_image_footprint === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_scissor_exclusive === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_device_diagnostic_checkpoints === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_INTEL_shader_integer_functions2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_INTEL_performance_query === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_pci_bus_info === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_display_native_hdr === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_fragment_density_map === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_fragment_shading_rate === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_shader_core_properties2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_device_coherent_memory === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_shader_image_atomic_int64 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_memory_budget === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_memory_priority === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_surface_protected_capabilities === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_dedicated_allocation_image_aliasing === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_buffer_device_address === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_validation_features === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_present_wait === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_cooperative_matrix === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_coverage_reduction_mode === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_fragment_shader_interlock === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_ycbcr_image_arrays === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_provoking_vertex === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_line_rasterization === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_shader_atomic_float === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_index_type_uint8 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_extended_dynamic_state === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_pipeline_executable_properties === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_shader_atomic_float2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_device_generated_commands === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_inherited_viewport_scissor === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_texel_buffer_alignment === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_QCOM_render_pass_transform === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_device_memory_report === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_robustness2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_custom_border_color === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_pipeline_library === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_present_id === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_graphics_pipeline_library === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_AMD_shader_early_and_late_fragment_tests === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_fragment_shader_barycentric === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_shader_subgroup_uniform_control_flow === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_fragment_shading_rate_enums === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_ray_tracing_motion_blur === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_mesh_shader === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_ycbcr_2plane_444_formats === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_fragment_density_map2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_QCOM_rotated_copy_commands === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_workgroup_memory_explicit_layout === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_image_compression_control === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_attachment_feedback_loop_layout === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_4444_formats === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_rgba10x6_formats === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_ray_tracing_pipeline === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_ray_query === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_VALVE_mutable_descriptor_type === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_vertex_input_dynamic_state === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_physical_device_drm === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_depth_clip_control === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_primitive_topology_list_restart === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_HUAWEI_invocation_mask === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_external_memory_rdma === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_pipeline_properties === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_multisampled_render_to_single_sampled === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_extended_dynamic_state2 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_color_write_enable === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_primitives_generated_query === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_KHR_ray_tracing_maintenance1 === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_image_view_min_lod === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_multi_draw === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_image_2d_view_of_3d === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_border_color_swizzle === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_pageable_device_local_memory === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_VALVE_descriptor_set_host_mapping === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_depth_clamp_zero_one === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_non_seamless_cube_map === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_QCOM_fragment_density_map_offset === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_NV_linear_color_attachment === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_image_compression_control_swapchain === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_QCOM_image_processing === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_subpass_merge_feedback === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_shader_module_identifier === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_rasterization_order_attachment_access === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_EXT_legacy_dithering === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_QCOM_tile_properties === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - - //=== VK_SEC_amigo_profiling === - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - -#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE - -#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - class DynamicLoader - { - public: -# ifdef VULKAN_HPP_NO_EXCEPTIONS - DynamicLoader( std::string const & vulkanLibraryName = {} ) VULKAN_HPP_NOEXCEPT -# else - DynamicLoader( std::string const & vulkanLibraryName = {} ) -# endif - { - if ( !vulkanLibraryName.empty() ) - { -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) - m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL ); -# elif defined( _WIN32 ) - m_library = ::LoadLibraryA( vulkanLibraryName.c_str() ); -# else -# error unsupported platform -# endif - } - else - { -# if defined( __unix__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) - m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL ); - if ( m_library == nullptr ) - { - m_library = dlopen( "libvulkan.so.1", RTLD_NOW | RTLD_LOCAL ); - } -# elif defined( __APPLE__ ) - m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); -# elif defined( _WIN32 ) - m_library = ::LoadLibraryA( "vulkan-1.dll" ); -# else -# error unsupported platform -# endif - } - -# ifndef VULKAN_HPP_NO_EXCEPTIONS - if ( m_library == nullptr ) - { - // NOTE there should be an InitializationFailedError, but msvc insists on the symbol does not exist within the scope of this function. - throw std::runtime_error( "Failed to load vulkan library!" ); - } -# endif - } - - DynamicLoader( DynamicLoader const & ) = delete; - - DynamicLoader( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT : m_library( other.m_library ) - { - other.m_library = nullptr; - } - - DynamicLoader & operator=( DynamicLoader const & ) = delete; - - DynamicLoader & operator=( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_library, other.m_library ); - return *this; - } - - ~DynamicLoader() VULKAN_HPP_NOEXCEPT - { - if ( m_library ) - { -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) - dlclose( m_library ); -# elif defined( _WIN32 ) - ::FreeLibrary( m_library ); -# else -# error unsupported platform -# endif - } - } - - template - T getProcAddress( const char * function ) const VULKAN_HPP_NOEXCEPT - { -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) - return (T)dlsym( m_library, function ); -# elif defined( _WIN32 ) - return ( T )::GetProcAddress( m_library, function ); -# else -# error unsupported platform -# endif - } - - bool success() const VULKAN_HPP_NOEXCEPT - { - return m_library != nullptr; - } - - private: -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNXNTO__ ) || defined( __Fuchsia__ ) - void * m_library; -# elif defined( _WIN32 ) - ::HINSTANCE m_library; -# else -# error unsupported platform -# endif - }; -#endif - - using PFN_dummy = void ( * )(); - - class DispatchLoaderDynamic : public DispatchLoaderBase - { - public: - //=== VK_VERSION_1_0 === - PFN_vkCreateInstance vkCreateInstance = 0; - PFN_vkDestroyInstance vkDestroyInstance = 0; - PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0; - PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0; - PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0; - PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0; - PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0; - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; - PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; - PFN_vkCreateDevice vkCreateDevice = 0; - PFN_vkDestroyDevice vkDestroyDevice = 0; - PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0; - PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0; - PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0; - PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0; - PFN_vkGetDeviceQueue vkGetDeviceQueue = 0; - PFN_vkQueueSubmit vkQueueSubmit = 0; - PFN_vkQueueWaitIdle vkQueueWaitIdle = 0; - PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0; - PFN_vkAllocateMemory vkAllocateMemory = 0; - PFN_vkFreeMemory vkFreeMemory = 0; - PFN_vkMapMemory vkMapMemory = 0; - PFN_vkUnmapMemory vkUnmapMemory = 0; - PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0; - PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0; - PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0; - PFN_vkBindBufferMemory vkBindBufferMemory = 0; - PFN_vkBindImageMemory vkBindImageMemory = 0; - PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0; - PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0; - PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0; - PFN_vkQueueBindSparse vkQueueBindSparse = 0; - PFN_vkCreateFence vkCreateFence = 0; - PFN_vkDestroyFence vkDestroyFence = 0; - PFN_vkResetFences vkResetFences = 0; - PFN_vkGetFenceStatus vkGetFenceStatus = 0; - PFN_vkWaitForFences vkWaitForFences = 0; - PFN_vkCreateSemaphore vkCreateSemaphore = 0; - PFN_vkDestroySemaphore vkDestroySemaphore = 0; - PFN_vkCreateEvent vkCreateEvent = 0; - PFN_vkDestroyEvent vkDestroyEvent = 0; - PFN_vkGetEventStatus vkGetEventStatus = 0; - PFN_vkSetEvent vkSetEvent = 0; - PFN_vkResetEvent vkResetEvent = 0; - PFN_vkCreateQueryPool vkCreateQueryPool = 0; - PFN_vkDestroyQueryPool vkDestroyQueryPool = 0; - PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0; - PFN_vkCreateBuffer vkCreateBuffer = 0; - PFN_vkDestroyBuffer vkDestroyBuffer = 0; - PFN_vkCreateBufferView vkCreateBufferView = 0; - PFN_vkDestroyBufferView vkDestroyBufferView = 0; - PFN_vkCreateImage vkCreateImage = 0; - PFN_vkDestroyImage vkDestroyImage = 0; - PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0; - PFN_vkCreateImageView vkCreateImageView = 0; - PFN_vkDestroyImageView vkDestroyImageView = 0; - PFN_vkCreateShaderModule vkCreateShaderModule = 0; - PFN_vkDestroyShaderModule vkDestroyShaderModule = 0; - PFN_vkCreatePipelineCache vkCreatePipelineCache = 0; - PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0; - PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0; - PFN_vkMergePipelineCaches vkMergePipelineCaches = 0; - PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0; - PFN_vkCreateComputePipelines vkCreateComputePipelines = 0; - PFN_vkDestroyPipeline vkDestroyPipeline = 0; - PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0; - PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0; - PFN_vkCreateSampler vkCreateSampler = 0; - PFN_vkDestroySampler vkDestroySampler = 0; - PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0; - PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0; - PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0; - PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0; - PFN_vkResetDescriptorPool vkResetDescriptorPool = 0; - PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0; - PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0; - PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0; - PFN_vkCreateFramebuffer vkCreateFramebuffer = 0; - PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0; - PFN_vkCreateRenderPass vkCreateRenderPass = 0; - PFN_vkDestroyRenderPass vkDestroyRenderPass = 0; - PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0; - PFN_vkCreateCommandPool vkCreateCommandPool = 0; - PFN_vkDestroyCommandPool vkDestroyCommandPool = 0; - PFN_vkResetCommandPool vkResetCommandPool = 0; - PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0; - PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0; - PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0; - PFN_vkEndCommandBuffer vkEndCommandBuffer = 0; - PFN_vkResetCommandBuffer vkResetCommandBuffer = 0; - PFN_vkCmdBindPipeline vkCmdBindPipeline = 0; - PFN_vkCmdSetViewport vkCmdSetViewport = 0; - PFN_vkCmdSetScissor vkCmdSetScissor = 0; - PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0; - PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0; - PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0; - PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0; - PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0; - PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0; - PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0; - PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0; - PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0; - PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0; - PFN_vkCmdDraw vkCmdDraw = 0; - PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0; - PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0; - PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0; - PFN_vkCmdDispatch vkCmdDispatch = 0; - PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0; - PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0; - PFN_vkCmdCopyImage vkCmdCopyImage = 0; - PFN_vkCmdBlitImage vkCmdBlitImage = 0; - PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0; - PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0; - PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0; - PFN_vkCmdFillBuffer vkCmdFillBuffer = 0; - PFN_vkCmdClearColorImage vkCmdClearColorImage = 0; - PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0; - PFN_vkCmdClearAttachments vkCmdClearAttachments = 0; - PFN_vkCmdResolveImage vkCmdResolveImage = 0; - PFN_vkCmdSetEvent vkCmdSetEvent = 0; - PFN_vkCmdResetEvent vkCmdResetEvent = 0; - PFN_vkCmdWaitEvents vkCmdWaitEvents = 0; - PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0; - PFN_vkCmdBeginQuery vkCmdBeginQuery = 0; - PFN_vkCmdEndQuery vkCmdEndQuery = 0; - PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0; - PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0; - PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0; - PFN_vkCmdPushConstants vkCmdPushConstants = 0; - PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0; - PFN_vkCmdNextSubpass vkCmdNextSubpass = 0; - PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0; - PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0; - - //=== VK_VERSION_1_1 === - PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0; - PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0; - PFN_vkBindImageMemory2 vkBindImageMemory2 = 0; - PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0; - PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0; - PFN_vkCmdDispatchBase vkCmdDispatchBase = 0; - PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0; - PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0; - PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0; - PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0; - PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0; - PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0; - PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0; - PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0; - PFN_vkTrimCommandPool vkTrimCommandPool = 0; - PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0; - PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0; - PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0; - PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0; - PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0; - PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0; - PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0; - PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0; - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0; - PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0; - - //=== VK_VERSION_1_2 === - PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0; - PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0; - PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0; - PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0; - PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0; - PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0; - PFN_vkResetQueryPool vkResetQueryPool = 0; - PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0; - PFN_vkWaitSemaphores vkWaitSemaphores = 0; - PFN_vkSignalSemaphore vkSignalSemaphore = 0; - PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0; - PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0; - PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0; - - //=== VK_VERSION_1_3 === - PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties = 0; - PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot = 0; - PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot = 0; - PFN_vkSetPrivateData vkSetPrivateData = 0; - PFN_vkGetPrivateData vkGetPrivateData = 0; - PFN_vkCmdSetEvent2 vkCmdSetEvent2 = 0; - PFN_vkCmdResetEvent2 vkCmdResetEvent2 = 0; - PFN_vkCmdWaitEvents2 vkCmdWaitEvents2 = 0; - PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2 = 0; - PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2 = 0; - PFN_vkQueueSubmit2 vkQueueSubmit2 = 0; - PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2 = 0; - PFN_vkCmdCopyImage2 vkCmdCopyImage2 = 0; - PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2 = 0; - PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2 = 0; - PFN_vkCmdBlitImage2 vkCmdBlitImage2 = 0; - PFN_vkCmdResolveImage2 vkCmdResolveImage2 = 0; - PFN_vkCmdBeginRendering vkCmdBeginRendering = 0; - PFN_vkCmdEndRendering vkCmdEndRendering = 0; - PFN_vkCmdSetCullMode vkCmdSetCullMode = 0; - PFN_vkCmdSetFrontFace vkCmdSetFrontFace = 0; - PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology = 0; - PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount = 0; - PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount = 0; - PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2 = 0; - PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable = 0; - PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable = 0; - PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp = 0; - PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable = 0; - PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable = 0; - PFN_vkCmdSetStencilOp vkCmdSetStencilOp = 0; - PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable = 0; - PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable = 0; - PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable = 0; - PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements = 0; - PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements = 0; - PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements = 0; - - //=== VK_KHR_surface === - PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0; - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0; - - //=== VK_KHR_swapchain === - PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0; - PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0; - PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0; - PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0; - PFN_vkQueuePresentKHR vkQueuePresentKHR = 0; - PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0; - PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0; - PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0; - PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0; - - //=== VK_KHR_display === - PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0; - PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0; - PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0; - PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0; - PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0; - PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0; - PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0; - - //=== VK_KHR_display_swapchain === - PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0; - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0; -#else - PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0; -#else - PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0; -#else - PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0; -#else - PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0; - PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0; -#else - PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; - PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0; - PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0; - - //=== VK_EXT_debug_marker === - PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0; - PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0; - PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0; - PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0; - PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0; - PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0; - PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0; - PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0; - PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0; - PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0; - PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0; - PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0; - PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0; - PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0; - PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0; - PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0; -#else - PFN_dummy vkGetPhysicalDeviceVideoCapabilitiesKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceVideoFormatPropertiesKHR_placeholder = 0; - PFN_dummy vkCreateVideoSessionKHR_placeholder = 0; - PFN_dummy vkDestroyVideoSessionKHR_placeholder = 0; - PFN_dummy vkGetVideoSessionMemoryRequirementsKHR_placeholder = 0; - PFN_dummy vkBindVideoSessionMemoryKHR_placeholder = 0; - PFN_dummy vkCreateVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkUpdateVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkDestroyVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkCmdBeginVideoCodingKHR_placeholder = 0; - PFN_dummy vkCmdEndVideoCodingKHR_placeholder = 0; - PFN_dummy vkCmdControlVideoCodingKHR_placeholder = 0; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0; -#else - PFN_dummy vkCmdDecodeVideoKHR_placeholder = 0; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0; - PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0; - PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0; - PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0; - PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0; - PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0; - - //=== VK_NVX_binary_import === - PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0; - PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0; - PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0; - PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0; - PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0; - - //=== VK_NVX_image_view_handle === - PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0; - PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0; - - //=== VK_AMD_draw_indirect_count === - PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0; - PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0; - - //=== VK_AMD_shader_info === - PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0; - - //=== VK_KHR_dynamic_rendering === - PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR = 0; - PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR = 0; - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0; -#else - PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0; -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0; -#else - PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_get_physical_device_properties2 === - PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0; - PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0; - PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0; - PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0; - - //=== VK_KHR_device_group === - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0; - PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0; - PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0; - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0; -#else - PFN_dummy vkCreateViSurfaceNN_placeholder = 0; -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_maintenance1 === - PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0; - - //=== VK_KHR_device_group_creation === - PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0; - - //=== VK_KHR_external_memory_capabilities === - PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0; - PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0; -#else - PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0; - PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0; - - //=== VK_KHR_external_semaphore_capabilities === - PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0; - PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0; -#else - PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0; - PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0; - - //=== VK_KHR_push_descriptor === - PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0; - PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0; - - //=== VK_EXT_conditional_rendering === - PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0; - PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0; - - //=== VK_KHR_descriptor_update_template === - PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0; - PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0; - PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0; - - //=== VK_NV_clip_space_w_scaling === - PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0; - - //=== VK_EXT_direct_mode_display === - PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0; - -#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0; - PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0; -#else - PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0; - PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0; -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0; - - //=== VK_EXT_display_control === - PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0; - PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0; - PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0; - PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0; - - //=== VK_GOOGLE_display_timing === - PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0; - PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0; - - //=== VK_EXT_discard_rectangles === - PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0; - - //=== VK_EXT_hdr_metadata === - PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0; - - //=== VK_KHR_create_renderpass2 === - PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0; - PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0; - PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0; - PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0; - - //=== VK_KHR_shared_presentable_image === - PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0; - - //=== VK_KHR_external_fence_capabilities === - PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0; - PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0; -#else - PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0; - PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0; - - //=== VK_KHR_performance_query === - PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0; - PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0; - PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0; - PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0; - - //=== VK_KHR_get_surface_capabilities2 === - PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0; - PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0; - - //=== VK_KHR_get_display_properties2 === - PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0; - PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0; - PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0; - PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0; - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0; -#else - PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0; -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0; -#else - PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0; -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0; - PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0; - PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0; - PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0; - PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0; - PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0; - PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0; - PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0; - PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0; - PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0; - PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0; - PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0; -#else - PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0; - PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0; - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0; - - //=== VK_KHR_get_memory_requirements2 === - PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0; - PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0; - PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0; - - //=== VK_KHR_acceleration_structure === - PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0; - PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0; - PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0; - PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0; - PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0; - PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0; - PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0; - PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0; - PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0; - PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0; - PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0; - PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0; - PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0; - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0; - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0; - PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0; - - //=== VK_KHR_sampler_ycbcr_conversion === - PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0; - PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0; - - //=== VK_KHR_bind_memory2 === - PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0; - PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0; - - //=== VK_EXT_image_drm_format_modifier === - PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0; - - //=== VK_EXT_validation_cache === - PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0; - PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0; - PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0; - PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0; - - //=== VK_NV_shading_rate_image === - PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0; - PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0; - PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0; - - //=== VK_NV_ray_tracing === - PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0; - PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0; - PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0; - PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0; - PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0; - PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0; - PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0; - PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0; - PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0; - PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0; - PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0; - PFN_vkCompileDeferredNV vkCompileDeferredNV = 0; - - //=== VK_KHR_maintenance3 === - PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0; - - //=== VK_KHR_draw_indirect_count === - PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0; - PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0; - - //=== VK_EXT_external_memory_host === - PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0; - - //=== VK_AMD_buffer_marker === - PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0; - - //=== VK_EXT_calibrated_timestamps === - PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0; - PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0; - - //=== VK_NV_mesh_shader === - PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0; - PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0; - PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0; - - //=== VK_NV_scissor_exclusive === - PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0; - - //=== VK_NV_device_diagnostic_checkpoints === - PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0; - PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0; - - //=== VK_KHR_timeline_semaphore === - PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0; - PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0; - PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0; - - //=== VK_INTEL_performance_query === - PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0; - PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0; - PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0; - PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0; - PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0; - PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0; - PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0; - PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0; - PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0; - - //=== VK_AMD_display_native_hdr === - PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0; -#else - PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0; -#else - PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0; - PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0; - - //=== VK_EXT_buffer_device_address === - PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0; - - //=== VK_EXT_tooling_info === - PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0; - - //=== VK_KHR_present_wait === - PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0; - - //=== VK_NV_cooperative_matrix === - PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0; - - //=== VK_NV_coverage_reduction_mode === - PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0; - PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0; - PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0; - PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0; -#else - PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0; - PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0; - PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0; - PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0; - - //=== VK_KHR_buffer_device_address === - PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0; - PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0; - PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0; - - //=== VK_EXT_line_rasterization === - PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0; - - //=== VK_EXT_host_query_reset === - PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0; - - //=== VK_EXT_extended_dynamic_state === - PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0; - PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0; - PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0; - PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0; - PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0; - PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0; - PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0; - PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0; - PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0; - PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0; - PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0; - PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0; - - //=== VK_KHR_deferred_host_operations === - PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0; - PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0; - PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0; - PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0; - PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0; - - //=== VK_KHR_pipeline_executable_properties === - PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0; - PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0; - PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0; - - //=== VK_NV_device_generated_commands === - PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0; - PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0; - PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0; - PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0; - PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0; - PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0; - - //=== VK_EXT_acquire_drm_display === - PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0; - PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0; - - //=== VK_EXT_private_data === - PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0; - PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0; - PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0; - PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0; -#else - PFN_dummy vkCmdEncodeVideoKHR_placeholder = 0; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT = 0; -#else - PFN_dummy vkExportMetalObjectsEXT_placeholder = 0; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0; - PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0; - PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0; - PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0; - PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0; - PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0; - PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0; - PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0; - - //=== VK_NV_fragment_shading_rate_enums === - PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0; - - //=== VK_EXT_mesh_shader === - PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT = 0; - PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT = 0; - PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT = 0; - - //=== VK_KHR_copy_commands2 === - PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0; - PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0; - PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0; - PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0; - PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0; - PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0; - - //=== VK_EXT_image_compression_control === - PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT = 0; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0; - PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0; -#else - PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0; - PFN_dummy vkGetWinrtDisplayNV_placeholder = 0; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0; - PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0; -#else - PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0; -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0; - PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0; - PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0; - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0; - PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0; - PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0; - PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0; - - //=== VK_EXT_vertex_input_dynamic_state === - PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0; - PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0; -#else - PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0; - PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0; - PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0; -#else - PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0; - PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA = 0; - PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA = 0; - PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA = 0; - PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA = 0; - PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA = 0; -#else - PFN_dummy vkCreateBufferCollectionFUCHSIA_placeholder = 0; - PFN_dummy vkSetBufferCollectionImageConstraintsFUCHSIA_placeholder = 0; - PFN_dummy vkSetBufferCollectionBufferConstraintsFUCHSIA_placeholder = 0; - PFN_dummy vkDestroyBufferCollectionFUCHSIA_placeholder = 0; - PFN_dummy vkGetBufferCollectionPropertiesFUCHSIA_placeholder = 0; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0; - PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0; - - //=== VK_HUAWEI_invocation_mask === - PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0; - - //=== VK_NV_external_memory_rdma === - PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0; - - //=== VK_EXT_pipeline_properties === - PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT = 0; - - //=== VK_EXT_extended_dynamic_state2 === - PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0; - PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0; - PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0; - PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0; - PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0; - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0; - PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0; -#else - PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0; -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0; - - //=== VK_KHR_ray_tracing_maintenance1 === - PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR = 0; - - //=== VK_EXT_multi_draw === - PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0; - PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0; - - //=== VK_EXT_pageable_device_local_memory === - PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT = 0; - - //=== VK_KHR_maintenance4 === - PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR = 0; - PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR = 0; - PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR = 0; - - //=== VK_VALVE_descriptor_set_host_mapping === - PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE = 0; - PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE = 0; - - //=== VK_EXT_shader_module_identifier === - PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT = 0; - PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT = 0; - - //=== VK_QCOM_tile_properties === - PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM = 0; - PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM = 0; - - public: - DispatchLoaderDynamic() VULKAN_HPP_NOEXCEPT = default; - DispatchLoaderDynamic( DispatchLoaderDynamic const & rhs ) VULKAN_HPP_NOEXCEPT = default; - -#if !defined( VK_NO_PROTOTYPES ) - // This interface is designed to be used for per-device function pointers in combination with a linked vulkan library. - template - void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl ) VULKAN_HPP_NOEXCEPT - { - PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress( "vkGetInstanceProcAddr" ); - PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress( "vkGetDeviceProcAddr" ); - init( static_cast( instance ), getInstanceProcAddr, static_cast( device ), device ? getDeviceProcAddr : nullptr ); - } - - // This interface is designed to be used for per-device function pointers in combination with a linked vulkan library. - template - void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device ) VULKAN_HPP_NOEXCEPT - { - static DynamicLoader dl; - init( instance, device, dl ); - } -#endif // !defined( VK_NO_PROTOTYPES ) - - DispatchLoaderDynamic( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) VULKAN_HPP_NOEXCEPT - { - init( getInstanceProcAddr ); - } - - void init( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getInstanceProcAddr ); - - vkGetInstanceProcAddr = getInstanceProcAddr; - - //=== VK_VERSION_1_0 === - vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( NULL, "vkCreateInstance" ) ); - vkEnumerateInstanceExtensionProperties = - PFN_vkEnumerateInstanceExtensionProperties( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) ); - vkEnumerateInstanceLayerProperties = PFN_vkEnumerateInstanceLayerProperties( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) ); - - //=== VK_VERSION_1_1 === - vkEnumerateInstanceVersion = PFN_vkEnumerateInstanceVersion( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceVersion" ) ); - } - - // This interface does not require a linked vulkan library. - DispatchLoaderDynamic( VkInstance instance, - PFN_vkGetInstanceProcAddr getInstanceProcAddr, - VkDevice device = {}, - PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) VULKAN_HPP_NOEXCEPT - { - init( instance, getInstanceProcAddr, device, getDeviceProcAddr ); - } - - // This interface does not require a linked vulkan library. - void init( VkInstance instance, - PFN_vkGetInstanceProcAddr getInstanceProcAddr, - VkDevice device = {}, - PFN_vkGetDeviceProcAddr /*getDeviceProcAddr*/ = nullptr ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( instance && getInstanceProcAddr ); - vkGetInstanceProcAddr = getInstanceProcAddr; - init( VULKAN_HPP_NAMESPACE::Instance( instance ) ); - if ( device ) - { - init( VULKAN_HPP_NAMESPACE::Device( device ) ); - } - } - - void init( VULKAN_HPP_NAMESPACE::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT - { - VkInstance instance = static_cast( instanceCpp ); - - //=== VK_VERSION_1_0 === - vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) ); - vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) ); - vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) ); - vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) ); - vkGetPhysicalDeviceImageFormatProperties = - PFN_vkGetPhysicalDeviceImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) ); - vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) ); - vkGetPhysicalDeviceQueueFamilyProperties = - PFN_vkGetPhysicalDeviceQueueFamilyProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) ); - vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) ); - vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) ); - vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) ); - vkDestroyDevice = PFN_vkDestroyDevice( vkGetInstanceProcAddr( instance, "vkDestroyDevice" ) ); - vkEnumerateDeviceExtensionProperties = - PFN_vkEnumerateDeviceExtensionProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) ); - vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) ); - vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue" ) ); - vkQueueSubmit = PFN_vkQueueSubmit( vkGetInstanceProcAddr( instance, "vkQueueSubmit" ) ); - vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) ); - vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetInstanceProcAddr( instance, "vkDeviceWaitIdle" ) ); - vkAllocateMemory = PFN_vkAllocateMemory( vkGetInstanceProcAddr( instance, "vkAllocateMemory" ) ); - vkFreeMemory = PFN_vkFreeMemory( vkGetInstanceProcAddr( instance, "vkFreeMemory" ) ); - vkMapMemory = PFN_vkMapMemory( vkGetInstanceProcAddr( instance, "vkMapMemory" ) ); - vkUnmapMemory = PFN_vkUnmapMemory( vkGetInstanceProcAddr( instance, "vkUnmapMemory" ) ); - vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkFlushMappedMemoryRanges" ) ); - vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkInvalidateMappedMemoryRanges" ) ); - vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryCommitment" ) ); - vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetInstanceProcAddr( instance, "vkBindBufferMemory" ) ); - vkBindImageMemory = PFN_vkBindImageMemory( vkGetInstanceProcAddr( instance, "vkBindImageMemory" ) ); - vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements" ) ); - vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements" ) ); - vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements" ) ); - vkGetPhysicalDeviceSparseImageFormatProperties = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) ); - vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetInstanceProcAddr( instance, "vkQueueBindSparse" ) ); - vkCreateFence = PFN_vkCreateFence( vkGetInstanceProcAddr( instance, "vkCreateFence" ) ); - vkDestroyFence = PFN_vkDestroyFence( vkGetInstanceProcAddr( instance, "vkDestroyFence" ) ); - vkResetFences = PFN_vkResetFences( vkGetInstanceProcAddr( instance, "vkResetFences" ) ); - vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetInstanceProcAddr( instance, "vkGetFenceStatus" ) ); - vkWaitForFences = PFN_vkWaitForFences( vkGetInstanceProcAddr( instance, "vkWaitForFences" ) ); - vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetInstanceProcAddr( instance, "vkCreateSemaphore" ) ); - vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetInstanceProcAddr( instance, "vkDestroySemaphore" ) ); - vkCreateEvent = PFN_vkCreateEvent( vkGetInstanceProcAddr( instance, "vkCreateEvent" ) ); - vkDestroyEvent = PFN_vkDestroyEvent( vkGetInstanceProcAddr( instance, "vkDestroyEvent" ) ); - vkGetEventStatus = PFN_vkGetEventStatus( vkGetInstanceProcAddr( instance, "vkGetEventStatus" ) ); - vkSetEvent = PFN_vkSetEvent( vkGetInstanceProcAddr( instance, "vkSetEvent" ) ); - vkResetEvent = PFN_vkResetEvent( vkGetInstanceProcAddr( instance, "vkResetEvent" ) ); - vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetInstanceProcAddr( instance, "vkCreateQueryPool" ) ); - vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetInstanceProcAddr( instance, "vkDestroyQueryPool" ) ); - vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetInstanceProcAddr( instance, "vkGetQueryPoolResults" ) ); - vkCreateBuffer = PFN_vkCreateBuffer( vkGetInstanceProcAddr( instance, "vkCreateBuffer" ) ); - vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetInstanceProcAddr( instance, "vkDestroyBuffer" ) ); - vkCreateBufferView = PFN_vkCreateBufferView( vkGetInstanceProcAddr( instance, "vkCreateBufferView" ) ); - vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetInstanceProcAddr( instance, "vkDestroyBufferView" ) ); - vkCreateImage = PFN_vkCreateImage( vkGetInstanceProcAddr( instance, "vkCreateImage" ) ); - vkDestroyImage = PFN_vkDestroyImage( vkGetInstanceProcAddr( instance, "vkDestroyImage" ) ); - vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout" ) ); - vkCreateImageView = PFN_vkCreateImageView( vkGetInstanceProcAddr( instance, "vkCreateImageView" ) ); - vkDestroyImageView = PFN_vkDestroyImageView( vkGetInstanceProcAddr( instance, "vkDestroyImageView" ) ); - vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetInstanceProcAddr( instance, "vkCreateShaderModule" ) ); - vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetInstanceProcAddr( instance, "vkDestroyShaderModule" ) ); - vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetInstanceProcAddr( instance, "vkCreatePipelineCache" ) ); - vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetInstanceProcAddr( instance, "vkDestroyPipelineCache" ) ); - vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetInstanceProcAddr( instance, "vkGetPipelineCacheData" ) ); - vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetInstanceProcAddr( instance, "vkMergePipelineCaches" ) ); - vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetInstanceProcAddr( instance, "vkCreateGraphicsPipelines" ) ); - vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetInstanceProcAddr( instance, "vkCreateComputePipelines" ) ); - vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetInstanceProcAddr( instance, "vkDestroyPipeline" ) ); - vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetInstanceProcAddr( instance, "vkCreatePipelineLayout" ) ); - vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetInstanceProcAddr( instance, "vkDestroyPipelineLayout" ) ); - vkCreateSampler = PFN_vkCreateSampler( vkGetInstanceProcAddr( instance, "vkCreateSampler" ) ); - vkDestroySampler = PFN_vkDestroySampler( vkGetInstanceProcAddr( instance, "vkDestroySampler" ) ); - vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkCreateDescriptorSetLayout" ) ); - vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorSetLayout" ) ); - vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetInstanceProcAddr( instance, "vkCreateDescriptorPool" ) ); - vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorPool" ) ); - vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetInstanceProcAddr( instance, "vkResetDescriptorPool" ) ); - vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetInstanceProcAddr( instance, "vkAllocateDescriptorSets" ) ); - vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetInstanceProcAddr( instance, "vkFreeDescriptorSets" ) ); - vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSets" ) ); - vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetInstanceProcAddr( instance, "vkCreateFramebuffer" ) ); - vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetInstanceProcAddr( instance, "vkDestroyFramebuffer" ) ); - vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetInstanceProcAddr( instance, "vkCreateRenderPass" ) ); - vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetInstanceProcAddr( instance, "vkDestroyRenderPass" ) ); - vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderAreaGranularity" ) ); - vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetInstanceProcAddr( instance, "vkCreateCommandPool" ) ); - vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetInstanceProcAddr( instance, "vkDestroyCommandPool" ) ); - vkResetCommandPool = PFN_vkResetCommandPool( vkGetInstanceProcAddr( instance, "vkResetCommandPool" ) ); - vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetInstanceProcAddr( instance, "vkAllocateCommandBuffers" ) ); - vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetInstanceProcAddr( instance, "vkFreeCommandBuffers" ) ); - vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetInstanceProcAddr( instance, "vkBeginCommandBuffer" ) ); - vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetInstanceProcAddr( instance, "vkEndCommandBuffer" ) ); - vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetInstanceProcAddr( instance, "vkResetCommandBuffer" ) ); - vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetInstanceProcAddr( instance, "vkCmdBindPipeline" ) ); - vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetInstanceProcAddr( instance, "vkCmdSetViewport" ) ); - vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetInstanceProcAddr( instance, "vkCmdSetScissor" ) ); - vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetInstanceProcAddr( instance, "vkCmdSetLineWidth" ) ); - vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBias" ) ); - vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetInstanceProcAddr( instance, "vkCmdSetBlendConstants" ) ); - vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBounds" ) ); - vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilCompareMask" ) ); - vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilWriteMask" ) ); - vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetInstanceProcAddr( instance, "vkCmdSetStencilReference" ) ); - vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets" ) ); - vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer" ) ); - vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers" ) ); - vkCmdDraw = PFN_vkCmdDraw( vkGetInstanceProcAddr( instance, "vkCmdDraw" ) ); - vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexed" ) ); - vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirect" ) ); - vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirect" ) ); - vkCmdDispatch = PFN_vkCmdDispatch( vkGetInstanceProcAddr( instance, "vkCmdDispatch" ) ); - vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetInstanceProcAddr( instance, "vkCmdDispatchIndirect" ) ); - vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer" ) ); - vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetInstanceProcAddr( instance, "vkCmdCopyImage" ) ); - vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetInstanceProcAddr( instance, "vkCmdBlitImage" ) ); - vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage" ) ); - vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer" ) ); - vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetInstanceProcAddr( instance, "vkCmdUpdateBuffer" ) ); - vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetInstanceProcAddr( instance, "vkCmdFillBuffer" ) ); - vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetInstanceProcAddr( instance, "vkCmdClearColorImage" ) ); - vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetInstanceProcAddr( instance, "vkCmdClearDepthStencilImage" ) ); - vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetInstanceProcAddr( instance, "vkCmdClearAttachments" ) ); - vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetInstanceProcAddr( instance, "vkCmdResolveImage" ) ); - vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetInstanceProcAddr( instance, "vkCmdSetEvent" ) ); - vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetInstanceProcAddr( instance, "vkCmdResetEvent" ) ); - vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents" ) ); - vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier" ) ); - vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetInstanceProcAddr( instance, "vkCmdBeginQuery" ) ); - vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetInstanceProcAddr( instance, "vkCmdEndQuery" ) ); - vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetInstanceProcAddr( instance, "vkCmdResetQueryPool" ) ); - vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp" ) ); - vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetInstanceProcAddr( instance, "vkCmdCopyQueryPoolResults" ) ); - vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetInstanceProcAddr( instance, "vkCmdPushConstants" ) ); - vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass" ) ); - vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass" ) ); - vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass" ) ); - vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetInstanceProcAddr( instance, "vkCmdExecuteCommands" ) ); - - //=== VK_VERSION_1_1 === - vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2" ) ); - vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetInstanceProcAddr( instance, "vkBindImageMemory2" ) ); - vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeatures" ) ); - vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMask" ) ); - vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetInstanceProcAddr( instance, "vkCmdDispatchBase" ) ); - vkEnumeratePhysicalDeviceGroups = PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) ); - vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2" ) ); - vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2" ) ); - vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2" ) ); - vkGetPhysicalDeviceFeatures2 = PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) ); - vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) ); - vkGetPhysicalDeviceFormatProperties2 = - PFN_vkGetPhysicalDeviceFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) ); - vkGetPhysicalDeviceImageFormatProperties2 = - PFN_vkGetPhysicalDeviceImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) ); - vkGetPhysicalDeviceQueueFamilyProperties2 = - PFN_vkGetPhysicalDeviceQueueFamilyProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) ); - vkGetPhysicalDeviceMemoryProperties2 = - PFN_vkGetPhysicalDeviceMemoryProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) ); - vkGetPhysicalDeviceSparseImageFormatProperties2 = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) ); - vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetInstanceProcAddr( instance, "vkTrimCommandPool" ) ); - vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue2" ) ); - vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversion" ) ); - vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversion" ) ); - vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplate" ) ); - vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplate" ) ); - vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplate" ) ); - vkGetPhysicalDeviceExternalBufferProperties = - PFN_vkGetPhysicalDeviceExternalBufferProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) ); - vkGetPhysicalDeviceExternalFenceProperties = - PFN_vkGetPhysicalDeviceExternalFenceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) ); - vkGetPhysicalDeviceExternalSemaphoreProperties = - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) ); - vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupport" ) ); - - //=== VK_VERSION_1_2 === - vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCount" ) ); - vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCount" ) ); - vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2" ) ); - vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2" ) ); - vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2" ) ); - vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2" ) ); - vkResetQueryPool = PFN_vkResetQueryPool( vkGetInstanceProcAddr( instance, "vkResetQueryPool" ) ); - vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValue" ) ); - vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetInstanceProcAddr( instance, "vkWaitSemaphores" ) ); - vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetInstanceProcAddr( instance, "vkSignalSemaphore" ) ); - vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddress" ) ); - vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddress" ) ); - vkGetDeviceMemoryOpaqueCaptureAddress = - PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); - - //=== VK_VERSION_1_3 === - vkGetPhysicalDeviceToolProperties = PFN_vkGetPhysicalDeviceToolProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolProperties" ) ); - vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlot" ) ); - vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlot" ) ); - vkSetPrivateData = PFN_vkSetPrivateData( vkGetInstanceProcAddr( instance, "vkSetPrivateData" ) ); - vkGetPrivateData = PFN_vkGetPrivateData( vkGetInstanceProcAddr( instance, "vkGetPrivateData" ) ); - vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2" ) ); - vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2" ) ); - vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2" ) ); - vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2" ) ); - vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2" ) ); - vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetInstanceProcAddr( instance, "vkQueueSubmit2" ) ); - vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2" ) ); - vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2" ) ); - vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2" ) ); - vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2" ) ); - vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2" ) ); - vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2" ) ); - vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetInstanceProcAddr( instance, "vkCmdBeginRendering" ) ); - vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetInstanceProcAddr( instance, "vkCmdEndRendering" ) ); - vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetInstanceProcAddr( instance, "vkCmdSetCullMode" ) ); - vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFace" ) ); - vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopology" ) ); - vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCount" ) ); - vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCount" ) ); - vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2" ) ); - vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnable" ) ); - vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnable" ) ); - vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOp" ) ); - vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnable" ) ); - vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnable" ) ); - vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOp" ) ); - vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnable" ) ); - vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnable" ) ); - vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnable" ) ); - vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceBufferMemoryRequirements" ) ); - vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceImageMemoryRequirements" ) ); - vkGetDeviceImageSparseMemoryRequirements = - PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSparseMemoryRequirements" ) ); - - //=== VK_KHR_surface === - vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) ); - vkGetPhysicalDeviceSurfaceSupportKHR = - PFN_vkGetPhysicalDeviceSurfaceSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) ); - vkGetPhysicalDeviceSurfaceCapabilitiesKHR = - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) ); - vkGetPhysicalDeviceSurfaceFormatsKHR = - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) ); - vkGetPhysicalDeviceSurfacePresentModesKHR = - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) ); - - //=== VK_KHR_swapchain === - vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetInstanceProcAddr( instance, "vkCreateSwapchainKHR" ) ); - vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetInstanceProcAddr( instance, "vkDestroySwapchainKHR" ) ); - vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainImagesKHR" ) ); - vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImageKHR" ) ); - vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetInstanceProcAddr( instance, "vkQueuePresentKHR" ) ); - vkGetDeviceGroupPresentCapabilitiesKHR = - PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); - vkGetDeviceGroupSurfacePresentModesKHR = - PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); - vkGetPhysicalDevicePresentRectanglesKHR = - PFN_vkGetPhysicalDevicePresentRectanglesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) ); - vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImage2KHR" ) ); - - //=== VK_KHR_display === - vkGetPhysicalDeviceDisplayPropertiesKHR = - PFN_vkGetPhysicalDeviceDisplayPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) ); - vkGetPhysicalDeviceDisplayPlanePropertiesKHR = - PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) ); - vkGetDisplayPlaneSupportedDisplaysKHR = - PFN_vkGetDisplayPlaneSupportedDisplaysKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) ); - vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) ); - vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) ); - vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) ); - vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) ); - - //=== VK_KHR_display_swapchain === - vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetInstanceProcAddr( instance, "vkCreateSharedSwapchainsKHR" ) ); - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) ); - vkGetPhysicalDeviceXlibPresentationSupportKHR = - PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) ); -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) ); - vkGetPhysicalDeviceXcbPresentationSupportKHR = - PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) ); -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) ); - vkGetPhysicalDeviceWaylandPresentationSupportKHR = - PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) ); -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) ); - vkGetPhysicalDeviceWin32PresentationSupportKHR = - PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) ); - vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) ); - vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) ); - - //=== VK_EXT_debug_marker === - vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectTagEXT" ) ); - vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectNameEXT" ) ); - vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerBeginEXT" ) ); - vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerEndEXT" ) ); - vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerInsertEXT" ) ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - vkGetPhysicalDeviceVideoCapabilitiesKHR = - PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) ); - vkGetPhysicalDeviceVideoFormatPropertiesKHR = - PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) ); - vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionKHR" ) ); - vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionKHR" ) ); - vkGetVideoSessionMemoryRequirementsKHR = - PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetVideoSessionMemoryRequirementsKHR" ) ); - vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetInstanceProcAddr( instance, "vkBindVideoSessionMemoryKHR" ) ); - vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionParametersKHR" ) ); - vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkUpdateVideoSessionParametersKHR" ) ); - vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionParametersKHR" ) ); - vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdBeginVideoCodingKHR" ) ); - vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndVideoCodingKHR" ) ); - vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdControlVideoCodingKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdDecodeVideoKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - vkCmdBindTransformFeedbackBuffersEXT = - PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetInstanceProcAddr( instance, "vkCmdBindTransformFeedbackBuffersEXT" ) ); - vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginTransformFeedbackEXT" ) ); - vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdEndTransformFeedbackEXT" ) ); - vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginQueryIndexedEXT" ) ); - vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdEndQueryIndexedEXT" ) ); - vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectByteCountEXT" ) ); - - //=== VK_NVX_binary_import === - vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetInstanceProcAddr( instance, "vkCreateCuModuleNVX" ) ); - vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkCreateCuFunctionNVX" ) ); - vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuModuleNVX" ) ); - vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuFunctionNVX" ) ); - vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetInstanceProcAddr( instance, "vkCmdCuLaunchKernelNVX" ) ); - - //=== VK_NVX_image_view_handle === - vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewHandleNVX" ) ); - vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewAddressNVX" ) ); - - //=== VK_AMD_draw_indirect_count === - vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountAMD" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; - vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountAMD" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; - - //=== VK_AMD_shader_info === - vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetInstanceProcAddr( instance, "vkGetShaderInfoAMD" ) ); - - //=== VK_KHR_dynamic_rendering === - vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderingKHR" ) ); - if ( !vkCmdBeginRendering ) - vkCmdBeginRendering = vkCmdBeginRenderingKHR; - vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderingKHR" ) ); - if ( !vkCmdEndRendering ) - vkCmdEndRendering = vkCmdEndRenderingKHR; - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP( vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) ); -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - vkGetPhysicalDeviceExternalImageFormatPropertiesNV = - PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_get_physical_device_properties2 === - vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) ); - if ( !vkGetPhysicalDeviceFeatures2 ) - vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR; - vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceProperties2 ) - vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR; - vkGetPhysicalDeviceFormatProperties2KHR = - PFN_vkGetPhysicalDeviceFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceFormatProperties2 ) - vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR; - vkGetPhysicalDeviceImageFormatProperties2KHR = - PFN_vkGetPhysicalDeviceImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceImageFormatProperties2 ) - vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR; - vkGetPhysicalDeviceQueueFamilyProperties2KHR = - PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceQueueFamilyProperties2 ) - vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR; - vkGetPhysicalDeviceMemoryProperties2KHR = - PFN_vkGetPhysicalDeviceMemoryProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceMemoryProperties2 ) - vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 ) - vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR; - - //=== VK_KHR_device_group === - vkGetDeviceGroupPeerMemoryFeaturesKHR = - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); - if ( !vkGetDeviceGroupPeerMemoryFeatures ) - vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; - vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMaskKHR" ) ); - if ( !vkCmdSetDeviceMask ) - vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; - vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetInstanceProcAddr( instance, "vkCmdDispatchBaseKHR" ) ); - if ( !vkCmdDispatchBase ) - vkCmdDispatchBase = vkCmdDispatchBaseKHR; - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) ); -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_maintenance1 === - vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetInstanceProcAddr( instance, "vkTrimCommandPoolKHR" ) ); - if ( !vkTrimCommandPool ) - vkTrimCommandPool = vkTrimCommandPoolKHR; - - //=== VK_KHR_device_group_creation === - vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) ); - if ( !vkEnumeratePhysicalDeviceGroups ) - vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR; - - //=== VK_KHR_external_memory_capabilities === - vkGetPhysicalDeviceExternalBufferPropertiesKHR = - PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalBufferProperties ) - vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" ) ); - vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdKHR" ) ); - vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdPropertiesKHR" ) ); - - //=== VK_KHR_external_semaphore_capabilities === - vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = - PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalSemaphoreProperties ) - vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" ) ); - vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreFdKHR" ) ); - vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreFdKHR" ) ); - - //=== VK_KHR_push_descriptor === - vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetKHR" ) ); - vkCmdPushDescriptorSetWithTemplateKHR = - PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); - - //=== VK_EXT_conditional_rendering === - vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginConditionalRenderingEXT" ) ); - vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdEndConditionalRenderingEXT" ) ); - - //=== VK_KHR_descriptor_update_template === - vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplateKHR" ) ); - if ( !vkCreateDescriptorUpdateTemplate ) - vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; - vkDestroyDescriptorUpdateTemplateKHR = - PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplateKHR" ) ); - if ( !vkDestroyDescriptorUpdateTemplate ) - vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; - vkUpdateDescriptorSetWithTemplateKHR = - PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplateKHR" ) ); - if ( !vkUpdateDescriptorSetWithTemplate ) - vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; - - //=== VK_NV_clip_space_w_scaling === - vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWScalingNV" ) ); - - //=== VK_EXT_direct_mode_display === - vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) ); - -#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) ); - vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) ); -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - vkGetPhysicalDeviceSurfaceCapabilities2EXT = - PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) ); - - //=== VK_EXT_display_control === - vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetInstanceProcAddr( instance, "vkDisplayPowerControlEXT" ) ); - vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDeviceEventEXT" ) ); - vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDisplayEventEXT" ) ); - vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetInstanceProcAddr( instance, "vkGetSwapchainCounterEXT" ) ); - - //=== VK_GOOGLE_display_timing === - vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetInstanceProcAddr( instance, "vkGetRefreshCycleDurationGOOGLE" ) ); - vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetInstanceProcAddr( instance, "vkGetPastPresentationTimingGOOGLE" ) ); - - //=== VK_EXT_discard_rectangles === - vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleEXT" ) ); - - //=== VK_EXT_hdr_metadata === - vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetInstanceProcAddr( instance, "vkSetHdrMetadataEXT" ) ); - - //=== VK_KHR_create_renderpass2 === - vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2KHR" ) ); - if ( !vkCreateRenderPass2 ) - vkCreateRenderPass2 = vkCreateRenderPass2KHR; - vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2KHR" ) ); - if ( !vkCmdBeginRenderPass2 ) - vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; - vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2KHR" ) ); - if ( !vkCmdNextSubpass2 ) - vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; - vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2KHR" ) ); - if ( !vkCmdEndRenderPass2 ) - vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; - - //=== VK_KHR_shared_presentable_image === - vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainStatusKHR" ) ); - - //=== VK_KHR_external_fence_capabilities === - vkGetPhysicalDeviceExternalFencePropertiesKHR = - PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalFenceProperties ) - vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" ) ); - vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetInstanceProcAddr( instance, "vkImportFenceFdKHR" ) ); - vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetInstanceProcAddr( instance, "vkGetFenceFdKHR" ) ); - - //=== VK_KHR_performance_query === - vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) ); - vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) ); - vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkAcquireProfilingLockKHR" ) ); - vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkReleaseProfilingLockKHR" ) ); - - //=== VK_KHR_get_surface_capabilities2 === - vkGetPhysicalDeviceSurfaceCapabilities2KHR = - PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) ); - vkGetPhysicalDeviceSurfaceFormats2KHR = - PFN_vkGetPhysicalDeviceSurfaceFormats2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) ); - - //=== VK_KHR_get_display_properties2 === - vkGetPhysicalDeviceDisplayProperties2KHR = - PFN_vkGetPhysicalDeviceDisplayProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) ); - vkGetPhysicalDeviceDisplayPlaneProperties2KHR = - PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) ); - vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) ); - vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) ); - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) ); -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) ); -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectNameEXT" ) ); - vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectTagEXT" ) ); - vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueBeginDebugUtilsLabelEXT" ) ); - vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueEndDebugUtilsLabelEXT" ) ); - vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueInsertDebugUtilsLabelEXT" ) ); - vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginDebugUtilsLabelEXT" ) ); - vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdEndDebugUtilsLabelEXT" ) ); - vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdInsertDebugUtilsLabelEXT" ) ); - vkCreateDebugUtilsMessengerEXT = PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) ); - vkDestroyDebugUtilsMessengerEXT = PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) ); - vkSubmitDebugUtilsMessageEXT = PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) ); - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - vkGetAndroidHardwareBufferPropertiesANDROID = - PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); - vkGetMemoryAndroidHardwareBufferANDROID = - PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetSampleLocationsEXT" ) ); - vkGetPhysicalDeviceMultisamplePropertiesEXT = - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) ); - - //=== VK_KHR_get_memory_requirements2 === - vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2KHR" ) ); - if ( !vkGetImageMemoryRequirements2 ) - vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; - vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2KHR" ) ); - if ( !vkGetBufferMemoryRequirements2 ) - vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; - vkGetImageSparseMemoryRequirements2KHR = - PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2KHR" ) ); - if ( !vkGetImageSparseMemoryRequirements2 ) - vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; - - //=== VK_KHR_acceleration_structure === - vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureKHR" ) ); - vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureKHR" ) ); - vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresKHR" ) ); - vkCmdBuildAccelerationStructuresIndirectKHR = - PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); - vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkBuildAccelerationStructuresKHR" ) ); - vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureKHR" ) ); - vkCopyAccelerationStructureToMemoryKHR = - PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureToMemoryKHR" ) ); - vkCopyMemoryToAccelerationStructureKHR = - PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCopyMemoryToAccelerationStructureKHR" ) ); - vkWriteAccelerationStructuresPropertiesKHR = - PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetInstanceProcAddr( instance, "vkWriteAccelerationStructuresPropertiesKHR" ) ); - vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureKHR" ) ); - vkCmdCopyAccelerationStructureToMemoryKHR = - PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); - vkCmdCopyMemoryToAccelerationStructureKHR = - PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); - vkGetAccelerationStructureDeviceAddressKHR = - PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureDeviceAddressKHR" ) ); - vkCmdWriteAccelerationStructuresPropertiesKHR = - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); - vkGetDeviceAccelerationStructureCompatibilityKHR = - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); - vkGetAccelerationStructureBuildSizesKHR = - PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureBuildSizesKHR" ) ); - - //=== VK_KHR_sampler_ycbcr_conversion === - vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversionKHR" ) ); - if ( !vkCreateSamplerYcbcrConversion ) - vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; - vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversionKHR" ) ); - if ( !vkDestroySamplerYcbcrConversion ) - vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; - - //=== VK_KHR_bind_memory2 === - vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2KHR" ) ); - if ( !vkBindBufferMemory2 ) - vkBindBufferMemory2 = vkBindBufferMemory2KHR; - vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindImageMemory2KHR" ) ); - if ( !vkBindImageMemory2 ) - vkBindImageMemory2 = vkBindImageMemory2KHR; - - //=== VK_EXT_image_drm_format_modifier === - vkGetImageDrmFormatModifierPropertiesEXT = - PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); - - //=== VK_EXT_validation_cache === - vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkCreateValidationCacheEXT" ) ); - vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkDestroyValidationCacheEXT" ) ); - vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetInstanceProcAddr( instance, "vkMergeValidationCachesEXT" ) ); - vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetInstanceProcAddr( instance, "vkGetValidationCacheDataEXT" ) ); - - //=== VK_NV_shading_rate_image === - vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetInstanceProcAddr( instance, "vkCmdBindShadingRateImageNV" ) ); - vkCmdSetViewportShadingRatePaletteNV = - PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportShadingRatePaletteNV" ) ); - vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoarseSampleOrderNV" ) ); - - //=== VK_NV_ray_tracing === - vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureNV" ) ); - vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureNV" ) ); - vkGetAccelerationStructureMemoryRequirementsNV = - PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); - vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetInstanceProcAddr( instance, "vkBindAccelerationStructureMemoryNV" ) ); - vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructureNV" ) ); - vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureNV" ) ); - vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysNV" ) ); - vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesNV" ) ); - vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesNV" ) ); - if ( !vkGetRayTracingShaderGroupHandlesKHR ) - vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; - vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureHandleNV" ) ); - vkCmdWriteAccelerationStructuresPropertiesNV = - PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); - vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetInstanceProcAddr( instance, "vkCompileDeferredNV" ) ); - - //=== VK_KHR_maintenance3 === - vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupportKHR" ) ); - if ( !vkGetDescriptorSetLayoutSupport ) - vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; - - //=== VK_KHR_draw_indirect_count === - vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountKHR" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; - vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountKHR" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; - - //=== VK_EXT_external_memory_host === - vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetMemoryHostPointerPropertiesEXT" ) ); - - //=== VK_AMD_buffer_marker === - vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarkerAMD" ) ); - - //=== VK_EXT_calibrated_timestamps === - vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = - PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) ); - vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsEXT" ) ); - - //=== VK_NV_mesh_shader === - vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksNV" ) ); - vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectNV" ) ); - vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountNV" ) ); - - //=== VK_NV_scissor_exclusive === - vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetInstanceProcAddr( instance, "vkCmdSetExclusiveScissorNV" ) ); - - //=== VK_NV_device_diagnostic_checkpoints === - vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetInstanceProcAddr( instance, "vkCmdSetCheckpointNV" ) ); - vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointDataNV" ) ); - - //=== VK_KHR_timeline_semaphore === - vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValueKHR" ) ); - if ( !vkGetSemaphoreCounterValue ) - vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; - vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetInstanceProcAddr( instance, "vkWaitSemaphoresKHR" ) ); - if ( !vkWaitSemaphores ) - vkWaitSemaphores = vkWaitSemaphoresKHR; - vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetInstanceProcAddr( instance, "vkSignalSemaphoreKHR" ) ); - if ( !vkSignalSemaphore ) - vkSignalSemaphore = vkSignalSemaphoreKHR; - - //=== VK_INTEL_performance_query === - vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkInitializePerformanceApiINTEL" ) ); - vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkUninitializePerformanceApiINTEL" ) ); - vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceMarkerINTEL" ) ); - vkCmdSetPerformanceStreamMarkerINTEL = - PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); - vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceOverrideINTEL" ) ); - vkAcquirePerformanceConfigurationINTEL = - PFN_vkAcquirePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkAcquirePerformanceConfigurationINTEL" ) ); - vkReleasePerformanceConfigurationINTEL = - PFN_vkReleasePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkReleasePerformanceConfigurationINTEL" ) ); - vkQueueSetPerformanceConfigurationINTEL = - PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkQueueSetPerformanceConfigurationINTEL" ) ); - vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetInstanceProcAddr( instance, "vkGetPerformanceParameterINTEL" ) ); - - //=== VK_AMD_display_native_hdr === - vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetInstanceProcAddr( instance, "vkSetLocalDimmingAMD" ) ); - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - vkCreateImagePipeSurfaceFUCHSIA = PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - vkCreateMetalSurfaceEXT = PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) ); -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - vkGetPhysicalDeviceFragmentShadingRatesKHR = - PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) ); - vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateKHR" ) ); - - //=== VK_EXT_buffer_device_address === - vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressEXT" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; - - //=== VK_EXT_tooling_info === - vkGetPhysicalDeviceToolPropertiesEXT = - PFN_vkGetPhysicalDeviceToolPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) ); - if ( !vkGetPhysicalDeviceToolProperties ) - vkGetPhysicalDeviceToolProperties = vkGetPhysicalDeviceToolPropertiesEXT; - - //=== VK_KHR_present_wait === - vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetInstanceProcAddr( instance, "vkWaitForPresentKHR" ) ); - - //=== VK_NV_cooperative_matrix === - vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = - PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) ); - - //=== VK_NV_coverage_reduction_mode === - vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - vkGetPhysicalDeviceSurfacePresentModes2EXT = - PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) ); - vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" ) ); - vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ) ); - vkGetDeviceGroupSurfacePresentModes2EXT = - PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - vkCreateHeadlessSurfaceEXT = PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) ); - - //=== VK_KHR_buffer_device_address === - vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressKHR" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; - vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddressKHR" ) ); - if ( !vkGetBufferOpaqueCaptureAddress ) - vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; - vkGetDeviceMemoryOpaqueCaptureAddressKHR = - PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); - if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) - vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; - - //=== VK_EXT_line_rasterization === - vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleEXT" ) ); - - //=== VK_EXT_host_query_reset === - vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetInstanceProcAddr( instance, "vkResetQueryPoolEXT" ) ); - if ( !vkResetQueryPool ) - vkResetQueryPool = vkResetQueryPoolEXT; - - //=== VK_EXT_extended_dynamic_state === - vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetCullModeEXT" ) ); - if ( !vkCmdSetCullMode ) - vkCmdSetCullMode = vkCmdSetCullModeEXT; - vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFaceEXT" ) ); - if ( !vkCmdSetFrontFace ) - vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; - vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopologyEXT" ) ); - if ( !vkCmdSetPrimitiveTopology ) - vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; - vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCountEXT" ) ); - if ( !vkCmdSetViewportWithCount ) - vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; - vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCountEXT" ) ); - if ( !vkCmdSetScissorWithCount ) - vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; - vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2EXT" ) ); - if ( !vkCmdBindVertexBuffers2 ) - vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; - vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnableEXT" ) ); - if ( !vkCmdSetDepthTestEnable ) - vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; - vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnableEXT" ) ); - if ( !vkCmdSetDepthWriteEnable ) - vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; - vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOpEXT" ) ); - if ( !vkCmdSetDepthCompareOp ) - vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; - vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnableEXT" ) ); - if ( !vkCmdSetDepthBoundsTestEnable ) - vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; - vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnableEXT" ) ); - if ( !vkCmdSetStencilTestEnable ) - vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; - vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOpEXT" ) ); - if ( !vkCmdSetStencilOp ) - vkCmdSetStencilOp = vkCmdSetStencilOpEXT; - - //=== VK_KHR_deferred_host_operations === - vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkCreateDeferredOperationKHR" ) ); - vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkDestroyDeferredOperationKHR" ) ); - vkGetDeferredOperationMaxConcurrencyKHR = - PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); - vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationResultKHR" ) ); - vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetInstanceProcAddr( instance, "vkDeferredOperationJoinKHR" ) ); - - //=== VK_KHR_pipeline_executable_properties === - vkGetPipelineExecutablePropertiesKHR = - PFN_vkGetPipelineExecutablePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutablePropertiesKHR" ) ); - vkGetPipelineExecutableStatisticsKHR = - PFN_vkGetPipelineExecutableStatisticsKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableStatisticsKHR" ) ); - vkGetPipelineExecutableInternalRepresentationsKHR = - PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); - - //=== VK_NV_device_generated_commands === - vkGetGeneratedCommandsMemoryRequirementsNV = - PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetInstanceProcAddr( instance, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); - vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdPreprocessGeneratedCommandsNV" ) ); - vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdExecuteGeneratedCommandsNV" ) ); - vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetInstanceProcAddr( instance, "vkCmdBindPipelineShaderGroupNV" ) ); - vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkCreateIndirectCommandsLayoutNV" ) ); - vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkDestroyIndirectCommandsLayoutNV" ) ); - - //=== VK_EXT_acquire_drm_display === - vkAcquireDrmDisplayEXT = PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) ); - vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) ); - - //=== VK_EXT_private_data === - vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlotEXT" ) ); - if ( !vkCreatePrivateDataSlot ) - vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; - vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlotEXT" ) ); - if ( !vkDestroyPrivateDataSlot ) - vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; - vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkSetPrivateDataEXT" ) ); - if ( !vkSetPrivateData ) - vkSetPrivateData = vkSetPrivateDataEXT; - vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkGetPrivateDataEXT" ) ); - if ( !vkGetPrivateData ) - vkGetPrivateData = vkGetPrivateDataEXT; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdEncodeVideoKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetInstanceProcAddr( instance, "vkExportMetalObjectsEXT" ) ); -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2KHR" ) ); - if ( !vkCmdSetEvent2 ) - vkCmdSetEvent2 = vkCmdSetEvent2KHR; - vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2KHR" ) ); - if ( !vkCmdResetEvent2 ) - vkCmdResetEvent2 = vkCmdResetEvent2KHR; - vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2KHR" ) ); - if ( !vkCmdWaitEvents2 ) - vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; - vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2KHR" ) ); - if ( !vkCmdPipelineBarrier2 ) - vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; - vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2KHR" ) ); - if ( !vkCmdWriteTimestamp2 ) - vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; - vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetInstanceProcAddr( instance, "vkQueueSubmit2KHR" ) ); - if ( !vkQueueSubmit2 ) - vkQueueSubmit2 = vkQueueSubmit2KHR; - vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarker2AMD" ) ); - vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointData2NV" ) ); - - //=== VK_NV_fragment_shading_rate_enums === - vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateEnumNV" ) ); - - //=== VK_EXT_mesh_shader === - vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksEXT" ) ); - vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectEXT" ) ); - vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); - - //=== VK_KHR_copy_commands2 === - vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2KHR" ) ); - if ( !vkCmdCopyBuffer2 ) - vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; - vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2KHR" ) ); - if ( !vkCmdCopyImage2 ) - vkCmdCopyImage2 = vkCmdCopyImage2KHR; - vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2KHR" ) ); - if ( !vkCmdCopyBufferToImage2 ) - vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; - vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2KHR" ) ); - if ( !vkCmdCopyImageToBuffer2 ) - vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; - vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2KHR" ) ); - if ( !vkCmdBlitImage2 ) - vkCmdBlitImage2 = vkCmdBlitImage2KHR; - vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2KHR" ) ); - if ( !vkCmdResolveImage2 ) - vkCmdResolveImage2 = vkCmdResolveImage2KHR; - - //=== VK_EXT_image_compression_control === - vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout2EXT" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - vkAcquireWinrtDisplayNV = PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) ); - vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - vkCreateDirectFBSurfaceEXT = PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) ); - vkGetPhysicalDeviceDirectFBPresentationSupportEXT = - PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) ); -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysKHR" ) ); - vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesKHR" ) ); - vkGetRayTracingShaderGroupHandlesKHR = - PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesKHR" ) ); - vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); - vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirectKHR" ) ); - vkGetRayTracingShaderGroupStackSizeKHR = - PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); - vkCmdSetRayTracingPipelineStackSizeKHR = - PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetInstanceProcAddr( instance, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); - - //=== VK_EXT_vertex_input_dynamic_state === - vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetInstanceProcAddr( instance, "vkCmdSetVertexInputEXT" ) ); - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandleFUCHSIA" ) ); - vkGetMemoryZirconHandlePropertiesFUCHSIA = - PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - vkImportSemaphoreZirconHandleFUCHSIA = - PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); - vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateBufferCollectionFUCHSIA" ) ); - vkSetBufferCollectionImageConstraintsFUCHSIA = - PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetInstanceProcAddr( instance, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); - vkSetBufferCollectionBufferConstraintsFUCHSIA = - PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetInstanceProcAddr( instance, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); - vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetInstanceProcAddr( instance, "vkDestroyBufferCollectionFUCHSIA" ) ); - vkGetBufferCollectionPropertiesFUCHSIA = - PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = - PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetInstanceProcAddr( instance, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); - vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdSubpassShadingHUAWEI" ) ); - - //=== VK_HUAWEI_invocation_mask === - vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdBindInvocationMaskHUAWEI" ) ); - - //=== VK_NV_external_memory_rdma === - vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetInstanceProcAddr( instance, "vkGetMemoryRemoteAddressNV" ) ); - - //=== VK_EXT_pipeline_properties === - vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPipelinePropertiesEXT" ) ); - - //=== VK_EXT_extended_dynamic_state2 === - vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPatchControlPointsEXT" ) ); - vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnableEXT" ) ); - if ( !vkCmdSetRasterizerDiscardEnable ) - vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; - vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnableEXT" ) ); - if ( !vkCmdSetDepthBiasEnable ) - vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; - vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLogicOpEXT" ) ); - vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnableEXT" ) ); - if ( !vkCmdSetPrimitiveRestartEnable ) - vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - vkCreateScreenSurfaceQNX = PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) ); - vkGetPhysicalDeviceScreenPresentationSupportQNX = - PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) ); -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorWriteEnableEXT" ) ); - - //=== VK_KHR_ray_tracing_maintenance1 === - vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirect2KHR" ) ); - - //=== VK_EXT_multi_draw === - vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiEXT" ) ); - vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiIndexedEXT" ) ); - - //=== VK_EXT_pageable_device_local_memory === - vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetInstanceProcAddr( instance, "vkSetDeviceMemoryPriorityEXT" ) ); - - //=== VK_KHR_maintenance4 === - vkGetDeviceBufferMemoryRequirementsKHR = - PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceBufferMemoryRequirements ) - vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; - vkGetDeviceImageMemoryRequirementsKHR = - PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceImageMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageMemoryRequirements ) - vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; - vkGetDeviceImageSparseMemoryRequirementsKHR = - PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageSparseMemoryRequirements ) - vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; - - //=== VK_VALVE_descriptor_set_host_mapping === - vkGetDescriptorSetLayoutHostMappingInfoVALVE = - PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); - vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetHostMappingVALVE" ) ); - - //=== VK_EXT_shader_module_identifier === - vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetInstanceProcAddr( instance, "vkGetShaderModuleIdentifierEXT" ) ); - vkGetShaderModuleCreateInfoIdentifierEXT = - PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetInstanceProcAddr( instance, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); - - //=== VK_QCOM_tile_properties === - vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetInstanceProcAddr( instance, "vkGetFramebufferTilePropertiesQCOM" ) ); - vkGetDynamicRenderingTilePropertiesQCOM = - PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetInstanceProcAddr( instance, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); - } - - void init( VULKAN_HPP_NAMESPACE::Device deviceCpp ) VULKAN_HPP_NOEXCEPT - { - VkDevice device = static_cast( deviceCpp ); - - //=== VK_VERSION_1_0 === - vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) ); - vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) ); - vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) ); - vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) ); - vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) ); - vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) ); - vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) ); - vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) ); - vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) ); - vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) ); - vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) ); - vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) ); - vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) ); - vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) ); - vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) ); - vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) ); - vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) ); - vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) ); - vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) ); - vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) ); - vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) ); - vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) ); - vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) ); - vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) ); - vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) ); - vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) ); - vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) ); - vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) ); - vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) ); - vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) ); - vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) ); - vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) ); - vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) ); - vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) ); - vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) ); - vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) ); - vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) ); - vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) ); - vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) ); - vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) ); - vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) ); - vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) ); - vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) ); - vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) ); - vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) ); - vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) ); - vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) ); - vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) ); - vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) ); - vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) ); - vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) ); - vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) ); - vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) ); - vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) ); - vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) ); - vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) ); - vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) ); - vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) ); - vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) ); - vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) ); - vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) ); - vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) ); - vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) ); - vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) ); - vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) ); - vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) ); - vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) ); - vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) ); - vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) ); - vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) ); - vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) ); - vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) ); - vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) ); - vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) ); - vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) ); - vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) ); - vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) ); - vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) ); - vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) ); - vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) ); - vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) ); - vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) ); - vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) ); - vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) ); - vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) ); - vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) ); - vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) ); - vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) ); - vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) ); - vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) ); - vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) ); - vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) ); - vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) ); - vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) ); - vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) ); - vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) ); - vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) ); - vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) ); - vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) ); - vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) ); - vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) ); - vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) ); - vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) ); - vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) ); - vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) ); - vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) ); - vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) ); - vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) ); - vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) ); - vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) ); - vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) ); - vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) ); - vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) ); - vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) ); - vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) ); - vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) ); - vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) ); - vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) ); - vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) ); - vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) ); - vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) ); - - //=== VK_VERSION_1_1 === - vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) ); - vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) ); - vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) ); - vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) ); - vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) ); - vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) ); - vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) ); - vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) ); - vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) ); - vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) ); - vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) ); - vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) ); - vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) ); - vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) ); - vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) ); - vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) ); - - //=== VK_VERSION_1_2 === - vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) ); - vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) ); - vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) ); - vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) ); - vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) ); - vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) ); - vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) ); - vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) ); - vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) ); - vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) ); - vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) ); - vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) ); - vkGetDeviceMemoryOpaqueCaptureAddress = - PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); - - //=== VK_VERSION_1_3 === - vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlot" ) ); - vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlot" ) ); - vkSetPrivateData = PFN_vkSetPrivateData( vkGetDeviceProcAddr( device, "vkSetPrivateData" ) ); - vkGetPrivateData = PFN_vkGetPrivateData( vkGetDeviceProcAddr( device, "vkGetPrivateData" ) ); - vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetDeviceProcAddr( device, "vkCmdSetEvent2" ) ); - vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetDeviceProcAddr( device, "vkCmdResetEvent2" ) ); - vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2" ) ); - vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2" ) ); - vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2" ) ); - vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetDeviceProcAddr( device, "vkQueueSubmit2" ) ); - vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2" ) ); - vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetDeviceProcAddr( device, "vkCmdCopyImage2" ) ); - vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2" ) ); - vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2" ) ); - vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetDeviceProcAddr( device, "vkCmdBlitImage2" ) ); - vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetDeviceProcAddr( device, "vkCmdResolveImage2" ) ); - vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetDeviceProcAddr( device, "vkCmdBeginRendering" ) ); - vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetDeviceProcAddr( device, "vkCmdEndRendering" ) ); - vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetDeviceProcAddr( device, "vkCmdSetCullMode" ) ); - vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetDeviceProcAddr( device, "vkCmdSetFrontFace" ) ); - vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopology" ) ); - vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCount" ) ); - vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCount" ) ); - vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2" ) ); - vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnable" ) ); - vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnable" ) ); - vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOp" ) ); - vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnable" ) ); - vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnable" ) ); - vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetDeviceProcAddr( device, "vkCmdSetStencilOp" ) ); - vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnable" ) ); - vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnable" ) ); - vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnable" ) ); - vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirements" ) ); - vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirements" ) ); - vkGetDeviceImageSparseMemoryRequirements = - PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirements" ) ); - - //=== VK_KHR_swapchain === - vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) ); - vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) ); - vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) ); - vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) ); - vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) ); - vkGetDeviceGroupPresentCapabilitiesKHR = - PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); - vkGetDeviceGroupSurfacePresentModesKHR = - PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); - vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) ); - - //=== VK_KHR_display_swapchain === - vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) ); - - //=== VK_EXT_debug_marker === - vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) ); - vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) ); - vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) ); - vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) ); - vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) ); - vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) ); - vkGetVideoSessionMemoryRequirementsKHR = - PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) ); - vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) ); - vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) ); - vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) ); - vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) ); - vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) ); - vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) ); - vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) ); - vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) ); - vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) ); - vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) ); - vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) ); - vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) ); - - //=== VK_NVX_binary_import === - vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) ); - vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) ); - vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) ); - vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) ); - vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) ); - - //=== VK_NVX_image_view_handle === - vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) ); - vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) ); - - //=== VK_AMD_draw_indirect_count === - vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; - vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; - - //=== VK_AMD_shader_info === - vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) ); - - //=== VK_KHR_dynamic_rendering === - vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderingKHR" ) ); - if ( !vkCmdBeginRendering ) - vkCmdBeginRendering = vkCmdBeginRenderingKHR; - vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderingKHR" ) ); - if ( !vkCmdEndRendering ) - vkCmdEndRendering = vkCmdEndRenderingKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_device_group === - vkGetDeviceGroupPeerMemoryFeaturesKHR = - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); - if ( !vkGetDeviceGroupPeerMemoryFeatures ) - vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; - vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) ); - if ( !vkCmdSetDeviceMask ) - vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; - vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) ); - if ( !vkCmdDispatchBase ) - vkCmdDispatchBase = vkCmdDispatchBaseKHR; - - //=== VK_KHR_maintenance1 === - vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) ); - if ( !vkTrimCommandPool ) - vkTrimCommandPool = vkTrimCommandPoolKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) ); - vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) ); - vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) ); - vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) ); - vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) ); - - //=== VK_KHR_push_descriptor === - vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) ); - vkCmdPushDescriptorSetWithTemplateKHR = - PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); - - //=== VK_EXT_conditional_rendering === - vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) ); - vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) ); - - //=== VK_KHR_descriptor_update_template === - vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) ); - if ( !vkCreateDescriptorUpdateTemplate ) - vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; - vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) ); - if ( !vkDestroyDescriptorUpdateTemplate ) - vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; - vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) ); - if ( !vkUpdateDescriptorSetWithTemplate ) - vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; - - //=== VK_NV_clip_space_w_scaling === - vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) ); - - //=== VK_EXT_display_control === - vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) ); - vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) ); - vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) ); - vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) ); - - //=== VK_GOOGLE_display_timing === - vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) ); - vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) ); - - //=== VK_EXT_discard_rectangles === - vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) ); - - //=== VK_EXT_hdr_metadata === - vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) ); - - //=== VK_KHR_create_renderpass2 === - vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) ); - if ( !vkCreateRenderPass2 ) - vkCreateRenderPass2 = vkCreateRenderPass2KHR; - vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) ); - if ( !vkCmdBeginRenderPass2 ) - vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; - vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) ); - if ( !vkCmdNextSubpass2 ) - vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; - vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) ); - if ( !vkCmdEndRenderPass2 ) - vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; - - //=== VK_KHR_shared_presentable_image === - vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) ); - vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) ); - vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) ); - - //=== VK_KHR_performance_query === - vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) ); - vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) ); - - //=== VK_EXT_debug_utils === - vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) ); - vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) ); - vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) ); - vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) ); - vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) ); - vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) ); - vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) ); - vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) ); - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - vkGetAndroidHardwareBufferPropertiesANDROID = - PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); - vkGetMemoryAndroidHardwareBufferANDROID = - PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) ); - - //=== VK_KHR_get_memory_requirements2 === - vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) ); - if ( !vkGetImageMemoryRequirements2 ) - vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; - vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) ); - if ( !vkGetBufferMemoryRequirements2 ) - vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; - vkGetImageSparseMemoryRequirements2KHR = - PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) ); - if ( !vkGetImageSparseMemoryRequirements2 ) - vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; - - //=== VK_KHR_acceleration_structure === - vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) ); - vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) ); - vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) ); - vkCmdBuildAccelerationStructuresIndirectKHR = - PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); - vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) ); - vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) ); - vkCopyAccelerationStructureToMemoryKHR = - PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) ); - vkCopyMemoryToAccelerationStructureKHR = - PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) ); - vkWriteAccelerationStructuresPropertiesKHR = - PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) ); - vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) ); - vkCmdCopyAccelerationStructureToMemoryKHR = - PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); - vkCmdCopyMemoryToAccelerationStructureKHR = - PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); - vkGetAccelerationStructureDeviceAddressKHR = - PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) ); - vkCmdWriteAccelerationStructuresPropertiesKHR = - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); - vkGetDeviceAccelerationStructureCompatibilityKHR = - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); - vkGetAccelerationStructureBuildSizesKHR = - PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) ); - - //=== VK_KHR_sampler_ycbcr_conversion === - vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) ); - if ( !vkCreateSamplerYcbcrConversion ) - vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; - vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) ); - if ( !vkDestroySamplerYcbcrConversion ) - vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; - - //=== VK_KHR_bind_memory2 === - vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) ); - if ( !vkBindBufferMemory2 ) - vkBindBufferMemory2 = vkBindBufferMemory2KHR; - vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) ); - if ( !vkBindImageMemory2 ) - vkBindImageMemory2 = vkBindImageMemory2KHR; - - //=== VK_EXT_image_drm_format_modifier === - vkGetImageDrmFormatModifierPropertiesEXT = - PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); - - //=== VK_EXT_validation_cache === - vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) ); - vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) ); - vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) ); - vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) ); - - //=== VK_NV_shading_rate_image === - vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) ); - vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) ); - vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) ); - - //=== VK_NV_ray_tracing === - vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) ); - vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) ); - vkGetAccelerationStructureMemoryRequirementsNV = - PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); - vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) ); - vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) ); - vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) ); - vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) ); - vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) ); - vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) ); - if ( !vkGetRayTracingShaderGroupHandlesKHR ) - vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; - vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) ); - vkCmdWriteAccelerationStructuresPropertiesNV = - PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); - vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) ); - - //=== VK_KHR_maintenance3 === - vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) ); - if ( !vkGetDescriptorSetLayoutSupport ) - vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; - - //=== VK_KHR_draw_indirect_count === - vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; - vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; - - //=== VK_EXT_external_memory_host === - vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) ); - - //=== VK_AMD_buffer_marker === - vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) ); - - //=== VK_EXT_calibrated_timestamps === - vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) ); - - //=== VK_NV_mesh_shader === - vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) ); - vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) ); - vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) ); - - //=== VK_NV_scissor_exclusive === - vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) ); - - //=== VK_NV_device_diagnostic_checkpoints === - vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) ); - vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) ); - - //=== VK_KHR_timeline_semaphore === - vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) ); - if ( !vkGetSemaphoreCounterValue ) - vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; - vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) ); - if ( !vkWaitSemaphores ) - vkWaitSemaphores = vkWaitSemaphoresKHR; - vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) ); - if ( !vkSignalSemaphore ) - vkSignalSemaphore = vkSignalSemaphoreKHR; - - //=== VK_INTEL_performance_query === - vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) ); - vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) ); - vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) ); - vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); - vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) ); - vkAcquirePerformanceConfigurationINTEL = - PFN_vkAcquirePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) ); - vkReleasePerformanceConfigurationINTEL = - PFN_vkReleasePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) ); - vkQueueSetPerformanceConfigurationINTEL = - PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) ); - vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) ); - - //=== VK_AMD_display_native_hdr === - vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) ); - - //=== VK_KHR_fragment_shading_rate === - vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) ); - - //=== VK_EXT_buffer_device_address === - vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; - - //=== VK_KHR_present_wait === - vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) ); - vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) ); - vkGetDeviceGroupSurfacePresentModes2EXT = - PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_buffer_device_address === - vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; - vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) ); - if ( !vkGetBufferOpaqueCaptureAddress ) - vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; - vkGetDeviceMemoryOpaqueCaptureAddressKHR = - PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); - if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) - vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; - - //=== VK_EXT_line_rasterization === - vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) ); - - //=== VK_EXT_host_query_reset === - vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) ); - if ( !vkResetQueryPool ) - vkResetQueryPool = vkResetQueryPoolEXT; - - //=== VK_EXT_extended_dynamic_state === - vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) ); - if ( !vkCmdSetCullMode ) - vkCmdSetCullMode = vkCmdSetCullModeEXT; - vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) ); - if ( !vkCmdSetFrontFace ) - vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; - vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) ); - if ( !vkCmdSetPrimitiveTopology ) - vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; - vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) ); - if ( !vkCmdSetViewportWithCount ) - vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; - vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) ); - if ( !vkCmdSetScissorWithCount ) - vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; - vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) ); - if ( !vkCmdBindVertexBuffers2 ) - vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; - vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) ); - if ( !vkCmdSetDepthTestEnable ) - vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; - vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) ); - if ( !vkCmdSetDepthWriteEnable ) - vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; - vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) ); - if ( !vkCmdSetDepthCompareOp ) - vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; - vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) ); - if ( !vkCmdSetDepthBoundsTestEnable ) - vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; - vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) ); - if ( !vkCmdSetStencilTestEnable ) - vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; - vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) ); - if ( !vkCmdSetStencilOp ) - vkCmdSetStencilOp = vkCmdSetStencilOpEXT; - - //=== VK_KHR_deferred_host_operations === - vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) ); - vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) ); - vkGetDeferredOperationMaxConcurrencyKHR = - PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); - vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) ); - vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) ); - - //=== VK_KHR_pipeline_executable_properties === - vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) ); - vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) ); - vkGetPipelineExecutableInternalRepresentationsKHR = - PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); - - //=== VK_NV_device_generated_commands === - vkGetGeneratedCommandsMemoryRequirementsNV = - PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); - vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) ); - vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) ); - vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) ); - vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) ); - vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) ); - - //=== VK_EXT_private_data === - vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) ); - if ( !vkCreatePrivateDataSlot ) - vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; - vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) ); - if ( !vkDestroyPrivateDataSlot ) - vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; - vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) ); - if ( !vkSetPrivateData ) - vkSetPrivateData = vkSetPrivateDataEXT; - vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) ); - if ( !vkGetPrivateData ) - vkGetPrivateData = vkGetPrivateDataEXT; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ) ); -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) ); - if ( !vkCmdSetEvent2 ) - vkCmdSetEvent2 = vkCmdSetEvent2KHR; - vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) ); - if ( !vkCmdResetEvent2 ) - vkCmdResetEvent2 = vkCmdResetEvent2KHR; - vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) ); - if ( !vkCmdWaitEvents2 ) - vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; - vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) ); - if ( !vkCmdPipelineBarrier2 ) - vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; - vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) ); - if ( !vkCmdWriteTimestamp2 ) - vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; - vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) ); - if ( !vkQueueSubmit2 ) - vkQueueSubmit2 = vkQueueSubmit2KHR; - vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) ); - vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) ); - - //=== VK_NV_fragment_shading_rate_enums === - vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) ); - - //=== VK_EXT_mesh_shader === - vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksEXT" ) ); - vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectEXT" ) ); - vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); - - //=== VK_KHR_copy_commands2 === - vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) ); - if ( !vkCmdCopyBuffer2 ) - vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; - vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) ); - if ( !vkCmdCopyImage2 ) - vkCmdCopyImage2 = vkCmdCopyImage2KHR; - vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) ); - if ( !vkCmdCopyBufferToImage2 ) - vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; - vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) ); - if ( !vkCmdCopyImageToBuffer2 ) - vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; - vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) ); - if ( !vkCmdBlitImage2 ) - vkCmdBlitImage2 = vkCmdBlitImage2KHR; - vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) ); - if ( !vkCmdResolveImage2 ) - vkCmdResolveImage2 = vkCmdResolveImage2KHR; - - //=== VK_EXT_image_compression_control === - vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2EXT" ) ); - - //=== VK_KHR_ray_tracing_pipeline === - vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) ); - vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) ); - vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) ); - vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); - vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) ); - vkGetRayTracingShaderGroupStackSizeKHR = - PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); - vkCmdSetRayTracingPipelineStackSizeKHR = - PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); - - //=== VK_EXT_vertex_input_dynamic_state === - vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) ); - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) ); - vkGetMemoryZirconHandlePropertiesFUCHSIA = - PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); - vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ) ); - vkSetBufferCollectionImageConstraintsFUCHSIA = - PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); - vkSetBufferCollectionBufferConstraintsFUCHSIA = - PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); - vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ) ); - vkGetBufferCollectionPropertiesFUCHSIA = - PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = - PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); - vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) ); - - //=== VK_HUAWEI_invocation_mask === - vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) ); - - //=== VK_NV_external_memory_rdma === - vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) ); - - //=== VK_EXT_pipeline_properties === - vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetPipelinePropertiesEXT" ) ); - - //=== VK_EXT_extended_dynamic_state2 === - vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) ); - vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) ); - if ( !vkCmdSetRasterizerDiscardEnable ) - vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; - vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) ); - if ( !vkCmdSetDepthBiasEnable ) - vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; - vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) ); - vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) ); - if ( !vkCmdSetPrimitiveRestartEnable ) - vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; - - //=== VK_EXT_color_write_enable === - vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) ); - - //=== VK_KHR_ray_tracing_maintenance1 === - vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirect2KHR" ) ); - - //=== VK_EXT_multi_draw === - vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) ); - vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) ); - - //=== VK_EXT_pageable_device_local_memory === - vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetDeviceProcAddr( device, "vkSetDeviceMemoryPriorityEXT" ) ); - - //=== VK_KHR_maintenance4 === - vkGetDeviceBufferMemoryRequirementsKHR = - PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceBufferMemoryRequirements ) - vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; - vkGetDeviceImageMemoryRequirementsKHR = - PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageMemoryRequirements ) - vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; - vkGetDeviceImageSparseMemoryRequirementsKHR = - PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageSparseMemoryRequirements ) - vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; - - //=== VK_VALVE_descriptor_set_host_mapping === - vkGetDescriptorSetLayoutHostMappingInfoVALVE = - PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); - vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetHostMappingVALVE" ) ); - - //=== VK_EXT_shader_module_identifier === - vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleIdentifierEXT" ) ); - vkGetShaderModuleCreateInfoIdentifierEXT = - PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); - - //=== VK_QCOM_tile_properties === - vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetFramebufferTilePropertiesQCOM" ) ); - vkGetDynamicRenderingTilePropertiesQCOM = - PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); - } - }; -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_enums.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_enums.hpp deleted file mode 100644 index 1c540cf..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_enums.hpp +++ /dev/null @@ -1,8538 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_ENUMS_HPP -#define VULKAN_ENUMS_HPP - -namespace VULKAN_HPP_NAMESPACE -{ - template - struct CppType - { - }; - - template - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; - }; - - //============= - //=== ENUMs === - //============= - - //=== VK_VERSION_1_0 === - - enum class Result - { - eSuccess = VK_SUCCESS, - eNotReady = VK_NOT_READY, - eTimeout = VK_TIMEOUT, - eEventSet = VK_EVENT_SET, - eEventReset = VK_EVENT_RESET, - eIncomplete = VK_INCOMPLETE, - eErrorOutOfHostMemory = VK_ERROR_OUT_OF_HOST_MEMORY, - eErrorOutOfDeviceMemory = VK_ERROR_OUT_OF_DEVICE_MEMORY, - eErrorInitializationFailed = VK_ERROR_INITIALIZATION_FAILED, - eErrorDeviceLost = VK_ERROR_DEVICE_LOST, - eErrorMemoryMapFailed = VK_ERROR_MEMORY_MAP_FAILED, - eErrorLayerNotPresent = VK_ERROR_LAYER_NOT_PRESENT, - eErrorExtensionNotPresent = VK_ERROR_EXTENSION_NOT_PRESENT, - eErrorFeatureNotPresent = VK_ERROR_FEATURE_NOT_PRESENT, - eErrorIncompatibleDriver = VK_ERROR_INCOMPATIBLE_DRIVER, - eErrorTooManyObjects = VK_ERROR_TOO_MANY_OBJECTS, - eErrorFormatNotSupported = VK_ERROR_FORMAT_NOT_SUPPORTED, - eErrorFragmentedPool = VK_ERROR_FRAGMENTED_POOL, - eErrorUnknown = VK_ERROR_UNKNOWN, - eErrorOutOfPoolMemory = VK_ERROR_OUT_OF_POOL_MEMORY, - eErrorInvalidExternalHandle = VK_ERROR_INVALID_EXTERNAL_HANDLE, - eErrorFragmentation = VK_ERROR_FRAGMENTATION, - eErrorInvalidOpaqueCaptureAddress = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, - ePipelineCompileRequired = VK_PIPELINE_COMPILE_REQUIRED, - eErrorSurfaceLostKHR = VK_ERROR_SURFACE_LOST_KHR, - eErrorNativeWindowInUseKHR = VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, - eSuboptimalKHR = VK_SUBOPTIMAL_KHR, - eErrorOutOfDateKHR = VK_ERROR_OUT_OF_DATE_KHR, - eErrorIncompatibleDisplayKHR = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, - eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT, - eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eErrorImageUsageNotSupportedKHR = VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR, - eErrorVideoPictureLayoutNotSupportedKHR = VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR, - eErrorVideoProfileOperationNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR, - eErrorVideoProfileFormatNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR, - eErrorVideoProfileCodecNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR, - eErrorVideoStdVersionNotSupportedKHR = VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eErrorInvalidDrmFormatModifierPlaneLayoutEXT = VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT, - eErrorNotPermittedKHR = VK_ERROR_NOT_PERMITTED_KHR, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eErrorFullScreenExclusiveModeLostEXT = VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eThreadIdleKHR = VK_THREAD_IDLE_KHR, - eThreadDoneKHR = VK_THREAD_DONE_KHR, - eOperationDeferredKHR = VK_OPERATION_DEFERRED_KHR, - eOperationNotDeferredKHR = VK_OPERATION_NOT_DEFERRED_KHR, - eErrorCompressionExhaustedEXT = VK_ERROR_COMPRESSION_EXHAUSTED_EXT, - eErrorFragmentationEXT = VK_ERROR_FRAGMENTATION_EXT, - eErrorInvalidDeviceAddressEXT = VK_ERROR_INVALID_DEVICE_ADDRESS_EXT, - eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, - eErrorInvalidOpaqueCaptureAddressKHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR, - eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT, - eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR, - eErrorPipelineCompileRequiredEXT = VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT, - ePipelineCompileRequiredEXT = VK_PIPELINE_COMPILE_REQUIRED_EXT - }; - - enum class StructureType - { - eApplicationInfo = VK_STRUCTURE_TYPE_APPLICATION_INFO, - eInstanceCreateInfo = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, - eDeviceQueueCreateInfo = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, - eDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, - eSubmitInfo = VK_STRUCTURE_TYPE_SUBMIT_INFO, - eMemoryAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, - eMappedMemoryRange = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, - eBindSparseInfo = VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, - eFenceCreateInfo = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, - eSemaphoreCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, - eEventCreateInfo = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, - eQueryPoolCreateInfo = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, - eBufferCreateInfo = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, - eBufferViewCreateInfo = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, - eImageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, - eImageViewCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, - eShaderModuleCreateInfo = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, - ePipelineCacheCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, - ePipelineShaderStageCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, - ePipelineVertexInputStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, - ePipelineInputAssemblyStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, - ePipelineTessellationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, - ePipelineViewportStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, - ePipelineRasterizationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, - ePipelineMultisampleStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, - ePipelineDepthStencilStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, - ePipelineColorBlendStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, - ePipelineDynamicStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, - eGraphicsPipelineCreateInfo = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, - eComputePipelineCreateInfo = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, - ePipelineLayoutCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, - eSamplerCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, - eDescriptorSetLayoutCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, - eDescriptorPoolCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, - eDescriptorSetAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, - eWriteDescriptorSet = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, - eCopyDescriptorSet = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, - eFramebufferCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, - eRenderPassCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, - eCommandPoolCreateInfo = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, - eCommandBufferAllocateInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, - eCommandBufferInheritanceInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, - eCommandBufferBeginInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, - eRenderPassBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - eBufferMemoryBarrier = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, - eImageMemoryBarrier = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - eMemoryBarrier = VK_STRUCTURE_TYPE_MEMORY_BARRIER, - eLoaderInstanceCreateInfo = VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, - eLoaderDeviceCreateInfo = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, - ePhysicalDeviceSubgroupProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, - eBindBufferMemoryInfo = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, - eBindImageMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, - ePhysicalDevice16BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, - eMemoryDedicatedRequirements = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, - eMemoryDedicatedAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, - eMemoryAllocateFlagsInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, - eDeviceGroupRenderPassBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, - eDeviceGroupCommandBufferBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, - eDeviceGroupSubmitInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, - eDeviceGroupBindSparseInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, - eBindBufferMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, - eBindImageMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, - ePhysicalDeviceGroupProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, - eDeviceGroupDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, - eBufferMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, - eImageMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, - eImageSparseMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, - eMemoryRequirements2 = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, - eSparseImageMemoryRequirements2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, - ePhysicalDeviceFeatures2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, - ePhysicalDeviceProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, - eFormatProperties2 = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, - eImageFormatProperties2 = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, - ePhysicalDeviceImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, - eQueueFamilyProperties2 = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, - ePhysicalDeviceMemoryProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, - eSparseImageFormatProperties2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, - ePhysicalDeviceSparseImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, - ePhysicalDevicePointClippingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, - eRenderPassInputAttachmentAspectCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, - eImageViewUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, - ePipelineTessellationDomainOriginStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, - eRenderPassMultiviewCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, - ePhysicalDeviceMultiviewFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, - ePhysicalDeviceMultiviewProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, - ePhysicalDeviceVariablePointersFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, - eProtectedSubmitInfo = VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO, - ePhysicalDeviceProtectedMemoryFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES, - ePhysicalDeviceProtectedMemoryProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, - eDeviceQueueInfo2 = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, - eSamplerYcbcrConversionCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, - eSamplerYcbcrConversionInfo = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, - eBindImagePlaneMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, - eImagePlaneMemoryRequirementsInfo = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, - ePhysicalDeviceSamplerYcbcrConversionFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, - eSamplerYcbcrConversionImageFormatProperties = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, - eDescriptorUpdateTemplateCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, - ePhysicalDeviceExternalImageFormatInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, - eExternalImageFormatProperties = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, - ePhysicalDeviceExternalBufferInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, - eExternalBufferProperties = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, - ePhysicalDeviceIdProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, - eExternalMemoryBufferCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, - eExternalMemoryImageCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, - eExportMemoryAllocateInfo = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, - ePhysicalDeviceExternalFenceInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, - eExternalFenceProperties = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, - eExportFenceCreateInfo = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, - eExportSemaphoreCreateInfo = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, - ePhysicalDeviceExternalSemaphoreInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, - eExternalSemaphoreProperties = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, - ePhysicalDeviceMaintenance3Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, - eDescriptorSetLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, - ePhysicalDeviceShaderDrawParametersFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, - ePhysicalDeviceVulkan11Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, - ePhysicalDeviceVulkan11Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES, - ePhysicalDeviceVulkan12Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, - ePhysicalDeviceVulkan12Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES, - eImageFormatListCreateInfo = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, - eAttachmentDescription2 = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, - eAttachmentReference2 = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, - eSubpassDescription2 = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, - eSubpassDependency2 = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, - eRenderPassCreateInfo2 = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2, - eSubpassBeginInfo = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO, - eSubpassEndInfo = VK_STRUCTURE_TYPE_SUBPASS_END_INFO, - ePhysicalDevice8BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, - ePhysicalDeviceDriverProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, - ePhysicalDeviceShaderAtomicInt64Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, - ePhysicalDeviceShaderFloat16Int8Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, - ePhysicalDeviceFloatControlsProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, - eDescriptorSetLayoutBindingFlagsCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO, - ePhysicalDeviceDescriptorIndexingFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, - ePhysicalDeviceDescriptorIndexingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, - eDescriptorSetVariableDescriptorCountAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO, - eDescriptorSetVariableDescriptorCountLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT, - ePhysicalDeviceDepthStencilResolveProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, - eSubpassDescriptionDepthStencilResolve = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE, - ePhysicalDeviceScalarBlockLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, - eImageStencilUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO, - ePhysicalDeviceSamplerFilterMinmaxProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, - eSamplerReductionModeCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO, - ePhysicalDeviceVulkanMemoryModelFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES, - ePhysicalDeviceImagelessFramebufferFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES, - eFramebufferAttachmentsCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO, - eFramebufferAttachmentImageInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, - eRenderPassAttachmentBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO, - ePhysicalDeviceUniformBufferStandardLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, - ePhysicalDeviceShaderSubgroupExtendedTypesFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, - ePhysicalDeviceSeparateDepthStencilLayoutsFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, - eAttachmentReferenceStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT, - eAttachmentDescriptionStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT, - ePhysicalDeviceHostQueryResetFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, - ePhysicalDeviceTimelineSemaphoreFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, - ePhysicalDeviceTimelineSemaphoreProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, - eSemaphoreTypeCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, - eTimelineSemaphoreSubmitInfo = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, - eSemaphoreWaitInfo = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, - eSemaphoreSignalInfo = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, - ePhysicalDeviceBufferDeviceAddressFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, - eBufferDeviceAddressInfo = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, - eBufferOpaqueCaptureAddressCreateInfo = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO, - eMemoryOpaqueCaptureAddressAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, - eDeviceMemoryOpaqueCaptureAddressInfo = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, - ePhysicalDeviceVulkan13Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, - ePhysicalDeviceVulkan13Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES, - ePipelineCreationFeedbackCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, - ePhysicalDeviceShaderTerminateInvocationFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES, - ePhysicalDeviceToolProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, - ePhysicalDeviceShaderDemoteToHelperInvocationFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES, - ePhysicalDevicePrivateDataFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES, - eDevicePrivateDataCreateInfo = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO, - ePrivateDataSlotCreateInfo = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO, - ePhysicalDevicePipelineCreationCacheControlFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES, - eMemoryBarrier2 = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2, - eBufferMemoryBarrier2 = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2, - eImageMemoryBarrier2 = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2, - eDependencyInfo = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, - eSubmitInfo2 = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, - eSemaphoreSubmitInfo = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, - eCommandBufferSubmitInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, - ePhysicalDeviceSynchronization2Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES, - ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES, - ePhysicalDeviceImageRobustnessFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES, - eCopyBufferInfo2 = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2, - eCopyImageInfo2 = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2, - eCopyBufferToImageInfo2 = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2, - eCopyImageToBufferInfo2 = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2, - eBlitImageInfo2 = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2, - eResolveImageInfo2 = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2, - eBufferCopy2 = VK_STRUCTURE_TYPE_BUFFER_COPY_2, - eImageCopy2 = VK_STRUCTURE_TYPE_IMAGE_COPY_2, - eImageBlit2 = VK_STRUCTURE_TYPE_IMAGE_BLIT_2, - eBufferImageCopy2 = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2, - eImageResolve2 = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2, - ePhysicalDeviceSubgroupSizeControlProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES, - ePipelineShaderStageRequiredSubgroupSizeCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, - ePhysicalDeviceSubgroupSizeControlFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES, - ePhysicalDeviceInlineUniformBlockFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES, - ePhysicalDeviceInlineUniformBlockProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES, - eWriteDescriptorSetInlineUniformBlock = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK, - eDescriptorPoolInlineUniformBlockCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO, - ePhysicalDeviceTextureCompressionAstcHdrFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES, - eRenderingInfo = VK_STRUCTURE_TYPE_RENDERING_INFO, - eRenderingAttachmentInfo = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO, - ePipelineRenderingCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO, - ePhysicalDeviceDynamicRenderingFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES, - eCommandBufferInheritanceRenderingInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO, - ePhysicalDeviceShaderIntegerDotProductFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES, - ePhysicalDeviceShaderIntegerDotProductProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES, - ePhysicalDeviceTexelBufferAlignmentProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES, - eFormatProperties3 = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3, - ePhysicalDeviceMaintenance4Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES, - ePhysicalDeviceMaintenance4Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES, - eDeviceBufferMemoryRequirements = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS, - eDeviceImageMemoryRequirements = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS, - eSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, - ePresentInfoKHR = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, - eDeviceGroupPresentCapabilitiesKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, - eImageSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, - eBindImageMemorySwapchainInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, - eAcquireNextImageInfoKHR = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, - eDeviceGroupPresentInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR, - eDeviceGroupSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR, - eDisplayModeCreateInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR, - eDisplaySurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR, - eDisplayPresentInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR, -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - eXlibSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#if defined( VK_USE_PLATFORM_XCB_KHR ) - eXcbSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR, -#endif /*VK_USE_PLATFORM_XCB_KHR*/ -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - eWaylandSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR, -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - eAndroidSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR, -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eWin32SurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eDebugReportCallbackCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, - ePipelineRasterizationStateRasterizationOrderAMD = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD, - eDebugMarkerObjectNameInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT, - eDebugMarkerObjectTagInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT, - eDebugMarkerMarkerInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR, - eVideoCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR, - eVideoPictureResourceInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR, - eVideoSessionMemoryRequirementsKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR, - eBindVideoSessionMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR, - eVideoSessionCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR, - eVideoSessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - eVideoSessionParametersUpdateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR, - eVideoBeginCodingInfoKHR = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR, - eVideoEndCodingInfoKHR = VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR, - eVideoCodingControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR, - eVideoReferenceSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR, - eQueueFamilyVideoPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR, - eVideoProfileListInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR, - ePhysicalDeviceVideoFormatInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR, - eVideoFormatPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR, - eQueueFamilyQueryResultStatusPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR, - eVideoDecodeInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR, - eVideoDecodeCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR, - eVideoDecodeUsageInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eDedicatedAllocationImageCreateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, - eDedicatedAllocationBufferCreateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV, - eDedicatedAllocationMemoryAllocateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, - ePhysicalDeviceTransformFeedbackFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, - ePhysicalDeviceTransformFeedbackPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, - ePipelineRasterizationStateStreamCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, - eCuModuleCreateInfoNVX = VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX, - eCuFunctionCreateInfoNVX = VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX, - eCuLaunchInfoNVX = VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX, - eImageViewHandleInfoNVX = VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX, - eImageViewAddressPropertiesNVX = VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeH264CapabilitiesEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT, - eVideoEncodeH264SessionParametersCreateInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT, - eVideoEncodeH264SessionParametersAddInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT, - eVideoEncodeH264VclFrameInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT, - eVideoEncodeH264DpbSlotInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT, - eVideoEncodeH264NaluSliceInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT, - eVideoEncodeH264EmitPictureParametersInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT, - eVideoEncodeH264ProfileInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_EXT, - eVideoEncodeH264RateControlInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT, - eVideoEncodeH264RateControlLayerInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT, - eVideoEncodeH264ReferenceListsInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT, - eVideoEncodeH265CapabilitiesEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_EXT, - eVideoEncodeH265SessionParametersCreateInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT, - eVideoEncodeH265SessionParametersAddInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT, - eVideoEncodeH265VclFrameInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT, - eVideoEncodeH265DpbSlotInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT, - eVideoEncodeH265NaluSliceSegmentInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT, - eVideoEncodeH265EmitPictureParametersInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT, - eVideoEncodeH265ProfileInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_EXT, - eVideoEncodeH265ReferenceListsInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT, - eVideoEncodeH265RateControlInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT, - eVideoEncodeH265RateControlLayerInfoEXT = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT, - eVideoDecodeH264CapabilitiesEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_EXT, - eVideoDecodeH264PictureInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_EXT, - eVideoDecodeH264MvcInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_MVC_INFO_EXT, - eVideoDecodeH264ProfileInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_EXT, - eVideoDecodeH264SessionParametersCreateInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT, - eVideoDecodeH264SessionParametersAddInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT, - eVideoDecodeH264DpbSlotInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eTextureLodGatherFormatPropertiesAMD = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD, - eRenderingFragmentShadingRateAttachmentInfoKHR = VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR, - eRenderingFragmentDensityMapAttachmentInfoEXT = VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT, - eAttachmentSampleCountInfoAMD = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD, - eMultiviewPerViewAttributesInfoNVX = VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX, -#if defined( VK_USE_PLATFORM_GGP ) - eStreamDescriptorSurfaceCreateInfoGGP = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP, -#endif /*VK_USE_PLATFORM_GGP*/ - ePhysicalDeviceCornerSampledImageFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV, - eExternalMemoryImageCreateInfoNV = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV, - eExportMemoryAllocateInfoNV = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eImportMemoryWin32HandleInfoNV = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, - eExportMemoryWin32HandleInfoNV = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, - eWin32KeyedMutexAcquireReleaseInfoNV = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eValidationFlagsEXT = VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT, -#if defined( VK_USE_PLATFORM_VI_NN ) - eViSurfaceCreateInfoNN = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN, -#endif /*VK_USE_PLATFORM_VI_NN*/ - eImageViewAstcDecodeModeEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, - ePhysicalDeviceAstcDecodeFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, - ePipelineRobustnessCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT, - ePhysicalDevicePipelineRobustnessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT, - ePhysicalDevicePipelineRobustnessPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eImportMemoryWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, - eExportMemoryWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, - eMemoryWin32HandlePropertiesKHR = VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, - eMemoryGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eImportMemoryFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, - eMemoryFdPropertiesKHR = VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, - eMemoryGetFdInfoKHR = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eWin32KeyedMutexAcquireReleaseInfoKHR = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR, - eImportSemaphoreWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, - eExportSemaphoreWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, - eD3D12FenceSubmitInfoKHR = VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR, - eSemaphoreGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eImportSemaphoreFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, - eSemaphoreGetFdInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, - ePhysicalDevicePushDescriptorPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, - eCommandBufferInheritanceConditionalRenderingInfoEXT = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT, - ePhysicalDeviceConditionalRenderingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, - eConditionalRenderingBeginInfoEXT = VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT, - ePresentRegionsKHR = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR, - ePipelineViewportWScalingStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV, - eSurfaceCapabilities2EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, - eDisplayPowerInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT, - eDeviceEventInfoEXT = VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT, - eDisplayEventInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT, - eSwapchainCounterCreateInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT, - ePresentTimesInfoGOOGLE = VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE, - ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX, - ePipelineViewportSwizzleStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV, - ePhysicalDeviceDiscardRectanglePropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, - ePipelineDiscardRectangleStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT, - ePhysicalDeviceConservativeRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, - ePipelineRasterizationConservativeStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, - ePhysicalDeviceDepthClipEnableFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT, - ePipelineRasterizationDepthClipStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT, - eHdrMetadataEXT = VK_STRUCTURE_TYPE_HDR_METADATA_EXT, - eSharedPresentSurfaceCapabilitiesKHR = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eImportFenceWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, - eExportFenceWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, - eFenceGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eImportFenceFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, - eFenceGetFdInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, - ePhysicalDevicePerformanceQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR, - ePhysicalDevicePerformanceQueryPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR, - eQueryPoolPerformanceCreateInfoKHR = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR, - ePerformanceQuerySubmitInfoKHR = VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR, - eAcquireProfilingLockInfoKHR = VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR, - ePerformanceCounterKHR = VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR, - ePerformanceCounterDescriptionKHR = VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR, - ePhysicalDeviceSurfaceInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, - eSurfaceCapabilities2KHR = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, - eSurfaceFormat2KHR = VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR, - eDisplayProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, - eDisplayPlaneProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, - eDisplayModeProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR, - eDisplayPlaneInfo2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR, - eDisplayPlaneCapabilities2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR, -#if defined( VK_USE_PLATFORM_IOS_MVK ) - eIosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK, -#endif /*VK_USE_PLATFORM_IOS_MVK*/ -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - eMacosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK, -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - eDebugUtilsObjectNameInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, - eDebugUtilsObjectTagInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT, - eDebugUtilsLabelEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, - eDebugUtilsMessengerCallbackDataEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT, - eDebugUtilsMessengerCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - eAndroidHardwareBufferUsageANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID, - eAndroidHardwareBufferPropertiesANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID, - eAndroidHardwareBufferFormatPropertiesANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID, - eImportAndroidHardwareBufferInfoANDROID = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID, - eMemoryGetAndroidHardwareBufferInfoANDROID = VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID, - eExternalFormatANDROID = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID, - eAndroidHardwareBufferFormatProperties2ANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID, -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - eSampleLocationsInfoEXT = VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, - eRenderPassSampleLocationsBeginInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT, - ePipelineSampleLocationsStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, - ePhysicalDeviceSampleLocationsPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, - eMultisamplePropertiesEXT = VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, - ePhysicalDeviceBlendOperationAdvancedFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT, - ePhysicalDeviceBlendOperationAdvancedPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, - ePipelineColorBlendAdvancedStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT, - ePipelineCoverageToColorStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV, - eWriteDescriptorSetAccelerationStructureKHR = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR, - eAccelerationStructureBuildGeometryInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR, - eAccelerationStructureDeviceAddressInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR, - eAccelerationStructureGeometryAabbsDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR, - eAccelerationStructureGeometryInstancesDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR, - eAccelerationStructureGeometryTrianglesDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR, - eAccelerationStructureGeometryKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR, - eAccelerationStructureVersionInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR, - eCopyAccelerationStructureInfoKHR = VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR, - eCopyAccelerationStructureToMemoryInfoKHR = VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR, - eCopyMemoryToAccelerationStructureInfoKHR = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR, - ePhysicalDeviceAccelerationStructureFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR, - ePhysicalDeviceAccelerationStructurePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR, - eAccelerationStructureCreateInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR, - eAccelerationStructureBuildSizesInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR, - ePhysicalDeviceRayTracingPipelineFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR, - ePhysicalDeviceRayTracingPipelinePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR, - eRayTracingPipelineCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR, - eRayTracingShaderGroupCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR, - eRayTracingPipelineInterfaceCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR, - ePhysicalDeviceRayQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR, - ePipelineCoverageModulationStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV, - ePhysicalDeviceShaderSmBuiltinsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV, - ePhysicalDeviceShaderSmBuiltinsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV, - eDrmFormatModifierPropertiesListEXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT, - ePhysicalDeviceImageDrmFormatModifierInfoEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, - eImageDrmFormatModifierListCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT, - eImageDrmFormatModifierExplicitCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT, - eImageDrmFormatModifierPropertiesEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, - eDrmFormatModifierPropertiesList2EXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT, - eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, - eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - ePhysicalDevicePortabilitySubsetFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR, - ePhysicalDevicePortabilitySubsetPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - ePipelineViewportShadingRateImageStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV, - ePhysicalDeviceShadingRateImageFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV, - ePhysicalDeviceShadingRateImagePropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV, - ePipelineViewportCoarseSampleOrderStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV, - eRayTracingPipelineCreateInfoNV = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV, - eAccelerationStructureCreateInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV, - eGeometryNV = VK_STRUCTURE_TYPE_GEOMETRY_NV, - eGeometryTrianglesNV = VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV, - eGeometryAabbNV = VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV, - eBindAccelerationStructureMemoryInfoNV = VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV, - eWriteDescriptorSetAccelerationStructureNV = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV, - eAccelerationStructureMemoryRequirementsInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV, - ePhysicalDeviceRayTracingPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV, - eRayTracingShaderGroupCreateInfoNV = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV, - eAccelerationStructureInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV, - ePhysicalDeviceRepresentativeFragmentTestFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV, - ePipelineRepresentativeFragmentTestStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV, - ePhysicalDeviceImageViewImageFormatInfoEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT, - eFilterCubicImageViewImageFormatPropertiesEXT = VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT, - eImportMemoryHostPointerInfoEXT = VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT, - eMemoryHostPointerPropertiesEXT = VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, - ePhysicalDeviceExternalMemoryHostPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT, - ePhysicalDeviceShaderClockFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR, - ePipelineCompilerControlCreateInfoAMD = VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD, - eCalibratedTimestampInfoEXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT, - ePhysicalDeviceShaderCorePropertiesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeH265CapabilitiesEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_EXT, - eVideoDecodeH265SessionParametersCreateInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT, - eVideoDecodeH265SessionParametersAddInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT, - eVideoDecodeH265ProfileInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_EXT, - eVideoDecodeH265PictureInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_EXT, - eVideoDecodeH265DpbSlotInfoEXT = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eDeviceQueueGlobalPriorityCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR, - ePhysicalDeviceGlobalPriorityQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR, - eQueueFamilyGlobalPriorityPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR, - eDeviceMemoryOverallocationCreateInfoAMD = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD, - ePhysicalDeviceVertexAttributeDivisorPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, - ePipelineVertexInputDivisorStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, - ePhysicalDeviceVertexAttributeDivisorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, -#if defined( VK_USE_PLATFORM_GGP ) - ePresentFrameTokenGGP = VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP, -#endif /*VK_USE_PLATFORM_GGP*/ - ePhysicalDeviceComputeShaderDerivativesFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV, - ePhysicalDeviceMeshShaderFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV, - ePhysicalDeviceMeshShaderPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV, - ePhysicalDeviceShaderImageFootprintFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV, - ePipelineViewportExclusiveScissorStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV, - ePhysicalDeviceExclusiveScissorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV, - eCheckpointDataNV = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV, - eQueueFamilyCheckpointPropertiesNV = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV, - ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL, - eQueryPoolPerformanceQueryCreateInfoINTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL, - eInitializePerformanceApiInfoINTEL = VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL, - ePerformanceMarkerInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL, - ePerformanceStreamMarkerInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL, - ePerformanceOverrideInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL, - ePerformanceConfigurationAcquireInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL, - ePhysicalDevicePciBusInfoPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, - eDisplayNativeHdrSurfaceCapabilitiesAMD = VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD, - eSwapchainDisplayNativeHdrCreateInfoAMD = VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eImagepipeSurfaceCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ -#if defined( VK_USE_PLATFORM_METAL_EXT ) - eMetalSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT, -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - ePhysicalDeviceFragmentDensityMapFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT, - ePhysicalDeviceFragmentDensityMapPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT, - eRenderPassFragmentDensityMapCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT, - eFragmentShadingRateAttachmentInfoKHR = VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR, - ePipelineFragmentShadingRateStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR, - ePhysicalDeviceFragmentShadingRatePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR, - ePhysicalDeviceFragmentShadingRateFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR, - ePhysicalDeviceFragmentShadingRateKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR, - ePhysicalDeviceShaderCoreProperties2AMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD, - ePhysicalDeviceCoherentMemoryFeaturesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD, - ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT, - ePhysicalDeviceMemoryBudgetPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT, - ePhysicalDeviceMemoryPriorityFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT, - eMemoryPriorityAllocateInfoEXT = VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT, - eSurfaceProtectedCapabilitiesKHR = VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR, - ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV, - ePhysicalDeviceBufferDeviceAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, - eBufferDeviceAddressCreateInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT, - eValidationFeaturesEXT = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT, - ePhysicalDevicePresentWaitFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR, - ePhysicalDeviceCooperativeMatrixFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV, - eCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV, - ePhysicalDeviceCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV, - ePhysicalDeviceCoverageReductionModeFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV, - ePipelineCoverageReductionStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV, - eFramebufferMixedSamplesCombinationNV = VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV, - ePhysicalDeviceFragmentShaderInterlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT, - ePhysicalDeviceYcbcrImageArraysFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT, - ePhysicalDeviceProvokingVertexFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT, - ePipelineRasterizationProvokingVertexStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT, - ePhysicalDeviceProvokingVertexPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT, -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - eSurfaceFullScreenExclusiveInfoEXT = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT, - eSurfaceCapabilitiesFullScreenExclusiveEXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT, - eSurfaceFullScreenExclusiveWin32InfoEXT = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT, -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - eHeadlessSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT, - ePhysicalDeviceLineRasterizationFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT, - ePipelineRasterizationLineStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT, - ePhysicalDeviceLineRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT, - ePhysicalDeviceShaderAtomicFloatFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT, - ePhysicalDeviceIndexTypeUint8FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT, - ePhysicalDeviceExtendedDynamicStateFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT, - ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR, - ePipelineInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, - ePipelineExecutablePropertiesKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR, - ePipelineExecutableInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR, - ePipelineExecutableStatisticKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, - ePipelineExecutableInternalRepresentationKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR, - ePhysicalDeviceShaderAtomicFloat2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT, - ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV, - eGraphicsShaderGroupCreateInfoNV = VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV, - eGraphicsPipelineShaderGroupsCreateInfoNV = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV, - eIndirectCommandsLayoutTokenNV = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV, - eIndirectCommandsLayoutCreateInfoNV = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV, - eGeneratedCommandsInfoNV = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV, - eGeneratedCommandsMemoryRequirementsInfoNV = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV, - ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV, - ePhysicalDeviceInheritedViewportScissorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV, - eCommandBufferInheritanceViewportScissorInfoNV = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV, - ePhysicalDeviceTexelBufferAlignmentFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT, - eCommandBufferInheritanceRenderPassTransformInfoQCOM = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM, - eRenderPassTransformBeginInfoQCOM = VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM, - ePhysicalDeviceDeviceMemoryReportFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT, - eDeviceDeviceMemoryReportCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT, - eDeviceMemoryReportCallbackDataEXT = VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT, - ePhysicalDeviceRobustness2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, - ePhysicalDeviceRobustness2PropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT, - eSamplerCustomBorderColorCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT, - ePhysicalDeviceCustomBorderColorPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT, - ePhysicalDeviceCustomBorderColorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT, - ePipelineLibraryCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR, - ePresentIdKHR = VK_STRUCTURE_TYPE_PRESENT_ID_KHR, - ePhysicalDevicePresentIdFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR, - eVideoEncodeRateControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR, - eVideoEncodeRateControlLayerInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR, - eVideoEncodeCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR, - eVideoEncodeUsageInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - ePhysicalDeviceDiagnosticsConfigFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV, - eDeviceDiagnosticsConfigCreateInfoNV = VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV, -#if defined( VK_USE_PLATFORM_METAL_EXT ) - eExportMetalObjectCreateInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT, - eExportMetalObjectsInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT, - eExportMetalDeviceInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT, - eExportMetalCommandQueueInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT, - eExportMetalBufferInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT, - eImportMetalBufferInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT, - eExportMetalTextureInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT, - eImportMetalTextureInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT, - eExportMetalIoSurfaceInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT, - eImportMetalIoSurfaceInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT, - eExportMetalSharedEventInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT, - eImportMetalSharedEventInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT, -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - eQueueFamilyCheckpointProperties2NV = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV, - eCheckpointData2NV = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV, - ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT, - ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT, - eGraphicsPipelineLibraryCreateInfoEXT = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT, - ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD, - ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR, - ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR, - ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR, - ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV, - ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV, - ePipelineFragmentShadingRateEnumStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV, - eAccelerationStructureGeometryMotionTrianglesDataNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV, - ePhysicalDeviceRayTracingMotionBlurFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV, - eAccelerationStructureMotionInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV, - ePhysicalDeviceMeshShaderFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT, - ePhysicalDeviceMeshShaderPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT, - ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, - ePhysicalDeviceFragmentDensityMap2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT, - ePhysicalDeviceFragmentDensityMap2PropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT, - eCopyCommandTransformInfoQCOM = VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM, - ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR, - ePhysicalDeviceImageCompressionControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT, - eImageCompressionControlEXT = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT, - eSubresourceLayout2EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT, - eImageSubresource2EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT, - eImageCompressionPropertiesEXT = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT, - ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT, - ePhysicalDevice4444FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT, - ePhysicalDeviceRgba10X6FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT, -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - eDirectfbSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT, -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - ePhysicalDeviceMutableDescriptorTypeFeaturesVALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE, - eMutableDescriptorTypeCreateInfoVALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE, - ePhysicalDeviceVertexInputDynamicStateFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT, - eVertexInputBindingDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT, - eVertexInputAttributeDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT, - ePhysicalDeviceDrmPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, - ePhysicalDeviceDepthClipControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT, - ePipelineViewportDepthClipControlCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT, - ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eImportMemoryZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA, - eMemoryZirconHandlePropertiesFUCHSIA = VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA, - eMemoryGetZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA, - eImportSemaphoreZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA, - eSemaphoreGetZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA, - eBufferCollectionCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA, - eImportMemoryBufferCollectionFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA, - eBufferCollectionImageCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA, - eBufferCollectionPropertiesFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA, - eBufferConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA, - eBufferCollectionBufferCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA, - eImageConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA, - eImageFormatConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA, - eSysmemColorSpaceFUCHSIA = VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA, - eBufferCollectionConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - eSubpassShadingPipelineCreateInfoHUAWEI = VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI, - ePhysicalDeviceSubpassShadingFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI, - ePhysicalDeviceSubpassShadingPropertiesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI, - ePhysicalDeviceInvocationMaskFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI, - eMemoryGetRemoteAddressInfoNV = VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV, - ePhysicalDeviceExternalMemoryRdmaFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV, - ePipelinePropertiesIdentifierEXT = VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT, - ePhysicalDevicePipelinePropertiesFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT, - ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT, - eSubpassResolvePerformanceQueryEXT = VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT, - eMultisampledRenderToSingleSampledInfoEXT = VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT, - ePhysicalDeviceExtendedDynamicState2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT, -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - eScreenSurfaceCreateInfoQNX = VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX, -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - ePhysicalDeviceColorWriteEnableFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT, - ePipelineColorWriteCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT, - ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT, - ePhysicalDeviceRayTracingMaintenance1FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR, - ePhysicalDeviceImageViewMinLodFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT, - eImageViewMinLodCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT, - ePhysicalDeviceMultiDrawFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT, - ePhysicalDeviceMultiDrawPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT, - ePhysicalDeviceImage2DViewOf3DFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT, - ePhysicalDeviceBorderColorSwizzleFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT, - eSamplerBorderColorComponentMappingCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT, - ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT, - ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE, - eDescriptorSetBindingReferenceVALVE = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE, - eDescriptorSetLayoutHostMappingInfoVALVE = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE, - ePhysicalDeviceDepthClampZeroOneFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT, - ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT, - ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM, - ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM, - eSubpassFragmentDensityMapOffsetEndInfoQCOM = VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM, - ePhysicalDeviceLinearColorAttachmentFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV, - ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT, - ePhysicalDeviceImageProcessingFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM, - ePhysicalDeviceImageProcessingPropertiesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM, - eImageViewSampleWeightCreateInfoQCOM = VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM, - ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT, - eRenderPassCreationControlEXT = VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT, - eRenderPassCreationFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT, - eRenderPassSubpassFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT, - ePhysicalDeviceShaderModuleIdentifierFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT, - ePhysicalDeviceShaderModuleIdentifierPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT, - ePipelineShaderStageModuleIdentifierCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT, - eShaderModuleIdentifierEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT, - ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT, - ePhysicalDeviceLegacyDitheringFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT, - ePhysicalDeviceTilePropertiesFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM, - eTilePropertiesQCOM = VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM, - ePhysicalDeviceAmigoProfilingFeaturesSEC = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC, - eAmigoProfilingSubmitInfoSEC = VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC, - eAttachmentDescription2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, - eAttachmentDescriptionStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR, - eAttachmentReference2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, - eAttachmentReferenceStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR, - eAttachmentSampleCountInfoNV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV, - eBindBufferMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR, - eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, - eBindImageMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR, - eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR, - eBindImagePlaneMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR, - eBlitImageInfo2KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR, - eBufferCopy2KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR, - eBufferDeviceAddressInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, - eBufferDeviceAddressInfoKHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR, - eBufferImageCopy2KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR, - eBufferMemoryBarrier2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR, - eBufferMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR, - eBufferOpaqueCaptureAddressCreateInfoKHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR, - eCommandBufferInheritanceRenderingInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR, - eCommandBufferSubmitInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR, - eCopyBufferInfo2KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR, - eCopyBufferToImageInfo2KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR, - eCopyImageInfo2KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR, - eCopyImageToBufferInfo2KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR, - eDebugReportCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT, - eDependencyInfoKHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR, - eDescriptorPoolInlineUniformBlockCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT, - eDescriptorSetLayoutBindingFlagsCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT, - eDescriptorSetLayoutSupportKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR, - eDescriptorSetVariableDescriptorCountAllocateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT, - eDescriptorSetVariableDescriptorCountLayoutSupportEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT, - eDescriptorUpdateTemplateCreateInfoKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR, - eDeviceBufferMemoryRequirementsKHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR, - eDeviceGroupBindSparseInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR, - eDeviceGroupCommandBufferBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR, - eDeviceGroupDeviceCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR, - eDeviceGroupRenderPassBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR, - eDeviceGroupSubmitInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR, - eDeviceImageMemoryRequirementsKHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR, - eDeviceMemoryOpaqueCaptureAddressInfoKHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR, - eDevicePrivateDataCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT, - eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, - eExportFenceCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR, - eExportMemoryAllocateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, - eExportSemaphoreCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR, - eExternalBufferPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR, - eExternalFencePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR, - eExternalImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR, - eExternalMemoryBufferCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR, - eExternalMemoryImageCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, - eExternalSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR, - eFormatProperties2KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR, - eFormatProperties3KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR, - eFramebufferAttachmentsCreateInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR, - eFramebufferAttachmentImageInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR, - eImageBlit2KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR, - eImageCopy2KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR, - eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, - eImageFormatProperties2KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR, - eImageMemoryBarrier2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR, - eImageMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR, - eImagePlaneMemoryRequirementsInfoKHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR, - eImageResolve2KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR, - eImageSparseMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR, - eImageStencilUsageCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT, - eImageViewUsageCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR, - eMemoryAllocateFlagsInfoKHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR, - eMemoryBarrier2KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, - eMemoryDedicatedAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR, - eMemoryDedicatedRequirementsKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR, - eMemoryOpaqueCaptureAddressAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR, - eMemoryRequirements2KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR, - ePhysicalDevice16BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR, - ePhysicalDevice8BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, - ePhysicalDeviceBufferAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT, - ePhysicalDeviceBufferDeviceAddressFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR, - ePhysicalDeviceDepthStencilResolvePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR, - ePhysicalDeviceDescriptorIndexingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT, - ePhysicalDeviceDescriptorIndexingPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT, - ePhysicalDeviceDriverPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, - ePhysicalDeviceDynamicRenderingFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR, - ePhysicalDeviceExternalBufferInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR, - ePhysicalDeviceExternalFenceInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR, - ePhysicalDeviceExternalImageFormatInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR, - ePhysicalDeviceExternalSemaphoreInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR, - ePhysicalDeviceFeatures2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR, - ePhysicalDeviceFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, - ePhysicalDeviceFloatControlsPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR, - ePhysicalDeviceFragmentShaderBarycentricFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV, - ePhysicalDeviceGlobalPriorityQueryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT, - ePhysicalDeviceGroupPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR, - ePhysicalDeviceHostQueryResetFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT, - ePhysicalDeviceIdPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR, - ePhysicalDeviceImagelessFramebufferFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR, - ePhysicalDeviceImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR, - ePhysicalDeviceImageRobustnessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT, - ePhysicalDeviceInlineUniformBlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT, - ePhysicalDeviceInlineUniformBlockPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT, - ePhysicalDeviceMaintenance3PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR, - ePhysicalDeviceMaintenance4FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR, - ePhysicalDeviceMaintenance4PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR, - ePhysicalDeviceMemoryProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR, - ePhysicalDeviceMultiviewFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR, - ePhysicalDeviceMultiviewPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR, - ePhysicalDevicePipelineCreationCacheControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT, - ePhysicalDevicePointClippingPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR, - ePhysicalDevicePrivateDataFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT, - ePhysicalDeviceProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR, - ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM, - ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT, - ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR, - ePhysicalDeviceScalarBlockLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT, - ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR, - ePhysicalDeviceShaderAtomicInt64FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, - ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT, - ePhysicalDeviceShaderDrawParameterFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES, - ePhysicalDeviceShaderFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR, - ePhysicalDeviceShaderIntegerDotProductFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR, - ePhysicalDeviceShaderIntegerDotProductPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR, - ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR, - ePhysicalDeviceShaderTerminateInvocationFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR, - ePhysicalDeviceSparseImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR, - ePhysicalDeviceSubgroupSizeControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT, - ePhysicalDeviceSubgroupSizeControlPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT, - ePhysicalDeviceSynchronization2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR, - ePhysicalDeviceTexelBufferAlignmentPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT, - ePhysicalDeviceTextureCompressionAstcHdrFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT, - ePhysicalDeviceTimelineSemaphoreFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR, - ePhysicalDeviceTimelineSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR, - ePhysicalDeviceToolPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, - ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR, - ePhysicalDeviceVariablePointersFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR, - ePhysicalDeviceVariablePointerFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES, - ePhysicalDeviceVariablePointerFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR, - ePhysicalDeviceVulkanMemoryModelFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR, - ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR, - ePipelineCreationFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT, - ePipelineInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT, - ePipelineRenderingCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR, - ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT, - ePipelineTessellationDomainOriginStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR, - ePrivateDataSlotCreateInfoEXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT, - eQueryPoolCreateInfoINTEL = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL, - eQueueFamilyGlobalPriorityPropertiesEXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT, - eQueueFamilyProperties2KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR, - eRenderingAttachmentInfoKHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR, - eRenderingInfoKHR = VK_STRUCTURE_TYPE_RENDERING_INFO_KHR, - eRenderPassAttachmentBeginInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR, - eRenderPassCreateInfo2KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR, - eRenderPassInputAttachmentAspectCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR, - eRenderPassMultiviewCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR, - eResolveImageInfo2KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR, - eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, - eSamplerYcbcrConversionCreateInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR, - eSamplerYcbcrConversionImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR, - eSamplerYcbcrConversionInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR, - eSemaphoreSignalInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR, - eSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR, - eSemaphoreTypeCreateInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR, - eSemaphoreWaitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR, - eSparseImageFormatProperties2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR, - eSparseImageMemoryRequirements2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR, - eSubmitInfo2KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR, - eSubpassBeginInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR, - eSubpassDependency2KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR, - eSubpassDescription2KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR, - eSubpassDescriptionDepthStencilResolveKHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR, - eSubpassEndInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR, - eTimelineSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR, - eWriteDescriptorSetInlineUniformBlockEXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT - }; - - enum class PipelineCacheHeaderVersion - { - eOne = VK_PIPELINE_CACHE_HEADER_VERSION_ONE - }; - - enum class ObjectType - { - eUnknown = VK_OBJECT_TYPE_UNKNOWN, - eInstance = VK_OBJECT_TYPE_INSTANCE, - ePhysicalDevice = VK_OBJECT_TYPE_PHYSICAL_DEVICE, - eDevice = VK_OBJECT_TYPE_DEVICE, - eQueue = VK_OBJECT_TYPE_QUEUE, - eSemaphore = VK_OBJECT_TYPE_SEMAPHORE, - eCommandBuffer = VK_OBJECT_TYPE_COMMAND_BUFFER, - eFence = VK_OBJECT_TYPE_FENCE, - eDeviceMemory = VK_OBJECT_TYPE_DEVICE_MEMORY, - eBuffer = VK_OBJECT_TYPE_BUFFER, - eImage = VK_OBJECT_TYPE_IMAGE, - eEvent = VK_OBJECT_TYPE_EVENT, - eQueryPool = VK_OBJECT_TYPE_QUERY_POOL, - eBufferView = VK_OBJECT_TYPE_BUFFER_VIEW, - eImageView = VK_OBJECT_TYPE_IMAGE_VIEW, - eShaderModule = VK_OBJECT_TYPE_SHADER_MODULE, - ePipelineCache = VK_OBJECT_TYPE_PIPELINE_CACHE, - ePipelineLayout = VK_OBJECT_TYPE_PIPELINE_LAYOUT, - eRenderPass = VK_OBJECT_TYPE_RENDER_PASS, - ePipeline = VK_OBJECT_TYPE_PIPELINE, - eDescriptorSetLayout = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, - eSampler = VK_OBJECT_TYPE_SAMPLER, - eDescriptorPool = VK_OBJECT_TYPE_DESCRIPTOR_POOL, - eDescriptorSet = VK_OBJECT_TYPE_DESCRIPTOR_SET, - eFramebuffer = VK_OBJECT_TYPE_FRAMEBUFFER, - eCommandPool = VK_OBJECT_TYPE_COMMAND_POOL, - eSamplerYcbcrConversion = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, - eDescriptorUpdateTemplate = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, - ePrivateDataSlot = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT, - eSurfaceKHR = VK_OBJECT_TYPE_SURFACE_KHR, - eSwapchainKHR = VK_OBJECT_TYPE_SWAPCHAIN_KHR, - eDisplayKHR = VK_OBJECT_TYPE_DISPLAY_KHR, - eDisplayModeKHR = VK_OBJECT_TYPE_DISPLAY_MODE_KHR, - eDebugReportCallbackEXT = VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoSessionKHR = VK_OBJECT_TYPE_VIDEO_SESSION_KHR, - eVideoSessionParametersKHR = VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eCuModuleNVX = VK_OBJECT_TYPE_CU_MODULE_NVX, - eCuFunctionNVX = VK_OBJECT_TYPE_CU_FUNCTION_NVX, - eDebugUtilsMessengerEXT = VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT, - eAccelerationStructureKHR = VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR, - eValidationCacheEXT = VK_OBJECT_TYPE_VALIDATION_CACHE_EXT, - eAccelerationStructureNV = VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV, - ePerformanceConfigurationINTEL = VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL, - eDeferredOperationKHR = VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR, - eIndirectCommandsLayoutNV = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eBufferCollectionFUCHSIA = VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - eDescriptorUpdateTemplateKHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR, - ePrivateDataSlotEXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT, - eSamplerYcbcrConversionKHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR - }; - - enum class VendorId - { - eVIV = VK_VENDOR_ID_VIV, - eVSI = VK_VENDOR_ID_VSI, - eKazan = VK_VENDOR_ID_KAZAN, - eCodeplay = VK_VENDOR_ID_CODEPLAY, - eMESA = VK_VENDOR_ID_MESA, - ePocl = VK_VENDOR_ID_POCL - }; - - enum class Format - { - eUndefined = VK_FORMAT_UNDEFINED, - eR4G4UnormPack8 = VK_FORMAT_R4G4_UNORM_PACK8, - eR4G4B4A4UnormPack16 = VK_FORMAT_R4G4B4A4_UNORM_PACK16, - eB4G4R4A4UnormPack16 = VK_FORMAT_B4G4R4A4_UNORM_PACK16, - eR5G6B5UnormPack16 = VK_FORMAT_R5G6B5_UNORM_PACK16, - eB5G6R5UnormPack16 = VK_FORMAT_B5G6R5_UNORM_PACK16, - eR5G5B5A1UnormPack16 = VK_FORMAT_R5G5B5A1_UNORM_PACK16, - eB5G5R5A1UnormPack16 = VK_FORMAT_B5G5R5A1_UNORM_PACK16, - eA1R5G5B5UnormPack16 = VK_FORMAT_A1R5G5B5_UNORM_PACK16, - eR8Unorm = VK_FORMAT_R8_UNORM, - eR8Snorm = VK_FORMAT_R8_SNORM, - eR8Uscaled = VK_FORMAT_R8_USCALED, - eR8Sscaled = VK_FORMAT_R8_SSCALED, - eR8Uint = VK_FORMAT_R8_UINT, - eR8Sint = VK_FORMAT_R8_SINT, - eR8Srgb = VK_FORMAT_R8_SRGB, - eR8G8Unorm = VK_FORMAT_R8G8_UNORM, - eR8G8Snorm = VK_FORMAT_R8G8_SNORM, - eR8G8Uscaled = VK_FORMAT_R8G8_USCALED, - eR8G8Sscaled = VK_FORMAT_R8G8_SSCALED, - eR8G8Uint = VK_FORMAT_R8G8_UINT, - eR8G8Sint = VK_FORMAT_R8G8_SINT, - eR8G8Srgb = VK_FORMAT_R8G8_SRGB, - eR8G8B8Unorm = VK_FORMAT_R8G8B8_UNORM, - eR8G8B8Snorm = VK_FORMAT_R8G8B8_SNORM, - eR8G8B8Uscaled = VK_FORMAT_R8G8B8_USCALED, - eR8G8B8Sscaled = VK_FORMAT_R8G8B8_SSCALED, - eR8G8B8Uint = VK_FORMAT_R8G8B8_UINT, - eR8G8B8Sint = VK_FORMAT_R8G8B8_SINT, - eR8G8B8Srgb = VK_FORMAT_R8G8B8_SRGB, - eB8G8R8Unorm = VK_FORMAT_B8G8R8_UNORM, - eB8G8R8Snorm = VK_FORMAT_B8G8R8_SNORM, - eB8G8R8Uscaled = VK_FORMAT_B8G8R8_USCALED, - eB8G8R8Sscaled = VK_FORMAT_B8G8R8_SSCALED, - eB8G8R8Uint = VK_FORMAT_B8G8R8_UINT, - eB8G8R8Sint = VK_FORMAT_B8G8R8_SINT, - eB8G8R8Srgb = VK_FORMAT_B8G8R8_SRGB, - eR8G8B8A8Unorm = VK_FORMAT_R8G8B8A8_UNORM, - eR8G8B8A8Snorm = VK_FORMAT_R8G8B8A8_SNORM, - eR8G8B8A8Uscaled = VK_FORMAT_R8G8B8A8_USCALED, - eR8G8B8A8Sscaled = VK_FORMAT_R8G8B8A8_SSCALED, - eR8G8B8A8Uint = VK_FORMAT_R8G8B8A8_UINT, - eR8G8B8A8Sint = VK_FORMAT_R8G8B8A8_SINT, - eR8G8B8A8Srgb = VK_FORMAT_R8G8B8A8_SRGB, - eB8G8R8A8Unorm = VK_FORMAT_B8G8R8A8_UNORM, - eB8G8R8A8Snorm = VK_FORMAT_B8G8R8A8_SNORM, - eB8G8R8A8Uscaled = VK_FORMAT_B8G8R8A8_USCALED, - eB8G8R8A8Sscaled = VK_FORMAT_B8G8R8A8_SSCALED, - eB8G8R8A8Uint = VK_FORMAT_B8G8R8A8_UINT, - eB8G8R8A8Sint = VK_FORMAT_B8G8R8A8_SINT, - eB8G8R8A8Srgb = VK_FORMAT_B8G8R8A8_SRGB, - eA8B8G8R8UnormPack32 = VK_FORMAT_A8B8G8R8_UNORM_PACK32, - eA8B8G8R8SnormPack32 = VK_FORMAT_A8B8G8R8_SNORM_PACK32, - eA8B8G8R8UscaledPack32 = VK_FORMAT_A8B8G8R8_USCALED_PACK32, - eA8B8G8R8SscaledPack32 = VK_FORMAT_A8B8G8R8_SSCALED_PACK32, - eA8B8G8R8UintPack32 = VK_FORMAT_A8B8G8R8_UINT_PACK32, - eA8B8G8R8SintPack32 = VK_FORMAT_A8B8G8R8_SINT_PACK32, - eA8B8G8R8SrgbPack32 = VK_FORMAT_A8B8G8R8_SRGB_PACK32, - eA2R10G10B10UnormPack32 = VK_FORMAT_A2R10G10B10_UNORM_PACK32, - eA2R10G10B10SnormPack32 = VK_FORMAT_A2R10G10B10_SNORM_PACK32, - eA2R10G10B10UscaledPack32 = VK_FORMAT_A2R10G10B10_USCALED_PACK32, - eA2R10G10B10SscaledPack32 = VK_FORMAT_A2R10G10B10_SSCALED_PACK32, - eA2R10G10B10UintPack32 = VK_FORMAT_A2R10G10B10_UINT_PACK32, - eA2R10G10B10SintPack32 = VK_FORMAT_A2R10G10B10_SINT_PACK32, - eA2B10G10R10UnormPack32 = VK_FORMAT_A2B10G10R10_UNORM_PACK32, - eA2B10G10R10SnormPack32 = VK_FORMAT_A2B10G10R10_SNORM_PACK32, - eA2B10G10R10UscaledPack32 = VK_FORMAT_A2B10G10R10_USCALED_PACK32, - eA2B10G10R10SscaledPack32 = VK_FORMAT_A2B10G10R10_SSCALED_PACK32, - eA2B10G10R10UintPack32 = VK_FORMAT_A2B10G10R10_UINT_PACK32, - eA2B10G10R10SintPack32 = VK_FORMAT_A2B10G10R10_SINT_PACK32, - eR16Unorm = VK_FORMAT_R16_UNORM, - eR16Snorm = VK_FORMAT_R16_SNORM, - eR16Uscaled = VK_FORMAT_R16_USCALED, - eR16Sscaled = VK_FORMAT_R16_SSCALED, - eR16Uint = VK_FORMAT_R16_UINT, - eR16Sint = VK_FORMAT_R16_SINT, - eR16Sfloat = VK_FORMAT_R16_SFLOAT, - eR16G16Unorm = VK_FORMAT_R16G16_UNORM, - eR16G16Snorm = VK_FORMAT_R16G16_SNORM, - eR16G16Uscaled = VK_FORMAT_R16G16_USCALED, - eR16G16Sscaled = VK_FORMAT_R16G16_SSCALED, - eR16G16Uint = VK_FORMAT_R16G16_UINT, - eR16G16Sint = VK_FORMAT_R16G16_SINT, - eR16G16Sfloat = VK_FORMAT_R16G16_SFLOAT, - eR16G16B16Unorm = VK_FORMAT_R16G16B16_UNORM, - eR16G16B16Snorm = VK_FORMAT_R16G16B16_SNORM, - eR16G16B16Uscaled = VK_FORMAT_R16G16B16_USCALED, - eR16G16B16Sscaled = VK_FORMAT_R16G16B16_SSCALED, - eR16G16B16Uint = VK_FORMAT_R16G16B16_UINT, - eR16G16B16Sint = VK_FORMAT_R16G16B16_SINT, - eR16G16B16Sfloat = VK_FORMAT_R16G16B16_SFLOAT, - eR16G16B16A16Unorm = VK_FORMAT_R16G16B16A16_UNORM, - eR16G16B16A16Snorm = VK_FORMAT_R16G16B16A16_SNORM, - eR16G16B16A16Uscaled = VK_FORMAT_R16G16B16A16_USCALED, - eR16G16B16A16Sscaled = VK_FORMAT_R16G16B16A16_SSCALED, - eR16G16B16A16Uint = VK_FORMAT_R16G16B16A16_UINT, - eR16G16B16A16Sint = VK_FORMAT_R16G16B16A16_SINT, - eR16G16B16A16Sfloat = VK_FORMAT_R16G16B16A16_SFLOAT, - eR32Uint = VK_FORMAT_R32_UINT, - eR32Sint = VK_FORMAT_R32_SINT, - eR32Sfloat = VK_FORMAT_R32_SFLOAT, - eR32G32Uint = VK_FORMAT_R32G32_UINT, - eR32G32Sint = VK_FORMAT_R32G32_SINT, - eR32G32Sfloat = VK_FORMAT_R32G32_SFLOAT, - eR32G32B32Uint = VK_FORMAT_R32G32B32_UINT, - eR32G32B32Sint = VK_FORMAT_R32G32B32_SINT, - eR32G32B32Sfloat = VK_FORMAT_R32G32B32_SFLOAT, - eR32G32B32A32Uint = VK_FORMAT_R32G32B32A32_UINT, - eR32G32B32A32Sint = VK_FORMAT_R32G32B32A32_SINT, - eR32G32B32A32Sfloat = VK_FORMAT_R32G32B32A32_SFLOAT, - eR64Uint = VK_FORMAT_R64_UINT, - eR64Sint = VK_FORMAT_R64_SINT, - eR64Sfloat = VK_FORMAT_R64_SFLOAT, - eR64G64Uint = VK_FORMAT_R64G64_UINT, - eR64G64Sint = VK_FORMAT_R64G64_SINT, - eR64G64Sfloat = VK_FORMAT_R64G64_SFLOAT, - eR64G64B64Uint = VK_FORMAT_R64G64B64_UINT, - eR64G64B64Sint = VK_FORMAT_R64G64B64_SINT, - eR64G64B64Sfloat = VK_FORMAT_R64G64B64_SFLOAT, - eR64G64B64A64Uint = VK_FORMAT_R64G64B64A64_UINT, - eR64G64B64A64Sint = VK_FORMAT_R64G64B64A64_SINT, - eR64G64B64A64Sfloat = VK_FORMAT_R64G64B64A64_SFLOAT, - eB10G11R11UfloatPack32 = VK_FORMAT_B10G11R11_UFLOAT_PACK32, - eE5B9G9R9UfloatPack32 = VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, - eD16Unorm = VK_FORMAT_D16_UNORM, - eX8D24UnormPack32 = VK_FORMAT_X8_D24_UNORM_PACK32, - eD32Sfloat = VK_FORMAT_D32_SFLOAT, - eS8Uint = VK_FORMAT_S8_UINT, - eD16UnormS8Uint = VK_FORMAT_D16_UNORM_S8_UINT, - eD24UnormS8Uint = VK_FORMAT_D24_UNORM_S8_UINT, - eD32SfloatS8Uint = VK_FORMAT_D32_SFLOAT_S8_UINT, - eBc1RgbUnormBlock = VK_FORMAT_BC1_RGB_UNORM_BLOCK, - eBc1RgbSrgbBlock = VK_FORMAT_BC1_RGB_SRGB_BLOCK, - eBc1RgbaUnormBlock = VK_FORMAT_BC1_RGBA_UNORM_BLOCK, - eBc1RgbaSrgbBlock = VK_FORMAT_BC1_RGBA_SRGB_BLOCK, - eBc2UnormBlock = VK_FORMAT_BC2_UNORM_BLOCK, - eBc2SrgbBlock = VK_FORMAT_BC2_SRGB_BLOCK, - eBc3UnormBlock = VK_FORMAT_BC3_UNORM_BLOCK, - eBc3SrgbBlock = VK_FORMAT_BC3_SRGB_BLOCK, - eBc4UnormBlock = VK_FORMAT_BC4_UNORM_BLOCK, - eBc4SnormBlock = VK_FORMAT_BC4_SNORM_BLOCK, - eBc5UnormBlock = VK_FORMAT_BC5_UNORM_BLOCK, - eBc5SnormBlock = VK_FORMAT_BC5_SNORM_BLOCK, - eBc6HUfloatBlock = VK_FORMAT_BC6H_UFLOAT_BLOCK, - eBc6HSfloatBlock = VK_FORMAT_BC6H_SFLOAT_BLOCK, - eBc7UnormBlock = VK_FORMAT_BC7_UNORM_BLOCK, - eBc7SrgbBlock = VK_FORMAT_BC7_SRGB_BLOCK, - eEtc2R8G8B8UnormBlock = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, - eEtc2R8G8B8SrgbBlock = VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, - eEtc2R8G8B8A1UnormBlock = VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, - eEtc2R8G8B8A1SrgbBlock = VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, - eEtc2R8G8B8A8UnormBlock = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, - eEtc2R8G8B8A8SrgbBlock = VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, - eEacR11UnormBlock = VK_FORMAT_EAC_R11_UNORM_BLOCK, - eEacR11SnormBlock = VK_FORMAT_EAC_R11_SNORM_BLOCK, - eEacR11G11UnormBlock = VK_FORMAT_EAC_R11G11_UNORM_BLOCK, - eEacR11G11SnormBlock = VK_FORMAT_EAC_R11G11_SNORM_BLOCK, - eAstc4x4UnormBlock = VK_FORMAT_ASTC_4x4_UNORM_BLOCK, - eAstc4x4SrgbBlock = VK_FORMAT_ASTC_4x4_SRGB_BLOCK, - eAstc5x4UnormBlock = VK_FORMAT_ASTC_5x4_UNORM_BLOCK, - eAstc5x4SrgbBlock = VK_FORMAT_ASTC_5x4_SRGB_BLOCK, - eAstc5x5UnormBlock = VK_FORMAT_ASTC_5x5_UNORM_BLOCK, - eAstc5x5SrgbBlock = VK_FORMAT_ASTC_5x5_SRGB_BLOCK, - eAstc6x5UnormBlock = VK_FORMAT_ASTC_6x5_UNORM_BLOCK, - eAstc6x5SrgbBlock = VK_FORMAT_ASTC_6x5_SRGB_BLOCK, - eAstc6x6UnormBlock = VK_FORMAT_ASTC_6x6_UNORM_BLOCK, - eAstc6x6SrgbBlock = VK_FORMAT_ASTC_6x6_SRGB_BLOCK, - eAstc8x5UnormBlock = VK_FORMAT_ASTC_8x5_UNORM_BLOCK, - eAstc8x5SrgbBlock = VK_FORMAT_ASTC_8x5_SRGB_BLOCK, - eAstc8x6UnormBlock = VK_FORMAT_ASTC_8x6_UNORM_BLOCK, - eAstc8x6SrgbBlock = VK_FORMAT_ASTC_8x6_SRGB_BLOCK, - eAstc8x8UnormBlock = VK_FORMAT_ASTC_8x8_UNORM_BLOCK, - eAstc8x8SrgbBlock = VK_FORMAT_ASTC_8x8_SRGB_BLOCK, - eAstc10x5UnormBlock = VK_FORMAT_ASTC_10x5_UNORM_BLOCK, - eAstc10x5SrgbBlock = VK_FORMAT_ASTC_10x5_SRGB_BLOCK, - eAstc10x6UnormBlock = VK_FORMAT_ASTC_10x6_UNORM_BLOCK, - eAstc10x6SrgbBlock = VK_FORMAT_ASTC_10x6_SRGB_BLOCK, - eAstc10x8UnormBlock = VK_FORMAT_ASTC_10x8_UNORM_BLOCK, - eAstc10x8SrgbBlock = VK_FORMAT_ASTC_10x8_SRGB_BLOCK, - eAstc10x10UnormBlock = VK_FORMAT_ASTC_10x10_UNORM_BLOCK, - eAstc10x10SrgbBlock = VK_FORMAT_ASTC_10x10_SRGB_BLOCK, - eAstc12x10UnormBlock = VK_FORMAT_ASTC_12x10_UNORM_BLOCK, - eAstc12x10SrgbBlock = VK_FORMAT_ASTC_12x10_SRGB_BLOCK, - eAstc12x12UnormBlock = VK_FORMAT_ASTC_12x12_UNORM_BLOCK, - eAstc12x12SrgbBlock = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, - eG8B8G8R8422Unorm = VK_FORMAT_G8B8G8R8_422_UNORM, - eB8G8R8G8422Unorm = VK_FORMAT_B8G8R8G8_422_UNORM, - eG8B8R83Plane420Unorm = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, - eG8B8R82Plane420Unorm = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, - eG8B8R83Plane422Unorm = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, - eG8B8R82Plane422Unorm = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, - eG8B8R83Plane444Unorm = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, - eR10X6UnormPack16 = VK_FORMAT_R10X6_UNORM_PACK16, - eR10X6G10X6Unorm2Pack16 = VK_FORMAT_R10X6G10X6_UNORM_2PACK16, - eR10X6G10X6B10X6A10X6Unorm4Pack16 = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, - eG10X6B10X6G10X6R10X6422Unorm4Pack16 = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, - eB10X6G10X6R10X6G10X6422Unorm4Pack16 = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, - eG10X6B10X6R10X63Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, - eG10X6B10X6R10X62Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, - eG10X6B10X6R10X63Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, - eG10X6B10X6R10X62Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, - eG10X6B10X6R10X63Plane444Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, - eR12X4UnormPack16 = VK_FORMAT_R12X4_UNORM_PACK16, - eR12X4G12X4Unorm2Pack16 = VK_FORMAT_R12X4G12X4_UNORM_2PACK16, - eR12X4G12X4B12X4A12X4Unorm4Pack16 = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, - eG12X4B12X4G12X4R12X4422Unorm4Pack16 = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, - eB12X4G12X4R12X4G12X4422Unorm4Pack16 = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, - eG12X4B12X4R12X43Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, - eG12X4B12X4R12X42Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, - eG12X4B12X4R12X43Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, - eG12X4B12X4R12X42Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, - eG12X4B12X4R12X43Plane444Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, - eG16B16G16R16422Unorm = VK_FORMAT_G16B16G16R16_422_UNORM, - eB16G16R16G16422Unorm = VK_FORMAT_B16G16R16G16_422_UNORM, - eG16B16R163Plane420Unorm = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, - eG16B16R162Plane420Unorm = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, - eG16B16R163Plane422Unorm = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, - eG16B16R162Plane422Unorm = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, - eG16B16R163Plane444Unorm = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, - eG8B8R82Plane444Unorm = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, - eG10X6B10X6R10X62Plane444Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, - eG12X4B12X4R12X42Plane444Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, - eG16B16R162Plane444Unorm = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM, - eA4R4G4B4UnormPack16 = VK_FORMAT_A4R4G4B4_UNORM_PACK16, - eA4B4G4R4UnormPack16 = VK_FORMAT_A4B4G4R4_UNORM_PACK16, - eAstc4x4SfloatBlock = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK, - eAstc5x4SfloatBlock = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK, - eAstc5x5SfloatBlock = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK, - eAstc6x5SfloatBlock = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK, - eAstc6x6SfloatBlock = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK, - eAstc8x5SfloatBlock = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK, - eAstc8x6SfloatBlock = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK, - eAstc8x8SfloatBlock = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK, - eAstc10x5SfloatBlock = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK, - eAstc10x6SfloatBlock = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK, - eAstc10x8SfloatBlock = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK, - eAstc10x10SfloatBlock = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK, - eAstc12x10SfloatBlock = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK, - eAstc12x12SfloatBlock = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK, - ePvrtc12BppUnormBlockIMG = VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, - ePvrtc14BppUnormBlockIMG = VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, - ePvrtc22BppUnormBlockIMG = VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, - ePvrtc24BppUnormBlockIMG = VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, - ePvrtc12BppSrgbBlockIMG = VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, - ePvrtc14BppSrgbBlockIMG = VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, - ePvrtc22BppSrgbBlockIMG = VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, - ePvrtc24BppSrgbBlockIMG = VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, - eA4B4G4R4UnormPack16EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT, - eA4R4G4B4UnormPack16EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, - eAstc10x10SfloatBlockEXT = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, - eAstc10x5SfloatBlockEXT = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, - eAstc10x6SfloatBlockEXT = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, - eAstc10x8SfloatBlockEXT = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, - eAstc12x10SfloatBlockEXT = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, - eAstc12x12SfloatBlockEXT = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT, - eAstc4x4SfloatBlockEXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, - eAstc5x4SfloatBlockEXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, - eAstc5x5SfloatBlockEXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, - eAstc6x5SfloatBlockEXT = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, - eAstc6x6SfloatBlockEXT = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, - eAstc8x5SfloatBlockEXT = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, - eAstc8x6SfloatBlockEXT = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, - eAstc8x8SfloatBlockEXT = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, - eB10X6G10X6R10X6G10X6422Unorm4Pack16KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR, - eB12X4G12X4R12X4G12X4422Unorm4Pack16KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR, - eB16G16R16G16422UnormKHR = VK_FORMAT_B16G16R16G16_422_UNORM_KHR, - eB8G8R8G8422UnormKHR = VK_FORMAT_B8G8R8G8_422_UNORM_KHR, - eG10X6B10X6G10X6R10X6422Unorm4Pack16KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR, - eG10X6B10X6R10X62Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR, - eG10X6B10X6R10X62Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR, - eG10X6B10X6R10X62Plane444Unorm3Pack16EXT = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT, - eG10X6B10X6R10X63Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR, - eG10X6B10X6R10X63Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR, - eG10X6B10X6R10X63Plane444Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR, - eG12X4B12X4G12X4R12X4422Unorm4Pack16KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR, - eG12X4B12X4R12X42Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR, - eG12X4B12X4R12X42Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR, - eG12X4B12X4R12X42Plane444Unorm3Pack16EXT = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT, - eG12X4B12X4R12X43Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR, - eG12X4B12X4R12X43Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR, - eG12X4B12X4R12X43Plane444Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR, - eG16B16G16R16422UnormKHR = VK_FORMAT_G16B16G16R16_422_UNORM_KHR, - eG16B16R162Plane420UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR, - eG16B16R162Plane422UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR, - eG16B16R162Plane444UnormEXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT, - eG16B16R163Plane420UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR, - eG16B16R163Plane422UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR, - eG16B16R163Plane444UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR, - eG8B8G8R8422UnormKHR = VK_FORMAT_G8B8G8R8_422_UNORM_KHR, - eG8B8R82Plane420UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR, - eG8B8R82Plane422UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR, - eG8B8R82Plane444UnormEXT = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT, - eG8B8R83Plane420UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR, - eG8B8R83Plane422UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR, - eG8B8R83Plane444UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR, - eR10X6G10X6B10X6A10X6Unorm4Pack16KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR, - eR10X6G10X6Unorm2Pack16KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR, - eR10X6UnormPack16KHR = VK_FORMAT_R10X6_UNORM_PACK16_KHR, - eR12X4G12X4B12X4A12X4Unorm4Pack16KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR, - eR12X4G12X4Unorm2Pack16KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR, - eR12X4UnormPack16KHR = VK_FORMAT_R12X4_UNORM_PACK16_KHR - }; - - enum class FormatFeatureFlagBits : VkFormatFeatureFlags - { - eSampledImage = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, - eStorageImage = VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, - eStorageImageAtomic = VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT, - eUniformTexelBuffer = VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT, - eStorageTexelBuffer = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT, - eStorageTexelBufferAtomic = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, - eVertexBuffer = VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT, - eColorAttachment = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, - eColorAttachmentBlend = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, - eDepthStencilAttachment = VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, - eBlitSrc = VK_FORMAT_FEATURE_BLIT_SRC_BIT, - eBlitDst = VK_FORMAT_FEATURE_BLIT_DST_BIT, - eSampledImageFilterLinear = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT, - eTransferSrc = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, - eTransferDst = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, - eMidpointChromaSamples = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, - eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, - eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, - eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, - eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, - eDisjoint = VK_FORMAT_FEATURE_DISJOINT_BIT, - eCositedChromaSamples = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, - eSampledImageFilterMinmax = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeOutputKHR = VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR, - eVideoDecodeDpbKHR = VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eAccelerationStructureVertexBufferKHR = VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR, - eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, - eFragmentDensityMapEXT = VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT, - eFragmentShadingRateAttachmentKHR = VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeInputKHR = VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR, - eVideoEncodeDpbKHR = VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR, - eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, - eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, - eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG, - eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT, - eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR, - eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, - eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, - eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR, - eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, - eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR - }; - - enum class ImageCreateFlagBits : VkImageCreateFlags - { - eSparseBinding = VK_IMAGE_CREATE_SPARSE_BINDING_BIT, - eSparseResidency = VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, - eSparseAliased = VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, - eMutableFormat = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, - eCubeCompatible = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, - eAlias = VK_IMAGE_CREATE_ALIAS_BIT, - eSplitInstanceBindRegions = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, - e2DArrayCompatible = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, - eBlockTexelViewCompatible = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, - eExtendedUsage = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, - eProtected = VK_IMAGE_CREATE_PROTECTED_BIT, - eDisjoint = VK_IMAGE_CREATE_DISJOINT_BIT, - eCornerSampledNV = VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, - eSampleLocationsCompatibleDepthEXT = VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, - eSubsampledEXT = VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, - eMultisampledRenderToSingleSampledEXT = VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT, - e2DViewCompatibleEXT = VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT, - eFragmentDensityMapOffsetQCOM = VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM, - e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, - eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT_KHR, - eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, - eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT_KHR, - eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR, - eSplitInstanceBindRegionsKHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR - }; - - enum class ImageTiling - { - eOptimal = VK_IMAGE_TILING_OPTIMAL, - eLinear = VK_IMAGE_TILING_LINEAR, - eDrmFormatModifierEXT = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT - }; - - enum class ImageType - { - e1D = VK_IMAGE_TYPE_1D, - e2D = VK_IMAGE_TYPE_2D, - e3D = VK_IMAGE_TYPE_3D - }; - - enum class ImageUsageFlagBits : VkImageUsageFlags - { - eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT, - eTransferDst = VK_IMAGE_USAGE_TRANSFER_DST_BIT, - eSampled = VK_IMAGE_USAGE_SAMPLED_BIT, - eStorage = VK_IMAGE_USAGE_STORAGE_BIT, - eColorAttachment = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, - eDepthStencilAttachment = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, - eTransientAttachment = VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, - eInputAttachment = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeDstKHR = VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, - eVideoDecodeSrcKHR = VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, - eVideoDecodeDpbKHR = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eFragmentDensityMapEXT = VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, - eFragmentShadingRateAttachmentKHR = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeDstKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, - eVideoEncodeSrcKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, - eVideoEncodeDpbKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eAttachmentFeedbackLoopEXT = VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, - eInvocationMaskHUAWEI = VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI, - eSampleWeightQCOM = VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM, - eSampleBlockMatchQCOM = VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM, - eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV - }; - - enum class InstanceCreateFlagBits : VkInstanceCreateFlags - { - eEnumeratePortabilityKHR = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR - }; - - enum class InternalAllocationType - { - eExecutable = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - }; - - enum class MemoryHeapFlagBits : VkMemoryHeapFlags - { - eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, - eMultiInstance = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, - eMultiInstanceKHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR - }; - - enum class MemoryPropertyFlagBits : VkMemoryPropertyFlags - { - eDeviceLocal = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, - eHostVisible = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, - eHostCoherent = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, - eHostCached = VK_MEMORY_PROPERTY_HOST_CACHED_BIT, - eLazilyAllocated = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT, - eProtected = VK_MEMORY_PROPERTY_PROTECTED_BIT, - eDeviceCoherentAMD = VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, - eDeviceUncachedAMD = VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD, - eRdmaCapableNV = VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV - }; - - enum class PhysicalDeviceType - { - eOther = VK_PHYSICAL_DEVICE_TYPE_OTHER, - eIntegratedGpu = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, - eDiscreteGpu = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, - eVirtualGpu = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, - eCpu = VK_PHYSICAL_DEVICE_TYPE_CPU - }; - - enum class QueueFlagBits : VkQueueFlags - { - eGraphics = VK_QUEUE_GRAPHICS_BIT, - eCompute = VK_QUEUE_COMPUTE_BIT, - eTransfer = VK_QUEUE_TRANSFER_BIT, - eSparseBinding = VK_QUEUE_SPARSE_BINDING_BIT, - eProtected = VK_QUEUE_PROTECTED_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeKHR = VK_QUEUE_VIDEO_DECODE_BIT_KHR, - eVideoEncodeKHR = VK_QUEUE_VIDEO_ENCODE_BIT_KHR -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - - enum class SampleCountFlagBits : VkSampleCountFlags - { - e1 = VK_SAMPLE_COUNT_1_BIT, - e2 = VK_SAMPLE_COUNT_2_BIT, - e4 = VK_SAMPLE_COUNT_4_BIT, - e8 = VK_SAMPLE_COUNT_8_BIT, - e16 = VK_SAMPLE_COUNT_16_BIT, - e32 = VK_SAMPLE_COUNT_32_BIT, - e64 = VK_SAMPLE_COUNT_64_BIT - }; - - enum class SystemAllocationScope - { - eCommand = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, - eObject = VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, - eCache = VK_SYSTEM_ALLOCATION_SCOPE_CACHE, - eDevice = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE, - eInstance = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - }; - - enum class DeviceCreateFlagBits - { - }; - - enum class PipelineStageFlagBits : VkPipelineStageFlags - { - eTopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, - eDrawIndirect = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, - eVertexInput = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, - eVertexShader = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, - eTessellationControlShader = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, - eTessellationEvaluationShader = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, - eGeometryShader = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, - eFragmentShader = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, - eEarlyFragmentTests = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, - eLateFragmentTests = VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, - eColorAttachmentOutput = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, - eComputeShader = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, - eTransfer = VK_PIPELINE_STAGE_TRANSFER_BIT, - eBottomOfPipe = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, - eHost = VK_PIPELINE_STAGE_HOST_BIT, - eAllGraphics = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, - eAllCommands = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - eNone = VK_PIPELINE_STAGE_NONE, - eTransformFeedbackEXT = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT, - eConditionalRenderingEXT = VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT, - eAccelerationStructureBuildKHR = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, - eRayTracingShaderKHR = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, - eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT, - eFragmentShadingRateAttachmentKHR = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, - eCommandPreprocessNV = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV, - eTaskShaderEXT = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT, - eMeshShaderEXT = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT, - eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV, - eMeshShaderNV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV, - eNoneKHR = VK_PIPELINE_STAGE_NONE_KHR, - eRayTracingShaderNV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV, - eShadingRateImageNV = VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV, - eTaskShaderNV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV - }; - - enum class MemoryMapFlagBits : VkMemoryMapFlags - { - }; - - enum class ImageAspectFlagBits : VkImageAspectFlags - { - eColor = VK_IMAGE_ASPECT_COLOR_BIT, - eDepth = VK_IMAGE_ASPECT_DEPTH_BIT, - eStencil = VK_IMAGE_ASPECT_STENCIL_BIT, - eMetadata = VK_IMAGE_ASPECT_METADATA_BIT, - ePlane0 = VK_IMAGE_ASPECT_PLANE_0_BIT, - ePlane1 = VK_IMAGE_ASPECT_PLANE_1_BIT, - ePlane2 = VK_IMAGE_ASPECT_PLANE_2_BIT, - eNone = VK_IMAGE_ASPECT_NONE, - eMemoryPlane0EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT, - eMemoryPlane1EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT, - eMemoryPlane2EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT, - eMemoryPlane3EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT, - eNoneKHR = VK_IMAGE_ASPECT_NONE_KHR, - ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, - ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, - ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR - }; - - enum class SparseImageFormatFlagBits : VkSparseImageFormatFlags - { - eSingleMiptail = VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, - eAlignedMipSize = VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT, - eNonstandardBlockSize = VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT - }; - - enum class SparseMemoryBindFlagBits : VkSparseMemoryBindFlags - { - eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT - }; - - enum class FenceCreateFlagBits : VkFenceCreateFlags - { - eSignaled = VK_FENCE_CREATE_SIGNALED_BIT - }; - - enum class SemaphoreCreateFlagBits : VkSemaphoreCreateFlags - { - }; - - enum class EventCreateFlagBits : VkEventCreateFlags - { - eDeviceOnly = VK_EVENT_CREATE_DEVICE_ONLY_BIT, - eDeviceOnlyKHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR - }; - - enum class QueryPipelineStatisticFlagBits : VkQueryPipelineStatisticFlags - { - eInputAssemblyVertices = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, - eInputAssemblyPrimitives = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, - eVertexShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, - eGeometryShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, - eGeometryShaderPrimitives = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, - eClippingInvocations = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, - eClippingPrimitives = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, - eFragmentShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT, - eTessellationControlShaderPatches = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, - eTessellationEvaluationShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT, - eComputeShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT, - eTaskShaderInvocationsEXT = VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT, - eMeshShaderInvocationsEXT = VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT - }; - - enum class QueryResultFlagBits : VkQueryResultFlags - { - e64 = VK_QUERY_RESULT_64_BIT, - eWait = VK_QUERY_RESULT_WAIT_BIT, - eWithAvailability = VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, - ePartial = VK_QUERY_RESULT_PARTIAL_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eWithStatusKHR = VK_QUERY_RESULT_WITH_STATUS_BIT_KHR -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - - enum class QueryType - { - eOcclusion = VK_QUERY_TYPE_OCCLUSION, - ePipelineStatistics = VK_QUERY_TYPE_PIPELINE_STATISTICS, - eTimestamp = VK_QUERY_TYPE_TIMESTAMP, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eResultStatusOnlyKHR = VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eTransformFeedbackStreamEXT = VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT, - ePerformanceQueryKHR = VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, - eAccelerationStructureCompactedSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, - eAccelerationStructureSerializationSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, - eAccelerationStructureCompactedSizeNV = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV, - ePerformanceQueryINTEL = VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeBitstreamBufferRangeKHR = VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eMeshPrimitivesGeneratedEXT = VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT, - ePrimitivesGeneratedEXT = VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, - eAccelerationStructureSerializationBottomLevelPointersKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, - eAccelerationStructureSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR - }; - - enum class QueryPoolCreateFlagBits - { - }; - - enum class BufferCreateFlagBits : VkBufferCreateFlags - { - eSparseBinding = VK_BUFFER_CREATE_SPARSE_BINDING_BIT, - eSparseResidency = VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, - eSparseAliased = VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, - eProtected = VK_BUFFER_CREATE_PROTECTED_BIT, - eDeviceAddressCaptureReplay = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, - eDeviceAddressCaptureReplayEXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT, - eDeviceAddressCaptureReplayKHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR - }; - - enum class BufferUsageFlagBits : VkBufferUsageFlags - { - eTransferSrc = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, - eTransferDst = VK_BUFFER_USAGE_TRANSFER_DST_BIT, - eUniformTexelBuffer = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, - eStorageTexelBuffer = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, - eUniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, - eStorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, - eIndexBuffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, - eVertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, - eIndirectBuffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, - eShaderDeviceAddress = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeSrcKHR = VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR, - eVideoDecodeDstKHR = VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eTransformFeedbackBufferEXT = VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, - eTransformFeedbackCounterBufferEXT = VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT, - eConditionalRenderingEXT = VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT, - eAccelerationStructureBuildInputReadOnlyKHR = VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR, - eAccelerationStructureStorageKHR = VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, - eShaderBindingTableKHR = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeDstKHR = VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR, - eVideoEncodeSrcKHR = VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eRayTracingNV = VK_BUFFER_USAGE_RAY_TRACING_BIT_NV, - eShaderDeviceAddressEXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT, - eShaderDeviceAddressKHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR - }; - - enum class SharingMode - { - eExclusive = VK_SHARING_MODE_EXCLUSIVE, - eConcurrent = VK_SHARING_MODE_CONCURRENT - }; - - enum class BufferViewCreateFlagBits : VkBufferViewCreateFlags - { - }; - - enum class ImageLayout - { - eUndefined = VK_IMAGE_LAYOUT_UNDEFINED, - eGeneral = VK_IMAGE_LAYOUT_GENERAL, - eColorAttachmentOptimal = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, - eDepthStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, - eDepthStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, - eShaderReadOnlyOptimal = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, - eTransferSrcOptimal = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - eTransferDstOptimal = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - ePreinitialized = VK_IMAGE_LAYOUT_PREINITIALIZED, - eDepthReadOnlyStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, - eDepthAttachmentStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, - eDepthAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, - eDepthReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, - eStencilAttachmentOptimal = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, - eStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, - eReadOnlyOptimal = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, - eAttachmentOptimal = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, - ePresentSrcKHR = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeDstKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, - eVideoDecodeSrcKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR, - eVideoDecodeDpbKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, - eFragmentDensityMapOptimalEXT = VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT, - eFragmentShadingRateAttachmentOptimalKHR = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeDstKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR, - eVideoEncodeSrcKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR, - eVideoEncodeDpbKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eAttachmentFeedbackLoopOptimalEXT = VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT, - eAttachmentOptimalKHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR, - eDepthAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, - eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, - eDepthReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, - eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, - eReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR, - eShadingRateOptimalNV = VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV, - eStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, - eStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR - }; - - enum class ComponentSwizzle - { - eIdentity = VK_COMPONENT_SWIZZLE_IDENTITY, - eZero = VK_COMPONENT_SWIZZLE_ZERO, - eOne = VK_COMPONENT_SWIZZLE_ONE, - eR = VK_COMPONENT_SWIZZLE_R, - eG = VK_COMPONENT_SWIZZLE_G, - eB = VK_COMPONENT_SWIZZLE_B, - eA = VK_COMPONENT_SWIZZLE_A - }; - - enum class ImageViewCreateFlagBits : VkImageViewCreateFlags - { - eFragmentDensityMapDynamicEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT, - eFragmentDensityMapDeferredEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT - }; - - enum class ImageViewType - { - e1D = VK_IMAGE_VIEW_TYPE_1D, - e2D = VK_IMAGE_VIEW_TYPE_2D, - e3D = VK_IMAGE_VIEW_TYPE_3D, - eCube = VK_IMAGE_VIEW_TYPE_CUBE, - e1DArray = VK_IMAGE_VIEW_TYPE_1D_ARRAY, - e2DArray = VK_IMAGE_VIEW_TYPE_2D_ARRAY, - eCubeArray = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - }; - - enum class ShaderModuleCreateFlagBits : VkShaderModuleCreateFlags - { - }; - - enum class BlendFactor - { - eZero = VK_BLEND_FACTOR_ZERO, - eOne = VK_BLEND_FACTOR_ONE, - eSrcColor = VK_BLEND_FACTOR_SRC_COLOR, - eOneMinusSrcColor = VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, - eDstColor = VK_BLEND_FACTOR_DST_COLOR, - eOneMinusDstColor = VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, - eSrcAlpha = VK_BLEND_FACTOR_SRC_ALPHA, - eOneMinusSrcAlpha = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, - eDstAlpha = VK_BLEND_FACTOR_DST_ALPHA, - eOneMinusDstAlpha = VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, - eConstantColor = VK_BLEND_FACTOR_CONSTANT_COLOR, - eOneMinusConstantColor = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, - eConstantAlpha = VK_BLEND_FACTOR_CONSTANT_ALPHA, - eOneMinusConstantAlpha = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, - eSrcAlphaSaturate = VK_BLEND_FACTOR_SRC_ALPHA_SATURATE, - eSrc1Color = VK_BLEND_FACTOR_SRC1_COLOR, - eOneMinusSrc1Color = VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, - eSrc1Alpha = VK_BLEND_FACTOR_SRC1_ALPHA, - eOneMinusSrc1Alpha = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - }; - - enum class BlendOp - { - eAdd = VK_BLEND_OP_ADD, - eSubtract = VK_BLEND_OP_SUBTRACT, - eReverseSubtract = VK_BLEND_OP_REVERSE_SUBTRACT, - eMin = VK_BLEND_OP_MIN, - eMax = VK_BLEND_OP_MAX, - eZeroEXT = VK_BLEND_OP_ZERO_EXT, - eSrcEXT = VK_BLEND_OP_SRC_EXT, - eDstEXT = VK_BLEND_OP_DST_EXT, - eSrcOverEXT = VK_BLEND_OP_SRC_OVER_EXT, - eDstOverEXT = VK_BLEND_OP_DST_OVER_EXT, - eSrcInEXT = VK_BLEND_OP_SRC_IN_EXT, - eDstInEXT = VK_BLEND_OP_DST_IN_EXT, - eSrcOutEXT = VK_BLEND_OP_SRC_OUT_EXT, - eDstOutEXT = VK_BLEND_OP_DST_OUT_EXT, - eSrcAtopEXT = VK_BLEND_OP_SRC_ATOP_EXT, - eDstAtopEXT = VK_BLEND_OP_DST_ATOP_EXT, - eXorEXT = VK_BLEND_OP_XOR_EXT, - eMultiplyEXT = VK_BLEND_OP_MULTIPLY_EXT, - eScreenEXT = VK_BLEND_OP_SCREEN_EXT, - eOverlayEXT = VK_BLEND_OP_OVERLAY_EXT, - eDarkenEXT = VK_BLEND_OP_DARKEN_EXT, - eLightenEXT = VK_BLEND_OP_LIGHTEN_EXT, - eColordodgeEXT = VK_BLEND_OP_COLORDODGE_EXT, - eColorburnEXT = VK_BLEND_OP_COLORBURN_EXT, - eHardlightEXT = VK_BLEND_OP_HARDLIGHT_EXT, - eSoftlightEXT = VK_BLEND_OP_SOFTLIGHT_EXT, - eDifferenceEXT = VK_BLEND_OP_DIFFERENCE_EXT, - eExclusionEXT = VK_BLEND_OP_EXCLUSION_EXT, - eInvertEXT = VK_BLEND_OP_INVERT_EXT, - eInvertRgbEXT = VK_BLEND_OP_INVERT_RGB_EXT, - eLineardodgeEXT = VK_BLEND_OP_LINEARDODGE_EXT, - eLinearburnEXT = VK_BLEND_OP_LINEARBURN_EXT, - eVividlightEXT = VK_BLEND_OP_VIVIDLIGHT_EXT, - eLinearlightEXT = VK_BLEND_OP_LINEARLIGHT_EXT, - ePinlightEXT = VK_BLEND_OP_PINLIGHT_EXT, - eHardmixEXT = VK_BLEND_OP_HARDMIX_EXT, - eHslHueEXT = VK_BLEND_OP_HSL_HUE_EXT, - eHslSaturationEXT = VK_BLEND_OP_HSL_SATURATION_EXT, - eHslColorEXT = VK_BLEND_OP_HSL_COLOR_EXT, - eHslLuminosityEXT = VK_BLEND_OP_HSL_LUMINOSITY_EXT, - ePlusEXT = VK_BLEND_OP_PLUS_EXT, - ePlusClampedEXT = VK_BLEND_OP_PLUS_CLAMPED_EXT, - ePlusClampedAlphaEXT = VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT, - ePlusDarkerEXT = VK_BLEND_OP_PLUS_DARKER_EXT, - eMinusEXT = VK_BLEND_OP_MINUS_EXT, - eMinusClampedEXT = VK_BLEND_OP_MINUS_CLAMPED_EXT, - eContrastEXT = VK_BLEND_OP_CONTRAST_EXT, - eInvertOvgEXT = VK_BLEND_OP_INVERT_OVG_EXT, - eRedEXT = VK_BLEND_OP_RED_EXT, - eGreenEXT = VK_BLEND_OP_GREEN_EXT, - eBlueEXT = VK_BLEND_OP_BLUE_EXT - }; - - enum class ColorComponentFlagBits : VkColorComponentFlags - { - eR = VK_COLOR_COMPONENT_R_BIT, - eG = VK_COLOR_COMPONENT_G_BIT, - eB = VK_COLOR_COMPONENT_B_BIT, - eA = VK_COLOR_COMPONENT_A_BIT - }; - - enum class CompareOp - { - eNever = VK_COMPARE_OP_NEVER, - eLess = VK_COMPARE_OP_LESS, - eEqual = VK_COMPARE_OP_EQUAL, - eLessOrEqual = VK_COMPARE_OP_LESS_OR_EQUAL, - eGreater = VK_COMPARE_OP_GREATER, - eNotEqual = VK_COMPARE_OP_NOT_EQUAL, - eGreaterOrEqual = VK_COMPARE_OP_GREATER_OR_EQUAL, - eAlways = VK_COMPARE_OP_ALWAYS - }; - - enum class CullModeFlagBits : VkCullModeFlags - { - eNone = VK_CULL_MODE_NONE, - eFront = VK_CULL_MODE_FRONT_BIT, - eBack = VK_CULL_MODE_BACK_BIT, - eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK - }; - - enum class DynamicState - { - eViewport = VK_DYNAMIC_STATE_VIEWPORT, - eScissor = VK_DYNAMIC_STATE_SCISSOR, - eLineWidth = VK_DYNAMIC_STATE_LINE_WIDTH, - eDepthBias = VK_DYNAMIC_STATE_DEPTH_BIAS, - eBlendConstants = VK_DYNAMIC_STATE_BLEND_CONSTANTS, - eDepthBounds = VK_DYNAMIC_STATE_DEPTH_BOUNDS, - eStencilCompareMask = VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, - eStencilWriteMask = VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, - eStencilReference = VK_DYNAMIC_STATE_STENCIL_REFERENCE, - eCullMode = VK_DYNAMIC_STATE_CULL_MODE, - eFrontFace = VK_DYNAMIC_STATE_FRONT_FACE, - ePrimitiveTopology = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, - eViewportWithCount = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, - eScissorWithCount = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, - eVertexInputBindingStride = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, - eDepthTestEnable = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, - eDepthWriteEnable = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, - eDepthCompareOp = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, - eDepthBoundsTestEnable = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, - eStencilTestEnable = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, - eStencilOp = VK_DYNAMIC_STATE_STENCIL_OP, - eRasterizerDiscardEnable = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, - eDepthBiasEnable = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, - ePrimitiveRestartEnable = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, - eViewportWScalingNV = VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, - eDiscardRectangleEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, - eSampleLocationsEXT = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, - eRayTracingPipelineStackSizeKHR = VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR, - eViewportShadingRatePaletteNV = VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV, - eViewportCoarseSampleOrderNV = VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV, - eExclusiveScissorNV = VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV, - eFragmentShadingRateKHR = VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, - eLineStippleEXT = VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, - eVertexInputEXT = VK_DYNAMIC_STATE_VERTEX_INPUT_EXT, - ePatchControlPointsEXT = VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT, - eLogicOpEXT = VK_DYNAMIC_STATE_LOGIC_OP_EXT, - eColorWriteEnableEXT = VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT, - eCullModeEXT = VK_DYNAMIC_STATE_CULL_MODE_EXT, - eDepthBiasEnableEXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT, - eDepthBoundsTestEnableEXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT, - eDepthCompareOpEXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT, - eDepthTestEnableEXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT, - eDepthWriteEnableEXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT, - eFrontFaceEXT = VK_DYNAMIC_STATE_FRONT_FACE_EXT, - ePrimitiveRestartEnableEXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT, - ePrimitiveTopologyEXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT, - eRasterizerDiscardEnableEXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT, - eScissorWithCountEXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT, - eStencilOpEXT = VK_DYNAMIC_STATE_STENCIL_OP_EXT, - eStencilTestEnableEXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT, - eVertexInputBindingStrideEXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT, - eViewportWithCountEXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT - }; - - enum class FrontFace - { - eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE, - eClockwise = VK_FRONT_FACE_CLOCKWISE - }; - - enum class LogicOp - { - eClear = VK_LOGIC_OP_CLEAR, - eAnd = VK_LOGIC_OP_AND, - eAndReverse = VK_LOGIC_OP_AND_REVERSE, - eCopy = VK_LOGIC_OP_COPY, - eAndInverted = VK_LOGIC_OP_AND_INVERTED, - eNoOp = VK_LOGIC_OP_NO_OP, - eXor = VK_LOGIC_OP_XOR, - eOr = VK_LOGIC_OP_OR, - eNor = VK_LOGIC_OP_NOR, - eEquivalent = VK_LOGIC_OP_EQUIVALENT, - eInvert = VK_LOGIC_OP_INVERT, - eOrReverse = VK_LOGIC_OP_OR_REVERSE, - eCopyInverted = VK_LOGIC_OP_COPY_INVERTED, - eOrInverted = VK_LOGIC_OP_OR_INVERTED, - eNand = VK_LOGIC_OP_NAND, - eSet = VK_LOGIC_OP_SET - }; - - enum class PipelineCreateFlagBits : VkPipelineCreateFlags - { - eDisableOptimization = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, - eAllowDerivatives = VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, - eDerivative = VK_PIPELINE_CREATE_DERIVATIVE_BIT, - eViewIndexFromDeviceIndex = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, - eDispatchBase = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, - eFailOnPipelineCompileRequired = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, - eEarlyReturnOnFailure = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, - eRenderingFragmentShadingRateAttachmentKHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, - eRenderingFragmentDensityMapAttachmentEXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, - eRayTracingNoNullAnyHitShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, - eRayTracingNoNullClosestHitShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, - eRayTracingNoNullMissShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, - eRayTracingNoNullIntersectionShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, - eRayTracingSkipTrianglesKHR = VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, - eRayTracingSkipAabbsKHR = VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, - eRayTracingShaderGroupHandleCaptureReplayKHR = VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, - eDeferCompileNV = VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV, - eCaptureStatisticsKHR = VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR, - eCaptureInternalRepresentationsKHR = VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, - eIndirectBindableNV = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, - eLibraryKHR = VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, - eRetainLinkTimeOptimizationInfoEXT = VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, - eLinkTimeOptimizationEXT = VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, - eRayTracingAllowMotionNV = VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV, - eColorAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, - eDepthStencilAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, - eDispatchBaseKHR = VK_PIPELINE_CREATE_DISPATCH_BASE_KHR, - eEarlyReturnOnFailureEXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT, - eFailOnPipelineCompileRequiredEXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT, - eViewIndexFromDeviceIndexKHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR, - eVkPipelineRasterizationStateCreateFragmentDensityMapAttachmentEXT = VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, - eVkPipelineRasterizationStateCreateFragmentShadingRateAttachmentKHR = VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR - }; - - enum class PipelineShaderStageCreateFlagBits : VkPipelineShaderStageCreateFlags - { - eAllowVaryingSubgroupSize = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT, - eRequireFullSubgroups = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, - eAllowVaryingSubgroupSizeEXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT, - eRequireFullSubgroupsEXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT - }; - - enum class PolygonMode - { - eFill = VK_POLYGON_MODE_FILL, - eLine = VK_POLYGON_MODE_LINE, - ePoint = VK_POLYGON_MODE_POINT, - eFillRectangleNV = VK_POLYGON_MODE_FILL_RECTANGLE_NV - }; - - enum class PrimitiveTopology - { - ePointList = VK_PRIMITIVE_TOPOLOGY_POINT_LIST, - eLineList = VK_PRIMITIVE_TOPOLOGY_LINE_LIST, - eLineStrip = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, - eTriangleList = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, - eTriangleStrip = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, - eTriangleFan = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, - eLineListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, - eLineStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, - eTriangleListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, - eTriangleStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, - ePatchList = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - }; - - enum class ShaderStageFlagBits : VkShaderStageFlags - { - eVertex = VK_SHADER_STAGE_VERTEX_BIT, - eTessellationControl = VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, - eTessellationEvaluation = VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, - eGeometry = VK_SHADER_STAGE_GEOMETRY_BIT, - eFragment = VK_SHADER_STAGE_FRAGMENT_BIT, - eCompute = VK_SHADER_STAGE_COMPUTE_BIT, - eAllGraphics = VK_SHADER_STAGE_ALL_GRAPHICS, - eAll = VK_SHADER_STAGE_ALL, - eRaygenKHR = VK_SHADER_STAGE_RAYGEN_BIT_KHR, - eAnyHitKHR = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, - eClosestHitKHR = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, - eMissKHR = VK_SHADER_STAGE_MISS_BIT_KHR, - eIntersectionKHR = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, - eCallableKHR = VK_SHADER_STAGE_CALLABLE_BIT_KHR, - eTaskEXT = VK_SHADER_STAGE_TASK_BIT_EXT, - eMeshEXT = VK_SHADER_STAGE_MESH_BIT_EXT, - eSubpassShadingHUAWEI = VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI, - eAnyHitNV = VK_SHADER_STAGE_ANY_HIT_BIT_NV, - eCallableNV = VK_SHADER_STAGE_CALLABLE_BIT_NV, - eClosestHitNV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV, - eIntersectionNV = VK_SHADER_STAGE_INTERSECTION_BIT_NV, - eMeshNV = VK_SHADER_STAGE_MESH_BIT_NV, - eMissNV = VK_SHADER_STAGE_MISS_BIT_NV, - eRaygenNV = VK_SHADER_STAGE_RAYGEN_BIT_NV, - eTaskNV = VK_SHADER_STAGE_TASK_BIT_NV - }; - - enum class StencilOp - { - eKeep = VK_STENCIL_OP_KEEP, - eZero = VK_STENCIL_OP_ZERO, - eReplace = VK_STENCIL_OP_REPLACE, - eIncrementAndClamp = VK_STENCIL_OP_INCREMENT_AND_CLAMP, - eDecrementAndClamp = VK_STENCIL_OP_DECREMENT_AND_CLAMP, - eInvert = VK_STENCIL_OP_INVERT, - eIncrementAndWrap = VK_STENCIL_OP_INCREMENT_AND_WRAP, - eDecrementAndWrap = VK_STENCIL_OP_DECREMENT_AND_WRAP - }; - - enum class VertexInputRate - { - eVertex = VK_VERTEX_INPUT_RATE_VERTEX, - eInstance = VK_VERTEX_INPUT_RATE_INSTANCE - }; - - enum class PipelineDynamicStateCreateFlagBits : VkPipelineDynamicStateCreateFlags - { - }; - - enum class PipelineInputAssemblyStateCreateFlagBits : VkPipelineInputAssemblyStateCreateFlags - { - }; - - enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags - { - }; - - enum class PipelineRasterizationStateCreateFlagBits : VkPipelineRasterizationStateCreateFlags - { - }; - - enum class PipelineTessellationStateCreateFlagBits : VkPipelineTessellationStateCreateFlags - { - }; - - enum class PipelineVertexInputStateCreateFlagBits : VkPipelineVertexInputStateCreateFlags - { - }; - - enum class PipelineViewportStateCreateFlagBits : VkPipelineViewportStateCreateFlags - { - }; - - enum class BorderColor - { - eFloatTransparentBlack = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, - eIntTransparentBlack = VK_BORDER_COLOR_INT_TRANSPARENT_BLACK, - eFloatOpaqueBlack = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, - eIntOpaqueBlack = VK_BORDER_COLOR_INT_OPAQUE_BLACK, - eFloatOpaqueWhite = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, - eIntOpaqueWhite = VK_BORDER_COLOR_INT_OPAQUE_WHITE, - eFloatCustomEXT = VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, - eIntCustomEXT = VK_BORDER_COLOR_INT_CUSTOM_EXT - }; - - enum class Filter - { - eNearest = VK_FILTER_NEAREST, - eLinear = VK_FILTER_LINEAR, - eCubicEXT = VK_FILTER_CUBIC_EXT, - eCubicIMG = VK_FILTER_CUBIC_IMG - }; - - enum class SamplerAddressMode - { - eRepeat = VK_SAMPLER_ADDRESS_MODE_REPEAT, - eMirroredRepeat = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, - eClampToEdge = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, - eClampToBorder = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, - eMirrorClampToEdge = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, - eMirrorClampToEdgeKHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR - }; - - enum class SamplerCreateFlagBits : VkSamplerCreateFlags - { - eSubsampledEXT = VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, - eSubsampledCoarseReconstructionEXT = VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT, - eNonSeamlessCubeMapEXT = VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT, - eImageProcessingQCOM = VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - }; - - enum class SamplerMipmapMode - { - eNearest = VK_SAMPLER_MIPMAP_MODE_NEAREST, - eLinear = VK_SAMPLER_MIPMAP_MODE_LINEAR - }; - - enum class DescriptorPoolCreateFlagBits : VkDescriptorPoolCreateFlags - { - eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, - eUpdateAfterBind = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT, - eHostOnlyVALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE, - eUpdateAfterBindEXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT - }; - - enum class DescriptorSetLayoutCreateFlagBits : VkDescriptorSetLayoutCreateFlags - { - eUpdateAfterBindPool = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, - ePushDescriptorKHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, - eHostOnlyPoolVALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE, - eUpdateAfterBindPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT - }; - - enum class DescriptorType - { - eSampler = VK_DESCRIPTOR_TYPE_SAMPLER, - eCombinedImageSampler = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, - eSampledImage = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, - eStorageImage = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, - eUniformTexelBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, - eStorageTexelBuffer = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, - eUniformBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, - eStorageBuffer = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, - eUniformBufferDynamic = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, - eStorageBufferDynamic = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, - eInputAttachment = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, - eInlineUniformBlock = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, - eAccelerationStructureKHR = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, - eAccelerationStructureNV = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, - eMutableVALVE = VK_DESCRIPTOR_TYPE_MUTABLE_VALVE, - eSampleWeightImageQCOM = VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, - eBlockMatchImageQCOM = VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, - eInlineUniformBlockEXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT - }; - - enum class DescriptorPoolResetFlagBits : VkDescriptorPoolResetFlags - { - }; - - enum class AccessFlagBits : VkAccessFlags - { - eIndirectCommandRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT, - eIndexRead = VK_ACCESS_INDEX_READ_BIT, - eVertexAttributeRead = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, - eUniformRead = VK_ACCESS_UNIFORM_READ_BIT, - eInputAttachmentRead = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, - eShaderRead = VK_ACCESS_SHADER_READ_BIT, - eShaderWrite = VK_ACCESS_SHADER_WRITE_BIT, - eColorAttachmentRead = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, - eColorAttachmentWrite = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, - eDepthStencilAttachmentRead = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, - eDepthStencilAttachmentWrite = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, - eTransferRead = VK_ACCESS_TRANSFER_READ_BIT, - eTransferWrite = VK_ACCESS_TRANSFER_WRITE_BIT, - eHostRead = VK_ACCESS_HOST_READ_BIT, - eHostWrite = VK_ACCESS_HOST_WRITE_BIT, - eMemoryRead = VK_ACCESS_MEMORY_READ_BIT, - eMemoryWrite = VK_ACCESS_MEMORY_WRITE_BIT, - eNone = VK_ACCESS_NONE, - eTransformFeedbackWriteEXT = VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, - eTransformFeedbackCounterReadEXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, - eTransformFeedbackCounterWriteEXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, - eConditionalRenderingReadEXT = VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT, - eColorAttachmentReadNoncoherentEXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, - eAccelerationStructureReadKHR = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, - eAccelerationStructureWriteKHR = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, - eFragmentDensityMapReadEXT = VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, - eFragmentShadingRateAttachmentReadKHR = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, - eCommandPreprocessReadNV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV, - eCommandPreprocessWriteNV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV, - eAccelerationStructureReadNV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV, - eAccelerationStructureWriteNV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV, - eNoneKHR = VK_ACCESS_NONE_KHR, - eShadingRateImageReadNV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV - }; - - enum class AttachmentDescriptionFlagBits : VkAttachmentDescriptionFlags - { - eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT - }; - - enum class AttachmentLoadOp - { - eLoad = VK_ATTACHMENT_LOAD_OP_LOAD, - eClear = VK_ATTACHMENT_LOAD_OP_CLEAR, - eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE, - eNoneEXT = VK_ATTACHMENT_LOAD_OP_NONE_EXT - }; - - enum class AttachmentStoreOp - { - eStore = VK_ATTACHMENT_STORE_OP_STORE, - eDontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE, - eNone = VK_ATTACHMENT_STORE_OP_NONE, - eNoneEXT = VK_ATTACHMENT_STORE_OP_NONE_EXT, - eNoneKHR = VK_ATTACHMENT_STORE_OP_NONE_KHR, - eNoneQCOM = VK_ATTACHMENT_STORE_OP_NONE_QCOM - }; - - enum class DependencyFlagBits : VkDependencyFlags - { - eByRegion = VK_DEPENDENCY_BY_REGION_BIT, - eDeviceGroup = VK_DEPENDENCY_DEVICE_GROUP_BIT, - eViewLocal = VK_DEPENDENCY_VIEW_LOCAL_BIT, - eFeedbackLoopEXT = VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT, - eDeviceGroupKHR = VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR, - eViewLocalKHR = VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR - }; - - enum class FramebufferCreateFlagBits : VkFramebufferCreateFlags - { - eImageless = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, - eImagelessKHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR - }; - - enum class PipelineBindPoint - { - eGraphics = VK_PIPELINE_BIND_POINT_GRAPHICS, - eCompute = VK_PIPELINE_BIND_POINT_COMPUTE, - eRayTracingKHR = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, - eSubpassShadingHUAWEI = VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, - eRayTracingNV = VK_PIPELINE_BIND_POINT_RAY_TRACING_NV - }; - - enum class RenderPassCreateFlagBits : VkRenderPassCreateFlags - { - eTransformQCOM = VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM - }; - - enum class SubpassDescriptionFlagBits : VkSubpassDescriptionFlags - { - ePerViewAttributesNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX, - ePerViewPositionXOnlyNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, - eFragmentRegionQCOM = VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, - eShaderResolveQCOM = VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, - eRasterizationOrderAttachmentColorAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentDepthAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentStencilAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, - eEnableLegacyDitheringEXT = VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT, - eRasterizationOrderAttachmentColorAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentDepthAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentStencilAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM - }; - - enum class CommandPoolCreateFlagBits : VkCommandPoolCreateFlags - { - eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, - eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, - eProtected = VK_COMMAND_POOL_CREATE_PROTECTED_BIT - }; - - enum class CommandPoolResetFlagBits : VkCommandPoolResetFlags - { - eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT - }; - - enum class CommandBufferLevel - { - ePrimary = VK_COMMAND_BUFFER_LEVEL_PRIMARY, - eSecondary = VK_COMMAND_BUFFER_LEVEL_SECONDARY - }; - - enum class CommandBufferResetFlagBits : VkCommandBufferResetFlags - { - eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT - }; - - enum class CommandBufferUsageFlagBits : VkCommandBufferUsageFlags - { - eOneTimeSubmit = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, - eRenderPassContinue = VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, - eSimultaneousUse = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT - }; - - enum class QueryControlFlagBits : VkQueryControlFlags - { - ePrecise = VK_QUERY_CONTROL_PRECISE_BIT - }; - - enum class IndexType - { - eUint16 = VK_INDEX_TYPE_UINT16, - eUint32 = VK_INDEX_TYPE_UINT32, - eNoneKHR = VK_INDEX_TYPE_NONE_KHR, - eUint8EXT = VK_INDEX_TYPE_UINT8_EXT, - eNoneNV = VK_INDEX_TYPE_NONE_NV - }; - - enum class StencilFaceFlagBits : VkStencilFaceFlags - { - eFront = VK_STENCIL_FACE_FRONT_BIT, - eBack = VK_STENCIL_FACE_BACK_BIT, - eFrontAndBack = VK_STENCIL_FACE_FRONT_AND_BACK, - eVkStencilFrontAndBack = VK_STENCIL_FRONT_AND_BACK - }; - - enum class SubpassContents - { - eInline = VK_SUBPASS_CONTENTS_INLINE, - eSecondaryCommandBuffers = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - }; - - //=== VK_VERSION_1_1 === - - enum class SubgroupFeatureFlagBits : VkSubgroupFeatureFlags - { - eBasic = VK_SUBGROUP_FEATURE_BASIC_BIT, - eVote = VK_SUBGROUP_FEATURE_VOTE_BIT, - eArithmetic = VK_SUBGROUP_FEATURE_ARITHMETIC_BIT, - eBallot = VK_SUBGROUP_FEATURE_BALLOT_BIT, - eShuffle = VK_SUBGROUP_FEATURE_SHUFFLE_BIT, - eShuffleRelative = VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT, - eClustered = VK_SUBGROUP_FEATURE_CLUSTERED_BIT, - eQuad = VK_SUBGROUP_FEATURE_QUAD_BIT, - ePartitionedNV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV - }; - - enum class PeerMemoryFeatureFlagBits : VkPeerMemoryFeatureFlags - { - eCopySrc = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT, - eCopyDst = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT, - eGenericSrc = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT, - eGenericDst = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT - }; - using PeerMemoryFeatureFlagBitsKHR = PeerMemoryFeatureFlagBits; - - enum class MemoryAllocateFlagBits : VkMemoryAllocateFlags - { - eDeviceMask = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT, - eDeviceAddress = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, - eDeviceAddressCaptureReplay = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT - }; - using MemoryAllocateFlagBitsKHR = MemoryAllocateFlagBits; - - enum class CommandPoolTrimFlagBits : VkCommandPoolTrimFlags - { - }; - - enum class PointClippingBehavior - { - eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, - eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY - }; - using PointClippingBehaviorKHR = PointClippingBehavior; - - enum class TessellationDomainOrigin - { - eUpperLeft = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, - eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT - }; - using TessellationDomainOriginKHR = TessellationDomainOrigin; - - enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags - { - eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT - }; - - enum class SamplerYcbcrModelConversion - { - eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, - eYcbcrIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, - eYcbcr709 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709, - eYcbcr601 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601, - eYcbcr2020 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 - }; - using SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion; - - enum class SamplerYcbcrRange - { - eItuFull = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, - eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW - }; - using SamplerYcbcrRangeKHR = SamplerYcbcrRange; - - enum class ChromaLocation - { - eCositedEven = VK_CHROMA_LOCATION_COSITED_EVEN, - eMidpoint = VK_CHROMA_LOCATION_MIDPOINT - }; - using ChromaLocationKHR = ChromaLocation; - - enum class DescriptorUpdateTemplateType - { - eDescriptorSet = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, - ePushDescriptorsKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR - }; - using DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType; - - enum class DescriptorUpdateTemplateCreateFlagBits : VkDescriptorUpdateTemplateCreateFlags - { - }; - - enum class ExternalMemoryHandleTypeFlagBits : VkExternalMemoryHandleTypeFlags - { - eOpaqueFd = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, - eOpaqueWin32 = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, - eOpaqueWin32Kmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - eD3D11Texture = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, - eD3D11TextureKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, - eD3D12Heap = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, - eD3D12Resource = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, - eDmaBufEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - eAndroidHardwareBufferANDROID = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, - eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eZirconVmoFUCHSIA = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - eRdmaAddressNV = VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV - }; - using ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits; - - enum class ExternalMemoryFeatureFlagBits : VkExternalMemoryFeatureFlags - { - eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT, - eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT, - eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT - }; - using ExternalMemoryFeatureFlagBitsKHR = ExternalMemoryFeatureFlagBits; - - enum class ExternalFenceHandleTypeFlagBits : VkExternalFenceHandleTypeFlags - { - eOpaqueFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT, - eOpaqueWin32 = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, - eOpaqueWin32Kmt = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - eSyncFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT - }; - using ExternalFenceHandleTypeFlagBitsKHR = ExternalFenceHandleTypeFlagBits; - - enum class ExternalFenceFeatureFlagBits : VkExternalFenceFeatureFlags - { - eExportable = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT, - eImportable = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT - }; - using ExternalFenceFeatureFlagBitsKHR = ExternalFenceFeatureFlagBits; - - enum class FenceImportFlagBits : VkFenceImportFlags - { - eTemporary = VK_FENCE_IMPORT_TEMPORARY_BIT - }; - using FenceImportFlagBitsKHR = FenceImportFlagBits; - - enum class SemaphoreImportFlagBits : VkSemaphoreImportFlags - { - eTemporary = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT - }; - using SemaphoreImportFlagBitsKHR = SemaphoreImportFlagBits; - - enum class ExternalSemaphoreHandleTypeFlagBits : VkExternalSemaphoreHandleTypeFlags - { - eOpaqueFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, - eOpaqueWin32 = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT, - eOpaqueWin32Kmt = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - eD3D12Fence = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, - eSyncFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eZirconEventFUCHSIA = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - eD3D11Fence = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT - }; - using ExternalSemaphoreHandleTypeFlagBitsKHR = ExternalSemaphoreHandleTypeFlagBits; - - enum class ExternalSemaphoreFeatureFlagBits : VkExternalSemaphoreFeatureFlags - { - eExportable = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT, - eImportable = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT - }; - using ExternalSemaphoreFeatureFlagBitsKHR = ExternalSemaphoreFeatureFlagBits; - - //=== VK_VERSION_1_2 === - - enum class DriverId - { - eAmdProprietary = VK_DRIVER_ID_AMD_PROPRIETARY, - eAmdOpenSource = VK_DRIVER_ID_AMD_OPEN_SOURCE, - eMesaRadv = VK_DRIVER_ID_MESA_RADV, - eNvidiaProprietary = VK_DRIVER_ID_NVIDIA_PROPRIETARY, - eIntelProprietaryWindows = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, - eIntelOpenSourceMESA = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA, - eImaginationProprietary = VK_DRIVER_ID_IMAGINATION_PROPRIETARY, - eQualcommProprietary = VK_DRIVER_ID_QUALCOMM_PROPRIETARY, - eArmProprietary = VK_DRIVER_ID_ARM_PROPRIETARY, - eGoogleSwiftshader = VK_DRIVER_ID_GOOGLE_SWIFTSHADER, - eGgpProprietary = VK_DRIVER_ID_GGP_PROPRIETARY, - eBroadcomProprietary = VK_DRIVER_ID_BROADCOM_PROPRIETARY, - eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE, - eMoltenvk = VK_DRIVER_ID_MOLTENVK, - eCoreaviProprietary = VK_DRIVER_ID_COREAVI_PROPRIETARY, - eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY, - eVerisiliconProprietary = VK_DRIVER_ID_VERISILICON_PROPRIETARY, - eMesaTurnip = VK_DRIVER_ID_MESA_TURNIP, - eMesaV3Dv = VK_DRIVER_ID_MESA_V3DV, - eMesaPanvk = VK_DRIVER_ID_MESA_PANVK, - eSamsungProprietary = VK_DRIVER_ID_SAMSUNG_PROPRIETARY, - eMesaVenus = VK_DRIVER_ID_MESA_VENUS, - eMesaDozen = VK_DRIVER_ID_MESA_DOZEN - }; - using DriverIdKHR = DriverId; - - enum class ShaderFloatControlsIndependence - { - e32BitOnly = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, - eAll = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL, - eNone = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE - }; - using ShaderFloatControlsIndependenceKHR = ShaderFloatControlsIndependence; - - enum class DescriptorBindingFlagBits : VkDescriptorBindingFlags - { - eUpdateAfterBind = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, - eUpdateUnusedWhilePending = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, - ePartiallyBound = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, - eVariableDescriptorCount = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT - }; - using DescriptorBindingFlagBitsEXT = DescriptorBindingFlagBits; - - enum class ResolveModeFlagBits : VkResolveModeFlags - { - eNone = VK_RESOLVE_MODE_NONE, - eSampleZero = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT, - eAverage = VK_RESOLVE_MODE_AVERAGE_BIT, - eMin = VK_RESOLVE_MODE_MIN_BIT, - eMax = VK_RESOLVE_MODE_MAX_BIT - }; - using ResolveModeFlagBitsKHR = ResolveModeFlagBits; - - enum class SamplerReductionMode - { - eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, - eMin = VK_SAMPLER_REDUCTION_MODE_MIN, - eMax = VK_SAMPLER_REDUCTION_MODE_MAX - }; - using SamplerReductionModeEXT = SamplerReductionMode; - - enum class SemaphoreType - { - eBinary = VK_SEMAPHORE_TYPE_BINARY, - eTimeline = VK_SEMAPHORE_TYPE_TIMELINE - }; - using SemaphoreTypeKHR = SemaphoreType; - - enum class SemaphoreWaitFlagBits : VkSemaphoreWaitFlags - { - eAny = VK_SEMAPHORE_WAIT_ANY_BIT - }; - using SemaphoreWaitFlagBitsKHR = SemaphoreWaitFlagBits; - - //=== VK_VERSION_1_3 === - - enum class PipelineCreationFeedbackFlagBits : VkPipelineCreationFeedbackFlags - { - eValid = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT, - eApplicationPipelineCacheHit = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT, - eBasePipelineAcceleration = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT - }; - using PipelineCreationFeedbackFlagBitsEXT = PipelineCreationFeedbackFlagBits; - - enum class ToolPurposeFlagBits : VkToolPurposeFlags - { - eValidation = VK_TOOL_PURPOSE_VALIDATION_BIT, - eProfiling = VK_TOOL_PURPOSE_PROFILING_BIT, - eTracing = VK_TOOL_PURPOSE_TRACING_BIT, - eAdditionalFeatures = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT, - eModifyingFeatures = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT, - eDebugReportingEXT = VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT, - eDebugMarkersEXT = VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT - }; - using ToolPurposeFlagBitsEXT = ToolPurposeFlagBits; - - enum class PrivateDataSlotCreateFlagBits : VkPrivateDataSlotCreateFlags - { - }; - using PrivateDataSlotCreateFlagBitsEXT = PrivateDataSlotCreateFlagBits; - - enum class PipelineStageFlagBits2 : VkPipelineStageFlags2 - { - eNone = VK_PIPELINE_STAGE_2_NONE, - eTopOfPipe = VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT, - eDrawIndirect = VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, - eVertexInput = VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, - eVertexShader = VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, - eTessellationControlShader = VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, - eTessellationEvaluationShader = VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, - eGeometryShader = VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, - eFragmentShader = VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, - eEarlyFragmentTests = VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, - eLateFragmentTests = VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, - eColorAttachmentOutput = VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT, - eComputeShader = VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, - eAllTransfer = VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, - eBottomOfPipe = VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT, - eHost = VK_PIPELINE_STAGE_2_HOST_BIT, - eAllGraphics = VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, - eAllCommands = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, - eCopy = VK_PIPELINE_STAGE_2_COPY_BIT, - eResolve = VK_PIPELINE_STAGE_2_RESOLVE_BIT, - eBlit = VK_PIPELINE_STAGE_2_BLIT_BIT, - eClear = VK_PIPELINE_STAGE_2_CLEAR_BIT, - eIndexInput = VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, - eVertexAttributeInput = VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, - ePreRasterizationShaders = VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeKHR = VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR, - eVideoEncodeKHR = VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eTransformFeedbackEXT = VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, - eConditionalRenderingEXT = VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, - eCommandPreprocessNV = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV, - eFragmentShadingRateAttachmentKHR = VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, - eAccelerationStructureBuildKHR = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, - eRayTracingShaderKHR = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, - eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, - eTaskShaderEXT = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, - eMeshShaderEXT = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, - eSubpassShadingHUAWEI = VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI, - eInvocationMaskHUAWEI = VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI, - eAccelerationStructureCopyKHR = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, - eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV, - eMeshShaderNV = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV, - eRayTracingShaderNV = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV, - eShadingRateImageNV = VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, - eTaskShaderNV = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV, - eTransfer = VK_PIPELINE_STAGE_2_TRANSFER_BIT - }; - using PipelineStageFlagBits2KHR = PipelineStageFlagBits2; - - enum class AccessFlagBits2 : VkAccessFlags2 - { - eNone = VK_ACCESS_2_NONE, - eIndirectCommandRead = VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, - eIndexRead = VK_ACCESS_2_INDEX_READ_BIT, - eVertexAttributeRead = VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, - eUniformRead = VK_ACCESS_2_UNIFORM_READ_BIT, - eInputAttachmentRead = VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, - eShaderRead = VK_ACCESS_2_SHADER_READ_BIT, - eShaderWrite = VK_ACCESS_2_SHADER_WRITE_BIT, - eColorAttachmentRead = VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, - eColorAttachmentWrite = VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, - eDepthStencilAttachmentRead = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, - eDepthStencilAttachmentWrite = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, - eTransferRead = VK_ACCESS_2_TRANSFER_READ_BIT, - eTransferWrite = VK_ACCESS_2_TRANSFER_WRITE_BIT, - eHostRead = VK_ACCESS_2_HOST_READ_BIT, - eHostWrite = VK_ACCESS_2_HOST_WRITE_BIT, - eMemoryRead = VK_ACCESS_2_MEMORY_READ_BIT, - eMemoryWrite = VK_ACCESS_2_MEMORY_WRITE_BIT, - eShaderSampledRead = VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, - eShaderStorageRead = VK_ACCESS_2_SHADER_STORAGE_READ_BIT, - eShaderStorageWrite = VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeReadKHR = VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, - eVideoDecodeWriteKHR = VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, - eVideoEncodeReadKHR = VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, - eVideoEncodeWriteKHR = VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eTransformFeedbackWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, - eTransformFeedbackCounterReadEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, - eTransformFeedbackCounterWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, - eConditionalRenderingReadEXT = VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, - eCommandPreprocessReadNV = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, - eCommandPreprocessWriteNV = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, - eFragmentShadingRateAttachmentReadKHR = VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, - eAccelerationStructureReadKHR = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, - eAccelerationStructureWriteKHR = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, - eFragmentDensityMapReadEXT = VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, - eColorAttachmentReadNoncoherentEXT = VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, - eInvocationMaskReadHUAWEI = VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, - eShaderBindingTableReadKHR = VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, - eAccelerationStructureReadNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV, - eAccelerationStructureWriteNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV, - eShadingRateImageReadNV = VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV - }; - using AccessFlagBits2KHR = AccessFlagBits2; - - enum class SubmitFlagBits : VkSubmitFlags - { - eProtected = VK_SUBMIT_PROTECTED_BIT - }; - using SubmitFlagBitsKHR = SubmitFlagBits; - - enum class RenderingFlagBits : VkRenderingFlags - { - eContentsSecondaryCommandBuffers = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT, - eSuspending = VK_RENDERING_SUSPENDING_BIT, - eResuming = VK_RENDERING_RESUMING_BIT, - eEnableLegacyDitheringEXT = VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT - }; - using RenderingFlagBitsKHR = RenderingFlagBits; - - enum class FormatFeatureFlagBits2 : VkFormatFeatureFlags2 - { - eSampledImage = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT, - eStorageImage = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT, - eStorageImageAtomic = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT, - eUniformTexelBuffer = VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT, - eStorageTexelBuffer = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT, - eStorageTexelBufferAtomic = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, - eVertexBuffer = VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT, - eColorAttachment = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT, - eColorAttachmentBlend = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT, - eDepthStencilAttachment = VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT, - eBlitSrc = VK_FORMAT_FEATURE_2_BLIT_SRC_BIT, - eBlitDst = VK_FORMAT_FEATURE_2_BLIT_DST_BIT, - eSampledImageFilterLinear = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT, - eSampledImageFilterCubic = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT, - eTransferSrc = VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT, - eTransferDst = VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT, - eSampledImageFilterMinmax = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT, - eMidpointChromaSamples = VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT, - eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, - eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, - eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, - eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = - VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, - eDisjoint = VK_FORMAT_FEATURE_2_DISJOINT_BIT, - eCositedChromaSamples = VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT, - eStorageReadWithoutFormat = VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT, - eStorageWriteWithoutFormat = VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT, - eSampledImageDepthComparison = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoDecodeOutputKHR = VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR, - eVideoDecodeDpbKHR = VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eAccelerationStructureVertexBufferKHR = VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR, - eFragmentDensityMapEXT = VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT, - eFragmentShadingRateAttachmentKHR = VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - eVideoEncodeInputKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR, - eVideoEncodeDpbKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR, -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - eLinearColorAttachmentNV = VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV, - eWeightImageQCOM = VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM, - eWeightSampledImageQCOM = VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM, - eBlockMatchingQCOM = VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM, - eBoxFilterSampledQCOM = VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM, - eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - }; - using FormatFeatureFlagBits2KHR = FormatFeatureFlagBits2; - - //=== VK_KHR_surface === - - enum class SurfaceTransformFlagBitsKHR : VkSurfaceTransformFlagsKHR - { - eIdentity = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, - eRotate90 = VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, - eRotate180 = VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, - eRotate270 = VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, - eHorizontalMirror = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR, - eHorizontalMirrorRotate90 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR, - eHorizontalMirrorRotate180 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR, - eHorizontalMirrorRotate270 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR, - eInherit = VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR - }; - - enum class PresentModeKHR - { - eImmediate = VK_PRESENT_MODE_IMMEDIATE_KHR, - eMailbox = VK_PRESENT_MODE_MAILBOX_KHR, - eFifo = VK_PRESENT_MODE_FIFO_KHR, - eFifoRelaxed = VK_PRESENT_MODE_FIFO_RELAXED_KHR, - eSharedDemandRefresh = VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, - eSharedContinuousRefresh = VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR - }; - - enum class ColorSpaceKHR - { - eSrgbNonlinear = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, - eDisplayP3NonlinearEXT = VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT, - eExtendedSrgbLinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT, - eDisplayP3LinearEXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT, - eDciP3NonlinearEXT = VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT, - eBt709LinearEXT = VK_COLOR_SPACE_BT709_LINEAR_EXT, - eBt709NonlinearEXT = VK_COLOR_SPACE_BT709_NONLINEAR_EXT, - eBt2020LinearEXT = VK_COLOR_SPACE_BT2020_LINEAR_EXT, - eHdr10St2084EXT = VK_COLOR_SPACE_HDR10_ST2084_EXT, - eDolbyvisionEXT = VK_COLOR_SPACE_DOLBYVISION_EXT, - eHdr10HlgEXT = VK_COLOR_SPACE_HDR10_HLG_EXT, - eAdobergbLinearEXT = VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT, - eAdobergbNonlinearEXT = VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT, - ePassThroughEXT = VK_COLOR_SPACE_PASS_THROUGH_EXT, - eExtendedSrgbNonlinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT, - eDisplayNativeAMD = VK_COLOR_SPACE_DISPLAY_NATIVE_AMD, - eVkColorspaceSrgbNonlinear = VK_COLORSPACE_SRGB_NONLINEAR_KHR, - eDciP3LinearEXT = VK_COLOR_SPACE_DCI_P3_LINEAR_EXT - }; - - enum class CompositeAlphaFlagBitsKHR : VkCompositeAlphaFlagsKHR - { - eOpaque = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, - ePreMultiplied = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR, - ePostMultiplied = VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR, - eInherit = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR - }; - - //=== VK_KHR_swapchain === - - enum class SwapchainCreateFlagBitsKHR : VkSwapchainCreateFlagsKHR - { - eSplitInstanceBindRegions = VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR, - eProtected = VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR, - eMutableFormat = VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR - }; - - enum class DeviceGroupPresentModeFlagBitsKHR : VkDeviceGroupPresentModeFlagsKHR - { - eLocal = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR, - eRemote = VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR, - eSum = VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR, - eLocalMultiDevice = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR - }; - - //=== VK_KHR_display === - - enum class DisplayPlaneAlphaFlagBitsKHR : VkDisplayPlaneAlphaFlagsKHR - { - eOpaque = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR, - eGlobal = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR, - ePerPixel = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, - ePerPixelPremultiplied = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR - }; - - enum class DisplayModeCreateFlagBitsKHR : VkDisplayModeCreateFlagsKHR - { - }; - - enum class DisplaySurfaceCreateFlagBitsKHR : VkDisplaySurfaceCreateFlagsKHR - { - }; - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - enum class XlibSurfaceCreateFlagBitsKHR : VkXlibSurfaceCreateFlagsKHR - { - }; -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - enum class XcbSurfaceCreateFlagBitsKHR : VkXcbSurfaceCreateFlagsKHR - { - }; -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - enum class WaylandSurfaceCreateFlagBitsKHR : VkWaylandSurfaceCreateFlagsKHR - { - }; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - enum class AndroidSurfaceCreateFlagBitsKHR : VkAndroidSurfaceCreateFlagsKHR - { - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - enum class Win32SurfaceCreateFlagBitsKHR : VkWin32SurfaceCreateFlagsKHR - { - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - enum class DebugReportFlagBitsEXT : VkDebugReportFlagsEXT - { - eInformation = VK_DEBUG_REPORT_INFORMATION_BIT_EXT, - eWarning = VK_DEBUG_REPORT_WARNING_BIT_EXT, - ePerformanceWarning = VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - eError = VK_DEBUG_REPORT_ERROR_BIT_EXT, - eDebug = VK_DEBUG_REPORT_DEBUG_BIT_EXT - }; - - enum class DebugReportObjectTypeEXT - { - eUnknown = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - eInstance = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, - ePhysicalDevice = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - eDevice = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - eQueue = VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, - eSemaphore = VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, - eCommandBuffer = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - eFence = VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - eDeviceMemory = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - eBuffer = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - eImage = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - eEvent = VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, - eQueryPool = VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, - eBufferView = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT, - eImageView = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT, - eShaderModule = VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, - ePipelineCache = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, - ePipelineLayout = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, - eRenderPass = VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - ePipeline = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - eDescriptorSetLayout = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, - eSampler = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT, - eDescriptorPool = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - eDescriptorSet = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - eFramebuffer = VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, - eCommandPool = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, - eSurfaceKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, - eSwapchainKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - eDebugReportCallbackEXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, - eDisplayKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT, - eDisplayModeKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT, - eValidationCacheEXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, - eSamplerYcbcrConversion = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT, - eDescriptorUpdateTemplate = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, - eCuModuleNVX = VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT, - eCuFunctionNVX = VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT, - eAccelerationStructureKHR = VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT, - eAccelerationStructureNV = VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT, -#if defined( VK_USE_PLATFORM_FUCHSIA ) - eBufferCollectionFUCHSIA = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT, -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - eDebugReport = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, - eDescriptorUpdateTemplateKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT, - eSamplerYcbcrConversionKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT, - eValidationCache = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT - }; - - //=== VK_AMD_rasterization_order === - - enum class RasterizationOrderAMD - { - eStrict = VK_RASTERIZATION_ORDER_STRICT_AMD, - eRelaxed = VK_RASTERIZATION_ORDER_RELAXED_AMD - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - enum class VideoCodecOperationFlagBitsKHR : VkVideoCodecOperationFlagsKHR - { - eNone = VK_VIDEO_CODEC_OPERATION_NONE_KHR, -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - eEncodeH264EXT = VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT, - eEncodeH265EXT = VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT, - eDecodeH264EXT = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT, - eDecodeH265EXT = VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - - enum class VideoChromaSubsamplingFlagBitsKHR : VkVideoChromaSubsamplingFlagsKHR - { - eInvalid = VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR, - eMonochrome = VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR, - e420 = VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR, - e422 = VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR, - e444 = VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR - }; - - enum class VideoComponentBitDepthFlagBitsKHR : VkVideoComponentBitDepthFlagsKHR - { - eInvalid = VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR, - e8 = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, - e10 = VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR, - e12 = VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR - }; - - enum class VideoCapabilityFlagBitsKHR : VkVideoCapabilityFlagsKHR - { - eProtectedContent = VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, - eSeparateReferenceImages = VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR - }; - - enum class VideoSessionCreateFlagBitsKHR : VkVideoSessionCreateFlagsKHR - { - eProtectedContent = VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR - }; - - enum class VideoCodingControlFlagBitsKHR : VkVideoCodingControlFlagsKHR - { - eReset = VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - eEncodeRateControl = VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, - eEncodeRateControlLayer = VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - - enum class QueryResultStatusKHR - { - eError = VK_QUERY_RESULT_STATUS_ERROR_KHR, - eNotReady = VK_QUERY_RESULT_STATUS_NOT_READY_KHR, - eComplete = VK_QUERY_RESULT_STATUS_COMPLETE_KHR - }; - - enum class VideoSessionParametersCreateFlagBitsKHR : VkVideoSessionParametersCreateFlagsKHR - { - }; - - enum class VideoBeginCodingFlagBitsKHR : VkVideoBeginCodingFlagsKHR - { - }; - - enum class VideoEndCodingFlagBitsKHR : VkVideoEndCodingFlagsKHR - { - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - enum class VideoDecodeCapabilityFlagBitsKHR : VkVideoDecodeCapabilityFlagsKHR - { - eDpbAndOutputCoincide = VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, - eDpbAndOutputDistinct = VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR - }; - - enum class VideoDecodeUsageFlagBitsKHR : VkVideoDecodeUsageFlagsKHR - { - eDefault = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR, - eTranscoding = VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR, - eOffline = VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR, - eStreaming = VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR - }; - - enum class VideoDecodeFlagBitsKHR : VkVideoDecodeFlagsKHR - { - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - enum class PipelineRasterizationStateStreamCreateFlagBitsEXT : VkPipelineRasterizationStateStreamCreateFlagsEXT - { - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - - enum class VideoEncodeH264CapabilityFlagBitsEXT : VkVideoEncodeH264CapabilityFlagsEXT - { - eDirect8X8InferenceEnabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT, - eDirect8X8InferenceDisabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT, - eSeparateColourPlane = VK_VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT, - eQpprimeYZeroTransformBypass = VK_VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT, - eScalingLists = VK_VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT, - eHrdCompliance = VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT, - eChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT, - eSecondChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT, - ePicInitQpMinus26 = VK_VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT, - eWeightedPred = VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT, - eWeightedBipredExplicit = VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT, - eWeightedBipredImplicit = VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT, - eWeightedPredNoTable = VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT, - eTransform8X8 = VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT, - eCabac = VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT, - eCavlc = VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT, - eDeblockingFilterDisabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT, - eDeblockingFilterEnabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT, - eDeblockingFilterPartial = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT, - eDisableDirectSpatialMvPred = VK_VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT, - eMultipleSlicePerFrame = VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT, - eSliceMbCount = VK_VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT, - eRowUnalignedSlice = VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT, - eDifferentSliceType = VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT, - eBFrameInL1List = VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT - }; - - enum class VideoEncodeH264InputModeFlagBitsEXT : VkVideoEncodeH264InputModeFlagsEXT - { - eFrame = VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT, - eSlice = VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT, - eNonVcl = VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT - }; - - enum class VideoEncodeH264OutputModeFlagBitsEXT : VkVideoEncodeH264OutputModeFlagsEXT - { - eFrame = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT, - eSlice = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT, - eNonVcl = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT - }; - - enum class VideoEncodeH264RateControlStructureEXT - { - eUnknown = VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT, - eFlat = VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT, - eDyadic = VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - - enum class VideoEncodeH265CapabilityFlagBitsEXT : VkVideoEncodeH265CapabilityFlagsEXT - { - eSeparateColourPlane = VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT, - eScalingLists = VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT, - eSampleAdaptiveOffsetEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT, - ePcmEnable = VK_VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT, - eSpsTemporalMvpEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT, - eHrdCompliance = VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT, - eInitQpMinus26 = VK_VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT, - eLog2ParallelMergeLevelMinus2 = VK_VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT, - eSignDataHidingEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT, - eTransformSkipEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT, - eTransformSkipDisabled = VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT, - ePpsSliceChromaQpOffsetsPresent = VK_VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT, - eWeightedPred = VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT, - eWeightedBipred = VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT, - eWeightedPredNoTable = VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT, - eTransquantBypassEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT, - eEntropyCodingSyncEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT, - eDeblockingFilterOverrideEnabled = VK_VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT, - eMultipleTilePerFrame = VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT, - eMultipleSlicePerTile = VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT, - eMultipleTilePerSlice = VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT, - eSliceSegmentCtbCount = VK_VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT, - eRowUnalignedSliceSegment = VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT, - eDependentSliceSegment = VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT, - eDifferentSliceType = VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT, - eBFrameInL1List = VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT - }; - - enum class VideoEncodeH265InputModeFlagBitsEXT : VkVideoEncodeH265InputModeFlagsEXT - { - eFrame = VK_VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT, - eSliceSegment = VK_VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT, - eNonVcl = VK_VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT - }; - - enum class VideoEncodeH265OutputModeFlagBitsEXT : VkVideoEncodeH265OutputModeFlagsEXT - { - eFrame = VK_VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT, - eSliceSegment = VK_VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT, - eNonVcl = VK_VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT - }; - - enum class VideoEncodeH265CtbSizeFlagBitsEXT : VkVideoEncodeH265CtbSizeFlagsEXT - { - e16 = VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT, - e32 = VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT, - e64 = VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT - }; - - enum class VideoEncodeH265TransformBlockSizeFlagBitsEXT : VkVideoEncodeH265TransformBlockSizeFlagsEXT - { - e4 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT, - e8 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT, - e16 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT, - e32 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT - }; - - enum class VideoEncodeH265RateControlStructureEXT - { - eUnknown = VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT, - eFlat = VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT, - eDyadic = VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - - enum class VideoDecodeH264PictureLayoutFlagBitsEXT : VkVideoDecodeH264PictureLayoutFlagsEXT - { - eProgressive = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT, - eInterlacedInterleavedLines = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT, - eInterlacedSeparatePlanes = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_AMD_shader_info === - - enum class ShaderInfoTypeAMD - { - eStatistics = VK_SHADER_INFO_TYPE_STATISTICS_AMD, - eBinary = VK_SHADER_INFO_TYPE_BINARY_AMD, - eDisassembly = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD - }; - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - enum class StreamDescriptorSurfaceCreateFlagBitsGGP : VkStreamDescriptorSurfaceCreateFlagsGGP - { - }; -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - enum class ExternalMemoryHandleTypeFlagBitsNV : VkExternalMemoryHandleTypeFlagsNV - { - eOpaqueWin32 = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, - eOpaqueWin32Kmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, - eD3D11Image = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV, - eD3D11ImageKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV - }; - - enum class ExternalMemoryFeatureFlagBitsNV : VkExternalMemoryFeatureFlagsNV - { - eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV, - eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV, - eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV - }; - - //=== VK_EXT_validation_flags === - - enum class ValidationCheckEXT - { - eAll = VK_VALIDATION_CHECK_ALL_EXT, - eShaders = VK_VALIDATION_CHECK_SHADERS_EXT - }; - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - enum class ViSurfaceCreateFlagBitsNN : VkViSurfaceCreateFlagsNN - { - }; -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_EXT_pipeline_robustness === - - enum class PipelineRobustnessBufferBehaviorEXT - { - eDeviceDefault = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT, - eDisabled = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT, - eRobustBufferAccess = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT, - eRobustBufferAccess2 = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT - }; - - enum class PipelineRobustnessImageBehaviorEXT - { - eDeviceDefault = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT, - eDisabled = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT, - eRobustImageAccess = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT, - eRobustImageAccess2 = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT - }; - - //=== VK_EXT_conditional_rendering === - - enum class ConditionalRenderingFlagBitsEXT : VkConditionalRenderingFlagsEXT - { - eInverted = VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT - }; - - //=== VK_EXT_display_surface_counter === - - enum class SurfaceCounterFlagBitsEXT : VkSurfaceCounterFlagsEXT - { - eVblank = VK_SURFACE_COUNTER_VBLANK_BIT_EXT - }; - - //=== VK_EXT_display_control === - - enum class DisplayPowerStateEXT - { - eOff = VK_DISPLAY_POWER_STATE_OFF_EXT, - eSuspend = VK_DISPLAY_POWER_STATE_SUSPEND_EXT, - eOn = VK_DISPLAY_POWER_STATE_ON_EXT - }; - - enum class DeviceEventTypeEXT - { - eDisplayHotplug = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - }; - - enum class DisplayEventTypeEXT - { - eFirstPixelOut = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - }; - - //=== VK_NV_viewport_swizzle === - - enum class ViewportCoordinateSwizzleNV - { - ePositiveX = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, - eNegativeX = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV, - ePositiveY = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV, - eNegativeY = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV, - ePositiveZ = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV, - eNegativeZ = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV, - ePositiveW = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV, - eNegativeW = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - }; - - enum class PipelineViewportSwizzleStateCreateFlagBitsNV : VkPipelineViewportSwizzleStateCreateFlagsNV - { - }; - - //=== VK_EXT_discard_rectangles === - - enum class DiscardRectangleModeEXT - { - eInclusive = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, - eExclusive = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - }; - - enum class PipelineDiscardRectangleStateCreateFlagBitsEXT : VkPipelineDiscardRectangleStateCreateFlagsEXT - { - }; - - //=== VK_EXT_conservative_rasterization === - - enum class ConservativeRasterizationModeEXT - { - eDisabled = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, - eOverestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, - eUnderestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT - }; - - enum class PipelineRasterizationConservativeStateCreateFlagBitsEXT : VkPipelineRasterizationConservativeStateCreateFlagsEXT - { - }; - - //=== VK_EXT_depth_clip_enable === - - enum class PipelineRasterizationDepthClipStateCreateFlagBitsEXT : VkPipelineRasterizationDepthClipStateCreateFlagsEXT - { - }; - - //=== VK_KHR_performance_query === - - enum class PerformanceCounterDescriptionFlagBitsKHR : VkPerformanceCounterDescriptionFlagsKHR - { - ePerformanceImpacting = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR, - eConcurrentlyImpacted = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR - }; - - enum class PerformanceCounterScopeKHR - { - eCommandBuffer = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, - eRenderPass = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, - eCommand = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR, - eVkQueryScopeCommandBuffer = VK_QUERY_SCOPE_COMMAND_BUFFER_KHR, - eVkQueryScopeCommand = VK_QUERY_SCOPE_COMMAND_KHR, - eVkQueryScopeRenderPass = VK_QUERY_SCOPE_RENDER_PASS_KHR - }; - - enum class PerformanceCounterStorageKHR - { - eInt32 = VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR, - eInt64 = VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR, - eUint32 = VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR, - eUint64 = VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR, - eFloat32 = VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR, - eFloat64 = VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR - }; - - enum class PerformanceCounterUnitKHR - { - eGeneric = VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR, - ePercentage = VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR, - eNanoseconds = VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR, - eBytes = VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR, - eBytesPerSecond = VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR, - eKelvin = VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR, - eWatts = VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR, - eVolts = VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR, - eAmps = VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR, - eHertz = VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR, - eCycles = VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR - }; - - enum class AcquireProfilingLockFlagBitsKHR : VkAcquireProfilingLockFlagsKHR - { - }; - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - enum class IOSSurfaceCreateFlagBitsMVK : VkIOSSurfaceCreateFlagsMVK - { - }; -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - enum class MacOSSurfaceCreateFlagBitsMVK : VkMacOSSurfaceCreateFlagsMVK - { - }; -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - enum class DebugUtilsMessageSeverityFlagBitsEXT : VkDebugUtilsMessageSeverityFlagsEXT - { - eVerbose = VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, - eInfo = VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT, - eWarning = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT, - eError = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT - }; - - enum class DebugUtilsMessageTypeFlagBitsEXT : VkDebugUtilsMessageTypeFlagsEXT - { - eGeneral = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, - eValidation = VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT, - ePerformance = VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT - }; - - enum class DebugUtilsMessengerCallbackDataFlagBitsEXT : VkDebugUtilsMessengerCallbackDataFlagsEXT - { - }; - - enum class DebugUtilsMessengerCreateFlagBitsEXT : VkDebugUtilsMessengerCreateFlagsEXT - { - }; - - //=== VK_EXT_blend_operation_advanced === - - enum class BlendOverlapEXT - { - eUncorrelated = VK_BLEND_OVERLAP_UNCORRELATED_EXT, - eDisjoint = VK_BLEND_OVERLAP_DISJOINT_EXT, - eConjoint = VK_BLEND_OVERLAP_CONJOINT_EXT - }; - - //=== VK_NV_fragment_coverage_to_color === - - enum class PipelineCoverageToColorStateCreateFlagBitsNV : VkPipelineCoverageToColorStateCreateFlagsNV - { - }; - - //=== VK_KHR_acceleration_structure === - - enum class AccelerationStructureTypeKHR - { - eTopLevel = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, - eBottomLevel = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, - eGeneric = VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - }; - using AccelerationStructureTypeNV = AccelerationStructureTypeKHR; - - enum class AccelerationStructureBuildTypeKHR - { - eHost = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR, - eDevice = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR, - eHostOrDevice = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR - }; - - enum class GeometryFlagBitsKHR : VkGeometryFlagsKHR - { - eOpaque = VK_GEOMETRY_OPAQUE_BIT_KHR, - eNoDuplicateAnyHitInvocation = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR - }; - using GeometryFlagBitsNV = GeometryFlagBitsKHR; - - enum class GeometryInstanceFlagBitsKHR : VkGeometryInstanceFlagsKHR - { - eTriangleFacingCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR, - eTriangleFlipFacing = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, - eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR, - eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR, - eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV, - eTriangleFrontCounterclockwiseKHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR, - eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV - }; - using GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR; - - enum class BuildAccelerationStructureFlagBitsKHR : VkBuildAccelerationStructureFlagsKHR - { - eAllowUpdate = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR, - eAllowCompaction = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR, - ePreferFastTrace = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR, - ePreferFastBuild = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR, - eLowMemory = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR, - eMotionNV = VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV - }; - using BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR; - - enum class CopyAccelerationStructureModeKHR - { - eClone = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, - eCompact = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, - eSerialize = VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, - eDeserialize = VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR - }; - using CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR; - - enum class GeometryTypeKHR - { - eTriangles = VK_GEOMETRY_TYPE_TRIANGLES_KHR, - eAabbs = VK_GEOMETRY_TYPE_AABBS_KHR, - eInstances = VK_GEOMETRY_TYPE_INSTANCES_KHR - }; - using GeometryTypeNV = GeometryTypeKHR; - - enum class AccelerationStructureCompatibilityKHR - { - eCompatible = VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR, - eIncompatible = VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR - }; - - enum class AccelerationStructureCreateFlagBitsKHR : VkAccelerationStructureCreateFlagsKHR - { - eDeviceAddressCaptureReplay = VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, - eMotionNV = VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV - }; - - enum class BuildAccelerationStructureModeKHR - { - eBuild = VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, - eUpdate = VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR - }; - - //=== VK_NV_framebuffer_mixed_samples === - - enum class CoverageModulationModeNV - { - eNone = VK_COVERAGE_MODULATION_MODE_NONE_NV, - eRgb = VK_COVERAGE_MODULATION_MODE_RGB_NV, - eAlpha = VK_COVERAGE_MODULATION_MODE_ALPHA_NV, - eRgba = VK_COVERAGE_MODULATION_MODE_RGBA_NV - }; - - enum class PipelineCoverageModulationStateCreateFlagBitsNV : VkPipelineCoverageModulationStateCreateFlagsNV - { - }; - - //=== VK_EXT_validation_cache === - - enum class ValidationCacheHeaderVersionEXT - { - eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT - }; - - enum class ValidationCacheCreateFlagBitsEXT : VkValidationCacheCreateFlagsEXT - { - }; - - //=== VK_NV_shading_rate_image === - - enum class ShadingRatePaletteEntryNV - { - eNoInvocations = VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, - e16InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV, - e8InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV, - e4InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV, - e2InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV, - e1InvocationPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV, - e1InvocationPer2X1Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV, - e1InvocationPer1X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV, - e1InvocationPer2X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV, - e1InvocationPer4X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV, - e1InvocationPer2X4Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV, - e1InvocationPer4X4Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV - }; - - enum class CoarseSampleOrderTypeNV - { - eDefault = VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV, - eCustom = VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, - ePixelMajor = VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV, - eSampleMajor = VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV - }; - - //=== VK_NV_ray_tracing === - - enum class AccelerationStructureMemoryRequirementsTypeNV - { - eObject = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV, - eBuildScratch = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV, - eUpdateScratch = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV - }; - - //=== VK_AMD_pipeline_compiler_control === - - enum class PipelineCompilerControlFlagBitsAMD : VkPipelineCompilerControlFlagsAMD - { - }; - - //=== VK_EXT_calibrated_timestamps === - - enum class TimeDomainEXT - { - eDevice = VK_TIME_DOMAIN_DEVICE_EXT, - eClockMonotonic = VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT, - eClockMonotonicRaw = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT, - eQueryPerformanceCounter = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT - }; - - //=== VK_KHR_global_priority === - - enum class QueueGlobalPriorityKHR - { - eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR, - eMedium = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR, - eHigh = VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR, - eRealtime = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR - }; - using QueueGlobalPriorityEXT = QueueGlobalPriorityKHR; - - //=== VK_AMD_memory_overallocation_behavior === - - enum class MemoryOverallocationBehaviorAMD - { - eDefault = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD, - eAllowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD, - eDisallowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD - }; - - //=== VK_INTEL_performance_query === - - enum class PerformanceConfigurationTypeINTEL - { - eCommandQueueMetricsDiscoveryActivated = VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL - }; - - enum class QueryPoolSamplingModeINTEL - { - eManual = VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL - }; - - enum class PerformanceOverrideTypeINTEL - { - eNullHardware = VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL, - eFlushGpuCaches = VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL - }; - - enum class PerformanceParameterTypeINTEL - { - eHwCountersSupported = VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL, - eStreamMarkerValidBits = VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL - }; - - enum class PerformanceValueTypeINTEL - { - eUint32 = VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL, - eUint64 = VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL, - eFloat = VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL, - eBool = VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL, - eString = VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - enum class ImagePipeSurfaceCreateFlagBitsFUCHSIA : VkImagePipeSurfaceCreateFlagsFUCHSIA - { - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - enum class MetalSurfaceCreateFlagBitsEXT : VkMetalSurfaceCreateFlagsEXT - { - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - - enum class FragmentShadingRateCombinerOpKHR - { - eKeep = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR, - eReplace = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR, - eMin = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR, - eMax = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR, - eMul = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR - }; - - //=== VK_AMD_shader_core_properties2 === - - enum class ShaderCorePropertiesFlagBitsAMD : VkShaderCorePropertiesFlagsAMD - { - }; - - //=== VK_EXT_validation_features === - - enum class ValidationFeatureEnableEXT - { - eGpuAssisted = VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT, - eGpuAssistedReserveBindingSlot = VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT, - eBestPractices = VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT, - eDebugPrintf = VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, - eSynchronizationValidation = VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT - }; - - enum class ValidationFeatureDisableEXT - { - eAll = VK_VALIDATION_FEATURE_DISABLE_ALL_EXT, - eShaders = VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT, - eThreadSafety = VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT, - eApiParameters = VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT, - eObjectLifetimes = VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT, - eCoreChecks = VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT, - eUniqueHandles = VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT, - eShaderValidationCache = VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT - }; - - //=== VK_NV_cooperative_matrix === - - enum class ScopeNV - { - eDevice = VK_SCOPE_DEVICE_NV, - eWorkgroup = VK_SCOPE_WORKGROUP_NV, - eSubgroup = VK_SCOPE_SUBGROUP_NV, - eQueueFamily = VK_SCOPE_QUEUE_FAMILY_NV - }; - - enum class ComponentTypeNV - { - eFloat16 = VK_COMPONENT_TYPE_FLOAT16_NV, - eFloat32 = VK_COMPONENT_TYPE_FLOAT32_NV, - eFloat64 = VK_COMPONENT_TYPE_FLOAT64_NV, - eSint8 = VK_COMPONENT_TYPE_SINT8_NV, - eSint16 = VK_COMPONENT_TYPE_SINT16_NV, - eSint32 = VK_COMPONENT_TYPE_SINT32_NV, - eSint64 = VK_COMPONENT_TYPE_SINT64_NV, - eUint8 = VK_COMPONENT_TYPE_UINT8_NV, - eUint16 = VK_COMPONENT_TYPE_UINT16_NV, - eUint32 = VK_COMPONENT_TYPE_UINT32_NV, - eUint64 = VK_COMPONENT_TYPE_UINT64_NV - }; - - //=== VK_NV_coverage_reduction_mode === - - enum class CoverageReductionModeNV - { - eMerge = VK_COVERAGE_REDUCTION_MODE_MERGE_NV, - eTruncate = VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV - }; - - enum class PipelineCoverageReductionStateCreateFlagBitsNV : VkPipelineCoverageReductionStateCreateFlagsNV - { - }; - - //=== VK_EXT_provoking_vertex === - - enum class ProvokingVertexModeEXT - { - eFirstVertex = VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, - eLastVertex = VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - enum class FullScreenExclusiveEXT - { - eDefault = VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT, - eAllowed = VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT, - eDisallowed = VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT, - eApplicationControlled = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - - enum class HeadlessSurfaceCreateFlagBitsEXT : VkHeadlessSurfaceCreateFlagsEXT - { - }; - - //=== VK_EXT_line_rasterization === - - enum class LineRasterizationModeEXT - { - eDefault = VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT, - eRectangular = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT, - eBresenham = VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, - eRectangularSmooth = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT - }; - - //=== VK_KHR_pipeline_executable_properties === - - enum class PipelineExecutableStatisticFormatKHR - { - eBool32 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR, - eInt64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR, - eUint64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, - eFloat64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR - }; - - //=== VK_NV_device_generated_commands === - - enum class IndirectStateFlagBitsNV : VkIndirectStateFlagsNV - { - eFlagFrontface = VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV - }; - - enum class IndirectCommandsTokenTypeNV - { - eShaderGroup = VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, - eStateFlags = VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV, - eIndexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV, - eVertexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV, - ePushConstant = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, - eDrawIndexed = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV, - eDraw = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV, - eDrawTasks = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, - eDrawMeshTasks = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV - }; - - enum class IndirectCommandsLayoutUsageFlagBitsNV : VkIndirectCommandsLayoutUsageFlagsNV - { - eExplicitPreprocess = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV, - eIndexedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV, - eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV - }; - - //=== VK_EXT_device_memory_report === - - enum class DeviceMemoryReportEventTypeEXT - { - eAllocate = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, - eFree = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, - eImport = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT, - eUnimport = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT, - eAllocationFailed = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT - }; - - enum class DeviceMemoryReportFlagBitsEXT : VkDeviceMemoryReportFlagsEXT - { - }; - - //=== VK_EXT_pipeline_creation_cache_control === - - enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags - { - eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, - eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - enum class VideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR - { - ePrecedingExternallyEncodedBytes = VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR - }; - - enum class VideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR - { - eDefault = VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR, - eTranscoding = VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR, - eStreaming = VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR, - eRecording = VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR, - eConferencing = VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR - }; - - enum class VideoEncodeContentFlagBitsKHR : VkVideoEncodeContentFlagsKHR - { - eDefault = VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR, - eCamera = VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR, - eDesktop = VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR, - eRendered = VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR - }; - - enum class VideoEncodeTuningModeKHR - { - eDefault = VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR, - eHighQuality = VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR, - eLowLatency = VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR, - eUltraLowLatency = VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR, - eLossless = VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR - }; - - enum class VideoEncodeRateControlModeFlagBitsKHR : VkVideoEncodeRateControlModeFlagsKHR - { - eNone = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR, - eCbr = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR, - eVbr = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR - }; - - enum class VideoEncodeFlagBitsKHR : VkVideoEncodeFlagsKHR - { - }; - - enum class VideoEncodeRateControlFlagBitsKHR : VkVideoEncodeRateControlFlagsKHR - { - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - - enum class DeviceDiagnosticsConfigFlagBitsNV : VkDeviceDiagnosticsConfigFlagsNV - { - eEnableShaderDebugInfo = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV, - eEnableResourceTracking = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV, - eEnableAutomaticCheckpoints = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV, - eEnableShaderErrorReporting = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV - }; - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - enum class ExportMetalObjectTypeFlagBitsEXT : VkExportMetalObjectTypeFlagsEXT - { - eMetalDevice = VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT, - eMetalCommandQueue = VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT, - eMetalBuffer = VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT, - eMetalTexture = VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT, - eMetalIosurface = VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT, - eMetalSharedEvent = VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_graphics_pipeline_library === - - enum class GraphicsPipelineLibraryFlagBitsEXT : VkGraphicsPipelineLibraryFlagsEXT - { - eVertexInputInterface = VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, - ePreRasterizationShaders = VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, - eFragmentShader = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, - eFragmentOutputInterface = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT - }; - - enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags - { - eIndependentSetsEXT = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT - }; - - //=== VK_NV_fragment_shading_rate_enums === - - enum class FragmentShadingRateNV - { - e1InvocationPerPixel = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV, - e1InvocationPer1X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV, - e1InvocationPer2X1Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV, - e1InvocationPer2X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV, - e1InvocationPer2X4Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV, - e1InvocationPer4X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV, - e1InvocationPer4X4Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV, - e2InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, - e4InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, - e8InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, - e16InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV, - eNoInvocations = VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV - }; - - enum class FragmentShadingRateTypeNV - { - eFragmentSize = VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV, - eEnums = VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV - }; - - //=== VK_NV_ray_tracing_motion_blur === - - enum class AccelerationStructureMotionInstanceTypeNV - { - eStatic = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV, - eMatrixMotion = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV, - eSrtMotion = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV - }; - - enum class AccelerationStructureMotionInfoFlagBitsNV : VkAccelerationStructureMotionInfoFlagsNV - { - }; - - enum class AccelerationStructureMotionInstanceFlagBitsNV : VkAccelerationStructureMotionInstanceFlagsNV - { - }; - - //=== VK_EXT_image_compression_control === - - enum class ImageCompressionFlagBitsEXT : VkImageCompressionFlagsEXT - { - eDefault = VK_IMAGE_COMPRESSION_DEFAULT_EXT, - eFixedRateDefault = VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT, - eFixedRateExplicit = VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, - eDisabled = VK_IMAGE_COMPRESSION_DISABLED_EXT - }; - - enum class ImageCompressionFixedRateFlagBitsEXT : VkImageCompressionFixedRateFlagsEXT - { - eNone = VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT, - e1Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT, - e2Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT, - e3Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT, - e4Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT, - e5Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT, - e6Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT, - e7Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT, - e8Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT, - e9Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT, - e10Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT, - e11Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT, - e12Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT, - e13Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT, - e14Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT, - e15Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT, - e16Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT, - e17Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT, - e18Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT, - e19Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT, - e20Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT, - e21Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT, - e22Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT, - e23Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT, - e24Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT - }; - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - enum class DirectFBSurfaceCreateFlagBitsEXT : VkDirectFBSurfaceCreateFlagsEXT - { - }; -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - enum class RayTracingShaderGroupTypeKHR - { - eGeneral = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, - eTrianglesHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR, - eProceduralHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR - }; - using RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR; - - enum class ShaderGroupShaderKHR - { - eGeneral = VK_SHADER_GROUP_SHADER_GENERAL_KHR, - eClosestHit = VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR, - eAnyHit = VK_SHADER_GROUP_SHADER_ANY_HIT_KHR, - eIntersection = VK_SHADER_GROUP_SHADER_INTERSECTION_KHR - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - enum class ImageConstraintsInfoFlagBitsFUCHSIA : VkImageConstraintsInfoFlagsFUCHSIA - { - eCpuReadRarely = VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA, - eCpuReadOften = VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA, - eCpuWriteRarely = VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA, - eCpuWriteOften = VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA, - eProtectedOptional = VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA - }; - - enum class ImageFormatConstraintsFlagBitsFUCHSIA : VkImageFormatConstraintsFlagsFUCHSIA - { - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - enum class ScreenSurfaceCreateFlagBitsQNX : VkScreenSurfaceCreateFlagsQNX - { - }; -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_subpass_merge_feedback === - - enum class SubpassMergeStatusEXT - { - eMerged = VK_SUBPASS_MERGE_STATUS_MERGED_EXT, - eDisallowed = VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT, - eNotMergedSideEffects = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT, - eNotMergedSamplesMismatch = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT, - eNotMergedViewsMismatch = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT, - eNotMergedAliasing = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT, - eNotMergedDependencies = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT, - eNotMergedIncompatibleInputAttachment = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT, - eNotMergedTooManyAttachments = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT, - eNotMergedInsufficientStorage = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT, - eNotMergedDepthStencilCount = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT, - eNotMergedResolveAttachmentReuse = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT, - eNotMergedSingleSubpass = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT, - eNotMergedUnspecified = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT - }; - - //=== VK_EXT_rasterization_order_attachment_access === - - enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags - { - eRasterizationOrderAttachmentAccessEXT = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentAccessARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM - }; - - enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags - { - eRasterizationOrderAttachmentDepthAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentStencilAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentDepthAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentStencilAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM - }; - - template - struct IndexTypeValue - { - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; - }; - - template <> - struct CppType - { - using Type = uint16_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; - }; - - template <> - struct CppType - { - using Type = uint32_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8EXT; - }; - - template <> - struct CppType - { - using Type = uint8_t; - }; - - //================ - //=== BITMASKs === - //================ - - //=== VK_VERSION_1_0 === - - using FormatFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = - VkFlags( FormatFeatureFlagBits::eSampledImage ) | VkFlags( FormatFeatureFlagBits::eStorageImage ) | - VkFlags( FormatFeatureFlagBits::eStorageImageAtomic ) | VkFlags( FormatFeatureFlagBits::eUniformTexelBuffer ) | - VkFlags( FormatFeatureFlagBits::eStorageTexelBuffer ) | VkFlags( FormatFeatureFlagBits::eStorageTexelBufferAtomic ) | - VkFlags( FormatFeatureFlagBits::eVertexBuffer ) | VkFlags( FormatFeatureFlagBits::eColorAttachment ) | - VkFlags( FormatFeatureFlagBits::eColorAttachmentBlend ) | VkFlags( FormatFeatureFlagBits::eDepthStencilAttachment ) | - VkFlags( FormatFeatureFlagBits::eBlitSrc ) | VkFlags( FormatFeatureFlagBits::eBlitDst ) | VkFlags( FormatFeatureFlagBits::eSampledImageFilterLinear ) | - VkFlags( FormatFeatureFlagBits::eTransferSrc ) | VkFlags( FormatFeatureFlagBits::eTransferDst ) | - VkFlags( FormatFeatureFlagBits::eMidpointChromaSamples ) | VkFlags( FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter ) | - VkFlags( FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter ) | - VkFlags( FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit ) | - VkFlags( FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) | VkFlags( FormatFeatureFlagBits::eDisjoint ) | - VkFlags( FormatFeatureFlagBits::eCositedChromaSamples ) | VkFlags( FormatFeatureFlagBits::eSampledImageFilterMinmax ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( FormatFeatureFlagBits::eVideoDecodeOutputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoDecodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR ) | VkFlags( FormatFeatureFlagBits::eSampledImageFilterCubicEXT ) | - VkFlags( FormatFeatureFlagBits::eFragmentDensityMapEXT ) | VkFlags( FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( FormatFeatureFlagBits::eVideoEncodeInputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoEncodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags operator|( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags operator&( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags operator^( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags operator~( FormatFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( FormatFeatureFlags( bits ) ); - } - - using ImageCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageCreateFlagBits::eSparseBinding ) | VkFlags( ImageCreateFlagBits::eSparseResidency ) | - VkFlags( ImageCreateFlagBits::eSparseAliased ) | VkFlags( ImageCreateFlagBits::eMutableFormat ) | - VkFlags( ImageCreateFlagBits::eCubeCompatible ) | VkFlags( ImageCreateFlagBits::eAlias ) | - VkFlags( ImageCreateFlagBits::eSplitInstanceBindRegions ) | VkFlags( ImageCreateFlagBits::e2DArrayCompatible ) | - VkFlags( ImageCreateFlagBits::eBlockTexelViewCompatible ) | VkFlags( ImageCreateFlagBits::eExtendedUsage ) | - VkFlags( ImageCreateFlagBits::eProtected ) | VkFlags( ImageCreateFlagBits::eDisjoint ) | VkFlags( ImageCreateFlagBits::eCornerSampledNV ) | - VkFlags( ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT ) | VkFlags( ImageCreateFlagBits::eSubsampledEXT ) | - VkFlags( ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT ) | VkFlags( ImageCreateFlagBits::e2DViewCompatibleEXT ) | - VkFlags( ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCreateFlags operator|( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCreateFlags operator&( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCreateFlags operator^( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCreateFlags operator~( ImageCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageCreateFlags( bits ) ); - } - - using ImageUsageFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageUsageFlagBits::eTransferSrc ) | VkFlags( ImageUsageFlagBits::eTransferDst ) | VkFlags( ImageUsageFlagBits::eSampled ) | - VkFlags( ImageUsageFlagBits::eStorage ) | VkFlags( ImageUsageFlagBits::eColorAttachment ) | - VkFlags( ImageUsageFlagBits::eDepthStencilAttachment ) | VkFlags( ImageUsageFlagBits::eTransientAttachment ) | - VkFlags( ImageUsageFlagBits::eInputAttachment ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( ImageUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeSrcKHR ) | - VkFlags( ImageUsageFlagBits::eVideoDecodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( ImageUsageFlagBits::eFragmentDensityMapEXT ) | VkFlags( ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) | - VkFlags( ImageUsageFlagBits::eVideoEncodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( ImageUsageFlagBits::eAttachmentFeedbackLoopEXT ) | VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI ) | - VkFlags( ImageUsageFlagBits::eSampleWeightQCOM ) | VkFlags( ImageUsageFlagBits::eSampleBlockMatchQCOM ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageUsageFlags operator|( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageUsageFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageUsageFlags operator&( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageUsageFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageUsageFlags operator^( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageUsageFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageUsageFlags operator~( ImageUsageFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageUsageFlags( bits ) ); - } - - using InstanceCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( InstanceCreateFlagBits::eEnumeratePortabilityKHR ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR InstanceCreateFlags operator|( InstanceCreateFlagBits bit0, InstanceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return InstanceCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR InstanceCreateFlags operator&( InstanceCreateFlagBits bit0, InstanceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return InstanceCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR InstanceCreateFlags operator^( InstanceCreateFlagBits bit0, InstanceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return InstanceCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR InstanceCreateFlags operator~( InstanceCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( InstanceCreateFlags( bits ) ); - } - - using MemoryHeapFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( MemoryHeapFlagBits::eDeviceLocal ) | VkFlags( MemoryHeapFlagBits::eMultiInstance ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryHeapFlags operator|( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryHeapFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryHeapFlags operator&( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryHeapFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryHeapFlags operator^( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryHeapFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryHeapFlags operator~( MemoryHeapFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( MemoryHeapFlags( bits ) ); - } - - using MemoryPropertyFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( MemoryPropertyFlagBits::eDeviceLocal ) | VkFlags( MemoryPropertyFlagBits::eHostVisible ) | - VkFlags( MemoryPropertyFlagBits::eHostCoherent ) | VkFlags( MemoryPropertyFlagBits::eHostCached ) | - VkFlags( MemoryPropertyFlagBits::eLazilyAllocated ) | VkFlags( MemoryPropertyFlagBits::eProtected ) | - VkFlags( MemoryPropertyFlagBits::eDeviceCoherentAMD ) | VkFlags( MemoryPropertyFlagBits::eDeviceUncachedAMD ) | - VkFlags( MemoryPropertyFlagBits::eRdmaCapableNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryPropertyFlags operator|( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryPropertyFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryPropertyFlags operator&( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryPropertyFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryPropertyFlags operator^( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryPropertyFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryPropertyFlags operator~( MemoryPropertyFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( MemoryPropertyFlags( bits ) ); - } - - using QueueFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( QueueFlagBits::eGraphics ) | VkFlags( QueueFlagBits::eCompute ) | VkFlags( QueueFlagBits::eTransfer ) | - VkFlags( QueueFlagBits::eSparseBinding ) | VkFlags( QueueFlagBits::eProtected ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( QueueFlagBits::eVideoDecodeKHR ) | VkFlags( QueueFlagBits::eVideoEncodeKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueueFlags operator|( QueueFlagBits bit0, QueueFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueueFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueueFlags operator&( QueueFlagBits bit0, QueueFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueueFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueueFlags operator^( QueueFlagBits bit0, QueueFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueueFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueueFlags operator~( QueueFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( QueueFlags( bits ) ); - } - - using SampleCountFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SampleCountFlagBits::e1 ) | VkFlags( SampleCountFlagBits::e2 ) | VkFlags( SampleCountFlagBits::e4 ) | - VkFlags( SampleCountFlagBits::e8 ) | VkFlags( SampleCountFlagBits::e16 ) | VkFlags( SampleCountFlagBits::e32 ) | - VkFlags( SampleCountFlagBits::e64 ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SampleCountFlags operator|( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SampleCountFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SampleCountFlags operator&( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SampleCountFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SampleCountFlags operator^( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SampleCountFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SampleCountFlags operator~( SampleCountFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SampleCountFlags( bits ) ); - } - - using DeviceCreateFlags = Flags; - - using DeviceQueueCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DeviceQueueCreateFlagBits::eProtected ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceQueueCreateFlags operator|( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceQueueCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceQueueCreateFlags operator&( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceQueueCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceQueueCreateFlags operator^( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceQueueCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceQueueCreateFlags operator~( DeviceQueueCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DeviceQueueCreateFlags( bits ) ); - } - - using PipelineStageFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineStageFlagBits::eTopOfPipe ) | VkFlags( PipelineStageFlagBits::eDrawIndirect ) | - VkFlags( PipelineStageFlagBits::eVertexInput ) | VkFlags( PipelineStageFlagBits::eVertexShader ) | - VkFlags( PipelineStageFlagBits::eTessellationControlShader ) | VkFlags( PipelineStageFlagBits::eTessellationEvaluationShader ) | - VkFlags( PipelineStageFlagBits::eGeometryShader ) | VkFlags( PipelineStageFlagBits::eFragmentShader ) | - VkFlags( PipelineStageFlagBits::eEarlyFragmentTests ) | VkFlags( PipelineStageFlagBits::eLateFragmentTests ) | - VkFlags( PipelineStageFlagBits::eColorAttachmentOutput ) | VkFlags( PipelineStageFlagBits::eComputeShader ) | - VkFlags( PipelineStageFlagBits::eTransfer ) | VkFlags( PipelineStageFlagBits::eBottomOfPipe ) | VkFlags( PipelineStageFlagBits::eHost ) | - VkFlags( PipelineStageFlagBits::eAllGraphics ) | VkFlags( PipelineStageFlagBits::eAllCommands ) | VkFlags( PipelineStageFlagBits::eNone ) | - VkFlags( PipelineStageFlagBits::eTransformFeedbackEXT ) | VkFlags( PipelineStageFlagBits::eConditionalRenderingEXT ) | - VkFlags( PipelineStageFlagBits::eAccelerationStructureBuildKHR ) | VkFlags( PipelineStageFlagBits::eRayTracingShaderKHR ) | - VkFlags( PipelineStageFlagBits::eFragmentDensityProcessEXT ) | VkFlags( PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR ) | - VkFlags( PipelineStageFlagBits::eCommandPreprocessNV ) | VkFlags( PipelineStageFlagBits::eTaskShaderEXT ) | - VkFlags( PipelineStageFlagBits::eMeshShaderEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags operator|( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags operator&( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags operator^( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags operator~( PipelineStageFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineStageFlags( bits ) ); - } - - using MemoryMapFlags = Flags; - - using ImageAspectFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageAspectFlagBits::eColor ) | VkFlags( ImageAspectFlagBits::eDepth ) | VkFlags( ImageAspectFlagBits::eStencil ) | - VkFlags( ImageAspectFlagBits::eMetadata ) | VkFlags( ImageAspectFlagBits::ePlane0 ) | VkFlags( ImageAspectFlagBits::ePlane1 ) | - VkFlags( ImageAspectFlagBits::ePlane2 ) | VkFlags( ImageAspectFlagBits::eNone ) | VkFlags( ImageAspectFlagBits::eMemoryPlane0EXT ) | - VkFlags( ImageAspectFlagBits::eMemoryPlane1EXT ) | VkFlags( ImageAspectFlagBits::eMemoryPlane2EXT ) | - VkFlags( ImageAspectFlagBits::eMemoryPlane3EXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageAspectFlags operator|( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageAspectFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageAspectFlags operator&( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageAspectFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageAspectFlags operator^( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageAspectFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageAspectFlags operator~( ImageAspectFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageAspectFlags( bits ) ); - } - - using SparseImageFormatFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SparseImageFormatFlagBits::eSingleMiptail ) | VkFlags( SparseImageFormatFlagBits::eAlignedMipSize ) | - VkFlags( SparseImageFormatFlagBits::eNonstandardBlockSize ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseImageFormatFlags operator|( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseImageFormatFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseImageFormatFlags operator&( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseImageFormatFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseImageFormatFlags operator^( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseImageFormatFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseImageFormatFlags operator~( SparseImageFormatFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SparseImageFormatFlags( bits ) ); - } - - using SparseMemoryBindFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SparseMemoryBindFlagBits::eMetadata ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseMemoryBindFlags operator|( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseMemoryBindFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseMemoryBindFlags operator&( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseMemoryBindFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseMemoryBindFlags operator^( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SparseMemoryBindFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SparseMemoryBindFlags operator~( SparseMemoryBindFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SparseMemoryBindFlags( bits ) ); - } - - using FenceCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( FenceCreateFlagBits::eSignaled ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceCreateFlags operator|( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceCreateFlags operator&( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceCreateFlags operator^( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceCreateFlags operator~( FenceCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( FenceCreateFlags( bits ) ); - } - - using SemaphoreCreateFlags = Flags; - - using EventCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( EventCreateFlagBits::eDeviceOnly ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR EventCreateFlags operator|( EventCreateFlagBits bit0, EventCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return EventCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR EventCreateFlags operator&( EventCreateFlagBits bit0, EventCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return EventCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR EventCreateFlags operator^( EventCreateFlagBits bit0, EventCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return EventCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR EventCreateFlags operator~( EventCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( EventCreateFlags( bits ) ); - } - - using QueryPipelineStatisticFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( QueryPipelineStatisticFlagBits::eInputAssemblyVertices ) | VkFlags( QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives ) | - VkFlags( QueryPipelineStatisticFlagBits::eVertexShaderInvocations ) | VkFlags( QueryPipelineStatisticFlagBits::eGeometryShaderInvocations ) | - VkFlags( QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives ) | VkFlags( QueryPipelineStatisticFlagBits::eClippingInvocations ) | - VkFlags( QueryPipelineStatisticFlagBits::eClippingPrimitives ) | VkFlags( QueryPipelineStatisticFlagBits::eFragmentShaderInvocations ) | - VkFlags( QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches ) | - VkFlags( QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations ) | - VkFlags( QueryPipelineStatisticFlagBits::eComputeShaderInvocations ) | VkFlags( QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT ) | - VkFlags( QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryPipelineStatisticFlags operator|( QueryPipelineStatisticFlagBits bit0, - QueryPipelineStatisticFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryPipelineStatisticFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryPipelineStatisticFlags operator&( QueryPipelineStatisticFlagBits bit0, - QueryPipelineStatisticFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryPipelineStatisticFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryPipelineStatisticFlags operator^( QueryPipelineStatisticFlagBits bit0, - QueryPipelineStatisticFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryPipelineStatisticFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryPipelineStatisticFlags operator~( QueryPipelineStatisticFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( QueryPipelineStatisticFlags( bits ) ); - } - - using QueryPoolCreateFlags = Flags; - - using QueryResultFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( QueryResultFlagBits::e64 ) | VkFlags( QueryResultFlagBits::eWait ) | VkFlags( QueryResultFlagBits::eWithAvailability ) | - VkFlags( QueryResultFlagBits::ePartial ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( QueryResultFlagBits::eWithStatusKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryResultFlags operator|( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryResultFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryResultFlags operator&( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryResultFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryResultFlags operator^( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryResultFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryResultFlags operator~( QueryResultFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( QueryResultFlags( bits ) ); - } - - using BufferCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( BufferCreateFlagBits::eSparseBinding ) | VkFlags( BufferCreateFlagBits::eSparseResidency ) | - VkFlags( BufferCreateFlagBits::eSparseAliased ) | VkFlags( BufferCreateFlagBits::eProtected ) | - VkFlags( BufferCreateFlagBits::eDeviceAddressCaptureReplay ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferCreateFlags operator|( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferCreateFlags operator&( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferCreateFlags operator^( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferCreateFlags operator~( BufferCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( BufferCreateFlags( bits ) ); - } - - using BufferUsageFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( BufferUsageFlagBits::eTransferSrc ) | VkFlags( BufferUsageFlagBits::eTransferDst ) | - VkFlags( BufferUsageFlagBits::eUniformTexelBuffer ) | VkFlags( BufferUsageFlagBits::eStorageTexelBuffer ) | - VkFlags( BufferUsageFlagBits::eUniformBuffer ) | VkFlags( BufferUsageFlagBits::eStorageBuffer ) | - VkFlags( BufferUsageFlagBits::eIndexBuffer ) | VkFlags( BufferUsageFlagBits::eVertexBuffer ) | - VkFlags( BufferUsageFlagBits::eIndirectBuffer ) | VkFlags( BufferUsageFlagBits::eShaderDeviceAddress ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( BufferUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeDstKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( BufferUsageFlagBits::eTransformFeedbackBufferEXT ) | VkFlags( BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) | - VkFlags( BufferUsageFlagBits::eConditionalRenderingEXT ) | VkFlags( BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) | - VkFlags( BufferUsageFlagBits::eAccelerationStructureStorageKHR ) | VkFlags( BufferUsageFlagBits::eShaderBindingTableKHR ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( BufferUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeSrcKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferUsageFlags operator|( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferUsageFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferUsageFlags operator&( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferUsageFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferUsageFlags operator^( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return BufferUsageFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BufferUsageFlags operator~( BufferUsageFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( BufferUsageFlags( bits ) ); - } - - using BufferViewCreateFlags = Flags; - - using ImageViewCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT ) | VkFlags( ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageViewCreateFlags operator|( ImageViewCreateFlagBits bit0, ImageViewCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageViewCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageViewCreateFlags operator&( ImageViewCreateFlagBits bit0, ImageViewCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageViewCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageViewCreateFlags operator^( ImageViewCreateFlagBits bit0, ImageViewCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageViewCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageViewCreateFlags operator~( ImageViewCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageViewCreateFlags( bits ) ); - } - - using ShaderModuleCreateFlags = Flags; - - using PipelineCacheCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineCacheCreateFlagBits::eExternallySynchronized ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCacheCreateFlags operator|( PipelineCacheCreateFlagBits bit0, - PipelineCacheCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCacheCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCacheCreateFlags operator&( PipelineCacheCreateFlagBits bit0, - PipelineCacheCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCacheCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCacheCreateFlags operator^( PipelineCacheCreateFlagBits bit0, - PipelineCacheCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCacheCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCacheCreateFlags operator~( PipelineCacheCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineCacheCreateFlags( bits ) ); - } - - using ColorComponentFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ColorComponentFlagBits::eR ) | VkFlags( ColorComponentFlagBits::eG ) | VkFlags( ColorComponentFlagBits::eB ) | - VkFlags( ColorComponentFlagBits::eA ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ColorComponentFlags operator|( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ColorComponentFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ColorComponentFlags operator&( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ColorComponentFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ColorComponentFlags operator^( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ColorComponentFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ColorComponentFlags operator~( ColorComponentFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ColorComponentFlags( bits ) ); - } - - using CullModeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CullModeFlagBits::eNone ) | VkFlags( CullModeFlagBits::eFront ) | VkFlags( CullModeFlagBits::eBack ) | - VkFlags( CullModeFlagBits::eFrontAndBack ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CullModeFlags operator|( CullModeFlagBits bit0, CullModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CullModeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CullModeFlags operator&( CullModeFlagBits bit0, CullModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CullModeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CullModeFlags operator^( CullModeFlagBits bit0, CullModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CullModeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CullModeFlags operator~( CullModeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CullModeFlags( bits ) ); - } - - using PipelineColorBlendStateCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineColorBlendStateCreateFlags operator|( PipelineColorBlendStateCreateFlagBits bit0, - PipelineColorBlendStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineColorBlendStateCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineColorBlendStateCreateFlags operator&( PipelineColorBlendStateCreateFlagBits bit0, - PipelineColorBlendStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineColorBlendStateCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineColorBlendStateCreateFlags operator^( PipelineColorBlendStateCreateFlagBits bit0, - PipelineColorBlendStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineColorBlendStateCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineColorBlendStateCreateFlags operator~( PipelineColorBlendStateCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineColorBlendStateCreateFlags( bits ) ); - } - - using PipelineCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineCreateFlagBits::eDisableOptimization ) | VkFlags( PipelineCreateFlagBits::eAllowDerivatives ) | - VkFlags( PipelineCreateFlagBits::eDerivative ) | VkFlags( PipelineCreateFlagBits::eViewIndexFromDeviceIndex ) | - VkFlags( PipelineCreateFlagBits::eDispatchBase ) | VkFlags( PipelineCreateFlagBits::eFailOnPipelineCompileRequired ) | - VkFlags( PipelineCreateFlagBits::eEarlyReturnOnFailure ) | VkFlags( PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR ) | - VkFlags( PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT ) | - VkFlags( PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR ) | - VkFlags( PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR ) | VkFlags( PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR ) | - VkFlags( PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR ) | VkFlags( PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR ) | - VkFlags( PipelineCreateFlagBits::eRayTracingSkipAabbsKHR ) | VkFlags( PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR ) | - VkFlags( PipelineCreateFlagBits::eDeferCompileNV ) | VkFlags( PipelineCreateFlagBits::eCaptureStatisticsKHR ) | - VkFlags( PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR ) | VkFlags( PipelineCreateFlagBits::eIndirectBindableNV ) | - VkFlags( PipelineCreateFlagBits::eLibraryKHR ) | VkFlags( PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT ) | - VkFlags( PipelineCreateFlagBits::eLinkTimeOptimizationEXT ) | VkFlags( PipelineCreateFlagBits::eRayTracingAllowMotionNV ) | - VkFlags( PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT ) | VkFlags( PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreateFlags operator|( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreateFlags operator&( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreateFlags operator^( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreateFlags operator~( PipelineCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineCreateFlags( bits ) ); - } - - using PipelineDepthStencilStateCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) | - VkFlags( PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateFlags operator|( PipelineDepthStencilStateCreateFlagBits bit0, - PipelineDepthStencilStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineDepthStencilStateCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateFlags operator&( PipelineDepthStencilStateCreateFlagBits bit0, - PipelineDepthStencilStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineDepthStencilStateCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateFlags operator^( PipelineDepthStencilStateCreateFlagBits bit0, - PipelineDepthStencilStateCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineDepthStencilStateCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateFlags operator~( PipelineDepthStencilStateCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineDepthStencilStateCreateFlags( bits ) ); - } - - using PipelineDynamicStateCreateFlags = Flags; - - using PipelineInputAssemblyStateCreateFlags = Flags; - - using PipelineLayoutCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineLayoutCreateFlagBits::eIndependentSetsEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineLayoutCreateFlags operator|( PipelineLayoutCreateFlagBits bit0, - PipelineLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineLayoutCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineLayoutCreateFlags operator&( PipelineLayoutCreateFlagBits bit0, - PipelineLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineLayoutCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineLayoutCreateFlags operator^( PipelineLayoutCreateFlagBits bit0, - PipelineLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineLayoutCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineLayoutCreateFlags operator~( PipelineLayoutCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineLayoutCreateFlags( bits ) ); - } - - using PipelineMultisampleStateCreateFlags = Flags; - - using PipelineRasterizationStateCreateFlags = Flags; - - using PipelineShaderStageCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize ) | VkFlags( PipelineShaderStageCreateFlagBits::eRequireFullSubgroups ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateFlags operator|( PipelineShaderStageCreateFlagBits bit0, - PipelineShaderStageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineShaderStageCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateFlags operator&( PipelineShaderStageCreateFlagBits bit0, - PipelineShaderStageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineShaderStageCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateFlags operator^( PipelineShaderStageCreateFlagBits bit0, - PipelineShaderStageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineShaderStageCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateFlags operator~( PipelineShaderStageCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineShaderStageCreateFlags( bits ) ); - } - - using PipelineTessellationStateCreateFlags = Flags; - - using PipelineVertexInputStateCreateFlags = Flags; - - using PipelineViewportStateCreateFlags = Flags; - - using ShaderStageFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ShaderStageFlagBits::eVertex ) | VkFlags( ShaderStageFlagBits::eTessellationControl ) | - VkFlags( ShaderStageFlagBits::eTessellationEvaluation ) | VkFlags( ShaderStageFlagBits::eGeometry ) | - VkFlags( ShaderStageFlagBits::eFragment ) | VkFlags( ShaderStageFlagBits::eCompute ) | VkFlags( ShaderStageFlagBits::eAllGraphics ) | - VkFlags( ShaderStageFlagBits::eAll ) | VkFlags( ShaderStageFlagBits::eRaygenKHR ) | VkFlags( ShaderStageFlagBits::eAnyHitKHR ) | - VkFlags( ShaderStageFlagBits::eClosestHitKHR ) | VkFlags( ShaderStageFlagBits::eMissKHR ) | VkFlags( ShaderStageFlagBits::eIntersectionKHR ) | - VkFlags( ShaderStageFlagBits::eCallableKHR ) | VkFlags( ShaderStageFlagBits::eTaskEXT ) | VkFlags( ShaderStageFlagBits::eMeshEXT ) | - VkFlags( ShaderStageFlagBits::eSubpassShadingHUAWEI ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ShaderStageFlags operator|( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ShaderStageFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ShaderStageFlags operator&( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ShaderStageFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ShaderStageFlags operator^( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ShaderStageFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ShaderStageFlags operator~( ShaderStageFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ShaderStageFlags( bits ) ); - } - - using SamplerCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SamplerCreateFlagBits::eSubsampledEXT ) | VkFlags( SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT ) | - VkFlags( SamplerCreateFlagBits::eNonSeamlessCubeMapEXT ) | VkFlags( SamplerCreateFlagBits::eImageProcessingQCOM ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SamplerCreateFlags operator|( SamplerCreateFlagBits bit0, SamplerCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SamplerCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SamplerCreateFlags operator&( SamplerCreateFlagBits bit0, SamplerCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SamplerCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SamplerCreateFlags operator^( SamplerCreateFlagBits bit0, SamplerCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SamplerCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SamplerCreateFlags operator~( SamplerCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SamplerCreateFlags( bits ) ); - } - - using DescriptorPoolCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DescriptorPoolCreateFlagBits::eFreeDescriptorSet ) | VkFlags( DescriptorPoolCreateFlagBits::eUpdateAfterBind ) | - VkFlags( DescriptorPoolCreateFlagBits::eHostOnlyVALVE ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorPoolCreateFlags operator|( DescriptorPoolCreateFlagBits bit0, - DescriptorPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorPoolCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorPoolCreateFlags operator&( DescriptorPoolCreateFlagBits bit0, - DescriptorPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorPoolCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorPoolCreateFlags operator^( DescriptorPoolCreateFlagBits bit0, - DescriptorPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorPoolCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorPoolCreateFlags operator~( DescriptorPoolCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DescriptorPoolCreateFlags( bits ) ); - } - - using DescriptorPoolResetFlags = Flags; - - using DescriptorSetLayoutCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool ) | VkFlags( DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR ) | - VkFlags( DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolVALVE ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateFlags operator|( DescriptorSetLayoutCreateFlagBits bit0, - DescriptorSetLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorSetLayoutCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateFlags operator&( DescriptorSetLayoutCreateFlagBits bit0, - DescriptorSetLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorSetLayoutCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateFlags operator^( DescriptorSetLayoutCreateFlagBits bit0, - DescriptorSetLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorSetLayoutCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateFlags operator~( DescriptorSetLayoutCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DescriptorSetLayoutCreateFlags( bits ) ); - } - - using AccessFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( AccessFlagBits::eIndirectCommandRead ) | VkFlags( AccessFlagBits::eIndexRead ) | VkFlags( AccessFlagBits::eVertexAttributeRead ) | - VkFlags( AccessFlagBits::eUniformRead ) | VkFlags( AccessFlagBits::eInputAttachmentRead ) | VkFlags( AccessFlagBits::eShaderRead ) | - VkFlags( AccessFlagBits::eShaderWrite ) | VkFlags( AccessFlagBits::eColorAttachmentRead ) | VkFlags( AccessFlagBits::eColorAttachmentWrite ) | - VkFlags( AccessFlagBits::eDepthStencilAttachmentRead ) | VkFlags( AccessFlagBits::eDepthStencilAttachmentWrite ) | - VkFlags( AccessFlagBits::eTransferRead ) | VkFlags( AccessFlagBits::eTransferWrite ) | VkFlags( AccessFlagBits::eHostRead ) | - VkFlags( AccessFlagBits::eHostWrite ) | VkFlags( AccessFlagBits::eMemoryRead ) | VkFlags( AccessFlagBits::eMemoryWrite ) | - VkFlags( AccessFlagBits::eNone ) | VkFlags( AccessFlagBits::eTransformFeedbackWriteEXT ) | - VkFlags( AccessFlagBits::eTransformFeedbackCounterReadEXT ) | VkFlags( AccessFlagBits::eTransformFeedbackCounterWriteEXT ) | - VkFlags( AccessFlagBits::eConditionalRenderingReadEXT ) | VkFlags( AccessFlagBits::eColorAttachmentReadNoncoherentEXT ) | - VkFlags( AccessFlagBits::eAccelerationStructureReadKHR ) | VkFlags( AccessFlagBits::eAccelerationStructureWriteKHR ) | - VkFlags( AccessFlagBits::eFragmentDensityMapReadEXT ) | VkFlags( AccessFlagBits::eFragmentShadingRateAttachmentReadKHR ) | - VkFlags( AccessFlagBits::eCommandPreprocessReadNV ) | VkFlags( AccessFlagBits::eCommandPreprocessWriteNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags operator|( AccessFlagBits bit0, AccessFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags operator&( AccessFlagBits bit0, AccessFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags operator^( AccessFlagBits bit0, AccessFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags operator~( AccessFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( AccessFlags( bits ) ); - } - - using AttachmentDescriptionFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( AttachmentDescriptionFlagBits::eMayAlias ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AttachmentDescriptionFlags operator|( AttachmentDescriptionFlagBits bit0, - AttachmentDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AttachmentDescriptionFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AttachmentDescriptionFlags operator&( AttachmentDescriptionFlagBits bit0, - AttachmentDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AttachmentDescriptionFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AttachmentDescriptionFlags operator^( AttachmentDescriptionFlagBits bit0, - AttachmentDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return AttachmentDescriptionFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AttachmentDescriptionFlags operator~( AttachmentDescriptionFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( AttachmentDescriptionFlags( bits ) ); - } - - using DependencyFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DependencyFlagBits::eByRegion ) | VkFlags( DependencyFlagBits::eDeviceGroup ) | VkFlags( DependencyFlagBits::eViewLocal ) | - VkFlags( DependencyFlagBits::eFeedbackLoopEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DependencyFlags operator|( DependencyFlagBits bit0, DependencyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DependencyFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DependencyFlags operator&( DependencyFlagBits bit0, DependencyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DependencyFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DependencyFlags operator^( DependencyFlagBits bit0, DependencyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DependencyFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DependencyFlags operator~( DependencyFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DependencyFlags( bits ) ); - } - - using FramebufferCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( FramebufferCreateFlagBits::eImageless ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FramebufferCreateFlags operator|( FramebufferCreateFlagBits bit0, FramebufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FramebufferCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FramebufferCreateFlags operator&( FramebufferCreateFlagBits bit0, FramebufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FramebufferCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FramebufferCreateFlags operator^( FramebufferCreateFlagBits bit0, FramebufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FramebufferCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FramebufferCreateFlags operator~( FramebufferCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( FramebufferCreateFlags( bits ) ); - } - - using RenderPassCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( RenderPassCreateFlagBits::eTransformQCOM ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderPassCreateFlags operator|( RenderPassCreateFlagBits bit0, RenderPassCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderPassCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderPassCreateFlags operator&( RenderPassCreateFlagBits bit0, RenderPassCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderPassCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderPassCreateFlags operator^( RenderPassCreateFlagBits bit0, RenderPassCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderPassCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderPassCreateFlags operator~( RenderPassCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( RenderPassCreateFlags( bits ) ); - } - - using SubpassDescriptionFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SubpassDescriptionFlagBits::ePerViewAttributesNVX ) | VkFlags( SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX ) | - VkFlags( SubpassDescriptionFlagBits::eFragmentRegionQCOM ) | VkFlags( SubpassDescriptionFlagBits::eShaderResolveQCOM ) | - VkFlags( SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT ) | - VkFlags( SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) | - VkFlags( SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) | - VkFlags( SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubpassDescriptionFlags operator|( SubpassDescriptionFlagBits bit0, - SubpassDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubpassDescriptionFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubpassDescriptionFlags operator&( SubpassDescriptionFlagBits bit0, - SubpassDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubpassDescriptionFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubpassDescriptionFlags operator^( SubpassDescriptionFlagBits bit0, - SubpassDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubpassDescriptionFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubpassDescriptionFlags operator~( SubpassDescriptionFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SubpassDescriptionFlags( bits ) ); - } - - using CommandPoolCreateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CommandPoolCreateFlagBits::eTransient ) | VkFlags( CommandPoolCreateFlagBits::eResetCommandBuffer ) | - VkFlags( CommandPoolCreateFlagBits::eProtected ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolCreateFlags operator|( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolCreateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolCreateFlags operator&( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolCreateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolCreateFlags operator^( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolCreateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolCreateFlags operator~( CommandPoolCreateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CommandPoolCreateFlags( bits ) ); - } - - using CommandPoolResetFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CommandPoolResetFlagBits::eReleaseResources ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolResetFlags operator|( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolResetFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolResetFlags operator&( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolResetFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolResetFlags operator^( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandPoolResetFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandPoolResetFlags operator~( CommandPoolResetFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CommandPoolResetFlags( bits ) ); - } - - using CommandBufferResetFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CommandBufferResetFlagBits::eReleaseResources ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferResetFlags operator|( CommandBufferResetFlagBits bit0, - CommandBufferResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferResetFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferResetFlags operator&( CommandBufferResetFlagBits bit0, - CommandBufferResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferResetFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferResetFlags operator^( CommandBufferResetFlagBits bit0, - CommandBufferResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferResetFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferResetFlags operator~( CommandBufferResetFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CommandBufferResetFlags( bits ) ); - } - - using CommandBufferUsageFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CommandBufferUsageFlagBits::eOneTimeSubmit ) | VkFlags( CommandBufferUsageFlagBits::eRenderPassContinue ) | - VkFlags( CommandBufferUsageFlagBits::eSimultaneousUse ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferUsageFlags operator|( CommandBufferUsageFlagBits bit0, - CommandBufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferUsageFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferUsageFlags operator&( CommandBufferUsageFlagBits bit0, - CommandBufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferUsageFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferUsageFlags operator^( CommandBufferUsageFlagBits bit0, - CommandBufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return CommandBufferUsageFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CommandBufferUsageFlags operator~( CommandBufferUsageFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CommandBufferUsageFlags( bits ) ); - } - - using QueryControlFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( QueryControlFlagBits::ePrecise ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryControlFlags operator|( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryControlFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryControlFlags operator&( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryControlFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryControlFlags operator^( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return QueryControlFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR QueryControlFlags operator~( QueryControlFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( QueryControlFlags( bits ) ); - } - - using StencilFaceFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( StencilFaceFlagBits::eFront ) | VkFlags( StencilFaceFlagBits::eBack ) | VkFlags( StencilFaceFlagBits::eFrontAndBack ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR StencilFaceFlags operator|( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return StencilFaceFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR StencilFaceFlags operator&( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return StencilFaceFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR StencilFaceFlags operator^( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return StencilFaceFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR StencilFaceFlags operator~( StencilFaceFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( StencilFaceFlags( bits ) ); - } - - //=== VK_VERSION_1_1 === - - using SubgroupFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SubgroupFeatureFlagBits::eBasic ) | VkFlags( SubgroupFeatureFlagBits::eVote ) | VkFlags( SubgroupFeatureFlagBits::eArithmetic ) | - VkFlags( SubgroupFeatureFlagBits::eBallot ) | VkFlags( SubgroupFeatureFlagBits::eShuffle ) | - VkFlags( SubgroupFeatureFlagBits::eShuffleRelative ) | VkFlags( SubgroupFeatureFlagBits::eClustered ) | - VkFlags( SubgroupFeatureFlagBits::eQuad ) | VkFlags( SubgroupFeatureFlagBits::ePartitionedNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubgroupFeatureFlags operator|( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubgroupFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubgroupFeatureFlags operator&( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubgroupFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubgroupFeatureFlags operator^( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubgroupFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubgroupFeatureFlags operator~( SubgroupFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SubgroupFeatureFlags( bits ) ); - } - - using PeerMemoryFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PeerMemoryFeatureFlagBits::eCopySrc ) | VkFlags( PeerMemoryFeatureFlagBits::eCopyDst ) | - VkFlags( PeerMemoryFeatureFlagBits::eGenericSrc ) | VkFlags( PeerMemoryFeatureFlagBits::eGenericDst ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PeerMemoryFeatureFlags operator|( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PeerMemoryFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PeerMemoryFeatureFlags operator&( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PeerMemoryFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PeerMemoryFeatureFlags operator^( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PeerMemoryFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PeerMemoryFeatureFlags operator~( PeerMemoryFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PeerMemoryFeatureFlags( bits ) ); - } - - using PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; - - using MemoryAllocateFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( MemoryAllocateFlagBits::eDeviceMask ) | VkFlags( MemoryAllocateFlagBits::eDeviceAddress ) | - VkFlags( MemoryAllocateFlagBits::eDeviceAddressCaptureReplay ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryAllocateFlags operator|( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryAllocateFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryAllocateFlags operator&( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryAllocateFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryAllocateFlags operator^( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return MemoryAllocateFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR MemoryAllocateFlags operator~( MemoryAllocateFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( MemoryAllocateFlags( bits ) ); - } - - using MemoryAllocateFlagsKHR = MemoryAllocateFlags; - - using CommandPoolTrimFlags = Flags; - - using CommandPoolTrimFlagsKHR = CommandPoolTrimFlags; - - using DescriptorUpdateTemplateCreateFlags = Flags; - - using DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; - - using ExternalMemoryHandleTypeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eOpaqueWin32 ) | - VkFlags( ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D11Texture ) | - VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) | - VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eDmaBufEXT ) -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - | VkFlags( ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) -#if defined( VK_USE_PLATFORM_FUCHSIA ) - | VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - | VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlags operator|( ExternalMemoryHandleTypeFlagBits bit0, - ExternalMemoryHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlags operator&( ExternalMemoryHandleTypeFlagBits bit0, - ExternalMemoryHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlags operator^( ExternalMemoryHandleTypeFlagBits bit0, - ExternalMemoryHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlags operator~( ExternalMemoryHandleTypeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalMemoryHandleTypeFlags( bits ) ); - } - - using ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags; - - using ExternalMemoryFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalMemoryFeatureFlagBits::eDedicatedOnly ) | VkFlags( ExternalMemoryFeatureFlagBits::eExportable ) | - VkFlags( ExternalMemoryFeatureFlagBits::eImportable ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlags operator|( ExternalMemoryFeatureFlagBits bit0, - ExternalMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlags operator&( ExternalMemoryFeatureFlagBits bit0, - ExternalMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlags operator^( ExternalMemoryFeatureFlagBits bit0, - ExternalMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlags operator~( ExternalMemoryFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalMemoryFeatureFlags( bits ) ); - } - - using ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags; - - using ExternalFenceHandleTypeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalFenceHandleTypeFlagBits::eOpaqueFd ) | VkFlags( ExternalFenceHandleTypeFlagBits::eOpaqueWin32 ) | - VkFlags( ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalFenceHandleTypeFlagBits::eSyncFd ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceHandleTypeFlags operator|( ExternalFenceHandleTypeFlagBits bit0, - ExternalFenceHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceHandleTypeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceHandleTypeFlags operator&( ExternalFenceHandleTypeFlagBits bit0, - ExternalFenceHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceHandleTypeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceHandleTypeFlags operator^( ExternalFenceHandleTypeFlagBits bit0, - ExternalFenceHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceHandleTypeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceHandleTypeFlags operator~( ExternalFenceHandleTypeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalFenceHandleTypeFlags( bits ) ); - } - - using ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags; - - using ExternalFenceFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalFenceFeatureFlagBits::eExportable ) | VkFlags( ExternalFenceFeatureFlagBits::eImportable ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceFeatureFlags operator|( ExternalFenceFeatureFlagBits bit0, - ExternalFenceFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceFeatureFlags operator&( ExternalFenceFeatureFlagBits bit0, - ExternalFenceFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceFeatureFlags operator^( ExternalFenceFeatureFlagBits bit0, - ExternalFenceFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalFenceFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalFenceFeatureFlags operator~( ExternalFenceFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalFenceFeatureFlags( bits ) ); - } - - using ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags; - - using FenceImportFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( FenceImportFlagBits::eTemporary ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceImportFlags operator|( FenceImportFlagBits bit0, FenceImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceImportFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceImportFlags operator&( FenceImportFlagBits bit0, FenceImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceImportFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceImportFlags operator^( FenceImportFlagBits bit0, FenceImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return FenceImportFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FenceImportFlags operator~( FenceImportFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( FenceImportFlags( bits ) ); - } - - using FenceImportFlagsKHR = FenceImportFlags; - - using SemaphoreImportFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SemaphoreImportFlagBits::eTemporary ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreImportFlags operator|( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreImportFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreImportFlags operator&( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreImportFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreImportFlags operator^( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreImportFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreImportFlags operator~( SemaphoreImportFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SemaphoreImportFlags( bits ) ); - } - - using SemaphoreImportFlagsKHR = SemaphoreImportFlags; - - using ExternalSemaphoreHandleTypeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32 ) | - VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) | - VkFlags( ExternalSemaphoreHandleTypeFlagBits::eSyncFd ) -#if defined( VK_USE_PLATFORM_FUCHSIA ) - | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreHandleTypeFlags operator|( ExternalSemaphoreHandleTypeFlagBits bit0, - ExternalSemaphoreHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreHandleTypeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreHandleTypeFlags operator&( ExternalSemaphoreHandleTypeFlagBits bit0, - ExternalSemaphoreHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreHandleTypeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreHandleTypeFlags operator^( ExternalSemaphoreHandleTypeFlagBits bit0, - ExternalSemaphoreHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreHandleTypeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreHandleTypeFlags operator~( ExternalSemaphoreHandleTypeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalSemaphoreHandleTypeFlags( bits ) ); - } - - using ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags; - - using ExternalSemaphoreFeatureFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalSemaphoreFeatureFlagBits::eExportable ) | VkFlags( ExternalSemaphoreFeatureFlagBits::eImportable ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreFeatureFlags operator|( ExternalSemaphoreFeatureFlagBits bit0, - ExternalSemaphoreFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreFeatureFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreFeatureFlags operator&( ExternalSemaphoreFeatureFlagBits bit0, - ExternalSemaphoreFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreFeatureFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreFeatureFlags operator^( ExternalSemaphoreFeatureFlagBits bit0, - ExternalSemaphoreFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalSemaphoreFeatureFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalSemaphoreFeatureFlags operator~( ExternalSemaphoreFeatureFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalSemaphoreFeatureFlags( bits ) ); - } - - using ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags; - - //=== VK_VERSION_1_2 === - - using DescriptorBindingFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DescriptorBindingFlagBits::eUpdateAfterBind ) | VkFlags( DescriptorBindingFlagBits::eUpdateUnusedWhilePending ) | - VkFlags( DescriptorBindingFlagBits::ePartiallyBound ) | VkFlags( DescriptorBindingFlagBits::eVariableDescriptorCount ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator|( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorBindingFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator&( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorBindingFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator^( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return DescriptorBindingFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator~( DescriptorBindingFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DescriptorBindingFlags( bits ) ); - } - - using DescriptorBindingFlagsEXT = DescriptorBindingFlags; - - using ResolveModeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ResolveModeFlagBits::eNone ) | VkFlags( ResolveModeFlagBits::eSampleZero ) | VkFlags( ResolveModeFlagBits::eAverage ) | - VkFlags( ResolveModeFlagBits::eMin ) | VkFlags( ResolveModeFlagBits::eMax ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator|( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ResolveModeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator&( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ResolveModeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator^( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ResolveModeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator~( ResolveModeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ResolveModeFlags( bits ) ); - } - - using ResolveModeFlagsKHR = ResolveModeFlags; - - using SemaphoreWaitFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SemaphoreWaitFlagBits::eAny ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator|( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreWaitFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator&( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreWaitFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator^( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SemaphoreWaitFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator~( SemaphoreWaitFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SemaphoreWaitFlags( bits ) ); - } - - using SemaphoreWaitFlagsKHR = SemaphoreWaitFlags; - - //=== VK_VERSION_1_3 === - - using PipelineCreationFeedbackFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( PipelineCreationFeedbackFlagBits::eValid ) | VkFlags( PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit ) | - VkFlags( PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackFlags operator|( PipelineCreationFeedbackFlagBits bit0, - PipelineCreationFeedbackFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreationFeedbackFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackFlags operator&( PipelineCreationFeedbackFlagBits bit0, - PipelineCreationFeedbackFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreationFeedbackFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackFlags operator^( PipelineCreationFeedbackFlagBits bit0, - PipelineCreationFeedbackFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineCreationFeedbackFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackFlags operator~( PipelineCreationFeedbackFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineCreationFeedbackFlags( bits ) ); - } - - using PipelineCreationFeedbackFlagsEXT = PipelineCreationFeedbackFlags; - - using ToolPurposeFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ToolPurposeFlagBits::eValidation ) | VkFlags( ToolPurposeFlagBits::eProfiling ) | VkFlags( ToolPurposeFlagBits::eTracing ) | - VkFlags( ToolPurposeFlagBits::eAdditionalFeatures ) | VkFlags( ToolPurposeFlagBits::eModifyingFeatures ) | - VkFlags( ToolPurposeFlagBits::eDebugReportingEXT ) | VkFlags( ToolPurposeFlagBits::eDebugMarkersEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlags operator|( ToolPurposeFlagBits bit0, ToolPurposeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ToolPurposeFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlags operator&( ToolPurposeFlagBits bit0, ToolPurposeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ToolPurposeFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlags operator^( ToolPurposeFlagBits bit0, ToolPurposeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return ToolPurposeFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlags operator~( ToolPurposeFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ToolPurposeFlags( bits ) ); - } - - using ToolPurposeFlagsEXT = ToolPurposeFlags; - - using PrivateDataSlotCreateFlags = Flags; - - using PrivateDataSlotCreateFlagsEXT = PrivateDataSlotCreateFlags; - - using PipelineStageFlags2 = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags64 - { - allFlags = VkFlags64( PipelineStageFlagBits2::eNone ) | VkFlags64( PipelineStageFlagBits2::eTopOfPipe ) | - VkFlags64( PipelineStageFlagBits2::eDrawIndirect ) | VkFlags64( PipelineStageFlagBits2::eVertexInput ) | - VkFlags64( PipelineStageFlagBits2::eVertexShader ) | VkFlags64( PipelineStageFlagBits2::eTessellationControlShader ) | - VkFlags64( PipelineStageFlagBits2::eTessellationEvaluationShader ) | VkFlags64( PipelineStageFlagBits2::eGeometryShader ) | - VkFlags64( PipelineStageFlagBits2::eFragmentShader ) | VkFlags64( PipelineStageFlagBits2::eEarlyFragmentTests ) | - VkFlags64( PipelineStageFlagBits2::eLateFragmentTests ) | VkFlags64( PipelineStageFlagBits2::eColorAttachmentOutput ) | - VkFlags64( PipelineStageFlagBits2::eComputeShader ) | VkFlags64( PipelineStageFlagBits2::eAllTransfer ) | - VkFlags64( PipelineStageFlagBits2::eBottomOfPipe ) | VkFlags64( PipelineStageFlagBits2::eHost ) | - VkFlags64( PipelineStageFlagBits2::eAllGraphics ) | VkFlags64( PipelineStageFlagBits2::eAllCommands ) | - VkFlags64( PipelineStageFlagBits2::eCopy ) | VkFlags64( PipelineStageFlagBits2::eResolve ) | VkFlags64( PipelineStageFlagBits2::eBlit ) | - VkFlags64( PipelineStageFlagBits2::eClear ) | VkFlags64( PipelineStageFlagBits2::eIndexInput ) | - VkFlags64( PipelineStageFlagBits2::eVertexAttributeInput ) | VkFlags64( PipelineStageFlagBits2::ePreRasterizationShaders ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( PipelineStageFlagBits2::eVideoDecodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoEncodeKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( PipelineStageFlagBits2::eTransformFeedbackEXT ) | VkFlags64( PipelineStageFlagBits2::eConditionalRenderingEXT ) | - VkFlags64( PipelineStageFlagBits2::eCommandPreprocessNV ) | VkFlags64( PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) | - VkFlags64( PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) | VkFlags64( PipelineStageFlagBits2::eRayTracingShaderKHR ) | - VkFlags64( PipelineStageFlagBits2::eFragmentDensityProcessEXT ) | VkFlags64( PipelineStageFlagBits2::eTaskShaderEXT ) | - VkFlags64( PipelineStageFlagBits2::eMeshShaderEXT ) | VkFlags64( PipelineStageFlagBits2::eSubpassShadingHUAWEI ) | - VkFlags64( PipelineStageFlagBits2::eInvocationMaskHUAWEI ) | VkFlags64( PipelineStageFlagBits2::eAccelerationStructureCopyKHR ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags2 operator|( PipelineStageFlagBits2 bit0, PipelineStageFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags2( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags2 operator&( PipelineStageFlagBits2 bit0, PipelineStageFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags2( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags2 operator^( PipelineStageFlagBits2 bit0, PipelineStageFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return PipelineStageFlags2( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PipelineStageFlags2 operator~( PipelineStageFlagBits2 bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PipelineStageFlags2( bits ) ); - } - - using PipelineStageFlags2KHR = PipelineStageFlags2; - - using AccessFlags2 = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags64 - { - allFlags = VkFlags64( AccessFlagBits2::eNone ) | VkFlags64( AccessFlagBits2::eIndirectCommandRead ) | VkFlags64( AccessFlagBits2::eIndexRead ) | - VkFlags64( AccessFlagBits2::eVertexAttributeRead ) | VkFlags64( AccessFlagBits2::eUniformRead ) | - VkFlags64( AccessFlagBits2::eInputAttachmentRead ) | VkFlags64( AccessFlagBits2::eShaderRead ) | VkFlags64( AccessFlagBits2::eShaderWrite ) | - VkFlags64( AccessFlagBits2::eColorAttachmentRead ) | VkFlags64( AccessFlagBits2::eColorAttachmentWrite ) | - VkFlags64( AccessFlagBits2::eDepthStencilAttachmentRead ) | VkFlags64( AccessFlagBits2::eDepthStencilAttachmentWrite ) | - VkFlags64( AccessFlagBits2::eTransferRead ) | VkFlags64( AccessFlagBits2::eTransferWrite ) | VkFlags64( AccessFlagBits2::eHostRead ) | - VkFlags64( AccessFlagBits2::eHostWrite ) | VkFlags64( AccessFlagBits2::eMemoryRead ) | VkFlags64( AccessFlagBits2::eMemoryWrite ) | - VkFlags64( AccessFlagBits2::eShaderSampledRead ) | VkFlags64( AccessFlagBits2::eShaderStorageRead ) | - VkFlags64( AccessFlagBits2::eShaderStorageWrite ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( AccessFlagBits2::eVideoDecodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoDecodeWriteKHR ) | - VkFlags64( AccessFlagBits2::eVideoEncodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoEncodeWriteKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( AccessFlagBits2::eTransformFeedbackWriteEXT ) | VkFlags64( AccessFlagBits2::eTransformFeedbackCounterReadEXT ) | - VkFlags64( AccessFlagBits2::eTransformFeedbackCounterWriteEXT ) | VkFlags64( AccessFlagBits2::eConditionalRenderingReadEXT ) | - VkFlags64( AccessFlagBits2::eCommandPreprocessReadNV ) | VkFlags64( AccessFlagBits2::eCommandPreprocessWriteNV ) | - VkFlags64( AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR ) | VkFlags64( AccessFlagBits2::eAccelerationStructureReadKHR ) | - VkFlags64( AccessFlagBits2::eAccelerationStructureWriteKHR ) | VkFlags64( AccessFlagBits2::eFragmentDensityMapReadEXT ) | - VkFlags64( AccessFlagBits2::eColorAttachmentReadNoncoherentEXT ) | VkFlags64( AccessFlagBits2::eInvocationMaskReadHUAWEI ) | - VkFlags64( AccessFlagBits2::eShaderBindingTableReadKHR ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags2 operator|( AccessFlagBits2 bit0, AccessFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags2( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags2 operator&( AccessFlagBits2 bit0, AccessFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags2( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags2 operator^( AccessFlagBits2 bit0, AccessFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccessFlags2( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccessFlags2 operator~( AccessFlagBits2 bits ) VULKAN_HPP_NOEXCEPT - { - return ~( AccessFlags2( bits ) ); - } - - using AccessFlags2KHR = AccessFlags2; - - using SubmitFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SubmitFlagBits::eProtected ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubmitFlags operator|( SubmitFlagBits bit0, SubmitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubmitFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubmitFlags operator&( SubmitFlagBits bit0, SubmitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubmitFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubmitFlags operator^( SubmitFlagBits bit0, SubmitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return SubmitFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SubmitFlags operator~( SubmitFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SubmitFlags( bits ) ); - } - - using SubmitFlagsKHR = SubmitFlags; - - using RenderingFlags = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( RenderingFlagBits::eContentsSecondaryCommandBuffers ) | VkFlags( RenderingFlagBits::eSuspending ) | - VkFlags( RenderingFlagBits::eResuming ) | VkFlags( RenderingFlagBits::eEnableLegacyDitheringEXT ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderingFlags operator|( RenderingFlagBits bit0, RenderingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderingFlags( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderingFlags operator&( RenderingFlagBits bit0, RenderingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderingFlags( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderingFlags operator^( RenderingFlagBits bit0, RenderingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT - { - return RenderingFlags( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR RenderingFlags operator~( RenderingFlagBits bits ) VULKAN_HPP_NOEXCEPT - { - return ~( RenderingFlags( bits ) ); - } - - using RenderingFlagsKHR = RenderingFlags; - - using FormatFeatureFlags2 = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags64 - { - allFlags = VkFlags64( FormatFeatureFlagBits2::eSampledImage ) | VkFlags64( FormatFeatureFlagBits2::eStorageImage ) | - VkFlags64( FormatFeatureFlagBits2::eStorageImageAtomic ) | VkFlags64( FormatFeatureFlagBits2::eUniformTexelBuffer ) | - VkFlags64( FormatFeatureFlagBits2::eStorageTexelBuffer ) | VkFlags64( FormatFeatureFlagBits2::eStorageTexelBufferAtomic ) | - VkFlags64( FormatFeatureFlagBits2::eVertexBuffer ) | VkFlags64( FormatFeatureFlagBits2::eColorAttachment ) | - VkFlags64( FormatFeatureFlagBits2::eColorAttachmentBlend ) | VkFlags64( FormatFeatureFlagBits2::eDepthStencilAttachment ) | - VkFlags64( FormatFeatureFlagBits2::eBlitSrc ) | VkFlags64( FormatFeatureFlagBits2::eBlitDst ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageFilterLinear ) | VkFlags64( FormatFeatureFlagBits2::eSampledImageFilterCubic ) | - VkFlags64( FormatFeatureFlagBits2::eTransferSrc ) | VkFlags64( FormatFeatureFlagBits2::eTransferDst ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageFilterMinmax ) | VkFlags64( FormatFeatureFlagBits2::eMidpointChromaSamples ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) | - VkFlags64( FormatFeatureFlagBits2::eDisjoint ) | VkFlags64( FormatFeatureFlagBits2::eCositedChromaSamples ) | - VkFlags64( FormatFeatureFlagBits2::eStorageReadWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) | - VkFlags64( FormatFeatureFlagBits2::eSampledImageDepthComparison ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) | VkFlags64( FormatFeatureFlagBits2::eFragmentDensityMapEXT ) | - VkFlags64( FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR ) -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeInputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( FormatFeatureFlagBits2::eLinearColorAttachmentNV ) | VkFlags64( FormatFeatureFlagBits2::eWeightImageQCOM ) | - VkFlags64( FormatFeatureFlagBits2::eWeightSampledImageQCOM ) | VkFlags64( FormatFeatureFlagBits2::eBlockMatchingQCOM ) | - VkFlags64( FormatFeatureFlagBits2::eBoxFilterSampledQCOM ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags2 operator|( FormatFeatureFlagBits2 bit0, FormatFeatureFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags2( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags2 operator&( FormatFeatureFlagBits2 bit0, FormatFeatureFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags2( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags2 operator^( FormatFeatureFlagBits2 bit0, FormatFeatureFlagBits2 bit1 ) VULKAN_HPP_NOEXCEPT - { - return FormatFeatureFlags2( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR FormatFeatureFlags2 operator~( FormatFeatureFlagBits2 bits ) VULKAN_HPP_NOEXCEPT - { - return ~( FormatFeatureFlags2( bits ) ); - } - - using FormatFeatureFlags2KHR = FormatFeatureFlags2; - - //=== VK_KHR_surface === - - using CompositeAlphaFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( CompositeAlphaFlagBitsKHR::eOpaque ) | VkFlags( CompositeAlphaFlagBitsKHR::ePreMultiplied ) | - VkFlags( CompositeAlphaFlagBitsKHR::ePostMultiplied ) | VkFlags( CompositeAlphaFlagBitsKHR::eInherit ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CompositeAlphaFlagsKHR operator|( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return CompositeAlphaFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CompositeAlphaFlagsKHR operator&( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return CompositeAlphaFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CompositeAlphaFlagsKHR operator^( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return CompositeAlphaFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR CompositeAlphaFlagsKHR operator~( CompositeAlphaFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( CompositeAlphaFlagsKHR( bits ) ); - } - - //=== VK_KHR_swapchain === - - using SwapchainCreateFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions ) | VkFlags( SwapchainCreateFlagBitsKHR::eProtected ) | - VkFlags( SwapchainCreateFlagBitsKHR::eMutableFormat ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SwapchainCreateFlagsKHR operator|( SwapchainCreateFlagBitsKHR bit0, - SwapchainCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SwapchainCreateFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SwapchainCreateFlagsKHR operator&( SwapchainCreateFlagBitsKHR bit0, - SwapchainCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SwapchainCreateFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SwapchainCreateFlagsKHR operator^( SwapchainCreateFlagBitsKHR bit0, - SwapchainCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SwapchainCreateFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SwapchainCreateFlagsKHR operator~( SwapchainCreateFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SwapchainCreateFlagsKHR( bits ) ); - } - - using DeviceGroupPresentModeFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DeviceGroupPresentModeFlagBitsKHR::eLocal ) | VkFlags( DeviceGroupPresentModeFlagBitsKHR::eRemote ) | - VkFlags( DeviceGroupPresentModeFlagBitsKHR::eSum ) | VkFlags( DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceGroupPresentModeFlagsKHR operator|( DeviceGroupPresentModeFlagBitsKHR bit0, - DeviceGroupPresentModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceGroupPresentModeFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceGroupPresentModeFlagsKHR operator&( DeviceGroupPresentModeFlagBitsKHR bit0, - DeviceGroupPresentModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceGroupPresentModeFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceGroupPresentModeFlagsKHR operator^( DeviceGroupPresentModeFlagBitsKHR bit0, - DeviceGroupPresentModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceGroupPresentModeFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceGroupPresentModeFlagsKHR operator~( DeviceGroupPresentModeFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DeviceGroupPresentModeFlagsKHR( bits ) ); - } - - //=== VK_KHR_display === - - using DisplayModeCreateFlagsKHR = Flags; - - using DisplayPlaneAlphaFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DisplayPlaneAlphaFlagBitsKHR::eOpaque ) | VkFlags( DisplayPlaneAlphaFlagBitsKHR::eGlobal ) | - VkFlags( DisplayPlaneAlphaFlagBitsKHR::ePerPixel ) | VkFlags( DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DisplayPlaneAlphaFlagsKHR operator|( DisplayPlaneAlphaFlagBitsKHR bit0, - DisplayPlaneAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DisplayPlaneAlphaFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DisplayPlaneAlphaFlagsKHR operator&( DisplayPlaneAlphaFlagBitsKHR bit0, - DisplayPlaneAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DisplayPlaneAlphaFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DisplayPlaneAlphaFlagsKHR operator^( DisplayPlaneAlphaFlagBitsKHR bit0, - DisplayPlaneAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return DisplayPlaneAlphaFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DisplayPlaneAlphaFlagsKHR operator~( DisplayPlaneAlphaFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DisplayPlaneAlphaFlagsKHR( bits ) ); - } - - using DisplaySurfaceCreateFlagsKHR = Flags; - - using SurfaceTransformFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SurfaceTransformFlagBitsKHR::eIdentity ) | VkFlags( SurfaceTransformFlagBitsKHR::eRotate90 ) | - VkFlags( SurfaceTransformFlagBitsKHR::eRotate180 ) | VkFlags( SurfaceTransformFlagBitsKHR::eRotate270 ) | - VkFlags( SurfaceTransformFlagBitsKHR::eHorizontalMirror ) | VkFlags( SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90 ) | - VkFlags( SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180 ) | VkFlags( SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270 ) | - VkFlags( SurfaceTransformFlagBitsKHR::eInherit ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceTransformFlagsKHR operator|( SurfaceTransformFlagBitsKHR bit0, - SurfaceTransformFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceTransformFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceTransformFlagsKHR operator&( SurfaceTransformFlagBitsKHR bit0, - SurfaceTransformFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceTransformFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceTransformFlagsKHR operator^( SurfaceTransformFlagBitsKHR bit0, - SurfaceTransformFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceTransformFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceTransformFlagsKHR operator~( SurfaceTransformFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SurfaceTransformFlagsKHR( bits ) ); - } - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - using XlibSurfaceCreateFlagsKHR = Flags; - -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - using XcbSurfaceCreateFlagsKHR = Flags; - -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - using WaylandSurfaceCreateFlagsKHR = Flags; - -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - using AndroidSurfaceCreateFlagsKHR = Flags; - -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - using Win32SurfaceCreateFlagsKHR = Flags; - -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - using DebugReportFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DebugReportFlagBitsEXT::eInformation ) | VkFlags( DebugReportFlagBitsEXT::eWarning ) | - VkFlags( DebugReportFlagBitsEXT::ePerformanceWarning ) | VkFlags( DebugReportFlagBitsEXT::eError ) | VkFlags( DebugReportFlagBitsEXT::eDebug ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugReportFlagsEXT operator|( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugReportFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugReportFlagsEXT operator&( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugReportFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugReportFlagsEXT operator^( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugReportFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugReportFlagsEXT operator~( DebugReportFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DebugReportFlagsEXT( bits ) ); - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - using VideoCodecOperationFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoCodecOperationFlagBitsKHR::eNone ) -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) | - VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH265EXT ) -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodecOperationFlagsKHR operator|( VideoCodecOperationFlagBitsKHR bit0, - VideoCodecOperationFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodecOperationFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodecOperationFlagsKHR operator&( VideoCodecOperationFlagBitsKHR bit0, - VideoCodecOperationFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodecOperationFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodecOperationFlagsKHR operator^( VideoCodecOperationFlagBitsKHR bit0, - VideoCodecOperationFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodecOperationFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodecOperationFlagsKHR operator~( VideoCodecOperationFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoCodecOperationFlagsKHR( bits ) ); - } - - using VideoChromaSubsamplingFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoChromaSubsamplingFlagBitsKHR::eInvalid ) | VkFlags( VideoChromaSubsamplingFlagBitsKHR::eMonochrome ) | - VkFlags( VideoChromaSubsamplingFlagBitsKHR::e420 ) | VkFlags( VideoChromaSubsamplingFlagBitsKHR::e422 ) | - VkFlags( VideoChromaSubsamplingFlagBitsKHR::e444 ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoChromaSubsamplingFlagsKHR operator|( VideoChromaSubsamplingFlagBitsKHR bit0, - VideoChromaSubsamplingFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoChromaSubsamplingFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoChromaSubsamplingFlagsKHR operator&( VideoChromaSubsamplingFlagBitsKHR bit0, - VideoChromaSubsamplingFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoChromaSubsamplingFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoChromaSubsamplingFlagsKHR operator^( VideoChromaSubsamplingFlagBitsKHR bit0, - VideoChromaSubsamplingFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoChromaSubsamplingFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoChromaSubsamplingFlagsKHR operator~( VideoChromaSubsamplingFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoChromaSubsamplingFlagsKHR( bits ) ); - } - - using VideoComponentBitDepthFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoComponentBitDepthFlagBitsKHR::eInvalid ) | VkFlags( VideoComponentBitDepthFlagBitsKHR::e8 ) | - VkFlags( VideoComponentBitDepthFlagBitsKHR::e10 ) | VkFlags( VideoComponentBitDepthFlagBitsKHR::e12 ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoComponentBitDepthFlagsKHR operator|( VideoComponentBitDepthFlagBitsKHR bit0, - VideoComponentBitDepthFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoComponentBitDepthFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoComponentBitDepthFlagsKHR operator&( VideoComponentBitDepthFlagBitsKHR bit0, - VideoComponentBitDepthFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoComponentBitDepthFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoComponentBitDepthFlagsKHR operator^( VideoComponentBitDepthFlagBitsKHR bit0, - VideoComponentBitDepthFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoComponentBitDepthFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoComponentBitDepthFlagsKHR operator~( VideoComponentBitDepthFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoComponentBitDepthFlagsKHR( bits ) ); - } - - using VideoCapabilityFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoCapabilityFlagBitsKHR::eProtectedContent ) | VkFlags( VideoCapabilityFlagBitsKHR::eSeparateReferenceImages ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR operator|( VideoCapabilityFlagBitsKHR bit0, - VideoCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCapabilityFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR operator&( VideoCapabilityFlagBitsKHR bit0, - VideoCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCapabilityFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR operator^( VideoCapabilityFlagBitsKHR bit0, - VideoCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCapabilityFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR operator~( VideoCapabilityFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoCapabilityFlagsKHR( bits ) ); - } - - using VideoSessionCreateFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoSessionCreateFlagBitsKHR::eProtectedContent ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoSessionCreateFlagsKHR operator|( VideoSessionCreateFlagBitsKHR bit0, - VideoSessionCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoSessionCreateFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoSessionCreateFlagsKHR operator&( VideoSessionCreateFlagBitsKHR bit0, - VideoSessionCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoSessionCreateFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoSessionCreateFlagsKHR operator^( VideoSessionCreateFlagBitsKHR bit0, - VideoSessionCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoSessionCreateFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoSessionCreateFlagsKHR operator~( VideoSessionCreateFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoSessionCreateFlagsKHR( bits ) ); - } - - using VideoSessionParametersCreateFlagsKHR = Flags; - - using VideoBeginCodingFlagsKHR = Flags; - - using VideoEndCodingFlagsKHR = Flags; - - using VideoCodingControlFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoCodingControlFlagBitsKHR::eReset ) -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControl ) | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControlLayer ) -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodingControlFlagsKHR operator|( VideoCodingControlFlagBitsKHR bit0, - VideoCodingControlFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodingControlFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodingControlFlagsKHR operator&( VideoCodingControlFlagBitsKHR bit0, - VideoCodingControlFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodingControlFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodingControlFlagsKHR operator^( VideoCodingControlFlagBitsKHR bit0, - VideoCodingControlFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoCodingControlFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCodingControlFlagsKHR operator~( VideoCodingControlFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoCodingControlFlagsKHR( bits ) ); - } - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - using VideoDecodeCapabilityFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide ) | VkFlags( VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeCapabilityFlagsKHR operator|( VideoDecodeCapabilityFlagBitsKHR bit0, - VideoDecodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeCapabilityFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeCapabilityFlagsKHR operator&( VideoDecodeCapabilityFlagBitsKHR bit0, - VideoDecodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeCapabilityFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeCapabilityFlagsKHR operator^( VideoDecodeCapabilityFlagBitsKHR bit0, - VideoDecodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeCapabilityFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeCapabilityFlagsKHR operator~( VideoDecodeCapabilityFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoDecodeCapabilityFlagsKHR( bits ) ); - } - - using VideoDecodeUsageFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoDecodeUsageFlagBitsKHR::eDefault ) | VkFlags( VideoDecodeUsageFlagBitsKHR::eTranscoding ) | - VkFlags( VideoDecodeUsageFlagBitsKHR::eOffline ) | VkFlags( VideoDecodeUsageFlagBitsKHR::eStreaming ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeUsageFlagsKHR operator|( VideoDecodeUsageFlagBitsKHR bit0, - VideoDecodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeUsageFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeUsageFlagsKHR operator&( VideoDecodeUsageFlagBitsKHR bit0, - VideoDecodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeUsageFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeUsageFlagsKHR operator^( VideoDecodeUsageFlagBitsKHR bit0, - VideoDecodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeUsageFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeUsageFlagsKHR operator~( VideoDecodeUsageFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoDecodeUsageFlagsKHR( bits ) ); - } - - using VideoDecodeFlagsKHR = Flags; - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - using PipelineRasterizationStateStreamCreateFlagsEXT = Flags; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - - using VideoEncodeH264CapabilityFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceEnabled ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceDisabled ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eSeparateColourPlane ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eQpprimeYZeroTransformBypass ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eScalingLists ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eHrdCompliance ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::ePicInitQpMinus26 ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPred ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredExplicit ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredImplicit ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPredNoTable ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8 ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eCabac ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eCavlc ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDisableDirectSpatialMvPred ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eSliceMbCount ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eRowUnalignedSlice ) | - VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDifferentSliceType ) | VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eBFrameInL1List ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator|( VideoEncodeH264CapabilityFlagBitsEXT bit0, - VideoEncodeH264CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264CapabilityFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator&( VideoEncodeH264CapabilityFlagBitsEXT bit0, - VideoEncodeH264CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264CapabilityFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator^( VideoEncodeH264CapabilityFlagBitsEXT bit0, - VideoEncodeH264CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264CapabilityFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator~( VideoEncodeH264CapabilityFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH264CapabilityFlagsEXT( bits ) ); - } - - using VideoEncodeH264InputModeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eFrame ) | VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eSlice ) | - VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eNonVcl ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264InputModeFlagsEXT operator|( VideoEncodeH264InputModeFlagBitsEXT bit0, - VideoEncodeH264InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264InputModeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264InputModeFlagsEXT operator&( VideoEncodeH264InputModeFlagBitsEXT bit0, - VideoEncodeH264InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264InputModeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264InputModeFlagsEXT operator^( VideoEncodeH264InputModeFlagBitsEXT bit0, - VideoEncodeH264InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264InputModeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264InputModeFlagsEXT operator~( VideoEncodeH264InputModeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH264InputModeFlagsEXT( bits ) ); - } - - using VideoEncodeH264OutputModeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eFrame ) | VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eSlice ) | - VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264OutputModeFlagsEXT operator|( VideoEncodeH264OutputModeFlagBitsEXT bit0, - VideoEncodeH264OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264OutputModeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264OutputModeFlagsEXT operator&( VideoEncodeH264OutputModeFlagBitsEXT bit0, - VideoEncodeH264OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264OutputModeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264OutputModeFlagsEXT operator^( VideoEncodeH264OutputModeFlagBitsEXT bit0, - VideoEncodeH264OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH264OutputModeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264OutputModeFlagsEXT operator~( VideoEncodeH264OutputModeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH264OutputModeFlagsEXT( bits ) ); - } - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - - using VideoEncodeH265CapabilityFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eSeparateColourPlane ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eScalingLists ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eSampleAdaptiveOffsetEnabled ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::ePcmEnable ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eSpsTemporalMvpEnabled ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eHrdCompliance ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eInitQpMinus26 ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eLog2ParallelMergeLevelMinus2 ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eSignDataHidingEnabled ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipEnabled ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipDisabled ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::ePpsSliceChromaQpOffsetsPresent ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPred ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eWeightedBipred ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPredNoTable ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eTransquantBypassEnabled ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eEntropyCodingSyncEnabled ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eDeblockingFilterOverrideEnabled ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerFrame ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eMultipleSlicePerTile ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerSlice ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eSliceSegmentCtbCount ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eRowUnalignedSliceSegment ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eDependentSliceSegment ) | - VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eDifferentSliceType ) | VkFlags( VideoEncodeH265CapabilityFlagBitsEXT::eBFrameInL1List ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilityFlagsEXT operator|( VideoEncodeH265CapabilityFlagBitsEXT bit0, - VideoEncodeH265CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CapabilityFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilityFlagsEXT operator&( VideoEncodeH265CapabilityFlagBitsEXT bit0, - VideoEncodeH265CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CapabilityFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilityFlagsEXT operator^( VideoEncodeH265CapabilityFlagBitsEXT bit0, - VideoEncodeH265CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CapabilityFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilityFlagsEXT operator~( VideoEncodeH265CapabilityFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH265CapabilityFlagsEXT( bits ) ); - } - - using VideoEncodeH265InputModeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH265InputModeFlagBitsEXT::eFrame ) | VkFlags( VideoEncodeH265InputModeFlagBitsEXT::eSliceSegment ) | - VkFlags( VideoEncodeH265InputModeFlagBitsEXT::eNonVcl ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265InputModeFlagsEXT operator|( VideoEncodeH265InputModeFlagBitsEXT bit0, - VideoEncodeH265InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265InputModeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265InputModeFlagsEXT operator&( VideoEncodeH265InputModeFlagBitsEXT bit0, - VideoEncodeH265InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265InputModeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265InputModeFlagsEXT operator^( VideoEncodeH265InputModeFlagBitsEXT bit0, - VideoEncodeH265InputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265InputModeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265InputModeFlagsEXT operator~( VideoEncodeH265InputModeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH265InputModeFlagsEXT( bits ) ); - } - - using VideoEncodeH265OutputModeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH265OutputModeFlagBitsEXT::eFrame ) | VkFlags( VideoEncodeH265OutputModeFlagBitsEXT::eSliceSegment ) | - VkFlags( VideoEncodeH265OutputModeFlagBitsEXT::eNonVcl ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265OutputModeFlagsEXT operator|( VideoEncodeH265OutputModeFlagBitsEXT bit0, - VideoEncodeH265OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265OutputModeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265OutputModeFlagsEXT operator&( VideoEncodeH265OutputModeFlagBitsEXT bit0, - VideoEncodeH265OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265OutputModeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265OutputModeFlagsEXT operator^( VideoEncodeH265OutputModeFlagBitsEXT bit0, - VideoEncodeH265OutputModeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265OutputModeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265OutputModeFlagsEXT operator~( VideoEncodeH265OutputModeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH265OutputModeFlagsEXT( bits ) ); - } - - using VideoEncodeH265CtbSizeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH265CtbSizeFlagBitsEXT::e16 ) | VkFlags( VideoEncodeH265CtbSizeFlagBitsEXT::e32 ) | - VkFlags( VideoEncodeH265CtbSizeFlagBitsEXT::e64 ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CtbSizeFlagsEXT operator|( VideoEncodeH265CtbSizeFlagBitsEXT bit0, - VideoEncodeH265CtbSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CtbSizeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CtbSizeFlagsEXT operator&( VideoEncodeH265CtbSizeFlagBitsEXT bit0, - VideoEncodeH265CtbSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CtbSizeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CtbSizeFlagsEXT operator^( VideoEncodeH265CtbSizeFlagBitsEXT bit0, - VideoEncodeH265CtbSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265CtbSizeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265CtbSizeFlagsEXT operator~( VideoEncodeH265CtbSizeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH265CtbSizeFlagsEXT( bits ) ); - } - - using VideoEncodeH265TransformBlockSizeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeH265TransformBlockSizeFlagBitsEXT::e4 ) | VkFlags( VideoEncodeH265TransformBlockSizeFlagBitsEXT::e8 ) | - VkFlags( VideoEncodeH265TransformBlockSizeFlagBitsEXT::e16 ) | VkFlags( VideoEncodeH265TransformBlockSizeFlagBitsEXT::e32 ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265TransformBlockSizeFlagsEXT - operator|( VideoEncodeH265TransformBlockSizeFlagBitsEXT bit0, VideoEncodeH265TransformBlockSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265TransformBlockSizeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265TransformBlockSizeFlagsEXT - operator&( VideoEncodeH265TransformBlockSizeFlagBitsEXT bit0, VideoEncodeH265TransformBlockSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265TransformBlockSizeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265TransformBlockSizeFlagsEXT - operator^( VideoEncodeH265TransformBlockSizeFlagBitsEXT bit0, VideoEncodeH265TransformBlockSizeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeH265TransformBlockSizeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH265TransformBlockSizeFlagsEXT operator~( VideoEncodeH265TransformBlockSizeFlagBitsEXT bits ) - VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeH265TransformBlockSizeFlagsEXT( bits ) ); - } - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - - using VideoDecodeH264PictureLayoutFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eProgressive ) | - VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines ) | - VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator|( VideoDecodeH264PictureLayoutFlagBitsEXT bit0, - VideoDecodeH264PictureLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator&( VideoDecodeH264PictureLayoutFlagBitsEXT bit0, - VideoDecodeH264PictureLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator^( VideoDecodeH264PictureLayoutFlagBitsEXT bit0, - VideoDecodeH264PictureLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator~( VideoDecodeH264PictureLayoutFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoDecodeH264PictureLayoutFlagsEXT( bits ) ); - } - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - using StreamDescriptorSurfaceCreateFlagsGGP = Flags; - -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - using ExternalMemoryHandleTypeFlagsNV = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32 ) | VkFlags( ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt ) | - VkFlags( ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image ) | VkFlags( ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlagsNV operator|( ExternalMemoryHandleTypeFlagBitsNV bit0, - ExternalMemoryHandleTypeFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlagsNV( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlagsNV operator&( ExternalMemoryHandleTypeFlagBitsNV bit0, - ExternalMemoryHandleTypeFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlagsNV( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlagsNV operator^( ExternalMemoryHandleTypeFlagBitsNV bit0, - ExternalMemoryHandleTypeFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryHandleTypeFlagsNV( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryHandleTypeFlagsNV operator~( ExternalMemoryHandleTypeFlagBitsNV bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalMemoryHandleTypeFlagsNV( bits ) ); - } - - using ExternalMemoryFeatureFlagsNV = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly ) | VkFlags( ExternalMemoryFeatureFlagBitsNV::eExportable ) | - VkFlags( ExternalMemoryFeatureFlagBitsNV::eImportable ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlagsNV operator|( ExternalMemoryFeatureFlagBitsNV bit0, - ExternalMemoryFeatureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlagsNV( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlagsNV operator&( ExternalMemoryFeatureFlagBitsNV bit0, - ExternalMemoryFeatureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlagsNV( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlagsNV operator^( ExternalMemoryFeatureFlagBitsNV bit0, - ExternalMemoryFeatureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExternalMemoryFeatureFlagsNV( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExternalMemoryFeatureFlagsNV operator~( ExternalMemoryFeatureFlagBitsNV bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExternalMemoryFeatureFlagsNV( bits ) ); - } - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - using ViSurfaceCreateFlagsNN = Flags; - -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_EXT_conditional_rendering === - - using ConditionalRenderingFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ConditionalRenderingFlagBitsEXT::eInverted ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ConditionalRenderingFlagsEXT operator|( ConditionalRenderingFlagBitsEXT bit0, - ConditionalRenderingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ConditionalRenderingFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ConditionalRenderingFlagsEXT operator&( ConditionalRenderingFlagBitsEXT bit0, - ConditionalRenderingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ConditionalRenderingFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ConditionalRenderingFlagsEXT operator^( ConditionalRenderingFlagBitsEXT bit0, - ConditionalRenderingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ConditionalRenderingFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ConditionalRenderingFlagsEXT operator~( ConditionalRenderingFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ConditionalRenderingFlagsEXT( bits ) ); - } - - //=== VK_EXT_display_surface_counter === - - using SurfaceCounterFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( SurfaceCounterFlagBitsEXT::eVblank ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceCounterFlagsEXT operator|( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceCounterFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceCounterFlagsEXT operator&( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceCounterFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceCounterFlagsEXT operator^( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return SurfaceCounterFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SurfaceCounterFlagsEXT operator~( SurfaceCounterFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( SurfaceCounterFlagsEXT( bits ) ); - } - - //=== VK_NV_viewport_swizzle === - - using PipelineViewportSwizzleStateCreateFlagsNV = Flags; - - //=== VK_EXT_discard_rectangles === - - using PipelineDiscardRectangleStateCreateFlagsEXT = Flags; - - //=== VK_EXT_conservative_rasterization === - - using PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; - - //=== VK_EXT_depth_clip_enable === - - using PipelineRasterizationDepthClipStateCreateFlagsEXT = Flags; - - //=== VK_KHR_performance_query === - - using PerformanceCounterDescriptionFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = - VkFlags( PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting ) | VkFlags( PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator|( PerformanceCounterDescriptionFlagBitsKHR bit0, - PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return PerformanceCounterDescriptionFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator&( PerformanceCounterDescriptionFlagBitsKHR bit0, - PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return PerformanceCounterDescriptionFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator^( PerformanceCounterDescriptionFlagBitsKHR bit0, - PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return PerformanceCounterDescriptionFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator~( PerformanceCounterDescriptionFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( PerformanceCounterDescriptionFlagsKHR( bits ) ); - } - - using AcquireProfilingLockFlagsKHR = Flags; - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - using IOSSurfaceCreateFlagsMVK = Flags; - -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - using MacOSSurfaceCreateFlagsMVK = Flags; - -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - using DebugUtilsMessageSeverityFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DebugUtilsMessageSeverityFlagBitsEXT::eVerbose ) | VkFlags( DebugUtilsMessageSeverityFlagBitsEXT::eInfo ) | - VkFlags( DebugUtilsMessageSeverityFlagBitsEXT::eWarning ) | VkFlags( DebugUtilsMessageSeverityFlagBitsEXT::eError ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageSeverityFlagsEXT operator|( DebugUtilsMessageSeverityFlagBitsEXT bit0, - DebugUtilsMessageSeverityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageSeverityFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageSeverityFlagsEXT operator&( DebugUtilsMessageSeverityFlagBitsEXT bit0, - DebugUtilsMessageSeverityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageSeverityFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageSeverityFlagsEXT operator^( DebugUtilsMessageSeverityFlagBitsEXT bit0, - DebugUtilsMessageSeverityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageSeverityFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageSeverityFlagsEXT operator~( DebugUtilsMessageSeverityFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DebugUtilsMessageSeverityFlagsEXT( bits ) ); - } - - using DebugUtilsMessageTypeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DebugUtilsMessageTypeFlagBitsEXT::eGeneral ) | VkFlags( DebugUtilsMessageTypeFlagBitsEXT::eValidation ) | - VkFlags( DebugUtilsMessageTypeFlagBitsEXT::ePerformance ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageTypeFlagsEXT operator|( DebugUtilsMessageTypeFlagBitsEXT bit0, - DebugUtilsMessageTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageTypeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageTypeFlagsEXT operator&( DebugUtilsMessageTypeFlagBitsEXT bit0, - DebugUtilsMessageTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageTypeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageTypeFlagsEXT operator^( DebugUtilsMessageTypeFlagBitsEXT bit0, - DebugUtilsMessageTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return DebugUtilsMessageTypeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DebugUtilsMessageTypeFlagsEXT operator~( DebugUtilsMessageTypeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DebugUtilsMessageTypeFlagsEXT( bits ) ); - } - - using DebugUtilsMessengerCallbackDataFlagsEXT = Flags; - - using DebugUtilsMessengerCreateFlagsEXT = Flags; - - //=== VK_NV_fragment_coverage_to_color === - - using PipelineCoverageToColorStateCreateFlagsNV = Flags; - - //=== VK_KHR_acceleration_structure === - - using GeometryFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( GeometryFlagBitsKHR::eOpaque ) | VkFlags( GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryFlagsKHR operator|( GeometryFlagBitsKHR bit0, GeometryFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryFlagsKHR operator&( GeometryFlagBitsKHR bit0, GeometryFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryFlagsKHR operator^( GeometryFlagBitsKHR bit0, GeometryFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryFlagsKHR operator~( GeometryFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( GeometryFlagsKHR( bits ) ); - } - - using GeometryFlagsNV = GeometryFlagsKHR; - - using GeometryInstanceFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable ) | VkFlags( GeometryInstanceFlagBitsKHR::eTriangleFlipFacing ) | - VkFlags( GeometryInstanceFlagBitsKHR::eForceOpaque ) | VkFlags( GeometryInstanceFlagBitsKHR::eForceNoOpaque ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryInstanceFlagsKHR operator|( GeometryInstanceFlagBitsKHR bit0, - GeometryInstanceFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryInstanceFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryInstanceFlagsKHR operator&( GeometryInstanceFlagBitsKHR bit0, - GeometryInstanceFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryInstanceFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryInstanceFlagsKHR operator^( GeometryInstanceFlagBitsKHR bit0, - GeometryInstanceFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return GeometryInstanceFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GeometryInstanceFlagsKHR operator~( GeometryInstanceFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( GeometryInstanceFlagsKHR( bits ) ); - } - - using GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR; - - using BuildAccelerationStructureFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( BuildAccelerationStructureFlagBitsKHR::eAllowUpdate ) | VkFlags( BuildAccelerationStructureFlagBitsKHR::eAllowCompaction ) | - VkFlags( BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace ) | VkFlags( BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild ) | - VkFlags( BuildAccelerationStructureFlagBitsKHR::eLowMemory ) | VkFlags( BuildAccelerationStructureFlagBitsKHR::eMotionNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BuildAccelerationStructureFlagsKHR operator|( BuildAccelerationStructureFlagBitsKHR bit0, - BuildAccelerationStructureFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return BuildAccelerationStructureFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BuildAccelerationStructureFlagsKHR operator&( BuildAccelerationStructureFlagBitsKHR bit0, - BuildAccelerationStructureFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return BuildAccelerationStructureFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BuildAccelerationStructureFlagsKHR operator^( BuildAccelerationStructureFlagBitsKHR bit0, - BuildAccelerationStructureFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return BuildAccelerationStructureFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR BuildAccelerationStructureFlagsKHR operator~( BuildAccelerationStructureFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( BuildAccelerationStructureFlagsKHR( bits ) ); - } - - using BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR; - - using AccelerationStructureCreateFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay ) | VkFlags( AccelerationStructureCreateFlagBitsKHR::eMotionNV ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccelerationStructureCreateFlagsKHR operator|( AccelerationStructureCreateFlagBitsKHR bit0, - AccelerationStructureCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccelerationStructureCreateFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccelerationStructureCreateFlagsKHR operator&( AccelerationStructureCreateFlagBitsKHR bit0, - AccelerationStructureCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccelerationStructureCreateFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccelerationStructureCreateFlagsKHR operator^( AccelerationStructureCreateFlagBitsKHR bit0, - AccelerationStructureCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return AccelerationStructureCreateFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR AccelerationStructureCreateFlagsKHR operator~( AccelerationStructureCreateFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( AccelerationStructureCreateFlagsKHR( bits ) ); - } - - //=== VK_NV_framebuffer_mixed_samples === - - using PipelineCoverageModulationStateCreateFlagsNV = Flags; - - //=== VK_EXT_validation_cache === - - using ValidationCacheCreateFlagsEXT = Flags; - - //=== VK_AMD_pipeline_compiler_control === - - using PipelineCompilerControlFlagsAMD = Flags; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - using ImagePipeSurfaceCreateFlagsFUCHSIA = Flags; - -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - using MetalSurfaceCreateFlagsEXT = Flags; - -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_AMD_shader_core_properties2 === - - using ShaderCorePropertiesFlagsAMD = Flags; - - //=== VK_NV_coverage_reduction_mode === - - using PipelineCoverageReductionStateCreateFlagsNV = Flags; - - //=== VK_EXT_headless_surface === - - using HeadlessSurfaceCreateFlagsEXT = Flags; - - //=== VK_NV_device_generated_commands === - - using IndirectStateFlagsNV = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( IndirectStateFlagBitsNV::eFlagFrontface ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectStateFlagsNV operator|( IndirectStateFlagBitsNV bit0, IndirectStateFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectStateFlagsNV( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectStateFlagsNV operator&( IndirectStateFlagBitsNV bit0, IndirectStateFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectStateFlagsNV( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectStateFlagsNV operator^( IndirectStateFlagBitsNV bit0, IndirectStateFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectStateFlagsNV( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectStateFlagsNV operator~( IndirectStateFlagBitsNV bits ) VULKAN_HPP_NOEXCEPT - { - return ~( IndirectStateFlagsNV( bits ) ); - } - - using IndirectCommandsLayoutUsageFlagsNV = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess ) | VkFlags( IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences ) | - VkFlags( IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutUsageFlagsNV operator|( IndirectCommandsLayoutUsageFlagBitsNV bit0, - IndirectCommandsLayoutUsageFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectCommandsLayoutUsageFlagsNV( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutUsageFlagsNV operator&( IndirectCommandsLayoutUsageFlagBitsNV bit0, - IndirectCommandsLayoutUsageFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectCommandsLayoutUsageFlagsNV( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutUsageFlagsNV operator^( IndirectCommandsLayoutUsageFlagBitsNV bit0, - IndirectCommandsLayoutUsageFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return IndirectCommandsLayoutUsageFlagsNV( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutUsageFlagsNV operator~( IndirectCommandsLayoutUsageFlagBitsNV bits ) VULKAN_HPP_NOEXCEPT - { - return ~( IndirectCommandsLayoutUsageFlagsNV( bits ) ); - } - - //=== VK_EXT_device_memory_report === - - using DeviceMemoryReportFlagsEXT = Flags; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - using VideoEncodeFlagsKHR = Flags; - - using VideoEncodeCapabilityFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeCapabilityFlagsKHR operator|( VideoEncodeCapabilityFlagBitsKHR bit0, - VideoEncodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeCapabilityFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeCapabilityFlagsKHR operator&( VideoEncodeCapabilityFlagBitsKHR bit0, - VideoEncodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeCapabilityFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeCapabilityFlagsKHR operator^( VideoEncodeCapabilityFlagBitsKHR bit0, - VideoEncodeCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeCapabilityFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeCapabilityFlagsKHR operator~( VideoEncodeCapabilityFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeCapabilityFlagsKHR( bits ) ); - } - - using VideoEncodeUsageFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeUsageFlagBitsKHR::eDefault ) | VkFlags( VideoEncodeUsageFlagBitsKHR::eTranscoding ) | - VkFlags( VideoEncodeUsageFlagBitsKHR::eStreaming ) | VkFlags( VideoEncodeUsageFlagBitsKHR::eRecording ) | - VkFlags( VideoEncodeUsageFlagBitsKHR::eConferencing ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeUsageFlagsKHR operator|( VideoEncodeUsageFlagBitsKHR bit0, - VideoEncodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeUsageFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeUsageFlagsKHR operator&( VideoEncodeUsageFlagBitsKHR bit0, - VideoEncodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeUsageFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeUsageFlagsKHR operator^( VideoEncodeUsageFlagBitsKHR bit0, - VideoEncodeUsageFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeUsageFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeUsageFlagsKHR operator~( VideoEncodeUsageFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeUsageFlagsKHR( bits ) ); - } - - using VideoEncodeContentFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeContentFlagBitsKHR::eDefault ) | VkFlags( VideoEncodeContentFlagBitsKHR::eCamera ) | - VkFlags( VideoEncodeContentFlagBitsKHR::eDesktop ) | VkFlags( VideoEncodeContentFlagBitsKHR::eRendered ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeContentFlagsKHR operator|( VideoEncodeContentFlagBitsKHR bit0, - VideoEncodeContentFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeContentFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeContentFlagsKHR operator&( VideoEncodeContentFlagBitsKHR bit0, - VideoEncodeContentFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeContentFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeContentFlagsKHR operator^( VideoEncodeContentFlagBitsKHR bit0, - VideoEncodeContentFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeContentFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeContentFlagsKHR operator~( VideoEncodeContentFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeContentFlagsKHR( bits ) ); - } - - using VideoEncodeRateControlFlagsKHR = Flags; - - using VideoEncodeRateControlModeFlagsKHR = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( VideoEncodeRateControlModeFlagBitsKHR::eNone ) | VkFlags( VideoEncodeRateControlModeFlagBitsKHR::eCbr ) | - VkFlags( VideoEncodeRateControlModeFlagBitsKHR::eVbr ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeRateControlModeFlagsKHR operator|( VideoEncodeRateControlModeFlagBitsKHR bit0, - VideoEncodeRateControlModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeRateControlModeFlagsKHR( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeRateControlModeFlagsKHR operator&( VideoEncodeRateControlModeFlagBitsKHR bit0, - VideoEncodeRateControlModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeRateControlModeFlagsKHR( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeRateControlModeFlagsKHR operator^( VideoEncodeRateControlModeFlagBitsKHR bit0, - VideoEncodeRateControlModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT - { - return VideoEncodeRateControlModeFlagsKHR( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeRateControlModeFlagsKHR operator~( VideoEncodeRateControlModeFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT - { - return ~( VideoEncodeRateControlModeFlagsKHR( bits ) ); - } - -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - - using DeviceDiagnosticsConfigFlagsNV = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo ) | VkFlags( DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking ) | - VkFlags( DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints ) | - VkFlags( DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigFlagsNV operator|( DeviceDiagnosticsConfigFlagBitsNV bit0, - DeviceDiagnosticsConfigFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceDiagnosticsConfigFlagsNV( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigFlagsNV operator&( DeviceDiagnosticsConfigFlagBitsNV bit0, - DeviceDiagnosticsConfigFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceDiagnosticsConfigFlagsNV( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigFlagsNV operator^( DeviceDiagnosticsConfigFlagBitsNV bit0, - DeviceDiagnosticsConfigFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT - { - return DeviceDiagnosticsConfigFlagsNV( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigFlagsNV operator~( DeviceDiagnosticsConfigFlagBitsNV bits ) VULKAN_HPP_NOEXCEPT - { - return ~( DeviceDiagnosticsConfigFlagsNV( bits ) ); - } - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - using ExportMetalObjectTypeFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalDevice ) | VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue ) | - VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer ) | VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalTexture ) | - VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface ) | VkFlags( ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExportMetalObjectTypeFlagsEXT operator|( ExportMetalObjectTypeFlagBitsEXT bit0, - ExportMetalObjectTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExportMetalObjectTypeFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExportMetalObjectTypeFlagsEXT operator&( ExportMetalObjectTypeFlagBitsEXT bit0, - ExportMetalObjectTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExportMetalObjectTypeFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExportMetalObjectTypeFlagsEXT operator^( ExportMetalObjectTypeFlagBitsEXT bit0, - ExportMetalObjectTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ExportMetalObjectTypeFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ExportMetalObjectTypeFlagsEXT operator~( ExportMetalObjectTypeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ExportMetalObjectTypeFlagsEXT( bits ) ); - } - -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_graphics_pipeline_library === - - using GraphicsPipelineLibraryFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface ) | - VkFlags( GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders ) | VkFlags( GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader ) | - VkFlags( GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryFlagsEXT operator|( GraphicsPipelineLibraryFlagBitsEXT bit0, - GraphicsPipelineLibraryFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return GraphicsPipelineLibraryFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryFlagsEXT operator&( GraphicsPipelineLibraryFlagBitsEXT bit0, - GraphicsPipelineLibraryFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return GraphicsPipelineLibraryFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryFlagsEXT operator^( GraphicsPipelineLibraryFlagBitsEXT bit0, - GraphicsPipelineLibraryFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return GraphicsPipelineLibraryFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryFlagsEXT operator~( GraphicsPipelineLibraryFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( GraphicsPipelineLibraryFlagsEXT( bits ) ); - } - - //=== VK_NV_ray_tracing_motion_blur === - - using AccelerationStructureMotionInfoFlagsNV = Flags; - - using AccelerationStructureMotionInstanceFlagsNV = Flags; - - //=== VK_EXT_image_compression_control === - - using ImageCompressionFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageCompressionFlagBitsEXT::eDefault ) | VkFlags( ImageCompressionFlagBitsEXT::eFixedRateDefault ) | - VkFlags( ImageCompressionFlagBitsEXT::eFixedRateExplicit ) | VkFlags( ImageCompressionFlagBitsEXT::eDisabled ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFlagsEXT operator|( ImageCompressionFlagBitsEXT bit0, - ImageCompressionFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFlagsEXT operator&( ImageCompressionFlagBitsEXT bit0, - ImageCompressionFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFlagsEXT operator^( ImageCompressionFlagBitsEXT bit0, - ImageCompressionFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFlagsEXT operator~( ImageCompressionFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageCompressionFlagsEXT( bits ) ); - } - - using ImageCompressionFixedRateFlagsEXT = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageCompressionFixedRateFlagBitsEXT::eNone ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e1Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e2Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e3Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e4Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e5Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e6Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e7Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e8Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e9Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e10Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e11Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e12Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e13Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e14Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e15Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e16Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e17Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e18Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e19Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e20Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e21Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e22Bpc ) | VkFlags( ImageCompressionFixedRateFlagBitsEXT::e23Bpc ) | - VkFlags( ImageCompressionFixedRateFlagBitsEXT::e24Bpc ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFixedRateFlagsEXT operator|( ImageCompressionFixedRateFlagBitsEXT bit0, - ImageCompressionFixedRateFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFixedRateFlagsEXT( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFixedRateFlagsEXT operator&( ImageCompressionFixedRateFlagBitsEXT bit0, - ImageCompressionFixedRateFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFixedRateFlagsEXT( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFixedRateFlagsEXT operator^( ImageCompressionFixedRateFlagBitsEXT bit0, - ImageCompressionFixedRateFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageCompressionFixedRateFlagsEXT( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageCompressionFixedRateFlagsEXT operator~( ImageCompressionFixedRateFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageCompressionFixedRateFlagsEXT( bits ) ); - } - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - using DirectFBSurfaceCreateFlagsEXT = Flags; - -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - using ImageFormatConstraintsFlagsFUCHSIA = Flags; - - using ImageConstraintsInfoFlagsFUCHSIA = Flags; - - template <> - struct FlagTraits - { - enum : VkFlags - { - allFlags = VkFlags( ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely ) | VkFlags( ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften ) | - VkFlags( ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely ) | VkFlags( ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften ) | - VkFlags( ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional ) - }; - }; - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFlagsFUCHSIA operator|( ImageConstraintsInfoFlagBitsFUCHSIA bit0, - ImageConstraintsInfoFlagBitsFUCHSIA bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageConstraintsInfoFlagsFUCHSIA( bit0 ) | bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFlagsFUCHSIA operator&( ImageConstraintsInfoFlagBitsFUCHSIA bit0, - ImageConstraintsInfoFlagBitsFUCHSIA bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageConstraintsInfoFlagsFUCHSIA( bit0 ) & bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFlagsFUCHSIA operator^( ImageConstraintsInfoFlagBitsFUCHSIA bit0, - ImageConstraintsInfoFlagBitsFUCHSIA bit1 ) VULKAN_HPP_NOEXCEPT - { - return ImageConstraintsInfoFlagsFUCHSIA( bit0 ) ^ bit1; - } - - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFlagsFUCHSIA operator~( ImageConstraintsInfoFlagBitsFUCHSIA bits ) VULKAN_HPP_NOEXCEPT - { - return ~( ImageConstraintsInfoFlagsFUCHSIA( bits ) ); - } - -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - using ScreenSurfaceCreateFlagsQNX = Flags; - -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_format_traits.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_format_traits.hpp deleted file mode 100644 index ac4250a..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_format_traits.hpp +++ /dev/null @@ -1,7333 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_FORMAT_TRAITS_HPP -#define VULKAN_FORMAT_TRAITS_HPP - -#include - -namespace VULKAN_HPP_NAMESPACE -{ - //===================== - //=== Format Traits === - //===================== - - // The texel block size in bytes. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t blockSize( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 12; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 12; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 12; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 24; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 24; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 24; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 32; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 32; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 32; - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 5; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 8; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 8; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 8; - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 8; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 6; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 6; - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 8; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 8; - - default: VULKAN_HPP_ASSERT( false ); return 0; - } - } - - // The number of texels in a texel block. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t texelsPerBlock( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 20; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 20; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 25; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 25; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 30; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 30; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 36; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 36; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 40; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 40; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 48; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 48; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 64; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 64; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 50; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 50; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 60; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 60; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 80; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 80; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 100; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 100; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 120; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 120; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 144; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 144; - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 16; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 20; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 25; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 30; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 36; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 40; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 48; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 64; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 50; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 60; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 80; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 100; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 120; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 144; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 1; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 1; - - default: VULKAN_HPP_ASSERT( false ); return 0; - } - } - - // The three-dimensional extent of a texel block. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 std::array blockExtent( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return { { 5, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return { { 5, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return { { 5, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return { { 5, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return { { 6, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return { { 6, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return { { 6, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return { { 6, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return { { 8, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return { { 8, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return { { 8, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return { { 8, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return { { 8, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return { { 8, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return { { 10, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return { { 10, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return { { 10, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return { { 10, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return { { 10, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return { { 10, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return { { 10, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return { { 10, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return { { 12, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return { { 12, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return { { 12, 12, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return { { 12, 12, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return { { 2, 1, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return { { 5, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return { { 5, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return { { 6, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return { { 6, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return { { 8, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return { { 8, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return { { 8, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return { { 10, 5, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return { { 10, 6, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return { { 10, 8, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return { { 10, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return { { 12, 10, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return { { 12, 12, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return { { 8, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return { { 8, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return { { 8, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return { { 4, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return { { 8, 4, 1 } }; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return { { 4, 4, 1 } }; - - default: return { { 1, 1, 1 } }; - } - } - - // A textual description of the compression scheme, or an empty string if it is not compressed - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * compressionScheme( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return "BC"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return "ETC2"; - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return "EAC"; - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return "EAC"; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return "EAC"; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return "EAC"; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return "ASTC LDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return "ASTC HDR"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return "PVRTC"; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return "PVRTC"; - - default: return ""; - } - } - - // True, if this format is a compressed one. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 bool isCompressed( VULKAN_HPP_NAMESPACE::Format format ) - { - return ( *VULKAN_HPP_NAMESPACE::compressionScheme( format ) != 0 ); - } - - // The number of bits into which the format is packed. A single image element in this format - // can be stored in the same space as a scalar type of this bit width. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t packed( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 8; - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 32; - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 16; - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 16; - - default: return 0; - } - } - - // True, if the components of this format are compressed, otherwise false. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 bool componentsAreCompressed( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return true; - default: return false; - } - } - - // The number of bits in this component, if not compressed, otherwise 0. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentBits( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: - switch ( component ) - { - case 0: return 4; - case 1: return 4; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: - switch ( component ) - { - case 0: return 4; - case 1: return 4; - case 2: return 4; - case 3: return 4; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: - switch ( component ) - { - case 0: return 4; - case 1: return 4; - case 2: return 4; - case 3: return 4; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: - switch ( component ) - { - case 0: return 5; - case 1: return 6; - case 2: return 5; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: - switch ( component ) - { - case 0: return 5; - case 1: return 6; - case 2: return 5; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: - switch ( component ) - { - case 0: return 5; - case 1: return 5; - case 2: return 5; - case 3: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: - switch ( component ) - { - case 0: return 5; - case 1: return 5; - case 2: return 5; - case 3: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: - switch ( component ) - { - case 0: return 1; - case 1: return 5; - case 2: return 5; - case 3: return 5; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: - switch ( component ) - { - case 0: return 2; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: - switch ( component ) - { - case 0: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: - switch ( component ) - { - case 0: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: - switch ( component ) - { - case 0: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - case 3: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - case 3: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: - switch ( component ) - { - case 0: return 32; - case 1: return 32; - case 2: return 32; - case 3: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: - switch ( component ) - { - case 0: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: - switch ( component ) - { - case 0: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: - switch ( component ) - { - case 0: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - case 3: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - case 3: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: - switch ( component ) - { - case 0: return 64; - case 1: return 64; - case 2: return 64; - case 3: return 64; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: - switch ( component ) - { - case 0: return 10; - case 1: return 11; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: - switch ( component ) - { - case 0: return 9; - case 1: return 9; - case 2: return 9; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: - switch ( component ) - { - case 0: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: - switch ( component ) - { - case 0: return 24; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: - switch ( component ) - { - case 0: return 32; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: - switch ( component ) - { - case 0: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: - switch ( component ) - { - case 0: return 16; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: - switch ( component ) - { - case 0: return 24; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: - switch ( component ) - { - case 0: return 32; - case 1: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: - switch ( component ) - { - case 0: return 11; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: - switch ( component ) - { - case 0: return 11; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: - switch ( component ) - { - case 0: return 11; - case 1: return 11; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: - switch ( component ) - { - case 0: return 11; - case 1: return 11; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - case 3: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: - switch ( component ) - { - case 0: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - case 3: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: - switch ( component ) - { - case 0: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - case 3: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - case 3: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - case 3: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - case 3: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( component ) - { - case 0: return 8; - case 1: return 8; - case 2: return 8; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 10; - case 1: return 10; - case 2: return 10; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 12; - case 1: return 12; - case 2: return 12; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( component ) - { - case 0: return 16; - case 1: return 16; - case 2: return 16; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: - switch ( component ) - { - case 0: return 4; - case 1: return 4; - case 2: return 4; - case 3: return 4; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: - switch ( component ) - { - case 0: return 4; - case 1: return 4; - case 2: return 4; - case 3: return 4; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - - default: return 0; - } - } - - // The number of components of this format. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentCount( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 4; - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 3; - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 3; - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 1; - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 1; - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 2; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 1; - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 1; - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 2; - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 2; - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 3; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 1; - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 1; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 2; - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 2; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 1; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 4; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 4; - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 4; - - default: return 0; - } - } - - // The name of the component - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * componentName( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: - switch ( component ) - { - case 0: return "B"; - case 1: return "R"; - case 2: return "G"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: - switch ( component ) - { - case 0: return "D"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: - switch ( component ) - { - case 0: return "D"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: - switch ( component ) - { - case 0: return "D"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: - switch ( component ) - { - case 0: return "S"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: - switch ( component ) - { - case 0: return "D"; - case 1: return "S"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: - switch ( component ) - { - case 0: return "D"; - case 1: return "S"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: - switch ( component ) - { - case 0: return "D"; - case 1: return "S"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: - switch ( component ) - { - case 0: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: - switch ( component ) - { - case 0: return "B"; - case 1: return "G"; - case 2: return "R"; - case 3: return "G"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( component ) - { - case 0: return "G"; - case 1: return "B"; - case 2: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: - switch ( component ) - { - case 0: return "A"; - case 1: return "R"; - case 2: return "G"; - case 3: return "B"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: - switch ( component ) - { - case 0: return "A"; - case 1: return "B"; - case 2: return "G"; - case 3: return "R"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "R"; - case 1: return "G"; - case 2: return "B"; - case 3: return "A"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - - default: return ""; - } - } - - // The numeric format of the component - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * componentNumericFormat( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Uint: - switch ( component ) - { - case 0: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Sint: - switch ( component ) - { - case 0: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: - switch ( component ) - { - case 0: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Uint: - switch ( component ) - { - case 0: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sint: - switch ( component ) - { - case 0: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - case 2: return "SNORM"; - case 3: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: - switch ( component ) - { - case 0: return "USCALED"; - case 1: return "USCALED"; - case 2: return "USCALED"; - case 3: return "USCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: - switch ( component ) - { - case 0: return "SSCALED"; - case 1: return "SSCALED"; - case 2: return "SSCALED"; - case 3: return "SSCALED"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Uint: - switch ( component ) - { - case 0: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sint: - switch ( component ) - { - case 0: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Uint: - switch ( component ) - { - case 0: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sint: - switch ( component ) - { - case 0: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: - switch ( component ) - { - case 0: return "UINT"; - case 1: return "UINT"; - case 2: return "UINT"; - case 3: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: - switch ( component ) - { - case 0: return "SINT"; - case 1: return "SINT"; - case 2: return "SINT"; - case 3: return "SINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: - switch ( component ) - { - case 0: return "UFLOAT"; - case 1: return "UFLOAT"; - case 2: return "UFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: - switch ( component ) - { - case 0: return "UFLOAT"; - case 1: return "UFLOAT"; - case 2: return "UFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: - switch ( component ) - { - case 0: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eS8Uint: - switch ( component ) - { - case 0: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "UINT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: - switch ( component ) - { - case 0: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: - switch ( component ) - { - case 0: return "UFLOAT"; - case 1: return "UFLOAT"; - case 2: return "UFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: - switch ( component ) - { - case 0: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: - switch ( component ) - { - case 0: return "SNORM"; - case 1: return "SNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: - switch ( component ) - { - case 0: return "SFLOAT"; - case 1: return "SFLOAT"; - case 2: return "SFLOAT"; - case 3: return "SFLOAT"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: - switch ( component ) - { - case 0: return "UNORM"; - case 1: return "UNORM"; - case 2: return "UNORM"; - case 3: return "UNORM"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: - switch ( component ) - { - case 0: return "SRGB"; - case 1: return "SRGB"; - case 2: return "SRGB"; - case 3: return "SRGB"; - default: VULKAN_HPP_ASSERT( false ); return ""; - } - - default: return ""; - } - } - - // The plane this component lies in. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentPlaneIndex( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( component ) - { - case 0: return 0; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 0; - } - - default: return 0; - } - } - - // The number of image planes of this format. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeCount( VULKAN_HPP_NAMESPACE::Format format ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 3; - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 2; - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 2; - - default: return 1; - } - } - - // The single-plane format that this plane is compatible with. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_NAMESPACE::Format planeCompatibleFormat( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( plane ) - { - case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; - case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; - default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; - } - - default: VULKAN_HPP_ASSERT( plane == 0 ); return format; - } - } - - // The relative height of this plane. A value of k means that this plane is 1/k the height of the overall format. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeHeightDivisor( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - - default: VULKAN_HPP_ASSERT( plane == 0 ); return 1; - } - } - - // The relative width of this plane. A value of k means that this plane is 1/k the width of the overall format. - VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeWidthDivisor( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) - { - switch ( format ) - { - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - case 2: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 2; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - case 2: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: - switch ( plane ) - { - case 0: return 1; - case 1: return 1; - default: VULKAN_HPP_ASSERT( false ); return 1; - } - - default: VULKAN_HPP_ASSERT( plane == 0 ); return 1; - } - } - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_funcs.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_funcs.hpp deleted file mode 100644 index 0d8749f..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_funcs.hpp +++ /dev/null @@ -1,20008 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_FUNCS_HPP -#define VULKAN_FUNCS_HPP - -namespace VULKAN_HPP_NAMESPACE -{ - //=========================== - //=== COMMAND Definitions === - //=========================== - - //=== VK_VERSION_1_0 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Instance * pInstance, - Dispatch const & d ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateInstance( reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pInstance ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type createInstance( - const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = - d.vkCreateInstance( reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); - - return createResultValueType( static_cast( result ), instance ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type createInstanceUnique( - const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = - d.vkCreateInstance( reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( instance, ObjectDestroy( allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroy( Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyInstance( m_instance, - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount, - VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::enumeratePhysicalDevices( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDevices; - uint32_t physicalDeviceCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); - if ( physicalDeviceCount < physicalDevices.size() ) - { - physicalDevices.resize( physicalDeviceCount ); - } - return createResultValueType( static_cast( result ), physicalDevices ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDevices( physicalDeviceAllocator ); - uint32_t physicalDeviceCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); - if ( physicalDeviceCount < physicalDevices.size() ) - { - physicalDevices.resize( physicalDeviceCount ); - } - return createResultValueType( static_cast( result ), physicalDevices ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures - PhysicalDevice::getFeatures( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features; - d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); - - return features; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties * pFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties - PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::FormatProperties formatProperties; - d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ImageFormatProperties * pImageFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( pImageFormatProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); - - return createResultValueType( static_cast( result ), imageFormatProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties - PhysicalDevice::getProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties; - d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); - - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties * pQueueFamilyProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceQueueFamilyProperties( - m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties( queueFamilyPropertiesAllocator ); - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties * pMemoryProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties - PhysicalDevice::getMemoryProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties; - d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char * pName, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetInstanceProcAddr( m_instance, pName ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - PFN_vkVoidFunction result = d.vkGetInstanceProcAddr( m_instance, name.c_str() ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char * pName, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetDeviceProcAddr( m_device, pName ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - PFN_vkVoidFunction result = d.vkGetDeviceProcAddr( m_device, name.c_str() ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Device * pDevice, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDevice( m_physicalDevice, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pDevice ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::createDevice( - const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Device device; - VkResult result = - d.vkCreateDevice( m_physicalDevice, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); - - return createResultValueType( static_cast( result ), device ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::createDeviceUnique( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Device device; - VkResult result = - d.vkCreateDevice( m_physicalDevice, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( device, ObjectDestroy( allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDevice( m_device, - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char * pLayerName, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, - Dispatch const & d ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - enumerateInstanceExtensionProperties( Optional layerName, Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - enumerateInstanceExtensionProperties( Optional layerName, - ExtensionPropertiesAllocator & extensionPropertiesAllocator, - Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( extensionPropertiesAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char * pLayerName, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, - ExtensionPropertiesAllocator & extensionPropertiesAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( extensionPropertiesAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, - Dispatch const & d ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - enumerateInstanceLayerProperties( Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( layerPropertiesAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::enumerateDeviceLayerProperties( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( layerPropertiesAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, VULKAN_HPP_NAMESPACE::Queue * pQueue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue - Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Queue queue; - d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); - - return queue; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Queue::submit( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkQueueWaitIdle( m_queue ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::waitIdle( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueueWaitIdle( m_queue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkDeviceWaitIdle( m_device ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::waitIdle( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkDeviceWaitIdle( m_device ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo * pAllocateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DeviceMemory * pMemory, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAllocateMemory( m_device, - reinterpret_cast( pAllocateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pMemory ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = - d.vkAllocateMemory( m_device, - reinterpret_cast( &allocateInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); - - return createResultValueType( static_cast( result ), memory ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::allocateMemoryUnique( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = - d.vkAllocateMemory( m_device, - reinterpret_cast( &allocateInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( memory, ObjectFree( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeMemory( m_device, - static_cast( memory ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeMemory( m_device, - static_cast( memory ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, - void ** ppData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkMapMemory( m_device, - static_cast( memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - ppData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - void * pData; - VkResult result = d.vkMapMemory( m_device, - static_cast( memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); - - return createResultValueType( static_cast( result ), pData ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkUnmapMemory( m_device, static_cast( memory ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, - const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::flushMappedMemoryRanges( ArrayProxy const & memoryRanges, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, - const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::invalidateMappedMemoryRanges( ArrayProxy const & memoryRanges, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize * pCommittedMemoryInBytes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), reinterpret_cast( pCommittedMemoryInBytes ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes; - d.vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), reinterpret_cast( &committedMemoryInBytes ) ); - - return committedMemoryInBytes; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindBufferMemory( - VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindImageMemory( - VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements - Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - d.vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements - Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - d.vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements * pSparseMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageSparseMemoryRequirements( m_device, - static_cast( image ), - pSparseMemoryRequirementCount, - reinterpret_cast( pSparseMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements( m_device, - static_cast( image ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements( - sparseImageMemoryRequirementsAllocator ); - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements( m_device, - static_cast( image ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - pPropertyCount, - reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - SparseImageFormatPropertiesAllocator & sparseImageFormatPropertiesAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( sparseImageFormatPropertiesAllocator ); - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindSparseInfo * pBindInfo, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Queue::bindSparse( ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkQueueBindSparse( m_queue, bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateFence( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pFence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createFence( - const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = - d.vkCreateFence( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); - - return createResultValueType( static_cast( result ), fence ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createFenceUnique( - const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = - d.vkCreateFence( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyFence( m_device, - static_cast( fence ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyFence( m_device, - static_cast( fence ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, - const VULKAN_HPP_NAMESPACE::Fence * pFences, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType::type Device::resetFences( ArrayProxy const & fences, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkGetFenceStatus( m_device, static_cast( fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, - const VULKAN_HPP_NAMESPACE::Fence * pFences, - VULKAN_HPP_NAMESPACE::Bool32 waitAll, - uint64_t timeout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), static_cast( waitAll ), timeout ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitForFences( ArrayProxy const & fences, - VULKAN_HPP_NAMESPACE::Bool32 waitAll, - uint64_t timeout, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Semaphore * pSemaphore, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSemaphore( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSemaphore ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = - d.vkCreateSemaphore( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); - - return createResultValueType( static_cast( result ), semaphore ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSemaphoreUnique( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = - d.vkCreateSemaphore( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( semaphore, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySemaphore( m_device, - static_cast( semaphore ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySemaphore( m_device, - static_cast( semaphore ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Event * pEvent, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateEvent( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pEvent ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createEvent( - const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = - d.vkCreateEvent( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); - - return createResultValueType( static_cast( result ), event ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createEventUnique( - const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = - d.vkCreateEvent( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( event, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyEvent( m_device, - static_cast( event ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyEvent( m_device, - static_cast( event ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkGetEventStatus( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkResetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::QueryPool * pQueryPool, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateQueryPool( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pQueryPool ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = - d.vkCreateQueryPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); - - return createResultValueType( static_cast( result ), queryPool ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createQueryPoolUnique( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = - d.vkCreateQueryPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( queryPool, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyQueryPool( m_device, - static_cast( queryPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyQueryPool( m_device, - static_cast( queryPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - void * pData, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - dataSize, - pData, - static_cast( stride ), - static_cast( flags ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResults", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return ResultValue>( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::getQueryPoolResult( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return ResultValue( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Buffer * pBuffer, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateBuffer( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pBuffer ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createBuffer( - const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = - d.vkCreateBuffer( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); - - return createResultValueType( static_cast( result ), buffer ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createBufferUnique( - const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = - d.vkCreateBuffer( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( buffer, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBuffer( m_device, - static_cast( buffer ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBuffer( m_device, - static_cast( buffer ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::BufferView * pView, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateBufferView( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pView ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = - d.vkCreateBufferView( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); - - return createResultValueType( static_cast( result ), view ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createBufferViewUnique( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = - d.vkCreateBufferView( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBufferView( m_device, - static_cast( bufferView ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBufferView( m_device, - static_cast( bufferView ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Image * pImage, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateImage( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pImage ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createImage( - const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = - d.vkCreateImage( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); - - return createResultValueType( static_cast( result ), image ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createImageUnique( - const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = - d.vkCreateImage( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( image, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyImage( m_device, - static_cast( image ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyImage( m_device, - static_cast( image ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource * pSubresource, - VULKAN_HPP_NAMESPACE::SubresourceLayout * pLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageSubresourceLayout( m_device, - static_cast( image ), - reinterpret_cast( pSubresource ), - reinterpret_cast( pLayout ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout Device::getImageSubresourceLayout( - VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SubresourceLayout layout; - d.vkGetImageSubresourceLayout( m_device, - static_cast( image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return layout; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ImageView * pView, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateImageView( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pView ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = - d.vkCreateImageView( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); - - return createResultValueType( static_cast( result ), view ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createImageViewUnique( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = - d.vkCreateImageView( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyImageView( m_device, - static_cast( imageView ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyImageView( m_device, - static_cast( imageView ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ShaderModule * pShaderModule, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateShaderModule( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pShaderModule ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; - VkResult result = - d.vkCreateShaderModule( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shaderModule ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModule" ); - - return createResultValueType( static_cast( result ), shaderModule ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createShaderModuleUnique( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; - VkResult result = - d.vkCreateShaderModule( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shaderModule ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModuleUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( shaderModule, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyShaderModule( m_device, - static_cast( shaderModule ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyShaderModule( m_device, - static_cast( shaderModule ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PipelineCache * pPipelineCache, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreatePipelineCache( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelineCache ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = - d.vkCreatePipelineCache( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); - - return createResultValueType( static_cast( result ), pipelineCache ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createPipelineCacheUnique( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = - d.vkCreatePipelineCache( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineCache, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipelineCache( m_device, - static_cast( pipelineCache ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipelineCache( m_device, - static_cast( pipelineCache ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - size_t * pDataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector data; - size_t dataSize; - VkResult result; - do - { - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return createResultValueType( static_cast( result ), data ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector data( uint8_tAllocator ); - size_t dataSize; - VkResult result; - do - { - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, - uint32_t srcCacheCount, - const VULKAN_HPP_NAMESPACE::PipelineCache * pSrcCaches, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::mergePipelineCaches( - VULKAN_HPP_NAMESPACE::PipelineCache dstCache, ArrayProxy const & srcCaches, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkMergePipelineCaches( - m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mergePipelineCaches" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateGraphicsPipelines( m_device, - static_cast( pipelineCache ), - createInfoCount, - reinterpret_cast( pCreateInfos ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelines ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue - Device::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipeline", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue( static_cast( result ), pipeline ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines; - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( - static_cast( result ), - UniqueHandle( pipeline, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateComputePipelines( m_device, - static_cast( pipelineCache ), - createInfoCount, - reinterpret_cast( pCreateInfos ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelines ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue - Device::createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipeline", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue( static_cast( result ), pipeline ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines; - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( - static_cast( result ), - UniqueHandle( pipeline, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipeline( m_device, - static_cast( pipeline ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipeline( m_device, - static_cast( pipeline ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PipelineLayout * pPipelineLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreatePipelineLayout( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelineLayout ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = - d.vkCreatePipelineLayout( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); - - return createResultValueType( static_cast( result ), pipelineLayout ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createPipelineLayoutUnique( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = - d.vkCreatePipelineLayout( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineLayout, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipelineLayout( m_device, - static_cast( pipelineLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPipelineLayout( m_device, - static_cast( pipelineLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Sampler * pSampler, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSampler( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSampler ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSampler( - const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = - d.vkCreateSampler( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); - - return createResultValueType( static_cast( result ), sampler ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSamplerUnique( - const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = - d.vkCreateSampler( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( sampler, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySampler( m_device, - static_cast( sampler ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySampler( m_device, - static_cast( sampler ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDescriptorSetLayout( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSetLayout ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); - - return createResultValueType( static_cast( result ), setLayout ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createDescriptorSetLayoutUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( setLayout, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorSetLayout( - m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorSetLayout( - m_device, - static_cast( descriptorSetLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorSetLayout( - m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorSetLayout( - m_device, - static_cast( descriptorSetLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorPool * pDescriptorPool, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDescriptorPool( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pDescriptorPool ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = - d.vkCreateDescriptorPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); - - return createResultValueType( static_cast( result ), descriptorPool ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createDescriptorPoolUnique( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = - d.vkCreateDescriptorPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( descriptorPool, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorPool( m_device, - static_cast( descriptorPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorPool( m_device, - static_cast( descriptorPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE Result Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - } -#else - template - VULKAN_HPP_INLINE void Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo * pAllocateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - - return createResultValueType( static_cast( result ), descriptorSets ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - DescriptorSetAllocator & descriptorSetAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector descriptorSets( allocateInfo.descriptorSetCount, descriptorSetAllocator ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - - return createResultValueType( static_cast( result ), descriptorSets ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, DescriptorSetAllocator>>::type - Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); - std::vector, DescriptorSetAllocator> uniqueDescriptorSets; - uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); - PoolFree deleter( *this, allocateInfo.descriptorPool, d ); - for ( auto const & descriptorSet : descriptorSets ) - { - uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, DescriptorSetAllocator>>::type - Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - DescriptorSetAllocator & descriptorSetAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); - std::vector, DescriptorSetAllocator> uniqueDescriptorSets( descriptorSetAllocator ); - uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); - PoolFree deleter( *this, allocateInfo.descriptorPool, d ); - for ( auto const & descriptorSet : descriptorSets ) - { - uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Result Device::freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkFreeDescriptorSets( - m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - ArrayProxy const & descriptorSets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeDescriptorSets( - m_device, static_cast( descriptorPool ), descriptorSets.size(), reinterpret_cast( descriptorSets.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Result( Device::free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkFreeDescriptorSets( - m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - ArrayProxy const & descriptorSets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeDescriptorSets( - m_device, static_cast( descriptorPool ), descriptorSets.size(), reinterpret_cast( descriptorSets.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, - const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, - uint32_t descriptorCopyCount, - const VULKAN_HPP_NAMESPACE::CopyDescriptorSet * pDescriptorCopies, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkUpdateDescriptorSets( m_device, - descriptorWriteCount, - reinterpret_cast( pDescriptorWrites ), - descriptorCopyCount, - reinterpret_cast( pDescriptorCopies ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy const & descriptorWrites, - ArrayProxy const & descriptorCopies, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkUpdateDescriptorSets( m_device, - descriptorWrites.size(), - reinterpret_cast( descriptorWrites.data() ), - descriptorCopies.size(), - reinterpret_cast( descriptorCopies.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Framebuffer * pFramebuffer, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateFramebuffer( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pFramebuffer ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = - d.vkCreateFramebuffer( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); - - return createResultValueType( static_cast( result ), framebuffer ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createFramebufferUnique( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = - d.vkCreateFramebuffer( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( framebuffer, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyFramebuffer( m_device, - static_cast( framebuffer ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyFramebuffer( m_device, - static_cast( framebuffer ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateRenderPass( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pRenderPass ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); - - return createResultValueType( static_cast( result ), renderPass ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createRenderPassUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyRenderPass( m_device, - static_cast( renderPass ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyRenderPass( m_device, - static_cast( renderPass ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Extent2D granularity; - d.vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); - - return granularity; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CommandPool * pCommandPool, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateCommandPool( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pCommandPool ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = - d.vkCreateCommandPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); - - return createResultValueType( static_cast( result ), commandPool ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createCommandPoolUnique( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = - d.vkCreateCommandPool( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( commandPool, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCommandPool( m_device, - static_cast( commandPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCommandPool( m_device, - static_cast( commandPool ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type - Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo * pAllocateInfo, - VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - - return createResultValueType( static_cast( result ), commandBuffers ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - CommandBufferAllocator & commandBufferAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector commandBuffers( allocateInfo.commandBufferCount, commandBufferAllocator ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - - return createResultValueType( static_cast( result ), commandBuffers ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, CommandBufferAllocator>>::type - Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); - std::vector, CommandBufferAllocator> uniqueCommandBuffers; - uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); - PoolFree deleter( *this, allocateInfo.commandPool, d ); - for ( auto const & commandBuffer : commandBuffers ) - { - uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, CommandBufferAllocator>>::type - Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - CommandBufferAllocator & commandBufferAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); - std::vector, CommandBufferAllocator> uniqueCommandBuffers( commandBufferAllocator ); - uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); - PoolFree deleter( *this, allocateInfo.commandPool, d ); - for ( auto const & commandBuffer : commandBuffers ) - { - uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkFreeCommandBuffers( - m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - ArrayProxy const & commandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeCommandBuffers( - m_device, static_cast( commandPool ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkFreeCommandBuffers( - m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - ArrayProxy const & commandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkFreeCommandBuffers( - m_device, static_cast( commandPool ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo * pBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::end( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::end( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkEndCommandBuffer( m_commandBuffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, - ArrayProxy const & viewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size(), reinterpret_cast( viewports.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, - uint32_t scissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, - ArrayProxy const & scissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size(), reinterpret_cast( scissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - uint32_t dynamicOffsetCount, - const uint32_t * pDynamicOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindDescriptorSets( m_commandBuffer, - static_cast( pipelineBindPoint ), - static_cast( layout ), - firstSet, - descriptorSetCount, - reinterpret_cast( pDescriptorSets ), - dynamicOffsetCount, - pDynamicOffsets ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - ArrayProxy const & descriptorSets, - ArrayProxy const & dynamicOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBindDescriptorSets( m_commandBuffer, - static_cast( pipelineBindPoint ), - static_cast( layout ), - firstSet, - descriptorSets.size(), - reinterpret_cast( descriptorSets.data() ), - dynamicOffsets.size(), - dynamicOffsets.data() ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::IndexType indexType, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), static_cast( offset ), static_cast( indexType ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindVertexBuffers( - m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), reinterpret_cast( pOffsets ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); -# else - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBindVertexBuffers( m_commandBuffer, - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::draw( - uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, - uint32_t instanceCount, - uint32_t firstIndex, - int32_t vertexOffset, - uint32_t firstInstance, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), static_cast( offset ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferCopy * pRegions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBuffer( m_commandBuffer, - static_cast( srcBuffer ), - static_cast( dstBuffer ), - regionCount, - reinterpret_cast( pRegions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBuffer( m_commandBuffer, - static_cast( srcBuffer ), - static_cast( dstBuffer ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageCopy * pRegions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regionCount, - reinterpret_cast( pRegions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageBlit * pRegions, - VULKAN_HPP_NAMESPACE::Filter filter, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBlitImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regionCount, - reinterpret_cast( pRegions ), - static_cast( filter ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - VULKAN_HPP_NAMESPACE::Filter filter, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBlitImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ), - static_cast( filter ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBufferToImage( m_commandBuffer, - static_cast( srcBuffer ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regionCount, - reinterpret_cast( pRegions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBufferToImage( m_commandBuffer, - static_cast( srcBuffer ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImageToBuffer( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstBuffer ), - regionCount, - reinterpret_cast( pRegions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImageToBuffer( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstBuffer ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize dataSize, - const void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdUpdateBuffer( - m_commandBuffer, static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( dataSize ), pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - ArrayProxy const & data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdUpdateBuffer( m_commandBuffer, - static_cast( dstBuffer ), - static_cast( dstOffset ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - uint32_t data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( size ), data ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue * pColor, - uint32_t rangeCount, - const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdClearColorImage( m_commandBuffer, - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( pColor ), - rangeCount, - reinterpret_cast( pRanges ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue & color, - ArrayProxy const & ranges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdClearColorImage( m_commandBuffer, - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( &color ), - ranges.size(), - reinterpret_cast( ranges.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue * pDepthStencil, - uint32_t rangeCount, - const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdClearDepthStencilImage( m_commandBuffer, - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( pDepthStencil ), - rangeCount, - reinterpret_cast( pRanges ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, - ArrayProxy const & ranges, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdClearDepthStencilImage( m_commandBuffer, - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( &depthStencil ), - ranges.size(), - reinterpret_cast( ranges.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, - const VULKAN_HPP_NAMESPACE::ClearAttachment * pAttachments, - uint32_t rectCount, - const VULKAN_HPP_NAMESPACE::ClearRect * pRects, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdClearAttachments( m_commandBuffer, - attachmentCount, - reinterpret_cast( pAttachments ), - rectCount, - reinterpret_cast( pRects ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy const & attachments, - ArrayProxy const & rects, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdClearAttachments( m_commandBuffer, - attachments.size(), - reinterpret_cast( attachments.data() ), - rects.size(), - reinterpret_cast( rects.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageResolve * pRegions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResolveImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regionCount, - reinterpret_cast( pRegions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdResolveImage( m_commandBuffer, - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - uint32_t memoryBarrierCount, - const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWaitEvents( m_commandBuffer, - eventCount, - reinterpret_cast( pEvents ), - static_cast( srcStageMask ), - static_cast( dstStageMask ), - memoryBarrierCount, - reinterpret_cast( pMemoryBarriers ), - bufferMemoryBarrierCount, - reinterpret_cast( pBufferMemoryBarriers ), - imageMemoryBarrierCount, - reinterpret_cast( pImageMemoryBarriers ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy const & events, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdWaitEvents( m_commandBuffer, - events.size(), - reinterpret_cast( events.data() ), - static_cast( srcStageMask ), - static_cast( dstStageMask ), - memoryBarriers.size(), - reinterpret_cast( memoryBarriers.data() ), - bufferMemoryBarriers.size(), - reinterpret_cast( bufferMemoryBarriers.data() ), - imageMemoryBarriers.size(), - reinterpret_cast( imageMemoryBarriers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - uint32_t memoryBarrierCount, - const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPipelineBarrier( m_commandBuffer, - static_cast( srcStageMask ), - static_cast( dstStageMask ), - static_cast( dependencyFlags ), - memoryBarrierCount, - reinterpret_cast( pMemoryBarriers ), - bufferMemoryBarrierCount, - reinterpret_cast( pBufferMemoryBarriers ), - imageMemoryBarrierCount, - reinterpret_cast( pImageMemoryBarriers ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPipelineBarrier( m_commandBuffer, - static_cast( srcStageMask ), - static_cast( dstStageMask ), - static_cast( dependencyFlags ), - memoryBarriers.size(), - reinterpret_cast( memoryBarriers.data() ), - bufferMemoryBarriers.size(), - reinterpret_cast( bufferMemoryBarriers.data() ), - imageMemoryBarriers.size(), - reinterpret_cast( imageMemoryBarriers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyQueryPoolResults( m_commandBuffer, - static_cast( queryPool ), - firstQuery, - queryCount, - static_cast( dstBuffer ), - static_cast( dstOffset ), - static_cast( stride ), - static_cast( flags ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - uint32_t size, - const void * pValues, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - ArrayProxy const & values, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPushConstants( m_commandBuffer, - static_cast( layout ), - static_cast( stageFlags ), - offset, - values.size() * sizeof( ValuesType ), - reinterpret_cast( values.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndRenderPass( m_commandBuffer ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy const & commandBuffers, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t * pApiVersion, Dispatch const & d ) VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumerateInstanceVersion( pApiVersion ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type enumerateInstanceVersion( Dispatch const & d ) - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint32_t apiVersion; - VkResult result = d.vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); - - return createResultValueType( static_cast( result ), apiVersion ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory2( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBindBufferMemory2( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindBufferMemory2( ArrayProxy const & bindInfos, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory2( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBindImageMemory2( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindImageMemory2( ArrayProxy const & bindInfos, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceGroupPeerMemoryFeatures( - m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeatures( - uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; - d.vkGetDeviceGroupPeerMemoryFeatures( - m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); - - return peerMemoryFeatures; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDeviceMask( m_commandBuffer, deviceMask ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::dispatchBase( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDispatchBase( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::enumeratePhysicalDeviceGroups( uint32_t * pPhysicalDeviceGroupCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumeratePhysicalDeviceGroups( - m_instance, pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Instance::enumeratePhysicalDeviceGroups( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDeviceGroupProperties; - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Instance::enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDeviceGroupProperties( - physicalDeviceGroupPropertiesAllocator ); - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageMemoryRequirements2( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetImageMemoryRequirements2( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetImageMemoryRequirements2( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetBufferMemoryRequirements2( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetBufferMemoryRequirements2( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetBufferMemoryRequirements2( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageSparseMemoryRequirements2( m_device, - reinterpret_cast( pInfo ), - pSparseMemoryRequirementCount, - reinterpret_cast( pSparseMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements2( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements2( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements( - sparseImageMemoryRequirements2Allocator ); - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements2( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements2( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; - d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); - - return features; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); - d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; - d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); - - return properties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); - d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; - d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); - d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( pImageFormatInfo ), - reinterpret_cast( pImageFormatProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - - return createResultValueType( static_cast( result ), imageFormatProperties ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - - return createResultValueType( static_cast( result ), structureChain ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceQueueFamilyProperties2( - m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties2( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties( queueFamilyProperties2Allocator ); - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties2( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains; - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - d.vkGetPhysicalDeviceQueueFamilyProperties2( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains( structureChainAllocator ); - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - d.vkGetPhysicalDeviceQueueFamilyProperties2( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; - d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = - structureChain.template get(); - d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, - reinterpret_cast( pFormatInfo ), - pPropertyCount, - reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties2( - m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( sparseImageFormatProperties2Allocator ); - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties2( - m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkTrimCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ); - } - - template - VULKAN_HPP_INLINE void Device::getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 * pQueueInfo, - VULKAN_HPP_NAMESPACE::Queue * pQueue, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceQueue2( m_device, reinterpret_cast( pQueueInfo ), reinterpret_cast( pQueue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 & queueInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Queue queue; - d.vkGetDeviceQueue2( m_device, reinterpret_cast( &queueInfo ), reinterpret_cast( &queue ) ); - - return queue; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSamplerYcbcrConversion( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pYcbcrConversion ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); - - return createResultValueType( static_cast( result ), ycbcrConversion ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSamplerYcbcrConversionUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySamplerYcbcrConversion( - m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySamplerYcbcrConversion( - m_device, - static_cast( ycbcrConversion ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySamplerYcbcrConversion( - m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySamplerYcbcrConversion( - m_device, - static_cast( ycbcrConversion ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDescriptorUpdateTemplate( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pDescriptorUpdateTemplate ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplate( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplate" ); - - return createResultValueType( static_cast( result ), descriptorUpdateTemplate ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createDescriptorUpdateTemplateUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplate( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( - descriptorUpdateTemplate, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorUpdateTemplate( - m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorUpdateTemplate( - m_device, - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorUpdateTemplate( - m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorUpdateTemplate( - m_device, - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkUpdateDescriptorSetWithTemplate( - m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkUpdateDescriptorSetWithTemplate( m_device, - static_cast( descriptorSet ), - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( &data ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, - reinterpret_cast( pExternalBufferInfo ), - reinterpret_cast( pExternalBufferProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties - PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; - d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, - reinterpret_cast( &externalBufferInfo ), - reinterpret_cast( &externalBufferProperties ) ); - - return externalBufferProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, - reinterpret_cast( pExternalFenceInfo ), - reinterpret_cast( pExternalFenceProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties - PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; - d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, - reinterpret_cast( &externalFenceInfo ), - reinterpret_cast( &externalFenceProperties ) ); - - return externalFenceProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, - reinterpret_cast( pExternalSemaphoreInfo ), - reinterpret_cast( pExternalSemaphoreProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; - d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, - reinterpret_cast( &externalSemaphoreInfo ), - reinterpret_cast( &externalSemaphoreProperties ) ); - - return externalSemaphoreProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDescriptorSetLayoutSupport( - m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; - d.vkGetDescriptorSetLayoutSupport( - m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); - - return support; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); - d.vkGetDescriptorSetLayoutSupport( - m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_2 === - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndirectCount( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndexedIndirectCount( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateRenderPass2( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pRenderPass ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass2( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); - - return createResultValueType( static_cast( result ), renderPass ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createRenderPass2Unique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass2( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginRenderPass2( - m_commandBuffer, reinterpret_cast( pRenderPassBegin ), reinterpret_cast( pSubpassBeginInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginRenderPass2( - m_commandBuffer, reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdNextSubpass2( - m_commandBuffer, reinterpret_cast( pSubpassBeginInfo ), reinterpret_cast( pSubpassEndInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdNextSubpass2( - m_commandBuffer, reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast( pSubpassEndInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast( &subpassEndInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - Device::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkResetQueryPool( m_device, static_cast( queryPool ), firstQuery, queryCount ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - uint64_t * pValue, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), pValue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t value; - VkResult result = d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); - - return createResultValueType( static_cast( result ), value ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, - uint64_t timeout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkWaitSemaphores( m_device, reinterpret_cast( pWaitInfo ), timeout ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSignalSemaphore( m_device, reinterpret_cast( pSignalInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetBufferDeviceAddress( m_device, reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkDeviceAddress result = d.vkGetBufferDeviceAddress( m_device, reinterpret_cast( &info ) ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t result = d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast( &info ) ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetDeviceMemoryOpaqueCaptureAddress( m_device, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t result = d.vkGetDeviceMemoryOpaqueCaptureAddress( m_device, reinterpret_cast( &info ) ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_3 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getToolProperties( uint32_t * pToolCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, pToolCount, reinterpret_cast( pToolProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getToolProperties( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector toolProperties; - uint32_t toolCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return createResultValueType( static_cast( result ), toolProperties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector toolProperties( - physicalDeviceToolPropertiesAllocator ); - uint32_t toolCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return createResultValueType( static_cast( result ), toolProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreatePrivateDataSlot( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPrivateDataSlot ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = - d.vkCreatePrivateDataSlot( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); - - return createResultValueType( static_cast( result ), privateDataSlot ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createPrivateDataSlotUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = - d.vkCreatePrivateDataSlot( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPrivateDataSlot( m_device, static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPrivateDataSlot( - m_device, - static_cast( privateDataSlot ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPrivateDataSlot( m_device, static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPrivateDataSlot( - m_device, - static_cast( privateDataSlot ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkSetPrivateData( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), data ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkSetPrivateData( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPrivateData( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t data; - d.vkGetPrivateData( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), &data ); - - return data; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetEvent2( m_commandBuffer, static_cast( event ), reinterpret_cast( pDependencyInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetEvent2( m_commandBuffer, static_cast( event ), reinterpret_cast( &dependencyInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::resetEvent2( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResetEvent2( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWaitEvents2( - m_commandBuffer, eventCount, reinterpret_cast( pEvents ), reinterpret_cast( pDependencyInfos ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( ArrayProxy const & events, - ArrayProxy const & dependencyInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); -# else - if ( events.size() != dependencyInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdWaitEvents2( m_commandBuffer, - events.size(), - reinterpret_cast( events.data() ), - reinterpret_cast( dependencyInfos.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPipelineBarrier2( m_commandBuffer, reinterpret_cast( pDependencyInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPipelineBarrier2( m_commandBuffer, reinterpret_cast( &dependencyInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteTimestamp2( m_commandBuffer, static_cast( stage ), static_cast( queryPool ), query ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit2( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkQueueSubmit2( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Queue::submit2( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBuffer2( m_commandBuffer, reinterpret_cast( pCopyBufferInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBuffer2( m_commandBuffer, reinterpret_cast( ©BufferInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImage2( m_commandBuffer, reinterpret_cast( pCopyImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImage2( m_commandBuffer, reinterpret_cast( ©ImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBufferToImage2( m_commandBuffer, reinterpret_cast( pCopyBufferToImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBufferToImage2( m_commandBuffer, reinterpret_cast( ©BufferToImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImageToBuffer2( m_commandBuffer, reinterpret_cast( pCopyImageToBufferInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImageToBuffer2( m_commandBuffer, reinterpret_cast( ©ImageToBufferInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBlitImage2( m_commandBuffer, reinterpret_cast( pBlitImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBlitImage2( m_commandBuffer, reinterpret_cast( &blitImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResolveImage2( m_commandBuffer, reinterpret_cast( pResolveImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdResolveImage2( m_commandBuffer, reinterpret_cast( &resolveImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginRendering( m_commandBuffer, reinterpret_cast( pRenderingInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginRendering( m_commandBuffer, reinterpret_cast( &renderingInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endRendering( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndRendering( m_commandBuffer ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetCullMode( m_commandBuffer, static_cast( cullMode ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetFrontFace( m_commandBuffer, static_cast( frontFace ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetPrimitiveTopology( m_commandBuffer, static_cast( primitiveTopology ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetViewportWithCount( m_commandBuffer, viewportCount, reinterpret_cast( pViewports ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( ArrayProxy const & viewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetViewportWithCount( m_commandBuffer, viewports.size(), reinterpret_cast( viewports.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - CommandBuffer::setScissorWithCount( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetScissorWithCount( m_commandBuffer, scissorCount, reinterpret_cast( pScissors ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCount( ArrayProxy const & scissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetScissorWithCount( m_commandBuffer, scissors.size(), reinterpret_cast( scissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindVertexBuffers2( m_commandBuffer, - firstBinding, - bindingCount, - reinterpret_cast( pBuffers ), - reinterpret_cast( pOffsets ), - reinterpret_cast( pSizes ), - reinterpret_cast( pStrides ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes, - ArrayProxy const & strides, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); - VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); - VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); -# else - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != sizes.size()" ); - } - if ( !strides.empty() && buffers.size() != strides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBindVertexBuffers2( m_commandBuffer, - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ), - reinterpret_cast( strides.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthTestEnable( m_commandBuffer, static_cast( depthTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthWriteEnable( m_commandBuffer, static_cast( depthWriteEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthCompareOp( m_commandBuffer, static_cast( depthCompareOp ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBoundsTestEnable( m_commandBuffer, static_cast( depthBoundsTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilTestEnable( m_commandBuffer, static_cast( stencilTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilOp( m_commandBuffer, - static_cast( faceMask ), - static_cast( failOp ), - static_cast( passOp ), - static_cast( depthFailOp ), - static_cast( compareOp ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetRasterizerDiscardEnable( m_commandBuffer, static_cast( rasterizerDiscardEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBiasEnable( m_commandBuffer, static_cast( depthBiasEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetPrimitiveRestartEnable( m_commandBuffer, static_cast( primitiveRestartEnable ) ); - } - - template - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceBufferMemoryRequirements( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetDeviceBufferMemoryRequirements( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetDeviceBufferMemoryRequirements( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceImageMemoryRequirements( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetDeviceImageMemoryRequirements( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetDeviceImageMemoryRequirements( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceImageSparseMemoryRequirements( m_device, - reinterpret_cast( pInfo ), - pSparseMemoryRequirementCount, - reinterpret_cast( pSparseMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - d.vkGetDeviceImageSparseMemoryRequirements( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetDeviceImageSparseMemoryRequirements( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements( - sparseImageMemoryRequirements2Allocator ); - uint32_t sparseMemoryRequirementCount; - d.vkGetDeviceImageSparseMemoryRequirements( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetDeviceImageSparseMemoryRequirements( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_surface === - - template - VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySurfaceKHR( m_instance, - static_cast( surface ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySurfaceKHR( m_instance, - static_cast( surface ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, - VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::Bool32 * pSupported, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( - m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( pSupported ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = d.vkGetPhysicalDeviceSurfaceSupportKHR( - m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); - - return createResultValueType( static_cast( result ), supported ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR * pSurfaceCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - - return createResultValueType( static_cast( result ), surfaceCapabilities ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pSurfaceFormatCount, - VULKAN_HPP_NAMESPACE::SurfaceFormatKHR * pSurfaceFormats, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return createResultValueType( static_cast( result ), surfaceFormats ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector surfaceFormats( surfaceFormatKHRAllocator ); - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return createResultValueType( static_cast( result ), surfaceFormats ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pPresentModeCount, - VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentModes; - uint32_t presentModeCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return createResultValueType( static_cast( result ), presentModes ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - PresentModeKHRAllocator & presentModeKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentModes( presentModeKHRAllocator ); - uint32_t presentModeCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return createResultValueType( static_cast( result ), presentModes ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_swapchain === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchain, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSwapchainKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSwapchain ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = - d.vkCreateSwapchainKHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); - - return createResultValueType( static_cast( result ), swapchain ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = - d.vkCreateSwapchainKHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySwapchainKHR( m_device, - static_cast( swapchain ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySwapchainKHR( m_device, - static_cast( swapchain ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint32_t * pSwapchainImageCount, - VULKAN_HPP_NAMESPACE::Image * pSwapchainImages, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchainImages; - uint32_t swapchainImageCount; - VkResult result; - do - { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); - if ( swapchainImageCount < swapchainImages.size() ) - { - swapchainImages.resize( swapchainImageCount ); - } - return createResultValueType( static_cast( result ), swapchainImages ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchainImages( imageAllocator ); - uint32_t swapchainImageCount; - VkResult result; - do - { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); - if ( swapchainImageCount < swapchainImages.size() ) - { - swapchainImages.resize( swapchainImageCount ); - } - return createResultValueType( static_cast( result ), swapchainImages ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t timeout, - VULKAN_HPP_NAMESPACE::Semaphore semaphore, - VULKAN_HPP_NAMESPACE::Fence fence, - uint32_t * pImageIndex, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireNextImageKHR( - m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t timeout, - VULKAN_HPP_NAMESPACE::Semaphore semaphore, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImageKHR( - m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImageKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eTimeout, - VULKAN_HPP_NAMESPACE::Result::eNotReady, - VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return ResultValue( static_cast( result ), imageIndex ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR * pPresentInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHR( - VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( pDeviceGroupPresentCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getGroupPresentCapabilitiesKHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = - d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); - - return createResultValueType( static_cast( result ), deviceGroupPresentCapabilities ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDeviceGroupSurfacePresentModesKHR( - m_device, static_cast( surface ), reinterpret_cast( pModes ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = d.vkGetDeviceGroupSurfacePresentModesKHR( - m_device, static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); - - return createResultValueType( static_cast( result ), modes ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pRectCount, - VULKAN_HPP_NAMESPACE::Rect2D * pRects, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), pRectCount, reinterpret_cast( pRects ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector rects; - uint32_t rectCount; - VkResult result; - do - { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) - { - rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); - if ( rectCount < rects.size() ) - { - rects.resize( rectCount ); - } - return createResultValueType( static_cast( result ), rects ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector rects( rect2DAllocator ); - uint32_t rectCount; - VkResult result; - do - { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) - { - rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); - if ( rectCount < rects.size() ) - { - rects.resize( rectCount ); - } - return createResultValueType( static_cast( result ), rects ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR * pAcquireInfo, - uint32_t * pImageIndex, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( pAcquireInfo ), pImageIndex ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eTimeout, - VULKAN_HPP_NAMESPACE::Result::eNotReady, - VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return ResultValue( static_cast( result ), imageIndex ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_display === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getDisplayPropertiesKHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayPropertiesKHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayPlanePropertiesKHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayPlanePropertiesKHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, - uint32_t * pDisplayCount, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector displays; - uint32_t displayCount; - VkResult result; - do - { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) - { - displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); - if ( displayCount < displays.size() ) - { - displays.resize( displayCount ); - } - return createResultValueType( static_cast( result ), displays ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector displays( displayKHRAllocator ); - uint32_t displayCount; - VkResult result; - do - { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) - { - displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); - if ( displayCount < displays.size() ) - { - displays.resize( displayCount ); - } - return createResultValueType( static_cast( result ), displays ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayModePropertiesKHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DisplayModeKHR * pMode, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, - static_cast( display ), - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pMode ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = - d.vkCreateDisplayModeKHR( m_physicalDevice, - static_cast( display ), - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); - - return createResultValueType( static_cast( result ), mode ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::createDisplayModeKHRUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = - d.vkCreateDisplayModeKHR( m_physicalDevice, - static_cast( display ), - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( mode, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, - uint32_t planeIndex, - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR * pCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( - m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilitiesKHR( - m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - - return createResultValueType( static_cast( result ), capabilities ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createDisplayPlaneSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_display_swapchain === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, - const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSharedSwapchainsKHR( m_device, - swapchainCount, - reinterpret_cast( pCreateInfos ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSwapchains ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSharedSwapchainsKHR( ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - - return createResultValueType( static_cast( result ), swapchains ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSharedSwapchainsKHR( ArrayProxy const & createInfos, - Optional allocator, - SwapchainKHRAllocator & swapchainKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchains( createInfos.size(), swapchainKHRAllocator ); - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - - return createResultValueType( static_cast( result ), swapchains ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createSharedSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); - - return createResultValueType( static_cast( result ), swapchain ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, SwapchainKHRAllocator>>::type - Device::createSharedSwapchainsKHRUnique( ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); - std::vector, SwapchainKHRAllocator> uniqueSwapchains; - uniqueSwapchains.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & swapchain : swapchains ) - { - uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, SwapchainKHRAllocator>>::type - Device::createSharedSwapchainsKHRUnique( ArrayProxy const & createInfos, - Optional allocator, - SwapchainKHRAllocator & swapchainKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); - std::vector, SwapchainKHRAllocator> uniqueSwapchains( swapchainKHRAllocator ); - uniqueSwapchains.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & swapchain : swapchains ) - { - uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); - } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( - m_device, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateXlibSurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateXlibSurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createXlibSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateXlibSurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 - PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display * dpy, VisualID visualID, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkBool32 result = d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); - - return static_cast( result ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateXcbSurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateXcbSurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createXcbSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateXcbSurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, - xcb_connection_t * connection, - xcb_visualid_t visual_id, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, - xcb_connection_t & connection, - xcb_visualid_t visual_id, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkBool32 result = d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); - - return static_cast( result ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateWaylandSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createWaylandSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateWaylandSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, - struct wl_display * display, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkBool32 result = d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); - - return static_cast( result ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateAndroidSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createAndroidSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateAndroidSurfaceKHR( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateWin32SurfaceKHR( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateWin32SurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHR" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createWin32SurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateWin32SurfaceKHR( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ) ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT * pCallback, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pCallback ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; - VkResult result = d.vkCreateDebugReportCallbackEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &callback ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXT" ); - - return createResultValueType( static_cast( result ), callback ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createDebugReportCallbackEXTUnique( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; - VkResult result = d.vkCreateDebugReportCallbackEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &callback ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( callback, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDebugReportCallbackEXT( - m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDebugReportCallbackEXT( - m_instance, - static_cast( callback ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDebugReportCallbackEXT( - m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDebugReportCallbackEXT( - m_instance, - static_cast( callback ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char * pLayerPrefix, - const char * pMessage, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDebugReportMessageEXT( m_instance, - static_cast( flags ), - static_cast( objectType ), - object, - location, - messageCode, - pLayerPrefix, - pMessage ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const std::string & layerPrefix, - const std::string & message, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDebugReportMessageEXT( m_instance, - static_cast( flags ), - static_cast( objectType ), - object, - location, - messageCode, - layerPrefix.c_str(), - message.c_str() ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_debug_marker === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT * pTagInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT * pNameInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile, - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR * pCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( - m_physicalDevice, reinterpret_cast( pVideoProfile ), reinterpret_cast( pCapabilities ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; - VkResult result = d.vkGetPhysicalDeviceVideoCapabilitiesKHR( - m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - - return createResultValueType( static_cast( result ), capabilities ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceVideoCapabilitiesKHR( - m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - - return createResultValueType( static_cast( result ), structureChain ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, - uint32_t * pVideoFormatPropertyCount, - VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR * pVideoFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, - reinterpret_cast( pVideoFormatInfo ), - pVideoFormatPropertyCount, - reinterpret_cast( pVideoFormatProperties ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector videoFormatProperties; - uint32_t videoFormatPropertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( - m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); - if ( videoFormatPropertyCount < videoFormatProperties.size() ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - } - return createResultValueType( static_cast( result ), videoFormatProperties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, - VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector videoFormatProperties( videoFormatPropertiesKHRAllocator ); - uint32_t videoFormatPropertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( - m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); - if ( videoFormatPropertyCount < videoFormatProperties.size() ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - } - return createResultValueType( static_cast( result ), videoFormatProperties ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::VideoSessionKHR * pVideoSession, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateVideoSessionKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pVideoSession ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; - VkResult result = - d.vkCreateVideoSessionKHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSession ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHR" ); - - return createResultValueType( static_cast( result ), videoSession ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createVideoSessionKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; - VkResult result = - d.vkCreateVideoSessionKHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSession ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( videoSession, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyVideoSessionKHR( m_device, static_cast( videoSession ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyVideoSessionKHR( - m_device, - static_cast( videoSession ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyVideoSessionKHR( m_device, static_cast( videoSession ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyVideoSessionKHR( - m_device, - static_cast( videoSession ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - uint32_t * pMemoryRequirementsCount, - VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( m_device, - static_cast( videoSession ), - pMemoryRequirementsCount, - reinterpret_cast( pMemoryRequirements ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector memoryRequirements; - uint32_t memoryRequirementsCount; - VkResult result; - do - { - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) - { - memoryRequirements.resize( memoryRequirementsCount ); - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, - static_cast( videoSession ), - &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getVideoSessionMemoryRequirementsKHR" ); - VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); - if ( memoryRequirementsCount < memoryRequirements.size() ) - { - memoryRequirements.resize( memoryRequirementsCount ); - } - return createResultValueType( static_cast( result ), memoryRequirements ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - VideoSessionMemoryRequirementsKHRAllocator & videoSessionMemoryRequirementsKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector memoryRequirements( - videoSessionMemoryRequirementsKHRAllocator ); - uint32_t memoryRequirementsCount; - VkResult result; - do - { - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) - { - memoryRequirements.resize( memoryRequirementsCount ); - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, - static_cast( videoSession ), - &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getVideoSessionMemoryRequirementsKHR" ); - VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); - if ( memoryRequirementsCount < memoryRequirements.size() ) - { - memoryRequirements.resize( memoryRequirementsCount ); - } - return createResultValueType( static_cast( result ), memoryRequirements ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - uint32_t bindSessionMemoryInfoCount, - const VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBindVideoSessionMemoryKHR( m_device, - static_cast( videoSession ), - bindSessionMemoryInfoCount, - reinterpret_cast( pBindSessionMemoryInfos ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - ArrayProxy const & bindSessionMemoryInfos, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindVideoSessionMemoryKHR( m_device, - static_cast( videoSession ), - bindSessionMemoryInfos.size(), - reinterpret_cast( bindSessionMemoryInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindVideoSessionMemoryKHR" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR * pVideoSessionParameters, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateVideoSessionParametersKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pVideoSessionParameters ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; - VkResult result = d.vkCreateVideoSessionParametersKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSessionParameters ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHR" ); - - return createResultValueType( static_cast( result ), videoSessionParameters ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createVideoSessionParametersKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; - VkResult result = d.vkCreateVideoSessionParametersKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSessionParameters ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHRUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( - videoSessionParameters, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR * pUpdateInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkUpdateVideoSessionParametersKHR( m_device, - static_cast( videoSessionParameters ), - reinterpret_cast( pUpdateInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkUpdateVideoSessionParametersKHR( m_device, - static_cast( videoSessionParameters ), - reinterpret_cast( &updateInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::updateVideoSessionParametersKHR" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyVideoSessionParametersKHR( - m_device, static_cast( videoSessionParameters ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyVideoSessionParametersKHR( - m_device, - static_cast( videoSessionParameters ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyVideoSessionParametersKHR( - m_device, static_cast( videoSessionParameters ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyVideoSessionParametersKHR( - m_device, - static_cast( videoSessionParameters ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR * pBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginVideoCodingKHR( m_commandBuffer, reinterpret_cast( pBeginInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginVideoCodingKHR( m_commandBuffer, reinterpret_cast( &beginInfo ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR * pEndCodingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndVideoCodingKHR( m_commandBuffer, reinterpret_cast( pEndCodingInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdEndVideoCodingKHR( m_commandBuffer, reinterpret_cast( &endCodingInfo ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR * pCodingControlInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdControlVideoCodingKHR( m_commandBuffer, reinterpret_cast( pCodingControlInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdControlVideoCodingKHR( m_commandBuffer, reinterpret_cast( &codingControlInfo ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - template - VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR * pFrameInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDecodeVideoKHR( m_commandBuffer, reinterpret_cast( pFrameInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & frameInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdDecodeVideoKHR( m_commandBuffer, reinterpret_cast( &frameInfo ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - template - VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, - firstBinding, - bindingCount, - reinterpret_cast( pBuffers ), - reinterpret_cast( pOffsets ), - reinterpret_cast( pSizes ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); - VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); -# else - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer, - firstCounterBuffer, - counterBufferCount, - reinterpret_cast( pCounterBuffers ), - reinterpret_cast( pCounterBufferOffsets ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); -# else - if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::beginTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer, - firstCounterBuffer, - counterBuffers.size(), - reinterpret_cast( counterBuffers.data() ), - reinterpret_cast( counterBufferOffsets.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndTransformFeedbackEXT( m_commandBuffer, - firstCounterBuffer, - counterBufferCount, - reinterpret_cast( pCounterBuffers ), - reinterpret_cast( pCounterBufferOffsets ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); -# else - if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::endTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdEndTransformFeedbackEXT( m_commandBuffer, - firstCounterBuffer, - counterBuffers.size(), - reinterpret_cast( counterBuffers.data() ), - reinterpret_cast( counterBufferOffsets.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - uint32_t index, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginQueryIndexedEXT( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ), index ); - } - - template - VULKAN_HPP_INLINE void - CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast( queryPool ), query, index ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, - uint32_t firstInstance, - VULKAN_HPP_NAMESPACE::Buffer counterBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, - uint32_t counterOffset, - uint32_t vertexStride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer, - instanceCount, - firstInstance, - static_cast( counterBuffer ), - static_cast( counterBufferOffset ), - counterOffset, - vertexStride ); - } - - //=== VK_NVX_binary_import === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CuModuleNVX * pModule, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateCuModuleNVX( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pModule ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CuModuleNVX module; - VkResult result = - d.vkCreateCuModuleNVX( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVX" ); - - return createResultValueType( static_cast( result ), module ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createCuModuleNVXUnique( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CuModuleNVX module; - VkResult result = - d.vkCreateCuModuleNVX( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVXUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( module, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CuFunctionNVX * pFunction, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateCuFunctionNVX( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pFunction ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CuFunctionNVX function; - VkResult result = - d.vkCreateCuFunctionNVX( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVX" ); - - return createResultValueType( static_cast( result ), function ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createCuFunctionNVXUnique( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::CuFunctionNVX function; - VkResult result = - d.vkCreateCuFunctionNVX( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVXUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( function, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCuModuleNVX( m_device, static_cast( module ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCuModuleNVX( m_device, - static_cast( module ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCuModuleNVX( m_device, static_cast( module ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCuModuleNVX( m_device, - static_cast( module ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCuFunctionNVX( m_device, static_cast( function ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCuFunctionNVX( m_device, - static_cast( function ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyCuFunctionNVX( m_device, static_cast( function ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyCuFunctionNVX( m_device, - static_cast( function ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX * pLaunchInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCuLaunchKernelNVX( m_commandBuffer, reinterpret_cast( pLaunchInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCuLaunchKernelNVX( m_commandBuffer, reinterpret_cast( &launchInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NVX_image_view_handle === - - template - VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetImageViewHandleNVX( m_device, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint32_t result = d.vkGetImageViewHandleNVX( m_device, reinterpret_cast( &info ) ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetImageViewAddressNVX( m_device, static_cast( imageView ), reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; - VkResult result = - d.vkGetImageViewAddressNVX( m_device, static_cast( imageView ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewAddressNVX" ); - - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_draw_indirect_count === - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndirectCountAMD( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_AMD_shader_info === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - size_t * pInfoSize, - void * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - pInfoSize, - pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector info; - size_t infoSize; - VkResult result; - do - { - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) - { - info.resize( infoSize ); - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); - if ( infoSize < info.size() ) - { - info.resize( infoSize ); - } - return createResultValueType( static_cast( result ), info ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - Uint8_tAllocator & uint8_tAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector info( uint8_tAllocator ); - size_t infoSize; - VkResult result; - do - { - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) - { - info.resize( infoSize ); - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); - if ( infoSize < info.size() ) - { - info.resize( infoSize ); - } - return createResultValueType( static_cast( result ), info ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_dynamic_rendering === - - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginRenderingKHR( m_commandBuffer, reinterpret_cast( pRenderingInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginRenderingKHR( m_commandBuffer, reinterpret_cast( &renderingInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderingKHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndRenderingKHR( m_commandBuffer ); - } - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateStreamDescriptorSurfaceGGP( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGP" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createStreamDescriptorSurfaceGGPUnique( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateStreamDescriptorSurfaceGGP( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGPUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, - VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV * pExternalImageFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - static_cast( externalHandleType ), - reinterpret_cast( pExternalImageFormatProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; - VkResult result = - d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - static_cast( externalHandleType ), - reinterpret_cast( &externalImageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - - return createResultValueType( static_cast( result ), externalImageFormatProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, - HANDLE * pHandle, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryWin32HandleNV( - VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - HANDLE handle; - VkResult result = - d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleNV" ); - - return createResultValueType( static_cast( result ), handle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_get_physical_device_properties2 === - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; - d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); - - return features; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); - d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; - d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); - - return properties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); - d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceFormatProperties2KHR( - m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; - d.vkGetPhysicalDeviceFormatProperties2KHR( - m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); - d.vkGetPhysicalDeviceFormatProperties2KHR( - m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( pImageFormatInfo ), - reinterpret_cast( pImageFormatProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - - return createResultValueType( static_cast( result ), imageFormatProperties ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - - return createResultValueType( static_cast( result ), structureChain ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( - m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector queueFamilyProperties( queueFamilyProperties2Allocator ); - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains; - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains( structureChainAllocator ); - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( - m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; - d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = - structureChain.template get(); - d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( pFormatInfo ), - pPropertyCount, - reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( - m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( sparseImageFormatProperties2Allocator ); - uint32_t propertyCount; - d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( - m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_device_group === - - template - VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceGroupPeerMemoryFeaturesKHR( - m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeaturesKHR( - uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; - d.vkGetDeviceGroupPeerMemoryFeaturesKHR( - m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); - - return peerMemoryFeatures; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDeviceMaskKHR( m_commandBuffer, deviceMask ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHR( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDispatchBaseKHR( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateViSurfaceNN( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateViSurfaceNN( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNN" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createViSurfaceNNUnique( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateViSurfaceNN( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNNUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_maintenance1 === - - template - VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); - } - - //=== VK_KHR_device_group_creation === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::enumeratePhysicalDeviceGroupsKHR( uint32_t * pPhysicalDeviceGroupCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( - m_instance, pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Instance::enumeratePhysicalDeviceGroupsKHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDeviceGroupProperties; - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroupsKHR( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Instance::enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector physicalDeviceGroupProperties( - physicalDeviceGroupPropertiesAllocator ); - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroupsKHR( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_memory_capabilities === - - template - VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, - reinterpret_cast( pExternalBufferInfo ), - reinterpret_cast( pExternalBufferProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties - PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; - d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, - reinterpret_cast( &externalBufferInfo ), - reinterpret_cast( &externalBufferProperties ) ); - - return externalBufferProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, - HANDLE * pHandle, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - HANDLE handle; - VkResult result = d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); - - return createResultValueType( static_cast( result ), handle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, - static_cast( handleType ), - handle, - reinterpret_cast( pMemoryWin32HandleProperties ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - VkResult result = d.vkGetMemoryWin32HandlePropertiesKHR( m_device, - static_cast( handleType ), - handle, - reinterpret_cast( &memoryWin32HandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); - - return createResultValueType( static_cast( result ), memoryWin32HandleProperties ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - int fd; - VkResult result = d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); - - return createResultValueType( static_cast( result ), fd ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - int fd, - VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR * pMemoryFdProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetMemoryFdPropertiesKHR( - m_device, static_cast( handleType ), fd, reinterpret_cast( pMemoryFdProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = d.vkGetMemoryFdPropertiesKHR( - m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); - - return createResultValueType( static_cast( result ), memoryFdProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_semaphore_capabilities === - - template - VULKAN_HPP_INLINE void - PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, - reinterpret_cast( pExternalSemaphoreInfo ), - reinterpret_cast( pExternalSemaphoreProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; - d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, - reinterpret_cast( &externalSemaphoreInfo ), - reinterpret_cast( &externalSemaphoreProperties ) ); - - return externalSemaphoreProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( - const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pImportSemaphoreWin32HandleInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( - const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - HANDLE handle; - VkResult result = d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); - - return createResultValueType( static_cast( result ), handle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( pImportSemaphoreFdInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - int fd; - VkResult result = d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); - - return createResultValueType( static_cast( result ), fd ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_push_descriptor === - - template - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - uint32_t descriptorWriteCount, - const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPushDescriptorSetKHR( m_commandBuffer, - static_cast( pipelineBindPoint ), - static_cast( layout ), - set, - descriptorWriteCount, - reinterpret_cast( pDescriptorWrites ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - ArrayProxy const & descriptorWrites, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPushDescriptorSetKHR( m_commandBuffer, - static_cast( pipelineBindPoint ), - static_cast( layout ), - set, - descriptorWrites.size(), - reinterpret_cast( descriptorWrites.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - const void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPushDescriptorSetWithTemplateKHR( - m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - DataType const & data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, - static_cast( descriptorUpdateTemplate ), - static_cast( layout ), - set, - reinterpret_cast( &data ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_conditional_rendering === - - template - VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast( pConditionalRenderingBegin ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast( &conditionalRenderingBegin ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndConditionalRenderingEXT( m_commandBuffer ); - } - - //=== VK_KHR_descriptor_update_template === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pDescriptorUpdateTemplate ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplateKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHR" ); - - return createResultValueType( static_cast( result ), descriptorUpdateTemplate ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createDescriptorUpdateTemplateKHRUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplateKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHRUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( - descriptorUpdateTemplate, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDescriptorUpdateTemplateKHR( - m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDescriptorUpdateTemplateKHR( - m_device, - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkUpdateDescriptorSetWithTemplateKHR( - m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkUpdateDescriptorSetWithTemplateKHR( m_device, - static_cast( descriptorSet ), - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( &data ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_clip_space_w_scaling === - - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewportWScalings ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, - ArrayProxy const & viewportWScalings, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetViewportWScalingNV( - m_commandBuffer, firstViewport, viewportWScalings.size(), reinterpret_cast( viewportWScalings.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_direct_mode_display === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - } -#else - template - VULKAN_HPP_INLINE void PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display * dpy, - VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display * dpy, - RROutput rrOutput, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXT" ); - - return createResultValueType( static_cast( result ), display ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getRandROutputDisplayEXTUnique( Display & dpy, RROutput rrOutput, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXTUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( display, ObjectRelease( *this, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT * pSurfaceCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( - m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); - - return createResultValueType( static_cast( result ), surfaceCapabilities ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_display_control === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT * pDisplayPowerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType::type Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT * pDeviceEventInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkRegisterDeviceEventEXT( m_device, - reinterpret_cast( pDeviceEventInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pFence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( - m_device, - reinterpret_cast( &deviceEventInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); - - return createResultValueType( static_cast( result ), fence ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::registerEventEXTUnique( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( - m_device, - reinterpret_cast( &deviceEventInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT * pDisplayEventInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkRegisterDisplayEventEXT( m_device, - static_cast( display ), - reinterpret_cast( pDisplayEventInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pFence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( - m_device, - static_cast( display ), - reinterpret_cast( &displayEventInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); - - return createResultValueType( static_cast( result ), fence ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( - m_device, - static_cast( display ), - reinterpret_cast( &displayEventInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, - uint64_t * pCounterValue, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSwapchainCounterEXT( - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t counterValue; - VkResult result = - d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); - - return createResultValueType( static_cast( result ), counterValue ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_GOOGLE_display_timing === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE * pDisplayTimingProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetRefreshCycleDurationGOOGLE( - m_device, static_cast( swapchain ), reinterpret_cast( pDisplayTimingProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; - VkResult result = d.vkGetRefreshCycleDurationGOOGLE( - m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRefreshCycleDurationGOOGLE" ); - - return createResultValueType( static_cast( result ), displayTimingProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint32_t * pPresentationTimingCount, - VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE * pPresentationTimings, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, - static_cast( swapchain ), - pPresentationTimingCount, - reinterpret_cast( pPresentationTimings ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentationTimings; - uint32_t presentationTimingCount; - VkResult result; - do - { - result = d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) - { - presentationTimings.resize( presentationTimingCount ); - result = d.vkGetPastPresentationTimingGOOGLE( m_device, - static_cast( swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); - if ( presentationTimingCount < presentationTimings.size() ) - { - presentationTimings.resize( presentationTimingCount ); - } - return createResultValueType( static_cast( result ), presentationTimings ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentationTimings( - pastPresentationTimingGOOGLEAllocator ); - uint32_t presentationTimingCount; - VkResult result; - do - { - result = d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) - { - presentationTimings.resize( presentationTimingCount ); - result = d.vkGetPastPresentationTimingGOOGLE( m_device, - static_cast( swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); - if ( presentationTimingCount < presentationTimings.size() ) - { - presentationTimings.resize( presentationTimingCount ); - } - return createResultValueType( static_cast( result ), presentationTimings ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_discard_rectangles === - - template - VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangleCount, reinterpret_cast( pDiscardRectangles ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - ArrayProxy const & discardRectangles, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetDiscardRectangleEXT( - m_commandBuffer, firstDiscardRectangle, discardRectangles.size(), reinterpret_cast( discardRectangles.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_hdr_metadata === - - template - VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, - const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, - const VULKAN_HPP_NAMESPACE::HdrMetadataEXT * pMetadata, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkSetHdrMetadataEXT( - m_device, swapchainCount, reinterpret_cast( pSwapchains ), reinterpret_cast( pMetadata ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy const & swapchains, - ArrayProxy const & metadata, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); -# else - if ( swapchains.size() != metadata.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkSetHdrMetadataEXT( m_device, - swapchains.size(), - reinterpret_cast( swapchains.data() ), - reinterpret_cast( metadata.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_create_renderpass2 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateRenderPass2KHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pRenderPass ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass2KHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHR" ); - - return createResultValueType( static_cast( result ), renderPass ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createRenderPass2KHRUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = - d.vkCreateRenderPass2KHR( m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginRenderPass2KHR( - m_commandBuffer, reinterpret_cast( pRenderPassBegin ), reinterpret_cast( pSubpassBeginInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginRenderPass2KHR( - m_commandBuffer, reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdNextSubpass2KHR( - m_commandBuffer, reinterpret_cast( pSubpassBeginInfo ), reinterpret_cast( pSubpassEndInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdNextSubpass2KHR( - m_commandBuffer, reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast( pSubpassEndInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast( &subpassEndInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_shared_presentable_image === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainStatusKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_fence_capabilities === - - template - VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, - reinterpret_cast( pExternalFenceInfo ), - reinterpret_cast( pExternalFenceProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties - PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; - d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, - reinterpret_cast( &externalFenceInfo ), - reinterpret_cast( &externalFenceProperties ) ); - - return externalFenceProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( - const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( pImportFenceWin32HandleInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, - HANDLE * pHandle, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - HANDLE handle; - VkResult result = d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); - - return createResultValueType( static_cast( result ), handle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR * pImportFenceFdInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( pImportFenceFdInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - int fd; - VkResult result = d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); - - return createResultValueType( static_cast( result ), fd ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_performance_query === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, - uint32_t * pCounterCount, - VULKAN_HPP_NAMESPACE::PerformanceCounterKHR * pCounters, - VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, - queueFamilyIndex, - pCounterCount, - reinterpret_cast( pCounters ), - reinterpret_cast( pCounterDescriptions ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, - std::vector>>::type - PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::pair, - std::vector> - data; - std::vector & counters = data.first; - std::vector & counterDescriptions = data.second; - uint32_t counterCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - m_physicalDevice, - queueFamilyIndex, - &counterCount, - reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); - VULKAN_HPP_ASSERT( counterCount <= counters.size() ); - if ( counterCount < counters.size() ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - } - return createResultValueType( static_cast( result ), data ); - } - - template ::value && - std::is_same::value, - int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType, - std::vector>>::type - PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, - PerformanceCounterKHRAllocator & performanceCounterKHRAllocator, - PerformanceCounterDescriptionKHRAllocator & performanceCounterDescriptionKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::pair, - std::vector> - data( - std::piecewise_construct, std::forward_as_tuple( performanceCounterKHRAllocator ), std::forward_as_tuple( performanceCounterDescriptionKHRAllocator ) ); - std::vector & counters = data.first; - std::vector & counterDescriptions = data.second; - uint32_t counterCount; - VkResult result; - do - { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - m_physicalDevice, - queueFamilyIndex, - &counterCount, - reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); - VULKAN_HPP_ASSERT( counterCount <= counters.size() ); - if ( counterCount < counters.size() ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - } - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, - uint32_t * pNumPasses, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - m_physicalDevice, reinterpret_cast( pPerformanceQueryCreateInfo ), pNumPasses ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( - const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint32_t numPasses; - d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - m_physicalDevice, reinterpret_cast( &performanceQueryCreateInfo ), &numPasses ); - - return numPasses; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkReleaseProfilingLockKHR( m_device ); - } - - //=== VK_KHR_get_surface_capabilities2 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR * pSurfaceCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( pSurfaceInfo ), - reinterpret_cast( pSurfaceCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - - return createResultValueType( static_cast( result ), surfaceCapabilities ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - - return createResultValueType( static_cast( result ), structureChain ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pSurfaceFormatCount, - VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR * pSurfaceFormats, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( pSurfaceInfo ), - pSurfaceFormatCount, - reinterpret_cast( pSurfaceFormats ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return createResultValueType( static_cast( result ), surfaceFormats ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector surfaceFormats( surfaceFormat2KHRAllocator ); - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return createResultValueType( static_cast( result ), surfaceFormats ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains; - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - structureChains.resize( surfaceFormatCount ); - surfaceFormats.resize( surfaceFormatCount ); - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - surfaceFormats[i].pNext = structureChains[i].template get().pNext; - } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - structureChains.resize( surfaceFormatCount ); - } - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - structureChains[i].template get() = surfaceFormats[i]; - } - return createResultValueType( static_cast( result ), structureChains ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - StructureChainAllocator & structureChainAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector structureChains( structureChainAllocator ); - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - structureChains.resize( surfaceFormatCount ); - surfaceFormats.resize( surfaceFormatCount ); - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - surfaceFormats[i].pNext = structureChains[i].template get().pNext; - } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - structureChains.resize( surfaceFormatCount ); - } - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - structureChains[i].template get() = surfaceFormats[i]; - } - return createResultValueType( static_cast( result ), structureChains ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_get_display_properties2 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayProperties2KHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayProperties2KHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayProperties2KHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayProperties2KHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneProperties2KHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayPlaneProperties2KHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayPlaneProperties2KHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( displayModeProperties2KHRAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR * pDisplayPlaneInfo, - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR * pCapabilities, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, - reinterpret_cast( pDisplayPlaneInfo ), - reinterpret_cast( pCapabilities ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); - - return createResultValueType( static_cast( result ), capabilities ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateIOSSurfaceMVK( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateIOSSurfaceMVK( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVK" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createIOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateIOSSurfaceMVK( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVKUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateMacOSSurfaceMVK( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVK" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createMacOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateMacOSSurfaceMVK( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVKUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pNameInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT * pTagInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast( pLabelInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast( &labelInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkQueueEndDebugUtilsLabelEXT( m_queue ); - } - - template - VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast( pLabelInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast( &labelInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( pLabelInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( &labelInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEndDebugUtilsLabelEXT( m_commandBuffer ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( pLabelInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( &labelInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT * pMessenger, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pMessenger ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); - - return createResultValueType( static_cast( result ), messenger ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createDebugUtilsMessengerEXTUnique( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( messenger, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDebugUtilsMessengerEXT( - m_instance, static_cast( messenger ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDebugUtilsMessengerEXT( - m_instance, - static_cast( messenger ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDebugUtilsMessengerEXT( - m_instance, static_cast( messenger ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDebugUtilsMessengerEXT( - m_instance, - static_cast( messenger ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkSubmitDebugUtilsMessageEXT( m_instance, - static_cast( messageSeverity ), - static_cast( messageTypes ), - reinterpret_cast( pCallbackData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkSubmitDebugUtilsMessageEXT( m_instance, - static_cast( messageSeverity ), - static_cast( messageTypes ), - reinterpret_cast( &callbackData ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer * buffer, - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast( pProperties ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; - VkResult result = - d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - - return createResultValueType( static_cast( result ), properties ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = - structureChain.template get(); - VkResult result = - d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - - return createResultValueType( static_cast( result ), structureChain ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID * pInfo, - struct AHardwareBuffer ** pBuffer, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast( pInfo ), pBuffer ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - struct AHardwareBuffer * buffer; - VkResult result = - d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast( &info ), &buffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); - - return createResultValueType( static_cast( result ), buffer ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - - template - VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT * pSampleLocationsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( pSampleLocationsInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( &sampleLocationsInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT * pMultisampleProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPhysicalDeviceMultisamplePropertiesEXT( - m_physicalDevice, static_cast( samples ), reinterpret_cast( pMultisampleProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT - PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties; - d.vkGetPhysicalDeviceMultisamplePropertiesEXT( - m_physicalDevice, static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); - - return multisampleProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_get_memory_requirements2 === - - template - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageMemoryRequirements2KHR( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetImageMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetImageMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetBufferMemoryRequirements2KHR( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetBufferMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetBufferMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageSparseMemoryRequirements2KHR( m_device, - reinterpret_cast( pInfo ), - pSparseMemoryRequirementCount, - reinterpret_cast( pSparseMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements2KHR( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements( - sparseImageMemoryRequirements2Allocator ); - uint32_t sparseMemoryRequirementCount; - d.vkGetImageSparseMemoryRequirements2KHR( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetImageSparseMemoryRequirements2KHR( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_acceleration_structure === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructure, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateAccelerationStructureKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pAccelerationStructure ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHR" ); - - return createResultValueType( static_cast( result ), accelerationStructure ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createAccelerationStructureKHRUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( accelerationStructure, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyAccelerationStructureKHR( - m_device, static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyAccelerationStructureKHR( - m_device, - static_cast( accelerationStructure ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyAccelerationStructureKHR( - m_device, static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyAccelerationStructureKHR( - m_device, - static_cast( accelerationStructure ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - CommandBuffer::buildAccelerationStructuresKHR( uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBuildAccelerationStructuresKHR( m_commandBuffer, - infoCount, - reinterpret_cast( pInfos ), - reinterpret_cast( ppBuildRangeInfos ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); -# else - if ( infos.size() != pBuildRangeInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBuildAccelerationStructuresKHR( m_commandBuffer, - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresIndirectKHR( uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::DeviceAddress * pIndirectDeviceAddresses, - const uint32_t * pIndirectStrides, - const uint32_t * const * ppMaxPrimitiveCounts, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBuildAccelerationStructuresIndirectKHR( m_commandBuffer, - infoCount, - reinterpret_cast( pInfos ), - reinterpret_cast( pIndirectDeviceAddresses ), - pIndirectStrides, - ppMaxPrimitiveCounts ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void - CommandBuffer::buildAccelerationStructuresIndirectKHR( ArrayProxy const & infos, - ArrayProxy const & indirectDeviceAddresses, - ArrayProxy const & indirectStrides, - ArrayProxy const & pMaxPrimitiveCounts, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( infos.size() == indirectDeviceAddresses.size() ); - VULKAN_HPP_ASSERT( infos.size() == indirectStrides.size() ); - VULKAN_HPP_ASSERT( infos.size() == pMaxPrimitiveCounts.size() ); -# else - if ( infos.size() != indirectDeviceAddresses.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectDeviceAddresses.size()" ); - } - if ( infos.size() != indirectStrides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectStrides.size()" ); - } - if ( infos.size() != pMaxPrimitiveCounts.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != pMaxPrimitiveCounts.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBuildAccelerationStructuresIndirectKHR( m_commandBuffer, - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( indirectDeviceAddresses.data() ), - indirectStrides.data(), - pMaxPrimitiveCounts.data() ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkBuildAccelerationStructuresKHR( m_device, - static_cast( deferredOperation ), - infoCount, - reinterpret_cast( pInfos ), - reinterpret_cast( ppBuildRangeInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); -# else - if ( infos.size() != pBuildRangeInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - VkResult result = - d.vkBuildAccelerationStructuresKHR( m_device, - static_cast( deferredOperation ), - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); - resultCheck( - static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCopyAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCopyAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); - resultCheck( - static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCopyAccelerationStructureToMemoryKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCopyAccelerationStructureToMemoryKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); - resultCheck( - static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCopyMemoryToAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCopyMemoryToAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); - resultCheck( - static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - void * pData, - size_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkWriteAccelerationStructuresPropertiesKHR( m_device, - accelerationStructureCount, - reinterpret_cast( pAccelerationStructures ), - static_cast( queryType ), - dataSize, - pData, - stride ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - size_t stride, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkWriteAccelerationStructuresPropertiesKHR( m_device, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::writeAccelerationStructuresPropertyKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t stride, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkWriteAccelerationStructuresPropertiesKHR( m_device, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - sizeof( DataType ), - reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( &info ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyAccelerationStructureToMemoryKHR( m_commandBuffer, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyAccelerationStructureToMemoryKHR( m_commandBuffer, reinterpret_cast( &info ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyMemoryToAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyMemoryToAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( &info ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE DeviceAddress Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetAccelerationStructureDeviceAddressKHR( m_device, reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress - Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkDeviceAddress result = - d.vkGetAccelerationStructureDeviceAddressKHR( m_device, reinterpret_cast( &info ) ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - CommandBuffer::writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteAccelerationStructuresPropertiesKHR( m_commandBuffer, - accelerationStructureCount, - reinterpret_cast( pAccelerationStructures ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void - CommandBuffer::writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdWriteAccelerationStructuresPropertiesKHR( m_commandBuffer, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR * pVersionInfo, - VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceAccelerationStructureCompatibilityKHR( m_device, - reinterpret_cast( pVersionInfo ), - reinterpret_cast( pCompatibility ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR - Device::getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; - d.vkGetDeviceAccelerationStructureCompatibilityKHR( m_device, - reinterpret_cast( &versionInfo ), - reinterpret_cast( &compatibility ) ); - - return compatibility; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pBuildInfo, - const uint32_t * pMaxPrimitiveCounts, - VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetAccelerationStructureBuildSizesKHR( m_device, - static_cast( buildType ), - reinterpret_cast( pBuildInfo ), - pMaxPrimitiveCounts, - reinterpret_cast( pSizeInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR - Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, - ArrayProxy const & maxPrimitiveCounts, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( maxPrimitiveCounts.size() == buildInfo.geometryCount ); -# else - if ( maxPrimitiveCounts.size() != buildInfo.geometryCount ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureBuildSizesKHR: maxPrimitiveCounts.size() != buildInfo.geometryCount" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; - d.vkGetAccelerationStructureBuildSizesKHR( m_device, - static_cast( buildType ), - reinterpret_cast( &buildInfo ), - maxPrimitiveCounts.data(), - reinterpret_cast( &sizeInfo ) ); - - return sizeInfo; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_sampler_ycbcr_conversion === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pYcbcrConversion ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversionKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHR" ); - - return createResultValueType( static_cast( result ), ycbcrConversion ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createSamplerYcbcrConversionKHRUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversionKHR( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroySamplerYcbcrConversionKHR( - m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroySamplerYcbcrConversionKHR( - m_device, - static_cast( ycbcrConversion ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_bind_memory2 === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindBufferMemory2KHR( ArrayProxy const & bindInfos, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindBufferMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindImageMemory2KHR( ArrayProxy const & bindInfos, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindImageMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_image_drm_format_modifier === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( - VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetImageDrmFormatModifierPropertiesEXT( - m_device, static_cast( image ), reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = d.vkGetImageDrmFormatModifierPropertiesEXT( - m_device, static_cast( image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); - - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_validation_cache === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pValidationCache, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateValidationCacheEXT( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pValidationCache ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; - VkResult result = d.vkCreateValidationCacheEXT( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &validationCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXT" ); - - return createResultValueType( static_cast( result ), validationCache ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createValidationCacheEXTUnique( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; - VkResult result = d.vkCreateValidationCacheEXT( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &validationCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( validationCache, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyValidationCacheEXT( - m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyValidationCacheEXT( - m_device, - static_cast( validationCache ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyValidationCacheEXT( - m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyValidationCacheEXT( - m_device, - static_cast( validationCache ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, - uint32_t srcCacheCount, - const VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pSrcCaches, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkMergeValidationCachesEXT( - m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::mergeValidationCachesEXT( - VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, ArrayProxy const & srcCaches, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkMergeValidationCachesEXT( - m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mergeValidationCachesEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - size_t * pDataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), pDataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector data; - size_t dataSize; - VkResult result; - do - { - result = d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = - d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return createResultValueType( static_cast( result ), data ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector data( uint8_tAllocator ); - size_t dataSize; - VkResult result; - do - { - result = d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = - d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_shading_rate_image === - - template - VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindShadingRateImageNV( m_commandBuffer, static_cast( imageView ), static_cast( imageLayout ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetViewportShadingRatePaletteNV( - m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pShadingRatePalettes ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void - CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, - ArrayProxy const & shadingRatePalettes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetViewportShadingRatePaletteNV( - m_commandBuffer, firstViewport, shadingRatePalettes.size(), reinterpret_cast( shadingRatePalettes.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, - const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, - static_cast( sampleOrderType ), - customSampleOrderCount, - reinterpret_cast( pCustomSampleOrders ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - ArrayProxy const & customSampleOrders, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, - static_cast( sampleOrderType ), - customSampleOrders.size(), - reinterpret_cast( customSampleOrders.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_ray_tracing === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructure, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateAccelerationStructureNV( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pAccelerationStructure ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureNV( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNV" ); - - return createResultValueType( static_cast( result ), accelerationStructure ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createAccelerationStructureNVUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureNV( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNVUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( accelerationStructure, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyAccelerationStructureNV( - m_device, static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyAccelerationStructureNV( - m_device, - static_cast( accelerationStructure ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyAccelerationStructureNV( - m_device, static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyAccelerationStructureNV( - m_device, - static_cast( accelerationStructure ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, - reinterpret_cast( pInfo ), - reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR - Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements; - d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR & memoryRequirements = structureChain.template get(); - d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindAccelerationStructureMemoryNV( - uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkBindAccelerationStructureMemoryNV( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::bindAccelerationStructureMemoryNV( ArrayProxy const & bindInfos, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkBindAccelerationStructureMemoryNV( - m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, - reinterpret_cast( pInfo ), - static_cast( instanceData ), - static_cast( instanceOffset ), - static_cast( update ), - static_cast( dst ), - static_cast( src ), - static_cast( scratch ), - static_cast( scratchOffset ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, - reinterpret_cast( &info ), - static_cast( instanceData ), - static_cast( instanceOffset ), - static_cast( update ), - static_cast( dst ), - static_cast( src ), - static_cast( scratch ), - static_cast( scratchOffset ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyAccelerationStructureNV( m_commandBuffer, - static_cast( dst ), - static_cast( src ), - static_cast( mode ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, - VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdTraceRaysNV( m_commandBuffer, - static_cast( raygenShaderBindingTableBuffer ), - static_cast( raygenShaderBindingOffset ), - static_cast( missShaderBindingTableBuffer ), - static_cast( missShaderBindingOffset ), - static_cast( missShaderBindingStride ), - static_cast( hitShaderBindingTableBuffer ), - static_cast( hitShaderBindingOffset ), - static_cast( hitShaderBindingStride ), - static_cast( callableShaderBindingTableBuffer ), - static_cast( callableShaderBindingOffset ), - static_cast( callableShaderBindingStride ), - width, - height, - depth ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateRayTracingPipelinesNV( m_device, - static_cast( pipelineCache ), - createInfoCount, - reinterpret_cast( pCreateInfos ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelines ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue - Device::createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNV", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue( static_cast( result ), pipeline ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines; - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesNV( - m_device, - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNVUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( - static_cast( result ), - UniqueHandle( pipeline, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getRayTracingShaderGroupHandlesNV( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingShaderGroupHandlesNV( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesNV" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getRayTracingShaderGroupHandleNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkGetRayTracingShaderGroupHandlesNV( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleNV" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - size_t dataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetAccelerationStructureHandleNV( m_device, static_cast( accelerationStructure ), dataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetAccelerationStructureHandleNV( - m_device, static_cast( accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkGetAccelerationStructureHandleNV( - m_device, static_cast( accelerationStructure ), sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, - accelerationStructureCount, - reinterpret_cast( pAccelerationStructures ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void - CommandBuffer::writeAccelerationStructuresPropertiesNV( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t shader, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCompileDeferredNV( m_device, static_cast( pipeline ), shader ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCompileDeferredNV( m_device, static_cast( pipeline ), shader ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::compileDeferredNV" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_maintenance3 === - - template - VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDescriptorSetLayoutSupportKHR( - m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; - d.vkGetDescriptorSetLayoutSupportKHR( - m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); - - return support; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); - d.vkGetDescriptorSetLayoutSupportKHR( - m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_draw_indirect_count === - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndirectCountKHR( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_EXT_external_memory_host === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - const void * pHostPointer, - VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetMemoryHostPointerPropertiesEXT( m_device, - static_cast( handleType ), - pHostPointer, - reinterpret_cast( pMemoryHostPointerProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - const void * pHostPointer, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = d.vkGetMemoryHostPointerPropertiesEXT( m_device, - static_cast( handleType ), - pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); - - return createResultValueType( static_cast( result ), memoryHostPointerProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_buffer_marker === - - template - VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, - static_cast( pipelineStage ), - static_cast( dstBuffer ), - static_cast( dstOffset ), - marker ); - } - - //=== VK_EXT_calibrated_timestamps === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsEXT( uint32_t * pTimeDomainCount, - VULKAN_HPP_NAMESPACE::TimeDomainEXT * pTimeDomains, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, pTimeDomainCount, reinterpret_cast( pTimeDomains ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getCalibrateableTimeDomainsEXT( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector timeDomains; - uint32_t timeDomainCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) - { - timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); - if ( timeDomainCount < timeDomains.size() ) - { - timeDomains.resize( timeDomainCount ); - } - return createResultValueType( static_cast( result ), timeDomains ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getCalibrateableTimeDomainsEXT( TimeDomainEXTAllocator & timeDomainEXTAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector timeDomains( timeDomainEXTAllocator ); - uint32_t timeDomainCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) - { - timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); - if ( timeDomainCount < timeDomains.size() ) - { - timeDomains.resize( timeDomainCount ); - } - return createResultValueType( static_cast( result ), timeDomains ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsEXT( uint32_t timestampCount, - const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT * pTimestampInfos, - uint64_t * pTimestamps, - uint64_t * pMaxDeviation, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetCalibratedTimestampsEXT( - m_device, timestampCount, reinterpret_cast( pTimestampInfos ), pTimestamps, pMaxDeviation ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type - Device::getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::pair, uint64_t> data( - std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); - std::vector & timestamps = data.first; - uint64_t & maxDeviation = data.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - - return createResultValueType( static_cast( result ), data ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type - Device::getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos, - Uint64_tAllocator & uint64_tAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::pair, uint64_t> data( - std::piecewise_construct, std::forward_as_tuple( timestampInfos.size(), uint64_tAllocator ), std::forward_as_tuple( 0 ) ); - std::vector & timestamps = data.first; - uint64_t & maxDeviation = data.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT & timestampInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::pair data; - uint64_t & timestamp = data.first; - uint64_t & maxDeviation = data.second; - VkResult result = - d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_mesh_shader === - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksNV( m_commandBuffer, taskCount, firstTask ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksIndirectNV( m_commandBuffer, static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_NV_scissor_exclusive === - - template - VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissorCount, reinterpret_cast( pExclusiveScissors ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, - ArrayProxy const & exclusiveScissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetExclusiveScissorNV( - m_commandBuffer, firstExclusiveScissor, exclusiveScissors.size(), reinterpret_cast( exclusiveScissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_device_diagnostic_checkpoints === - - template - VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( const void * pCheckpointMarker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetCheckpointNV( m_commandBuffer, pCheckpointMarker ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( CheckpointMarkerType const & checkpointMarker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetCheckpointNV( m_commandBuffer, reinterpret_cast( &checkpointMarker ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Queue::getCheckpointDataNV( uint32_t * pCheckpointDataCount, - VULKAN_HPP_NAMESPACE::CheckpointDataNV * pCheckpointData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetQueueCheckpointDataNV( m_queue, pCheckpointDataCount, reinterpret_cast( pCheckpointData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Queue::getCheckpointDataNV( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector checkpointData; - uint32_t checkpointDataCount; - d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Queue::getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector checkpointData( checkpointDataNVAllocator ); - uint32_t checkpointDataCount; - d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_timeline_semaphore === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - uint64_t * pValue, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast( semaphore ), pValue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t value; - VkResult result = d.vkGetSemaphoreCounterValueKHR( m_device, static_cast( semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValueKHR" ); - - return createResultValueType( static_cast( result ), value ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, - uint64_t timeout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast( pWaitInfo ), timeout ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkWaitSemaphoresKHR( m_device, reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast( pSignalInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSignalSemaphoreKHR( m_device, reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_INTEL_performance_query === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::initializePerformanceApiINTEL( - const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL * pInitializeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast( pInitializeInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast( &initializeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkUninitializePerformanceApiINTEL( m_device ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL * pMarkerInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceStreamMarkerINTEL( - const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceOverrideINTEL( - const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL * pOverrideInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast( pOverrideInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast( &overrideInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL * pConfiguration, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquirePerformanceConfigurationINTEL( m_device, - reinterpret_cast( pAcquireInfo ), - reinterpret_cast( pConfiguration ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; - VkResult result = d.vkAcquirePerformanceConfigurationINTEL( m_device, - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTEL" ); - - return createResultValueType( static_cast( result ), configuration ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::acquirePerformanceConfigurationINTELUnique( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; - VkResult result = d.vkAcquirePerformanceConfigurationINTEL( m_device, - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTELUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( configuration, ObjectRelease( *this, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releasePerformanceConfigurationINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::release" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast( configuration ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, - VULKAN_HPP_NAMESPACE::PerformanceValueINTEL * pValue, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPerformanceParameterINTEL( - m_device, static_cast( parameter ), reinterpret_cast( pValue ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; - VkResult result = d.vkGetPerformanceParameterINTEL( - m_device, static_cast( parameter ), reinterpret_cast( &value ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); - - return createResultValueType( static_cast( result ), value ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_display_native_hdr === - - template - VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, - VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkSetLocalDimmingAMD( m_device, static_cast( swapChain ), static_cast( localDimmingEnable ) ); - } - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateImagePipeSurfaceFUCHSIA( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIA" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createImagePipeSurfaceFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateImagePipeSurfaceFUCHSIA( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIAUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateMetalSurfaceEXT( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateMetalSurfaceEXT( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXT" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createMetalSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = - d.vkCreateMetalSurfaceEXT( m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getFragmentShadingRatesKHR( uint32_t * pFragmentShadingRateCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, pFragmentShadingRateCount, reinterpret_cast( pFragmentShadingRates ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getFragmentShadingRatesKHR( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector fragmentShadingRates; - uint32_t fragmentShadingRateCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); - if ( fragmentShadingRateCount < fragmentShadingRates.size() ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - } - return createResultValueType( static_cast( result ), fragmentShadingRates ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector fragmentShadingRates( - physicalDeviceFragmentShadingRateKHRAllocator ); - uint32_t fragmentShadingRateCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); - if ( fragmentShadingRateCount < fragmentShadingRates.size() ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - } - return createResultValueType( static_cast( result ), fragmentShadingRates ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D * pFragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetFragmentShadingRateKHR( - m_commandBuffer, reinterpret_cast( pFragmentSize ), reinterpret_cast( combinerOps ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetFragmentShadingRateKHR( - m_commandBuffer, reinterpret_cast( &fragmentSize ), reinterpret_cast( combinerOps ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_buffer_device_address === - - template - VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkDeviceAddress result = d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast( &info ) ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_tooling_info === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getToolPropertiesEXT( uint32_t * pToolCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, pToolCount, reinterpret_cast( pToolProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getToolPropertiesEXT( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector toolProperties; - uint32_t toolCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return createResultValueType( static_cast( result ), toolProperties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector toolProperties( - physicalDeviceToolPropertiesAllocator ); - uint32_t toolCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return createResultValueType( static_cast( result ), toolProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_present_wait === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t presentId, - uint64_t timeout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkWaitForPresentKHR( m_device, static_cast( swapchain ), presentId, timeout ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkWaitForPresentKHR( m_device, static_cast( swapchain ), presentId, timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForPresentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_cooperative_matrix === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixPropertiesNV( - uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getCooperativeMatrixPropertiesNV( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( - cooperativeMatrixPropertiesNVAllocator ); - uint32_t propertyCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_coverage_reduction_mode === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( - uint32_t * pCombinationCount, VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV * pCombinations, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - m_physicalDevice, pCombinationCount, reinterpret_cast( pCombinations ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector combinations; - uint32_t combinationCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) - { - combinations.resize( combinationCount ); - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); - if ( combinationCount < combinations.size() ) - { - combinations.resize( combinationCount ); - } - return createResultValueType( static_cast( result ), combinations ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( - FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector combinations( - framebufferMixedSamplesCombinationNVAllocator ); - uint32_t combinationCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) - { - combinations.resize( combinationCount ); - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); - if ( combinationCount < combinations.size() ) - { - combinations.resize( combinationCount ); - } - return createResultValueType( static_cast( result ), combinations ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pPresentModeCount, - VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, - reinterpret_cast( pSurfaceInfo ), - pPresentModeCount, - reinterpret_cast( pPresentModes ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentModes; - uint32_t presentModeCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return createResultValueType( static_cast( result ), presentModes ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - PresentModeKHRAllocator & presentModeKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector presentModes( presentModeKHRAllocator ); - uint32_t presentModeCount; - VkResult result; - do - { - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return createResultValueType( static_cast( result ), presentModes ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); - } -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireFullScreenExclusiveModeEXT" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); - } -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releaseFullScreenExclusiveModeEXT" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDeviceGroupSurfacePresentModes2EXT( - m_device, reinterpret_cast( pSurfaceInfo ), reinterpret_cast( pModes ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = d.vkGetDeviceGroupSurfacePresentModes2EXT( - m_device, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); - - return createResultValueType( static_cast( result ), modes ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createHeadlessSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_buffer_device_address === - - template - VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast( pInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkDeviceAddress result = d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast( &info ) ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetBufferOpaqueCaptureAddressKHR( m_device, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t result = d.vkGetBufferOpaqueCaptureAddressKHR( m_device, reinterpret_cast( &info ) ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( m_device, reinterpret_cast( pInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t result = d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( m_device, reinterpret_cast( &info ) ); - - return result; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_line_rasterization === - - template - VULKAN_HPP_INLINE void - CommandBuffer::setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetLineStippleEXT( m_commandBuffer, lineStippleFactor, lineStipplePattern ); - } - - //=== VK_EXT_host_query_reset === - - template - VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkResetQueryPoolEXT( m_device, static_cast( queryPool ), firstQuery, queryCount ); - } - - //=== VK_EXT_extended_dynamic_state === - - template - VULKAN_HPP_INLINE void CommandBuffer::setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetCullModeEXT( m_commandBuffer, static_cast( cullMode ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetFrontFaceEXT( m_commandBuffer, static_cast( frontFace ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetPrimitiveTopologyEXT( m_commandBuffer, static_cast( primitiveTopology ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCountEXT( uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetViewportWithCountEXT( m_commandBuffer, viewportCount, reinterpret_cast( pViewports ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCountEXT( ArrayProxy const & viewports, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetViewportWithCountEXT( m_commandBuffer, viewports.size(), reinterpret_cast( viewports.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - CommandBuffer::setScissorWithCountEXT( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetScissorWithCountEXT( m_commandBuffer, scissorCount, reinterpret_cast( pScissors ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCountEXT( ArrayProxy const & scissors, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetScissorWithCountEXT( m_commandBuffer, scissors.size(), reinterpret_cast( scissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindVertexBuffers2EXT( m_commandBuffer, - firstBinding, - bindingCount, - reinterpret_cast( pBuffers ), - reinterpret_cast( pOffsets ), - reinterpret_cast( pSizes ), - reinterpret_cast( pStrides ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes, - ArrayProxy const & strides, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); - VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); - VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); -# else - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != sizes.size()" ); - } - if ( !strides.empty() && buffers.size() != strides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdBindVertexBuffers2EXT( m_commandBuffer, - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ), - reinterpret_cast( strides.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthTestEnableEXT( m_commandBuffer, static_cast( depthTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthWriteEnableEXT( m_commandBuffer, static_cast( depthWriteEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthCompareOpEXT( m_commandBuffer, static_cast( depthCompareOp ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBoundsTestEnableEXT( m_commandBuffer, static_cast( depthBoundsTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilTestEnableEXT( m_commandBuffer, static_cast( stencilTestEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetStencilOpEXT( m_commandBuffer, - static_cast( faceMask ), - static_cast( failOp ), - static_cast( passOp ), - static_cast( depthFailOp ), - static_cast( compareOp ) ); - } - - //=== VK_KHR_deferred_host_operations === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDeferredOperationKHR( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DeferredOperationKHR * pDeferredOperation, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDeferredOperationKHR( - m_device, reinterpret_cast( pAllocator ), reinterpret_cast( pDeferredOperation ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createDeferredOperationKHR( Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; - VkResult result = d.vkCreateDeferredOperationKHR( - m_device, - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &deferredOperation ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHR" ); - - return createResultValueType( static_cast( result ), deferredOperation ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createDeferredOperationKHRUnique( Optional allocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; - VkResult result = d.vkCreateDeferredOperationKHR( - m_device, - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &deferredOperation ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHRUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( deferredOperation, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDeferredOperationKHR( - m_device, static_cast( operation ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDeferredOperationKHR( - m_device, - static_cast( operation ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyDeferredOperationKHR( - m_device, static_cast( operation ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyDeferredOperationKHR( - m_device, - static_cast( operation ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast( operation ) ); - } - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDeferredOperationResultKHR( m_device, static_cast( operation ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkGetDeferredOperationResultKHR( m_device, static_cast( operation ) ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkDeferredOperationJoinKHR( m_device, static_cast( operation ) ) ); - } -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkDeferredOperationJoinKHR( m_device, static_cast( operation ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::deferredOperationJoinKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); - - return static_cast( result ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_pipeline_executable_properties === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR * pPipelineInfo, - uint32_t * pExecutableCount, - VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPipelineExecutablePropertiesKHR( m_device, - reinterpret_cast( pPipelineInfo ), - pExecutableCount, - reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t executableCount; - VkResult result; - do - { - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) - { - properties.resize( executableCount ); - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); - if ( executableCount < properties.size() ) - { - properties.resize( executableCount ); - } - return createResultValueType( static_cast( result ), properties ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, - PipelineExecutablePropertiesKHRAllocator & pipelineExecutablePropertiesKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( - pipelineExecutablePropertiesKHRAllocator ); - uint32_t executableCount; - VkResult result; - do - { - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) - { - properties.resize( executableCount ); - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); - if ( executableCount < properties.size() ) - { - properties.resize( executableCount ); - } - return createResultValueType( static_cast( result ), properties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pStatisticCount, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR * pStatistics, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPipelineExecutableStatisticsKHR( m_device, - reinterpret_cast( pExecutableInfo ), - pStatisticCount, - reinterpret_cast( pStatistics ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector statistics; - uint32_t statisticCount; - VkResult result; - do - { - result = - d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) - { - statistics.resize( statisticCount ); - result = d.vkGetPipelineExecutableStatisticsKHR( m_device, - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); - if ( statisticCount < statistics.size() ) - { - statistics.resize( statisticCount ); - } - return createResultValueType( static_cast( result ), statistics ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE - typename ResultValueType>::type - Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - PipelineExecutableStatisticKHRAllocator & pipelineExecutableStatisticKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector statistics( - pipelineExecutableStatisticKHRAllocator ); - uint32_t statisticCount; - VkResult result; - do - { - result = - d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) - { - statistics.resize( statisticCount ); - result = d.vkGetPipelineExecutableStatisticsKHR( m_device, - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); - if ( statisticCount < statistics.size() ) - { - statistics.resize( statisticCount ); - } - return createResultValueType( static_cast( result ), statistics ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pInternalRepresentationCount, - VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR * pInternalRepresentations, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, - reinterpret_cast( pExecutableInfo ), - pInternalRepresentationCount, - reinterpret_cast( pInternalRepresentations ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< - std::vector>::type - Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector - internalRepresentations; - uint32_t internalRepresentationCount; - VkResult result; - do - { - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) - { - internalRepresentations.resize( internalRepresentationCount ); - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, - reinterpret_cast( &executableInfo ), - &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); - if ( internalRepresentationCount < internalRepresentations.size() ) - { - internalRepresentations.resize( internalRepresentationCount ); - } - return createResultValueType( static_cast( result ), internalRepresentations ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< - std::vector>::type - Device::getPipelineExecutableInternalRepresentationsKHR( - const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - PipelineExecutableInternalRepresentationKHRAllocator & pipelineExecutableInternalRepresentationKHRAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector - internalRepresentations( pipelineExecutableInternalRepresentationKHRAllocator ); - uint32_t internalRepresentationCount; - VkResult result; - do - { - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) - { - internalRepresentations.resize( internalRepresentationCount ); - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, - reinterpret_cast( &executableInfo ), - &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); - if ( internalRepresentationCount < internalRepresentations.size() ) - { - internalRepresentations.resize( internalRepresentationCount ); - } - return createResultValueType( static_cast( result ), internalRepresentations ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_device_generated_commands === - - template - VULKAN_HPP_INLINE void Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetGeneratedCommandsMemoryRequirementsNV( m_device, - reinterpret_cast( pInfo ), - reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetGeneratedCommandsMemoryRequirementsNV( m_device, - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetGeneratedCommandsMemoryRequirementsNV( m_device, - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPreprocessGeneratedCommandsNV( m_commandBuffer, reinterpret_cast( pGeneratedCommandsInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPreprocessGeneratedCommandsNV( m_commandBuffer, reinterpret_cast( &generatedCommandsInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdExecuteGeneratedCommandsNV( - m_commandBuffer, static_cast( isPreprocessed ), reinterpret_cast( pGeneratedCommandsInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdExecuteGeneratedCommandsNV( - m_commandBuffer, static_cast( isPreprocessed ), reinterpret_cast( &generatedCommandsInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t groupIndex, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindPipelineShaderGroupNV( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ), groupIndex ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV * pIndirectCommandsLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateIndirectCommandsLayoutNV( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pIndirectCommandsLayout ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; - VkResult result = d.vkCreateIndirectCommandsLayoutNV( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &indirectCommandsLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNV" ); - - return createResultValueType( static_cast( result ), indirectCommandsLayout ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createIndirectCommandsLayoutNVUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; - VkResult result = d.vkCreateIndirectCommandsLayoutNV( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &indirectCommandsLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNVUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( - indirectCommandsLayout, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyIndirectCommandsLayoutNV( - m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyIndirectCommandsLayoutNV( - m_device, - static_cast( indirectCommandsLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyIndirectCommandsLayoutNV( - m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyIndirectCommandsLayoutNV( - m_device, - static_cast( indirectCommandsLayout ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_acquire_drm_display === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, - VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast( display ) ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, - uint32_t connectorId, - VULKAN_HPP_NAMESPACE::DisplayKHR * display, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( display ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXT" ); - - return createResultValueType( static_cast( result ), display ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getDrmDisplayEXTUnique( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXTUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( display, ObjectRelease( *this, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_private_data === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreatePrivateDataSlotEXT( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPrivateDataSlot ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = d.vkCreatePrivateDataSlotEXT( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXT" ); - - return createResultValueType( static_cast( result ), privateDataSlot ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createPrivateDataSlotEXTUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = d.vkCreatePrivateDataSlotEXT( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyPrivateDataSlotEXT( m_device, static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyPrivateDataSlotEXT( - m_device, - static_cast( privateDataSlot ), - reinterpret_cast( static_cast( allocator ) ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkSetPrivateDataEXT( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), data ) ); - } -#else - template - VULKAN_HPP_INLINE typename ResultValueType::type Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = - d.vkSetPrivateDataEXT( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetPrivateDataEXT( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), pData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - uint64_t data; - d.vkGetPrivateDataEXT( m_device, static_cast( objectType ), objectHandle, static_cast( privateDataSlot ), &data ); - - return data; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - template - VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR * pEncodeInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdEncodeVideoKHR( m_commandBuffer, reinterpret_cast( pEncodeInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdEncodeVideoKHR( m_commandBuffer, reinterpret_cast( &encodeInfo ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - template - VULKAN_HPP_INLINE void Device::exportMetalObjectsEXT( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT * pMetalObjectsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkExportMetalObjectsEXT( m_device, reinterpret_cast( pMetalObjectsInfo ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT - Device::exportMetalObjectsEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT metalObjectsInfo; - d.vkExportMetalObjectsEXT( m_device, reinterpret_cast( &metalObjectsInfo ) ); - - return metalObjectsInfo; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain Device::exportMetalObjectsEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT & metalObjectsInfo = structureChain.template get(); - d.vkExportMetalObjectsEXT( m_device, reinterpret_cast( &metalObjectsInfo ) ); - - return structureChain; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - - template - VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetEvent2KHR( m_commandBuffer, static_cast( event ), reinterpret_cast( pDependencyInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetEvent2KHR( m_commandBuffer, static_cast( event ), reinterpret_cast( &dependencyInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResetEvent2KHR( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWaitEvents2KHR( - m_commandBuffer, eventCount, reinterpret_cast( pEvents ), reinterpret_cast( pDependencyInfos ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( ArrayProxy const & events, - ArrayProxy const & dependencyInfos, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); -# else - if ( events.size() != dependencyInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - - d.vkCmdWaitEvents2KHR( m_commandBuffer, - events.size(), - reinterpret_cast( events.data() ), - reinterpret_cast( dependencyInfos.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdPipelineBarrier2KHR( m_commandBuffer, reinterpret_cast( pDependencyInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdPipelineBarrier2KHR( m_commandBuffer, reinterpret_cast( &dependencyInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteTimestamp2KHR( m_commandBuffer, static_cast( stage ), static_cast( queryPool ), query ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit2KHR( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkQueueSubmit2KHR( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Queue::submit2KHR( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); - - return createResultValueType( static_cast( result ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdWriteBufferMarker2AMD( - m_commandBuffer, static_cast( stage ), static_cast( dstBuffer ), static_cast( dstOffset ), marker ); - } - - template - VULKAN_HPP_INLINE void Queue::getCheckpointData2NV( uint32_t * pCheckpointDataCount, - VULKAN_HPP_NAMESPACE::CheckpointData2NV * pCheckpointData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetQueueCheckpointData2NV( m_queue, pCheckpointDataCount, reinterpret_cast( pCheckpointData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Queue::getCheckpointData2NV( Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector checkpointData; - uint32_t checkpointDataCount; - d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Queue::getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector checkpointData( checkpointData2NVAllocator ); - uint32_t checkpointDataCount; - d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_fragment_shading_rate_enums === - - template - VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetFragmentShadingRateEnumNV( - m_commandBuffer, static_cast( shadingRate ), reinterpret_cast( combinerOps ) ); - } - - //=== VK_EXT_mesh_shader === - - template - VULKAN_HPP_INLINE void - CommandBuffer::drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksEXT( m_commandBuffer, groupCountX, groupCountY, groupCountZ ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksIndirectEXT( m_commandBuffer, static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMeshTasksIndirectCountEXT( m_commandBuffer, - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_KHR_copy_commands2 === - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBuffer2KHR( m_commandBuffer, reinterpret_cast( pCopyBufferInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBuffer2KHR( m_commandBuffer, reinterpret_cast( ©BufferInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImage2KHR( m_commandBuffer, reinterpret_cast( pCopyImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImage2KHR( m_commandBuffer, reinterpret_cast( ©ImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyBufferToImage2KHR( m_commandBuffer, reinterpret_cast( pCopyBufferToImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyBufferToImage2KHR( m_commandBuffer, reinterpret_cast( ©BufferToImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdCopyImageToBuffer2KHR( m_commandBuffer, reinterpret_cast( pCopyImageToBufferInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdCopyImageToBuffer2KHR( m_commandBuffer, reinterpret_cast( ©ImageToBufferInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBlitImage2KHR( m_commandBuffer, reinterpret_cast( pBlitImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdBlitImage2KHR( m_commandBuffer, reinterpret_cast( &blitImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdResolveImage2KHR( m_commandBuffer, reinterpret_cast( pResolveImageInfo ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdResolveImage2KHR( m_commandBuffer, reinterpret_cast( &resolveImageInfo ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_image_compression_control === - - template - VULKAN_HPP_INLINE void Device::getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT * pSubresource, - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT * pLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetImageSubresourceLayout2EXT( m_device, - static_cast( image ), - reinterpret_cast( pSubresource ), - reinterpret_cast( pLayout ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT Device::getImageSubresourceLayout2EXT( - VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT layout; - d.vkGetImageSubresourceLayout2EXT( m_device, - static_cast( image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return layout; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain Device::getImageSubresourceLayout2EXT( - VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT & layout = structureChain.template get(); - d.vkGetImageSubresourceLayout2EXT( m_device, - static_cast( image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast( display ) ) ); - } -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireWinrtDisplayNV" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( pDisplay ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNV" ); - - return createResultValueType( static_cast( result ), display ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - PhysicalDevice::getWinrtDisplayNVUnique( uint32_t deviceRelativeId, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNVUnique" ); - - return createResultValueType( static_cast( result ), - UniqueHandle( display, ObjectRelease( *this, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateDirectFBSurfaceEXT( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDirectFBSurfaceEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXT" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createDirectFBSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDirectFBSurfaceEXT( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXTUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, - IDirectFB * dfb, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( m_physicalDevice, queueFamilyIndex, dfb ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkBool32 result = d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( m_physicalDevice, queueFamilyIndex, &dfb ); - - return static_cast( result ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdTraceRaysKHR( m_commandBuffer, - reinterpret_cast( pRaygenShaderBindingTable ), - reinterpret_cast( pMissShaderBindingTable ), - reinterpret_cast( pHitShaderBindingTable ), - reinterpret_cast( pCallableShaderBindingTable ), - width, - height, - depth ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdTraceRaysKHR( m_commandBuffer, - reinterpret_cast( &raygenShaderBindingTable ), - reinterpret_cast( &missShaderBindingTable ), - reinterpret_cast( &hitShaderBindingTable ), - reinterpret_cast( &callableShaderBindingTable ), - width, - height, - depth ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - createInfoCount, - reinterpret_cast( pCreateInfos ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pPipelines ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( static_cast( result ), pipelines ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue - Device::createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue( static_cast( result ), pipeline ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines; - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template >::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> - Device::createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); - uniquePipelines.reserve( createInfos.size() ); - ObjectDestroy deleter( *this, allocator, d ); - for ( auto const & pipeline : pipelines ) - { - uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); - } - return ResultValue, PipelineAllocator>>( - static_cast( result ), std::move( uniquePipelines ) ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> - Device::createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesKHR( - m_device, - static_cast( deferredOperation ), - static_cast( pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHRUnique", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); - - return ResultValue>( - static_cast( result ), - UniqueHandle( pipeline, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetRayTracingShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getRayTracingShaderGroupHandlesKHR( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesKHR" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getRayTracingShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkGetRayTracingShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleKHR" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getRayTracingCaptureReplayShaderGroupHandlesKHR( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); - - return createResultValueType( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getRayTracingCaptureReplayShaderGroupHandleKHR( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - DataType data; - VkResult result = d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandleKHR" ); - - return createResultValueType( static_cast( result ), data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdTraceRaysIndirectKHR( m_commandBuffer, - reinterpret_cast( pRaygenShaderBindingTable ), - reinterpret_cast( pMissShaderBindingTable ), - reinterpret_cast( pHitShaderBindingTable ), - reinterpret_cast( pCallableShaderBindingTable ), - static_cast( indirectDeviceAddress ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdTraceRaysIndirectKHR( m_commandBuffer, - reinterpret_cast( &raygenShaderBindingTable ), - reinterpret_cast( &missShaderBindingTable ), - reinterpret_cast( &hitShaderBindingTable ), - reinterpret_cast( &callableShaderBindingTable ), - static_cast( indirectDeviceAddress ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE DeviceSize Device::getRayTracingShaderGroupStackSizeKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t group, - VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetRayTracingShaderGroupStackSizeKHR( m_device, static_cast( pipeline ), group, static_cast( groupShader ) ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetRayTracingPipelineStackSizeKHR( m_commandBuffer, pipelineStackSize ); - } - - //=== VK_EXT_vertex_input_dynamic_state === - - template - VULKAN_HPP_INLINE void CommandBuffer::setVertexInputEXT( uint32_t vertexBindingDescriptionCount, - const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT * pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT * pVertexAttributeDescriptions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetVertexInputEXT( m_commandBuffer, - vertexBindingDescriptionCount, - reinterpret_cast( pVertexBindingDescriptions ), - vertexAttributeDescriptionCount, - reinterpret_cast( pVertexAttributeDescriptions ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void - CommandBuffer::setVertexInputEXT( ArrayProxy const & vertexBindingDescriptions, - ArrayProxy const & vertexAttributeDescriptions, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetVertexInputEXT( m_commandBuffer, - vertexBindingDescriptions.size(), - reinterpret_cast( vertexBindingDescriptions.data() ), - vertexAttributeDescriptions.size(), - reinterpret_cast( vertexAttributeDescriptions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetMemoryZirconHandleFUCHSIA( m_device, reinterpret_cast( pGetZirconHandleInfo ), pZirconHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - zx_handle_t zirconHandle; - VkResult result = - d.vkGetMemoryZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); - - return createResultValueType( static_cast( result ), zirconHandle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetMemoryZirconHandlePropertiesFUCHSIA( m_device, - static_cast( handleType ), - zirconHandle, - reinterpret_cast( pMemoryZirconHandleProperties ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; - VkResult result = d.vkGetMemoryZirconHandlePropertiesFUCHSIA( m_device, - static_cast( handleType ), - zirconHandle, - reinterpret_cast( &memoryZirconHandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); - - return createResultValueType( static_cast( result ), memoryZirconHandleProperties ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreZirconHandleFUCHSIA( - const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkImportSemaphoreZirconHandleFUCHSIA( - m_device, reinterpret_cast( pImportSemaphoreZirconHandleInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkImportSemaphoreZirconHandleFUCHSIA( - m_device, reinterpret_cast( &importSemaphoreZirconHandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( - d.vkGetSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( pGetZirconHandleInfo ), pZirconHandle ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - zx_handle_t zirconHandle; - VkResult result = - d.vkGetSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); - - return createResultValueType( static_cast( result ), zirconHandle ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA * pCollection, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateBufferCollectionFUCHSIA( m_device, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pCollection ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; - VkResult result = d.vkCreateBufferCollectionFUCHSIA( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &collection ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIA" ); - - return createResultValueType( static_cast( result ), collection ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::createBufferCollectionFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; - VkResult result = d.vkCreateBufferCollectionFUCHSIA( - m_device, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &collection ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIAUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( collection, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA * pImageConstraintsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSetBufferCollectionImageConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( pImageConstraintsInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSetBufferCollectionImageConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &imageConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionImageConstraintsFUCHSIA" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkSetBufferCollectionBufferConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( pBufferConstraintsInfo ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Device::setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkResult result = d.vkSetBufferCollectionBufferConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &bufferConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionBufferConstraintsFUCHSIA" ); - - return createResultValueType( static_cast( result ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBufferCollectionFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBufferCollectionFUCHSIA( - m_device, - static_cast( collection ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkDestroyBufferCollectionFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( pAllocator ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - Optional allocator, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkDestroyBufferCollectionFUCHSIA( - m_device, - static_cast( collection ), - reinterpret_cast( static_cast( allocator ) ) ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetBufferCollectionPropertiesFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( pProperties ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; - VkResult result = d.vkGetBufferCollectionPropertiesFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferCollectionPropertiesFUCHSIA" ); - - return createResultValueType( static_cast( result ), properties ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, - VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - m_device, static_cast( renderpass ), reinterpret_cast( pMaxWorkgroupSize ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue - Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; - VkResult result = d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - m_device, static_cast( renderpass ), reinterpret_cast( &maxWorkgroupSize ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getSubpassShadingMaxWorkgroupSizeHUAWEI", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); - - return ResultValue( static_cast( result ), maxWorkgroupSize ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSubpassShadingHUAWEI( m_commandBuffer ); - } - - //=== VK_HUAWEI_invocation_mask === - - template - VULKAN_HPP_INLINE void CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdBindInvocationMaskHUAWEI( m_commandBuffer, static_cast( imageView ), static_cast( imageLayout ) ); - } - - //=== VK_NV_external_memory_rdma === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, - VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetMemoryRemoteAddressNV( - m_device, reinterpret_cast( pMemoryGetRemoteAddressInfo ), reinterpret_cast( pAddress ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::RemoteAddressNV address; - VkResult result = d.vkGetMemoryRemoteAddressNV( - m_device, reinterpret_cast( &memoryGetRemoteAddressInfo ), reinterpret_cast( &address ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); - - return createResultValueType( static_cast( result ), address ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_pipeline_properties === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT * pPipelineInfo, - VULKAN_HPP_NAMESPACE::BaseOutStructure * pPipelineProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPipelinePropertiesEXT( - m_device, reinterpret_cast( pPipelineInfo ), reinterpret_cast( pPipelineProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; - VkResult result = d.vkGetPipelinePropertiesEXT( - m_device, reinterpret_cast( &pipelineInfo ), reinterpret_cast( &pipelineProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); - - return createResultValueType( static_cast( result ), pipelineProperties ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_extended_dynamic_state2 === - - template - VULKAN_HPP_INLINE void CommandBuffer::setPatchControlPointsEXT( uint32_t patchControlPoints, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetPatchControlPointsEXT( m_commandBuffer, patchControlPoints ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetRasterizerDiscardEnableEXT( m_commandBuffer, static_cast( rasterizerDiscardEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetDepthBiasEnableEXT( m_commandBuffer, static_cast( depthBiasEnable ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetLogicOpEXT( m_commandBuffer, static_cast( logicOp ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetPrimitiveRestartEnableEXT( m_commandBuffer, static_cast( primitiveRestartEnable ) ); - } - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkCreateScreenSurfaceQNX( m_instance, - reinterpret_cast( pCreateInfo ), - reinterpret_cast( pAllocator ), - reinterpret_cast( pSurface ) ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateScreenSurfaceQNX( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNX" ); - - return createResultValueType( static_cast( result ), surface ); - } - -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createScreenSurfaceQNXUnique( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, - Optional allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateScreenSurfaceQNX( - m_instance, - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNXUnique" ); - - return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); - } -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, - struct _screen_window * window, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetPhysicalDeviceScreenPresentationSupportQNX( m_physicalDevice, queueFamilyIndex, window ) ); - } - -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VkBool32 result = d.vkGetPhysicalDeviceScreenPresentationSupportQNX( m_physicalDevice, queueFamilyIndex, &window ); - - return static_cast( result ); - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - - template - VULKAN_HPP_INLINE void CommandBuffer::setColorWriteEnableEXT( uint32_t attachmentCount, - const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdSetColorWriteEnableEXT( m_commandBuffer, attachmentCount, reinterpret_cast( pColorWriteEnables ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::setColorWriteEnableEXT( ArrayProxy const & colorWriteEnables, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdSetColorWriteEnableEXT( m_commandBuffer, colorWriteEnables.size(), reinterpret_cast( colorWriteEnables.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_ray_tracing_maintenance1 === - - template - VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdTraceRaysIndirect2KHR( m_commandBuffer, static_cast( indirectDeviceAddress ) ); - } - - //=== VK_EXT_multi_draw === - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( uint32_t drawCount, - const VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT * pVertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMultiEXT( m_commandBuffer, drawCount, reinterpret_cast( pVertexInfo ), instanceCount, firstInstance, stride ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( ArrayProxy const & vertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdDrawMultiEXT( - m_commandBuffer, vertexInfo.size(), reinterpret_cast( vertexInfo.data() ), instanceCount, firstInstance, stride ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( uint32_t drawCount, - const VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT * pIndexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - const int32_t * pVertexOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkCmdDrawMultiIndexedEXT( - m_commandBuffer, drawCount, reinterpret_cast( pIndexInfo ), instanceCount, firstInstance, stride, pVertexOffset ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( ArrayProxy const & indexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Optional vertexOffset, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - d.vkCmdDrawMultiIndexedEXT( m_commandBuffer, - indexInfo.size(), - reinterpret_cast( indexInfo.data() ), - instanceCount, - firstInstance, - stride, - static_cast( vertexOffset ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_pageable_device_local_memory === - - template - VULKAN_HPP_INLINE void Device::setMemoryPriorityEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory, float priority, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkSetDeviceMemoryPriorityEXT( m_device, static_cast( memory ), priority ); - } - - //=== VK_KHR_maintenance4 === - - template - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceBufferMemoryRequirementsKHR( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetDeviceBufferMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetDeviceBufferMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceImageMemoryRequirementsKHR( - m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - d.vkGetDeviceImageMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - d.vkGetDeviceImageMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, - reinterpret_cast( pInfo ), - pSparseMemoryRequirementCount, - reinterpret_cast( pSparseMemoryRequirements ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - d.vkGetDeviceImageSparseMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector sparseMemoryRequirements( - sparseImageMemoryRequirements2Allocator ); - uint32_t sparseMemoryRequirementCount; - d.vkGetDeviceImageSparseMemoryRequirementsKHR( - m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VALVE_descriptor_set_host_mapping === - - template - VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE * pBindingReference, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE * pHostMapping, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDescriptorSetLayoutHostMappingInfoVALVE( m_device, - reinterpret_cast( pBindingReference ), - reinterpret_cast( pHostMapping ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE - Device::getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE hostMapping; - d.vkGetDescriptorSetLayoutHostMappingInfoVALVE( m_device, - reinterpret_cast( &bindingReference ), - reinterpret_cast( &hostMapping ) ); - - return hostMapping; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void - Device::getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, void ** ppData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetDescriptorSetHostMappingVALVE( m_device, static_cast( descriptorSet ), ppData ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * Device::getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - void * pData; - d.vkGetDescriptorSetHostMappingVALVE( m_device, static_cast( descriptorSet ), &pData ); - - return pData; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_shader_module_identifier === - - template - VULKAN_HPP_INLINE void Device::getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetShaderModuleIdentifierEXT( m_device, static_cast( shaderModule ), reinterpret_cast( pIdentifier ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - Device::getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; - d.vkGetShaderModuleIdentifierEXT( m_device, static_cast( shaderModule ), reinterpret_cast( &identifier ) ); - - return identifier; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE void Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - d.vkGetShaderModuleCreateInfoIdentifierEXT( - m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pIdentifier ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; - d.vkGetShaderModuleCreateInfoIdentifierEXT( - m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &identifier ) ); - - return identifier; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_QCOM_tile_properties === - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - uint32_t * pPropertiesCount, - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetFramebufferTilePropertiesQCOM( - m_device, static_cast( framebuffer ), pPropertiesCount, reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties; - uint32_t propertiesCount; - VkResult result; - do - { - result = d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) - { - properties.resize( propertiesCount ); - result = d.vkGetFramebufferTilePropertiesQCOM( - m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - - VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); - if ( propertiesCount < properties.size() ) - { - properties.resize( propertiesCount ); - } - return properties; - } - - template ::value, int>::type> - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type - Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, - Dispatch const & d ) const - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - std::vector properties( tilePropertiesQCOMAllocator ); - uint32_t propertiesCount; - VkResult result; - do - { - result = d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) - { - properties.resize( propertiesCount ); - result = d.vkGetFramebufferTilePropertiesQCOM( - m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - - VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); - if ( propertiesCount < properties.size() ) - { - properties.resize( propertiesCount ); - } - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_INLINE Result Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, - Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - return static_cast( d.vkGetDynamicRenderingTilePropertiesQCOM( - m_device, reinterpret_cast( pRenderingInfo ), reinterpret_cast( pProperties ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::TilePropertiesQCOM - Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM properties; - d.vkGetDynamicRenderingTilePropertiesQCOM( - m_device, reinterpret_cast( &renderingInfo ), reinterpret_cast( &properties ) ); - - return properties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_handles.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_handles.hpp deleted file mode 100644 index f56db03..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_handles.hpp +++ /dev/null @@ -1,13585 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_HANDLES_HPP -#define VULKAN_HANDLES_HPP - -namespace VULKAN_HPP_NAMESPACE -{ - //=================================== - //=== STRUCT forward declarations === - //=================================== - - //=== VK_VERSION_1_0 === - struct Extent2D; - struct Extent3D; - struct Offset2D; - struct Offset3D; - struct Rect2D; - struct BaseInStructure; - struct BaseOutStructure; - struct BufferMemoryBarrier; - struct DispatchIndirectCommand; - struct DrawIndexedIndirectCommand; - struct DrawIndirectCommand; - struct ImageMemoryBarrier; - struct MemoryBarrier; - struct PipelineCacheHeaderVersionOne; - struct AllocationCallbacks; - struct ApplicationInfo; - struct FormatProperties; - struct ImageFormatProperties; - struct InstanceCreateInfo; - struct MemoryHeap; - struct MemoryType; - struct PhysicalDeviceFeatures; - struct PhysicalDeviceLimits; - struct PhysicalDeviceMemoryProperties; - struct PhysicalDeviceProperties; - struct PhysicalDeviceSparseProperties; - struct QueueFamilyProperties; - struct DeviceCreateInfo; - struct DeviceQueueCreateInfo; - struct ExtensionProperties; - struct LayerProperties; - struct SubmitInfo; - struct MappedMemoryRange; - struct MemoryAllocateInfo; - struct MemoryRequirements; - struct BindSparseInfo; - struct ImageSubresource; - struct SparseBufferMemoryBindInfo; - struct SparseImageFormatProperties; - struct SparseImageMemoryBind; - struct SparseImageMemoryBindInfo; - struct SparseImageMemoryRequirements; - struct SparseImageOpaqueMemoryBindInfo; - struct SparseMemoryBind; - struct FenceCreateInfo; - struct SemaphoreCreateInfo; - struct EventCreateInfo; - struct QueryPoolCreateInfo; - struct BufferCreateInfo; - struct BufferViewCreateInfo; - struct ImageCreateInfo; - struct SubresourceLayout; - struct ComponentMapping; - struct ImageSubresourceRange; - struct ImageViewCreateInfo; - struct ShaderModuleCreateInfo; - struct PipelineCacheCreateInfo; - struct ComputePipelineCreateInfo; - struct GraphicsPipelineCreateInfo; - struct PipelineColorBlendAttachmentState; - struct PipelineColorBlendStateCreateInfo; - struct PipelineDepthStencilStateCreateInfo; - struct PipelineDynamicStateCreateInfo; - struct PipelineInputAssemblyStateCreateInfo; - struct PipelineMultisampleStateCreateInfo; - struct PipelineRasterizationStateCreateInfo; - struct PipelineShaderStageCreateInfo; - struct PipelineTessellationStateCreateInfo; - struct PipelineVertexInputStateCreateInfo; - struct PipelineViewportStateCreateInfo; - struct SpecializationInfo; - struct SpecializationMapEntry; - struct StencilOpState; - struct VertexInputAttributeDescription; - struct VertexInputBindingDescription; - struct Viewport; - struct PipelineLayoutCreateInfo; - struct PushConstantRange; - struct SamplerCreateInfo; - struct CopyDescriptorSet; - struct DescriptorBufferInfo; - struct DescriptorImageInfo; - struct DescriptorPoolCreateInfo; - struct DescriptorPoolSize; - struct DescriptorSetAllocateInfo; - struct DescriptorSetLayoutBinding; - struct DescriptorSetLayoutCreateInfo; - struct WriteDescriptorSet; - struct AttachmentDescription; - struct AttachmentReference; - struct FramebufferCreateInfo; - struct RenderPassCreateInfo; - struct SubpassDependency; - struct SubpassDescription; - struct CommandPoolCreateInfo; - struct CommandBufferAllocateInfo; - struct CommandBufferBeginInfo; - struct CommandBufferInheritanceInfo; - struct BufferCopy; - struct BufferImageCopy; - struct ClearAttachment; - union ClearColorValue; - struct ClearDepthStencilValue; - struct ClearRect; - union ClearValue; - struct ImageBlit; - struct ImageCopy; - struct ImageResolve; - struct ImageSubresourceLayers; - struct RenderPassBeginInfo; - - //=== VK_VERSION_1_1 === - struct PhysicalDeviceSubgroupProperties; - struct BindBufferMemoryInfo; - using BindBufferMemoryInfoKHR = BindBufferMemoryInfo; - struct BindImageMemoryInfo; - using BindImageMemoryInfoKHR = BindImageMemoryInfo; - struct PhysicalDevice16BitStorageFeatures; - using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; - struct MemoryDedicatedRequirements; - using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; - struct MemoryDedicatedAllocateInfo; - using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; - struct MemoryAllocateFlagsInfo; - using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; - struct DeviceGroupRenderPassBeginInfo; - using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; - struct DeviceGroupCommandBufferBeginInfo; - using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; - struct DeviceGroupSubmitInfo; - using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; - struct DeviceGroupBindSparseInfo; - using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; - struct BindBufferMemoryDeviceGroupInfo; - using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; - struct BindImageMemoryDeviceGroupInfo; - using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; - struct PhysicalDeviceGroupProperties; - using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; - struct DeviceGroupDeviceCreateInfo; - using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; - struct BufferMemoryRequirementsInfo2; - using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; - struct ImageMemoryRequirementsInfo2; - using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; - struct ImageSparseMemoryRequirementsInfo2; - using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; - struct MemoryRequirements2; - using MemoryRequirements2KHR = MemoryRequirements2; - struct SparseImageMemoryRequirements2; - using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; - struct PhysicalDeviceFeatures2; - using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; - struct PhysicalDeviceProperties2; - using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; - struct FormatProperties2; - using FormatProperties2KHR = FormatProperties2; - struct ImageFormatProperties2; - using ImageFormatProperties2KHR = ImageFormatProperties2; - struct PhysicalDeviceImageFormatInfo2; - using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; - struct QueueFamilyProperties2; - using QueueFamilyProperties2KHR = QueueFamilyProperties2; - struct PhysicalDeviceMemoryProperties2; - using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; - struct SparseImageFormatProperties2; - using SparseImageFormatProperties2KHR = SparseImageFormatProperties2; - struct PhysicalDeviceSparseImageFormatInfo2; - using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; - struct PhysicalDevicePointClippingProperties; - using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; - struct RenderPassInputAttachmentAspectCreateInfo; - using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; - struct InputAttachmentAspectReference; - using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; - struct ImageViewUsageCreateInfo; - using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; - struct PipelineTessellationDomainOriginStateCreateInfo; - using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; - struct RenderPassMultiviewCreateInfo; - using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; - struct PhysicalDeviceMultiviewFeatures; - using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; - struct PhysicalDeviceMultiviewProperties; - using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; - struct PhysicalDeviceVariablePointersFeatures; - using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; - using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - struct PhysicalDeviceProtectedMemoryFeatures; - struct PhysicalDeviceProtectedMemoryProperties; - struct DeviceQueueInfo2; - struct ProtectedSubmitInfo; - struct SamplerYcbcrConversionCreateInfo; - using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; - struct SamplerYcbcrConversionInfo; - using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; - struct BindImagePlaneMemoryInfo; - using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; - struct ImagePlaneMemoryRequirementsInfo; - using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; - struct PhysicalDeviceSamplerYcbcrConversionFeatures; - using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; - struct SamplerYcbcrConversionImageFormatProperties; - using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; - struct DescriptorUpdateTemplateEntry; - using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; - struct DescriptorUpdateTemplateCreateInfo; - using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; - struct ExternalMemoryProperties; - using ExternalMemoryPropertiesKHR = ExternalMemoryProperties; - struct PhysicalDeviceExternalImageFormatInfo; - using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; - struct ExternalImageFormatProperties; - using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; - struct PhysicalDeviceExternalBufferInfo; - using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; - struct ExternalBufferProperties; - using ExternalBufferPropertiesKHR = ExternalBufferProperties; - struct PhysicalDeviceIDProperties; - using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; - struct ExternalMemoryImageCreateInfo; - using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; - struct ExternalMemoryBufferCreateInfo; - using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; - struct ExportMemoryAllocateInfo; - using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; - struct PhysicalDeviceExternalFenceInfo; - using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; - struct ExternalFenceProperties; - using ExternalFencePropertiesKHR = ExternalFenceProperties; - struct ExportFenceCreateInfo; - using ExportFenceCreateInfoKHR = ExportFenceCreateInfo; - struct ExportSemaphoreCreateInfo; - using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; - struct PhysicalDeviceExternalSemaphoreInfo; - using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; - struct ExternalSemaphoreProperties; - using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; - struct PhysicalDeviceMaintenance3Properties; - using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; - struct DescriptorSetLayoutSupport; - using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; - struct PhysicalDeviceShaderDrawParametersFeatures; - using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; - - //=== VK_VERSION_1_2 === - struct PhysicalDeviceVulkan11Features; - struct PhysicalDeviceVulkan11Properties; - struct PhysicalDeviceVulkan12Features; - struct PhysicalDeviceVulkan12Properties; - struct ImageFormatListCreateInfo; - using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; - struct RenderPassCreateInfo2; - using RenderPassCreateInfo2KHR = RenderPassCreateInfo2; - struct AttachmentDescription2; - using AttachmentDescription2KHR = AttachmentDescription2; - struct AttachmentReference2; - using AttachmentReference2KHR = AttachmentReference2; - struct SubpassDescription2; - using SubpassDescription2KHR = SubpassDescription2; - struct SubpassDependency2; - using SubpassDependency2KHR = SubpassDependency2; - struct SubpassBeginInfo; - using SubpassBeginInfoKHR = SubpassBeginInfo; - struct SubpassEndInfo; - using SubpassEndInfoKHR = SubpassEndInfo; - struct PhysicalDevice8BitStorageFeatures; - using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; - struct ConformanceVersion; - using ConformanceVersionKHR = ConformanceVersion; - struct PhysicalDeviceDriverProperties; - using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; - struct PhysicalDeviceShaderAtomicInt64Features; - using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; - struct PhysicalDeviceShaderFloat16Int8Features; - using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - struct PhysicalDeviceFloatControlsProperties; - using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; - struct DescriptorSetLayoutBindingFlagsCreateInfo; - using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; - struct PhysicalDeviceDescriptorIndexingFeatures; - using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; - struct PhysicalDeviceDescriptorIndexingProperties; - using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; - struct DescriptorSetVariableDescriptorCountAllocateInfo; - using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; - struct DescriptorSetVariableDescriptorCountLayoutSupport; - using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; - struct SubpassDescriptionDepthStencilResolve; - using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; - struct PhysicalDeviceDepthStencilResolveProperties; - using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; - struct PhysicalDeviceScalarBlockLayoutFeatures; - using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; - struct ImageStencilUsageCreateInfo; - using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; - struct SamplerReductionModeCreateInfo; - using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; - struct PhysicalDeviceSamplerFilterMinmaxProperties; - using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; - struct PhysicalDeviceVulkanMemoryModelFeatures; - using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; - struct PhysicalDeviceImagelessFramebufferFeatures; - using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; - struct FramebufferAttachmentsCreateInfo; - using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; - struct FramebufferAttachmentImageInfo; - using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; - struct RenderPassAttachmentBeginInfo; - using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; - struct PhysicalDeviceUniformBufferStandardLayoutFeatures; - using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; - struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures; - using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; - struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures; - using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; - struct AttachmentReferenceStencilLayout; - using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; - struct AttachmentDescriptionStencilLayout; - using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; - struct PhysicalDeviceHostQueryResetFeatures; - using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; - struct PhysicalDeviceTimelineSemaphoreFeatures; - using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; - struct PhysicalDeviceTimelineSemaphoreProperties; - using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; - struct SemaphoreTypeCreateInfo; - using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; - struct TimelineSemaphoreSubmitInfo; - using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; - struct SemaphoreWaitInfo; - using SemaphoreWaitInfoKHR = SemaphoreWaitInfo; - struct SemaphoreSignalInfo; - using SemaphoreSignalInfoKHR = SemaphoreSignalInfo; - struct PhysicalDeviceBufferDeviceAddressFeatures; - using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; - struct BufferDeviceAddressInfo; - using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; - using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; - struct BufferOpaqueCaptureAddressCreateInfo; - using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; - struct MemoryOpaqueCaptureAddressAllocateInfo; - using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; - struct DeviceMemoryOpaqueCaptureAddressInfo; - using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; - - //=== VK_VERSION_1_3 === - struct PhysicalDeviceVulkan13Features; - struct PhysicalDeviceVulkan13Properties; - struct PipelineCreationFeedbackCreateInfo; - using PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; - struct PipelineCreationFeedback; - using PipelineCreationFeedbackEXT = PipelineCreationFeedback; - struct PhysicalDeviceShaderTerminateInvocationFeatures; - using PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; - struct PhysicalDeviceToolProperties; - using PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; - struct PhysicalDeviceShaderDemoteToHelperInvocationFeatures; - using PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; - struct PhysicalDevicePrivateDataFeatures; - using PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; - struct DevicePrivateDataCreateInfo; - using DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; - struct PrivateDataSlotCreateInfo; - using PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; - struct PhysicalDevicePipelineCreationCacheControlFeatures; - using PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; - struct MemoryBarrier2; - using MemoryBarrier2KHR = MemoryBarrier2; - struct BufferMemoryBarrier2; - using BufferMemoryBarrier2KHR = BufferMemoryBarrier2; - struct ImageMemoryBarrier2; - using ImageMemoryBarrier2KHR = ImageMemoryBarrier2; - struct DependencyInfo; - using DependencyInfoKHR = DependencyInfo; - struct SubmitInfo2; - using SubmitInfo2KHR = SubmitInfo2; - struct SemaphoreSubmitInfo; - using SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; - struct CommandBufferSubmitInfo; - using CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; - struct PhysicalDeviceSynchronization2Features; - using PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; - struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - using PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - struct PhysicalDeviceImageRobustnessFeatures; - using PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; - struct CopyBufferInfo2; - using CopyBufferInfo2KHR = CopyBufferInfo2; - struct CopyImageInfo2; - using CopyImageInfo2KHR = CopyImageInfo2; - struct CopyBufferToImageInfo2; - using CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; - struct CopyImageToBufferInfo2; - using CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; - struct BlitImageInfo2; - using BlitImageInfo2KHR = BlitImageInfo2; - struct ResolveImageInfo2; - using ResolveImageInfo2KHR = ResolveImageInfo2; - struct BufferCopy2; - using BufferCopy2KHR = BufferCopy2; - struct ImageCopy2; - using ImageCopy2KHR = ImageCopy2; - struct ImageBlit2; - using ImageBlit2KHR = ImageBlit2; - struct BufferImageCopy2; - using BufferImageCopy2KHR = BufferImageCopy2; - struct ImageResolve2; - using ImageResolve2KHR = ImageResolve2; - struct PhysicalDeviceSubgroupSizeControlFeatures; - using PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; - struct PhysicalDeviceSubgroupSizeControlProperties; - using PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; - struct PipelineShaderStageRequiredSubgroupSizeCreateInfo; - using PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; - struct PhysicalDeviceInlineUniformBlockFeatures; - using PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; - struct PhysicalDeviceInlineUniformBlockProperties; - using PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; - struct WriteDescriptorSetInlineUniformBlock; - using WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; - struct DescriptorPoolInlineUniformBlockCreateInfo; - using DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; - struct PhysicalDeviceTextureCompressionASTCHDRFeatures; - using PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; - struct RenderingInfo; - using RenderingInfoKHR = RenderingInfo; - struct RenderingAttachmentInfo; - using RenderingAttachmentInfoKHR = RenderingAttachmentInfo; - struct PipelineRenderingCreateInfo; - using PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; - struct PhysicalDeviceDynamicRenderingFeatures; - using PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; - struct CommandBufferInheritanceRenderingInfo; - using CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; - struct PhysicalDeviceShaderIntegerDotProductFeatures; - using PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; - struct PhysicalDeviceShaderIntegerDotProductProperties; - using PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; - struct PhysicalDeviceTexelBufferAlignmentProperties; - using PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; - struct FormatProperties3; - using FormatProperties3KHR = FormatProperties3; - struct PhysicalDeviceMaintenance4Features; - using PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; - struct PhysicalDeviceMaintenance4Properties; - using PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; - struct DeviceBufferMemoryRequirements; - using DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; - struct DeviceImageMemoryRequirements; - using DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; - - //=== VK_KHR_surface === - struct SurfaceCapabilitiesKHR; - struct SurfaceFormatKHR; - - //=== VK_KHR_swapchain === - struct SwapchainCreateInfoKHR; - struct PresentInfoKHR; - struct ImageSwapchainCreateInfoKHR; - struct BindImageMemorySwapchainInfoKHR; - struct AcquireNextImageInfoKHR; - struct DeviceGroupPresentCapabilitiesKHR; - struct DeviceGroupPresentInfoKHR; - struct DeviceGroupSwapchainCreateInfoKHR; - - //=== VK_KHR_display === - struct DisplayModeCreateInfoKHR; - struct DisplayModeParametersKHR; - struct DisplayModePropertiesKHR; - struct DisplayPlaneCapabilitiesKHR; - struct DisplayPlanePropertiesKHR; - struct DisplayPropertiesKHR; - struct DisplaySurfaceCreateInfoKHR; - - //=== VK_KHR_display_swapchain === - struct DisplayPresentInfoKHR; - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - struct XlibSurfaceCreateInfoKHR; -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - struct XcbSurfaceCreateInfoKHR; -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - struct WaylandSurfaceCreateInfoKHR; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - struct AndroidSurfaceCreateInfoKHR; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - struct Win32SurfaceCreateInfoKHR; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - struct DebugReportCallbackCreateInfoEXT; - - //=== VK_AMD_rasterization_order === - struct PipelineRasterizationStateRasterizationOrderAMD; - - //=== VK_EXT_debug_marker === - struct DebugMarkerObjectNameInfoEXT; - struct DebugMarkerObjectTagInfoEXT; - struct DebugMarkerMarkerInfoEXT; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - struct QueueFamilyQueryResultStatusPropertiesKHR; - struct QueueFamilyVideoPropertiesKHR; - struct VideoProfileInfoKHR; - struct VideoProfileListInfoKHR; - struct VideoCapabilitiesKHR; - struct PhysicalDeviceVideoFormatInfoKHR; - struct VideoFormatPropertiesKHR; - struct VideoPictureResourceInfoKHR; - struct VideoReferenceSlotInfoKHR; - struct VideoSessionMemoryRequirementsKHR; - struct BindVideoSessionMemoryInfoKHR; - struct VideoSessionCreateInfoKHR; - struct VideoSessionParametersCreateInfoKHR; - struct VideoSessionParametersUpdateInfoKHR; - struct VideoBeginCodingInfoKHR; - struct VideoEndCodingInfoKHR; - struct VideoCodingControlInfoKHR; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - struct VideoDecodeCapabilitiesKHR; - struct VideoDecodeUsageInfoKHR; - struct VideoDecodeInfoKHR; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_dedicated_allocation === - struct DedicatedAllocationImageCreateInfoNV; - struct DedicatedAllocationBufferCreateInfoNV; - struct DedicatedAllocationMemoryAllocateInfoNV; - - //=== VK_EXT_transform_feedback === - struct PhysicalDeviceTransformFeedbackFeaturesEXT; - struct PhysicalDeviceTransformFeedbackPropertiesEXT; - struct PipelineRasterizationStateStreamCreateInfoEXT; - - //=== VK_NVX_binary_import === - struct CuModuleCreateInfoNVX; - struct CuFunctionCreateInfoNVX; - struct CuLaunchInfoNVX; - - //=== VK_NVX_image_view_handle === - struct ImageViewHandleInfoNVX; - struct ImageViewAddressPropertiesNVX; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - struct VideoEncodeH264CapabilitiesEXT; - struct VideoEncodeH264SessionParametersCreateInfoEXT; - struct VideoEncodeH264SessionParametersAddInfoEXT; - struct VideoEncodeH264VclFrameInfoEXT; - struct VideoEncodeH264ReferenceListsInfoEXT; - struct VideoEncodeH264EmitPictureParametersInfoEXT; - struct VideoEncodeH264DpbSlotInfoEXT; - struct VideoEncodeH264NaluSliceInfoEXT; - struct VideoEncodeH264ProfileInfoEXT; - struct VideoEncodeH264RateControlInfoEXT; - struct VideoEncodeH264RateControlLayerInfoEXT; - struct VideoEncodeH264QpEXT; - struct VideoEncodeH264FrameSizeEXT; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - struct VideoEncodeH265CapabilitiesEXT; - struct VideoEncodeH265SessionParametersCreateInfoEXT; - struct VideoEncodeH265SessionParametersAddInfoEXT; - struct VideoEncodeH265VclFrameInfoEXT; - struct VideoEncodeH265EmitPictureParametersInfoEXT; - struct VideoEncodeH265DpbSlotInfoEXT; - struct VideoEncodeH265NaluSliceSegmentInfoEXT; - struct VideoEncodeH265ProfileInfoEXT; - struct VideoEncodeH265ReferenceListsInfoEXT; - struct VideoEncodeH265RateControlInfoEXT; - struct VideoEncodeH265RateControlLayerInfoEXT; - struct VideoEncodeH265QpEXT; - struct VideoEncodeH265FrameSizeEXT; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - struct VideoDecodeH264ProfileInfoEXT; - struct VideoDecodeH264CapabilitiesEXT; - struct VideoDecodeH264SessionParametersCreateInfoEXT; - struct VideoDecodeH264SessionParametersAddInfoEXT; - struct VideoDecodeH264PictureInfoEXT; - struct VideoDecodeH264MvcInfoEXT; - struct VideoDecodeH264DpbSlotInfoEXT; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_AMD_texture_gather_bias_lod === - struct TextureLODGatherFormatPropertiesAMD; - - //=== VK_AMD_shader_info === - struct ShaderResourceUsageAMD; - struct ShaderStatisticsInfoAMD; - - //=== VK_KHR_dynamic_rendering === - struct RenderingFragmentShadingRateAttachmentInfoKHR; - struct RenderingFragmentDensityMapAttachmentInfoEXT; - struct AttachmentSampleCountInfoAMD; - using AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; - struct MultiviewPerViewAttributesInfoNVX; - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - struct StreamDescriptorSurfaceCreateInfoGGP; -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_corner_sampled_image === - struct PhysicalDeviceCornerSampledImageFeaturesNV; - - //=== VK_NV_external_memory_capabilities === - struct ExternalImageFormatPropertiesNV; - - //=== VK_NV_external_memory === - struct ExternalMemoryImageCreateInfoNV; - struct ExportMemoryAllocateInfoNV; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - struct ImportMemoryWin32HandleInfoNV; - struct ExportMemoryWin32HandleInfoNV; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_win32_keyed_mutex === - struct Win32KeyedMutexAcquireReleaseInfoNV; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_validation_flags === - struct ValidationFlagsEXT; - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - struct ViSurfaceCreateInfoNN; -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_EXT_astc_decode_mode === - struct ImageViewASTCDecodeModeEXT; - struct PhysicalDeviceASTCDecodeFeaturesEXT; - - //=== VK_EXT_pipeline_robustness === - struct PhysicalDevicePipelineRobustnessFeaturesEXT; - struct PhysicalDevicePipelineRobustnessPropertiesEXT; - struct PipelineRobustnessCreateInfoEXT; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - struct ImportMemoryWin32HandleInfoKHR; - struct ExportMemoryWin32HandleInfoKHR; - struct MemoryWin32HandlePropertiesKHR; - struct MemoryGetWin32HandleInfoKHR; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - struct ImportMemoryFdInfoKHR; - struct MemoryFdPropertiesKHR; - struct MemoryGetFdInfoKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_keyed_mutex === - struct Win32KeyedMutexAcquireReleaseInfoKHR; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - struct ImportSemaphoreWin32HandleInfoKHR; - struct ExportSemaphoreWin32HandleInfoKHR; - struct D3D12FenceSubmitInfoKHR; - struct SemaphoreGetWin32HandleInfoKHR; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - struct ImportSemaphoreFdInfoKHR; - struct SemaphoreGetFdInfoKHR; - - //=== VK_KHR_push_descriptor === - struct PhysicalDevicePushDescriptorPropertiesKHR; - - //=== VK_EXT_conditional_rendering === - struct ConditionalRenderingBeginInfoEXT; - struct PhysicalDeviceConditionalRenderingFeaturesEXT; - struct CommandBufferInheritanceConditionalRenderingInfoEXT; - - //=== VK_KHR_incremental_present === - struct PresentRegionsKHR; - struct PresentRegionKHR; - struct RectLayerKHR; - - //=== VK_NV_clip_space_w_scaling === - struct ViewportWScalingNV; - struct PipelineViewportWScalingStateCreateInfoNV; - - //=== VK_EXT_display_surface_counter === - struct SurfaceCapabilities2EXT; - - //=== VK_EXT_display_control === - struct DisplayPowerInfoEXT; - struct DeviceEventInfoEXT; - struct DisplayEventInfoEXT; - struct SwapchainCounterCreateInfoEXT; - - //=== VK_GOOGLE_display_timing === - struct RefreshCycleDurationGOOGLE; - struct PastPresentationTimingGOOGLE; - struct PresentTimesInfoGOOGLE; - struct PresentTimeGOOGLE; - - //=== VK_NVX_multiview_per_view_attributes === - struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - - //=== VK_NV_viewport_swizzle === - struct ViewportSwizzleNV; - struct PipelineViewportSwizzleStateCreateInfoNV; - - //=== VK_EXT_discard_rectangles === - struct PhysicalDeviceDiscardRectanglePropertiesEXT; - struct PipelineDiscardRectangleStateCreateInfoEXT; - - //=== VK_EXT_conservative_rasterization === - struct PhysicalDeviceConservativeRasterizationPropertiesEXT; - struct PipelineRasterizationConservativeStateCreateInfoEXT; - - //=== VK_EXT_depth_clip_enable === - struct PhysicalDeviceDepthClipEnableFeaturesEXT; - struct PipelineRasterizationDepthClipStateCreateInfoEXT; - - //=== VK_EXT_hdr_metadata === - struct HdrMetadataEXT; - struct XYColorEXT; - - //=== VK_KHR_shared_presentable_image === - struct SharedPresentSurfaceCapabilitiesKHR; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - struct ImportFenceWin32HandleInfoKHR; - struct ExportFenceWin32HandleInfoKHR; - struct FenceGetWin32HandleInfoKHR; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - struct ImportFenceFdInfoKHR; - struct FenceGetFdInfoKHR; - - //=== VK_KHR_performance_query === - struct PhysicalDevicePerformanceQueryFeaturesKHR; - struct PhysicalDevicePerformanceQueryPropertiesKHR; - struct PerformanceCounterKHR; - struct PerformanceCounterDescriptionKHR; - struct QueryPoolPerformanceCreateInfoKHR; - union PerformanceCounterResultKHR; - struct AcquireProfilingLockInfoKHR; - struct PerformanceQuerySubmitInfoKHR; - - //=== VK_KHR_get_surface_capabilities2 === - struct PhysicalDeviceSurfaceInfo2KHR; - struct SurfaceCapabilities2KHR; - struct SurfaceFormat2KHR; - - //=== VK_KHR_get_display_properties2 === - struct DisplayProperties2KHR; - struct DisplayPlaneProperties2KHR; - struct DisplayModeProperties2KHR; - struct DisplayPlaneInfo2KHR; - struct DisplayPlaneCapabilities2KHR; - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - struct IOSSurfaceCreateInfoMVK; -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - struct MacOSSurfaceCreateInfoMVK; -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - struct DebugUtilsLabelEXT; - struct DebugUtilsMessengerCallbackDataEXT; - struct DebugUtilsMessengerCreateInfoEXT; - struct DebugUtilsObjectNameInfoEXT; - struct DebugUtilsObjectTagInfoEXT; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - struct AndroidHardwareBufferUsageANDROID; - struct AndroidHardwareBufferPropertiesANDROID; - struct AndroidHardwareBufferFormatPropertiesANDROID; - struct ImportAndroidHardwareBufferInfoANDROID; - struct MemoryGetAndroidHardwareBufferInfoANDROID; - struct ExternalFormatANDROID; - struct AndroidHardwareBufferFormatProperties2ANDROID; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - struct SampleLocationEXT; - struct SampleLocationsInfoEXT; - struct AttachmentSampleLocationsEXT; - struct SubpassSampleLocationsEXT; - struct RenderPassSampleLocationsBeginInfoEXT; - struct PipelineSampleLocationsStateCreateInfoEXT; - struct PhysicalDeviceSampleLocationsPropertiesEXT; - struct MultisamplePropertiesEXT; - - //=== VK_EXT_blend_operation_advanced === - struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT; - struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT; - struct PipelineColorBlendAdvancedStateCreateInfoEXT; - - //=== VK_NV_fragment_coverage_to_color === - struct PipelineCoverageToColorStateCreateInfoNV; - - //=== VK_KHR_acceleration_structure === - union DeviceOrHostAddressKHR; - union DeviceOrHostAddressConstKHR; - struct AccelerationStructureBuildRangeInfoKHR; - struct AabbPositionsKHR; - using AabbPositionsNV = AabbPositionsKHR; - struct AccelerationStructureGeometryTrianglesDataKHR; - struct TransformMatrixKHR; - using TransformMatrixNV = TransformMatrixKHR; - struct AccelerationStructureBuildGeometryInfoKHR; - struct AccelerationStructureGeometryAabbsDataKHR; - struct AccelerationStructureInstanceKHR; - using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; - struct AccelerationStructureGeometryInstancesDataKHR; - union AccelerationStructureGeometryDataKHR; - struct AccelerationStructureGeometryKHR; - struct AccelerationStructureCreateInfoKHR; - struct WriteDescriptorSetAccelerationStructureKHR; - struct PhysicalDeviceAccelerationStructureFeaturesKHR; - struct PhysicalDeviceAccelerationStructurePropertiesKHR; - struct AccelerationStructureDeviceAddressInfoKHR; - struct AccelerationStructureVersionInfoKHR; - struct CopyAccelerationStructureToMemoryInfoKHR; - struct CopyMemoryToAccelerationStructureInfoKHR; - struct CopyAccelerationStructureInfoKHR; - struct AccelerationStructureBuildSizesInfoKHR; - - //=== VK_NV_framebuffer_mixed_samples === - struct PipelineCoverageModulationStateCreateInfoNV; - - //=== VK_NV_shader_sm_builtins === - struct PhysicalDeviceShaderSMBuiltinsPropertiesNV; - struct PhysicalDeviceShaderSMBuiltinsFeaturesNV; - - //=== VK_EXT_image_drm_format_modifier === - struct DrmFormatModifierPropertiesListEXT; - struct DrmFormatModifierPropertiesEXT; - struct PhysicalDeviceImageDrmFormatModifierInfoEXT; - struct ImageDrmFormatModifierListCreateInfoEXT; - struct ImageDrmFormatModifierExplicitCreateInfoEXT; - struct ImageDrmFormatModifierPropertiesEXT; - struct DrmFormatModifierPropertiesList2EXT; - struct DrmFormatModifierProperties2EXT; - - //=== VK_EXT_validation_cache === - struct ValidationCacheCreateInfoEXT; - struct ShaderModuleValidationCacheCreateInfoEXT; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_portability_subset === - struct PhysicalDevicePortabilitySubsetFeaturesKHR; - struct PhysicalDevicePortabilitySubsetPropertiesKHR; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_shading_rate_image === - struct ShadingRatePaletteNV; - struct PipelineViewportShadingRateImageStateCreateInfoNV; - struct PhysicalDeviceShadingRateImageFeaturesNV; - struct PhysicalDeviceShadingRateImagePropertiesNV; - struct CoarseSampleLocationNV; - struct CoarseSampleOrderCustomNV; - struct PipelineViewportCoarseSampleOrderStateCreateInfoNV; - - //=== VK_NV_ray_tracing === - struct RayTracingShaderGroupCreateInfoNV; - struct RayTracingPipelineCreateInfoNV; - struct GeometryTrianglesNV; - struct GeometryAABBNV; - struct GeometryDataNV; - struct GeometryNV; - struct AccelerationStructureInfoNV; - struct AccelerationStructureCreateInfoNV; - struct BindAccelerationStructureMemoryInfoNV; - struct WriteDescriptorSetAccelerationStructureNV; - struct AccelerationStructureMemoryRequirementsInfoNV; - struct PhysicalDeviceRayTracingPropertiesNV; - - //=== VK_NV_representative_fragment_test === - struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV; - struct PipelineRepresentativeFragmentTestStateCreateInfoNV; - - //=== VK_EXT_filter_cubic === - struct PhysicalDeviceImageViewImageFormatInfoEXT; - struct FilterCubicImageViewImageFormatPropertiesEXT; - - //=== VK_EXT_external_memory_host === - struct ImportMemoryHostPointerInfoEXT; - struct MemoryHostPointerPropertiesEXT; - struct PhysicalDeviceExternalMemoryHostPropertiesEXT; - - //=== VK_KHR_shader_clock === - struct PhysicalDeviceShaderClockFeaturesKHR; - - //=== VK_AMD_pipeline_compiler_control === - struct PipelineCompilerControlCreateInfoAMD; - - //=== VK_EXT_calibrated_timestamps === - struct CalibratedTimestampInfoEXT; - - //=== VK_AMD_shader_core_properties === - struct PhysicalDeviceShaderCorePropertiesAMD; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h265 === - struct VideoDecodeH265ProfileInfoEXT; - struct VideoDecodeH265CapabilitiesEXT; - struct VideoDecodeH265SessionParametersCreateInfoEXT; - struct VideoDecodeH265SessionParametersAddInfoEXT; - struct VideoDecodeH265PictureInfoEXT; - struct VideoDecodeH265DpbSlotInfoEXT; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_KHR_global_priority === - struct DeviceQueueGlobalPriorityCreateInfoKHR; - using DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfoKHR; - struct PhysicalDeviceGlobalPriorityQueryFeaturesKHR; - using PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeaturesKHR; - struct QueueFamilyGlobalPriorityPropertiesKHR; - using QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityPropertiesKHR; - - //=== VK_AMD_memory_overallocation_behavior === - struct DeviceMemoryOverallocationCreateInfoAMD; - - //=== VK_EXT_vertex_attribute_divisor === - struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT; - struct VertexInputBindingDivisorDescriptionEXT; - struct PipelineVertexInputDivisorStateCreateInfoEXT; - struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT; - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_frame_token === - struct PresentFrameTokenGGP; -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_compute_shader_derivatives === - struct PhysicalDeviceComputeShaderDerivativesFeaturesNV; - - //=== VK_NV_mesh_shader === - struct PhysicalDeviceMeshShaderFeaturesNV; - struct PhysicalDeviceMeshShaderPropertiesNV; - struct DrawMeshTasksIndirectCommandNV; - - //=== VK_NV_shader_image_footprint === - struct PhysicalDeviceShaderImageFootprintFeaturesNV; - - //=== VK_NV_scissor_exclusive === - struct PipelineViewportExclusiveScissorStateCreateInfoNV; - struct PhysicalDeviceExclusiveScissorFeaturesNV; - - //=== VK_NV_device_diagnostic_checkpoints === - struct QueueFamilyCheckpointPropertiesNV; - struct CheckpointDataNV; - - //=== VK_INTEL_shader_integer_functions2 === - struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; - - //=== VK_INTEL_performance_query === - union PerformanceValueDataINTEL; - struct PerformanceValueINTEL; - struct InitializePerformanceApiInfoINTEL; - struct QueryPoolPerformanceQueryCreateInfoINTEL; - using QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; - struct PerformanceMarkerInfoINTEL; - struct PerformanceStreamMarkerInfoINTEL; - struct PerformanceOverrideInfoINTEL; - struct PerformanceConfigurationAcquireInfoINTEL; - - //=== VK_EXT_pci_bus_info === - struct PhysicalDevicePCIBusInfoPropertiesEXT; - - //=== VK_AMD_display_native_hdr === - struct DisplayNativeHdrSurfaceCapabilitiesAMD; - struct SwapchainDisplayNativeHdrCreateInfoAMD; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - struct ImagePipeSurfaceCreateInfoFUCHSIA; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - struct MetalSurfaceCreateInfoEXT; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_fragment_density_map === - struct PhysicalDeviceFragmentDensityMapFeaturesEXT; - struct PhysicalDeviceFragmentDensityMapPropertiesEXT; - struct RenderPassFragmentDensityMapCreateInfoEXT; - - //=== VK_KHR_fragment_shading_rate === - struct FragmentShadingRateAttachmentInfoKHR; - struct PipelineFragmentShadingRateStateCreateInfoKHR; - struct PhysicalDeviceFragmentShadingRateFeaturesKHR; - struct PhysicalDeviceFragmentShadingRatePropertiesKHR; - struct PhysicalDeviceFragmentShadingRateKHR; - - //=== VK_AMD_shader_core_properties2 === - struct PhysicalDeviceShaderCoreProperties2AMD; - - //=== VK_AMD_device_coherent_memory === - struct PhysicalDeviceCoherentMemoryFeaturesAMD; - - //=== VK_EXT_shader_image_atomic_int64 === - struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT; - - //=== VK_EXT_memory_budget === - struct PhysicalDeviceMemoryBudgetPropertiesEXT; - - //=== VK_EXT_memory_priority === - struct PhysicalDeviceMemoryPriorityFeaturesEXT; - struct MemoryPriorityAllocateInfoEXT; - - //=== VK_KHR_surface_protected_capabilities === - struct SurfaceProtectedCapabilitiesKHR; - - //=== VK_NV_dedicated_allocation_image_aliasing === - struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; - - //=== VK_EXT_buffer_device_address === - struct PhysicalDeviceBufferDeviceAddressFeaturesEXT; - using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; - struct BufferDeviceAddressCreateInfoEXT; - - //=== VK_EXT_validation_features === - struct ValidationFeaturesEXT; - - //=== VK_KHR_present_wait === - struct PhysicalDevicePresentWaitFeaturesKHR; - - //=== VK_NV_cooperative_matrix === - struct CooperativeMatrixPropertiesNV; - struct PhysicalDeviceCooperativeMatrixFeaturesNV; - struct PhysicalDeviceCooperativeMatrixPropertiesNV; - - //=== VK_NV_coverage_reduction_mode === - struct PhysicalDeviceCoverageReductionModeFeaturesNV; - struct PipelineCoverageReductionStateCreateInfoNV; - struct FramebufferMixedSamplesCombinationNV; - - //=== VK_EXT_fragment_shader_interlock === - struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT; - - //=== VK_EXT_ycbcr_image_arrays === - struct PhysicalDeviceYcbcrImageArraysFeaturesEXT; - - //=== VK_EXT_provoking_vertex === - struct PhysicalDeviceProvokingVertexFeaturesEXT; - struct PhysicalDeviceProvokingVertexPropertiesEXT; - struct PipelineRasterizationProvokingVertexStateCreateInfoEXT; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - struct SurfaceFullScreenExclusiveInfoEXT; - struct SurfaceCapabilitiesFullScreenExclusiveEXT; - struct SurfaceFullScreenExclusiveWin32InfoEXT; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - struct HeadlessSurfaceCreateInfoEXT; - - //=== VK_EXT_line_rasterization === - struct PhysicalDeviceLineRasterizationFeaturesEXT; - struct PhysicalDeviceLineRasterizationPropertiesEXT; - struct PipelineRasterizationLineStateCreateInfoEXT; - - //=== VK_EXT_shader_atomic_float === - struct PhysicalDeviceShaderAtomicFloatFeaturesEXT; - - //=== VK_EXT_index_type_uint8 === - struct PhysicalDeviceIndexTypeUint8FeaturesEXT; - - //=== VK_EXT_extended_dynamic_state === - struct PhysicalDeviceExtendedDynamicStateFeaturesEXT; - - //=== VK_KHR_pipeline_executable_properties === - struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR; - struct PipelineInfoKHR; - using PipelineInfoEXT = PipelineInfoKHR; - struct PipelineExecutablePropertiesKHR; - struct PipelineExecutableInfoKHR; - union PipelineExecutableStatisticValueKHR; - struct PipelineExecutableStatisticKHR; - struct PipelineExecutableInternalRepresentationKHR; - - //=== VK_EXT_shader_atomic_float2 === - struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT; - - //=== VK_NV_device_generated_commands === - struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV; - struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV; - struct GraphicsShaderGroupCreateInfoNV; - struct GraphicsPipelineShaderGroupsCreateInfoNV; - struct BindShaderGroupIndirectCommandNV; - struct BindIndexBufferIndirectCommandNV; - struct BindVertexBufferIndirectCommandNV; - struct SetStateFlagsIndirectCommandNV; - struct IndirectCommandsStreamNV; - struct IndirectCommandsLayoutTokenNV; - struct IndirectCommandsLayoutCreateInfoNV; - struct GeneratedCommandsInfoNV; - struct GeneratedCommandsMemoryRequirementsInfoNV; - - //=== VK_NV_inherited_viewport_scissor === - struct PhysicalDeviceInheritedViewportScissorFeaturesNV; - struct CommandBufferInheritanceViewportScissorInfoNV; - - //=== VK_EXT_texel_buffer_alignment === - struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT; - - //=== VK_QCOM_render_pass_transform === - struct RenderPassTransformBeginInfoQCOM; - struct CommandBufferInheritanceRenderPassTransformInfoQCOM; - - //=== VK_EXT_device_memory_report === - struct PhysicalDeviceDeviceMemoryReportFeaturesEXT; - struct DeviceDeviceMemoryReportCreateInfoEXT; - struct DeviceMemoryReportCallbackDataEXT; - - //=== VK_EXT_robustness2 === - struct PhysicalDeviceRobustness2FeaturesEXT; - struct PhysicalDeviceRobustness2PropertiesEXT; - - //=== VK_EXT_custom_border_color === - struct SamplerCustomBorderColorCreateInfoEXT; - struct PhysicalDeviceCustomBorderColorPropertiesEXT; - struct PhysicalDeviceCustomBorderColorFeaturesEXT; - - //=== VK_KHR_pipeline_library === - struct PipelineLibraryCreateInfoKHR; - - //=== VK_KHR_present_id === - struct PresentIdKHR; - struct PhysicalDevicePresentIdFeaturesKHR; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - struct VideoEncodeInfoKHR; - struct VideoEncodeCapabilitiesKHR; - struct VideoEncodeUsageInfoKHR; - struct VideoEncodeRateControlInfoKHR; - struct VideoEncodeRateControlLayerInfoKHR; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - struct PhysicalDeviceDiagnosticsConfigFeaturesNV; - struct DeviceDiagnosticsConfigCreateInfoNV; - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - struct ExportMetalObjectCreateInfoEXT; - struct ExportMetalObjectsInfoEXT; - struct ExportMetalDeviceInfoEXT; - struct ExportMetalCommandQueueInfoEXT; - struct ExportMetalBufferInfoEXT; - struct ImportMetalBufferInfoEXT; - struct ExportMetalTextureInfoEXT; - struct ImportMetalTextureInfoEXT; - struct ExportMetalIOSurfaceInfoEXT; - struct ImportMetalIOSurfaceInfoEXT; - struct ExportMetalSharedEventInfoEXT; - struct ImportMetalSharedEventInfoEXT; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - struct QueueFamilyCheckpointProperties2NV; - struct CheckpointData2NV; - - //=== VK_EXT_graphics_pipeline_library === - struct PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; - struct PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; - struct GraphicsPipelineLibraryCreateInfoEXT; - - //=== VK_AMD_shader_early_and_late_fragment_tests === - struct PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; - - //=== VK_KHR_fragment_shader_barycentric === - struct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - using PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - struct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR; - - //=== VK_KHR_shader_subgroup_uniform_control_flow === - struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; - - //=== VK_NV_fragment_shading_rate_enums === - struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV; - struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV; - struct PipelineFragmentShadingRateEnumStateCreateInfoNV; - - //=== VK_NV_ray_tracing_motion_blur === - struct AccelerationStructureGeometryMotionTrianglesDataNV; - struct AccelerationStructureMotionInfoNV; - struct AccelerationStructureMotionInstanceNV; - union AccelerationStructureMotionInstanceDataNV; - struct AccelerationStructureMatrixMotionInstanceNV; - struct AccelerationStructureSRTMotionInstanceNV; - struct SRTDataNV; - struct PhysicalDeviceRayTracingMotionBlurFeaturesNV; - - //=== VK_EXT_mesh_shader === - struct PhysicalDeviceMeshShaderFeaturesEXT; - struct PhysicalDeviceMeshShaderPropertiesEXT; - struct DrawMeshTasksIndirectCommandEXT; - - //=== VK_EXT_ycbcr_2plane_444_formats === - struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; - - //=== VK_EXT_fragment_density_map2 === - struct PhysicalDeviceFragmentDensityMap2FeaturesEXT; - struct PhysicalDeviceFragmentDensityMap2PropertiesEXT; - - //=== VK_QCOM_rotated_copy_commands === - struct CopyCommandTransformInfoQCOM; - - //=== VK_KHR_workgroup_memory_explicit_layout === - struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; - - //=== VK_EXT_image_compression_control === - struct PhysicalDeviceImageCompressionControlFeaturesEXT; - struct ImageCompressionControlEXT; - struct SubresourceLayout2EXT; - struct ImageSubresource2EXT; - struct ImageCompressionPropertiesEXT; - - //=== VK_EXT_attachment_feedback_loop_layout === - struct PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; - - //=== VK_EXT_4444_formats === - struct PhysicalDevice4444FormatsFeaturesEXT; - - //=== VK_EXT_rgba10x6_formats === - struct PhysicalDeviceRGBA10X6FormatsFeaturesEXT; - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - struct DirectFBSurfaceCreateInfoEXT; -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - struct RayTracingShaderGroupCreateInfoKHR; - struct RayTracingPipelineCreateInfoKHR; - struct PhysicalDeviceRayTracingPipelineFeaturesKHR; - struct PhysicalDeviceRayTracingPipelinePropertiesKHR; - struct StridedDeviceAddressRegionKHR; - struct TraceRaysIndirectCommandKHR; - struct RayTracingPipelineInterfaceCreateInfoKHR; - - //=== VK_KHR_ray_query === - struct PhysicalDeviceRayQueryFeaturesKHR; - - //=== VK_VALVE_mutable_descriptor_type === - struct PhysicalDeviceMutableDescriptorTypeFeaturesVALVE; - struct MutableDescriptorTypeListVALVE; - struct MutableDescriptorTypeCreateInfoVALVE; - - //=== VK_EXT_vertex_input_dynamic_state === - struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT; - struct VertexInputBindingDescription2EXT; - struct VertexInputAttributeDescription2EXT; - - //=== VK_EXT_physical_device_drm === - struct PhysicalDeviceDrmPropertiesEXT; - - //=== VK_EXT_depth_clip_control === - struct PhysicalDeviceDepthClipControlFeaturesEXT; - struct PipelineViewportDepthClipControlCreateInfoEXT; - - //=== VK_EXT_primitive_topology_list_restart === - struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - struct ImportMemoryZirconHandleInfoFUCHSIA; - struct MemoryZirconHandlePropertiesFUCHSIA; - struct MemoryGetZirconHandleInfoFUCHSIA; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - struct ImportSemaphoreZirconHandleInfoFUCHSIA; - struct SemaphoreGetZirconHandleInfoFUCHSIA; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - struct BufferCollectionCreateInfoFUCHSIA; - struct ImportMemoryBufferCollectionFUCHSIA; - struct BufferCollectionImageCreateInfoFUCHSIA; - struct BufferConstraintsInfoFUCHSIA; - struct BufferCollectionBufferCreateInfoFUCHSIA; - struct BufferCollectionPropertiesFUCHSIA; - struct SysmemColorSpaceFUCHSIA; - struct ImageConstraintsInfoFUCHSIA; - struct ImageFormatConstraintsInfoFUCHSIA; - struct BufferCollectionConstraintsInfoFUCHSIA; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - struct SubpassShadingPipelineCreateInfoHUAWEI; - struct PhysicalDeviceSubpassShadingFeaturesHUAWEI; - struct PhysicalDeviceSubpassShadingPropertiesHUAWEI; - - //=== VK_HUAWEI_invocation_mask === - struct PhysicalDeviceInvocationMaskFeaturesHUAWEI; - - //=== VK_NV_external_memory_rdma === - struct MemoryGetRemoteAddressInfoNV; - struct PhysicalDeviceExternalMemoryRDMAFeaturesNV; - - //=== VK_EXT_pipeline_properties === - struct PipelinePropertiesIdentifierEXT; - struct PhysicalDevicePipelinePropertiesFeaturesEXT; - - //=== VK_EXT_multisampled_render_to_single_sampled === - struct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; - struct SubpassResolvePerformanceQueryEXT; - struct MultisampledRenderToSingleSampledInfoEXT; - - //=== VK_EXT_extended_dynamic_state2 === - struct PhysicalDeviceExtendedDynamicState2FeaturesEXT; - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - struct ScreenSurfaceCreateInfoQNX; -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - struct PhysicalDeviceColorWriteEnableFeaturesEXT; - struct PipelineColorWriteCreateInfoEXT; - - //=== VK_EXT_primitives_generated_query === - struct PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; - - //=== VK_KHR_ray_tracing_maintenance1 === - struct PhysicalDeviceRayTracingMaintenance1FeaturesKHR; - struct TraceRaysIndirectCommand2KHR; - - //=== VK_EXT_image_view_min_lod === - struct PhysicalDeviceImageViewMinLodFeaturesEXT; - struct ImageViewMinLodCreateInfoEXT; - - //=== VK_EXT_multi_draw === - struct PhysicalDeviceMultiDrawFeaturesEXT; - struct PhysicalDeviceMultiDrawPropertiesEXT; - struct MultiDrawInfoEXT; - struct MultiDrawIndexedInfoEXT; - - //=== VK_EXT_image_2d_view_of_3d === - struct PhysicalDeviceImage2DViewOf3DFeaturesEXT; - - //=== VK_EXT_border_color_swizzle === - struct PhysicalDeviceBorderColorSwizzleFeaturesEXT; - struct SamplerBorderColorComponentMappingCreateInfoEXT; - - //=== VK_EXT_pageable_device_local_memory === - struct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; - - //=== VK_VALVE_descriptor_set_host_mapping === - struct PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; - struct DescriptorSetBindingReferenceVALVE; - struct DescriptorSetLayoutHostMappingInfoVALVE; - - //=== VK_EXT_depth_clamp_zero_one === - struct PhysicalDeviceDepthClampZeroOneFeaturesEXT; - - //=== VK_EXT_non_seamless_cube_map === - struct PhysicalDeviceNonSeamlessCubeMapFeaturesEXT; - - //=== VK_QCOM_fragment_density_map_offset === - struct PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; - struct PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; - struct SubpassFragmentDensityMapOffsetEndInfoQCOM; - - //=== VK_NV_linear_color_attachment === - struct PhysicalDeviceLinearColorAttachmentFeaturesNV; - - //=== VK_EXT_image_compression_control_swapchain === - struct PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; - - //=== VK_QCOM_image_processing === - struct ImageViewSampleWeightCreateInfoQCOM; - struct PhysicalDeviceImageProcessingFeaturesQCOM; - struct PhysicalDeviceImageProcessingPropertiesQCOM; - - //=== VK_EXT_subpass_merge_feedback === - struct PhysicalDeviceSubpassMergeFeedbackFeaturesEXT; - struct RenderPassCreationControlEXT; - struct RenderPassCreationFeedbackInfoEXT; - struct RenderPassCreationFeedbackCreateInfoEXT; - struct RenderPassSubpassFeedbackInfoEXT; - struct RenderPassSubpassFeedbackCreateInfoEXT; - - //=== VK_EXT_shader_module_identifier === - struct PhysicalDeviceShaderModuleIdentifierFeaturesEXT; - struct PhysicalDeviceShaderModuleIdentifierPropertiesEXT; - struct PipelineShaderStageModuleIdentifierCreateInfoEXT; - struct ShaderModuleIdentifierEXT; - - //=== VK_EXT_rasterization_order_attachment_access === - struct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - using PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - - //=== VK_EXT_legacy_dithering === - struct PhysicalDeviceLegacyDitheringFeaturesEXT; - - //=== VK_QCOM_tile_properties === - struct PhysicalDeviceTilePropertiesFeaturesQCOM; - struct TilePropertiesQCOM; - - //=== VK_SEC_amigo_profiling === - struct PhysicalDeviceAmigoProfilingFeaturesSEC; - struct AmigoProfilingSubmitInfoSEC; - - //=============== - //=== HANDLEs === - //=============== - - class SurfaceKHR - { - public: - using CType = VkSurfaceKHR; - using NativeType = VkSurfaceKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; - - public: - VULKAN_HPP_CONSTEXPR SurfaceKHR() = default; - VULKAN_HPP_CONSTEXPR SurfaceKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT : m_surfaceKHR( surfaceKHR ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - SurfaceKHR & operator=( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT - { - m_surfaceKHR = surfaceKHR; - return *this; - } -#endif - - SurfaceKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_surfaceKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceKHR const & ) const = default; -#else - bool operator==( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR == rhs.m_surfaceKHR; - } - - bool operator!=( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR != rhs.m_surfaceKHR; - } - - bool operator<( SurfaceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR < rhs.m_surfaceKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_surfaceKHR == VK_NULL_HANDLE; - } - - private: - VkSurfaceKHR m_surfaceKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SurfaceKHR; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SurfaceKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DebugReportCallbackEXT - { - public: - using CType = VkDebugReportCallbackEXT; - using NativeType = VkDebugReportCallbackEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; - - public: - VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT() = default; - VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT( VkDebugReportCallbackEXT debugReportCallbackEXT ) VULKAN_HPP_NOEXCEPT - : m_debugReportCallbackEXT( debugReportCallbackEXT ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DebugReportCallbackEXT & operator=( VkDebugReportCallbackEXT debugReportCallbackEXT ) VULKAN_HPP_NOEXCEPT - { - m_debugReportCallbackEXT = debugReportCallbackEXT; - return *this; - } -#endif - - DebugReportCallbackEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_debugReportCallbackEXT = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugReportCallbackEXT const & ) const = default; -#else - bool operator==( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT == rhs.m_debugReportCallbackEXT; - } - - bool operator!=( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT != rhs.m_debugReportCallbackEXT; - } - - bool operator<( DebugReportCallbackEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT < rhs.m_debugReportCallbackEXT; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugReportCallbackEXT() const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_debugReportCallbackEXT == VK_NULL_HANDLE; - } - - private: - VkDebugReportCallbackEXT m_debugReportCallbackEXT = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DebugUtilsMessengerEXT - { - public: - using CType = VkDebugUtilsMessengerEXT; - using NativeType = VkDebugUtilsMessengerEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT() = default; - VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DebugUtilsMessengerEXT( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT - : m_debugUtilsMessengerEXT( debugUtilsMessengerEXT ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DebugUtilsMessengerEXT & operator=( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT - { - m_debugUtilsMessengerEXT = debugUtilsMessengerEXT; - return *this; - } -#endif - - DebugUtilsMessengerEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_debugUtilsMessengerEXT = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugUtilsMessengerEXT const & ) const = default; -#else - bool operator==( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT == rhs.m_debugUtilsMessengerEXT; - } - - bool operator!=( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT != rhs.m_debugUtilsMessengerEXT; - } - - bool operator<( DebugUtilsMessengerEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT < rhs.m_debugUtilsMessengerEXT; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugUtilsMessengerEXT() const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_debugUtilsMessengerEXT == VK_NULL_HANDLE; - } - - private: - VkDebugUtilsMessengerEXT m_debugUtilsMessengerEXT = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DisplayKHR - { - public: - using CType = VkDisplayKHR; - using NativeType = VkDisplayKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; - - public: - VULKAN_HPP_CONSTEXPR DisplayKHR() = default; - VULKAN_HPP_CONSTEXPR DisplayKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT : m_displayKHR( displayKHR ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DisplayKHR & operator=( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT - { - m_displayKHR = displayKHR; - return *this; - } -#endif - - DisplayKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_displayKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayKHR const & ) const = default; -#else - bool operator==( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR == rhs.m_displayKHR; - } - - bool operator!=( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR != rhs.m_displayKHR; - } - - bool operator<( DisplayKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR < rhs.m_displayKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_displayKHR == VK_NULL_HANDLE; - } - - private: - VkDisplayKHR m_displayKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DisplayKHR; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DisplayKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class SwapchainKHR - { - public: - using CType = VkSwapchainKHR; - using NativeType = VkSwapchainKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; - - public: - VULKAN_HPP_CONSTEXPR SwapchainKHR() = default; - VULKAN_HPP_CONSTEXPR SwapchainKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT : m_swapchainKHR( swapchainKHR ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - SwapchainKHR & operator=( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT - { - m_swapchainKHR = swapchainKHR; - return *this; - } -#endif - - SwapchainKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_swapchainKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainKHR const & ) const = default; -#else - bool operator==( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR == rhs.m_swapchainKHR; - } - - bool operator!=( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR != rhs.m_swapchainKHR; - } - - bool operator<( SwapchainKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR < rhs.m_swapchainKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_swapchainKHR == VK_NULL_HANDLE; - } - - private: - VkSwapchainKHR m_swapchainKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SwapchainKHR; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SwapchainKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Semaphore - { - public: - using CType = VkSemaphore; - using NativeType = VkSemaphore; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; - - public: - VULKAN_HPP_CONSTEXPR Semaphore() = default; - VULKAN_HPP_CONSTEXPR Semaphore( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT : m_semaphore( semaphore ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Semaphore & operator=( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT - { - m_semaphore = semaphore; - return *this; - } -#endif - - Semaphore & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_semaphore = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Semaphore const & ) const = default; -#else - bool operator==( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore == rhs.m_semaphore; - } - - bool operator!=( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore != rhs.m_semaphore; - } - - bool operator<( Semaphore const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_semaphore < rhs.m_semaphore; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const VULKAN_HPP_NOEXCEPT - { - return m_semaphore; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_semaphore != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_semaphore == VK_NULL_HANDLE; - } - - private: - VkSemaphore m_semaphore = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Semaphore; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Semaphore; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Fence - { - public: - using CType = VkFence; - using NativeType = VkFence; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; - - public: - VULKAN_HPP_CONSTEXPR Fence() = default; - VULKAN_HPP_CONSTEXPR Fence( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) VULKAN_HPP_NOEXCEPT : m_fence( fence ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Fence & operator=( VkFence fence ) VULKAN_HPP_NOEXCEPT - { - m_fence = fence; - return *this; - } -#endif - - Fence & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_fence = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Fence const & ) const = default; -#else - bool operator==( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence == rhs.m_fence; - } - - bool operator!=( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence != rhs.m_fence; - } - - bool operator<( Fence const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_fence < rhs.m_fence; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const VULKAN_HPP_NOEXCEPT - { - return m_fence; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_fence != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_fence == VK_NULL_HANDLE; - } - - private: - VkFence m_fence = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Fence; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Fence; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class PerformanceConfigurationINTEL - { - public: - using CType = VkPerformanceConfigurationINTEL; - using NativeType = VkPerformanceConfigurationINTEL; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR PerformanceConfigurationINTEL() = default; - VULKAN_HPP_CONSTEXPR PerformanceConfigurationINTEL( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT PerformanceConfigurationINTEL( VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) VULKAN_HPP_NOEXCEPT - : m_performanceConfigurationINTEL( performanceConfigurationINTEL ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - PerformanceConfigurationINTEL & operator=( VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) VULKAN_HPP_NOEXCEPT - { - m_performanceConfigurationINTEL = performanceConfigurationINTEL; - return *this; - } -#endif - - PerformanceConfigurationINTEL & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_performanceConfigurationINTEL = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceConfigurationINTEL const & ) const = default; -#else - bool operator==( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL == rhs.m_performanceConfigurationINTEL; - } - - bool operator!=( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL != rhs.m_performanceConfigurationINTEL; - } - - bool operator<( PerformanceConfigurationINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL < rhs.m_performanceConfigurationINTEL; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPerformanceConfigurationINTEL() const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_performanceConfigurationINTEL == VK_NULL_HANDLE; - } - - private: - VkPerformanceConfigurationINTEL m_performanceConfigurationINTEL = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class QueryPool - { - public: - using CType = VkQueryPool; - using NativeType = VkQueryPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; - - public: - VULKAN_HPP_CONSTEXPR QueryPool() = default; - VULKAN_HPP_CONSTEXPR QueryPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT : m_queryPool( queryPool ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - QueryPool & operator=( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT - { - m_queryPool = queryPool; - return *this; - } -#endif - - QueryPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_queryPool = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPool const & ) const = default; -#else - bool operator==( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool == rhs.m_queryPool; - } - - bool operator!=( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool != rhs.m_queryPool; - } - - bool operator<( QueryPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queryPool < rhs.m_queryPool; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const VULKAN_HPP_NOEXCEPT - { - return m_queryPool; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_queryPool != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_queryPool == VK_NULL_HANDLE; - } - - private: - VkQueryPool m_queryPool = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::QueryPool; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::QueryPool; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Buffer - { - public: - using CType = VkBuffer; - using NativeType = VkBuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; - - public: - VULKAN_HPP_CONSTEXPR Buffer() = default; - VULKAN_HPP_CONSTEXPR Buffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT : m_buffer( buffer ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Buffer & operator=( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT - { - m_buffer = buffer; - return *this; - } -#endif - - Buffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_buffer = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Buffer const & ) const = default; -#else - bool operator==( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer == rhs.m_buffer; - } - - bool operator!=( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer != rhs.m_buffer; - } - - bool operator<( Buffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_buffer < rhs.m_buffer; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const VULKAN_HPP_NOEXCEPT - { - return m_buffer; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_buffer != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_buffer == VK_NULL_HANDLE; - } - - private: - VkBuffer m_buffer = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Buffer; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Buffer; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class PipelineLayout - { - public: - using CType = VkPipelineLayout; - using NativeType = VkPipelineLayout; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; - - public: - VULKAN_HPP_CONSTEXPR PipelineLayout() = default; - VULKAN_HPP_CONSTEXPR PipelineLayout( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT : m_pipelineLayout( pipelineLayout ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - PipelineLayout & operator=( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT - { - m_pipelineLayout = pipelineLayout; - return *this; - } -#endif - - PipelineLayout & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_pipelineLayout = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineLayout const & ) const = default; -#else - bool operator==( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout == rhs.m_pipelineLayout; - } - - bool operator!=( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout != rhs.m_pipelineLayout; - } - - bool operator<( PipelineLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout < rhs.m_pipelineLayout; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout == VK_NULL_HANDLE; - } - - private: - VkPipelineLayout m_pipelineLayout = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PipelineLayout; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PipelineLayout; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DescriptorSet - { - public: - using CType = VkDescriptorSet; - using NativeType = VkDescriptorSet; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; - - public: - VULKAN_HPP_CONSTEXPR DescriptorSet() = default; - VULKAN_HPP_CONSTEXPR DescriptorSet( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT : m_descriptorSet( descriptorSet ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DescriptorSet & operator=( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT - { - m_descriptorSet = descriptorSet; - return *this; - } -#endif - - DescriptorSet & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_descriptorSet = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSet const & ) const = default; -#else - bool operator==( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet == rhs.m_descriptorSet; - } - - bool operator!=( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet != rhs.m_descriptorSet; - } - - bool operator<( DescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet < rhs.m_descriptorSet; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet == VK_NULL_HANDLE; - } - - private: - VkDescriptorSet m_descriptorSet = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorSet; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorSet; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class ImageView - { - public: - using CType = VkImageView; - using NativeType = VkImageView; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; - - public: - VULKAN_HPP_CONSTEXPR ImageView() = default; - VULKAN_HPP_CONSTEXPR ImageView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT - { - m_imageView = imageView; - return *this; - } -#endif - - ImageView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_imageView = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageView const & ) const = default; -#else - bool operator==( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView == rhs.m_imageView; - } - - bool operator!=( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView != rhs.m_imageView; - } - - bool operator<( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_imageView < rhs.m_imageView; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT - { - return m_imageView; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_imageView != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_imageView == VK_NULL_HANDLE; - } - - private: - VkImageView m_imageView = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ImageView; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ImageView; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Pipeline - { - public: - using CType = VkPipeline; - using NativeType = VkPipeline; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; - - public: - VULKAN_HPP_CONSTEXPR Pipeline() = default; - VULKAN_HPP_CONSTEXPR Pipeline( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT - { - m_pipeline = pipeline; - return *this; - } -#endif - - Pipeline & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_pipeline = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Pipeline const & ) const = default; -#else - bool operator==( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline == rhs.m_pipeline; - } - - bool operator!=( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline != rhs.m_pipeline; - } - - bool operator<( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipeline < rhs.m_pipeline; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT - { - return m_pipeline; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_pipeline != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_pipeline == VK_NULL_HANDLE; - } - - private: - VkPipeline m_pipeline = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Pipeline; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Pipeline; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Image - { - public: - using CType = VkImage; - using NativeType = VkImage; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; - - public: - VULKAN_HPP_CONSTEXPR Image() = default; - VULKAN_HPP_CONSTEXPR Image( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) VULKAN_HPP_NOEXCEPT : m_image( image ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Image & operator=( VkImage image ) VULKAN_HPP_NOEXCEPT - { - m_image = image; - return *this; - } -#endif - - Image & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_image = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Image const & ) const = default; -#else - bool operator==( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image == rhs.m_image; - } - - bool operator!=( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image != rhs.m_image; - } - - bool operator<( Image const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_image < rhs.m_image; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const VULKAN_HPP_NOEXCEPT - { - return m_image; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_image != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_image == VK_NULL_HANDLE; - } - - private: - VkImage m_image = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Image; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Image; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class AccelerationStructureNV - { - public: - using CType = VkAccelerationStructureNV; - using NativeType = VkAccelerationStructureNV; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; - - public: - VULKAN_HPP_CONSTEXPR AccelerationStructureNV() = default; - VULKAN_HPP_CONSTEXPR AccelerationStructureNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT AccelerationStructureNV( VkAccelerationStructureNV accelerationStructureNV ) VULKAN_HPP_NOEXCEPT - : m_accelerationStructureNV( accelerationStructureNV ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - AccelerationStructureNV & operator=( VkAccelerationStructureNV accelerationStructureNV ) VULKAN_HPP_NOEXCEPT - { - m_accelerationStructureNV = accelerationStructureNV; - return *this; - } -#endif - - AccelerationStructureNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_accelerationStructureNV = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureNV const & ) const = default; -#else - bool operator==( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV == rhs.m_accelerationStructureNV; - } - - bool operator!=( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV != rhs.m_accelerationStructureNV; - } - - bool operator<( AccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV < rhs.m_accelerationStructureNV; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureNV() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureNV == VK_NULL_HANDLE; - } - - private: - VkAccelerationStructureNV m_accelerationStructureNV = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DescriptorUpdateTemplate - { - public: - using CType = VkDescriptorUpdateTemplate; - using NativeType = VkDescriptorUpdateTemplate; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; - - public: - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate() = default; - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorUpdateTemplate( VkDescriptorUpdateTemplate descriptorUpdateTemplate ) VULKAN_HPP_NOEXCEPT - : m_descriptorUpdateTemplate( descriptorUpdateTemplate ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DescriptorUpdateTemplate & operator=( VkDescriptorUpdateTemplate descriptorUpdateTemplate ) VULKAN_HPP_NOEXCEPT - { - m_descriptorUpdateTemplate = descriptorUpdateTemplate; - return *this; - } -#endif - - DescriptorUpdateTemplate & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_descriptorUpdateTemplate = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorUpdateTemplate const & ) const = default; -#else - bool operator==( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate == rhs.m_descriptorUpdateTemplate; - } - - bool operator!=( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate != rhs.m_descriptorUpdateTemplate; - } - - bool operator<( DescriptorUpdateTemplate const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate < rhs.m_descriptorUpdateTemplate; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorUpdateTemplate() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate == VK_NULL_HANDLE; - } - - private: - VkDescriptorUpdateTemplate m_descriptorUpdateTemplate = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - using DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; - - class Event - { - public: - using CType = VkEvent; - using NativeType = VkEvent; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; - - public: - VULKAN_HPP_CONSTEXPR Event() = default; - VULKAN_HPP_CONSTEXPR Event( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) VULKAN_HPP_NOEXCEPT : m_event( event ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Event & operator=( VkEvent event ) VULKAN_HPP_NOEXCEPT - { - m_event = event; - return *this; - } -#endif - - Event & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_event = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Event const & ) const = default; -#else - bool operator==( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event == rhs.m_event; - } - - bool operator!=( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event != rhs.m_event; - } - - bool operator<( Event const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_event < rhs.m_event; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const VULKAN_HPP_NOEXCEPT - { - return m_event; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_event != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_event == VK_NULL_HANDLE; - } - - private: - VkEvent m_event = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Event; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Event; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class AccelerationStructureKHR - { - public: - using CType = VkAccelerationStructureKHR; - using NativeType = VkAccelerationStructureKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; - - public: - VULKAN_HPP_CONSTEXPR AccelerationStructureKHR() = default; - VULKAN_HPP_CONSTEXPR AccelerationStructureKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT AccelerationStructureKHR( VkAccelerationStructureKHR accelerationStructureKHR ) VULKAN_HPP_NOEXCEPT - : m_accelerationStructureKHR( accelerationStructureKHR ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - AccelerationStructureKHR & operator=( VkAccelerationStructureKHR accelerationStructureKHR ) VULKAN_HPP_NOEXCEPT - { - m_accelerationStructureKHR = accelerationStructureKHR; - return *this; - } -#endif - - AccelerationStructureKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_accelerationStructureKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureKHR const & ) const = default; -#else - bool operator==( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR == rhs.m_accelerationStructureKHR; - } - - bool operator!=( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR != rhs.m_accelerationStructureKHR; - } - - bool operator<( AccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR < rhs.m_accelerationStructureKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureKHR() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructureKHR == VK_NULL_HANDLE; - } - - private: - VkAccelerationStructureKHR m_accelerationStructureKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class CommandBuffer - { - public: - using CType = VkCommandBuffer; - using NativeType = VkCommandBuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; - - public: - VULKAN_HPP_CONSTEXPR CommandBuffer() = default; - VULKAN_HPP_CONSTEXPR CommandBuffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - CommandBuffer( VkCommandBuffer commandBuffer ) VULKAN_HPP_NOEXCEPT : m_commandBuffer( commandBuffer ) {} - - CommandBuffer & operator=( VkCommandBuffer commandBuffer ) VULKAN_HPP_NOEXCEPT - { - m_commandBuffer = commandBuffer; - return *this; - } - - CommandBuffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_commandBuffer = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBuffer const & ) const = default; -#else - bool operator==( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer == rhs.m_commandBuffer; - } - - bool operator!=( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer != rhs.m_commandBuffer; - } - - bool operator<( CommandBuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer < rhs.m_commandBuffer; - } -#endif - - //=== VK_VERSION_1_0 === - - template - VULKAN_HPP_NODISCARD Result begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo * pBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result end( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type end( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setViewport( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setViewport( uint32_t firstViewport, - ArrayProxy const & viewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setScissor( uint32_t firstScissor, - uint32_t scissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setScissor( uint32_t firstScissor, - ArrayProxy const & scissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setLineWidth( float lineWidth, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBias( float depthBiasConstantFactor, - float depthBiasClamp, - float depthBiasSlopeFactor, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setBlendConstants( const float blendConstants[4], Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - uint32_t compareMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - uint32_t writeMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - uint32_t reference, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - uint32_t dynamicOffsetCount, - const uint32_t * pDynamicOffsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - ArrayProxy const & descriptorSets, - ArrayProxy const & dynamicOffsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::IndexType indexType, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void bindVertexBuffers( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void bindVertexBuffers( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void draw( uint32_t vertexCount, - uint32_t instanceCount, - uint32_t firstVertex, - uint32_t firstInstance, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndexed( uint32_t indexCount, - uint32_t instanceCount, - uint32_t firstIndex, - int32_t vertexOffset, - uint32_t firstInstance, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void dispatch( uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferCopy * pRegions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageCopy * pRegions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageBlit * pRegions, - VULKAN_HPP_NAMESPACE::Filter filter, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - VULKAN_HPP_NAMESPACE::Filter filter, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize dataSize, - const void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - ArrayProxy const & data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - uint32_t data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue * pColor, - uint32_t rangeCount, - const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue & color, - ArrayProxy const & ranges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue * pDepthStencil, - uint32_t rangeCount, - const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, - ArrayProxy const & ranges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void clearAttachments( uint32_t attachmentCount, - const VULKAN_HPP_NAMESPACE::ClearAttachment * pAttachments, - uint32_t rectCount, - const VULKAN_HPP_NAMESPACE::ClearRect * pRects, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void clearAttachments( ArrayProxy const & attachments, - ArrayProxy const & rects, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - uint32_t regionCount, - const VULKAN_HPP_NAMESPACE::ImageResolve * pRegions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void resetEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void waitEvents( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - uint32_t memoryBarrierCount, - const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void waitEvents( ArrayProxy const & events, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - uint32_t memoryBarrierCount, - const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - uint32_t size, - const void * pValues, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - ArrayProxy const & values, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void endRenderPass( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void executeCommands( uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void executeCommands( ArrayProxy const & commandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - void setDeviceMask( uint32_t deviceMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void dispatchBase( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_2 === - - template - void drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_3 === - - template - void setEvent2( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setEvent2( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resetEvent2( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void waitEvents2( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void waitEvents2( ArrayProxy const & events, - ArrayProxy const & dependencyInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endRendering( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setViewportWithCount( uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setViewportWithCount( ArrayProxy const & viewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setScissorWithCount( uint32_t scissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setScissorWithCount( ArrayProxy const & scissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void bindVertexBuffers2( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void bindVertexBuffers2( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_debug_marker === - - template - void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void debugMarkerEndEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - template - void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR * pBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR * pEndCodingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR * pCodingControlInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - template - void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR * pFrameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & frameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - template - void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void - beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endTransformFeedbackEXT( uint32_t firstCounterBuffer, - uint32_t counterBufferCount, - const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void - endTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - uint32_t index, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - uint32_t index, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndirectByteCountEXT( uint32_t instanceCount, - uint32_t firstInstance, - VULKAN_HPP_NAMESPACE::Buffer counterBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, - uint32_t counterOffset, - uint32_t vertexStride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NVX_binary_import === - - template - void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX * pLaunchInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_draw_indirect_count === - - template - void drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_dynamic_rendering === - - template - void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endRenderingKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_device_group === - - template - void setDeviceMaskKHR( uint32_t deviceMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void dispatchBaseKHR( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_push_descriptor === - - template - void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - uint32_t descriptorWriteCount, - const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - ArrayProxy const & descriptorWrites, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - const void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - DataType const & data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_conditional_rendering === - - template - void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endConditionalRenderingEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_clip_space_w_scaling === - - template - void setViewportWScalingNV( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setViewportWScalingNV( uint32_t firstViewport, - ArrayProxy const & viewportWScalings, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_discard_rectangles === - - template - void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - ArrayProxy const & discardRectangles, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_create_renderpass2 === - - template - void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_debug_utils === - - template - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endDebugUtilsLabelEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_sample_locations === - - template - void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT * pSampleLocationsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_acceleration_structure === - - template - void buildAccelerationStructuresKHR( uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void buildAccelerationStructuresKHR( ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void buildAccelerationStructuresIndirectKHR( uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::DeviceAddress * pIndirectDeviceAddresses, - const uint32_t * pIndirectStrides, - const uint32_t * const * ppMaxPrimitiveCounts, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void buildAccelerationStructuresIndirectKHR( ArrayProxy const & infos, - ArrayProxy const & indirectDeviceAddresses, - ArrayProxy const & indirectStrides, - ArrayProxy const & pMaxPrimitiveCounts, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_shading_rate_image === - - template - void bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setViewportShadingRatePaletteNV( uint32_t firstViewport, - uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setViewportShadingRatePaletteNV( uint32_t firstViewport, - ArrayProxy const & shadingRatePalettes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, - const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - ArrayProxy const & customSampleOrders, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_ray_tracing === - - template - void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, - VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void writeAccelerationStructuresPropertiesNV( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_draw_indirect_count === - - template - void drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_AMD_buffer_marker === - - template - void writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_mesh_shader === - - template - void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_scissor_exclusive === - - template - void setExclusiveScissorNV( uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setExclusiveScissorNV( uint32_t firstExclusiveScissor, - ArrayProxy const & exclusiveScissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_device_diagnostic_checkpoints === - - template - void setCheckpointNV( const void * pCheckpointMarker, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setCheckpointNV( CheckpointMarkerType const & checkpointMarker, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_INTEL_performance_query === - - template - VULKAN_HPP_NODISCARD Result setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL * pMarkerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL * pMarkerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL * pOverrideInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_fragment_shading_rate === - - template - void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D * pFragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_line_rasterization === - - template - void setLineStippleEXT( uint32_t lineStippleFactor, - uint16_t lineStipplePattern, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_extended_dynamic_state === - - template - void setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setViewportWithCountEXT( uint32_t viewportCount, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setViewportWithCountEXT( ArrayProxy const & viewports, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setScissorWithCountEXT( uint32_t scissorCount, - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setScissorWithCountEXT( ArrayProxy const & scissors, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void bindVertexBuffers2EXT( uint32_t firstBinding, - uint32_t bindingCount, - const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, - const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, - const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, - const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void bindVertexBuffers2EXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_device_generated_commands === - - template - void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t groupIndex, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - template - void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR * pEncodeInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_KHR_synchronization2 === - - template - void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void waitEvents2KHR( uint32_t eventCount, - const VULKAN_HPP_NAMESPACE::Event * pEvents, - const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void waitEvents2KHR( ArrayProxy const & events, - ArrayProxy const & dependencyInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_fragment_shading_rate_enums === - - template - void setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_mesh_shader === - - template - void drawMeshTasksEXT( uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_copy_commands2 === - - template - void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_ray_tracing_pipeline === - - template - void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_vertex_input_dynamic_state === - - template - void setVertexInputEXT( uint32_t vertexBindingDescriptionCount, - const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT * pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT * pVertexAttributeDescriptions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setVertexInputEXT( ArrayProxy const & vertexBindingDescriptions, - ArrayProxy const & vertexAttributeDescriptions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_HUAWEI_subpass_shading === - - template - void subpassShadingHUAWEI( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_HUAWEI_invocation_mask === - - template - void bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_extended_dynamic_state2 === - - template - void setPatchControlPointsEXT( uint32_t patchControlPoints, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_color_write_enable === - - template - void setColorWriteEnableEXT( uint32_t attachmentCount, - const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setColorWriteEnableEXT( ArrayProxy const & colorWriteEnables, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_ray_tracing_maintenance1 === - - template - void traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_multi_draw === - - template - void drawMultiEXT( uint32_t drawCount, - const VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT * pVertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void drawMultiEXT( ArrayProxy const & vertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void drawMultiIndexedEXT( uint32_t drawCount, - const VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT * pIndexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - const int32_t * pVertexOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void drawMultiIndexedEXT( ArrayProxy const & indexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Optional vertexOffset VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - operator VkCommandBuffer() const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer == VK_NULL_HANDLE; - } - - private: - VkCommandBuffer m_commandBuffer = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CommandBuffer; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CommandBuffer; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DeviceMemory - { - public: - using CType = VkDeviceMemory; - using NativeType = VkDeviceMemory; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; - - public: - VULKAN_HPP_CONSTEXPR DeviceMemory() = default; - VULKAN_HPP_CONSTEXPR DeviceMemory( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT : m_deviceMemory( deviceMemory ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DeviceMemory & operator=( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT - { - m_deviceMemory = deviceMemory; - return *this; - } -#endif - - DeviceMemory & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_deviceMemory = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemory const & ) const = default; -#else - bool operator==( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory == rhs.m_deviceMemory; - } - - bool operator!=( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory != rhs.m_deviceMemory; - } - - bool operator<( DeviceMemory const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory < rhs.m_deviceMemory; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_deviceMemory == VK_NULL_HANDLE; - } - - private: - VkDeviceMemory m_deviceMemory = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DeviceMemory; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DeviceMemory; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoSessionKHR - { - public: - using CType = VkVideoSessionKHR; - using NativeType = VkVideoSessionKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR VideoSessionKHR() = default; - VULKAN_HPP_CONSTEXPR VideoSessionKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT VideoSessionKHR( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT : m_videoSessionKHR( videoSessionKHR ) {} - -# if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - VideoSessionKHR & operator=( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT - { - m_videoSessionKHR = videoSessionKHR; - return *this; - } -# endif - - VideoSessionKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_videoSessionKHR = {}; - return *this; - } - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionKHR const & ) const = default; -# else - bool operator==( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR == rhs.m_videoSessionKHR; - } - - bool operator!=( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR != rhs.m_videoSessionKHR; - } - - bool operator<( VideoSessionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR < rhs.m_videoSessionKHR; - } -# endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionKHR() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionKHR == VK_NULL_HANDLE; - } - - private: - VkVideoSessionKHR m_videoSessionKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::VideoSessionKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - class DeferredOperationKHR - { - public: - using CType = VkDeferredOperationKHR; - using NativeType = VkDeferredOperationKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR DeferredOperationKHR() = default; - VULKAN_HPP_CONSTEXPR DeferredOperationKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DeferredOperationKHR( VkDeferredOperationKHR deferredOperationKHR ) VULKAN_HPP_NOEXCEPT - : m_deferredOperationKHR( deferredOperationKHR ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DeferredOperationKHR & operator=( VkDeferredOperationKHR deferredOperationKHR ) VULKAN_HPP_NOEXCEPT - { - m_deferredOperationKHR = deferredOperationKHR; - return *this; - } -#endif - - DeferredOperationKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_deferredOperationKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeferredOperationKHR const & ) const = default; -#else - bool operator==( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR == rhs.m_deferredOperationKHR; - } - - bool operator!=( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR != rhs.m_deferredOperationKHR; - } - - bool operator<( DeferredOperationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR < rhs.m_deferredOperationKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeferredOperationKHR() const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_deferredOperationKHR == VK_NULL_HANDLE; - } - - private: - VkDeferredOperationKHR m_deferredOperationKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DeferredOperationKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - class BufferCollectionFUCHSIA - { - public: - using CType = VkBufferCollectionFUCHSIA; - using NativeType = VkBufferCollectionFUCHSIA; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; - - public: - VULKAN_HPP_CONSTEXPR BufferCollectionFUCHSIA() = default; - VULKAN_HPP_CONSTEXPR BufferCollectionFUCHSIA( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT BufferCollectionFUCHSIA( VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA ) VULKAN_HPP_NOEXCEPT - : m_bufferCollectionFUCHSIA( bufferCollectionFUCHSIA ) - { - } - -# if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - BufferCollectionFUCHSIA & operator=( VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA ) VULKAN_HPP_NOEXCEPT - { - m_bufferCollectionFUCHSIA = bufferCollectionFUCHSIA; - return *this; - } -# endif - - BufferCollectionFUCHSIA & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_bufferCollectionFUCHSIA = {}; - return *this; - } - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA == rhs.m_bufferCollectionFUCHSIA; - } - - bool operator!=( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA != rhs.m_bufferCollectionFUCHSIA; - } - - bool operator<( BufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA < rhs.m_bufferCollectionFUCHSIA; - } -# endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferCollectionFUCHSIA() const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_bufferCollectionFUCHSIA == VK_NULL_HANDLE; - } - - private: - VkBufferCollectionFUCHSIA m_bufferCollectionFUCHSIA = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - class BufferView - { - public: - using CType = VkBufferView; - using NativeType = VkBufferView; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; - - public: - VULKAN_HPP_CONSTEXPR BufferView() = default; - VULKAN_HPP_CONSTEXPR BufferView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT : m_bufferView( bufferView ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - BufferView & operator=( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT - { - m_bufferView = bufferView; - return *this; - } -#endif - - BufferView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_bufferView = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferView const & ) const = default; -#else - bool operator==( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView == rhs.m_bufferView; - } - - bool operator!=( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView != rhs.m_bufferView; - } - - bool operator<( BufferView const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_bufferView < rhs.m_bufferView; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const VULKAN_HPP_NOEXCEPT - { - return m_bufferView; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_bufferView != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_bufferView == VK_NULL_HANDLE; - } - - private: - VkBufferView m_bufferView = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::BufferView; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::BufferView; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class CommandPool - { - public: - using CType = VkCommandPool; - using NativeType = VkCommandPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; - - public: - VULKAN_HPP_CONSTEXPR CommandPool() = default; - VULKAN_HPP_CONSTEXPR CommandPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT : m_commandPool( commandPool ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - CommandPool & operator=( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT - { - m_commandPool = commandPool; - return *this; - } -#endif - - CommandPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_commandPool = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandPool const & ) const = default; -#else - bool operator==( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool == rhs.m_commandPool; - } - - bool operator!=( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool != rhs.m_commandPool; - } - - bool operator<( CommandPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_commandPool < rhs.m_commandPool; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const VULKAN_HPP_NOEXCEPT - { - return m_commandPool; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_commandPool != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_commandPool == VK_NULL_HANDLE; - } - - private: - VkCommandPool m_commandPool = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CommandPool; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CommandPool; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class PipelineCache - { - public: - using CType = VkPipelineCache; - using NativeType = VkPipelineCache; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; - - public: - VULKAN_HPP_CONSTEXPR PipelineCache() = default; - VULKAN_HPP_CONSTEXPR PipelineCache( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT : m_pipelineCache( pipelineCache ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - PipelineCache & operator=( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT - { - m_pipelineCache = pipelineCache; - return *this; - } -#endif - - PipelineCache & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_pipelineCache = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCache const & ) const = default; -#else - bool operator==( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache == rhs.m_pipelineCache; - } - - bool operator!=( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache != rhs.m_pipelineCache; - } - - bool operator<( PipelineCache const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache < rhs.m_pipelineCache; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache == VK_NULL_HANDLE; - } - - private: - VkPipelineCache m_pipelineCache = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PipelineCache; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PipelineCache; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class CuFunctionNVX - { - public: - using CType = VkCuFunctionNVX; - using NativeType = VkCuFunctionNVX; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; - - public: - VULKAN_HPP_CONSTEXPR CuFunctionNVX() = default; - VULKAN_HPP_CONSTEXPR CuFunctionNVX( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT CuFunctionNVX( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT : m_cuFunctionNVX( cuFunctionNVX ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - CuFunctionNVX & operator=( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT - { - m_cuFunctionNVX = cuFunctionNVX; - return *this; - } -#endif - - CuFunctionNVX & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_cuFunctionNVX = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuFunctionNVX const & ) const = default; -#else - bool operator==( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX == rhs.m_cuFunctionNVX; - } - - bool operator!=( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX != rhs.m_cuFunctionNVX; - } - - bool operator<( CuFunctionNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX < rhs.m_cuFunctionNVX; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuFunctionNVX() const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_cuFunctionNVX == VK_NULL_HANDLE; - } - - private: - VkCuFunctionNVX m_cuFunctionNVX = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CuFunctionNVX; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CuFunctionNVX; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class CuModuleNVX - { - public: - using CType = VkCuModuleNVX; - using NativeType = VkCuModuleNVX; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; - - public: - VULKAN_HPP_CONSTEXPR CuModuleNVX() = default; - VULKAN_HPP_CONSTEXPR CuModuleNVX( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT CuModuleNVX( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT : m_cuModuleNVX( cuModuleNVX ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - CuModuleNVX & operator=( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT - { - m_cuModuleNVX = cuModuleNVX; - return *this; - } -#endif - - CuModuleNVX & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_cuModuleNVX = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuModuleNVX const & ) const = default; -#else - bool operator==( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX == rhs.m_cuModuleNVX; - } - - bool operator!=( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX != rhs.m_cuModuleNVX; - } - - bool operator<( CuModuleNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX < rhs.m_cuModuleNVX; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuModuleNVX() const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_cuModuleNVX == VK_NULL_HANDLE; - } - - private: - VkCuModuleNVX m_cuModuleNVX = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CuModuleNVX; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::CuModuleNVX; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DescriptorPool - { - public: - using CType = VkDescriptorPool; - using NativeType = VkDescriptorPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; - - public: - VULKAN_HPP_CONSTEXPR DescriptorPool() = default; - VULKAN_HPP_CONSTEXPR DescriptorPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT : m_descriptorPool( descriptorPool ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DescriptorPool & operator=( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT - { - m_descriptorPool = descriptorPool; - return *this; - } -#endif - - DescriptorPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_descriptorPool = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPool const & ) const = default; -#else - bool operator==( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool == rhs.m_descriptorPool; - } - - bool operator!=( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool != rhs.m_descriptorPool; - } - - bool operator<( DescriptorPool const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool < rhs.m_descriptorPool; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool == VK_NULL_HANDLE; - } - - private: - VkDescriptorPool m_descriptorPool = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorPool; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorPool; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DescriptorSetLayout - { - public: - using CType = VkDescriptorSetLayout; - using NativeType = VkDescriptorSetLayout; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; - - public: - VULKAN_HPP_CONSTEXPR DescriptorSetLayout() = default; - VULKAN_HPP_CONSTEXPR DescriptorSetLayout( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT - : m_descriptorSetLayout( descriptorSetLayout ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DescriptorSetLayout & operator=( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT - { - m_descriptorSetLayout = descriptorSetLayout; - return *this; - } -#endif - - DescriptorSetLayout & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_descriptorSetLayout = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayout const & ) const = default; -#else - bool operator==( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout == rhs.m_descriptorSetLayout; - } - - bool operator!=( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout != rhs.m_descriptorSetLayout; - } - - bool operator<( DescriptorSetLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout < rhs.m_descriptorSetLayout; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout == VK_NULL_HANDLE; - } - - private: - VkDescriptorSetLayout m_descriptorSetLayout = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Framebuffer - { - public: - using CType = VkFramebuffer; - using NativeType = VkFramebuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; - - public: - VULKAN_HPP_CONSTEXPR Framebuffer() = default; - VULKAN_HPP_CONSTEXPR Framebuffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT : m_framebuffer( framebuffer ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Framebuffer & operator=( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT - { - m_framebuffer = framebuffer; - return *this; - } -#endif - - Framebuffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_framebuffer = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Framebuffer const & ) const = default; -#else - bool operator==( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer == rhs.m_framebuffer; - } - - bool operator!=( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer != rhs.m_framebuffer; - } - - bool operator<( Framebuffer const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer < rhs.m_framebuffer; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer == VK_NULL_HANDLE; - } - - private: - VkFramebuffer m_framebuffer = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Framebuffer; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Framebuffer; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class IndirectCommandsLayoutNV - { - public: - using CType = VkIndirectCommandsLayoutNV; - using NativeType = VkIndirectCommandsLayoutNV; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNV() = default; - VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNV( VkIndirectCommandsLayoutNV indirectCommandsLayoutNV ) VULKAN_HPP_NOEXCEPT - : m_indirectCommandsLayoutNV( indirectCommandsLayoutNV ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - IndirectCommandsLayoutNV & operator=( VkIndirectCommandsLayoutNV indirectCommandsLayoutNV ) VULKAN_HPP_NOEXCEPT - { - m_indirectCommandsLayoutNV = indirectCommandsLayoutNV; - return *this; - } -#endif - - IndirectCommandsLayoutNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_indirectCommandsLayoutNV = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsLayoutNV const & ) const = default; -#else - bool operator==( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV == rhs.m_indirectCommandsLayoutNV; - } - - bool operator!=( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV != rhs.m_indirectCommandsLayoutNV; - } - - bool operator<( IndirectCommandsLayoutNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV < rhs.m_indirectCommandsLayoutNV; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutNV() const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayoutNV == VK_NULL_HANDLE; - } - - private: - VkIndirectCommandsLayoutNV m_indirectCommandsLayoutNV = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class PrivateDataSlot - { - public: - using CType = VkPrivateDataSlot; - using NativeType = VkPrivateDataSlot; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR PrivateDataSlot() = default; - VULKAN_HPP_CONSTEXPR PrivateDataSlot( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT PrivateDataSlot( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT : m_privateDataSlot( privateDataSlot ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - PrivateDataSlot & operator=( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT - { - m_privateDataSlot = privateDataSlot; - return *this; - } -#endif - - PrivateDataSlot & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_privateDataSlot = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PrivateDataSlot const & ) const = default; -#else - bool operator==( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot == rhs.m_privateDataSlot; - } - - bool operator!=( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot != rhs.m_privateDataSlot; - } - - bool operator<( PrivateDataSlot const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot < rhs.m_privateDataSlot; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPrivateDataSlot() const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot == VK_NULL_HANDLE; - } - - private: - VkPrivateDataSlot m_privateDataSlot = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PrivateDataSlot; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - using PrivateDataSlotEXT = PrivateDataSlot; - - class RenderPass - { - public: - using CType = VkRenderPass; - using NativeType = VkRenderPass; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; - - public: - VULKAN_HPP_CONSTEXPR RenderPass() = default; - VULKAN_HPP_CONSTEXPR RenderPass( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT : m_renderPass( renderPass ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - RenderPass & operator=( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT - { - m_renderPass = renderPass; - return *this; - } -#endif - - RenderPass & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_renderPass = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPass const & ) const = default; -#else - bool operator==( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass == rhs.m_renderPass; - } - - bool operator!=( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass != rhs.m_renderPass; - } - - bool operator<( RenderPass const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_renderPass < rhs.m_renderPass; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const VULKAN_HPP_NOEXCEPT - { - return m_renderPass; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_renderPass != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_renderPass == VK_NULL_HANDLE; - } - - private: - VkRenderPass m_renderPass = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::RenderPass; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::RenderPass; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class Sampler - { - public: - using CType = VkSampler; - using NativeType = VkSampler; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; - - public: - VULKAN_HPP_CONSTEXPR Sampler() = default; - VULKAN_HPP_CONSTEXPR Sampler( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) VULKAN_HPP_NOEXCEPT : m_sampler( sampler ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - Sampler & operator=( VkSampler sampler ) VULKAN_HPP_NOEXCEPT - { - m_sampler = sampler; - return *this; - } -#endif - - Sampler & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_sampler = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Sampler const & ) const = default; -#else - bool operator==( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler == rhs.m_sampler; - } - - bool operator!=( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler != rhs.m_sampler; - } - - bool operator<( Sampler const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_sampler < rhs.m_sampler; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const VULKAN_HPP_NOEXCEPT - { - return m_sampler; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_sampler != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_sampler == VK_NULL_HANDLE; - } - - private: - VkSampler m_sampler = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Sampler; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Sampler; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class SamplerYcbcrConversion - { - public: - using CType = VkSamplerYcbcrConversion; - using NativeType = VkSamplerYcbcrConversion; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; - - public: - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion() = default; - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT SamplerYcbcrConversion( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT - : m_samplerYcbcrConversion( samplerYcbcrConversion ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - SamplerYcbcrConversion & operator=( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT - { - m_samplerYcbcrConversion = samplerYcbcrConversion; - return *this; - } -#endif - - SamplerYcbcrConversion & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_samplerYcbcrConversion = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversion const & ) const = default; -#else - bool operator==( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion == rhs.m_samplerYcbcrConversion; - } - - bool operator!=( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion != rhs.m_samplerYcbcrConversion; - } - - bool operator<( SamplerYcbcrConversion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion < rhs.m_samplerYcbcrConversion; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversion() const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_samplerYcbcrConversion == VK_NULL_HANDLE; - } - - private: - VkSamplerYcbcrConversion m_samplerYcbcrConversion = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - using SamplerYcbcrConversionKHR = SamplerYcbcrConversion; - - class ShaderModule - { - public: - using CType = VkShaderModule; - using NativeType = VkShaderModule; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; - - public: - VULKAN_HPP_CONSTEXPR ShaderModule() = default; - VULKAN_HPP_CONSTEXPR ShaderModule( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT : m_shaderModule( shaderModule ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - ShaderModule & operator=( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT - { - m_shaderModule = shaderModule; - return *this; - } -#endif - - ShaderModule & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_shaderModule = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModule const & ) const = default; -#else - bool operator==( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule == rhs.m_shaderModule; - } - - bool operator!=( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule != rhs.m_shaderModule; - } - - bool operator<( ShaderModule const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule < rhs.m_shaderModule; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule == VK_NULL_HANDLE; - } - - private: - VkShaderModule m_shaderModule = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ShaderModule; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ShaderModule; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class ValidationCacheEXT - { - public: - using CType = VkValidationCacheEXT; - using NativeType = VkValidationCacheEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; - - public: - VULKAN_HPP_CONSTEXPR ValidationCacheEXT() = default; - VULKAN_HPP_CONSTEXPR ValidationCacheEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT ValidationCacheEXT( VkValidationCacheEXT validationCacheEXT ) VULKAN_HPP_NOEXCEPT : m_validationCacheEXT( validationCacheEXT ) - { - } - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - ValidationCacheEXT & operator=( VkValidationCacheEXT validationCacheEXT ) VULKAN_HPP_NOEXCEPT - { - m_validationCacheEXT = validationCacheEXT; - return *this; - } -#endif - - ValidationCacheEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_validationCacheEXT = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ValidationCacheEXT const & ) const = default; -#else - bool operator==( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT == rhs.m_validationCacheEXT; - } - - bool operator!=( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT != rhs.m_validationCacheEXT; - } - - bool operator<( ValidationCacheEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT < rhs.m_validationCacheEXT; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkValidationCacheEXT() const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_validationCacheEXT == VK_NULL_HANDLE; - } - - private: - VkValidationCacheEXT m_validationCacheEXT = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoSessionParametersKHR - { - public: - using CType = VkVideoSessionParametersKHR; - using NativeType = VkVideoSessionParametersKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VULKAN_HPP_CONSTEXPR VideoSessionParametersKHR() = default; - VULKAN_HPP_CONSTEXPR VideoSessionParametersKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT VideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParametersKHR ) VULKAN_HPP_NOEXCEPT - : m_videoSessionParametersKHR( videoSessionParametersKHR ) - { - } - -# if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - VideoSessionParametersKHR & operator=( VkVideoSessionParametersKHR videoSessionParametersKHR ) VULKAN_HPP_NOEXCEPT - { - m_videoSessionParametersKHR = videoSessionParametersKHR; - return *this; - } -# endif - - VideoSessionParametersKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_videoSessionParametersKHR = {}; - return *this; - } - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionParametersKHR const & ) const = default; -# else - bool operator==( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR == rhs.m_videoSessionParametersKHR; - } - - bool operator!=( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR != rhs.m_videoSessionParametersKHR; - } - - bool operator<( VideoSessionParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR < rhs.m_videoSessionParametersKHR; - } -# endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionParametersKHR() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParametersKHR == VK_NULL_HANDLE; - } - - private: - VkVideoSessionParametersKHR m_videoSessionParametersKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - class Queue - { - public: - using CType = VkQueue; - using NativeType = VkQueue; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; - - public: - VULKAN_HPP_CONSTEXPR Queue() = default; - VULKAN_HPP_CONSTEXPR Queue( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - Queue( VkQueue queue ) VULKAN_HPP_NOEXCEPT : m_queue( queue ) {} - - Queue & operator=( VkQueue queue ) VULKAN_HPP_NOEXCEPT - { - m_queue = queue; - return *this; - } - - Queue & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_queue = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Queue const & ) const = default; -#else - bool operator==( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue == rhs.m_queue; - } - - bool operator!=( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue != rhs.m_queue; - } - - bool operator<( Queue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_queue < rhs.m_queue; - } -#endif - - //=== VK_VERSION_1_0 === - - template - VULKAN_HPP_NODISCARD Result submit( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - submit( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result bindSparse( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindSparseInfo * pBindInfo, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindSparse( ArrayProxy const & bindInfo, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_3 === - - template - VULKAN_HPP_NODISCARD Result submit2( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - submit2( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_swapchain === - - template - VULKAN_HPP_NODISCARD Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR * pPresentInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_debug_utils === - - template - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void endDebugUtilsLabelEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_device_diagnostic_checkpoints === - - template - void getCheckpointDataNV( uint32_t * pCheckpointDataCount, - VULKAN_HPP_NAMESPACE::CheckpointDataNV * pCheckpointData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getCheckpointDataNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = CheckpointDataNVAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_INTEL_performance_query === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_synchronization2 === - - template - VULKAN_HPP_NODISCARD Result submit2KHR( uint32_t submitCount, - const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, - VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - submit2KHR( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getCheckpointData2NV( uint32_t * pCheckpointDataCount, - VULKAN_HPP_NAMESPACE::CheckpointData2NV * pCheckpointData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getCheckpointData2NV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = CheckpointData2NVAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - operator VkQueue() const VULKAN_HPP_NOEXCEPT - { - return m_queue; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_queue != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_queue == VK_NULL_HANDLE; - } - - private: - VkQueue m_queue = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Queue; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Queue; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class Device; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueAccelerationStructureKHR = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueAccelerationStructureNV = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueBuffer = UniqueHandle; -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueBufferCollectionFUCHSIA = UniqueHandle; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueBufferView = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = PoolFree; - }; - using UniqueCommandBuffer = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueCommandPool = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueCuFunctionNVX = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueCuModuleNVX = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDeferredOperationKHR = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDescriptorPool = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = PoolFree; - }; - using UniqueDescriptorSet = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDescriptorSetLayout = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDescriptorUpdateTemplate = UniqueHandle; - using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectFree; - }; - using UniqueDeviceMemory = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueEvent = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueFence = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueFramebuffer = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueImage = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueImageView = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueIndirectCommandsLayoutNV = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniquePipeline = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniquePipelineCache = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniquePipelineLayout = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniquePrivateDataSlot = UniqueHandle; - using UniquePrivateDataSlotEXT = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueQueryPool = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueRenderPass = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueSampler = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueSamplerYcbcrConversion = UniqueHandle; - using UniqueSamplerYcbcrConversionKHR = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueSemaphore = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueShaderModule = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueSwapchainKHR = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueValidationCacheEXT = UniqueHandle; -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueVideoSessionKHR = UniqueHandle; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueVideoSessionParametersKHR = UniqueHandle; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - class Device - { - public: - using CType = VkDevice; - using NativeType = VkDevice; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; - - public: - VULKAN_HPP_CONSTEXPR Device() = default; - VULKAN_HPP_CONSTEXPR Device( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - Device( VkDevice device ) VULKAN_HPP_NOEXCEPT : m_device( device ) {} - - Device & operator=( VkDevice device ) VULKAN_HPP_NOEXCEPT - { - m_device = device; - return *this; - } - - Device & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_device = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Device const & ) const = default; -#else - bool operator==( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device == rhs.m_device; - } - - bool operator!=( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device != rhs.m_device; - } - - bool operator<( Device const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_device < rhs.m_device; - } -#endif - - //=== VK_VERSION_1_0 === - - template - PFN_vkVoidFunction getProcAddr( const char * pName, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getQueue( uint32_t queueFamilyIndex, - uint32_t queueIndex, - VULKAN_HPP_NAMESPACE::Queue * pQueue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue - getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo * pAllocateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DeviceMemory * pMemory, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - allocateMemoryUnique( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void( free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void( free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, - void ** ppData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD Result flushMappedMemoryRanges( uint32_t memoryRangeCount, - const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - flushMappedMemoryRanges( ArrayProxy const & memoryRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, - const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - invalidateMappedMemoryRanges( ArrayProxy const & memoryRanges, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize * pCommittedMemoryInBytes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize - getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements - getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements - getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements * pSparseMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageMemoryRequirementsAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, - SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createFenceUnique( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Fence fence, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Fence fence, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result resetFences( uint32_t fenceCount, - const VULKAN_HPP_NAMESPACE::Fence * pFences, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - typename ResultValueType::type resetFences( ArrayProxy const & fences, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result waitForFences( uint32_t fenceCount, - const VULKAN_HPP_NAMESPACE::Fence * pFences, - VULKAN_HPP_NAMESPACE::Bool32 waitAll, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForFences( ArrayProxy const & fences, - VULKAN_HPP_NAMESPACE::Bool32 waitAll, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Semaphore * pSemaphore, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSemaphoreUnique( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Event * pEvent, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createEventUnique( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyEvent( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyEvent( VULKAN_HPP_NAMESPACE::Event event VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Event event, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result setEvent( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setEvent( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result resetEvent( VULKAN_HPP_NAMESPACE::Event event, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::QueryPool * pQueryPool, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createQueryPoolUnique( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - void * pData, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD ResultValue> - getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue getQueryPoolResult( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Buffer * pBuffer, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createBufferUnique( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::BufferView * pView, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createBufferViewUnique( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Image * pImage, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createImageUnique( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyImage( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyImage( VULKAN_HPP_NAMESPACE::Image image VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Image image, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource * pSubresource, - VULKAN_HPP_NAMESPACE::SubresourceLayout * pLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout - getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ImageView * pView, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createImageViewUnique( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ShaderModule * pShaderModule, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createShaderModuleUnique( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PipelineCache * pPipelineCache, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createPipelineCacheUnique( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - size_t * pDataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Uint8_tAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - Uint8_tAllocator & uint8_tAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, - uint32_t srcCacheCount, - const VULKAN_HPP_NAMESPACE::PipelineCache * pSrcCaches, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, - ArrayProxy const & srcCaches, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD ResultValue> - createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue> - createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue - createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue> - createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD ResultValue> - createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue> - createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue - createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue> - createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PipelineLayout * pPipelineLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createPipelineLayoutUnique( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Sampler * pSampler, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSamplerUnique( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDescriptorSetLayoutUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorPool * pDescriptorPool, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDescriptorPoolUnique( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - Result resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - void resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo * pAllocateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = DescriptorSetAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - DescriptorSetAllocator & descriptorSetAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type - allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = DescriptorSetAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type - allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, - DescriptorSetAllocator & descriptorSetAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - Result freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - ArrayProxy const & descriptorSets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - Result( free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void( free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, - ArrayProxy const & descriptorSets, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void updateDescriptorSets( uint32_t descriptorWriteCount, - const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, - uint32_t descriptorCopyCount, - const VULKAN_HPP_NAMESPACE::CopyDescriptorSet * pDescriptorCopies, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateDescriptorSets( ArrayProxy const & descriptorWrites, - ArrayProxy const & descriptorCopies, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Framebuffer * pFramebuffer, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createFramebufferUnique( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createRenderPassUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D - getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CommandPool * pCommandPool, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createCommandPoolUnique( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo * pAllocateInfo, - VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = CommandBufferAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - CommandBufferAllocator & commandBufferAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type - allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = CommandBufferAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type - allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, - CommandBufferAllocator & commandBufferAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - ArrayProxy const & commandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void( free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - uint32_t commandBufferCount, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void( free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - ArrayProxy const & commandBuffers, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - VULKAN_HPP_NODISCARD Result bindBufferMemory2( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindBufferMemory2( ArrayProxy const & bindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result bindImageMemory2( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindImageMemory2( ArrayProxy const & bindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getGroupPeerMemoryFeatures( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - getGroupPeerMemoryFeatures( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 * pQueueInfo, - VULKAN_HPP_NAMESPACE::Queue * pQueue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 & queueInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSamplerYcbcrConversionUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDescriptorUpdateTemplateUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_2 === - - template - VULKAN_HPP_NODISCARD Result createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createRenderPass2Unique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD Result getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - uint64_t * pValue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_3 === - - template - VULKAN_HPP_NODISCARD Result createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createPrivateDataSlotUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD uint64_t getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_swapchain === - - template - VULKAN_HPP_NODISCARD Result createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchain, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint32_t * pSwapchainImageCount, - VULKAN_HPP_NAMESPACE::Image * pSwapchainImages, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ImageAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t timeout, - VULKAN_HPP_NAMESPACE::Semaphore semaphore, - VULKAN_HPP_NAMESPACE::Fence fence, - uint32_t * pImageIndex, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD ResultValue acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t timeout, - VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getGroupPresentCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getGroupPresentCapabilitiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR * pAcquireInfo, - uint32_t * pImageIndex, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD ResultValue acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_display_swapchain === - - template - VULKAN_HPP_NODISCARD Result createSharedSwapchainsKHR( uint32_t swapchainCount, - const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSharedSwapchainsKHR( ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = SwapchainKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSharedSwapchainsKHR( ArrayProxy const & createInfos, - Optional allocator, - SwapchainKHRAllocator & swapchainKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSharedSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type - createSharedSwapchainsKHRUnique( ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = SwapchainKHRAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type - createSharedSwapchainsKHRUnique( ArrayProxy const & createInfos, - Optional allocator, - SwapchainKHRAllocator & swapchainKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_debug_marker === - - template - VULKAN_HPP_NODISCARD Result debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT * pTagInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT * pNameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - template - VULKAN_HPP_NODISCARD Result createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::VideoSessionKHR * pVideoSession, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createVideoSessionKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - uint32_t * pMemoryRequirementsCount, - VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = VideoSessionMemoryRequirementsKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - VideoSessionMemoryRequirementsKHRAllocator & videoSessionMemoryRequirementsKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - uint32_t bindSessionMemoryInfoCount, - const VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, - ArrayProxy const & bindSessionMemoryInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR * pVideoSessionParameters, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createVideoSessionParametersKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR * pUpdateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - - template - VULKAN_HPP_NODISCARD Result createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CuModuleNVX * pModule, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createCuModuleNVXUnique( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::CuFunctionNVX * pFunction, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createCuFunctionNVXUnique( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NVX_image_view_handle === - - template - uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_shader_info === - - template - VULKAN_HPP_NODISCARD Result getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - size_t * pInfoSize, - void * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Uint8_tAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, - Uint8_tAllocator & uint8_tAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - - template - VULKAN_HPP_NODISCARD Result getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, - HANDLE * pHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_device_group === - - template - void getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_maintenance1 === - - template - void trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, - VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - - template - VULKAN_HPP_NODISCARD Result getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, - HANDLE * pHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryWin32HandlePropertiesKHR( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - - template - VULKAN_HPP_NODISCARD Result getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - int fd, - VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR * pMemoryFdProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryFdPropertiesKHR( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - - template - VULKAN_HPP_NODISCARD Result importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, - HANDLE * pHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - - template - VULKAN_HPP_NODISCARD Result importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_descriptor_update_template === - - template - VULKAN_HPP_NODISCARD Result createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDescriptorUpdateTemplateKHRUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, - Optional allocator - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - const void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_display_control === - - template - VULKAN_HPP_NODISCARD Result displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT * pDisplayPowerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - typename ResultValueType::type displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT * pDeviceEventInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - registerEventEXTUnique( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT * pDisplayEventInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Fence * pFence, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, - uint64_t * pCounterValue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_GOOGLE_display_timing === - - template - VULKAN_HPP_NODISCARD Result getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE * pDisplayTimingProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint32_t * pPresentationTimingCount, - VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE * pPresentationTimings, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PastPresentationTimingGOOGLEAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_hdr_metadata === - - template - void setHdrMetadataEXT( uint32_t swapchainCount, - const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, - const VULKAN_HPP_NAMESPACE::HdrMetadataEXT * pMetadata, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void setHdrMetadataEXT( ArrayProxy const & swapchains, - ArrayProxy const & metadata, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_create_renderpass2 === - - template - VULKAN_HPP_NODISCARD Result createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createRenderPass2KHRUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_shared_presentable_image === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - - template - VULKAN_HPP_NODISCARD Result importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, - HANDLE * pHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - - template - VULKAN_HPP_NODISCARD Result importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR * pImportFenceFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR * pGetFdInfo, - int * pFd, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_performance_query === - - template - VULKAN_HPP_NODISCARD Result acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void releaseProfilingLockKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_debug_utils === - - template - VULKAN_HPP_NODISCARD Result setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pNameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT * pTagInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - - template - VULKAN_HPP_NODISCARD Result - getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer * buffer, - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID * pInfo, - struct AHardwareBuffer ** pBuffer, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_KHR_get_memory_requirements2 === - - template - void getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_acceleration_structure === - - template - VULKAN_HPP_NODISCARD Result createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructure, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createAccelerationStructureKHRUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - uint32_t infoCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - void * pData, - size_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - size_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - writeAccelerationStructuresPropertyKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t stride, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - DeviceAddress getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::DeviceAddress - getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR * pVersionInfo, - VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR - getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pBuildInfo, - const uint32_t * pMaxPrimitiveCounts, - VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR - getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, - ArrayProxy const & maxPrimitiveCounts VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_sampler_ycbcr_conversion === - - template - VULKAN_HPP_NODISCARD Result createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createSamplerYcbcrConversionKHRUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_bind_memory2 === - - template - VULKAN_HPP_NODISCARD Result bindBufferMemory2KHR( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindBufferMemory2KHR( ArrayProxy const & bindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result bindImageMemory2KHR( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindImageMemory2KHR( ArrayProxy const & bindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_image_drm_format_modifier === - - template - VULKAN_HPP_NODISCARD Result getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_validation_cache === - - template - VULKAN_HPP_NODISCARD Result createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pValidationCache, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createValidationCacheEXTUnique( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, - uint32_t srcCacheCount, - const VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pSrcCaches, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, - ArrayProxy const & srcCaches, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - size_t * pDataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Uint8_tAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, - Uint8_tAllocator & uint8_tAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_ray_tracing === - - template - VULKAN_HPP_NODISCARD Result createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructure, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createAccelerationStructureNVUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR - getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, - const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV * pBindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - bindAccelerationStructureMemoryNV( ArrayProxy const & bindInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue - createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingShaderGroupHandleNV( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - size_t dataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type getAccelerationStructureHandleNV( - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t shader, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_maintenance3 === - - template - void getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_external_memory_host === - - template - VULKAN_HPP_NODISCARD Result getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - const void * pHostPointer, - VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - const void * pHostPointer, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_calibrated_timestamps === - - template - VULKAN_HPP_NODISCARD Result getCalibratedTimestampsEXT( uint32_t timestampCount, - const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT * pTimestampInfos, - uint64_t * pTimestamps, - uint64_t * pMaxDeviation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type - getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = Uint64_tAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type - getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos, - Uint64_tAllocator & uint64_tAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT & timestampInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_timeline_semaphore === - - template - VULKAN_HPP_NODISCARD Result getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, - uint64_t * pValue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_INTEL_performance_query === - - template - VULKAN_HPP_NODISCARD Result initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL * pInitializeInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void uninitializePerformanceApiINTEL( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD Result acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL * pConfiguration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - acquirePerformanceConfigurationINTELUnique( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, - VULKAN_HPP_NAMESPACE::PerformanceValueINTEL * pValue, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_AMD_display_native_hdr === - - template - void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, - VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_buffer_device_address === - - template - DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_present_wait === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t presentId, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - uint64_t presentId, - uint64_t timeout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_buffer_device_address === - - template - DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_host_query_reset === - - template - void resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_deferred_host_operations === - - template - VULKAN_HPP_NODISCARD Result createDeferredOperationKHR( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DeferredOperationKHR * pDeferredOperation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDeferredOperationKHR( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDeferredOperationKHRUnique( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_pipeline_executable_properties === - - template - VULKAN_HPP_NODISCARD Result getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR * pPipelineInfo, - uint32_t * pExecutableCount, - VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PipelineExecutablePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, - PipelineExecutablePropertiesKHRAllocator & pipelineExecutablePropertiesKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pStatisticCount, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR * pStatistics, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PipelineExecutableStatisticKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - PipelineExecutableStatisticKHRAllocator & pipelineExecutableStatisticKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, - uint32_t * pInternalRepresentationCount, - VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR * pInternalRepresentations, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType< - std::vector>::type - getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PipelineExecutableInternalRepresentationKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType< - std::vector>::type - getPipelineExecutableInternalRepresentationsKHR( - const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, - PipelineExecutableInternalRepresentationKHRAllocator & pipelineExecutableInternalRepresentationKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_device_generated_commands === - - template - void getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV * pIndirectCommandsLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createIndirectCommandsLayoutNVUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_private_data === - - template - VULKAN_HPP_NODISCARD Result createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createPrivateDataSlotEXTUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD uint64_t getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - template - void exportMetalObjectsEXT( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT * pMetalObjectsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT - exportMetalObjectsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - exportMetalObjectsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_image_compression_control === - - template - void getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT * pSubresource, - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT * pLayout, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT - getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, - const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_ray_tracing_pipeline === - - template - VULKAN_HPP_NODISCARD Result createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - uint32_t createInfoCount, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR * pCreateInfos, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue - createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template >> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template >, - typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> - VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> - createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - ArrayProxy const & createInfos, - Optional allocator, - PipelineAllocator & pipelineAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD ResultValue> - createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingShaderGroupHandleKHR( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - void * pData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t firstGroup, - uint32_t groupCount, - size_t dataSize, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingCaptureReplayShaderGroupHandleKHR( - VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - DeviceSize getRayTracingShaderGroupStackSizeKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t group, - VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - - template - VULKAN_HPP_NODISCARD Result getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - - template - VULKAN_HPP_NODISCARD Result - importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, - zx_handle_t * pZirconHandle, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - template - VULKAN_HPP_NODISCARD Result createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA * pCollection, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createBufferCollectionFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA * pImageConstraintsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result - setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - - template - VULKAN_HPP_NODISCARD Result - getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, - VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD ResultValue - getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_external_memory_rdma === - - template - VULKAN_HPP_NODISCARD Result getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, - VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_pipeline_properties === - - template - VULKAN_HPP_NODISCARD Result getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT * pPipelineInfo, - VULKAN_HPP_NAMESPACE::BaseOutStructure * pPipelineProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_pageable_device_local_memory === - - template - void setMemoryPriorityEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory, - float priority, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_maintenance4 === - - template - void getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, - uint32_t * pSparseMemoryRequirementCount, - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, - SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VALVE_descriptor_set_host_mapping === - - template - void getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE * pBindingReference, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE * pHostMapping, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE - getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - void ** ppData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD void * getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_shader_module_identifier === - - template - void getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_QCOM_tile_properties === - - template - VULKAN_HPP_NODISCARD Result getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - uint32_t * pPropertiesCount, - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = TilePropertiesQCOMAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, - TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - Result getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::TilePropertiesQCOM - getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - operator VkDevice() const VULKAN_HPP_NOEXCEPT - { - return m_device; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_device != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_device == VK_NULL_HANDLE; - } - - private: - VkDevice m_device = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Device; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Device; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - class DisplayModeKHR - { - public: - using CType = VkDisplayModeKHR; - using NativeType = VkDisplayModeKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; - - public: - VULKAN_HPP_CONSTEXPR DisplayModeKHR() = default; - VULKAN_HPP_CONSTEXPR DisplayModeKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT : m_displayModeKHR( displayModeKHR ) {} - -#if defined( VULKAN_HPP_TYPESAFE_CONVERSION ) - DisplayModeKHR & operator=( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT - { - m_displayModeKHR = displayModeKHR; - return *this; - } -#endif - - DisplayModeKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_displayModeKHR = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeKHR const & ) const = default; -#else - bool operator==( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR == rhs.m_displayModeKHR; - } - - bool operator!=( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR != rhs.m_displayModeKHR; - } - - bool operator<( DisplayModeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR < rhs.m_displayModeKHR; - } -#endif - - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR == VK_NULL_HANDLE; - } - - private: - VkDisplayModeKHR m_displayModeKHR = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DisplayModeKHR; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::DisplayModeKHR; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDevice = UniqueHandle; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - class PhysicalDevice - { - public: - using CType = VkPhysicalDevice; - using NativeType = VkPhysicalDevice; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePhysicalDevice; - - public: - VULKAN_HPP_CONSTEXPR PhysicalDevice() = default; - VULKAN_HPP_CONSTEXPR PhysicalDevice( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - PhysicalDevice( VkPhysicalDevice physicalDevice ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( physicalDevice ) {} - - PhysicalDevice & operator=( VkPhysicalDevice physicalDevice ) VULKAN_HPP_NOEXCEPT - { - m_physicalDevice = physicalDevice; - return *this; - } - - PhysicalDevice & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_physicalDevice = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice const & ) const = default; -#else - bool operator==( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice == rhs.m_physicalDevice; - } - - bool operator!=( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice != rhs.m_physicalDevice; - } - - bool operator<( PhysicalDevice const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice < rhs.m_physicalDevice; - } -#endif - - //=== VK_VERSION_1_0 === - - template - void getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pFeatures, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures - getFeatures( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties * pFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties - getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ImageFormatProperties * pImageFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties - getProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getQueueFamilyProperties( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties * pQueueFamilyProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = QueueFamilyPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties * pMemoryProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties - getMemoryProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Device * pDevice, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDeviceUnique( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result enumerateDeviceExtensionProperties( const char * pLayerName, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateDeviceExtensionProperties( Optional layerName, - ExtensionPropertiesAllocator & extensionPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result enumerateDeviceLayerProperties( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateDeviceLayerProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageFormatPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - SparseImageFormatPropertiesAllocator & sparseImageFormatPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - void getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 - getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = QueueFamilyProperties2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = StructureChainAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageFormatProperties2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties - getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties - getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_3 === - - template - VULKAN_HPP_NODISCARD Result getToolProperties( uint32_t * pToolCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getToolProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceToolPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_surface === - - template - VULKAN_HPP_NODISCARD Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, - VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::Bool32 * pSupported, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getSurfaceSupportKHR( - uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR * pSurfaceCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pSurfaceFormatCount, - VULKAN_HPP_NAMESPACE::SurfaceFormatKHR * pSurfaceFormats, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SurfaceFormatKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pPresentModeCount, - VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PresentModeKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - PresentModeKHRAllocator & presentModeKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_swapchain === - - template - VULKAN_HPP_NODISCARD Result getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - uint32_t * pRectCount, - VULKAN_HPP_NAMESPACE::Rect2D * pRects, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Rect2DAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( - VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_display === - - template - VULKAN_HPP_NODISCARD Result getDisplayPropertiesKHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPropertiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayPlanePropertiesKHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPlanePropertiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayPlanePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, - uint32_t * pDisplayCount, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( - uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayModePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DisplayModeKHR * pMode, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDisplayModeKHRUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, - uint32_t planeIndex, - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR * pCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type getDisplayPlaneCapabilitiesKHR( - VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - template - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, - Display * dpy, - VisualID visualID, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, - Display & dpy, - VisualID visualID, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - template - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, - xcb_connection_t * connection, - xcb_visualid_t visual_id, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, - xcb_connection_t & connection, - xcb_visualid_t visual_id, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - template - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, - struct wl_display * display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, - struct wl_display & display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - template - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - template - VULKAN_HPP_NODISCARD Result getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile, - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR * pCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, - uint32_t * pVideoFormatPropertyCount, - VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR * pVideoFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = VideoFormatPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, - VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_external_memory_capabilities === - - template - VULKAN_HPP_NODISCARD Result getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, - VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV * pExternalImageFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_get_physical_device_properties2 === - - template - void getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 - getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount, - VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = QueueFamilyProperties2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = StructureChainAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - template - VULKAN_HPP_NODISCARD StructureChain - getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SparseImageFormatProperties2Allocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, - SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_memory_capabilities === - - template - void getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, - VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties - getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_semaphore_capabilities === - - template - void getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_direct_mode_display === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - Result releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - void releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - - template - VULKAN_HPP_NODISCARD Result acquireXlibDisplayEXT( Display * dpy, - VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getRandROutputDisplayEXT( Display * dpy, - RROutput rrOutput, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getRandROutputDisplayEXTUnique( Display & dpy, RROutput rrOutput, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - - template - VULKAN_HPP_NODISCARD Result getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT * pSurfaceCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_external_fence_capabilities === - - template - void getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, - VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties - getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_performance_query === - - template - VULKAN_HPP_NODISCARD Result - enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, - uint32_t * pCounterCount, - VULKAN_HPP_NAMESPACE::PerformanceCounterKHR * pCounters, - VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename PerformanceCounterDescriptionKHRAllocator = std::allocator, - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType, - std::vector>>::type - enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename PerformanceCounterDescriptionKHRAllocator = std::allocator, - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PerformanceCounterKHRAllocator, - typename B2 = PerformanceCounterDescriptionKHRAllocator, - typename std::enable_if::value && - std::is_same::value, - int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType, - std::vector>>::type - enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, - PerformanceCounterKHRAllocator & performanceCounterKHRAllocator, - PerformanceCounterDescriptionKHRAllocator & performanceCounterDescriptionKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, - uint32_t * pNumPasses, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD uint32_t - getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_get_surface_capabilities2 === - - template - VULKAN_HPP_NODISCARD Result getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR * pSurfaceCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pSurfaceFormatCount, - VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR * pSurfaceFormats, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = SurfaceFormat2KHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = StructureChainAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - StructureChainAllocator & structureChainAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_get_display_properties2 === - - template - VULKAN_HPP_NODISCARD Result getDisplayProperties2KHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayProperties2KHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayPlaneProperties2KHR( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPlaneProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayPlaneProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayModeProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, - DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR * pDisplayPlaneInfo, - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR * pCapabilities, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_sample_locations === - - template - void getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT * pMultisampleProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT - getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_calibrated_timestamps === - - template - VULKAN_HPP_NODISCARD Result getCalibrateableTimeDomainsEXT( uint32_t * pTimeDomainCount, - VULKAN_HPP_NAMESPACE::TimeDomainEXT * pTimeDomains, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getCalibrateableTimeDomainsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = TimeDomainEXTAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getCalibrateableTimeDomainsEXT( TimeDomainEXTAllocator & timeDomainEXTAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_fragment_shading_rate === - - template - VULKAN_HPP_NODISCARD Result getFragmentShadingRatesKHR( uint32_t * pFragmentShadingRateCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getFragmentShadingRatesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceFragmentShadingRateKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_EXT_tooling_info === - - template - VULKAN_HPP_NODISCARD Result getToolPropertiesEXT( uint32_t * pToolCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getToolPropertiesEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceToolPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_cooperative_matrix === - - template - VULKAN_HPP_NODISCARD Result getCooperativeMatrixPropertiesNV( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getCooperativeMatrixPropertiesNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = CooperativeMatrixPropertiesNVAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_NV_coverage_reduction_mode === - - template - VULKAN_HPP_NODISCARD Result - getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t * pCombinationCount, - VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV * pCombinations, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getSupportedFramebufferMixedSamplesCombinationsNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = FramebufferMixedSamplesCombinationNVAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - getSupportedFramebufferMixedSamplesCombinationsNV( FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - template - VULKAN_HPP_NODISCARD Result getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, - uint32_t * pPresentModeCount, - VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PresentModeKHRAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, - PresentModeKHRAllocator & presentModeKHRAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_acquire_drm_display === - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result acquireDrmDisplayEXT( int32_t drmFd, - VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#else - template - typename ResultValueType::type - acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getDrmDisplayEXT( int32_t drmFd, - uint32_t connectorId, - VULKAN_HPP_NAMESPACE::DisplayKHR * display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getDrmDisplayEXTUnique( int32_t drmFd, uint32_t connectorId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - -# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD Result acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# else - template - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result getWinrtDisplayNV( uint32_t deviceRelativeId, - VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - getWinrtDisplayNV( uint32_t deviceRelativeId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - getWinrtDisplayNVUnique( uint32_t deviceRelativeId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - template - Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, - IDirectFB * dfb, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, - IDirectFB & dfb, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - template - Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, - struct _screen_window * window, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NAMESPACE::Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, - struct _screen_window & window, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - operator VkPhysicalDevice() const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice == VK_NULL_HANDLE; - } - - private: - VkPhysicalDevice m_physicalDevice = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PhysicalDevice; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::PhysicalDevice; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class Instance; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDebugReportCallbackEXT = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueDebugUtilsMessengerEXT = UniqueHandle; - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueSurfaceKHR = UniqueHandle; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - class Instance - { - public: - using CType = VkInstance; - using NativeType = VkInstance; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; - - public: - VULKAN_HPP_CONSTEXPR Instance() = default; - VULKAN_HPP_CONSTEXPR Instance( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} - Instance( VkInstance instance ) VULKAN_HPP_NOEXCEPT : m_instance( instance ) {} - - Instance & operator=( VkInstance instance ) VULKAN_HPP_NOEXCEPT - { - m_instance = instance; - return *this; - } - - Instance & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT - { - m_instance = {}; - return *this; - } - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Instance const & ) const = default; -#else - bool operator==( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance == rhs.m_instance; - } - - bool operator!=( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance != rhs.m_instance; - } - - bool operator<( Instance const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return m_instance < rhs.m_instance; - } -#endif - - //=== VK_VERSION_1_0 === - - template - void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount, - VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumeratePhysicalDevices( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - PFN_vkVoidFunction getProcAddr( const char * pName, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - VULKAN_HPP_NODISCARD Result enumeratePhysicalDeviceGroups( uint32_t * pPhysicalDeviceGroupCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - enumeratePhysicalDeviceGroups( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceGroupPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_surface === - - template - void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_KHR_display === - - template - VULKAN_HPP_NODISCARD Result createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDisplayPlaneSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - template - VULKAN_HPP_NODISCARD Result createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createXlibSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - template - VULKAN_HPP_NODISCARD Result createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createXcbSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - template - VULKAN_HPP_NODISCARD Result createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createWaylandSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - template - VULKAN_HPP_NODISCARD Result createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createAndroidSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - template - VULKAN_HPP_NODISCARD Result createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createWin32SurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - template - VULKAN_HPP_NODISCARD Result createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT * pCallback, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDebugReportCallbackEXTUnique( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char * pLayerPrefix, - const char * pMessage, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const std::string & layerPrefix, - const std::string & message, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - template - VULKAN_HPP_NODISCARD Result createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type createStreamDescriptorSurfaceGGPUnique( - const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_GGP*/ - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - template - VULKAN_HPP_NODISCARD Result createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createViSurfaceNNUnique( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_device_group_creation === - - template - VULKAN_HPP_NODISCARD Result enumeratePhysicalDeviceGroupsKHR( uint32_t * pPhysicalDeviceGroupCount, - VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - enumeratePhysicalDeviceGroupsKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PhysicalDeviceGroupPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD - typename ResultValueType>::type - enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - template - VULKAN_HPP_NODISCARD Result createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createIOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - template - VULKAN_HPP_NODISCARD Result createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createMacOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - template - VULKAN_HPP_NODISCARD Result createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT * pMessenger, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDebugUtilsMessengerEXTUnique( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - template - VULKAN_HPP_NODISCARD Result createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createImagePipeSurfaceFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - template - VULKAN_HPP_NODISCARD Result createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createMetalSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_headless_surface === - - template - VULKAN_HPP_NODISCARD Result createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createHeadlessSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - template - VULKAN_HPP_NODISCARD Result createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createDirectFBSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - template - VULKAN_HPP_NODISCARD Result createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; -# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createScreenSurfaceQNXUnique( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - operator VkInstance() const VULKAN_HPP_NOEXCEPT - { - return m_instance; - } - - explicit operator bool() const VULKAN_HPP_NOEXCEPT - { - return m_instance != VK_NULL_HANDLE; - } - - bool operator!() const VULKAN_HPP_NOEXCEPT - { - return m_instance == VK_NULL_HANDLE; - } - - private: - VkInstance m_instance = {}; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Instance; - }; - - template <> - struct CppType - { - using Type = VULKAN_HPP_NAMESPACE::Instance; - }; - - template <> - struct isVulkanHandleType - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; - }; - - //=== VK_VERSION_1_0 === - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - template - class UniqueHandleTraits - { - public: - using deleter = ObjectDestroy; - }; - using UniqueInstance = UniqueHandle; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - template - VULKAN_HPP_NODISCARD Result createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo * pCreateInfo, - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, - VULKAN_HPP_NAMESPACE::Instance * pInstance, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type - createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); -# ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_NODISCARD typename ResultValueType>::type - createInstanceUnique( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, - Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); -# endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result enumerateInstanceExtensionProperties( const char * pLayerName, - uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateInstanceExtensionProperties( Optional layerName, - ExtensionPropertiesAllocator & extensionPropertiesAllocator, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - template - VULKAN_HPP_NODISCARD Result enumerateInstanceLayerProperties( uint32_t * pPropertyCount, - VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateInstanceLayerProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> - VULKAN_HPP_NODISCARD typename ResultValueType>::type - enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - //=== VK_VERSION_1_1 === - - template - VULKAN_HPP_NODISCARD Result enumerateInstanceVersion( uint32_t * pApiVersion, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_NODISCARD typename ResultValueType::type enumerateInstanceVersion( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_hash.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_hash.hpp deleted file mode 100644 index 369d609..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_hash.hpp +++ /dev/null @@ -1,13489 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_HASH_HPP -#define VULKAN_HASH_HPP - -#include - -namespace std -{ - //======================================= - //=== HASH structures for Flags types === - //======================================= - - template - struct hash> - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags const & flags ) const VULKAN_HPP_NOEXCEPT - { - return std::hash::type>{}( static_cast::type>( flags ) ); - } - }; - - //=================================== - //=== HASH structures for handles === - //=================================== - - //=== VK_VERSION_1_0 === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( instance ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( physicalDevice ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( device ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( queue ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( deviceMemory ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( fence ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( semaphore ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( event ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( queryPool ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( buffer ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( bufferView ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( image ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( imageView ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( shaderModule ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( pipelineCache ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( pipeline ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( pipelineLayout ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( sampler ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( descriptorPool ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( descriptorSet ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( descriptorSetLayout ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( framebuffer ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( renderPass ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( commandPool ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( commandBuffer ) ); - } - }; - - //=== VK_VERSION_1_1 === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( samplerYcbcrConversion ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( descriptorUpdateTemplate ) ); - } - }; - - //=== VK_VERSION_1_3 === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlot const & privateDataSlot ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( privateDataSlot ) ); - } - }; - - //=== VK_KHR_surface === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( surfaceKHR ) ); - } - }; - - //=== VK_KHR_swapchain === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( swapchainKHR ) ); - } - }; - - //=== VK_KHR_display === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( displayKHR ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( displayModeKHR ) ); - } - }; - - //=== VK_EXT_debug_report === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( debugReportCallbackEXT ) ); - } - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( videoSessionKHR ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( videoSessionParametersKHR ) ); - } - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( cuModuleNVX ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( cuFunctionNVX ) ); - } - }; - - //=== VK_EXT_debug_utils === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( debugUtilsMessengerEXT ) ); - } - }; - - //=== VK_KHR_acceleration_structure === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( accelerationStructureKHR ) ); - } - }; - - //=== VK_EXT_validation_cache === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( validationCacheEXT ) ); - } - }; - - //=== VK_NV_ray_tracing === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( accelerationStructureNV ) ); - } - }; - - //=== VK_INTEL_performance_query === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( performanceConfigurationINTEL ) ); - } - }; - - //=== VK_KHR_deferred_host_operations === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( deferredOperationKHR ) ); - } - }; - - //=== VK_NV_device_generated_commands === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( indirectCommandsLayoutNV ) ); - } - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA const & bufferCollectionFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( bufferCollectionFUCHSIA ) ); - } - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if 14 <= VULKAN_HPP_CPP_VERSION - //====================================== - //=== HASH structures for structures === - //====================================== - -# if !defined( VULKAN_HPP_HASH_COMBINE ) -# define VULKAN_HPP_HASH_COMBINE( seed, value ) \ - seed ^= std::hash::type>{}( value ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ) -# endif - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AabbPositionsKHR const & aabbPositionsKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minX ); - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minY ); - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minZ ); - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxX ); - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxY ); - VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxZ ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR const & accelerationStructureBuildRangeInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.primitiveCount ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.primitiveOffset ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.firstVertex ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.transformOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR const & accelerationStructureBuildSizesInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.accelerationStructureSize ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.updateScratchSize ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.buildScratchSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & accelerationStructureCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.createFlags ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.offset ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.size ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.type ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.deviceAddress ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & geometryTrianglesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexData ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexOffset ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexCount ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexStride ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexFormat ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexData ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexOffset ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexCount ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexType ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.transformData ); - VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.transformOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryAABBNV const & geometryAABBNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.aabbData ); - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.numAABBs ); - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.stride ); - VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.offset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryDataNV const & geometryDataNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, geometryDataNV.triangles ); - VULKAN_HPP_HASH_COMBINE( seed, geometryDataNV.aabbs ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryNV const & geometryNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, geometryNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, geometryNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, geometryNV.geometryType ); - VULKAN_HPP_HASH_COMBINE( seed, geometryNV.geometry ); - VULKAN_HPP_HASH_COMBINE( seed, geometryNV.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const & accelerationStructureInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.type ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.instanceCount ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.geometryCount ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.pGeometries ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & accelerationStructureCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.compactedSize ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.info ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR const & accelerationStructureDeviceAddressInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.accelerationStructure ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformMatrixKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - for ( size_t i = 0; i < 3; ++i ) - { - for ( size_t j = 0; j < 4; ++j ) - { - VULKAN_HPP_HASH_COMBINE( seed, transformMatrixKHR.matrix[i][j] ); - } - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR const & accelerationStructureInstanceKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.transform ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.instanceCustomIndex ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.mask ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.instanceShaderBindingTableRecordOffset ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.accelerationStructureReference ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV const & accelerationStructureMatrixMotionInstanceNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.transformT0 ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.transformT1 ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.instanceCustomIndex ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.mask ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.instanceShaderBindingTableRecordOffset ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.accelerationStructureReference ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV const & accelerationStructureMemoryRequirementsInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.type ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.accelerationStructure ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoNV const & accelerationStructureMotionInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.maxInstances ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SRTDataNV const & sRTDataNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sx ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.a ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.b ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvx ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sy ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.c ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvy ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sz ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvz ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qx ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qy ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qz ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qw ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.tx ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.ty ); - VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.tz ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV const & accelerationStructureSRTMotionInstanceNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.transformT0 ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.transformT1 ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.instanceCustomIndex ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.mask ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.instanceShaderBindingTableRecordOffset ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.accelerationStructureReference ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR const & accelerationStructureVersionInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.pVersionData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR const & acquireNextImageInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.swapchain ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.timeout ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.fence ); - VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.deviceMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR const & acquireProfilingLockInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.timeout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AllocationCallbacks const & allocationCallbacks ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pUserData ); - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnReallocation ); - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnFree ); - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnInternalAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnInternalFree ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AmigoProfilingSubmitInfoSEC const & amigoProfilingSubmitInfoSEC ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.sType ); - VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.firstDrawTimestamp ); - VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.swapBufferTimestamp ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ComponentMapping const & componentMapping ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, componentMapping.r ); - VULKAN_HPP_HASH_COMBINE( seed, componentMapping.g ); - VULKAN_HPP_HASH_COMBINE( seed, componentMapping.b ); - VULKAN_HPP_HASH_COMBINE( seed, componentMapping.a ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatProperties2ANDROID const & androidHardwareBufferFormatProperties2ANDROID ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.format ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.externalFormat ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.formatFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.samplerYcbcrConversionComponents ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYcbcrModel ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYcbcrRange ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedXChromaOffset ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYChromaOffset ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID const & androidHardwareBufferFormatPropertiesANDROID ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.format ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.externalFormat ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.formatFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.samplerYcbcrConversionComponents ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYcbcrModel ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYcbcrRange ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedXChromaOffset ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYChromaOffset ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID const & androidHardwareBufferPropertiesANDROID ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.allocationSize ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.memoryTypeBits ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID const & androidHardwareBufferUsageANDROID ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.androidHardwareBufferUsage ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & androidSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.window ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ApplicationInfo const & applicationInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.pNext ); - for ( const char * p = applicationInfo.pApplicationName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.applicationVersion ); - for ( const char * p = applicationInfo.pEngineName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.engineVersion ); - VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.apiVersion ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescription const & attachmentDescription ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.flags ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.format ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.samples ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.loadOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.storeOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.stencilLoadOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.stencilStoreOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.initialLayout ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.finalLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescription2 const & attachmentDescription2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.flags ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.format ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.samples ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.loadOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.storeOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.stencilLoadOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.stencilStoreOp ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.initialLayout ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.finalLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout const & attachmentDescriptionStencilLayout ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.sType ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.stencilInitialLayout ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.stencilFinalLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReference const & attachmentReference ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference.attachment ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference.layout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReference2 const & attachmentReference2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.attachment ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.layout ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.aspectMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout const & attachmentReferenceStencilLayout ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.sType ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.stencilLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentSampleCountInfoAMD const & attachmentSampleCountInfoAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.pColorAttachmentSamples ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.depthStencilAttachmentSamples ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Extent2D const & extent2D ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, extent2D.width ); - VULKAN_HPP_HASH_COMBINE( seed, extent2D.height ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SampleLocationEXT const & sampleLocationEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationEXT.x ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationEXT.y ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationsPerPixel ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationGridSize ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationsCount ); - VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.pSampleLocations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT const & attachmentSampleLocationsEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleLocationsEXT.attachmentIndex ); - VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleLocationsEXT.sampleLocationsInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BaseInStructure const & baseInStructure ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, baseInStructure.sType ); - VULKAN_HPP_HASH_COMBINE( seed, baseInStructure.pNext ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BaseOutStructure const & baseOutStructure ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, baseOutStructure.sType ); - VULKAN_HPP_HASH_COMBINE( seed, baseOutStructure.pNext ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV const & bindAccelerationStructureMemoryInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.accelerationStructure ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.memory ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.memoryOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.deviceIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.pDeviceIndices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo const & bindBufferMemoryDeviceGroupInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.deviceIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.pDeviceIndices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo const & bindBufferMemoryInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.memory ); - VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.memoryOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Offset2D const & offset2D ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, offset2D.x ); - VULKAN_HPP_HASH_COMBINE( seed, offset2D.y ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Rect2D const & rect2D ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rect2D.offset ); - VULKAN_HPP_HASH_COMBINE( seed, rect2D.extent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo const & bindImageMemoryDeviceGroupInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.deviceIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pDeviceIndices ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.splitInstanceBindRegionCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pSplitInstanceBindRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo const & bindImageMemoryInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.image ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.memory ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.memoryOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR const & bindImageMemorySwapchainInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.swapchain ); - VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.imageIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo const & bindImagePlaneMemoryInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.planeAspect ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandNV const & bindIndexBufferIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.bufferAddress ); - VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.size ); - VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.indexType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindShaderGroupIndirectCommandNV const & bindShaderGroupIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindShaderGroupIndirectCommandNV.groupIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseMemoryBind const & sparseMemoryBind ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.resourceOffset ); - VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.size ); - VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.memory ); - VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.memoryOffset ); - VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo const & sparseBufferMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.bindCount ); - VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.pBinds ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo const & sparseImageOpaqueMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.image ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.bindCount ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.pBinds ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresource const & imageSubresource ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.aspectMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.mipLevel ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.arrayLayer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Offset3D const & offset3D ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, offset3D.x ); - VULKAN_HPP_HASH_COMBINE( seed, offset3D.y ); - VULKAN_HPP_HASH_COMBINE( seed, offset3D.z ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Extent3D const & extent3D ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, extent3D.width ); - VULKAN_HPP_HASH_COMBINE( seed, extent3D.height ); - VULKAN_HPP_HASH_COMBINE( seed, extent3D.depth ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryBind const & sparseImageMemoryBind ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.subresource ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.offset ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.extent ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.memory ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.memoryOffset ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo const & sparseImageMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.image ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.bindCount ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.pBinds ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindSparseInfo const & bindSparseInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.waitSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pWaitSemaphores ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.bufferBindCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pBufferBinds ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.imageOpaqueBindCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pImageOpaqueBinds ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.imageBindCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pImageBinds ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.signalSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pSignalSemaphores ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandNV const & bindVertexBufferIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.bufferAddress ); - VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.size ); - VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.stride ); - return seed; - } - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR const & bindVideoSessionMemoryInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memoryBindIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memory ); - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memoryOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memorySize ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresourceLayers ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.aspectMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.mipLevel ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.baseArrayLayer ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.layerCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageBlit2 const & imageBlit2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.srcSubresource ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.srcOffsets[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.dstSubresource ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.dstOffsets[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BlitImageInfo2 const & blitImageInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.srcImage ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.srcImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.dstImage ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.dstImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.pRegions ); - VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.filter ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::BufferCollectionBufferCreateInfoFUCHSIA const & bufferCollectionBufferCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.collection ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.index ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCount ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.maxBufferCount ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForCamping ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForDedicatedSlack ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForSharedSlack ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & bufferCollectionCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.collectionToken ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::BufferCollectionImageCreateInfoFUCHSIA const & bufferCollectionImageCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.collection ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.index ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA const & sysmemColorSpaceFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.colorSpace ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA const & bufferCollectionPropertiesFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.memoryTypeBits ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.bufferCount ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.createInfoIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sysmemPixelFormat ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.formatFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sysmemColorSpaceIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.samplerYcbcrConversionComponents ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYcbcrModel ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYcbcrRange ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedXChromaOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYChromaOffset ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & bufferCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.size ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.usage ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.sharingMode ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.queueFamilyIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.pQueueFamilyIndices ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA const & bufferConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.createInfo ); - VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.requiredFormatFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.bufferCollectionConstraints ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCopy const & bufferCopy ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCopy2 const & bufferCopy2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT const & bufferDeviceAddressCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.deviceAddress ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo const & bufferDeviceAddressInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.buffer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferImageCopy const & bufferImageCopy ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferRowLength ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferImageHeight ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageExtent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferImageCopy2 const & bufferImageCopy2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferRowLength ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferImageHeight ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageOffset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageExtent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier const & bufferMemoryBarrier ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.srcQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.dstQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.offset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 const & bufferMemoryBarrier2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.offset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 const & bufferMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.buffer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo const & bufferOpaqueCaptureAddressCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.opaqueCaptureAddress ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & bufferViewCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.format ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.offset ); - VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.range ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT const & calibratedTimestampInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoEXT.timeDomain ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CheckpointData2NV const & checkpointData2NV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.stage ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.pCheckpointMarker ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CheckpointDataNV const & checkpointDataNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.stage ); - VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.pCheckpointMarker ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue const & clearDepthStencilValue ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, clearDepthStencilValue.depth ); - VULKAN_HPP_HASH_COMBINE( seed, clearDepthStencilValue.stencil ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ClearRect const & clearRect ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, clearRect.rect ); - VULKAN_HPP_HASH_COMBINE( seed, clearRect.baseArrayLayer ); - VULKAN_HPP_HASH_COMBINE( seed, clearRect.layerCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV const & coarseSampleLocationNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.pixelX ); - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.pixelY ); - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.sample ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV const & coarseSampleOrderCustomNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.shadingRate ); - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.sampleCount ); - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.sampleLocationCount ); - VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.pSampleLocations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & commandBufferAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.commandPool ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.level ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.commandBufferCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo const & commandBufferInheritanceInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.renderPass ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.subpass ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.framebuffer ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.occlusionQueryEnable ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.queryFlags ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.pipelineStatistics ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo const & commandBufferBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.pInheritanceInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT const & commandBufferInheritanceConditionalRenderingInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.conditionalRenderingEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderPassTransformInfoQCOM const & commandBufferInheritanceRenderPassTransformInfoQCOM ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.transform ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.renderArea ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderingInfo const & commandBufferInheritanceRenderingInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.viewMask ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.pColorAttachmentFormats ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.depthAttachmentFormat ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.stencilAttachmentFormat ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.rasterizationSamples ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Viewport const & viewport ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, viewport.x ); - VULKAN_HPP_HASH_COMBINE( seed, viewport.y ); - VULKAN_HPP_HASH_COMBINE( seed, viewport.width ); - VULKAN_HPP_HASH_COMBINE( seed, viewport.height ); - VULKAN_HPP_HASH_COMBINE( seed, viewport.minDepth ); - VULKAN_HPP_HASH_COMBINE( seed, viewport.maxDepth ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceViewportScissorInfoNV const & commandBufferInheritanceViewportScissorInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.viewportScissor2D ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.viewportDepthCount ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.pViewportDepths ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo const & commandBufferSubmitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.commandBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.deviceMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & commandPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.queueFamilyIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SpecializationMapEntry const & specializationMapEntry ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.constantID ); - VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.offset ); - VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SpecializationInfo const & specializationInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.mapEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.pMapEntries ); - VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.dataSize ); - VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.pData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const & pipelineShaderStageCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.stage ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.module ); - for ( const char * p = pipelineShaderStageCreateInfo.pName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.pSpecializationInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & computePipelineCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.stage ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.layout ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.basePipelineHandle ); - VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.basePipelineIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT const & conditionalRenderingBeginInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.offset ); - VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ConformanceVersion const & conformanceVersion ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.major ); - VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.minor ); - VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.subminor ); - VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.patch ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV const & cooperativeMatrixPropertiesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.MSize ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.NSize ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.KSize ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.AType ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.BType ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.CType ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.DType ); - VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.scope ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR const & copyAccelerationStructureInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.src ); - VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.dst ); - VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.mode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyBufferInfo2 const & copyBufferInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.srcBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.dstBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 const & copyBufferToImageInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.srcBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.dstImage ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.dstImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyCommandTransformInfoQCOM const & copyCommandTransformInfoQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.transform ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyDescriptorSet const & copyDescriptorSet ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcSet ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcBinding ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcArrayElement ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstSet ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstBinding ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstArrayElement ); - VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.descriptorCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCopy2 const & imageCopy2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.srcSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.dstSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.extent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageInfo2 const & copyImageInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.srcImage ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.srcImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.dstImage ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.dstImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 const & copyImageToBufferInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.srcImage ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.srcImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.dstBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & cuFunctionCreateInfoNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.module ); - for ( const char * p = cuFunctionCreateInfoNVX.pName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX const & cuLaunchInfoNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.function ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimX ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimY ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimZ ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimX ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimY ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimZ ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.sharedMemBytes ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.paramCount ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pParams ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.extraCount ); - VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pExtras ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & cuModuleCreateInfoNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.dataSize ); - VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.pData ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR const & d3D12FenceSubmitInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.waitSemaphoreValuesCount ); - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pWaitSemaphoreValues ); - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.signalSemaphoreValuesCount ); - VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pSignalSemaphoreValues ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT const & debugMarkerMarkerInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.pNext ); - for ( const char * p = debugMarkerMarkerInfoEXT.pMarkerName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - for ( size_t i = 0; i < 4; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.color[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT const & debugMarkerObjectNameInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.objectType ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.object ); - for ( const char * p = debugMarkerObjectNameInfoEXT.pObjectName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT const & debugMarkerObjectTagInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.objectType ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.object ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.tagName ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.tagSize ); - VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.pTag ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & debugReportCallbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pfnCallback ); - VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pUserData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT const & debugUtilsLabelEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.pNext ); - for ( const char * p = debugUtilsLabelEXT.pLabelName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - for ( size_t i = 0; i < 4; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.color[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT const & debugUtilsObjectNameInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.objectType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.objectHandle ); - for ( const char * p = debugUtilsObjectNameInfoEXT.pObjectName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT const & debugUtilsMessengerCallbackDataEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.flags ); - for ( const char * p = debugUtilsMessengerCallbackDataEXT.pMessageIdName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.messageIdNumber ); - for ( const char * p = debugUtilsMessengerCallbackDataEXT.pMessage; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.queueLabelCount ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pQueueLabels ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.cmdBufLabelCount ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pCmdBufLabels ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.objectCount ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pObjects ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & debugUtilsMessengerCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.messageSeverity ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.messageType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pfnUserCallback ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pUserData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT const & debugUtilsObjectTagInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.objectType ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.objectHandle ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.tagName ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.tagSize ); - VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.pTag ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV const & dedicatedAllocationBufferCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.dedicatedAllocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV const & dedicatedAllocationImageCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.dedicatedAllocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV const & dedicatedAllocationMemoryAllocateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.image ); - VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.buffer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryBarrier2 const & memoryBarrier2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.srcStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.dstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.dstAccessMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & imageSubresourceRange ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.aspectMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.baseMipLevel ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.levelCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.baseArrayLayer ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.layerCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 const & imageMemoryBarrier2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.oldLayout ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.newLayout ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.image ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.subresourceRange ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DependencyInfo const & dependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.dependencyFlags ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.memoryBarrierCount ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pMemoryBarriers ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.bufferMemoryBarrierCount ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pBufferMemoryBarriers ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.imageMemoryBarrierCount ); - VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pImageMemoryBarriers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorBufferInfo const & descriptorBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.offset ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.range ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorImageInfo const & descriptorImageInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.sampler ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.imageView ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.imageLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolSize const & descriptorPoolSize ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolSize.type ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolSize.descriptorCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & descriptorPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.maxSets ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.poolSizeCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.pPoolSizes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfo const & descriptorPoolInlineUniformBlockCreateInfo ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.maxInlineUniformBlockBindings ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & descriptorSetAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.descriptorPool ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.descriptorSetCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.pSetLayouts ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE const & descriptorSetBindingReferenceVALVE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.descriptorSetLayout ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.binding ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding const & descriptorSetLayoutBinding ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.binding ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.descriptorType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.descriptorCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.stageFlags ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.pImmutableSamplers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo const & descriptorSetLayoutBindingFlagsCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.bindingCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.pBindingFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & descriptorSetLayoutCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.bindingCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.pBindings ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE const & descriptorSetLayoutHostMappingInfoVALVE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.descriptorOffset ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.descriptorSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport const & descriptorSetLayoutSupport ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.supported ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo const & descriptorSetVariableDescriptorCountAllocateInfo ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.descriptorSetCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.pDescriptorCounts ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport const & descriptorSetVariableDescriptorCountLayoutSupport ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.maxVariableDescriptorCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry const & descriptorUpdateTemplateEntry ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.dstBinding ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.dstArrayElement ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.descriptorCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.descriptorType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.offset ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.stride ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & descriptorUpdateTemplateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.descriptorUpdateEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pDescriptorUpdateEntries ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.templateType ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.descriptorSetLayout ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pipelineLayout ); - VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.set ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements const & deviceBufferMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.pCreateInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo const & deviceQueueCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.queueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.queueCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.pQueuePriorities ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures const & physicalDeviceFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.robustBufferAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fullDrawIndexUint32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.imageCubeArray ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.independentBlend ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.geometryShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.tessellationShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sampleRateShading ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.dualSrcBlend ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.logicOp ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.multiDrawIndirect ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.drawIndirectFirstInstance ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthClamp ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthBiasClamp ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fillModeNonSolid ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthBounds ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.wideLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.largePoints ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.alphaToOne ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.multiViewport ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.samplerAnisotropy ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionETC2 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionASTC_LDR ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionBC ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.occlusionQueryPrecise ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.pipelineStatisticsQuery ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.vertexPipelineStoresAndAtomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fragmentStoresAndAtomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderTessellationAndGeometryPointSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderImageGatherExtended ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageExtendedFormats ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageMultisample ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageReadWithoutFormat ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageWriteWithoutFormat ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderUniformBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderSampledImageArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderClipDistance ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderCullDistance ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderInt64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderInt16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderResourceResidency ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderResourceMinLod ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseBinding ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyImage2D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyImage3D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency2Samples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency4Samples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency8Samples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency16Samples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyAliased ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.variableMultisampleRate ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.inheritedQueries ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & deviceCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.queueCreateInfoCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pQueueCreateInfos ); - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.enabledLayerCount ); - for ( size_t i = 0; i < deviceCreateInfo.enabledLayerCount; ++i ) - { - for ( const char * p = deviceCreateInfo.ppEnabledLayerNames[i]; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - } - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.enabledExtensionCount ); - for ( size_t i = 0; i < deviceCreateInfo.enabledExtensionCount; ++i ) - { - for ( const char * p = deviceCreateInfo.ppEnabledExtensionNames[i]; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - } - VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pEnabledFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DeviceDeviceMemoryReportCreateInfoEXT const & deviceDeviceMemoryReportCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pfnUserCallback ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pUserData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigCreateInfoNV const & deviceDiagnosticsConfigCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.deviceEvent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo const & deviceGroupBindSparseInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.resourceDeviceIndex ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.memoryDeviceIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo const & deviceGroupCommandBufferBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.deviceMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo const & deviceGroupDeviceCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.physicalDeviceCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.pPhysicalDevices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR const & deviceGroupPresentCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.pNext ); - for ( size_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.presentMask[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.modes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR const & deviceGroupPresentInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.swapchainCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.pDeviceMasks ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.mode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo const & deviceGroupRenderPassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.deviceMask ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.deviceRenderAreaCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.pDeviceRenderAreas ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo const & deviceGroupSubmitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.waitSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pWaitSemaphoreDeviceIndices ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.commandBufferCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pCommandBufferDeviceMasks ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.signalSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pSignalSemaphoreDeviceIndices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR const & deviceGroupSwapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.modes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & imageCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.imageType ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.format ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.extent ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.mipLevels ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.arrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.samples ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.tiling ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.usage ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.sharingMode ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.queueFamilyIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.pQueueFamilyIndices ); - VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.initialLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements const & deviceImageMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.pCreateInfo ); - VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.planeAspect ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo const & deviceMemoryOpaqueCaptureAddressInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.memory ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD const & deviceMemoryOverallocationCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.overallocationBehavior ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryReportCallbackDataEXT const & deviceMemoryReportCallbackDataEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.type ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.memoryObjectId ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.size ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.objectType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.objectHandle ); - VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.heapIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DevicePrivateDataCreateInfo const & devicePrivateDataCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.privateDataSlotRequestCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoKHR const & deviceQueueGlobalPriorityCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfoKHR.globalPriority ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & deviceQueueInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.flags ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.queueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.queueIndex ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & directFBSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.dfb ); - VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.surface ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DispatchIndirectCommand const & dispatchIndirectCommand ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.x ); - VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.y ); - VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.z ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.displayEvent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR const & displayModeParametersKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayModeParametersKHR.visibleRegion ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeParametersKHR.refreshRate ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & displayModeCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.parameters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR const & displayModePropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayModePropertiesKHR.displayMode ); - VULKAN_HPP_HASH_COMBINE( seed, displayModePropertiesKHR.parameters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR const & displayModeProperties2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.displayModeProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD const & displayNativeHdrSurfaceCapabilitiesAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.localDimmingSupport ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR const & displayPlaneCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.supportedAlpha ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minSrcPosition ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxSrcPosition ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minSrcExtent ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxSrcExtent ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minDstPosition ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxDstPosition ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minDstExtent ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxDstExtent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR const & displayPlaneCapabilities2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.capabilities ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR const & displayPlaneInfo2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.mode ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.planeIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR const & displayPlanePropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPlanePropertiesKHR.currentDisplay ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlanePropertiesKHR.currentStackIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR const & displayPlaneProperties2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.displayPlaneProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT const & displayPowerInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.powerState ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR const & displayPresentInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.srcRect ); - VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.dstRect ); - VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.persistent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR const & displayPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.display ); - for ( const char * p = displayPropertiesKHR.displayName; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.physicalDimensions ); - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.physicalResolution ); - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.supportedTransforms ); - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.planeReorderPossible ); - VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.persistentContent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR const & displayProperties2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.displayProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & displaySurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.displayMode ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.planeIndex ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.planeStackIndex ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.transform ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.globalAlpha ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.alphaMode ); - VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.imageExtent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawIndexedIndirectCommand const & drawIndexedIndirectCommand ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.indexCount ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.instanceCount ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.firstIndex ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.vertexOffset ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.firstInstance ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawIndirectCommand const & drawIndirectCommand ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.vertexCount ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.instanceCount ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.firstVertex ); - VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.firstInstance ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandEXT const & drawMeshTasksIndirectCommandEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountX ); - VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountY ); - VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountZ ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandNV const & drawMeshTasksIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandNV.taskCount ); - VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandNV.firstTask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT const & drmFormatModifierProperties2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifier ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifierPlaneCount ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifierTilingFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT const & drmFormatModifierPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifier ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifierPlaneCount ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifierTilingFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesList2EXT const & drmFormatModifierPropertiesList2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.drmFormatModifierCount ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.pDrmFormatModifierProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT const & drmFormatModifierPropertiesListEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.drmFormatModifierCount ); - VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.pDrmFormatModifierProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::EventCreateInfo const & eventCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo const & exportFenceCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.handleTypes ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR const & exportFenceWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.pAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.dwAccess ); - VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo const & exportMemoryAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.handleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV const & exportMemoryAllocateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.handleTypes ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR const & exportMemoryWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.pAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.dwAccess ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV const & exportMemoryWin32HandleInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.pAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.dwAccess ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalBufferInfoEXT const & exportMetalBufferInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.memory ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.mtlBuffer ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalCommandQueueInfoEXT const & exportMetalCommandQueueInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.queue ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.mtlCommandQueue ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalDeviceInfoEXT const & exportMetalDeviceInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.mtlDevice ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalIOSurfaceInfoEXT const & exportMetalIOSurfaceInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.image ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.ioSurface ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalObjectCreateInfoEXT const & exportMetalObjectCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.exportObjectType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT const & exportMetalObjectsInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectsInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectsInfoEXT.pNext ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalSharedEventInfoEXT const & exportMetalSharedEventInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.event ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.mtlSharedEvent ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalTextureInfoEXT const & exportMetalTextureInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.image ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.imageView ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.bufferView ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.plane ); - VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.mtlTexture ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo const & exportSemaphoreCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.handleTypes ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR const & exportSemaphoreWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.pAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.dwAccess ); - VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExtensionProperties const & extensionProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, extensionProperties.extensionName[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, extensionProperties.specVersion ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties const & externalMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.externalMemoryFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.exportFromImportedHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.compatibleHandleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalBufferProperties const & externalBufferProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.externalMemoryProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalFenceProperties const & externalFenceProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.exportFromImportedHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.compatibleHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.externalFenceFeatures ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID const & externalFormatANDROID ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.externalFormat ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties const & externalImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.externalMemoryProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatProperties const & imageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxExtent ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxMipLevels ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.sampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxResourceSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV const & externalImageFormatPropertiesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.imageFormatProperties ); - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.externalMemoryFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.exportFromImportedHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.compatibleHandleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo const & externalMemoryBufferCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.handleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo const & externalMemoryImageCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.handleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV const & externalMemoryImageCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.handleTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties const & externalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.exportFromImportedHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.compatibleHandleTypes ); - VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.externalSemaphoreFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & fenceCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR const & fenceGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.fence ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.handleType ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR const & fenceGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.fence ); - VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.handleType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT const & filterCubicImageViewImageFormatPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.filterCubic ); - VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.filterCubicMinmax ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties const & formatProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, formatProperties.linearTilingFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties.optimalTilingFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties.bufferFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties2 const & formatProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.formatProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties3 const & formatProperties3 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.sType ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.linearTilingFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.optimalTilingFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.bufferFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FragmentShadingRateAttachmentInfoKHR const & fragmentShadingRateAttachmentInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.pFragmentShadingRateAttachment ); - VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.shadingRateAttachmentTexelSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo const & framebufferAttachmentImageInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.usage ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.width ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.height ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.layerCount ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.viewFormatCount ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.pViewFormats ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo const & framebufferAttachmentsCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.attachmentImageInfoCount ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.pAttachmentImageInfos ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & framebufferCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.renderPass ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.pAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.width ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.height ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.layers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV const & framebufferMixedSamplesCombinationNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.coverageReductionMode ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.rasterizationSamples ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.depthStencilSamples ); - VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.colorSamples ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV const & indirectCommandsStreamNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsStreamNV.buffer ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsStreamNV.offset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV const & generatedCommandsInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pipeline ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.indirectCommandsLayout ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.streamCount ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pStreams ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCount ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessOffset ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessSize ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCountBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCountOffset ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesIndexBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesIndexOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV const & generatedCommandsMemoryRequirementsInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pipeline ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.indirectCommandsLayout ); - VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.maxSequencesCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription const & vertexInputBindingDescription ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.binding ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.stride ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.inputRate ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription const & vertexInputAttributeDescription ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.location ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.binding ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.format ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.offset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo const & pipelineVertexInputStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo const & pipelineInputAssemblyStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.topology ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.primitiveRestartEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo const & pipelineTessellationStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.patchControlPoints ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo const & pipelineViewportStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.viewportCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pViewports ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.scissorCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pScissors ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo const & pipelineRasterizationStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthClampEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.rasterizerDiscardEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.polygonMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.cullMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.frontFace ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasConstantFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasClamp ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasSlopeFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.lineWidth ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo const & pipelineMultisampleStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.rasterizationSamples ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.sampleShadingEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.minSampleShading ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.pSampleMask ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.alphaToCoverageEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.alphaToOneEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::StencilOpState const & stencilOpState ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.failOp ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.passOp ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.depthFailOp ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.compareOp ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.compareMask ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.writeMask ); - VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.reference ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo const & pipelineDepthStencilStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthTestEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthWriteEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthCompareOp ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthBoundsTestEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.stencilTestEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.front ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.back ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.minDepthBounds ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.maxDepthBounds ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState const & pipelineColorBlendAttachmentState ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.blendEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.srcColorBlendFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.dstColorBlendFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.colorBlendOp ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.srcAlphaBlendFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.dstAlphaBlendFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.alphaBlendOp ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.colorWriteMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo const & pipelineColorBlendStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.logicOpEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.logicOp ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.pAttachments ); - for ( size_t i = 0; i < 4; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.blendConstants[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo const & pipelineDynamicStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.dynamicStateCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.pDynamicStates ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & graphicsPipelineCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.stageCount ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pStages ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pVertexInputState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pInputAssemblyState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pTessellationState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pViewportState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pRasterizationState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pMultisampleState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pDepthStencilState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pColorBlendState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pDynamicState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.layout ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.renderPass ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.subpass ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.basePipelineHandle ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.basePipelineIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryCreateInfoEXT const & graphicsPipelineLibraryCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV const & graphicsShaderGroupCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.stageCount ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pStages ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pVertexInputState ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pTessellationState ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineShaderGroupsCreateInfoNV const & graphicsPipelineShaderGroupsCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.groupCount ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pGroups ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pipelineCount ); - VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pPipelines ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::XYColorEXT const & xYColorEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, xYColorEXT.x ); - VULKAN_HPP_HASH_COMBINE( seed, xYColorEXT.y ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::HdrMetadataEXT const & hdrMetadataEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryRed ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryGreen ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryBlue ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.whitePoint ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxLuminance ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.minLuminance ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxContentLightLevel ); - VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxFrameAverageLightLevel ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & headlessSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.flags ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & iOSSurfaceCreateInfoMVK ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.sType ); - VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.flags ); - VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.pView ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageBlit const & imageBlit ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageBlit.srcSubresource ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, imageBlit.srcOffsets[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, imageBlit.dstSubresource ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, imageBlit.dstOffsets[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCompressionControlEXT const & imageCompressionControlEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.compressionControlPlaneCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.pFixedRateFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCompressionPropertiesEXT const & imageCompressionPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.imageCompressionFlags ); - VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.imageCompressionFixedRateFlags ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA const & imageFormatConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.imageCreateInfo ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.requiredFormatFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.flags ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.sysmemPixelFormat ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.colorSpaceCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.pColorSpaces ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA const & imageConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.formatConstraintsCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.pFormatConstraints ); - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.bufferCollectionConstraints ); - VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.flags ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCopy const & imageCopy ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageCopy.srcSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy.dstSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageCopy.extent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubresourceLayout const & subresourceLayout ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.offset ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.size ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.rowPitch ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.arrayPitch ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.depthPitch ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT const & imageDrmFormatModifierExplicitCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.drmFormatModifier ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.drmFormatModifierPlaneCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.pPlaneLayouts ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT const & imageDrmFormatModifierListCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.drmFormatModifierCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.pDrmFormatModifiers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT const & imageDrmFormatModifierPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.drmFormatModifier ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo const & imageFormatListCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.viewFormatCount ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.pViewFormats ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 const & imageFormatProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.imageFormatProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier const & imageMemoryBarrier ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.oldLayout ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.newLayout ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.srcQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.dstQueueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.image ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.subresourceRange ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 const & imageMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.image ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & imagePipeSurfaceCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.flags ); - VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.imagePipeHandle ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo const & imagePlaneMemoryRequirementsInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.planeAspect ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageResolve const & imageResolve ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageResolve.srcSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve.dstSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve.extent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageResolve2 const & imageResolve2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.srcSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.srcOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.dstSubresource ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.dstOffset ); - VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.extent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 const & imageSparseMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.image ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo const & imageStencilUsageCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.stencilUsage ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresource2EXT const & imageSubresource2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2EXT.imageSubresource ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR const & imageSwapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.swapchain ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT const & imageViewASTCDecodeModeEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.decodeMode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX const & imageViewAddressPropertiesNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.deviceAddress ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & imageViewCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.image ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.viewType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.format ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.components ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.subresourceRange ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX const & imageViewHandleInfoNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.imageView ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.descriptorType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.sampler ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewMinLodCreateInfoEXT const & imageViewMinLodCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.minLod ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewSampleWeightCreateInfoQCOM const & imageViewSampleWeightCreateInfoQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.filterCenter ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.filterSize ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.numPhases ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo const & imageViewUsageCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.usage ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID const & importAndroidHardwareBufferInfoANDROID ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.buffer ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR const & importFenceFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.fence ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.fd ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR const & importFenceWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.fence ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.handle ); - VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryBufferCollectionFUCHSIA const & importMemoryBufferCollectionFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.collection ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.index ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR const & importMemoryFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.fd ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT const & importMemoryHostPointerInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.pHostPointer ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR const & importMemoryWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.handle ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV const & importMemoryWin32HandleInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.handle ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryZirconHandleInfoFUCHSIA const & importMemoryZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.handle ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalBufferInfoEXT const & importMetalBufferInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.mtlBuffer ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalIOSurfaceInfoEXT const & importMetalIOSurfaceInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.ioSurface ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalSharedEventInfoEXT const & importMetalSharedEventInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.mtlSharedEvent ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalTextureInfoEXT const & importMetalTextureInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.plane ); - VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.mtlTexture ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR const & importSemaphoreFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.fd ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR const & importSemaphoreWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.handle ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.name ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA const & importSemaphoreZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.flags ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.handleType ); - VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.zirconHandle ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV const & indirectCommandsLayoutTokenNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.tokenType ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.stream ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.offset ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.vertexBindingUnit ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.vertexDynamicStride ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantPipelineLayout ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantShaderStageFlags ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantOffset ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantSize ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.indirectStateFlags ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.indexTypeCount ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pIndexTypes ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pIndexTypeValues ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & indirectCommandsLayoutCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.tokenCount ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pTokens ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.streamCount ); - VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pStreamStrides ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL const & initializePerformanceApiInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.pUserData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference const & inputAttachmentAspectReference ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.subpass ); - VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.inputAttachmentIndex ); - VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.aspectMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & instanceCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.pApplicationInfo ); - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.enabledLayerCount ); - for ( size_t i = 0; i < instanceCreateInfo.enabledLayerCount; ++i ) - { - for ( const char * p = instanceCreateInfo.ppEnabledLayerNames[i]; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - } - VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.enabledExtensionCount ); - for ( size_t i = 0; i < instanceCreateInfo.enabledExtensionCount; ++i ) - { - for ( const char * p = instanceCreateInfo.ppEnabledExtensionNames[i]; *p != '\0'; ++p ) - { - VULKAN_HPP_HASH_COMBINE( seed, *p ); - } - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::LayerProperties const & layerProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, layerProperties.layerName[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, layerProperties.specVersion ); - VULKAN_HPP_HASH_COMBINE( seed, layerProperties.implementationVersion ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, layerProperties.description[i] ); - } - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & macOSSurfaceCreateInfoMVK ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.sType ); - VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.flags ); - VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.pView ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MappedMemoryRange const & mappedMemoryRange ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.sType ); - VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.memory ); - VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.offset ); - VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo const & memoryAllocateFlagsInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.deviceMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & memoryAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.allocationSize ); - VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.memoryTypeIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryBarrier const & memoryBarrier ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.dstAccessMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo const & memoryDedicatedAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.image ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.buffer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements const & memoryDedicatedRequirements ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.prefersDedicatedAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.requiresDedicatedAllocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR const & memoryFdPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.memoryTypeBits ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID const & memoryGetAndroidHardwareBufferInfoANDROID ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.memory ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR const & memoryGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.memory ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.handleType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV const & memoryGetRemoteAddressInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.memory ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.handleType ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR const & memoryGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.memory ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.handleType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA const & memoryGetZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.memory ); - VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.handleType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryHeap const & memoryHeap ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryHeap.size ); - VULKAN_HPP_HASH_COMBINE( seed, memoryHeap.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT const & memoryHostPointerPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.memoryTypeBits ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo const & memoryOpaqueCaptureAddressAllocateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.opaqueCaptureAddress ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT const & memoryPriorityAllocateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.priority ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryRequirements const & memoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.size ); - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.alignment ); - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.memoryTypeBits ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryRequirements2 const & memoryRequirements2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.memoryRequirements ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryType const & memoryType ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryType.propertyFlags ); - VULKAN_HPP_HASH_COMBINE( seed, memoryType.heapIndex ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR const & memoryWin32HandlePropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.memoryTypeBits ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA const & memoryZirconHandlePropertiesFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.memoryTypeBits ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & metalSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.pLayer ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT const & multiDrawIndexedInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.firstIndex ); - VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.indexCount ); - VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.vertexOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT const & multiDrawInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, multiDrawInfoEXT.firstVertex ); - VULKAN_HPP_HASH_COMBINE( seed, multiDrawInfoEXT.vertexCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT const & multisamplePropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.maxSampleLocationGridSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::MultisampledRenderToSingleSampledInfoEXT const & multisampledRenderToSingleSampledInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.multisampledRenderToSingleSampledEnable ); - VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.rasterizationSamples ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiviewPerViewAttributesInfoNVX const & multiviewPerViewAttributesInfoNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.perViewAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.perViewAttributesPositionXOnly ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE const & mutableDescriptorTypeListVALVE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeListVALVE.descriptorTypeCount ); - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeListVALVE.pDescriptorTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeCreateInfoVALVE const & mutableDescriptorTypeCreateInfoVALVE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoVALVE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoVALVE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoVALVE.mutableDescriptorTypeListCount ); - VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoVALVE.pMutableDescriptorTypeLists ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE const & pastPresentationTimingGOOGLE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.presentID ); - VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.desiredPresentTime ); - VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.actualPresentTime ); - VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.earliestPresentTime ); - VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.presentMargin ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & performanceConfigurationAcquireInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.type ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR const & performanceCounterDescriptionKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.flags ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.name[i] ); - } - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.category[i] ); - } - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.description[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR const & performanceCounterKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.unit ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.scope ); - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.storage ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.uuid[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL const & performanceMarkerInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.marker ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL const & performanceOverrideInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.type ); - VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.enable ); - VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.parameter ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR const & performanceQuerySubmitInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.counterPassIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL const & performanceStreamMarkerInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.marker ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures const & physicalDevice16BitStorageFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storageBuffer16BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.uniformAndStorageBuffer16BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storagePushConstant16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storageInputOutput16 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice4444FormatsFeaturesEXT const & physicalDevice4444FormatsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.formatA4R4G4B4 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.formatA4B4G4R4 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures const & physicalDevice8BitStorageFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.storageBuffer8BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.uniformAndStorageBuffer8BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.storagePushConstant8 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT const & physicalDeviceASTCDecodeFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.decodeModeSharedExponent ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructureFeaturesKHR const & physicalDeviceAccelerationStructureFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructure ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureCaptureReplay ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureIndirectBuild ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureHostCommands ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.descriptorBindingAccelerationStructureUpdateAfterBind ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructurePropertiesKHR const & physicalDeviceAccelerationStructurePropertiesKHR ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxGeometryCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxInstanceCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPrimitiveCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPerStageDescriptorAccelerationStructures ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPerStageDescriptorUpdateAfterBindAccelerationStructures ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxDescriptorSetAccelerationStructures ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxDescriptorSetUpdateAfterBindAccelerationStructures ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.minAccelerationStructureScratchOffsetAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAmigoProfilingFeaturesSEC const & physicalDeviceAmigoProfilingFeaturesSEC ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.amigoProfiling ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & - physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.attachmentFeedbackLoopLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & physicalDeviceBlendOperationAdvancedFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.advancedBlendCoherentOperations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & physicalDeviceBlendOperationAdvancedPropertiesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendMaxColorAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendIndependentBlend ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendNonPremultipliedSrcColor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendNonPremultipliedDstColor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendCorrelatedOverlap ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendAllOperations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBorderColorSwizzleFeaturesEXT const & physicalDeviceBorderColorSwizzleFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.borderColorSwizzle ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.borderColorSwizzleFromImage ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures const & physicalDeviceBufferDeviceAddressFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddress ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddressCaptureReplay ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddressMultiDevice ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT const & physicalDeviceBufferDeviceAddressFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddress ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddressCaptureReplay ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddressMultiDevice ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD const & physicalDeviceCoherentMemoryFeaturesAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.deviceCoherentMemory ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceColorWriteEnableFeaturesEXT const & physicalDeviceColorWriteEnableFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.colorWriteEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV const & physicalDeviceComputeShaderDerivativesFeaturesNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesNV.computeDerivativeGroupQuads ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesNV.computeDerivativeGroupLinear ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT const & physicalDeviceConditionalRenderingFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.conditionalRendering ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.inheritedConditionalRendering ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT const & - physicalDeviceConservativeRasterizationPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.primitiveOverestimationSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.maxExtraPrimitiveOverestimationSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.extraPrimitiveOverestimationSizeGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.primitiveUnderestimation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.conservativePointAndLineRasterization ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.degenerateTrianglesRasterized ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.degenerateLinesRasterized ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.fullyCoveredFragmentShaderInputVariable ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.conservativeRasterizationPostDepthCoverage ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV const & physicalDeviceCooperativeMatrixFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.cooperativeMatrix ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.cooperativeMatrixRobustBufferAccess ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV const & physicalDeviceCooperativeMatrixPropertiesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.cooperativeMatrixSupportedStages ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV const & physicalDeviceCornerSampledImageFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.cornerSampledImage ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV const & physicalDeviceCoverageReductionModeFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.coverageReductionMode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorFeaturesEXT const & physicalDeviceCustomBorderColorFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.customBorderColors ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.customBorderColorWithoutFormat ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorPropertiesEXT const & physicalDeviceCustomBorderColorPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.maxCustomBorderColorSamplers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & - physicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.dedicatedAllocationImageAliasing ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampZeroOneFeaturesEXT const & physicalDeviceDepthClampZeroOneFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesEXT.depthClampZeroOne ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipControlFeaturesEXT const & physicalDeviceDepthClipControlFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.depthClipControl ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT const & physicalDeviceDepthClipEnableFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.depthClipEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties const & physicalDeviceDepthStencilResolveProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.supportedDepthResolveModes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.supportedStencilResolveModes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.independentResolveNone ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.independentResolve ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures const & physicalDeviceDescriptorIndexingFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUniformBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingSampledImageUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageImageUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUniformTexelBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageTexelBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUpdateUnusedWhilePending ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingPartiallyBound ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingVariableDescriptorCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.runtimeDescriptorArray ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties const & physicalDeviceDescriptorIndexingProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxUpdateAfterBindDescriptorsInAllPools ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderUniformBufferArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderSampledImageArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderStorageBufferArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderStorageImageArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderInputAttachmentArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.robustBufferAccessUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.quadDivergentImplicitLod ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageUpdateAfterBindResources ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindInputAttachments ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & physicalDeviceDescriptorSetHostMappingFeaturesVALVE ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.descriptorSetHostMapping ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & physicalDeviceDeviceGeneratedCommandsFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.deviceGeneratedCommands ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & physicalDeviceDeviceGeneratedCommandsPropertiesNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxGraphicsShaderGroupCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectSequenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsTokenCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsStreamCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsTokenOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsStreamStride ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minSequencesCountBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minSequencesIndexBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minIndirectCommandsBufferOffsetAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceMemoryReportFeaturesEXT const & physicalDeviceDeviceMemoryReportFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.deviceMemoryReport ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiagnosticsConfigFeaturesNV const & physicalDeviceDiagnosticsConfigFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.diagnosticsConfig ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT const & physicalDeviceDiscardRectanglePropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.maxDiscardRectangles ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties const & physicalDeviceDriverProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverID ); - for ( size_t i = 0; i < VK_MAX_DRIVER_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverName[i] ); - } - for ( size_t i = 0; i < VK_MAX_DRIVER_INFO_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverInfo[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.conformanceVersion ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDrmPropertiesEXT const & physicalDeviceDrmPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.hasPrimary ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.hasRender ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.primaryMajor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.primaryMinor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.renderMajor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.renderMinor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingFeatures const & physicalDeviceDynamicRenderingFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.dynamicRendering ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV const & physicalDeviceExclusiveScissorFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.exclusiveScissor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState2FeaturesEXT const & physicalDeviceExtendedDynamicState2FeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2LogicOp ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2PatchControlPoints ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicStateFeaturesEXT const & physicalDeviceExtendedDynamicStateFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.extendedDynamicState ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo const & physicalDeviceExternalBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.usage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.handleType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo const & physicalDeviceExternalFenceInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.handleType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo const & physicalDeviceExternalImageFormatInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.handleType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT const & physicalDeviceExternalMemoryHostPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryRDMAFeaturesNV const & physicalDeviceExternalMemoryRDMAFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.externalMemoryRDMA ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo const & physicalDeviceExternalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.handleType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 const & physicalDeviceFeatures2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.features ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties const & physicalDeviceFloatControlsProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.denormBehaviorIndependence ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.roundingModeIndependence ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat64 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2FeaturesEXT const & physicalDeviceFragmentDensityMap2FeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.fragmentDensityMapDeferred ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2PropertiesEXT const & physicalDeviceFragmentDensityMap2PropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.subsampledLoads ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.subsampledCoarseReconstructionEarlyAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.maxSubsampledArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.maxDescriptorSetSubsampledSamplers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT const & physicalDeviceFragmentDensityMapFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMap ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMapDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMapNonSubsampledImages ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & physicalDeviceFragmentDensityMapOffsetFeaturesQCOM ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.fragmentDensityMapOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & - physicalDeviceFragmentDensityMapOffsetPropertiesQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.fragmentDensityOffsetGranularity ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT const & physicalDeviceFragmentDensityMapPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.minFragmentDensityTexelSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.maxFragmentDensityTexelSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.fragmentDensityInvocations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & physicalDeviceFragmentShaderBarycentricFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.fragmentShaderBarycentric ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & - physicalDeviceFragmentShaderBarycentricPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.triStripVertexOrderIndependentOfProvokingVertex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & physicalDeviceFragmentShaderInterlockFeaturesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderSampleInterlock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderPixelInterlock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderShadingRateInterlock ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & physicalDeviceFragmentShadingRateEnumsFeaturesNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.fragmentShadingRateEnums ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.supersampleFragmentShadingRates ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.noInvocationFragmentShadingRates ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & physicalDeviceFragmentShadingRateEnumsPropertiesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.maxFragmentShadingRateInvocationCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateFeaturesKHR const & physicalDeviceFragmentShadingRateFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.pipelineFragmentShadingRate ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.primitiveFragmentShadingRate ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.attachmentFragmentShadingRate ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR const & physicalDeviceFragmentShadingRateKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.sampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.fragmentSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRatePropertiesKHR const & physicalDeviceFragmentShadingRatePropertiesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.minFragmentShadingRateAttachmentTexelSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateAttachmentTexelSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateAttachmentTexelSizeAspectRatio ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.primitiveFragmentShadingRateWithMultipleViewports ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.layeredShadingRateAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateNonTrivialCombinerOps ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentSizeAspectRatio ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateCoverageSamples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateRasterizationSamples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithShaderDepthStencilWrites ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithSampleMask ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithShaderSampleMask ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithConservativeRasterization ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithFragmentShaderInterlock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithCustomSampleLocations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateStrictMultiplyCombiner ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & physicalDeviceGlobalPriorityQueryFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeaturesKHR.globalPriorityQuery ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & physicalDeviceGraphicsPipelineLibraryFeaturesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.graphicsPipelineLibrary ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & physicalDeviceGraphicsPipelineLibraryPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.graphicsPipelineLibraryFastLinking ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.graphicsPipelineLibraryIndependentInterpolationDecoration ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties const & physicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.physicalDeviceCount ); - for ( size_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.physicalDevices[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.subsetAllocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures const & physicalDeviceHostQueryResetFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.hostQueryReset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties const & physicalDeviceIDProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.pNext ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceUUID[i] ); - } - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.driverUUID[i] ); - } - for ( size_t i = 0; i < VK_LUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceLUID[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceNodeMask ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceLUIDValid ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImage2DViewOf3DFeaturesEXT const & physicalDeviceImage2DViewOf3DFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.image2DViewOf3D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.sampler2DViewOf3D ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlFeaturesEXT const & physicalDeviceImageCompressionControlFeaturesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.imageCompressionControl ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & - physicalDeviceImageCompressionControlSwapchainFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.imageCompressionControlSwapchain ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT const & physicalDeviceImageDrmFormatModifierInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.drmFormatModifier ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.sharingMode ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.queueFamilyIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.pQueueFamilyIndices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 const & physicalDeviceImageFormatInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.format ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.type ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.tiling ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.usage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingFeaturesQCOM const & physicalDeviceImageProcessingFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureSampleWeighted ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureBoxFilter ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureBlockMatch ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingPropertiesQCOM const & physicalDeviceImageProcessingPropertiesQCOM ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxWeightFilterPhases ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxWeightFilterDimension ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxBlockMatchRegion ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxBoxFilterBlockSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageRobustnessFeatures const & physicalDeviceImageRobustnessFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.robustImageAccess ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT const & physicalDeviceImageViewImageFormatInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.imageViewType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewMinLodFeaturesEXT const & physicalDeviceImageViewMinLodFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.minLod ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures const & physicalDeviceImagelessFramebufferFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.imagelessFramebuffer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT const & physicalDeviceIndexTypeUint8FeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8FeaturesEXT.indexTypeUint8 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInheritedViewportScissorFeaturesNV const & physicalDeviceInheritedViewportScissorFeaturesNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.inheritedViewportScissor2D ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeatures const & physicalDeviceInlineUniformBlockFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.inlineUniformBlock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.descriptorBindingInlineUniformBlockUpdateAfterBind ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockProperties const & physicalDeviceInlineUniformBlockProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxInlineUniformBlockSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxPerStageDescriptorInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxDescriptorSetInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInvocationMaskFeaturesHUAWEI const & physicalDeviceInvocationMaskFeaturesHUAWEI ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.invocationMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyDitheringFeaturesEXT const & physicalDeviceLegacyDitheringFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.legacyDithering ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits const & physicalDeviceLimits ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension1D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension2D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension3D ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimensionCube ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelBufferElements ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxUniformBufferRange ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxStorageBufferRange ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPushConstantsSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxMemoryAllocationCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerAllocationCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.bufferImageGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sparseAddressSpaceSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxBoundDescriptorSets ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageResources ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetUniformBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputAttributes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputBindings ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputAttributeOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputBindingStride ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationGenerationLevel ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationPatchSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerVertexInputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerVertexOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerPatchOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlTotalOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationEvaluationInputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationEvaluationOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryShaderInvocations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryInputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryOutputVertices ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryTotalOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentInputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentOutputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentDualSrcAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentCombinedOutputResources ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeSharedMemorySize ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupCount[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupInvocations ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupSize[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subPixelPrecisionBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subTexelPrecisionBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.mipmapPrecisionBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDrawIndexedIndexValue ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDrawIndirectCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerLodBias ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerAnisotropy ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxViewports ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxViewportDimensions[i] ); - } - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.viewportBoundsRange[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.viewportSubPixelBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minMemoryMapAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minUniformBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minStorageBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelGatherOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelGatherOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minInterpolationOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxInterpolationOffset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subPixelInterpolationOffsetBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferWidth ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferHeight ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferLayers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferColorSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferDepthSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferStencilSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferNoAttachmentsSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxColorAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageColorSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageIntegerSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageDepthSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageStencilSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.storageImageSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSampleMaskWords ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.timestampComputeAndGraphics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.timestampPeriod ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxClipDistances ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxCullDistances ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxCombinedClipAndCullDistances ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.discreteQueuePriorities ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.pointSizeRange[i] ); - } - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.lineWidthRange[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.pointSizeGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.lineWidthGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.strictLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.standardSampleLocations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.optimalBufferCopyOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.optimalBufferCopyRowPitchAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.nonCoherentAtomSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT const & physicalDeviceLineRasterizationFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.rectangularLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.bresenhamLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.smoothLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.stippledRectangularLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.stippledBresenhamLines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeaturesEXT.stippledSmoothLines ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT const & physicalDeviceLineRasterizationPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationPropertiesEXT.lineSubPixelPrecisionBits ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLinearColorAttachmentFeaturesNV const & physicalDeviceLinearColorAttachmentFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.linearColorAttachment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties const & physicalDeviceMaintenance3Properties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.maxPerSetDescriptors ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.maxMemoryAllocationSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Features const & physicalDeviceMaintenance4Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.maintenance4 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Properties const & physicalDeviceMaintenance4Properties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.maxBufferSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT const & physicalDeviceMemoryBudgetPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.pNext ); - for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.heapBudget[i] ); - } - for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.heapUsage[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT const & physicalDeviceMemoryPriorityFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.memoryPriority ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties const & physicalDeviceMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryTypeCount ); - for ( size_t i = 0; i < VK_MAX_MEMORY_TYPES; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryTypes[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryHeapCount ); - for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryHeaps[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 const & physicalDeviceMemoryProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.memoryProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesEXT const & physicalDeviceMeshShaderFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.taskShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.meshShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.multiviewMeshShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.primitiveFragmentShadingRateMeshShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.meshShaderQueries ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV const & physicalDeviceMeshShaderFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.taskShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.meshShader ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesEXT const & physicalDeviceMeshShaderPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupTotalCount ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupCount[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupInvocations ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupSize[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskPayloadSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskSharedMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskPayloadAndSharedMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupTotalCount ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupCount[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupInvocations ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupSize[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshSharedMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshPayloadAndSharedMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshPayloadAndOutputMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputComponents ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputVertices ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputPrimitives ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputLayers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshMultiviewViewCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.meshOutputPerVertexGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.meshOutputPerPrimitiveGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxPreferredTaskWorkGroupInvocations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxPreferredMeshWorkGroupInvocations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersLocalInvocationVertexOutput ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersLocalInvocationPrimitiveOutput ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersCompactVertexOutput ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersCompactPrimitiveOutput ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV const & physicalDeviceMeshShaderPropertiesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxDrawMeshTasksCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskWorkGroupInvocations ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskWorkGroupSize[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskTotalMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskOutputCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshWorkGroupInvocations ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshWorkGroupSize[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshTotalMemorySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshOutputVertices ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshOutputPrimitives ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshMultiviewViewCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.meshOutputPerVertexGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.meshOutputPerPrimitiveGranularity ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawFeaturesEXT const & physicalDeviceMultiDrawFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.multiDraw ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawPropertiesEXT const & physicalDeviceMultiDrawPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.maxMultiDrawCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & - physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.multisampledRenderToSingleSampled ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures const & physicalDeviceMultiviewFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiview ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiviewGeometryShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiviewTessellationShader ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & - physicalDeviceMultiviewPerViewAttributesPropertiesNVX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.perViewPositionAllComponents ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties const & physicalDeviceMultiviewProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.maxMultiviewViewCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.maxMultiviewInstanceIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & physicalDeviceMutableDescriptorTypeFeaturesVALVE ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesVALVE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesVALVE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesVALVE.mutableDescriptorType ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & physicalDeviceNonSeamlessCubeMapFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.nonSeamlessCubeMap ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT const & physicalDevicePCIBusInfoPropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciDomain ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciBus ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciDevice ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciFunction ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & physicalDevicePageableDeviceLocalMemoryFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.pageableDeviceLocalMemory ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR const & physicalDevicePerformanceQueryFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.performanceCounterQueryPools ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.performanceCounterMultipleQueryPools ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR const & physicalDevicePerformanceQueryPropertiesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.allowCommandBufferQueryCopies ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineCreationCacheControlFeatures const & physicalDevicePipelineCreationCacheControlFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.pipelineCreationCacheControl ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & - physicalDevicePipelineExecutablePropertiesFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.pipelineExecutableInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelinePropertiesFeaturesEXT const & physicalDevicePipelinePropertiesFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.pipelinePropertiesIdentifier ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessFeaturesEXT const & physicalDevicePipelineRobustnessFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeaturesEXT.pipelineRobustness ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessPropertiesEXT const & physicalDevicePipelineRobustnessPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.defaultRobustnessStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.defaultRobustnessUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.defaultRobustnessVertexInputs ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessPropertiesEXT.defaultRobustnessImages ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties const & physicalDevicePointClippingProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.pointClippingBehavior ); - return seed; - } - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetFeaturesKHR const & physicalDevicePortabilitySubsetFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.constantAlphaColorBlendFactors ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.events ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageViewFormatReinterpretation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageViewFormatSwizzle ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageView2DOn3DImage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.multisampleArrayImage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.mutableComparisonSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.pointPolygons ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.samplerMipLodBias ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.separateStencilMaskRef ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.shaderSampleRateInterpolationFunctions ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.tessellationIsolines ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.tessellationPointMode ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.triangleFans ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.vertexAttributeAccessBeyondStride ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetPropertiesKHR const & physicalDevicePortabilitySubsetPropertiesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.minVertexInputBindingStrideAlignment ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentIdFeaturesKHR const & physicalDevicePresentIdFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.presentId ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentWaitFeaturesKHR const & physicalDevicePresentWaitFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.presentWait ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & - physicalDevicePrimitiveTopologyListRestartFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.primitiveTopologyListRestart ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.primitiveTopologyPatchListRestart ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & physicalDevicePrimitivesGeneratedQueryFeaturesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQuery ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQueryWithRasterizerDiscard ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQueryWithNonZeroStreams ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrivateDataFeatures const & physicalDevicePrivateDataFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.privateData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties const & physicalDeviceSparseProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard2DBlockShape ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard2DMultisampleBlockShape ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard3DBlockShape ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyAlignedMipSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyNonResidentStrict ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties const & physicalDeviceProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.apiVersion ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.driverVersion ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.vendorID ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceID ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceType ); - for ( size_t i = 0; i < VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceName[i] ); - } - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.pipelineCacheUUID[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.limits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.sparseProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 const & physicalDeviceProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.properties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures const & physicalDeviceProtectedMemoryFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.protectedMemory ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties const & physicalDeviceProtectedMemoryProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.protectedNoFault ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexFeaturesEXT const & physicalDeviceProvokingVertexFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.provokingVertexLast ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.transformFeedbackPreservesProvokingVertex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexPropertiesEXT const & physicalDeviceProvokingVertexPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.provokingVertexModePerPipeline ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.transformFeedbackPreservesTriangleFanProvokingVertex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR const & physicalDevicePushDescriptorPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorPropertiesKHR.maxPushDescriptors ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & physicalDeviceRGBA10X6FormatsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.formatRgba10x6WithoutYCbCrSampler ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & - physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderColorAttachmentAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderDepthAttachmentAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderStencilAttachmentAccess ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayQueryFeaturesKHR const & physicalDeviceRayQueryFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.rayQuery ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & physicalDeviceRayTracingMaintenance1FeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.rayTracingMaintenance1 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.rayTracingPipelineTraceRaysIndirect2 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMotionBlurFeaturesNV const & physicalDeviceRayTracingMotionBlurFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.rayTracingMotionBlur ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.rayTracingMotionBlurPipelineTraceRaysIndirect ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelineFeaturesKHR const & physicalDeviceRayTracingPipelineFeaturesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineShaderGroupHandleCaptureReplay ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineShaderGroupHandleCaptureReplayMixed ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineTraceRaysIndirect ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTraversalPrimitiveCulling ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelinePropertiesKHR const & physicalDeviceRayTracingPipelinePropertiesKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayRecursionDepth ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxShaderGroupStride ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupBaseAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleCaptureReplaySize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayDispatchInvocationCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayHitAttributeSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV const & physicalDeviceRayTracingPropertiesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.shaderGroupHandleSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxRecursionDepth ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxShaderGroupStride ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.shaderGroupBaseAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxGeometryCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxInstanceCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxTriangleCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxDescriptorSetAccelerationStructures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & physicalDeviceRepresentativeFragmentTestFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.representativeFragmentTest ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2FeaturesEXT const & physicalDeviceRobustness2FeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.robustBufferAccess2 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.robustImageAccess2 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.nullDescriptor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2PropertiesEXT const & physicalDeviceRobustness2PropertiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.robustStorageBufferAccessSizeAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.robustUniformBufferAccessSizeAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT const & physicalDeviceSampleLocationsPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationSampleCounts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.maxSampleLocationGridSize ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationCoordinateRange[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationSubPixelBits ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.variableSampleLocations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties const & physicalDeviceSamplerFilterMinmaxProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.filterMinmaxSingleComponentFormats ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.filterMinmaxImageComponentMapping ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures const & physicalDeviceSamplerYcbcrConversionFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.samplerYcbcrConversion ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures const & physicalDeviceScalarBlockLayoutFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.scalarBlockLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & physicalDeviceSeparateDepthStencilLayoutsFeatures ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.separateDepthStencilLayouts ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & physicalDeviceShaderAtomicFloat2FeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat32AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat64AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat32AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat64AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderImageFloat32AtomicMinMax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.sparseImageFloat32AtomicMinMax ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloatFeaturesEXT const & physicalDeviceShaderAtomicFloatFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat32Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat32AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat64AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat32Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat32AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat64AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderImageFloat32Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderImageFloat32AtomicAdd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sparseImageFloat32Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sparseImageFloat32AtomicAdd ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features const & physicalDeviceShaderAtomicInt64Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.shaderBufferInt64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.shaderSharedInt64Atomics ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR const & physicalDeviceShaderClockFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.shaderSubgroupClock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.shaderDeviceClock ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD const & physicalDeviceShaderCoreProperties2AMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.shaderCoreFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.activeComputeUnitCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD const & physicalDeviceShaderCorePropertiesAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.shaderEngineCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.shaderArraysPerEngineCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.computeUnitsPerShaderArray ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.simdPerComputeUnit ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.wavefrontsPerSimd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.wavefrontSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sgprsPerSimd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.minSgprAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.maxSgprAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sgprAllocationGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.vgprsPerSimd ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.minVgprAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.maxVgprAllocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.vgprAllocationGranularity ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & - physicalDeviceShaderDemoteToHelperInvocationFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.shaderDemoteToHelperInvocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures const & physicalDeviceShaderDrawParametersFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.shaderDrawParameters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & - physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.shaderEarlyAndLateFragmentTests ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features const & physicalDeviceShaderFloat16Int8Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.shaderFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.shaderInt8 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & physicalDeviceShaderImageAtomicInt64FeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.shaderImageInt64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.sparseImageInt64Atomics ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV const & physicalDeviceShaderImageFootprintFeaturesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.imageFootprint ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductFeatures const & physicalDeviceShaderIntegerDotProductFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.shaderIntegerDotProduct ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductProperties const & physicalDeviceShaderIntegerDotProductProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, - physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & physicalDeviceShaderIntegerFunctions2FeaturesINTEL ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.shaderIntegerFunctions2 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & physicalDeviceShaderModuleIdentifierFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.shaderModuleIdentifier ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & physicalDeviceShaderModuleIdentifierPropertiesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.pNext ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.shaderModuleIdentifierAlgorithmUUID[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV const & physicalDeviceShaderSMBuiltinsFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.shaderSMBuiltins ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV const & physicalDeviceShaderSMBuiltinsPropertiesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.shaderSMCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.shaderWarpsPerSM ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & physicalDeviceShaderSubgroupExtendedTypesFeatures ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & - physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.shaderSubgroupUniformControlFlow ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTerminateInvocationFeatures const & physicalDeviceShaderTerminateInvocationFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.shaderTerminateInvocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV const & physicalDeviceShadingRateImageFeaturesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.shadingRateImage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.shadingRateCoarseSampleOrder ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV const & physicalDeviceShadingRateImagePropertiesNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRateTexelSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRatePaletteSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRateMaxCoarseSamples ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 const & physicalDeviceSparseImageFormatInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.format ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.type ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.samples ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.usage ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.tiling ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties const & physicalDeviceSubgroupProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.subgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.supportedStages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.supportedOperations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.quadOperationsInAllStages ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeatures const & physicalDeviceSubgroupSizeControlFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.subgroupSizeControl ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.computeFullSubgroups ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlProperties const & physicalDeviceSubgroupSizeControlProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.minSubgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.maxSubgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.maxComputeWorkgroupSubgroups ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.requiredSubgroupSizeStages ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & physicalDeviceSubpassMergeFeedbackFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.subpassMergeFeedback ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingFeaturesHUAWEI const & physicalDeviceSubpassShadingFeaturesHUAWEI ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.subpassShading ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingPropertiesHUAWEI const & physicalDeviceSubpassShadingPropertiesHUAWEI ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.maxSubpassShadingWorkgroupSizeAspectRatio ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR const & physicalDeviceSurfaceInfo2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.surface ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSynchronization2Features const & physicalDeviceSynchronization2Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.synchronization2 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & physicalDeviceTexelBufferAlignmentFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.texelBufferAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentProperties const & physicalDeviceTexelBufferAlignmentProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.storageTexelBufferOffsetAlignmentBytes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.storageTexelBufferOffsetSingleTexelAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.uniformTexelBufferOffsetAlignmentBytes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.uniformTexelBufferOffsetSingleTexelAlignment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeatures const & physicalDeviceTextureCompressionASTCHDRFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.textureCompressionASTC_HDR ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTilePropertiesFeaturesQCOM const & physicalDeviceTilePropertiesFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.tileProperties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures const & physicalDeviceTimelineSemaphoreFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.timelineSemaphore ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties const & physicalDeviceTimelineSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.maxTimelineSemaphoreValueDifference ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties const & physicalDeviceToolProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.pNext ); - for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.name[i] ); - } - for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.version[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.purposes ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.description[i] ); - } - for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.layer[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT const & physicalDeviceTransformFeedbackFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.transformFeedback ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.geometryStreams ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT const & physicalDeviceTransformFeedbackPropertiesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackStreams ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackStreamDataSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferDataSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferDataStride ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackQueries ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackStreamsLinesTriangles ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackRasterizationStreamSelect ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackDraw ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures const & physicalDeviceUniformBufferStandardLayoutFeatures ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.uniformBufferStandardLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures const & physicalDeviceVariablePointersFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.variablePointersStorageBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.variablePointers ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & physicalDeviceVertexAttributeDivisorFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeaturesEXT.vertexAttributeInstanceRateDivisor ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeaturesEXT.vertexAttributeInstanceRateZeroDivisor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & physicalDeviceVertexAttributeDivisorPropertiesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.maxVertexAttribDivisor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & physicalDeviceVertexInputDynamicStateFeaturesEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.vertexInputDynamicState ); - return seed; - } - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR const & physicalDeviceVideoFormatInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.imageUsage ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features const & physicalDeviceVulkan11Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storageBuffer16BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.uniformAndStorageBuffer16BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storagePushConstant16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storageInputOutput16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiview ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiviewGeometryShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiviewTessellationShader ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.variablePointersStorageBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.variablePointers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.protectedMemory ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.samplerYcbcrConversion ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.shaderDrawParameters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties const & physicalDeviceVulkan11Properties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.pNext ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceUUID[i] ); - } - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.driverUUID[i] ); - } - for ( size_t i = 0; i < VK_LUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceLUID[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceNodeMask ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceLUIDValid ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSupportedStages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSupportedOperations ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupQuadOperationsInAllStages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.pointClippingBehavior ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMultiviewViewCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMultiviewInstanceIndex ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.protectedNoFault ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxPerSetDescriptors ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMemoryAllocationSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features const & physicalDeviceVulkan12Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.samplerMirrorClampToEdge ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.drawIndirectCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.storageBuffer8BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.uniformAndStorageBuffer8BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.storagePushConstant8 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderBufferInt64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSharedInt64Atomics ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInt8 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInputAttachmentArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSampledImageArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageImageArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInputAttachmentArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayNonUniformIndexing ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUniformBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingSampledImageUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageImageUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUniformTexelBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageTexelBufferUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUpdateUnusedWhilePending ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingPartiallyBound ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingVariableDescriptorCount ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.runtimeDescriptorArray ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.samplerFilterMinmax ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.scalarBlockLayout ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.imagelessFramebuffer ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.uniformBufferStandardLayout ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSubgroupExtendedTypes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.separateDepthStencilLayouts ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.hostQueryReset ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.timelineSemaphore ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddress ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddressCaptureReplay ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddressMultiDevice ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModel ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModelDeviceScope ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModelAvailabilityVisibilityChains ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderOutputViewportIndex ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderOutputLayer ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.subgroupBroadcastDynamicId ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties const & physicalDeviceVulkan12Properties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverID ); - for ( size_t i = 0; i < VK_MAX_DRIVER_NAME_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverName[i] ); - } - for ( size_t i = 0; i < VK_MAX_DRIVER_INFO_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverInfo[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.conformanceVersion ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.denormBehaviorIndependence ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.roundingModeIndependence ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat16 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat32 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat64 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderUniformBufferArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSampledImageArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderStorageBufferArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderStorageImageArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderInputAttachmentArrayNonUniformIndexingNative ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.robustBufferAccessUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.quadDivergentImplicitLod ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageUpdateAfterBindResources ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindSamplers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindUniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindSampledImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageImages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.supportedDepthResolveModes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.supportedStencilResolveModes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.independentResolveNone ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.independentResolve ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.filterMinmaxSingleComponentFormats ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.filterMinmaxImageComponentMapping ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxTimelineSemaphoreValueDifference ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.framebufferIntegerColorSampleCounts ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Features const & physicalDeviceVulkan13Features ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.robustImageAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.inlineUniformBlock ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.descriptorBindingInlineUniformBlockUpdateAfterBind ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.pipelineCreationCacheControl ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.privateData ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderDemoteToHelperInvocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderTerminateInvocation ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.subgroupSizeControl ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.computeFullSubgroups ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.synchronization2 ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.textureCompressionASTC_HDR ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderZeroInitializeWorkgroupMemory ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.dynamicRendering ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderIntegerDotProduct ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.maintenance4 ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Properties const & physicalDeviceVulkan13Properties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.minSubgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxSubgroupSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxComputeWorkgroupSubgroups ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.requiredSubgroupSizeStages ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxInlineUniformBlockSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxPerStageDescriptorInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxDescriptorSetInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxInlineUniformTotalSize ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitSignedAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.storageTexelBufferOffsetAlignmentBytes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.storageTexelBufferOffsetSingleTexelAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.uniformTexelBufferOffsetAlignmentBytes ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.uniformTexelBufferOffsetSingleTexelAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxBufferSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures const & physicalDeviceVulkanMemoryModelFeatures ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModel ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModelDeviceScope ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModelAvailabilityVisibilityChains ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & - physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayoutScalarBlockLayout ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout8BitAccess ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout16BitAccess ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & physicalDeviceYcbcr2Plane444FormatsFeaturesEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ycbcr2plane444Formats ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT const & physicalDeviceYcbcrImageArraysFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.ycbcrImageArrays ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & physicalDeviceZeroInitializeWorkgroupMemoryFeatures ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.sType ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.shaderZeroInitializeWorkgroupMemory ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & pipelineCacheCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.initialDataSize ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.pInitialData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersionOne const & pipelineCacheHeaderVersionOne ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.headerSize ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.headerVersion ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.vendorID ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.deviceID ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.pipelineCacheUUID[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT const & pipelineColorBlendAdvancedStateCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.srcPremultiplied ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.dstPremultiplied ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.blendOverlap ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorWriteCreateInfoEXT const & pipelineColorWriteCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.pColorWriteEnables ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD const & pipelineCompilerControlCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.compilerControlFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV const & pipelineCoverageModulationStateCreateInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationTableEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationTableCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.pCoverageModulationTable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV const & pipelineCoverageReductionStateCreateInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.coverageReductionMode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV const & pipelineCoverageToColorStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.coverageToColorEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.coverageToColorLocation ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback const & pipelineCreationFeedback ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedback.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedback.duration ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfo const & pipelineCreationFeedbackCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pPipelineCreationFeedback ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pipelineStageCreationFeedbackCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pPipelineStageCreationFeedbacks ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT const & pipelineDiscardRectangleStateCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.discardRectangleMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.discardRectangleCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.pDiscardRectangles ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR const & pipelineExecutableInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.pipeline ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.executableIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR const & pipelineExecutableInternalRepresentationKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.pNext ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.name[i] ); - } - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.description[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.isText ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.dataSize ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.pData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR const & pipelineExecutablePropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.stages ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.name[i] ); - } - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.description[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.subgroupSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateEnumStateCreateInfoNV const & pipelineFragmentShadingRateEnumStateCreateInfoNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.shadingRateType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.shadingRate ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.combinerOps[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateStateCreateInfoKHR const & pipelineFragmentShadingRateStateCreateInfoKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.fragmentSize ); - for ( size_t i = 0; i < 2; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.combinerOps[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineInfoKHR const & pipelineInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.pipeline ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PushConstantRange const & pushConstantRange ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.stageFlags ); - VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.offset ); - VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & pipelineLayoutCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.setLayoutCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pSetLayouts ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pushConstantRangeCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pPushConstantRanges ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR const & pipelineLibraryCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.libraryCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.pLibraries ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelinePropertiesIdentifierEXT const & pipelinePropertiesIdentifierEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.pNext ); - for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.pipelineIdentifier[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT const & pipelineRasterizationConservativeStateCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.conservativeRasterizationMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.extraPrimitiveOverestimationSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT const & pipelineRasterizationDepthClipStateCreateInfoEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.depthClipEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT const & pipelineRasterizationLineStateCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.lineRasterizationMode ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.stippledLineEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.lineStippleFactor ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfoEXT.lineStipplePattern ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationProvokingVertexStateCreateInfoEXT const & - pipelineRasterizationProvokingVertexStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.provokingVertexMode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD const & pipelineRasterizationStateRasterizationOrderAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.rasterizationOrder ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT const & pipelineRasterizationStateStreamCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.rasterizationStream ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRenderingCreateInfo const & pipelineRenderingCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.viewMask ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.pColorAttachmentFormats ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.depthAttachmentFormat ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.stencilAttachmentFormat ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV const & pipelineRepresentativeFragmentTestStateCreateInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.representativeFragmentTestEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRobustnessCreateInfoEXT const & pipelineRobustnessCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.storageBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.uniformBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.vertexInputs ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfoEXT.images ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT const & pipelineSampleLocationsStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sampleLocationsEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sampleLocationsInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageModuleIdentifierCreateInfoEXT const & pipelineShaderStageModuleIdentifierCreateInfoEXT ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.identifierSize ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.pIdentifier ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfo const & pipelineShaderStageRequiredSubgroupSizeCreateInfo ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.requiredSubgroupSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo const & pipelineTessellationDomainOriginStateCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.domainOrigin ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT const & vertexInputBindingDivisorDescriptionEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDivisorDescriptionEXT.binding ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDivisorDescriptionEXT.divisor ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT const & pipelineVertexInputDivisorStateCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfoEXT.vertexBindingDivisorCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfoEXT.pVertexBindingDivisors ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV const & pipelineViewportCoarseSampleOrderStateCreateInfoNV ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.sampleOrderType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.customSampleOrderCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.pCustomSampleOrders ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClipControlCreateInfoEXT const & pipelineViewportDepthClipControlCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.negativeOneToOne ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV const & pipelineViewportExclusiveScissorStateCreateInfoNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.exclusiveScissorCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.pExclusiveScissors ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV const & shadingRatePaletteNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shadingRatePaletteNV.shadingRatePaletteEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, shadingRatePaletteNV.pShadingRatePaletteEntries ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV const & pipelineViewportShadingRateImageStateCreateInfoNV ) - const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.shadingRateImageEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.viewportCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.pShadingRatePalettes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ViewportSwizzleNV const & viewportSwizzleNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.x ); - VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.y ); - VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.z ); - VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.w ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV const & pipelineViewportSwizzleStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.viewportCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.pViewportSwizzles ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ViewportWScalingNV const & viewportWScalingNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, viewportWScalingNV.xcoeff ); - VULKAN_HPP_HASH_COMBINE( seed, viewportWScalingNV.ycoeff ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV const & pipelineViewportWScalingStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.viewportWScalingEnable ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.viewportCount ); - VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.pViewportWScalings ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_GGP ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP const & presentFrameTokenGGP ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.sType ); - VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.frameToken ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_GGP*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentIdKHR const & presentIdKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.swapchainCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.pPresentIds ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentInfoKHR const & presentInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.waitSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pWaitSemaphores ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.swapchainCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pSwapchains ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pImageIndices ); - VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pResults ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RectLayerKHR const & rectLayerKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.offset ); - VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.extent ); - VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.layer ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentRegionKHR const & presentRegionKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentRegionKHR.rectangleCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentRegionKHR.pRectangles ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentRegionsKHR const & presentRegionsKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.swapchainCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE const & presentTimeGOOGLE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentTimeGOOGLE.presentID ); - VULKAN_HPP_HASH_COMBINE( seed, presentTimeGOOGLE.desiredPresentTime ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE const & presentTimesInfoGOOGLE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.sType ); - VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.swapchainCount ); - VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.pTimes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & privateDataSlotCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo const & protectedSubmitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.protectedSubmit ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & queryPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.queryType ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.queryCount ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.pipelineStatistics ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR const & queryPoolPerformanceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.queueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.counterIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.pCounterIndices ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceQueryCreateInfoINTEL const & queryPoolPerformanceQueryCreateInfoINTEL ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.performanceCountersSampling ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointProperties2NV const & queueFamilyCheckpointProperties2NV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.checkpointExecutionStageMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV const & queueFamilyCheckpointPropertiesNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.checkpointExecutionStageMask ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::QueueFamilyGlobalPriorityPropertiesKHR const & queueFamilyGlobalPriorityPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityPropertiesKHR.priorityCount ); - for ( size_t i = 0; i < VK_MAX_GLOBAL_PRIORITY_SIZE_KHR; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityPropertiesKHR.priorities[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyProperties const & queueFamilyProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.queueFlags ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.queueCount ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.timestampValidBits ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.minImageTransferGranularity ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 const & queueFamilyProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.queueFamilyProperties ); - return seed; - } - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::QueueFamilyQueryResultStatusPropertiesKHR const & queueFamilyQueryResultStatusPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.queryResultStatusSupport ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyVideoPropertiesKHR const & queueFamilyVideoPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.videoCodecOperations ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR const & rayTracingShaderGroupCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.type ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.generalShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.closestHitShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.anyHitShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.intersectionShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.pShaderGroupCaptureReplayHandle ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR const & rayTracingPipelineInterfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.maxPipelineRayPayloadSize ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.maxPipelineRayHitAttributeSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & rayTracingPipelineCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.stageCount ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pStages ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.groupCount ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pGroups ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.maxPipelineRayRecursionDepth ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pLibraryInfo ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pLibraryInterface ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pDynamicState ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.layout ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.basePipelineHandle ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.basePipelineIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV const & rayTracingShaderGroupCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.type ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.generalShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.closestHitShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.anyHitShader ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.intersectionShader ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & rayTracingPipelineCreateInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.flags ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.stageCount ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pStages ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.groupCount ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pGroups ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.maxRecursionDepth ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.layout ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.basePipelineHandle ); - VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.basePipelineIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE const & refreshCycleDurationGOOGLE ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, refreshCycleDurationGOOGLE.refreshDuration ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo const & renderPassAttachmentBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.pAttachments ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo const & renderPassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.renderPass ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.framebuffer ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.renderArea ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.clearValueCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.pClearValues ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDescription const & subpassDescription ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.flags ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.inputAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pColorAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pResolveAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pDepthStencilAttachment ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.preserveAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pPreserveAttachments ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDependency const & subpassDependency ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcSubpass ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstSubpass ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dependencyFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & renderPassCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.subpassCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pSubpasses ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.dependencyCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pDependencies ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDescription2 const & subpassDescription2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.flags ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pipelineBindPoint ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.viewMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.inputAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pInputAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pColorAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pResolveAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pDepthStencilAttachment ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.preserveAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pPreserveAttachments ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDependency2 const & subpassDependency2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcSubpass ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstSubpass ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstAccessMask ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dependencyFlags ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.viewOffset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & renderPassCreateInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.flags ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.attachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.subpassCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pSubpasses ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.dependencyCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pDependencies ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.correlatedViewMaskCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pCorrelatedViewMasks ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationControlEXT const & renderPassCreationControlEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.disallowMerging ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT const & renderPassCreationFeedbackInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackInfoEXT.postMergeSubpassCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackCreateInfoEXT const & renderPassCreationFeedbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.pRenderPassFeedback ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT const & renderPassFragmentDensityMapCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.fragmentDensityMapAttachment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo const & renderPassInputAttachmentAspectCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.aspectReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.pAspectReferences ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo const & renderPassMultiviewCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.subpassCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pViewMasks ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.dependencyCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pViewOffsets ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.correlationMaskCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pCorrelationMasks ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT const & subpassSampleLocationsEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassSampleLocationsEXT.subpassIndex ); - VULKAN_HPP_HASH_COMBINE( seed, subpassSampleLocationsEXT.sampleLocationsInfo ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT const & renderPassSampleLocationsBeginInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.attachmentInitialSampleLocationsCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pAttachmentInitialSampleLocations ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.postSubpassSampleLocationsCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pPostSubpassSampleLocations ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT const & renderPassSubpassFeedbackInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.subpassMergeStatus ); - for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.description[i] ); - } - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.postMergeIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackCreateInfoEXT const & renderPassSubpassFeedbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.pSubpassFeedback ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassTransformBeginInfoQCOM const & renderPassTransformBeginInfoQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.transform ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingFragmentDensityMapAttachmentInfoEXT const & renderingFragmentDensityMapAttachmentInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.imageView ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.imageLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingFragmentShadingRateAttachmentInfoKHR const & renderingFragmentShadingRateAttachmentInfoKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.imageView ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.imageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.shadingRateAttachmentTexelSize ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingInfo const & renderingInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.renderArea ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.layerCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.viewMask ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.colorAttachmentCount ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pColorAttachments ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pDepthAttachment ); - VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pStencilAttachment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ResolveImageInfo2 const & resolveImageInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.srcImage ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.srcImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.dstImage ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.dstImageLayout ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.regionCount ); - VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.pRegions ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( - VULKAN_HPP_NAMESPACE::SamplerBorderColorComponentMappingCreateInfoEXT const & samplerBorderColorComponentMappingCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.components ); - VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.srgb ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & samplerCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.magFilter ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.minFilter ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.mipmapMode ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeU ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeV ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeW ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.mipLodBias ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.anisotropyEnable ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.maxAnisotropy ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.compareEnable ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.compareOp ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.minLod ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.maxLod ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.borderColor ); - VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.unnormalizedCoordinates ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo const & samplerReductionModeCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.reductionMode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & samplerYcbcrConversionCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.format ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.ycbcrModel ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.ycbcrRange ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.components ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.xChromaOffset ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.yChromaOffset ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.chromaFilter ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.forceExplicitReconstruction ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties const & samplerYcbcrConversionImageFormatProperties ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.combinedImageSamplerDescriptorCount ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo const & samplerYcbcrConversionInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.conversion ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & screenSurfaceCreateInfoQNX ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.sType ); - VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.flags ); - VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.context ); - VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.window ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & semaphoreCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR const & semaphoreGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.handleType ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR const & semaphoreGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.handleType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA const & semaphoreGetZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.handleType ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo const & semaphoreSignalInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.value ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo const & semaphoreSubmitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.semaphore ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.value ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.stageMask ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.deviceIndex ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo const & semaphoreTypeCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.semaphoreType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.initialValue ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo const & semaphoreWaitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.semaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pSemaphores ); - VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pValues ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SetStateFlagsIndirectCommandNV const & setStateFlagsIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, setStateFlagsIndirectCommandNV.data ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & shaderModuleCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.flags ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.codeSize ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.pCode ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT const & shaderModuleIdentifierEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.identifierSize ); - for ( size_t i = 0; i < VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.identifier[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT const & shaderModuleValidationCacheCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.validationCache ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD const & shaderResourceUsageAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.numUsedVgprs ); - VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.numUsedSgprs ); - VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.ldsSizePerLocalWorkGroup ); - VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.ldsUsageSizeInBytes ); - VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.scratchMemUsageInBytes ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderStatisticsInfoAMD const & shaderStatisticsInfoAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.shaderStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.resourceUsage ); - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numPhysicalVgprs ); - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numPhysicalSgprs ); - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numAvailableVgprs ); - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numAvailableSgprs ); - for ( size_t i = 0; i < 3; ++i ) - { - VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.computeWorkGroupSize[i] ); - } - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR const & sharedPresentSurfaceCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.sharedPresentSupportedUsageFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties const & sparseImageFormatProperties ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.aspectMask ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.imageGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.flags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 const & sparseImageFormatProperties2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.properties ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements const & sparseImageMemoryRequirements ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.formatProperties ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailFirstLod ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailSize ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailOffset ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailStride ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 const & sparseImageMemoryRequirements2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.memoryRequirements ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_GGP ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & streamDescriptorSurfaceCreateInfoGGP ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.sType ); - VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.flags ); - VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.streamDescriptor ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_GGP*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR const & stridedDeviceAddressRegionKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.deviceAddress ); - VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.stride ); - VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.size ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubmitInfo const & submitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.waitSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pWaitSemaphores ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pWaitDstStageMask ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.commandBufferCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pCommandBuffers ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.signalSemaphoreCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pSignalSemaphores ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubmitInfo2 const & submitInfo2 ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.sType ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.flags ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.waitSemaphoreInfoCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pWaitSemaphoreInfos ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.commandBufferInfoCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pCommandBufferInfos ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.signalSemaphoreInfoCount ); - VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pSignalSemaphoreInfos ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassBeginInfo const & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.contents ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve const & subpassDescriptionDepthStencilResolve ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.depthResolveMode ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.stencilResolveMode ); - VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.pDepthStencilResolveAttachment ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassEndInfo const & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassEndInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassEndInfo.pNext ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassFragmentDensityMapOffsetEndInfoQCOM const & subpassFragmentDensityMapOffsetEndInfoQCOM ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.fragmentDensityOffsetCount ); - VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.pFragmentDensityOffsets ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassResolvePerformanceQueryEXT const & subpassResolvePerformanceQueryEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.optimal ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::SubpassShadingPipelineCreateInfoHUAWEI const & subpassShadingPipelineCreateInfoHUAWEI ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.renderPass ); - VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.subpass ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT const & subresourceLayout2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2EXT.subresourceLayout ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT const & surfaceCapabilities2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.minImageCount ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageCount ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.currentExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.minImageExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedTransforms ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.currentTransform ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedCompositeAlpha ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedUsageFlags ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedSurfaceCounters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR const & surfaceCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.minImageCount ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageCount ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.currentExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.minImageExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageExtent ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedTransforms ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.currentTransform ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedCompositeAlpha ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedUsageFlags ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR const & surfaceCapabilities2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.surfaceCapabilities ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT const & surfaceCapabilitiesFullScreenExclusiveEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.fullScreenExclusiveSupported ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR const & surfaceFormatKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceFormatKHR.format ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFormatKHR.colorSpace ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR const & surfaceFormat2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.surfaceFormat ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT const & surfaceFullScreenExclusiveInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.fullScreenExclusive ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT const & surfaceFullScreenExclusiveWin32InfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.hmonitor ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR const & surfaceProtectedCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.supportsProtected ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT const & swapchainCounterCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.surfaceCounters ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & swapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.surface ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.minImageCount ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageFormat ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageColorSpace ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageExtent ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageArrayLayers ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageUsage ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageSharingMode ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.queueFamilyIndexCount ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.pQueueFamilyIndices ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.preTransform ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.compositeAlpha ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.presentMode ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.clipped ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.oldSwapchain ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD const & swapchainDisplayNativeHdrCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.localDimmingEnable ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD const & textureLODGatherFormatPropertiesAMD ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.sType ); - VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.supportsTextureGatherLODBiasAMD ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TilePropertiesQCOM const & tilePropertiesQCOM ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.sType ); - VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.tileSize ); - VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.apronSize ); - VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.origin ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo const & timelineSemaphoreSubmitInfo ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.sType ); - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.waitSemaphoreValueCount ); - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pWaitSemaphoreValues ); - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.signalSemaphoreValueCount ); - VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pSignalSemaphoreValues ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommand2KHR const & traceRaysIndirectCommand2KHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.raygenShaderRecordAddress ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.raygenShaderRecordSize ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableAddress ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableSize ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableStride ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableAddress ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableSize ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableStride ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableAddress ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableSize ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableStride ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.width ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.height ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.depth ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommandKHR const & traceRaysIndirectCommandKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.width ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.height ); - VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.depth ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & validationCacheCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.initialDataSize ); - VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.pInitialData ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT const & validationFeaturesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.enabledValidationFeatureCount ); - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pEnabledValidationFeatures ); - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.disabledValidationFeatureCount ); - VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pDisabledValidationFeatures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT const & validationFlagsEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.disabledValidationCheckCount ); - VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.pDisabledValidationChecks ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT const & vertexInputAttributeDescription2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.location ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.binding ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.format ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.offset ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT const & vertexInputBindingDescription2EXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.binding ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.stride ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.inputRate ); - VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.divisor ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_VI_NN ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & viSurfaceCreateInfoNN ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.sType ); - VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.flags ); - VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.window ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_VI_NN*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & videoPictureResourceInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.codedOffset ); - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.codedExtent ); - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.baseArrayLayer ); - VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.imageViewBinding ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR const & videoReferenceSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.slotIndex ); - VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.pPictureResource ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR const & videoBeginCodingInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.videoSession ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.videoSessionParameters ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.referenceSlotCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.pReferenceSlots ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR const & videoCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.capabilityFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minBitstreamBufferOffsetAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minBitstreamBufferSizeAlignment ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.videoPictureExtentGranularity ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minExtent ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxExtent ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxReferencePicturesSlotsCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxReferencePicturesActiveCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.stdHeaderVersion ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR const & videoCodingControlInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.flags ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilitiesKHR const & videoDecodeCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.flags ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264CapabilitiesEXT const & videoDecodeH264CapabilitiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesEXT.maxLevel ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesEXT.fieldOffsetGranularity ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264DpbSlotInfoEXT const & videoDecodeH264DpbSlotInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoEXT.pStdReferenceInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264MvcInfoEXT const & videoDecodeH264MvcInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264MvcInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264MvcInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264MvcInfoEXT.pStdMvc ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureInfoEXT const & videoDecodeH264PictureInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoEXT.pStdPictureInfo ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoEXT.slicesCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoEXT.pSlicesDataOffsets ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264ProfileInfoEXT const & videoDecodeH264ProfileInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoEXT.stdProfileIdc ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoEXT.pictureLayout ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoEXT const & videoDecodeH264SessionParametersAddInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.spsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.pSpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.ppsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoEXT.pPpsStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersCreateInfoEXT const & videoDecodeH264SessionParametersCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoEXT.maxSpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoEXT.maxPpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoEXT.pParametersAddInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265CapabilitiesEXT const & videoDecodeH265CapabilitiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesEXT.maxLevel ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265DpbSlotInfoEXT const & videoDecodeH265DpbSlotInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoEXT.pStdReferenceInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265PictureInfoEXT const & videoDecodeH265PictureInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoEXT.pStdPictureInfo ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoEXT.slicesCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoEXT.pSlicesDataOffsets ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265ProfileInfoEXT const & videoDecodeH265ProfileInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoEXT.stdProfileIdc ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoEXT const & videoDecodeH265SessionParametersAddInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.vpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.pVpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.spsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.pSpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.ppsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoEXT.pPpsStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersCreateInfoEXT const & videoDecodeH265SessionParametersCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.maxVpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.maxSpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.maxPpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoEXT.pParametersAddInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR const & videoDecodeInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBufferOffset ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBufferRange ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.dstPictureResource ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pSetupReferenceSlot ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.referenceSlotCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pReferenceSlots ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeUsageInfoKHR const & videoDecodeUsageInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.videoUsageHints ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilitiesKHR const & videoEncodeCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.rateControlModes ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.rateControlLayerCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.qualityLevelCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.inputImageDataFillAlignment ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesEXT const & videoEncodeH264CapabilitiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.inputModeFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.outputModeFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.maxPPictureL0ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.maxBPictureL0ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.maxL1ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.motionVectorsOverPicBoundariesFlag ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.maxBytesPerPicDenom ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.maxBitsPerMbDenom ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.log2MaxMvLengthHorizontal ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesEXT.log2MaxMvLengthVertical ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT const & videoEncodeH264DpbSlotInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoEXT.slotIndex ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoEXT.pStdReferenceInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264EmitPictureParametersInfoEXT const & videoEncodeH264EmitPictureParametersInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.spsId ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.emitSpsEnable ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.ppsIdEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264EmitPictureParametersInfoEXT.ppsIdEntries ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeEXT const & videoEncodeH264FrameSizeEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeEXT.frameISize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeEXT.framePSize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeEXT.frameBSize ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT const & videoEncodeH264ReferenceListsInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.referenceList0EntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.pReferenceList0Entries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.referenceList1EntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.pReferenceList1Entries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ReferenceListsInfoEXT.pMemMgmtCtrlOperations ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoEXT const & videoEncodeH264NaluSliceInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoEXT.mbCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoEXT.pReferenceFinalLists ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoEXT.pSliceHeaderStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264ProfileInfoEXT const & videoEncodeH264ProfileInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoEXT.stdProfileIdc ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT const & videoEncodeH264QpEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpEXT.qpI ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpEXT.qpP ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpEXT.qpB ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlInfoEXT const & videoEncodeH264RateControlInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.gopFrameCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.idrPeriod ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.consecutiveBFrameCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.rateControlStructure ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoEXT.temporalLayerCount ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlLayerInfoEXT const & videoEncodeH264RateControlLayerInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.temporalLayerId ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.useInitialRcQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.initialRcQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.useMinQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.minQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.useMaxQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.maxQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.useMaxFrameSize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoEXT.maxFrameSize ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoEXT const & videoEncodeH264SessionParametersAddInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.spsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.pSpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.ppsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoEXT.pPpsStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersCreateInfoEXT const & videoEncodeH264SessionParametersCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoEXT.maxSpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoEXT.maxPpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoEXT.pParametersAddInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264VclFrameInfoEXT const & videoEncodeH264VclFrameInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.pReferenceFinalLists ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.naluSliceEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.pNaluSliceEntries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264VclFrameInfoEXT.pCurrentPictureInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilitiesEXT const & videoEncodeH265CapabilitiesEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.inputModeFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.outputModeFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.ctbSizes ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.transformBlockSizes ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxPPictureL0ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxBPictureL0ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxL1ReferenceCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxSubLayersCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.minLog2MinLumaCodingBlockSizeMinus3 ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxLog2MinLumaCodingBlockSizeMinus3 ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.minLog2MinLumaTransformBlockSizeMinus2 ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxLog2MinLumaTransformBlockSizeMinus2 ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.minMaxTransformHierarchyDepthInter ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxMaxTransformHierarchyDepthInter ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.minMaxTransformHierarchyDepthIntra ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxMaxTransformHierarchyDepthIntra ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxDiffCuQpDeltaDepth ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.minMaxNumMergeCand ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesEXT.maxMaxNumMergeCand ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT const & videoEncodeH265DpbSlotInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoEXT.slotIndex ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoEXT.pStdReferenceInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265EmitPictureParametersInfoEXT const & videoEncodeH265EmitPictureParametersInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.vpsId ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.spsId ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.emitVpsEnable ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.emitSpsEnable ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.ppsIdEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265EmitPictureParametersInfoEXT.ppsIdEntries ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeEXT const & videoEncodeH265FrameSizeEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeEXT.frameISize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeEXT.framePSize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeEXT.frameBSize ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT const & videoEncodeH265ReferenceListsInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.referenceList0EntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.pReferenceList0Entries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.referenceList1EntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.pReferenceList1Entries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ReferenceListsInfoEXT.pReferenceModifications ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoEXT const & videoEncodeH265NaluSliceSegmentInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoEXT.ctbCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoEXT.pReferenceFinalLists ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoEXT.pSliceSegmentHeaderStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265ProfileInfoEXT const & videoEncodeH265ProfileInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoEXT.stdProfileIdc ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT const & videoEncodeH265QpEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpEXT.qpI ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpEXT.qpP ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpEXT.qpB ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlInfoEXT const & videoEncodeH265RateControlInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.gopFrameCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.idrPeriod ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.consecutiveBFrameCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.rateControlStructure ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoEXT.subLayerCount ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlLayerInfoEXT const & videoEncodeH265RateControlLayerInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.temporalId ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.useInitialRcQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.initialRcQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.useMinQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.minQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.useMaxQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.maxQp ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.useMaxFrameSize ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoEXT.maxFrameSize ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoEXT const & videoEncodeH265SessionParametersAddInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.vpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.pVpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.spsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.pSpsStd ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.ppsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoEXT.pPpsStd ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersCreateInfoEXT const & videoEncodeH265SessionParametersCreateInfoEXT ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.maxVpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.maxSpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.maxPpsStdCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoEXT.pParametersAddInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265VclFrameInfoEXT const & videoEncodeH265VclFrameInfoEXT ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.pReferenceFinalLists ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.naluSliceSegmentEntryCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.pNaluSliceSegmentEntries ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265VclFrameInfoEXT.pCurrentPictureInfo ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR const & videoEncodeInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.qualityLevel ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBitstreamBuffer ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBitstreamBufferOffset ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBitstreamBufferMaxRange ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.srcPictureResource ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pSetupReferenceSlot ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.referenceSlotCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pReferenceSlots ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.precedingExternallyEncodedBytes ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR const & videoEncodeRateControlLayerInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.averageBitrate ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.maxBitrate ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.frameRateNumerator ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.frameRateDenominator ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.virtualBufferSizeInMs ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.initialVirtualBufferSizeInMs ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlInfoKHR const & videoEncodeRateControlInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.rateControlMode ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.layerCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.pLayerConfigs ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeUsageInfoKHR const & videoEncodeUsageInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.videoUsageHints ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.videoContentHints ); - VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.tuningMode ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR const & videoEndCodingInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.flags ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR const & videoFormatPropertiesKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.format ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.componentMapping ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageCreateFlags ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageType ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageTiling ); - VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageUsageFlags ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR const & videoProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.videoCodecOperation ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.chromaSubsampling ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.lumaBitDepth ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.chromaBitDepth ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoProfileListInfoKHR const & videoProfileListInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.profileCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.pProfiles ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & videoSessionCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.queueFamilyIndex ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pVideoProfile ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pictureFormat ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxCodedExtent ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.referencePicturesFormat ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxReferencePicturesSlotsCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxReferencePicturesActiveCount ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pStdHeaderVersion ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR const & videoSessionMemoryRequirementsKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.memoryBindIndex ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.memoryRequirements ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & videoSessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.videoSessionParametersTemplate ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.videoSession ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR const & videoSessionParametersUpdateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.updateSequenceCount ); - return seed; - } - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & waylandSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.display ); - VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.surface ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR const & win32KeyedMutexAcquireReleaseInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.acquireCount ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireSyncs ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireKeys ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireTimeouts ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.releaseCount ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pReleaseSyncs ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pReleaseKeys ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV const & win32KeyedMutexAcquireReleaseInfoNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.acquireCount ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireSyncs ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireKeys ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireTimeoutMilliseconds ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.releaseCount ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pReleaseSyncs ); - VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pReleaseKeys ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & win32SurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.hinstance ); - VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.hwnd ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSet const & writeDescriptorSet ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.sType ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstSet ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstBinding ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstArrayElement ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.descriptorCount ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.descriptorType ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pImageInfo ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pBufferInfo ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pTexelBufferView ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureKHR const & writeDescriptorSetAccelerationStructureKHR ) const - VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.accelerationStructureCount ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.pAccelerationStructures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV const & writeDescriptorSetAccelerationStructureNV ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.sType ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.accelerationStructureCount ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.pAccelerationStructures ); - return seed; - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlock const & writeDescriptorSetInlineUniformBlock ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.sType ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.dataSize ); - VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.pData ); - return seed; - } - }; - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & xcbSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.connection ); - VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.window ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & xlibSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT - { - std::size_t seed = 0; - VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.sType ); - VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.pNext ); - VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.flags ); - VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.dpy ); - VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.window ); - return seed; - } - }; -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#endif // 14 <= VULKAN_HPP_CPP_VERSION - -} // namespace std -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_raii.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_raii.hpp deleted file mode 100644 index 7b3d1e2..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_raii.hpp +++ /dev/null @@ -1,17460 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_RAII_HPP -#define VULKAN_RAII_HPP - -#include -#include // std::exchange, std::forward -#include - -#if !defined( VULKAN_HPP_RAII_NAMESPACE ) -# define VULKAN_HPP_RAII_NAMESPACE raii -#endif - -namespace VULKAN_HPP_NAMESPACE -{ - namespace VULKAN_HPP_RAII_NAMESPACE - { -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) - - template - VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue ) - { -# if ( 14 <= VULKAN_HPP_CPP_VERSION ) - return std::exchange( obj, std::forward( newValue ) ); -# else - T oldValue = std::move( obj ); - obj = std::forward( newValue ); - return oldValue; -# endif - } - - class ContextDispatcher : public DispatchLoaderBase - { - public: - ContextDispatcher( PFN_vkGetInstanceProcAddr getProcAddr ) - : vkGetInstanceProcAddr( getProcAddr ) - //=== VK_VERSION_1_0 === - , vkCreateInstance( PFN_vkCreateInstance( getProcAddr( NULL, "vkCreateInstance" ) ) ) - , vkEnumerateInstanceExtensionProperties( PFN_vkEnumerateInstanceExtensionProperties( getProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) ) ) - , vkEnumerateInstanceLayerProperties( PFN_vkEnumerateInstanceLayerProperties( getProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) ) ) - //=== VK_VERSION_1_1 === - , vkEnumerateInstanceVersion( PFN_vkEnumerateInstanceVersion( getProcAddr( NULL, "vkEnumerateInstanceVersion" ) ) ) - { - } - - public: - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; - - //=== VK_VERSION_1_0 === - PFN_vkCreateInstance vkCreateInstance = 0; - PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0; - PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0; - - //=== VK_VERSION_1_1 === - PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0; - }; - - class InstanceDispatcher : public DispatchLoaderBase - { - public: - InstanceDispatcher( PFN_vkGetInstanceProcAddr getProcAddr, VkInstance instance ) : vkGetInstanceProcAddr( getProcAddr ) - { - //=== VK_VERSION_1_0 === - vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) ); - vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) ); - vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) ); - vkGetPhysicalDeviceFormatProperties = - PFN_vkGetPhysicalDeviceFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) ); - vkGetPhysicalDeviceImageFormatProperties = - PFN_vkGetPhysicalDeviceImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) ); - vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) ); - vkGetPhysicalDeviceQueueFamilyProperties = - PFN_vkGetPhysicalDeviceQueueFamilyProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) ); - vkGetPhysicalDeviceMemoryProperties = - PFN_vkGetPhysicalDeviceMemoryProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) ); - vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) ); - vkEnumerateDeviceExtensionProperties = - PFN_vkEnumerateDeviceExtensionProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) ); - vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) ); - vkGetPhysicalDeviceSparseImageFormatProperties = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) ); - - //=== VK_VERSION_1_1 === - vkEnumeratePhysicalDeviceGroups = PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) ); - vkGetPhysicalDeviceFeatures2 = PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) ); - vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) ); - vkGetPhysicalDeviceFormatProperties2 = - PFN_vkGetPhysicalDeviceFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) ); - vkGetPhysicalDeviceImageFormatProperties2 = - PFN_vkGetPhysicalDeviceImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) ); - vkGetPhysicalDeviceQueueFamilyProperties2 = - PFN_vkGetPhysicalDeviceQueueFamilyProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) ); - vkGetPhysicalDeviceMemoryProperties2 = - PFN_vkGetPhysicalDeviceMemoryProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) ); - vkGetPhysicalDeviceSparseImageFormatProperties2 = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) ); - vkGetPhysicalDeviceExternalBufferProperties = - PFN_vkGetPhysicalDeviceExternalBufferProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) ); - vkGetPhysicalDeviceExternalFenceProperties = - PFN_vkGetPhysicalDeviceExternalFenceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) ); - vkGetPhysicalDeviceExternalSemaphoreProperties = - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) ); - - //=== VK_VERSION_1_3 === - vkGetPhysicalDeviceToolProperties = PFN_vkGetPhysicalDeviceToolProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolProperties" ) ); - - //=== VK_EXT_acquire_drm_display === - vkAcquireDrmDisplayEXT = PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) ); - vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) ); - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) ); - vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) ); -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_calibrated_timestamps === - vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = - PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) ); - - //=== VK_EXT_debug_report === - vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) ); - vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) ); - vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) ); - - //=== VK_EXT_debug_utils === - vkCreateDebugUtilsMessengerEXT = PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) ); - vkDestroyDebugUtilsMessengerEXT = PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) ); - vkSubmitDebugUtilsMessageEXT = PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) ); - - //=== VK_EXT_direct_mode_display === - vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) ); - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - vkCreateDirectFBSurfaceEXT = PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) ); - vkGetPhysicalDeviceDirectFBPresentationSupportEXT = - PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) ); -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_EXT_display_surface_counter === - vkGetPhysicalDeviceSurfaceCapabilities2EXT = - PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - vkGetPhysicalDeviceSurfacePresentModes2EXT = - PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - vkCreateHeadlessSurfaceEXT = PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) ); - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - vkCreateMetalSurfaceEXT = PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) ); -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_sample_locations === - vkGetPhysicalDeviceMultisamplePropertiesEXT = - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) ); - - //=== VK_EXT_tooling_info === - vkGetPhysicalDeviceToolPropertiesEXT = - PFN_vkGetPhysicalDeviceToolPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) ); - if ( !vkGetPhysicalDeviceToolProperties ) - vkGetPhysicalDeviceToolProperties = vkGetPhysicalDeviceToolPropertiesEXT; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - vkCreateImagePipeSurfaceFUCHSIA = PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) ); -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP( vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) ); -# endif /*VK_USE_PLATFORM_GGP*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_KHR_device_group === - vkGetPhysicalDevicePresentRectanglesKHR = - PFN_vkGetPhysicalDevicePresentRectanglesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) ); - - //=== VK_KHR_device_group_creation === - vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) ); - if ( !vkEnumeratePhysicalDeviceGroups ) - vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR; - - //=== VK_KHR_display === - vkGetPhysicalDeviceDisplayPropertiesKHR = - PFN_vkGetPhysicalDeviceDisplayPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) ); - vkGetPhysicalDeviceDisplayPlanePropertiesKHR = - PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) ); - vkGetDisplayPlaneSupportedDisplaysKHR = - PFN_vkGetDisplayPlaneSupportedDisplaysKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) ); - vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) ); - vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) ); - vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) ); - vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) ); - - //=== VK_KHR_external_fence_capabilities === - vkGetPhysicalDeviceExternalFencePropertiesKHR = - PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalFenceProperties ) - vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR; - - //=== VK_KHR_external_memory_capabilities === - vkGetPhysicalDeviceExternalBufferPropertiesKHR = - PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalBufferProperties ) - vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR; - - //=== VK_KHR_external_semaphore_capabilities === - vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = - PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) ); - if ( !vkGetPhysicalDeviceExternalSemaphoreProperties ) - vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; - - //=== VK_KHR_fragment_shading_rate === - vkGetPhysicalDeviceFragmentShadingRatesKHR = - PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) ); - - //=== VK_KHR_get_display_properties2 === - vkGetPhysicalDeviceDisplayProperties2KHR = - PFN_vkGetPhysicalDeviceDisplayProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) ); - vkGetPhysicalDeviceDisplayPlaneProperties2KHR = - PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) ); - vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) ); - vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) ); - - //=== VK_KHR_get_physical_device_properties2 === - vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) ); - if ( !vkGetPhysicalDeviceFeatures2 ) - vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR; - vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceProperties2 ) - vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR; - vkGetPhysicalDeviceFormatProperties2KHR = - PFN_vkGetPhysicalDeviceFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceFormatProperties2 ) - vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR; - vkGetPhysicalDeviceImageFormatProperties2KHR = - PFN_vkGetPhysicalDeviceImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceImageFormatProperties2 ) - vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR; - vkGetPhysicalDeviceQueueFamilyProperties2KHR = - PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceQueueFamilyProperties2 ) - vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR; - vkGetPhysicalDeviceMemoryProperties2KHR = - PFN_vkGetPhysicalDeviceMemoryProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceMemoryProperties2 ) - vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR = - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) ); - if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 ) - vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR; - - //=== VK_KHR_get_surface_capabilities2 === - vkGetPhysicalDeviceSurfaceCapabilities2KHR = - PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) ); - vkGetPhysicalDeviceSurfaceFormats2KHR = - PFN_vkGetPhysicalDeviceSurfaceFormats2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) ); - - //=== VK_KHR_performance_query === - vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) ); - vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) ); - - //=== VK_KHR_surface === - vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) ); - vkGetPhysicalDeviceSurfaceSupportKHR = - PFN_vkGetPhysicalDeviceSurfaceSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) ); - vkGetPhysicalDeviceSurfaceCapabilitiesKHR = - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) ); - vkGetPhysicalDeviceSurfaceFormatsKHR = - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) ); - vkGetPhysicalDeviceSurfacePresentModesKHR = - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) ); - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - vkGetPhysicalDeviceVideoCapabilitiesKHR = - PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) ); - vkGetPhysicalDeviceVideoFormatPropertiesKHR = - PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) ); - vkGetPhysicalDeviceWaylandPresentationSupportKHR = - PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) ); -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) ); - vkGetPhysicalDeviceWin32PresentationSupportKHR = - PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) ); - vkGetPhysicalDeviceXcbPresentationSupportKHR = - PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) ); -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) ); - vkGetPhysicalDeviceXlibPresentationSupportKHR = - PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) ); -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) ); -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) ); -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - -# if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) ); -# endif /*VK_USE_PLATFORM_VI_NN*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - vkAcquireWinrtDisplayNV = PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) ); - vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_NV_cooperative_matrix === - vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = - PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) ); - - //=== VK_NV_coverage_reduction_mode === - vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) ); - - //=== VK_NV_external_memory_capabilities === - vkGetPhysicalDeviceExternalImageFormatPropertiesNV = - PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) ); - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - vkCreateScreenSurfaceQNX = PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) ); - vkGetPhysicalDeviceScreenPresentationSupportQNX = - PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) ); -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) ); - } - - public: - //=== VK_VERSION_1_0 === - PFN_vkDestroyInstance vkDestroyInstance = 0; - PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0; - PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0; - PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0; - PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0; - PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0; - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; - PFN_vkCreateDevice vkCreateDevice = 0; - PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0; - PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0; - - //=== VK_VERSION_1_1 === - PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0; - PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0; - PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0; - PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0; - PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0; - PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0; - PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0; - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0; - - //=== VK_VERSION_1_3 === - PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties = 0; - - //=== VK_EXT_acquire_drm_display === - PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0; - PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0; - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0; - PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0; -# else - PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0; - PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_calibrated_timestamps === - PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0; - - //=== VK_EXT_debug_report === - PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; - PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0; - PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0; - - //=== VK_EXT_debug_utils === - PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0; - PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0; - PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0; - - //=== VK_EXT_direct_mode_display === - PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0; - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0; - PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0; -# else - PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_EXT_display_surface_counter === - PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0; -# else - PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0; - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0; -# else - PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_sample_locations === - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0; - - //=== VK_EXT_tooling_info === - PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0; -# else - PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0; -# else - PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0; -# endif /*VK_USE_PLATFORM_GGP*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0; -# else - PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_KHR_device_group === - PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0; - - //=== VK_KHR_device_group_creation === - PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0; - - //=== VK_KHR_display === - PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0; - PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0; - PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0; - PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0; - PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0; - PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0; - PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0; - - //=== VK_KHR_external_fence_capabilities === - PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0; - - //=== VK_KHR_external_memory_capabilities === - PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0; - - //=== VK_KHR_external_semaphore_capabilities === - PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0; - - //=== VK_KHR_fragment_shading_rate === - PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0; - - //=== VK_KHR_get_display_properties2 === - PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0; - PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0; - PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0; - PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0; - - //=== VK_KHR_get_physical_device_properties2 === - PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0; - PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0; - PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0; - PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0; - PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0; - - //=== VK_KHR_get_surface_capabilities2 === - PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0; - PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0; - - //=== VK_KHR_performance_query === - PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0; - PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0; - - //=== VK_KHR_surface === - PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0; - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0; - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0; - PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0; -# else - PFN_dummy vkGetPhysicalDeviceVideoCapabilitiesKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceVideoFormatPropertiesKHR_placeholder = 0; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0; -# else - PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0; - PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0; -# else - PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0; -# else - PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0; - PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0; -# else - PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0; -# else - PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0; -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0; -# else - PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0; -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - -# if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0; -# else - PFN_dummy vkCreateViSurfaceNN_placeholder = 0; -# endif /*VK_USE_PLATFORM_VI_NN*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0; - PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0; -# else - PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0; - PFN_dummy vkGetWinrtDisplayNV_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_NV_cooperative_matrix === - PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0; - - //=== VK_NV_coverage_reduction_mode === - PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0; - - //=== VK_NV_external_memory_capabilities === - PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0; - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0; - PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0; -# else - PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0; - PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0; -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; - }; - - class DeviceDispatcher : public DispatchLoaderBase - { - public: - DeviceDispatcher( PFN_vkGetDeviceProcAddr getProcAddr, VkDevice device ) : vkGetDeviceProcAddr( getProcAddr ) - { - //=== VK_VERSION_1_0 === - vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) ); - vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) ); - vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) ); - vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) ); - vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) ); - vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) ); - vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) ); - vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) ); - vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) ); - vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) ); - vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) ); - vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) ); - vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) ); - vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) ); - vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) ); - vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) ); - vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) ); - vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) ); - vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) ); - vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) ); - vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) ); - vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) ); - vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) ); - vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) ); - vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) ); - vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) ); - vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) ); - vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) ); - vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) ); - vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) ); - vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) ); - vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) ); - vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) ); - vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) ); - vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) ); - vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) ); - vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) ); - vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) ); - vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) ); - vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) ); - vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) ); - vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) ); - vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) ); - vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) ); - vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) ); - vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) ); - vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) ); - vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) ); - vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) ); - vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) ); - vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) ); - vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) ); - vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) ); - vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) ); - vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) ); - vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) ); - vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) ); - vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) ); - vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) ); - vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) ); - vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) ); - vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) ); - vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) ); - vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) ); - vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) ); - vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) ); - vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) ); - vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) ); - vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) ); - vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) ); - vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) ); - vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) ); - vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) ); - vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) ); - vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) ); - vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) ); - vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) ); - vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) ); - vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) ); - vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) ); - vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) ); - vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) ); - vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) ); - vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) ); - vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) ); - vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) ); - vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) ); - vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) ); - vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) ); - vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) ); - vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) ); - vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) ); - vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) ); - vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) ); - vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) ); - vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) ); - vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) ); - vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) ); - vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) ); - vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) ); - vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) ); - vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) ); - vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) ); - vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) ); - vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) ); - vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) ); - vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) ); - vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) ); - vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) ); - vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) ); - vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) ); - vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) ); - vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) ); - vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) ); - vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) ); - vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) ); - vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) ); - vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) ); - vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) ); - vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) ); - vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) ); - - //=== VK_VERSION_1_1 === - vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) ); - vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) ); - vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) ); - vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) ); - vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) ); - vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) ); - vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) ); - vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) ); - vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) ); - vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) ); - vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) ); - vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) ); - vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) ); - vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) ); - vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) ); - vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) ); - - //=== VK_VERSION_1_2 === - vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) ); - vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) ); - vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) ); - vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) ); - vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) ); - vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) ); - vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) ); - vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) ); - vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) ); - vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) ); - vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) ); - vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) ); - vkGetDeviceMemoryOpaqueCaptureAddress = - PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); - - //=== VK_VERSION_1_3 === - vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlot" ) ); - vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlot" ) ); - vkSetPrivateData = PFN_vkSetPrivateData( vkGetDeviceProcAddr( device, "vkSetPrivateData" ) ); - vkGetPrivateData = PFN_vkGetPrivateData( vkGetDeviceProcAddr( device, "vkGetPrivateData" ) ); - vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetDeviceProcAddr( device, "vkCmdSetEvent2" ) ); - vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetDeviceProcAddr( device, "vkCmdResetEvent2" ) ); - vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2" ) ); - vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2" ) ); - vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2" ) ); - vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetDeviceProcAddr( device, "vkQueueSubmit2" ) ); - vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2" ) ); - vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetDeviceProcAddr( device, "vkCmdCopyImage2" ) ); - vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2" ) ); - vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2" ) ); - vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetDeviceProcAddr( device, "vkCmdBlitImage2" ) ); - vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetDeviceProcAddr( device, "vkCmdResolveImage2" ) ); - vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetDeviceProcAddr( device, "vkCmdBeginRendering" ) ); - vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetDeviceProcAddr( device, "vkCmdEndRendering" ) ); - vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetDeviceProcAddr( device, "vkCmdSetCullMode" ) ); - vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetDeviceProcAddr( device, "vkCmdSetFrontFace" ) ); - vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopology" ) ); - vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCount" ) ); - vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCount" ) ); - vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2" ) ); - vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnable" ) ); - vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnable" ) ); - vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOp" ) ); - vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnable" ) ); - vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnable" ) ); - vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetDeviceProcAddr( device, "vkCmdSetStencilOp" ) ); - vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnable" ) ); - vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnable" ) ); - vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnable" ) ); - vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirements" ) ); - vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirements" ) ); - vkGetDeviceImageSparseMemoryRequirements = - PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirements" ) ); - - //=== VK_AMD_buffer_marker === - vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) ); - - //=== VK_AMD_display_native_hdr === - vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) ); - - //=== VK_AMD_draw_indirect_count === - vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; - vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; - - //=== VK_AMD_shader_info === - vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) ); - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - vkGetAndroidHardwareBufferPropertiesANDROID = - PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); - vkGetMemoryAndroidHardwareBufferANDROID = - PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_buffer_device_address === - vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; - - //=== VK_EXT_calibrated_timestamps === - vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) ); - - //=== VK_EXT_color_write_enable === - vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) ); - - //=== VK_EXT_conditional_rendering === - vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) ); - vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) ); - - //=== VK_EXT_debug_marker === - vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) ); - vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) ); - vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) ); - vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) ); - vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) ); - - //=== VK_EXT_debug_utils === - vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) ); - vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) ); - vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) ); - vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) ); - vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) ); - vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) ); - vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) ); - vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) ); - - //=== VK_EXT_discard_rectangles === - vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) ); - - //=== VK_EXT_display_control === - vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) ); - vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) ); - vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) ); - vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) ); - - //=== VK_EXT_extended_dynamic_state === - vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) ); - if ( !vkCmdSetCullMode ) - vkCmdSetCullMode = vkCmdSetCullModeEXT; - vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) ); - if ( !vkCmdSetFrontFace ) - vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; - vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) ); - if ( !vkCmdSetPrimitiveTopology ) - vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; - vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) ); - if ( !vkCmdSetViewportWithCount ) - vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; - vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) ); - if ( !vkCmdSetScissorWithCount ) - vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; - vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) ); - if ( !vkCmdBindVertexBuffers2 ) - vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; - vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) ); - if ( !vkCmdSetDepthTestEnable ) - vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; - vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) ); - if ( !vkCmdSetDepthWriteEnable ) - vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; - vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) ); - if ( !vkCmdSetDepthCompareOp ) - vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; - vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) ); - if ( !vkCmdSetDepthBoundsTestEnable ) - vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; - vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) ); - if ( !vkCmdSetStencilTestEnable ) - vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; - vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) ); - if ( !vkCmdSetStencilOp ) - vkCmdSetStencilOp = vkCmdSetStencilOpEXT; - - //=== VK_EXT_extended_dynamic_state2 === - vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) ); - vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) ); - if ( !vkCmdSetRasterizerDiscardEnable ) - vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; - vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) ); - if ( !vkCmdSetDepthBiasEnable ) - vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; - vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) ); - vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) ); - if ( !vkCmdSetPrimitiveRestartEnable ) - vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; - - //=== VK_EXT_external_memory_host === - vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) ); - vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) ); - vkGetDeviceGroupSurfacePresentModes2EXT = - PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_hdr_metadata === - vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) ); - - //=== VK_EXT_host_query_reset === - vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) ); - if ( !vkResetQueryPool ) - vkResetQueryPool = vkResetQueryPoolEXT; - - //=== VK_EXT_image_compression_control === - vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2EXT" ) ); - - //=== VK_EXT_image_drm_format_modifier === - vkGetImageDrmFormatModifierPropertiesEXT = - PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); - - //=== VK_EXT_line_rasterization === - vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) ); - - //=== VK_EXT_mesh_shader === - vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksEXT" ) ); - vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectEXT" ) ); - vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ) ); -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_multi_draw === - vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) ); - vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) ); - - //=== VK_EXT_pageable_device_local_memory === - vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetDeviceProcAddr( device, "vkSetDeviceMemoryPriorityEXT" ) ); - - //=== VK_EXT_pipeline_properties === - vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetPipelinePropertiesEXT" ) ); - - //=== VK_EXT_private_data === - vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) ); - if ( !vkCreatePrivateDataSlot ) - vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; - vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) ); - if ( !vkDestroyPrivateDataSlot ) - vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; - vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) ); - if ( !vkSetPrivateData ) - vkSetPrivateData = vkSetPrivateDataEXT; - vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) ); - if ( !vkGetPrivateData ) - vkGetPrivateData = vkGetPrivateDataEXT; - - //=== VK_EXT_sample_locations === - vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) ); - - //=== VK_EXT_shader_module_identifier === - vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleIdentifierEXT" ) ); - vkGetShaderModuleCreateInfoIdentifierEXT = - PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); - - //=== VK_EXT_transform_feedback === - vkCmdBindTransformFeedbackBuffersEXT = - PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) ); - vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) ); - vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) ); - vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) ); - vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) ); - vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) ); - - //=== VK_EXT_validation_cache === - vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) ); - vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) ); - vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) ); - vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) ); - - //=== VK_EXT_vertex_input_dynamic_state === - vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) ); - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ) ); - vkSetBufferCollectionImageConstraintsFUCHSIA = - PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); - vkSetBufferCollectionBufferConstraintsFUCHSIA = - PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); - vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ) ); - vkGetBufferCollectionPropertiesFUCHSIA = - PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) ); - vkGetMemoryZirconHandlePropertiesFUCHSIA = - PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - vkImportSemaphoreZirconHandleFUCHSIA = - PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); - vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_GOOGLE_display_timing === - vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) ); - vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) ); - - //=== VK_HUAWEI_invocation_mask === - vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) ); - - //=== VK_HUAWEI_subpass_shading === - vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = - PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); - vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) ); - - //=== VK_INTEL_performance_query === - vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) ); - vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) ); - vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) ); - vkCmdSetPerformanceStreamMarkerINTEL = - PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); - vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) ); - vkAcquirePerformanceConfigurationINTEL = - PFN_vkAcquirePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) ); - vkReleasePerformanceConfigurationINTEL = - PFN_vkReleasePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) ); - vkQueueSetPerformanceConfigurationINTEL = - PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) ); - vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) ); - - //=== VK_KHR_acceleration_structure === - vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) ); - vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) ); - vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) ); - vkCmdBuildAccelerationStructuresIndirectKHR = - PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); - vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) ); - vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) ); - vkCopyAccelerationStructureToMemoryKHR = - PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) ); - vkCopyMemoryToAccelerationStructureKHR = - PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) ); - vkWriteAccelerationStructuresPropertiesKHR = - PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) ); - vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) ); - vkCmdCopyAccelerationStructureToMemoryKHR = - PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); - vkCmdCopyMemoryToAccelerationStructureKHR = - PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); - vkGetAccelerationStructureDeviceAddressKHR = - PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) ); - vkCmdWriteAccelerationStructuresPropertiesKHR = - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); - vkGetDeviceAccelerationStructureCompatibilityKHR = - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); - vkGetAccelerationStructureBuildSizesKHR = - PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) ); - - //=== VK_KHR_bind_memory2 === - vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) ); - if ( !vkBindBufferMemory2 ) - vkBindBufferMemory2 = vkBindBufferMemory2KHR; - vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) ); - if ( !vkBindImageMemory2 ) - vkBindImageMemory2 = vkBindImageMemory2KHR; - - //=== VK_KHR_buffer_device_address === - vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) ); - if ( !vkGetBufferDeviceAddress ) - vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; - vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) ); - if ( !vkGetBufferOpaqueCaptureAddress ) - vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; - vkGetDeviceMemoryOpaqueCaptureAddressKHR = - PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); - if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) - vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; - - //=== VK_KHR_copy_commands2 === - vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) ); - if ( !vkCmdCopyBuffer2 ) - vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; - vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) ); - if ( !vkCmdCopyImage2 ) - vkCmdCopyImage2 = vkCmdCopyImage2KHR; - vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) ); - if ( !vkCmdCopyBufferToImage2 ) - vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; - vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) ); - if ( !vkCmdCopyImageToBuffer2 ) - vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; - vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) ); - if ( !vkCmdBlitImage2 ) - vkCmdBlitImage2 = vkCmdBlitImage2KHR; - vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) ); - if ( !vkCmdResolveImage2 ) - vkCmdResolveImage2 = vkCmdResolveImage2KHR; - - //=== VK_KHR_create_renderpass2 === - vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) ); - if ( !vkCreateRenderPass2 ) - vkCreateRenderPass2 = vkCreateRenderPass2KHR; - vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) ); - if ( !vkCmdBeginRenderPass2 ) - vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; - vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) ); - if ( !vkCmdNextSubpass2 ) - vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; - vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) ); - if ( !vkCmdEndRenderPass2 ) - vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; - - //=== VK_KHR_deferred_host_operations === - vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) ); - vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) ); - vkGetDeferredOperationMaxConcurrencyKHR = - PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); - vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) ); - vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) ); - - //=== VK_KHR_descriptor_update_template === - vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) ); - if ( !vkCreateDescriptorUpdateTemplate ) - vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; - vkDestroyDescriptorUpdateTemplateKHR = - PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) ); - if ( !vkDestroyDescriptorUpdateTemplate ) - vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; - vkUpdateDescriptorSetWithTemplateKHR = - PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) ); - if ( !vkUpdateDescriptorSetWithTemplate ) - vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; - vkCmdPushDescriptorSetWithTemplateKHR = - PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); - - //=== VK_KHR_device_group === - vkGetDeviceGroupPeerMemoryFeaturesKHR = - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); - if ( !vkGetDeviceGroupPeerMemoryFeatures ) - vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; - vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) ); - if ( !vkCmdSetDeviceMask ) - vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; - vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) ); - if ( !vkCmdDispatchBase ) - vkCmdDispatchBase = vkCmdDispatchBaseKHR; - vkGetDeviceGroupPresentCapabilitiesKHR = - PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); - vkGetDeviceGroupSurfacePresentModesKHR = - PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); - vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) ); - - //=== VK_KHR_display_swapchain === - vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) ); - - //=== VK_KHR_draw_indirect_count === - vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) ); - if ( !vkCmdDrawIndirectCount ) - vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; - vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) ); - if ( !vkCmdDrawIndexedIndirectCount ) - vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; - - //=== VK_KHR_dynamic_rendering === - vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderingKHR" ) ); - if ( !vkCmdBeginRendering ) - vkCmdBeginRendering = vkCmdBeginRenderingKHR; - vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderingKHR" ) ); - if ( !vkCmdEndRendering ) - vkCmdEndRendering = vkCmdEndRenderingKHR; - - //=== VK_KHR_external_fence_fd === - vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) ); - vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) ); - vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) ); - vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) ); - vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) ); - vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) ); - vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_fragment_shading_rate === - vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) ); - - //=== VK_KHR_get_memory_requirements2 === - vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) ); - if ( !vkGetImageMemoryRequirements2 ) - vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; - vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) ); - if ( !vkGetBufferMemoryRequirements2 ) - vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; - vkGetImageSparseMemoryRequirements2KHR = - PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) ); - if ( !vkGetImageSparseMemoryRequirements2 ) - vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; - - //=== VK_KHR_maintenance1 === - vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) ); - if ( !vkTrimCommandPool ) - vkTrimCommandPool = vkTrimCommandPoolKHR; - - //=== VK_KHR_maintenance3 === - vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) ); - if ( !vkGetDescriptorSetLayoutSupport ) - vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; - - //=== VK_KHR_maintenance4 === - vkGetDeviceBufferMemoryRequirementsKHR = - PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceBufferMemoryRequirements ) - vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; - vkGetDeviceImageMemoryRequirementsKHR = - PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageMemoryRequirements ) - vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; - vkGetDeviceImageSparseMemoryRequirementsKHR = - PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); - if ( !vkGetDeviceImageSparseMemoryRequirements ) - vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; - - //=== VK_KHR_performance_query === - vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) ); - vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) ); - - //=== VK_KHR_pipeline_executable_properties === - vkGetPipelineExecutablePropertiesKHR = - PFN_vkGetPipelineExecutablePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) ); - vkGetPipelineExecutableStatisticsKHR = - PFN_vkGetPipelineExecutableStatisticsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) ); - vkGetPipelineExecutableInternalRepresentationsKHR = - PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); - - //=== VK_KHR_present_wait === - vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) ); - - //=== VK_KHR_push_descriptor === - vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) ); - - //=== VK_KHR_ray_tracing_maintenance1 === - vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirect2KHR" ) ); - - //=== VK_KHR_ray_tracing_pipeline === - vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) ); - vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) ); - vkGetRayTracingShaderGroupHandlesKHR = - PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) ); - vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); - vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) ); - vkGetRayTracingShaderGroupStackSizeKHR = - PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); - vkCmdSetRayTracingPipelineStackSizeKHR = - PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); - - //=== VK_KHR_sampler_ycbcr_conversion === - vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) ); - if ( !vkCreateSamplerYcbcrConversion ) - vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; - vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) ); - if ( !vkDestroySamplerYcbcrConversion ) - vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; - - //=== VK_KHR_shared_presentable_image === - vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) ); - - //=== VK_KHR_swapchain === - vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) ); - vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) ); - vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) ); - vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) ); - vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) ); - - //=== VK_KHR_synchronization2 === - vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) ); - if ( !vkCmdSetEvent2 ) - vkCmdSetEvent2 = vkCmdSetEvent2KHR; - vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) ); - if ( !vkCmdResetEvent2 ) - vkCmdResetEvent2 = vkCmdResetEvent2KHR; - vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) ); - if ( !vkCmdWaitEvents2 ) - vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; - vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) ); - if ( !vkCmdPipelineBarrier2 ) - vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; - vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) ); - if ( !vkCmdWriteTimestamp2 ) - vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; - vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) ); - if ( !vkQueueSubmit2 ) - vkQueueSubmit2 = vkQueueSubmit2KHR; - vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) ); - vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) ); - - //=== VK_KHR_timeline_semaphore === - vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) ); - if ( !vkGetSemaphoreCounterValue ) - vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; - vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) ); - if ( !vkWaitSemaphores ) - vkWaitSemaphores = vkWaitSemaphoresKHR; - vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) ); - if ( !vkSignalSemaphore ) - vkSignalSemaphore = vkSignalSemaphoreKHR; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) ); - vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) ); - vkGetVideoSessionMemoryRequirementsKHR = - PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) ); - vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) ); - vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) ); - vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) ); - vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) ); - vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) ); - vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) ); - vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) ); -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) ); - vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) ); - vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) ); - vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) ); - vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) ); - - //=== VK_NVX_image_view_handle === - vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) ); - vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) ); - - //=== VK_NV_clip_space_w_scaling === - vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) ); - - //=== VK_NV_device_diagnostic_checkpoints === - vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) ); - vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) ); - - //=== VK_NV_device_generated_commands === - vkGetGeneratedCommandsMemoryRequirementsNV = - PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); - vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) ); - vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) ); - vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) ); - vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) ); - vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) ); - - //=== VK_NV_external_memory_rdma === - vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) ); - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) ); -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_NV_fragment_shading_rate_enums === - vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) ); - - //=== VK_NV_mesh_shader === - vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) ); - vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) ); - vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) ); - - //=== VK_NV_ray_tracing === - vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) ); - vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) ); - vkGetAccelerationStructureMemoryRequirementsNV = - PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); - vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) ); - vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) ); - vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) ); - vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) ); - vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) ); - vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) ); - if ( !vkGetRayTracingShaderGroupHandlesKHR ) - vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; - vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) ); - vkCmdWriteAccelerationStructuresPropertiesNV = - PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); - vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) ); - - //=== VK_NV_scissor_exclusive === - vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) ); - - //=== VK_NV_shading_rate_image === - vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) ); - vkCmdSetViewportShadingRatePaletteNV = - PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) ); - vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) ); - - //=== VK_QCOM_tile_properties === - vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetFramebufferTilePropertiesQCOM" ) ); - vkGetDynamicRenderingTilePropertiesQCOM = - PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); - - //=== VK_VALVE_descriptor_set_host_mapping === - vkGetDescriptorSetLayoutHostMappingInfoVALVE = - PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); - vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetHostMappingVALVE" ) ); - } - - public: - //=== VK_VERSION_1_0 === - PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; - PFN_vkDestroyDevice vkDestroyDevice = 0; - PFN_vkGetDeviceQueue vkGetDeviceQueue = 0; - PFN_vkQueueSubmit vkQueueSubmit = 0; - PFN_vkQueueWaitIdle vkQueueWaitIdle = 0; - PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0; - PFN_vkAllocateMemory vkAllocateMemory = 0; - PFN_vkFreeMemory vkFreeMemory = 0; - PFN_vkMapMemory vkMapMemory = 0; - PFN_vkUnmapMemory vkUnmapMemory = 0; - PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0; - PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0; - PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0; - PFN_vkBindBufferMemory vkBindBufferMemory = 0; - PFN_vkBindImageMemory vkBindImageMemory = 0; - PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0; - PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0; - PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0; - PFN_vkQueueBindSparse vkQueueBindSparse = 0; - PFN_vkCreateFence vkCreateFence = 0; - PFN_vkDestroyFence vkDestroyFence = 0; - PFN_vkResetFences vkResetFences = 0; - PFN_vkGetFenceStatus vkGetFenceStatus = 0; - PFN_vkWaitForFences vkWaitForFences = 0; - PFN_vkCreateSemaphore vkCreateSemaphore = 0; - PFN_vkDestroySemaphore vkDestroySemaphore = 0; - PFN_vkCreateEvent vkCreateEvent = 0; - PFN_vkDestroyEvent vkDestroyEvent = 0; - PFN_vkGetEventStatus vkGetEventStatus = 0; - PFN_vkSetEvent vkSetEvent = 0; - PFN_vkResetEvent vkResetEvent = 0; - PFN_vkCreateQueryPool vkCreateQueryPool = 0; - PFN_vkDestroyQueryPool vkDestroyQueryPool = 0; - PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0; - PFN_vkCreateBuffer vkCreateBuffer = 0; - PFN_vkDestroyBuffer vkDestroyBuffer = 0; - PFN_vkCreateBufferView vkCreateBufferView = 0; - PFN_vkDestroyBufferView vkDestroyBufferView = 0; - PFN_vkCreateImage vkCreateImage = 0; - PFN_vkDestroyImage vkDestroyImage = 0; - PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0; - PFN_vkCreateImageView vkCreateImageView = 0; - PFN_vkDestroyImageView vkDestroyImageView = 0; - PFN_vkCreateShaderModule vkCreateShaderModule = 0; - PFN_vkDestroyShaderModule vkDestroyShaderModule = 0; - PFN_vkCreatePipelineCache vkCreatePipelineCache = 0; - PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0; - PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0; - PFN_vkMergePipelineCaches vkMergePipelineCaches = 0; - PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0; - PFN_vkCreateComputePipelines vkCreateComputePipelines = 0; - PFN_vkDestroyPipeline vkDestroyPipeline = 0; - PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0; - PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0; - PFN_vkCreateSampler vkCreateSampler = 0; - PFN_vkDestroySampler vkDestroySampler = 0; - PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0; - PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0; - PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0; - PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0; - PFN_vkResetDescriptorPool vkResetDescriptorPool = 0; - PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0; - PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0; - PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0; - PFN_vkCreateFramebuffer vkCreateFramebuffer = 0; - PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0; - PFN_vkCreateRenderPass vkCreateRenderPass = 0; - PFN_vkDestroyRenderPass vkDestroyRenderPass = 0; - PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0; - PFN_vkCreateCommandPool vkCreateCommandPool = 0; - PFN_vkDestroyCommandPool vkDestroyCommandPool = 0; - PFN_vkResetCommandPool vkResetCommandPool = 0; - PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0; - PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0; - PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0; - PFN_vkEndCommandBuffer vkEndCommandBuffer = 0; - PFN_vkResetCommandBuffer vkResetCommandBuffer = 0; - PFN_vkCmdBindPipeline vkCmdBindPipeline = 0; - PFN_vkCmdSetViewport vkCmdSetViewport = 0; - PFN_vkCmdSetScissor vkCmdSetScissor = 0; - PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0; - PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0; - PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0; - PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0; - PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0; - PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0; - PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0; - PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0; - PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0; - PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0; - PFN_vkCmdDraw vkCmdDraw = 0; - PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0; - PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0; - PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0; - PFN_vkCmdDispatch vkCmdDispatch = 0; - PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0; - PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0; - PFN_vkCmdCopyImage vkCmdCopyImage = 0; - PFN_vkCmdBlitImage vkCmdBlitImage = 0; - PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0; - PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0; - PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0; - PFN_vkCmdFillBuffer vkCmdFillBuffer = 0; - PFN_vkCmdClearColorImage vkCmdClearColorImage = 0; - PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0; - PFN_vkCmdClearAttachments vkCmdClearAttachments = 0; - PFN_vkCmdResolveImage vkCmdResolveImage = 0; - PFN_vkCmdSetEvent vkCmdSetEvent = 0; - PFN_vkCmdResetEvent vkCmdResetEvent = 0; - PFN_vkCmdWaitEvents vkCmdWaitEvents = 0; - PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0; - PFN_vkCmdBeginQuery vkCmdBeginQuery = 0; - PFN_vkCmdEndQuery vkCmdEndQuery = 0; - PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0; - PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0; - PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0; - PFN_vkCmdPushConstants vkCmdPushConstants = 0; - PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0; - PFN_vkCmdNextSubpass vkCmdNextSubpass = 0; - PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0; - PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0; - - //=== VK_VERSION_1_1 === - PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0; - PFN_vkBindImageMemory2 vkBindImageMemory2 = 0; - PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0; - PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0; - PFN_vkCmdDispatchBase vkCmdDispatchBase = 0; - PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0; - PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0; - PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0; - PFN_vkTrimCommandPool vkTrimCommandPool = 0; - PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0; - PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0; - PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0; - PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0; - PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0; - PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0; - PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0; - - //=== VK_VERSION_1_2 === - PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0; - PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0; - PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0; - PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0; - PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0; - PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0; - PFN_vkResetQueryPool vkResetQueryPool = 0; - PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0; - PFN_vkWaitSemaphores vkWaitSemaphores = 0; - PFN_vkSignalSemaphore vkSignalSemaphore = 0; - PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0; - PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0; - PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0; - - //=== VK_VERSION_1_3 === - PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot = 0; - PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot = 0; - PFN_vkSetPrivateData vkSetPrivateData = 0; - PFN_vkGetPrivateData vkGetPrivateData = 0; - PFN_vkCmdSetEvent2 vkCmdSetEvent2 = 0; - PFN_vkCmdResetEvent2 vkCmdResetEvent2 = 0; - PFN_vkCmdWaitEvents2 vkCmdWaitEvents2 = 0; - PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2 = 0; - PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2 = 0; - PFN_vkQueueSubmit2 vkQueueSubmit2 = 0; - PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2 = 0; - PFN_vkCmdCopyImage2 vkCmdCopyImage2 = 0; - PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2 = 0; - PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2 = 0; - PFN_vkCmdBlitImage2 vkCmdBlitImage2 = 0; - PFN_vkCmdResolveImage2 vkCmdResolveImage2 = 0; - PFN_vkCmdBeginRendering vkCmdBeginRendering = 0; - PFN_vkCmdEndRendering vkCmdEndRendering = 0; - PFN_vkCmdSetCullMode vkCmdSetCullMode = 0; - PFN_vkCmdSetFrontFace vkCmdSetFrontFace = 0; - PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology = 0; - PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount = 0; - PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount = 0; - PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2 = 0; - PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable = 0; - PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable = 0; - PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp = 0; - PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable = 0; - PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable = 0; - PFN_vkCmdSetStencilOp vkCmdSetStencilOp = 0; - PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable = 0; - PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable = 0; - PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable = 0; - PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements = 0; - PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements = 0; - PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements = 0; - - //=== VK_AMD_buffer_marker === - PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0; - - //=== VK_AMD_display_native_hdr === - PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0; - - //=== VK_AMD_draw_indirect_count === - PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0; - PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0; - - //=== VK_AMD_shader_info === - PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0; - PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0; -# else - PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0; - PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_buffer_device_address === - PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0; - - //=== VK_EXT_calibrated_timestamps === - PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0; - - //=== VK_EXT_color_write_enable === - PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0; - - //=== VK_EXT_conditional_rendering === - PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0; - PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0; - - //=== VK_EXT_debug_marker === - PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0; - PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0; - PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0; - PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0; - PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0; - - //=== VK_EXT_debug_utils === - PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0; - PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0; - PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0; - PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0; - PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0; - PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0; - PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0; - PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0; - - //=== VK_EXT_discard_rectangles === - PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0; - - //=== VK_EXT_display_control === - PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0; - PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0; - PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0; - PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0; - - //=== VK_EXT_extended_dynamic_state === - PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0; - PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0; - PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0; - PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0; - PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0; - PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0; - PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0; - PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0; - PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0; - PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0; - PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0; - PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0; - - //=== VK_EXT_extended_dynamic_state2 === - PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0; - PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0; - PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0; - PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0; - PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0; - - //=== VK_EXT_external_memory_host === - PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0; - PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0; - PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0; -# else - PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0; - PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0; - PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_hdr_metadata === - PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0; - - //=== VK_EXT_host_query_reset === - PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0; - - //=== VK_EXT_image_compression_control === - PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT = 0; - - //=== VK_EXT_image_drm_format_modifier === - PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0; - - //=== VK_EXT_line_rasterization === - PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0; - - //=== VK_EXT_mesh_shader === - PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT = 0; - PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT = 0; - PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT = 0; - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT = 0; -# else - PFN_dummy vkExportMetalObjectsEXT_placeholder = 0; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_multi_draw === - PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0; - PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0; - - //=== VK_EXT_pageable_device_local_memory === - PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT = 0; - - //=== VK_EXT_pipeline_properties === - PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT = 0; - - //=== VK_EXT_private_data === - PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0; - PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0; - PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0; - PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0; - - //=== VK_EXT_sample_locations === - PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0; - - //=== VK_EXT_shader_module_identifier === - PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT = 0; - PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT = 0; - - //=== VK_EXT_transform_feedback === - PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0; - PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0; - PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0; - PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0; - PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0; - PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0; - - //=== VK_EXT_validation_cache === - PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0; - PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0; - PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0; - PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0; - - //=== VK_EXT_vertex_input_dynamic_state === - PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA = 0; - PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA = 0; - PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA = 0; - PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA = 0; - PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA = 0; -# else - PFN_dummy vkCreateBufferCollectionFUCHSIA_placeholder = 0; - PFN_dummy vkSetBufferCollectionImageConstraintsFUCHSIA_placeholder = 0; - PFN_dummy vkSetBufferCollectionBufferConstraintsFUCHSIA_placeholder = 0; - PFN_dummy vkDestroyBufferCollectionFUCHSIA_placeholder = 0; - PFN_dummy vkGetBufferCollectionPropertiesFUCHSIA_placeholder = 0; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0; - PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0; -# else - PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0; - PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0; - PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0; -# else - PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0; - PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_GOOGLE_display_timing === - PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0; - PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0; - - //=== VK_HUAWEI_invocation_mask === - PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0; - - //=== VK_HUAWEI_subpass_shading === - PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0; - PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0; - - //=== VK_INTEL_performance_query === - PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0; - PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0; - PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0; - PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0; - PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0; - PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0; - PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0; - PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0; - PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0; - - //=== VK_KHR_acceleration_structure === - PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0; - PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0; - PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0; - PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0; - PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0; - PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0; - PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0; - PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0; - PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0; - PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0; - PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0; - PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0; - PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0; - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0; - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0; - PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0; - - //=== VK_KHR_bind_memory2 === - PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0; - PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0; - - //=== VK_KHR_buffer_device_address === - PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0; - PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0; - PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0; - - //=== VK_KHR_copy_commands2 === - PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0; - PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0; - PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0; - PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0; - PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0; - PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0; - - //=== VK_KHR_create_renderpass2 === - PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0; - PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0; - PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0; - PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0; - - //=== VK_KHR_deferred_host_operations === - PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0; - PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0; - PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0; - PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0; - PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0; - - //=== VK_KHR_descriptor_update_template === - PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0; - PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0; - PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0; - PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0; - - //=== VK_KHR_device_group === - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0; - PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0; - PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0; - PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0; - PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0; - PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0; - - //=== VK_KHR_display_swapchain === - PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0; - - //=== VK_KHR_draw_indirect_count === - PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0; - PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0; - - //=== VK_KHR_dynamic_rendering === - PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR = 0; - PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR = 0; - - //=== VK_KHR_external_fence_fd === - PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0; - PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0; - PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0; -# else - PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0; - PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0; - PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0; -# else - PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0; - PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0; - PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0; -# else - PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0; - PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_fragment_shading_rate === - PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0; - - //=== VK_KHR_get_memory_requirements2 === - PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0; - PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0; - PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0; - - //=== VK_KHR_maintenance1 === - PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0; - - //=== VK_KHR_maintenance3 === - PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0; - - //=== VK_KHR_maintenance4 === - PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR = 0; - PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR = 0; - PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR = 0; - - //=== VK_KHR_performance_query === - PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0; - PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0; - - //=== VK_KHR_pipeline_executable_properties === - PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0; - PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0; - PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0; - - //=== VK_KHR_present_wait === - PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0; - - //=== VK_KHR_push_descriptor === - PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0; - - //=== VK_KHR_ray_tracing_maintenance1 === - PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR = 0; - - //=== VK_KHR_ray_tracing_pipeline === - PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0; - PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0; - PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0; - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0; - PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0; - PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0; - PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0; - - //=== VK_KHR_sampler_ycbcr_conversion === - PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0; - PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0; - - //=== VK_KHR_shared_presentable_image === - PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0; - - //=== VK_KHR_swapchain === - PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0; - PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0; - PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0; - PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0; - PFN_vkQueuePresentKHR vkQueuePresentKHR = 0; - - //=== VK_KHR_synchronization2 === - PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0; - PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0; - PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0; - PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0; - PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0; - PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0; - PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0; - PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0; - - //=== VK_KHR_timeline_semaphore === - PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0; - PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0; - PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0; -# else - PFN_dummy vkCmdDecodeVideoKHR_placeholder = 0; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0; -# else - PFN_dummy vkCmdEncodeVideoKHR_placeholder = 0; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0; - PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0; - PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0; - PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0; - PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0; - PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0; - PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0; - PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0; - PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0; - PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0; -# else - PFN_dummy vkCreateVideoSessionKHR_placeholder = 0; - PFN_dummy vkDestroyVideoSessionKHR_placeholder = 0; - PFN_dummy vkGetVideoSessionMemoryRequirementsKHR_placeholder = 0; - PFN_dummy vkBindVideoSessionMemoryKHR_placeholder = 0; - PFN_dummy vkCreateVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkUpdateVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkDestroyVideoSessionParametersKHR_placeholder = 0; - PFN_dummy vkCmdBeginVideoCodingKHR_placeholder = 0; - PFN_dummy vkCmdEndVideoCodingKHR_placeholder = 0; - PFN_dummy vkCmdControlVideoCodingKHR_placeholder = 0; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0; - PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0; - PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0; - PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0; - PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0; - - //=== VK_NVX_image_view_handle === - PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0; - PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0; - - //=== VK_NV_clip_space_w_scaling === - PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0; - - //=== VK_NV_device_diagnostic_checkpoints === - PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0; - PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0; - - //=== VK_NV_device_generated_commands === - PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0; - PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0; - PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0; - PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0; - PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0; - PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0; - - //=== VK_NV_external_memory_rdma === - PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0; -# else - PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_NV_fragment_shading_rate_enums === - PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0; - - //=== VK_NV_mesh_shader === - PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0; - PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0; - PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0; - - //=== VK_NV_ray_tracing === - PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0; - PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0; - PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0; - PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0; - PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0; - PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0; - PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0; - PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0; - PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0; - PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0; - PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0; - PFN_vkCompileDeferredNV vkCompileDeferredNV = 0; - - //=== VK_NV_scissor_exclusive === - PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0; - - //=== VK_NV_shading_rate_image === - PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0; - PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0; - PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0; - - //=== VK_QCOM_tile_properties === - PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM = 0; - PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM = 0; - - //=== VK_VALVE_descriptor_set_host_mapping === - PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE = 0; - PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE = 0; - }; - - //======================================== - //=== RAII HANDLE forward declarations === - //======================================== - - //=== VK_VERSION_1_0 === - class Instance; - class PhysicalDevice; - class Device; - class Queue; - class DeviceMemory; - class Fence; - class Semaphore; - class Event; - class QueryPool; - class Buffer; - class BufferView; - class Image; - class ImageView; - class ShaderModule; - class PipelineCache; - class Pipeline; - class PipelineLayout; - class Sampler; - class DescriptorPool; - class DescriptorSet; - class DescriptorSetLayout; - class Framebuffer; - class RenderPass; - class CommandPool; - class CommandBuffer; - - //=== VK_VERSION_1_1 === - class SamplerYcbcrConversion; - class DescriptorUpdateTemplate; - - //=== VK_VERSION_1_3 === - class PrivateDataSlot; - - //=== VK_KHR_surface === - class SurfaceKHR; - - //=== VK_KHR_swapchain === - class SwapchainKHR; - - //=== VK_KHR_display === - class DisplayKHR; - class DisplayModeKHR; - - //=== VK_EXT_debug_report === - class DebugReportCallbackEXT; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - class VideoSessionKHR; - class VideoSessionParametersKHR; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - class CuModuleNVX; - class CuFunctionNVX; - - //=== VK_EXT_debug_utils === - class DebugUtilsMessengerEXT; - - //=== VK_KHR_acceleration_structure === - class AccelerationStructureKHR; - - //=== VK_EXT_validation_cache === - class ValidationCacheEXT; - - //=== VK_NV_ray_tracing === - class AccelerationStructureNV; - - //=== VK_INTEL_performance_query === - class PerformanceConfigurationINTEL; - - //=== VK_KHR_deferred_host_operations === - class DeferredOperationKHR; - - //=== VK_NV_device_generated_commands === - class IndirectCommandsLayoutNV; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - class BufferCollectionFUCHSIA; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //==================== - //=== RAII HANDLES === - //==================== - - class Context - { - public: -# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - Context() - : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher( - m_dynamicLoader.getProcAddress( "vkGetInstanceProcAddr" ) ) ) -# else - Context( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) - : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher( getInstanceProcAddr ) ) -# endif - { - } - - ~Context() = default; - - Context( Context const & ) = delete; - Context( Context && rhs ) VULKAN_HPP_NOEXCEPT -# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - : m_dynamicLoader( std::move( rhs.m_dynamicLoader ) ) - , m_dispatcher( rhs.m_dispatcher.release() ) -# else - : m_dispatcher( rhs.m_dispatcher.release() ) -# endif - { - } - Context & operator=( Context const & ) = delete; - Context & operator =( Context && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { -# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - m_dynamicLoader = std::move( rhs.m_dynamicLoader ); -# endif - m_dispatcher.reset( rhs.m_dispatcher.release() ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return &*m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context & rhs ) - { -# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - std::swap( m_dynamicLoader, rhs.m_dynamicLoader ); -# endif - m_dispatcher.swap( rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Instance - createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - VULKAN_HPP_NODISCARD std::vector enumerateInstanceLayerProperties() const; - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_NODISCARD uint32_t enumerateInstanceVersion() const; - - private: -# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL - VULKAN_HPP_NAMESPACE::DynamicLoader m_dynamicLoader; -# endif - std::unique_ptr m_dispatcher; - }; - - class Instance - { - public: - using CType = VkInstance; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; - - public: - Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, - VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( context.getDispatcher()->vkCreateInstance( reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_instance ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateInstance" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher( context.getDispatcher()->vkGetInstanceProcAddr, - static_cast( m_instance ) ) ); - } - - Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, - VkInstance instance, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( instance ), m_allocator( static_cast( allocator ) ) - { - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher( context.getDispatcher()->vkGetInstanceProcAddr, - static_cast( m_instance ) ) ); - } - - Instance( std::nullptr_t ) {} - - ~Instance() - { - clear(); - } - - Instance() = delete; - Instance( Instance const & ) = delete; - Instance( Instance && rhs ) VULKAN_HPP_NOEXCEPT - : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( rhs.m_dispatcher.release() ) - { - } - Instance & operator=( Instance const & ) = delete; - Instance & operator =( Instance && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher.reset( rhs.m_dispatcher.release() ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Instance const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_instance; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_instance ) - { - getDispatcher()->vkDestroyInstance( static_cast( m_instance ), reinterpret_cast( m_allocator ) ); - } - m_instance = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return &*m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_instance, rhs.m_instance ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDevices() const; - - VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDeviceGroups() const; - - //=== VK_KHR_display === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT - createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, - uint64_t object, - size_t location, - int32_t messageCode, - const std::string & layerPrefix, - const std::string & message ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_GGP*/ - -# if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_device_group_creation === - - VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDeviceGroupsKHR() const; - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_headless_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - private: - VULKAN_HPP_NAMESPACE::Instance m_instance = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - std::unique_ptr m_dispatcher; - }; - - class PhysicalDevice - { - public: - using CType = VkPhysicalDevice; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePhysicalDevice; - - public: - PhysicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkPhysicalDevice physicalDevice ) - : m_physicalDevice( physicalDevice ), m_dispatcher( instance.getDispatcher() ) - { - } - - PhysicalDevice( std::nullptr_t ) {} - - ~PhysicalDevice() - { - clear(); - } - - PhysicalDevice() = delete; - PhysicalDevice( PhysicalDevice const & rhs ) : m_physicalDevice( rhs.m_physicalDevice ), m_dispatcher( rhs.m_dispatcher ) {} - PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT - : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - PhysicalDevice & operator=( PhysicalDevice const & rhs ) - { - m_physicalDevice = rhs.m_physicalDevice; - m_dispatcher = rhs.m_dispatcher; - return *this; - } - PhysicalDevice & operator=( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::PhysicalDevice const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_physicalDevice; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - m_physicalDevice = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_physicalDevice, rhs.m_physicalDevice ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties getFormatProperties( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties - getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties getProperties() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Device - createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - VULKAN_HPP_NODISCARD std::vector enumerateDeviceLayerProperties() const; - - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling ) const; - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getFeatures2() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getProperties2() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties2 - getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; - - VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2() const; - - template - VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getMemoryProperties2() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties - getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties - getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_3 === - - VULKAN_HPP_NODISCARD std::vector getToolProperties() const; - - //=== VK_KHR_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; - - VULKAN_HPP_NODISCARD std::vector - getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - VULKAN_HPP_NODISCARD std::vector - getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_KHR_swapchain === - - VULKAN_HPP_NODISCARD std::vector getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; - - //=== VK_KHR_display === - - VULKAN_HPP_NODISCARD std::vector getDisplayPropertiesKHR() const; - - VULKAN_HPP_NODISCARD std::vector getDisplayPlanePropertiesKHR() const; - - VULKAN_HPP_NODISCARD std::vector getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 - getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 - getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, - struct wl_display & display ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR - getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const; - - template - VULKAN_HPP_NODISCARD StructureChain getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const; - - VULKAN_HPP_NODISCARD std::vector - getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_external_memory_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV getExternalImageFormatPropertiesNV( - VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_KHR_get_physical_device_properties2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2KHR() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getFeatures2KHR() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2KHR() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getProperties2KHR() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties2 - getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; - - VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR() const; - - template - VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const; - - //=== VK_KHR_external_memory_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties - getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_external_semaphore_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties - getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - - void acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const; -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; - - //=== VK_KHR_external_fence_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties - getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_performance_query === - - VULKAN_HPP_NODISCARD - std::pair, std::vector> - enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex ) const; - - VULKAN_HPP_NODISCARD uint32_t getQueueFamilyPerformanceQueryPassesKHR( - const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_get_surface_capabilities2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR - getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; - - template - VULKAN_HPP_NODISCARD StructureChain - getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; - - VULKAN_HPP_NODISCARD std::vector - getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; - - template - VULKAN_HPP_NODISCARD std::vector getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; - - //=== VK_KHR_get_display_properties2 === - - VULKAN_HPP_NODISCARD std::vector getDisplayProperties2KHR() const; - - VULKAN_HPP_NODISCARD std::vector getDisplayPlaneProperties2KHR() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR - getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo ) const; - - //=== VK_EXT_sample_locations === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT - getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_calibrated_timestamps === - - VULKAN_HPP_NODISCARD std::vector getCalibrateableTimeDomainsEXT() const; - - //=== VK_KHR_fragment_shading_rate === - - VULKAN_HPP_NODISCARD std::vector getFragmentShadingRatesKHR() const; - - //=== VK_EXT_tooling_info === - - VULKAN_HPP_NODISCARD std::vector getToolPropertiesEXT() const; - - //=== VK_NV_cooperative_matrix === - - VULKAN_HPP_NODISCARD std::vector getCooperativeMatrixPropertiesNV() const; - - //=== VK_NV_coverage_reduction_mode === - - VULKAN_HPP_NODISCARD std::vector getSupportedFramebufferMixedSamplesCombinationsNV() const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - VULKAN_HPP_NODISCARD std::vector - getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_acquire_drm_display === - - void acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getWinrtDisplayNV( uint32_t deviceRelativeId ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, - IDirectFB & dfb ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, - struct _screen_window & window ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - private: - VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class PhysicalDevices : public std::vector - { - public: - PhysicalDevices( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = instance.getDispatcher(); - std::vector physicalDevices; - uint32_t physicalDeviceCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, physicalDevices.data() ) ); - } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); - this->reserve( physicalDeviceCount ); - for ( auto const & physicalDevice : physicalDevices ) - { - this->emplace_back( instance, physicalDevice ); - } - } - else - { - throwResultException( result, "vkEnumeratePhysicalDevices" ); - } - } - - PhysicalDevices( std::nullptr_t ) {} - - PhysicalDevices() = delete; - PhysicalDevices( PhysicalDevices const & ) = delete; - PhysicalDevices( PhysicalDevices && rhs ) = default; - PhysicalDevices & operator=( PhysicalDevices const & ) = delete; - PhysicalDevices & operator=( PhysicalDevices && rhs ) = default; - }; - - class Device - { - public: - using CType = VkDevice; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; - - public: - Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, - VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - physicalDevice.getDispatcher()->vkCreateDevice( static_cast( *physicalDevice ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_device ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDevice" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr, - static_cast( m_device ) ) ); - } - - Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, - VkDevice device, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( device ), m_allocator( static_cast( allocator ) ) - { - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr, - static_cast( m_device ) ) ); - } - - Device( std::nullptr_t ) {} - - ~Device() - { - clear(); - } - - Device() = delete; - Device( Device const & ) = delete; - Device( Device && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( rhs.m_dispatcher.release() ) - { - } - Device & operator=( Device const & ) = delete; - Device & operator =( Device && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher.reset( rhs.m_dispatcher.release() ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Device const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_device; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_device ) - { - getDispatcher()->vkDestroyDevice( static_cast( m_device ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return &*m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; - - void waitIdle() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void flushMappedMemoryRanges( ArrayProxy const & memoryRanges ) const; - - void invalidateMappedMemoryRanges( ArrayProxy const & memoryRanges ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence - createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void resetFences( ArrayProxy const & fences ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - waitForFences( ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Semaphore - createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Event - createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::QueryPool - createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Buffer - createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::BufferView - createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Image - createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ImageView - createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ShaderModule - createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineCache - createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - createGraphicsPipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline - createGraphicsPipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - createComputePipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline - createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Sampler - createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; - - void updateDescriptorSets( ArrayProxy const & descriptorWrites, - ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Framebuffer - createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass - createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CommandPool - createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD std::vector - allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; - - //=== VK_VERSION_1_1 === - - void bindBufferMemory2( ArrayProxy const & bindInfos ) const; - - void bindImageMemory2( ArrayProxy const & bindInfos ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass - createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; - - void signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress - getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD uint64_t - getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_3 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data ) const; - - VULKAN_HPP_NODISCARD uint64_t getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const; - - //=== VK_KHR_swapchain === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR getGroupPresentCapabilitiesKHR() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR - getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; - - VULKAN_HPP_NODISCARD std::pair - acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const; - - //=== VK_KHR_display_swapchain === - - VULKAN_HPP_NODISCARD std::vector - createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_EXT_debug_marker === - - void debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo ) const; - - void debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo ) const; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR - createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR - createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NVX_binary_import === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX - createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX - createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_NVX_image_view_handle === - - VULKAN_HPP_NODISCARD uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_device_group === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - - VULKAN_HPP_NODISCARD HANDLE getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR - getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - - VULKAN_HPP_NODISCARD int getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR - getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd ) const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - - void importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const; - - VULKAN_HPP_NODISCARD HANDLE getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - - void importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const; - - VULKAN_HPP_NODISCARD int getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const; - - //=== VK_KHR_descriptor_update_template === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_display_control === - - void displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence - registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence - registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, - VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_EXT_hdr_metadata === - - void setHdrMetadataEXT( ArrayProxy const & swapchains, - ArrayProxy const & metadata ) const; - - //=== VK_KHR_create_renderpass2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass - createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - - void importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const; - - VULKAN_HPP_NODISCARD HANDLE getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - - void importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo ) const; - - VULKAN_HPP_NODISCARD int getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const; - - //=== VK_KHR_performance_query === - - void acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info ) const; - - void releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_debug_utils === - - void setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo ) const; - - void setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const; - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID - getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const; - - template - VULKAN_HPP_NODISCARD StructureChain getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const; - - VULKAN_HPP_NODISCARD struct AHardwareBuffer * - getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info ) const; -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_KHR_get_memory_requirements2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const; - - //=== VK_KHR_acceleration_structure === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR - createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result - copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const; - - template - VULKAN_HPP_NODISCARD std::vector - writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - size_t stride ) const; - - template - VULKAN_HPP_NODISCARD DataType - writeAccelerationStructuresPropertyKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t stride ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress - getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR - getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR - getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, - ArrayProxy const & maxPrimitiveCounts VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - //=== VK_KHR_sampler_ycbcr_conversion === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_bind_memory2 === - - void bindBufferMemory2KHR( ArrayProxy const & bindInfos ) const; - - void bindImageMemory2KHR( ArrayProxy const & bindInfos ) const; - - //=== VK_EXT_validation_cache === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT - createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_NV_ray_tracing === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV - createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( - const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain getAccelerationStructureMemoryRequirementsNV( - const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; - - void bindAccelerationStructureMemoryNV( ArrayProxy const & bindInfos ) const; - - VULKAN_HPP_NODISCARD std::vector - createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline - createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_KHR_maintenance3 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_external_memory_host === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT - getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer ) const; - - //=== VK_EXT_calibrated_timestamps === - - VULKAN_HPP_NODISCARD std::pair, uint64_t> - getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos ) const; - - VULKAN_HPP_NODISCARD std::pair - getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT & timestampInfo ) const; - - //=== VK_KHR_timeline_semaphore === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; - - void signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const; - - //=== VK_INTEL_performance_query === - - void initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo ) const; - - void uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL - acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PerformanceValueINTEL - getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter ) const; - - //=== VK_EXT_buffer_device_address === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress - getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR - getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_buffer_device_address === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress - getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD uint64_t - getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_deferred_host_operations === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR - createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_KHR_pipeline_executable_properties === - - VULKAN_HPP_NODISCARD std::vector - getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo ) const; - - VULKAN_HPP_NODISCARD std::vector - getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const; - - VULKAN_HPP_NODISCARD std::vector - getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const; - - //=== VK_NV_device_generated_commands === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV - createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_EXT_private_data === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - Optional allocator - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data ) const; - - VULKAN_HPP_NODISCARD uint64_t getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT; -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - VULKAN_HPP_NODISCARD std::vector createRayTracingPipelinesKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline createRayTracingPipelineKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - - VULKAN_HPP_NODISCARD zx_handle_t getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA - getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle ) const; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - - void importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo ) const; - - VULKAN_HPP_NODISCARD zx_handle_t - getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA - createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_NV_external_memory_rdma === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::RemoteAddressNV - getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const; - - //=== VK_EXT_pipeline_properties === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::BaseOutStructure getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo ) const; - - //=== VK_KHR_maintenance4 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 - getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector - getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const; - - //=== VK_VALVE_descriptor_set_host_mapping === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE getDescriptorSetLayoutHostMappingInfoVALVE( - const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_shader_module_identifier === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_QCOM_tile_properties === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::TilePropertiesQCOM - getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - std::unique_ptr m_dispatcher; - }; - - class AccelerationStructureKHR - { - public: - using CType = VkAccelerationStructureKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; - - public: - AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateAccelerationStructureKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_accelerationStructure ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateAccelerationStructureKHR" ); - } - } - - AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkAccelerationStructureKHR accelerationStructure, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_accelerationStructure( accelerationStructure ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - AccelerationStructureKHR( std::nullptr_t ) {} - - ~AccelerationStructureKHR() - { - clear(); - } - - AccelerationStructureKHR() = delete; - AccelerationStructureKHR( AccelerationStructureKHR const & ) = delete; - AccelerationStructureKHR( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_accelerationStructure( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - AccelerationStructureKHR & operator=( AccelerationStructureKHR const & ) = delete; - AccelerationStructureKHR & operator =( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_accelerationStructure = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructure; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureKHR( static_cast( m_device ), - static_cast( m_accelerationStructure ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_accelerationStructure = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR m_accelerationStructure = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class AccelerationStructureNV - { - public: - using CType = VkAccelerationStructureNV; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; - - public: - AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateAccelerationStructureNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_accelerationStructure ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateAccelerationStructureNV" ); - } - } - - AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkAccelerationStructureNV accelerationStructure, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_accelerationStructure( accelerationStructure ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - AccelerationStructureNV( std::nullptr_t ) {} - - ~AccelerationStructureNV() - { - clear(); - } - - AccelerationStructureNV() = delete; - AccelerationStructureNV( AccelerationStructureNV const & ) = delete; - AccelerationStructureNV( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_accelerationStructure( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - AccelerationStructureNV & operator=( AccelerationStructureNV const & ) = delete; - AccelerationStructureNV & operator =( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_accelerationStructure = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_accelerationStructure; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_accelerationStructure ) - { - getDispatcher()->vkDestroyAccelerationStructureNV( static_cast( m_device ), - static_cast( m_accelerationStructure ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_accelerationStructure = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_NV_ray_tracing === - - template - VULKAN_HPP_NODISCARD std::vector getHandle( size_t dataSize ) const; - - template - VULKAN_HPP_NODISCARD DataType getHandle() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureNV m_accelerationStructure = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Buffer - { - public: - using CType = VkBuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; - - public: - Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateBuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_buffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateBuffer" ); - } - } - - Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkBuffer buffer, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_buffer( buffer ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Buffer( std::nullptr_t ) {} - - ~Buffer() - { - clear(); - } - - Buffer() = delete; - Buffer( Buffer const & ) = delete; - Buffer( Buffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Buffer & operator=( Buffer const & ) = delete; - Buffer & operator =( Buffer && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_buffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Buffer const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_buffer; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_buffer ) - { - getDispatcher()->vkDestroyBuffer( - static_cast( m_device ), static_cast( m_buffer ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_buffer = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_buffer, rhs.m_buffer ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Buffer m_buffer = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - class BufferCollectionFUCHSIA - { - public: - using CType = VkBufferCollectionFUCHSIA; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; - - public: - BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateBufferCollectionFUCHSIA( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_collection ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateBufferCollectionFUCHSIA" ); - } - } - - BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkBufferCollectionFUCHSIA collection, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_collection( collection ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - BufferCollectionFUCHSIA( std::nullptr_t ) {} - - ~BufferCollectionFUCHSIA() - { - clear(); - } - - BufferCollectionFUCHSIA() = delete; - BufferCollectionFUCHSIA( BufferCollectionFUCHSIA const & ) = delete; - BufferCollectionFUCHSIA( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_collection( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_collection, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA const & ) = delete; - BufferCollectionFUCHSIA & operator =( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_collection = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_collection, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_collection; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_collection ) - { - getDispatcher()->vkDestroyBufferCollectionFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_collection = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_collection, rhs.m_collection ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_FUCHSIA_buffer_collection === - - void setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const; - - void setBufferConstraints( const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA getProperties() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA m_collection = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - class BufferView - { - public: - using CType = VkBufferView; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; - - public: - BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateBufferView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_bufferView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateBufferView" ); - } - } - - BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkBufferView bufferView, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_bufferView( bufferView ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - BufferView( std::nullptr_t ) {} - - ~BufferView() - { - clear(); - } - - BufferView() = delete; - BufferView( BufferView const & ) = delete; - BufferView( BufferView && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_bufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - BufferView & operator=( BufferView const & ) = delete; - BufferView & operator =( BufferView && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_bufferView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::BufferView const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_bufferView; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_bufferView ) - { - getDispatcher()->vkDestroyBufferView( - static_cast( m_device ), static_cast( m_bufferView ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_bufferView = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_bufferView, rhs.m_bufferView ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::BufferView m_bufferView = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class CommandPool - { - public: - using CType = VkCommandPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; - - public: - CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCommandPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_commandPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateCommandPool" ); - } - } - - CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkCommandPool commandPool, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_commandPool( commandPool ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - CommandPool( std::nullptr_t ) {} - - ~CommandPool() - { - clear(); - } - - CommandPool() = delete; - CommandPool( CommandPool const & ) = delete; - CommandPool( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_commandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - CommandPool & operator=( CommandPool const & ) = delete; - CommandPool & operator =( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::CommandPool const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_commandPool; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_commandPool ) - { - getDispatcher()->vkDestroyCommandPool( - static_cast( m_device ), static_cast( m_commandPool ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_commandPool = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_commandPool, rhs.m_commandPool ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_VERSION_1_1 === - - void trim( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_maintenance1 === - - void trimKHR( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::CommandPool m_commandPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class CommandBuffer - { - public: - using CType = VkCommandBuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; - - public: - CommandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandBuffer commandBuffer, VkCommandPool commandPool ) - : m_device( *device ), m_commandPool( commandPool ), m_commandBuffer( commandBuffer ), m_dispatcher( device.getDispatcher() ) - { - } - - CommandBuffer( std::nullptr_t ) {} - - ~CommandBuffer() - { - clear(); - } - - CommandBuffer() = delete; - CommandBuffer( CommandBuffer const & ) = delete; - CommandBuffer( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_commandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) - , m_commandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - CommandBuffer & operator=( CommandBuffer const & ) = delete; - CommandBuffer & operator =( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ); - m_commandBuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::CommandBuffer const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_commandBuffer; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_commandBuffer ) - { - getDispatcher()->vkFreeCommandBuffers( - static_cast( m_device ), static_cast( m_commandPool ), 1, reinterpret_cast( &m_commandBuffer ) ); - } - m_device = nullptr; - m_commandPool = nullptr; - m_commandBuffer = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandBuffer & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_commandPool, rhs.m_commandPool ); - std::swap( m_commandBuffer, rhs.m_commandBuffer ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const; - - void end() const; - - void reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - void bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT; - - void setViewport( uint32_t firstViewport, ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; - - void setScissor( uint32_t firstScissor, ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; - - void setLineWidth( float lineWidth ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT; - - void setBlendConstants( const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT; - - void setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT; - - void setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT; - - void setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT; - - void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - ArrayProxy const & descriptorSets, - ArrayProxy const & dynamicOffsets ) const VULKAN_HPP_NOEXCEPT; - - void bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT; - - void bindVertexBuffers( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets ) const; - - void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT; - - void - drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT; - - void drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; - - void dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT; - - void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; - - void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; - - void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - VULKAN_HPP_NAMESPACE::Filter filter ) const VULKAN_HPP_NOEXCEPT; - - void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; - - void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; - - template - void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - ArrayProxy const & data ) const VULKAN_HPP_NOEXCEPT; - - void fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - uint32_t data ) const VULKAN_HPP_NOEXCEPT; - - void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue & color, - ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT; - - void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, - ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT; - - void clearAttachments( ArrayProxy const & attachments, - ArrayProxy const & rects ) const VULKAN_HPP_NOEXCEPT; - - void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; - - void setEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void resetEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void waitEvents( ArrayProxy const & events, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT; - - void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT; - - void beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; - - void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; - - void writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT; - - void copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - template - void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - ArrayProxy const & values ) const VULKAN_HPP_NOEXCEPT; - - void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT; - - void nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT; - - void endRenderPass() const VULKAN_HPP_NOEXCEPT; - - void executeCommands( ArrayProxy const & commandBuffers ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_1 === - - void setDeviceMask( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT; - - void dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const - VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_2 === - - void drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT; - - void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; - - void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VERSION_1_3 === - - void setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; - - void resetEvent2( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void waitEvents2( ArrayProxy const & events, - ArrayProxy const & dependencyInfos ) const; - - void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; - - void - writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; - - void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; - - void endRendering() const VULKAN_HPP_NOEXCEPT; - - void setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT; - - void setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT; - - void setViewportWithCount( ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; - - void setScissorWithCount( ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; - - void bindVertexBuffers2( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - void setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT; - - void setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT; - - void setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_debug_marker === - - void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT; - - void debugMarkerEndEXT() const VULKAN_HPP_NOEXCEPT; - - void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo ) const VULKAN_HPP_NOEXCEPT; - - void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo ) const VULKAN_HPP_NOEXCEPT; - - void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & frameInfo ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - void endTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets - VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - void beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - uint32_t index ) const VULKAN_HPP_NOEXCEPT; - - void endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT; - - void drawIndirectByteCountEXT( uint32_t instanceCount, - uint32_t firstInstance, - VULKAN_HPP_NAMESPACE::Buffer counterBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, - uint32_t counterOffset, - uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NVX_binary_import === - - void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_AMD_draw_indirect_count === - - void drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_dynamic_rendering === - - void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; - - void endRenderingKHR() const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_device_group === - - void setDeviceMaskKHR( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT; - - void dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) - const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_push_descriptor === - - void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT; - - template - void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - DataType const & data ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_conditional_rendering === - - void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT; - - void endConditionalRenderingEXT() const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_clip_space_w_scaling === - - void setViewportWScalingNV( uint32_t firstViewport, - ArrayProxy const & viewportWScalings ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_discard_rectangles === - - void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - ArrayProxy const & discardRectangles ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_create_renderpass2 === - - void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT; - - void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; - - void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_debug_utils === - - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; - - void endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT; - - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_sample_locations === - - void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_acceleration_structure === - - void - buildAccelerationStructuresKHR( ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos ) const; - - void buildAccelerationStructuresIndirectKHR( ArrayProxy const & infos, - ArrayProxy const & indirectDeviceAddresses, - ArrayProxy const & indirectStrides, - ArrayProxy const & pMaxPrimitiveCounts ) const; - - void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; - - void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; - - void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; - - void writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_shading_rate_image === - - void bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT; - - void - setViewportShadingRatePaletteNV( uint32_t firstViewport, - ArrayProxy const & shadingRatePalettes ) const VULKAN_HPP_NOEXCEPT; - - void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - ArrayProxy const & customSampleOrders ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_ray_tracing === - - void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT; - - void copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT; - - void traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, - VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT; - - void writeAccelerationStructuresPropertiesNV( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_draw_indirect_count === - - void drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_AMD_buffer_marker === - - void writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_mesh_shader === - - void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT; - - void drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_scissor_exclusive === - - void setExclusiveScissorNV( uint32_t firstExclusiveScissor, - ArrayProxy const & exclusiveScissors ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_device_diagnostic_checkpoints === - - template - void setCheckpointNV( CheckpointMarkerType const & checkpointMarker ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_INTEL_performance_query === - - void setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo ) const; - - void setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo ) const; - - void setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo ) const; - - //=== VK_KHR_fragment_shading_rate === - - void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_line_rasterization === - - void setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_extended_dynamic_state === - - void setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT; - - void setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT; - - void setViewportWithCountEXT( ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; - - void setScissorWithCountEXT( ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; - - void bindVertexBuffers2EXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, - ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; - - void setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT; - - void setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_device_generated_commands === - - void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT; - - void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT; - - void bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo ) const VULKAN_HPP_NOEXCEPT; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_KHR_synchronization2 === - - void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; - - void resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - void waitEvents2KHR( ArrayProxy const & events, - ArrayProxy const & dependencyInfos ) const; - - void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; - - void writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT; - - void writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_fragment_shading_rate_enums === - - void setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_mesh_shader === - - void drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; - - void drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_copy_commands2 === - - void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT; - - void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT; - - void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_ray_tracing_pipeline === - - void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT; - - void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT; - - void setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_vertex_input_dynamic_state === - - void setVertexInputEXT( ArrayProxy const & vertexBindingDescriptions, - ArrayProxy const & vertexAttributeDescriptions ) const - VULKAN_HPP_NOEXCEPT; - - //=== VK_HUAWEI_subpass_shading === - - void subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT; - - //=== VK_HUAWEI_invocation_mask === - - void bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_extended_dynamic_state2 === - - void setPatchControlPointsEXT( uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT; - - void setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT; - - void setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT; - - void setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp ) const VULKAN_HPP_NOEXCEPT; - - void setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_color_write_enable === - - void setColorWriteEnableEXT( ArrayProxy const & colorWriteEnables ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_ray_tracing_maintenance1 === - - void traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_multi_draw === - - void drawMultiEXT( ArrayProxy const & vertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT; - - void drawMultiIndexedEXT( ArrayProxy const & indexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Optional vertexOffset VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::CommandPool m_commandPool = {}; - VULKAN_HPP_NAMESPACE::CommandBuffer m_commandBuffer = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class CommandBuffers : public std::vector - { - public: - CommandBuffers( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateCommandBuffers( - static_cast( *device ), reinterpret_cast( &allocateInfo ), commandBuffers.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.commandBufferCount ); - for ( auto const & commandBuffer : commandBuffers ) - { - this->emplace_back( device, commandBuffer, static_cast( allocateInfo.commandPool ) ); - } - } - else - { - throwResultException( result, "vkAllocateCommandBuffers" ); - } - } - - CommandBuffers( std::nullptr_t ) {} - - CommandBuffers() = delete; - CommandBuffers( CommandBuffers const & ) = delete; - CommandBuffers( CommandBuffers && rhs ) = default; - CommandBuffers & operator=( CommandBuffers const & ) = delete; - CommandBuffers & operator=( CommandBuffers && rhs ) = default; - }; - - class CuFunctionNVX - { - public: - using CType = VkCuFunctionNVX; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; - - public: - CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCuFunctionNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_function ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateCuFunctionNVX" ); - } - } - - CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkCuFunctionNVX function, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_function( function ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - CuFunctionNVX( std::nullptr_t ) {} - - ~CuFunctionNVX() - { - clear(); - } - - CuFunctionNVX() = delete; - CuFunctionNVX( CuFunctionNVX const & ) = delete; - CuFunctionNVX( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_function( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_function, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - CuFunctionNVX & operator=( CuFunctionNVX const & ) = delete; - CuFunctionNVX & operator =( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_function = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_function, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::CuFunctionNVX const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_function; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_function ) - { - getDispatcher()->vkDestroyCuFunctionNVX( - static_cast( m_device ), static_cast( m_function ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_function = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_function, rhs.m_function ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::CuFunctionNVX m_function = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class CuModuleNVX - { - public: - using CType = VkCuModuleNVX; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; - - public: - CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCuModuleNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_module ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateCuModuleNVX" ); - } - } - - CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkCuModuleNVX module, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_module( module ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - CuModuleNVX( std::nullptr_t ) {} - - ~CuModuleNVX() - { - clear(); - } - - CuModuleNVX() = delete; - CuModuleNVX( CuModuleNVX const & ) = delete; - CuModuleNVX( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_module( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_module, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - CuModuleNVX & operator=( CuModuleNVX const & ) = delete; - CuModuleNVX & operator =( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_module = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_module, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::CuModuleNVX const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_module; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_module ) - { - getDispatcher()->vkDestroyCuModuleNVX( - static_cast( m_device ), static_cast( m_module ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_module = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_module, rhs.m_module ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::CuModuleNVX m_module = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DebugReportCallbackEXT - { - public: - using CType = VkDebugReportCallbackEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; - - public: - DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDebugReportCallbackEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_callback ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDebugReportCallbackEXT" ); - } - } - - DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VkDebugReportCallbackEXT callback, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_callback( callback ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - } - - DebugReportCallbackEXT( std::nullptr_t ) {} - - ~DebugReportCallbackEXT() - { - clear(); - } - - DebugReportCallbackEXT() = delete; - DebugReportCallbackEXT( DebugReportCallbackEXT const & ) = delete; - DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) - , m_callback( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_callback, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DebugReportCallbackEXT & operator=( DebugReportCallbackEXT const & ) = delete; - DebugReportCallbackEXT & operator =( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); - m_callback = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_callback, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_callback; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_callback ) - { - getDispatcher()->vkDestroyDebugReportCallbackEXT( static_cast( m_instance ), - static_cast( m_callback ), - reinterpret_cast( m_allocator ) ); - } - m_instance = nullptr; - m_callback = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Instance getInstance() const - { - return m_instance; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_instance, rhs.m_instance ); - std::swap( m_callback, rhs.m_callback ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Instance m_instance = {}; - VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT m_callback = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class DebugUtilsMessengerEXT - { - public: - using CType = VkDebugUtilsMessengerEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDebugUtilsMessengerEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_messenger ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDebugUtilsMessengerEXT" ); - } - } - - DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VkDebugUtilsMessengerEXT messenger, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_messenger( messenger ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - } - - DebugUtilsMessengerEXT( std::nullptr_t ) {} - - ~DebugUtilsMessengerEXT() - { - clear(); - } - - DebugUtilsMessengerEXT() = delete; - DebugUtilsMessengerEXT( DebugUtilsMessengerEXT const & ) = delete; - DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) - , m_messenger( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_messenger, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT const & ) = delete; - DebugUtilsMessengerEXT & operator =( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); - m_messenger = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_messenger, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_messenger; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_messenger ) - { - getDispatcher()->vkDestroyDebugUtilsMessengerEXT( static_cast( m_instance ), - static_cast( m_messenger ), - reinterpret_cast( m_allocator ) ); - } - m_instance = nullptr; - m_messenger = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Instance getInstance() const - { - return m_instance; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_instance, rhs.m_instance ); - std::swap( m_messenger, rhs.m_messenger ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Instance m_instance = {}; - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT m_messenger = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class DeferredOperationKHR - { - public: - using CType = VkDeferredOperationKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDeferredOperationKHR( static_cast( *device ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_operation ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDeferredOperationKHR" ); - } - } - - DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDeferredOperationKHR operation, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_operation( operation ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - DeferredOperationKHR( std::nullptr_t ) {} - - ~DeferredOperationKHR() - { - clear(); - } - - DeferredOperationKHR() = delete; - DeferredOperationKHR( DeferredOperationKHR const & ) = delete; - DeferredOperationKHR( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_operation( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_operation, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DeferredOperationKHR & operator=( DeferredOperationKHR const & ) = delete; - DeferredOperationKHR & operator =( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_operation = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_operation, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_operation; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_operation ) - { - getDispatcher()->vkDestroyDeferredOperationKHR( static_cast( m_device ), - static_cast( m_operation ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_operation = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_operation, rhs.m_operation ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_deferred_host_operations === - - VULKAN_HPP_NODISCARD uint32_t getMaxConcurrency() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getResult() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result join() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DeferredOperationKHR m_operation = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DescriptorPool - { - public: - using CType = VkDescriptorPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; - - public: - DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDescriptorPool" ); - } - } - - DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_descriptorPool( descriptorPool ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - DescriptorPool( std::nullptr_t ) {} - - ~DescriptorPool() - { - clear(); - } - - DescriptorPool() = delete; - DescriptorPool( DescriptorPool const & ) = delete; - DescriptorPool( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_descriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DescriptorPool & operator=( DescriptorPool const & ) = delete; - DescriptorPool & operator =( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DescriptorPool const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorPool; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_descriptorPool ) - { - getDispatcher()->vkDestroyDescriptorPool( static_cast( m_device ), - static_cast( m_descriptorPool ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_descriptorPool = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_descriptorPool, rhs.m_descriptorPool ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DescriptorSet - { - public: - using CType = VkDescriptorSet; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; - - public: - DescriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSet descriptorSet, VkDescriptorPool descriptorPool ) - : m_device( *device ), m_descriptorPool( descriptorPool ), m_descriptorSet( descriptorSet ), m_dispatcher( device.getDispatcher() ) - { - } - - DescriptorSet( std::nullptr_t ) {} - - ~DescriptorSet() - { - clear(); - } - - DescriptorSet() = delete; - DescriptorSet( DescriptorSet const & ) = delete; - DescriptorSet( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_descriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) - , m_descriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DescriptorSet & operator=( DescriptorSet const & ) = delete; - DescriptorSet & operator =( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); - m_descriptorSet = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DescriptorSet const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSet; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_descriptorSet ) - { - getDispatcher()->vkFreeDescriptorSets( static_cast( m_device ), - static_cast( m_descriptorPool ), - 1, - reinterpret_cast( &m_descriptorSet ) ); - } - m_device = nullptr; - m_descriptorPool = nullptr; - m_descriptorSet = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSet & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_descriptorPool, rhs.m_descriptorPool ); - std::swap( m_descriptorSet, rhs.m_descriptorSet ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_1 === - - template - void updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_descriptor_update_template === - - template - void updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_VALVE_descriptor_set_host_mapping === - - VULKAN_HPP_NODISCARD void * getHostMappingVALVE() const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool = {}; - VULKAN_HPP_NAMESPACE::DescriptorSet m_descriptorSet = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DescriptorSets : public std::vector - { - public: - DescriptorSets( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateDescriptorSets( - static_cast( *device ), reinterpret_cast( &allocateInfo ), descriptorSets.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.descriptorSetCount ); - for ( auto const & descriptorSet : descriptorSets ) - { - this->emplace_back( device, descriptorSet, static_cast( allocateInfo.descriptorPool ) ); - } - } - else - { - throwResultException( result, "vkAllocateDescriptorSets" ); - } - } - - DescriptorSets( std::nullptr_t ) {} - - DescriptorSets() = delete; - DescriptorSets( DescriptorSets const & ) = delete; - DescriptorSets( DescriptorSets && rhs ) = default; - DescriptorSets & operator=( DescriptorSets const & ) = delete; - DescriptorSets & operator=( DescriptorSets && rhs ) = default; - }; - - class DescriptorSetLayout - { - public: - using CType = VkDescriptorSetLayout; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; - - public: - DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorSetLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorSetLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDescriptorSetLayout" ); - } - } - - DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDescriptorSetLayout descriptorSetLayout, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_descriptorSetLayout( descriptorSetLayout ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - DescriptorSetLayout( std::nullptr_t ) {} - - ~DescriptorSetLayout() - { - clear(); - } - - DescriptorSetLayout() = delete; - DescriptorSetLayout( DescriptorSetLayout const & ) = delete; - DescriptorSetLayout( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DescriptorSetLayout & operator=( DescriptorSetLayout const & ) = delete; - DescriptorSetLayout & operator =( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_descriptorSetLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorSetLayout; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_descriptorSetLayout ) - { - getDispatcher()->vkDestroyDescriptorSetLayout( static_cast( m_device ), - static_cast( m_descriptorSetLayout ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_descriptorSetLayout = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_descriptorSetLayout, rhs.m_descriptorSetLayout ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DescriptorSetLayout m_descriptorSetLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DescriptorUpdateTemplate - { - public: - using CType = VkDescriptorUpdateTemplate; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; - - public: - DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorUpdateTemplate( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorUpdateTemplate ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDescriptorUpdateTemplate" ); - } - } - - DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_descriptorUpdateTemplate( descriptorUpdateTemplate ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - DescriptorUpdateTemplate( std::nullptr_t ) {} - - ~DescriptorUpdateTemplate() - { - clear(); - } - - DescriptorUpdateTemplate() = delete; - DescriptorUpdateTemplate( DescriptorUpdateTemplate const & ) = delete; - DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_descriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate const & ) = delete; - DescriptorUpdateTemplate & operator =( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_descriptorUpdateTemplate = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_descriptorUpdateTemplate; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_descriptorUpdateTemplate ) - { - getDispatcher()->vkDestroyDescriptorUpdateTemplate( static_cast( m_device ), - static_cast( m_descriptorUpdateTemplate ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_descriptorUpdateTemplate = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_descriptorUpdateTemplate, rhs.m_descriptorUpdateTemplate ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate m_descriptorUpdateTemplate = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DeviceMemory - { - public: - using CType = VkDeviceMemory; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; - - public: - DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkAllocateMemory( static_cast( *device ), - reinterpret_cast( &allocateInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_memory ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkAllocateMemory" ); - } - } - - DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDeviceMemory memory, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_memory( memory ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - DeviceMemory( std::nullptr_t ) {} - - ~DeviceMemory() - { - clear(); - } - - DeviceMemory() = delete; - DeviceMemory( DeviceMemory const & ) = delete; - DeviceMemory( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_memory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_memory, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DeviceMemory & operator=( DeviceMemory const & ) = delete; - DeviceMemory & operator =( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_memory = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_memory, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DeviceMemory const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_memory; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_memory ) - { - getDispatcher()->vkFreeMemory( - static_cast( m_device ), static_cast( m_memory ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_memory = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_memory, rhs.m_memory ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD void * mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - void unmapMemory() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getCommitment() const VULKAN_HPP_NOEXCEPT; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - - VULKAN_HPP_NODISCARD HANDLE getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType ) const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_pageable_device_local_memory === - - void setPriorityEXT( float priority ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory m_memory = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class DisplayKHR - { - public: - using CType = VkDisplayKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; - - public: - DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, int32_t drmFd, uint32_t connectorId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetDrmDisplayEXT( - static_cast( *physicalDevice ), drmFd, connectorId, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkGetDrmDisplayEXT" ); - } - } - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, Display & dpy, RROutput rrOutput ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetRandROutputDisplayEXT( - static_cast( *physicalDevice ), &dpy, rrOutput, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkGetRandROutputDisplayEXT" ); - } - } -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t deviceRelativeId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetWinrtDisplayNV( - static_cast( *physicalDevice ), deviceRelativeId, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkGetWinrtDisplayNV" ); - } - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDisplayKHR display ) - : m_physicalDevice( *physicalDevice ), m_display( display ), m_dispatcher( physicalDevice.getDispatcher() ) - { - } - - DisplayKHR( std::nullptr_t ) {} - - ~DisplayKHR() - { - clear(); - } - - DisplayKHR() = delete; - DisplayKHR( DisplayKHR const & ) = delete; - DisplayKHR( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) - , m_display( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_display, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DisplayKHR & operator=( DisplayKHR const & ) = delete; - DisplayKHR & operator =( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); - m_display = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_display, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DisplayKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_display; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_display ) - { - getDispatcher()->vkReleaseDisplayEXT( static_cast( m_physicalDevice ), static_cast( m_display ) ); - } - m_physicalDevice = nullptr; - m_display = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::PhysicalDevice getPhysicalDevice() const - { - return m_physicalDevice; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_physicalDevice, rhs.m_physicalDevice ); - std::swap( m_display, rhs.m_display ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_display === - - VULKAN_HPP_NODISCARD std::vector getModeProperties() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - - //=== VK_KHR_get_display_properties2 === - - VULKAN_HPP_NODISCARD std::vector getModeProperties2() const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - - void acquireWinrtNV() const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - private: - VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; - VULKAN_HPP_NAMESPACE::DisplayKHR m_display = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class DisplayKHRs : public std::vector - { - public: - DisplayKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t planeIndex ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = physicalDevice.getDispatcher(); - std::vector displays; - uint32_t displayCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( *physicalDevice ), planeIndex, &displayCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast( dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( - static_cast( *physicalDevice ), planeIndex, &displayCount, displays.data() ) ); - } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); - this->reserve( displayCount ); - for ( auto const & displayKHR : displays ) - { - this->emplace_back( physicalDevice, displayKHR ); - } - } - else - { - throwResultException( result, "vkGetDisplayPlaneSupportedDisplaysKHR" ); - } - } - - DisplayKHRs( std::nullptr_t ) {} - - DisplayKHRs() = delete; - DisplayKHRs( DisplayKHRs const & ) = delete; - DisplayKHRs( DisplayKHRs && rhs ) = default; - DisplayKHRs & operator=( DisplayKHRs const & ) = delete; - DisplayKHRs & operator=( DisplayKHRs && rhs ) = default; - }; - - class DisplayModeKHR - { - public: - using CType = VkDisplayModeKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; - - public: - DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, - VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_physicalDevice( display.getPhysicalDevice() ), m_dispatcher( display.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( display.getDispatcher()->vkCreateDisplayModeKHR( - static_cast( display.getPhysicalDevice() ), - static_cast( *display ), - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &m_displayModeKHR ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDisplayModeKHR" ); - } - } - - DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VkDisplayModeKHR displayModeKHR ) - : m_physicalDevice( display.getPhysicalDevice() ), m_displayModeKHR( displayModeKHR ), m_dispatcher( display.getDispatcher() ) - { - } - - DisplayModeKHR( std::nullptr_t ) {} - - ~DisplayModeKHR() - { - clear(); - } - - DisplayModeKHR() = delete; - DisplayModeKHR( DisplayModeKHR const & rhs ) : m_displayModeKHR( rhs.m_displayModeKHR ), m_dispatcher( rhs.m_dispatcher ) {} - DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) - , m_displayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - DisplayModeKHR & operator=( DisplayModeKHR const & rhs ) - { - m_displayModeKHR = rhs.m_displayModeKHR; - m_dispatcher = rhs.m_dispatcher; - return *this; - } - DisplayModeKHR & operator=( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); - m_displayModeKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::DisplayModeKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_displayModeKHR; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - m_physicalDevice = nullptr; - m_displayModeKHR = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_physicalDevice, rhs.m_physicalDevice ); - std::swap( m_displayModeKHR, rhs.m_displayModeKHR ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_display === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR getDisplayPlaneCapabilities( uint32_t planeIndex ) const; - - private: - VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; - VULKAN_HPP_NAMESPACE::DisplayModeKHR m_displayModeKHR = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class Event - { - public: - using CType = VkEvent; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; - - public: - Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateEvent( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_event ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateEvent" ); - } - } - - Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkEvent event, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_event( event ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Event( std::nullptr_t ) {} - - ~Event() - { - clear(); - } - - Event() = delete; - Event( Event const & ) = delete; - Event( Event && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Event & operator=( Event const & ) = delete; - Event & operator =( Event && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_event = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Event const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_event; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_event ) - { - getDispatcher()->vkDestroyEvent( - static_cast( m_device ), static_cast( m_event ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_event = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_event, rhs.m_event ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; - - void set() const; - - void reset() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Event m_event = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Fence - { - public: - using CType = VkFence; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; - - public: - Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateFence( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateFence" ); - } - } - - Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDeviceEventEXT( static_cast( *device ), - reinterpret_cast( &deviceEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkRegisterDeviceEventEXT" ); - } - } - - Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, - VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDisplayEventEXT( static_cast( *device ), - static_cast( *display ), - reinterpret_cast( &displayEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkRegisterDisplayEventEXT" ); - } - } - - Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkFence fence, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_fence( fence ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Fence( std::nullptr_t ) {} - - ~Fence() - { - clear(); - } - - Fence() = delete; - Fence( Fence const & ) = delete; - Fence( Fence && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Fence & operator=( Fence const & ) = delete; - Fence & operator =( Fence && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_fence = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Fence const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_fence; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_fence ) - { - getDispatcher()->vkDestroyFence( - static_cast( m_device ), static_cast( m_fence ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_fence = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_fence, rhs.m_fence ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Fence m_fence = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Framebuffer - { - public: - using CType = VkFramebuffer; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; - - public: - Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateFramebuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_framebuffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateFramebuffer" ); - } - } - - Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkFramebuffer framebuffer, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_framebuffer( framebuffer ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Framebuffer( std::nullptr_t ) {} - - ~Framebuffer() - { - clear(); - } - - Framebuffer() = delete; - Framebuffer( Framebuffer const & ) = delete; - Framebuffer( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Framebuffer & operator=( Framebuffer const & ) = delete; - Framebuffer & operator =( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_framebuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Framebuffer const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_framebuffer; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_framebuffer ) - { - getDispatcher()->vkDestroyFramebuffer( - static_cast( m_device ), static_cast( m_framebuffer ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_framebuffer = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_framebuffer, rhs.m_framebuffer ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_QCOM_tile_properties === - - VULKAN_HPP_NODISCARD std::vector getTilePropertiesQCOM() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Framebuffer m_framebuffer = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Image - { - public: - using CType = VkImage; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; - - public: - Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImage( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_image ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateImage" ); - } - } - - Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkImage image, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_image( image ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Image( std::nullptr_t ) {} - - ~Image() - { - clear(); - } - - Image() = delete; - Image( Image const & ) = delete; - Image( Image && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Image & operator=( Image const & ) = delete; - Image & operator =( Image && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_image = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Image const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_image; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_image ) - { - getDispatcher()->vkDestroyImage( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_image = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_image, rhs.m_image ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT; - - VULKAN_HPP_NODISCARD std::vector getSparseMemoryRequirements() const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout - getSubresourceLayout( const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_image_drm_format_modifier === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT getDrmFormatModifierPropertiesEXT() const; - - //=== VK_EXT_image_compression_control === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT - getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource ) const VULKAN_HPP_NOEXCEPT; - - template - VULKAN_HPP_NODISCARD StructureChain - getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Image m_image = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class ImageView - { - public: - using CType = VkImageView; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; - - public: - ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImageView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_imageView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateImageView" ); - } - } - - ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkImageView imageView, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_imageView( imageView ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - ImageView( std::nullptr_t ) {} - - ~ImageView() - { - clear(); - } - - ImageView() = delete; - ImageView( ImageView const & ) = delete; - ImageView( ImageView && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_imageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - ImageView & operator=( ImageView const & ) = delete; - ImageView & operator =( ImageView && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_imageView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::ImageView const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_imageView; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_imageView ) - { - getDispatcher()->vkDestroyImageView( - static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_imageView = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_imageView, rhs.m_imageView ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_NVX_image_view_handle === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::ImageView m_imageView = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class IndirectCommandsLayoutNV - { - public: - using CType = VkIndirectCommandsLayoutNV; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateIndirectCommandsLayoutNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_indirectCommandsLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateIndirectCommandsLayoutNV" ); - } - } - - IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkIndirectCommandsLayoutNV indirectCommandsLayout, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_indirectCommandsLayout( indirectCommandsLayout ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - IndirectCommandsLayoutNV( std::nullptr_t ) {} - - ~IndirectCommandsLayoutNV() - { - clear(); - } - - IndirectCommandsLayoutNV() = delete; - IndirectCommandsLayoutNV( IndirectCommandsLayoutNV const & ) = delete; - IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_indirectCommandsLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayout, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV const & ) = delete; - IndirectCommandsLayoutNV & operator =( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_indirectCommandsLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayout, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_indirectCommandsLayout; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_indirectCommandsLayout ) - { - getDispatcher()->vkDestroyIndirectCommandsLayoutNV( static_cast( m_device ), - static_cast( m_indirectCommandsLayout ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_indirectCommandsLayout = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV m_indirectCommandsLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class PerformanceConfigurationINTEL - { - public: - using CType = VkPerformanceConfigurationINTEL; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) - : m_device( *device ), m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkAcquirePerformanceConfigurationINTEL( static_cast( *device ), - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &m_configuration ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkAcquirePerformanceConfigurationINTEL" ); - } - } - - PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPerformanceConfigurationINTEL configuration ) - : m_device( *device ), m_configuration( configuration ), m_dispatcher( device.getDispatcher() ) - { - } - - PerformanceConfigurationINTEL( std::nullptr_t ) {} - - ~PerformanceConfigurationINTEL() - { - clear(); - } - - PerformanceConfigurationINTEL() = delete; - PerformanceConfigurationINTEL( PerformanceConfigurationINTEL const & ) = delete; - PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_configuration( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_configuration, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL const & ) = delete; - PerformanceConfigurationINTEL & operator =( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_configuration = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_configuration, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_configuration; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_configuration ) - { - getDispatcher()->vkReleasePerformanceConfigurationINTEL( static_cast( m_device ), - static_cast( m_configuration ) ); - } - m_device = nullptr; - m_configuration = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_configuration, rhs.m_configuration ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL m_configuration = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class PipelineCache - { - public: - using CType = VkPipelineCache; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; - - public: - PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineCache( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineCache ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreatePipelineCache" ); - } - } - - PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkPipelineCache pipelineCache, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_pipelineCache( pipelineCache ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - PipelineCache( std::nullptr_t ) {} - - ~PipelineCache() - { - clear(); - } - - PipelineCache() = delete; - PipelineCache( PipelineCache const & ) = delete; - PipelineCache( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_pipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - PipelineCache & operator=( PipelineCache const & ) = delete; - PipelineCache & operator =( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_pipelineCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::PipelineCache const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineCache; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_pipelineCache ) - { - getDispatcher()->vkDestroyPipelineCache( static_cast( m_device ), - static_cast( m_pipelineCache ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_pipelineCache = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_pipelineCache, rhs.m_pipelineCache ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD std::vector getData() const; - - void merge( ArrayProxy const & srcCaches ) const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::PipelineCache m_pipelineCache = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Pipeline - { - public: - using CType = VkPipeline; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; - - public: - Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateComputePipelines( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - throwResultException( m_constructorSuccessCode, "vkCreateComputePipelines" ); - } - } - - Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateGraphicsPipelines( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - throwResultException( m_constructorSuccessCode, "vkCreateGraphicsPipelines" ); - } - } - - Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateRayTracingPipelinesKHR( static_cast( *device ), - deferredOperation ? static_cast( **deferredOperation ) : 0, - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - throwResultException( m_constructorSuccessCode, "vkCreateRayTracingPipelinesKHR" ); - } - } - - Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateRayTracingPipelinesNV( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - throwResultException( m_constructorSuccessCode, "vkCreateRayTracingPipelinesNV" ); - } - } - - Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkPipeline pipeline, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr, - VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess ) - : m_device( *device ) - , m_pipeline( pipeline ) - , m_allocator( static_cast( allocator ) ) - , m_constructorSuccessCode( successCode ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Pipeline( std::nullptr_t ) {} - - ~Pipeline() - { - clear(); - } - - Pipeline() = delete; - Pipeline( Pipeline const & ) = delete; - Pipeline( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Pipeline & operator=( Pipeline const & ) = delete; - Pipeline & operator =( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_pipeline = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Pipeline const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_pipeline; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_pipeline ) - { - getDispatcher()->vkDestroyPipeline( - static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_pipeline = nullptr; - m_allocator = nullptr; - m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const - { - return m_constructorSuccessCode; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_pipeline, rhs.m_pipeline ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_AMD_shader_info === - - VULKAN_HPP_NODISCARD std::vector getShaderInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType ) const; - - //=== VK_NV_ray_tracing === - - template - VULKAN_HPP_NODISCARD std::vector getRayTracingShaderGroupHandlesNV( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; - - template - VULKAN_HPP_NODISCARD DataType getRayTracingShaderGroupHandleNV( uint32_t firstGroup, uint32_t groupCount ) const; - - void compileDeferredNV( uint32_t shader ) const; - - //=== VK_KHR_ray_tracing_pipeline === - - template - VULKAN_HPP_NODISCARD std::vector getRayTracingShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; - - template - VULKAN_HPP_NODISCARD DataType getRayTracingShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const; - - template - VULKAN_HPP_NODISCARD std::vector - getRayTracingCaptureReplayShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; - - template - VULKAN_HPP_NODISCARD DataType getRayTracingCaptureReplayShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const; - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize - getRayTracingShaderGroupStackSizeKHR( uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Pipeline m_pipeline = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Pipelines : public std::vector - { - public: - Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateComputePipelines( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - throwResultException( result, "vkCreateComputePipelines" ); - } - } - - Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateGraphicsPipelines( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - throwResultException( result, "vkCreateGraphicsPipelines" ); - } - } - - Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateRayTracingPipelinesKHR( - static_cast( *device ), - deferredOperation ? static_cast( **deferredOperation ) : 0, - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) || - ( result == VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - throwResultException( result, "vkCreateRayTracingPipelinesKHR" ); - } - } - - Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateRayTracingPipelinesNV( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - throwResultException( result, "vkCreateRayTracingPipelinesNV" ); - } - } - - Pipelines( std::nullptr_t ) {} - - Pipelines() = delete; - Pipelines( Pipelines const & ) = delete; - Pipelines( Pipelines && rhs ) = default; - Pipelines & operator=( Pipelines const & ) = delete; - Pipelines & operator=( Pipelines && rhs ) = default; - }; - - class PipelineLayout - { - public: - using CType = VkPipelineLayout; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; - - public: - PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreatePipelineLayout" ); - } - } - - PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkPipelineLayout pipelineLayout, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_pipelineLayout( pipelineLayout ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - PipelineLayout( std::nullptr_t ) {} - - ~PipelineLayout() - { - clear(); - } - - PipelineLayout() = delete; - PipelineLayout( PipelineLayout const & ) = delete; - PipelineLayout( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_pipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - PipelineLayout & operator=( PipelineLayout const & ) = delete; - PipelineLayout & operator =( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_pipelineLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::PipelineLayout const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_pipelineLayout; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_pipelineLayout ) - { - getDispatcher()->vkDestroyPipelineLayout( static_cast( m_device ), - static_cast( m_pipelineLayout ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_pipelineLayout = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_pipelineLayout, rhs.m_pipelineLayout ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout m_pipelineLayout = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class PrivateDataSlot - { - public: - using CType = VkPrivateDataSlot; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePrivateDataSlot( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_privateDataSlot ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreatePrivateDataSlot" ); - } - } - - PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkPrivateDataSlot privateDataSlot, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_privateDataSlot( privateDataSlot ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - PrivateDataSlot( std::nullptr_t ) {} - - ~PrivateDataSlot() - { - clear(); - } - - PrivateDataSlot() = delete; - PrivateDataSlot( PrivateDataSlot const & ) = delete; - PrivateDataSlot( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_privateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - PrivateDataSlot & operator=( PrivateDataSlot const & ) = delete; - PrivateDataSlot & operator =( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_privateDataSlot = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::PrivateDataSlot const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_privateDataSlot; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_privateDataSlot ) - { - getDispatcher()->vkDestroyPrivateDataSlot( static_cast( m_device ), - static_cast( m_privateDataSlot ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_privateDataSlot = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_privateDataSlot, rhs.m_privateDataSlot ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::PrivateDataSlot m_privateDataSlot = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class QueryPool - { - public: - using CType = VkQueryPool; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; - - public: - QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateQueryPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_queryPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateQueryPool" ); - } - } - - QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkQueryPool queryPool, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_queryPool( queryPool ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - QueryPool( std::nullptr_t ) {} - - ~QueryPool() - { - clear(); - } - - QueryPool() = delete; - QueryPool( QueryPool const & ) = delete; - QueryPool( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_queryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - QueryPool & operator=( QueryPool const & ) = delete; - QueryPool & operator =( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_queryPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::QueryPool const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_queryPool; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_queryPool ) - { - getDispatcher()->vkDestroyQueryPool( - static_cast( m_device ), static_cast( m_queryPool ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_queryPool = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_queryPool, rhs.m_queryPool ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - template - VULKAN_HPP_NODISCARD std::pair> - getResults( uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - template - VULKAN_HPP_NODISCARD std::pair - getResult( uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_VERSION_1_2 === - - void reset( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_EXT_host_query_reset === - - void resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::QueryPool m_queryPool = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Queue - { - public: - using CType = VkQueue; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; - - public: - Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, uint32_t queueFamilyIndex, uint32_t queueIndex ) - : m_dispatcher( device.getDispatcher() ) - { - getDispatcher()->vkGetDeviceQueue( static_cast( *device ), queueFamilyIndex, queueIndex, reinterpret_cast( &m_queue ) ); - } - - Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) - : m_dispatcher( device.getDispatcher() ) - { - getDispatcher()->vkGetDeviceQueue2( - static_cast( *device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &m_queue ) ); - } - - Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueue queue ) : m_queue( queue ), m_dispatcher( device.getDispatcher() ) - { - } - - Queue( std::nullptr_t ) {} - - ~Queue() - { - clear(); - } - - Queue() = delete; - Queue( Queue const & rhs ) : m_queue( rhs.m_queue ), m_dispatcher( rhs.m_dispatcher ) {} - Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT - : m_queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Queue & operator=( Queue const & rhs ) - { - m_queue = rhs.m_queue; - m_dispatcher = rhs.m_dispatcher; - return *this; - } - Queue & operator=( Queue && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - m_queue = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Queue const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_queue; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - m_queue = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_queue, rhs.m_queue ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - void submit( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - void waitIdle() const; - - void bindSparse( ArrayProxy const & bindInfo, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_VERSION_1_3 === - - void submit2( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_KHR_swapchain === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const; - - //=== VK_EXT_debug_utils === - - void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; - - void endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT; - - void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_NV_device_diagnostic_checkpoints === - - VULKAN_HPP_NODISCARD std::vector getCheckpointDataNV() const; - - //=== VK_INTEL_performance_query === - - void setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration ) const; - - //=== VK_KHR_synchronization2 === - - void submit2KHR( ArrayProxy const & submits, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV() const; - - private: - VULKAN_HPP_NAMESPACE::Queue m_queue = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class RenderPass - { - public: - using CType = VkRenderPass; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; - - public: - RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateRenderPass" ); - } - } - - RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass2( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateRenderPass2" ); - } - } - - RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkRenderPass renderPass, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_renderPass( renderPass ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - RenderPass( std::nullptr_t ) {} - - ~RenderPass() - { - clear(); - } - - RenderPass() = delete; - RenderPass( RenderPass const & ) = delete; - RenderPass( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_renderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - RenderPass & operator=( RenderPass const & ) = delete; - RenderPass & operator =( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_renderPass = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::RenderPass const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_renderPass; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_renderPass ) - { - getDispatcher()->vkDestroyRenderPass( - static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_renderPass = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_renderPass, rhs.m_renderPass ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT; - - //=== VK_HUAWEI_subpass_shading === - - VULKAN_HPP_NODISCARD std::pair getSubpassShadingMaxWorkgroupSizeHUAWEI() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::RenderPass m_renderPass = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Sampler - { - public: - using CType = VkSampler; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; - - public: - Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSampler( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_sampler ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateSampler" ); - } - } - - Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkSampler sampler, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_sampler( sampler ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Sampler( std::nullptr_t ) {} - - ~Sampler() - { - clear(); - } - - Sampler() = delete; - Sampler( Sampler const & ) = delete; - Sampler( Sampler && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Sampler & operator=( Sampler const & ) = delete; - Sampler & operator =( Sampler && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_sampler = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Sampler const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_sampler; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_sampler ) - { - getDispatcher()->vkDestroySampler( - static_cast( m_device ), static_cast( m_sampler ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_sampler = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_sampler, rhs.m_sampler ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Sampler m_sampler = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class SamplerYcbcrConversion - { - public: - using CType = VkSamplerYcbcrConversion; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; - - public: - SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSamplerYcbcrConversion( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_ycbcrConversion ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateSamplerYcbcrConversion" ); - } - } - - SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkSamplerYcbcrConversion ycbcrConversion, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_ycbcrConversion( ycbcrConversion ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - SamplerYcbcrConversion( std::nullptr_t ) {} - - ~SamplerYcbcrConversion() - { - clear(); - } - - SamplerYcbcrConversion() = delete; - SamplerYcbcrConversion( SamplerYcbcrConversion const & ) = delete; - SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_ycbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_ycbcrConversion, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - SamplerYcbcrConversion & operator=( SamplerYcbcrConversion const & ) = delete; - SamplerYcbcrConversion & operator =( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_ycbcrConversion = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_ycbcrConversion, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_ycbcrConversion; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_ycbcrConversion ) - { - getDispatcher()->vkDestroySamplerYcbcrConversion( static_cast( m_device ), - static_cast( m_ycbcrConversion ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_ycbcrConversion = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_ycbcrConversion, rhs.m_ycbcrConversion ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion m_ycbcrConversion = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class Semaphore - { - public: - using CType = VkSemaphore; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; - - public: - Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSemaphore( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_semaphore ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateSemaphore" ); - } - } - - Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkSemaphore semaphore, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_semaphore( semaphore ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - Semaphore( std::nullptr_t ) {} - - ~Semaphore() - { - clear(); - } - - Semaphore() = delete; - Semaphore( Semaphore const & ) = delete; - Semaphore( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - Semaphore & operator=( Semaphore const & ) = delete; - Semaphore & operator =( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_semaphore = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::Semaphore const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_semaphore; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_semaphore ) - { - getDispatcher()->vkDestroySemaphore( - static_cast( m_device ), static_cast( m_semaphore ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_semaphore = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_semaphore, rhs.m_semaphore ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_VERSION_1_2 === - - VULKAN_HPP_NODISCARD uint64_t getCounterValue() const; - - //=== VK_KHR_timeline_semaphore === - - VULKAN_HPP_NODISCARD uint64_t getCounterValueKHR() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::Semaphore m_semaphore = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class ShaderModule - { - public: - using CType = VkShaderModule; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; - - public: - ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateShaderModule( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_shaderModule ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateShaderModule" ); - } - } - - ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkShaderModule shaderModule, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_shaderModule( shaderModule ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - ShaderModule( std::nullptr_t ) {} - - ~ShaderModule() - { - clear(); - } - - ShaderModule() = delete; - ShaderModule( ShaderModule const & ) = delete; - ShaderModule( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_shaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - ShaderModule & operator=( ShaderModule const & ) = delete; - ShaderModule & operator =( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_shaderModule = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::ShaderModule const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_shaderModule; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_shaderModule ) - { - getDispatcher()->vkDestroyShaderModule( - static_cast( m_device ), static_cast( m_shaderModule ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_shaderModule = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderModule & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_shaderModule, rhs.m_shaderModule ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_EXT_shader_module_identifier === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT getIdentifierEXT() const VULKAN_HPP_NOEXCEPT; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::ShaderModule m_shaderModule = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class SurfaceKHR - { - public: - using CType = VkSurfaceKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; - - public: -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateAndroidSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateAndroidSurfaceKHR" ); - } - } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDirectFBSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDirectFBSurfaceEXT" ); - } - } -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateDisplayPlaneSurfaceKHR" ); - } - } - - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateHeadlessSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateHeadlessSurfaceEXT" ); - } - } - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateIOSSurfaceMVK( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateIOSSurfaceMVK" ); - } - } -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateImagePipeSurfaceFUCHSIA" ); - } - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateMacOSSurfaceMVK( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateMacOSSurfaceMVK" ); - } - } -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateMetalSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateMetalSurfaceEXT" ); - } - } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateScreenSurfaceQNX( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateScreenSurfaceQNX" ); - } - } -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - -# if defined( VK_USE_PLATFORM_GGP ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateStreamDescriptorSurfaceGGP" ); - } - } -# endif /*VK_USE_PLATFORM_GGP*/ - -# if defined( VK_USE_PLATFORM_VI_NN ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateViSurfaceNN( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateViSurfaceNN" ); - } - } -# endif /*VK_USE_PLATFORM_VI_NN*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateWaylandSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateWaylandSurfaceKHR" ); - } - } -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateWin32SurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateWin32SurfaceKHR" ); - } - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateXcbSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateXcbSurfaceKHR" ); - } - } -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateXlibSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateXlibSurfaceKHR" ); - } - } -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - - SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, - VkSurfaceKHR surface, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_surface( surface ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) - { - } - - SurfaceKHR( std::nullptr_t ) {} - - ~SurfaceKHR() - { - clear(); - } - - SurfaceKHR() = delete; - SurfaceKHR( SurfaceKHR const & ) = delete; - SurfaceKHR( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) - , m_surface( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surface, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - SurfaceKHR & operator=( SurfaceKHR const & ) = delete; - SurfaceKHR & operator =( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); - m_surface = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surface, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::SurfaceKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_surface; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_surface ) - { - getDispatcher()->vkDestroySurfaceKHR( - static_cast( m_instance ), static_cast( m_surface ), reinterpret_cast( m_allocator ) ); - } - m_instance = nullptr; - m_surface = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Instance getInstance() const - { - return m_instance; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_instance, rhs.m_instance ); - std::swap( m_surface, rhs.m_surface ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - private: - VULKAN_HPP_NAMESPACE::Instance m_instance = {}; - VULKAN_HPP_NAMESPACE::SurfaceKHR m_surface = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; - }; - - class SwapchainKHR - { - public: - using CType = VkSwapchainKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; - - public: - SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSwapchainKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_swapchain ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateSwapchainKHR" ); - } - } - - SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkSwapchainKHR swapchain, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_swapchain( swapchain ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - SwapchainKHR( std::nullptr_t ) {} - - ~SwapchainKHR() - { - clear(); - } - - SwapchainKHR() = delete; - SwapchainKHR( SwapchainKHR const & ) = delete; - SwapchainKHR( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_swapchain( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchain, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - SwapchainKHR & operator=( SwapchainKHR const & ) = delete; - SwapchainKHR & operator =( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_swapchain = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchain, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::SwapchainKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_swapchain; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_swapchain ) - { - getDispatcher()->vkDestroySwapchainKHR( - static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_swapchain = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_swapchain, rhs.m_swapchain ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_swapchain === - - VULKAN_HPP_NODISCARD std::vector getImages() const; - - VULKAN_HPP_NODISCARD std::pair - acquireNextImage( uint64_t timeout, - VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, - VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; - - //=== VK_EXT_display_control === - - VULKAN_HPP_NODISCARD uint64_t getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const; - - //=== VK_GOOGLE_display_timing === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE getRefreshCycleDurationGOOGLE() const; - - VULKAN_HPP_NODISCARD std::vector getPastPresentationTimingGOOGLE() const; - - //=== VK_KHR_shared_presentable_image === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; - - //=== VK_AMD_display_native_hdr === - - void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT; - - //=== VK_KHR_present_wait === - - VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForPresent( uint64_t presentId, uint64_t timeout ) const; - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - void acquireFullScreenExclusiveModeEXT() const; - - void releaseFullScreenExclusiveModeEXT() const; -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::SwapchainKHR m_swapchain = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - - class SwapchainKHRs : public std::vector - { - public: - SwapchainKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector swapchains( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateSharedSwapchainsKHR( - static_cast( *device ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - swapchains.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( createInfos.size() ); - for ( auto const & swapchainKHR : swapchains ) - { - this->emplace_back( device, swapchainKHR, allocator ); - } - } - else - { - throwResultException( result, "vkCreateSharedSwapchainsKHR" ); - } - } - - SwapchainKHRs( std::nullptr_t ) {} - - SwapchainKHRs() = delete; - SwapchainKHRs( SwapchainKHRs const & ) = delete; - SwapchainKHRs( SwapchainKHRs && rhs ) = default; - SwapchainKHRs & operator=( SwapchainKHRs const & ) = delete; - SwapchainKHRs & operator=( SwapchainKHRs && rhs ) = default; - }; - - class ValidationCacheEXT - { - public: - using CType = VkValidationCacheEXT; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; - - public: - ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateValidationCacheEXT( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_validationCache ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateValidationCacheEXT" ); - } - } - - ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkValidationCacheEXT validationCache, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_validationCache( validationCache ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - ValidationCacheEXT( std::nullptr_t ) {} - - ~ValidationCacheEXT() - { - clear(); - } - - ValidationCacheEXT() = delete; - ValidationCacheEXT( ValidationCacheEXT const & ) = delete; - ValidationCacheEXT( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_validationCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCache, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - ValidationCacheEXT & operator=( ValidationCacheEXT const & ) = delete; - ValidationCacheEXT & operator =( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_validationCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCache, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_validationCache; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_validationCache ) - { - getDispatcher()->vkDestroyValidationCacheEXT( static_cast( m_device ), - static_cast( m_validationCache ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_validationCache = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_validationCache, rhs.m_validationCache ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_EXT_validation_cache === - - void merge( ArrayProxy const & srcCaches ) const; - - VULKAN_HPP_NODISCARD std::vector getData() const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::ValidationCacheEXT m_validationCache = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoSessionKHR - { - public: - using CType = VkVideoSessionKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateVideoSessionKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_videoSession ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateVideoSessionKHR" ); - } - } - - VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkVideoSessionKHR videoSession, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_videoSession( videoSession ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - VideoSessionKHR( std::nullptr_t ) {} - - ~VideoSessionKHR() - { - clear(); - } - - VideoSessionKHR() = delete; - VideoSessionKHR( VideoSessionKHR const & ) = delete; - VideoSessionKHR( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_videoSession( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSession, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - VideoSessionKHR & operator=( VideoSessionKHR const & ) = delete; - VideoSessionKHR & operator =( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_videoSession = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSession, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::VideoSessionKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_videoSession; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_videoSession ) - { - getDispatcher()->vkDestroyVideoSessionKHR( static_cast( m_device ), - static_cast( m_videoSession ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_videoSession = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_videoSession, rhs.m_videoSession ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_video_queue === - - VULKAN_HPP_NODISCARD std::vector getMemoryRequirements() const; - - void bindMemory( ArrayProxy const & bindSessionMemoryInfos ) const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::VideoSessionKHR m_videoSession = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - class VideoSessionParametersKHR - { - public: - using CType = VkVideoSessionParametersKHR; - - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR; - static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - - public: - VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateVideoSessionParametersKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_videoSessionParameters ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, "vkCreateVideoSessionParametersKHR" ); - } - } - - VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkVideoSessionParametersKHR videoSessionParameters, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_videoSessionParameters( videoSessionParameters ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) - { - } - - VideoSessionParametersKHR( std::nullptr_t ) {} - - ~VideoSessionParametersKHR() - { - clear(); - } - - VideoSessionParametersKHR() = delete; - VideoSessionParametersKHR( VideoSessionParametersKHR const & ) = delete; - VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) - , m_videoSessionParameters( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParameters, {} ) ) - , m_allocator( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ) ) - , m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) - { - } - VideoSessionParametersKHR & operator=( VideoSessionParametersKHR const & ) = delete; - VideoSessionParametersKHR & operator =( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT - { - if ( this != &rhs ) - { - clear(); - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_videoSessionParameters = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParameters, {} ); - m_allocator = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_allocator, {} ); - m_dispatcher = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ); - } - return *this; - } - - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & operator*() const VULKAN_HPP_NOEXCEPT - { - return m_videoSessionParameters; - } - - void clear() VULKAN_HPP_NOEXCEPT - { - if ( m_videoSessionParameters ) - { - getDispatcher()->vkDestroyVideoSessionParametersKHR( static_cast( m_device ), - static_cast( m_videoSessionParameters ), - reinterpret_cast( m_allocator ) ); - } - m_device = nullptr; - m_videoSessionParameters = nullptr; - m_allocator = nullptr; - m_dispatcher = nullptr; - } - - VULKAN_HPP_NAMESPACE::Device getDevice() const - { - return m_device; - } - - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const - { - VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); - return m_dispatcher; - } - - void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR & rhs ) VULKAN_HPP_NOEXCEPT - { - std::swap( m_device, rhs.m_device ); - std::swap( m_videoSessionParameters, rhs.m_videoSessionParameters ); - std::swap( m_allocator, rhs.m_allocator ); - std::swap( m_dispatcher, rhs.m_dispatcher ); - } - - //=== VK_KHR_video_queue === - - void update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const; - - private: - VULKAN_HPP_NAMESPACE::Device m_device = {}; - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR m_videoSessionParameters = {}; - const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; - }; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=========================== - //=== COMMAND Definitions === - //=========================== - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Instance - Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Instance( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDevices() const - { - return VULKAN_HPP_RAII_NAMESPACE::PhysicalDevices( *this ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features; - getDispatcher()->vkGetPhysicalDeviceFeatures( static_cast( m_physicalDevice ), - reinterpret_cast( &features ) ); - - return features; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties - PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::FormatProperties formatProperties; - getDispatcher()->vkGetPhysicalDeviceFormatProperties( - static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties - PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags ) const - { - VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); - - return imageFormatProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties PhysicalDevice::getProperties() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties; - getDispatcher()->vkGetPhysicalDeviceProperties( static_cast( m_physicalDevice ), - reinterpret_cast( &properties ) ); - - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast( m_physicalDevice ), - &queueFamilyPropertyCount, - reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties; - getDispatcher()->vkGetPhysicalDeviceMemoryProperties( static_cast( m_physicalDevice ), - reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT - { - PFN_vkVoidFunction result = getDispatcher()->vkGetInstanceProcAddr( static_cast( m_instance ), name.c_str() ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT - { - PFN_vkVoidFunction result = getDispatcher()->vkGetDeviceProcAddr( static_cast( m_device ), name.c_str() ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Device - PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Device( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Context::enumerateInstanceExtensionProperties( Optional layerName ) const - { - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName ) const - { - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( - static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), - layerName ? layerName->c_str() : nullptr, - &propertyCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Context::enumerateInstanceLayerProperties() const - { - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::enumerateDeviceLayerProperties() const - { - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateDeviceLayerProperties( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueFamilyIndex, queueIndex ); - } - - VULKAN_HPP_INLINE void Queue::submit( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const - { - VkResult result = getDispatcher()->vkQueueSubmit( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); - } - - VULKAN_HPP_INLINE void Queue::waitIdle() const - { - VkResult result = getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); - } - - VULKAN_HPP_INLINE void Device::waitIdle() const - { - VkResult result = getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, allocateInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DeviceMemory::mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - VULKAN_HPP_NAMESPACE::MemoryMapFlags flags ) const - { - void * pData; - VkResult result = getDispatcher()->vkMapMemory( static_cast( m_device ), - static_cast( m_memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); - - return pData; - } - - VULKAN_HPP_INLINE void DeviceMemory::unmapMemory() const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkUnmapMemory( static_cast( m_device ), static_cast( m_memory ) ); - } - - VULKAN_HPP_INLINE void Device::flushMappedMemoryRanges( ArrayProxy const & memoryRanges ) const - { - VkResult result = getDispatcher()->vkFlushMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); - } - - VULKAN_HPP_INLINE void Device::invalidateMappedMemoryRanges( ArrayProxy const & memoryRanges ) const - { - VkResult result = getDispatcher()->vkInvalidateMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DeviceMemory::getCommitment() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes; - getDispatcher()->vkGetDeviceMemoryCommitment( - static_cast( m_device ), static_cast( m_memory ), reinterpret_cast( &committedMemoryInBytes ) ); - - return committedMemoryInBytes; - } - - VULKAN_HPP_INLINE void Buffer::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const - { - VkResult result = getDispatcher()->vkBindBufferMemory( static_cast( m_device ), - static_cast( m_buffer ), - static_cast( memory ), - static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); - } - - VULKAN_HPP_INLINE void Image::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const - { - VkResult result = getDispatcher()->vkBindImageMemory( - static_cast( m_device ), static_cast( m_image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Buffer::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - getDispatcher()->vkGetBufferMemoryRequirements( - static_cast( m_device ), static_cast( m_buffer ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Image::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - getDispatcher()->vkGetImageMemoryRequirements( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Image::getSparseMemoryRequirements() const - { - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - getDispatcher()->vkGetImageSparseMemoryRequirements( - static_cast( m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - getDispatcher()->vkGetImageSparseMemoryRequirements( static_cast( m_device ), - static_cast( m_image ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageTiling tiling ) const - { - std::vector properties; - uint32_t propertyCount; - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - nullptr ); - properties.resize( propertyCount ); - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( samples ), - static_cast( usage ), - static_cast( tiling ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_INLINE void Queue::bindSparse( ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence ) const - { - VkResult result = getDispatcher()->vkQueueBindSparse( - static_cast( m_queue ), bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void Device::resetFences( ArrayProxy const & fences ) const - { - VkResult result = getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const - { - VkResult result = getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::waitForFences( ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const - { - VkResult result = getDispatcher()->vkWaitForFences( - static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Semaphore - Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Event - Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Event( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const - { - VkResult result = getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); - - return static_cast( result ); - } - - VULKAN_HPP_INLINE void Event::set() const - { - VkResult result = getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); - } - - VULKAN_HPP_INLINE void Event::reset() const - { - VkResult result = getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::QueryPool - Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, createInfo, allocator ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair> QueryPool::getResults( - uint32_t firstQuery, uint32_t queryCount, size_t dataSize, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const - { - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return std::make_pair( static_cast( result ), data ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair QueryPool::getResult( - uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const - { - DataType data; - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); - - return std::make_pair( static_cast( result ), data ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Buffer - Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::BufferView - Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Image - Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Image( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout - Image::getSubresourceLayout( const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::SubresourceLayout layout; - getDispatcher()->vkGetImageSubresourceLayout( static_cast( m_device ), - static_cast( m_image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return layout; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ImageView - Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ShaderModule - Device::createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::ShaderModule( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineCache - Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PipelineCache::getData() const - { - std::vector data; - size_t dataSize; - VkResult result; - do - { - result = - getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = getDispatcher()->vkGetPipelineCacheData( - static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return data; - } - - VULKAN_HPP_INLINE void PipelineCache::merge( ArrayProxy const & srcCaches ) const - { - VkResult result = getDispatcher()->vkMergePipelineCaches( static_cast( m_device ), - static_cast( m_pipelineCache ), - srcCaches.size(), - reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::merge" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelines( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createGraphicsPipeline( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createComputePipelines( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline - Device::createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Sampler - Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void DescriptorPool::reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkResetDescriptorPool( - static_cast( m_device ), static_cast( m_descriptorPool ), static_cast( flags ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSets( *this, allocateInfo ); - } - - VULKAN_HPP_INLINE void - Device::updateDescriptorSets( ArrayProxy const & descriptorWrites, - ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkUpdateDescriptorSets( static_cast( m_device ), - descriptorWrites.size(), - reinterpret_cast( descriptorWrites.data() ), - descriptorCopies.size(), - reinterpret_cast( descriptorCopies.data() ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Framebuffer - Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D RenderPass::getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::Extent2D granularity; - getDispatcher()->vkGetRenderAreaGranularity( - static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &granularity ) ); - - return granularity; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CommandPool - Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void CommandPool::reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags ) const - { - VkResult result = getDispatcher()->vkResetCommandPool( - static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const - { - return VULKAN_HPP_RAII_NAMESPACE::CommandBuffers( *this, allocateInfo ); - } - - VULKAN_HPP_INLINE void CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const - { - VkResult result = getDispatcher()->vkBeginCommandBuffer( static_cast( m_commandBuffer ), - reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::end() const - { - VkResult result = getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags ) const - { - VkResult result = - getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBindPipeline( - static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, - ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetViewport( - static_cast( m_commandBuffer ), firstViewport, viewports.size(), reinterpret_cast( viewports.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, - ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetScissor( - static_cast( m_commandBuffer ), firstScissor, scissors.size(), reinterpret_cast( scissors.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetLineWidth( static_cast( m_commandBuffer ), lineWidth ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthBias( static_cast( m_commandBuffer ), depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetBlendConstants( static_cast( m_commandBuffer ), blendConstants ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthBounds( static_cast( m_commandBuffer ), minDepthBounds, maxDepthBounds ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetStencilCompareMask( static_cast( m_commandBuffer ), static_cast( faceMask ), compareMask ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetStencilWriteMask( static_cast( m_commandBuffer ), static_cast( faceMask ), writeMask ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetStencilReference( static_cast( m_commandBuffer ), static_cast( faceMask ), reference ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t firstSet, - ArrayProxy const & descriptorSets, - ArrayProxy const & dynamicOffsets ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBindDescriptorSets( static_cast( m_commandBuffer ), - static_cast( pipelineBindPoint ), - static_cast( layout ), - firstSet, - descriptorSets.size(), - reinterpret_cast( descriptorSets.data() ), - dynamicOffsets.size(), - dynamicOffsets.data() ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBindIndexBuffer( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( indexType ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets ) const - { - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); - } - - getDispatcher()->vkCmdBindVertexBuffers( static_cast( m_commandBuffer ), - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDraw( static_cast( m_commandBuffer ), vertexCount, instanceCount, firstVertex, firstInstance ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( - uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDrawIndexed( static_cast( m_commandBuffer ), indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDrawIndirect( - static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDrawIndexedIndirect( - static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDispatch( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); - } - - VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDispatchIndirect( - static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyBuffer( static_cast( m_commandBuffer ), - static_cast( srcBuffer ), - static_cast( dstBuffer ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyImage( static_cast( m_commandBuffer ), - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions, - VULKAN_HPP_NAMESPACE::Filter filter ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBlitImage( static_cast( m_commandBuffer ), - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ), - static_cast( filter ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyBufferToImage( static_cast( m_commandBuffer ), - static_cast( srcBuffer ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyImageToBuffer( static_cast( m_commandBuffer ), - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstBuffer ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - ArrayProxy const & data ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdUpdateBuffer( static_cast( m_commandBuffer ), - static_cast( dstBuffer ), - static_cast( dstOffset ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize size, - uint32_t data ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdFillBuffer( static_cast( m_commandBuffer ), - static_cast( dstBuffer ), - static_cast( dstOffset ), - static_cast( size ), - data ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearColorValue & color, - ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdClearColorImage( static_cast( m_commandBuffer ), - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( &color ), - ranges.size(), - reinterpret_cast( ranges.data() ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, - const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, - ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdClearDepthStencilImage( static_cast( m_commandBuffer ), - static_cast( image ), - static_cast( imageLayout ), - reinterpret_cast( &depthStencil ), - ranges.size(), - reinterpret_cast( ranges.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy const & attachments, - ArrayProxy const & rects ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdClearAttachments( static_cast( m_commandBuffer ), - attachments.size(), - reinterpret_cast( attachments.data() ), - rects.size(), - reinterpret_cast( rects.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, - VULKAN_HPP_NAMESPACE::Image dstImage, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, - ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdResolveImage( static_cast( m_commandBuffer ), - static_cast( srcImage ), - static_cast( srcImageLayout ), - static_cast( dstImage ), - static_cast( dstImageLayout ), - regions.size(), - reinterpret_cast( regions.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetEvent( - static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdResetEvent( - static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::waitEvents( ArrayProxy const & events, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdWaitEvents( static_cast( m_commandBuffer ), - events.size(), - reinterpret_cast( events.data() ), - static_cast( srcStageMask ), - static_cast( dstStageMask ), - memoryBarriers.size(), - reinterpret_cast( memoryBarriers.data() ), - bufferMemoryBarriers.size(), - reinterpret_cast( bufferMemoryBarriers.data() ), - imageMemoryBarriers.size(), - reinterpret_cast( imageMemoryBarriers.data() ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, - ArrayProxy const & memoryBarriers, - ArrayProxy const & bufferMemoryBarriers, - ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdPipelineBarrier( static_cast( m_commandBuffer ), - static_cast( srcStageMask ), - static_cast( dstStageMask ), - static_cast( dependencyFlags ), - memoryBarriers.size(), - reinterpret_cast( memoryBarriers.data() ), - bufferMemoryBarriers.size(), - reinterpret_cast( bufferMemoryBarriers.data() ), - imageMemoryBarriers.size(), - reinterpret_cast( imageMemoryBarriers.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBeginQuery( - static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdEndQuery( static_cast( m_commandBuffer ), static_cast( queryPool ), query ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdResetQueryPool( static_cast( m_commandBuffer ), static_cast( queryPool ), firstQuery, queryCount ); - } - - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdWriteTimestamp( - static_cast( m_commandBuffer ), static_cast( pipelineStage ), static_cast( queryPool ), query ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - VULKAN_HPP_NAMESPACE::DeviceSize stride, - VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyQueryPoolResults( static_cast( m_commandBuffer ), - static_cast( queryPool ), - firstQuery, - queryCount, - static_cast( dstBuffer ), - static_cast( dstOffset ), - static_cast( stride ), - static_cast( flags ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, - uint32_t offset, - ArrayProxy const & values ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdPushConstants( static_cast( m_commandBuffer ), - static_cast( layout ), - static_cast( stageFlags ), - offset, - values.size() * sizeof( ValuesType ), - reinterpret_cast( values.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBeginRenderPass( static_cast( m_commandBuffer ), - reinterpret_cast( &renderPassBegin ), - static_cast( contents ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdNextSubpass( static_cast( m_commandBuffer ), static_cast( contents ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass() const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdEndRenderPass( static_cast( m_commandBuffer ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::executeCommands( ArrayProxy const & commandBuffers ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdExecuteCommands( - static_cast( m_commandBuffer ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); - } - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t Context::enumerateInstanceVersion() const - { - uint32_t apiVersion; - VkResult result = getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); - - return apiVersion; - } - - VULKAN_HPP_INLINE void Device::bindBufferMemory2( ArrayProxy const & bindInfos ) const - { - VkResult result = getDispatcher()->vkBindBufferMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); - } - - VULKAN_HPP_INLINE void Device::bindImageMemory2( ArrayProxy const & bindInfos ) const - { - VkResult result = getDispatcher()->vkBindImageMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; - getDispatcher()->vkGetDeviceGroupPeerMemoryFeatures( static_cast( m_device ), - heapIndex, - localDeviceIndex, - remoteDeviceIndex, - reinterpret_cast( &peerMemoryFeatures ) ); - - return peerMemoryFeatures; - } - - VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDeviceMask( static_cast( m_commandBuffer ), deviceMask ); - } - - VULKAN_HPP_INLINE void CommandBuffer::dispatchBase( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDispatchBase( - static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDeviceGroups() const - { - std::vector physicalDeviceGroupProperties; - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = - getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), - &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return physicalDeviceGroupProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetImageMemoryRequirements2( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetImageMemoryRequirements2( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetBufferMemoryRequirements2( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetBufferMemoryRequirements2( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const - { - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - getDispatcher()->vkGetImageSparseMemoryRequirements2( - static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - getDispatcher()->vkGetImageSparseMemoryRequirements2( static_cast( m_device ), - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; - getDispatcher()->vkGetPhysicalDeviceFeatures2( static_cast( m_physicalDevice ), - reinterpret_cast( &features ) ); - - return features; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2() const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceFeatures2( static_cast( m_physicalDevice ), - reinterpret_cast( &features ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; - getDispatcher()->vkGetPhysicalDeviceProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &properties ) ); - - return properties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2() const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &properties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; - getDispatcher()->vkGetPhysicalDeviceFormatProperties2( - static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceFormatProperties2( - static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties2 - PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const - { - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = - getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - - return imageFormatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = - getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), - &queueFamilyPropertyCount, - reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2() const - { - std::vector structureChains; - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), - &queueFamilyPropertyCount, - reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; - getDispatcher()->vkGetPhysicalDeviceMemoryProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getMemoryProperties2() const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = - structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceMemoryProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &memoryProperties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const - { - std::vector properties; - uint32_t propertyCount; - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &formatInfo ), - &propertyCount, - nullptr ); - properties.resize( propertyCount ); - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast( m_physicalDevice ), - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_INLINE void CommandPool::trim( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkTrimCommandPool( - static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueInfo ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - Device::createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, createInfo, allocator ); - } - - template - VULKAN_HPP_INLINE void DescriptorSet::updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkUpdateDescriptorSetWithTemplate( static_cast( m_device ), - static_cast( m_descriptorSet ), - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( &data ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties - PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; - getDispatcher()->vkGetPhysicalDeviceExternalBufferProperties( static_cast( m_physicalDevice ), - reinterpret_cast( &externalBufferInfo ), - reinterpret_cast( &externalBufferProperties ) ); - - return externalBufferProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties - PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; - getDispatcher()->vkGetPhysicalDeviceExternalFenceProperties( static_cast( m_physicalDevice ), - reinterpret_cast( &externalFenceInfo ), - reinterpret_cast( &externalFenceProperties ) ); - - return externalFenceProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( - const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; - getDispatcher()->vkGetPhysicalDeviceExternalSemaphoreProperties( - static_cast( m_physicalDevice ), - reinterpret_cast( &externalSemaphoreInfo ), - reinterpret_cast( &externalSemaphoreProperties ) ); - - return externalSemaphoreProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; - getDispatcher()->vkGetDescriptorSetLayoutSupport( static_cast( m_device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( &support ) ); - - return support; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); - getDispatcher()->vkGetDescriptorSetLayoutSupport( static_cast( m_device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( &support ) ); - - return structureChain; - } - - //=== VK_VERSION_1_2 === - - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDrawIndirectCount( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdDrawIndexedIndirectCount( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBeginRenderPass2( static_cast( m_commandBuffer ), - reinterpret_cast( &renderPassBegin ), - reinterpret_cast( &subpassBeginInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdNextSubpass2( static_cast( m_commandBuffer ), - reinterpret_cast( &subpassBeginInfo ), - reinterpret_cast( &subpassEndInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdEndRenderPass2( static_cast( m_commandBuffer ), reinterpret_cast( &subpassEndInfo ) ); - } - - VULKAN_HPP_INLINE void QueryPool::reset( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkResetQueryPool( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValue() const - { - uint64_t value; - VkResult result = getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); - - return value; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, - uint64_t timeout ) const - { - VkResult result = - getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } - - VULKAN_HPP_INLINE void Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const - { - VkResult result = getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress - Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - VkDeviceAddress result = - getDispatcher()->vkGetBufferDeviceAddress( static_cast( m_device ), reinterpret_cast( &info ) ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t - Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - uint64_t result = - getDispatcher()->vkGetBufferOpaqueCaptureAddress( static_cast( m_device ), reinterpret_cast( &info ) ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t - Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - uint64_t result = getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddress( static_cast( m_device ), - reinterpret_cast( &info ) ); - - return result; - } - - //=== VK_VERSION_1_3 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getToolProperties() const - { - std::vector toolProperties; - uint32_t toolCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return toolProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data ) const - { - VkResult result = getDispatcher()->vkSetPrivateData( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT - { - uint64_t data; - getDispatcher()->vkGetPrivateData( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); - - return data; - } - - VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetEvent2( - static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( &dependencyInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resetEvent2( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdResetEvent2( - static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( ArrayProxy const & events, - ArrayProxy const & dependencyInfos ) const - { - if ( events.size() != dependencyInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); - } - - getDispatcher()->vkCmdWaitEvents2( static_cast( m_commandBuffer ), - events.size(), - reinterpret_cast( events.data() ), - reinterpret_cast( dependencyInfos.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdPipelineBarrier2( static_cast( m_commandBuffer ), reinterpret_cast( &dependencyInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdWriteTimestamp2( - static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); - } - - VULKAN_HPP_INLINE void Queue::submit2( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const - { - VkResult result = getDispatcher()->vkQueueSubmit2( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyBuffer2( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyImage2( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyBufferToImage2( static_cast( m_commandBuffer ), - reinterpret_cast( ©BufferToImageInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdCopyImageToBuffer2( static_cast( m_commandBuffer ), - reinterpret_cast( ©ImageToBufferInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBlitImage2( static_cast( m_commandBuffer ), reinterpret_cast( &blitImageInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdResolveImage2( static_cast( m_commandBuffer ), - reinterpret_cast( &resolveImageInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdBeginRendering( static_cast( m_commandBuffer ), reinterpret_cast( &renderingInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endRendering() const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdEndRendering( static_cast( m_commandBuffer ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetCullMode( static_cast( m_commandBuffer ), static_cast( cullMode ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetFrontFace( static_cast( m_commandBuffer ), static_cast( frontFace ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetPrimitiveTopology( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetViewportWithCount( - static_cast( m_commandBuffer ), viewports.size(), reinterpret_cast( viewports.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCount( ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetScissorWithCount( - static_cast( m_commandBuffer ), scissors.size(), reinterpret_cast( scissors.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes, - ArrayProxy const & strides ) const - { - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != sizes.size()" ); - } - if ( !strides.empty() && buffers.size() != strides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); - } - - getDispatcher()->vkCmdBindVertexBuffers2( static_cast( m_commandBuffer ), - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ), - reinterpret_cast( strides.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthTestEnable( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthWriteEnable( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthCompareOp( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthBoundsTestEnable( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetStencilTestEnable( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetStencilOp( static_cast( m_commandBuffer ), - static_cast( faceMask ), - static_cast( failOp ), - static_cast( passOp ), - static_cast( depthFailOp ), - static_cast( compareOp ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetRasterizerDiscardEnable( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetDepthBiasEnable( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT - { - getDispatcher()->vkCmdSetPrimitiveRestartEnable( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetDeviceBufferMemoryRequirements( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetDeviceBufferMemoryRequirements( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetDeviceImageMemoryRequirements( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetDeviceImageMemoryRequirements( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const - { - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( - static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( static_cast( m_device ), - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - //=== VK_KHR_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, - VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); - - return supported; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR - PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - - return surfaceCapabilities; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR && - "Function needs extension enabled!" ); - - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return surfaceFormats; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR && - "Function needs extension enabled!" ); - - std::vector presentModes; - uint32_t presentModeCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return presentModes; - } - - //=== VK_KHR_swapchain === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getImages() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainImagesKHR && "Function needs extension enabled!" ); - - std::vector swapchainImages; - uint32_t swapchainImageCount; - VkResult result; - do - { - result = getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, swapchainImages.data() ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); - if ( swapchainImageCount < swapchainImages.size() ) - { - swapchainImages.resize( swapchainImageCount ); - } - return swapchainImages; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair - SwapchainKHR::acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function needs extension enabled!" ); - - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), - static_cast( m_swapchain ), - timeout, - static_cast( semaphore ), - static_cast( fence ), - &imageIndex ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eTimeout, - VULKAN_HPP_NAMESPACE::Result::eNotReady, - VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return std::make_pair( static_cast( result ), imageIndex ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueuePresentKHR && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR Device::getGroupPresentCapabilitiesKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( - static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); - - return deviceGroupPresentCapabilities; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR - Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( - static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); - - return modes; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR && - "Function needs extension enabled!" ); - - std::vector rects; - uint32_t rectCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) - { - rects.resize( rectCount ); - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); - if ( rectCount < rects.size() ) - { - rects.resize( rectCount ); - } - return rects; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair - Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function needs extension enabled!" ); - - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImage2KHR( - static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eTimeout, - VULKAN_HPP_NAMESPACE::Result::eNotReady, - VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return std::make_pair( static_cast( result ), imageIndex ); - } - - //=== VK_KHR_display === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPropertiesKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPlanePropertiesKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHRs( *this, planeIndex ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModePropertiesKHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetDisplayModePropertiesKHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR - DisplayModeKHR::getDisplayPlaneCapabilities( uint32_t planeIndex ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( m_displayModeKHR ), - planeIndex, - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); - - return capabilities; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - //=== VK_KHR_display_swapchain === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHRs( *this, createInfos, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); - } - -# if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceXlibPresentationSupportKHR && - "Function needs extension enabled!" ); - - VkBool32 result = - getDispatcher()->vkGetPhysicalDeviceXlibPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &dpy, visualID ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -# if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXcbPresentationSupportKHR( - uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceXcbPresentationSupportKHR && - "Function needs extension enabled!" ); - - VkBool32 result = getDispatcher()->vkGetPhysicalDeviceXcbPresentationSupportKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, &connection, visual_id ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_XCB_KHR*/ - -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceWaylandPresentationSupportKHR && - "Function needs extension enabled!" ); - - VkBool32 result = - getDispatcher()->vkGetPhysicalDeviceWaylandPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &display ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceWin32PresentationSupportKHR && - "Function needs extension enabled!" ); - - VkBool32 result = getDispatcher()->vkGetPhysicalDeviceWin32PresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT - Instance::createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, - uint64_t object, - size_t location, - int32_t messageCode, - const std::string & layerPrefix, - const std::string & message ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDebugReportMessageEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkDebugReportMessageEXT( static_cast( m_instance ), - static_cast( flags ), - static_cast( objectType_ ), - object, - location, - messageCode, - layerPrefix.c_str(), - message.c_str() ); - } - - //=== VK_EXT_debug_marker === - - VULKAN_HPP_INLINE void Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectTagEXT && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkDebugMarkerSetObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); - } - - VULKAN_HPP_INLINE void Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectNameEXT && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkDebugMarkerSetObjectNameEXT( static_cast( m_device ), - reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerBeginEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDebugMarkerBeginEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerEndEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDebugMarkerEndEXT( static_cast( m_commandBuffer ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerInsertEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDebugMarkerInsertEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - } - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR - PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoProfile ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - - return capabilities; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoProfile ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR && - "Function needs extension enabled!" ); - - std::vector videoFormatProperties; - uint32_t videoFormatPropertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - result = - getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); - if ( videoFormatPropertyCount < videoFormatProperties.size() ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - } - return videoFormatProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR - Device::createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector VideoSessionKHR::getMemoryRequirements() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - std::vector memoryRequirements; - uint32_t memoryRequirementsCount; - VkResult result; - do - { - result = getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( - static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) - { - memoryRequirements.resize( memoryRequirementsCount ); - result = - getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), - static_cast( m_videoSession ), - &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::getMemoryRequirements" ); - VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); - if ( memoryRequirementsCount < memoryRequirements.size() ) - { - memoryRequirements.resize( memoryRequirementsCount ); - } - return memoryRequirements; - } - - VULKAN_HPP_INLINE void - VideoSessionKHR::bindMemory( ArrayProxy const & bindSessionMemoryInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkBindVideoSessionMemoryKHR && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkBindVideoSessionMemoryKHR( static_cast( m_device ), - static_cast( m_videoSession ), - bindSessionMemoryInfos.size(), - reinterpret_cast( bindSessionMemoryInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::bindMemory" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR - Device::createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void VideoSessionParametersKHR::update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateVideoSessionParametersKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkUpdateVideoSessionParametersKHR( static_cast( m_device ), - static_cast( m_videoSessionParameters ), - reinterpret_cast( &updateInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionParametersKHR::update" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginVideoCodingKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginVideoCodingKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &beginInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndVideoCodingKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndVideoCodingKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &endCodingInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdControlVideoCodingKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdControlVideoCodingKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &codingControlInfo ) ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & frameInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDecodeVideoKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDecodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( &frameInfo ) ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT && - "Function needs extension enabled!" ); - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" ); - } - - getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT( static_cast( m_commandBuffer ), - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginTransformFeedbackEXT && - "Function needs extension enabled!" ); - if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::beginTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); - } - - getDispatcher()->vkCmdBeginTransformFeedbackEXT( static_cast( m_commandBuffer ), - firstCounterBuffer, - counterBuffers.size(), - reinterpret_cast( counterBuffers.data() ), - reinterpret_cast( counterBufferOffsets.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, - ArrayProxy const & counterBuffers, - ArrayProxy const & counterBufferOffsets ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndTransformFeedbackEXT && - "Function needs extension enabled!" ); - if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::endTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); - } - - getDispatcher()->vkCmdEndTransformFeedbackEXT( static_cast( m_commandBuffer ), - firstCounterBuffer, - counterBuffers.size(), - reinterpret_cast( counterBuffers.data() ), - reinterpret_cast( counterBufferOffsets.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query, - VULKAN_HPP_NAMESPACE::QueryControlFlags flags, - uint32_t index ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginQueryIndexedEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginQueryIndexedEXT( - static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ), index ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndQueryIndexedEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndQueryIndexedEXT( static_cast( m_commandBuffer ), static_cast( queryPool ), query, index ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, - uint32_t firstInstance, - VULKAN_HPP_NAMESPACE::Buffer counterBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, - uint32_t counterOffset, - uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectByteCountEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawIndirectByteCountEXT( static_cast( m_commandBuffer ), - instanceCount, - firstInstance, - static_cast( counterBuffer ), - static_cast( counterBufferOffset ), - counterOffset, - vertexStride ); - } - - //=== VK_NVX_binary_import === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX - Device::createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX - Device::createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCuLaunchKernelNVX && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCuLaunchKernelNVX( static_cast( m_commandBuffer ), reinterpret_cast( &launchInfo ) ); - } - - //=== VK_NVX_image_view_handle === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t - Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewHandleNVX && "Function needs extension enabled!" ); - - uint32_t result = - getDispatcher()->vkGetImageViewHandleNVX( static_cast( m_device ), reinterpret_cast( &info ) ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX ImageView::getAddressNVX() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewAddressNVX && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; - VkResult result = getDispatcher()->vkGetImageViewAddressNVX( - static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); - - return properties; - } - - //=== VK_AMD_draw_indirect_count === - - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectCountAMD && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawIndirectCountAMD( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirectCountAMD && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawIndexedIndirectCountAMD( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_AMD_shader_info === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Pipeline::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, - VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderInfoAMD && "Function needs extension enabled!" ); - - std::vector info; - size_t infoSize; - VkResult result; - do - { - result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) - { - info.resize( infoSize ); - result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); - if ( infoSize < info.size() ) - { - info.resize( infoSize ); - } - return info; - } - - //=== VK_KHR_dynamic_rendering === - - VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderingKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginRenderingKHR( static_cast( m_commandBuffer ), reinterpret_cast( &renderingInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endRenderingKHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderingKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndRenderingKHR( static_cast( m_commandBuffer ) ); - } - -# if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV - PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, - VULKAN_HPP_NAMESPACE::ImageType type, - VULKAN_HPP_NAMESPACE::ImageTiling tiling, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( - static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - static_cast( externalHandleType ), - reinterpret_cast( &externalImageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - - return externalImageFormatProperties; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_external_memory_win32 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE DeviceMemory::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleNV && - "Function needs extension enabled!" ); - - HANDLE handle; - VkResult result = getDispatcher()->vkGetMemoryWin32HandleNV( - static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); - - return handle; - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_get_physical_device_properties2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; - getDispatcher()->vkGetPhysicalDeviceFeatures2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &features ) ); - - return features; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceFeatures2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &features ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; - getDispatcher()->vkGetPhysicalDeviceProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &properties ) ); - - return properties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &properties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; - getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR( - static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return formatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR( - static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties2 - PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = - getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - - return imageFormatProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = - getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR && - "Function needs extension enabled!" ); - - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), - &queueFamilyPropertyCount, - reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - queueFamilyProperties.resize( queueFamilyPropertyCount ); - } - return queueFamilyProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR && - "Function needs extension enabled!" ); - - std::vector structureChains; - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - structureChains.resize( queueFamilyPropertyCount ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; - } - getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), - &queueFamilyPropertyCount, - reinterpret_cast( queueFamilyProperties.data() ) ); - - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); - if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) - { - structureChains.resize( queueFamilyPropertyCount ); - } - for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) - { - structureChains[i].template get() = queueFamilyProperties[i]; - } - return structureChains; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; - getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &memoryProperties ) ); - - return memoryProperties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain PhysicalDevice::getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = - structureChain.template get(); - getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &memoryProperties ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &formatInfo ), - &propertyCount, - nullptr ); - properties.resize( propertyCount ); - getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &formatInfo ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - //=== VK_KHR_device_group === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags - Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPeerMemoryFeaturesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; - getDispatcher()->vkGetDeviceGroupPeerMemoryFeaturesKHR( static_cast( m_device ), - heapIndex, - localDeviceIndex, - remoteDeviceIndex, - reinterpret_cast( &peerMemoryFeatures ) ); - - return peerMemoryFeatures; - } - - VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDeviceMaskKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDeviceMaskKHR( static_cast( m_commandBuffer ), deviceMask ); - } - - VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHR( uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchBaseKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDispatchBaseKHR( - static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); - } - -# if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_KHR_maintenance1 === - - VULKAN_HPP_INLINE void CommandPool::trimKHR( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkTrimCommandPoolKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkTrimCommandPoolKHR( - static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); - } - - //=== VK_KHR_device_group_creation === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDeviceGroupsKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR && - "Function needs extension enabled!" ); - - std::vector physicalDeviceGroupProperties; - uint32_t physicalDeviceGroupCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = - getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), - &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); - if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } - return physicalDeviceGroupProperties; - } - - //=== VK_KHR_external_memory_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( - const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalBufferPropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; - getDispatcher()->vkGetPhysicalDeviceExternalBufferPropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &externalBufferInfo ), - reinterpret_cast( &externalBufferProperties ) ); - - return externalBufferProperties; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_memory_win32 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE - Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleKHR && - "Function needs extension enabled!" ); - - HANDLE handle; - VkResult result = getDispatcher()->vkGetMemoryWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); - - return handle; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR - Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - VkResult result = - getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR( static_cast( m_device ), - static_cast( handleType ), - handle, - reinterpret_cast( &memoryWin32HandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); - - return memoryWin32HandleProperties; - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_memory_fd === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdKHR && "Function needs extension enabled!" ); - - int fd; - VkResult result = - getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); - - return fd; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR - Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdPropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), - static_cast( handleType ), - fd, - reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); - - return memoryFdProperties; - } - - //=== VK_KHR_external_semaphore_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( - const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalSemaphorePropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; - getDispatcher()->vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( - static_cast( m_physicalDevice ), - reinterpret_cast( &externalSemaphoreInfo ), - reinterpret_cast( &externalSemaphoreProperties ) ); - - return externalSemaphoreProperties; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_semaphore_win32 === - - VULKAN_HPP_INLINE void - Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreWin32HandleKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkImportSemaphoreWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &importSemaphoreWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE - Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreWin32HandleKHR && - "Function needs extension enabled!" ); - - HANDLE handle; - VkResult result = getDispatcher()->vkGetSemaphoreWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); - - return handle; - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_semaphore_fd === - - VULKAN_HPP_INLINE void Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreFdKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkImportSemaphoreFdKHR( static_cast( m_device ), - reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreFdKHR && "Function needs extension enabled!" ); - - int fd; - VkResult result = - getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); - - return fd; - } - - //=== VK_KHR_push_descriptor === - - VULKAN_HPP_INLINE void - CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdPushDescriptorSetKHR( static_cast( m_commandBuffer ), - static_cast( pipelineBindPoint ), - static_cast( layout ), - set, - descriptorWrites.size(), - reinterpret_cast( descriptorWrites.data() ) ); - } - - template - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - VULKAN_HPP_NAMESPACE::PipelineLayout layout, - uint32_t set, - DataType const & data ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetWithTemplateKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdPushDescriptorSetWithTemplateKHR( static_cast( m_commandBuffer ), - static_cast( descriptorUpdateTemplate ), - static_cast( layout ), - set, - reinterpret_cast( &data ) ); - } - - //=== VK_EXT_conditional_rendering === - - VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( - const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginConditionalRenderingEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginConditionalRenderingEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &conditionalRenderingBegin ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndConditionalRenderingEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndConditionalRenderingEXT( static_cast( m_commandBuffer ) ); - } - - //=== VK_KHR_descriptor_update_template === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - Device::createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void - Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - Optional allocator ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDestroyDescriptorUpdateTemplateKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkDestroyDescriptorUpdateTemplateKHR( - static_cast( m_device ), - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( static_cast( allocator ) ) ); - } - - template - VULKAN_HPP_INLINE void DescriptorSet::updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, - DataType const & data ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateDescriptorSetWithTemplateKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkUpdateDescriptorSetWithTemplateKHR( static_cast( m_device ), - static_cast( m_descriptorSet ), - static_cast( descriptorUpdateTemplate ), - reinterpret_cast( &data ) ); - } - - //=== VK_NV_clip_space_w_scaling === - - VULKAN_HPP_INLINE void - CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, - ArrayProxy const & viewportWScalings ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWScalingNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetViewportWScalingNV( static_cast( m_commandBuffer ), - firstViewport, - viewportWScalings.size(), - reinterpret_cast( viewportWScalings.data() ) ); - } - -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) - //=== VK_EXT_acquire_xlib_display === - - VULKAN_HPP_INLINE void PhysicalDevice::acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireXlibDisplayEXT && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkAcquireXlibDisplayEXT( static_cast( m_physicalDevice ), &dpy, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, - RROutput rrOutput ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, dpy, rrOutput ); - } -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - - //=== VK_EXT_display_surface_counter === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT - PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); - - return surfaceCapabilities; - } - - //=== VK_EXT_display_control === - - VULKAN_HPP_INLINE void Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, - const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDisplayPowerControlEXT && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkDisplayPowerControlEXT( - static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, deviceEventInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, - VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, display, displayEventInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t SwapchainKHR::getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainCounterEXT && "Function needs extension enabled!" ); - - uint64_t counterValue; - VkResult result = getDispatcher()->vkGetSwapchainCounterEXT( - static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); - - return counterValue; - } - - //=== VK_GOOGLE_display_timing === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE SwapchainKHR::getRefreshCycleDurationGOOGLE() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRefreshCycleDurationGOOGLE && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; - VkResult result = getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - reinterpret_cast( &displayTimingProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); - - return displayTimingProperties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getPastPresentationTimingGOOGLE() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPastPresentationTimingGOOGLE && - "Function needs extension enabled!" ); - - std::vector presentationTimings; - uint32_t presentationTimingCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( - static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) - { - presentationTimings.resize( presentationTimingCount ); - result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); - if ( presentationTimingCount < presentationTimings.size() ) - { - presentationTimings.resize( presentationTimingCount ); - } - return presentationTimings; - } - - //=== VK_EXT_discard_rectangles === - - VULKAN_HPP_INLINE void - CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, - ArrayProxy const & discardRectangles ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDiscardRectangleEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDiscardRectangleEXT( static_cast( m_commandBuffer ), - firstDiscardRectangle, - discardRectangles.size(), - reinterpret_cast( discardRectangles.data() ) ); - } - - //=== VK_EXT_hdr_metadata === - - VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy const & swapchains, - ArrayProxy const & metadata ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetHdrMetadataEXT && "Function needs extension enabled!" ); - if ( swapchains.size() != metadata.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); - } - - getDispatcher()->vkSetHdrMetadataEXT( static_cast( m_device ), - swapchains.size(), - reinterpret_cast( swapchains.data() ), - reinterpret_cast( metadata.data() ) ); - } - - //=== VK_KHR_create_renderpass2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, - const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderPass2KHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginRenderPass2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( &renderPassBegin ), - reinterpret_cast( &subpassBeginInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, - const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdNextSubpass2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdNextSubpass2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( &subpassBeginInfo ), - reinterpret_cast( &subpassEndInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderPass2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndRenderPass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &subpassEndInfo ) ); - } - - //=== VK_KHR_shared_presentable_image === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result SwapchainKHR::getStatus() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainStatusKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } - - //=== VK_KHR_external_fence_capabilities === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties - PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalFencePropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; - getDispatcher()->vkGetPhysicalDeviceExternalFencePropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &externalFenceInfo ), - reinterpret_cast( &externalFenceProperties ) ); - - return externalFenceProperties; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_external_fence_win32 === - - VULKAN_HPP_INLINE void Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceWin32HandleKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkImportFenceWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &importFenceWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE - Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceWin32HandleKHR && - "Function needs extension enabled!" ); - - HANDLE handle; - VkResult result = getDispatcher()->vkGetFenceWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); - - return handle; - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_KHR_external_fence_fd === - - VULKAN_HPP_INLINE void Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceFdKHR && "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceFdKHR && "Function needs extension enabled!" ); - - int fd; - VkResult result = getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); - - return fd; - } - - //=== VK_KHR_performance_query === - - VULKAN_HPP_NODISCARD - VULKAN_HPP_INLINE std::pair, std::vector> - PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR && - "Function needs extension enabled!" ); - - std::pair, std::vector> data; - std::vector & counters = data.first; - std::vector & counterDescriptions = data.second; - uint32_t counterCount; - VkResult result; - do - { - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - static_cast( m_physicalDevice ), - queueFamilyIndex, - &counterCount, - reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); - VULKAN_HPP_ASSERT( counterCount <= counters.size() ); - if ( counterCount < counters.size() ) - { - counters.resize( counterCount ); - counterDescriptions.resize( counterCount ); - } - return data; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( - const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR && - "Function needs extension enabled!" ); - - uint32_t numPasses; - getDispatcher()->vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - static_cast( m_physicalDevice ), - reinterpret_cast( &performanceQueryCreateInfo ), - &numPasses ); - - return numPasses; - } - - VULKAN_HPP_INLINE void Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireProfilingLockKHR && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); - } - - VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseProfilingLockKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkReleaseProfilingLockKHR( static_cast( m_device ) ); - } - - //=== VK_KHR_get_surface_capabilities2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR - PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - - return surfaceCapabilities; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR && - "Function needs extension enabled!" ); - - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - surfaceFormats.resize( surfaceFormatCount ); - } - return surfaceFormats; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR && - "Function needs extension enabled!" ); - - std::vector structureChains; - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) - { - structureChains.resize( surfaceFormatCount ); - surfaceFormats.resize( surfaceFormatCount ); - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - surfaceFormats[i].pNext = structureChains[i].template get().pNext; - } - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); - if ( surfaceFormatCount < surfaceFormats.size() ) - { - structureChains.resize( surfaceFormatCount ); - } - for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) - { - structureChains[i].template get() = surfaceFormats[i]; - } - return structureChains; - } - - //=== VK_KHR_get_display_properties2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayProperties2KHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPlaneProperties2KHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties2() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModeProperties2KHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = getDispatcher()->vkGetDisplayModeProperties2KHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR - PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilities2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); - - return capabilities; - } - -# if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_IOS_MVK*/ - -# if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - VULKAN_HPP_INLINE void Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectNameEXT && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkSetDebugUtilsObjectNameEXT( static_cast( m_device ), - reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); - } - - VULKAN_HPP_INLINE void Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectTagEXT && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); - } - - VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueueBeginDebugUtilsLabelEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkQueueBeginDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( &labelInfo ) ); - } - - VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueueEndDebugUtilsLabelEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkQueueEndDebugUtilsLabelEXT( static_cast( m_queue ) ); - } - - VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueueInsertDebugUtilsLabelEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkQueueInsertDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( &labelInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginDebugUtilsLabelEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBeginDebugUtilsLabelEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &labelInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndDebugUtilsLabelEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEndDebugUtilsLabelEXT( static_cast( m_commandBuffer ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdInsertDebugUtilsLabelEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdInsertDebugUtilsLabelEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &labelInfo ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void - Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, - const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSubmitDebugUtilsMessageEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkSubmitDebugUtilsMessageEXT( static_cast( m_instance ), - static_cast( messageSeverity ), - static_cast( messageTypes ), - reinterpret_cast( &callbackData ) ); - } - -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_ANDROID_external_memory_android_hardware_buffer === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID - Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const - { - VULKAN_HPP_ASSERT( - getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; - VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - - return properties; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const - { - VULKAN_HPP_ASSERT( - getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = - structureChain.template get(); - VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE struct AHardwareBuffer * - Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID && - "Function needs extension enabled!" ); - - struct AHardwareBuffer * buffer; - VkResult result = getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( - static_cast( m_device ), reinterpret_cast( &info ), &buffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); - - return buffer; - } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - //=== VK_EXT_sample_locations === - - VULKAN_HPP_INLINE void - CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetSampleLocationsEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetSampleLocationsEXT( static_cast( m_commandBuffer ), - reinterpret_cast( &sampleLocationsInfo ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT - PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMultisamplePropertiesEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties; - getDispatcher()->vkGetPhysicalDeviceMultisamplePropertiesEXT( static_cast( m_physicalDevice ), - static_cast( samples ), - reinterpret_cast( &multisampleProperties ) ); - - return multisampleProperties; - } - - //=== VK_KHR_get_memory_requirements2 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetImageMemoryRequirements2KHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetImageMemoryRequirements2KHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2KHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetBufferMemoryRequirements2KHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2KHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetBufferMemoryRequirements2KHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSparseMemoryRequirements2KHR && - "Function needs extension enabled!" ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( - static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( static_cast( m_device ), - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - //=== VK_KHR_acceleration_structure === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR - Device::createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresKHR && - "Function needs extension enabled!" ); - if ( infos.size() != pBuildRangeInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); - } - - getDispatcher()->vkCmdBuildAccelerationStructuresKHR( - static_cast( m_commandBuffer ), - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::buildAccelerationStructuresIndirectKHR( ArrayProxy const & infos, - ArrayProxy const & indirectDeviceAddresses, - ArrayProxy const & indirectStrides, - ArrayProxy const & pMaxPrimitiveCounts ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR && - "Function needs extension enabled!" ); - if ( infos.size() != indirectDeviceAddresses.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectDeviceAddresses.size()" ); - } - if ( infos.size() != indirectStrides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectStrides.size()" ); - } - if ( infos.size() != pMaxPrimitiveCounts.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != pMaxPrimitiveCounts.size()" ); - } - - getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR( static_cast( m_commandBuffer ), - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( indirectDeviceAddresses.data() ), - indirectStrides.data(), - pMaxPrimitiveCounts.data() ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::buildAccelerationStructuresKHR( - VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - ArrayProxy const & infos, - ArrayProxy const & pBuildRangeInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkBuildAccelerationStructuresKHR && - "Function needs extension enabled!" ); - if ( infos.size() != pBuildRangeInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); - } - - VkResult result = getDispatcher()->vkBuildAccelerationStructuresKHR( - static_cast( m_device ), - static_cast( deferredOperation ), - infos.size(), - reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkCopyAccelerationStructureKHR( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkCopyAccelerationStructureToMemoryKHR( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result - Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkCopyMemoryToAccelerationStructureKHR( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, - VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, - VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); - - return static_cast( result ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t dataSize, - size_t stride ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = - getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType - Device::writeAccelerationStructuresPropertyKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - size_t stride ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR && - "Function needs extension enabled!" ); - - DataType data; - VkResult result = - getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - sizeof( DataType ), - reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); - - return data; - } - - VULKAN_HPP_INLINE void - CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyAccelerationStructureKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &info ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( - const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureToMemoryKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyAccelerationStructureToMemoryKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &info ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( - const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMemoryToAccelerationStructureKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyMemoryToAccelerationStructureKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &info ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress - Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureDeviceAddressKHR && - "Function needs extension enabled!" ); - - VkDeviceAddress result = getDispatcher()->vkGetAccelerationStructureDeviceAddressKHR( - static_cast( m_device ), reinterpret_cast( &info ) ); - - return static_cast( result ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::writeAccelerationStructuresPropertiesKHR( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesKHR( static_cast( m_commandBuffer ), - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR Device::getAccelerationStructureCompatibilityKHR( - const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceAccelerationStructureCompatibilityKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; - getDispatcher()->vkGetDeviceAccelerationStructureCompatibilityKHR( static_cast( m_device ), - reinterpret_cast( &versionInfo ), - reinterpret_cast( &compatibility ) ); - - return compatibility; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR - Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, - const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, - ArrayProxy const & maxPrimitiveCounts ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureBuildSizesKHR && - "Function needs extension enabled!" ); - if ( maxPrimitiveCounts.size() != buildInfo.geometryCount ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureBuildSizesKHR: maxPrimitiveCounts.size() != buildInfo.geometryCount" ); - } - - VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; - getDispatcher()->vkGetAccelerationStructureBuildSizesKHR( static_cast( m_device ), - static_cast( buildType ), - reinterpret_cast( &buildInfo ), - maxPrimitiveCounts.data(), - reinterpret_cast( &sizeInfo ) ); - - return sizeInfo; - } - - //=== VK_KHR_sampler_ycbcr_conversion === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - Device::createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void - Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, - Optional allocator ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDestroySamplerYcbcrConversionKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkDestroySamplerYcbcrConversionKHR( - static_cast( m_device ), - static_cast( ycbcrConversion ), - reinterpret_cast( static_cast( allocator ) ) ); - } - - //=== VK_KHR_bind_memory2 === - - VULKAN_HPP_INLINE void Device::bindBufferMemory2KHR( ArrayProxy const & bindInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2KHR && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkBindBufferMemory2KHR( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); - } - - VULKAN_HPP_INLINE void Device::bindImageMemory2KHR( ArrayProxy const & bindInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2KHR && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkBindImageMemory2KHR( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); - } - - //=== VK_EXT_image_drm_format_modifier === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT Image::getDrmFormatModifierPropertiesEXT() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); - - return properties; - } - - //=== VK_EXT_validation_cache === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT - Device::createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void ValidationCacheEXT::merge( ArrayProxy const & srcCaches ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkMergeValidationCachesEXT && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkMergeValidationCachesEXT( static_cast( m_device ), - static_cast( m_validationCache ), - srcCaches.size(), - reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::merge" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector ValidationCacheEXT::getData() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetValidationCacheDataEXT && - "Function needs extension enabled!" ); - - std::vector data; - size_t dataSize; - VkResult result; - do - { - result = getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) - { - data.resize( dataSize ); - result = getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); - if ( dataSize < data.size() ) - { - data.resize( dataSize ); - } - return data; - } - - //=== VK_NV_shading_rate_image === - - VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindShadingRateImageNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBindShadingRateImageNV( - static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( - uint32_t firstViewport, ArrayProxy const & shadingRatePalettes ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportShadingRatePaletteNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetViewportShadingRatePaletteNV( static_cast( m_commandBuffer ), - firstViewport, - shadingRatePalettes.size(), - reinterpret_cast( shadingRatePalettes.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( - VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, - ArrayProxy const & customSampleOrders ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoarseSampleOrderNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetCoarseSampleOrderNV( static_cast( m_commandBuffer ), - static_cast( sampleOrderType ), - customSampleOrders.size(), - reinterpret_cast( customSampleOrders.data() ) ); - } - - //=== VK_NV_ray_tracing === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV - Device::createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( - const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements; - getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain Device::getAccelerationStructureMemoryRequirementsNV( - const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_INLINE void - Device::bindAccelerationStructureMemoryNV( ArrayProxy const & bindInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkBindAccelerationStructureMemoryNV && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkBindAccelerationStructureMemoryNV( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, - VULKAN_HPP_NAMESPACE::Buffer instanceData, - VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, - VULKAN_HPP_NAMESPACE::Bool32 update, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::Buffer scratch, - VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructureNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBuildAccelerationStructureNV( static_cast( m_commandBuffer ), - reinterpret_cast( &info ), - static_cast( instanceData ), - static_cast( instanceOffset ), - static_cast( update ), - static_cast( dst ), - static_cast( src ), - static_cast( scratch ), - static_cast( scratchOffset ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyAccelerationStructureNV( static_cast( m_commandBuffer ), - static_cast( dst ), - static_cast( src ), - static_cast( mode ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, - VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, - VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysNV && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdTraceRaysNV( static_cast( m_commandBuffer ), - static_cast( raygenShaderBindingTableBuffer ), - static_cast( raygenShaderBindingOffset ), - static_cast( missShaderBindingTableBuffer ), - static_cast( missShaderBindingOffset ), - static_cast( missShaderBindingStride ), - static_cast( hitShaderBindingTableBuffer ), - static_cast( hitShaderBindingOffset ), - static_cast( hitShaderBindingStride ), - static_cast( callableShaderBindingTableBuffer ), - static_cast( callableShaderBindingOffset ), - static_cast( callableShaderBindingStride ), - width, - height, - depth ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createRayTracingPipelinesNV( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createRayTracingPipelineNV( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Pipeline::getRayTracingShaderGroupHandlesNV( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesNV" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingShaderGroupHandleNV( uint32_t firstGroup, uint32_t groupCount ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV && - "Function needs extension enabled!" ); - - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleNV" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector AccelerationStructureNV::getHandle( size_t dataSize ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), - static_cast( m_accelerationStructure ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType AccelerationStructureNV::getHandle() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && - "Function needs extension enabled!" ); - - DataType data; - VkResult result = getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), - static_cast( m_accelerationStructure ), - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); - - return data; - } - - VULKAN_HPP_INLINE void - CommandBuffer::writeAccelerationStructuresPropertiesNV( ArrayProxy const & accelerationStructures, - VULKAN_HPP_NAMESPACE::QueryType queryType, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesNV( static_cast( m_commandBuffer ), - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - static_cast( queryPool ), - firstQuery ); - } - - VULKAN_HPP_INLINE void Pipeline::compileDeferredNV( uint32_t shader ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCompileDeferredNV && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkCompileDeferredNV( static_cast( m_device ), static_cast( m_pipeline ), shader ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::compileDeferredNV" ); - } - - //=== VK_KHR_maintenance3 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupportKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; - getDispatcher()->vkGetDescriptorSetLayoutSupportKHR( static_cast( m_device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( &support ) ); - - return support; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupportKHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); - getDispatcher()->vkGetDescriptorSetLayoutSupportKHR( static_cast( m_device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( &support ) ); - - return structureChain; - } - - //=== VK_KHR_draw_indirect_count === - - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectCountKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawIndirectCountKHR( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirectCountKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawIndexedIndirectCountKHR( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_EXT_external_memory_host === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT - Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = - getDispatcher()->vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), - static_cast( handleType ), - pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); - - return memoryHostPointerProperties; - } - - //=== VK_AMD_buffer_marker === - - VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteBufferMarkerAMD && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdWriteBufferMarkerAMD( static_cast( m_commandBuffer ), - static_cast( pipelineStage ), - static_cast( dstBuffer ), - static_cast( dstOffset ), - marker ); - } - - //=== VK_EXT_calibrated_timestamps === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCalibrateableTimeDomainsEXT() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT && - "Function needs extension enabled!" ); - - std::vector timeDomains; - uint32_t timeDomainCount; - VkResult result; - do - { - result = - getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) - { - timeDomains.resize( timeDomainCount ); - result = getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( - static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); - if ( timeDomainCount < timeDomains.size() ) - { - timeDomains.resize( timeDomainCount ); - } - return timeDomains; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair, uint64_t> - Device::getCalibratedTimestampsEXT( ArrayProxy const & timestampInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsEXT && - "Function needs extension enabled!" ); - - std::pair, uint64_t> data( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); - std::vector & timestamps = data.first; - uint64_t & maxDeviation = data.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), - timestampInfos.size(), - reinterpret_cast( timestampInfos.data() ), - timestamps.data(), - &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - - return data; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair - Device::getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT & timestampInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsEXT && - "Function needs extension enabled!" ); - - std::pair data; - uint64_t & timestamp = data.first; - uint64_t & maxDeviation = data.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( - static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); - - return data; - } - - //=== VK_NV_mesh_shader === - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksNV && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksNV( static_cast( m_commandBuffer ), taskCount, firstTask ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksIndirectNV( - static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectCountNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksIndirectCountNV( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_NV_scissor_exclusive === - - VULKAN_HPP_INLINE void - CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, - ArrayProxy const & exclusiveScissors ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetExclusiveScissorNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetExclusiveScissorNV( static_cast( m_commandBuffer ), - firstExclusiveScissor, - exclusiveScissors.size(), - reinterpret_cast( exclusiveScissors.data() ) ); - } - - //=== VK_NV_device_diagnostic_checkpoints === - - template - VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( CheckpointMarkerType const & checkpointMarker ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCheckpointNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetCheckpointNV( static_cast( m_commandBuffer ), reinterpret_cast( &checkpointMarker ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointDataNV() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointDataNV && - "Function needs extension enabled!" ); - - std::vector checkpointData; - uint32_t checkpointDataCount; - getDispatcher()->vkGetQueueCheckpointDataNV( static_cast( m_queue ), &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - getDispatcher()->vkGetQueueCheckpointDataNV( - static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } - - //=== VK_KHR_timeline_semaphore === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValueKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValueKHR && - "Function needs extension enabled!" ); - - uint64_t value; - VkResult result = getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); - - return value; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, - uint64_t timeout ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphoresKHR && "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkWaitSemaphoresKHR( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); - - return static_cast( result ); - } - - VULKAN_HPP_INLINE void Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphoreKHR && "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkSignalSemaphoreKHR( static_cast( m_device ), reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); - } - - //=== VK_INTEL_performance_query === - - VULKAN_HPP_INLINE void Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkInitializePerformanceApiINTEL && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkInitializePerformanceApiINTEL( static_cast( m_device ), - reinterpret_cast( &initializeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); - } - - VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkUninitializePerformanceApiINTEL && - "Function needs extension enabled!" ); - - getDispatcher()->vkUninitializePerformanceApiINTEL( static_cast( m_device ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceMarkerINTEL && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkCmdSetPerformanceMarkerINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceOverrideINTEL && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkCmdSetPerformanceOverrideINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &overrideInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL - Device::acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const - { - return VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL( *this, acquireInfo ); - } - - VULKAN_HPP_INLINE void Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSetPerformanceConfigurationINTEL && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkQueueSetPerformanceConfigurationINTEL( static_cast( m_queue ), - static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PerformanceValueINTEL - Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPerformanceParameterINTEL && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; - VkResult result = getDispatcher()->vkGetPerformanceParameterINTEL( - static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); - - return value; - } - - //=== VK_AMD_display_native_hdr === - - VULKAN_HPP_INLINE void SwapchainKHR::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetLocalDimmingAMD && "Function needs extension enabled!" ); - - getDispatcher()->vkSetLocalDimmingAMD( - static_cast( m_device ), static_cast( m_swapchain ), static_cast( localDimmingEnable ) ); - } - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getFragmentShadingRatesKHR() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR && - "Function needs extension enabled!" ); - - std::vector fragmentShadingRates; - uint32_t fragmentShadingRateCount; - VkResult result; - do - { - result = - getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - result = getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( - static_cast( m_physicalDevice ), - &fragmentShadingRateCount, - reinterpret_cast( fragmentShadingRates.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); - if ( fragmentShadingRateCount < fragmentShadingRates.size() ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - } - return fragmentShadingRates; - } - - VULKAN_HPP_INLINE void - CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFragmentShadingRateKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetFragmentShadingRateKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &fragmentSize ), - reinterpret_cast( combinerOps ) ); - } - - //=== VK_EXT_buffer_device_address === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress - Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferDeviceAddressEXT && - "Function needs extension enabled!" ); - - VkDeviceAddress result = - getDispatcher()->vkGetBufferDeviceAddressEXT( static_cast( m_device ), reinterpret_cast( &info ) ); - - return static_cast( result ); - } - - //=== VK_EXT_tooling_info === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getToolPropertiesEXT() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT && - "Function needs extension enabled!" ); - - std::vector toolProperties; - uint32_t toolCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) - { - toolProperties.resize( toolCount ); - result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } - return toolProperties; - } - - //=== VK_KHR_present_wait === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result SwapchainKHR::waitForPresent( uint64_t presentId, uint64_t timeout ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForPresentKHR && "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkWaitForPresentKHR( static_cast( m_device ), static_cast( m_swapchain ), presentId, timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); - - return static_cast( result ); - } - - //=== VK_NV_cooperative_matrix === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getCooperativeMatrixPropertiesNV() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertyCount; - VkResult result; - do - { - result = - getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) - { - properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); - if ( propertyCount < properties.size() ) - { - properties.resize( propertyCount ); - } - return properties; - } - - //=== VK_NV_coverage_reduction_mode === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV() const - { - VULKAN_HPP_ASSERT( - getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV && - "Function needs extension enabled!" ); - - std::vector combinations; - uint32_t combinationCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - static_cast( m_physicalDevice ), &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) - { - combinations.resize( combinationCount ); - result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - static_cast( m_physicalDevice ), - &combinationCount, - reinterpret_cast( combinations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); - if ( combinationCount < combinations.size() ) - { - combinations.resize( combinationCount ); - } - return combinations; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT && - "Function needs extension enabled!" ); - - std::vector presentModes; - uint32_t presentModeCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); - if ( presentModeCount < presentModes.size() ) - { - presentModes.resize( presentModeCount ); - } - return presentModes; - } - - VULKAN_HPP_INLINE void SwapchainKHR::acquireFullScreenExclusiveModeEXT() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireFullScreenExclusiveModeEXT && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkAcquireFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireFullScreenExclusiveModeEXT" ); - } - - VULKAN_HPP_INLINE void SwapchainKHR::releaseFullScreenExclusiveModeEXT() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseFullScreenExclusiveModeEXT && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkReleaseFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::releaseFullScreenExclusiveModeEXT" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR - Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); - - return modes; - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - //=== VK_KHR_buffer_device_address === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress - Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferDeviceAddressKHR && - "Function needs extension enabled!" ); - - VkDeviceAddress result = - getDispatcher()->vkGetBufferDeviceAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t - Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferOpaqueCaptureAddressKHR && - "Function needs extension enabled!" ); - - uint64_t result = - getDispatcher()->vkGetBufferOpaqueCaptureAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t - Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddressKHR && - "Function needs extension enabled!" ); - - uint64_t result = getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddressKHR( static_cast( m_device ), - reinterpret_cast( &info ) ); - - return result; - } - - //=== VK_EXT_line_rasterization === - - VULKAN_HPP_INLINE void CommandBuffer::setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineStippleEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetLineStippleEXT( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); - } - - //=== VK_EXT_host_query_reset === - - VULKAN_HPP_INLINE void QueryPool::resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkResetQueryPoolEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkResetQueryPoolEXT( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); - } - - //=== VK_EXT_extended_dynamic_state === - - VULKAN_HPP_INLINE void CommandBuffer::setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCullModeEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetCullModeEXT( static_cast( m_commandBuffer ), static_cast( cullMode ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFrontFaceEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetFrontFaceEXT( static_cast( m_commandBuffer ), static_cast( frontFace ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveTopologyEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetPrimitiveTopologyEXT( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::setViewportWithCountEXT( ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWithCountEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetViewportWithCountEXT( - static_cast( m_commandBuffer ), viewports.size(), reinterpret_cast( viewports.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCountEXT( ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetScissorWithCountEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetScissorWithCountEXT( - static_cast( m_commandBuffer ), scissors.size(), reinterpret_cast( scissors.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, - ArrayProxy const & buffers, - ArrayProxy const & offsets, - ArrayProxy const & sizes, - ArrayProxy const & strides ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2EXT && - "Function needs extension enabled!" ); - if ( buffers.size() != offsets.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); - } - if ( !sizes.empty() && buffers.size() != sizes.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != sizes.size()" ); - } - if ( !strides.empty() && buffers.size() != strides.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); - } - - getDispatcher()->vkCmdBindVertexBuffers2EXT( static_cast( m_commandBuffer ), - firstBinding, - buffers.size(), - reinterpret_cast( buffers.data() ), - reinterpret_cast( offsets.data() ), - reinterpret_cast( sizes.data() ), - reinterpret_cast( strides.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthTestEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDepthTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthWriteEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDepthWriteEnableEXT( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthCompareOpEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDepthCompareOpEXT( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBoundsTestEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDepthBoundsTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilTestEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetStencilTestEnableEXT( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, - VULKAN_HPP_NAMESPACE::StencilOp failOp, - VULKAN_HPP_NAMESPACE::StencilOp passOp, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, - VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilOpEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetStencilOpEXT( static_cast( m_commandBuffer ), - static_cast( faceMask ), - static_cast( failOp ), - static_cast( passOp ), - static_cast( depthFailOp ), - static_cast( compareOp ) ); - } - - //=== VK_KHR_deferred_host_operations === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR - Device::createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR( *this, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t DeferredOperationKHR::getMaxConcurrency() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeferredOperationMaxConcurrencyKHR && - "Function needs extension enabled!" ); - - uint32_t result = - getDispatcher()->vkGetDeferredOperationMaxConcurrencyKHR( static_cast( m_device ), static_cast( m_operation ) ); - - return result; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result DeferredOperationKHR::getResult() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeferredOperationResultKHR && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkGetDeferredOperationResultKHR( static_cast( m_device ), static_cast( m_operation ) ); - - return static_cast( result ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result DeferredOperationKHR::join() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDeferredOperationJoinKHR && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkDeferredOperationJoinKHR( static_cast( m_device ), static_cast( m_operation ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::DeferredOperationKHR::join", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); - - return static_cast( result ); - } - - //=== VK_KHR_pipeline_executable_properties === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutablePropertiesKHR && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t executableCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( - static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) - { - properties.resize( executableCount ); - result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); - if ( executableCount < properties.size() ) - { - properties.resize( executableCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableStatisticsKHR && - "Function needs extension enabled!" ); - - std::vector statistics; - uint32_t statisticCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( - static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) - { - statistics.resize( statisticCount ); - result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); - if ( statisticCount < statistics.size() ) - { - statistics.resize( statisticCount ); - } - return statistics; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR && - "Function needs extension enabled!" ); - - std::vector internalRepresentations; - uint32_t internalRepresentationCount; - VkResult result; - do - { - result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( - static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) - { - internalRepresentations.resize( internalRepresentationCount ); - result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( - static_cast( m_device ), - reinterpret_cast( &executableInfo ), - &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); - if ( internalRepresentationCount < internalRepresentations.size() ) - { - internalRepresentations.resize( internalRepresentationCount ); - } - return internalRepresentations; - } - - //=== VK_NV_device_generated_commands === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_INLINE void - CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPreprocessGeneratedCommandsNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdPreprocessGeneratedCommandsNV( static_cast( m_commandBuffer ), - reinterpret_cast( &generatedCommandsInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, - const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdExecuteGeneratedCommandsNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdExecuteGeneratedCommandsNV( static_cast( m_commandBuffer ), - static_cast( isPreprocessed ), - reinterpret_cast( &generatedCommandsInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, - VULKAN_HPP_NAMESPACE::Pipeline pipeline, - uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindPipelineShaderGroupNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBindPipelineShaderGroupNV( static_cast( m_commandBuffer ), - static_cast( pipelineBindPoint ), - static_cast( pipeline ), - groupIndex ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV - Device::createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV( *this, createInfo, allocator ); - } - - //=== VK_EXT_acquire_drm_display === - - VULKAN_HPP_INLINE void PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireDrmDisplayEXT && "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkAcquireDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, drmFd, connectorId ); - } - - //=== VK_EXT_private_data === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - Device::createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - Optional allocator ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkDestroyPrivateDataSlotEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkDestroyPrivateDataSlotEXT( - static_cast( m_device ), - static_cast( privateDataSlot ), - reinterpret_cast( static_cast( allocator ) ) ); - } - - VULKAN_HPP_INLINE void Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, - uint64_t data ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateDataEXT && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkSetPrivateDataEXT( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle, - VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPrivateDataEXT && "Function needs extension enabled!" ); - - uint64_t data; - getDispatcher()->vkGetPrivateDataEXT( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); - - return data; - } - -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEncodeVideoKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdEncodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( &encodeInfo ) ); - } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -# if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT Device::exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkExportMetalObjectsEXT && "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT metalObjectsInfo; - getDispatcher()->vkExportMetalObjectsEXT( static_cast( m_device ), reinterpret_cast( &metalObjectsInfo ) ); - - return metalObjectsInfo; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain Device::exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkExportMetalObjectsEXT && "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT & metalObjectsInfo = structureChain.template get(); - getDispatcher()->vkExportMetalObjectsEXT( static_cast( m_device ), reinterpret_cast( &metalObjectsInfo ) ); - - return structureChain; - } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_synchronization2 === - - VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetEvent2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetEvent2KHR( - static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( &dependencyInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResetEvent2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdResetEvent2KHR( - static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( ArrayProxy const & events, - ArrayProxy const & dependencyInfos ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2KHR && "Function needs extension enabled!" ); - if ( events.size() != dependencyInfos.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); - } - - getDispatcher()->vkCmdWaitEvents2KHR( static_cast( m_commandBuffer ), - events.size(), - reinterpret_cast( events.data() ), - reinterpret_cast( dependencyInfos.data() ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPipelineBarrier2KHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdPipelineBarrier2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( &dependencyInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::QueryPool queryPool, - uint32_t query ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteTimestamp2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdWriteTimestamp2KHR( - static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); - } - - VULKAN_HPP_INLINE void Queue::submit2KHR( ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2KHR && "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkQueueSubmit2KHR( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); - } - - VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, - uint32_t marker ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteBufferMarker2AMD && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdWriteBufferMarker2AMD( static_cast( m_commandBuffer ), - static_cast( stage ), - static_cast( dstBuffer ), - static_cast( dstOffset ), - marker ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointData2NV && - "Function needs extension enabled!" ); - - std::vector checkpointData; - uint32_t checkpointDataCount; - getDispatcher()->vkGetQueueCheckpointData2NV( static_cast( m_queue ), &checkpointDataCount, nullptr ); - checkpointData.resize( checkpointDataCount ); - getDispatcher()->vkGetQueueCheckpointData2NV( - static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); - if ( checkpointDataCount < checkpointData.size() ) - { - checkpointData.resize( checkpointDataCount ); - } - return checkpointData; - } - - //=== VK_NV_fragment_shading_rate_enums === - - VULKAN_HPP_INLINE void - CommandBuffer::setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, - const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFragmentShadingRateEnumNV && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetFragmentShadingRateEnumNV( static_cast( m_commandBuffer ), - static_cast( shadingRate ), - reinterpret_cast( combinerOps ) ); - } - - //=== VK_EXT_mesh_shader === - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksEXT( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - uint32_t drawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksIndirectEXT( - static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, - VULKAN_HPP_NAMESPACE::DeviceSize offset, - VULKAN_HPP_NAMESPACE::Buffer countBuffer, - VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectCountEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMeshTasksIndirectCountEXT( static_cast( m_commandBuffer ), - static_cast( buffer ), - static_cast( offset ), - static_cast( countBuffer ), - static_cast( countBufferOffset ), - maxDrawCount, - stride ); - } - - //=== VK_KHR_copy_commands2 === - - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBuffer2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyBuffer2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImage2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBufferToImage2KHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyBufferToImage2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( ©BufferToImageInfo ) ); - } - - VULKAN_HPP_INLINE void - CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImageToBuffer2KHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdCopyImageToBuffer2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( ©ImageToBufferInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBlitImage2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBlitImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &blitImageInfo ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResolveImage2KHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdResolveImage2KHR( static_cast( m_commandBuffer ), - reinterpret_cast( &resolveImageInfo ) ); - } - - //=== VK_EXT_image_compression_control === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT - Image::getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2EXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT layout; - getDispatcher()->vkGetImageSubresourceLayout2EXT( static_cast( m_device ), - static_cast( m_image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return layout; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Image::getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2EXT & subresource ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2EXT && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT & layout = structureChain.template get(); - getDispatcher()->vkGetImageSubresourceLayout2EXT( static_cast( m_device ), - static_cast( m_image ), - reinterpret_cast( &subresource ), - reinterpret_cast( &layout ) ); - - return structureChain; - } - -# if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_NV_acquire_winrt_display === - - VULKAN_HPP_INLINE void DisplayKHR::acquireWinrtNV() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireWinrtDisplayNV && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkAcquireWinrtDisplayNV( static_cast( m_physicalDevice ), static_cast( m_display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::acquireWinrtNV" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId ) const - { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, deviceRelativeId ); - } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDirectFBPresentationSupportEXT && - "Function needs extension enabled!" ); - - VkBool32 result = - getDispatcher()->vkGetPhysicalDeviceDirectFBPresentationSupportEXT( static_cast( m_physicalDevice ), queueFamilyIndex, &dfb ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysKHR && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdTraceRaysKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &raygenShaderBindingTable ), - reinterpret_cast( &missShaderBindingTable ), - reinterpret_cast( &hitShaderBindingTable ), - reinterpret_cast( &callableShaderBindingTable ), - width, - height, - depth ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createRayTracingPipelinesKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, deferredOperation, pipelineCache, createInfos, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createRayTracingPipelineKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, deferredOperation, pipelineCache, createInfo, allocator ); - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Pipeline::getRayTracingShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesKHR" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR && - "Function needs extension enabled!" ); - - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleKHR" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); - - return data; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && - "Function needs extension enabled!" ); - - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR" ); - - return data; - } - - VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, - const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, - VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysIndirectKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdTraceRaysIndirectKHR( static_cast( m_commandBuffer ), - reinterpret_cast( &raygenShaderBindingTable ), - reinterpret_cast( &missShaderBindingTable ), - reinterpret_cast( &hitShaderBindingTable ), - reinterpret_cast( &callableShaderBindingTable ), - static_cast( indirectDeviceAddress ) ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize - Pipeline::getRayTracingShaderGroupStackSizeKHR( uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR && - "Function needs extension enabled!" ); - - VkDeviceSize result = getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR( - static_cast( m_device ), static_cast( m_pipeline ), group, static_cast( groupShader ) ); - - return static_cast( result ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRayTracingPipelineStackSizeKHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetRayTracingPipelineStackSizeKHR( static_cast( m_commandBuffer ), pipelineStackSize ); - } - - //=== VK_EXT_vertex_input_dynamic_state === - - VULKAN_HPP_INLINE void CommandBuffer::setVertexInputEXT( - ArrayProxy const & vertexBindingDescriptions, - ArrayProxy const & vertexAttributeDescriptions ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetVertexInputEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetVertexInputEXT( static_cast( m_commandBuffer ), - vertexBindingDescriptions.size(), - reinterpret_cast( vertexBindingDescriptions.data() ), - vertexAttributeDescriptions.size(), - reinterpret_cast( vertexAttributeDescriptions.data() ) ); - } - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_memory === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE zx_handle_t - Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA && - "Function needs extension enabled!" ); - - zx_handle_t zirconHandle; - VkResult result = getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); - - return zirconHandle; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA - Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; - VkResult result = - getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( static_cast( m_device ), - static_cast( handleType ), - zirconHandle, - reinterpret_cast( &memoryZirconHandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); - - return memoryZirconHandleProperties; - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_external_semaphore === - - VULKAN_HPP_INLINE void - Device::importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA && - "Function needs extension enabled!" ); - - VkResult result = getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &importSemaphoreZirconHandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE zx_handle_t - Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA && - "Function needs extension enabled!" ); - - zx_handle_t zirconHandle; - VkResult result = getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); - - return zirconHandle; - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - -# if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA - Device::createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA( *this, createInfo, allocator ); - } - - VULKAN_HPP_INLINE void BufferCollectionFUCHSIA::setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( &imageConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setImageConstraints" ); - } - - VULKAN_HPP_INLINE void - BufferCollectionFUCHSIA::setBufferConstraints( const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA && - "Function needs extension enabled!" ); - - VkResult result = - getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( &bufferConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setBufferConstraints" ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA BufferCollectionFUCHSIA::getProperties() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; - VkResult result = getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); - - return properties; - } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ - - //=== VK_HUAWEI_subpass_shading === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair - RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; - VkResult result = getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &maxWorkgroupSize ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); - - return std::make_pair( static_cast( result ), maxWorkgroupSize ); - } - - VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSubpassShadingHUAWEI && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSubpassShadingHUAWEI( static_cast( m_commandBuffer ) ); - } - - //=== VK_HUAWEI_invocation_mask === - - VULKAN_HPP_INLINE void CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindInvocationMaskHUAWEI && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdBindInvocationMaskHUAWEI( - static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); - } - - //=== VK_NV_external_memory_rdma === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::RemoteAddressNV - Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryRemoteAddressNV && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::RemoteAddressNV address; - VkResult result = getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), - reinterpret_cast( &memoryGetRemoteAddressInfo ), - reinterpret_cast( &address ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); - - return address; - } - - //=== VK_EXT_pipeline_properties === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::BaseOutStructure - Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelinePropertiesEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; - VkResult result = getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - reinterpret_cast( &pipelineProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); - - return pipelineProperties; - } - - //=== VK_EXT_extended_dynamic_state2 === - - VULKAN_HPP_INLINE void CommandBuffer::setPatchControlPointsEXT( uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPatchControlPointsEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetPatchControlPointsEXT( static_cast( m_commandBuffer ), patchControlPoints ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRasterizerDiscardEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetRasterizerDiscardEnableEXT( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBiasEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetDepthBiasEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLogicOpEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetLogicOpEXT( static_cast( m_commandBuffer ), static_cast( logicOp ) ); - } - - VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveRestartEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetPrimitiveRestartEnableEXT( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); - } - -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const - { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 - PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceScreenPresentationSupportQNX && - "Function needs extension enabled!" ); - - VkBool32 result = - getDispatcher()->vkGetPhysicalDeviceScreenPresentationSupportQNX( static_cast( m_physicalDevice ), queueFamilyIndex, &window ); - - return static_cast( result ); - } -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_color_write_enable === - - VULKAN_HPP_INLINE void - CommandBuffer::setColorWriteEnableEXT( ArrayProxy const & colorWriteEnables ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorWriteEnableEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdSetColorWriteEnableEXT( - static_cast( m_commandBuffer ), colorWriteEnables.size(), reinterpret_cast( colorWriteEnables.data() ) ); - } - - //=== VK_KHR_ray_tracing_maintenance1 === - - VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysIndirect2KHR && - "Function needs extension enabled!" ); - - getDispatcher()->vkCmdTraceRaysIndirect2KHR( static_cast( m_commandBuffer ), static_cast( indirectDeviceAddress ) ); - } - - //=== VK_EXT_multi_draw === - - VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( ArrayProxy const & vertexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMultiEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMultiEXT( static_cast( m_commandBuffer ), - vertexInfo.size(), - reinterpret_cast( vertexInfo.data() ), - instanceCount, - firstInstance, - stride ); - } - - VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( ArrayProxy const & indexInfo, - uint32_t instanceCount, - uint32_t firstInstance, - uint32_t stride, - Optional vertexOffset ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMultiIndexedEXT && "Function needs extension enabled!" ); - - getDispatcher()->vkCmdDrawMultiIndexedEXT( static_cast( m_commandBuffer ), - indexInfo.size(), - reinterpret_cast( indexInfo.data() ), - instanceCount, - firstInstance, - stride, - static_cast( vertexOffset ) ); - } - - //=== VK_EXT_pageable_device_local_memory === - - VULKAN_HPP_INLINE void DeviceMemory::setPriorityEXT( float priority ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkSetDeviceMemoryPriorityEXT && - "Function needs extension enabled!" ); - - getDispatcher()->vkSetDeviceMemoryPriorityEXT( static_cast( m_device ), static_cast( m_memory ), priority ); - } - - //=== VK_KHR_maintenance4 === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; - getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return memoryRequirements; - } - - template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - StructureChain structureChain; - VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); - getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR( static_cast( m_device ), - reinterpret_cast( &info ), - reinterpret_cast( &memoryRequirements ) ); - - return structureChain; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR && - "Function needs extension enabled!" ); - - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( - static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast( m_device ), - reinterpret_cast( &info ), - &sparseMemoryRequirementCount, - reinterpret_cast( sparseMemoryRequirements.data() ) ); - - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); - if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) - { - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - } - return sparseMemoryRequirements; - } - - //=== VK_VALVE_descriptor_set_host_mapping === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE Device::getDescriptorSetLayoutHostMappingInfoVALVE( - const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutHostMappingInfoVALVE && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE hostMapping; - getDispatcher()->vkGetDescriptorSetLayoutHostMappingInfoVALVE( static_cast( m_device ), - reinterpret_cast( &bindingReference ), - reinterpret_cast( &hostMapping ) ); - - return hostMapping; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DescriptorSet::getHostMappingVALVE() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetHostMappingVALVE && - "Function needs extension enabled!" ); - - void * pData; - getDispatcher()->vkGetDescriptorSetHostMappingVALVE( static_cast( m_device ), static_cast( m_descriptorSet ), &pData ); - - return pData; - } - - //=== VK_EXT_shader_module_identifier === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT ShaderModule::getIdentifierEXT() const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderModuleIdentifierEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; - getDispatcher()->vkGetShaderModuleIdentifierEXT( - static_cast( m_device ), static_cast( m_shaderModule ), reinterpret_cast( &identifier ) ); - - return identifier; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT - Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderModuleCreateInfoIdentifierEXT && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; - getDispatcher()->vkGetShaderModuleCreateInfoIdentifierEXT( static_cast( m_device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( &identifier ) ); - - return identifier; - } - - //=== VK_QCOM_tile_properties === - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Framebuffer::getTilePropertiesQCOM() const - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetFramebufferTilePropertiesQCOM && - "Function needs extension enabled!" ); - - std::vector properties; - uint32_t propertiesCount; - VkResult result; - do - { - result = getDispatcher()->vkGetFramebufferTilePropertiesQCOM( - static_cast( m_device ), static_cast( m_framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) - { - properties.resize( propertiesCount ); - result = getDispatcher()->vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), - static_cast( m_framebuffer ), - &propertiesCount, - reinterpret_cast( properties.data() ) ); - } - } while ( result == VK_INCOMPLETE ); - - VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); - if ( propertiesCount < properties.size() ) - { - properties.resize( propertiesCount ); - } - return properties; - } - - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::TilePropertiesQCOM - Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT - { - VULKAN_HPP_ASSERT( getDispatcher()->vkGetDynamicRenderingTilePropertiesQCOM && - "Function needs extension enabled!" ); - - VULKAN_HPP_NAMESPACE::TilePropertiesQCOM properties; - getDispatcher()->vkGetDynamicRenderingTilePropertiesQCOM( static_cast( m_device ), - reinterpret_cast( &renderingInfo ), - reinterpret_cast( &properties ) ); - - return properties; - } - -#endif - } // namespace VULKAN_HPP_RAII_NAMESPACE -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_static_assertions.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_static_assertions.hpp deleted file mode 100644 index da45d4a..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_static_assertions.hpp +++ /dev/null @@ -1,5847 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_STRUCTS_HPP -#define VULKAN_STRUCTS_HPP - -#include - -//========================= -//=== static_assertions === -//========================= - -//=== VK_VERSION_1_0 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Extent2D ) == sizeof( VkExtent2D ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Extent2D is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Extent3D ) == sizeof( VkExtent3D ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Extent3D is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Offset2D ) == sizeof( VkOffset2D ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Offset2D is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) == sizeof( VkOffset3D ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Offset3D is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Rect2D ) == sizeof( VkRect2D ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Rect2D is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BaseInStructure ) == sizeof( VkBaseInStructure ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BaseInStructure is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BaseOutStructure ) == sizeof( VkBaseOutStructure ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BaseOutStructure is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier ) == sizeof( VkBufferMemoryBarrier ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferMemoryBarrier is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DispatchIndirectCommand ) == sizeof( VkDispatchIndirectCommand ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DispatchIndirectCommand is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawIndexedIndirectCommand ) == sizeof( VkDrawIndexedIndirectCommand ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrawIndexedIndirectCommand is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawIndirectCommand ) == sizeof( VkDrawIndirectCommand ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrawIndirectCommand is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier ) == sizeof( VkImageMemoryBarrier ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageMemoryBarrier is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrier ) == sizeof( VkMemoryBarrier ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryBarrier is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersionOne ) == sizeof( VkPipelineCacheHeaderVersionOne ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCacheHeaderVersionOne is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AllocationCallbacks ) == sizeof( VkAllocationCallbacks ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AllocationCallbacks is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ApplicationInfo ) == sizeof( VkApplicationInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ApplicationInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties ) == sizeof( VkFormatProperties ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FormatProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatProperties ) == sizeof( VkImageFormatProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageFormatProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Instance is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InstanceCreateInfo ) == sizeof( VkInstanceCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "InstanceCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) == sizeof( VkMemoryHeap ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryHeap is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) == sizeof( VkMemoryType ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryType is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevice is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures ) == sizeof( VkPhysicalDeviceFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits ) == sizeof( VkPhysicalDeviceLimits ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceLimits is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties ) == sizeof( VkPhysicalDeviceMemoryProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMemoryProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties ) == sizeof( VkPhysicalDeviceProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties ) == sizeof( VkPhysicalDeviceSparseProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSparseProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyProperties ) == sizeof( VkQueueFamilyProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Device is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceCreateInfo ) == sizeof( VkDeviceCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo ) == sizeof( VkDeviceQueueCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceQueueCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExtensionProperties ) == sizeof( VkExtensionProperties ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExtensionProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LayerProperties ) == sizeof( VkLayerProperties ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "LayerProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Queue is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubmitInfo ) == sizeof( VkSubmitInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MappedMemoryRange ) == sizeof( VkMappedMemoryRange ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MappedMemoryRange is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo ) == sizeof( VkMemoryAllocateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemory ) == sizeof( VkDeviceMemory ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceMemory is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryRequirements ) == sizeof( VkMemoryRequirements ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryRequirements is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindSparseInfo ) == sizeof( VkBindSparseInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindSparseInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresource ) == sizeof( VkImageSubresource ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSubresource is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo ) == sizeof( VkSparseBufferMemoryBindInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseBufferMemoryBindInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties ) == sizeof( VkSparseImageFormatProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageFormatProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryBind ) == sizeof( VkSparseImageMemoryBind ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageMemoryBind is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo ) == sizeof( VkSparseImageMemoryBindInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageMemoryBindInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements ) == sizeof( VkSparseImageMemoryRequirements ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageMemoryRequirements is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo ) == sizeof( VkSparseImageOpaqueMemoryBindInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageOpaqueMemoryBindInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseMemoryBind ) == sizeof( VkSparseMemoryBind ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseMemoryBind is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Fence ) == sizeof( VkFence ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Fence is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FenceCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Semaphore ) == sizeof( VkSemaphore ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Semaphore is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Event ) == sizeof( VkEvent ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Event is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::EventCreateInfo ) == sizeof( VkEventCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "EventCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPool ) == sizeof( VkQueryPool ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPool is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo ) == sizeof( VkQueryPoolCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueryPoolCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Buffer ) == sizeof( VkBuffer ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Buffer is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCreateInfo ) == sizeof( VkBufferCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferView ) == sizeof( VkBufferView ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferView is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo ) == sizeof( VkBufferViewCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferViewCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Image ) == sizeof( VkImage ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Image is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCreateInfo ) == sizeof( VkImageCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubresourceLayout ) == sizeof( VkSubresourceLayout ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubresourceLayout is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ComponentMapping ) == sizeof( VkComponentMapping ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ComponentMapping is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresourceRange ) == sizeof( VkImageSubresourceRange ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSubresourceRange is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageView ) == sizeof( VkImageView ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageView is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo ) == sizeof( VkImageViewCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModule ) == sizeof( VkShaderModule ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderModule is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo ) == sizeof( VkShaderModuleCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShaderModuleCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCache ) == sizeof( VkPipelineCache ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCache is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo ) == sizeof( VkPipelineCacheCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCacheCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo ) == sizeof( VkComputePipelineCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ComputePipelineCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo ) == sizeof( VkGraphicsPipelineCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GraphicsPipelineCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Pipeline ) == sizeof( VkPipeline ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Pipeline is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState ) == sizeof( VkPipelineColorBlendAttachmentState ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineColorBlendAttachmentState is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo ) == sizeof( VkPipelineColorBlendStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineColorBlendStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo ) == sizeof( VkPipelineDepthStencilStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineDepthStencilStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo ) == sizeof( VkPipelineDynamicStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineDynamicStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo ) == sizeof( VkPipelineInputAssemblyStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineInputAssemblyStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo ) == sizeof( VkPipelineMultisampleStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineMultisampleStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo ) == sizeof( VkPipelineRasterizationStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo ) == sizeof( VkPipelineShaderStageCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineShaderStageCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo ) == sizeof( VkPipelineTessellationStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineTessellationStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo ) == sizeof( VkPipelineVertexInputStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineVertexInputStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo ) == sizeof( VkPipelineViewportStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SpecializationInfo ) == sizeof( VkSpecializationInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SpecializationInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SpecializationMapEntry ) == sizeof( VkSpecializationMapEntry ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SpecializationMapEntry is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StencilOpState ) == sizeof( VkStencilOpState ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "StencilOpState is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription ) == sizeof( VkVertexInputAttributeDescription ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VertexInputAttributeDescription is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription ) == sizeof( VkVertexInputBindingDescription ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VertexInputBindingDescription is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Viewport ) == sizeof( VkViewport ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Viewport is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLayout ) == sizeof( VkPipelineLayout ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineLayout is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineLayoutCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PushConstantRange ) == sizeof( VkPushConstantRange ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PushConstantRange is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Sampler ) == sizeof( VkSampler ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Sampler is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCreateInfo ) == sizeof( VkSamplerCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyDescriptorSet ) == sizeof( VkCopyDescriptorSet ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyDescriptorSet is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorBufferInfo ) == sizeof( VkDescriptorBufferInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorBufferInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorImageInfo ) == sizeof( VkDescriptorImageInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorImageInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPool ) == sizeof( VkDescriptorPool ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorPool is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo ) == sizeof( VkDescriptorPoolCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorPoolCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolSize ) == sizeof( VkDescriptorPoolSize ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorPoolSize is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSet ) == sizeof( VkDescriptorSet ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSet is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo ) == sizeof( VkDescriptorSetAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayout ) == sizeof( VkDescriptorSetLayout ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayout is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding ) == sizeof( VkDescriptorSetLayoutBinding ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayoutBinding is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo ) == sizeof( VkDescriptorSetLayoutCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayoutCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSet ) == sizeof( VkWriteDescriptorSet ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "WriteDescriptorSet is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescription ) == sizeof( VkAttachmentDescription ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentDescription is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReference ) == sizeof( VkAttachmentReference ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentReference is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Framebuffer ) == sizeof( VkFramebuffer ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Framebuffer is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo ) == sizeof( VkFramebufferCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FramebufferCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPass ) == sizeof( VkRenderPass ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPass is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDependency ) == sizeof( VkSubpassDependency ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassDependency is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescription ) == sizeof( VkSubpassDescription ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassDescription is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandPool ) == sizeof( VkCommandPool ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandPool is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo ) == sizeof( VkCommandPoolCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandPoolCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBuffer is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo ) == sizeof( VkCommandBufferAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo ) == sizeof( VkCommandBufferBeginInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferBeginInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo ) == sizeof( VkCommandBufferInheritanceInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferInheritanceInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCopy ) == sizeof( VkBufferCopy ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCopy is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferImageCopy ) == sizeof( VkBufferImageCopy ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferImageCopy is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearAttachment ) == sizeof( VkClearAttachment ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ClearAttachment is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearColorValue ) == sizeof( VkClearColorValue ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ClearColorValue is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue ) == sizeof( VkClearDepthStencilValue ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ClearDepthStencilValue is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearRect ) == sizeof( VkClearRect ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearRect is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearValue ) == sizeof( VkClearValue ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearValue is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageBlit ) == sizeof( VkImageBlit ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageBlit is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCopy ) == sizeof( VkImageCopy ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCopy is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageResolve ) == sizeof( VkImageResolve ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageResolve is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers ) == sizeof( VkImageSubresourceLayers ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSubresourceLayers is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo ) == sizeof( VkRenderPassBeginInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassBeginInfo is not nothrow_move_constructible!" ); - -//=== VK_VERSION_1_1 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties ) == sizeof( VkPhysicalDeviceSubgroupProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubgroupProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo ) == sizeof( VkBindBufferMemoryInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindBufferMemoryInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo ) == sizeof( VkBindImageMemoryInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindImageMemoryInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures ) == sizeof( VkPhysicalDevice16BitStorageFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevice16BitStorageFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements ) == sizeof( VkMemoryDedicatedRequirements ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryDedicatedRequirements is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo ) == sizeof( VkMemoryDedicatedAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryDedicatedAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo ) == sizeof( VkMemoryAllocateFlagsInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryAllocateFlagsInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo ) == sizeof( VkDeviceGroupRenderPassBeginInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupRenderPassBeginInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo ) == sizeof( VkDeviceGroupCommandBufferBeginInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupCommandBufferBeginInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo ) == sizeof( VkDeviceGroupSubmitInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupSubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo ) == sizeof( VkDeviceGroupBindSparseInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupBindSparseInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo ) == sizeof( VkBindBufferMemoryDeviceGroupInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindBufferMemoryDeviceGroupInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo ) == sizeof( VkBindImageMemoryDeviceGroupInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindImageMemoryDeviceGroupInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties ) == sizeof( VkPhysicalDeviceGroupProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceGroupProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo ) == sizeof( VkDeviceGroupDeviceCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupDeviceCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 ) == sizeof( VkBufferMemoryRequirementsInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 ) == sizeof( VkImageMemoryRequirementsInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 ) == sizeof( VkImageSparseMemoryRequirementsInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSparseMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryRequirements2 ) == sizeof( VkMemoryRequirements2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryRequirements2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 ) == sizeof( VkSparseImageMemoryRequirements2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageMemoryRequirements2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 ) == sizeof( VkPhysicalDeviceFeatures2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFeatures2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 ) == sizeof( VkPhysicalDeviceProperties2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties2 ) == sizeof( VkFormatProperties2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FormatProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 ) == sizeof( VkImageFormatProperties2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageFormatProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 ) == sizeof( VkPhysicalDeviceImageFormatInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageFormatInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 ) == sizeof( VkQueueFamilyProperties2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 ) == sizeof( VkPhysicalDeviceMemoryProperties2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMemoryProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 ) == sizeof( VkSparseImageFormatProperties2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SparseImageFormatProperties2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSparseImageFormatInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties ) == sizeof( VkPhysicalDevicePointClippingProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePointClippingProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassInputAttachmentAspectCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference ) == sizeof( VkInputAttachmentAspectReference ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "InputAttachmentAspectReference is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo ) == sizeof( VkImageViewUsageCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewUsageCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo ) == - sizeof( VkPipelineTessellationDomainOriginStateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineTessellationDomainOriginStateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo ) == sizeof( VkRenderPassMultiviewCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassMultiviewCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures ) == sizeof( VkPhysicalDeviceMultiviewFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultiviewFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties ) == sizeof( VkPhysicalDeviceMultiviewProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultiviewProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures ) == sizeof( VkPhysicalDeviceVariablePointersFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVariablePointersFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures ) == sizeof( VkPhysicalDeviceProtectedMemoryFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProtectedMemoryFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties ) == sizeof( VkPhysicalDeviceProtectedMemoryProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProtectedMemoryProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 ) == sizeof( VkDeviceQueueInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceQueueInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo ) == sizeof( VkProtectedSubmitInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ProtectedSubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo ) == sizeof( VkSamplerYcbcrConversionCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerYcbcrConversionCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo ) == sizeof( VkSamplerYcbcrConversionInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerYcbcrConversionInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo ) == sizeof( VkBindImagePlaneMemoryInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindImagePlaneMemoryInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo ) == sizeof( VkImagePlaneMemoryRequirementsInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImagePlaneMemoryRequirementsInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures ) == - sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSamplerYcbcrConversionFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties ) == - sizeof( VkSamplerYcbcrConversionImageFormatProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerYcbcrConversionImageFormatProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ) == sizeof( VkSamplerYcbcrConversion ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerYcbcrConversion is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate ) == sizeof( VkDescriptorUpdateTemplate ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorUpdateTemplate is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry ) == sizeof( VkDescriptorUpdateTemplateEntry ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorUpdateTemplateEntry is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo ) == sizeof( VkDescriptorUpdateTemplateCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorUpdateTemplateCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties ) == sizeof( VkExternalMemoryProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalMemoryProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo ) == sizeof( VkPhysicalDeviceExternalImageFormatInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalImageFormatInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties ) == sizeof( VkExternalImageFormatProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalImageFormatProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo ) == sizeof( VkPhysicalDeviceExternalBufferInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalBufferInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalBufferProperties ) == sizeof( VkExternalBufferProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalBufferProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties ) == sizeof( VkPhysicalDeviceIDProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceIDProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo ) == sizeof( VkExternalMemoryImageCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalMemoryImageCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo ) == sizeof( VkExternalMemoryBufferCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalMemoryBufferCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo ) == sizeof( VkExportMemoryAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMemoryAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo ) == sizeof( VkPhysicalDeviceExternalFenceInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalFenceInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalFenceProperties ) == sizeof( VkExternalFenceProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalFenceProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo ) == sizeof( VkExportFenceCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportFenceCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo ) == sizeof( VkExportSemaphoreCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportSemaphoreCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalSemaphoreInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties ) == sizeof( VkExternalSemaphoreProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalSemaphoreProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties ) == sizeof( VkPhysicalDeviceMaintenance3Properties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMaintenance3Properties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport ) == sizeof( VkDescriptorSetLayoutSupport ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayoutSupport is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures ) == sizeof( VkPhysicalDeviceShaderDrawParametersFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderDrawParametersFeatures is not nothrow_move_constructible!" ); - -//=== VK_VERSION_1_2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features ) == sizeof( VkPhysicalDeviceVulkan11Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan11Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties ) == sizeof( VkPhysicalDeviceVulkan11Properties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan11Properties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features ) == sizeof( VkPhysicalDeviceVulkan12Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan12Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties ) == sizeof( VkPhysicalDeviceVulkan12Properties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan12Properties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo ) == sizeof( VkImageFormatListCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageFormatListCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 ) == sizeof( VkRenderPassCreateInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassCreateInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescription2 ) == sizeof( VkAttachmentDescription2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentDescription2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReference2 ) == sizeof( VkAttachmentReference2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentReference2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescription2 ) == sizeof( VkSubpassDescription2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassDescription2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDependency2 ) == sizeof( VkSubpassDependency2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassDependency2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassBeginInfo ) == sizeof( VkSubpassBeginInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassBeginInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassEndInfo ) == sizeof( VkSubpassEndInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassEndInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures ) == sizeof( VkPhysicalDevice8BitStorageFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevice8BitStorageFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ConformanceVersion ) == sizeof( VkConformanceVersion ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ConformanceVersion is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties ) == sizeof( VkPhysicalDeviceDriverProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDriverProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features ) == sizeof( VkPhysicalDeviceShaderAtomicInt64Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderAtomicInt64Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features ) == sizeof( VkPhysicalDeviceShaderFloat16Int8Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderFloat16Int8Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties ) == sizeof( VkPhysicalDeviceFloatControlsProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFloatControlsProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayoutBindingFlagsCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDescriptorIndexingFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties ) == sizeof( VkPhysicalDeviceDescriptorIndexingProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDescriptorIndexingProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo ) == - sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetVariableDescriptorCountAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport ) == - sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupport ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetVariableDescriptorCountLayoutSupport is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve ) == sizeof( VkSubpassDescriptionDepthStencilResolve ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassDescriptionDepthStencilResolve is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties ) == - sizeof( VkPhysicalDeviceDepthStencilResolveProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDepthStencilResolveProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures ) == sizeof( VkPhysicalDeviceScalarBlockLayoutFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceScalarBlockLayoutFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo ) == sizeof( VkImageStencilUsageCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageStencilUsageCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo ) == sizeof( VkSamplerReductionModeCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerReductionModeCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties ) == - sizeof( VkPhysicalDeviceSamplerFilterMinmaxProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSamplerFilterMinmaxProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkanMemoryModelFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures ) == sizeof( VkPhysicalDeviceImagelessFramebufferFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImagelessFramebufferFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo ) == sizeof( VkFramebufferAttachmentsCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FramebufferAttachmentsCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo ) == sizeof( VkFramebufferAttachmentImageInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FramebufferAttachmentImageInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo ) == sizeof( VkRenderPassAttachmentBeginInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassAttachmentBeginInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures ) == - sizeof( VkPhysicalDeviceUniformBufferStandardLayoutFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceUniformBufferStandardLayoutFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures ) == - sizeof( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderSubgroupExtendedTypesFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures ) == - sizeof( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSeparateDepthStencilLayoutsFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout ) == sizeof( VkAttachmentReferenceStencilLayout ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentReferenceStencilLayout is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout ) == sizeof( VkAttachmentDescriptionStencilLayout ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentDescriptionStencilLayout is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures ) == sizeof( VkPhysicalDeviceHostQueryResetFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceHostQueryResetFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures ) == sizeof( VkPhysicalDeviceTimelineSemaphoreFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTimelineSemaphoreFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties ) == sizeof( VkPhysicalDeviceTimelineSemaphoreProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTimelineSemaphoreProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo ) == sizeof( VkSemaphoreTypeCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreTypeCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo ) == sizeof( VkTimelineSemaphoreSubmitInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TimelineSemaphoreSubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo ) == sizeof( VkSemaphoreWaitInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreWaitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo ) == sizeof( VkSemaphoreSignalInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreSignalInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceBufferDeviceAddressFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo ) == sizeof( VkBufferDeviceAddressInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferDeviceAddressInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo ) == sizeof( VkBufferOpaqueCaptureAddressCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferOpaqueCaptureAddressCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo ) == sizeof( VkMemoryOpaqueCaptureAddressAllocateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryOpaqueCaptureAddressAllocateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo ) == sizeof( VkDeviceMemoryOpaqueCaptureAddressInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceMemoryOpaqueCaptureAddressInfo is not nothrow_move_constructible!" ); - -//=== VK_VERSION_1_3 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Features ) == sizeof( VkPhysicalDeviceVulkan13Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan13Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Properties ) == sizeof( VkPhysicalDeviceVulkan13Properties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVulkan13Properties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfo ) == sizeof( VkPipelineCreationFeedbackCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCreationFeedbackCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback ) == sizeof( VkPipelineCreationFeedback ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCreationFeedback is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTerminateInvocationFeatures ) == - sizeof( VkPhysicalDeviceShaderTerminateInvocationFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderTerminateInvocationFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties ) == sizeof( VkPhysicalDeviceToolProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceToolProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeatures ) == - sizeof( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderDemoteToHelperInvocationFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrivateDataFeatures ) == sizeof( VkPhysicalDevicePrivateDataFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePrivateDataFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DevicePrivateDataCreateInfo ) == sizeof( VkDevicePrivateDataCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DevicePrivateDataCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo ) == sizeof( VkPrivateDataSlotCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PrivateDataSlotCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PrivateDataSlot ) == sizeof( VkPrivateDataSlot ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PrivateDataSlot is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineCreationCacheControlFeatures ) == - sizeof( VkPhysicalDevicePipelineCreationCacheControlFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePipelineCreationCacheControlFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrier2 ) == sizeof( VkMemoryBarrier2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryBarrier2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 ) == sizeof( VkBufferMemoryBarrier2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferMemoryBarrier2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 ) == sizeof( VkImageMemoryBarrier2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageMemoryBarrier2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DependencyInfo ) == sizeof( VkDependencyInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DependencyInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubmitInfo2 ) == sizeof( VkSubmitInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubmitInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo ) == sizeof( VkSemaphoreSubmitInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreSubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo ) == sizeof( VkCommandBufferSubmitInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferSubmitInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSynchronization2Features ) == sizeof( VkPhysicalDeviceSynchronization2Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSynchronization2Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ) == - sizeof( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageRobustnessFeatures ) == sizeof( VkPhysicalDeviceImageRobustnessFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageRobustnessFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyBufferInfo2 ) == sizeof( VkCopyBufferInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyBufferInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageInfo2 ) == sizeof( VkCopyImageInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyImageInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 ) == sizeof( VkCopyBufferToImageInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyBufferToImageInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 ) == sizeof( VkCopyImageToBufferInfo2 ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyImageToBufferInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BlitImageInfo2 ) == sizeof( VkBlitImageInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BlitImageInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ResolveImageInfo2 ) == sizeof( VkResolveImageInfo2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ResolveImageInfo2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCopy2 ) == sizeof( VkBufferCopy2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCopy2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCopy2 ) == sizeof( VkImageCopy2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCopy2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageBlit2 ) == sizeof( VkImageBlit2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageBlit2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferImageCopy2 ) == sizeof( VkBufferImageCopy2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferImageCopy2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageResolve2 ) == sizeof( VkImageResolve2 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageResolve2 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeatures ) == sizeof( VkPhysicalDeviceSubgroupSizeControlFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubgroupSizeControlFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlProperties ) == - sizeof( VkPhysicalDeviceSubgroupSizeControlProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubgroupSizeControlProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfo ) == - sizeof( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineShaderStageRequiredSubgroupSizeCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeatures ) == sizeof( VkPhysicalDeviceInlineUniformBlockFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceInlineUniformBlockFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockProperties ) == sizeof( VkPhysicalDeviceInlineUniformBlockProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceInlineUniformBlockProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlock ) == sizeof( VkWriteDescriptorSetInlineUniformBlock ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "WriteDescriptorSetInlineUniformBlock is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfo ) == sizeof( VkDescriptorPoolInlineUniformBlockCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorPoolInlineUniformBlockCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeatures ) == - sizeof( VkPhysicalDeviceTextureCompressionASTCHDRFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTextureCompressionASTCHDRFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingInfo ) == sizeof( VkRenderingInfo ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo ) == sizeof( VkRenderingAttachmentInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderingAttachmentInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRenderingCreateInfo ) == sizeof( VkPipelineRenderingCreateInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRenderingCreateInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingFeatures ) == sizeof( VkPhysicalDeviceDynamicRenderingFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDynamicRenderingFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderingInfo ) == sizeof( VkCommandBufferInheritanceRenderingInfo ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferInheritanceRenderingInfo is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductFeatures ) == - sizeof( VkPhysicalDeviceShaderIntegerDotProductFeatures ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderIntegerDotProductFeatures is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductProperties ) == - sizeof( VkPhysicalDeviceShaderIntegerDotProductProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderIntegerDotProductProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentProperties ) == - sizeof( VkPhysicalDeviceTexelBufferAlignmentProperties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTexelBufferAlignmentProperties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties3 ) == sizeof( VkFormatProperties3 ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FormatProperties3 is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Features ) == sizeof( VkPhysicalDeviceMaintenance4Features ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMaintenance4Features is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Properties ) == sizeof( VkPhysicalDeviceMaintenance4Properties ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMaintenance4Properties is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements ) == sizeof( VkDeviceBufferMemoryRequirements ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceBufferMemoryRequirements is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements ) == sizeof( VkDeviceImageMemoryRequirements ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceImageMemoryRequirements is not nothrow_move_constructible!" ); - -//=== VK_KHR_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceKHR ) == sizeof( VkSurfaceKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR ) == sizeof( VkSurfaceCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR ) == sizeof( VkSurfaceFormatKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceFormatKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_swapchain === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR ) == sizeof( VkSwapchainCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SwapchainCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainKHR ) == sizeof( VkSwapchainKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentInfoKHR ) == sizeof( VkPresentInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR ) == sizeof( VkImageSwapchainCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSwapchainCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR ) == sizeof( VkBindImageMemorySwapchainInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindImageMemorySwapchainInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR ) == sizeof( VkAcquireNextImageInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AcquireNextImageInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR ) == sizeof( VkDeviceGroupPresentCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupPresentCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR ) == sizeof( VkDeviceGroupPresentInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupPresentInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceGroupSwapchainCreateInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_display === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayKHR ) == sizeof( VkDisplayKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR ) == sizeof( VkDisplayModeCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayModeCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeKHR ) == sizeof( VkDisplayModeKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayModeKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR ) == sizeof( VkDisplayModeParametersKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayModeParametersKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR ) == sizeof( VkDisplayModePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayModePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR ) == sizeof( VkDisplayPlaneCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPlaneCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR ) == sizeof( VkDisplayPlanePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPlanePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR ) == sizeof( VkDisplayPropertiesKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR ) == sizeof( VkDisplaySurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplaySurfaceCreateInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_display_swapchain === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR ) == sizeof( VkDisplayPresentInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPresentInfoKHR is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) -//=== VK_KHR_xlib_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR ) == sizeof( VkXlibSurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "XlibSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) -//=== VK_KHR_xcb_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR ) == sizeof( VkXcbSurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "XcbSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) -//=== VK_KHR_wayland_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR ) == sizeof( VkWaylandSurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "WaylandSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) -//=== VK_KHR_android_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR ) == sizeof( VkAndroidSurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AndroidSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_KHR_win32_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR ) == sizeof( VkWin32SurfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "Win32SurfaceCreateInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_EXT_debug_report === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT ) == sizeof( VkDebugReportCallbackEXT ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugReportCallbackEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT ) == sizeof( VkDebugReportCallbackCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugReportCallbackCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_AMD_rasterization_order === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD ) == - sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationStateRasterizationOrderAMD is not nothrow_move_constructible!" ); - -//=== VK_EXT_debug_marker === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT ) == sizeof( VkDebugMarkerObjectNameInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugMarkerObjectNameInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT ) == sizeof( VkDebugMarkerObjectTagInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugMarkerObjectTagInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT ) == sizeof( VkDebugMarkerMarkerInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugMarkerMarkerInfoEXT is not nothrow_move_constructible!" ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_KHR_video_queue === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionKHR ) == sizeof( VkVideoSessionKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR ) == sizeof( VkVideoSessionParametersKHR ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionParametersKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyQueryResultStatusPropertiesKHR ) == sizeof( VkQueueFamilyQueryResultStatusPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyQueryResultStatusPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyVideoPropertiesKHR ) == sizeof( VkQueueFamilyVideoPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyVideoPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR ) == sizeof( VkVideoProfileInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoProfileInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoProfileListInfoKHR ) == sizeof( VkVideoProfileListInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoProfileListInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR ) == sizeof( VkVideoCapabilitiesKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR ) == sizeof( VkPhysicalDeviceVideoFormatInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVideoFormatInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR ) == sizeof( VkVideoFormatPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoFormatPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR ) == sizeof( VkVideoPictureResourceInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoPictureResourceInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR ) == sizeof( VkVideoReferenceSlotInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoReferenceSlotInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR ) == sizeof( VkVideoSessionMemoryRequirementsKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionMemoryRequirementsKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR ) == sizeof( VkBindVideoSessionMemoryInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindVideoSessionMemoryInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR ) == sizeof( VkVideoSessionCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR ) == sizeof( VkVideoSessionParametersCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR ) == sizeof( VkVideoSessionParametersUpdateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoSessionParametersUpdateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR ) == sizeof( VkVideoBeginCodingInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoBeginCodingInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR ) == sizeof( VkVideoEndCodingInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEndCodingInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR ) == sizeof( VkVideoCodingControlInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoCodingControlInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_KHR_video_decode_queue === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilitiesKHR ) == sizeof( VkVideoDecodeCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeUsageInfoKHR ) == sizeof( VkVideoDecodeUsageInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeUsageInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR ) == sizeof( VkVideoDecodeInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -//=== VK_NV_dedicated_allocation === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DedicatedAllocationImageCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DedicatedAllocationBufferCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV ) == sizeof( VkDedicatedAllocationMemoryAllocateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DedicatedAllocationMemoryAllocateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_transform_feedback === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTransformFeedbackFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT ) == - sizeof( VkPhysicalDeviceTransformFeedbackPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTransformFeedbackPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT ) == - sizeof( VkPipelineRasterizationStateStreamCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationStateStreamCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_NVX_binary_import === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuModuleNVX ) == sizeof( VkCuModuleNVX ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuModuleNVX is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuFunctionNVX ) == sizeof( VkCuFunctionNVX ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuFunctionNVX is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX ) == sizeof( VkCuModuleCreateInfoNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CuModuleCreateInfoNVX is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX ) == sizeof( VkCuFunctionCreateInfoNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CuFunctionCreateInfoNVX is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX ) == sizeof( VkCuLaunchInfoNVX ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CuLaunchInfoNVX is not nothrow_move_constructible!" ); - -//=== VK_NVX_image_view_handle === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX ) == sizeof( VkImageViewHandleInfoNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewHandleInfoNVX is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX ) == sizeof( VkImageViewAddressPropertiesNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewAddressPropertiesNVX is not nothrow_move_constructible!" ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_EXT_video_encode_h264 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesEXT ) == sizeof( VkVideoEncodeH264CapabilitiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264CapabilitiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersCreateInfoEXT ) == - sizeof( VkVideoEncodeH264SessionParametersCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264SessionParametersCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoEXT ) == sizeof( VkVideoEncodeH264SessionParametersAddInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264SessionParametersAddInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264VclFrameInfoEXT ) == sizeof( VkVideoEncodeH264VclFrameInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264VclFrameInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT ) == sizeof( VkVideoEncodeH264ReferenceListsInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264ReferenceListsInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264EmitPictureParametersInfoEXT ) == - sizeof( VkVideoEncodeH264EmitPictureParametersInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264EmitPictureParametersInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT ) == sizeof( VkVideoEncodeH264DpbSlotInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264DpbSlotInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoEXT ) == sizeof( VkVideoEncodeH264NaluSliceInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264NaluSliceInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264ProfileInfoEXT ) == sizeof( VkVideoEncodeH264ProfileInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264ProfileInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlInfoEXT ) == sizeof( VkVideoEncodeH264RateControlInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264RateControlInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlLayerInfoEXT ) == sizeof( VkVideoEncodeH264RateControlLayerInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264RateControlLayerInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT ) == sizeof( VkVideoEncodeH264QpEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264QpEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeEXT ) == sizeof( VkVideoEncodeH264FrameSizeEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH264FrameSizeEXT is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_EXT_video_encode_h265 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilitiesEXT ) == sizeof( VkVideoEncodeH265CapabilitiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265CapabilitiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersCreateInfoEXT ) == - sizeof( VkVideoEncodeH265SessionParametersCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265SessionParametersCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoEXT ) == sizeof( VkVideoEncodeH265SessionParametersAddInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265SessionParametersAddInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265VclFrameInfoEXT ) == sizeof( VkVideoEncodeH265VclFrameInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265VclFrameInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265EmitPictureParametersInfoEXT ) == - sizeof( VkVideoEncodeH265EmitPictureParametersInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265EmitPictureParametersInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT ) == sizeof( VkVideoEncodeH265DpbSlotInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265DpbSlotInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoEXT ) == sizeof( VkVideoEncodeH265NaluSliceSegmentInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265NaluSliceSegmentInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265ProfileInfoEXT ) == sizeof( VkVideoEncodeH265ProfileInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265ProfileInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT ) == sizeof( VkVideoEncodeH265ReferenceListsInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265ReferenceListsInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlInfoEXT ) == sizeof( VkVideoEncodeH265RateControlInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265RateControlInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlLayerInfoEXT ) == sizeof( VkVideoEncodeH265RateControlLayerInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265RateControlLayerInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT ) == sizeof( VkVideoEncodeH265QpEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265QpEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeEXT ) == sizeof( VkVideoEncodeH265FrameSizeEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeH265FrameSizeEXT is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_EXT_video_decode_h264 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264ProfileInfoEXT ) == sizeof( VkVideoDecodeH264ProfileInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264ProfileInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264CapabilitiesEXT ) == sizeof( VkVideoDecodeH264CapabilitiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264CapabilitiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersCreateInfoEXT ) == - sizeof( VkVideoDecodeH264SessionParametersCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264SessionParametersCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoEXT ) == sizeof( VkVideoDecodeH264SessionParametersAddInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264SessionParametersAddInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureInfoEXT ) == sizeof( VkVideoDecodeH264PictureInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264PictureInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264MvcInfoEXT ) == sizeof( VkVideoDecodeH264MvcInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264MvcInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264DpbSlotInfoEXT ) == sizeof( VkVideoDecodeH264DpbSlotInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH264DpbSlotInfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -//=== VK_AMD_texture_gather_bias_lod === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TextureLODGatherFormatPropertiesAMD is not nothrow_move_constructible!" ); - -//=== VK_AMD_shader_info === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShaderResourceUsageAMD is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShaderStatisticsInfoAMD is not nothrow_move_constructible!" ); - -//=== VK_KHR_dynamic_rendering === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingFragmentShadingRateAttachmentInfoKHR ) == - sizeof( VkRenderingFragmentShadingRateAttachmentInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderingFragmentShadingRateAttachmentInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingFragmentDensityMapAttachmentInfoEXT ) == - sizeof( VkRenderingFragmentDensityMapAttachmentInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderingFragmentDensityMapAttachmentInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentSampleCountInfoAMD ) == sizeof( VkAttachmentSampleCountInfoAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentSampleCountInfoAMD is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiviewPerViewAttributesInfoNVX ) == sizeof( VkMultiviewPerViewAttributesInfoNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MultiviewPerViewAttributesInfoNVX is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_GGP ) -//=== VK_GGP_stream_descriptor_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP ) == sizeof( VkStreamDescriptorSurfaceCreateInfoGGP ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "StreamDescriptorSurfaceCreateInfoGGP is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_GGP*/ - -//=== VK_NV_corner_sampled_image === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV ) == sizeof( VkPhysicalDeviceCornerSampledImageFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCornerSampledImageFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_external_memory_capabilities === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV ) == sizeof( VkExternalImageFormatPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalImageFormatPropertiesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_external_memory === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalMemoryImageCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMemoryAllocateInfoNV is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_NV_external_memory_win32 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV ) == sizeof( VkImportMemoryWin32HandleInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryWin32HandleInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV ) == sizeof( VkExportMemoryWin32HandleInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMemoryWin32HandleInfoNV is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_NV_win32_keyed_mutex === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "Win32KeyedMutexAcquireReleaseInfoNV is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_EXT_validation_flags === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT ) == sizeof( VkValidationFlagsEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ValidationFlagsEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_VI_NN ) -//=== VK_NN_vi_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN ) == sizeof( VkViSurfaceCreateInfoNN ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ViSurfaceCreateInfoNN is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_VI_NN*/ - -//=== VK_EXT_astc_decode_mode === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT ) == sizeof( VkImageViewASTCDecodeModeEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewASTCDecodeModeEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT ) == sizeof( VkPhysicalDeviceASTCDecodeFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceASTCDecodeFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_pipeline_robustness === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessFeaturesEXT ) == - sizeof( VkPhysicalDevicePipelineRobustnessFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePipelineRobustnessFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessPropertiesEXT ) == - sizeof( VkPhysicalDevicePipelineRobustnessPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePipelineRobustnessPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRobustnessCreateInfoEXT ) == sizeof( VkPipelineRobustnessCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRobustnessCreateInfoEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_KHR_external_memory_win32 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR ) == sizeof( VkImportMemoryWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR ) == sizeof( VkExportMemoryWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMemoryWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryWin32HandlePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR ) == sizeof( VkMemoryGetWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_KHR_external_memory_fd === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR ) == sizeof( VkImportMemoryFdInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryFdInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryFdPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryGetFdInfoKHR is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_KHR_win32_keyed_mutex === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "Win32KeyedMutexAcquireReleaseInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_KHR_external_semaphore_win32 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR ) == sizeof( VkImportSemaphoreWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportSemaphoreWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR ) == sizeof( VkExportSemaphoreWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportSemaphoreWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR ) == sizeof( VkD3D12FenceSubmitInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "D3D12FenceSubmitInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR ) == sizeof( VkSemaphoreGetWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_KHR_external_semaphore_fd === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR ) == sizeof( VkImportSemaphoreFdInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportSemaphoreFdInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR ) == sizeof( VkSemaphoreGetFdInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreGetFdInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_push_descriptor === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR ) == sizeof( VkPhysicalDevicePushDescriptorPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePushDescriptorPropertiesKHR is not nothrow_move_constructible!" ); - -//=== VK_EXT_conditional_rendering === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT ) == sizeof( VkConditionalRenderingBeginInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ConditionalRenderingBeginInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT ) == - sizeof( VkPhysicalDeviceConditionalRenderingFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceConditionalRenderingFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT ) == - sizeof( VkCommandBufferInheritanceConditionalRenderingInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferInheritanceConditionalRenderingInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_incremental_present === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentRegionsKHR ) == sizeof( VkPresentRegionsKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentRegionsKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentRegionKHR ) == sizeof( VkPresentRegionKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentRegionKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RectLayerKHR ) == sizeof( VkRectLayerKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RectLayerKHR is not nothrow_move_constructible!" ); - -//=== VK_NV_clip_space_w_scaling === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViewportWScalingNV ) == sizeof( VkViewportWScalingNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ViewportWScalingNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV ) == sizeof( VkPipelineViewportWScalingStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportWScalingStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_display_surface_counter === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT ) == sizeof( VkSurfaceCapabilities2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceCapabilities2EXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_display_control === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPowerInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceEventInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayEventInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SwapchainCounterCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_GOOGLE_display_timing === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE ) == sizeof( VkRefreshCycleDurationGOOGLE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RefreshCycleDurationGOOGLE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE ) == sizeof( VkPastPresentationTimingGOOGLE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PastPresentationTimingGOOGLE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE ) == sizeof( VkPresentTimesInfoGOOGLE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentTimesInfoGOOGLE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE ) == sizeof( VkPresentTimeGOOGLE ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentTimeGOOGLE is not nothrow_move_constructible!" ); - -//=== VK_NVX_multiview_per_view_attributes === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == - sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX is not nothrow_move_constructible!" ); - -//=== VK_NV_viewport_swizzle === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViewportSwizzleNV ) == sizeof( VkViewportSwizzleNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ViewportSwizzleNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV ) == sizeof( VkPipelineViewportSwizzleStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportSwizzleStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_discard_rectangles === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT ) == - sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDiscardRectanglePropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT ) == sizeof( VkPipelineDiscardRectangleStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineDiscardRectangleStateCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_conservative_rasterization === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT ) == - sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceConservativeRasterizationPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT ) == - sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationConservativeStateCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_depth_clip_enable === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipEnableFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDepthClipEnableFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT ) == - sizeof( VkPipelineRasterizationDepthClipStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationDepthClipStateCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_hdr_metadata === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HdrMetadataEXT ) == sizeof( VkHdrMetadataEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "HdrMetadataEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XYColorEXT ) == sizeof( VkXYColorEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "XYColorEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_shared_presentable_image === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SharedPresentSurfaceCapabilitiesKHR is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_KHR_external_fence_win32 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR ) == sizeof( VkImportFenceWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportFenceWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR ) == sizeof( VkExportFenceWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportFenceWin32HandleInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR ) == sizeof( VkFenceGetWin32HandleInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FenceGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_KHR_external_fence_fd === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR ) == sizeof( VkImportFenceFdInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportFenceFdInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR ) == sizeof( VkFenceGetFdInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FenceGetFdInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_performance_query === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR ) == sizeof( VkPhysicalDevicePerformanceQueryFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePerformanceQueryFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR ) == - sizeof( VkPhysicalDevicePerformanceQueryPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePerformanceQueryPropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR ) == sizeof( VkPerformanceCounterKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceCounterKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR ) == sizeof( VkPerformanceCounterDescriptionKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceCounterDescriptionKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR ) == sizeof( VkQueryPoolPerformanceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueryPoolPerformanceCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR ) == sizeof( VkPerformanceCounterResultKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceCounterResultKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR ) == sizeof( VkAcquireProfilingLockInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AcquireProfilingLockInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR ) == sizeof( VkPerformanceQuerySubmitInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceQuerySubmitInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_get_surface_capabilities2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSurfaceInfo2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceCapabilities2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceFormat2KHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_get_display_properties2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR ) == sizeof( VkDisplayProperties2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayProperties2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR ) == sizeof( VkDisplayPlaneProperties2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPlaneProperties2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR ) == sizeof( VkDisplayModeProperties2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayModeProperties2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR ) == sizeof( VkDisplayPlaneInfo2KHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPlaneInfo2KHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR ) == sizeof( VkDisplayPlaneCapabilities2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayPlaneCapabilities2KHR is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_IOS_MVK ) -//=== VK_MVK_ios_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK ) == sizeof( VkIOSSurfaceCreateInfoMVK ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "IOSSurfaceCreateInfoMVK is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) -//=== VK_MVK_macos_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK ) == sizeof( VkMacOSSurfaceCreateInfoMVK ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MacOSSurfaceCreateInfoMVK is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - -//=== VK_EXT_debug_utils === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT ) == sizeof( VkDebugUtilsLabelEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsLabelEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT ) == sizeof( VkDebugUtilsMessengerCallbackDataEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsMessengerCallbackDataEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT ) == sizeof( VkDebugUtilsMessengerCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsMessengerCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT ) == sizeof( VkDebugUtilsMessengerEXT ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsMessengerEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT ) == sizeof( VkDebugUtilsObjectNameInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsObjectNameInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT ) == sizeof( VkDebugUtilsObjectTagInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DebugUtilsObjectTagInfoEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) -//=== VK_ANDROID_external_memory_android_hardware_buffer === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID ) == sizeof( VkAndroidHardwareBufferUsageANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AndroidHardwareBufferUsageANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferPropertiesANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AndroidHardwareBufferPropertiesANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID ) == - sizeof( VkAndroidHardwareBufferFormatPropertiesANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AndroidHardwareBufferFormatPropertiesANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID ) == sizeof( VkImportAndroidHardwareBufferInfoANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportAndroidHardwareBufferInfoANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID ) == sizeof( VkMemoryGetAndroidHardwareBufferInfoANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryGetAndroidHardwareBufferInfoANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID ) == sizeof( VkExternalFormatANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExternalFormatANDROID is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatProperties2ANDROID ) == - sizeof( VkAndroidHardwareBufferFormatProperties2ANDROID ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AndroidHardwareBufferFormatProperties2ANDROID is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -//=== VK_EXT_sample_locations === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SampleLocationEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SampleLocationsInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT ) == sizeof( VkAttachmentSampleLocationsEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AttachmentSampleLocationsEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT ) == sizeof( VkSubpassSampleLocationsEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassSampleLocationsEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassSampleLocationsBeginInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineSampleLocationsStateCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSampleLocationsPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MultisamplePropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_blend_operation_advanced === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == - sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceBlendOperationAdvancedFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == - sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceBlendOperationAdvancedPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT ) == - sizeof( VkPipelineColorBlendAdvancedStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineColorBlendAdvancedStateCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_NV_fragment_coverage_to_color === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV ) == sizeof( VkPipelineCoverageToColorStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCoverageToColorStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_KHR_acceleration_structure === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR ) == sizeof( VkDeviceOrHostAddressKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceOrHostAddressKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR ) == sizeof( VkDeviceOrHostAddressConstKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceOrHostAddressConstKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR ) == sizeof( VkAccelerationStructureBuildRangeInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureBuildRangeInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AabbPositionsKHR ) == sizeof( VkAabbPositionsKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AabbPositionsKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR ) == - sizeof( VkAccelerationStructureGeometryTrianglesDataKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryTrianglesDataKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TransformMatrixKHR ) == sizeof( VkTransformMatrixKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TransformMatrixKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR ) == sizeof( VkAccelerationStructureBuildGeometryInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureBuildGeometryInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR ) == sizeof( VkAccelerationStructureGeometryAabbsDataKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryAabbsDataKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR ) == sizeof( VkAccelerationStructureInstanceKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureInstanceKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR ) == - sizeof( VkAccelerationStructureGeometryInstancesDataKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryInstancesDataKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR ) == sizeof( VkAccelerationStructureGeometryDataKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryDataKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR ) == sizeof( VkAccelerationStructureGeometryKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR ) == sizeof( VkAccelerationStructureCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR ) == sizeof( VkAccelerationStructureKHR ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureKHR ) == sizeof( VkWriteDescriptorSetAccelerationStructureKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "WriteDescriptorSetAccelerationStructureKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructureFeaturesKHR ) == - sizeof( VkPhysicalDeviceAccelerationStructureFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceAccelerationStructureFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructurePropertiesKHR ) == - sizeof( VkPhysicalDeviceAccelerationStructurePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceAccelerationStructurePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR ) == sizeof( VkAccelerationStructureDeviceAddressInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureDeviceAddressInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR ) == sizeof( VkAccelerationStructureVersionInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureVersionInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR ) == sizeof( VkCopyAccelerationStructureToMemoryInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyAccelerationStructureToMemoryInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR ) == sizeof( VkCopyMemoryToAccelerationStructureInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyMemoryToAccelerationStructureInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR ) == sizeof( VkCopyAccelerationStructureInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyAccelerationStructureInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR ) == sizeof( VkAccelerationStructureBuildSizesInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureBuildSizesInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_NV_framebuffer_mixed_samples === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV ) == - sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCoverageModulationStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_NV_shader_sm_builtins === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderSMBuiltinsPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderSMBuiltinsFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_image_drm_format_modifier === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT ) == sizeof( VkDrmFormatModifierPropertiesListEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrmFormatModifierPropertiesListEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT ) == sizeof( VkDrmFormatModifierPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrmFormatModifierPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT ) == - sizeof( VkPhysicalDeviceImageDrmFormatModifierInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageDrmFormatModifierInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierListCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageDrmFormatModifierListCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT ) == - sizeof( VkImageDrmFormatModifierExplicitCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageDrmFormatModifierExplicitCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT ) == sizeof( VkImageDrmFormatModifierPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageDrmFormatModifierPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesList2EXT ) == sizeof( VkDrmFormatModifierPropertiesList2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrmFormatModifierPropertiesList2EXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT ) == sizeof( VkDrmFormatModifierProperties2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrmFormatModifierProperties2EXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_validation_cache === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationCacheEXT ) == sizeof( VkValidationCacheEXT ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ValidationCacheEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ValidationCacheCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShaderModuleValidationCacheCreateInfoEXT is not nothrow_move_constructible!" ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_KHR_portability_subset === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetFeaturesKHR ) == sizeof( VkPhysicalDevicePortabilitySubsetFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePortabilitySubsetFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetPropertiesKHR ) == - sizeof( VkPhysicalDevicePortabilitySubsetPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePortabilitySubsetPropertiesKHR is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -//=== VK_NV_shading_rate_image === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV ) == sizeof( VkShadingRatePaletteNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShadingRatePaletteNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV ) == - sizeof( VkPipelineViewportShadingRateImageStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportShadingRateImageStateCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV ) == sizeof( VkPhysicalDeviceShadingRateImageFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShadingRateImageFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV ) == sizeof( VkPhysicalDeviceShadingRateImagePropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShadingRateImagePropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV ) == sizeof( VkCoarseSampleLocationNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CoarseSampleLocationNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV ) == sizeof( VkCoarseSampleOrderCustomNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CoarseSampleOrderCustomNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV ) == - sizeof( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportCoarseSampleOrderStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_NV_ray_tracing === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV ) == sizeof( VkRayTracingShaderGroupCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RayTracingShaderGroupCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV ) == sizeof( VkRayTracingPipelineCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RayTracingPipelineCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV ) == sizeof( VkGeometryTrianglesNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GeometryTrianglesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryAABBNV ) == sizeof( VkGeometryAABBNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GeometryAABBNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryDataNV ) == sizeof( VkGeometryDataNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GeometryDataNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryNV ) == sizeof( VkGeometryNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeometryNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV ) == sizeof( VkAccelerationStructureInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV ) == sizeof( VkAccelerationStructureCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureNV ) == sizeof( VkAccelerationStructureNV ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV ) == sizeof( VkBindAccelerationStructureMemoryInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindAccelerationStructureMemoryInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetAccelerationStructureNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "WriteDescriptorSetAccelerationStructureNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV ) == - sizeof( VkAccelerationStructureMemoryRequirementsInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureMemoryRequirementsInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayTracingPropertiesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_representative_fragment_test === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) == - sizeof( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRepresentativeFragmentTestFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV ) == - sizeof( VkPipelineRepresentativeFragmentTestStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRepresentativeFragmentTestStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_filter_cubic === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT ) == sizeof( VkPhysicalDeviceImageViewImageFormatInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageViewImageFormatInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT ) == - sizeof( VkFilterCubicImageViewImageFormatPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FilterCubicImageViewImageFormatPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_external_memory_host === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryHostPointerInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryHostPointerPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT ) == - sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalMemoryHostPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_shader_clock === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderClockFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderClockFeaturesKHR is not nothrow_move_constructible!" ); - -//=== VK_AMD_pipeline_compiler_control === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD ) == sizeof( VkPipelineCompilerControlCreateInfoAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCompilerControlCreateInfoAMD is not nothrow_move_constructible!" ); - -//=== VK_EXT_calibrated_timestamps === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT ) == sizeof( VkCalibratedTimestampInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CalibratedTimestampInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_AMD_shader_core_properties === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD ) == sizeof( VkPhysicalDeviceShaderCorePropertiesAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderCorePropertiesAMD is not nothrow_move_constructible!" ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_EXT_video_decode_h265 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265ProfileInfoEXT ) == sizeof( VkVideoDecodeH265ProfileInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265ProfileInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265CapabilitiesEXT ) == sizeof( VkVideoDecodeH265CapabilitiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265CapabilitiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersCreateInfoEXT ) == - sizeof( VkVideoDecodeH265SessionParametersCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265SessionParametersCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoEXT ) == sizeof( VkVideoDecodeH265SessionParametersAddInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265SessionParametersAddInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265PictureInfoEXT ) == sizeof( VkVideoDecodeH265PictureInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265PictureInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265DpbSlotInfoEXT ) == sizeof( VkVideoDecodeH265DpbSlotInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoDecodeH265DpbSlotInfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -//=== VK_KHR_global_priority === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoKHR ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceQueueGlobalPriorityCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGlobalPriorityQueryFeaturesKHR ) == - sizeof( VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceGlobalPriorityQueryFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyGlobalPriorityPropertiesKHR ) == sizeof( VkQueueFamilyGlobalPriorityPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyGlobalPriorityPropertiesKHR is not nothrow_move_constructible!" ); - -//=== VK_AMD_memory_overallocation_behavior === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD ) == sizeof( VkDeviceMemoryOverallocationCreateInfoAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceMemoryOverallocationCreateInfoAMD is not nothrow_move_constructible!" ); - -//=== VK_EXT_vertex_attribute_divisor === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) == - sizeof( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVertexAttributeDivisorPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT ) == sizeof( VkVertexInputBindingDivisorDescriptionEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VertexInputBindingDivisorDescriptionEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT ) == - sizeof( VkPipelineVertexInputDivisorStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineVertexInputDivisorStateCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) == - sizeof( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVertexAttributeDivisorFeaturesEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_GGP ) -//=== VK_GGP_frame_token === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP ) == sizeof( VkPresentFrameTokenGGP ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PresentFrameTokenGGP is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_GGP*/ - -//=== VK_NV_compute_shader_derivatives === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV ) == - sizeof( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceComputeShaderDerivativesFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_mesh_shader === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMeshShaderFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMeshShaderPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandNV ) == sizeof( VkDrawMeshTasksIndirectCommandNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrawMeshTasksIndirectCommandNV is not nothrow_move_constructible!" ); - -//=== VK_NV_shader_image_footprint === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV ) == - sizeof( VkPhysicalDeviceShaderImageFootprintFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderImageFootprintFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_scissor_exclusive === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV ) == - sizeof( VkPipelineViewportExclusiveScissorStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportExclusiveScissorStateCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV ) == sizeof( VkPhysicalDeviceExclusiveScissorFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExclusiveScissorFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_device_diagnostic_checkpoints === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV ) == sizeof( VkQueueFamilyCheckpointPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyCheckpointPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CheckpointDataNV ) == sizeof( VkCheckpointDataNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CheckpointDataNV is not nothrow_move_constructible!" ); - -//=== VK_INTEL_shader_integer_functions2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ) == - sizeof( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL is not nothrow_move_constructible!" ); - -//=== VK_INTEL_performance_query === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL ) == sizeof( VkPerformanceValueDataINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceValueDataINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueINTEL ) == sizeof( VkPerformanceValueINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceValueINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL ) == sizeof( VkInitializePerformanceApiInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "InitializePerformanceApiInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceQueryCreateInfoINTEL ) == sizeof( VkQueryPoolPerformanceQueryCreateInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueryPoolPerformanceQueryCreateInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL ) == sizeof( VkPerformanceMarkerInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceMarkerInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL ) == sizeof( VkPerformanceStreamMarkerInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceStreamMarkerInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL ) == sizeof( VkPerformanceOverrideInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceOverrideInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL ) == sizeof( VkPerformanceConfigurationAcquireInfoINTEL ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceConfigurationAcquireInfoINTEL is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL ) == sizeof( VkPerformanceConfigurationINTEL ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PerformanceConfigurationINTEL is not nothrow_move_constructible!" ); - -//=== VK_EXT_pci_bus_info === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT ) == sizeof( VkPhysicalDevicePCIBusInfoPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePCIBusInfoPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_AMD_display_native_hdr === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD ) == sizeof( VkDisplayNativeHdrSurfaceCapabilitiesAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DisplayNativeHdrSurfaceCapabilitiesAMD is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD ) == sizeof( VkSwapchainDisplayNativeHdrCreateInfoAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SwapchainDisplayNativeHdrCreateInfoAMD is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_FUCHSIA ) -//=== VK_FUCHSIA_imagepipe_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA ) == sizeof( VkImagePipeSurfaceCreateInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImagePipeSurfaceCreateInfoFUCHSIA is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) -//=== VK_EXT_metal_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT ) == sizeof( VkMetalSurfaceCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MetalSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -//=== VK_EXT_fragment_density_map === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT ) == - sizeof( VkPhysicalDeviceFragmentDensityMapFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMapFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT ) == - sizeof( VkPhysicalDeviceFragmentDensityMapPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMapPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT ) == sizeof( VkRenderPassFragmentDensityMapCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassFragmentDensityMapCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_fragment_shading_rate === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FragmentShadingRateAttachmentInfoKHR ) == sizeof( VkFragmentShadingRateAttachmentInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FragmentShadingRateAttachmentInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateStateCreateInfoKHR ) == - sizeof( VkPipelineFragmentShadingRateStateCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineFragmentShadingRateStateCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateFeaturesKHR ) == - sizeof( VkPhysicalDeviceFragmentShadingRateFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShadingRateFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRatePropertiesKHR ) == - sizeof( VkPhysicalDeviceFragmentShadingRatePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShadingRatePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR ) == sizeof( VkPhysicalDeviceFragmentShadingRateKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShadingRateKHR is not nothrow_move_constructible!" ); - -//=== VK_AMD_shader_core_properties2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD ) == sizeof( VkPhysicalDeviceShaderCoreProperties2AMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderCoreProperties2AMD is not nothrow_move_constructible!" ); - -//=== VK_AMD_device_coherent_memory === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD ) == sizeof( VkPhysicalDeviceCoherentMemoryFeaturesAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCoherentMemoryFeaturesAMD is not nothrow_move_constructible!" ); - -//=== VK_EXT_shader_image_atomic_int64 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageAtomicInt64FeaturesEXT ) == - sizeof( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderImageAtomicInt64FeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_memory_budget === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT ) == sizeof( VkPhysicalDeviceMemoryBudgetPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMemoryBudgetPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_memory_priority === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT ) == sizeof( VkPhysicalDeviceMemoryPriorityFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMemoryPriorityFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT ) == sizeof( VkMemoryPriorityAllocateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryPriorityAllocateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_surface_protected_capabilities === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR ) == sizeof( VkSurfaceProtectedCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceProtectedCapabilitiesKHR is not nothrow_move_constructible!" ); - -//=== VK_NV_dedicated_allocation_image_aliasing === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) == - sizeof( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_buffer_device_address === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT ) == - sizeof( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceBufferDeviceAddressFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT ) == sizeof( VkBufferDeviceAddressCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferDeviceAddressCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_validation_features === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT ) == sizeof( VkValidationFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ValidationFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_present_wait === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentWaitFeaturesKHR ) == sizeof( VkPhysicalDevicePresentWaitFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePresentWaitFeaturesKHR is not nothrow_move_constructible!" ); - -//=== VK_NV_cooperative_matrix === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV ) == sizeof( VkCooperativeMatrixPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CooperativeMatrixPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCooperativeMatrixFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV ) == - sizeof( VkPhysicalDeviceCooperativeMatrixPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCooperativeMatrixPropertiesNV is not nothrow_move_constructible!" ); - -//=== VK_NV_coverage_reduction_mode === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV ) == - sizeof( VkPhysicalDeviceCoverageReductionModeFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCoverageReductionModeFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV ) == sizeof( VkPipelineCoverageReductionStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineCoverageReductionStateCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV ) == sizeof( VkFramebufferMixedSamplesCombinationNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "FramebufferMixedSamplesCombinationNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_fragment_shader_interlock === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT ) == - sizeof( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShaderInterlockFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_ycbcr_image_arrays === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT ) == sizeof( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceYcbcrImageArraysFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_provoking_vertex === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexFeaturesEXT ) == sizeof( VkPhysicalDeviceProvokingVertexFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProvokingVertexFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexPropertiesEXT ) == sizeof( VkPhysicalDeviceProvokingVertexPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceProvokingVertexPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationProvokingVertexStateCreateInfoEXT ) == - sizeof( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationProvokingVertexStateCreateInfoEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) -//=== VK_EXT_full_screen_exclusive === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceFullScreenExclusiveInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT ) == sizeof( VkSurfaceCapabilitiesFullScreenExclusiveEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceCapabilitiesFullScreenExclusiveEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveWin32InfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SurfaceFullScreenExclusiveWin32InfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -//=== VK_EXT_headless_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT ) == sizeof( VkHeadlessSurfaceCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "HeadlessSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_line_rasterization === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT ) == sizeof( VkPhysicalDeviceLineRasterizationFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceLineRasterizationFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT ) == - sizeof( VkPhysicalDeviceLineRasterizationPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceLineRasterizationPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT ) == - sizeof( VkPipelineRasterizationLineStateCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineRasterizationLineStateCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_shader_atomic_float === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloatFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderAtomicFloatFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_index_type_uint8 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT ) == sizeof( VkPhysicalDeviceIndexTypeUint8FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceIndexTypeUint8FeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_extended_dynamic_state === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicStateFeaturesEXT ) == - sizeof( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExtendedDynamicStateFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_deferred_host_operations === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeferredOperationKHR ) == sizeof( VkDeferredOperationKHR ), "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeferredOperationKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_pipeline_executable_properties === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR ) == - sizeof( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePipelineExecutablePropertiesFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineInfoKHR ) == sizeof( VkPipelineInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR ) == sizeof( VkPipelineExecutablePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineExecutablePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR ) == sizeof( VkPipelineExecutableInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineExecutableInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR ) == sizeof( VkPipelineExecutableStatisticValueKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineExecutableStatisticValueKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR ) == sizeof( VkPipelineExecutableStatisticKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineExecutableStatisticKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR ) == - sizeof( VkPipelineExecutableInternalRepresentationKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineExecutableInternalRepresentationKHR is not nothrow_move_constructible!" ); - -//=== VK_EXT_shader_atomic_float2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT ) == - sizeof( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderAtomicFloat2FeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_NV_device_generated_commands === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesNV ) == - sizeof( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDeviceGeneratedCommandsPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesNV ) == - sizeof( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDeviceGeneratedCommandsFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV ) == sizeof( VkGraphicsShaderGroupCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GraphicsShaderGroupCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineShaderGroupsCreateInfoNV ) == sizeof( VkGraphicsPipelineShaderGroupsCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GraphicsPipelineShaderGroupsCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindShaderGroupIndirectCommandNV ) == sizeof( VkBindShaderGroupIndirectCommandNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindShaderGroupIndirectCommandNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandNV ) == sizeof( VkBindIndexBufferIndirectCommandNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindIndexBufferIndirectCommandNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandNV ) == sizeof( VkBindVertexBufferIndirectCommandNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BindVertexBufferIndirectCommandNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SetStateFlagsIndirectCommandNV ) == sizeof( VkSetStateFlagsIndirectCommandNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SetStateFlagsIndirectCommandNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV ) == sizeof( VkIndirectCommandsLayoutNV ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "IndirectCommandsLayoutNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV ) == sizeof( VkIndirectCommandsStreamNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "IndirectCommandsStreamNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV ) == sizeof( VkIndirectCommandsLayoutTokenNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "IndirectCommandsLayoutTokenNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV ) == sizeof( VkIndirectCommandsLayoutCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "IndirectCommandsLayoutCreateInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV ) == sizeof( VkGeneratedCommandsInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GeneratedCommandsInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV ) == sizeof( VkGeneratedCommandsMemoryRequirementsInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GeneratedCommandsMemoryRequirementsInfoNV is not nothrow_move_constructible!" ); - -//=== VK_NV_inherited_viewport_scissor === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInheritedViewportScissorFeaturesNV ) == - sizeof( VkPhysicalDeviceInheritedViewportScissorFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceInheritedViewportScissorFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceViewportScissorInfoNV ) == - sizeof( VkCommandBufferInheritanceViewportScissorInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferInheritanceViewportScissorInfoNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_texel_buffer_alignment === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT ) == - sizeof( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTexelBufferAlignmentFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_QCOM_render_pass_transform === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassTransformBeginInfoQCOM ) == sizeof( VkRenderPassTransformBeginInfoQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassTransformBeginInfoQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderPassTransformInfoQCOM ) == - sizeof( VkCommandBufferInheritanceRenderPassTransformInfoQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CommandBufferInheritanceRenderPassTransformInfoQCOM is not nothrow_move_constructible!" ); - -//=== VK_EXT_device_memory_report === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceMemoryReportFeaturesEXT ) == - sizeof( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDeviceMemoryReportFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceDeviceMemoryReportCreateInfoEXT ) == sizeof( VkDeviceDeviceMemoryReportCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceDeviceMemoryReportCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryReportCallbackDataEXT ) == sizeof( VkDeviceMemoryReportCallbackDataEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceMemoryReportCallbackDataEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_robustness2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2FeaturesEXT ) == sizeof( VkPhysicalDeviceRobustness2FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRobustness2FeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2PropertiesEXT ) == sizeof( VkPhysicalDeviceRobustness2PropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRobustness2PropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_custom_border_color === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCustomBorderColorCreateInfoEXT ) == sizeof( VkSamplerCustomBorderColorCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerCustomBorderColorCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorPropertiesEXT ) == - sizeof( VkPhysicalDeviceCustomBorderColorPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCustomBorderColorPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorFeaturesEXT ) == sizeof( VkPhysicalDeviceCustomBorderColorFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceCustomBorderColorFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_pipeline_library === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR ) == sizeof( VkPipelineLibraryCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineLibraryCreateInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_present_id === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentIdKHR ) == sizeof( VkPresentIdKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentIdKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentIdFeaturesKHR ) == sizeof( VkPhysicalDevicePresentIdFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePresentIdFeaturesKHR is not nothrow_move_constructible!" ); - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) -//=== VK_KHR_video_encode_queue === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR ) == sizeof( VkVideoEncodeInfoKHR ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilitiesKHR ) == sizeof( VkVideoEncodeCapabilitiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeCapabilitiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeUsageInfoKHR ) == sizeof( VkVideoEncodeUsageInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeUsageInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlInfoKHR ) == sizeof( VkVideoEncodeRateControlInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeRateControlInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR ) == sizeof( VkVideoEncodeRateControlLayerInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VideoEncodeRateControlLayerInfoKHR is not nothrow_move_constructible!" ); -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -//=== VK_NV_device_diagnostics_config === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiagnosticsConfigFeaturesNV ) == sizeof( VkPhysicalDeviceDiagnosticsConfigFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDiagnosticsConfigFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigCreateInfoNV ) == sizeof( VkDeviceDiagnosticsConfigCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DeviceDiagnosticsConfigCreateInfoNV is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_METAL_EXT ) -//=== VK_EXT_metal_objects === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalObjectCreateInfoEXT ) == sizeof( VkExportMetalObjectCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalObjectCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT ) == sizeof( VkExportMetalObjectsInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalObjectsInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalDeviceInfoEXT ) == sizeof( VkExportMetalDeviceInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalDeviceInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalCommandQueueInfoEXT ) == sizeof( VkExportMetalCommandQueueInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalCommandQueueInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalBufferInfoEXT ) == sizeof( VkExportMetalBufferInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalBufferInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalBufferInfoEXT ) == sizeof( VkImportMetalBufferInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMetalBufferInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalTextureInfoEXT ) == sizeof( VkExportMetalTextureInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalTextureInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalTextureInfoEXT ) == sizeof( VkImportMetalTextureInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMetalTextureInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalIOSurfaceInfoEXT ) == sizeof( VkExportMetalIOSurfaceInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalIOSurfaceInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalIOSurfaceInfoEXT ) == sizeof( VkImportMetalIOSurfaceInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMetalIOSurfaceInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalSharedEventInfoEXT ) == sizeof( VkExportMetalSharedEventInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ExportMetalSharedEventInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalSharedEventInfoEXT ) == sizeof( VkImportMetalSharedEventInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMetalSharedEventInfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -//=== VK_KHR_synchronization2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointProperties2NV ) == sizeof( VkQueueFamilyCheckpointProperties2NV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "QueueFamilyCheckpointProperties2NV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CheckpointData2NV ) == sizeof( VkCheckpointData2NV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CheckpointData2NV is not nothrow_move_constructible!" ); - -//=== VK_EXT_graphics_pipeline_library === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ) == - sizeof( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ) == - sizeof( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryCreateInfoEXT ) == sizeof( VkGraphicsPipelineLibraryCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "GraphicsPipelineLibraryCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_AMD_shader_early_and_late_fragment_tests === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ) == - sizeof( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD is not nothrow_move_constructible!" ); - -//=== VK_KHR_fragment_shader_barycentric === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR ) == - sizeof( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShaderBarycentricFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricPropertiesKHR ) == - sizeof( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShaderBarycentricPropertiesKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_shader_subgroup_uniform_control_flow === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ) == - sizeof( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR is not nothrow_move_constructible!" ); - -//=== VK_NV_fragment_shading_rate_enums === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsFeaturesNV ) == - sizeof( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShadingRateEnumsFeaturesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsPropertiesNV ) == - sizeof( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentShadingRateEnumsPropertiesNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateEnumStateCreateInfoNV ) == - sizeof( VkPipelineFragmentShadingRateEnumStateCreateInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineFragmentShadingRateEnumStateCreateInfoNV is not nothrow_move_constructible!" ); - -//=== VK_NV_ray_tracing_motion_blur === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryMotionTrianglesDataNV ) == - sizeof( VkAccelerationStructureGeometryMotionTrianglesDataNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureGeometryMotionTrianglesDataNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoNV ) == sizeof( VkAccelerationStructureMotionInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureMotionInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceNV ) == sizeof( VkAccelerationStructureMotionInstanceNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureMotionInstanceNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV ) == sizeof( VkAccelerationStructureMotionInstanceDataNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureMotionInstanceDataNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV ) == - sizeof( VkAccelerationStructureMatrixMotionInstanceNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureMatrixMotionInstanceNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV ) == sizeof( VkAccelerationStructureSRTMotionInstanceNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AccelerationStructureSRTMotionInstanceNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SRTDataNV ) == sizeof( VkSRTDataNV ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SRTDataNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMotionBlurFeaturesNV ) == - sizeof( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayTracingMotionBlurFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_mesh_shader === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesEXT ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMeshShaderFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesEXT ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMeshShaderPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandEXT ) == sizeof( VkDrawMeshTasksIndirectCommandEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DrawMeshTasksIndirectCommandEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_ycbcr_2plane_444_formats === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ) == - sizeof( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_fragment_density_map2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2FeaturesEXT ) == - sizeof( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMap2FeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2PropertiesEXT ) == - sizeof( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMap2PropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_QCOM_rotated_copy_commands === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyCommandTransformInfoQCOM ) == sizeof( VkCopyCommandTransformInfoQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "CopyCommandTransformInfoQCOM is not nothrow_move_constructible!" ); - -//=== VK_KHR_workgroup_memory_explicit_layout === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ) == - sizeof( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR is not nothrow_move_constructible!" ); - -//=== VK_EXT_image_compression_control === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlFeaturesEXT ) == - sizeof( VkPhysicalDeviceImageCompressionControlFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageCompressionControlFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCompressionControlEXT ) == sizeof( VkImageCompressionControlEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageCompressionControlEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubresourceLayout2EXT ) == sizeof( VkSubresourceLayout2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubresourceLayout2EXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresource2EXT ) == sizeof( VkImageSubresource2EXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageSubresource2EXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCompressionPropertiesEXT ) == sizeof( VkImageCompressionPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageCompressionPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_attachment_feedback_loop_layout === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ) == - sizeof( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_4444_formats === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice4444FormatsFeaturesEXT ) == sizeof( VkPhysicalDevice4444FormatsFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevice4444FormatsFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_rgba10x6_formats === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRGBA10X6FormatsFeaturesEXT ) == sizeof( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRGBA10X6FormatsFeaturesEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) -//=== VK_EXT_directfb_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT ) == sizeof( VkDirectFBSurfaceCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DirectFBSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -//=== VK_KHR_ray_tracing_pipeline === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR ) == sizeof( VkRayTracingShaderGroupCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RayTracingShaderGroupCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR ) == sizeof( VkRayTracingPipelineCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RayTracingPipelineCreateInfoKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelineFeaturesKHR ) == - sizeof( VkPhysicalDeviceRayTracingPipelineFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayTracingPipelineFeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelinePropertiesKHR ) == - sizeof( VkPhysicalDeviceRayTracingPipelinePropertiesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayTracingPipelinePropertiesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR ) == sizeof( VkStridedDeviceAddressRegionKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "StridedDeviceAddressRegionKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommandKHR ) == sizeof( VkTraceRaysIndirectCommandKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TraceRaysIndirectCommandKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR ) == sizeof( VkRayTracingPipelineInterfaceCreateInfoKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RayTracingPipelineInterfaceCreateInfoKHR is not nothrow_move_constructible!" ); - -//=== VK_KHR_ray_query === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayQueryFeaturesKHR ) == sizeof( VkPhysicalDeviceRayQueryFeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayQueryFeaturesKHR is not nothrow_move_constructible!" ); - -//=== VK_VALVE_mutable_descriptor_type === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMutableDescriptorTypeFeaturesVALVE ) == - sizeof( VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMutableDescriptorTypeFeaturesVALVE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE ) == sizeof( VkMutableDescriptorTypeListVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MutableDescriptorTypeListVALVE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeCreateInfoVALVE ) == sizeof( VkMutableDescriptorTypeCreateInfoVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MutableDescriptorTypeCreateInfoVALVE is not nothrow_move_constructible!" ); - -//=== VK_EXT_vertex_input_dynamic_state === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexInputDynamicStateFeaturesEXT ) == - sizeof( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceVertexInputDynamicStateFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT ) == sizeof( VkVertexInputBindingDescription2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VertexInputBindingDescription2EXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT ) == sizeof( VkVertexInputAttributeDescription2EXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "VertexInputAttributeDescription2EXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_physical_device_drm === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDrmPropertiesEXT ) == sizeof( VkPhysicalDeviceDrmPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDrmPropertiesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_depth_clip_control === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipControlFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipControlFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDepthClipControlFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClipControlCreateInfoEXT ) == - sizeof( VkPipelineViewportDepthClipControlCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineViewportDepthClipControlCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_primitive_topology_list_restart === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ) == - sizeof( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_FUCHSIA ) -//=== VK_FUCHSIA_external_memory === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryZirconHandleInfoFUCHSIA ) == sizeof( VkImportMemoryZirconHandleInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA ) == sizeof( VkMemoryZirconHandlePropertiesFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryZirconHandlePropertiesFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA ) == sizeof( VkMemoryGetZirconHandleInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryGetZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) -//=== VK_FUCHSIA_external_semaphore === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA ) == sizeof( VkImportSemaphoreZirconHandleInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportSemaphoreZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA ) == sizeof( VkSemaphoreGetZirconHandleInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SemaphoreGetZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) -//=== VK_FUCHSIA_buffer_collection === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA ) == sizeof( VkBufferCollectionFUCHSIA ), - "handle and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionCreateInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionCreateInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryBufferCollectionFUCHSIA ) == sizeof( VkImportMemoryBufferCollectionFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImportMemoryBufferCollectionFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionImageCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionImageCreateInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionImageCreateInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA ) == sizeof( VkBufferConstraintsInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionBufferCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionBufferCreateInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionBufferCreateInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA ) == sizeof( VkBufferCollectionPropertiesFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionPropertiesFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA ) == sizeof( VkSysmemColorSpaceFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SysmemColorSpaceFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA ) == sizeof( VkImageConstraintsInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA ) == sizeof( VkImageFormatConstraintsInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageFormatConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA ) == sizeof( VkBufferCollectionConstraintsInfoFUCHSIA ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "BufferCollectionConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -//=== VK_HUAWEI_subpass_shading === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassShadingPipelineCreateInfoHUAWEI ) == sizeof( VkSubpassShadingPipelineCreateInfoHUAWEI ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassShadingPipelineCreateInfoHUAWEI is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubpassShadingFeaturesHUAWEI is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingPropertiesHUAWEI ) == - sizeof( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubpassShadingPropertiesHUAWEI is not nothrow_move_constructible!" ); - -//=== VK_HUAWEI_invocation_mask === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInvocationMaskFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceInvocationMaskFeaturesHUAWEI is not nothrow_move_constructible!" ); - -//=== VK_NV_external_memory_rdma === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV ) == sizeof( VkMemoryGetRemoteAddressInfoNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MemoryGetRemoteAddressInfoNV is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryRDMAFeaturesNV ) == sizeof( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExternalMemoryRDMAFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_pipeline_properties === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelinePropertiesIdentifierEXT ) == sizeof( VkPipelinePropertiesIdentifierEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelinePropertiesIdentifierEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelinePropertiesFeaturesEXT ) == - sizeof( VkPhysicalDevicePipelinePropertiesFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePipelinePropertiesFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_multisampled_render_to_single_sampled === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ) == - sizeof( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassResolvePerformanceQueryEXT ) == sizeof( VkSubpassResolvePerformanceQueryEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassResolvePerformanceQueryEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultisampledRenderToSingleSampledInfoEXT ) == sizeof( VkMultisampledRenderToSingleSampledInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MultisampledRenderToSingleSampledInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_extended_dynamic_state2 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState2FeaturesEXT ) == - sizeof( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceExtendedDynamicState2FeaturesEXT is not nothrow_move_constructible!" ); - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) -//=== VK_QNX_screen_surface === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX ) == sizeof( VkScreenSurfaceCreateInfoQNX ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ScreenSurfaceCreateInfoQNX is not nothrow_move_constructible!" ); -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - -//=== VK_EXT_color_write_enable === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceColorWriteEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceColorWriteEnableFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceColorWriteEnableFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorWriteCreateInfoEXT ) == sizeof( VkPipelineColorWriteCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineColorWriteCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_primitives_generated_query === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ) == - sizeof( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_KHR_ray_tracing_maintenance1 === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMaintenance1FeaturesKHR ) == - sizeof( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRayTracingMaintenance1FeaturesKHR is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommand2KHR ) == sizeof( VkTraceRaysIndirectCommand2KHR ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TraceRaysIndirectCommand2KHR is not nothrow_move_constructible!" ); - -//=== VK_EXT_image_view_min_lod === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewMinLodFeaturesEXT ) == sizeof( VkPhysicalDeviceImageViewMinLodFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageViewMinLodFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewMinLodCreateInfoEXT ) == sizeof( VkImageViewMinLodCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewMinLodCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_multi_draw === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawFeaturesEXT ) == sizeof( VkPhysicalDeviceMultiDrawFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultiDrawFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawPropertiesEXT ) == sizeof( VkPhysicalDeviceMultiDrawPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceMultiDrawPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT ) == sizeof( VkMultiDrawInfoEXT ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MultiDrawInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT ) == sizeof( VkMultiDrawIndexedInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "MultiDrawIndexedInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_image_2d_view_of_3d === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImage2DViewOf3DFeaturesEXT ) == sizeof( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImage2DViewOf3DFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_border_color_swizzle === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBorderColorSwizzleFeaturesEXT ) == - sizeof( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceBorderColorSwizzleFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerBorderColorComponentMappingCreateInfoEXT ) == - sizeof( VkSamplerBorderColorComponentMappingCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SamplerBorderColorComponentMappingCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_pageable_device_local_memory === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ) == - sizeof( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_VALVE_descriptor_set_host_mapping === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ) == - sizeof( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE ) == sizeof( VkDescriptorSetBindingReferenceVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetBindingReferenceVALVE is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE ) == sizeof( VkDescriptorSetLayoutHostMappingInfoVALVE ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "DescriptorSetLayoutHostMappingInfoVALVE is not nothrow_move_constructible!" ); - -//=== VK_EXT_depth_clamp_zero_one === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampZeroOneFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClampZeroOneFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceDepthClampZeroOneFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_non_seamless_cube_map === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceNonSeamlessCubeMapFeaturesEXT ) == - sizeof( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceNonSeamlessCubeMapFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_QCOM_fragment_density_map_offset === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ) == - sizeof( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ) == - sizeof( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassFragmentDensityMapOffsetEndInfoQCOM ) == sizeof( VkSubpassFragmentDensityMapOffsetEndInfoQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "SubpassFragmentDensityMapOffsetEndInfoQCOM is not nothrow_move_constructible!" ); - -//=== VK_NV_linear_color_attachment === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLinearColorAttachmentFeaturesNV ) == - sizeof( VkPhysicalDeviceLinearColorAttachmentFeaturesNV ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceLinearColorAttachmentFeaturesNV is not nothrow_move_constructible!" ); - -//=== VK_EXT_image_compression_control_swapchain === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ) == - sizeof( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_QCOM_image_processing === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewSampleWeightCreateInfoQCOM ) == sizeof( VkImageViewSampleWeightCreateInfoQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ImageViewSampleWeightCreateInfoQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingFeaturesQCOM ) == sizeof( VkPhysicalDeviceImageProcessingFeaturesQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageProcessingFeaturesQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingPropertiesQCOM ) == - sizeof( VkPhysicalDeviceImageProcessingPropertiesQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceImageProcessingPropertiesQCOM is not nothrow_move_constructible!" ); - -//=== VK_EXT_subpass_merge_feedback === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassMergeFeedbackFeaturesEXT ) == - sizeof( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceSubpassMergeFeedbackFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationControlEXT ) == sizeof( VkRenderPassCreationControlEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassCreationControlEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT ) == sizeof( VkRenderPassCreationFeedbackInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassCreationFeedbackInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackCreateInfoEXT ) == sizeof( VkRenderPassCreationFeedbackCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassCreationFeedbackCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT ) == sizeof( VkRenderPassSubpassFeedbackInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassSubpassFeedbackInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackCreateInfoEXT ) == sizeof( VkRenderPassSubpassFeedbackCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "RenderPassSubpassFeedbackCreateInfoEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_shader_module_identifier === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierFeaturesEXT ) == - sizeof( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderModuleIdentifierFeaturesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierPropertiesEXT ) == - sizeof( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceShaderModuleIdentifierPropertiesEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageModuleIdentifierCreateInfoEXT ) == - sizeof( VkPipelineShaderStageModuleIdentifierCreateInfoEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PipelineShaderStageModuleIdentifierCreateInfoEXT is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT ) == sizeof( VkShaderModuleIdentifierEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "ShaderModuleIdentifierEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_rasterization_order_attachment_access === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ) == - sizeof( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_EXT_legacy_dithering === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyDitheringFeaturesEXT ) == sizeof( VkPhysicalDeviceLegacyDitheringFeaturesEXT ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceLegacyDitheringFeaturesEXT is not nothrow_move_constructible!" ); - -//=== VK_QCOM_tile_properties === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTilePropertiesFeaturesQCOM ) == sizeof( VkPhysicalDeviceTilePropertiesFeaturesQCOM ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceTilePropertiesFeaturesQCOM is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TilePropertiesQCOM ) == sizeof( VkTilePropertiesQCOM ), "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "TilePropertiesQCOM is not nothrow_move_constructible!" ); - -//=== VK_SEC_amigo_profiling === - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAmigoProfilingFeaturesSEC ) == sizeof( VkPhysicalDeviceAmigoProfilingFeaturesSEC ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, - "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "PhysicalDeviceAmigoProfilingFeaturesSEC is not nothrow_move_constructible!" ); - -VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AmigoProfilingSubmitInfoSEC ) == sizeof( VkAmigoProfilingSubmitInfoSEC ), - "struct and wrapper have different size!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); -VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, - "AmigoProfilingSubmitInfoSEC is not nothrow_move_constructible!" ); - -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_structs.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_structs.hpp deleted file mode 100644 index 3f75faf..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_structs.hpp +++ /dev/null @@ -1,99721 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_STRUCTS_HPP -#define VULKAN_STRUCTS_HPP - -#include // strcmp - -namespace VULKAN_HPP_NAMESPACE -{ - //=============== - //=== STRUCTS === - //=============== - - struct AabbPositionsKHR - { - using NativeType = VkAabbPositionsKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - AabbPositionsKHR( float minX_ = {}, float minY_ = {}, float minZ_ = {}, float maxX_ = {}, float maxY_ = {}, float maxZ_ = {} ) VULKAN_HPP_NOEXCEPT - : minX( minX_ ) - , minY( minY_ ) - , minZ( minZ_ ) - , maxX( maxX_ ) - , maxY( maxY_ ) - , maxZ( maxZ_ ) - { - } - - VULKAN_HPP_CONSTEXPR AabbPositionsKHR( AabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AabbPositionsKHR( VkAabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AabbPositionsKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AabbPositionsKHR & operator=( AabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AabbPositionsKHR & operator=( VkAabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinX( float minX_ ) VULKAN_HPP_NOEXCEPT - { - minX = minX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinY( float minY_ ) VULKAN_HPP_NOEXCEPT - { - minY = minY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinZ( float minZ_ ) VULKAN_HPP_NOEXCEPT - { - minZ = minZ_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxX( float maxX_ ) VULKAN_HPP_NOEXCEPT - { - maxX = maxX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxY( float maxY_ ) VULKAN_HPP_NOEXCEPT - { - maxY = maxY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxZ( float maxZ_ ) VULKAN_HPP_NOEXCEPT - { - maxZ = maxZ_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAabbPositionsKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAabbPositionsKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( minX, minY, minZ, maxX, maxY, maxZ ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AabbPositionsKHR const & ) const = default; -#else - bool operator==( AabbPositionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( minX == rhs.minX ) && ( minY == rhs.minY ) && ( minZ == rhs.minZ ) && ( maxX == rhs.maxX ) && ( maxY == rhs.maxY ) && ( maxZ == rhs.maxZ ); -# endif - } - - bool operator!=( AabbPositionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float minX = {}; - float minY = {}; - float minZ = {}; - float maxX = {}; - float maxY = {}; - float maxZ = {}; - }; - using AabbPositionsNV = AabbPositionsKHR; - - union DeviceOrHostAddressConstKHR - { - using NativeType = VkDeviceOrHostAddressConstKHR; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) : deviceAddress( deviceAddress_ ) {} - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR( const void * hostAddress_ ) : hostAddress( hostAddress_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - deviceAddress = deviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR & setHostAddress( const void * hostAddress_ ) VULKAN_HPP_NOEXCEPT - { - hostAddress = hostAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkDeviceOrHostAddressConstKHR const &() const - { - return *reinterpret_cast( this ); - } - - operator VkDeviceOrHostAddressConstKHR &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress; - const void * hostAddress; -#else - VkDeviceAddress deviceAddress; - const void * hostAddress; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct AccelerationStructureGeometryTrianglesDataKHR - { - using NativeType = VkAccelerationStructureGeometryTrianglesDataKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryTrianglesDataKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureGeometryTrianglesDataKHR( VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, - uint32_t maxVertex_ = {}, - VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData_ = {}, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR transformData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexFormat( vertexFormat_ ) - , vertexData( vertexData_ ) - , vertexStride( vertexStride_ ) - , maxVertex( maxVertex_ ) - , indexType( indexType_ ) - , indexData( indexData_ ) - , transformData( transformData_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureGeometryTrianglesDataKHR( AccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryTrianglesDataKHR( VkAccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureGeometryTrianglesDataKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureGeometryTrianglesDataKHR & operator=( AccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryTrianglesDataKHR & operator=( VkAccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT - { - vertexFormat = vertexFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & - setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT - { - vertexData = vertexData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & - setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT - { - vertexStride = vertexStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setMaxVertex( uint32_t maxVertex_ ) VULKAN_HPP_NOEXCEPT - { - maxVertex = maxVertex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT - { - indexType = indexType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & - setIndexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexData_ ) VULKAN_HPP_NOEXCEPT - { - indexData = indexData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & - setTransformData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & transformData_ ) VULKAN_HPP_NOEXCEPT - { - transformData = transformData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureGeometryTrianglesDataKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryTrianglesDataKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vertexFormat, vertexData, vertexStride, maxVertex, indexType, indexData, transformData ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryTrianglesDataKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; - VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; - uint32_t maxVertex = {}; - VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR transformData = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureGeometryTrianglesDataKHR; - }; - - struct AccelerationStructureGeometryAabbsDataKHR - { - using NativeType = VkAccelerationStructureGeometryAabbsDataKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryAabbsDataKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize stride_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , data( data_ ) - , stride( stride_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR( AccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryAabbsDataKHR( VkAccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureGeometryAabbsDataKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureGeometryAabbsDataKHR & operator=( AccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryAabbsDataKHR & operator=( VkAccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & - setData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & data_ ) VULKAN_HPP_NOEXCEPT - { - data = data_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & setStride( VULKAN_HPP_NAMESPACE::DeviceSize stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureGeometryAabbsDataKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryAabbsDataKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, data, stride ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryAabbsDataKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data = {}; - VULKAN_HPP_NAMESPACE::DeviceSize stride = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureGeometryAabbsDataKHR; - }; - - struct AccelerationStructureGeometryInstancesDataKHR - { - using NativeType = VkAccelerationStructureGeometryInstancesDataKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryInstancesDataKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR( VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers_ = {}, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , arrayOfPointers( arrayOfPointers_ ) - , data( data_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureGeometryInstancesDataKHR( AccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryInstancesDataKHR( VkAccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureGeometryInstancesDataKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureGeometryInstancesDataKHR & operator=( AccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryInstancesDataKHR & operator=( VkAccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & - setArrayOfPointers( VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers_ ) VULKAN_HPP_NOEXCEPT - { - arrayOfPointers = arrayOfPointers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & - setData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & data_ ) VULKAN_HPP_NOEXCEPT - { - data = data_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureGeometryInstancesDataKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryInstancesDataKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, arrayOfPointers, data ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryInstancesDataKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureGeometryInstancesDataKHR; - }; - - union AccelerationStructureGeometryDataKHR - { - using NativeType = VkAccelerationStructureGeometryDataKHR; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR triangles_ = {} ) - : triangles( triangles_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR aabbs_ ) : aabbs( aabbs_ ) {} - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR instances_ ) - : instances( instances_ ) - { - } -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & - setTriangles( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR const & triangles_ ) VULKAN_HPP_NOEXCEPT - { - triangles = triangles_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & - setAabbs( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR const & aabbs_ ) VULKAN_HPP_NOEXCEPT - { - aabbs = aabbs_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & - setInstances( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR const & instances_ ) VULKAN_HPP_NOEXCEPT - { - instances = instances_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkAccelerationStructureGeometryDataKHR const &() const - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryDataKHR &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR triangles; - VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR aabbs; - VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR instances; -#else - VkAccelerationStructureGeometryTrianglesDataKHR triangles; - VkAccelerationStructureGeometryAabbsDataKHR aabbs; - VkAccelerationStructureGeometryInstancesDataKHR instances; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct AccelerationStructureGeometryKHR - { - using NativeType = VkAccelerationStructureGeometryKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureGeometryKHR( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles, - VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR geometry_ = {}, - VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , geometryType( geometryType_ ) - , geometry( geometry_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR( AccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryKHR( VkAccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureGeometryKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureGeometryKHR & operator=( AccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryKHR & operator=( VkAccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setGeometryType( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ ) VULKAN_HPP_NOEXCEPT - { - geometryType = geometryType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & - setGeometry( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR const & geometry_ ) VULKAN_HPP_NOEXCEPT - { - geometry = geometry_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setFlags( VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureGeometryKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, geometryType, geometry, flags ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles; - VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR geometry = {}; - VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureGeometryKHR; - }; - - union DeviceOrHostAddressKHR - { - using NativeType = VkDeviceOrHostAddressKHR; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) : deviceAddress( deviceAddress_ ) {} - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR( void * hostAddress_ ) : hostAddress( hostAddress_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - deviceAddress = deviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR & setHostAddress( void * hostAddress_ ) VULKAN_HPP_NOEXCEPT - { - hostAddress = hostAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkDeviceOrHostAddressKHR const &() const - { - return *reinterpret_cast( this ); - } - - operator VkDeviceOrHostAddressKHR &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress; - void * hostAddress; -#else - VkDeviceAddress deviceAddress; - void * hostAddress; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct AccelerationStructureBuildGeometryInfoKHR - { - using NativeType = VkAccelerationStructureBuildGeometryInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureBuildGeometryInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR( - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR::eBuild, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_ = {}, - uint32_t geometryCount_ = {}, - const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries_ = {}, - const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries_ = {}, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , flags( flags_ ) - , mode( mode_ ) - , srcAccelerationStructure( srcAccelerationStructure_ ) - , dstAccelerationStructure( dstAccelerationStructure_ ) - , geometryCount( geometryCount_ ) - , pGeometries( pGeometries_ ) - , ppGeometries( ppGeometries_ ) - , scratchData( scratchData_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR( AccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildGeometryInfoKHR( VkAccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureBuildGeometryInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AccelerationStructureBuildGeometryInfoKHR( - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pGeometries_ = {}, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , type( type_ ) - , flags( flags_ ) - , mode( mode_ ) - , srcAccelerationStructure( srcAccelerationStructure_ ) - , dstAccelerationStructure( dstAccelerationStructure_ ) - , geometryCount( static_cast( !geometries_.empty() ? geometries_.size() : pGeometries_.size() ) ) - , pGeometries( geometries_.data() ) - , ppGeometries( pGeometries_.data() ) - , scratchData( scratchData_ ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( ( !geometries_.empty() + !pGeometries_.empty() ) <= 1 ); -# else - if ( 1 < ( !geometries_.empty() + !pGeometries_.empty() ) ) - { - throw LogicError( - VULKAN_HPP_NAMESPACE_STRING - "::AccelerationStructureBuildGeometryInfoKHR::AccelerationStructureBuildGeometryInfoKHR: 1 < ( !geometries_.empty() + !pGeometries_.empty() )" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureBuildGeometryInfoKHR & operator=( AccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildGeometryInfoKHR & operator=( VkAccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setMode( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setSrcAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - srcAccelerationStructure = srcAccelerationStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setDstAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - dstAccelerationStructure = dstAccelerationStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setGeometryCount( uint32_t geometryCount_ ) VULKAN_HPP_NOEXCEPT - { - geometryCount = geometryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setPGeometries( const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries_ ) VULKAN_HPP_NOEXCEPT - { - pGeometries = pGeometries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AccelerationStructureBuildGeometryInfoKHR & setGeometries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_ ) VULKAN_HPP_NOEXCEPT - { - geometryCount = static_cast( geometries_.size() ); - pGeometries = geometries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setPpGeometries( const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries_ ) VULKAN_HPP_NOEXCEPT - { - ppGeometries = ppGeometries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AccelerationStructureBuildGeometryInfoKHR & - setPGeometries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pGeometries_ ) - VULKAN_HPP_NOEXCEPT - { - geometryCount = static_cast( pGeometries_.size() ); - ppGeometries = pGeometries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & - setScratchData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & scratchData_ ) VULKAN_HPP_NOEXCEPT - { - scratchData = scratchData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureBuildGeometryInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureBuildGeometryInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, type, flags, mode, srcAccelerationStructure, dstAccelerationStructure, geometryCount, pGeometries, ppGeometries, scratchData ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureBuildGeometryInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel; - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR::eBuild; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure = {}; - uint32_t geometryCount = {}; - const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries = {}; - const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureBuildGeometryInfoKHR; - }; - - struct AccelerationStructureBuildRangeInfoKHR - { - using NativeType = VkAccelerationStructureBuildRangeInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureBuildRangeInfoKHR( uint32_t primitiveCount_ = {}, - uint32_t primitiveOffset_ = {}, - uint32_t firstVertex_ = {}, - uint32_t transformOffset_ = {} ) VULKAN_HPP_NOEXCEPT - : primitiveCount( primitiveCount_ ) - , primitiveOffset( primitiveOffset_ ) - , firstVertex( firstVertex_ ) - , transformOffset( transformOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureBuildRangeInfoKHR( AccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildRangeInfoKHR( VkAccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureBuildRangeInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureBuildRangeInfoKHR & operator=( AccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildRangeInfoKHR & operator=( VkAccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setPrimitiveCount( uint32_t primitiveCount_ ) VULKAN_HPP_NOEXCEPT - { - primitiveCount = primitiveCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setPrimitiveOffset( uint32_t primitiveOffset_ ) VULKAN_HPP_NOEXCEPT - { - primitiveOffset = primitiveOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT - { - firstVertex = firstVertex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setTransformOffset( uint32_t transformOffset_ ) VULKAN_HPP_NOEXCEPT - { - transformOffset = transformOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureBuildRangeInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureBuildRangeInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( primitiveCount, primitiveOffset, firstVertex, transformOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureBuildRangeInfoKHR const & ) const = default; -#else - bool operator==( AccelerationStructureBuildRangeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( primitiveCount == rhs.primitiveCount ) && ( primitiveOffset == rhs.primitiveOffset ) && ( firstVertex == rhs.firstVertex ) && - ( transformOffset == rhs.transformOffset ); -# endif - } - - bool operator!=( AccelerationStructureBuildRangeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t primitiveCount = {}; - uint32_t primitiveOffset = {}; - uint32_t firstVertex = {}; - uint32_t transformOffset = {}; - }; - - struct AccelerationStructureBuildSizesInfoKHR - { - using NativeType = VkAccelerationStructureBuildSizesInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureBuildSizesInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureBuildSizesInfoKHR( VULKAN_HPP_NAMESPACE::DeviceSize accelerationStructureSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize updateScratchSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructureSize( accelerationStructureSize_ ) - , updateScratchSize( updateScratchSize_ ) - , buildScratchSize( buildScratchSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureBuildSizesInfoKHR( AccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildSizesInfoKHR( VkAccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureBuildSizesInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureBuildSizesInfoKHR & operator=( AccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureBuildSizesInfoKHR & operator=( VkAccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildSizesInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildSizesInfoKHR & - setAccelerationStructureSize( VULKAN_HPP_NAMESPACE::DeviceSize accelerationStructureSize_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureSize = accelerationStructureSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildSizesInfoKHR & - setUpdateScratchSize( VULKAN_HPP_NAMESPACE::DeviceSize updateScratchSize_ ) VULKAN_HPP_NOEXCEPT - { - updateScratchSize = updateScratchSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildSizesInfoKHR & - setBuildScratchSize( VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize_ ) VULKAN_HPP_NOEXCEPT - { - buildScratchSize = buildScratchSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureBuildSizesInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureBuildSizesInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, accelerationStructureSize, updateScratchSize, buildScratchSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureBuildSizesInfoKHR const & ) const = default; -#else - bool operator==( AccelerationStructureBuildSizesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureSize == rhs.accelerationStructureSize ) && - ( updateScratchSize == rhs.updateScratchSize ) && ( buildScratchSize == rhs.buildScratchSize ); -# endif - } - - bool operator!=( AccelerationStructureBuildSizesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureBuildSizesInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize accelerationStructureSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize updateScratchSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureBuildSizesInfoKHR; - }; - - struct AccelerationStructureCreateInfoKHR - { - using NativeType = VkAccelerationStructureCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoKHR( - VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel, - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , createFlags( createFlags_ ) - , buffer( buffer_ ) - , offset( offset_ ) - , size( size_ ) - , type( type_ ) - , deviceAddress( deviceAddress_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoKHR( AccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureCreateInfoKHR( VkAccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureCreateInfoKHR & operator=( AccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureCreateInfoKHR & operator=( VkAccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & - setCreateFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags_ ) VULKAN_HPP_NOEXCEPT - { - createFlags = createFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - deviceAddress = deviceAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, createFlags, buffer, offset, size, type, deviceAddress ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureCreateInfoKHR const & ) const = default; -#else - bool operator==( AccelerationStructureCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( createFlags == rhs.createFlags ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && - ( size == rhs.size ) && ( type == rhs.type ) && ( deviceAddress == rhs.deviceAddress ); -# endif - } - - bool operator!=( AccelerationStructureCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel; - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureCreateInfoKHR; - }; - - struct GeometryTrianglesNV - { - using NativeType = VkGeometryTrianglesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryTrianglesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( VULKAN_HPP_NAMESPACE::Buffer vertexData_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset_ = {}, - uint32_t vertexCount_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, - VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Buffer indexData_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize indexOffset_ = {}, - uint32_t indexCount_ = {}, - VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, - VULKAN_HPP_NAMESPACE::Buffer transformData_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize transformOffset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexData( vertexData_ ) - , vertexOffset( vertexOffset_ ) - , vertexCount( vertexCount_ ) - , vertexStride( vertexStride_ ) - , vertexFormat( vertexFormat_ ) - , indexData( indexData_ ) - , indexOffset( indexOffset_ ) - , indexCount( indexCount_ ) - , indexType( indexType_ ) - , transformData( transformData_ ) - , transformOffset( transformOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( GeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryTrianglesNV( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryTrianglesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeometryTrianglesNV & operator=( GeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryTrianglesNV & operator=( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexData( VULKAN_HPP_NAMESPACE::Buffer vertexData_ ) VULKAN_HPP_NOEXCEPT - { - vertexData = vertexData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexOffset( VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset_ ) VULKAN_HPP_NOEXCEPT - { - vertexOffset = vertexOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexCount = vertexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT - { - vertexStride = vertexStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT - { - vertexFormat = vertexFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexData( VULKAN_HPP_NAMESPACE::Buffer indexData_ ) VULKAN_HPP_NOEXCEPT - { - indexData = indexData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize indexOffset_ ) VULKAN_HPP_NOEXCEPT - { - indexOffset = indexOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT - { - indexCount = indexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT - { - indexType = indexType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setTransformData( VULKAN_HPP_NAMESPACE::Buffer transformData_ ) VULKAN_HPP_NOEXCEPT - { - transformData = transformData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setTransformOffset( VULKAN_HPP_NAMESPACE::DeviceSize transformOffset_ ) VULKAN_HPP_NOEXCEPT - { - transformOffset = transformOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeometryTrianglesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeometryTrianglesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - vertexData, - vertexOffset, - vertexCount, - vertexStride, - vertexFormat, - indexData, - indexOffset, - indexCount, - indexType, - transformData, - transformOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeometryTrianglesNV const & ) const = default; -#else - bool operator==( GeometryTrianglesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexData == rhs.vertexData ) && ( vertexOffset == rhs.vertexOffset ) && - ( vertexCount == rhs.vertexCount ) && ( vertexStride == rhs.vertexStride ) && ( vertexFormat == rhs.vertexFormat ) && - ( indexData == rhs.indexData ) && ( indexOffset == rhs.indexOffset ) && ( indexCount == rhs.indexCount ) && ( indexType == rhs.indexType ) && - ( transformData == rhs.transformData ) && ( transformOffset == rhs.transformOffset ); -# endif - } - - bool operator!=( GeometryTrianglesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryTrianglesNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer vertexData = {}; - VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset = {}; - uint32_t vertexCount = {}; - VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; - VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::Buffer indexData = {}; - VULKAN_HPP_NAMESPACE::DeviceSize indexOffset = {}; - uint32_t indexCount = {}; - VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; - VULKAN_HPP_NAMESPACE::Buffer transformData = {}; - VULKAN_HPP_NAMESPACE::DeviceSize transformOffset = {}; - }; - - template <> - struct CppType - { - using Type = GeometryTrianglesNV; - }; - - struct GeometryAABBNV - { - using NativeType = VkGeometryAABBNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryAabbNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GeometryAABBNV( VULKAN_HPP_NAMESPACE::Buffer aabbData_ = {}, - uint32_t numAABBs_ = {}, - uint32_t stride_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , aabbData( aabbData_ ) - , numAABBs( numAABBs_ ) - , stride( stride_ ) - , offset( offset_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeometryAABBNV( GeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryAABBNV( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryAABBNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeometryAABBNV & operator=( GeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryAABBNV & operator=( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setAabbData( VULKAN_HPP_NAMESPACE::Buffer aabbData_ ) VULKAN_HPP_NOEXCEPT - { - aabbData = aabbData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setNumAABBs( uint32_t numAABBs_ ) VULKAN_HPP_NOEXCEPT - { - numAABBs = numAABBs_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeometryAABBNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeometryAABBNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, aabbData, numAABBs, stride, offset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeometryAABBNV const & ) const = default; -#else - bool operator==( GeometryAABBNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( aabbData == rhs.aabbData ) && ( numAABBs == rhs.numAABBs ) && ( stride == rhs.stride ) && - ( offset == rhs.offset ); -# endif - } - - bool operator!=( GeometryAABBNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryAabbNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer aabbData = {}; - uint32_t numAABBs = {}; - uint32_t stride = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - }; - - template <> - struct CppType - { - using Type = GeometryAABBNV; - }; - - struct GeometryDataNV - { - using NativeType = VkGeometryDataNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GeometryDataNV( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles_ = {}, - VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs_ = {} ) VULKAN_HPP_NOEXCEPT - : triangles( triangles_ ) - , aabbs( aabbs_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeometryDataNV( GeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryDataNV( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryDataNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeometryDataNV & operator=( GeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryDataNV & operator=( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeometryDataNV & setTriangles( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & triangles_ ) VULKAN_HPP_NOEXCEPT - { - triangles = triangles_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryDataNV & setAabbs( VULKAN_HPP_NAMESPACE::GeometryAABBNV const & aabbs_ ) VULKAN_HPP_NOEXCEPT - { - aabbs = aabbs_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeometryDataNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeometryDataNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( triangles, aabbs ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeometryDataNV const & ) const = default; -#else - bool operator==( GeometryDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( triangles == rhs.triangles ) && ( aabbs == rhs.aabbs ); -# endif - } - - bool operator!=( GeometryDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles = {}; - VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs = {}; - }; - - struct GeometryNV - { - using NativeType = VkGeometryNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GeometryNV( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles, - VULKAN_HPP_NAMESPACE::GeometryDataNV geometry_ = {}, - VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , geometryType( geometryType_ ) - , geometry( geometry_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeometryNV( GeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryNV( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeometryNV & operator=( GeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeometryNV & operator=( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeometryNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryNV & setGeometryType( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ ) VULKAN_HPP_NOEXCEPT - { - geometryType = geometryType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryNV & setGeometry( VULKAN_HPP_NAMESPACE::GeometryDataNV const & geometry_ ) VULKAN_HPP_NOEXCEPT - { - geometry = geometry_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeometryNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeometryNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeometryNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, geometryType, geometry, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeometryNV const & ) const = default; -#else - bool operator==( GeometryNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( geometryType == rhs.geometryType ) && ( geometry == rhs.geometry ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( GeometryNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles; - VULKAN_HPP_NAMESPACE::GeometryDataNV geometry = {}; - VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags = {}; - }; - - template <> - struct CppType - { - using Type = GeometryNV; - }; - - struct AccelerationStructureInfoNV - { - using NativeType = VkAccelerationStructureInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ = {}, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ = {}, - uint32_t instanceCount_ = {}, - uint32_t geometryCount_ = {}, - const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , flags( flags_ ) - , instanceCount( instanceCount_ ) - , geometryCount( geometryCount_ ) - , pGeometries( pGeometries_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( AccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureInfoNV( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_, - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_, - uint32_t instanceCount_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , type( type_ ) - , flags( flags_ ) - , instanceCount( instanceCount_ ) - , geometryCount( static_cast( geometries_.size() ) ) - , pGeometries( geometries_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureInfoNV & operator=( AccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureInfoNV & operator=( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT - { - instanceCount = instanceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setGeometryCount( uint32_t geometryCount_ ) VULKAN_HPP_NOEXCEPT - { - geometryCount = geometryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setPGeometries( const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries_ ) VULKAN_HPP_NOEXCEPT - { - pGeometries = pGeometries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AccelerationStructureInfoNV & - setGeometries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_ ) VULKAN_HPP_NOEXCEPT - { - geometryCount = static_cast( geometries_.size() ); - pGeometries = geometries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type, flags, instanceCount, geometryCount, pGeometries ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureInfoNV const & ) const = default; -#else - bool operator==( AccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( flags == rhs.flags ) && ( instanceCount == rhs.instanceCount ) && - ( geometryCount == rhs.geometryCount ) && ( pGeometries == rhs.pGeometries ); -# endif - } - - bool operator!=( AccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type = {}; - VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags = {}; - uint32_t instanceCount = {}; - uint32_t geometryCount = {}; - const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureInfoNV; - }; - - struct AccelerationStructureCreateInfoNV - { - using NativeType = VkAccelerationStructureCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , compactedSize( compactedSize_ ) - , info( info_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( AccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureCreateInfoNV( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureCreateInfoNV & operator=( AccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureCreateInfoNV & operator=( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setCompactedSize( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ ) VULKAN_HPP_NOEXCEPT - { - compactedSize = compactedSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setInfo( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const & info_ ) VULKAN_HPP_NOEXCEPT - { - info = info_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, compactedSize, info ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureCreateInfoNV const & ) const = default; -#else - bool operator==( AccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compactedSize == rhs.compactedSize ) && ( info == rhs.info ); -# endif - } - - bool operator!=( AccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize compactedSize = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureCreateInfoNV; - }; - - struct AccelerationStructureDeviceAddressInfoKHR - { - using NativeType = VkAccelerationStructureDeviceAddressInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureDeviceAddressInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureDeviceAddressInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructure( accelerationStructure_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureDeviceAddressInfoKHR( AccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureDeviceAddressInfoKHR( VkAccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureDeviceAddressInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureDeviceAddressInfoKHR & operator=( AccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureDeviceAddressInfoKHR & operator=( VkAccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureDeviceAddressInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureDeviceAddressInfoKHR & - setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructure = accelerationStructure_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureDeviceAddressInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureDeviceAddressInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, accelerationStructure ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureDeviceAddressInfoKHR const & ) const = default; -#else - bool operator==( AccelerationStructureDeviceAddressInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ); -# endif - } - - bool operator!=( AccelerationStructureDeviceAddressInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureDeviceAddressInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureDeviceAddressInfoKHR; - }; - - struct AccelerationStructureGeometryMotionTrianglesDataNV - { - using NativeType = VkAccelerationStructureGeometryMotionTrianglesDataNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexData( vertexData_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureGeometryMotionTrianglesDataNV( AccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryMotionTrianglesDataNV( VkAccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureGeometryMotionTrianglesDataNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureGeometryMotionTrianglesDataNV & - operator=( AccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureGeometryMotionTrianglesDataNV & operator=( VkAccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV & - setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT - { - vertexData = vertexData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureGeometryMotionTrianglesDataNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureGeometryMotionTrianglesDataNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vertexData ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureGeometryMotionTrianglesDataNV; - }; - - struct TransformMatrixKHR - { - using NativeType = VkTransformMatrixKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR( std::array, 3> const & matrix_ = {} ) VULKAN_HPP_NOEXCEPT : matrix( matrix_ ) {} - - VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR( TransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TransformMatrixKHR( VkTransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT : TransformMatrixKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TransformMatrixKHR & operator=( TransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TransformMatrixKHR & operator=( VkTransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR & setMatrix( std::array, 3> matrix_ ) VULKAN_HPP_NOEXCEPT - { - matrix = matrix_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkTransformMatrixKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTransformMatrixKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( matrix ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TransformMatrixKHR const & ) const = default; -#else - bool operator==( TransformMatrixKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( matrix == rhs.matrix ); -# endif - } - - bool operator!=( TransformMatrixKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ArrayWrapper2D matrix = {}; - }; - using TransformMatrixNV = TransformMatrixKHR; - - struct AccelerationStructureInstanceKHR - { - using NativeType = VkAccelerationStructureInstanceKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR( VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform_ = {}, - uint32_t instanceCustomIndex_ = {}, - uint32_t mask_ = {}, - uint32_t instanceShaderBindingTableRecordOffset_ = {}, - VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, - uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT - : transform( transform_ ) - , instanceCustomIndex( instanceCustomIndex_ ) - , mask( mask_ ) - , instanceShaderBindingTableRecordOffset( instanceShaderBindingTableRecordOffset_ ) - , flags( flags_ ) - , accelerationStructureReference( accelerationStructureReference_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR( AccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureInstanceKHR( VkAccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureInstanceKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureInstanceKHR & operator=( AccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureInstanceKHR & operator=( VkAccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setTransform( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transform_ ) VULKAN_HPP_NOEXCEPT - { - transform = transform_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT - { - instanceCustomIndex = instanceCustomIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT - { - mask = mask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & - setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT - { - instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; - return *this; - } - - AccelerationStructureInstanceKHR & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = *reinterpret_cast( &flags_ ); - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureReference = accelerationStructureReference_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureInstanceKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureInstanceKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( transform, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureInstanceKHR const & ) const = default; -#else - bool operator==( AccelerationStructureInstanceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( transform == rhs.transform ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && ( mask == rhs.mask ) && - ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && - ( accelerationStructureReference == rhs.accelerationStructureReference ); -# endif - } - - bool operator!=( AccelerationStructureInstanceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; - uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; - uint64_t accelerationStructureReference = {}; - }; - using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; - - struct AccelerationStructureMatrixMotionInstanceNV - { - using NativeType = VkAccelerationStructureMatrixMotionInstanceNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV( VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0_ = {}, - VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1_ = {}, - uint32_t instanceCustomIndex_ = {}, - uint32_t mask_ = {}, - uint32_t instanceShaderBindingTableRecordOffset_ = {}, - VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, - uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT - : transformT0( transformT0_ ) - , transformT1( transformT1_ ) - , instanceCustomIndex( instanceCustomIndex_ ) - , mask( mask_ ) - , instanceShaderBindingTableRecordOffset( instanceShaderBindingTableRecordOffset_ ) - , flags( flags_ ) - , accelerationStructureReference( accelerationStructureReference_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - AccelerationStructureMatrixMotionInstanceNV( AccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMatrixMotionInstanceNV( VkAccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureMatrixMotionInstanceNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureMatrixMotionInstanceNV & operator=( AccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMatrixMotionInstanceNV & operator=( VkAccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & - setTransformT0( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformT0_ ) VULKAN_HPP_NOEXCEPT - { - transformT0 = transformT0_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & - setTransformT1( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformT1_ ) VULKAN_HPP_NOEXCEPT - { - transformT1 = transformT1_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT - { - instanceCustomIndex = instanceCustomIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT - { - mask = mask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & - setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT - { - instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; - return *this; - } - - AccelerationStructureMatrixMotionInstanceNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = *reinterpret_cast( &flags_ ); - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & - setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureReference = accelerationStructureReference_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureMatrixMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureMatrixMotionInstanceNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( transformT0, transformT1, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureMatrixMotionInstanceNV const & ) const = default; -#else - bool operator==( AccelerationStructureMatrixMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( transformT0 == rhs.transformT0 ) && ( transformT1 == rhs.transformT1 ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && - ( mask == rhs.mask ) && ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && - ( accelerationStructureReference == rhs.accelerationStructureReference ); -# endif - } - - bool operator!=( AccelerationStructureMatrixMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {}; - VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; - uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; - uint64_t accelerationStructureReference = {}; - }; - - struct AccelerationStructureMemoryRequirementsInfoNV - { - using NativeType = VkAccelerationStructureMemoryRequirementsInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( - VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV::eObject, - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , accelerationStructure( accelerationStructure_ ) - { - } - - VULKAN_HPP_CONSTEXPR - AccelerationStructureMemoryRequirementsInfoNV( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMemoryRequirementsInfoNV( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureMemoryRequirementsInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureMemoryRequirementsInfoNV & operator=( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMemoryRequirementsInfoNV & operator=( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & - setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & - setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructure = accelerationStructure_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureMemoryRequirementsInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type, accelerationStructure ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureMemoryRequirementsInfoNV const & ) const = default; -#else - bool operator==( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( accelerationStructure == rhs.accelerationStructure ); -# endif - } - - bool operator!=( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type = VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV::eObject; - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureMemoryRequirementsInfoNV; - }; - - struct AccelerationStructureMotionInfoNV - { - using NativeType = VkAccelerationStructureMotionInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureMotionInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureMotionInfoNV( uint32_t maxInstances_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxInstances( maxInstances_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureMotionInfoNV( AccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMotionInfoNV( VkAccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureMotionInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureMotionInfoNV & operator=( AccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMotionInfoNV & operator=( VkAccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & setMaxInstances( uint32_t maxInstances_ ) VULKAN_HPP_NOEXCEPT - { - maxInstances = maxInstances_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & - setFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureMotionInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureMotionInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxInstances, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureMotionInfoNV const & ) const = default; -#else - bool operator==( AccelerationStructureMotionInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInstances == rhs.maxInstances ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( AccelerationStructureMotionInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureMotionInfoNV; - const void * pNext = {}; - uint32_t maxInstances = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureMotionInfoNV; - }; - - struct SRTDataNV - { - using NativeType = VkSRTDataNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SRTDataNV( float sx_ = {}, - float a_ = {}, - float b_ = {}, - float pvx_ = {}, - float sy_ = {}, - float c_ = {}, - float pvy_ = {}, - float sz_ = {}, - float pvz_ = {}, - float qx_ = {}, - float qy_ = {}, - float qz_ = {}, - float qw_ = {}, - float tx_ = {}, - float ty_ = {}, - float tz_ = {} ) VULKAN_HPP_NOEXCEPT - : sx( sx_ ) - , a( a_ ) - , b( b_ ) - , pvx( pvx_ ) - , sy( sy_ ) - , c( c_ ) - , pvy( pvy_ ) - , sz( sz_ ) - , pvz( pvz_ ) - , qx( qx_ ) - , qy( qy_ ) - , qz( qz_ ) - , qw( qw_ ) - , tx( tx_ ) - , ty( ty_ ) - , tz( tz_ ) - { - } - - VULKAN_HPP_CONSTEXPR SRTDataNV( SRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SRTDataNV( VkSRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : SRTDataNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SRTDataNV & operator=( SRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SRTDataNV & operator=( VkSRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSx( float sx_ ) VULKAN_HPP_NOEXCEPT - { - sx = sx_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setA( float a_ ) VULKAN_HPP_NOEXCEPT - { - a = a_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setB( float b_ ) VULKAN_HPP_NOEXCEPT - { - b = b_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvx( float pvx_ ) VULKAN_HPP_NOEXCEPT - { - pvx = pvx_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSy( float sy_ ) VULKAN_HPP_NOEXCEPT - { - sy = sy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setC( float c_ ) VULKAN_HPP_NOEXCEPT - { - c = c_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvy( float pvy_ ) VULKAN_HPP_NOEXCEPT - { - pvy = pvy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSz( float sz_ ) VULKAN_HPP_NOEXCEPT - { - sz = sz_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvz( float pvz_ ) VULKAN_HPP_NOEXCEPT - { - pvz = pvz_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQx( float qx_ ) VULKAN_HPP_NOEXCEPT - { - qx = qx_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQy( float qy_ ) VULKAN_HPP_NOEXCEPT - { - qy = qy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQz( float qz_ ) VULKAN_HPP_NOEXCEPT - { - qz = qz_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQw( float qw_ ) VULKAN_HPP_NOEXCEPT - { - qw = qw_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTx( float tx_ ) VULKAN_HPP_NOEXCEPT - { - tx = tx_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTy( float ty_ ) VULKAN_HPP_NOEXCEPT - { - ty = ty_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTz( float tz_ ) VULKAN_HPP_NOEXCEPT - { - tz = tz_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSRTDataNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSRTDataNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sx, a, b, pvx, sy, c, pvy, sz, pvz, qx, qy, qz, qw, tx, ty, tz ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SRTDataNV const & ) const = default; -#else - bool operator==( SRTDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sx == rhs.sx ) && ( a == rhs.a ) && ( b == rhs.b ) && ( pvx == rhs.pvx ) && ( sy == rhs.sy ) && ( c == rhs.c ) && ( pvy == rhs.pvy ) && - ( sz == rhs.sz ) && ( pvz == rhs.pvz ) && ( qx == rhs.qx ) && ( qy == rhs.qy ) && ( qz == rhs.qz ) && ( qw == rhs.qw ) && ( tx == rhs.tx ) && - ( ty == rhs.ty ) && ( tz == rhs.tz ); -# endif - } - - bool operator!=( SRTDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float sx = {}; - float a = {}; - float b = {}; - float pvx = {}; - float sy = {}; - float c = {}; - float pvy = {}; - float sz = {}; - float pvz = {}; - float qx = {}; - float qy = {}; - float qz = {}; - float qw = {}; - float tx = {}; - float ty = {}; - float tz = {}; - }; - - struct AccelerationStructureSRTMotionInstanceNV - { - using NativeType = VkAccelerationStructureSRTMotionInstanceNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureSRTMotionInstanceNV( VULKAN_HPP_NAMESPACE::SRTDataNV transformT0_ = {}, - VULKAN_HPP_NAMESPACE::SRTDataNV transformT1_ = {}, - uint32_t instanceCustomIndex_ = {}, - uint32_t mask_ = {}, - uint32_t instanceShaderBindingTableRecordOffset_ = {}, - VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, - uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT - : transformT0( transformT0_ ) - , transformT1( transformT1_ ) - , instanceCustomIndex( instanceCustomIndex_ ) - , mask( mask_ ) - , instanceShaderBindingTableRecordOffset( instanceShaderBindingTableRecordOffset_ ) - , flags( flags_ ) - , accelerationStructureReference( accelerationStructureReference_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureSRTMotionInstanceNV( AccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureSRTMotionInstanceNV( VkAccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureSRTMotionInstanceNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureSRTMotionInstanceNV & operator=( AccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureSRTMotionInstanceNV & operator=( VkAccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & - setTransformT0( VULKAN_HPP_NAMESPACE::SRTDataNV const & transformT0_ ) VULKAN_HPP_NOEXCEPT - { - transformT0 = transformT0_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & - setTransformT1( VULKAN_HPP_NAMESPACE::SRTDataNV const & transformT1_ ) VULKAN_HPP_NOEXCEPT - { - transformT1 = transformT1_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT - { - instanceCustomIndex = instanceCustomIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT - { - mask = mask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & - setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT - { - instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; - return *this; - } - - AccelerationStructureSRTMotionInstanceNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = *reinterpret_cast( &flags_ ); - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & - setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureReference = accelerationStructureReference_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureSRTMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureSRTMotionInstanceNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( transformT0, transformT1, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureSRTMotionInstanceNV const & ) const = default; -#else - bool operator==( AccelerationStructureSRTMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( transformT0 == rhs.transformT0 ) && ( transformT1 == rhs.transformT1 ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && - ( mask == rhs.mask ) && ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && - ( accelerationStructureReference == rhs.accelerationStructureReference ); -# endif - } - - bool operator!=( AccelerationStructureSRTMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {}; - VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {}; - uint32_t instanceCustomIndex : 24; - uint32_t mask : 8; - uint32_t instanceShaderBindingTableRecordOffset : 24; - VkGeometryInstanceFlagsKHR flags : 8; - uint64_t accelerationStructureReference = {}; - }; - - union AccelerationStructureMotionInstanceDataNV - { - using NativeType = VkAccelerationStructureMotionInstanceDataNV; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR staticInstance_ = {} ) - : staticInstance( staticInstance_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV matrixMotionInstance_ ) - : matrixMotionInstance( matrixMotionInstance_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV srtMotionInstance_ ) - : srtMotionInstance( srtMotionInstance_ ) - { - } -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & - setStaticInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR const & staticInstance_ ) VULKAN_HPP_NOEXCEPT - { - staticInstance = staticInstance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & - setMatrixMotionInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV const & matrixMotionInstance_ ) VULKAN_HPP_NOEXCEPT - { - matrixMotionInstance = matrixMotionInstance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & - setSrtMotionInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV const & srtMotionInstance_ ) VULKAN_HPP_NOEXCEPT - { - srtMotionInstance = srtMotionInstance_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkAccelerationStructureMotionInstanceDataNV const &() const - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureMotionInstanceDataNV &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR staticInstance; - VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; - VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV srtMotionInstance; -#else - VkAccelerationStructureInstanceKHR staticInstance; - VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; - VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct AccelerationStructureMotionInstanceNV - { - using NativeType = VkAccelerationStructureMotionInstanceNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV( - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV::eStatic, - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV data_ = {} ) VULKAN_HPP_NOEXCEPT - : type( type_ ) - , flags( flags_ ) - , data( data_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV( AccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMotionInstanceNV( VkAccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureMotionInstanceNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureMotionInstanceNV & operator=( AccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureMotionInstanceNV & operator=( VkAccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & - setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & - setFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & - setData( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV const & data_ ) VULKAN_HPP_NOEXCEPT - { - data = data_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureMotionInstanceNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( type, flags, data ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type = VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV::eStatic; - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV data = {}; - }; - - struct AccelerationStructureVersionInfoKHR - { - using NativeType = VkAccelerationStructureVersionInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureVersionInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AccelerationStructureVersionInfoKHR( const uint8_t * pVersionData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pVersionData( pVersionData_ ) - { - } - - VULKAN_HPP_CONSTEXPR AccelerationStructureVersionInfoKHR( AccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureVersionInfoKHR( VkAccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AccelerationStructureVersionInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AccelerationStructureVersionInfoKHR & operator=( AccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AccelerationStructureVersionInfoKHR & operator=( VkAccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureVersionInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AccelerationStructureVersionInfoKHR & setPVersionData( const uint8_t * pVersionData_ ) VULKAN_HPP_NOEXCEPT - { - pVersionData = pVersionData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAccelerationStructureVersionInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAccelerationStructureVersionInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pVersionData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AccelerationStructureVersionInfoKHR const & ) const = default; -#else - bool operator==( AccelerationStructureVersionInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pVersionData == rhs.pVersionData ); -# endif - } - - bool operator!=( AccelerationStructureVersionInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureVersionInfoKHR; - const void * pNext = {}; - const uint8_t * pVersionData = {}; - }; - - template <> - struct CppType - { - using Type = AccelerationStructureVersionInfoKHR; - }; - - struct AcquireNextImageInfoKHR - { - using NativeType = VkAcquireNextImageInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAcquireNextImageInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, - uint64_t timeout_ = {}, - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::Fence fence_ = {}, - uint32_t deviceMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchain( swapchain_ ) - , timeout( timeout_ ) - , semaphore( semaphore_ ) - , fence( fence_ ) - , deviceMask( deviceMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( AcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AcquireNextImageInfoKHR( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AcquireNextImageInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AcquireNextImageInfoKHR & operator=( AcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AcquireNextImageInfoKHR & operator=( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT - { - swapchain = swapchain_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setTimeout( uint64_t timeout_ ) VULKAN_HPP_NOEXCEPT - { - timeout = timeout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT - { - fence = fence_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT - { - deviceMask = deviceMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAcquireNextImageInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAcquireNextImageInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchain, timeout, semaphore, fence, deviceMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AcquireNextImageInfoKHR const & ) const = default; -#else - bool operator==( AcquireNextImageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ) && ( timeout == rhs.timeout ) && - ( semaphore == rhs.semaphore ) && ( fence == rhs.fence ) && ( deviceMask == rhs.deviceMask ); -# endif - } - - bool operator!=( AcquireNextImageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAcquireNextImageInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; - uint64_t timeout = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::Fence fence = {}; - uint32_t deviceMask = {}; - }; - - template <> - struct CppType - { - using Type = AcquireNextImageInfoKHR; - }; - - struct AcquireProfilingLockInfoKHR - { - using NativeType = VkAcquireProfilingLockInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAcquireProfilingLockInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AcquireProfilingLockInfoKHR( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ = {}, - uint64_t timeout_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , timeout( timeout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AcquireProfilingLockInfoKHR( AcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AcquireProfilingLockInfoKHR( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AcquireProfilingLockInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AcquireProfilingLockInfoKHR & operator=( AcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AcquireProfilingLockInfoKHR & operator=( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setTimeout( uint64_t timeout_ ) VULKAN_HPP_NOEXCEPT - { - timeout = timeout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAcquireProfilingLockInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAcquireProfilingLockInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, timeout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AcquireProfilingLockInfoKHR const & ) const = default; -#else - bool operator==( AcquireProfilingLockInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( timeout == rhs.timeout ); -# endif - } - - bool operator!=( AcquireProfilingLockInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAcquireProfilingLockInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags = {}; - uint64_t timeout = {}; - }; - - template <> - struct CppType - { - using Type = AcquireProfilingLockInfoKHR; - }; - - struct AllocationCallbacks - { - using NativeType = VkAllocationCallbacks; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AllocationCallbacks( void * pUserData_ = {}, - PFN_vkAllocationFunction pfnAllocation_ = {}, - PFN_vkReallocationFunction pfnReallocation_ = {}, - PFN_vkFreeFunction pfnFree_ = {}, - PFN_vkInternalAllocationNotification pfnInternalAllocation_ = {}, - PFN_vkInternalFreeNotification pfnInternalFree_ = {} ) VULKAN_HPP_NOEXCEPT - : pUserData( pUserData_ ) - , pfnAllocation( pfnAllocation_ ) - , pfnReallocation( pfnReallocation_ ) - , pfnFree( pfnFree_ ) - , pfnInternalAllocation( pfnInternalAllocation_ ) - , pfnInternalFree( pfnInternalFree_ ) - { - } - - VULKAN_HPP_CONSTEXPR AllocationCallbacks( AllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AllocationCallbacks( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT : AllocationCallbacks( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AllocationCallbacks & operator=( AllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AllocationCallbacks & operator=( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT - { - pUserData = pUserData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnAllocation( PFN_vkAllocationFunction pfnAllocation_ ) VULKAN_HPP_NOEXCEPT - { - pfnAllocation = pfnAllocation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnReallocation( PFN_vkReallocationFunction pfnReallocation_ ) VULKAN_HPP_NOEXCEPT - { - pfnReallocation = pfnReallocation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnFree( PFN_vkFreeFunction pfnFree_ ) VULKAN_HPP_NOEXCEPT - { - pfnFree = pfnFree_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnInternalAllocation( PFN_vkInternalAllocationNotification pfnInternalAllocation_ ) VULKAN_HPP_NOEXCEPT - { - pfnInternalAllocation = pfnInternalAllocation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnInternalFree( PFN_vkInternalFreeNotification pfnInternalFree_ ) VULKAN_HPP_NOEXCEPT - { - pfnInternalFree = pfnInternalFree_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAllocationCallbacks const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAllocationCallbacks &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( pUserData, pfnAllocation, pfnReallocation, pfnFree, pfnInternalAllocation, pfnInternalFree ); - } -#endif - - bool operator==( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT - { -#if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -#else - return ( pUserData == rhs.pUserData ) && ( pfnAllocation == rhs.pfnAllocation ) && ( pfnReallocation == rhs.pfnReallocation ) && - ( pfnFree == rhs.pfnFree ) && ( pfnInternalAllocation == rhs.pfnInternalAllocation ) && ( pfnInternalFree == rhs.pfnInternalFree ); -#endif - } - - bool operator!=( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - void * pUserData = {}; - PFN_vkAllocationFunction pfnAllocation = {}; - PFN_vkReallocationFunction pfnReallocation = {}; - PFN_vkFreeFunction pfnFree = {}; - PFN_vkInternalAllocationNotification pfnInternalAllocation = {}; - PFN_vkInternalFreeNotification pfnInternalFree = {}; - }; - - struct AmigoProfilingSubmitInfoSEC - { - using NativeType = VkAmigoProfilingSubmitInfoSEC; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAmigoProfilingSubmitInfoSEC; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - AmigoProfilingSubmitInfoSEC( uint64_t firstDrawTimestamp_ = {}, uint64_t swapBufferTimestamp_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , firstDrawTimestamp( firstDrawTimestamp_ ) - , swapBufferTimestamp( swapBufferTimestamp_ ) - { - } - - VULKAN_HPP_CONSTEXPR AmigoProfilingSubmitInfoSEC( AmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AmigoProfilingSubmitInfoSEC( VkAmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT - : AmigoProfilingSubmitInfoSEC( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AmigoProfilingSubmitInfoSEC & operator=( AmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AmigoProfilingSubmitInfoSEC & operator=( VkAmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setFirstDrawTimestamp( uint64_t firstDrawTimestamp_ ) VULKAN_HPP_NOEXCEPT - { - firstDrawTimestamp = firstDrawTimestamp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setSwapBufferTimestamp( uint64_t swapBufferTimestamp_ ) VULKAN_HPP_NOEXCEPT - { - swapBufferTimestamp = swapBufferTimestamp_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAmigoProfilingSubmitInfoSEC const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAmigoProfilingSubmitInfoSEC &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, firstDrawTimestamp, swapBufferTimestamp ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AmigoProfilingSubmitInfoSEC const & ) const = default; -#else - bool operator==( AmigoProfilingSubmitInfoSEC const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( firstDrawTimestamp == rhs.firstDrawTimestamp ) && - ( swapBufferTimestamp == rhs.swapBufferTimestamp ); -# endif - } - - bool operator!=( AmigoProfilingSubmitInfoSEC const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAmigoProfilingSubmitInfoSEC; - const void * pNext = {}; - uint64_t firstDrawTimestamp = {}; - uint64_t swapBufferTimestamp = {}; - }; - - template <> - struct CppType - { - using Type = AmigoProfilingSubmitInfoSEC; - }; - - struct ComponentMapping - { - using NativeType = VkComponentMapping; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ComponentMapping( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, - VULKAN_HPP_NAMESPACE::ComponentSwizzle g_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, - VULKAN_HPP_NAMESPACE::ComponentSwizzle b_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, - VULKAN_HPP_NAMESPACE::ComponentSwizzle a_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity ) VULKAN_HPP_NOEXCEPT - : r( r_ ) - , g( g_ ) - , b( b_ ) - , a( a_ ) - { - } - - VULKAN_HPP_CONSTEXPR ComponentMapping( ComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ComponentMapping( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT : ComponentMapping( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ComponentMapping & operator=( ComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ComponentMapping & operator=( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setR( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ ) VULKAN_HPP_NOEXCEPT - { - r = r_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setG( VULKAN_HPP_NAMESPACE::ComponentSwizzle g_ ) VULKAN_HPP_NOEXCEPT - { - g = g_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setB( VULKAN_HPP_NAMESPACE::ComponentSwizzle b_ ) VULKAN_HPP_NOEXCEPT - { - b = b_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setA( VULKAN_HPP_NAMESPACE::ComponentSwizzle a_ ) VULKAN_HPP_NOEXCEPT - { - a = a_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkComponentMapping const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkComponentMapping &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( r, g, b, a ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ComponentMapping const & ) const = default; -#else - bool operator==( ComponentMapping const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( r == rhs.r ) && ( g == rhs.g ) && ( b == rhs.b ) && ( a == rhs.a ); -# endif - } - - bool operator!=( ComponentMapping const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ComponentSwizzle r = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; - VULKAN_HPP_NAMESPACE::ComponentSwizzle g = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; - VULKAN_HPP_NAMESPACE::ComponentSwizzle b = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; - VULKAN_HPP_NAMESPACE::ComponentSwizzle a = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; - }; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct AndroidHardwareBufferFormatProperties2ANDROID - { - using NativeType = VkAndroidHardwareBufferFormatProperties2ANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferFormatProperties2ANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatProperties2ANDROID( - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - uint64_t externalFormat_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 formatFeatures_ = {}, - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , externalFormat( externalFormat_ ) - , formatFeatures( formatFeatures_ ) - , samplerYcbcrConversionComponents( samplerYcbcrConversionComponents_ ) - , suggestedYcbcrModel( suggestedYcbcrModel_ ) - , suggestedYcbcrRange( suggestedYcbcrRange_ ) - , suggestedXChromaOffset( suggestedXChromaOffset_ ) - , suggestedYChromaOffset( suggestedYChromaOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR - AndroidHardwareBufferFormatProperties2ANDROID( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferFormatProperties2ANDROID( VkAndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : AndroidHardwareBufferFormatProperties2ANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AndroidHardwareBufferFormatProperties2ANDROID & operator=( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferFormatProperties2ANDROID & operator=( VkAndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkAndroidHardwareBufferFormatProperties2ANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAndroidHardwareBufferFormatProperties2ANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - format, - externalFormat, - formatFeatures, - samplerYcbcrConversionComponents, - suggestedYcbcrModel, - suggestedYcbcrRange, - suggestedXChromaOffset, - suggestedYChromaOffset ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AndroidHardwareBufferFormatProperties2ANDROID const & ) const = default; -# else - bool operator==( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( externalFormat == rhs.externalFormat ) && - ( formatFeatures == rhs.formatFeatures ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && - ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && - ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); -# endif - } - - bool operator!=( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferFormatProperties2ANDROID; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - uint64_t externalFormat = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 formatFeatures = {}; - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - }; - - template <> - struct CppType - { - using Type = AndroidHardwareBufferFormatProperties2ANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct AndroidHardwareBufferFormatPropertiesANDROID - { - using NativeType = VkAndroidHardwareBufferFormatPropertiesANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatPropertiesANDROID( - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - uint64_t externalFormat_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ = {}, - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , externalFormat( externalFormat_ ) - , formatFeatures( formatFeatures_ ) - , samplerYcbcrConversionComponents( samplerYcbcrConversionComponents_ ) - , suggestedYcbcrModel( suggestedYcbcrModel_ ) - , suggestedYcbcrRange( suggestedYcbcrRange_ ) - , suggestedXChromaOffset( suggestedXChromaOffset_ ) - , suggestedYChromaOffset( suggestedYChromaOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatPropertiesANDROID( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferFormatPropertiesANDROID( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : AndroidHardwareBufferFormatPropertiesANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AndroidHardwareBufferFormatPropertiesANDROID & operator=( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferFormatPropertiesANDROID & operator=( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkAndroidHardwareBufferFormatPropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAndroidHardwareBufferFormatPropertiesANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - format, - externalFormat, - formatFeatures, - samplerYcbcrConversionComponents, - suggestedYcbcrModel, - suggestedYcbcrRange, - suggestedXChromaOffset, - suggestedYChromaOffset ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AndroidHardwareBufferFormatPropertiesANDROID const & ) const = default; -# else - bool operator==( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( externalFormat == rhs.externalFormat ) && - ( formatFeatures == rhs.formatFeatures ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && - ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && - ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); -# endif - } - - bool operator!=( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - uint64_t externalFormat = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures = {}; - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - }; - - template <> - struct CppType - { - using Type = AndroidHardwareBufferFormatPropertiesANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct AndroidHardwareBufferPropertiesANDROID - { - using NativeType = VkAndroidHardwareBufferPropertiesANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferPropertiesANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferPropertiesANDROID( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {}, - uint32_t memoryTypeBits_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , allocationSize( allocationSize_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferPropertiesANDROID( AndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferPropertiesANDROID( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : AndroidHardwareBufferPropertiesANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AndroidHardwareBufferPropertiesANDROID & operator=( AndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferPropertiesANDROID & operator=( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkAndroidHardwareBufferPropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAndroidHardwareBufferPropertiesANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, allocationSize, memoryTypeBits ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AndroidHardwareBufferPropertiesANDROID const & ) const = default; -# else - bool operator==( AndroidHardwareBufferPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allocationSize == rhs.allocationSize ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( AndroidHardwareBufferPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferPropertiesANDROID; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {}; - uint32_t memoryTypeBits = {}; - }; - - template <> - struct CppType - { - using Type = AndroidHardwareBufferPropertiesANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct AndroidHardwareBufferUsageANDROID - { - using NativeType = VkAndroidHardwareBufferUsageANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferUsageANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferUsageANDROID( uint64_t androidHardwareBufferUsage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , androidHardwareBufferUsage( androidHardwareBufferUsage_ ) - { - } - - VULKAN_HPP_CONSTEXPR AndroidHardwareBufferUsageANDROID( AndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferUsageANDROID( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : AndroidHardwareBufferUsageANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AndroidHardwareBufferUsageANDROID & operator=( AndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidHardwareBufferUsageANDROID & operator=( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkAndroidHardwareBufferUsageANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAndroidHardwareBufferUsageANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, androidHardwareBufferUsage ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AndroidHardwareBufferUsageANDROID const & ) const = default; -# else - bool operator==( AndroidHardwareBufferUsageANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( androidHardwareBufferUsage == rhs.androidHardwareBufferUsage ); -# endif - } - - bool operator!=( AndroidHardwareBufferUsageANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferUsageANDROID; - void * pNext = {}; - uint64_t androidHardwareBufferUsage = {}; - }; - - template <> - struct CppType - { - using Type = AndroidHardwareBufferUsageANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct AndroidSurfaceCreateInfoKHR - { - using NativeType = VkAndroidSurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidSurfaceCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ = {}, - struct ANativeWindow * window_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , window( window_ ) - { - } - - VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidSurfaceCreateInfoKHR( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : AndroidSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AndroidSurfaceCreateInfoKHR & operator=( AndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AndroidSurfaceCreateInfoKHR & operator=( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setWindow( struct ANativeWindow * window_ ) VULKAN_HPP_NOEXCEPT - { - window = window_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAndroidSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAndroidSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, window ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AndroidSurfaceCreateInfoKHR const & ) const = default; -# else - bool operator==( AndroidSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( window == rhs.window ); -# endif - } - - bool operator!=( AndroidSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags = {}; - struct ANativeWindow * window = {}; - }; - - template <> - struct CppType - { - using Type = AndroidSurfaceCreateInfoKHR; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - struct ApplicationInfo - { - using NativeType = VkApplicationInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eApplicationInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ApplicationInfo( const char * pApplicationName_ = {}, - uint32_t applicationVersion_ = {}, - const char * pEngineName_ = {}, - uint32_t engineVersion_ = {}, - uint32_t apiVersion_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pApplicationName( pApplicationName_ ) - , applicationVersion( applicationVersion_ ) - , pEngineName( pEngineName_ ) - , engineVersion( engineVersion_ ) - , apiVersion( apiVersion_ ) - { - } - - VULKAN_HPP_CONSTEXPR ApplicationInfo( ApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ApplicationInfo( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ApplicationInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ApplicationInfo & operator=( ApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ApplicationInfo & operator=( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPApplicationName( const char * pApplicationName_ ) VULKAN_HPP_NOEXCEPT - { - pApplicationName = pApplicationName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setApplicationVersion( uint32_t applicationVersion_ ) VULKAN_HPP_NOEXCEPT - { - applicationVersion = applicationVersion_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPEngineName( const char * pEngineName_ ) VULKAN_HPP_NOEXCEPT - { - pEngineName = pEngineName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setEngineVersion( uint32_t engineVersion_ ) VULKAN_HPP_NOEXCEPT - { - engineVersion = engineVersion_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setApiVersion( uint32_t apiVersion_ ) VULKAN_HPP_NOEXCEPT - { - apiVersion = apiVersion_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkApplicationInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkApplicationInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pApplicationName, applicationVersion, pEngineName, engineVersion, apiVersion ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( pApplicationName != rhs.pApplicationName ) - if ( auto cmp = strcmp( pApplicationName, rhs.pApplicationName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = applicationVersion <=> rhs.applicationVersion; cmp != 0 ) - return cmp; - if ( pEngineName != rhs.pEngineName ) - if ( auto cmp = strcmp( pEngineName, rhs.pEngineName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = engineVersion <=> rhs.engineVersion; cmp != 0 ) - return cmp; - if ( auto cmp = apiVersion <=> rhs.apiVersion; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && - ( ( pApplicationName == rhs.pApplicationName ) || ( strcmp( pApplicationName, rhs.pApplicationName ) == 0 ) ) && - ( applicationVersion == rhs.applicationVersion ) && ( ( pEngineName == rhs.pEngineName ) || ( strcmp( pEngineName, rhs.pEngineName ) == 0 ) ) && - ( engineVersion == rhs.engineVersion ) && ( apiVersion == rhs.apiVersion ); - } - - bool operator!=( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eApplicationInfo; - const void * pNext = {}; - const char * pApplicationName = {}; - uint32_t applicationVersion = {}; - const char * pEngineName = {}; - uint32_t engineVersion = {}; - uint32_t apiVersion = {}; - }; - - template <> - struct CppType - { - using Type = ApplicationInfo; - }; - - struct AttachmentDescription - { - using NativeType = VkAttachmentDescription; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - AttachmentDescription( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, - VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, - VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT - : flags( flags_ ) - , format( format_ ) - , samples( samples_ ) - , loadOp( loadOp_ ) - , storeOp( storeOp_ ) - , stencilLoadOp( stencilLoadOp_ ) - , stencilStoreOp( stencilStoreOp_ ) - , initialLayout( initialLayout_ ) - , finalLayout( finalLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentDescription( AttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescription( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentDescription( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentDescription & operator=( AttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescription & operator=( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT - { - samples = samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT - { - loadOp = loadOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT - { - storeOp = storeOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT - { - stencilLoadOp = stencilLoadOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT - { - stencilStoreOp = stencilStoreOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT - { - initialLayout = initialLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT - { - finalLayout = finalLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentDescription const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentDescription &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( flags, format, samples, loadOp, storeOp, stencilLoadOp, stencilStoreOp, initialLayout, finalLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentDescription const & ) const = default; -#else - bool operator==( AttachmentDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( flags == rhs.flags ) && ( format == rhs.format ) && ( samples == rhs.samples ) && ( loadOp == rhs.loadOp ) && ( storeOp == rhs.storeOp ) && - ( stencilLoadOp == rhs.stencilLoadOp ) && ( stencilStoreOp == rhs.stencilStoreOp ) && ( initialLayout == rhs.initialLayout ) && - ( finalLayout == rhs.finalLayout ); -# endif - } - - bool operator!=( AttachmentDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; - VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; - VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageLayout finalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - struct AttachmentDescription2 - { - using NativeType = VkAttachmentDescription2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentDescription2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AttachmentDescription2( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, - VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, - VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , format( format_ ) - , samples( samples_ ) - , loadOp( loadOp_ ) - , storeOp( storeOp_ ) - , stencilLoadOp( stencilLoadOp_ ) - , stencilStoreOp( stencilStoreOp_ ) - , initialLayout( initialLayout_ ) - , finalLayout( finalLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentDescription2( AttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescription2( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentDescription2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentDescription2 & operator=( AttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescription2 & operator=( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT - { - samples = samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT - { - loadOp = loadOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT - { - storeOp = storeOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT - { - stencilLoadOp = stencilLoadOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT - { - stencilStoreOp = stencilStoreOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT - { - initialLayout = initialLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT - { - finalLayout = finalLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentDescription2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentDescription2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, format, samples, loadOp, storeOp, stencilLoadOp, stencilStoreOp, initialLayout, finalLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentDescription2 const & ) const = default; -#else - bool operator==( AttachmentDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( format == rhs.format ) && ( samples == rhs.samples ) && - ( loadOp == rhs.loadOp ) && ( storeOp == rhs.storeOp ) && ( stencilLoadOp == rhs.stencilLoadOp ) && ( stencilStoreOp == rhs.stencilStoreOp ) && - ( initialLayout == rhs.initialLayout ) && ( finalLayout == rhs.finalLayout ); -# endif - } - - bool operator!=( AttachmentDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentDescription2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; - VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; - VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageLayout finalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - template <> - struct CppType - { - using Type = AttachmentDescription2; - }; - using AttachmentDescription2KHR = AttachmentDescription2; - - struct AttachmentDescriptionStencilLayout - { - using NativeType = VkAttachmentDescriptionStencilLayout; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentDescriptionStencilLayout; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - AttachmentDescriptionStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stencilInitialLayout( stencilInitialLayout_ ) - , stencilFinalLayout( stencilFinalLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayout( AttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescriptionStencilLayout( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentDescriptionStencilLayout( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentDescriptionStencilLayout & operator=( AttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentDescriptionStencilLayout & operator=( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & - setStencilInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ ) VULKAN_HPP_NOEXCEPT - { - stencilInitialLayout = stencilInitialLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & - setStencilFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ ) VULKAN_HPP_NOEXCEPT - { - stencilFinalLayout = stencilFinalLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentDescriptionStencilLayout const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentDescriptionStencilLayout &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stencilInitialLayout, stencilFinalLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentDescriptionStencilLayout const & ) const = default; -#else - bool operator==( AttachmentDescriptionStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilInitialLayout == rhs.stencilInitialLayout ) && - ( stencilFinalLayout == rhs.stencilFinalLayout ); -# endif - } - - bool operator!=( AttachmentDescriptionStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentDescriptionStencilLayout; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - template <> - struct CppType - { - using Type = AttachmentDescriptionStencilLayout; - }; - using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; - - struct AttachmentReference - { - using NativeType = VkAttachmentReference; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AttachmentReference( uint32_t attachment_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT - : attachment( attachment_ ) - , layout( layout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentReference( AttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReference( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentReference( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentReference & operator=( AttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReference & operator=( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentReference & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT - { - attachment = attachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentReference & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentReference const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentReference &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( attachment, layout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentReference const & ) const = default; -#else - bool operator==( AttachmentReference const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( attachment == rhs.attachment ) && ( layout == rhs.layout ); -# endif - } - - bool operator!=( AttachmentReference const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t attachment = {}; - VULKAN_HPP_NAMESPACE::ImageLayout layout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - struct AttachmentReference2 - { - using NativeType = VkAttachmentReference2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentReference2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AttachmentReference2( uint32_t attachment_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachment( attachment_ ) - , layout( layout_ ) - , aspectMask( aspectMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentReference2( AttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReference2( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentReference2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentReference2 & operator=( AttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReference2 & operator=( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT - { - attachment = attachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentReference2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentReference2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, attachment, layout, aspectMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentReference2 const & ) const = default; -#else - bool operator==( AttachmentReference2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachment == rhs.attachment ) && ( layout == rhs.layout ) && - ( aspectMask == rhs.aspectMask ); -# endif - } - - bool operator!=( AttachmentReference2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentReference2; - const void * pNext = {}; - uint32_t attachment = {}; - VULKAN_HPP_NAMESPACE::ImageLayout layout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - }; - - template <> - struct CppType - { - using Type = AttachmentReference2; - }; - using AttachmentReference2KHR = AttachmentReference2; - - struct AttachmentReferenceStencilLayout - { - using NativeType = VkAttachmentReferenceStencilLayout; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentReferenceStencilLayout; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stencilLayout( stencilLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayout( AttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReferenceStencilLayout( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentReferenceStencilLayout( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentReferenceStencilLayout & operator=( AttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentReferenceStencilLayout & operator=( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentReferenceStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentReferenceStencilLayout & setStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ ) VULKAN_HPP_NOEXCEPT - { - stencilLayout = stencilLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentReferenceStencilLayout const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentReferenceStencilLayout &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stencilLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentReferenceStencilLayout const & ) const = default; -#else - bool operator==( AttachmentReferenceStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilLayout == rhs.stencilLayout ); -# endif - } - - bool operator!=( AttachmentReferenceStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentReferenceStencilLayout; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - template <> - struct CppType - { - using Type = AttachmentReferenceStencilLayout; - }; - using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; - - struct AttachmentSampleCountInfoAMD - { - using NativeType = VkAttachmentSampleCountInfoAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentSampleCountInfoAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - AttachmentSampleCountInfoAMD( uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachmentSamples( pColorAttachmentSamples_ ) - , depthStencilAttachmentSamples( depthStencilAttachmentSamples_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentSampleCountInfoAMD( AttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentSampleCountInfoAMD( VkAttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentSampleCountInfoAMD( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AttachmentSampleCountInfoAMD( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentSamples_, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , colorAttachmentCount( static_cast( colorAttachmentSamples_.size() ) ) - , pColorAttachmentSamples( colorAttachmentSamples_.data() ) - , depthStencilAttachmentSamples( depthStencilAttachmentSamples_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentSampleCountInfoAMD & operator=( AttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentSampleCountInfoAMD & operator=( VkAttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & - setPColorAttachmentSamples( const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachmentSamples = pColorAttachmentSamples_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - AttachmentSampleCountInfoAMD & setColorAttachmentSamples( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachmentSamples_.size() ); - pColorAttachmentSamples = colorAttachmentSamples_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & - setDepthStencilAttachmentSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT - { - depthStencilAttachmentSamples = depthStencilAttachmentSamples_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentSampleCountInfoAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentSampleCountInfoAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, colorAttachmentCount, pColorAttachmentSamples, depthStencilAttachmentSamples ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentSampleCountInfoAMD const & ) const = default; -#else - bool operator==( AttachmentSampleCountInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && - ( pColorAttachmentSamples == rhs.pColorAttachmentSamples ) && ( depthStencilAttachmentSamples == rhs.depthStencilAttachmentSamples ); -# endif - } - - bool operator!=( AttachmentSampleCountInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentSampleCountInfoAMD; - const void * pNext = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - }; - - template <> - struct CppType - { - using Type = AttachmentSampleCountInfoAMD; - }; - using AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; - - struct Extent2D - { - using NativeType = VkExtent2D; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Extent2D( uint32_t width_ = {}, uint32_t height_ = {} ) VULKAN_HPP_NOEXCEPT - : width( width_ ) - , height( height_ ) - { - } - - VULKAN_HPP_CONSTEXPR Extent2D( Extent2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Extent2D( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT : Extent2D( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Extent2D & operator=( Extent2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Extent2D & operator=( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Extent2D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Extent2D & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExtent2D const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExtent2D &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( width, height ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Extent2D const & ) const = default; -#else - bool operator==( Extent2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( width == rhs.width ) && ( height == rhs.height ); -# endif - } - - bool operator!=( Extent2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t width = {}; - uint32_t height = {}; - }; - - struct SampleLocationEXT - { - using NativeType = VkSampleLocationEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SampleLocationEXT( float x_ = {}, float y_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - { - } - - VULKAN_HPP_CONSTEXPR SampleLocationEXT( SampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SampleLocationEXT( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SampleLocationEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SampleLocationEXT & operator=( SampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SampleLocationEXT & operator=( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SampleLocationEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SampleLocationEXT & setY( float y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSampleLocationEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSampleLocationEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SampleLocationEXT const & ) const = default; -#else - bool operator==( SampleLocationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ); -# endif - } - - bool operator!=( SampleLocationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float x = {}; - float y = {}; - }; - - struct SampleLocationsInfoEXT - { - using NativeType = VkSampleLocationsInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSampleLocationsInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SampleLocationsInfoEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_ = {}, - uint32_t sampleLocationsCount_ = {}, - const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sampleLocationsPerPixel( sampleLocationsPerPixel_ ) - , sampleLocationGridSize( sampleLocationGridSize_ ) - , sampleLocationsCount( sampleLocationsCount_ ) - , pSampleLocations( pSampleLocations_ ) - { - } - - VULKAN_HPP_CONSTEXPR SampleLocationsInfoEXT( SampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SampleLocationsInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SampleLocationsInfoEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_, - VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , sampleLocationsPerPixel( sampleLocationsPerPixel_ ) - , sampleLocationGridSize( sampleLocationGridSize_ ) - , sampleLocationsCount( static_cast( sampleLocations_.size() ) ) - , pSampleLocations( sampleLocations_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SampleLocationsInfoEXT & operator=( SampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SampleLocationsInfoEXT & operator=( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & - setSampleLocationsPerPixel( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsPerPixel = sampleLocationsPerPixel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & - setSampleLocationGridSize( VULKAN_HPP_NAMESPACE::Extent2D const & sampleLocationGridSize_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationGridSize = sampleLocationGridSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setSampleLocationsCount( uint32_t sampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsCount = sampleLocationsCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & - setPSampleLocations( const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - pSampleLocations = pSampleLocations_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SampleLocationsInfoEXT & setSampleLocations( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsCount = static_cast( sampleLocations_.size() ); - pSampleLocations = sampleLocations_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSampleLocationsInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSampleLocationsInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, sampleLocationsPerPixel, sampleLocationGridSize, sampleLocationsCount, pSampleLocations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SampleLocationsInfoEXT const & ) const = default; -#else - bool operator==( SampleLocationsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationsPerPixel == rhs.sampleLocationsPerPixel ) && - ( sampleLocationGridSize == rhs.sampleLocationGridSize ) && ( sampleLocationsCount == rhs.sampleLocationsCount ) && - ( pSampleLocations == rhs.pSampleLocations ); -# endif - } - - bool operator!=( SampleLocationsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSampleLocationsInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize = {}; - uint32_t sampleLocationsCount = {}; - const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations = {}; - }; - - template <> - struct CppType - { - using Type = SampleLocationsInfoEXT; - }; - - struct AttachmentSampleLocationsEXT - { - using NativeType = VkAttachmentSampleLocationsEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = {}, - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT - : attachmentIndex( attachmentIndex_ ) - , sampleLocationsInfo( sampleLocationsInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( AttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentSampleLocationsEXT( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : AttachmentSampleLocationsEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - AttachmentSampleLocationsEXT & operator=( AttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - AttachmentSampleLocationsEXT & operator=( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleLocationsEXT & setAttachmentIndex( uint32_t attachmentIndex_ ) VULKAN_HPP_NOEXCEPT - { - attachmentIndex = attachmentIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 AttachmentSampleLocationsEXT & - setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsInfo = sampleLocationsInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkAttachmentSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkAttachmentSampleLocationsEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( attachmentIndex, sampleLocationsInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AttachmentSampleLocationsEXT const & ) const = default; -#else - bool operator==( AttachmentSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( attachmentIndex == rhs.attachmentIndex ) && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); -# endif - } - - bool operator!=( AttachmentSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t attachmentIndex = {}; - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; - }; - - struct BaseInStructure - { - using NativeType = VkBaseInStructure; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - BaseInStructure( VULKAN_HPP_NAMESPACE::StructureType sType_ = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo, - const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : sType( sType_ ) - , pNext( pNext_ ) - { - } - - BaseInStructure( BaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BaseInStructure( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT : BaseInStructure( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BaseInStructure & operator=( BaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BaseInStructure & operator=( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BaseInStructure & setPNext( const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBaseInStructure const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBaseInStructure &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BaseInStructure const & ) const = default; -#else - bool operator==( BaseInStructure const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); -# endif - } - - bool operator!=( BaseInStructure const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo; - const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext = {}; - }; - - struct BaseOutStructure - { - using NativeType = VkBaseOutStructure; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - BaseOutStructure( VULKAN_HPP_NAMESPACE::StructureType sType_ = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo, - struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : sType( sType_ ) - , pNext( pNext_ ) - { - } - - BaseOutStructure( BaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BaseOutStructure( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT : BaseOutStructure( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BaseOutStructure & operator=( BaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BaseOutStructure & operator=( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BaseOutStructure & setPNext( struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBaseOutStructure const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBaseOutStructure &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BaseOutStructure const & ) const = default; -#else - bool operator==( BaseOutStructure const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); -# endif - } - - bool operator!=( BaseOutStructure const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo; - struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext = {}; - }; - - struct BindAccelerationStructureMemoryInfoNV - { - using NativeType = VkBindAccelerationStructureMemoryInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindAccelerationStructureMemoryInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - uint32_t deviceIndexCount_ = {}, - const uint32_t * pDeviceIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructure( accelerationStructure_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - , deviceIndexCount( deviceIndexCount_ ) - , pDeviceIndices( pDeviceIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( BindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindAccelerationStructureMemoryInfoNV( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : BindAccelerationStructureMemoryInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindAccelerationStructureMemoryInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , accelerationStructure( accelerationStructure_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - , deviceIndexCount( static_cast( deviceIndices_.size() ) ) - , pDeviceIndices( deviceIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindAccelerationStructureMemoryInfoNV & operator=( BindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindAccelerationStructureMemoryInfoNV & operator=( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & - setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructure = accelerationStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = deviceIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - pDeviceIndices = pDeviceIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindAccelerationStructureMemoryInfoNV & - setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = static_cast( deviceIndices_.size() ); - pDeviceIndices = deviceIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindAccelerationStructureMemoryInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindAccelerationStructureMemoryInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, accelerationStructure, memory, memoryOffset, deviceIndexCount, pDeviceIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindAccelerationStructureMemoryInfoNV const & ) const = default; -#else - bool operator==( BindAccelerationStructureMemoryInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ) && ( memory == rhs.memory ) && - ( memoryOffset == rhs.memoryOffset ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ); -# endif - } - - bool operator!=( BindAccelerationStructureMemoryInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindAccelerationStructureMemoryInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - uint32_t deviceIndexCount = {}; - const uint32_t * pDeviceIndices = {}; - }; - - template <> - struct CppType - { - using Type = BindAccelerationStructureMemoryInfoNV; - }; - - struct BindBufferMemoryDeviceGroupInfo - { - using NativeType = VkBindBufferMemoryDeviceGroupInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindBufferMemoryDeviceGroupInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {}, - const uint32_t * pDeviceIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceIndexCount( deviceIndexCount_ ) - , pDeviceIndices( pDeviceIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( BindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindBufferMemoryDeviceGroupInfo( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BindBufferMemoryDeviceGroupInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindBufferMemoryDeviceGroupInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), deviceIndexCount( static_cast( deviceIndices_.size() ) ), pDeviceIndices( deviceIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindBufferMemoryDeviceGroupInfo & operator=( BindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindBufferMemoryDeviceGroupInfo & operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = deviceIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - pDeviceIndices = pDeviceIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindBufferMemoryDeviceGroupInfo & - setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = static_cast( deviceIndices_.size() ); - pDeviceIndices = deviceIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindBufferMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindBufferMemoryDeviceGroupInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceIndexCount, pDeviceIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindBufferMemoryDeviceGroupInfo const & ) const = default; -#else - bool operator==( BindBufferMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ); -# endif - } - - bool operator!=( BindBufferMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfo; - const void * pNext = {}; - uint32_t deviceIndexCount = {}; - const uint32_t * pDeviceIndices = {}; - }; - - template <> - struct CppType - { - using Type = BindBufferMemoryDeviceGroupInfo; - }; - using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; - - struct BindBufferMemoryInfo - { - using NativeType = VkBindBufferMemoryInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindBufferMemoryInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , buffer( buffer_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( BindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindBufferMemoryInfo( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BindBufferMemoryInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindBufferMemoryInfo & operator=( BindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindBufferMemoryInfo & operator=( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindBufferMemoryInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindBufferMemoryInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, buffer, memory, memoryOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindBufferMemoryInfo const & ) const = default; -#else - bool operator==( BindBufferMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ); -# endif - } - - bool operator!=( BindBufferMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindBufferMemoryInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - }; - - template <> - struct CppType - { - using Type = BindBufferMemoryInfo; - }; - using BindBufferMemoryInfoKHR = BindBufferMemoryInfo; - - struct Offset2D - { - using NativeType = VkOffset2D; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Offset2D( int32_t x_ = {}, int32_t y_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - { - } - - VULKAN_HPP_CONSTEXPR Offset2D( Offset2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Offset2D( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT : Offset2D( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Offset2D & operator=( Offset2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Offset2D & operator=( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Offset2D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Offset2D & setY( int32_t y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkOffset2D const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkOffset2D &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Offset2D const & ) const = default; -#else - bool operator==( Offset2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ); -# endif - } - - bool operator!=( Offset2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - int32_t x = {}; - int32_t y = {}; - }; - - struct Rect2D - { - using NativeType = VkRect2D; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Rect2D( VULKAN_HPP_NAMESPACE::Offset2D offset_ = {}, VULKAN_HPP_NAMESPACE::Extent2D extent_ = {} ) VULKAN_HPP_NOEXCEPT - : offset( offset_ ) - , extent( extent_ ) - { - } - - VULKAN_HPP_CONSTEXPR Rect2D( Rect2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Rect2D( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT : Rect2D( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Rect2D & operator=( Rect2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Rect2D & operator=( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Rect2D & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Rect2D & setExtent( VULKAN_HPP_NAMESPACE::Extent2D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRect2D const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRect2D &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( offset, extent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Rect2D const & ) const = default; -#else - bool operator==( Rect2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( offset == rhs.offset ) && ( extent == rhs.extent ); -# endif - } - - bool operator!=( Rect2D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Offset2D offset = {}; - VULKAN_HPP_NAMESPACE::Extent2D extent = {}; - }; - - struct BindImageMemoryDeviceGroupInfo - { - using NativeType = VkBindImageMemoryDeviceGroupInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemoryDeviceGroupInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {}, - const uint32_t * pDeviceIndices_ = {}, - uint32_t splitInstanceBindRegionCount_ = {}, - const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceIndexCount( deviceIndexCount_ ) - , pDeviceIndices( pDeviceIndices_ ) - , splitInstanceBindRegionCount( splitInstanceBindRegionCount_ ) - , pSplitInstanceBindRegions( pSplitInstanceBindRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( BindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemoryDeviceGroupInfo( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BindImageMemoryDeviceGroupInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindImageMemoryDeviceGroupInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & splitInstanceBindRegions_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , deviceIndexCount( static_cast( deviceIndices_.size() ) ) - , pDeviceIndices( deviceIndices_.data() ) - , splitInstanceBindRegionCount( static_cast( splitInstanceBindRegions_.size() ) ) - , pSplitInstanceBindRegions( splitInstanceBindRegions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindImageMemoryDeviceGroupInfo & operator=( BindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemoryDeviceGroupInfo & operator=( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = deviceIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - pDeviceIndices = pDeviceIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindImageMemoryDeviceGroupInfo & - setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndexCount = static_cast( deviceIndices_.size() ); - pDeviceIndices = deviceIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setSplitInstanceBindRegionCount( uint32_t splitInstanceBindRegionCount_ ) VULKAN_HPP_NOEXCEPT - { - splitInstanceBindRegionCount = splitInstanceBindRegionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & - setPSplitInstanceBindRegions( const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT - { - pSplitInstanceBindRegions = pSplitInstanceBindRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindImageMemoryDeviceGroupInfo & setSplitInstanceBindRegions( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & splitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT - { - splitInstanceBindRegionCount = static_cast( splitInstanceBindRegions_.size() ); - pSplitInstanceBindRegions = splitInstanceBindRegions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindImageMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindImageMemoryDeviceGroupInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceIndexCount, pDeviceIndices, splitInstanceBindRegionCount, pSplitInstanceBindRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindImageMemoryDeviceGroupInfo const & ) const = default; -#else - bool operator==( BindImageMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ) && - ( splitInstanceBindRegionCount == rhs.splitInstanceBindRegionCount ) && ( pSplitInstanceBindRegions == rhs.pSplitInstanceBindRegions ); -# endif - } - - bool operator!=( BindImageMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfo; - const void * pNext = {}; - uint32_t deviceIndexCount = {}; - const uint32_t * pDeviceIndices = {}; - uint32_t splitInstanceBindRegionCount = {}; - const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions = {}; - }; - - template <> - struct CppType - { - using Type = BindImageMemoryDeviceGroupInfo; - }; - using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; - - struct BindImageMemoryInfo - { - using NativeType = VkBindImageMemoryInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemoryInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( BindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemoryInfo( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindImageMemoryInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindImageMemoryInfo & operator=( BindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemoryInfo & operator=( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindImageMemoryInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindImageMemoryInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image, memory, memoryOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindImageMemoryInfo const & ) const = default; -#else - bool operator==( BindImageMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ); -# endif - } - - bool operator!=( BindImageMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemoryInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - }; - - template <> - struct CppType - { - using Type = BindImageMemoryInfo; - }; - using BindImageMemoryInfoKHR = BindImageMemoryInfo; - - struct BindImageMemorySwapchainInfoKHR - { - using NativeType = VkBindImageMemorySwapchainInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemorySwapchainInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, - uint32_t imageIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchain( swapchain_ ) - , imageIndex( imageIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( BindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemorySwapchainInfoKHR( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : BindImageMemorySwapchainInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindImageMemorySwapchainInfoKHR & operator=( BindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImageMemorySwapchainInfoKHR & operator=( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT - { - swapchain = swapchain_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setImageIndex( uint32_t imageIndex_ ) VULKAN_HPP_NOEXCEPT - { - imageIndex = imageIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindImageMemorySwapchainInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindImageMemorySwapchainInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchain, imageIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindImageMemorySwapchainInfoKHR const & ) const = default; -#else - bool operator==( BindImageMemorySwapchainInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ) && ( imageIndex == rhs.imageIndex ); -# endif - } - - bool operator!=( BindImageMemorySwapchainInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; - uint32_t imageIndex = {}; - }; - - template <> - struct CppType - { - using Type = BindImageMemorySwapchainInfoKHR; - }; - - struct BindImagePlaneMemoryInfo - { - using NativeType = VkBindImagePlaneMemoryInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImagePlaneMemoryInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , planeAspect( planeAspect_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( BindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImagePlaneMemoryInfo( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BindImagePlaneMemoryInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindImagePlaneMemoryInfo & operator=( BindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindImagePlaneMemoryInfo & operator=( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindImagePlaneMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindImagePlaneMemoryInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT - { - planeAspect = planeAspect_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindImagePlaneMemoryInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindImagePlaneMemoryInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, planeAspect ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindImagePlaneMemoryInfo const & ) const = default; -#else - bool operator==( BindImagePlaneMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( planeAspect == rhs.planeAspect ); -# endif - } - - bool operator!=( BindImagePlaneMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImagePlaneMemoryInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; - }; - - template <> - struct CppType - { - using Type = BindImagePlaneMemoryInfo; - }; - using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; - - struct BindIndexBufferIndirectCommandNV - { - using NativeType = VkBindIndexBufferIndirectCommandNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - BindIndexBufferIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, - uint32_t size_ = {}, - VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16 ) VULKAN_HPP_NOEXCEPT - : bufferAddress( bufferAddress_ ) - , size( size_ ) - , indexType( indexType_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindIndexBufferIndirectCommandNV( BindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindIndexBufferIndirectCommandNV( VkBindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - : BindIndexBufferIndirectCommandNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindIndexBufferIndirectCommandNV & operator=( BindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindIndexBufferIndirectCommandNV & operator=( VkBindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT - { - bufferAddress = bufferAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT - { - indexType = indexType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindIndexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindIndexBufferIndirectCommandNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( bufferAddress, size, indexType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindIndexBufferIndirectCommandNV const & ) const = default; -#else - bool operator==( BindIndexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( indexType == rhs.indexType ); -# endif - } - - bool operator!=( BindIndexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; - uint32_t size = {}; - VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; - }; - - struct BindShaderGroupIndirectCommandNV - { - using NativeType = VkBindShaderGroupIndirectCommandNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindShaderGroupIndirectCommandNV( uint32_t groupIndex_ = {} ) VULKAN_HPP_NOEXCEPT : groupIndex( groupIndex_ ) {} - - VULKAN_HPP_CONSTEXPR BindShaderGroupIndirectCommandNV( BindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindShaderGroupIndirectCommandNV( VkBindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - : BindShaderGroupIndirectCommandNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindShaderGroupIndirectCommandNV & operator=( BindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindShaderGroupIndirectCommandNV & operator=( VkBindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindShaderGroupIndirectCommandNV & setGroupIndex( uint32_t groupIndex_ ) VULKAN_HPP_NOEXCEPT - { - groupIndex = groupIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindShaderGroupIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindShaderGroupIndirectCommandNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( groupIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindShaderGroupIndirectCommandNV const & ) const = default; -#else - bool operator==( BindShaderGroupIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( groupIndex == rhs.groupIndex ); -# endif - } - - bool operator!=( BindShaderGroupIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t groupIndex = {}; - }; - - struct SparseMemoryBind - { - using NativeType = VkSparseMemoryBind; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseMemoryBind( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT - : resourceOffset( resourceOffset_ ) - , size( size_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseMemoryBind( SparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseMemoryBind( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT : SparseMemoryBind( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseMemoryBind & operator=( SparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseMemoryBind & operator=( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setResourceOffset( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ ) VULKAN_HPP_NOEXCEPT - { - resourceOffset = resourceOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSparseMemoryBind const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseMemoryBind &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( resourceOffset, size, memory, memoryOffset, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseMemoryBind const & ) const = default; -#else - bool operator==( SparseMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( resourceOffset == rhs.resourceOffset ) && ( size == rhs.size ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ) && - ( flags == rhs.flags ); -# endif - } - - bool operator!=( SparseMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags = {}; - }; - - struct SparseBufferMemoryBindInfo - { - using NativeType = VkSparseBufferMemoryBindInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseBufferMemoryBindInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - uint32_t bindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT - : buffer( buffer_ ) - , bindCount( bindCount_ ) - , pBinds( pBinds_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseBufferMemoryBindInfo( SparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseBufferMemoryBindInfo( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseBufferMemoryBindInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseBufferMemoryBindInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) - : buffer( buffer_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseBufferMemoryBindInfo & operator=( SparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseBufferMemoryBindInfo & operator=( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = bindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT - { - pBinds = pBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseBufferMemoryBindInfo & - setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = static_cast( binds_.size() ); - pBinds = binds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSparseBufferMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseBufferMemoryBindInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( buffer, bindCount, pBinds ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseBufferMemoryBindInfo const & ) const = default; -#else - bool operator==( SparseBufferMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( buffer == rhs.buffer ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); -# endif - } - - bool operator!=( SparseBufferMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - uint32_t bindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds = {}; - }; - - struct SparseImageOpaqueMemoryBindInfo - { - using NativeType = VkSparseImageOpaqueMemoryBindInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageOpaqueMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, - uint32_t bindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT - : image( image_ ) - , bindCount( bindCount_ ) - , pBinds( pBinds_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageOpaqueMemoryBindInfo( SparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageOpaqueMemoryBindInfo( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageOpaqueMemoryBindInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseImageOpaqueMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) - : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageOpaqueMemoryBindInfo & operator=( SparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageOpaqueMemoryBindInfo & operator=( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = bindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT - { - pBinds = pBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseImageOpaqueMemoryBindInfo & - setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = static_cast( binds_.size() ); - pBinds = binds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSparseImageOpaqueMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageOpaqueMemoryBindInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( image, bindCount, pBinds ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageOpaqueMemoryBindInfo const & ) const = default; -#else - bool operator==( SparseImageOpaqueMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( image == rhs.image ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); -# endif - } - - bool operator!=( SparseImageOpaqueMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Image image = {}; - uint32_t bindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds = {}; - }; - - struct ImageSubresource - { - using NativeType = VkImageSubresource; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ImageSubresource( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, uint32_t mipLevel_ = {}, uint32_t arrayLayer_ = {} ) VULKAN_HPP_NOEXCEPT - : aspectMask( aspectMask_ ) - , mipLevel( mipLevel_ ) - , arrayLayer( arrayLayer_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSubresource( ImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresource( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSubresource( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSubresource & operator=( ImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresource & operator=( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setMipLevel( uint32_t mipLevel_ ) VULKAN_HPP_NOEXCEPT - { - mipLevel = mipLevel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setArrayLayer( uint32_t arrayLayer_ ) VULKAN_HPP_NOEXCEPT - { - arrayLayer = arrayLayer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSubresource const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSubresource &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( aspectMask, mipLevel, arrayLayer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSubresource const & ) const = default; -#else - bool operator==( ImageSubresource const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( aspectMask == rhs.aspectMask ) && ( mipLevel == rhs.mipLevel ) && ( arrayLayer == rhs.arrayLayer ); -# endif - } - - bool operator!=( ImageSubresource const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - uint32_t mipLevel = {}; - uint32_t arrayLayer = {}; - }; - - struct Offset3D - { - using NativeType = VkOffset3D; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Offset3D( int32_t x_ = {}, int32_t y_ = {}, int32_t z_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - , z( z_ ) - { - } - - VULKAN_HPP_CONSTEXPR Offset3D( Offset3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Offset3D( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT : Offset3D( *reinterpret_cast( &rhs ) ) {} - - explicit Offset3D( Offset2D const & offset2D, int32_t z_ = {} ) : x( offset2D.x ), y( offset2D.y ), z( z_ ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Offset3D & operator=( Offset3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Offset3D & operator=( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Offset3D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Offset3D & setY( int32_t y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Offset3D & setZ( int32_t z_ ) VULKAN_HPP_NOEXCEPT - { - z = z_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkOffset3D const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkOffset3D &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y, z ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Offset3D const & ) const = default; -#else - bool operator==( Offset3D const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ); -# endif - } - - bool operator!=( Offset3D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - int32_t x = {}; - int32_t y = {}; - int32_t z = {}; - }; - - struct Extent3D - { - using NativeType = VkExtent3D; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Extent3D( uint32_t width_ = {}, uint32_t height_ = {}, uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT - : width( width_ ) - , height( height_ ) - , depth( depth_ ) - { - } - - VULKAN_HPP_CONSTEXPR Extent3D( Extent3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Extent3D( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT : Extent3D( *reinterpret_cast( &rhs ) ) {} - - explicit Extent3D( Extent2D const & extent2D, uint32_t depth_ = {} ) : width( extent2D.width ), height( extent2D.height ), depth( depth_ ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Extent3D & operator=( Extent3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Extent3D & operator=( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Extent3D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Extent3D & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Extent3D & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT - { - depth = depth_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExtent3D const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExtent3D &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( width, height, depth ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Extent3D const & ) const = default; -#else - bool operator==( Extent3D const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( width == rhs.width ) && ( height == rhs.height ) && ( depth == rhs.depth ); -# endif - } - - bool operator!=( Extent3D const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t width = {}; - uint32_t height = {}; - uint32_t depth = {}; - }; - - struct SparseImageMemoryBind - { - using NativeType = VkSparseImageMemoryBind; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageMemoryBind( VULKAN_HPP_NAMESPACE::ImageSubresource subresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D offset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT - : subresource( subresource_ ) - , offset( offset_ ) - , extent( extent_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageMemoryBind( SparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryBind( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageMemoryBind( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageMemoryBind & operator=( SparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryBind & operator=( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource const & subresource_ ) VULKAN_HPP_NOEXCEPT - { - subresource = subresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setOffset( VULKAN_HPP_NAMESPACE::Offset3D const & offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSparseImageMemoryBind const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageMemoryBind &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( subresource, offset, extent, memory, memoryOffset, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageMemoryBind const & ) const = default; -#else - bool operator==( SparseImageMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( subresource == rhs.subresource ) && ( offset == rhs.offset ) && ( extent == rhs.extent ) && ( memory == rhs.memory ) && - ( memoryOffset == rhs.memoryOffset ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( SparseImageMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageSubresource subresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D offset = {}; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags = {}; - }; - - struct SparseImageMemoryBindInfo - { - using NativeType = VkSparseImageMemoryBindInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, - uint32_t bindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT - : image( image_ ) - , bindCount( bindCount_ ) - , pBinds( pBinds_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageMemoryBindInfo( SparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryBindInfo( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageMemoryBindInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseImageMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) - : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageMemoryBindInfo & operator=( SparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryBindInfo & operator=( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = bindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT - { - pBinds = pBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SparseImageMemoryBindInfo & - setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT - { - bindCount = static_cast( binds_.size() ); - pBinds = binds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSparseImageMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageMemoryBindInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( image, bindCount, pBinds ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageMemoryBindInfo const & ) const = default; -#else - bool operator==( SparseImageMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( image == rhs.image ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); -# endif - } - - bool operator!=( SparseImageMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Image image = {}; - uint32_t bindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds = {}; - }; - - struct BindSparseInfo - { - using NativeType = VkBindSparseInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindSparseInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindSparseInfo( uint32_t waitSemaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, - uint32_t bufferBindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds_ = {}, - uint32_t imageOpaqueBindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds_ = {}, - uint32_t imageBindCount_ = {}, - const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds_ = {}, - uint32_t signalSemaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreCount( waitSemaphoreCount_ ) - , pWaitSemaphores( pWaitSemaphores_ ) - , bufferBindCount( bufferBindCount_ ) - , pBufferBinds( pBufferBinds_ ) - , imageOpaqueBindCount( imageOpaqueBindCount_ ) - , pImageOpaqueBinds( pImageOpaqueBinds_ ) - , imageBindCount( imageBindCount_ ) - , pImageBinds( pImageBinds_ ) - , signalSemaphoreCount( signalSemaphoreCount_ ) - , pSignalSemaphores( pSignalSemaphores_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindSparseInfo( BindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindSparseInfo( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindSparseInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferBinds_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageOpaqueBinds_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageBinds_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) - , pWaitSemaphores( waitSemaphores_.data() ) - , bufferBindCount( static_cast( bufferBinds_.size() ) ) - , pBufferBinds( bufferBinds_.data() ) - , imageOpaqueBindCount( static_cast( imageOpaqueBinds_.size() ) ) - , pImageOpaqueBinds( imageOpaqueBinds_.data() ) - , imageBindCount( static_cast( imageBinds_.size() ) ) - , pImageBinds( imageBinds_.data() ) - , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) - , pSignalSemaphores( signalSemaphores_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindSparseInfo & operator=( BindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindSparseInfo & operator=( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = waitSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphores = pWaitSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo & - setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = static_cast( waitSemaphores_.size() ); - pWaitSemaphores = waitSemaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setBufferBindCount( uint32_t bufferBindCount_ ) VULKAN_HPP_NOEXCEPT - { - bufferBindCount = bufferBindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPBufferBinds( const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds_ ) VULKAN_HPP_NOEXCEPT - { - pBufferBinds = pBufferBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo & setBufferBinds( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferBinds_ ) VULKAN_HPP_NOEXCEPT - { - bufferBindCount = static_cast( bufferBinds_.size() ); - pBufferBinds = bufferBinds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setImageOpaqueBindCount( uint32_t imageOpaqueBindCount_ ) VULKAN_HPP_NOEXCEPT - { - imageOpaqueBindCount = imageOpaqueBindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & - setPImageOpaqueBinds( const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT - { - pImageOpaqueBinds = pImageOpaqueBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo & setImageOpaqueBinds( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT - { - imageOpaqueBindCount = static_cast( imageOpaqueBinds_.size() ); - pImageOpaqueBinds = imageOpaqueBinds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setImageBindCount( uint32_t imageBindCount_ ) VULKAN_HPP_NOEXCEPT - { - imageBindCount = imageBindCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPImageBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds_ ) VULKAN_HPP_NOEXCEPT - { - pImageBinds = pImageBinds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo & setImageBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageBinds_ ) - VULKAN_HPP_NOEXCEPT - { - imageBindCount = static_cast( imageBinds_.size() ); - pImageBinds = imageBinds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = signalSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphores = pSignalSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BindSparseInfo & - setSignalSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = static_cast( signalSemaphores_.size() ); - pSignalSemaphores = signalSemaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindSparseInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - waitSemaphoreCount, - pWaitSemaphores, - bufferBindCount, - pBufferBinds, - imageOpaqueBindCount, - pImageOpaqueBinds, - imageBindCount, - pImageBinds, - signalSemaphoreCount, - pSignalSemaphores ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindSparseInfo const & ) const = default; -#else - bool operator==( BindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && - ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( bufferBindCount == rhs.bufferBindCount ) && ( pBufferBinds == rhs.pBufferBinds ) && - ( imageOpaqueBindCount == rhs.imageOpaqueBindCount ) && ( pImageOpaqueBinds == rhs.pImageOpaqueBinds ) && - ( imageBindCount == rhs.imageBindCount ) && ( pImageBinds == rhs.pImageBinds ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && - ( pSignalSemaphores == rhs.pSignalSemaphores ); -# endif - } - - bool operator!=( BindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindSparseInfo; - const void * pNext = {}; - uint32_t waitSemaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; - uint32_t bufferBindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds = {}; - uint32_t imageOpaqueBindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds = {}; - uint32_t imageBindCount = {}; - const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds = {}; - uint32_t signalSemaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores = {}; - }; - - template <> - struct CppType - { - using Type = BindSparseInfo; - }; - - struct BindVertexBufferIndirectCommandNV - { - using NativeType = VkBindVertexBufferIndirectCommandNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, - uint32_t size_ = {}, - uint32_t stride_ = {} ) VULKAN_HPP_NOEXCEPT - : bufferAddress( bufferAddress_ ) - , size( size_ ) - , stride( stride_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandNV( BindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindVertexBufferIndirectCommandNV( VkBindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - : BindVertexBufferIndirectCommandNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindVertexBufferIndirectCommandNV & operator=( BindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindVertexBufferIndirectCommandNV & operator=( VkBindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT - { - bufferAddress = bufferAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindVertexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindVertexBufferIndirectCommandNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( bufferAddress, size, stride ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindVertexBufferIndirectCommandNV const & ) const = default; -#else - bool operator==( BindVertexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( stride == rhs.stride ); -# endif - } - - bool operator!=( BindVertexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; - uint32_t size = {}; - uint32_t stride = {}; - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct BindVideoSessionMemoryInfoKHR - { - using NativeType = VkBindVideoSessionMemoryInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindVideoSessionMemoryInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BindVideoSessionMemoryInfoKHR( uint32_t memoryBindIndex_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize memorySize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryBindIndex( memoryBindIndex_ ) - , memory( memory_ ) - , memoryOffset( memoryOffset_ ) - , memorySize( memorySize_ ) - { - } - - VULKAN_HPP_CONSTEXPR BindVideoSessionMemoryInfoKHR( BindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindVideoSessionMemoryInfoKHR( VkBindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : BindVideoSessionMemoryInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BindVideoSessionMemoryInfoKHR & operator=( BindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BindVideoSessionMemoryInfoKHR & operator=( VkBindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemoryBindIndex( uint32_t memoryBindIndex_ ) VULKAN_HPP_NOEXCEPT - { - memoryBindIndex = memoryBindIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT - { - memoryOffset = memoryOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemorySize( VULKAN_HPP_NAMESPACE::DeviceSize memorySize_ ) VULKAN_HPP_NOEXCEPT - { - memorySize = memorySize_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBindVideoSessionMemoryInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBindVideoSessionMemoryInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryBindIndex, memory, memoryOffset, memorySize ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BindVideoSessionMemoryInfoKHR const & ) const = default; -# else - bool operator==( BindVideoSessionMemoryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryBindIndex == rhs.memoryBindIndex ) && ( memory == rhs.memory ) && - ( memoryOffset == rhs.memoryOffset ) && ( memorySize == rhs.memorySize ); -# endif - } - - bool operator!=( BindVideoSessionMemoryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindVideoSessionMemoryInfoKHR; - const void * pNext = {}; - uint32_t memoryBindIndex = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize memorySize = {}; - }; - - template <> - struct CppType - { - using Type = BindVideoSessionMemoryInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - struct ImageSubresourceLayers - { - using NativeType = VkImageSubresourceLayers; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageSubresourceLayers( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, - uint32_t mipLevel_ = {}, - uint32_t baseArrayLayer_ = {}, - uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT - : aspectMask( aspectMask_ ) - , mipLevel( mipLevel_ ) - , baseArrayLayer( baseArrayLayer_ ) - , layerCount( layerCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSubresourceLayers( ImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresourceLayers( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageSubresourceLayers( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSubresourceLayers & operator=( ImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresourceLayers & operator=( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setMipLevel( uint32_t mipLevel_ ) VULKAN_HPP_NOEXCEPT - { - mipLevel = mipLevel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT - { - baseArrayLayer = baseArrayLayer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSubresourceLayers const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSubresourceLayers &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( aspectMask, mipLevel, baseArrayLayer, layerCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSubresourceLayers const & ) const = default; -#else - bool operator==( ImageSubresourceLayers const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( aspectMask == rhs.aspectMask ) && ( mipLevel == rhs.mipLevel ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); -# endif - } - - bool operator!=( ImageSubresourceLayers const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - uint32_t mipLevel = {}; - uint32_t baseArrayLayer = {}; - uint32_t layerCount = {}; - }; - - struct ImageBlit2 - { - using NativeType = VkImageBlit2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageBlit2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ImageBlit2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - std::array const & srcOffsets_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - std::array const & dstOffsets_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcSubresource( srcSubresource_ ) - , srcOffsets( srcOffsets_ ) - , dstSubresource( dstSubresource_ ) - , dstOffsets( dstOffsets_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit2( ImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageBlit2( VkImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageBlit2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageBlit2 & operator=( ImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageBlit2 & operator=( VkImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setSrcOffsets( std::array const & srcOffsets_ ) VULKAN_HPP_NOEXCEPT - { - srcOffsets = srcOffsets_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setDstOffsets( std::array const & dstOffsets_ ) VULKAN_HPP_NOEXCEPT - { - dstOffsets = dstOffsets_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageBlit2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageBlit2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcSubresource, srcOffsets, dstSubresource, dstOffsets ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageBlit2 const & ) const = default; -#else - bool operator==( ImageBlit2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffsets == rhs.srcOffsets ) && - ( dstSubresource == rhs.dstSubresource ) && ( dstOffsets == rhs.dstOffsets ); -# endif - } - - bool operator!=( ImageBlit2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageBlit2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D srcOffsets = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D dstOffsets = {}; - }; - - template <> - struct CppType - { - using Type = ImageBlit2; - }; - using ImageBlit2KHR = ImageBlit2; - - struct BlitImageInfo2 - { - using NativeType = VkBlitImageInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBlitImageInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions_ = {}, - VULKAN_HPP_NAMESPACE::Filter filter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - , filter( filter_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2( BlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BlitImageInfo2( VkBlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : BlitImageInfo2( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BlitImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, - VULKAN_HPP_NAMESPACE::Image dstImage_, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - VULKAN_HPP_NAMESPACE::Filter filter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( static_cast( regions_.size() ) ) - , pRegions( regions_.data() ) - , filter( filter_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BlitImageInfo2 & operator=( BlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BlitImageInfo2 & operator=( VkBlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT - { - srcImage = srcImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - srcImageLayout = srcImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT - { - dstImage = dstImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - dstImageLayout = dstImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BlitImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setFilter( VULKAN_HPP_NAMESPACE::Filter filter_ ) VULKAN_HPP_NOEXCEPT - { - filter = filter_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBlitImageInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBlitImageInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BlitImageInfo2 const & ) const = default; -#else - bool operator==( BlitImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && - ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ) && - ( filter == rhs.filter ); -# endif - } - - bool operator!=( BlitImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBlitImageInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image srcImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::Image dstImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions = {}; - VULKAN_HPP_NAMESPACE::Filter filter = VULKAN_HPP_NAMESPACE::Filter::eNearest; - }; - - template <> - struct CppType - { - using Type = BlitImageInfo2; - }; - using BlitImageInfo2KHR = BlitImageInfo2; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferCollectionBufferCreateInfoFUCHSIA - { - using NativeType = VkBufferCollectionBufferCreateInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionBufferCreateInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCollectionBufferCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, - uint32_t index_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , collection( collection_ ) - , index( index_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCollectionBufferCreateInfoFUCHSIA( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionBufferCreateInfoFUCHSIA( VkBufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferCollectionBufferCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCollectionBufferCreateInfoFUCHSIA & operator=( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionBufferCreateInfoFUCHSIA & operator=( VkBufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & - setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT - { - collection = collection_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT - { - index = index_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCollectionBufferCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCollectionBufferCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, collection, index ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionBufferCreateInfoFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); -# endif - } - - bool operator!=( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionBufferCreateInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; - uint32_t index = {}; - }; - - template <> - struct CppType - { - using Type = BufferCollectionBufferCreateInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferCollectionConstraintsInfoFUCHSIA - { - using NativeType = VkBufferCollectionConstraintsInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionConstraintsInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCollectionConstraintsInfoFUCHSIA( uint32_t minBufferCount_ = {}, - uint32_t maxBufferCount_ = {}, - uint32_t minBufferCountForCamping_ = {}, - uint32_t minBufferCountForDedicatedSlack_ = {}, - uint32_t minBufferCountForSharedSlack_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minBufferCount( minBufferCount_ ) - , maxBufferCount( maxBufferCount_ ) - , minBufferCountForCamping( minBufferCountForCamping_ ) - , minBufferCountForDedicatedSlack( minBufferCountForDedicatedSlack_ ) - , minBufferCountForSharedSlack( minBufferCountForSharedSlack_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCollectionConstraintsInfoFUCHSIA( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionConstraintsInfoFUCHSIA( VkBufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferCollectionConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCollectionConstraintsInfoFUCHSIA & operator=( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionConstraintsInfoFUCHSIA & operator=( VkBufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCount( uint32_t minBufferCount_ ) VULKAN_HPP_NOEXCEPT - { - minBufferCount = minBufferCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMaxBufferCount( uint32_t maxBufferCount_ ) VULKAN_HPP_NOEXCEPT - { - maxBufferCount = maxBufferCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCountForCamping( uint32_t minBufferCountForCamping_ ) VULKAN_HPP_NOEXCEPT - { - minBufferCountForCamping = minBufferCountForCamping_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & - setMinBufferCountForDedicatedSlack( uint32_t minBufferCountForDedicatedSlack_ ) VULKAN_HPP_NOEXCEPT - { - minBufferCountForDedicatedSlack = minBufferCountForDedicatedSlack_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & - setMinBufferCountForSharedSlack( uint32_t minBufferCountForSharedSlack_ ) VULKAN_HPP_NOEXCEPT - { - minBufferCountForSharedSlack = minBufferCountForSharedSlack_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCollectionConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCollectionConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minBufferCount, maxBufferCount, minBufferCountForCamping, minBufferCountForDedicatedSlack, minBufferCountForSharedSlack ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionConstraintsInfoFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minBufferCount == rhs.minBufferCount ) && ( maxBufferCount == rhs.maxBufferCount ) && - ( minBufferCountForCamping == rhs.minBufferCountForCamping ) && ( minBufferCountForDedicatedSlack == rhs.minBufferCountForDedicatedSlack ) && - ( minBufferCountForSharedSlack == rhs.minBufferCountForSharedSlack ); -# endif - } - - bool operator!=( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionConstraintsInfoFUCHSIA; - const void * pNext = {}; - uint32_t minBufferCount = {}; - uint32_t maxBufferCount = {}; - uint32_t minBufferCountForCamping = {}; - uint32_t minBufferCountForDedicatedSlack = {}; - uint32_t minBufferCountForSharedSlack = {}; - }; - - template <> - struct CppType - { - using Type = BufferCollectionConstraintsInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferCollectionCreateInfoFUCHSIA - { - using NativeType = VkBufferCollectionCreateInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionCreateInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCollectionCreateInfoFUCHSIA( zx_handle_t collectionToken_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , collectionToken( collectionToken_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCollectionCreateInfoFUCHSIA( BufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionCreateInfoFUCHSIA( VkBufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferCollectionCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCollectionCreateInfoFUCHSIA & operator=( BufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionCreateInfoFUCHSIA & operator=( VkBufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCollectionCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionCreateInfoFUCHSIA & setCollectionToken( zx_handle_t collectionToken_ ) VULKAN_HPP_NOEXCEPT - { - collectionToken = collectionToken_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCollectionCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCollectionCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, collectionToken ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &collectionToken, &rhs.collectionToken, sizeof( zx_handle_t ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &collectionToken, &rhs.collectionToken, sizeof( zx_handle_t ) ) == 0 ); - } - - bool operator!=( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionCreateInfoFUCHSIA; - const void * pNext = {}; - zx_handle_t collectionToken = {}; - }; - - template <> - struct CppType - { - using Type = BufferCollectionCreateInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferCollectionImageCreateInfoFUCHSIA - { - using NativeType = VkBufferCollectionImageCreateInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionImageCreateInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCollectionImageCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, - uint32_t index_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , collection( collection_ ) - , index( index_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCollectionImageCreateInfoFUCHSIA( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionImageCreateInfoFUCHSIA( VkBufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferCollectionImageCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCollectionImageCreateInfoFUCHSIA & operator=( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionImageCreateInfoFUCHSIA & operator=( VkBufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & - setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT - { - collection = collection_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT - { - index = index_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCollectionImageCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCollectionImageCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, collection, index ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionImageCreateInfoFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); -# endif - } - - bool operator!=( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionImageCreateInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; - uint32_t index = {}; - }; - - template <> - struct CppType - { - using Type = BufferCollectionImageCreateInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct SysmemColorSpaceFUCHSIA - { - using NativeType = VkSysmemColorSpaceFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSysmemColorSpaceFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SysmemColorSpaceFUCHSIA( uint32_t colorSpace_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , colorSpace( colorSpace_ ) - { - } - - VULKAN_HPP_CONSTEXPR SysmemColorSpaceFUCHSIA( SysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SysmemColorSpaceFUCHSIA( VkSysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : SysmemColorSpaceFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SysmemColorSpaceFUCHSIA & operator=( SysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SysmemColorSpaceFUCHSIA & operator=( VkSysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SysmemColorSpaceFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SysmemColorSpaceFUCHSIA & setColorSpace( uint32_t colorSpace_ ) VULKAN_HPP_NOEXCEPT - { - colorSpace = colorSpace_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSysmemColorSpaceFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSysmemColorSpaceFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, colorSpace ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SysmemColorSpaceFUCHSIA const & ) const = default; -# else - bool operator==( SysmemColorSpaceFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorSpace == rhs.colorSpace ); -# endif - } - - bool operator!=( SysmemColorSpaceFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSysmemColorSpaceFUCHSIA; - const void * pNext = {}; - uint32_t colorSpace = {}; - }; - - template <> - struct CppType - { - using Type = SysmemColorSpaceFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferCollectionPropertiesFUCHSIA - { - using NativeType = VkBufferCollectionPropertiesFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionPropertiesFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCollectionPropertiesFUCHSIA( - uint32_t memoryTypeBits_ = {}, - uint32_t bufferCount_ = {}, - uint32_t createInfoIndex_ = {}, - uint64_t sysmemPixelFormat_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ = {}, - VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA sysmemColorSpaceIndex_ = {}, - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryTypeBits( memoryTypeBits_ ) - , bufferCount( bufferCount_ ) - , createInfoIndex( createInfoIndex_ ) - , sysmemPixelFormat( sysmemPixelFormat_ ) - , formatFeatures( formatFeatures_ ) - , sysmemColorSpaceIndex( sysmemColorSpaceIndex_ ) - , samplerYcbcrConversionComponents( samplerYcbcrConversionComponents_ ) - , suggestedYcbcrModel( suggestedYcbcrModel_ ) - , suggestedYcbcrRange( suggestedYcbcrRange_ ) - , suggestedXChromaOffset( suggestedXChromaOffset_ ) - , suggestedYChromaOffset( suggestedYChromaOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCollectionPropertiesFUCHSIA( BufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionPropertiesFUCHSIA( VkBufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferCollectionPropertiesFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCollectionPropertiesFUCHSIA & operator=( BufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCollectionPropertiesFUCHSIA & operator=( VkBufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & setMemoryTypeBits( uint32_t memoryTypeBits_ ) VULKAN_HPP_NOEXCEPT - { - memoryTypeBits = memoryTypeBits_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & setBufferCount( uint32_t bufferCount_ ) VULKAN_HPP_NOEXCEPT - { - bufferCount = bufferCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & setCreateInfoIndex( uint32_t createInfoIndex_ ) VULKAN_HPP_NOEXCEPT - { - createInfoIndex = createInfoIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & setSysmemPixelFormat( uint64_t sysmemPixelFormat_ ) VULKAN_HPP_NOEXCEPT - { - sysmemPixelFormat = sysmemPixelFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setFormatFeatures( VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ ) VULKAN_HPP_NOEXCEPT - { - formatFeatures = formatFeatures_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSysmemColorSpaceIndex( VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA const & sysmemColorSpaceIndex_ ) VULKAN_HPP_NOEXCEPT - { - sysmemColorSpaceIndex = sysmemColorSpaceIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSamplerYcbcrConversionComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & samplerYcbcrConversionComponents_ ) VULKAN_HPP_NOEXCEPT - { - samplerYcbcrConversionComponents = samplerYcbcrConversionComponents_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSuggestedYcbcrModel( VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ ) VULKAN_HPP_NOEXCEPT - { - suggestedYcbcrModel = suggestedYcbcrModel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSuggestedYcbcrRange( VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ ) VULKAN_HPP_NOEXCEPT - { - suggestedYcbcrRange = suggestedYcbcrRange_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSuggestedXChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ ) VULKAN_HPP_NOEXCEPT - { - suggestedXChromaOffset = suggestedXChromaOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCollectionPropertiesFUCHSIA & - setSuggestedYChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ ) VULKAN_HPP_NOEXCEPT - { - suggestedYChromaOffset = suggestedYChromaOffset_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCollectionPropertiesFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCollectionPropertiesFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - memoryTypeBits, - bufferCount, - createInfoIndex, - sysmemPixelFormat, - formatFeatures, - sysmemColorSpaceIndex, - samplerYcbcrConversionComponents, - suggestedYcbcrModel, - suggestedYcbcrRange, - suggestedXChromaOffset, - suggestedYChromaOffset ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCollectionPropertiesFUCHSIA const & ) const = default; -# else - bool operator==( BufferCollectionPropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ) && ( bufferCount == rhs.bufferCount ) && - ( createInfoIndex == rhs.createInfoIndex ) && ( sysmemPixelFormat == rhs.sysmemPixelFormat ) && ( formatFeatures == rhs.formatFeatures ) && - ( sysmemColorSpaceIndex == rhs.sysmemColorSpaceIndex ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && - ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && - ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); -# endif - } - - bool operator!=( BufferCollectionPropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionPropertiesFUCHSIA; - void * pNext = {}; - uint32_t memoryTypeBits = {}; - uint32_t bufferCount = {}; - uint32_t createInfoIndex = {}; - uint64_t sysmemPixelFormat = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures = {}; - VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA sysmemColorSpaceIndex = {}; - VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - }; - - template <> - struct CppType - { - using Type = BufferCollectionPropertiesFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct BufferCreateInfo - { - using NativeType = VkBufferCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {}, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, - uint32_t queueFamilyIndexCount_ = {}, - const uint32_t * pQueueFamilyIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , size( size_ ) - , usage( usage_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( queueFamilyIndexCount_ ) - , pQueueFamilyIndices( pQueueFamilyIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCreateInfo( BufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCreateInfo( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCreateInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BufferCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_, - VULKAN_HPP_NAMESPACE::DeviceSize size_, - VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , size( size_ ) - , usage( usage_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) - , pQueueFamilyIndices( queueFamilyIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCreateInfo & operator=( BufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCreateInfo & operator=( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT - { - sharingMode = sharingMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = queueFamilyIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - pQueueFamilyIndices = pQueueFamilyIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - BufferCreateInfo & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); - pQueueFamilyIndices = queueFamilyIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, size, usage, sharingMode, queueFamilyIndexCount, pQueueFamilyIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCreateInfo const & ) const = default; -#else - bool operator==( BufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( size == rhs.size ) && ( usage == rhs.usage ) && - ( sharingMode == rhs.sharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ); -# endif - } - - bool operator!=( BufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::BufferUsageFlags usage = {}; - VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; - uint32_t queueFamilyIndexCount = {}; - const uint32_t * pQueueFamilyIndices = {}; - }; - - template <> - struct CppType - { - using Type = BufferCreateInfo; - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct BufferConstraintsInfoFUCHSIA - { - using NativeType = VkBufferConstraintsInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferConstraintsInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCreateInfo createInfo_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ = {}, - VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , createInfo( createInfo_ ) - , requiredFormatFeatures( requiredFormatFeatures_ ) - , bufferCollectionConstraints( bufferCollectionConstraints_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferConstraintsInfoFUCHSIA( BufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferConstraintsInfoFUCHSIA( VkBufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferConstraintsInfoFUCHSIA & operator=( BufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferConstraintsInfoFUCHSIA & operator=( VkBufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo_ ) VULKAN_HPP_NOEXCEPT - { - createInfo = createInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & - setRequiredFormatFeatures( VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ ) VULKAN_HPP_NOEXCEPT - { - requiredFormatFeatures = requiredFormatFeatures_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & - setBufferCollectionConstraints( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraints_ ) VULKAN_HPP_NOEXCEPT - { - bufferCollectionConstraints = bufferCollectionConstraints_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, createInfo, requiredFormatFeatures, bufferCollectionConstraints ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferConstraintsInfoFUCHSIA const & ) const = default; -# else - bool operator==( BufferConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( createInfo == rhs.createInfo ) && ( requiredFormatFeatures == rhs.requiredFormatFeatures ) && - ( bufferCollectionConstraints == rhs.bufferCollectionConstraints ); -# endif - } - - bool operator!=( BufferConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferConstraintsInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCreateInfo createInfo = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints = {}; - }; - - template <> - struct CppType - { - using Type = BufferConstraintsInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct BufferCopy - { - using NativeType = VkBufferCopy; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCopy( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT - : srcOffset( srcOffset_ ) - , dstOffset( dstOffset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCopy( BufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCopy( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCopy( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCopy & operator=( BufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCopy & operator=( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCopy & setDstOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCopy & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCopy const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCopy &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( srcOffset, dstOffset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCopy const & ) const = default; -#else - bool operator==( BufferCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( srcOffset == rhs.srcOffset ) && ( dstOffset == rhs.dstOffset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( BufferCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize srcOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - struct BufferCopy2 - { - using NativeType = VkBufferCopy2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCopy2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferCopy2( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcOffset( srcOffset_ ) - , dstOffset( dstOffset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferCopy2( BufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCopy2( VkBufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCopy2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferCopy2 & operator=( BufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferCopy2 & operator=( VkBufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setDstOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferCopy2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferCopy2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcOffset, dstOffset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferCopy2 const & ) const = default; -#else - bool operator==( BufferCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcOffset == rhs.srcOffset ) && ( dstOffset == rhs.dstOffset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( BufferCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCopy2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize srcOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize dstOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - template <> - struct CppType - { - using Type = BufferCopy2; - }; - using BufferCopy2KHR = BufferCopy2; - - struct BufferDeviceAddressCreateInfoEXT - { - using NativeType = VkBufferDeviceAddressCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferDeviceAddressCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceAddress( deviceAddress_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( BufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferDeviceAddressCreateInfoEXT( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferDeviceAddressCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferDeviceAddressCreateInfoEXT & operator=( BufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferDeviceAddressCreateInfoEXT & operator=( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressCreateInfoEXT & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - deviceAddress = deviceAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferDeviceAddressCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferDeviceAddressCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceAddress ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferDeviceAddressCreateInfoEXT const & ) const = default; -#else - bool operator==( BufferDeviceAddressCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceAddress == rhs.deviceAddress ); -# endif - } - - bool operator!=( BufferDeviceAddressCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; - }; - - template <> - struct CppType - { - using Type = BufferDeviceAddressCreateInfoEXT; - }; - - struct BufferDeviceAddressInfo - { - using NativeType = VkBufferDeviceAddressInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferDeviceAddressInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , buffer( buffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfo( BufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferDeviceAddressInfo( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferDeviceAddressInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferDeviceAddressInfo & operator=( BufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferDeviceAddressInfo & operator=( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferDeviceAddressInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferDeviceAddressInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, buffer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferDeviceAddressInfo const & ) const = default; -#else - bool operator==( BufferDeviceAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); -# endif - } - - bool operator!=( BufferDeviceAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - }; - - template <> - struct CppType - { - using Type = BufferDeviceAddressInfo; - }; - using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; - using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; - - struct BufferImageCopy - { - using NativeType = VkBufferImageCopy; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferImageCopy( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ = {}, - uint32_t bufferRowLength_ = {}, - uint32_t bufferImageHeight_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {} ) VULKAN_HPP_NOEXCEPT - : bufferOffset( bufferOffset_ ) - , bufferRowLength( bufferRowLength_ ) - , bufferImageHeight( bufferImageHeight_ ) - , imageSubresource( imageSubresource_ ) - , imageOffset( imageOffset_ ) - , imageExtent( imageExtent_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferImageCopy( BufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferImageCopy( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT : BufferImageCopy( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferImageCopy & operator=( BufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferImageCopy & operator=( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT - { - bufferOffset = bufferOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferRowLength( uint32_t bufferRowLength_ ) VULKAN_HPP_NOEXCEPT - { - bufferRowLength = bufferRowLength_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferImageHeight( uint32_t bufferImageHeight_ ) VULKAN_HPP_NOEXCEPT - { - bufferImageHeight = bufferImageHeight_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT - { - imageSubresource = imageSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT - { - imageOffset = imageOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT - { - imageExtent = imageExtent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferImageCopy const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferImageCopy &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( bufferOffset, bufferRowLength, bufferImageHeight, imageSubresource, imageOffset, imageExtent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferImageCopy const & ) const = default; -#else - bool operator==( BufferImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( bufferOffset == rhs.bufferOffset ) && ( bufferRowLength == rhs.bufferRowLength ) && ( bufferImageHeight == rhs.bufferImageHeight ) && - ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); -# endif - } - - bool operator!=( BufferImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset = {}; - uint32_t bufferRowLength = {}; - uint32_t bufferImageHeight = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; - }; - - struct BufferImageCopy2 - { - using NativeType = VkBufferImageCopy2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferImageCopy2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferImageCopy2( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ = {}, - uint32_t bufferRowLength_ = {}, - uint32_t bufferImageHeight_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , bufferOffset( bufferOffset_ ) - , bufferRowLength( bufferRowLength_ ) - , bufferImageHeight( bufferImageHeight_ ) - , imageSubresource( imageSubresource_ ) - , imageOffset( imageOffset_ ) - , imageExtent( imageExtent_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferImageCopy2( BufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferImageCopy2( VkBufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferImageCopy2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferImageCopy2 & operator=( BufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferImageCopy2 & operator=( VkBufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT - { - bufferOffset = bufferOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferRowLength( uint32_t bufferRowLength_ ) VULKAN_HPP_NOEXCEPT - { - bufferRowLength = bufferRowLength_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferImageHeight( uint32_t bufferImageHeight_ ) VULKAN_HPP_NOEXCEPT - { - bufferImageHeight = bufferImageHeight_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT - { - imageSubresource = imageSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT - { - imageOffset = imageOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT - { - imageExtent = imageExtent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferImageCopy2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferImageCopy2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, bufferOffset, bufferRowLength, bufferImageHeight, imageSubresource, imageOffset, imageExtent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferImageCopy2 const & ) const = default; -#else - bool operator==( BufferImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferOffset == rhs.bufferOffset ) && ( bufferRowLength == rhs.bufferRowLength ) && - ( bufferImageHeight == rhs.bufferImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && - ( imageExtent == rhs.imageExtent ); -# endif - } - - bool operator!=( BufferImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferImageCopy2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset = {}; - uint32_t bufferRowLength = {}; - uint32_t bufferImageHeight = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; - }; - - template <> - struct CppType - { - using Type = BufferImageCopy2; - }; - using BufferImageCopy2KHR = BufferImageCopy2; - - struct BufferMemoryBarrier - { - using NativeType = VkBufferMemoryBarrier; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryBarrier; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, - uint32_t srcQueueFamilyIndex_ = {}, - uint32_t dstQueueFamilyIndex_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcAccessMask( srcAccessMask_ ) - , dstAccessMask( dstAccessMask_ ) - , srcQueueFamilyIndex( srcQueueFamilyIndex_ ) - , dstQueueFamilyIndex( dstQueueFamilyIndex_ ) - , buffer( buffer_ ) - , offset( offset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( BufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryBarrier( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : BufferMemoryBarrier( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferMemoryBarrier & operator=( BufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryBarrier & operator=( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - srcQueueFamilyIndex = srcQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - dstQueueFamilyIndex = dstQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferMemoryBarrier &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcAccessMask, dstAccessMask, srcQueueFamilyIndex, dstQueueFamilyIndex, buffer, offset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferMemoryBarrier const & ) const = default; -#else - bool operator==( BufferMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && - ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( buffer == rhs.buffer ) && - ( offset == rhs.offset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( BufferMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryBarrier; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; - uint32_t srcQueueFamilyIndex = {}; - uint32_t dstQueueFamilyIndex = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - template <> - struct CppType - { - using Type = BufferMemoryBarrier; - }; - - struct BufferMemoryBarrier2 - { - using NativeType = VkBufferMemoryBarrier2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryBarrier2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferMemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, - uint32_t srcQueueFamilyIndex_ = {}, - uint32_t dstQueueFamilyIndex_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcStageMask( srcStageMask_ ) - , srcAccessMask( srcAccessMask_ ) - , dstStageMask( dstStageMask_ ) - , dstAccessMask( dstAccessMask_ ) - , srcQueueFamilyIndex( srcQueueFamilyIndex_ ) - , dstQueueFamilyIndex( dstQueueFamilyIndex_ ) - , buffer( buffer_ ) - , offset( offset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferMemoryBarrier2( BufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryBarrier2( VkBufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferMemoryBarrier2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferMemoryBarrier2 & operator=( BufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryBarrier2 & operator=( VkBufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT - { - srcStageMask = srcStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - dstStageMask = dstStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - srcQueueFamilyIndex = srcQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - dstQueueFamilyIndex = dstQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcStageMask, srcAccessMask, dstStageMask, dstAccessMask, srcQueueFamilyIndex, dstQueueFamilyIndex, buffer, offset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferMemoryBarrier2 const & ) const = default; -#else - bool operator==( BufferMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && - ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && - ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( BufferMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryBarrier2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; - uint32_t srcQueueFamilyIndex = {}; - uint32_t dstQueueFamilyIndex = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - template <> - struct CppType - { - using Type = BufferMemoryBarrier2; - }; - using BufferMemoryBarrier2KHR = BufferMemoryBarrier2; - - struct BufferMemoryRequirementsInfo2 - { - using NativeType = VkBufferMemoryRequirementsInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryRequirementsInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , buffer( buffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( BufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryRequirementsInfo2( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferMemoryRequirementsInfo2 & operator=( BufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferMemoryRequirementsInfo2 & operator=( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferMemoryRequirementsInfo2 & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, buffer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferMemoryRequirementsInfo2 const & ) const = default; -#else - bool operator==( BufferMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); -# endif - } - - bool operator!=( BufferMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryRequirementsInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - }; - - template <> - struct CppType - { - using Type = BufferMemoryRequirementsInfo2; - }; - using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; - - struct BufferOpaqueCaptureAddressCreateInfo - { - using NativeType = VkBufferOpaqueCaptureAddressCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferOpaqueCaptureAddressCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferOpaqueCaptureAddressCreateInfo( uint64_t opaqueCaptureAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , opaqueCaptureAddress( opaqueCaptureAddress_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferOpaqueCaptureAddressCreateInfo( BufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferOpaqueCaptureAddressCreateInfo( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferOpaqueCaptureAddressCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferOpaqueCaptureAddressCreateInfo & operator=( BufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferOpaqueCaptureAddressCreateInfo & operator=( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferOpaqueCaptureAddressCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferOpaqueCaptureAddressCreateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT - { - opaqueCaptureAddress = opaqueCaptureAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferOpaqueCaptureAddressCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferOpaqueCaptureAddressCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, opaqueCaptureAddress ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferOpaqueCaptureAddressCreateInfo const & ) const = default; -#else - bool operator==( BufferOpaqueCaptureAddressCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress ); -# endif - } - - bool operator!=( BufferOpaqueCaptureAddressCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferOpaqueCaptureAddressCreateInfo; - const void * pNext = {}; - uint64_t opaqueCaptureAddress = {}; - }; - - template <> - struct CppType - { - using Type = BufferOpaqueCaptureAddressCreateInfo; - }; - using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; - - struct BufferViewCreateInfo - { - using NativeType = VkBufferViewCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferViewCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize range_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , buffer( buffer_ ) - , format( format_ ) - , offset( offset_ ) - , range( range_ ) - { - } - - VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( BufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferViewCreateInfo( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : BufferViewCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - BufferViewCreateInfo & operator=( BufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - BufferViewCreateInfo & operator=( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT - { - range = range_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkBufferViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkBufferViewCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, buffer, format, offset, range ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( BufferViewCreateInfo const & ) const = default; -#else - bool operator==( BufferViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( buffer == rhs.buffer ) && ( format == rhs.format ) && - ( offset == rhs.offset ) && ( range == rhs.range ); -# endif - } - - bool operator!=( BufferViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferViewCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize range = {}; - }; - - template <> - struct CppType - { - using Type = BufferViewCreateInfo; - }; - - struct CalibratedTimestampInfoEXT - { - using NativeType = VkCalibratedTimestampInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCalibratedTimestampInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoEXT( VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain_ = VULKAN_HPP_NAMESPACE::TimeDomainEXT::eDevice, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , timeDomain( timeDomain_ ) - { - } - - VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoEXT( CalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CalibratedTimestampInfoEXT( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : CalibratedTimestampInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CalibratedTimestampInfoEXT & operator=( CalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CalibratedTimestampInfoEXT & operator=( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CalibratedTimestampInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CalibratedTimestampInfoEXT & setTimeDomain( VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain_ ) VULKAN_HPP_NOEXCEPT - { - timeDomain = timeDomain_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCalibratedTimestampInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCalibratedTimestampInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, timeDomain ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CalibratedTimestampInfoEXT const & ) const = default; -#else - bool operator==( CalibratedTimestampInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( timeDomain == rhs.timeDomain ); -# endif - } - - bool operator!=( CalibratedTimestampInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCalibratedTimestampInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain = VULKAN_HPP_NAMESPACE::TimeDomainEXT::eDevice; - }; - - template <> - struct CppType - { - using Type = CalibratedTimestampInfoEXT; - }; - - struct CheckpointData2NV - { - using NativeType = VkCheckpointData2NV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointData2NV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - CheckpointData2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage_ = {}, void * pCheckpointMarker_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stage( stage_ ) - , pCheckpointMarker( pCheckpointMarker_ ) - { - } - - VULKAN_HPP_CONSTEXPR CheckpointData2NV( CheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CheckpointData2NV( VkCheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT : CheckpointData2NV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CheckpointData2NV & operator=( CheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CheckpointData2NV & operator=( VkCheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkCheckpointData2NV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCheckpointData2NV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stage, pCheckpointMarker ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CheckpointData2NV const & ) const = default; -#else - bool operator==( CheckpointData2NV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stage == rhs.stage ) && ( pCheckpointMarker == rhs.pCheckpointMarker ); -# endif - } - - bool operator!=( CheckpointData2NV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointData2NV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage = {}; - void * pCheckpointMarker = {}; - }; - - template <> - struct CppType - { - using Type = CheckpointData2NV; - }; - - struct CheckpointDataNV - { - using NativeType = VkCheckpointDataNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointDataNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CheckpointDataNV( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe, - void * pCheckpointMarker_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stage( stage_ ) - , pCheckpointMarker( pCheckpointMarker_ ) - { - } - - VULKAN_HPP_CONSTEXPR CheckpointDataNV( CheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CheckpointDataNV( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : CheckpointDataNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CheckpointDataNV & operator=( CheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CheckpointDataNV & operator=( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkCheckpointDataNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCheckpointDataNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stage, pCheckpointMarker ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CheckpointDataNV const & ) const = default; -#else - bool operator==( CheckpointDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stage == rhs.stage ) && ( pCheckpointMarker == rhs.pCheckpointMarker ); -# endif - } - - bool operator!=( CheckpointDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointDataNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe; - void * pCheckpointMarker = {}; - }; - - template <> - struct CppType - { - using Type = CheckpointDataNV; - }; - - union ClearColorValue - { - using NativeType = VkClearColorValue; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & float32_ = {} ) : float32( float32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & int32_ ) : int32( int32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & uint32_ ) : uint32( uint32_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setFloat32( std::array float32_ ) VULKAN_HPP_NOEXCEPT - { - float32 = float32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setInt32( std::array int32_ ) VULKAN_HPP_NOEXCEPT - { - int32 = int32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setUint32( std::array uint32_ ) VULKAN_HPP_NOEXCEPT - { - uint32 = uint32_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkClearColorValue const &() const - { - return *reinterpret_cast( this ); - } - - operator VkClearColorValue &() - { - return *reinterpret_cast( this ); - } - - VULKAN_HPP_NAMESPACE::ArrayWrapper1D float32; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D int32; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D uint32; - }; - - struct ClearDepthStencilValue - { - using NativeType = VkClearDepthStencilValue; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( float depth_ = {}, uint32_t stencil_ = {} ) VULKAN_HPP_NOEXCEPT - : depth( depth_ ) - , stencil( stencil_ ) - { - } - - VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( ClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearDepthStencilValue( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT - : ClearDepthStencilValue( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ClearDepthStencilValue & operator=( ClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearDepthStencilValue & operator=( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ClearDepthStencilValue & setDepth( float depth_ ) VULKAN_HPP_NOEXCEPT - { - depth = depth_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearDepthStencilValue & setStencil( uint32_t stencil_ ) VULKAN_HPP_NOEXCEPT - { - stencil = stencil_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkClearDepthStencilValue const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkClearDepthStencilValue &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( depth, stencil ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ClearDepthStencilValue const & ) const = default; -#else - bool operator==( ClearDepthStencilValue const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( depth == rhs.depth ) && ( stencil == rhs.stencil ); -# endif - } - - bool operator!=( ClearDepthStencilValue const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float depth = {}; - uint32_t stencil = {}; - }; - - union ClearValue - { - using NativeType = VkClearValue; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 ClearValue( VULKAN_HPP_NAMESPACE::ClearColorValue color_ = {} ) : color( color_ ) {} - - VULKAN_HPP_CONSTEXPR_14 ClearValue( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil_ ) : depthStencil( depthStencil_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ClearValue & setColor( VULKAN_HPP_NAMESPACE::ClearColorValue const & color_ ) VULKAN_HPP_NOEXCEPT - { - color = color_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearValue & setDepthStencil( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue const & depthStencil_ ) VULKAN_HPP_NOEXCEPT - { - depthStencil = depthStencil_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkClearValue const &() const - { - return *reinterpret_cast( this ); - } - - operator VkClearValue &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::ClearColorValue color; - VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil; -#else - VkClearColorValue color; - VkClearDepthStencilValue depthStencil; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct ClearAttachment - { - using NativeType = VkClearAttachment; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ClearAttachment( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, - uint32_t colorAttachment_ = {}, - VULKAN_HPP_NAMESPACE::ClearValue clearValue_ = {} ) VULKAN_HPP_NOEXCEPT - : aspectMask( aspectMask_ ) - , colorAttachment( colorAttachment_ ) - , clearValue( clearValue_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ClearAttachment( ClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearAttachment( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT : ClearAttachment( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ClearAttachment & operator=( ClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearAttachment & operator=( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setColorAttachment( uint32_t colorAttachment_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachment = colorAttachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setClearValue( VULKAN_HPP_NAMESPACE::ClearValue const & clearValue_ ) VULKAN_HPP_NOEXCEPT - { - clearValue = clearValue_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkClearAttachment const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkClearAttachment &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( aspectMask, colorAttachment, clearValue ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - uint32_t colorAttachment = {}; - VULKAN_HPP_NAMESPACE::ClearValue clearValue = {}; - }; - - struct ClearRect - { - using NativeType = VkClearRect; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ClearRect( VULKAN_HPP_NAMESPACE::Rect2D rect_ = {}, uint32_t baseArrayLayer_ = {}, uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT - : rect( rect_ ) - , baseArrayLayer( baseArrayLayer_ ) - , layerCount( layerCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR ClearRect( ClearRect const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearRect( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT : ClearRect( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ClearRect & operator=( ClearRect const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ClearRect & operator=( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ClearRect & setRect( VULKAN_HPP_NAMESPACE::Rect2D const & rect_ ) VULKAN_HPP_NOEXCEPT - { - rect = rect_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearRect & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT - { - baseArrayLayer = baseArrayLayer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ClearRect & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkClearRect const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkClearRect &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( rect, baseArrayLayer, layerCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ClearRect const & ) const = default; -#else - bool operator==( ClearRect const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( rect == rhs.rect ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); -# endif - } - - bool operator!=( ClearRect const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Rect2D rect = {}; - uint32_t baseArrayLayer = {}; - uint32_t layerCount = {}; - }; - - struct CoarseSampleLocationNV - { - using NativeType = VkCoarseSampleLocationNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( uint32_t pixelX_ = {}, uint32_t pixelY_ = {}, uint32_t sample_ = {} ) VULKAN_HPP_NOEXCEPT - : pixelX( pixelX_ ) - , pixelY( pixelY_ ) - , sample( sample_ ) - { - } - - VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( CoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CoarseSampleLocationNV( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT - : CoarseSampleLocationNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CoarseSampleLocationNV & operator=( CoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CoarseSampleLocationNV & operator=( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setPixelX( uint32_t pixelX_ ) VULKAN_HPP_NOEXCEPT - { - pixelX = pixelX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setPixelY( uint32_t pixelY_ ) VULKAN_HPP_NOEXCEPT - { - pixelY = pixelY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setSample( uint32_t sample_ ) VULKAN_HPP_NOEXCEPT - { - sample = sample_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCoarseSampleLocationNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCoarseSampleLocationNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( pixelX, pixelY, sample ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CoarseSampleLocationNV const & ) const = default; -#else - bool operator==( CoarseSampleLocationNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( pixelX == rhs.pixelX ) && ( pixelY == rhs.pixelY ) && ( sample == rhs.sample ); -# endif - } - - bool operator!=( CoarseSampleLocationNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t pixelX = {}; - uint32_t pixelY = {}; - uint32_t sample = {}; - }; - - struct CoarseSampleOrderCustomNV - { - using NativeType = VkCoarseSampleOrderCustomNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - CoarseSampleOrderCustomNV( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ = VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV::eNoInvocations, - uint32_t sampleCount_ = {}, - uint32_t sampleLocationCount_ = {}, - const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations_ = {} ) VULKAN_HPP_NOEXCEPT - : shadingRate( shadingRate_ ) - , sampleCount( sampleCount_ ) - , sampleLocationCount( sampleLocationCount_ ) - , pSampleLocations( pSampleLocations_ ) - { - } - - VULKAN_HPP_CONSTEXPR CoarseSampleOrderCustomNV( CoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CoarseSampleOrderCustomNV( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT - : CoarseSampleOrderCustomNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CoarseSampleOrderCustomNV( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_, - uint32_t sampleCount_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) - : shadingRate( shadingRate_ ) - , sampleCount( sampleCount_ ) - , sampleLocationCount( static_cast( sampleLocations_.size() ) ) - , pSampleLocations( sampleLocations_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CoarseSampleOrderCustomNV & operator=( CoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CoarseSampleOrderCustomNV & operator=( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setShadingRate( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ ) VULKAN_HPP_NOEXCEPT - { - shadingRate = shadingRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setSampleCount( uint32_t sampleCount_ ) VULKAN_HPP_NOEXCEPT - { - sampleCount = sampleCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setSampleLocationCount( uint32_t sampleLocationCount_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationCount = sampleLocationCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & - setPSampleLocations( const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - pSampleLocations = pSampleLocations_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CoarseSampleOrderCustomNV & setSampleLocations( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationCount = static_cast( sampleLocations_.size() ); - pSampleLocations = sampleLocations_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCoarseSampleOrderCustomNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCoarseSampleOrderCustomNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( shadingRate, sampleCount, sampleLocationCount, pSampleLocations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CoarseSampleOrderCustomNV const & ) const = default; -#else - bool operator==( CoarseSampleOrderCustomNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( shadingRate == rhs.shadingRate ) && ( sampleCount == rhs.sampleCount ) && ( sampleLocationCount == rhs.sampleLocationCount ) && - ( pSampleLocations == rhs.pSampleLocations ); -# endif - } - - bool operator!=( CoarseSampleOrderCustomNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate = VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV::eNoInvocations; - uint32_t sampleCount = {}; - uint32_t sampleLocationCount = {}; - const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations = {}; - }; - - struct CommandBufferAllocateInfo - { - using NativeType = VkCommandBufferAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ = {}, - VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ = VULKAN_HPP_NAMESPACE::CommandBufferLevel::ePrimary, - uint32_t commandBufferCount_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , commandPool( commandPool_ ) - , level( level_ ) - , commandBufferCount( commandBufferCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( CommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferAllocateInfo( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferAllocateInfo & operator=( CommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferAllocateInfo & operator=( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ ) VULKAN_HPP_NOEXCEPT - { - commandPool = commandPool_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setLevel( VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ ) VULKAN_HPP_NOEXCEPT - { - level = level_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferCount = commandBufferCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, commandPool, level, commandBufferCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferAllocateInfo const & ) const = default; -#else - bool operator==( CommandBufferAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( commandPool == rhs.commandPool ) && ( level == rhs.level ) && - ( commandBufferCount == rhs.commandBufferCount ); -# endif - } - - bool operator!=( CommandBufferAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferAllocateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CommandPool commandPool = {}; - VULKAN_HPP_NAMESPACE::CommandBufferLevel level = VULKAN_HPP_NAMESPACE::CommandBufferLevel::ePrimary; - uint32_t commandBufferCount = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferAllocateInfo; - }; - - struct CommandBufferInheritanceInfo - { - using NativeType = VkCommandBufferInheritanceInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - uint32_t subpass_ = {}, - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable_ = {}, - VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags_ = {}, - VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , renderPass( renderPass_ ) - , subpass( subpass_ ) - , framebuffer( framebuffer_ ) - , occlusionQueryEnable( occlusionQueryEnable_ ) - , queryFlags( queryFlags_ ) - , pipelineStatistics( pipelineStatistics_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( CommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceInfo( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferInheritanceInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferInheritanceInfo & operator=( CommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceInfo & operator=( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT - { - renderPass = renderPass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT - { - subpass = subpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT - { - framebuffer = framebuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setOcclusionQueryEnable( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable_ ) VULKAN_HPP_NOEXCEPT - { - occlusionQueryEnable = occlusionQueryEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setQueryFlags( VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags_ ) VULKAN_HPP_NOEXCEPT - { - queryFlags = queryFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & - setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT - { - pipelineStatistics = pipelineStatistics_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferInheritanceInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferInheritanceInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, renderPass, subpass, framebuffer, occlusionQueryEnable, queryFlags, pipelineStatistics ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferInheritanceInfo const & ) const = default; -#else - bool operator==( CommandBufferInheritanceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ) && - ( framebuffer == rhs.framebuffer ) && ( occlusionQueryEnable == rhs.occlusionQueryEnable ) && ( queryFlags == rhs.queryFlags ) && - ( pipelineStatistics == rhs.pipelineStatistics ); -# endif - } - - bool operator!=( CommandBufferInheritanceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; - uint32_t subpass = {}; - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer = {}; - VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable = {}; - VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags = {}; - VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferInheritanceInfo; - }; - - struct CommandBufferBeginInfo - { - using NativeType = VkCommandBufferBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ = {}, - const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pInheritanceInfo( pInheritanceInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( CommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferBeginInfo( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferBeginInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferBeginInfo & operator=( CommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferBeginInfo & operator=( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & - setPInheritanceInfo( const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo_ ) VULKAN_HPP_NOEXCEPT - { - pInheritanceInfo = pInheritanceInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pInheritanceInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferBeginInfo const & ) const = default; -#else - bool operator==( CommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pInheritanceInfo == rhs.pInheritanceInfo ); -# endif - } - - bool operator!=( CommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferBeginInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags = {}; - const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferBeginInfo; - }; - - struct CommandBufferInheritanceConditionalRenderingInfoEXT - { - using NativeType = VkCommandBufferInheritanceConditionalRenderingInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , conditionalRenderingEnable( conditionalRenderingEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR - CommandBufferInheritanceConditionalRenderingInfoEXT( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceConditionalRenderingInfoEXT( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferInheritanceConditionalRenderingInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferInheritanceConditionalRenderingInfoEXT & - operator=( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceConditionalRenderingInfoEXT & operator=( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceConditionalRenderingInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceConditionalRenderingInfoEXT & - setConditionalRenderingEnable( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ ) VULKAN_HPP_NOEXCEPT - { - conditionalRenderingEnable = conditionalRenderingEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferInheritanceConditionalRenderingInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferInheritanceConditionalRenderingInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, conditionalRenderingEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferInheritanceConditionalRenderingInfoEXT const & ) const = default; -#else - bool operator==( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conditionalRenderingEnable == rhs.conditionalRenderingEnable ); -# endif - } - - bool operator!=( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferInheritanceConditionalRenderingInfoEXT; - }; - - struct CommandBufferInheritanceRenderPassTransformInfoQCOM - { - using NativeType = VkCommandBufferInheritanceRenderPassTransformInfoQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderPassTransformInfoQCOM( - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , transform( transform_ ) - , renderArea( renderArea_ ) - { - } - - VULKAN_HPP_CONSTEXPR - CommandBufferInheritanceRenderPassTransformInfoQCOM( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceRenderPassTransformInfoQCOM( VkCommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferInheritanceRenderPassTransformInfoQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferInheritanceRenderPassTransformInfoQCOM & - operator=( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceRenderPassTransformInfoQCOM & operator=( VkCommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & - setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT - { - transform = transform_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & - setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT - { - renderArea = renderArea_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferInheritanceRenderPassTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferInheritanceRenderPassTransformInfoQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, transform, renderArea ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferInheritanceRenderPassTransformInfoQCOM const & ) const = default; -#else - bool operator==( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ) && ( renderArea == rhs.renderArea ); -# endif - } - - bool operator!=( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferInheritanceRenderPassTransformInfoQCOM; - }; - - struct CommandBufferInheritanceRenderingInfo - { - using NativeType = VkCommandBufferInheritanceRenderingInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceRenderingInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - CommandBufferInheritanceRenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ = {}, - uint32_t viewMask_ = {}, - uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ = {}, - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachmentFormats( pColorAttachmentFormats_ ) - , depthAttachmentFormat( depthAttachmentFormat_ ) - , stencilAttachmentFormat( stencilAttachmentFormat_ ) - , rasterizationSamples( rasterizationSamples_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderingInfo( CommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceRenderingInfo( VkCommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferInheritanceRenderingInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CommandBufferInheritanceRenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_, - uint32_t viewMask_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_, - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( static_cast( colorAttachmentFormats_.size() ) ) - , pColorAttachmentFormats( colorAttachmentFormats_.data() ) - , depthAttachmentFormat( depthAttachmentFormat_ ) - , stencilAttachmentFormat( stencilAttachmentFormat_ ) - , rasterizationSamples( rasterizationSamples_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferInheritanceRenderingInfo & operator=( CommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceRenderingInfo & operator=( VkCommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT - { - viewMask = viewMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & - setPColorAttachmentFormats( const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachmentFormats = pColorAttachmentFormats_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CommandBufferInheritanceRenderingInfo & setColorAttachmentFormats( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachmentFormats_.size() ); - pColorAttachmentFormats = colorAttachmentFormats_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & - setDepthAttachmentFormat( VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT - { - depthAttachmentFormat = depthAttachmentFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & - setStencilAttachmentFormat( VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT - { - stencilAttachmentFormat = stencilAttachmentFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & - setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationSamples = rasterizationSamples_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferInheritanceRenderingInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferInheritanceRenderingInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, flags, viewMask, colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, stencilAttachmentFormat, rasterizationSamples ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferInheritanceRenderingInfo const & ) const = default; -#else - bool operator==( CommandBufferInheritanceRenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewMask == rhs.viewMask ) && - ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentFormats == rhs.pColorAttachmentFormats ) && - ( depthAttachmentFormat == rhs.depthAttachmentFormat ) && ( stencilAttachmentFormat == rhs.stencilAttachmentFormat ) && - ( rasterizationSamples == rhs.rasterizationSamples ); -# endif - } - - bool operator!=( CommandBufferInheritanceRenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceRenderingInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderingFlags flags = {}; - uint32_t viewMask = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats = {}; - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - }; - - template <> - struct CppType - { - using Type = CommandBufferInheritanceRenderingInfo; - }; - using CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; - - struct Viewport - { - using NativeType = VkViewport; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - Viewport( float x_ = {}, float y_ = {}, float width_ = {}, float height_ = {}, float minDepth_ = {}, float maxDepth_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - , width( width_ ) - , height( height_ ) - , minDepth( minDepth_ ) - , maxDepth( maxDepth_ ) - { - } - - VULKAN_HPP_CONSTEXPR Viewport( Viewport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Viewport( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT : Viewport( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Viewport & operator=( Viewport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Viewport & operator=( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Viewport & setX( float x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Viewport & setY( float y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Viewport & setWidth( float width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Viewport & setHeight( float height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Viewport & setMinDepth( float minDepth_ ) VULKAN_HPP_NOEXCEPT - { - minDepth = minDepth_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Viewport & setMaxDepth( float maxDepth_ ) VULKAN_HPP_NOEXCEPT - { - maxDepth = maxDepth_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkViewport const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkViewport &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y, width, height, minDepth, maxDepth ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Viewport const & ) const = default; -#else - bool operator==( Viewport const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ) && ( width == rhs.width ) && ( height == rhs.height ) && ( minDepth == rhs.minDepth ) && - ( maxDepth == rhs.maxDepth ); -# endif - } - - bool operator!=( Viewport const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float x = {}; - float y = {}; - float width = {}; - float height = {}; - float minDepth = {}; - float maxDepth = {}; - }; - - struct CommandBufferInheritanceViewportScissorInfoNV - { - using NativeType = VkCommandBufferInheritanceViewportScissorInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceViewportScissorInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferInheritanceViewportScissorInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D_ = {}, - uint32_t viewportDepthCount_ = {}, - const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , viewportScissor2D( viewportScissor2D_ ) - , viewportDepthCount( viewportDepthCount_ ) - , pViewportDepths( pViewportDepths_ ) - { - } - - VULKAN_HPP_CONSTEXPR - CommandBufferInheritanceViewportScissorInfoNV( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceViewportScissorInfoNV( VkCommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferInheritanceViewportScissorInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferInheritanceViewportScissorInfoNV & operator=( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferInheritanceViewportScissorInfoNV & operator=( VkCommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & - setViewportScissor2D( VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D_ ) VULKAN_HPP_NOEXCEPT - { - viewportScissor2D = viewportScissor2D_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setViewportDepthCount( uint32_t viewportDepthCount_ ) VULKAN_HPP_NOEXCEPT - { - viewportDepthCount = viewportDepthCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & - setPViewportDepths( const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths_ ) VULKAN_HPP_NOEXCEPT - { - pViewportDepths = pViewportDepths_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferInheritanceViewportScissorInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferInheritanceViewportScissorInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, viewportScissor2D, viewportDepthCount, pViewportDepths ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferInheritanceViewportScissorInfoNV const & ) const = default; -#else - bool operator==( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewportScissor2D == rhs.viewportScissor2D ) && - ( viewportDepthCount == rhs.viewportDepthCount ) && ( pViewportDepths == rhs.pViewportDepths ); -# endif - } - - bool operator!=( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceViewportScissorInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D = {}; - uint32_t viewportDepthCount = {}; - const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferInheritanceViewportScissorInfoNV; - }; - - struct CommandBufferSubmitInfo - { - using NativeType = VkCommandBufferSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandBufferSubmitInfo( VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer_ = {}, - uint32_t deviceMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , commandBuffer( commandBuffer_ ) - , deviceMask( deviceMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandBufferSubmitInfo( CommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferSubmitInfo( VkCommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandBufferSubmitInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandBufferSubmitInfo & operator=( CommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandBufferSubmitInfo & operator=( VkCommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setCommandBuffer( VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer_ ) VULKAN_HPP_NOEXCEPT - { - commandBuffer = commandBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT - { - deviceMask = deviceMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandBufferSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandBufferSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, commandBuffer, deviceMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandBufferSubmitInfo const & ) const = default; -#else - bool operator==( CommandBufferSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( commandBuffer == rhs.commandBuffer ) && ( deviceMask == rhs.deviceMask ); -# endif - } - - bool operator!=( CommandBufferSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferSubmitInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer = {}; - uint32_t deviceMask = {}; - }; - - template <> - struct CppType - { - using Type = CommandBufferSubmitInfo; - }; - using CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; - - struct CommandPoolCreateInfo - { - using NativeType = VkCommandPoolCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandPoolCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ = {}, - uint32_t queueFamilyIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( CommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandPoolCreateInfo( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : CommandPoolCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CommandPoolCreateInfo & operator=( CommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CommandPoolCreateInfo & operator=( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndex = queueFamilyIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCommandPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCommandPoolCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, queueFamilyIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CommandPoolCreateInfo const & ) const = default; -#else - bool operator==( CommandPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ); -# endif - } - - bool operator!=( CommandPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandPoolCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags = {}; - uint32_t queueFamilyIndex = {}; - }; - - template <> - struct CppType - { - using Type = CommandPoolCreateInfo; - }; - - struct SpecializationMapEntry - { - using NativeType = VkSpecializationMapEntry; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SpecializationMapEntry( uint32_t constantID_ = {}, uint32_t offset_ = {}, size_t size_ = {} ) VULKAN_HPP_NOEXCEPT - : constantID( constantID_ ) - , offset( offset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR SpecializationMapEntry( SpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SpecializationMapEntry( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT - : SpecializationMapEntry( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SpecializationMapEntry & operator=( SpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SpecializationMapEntry & operator=( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setConstantID( uint32_t constantID_ ) VULKAN_HPP_NOEXCEPT - { - constantID = constantID_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setSize( size_t size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSpecializationMapEntry const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSpecializationMapEntry &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( constantID, offset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SpecializationMapEntry const & ) const = default; -#else - bool operator==( SpecializationMapEntry const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( constantID == rhs.constantID ) && ( offset == rhs.offset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( SpecializationMapEntry const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t constantID = {}; - uint32_t offset = {}; - size_t size = {}; - }; - - struct SpecializationInfo - { - using NativeType = VkSpecializationInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SpecializationInfo( uint32_t mapEntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries_ = {}, - size_t dataSize_ = {}, - const void * pData_ = {} ) VULKAN_HPP_NOEXCEPT - : mapEntryCount( mapEntryCount_ ) - , pMapEntries( pMapEntries_ ) - , dataSize( dataSize_ ) - , pData( pData_ ) - { - } - - VULKAN_HPP_CONSTEXPR SpecializationInfo( SpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SpecializationInfo( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SpecializationInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - SpecializationInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mapEntries_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ = {} ) - : mapEntryCount( static_cast( mapEntries_.size() ) ) - , pMapEntries( mapEntries_.data() ) - , dataSize( data_.size() * sizeof( T ) ) - , pData( data_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SpecializationInfo & operator=( SpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SpecializationInfo & operator=( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setMapEntryCount( uint32_t mapEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - mapEntryCount = mapEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setPMapEntries( const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries_ ) VULKAN_HPP_NOEXCEPT - { - pMapEntries = pMapEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SpecializationInfo & - setMapEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mapEntries_ ) VULKAN_HPP_NOEXCEPT - { - mapEntryCount = static_cast( mapEntries_.size() ); - pMapEntries = mapEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = dataSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT - { - pData = pData_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - SpecializationInfo & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = data_.size() * sizeof( T ); - pData = data_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSpecializationInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSpecializationInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( mapEntryCount, pMapEntries, dataSize, pData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SpecializationInfo const & ) const = default; -#else - bool operator==( SpecializationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( mapEntryCount == rhs.mapEntryCount ) && ( pMapEntries == rhs.pMapEntries ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); -# endif - } - - bool operator!=( SpecializationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t mapEntryCount = {}; - const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries = {}; - size_t dataSize = {}; - const void * pData = {}; - }; - - struct PipelineShaderStageCreateInfo - { - using NativeType = VkPipelineShaderStageCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex, - VULKAN_HPP_NAMESPACE::ShaderModule module_ = {}, - const char * pName_ = {}, - const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , stage( stage_ ) - , module( module_ ) - , pName( pName_ ) - , pSpecializationInfo( pSpecializationInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( PipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageCreateInfo( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineShaderStageCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineShaderStageCreateInfo & operator=( PipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageCreateInfo & operator=( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setStage( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ ) VULKAN_HPP_NOEXCEPT - { - stage = stage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setModule( VULKAN_HPP_NAMESPACE::ShaderModule module_ ) VULKAN_HPP_NOEXCEPT - { - module = module_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT - { - pName = pName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & - setPSpecializationInfo( const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ ) VULKAN_HPP_NOEXCEPT - { - pSpecializationInfo = pSpecializationInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineShaderStageCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineShaderStageCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, stage, module, pName, pSpecializationInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = stage <=> rhs.stage; cmp != 0 ) - return cmp; - if ( auto cmp = module <=> rhs.module; cmp != 0 ) - return cmp; - if ( pName != rhs.pName ) - if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = pSpecializationInfo <=> rhs.pSpecializationInfo; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) && ( module == rhs.module ) && - ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ) && ( pSpecializationInfo == rhs.pSpecializationInfo ); - } - - bool operator!=( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex; - VULKAN_HPP_NAMESPACE::ShaderModule module = {}; - const char * pName = {}; - const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo = {}; - }; - - template <> - struct CppType - { - using Type = PipelineShaderStageCreateInfo; - }; - - struct ComputePipelineCreateInfo - { - using NativeType = VkComputePipelineCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eComputePipelineCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo stage_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , stage( stage_ ) - , layout( layout_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( ComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ComputePipelineCreateInfo( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ComputePipelineCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ComputePipelineCreateInfo & operator=( ComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ComputePipelineCreateInfo & operator=( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setStage( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const & stage_ ) VULKAN_HPP_NOEXCEPT - { - stage = stage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineHandle = basePipelineHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineIndex = basePipelineIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkComputePipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkComputePipelineCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, stage, layout, basePipelineHandle, basePipelineIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ComputePipelineCreateInfo const & ) const = default; -#else - bool operator==( ComputePipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) && ( layout == rhs.layout ) && - ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); -# endif - } - - bool operator!=( ComputePipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eComputePipelineCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo stage = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; - int32_t basePipelineIndex = {}; - }; - - template <> - struct CppType - { - using Type = ComputePipelineCreateInfo; - }; - - struct ConditionalRenderingBeginInfoEXT - { - using NativeType = VkConditionalRenderingBeginInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eConditionalRenderingBeginInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , buffer( buffer_ ) - , offset( offset_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( ConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ConditionalRenderingBeginInfoEXT( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ConditionalRenderingBeginInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ConditionalRenderingBeginInfoEXT & operator=( ConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ConditionalRenderingBeginInfoEXT & operator=( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkConditionalRenderingBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkConditionalRenderingBeginInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, buffer, offset, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ConditionalRenderingBeginInfoEXT const & ) const = default; -#else - bool operator==( ConditionalRenderingBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( ConditionalRenderingBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eConditionalRenderingBeginInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags = {}; - }; - - template <> - struct CppType - { - using Type = ConditionalRenderingBeginInfoEXT; - }; - - struct ConformanceVersion - { - using NativeType = VkConformanceVersion; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ConformanceVersion( uint8_t major_ = {}, uint8_t minor_ = {}, uint8_t subminor_ = {}, uint8_t patch_ = {} ) VULKAN_HPP_NOEXCEPT - : major( major_ ) - , minor( minor_ ) - , subminor( subminor_ ) - , patch( patch_ ) - { - } - - VULKAN_HPP_CONSTEXPR ConformanceVersion( ConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ConformanceVersion( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT : ConformanceVersion( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ConformanceVersion & operator=( ConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ConformanceVersion & operator=( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setMajor( uint8_t major_ ) VULKAN_HPP_NOEXCEPT - { - major = major_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setMinor( uint8_t minor_ ) VULKAN_HPP_NOEXCEPT - { - minor = minor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setSubminor( uint8_t subminor_ ) VULKAN_HPP_NOEXCEPT - { - subminor = subminor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setPatch( uint8_t patch_ ) VULKAN_HPP_NOEXCEPT - { - patch = patch_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkConformanceVersion const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkConformanceVersion &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( major, minor, subminor, patch ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ConformanceVersion const & ) const = default; -#else - bool operator==( ConformanceVersion const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( major == rhs.major ) && ( minor == rhs.minor ) && ( subminor == rhs.subminor ) && ( patch == rhs.patch ); -# endif - } - - bool operator!=( ConformanceVersion const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint8_t major = {}; - uint8_t minor = {}; - uint8_t subminor = {}; - uint8_t patch = {}; - }; - using ConformanceVersionKHR = ConformanceVersion; - - struct CooperativeMatrixPropertiesNV - { - using NativeType = VkCooperativeMatrixPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCooperativeMatrixPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( uint32_t MSize_ = {}, - uint32_t NSize_ = {}, - uint32_t KSize_ = {}, - VULKAN_HPP_NAMESPACE::ComponentTypeNV AType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16, - VULKAN_HPP_NAMESPACE::ComponentTypeNV BType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16, - VULKAN_HPP_NAMESPACE::ComponentTypeNV CType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16, - VULKAN_HPP_NAMESPACE::ComponentTypeNV DType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16, - VULKAN_HPP_NAMESPACE::ScopeNV scope_ = VULKAN_HPP_NAMESPACE::ScopeNV::eDevice, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , MSize( MSize_ ) - , NSize( NSize_ ) - , KSize( KSize_ ) - , AType( AType_ ) - , BType( BType_ ) - , CType( CType_ ) - , DType( DType_ ) - , scope( scope_ ) - { - } - - VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CooperativeMatrixPropertiesNV( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : CooperativeMatrixPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CooperativeMatrixPropertiesNV & operator=( CooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CooperativeMatrixPropertiesNV & operator=( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setMSize( uint32_t MSize_ ) VULKAN_HPP_NOEXCEPT - { - MSize = MSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setNSize( uint32_t NSize_ ) VULKAN_HPP_NOEXCEPT - { - NSize = NSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setKSize( uint32_t KSize_ ) VULKAN_HPP_NOEXCEPT - { - KSize = KSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setAType( VULKAN_HPP_NAMESPACE::ComponentTypeNV AType_ ) VULKAN_HPP_NOEXCEPT - { - AType = AType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setBType( VULKAN_HPP_NAMESPACE::ComponentTypeNV BType_ ) VULKAN_HPP_NOEXCEPT - { - BType = BType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setCType( VULKAN_HPP_NAMESPACE::ComponentTypeNV CType_ ) VULKAN_HPP_NOEXCEPT - { - CType = CType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setDType( VULKAN_HPP_NAMESPACE::ComponentTypeNV DType_ ) VULKAN_HPP_NOEXCEPT - { - DType = DType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CooperativeMatrixPropertiesNV & setScope( VULKAN_HPP_NAMESPACE::ScopeNV scope_ ) VULKAN_HPP_NOEXCEPT - { - scope = scope_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCooperativeMatrixPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCooperativeMatrixPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, MSize, NSize, KSize, AType, BType, CType, DType, scope ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CooperativeMatrixPropertiesNV const & ) const = default; -#else - bool operator==( CooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( MSize == rhs.MSize ) && ( NSize == rhs.NSize ) && ( KSize == rhs.KSize ) && - ( AType == rhs.AType ) && ( BType == rhs.BType ) && ( CType == rhs.CType ) && ( DType == rhs.DType ) && ( scope == rhs.scope ); -# endif - } - - bool operator!=( CooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCooperativeMatrixPropertiesNV; - void * pNext = {}; - uint32_t MSize = {}; - uint32_t NSize = {}; - uint32_t KSize = {}; - VULKAN_HPP_NAMESPACE::ComponentTypeNV AType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16; - VULKAN_HPP_NAMESPACE::ComponentTypeNV BType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16; - VULKAN_HPP_NAMESPACE::ComponentTypeNV CType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16; - VULKAN_HPP_NAMESPACE::ComponentTypeNV DType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16; - VULKAN_HPP_NAMESPACE::ScopeNV scope = VULKAN_HPP_NAMESPACE::ScopeNV::eDevice; - }; - - template <> - struct CppType - { - using Type = CooperativeMatrixPropertiesNV; - }; - - struct CopyAccelerationStructureInfoKHR - { - using NativeType = VkCopyAccelerationStructureInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyAccelerationStructureInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyAccelerationStructureInfoKHR( - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ = {}, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , src( src_ ) - , dst( dst_ ) - , mode( mode_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyAccelerationStructureInfoKHR( CopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyAccelerationStructureInfoKHR( VkCopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyAccelerationStructureInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyAccelerationStructureInfoKHR & operator=( CopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyAccelerationStructureInfoKHR & operator=( VkCopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setSrc( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ ) VULKAN_HPP_NOEXCEPT - { - src = src_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setDst( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ ) VULKAN_HPP_NOEXCEPT - { - dst = dst_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyAccelerationStructureInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, src, dst, mode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyAccelerationStructureInfoKHR const & ) const = default; -#else - bool operator==( CopyAccelerationStructureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( src == rhs.src ) && ( dst == rhs.dst ) && ( mode == rhs.mode ); -# endif - } - - bool operator!=( CopyAccelerationStructureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyAccelerationStructureInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst = {}; - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; - }; - - template <> - struct CppType - { - using Type = CopyAccelerationStructureInfoKHR; - }; - - struct CopyAccelerationStructureToMemoryInfoKHR - { - using NativeType = VkCopyAccelerationStructureToMemoryInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyAccelerationStructureToMemoryInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR( - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ = {}, - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst_ = {}, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , src( src_ ) - , dst( dst_ ) - , mode( mode_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR( CopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyAccelerationStructureToMemoryInfoKHR( VkCopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyAccelerationStructureToMemoryInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyAccelerationStructureToMemoryInfoKHR & operator=( CopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyAccelerationStructureToMemoryInfoKHR & operator=( VkCopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setSrc( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ ) VULKAN_HPP_NOEXCEPT - { - src = src_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setDst( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & dst_ ) VULKAN_HPP_NOEXCEPT - { - dst = dst_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & - setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyAccelerationStructureToMemoryInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyAccelerationStructureToMemoryInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, src, dst, mode ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyAccelerationStructureToMemoryInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst = {}; - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; - }; - - template <> - struct CppType - { - using Type = CopyAccelerationStructureToMemoryInfoKHR; - }; - - struct CopyBufferInfo2 - { - using NativeType = VkCopyBufferInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyBufferInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyBufferInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ = {}, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcBuffer( srcBuffer_ ) - , dstBuffer( dstBuffer_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyBufferInfo2( CopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyBufferInfo2( VkCopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyBufferInfo2( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyBufferInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), srcBuffer( srcBuffer_ ), dstBuffer( dstBuffer_ ), regionCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyBufferInfo2 & operator=( CopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyBufferInfo2 & operator=( VkCopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT - { - srcBuffer = srcBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setDstBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ ) VULKAN_HPP_NOEXCEPT - { - dstBuffer = dstBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyBufferInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyBufferInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyBufferInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcBuffer, dstBuffer, regionCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyBufferInfo2 const & ) const = default; -#else - bool operator==( CopyBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcBuffer == rhs.srcBuffer ) && ( dstBuffer == rhs.dstBuffer ) && - ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( CopyBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyBufferInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; - VULKAN_HPP_NAMESPACE::Buffer dstBuffer = {}; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = CopyBufferInfo2; - }; - using CopyBufferInfo2KHR = CopyBufferInfo2; - - struct CopyBufferToImageInfo2 - { - using NativeType = VkCopyBufferToImageInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyBufferToImageInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyBufferToImageInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, - VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcBuffer( srcBuffer_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyBufferToImageInfo2( CopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyBufferToImageInfo2( VkCopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyBufferToImageInfo2( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyBufferToImageInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, - VULKAN_HPP_NAMESPACE::Image dstImage_, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , srcBuffer( srcBuffer_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( static_cast( regions_.size() ) ) - , pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyBufferToImageInfo2 & operator=( CopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyBufferToImageInfo2 & operator=( VkCopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT - { - srcBuffer = srcBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT - { - dstImage = dstImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - dstImageLayout = dstImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyBufferToImageInfo2 & - setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyBufferToImageInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyBufferToImageInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyBufferToImageInfo2 const & ) const = default; -#else - bool operator==( CopyBufferToImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcBuffer == rhs.srcBuffer ) && ( dstImage == rhs.dstImage ) && - ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( CopyBufferToImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyBufferToImageInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; - VULKAN_HPP_NAMESPACE::Image dstImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = CopyBufferToImageInfo2; - }; - using CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; - - struct CopyCommandTransformInfoQCOM - { - using NativeType = VkCopyCommandTransformInfoQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyCommandTransformInfoQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - CopyCommandTransformInfoQCOM( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , transform( transform_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyCommandTransformInfoQCOM( CopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyCommandTransformInfoQCOM( VkCopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyCommandTransformInfoQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyCommandTransformInfoQCOM & operator=( CopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyCommandTransformInfoQCOM & operator=( VkCopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyCommandTransformInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyCommandTransformInfoQCOM & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT - { - transform = transform_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyCommandTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyCommandTransformInfoQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, transform ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyCommandTransformInfoQCOM const & ) const = default; -#else - bool operator==( CopyCommandTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ); -# endif - } - - bool operator!=( CopyCommandTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyCommandTransformInfoQCOM; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - }; - - template <> - struct CppType - { - using Type = CopyCommandTransformInfoQCOM; - }; - - struct CopyDescriptorSet - { - using NativeType = VkCopyDescriptorSet; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyDescriptorSet; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet srcSet_ = {}, - uint32_t srcBinding_ = {}, - uint32_t srcArrayElement_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ = {}, - uint32_t dstBinding_ = {}, - uint32_t dstArrayElement_ = {}, - uint32_t descriptorCount_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcSet( srcSet_ ) - , srcBinding( srcBinding_ ) - , srcArrayElement( srcArrayElement_ ) - , dstSet( dstSet_ ) - , dstBinding( dstBinding_ ) - , dstArrayElement( dstArrayElement_ ) - , descriptorCount( descriptorCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyDescriptorSet( CopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyDescriptorSet( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT : CopyDescriptorSet( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyDescriptorSet & operator=( CopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyDescriptorSet & operator=( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcSet( VULKAN_HPP_NAMESPACE::DescriptorSet srcSet_ ) VULKAN_HPP_NOEXCEPT - { - srcSet = srcSet_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcBinding( uint32_t srcBinding_ ) VULKAN_HPP_NOEXCEPT - { - srcBinding = srcBinding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcArrayElement( uint32_t srcArrayElement_ ) VULKAN_HPP_NOEXCEPT - { - srcArrayElement = srcArrayElement_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT - { - dstSet = dstSet_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT - { - dstBinding = dstBinding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT - { - dstArrayElement = dstArrayElement_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = descriptorCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyDescriptorSet const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyDescriptorSet &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcSet, srcBinding, srcArrayElement, dstSet, dstBinding, dstArrayElement, descriptorCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyDescriptorSet const & ) const = default; -#else - bool operator==( CopyDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSet == rhs.srcSet ) && ( srcBinding == rhs.srcBinding ) && - ( srcArrayElement == rhs.srcArrayElement ) && ( dstSet == rhs.dstSet ) && ( dstBinding == rhs.dstBinding ) && - ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ); -# endif - } - - bool operator!=( CopyDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyDescriptorSet; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorSet srcSet = {}; - uint32_t srcBinding = {}; - uint32_t srcArrayElement = {}; - VULKAN_HPP_NAMESPACE::DescriptorSet dstSet = {}; - uint32_t dstBinding = {}; - uint32_t dstArrayElement = {}; - uint32_t descriptorCount = {}; - }; - - template <> - struct CppType - { - using Type = CopyDescriptorSet; - }; - - struct ImageCopy2 - { - using NativeType = VkImageCopy2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCopy2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageCopy2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcSubresource( srcSubresource_ ) - , srcOffset( srcOffset_ ) - , dstSubresource( dstSubresource_ ) - , dstOffset( dstOffset_ ) - , extent( extent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageCopy2( ImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCopy2( VkImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCopy2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageCopy2 & operator=( ImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCopy2 & operator=( VkImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageCopy2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageCopy2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageCopy2 const & ) const = default; -#else - bool operator==( ImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && - ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); -# endif - } - - bool operator!=( ImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCopy2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - }; - - template <> - struct CppType - { - using Type = ImageCopy2; - }; - using ImageCopy2KHR = ImageCopy2; - - struct CopyImageInfo2 - { - using NativeType = VkCopyImageInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyImageInfo2( CopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyImageInfo2( VkCopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyImageInfo2( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, - VULKAN_HPP_NAMESPACE::Image dstImage_, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( static_cast( regions_.size() ) ) - , pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyImageInfo2 & operator=( CopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyImageInfo2 & operator=( VkCopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT - { - srcImage = srcImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - srcImageLayout = srcImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT - { - dstImage = dstImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - dstImageLayout = dstImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyImageInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyImageInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyImageInfo2 const & ) const = default; -#else - bool operator==( CopyImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && - ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( CopyImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image srcImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::Image dstImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = CopyImageInfo2; - }; - using CopyImageInfo2KHR = CopyImageInfo2; - - struct CopyImageToBufferInfo2 - { - using NativeType = VkCopyImageToBufferInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageToBufferInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CopyImageToBufferInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ = {}, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstBuffer( dstBuffer_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR CopyImageToBufferInfo2( CopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyImageToBufferInfo2( VkCopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyImageToBufferInfo2( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyImageToBufferInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, - VULKAN_HPP_NAMESPACE::Buffer dstBuffer_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstBuffer( dstBuffer_ ) - , regionCount( static_cast( regions_.size() ) ) - , pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyImageToBufferInfo2 & operator=( CopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyImageToBufferInfo2 & operator=( VkCopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT - { - srcImage = srcImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - srcImageLayout = srcImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setDstBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ ) VULKAN_HPP_NOEXCEPT - { - dstBuffer = dstBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CopyImageToBufferInfo2 & - setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyImageToBufferInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyImageToBufferInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CopyImageToBufferInfo2 const & ) const = default; -#else - bool operator==( CopyImageToBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && - ( dstBuffer == rhs.dstBuffer ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( CopyImageToBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageToBufferInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image srcImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::Buffer dstBuffer = {}; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = CopyImageToBufferInfo2; - }; - using CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; - - struct CopyMemoryToAccelerationStructureInfoKHR - { - using NativeType = VkCopyMemoryToAccelerationStructureInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMemoryToAccelerationStructureInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR( - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src_ = {}, - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ = {}, - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , src( src_ ) - , dst( dst_ ) - , mode( mode_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR( CopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyMemoryToAccelerationStructureInfoKHR( VkCopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : CopyMemoryToAccelerationStructureInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CopyMemoryToAccelerationStructureInfoKHR & operator=( CopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CopyMemoryToAccelerationStructureInfoKHR & operator=( VkCopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & - setSrc( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & src_ ) VULKAN_HPP_NOEXCEPT - { - src = src_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setDst( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ ) VULKAN_HPP_NOEXCEPT - { - dst = dst_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & - setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCopyMemoryToAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCopyMemoryToAccelerationStructureInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, src, dst, mode ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMemoryToAccelerationStructureInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src = {}; - VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst = {}; - VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; - }; - - template <> - struct CppType - { - using Type = CopyMemoryToAccelerationStructureInfoKHR; - }; - - struct CuFunctionCreateInfoNVX - { - using NativeType = VkCuFunctionCreateInfoNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuFunctionCreateInfoNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - CuFunctionCreateInfoNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module_ = {}, const char * pName_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , module( module_ ) - , pName( pName_ ) - { - } - - VULKAN_HPP_CONSTEXPR CuFunctionCreateInfoNVX( CuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuFunctionCreateInfoNVX( VkCuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : CuFunctionCreateInfoNVX( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CuFunctionCreateInfoNVX & operator=( CuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuFunctionCreateInfoNVX & operator=( VkCuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setModule( VULKAN_HPP_NAMESPACE::CuModuleNVX module_ ) VULKAN_HPP_NOEXCEPT - { - module = module_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT - { - pName = pName_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCuFunctionCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCuFunctionCreateInfoNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, module, pName ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = module <=> rhs.module; cmp != 0 ) - return cmp; - if ( pName != rhs.pName ) - if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( module == rhs.module ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ); - } - - bool operator!=( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuFunctionCreateInfoNVX; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CuModuleNVX module = {}; - const char * pName = {}; - }; - - template <> - struct CppType - { - using Type = CuFunctionCreateInfoNVX; - }; - - struct CuLaunchInfoNVX - { - using NativeType = VkCuLaunchInfoNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuLaunchInfoNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CuLaunchInfoNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_ = {}, - uint32_t gridDimX_ = {}, - uint32_t gridDimY_ = {}, - uint32_t gridDimZ_ = {}, - uint32_t blockDimX_ = {}, - uint32_t blockDimY_ = {}, - uint32_t blockDimZ_ = {}, - uint32_t sharedMemBytes_ = {}, - size_t paramCount_ = {}, - const void * const * pParams_ = {}, - size_t extraCount_ = {}, - const void * const * pExtras_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , function( function_ ) - , gridDimX( gridDimX_ ) - , gridDimY( gridDimY_ ) - , gridDimZ( gridDimZ_ ) - , blockDimX( blockDimX_ ) - , blockDimY( blockDimY_ ) - , blockDimZ( blockDimZ_ ) - , sharedMemBytes( sharedMemBytes_ ) - , paramCount( paramCount_ ) - , pParams( pParams_ ) - , extraCount( extraCount_ ) - , pExtras( pExtras_ ) - { - } - - VULKAN_HPP_CONSTEXPR CuLaunchInfoNVX( CuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuLaunchInfoNVX( VkCuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : CuLaunchInfoNVX( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CuLaunchInfoNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_, - uint32_t gridDimX_, - uint32_t gridDimY_, - uint32_t gridDimZ_, - uint32_t blockDimX_, - uint32_t blockDimY_, - uint32_t blockDimZ_, - uint32_t sharedMemBytes_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , function( function_ ) - , gridDimX( gridDimX_ ) - , gridDimY( gridDimY_ ) - , gridDimZ( gridDimZ_ ) - , blockDimX( blockDimX_ ) - , blockDimY( blockDimY_ ) - , blockDimZ( blockDimZ_ ) - , sharedMemBytes( sharedMemBytes_ ) - , paramCount( params_.size() ) - , pParams( params_.data() ) - , extraCount( extras_.size() ) - , pExtras( extras_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CuLaunchInfoNVX & operator=( CuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuLaunchInfoNVX & operator=( VkCuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setFunction( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_ ) VULKAN_HPP_NOEXCEPT - { - function = function_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimX( uint32_t gridDimX_ ) VULKAN_HPP_NOEXCEPT - { - gridDimX = gridDimX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimY( uint32_t gridDimY_ ) VULKAN_HPP_NOEXCEPT - { - gridDimY = gridDimY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimZ( uint32_t gridDimZ_ ) VULKAN_HPP_NOEXCEPT - { - gridDimZ = gridDimZ_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimX( uint32_t blockDimX_ ) VULKAN_HPP_NOEXCEPT - { - blockDimX = blockDimX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimY( uint32_t blockDimY_ ) VULKAN_HPP_NOEXCEPT - { - blockDimY = blockDimY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimZ( uint32_t blockDimZ_ ) VULKAN_HPP_NOEXCEPT - { - blockDimZ = blockDimZ_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setSharedMemBytes( uint32_t sharedMemBytes_ ) VULKAN_HPP_NOEXCEPT - { - sharedMemBytes = sharedMemBytes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setParamCount( size_t paramCount_ ) VULKAN_HPP_NOEXCEPT - { - paramCount = paramCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPParams( const void * const * pParams_ ) VULKAN_HPP_NOEXCEPT - { - pParams = pParams_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CuLaunchInfoNVX & setParams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_ ) VULKAN_HPP_NOEXCEPT - { - paramCount = params_.size(); - pParams = params_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setExtraCount( size_t extraCount_ ) VULKAN_HPP_NOEXCEPT - { - extraCount = extraCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPExtras( const void * const * pExtras_ ) VULKAN_HPP_NOEXCEPT - { - pExtras = pExtras_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - CuLaunchInfoNVX & setExtras( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ ) VULKAN_HPP_NOEXCEPT - { - extraCount = extras_.size(); - pExtras = extras_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCuLaunchInfoNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCuLaunchInfoNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, paramCount, pParams, extraCount, pExtras ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuLaunchInfoNVX const & ) const = default; -#else - bool operator==( CuLaunchInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( function == rhs.function ) && ( gridDimX == rhs.gridDimX ) && ( gridDimY == rhs.gridDimY ) && - ( gridDimZ == rhs.gridDimZ ) && ( blockDimX == rhs.blockDimX ) && ( blockDimY == rhs.blockDimY ) && ( blockDimZ == rhs.blockDimZ ) && - ( sharedMemBytes == rhs.sharedMemBytes ) && ( paramCount == rhs.paramCount ) && ( pParams == rhs.pParams ) && ( extraCount == rhs.extraCount ) && - ( pExtras == rhs.pExtras ); -# endif - } - - bool operator!=( CuLaunchInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuLaunchInfoNVX; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CuFunctionNVX function = {}; - uint32_t gridDimX = {}; - uint32_t gridDimY = {}; - uint32_t gridDimZ = {}; - uint32_t blockDimX = {}; - uint32_t blockDimY = {}; - uint32_t blockDimZ = {}; - uint32_t sharedMemBytes = {}; - size_t paramCount = {}; - const void * const * pParams = {}; - size_t extraCount = {}; - const void * const * pExtras = {}; - }; - - template <> - struct CppType - { - using Type = CuLaunchInfoNVX; - }; - - struct CuModuleCreateInfoNVX - { - using NativeType = VkCuModuleCreateInfoNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuModuleCreateInfoNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR CuModuleCreateInfoNVX( size_t dataSize_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dataSize( dataSize_ ) - , pData( pData_ ) - { - } - - VULKAN_HPP_CONSTEXPR CuModuleCreateInfoNVX( CuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuModuleCreateInfoNVX( VkCuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : CuModuleCreateInfoNVX( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - CuModuleCreateInfoNVX( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), dataSize( data_.size() * sizeof( T ) ), pData( data_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - CuModuleCreateInfoNVX & operator=( CuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - CuModuleCreateInfoNVX & operator=( VkCuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = dataSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT - { - pData = pData_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - CuModuleCreateInfoNVX & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = data_.size() * sizeof( T ); - pData = data_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkCuModuleCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkCuModuleCreateInfoNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dataSize, pData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( CuModuleCreateInfoNVX const & ) const = default; -#else - bool operator==( CuModuleCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); -# endif - } - - bool operator!=( CuModuleCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuModuleCreateInfoNVX; - const void * pNext = {}; - size_t dataSize = {}; - const void * pData = {}; - }; - - template <> - struct CppType - { - using Type = CuModuleCreateInfoNVX; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct D3D12FenceSubmitInfoKHR - { - using NativeType = VkD3D12FenceSubmitInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eD3D12FenceSubmitInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = {}, - const uint64_t * pWaitSemaphoreValues_ = {}, - uint32_t signalSemaphoreValuesCount_ = {}, - const uint64_t * pSignalSemaphoreValues_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreValuesCount( waitSemaphoreValuesCount_ ) - , pWaitSemaphoreValues( pWaitSemaphoreValues_ ) - , signalSemaphoreValuesCount( signalSemaphoreValuesCount_ ) - , pSignalSemaphoreValues( pSignalSemaphoreValues_ ) - { - } - - VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( D3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - D3D12FenceSubmitInfoKHR( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : D3D12FenceSubmitInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - D3D12FenceSubmitInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreValuesCount( static_cast( waitSemaphoreValues_.size() ) ) - , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) - , signalSemaphoreValuesCount( static_cast( signalSemaphoreValues_.size() ) ) - , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - D3D12FenceSubmitInfoKHR & operator=( D3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - D3D12FenceSubmitInfoKHR & operator=( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setWaitSemaphoreValuesCount( uint32_t waitSemaphoreValuesCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreValuesCount = waitSemaphoreValuesCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPWaitSemaphoreValues( const uint64_t * pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphoreValues = pWaitSemaphoreValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - D3D12FenceSubmitInfoKHR & - setWaitSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreValuesCount = static_cast( waitSemaphoreValues_.size() ); - pWaitSemaphoreValues = waitSemaphoreValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setSignalSemaphoreValuesCount( uint32_t signalSemaphoreValuesCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreValuesCount = signalSemaphoreValuesCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPSignalSemaphoreValues( const uint64_t * pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphoreValues = pSignalSemaphoreValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - D3D12FenceSubmitInfoKHR & - setSignalSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreValuesCount = static_cast( signalSemaphoreValues_.size() ); - pSignalSemaphoreValues = signalSemaphoreValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkD3D12FenceSubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkD3D12FenceSubmitInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, waitSemaphoreValuesCount, pWaitSemaphoreValues, signalSemaphoreValuesCount, pSignalSemaphoreValues ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( D3D12FenceSubmitInfoKHR const & ) const = default; -# else - bool operator==( D3D12FenceSubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreValuesCount == rhs.waitSemaphoreValuesCount ) && - ( pWaitSemaphoreValues == rhs.pWaitSemaphoreValues ) && ( signalSemaphoreValuesCount == rhs.signalSemaphoreValuesCount ) && - ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues ); -# endif - } - - bool operator!=( D3D12FenceSubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR; - const void * pNext = {}; - uint32_t waitSemaphoreValuesCount = {}; - const uint64_t * pWaitSemaphoreValues = {}; - uint32_t signalSemaphoreValuesCount = {}; - const uint64_t * pSignalSemaphoreValues = {}; - }; - - template <> - struct CppType - { - using Type = D3D12FenceSubmitInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct DebugMarkerMarkerInfoEXT - { - using NativeType = VkDebugMarkerMarkerInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerMarkerInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - DebugMarkerMarkerInfoEXT( const char * pMarkerName_ = {}, std::array const & color_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pMarkerName( pMarkerName_ ) - , color( color_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( DebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerMarkerInfoEXT( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugMarkerMarkerInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugMarkerMarkerInfoEXT & operator=( DebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerMarkerInfoEXT & operator=( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setPMarkerName( const char * pMarkerName_ ) VULKAN_HPP_NOEXCEPT - { - pMarkerName = pMarkerName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setColor( std::array color_ ) VULKAN_HPP_NOEXCEPT - { - color = color_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugMarkerMarkerInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugMarkerMarkerInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pMarkerName, color ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::partial_ordering operator<=>( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( pMarkerName != rhs.pMarkerName ) - if ( auto cmp = strcmp( pMarkerName, rhs.pMarkerName ); cmp != 0 ) - return ( cmp < 0 ) ? std::partial_ordering::less : std::partial_ordering::greater; - if ( auto cmp = color <=> rhs.color; cmp != 0 ) - return cmp; - - return std::partial_ordering::equivalent; - } -#endif - - bool operator==( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pMarkerName == rhs.pMarkerName ) || ( strcmp( pMarkerName, rhs.pMarkerName ) == 0 ) ) && - ( color == rhs.color ); - } - - bool operator!=( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT; - const void * pNext = {}; - const char * pMarkerName = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D color = {}; - }; - - template <> - struct CppType - { - using Type = DebugMarkerMarkerInfoEXT; - }; - - struct DebugMarkerObjectNameInfoEXT - { - using NativeType = VkDebugMarkerObjectNameInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerObjectNameInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DebugMarkerObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown, - uint64_t object_ = {}, - const char * pObjectName_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , objectType( objectType_ ) - , object( object_ ) - , pObjectName( pObjectName_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( DebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerObjectNameInfoEXT( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugMarkerObjectNameInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugMarkerObjectNameInfoEXT & operator=( DebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerObjectNameInfoEXT & operator=( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT - { - objectType = objectType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setObject( uint64_t object_ ) VULKAN_HPP_NOEXCEPT - { - object = object_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setPObjectName( const char * pObjectName_ ) VULKAN_HPP_NOEXCEPT - { - pObjectName = pObjectName_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugMarkerObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugMarkerObjectNameInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, objectType, object, pObjectName ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = objectType <=> rhs.objectType; cmp != 0 ) - return cmp; - if ( auto cmp = object <=> rhs.object; cmp != 0 ) - return cmp; - if ( pObjectName != rhs.pObjectName ) - if ( auto cmp = strcmp( pObjectName, rhs.pObjectName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( object == rhs.object ) && - ( ( pObjectName == rhs.pObjectName ) || ( strcmp( pObjectName, rhs.pObjectName ) == 0 ) ); - } - - bool operator!=( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - uint64_t object = {}; - const char * pObjectName = {}; - }; - - template <> - struct CppType - { - using Type = DebugMarkerObjectNameInfoEXT; - }; - - struct DebugMarkerObjectTagInfoEXT - { - using NativeType = VkDebugMarkerObjectTagInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerObjectTagInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DebugMarkerObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown, - uint64_t object_ = {}, - uint64_t tagName_ = {}, - size_t tagSize_ = {}, - const void * pTag_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , objectType( objectType_ ) - , object( object_ ) - , tagName( tagName_ ) - , tagSize( tagSize_ ) - , pTag( pTag_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugMarkerObjectTagInfoEXT( DebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerObjectTagInfoEXT( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugMarkerObjectTagInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - DebugMarkerObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, - uint64_t object_, - uint64_t tagName_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), objectType( objectType_ ), object( object_ ), tagName( tagName_ ), tagSize( tag_.size() * sizeof( T ) ), pTag( tag_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugMarkerObjectTagInfoEXT & operator=( DebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugMarkerObjectTagInfoEXT & operator=( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT - { - objectType = objectType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setObject( uint64_t object_ ) VULKAN_HPP_NOEXCEPT - { - object = object_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setTagName( uint64_t tagName_ ) VULKAN_HPP_NOEXCEPT - { - tagName = tagName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setTagSize( size_t tagSize_ ) VULKAN_HPP_NOEXCEPT - { - tagSize = tagSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setPTag( const void * pTag_ ) VULKAN_HPP_NOEXCEPT - { - pTag = pTag_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - DebugMarkerObjectTagInfoEXT & setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) VULKAN_HPP_NOEXCEPT - { - tagSize = tag_.size() * sizeof( T ); - pTag = tag_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugMarkerObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugMarkerObjectTagInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, objectType, object, tagName, tagSize, pTag ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugMarkerObjectTagInfoEXT const & ) const = default; -#else - bool operator==( DebugMarkerObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( object == rhs.object ) && ( tagName == rhs.tagName ) && - ( tagSize == rhs.tagSize ) && ( pTag == rhs.pTag ); -# endif - } - - bool operator!=( DebugMarkerObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; - uint64_t object = {}; - uint64_t tagName = {}; - size_t tagSize = {}; - const void * pTag = {}; - }; - - template <> - struct CppType - { - using Type = DebugMarkerObjectTagInfoEXT; - }; - - struct DebugReportCallbackCreateInfoEXT - { - using NativeType = VkDebugReportCallbackCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugReportCallbackCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ = {}, - PFN_vkDebugReportCallbackEXT pfnCallback_ = {}, - void * pUserData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pfnCallback( pfnCallback_ ) - , pUserData( pUserData_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( DebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugReportCallbackCreateInfoEXT( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugReportCallbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugReportCallbackCreateInfoEXT & operator=( DebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugReportCallbackCreateInfoEXT & operator=( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPfnCallback( PFN_vkDebugReportCallbackEXT pfnCallback_ ) VULKAN_HPP_NOEXCEPT - { - pfnCallback = pfnCallback_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT - { - pUserData = pUserData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugReportCallbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugReportCallbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pfnCallback, pUserData ); - } -#endif - - bool operator==( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -#if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -#else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnCallback == rhs.pfnCallback ) && ( pUserData == rhs.pUserData ); -#endif - } - - bool operator!=( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags = {}; - PFN_vkDebugReportCallbackEXT pfnCallback = {}; - void * pUserData = {}; - }; - - template <> - struct CppType - { - using Type = DebugReportCallbackCreateInfoEXT; - }; - - struct DebugUtilsLabelEXT - { - using NativeType = VkDebugUtilsLabelEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsLabelEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - DebugUtilsLabelEXT( const char * pLabelName_ = {}, std::array const & color_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pLabelName( pLabelName_ ) - , color( color_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( DebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsLabelEXT( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsLabelEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugUtilsLabelEXT & operator=( DebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsLabelEXT & operator=( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setPLabelName( const char * pLabelName_ ) VULKAN_HPP_NOEXCEPT - { - pLabelName = pLabelName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setColor( std::array color_ ) VULKAN_HPP_NOEXCEPT - { - color = color_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugUtilsLabelEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugUtilsLabelEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pLabelName, color ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::partial_ordering operator<=>( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( pLabelName != rhs.pLabelName ) - if ( auto cmp = strcmp( pLabelName, rhs.pLabelName ); cmp != 0 ) - return ( cmp < 0 ) ? std::partial_ordering::less : std::partial_ordering::greater; - if ( auto cmp = color <=> rhs.color; cmp != 0 ) - return cmp; - - return std::partial_ordering::equivalent; - } -#endif - - bool operator==( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pLabelName == rhs.pLabelName ) || ( strcmp( pLabelName, rhs.pLabelName ) == 0 ) ) && - ( color == rhs.color ); - } - - bool operator!=( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsLabelEXT; - const void * pNext = {}; - const char * pLabelName = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D color = {}; - }; - - template <> - struct CppType - { - using Type = DebugUtilsLabelEXT; - }; - - struct DebugUtilsObjectNameInfoEXT - { - using NativeType = VkDebugUtilsObjectNameInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsObjectNameInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, - uint64_t objectHandle_ = {}, - const char * pObjectName_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , objectType( objectType_ ) - , objectHandle( objectHandle_ ) - , pObjectName( pObjectName_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( DebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsObjectNameInfoEXT( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugUtilsObjectNameInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugUtilsObjectNameInfoEXT & operator=( DebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsObjectNameInfoEXT & operator=( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT - { - objectType = objectType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setObjectHandle( uint64_t objectHandle_ ) VULKAN_HPP_NOEXCEPT - { - objectHandle = objectHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setPObjectName( const char * pObjectName_ ) VULKAN_HPP_NOEXCEPT - { - pObjectName = pObjectName_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugUtilsObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugUtilsObjectNameInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, objectType, objectHandle, pObjectName ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = objectType <=> rhs.objectType; cmp != 0 ) - return cmp; - if ( auto cmp = objectHandle <=> rhs.objectHandle; cmp != 0 ) - return cmp; - if ( pObjectName != rhs.pObjectName ) - if ( auto cmp = strcmp( pObjectName, rhs.pObjectName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && - ( ( pObjectName == rhs.pObjectName ) || ( strcmp( pObjectName, rhs.pObjectName ) == 0 ) ); - } - - bool operator!=( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsObjectNameInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; - uint64_t objectHandle = {}; - const char * pObjectName = {}; - }; - - template <> - struct CppType - { - using Type = DebugUtilsObjectNameInfoEXT; - }; - - struct DebugUtilsMessengerCallbackDataEXT - { - using NativeType = VkDebugUtilsMessengerCallbackDataEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsMessengerCallbackDataEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_ = {}, - const char * pMessageIdName_ = {}, - int32_t messageIdNumber_ = {}, - const char * pMessage_ = {}, - uint32_t queueLabelCount_ = {}, - const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels_ = {}, - uint32_t cmdBufLabelCount_ = {}, - const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels_ = {}, - uint32_t objectCount_ = {}, - const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pMessageIdName( pMessageIdName_ ) - , messageIdNumber( messageIdNumber_ ) - , pMessage( pMessage_ ) - , queueLabelCount( queueLabelCount_ ) - , pQueueLabels( pQueueLabels_ ) - , cmdBufLabelCount( cmdBufLabelCount_ ) - , pCmdBufLabels( pCmdBufLabels_ ) - , objectCount( objectCount_ ) - , pObjects( pObjects_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT( DebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsMessengerCallbackDataEXT( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugUtilsMessengerCallbackDataEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DebugUtilsMessengerCallbackDataEXT( - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_, - const char * pMessageIdName_, - int32_t messageIdNumber_, - const char * pMessage_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueLabels_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & cmdBufLabels_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & objects_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , pMessageIdName( pMessageIdName_ ) - , messageIdNumber( messageIdNumber_ ) - , pMessage( pMessage_ ) - , queueLabelCount( static_cast( queueLabels_.size() ) ) - , pQueueLabels( queueLabels_.data() ) - , cmdBufLabelCount( static_cast( cmdBufLabels_.size() ) ) - , pCmdBufLabels( cmdBufLabels_.data() ) - , objectCount( static_cast( objects_.size() ) ) - , pObjects( objects_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugUtilsMessengerCallbackDataEXT & operator=( DebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsMessengerCallbackDataEXT & operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & - setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPMessageIdName( const char * pMessageIdName_ ) VULKAN_HPP_NOEXCEPT - { - pMessageIdName = pMessageIdName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setMessageIdNumber( int32_t messageIdNumber_ ) VULKAN_HPP_NOEXCEPT - { - messageIdNumber = messageIdNumber_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPMessage( const char * pMessage_ ) VULKAN_HPP_NOEXCEPT - { - pMessage = pMessage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setQueueLabelCount( uint32_t queueLabelCount_ ) VULKAN_HPP_NOEXCEPT - { - queueLabelCount = queueLabelCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & - setPQueueLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels_ ) VULKAN_HPP_NOEXCEPT - { - pQueueLabels = pQueueLabels_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DebugUtilsMessengerCallbackDataEXT & - setQueueLabels( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueLabels_ ) VULKAN_HPP_NOEXCEPT - { - queueLabelCount = static_cast( queueLabels_.size() ); - pQueueLabels = queueLabels_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setCmdBufLabelCount( uint32_t cmdBufLabelCount_ ) VULKAN_HPP_NOEXCEPT - { - cmdBufLabelCount = cmdBufLabelCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & - setPCmdBufLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels_ ) VULKAN_HPP_NOEXCEPT - { - pCmdBufLabels = pCmdBufLabels_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DebugUtilsMessengerCallbackDataEXT & - setCmdBufLabels( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & cmdBufLabels_ ) VULKAN_HPP_NOEXCEPT - { - cmdBufLabelCount = static_cast( cmdBufLabels_.size() ); - pCmdBufLabels = cmdBufLabels_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setObjectCount( uint32_t objectCount_ ) VULKAN_HPP_NOEXCEPT - { - objectCount = objectCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & - setPObjects( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects_ ) VULKAN_HPP_NOEXCEPT - { - pObjects = pObjects_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DebugUtilsMessengerCallbackDataEXT & - setObjects( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & objects_ ) VULKAN_HPP_NOEXCEPT - { - objectCount = static_cast( objects_.size() ); - pObjects = objects_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugUtilsMessengerCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugUtilsMessengerCallbackDataEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, flags, pMessageIdName, messageIdNumber, pMessage, queueLabelCount, pQueueLabels, cmdBufLabelCount, pCmdBufLabels, objectCount, pObjects ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( pMessageIdName != rhs.pMessageIdName ) - if ( auto cmp = strcmp( pMessageIdName, rhs.pMessageIdName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = messageIdNumber <=> rhs.messageIdNumber; cmp != 0 ) - return cmp; - if ( pMessage != rhs.pMessage ) - if ( auto cmp = strcmp( pMessage, rhs.pMessage ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = queueLabelCount <=> rhs.queueLabelCount; cmp != 0 ) - return cmp; - if ( auto cmp = pQueueLabels <=> rhs.pQueueLabels; cmp != 0 ) - return cmp; - if ( auto cmp = cmdBufLabelCount <=> rhs.cmdBufLabelCount; cmp != 0 ) - return cmp; - if ( auto cmp = pCmdBufLabels <=> rhs.pCmdBufLabels; cmp != 0 ) - return cmp; - if ( auto cmp = objectCount <=> rhs.objectCount; cmp != 0 ) - return cmp; - if ( auto cmp = pObjects <=> rhs.pObjects; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( ( pMessageIdName == rhs.pMessageIdName ) || ( strcmp( pMessageIdName, rhs.pMessageIdName ) == 0 ) ) && - ( messageIdNumber == rhs.messageIdNumber ) && ( ( pMessage == rhs.pMessage ) || ( strcmp( pMessage, rhs.pMessage ) == 0 ) ) && - ( queueLabelCount == rhs.queueLabelCount ) && ( pQueueLabels == rhs.pQueueLabels ) && ( cmdBufLabelCount == rhs.cmdBufLabelCount ) && - ( pCmdBufLabels == rhs.pCmdBufLabels ) && ( objectCount == rhs.objectCount ) && ( pObjects == rhs.pObjects ); - } - - bool operator!=( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsMessengerCallbackDataEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags = {}; - const char * pMessageIdName = {}; - int32_t messageIdNumber = {}; - const char * pMessage = {}; - uint32_t queueLabelCount = {}; - const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels = {}; - uint32_t cmdBufLabelCount = {}; - const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels = {}; - uint32_t objectCount = {}; - const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects = {}; - }; - - template <> - struct CppType - { - using Type = DebugUtilsMessengerCallbackDataEXT; - }; - - struct DebugUtilsMessengerCreateInfoEXT - { - using NativeType = VkDebugUtilsMessengerCreateInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsMessengerCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = {}, - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ = {}, - PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ = {}, - void * pUserData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , messageSeverity( messageSeverity_ ) - , messageType( messageType_ ) - , pfnUserCallback( pfnUserCallback_ ) - , pUserData( pUserData_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( DebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsMessengerCreateInfoEXT( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugUtilsMessengerCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugUtilsMessengerCreateInfoEXT & operator=( DebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsMessengerCreateInfoEXT & operator=( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & - setMessageSeverity( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ ) VULKAN_HPP_NOEXCEPT - { - messageSeverity = messageSeverity_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & - setMessageType( VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ ) VULKAN_HPP_NOEXCEPT - { - messageType = messageType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPfnUserCallback( PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT - { - pfnUserCallback = pfnUserCallback_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT - { - pUserData = pUserData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugUtilsMessengerCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugUtilsMessengerCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, messageSeverity, messageType, pfnUserCallback, pUserData ); - } -#endif - - bool operator==( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -#if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -#else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( messageSeverity == rhs.messageSeverity ) && - ( messageType == rhs.messageType ) && ( pfnUserCallback == rhs.pfnUserCallback ) && ( pUserData == rhs.pUserData ); -#endif - } - - bool operator!=( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsMessengerCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity = {}; - VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType = {}; - PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback = {}; - void * pUserData = {}; - }; - - template <> - struct CppType - { - using Type = DebugUtilsMessengerCreateInfoEXT; - }; - - struct DebugUtilsObjectTagInfoEXT - { - using NativeType = VkDebugUtilsObjectTagInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsObjectTagInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, - uint64_t objectHandle_ = {}, - uint64_t tagName_ = {}, - size_t tagSize_ = {}, - const void * pTag_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , objectType( objectType_ ) - , objectHandle( objectHandle_ ) - , tagName( tagName_ ) - , tagSize( tagSize_ ) - , pTag( pTag_ ) - { - } - - VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( DebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsObjectTagInfoEXT( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DebugUtilsObjectTagInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - DebugUtilsObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, - uint64_t objectHandle_, - uint64_t tagName_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , objectType( objectType_ ) - , objectHandle( objectHandle_ ) - , tagName( tagName_ ) - , tagSize( tag_.size() * sizeof( T ) ) - , pTag( tag_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DebugUtilsObjectTagInfoEXT & operator=( DebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DebugUtilsObjectTagInfoEXT & operator=( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT - { - objectType = objectType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setObjectHandle( uint64_t objectHandle_ ) VULKAN_HPP_NOEXCEPT - { - objectHandle = objectHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setTagName( uint64_t tagName_ ) VULKAN_HPP_NOEXCEPT - { - tagName = tagName_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setTagSize( size_t tagSize_ ) VULKAN_HPP_NOEXCEPT - { - tagSize = tagSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setPTag( const void * pTag_ ) VULKAN_HPP_NOEXCEPT - { - pTag = pTag_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - DebugUtilsObjectTagInfoEXT & setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) VULKAN_HPP_NOEXCEPT - { - tagSize = tag_.size() * sizeof( T ); - pTag = tag_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDebugUtilsObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDebugUtilsObjectTagInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, objectType, objectHandle, tagName, tagSize, pTag ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugUtilsObjectTagInfoEXT const & ) const = default; -#else - bool operator==( DebugUtilsObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && - ( tagName == rhs.tagName ) && ( tagSize == rhs.tagSize ) && ( pTag == rhs.pTag ); -# endif - } - - bool operator!=( DebugUtilsObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsObjectTagInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; - uint64_t objectHandle = {}; - uint64_t tagName = {}; - size_t tagSize = {}; - const void * pTag = {}; - }; - - template <> - struct CppType - { - using Type = DebugUtilsObjectTagInfoEXT; - }; - - struct DedicatedAllocationBufferCreateInfoNV - { - using NativeType = VkDedicatedAllocationBufferCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationBufferCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dedicatedAllocation( dedicatedAllocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( DedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationBufferCreateInfoNV( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : DedicatedAllocationBufferCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DedicatedAllocationBufferCreateInfoNV & operator=( DedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationBufferCreateInfoNV & operator=( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationBufferCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationBufferCreateInfoNV & - setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT - { - dedicatedAllocation = dedicatedAllocation_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDedicatedAllocationBufferCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDedicatedAllocationBufferCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dedicatedAllocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DedicatedAllocationBufferCreateInfoNV const & ) const = default; -#else - bool operator==( DedicatedAllocationBufferCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocation == rhs.dedicatedAllocation ); -# endif - } - - bool operator!=( DedicatedAllocationBufferCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {}; - }; - - template <> - struct CppType - { - using Type = DedicatedAllocationBufferCreateInfoNV; - }; - - struct DedicatedAllocationImageCreateInfoNV - { - using NativeType = VkDedicatedAllocationImageCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationImageCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dedicatedAllocation( dedicatedAllocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( DedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationImageCreateInfoNV( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : DedicatedAllocationImageCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DedicatedAllocationImageCreateInfoNV & operator=( DedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationImageCreateInfoNV & operator=( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationImageCreateInfoNV & - setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT - { - dedicatedAllocation = dedicatedAllocation_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDedicatedAllocationImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDedicatedAllocationImageCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dedicatedAllocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DedicatedAllocationImageCreateInfoNV const & ) const = default; -#else - bool operator==( DedicatedAllocationImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocation == rhs.dedicatedAllocation ); -# endif - } - - bool operator!=( DedicatedAllocationImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {}; - }; - - template <> - struct CppType - { - using Type = DedicatedAllocationImageCreateInfoNV; - }; - - struct DedicatedAllocationMemoryAllocateInfoNV - { - using NativeType = VkDedicatedAllocationMemoryAllocateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - , buffer( buffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationMemoryAllocateInfoNV( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : DedicatedAllocationMemoryAllocateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DedicatedAllocationMemoryAllocateInfoNV & operator=( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DedicatedAllocationMemoryAllocateInfoNV & operator=( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDedicatedAllocationMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDedicatedAllocationMemoryAllocateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image, buffer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DedicatedAllocationMemoryAllocateInfoNV const & ) const = default; -#else - bool operator==( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( buffer == rhs.buffer ); -# endif - } - - bool operator!=( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - }; - - template <> - struct CppType - { - using Type = DedicatedAllocationMemoryAllocateInfoNV; - }; - - struct MemoryBarrier2 - { - using NativeType = VkMemoryBarrier2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryBarrier2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcStageMask( srcStageMask_ ) - , srcAccessMask( srcAccessMask_ ) - , dstStageMask( dstStageMask_ ) - , dstAccessMask( dstAccessMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryBarrier2( MemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryBarrier2( VkMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryBarrier2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryBarrier2 & operator=( MemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryBarrier2 & operator=( VkMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT - { - srcStageMask = srcStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - dstStageMask = dstStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcStageMask, srcAccessMask, dstStageMask, dstAccessMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryBarrier2 const & ) const = default; -#else - bool operator==( MemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && - ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ); -# endif - } - - bool operator!=( MemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrier2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; - }; - - template <> - struct CppType - { - using Type = MemoryBarrier2; - }; - using MemoryBarrier2KHR = MemoryBarrier2; - - struct ImageSubresourceRange - { - using NativeType = VkImageSubresourceRange; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageSubresourceRange( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, - uint32_t baseMipLevel_ = {}, - uint32_t levelCount_ = {}, - uint32_t baseArrayLayer_ = {}, - uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT - : aspectMask( aspectMask_ ) - , baseMipLevel( baseMipLevel_ ) - , levelCount( levelCount_ ) - , baseArrayLayer( baseArrayLayer_ ) - , layerCount( layerCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSubresourceRange( ImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresourceRange( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageSubresourceRange( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSubresourceRange & operator=( ImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresourceRange & operator=( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setBaseMipLevel( uint32_t baseMipLevel_ ) VULKAN_HPP_NOEXCEPT - { - baseMipLevel = baseMipLevel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setLevelCount( uint32_t levelCount_ ) VULKAN_HPP_NOEXCEPT - { - levelCount = levelCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT - { - baseArrayLayer = baseArrayLayer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSubresourceRange const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSubresourceRange &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( aspectMask, baseMipLevel, levelCount, baseArrayLayer, layerCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSubresourceRange const & ) const = default; -#else - bool operator==( ImageSubresourceRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( aspectMask == rhs.aspectMask ) && ( baseMipLevel == rhs.baseMipLevel ) && ( levelCount == rhs.levelCount ) && - ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); -# endif - } - - bool operator!=( ImageSubresourceRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - uint32_t baseMipLevel = {}; - uint32_t levelCount = {}; - uint32_t baseArrayLayer = {}; - uint32_t layerCount = {}; - }; - - struct ImageMemoryBarrier2 - { - using NativeType = VkImageMemoryBarrier2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryBarrier2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageMemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t srcQueueFamilyIndex_ = {}, - uint32_t dstQueueFamilyIndex_ = {}, - VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcStageMask( srcStageMask_ ) - , srcAccessMask( srcAccessMask_ ) - , dstStageMask( dstStageMask_ ) - , dstAccessMask( dstAccessMask_ ) - , oldLayout( oldLayout_ ) - , newLayout( newLayout_ ) - , srcQueueFamilyIndex( srcQueueFamilyIndex_ ) - , dstQueueFamilyIndex( dstQueueFamilyIndex_ ) - , image( image_ ) - , subresourceRange( subresourceRange_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageMemoryBarrier2( ImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryBarrier2( VkImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageMemoryBarrier2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageMemoryBarrier2 & operator=( ImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryBarrier2 & operator=( VkImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT - { - srcStageMask = srcStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - dstStageMask = dstStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT - { - oldLayout = oldLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT - { - newLayout = newLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - srcQueueFamilyIndex = srcQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - dstQueueFamilyIndex = dstQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & - setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT - { - subresourceRange = subresourceRange_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - srcStageMask, - srcAccessMask, - dstStageMask, - dstAccessMask, - oldLayout, - newLayout, - srcQueueFamilyIndex, - dstQueueFamilyIndex, - image, - subresourceRange ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageMemoryBarrier2 const & ) const = default; -#else - bool operator==( ImageMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && - ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( oldLayout == rhs.oldLayout ) && - ( newLayout == rhs.newLayout ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && - ( image == rhs.image ) && ( subresourceRange == rhs.subresourceRange ); -# endif - } - - bool operator!=( ImageMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryBarrier2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; - VULKAN_HPP_NAMESPACE::ImageLayout oldLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageLayout newLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t srcQueueFamilyIndex = {}; - uint32_t dstQueueFamilyIndex = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; - }; - - template <> - struct CppType - { - using Type = ImageMemoryBarrier2; - }; - using ImageMemoryBarrier2KHR = ImageMemoryBarrier2; - - struct DependencyInfo - { - using NativeType = VkDependencyInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDependencyInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DependencyInfo( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {}, - uint32_t memoryBarrierCount_ = {}, - const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers_ = {}, - uint32_t bufferMemoryBarrierCount_ = {}, - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers_ = {}, - uint32_t imageMemoryBarrierCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dependencyFlags( dependencyFlags_ ) - , memoryBarrierCount( memoryBarrierCount_ ) - , pMemoryBarriers( pMemoryBarriers_ ) - , bufferMemoryBarrierCount( bufferMemoryBarrierCount_ ) - , pBufferMemoryBarriers( pBufferMemoryBarriers_ ) - , imageMemoryBarrierCount( imageMemoryBarrierCount_ ) - , pImageMemoryBarriers( pImageMemoryBarriers_ ) - { - } - - VULKAN_HPP_CONSTEXPR DependencyInfo( DependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DependencyInfo( VkDependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DependencyInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DependencyInfo( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & memoryBarriers_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferMemoryBarriers_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageMemoryBarriers_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , dependencyFlags( dependencyFlags_ ) - , memoryBarrierCount( static_cast( memoryBarriers_.size() ) ) - , pMemoryBarriers( memoryBarriers_.data() ) - , bufferMemoryBarrierCount( static_cast( bufferMemoryBarriers_.size() ) ) - , pBufferMemoryBarriers( bufferMemoryBarriers_.data() ) - , imageMemoryBarrierCount( static_cast( imageMemoryBarriers_.size() ) ) - , pImageMemoryBarriers( imageMemoryBarriers_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DependencyInfo & operator=( DependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DependencyInfo & operator=( VkDependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT - { - dependencyFlags = dependencyFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setMemoryBarrierCount( uint32_t memoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT - { - memoryBarrierCount = memoryBarrierCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPMemoryBarriers( const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - pMemoryBarriers = pMemoryBarriers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DependencyInfo & - setMemoryBarriers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & memoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - memoryBarrierCount = static_cast( memoryBarriers_.size() ); - pMemoryBarriers = memoryBarriers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setBufferMemoryBarrierCount( uint32_t bufferMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT - { - bufferMemoryBarrierCount = bufferMemoryBarrierCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & - setPBufferMemoryBarriers( const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - pBufferMemoryBarriers = pBufferMemoryBarriers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DependencyInfo & setBufferMemoryBarriers( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - bufferMemoryBarrierCount = static_cast( bufferMemoryBarriers_.size() ); - pBufferMemoryBarriers = bufferMemoryBarriers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setImageMemoryBarrierCount( uint32_t imageMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT - { - imageMemoryBarrierCount = imageMemoryBarrierCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DependencyInfo & - setPImageMemoryBarriers( const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - pImageMemoryBarriers = pImageMemoryBarriers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DependencyInfo & setImageMemoryBarriers( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT - { - imageMemoryBarrierCount = static_cast( imageMemoryBarriers_.size() ); - pImageMemoryBarriers = imageMemoryBarriers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDependencyInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDependencyInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - dependencyFlags, - memoryBarrierCount, - pMemoryBarriers, - bufferMemoryBarrierCount, - pBufferMemoryBarriers, - imageMemoryBarrierCount, - pImageMemoryBarriers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DependencyInfo const & ) const = default; -#else - bool operator==( DependencyInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dependencyFlags == rhs.dependencyFlags ) && - ( memoryBarrierCount == rhs.memoryBarrierCount ) && ( pMemoryBarriers == rhs.pMemoryBarriers ) && - ( bufferMemoryBarrierCount == rhs.bufferMemoryBarrierCount ) && ( pBufferMemoryBarriers == rhs.pBufferMemoryBarriers ) && - ( imageMemoryBarrierCount == rhs.imageMemoryBarrierCount ) && ( pImageMemoryBarriers == rhs.pImageMemoryBarriers ); -# endif - } - - bool operator!=( DependencyInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDependencyInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; - uint32_t memoryBarrierCount = {}; - const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers = {}; - uint32_t bufferMemoryBarrierCount = {}; - const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers = {}; - uint32_t imageMemoryBarrierCount = {}; - const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers = {}; - }; - - template <> - struct CppType - { - using Type = DependencyInfo; - }; - using DependencyInfoKHR = DependencyInfo; - - struct DescriptorBufferInfo - { - using NativeType = VkDescriptorBufferInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorBufferInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize range_ = {} ) VULKAN_HPP_NOEXCEPT - : buffer( buffer_ ) - , offset( offset_ ) - , range( range_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorBufferInfo( DescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorBufferInfo( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorBufferInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorBufferInfo & operator=( DescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorBufferInfo & operator=( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT - { - range = range_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorBufferInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorBufferInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( buffer, offset, range ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorBufferInfo const & ) const = default; -#else - bool operator==( DescriptorBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( range == rhs.range ); -# endif - } - - bool operator!=( DescriptorBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize range = {}; - }; - - struct DescriptorImageInfo - { - using NativeType = VkDescriptorImageInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DescriptorImageInfo( VULKAN_HPP_NAMESPACE::Sampler sampler_ = {}, - VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT - : sampler( sampler_ ) - , imageView( imageView_ ) - , imageLayout( imageLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorImageInfo( DescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorImageInfo( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorImageInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorImageInfo & operator=( DescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorImageInfo & operator=( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT - { - sampler = sampler_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT - { - imageLayout = imageLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorImageInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorImageInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sampler, imageView, imageLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorImageInfo const & ) const = default; -#else - bool operator==( DescriptorImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sampler == rhs.sampler ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ); -# endif - } - - bool operator!=( DescriptorImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Sampler sampler = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - struct DescriptorPoolSize - { - using NativeType = VkDescriptorPoolSize; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorPoolSize( VULKAN_HPP_NAMESPACE::DescriptorType type_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, - uint32_t descriptorCount_ = {} ) VULKAN_HPP_NOEXCEPT - : type( type_ ) - , descriptorCount( descriptorCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorPoolSize( DescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolSize( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorPoolSize( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorPoolSize & operator=( DescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolSize & operator=( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolSize & setType( VULKAN_HPP_NAMESPACE::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolSize & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = descriptorCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorPoolSize const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorPoolSize &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( type, descriptorCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPoolSize const & ) const = default; -#else - bool operator==( DescriptorPoolSize const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( type == rhs.type ) && ( descriptorCount == rhs.descriptorCount ); -# endif - } - - bool operator!=( DescriptorPoolSize const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DescriptorType type = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; - uint32_t descriptorCount = {}; - }; - - struct DescriptorPoolCreateInfo - { - using NativeType = VkDescriptorPoolCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorPoolCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ = {}, - uint32_t maxSets_ = {}, - uint32_t poolSizeCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , maxSets( maxSets_ ) - , poolSizeCount( poolSizeCount_ ) - , pPoolSizes( pPoolSizes_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( DescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolCreateInfo( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorPoolCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorPoolCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_, - uint32_t maxSets_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & poolSizes_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), maxSets( maxSets_ ), poolSizeCount( static_cast( poolSizes_.size() ) ), pPoolSizes( poolSizes_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorPoolCreateInfo & operator=( DescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolCreateInfo & operator=( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setMaxSets( uint32_t maxSets_ ) VULKAN_HPP_NOEXCEPT - { - maxSets = maxSets_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPoolSizeCount( uint32_t poolSizeCount_ ) VULKAN_HPP_NOEXCEPT - { - poolSizeCount = poolSizeCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPPoolSizes( const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes_ ) VULKAN_HPP_NOEXCEPT - { - pPoolSizes = pPoolSizes_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorPoolCreateInfo & - setPoolSizes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & poolSizes_ ) VULKAN_HPP_NOEXCEPT - { - poolSizeCount = static_cast( poolSizes_.size() ); - pPoolSizes = poolSizes_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorPoolCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, maxSets, poolSizeCount, pPoolSizes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPoolCreateInfo const & ) const = default; -#else - bool operator==( DescriptorPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( maxSets == rhs.maxSets ) && - ( poolSizeCount == rhs.poolSizeCount ) && ( pPoolSizes == rhs.pPoolSizes ); -# endif - } - - bool operator!=( DescriptorPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorPoolCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags = {}; - uint32_t maxSets = {}; - uint32_t poolSizeCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorPoolCreateInfo; - }; - - struct DescriptorPoolInlineUniformBlockCreateInfo - { - using NativeType = VkDescriptorPoolInlineUniformBlockCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfo( uint32_t maxInlineUniformBlockBindings_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxInlineUniformBlockBindings( maxInlineUniformBlockBindings_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfo( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolInlineUniformBlockCreateInfo( VkDescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorPoolInlineUniformBlockCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorPoolInlineUniformBlockCreateInfo & operator=( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorPoolInlineUniformBlockCreateInfo & operator=( VkDescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolInlineUniformBlockCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorPoolInlineUniformBlockCreateInfo & - setMaxInlineUniformBlockBindings( uint32_t maxInlineUniformBlockBindings_ ) VULKAN_HPP_NOEXCEPT - { - maxInlineUniformBlockBindings = maxInlineUniformBlockBindings_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorPoolInlineUniformBlockCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorPoolInlineUniformBlockCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxInlineUniformBlockBindings ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorPoolInlineUniformBlockCreateInfo const & ) const = default; -#else - bool operator==( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInlineUniformBlockBindings == rhs.maxInlineUniformBlockBindings ); -# endif - } - - bool operator!=( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfo; - const void * pNext = {}; - uint32_t maxInlineUniformBlockBindings = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorPoolInlineUniformBlockCreateInfo; - }; - using DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; - - struct DescriptorSetAllocateInfo - { - using NativeType = VkDescriptorSetAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ = {}, - uint32_t descriptorSetCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , descriptorPool( descriptorPool_ ) - , descriptorSetCount( descriptorSetCount_ ) - , pSetLayouts( pSetLayouts_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( DescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetAllocateInfo( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetAllocateInfo( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), descriptorPool( descriptorPool_ ), descriptorSetCount( static_cast( setLayouts_.size() ) ), pSetLayouts( setLayouts_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetAllocateInfo & operator=( DescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetAllocateInfo & operator=( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ ) VULKAN_HPP_NOEXCEPT - { - descriptorPool = descriptorPool_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetCount = descriptorSetCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT - { - pSetLayouts = pSetLayouts_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetAllocateInfo & - setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetCount = static_cast( setLayouts_.size() ); - pSetLayouts = setLayouts_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, descriptorPool, descriptorSetCount, pSetLayouts ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetAllocateInfo const & ) const = default; -#else - bool operator==( DescriptorSetAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorPool == rhs.descriptorPool ) && ( descriptorSetCount == rhs.descriptorSetCount ) && - ( pSetLayouts == rhs.pSetLayouts ); -# endif - } - - bool operator!=( DescriptorSetAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetAllocateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool = {}; - uint32_t descriptorSetCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetAllocateInfo; - }; - - struct DescriptorSetBindingReferenceVALVE - { - using NativeType = VkDescriptorSetBindingReferenceVALVE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetBindingReferenceVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetBindingReferenceVALVE( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, - uint32_t binding_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , descriptorSetLayout( descriptorSetLayout_ ) - , binding( binding_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetBindingReferenceVALVE( DescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetBindingReferenceVALVE( VkDescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetBindingReferenceVALVE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetBindingReferenceVALVE & operator=( DescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetBindingReferenceVALVE & operator=( VkDescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & - setDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetLayout = descriptorSetLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetBindingReferenceVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetBindingReferenceVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, descriptorSetLayout, binding ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetBindingReferenceVALVE const & ) const = default; -#else - bool operator==( DescriptorSetBindingReferenceVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetLayout == rhs.descriptorSetLayout ) && ( binding == rhs.binding ); -# endif - } - - bool operator!=( DescriptorSetBindingReferenceVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetBindingReferenceVALVE; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout = {}; - uint32_t binding = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetBindingReferenceVALVE; - }; - - struct DescriptorSetLayoutBinding - { - using NativeType = VkDescriptorSetLayoutBinding; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBinding( uint32_t binding_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, - uint32_t descriptorCount_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, - const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers_ = {} ) VULKAN_HPP_NOEXCEPT - : binding( binding_ ) - , descriptorType( descriptorType_ ) - , descriptorCount( descriptorCount_ ) - , stageFlags( stageFlags_ ) - , pImmutableSamplers( pImmutableSamplers_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBinding( DescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutBinding( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetLayoutBinding( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutBinding( uint32_t binding_, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & immutableSamplers_ ) - : binding( binding_ ) - , descriptorType( descriptorType_ ) - , descriptorCount( static_cast( immutableSamplers_.size() ) ) - , stageFlags( stageFlags_ ) - , pImmutableSamplers( immutableSamplers_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetLayoutBinding & operator=( DescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutBinding & operator=( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT - { - descriptorType = descriptorType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = descriptorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT - { - stageFlags = stageFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setPImmutableSamplers( const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers_ ) VULKAN_HPP_NOEXCEPT - { - pImmutableSamplers = pImmutableSamplers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutBinding & - setImmutableSamplers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & immutableSamplers_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = static_cast( immutableSamplers_.size() ); - pImmutableSamplers = immutableSamplers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetLayoutBinding const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetLayoutBinding &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( binding, descriptorType, descriptorCount, stageFlags, pImmutableSamplers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayoutBinding const & ) const = default; -#else - bool operator==( DescriptorSetLayoutBinding const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( binding == rhs.binding ) && ( descriptorType == rhs.descriptorType ) && ( descriptorCount == rhs.descriptorCount ) && - ( stageFlags == rhs.stageFlags ) && ( pImmutableSamplers == rhs.pImmutableSamplers ); -# endif - } - - bool operator!=( DescriptorSetLayoutBinding const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t binding = {}; - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; - uint32_t descriptorCount = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; - const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers = {}; - }; - - struct DescriptorSetLayoutBindingFlagsCreateInfo - { - using NativeType = VkDescriptorSetLayoutBindingFlagsCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfo( uint32_t bindingCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , bindingCount( bindingCount_ ) - , pBindingFlags( pBindingFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfo( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutBindingFlagsCreateInfo( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetLayoutBindingFlagsCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutBindingFlagsCreateInfo( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindingFlags_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), bindingCount( static_cast( bindingFlags_.size() ) ), pBindingFlags( bindingFlags_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetLayoutBindingFlagsCreateInfo & operator=( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutBindingFlagsCreateInfo & operator=( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT - { - bindingCount = bindingCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & - setPBindingFlags( const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags_ ) VULKAN_HPP_NOEXCEPT - { - pBindingFlags = pBindingFlags_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutBindingFlagsCreateInfo & setBindingFlags( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindingFlags_ ) VULKAN_HPP_NOEXCEPT - { - bindingCount = static_cast( bindingFlags_.size() ); - pBindingFlags = bindingFlags_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetLayoutBindingFlagsCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetLayoutBindingFlagsCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, bindingCount, pBindingFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayoutBindingFlagsCreateInfo const & ) const = default; -#else - bool operator==( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bindingCount == rhs.bindingCount ) && ( pBindingFlags == rhs.pBindingFlags ); -# endif - } - - bool operator!=( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo; - const void * pNext = {}; - uint32_t bindingCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetLayoutBindingFlagsCreateInfo; - }; - using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; - - struct DescriptorSetLayoutCreateInfo - { - using NativeType = VkDescriptorSetLayoutCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ = {}, - uint32_t bindingCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , bindingCount( bindingCount_ ) - , pBindings( pBindings_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( DescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutCreateInfo( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetLayoutCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindings_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), bindingCount( static_cast( bindings_.size() ) ), pBindings( bindings_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetLayoutCreateInfo & operator=( DescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutCreateInfo & operator=( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT - { - bindingCount = bindingCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & - setPBindings( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings_ ) VULKAN_HPP_NOEXCEPT - { - pBindings = pBindings_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetLayoutCreateInfo & - setBindings( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindings_ ) VULKAN_HPP_NOEXCEPT - { - bindingCount = static_cast( bindings_.size() ); - pBindings = bindings_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetLayoutCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, bindingCount, pBindings ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayoutCreateInfo const & ) const = default; -#else - bool operator==( DescriptorSetLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( bindingCount == rhs.bindingCount ) && - ( pBindings == rhs.pBindings ); -# endif - } - - bool operator!=( DescriptorSetLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags = {}; - uint32_t bindingCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetLayoutCreateInfo; - }; - - struct DescriptorSetLayoutHostMappingInfoVALVE - { - using NativeType = VkDescriptorSetLayoutHostMappingInfoVALVE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutHostMappingInfoVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DescriptorSetLayoutHostMappingInfoVALVE( size_t descriptorOffset_ = {}, uint32_t descriptorSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , descriptorOffset( descriptorOffset_ ) - , descriptorSize( descriptorSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutHostMappingInfoVALVE( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutHostMappingInfoVALVE( VkDescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetLayoutHostMappingInfoVALVE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetLayoutHostMappingInfoVALVE & operator=( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutHostMappingInfoVALVE & operator=( VkDescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setDescriptorOffset( size_t descriptorOffset_ ) VULKAN_HPP_NOEXCEPT - { - descriptorOffset = descriptorOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setDescriptorSize( uint32_t descriptorSize_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSize = descriptorSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetLayoutHostMappingInfoVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetLayoutHostMappingInfoVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, descriptorOffset, descriptorSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayoutHostMappingInfoVALVE const & ) const = default; -#else - bool operator==( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorOffset == rhs.descriptorOffset ) && ( descriptorSize == rhs.descriptorSize ); -# endif - } - - bool operator!=( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutHostMappingInfoVALVE; - void * pNext = {}; - size_t descriptorOffset = {}; - uint32_t descriptorSize = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetLayoutHostMappingInfoVALVE; - }; - - struct DescriptorSetLayoutSupport - { - using NativeType = VkDescriptorSetLayoutSupport; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutSupport; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutSupport( VULKAN_HPP_NAMESPACE::Bool32 supported_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , supported( supported_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorSetLayoutSupport( DescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutSupport( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetLayoutSupport( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetLayoutSupport & operator=( DescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetLayoutSupport & operator=( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDescriptorSetLayoutSupport const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetLayoutSupport &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, supported ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetLayoutSupport const & ) const = default; -#else - bool operator==( DescriptorSetLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supported == rhs.supported ); -# endif - } - - bool operator!=( DescriptorSetLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutSupport; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 supported = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetLayoutSupport; - }; - using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; - - struct DescriptorSetVariableDescriptorCountAllocateInfo - { - using NativeType = VkDescriptorSetVariableDescriptorCountAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfo( uint32_t descriptorSetCount_ = {}, - const uint32_t * pDescriptorCounts_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , descriptorSetCount( descriptorSetCount_ ) - , pDescriptorCounts( pDescriptorCounts_ ) - { - } - - VULKAN_HPP_CONSTEXPR - DescriptorSetVariableDescriptorCountAllocateInfo( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetVariableDescriptorCountAllocateInfo( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetVariableDescriptorCountAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetVariableDescriptorCountAllocateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorCounts_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), descriptorSetCount( static_cast( descriptorCounts_.size() ) ), pDescriptorCounts( descriptorCounts_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetVariableDescriptorCountAllocateInfo & operator=( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetVariableDescriptorCountAllocateInfo & operator=( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetCount = descriptorSetCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setPDescriptorCounts( const uint32_t * pDescriptorCounts_ ) VULKAN_HPP_NOEXCEPT - { - pDescriptorCounts = pDescriptorCounts_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorSetVariableDescriptorCountAllocateInfo & - setDescriptorCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorCounts_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetCount = static_cast( descriptorCounts_.size() ); - pDescriptorCounts = descriptorCounts_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorSetVariableDescriptorCountAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetVariableDescriptorCountAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, descriptorSetCount, pDescriptorCounts ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetVariableDescriptorCountAllocateInfo const & ) const = default; -#else - bool operator==( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetCount == rhs.descriptorSetCount ) && - ( pDescriptorCounts == rhs.pDescriptorCounts ); -# endif - } - - bool operator!=( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo; - const void * pNext = {}; - uint32_t descriptorSetCount = {}; - const uint32_t * pDescriptorCounts = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetVariableDescriptorCountAllocateInfo; - }; - using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; - - struct DescriptorSetVariableDescriptorCountLayoutSupport - { - using NativeType = VkDescriptorSetVariableDescriptorCountLayoutSupport; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountLayoutSupport( uint32_t maxVariableDescriptorCount_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxVariableDescriptorCount( maxVariableDescriptorCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR - DescriptorSetVariableDescriptorCountLayoutSupport( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetVariableDescriptorCountLayoutSupport( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorSetVariableDescriptorCountLayoutSupport( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorSetVariableDescriptorCountLayoutSupport & - operator=( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorSetVariableDescriptorCountLayoutSupport & operator=( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDescriptorSetVariableDescriptorCountLayoutSupport const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorSetVariableDescriptorCountLayoutSupport &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxVariableDescriptorCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorSetVariableDescriptorCountLayoutSupport const & ) const = default; -#else - bool operator==( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVariableDescriptorCount == rhs.maxVariableDescriptorCount ); -# endif - } - - bool operator!=( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport; - void * pNext = {}; - uint32_t maxVariableDescriptorCount = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorSetVariableDescriptorCountLayoutSupport; - }; - using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; - - struct DescriptorUpdateTemplateEntry - { - using NativeType = VkDescriptorUpdateTemplateEntry; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateEntry( uint32_t dstBinding_ = {}, - uint32_t dstArrayElement_ = {}, - uint32_t descriptorCount_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, - size_t offset_ = {}, - size_t stride_ = {} ) VULKAN_HPP_NOEXCEPT - : dstBinding( dstBinding_ ) - , dstArrayElement( dstArrayElement_ ) - , descriptorCount( descriptorCount_ ) - , descriptorType( descriptorType_ ) - , offset( offset_ ) - , stride( stride_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateEntry( DescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorUpdateTemplateEntry( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorUpdateTemplateEntry( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorUpdateTemplateEntry & operator=( DescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorUpdateTemplateEntry & operator=( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT - { - dstBinding = dstBinding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT - { - dstArrayElement = dstArrayElement_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = descriptorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT - { - descriptorType = descriptorType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setOffset( size_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setStride( size_t stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorUpdateTemplateEntry const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorUpdateTemplateEntry &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( dstBinding, dstArrayElement, descriptorCount, descriptorType, offset, stride ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorUpdateTemplateEntry const & ) const = default; -#else - bool operator==( DescriptorUpdateTemplateEntry const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ) && - ( descriptorType == rhs.descriptorType ) && ( offset == rhs.offset ) && ( stride == rhs.stride ); -# endif - } - - bool operator!=( DescriptorUpdateTemplateEntry const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t dstBinding = {}; - uint32_t dstArrayElement = {}; - uint32_t descriptorCount = {}; - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; - size_t offset = {}; - size_t stride = {}; - }; - using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; - - struct DescriptorUpdateTemplateCreateInfo - { - using NativeType = VkDescriptorUpdateTemplateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorUpdateTemplateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_ = {}, - uint32_t descriptorUpdateEntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, - uint32_t set_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , descriptorUpdateEntryCount( descriptorUpdateEntryCount_ ) - , pDescriptorUpdateEntries( pDescriptorUpdateEntries_ ) - , templateType( templateType_ ) - , descriptorSetLayout( descriptorSetLayout_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , pipelineLayout( pipelineLayout_ ) - , set( set_ ) - { - } - - VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( DescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorUpdateTemplateCreateInfo( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DescriptorUpdateTemplateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorUpdateTemplateCreateInfo( - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorUpdateEntries_, - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet, - VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, - uint32_t set_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , descriptorUpdateEntryCount( static_cast( descriptorUpdateEntries_.size() ) ) - , pDescriptorUpdateEntries( descriptorUpdateEntries_.data() ) - , templateType( templateType_ ) - , descriptorSetLayout( descriptorSetLayout_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , pipelineLayout( pipelineLayout_ ) - , set( set_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DescriptorUpdateTemplateCreateInfo & operator=( DescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DescriptorUpdateTemplateCreateInfo & operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setDescriptorUpdateEntryCount( uint32_t descriptorUpdateEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorUpdateEntryCount = descriptorUpdateEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & - setPDescriptorUpdateEntries( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT - { - pDescriptorUpdateEntries = pDescriptorUpdateEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DescriptorUpdateTemplateCreateInfo & setDescriptorUpdateEntries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorUpdateEntries_ ) - VULKAN_HPP_NOEXCEPT - { - descriptorUpdateEntryCount = static_cast( descriptorUpdateEntries_.size() ); - pDescriptorUpdateEntries = descriptorUpdateEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & - setTemplateType( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ ) VULKAN_HPP_NOEXCEPT - { - templateType = templateType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & - setDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetLayout = descriptorSetLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & - setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT - { - pipelineLayout = pipelineLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setSet( uint32_t set_ ) VULKAN_HPP_NOEXCEPT - { - set = set_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDescriptorUpdateTemplateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDescriptorUpdateTemplateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, flags, descriptorUpdateEntryCount, pDescriptorUpdateEntries, templateType, descriptorSetLayout, pipelineBindPoint, pipelineLayout, set ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DescriptorUpdateTemplateCreateInfo const & ) const = default; -#else - bool operator==( DescriptorUpdateTemplateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( descriptorUpdateEntryCount == rhs.descriptorUpdateEntryCount ) && - ( pDescriptorUpdateEntries == rhs.pDescriptorUpdateEntries ) && ( templateType == rhs.templateType ) && - ( descriptorSetLayout == rhs.descriptorSetLayout ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipelineLayout == rhs.pipelineLayout ) && - ( set == rhs.set ); -# endif - } - - bool operator!=( DescriptorUpdateTemplateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags = {}; - uint32_t descriptorUpdateEntryCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries = {}; - VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet; - VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout = {}; - uint32_t set = {}; - }; - - template <> - struct CppType - { - using Type = DescriptorUpdateTemplateCreateInfo; - }; - using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; - - struct DeviceBufferMemoryRequirements - { - using NativeType = VkDeviceBufferMemoryRequirements; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceBufferMemoryRequirements; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pCreateInfo( pCreateInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceBufferMemoryRequirements( DeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceBufferMemoryRequirements( VkDeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceBufferMemoryRequirements( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceBufferMemoryRequirements & operator=( DeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceBufferMemoryRequirements & operator=( VkDeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceBufferMemoryRequirements & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceBufferMemoryRequirements & setPCreateInfo( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo_ ) VULKAN_HPP_NOEXCEPT - { - pCreateInfo = pCreateInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceBufferMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceBufferMemoryRequirements &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pCreateInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceBufferMemoryRequirements const & ) const = default; -#else - bool operator==( DeviceBufferMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pCreateInfo == rhs.pCreateInfo ); -# endif - } - - bool operator!=( DeviceBufferMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceBufferMemoryRequirements; - const void * pNext = {}; - const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo = {}; - }; - - template <> - struct CppType - { - using Type = DeviceBufferMemoryRequirements; - }; - using DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; - - struct DeviceQueueCreateInfo - { - using NativeType = VkDeviceQueueCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {}, - uint32_t queueFamilyIndex_ = {}, - uint32_t queueCount_ = {}, - const float * pQueuePriorities_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , queueCount( queueCount_ ) - , pQueuePriorities( pQueuePriorities_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( DeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceQueueCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_, - uint32_t queueFamilyIndex_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queuePriorities_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , queueCount( static_cast( queuePriorities_.size() ) ) - , pQueuePriorities( queuePriorities_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceQueueCreateInfo & operator=( DeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueCreateInfo & operator=( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndex = queueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setQueueCount( uint32_t queueCount_ ) VULKAN_HPP_NOEXCEPT - { - queueCount = queueCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setPQueuePriorities( const float * pQueuePriorities_ ) VULKAN_HPP_NOEXCEPT - { - pQueuePriorities = pQueuePriorities_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceQueueCreateInfo & setQueuePriorities( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queuePriorities_ ) VULKAN_HPP_NOEXCEPT - { - queueCount = static_cast( queuePriorities_.size() ); - pQueuePriorities = queuePriorities_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceQueueCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceQueueCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, queueFamilyIndex, queueCount, pQueuePriorities ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceQueueCreateInfo const & ) const = default; -#else - bool operator==( DeviceQueueCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && - ( queueCount == rhs.queueCount ) && ( pQueuePriorities == rhs.pQueuePriorities ); -# endif - } - - bool operator!=( DeviceQueueCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {}; - uint32_t queueFamilyIndex = {}; - uint32_t queueCount = {}; - const float * pQueuePriorities = {}; - }; - - template <> - struct CppType - { - using Type = DeviceQueueCreateInfo; - }; - - struct PhysicalDeviceFeatures - { - using NativeType = VkPhysicalDeviceFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 independentBlend_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 geometryShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 tessellationShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 logicOp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthClamp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthBounds_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 wideLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 largePoints_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 alphaToOne_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiViewport_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInt64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInt16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseBinding_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries_ = {} ) VULKAN_HPP_NOEXCEPT - : robustBufferAccess( robustBufferAccess_ ) - , fullDrawIndexUint32( fullDrawIndexUint32_ ) - , imageCubeArray( imageCubeArray_ ) - , independentBlend( independentBlend_ ) - , geometryShader( geometryShader_ ) - , tessellationShader( tessellationShader_ ) - , sampleRateShading( sampleRateShading_ ) - , dualSrcBlend( dualSrcBlend_ ) - , logicOp( logicOp_ ) - , multiDrawIndirect( multiDrawIndirect_ ) - , drawIndirectFirstInstance( drawIndirectFirstInstance_ ) - , depthClamp( depthClamp_ ) - , depthBiasClamp( depthBiasClamp_ ) - , fillModeNonSolid( fillModeNonSolid_ ) - , depthBounds( depthBounds_ ) - , wideLines( wideLines_ ) - , largePoints( largePoints_ ) - , alphaToOne( alphaToOne_ ) - , multiViewport( multiViewport_ ) - , samplerAnisotropy( samplerAnisotropy_ ) - , textureCompressionETC2( textureCompressionETC2_ ) - , textureCompressionASTC_LDR( textureCompressionASTC_LDR_ ) - , textureCompressionBC( textureCompressionBC_ ) - , occlusionQueryPrecise( occlusionQueryPrecise_ ) - , pipelineStatisticsQuery( pipelineStatisticsQuery_ ) - , vertexPipelineStoresAndAtomics( vertexPipelineStoresAndAtomics_ ) - , fragmentStoresAndAtomics( fragmentStoresAndAtomics_ ) - , shaderTessellationAndGeometryPointSize( shaderTessellationAndGeometryPointSize_ ) - , shaderImageGatherExtended( shaderImageGatherExtended_ ) - , shaderStorageImageExtendedFormats( shaderStorageImageExtendedFormats_ ) - , shaderStorageImageMultisample( shaderStorageImageMultisample_ ) - , shaderStorageImageReadWithoutFormat( shaderStorageImageReadWithoutFormat_ ) - , shaderStorageImageWriteWithoutFormat( shaderStorageImageWriteWithoutFormat_ ) - , shaderUniformBufferArrayDynamicIndexing( shaderUniformBufferArrayDynamicIndexing_ ) - , shaderSampledImageArrayDynamicIndexing( shaderSampledImageArrayDynamicIndexing_ ) - , shaderStorageBufferArrayDynamicIndexing( shaderStorageBufferArrayDynamicIndexing_ ) - , shaderStorageImageArrayDynamicIndexing( shaderStorageImageArrayDynamicIndexing_ ) - , shaderClipDistance( shaderClipDistance_ ) - , shaderCullDistance( shaderCullDistance_ ) - , shaderFloat64( shaderFloat64_ ) - , shaderInt64( shaderInt64_ ) - , shaderInt16( shaderInt16_ ) - , shaderResourceResidency( shaderResourceResidency_ ) - , shaderResourceMinLod( shaderResourceMinLod_ ) - , sparseBinding( sparseBinding_ ) - , sparseResidencyBuffer( sparseResidencyBuffer_ ) - , sparseResidencyImage2D( sparseResidencyImage2D_ ) - , sparseResidencyImage3D( sparseResidencyImage3D_ ) - , sparseResidency2Samples( sparseResidency2Samples_ ) - , sparseResidency4Samples( sparseResidency4Samples_ ) - , sparseResidency8Samples( sparseResidency8Samples_ ) - , sparseResidency16Samples( sparseResidency16Samples_ ) - , sparseResidencyAliased( sparseResidencyAliased_ ) - , variableMultisampleRate( variableMultisampleRate_ ) - , inheritedQueries( inheritedQueries_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures( PhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFeatures( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFeatures & operator=( PhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFeatures & operator=( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ ) VULKAN_HPP_NOEXCEPT - { - robustBufferAccess = robustBufferAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFullDrawIndexUint32( VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32_ ) VULKAN_HPP_NOEXCEPT - { - fullDrawIndexUint32 = fullDrawIndexUint32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setImageCubeArray( VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray_ ) VULKAN_HPP_NOEXCEPT - { - imageCubeArray = imageCubeArray_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setIndependentBlend( VULKAN_HPP_NAMESPACE::Bool32 independentBlend_ ) VULKAN_HPP_NOEXCEPT - { - independentBlend = independentBlend_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 geometryShader_ ) VULKAN_HPP_NOEXCEPT - { - geometryShader = geometryShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 tessellationShader_ ) VULKAN_HPP_NOEXCEPT - { - tessellationShader = tessellationShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSampleRateShading( VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading_ ) VULKAN_HPP_NOEXCEPT - { - sampleRateShading = sampleRateShading_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDualSrcBlend( VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend_ ) VULKAN_HPP_NOEXCEPT - { - dualSrcBlend = dualSrcBlend_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setLogicOp( VULKAN_HPP_NAMESPACE::Bool32 logicOp_ ) VULKAN_HPP_NOEXCEPT - { - logicOp = logicOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setMultiDrawIndirect( VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect_ ) VULKAN_HPP_NOEXCEPT - { - multiDrawIndirect = multiDrawIndirect_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDrawIndirectFirstInstance( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance_ ) VULKAN_HPP_NOEXCEPT - { - drawIndirectFirstInstance = drawIndirectFirstInstance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthClamp( VULKAN_HPP_NAMESPACE::Bool32 depthClamp_ ) VULKAN_HPP_NOEXCEPT - { - depthClamp = depthClamp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthBiasClamp( VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT - { - depthBiasClamp = depthBiasClamp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFillModeNonSolid( VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid_ ) VULKAN_HPP_NOEXCEPT - { - fillModeNonSolid = fillModeNonSolid_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthBounds( VULKAN_HPP_NAMESPACE::Bool32 depthBounds_ ) VULKAN_HPP_NOEXCEPT - { - depthBounds = depthBounds_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setWideLines( VULKAN_HPP_NAMESPACE::Bool32 wideLines_ ) VULKAN_HPP_NOEXCEPT - { - wideLines = wideLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setLargePoints( VULKAN_HPP_NAMESPACE::Bool32 largePoints_ ) VULKAN_HPP_NOEXCEPT - { - largePoints = largePoints_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setAlphaToOne( VULKAN_HPP_NAMESPACE::Bool32 alphaToOne_ ) VULKAN_HPP_NOEXCEPT - { - alphaToOne = alphaToOne_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setMultiViewport( VULKAN_HPP_NAMESPACE::Bool32 multiViewport_ ) VULKAN_HPP_NOEXCEPT - { - multiViewport = multiViewport_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSamplerAnisotropy( VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy_ ) VULKAN_HPP_NOEXCEPT - { - samplerAnisotropy = samplerAnisotropy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTextureCompressionETC2( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2_ ) VULKAN_HPP_NOEXCEPT - { - textureCompressionETC2 = textureCompressionETC2_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setTextureCompressionASTC_LDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR_ ) VULKAN_HPP_NOEXCEPT - { - textureCompressionASTC_LDR = textureCompressionASTC_LDR_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTextureCompressionBC( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC_ ) VULKAN_HPP_NOEXCEPT - { - textureCompressionBC = textureCompressionBC_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setOcclusionQueryPrecise( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise_ ) VULKAN_HPP_NOEXCEPT - { - occlusionQueryPrecise = occlusionQueryPrecise_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setPipelineStatisticsQuery( VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery_ ) VULKAN_HPP_NOEXCEPT - { - pipelineStatisticsQuery = pipelineStatisticsQuery_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setVertexPipelineStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT - { - vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFragmentStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT - { - fragmentStoresAndAtomics = fragmentStoresAndAtomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderTessellationAndGeometryPointSize( VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize_ ) VULKAN_HPP_NOEXCEPT - { - shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderImageGatherExtended( VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended_ ) VULKAN_HPP_NOEXCEPT - { - shaderImageGatherExtended = shaderImageGatherExtended_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageImageExtendedFormats( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageImageMultisample( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageMultisample = shaderStorageImageMultisample_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageImageReadWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageImageWriteWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderUniformBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderSampledImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & - setShaderStorageImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderClipDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance_ ) VULKAN_HPP_NOEXCEPT - { - shaderClipDistance = shaderClipDistance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderCullDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance_ ) VULKAN_HPP_NOEXCEPT - { - shaderCullDistance = shaderCullDistance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64_ ) VULKAN_HPP_NOEXCEPT - { - shaderFloat64 = shaderFloat64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderInt64( VULKAN_HPP_NAMESPACE::Bool32 shaderInt64_ ) VULKAN_HPP_NOEXCEPT - { - shaderInt64 = shaderInt64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderInt16( VULKAN_HPP_NAMESPACE::Bool32 shaderInt16_ ) VULKAN_HPP_NOEXCEPT - { - shaderInt16 = shaderInt16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderResourceResidency( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency_ ) VULKAN_HPP_NOEXCEPT - { - shaderResourceResidency = shaderResourceResidency_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderResourceMinLod( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod_ ) VULKAN_HPP_NOEXCEPT - { - shaderResourceMinLod = shaderResourceMinLod_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseBinding( VULKAN_HPP_NAMESPACE::Bool32 sparseBinding_ ) VULKAN_HPP_NOEXCEPT - { - sparseBinding = sparseBinding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyBuffer( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidencyBuffer = sparseResidencyBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyImage2D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidencyImage2D = sparseResidencyImage2D_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyImage3D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidencyImage3D = sparseResidencyImage3D_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency2Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidency2Samples = sparseResidency2Samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency4Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidency4Samples = sparseResidency4Samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency8Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidency8Samples = sparseResidency8Samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency16Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidency16Samples = sparseResidency16Samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyAliased( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased_ ) VULKAN_HPP_NOEXCEPT - { - sparseResidencyAliased = sparseResidencyAliased_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setVariableMultisampleRate( VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate_ ) VULKAN_HPP_NOEXCEPT - { - variableMultisampleRate = variableMultisampleRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setInheritedQueries( VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries_ ) VULKAN_HPP_NOEXCEPT - { - inheritedQueries = inheritedQueries_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( robustBufferAccess, - fullDrawIndexUint32, - imageCubeArray, - independentBlend, - geometryShader, - tessellationShader, - sampleRateShading, - dualSrcBlend, - logicOp, - multiDrawIndirect, - drawIndirectFirstInstance, - depthClamp, - depthBiasClamp, - fillModeNonSolid, - depthBounds, - wideLines, - largePoints, - alphaToOne, - multiViewport, - samplerAnisotropy, - textureCompressionETC2, - textureCompressionASTC_LDR, - textureCompressionBC, - occlusionQueryPrecise, - pipelineStatisticsQuery, - vertexPipelineStoresAndAtomics, - fragmentStoresAndAtomics, - shaderTessellationAndGeometryPointSize, - shaderImageGatherExtended, - shaderStorageImageExtendedFormats, - shaderStorageImageMultisample, - shaderStorageImageReadWithoutFormat, - shaderStorageImageWriteWithoutFormat, - shaderUniformBufferArrayDynamicIndexing, - shaderSampledImageArrayDynamicIndexing, - shaderStorageBufferArrayDynamicIndexing, - shaderStorageImageArrayDynamicIndexing, - shaderClipDistance, - shaderCullDistance, - shaderFloat64, - shaderInt64, - shaderInt16, - shaderResourceResidency, - shaderResourceMinLod, - sparseBinding, - sparseResidencyBuffer, - sparseResidencyImage2D, - sparseResidencyImage3D, - sparseResidency2Samples, - sparseResidency4Samples, - sparseResidency8Samples, - sparseResidency16Samples, - sparseResidencyAliased, - variableMultisampleRate, - inheritedQueries ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( robustBufferAccess == rhs.robustBufferAccess ) && ( fullDrawIndexUint32 == rhs.fullDrawIndexUint32 ) && - ( imageCubeArray == rhs.imageCubeArray ) && ( independentBlend == rhs.independentBlend ) && ( geometryShader == rhs.geometryShader ) && - ( tessellationShader == rhs.tessellationShader ) && ( sampleRateShading == rhs.sampleRateShading ) && ( dualSrcBlend == rhs.dualSrcBlend ) && - ( logicOp == rhs.logicOp ) && ( multiDrawIndirect == rhs.multiDrawIndirect ) && ( drawIndirectFirstInstance == rhs.drawIndirectFirstInstance ) && - ( depthClamp == rhs.depthClamp ) && ( depthBiasClamp == rhs.depthBiasClamp ) && ( fillModeNonSolid == rhs.fillModeNonSolid ) && - ( depthBounds == rhs.depthBounds ) && ( wideLines == rhs.wideLines ) && ( largePoints == rhs.largePoints ) && ( alphaToOne == rhs.alphaToOne ) && - ( multiViewport == rhs.multiViewport ) && ( samplerAnisotropy == rhs.samplerAnisotropy ) && - ( textureCompressionETC2 == rhs.textureCompressionETC2 ) && ( textureCompressionASTC_LDR == rhs.textureCompressionASTC_LDR ) && - ( textureCompressionBC == rhs.textureCompressionBC ) && ( occlusionQueryPrecise == rhs.occlusionQueryPrecise ) && - ( pipelineStatisticsQuery == rhs.pipelineStatisticsQuery ) && ( vertexPipelineStoresAndAtomics == rhs.vertexPipelineStoresAndAtomics ) && - ( fragmentStoresAndAtomics == rhs.fragmentStoresAndAtomics ) && - ( shaderTessellationAndGeometryPointSize == rhs.shaderTessellationAndGeometryPointSize ) && - ( shaderImageGatherExtended == rhs.shaderImageGatherExtended ) && ( shaderStorageImageExtendedFormats == rhs.shaderStorageImageExtendedFormats ) && - ( shaderStorageImageMultisample == rhs.shaderStorageImageMultisample ) && - ( shaderStorageImageReadWithoutFormat == rhs.shaderStorageImageReadWithoutFormat ) && - ( shaderStorageImageWriteWithoutFormat == rhs.shaderStorageImageWriteWithoutFormat ) && - ( shaderUniformBufferArrayDynamicIndexing == rhs.shaderUniformBufferArrayDynamicIndexing ) && - ( shaderSampledImageArrayDynamicIndexing == rhs.shaderSampledImageArrayDynamicIndexing ) && - ( shaderStorageBufferArrayDynamicIndexing == rhs.shaderStorageBufferArrayDynamicIndexing ) && - ( shaderStorageImageArrayDynamicIndexing == rhs.shaderStorageImageArrayDynamicIndexing ) && ( shaderClipDistance == rhs.shaderClipDistance ) && - ( shaderCullDistance == rhs.shaderCullDistance ) && ( shaderFloat64 == rhs.shaderFloat64 ) && ( shaderInt64 == rhs.shaderInt64 ) && - ( shaderInt16 == rhs.shaderInt16 ) && ( shaderResourceResidency == rhs.shaderResourceResidency ) && - ( shaderResourceMinLod == rhs.shaderResourceMinLod ) && ( sparseBinding == rhs.sparseBinding ) && - ( sparseResidencyBuffer == rhs.sparseResidencyBuffer ) && ( sparseResidencyImage2D == rhs.sparseResidencyImage2D ) && - ( sparseResidencyImage3D == rhs.sparseResidencyImage3D ) && ( sparseResidency2Samples == rhs.sparseResidency2Samples ) && - ( sparseResidency4Samples == rhs.sparseResidency4Samples ) && ( sparseResidency8Samples == rhs.sparseResidency8Samples ) && - ( sparseResidency16Samples == rhs.sparseResidency16Samples ) && ( sparseResidencyAliased == rhs.sparseResidencyAliased ) && - ( variableMultisampleRate == rhs.variableMultisampleRate ) && ( inheritedQueries == rhs.inheritedQueries ); -# endif - } - - bool operator!=( PhysicalDeviceFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray = {}; - VULKAN_HPP_NAMESPACE::Bool32 independentBlend = {}; - VULKAN_HPP_NAMESPACE::Bool32 geometryShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 tessellationShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading = {}; - VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend = {}; - VULKAN_HPP_NAMESPACE::Bool32 logicOp = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect = {}; - VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClamp = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp = {}; - VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthBounds = {}; - VULKAN_HPP_NAMESPACE::Bool32 wideLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 largePoints = {}; - VULKAN_HPP_NAMESPACE::Bool32 alphaToOne = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiViewport = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2 = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC = {}; - VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInt64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInt16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseBinding = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased = {}; - VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate = {}; - VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries = {}; - }; - - struct DeviceCreateInfo - { - using NativeType = VkDeviceCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceCreateInfo( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_ = {}, - uint32_t queueCreateInfoCount_ = {}, - const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos_ = {}, - uint32_t enabledLayerCount_ = {}, - const char * const * ppEnabledLayerNames_ = {}, - uint32_t enabledExtensionCount_ = {}, - const char * const * ppEnabledExtensionNames_ = {}, - const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , queueCreateInfoCount( queueCreateInfoCount_ ) - , pQueueCreateInfos( pQueueCreateInfos_ ) - , enabledLayerCount( enabledLayerCount_ ) - , ppEnabledLayerNames( ppEnabledLayerNames_ ) - , enabledExtensionCount( enabledExtensionCount_ ) - , ppEnabledExtensionNames( ppEnabledExtensionNames_ ) - , pEnabledFeatures( pEnabledFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceCreateInfo( DeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceCreateInfo( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceCreateInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceCreateInfo( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueCreateInfos_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {}, - const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , queueCreateInfoCount( static_cast( queueCreateInfos_.size() ) ) - , pQueueCreateInfos( queueCreateInfos_.data() ) - , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) - , ppEnabledLayerNames( pEnabledLayerNames_.data() ) - , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) - , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) - , pEnabledFeatures( pEnabledFeatures_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceCreateInfo & operator=( DeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceCreateInfo & operator=( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setQueueCreateInfoCount( uint32_t queueCreateInfoCount_ ) VULKAN_HPP_NOEXCEPT - { - queueCreateInfoCount = queueCreateInfoCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & - setPQueueCreateInfos( const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos_ ) VULKAN_HPP_NOEXCEPT - { - pQueueCreateInfos = pQueueCreateInfos_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceCreateInfo & setQueueCreateInfos( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueCreateInfos_ ) VULKAN_HPP_NOEXCEPT - { - queueCreateInfoCount = static_cast( queueCreateInfos_.size() ); - pQueueCreateInfos = queueCreateInfos_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setEnabledLayerCount( uint32_t enabledLayerCount_ ) VULKAN_HPP_NOEXCEPT - { - enabledLayerCount = enabledLayerCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPpEnabledLayerNames( const char * const * ppEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT - { - ppEnabledLayerNames = ppEnabledLayerNames_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceCreateInfo & - setPEnabledLayerNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT - { - enabledLayerCount = static_cast( pEnabledLayerNames_.size() ); - ppEnabledLayerNames = pEnabledLayerNames_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT - { - enabledExtensionCount = enabledExtensionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPpEnabledExtensionNames( const char * const * ppEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT - { - ppEnabledExtensionNames = ppEnabledExtensionNames_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceCreateInfo & - setPEnabledExtensionNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT - { - enabledExtensionCount = static_cast( pEnabledExtensionNames_.size() ); - ppEnabledExtensionNames = pEnabledExtensionNames_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPEnabledFeatures( const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ ) VULKAN_HPP_NOEXCEPT - { - pEnabledFeatures = pEnabledFeatures_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - queueCreateInfoCount, - pQueueCreateInfos, - enabledLayerCount, - ppEnabledLayerNames, - enabledExtensionCount, - ppEnabledExtensionNames, - pEnabledFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = queueCreateInfoCount <=> rhs.queueCreateInfoCount; cmp != 0 ) - return cmp; - if ( auto cmp = pQueueCreateInfos <=> rhs.pQueueCreateInfos; cmp != 0 ) - return cmp; - if ( auto cmp = enabledLayerCount <=> rhs.enabledLayerCount; cmp != 0 ) - return cmp; - for ( size_t i = 0; i < enabledLayerCount; ++i ) - { - if ( ppEnabledLayerNames[i] != rhs.ppEnabledLayerNames[i] ) - if ( auto cmp = strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ); cmp != 0 ) - return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; - } - if ( auto cmp = enabledExtensionCount <=> rhs.enabledExtensionCount; cmp != 0 ) - return cmp; - for ( size_t i = 0; i < enabledExtensionCount; ++i ) - { - if ( ppEnabledExtensionNames[i] != rhs.ppEnabledExtensionNames[i] ) - if ( auto cmp = strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ); cmp != 0 ) - return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; - } - if ( auto cmp = pEnabledFeatures <=> rhs.pEnabledFeatures; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueCreateInfoCount == rhs.queueCreateInfoCount ) && - ( pQueueCreateInfos == rhs.pQueueCreateInfos ) && ( enabledLayerCount == rhs.enabledLayerCount ) && - [this, rhs] - { - bool equal = true; - for ( size_t i = 0; equal && ( i < enabledLayerCount ); ++i ) - { - equal = ( ( ppEnabledLayerNames[i] == rhs.ppEnabledLayerNames[i] ) || ( strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ) == 0 ) ); - } - return equal; - }() && ( enabledExtensionCount == rhs.enabledExtensionCount ) && - [this, rhs] - { - bool equal = true; - for ( size_t i = 0; equal && ( i < enabledExtensionCount ); ++i ) - { - equal = ( ( ppEnabledExtensionNames[i] == rhs.ppEnabledExtensionNames[i] ) || - ( strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ) == 0 ) ); - } - return equal; - }() && ( pEnabledFeatures == rhs.pEnabledFeatures ); - } - - bool operator!=( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags = {}; - uint32_t queueCreateInfoCount = {}; - const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos = {}; - uint32_t enabledLayerCount = {}; - const char * const * ppEnabledLayerNames = {}; - uint32_t enabledExtensionCount = {}; - const char * const * ppEnabledExtensionNames = {}; - const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures = {}; - }; - - template <> - struct CppType - { - using Type = DeviceCreateInfo; - }; - - struct DeviceDeviceMemoryReportCreateInfoEXT - { - using NativeType = VkDeviceDeviceMemoryReportCreateInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceDeviceMemoryReportCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceDeviceMemoryReportCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ = {}, - PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback_ = {}, - void * pUserData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pfnUserCallback( pfnUserCallback_ ) - , pUserData( pUserData_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceDeviceMemoryReportCreateInfoEXT( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceDeviceMemoryReportCreateInfoEXT( VkDeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceDeviceMemoryReportCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceDeviceMemoryReportCreateInfoEXT & operator=( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceDeviceMemoryReportCreateInfoEXT & operator=( VkDeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & - setPfnUserCallback( PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT - { - pfnUserCallback = pfnUserCallback_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT - { - pUserData = pUserData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceDeviceMemoryReportCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceDeviceMemoryReportCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pfnUserCallback, pUserData ); - } -#endif - - bool operator==( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -#if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -#else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnUserCallback == rhs.pfnUserCallback ) && - ( pUserData == rhs.pUserData ); -#endif - } - - bool operator!=( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceDeviceMemoryReportCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags = {}; - PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback = {}; - void * pUserData = {}; - }; - - template <> - struct CppType - { - using Type = DeviceDeviceMemoryReportCreateInfoEXT; - }; - - struct DeviceDiagnosticsConfigCreateInfoNV - { - using NativeType = VkDeviceDiagnosticsConfigCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceDiagnosticsConfigCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigCreateInfoNV( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigCreateInfoNV( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceDiagnosticsConfigCreateInfoNV( VkDeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceDiagnosticsConfigCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceDiagnosticsConfigCreateInfoNV & operator=( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceDiagnosticsConfigCreateInfoNV & operator=( VkDeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceDiagnosticsConfigCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceDiagnosticsConfigCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceDiagnosticsConfigCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceDiagnosticsConfigCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceDiagnosticsConfigCreateInfoNV const & ) const = default; -#else - bool operator==( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceDiagnosticsConfigCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags = {}; - }; - - template <> - struct CppType - { - using Type = DeviceDiagnosticsConfigCreateInfoNV; - }; - - struct DeviceEventInfoEXT - { - using NativeType = VkDeviceEventInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceEventInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceEvent( deviceEvent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( DeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceEventInfoEXT( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceEventInfoEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceEventInfoEXT & operator=( DeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceEventInfoEXT & operator=( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceEventInfoEXT & setDeviceEvent( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ ) VULKAN_HPP_NOEXCEPT - { - deviceEvent = deviceEvent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceEventInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceEvent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceEventInfoEXT const & ) const = default; -#else - bool operator==( DeviceEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceEvent == rhs.deviceEvent ); -# endif - } - - bool operator!=( DeviceEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceEventInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug; - }; - - template <> - struct CppType - { - using Type = DeviceEventInfoEXT; - }; - - struct DeviceGroupBindSparseInfo - { - using NativeType = VkDeviceGroupBindSparseInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupBindSparseInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = {}, uint32_t memoryDeviceIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , resourceDeviceIndex( resourceDeviceIndex_ ) - , memoryDeviceIndex( memoryDeviceIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( DeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupBindSparseInfo( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupBindSparseInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupBindSparseInfo & operator=( DeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupBindSparseInfo & operator=( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setResourceDeviceIndex( uint32_t resourceDeviceIndex_ ) VULKAN_HPP_NOEXCEPT - { - resourceDeviceIndex = resourceDeviceIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setMemoryDeviceIndex( uint32_t memoryDeviceIndex_ ) VULKAN_HPP_NOEXCEPT - { - memoryDeviceIndex = memoryDeviceIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupBindSparseInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, resourceDeviceIndex, memoryDeviceIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupBindSparseInfo const & ) const = default; -#else - bool operator==( DeviceGroupBindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( resourceDeviceIndex == rhs.resourceDeviceIndex ) && - ( memoryDeviceIndex == rhs.memoryDeviceIndex ); -# endif - } - - bool operator!=( DeviceGroupBindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupBindSparseInfo; - const void * pNext = {}; - uint32_t resourceDeviceIndex = {}; - uint32_t memoryDeviceIndex = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupBindSparseInfo; - }; - using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; - - struct DeviceGroupCommandBufferBeginInfo - { - using NativeType = VkDeviceGroupCommandBufferBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupCommandBufferBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceMask( deviceMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( DeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupCommandBufferBeginInfo( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupCommandBufferBeginInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupCommandBufferBeginInfo & operator=( DeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupCommandBufferBeginInfo & operator=( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupCommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupCommandBufferBeginInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT - { - deviceMask = deviceMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupCommandBufferBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupCommandBufferBeginInfo const & ) const = default; -#else - bool operator==( DeviceGroupCommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMask == rhs.deviceMask ); -# endif - } - - bool operator!=( DeviceGroupCommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfo; - const void * pNext = {}; - uint32_t deviceMask = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupCommandBufferBeginInfo; - }; - using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; - - struct DeviceGroupDeviceCreateInfo - { - using NativeType = VkDeviceGroupDeviceCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupDeviceCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = {}, - const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , physicalDeviceCount( physicalDeviceCount_ ) - , pPhysicalDevices( pPhysicalDevices_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( DeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupDeviceCreateInfo( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupDeviceCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupDeviceCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & physicalDevices_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), physicalDeviceCount( static_cast( physicalDevices_.size() ) ), pPhysicalDevices( physicalDevices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupDeviceCreateInfo & operator=( DeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupDeviceCreateInfo & operator=( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & setPhysicalDeviceCount( uint32_t physicalDeviceCount_ ) VULKAN_HPP_NOEXCEPT - { - physicalDeviceCount = physicalDeviceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & - setPPhysicalDevices( const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices_ ) VULKAN_HPP_NOEXCEPT - { - pPhysicalDevices = pPhysicalDevices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupDeviceCreateInfo & setPhysicalDevices( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & physicalDevices_ ) VULKAN_HPP_NOEXCEPT - { - physicalDeviceCount = static_cast( physicalDevices_.size() ); - pPhysicalDevices = physicalDevices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupDeviceCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, physicalDeviceCount, pPhysicalDevices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupDeviceCreateInfo const & ) const = default; -#else - bool operator==( DeviceGroupDeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( physicalDeviceCount == rhs.physicalDeviceCount ) && - ( pPhysicalDevices == rhs.pPhysicalDevices ); -# endif - } - - bool operator!=( DeviceGroupDeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupDeviceCreateInfo; - const void * pNext = {}; - uint32_t physicalDeviceCount = {}; - const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupDeviceCreateInfo; - }; - using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; - - struct DeviceGroupPresentCapabilitiesKHR - { - using NativeType = VkDeviceGroupPresentCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupPresentCapabilitiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentCapabilitiesKHR( std::array const & presentMask_ = {}, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , presentMask( presentMask_ ) - , modes( modes_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentCapabilitiesKHR( DeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupPresentCapabilitiesKHR( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupPresentCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupPresentCapabilitiesKHR & operator=( DeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupPresentCapabilitiesKHR & operator=( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDeviceGroupPresentCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupPresentCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, presentMask, modes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupPresentCapabilitiesKHR const & ) const = default; -#else - bool operator==( DeviceGroupPresentCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentMask == rhs.presentMask ) && ( modes == rhs.modes ); -# endif - } - - bool operator!=( DeviceGroupPresentCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D presentMask = {}; - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupPresentCapabilitiesKHR; - }; - - struct DeviceGroupPresentInfoKHR - { - using NativeType = VkDeviceGroupPresentInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupPresentInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( - uint32_t swapchainCount_ = {}, - const uint32_t * pDeviceMasks_ = {}, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchainCount( swapchainCount_ ) - , pDeviceMasks( pDeviceMasks_ ) - , mode( mode_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( DeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupPresentInfoKHR( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupPresentInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupPresentInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceMasks_, - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), swapchainCount( static_cast( deviceMasks_.size() ) ), pDeviceMasks( deviceMasks_.data() ), mode( mode_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupPresentInfoKHR & operator=( DeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupPresentInfoKHR & operator=( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = swapchainCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setPDeviceMasks( const uint32_t * pDeviceMasks_ ) VULKAN_HPP_NOEXCEPT - { - pDeviceMasks = pDeviceMasks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupPresentInfoKHR & setDeviceMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceMasks_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( deviceMasks_.size() ); - pDeviceMasks = deviceMasks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setMode( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupPresentInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchainCount, pDeviceMasks, mode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupPresentInfoKHR const & ) const = default; -#else - bool operator==( DeviceGroupPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pDeviceMasks == rhs.pDeviceMasks ) && - ( mode == rhs.mode ); -# endif - } - - bool operator!=( DeviceGroupPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentInfoKHR; - const void * pNext = {}; - uint32_t swapchainCount = {}; - const uint32_t * pDeviceMasks = {}; - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal; - }; - - template <> - struct CppType - { - using Type = DeviceGroupPresentInfoKHR; - }; - - struct DeviceGroupRenderPassBeginInfo - { - using NativeType = VkDeviceGroupRenderPassBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupRenderPassBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = {}, - uint32_t deviceRenderAreaCount_ = {}, - const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceMask( deviceMask_ ) - , deviceRenderAreaCount( deviceRenderAreaCount_ ) - , pDeviceRenderAreas( pDeviceRenderAreas_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( DeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupRenderPassBeginInfo( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupRenderPassBeginInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceRenderAreas_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , deviceMask( deviceMask_ ) - , deviceRenderAreaCount( static_cast( deviceRenderAreas_.size() ) ) - , pDeviceRenderAreas( deviceRenderAreas_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupRenderPassBeginInfo & operator=( DeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupRenderPassBeginInfo & operator=( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT - { - deviceMask = deviceMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setDeviceRenderAreaCount( uint32_t deviceRenderAreaCount_ ) VULKAN_HPP_NOEXCEPT - { - deviceRenderAreaCount = deviceRenderAreaCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & - setPDeviceRenderAreas( const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT - { - pDeviceRenderAreas = pDeviceRenderAreas_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupRenderPassBeginInfo & - setDeviceRenderAreas( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT - { - deviceRenderAreaCount = static_cast( deviceRenderAreas_.size() ); - pDeviceRenderAreas = deviceRenderAreas_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupRenderPassBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceMask, deviceRenderAreaCount, pDeviceRenderAreas ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupRenderPassBeginInfo const & ) const = default; -#else - bool operator==( DeviceGroupRenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMask == rhs.deviceMask ) && ( deviceRenderAreaCount == rhs.deviceRenderAreaCount ) && - ( pDeviceRenderAreas == rhs.pDeviceRenderAreas ); -# endif - } - - bool operator!=( DeviceGroupRenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfo; - const void * pNext = {}; - uint32_t deviceMask = {}; - uint32_t deviceRenderAreaCount = {}; - const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupRenderPassBeginInfo; - }; - using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; - - struct DeviceGroupSubmitInfo - { - using NativeType = VkDeviceGroupSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( uint32_t waitSemaphoreCount_ = {}, - const uint32_t * pWaitSemaphoreDeviceIndices_ = {}, - uint32_t commandBufferCount_ = {}, - const uint32_t * pCommandBufferDeviceMasks_ = {}, - uint32_t signalSemaphoreCount_ = {}, - const uint32_t * pSignalSemaphoreDeviceIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreCount( waitSemaphoreCount_ ) - , pWaitSemaphoreDeviceIndices( pWaitSemaphoreDeviceIndices_ ) - , commandBufferCount( commandBufferCount_ ) - , pCommandBufferDeviceMasks( pCommandBufferDeviceMasks_ ) - , signalSemaphoreCount( signalSemaphoreCount_ ) - , pSignalSemaphoreDeviceIndices( pSignalSemaphoreDeviceIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( DeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupSubmitInfo( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupSubmitInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupSubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreDeviceIndices_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferDeviceMasks_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreDeviceIndices_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreCount( static_cast( waitSemaphoreDeviceIndices_.size() ) ) - , pWaitSemaphoreDeviceIndices( waitSemaphoreDeviceIndices_.data() ) - , commandBufferCount( static_cast( commandBufferDeviceMasks_.size() ) ) - , pCommandBufferDeviceMasks( commandBufferDeviceMasks_.data() ) - , signalSemaphoreCount( static_cast( signalSemaphoreDeviceIndices_.size() ) ) - , pSignalSemaphoreDeviceIndices( signalSemaphoreDeviceIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupSubmitInfo & operator=( DeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupSubmitInfo & operator=( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = waitSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPWaitSemaphoreDeviceIndices( const uint32_t * pWaitSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphoreDeviceIndices = pWaitSemaphoreDeviceIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupSubmitInfo & - setWaitSemaphoreDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = static_cast( waitSemaphoreDeviceIndices_.size() ); - pWaitSemaphoreDeviceIndices = waitSemaphoreDeviceIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferCount = commandBufferCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPCommandBufferDeviceMasks( const uint32_t * pCommandBufferDeviceMasks_ ) VULKAN_HPP_NOEXCEPT - { - pCommandBufferDeviceMasks = pCommandBufferDeviceMasks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupSubmitInfo & - setCommandBufferDeviceMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferDeviceMasks_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferCount = static_cast( commandBufferDeviceMasks_.size() ); - pCommandBufferDeviceMasks = commandBufferDeviceMasks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = signalSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPSignalSemaphoreDeviceIndices( const uint32_t * pSignalSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphoreDeviceIndices = pSignalSemaphoreDeviceIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DeviceGroupSubmitInfo & - setSignalSemaphoreDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = static_cast( signalSemaphoreDeviceIndices_.size() ); - pSignalSemaphoreDeviceIndices = signalSemaphoreDeviceIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - waitSemaphoreCount, - pWaitSemaphoreDeviceIndices, - commandBufferCount, - pCommandBufferDeviceMasks, - signalSemaphoreCount, - pSignalSemaphoreDeviceIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupSubmitInfo const & ) const = default; -#else - bool operator==( DeviceGroupSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && - ( pWaitSemaphoreDeviceIndices == rhs.pWaitSemaphoreDeviceIndices ) && ( commandBufferCount == rhs.commandBufferCount ) && - ( pCommandBufferDeviceMasks == rhs.pCommandBufferDeviceMasks ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && - ( pSignalSemaphoreDeviceIndices == rhs.pSignalSemaphoreDeviceIndices ); -# endif - } - - bool operator!=( DeviceGroupSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupSubmitInfo; - const void * pNext = {}; - uint32_t waitSemaphoreCount = {}; - const uint32_t * pWaitSemaphoreDeviceIndices = {}; - uint32_t commandBufferCount = {}; - const uint32_t * pCommandBufferDeviceMasks = {}; - uint32_t signalSemaphoreCount = {}; - const uint32_t * pSignalSemaphoreDeviceIndices = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupSubmitInfo; - }; - using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; - - struct DeviceGroupSwapchainCreateInfoKHR - { - using NativeType = VkDeviceGroupSwapchainCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupSwapchainCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , modes( modes_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( DeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupSwapchainCreateInfoKHR( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceGroupSwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceGroupSwapchainCreateInfoKHR & operator=( DeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceGroupSwapchainCreateInfoKHR & operator=( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceGroupSwapchainCreateInfoKHR & setModes( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ ) VULKAN_HPP_NOEXCEPT - { - modes = modes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceGroupSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceGroupSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, modes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceGroupSwapchainCreateInfoKHR const & ) const = default; -#else - bool operator==( DeviceGroupSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( modes == rhs.modes ); -# endif - } - - bool operator!=( DeviceGroupSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {}; - }; - - template <> - struct CppType - { - using Type = DeviceGroupSwapchainCreateInfoKHR; - }; - - struct ImageCreateInfo - { - using NativeType = VkImageCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ImageType imageType_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, - uint32_t mipLevels_ = {}, - uint32_t arrayLayers_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, - uint32_t queueFamilyIndexCount_ = {}, - const uint32_t * pQueueFamilyIndices_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , imageType( imageType_ ) - , format( format_ ) - , extent( extent_ ) - , mipLevels( mipLevels_ ) - , arrayLayers( arrayLayers_ ) - , samples( samples_ ) - , tiling( tiling_ ) - , usage( usage_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( queueFamilyIndexCount_ ) - , pQueueFamilyIndices( pQueueFamilyIndices_ ) - , initialLayout( initialLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageCreateInfo( ImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCreateInfo( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCreateInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ImageType imageType_, - VULKAN_HPP_NAMESPACE::Format format_, - VULKAN_HPP_NAMESPACE::Extent3D extent_, - uint32_t mipLevels_, - uint32_t arrayLayers_, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_, - VULKAN_HPP_NAMESPACE::ImageTiling tiling_, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , imageType( imageType_ ) - , format( format_ ) - , extent( extent_ ) - , mipLevels( mipLevels_ ) - , arrayLayers( arrayLayers_ ) - , samples( samples_ ) - , tiling( tiling_ ) - , usage( usage_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) - , pQueueFamilyIndices( queueFamilyIndices_.data() ) - , initialLayout( initialLayout_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageCreateInfo & operator=( ImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCreateInfo & operator=( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setImageType( VULKAN_HPP_NAMESPACE::ImageType imageType_ ) VULKAN_HPP_NOEXCEPT - { - imageType = imageType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setMipLevels( uint32_t mipLevels_ ) VULKAN_HPP_NOEXCEPT - { - mipLevels = mipLevels_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setArrayLayers( uint32_t arrayLayers_ ) VULKAN_HPP_NOEXCEPT - { - arrayLayers = arrayLayers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT - { - samples = samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT - { - tiling = tiling_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT - { - sharingMode = sharingMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = queueFamilyIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - pQueueFamilyIndices = pQueueFamilyIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageCreateInfo & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); - pQueueFamilyIndices = queueFamilyIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT - { - initialLayout = initialLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - imageType, - format, - extent, - mipLevels, - arrayLayers, - samples, - tiling, - usage, - sharingMode, - queueFamilyIndexCount, - pQueueFamilyIndices, - initialLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageCreateInfo const & ) const = default; -#else - bool operator==( ImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( imageType == rhs.imageType ) && ( format == rhs.format ) && - ( extent == rhs.extent ) && ( mipLevels == rhs.mipLevels ) && ( arrayLayers == rhs.arrayLayers ) && ( samples == rhs.samples ) && - ( tiling == rhs.tiling ) && ( usage == rhs.usage ) && ( sharingMode == rhs.sharingMode ) && - ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ) && - ( initialLayout == rhs.initialLayout ); -# endif - } - - bool operator!=( ImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::ImageType imageType = VULKAN_HPP_NAMESPACE::ImageType::e1D; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - uint32_t mipLevels = {}; - uint32_t arrayLayers = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; - VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; - uint32_t queueFamilyIndexCount = {}; - const uint32_t * pQueueFamilyIndices = {}; - VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - template <> - struct CppType - { - using Type = ImageCreateInfo; - }; - - struct DeviceImageMemoryRequirements - { - using NativeType = VkDeviceImageMemoryRequirements; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceImageMemoryRequirements; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DeviceImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ = {}, - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pCreateInfo( pCreateInfo_ ) - , planeAspect( planeAspect_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceImageMemoryRequirements( DeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceImageMemoryRequirements( VkDeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceImageMemoryRequirements( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceImageMemoryRequirements & operator=( DeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceImageMemoryRequirements & operator=( VkDeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPCreateInfo( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ ) VULKAN_HPP_NOEXCEPT - { - pCreateInfo = pCreateInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT - { - planeAspect = planeAspect_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceImageMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceImageMemoryRequirements &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pCreateInfo, planeAspect ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceImageMemoryRequirements const & ) const = default; -#else - bool operator==( DeviceImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pCreateInfo == rhs.pCreateInfo ) && ( planeAspect == rhs.planeAspect ); -# endif - } - - bool operator!=( DeviceImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceImageMemoryRequirements; - const void * pNext = {}; - const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; - }; - - template <> - struct CppType - { - using Type = DeviceImageMemoryRequirements; - }; - using DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; - - struct DeviceMemoryOpaqueCaptureAddressInfo - { - using NativeType = VkDeviceMemoryOpaqueCaptureAddressInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryOpaqueCaptureAddressInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceMemoryOpaqueCaptureAddressInfo( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceMemoryOpaqueCaptureAddressInfo( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryOpaqueCaptureAddressInfo( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceMemoryOpaqueCaptureAddressInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceMemoryOpaqueCaptureAddressInfo & operator=( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryOpaqueCaptureAddressInfo & operator=( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOpaqueCaptureAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOpaqueCaptureAddressInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceMemoryOpaqueCaptureAddressInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceMemoryOpaqueCaptureAddressInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemoryOpaqueCaptureAddressInfo const & ) const = default; -#else - bool operator==( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ); -# endif - } - - bool operator!=( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOpaqueCaptureAddressInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - }; - - template <> - struct CppType - { - using Type = DeviceMemoryOpaqueCaptureAddressInfo; - }; - using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; - - struct DeviceMemoryOverallocationCreateInfoAMD - { - using NativeType = VkDeviceMemoryOverallocationCreateInfoAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( - VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , overallocationBehavior( overallocationBehavior_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryOverallocationCreateInfoAMD( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceMemoryOverallocationCreateInfoAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceMemoryOverallocationCreateInfoAMD & operator=( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryOverallocationCreateInfoAMD & operator=( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOverallocationCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOverallocationCreateInfoAMD & - setOverallocationBehavior( VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ ) VULKAN_HPP_NOEXCEPT - { - overallocationBehavior = overallocationBehavior_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceMemoryOverallocationCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceMemoryOverallocationCreateInfoAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, overallocationBehavior ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemoryOverallocationCreateInfoAMD const & ) const = default; -#else - bool operator==( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( overallocationBehavior == rhs.overallocationBehavior ); -# endif - } - - bool operator!=( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault; - }; - - template <> - struct CppType - { - using Type = DeviceMemoryOverallocationCreateInfoAMD; - }; - - struct DeviceMemoryReportCallbackDataEXT - { - using NativeType = VkDeviceMemoryReportCallbackDataEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryReportCallbackDataEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceMemoryReportCallbackDataEXT( - VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT type_ = VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT::eAllocate, - uint64_t memoryObjectId_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, - uint64_t objectHandle_ = {}, - uint32_t heapIndex_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , type( type_ ) - , memoryObjectId( memoryObjectId_ ) - , size( size_ ) - , objectType( objectType_ ) - , objectHandle( objectHandle_ ) - , heapIndex( heapIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceMemoryReportCallbackDataEXT( DeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryReportCallbackDataEXT( VkDeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceMemoryReportCallbackDataEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceMemoryReportCallbackDataEXT & operator=( DeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceMemoryReportCallbackDataEXT & operator=( VkDeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDeviceMemoryReportCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceMemoryReportCallbackDataEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, type, memoryObjectId, size, objectType, objectHandle, heapIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceMemoryReportCallbackDataEXT const & ) const = default; -#else - bool operator==( DeviceMemoryReportCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( type == rhs.type ) && ( memoryObjectId == rhs.memoryObjectId ) && - ( size == rhs.size ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && ( heapIndex == rhs.heapIndex ); -# endif - } - - bool operator!=( DeviceMemoryReportCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryReportCallbackDataEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT type = VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT::eAllocate; - uint64_t memoryObjectId = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; - uint64_t objectHandle = {}; - uint32_t heapIndex = {}; - }; - - template <> - struct CppType - { - using Type = DeviceMemoryReportCallbackDataEXT; - }; - - struct DevicePrivateDataCreateInfo - { - using NativeType = VkDevicePrivateDataCreateInfo; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDevicePrivateDataCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DevicePrivateDataCreateInfo( uint32_t privateDataSlotRequestCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , privateDataSlotRequestCount( privateDataSlotRequestCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR DevicePrivateDataCreateInfo( DevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DevicePrivateDataCreateInfo( VkDevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : DevicePrivateDataCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DevicePrivateDataCreateInfo & operator=( DevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DevicePrivateDataCreateInfo & operator=( VkDevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DevicePrivateDataCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DevicePrivateDataCreateInfo & setPrivateDataSlotRequestCount( uint32_t privateDataSlotRequestCount_ ) VULKAN_HPP_NOEXCEPT - { - privateDataSlotRequestCount = privateDataSlotRequestCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDevicePrivateDataCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDevicePrivateDataCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, privateDataSlotRequestCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DevicePrivateDataCreateInfo const & ) const = default; -#else - bool operator==( DevicePrivateDataCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( privateDataSlotRequestCount == rhs.privateDataSlotRequestCount ); -# endif - } - - bool operator!=( DevicePrivateDataCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDevicePrivateDataCreateInfo; - const void * pNext = {}; - uint32_t privateDataSlotRequestCount = {}; - }; - - template <> - struct CppType - { - using Type = DevicePrivateDataCreateInfo; - }; - using DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; - - struct DeviceQueueGlobalPriorityCreateInfoKHR - { - using NativeType = VkDeviceQueueGlobalPriorityCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueGlobalPriorityCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DeviceQueueGlobalPriorityCreateInfoKHR( VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR globalPriority_ = VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , globalPriority( globalPriority_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfoKHR( DeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueGlobalPriorityCreateInfoKHR( VkDeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DeviceQueueGlobalPriorityCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceQueueGlobalPriorityCreateInfoKHR & operator=( DeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueGlobalPriorityCreateInfoKHR & operator=( VkDeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceQueueGlobalPriorityCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueGlobalPriorityCreateInfoKHR & - setGlobalPriority( VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR globalPriority_ ) VULKAN_HPP_NOEXCEPT - { - globalPriority = globalPriority_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceQueueGlobalPriorityCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceQueueGlobalPriorityCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, globalPriority ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceQueueGlobalPriorityCreateInfoKHR const & ) const = default; -#else - bool operator==( DeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( globalPriority == rhs.globalPriority ); -# endif - } - - bool operator!=( DeviceQueueGlobalPriorityCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR globalPriority = VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow; - }; - - template <> - struct CppType - { - using Type = DeviceQueueGlobalPriorityCreateInfoKHR; - }; - using DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfoKHR; - - struct DeviceQueueInfo2 - { - using NativeType = VkDeviceQueueInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {}, - uint32_t queueFamilyIndex_ = {}, - uint32_t queueIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , queueIndex( queueIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( DeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueInfo2( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceQueueInfo2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DeviceQueueInfo2 & operator=( DeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DeviceQueueInfo2 & operator=( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndex = queueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setQueueIndex( uint32_t queueIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueIndex = queueIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDeviceQueueInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDeviceQueueInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, queueFamilyIndex, queueIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceQueueInfo2 const & ) const = default; -#else - bool operator==( DeviceQueueInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && - ( queueIndex == rhs.queueIndex ); -# endif - } - - bool operator!=( DeviceQueueInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {}; - uint32_t queueFamilyIndex = {}; - uint32_t queueIndex = {}; - }; - - template <> - struct CppType - { - using Type = DeviceQueueInfo2; - }; - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - struct DirectFBSurfaceCreateInfoEXT - { - using NativeType = VkDirectFBSurfaceCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDirectfbSurfaceCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DirectFBSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags_ = {}, - IDirectFB * dfb_ = {}, - IDirectFBSurface * surface_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , dfb( dfb_ ) - , surface( surface_ ) - { - } - - VULKAN_HPP_CONSTEXPR DirectFBSurfaceCreateInfoEXT( DirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DirectFBSurfaceCreateInfoEXT( VkDirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DirectFBSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DirectFBSurfaceCreateInfoEXT & operator=( DirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DirectFBSurfaceCreateInfoEXT & operator=( VkDirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setDfb( IDirectFB * dfb_ ) VULKAN_HPP_NOEXCEPT - { - dfb = dfb_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setSurface( IDirectFBSurface * surface_ ) VULKAN_HPP_NOEXCEPT - { - surface = surface_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDirectFBSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDirectFBSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, dfb, surface ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DirectFBSurfaceCreateInfoEXT const & ) const = default; -# else - bool operator==( DirectFBSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dfb == rhs.dfb ) && ( surface == rhs.surface ); -# endif - } - - bool operator!=( DirectFBSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDirectfbSurfaceCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags = {}; - IDirectFB * dfb = {}; - IDirectFBSurface * surface = {}; - }; - - template <> - struct CppType - { - using Type = DirectFBSurfaceCreateInfoEXT; - }; -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - struct DispatchIndirectCommand - { - using NativeType = VkDispatchIndirectCommand; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( uint32_t x_ = {}, uint32_t y_ = {}, uint32_t z_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - , z( z_ ) - { - } - - VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( DispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DispatchIndirectCommand( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT - : DispatchIndirectCommand( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DispatchIndirectCommand & operator=( DispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DispatchIndirectCommand & operator=( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setX( uint32_t x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setY( uint32_t y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setZ( uint32_t z_ ) VULKAN_HPP_NOEXCEPT - { - z = z_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDispatchIndirectCommand const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDispatchIndirectCommand &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y, z ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DispatchIndirectCommand const & ) const = default; -#else - bool operator==( DispatchIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ); -# endif - } - - bool operator!=( DispatchIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t x = {}; - uint32_t y = {}; - uint32_t z = {}; - }; - - struct DisplayEventInfoEXT - { - using NativeType = VkDisplayEventInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayEventInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DisplayEventInfoEXT( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , displayEvent( displayEvent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( DisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayEventInfoEXT( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayEventInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayEventInfoEXT & operator=( DisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayEventInfoEXT & operator=( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayEventInfoEXT & setDisplayEvent( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ ) VULKAN_HPP_NOEXCEPT - { - displayEvent = displayEvent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayEventInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, displayEvent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayEventInfoEXT const & ) const = default; -#else - bool operator==( DisplayEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayEvent == rhs.displayEvent ); -# endif - } - - bool operator!=( DisplayEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayEventInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut; - }; - - template <> - struct CppType - { - using Type = DisplayEventInfoEXT; - }; - - struct DisplayModeParametersKHR - { - using NativeType = VkDisplayModeParametersKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( VULKAN_HPP_NAMESPACE::Extent2D visibleRegion_ = {}, uint32_t refreshRate_ = {} ) VULKAN_HPP_NOEXCEPT - : visibleRegion( visibleRegion_ ) - , refreshRate( refreshRate_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( DisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeParametersKHR( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayModeParametersKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayModeParametersKHR & operator=( DisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeParametersKHR & operator=( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayModeParametersKHR & setVisibleRegion( VULKAN_HPP_NAMESPACE::Extent2D const & visibleRegion_ ) VULKAN_HPP_NOEXCEPT - { - visibleRegion = visibleRegion_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayModeParametersKHR & setRefreshRate( uint32_t refreshRate_ ) VULKAN_HPP_NOEXCEPT - { - refreshRate = refreshRate_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayModeParametersKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayModeParametersKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( visibleRegion, refreshRate ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeParametersKHR const & ) const = default; -#else - bool operator==( DisplayModeParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( visibleRegion == rhs.visibleRegion ) && ( refreshRate == rhs.refreshRate ); -# endif - } - - bool operator!=( DisplayModeParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Extent2D visibleRegion = {}; - uint32_t refreshRate = {}; - }; - - struct DisplayModeCreateInfoKHR - { - using NativeType = VkDisplayModeCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayModeCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , parameters( parameters_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( DisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeCreateInfoKHR( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayModeCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayModeCreateInfoKHR & operator=( DisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeCreateInfoKHR & operator=( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setParameters( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR const & parameters_ ) VULKAN_HPP_NOEXCEPT - { - parameters = parameters_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayModeCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayModeCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, parameters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeCreateInfoKHR const & ) const = default; -#else - bool operator==( DisplayModeCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( parameters == rhs.parameters ); -# endif - } - - bool operator!=( DisplayModeCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {}; - }; - - template <> - struct CppType - { - using Type = DisplayModeCreateInfoKHR; - }; - - struct DisplayModePropertiesKHR - { - using NativeType = VkDisplayModePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ = {}, - VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {} ) VULKAN_HPP_NOEXCEPT - : displayMode( displayMode_ ) - , parameters( parameters_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayModePropertiesKHR( DisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModePropertiesKHR( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayModePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayModePropertiesKHR & operator=( DisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModePropertiesKHR & operator=( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayModePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayModePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( displayMode, parameters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModePropertiesKHR const & ) const = default; -#else - bool operator==( DisplayModePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( displayMode == rhs.displayMode ) && ( parameters == rhs.parameters ); -# endif - } - - bool operator!=( DisplayModePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode = {}; - VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {}; - }; - - struct DisplayModeProperties2KHR - { - using NativeType = VkDisplayModeProperties2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayModeProperties2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , displayModeProperties( displayModeProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayModeProperties2KHR( DisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeProperties2KHR( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayModeProperties2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayModeProperties2KHR & operator=( DisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayModeProperties2KHR & operator=( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayModeProperties2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayModeProperties2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, displayModeProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayModeProperties2KHR const & ) const = default; -#else - bool operator==( DisplayModeProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayModeProperties == rhs.displayModeProperties ); -# endif - } - - bool operator!=( DisplayModeProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeProperties2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties = {}; - }; - - template <> - struct CppType - { - using Type = DisplayModeProperties2KHR; - }; - - struct DisplayNativeHdrSurfaceCapabilitiesAMD - { - using NativeType = VkDisplayNativeHdrSurfaceCapabilitiesAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayNativeHdrSurfaceCapabilitiesAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , localDimmingSupport( localDimmingSupport_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayNativeHdrSurfaceCapabilitiesAMD( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayNativeHdrSurfaceCapabilitiesAMD( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayNativeHdrSurfaceCapabilitiesAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayNativeHdrSurfaceCapabilitiesAMD & operator=( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayNativeHdrSurfaceCapabilitiesAMD & operator=( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayNativeHdrSurfaceCapabilitiesAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayNativeHdrSurfaceCapabilitiesAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, localDimmingSupport ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayNativeHdrSurfaceCapabilitiesAMD const & ) const = default; -#else - bool operator==( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( localDimmingSupport == rhs.localDimmingSupport ); -# endif - } - - bool operator!=( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport = {}; - }; - - template <> - struct CppType - { - using Type = DisplayNativeHdrSurfaceCapabilitiesAMD; - }; - - struct DisplayPlaneCapabilitiesKHR - { - using NativeType = VkDisplayPlaneCapabilitiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagsKHR supportedAlpha_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D minSrcPosition_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D maxSrcPosition_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D minSrcExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxSrcExtent_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D minDstPosition_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D maxDstPosition_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D minDstExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxDstExtent_ = {} ) VULKAN_HPP_NOEXCEPT - : supportedAlpha( supportedAlpha_ ) - , minSrcPosition( minSrcPosition_ ) - , maxSrcPosition( maxSrcPosition_ ) - , minSrcExtent( minSrcExtent_ ) - , maxSrcExtent( maxSrcExtent_ ) - , minDstPosition( minDstPosition_ ) - , maxDstPosition( maxDstPosition_ ) - , minDstExtent( minDstExtent_ ) - , maxDstExtent( maxDstExtent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilitiesKHR( DisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneCapabilitiesKHR( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPlaneCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPlaneCapabilitiesKHR & operator=( DisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneCapabilitiesKHR & operator=( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayPlaneCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPlaneCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( supportedAlpha, minSrcPosition, maxSrcPosition, minSrcExtent, maxSrcExtent, minDstPosition, maxDstPosition, minDstExtent, maxDstExtent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPlaneCapabilitiesKHR const & ) const = default; -#else - bool operator==( DisplayPlaneCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( supportedAlpha == rhs.supportedAlpha ) && ( minSrcPosition == rhs.minSrcPosition ) && ( maxSrcPosition == rhs.maxSrcPosition ) && - ( minSrcExtent == rhs.minSrcExtent ) && ( maxSrcExtent == rhs.maxSrcExtent ) && ( minDstPosition == rhs.minDstPosition ) && - ( maxDstPosition == rhs.maxDstPosition ) && ( minDstExtent == rhs.minDstExtent ) && ( maxDstExtent == rhs.maxDstExtent ); -# endif - } - - bool operator!=( DisplayPlaneCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagsKHR supportedAlpha = {}; - VULKAN_HPP_NAMESPACE::Offset2D minSrcPosition = {}; - VULKAN_HPP_NAMESPACE::Offset2D maxSrcPosition = {}; - VULKAN_HPP_NAMESPACE::Extent2D minSrcExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxSrcExtent = {}; - VULKAN_HPP_NAMESPACE::Offset2D minDstPosition = {}; - VULKAN_HPP_NAMESPACE::Offset2D maxDstPosition = {}; - VULKAN_HPP_NAMESPACE::Extent2D minDstExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxDstExtent = {}; - }; - - struct DisplayPlaneCapabilities2KHR - { - using NativeType = VkDisplayPlaneCapabilities2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneCapabilities2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilities2KHR( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , capabilities( capabilities_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilities2KHR( DisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneCapabilities2KHR( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPlaneCapabilities2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPlaneCapabilities2KHR & operator=( DisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneCapabilities2KHR & operator=( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayPlaneCapabilities2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPlaneCapabilities2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, capabilities ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPlaneCapabilities2KHR const & ) const = default; -#else - bool operator==( DisplayPlaneCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( capabilities == rhs.capabilities ); -# endif - } - - bool operator!=( DisplayPlaneCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneCapabilities2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities = {}; - }; - - template <> - struct CppType - { - using Type = DisplayPlaneCapabilities2KHR; - }; - - struct DisplayPlaneInfo2KHR - { - using NativeType = VkDisplayPlaneInfo2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneInfo2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DisplayPlaneInfo2KHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ = {}, uint32_t planeIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mode( mode_ ) - , planeIndex( planeIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( DisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneInfo2KHR( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPlaneInfo2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPlaneInfo2KHR & operator=( DisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneInfo2KHR & operator=( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ ) VULKAN_HPP_NOEXCEPT - { - mode = mode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setPlaneIndex( uint32_t planeIndex_ ) VULKAN_HPP_NOEXCEPT - { - planeIndex = planeIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayPlaneInfo2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPlaneInfo2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mode, planeIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPlaneInfo2KHR const & ) const = default; -#else - bool operator==( DisplayPlaneInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mode == rhs.mode ) && ( planeIndex == rhs.planeIndex ); -# endif - } - - bool operator!=( DisplayPlaneInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneInfo2KHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayModeKHR mode = {}; - uint32_t planeIndex = {}; - }; - - template <> - struct CppType - { - using Type = DisplayPlaneInfo2KHR; - }; - - struct DisplayPlanePropertiesKHR - { - using NativeType = VkDisplayPlanePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPlanePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay_ = {}, - uint32_t currentStackIndex_ = {} ) VULKAN_HPP_NOEXCEPT - : currentDisplay( currentDisplay_ ) - , currentStackIndex( currentStackIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPlanePropertiesKHR( DisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlanePropertiesKHR( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPlanePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPlanePropertiesKHR & operator=( DisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlanePropertiesKHR & operator=( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayPlanePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPlanePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( currentDisplay, currentStackIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPlanePropertiesKHR const & ) const = default; -#else - bool operator==( DisplayPlanePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( currentDisplay == rhs.currentDisplay ) && ( currentStackIndex == rhs.currentStackIndex ); -# endif - } - - bool operator!=( DisplayPlanePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay = {}; - uint32_t currentStackIndex = {}; - }; - - struct DisplayPlaneProperties2KHR - { - using NativeType = VkDisplayPlaneProperties2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneProperties2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPlaneProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , displayPlaneProperties( displayPlaneProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPlaneProperties2KHR( DisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneProperties2KHR( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPlaneProperties2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPlaneProperties2KHR & operator=( DisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPlaneProperties2KHR & operator=( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayPlaneProperties2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPlaneProperties2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, displayPlaneProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPlaneProperties2KHR const & ) const = default; -#else - bool operator==( DisplayPlaneProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayPlaneProperties == rhs.displayPlaneProperties ); -# endif - } - - bool operator!=( DisplayPlaneProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneProperties2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties = {}; - }; - - template <> - struct CppType - { - using Type = DisplayPlaneProperties2KHR; - }; - - struct DisplayPowerInfoEXT - { - using NativeType = VkDisplayPowerInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPowerInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , powerState( powerState_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( DisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPowerInfoEXT( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPowerInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPowerInfoEXT & operator=( DisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPowerInfoEXT & operator=( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayPowerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPowerInfoEXT & setPowerState( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ ) VULKAN_HPP_NOEXCEPT - { - powerState = powerState_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayPowerInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPowerInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, powerState ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPowerInfoEXT const & ) const = default; -#else - bool operator==( DisplayPowerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( powerState == rhs.powerState ); -# endif - } - - bool operator!=( DisplayPowerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPowerInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff; - }; - - template <> - struct CppType - { - using Type = DisplayPowerInfoEXT; - }; - - struct DisplayPresentInfoKHR - { - using NativeType = VkDisplayPresentInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPresentInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( VULKAN_HPP_NAMESPACE::Rect2D srcRect_ = {}, - VULKAN_HPP_NAMESPACE::Rect2D dstRect_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 persistent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcRect( srcRect_ ) - , dstRect( dstRect_ ) - , persistent( persistent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( DisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPresentInfoKHR( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPresentInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPresentInfoKHR & operator=( DisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPresentInfoKHR & operator=( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setSrcRect( VULKAN_HPP_NAMESPACE::Rect2D const & srcRect_ ) VULKAN_HPP_NOEXCEPT - { - srcRect = srcRect_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setDstRect( VULKAN_HPP_NAMESPACE::Rect2D const & dstRect_ ) VULKAN_HPP_NOEXCEPT - { - dstRect = dstRect_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setPersistent( VULKAN_HPP_NAMESPACE::Bool32 persistent_ ) VULKAN_HPP_NOEXCEPT - { - persistent = persistent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplayPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPresentInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcRect, dstRect, persistent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayPresentInfoKHR const & ) const = default; -#else - bool operator==( DisplayPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcRect == rhs.srcRect ) && ( dstRect == rhs.dstRect ) && ( persistent == rhs.persistent ); -# endif - } - - bool operator!=( DisplayPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPresentInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Rect2D srcRect = {}; - VULKAN_HPP_NAMESPACE::Rect2D dstRect = {}; - VULKAN_HPP_NAMESPACE::Bool32 persistent = {}; - }; - - template <> - struct CppType - { - using Type = DisplayPresentInfoKHR; - }; - - struct DisplayPropertiesKHR - { - using NativeType = VkDisplayPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayPropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display_ = {}, - const char * displayName_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D physicalDimensions_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D physicalResolution_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 planeReorderPossible_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 persistentContent_ = {} ) VULKAN_HPP_NOEXCEPT - : display( display_ ) - , displayName( displayName_ ) - , physicalDimensions( physicalDimensions_ ) - , physicalResolution( physicalResolution_ ) - , supportedTransforms( supportedTransforms_ ) - , planeReorderPossible( planeReorderPossible_ ) - , persistentContent( persistentContent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayPropertiesKHR( DisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPropertiesKHR( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayPropertiesKHR & operator=( DisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayPropertiesKHR & operator=( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( display, displayName, physicalDimensions, physicalResolution, supportedTransforms, planeReorderPossible, persistentContent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = display <=> rhs.display; cmp != 0 ) - return cmp; - if ( displayName != rhs.displayName ) - if ( auto cmp = strcmp( displayName, rhs.displayName ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = physicalDimensions <=> rhs.physicalDimensions; cmp != 0 ) - return cmp; - if ( auto cmp = physicalResolution <=> rhs.physicalResolution; cmp != 0 ) - return cmp; - if ( auto cmp = supportedTransforms <=> rhs.supportedTransforms; cmp != 0 ) - return cmp; - if ( auto cmp = planeReorderPossible <=> rhs.planeReorderPossible; cmp != 0 ) - return cmp; - if ( auto cmp = persistentContent <=> rhs.persistentContent; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( display == rhs.display ) && ( ( displayName == rhs.displayName ) || ( strcmp( displayName, rhs.displayName ) == 0 ) ) && - ( physicalDimensions == rhs.physicalDimensions ) && ( physicalResolution == rhs.physicalResolution ) && - ( supportedTransforms == rhs.supportedTransforms ) && ( planeReorderPossible == rhs.planeReorderPossible ) && - ( persistentContent == rhs.persistentContent ); - } - - bool operator!=( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::DisplayKHR display = {}; - const char * displayName = {}; - VULKAN_HPP_NAMESPACE::Extent2D physicalDimensions = {}; - VULKAN_HPP_NAMESPACE::Extent2D physicalResolution = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; - VULKAN_HPP_NAMESPACE::Bool32 planeReorderPossible = {}; - VULKAN_HPP_NAMESPACE::Bool32 persistentContent = {}; - }; - - struct DisplayProperties2KHR - { - using NativeType = VkDisplayProperties2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayProperties2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DisplayProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , displayProperties( displayProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplayProperties2KHR( DisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayProperties2KHR( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplayProperties2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplayProperties2KHR & operator=( DisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplayProperties2KHR & operator=( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDisplayProperties2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplayProperties2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, displayProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplayProperties2KHR const & ) const = default; -#else - bool operator==( DisplayProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayProperties == rhs.displayProperties ); -# endif - } - - bool operator!=( DisplayProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayProperties2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties = {}; - }; - - template <> - struct CppType - { - using Type = DisplayProperties2KHR; - }; - - struct DisplaySurfaceCreateInfoKHR - { - using NativeType = VkDisplaySurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplaySurfaceCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DisplaySurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ = {}, - uint32_t planeIndex_ = {}, - uint32_t planeStackIndex_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - float globalAlpha_ = {}, - VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode_ = VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR::eOpaque, - VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , displayMode( displayMode_ ) - , planeIndex( planeIndex_ ) - , planeStackIndex( planeStackIndex_ ) - , transform( transform_ ) - , globalAlpha( globalAlpha_ ) - , alphaMode( alphaMode_ ) - , imageExtent( imageExtent_ ) - { - } - - VULKAN_HPP_CONSTEXPR DisplaySurfaceCreateInfoKHR( DisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplaySurfaceCreateInfoKHR( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : DisplaySurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DisplaySurfaceCreateInfoKHR & operator=( DisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DisplaySurfaceCreateInfoKHR & operator=( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setDisplayMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ ) VULKAN_HPP_NOEXCEPT - { - displayMode = displayMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPlaneIndex( uint32_t planeIndex_ ) VULKAN_HPP_NOEXCEPT - { - planeIndex = planeIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPlaneStackIndex( uint32_t planeStackIndex_ ) VULKAN_HPP_NOEXCEPT - { - planeStackIndex = planeStackIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT - { - transform = transform_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setGlobalAlpha( float globalAlpha_ ) VULKAN_HPP_NOEXCEPT - { - globalAlpha = globalAlpha_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setAlphaMode( VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode_ ) VULKAN_HPP_NOEXCEPT - { - alphaMode = alphaMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT - { - imageExtent = imageExtent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDisplaySurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDisplaySurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, displayMode, planeIndex, planeStackIndex, transform, globalAlpha, alphaMode, imageExtent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DisplaySurfaceCreateInfoKHR const & ) const = default; -#else - bool operator==( DisplaySurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( displayMode == rhs.displayMode ) && - ( planeIndex == rhs.planeIndex ) && ( planeStackIndex == rhs.planeStackIndex ) && ( transform == rhs.transform ) && - ( globalAlpha == rhs.globalAlpha ) && ( alphaMode == rhs.alphaMode ) && ( imageExtent == rhs.imageExtent ); -# endif - } - - bool operator!=( DisplaySurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode = {}; - uint32_t planeIndex = {}; - uint32_t planeStackIndex = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - float globalAlpha = {}; - VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode = VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR::eOpaque; - VULKAN_HPP_NAMESPACE::Extent2D imageExtent = {}; - }; - - template <> - struct CppType - { - using Type = DisplaySurfaceCreateInfoKHR; - }; - - struct DrawIndexedIndirectCommand - { - using NativeType = VkDrawIndexedIndirectCommand; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrawIndexedIndirectCommand( uint32_t indexCount_ = {}, - uint32_t instanceCount_ = {}, - uint32_t firstIndex_ = {}, - int32_t vertexOffset_ = {}, - uint32_t firstInstance_ = {} ) VULKAN_HPP_NOEXCEPT - : indexCount( indexCount_ ) - , instanceCount( instanceCount_ ) - , firstIndex( firstIndex_ ) - , vertexOffset( vertexOffset_ ) - , firstInstance( firstInstance_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrawIndexedIndirectCommand( DrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawIndexedIndirectCommand( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT - : DrawIndexedIndirectCommand( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrawIndexedIndirectCommand & operator=( DrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawIndexedIndirectCommand & operator=( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT - { - indexCount = indexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT - { - instanceCount = instanceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setFirstIndex( uint32_t firstIndex_ ) VULKAN_HPP_NOEXCEPT - { - firstIndex = firstIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setVertexOffset( int32_t vertexOffset_ ) VULKAN_HPP_NOEXCEPT - { - vertexOffset = vertexOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setFirstInstance( uint32_t firstInstance_ ) VULKAN_HPP_NOEXCEPT - { - firstInstance = firstInstance_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDrawIndexedIndirectCommand const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrawIndexedIndirectCommand &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrawIndexedIndirectCommand const & ) const = default; -#else - bool operator==( DrawIndexedIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( indexCount == rhs.indexCount ) && ( instanceCount == rhs.instanceCount ) && ( firstIndex == rhs.firstIndex ) && - ( vertexOffset == rhs.vertexOffset ) && ( firstInstance == rhs.firstInstance ); -# endif - } - - bool operator!=( DrawIndexedIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t indexCount = {}; - uint32_t instanceCount = {}; - uint32_t firstIndex = {}; - int32_t vertexOffset = {}; - uint32_t firstInstance = {}; - }; - - struct DrawIndirectCommand - { - using NativeType = VkDrawIndirectCommand; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrawIndirectCommand( uint32_t vertexCount_ = {}, - uint32_t instanceCount_ = {}, - uint32_t firstVertex_ = {}, - uint32_t firstInstance_ = {} ) VULKAN_HPP_NOEXCEPT - : vertexCount( vertexCount_ ) - , instanceCount( instanceCount_ ) - , firstVertex( firstVertex_ ) - , firstInstance( firstInstance_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrawIndirectCommand( DrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawIndirectCommand( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT : DrawIndirectCommand( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrawIndirectCommand & operator=( DrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawIndirectCommand & operator=( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexCount = vertexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT - { - instanceCount = instanceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT - { - firstVertex = firstVertex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setFirstInstance( uint32_t firstInstance_ ) VULKAN_HPP_NOEXCEPT - { - firstInstance = firstInstance_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDrawIndirectCommand const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrawIndirectCommand &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( vertexCount, instanceCount, firstVertex, firstInstance ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrawIndirectCommand const & ) const = default; -#else - bool operator==( DrawIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( vertexCount == rhs.vertexCount ) && ( instanceCount == rhs.instanceCount ) && ( firstVertex == rhs.firstVertex ) && - ( firstInstance == rhs.firstInstance ); -# endif - } - - bool operator!=( DrawIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t vertexCount = {}; - uint32_t instanceCount = {}; - uint32_t firstVertex = {}; - uint32_t firstInstance = {}; - }; - - struct DrawMeshTasksIndirectCommandEXT - { - using NativeType = VkDrawMeshTasksIndirectCommandEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - DrawMeshTasksIndirectCommandEXT( uint32_t groupCountX_ = {}, uint32_t groupCountY_ = {}, uint32_t groupCountZ_ = {} ) VULKAN_HPP_NOEXCEPT - : groupCountX( groupCountX_ ) - , groupCountY( groupCountY_ ) - , groupCountZ( groupCountZ_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandEXT( DrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawMeshTasksIndirectCommandEXT( VkDrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DrawMeshTasksIndirectCommandEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrawMeshTasksIndirectCommandEXT & operator=( DrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawMeshTasksIndirectCommandEXT & operator=( VkDrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountX( uint32_t groupCountX_ ) VULKAN_HPP_NOEXCEPT - { - groupCountX = groupCountX_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountY( uint32_t groupCountY_ ) VULKAN_HPP_NOEXCEPT - { - groupCountY = groupCountY_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountZ( uint32_t groupCountZ_ ) VULKAN_HPP_NOEXCEPT - { - groupCountZ = groupCountZ_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDrawMeshTasksIndirectCommandEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrawMeshTasksIndirectCommandEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( groupCountX, groupCountY, groupCountZ ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrawMeshTasksIndirectCommandEXT const & ) const = default; -#else - bool operator==( DrawMeshTasksIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( groupCountX == rhs.groupCountX ) && ( groupCountY == rhs.groupCountY ) && ( groupCountZ == rhs.groupCountZ ); -# endif - } - - bool operator!=( DrawMeshTasksIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t groupCountX = {}; - uint32_t groupCountY = {}; - uint32_t groupCountZ = {}; - }; - - struct DrawMeshTasksIndirectCommandNV - { - using NativeType = VkDrawMeshTasksIndirectCommandNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( uint32_t taskCount_ = {}, uint32_t firstTask_ = {} ) VULKAN_HPP_NOEXCEPT - : taskCount( taskCount_ ) - , firstTask( firstTask_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( DrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawMeshTasksIndirectCommandNV( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - : DrawMeshTasksIndirectCommandNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrawMeshTasksIndirectCommandNV & operator=( DrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrawMeshTasksIndirectCommandNV & operator=( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandNV & setTaskCount( uint32_t taskCount_ ) VULKAN_HPP_NOEXCEPT - { - taskCount = taskCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandNV & setFirstTask( uint32_t firstTask_ ) VULKAN_HPP_NOEXCEPT - { - firstTask = firstTask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkDrawMeshTasksIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrawMeshTasksIndirectCommandNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( taskCount, firstTask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrawMeshTasksIndirectCommandNV const & ) const = default; -#else - bool operator==( DrawMeshTasksIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( taskCount == rhs.taskCount ) && ( firstTask == rhs.firstTask ); -# endif - } - - bool operator!=( DrawMeshTasksIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t taskCount = {}; - uint32_t firstTask = {}; - }; - - struct DrmFormatModifierProperties2EXT - { - using NativeType = VkDrmFormatModifierProperties2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrmFormatModifierProperties2EXT( uint64_t drmFormatModifier_ = {}, - uint32_t drmFormatModifierPlaneCount_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 drmFormatModifierTilingFeatures_ = {} ) VULKAN_HPP_NOEXCEPT - : drmFormatModifier( drmFormatModifier_ ) - , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ ) - , drmFormatModifierTilingFeatures( drmFormatModifierTilingFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrmFormatModifierProperties2EXT( DrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierProperties2EXT( VkDrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DrmFormatModifierProperties2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrmFormatModifierProperties2EXT & operator=( DrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierProperties2EXT & operator=( VkDrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDrmFormatModifierProperties2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrmFormatModifierProperties2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( drmFormatModifier, drmFormatModifierPlaneCount, drmFormatModifierTilingFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrmFormatModifierProperties2EXT const & ) const = default; -#else - bool operator==( DrmFormatModifierProperties2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( drmFormatModifier == rhs.drmFormatModifier ) && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && - ( drmFormatModifierTilingFeatures == rhs.drmFormatModifierTilingFeatures ); -# endif - } - - bool operator!=( DrmFormatModifierProperties2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint64_t drmFormatModifier = {}; - uint32_t drmFormatModifierPlaneCount = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 drmFormatModifierTilingFeatures = {}; - }; - - struct DrmFormatModifierPropertiesEXT - { - using NativeType = VkDrmFormatModifierPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {}, - uint32_t drmFormatModifierPlaneCount_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures_ = {} ) VULKAN_HPP_NOEXCEPT - : drmFormatModifier( drmFormatModifier_ ) - , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ ) - , drmFormatModifierTilingFeatures( drmFormatModifierTilingFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesEXT( DrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesEXT( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DrmFormatModifierPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrmFormatModifierPropertiesEXT & operator=( DrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesEXT & operator=( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDrmFormatModifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrmFormatModifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( drmFormatModifier, drmFormatModifierPlaneCount, drmFormatModifierTilingFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrmFormatModifierPropertiesEXT const & ) const = default; -#else - bool operator==( DrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( drmFormatModifier == rhs.drmFormatModifier ) && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && - ( drmFormatModifierTilingFeatures == rhs.drmFormatModifierTilingFeatures ); -# endif - } - - bool operator!=( DrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint64_t drmFormatModifier = {}; - uint32_t drmFormatModifierPlaneCount = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures = {}; - }; - - struct DrmFormatModifierPropertiesList2EXT - { - using NativeType = VkDrmFormatModifierPropertiesList2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDrmFormatModifierPropertiesList2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesList2EXT( uint32_t drmFormatModifierCount_ = {}, - VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT * pDrmFormatModifierProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifierCount( drmFormatModifierCount_ ) - , pDrmFormatModifierProperties( pDrmFormatModifierProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesList2EXT( DrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesList2EXT( VkDrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DrmFormatModifierPropertiesList2EXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DrmFormatModifierPropertiesList2EXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifierProperties_, - void * pNext_ = nullptr ) - : pNext( pNext_ ) - , drmFormatModifierCount( static_cast( drmFormatModifierProperties_.size() ) ) - , pDrmFormatModifierProperties( drmFormatModifierProperties_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrmFormatModifierPropertiesList2EXT & operator=( DrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesList2EXT & operator=( VkDrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDrmFormatModifierPropertiesList2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrmFormatModifierPropertiesList2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifierProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrmFormatModifierPropertiesList2EXT const & ) const = default; -#else - bool operator==( DrmFormatModifierPropertiesList2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && - ( pDrmFormatModifierProperties == rhs.pDrmFormatModifierProperties ); -# endif - } - - bool operator!=( DrmFormatModifierPropertiesList2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDrmFormatModifierPropertiesList2EXT; - void * pNext = {}; - uint32_t drmFormatModifierCount = {}; - VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT * pDrmFormatModifierProperties = {}; - }; - - template <> - struct CppType - { - using Type = DrmFormatModifierPropertiesList2EXT; - }; - - struct DrmFormatModifierPropertiesListEXT - { - using NativeType = VkDrmFormatModifierPropertiesListEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDrmFormatModifierPropertiesListEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesListEXT( uint32_t drmFormatModifierCount_ = {}, - VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT * pDrmFormatModifierProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifierCount( drmFormatModifierCount_ ) - , pDrmFormatModifierProperties( pDrmFormatModifierProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesListEXT( DrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesListEXT( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : DrmFormatModifierPropertiesListEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - DrmFormatModifierPropertiesListEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifierProperties_, - void * pNext_ = nullptr ) - : pNext( pNext_ ) - , drmFormatModifierCount( static_cast( drmFormatModifierProperties_.size() ) ) - , pDrmFormatModifierProperties( drmFormatModifierProperties_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - DrmFormatModifierPropertiesListEXT & operator=( DrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - DrmFormatModifierPropertiesListEXT & operator=( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkDrmFormatModifierPropertiesListEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkDrmFormatModifierPropertiesListEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifierProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DrmFormatModifierPropertiesListEXT const & ) const = default; -#else - bool operator==( DrmFormatModifierPropertiesListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && - ( pDrmFormatModifierProperties == rhs.pDrmFormatModifierProperties ); -# endif - } - - bool operator!=( DrmFormatModifierPropertiesListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDrmFormatModifierPropertiesListEXT; - void * pNext = {}; - uint32_t drmFormatModifierCount = {}; - VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT * pDrmFormatModifierProperties = {}; - }; - - template <> - struct CppType - { - using Type = DrmFormatModifierPropertiesListEXT; - }; - - struct EventCreateInfo - { - using NativeType = VkEventCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eEventCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR EventCreateInfo( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR EventCreateInfo( EventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - EventCreateInfo( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : EventCreateInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - EventCreateInfo & operator=( EventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - EventCreateInfo & operator=( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 EventCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 EventCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkEventCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkEventCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( EventCreateInfo const & ) const = default; -#else - bool operator==( EventCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( EventCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eEventCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::EventCreateFlags flags = {}; - }; - - template <> - struct CppType - { - using Type = EventCreateInfo; - }; - - struct ExportFenceCreateInfo - { - using NativeType = VkExportFenceCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportFenceCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( ExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportFenceCreateInfo( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportFenceCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportFenceCreateInfo & operator=( ExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportFenceCreateInfo & operator=( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportFenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportFenceCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportFenceCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportFenceCreateInfo const & ) const = default; -#else - bool operator==( ExportFenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExportFenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExportFenceCreateInfo; - }; - using ExportFenceCreateInfoKHR = ExportFenceCreateInfo; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ExportFenceWin32HandleInfoKHR - { - using NativeType = VkExportFenceWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportFenceWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, - DWORD dwAccess_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pAttributes( pAttributes_ ) - , dwAccess( dwAccess_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( ExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportFenceWin32HandleInfoKHR( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportFenceWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportFenceWin32HandleInfoKHR & operator=( ExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportFenceWin32HandleInfoKHR & operator=( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT - { - pAttributes = pAttributes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT - { - dwAccess = dwAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportFenceWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pAttributes, dwAccess, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportFenceWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ExportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ExportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR; - const void * pNext = {}; - const SECURITY_ATTRIBUTES * pAttributes = {}; - DWORD dwAccess = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ExportFenceWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct ExportMemoryAllocateInfo - { - using NativeType = VkExportMemoryAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( ExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryAllocateInfo( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMemoryAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMemoryAllocateInfo & operator=( ExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryAllocateInfo & operator=( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMemoryAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMemoryAllocateInfo const & ) const = default; -#else - bool operator==( ExportMemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExportMemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExportMemoryAllocateInfo; - }; - using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; - - struct ExportMemoryAllocateInfoNV - { - using NativeType = VkExportMemoryAllocateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryAllocateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( ExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryAllocateInfoNV( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMemoryAllocateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMemoryAllocateInfoNV & operator=( ExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryAllocateInfoNV & operator=( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfoNV & - setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMemoryAllocateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMemoryAllocateInfoNV const & ) const = default; -#else - bool operator==( ExportMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExportMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExportMemoryAllocateInfoNV; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ExportMemoryWin32HandleInfoKHR - { - using NativeType = VkExportMemoryWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, - DWORD dwAccess_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pAttributes( pAttributes_ ) - , dwAccess( dwAccess_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( ExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryWin32HandleInfoKHR( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMemoryWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMemoryWin32HandleInfoKHR & operator=( ExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryWin32HandleInfoKHR & operator=( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT - { - pAttributes = pAttributes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT - { - dwAccess = dwAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMemoryWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pAttributes, dwAccess, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMemoryWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ExportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ExportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR; - const void * pNext = {}; - const SECURITY_ATTRIBUTES * pAttributes = {}; - DWORD dwAccess = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ExportMemoryWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ExportMemoryWin32HandleInfoNV - { - using NativeType = VkExportMemoryWin32HandleInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryWin32HandleInfoNV; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES * pAttributes_ = {}, DWORD dwAccess_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pAttributes( pAttributes_ ) - , dwAccess( dwAccess_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( ExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryWin32HandleInfoNV( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMemoryWin32HandleInfoNV( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMemoryWin32HandleInfoNV & operator=( ExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMemoryWin32HandleInfoNV & operator=( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT - { - pAttributes = pAttributes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT - { - dwAccess = dwAccess_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMemoryWin32HandleInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pAttributes, dwAccess ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMemoryWin32HandleInfoNV const & ) const = default; -# else - bool operator==( ExportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ); -# endif - } - - bool operator!=( ExportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV; - const void * pNext = {}; - const SECURITY_ATTRIBUTES * pAttributes = {}; - DWORD dwAccess = {}; - }; - - template <> - struct CppType - { - using Type = ExportMemoryWin32HandleInfoNV; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalBufferInfoEXT - { - using NativeType = VkExportMetalBufferInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalBufferInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalBufferInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - MTLBuffer_id mtlBuffer_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , mtlBuffer( mtlBuffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalBufferInfoEXT( ExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalBufferInfoEXT( VkExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalBufferInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalBufferInfoEXT & operator=( ExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalBufferInfoEXT & operator=( VkExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setMtlBuffer( MTLBuffer_id mtlBuffer_ ) VULKAN_HPP_NOEXCEPT - { - mtlBuffer = mtlBuffer_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalBufferInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalBufferInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, mtlBuffer ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalBufferInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( mtlBuffer == rhs.mtlBuffer ); -# endif - } - - bool operator!=( ExportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalBufferInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - MTLBuffer_id mtlBuffer = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalBufferInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalCommandQueueInfoEXT - { - using NativeType = VkExportMetalCommandQueueInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalCommandQueueInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalCommandQueueInfoEXT( VULKAN_HPP_NAMESPACE::Queue queue_ = {}, - MTLCommandQueue_id mtlCommandQueue_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , queue( queue_ ) - , mtlCommandQueue( mtlCommandQueue_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalCommandQueueInfoEXT( ExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalCommandQueueInfoEXT( VkExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalCommandQueueInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalCommandQueueInfoEXT & operator=( ExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalCommandQueueInfoEXT & operator=( VkExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setQueue( VULKAN_HPP_NAMESPACE::Queue queue_ ) VULKAN_HPP_NOEXCEPT - { - queue = queue_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setMtlCommandQueue( MTLCommandQueue_id mtlCommandQueue_ ) VULKAN_HPP_NOEXCEPT - { - mtlCommandQueue = mtlCommandQueue_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalCommandQueueInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalCommandQueueInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, queue, mtlCommandQueue ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalCommandQueueInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalCommandQueueInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queue == rhs.queue ) && ( mtlCommandQueue == rhs.mtlCommandQueue ); -# endif - } - - bool operator!=( ExportMetalCommandQueueInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalCommandQueueInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Queue queue = {}; - MTLCommandQueue_id mtlCommandQueue = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalCommandQueueInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalDeviceInfoEXT - { - using NativeType = VkExportMetalDeviceInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalDeviceInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalDeviceInfoEXT( MTLDevice_id mtlDevice_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mtlDevice( mtlDevice_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalDeviceInfoEXT( ExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalDeviceInfoEXT( VkExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalDeviceInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalDeviceInfoEXT & operator=( ExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalDeviceInfoEXT & operator=( VkExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalDeviceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalDeviceInfoEXT & setMtlDevice( MTLDevice_id mtlDevice_ ) VULKAN_HPP_NOEXCEPT - { - mtlDevice = mtlDevice_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalDeviceInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalDeviceInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mtlDevice ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalDeviceInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalDeviceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlDevice == rhs.mtlDevice ); -# endif - } - - bool operator!=( ExportMetalDeviceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalDeviceInfoEXT; - const void * pNext = {}; - MTLDevice_id mtlDevice = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalDeviceInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalIOSurfaceInfoEXT - { - using NativeType = VkExportMetalIOSurfaceInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalIoSurfaceInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ExportMetalIOSurfaceInfoEXT( VULKAN_HPP_NAMESPACE::Image image_ = {}, IOSurfaceRef ioSurface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - , ioSurface( ioSurface_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalIOSurfaceInfoEXT( ExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalIOSurfaceInfoEXT( VkExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalIOSurfaceInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalIOSurfaceInfoEXT & operator=( ExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalIOSurfaceInfoEXT & operator=( VkExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setIoSurface( IOSurfaceRef ioSurface_ ) VULKAN_HPP_NOEXCEPT - { - ioSurface = ioSurface_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalIOSurfaceInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalIOSurfaceInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image, ioSurface ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalIOSurfaceInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( ioSurface == rhs.ioSurface ); -# endif - } - - bool operator!=( ExportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalIoSurfaceInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - IOSurfaceRef ioSurface = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalIOSurfaceInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalObjectCreateInfoEXT - { - using NativeType = VkExportMetalObjectCreateInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalObjectCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalObjectCreateInfoEXT( - VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType_ = VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT::eMetalDevice, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , exportObjectType( exportObjectType_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalObjectCreateInfoEXT( ExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalObjectCreateInfoEXT( VkExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalObjectCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalObjectCreateInfoEXT & operator=( ExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalObjectCreateInfoEXT & operator=( VkExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectCreateInfoEXT & - setExportObjectType( VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType_ ) VULKAN_HPP_NOEXCEPT - { - exportObjectType = exportObjectType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalObjectCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalObjectCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, exportObjectType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalObjectCreateInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalObjectCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportObjectType == rhs.exportObjectType ); -# endif - } - - bool operator!=( ExportMetalObjectCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalObjectCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType = VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT::eMetalDevice; - }; - - template <> - struct CppType - { - using Type = ExportMetalObjectCreateInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalObjectsInfoEXT - { - using NativeType = VkExportMetalObjectsInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalObjectsInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalObjectsInfoEXT( const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext( pNext_ ) {} - - VULKAN_HPP_CONSTEXPR ExportMetalObjectsInfoEXT( ExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalObjectsInfoEXT( VkExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalObjectsInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalObjectsInfoEXT & operator=( ExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalObjectsInfoEXT & operator=( VkExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalObjectsInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalObjectsInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalObjectsInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalObjectsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); -# endif - } - - bool operator!=( ExportMetalObjectsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalObjectsInfoEXT; - const void * pNext = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalObjectsInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalSharedEventInfoEXT - { - using NativeType = VkExportMetalSharedEventInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalSharedEventInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalSharedEventInfoEXT( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::Event event_ = {}, - MTLSharedEvent_id mtlSharedEvent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , event( event_ ) - , mtlSharedEvent( mtlSharedEvent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalSharedEventInfoEXT( ExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalSharedEventInfoEXT( VkExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalSharedEventInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalSharedEventInfoEXT & operator=( ExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalSharedEventInfoEXT & operator=( VkExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setEvent( VULKAN_HPP_NAMESPACE::Event event_ ) VULKAN_HPP_NOEXCEPT - { - event = event_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setMtlSharedEvent( MTLSharedEvent_id mtlSharedEvent_ ) VULKAN_HPP_NOEXCEPT - { - mtlSharedEvent = mtlSharedEvent_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalSharedEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalSharedEventInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, event, mtlSharedEvent ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalSharedEventInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( event == rhs.event ) && - ( mtlSharedEvent == rhs.mtlSharedEvent ); -# endif - } - - bool operator!=( ExportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalSharedEventInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::Event event = {}; - MTLSharedEvent_id mtlSharedEvent = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalSharedEventInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ExportMetalTextureInfoEXT - { - using NativeType = VkExportMetalTextureInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalTextureInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportMetalTextureInfoEXT( VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::BufferView bufferView_ = {}, - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, - MTLTexture_id mtlTexture_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - , imageView( imageView_ ) - , bufferView( bufferView_ ) - , plane( plane_ ) - , mtlTexture( mtlTexture_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportMetalTextureInfoEXT( ExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalTextureInfoEXT( VkExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportMetalTextureInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportMetalTextureInfoEXT & operator=( ExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportMetalTextureInfoEXT & operator=( VkExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView_ ) VULKAN_HPP_NOEXCEPT - { - bufferView = bufferView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setPlane( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ ) VULKAN_HPP_NOEXCEPT - { - plane = plane_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setMtlTexture( MTLTexture_id mtlTexture_ ) VULKAN_HPP_NOEXCEPT - { - mtlTexture = mtlTexture_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportMetalTextureInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportMetalTextureInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image, imageView, bufferView, plane, mtlTexture ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportMetalTextureInfoEXT const & ) const = default; -# else - bool operator==( ExportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( imageView == rhs.imageView ) && ( bufferView == rhs.bufferView ) && - ( plane == rhs.plane ) && ( mtlTexture == rhs.mtlTexture ); -# endif - } - - bool operator!=( ExportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalTextureInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::BufferView bufferView = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; - MTLTexture_id mtlTexture = {}; - }; - - template <> - struct CppType - { - using Type = ExportMetalTextureInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - struct ExportSemaphoreCreateInfo - { - using NativeType = VkExportSemaphoreCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportSemaphoreCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( ExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportSemaphoreCreateInfo( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportSemaphoreCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportSemaphoreCreateInfo & operator=( ExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportSemaphoreCreateInfo & operator=( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreCreateInfo & - setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportSemaphoreCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportSemaphoreCreateInfo const & ) const = default; -#else - bool operator==( ExportSemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExportSemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExportSemaphoreCreateInfo; - }; - using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ExportSemaphoreWin32HandleInfoKHR - { - using NativeType = VkExportSemaphoreWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportSemaphoreWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, - DWORD dwAccess_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pAttributes( pAttributes_ ) - , dwAccess( dwAccess_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( ExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportSemaphoreWin32HandleInfoKHR( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ExportSemaphoreWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExportSemaphoreWin32HandleInfoKHR & operator=( ExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExportSemaphoreWin32HandleInfoKHR & operator=( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT - { - pAttributes = pAttributes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT - { - dwAccess = dwAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExportSemaphoreWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pAttributes, dwAccess, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExportSemaphoreWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ExportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ExportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR; - const void * pNext = {}; - const SECURITY_ATTRIBUTES * pAttributes = {}; - DWORD dwAccess = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ExportSemaphoreWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct ExtensionProperties - { - using NativeType = VkExtensionProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ExtensionProperties( std::array const & extensionName_ = {}, - uint32_t specVersion_ = {} ) VULKAN_HPP_NOEXCEPT - : extensionName( extensionName_ ) - , specVersion( specVersion_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ExtensionProperties( ExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExtensionProperties( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExtensionProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExtensionProperties & operator=( ExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExtensionProperties & operator=( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExtensionProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExtensionProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, uint32_t const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( extensionName, specVersion ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExtensionProperties const & ) const = default; -#else - bool operator==( ExtensionProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( extensionName == rhs.extensionName ) && ( specVersion == rhs.specVersion ); -# endif - } - - bool operator!=( ExtensionProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ArrayWrapper1D extensionName = {}; - uint32_t specVersion = {}; - }; - - struct ExternalMemoryProperties - { - using NativeType = VkExternalMemoryProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalMemoryProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlags externalMemoryFeatures_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags compatibleHandleTypes_ = {} ) VULKAN_HPP_NOEXCEPT - : externalMemoryFeatures( externalMemoryFeatures_ ) - , exportFromImportedHandleTypes( exportFromImportedHandleTypes_ ) - , compatibleHandleTypes( compatibleHandleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalMemoryProperties( ExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryProperties( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalMemoryProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalMemoryProperties & operator=( ExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryProperties & operator=( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalMemoryProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalMemoryProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( externalMemoryFeatures, exportFromImportedHandleTypes, compatibleHandleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalMemoryProperties const & ) const = default; -#else - bool operator==( ExternalMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( externalMemoryFeatures == rhs.externalMemoryFeatures ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && - ( compatibleHandleTypes == rhs.compatibleHandleTypes ); -# endif - } - - bool operator!=( ExternalMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlags externalMemoryFeatures = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags compatibleHandleTypes = {}; - }; - using ExternalMemoryPropertiesKHR = ExternalMemoryProperties; - - struct ExternalBufferProperties - { - using NativeType = VkExternalBufferProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalBufferProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalBufferProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , externalMemoryProperties( externalMemoryProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalBufferProperties( ExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalBufferProperties( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalBufferProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalBufferProperties & operator=( ExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalBufferProperties & operator=( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalBufferProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalBufferProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, externalMemoryProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalBufferProperties const & ) const = default; -#else - bool operator==( ExternalBufferProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryProperties == rhs.externalMemoryProperties ); -# endif - } - - bool operator!=( ExternalBufferProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalBufferProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {}; - }; - - template <> - struct CppType - { - using Type = ExternalBufferProperties; - }; - using ExternalBufferPropertiesKHR = ExternalBufferProperties; - - struct ExternalFenceProperties - { - using NativeType = VkExternalFenceProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalFenceProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalFenceProperties( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , exportFromImportedHandleTypes( exportFromImportedHandleTypes_ ) - , compatibleHandleTypes( compatibleHandleTypes_ ) - , externalFenceFeatures( externalFenceFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalFenceProperties( ExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalFenceProperties( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalFenceProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalFenceProperties & operator=( ExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalFenceProperties & operator=( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalFenceProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalFenceProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, exportFromImportedHandleTypes, compatibleHandleTypes, externalFenceFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalFenceProperties const & ) const = default; -#else - bool operator==( ExternalFenceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && - ( compatibleHandleTypes == rhs.compatibleHandleTypes ) && ( externalFenceFeatures == rhs.externalFenceFeatures ); -# endif - } - - bool operator!=( ExternalFenceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFenceProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures = {}; - }; - - template <> - struct CppType - { - using Type = ExternalFenceProperties; - }; - using ExternalFencePropertiesKHR = ExternalFenceProperties; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct ExternalFormatANDROID - { - using NativeType = VkExternalFormatANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalFormatANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( uint64_t externalFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , externalFormat( externalFormat_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( ExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalFormatANDROID( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalFormatANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalFormatANDROID & operator=( ExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalFormatANDROID & operator=( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExternalFormatANDROID & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExternalFormatANDROID & setExternalFormat( uint64_t externalFormat_ ) VULKAN_HPP_NOEXCEPT - { - externalFormat = externalFormat_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExternalFormatANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalFormatANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, externalFormat ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalFormatANDROID const & ) const = default; -# else - bool operator==( ExternalFormatANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalFormat == rhs.externalFormat ); -# endif - } - - bool operator!=( ExternalFormatANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFormatANDROID; - void * pNext = {}; - uint64_t externalFormat = {}; - }; - - template <> - struct CppType - { - using Type = ExternalFormatANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - struct ExternalImageFormatProperties - { - using NativeType = VkExternalImageFormatProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalImageFormatProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalImageFormatProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , externalMemoryProperties( externalMemoryProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalImageFormatProperties( ExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalImageFormatProperties( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalImageFormatProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalImageFormatProperties & operator=( ExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalImageFormatProperties & operator=( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalImageFormatProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, externalMemoryProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalImageFormatProperties const & ) const = default; -#else - bool operator==( ExternalImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryProperties == rhs.externalMemoryProperties ); -# endif - } - - bool operator!=( ExternalImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalImageFormatProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {}; - }; - - template <> - struct CppType - { - using Type = ExternalImageFormatProperties; - }; - using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; - - struct ImageFormatProperties - { - using NativeType = VkImageFormatProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageFormatProperties( VULKAN_HPP_NAMESPACE::Extent3D maxExtent_ = {}, - uint32_t maxMipLevels_ = {}, - uint32_t maxArrayLayers_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize maxResourceSize_ = {} ) VULKAN_HPP_NOEXCEPT - : maxExtent( maxExtent_ ) - , maxMipLevels( maxMipLevels_ ) - , maxArrayLayers( maxArrayLayers_ ) - , sampleCounts( sampleCounts_ ) - , maxResourceSize( maxResourceSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageFormatProperties( ImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatProperties( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageFormatProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageFormatProperties & operator=( ImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatProperties & operator=( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageFormatProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( maxExtent, maxMipLevels, maxArrayLayers, sampleCounts, maxResourceSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageFormatProperties const & ) const = default; -#else - bool operator==( ImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( maxExtent == rhs.maxExtent ) && ( maxMipLevels == rhs.maxMipLevels ) && ( maxArrayLayers == rhs.maxArrayLayers ) && - ( sampleCounts == rhs.sampleCounts ) && ( maxResourceSize == rhs.maxResourceSize ); -# endif - } - - bool operator!=( ImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Extent3D maxExtent = {}; - uint32_t maxMipLevels = {}; - uint32_t maxArrayLayers = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxResourceSize = {}; - }; - - struct ExternalImageFormatPropertiesNV - { - using NativeType = VkExternalImageFormatPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlagsNV externalMemoryFeatures_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes_ = {} ) VULKAN_HPP_NOEXCEPT - : imageFormatProperties( imageFormatProperties_ ) - , externalMemoryFeatures( externalMemoryFeatures_ ) - , exportFromImportedHandleTypes( exportFromImportedHandleTypes_ ) - , compatibleHandleTypes( compatibleHandleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalImageFormatPropertiesNV( ExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalImageFormatPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalImageFormatPropertiesNV & operator=( ExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalImageFormatPropertiesNV & operator=( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalImageFormatPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalImageFormatPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( imageFormatProperties, externalMemoryFeatures, exportFromImportedHandleTypes, compatibleHandleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalImageFormatPropertiesNV const & ) const = default; -#else - bool operator==( ExternalImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( imageFormatProperties == rhs.imageFormatProperties ) && ( externalMemoryFeatures == rhs.externalMemoryFeatures ) && - ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && ( compatibleHandleTypes == rhs.compatibleHandleTypes ); -# endif - } - - bool operator!=( ExternalImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlagsNV externalMemoryFeatures = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes = {}; - }; - - struct ExternalMemoryBufferCreateInfo - { - using NativeType = VkExternalMemoryBufferCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryBufferCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( ExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryBufferCreateInfo( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalMemoryBufferCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalMemoryBufferCreateInfo & operator=( ExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryBufferCreateInfo & operator=( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryBufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryBufferCreateInfo & - setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExternalMemoryBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalMemoryBufferCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalMemoryBufferCreateInfo const & ) const = default; -#else - bool operator==( ExternalMemoryBufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExternalMemoryBufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryBufferCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExternalMemoryBufferCreateInfo; - }; - using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; - - struct ExternalMemoryImageCreateInfo - { - using NativeType = VkExternalMemoryImageCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryImageCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( ExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryImageCreateInfo( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalMemoryImageCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalMemoryImageCreateInfo & operator=( ExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryImageCreateInfo & operator=( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfo & - setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExternalMemoryImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalMemoryImageCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalMemoryImageCreateInfo const & ) const = default; -#else - bool operator==( ExternalMemoryImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExternalMemoryImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExternalMemoryImageCreateInfo; - }; - using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; - - struct ExternalMemoryImageCreateInfoNV - { - using NativeType = VkExternalMemoryImageCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryImageCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleTypes( handleTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( ExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryImageCreateInfoNV( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalMemoryImageCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalMemoryImageCreateInfoNV & operator=( ExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalMemoryImageCreateInfoNV & operator=( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfoNV & - setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT - { - handleTypes = handleTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkExternalMemoryImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalMemoryImageCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalMemoryImageCreateInfoNV const & ) const = default; -#else - bool operator==( ExternalMemoryImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); -# endif - } - - bool operator!=( ExternalMemoryImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {}; - }; - - template <> - struct CppType - { - using Type = ExternalMemoryImageCreateInfoNV; - }; - - struct ExternalSemaphoreProperties - { - using NativeType = VkExternalSemaphoreProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalSemaphoreProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ExternalSemaphoreProperties( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , exportFromImportedHandleTypes( exportFromImportedHandleTypes_ ) - , compatibleHandleTypes( compatibleHandleTypes_ ) - , externalSemaphoreFeatures( externalSemaphoreFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR ExternalSemaphoreProperties( ExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalSemaphoreProperties( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : ExternalSemaphoreProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ExternalSemaphoreProperties & operator=( ExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ExternalSemaphoreProperties & operator=( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkExternalSemaphoreProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkExternalSemaphoreProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, exportFromImportedHandleTypes, compatibleHandleTypes, externalSemaphoreFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ExternalSemaphoreProperties const & ) const = default; -#else - bool operator==( ExternalSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && - ( compatibleHandleTypes == rhs.compatibleHandleTypes ) && ( externalSemaphoreFeatures == rhs.externalSemaphoreFeatures ); -# endif - } - - bool operator!=( ExternalSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalSemaphoreProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures = {}; - }; - - template <> - struct CppType - { - using Type = ExternalSemaphoreProperties; - }; - using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; - - struct FenceCreateInfo - { - using NativeType = VkFenceCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FenceCreateInfo( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR FenceCreateInfo( FenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceCreateInfo( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : FenceCreateInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FenceCreateInfo & operator=( FenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceCreateInfo & operator=( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FenceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFenceCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FenceCreateInfo const & ) const = default; -#else - bool operator==( FenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( FenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::FenceCreateFlags flags = {}; - }; - - template <> - struct CppType - { - using Type = FenceCreateInfo; - }; - - struct FenceGetFdInfoKHR - { - using NativeType = VkFenceGetFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceGetFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - FenceGetFdInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fence( fence_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( FenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceGetFdInfoKHR( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : FenceGetFdInfoKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FenceGetFdInfoKHR & operator=( FenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceGetFdInfoKHR & operator=( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT - { - fence = fence_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFenceGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFenceGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fence, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FenceGetFdInfoKHR const & ) const = default; -#else - bool operator==( FenceGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( FenceGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceGetFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Fence fence = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = FenceGetFdInfoKHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct FenceGetWin32HandleInfoKHR - { - using NativeType = VkFenceGetWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceGetWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::Fence fence_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fence( fence_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( FenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceGetWin32HandleInfoKHR( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : FenceGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FenceGetWin32HandleInfoKHR & operator=( FenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FenceGetWin32HandleInfoKHR & operator=( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT - { - fence = fence_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFenceGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFenceGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fence, handleType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FenceGetWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( FenceGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( FenceGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Fence fence = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = FenceGetWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct FilterCubicImageViewImageFormatPropertiesEXT - { - using NativeType = VkFilterCubicImageViewImageFormatPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FilterCubicImageViewImageFormatPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 filterCubic_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , filterCubic( filterCubic_ ) - , filterCubicMinmax( filterCubicMinmax_ ) - { - } - - VULKAN_HPP_CONSTEXPR FilterCubicImageViewImageFormatPropertiesEXT( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FilterCubicImageViewImageFormatPropertiesEXT( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : FilterCubicImageViewImageFormatPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FilterCubicImageViewImageFormatPropertiesEXT & operator=( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FilterCubicImageViewImageFormatPropertiesEXT & operator=( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkFilterCubicImageViewImageFormatPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFilterCubicImageViewImageFormatPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, filterCubic, filterCubicMinmax ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FilterCubicImageViewImageFormatPropertiesEXT const & ) const = default; -#else - bool operator==( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterCubic == rhs.filterCubic ) && ( filterCubicMinmax == rhs.filterCubicMinmax ); -# endif - } - - bool operator!=( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterCubic = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax = {}; - }; - - template <> - struct CppType - { - using Type = FilterCubicImageViewImageFormatPropertiesEXT; - }; - - struct FormatProperties - { - using NativeType = VkFormatProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FormatProperties( VULKAN_HPP_NAMESPACE::FormatFeatureFlags linearTilingFeatures_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags optimalTilingFeatures_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags bufferFeatures_ = {} ) VULKAN_HPP_NOEXCEPT - : linearTilingFeatures( linearTilingFeatures_ ) - , optimalTilingFeatures( optimalTilingFeatures_ ) - , bufferFeatures( bufferFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR FormatProperties( FormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FormatProperties & operator=( FormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties & operator=( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkFormatProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFormatProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( linearTilingFeatures, optimalTilingFeatures, bufferFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FormatProperties const & ) const = default; -#else - bool operator==( FormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( linearTilingFeatures == rhs.linearTilingFeatures ) && ( optimalTilingFeatures == rhs.optimalTilingFeatures ) && - ( bufferFeatures == rhs.bufferFeatures ); -# endif - } - - bool operator!=( FormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::FormatFeatureFlags linearTilingFeatures = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags optimalTilingFeatures = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags bufferFeatures = {}; - }; - - struct FormatProperties2 - { - using NativeType = VkFormatProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFormatProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FormatProperties2( VULKAN_HPP_NAMESPACE::FormatProperties formatProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , formatProperties( formatProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR FormatProperties2( FormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties2( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FormatProperties2 & operator=( FormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties2 & operator=( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFormatProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, formatProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FormatProperties2 const & ) const = default; -#else - bool operator==( FormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatProperties == rhs.formatProperties ); -# endif - } - - bool operator!=( FormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFormatProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::FormatProperties formatProperties = {}; - }; - - template <> - struct CppType - { - using Type = FormatProperties2; - }; - using FormatProperties2KHR = FormatProperties2; - - struct FormatProperties3 - { - using NativeType = VkFormatProperties3; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFormatProperties3; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FormatProperties3( VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 linearTilingFeatures_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 optimalTilingFeatures_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 bufferFeatures_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , linearTilingFeatures( linearTilingFeatures_ ) - , optimalTilingFeatures( optimalTilingFeatures_ ) - , bufferFeatures( bufferFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR FormatProperties3( FormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties3( VkFormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties3( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FormatProperties3 & operator=( FormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FormatProperties3 & operator=( VkFormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkFormatProperties3 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFormatProperties3 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, linearTilingFeatures, optimalTilingFeatures, bufferFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FormatProperties3 const & ) const = default; -#else - bool operator==( FormatProperties3 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( linearTilingFeatures == rhs.linearTilingFeatures ) && - ( optimalTilingFeatures == rhs.optimalTilingFeatures ) && ( bufferFeatures == rhs.bufferFeatures ); -# endif - } - - bool operator!=( FormatProperties3 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFormatProperties3; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 linearTilingFeatures = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 optimalTilingFeatures = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 bufferFeatures = {}; - }; - - template <> - struct CppType - { - using Type = FormatProperties3; - }; - using FormatProperties3KHR = FormatProperties3; - - struct FragmentShadingRateAttachmentInfoKHR - { - using NativeType = VkFragmentShadingRateAttachmentInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFragmentShadingRateAttachmentInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FragmentShadingRateAttachmentInfoKHR( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pFragmentShadingRateAttachment( pFragmentShadingRateAttachment_ ) - , shadingRateAttachmentTexelSize( shadingRateAttachmentTexelSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR FragmentShadingRateAttachmentInfoKHR( FragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FragmentShadingRateAttachmentInfoKHR( VkFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : FragmentShadingRateAttachmentInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FragmentShadingRateAttachmentInfoKHR & operator=( FragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FragmentShadingRateAttachmentInfoKHR & operator=( VkFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & - setPFragmentShadingRateAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pFragmentShadingRateAttachment = pFragmentShadingRateAttachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & - setShadingRateAttachmentTexelSize( VULKAN_HPP_NAMESPACE::Extent2D const & shadingRateAttachmentTexelSize_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateAttachmentTexelSize = shadingRateAttachmentTexelSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFragmentShadingRateAttachmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFragmentShadingRateAttachmentInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pFragmentShadingRateAttachment, shadingRateAttachmentTexelSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FragmentShadingRateAttachmentInfoKHR const & ) const = default; -#else - bool operator==( FragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pFragmentShadingRateAttachment == rhs.pFragmentShadingRateAttachment ) && - ( shadingRateAttachmentTexelSize == rhs.shadingRateAttachmentTexelSize ); -# endif - } - - bool operator!=( FragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFragmentShadingRateAttachmentInfoKHR; - const void * pNext = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment = {}; - VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize = {}; - }; - - template <> - struct CppType - { - using Type = FragmentShadingRateAttachmentInfoKHR; - }; - - struct FramebufferAttachmentImageInfo - { - using NativeType = VkFramebufferAttachmentImageInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferAttachmentImageInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, - uint32_t width_ = {}, - uint32_t height_ = {}, - uint32_t layerCount_ = {}, - uint32_t viewFormatCount_ = {}, - const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , usage( usage_ ) - , width( width_ ) - , height( height_ ) - , layerCount( layerCount_ ) - , viewFormatCount( viewFormatCount_ ) - , pViewFormats( pViewFormats_ ) - { - } - - VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfo( FramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferAttachmentImageInfo( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : FramebufferAttachmentImageInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferAttachmentImageInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, - uint32_t width_, - uint32_t height_, - uint32_t layerCount_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , usage( usage_ ) - , width( width_ ) - , height( height_ ) - , layerCount( layerCount_ ) - , viewFormatCount( static_cast( viewFormats_.size() ) ) - , pViewFormats( viewFormats_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FramebufferAttachmentImageInfo & operator=( FramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferAttachmentImageInfo & operator=( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT - { - viewFormatCount = viewFormatCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ ) VULKAN_HPP_NOEXCEPT - { - pViewFormats = pViewFormats_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferAttachmentImageInfo & - setViewFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) VULKAN_HPP_NOEXCEPT - { - viewFormatCount = static_cast( viewFormats_.size() ); - pViewFormats = viewFormats_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFramebufferAttachmentImageInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFramebufferAttachmentImageInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, usage, width, height, layerCount, viewFormatCount, pViewFormats ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FramebufferAttachmentImageInfo const & ) const = default; -#else - bool operator==( FramebufferAttachmentImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( usage == rhs.usage ) && ( width == rhs.width ) && - ( height == rhs.height ) && ( layerCount == rhs.layerCount ) && ( viewFormatCount == rhs.viewFormatCount ) && ( pViewFormats == rhs.pViewFormats ); -# endif - } - - bool operator!=( FramebufferAttachmentImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferAttachmentImageInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; - uint32_t width = {}; - uint32_t height = {}; - uint32_t layerCount = {}; - uint32_t viewFormatCount = {}; - const VULKAN_HPP_NAMESPACE::Format * pViewFormats = {}; - }; - - template <> - struct CppType - { - using Type = FramebufferAttachmentImageInfo; - }; - using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; - - struct FramebufferAttachmentsCreateInfo - { - using NativeType = VkFramebufferAttachmentsCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferAttachmentsCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfo( uint32_t attachmentImageInfoCount_ = {}, - const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachmentImageInfoCount( attachmentImageInfoCount_ ) - , pAttachmentImageInfos( pAttachmentImageInfos_ ) - { - } - - VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfo( FramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferAttachmentsCreateInfo( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : FramebufferAttachmentsCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferAttachmentsCreateInfo( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentImageInfos_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , attachmentImageInfoCount( static_cast( attachmentImageInfos_.size() ) ) - , pAttachmentImageInfos( attachmentImageInfos_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FramebufferAttachmentsCreateInfo & operator=( FramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferAttachmentsCreateInfo & operator=( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & setAttachmentImageInfoCount( uint32_t attachmentImageInfoCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentImageInfoCount = attachmentImageInfoCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & - setPAttachmentImageInfos( const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT - { - pAttachmentImageInfos = pAttachmentImageInfos_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferAttachmentsCreateInfo & setAttachmentImageInfos( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentImageInfos_ ) - VULKAN_HPP_NOEXCEPT - { - attachmentImageInfoCount = static_cast( attachmentImageInfos_.size() ); - pAttachmentImageInfos = attachmentImageInfos_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFramebufferAttachmentsCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFramebufferAttachmentsCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, attachmentImageInfoCount, pAttachmentImageInfos ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FramebufferAttachmentsCreateInfo const & ) const = default; -#else - bool operator==( FramebufferAttachmentsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentImageInfoCount == rhs.attachmentImageInfoCount ) && - ( pAttachmentImageInfos == rhs.pAttachmentImageInfos ); -# endif - } - - bool operator!=( FramebufferAttachmentsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferAttachmentsCreateInfo; - const void * pNext = {}; - uint32_t attachmentImageInfoCount = {}; - const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos = {}; - }; - - template <> - struct CppType - { - using Type = FramebufferAttachmentsCreateInfo; - }; - using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; - - struct FramebufferCreateInfo - { - using NativeType = VkFramebufferCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ = {}, - uint32_t width_ = {}, - uint32_t height_ = {}, - uint32_t layers_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , renderPass( renderPass_ ) - , attachmentCount( attachmentCount_ ) - , pAttachments( pAttachments_ ) - , width( width_ ) - , height( height_ ) - , layers( layers_ ) - { - } - - VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( FramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferCreateInfo( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : FramebufferCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferCreateInfo( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_, - VULKAN_HPP_NAMESPACE::RenderPass renderPass_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, - uint32_t width_ = {}, - uint32_t height_ = {}, - uint32_t layers_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , renderPass( renderPass_ ) - , attachmentCount( static_cast( attachments_.size() ) ) - , pAttachments( attachments_.data() ) - , width( width_ ) - , height( height_ ) - , layers( layers_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FramebufferCreateInfo & operator=( FramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferCreateInfo & operator=( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT - { - renderPass = renderPass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pAttachments = pAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - FramebufferCreateInfo & - setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( attachments_.size() ); - pAttachments = attachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setLayers( uint32_t layers_ ) VULKAN_HPP_NOEXCEPT - { - layers = layers_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkFramebufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFramebufferCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, renderPass, attachmentCount, pAttachments, width, height, layers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FramebufferCreateInfo const & ) const = default; -#else - bool operator==( FramebufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( renderPass == rhs.renderPass ) && - ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( width == rhs.width ) && ( height == rhs.height ) && - ( layers == rhs.layers ); -# endif - } - - bool operator!=( FramebufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::ImageView * pAttachments = {}; - uint32_t width = {}; - uint32_t height = {}; - uint32_t layers = {}; - }; - - template <> - struct CppType - { - using Type = FramebufferCreateInfo; - }; - - struct FramebufferMixedSamplesCombinationNV - { - using NativeType = VkFramebufferMixedSamplesCombinationNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferMixedSamplesCombinationNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR FramebufferMixedSamplesCombinationNV( - VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::SampleCountFlags depthStencilSamples_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags colorSamples_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , coverageReductionMode( coverageReductionMode_ ) - , rasterizationSamples( rasterizationSamples_ ) - , depthStencilSamples( depthStencilSamples_ ) - , colorSamples( colorSamples_ ) - { - } - - VULKAN_HPP_CONSTEXPR FramebufferMixedSamplesCombinationNV( FramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferMixedSamplesCombinationNV( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT - : FramebufferMixedSamplesCombinationNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - FramebufferMixedSamplesCombinationNV & operator=( FramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - FramebufferMixedSamplesCombinationNV & operator=( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkFramebufferMixedSamplesCombinationNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkFramebufferMixedSamplesCombinationNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, coverageReductionMode, rasterizationSamples, depthStencilSamples, colorSamples ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( FramebufferMixedSamplesCombinationNV const & ) const = default; -#else - bool operator==( FramebufferMixedSamplesCombinationNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( coverageReductionMode == rhs.coverageReductionMode ) && - ( rasterizationSamples == rhs.rasterizationSamples ) && ( depthStencilSamples == rhs.depthStencilSamples ) && ( colorSamples == rhs.colorSamples ); -# endif - } - - bool operator!=( FramebufferMixedSamplesCombinationNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferMixedSamplesCombinationNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::SampleCountFlags depthStencilSamples = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags colorSamples = {}; - }; - - template <> - struct CppType - { - using Type = FramebufferMixedSamplesCombinationNV; - }; - - struct IndirectCommandsStreamNV - { - using NativeType = VkIndirectCommandsStreamNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR IndirectCommandsStreamNV( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {} ) VULKAN_HPP_NOEXCEPT - : buffer( buffer_ ) - , offset( offset_ ) - { - } - - VULKAN_HPP_CONSTEXPR IndirectCommandsStreamNV( IndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsStreamNV( VkIndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT - : IndirectCommandsStreamNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - IndirectCommandsStreamNV & operator=( IndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsStreamNV & operator=( VkIndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsStreamNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsStreamNV & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkIndirectCommandsStreamNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkIndirectCommandsStreamNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( buffer, offset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsStreamNV const & ) const = default; -#else - bool operator==( IndirectCommandsStreamNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( buffer == rhs.buffer ) && ( offset == rhs.offset ); -# endif - } - - bool operator!=( IndirectCommandsStreamNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - }; - - struct GeneratedCommandsInfoNV - { - using NativeType = VkGeneratedCommandsInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - GeneratedCommandsInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ = {}, - uint32_t streamCount_ = {}, - const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams_ = {}, - uint32_t sequencesCount_ = {}, - VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, - VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {}, - VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , pipeline( pipeline_ ) - , indirectCommandsLayout( indirectCommandsLayout_ ) - , streamCount( streamCount_ ) - , pStreams( pStreams_ ) - , sequencesCount( sequencesCount_ ) - , preprocessBuffer( preprocessBuffer_ ) - , preprocessOffset( preprocessOffset_ ) - , preprocessSize( preprocessSize_ ) - , sequencesCountBuffer( sequencesCountBuffer_ ) - , sequencesCountOffset( sequencesCountOffset_ ) - , sequencesIndexBuffer( sequencesIndexBuffer_ ) - , sequencesIndexOffset( sequencesIndexOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeneratedCommandsInfoNV( GeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeneratedCommandsInfoNV( VkGeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : GeneratedCommandsInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GeneratedCommandsInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, - VULKAN_HPP_NAMESPACE::Pipeline pipeline_, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streams_, - uint32_t sequencesCount_ = {}, - VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, - VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {}, - VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , pipeline( pipeline_ ) - , indirectCommandsLayout( indirectCommandsLayout_ ) - , streamCount( static_cast( streams_.size() ) ) - , pStreams( streams_.data() ) - , sequencesCount( sequencesCount_ ) - , preprocessBuffer( preprocessBuffer_ ) - , preprocessOffset( preprocessOffset_ ) - , preprocessSize( preprocessSize_ ) - , sequencesCountBuffer( sequencesCountBuffer_ ) - , sequencesCountOffset( sequencesCountOffset_ ) - , sequencesIndexBuffer( sequencesIndexBuffer_ ) - , sequencesIndexOffset( sequencesIndexOffset_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeneratedCommandsInfoNV & operator=( GeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeneratedCommandsInfoNV & operator=( VkGeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT - { - pipeline = pipeline_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & - setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT - { - indirectCommandsLayout = indirectCommandsLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setStreamCount( uint32_t streamCount_ ) VULKAN_HPP_NOEXCEPT - { - streamCount = streamCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPStreams( const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams_ ) VULKAN_HPP_NOEXCEPT - { - pStreams = pStreams_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GeneratedCommandsInfoNV & - setStreams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streams_ ) VULKAN_HPP_NOEXCEPT - { - streamCount = static_cast( streams_.size() ); - pStreams = streams_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCount( uint32_t sequencesCount_ ) VULKAN_HPP_NOEXCEPT - { - sequencesCount = sequencesCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessBuffer( VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ ) VULKAN_HPP_NOEXCEPT - { - preprocessBuffer = preprocessBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessOffset( VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ ) VULKAN_HPP_NOEXCEPT - { - preprocessOffset = preprocessOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessSize( VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ ) VULKAN_HPP_NOEXCEPT - { - preprocessSize = preprocessSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCountBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ ) VULKAN_HPP_NOEXCEPT - { - sequencesCountBuffer = sequencesCountBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCountOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ ) VULKAN_HPP_NOEXCEPT - { - sequencesCountOffset = sequencesCountOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ ) VULKAN_HPP_NOEXCEPT - { - sequencesIndexBuffer = sequencesIndexBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ ) VULKAN_HPP_NOEXCEPT - { - sequencesIndexOffset = sequencesIndexOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeneratedCommandsInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeneratedCommandsInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - pipelineBindPoint, - pipeline, - indirectCommandsLayout, - streamCount, - pStreams, - sequencesCount, - preprocessBuffer, - preprocessOffset, - preprocessSize, - sequencesCountBuffer, - sequencesCountOffset, - sequencesIndexBuffer, - sequencesIndexOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeneratedCommandsInfoNV const & ) const = default; -#else - bool operator==( GeneratedCommandsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipeline == rhs.pipeline ) && - ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( streamCount == rhs.streamCount ) && ( pStreams == rhs.pStreams ) && - ( sequencesCount == rhs.sequencesCount ) && ( preprocessBuffer == rhs.preprocessBuffer ) && ( preprocessOffset == rhs.preprocessOffset ) && - ( preprocessSize == rhs.preprocessSize ) && ( sequencesCountBuffer == rhs.sequencesCountBuffer ) && - ( sequencesCountOffset == rhs.sequencesCountOffset ) && ( sequencesIndexBuffer == rhs.sequencesIndexBuffer ) && - ( sequencesIndexOffset == rhs.sequencesIndexOffset ); -# endif - } - - bool operator!=( GeneratedCommandsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout = {}; - uint32_t streamCount = {}; - const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams = {}; - uint32_t sequencesCount = {}; - VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize = {}; - VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset = {}; - VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset = {}; - }; - - template <> - struct CppType - { - using Type = GeneratedCommandsInfoNV; - }; - - struct GeneratedCommandsMemoryRequirementsInfoNV - { - using NativeType = VkGeneratedCommandsMemoryRequirementsInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsMemoryRequirementsInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoNV( - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ = {}, - uint32_t maxSequencesCount_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , pipeline( pipeline_ ) - , indirectCommandsLayout( indirectCommandsLayout_ ) - , maxSequencesCount( maxSequencesCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoNV( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeneratedCommandsMemoryRequirementsInfoNV( VkGeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : GeneratedCommandsMemoryRequirementsInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GeneratedCommandsMemoryRequirementsInfoNV & operator=( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GeneratedCommandsMemoryRequirementsInfoNV & operator=( VkGeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & - setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT - { - pipeline = pipeline_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & - setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT - { - indirectCommandsLayout = indirectCommandsLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setMaxSequencesCount( uint32_t maxSequencesCount_ ) VULKAN_HPP_NOEXCEPT - { - maxSequencesCount = maxSequencesCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGeneratedCommandsMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGeneratedCommandsMemoryRequirementsInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineBindPoint, pipeline, indirectCommandsLayout, maxSequencesCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GeneratedCommandsMemoryRequirementsInfoNV const & ) const = default; -#else - bool operator==( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipeline == rhs.pipeline ) && - ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( maxSequencesCount == rhs.maxSequencesCount ); -# endif - } - - bool operator!=( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsMemoryRequirementsInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout = {}; - uint32_t maxSequencesCount = {}; - }; - - template <> - struct CppType - { - using Type = GeneratedCommandsMemoryRequirementsInfoNV; - }; - - struct VertexInputBindingDescription - { - using NativeType = VkVertexInputBindingDescription; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VertexInputBindingDescription( uint32_t binding_ = {}, - uint32_t stride_ = {}, - VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex ) VULKAN_HPP_NOEXCEPT - : binding( binding_ ) - , stride( stride_ ) - , inputRate( inputRate_ ) - { - } - - VULKAN_HPP_CONSTEXPR VertexInputBindingDescription( VertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDescription( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT - : VertexInputBindingDescription( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VertexInputBindingDescription & operator=( VertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDescription & operator=( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setInputRate( VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT - { - inputRate = inputRate_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVertexInputBindingDescription const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVertexInputBindingDescription &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( binding, stride, inputRate ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VertexInputBindingDescription const & ) const = default; -#else - bool operator==( VertexInputBindingDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( binding == rhs.binding ) && ( stride == rhs.stride ) && ( inputRate == rhs.inputRate ); -# endif - } - - bool operator!=( VertexInputBindingDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t binding = {}; - uint32_t stride = {}; - VULKAN_HPP_NAMESPACE::VertexInputRate inputRate = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex; - }; - - struct VertexInputAttributeDescription - { - using NativeType = VkVertexInputAttributeDescription; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription( uint32_t location_ = {}, - uint32_t binding_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - uint32_t offset_ = {} ) VULKAN_HPP_NOEXCEPT - : location( location_ ) - , binding( binding_ ) - , format( format_ ) - , offset( offset_ ) - { - } - - VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription( VertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputAttributeDescription( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT - : VertexInputAttributeDescription( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VertexInputAttributeDescription & operator=( VertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputAttributeDescription & operator=( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setLocation( uint32_t location_ ) VULKAN_HPP_NOEXCEPT - { - location = location_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVertexInputAttributeDescription const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVertexInputAttributeDescription &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( location, binding, format, offset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VertexInputAttributeDescription const & ) const = default; -#else - bool operator==( VertexInputAttributeDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( location == rhs.location ) && ( binding == rhs.binding ) && ( format == rhs.format ) && ( offset == rhs.offset ); -# endif - } - - bool operator!=( VertexInputAttributeDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t location = {}; - uint32_t binding = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - uint32_t offset = {}; - }; - - struct PipelineVertexInputStateCreateInfo - { - using NativeType = VkPipelineVertexInputStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineVertexInputStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_ = {}, - uint32_t vertexBindingDescriptionCount_ = {}, - const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions_ = {}, - uint32_t vertexAttributeDescriptionCount_ = {}, - const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , vertexBindingDescriptionCount( vertexBindingDescriptionCount_ ) - , pVertexBindingDescriptions( pVertexBindingDescriptions_ ) - , vertexAttributeDescriptionCount( vertexAttributeDescriptionCount_ ) - , pVertexAttributeDescriptions( pVertexAttributeDescriptions_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( PipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineVertexInputStateCreateInfo( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineVertexInputStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineVertexInputStateCreateInfo( - VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDescriptions_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexAttributeDescriptions_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , vertexBindingDescriptionCount( static_cast( vertexBindingDescriptions_.size() ) ) - , pVertexBindingDescriptions( vertexBindingDescriptions_.data() ) - , vertexAttributeDescriptionCount( static_cast( vertexAttributeDescriptions_.size() ) ) - , pVertexAttributeDescriptions( vertexAttributeDescriptions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineVertexInputStateCreateInfo & operator=( PipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineVertexInputStateCreateInfo & operator=( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setVertexBindingDescriptionCount( uint32_t vertexBindingDescriptionCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexBindingDescriptionCount = vertexBindingDescriptionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & - setPVertexBindingDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT - { - pVertexBindingDescriptions = pVertexBindingDescriptions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineVertexInputStateCreateInfo & setVertexBindingDescriptions( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDescriptions_ ) - VULKAN_HPP_NOEXCEPT - { - vertexBindingDescriptionCount = static_cast( vertexBindingDescriptions_.size() ); - pVertexBindingDescriptions = vertexBindingDescriptions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & - setVertexAttributeDescriptionCount( uint32_t vertexAttributeDescriptionCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexAttributeDescriptionCount = vertexAttributeDescriptionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & - setPVertexAttributeDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT - { - pVertexAttributeDescriptions = pVertexAttributeDescriptions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineVertexInputStateCreateInfo & setVertexAttributeDescriptions( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexAttributeDescriptions_ ) - VULKAN_HPP_NOEXCEPT - { - vertexAttributeDescriptionCount = static_cast( vertexAttributeDescriptions_.size() ); - pVertexAttributeDescriptions = vertexAttributeDescriptions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineVertexInputStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineVertexInputStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, flags, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineVertexInputStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineVertexInputStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( vertexBindingDescriptionCount == rhs.vertexBindingDescriptionCount ) && ( pVertexBindingDescriptions == rhs.pVertexBindingDescriptions ) && - ( vertexAttributeDescriptionCount == rhs.vertexAttributeDescriptionCount ) && ( pVertexAttributeDescriptions == rhs.pVertexAttributeDescriptions ); -# endif - } - - bool operator!=( PipelineVertexInputStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags = {}; - uint32_t vertexBindingDescriptionCount = {}; - const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions = {}; - uint32_t vertexAttributeDescriptionCount = {}; - const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions = {}; - }; - - template <> - struct CppType - { - using Type = PipelineVertexInputStateCreateInfo; - }; - - struct PipelineInputAssemblyStateCreateInfo - { - using NativeType = VkPipelineInputAssemblyStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineInputAssemblyStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PipelineInputAssemblyStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ = VULKAN_HPP_NAMESPACE::PrimitiveTopology::ePointList, - VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , topology( topology_ ) - , primitiveRestartEnable( primitiveRestartEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( PipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineInputAssemblyStateCreateInfo( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineInputAssemblyStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineInputAssemblyStateCreateInfo & operator=( PipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineInputAssemblyStateCreateInfo & operator=( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ ) VULKAN_HPP_NOEXCEPT - { - topology = topology_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & - setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ ) VULKAN_HPP_NOEXCEPT - { - primitiveRestartEnable = primitiveRestartEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineInputAssemblyStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineInputAssemblyStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, topology, primitiveRestartEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineInputAssemblyStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineInputAssemblyStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( topology == rhs.topology ) && - ( primitiveRestartEnable == rhs.primitiveRestartEnable ); -# endif - } - - bool operator!=( PipelineInputAssemblyStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::PrimitiveTopology topology = VULKAN_HPP_NAMESPACE::PrimitiveTopology::ePointList; - VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable = {}; - }; - - template <> - struct CppType - { - using Type = PipelineInputAssemblyStateCreateInfo; - }; - - struct PipelineTessellationStateCreateInfo - { - using NativeType = VkPipelineTessellationStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineTessellationStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ = {}, - uint32_t patchControlPoints_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , patchControlPoints( patchControlPoints_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineTessellationStateCreateInfo( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineTessellationStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineTessellationStateCreateInfo & operator=( PipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineTessellationStateCreateInfo & operator=( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & setPatchControlPoints( uint32_t patchControlPoints_ ) VULKAN_HPP_NOEXCEPT - { - patchControlPoints = patchControlPoints_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineTessellationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineTessellationStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, patchControlPoints ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineTessellationStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineTessellationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( patchControlPoints == rhs.patchControlPoints ); -# endif - } - - bool operator!=( PipelineTessellationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags = {}; - uint32_t patchControlPoints = {}; - }; - - template <> - struct CppType - { - using Type = PipelineTessellationStateCreateInfo; - }; - - struct PipelineViewportStateCreateInfo - { - using NativeType = VkPipelineViewportStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_ = {}, - uint32_t viewportCount_ = {}, - const VULKAN_HPP_NAMESPACE::Viewport * pViewports_ = {}, - uint32_t scissorCount_ = {}, - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , viewportCount( viewportCount_ ) - , pViewports( pViewports_ ) - , scissorCount( scissorCount_ ) - , pScissors( pScissors_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( PipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportStateCreateInfo( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewports_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & scissors_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , viewportCount( static_cast( viewports_.size() ) ) - , pViewports( viewports_.data() ) - , scissorCount( static_cast( scissors_.size() ) ) - , pScissors( scissors_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportStateCreateInfo & operator=( PipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportStateCreateInfo & operator=( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = viewportCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPViewports( const VULKAN_HPP_NAMESPACE::Viewport * pViewports_ ) VULKAN_HPP_NOEXCEPT - { - pViewports = pViewports_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportStateCreateInfo & - setViewports( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewports_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = static_cast( viewports_.size() ); - pViewports = viewports_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setScissorCount( uint32_t scissorCount_ ) VULKAN_HPP_NOEXCEPT - { - scissorCount = scissorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPScissors( const VULKAN_HPP_NAMESPACE::Rect2D * pScissors_ ) VULKAN_HPP_NOEXCEPT - { - pScissors = pScissors_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportStateCreateInfo & - setScissors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & scissors_ ) VULKAN_HPP_NOEXCEPT - { - scissorCount = static_cast( scissors_.size() ); - pScissors = scissors_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, viewportCount, pViewports, scissorCount, pScissors ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineViewportStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewportCount == rhs.viewportCount ) && - ( pViewports == rhs.pViewports ) && ( scissorCount == rhs.scissorCount ) && ( pScissors == rhs.pScissors ); -# endif - } - - bool operator!=( PipelineViewportStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags = {}; - uint32_t viewportCount = {}; - const VULKAN_HPP_NAMESPACE::Viewport * pViewports = {}; - uint32_t scissorCount = {}; - const VULKAN_HPP_NAMESPACE::Rect2D * pScissors = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportStateCreateInfo; - }; - - struct PipelineRasterizationStateCreateInfo - { - using NativeType = VkPipelineRasterizationStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable_ = {}, - VULKAN_HPP_NAMESPACE::PolygonMode polygonMode_ = VULKAN_HPP_NAMESPACE::PolygonMode::eFill, - VULKAN_HPP_NAMESPACE::CullModeFlags cullMode_ = {}, - VULKAN_HPP_NAMESPACE::FrontFace frontFace_ = VULKAN_HPP_NAMESPACE::FrontFace::eCounterClockwise, - VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable_ = {}, - float depthBiasConstantFactor_ = {}, - float depthBiasClamp_ = {}, - float depthBiasSlopeFactor_ = {}, - float lineWidth_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , depthClampEnable( depthClampEnable_ ) - , rasterizerDiscardEnable( rasterizerDiscardEnable_ ) - , polygonMode( polygonMode_ ) - , cullMode( cullMode_ ) - , frontFace( frontFace_ ) - , depthBiasEnable( depthBiasEnable_ ) - , depthBiasConstantFactor( depthBiasConstantFactor_ ) - , depthBiasClamp( depthBiasClamp_ ) - , depthBiasSlopeFactor( depthBiasSlopeFactor_ ) - , lineWidth( lineWidth_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateCreateInfo( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationStateCreateInfo & operator=( PipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateCreateInfo & operator=( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthClampEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthClampEnable = depthClampEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & - setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable_ ) VULKAN_HPP_NOEXCEPT - { - rasterizerDiscardEnable = rasterizerDiscardEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setPolygonMode( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode_ ) VULKAN_HPP_NOEXCEPT - { - polygonMode = polygonMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode_ ) VULKAN_HPP_NOEXCEPT - { - cullMode = cullMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace_ ) VULKAN_HPP_NOEXCEPT - { - frontFace = frontFace_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthBiasEnable = depthBiasEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasConstantFactor( float depthBiasConstantFactor_ ) VULKAN_HPP_NOEXCEPT - { - depthBiasConstantFactor = depthBiasConstantFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasClamp( float depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT - { - depthBiasClamp = depthBiasClamp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasSlopeFactor( float depthBiasSlopeFactor_ ) VULKAN_HPP_NOEXCEPT - { - depthBiasSlopeFactor = depthBiasSlopeFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setLineWidth( float lineWidth_ ) VULKAN_HPP_NOEXCEPT - { - lineWidth = lineWidth_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - depthClampEnable, - rasterizerDiscardEnable, - polygonMode, - cullMode, - frontFace, - depthBiasEnable, - depthBiasConstantFactor, - depthBiasClamp, - depthBiasSlopeFactor, - lineWidth ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineRasterizationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthClampEnable == rhs.depthClampEnable ) && - ( rasterizerDiscardEnable == rhs.rasterizerDiscardEnable ) && ( polygonMode == rhs.polygonMode ) && ( cullMode == rhs.cullMode ) && - ( frontFace == rhs.frontFace ) && ( depthBiasEnable == rhs.depthBiasEnable ) && ( depthBiasConstantFactor == rhs.depthBiasConstantFactor ) && - ( depthBiasClamp == rhs.depthBiasClamp ) && ( depthBiasSlopeFactor == rhs.depthBiasSlopeFactor ) && ( lineWidth == rhs.lineWidth ); -# endif - } - - bool operator!=( PipelineRasterizationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable = {}; - VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable = {}; - VULKAN_HPP_NAMESPACE::PolygonMode polygonMode = VULKAN_HPP_NAMESPACE::PolygonMode::eFill; - VULKAN_HPP_NAMESPACE::CullModeFlags cullMode = {}; - VULKAN_HPP_NAMESPACE::FrontFace frontFace = VULKAN_HPP_NAMESPACE::FrontFace::eCounterClockwise; - VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable = {}; - float depthBiasConstantFactor = {}; - float depthBiasClamp = {}; - float depthBiasSlopeFactor = {}; - float lineWidth = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationStateCreateInfo; - }; - - struct PipelineMultisampleStateCreateInfo - { - using NativeType = VkPipelineMultisampleStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineMultisampleStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PipelineMultisampleStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable_ = {}, - float minSampleShading_ = {}, - const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , rasterizationSamples( rasterizationSamples_ ) - , sampleShadingEnable( sampleShadingEnable_ ) - , minSampleShading( minSampleShading_ ) - , pSampleMask( pSampleMask_ ) - , alphaToCoverageEnable( alphaToCoverageEnable_ ) - , alphaToOneEnable( alphaToOneEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineMultisampleStateCreateInfo( PipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineMultisampleStateCreateInfo( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineMultisampleStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineMultisampleStateCreateInfo & operator=( PipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineMultisampleStateCreateInfo & operator=( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & - setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationSamples = rasterizationSamples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setSampleShadingEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable_ ) VULKAN_HPP_NOEXCEPT - { - sampleShadingEnable = sampleShadingEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setMinSampleShading( float minSampleShading_ ) VULKAN_HPP_NOEXCEPT - { - minSampleShading = minSampleShading_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setPSampleMask( const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask_ ) VULKAN_HPP_NOEXCEPT - { - pSampleMask = pSampleMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & - setAlphaToCoverageEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable_ ) VULKAN_HPP_NOEXCEPT - { - alphaToCoverageEnable = alphaToCoverageEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setAlphaToOneEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable_ ) VULKAN_HPP_NOEXCEPT - { - alphaToOneEnable = alphaToOneEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineMultisampleStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineMultisampleStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, rasterizationSamples, sampleShadingEnable, minSampleShading, pSampleMask, alphaToCoverageEnable, alphaToOneEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineMultisampleStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineMultisampleStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rasterizationSamples == rhs.rasterizationSamples ) && - ( sampleShadingEnable == rhs.sampleShadingEnable ) && ( minSampleShading == rhs.minSampleShading ) && ( pSampleMask == rhs.pSampleMask ) && - ( alphaToCoverageEnable == rhs.alphaToCoverageEnable ) && ( alphaToOneEnable == rhs.alphaToOneEnable ); -# endif - } - - bool operator!=( PipelineMultisampleStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable = {}; - float minSampleShading = {}; - const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask = {}; - VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable = {}; - VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable = {}; - }; - - template <> - struct CppType - { - using Type = PipelineMultisampleStateCreateInfo; - }; - - struct StencilOpState - { - using NativeType = VkStencilOpState; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR StencilOpState( VULKAN_HPP_NAMESPACE::StencilOp failOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, - VULKAN_HPP_NAMESPACE::StencilOp passOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, - VULKAN_HPP_NAMESPACE::CompareOp compareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, - uint32_t compareMask_ = {}, - uint32_t writeMask_ = {}, - uint32_t reference_ = {} ) VULKAN_HPP_NOEXCEPT - : failOp( failOp_ ) - , passOp( passOp_ ) - , depthFailOp( depthFailOp_ ) - , compareOp( compareOp_ ) - , compareMask( compareMask_ ) - , writeMask( writeMask_ ) - , reference( reference_ ) - { - } - - VULKAN_HPP_CONSTEXPR StencilOpState( StencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StencilOpState( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT : StencilOpState( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - StencilOpState & operator=( StencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StencilOpState & operator=( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setFailOp( VULKAN_HPP_NAMESPACE::StencilOp failOp_ ) VULKAN_HPP_NOEXCEPT - { - failOp = failOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setPassOp( VULKAN_HPP_NAMESPACE::StencilOp passOp_ ) VULKAN_HPP_NOEXCEPT - { - passOp = passOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setDepthFailOp( VULKAN_HPP_NAMESPACE::StencilOp depthFailOp_ ) VULKAN_HPP_NOEXCEPT - { - depthFailOp = depthFailOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT - { - compareOp = compareOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setCompareMask( uint32_t compareMask_ ) VULKAN_HPP_NOEXCEPT - { - compareMask = compareMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setWriteMask( uint32_t writeMask_ ) VULKAN_HPP_NOEXCEPT - { - writeMask = writeMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StencilOpState & setReference( uint32_t reference_ ) VULKAN_HPP_NOEXCEPT - { - reference = reference_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkStencilOpState const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkStencilOpState &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( failOp, passOp, depthFailOp, compareOp, compareMask, writeMask, reference ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( StencilOpState const & ) const = default; -#else - bool operator==( StencilOpState const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( failOp == rhs.failOp ) && ( passOp == rhs.passOp ) && ( depthFailOp == rhs.depthFailOp ) && ( compareOp == rhs.compareOp ) && - ( compareMask == rhs.compareMask ) && ( writeMask == rhs.writeMask ) && ( reference == rhs.reference ); -# endif - } - - bool operator!=( StencilOpState const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StencilOp failOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; - VULKAN_HPP_NAMESPACE::StencilOp passOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; - VULKAN_HPP_NAMESPACE::StencilOp depthFailOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; - VULKAN_HPP_NAMESPACE::CompareOp compareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; - uint32_t compareMask = {}; - uint32_t writeMask = {}; - uint32_t reference = {}; - }; - - struct PipelineDepthStencilStateCreateInfo - { - using NativeType = VkPipelineDepthStencilStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDepthStencilStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable_ = {}, - VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, - VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable_ = {}, - VULKAN_HPP_NAMESPACE::StencilOpState front_ = {}, - VULKAN_HPP_NAMESPACE::StencilOpState back_ = {}, - float minDepthBounds_ = {}, - float maxDepthBounds_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , depthTestEnable( depthTestEnable_ ) - , depthWriteEnable( depthWriteEnable_ ) - , depthCompareOp( depthCompareOp_ ) - , depthBoundsTestEnable( depthBoundsTestEnable_ ) - , stencilTestEnable( stencilTestEnable_ ) - , front( front_ ) - , back( back_ ) - , minDepthBounds( minDepthBounds_ ) - , maxDepthBounds( maxDepthBounds_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( PipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDepthStencilStateCreateInfo( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineDepthStencilStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineDepthStencilStateCreateInfo & operator=( PipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDepthStencilStateCreateInfo & operator=( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & - setFlags( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthTestEnable = depthTestEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthWriteEnable = depthWriteEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp_ ) VULKAN_HPP_NOEXCEPT - { - depthCompareOp = depthCompareOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & - setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthBoundsTestEnable = depthBoundsTestEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable_ ) VULKAN_HPP_NOEXCEPT - { - stencilTestEnable = stencilTestEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setFront( VULKAN_HPP_NAMESPACE::StencilOpState const & front_ ) VULKAN_HPP_NOEXCEPT - { - front = front_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setBack( VULKAN_HPP_NAMESPACE::StencilOpState const & back_ ) VULKAN_HPP_NOEXCEPT - { - back = back_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setMinDepthBounds( float minDepthBounds_ ) VULKAN_HPP_NOEXCEPT - { - minDepthBounds = minDepthBounds_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setMaxDepthBounds( float maxDepthBounds_ ) VULKAN_HPP_NOEXCEPT - { - maxDepthBounds = maxDepthBounds_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineDepthStencilStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineDepthStencilStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - depthTestEnable, - depthWriteEnable, - depthCompareOp, - depthBoundsTestEnable, - stencilTestEnable, - front, - back, - minDepthBounds, - maxDepthBounds ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineDepthStencilStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineDepthStencilStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthTestEnable == rhs.depthTestEnable ) && - ( depthWriteEnable == rhs.depthWriteEnable ) && ( depthCompareOp == rhs.depthCompareOp ) && - ( depthBoundsTestEnable == rhs.depthBoundsTestEnable ) && ( stencilTestEnable == rhs.stencilTestEnable ) && ( front == rhs.front ) && - ( back == rhs.back ) && ( minDepthBounds == rhs.minDepthBounds ) && ( maxDepthBounds == rhs.maxDepthBounds ); -# endif - } - - bool operator!=( PipelineDepthStencilStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable = {}; - VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; - VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable = {}; - VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable = {}; - VULKAN_HPP_NAMESPACE::StencilOpState front = {}; - VULKAN_HPP_NAMESPACE::StencilOpState back = {}; - float minDepthBounds = {}; - float maxDepthBounds = {}; - }; - - template <> - struct CppType - { - using Type = PipelineDepthStencilStateCreateInfo; - }; - - struct PipelineColorBlendAttachmentState - { - using NativeType = VkPipelineColorBlendAttachmentState; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineColorBlendAttachmentState( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ = {}, - VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, - VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, - VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, - VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, - VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, - VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, - VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask_ = {} ) VULKAN_HPP_NOEXCEPT - : blendEnable( blendEnable_ ) - , srcColorBlendFactor( srcColorBlendFactor_ ) - , dstColorBlendFactor( dstColorBlendFactor_ ) - , colorBlendOp( colorBlendOp_ ) - , srcAlphaBlendFactor( srcAlphaBlendFactor_ ) - , dstAlphaBlendFactor( dstAlphaBlendFactor_ ) - , alphaBlendOp( alphaBlendOp_ ) - , colorWriteMask( colorWriteMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineColorBlendAttachmentState( PipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendAttachmentState( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineColorBlendAttachmentState( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineColorBlendAttachmentState & operator=( PipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendAttachmentState & operator=( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setBlendEnable( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ ) VULKAN_HPP_NOEXCEPT - { - blendEnable = blendEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & - setSrcColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT - { - srcColorBlendFactor = srcColorBlendFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & - setDstColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT - { - dstColorBlendFactor = dstColorBlendFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setColorBlendOp( VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ ) VULKAN_HPP_NOEXCEPT - { - colorBlendOp = colorBlendOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & - setSrcAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT - { - srcAlphaBlendFactor = srcAlphaBlendFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & - setDstAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT - { - dstAlphaBlendFactor = dstAlphaBlendFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setAlphaBlendOp( VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ ) VULKAN_HPP_NOEXCEPT - { - alphaBlendOp = alphaBlendOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & - setColorWriteMask( VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask_ ) VULKAN_HPP_NOEXCEPT - { - colorWriteMask = colorWriteMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineColorBlendAttachmentState const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineColorBlendAttachmentState &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - blendEnable, srcColorBlendFactor, dstColorBlendFactor, colorBlendOp, srcAlphaBlendFactor, dstAlphaBlendFactor, alphaBlendOp, colorWriteMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineColorBlendAttachmentState const & ) const = default; -#else - bool operator==( PipelineColorBlendAttachmentState const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( blendEnable == rhs.blendEnable ) && ( srcColorBlendFactor == rhs.srcColorBlendFactor ) && ( dstColorBlendFactor == rhs.dstColorBlendFactor ) && - ( colorBlendOp == rhs.colorBlendOp ) && ( srcAlphaBlendFactor == rhs.srcAlphaBlendFactor ) && ( dstAlphaBlendFactor == rhs.dstAlphaBlendFactor ) && - ( alphaBlendOp == rhs.alphaBlendOp ) && ( colorWriteMask == rhs.colorWriteMask ); -# endif - } - - bool operator!=( PipelineColorBlendAttachmentState const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Bool32 blendEnable = {}; - VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; - VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; - VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; - VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; - VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; - VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; - VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask = {}; - }; - - struct PipelineColorBlendStateCreateInfo - { - using NativeType = VkPipelineColorBlendStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorBlendStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_ = {}, - VULKAN_HPP_NAMESPACE::LogicOp logicOp_ = VULKAN_HPP_NAMESPACE::LogicOp::eClear, - uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments_ = {}, - std::array const & blendConstants_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , logicOpEnable( logicOpEnable_ ) - , logicOp( logicOp_ ) - , attachmentCount( attachmentCount_ ) - , pAttachments( pAttachments_ ) - , blendConstants( blendConstants_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( PipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendStateCreateInfo( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineColorBlendStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineColorBlendStateCreateInfo( - VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_, - VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_, - VULKAN_HPP_NAMESPACE::LogicOp logicOp_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, - std::array const & blendConstants_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , logicOpEnable( logicOpEnable_ ) - , logicOp( logicOp_ ) - , attachmentCount( static_cast( attachments_.size() ) ) - , pAttachments( attachments_.data() ) - , blendConstants( blendConstants_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineColorBlendStateCreateInfo & operator=( PipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendStateCreateInfo & operator=( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setLogicOpEnable( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_ ) VULKAN_HPP_NOEXCEPT - { - logicOpEnable = logicOpEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setLogicOp( VULKAN_HPP_NAMESPACE::LogicOp logicOp_ ) VULKAN_HPP_NOEXCEPT - { - logicOp = logicOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & - setPAttachments( const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pAttachments = pAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineColorBlendStateCreateInfo & setAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( attachments_.size() ); - pAttachments = attachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setBlendConstants( std::array blendConstants_ ) VULKAN_HPP_NOEXCEPT - { - blendConstants = blendConstants_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineColorBlendStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineColorBlendStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, logicOpEnable, logicOp, attachmentCount, pAttachments, blendConstants ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineColorBlendStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineColorBlendStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( logicOpEnable == rhs.logicOpEnable ) && - ( logicOp == rhs.logicOp ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && - ( blendConstants == rhs.blendConstants ); -# endif - } - - bool operator!=( PipelineColorBlendStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable = {}; - VULKAN_HPP_NAMESPACE::LogicOp logicOp = VULKAN_HPP_NAMESPACE::LogicOp::eClear; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D blendConstants = {}; - }; - - template <> - struct CppType - { - using Type = PipelineColorBlendStateCreateInfo; - }; - - struct PipelineDynamicStateCreateInfo - { - using NativeType = VkPipelineDynamicStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDynamicStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ = {}, - uint32_t dynamicStateCount_ = {}, - const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , dynamicStateCount( dynamicStateCount_ ) - , pDynamicStates( pDynamicStates_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( PipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDynamicStateCreateInfo( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineDynamicStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineDynamicStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicStates_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), dynamicStateCount( static_cast( dynamicStates_.size() ) ), pDynamicStates( dynamicStates_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineDynamicStateCreateInfo & operator=( PipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDynamicStateCreateInfo & operator=( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setDynamicStateCount( uint32_t dynamicStateCount_ ) VULKAN_HPP_NOEXCEPT - { - dynamicStateCount = dynamicStateCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setPDynamicStates( const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates_ ) VULKAN_HPP_NOEXCEPT - { - pDynamicStates = pDynamicStates_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineDynamicStateCreateInfo & - setDynamicStates( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicStates_ ) VULKAN_HPP_NOEXCEPT - { - dynamicStateCount = static_cast( dynamicStates_.size() ); - pDynamicStates = dynamicStates_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineDynamicStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineDynamicStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, dynamicStateCount, pDynamicStates ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineDynamicStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineDynamicStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dynamicStateCount == rhs.dynamicStateCount ) && - ( pDynamicStates == rhs.pDynamicStates ); -# endif - } - - bool operator!=( PipelineDynamicStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDynamicStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags = {}; - uint32_t dynamicStateCount = {}; - const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates = {}; - }; - - template <> - struct CppType - { - using Type = PipelineDynamicStateCreateInfo; - }; - - struct GraphicsPipelineCreateInfo - { - using NativeType = VkGraphicsPipelineCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, - uint32_t stageCount_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - uint32_t subpass_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( stageCount_ ) - , pStages( pStages_ ) - , pVertexInputState( pVertexInputState_ ) - , pInputAssemblyState( pInputAssemblyState_ ) - , pTessellationState( pTessellationState_ ) - , pViewportState( pViewportState_ ) - , pRasterizationState( pRasterizationState_ ) - , pMultisampleState( pMultisampleState_ ) - , pDepthStencilState( pDepthStencilState_ ) - , pColorBlendState( pColorBlendState_ ) - , pDynamicState( pDynamicState_ ) - , layout( layout_ ) - , renderPass( renderPass_ ) - , subpass( subpass_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineCreateInfo( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : GraphicsPipelineCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsPipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - uint32_t subpass_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( static_cast( stages_.size() ) ) - , pStages( stages_.data() ) - , pVertexInputState( pVertexInputState_ ) - , pInputAssemblyState( pInputAssemblyState_ ) - , pTessellationState( pTessellationState_ ) - , pViewportState( pViewportState_ ) - , pRasterizationState( pRasterizationState_ ) - , pMultisampleState( pMultisampleState_ ) - , pDepthStencilState( pDepthStencilState_ ) - , pColorBlendState( pColorBlendState_ ) - , pDynamicState( pDynamicState_ ) - , layout( layout_ ) - , renderPass( renderPass_ ) - , subpass( subpass_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GraphicsPipelineCreateInfo & operator=( GraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineCreateInfo & operator=( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = stageCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT - { - pStages = pStages_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsPipelineCreateInfo & - setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = static_cast( stages_.size() ); - pStages = stages_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPVertexInputState( const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT - { - pVertexInputState = pVertexInputState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPInputAssemblyState( const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ ) VULKAN_HPP_NOEXCEPT - { - pInputAssemblyState = pInputAssemblyState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPTessellationState( const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ ) VULKAN_HPP_NOEXCEPT - { - pTessellationState = pTessellationState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPViewportState( const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ ) VULKAN_HPP_NOEXCEPT - { - pViewportState = pViewportState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPRasterizationState( const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ ) VULKAN_HPP_NOEXCEPT - { - pRasterizationState = pRasterizationState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPMultisampleState( const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ ) VULKAN_HPP_NOEXCEPT - { - pMultisampleState = pMultisampleState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPDepthStencilState( const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ ) VULKAN_HPP_NOEXCEPT - { - pDepthStencilState = pDepthStencilState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPColorBlendState( const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ ) VULKAN_HPP_NOEXCEPT - { - pColorBlendState = pColorBlendState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & - setPDynamicState( const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ ) VULKAN_HPP_NOEXCEPT - { - pDynamicState = pDynamicState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT - { - renderPass = renderPass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT - { - subpass = subpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineHandle = basePipelineHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineIndex = basePipelineIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGraphicsPipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGraphicsPipelineCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - stageCount, - pStages, - pVertexInputState, - pInputAssemblyState, - pTessellationState, - pViewportState, - pRasterizationState, - pMultisampleState, - pDepthStencilState, - pColorBlendState, - pDynamicState, - layout, - renderPass, - subpass, - basePipelineHandle, - basePipelineIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GraphicsPipelineCreateInfo const & ) const = default; -#else - bool operator==( GraphicsPipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && - ( pVertexInputState == rhs.pVertexInputState ) && ( pInputAssemblyState == rhs.pInputAssemblyState ) && - ( pTessellationState == rhs.pTessellationState ) && ( pViewportState == rhs.pViewportState ) && - ( pRasterizationState == rhs.pRasterizationState ) && ( pMultisampleState == rhs.pMultisampleState ) && - ( pDepthStencilState == rhs.pDepthStencilState ) && ( pColorBlendState == rhs.pColorBlendState ) && ( pDynamicState == rhs.pDynamicState ) && - ( layout == rhs.layout ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ) && ( basePipelineHandle == rhs.basePipelineHandle ) && - ( basePipelineIndex == rhs.basePipelineIndex ); -# endif - } - - bool operator!=( GraphicsPipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; - uint32_t stageCount = {}; - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState = {}; - const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState = {}; - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState = {}; - const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState = {}; - const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState = {}; - const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState = {}; - const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState = {}; - const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState = {}; - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; - VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; - uint32_t subpass = {}; - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; - int32_t basePipelineIndex = {}; - }; - - template <> - struct CppType - { - using Type = GraphicsPipelineCreateInfo; - }; - - struct GraphicsPipelineLibraryCreateInfoEXT - { - using NativeType = VkGraphicsPipelineLibraryCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineLibraryCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryCreateInfoEXT( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryCreateInfoEXT( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineLibraryCreateInfoEXT( VkGraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : GraphicsPipelineLibraryCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GraphicsPipelineLibraryCreateInfoEXT & operator=( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineLibraryCreateInfoEXT & operator=( VkGraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineLibraryCreateInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineLibraryCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGraphicsPipelineLibraryCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGraphicsPipelineLibraryCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GraphicsPipelineLibraryCreateInfoEXT const & ) const = default; -#else - bool operator==( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineLibraryCreateInfoEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags = {}; - }; - - template <> - struct CppType - { - using Type = GraphicsPipelineLibraryCreateInfoEXT; - }; - - struct GraphicsShaderGroupCreateInfoNV - { - using NativeType = VkGraphicsShaderGroupCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsShaderGroupCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GraphicsShaderGroupCreateInfoNV( uint32_t stageCount_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stageCount( stageCount_ ) - , pStages( pStages_ ) - , pVertexInputState( pVertexInputState_ ) - , pTessellationState( pTessellationState_ ) - { - } - - VULKAN_HPP_CONSTEXPR GraphicsShaderGroupCreateInfoNV( GraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsShaderGroupCreateInfoNV( VkGraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : GraphicsShaderGroupCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsShaderGroupCreateInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , stageCount( static_cast( stages_.size() ) ) - , pStages( stages_.data() ) - , pVertexInputState( pVertexInputState_ ) - , pTessellationState( pTessellationState_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GraphicsShaderGroupCreateInfoNV & operator=( GraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsShaderGroupCreateInfoNV & operator=( VkGraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = stageCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & - setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT - { - pStages = pStages_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsShaderGroupCreateInfoNV & - setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = static_cast( stages_.size() ); - pStages = stages_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & - setPVertexInputState( const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT - { - pVertexInputState = pVertexInputState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & - setPTessellationState( const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ ) VULKAN_HPP_NOEXCEPT - { - pTessellationState = pTessellationState_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGraphicsShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGraphicsShaderGroupCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stageCount, pStages, pVertexInputState, pTessellationState ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GraphicsShaderGroupCreateInfoNV const & ) const = default; -#else - bool operator==( GraphicsShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && - ( pVertexInputState == rhs.pVertexInputState ) && ( pTessellationState == rhs.pTessellationState ); -# endif - } - - bool operator!=( GraphicsShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsShaderGroupCreateInfoNV; - const void * pNext = {}; - uint32_t stageCount = {}; - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; - const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState = {}; - const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState = {}; - }; - - template <> - struct CppType - { - using Type = GraphicsShaderGroupCreateInfoNV; - }; - - struct GraphicsPipelineShaderGroupsCreateInfoNV - { - using NativeType = VkGraphicsPipelineShaderGroupsCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR GraphicsPipelineShaderGroupsCreateInfoNV( uint32_t groupCount_ = {}, - const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups_ = {}, - uint32_t pipelineCount_ = {}, - const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , groupCount( groupCount_ ) - , pGroups( pGroups_ ) - , pipelineCount( pipelineCount_ ) - , pPipelines( pPipelines_ ) - { - } - - VULKAN_HPP_CONSTEXPR GraphicsPipelineShaderGroupsCreateInfoNV( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineShaderGroupsCreateInfoNV( VkGraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : GraphicsPipelineShaderGroupsCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsPipelineShaderGroupsCreateInfoNV( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelines_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , groupCount( static_cast( groups_.size() ) ) - , pGroups( groups_.data() ) - , pipelineCount( static_cast( pipelines_.size() ) ) - , pPipelines( pipelines_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - GraphicsPipelineShaderGroupsCreateInfoNV & operator=( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - GraphicsPipelineShaderGroupsCreateInfoNV & operator=( VkGraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = groupCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & - setPGroups( const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups_ ) VULKAN_HPP_NOEXCEPT - { - pGroups = pGroups_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsPipelineShaderGroupsCreateInfoNV & setGroups( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = static_cast( groups_.size() ); - pGroups = groups_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPipelineCount( uint32_t pipelineCount_ ) VULKAN_HPP_NOEXCEPT - { - pipelineCount = pipelineCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPPipelines( const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines_ ) VULKAN_HPP_NOEXCEPT - { - pPipelines = pPipelines_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - GraphicsPipelineShaderGroupsCreateInfoNV & - setPipelines( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelines_ ) VULKAN_HPP_NOEXCEPT - { - pipelineCount = static_cast( pipelines_.size() ); - pPipelines = pipelines_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkGraphicsPipelineShaderGroupsCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkGraphicsPipelineShaderGroupsCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, groupCount, pGroups, pipelineCount, pPipelines ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( GraphicsPipelineShaderGroupsCreateInfoNV const & ) const = default; -#else - bool operator==( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && - ( pipelineCount == rhs.pipelineCount ) && ( pPipelines == rhs.pPipelines ); -# endif - } - - bool operator!=( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV; - const void * pNext = {}; - uint32_t groupCount = {}; - const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups = {}; - uint32_t pipelineCount = {}; - const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines = {}; - }; - - template <> - struct CppType - { - using Type = GraphicsPipelineShaderGroupsCreateInfoNV; - }; - - struct XYColorEXT - { - using NativeType = VkXYColorEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR XYColorEXT( float x_ = {}, float y_ = {} ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - { - } - - VULKAN_HPP_CONSTEXPR XYColorEXT( XYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XYColorEXT( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT : XYColorEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - XYColorEXT & operator=( XYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XYColorEXT & operator=( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 XYColorEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XYColorEXT & setY( float y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkXYColorEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkXYColorEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( XYColorEXT const & ) const = default; -#else - bool operator==( XYColorEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ); -# endif - } - - bool operator!=( XYColorEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float x = {}; - float y = {}; - }; - - struct HdrMetadataEXT - { - using NativeType = VkHdrMetadataEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHdrMetadataEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR HdrMetadataEXT( VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryRed_ = {}, - VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryGreen_ = {}, - VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryBlue_ = {}, - VULKAN_HPP_NAMESPACE::XYColorEXT whitePoint_ = {}, - float maxLuminance_ = {}, - float minLuminance_ = {}, - float maxContentLightLevel_ = {}, - float maxFrameAverageLightLevel_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , displayPrimaryRed( displayPrimaryRed_ ) - , displayPrimaryGreen( displayPrimaryGreen_ ) - , displayPrimaryBlue( displayPrimaryBlue_ ) - , whitePoint( whitePoint_ ) - , maxLuminance( maxLuminance_ ) - , minLuminance( minLuminance_ ) - , maxContentLightLevel( maxContentLightLevel_ ) - , maxFrameAverageLightLevel( maxFrameAverageLightLevel_ ) - { - } - - VULKAN_HPP_CONSTEXPR HdrMetadataEXT( HdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - HdrMetadataEXT( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT : HdrMetadataEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - HdrMetadataEXT & operator=( HdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - HdrMetadataEXT & operator=( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryRed( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryRed_ ) VULKAN_HPP_NOEXCEPT - { - displayPrimaryRed = displayPrimaryRed_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryGreen( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryGreen_ ) VULKAN_HPP_NOEXCEPT - { - displayPrimaryGreen = displayPrimaryGreen_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryBlue( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryBlue_ ) VULKAN_HPP_NOEXCEPT - { - displayPrimaryBlue = displayPrimaryBlue_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setWhitePoint( VULKAN_HPP_NAMESPACE::XYColorEXT const & whitePoint_ ) VULKAN_HPP_NOEXCEPT - { - whitePoint = whitePoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxLuminance( float maxLuminance_ ) VULKAN_HPP_NOEXCEPT - { - maxLuminance = maxLuminance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMinLuminance( float minLuminance_ ) VULKAN_HPP_NOEXCEPT - { - minLuminance = minLuminance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxContentLightLevel( float maxContentLightLevel_ ) VULKAN_HPP_NOEXCEPT - { - maxContentLightLevel = maxContentLightLevel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxFrameAverageLightLevel( float maxFrameAverageLightLevel_ ) VULKAN_HPP_NOEXCEPT - { - maxFrameAverageLightLevel = maxFrameAverageLightLevel_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkHdrMetadataEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkHdrMetadataEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - displayPrimaryRed, - displayPrimaryGreen, - displayPrimaryBlue, - whitePoint, - maxLuminance, - minLuminance, - maxContentLightLevel, - maxFrameAverageLightLevel ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( HdrMetadataEXT const & ) const = default; -#else - bool operator==( HdrMetadataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayPrimaryRed == rhs.displayPrimaryRed ) && - ( displayPrimaryGreen == rhs.displayPrimaryGreen ) && ( displayPrimaryBlue == rhs.displayPrimaryBlue ) && ( whitePoint == rhs.whitePoint ) && - ( maxLuminance == rhs.maxLuminance ) && ( minLuminance == rhs.minLuminance ) && ( maxContentLightLevel == rhs.maxContentLightLevel ) && - ( maxFrameAverageLightLevel == rhs.maxFrameAverageLightLevel ); -# endif - } - - bool operator!=( HdrMetadataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHdrMetadataEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryRed = {}; - VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryGreen = {}; - VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryBlue = {}; - VULKAN_HPP_NAMESPACE::XYColorEXT whitePoint = {}; - float maxLuminance = {}; - float minLuminance = {}; - float maxContentLightLevel = {}; - float maxFrameAverageLightLevel = {}; - }; - - template <> - struct CppType - { - using Type = HdrMetadataEXT; - }; - - struct HeadlessSurfaceCreateInfoEXT - { - using NativeType = VkHeadlessSurfaceCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHeadlessSurfaceCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( HeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - HeadlessSurfaceCreateInfoEXT( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : HeadlessSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - HeadlessSurfaceCreateInfoEXT & operator=( HeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - HeadlessSurfaceCreateInfoEXT & operator=( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 HeadlessSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 HeadlessSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkHeadlessSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkHeadlessSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( HeadlessSurfaceCreateInfoEXT const & ) const = default; -#else - bool operator==( HeadlessSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( HeadlessSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHeadlessSurfaceCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags = {}; - }; - - template <> - struct CppType - { - using Type = HeadlessSurfaceCreateInfoEXT; - }; - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - struct IOSSurfaceCreateInfoMVK - { - using NativeType = VkIOSSurfaceCreateInfoMVK; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIosSurfaceCreateInfoMVK; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ = {}, - const void * pView_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pView( pView_ ) - { - } - - VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( IOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IOSSurfaceCreateInfoMVK( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT - : IOSSurfaceCreateInfoMVK( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - IOSSurfaceCreateInfoMVK & operator=( IOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IOSSurfaceCreateInfoMVK & operator=( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setPView( const void * pView_ ) VULKAN_HPP_NOEXCEPT - { - pView = pView_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkIOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkIOSSurfaceCreateInfoMVK &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pView ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IOSSurfaceCreateInfoMVK const & ) const = default; -# else - bool operator==( IOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pView == rhs.pView ); -# endif - } - - bool operator!=( IOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIosSurfaceCreateInfoMVK; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags = {}; - const void * pView = {}; - }; - - template <> - struct CppType - { - using Type = IOSSurfaceCreateInfoMVK; - }; -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - - struct ImageBlit - { - using NativeType = VkImageBlit; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ImageBlit( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - std::array const & srcOffsets_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - std::array const & dstOffsets_ = {} ) VULKAN_HPP_NOEXCEPT - : srcSubresource( srcSubresource_ ) - , srcOffsets( srcOffsets_ ) - , dstSubresource( dstSubresource_ ) - , dstOffsets( dstOffsets_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit( ImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageBlit( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT : ImageBlit( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageBlit & operator=( ImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageBlit & operator=( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageBlit & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit & setSrcOffsets( std::array const & srcOffsets_ ) VULKAN_HPP_NOEXCEPT - { - srcOffsets = srcOffsets_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageBlit & setDstOffsets( std::array const & dstOffsets_ ) VULKAN_HPP_NOEXCEPT - { - dstOffsets = dstOffsets_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageBlit const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageBlit &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( srcSubresource, srcOffsets, dstSubresource, dstOffsets ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageBlit const & ) const = default; -#else - bool operator==( ImageBlit const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( srcSubresource == rhs.srcSubresource ) && ( srcOffsets == rhs.srcOffsets ) && ( dstSubresource == rhs.dstSubresource ) && - ( dstOffsets == rhs.dstOffsets ); -# endif - } - - bool operator!=( ImageBlit const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D srcOffsets = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D dstOffsets = {}; - }; - - struct ImageCompressionControlEXT - { - using NativeType = VkImageCompressionControlEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCompressionControlEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageCompressionControlEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_ = {}, - uint32_t compressionControlPlaneCount_ = {}, - VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , compressionControlPlaneCount( compressionControlPlaneCount_ ) - , pFixedRateFlags( pFixedRateFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageCompressionControlEXT( ImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCompressionControlEXT( VkImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageCompressionControlEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageCompressionControlEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fixedRateFlags_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , compressionControlPlaneCount( static_cast( fixedRateFlags_.size() ) ) - , pFixedRateFlags( fixedRateFlags_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageCompressionControlEXT & operator=( ImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCompressionControlEXT & operator=( VkImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setFlags( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setCompressionControlPlaneCount( uint32_t compressionControlPlaneCount_ ) VULKAN_HPP_NOEXCEPT - { - compressionControlPlaneCount = compressionControlPlaneCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & - setPFixedRateFlags( VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags_ ) VULKAN_HPP_NOEXCEPT - { - pFixedRateFlags = pFixedRateFlags_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageCompressionControlEXT & setFixedRateFlags( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fixedRateFlags_ ) VULKAN_HPP_NOEXCEPT - { - compressionControlPlaneCount = static_cast( fixedRateFlags_.size() ); - pFixedRateFlags = fixedRateFlags_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageCompressionControlEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageCompressionControlEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, compressionControlPlaneCount, pFixedRateFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageCompressionControlEXT const & ) const = default; -#else - bool operator==( ImageCompressionControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( compressionControlPlaneCount == rhs.compressionControlPlaneCount ) && ( pFixedRateFlags == rhs.pFixedRateFlags ); -# endif - } - - bool operator!=( ImageCompressionControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCompressionControlEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags = {}; - uint32_t compressionControlPlaneCount = {}; - VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags = {}; - }; - - template <> - struct CppType - { - using Type = ImageCompressionControlEXT; - }; - - struct ImageCompressionPropertiesEXT - { - using NativeType = VkImageCompressionPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCompressionPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageCompressionPropertiesEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT imageCompressionFlags_ = {}, - VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageCompressionFlags( imageCompressionFlags_ ) - , imageCompressionFixedRateFlags( imageCompressionFixedRateFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageCompressionPropertiesEXT( ImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCompressionPropertiesEXT( VkImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageCompressionPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageCompressionPropertiesEXT & operator=( ImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCompressionPropertiesEXT & operator=( VkImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkImageCompressionPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageCompressionPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageCompressionFlags, imageCompressionFixedRateFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageCompressionPropertiesEXT const & ) const = default; -#else - bool operator==( ImageCompressionPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionFlags == rhs.imageCompressionFlags ) && - ( imageCompressionFixedRateFlags == rhs.imageCompressionFixedRateFlags ); -# endif - } - - bool operator!=( ImageCompressionPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCompressionPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT imageCompressionFlags = {}; - VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags = {}; - }; - - template <> - struct CppType - { - using Type = ImageCompressionPropertiesEXT; - }; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImageFormatConstraintsInfoFUCHSIA - { - using NativeType = VkImageFormatConstraintsInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatConstraintsInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageFormatConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo_ = {}, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ = {}, - VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_ = {}, - uint64_t sysmemPixelFormat_ = {}, - uint32_t colorSpaceCount_ = {}, - const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageCreateInfo( imageCreateInfo_ ) - , requiredFormatFeatures( requiredFormatFeatures_ ) - , flags( flags_ ) - , sysmemPixelFormat( sysmemPixelFormat_ ) - , colorSpaceCount( colorSpaceCount_ ) - , pColorSpaces( pColorSpaces_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageFormatConstraintsInfoFUCHSIA( ImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatConstraintsInfoFUCHSIA( VkImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageFormatConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageFormatConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo_, - VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_, - VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_, - uint64_t sysmemPixelFormat_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorSpaces_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , imageCreateInfo( imageCreateInfo_ ) - , requiredFormatFeatures( requiredFormatFeatures_ ) - , flags( flags_ ) - , sysmemPixelFormat( sysmemPixelFormat_ ) - , colorSpaceCount( static_cast( colorSpaces_.size() ) ) - , pColorSpaces( colorSpaces_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageFormatConstraintsInfoFUCHSIA & operator=( ImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatConstraintsInfoFUCHSIA & operator=( VkImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & - setImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & imageCreateInfo_ ) VULKAN_HPP_NOEXCEPT - { - imageCreateInfo = imageCreateInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & - setRequiredFormatFeatures( VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ ) VULKAN_HPP_NOEXCEPT - { - requiredFormatFeatures = requiredFormatFeatures_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setSysmemPixelFormat( uint64_t sysmemPixelFormat_ ) VULKAN_HPP_NOEXCEPT - { - sysmemPixelFormat = sysmemPixelFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setColorSpaceCount( uint32_t colorSpaceCount_ ) VULKAN_HPP_NOEXCEPT - { - colorSpaceCount = colorSpaceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & - setPColorSpaces( const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces_ ) VULKAN_HPP_NOEXCEPT - { - pColorSpaces = pColorSpaces_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageFormatConstraintsInfoFUCHSIA & setColorSpaces( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorSpaces_ ) VULKAN_HPP_NOEXCEPT - { - colorSpaceCount = static_cast( colorSpaces_.size() ); - pColorSpaces = colorSpaces_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageFormatConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageFormatConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageCreateInfo, requiredFormatFeatures, flags, sysmemPixelFormat, colorSpaceCount, pColorSpaces ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageFormatConstraintsInfoFUCHSIA const & ) const = default; -# else - bool operator==( ImageFormatConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCreateInfo == rhs.imageCreateInfo ) && - ( requiredFormatFeatures == rhs.requiredFormatFeatures ) && ( flags == rhs.flags ) && ( sysmemPixelFormat == rhs.sysmemPixelFormat ) && - ( colorSpaceCount == rhs.colorSpaceCount ) && ( pColorSpaces == rhs.pColorSpaces ); -# endif - } - - bool operator!=( ImageFormatConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatConstraintsInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo = {}; - VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures = {}; - VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags = {}; - uint64_t sysmemPixelFormat = {}; - uint32_t colorSpaceCount = {}; - const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces = {}; - }; - - template <> - struct CppType - { - using Type = ImageFormatConstraintsInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImageConstraintsInfoFUCHSIA - { - using NativeType = VkImageConstraintsInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageConstraintsInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFUCHSIA( uint32_t formatConstraintsCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints_ = {}, - VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, - VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , formatConstraintsCount( formatConstraintsCount_ ) - , pFormatConstraints( pFormatConstraints_ ) - , bufferCollectionConstraints( bufferCollectionConstraints_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFUCHSIA( ImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageConstraintsInfoFUCHSIA( VkImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageConstraintsInfoFUCHSIA( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & formatConstraints_, - VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, - VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , formatConstraintsCount( static_cast( formatConstraints_.size() ) ) - , pFormatConstraints( formatConstraints_.data() ) - , bufferCollectionConstraints( bufferCollectionConstraints_ ) - , flags( flags_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageConstraintsInfoFUCHSIA & operator=( ImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageConstraintsInfoFUCHSIA & operator=( VkImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setFormatConstraintsCount( uint32_t formatConstraintsCount_ ) VULKAN_HPP_NOEXCEPT - { - formatConstraintsCount = formatConstraintsCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & - setPFormatConstraints( const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints_ ) VULKAN_HPP_NOEXCEPT - { - pFormatConstraints = pFormatConstraints_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageConstraintsInfoFUCHSIA & setFormatConstraints( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & formatConstraints_ ) - VULKAN_HPP_NOEXCEPT - { - formatConstraintsCount = static_cast( formatConstraints_.size() ); - pFormatConstraints = formatConstraints_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & - setBufferCollectionConstraints( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraints_ ) VULKAN_HPP_NOEXCEPT - { - bufferCollectionConstraints = bufferCollectionConstraints_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, formatConstraintsCount, pFormatConstraints, bufferCollectionConstraints, flags ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageConstraintsInfoFUCHSIA const & ) const = default; -# else - bool operator==( ImageConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatConstraintsCount == rhs.formatConstraintsCount ) && - ( pFormatConstraints == rhs.pFormatConstraints ) && ( bufferCollectionConstraints == rhs.bufferCollectionConstraints ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( ImageConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageConstraintsInfoFUCHSIA; - const void * pNext = {}; - uint32_t formatConstraintsCount = {}; - const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints = {}; - VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags = {}; - }; - - template <> - struct CppType - { - using Type = ImageConstraintsInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct ImageCopy - { - using NativeType = VkImageCopy; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageCopy( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {} ) VULKAN_HPP_NOEXCEPT - : srcSubresource( srcSubresource_ ) - , srcOffset( srcOffset_ ) - , dstSubresource( dstSubresource_ ) - , dstOffset( dstOffset_ ) - , extent( extent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageCopy( ImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCopy( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCopy( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageCopy & operator=( ImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageCopy & operator=( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageCopy & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageCopy & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageCopy const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageCopy &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageCopy const & ) const = default; -#else - bool operator==( ImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && - ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); -# endif - } - - bool operator!=( ImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - }; - - struct SubresourceLayout - { - using NativeType = VkSubresourceLayout; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubresourceLayout( VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize rowPitch_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize arrayPitch_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize depthPitch_ = {} ) VULKAN_HPP_NOEXCEPT - : offset( offset_ ) - , size( size_ ) - , rowPitch( rowPitch_ ) - , arrayPitch( arrayPitch_ ) - , depthPitch( depthPitch_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubresourceLayout( SubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubresourceLayout( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT : SubresourceLayout( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubresourceLayout & operator=( SubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubresourceLayout & operator=( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSubresourceLayout const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubresourceLayout &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( offset, size, rowPitch, arrayPitch, depthPitch ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubresourceLayout const & ) const = default; -#else - bool operator==( SubresourceLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( offset == rhs.offset ) && ( size == rhs.size ) && ( rowPitch == rhs.rowPitch ) && ( arrayPitch == rhs.arrayPitch ) && - ( depthPitch == rhs.depthPitch ); -# endif - } - - bool operator!=( SubresourceLayout const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::DeviceSize rowPitch = {}; - VULKAN_HPP_NAMESPACE::DeviceSize arrayPitch = {}; - VULKAN_HPP_NAMESPACE::DeviceSize depthPitch = {}; - }; - - struct ImageDrmFormatModifierExplicitCreateInfoEXT - { - using NativeType = VkImageDrmFormatModifierExplicitCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = {}, - uint32_t drmFormatModifierPlaneCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifier( drmFormatModifier_ ) - , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ ) - , pPlaneLayouts( pPlaneLayouts_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierExplicitCreateInfoEXT( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageDrmFormatModifierExplicitCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageDrmFormatModifierExplicitCreateInfoEXT( - uint64_t drmFormatModifier_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & planeLayouts_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , drmFormatModifier( drmFormatModifier_ ) - , drmFormatModifierPlaneCount( static_cast( planeLayouts_.size() ) ) - , pPlaneLayouts( planeLayouts_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setDrmFormatModifier( uint64_t drmFormatModifier_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifier = drmFormatModifier_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & - setDrmFormatModifierPlaneCount( uint32_t drmFormatModifierPlaneCount_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifierPlaneCount = drmFormatModifierPlaneCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & - setPPlaneLayouts( const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts_ ) VULKAN_HPP_NOEXCEPT - { - pPlaneLayouts = pPlaneLayouts_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageDrmFormatModifierExplicitCreateInfoEXT & - setPlaneLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & planeLayouts_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifierPlaneCount = static_cast( planeLayouts_.size() ); - pPlaneLayouts = planeLayouts_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageDrmFormatModifierExplicitCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageDrmFormatModifierExplicitCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifier, drmFormatModifierPlaneCount, pPlaneLayouts ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageDrmFormatModifierExplicitCreateInfoEXT const & ) const = default; -#else - bool operator==( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ) && - ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && ( pPlaneLayouts == rhs.pPlaneLayouts ); -# endif - } - - bool operator!=( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT; - const void * pNext = {}; - uint64_t drmFormatModifier = {}; - uint32_t drmFormatModifierPlaneCount = {}; - const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts = {}; - }; - - template <> - struct CppType - { - using Type = ImageDrmFormatModifierExplicitCreateInfoEXT; - }; - - struct ImageDrmFormatModifierListCreateInfoEXT - { - using NativeType = VkImageDrmFormatModifierListCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierListCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = {}, - const uint64_t * pDrmFormatModifiers_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifierCount( drmFormatModifierCount_ ) - , pDrmFormatModifiers( pDrmFormatModifiers_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierListCreateInfoEXT( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageDrmFormatModifierListCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageDrmFormatModifierListCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifiers_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), drmFormatModifierCount( static_cast( drmFormatModifiers_.size() ) ), pDrmFormatModifiers( drmFormatModifiers_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageDrmFormatModifierListCreateInfoEXT & operator=( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierListCreateInfoEXT & operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setDrmFormatModifierCount( uint32_t drmFormatModifierCount_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifierCount = drmFormatModifierCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setPDrmFormatModifiers( const uint64_t * pDrmFormatModifiers_ ) VULKAN_HPP_NOEXCEPT - { - pDrmFormatModifiers = pDrmFormatModifiers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageDrmFormatModifierListCreateInfoEXT & - setDrmFormatModifiers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifiers_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifierCount = static_cast( drmFormatModifiers_.size() ); - pDrmFormatModifiers = drmFormatModifiers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageDrmFormatModifierListCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageDrmFormatModifierListCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifiers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageDrmFormatModifierListCreateInfoEXT const & ) const = default; -#else - bool operator==( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && - ( pDrmFormatModifiers == rhs.pDrmFormatModifiers ); -# endif - } - - bool operator!=( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierListCreateInfoEXT; - const void * pNext = {}; - uint32_t drmFormatModifierCount = {}; - const uint64_t * pDrmFormatModifiers = {}; - }; - - template <> - struct CppType - { - using Type = ImageDrmFormatModifierListCreateInfoEXT; - }; - - struct ImageDrmFormatModifierPropertiesEXT - { - using NativeType = VkImageDrmFormatModifierPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifier( drmFormatModifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierPropertiesEXT( ImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierPropertiesEXT( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageDrmFormatModifierPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageDrmFormatModifierPropertiesEXT & operator=( ImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageDrmFormatModifierPropertiesEXT & operator=( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkImageDrmFormatModifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageDrmFormatModifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageDrmFormatModifierPropertiesEXT const & ) const = default; -#else - bool operator==( ImageDrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ); -# endif - } - - bool operator!=( ImageDrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierPropertiesEXT; - void * pNext = {}; - uint64_t drmFormatModifier = {}; - }; - - template <> - struct CppType - { - using Type = ImageDrmFormatModifierPropertiesEXT; - }; - - struct ImageFormatListCreateInfo - { - using NativeType = VkImageFormatListCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatListCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfo( uint32_t viewFormatCount_ = {}, - const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , viewFormatCount( viewFormatCount_ ) - , pViewFormats( pViewFormats_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfo( ImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatListCreateInfo( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageFormatListCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageFormatListCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), viewFormatCount( static_cast( viewFormats_.size() ) ), pViewFormats( viewFormats_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageFormatListCreateInfo & operator=( ImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatListCreateInfo & operator=( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT - { - viewFormatCount = viewFormatCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ ) VULKAN_HPP_NOEXCEPT - { - pViewFormats = pViewFormats_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ImageFormatListCreateInfo & - setViewFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) VULKAN_HPP_NOEXCEPT - { - viewFormatCount = static_cast( viewFormats_.size() ); - pViewFormats = viewFormats_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageFormatListCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageFormatListCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, viewFormatCount, pViewFormats ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageFormatListCreateInfo const & ) const = default; -#else - bool operator==( ImageFormatListCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewFormatCount == rhs.viewFormatCount ) && ( pViewFormats == rhs.pViewFormats ); -# endif - } - - bool operator!=( ImageFormatListCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatListCreateInfo; - const void * pNext = {}; - uint32_t viewFormatCount = {}; - const VULKAN_HPP_NAMESPACE::Format * pViewFormats = {}; - }; - - template <> - struct CppType - { - using Type = ImageFormatListCreateInfo; - }; - using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; - - struct ImageFormatProperties2 - { - using NativeType = VkImageFormatProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageFormatProperties2( VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageFormatProperties( imageFormatProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageFormatProperties2( ImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatProperties2( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageFormatProperties2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageFormatProperties2 & operator=( ImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageFormatProperties2 & operator=( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkImageFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageFormatProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageFormatProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageFormatProperties2 const & ) const = default; -#else - bool operator==( ImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageFormatProperties == rhs.imageFormatProperties ); -# endif - } - - bool operator!=( ImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {}; - }; - - template <> - struct CppType - { - using Type = ImageFormatProperties2; - }; - using ImageFormatProperties2KHR = ImageFormatProperties2; - - struct ImageMemoryBarrier - { - using NativeType = VkImageMemoryBarrier; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryBarrier; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t srcQueueFamilyIndex_ = {}, - uint32_t dstQueueFamilyIndex_ = {}, - VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcAccessMask( srcAccessMask_ ) - , dstAccessMask( dstAccessMask_ ) - , oldLayout( oldLayout_ ) - , newLayout( newLayout_ ) - , srcQueueFamilyIndex( srcQueueFamilyIndex_ ) - , dstQueueFamilyIndex( dstQueueFamilyIndex_ ) - , image( image_ ) - , subresourceRange( subresourceRange_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( ImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryBarrier( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : ImageMemoryBarrier( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageMemoryBarrier & operator=( ImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryBarrier & operator=( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT - { - oldLayout = oldLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT - { - newLayout = newLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - srcQueueFamilyIndex = srcQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - dstQueueFamilyIndex = dstQueueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & - setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT - { - subresourceRange = subresourceRange_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageMemoryBarrier &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcAccessMask, dstAccessMask, oldLayout, newLayout, srcQueueFamilyIndex, dstQueueFamilyIndex, image, subresourceRange ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageMemoryBarrier const & ) const = default; -#else - bool operator==( ImageMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && - ( oldLayout == rhs.oldLayout ) && ( newLayout == rhs.newLayout ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && - ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( image == rhs.image ) && ( subresourceRange == rhs.subresourceRange ); -# endif - } - - bool operator!=( ImageMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryBarrier; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; - VULKAN_HPP_NAMESPACE::ImageLayout oldLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ImageLayout newLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t srcQueueFamilyIndex = {}; - uint32_t dstQueueFamilyIndex = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; - }; - - template <> - struct CppType - { - using Type = ImageMemoryBarrier; - }; - - struct ImageMemoryRequirementsInfo2 - { - using NativeType = VkImageMemoryRequirementsInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryRequirementsInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( ImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryRequirementsInfo2( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageMemoryRequirementsInfo2 & operator=( ImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageMemoryRequirementsInfo2 & operator=( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageMemoryRequirementsInfo2 const & ) const = default; -#else - bool operator==( ImageMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ); -# endif - } - - bool operator!=( ImageMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryRequirementsInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - }; - - template <> - struct CppType - { - using Type = ImageMemoryRequirementsInfo2; - }; - using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImagePipeSurfaceCreateInfoFUCHSIA - { - using NativeType = VkImagePipeSurfaceCreateInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = {}, - zx_handle_t imagePipeHandle_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , imagePipeHandle( imagePipeHandle_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImagePipeSurfaceCreateInfoFUCHSIA( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImagePipeSurfaceCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImagePipeSurfaceCreateInfoFUCHSIA & operator=( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImagePipeSurfaceCreateInfoFUCHSIA & operator=( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setImagePipeHandle( zx_handle_t imagePipeHandle_ ) VULKAN_HPP_NOEXCEPT - { - imagePipeHandle = imagePipeHandle_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImagePipeSurfaceCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImagePipeSurfaceCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, imagePipeHandle ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &imagePipeHandle, &rhs.imagePipeHandle, sizeof( zx_handle_t ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( memcmp( &imagePipeHandle, &rhs.imagePipeHandle, sizeof( zx_handle_t ) ) == 0 ); - } - - bool operator!=( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags = {}; - zx_handle_t imagePipeHandle = {}; - }; - - template <> - struct CppType - { - using Type = ImagePipeSurfaceCreateInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct ImagePlaneMemoryRequirementsInfo - { - using NativeType = VkImagePlaneMemoryRequirementsInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImagePlaneMemoryRequirementsInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ImagePlaneMemoryRequirementsInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , planeAspect( planeAspect_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( ImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImagePlaneMemoryRequirementsInfo( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ImagePlaneMemoryRequirementsInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImagePlaneMemoryRequirementsInfo & operator=( ImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImagePlaneMemoryRequirementsInfo & operator=( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImagePlaneMemoryRequirementsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImagePlaneMemoryRequirementsInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT - { - planeAspect = planeAspect_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImagePlaneMemoryRequirementsInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImagePlaneMemoryRequirementsInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, planeAspect ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImagePlaneMemoryRequirementsInfo const & ) const = default; -#else - bool operator==( ImagePlaneMemoryRequirementsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( planeAspect == rhs.planeAspect ); -# endif - } - - bool operator!=( ImagePlaneMemoryRequirementsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; - }; - - template <> - struct CppType - { - using Type = ImagePlaneMemoryRequirementsInfo; - }; - using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; - - struct ImageResolve - { - using NativeType = VkImageResolve; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageResolve( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {} ) VULKAN_HPP_NOEXCEPT - : srcSubresource( srcSubresource_ ) - , srcOffset( srcOffset_ ) - , dstSubresource( dstSubresource_ ) - , dstOffset( dstOffset_ ) - , extent( extent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageResolve( ImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageResolve( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT : ImageResolve( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageResolve & operator=( ImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageResolve & operator=( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageResolve & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageResolve const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageResolve &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageResolve const & ) const = default; -#else - bool operator==( ImageResolve const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && - ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); -# endif - } - - bool operator!=( ImageResolve const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - }; - - struct ImageResolve2 - { - using NativeType = VkImageResolve2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageResolve2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageResolve2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, - VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcSubresource( srcSubresource_ ) - , srcOffset( srcOffset_ ) - , dstSubresource( dstSubresource_ ) - , dstOffset( dstOffset_ ) - , extent( extent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageResolve2( ImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageResolve2( VkImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageResolve2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageResolve2 & operator=( ImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageResolve2 & operator=( VkImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT - { - srcSubresource = srcSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcOffset = srcOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT - { - dstSubresource = dstSubresource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstOffset = dstOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageResolve2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageResolve2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageResolve2 const & ) const = default; -#else - bool operator==( ImageResolve2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && - ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); -# endif - } - - bool operator!=( ImageResolve2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageResolve2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; - VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; - VULKAN_HPP_NAMESPACE::Extent3D extent = {}; - }; - - template <> - struct CppType - { - using Type = ImageResolve2; - }; - using ImageResolve2KHR = ImageResolve2; - - struct ImageSparseMemoryRequirementsInfo2 - { - using NativeType = VkImageSparseMemoryRequirementsInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSparseMemoryRequirementsInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( ImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSparseMemoryRequirementsInfo2( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageSparseMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSparseMemoryRequirementsInfo2 & operator=( ImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSparseMemoryRequirementsInfo2 & operator=( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSparseMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSparseMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSparseMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSparseMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSparseMemoryRequirementsInfo2 const & ) const = default; -#else - bool operator==( ImageSparseMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ); -# endif - } - - bool operator!=( ImageSparseMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - }; - - template <> - struct CppType - { - using Type = ImageSparseMemoryRequirementsInfo2; - }; - using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; - - struct ImageStencilUsageCreateInfo - { - using NativeType = VkImageStencilUsageCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageStencilUsageCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stencilUsage( stencilUsage_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfo( ImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageStencilUsageCreateInfo( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageStencilUsageCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageStencilUsageCreateInfo & operator=( ImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageStencilUsageCreateInfo & operator=( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageStencilUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageStencilUsageCreateInfo & setStencilUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ ) VULKAN_HPP_NOEXCEPT - { - stencilUsage = stencilUsage_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageStencilUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageStencilUsageCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stencilUsage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageStencilUsageCreateInfo const & ) const = default; -#else - bool operator==( ImageStencilUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilUsage == rhs.stencilUsage ); -# endif - } - - bool operator!=( ImageStencilUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageStencilUsageCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage = {}; - }; - - template <> - struct CppType - { - using Type = ImageStencilUsageCreateInfo; - }; - using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; - - struct ImageSubresource2EXT - { - using NativeType = VkImageSubresource2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSubresource2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageSubresource2EXT( VULKAN_HPP_NAMESPACE::ImageSubresource imageSubresource_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageSubresource( imageSubresource_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSubresource2EXT( ImageSubresource2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresource2EXT( VkImageSubresource2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageSubresource2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSubresource2EXT & operator=( ImageSubresource2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSubresource2EXT & operator=( VkImageSubresource2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSubresource2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSubresource2EXT & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT - { - imageSubresource = imageSubresource_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSubresource2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSubresource2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageSubresource ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSubresource2EXT const & ) const = default; -#else - bool operator==( ImageSubresource2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageSubresource == rhs.imageSubresource ); -# endif - } - - bool operator!=( ImageSubresource2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSubresource2EXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageSubresource imageSubresource = {}; - }; - - template <> - struct CppType - { - using Type = ImageSubresource2EXT; - }; - - struct ImageSwapchainCreateInfoKHR - { - using NativeType = VkImageSwapchainCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSwapchainCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchain( swapchain_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( ImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSwapchainCreateInfoKHR( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageSwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageSwapchainCreateInfoKHR & operator=( ImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageSwapchainCreateInfoKHR & operator=( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageSwapchainCreateInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT - { - swapchain = swapchain_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchain ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageSwapchainCreateInfoKHR const & ) const = default; -#else - bool operator==( ImageSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ); -# endif - } - - bool operator!=( ImageSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSwapchainCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; - }; - - template <> - struct CppType - { - using Type = ImageSwapchainCreateInfoKHR; - }; - - struct ImageViewASTCDecodeModeEXT - { - using NativeType = VkImageViewASTCDecodeModeEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewAstcDecodeModeEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( VULKAN_HPP_NAMESPACE::Format decodeMode_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , decodeMode( decodeMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( ImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewASTCDecodeModeEXT( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewASTCDecodeModeEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewASTCDecodeModeEXT & operator=( ImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewASTCDecodeModeEXT & operator=( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewASTCDecodeModeEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewASTCDecodeModeEXT & setDecodeMode( VULKAN_HPP_NAMESPACE::Format decodeMode_ ) VULKAN_HPP_NOEXCEPT - { - decodeMode = decodeMode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewASTCDecodeModeEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewASTCDecodeModeEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, decodeMode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewASTCDecodeModeEXT const & ) const = default; -#else - bool operator==( ImageViewASTCDecodeModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( decodeMode == rhs.decodeMode ); -# endif - } - - bool operator!=( ImageViewASTCDecodeModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewAstcDecodeModeEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format decodeMode = VULKAN_HPP_NAMESPACE::Format::eUndefined; - }; - - template <> - struct CppType - { - using Type = ImageViewASTCDecodeModeEXT; - }; - - struct ImageViewAddressPropertiesNVX - { - using NativeType = VkImageViewAddressPropertiesNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewAddressPropertiesNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewAddressPropertiesNVX( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceAddress( deviceAddress_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewAddressPropertiesNVX( ImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewAddressPropertiesNVX( VkImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewAddressPropertiesNVX( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewAddressPropertiesNVX & operator=( ImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewAddressPropertiesNVX & operator=( VkImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkImageViewAddressPropertiesNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewAddressPropertiesNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceAddress, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewAddressPropertiesNVX const & ) const = default; -#else - bool operator==( ImageViewAddressPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceAddress == rhs.deviceAddress ) && ( size == rhs.size ); -# endif - } - - bool operator!=( ImageViewAddressPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewAddressPropertiesNVX; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewAddressPropertiesNVX; - }; - - struct ImageViewCreateInfo - { - using NativeType = VkImageViewCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::ImageViewType viewType_ = VULKAN_HPP_NAMESPACE::ImageViewType::e1D, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , image( image_ ) - , viewType( viewType_ ) - , format( format_ ) - , components( components_ ) - , subresourceRange( subresourceRange_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( ImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewCreateInfo( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewCreateInfo & operator=( ImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewCreateInfo & operator=( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setViewType( VULKAN_HPP_NAMESPACE::ImageViewType viewType_ ) VULKAN_HPP_NOEXCEPT - { - viewType = viewType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT - { - components = components_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & - setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT - { - subresourceRange = subresourceRange_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, image, viewType, format, components, subresourceRange ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewCreateInfo const & ) const = default; -#else - bool operator==( ImageViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( image == rhs.image ) && ( viewType == rhs.viewType ) && - ( format == rhs.format ) && ( components == rhs.components ) && ( subresourceRange == rhs.subresourceRange ); -# endif - } - - bool operator!=( ImageViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::ImageViewType viewType = VULKAN_HPP_NAMESPACE::ImageViewType::e1D; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; - VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewCreateInfo; - }; - - struct ImageViewHandleInfoNVX - { - using NativeType = VkImageViewHandleInfoNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewHandleInfoNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, - VULKAN_HPP_NAMESPACE::Sampler sampler_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageView( imageView_ ) - , descriptorType( descriptorType_ ) - , sampler( sampler_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( ImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewHandleInfoNVX( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewHandleInfoNVX( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewHandleInfoNVX & operator=( ImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewHandleInfoNVX & operator=( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT - { - descriptorType = descriptorType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT - { - sampler = sampler_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewHandleInfoNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewHandleInfoNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageView, descriptorType, sampler ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewHandleInfoNVX const & ) const = default; -#else - bool operator==( ImageViewHandleInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( descriptorType == rhs.descriptorType ) && - ( sampler == rhs.sampler ); -# endif - } - - bool operator!=( ImageViewHandleInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewHandleInfoNVX; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; - VULKAN_HPP_NAMESPACE::Sampler sampler = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewHandleInfoNVX; - }; - - struct ImageViewMinLodCreateInfoEXT - { - using NativeType = VkImageViewMinLodCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewMinLodCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewMinLodCreateInfoEXT( float minLod_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minLod( minLod_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewMinLodCreateInfoEXT( ImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewMinLodCreateInfoEXT( VkImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewMinLodCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewMinLodCreateInfoEXT & operator=( ImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewMinLodCreateInfoEXT & operator=( VkImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewMinLodCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewMinLodCreateInfoEXT & setMinLod( float minLod_ ) VULKAN_HPP_NOEXCEPT - { - minLod = minLod_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewMinLodCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewMinLodCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minLod ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewMinLodCreateInfoEXT const & ) const = default; -#else - bool operator==( ImageViewMinLodCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minLod == rhs.minLod ); -# endif - } - - bool operator!=( ImageViewMinLodCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewMinLodCreateInfoEXT; - const void * pNext = {}; - float minLod = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewMinLodCreateInfoEXT; - }; - - struct ImageViewSampleWeightCreateInfoQCOM - { - using NativeType = VkImageViewSampleWeightCreateInfoQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewSampleWeightCreateInfoQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewSampleWeightCreateInfoQCOM( VULKAN_HPP_NAMESPACE::Offset2D filterCenter_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D filterSize_ = {}, - uint32_t numPhases_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , filterCenter( filterCenter_ ) - , filterSize( filterSize_ ) - , numPhases( numPhases_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewSampleWeightCreateInfoQCOM( ImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewSampleWeightCreateInfoQCOM( VkImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewSampleWeightCreateInfoQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewSampleWeightCreateInfoQCOM & operator=( ImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewSampleWeightCreateInfoQCOM & operator=( VkImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setFilterCenter( VULKAN_HPP_NAMESPACE::Offset2D const & filterCenter_ ) VULKAN_HPP_NOEXCEPT - { - filterCenter = filterCenter_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setFilterSize( VULKAN_HPP_NAMESPACE::Extent2D const & filterSize_ ) VULKAN_HPP_NOEXCEPT - { - filterSize = filterSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setNumPhases( uint32_t numPhases_ ) VULKAN_HPP_NOEXCEPT - { - numPhases = numPhases_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewSampleWeightCreateInfoQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewSampleWeightCreateInfoQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, filterCenter, filterSize, numPhases ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewSampleWeightCreateInfoQCOM const & ) const = default; -#else - bool operator==( ImageViewSampleWeightCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterCenter == rhs.filterCenter ) && ( filterSize == rhs.filterSize ) && - ( numPhases == rhs.numPhases ); -# endif - } - - bool operator!=( ImageViewSampleWeightCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewSampleWeightCreateInfoQCOM; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Offset2D filterCenter = {}; - VULKAN_HPP_NAMESPACE::Extent2D filterSize = {}; - uint32_t numPhases = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewSampleWeightCreateInfoQCOM; - }; - - struct ImageViewUsageCreateInfo - { - using NativeType = VkImageViewUsageCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewUsageCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , usage( usage_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( ImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewUsageCreateInfo( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ImageViewUsageCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImageViewUsageCreateInfo & operator=( ImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImageViewUsageCreateInfo & operator=( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImageViewUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImageViewUsageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImageViewUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImageViewUsageCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, usage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImageViewUsageCreateInfo const & ) const = default; -#else - bool operator==( ImageViewUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( usage == rhs.usage ); -# endif - } - - bool operator!=( ImageViewUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewUsageCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; - }; - - template <> - struct CppType - { - using Type = ImageViewUsageCreateInfo; - }; - using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct ImportAndroidHardwareBufferInfoANDROID - { - using NativeType = VkImportAndroidHardwareBufferInfoANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportAndroidHardwareBufferInfoANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer * buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , buffer( buffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( ImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportAndroidHardwareBufferInfoANDROID( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportAndroidHardwareBufferInfoANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportAndroidHardwareBufferInfoANDROID & operator=( ImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportAndroidHardwareBufferInfoANDROID & operator=( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportAndroidHardwareBufferInfoANDROID & setBuffer( struct AHardwareBuffer * buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportAndroidHardwareBufferInfoANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, buffer ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportAndroidHardwareBufferInfoANDROID const & ) const = default; -# else - bool operator==( ImportAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); -# endif - } - - bool operator!=( ImportAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportAndroidHardwareBufferInfoANDROID; - const void * pNext = {}; - struct AHardwareBuffer * buffer = {}; - }; - - template <> - struct CppType - { - using Type = ImportAndroidHardwareBufferInfoANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - struct ImportFenceFdInfoKHR - { - using NativeType = VkImportFenceFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportFenceFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( - VULKAN_HPP_NAMESPACE::Fence fence_ = {}, - VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, - int fd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fence( fence_ ) - , flags( flags_ ) - , handleType( handleType_ ) - , fd( fd_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( ImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportFenceFdInfoKHR( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportFenceFdInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportFenceFdInfoKHR & operator=( ImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportFenceFdInfoKHR & operator=( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT - { - fence = fence_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT - { - fd = fd_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportFenceFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportFenceFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fence, flags, handleType, fd ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportFenceFdInfoKHR const & ) const = default; -#else - bool operator==( ImportFenceFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && - ( fd == rhs.fd ); -# endif - } - - bool operator!=( ImportFenceFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportFenceFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Fence fence = {}; - VULKAN_HPP_NAMESPACE::FenceImportFlags flags = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; - int fd = {}; - }; - - template <> - struct CppType - { - using Type = ImportFenceFdInfoKHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ImportFenceWin32HandleInfoKHR - { - using NativeType = VkImportFenceWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportFenceWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::Fence fence_ = {}, - VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, - HANDLE handle_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fence( fence_ ) - , flags( flags_ ) - , handleType( handleType_ ) - , handle( handle_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( ImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportFenceWin32HandleInfoKHR( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportFenceWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportFenceWin32HandleInfoKHR & operator=( ImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportFenceWin32HandleInfoKHR & operator=( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT - { - fence = fence_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT - { - handle = handle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportFenceWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fence, flags, handleType, handle, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportFenceWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ImportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && - ( handle == rhs.handle ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ImportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Fence fence = {}; - VULKAN_HPP_NAMESPACE::FenceImportFlags flags = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; - HANDLE handle = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ImportFenceWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImportMemoryBufferCollectionFUCHSIA - { - using NativeType = VkImportMemoryBufferCollectionFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryBufferCollectionFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, - uint32_t index_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , collection( collection_ ) - , index( index_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryBufferCollectionFUCHSIA( ImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryBufferCollectionFUCHSIA( VkImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryBufferCollectionFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryBufferCollectionFUCHSIA & operator=( ImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryBufferCollectionFUCHSIA & operator=( VkImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT - { - collection = collection_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT - { - index = index_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryBufferCollectionFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryBufferCollectionFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, collection, index ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMemoryBufferCollectionFUCHSIA const & ) const = default; -# else - bool operator==( ImportMemoryBufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); -# endif - } - - bool operator!=( ImportMemoryBufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryBufferCollectionFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; - uint32_t index = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryBufferCollectionFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct ImportMemoryFdInfoKHR - { - using NativeType = VkImportMemoryFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - int fd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - , fd( fd_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( ImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryFdInfoKHR( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryFdInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryFdInfoKHR & operator=( ImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryFdInfoKHR & operator=( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT - { - fd = fd_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType, fd ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMemoryFdInfoKHR const & ) const = default; -#else - bool operator==( ImportMemoryFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( fd == rhs.fd ); -# endif - } - - bool operator!=( ImportMemoryFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - int fd = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryFdInfoKHR; - }; - - struct ImportMemoryHostPointerInfoEXT - { - using NativeType = VkImportMemoryHostPointerInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryHostPointerInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - void * pHostPointer_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - , pHostPointer( pHostPointer_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( ImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryHostPointerInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryHostPointerInfoEXT & operator=( ImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryHostPointerInfoEXT & operator=( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & setPHostPointer( void * pHostPointer_ ) VULKAN_HPP_NOEXCEPT - { - pHostPointer = pHostPointer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryHostPointerInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryHostPointerInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType, pHostPointer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMemoryHostPointerInfoEXT const & ) const = default; -#else - bool operator==( ImportMemoryHostPointerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( pHostPointer == rhs.pHostPointer ); -# endif - } - - bool operator!=( ImportMemoryHostPointerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - void * pHostPointer = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryHostPointerInfoEXT; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ImportMemoryWin32HandleInfoKHR - { - using NativeType = VkImportMemoryWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - HANDLE handle_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - , handle( handle_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( ImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryWin32HandleInfoKHR( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryWin32HandleInfoKHR & operator=( ImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryWin32HandleInfoKHR & operator=( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT - { - handle = handle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType, handle, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMemoryWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ImportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ImportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - HANDLE handle = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ImportMemoryWin32HandleInfoNV - { - using NativeType = VkImportMemoryWin32HandleInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryWin32HandleInfoNV; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ = {}, - HANDLE handle_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - , handle( handle_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( ImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryWin32HandleInfoNV( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryWin32HandleInfoNV( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryWin32HandleInfoNV & operator=( ImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryWin32HandleInfoNV & operator=( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT - { - handle = handle_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryWin32HandleInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType, handle ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMemoryWin32HandleInfoNV const & ) const = default; -# else - bool operator==( ImportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ); -# endif - } - - bool operator!=( ImportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType = {}; - HANDLE handle = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryWin32HandleInfoNV; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImportMemoryZirconHandleInfoFUCHSIA - { - using NativeType = VkImportMemoryZirconHandleInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryZirconHandleInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMemoryZirconHandleInfoFUCHSIA( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - zx_handle_t handle_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - , handle( handle_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMemoryZirconHandleInfoFUCHSIA( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryZirconHandleInfoFUCHSIA( VkImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMemoryZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMemoryZirconHandleInfoFUCHSIA & operator=( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMemoryZirconHandleInfoFUCHSIA & operator=( VkImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & setHandle( zx_handle_t handle_ ) VULKAN_HPP_NOEXCEPT - { - handle = handle_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMemoryZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMemoryZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType, handle ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = handleType <=> rhs.handleType; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &handle, &rhs.handle, sizeof( zx_handle_t ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && - ( memcmp( &handle, &rhs.handle, sizeof( zx_handle_t ) ) == 0 ); - } - - bool operator!=( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryZirconHandleInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - zx_handle_t handle = {}; - }; - - template <> - struct CppType - { - using Type = ImportMemoryZirconHandleInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ImportMetalBufferInfoEXT - { - using NativeType = VkImportMetalBufferInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalBufferInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMetalBufferInfoEXT( MTLBuffer_id mtlBuffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mtlBuffer( mtlBuffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMetalBufferInfoEXT( ImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalBufferInfoEXT( VkImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMetalBufferInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMetalBufferInfoEXT & operator=( ImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalBufferInfoEXT & operator=( VkImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMetalBufferInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMetalBufferInfoEXT & setMtlBuffer( MTLBuffer_id mtlBuffer_ ) VULKAN_HPP_NOEXCEPT - { - mtlBuffer = mtlBuffer_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMetalBufferInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMetalBufferInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mtlBuffer ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMetalBufferInfoEXT const & ) const = default; -# else - bool operator==( ImportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlBuffer == rhs.mtlBuffer ); -# endif - } - - bool operator!=( ImportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalBufferInfoEXT; - const void * pNext = {}; - MTLBuffer_id mtlBuffer = {}; - }; - - template <> - struct CppType - { - using Type = ImportMetalBufferInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ImportMetalIOSurfaceInfoEXT - { - using NativeType = VkImportMetalIOSurfaceInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalIoSurfaceInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMetalIOSurfaceInfoEXT( IOSurfaceRef ioSurface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , ioSurface( ioSurface_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMetalIOSurfaceInfoEXT( ImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalIOSurfaceInfoEXT( VkImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMetalIOSurfaceInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMetalIOSurfaceInfoEXT & operator=( ImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalIOSurfaceInfoEXT & operator=( VkImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMetalIOSurfaceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMetalIOSurfaceInfoEXT & setIoSurface( IOSurfaceRef ioSurface_ ) VULKAN_HPP_NOEXCEPT - { - ioSurface = ioSurface_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMetalIOSurfaceInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMetalIOSurfaceInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, ioSurface ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMetalIOSurfaceInfoEXT const & ) const = default; -# else - bool operator==( ImportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ioSurface == rhs.ioSurface ); -# endif - } - - bool operator!=( ImportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalIoSurfaceInfoEXT; - const void * pNext = {}; - IOSurfaceRef ioSurface = {}; - }; - - template <> - struct CppType - { - using Type = ImportMetalIOSurfaceInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ImportMetalSharedEventInfoEXT - { - using NativeType = VkImportMetalSharedEventInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalSharedEventInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMetalSharedEventInfoEXT( MTLSharedEvent_id mtlSharedEvent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mtlSharedEvent( mtlSharedEvent_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMetalSharedEventInfoEXT( ImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalSharedEventInfoEXT( VkImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMetalSharedEventInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMetalSharedEventInfoEXT & operator=( ImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalSharedEventInfoEXT & operator=( VkImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMetalSharedEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMetalSharedEventInfoEXT & setMtlSharedEvent( MTLSharedEvent_id mtlSharedEvent_ ) VULKAN_HPP_NOEXCEPT - { - mtlSharedEvent = mtlSharedEvent_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMetalSharedEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMetalSharedEventInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mtlSharedEvent ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMetalSharedEventInfoEXT const & ) const = default; -# else - bool operator==( ImportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlSharedEvent == rhs.mtlSharedEvent ); -# endif - } - - bool operator!=( ImportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalSharedEventInfoEXT; - const void * pNext = {}; - MTLSharedEvent_id mtlSharedEvent = {}; - }; - - template <> - struct CppType - { - using Type = ImportMetalSharedEventInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct ImportMetalTextureInfoEXT - { - using NativeType = VkImportMetalTextureInfoEXT; - - static const bool allowDuplicate = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalTextureInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportMetalTextureInfoEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, - MTLTexture_id mtlTexture_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , plane( plane_ ) - , mtlTexture( mtlTexture_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportMetalTextureInfoEXT( ImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalTextureInfoEXT( VkImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportMetalTextureInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportMetalTextureInfoEXT & operator=( ImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportMetalTextureInfoEXT & operator=( VkImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setPlane( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ ) VULKAN_HPP_NOEXCEPT - { - plane = plane_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setMtlTexture( MTLTexture_id mtlTexture_ ) VULKAN_HPP_NOEXCEPT - { - mtlTexture = mtlTexture_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportMetalTextureInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportMetalTextureInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, plane, mtlTexture ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportMetalTextureInfoEXT const & ) const = default; -# else - bool operator==( ImportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( plane == rhs.plane ) && ( mtlTexture == rhs.mtlTexture ); -# endif - } - - bool operator!=( ImportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalTextureInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; - MTLTexture_id mtlTexture = {}; - }; - - template <> - struct CppType - { - using Type = ImportMetalTextureInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - struct ImportSemaphoreFdInfoKHR - { - using NativeType = VkImportSemaphoreFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - int fd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , flags( flags_ ) - , handleType( handleType_ ) - , fd( fd_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( ImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreFdInfoKHR( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportSemaphoreFdInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportSemaphoreFdInfoKHR & operator=( ImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreFdInfoKHR & operator=( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT - { - fd = fd_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportSemaphoreFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportSemaphoreFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, flags, handleType, fd ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportSemaphoreFdInfoKHR const & ) const = default; -#else - bool operator==( ImportSemaphoreFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && - ( fd == rhs.fd ); -# endif - } - - bool operator!=( ImportSemaphoreFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - int fd = {}; - }; - - template <> - struct CppType - { - using Type = ImportSemaphoreFdInfoKHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct ImportSemaphoreWin32HandleInfoKHR - { - using NativeType = VkImportSemaphoreWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - HANDLE handle_ = {}, - LPCWSTR name_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , flags( flags_ ) - , handleType( handleType_ ) - , handle( handle_ ) - , name( name_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( ImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreWin32HandleInfoKHR( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportSemaphoreWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportSemaphoreWin32HandleInfoKHR & operator=( ImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreWin32HandleInfoKHR & operator=( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT - { - handle = handle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT - { - name = name_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportSemaphoreWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, flags, handleType, handle, name ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ImportSemaphoreWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( ImportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && - ( handle == rhs.handle ) && ( name == rhs.name ); -# endif - } - - bool operator!=( ImportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - HANDLE handle = {}; - LPCWSTR name = {}; - }; - - template <> - struct CppType - { - using Type = ImportSemaphoreWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct ImportSemaphoreZirconHandleInfoFUCHSIA - { - using NativeType = VkImportSemaphoreZirconHandleInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ImportSemaphoreZirconHandleInfoFUCHSIA( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - zx_handle_t zirconHandle_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , flags( flags_ ) - , handleType( handleType_ ) - , zirconHandle( zirconHandle_ ) - { - } - - VULKAN_HPP_CONSTEXPR ImportSemaphoreZirconHandleInfoFUCHSIA( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreZirconHandleInfoFUCHSIA( VkImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : ImportSemaphoreZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ImportSemaphoreZirconHandleInfoFUCHSIA & operator=( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ImportSemaphoreZirconHandleInfoFUCHSIA & operator=( VkImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setZirconHandle( zx_handle_t zirconHandle_ ) VULKAN_HPP_NOEXCEPT - { - zirconHandle = zirconHandle_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkImportSemaphoreZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkImportSemaphoreZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, flags, handleType, zirconHandle ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = semaphore <=> rhs.semaphore; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = handleType <=> rhs.handleType; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &zirconHandle, &rhs.zirconHandle, sizeof( zx_handle_t ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && - ( memcmp( &zirconHandle, &rhs.zirconHandle, sizeof( zx_handle_t ) ) == 0 ); - } - - bool operator!=( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - zx_handle_t zirconHandle = {}; - }; - - template <> - struct CppType - { - using Type = ImportSemaphoreZirconHandleInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct IndirectCommandsLayoutTokenNV - { - using NativeType = VkIndirectCommandsLayoutTokenNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutTokenNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNV( - VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_ = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV::eShaderGroup, - uint32_t stream_ = {}, - uint32_t offset_ = {}, - uint32_t vertexBindingUnit_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_ = {}, - uint32_t pushconstantOffset_ = {}, - uint32_t pushconstantSize_ = {}, - VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_ = {}, - uint32_t indexTypeCount_ = {}, - const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes_ = {}, - const uint32_t * pIndexTypeValues_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , tokenType( tokenType_ ) - , stream( stream_ ) - , offset( offset_ ) - , vertexBindingUnit( vertexBindingUnit_ ) - , vertexDynamicStride( vertexDynamicStride_ ) - , pushconstantPipelineLayout( pushconstantPipelineLayout_ ) - , pushconstantShaderStageFlags( pushconstantShaderStageFlags_ ) - , pushconstantOffset( pushconstantOffset_ ) - , pushconstantSize( pushconstantSize_ ) - , indirectStateFlags( indirectStateFlags_ ) - , indexTypeCount( indexTypeCount_ ) - , pIndexTypes( pIndexTypes_ ) - , pIndexTypeValues( pIndexTypeValues_ ) - { - } - - VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNV( IndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsLayoutTokenNV( VkIndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT - : IndirectCommandsLayoutTokenNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutTokenNV( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_, - uint32_t stream_, - uint32_t offset_, - uint32_t vertexBindingUnit_, - VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_, - VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_, - VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_, - uint32_t pushconstantOffset_, - uint32_t pushconstantSize_, - VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypes_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypeValues_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , tokenType( tokenType_ ) - , stream( stream_ ) - , offset( offset_ ) - , vertexBindingUnit( vertexBindingUnit_ ) - , vertexDynamicStride( vertexDynamicStride_ ) - , pushconstantPipelineLayout( pushconstantPipelineLayout_ ) - , pushconstantShaderStageFlags( pushconstantShaderStageFlags_ ) - , pushconstantOffset( pushconstantOffset_ ) - , pushconstantSize( pushconstantSize_ ) - , indirectStateFlags( indirectStateFlags_ ) - , indexTypeCount( static_cast( indexTypes_.size() ) ) - , pIndexTypes( indexTypes_.data() ) - , pIndexTypeValues( indexTypeValues_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( indexTypes_.size() == indexTypeValues_.size() ); -# else - if ( indexTypes_.size() != indexTypeValues_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::IndirectCommandsLayoutTokenNV::IndirectCommandsLayoutTokenNV: indexTypes_.size() != indexTypeValues_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - IndirectCommandsLayoutTokenNV & operator=( IndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsLayoutTokenNV & operator=( VkIndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setTokenType( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_ ) VULKAN_HPP_NOEXCEPT - { - tokenType = tokenType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setStream( uint32_t stream_ ) VULKAN_HPP_NOEXCEPT - { - stream = stream_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setVertexBindingUnit( uint32_t vertexBindingUnit_ ) VULKAN_HPP_NOEXCEPT - { - vertexBindingUnit = vertexBindingUnit_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setVertexDynamicStride( VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_ ) VULKAN_HPP_NOEXCEPT - { - vertexDynamicStride = vertexDynamicStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & - setPushconstantPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_ ) VULKAN_HPP_NOEXCEPT - { - pushconstantPipelineLayout = pushconstantPipelineLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & - setPushconstantShaderStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_ ) VULKAN_HPP_NOEXCEPT - { - pushconstantShaderStageFlags = pushconstantShaderStageFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantOffset( uint32_t pushconstantOffset_ ) VULKAN_HPP_NOEXCEPT - { - pushconstantOffset = pushconstantOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantSize( uint32_t pushconstantSize_ ) VULKAN_HPP_NOEXCEPT - { - pushconstantSize = pushconstantSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & - setIndirectStateFlags( VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_ ) VULKAN_HPP_NOEXCEPT - { - indirectStateFlags = indirectStateFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setIndexTypeCount( uint32_t indexTypeCount_ ) VULKAN_HPP_NOEXCEPT - { - indexTypeCount = indexTypeCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPIndexTypes( const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes_ ) VULKAN_HPP_NOEXCEPT - { - pIndexTypes = pIndexTypes_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutTokenNV & - setIndexTypes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypes_ ) VULKAN_HPP_NOEXCEPT - { - indexTypeCount = static_cast( indexTypes_.size() ); - pIndexTypes = indexTypes_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPIndexTypeValues( const uint32_t * pIndexTypeValues_ ) VULKAN_HPP_NOEXCEPT - { - pIndexTypeValues = pIndexTypeValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutTokenNV & - setIndexTypeValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypeValues_ ) VULKAN_HPP_NOEXCEPT - { - indexTypeCount = static_cast( indexTypeValues_.size() ); - pIndexTypeValues = indexTypeValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkIndirectCommandsLayoutTokenNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkIndirectCommandsLayoutTokenNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - tokenType, - stream, - offset, - vertexBindingUnit, - vertexDynamicStride, - pushconstantPipelineLayout, - pushconstantShaderStageFlags, - pushconstantOffset, - pushconstantSize, - indirectStateFlags, - indexTypeCount, - pIndexTypes, - pIndexTypeValues ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsLayoutTokenNV const & ) const = default; -#else - bool operator==( IndirectCommandsLayoutTokenNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tokenType == rhs.tokenType ) && ( stream == rhs.stream ) && ( offset == rhs.offset ) && - ( vertexBindingUnit == rhs.vertexBindingUnit ) && ( vertexDynamicStride == rhs.vertexDynamicStride ) && - ( pushconstantPipelineLayout == rhs.pushconstantPipelineLayout ) && ( pushconstantShaderStageFlags == rhs.pushconstantShaderStageFlags ) && - ( pushconstantOffset == rhs.pushconstantOffset ) && ( pushconstantSize == rhs.pushconstantSize ) && - ( indirectStateFlags == rhs.indirectStateFlags ) && ( indexTypeCount == rhs.indexTypeCount ) && ( pIndexTypes == rhs.pIndexTypes ) && - ( pIndexTypeValues == rhs.pIndexTypeValues ); -# endif - } - - bool operator!=( IndirectCommandsLayoutTokenNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutTokenNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV::eShaderGroup; - uint32_t stream = {}; - uint32_t offset = {}; - uint32_t vertexBindingUnit = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags = {}; - uint32_t pushconstantOffset = {}; - uint32_t pushconstantSize = {}; - VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags = {}; - uint32_t indexTypeCount = {}; - const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes = {}; - const uint32_t * pIndexTypeValues = {}; - }; - - template <> - struct CppType - { - using Type = IndirectCommandsLayoutTokenNV; - }; - - struct IndirectCommandsLayoutCreateInfoNV - { - using NativeType = VkIndirectCommandsLayoutCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - IndirectCommandsLayoutCreateInfoNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_ = {}, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - uint32_t tokenCount_ = {}, - const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens_ = {}, - uint32_t streamCount_ = {}, - const uint32_t * pStreamStrides_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , tokenCount( tokenCount_ ) - , pTokens( pTokens_ ) - , streamCount( streamCount_ ) - , pStreamStrides( pStreamStrides_ ) - { - } - - VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNV( IndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsLayoutCreateInfoNV( VkIndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : IndirectCommandsLayoutCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutCreateInfoNV( - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streamStrides_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , tokenCount( static_cast( tokens_.size() ) ) - , pTokens( tokens_.data() ) - , streamCount( static_cast( streamStrides_.size() ) ) - , pStreamStrides( streamStrides_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - IndirectCommandsLayoutCreateInfoNV & operator=( IndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - IndirectCommandsLayoutCreateInfoNV & operator=( VkIndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & - setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setTokenCount( uint32_t tokenCount_ ) VULKAN_HPP_NOEXCEPT - { - tokenCount = tokenCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & - setPTokens( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens_ ) VULKAN_HPP_NOEXCEPT - { - pTokens = pTokens_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutCreateInfoNV & - setTokens( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_ ) VULKAN_HPP_NOEXCEPT - { - tokenCount = static_cast( tokens_.size() ); - pTokens = tokens_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setStreamCount( uint32_t streamCount_ ) VULKAN_HPP_NOEXCEPT - { - streamCount = streamCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPStreamStrides( const uint32_t * pStreamStrides_ ) VULKAN_HPP_NOEXCEPT - { - pStreamStrides = pStreamStrides_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - IndirectCommandsLayoutCreateInfoNV & - setStreamStrides( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streamStrides_ ) VULKAN_HPP_NOEXCEPT - { - streamCount = static_cast( streamStrides_.size() ); - pStreamStrides = streamStrides_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkIndirectCommandsLayoutCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkIndirectCommandsLayoutCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pipelineBindPoint, tokenCount, pTokens, streamCount, pStreamStrides ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( IndirectCommandsLayoutCreateInfoNV const & ) const = default; -#else - bool operator==( IndirectCommandsLayoutCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && - ( tokenCount == rhs.tokenCount ) && ( pTokens == rhs.pTokens ) && ( streamCount == rhs.streamCount ) && ( pStreamStrides == rhs.pStreamStrides ); -# endif - } - - bool operator!=( IndirectCommandsLayoutCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - uint32_t tokenCount = {}; - const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens = {}; - uint32_t streamCount = {}; - const uint32_t * pStreamStrides = {}; - }; - - template <> - struct CppType - { - using Type = IndirectCommandsLayoutCreateInfoNV; - }; - - struct InitializePerformanceApiInfoINTEL - { - using NativeType = VkInitializePerformanceApiInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eInitializePerformanceApiInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pUserData( pUserData_ ) - { - } - - VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( InitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InitializePerformanceApiInfoINTEL( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : InitializePerformanceApiInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - InitializePerformanceApiInfoINTEL & operator=( InitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InitializePerformanceApiInfoINTEL & operator=( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 InitializePerformanceApiInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InitializePerformanceApiInfoINTEL & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT - { - pUserData = pUserData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkInitializePerformanceApiInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkInitializePerformanceApiInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pUserData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( InitializePerformanceApiInfoINTEL const & ) const = default; -#else - bool operator==( InitializePerformanceApiInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pUserData == rhs.pUserData ); -# endif - } - - bool operator!=( InitializePerformanceApiInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eInitializePerformanceApiInfoINTEL; - const void * pNext = {}; - void * pUserData = {}; - }; - - template <> - struct CppType - { - using Type = InitializePerformanceApiInfoINTEL; - }; - - struct InputAttachmentAspectReference - { - using NativeType = VkInputAttachmentAspectReference; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( uint32_t subpass_ = {}, - uint32_t inputAttachmentIndex_ = {}, - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {} ) VULKAN_HPP_NOEXCEPT - : subpass( subpass_ ) - , inputAttachmentIndex( inputAttachmentIndex_ ) - , aspectMask( aspectMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( InputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InputAttachmentAspectReference( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT - : InputAttachmentAspectReference( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - InputAttachmentAspectReference & operator=( InputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InputAttachmentAspectReference & operator=( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT - { - subpass = subpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setInputAttachmentIndex( uint32_t inputAttachmentIndex_ ) VULKAN_HPP_NOEXCEPT - { - inputAttachmentIndex = inputAttachmentIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT - { - aspectMask = aspectMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkInputAttachmentAspectReference const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkInputAttachmentAspectReference &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( subpass, inputAttachmentIndex, aspectMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( InputAttachmentAspectReference const & ) const = default; -#else - bool operator==( InputAttachmentAspectReference const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( subpass == rhs.subpass ) && ( inputAttachmentIndex == rhs.inputAttachmentIndex ) && ( aspectMask == rhs.aspectMask ); -# endif - } - - bool operator!=( InputAttachmentAspectReference const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t subpass = {}; - uint32_t inputAttachmentIndex = {}; - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - }; - using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; - - struct InstanceCreateInfo - { - using NativeType = VkInstanceCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eInstanceCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR InstanceCreateInfo( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_ = {}, - const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_ = {}, - uint32_t enabledLayerCount_ = {}, - const char * const * ppEnabledLayerNames_ = {}, - uint32_t enabledExtensionCount_ = {}, - const char * const * ppEnabledExtensionNames_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pApplicationInfo( pApplicationInfo_ ) - , enabledLayerCount( enabledLayerCount_ ) - , ppEnabledLayerNames( ppEnabledLayerNames_ ) - , enabledExtensionCount( enabledExtensionCount_ ) - , ppEnabledExtensionNames( ppEnabledExtensionNames_ ) - { - } - - VULKAN_HPP_CONSTEXPR InstanceCreateInfo( InstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InstanceCreateInfo( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : InstanceCreateInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - InstanceCreateInfo( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_, - const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , pApplicationInfo( pApplicationInfo_ ) - , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) - , ppEnabledLayerNames( pEnabledLayerNames_.data() ) - , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) - , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - InstanceCreateInfo & operator=( InstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - InstanceCreateInfo & operator=( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPApplicationInfo( const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_ ) VULKAN_HPP_NOEXCEPT - { - pApplicationInfo = pApplicationInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setEnabledLayerCount( uint32_t enabledLayerCount_ ) VULKAN_HPP_NOEXCEPT - { - enabledLayerCount = enabledLayerCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPpEnabledLayerNames( const char * const * ppEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT - { - ppEnabledLayerNames = ppEnabledLayerNames_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - InstanceCreateInfo & - setPEnabledLayerNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT - { - enabledLayerCount = static_cast( pEnabledLayerNames_.size() ); - ppEnabledLayerNames = pEnabledLayerNames_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT - { - enabledExtensionCount = enabledExtensionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPpEnabledExtensionNames( const char * const * ppEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT - { - ppEnabledExtensionNames = ppEnabledExtensionNames_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - InstanceCreateInfo & - setPEnabledExtensionNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT - { - enabledExtensionCount = static_cast( pEnabledExtensionNames_.size() ); - ppEnabledExtensionNames = pEnabledExtensionNames_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkInstanceCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkInstanceCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pApplicationInfo, enabledLayerCount, ppEnabledLayerNames, enabledExtensionCount, ppEnabledExtensionNames ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = pApplicationInfo <=> rhs.pApplicationInfo; cmp != 0 ) - return cmp; - if ( auto cmp = enabledLayerCount <=> rhs.enabledLayerCount; cmp != 0 ) - return cmp; - for ( size_t i = 0; i < enabledLayerCount; ++i ) - { - if ( ppEnabledLayerNames[i] != rhs.ppEnabledLayerNames[i] ) - if ( auto cmp = strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ); cmp != 0 ) - return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; - } - if ( auto cmp = enabledExtensionCount <=> rhs.enabledExtensionCount; cmp != 0 ) - return cmp; - for ( size_t i = 0; i < enabledExtensionCount; ++i ) - { - if ( ppEnabledExtensionNames[i] != rhs.ppEnabledExtensionNames[i] ) - if ( auto cmp = strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ); cmp != 0 ) - return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; - } - - return std::strong_ordering::equivalent; - } -#endif - - bool operator==( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pApplicationInfo == rhs.pApplicationInfo ) && - ( enabledLayerCount == rhs.enabledLayerCount ) && - [this, rhs] - { - bool equal = true; - for ( size_t i = 0; equal && ( i < enabledLayerCount ); ++i ) - { - equal = ( ( ppEnabledLayerNames[i] == rhs.ppEnabledLayerNames[i] ) || ( strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ) == 0 ) ); - } - return equal; - }() && ( enabledExtensionCount == rhs.enabledExtensionCount ) && - [this, rhs] - { - bool equal = true; - for ( size_t i = 0; equal && ( i < enabledExtensionCount ); ++i ) - { - equal = ( ( ppEnabledExtensionNames[i] == rhs.ppEnabledExtensionNames[i] ) || - ( strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ) == 0 ) ); - } - return equal; - }(); - } - - bool operator!=( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eInstanceCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags = {}; - const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo = {}; - uint32_t enabledLayerCount = {}; - const char * const * ppEnabledLayerNames = {}; - uint32_t enabledExtensionCount = {}; - const char * const * ppEnabledExtensionNames = {}; - }; - - template <> - struct CppType - { - using Type = InstanceCreateInfo; - }; - - struct LayerProperties - { - using NativeType = VkLayerProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 LayerProperties( std::array const & layerName_ = {}, - uint32_t specVersion_ = {}, - uint32_t implementationVersion_ = {}, - std::array const & description_ = {} ) VULKAN_HPP_NOEXCEPT - : layerName( layerName_ ) - , specVersion( specVersion_ ) - , implementationVersion( implementationVersion_ ) - , description( description_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 LayerProperties( LayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - LayerProperties( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT : LayerProperties( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - LayerProperties & operator=( LayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - LayerProperties & operator=( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkLayerProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkLayerProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( layerName, specVersion, implementationVersion, description ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( LayerProperties const & ) const = default; -#else - bool operator==( LayerProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( layerName == rhs.layerName ) && ( specVersion == rhs.specVersion ) && ( implementationVersion == rhs.implementationVersion ) && - ( description == rhs.description ); -# endif - } - - bool operator!=( LayerProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ArrayWrapper1D layerName = {}; - uint32_t specVersion = {}; - uint32_t implementationVersion = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - }; - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - struct MacOSSurfaceCreateInfoMVK - { - using NativeType = VkMacOSSurfaceCreateInfoMVK; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMacosSurfaceCreateInfoMVK; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ = {}, - const void * pView_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pView( pView_ ) - { - } - - VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( MacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MacOSSurfaceCreateInfoMVK( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT - : MacOSSurfaceCreateInfoMVK( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MacOSSurfaceCreateInfoMVK & operator=( MacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MacOSSurfaceCreateInfoMVK & operator=( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setPView( const void * pView_ ) VULKAN_HPP_NOEXCEPT - { - pView = pView_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMacOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMacOSSurfaceCreateInfoMVK &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pView ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MacOSSurfaceCreateInfoMVK const & ) const = default; -# else - bool operator==( MacOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pView == rhs.pView ); -# endif - } - - bool operator!=( MacOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags = {}; - const void * pView = {}; - }; - - template <> - struct CppType - { - using Type = MacOSSurfaceCreateInfoMVK; - }; -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - struct MappedMemoryRange - { - using NativeType = VkMappedMemoryRange; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMappedMemoryRange; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MappedMemoryRange( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , offset( offset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR MappedMemoryRange( MappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MappedMemoryRange( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT : MappedMemoryRange( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MappedMemoryRange & operator=( MappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MappedMemoryRange & operator=( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMappedMemoryRange const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMappedMemoryRange &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, offset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MappedMemoryRange const & ) const = default; -#else - bool operator==( MappedMemoryRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( offset == rhs.offset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( MappedMemoryRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMappedMemoryRange; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - template <> - struct CppType - { - using Type = MappedMemoryRange; - }; - - struct MemoryAllocateFlagsInfo - { - using NativeType = VkMemoryAllocateFlagsInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryAllocateFlagsInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ = {}, - uint32_t deviceMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , deviceMask( deviceMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( MemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryAllocateFlagsInfo( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryAllocateFlagsInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryAllocateFlagsInfo & operator=( MemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryAllocateFlagsInfo & operator=( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setFlags( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT - { - deviceMask = deviceMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryAllocateFlagsInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryAllocateFlagsInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, deviceMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryAllocateFlagsInfo const & ) const = default; -#else - bool operator==( MemoryAllocateFlagsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( deviceMask == rhs.deviceMask ); -# endif - } - - bool operator!=( MemoryAllocateFlagsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateFlagsInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags = {}; - uint32_t deviceMask = {}; - }; - - template <> - struct CppType - { - using Type = MemoryAllocateFlagsInfo; - }; - using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; - - struct MemoryAllocateInfo - { - using NativeType = VkMemoryAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {}, - uint32_t memoryTypeIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , allocationSize( allocationSize_ ) - , memoryTypeIndex( memoryTypeIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( MemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryAllocateInfo( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryAllocateInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryAllocateInfo & operator=( MemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryAllocateInfo & operator=( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setAllocationSize( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ ) VULKAN_HPP_NOEXCEPT - { - allocationSize = allocationSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setMemoryTypeIndex( uint32_t memoryTypeIndex_ ) VULKAN_HPP_NOEXCEPT - { - memoryTypeIndex = memoryTypeIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, allocationSize, memoryTypeIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryAllocateInfo const & ) const = default; -#else - bool operator==( MemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allocationSize == rhs.allocationSize ) && ( memoryTypeIndex == rhs.memoryTypeIndex ); -# endif - } - - bool operator!=( MemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {}; - uint32_t memoryTypeIndex = {}; - }; - - template <> - struct CppType - { - using Type = MemoryAllocateInfo; - }; - - struct MemoryBarrier - { - using NativeType = VkMemoryBarrier; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryBarrier; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcAccessMask( srcAccessMask_ ) - , dstAccessMask( dstAccessMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryBarrier( MemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryBarrier( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryBarrier( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryBarrier & operator=( MemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryBarrier & operator=( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryBarrier &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcAccessMask, dstAccessMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryBarrier const & ) const = default; -#else - bool operator==( MemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ); -# endif - } - - bool operator!=( MemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrier; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; - }; - - template <> - struct CppType - { - using Type = MemoryBarrier; - }; - - struct MemoryDedicatedAllocateInfo - { - using NativeType = VkMemoryDedicatedAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryDedicatedAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, - VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image( image_ ) - , buffer( buffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( MemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryDedicatedAllocateInfo( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryDedicatedAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryDedicatedAllocateInfo & operator=( MemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryDedicatedAllocateInfo & operator=( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT - { - image = image_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT - { - buffer = buffer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryDedicatedAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryDedicatedAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image, buffer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryDedicatedAllocateInfo const & ) const = default; -#else - bool operator==( MemoryDedicatedAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( buffer == rhs.buffer ); -# endif - } - - bool operator!=( MemoryDedicatedAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedAllocateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image image = {}; - VULKAN_HPP_NAMESPACE::Buffer buffer = {}; - }; - - template <> - struct CppType - { - using Type = MemoryDedicatedAllocateInfo; - }; - using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; - - struct MemoryDedicatedRequirements - { - using NativeType = VkMemoryDedicatedRequirements; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryDedicatedRequirements; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryDedicatedRequirements( VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , prefersDedicatedAllocation( prefersDedicatedAllocation_ ) - , requiresDedicatedAllocation( requiresDedicatedAllocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryDedicatedRequirements( MemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryDedicatedRequirements( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryDedicatedRequirements( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryDedicatedRequirements & operator=( MemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryDedicatedRequirements & operator=( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryDedicatedRequirements const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryDedicatedRequirements &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, prefersDedicatedAllocation, requiresDedicatedAllocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryDedicatedRequirements const & ) const = default; -#else - bool operator==( MemoryDedicatedRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( prefersDedicatedAllocation == rhs.prefersDedicatedAllocation ) && - ( requiresDedicatedAllocation == rhs.requiresDedicatedAllocation ); -# endif - } - - bool operator!=( MemoryDedicatedRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedRequirements; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation = {}; - VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation = {}; - }; - - template <> - struct CppType - { - using Type = MemoryDedicatedRequirements; - }; - using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; - - struct MemoryFdPropertiesKHR - { - using NativeType = VkMemoryFdPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryFdPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryFdPropertiesKHR( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryFdPropertiesKHR( MemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryFdPropertiesKHR( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryFdPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryFdPropertiesKHR & operator=( MemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryFdPropertiesKHR & operator=( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryFdPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryFdPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryTypeBits ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryFdPropertiesKHR const & ) const = default; -#else - bool operator==( MemoryFdPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( MemoryFdPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryFdPropertiesKHR; - void * pNext = {}; - uint32_t memoryTypeBits = {}; - }; - - template <> - struct CppType - { - using Type = MemoryFdPropertiesKHR; - }; - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - struct MemoryGetAndroidHardwareBufferInfoANDROID - { - using NativeType = VkMemoryGetAndroidHardwareBufferInfoANDROID; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetAndroidHardwareBufferInfoANDROID( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryGetAndroidHardwareBufferInfoANDROID( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryGetAndroidHardwareBufferInfoANDROID & operator=( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetAndroidHardwareBufferInfoANDROID & operator=( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryGetAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetAndroidHardwareBufferInfoANDROID & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryGetAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryGetAndroidHardwareBufferInfoANDROID &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryGetAndroidHardwareBufferInfoANDROID const & ) const = default; -# else - bool operator==( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ); -# endif - } - - bool operator!=( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - }; - - template <> - struct CppType - { - using Type = MemoryGetAndroidHardwareBufferInfoANDROID; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - - struct MemoryGetFdInfoKHR - { - using NativeType = VkMemoryGetFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( MemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetFdInfoKHR( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetFdInfoKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryGetFdInfoKHR & operator=( MemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetFdInfoKHR & operator=( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryGetFdInfoKHR const & ) const = default; -#else - bool operator==( MemoryGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( MemoryGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = MemoryGetFdInfoKHR; - }; - - struct MemoryGetRemoteAddressInfoNV - { - using NativeType = VkMemoryGetRemoteAddressInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetRemoteAddressInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryGetRemoteAddressInfoNV( - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryGetRemoteAddressInfoNV( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetRemoteAddressInfoNV( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryGetRemoteAddressInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryGetRemoteAddressInfoNV & operator=( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetRemoteAddressInfoNV & operator=( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryGetRemoteAddressInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryGetRemoteAddressInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryGetRemoteAddressInfoNV const & ) const = default; -#else - bool operator==( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetRemoteAddressInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = MemoryGetRemoteAddressInfoNV; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct MemoryGetWin32HandleInfoKHR - { - using NativeType = VkMemoryGetWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( MemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetWin32HandleInfoKHR( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryGetWin32HandleInfoKHR & operator=( MemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetWin32HandleInfoKHR & operator=( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, handleType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryGetWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( MemoryGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( MemoryGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = MemoryGetWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct MemoryGetZirconHandleInfoFUCHSIA - { - using NativeType = VkMemoryGetZirconHandleInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetZirconHandleInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryGetZirconHandleInfoFUCHSIA( - VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memory( memory_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryGetZirconHandleInfoFUCHSIA( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetZirconHandleInfoFUCHSIA( VkMemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryGetZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryGetZirconHandleInfoFUCHSIA & operator=( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryGetZirconHandleInfoFUCHSIA & operator=( VkMemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT - { - memory = memory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryGetZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memory, handleType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryGetZirconHandleInfoFUCHSIA const & ) const = default; -# else - bool operator==( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetZirconHandleInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = MemoryGetZirconHandleInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct MemoryHeap - { - using NativeType = VkMemoryHeap; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryHeap( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT - : size( size_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryHeap( MemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryHeap( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryHeap( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryHeap & operator=( MemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryHeap & operator=( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryHeap const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryHeap &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( size, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryHeap const & ) const = default; -#else - bool operator==( MemoryHeap const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( size == rhs.size ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( MemoryHeap const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags = {}; - }; - - struct MemoryHostPointerPropertiesEXT - { - using NativeType = VkMemoryHostPointerPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryHostPointerPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryHostPointerPropertiesEXT( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryHostPointerPropertiesEXT( MemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryHostPointerPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryHostPointerPropertiesEXT & operator=( MemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryHostPointerPropertiesEXT & operator=( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryHostPointerPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryHostPointerPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryTypeBits ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryHostPointerPropertiesEXT const & ) const = default; -#else - bool operator==( MemoryHostPointerPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( MemoryHostPointerPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT; - void * pNext = {}; - uint32_t memoryTypeBits = {}; - }; - - template <> - struct CppType - { - using Type = MemoryHostPointerPropertiesEXT; - }; - - struct MemoryOpaqueCaptureAddressAllocateInfo - { - using NativeType = VkMemoryOpaqueCaptureAddressAllocateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryOpaqueCaptureAddressAllocateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryOpaqueCaptureAddressAllocateInfo( uint64_t opaqueCaptureAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , opaqueCaptureAddress( opaqueCaptureAddress_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryOpaqueCaptureAddressAllocateInfo( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryOpaqueCaptureAddressAllocateInfo( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryOpaqueCaptureAddressAllocateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryOpaqueCaptureAddressAllocateInfo & operator=( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryOpaqueCaptureAddressAllocateInfo & operator=( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryOpaqueCaptureAddressAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryOpaqueCaptureAddressAllocateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT - { - opaqueCaptureAddress = opaqueCaptureAddress_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryOpaqueCaptureAddressAllocateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryOpaqueCaptureAddressAllocateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, opaqueCaptureAddress ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryOpaqueCaptureAddressAllocateInfo const & ) const = default; -#else - bool operator==( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress ); -# endif - } - - bool operator!=( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryOpaqueCaptureAddressAllocateInfo; - const void * pNext = {}; - uint64_t opaqueCaptureAddress = {}; - }; - - template <> - struct CppType - { - using Type = MemoryOpaqueCaptureAddressAllocateInfo; - }; - using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; - - struct MemoryPriorityAllocateInfoEXT - { - using NativeType = VkMemoryPriorityAllocateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryPriorityAllocateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( float priority_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , priority( priority_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( MemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryPriorityAllocateInfoEXT( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryPriorityAllocateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryPriorityAllocateInfoEXT & operator=( MemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryPriorityAllocateInfoEXT & operator=( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MemoryPriorityAllocateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MemoryPriorityAllocateInfoEXT & setPriority( float priority_ ) VULKAN_HPP_NOEXCEPT - { - priority = priority_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMemoryPriorityAllocateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryPriorityAllocateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, priority ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryPriorityAllocateInfoEXT const & ) const = default; -#else - bool operator==( MemoryPriorityAllocateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( priority == rhs.priority ); -# endif - } - - bool operator!=( MemoryPriorityAllocateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryPriorityAllocateInfoEXT; - const void * pNext = {}; - float priority = {}; - }; - - template <> - struct CppType - { - using Type = MemoryPriorityAllocateInfoEXT; - }; - - struct MemoryRequirements - { - using NativeType = VkMemoryRequirements; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryRequirements( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize alignment_ = {}, - uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT - : size( size_ ) - , alignment( alignment_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryRequirements( MemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryRequirements( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryRequirements( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryRequirements & operator=( MemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryRequirements & operator=( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryRequirements &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( size, alignment, memoryTypeBits ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryRequirements const & ) const = default; -#else - bool operator==( MemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( size == rhs.size ) && ( alignment == rhs.alignment ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( MemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - VULKAN_HPP_NAMESPACE::DeviceSize alignment = {}; - uint32_t memoryTypeBits = {}; - }; - - struct MemoryRequirements2 - { - using NativeType = VkMemoryRequirements2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryRequirements2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryRequirements2( VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryRequirements( memoryRequirements_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryRequirements2( MemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryRequirements2( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryRequirements2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryRequirements2 & operator=( MemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryRequirements2 & operator=( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryRequirements2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryRequirements2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryRequirements ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryRequirements2 const & ) const = default; -#else - bool operator==( MemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryRequirements == rhs.memoryRequirements ); -# endif - } - - bool operator!=( MemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryRequirements2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements = {}; - }; - - template <> - struct CppType - { - using Type = MemoryRequirements2; - }; - using MemoryRequirements2KHR = MemoryRequirements2; - - struct MemoryType - { - using NativeType = VkMemoryType; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryType( VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags_ = {}, uint32_t heapIndex_ = {} ) VULKAN_HPP_NOEXCEPT - : propertyFlags( propertyFlags_ ) - , heapIndex( heapIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryType( MemoryType const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryType( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryType( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryType & operator=( MemoryType const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryType & operator=( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryType const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryType &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( propertyFlags, heapIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryType const & ) const = default; -#else - bool operator==( MemoryType const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( propertyFlags == rhs.propertyFlags ) && ( heapIndex == rhs.heapIndex ); -# endif - } - - bool operator!=( MemoryType const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags = {}; - uint32_t heapIndex = {}; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct MemoryWin32HandlePropertiesKHR - { - using NativeType = VkMemoryWin32HandlePropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryWin32HandlePropertiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryWin32HandlePropertiesKHR( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryWin32HandlePropertiesKHR( MemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryWin32HandlePropertiesKHR( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryWin32HandlePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryWin32HandlePropertiesKHR & operator=( MemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryWin32HandlePropertiesKHR & operator=( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryWin32HandlePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryWin32HandlePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryTypeBits ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryWin32HandlePropertiesKHR const & ) const = default; -# else - bool operator==( MemoryWin32HandlePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( MemoryWin32HandlePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR; - void * pNext = {}; - uint32_t memoryTypeBits = {}; - }; - - template <> - struct CppType - { - using Type = MemoryWin32HandlePropertiesKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct MemoryZirconHandlePropertiesFUCHSIA - { - using NativeType = VkMemoryZirconHandlePropertiesFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryZirconHandlePropertiesFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MemoryZirconHandlePropertiesFUCHSIA( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryTypeBits( memoryTypeBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR MemoryZirconHandlePropertiesFUCHSIA( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryZirconHandlePropertiesFUCHSIA( VkMemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : MemoryZirconHandlePropertiesFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MemoryZirconHandlePropertiesFUCHSIA & operator=( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MemoryZirconHandlePropertiesFUCHSIA & operator=( VkMemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMemoryZirconHandlePropertiesFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMemoryZirconHandlePropertiesFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryTypeBits ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MemoryZirconHandlePropertiesFUCHSIA const & ) const = default; -# else - bool operator==( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); -# endif - } - - bool operator!=( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryZirconHandlePropertiesFUCHSIA; - void * pNext = {}; - uint32_t memoryTypeBits = {}; - }; - - template <> - struct CppType - { - using Type = MemoryZirconHandlePropertiesFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - struct MetalSurfaceCreateInfoEXT - { - using NativeType = VkMetalSurfaceCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMetalSurfaceCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ = {}, - const CAMetalLayer * pLayer_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pLayer( pLayer_ ) - { - } - - VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( MetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MetalSurfaceCreateInfoEXT( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MetalSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MetalSurfaceCreateInfoEXT & operator=( MetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MetalSurfaceCreateInfoEXT & operator=( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setPLayer( const CAMetalLayer * pLayer_ ) VULKAN_HPP_NOEXCEPT - { - pLayer = pLayer_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMetalSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMetalSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, pLayer ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MetalSurfaceCreateInfoEXT const & ) const = default; -# else - bool operator==( MetalSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pLayer == rhs.pLayer ); -# endif - } - - bool operator!=( MetalSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMetalSurfaceCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags = {}; - const CAMetalLayer * pLayer = {}; - }; - - template <> - struct CppType - { - using Type = MetalSurfaceCreateInfoEXT; - }; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - struct MultiDrawIndexedInfoEXT - { - using NativeType = VkMultiDrawIndexedInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MultiDrawIndexedInfoEXT( uint32_t firstIndex_ = {}, uint32_t indexCount_ = {}, int32_t vertexOffset_ = {} ) VULKAN_HPP_NOEXCEPT - : firstIndex( firstIndex_ ) - , indexCount( indexCount_ ) - , vertexOffset( vertexOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR MultiDrawIndexedInfoEXT( MultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiDrawIndexedInfoEXT( VkMultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MultiDrawIndexedInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MultiDrawIndexedInfoEXT & operator=( MultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiDrawIndexedInfoEXT & operator=( VkMultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setFirstIndex( uint32_t firstIndex_ ) VULKAN_HPP_NOEXCEPT - { - firstIndex = firstIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT - { - indexCount = indexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setVertexOffset( int32_t vertexOffset_ ) VULKAN_HPP_NOEXCEPT - { - vertexOffset = vertexOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMultiDrawIndexedInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMultiDrawIndexedInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( firstIndex, indexCount, vertexOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MultiDrawIndexedInfoEXT const & ) const = default; -#else - bool operator==( MultiDrawIndexedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( firstIndex == rhs.firstIndex ) && ( indexCount == rhs.indexCount ) && ( vertexOffset == rhs.vertexOffset ); -# endif - } - - bool operator!=( MultiDrawIndexedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t firstIndex = {}; - uint32_t indexCount = {}; - int32_t vertexOffset = {}; - }; - - struct MultiDrawInfoEXT - { - using NativeType = VkMultiDrawInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MultiDrawInfoEXT( uint32_t firstVertex_ = {}, uint32_t vertexCount_ = {} ) VULKAN_HPP_NOEXCEPT - : firstVertex( firstVertex_ ) - , vertexCount( vertexCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR MultiDrawInfoEXT( MultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiDrawInfoEXT( VkMultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MultiDrawInfoEXT( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MultiDrawInfoEXT & operator=( MultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiDrawInfoEXT & operator=( VkMultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MultiDrawInfoEXT & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT - { - firstVertex = firstVertex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultiDrawInfoEXT & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexCount = vertexCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMultiDrawInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMultiDrawInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( firstVertex, vertexCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MultiDrawInfoEXT const & ) const = default; -#else - bool operator==( MultiDrawInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( firstVertex == rhs.firstVertex ) && ( vertexCount == rhs.vertexCount ); -# endif - } - - bool operator!=( MultiDrawInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t firstVertex = {}; - uint32_t vertexCount = {}; - }; - - struct MultisamplePropertiesEXT - { - using NativeType = VkMultisamplePropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultisamplePropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxSampleLocationGridSize( maxSampleLocationGridSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR MultisamplePropertiesEXT( MultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultisamplePropertiesEXT( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MultisamplePropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MultisamplePropertiesEXT & operator=( MultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultisamplePropertiesEXT & operator=( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkMultisamplePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMultisamplePropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxSampleLocationGridSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MultisamplePropertiesEXT const & ) const = default; -#else - bool operator==( MultisamplePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ); -# endif - } - - bool operator!=( MultisamplePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultisamplePropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {}; - }; - - template <> - struct CppType - { - using Type = MultisamplePropertiesEXT; - }; - - struct MultisampledRenderToSingleSampledInfoEXT - { - using NativeType = VkMultisampledRenderToSingleSampledInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultisampledRenderToSingleSampledInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - MultisampledRenderToSingleSampledInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , multisampledRenderToSingleSampledEnable( multisampledRenderToSingleSampledEnable_ ) - , rasterizationSamples( rasterizationSamples_ ) - { - } - - VULKAN_HPP_CONSTEXPR MultisampledRenderToSingleSampledInfoEXT( MultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultisampledRenderToSingleSampledInfoEXT( VkMultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : MultisampledRenderToSingleSampledInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MultisampledRenderToSingleSampledInfoEXT & operator=( MultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultisampledRenderToSingleSampledInfoEXT & operator=( VkMultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & - setMultisampledRenderToSingleSampledEnable( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable_ ) VULKAN_HPP_NOEXCEPT - { - multisampledRenderToSingleSampledEnable = multisampledRenderToSingleSampledEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & - setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationSamples = rasterizationSamples_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMultisampledRenderToSingleSampledInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMultisampledRenderToSingleSampledInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, multisampledRenderToSingleSampledEnable, rasterizationSamples ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MultisampledRenderToSingleSampledInfoEXT const & ) const = default; -#else - bool operator==( MultisampledRenderToSingleSampledInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multisampledRenderToSingleSampledEnable == rhs.multisampledRenderToSingleSampledEnable ) && - ( rasterizationSamples == rhs.rasterizationSamples ); -# endif - } - - bool operator!=( MultisampledRenderToSingleSampledInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultisampledRenderToSingleSampledInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - }; - - template <> - struct CppType - { - using Type = MultisampledRenderToSingleSampledInfoEXT; - }; - - struct MultiviewPerViewAttributesInfoNVX - { - using NativeType = VkMultiviewPerViewAttributesInfoNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultiviewPerViewAttributesInfoNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MultiviewPerViewAttributesInfoNVX( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , perViewAttributes( perViewAttributes_ ) - , perViewAttributesPositionXOnly( perViewAttributesPositionXOnly_ ) - { - } - - VULKAN_HPP_CONSTEXPR MultiviewPerViewAttributesInfoNVX( MultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiviewPerViewAttributesInfoNVX( VkMultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : MultiviewPerViewAttributesInfoNVX( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MultiviewPerViewAttributesInfoNVX & operator=( MultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MultiviewPerViewAttributesInfoNVX & operator=( VkMultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & setPerViewAttributes( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes_ ) VULKAN_HPP_NOEXCEPT - { - perViewAttributes = perViewAttributes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & - setPerViewAttributesPositionXOnly( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly_ ) VULKAN_HPP_NOEXCEPT - { - perViewAttributesPositionXOnly = perViewAttributesPositionXOnly_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMultiviewPerViewAttributesInfoNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMultiviewPerViewAttributesInfoNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, perViewAttributes, perViewAttributesPositionXOnly ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MultiviewPerViewAttributesInfoNVX const & ) const = default; -#else - bool operator==( MultiviewPerViewAttributesInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perViewAttributes == rhs.perViewAttributes ) && - ( perViewAttributesPositionXOnly == rhs.perViewAttributesPositionXOnly ); -# endif - } - - bool operator!=( MultiviewPerViewAttributesInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultiviewPerViewAttributesInfoNVX; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes = {}; - VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly = {}; - }; - - template <> - struct CppType - { - using Type = MultiviewPerViewAttributesInfoNVX; - }; - - struct MutableDescriptorTypeListVALVE - { - using NativeType = VkMutableDescriptorTypeListVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MutableDescriptorTypeListVALVE( uint32_t descriptorTypeCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes_ = {} ) VULKAN_HPP_NOEXCEPT - : descriptorTypeCount( descriptorTypeCount_ ) - , pDescriptorTypes( pDescriptorTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR MutableDescriptorTypeListVALVE( MutableDescriptorTypeListVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MutableDescriptorTypeListVALVE( VkMutableDescriptorTypeListVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : MutableDescriptorTypeListVALVE( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - MutableDescriptorTypeListVALVE( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorTypes_ ) - : descriptorTypeCount( static_cast( descriptorTypes_.size() ) ), pDescriptorTypes( descriptorTypes_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MutableDescriptorTypeListVALVE & operator=( MutableDescriptorTypeListVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MutableDescriptorTypeListVALVE & operator=( VkMutableDescriptorTypeListVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeListVALVE & setDescriptorTypeCount( uint32_t descriptorTypeCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorTypeCount = descriptorTypeCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeListVALVE & - setPDescriptorTypes( const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes_ ) VULKAN_HPP_NOEXCEPT - { - pDescriptorTypes = pDescriptorTypes_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - MutableDescriptorTypeListVALVE & setDescriptorTypes( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorTypes_ ) VULKAN_HPP_NOEXCEPT - { - descriptorTypeCount = static_cast( descriptorTypes_.size() ); - pDescriptorTypes = descriptorTypes_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMutableDescriptorTypeListVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMutableDescriptorTypeListVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( descriptorTypeCount, pDescriptorTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MutableDescriptorTypeListVALVE const & ) const = default; -#else - bool operator==( MutableDescriptorTypeListVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( descriptorTypeCount == rhs.descriptorTypeCount ) && ( pDescriptorTypes == rhs.pDescriptorTypes ); -# endif - } - - bool operator!=( MutableDescriptorTypeListVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t descriptorTypeCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes = {}; - }; - - struct MutableDescriptorTypeCreateInfoVALVE - { - using NativeType = VkMutableDescriptorTypeCreateInfoVALVE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMutableDescriptorTypeCreateInfoVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR MutableDescriptorTypeCreateInfoVALVE( uint32_t mutableDescriptorTypeListCount_ = {}, - const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE * pMutableDescriptorTypeLists_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mutableDescriptorTypeListCount( mutableDescriptorTypeListCount_ ) - , pMutableDescriptorTypeLists( pMutableDescriptorTypeLists_ ) - { - } - - VULKAN_HPP_CONSTEXPR MutableDescriptorTypeCreateInfoVALVE( MutableDescriptorTypeCreateInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MutableDescriptorTypeCreateInfoVALVE( VkMutableDescriptorTypeCreateInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : MutableDescriptorTypeCreateInfoVALVE( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - MutableDescriptorTypeCreateInfoVALVE( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mutableDescriptorTypeLists_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , mutableDescriptorTypeListCount( static_cast( mutableDescriptorTypeLists_.size() ) ) - , pMutableDescriptorTypeLists( mutableDescriptorTypeLists_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - MutableDescriptorTypeCreateInfoVALVE & operator=( MutableDescriptorTypeCreateInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - MutableDescriptorTypeCreateInfoVALVE & operator=( VkMutableDescriptorTypeCreateInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoVALVE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoVALVE & - setMutableDescriptorTypeListCount( uint32_t mutableDescriptorTypeListCount_ ) VULKAN_HPP_NOEXCEPT - { - mutableDescriptorTypeListCount = mutableDescriptorTypeListCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoVALVE & - setPMutableDescriptorTypeLists( const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE * pMutableDescriptorTypeLists_ ) VULKAN_HPP_NOEXCEPT - { - pMutableDescriptorTypeLists = pMutableDescriptorTypeLists_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - MutableDescriptorTypeCreateInfoVALVE & setMutableDescriptorTypeLists( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mutableDescriptorTypeLists_ ) - VULKAN_HPP_NOEXCEPT - { - mutableDescriptorTypeListCount = static_cast( mutableDescriptorTypeLists_.size() ); - pMutableDescriptorTypeLists = mutableDescriptorTypeLists_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkMutableDescriptorTypeCreateInfoVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkMutableDescriptorTypeCreateInfoVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mutableDescriptorTypeListCount, pMutableDescriptorTypeLists ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( MutableDescriptorTypeCreateInfoVALVE const & ) const = default; -#else - bool operator==( MutableDescriptorTypeCreateInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mutableDescriptorTypeListCount == rhs.mutableDescriptorTypeListCount ) && - ( pMutableDescriptorTypeLists == rhs.pMutableDescriptorTypeLists ); -# endif - } - - bool operator!=( MutableDescriptorTypeCreateInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMutableDescriptorTypeCreateInfoVALVE; - const void * pNext = {}; - uint32_t mutableDescriptorTypeListCount = {}; - const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE * pMutableDescriptorTypeLists = {}; - }; - - template <> - struct CppType - { - using Type = MutableDescriptorTypeCreateInfoVALVE; - }; - - struct PastPresentationTimingGOOGLE - { - using NativeType = VkPastPresentationTimingGOOGLE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PastPresentationTimingGOOGLE( uint32_t presentID_ = {}, - uint64_t desiredPresentTime_ = {}, - uint64_t actualPresentTime_ = {}, - uint64_t earliestPresentTime_ = {}, - uint64_t presentMargin_ = {} ) VULKAN_HPP_NOEXCEPT - : presentID( presentID_ ) - , desiredPresentTime( desiredPresentTime_ ) - , actualPresentTime( actualPresentTime_ ) - , earliestPresentTime( earliestPresentTime_ ) - , presentMargin( presentMargin_ ) - { - } - - VULKAN_HPP_CONSTEXPR PastPresentationTimingGOOGLE( PastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PastPresentationTimingGOOGLE( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - : PastPresentationTimingGOOGLE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PastPresentationTimingGOOGLE & operator=( PastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PastPresentationTimingGOOGLE & operator=( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPastPresentationTimingGOOGLE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPastPresentationTimingGOOGLE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( presentID, desiredPresentTime, actualPresentTime, earliestPresentTime, presentMargin ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PastPresentationTimingGOOGLE const & ) const = default; -#else - bool operator==( PastPresentationTimingGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( presentID == rhs.presentID ) && ( desiredPresentTime == rhs.desiredPresentTime ) && ( actualPresentTime == rhs.actualPresentTime ) && - ( earliestPresentTime == rhs.earliestPresentTime ) && ( presentMargin == rhs.presentMargin ); -# endif - } - - bool operator!=( PastPresentationTimingGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t presentID = {}; - uint64_t desiredPresentTime = {}; - uint64_t actualPresentTime = {}; - uint64_t earliestPresentTime = {}; - uint64_t presentMargin = {}; - }; - - struct PerformanceConfigurationAcquireInfoINTEL - { - using NativeType = VkPerformanceConfigurationAcquireInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceConfigurationAcquireInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PerformanceConfigurationAcquireInfoINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ = - VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - { - } - - VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( PerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceConfigurationAcquireInfoINTEL( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceConfigurationAcquireInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceConfigurationAcquireInfoINTEL & operator=( PerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceConfigurationAcquireInfoINTEL & operator=( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceConfigurationAcquireInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceConfigurationAcquireInfoINTEL & - setType( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceConfigurationAcquireInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceConfigurationAcquireInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceConfigurationAcquireInfoINTEL const & ) const = default; -#else - bool operator==( PerformanceConfigurationAcquireInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ); -# endif - } - - bool operator!=( PerformanceConfigurationAcquireInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceConfigurationAcquireInfoINTEL; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type = - VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated; - }; - - template <> - struct CppType - { - using Type = PerformanceConfigurationAcquireInfoINTEL; - }; - - struct PerformanceCounterDescriptionKHR - { - using NativeType = VkPerformanceCounterDescriptionKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceCounterDescriptionKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterDescriptionKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags_ = {}, - std::array const & name_ = {}, - std::array const & category_ = {}, - std::array const & description_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , name( name_ ) - , category( category_ ) - , description( description_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterDescriptionKHR( PerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceCounterDescriptionKHR( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceCounterDescriptionKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceCounterDescriptionKHR & operator=( PerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceCounterDescriptionKHR & operator=( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPerformanceCounterDescriptionKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceCounterDescriptionKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, name, category, description ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceCounterDescriptionKHR const & ) const = default; -#else - bool operator==( PerformanceCounterDescriptionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( name == rhs.name ) && ( category == rhs.category ) && - ( description == rhs.description ); -# endif - } - - bool operator!=( PerformanceCounterDescriptionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterDescriptionKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D category = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceCounterDescriptionKHR; - }; - - struct PerformanceCounterKHR - { - using NativeType = VkPerformanceCounterKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceCounterKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PerformanceCounterKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR unit_ = VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR::eGeneric, - VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR scope_ = VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR::eCommandBuffer, - VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR storage_ = VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR::eInt32, - std::array const & uuid_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , unit( unit_ ) - , scope( scope_ ) - , storage( storage_ ) - , uuid( uuid_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterKHR( PerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceCounterKHR( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceCounterKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceCounterKHR & operator=( PerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceCounterKHR & operator=( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPerformanceCounterKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceCounterKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, unit, scope, storage, uuid ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceCounterKHR const & ) const = default; -#else - bool operator==( PerformanceCounterKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( unit == rhs.unit ) && ( scope == rhs.scope ) && ( storage == rhs.storage ) && - ( uuid == rhs.uuid ); -# endif - } - - bool operator!=( PerformanceCounterKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR unit = VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR::eGeneric; - VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR scope = VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR::eCommandBuffer; - VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR storage = VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR::eInt32; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D uuid = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceCounterKHR; - }; - - union PerformanceCounterResultKHR - { - using NativeType = VkPerformanceCounterResultKHR; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( int32_t int32_ = {} ) : int32( int32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( int64_t int64_ ) : int64( int64_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( uint32_t uint32_ ) : uint32( uint32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( uint64_t uint64_ ) : uint64( uint64_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( float float32_ ) : float32( float32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( double float64_ ) : float64( float64_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setInt32( int32_t int32_ ) VULKAN_HPP_NOEXCEPT - { - int32 = int32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setInt64( int64_t int64_ ) VULKAN_HPP_NOEXCEPT - { - int64 = int64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setUint32( uint32_t uint32_ ) VULKAN_HPP_NOEXCEPT - { - uint32 = uint32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setUint64( uint64_t uint64_ ) VULKAN_HPP_NOEXCEPT - { - uint64 = uint64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setFloat32( float float32_ ) VULKAN_HPP_NOEXCEPT - { - float32 = float32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setFloat64( double float64_ ) VULKAN_HPP_NOEXCEPT - { - float64 = float64_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkPerformanceCounterResultKHR const &() const - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceCounterResultKHR &() - { - return *reinterpret_cast( this ); - } - - int32_t int32; - int64_t int64; - uint32_t uint32; - uint64_t uint64; - float float32; - double float64; - }; - - struct PerformanceMarkerInfoINTEL - { - using NativeType = VkPerformanceMarkerInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceMarkerInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( uint64_t marker_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , marker( marker_ ) - { - } - - VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( PerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceMarkerInfoINTEL( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceMarkerInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceMarkerInfoINTEL & operator=( PerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceMarkerInfoINTEL & operator=( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceMarkerInfoINTEL & setMarker( uint64_t marker_ ) VULKAN_HPP_NOEXCEPT - { - marker = marker_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceMarkerInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, marker ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceMarkerInfoINTEL const & ) const = default; -#else - bool operator==( PerformanceMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( marker == rhs.marker ); -# endif - } - - bool operator!=( PerformanceMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceMarkerInfoINTEL; - const void * pNext = {}; - uint64_t marker = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceMarkerInfoINTEL; - }; - - struct PerformanceOverrideInfoINTEL - { - using NativeType = VkPerformanceOverrideInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceOverrideInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( - VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL::eNullHardware, - VULKAN_HPP_NAMESPACE::Bool32 enable_ = {}, - uint64_t parameter_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , enable( enable_ ) - , parameter( parameter_ ) - { - } - - VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( PerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceOverrideInfoINTEL( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceOverrideInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceOverrideInfoINTEL & operator=( PerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceOverrideInfoINTEL & operator=( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setEnable( VULKAN_HPP_NAMESPACE::Bool32 enable_ ) VULKAN_HPP_NOEXCEPT - { - enable = enable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setParameter( uint64_t parameter_ ) VULKAN_HPP_NOEXCEPT - { - parameter = parameter_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceOverrideInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceOverrideInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type, enable, parameter ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceOverrideInfoINTEL const & ) const = default; -#else - bool operator==( PerformanceOverrideInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( enable == rhs.enable ) && ( parameter == rhs.parameter ); -# endif - } - - bool operator!=( PerformanceOverrideInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceOverrideInfoINTEL; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL::eNullHardware; - VULKAN_HPP_NAMESPACE::Bool32 enable = {}; - uint64_t parameter = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceOverrideInfoINTEL; - }; - - struct PerformanceQuerySubmitInfoKHR - { - using NativeType = VkPerformanceQuerySubmitInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceQuerySubmitInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PerformanceQuerySubmitInfoKHR( uint32_t counterPassIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , counterPassIndex( counterPassIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR PerformanceQuerySubmitInfoKHR( PerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceQuerySubmitInfoKHR( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceQuerySubmitInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceQuerySubmitInfoKHR & operator=( PerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceQuerySubmitInfoKHR & operator=( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceQuerySubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceQuerySubmitInfoKHR & setCounterPassIndex( uint32_t counterPassIndex_ ) VULKAN_HPP_NOEXCEPT - { - counterPassIndex = counterPassIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceQuerySubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceQuerySubmitInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, counterPassIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceQuerySubmitInfoKHR const & ) const = default; -#else - bool operator==( PerformanceQuerySubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( counterPassIndex == rhs.counterPassIndex ); -# endif - } - - bool operator!=( PerformanceQuerySubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceQuerySubmitInfoKHR; - const void * pNext = {}; - uint32_t counterPassIndex = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceQuerySubmitInfoKHR; - }; - - struct PerformanceStreamMarkerInfoINTEL - { - using NativeType = VkPerformanceStreamMarkerInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceStreamMarkerInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( uint32_t marker_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , marker( marker_ ) - { - } - - VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( PerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceStreamMarkerInfoINTEL( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceStreamMarkerInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceStreamMarkerInfoINTEL & operator=( PerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceStreamMarkerInfoINTEL & operator=( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceStreamMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceStreamMarkerInfoINTEL & setMarker( uint32_t marker_ ) VULKAN_HPP_NOEXCEPT - { - marker = marker_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceStreamMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceStreamMarkerInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, marker ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PerformanceStreamMarkerInfoINTEL const & ) const = default; -#else - bool operator==( PerformanceStreamMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( marker == rhs.marker ); -# endif - } - - bool operator!=( PerformanceStreamMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceStreamMarkerInfoINTEL; - const void * pNext = {}; - uint32_t marker = {}; - }; - - template <> - struct CppType - { - using Type = PerformanceStreamMarkerInfoINTEL; - }; - - union PerformanceValueDataINTEL - { - using NativeType = VkPerformanceValueDataINTEL; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( uint32_t value32_ = {} ) : value32( value32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( uint64_t value64_ ) : value64( value64_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( float valueFloat_ ) : valueFloat( valueFloat_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( const char * valueString_ ) : valueString( valueString_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValue32( uint32_t value32_ ) VULKAN_HPP_NOEXCEPT - { - value32 = value32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValue64( uint64_t value64_ ) VULKAN_HPP_NOEXCEPT - { - value64 = value64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueFloat( float valueFloat_ ) VULKAN_HPP_NOEXCEPT - { - valueFloat = valueFloat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueBool( VULKAN_HPP_NAMESPACE::Bool32 valueBool_ ) VULKAN_HPP_NOEXCEPT - { - valueBool = valueBool_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueString( const char * valueString_ ) VULKAN_HPP_NOEXCEPT - { - valueString = valueString_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkPerformanceValueDataINTEL const &() const - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceValueDataINTEL &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - uint32_t value32; - uint64_t value64; - float valueFloat; - VULKAN_HPP_NAMESPACE::Bool32 valueBool; - const char * valueString; -#else - uint32_t value32; - uint64_t value64; - float valueFloat; - VkBool32 valueBool; - const char * valueString; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct PerformanceValueINTEL - { - using NativeType = VkPerformanceValueINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PerformanceValueINTEL( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32, - VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data_ = {} ) VULKAN_HPP_NOEXCEPT - : type( type_ ) - , data( data_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueINTEL( PerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceValueINTEL( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PerformanceValueINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PerformanceValueINTEL & operator=( PerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PerformanceValueINTEL & operator=( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PerformanceValueINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PerformanceValueINTEL & setData( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL const & data_ ) VULKAN_HPP_NOEXCEPT - { - data = data_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPerformanceValueINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPerformanceValueINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( type, data ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32; - VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data = {}; - }; - - struct PhysicalDevice16BitStorageFeatures - { - using NativeType = VkPhysicalDevice16BitStorageFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice16BitStorageFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , storageBuffer16BitAccess( storageBuffer16BitAccess_ ) - , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ ) - , storagePushConstant16( storagePushConstant16_ ) - , storageInputOutput16( storageInputOutput16_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( PhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice16BitStorageFeatures( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevice16BitStorageFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevice16BitStorageFeatures & operator=( PhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice16BitStorageFeatures & operator=( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & - setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - storageBuffer16BitAccess = storageBuffer16BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & - setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & - setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT - { - storagePushConstant16 = storagePushConstant16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & - setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT - { - storageInputOutput16 = storageInputOutput16_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevice16BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevice16BitStorageFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, storageBuffer16BitAccess, uniformAndStorageBuffer16BitAccess, storagePushConstant16, storageInputOutput16 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice16BitStorageFeatures const & ) const = default; -#else - bool operator==( PhysicalDevice16BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer16BitAccess == rhs.storageBuffer16BitAccess ) && - ( uniformAndStorageBuffer16BitAccess == rhs.uniformAndStorageBuffer16BitAccess ) && ( storagePushConstant16 == rhs.storagePushConstant16 ) && - ( storageInputOutput16 == rhs.storageInputOutput16 ); -# endif - } - - bool operator!=( PhysicalDevice16BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice16BitStorageFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevice16BitStorageFeatures; - }; - using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; - - struct PhysicalDevice4444FormatsFeaturesEXT - { - using NativeType = VkPhysicalDevice4444FormatsFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice4444FormatsFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevice4444FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , formatA4R4G4B4( formatA4R4G4B4_ ) - , formatA4B4G4R4( formatA4B4G4R4_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevice4444FormatsFeaturesEXT( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice4444FormatsFeaturesEXT( VkPhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevice4444FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevice4444FormatsFeaturesEXT & operator=( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice4444FormatsFeaturesEXT & operator=( VkPhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setFormatA4R4G4B4( VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4_ ) VULKAN_HPP_NOEXCEPT - { - formatA4R4G4B4 = formatA4R4G4B4_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setFormatA4B4G4R4( VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4_ ) VULKAN_HPP_NOEXCEPT - { - formatA4B4G4R4 = formatA4B4G4R4_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevice4444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevice4444FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, formatA4R4G4B4, formatA4B4G4R4 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice4444FormatsFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatA4R4G4B4 == rhs.formatA4R4G4B4 ) && ( formatA4B4G4R4 == rhs.formatA4B4G4R4 ); -# endif - } - - bool operator!=( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice4444FormatsFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4 = {}; - VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevice4444FormatsFeaturesEXT; - }; - - struct PhysicalDevice8BitStorageFeatures - { - using NativeType = VkPhysicalDevice8BitStorageFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice8BitStorageFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , storageBuffer8BitAccess( storageBuffer8BitAccess_ ) - , uniformAndStorageBuffer8BitAccess( uniformAndStorageBuffer8BitAccess_ ) - , storagePushConstant8( storagePushConstant8_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeatures( PhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice8BitStorageFeatures( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevice8BitStorageFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevice8BitStorageFeatures & operator=( PhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevice8BitStorageFeatures & operator=( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & - setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - storageBuffer8BitAccess = storageBuffer8BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & - setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & - setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT - { - storagePushConstant8 = storagePushConstant8_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevice8BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevice8BitStorageFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, storageBuffer8BitAccess, uniformAndStorageBuffer8BitAccess, storagePushConstant8 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevice8BitStorageFeatures const & ) const = default; -#else - bool operator==( PhysicalDevice8BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer8BitAccess == rhs.storageBuffer8BitAccess ) && - ( uniformAndStorageBuffer8BitAccess == rhs.uniformAndStorageBuffer8BitAccess ) && ( storagePushConstant8 == rhs.storagePushConstant8 ); -# endif - } - - bool operator!=( PhysicalDevice8BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice8BitStorageFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevice8BitStorageFeatures; - }; - using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; - - struct PhysicalDeviceASTCDecodeFeaturesEXT - { - using NativeType = VkPhysicalDeviceASTCDecodeFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , decodeModeSharedExponent( decodeModeSharedExponent_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceASTCDecodeFeaturesEXT( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceASTCDecodeFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceASTCDecodeFeaturesEXT & operator=( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceASTCDecodeFeaturesEXT & operator=( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceASTCDecodeFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceASTCDecodeFeaturesEXT & - setDecodeModeSharedExponent( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ ) VULKAN_HPP_NOEXCEPT - { - decodeModeSharedExponent = decodeModeSharedExponent_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceASTCDecodeFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceASTCDecodeFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, decodeModeSharedExponent ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceASTCDecodeFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( decodeModeSharedExponent == rhs.decodeModeSharedExponent ); -# endif - } - - bool operator!=( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceASTCDecodeFeaturesEXT; - }; - - struct PhysicalDeviceAccelerationStructureFeaturesKHR - { - using NativeType = VkPhysicalDeviceAccelerationStructureFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceAccelerationStructureFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructure( accelerationStructure_ ) - , accelerationStructureCaptureReplay( accelerationStructureCaptureReplay_ ) - , accelerationStructureIndirectBuild( accelerationStructureIndirectBuild_ ) - , accelerationStructureHostCommands( accelerationStructureHostCommands_ ) - , descriptorBindingAccelerationStructureUpdateAfterBind( descriptorBindingAccelerationStructureUpdateAfterBind_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceAccelerationStructureFeaturesKHR( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAccelerationStructureFeaturesKHR( VkPhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceAccelerationStructureFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceAccelerationStructureFeaturesKHR & operator=( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAccelerationStructureFeaturesKHR & operator=( VkPhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & - setAccelerationStructure( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructure = accelerationStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & - setAccelerationStructureCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureCaptureReplay = accelerationStructureCaptureReplay_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & - setAccelerationStructureIndirectBuild( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureIndirectBuild = accelerationStructureIndirectBuild_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & - setAccelerationStructureHostCommands( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureHostCommands = accelerationStructureHostCommands_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setDescriptorBindingAccelerationStructureUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingAccelerationStructureUpdateAfterBind = descriptorBindingAccelerationStructureUpdateAfterBind_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceAccelerationStructureFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceAccelerationStructureFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - accelerationStructure, - accelerationStructureCaptureReplay, - accelerationStructureIndirectBuild, - accelerationStructureHostCommands, - descriptorBindingAccelerationStructureUpdateAfterBind ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceAccelerationStructureFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ) && - ( accelerationStructureCaptureReplay == rhs.accelerationStructureCaptureReplay ) && - ( accelerationStructureIndirectBuild == rhs.accelerationStructureIndirectBuild ) && - ( accelerationStructureHostCommands == rhs.accelerationStructureHostCommands ) && - ( descriptorBindingAccelerationStructureUpdateAfterBind == rhs.descriptorBindingAccelerationStructureUpdateAfterBind ); -# endif - } - - bool operator!=( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure = {}; - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay = {}; - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild = {}; - VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceAccelerationStructureFeaturesKHR; - }; - - struct PhysicalDeviceAccelerationStructurePropertiesKHR - { - using NativeType = VkPhysicalDeviceAccelerationStructurePropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceAccelerationStructurePropertiesKHR( uint64_t maxGeometryCount_ = {}, - uint64_t maxInstanceCount_ = {}, - uint64_t maxPrimitiveCount_ = {}, - uint32_t maxPerStageDescriptorAccelerationStructures_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures_ = {}, - uint32_t maxDescriptorSetAccelerationStructures_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures_ = {}, - uint32_t minAccelerationStructureScratchOffsetAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxGeometryCount( maxGeometryCount_ ) - , maxInstanceCount( maxInstanceCount_ ) - , maxPrimitiveCount( maxPrimitiveCount_ ) - , maxPerStageDescriptorAccelerationStructures( maxPerStageDescriptorAccelerationStructures_ ) - , maxPerStageDescriptorUpdateAfterBindAccelerationStructures( maxPerStageDescriptorUpdateAfterBindAccelerationStructures_ ) - , maxDescriptorSetAccelerationStructures( maxDescriptorSetAccelerationStructures_ ) - , maxDescriptorSetUpdateAfterBindAccelerationStructures( maxDescriptorSetUpdateAfterBindAccelerationStructures_ ) - , minAccelerationStructureScratchOffsetAlignment( minAccelerationStructureScratchOffsetAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceAccelerationStructurePropertiesKHR( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAccelerationStructurePropertiesKHR( VkPhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceAccelerationStructurePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceAccelerationStructurePropertiesKHR & operator=( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAccelerationStructurePropertiesKHR & operator=( VkPhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceAccelerationStructurePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceAccelerationStructurePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxGeometryCount, - maxInstanceCount, - maxPrimitiveCount, - maxPerStageDescriptorAccelerationStructures, - maxPerStageDescriptorUpdateAfterBindAccelerationStructures, - maxDescriptorSetAccelerationStructures, - maxDescriptorSetUpdateAfterBindAccelerationStructures, - minAccelerationStructureScratchOffsetAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceAccelerationStructurePropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxGeometryCount == rhs.maxGeometryCount ) && ( maxInstanceCount == rhs.maxInstanceCount ) && - ( maxPrimitiveCount == rhs.maxPrimitiveCount ) && - ( maxPerStageDescriptorAccelerationStructures == rhs.maxPerStageDescriptorAccelerationStructures ) && - ( maxPerStageDescriptorUpdateAfterBindAccelerationStructures == rhs.maxPerStageDescriptorUpdateAfterBindAccelerationStructures ) && - ( maxDescriptorSetAccelerationStructures == rhs.maxDescriptorSetAccelerationStructures ) && - ( maxDescriptorSetUpdateAfterBindAccelerationStructures == rhs.maxDescriptorSetUpdateAfterBindAccelerationStructures ) && - ( minAccelerationStructureScratchOffsetAlignment == rhs.minAccelerationStructureScratchOffsetAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR; - void * pNext = {}; - uint64_t maxGeometryCount = {}; - uint64_t maxInstanceCount = {}; - uint64_t maxPrimitiveCount = {}; - uint32_t maxPerStageDescriptorAccelerationStructures = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures = {}; - uint32_t maxDescriptorSetAccelerationStructures = {}; - uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures = {}; - uint32_t minAccelerationStructureScratchOffsetAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceAccelerationStructurePropertiesKHR; - }; - - struct PhysicalDeviceAmigoProfilingFeaturesSEC - { - using NativeType = VkPhysicalDeviceAmigoProfilingFeaturesSEC; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceAmigoProfilingFeaturesSEC( VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , amigoProfiling( amigoProfiling_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceAmigoProfilingFeaturesSEC( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAmigoProfilingFeaturesSEC( VkPhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceAmigoProfilingFeaturesSEC( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceAmigoProfilingFeaturesSEC & operator=( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAmigoProfilingFeaturesSEC & operator=( VkPhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAmigoProfilingFeaturesSEC & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAmigoProfilingFeaturesSEC & setAmigoProfiling( VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling_ ) VULKAN_HPP_NOEXCEPT - { - amigoProfiling = amigoProfiling_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceAmigoProfilingFeaturesSEC const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceAmigoProfilingFeaturesSEC &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, amigoProfiling ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceAmigoProfilingFeaturesSEC const & ) const = default; -#else - bool operator==( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( amigoProfiling == rhs.amigoProfiling ); -# endif - } - - bool operator!=( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceAmigoProfilingFeaturesSEC; - }; - - struct PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT - { - using NativeType = VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachmentFeedbackLoopLayout( attachmentFeedbackLoopLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & - operator=( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & operator=( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & - setAttachmentFeedbackLoopLayout( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout_ ) VULKAN_HPP_NOEXCEPT - { - attachmentFeedbackLoopLayout = attachmentFeedbackLoopLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, attachmentFeedbackLoopLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentFeedbackLoopLayout == rhs.attachmentFeedbackLoopLayout ); -# endif - } - - bool operator!=( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; - }; - - struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT - { - using NativeType = VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , advancedBlendCoherentOperations( advancedBlendCoherentOperations_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceBlendOperationAdvancedFeaturesEXT( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceBlendOperationAdvancedFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceBlendOperationAdvancedFeaturesEXT & operator=( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBlendOperationAdvancedFeaturesEXT & operator=( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBlendOperationAdvancedFeaturesEXT & - setAdvancedBlendCoherentOperations( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ ) VULKAN_HPP_NOEXCEPT - { - advancedBlendCoherentOperations = advancedBlendCoherentOperations_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, advancedBlendCoherentOperations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( advancedBlendCoherentOperations == rhs.advancedBlendCoherentOperations ); -# endif - } - - bool operator!=( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceBlendOperationAdvancedFeaturesEXT; - }; - - struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT - { - using NativeType = VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedPropertiesEXT( uint32_t advancedBlendMaxColorAttachments_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendIndependentBlend_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedSrcColor_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedDstColor_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCorrelatedOverlap_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendAllOperations_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , advancedBlendMaxColorAttachments( advancedBlendMaxColorAttachments_ ) - , advancedBlendIndependentBlend( advancedBlendIndependentBlend_ ) - , advancedBlendNonPremultipliedSrcColor( advancedBlendNonPremultipliedSrcColor_ ) - , advancedBlendNonPremultipliedDstColor( advancedBlendNonPremultipliedDstColor_ ) - , advancedBlendCorrelatedOverlap( advancedBlendCorrelatedOverlap_ ) - , advancedBlendAllOperations( advancedBlendAllOperations_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceBlendOperationAdvancedPropertiesEXT( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBlendOperationAdvancedPropertiesEXT( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceBlendOperationAdvancedPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceBlendOperationAdvancedPropertiesEXT & - operator=( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBlendOperationAdvancedPropertiesEXT & operator=( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - advancedBlendMaxColorAttachments, - advancedBlendIndependentBlend, - advancedBlendNonPremultipliedSrcColor, - advancedBlendNonPremultipliedDstColor, - advancedBlendCorrelatedOverlap, - advancedBlendAllOperations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( advancedBlendMaxColorAttachments == rhs.advancedBlendMaxColorAttachments ) && - ( advancedBlendIndependentBlend == rhs.advancedBlendIndependentBlend ) && - ( advancedBlendNonPremultipliedSrcColor == rhs.advancedBlendNonPremultipliedSrcColor ) && - ( advancedBlendNonPremultipliedDstColor == rhs.advancedBlendNonPremultipliedDstColor ) && - ( advancedBlendCorrelatedOverlap == rhs.advancedBlendCorrelatedOverlap ) && ( advancedBlendAllOperations == rhs.advancedBlendAllOperations ); -# endif - } - - bool operator!=( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; - void * pNext = {}; - uint32_t advancedBlendMaxColorAttachments = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendIndependentBlend = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedSrcColor = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedDstColor = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCorrelatedOverlap = {}; - VULKAN_HPP_NAMESPACE::Bool32 advancedBlendAllOperations = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceBlendOperationAdvancedPropertiesEXT; - }; - - struct PhysicalDeviceBorderColorSwizzleFeaturesEXT - { - using NativeType = VkPhysicalDeviceBorderColorSwizzleFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceBorderColorSwizzleFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , borderColorSwizzle( borderColorSwizzle_ ) - , borderColorSwizzleFromImage( borderColorSwizzleFromImage_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceBorderColorSwizzleFeaturesEXT( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBorderColorSwizzleFeaturesEXT( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceBorderColorSwizzleFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceBorderColorSwizzleFeaturesEXT & operator=( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBorderColorSwizzleFeaturesEXT & operator=( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & - setBorderColorSwizzle( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle_ ) VULKAN_HPP_NOEXCEPT - { - borderColorSwizzle = borderColorSwizzle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & - setBorderColorSwizzleFromImage( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage_ ) VULKAN_HPP_NOEXCEPT - { - borderColorSwizzleFromImage = borderColorSwizzleFromImage_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceBorderColorSwizzleFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, borderColorSwizzle, borderColorSwizzleFromImage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( borderColorSwizzle == rhs.borderColorSwizzle ) && - ( borderColorSwizzleFromImage == rhs.borderColorSwizzleFromImage ); -# endif - } - - bool operator!=( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle = {}; - VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceBorderColorSwizzleFeaturesEXT; - }; - - struct PhysicalDeviceBufferDeviceAddressFeatures - { - using NativeType = VkPhysicalDeviceBufferDeviceAddressFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBufferDeviceAddressFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeatures( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , bufferDeviceAddress( bufferDeviceAddress_ ) - , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ ) - , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeatures( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBufferDeviceAddressFeatures( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceBufferDeviceAddressFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceBufferDeviceAddressFeatures & operator=( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBufferDeviceAddressFeatures & operator=( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & - setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddress = bufferDeviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & - setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & - setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceBufferDeviceAddressFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceBufferDeviceAddressFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, bufferDeviceAddress, bufferDeviceAddressCaptureReplay, bufferDeviceAddressMultiDevice ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceBufferDeviceAddressFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && - ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && - ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ); -# endif - } - - bool operator!=( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceBufferDeviceAddressFeatures; - }; - using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; - - struct PhysicalDeviceBufferDeviceAddressFeaturesEXT - { - using NativeType = VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , bufferDeviceAddress( bufferDeviceAddress_ ) - , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ ) - , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBufferDeviceAddressFeaturesEXT( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceBufferDeviceAddressFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceBufferDeviceAddressFeaturesEXT & operator=( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceBufferDeviceAddressFeaturesEXT & operator=( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & - setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddress = bufferDeviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & - setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & - setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceBufferDeviceAddressFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, bufferDeviceAddress, bufferDeviceAddressCaptureReplay, bufferDeviceAddressMultiDevice ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && - ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && - ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ); -# endif - } - - bool operator!=( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceBufferDeviceAddressFeaturesEXT; - }; - using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; - - struct PhysicalDeviceCoherentMemoryFeaturesAMD - { - using NativeType = VkPhysicalDeviceCoherentMemoryFeaturesAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceCoherentMemory( deviceCoherentMemory_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCoherentMemoryFeaturesAMD( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCoherentMemoryFeaturesAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCoherentMemoryFeaturesAMD & operator=( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCoherentMemoryFeaturesAMD & operator=( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoherentMemoryFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoherentMemoryFeaturesAMD & - setDeviceCoherentMemory( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ ) VULKAN_HPP_NOEXCEPT - { - deviceCoherentMemory = deviceCoherentMemory_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceCoherentMemoryFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCoherentMemoryFeaturesAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceCoherentMemory ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCoherentMemoryFeaturesAMD const & ) const = default; -#else - bool operator==( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceCoherentMemory == rhs.deviceCoherentMemory ); -# endif - } - - bool operator!=( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCoherentMemoryFeaturesAMD; - }; - - struct PhysicalDeviceColorWriteEnableFeaturesEXT - { - using NativeType = VkPhysicalDeviceColorWriteEnableFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceColorWriteEnableFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , colorWriteEnable( colorWriteEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceColorWriteEnableFeaturesEXT( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceColorWriteEnableFeaturesEXT( VkPhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceColorWriteEnableFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceColorWriteEnableFeaturesEXT & operator=( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceColorWriteEnableFeaturesEXT & operator=( VkPhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceColorWriteEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceColorWriteEnableFeaturesEXT & - setColorWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable_ ) VULKAN_HPP_NOEXCEPT - { - colorWriteEnable = colorWriteEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceColorWriteEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceColorWriteEnableFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, colorWriteEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceColorWriteEnableFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorWriteEnable == rhs.colorWriteEnable ); -# endif - } - - bool operator!=( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceColorWriteEnableFeaturesEXT; - }; - - struct PhysicalDeviceComputeShaderDerivativesFeaturesNV - { - using NativeType = VkPhysicalDeviceComputeShaderDerivativesFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , computeDerivativeGroupQuads( computeDerivativeGroupQuads_ ) - , computeDerivativeGroupLinear( computeDerivativeGroupLinear_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceComputeShaderDerivativesFeaturesNV( PhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceComputeShaderDerivativesFeaturesNV( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceComputeShaderDerivativesFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceComputeShaderDerivativesFeaturesNV & operator=( PhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceComputeShaderDerivativesFeaturesNV & operator=( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesNV & - setComputeDerivativeGroupQuads( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ ) VULKAN_HPP_NOEXCEPT - { - computeDerivativeGroupQuads = computeDerivativeGroupQuads_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesNV & - setComputeDerivativeGroupLinear( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ ) VULKAN_HPP_NOEXCEPT - { - computeDerivativeGroupLinear = computeDerivativeGroupLinear_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceComputeShaderDerivativesFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, computeDerivativeGroupQuads, computeDerivativeGroupLinear ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceComputeShaderDerivativesFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( computeDerivativeGroupQuads == rhs.computeDerivativeGroupQuads ) && - ( computeDerivativeGroupLinear == rhs.computeDerivativeGroupLinear ); -# endif - } - - bool operator!=( PhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads = {}; - VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceComputeShaderDerivativesFeaturesNV; - }; - - struct PhysicalDeviceConditionalRenderingFeaturesEXT - { - using NativeType = VkPhysicalDeviceConditionalRenderingFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , conditionalRendering( conditionalRendering_ ) - , inheritedConditionalRendering( inheritedConditionalRendering_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceConditionalRenderingFeaturesEXT( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceConditionalRenderingFeaturesEXT( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceConditionalRenderingFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceConditionalRenderingFeaturesEXT & operator=( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceConditionalRenderingFeaturesEXT & operator=( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & - setConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ ) VULKAN_HPP_NOEXCEPT - { - conditionalRendering = conditionalRendering_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & - setInheritedConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ ) VULKAN_HPP_NOEXCEPT - { - inheritedConditionalRendering = inheritedConditionalRendering_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceConditionalRenderingFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceConditionalRenderingFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, conditionalRendering, inheritedConditionalRendering ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceConditionalRenderingFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conditionalRendering == rhs.conditionalRendering ) && - ( inheritedConditionalRendering == rhs.inheritedConditionalRendering ); -# endif - } - - bool operator!=( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering = {}; - VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceConditionalRenderingFeaturesEXT; - }; - - struct PhysicalDeviceConservativeRasterizationPropertiesEXT - { - using NativeType = VkPhysicalDeviceConservativeRasterizationPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceConservativeRasterizationPropertiesEXT( float primitiveOverestimationSize_ = {}, - float maxExtraPrimitiveOverestimationSize_ = {}, - float extraPrimitiveOverestimationSizeGranularity_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitiveUnderestimation_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 conservativePointAndLineRasterization_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 degenerateTrianglesRasterized_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 degenerateLinesRasterized_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fullyCoveredFragmentShaderInputVariable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 conservativeRasterizationPostDepthCoverage_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , primitiveOverestimationSize( primitiveOverestimationSize_ ) - , maxExtraPrimitiveOverestimationSize( maxExtraPrimitiveOverestimationSize_ ) - , extraPrimitiveOverestimationSizeGranularity( extraPrimitiveOverestimationSizeGranularity_ ) - , primitiveUnderestimation( primitiveUnderestimation_ ) - , conservativePointAndLineRasterization( conservativePointAndLineRasterization_ ) - , degenerateTrianglesRasterized( degenerateTrianglesRasterized_ ) - , degenerateLinesRasterized( degenerateLinesRasterized_ ) - , fullyCoveredFragmentShaderInputVariable( fullyCoveredFragmentShaderInputVariable_ ) - , conservativeRasterizationPostDepthCoverage( conservativeRasterizationPostDepthCoverage_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceConservativeRasterizationPropertiesEXT( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceConservativeRasterizationPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceConservativeRasterizationPropertiesEXT & - operator=( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceConservativeRasterizationPropertiesEXT & operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - primitiveOverestimationSize, - maxExtraPrimitiveOverestimationSize, - extraPrimitiveOverestimationSizeGranularity, - primitiveUnderestimation, - conservativePointAndLineRasterization, - degenerateTrianglesRasterized, - degenerateLinesRasterized, - fullyCoveredFragmentShaderInputVariable, - conservativeRasterizationPostDepthCoverage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceConservativeRasterizationPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitiveOverestimationSize == rhs.primitiveOverestimationSize ) && - ( maxExtraPrimitiveOverestimationSize == rhs.maxExtraPrimitiveOverestimationSize ) && - ( extraPrimitiveOverestimationSizeGranularity == rhs.extraPrimitiveOverestimationSizeGranularity ) && - ( primitiveUnderestimation == rhs.primitiveUnderestimation ) && - ( conservativePointAndLineRasterization == rhs.conservativePointAndLineRasterization ) && - ( degenerateTrianglesRasterized == rhs.degenerateTrianglesRasterized ) && ( degenerateLinesRasterized == rhs.degenerateLinesRasterized ) && - ( fullyCoveredFragmentShaderInputVariable == rhs.fullyCoveredFragmentShaderInputVariable ) && - ( conservativeRasterizationPostDepthCoverage == rhs.conservativeRasterizationPostDepthCoverage ); -# endif - } - - bool operator!=( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; - void * pNext = {}; - float primitiveOverestimationSize = {}; - float maxExtraPrimitiveOverestimationSize = {}; - float extraPrimitiveOverestimationSizeGranularity = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveUnderestimation = {}; - VULKAN_HPP_NAMESPACE::Bool32 conservativePointAndLineRasterization = {}; - VULKAN_HPP_NAMESPACE::Bool32 degenerateTrianglesRasterized = {}; - VULKAN_HPP_NAMESPACE::Bool32 degenerateLinesRasterized = {}; - VULKAN_HPP_NAMESPACE::Bool32 fullyCoveredFragmentShaderInputVariable = {}; - VULKAN_HPP_NAMESPACE::Bool32 conservativeRasterizationPostDepthCoverage = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceConservativeRasterizationPropertiesEXT; - }; - - struct PhysicalDeviceCooperativeMatrixFeaturesNV - { - using NativeType = VkPhysicalDeviceCooperativeMatrixFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , cooperativeMatrix( cooperativeMatrix_ ) - , cooperativeMatrixRobustBufferAccess( cooperativeMatrixRobustBufferAccess_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCooperativeMatrixFeaturesNV( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCooperativeMatrixFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCooperativeMatrixFeaturesNV & operator=( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCooperativeMatrixFeaturesNV & operator=( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & - setCooperativeMatrix( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ ) VULKAN_HPP_NOEXCEPT - { - cooperativeMatrix = cooperativeMatrix_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & - setCooperativeMatrixRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ ) VULKAN_HPP_NOEXCEPT - { - cooperativeMatrixRobustBufferAccess = cooperativeMatrixRobustBufferAccess_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceCooperativeMatrixFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCooperativeMatrixFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, cooperativeMatrix, cooperativeMatrixRobustBufferAccess ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCooperativeMatrixFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrix == rhs.cooperativeMatrix ) && - ( cooperativeMatrixRobustBufferAccess == rhs.cooperativeMatrixRobustBufferAccess ); -# endif - } - - bool operator!=( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix = {}; - VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCooperativeMatrixFeaturesNV; - }; - - struct PhysicalDeviceCooperativeMatrixPropertiesNV - { - using NativeType = VkPhysicalDeviceCooperativeMatrixPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesNV( VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , cooperativeMatrixSupportedStages( cooperativeMatrixSupportedStages_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesNV( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCooperativeMatrixPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCooperativeMatrixPropertiesNV & operator=( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCooperativeMatrixPropertiesNV & operator=( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceCooperativeMatrixPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCooperativeMatrixPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, cooperativeMatrixSupportedStages ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCooperativeMatrixPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrixSupportedStages == rhs.cooperativeMatrixSupportedStages ); -# endif - } - - bool operator!=( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCooperativeMatrixPropertiesNV; - }; - - struct PhysicalDeviceCornerSampledImageFeaturesNV - { - using NativeType = VkPhysicalDeviceCornerSampledImageFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , cornerSampledImage( cornerSampledImage_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCornerSampledImageFeaturesNV( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCornerSampledImageFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCornerSampledImageFeaturesNV & operator=( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCornerSampledImageFeaturesNV & operator=( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCornerSampledImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCornerSampledImageFeaturesNV & - setCornerSampledImage( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ ) VULKAN_HPP_NOEXCEPT - { - cornerSampledImage = cornerSampledImage_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceCornerSampledImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCornerSampledImageFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, cornerSampledImage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCornerSampledImageFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cornerSampledImage == rhs.cornerSampledImage ); -# endif - } - - bool operator!=( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCornerSampledImageFeaturesNV; - }; - - struct PhysicalDeviceCoverageReductionModeFeaturesNV - { - using NativeType = VkPhysicalDeviceCoverageReductionModeFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , coverageReductionMode( coverageReductionMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceCoverageReductionModeFeaturesNV( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCoverageReductionModeFeaturesNV( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCoverageReductionModeFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCoverageReductionModeFeaturesNV & operator=( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCoverageReductionModeFeaturesNV & operator=( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoverageReductionModeFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoverageReductionModeFeaturesNV & - setCoverageReductionMode( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT - { - coverageReductionMode = coverageReductionMode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceCoverageReductionModeFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCoverageReductionModeFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, coverageReductionMode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCoverageReductionModeFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( coverageReductionMode == rhs.coverageReductionMode ); -# endif - } - - bool operator!=( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCoverageReductionModeFeaturesNV; - }; - - struct PhysicalDeviceCustomBorderColorFeaturesEXT - { - using NativeType = VkPhysicalDeviceCustomBorderColorFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 customBorderColors_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , customBorderColors( customBorderColors_ ) - , customBorderColorWithoutFormat( customBorderColorWithoutFormat_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorFeaturesEXT( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCustomBorderColorFeaturesEXT( VkPhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCustomBorderColorFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCustomBorderColorFeaturesEXT & operator=( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCustomBorderColorFeaturesEXT & operator=( VkPhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & - setCustomBorderColors( VULKAN_HPP_NAMESPACE::Bool32 customBorderColors_ ) VULKAN_HPP_NOEXCEPT - { - customBorderColors = customBorderColors_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & - setCustomBorderColorWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat_ ) VULKAN_HPP_NOEXCEPT - { - customBorderColorWithoutFormat = customBorderColorWithoutFormat_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceCustomBorderColorFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCustomBorderColorFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, customBorderColors, customBorderColorWithoutFormat ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCustomBorderColorFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( customBorderColors == rhs.customBorderColors ) && - ( customBorderColorWithoutFormat == rhs.customBorderColorWithoutFormat ); -# endif - } - - bool operator!=( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 customBorderColors = {}; - VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCustomBorderColorFeaturesEXT; - }; - - struct PhysicalDeviceCustomBorderColorPropertiesEXT - { - using NativeType = VkPhysicalDeviceCustomBorderColorPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorPropertiesEXT( uint32_t maxCustomBorderColorSamplers_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxCustomBorderColorSamplers( maxCustomBorderColorSamplers_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorPropertiesEXT( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCustomBorderColorPropertiesEXT( VkPhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceCustomBorderColorPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceCustomBorderColorPropertiesEXT & operator=( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceCustomBorderColorPropertiesEXT & operator=( VkPhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceCustomBorderColorPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceCustomBorderColorPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxCustomBorderColorSamplers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceCustomBorderColorPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxCustomBorderColorSamplers == rhs.maxCustomBorderColorSamplers ); -# endif - } - - bool operator!=( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT; - void * pNext = {}; - uint32_t maxCustomBorderColorSamplers = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceCustomBorderColorPropertiesEXT; - }; - - struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV - { - using NativeType = VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dedicatedAllocationImageAliasing( dedicatedAllocationImageAliasing_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & - operator=( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & - operator=( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & - setDedicatedAllocationImageAliasing( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ ) VULKAN_HPP_NOEXCEPT - { - dedicatedAllocationImageAliasing = dedicatedAllocationImageAliasing_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dedicatedAllocationImageAliasing ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocationImageAliasing == rhs.dedicatedAllocationImageAliasing ); -# endif - } - - bool operator!=( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; - }; - - struct PhysicalDeviceDepthClampZeroOneFeaturesEXT - { - using NativeType = VkPhysicalDeviceDepthClampZeroOneFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampZeroOneFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , depthClampZeroOne( depthClampZeroOne_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampZeroOneFeaturesEXT( PhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClampZeroOneFeaturesEXT( VkPhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDepthClampZeroOneFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDepthClampZeroOneFeaturesEXT & operator=( PhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClampZeroOneFeaturesEXT & operator=( VkPhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampZeroOneFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampZeroOneFeaturesEXT & - setDepthClampZeroOne( VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne_ ) VULKAN_HPP_NOEXCEPT - { - depthClampZeroOne = depthClampZeroOne_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDepthClampZeroOneFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDepthClampZeroOneFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, depthClampZeroOne ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDepthClampZeroOneFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClampZeroOne == rhs.depthClampZeroOne ); -# endif - } - - bool operator!=( PhysicalDeviceDepthClampZeroOneFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDepthClampZeroOneFeaturesEXT; - }; - - struct PhysicalDeviceDepthClipControlFeaturesEXT - { - using NativeType = VkPhysicalDeviceDepthClipControlFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipControl_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , depthClipControl( depthClipControl_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipControlFeaturesEXT( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClipControlFeaturesEXT( VkPhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDepthClipControlFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDepthClipControlFeaturesEXT & operator=( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClipControlFeaturesEXT & operator=( VkPhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipControlFeaturesEXT & - setDepthClipControl( VULKAN_HPP_NAMESPACE::Bool32 depthClipControl_ ) VULKAN_HPP_NOEXCEPT - { - depthClipControl = depthClipControl_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDepthClipControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDepthClipControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, depthClipControl ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDepthClipControlFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClipControl == rhs.depthClipControl ); -# endif - } - - bool operator!=( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClipControl = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDepthClipControlFeaturesEXT; - }; - - struct PhysicalDeviceDepthClipEnableFeaturesEXT - { - using NativeType = VkPhysicalDeviceDepthClipEnableFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , depthClipEnable( depthClipEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClipEnableFeaturesEXT( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDepthClipEnableFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDepthClipEnableFeaturesEXT & operator=( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthClipEnableFeaturesEXT & operator=( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipEnableFeaturesEXT & setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthClipEnable = depthClipEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDepthClipEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDepthClipEnableFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, depthClipEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDepthClipEnableFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClipEnable == rhs.depthClipEnable ); -# endif - } - - bool operator!=( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDepthClipEnableFeaturesEXT; - }; - - struct PhysicalDeviceDepthStencilResolveProperties - { - using NativeType = VkPhysicalDeviceDepthStencilResolveProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthStencilResolveProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthStencilResolveProperties( VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ = {}, - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , supportedDepthResolveModes( supportedDepthResolveModes_ ) - , supportedStencilResolveModes( supportedStencilResolveModes_ ) - , independentResolveNone( independentResolveNone_ ) - , independentResolve( independentResolve_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthStencilResolveProperties( PhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthStencilResolveProperties( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDepthStencilResolveProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDepthStencilResolveProperties & operator=( PhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDepthStencilResolveProperties & operator=( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDepthStencilResolveProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDepthStencilResolveProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, supportedDepthResolveModes, supportedStencilResolveModes, independentResolveNone, independentResolve ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDepthStencilResolveProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceDepthStencilResolveProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedDepthResolveModes == rhs.supportedDepthResolveModes ) && - ( supportedStencilResolveModes == rhs.supportedStencilResolveModes ) && ( independentResolveNone == rhs.independentResolveNone ) && - ( independentResolve == rhs.independentResolve ); -# endif - } - - bool operator!=( PhysicalDeviceDepthStencilResolveProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthStencilResolveProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes = {}; - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes = {}; - VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone = {}; - VULKAN_HPP_NAMESPACE::Bool32 independentResolve = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDepthStencilResolveProperties; - }; - using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; - - struct PhysicalDeviceDescriptorIndexingFeatures - { - using NativeType = VkPhysicalDeviceDescriptorIndexingFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorIndexingFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderInputAttachmentArrayDynamicIndexing( shaderInputAttachmentArrayDynamicIndexing_ ) - , shaderUniformTexelBufferArrayDynamicIndexing( shaderUniformTexelBufferArrayDynamicIndexing_ ) - , shaderStorageTexelBufferArrayDynamicIndexing( shaderStorageTexelBufferArrayDynamicIndexing_ ) - , shaderUniformBufferArrayNonUniformIndexing( shaderUniformBufferArrayNonUniformIndexing_ ) - , shaderSampledImageArrayNonUniformIndexing( shaderSampledImageArrayNonUniformIndexing_ ) - , shaderStorageBufferArrayNonUniformIndexing( shaderStorageBufferArrayNonUniformIndexing_ ) - , shaderStorageImageArrayNonUniformIndexing( shaderStorageImageArrayNonUniformIndexing_ ) - , shaderInputAttachmentArrayNonUniformIndexing( shaderInputAttachmentArrayNonUniformIndexing_ ) - , shaderUniformTexelBufferArrayNonUniformIndexing( shaderUniformTexelBufferArrayNonUniformIndexing_ ) - , shaderStorageTexelBufferArrayNonUniformIndexing( shaderStorageTexelBufferArrayNonUniformIndexing_ ) - , descriptorBindingUniformBufferUpdateAfterBind( descriptorBindingUniformBufferUpdateAfterBind_ ) - , descriptorBindingSampledImageUpdateAfterBind( descriptorBindingSampledImageUpdateAfterBind_ ) - , descriptorBindingStorageImageUpdateAfterBind( descriptorBindingStorageImageUpdateAfterBind_ ) - , descriptorBindingStorageBufferUpdateAfterBind( descriptorBindingStorageBufferUpdateAfterBind_ ) - , descriptorBindingUniformTexelBufferUpdateAfterBind( descriptorBindingUniformTexelBufferUpdateAfterBind_ ) - , descriptorBindingStorageTexelBufferUpdateAfterBind( descriptorBindingStorageTexelBufferUpdateAfterBind_ ) - , descriptorBindingUpdateUnusedWhilePending( descriptorBindingUpdateUnusedWhilePending_ ) - , descriptorBindingPartiallyBound( descriptorBindingPartiallyBound_ ) - , descriptorBindingVariableDescriptorCount( descriptorBindingVariableDescriptorCount_ ) - , runtimeDescriptorArray( runtimeDescriptorArray_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeatures( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorIndexingFeatures( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDescriptorIndexingFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDescriptorIndexingFeatures & operator=( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorIndexingFeatures & operator=( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUniformTexelBufferUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageTexelBufferUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & - setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT - { - runtimeDescriptorArray = runtimeDescriptorArray_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDescriptorIndexingFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDescriptorIndexingFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderInputAttachmentArrayDynamicIndexing, - shaderUniformTexelBufferArrayDynamicIndexing, - shaderStorageTexelBufferArrayDynamicIndexing, - shaderUniformBufferArrayNonUniformIndexing, - shaderSampledImageArrayNonUniformIndexing, - shaderStorageBufferArrayNonUniformIndexing, - shaderStorageImageArrayNonUniformIndexing, - shaderInputAttachmentArrayNonUniformIndexing, - shaderUniformTexelBufferArrayNonUniformIndexing, - shaderStorageTexelBufferArrayNonUniformIndexing, - descriptorBindingUniformBufferUpdateAfterBind, - descriptorBindingSampledImageUpdateAfterBind, - descriptorBindingStorageImageUpdateAfterBind, - descriptorBindingStorageBufferUpdateAfterBind, - descriptorBindingUniformTexelBufferUpdateAfterBind, - descriptorBindingStorageTexelBufferUpdateAfterBind, - descriptorBindingUpdateUnusedWhilePending, - descriptorBindingPartiallyBound, - descriptorBindingVariableDescriptorCount, - runtimeDescriptorArray ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDescriptorIndexingFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && - ( shaderInputAttachmentArrayDynamicIndexing == rhs.shaderInputAttachmentArrayDynamicIndexing ) && - ( shaderUniformTexelBufferArrayDynamicIndexing == rhs.shaderUniformTexelBufferArrayDynamicIndexing ) && - ( shaderStorageTexelBufferArrayDynamicIndexing == rhs.shaderStorageTexelBufferArrayDynamicIndexing ) && - ( shaderUniformBufferArrayNonUniformIndexing == rhs.shaderUniformBufferArrayNonUniformIndexing ) && - ( shaderSampledImageArrayNonUniformIndexing == rhs.shaderSampledImageArrayNonUniformIndexing ) && - ( shaderStorageBufferArrayNonUniformIndexing == rhs.shaderStorageBufferArrayNonUniformIndexing ) && - ( shaderStorageImageArrayNonUniformIndexing == rhs.shaderStorageImageArrayNonUniformIndexing ) && - ( shaderInputAttachmentArrayNonUniformIndexing == rhs.shaderInputAttachmentArrayNonUniformIndexing ) && - ( shaderUniformTexelBufferArrayNonUniformIndexing == rhs.shaderUniformTexelBufferArrayNonUniformIndexing ) && - ( shaderStorageTexelBufferArrayNonUniformIndexing == rhs.shaderStorageTexelBufferArrayNonUniformIndexing ) && - ( descriptorBindingUniformBufferUpdateAfterBind == rhs.descriptorBindingUniformBufferUpdateAfterBind ) && - ( descriptorBindingSampledImageUpdateAfterBind == rhs.descriptorBindingSampledImageUpdateAfterBind ) && - ( descriptorBindingStorageImageUpdateAfterBind == rhs.descriptorBindingStorageImageUpdateAfterBind ) && - ( descriptorBindingStorageBufferUpdateAfterBind == rhs.descriptorBindingStorageBufferUpdateAfterBind ) && - ( descriptorBindingUniformTexelBufferUpdateAfterBind == rhs.descriptorBindingUniformTexelBufferUpdateAfterBind ) && - ( descriptorBindingStorageTexelBufferUpdateAfterBind == rhs.descriptorBindingStorageTexelBufferUpdateAfterBind ) && - ( descriptorBindingUpdateUnusedWhilePending == rhs.descriptorBindingUpdateUnusedWhilePending ) && - ( descriptorBindingPartiallyBound == rhs.descriptorBindingPartiallyBound ) && - ( descriptorBindingVariableDescriptorCount == rhs.descriptorBindingVariableDescriptorCount ) && - ( runtimeDescriptorArray == rhs.runtimeDescriptorArray ); -# endif - } - - bool operator!=( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount = {}; - VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDescriptorIndexingFeatures; - }; - using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; - - struct PhysicalDeviceDescriptorIndexingProperties - { - using NativeType = VkPhysicalDeviceDescriptorIndexingProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorIndexingProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingProperties( uint32_t maxUpdateAfterBindDescriptorsInAllPools_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments_ = {}, - uint32_t maxPerStageUpdateAfterBindResources_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindSamplers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindSampledImages_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageImages_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxUpdateAfterBindDescriptorsInAllPools( maxUpdateAfterBindDescriptorsInAllPools_ ) - , shaderUniformBufferArrayNonUniformIndexingNative( shaderUniformBufferArrayNonUniformIndexingNative_ ) - , shaderSampledImageArrayNonUniformIndexingNative( shaderSampledImageArrayNonUniformIndexingNative_ ) - , shaderStorageBufferArrayNonUniformIndexingNative( shaderStorageBufferArrayNonUniformIndexingNative_ ) - , shaderStorageImageArrayNonUniformIndexingNative( shaderStorageImageArrayNonUniformIndexingNative_ ) - , shaderInputAttachmentArrayNonUniformIndexingNative( shaderInputAttachmentArrayNonUniformIndexingNative_ ) - , robustBufferAccessUpdateAfterBind( robustBufferAccessUpdateAfterBind_ ) - , quadDivergentImplicitLod( quadDivergentImplicitLod_ ) - , maxPerStageDescriptorUpdateAfterBindSamplers( maxPerStageDescriptorUpdateAfterBindSamplers_ ) - , maxPerStageDescriptorUpdateAfterBindUniformBuffers( maxPerStageDescriptorUpdateAfterBindUniformBuffers_ ) - , maxPerStageDescriptorUpdateAfterBindStorageBuffers( maxPerStageDescriptorUpdateAfterBindStorageBuffers_ ) - , maxPerStageDescriptorUpdateAfterBindSampledImages( maxPerStageDescriptorUpdateAfterBindSampledImages_ ) - , maxPerStageDescriptorUpdateAfterBindStorageImages( maxPerStageDescriptorUpdateAfterBindStorageImages_ ) - , maxPerStageDescriptorUpdateAfterBindInputAttachments( maxPerStageDescriptorUpdateAfterBindInputAttachments_ ) - , maxPerStageUpdateAfterBindResources( maxPerStageUpdateAfterBindResources_ ) - , maxDescriptorSetUpdateAfterBindSamplers( maxDescriptorSetUpdateAfterBindSamplers_ ) - , maxDescriptorSetUpdateAfterBindUniformBuffers( maxDescriptorSetUpdateAfterBindUniformBuffers_ ) - , maxDescriptorSetUpdateAfterBindUniformBuffersDynamic( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ ) - , maxDescriptorSetUpdateAfterBindStorageBuffers( maxDescriptorSetUpdateAfterBindStorageBuffers_ ) - , maxDescriptorSetUpdateAfterBindStorageBuffersDynamic( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ ) - , maxDescriptorSetUpdateAfterBindSampledImages( maxDescriptorSetUpdateAfterBindSampledImages_ ) - , maxDescriptorSetUpdateAfterBindStorageImages( maxDescriptorSetUpdateAfterBindStorageImages_ ) - , maxDescriptorSetUpdateAfterBindInputAttachments( maxDescriptorSetUpdateAfterBindInputAttachments_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingProperties( PhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorIndexingProperties( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDescriptorIndexingProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDescriptorIndexingProperties & operator=( PhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorIndexingProperties & operator=( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDescriptorIndexingProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDescriptorIndexingProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxUpdateAfterBindDescriptorsInAllPools, - shaderUniformBufferArrayNonUniformIndexingNative, - shaderSampledImageArrayNonUniformIndexingNative, - shaderStorageBufferArrayNonUniformIndexingNative, - shaderStorageImageArrayNonUniformIndexingNative, - shaderInputAttachmentArrayNonUniformIndexingNative, - robustBufferAccessUpdateAfterBind, - quadDivergentImplicitLod, - maxPerStageDescriptorUpdateAfterBindSamplers, - maxPerStageDescriptorUpdateAfterBindUniformBuffers, - maxPerStageDescriptorUpdateAfterBindStorageBuffers, - maxPerStageDescriptorUpdateAfterBindSampledImages, - maxPerStageDescriptorUpdateAfterBindStorageImages, - maxPerStageDescriptorUpdateAfterBindInputAttachments, - maxPerStageUpdateAfterBindResources, - maxDescriptorSetUpdateAfterBindSamplers, - maxDescriptorSetUpdateAfterBindUniformBuffers, - maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, - maxDescriptorSetUpdateAfterBindStorageBuffers, - maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, - maxDescriptorSetUpdateAfterBindSampledImages, - maxDescriptorSetUpdateAfterBindStorageImages, - maxDescriptorSetUpdateAfterBindInputAttachments ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDescriptorIndexingProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceDescriptorIndexingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxUpdateAfterBindDescriptorsInAllPools == rhs.maxUpdateAfterBindDescriptorsInAllPools ) && - ( shaderUniformBufferArrayNonUniformIndexingNative == rhs.shaderUniformBufferArrayNonUniformIndexingNative ) && - ( shaderSampledImageArrayNonUniformIndexingNative == rhs.shaderSampledImageArrayNonUniformIndexingNative ) && - ( shaderStorageBufferArrayNonUniformIndexingNative == rhs.shaderStorageBufferArrayNonUniformIndexingNative ) && - ( shaderStorageImageArrayNonUniformIndexingNative == rhs.shaderStorageImageArrayNonUniformIndexingNative ) && - ( shaderInputAttachmentArrayNonUniformIndexingNative == rhs.shaderInputAttachmentArrayNonUniformIndexingNative ) && - ( robustBufferAccessUpdateAfterBind == rhs.robustBufferAccessUpdateAfterBind ) && ( quadDivergentImplicitLod == rhs.quadDivergentImplicitLod ) && - ( maxPerStageDescriptorUpdateAfterBindSamplers == rhs.maxPerStageDescriptorUpdateAfterBindSamplers ) && - ( maxPerStageDescriptorUpdateAfterBindUniformBuffers == rhs.maxPerStageDescriptorUpdateAfterBindUniformBuffers ) && - ( maxPerStageDescriptorUpdateAfterBindStorageBuffers == rhs.maxPerStageDescriptorUpdateAfterBindStorageBuffers ) && - ( maxPerStageDescriptorUpdateAfterBindSampledImages == rhs.maxPerStageDescriptorUpdateAfterBindSampledImages ) && - ( maxPerStageDescriptorUpdateAfterBindStorageImages == rhs.maxPerStageDescriptorUpdateAfterBindStorageImages ) && - ( maxPerStageDescriptorUpdateAfterBindInputAttachments == rhs.maxPerStageDescriptorUpdateAfterBindInputAttachments ) && - ( maxPerStageUpdateAfterBindResources == rhs.maxPerStageUpdateAfterBindResources ) && - ( maxDescriptorSetUpdateAfterBindSamplers == rhs.maxDescriptorSetUpdateAfterBindSamplers ) && - ( maxDescriptorSetUpdateAfterBindUniformBuffers == rhs.maxDescriptorSetUpdateAfterBindUniformBuffers ) && - ( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ) && - ( maxDescriptorSetUpdateAfterBindStorageBuffers == rhs.maxDescriptorSetUpdateAfterBindStorageBuffers ) && - ( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ) && - ( maxDescriptorSetUpdateAfterBindSampledImages == rhs.maxDescriptorSetUpdateAfterBindSampledImages ) && - ( maxDescriptorSetUpdateAfterBindStorageImages == rhs.maxDescriptorSetUpdateAfterBindStorageImages ) && - ( maxDescriptorSetUpdateAfterBindInputAttachments == rhs.maxDescriptorSetUpdateAfterBindInputAttachments ); -# endif - } - - bool operator!=( PhysicalDeviceDescriptorIndexingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingProperties; - void * pNext = {}; - uint32_t maxUpdateAfterBindDescriptorsInAllPools = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments = {}; - uint32_t maxPerStageUpdateAfterBindResources = {}; - uint32_t maxDescriptorSetUpdateAfterBindSamplers = {}; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers = {}; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = {}; - uint32_t maxDescriptorSetUpdateAfterBindSampledImages = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageImages = {}; - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDescriptorIndexingProperties; - }; - using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; - - struct PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE - { - using NativeType = VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , descriptorSetHostMapping( descriptorSetHostMapping_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & - operator=( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & operator=( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & - setDescriptorSetHostMapping( VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping_ ) VULKAN_HPP_NOEXCEPT - { - descriptorSetHostMapping = descriptorSetHostMapping_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, descriptorSetHostMapping ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & ) const = default; -#else - bool operator==( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetHostMapping == rhs.descriptorSetHostMapping ); -# endif - } - - bool operator!=( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; - }; - - struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV - { - using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceGeneratedCommands( deviceGeneratedCommands_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & operator=( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & operator=( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & - setDeviceGeneratedCommands( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ ) VULKAN_HPP_NOEXCEPT - { - deviceGeneratedCommands = deviceGeneratedCommands_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceGeneratedCommands ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceGeneratedCommands == rhs.deviceGeneratedCommands ); -# endif - } - - bool operator!=( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDeviceGeneratedCommandsFeaturesNV; - }; - - struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV - { - using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( uint32_t maxGraphicsShaderGroupCount_ = {}, - uint32_t maxIndirectSequenceCount_ = {}, - uint32_t maxIndirectCommandsTokenCount_ = {}, - uint32_t maxIndirectCommandsStreamCount_ = {}, - uint32_t maxIndirectCommandsTokenOffset_ = {}, - uint32_t maxIndirectCommandsStreamStride_ = {}, - uint32_t minSequencesCountBufferOffsetAlignment_ = {}, - uint32_t minSequencesIndexBufferOffsetAlignment_ = {}, - uint32_t minIndirectCommandsBufferOffsetAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxGraphicsShaderGroupCount( maxGraphicsShaderGroupCount_ ) - , maxIndirectSequenceCount( maxIndirectSequenceCount_ ) - , maxIndirectCommandsTokenCount( maxIndirectCommandsTokenCount_ ) - , maxIndirectCommandsStreamCount( maxIndirectCommandsStreamCount_ ) - , maxIndirectCommandsTokenOffset( maxIndirectCommandsTokenOffset_ ) - , maxIndirectCommandsStreamStride( maxIndirectCommandsStreamStride_ ) - , minSequencesCountBufferOffsetAlignment( minSequencesCountBufferOffsetAlignment_ ) - , minSequencesIndexBufferOffsetAlignment( minSequencesIndexBufferOffsetAlignment_ ) - , minIndirectCommandsBufferOffsetAlignment( minIndirectCommandsBufferOffsetAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDeviceGeneratedCommandsPropertiesNV & - operator=( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceGeneratedCommandsPropertiesNV & operator=( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxGraphicsShaderGroupCount, - maxIndirectSequenceCount, - maxIndirectCommandsTokenCount, - maxIndirectCommandsStreamCount, - maxIndirectCommandsTokenOffset, - maxIndirectCommandsStreamStride, - minSequencesCountBufferOffsetAlignment, - minSequencesIndexBufferOffsetAlignment, - minIndirectCommandsBufferOffsetAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxGraphicsShaderGroupCount == rhs.maxGraphicsShaderGroupCount ) && - ( maxIndirectSequenceCount == rhs.maxIndirectSequenceCount ) && ( maxIndirectCommandsTokenCount == rhs.maxIndirectCommandsTokenCount ) && - ( maxIndirectCommandsStreamCount == rhs.maxIndirectCommandsStreamCount ) && - ( maxIndirectCommandsTokenOffset == rhs.maxIndirectCommandsTokenOffset ) && - ( maxIndirectCommandsStreamStride == rhs.maxIndirectCommandsStreamStride ) && - ( minSequencesCountBufferOffsetAlignment == rhs.minSequencesCountBufferOffsetAlignment ) && - ( minSequencesIndexBufferOffsetAlignment == rhs.minSequencesIndexBufferOffsetAlignment ) && - ( minIndirectCommandsBufferOffsetAlignment == rhs.minIndirectCommandsBufferOffsetAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV; - void * pNext = {}; - uint32_t maxGraphicsShaderGroupCount = {}; - uint32_t maxIndirectSequenceCount = {}; - uint32_t maxIndirectCommandsTokenCount = {}; - uint32_t maxIndirectCommandsStreamCount = {}; - uint32_t maxIndirectCommandsTokenOffset = {}; - uint32_t maxIndirectCommandsStreamStride = {}; - uint32_t minSequencesCountBufferOffsetAlignment = {}; - uint32_t minSequencesIndexBufferOffsetAlignment = {}; - uint32_t minIndirectCommandsBufferOffsetAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDeviceGeneratedCommandsPropertiesNV; - }; - - struct PhysicalDeviceDeviceMemoryReportFeaturesEXT - { - using NativeType = VkPhysicalDeviceDeviceMemoryReportFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceMemoryReportFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceMemoryReport( deviceMemoryReport_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceMemoryReportFeaturesEXT( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceMemoryReportFeaturesEXT( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDeviceMemoryReportFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDeviceMemoryReportFeaturesEXT & operator=( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDeviceMemoryReportFeaturesEXT & operator=( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceMemoryReportFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceMemoryReportFeaturesEXT & - setDeviceMemoryReport( VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport_ ) VULKAN_HPP_NOEXCEPT - { - deviceMemoryReport = deviceMemoryReport_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDeviceMemoryReportFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceMemoryReport ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMemoryReport == rhs.deviceMemoryReport ); -# endif - } - - bool operator!=( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDeviceMemoryReportFeaturesEXT; - }; - - struct PhysicalDeviceDiagnosticsConfigFeaturesNV - { - using NativeType = VkPhysicalDeviceDiagnosticsConfigFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDiagnosticsConfigFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , diagnosticsConfig( diagnosticsConfig_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDiagnosticsConfigFeaturesNV( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDiagnosticsConfigFeaturesNV( VkPhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDiagnosticsConfigFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDiagnosticsConfigFeaturesNV & operator=( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDiagnosticsConfigFeaturesNV & operator=( VkPhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDiagnosticsConfigFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDiagnosticsConfigFeaturesNV & - setDiagnosticsConfig( VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig_ ) VULKAN_HPP_NOEXCEPT - { - diagnosticsConfig = diagnosticsConfig_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDiagnosticsConfigFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDiagnosticsConfigFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, diagnosticsConfig ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDiagnosticsConfigFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( diagnosticsConfig == rhs.diagnosticsConfig ); -# endif - } - - bool operator!=( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDiagnosticsConfigFeaturesNV; - }; - - struct PhysicalDeviceDiscardRectanglePropertiesEXT - { - using NativeType = VkPhysicalDeviceDiscardRectanglePropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxDiscardRectangles( maxDiscardRectangles_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDiscardRectanglePropertiesEXT( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDiscardRectanglePropertiesEXT( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDiscardRectanglePropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDiscardRectanglePropertiesEXT & operator=( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDiscardRectanglePropertiesEXT & operator=( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDiscardRectanglePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDiscardRectanglePropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxDiscardRectangles ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDiscardRectanglePropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxDiscardRectangles == rhs.maxDiscardRectangles ); -# endif - } - - bool operator!=( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT; - void * pNext = {}; - uint32_t maxDiscardRectangles = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDiscardRectanglePropertiesEXT; - }; - - struct PhysicalDeviceDriverProperties - { - using NativeType = VkPhysicalDeviceDriverProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDriverProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDriverProperties( VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary, - std::array const & driverName_ = {}, - std::array const & driverInfo_ = {}, - VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , driverID( driverID_ ) - , driverName( driverName_ ) - , driverInfo( driverInfo_ ) - , conformanceVersion( conformanceVersion_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDriverProperties( PhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDriverProperties( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDriverProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDriverProperties & operator=( PhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDriverProperties & operator=( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDriverProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDriverProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ConformanceVersion const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, driverID, driverName, driverInfo, conformanceVersion ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDriverProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceDriverProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( driverID == rhs.driverID ) && ( driverName == rhs.driverName ) && - ( driverInfo == rhs.driverInfo ) && ( conformanceVersion == rhs.conformanceVersion ); -# endif - } - - bool operator!=( PhysicalDeviceDriverProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDriverProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverName = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverInfo = {}; - VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDriverProperties; - }; - using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; - - struct PhysicalDeviceDrmPropertiesEXT - { - using NativeType = VkPhysicalDeviceDrmPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDrmPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDrmPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 hasPrimary_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 hasRender_ = {}, - int64_t primaryMajor_ = {}, - int64_t primaryMinor_ = {}, - int64_t renderMajor_ = {}, - int64_t renderMinor_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , hasPrimary( hasPrimary_ ) - , hasRender( hasRender_ ) - , primaryMajor( primaryMajor_ ) - , primaryMinor( primaryMinor_ ) - , renderMajor( renderMajor_ ) - , renderMinor( renderMinor_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDrmPropertiesEXT( PhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDrmPropertiesEXT( VkPhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDrmPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDrmPropertiesEXT & operator=( PhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDrmPropertiesEXT & operator=( VkPhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceDrmPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDrmPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, hasPrimary, hasRender, primaryMajor, primaryMinor, renderMajor, renderMinor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDrmPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceDrmPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hasPrimary == rhs.hasPrimary ) && ( hasRender == rhs.hasRender ) && - ( primaryMajor == rhs.primaryMajor ) && ( primaryMinor == rhs.primaryMinor ) && ( renderMajor == rhs.renderMajor ) && - ( renderMinor == rhs.renderMinor ); -# endif - } - - bool operator!=( PhysicalDeviceDrmPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDrmPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 hasPrimary = {}; - VULKAN_HPP_NAMESPACE::Bool32 hasRender = {}; - int64_t primaryMajor = {}; - int64_t primaryMinor = {}; - int64_t renderMajor = {}; - int64_t renderMinor = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDrmPropertiesEXT; - }; - - struct PhysicalDeviceDynamicRenderingFeatures - { - using NativeType = VkPhysicalDeviceDynamicRenderingFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDynamicRenderingFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingFeatures( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dynamicRendering( dynamicRendering_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingFeatures( PhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDynamicRenderingFeatures( VkPhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceDynamicRenderingFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceDynamicRenderingFeatures & operator=( PhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceDynamicRenderingFeatures & operator=( VkPhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingFeatures & setDynamicRendering( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ ) VULKAN_HPP_NOEXCEPT - { - dynamicRendering = dynamicRendering_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceDynamicRenderingFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceDynamicRenderingFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dynamicRendering ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceDynamicRenderingFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceDynamicRenderingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicRendering == rhs.dynamicRendering ); -# endif - } - - bool operator!=( PhysicalDeviceDynamicRenderingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDynamicRenderingFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceDynamicRenderingFeatures; - }; - using PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; - - struct PhysicalDeviceExclusiveScissorFeaturesNV - { - using NativeType = VkPhysicalDeviceExclusiveScissorFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , exclusiveScissor( exclusiveScissor_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExclusiveScissorFeaturesNV( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExclusiveScissorFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExclusiveScissorFeaturesNV & operator=( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExclusiveScissorFeaturesNV & operator=( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExclusiveScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExclusiveScissorFeaturesNV & setExclusiveScissor( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ ) VULKAN_HPP_NOEXCEPT - { - exclusiveScissor = exclusiveScissor_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExclusiveScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExclusiveScissorFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, exclusiveScissor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExclusiveScissorFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exclusiveScissor == rhs.exclusiveScissor ); -# endif - } - - bool operator!=( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExclusiveScissorFeaturesNV; - }; - - struct PhysicalDeviceExtendedDynamicState2FeaturesEXT - { - using NativeType = VkPhysicalDeviceExtendedDynamicState2FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , extendedDynamicState2( extendedDynamicState2_ ) - , extendedDynamicState2LogicOp( extendedDynamicState2LogicOp_ ) - , extendedDynamicState2PatchControlPoints( extendedDynamicState2PatchControlPoints_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceExtendedDynamicState2FeaturesEXT( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExtendedDynamicState2FeaturesEXT( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExtendedDynamicState2FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExtendedDynamicState2FeaturesEXT & operator=( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExtendedDynamicState2FeaturesEXT & operator=( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & - setExtendedDynamicState2( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2_ ) VULKAN_HPP_NOEXCEPT - { - extendedDynamicState2 = extendedDynamicState2_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & - setExtendedDynamicState2LogicOp( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp_ ) VULKAN_HPP_NOEXCEPT - { - extendedDynamicState2LogicOp = extendedDynamicState2LogicOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & - setExtendedDynamicState2PatchControlPoints( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints_ ) VULKAN_HPP_NOEXCEPT - { - extendedDynamicState2PatchControlPoints = extendedDynamicState2PatchControlPoints_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExtendedDynamicState2FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, extendedDynamicState2, extendedDynamicState2LogicOp, extendedDynamicState2PatchControlPoints ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedDynamicState2 == rhs.extendedDynamicState2 ) && - ( extendedDynamicState2LogicOp == rhs.extendedDynamicState2LogicOp ) && - ( extendedDynamicState2PatchControlPoints == rhs.extendedDynamicState2PatchControlPoints ); -# endif - } - - bool operator!=( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2 = {}; - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp = {}; - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExtendedDynamicState2FeaturesEXT; - }; - - struct PhysicalDeviceExtendedDynamicStateFeaturesEXT - { - using NativeType = VkPhysicalDeviceExtendedDynamicStateFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicStateFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , extendedDynamicState( extendedDynamicState_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceExtendedDynamicStateFeaturesEXT( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExtendedDynamicStateFeaturesEXT( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExtendedDynamicStateFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExtendedDynamicStateFeaturesEXT & operator=( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExtendedDynamicStateFeaturesEXT & operator=( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicStateFeaturesEXT & - setExtendedDynamicState( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState_ ) VULKAN_HPP_NOEXCEPT - { - extendedDynamicState = extendedDynamicState_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExtendedDynamicStateFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, extendedDynamicState ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedDynamicState == rhs.extendedDynamicState ); -# endif - } - - bool operator!=( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExtendedDynamicStateFeaturesEXT; - }; - - struct PhysicalDeviceExternalBufferInfo - { - using NativeType = VkPhysicalDeviceExternalBufferInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalBufferInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( - VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {}, - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , usage( usage_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( PhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalBufferInfo( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalBufferInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalBufferInfo & operator=( PhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalBufferInfo & operator=( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExternalBufferInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalBufferInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, usage, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalBufferInfo const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( usage == rhs.usage ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( PhysicalDeviceExternalBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::BufferCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::BufferUsageFlags usage = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalBufferInfo; - }; - using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; - - struct PhysicalDeviceExternalFenceInfo - { - using NativeType = VkPhysicalDeviceExternalFenceInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalFenceInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( PhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalFenceInfo( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalFenceInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalFenceInfo & operator=( PhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalFenceInfo & operator=( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFenceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFenceInfo & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExternalFenceInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalFenceInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalFenceInfo const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalFenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( PhysicalDeviceExternalFenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalFenceInfo; - }; - using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; - - struct PhysicalDeviceExternalImageFormatInfo - { - using NativeType = VkPhysicalDeviceExternalImageFormatInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalImageFormatInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( PhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalImageFormatInfo( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalImageFormatInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalImageFormatInfo & operator=( PhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalImageFormatInfo & operator=( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalImageFormatInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalImageFormatInfo & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExternalImageFormatInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalImageFormatInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalImageFormatInfo const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalImageFormatInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( PhysicalDeviceExternalImageFormatInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalImageFormatInfo; - }; - using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; - - struct PhysicalDeviceExternalMemoryHostPropertiesEXT - { - using NativeType = VkPhysicalDeviceExternalMemoryHostPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryHostPropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minImportedHostPointerAlignment( minImportedHostPointerAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceExternalMemoryHostPropertiesEXT( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalMemoryHostPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalMemoryHostPropertiesEXT & operator=( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalMemoryHostPropertiesEXT & operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minImportedHostPointerAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalMemoryHostPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minImportedHostPointerAlignment == rhs.minImportedHostPointerAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalMemoryHostPropertiesEXT; - }; - - struct PhysicalDeviceExternalMemoryRDMAFeaturesNV - { - using NativeType = VkPhysicalDeviceExternalMemoryRDMAFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , externalMemoryRDMA( externalMemoryRDMA_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalMemoryRDMAFeaturesNV( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalMemoryRDMAFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalMemoryRDMAFeaturesNV & operator=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalMemoryRDMAFeaturesNV & operator=( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryRDMAFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryRDMAFeaturesNV & - setExternalMemoryRDMA( VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ ) VULKAN_HPP_NOEXCEPT - { - externalMemoryRDMA = externalMemoryRDMA_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, externalMemoryRDMA ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryRDMA == rhs.externalMemoryRDMA ); -# endif - } - - bool operator!=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalMemoryRDMAFeaturesNV; - }; - - struct PhysicalDeviceExternalSemaphoreInfo - { - using NativeType = VkPhysicalDeviceExternalSemaphoreInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalSemaphoreInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( PhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalSemaphoreInfo( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceExternalSemaphoreInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceExternalSemaphoreInfo & operator=( PhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceExternalSemaphoreInfo & operator=( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalSemaphoreInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalSemaphoreInfo & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceExternalSemaphoreInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceExternalSemaphoreInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceExternalSemaphoreInfo const & ) const = default; -#else - bool operator==( PhysicalDeviceExternalSemaphoreInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( PhysicalDeviceExternalSemaphoreInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceExternalSemaphoreInfo; - }; - using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; - - struct PhysicalDeviceFeatures2 - { - using NativeType = VkPhysicalDeviceFeatures2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFeatures2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , features( features_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( PhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFeatures2( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFeatures2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFeatures2 & operator=( PhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFeatures2 & operator=( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures2 & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures2 & setFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures const & features_ ) VULKAN_HPP_NOEXCEPT - { - features = features_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFeatures2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFeatures2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, features ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFeatures2 const & ) const = default; -#else - bool operator==( PhysicalDeviceFeatures2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( features == rhs.features ); -# endif - } - - bool operator!=( PhysicalDeviceFeatures2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFeatures2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFeatures2; - }; - using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; - - struct PhysicalDeviceFloatControlsProperties - { - using NativeType = VkPhysicalDeviceFloatControlsProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFloatControlsProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFloatControlsProperties( - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , denormBehaviorIndependence( denormBehaviorIndependence_ ) - , roundingModeIndependence( roundingModeIndependence_ ) - , shaderSignedZeroInfNanPreserveFloat16( shaderSignedZeroInfNanPreserveFloat16_ ) - , shaderSignedZeroInfNanPreserveFloat32( shaderSignedZeroInfNanPreserveFloat32_ ) - , shaderSignedZeroInfNanPreserveFloat64( shaderSignedZeroInfNanPreserveFloat64_ ) - , shaderDenormPreserveFloat16( shaderDenormPreserveFloat16_ ) - , shaderDenormPreserveFloat32( shaderDenormPreserveFloat32_ ) - , shaderDenormPreserveFloat64( shaderDenormPreserveFloat64_ ) - , shaderDenormFlushToZeroFloat16( shaderDenormFlushToZeroFloat16_ ) - , shaderDenormFlushToZeroFloat32( shaderDenormFlushToZeroFloat32_ ) - , shaderDenormFlushToZeroFloat64( shaderDenormFlushToZeroFloat64_ ) - , shaderRoundingModeRTEFloat16( shaderRoundingModeRTEFloat16_ ) - , shaderRoundingModeRTEFloat32( shaderRoundingModeRTEFloat32_ ) - , shaderRoundingModeRTEFloat64( shaderRoundingModeRTEFloat64_ ) - , shaderRoundingModeRTZFloat16( shaderRoundingModeRTZFloat16_ ) - , shaderRoundingModeRTZFloat32( shaderRoundingModeRTZFloat32_ ) - , shaderRoundingModeRTZFloat64( shaderRoundingModeRTZFloat64_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFloatControlsProperties( PhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFloatControlsProperties( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFloatControlsProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFloatControlsProperties & operator=( PhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFloatControlsProperties & operator=( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFloatControlsProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFloatControlsProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - denormBehaviorIndependence, - roundingModeIndependence, - shaderSignedZeroInfNanPreserveFloat16, - shaderSignedZeroInfNanPreserveFloat32, - shaderSignedZeroInfNanPreserveFloat64, - shaderDenormPreserveFloat16, - shaderDenormPreserveFloat32, - shaderDenormPreserveFloat64, - shaderDenormFlushToZeroFloat16, - shaderDenormFlushToZeroFloat32, - shaderDenormFlushToZeroFloat64, - shaderRoundingModeRTEFloat16, - shaderRoundingModeRTEFloat32, - shaderRoundingModeRTEFloat64, - shaderRoundingModeRTZFloat16, - shaderRoundingModeRTZFloat32, - shaderRoundingModeRTZFloat64 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFloatControlsProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceFloatControlsProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( denormBehaviorIndependence == rhs.denormBehaviorIndependence ) && - ( roundingModeIndependence == rhs.roundingModeIndependence ) && - ( shaderSignedZeroInfNanPreserveFloat16 == rhs.shaderSignedZeroInfNanPreserveFloat16 ) && - ( shaderSignedZeroInfNanPreserveFloat32 == rhs.shaderSignedZeroInfNanPreserveFloat32 ) && - ( shaderSignedZeroInfNanPreserveFloat64 == rhs.shaderSignedZeroInfNanPreserveFloat64 ) && - ( shaderDenormPreserveFloat16 == rhs.shaderDenormPreserveFloat16 ) && ( shaderDenormPreserveFloat32 == rhs.shaderDenormPreserveFloat32 ) && - ( shaderDenormPreserveFloat64 == rhs.shaderDenormPreserveFloat64 ) && ( shaderDenormFlushToZeroFloat16 == rhs.shaderDenormFlushToZeroFloat16 ) && - ( shaderDenormFlushToZeroFloat32 == rhs.shaderDenormFlushToZeroFloat32 ) && - ( shaderDenormFlushToZeroFloat64 == rhs.shaderDenormFlushToZeroFloat64 ) && ( shaderRoundingModeRTEFloat16 == rhs.shaderRoundingModeRTEFloat16 ) && - ( shaderRoundingModeRTEFloat32 == rhs.shaderRoundingModeRTEFloat32 ) && ( shaderRoundingModeRTEFloat64 == rhs.shaderRoundingModeRTEFloat64 ) && - ( shaderRoundingModeRTZFloat16 == rhs.shaderRoundingModeRTZFloat16 ) && ( shaderRoundingModeRTZFloat32 == rhs.shaderRoundingModeRTZFloat32 ) && - ( shaderRoundingModeRTZFloat64 == rhs.shaderRoundingModeRTZFloat64 ); -# endif - } - - bool operator!=( PhysicalDeviceFloatControlsProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFloatControlsProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFloatControlsProperties; - }; - using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; - - struct PhysicalDeviceFragmentDensityMap2FeaturesEXT - { - using NativeType = VkPhysicalDeviceFragmentDensityMap2FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityMapDeferred( fragmentDensityMapDeferred_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2FeaturesEXT( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMap2FeaturesEXT( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMap2FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMap2FeaturesEXT & operator=( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMap2FeaturesEXT & operator=( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMap2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMap2FeaturesEXT & - setFragmentDensityMapDeferred( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMapDeferred = fragmentDensityMapDeferred_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMap2FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityMapDeferred ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapDeferred == rhs.fragmentDensityMapDeferred ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMap2FeaturesEXT; - }; - - struct PhysicalDeviceFragmentDensityMap2PropertiesEXT - { - using NativeType = VkPhysicalDeviceFragmentDensityMap2PropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2PropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 subsampledLoads_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 subsampledCoarseReconstructionEarlyAccess_ = {}, - uint32_t maxSubsampledArrayLayers_ = {}, - uint32_t maxDescriptorSetSubsampledSamplers_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subsampledLoads( subsampledLoads_ ) - , subsampledCoarseReconstructionEarlyAccess( subsampledCoarseReconstructionEarlyAccess_ ) - , maxSubsampledArrayLayers( maxSubsampledArrayLayers_ ) - , maxDescriptorSetSubsampledSamplers( maxDescriptorSetSubsampledSamplers_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentDensityMap2PropertiesEXT( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMap2PropertiesEXT( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMap2PropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMap2PropertiesEXT & operator=( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMap2PropertiesEXT & operator=( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMap2PropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subsampledLoads, subsampledCoarseReconstructionEarlyAccess, maxSubsampledArrayLayers, maxDescriptorSetSubsampledSamplers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subsampledLoads == rhs.subsampledLoads ) && - ( subsampledCoarseReconstructionEarlyAccess == rhs.subsampledCoarseReconstructionEarlyAccess ) && - ( maxSubsampledArrayLayers == rhs.maxSubsampledArrayLayers ) && ( maxDescriptorSetSubsampledSamplers == rhs.maxDescriptorSetSubsampledSamplers ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 subsampledLoads = {}; - VULKAN_HPP_NAMESPACE::Bool32 subsampledCoarseReconstructionEarlyAccess = {}; - uint32_t maxSubsampledArrayLayers = {}; - uint32_t maxDescriptorSetSubsampledSamplers = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMap2PropertiesEXT; - }; - - struct PhysicalDeviceFragmentDensityMapFeaturesEXT - { - using NativeType = VkPhysicalDeviceFragmentDensityMapFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityMap( fragmentDensityMap_ ) - , fragmentDensityMapDynamic( fragmentDensityMapDynamic_ ) - , fragmentDensityMapNonSubsampledImages( fragmentDensityMapNonSubsampledImages_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapFeaturesEXT( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapFeaturesEXT( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMapFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMapFeaturesEXT & operator=( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapFeaturesEXT & operator=( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & - setFragmentDensityMap( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMap = fragmentDensityMap_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & - setFragmentDensityMapDynamic( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMapDynamic = fragmentDensityMapDynamic_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & - setFragmentDensityMapNonSubsampledImages( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMapNonSubsampledImages = fragmentDensityMapNonSubsampledImages_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentDensityMapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMapFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityMap, fragmentDensityMapDynamic, fragmentDensityMapNonSubsampledImages ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMapFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMap == rhs.fragmentDensityMap ) && - ( fragmentDensityMapDynamic == rhs.fragmentDensityMapDynamic ) && - ( fragmentDensityMapNonSubsampledImages == rhs.fragmentDensityMapNonSubsampledImages ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMapFeaturesEXT; - }; - - struct PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM - { - using NativeType = VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityMapOffset( fragmentDensityMapOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & - operator=( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & operator=( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & - setFragmentDensityMapOffset( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMapOffset = fragmentDensityMapOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityMapOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapOffset == rhs.fragmentDensityMapOffset ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; - }; - - struct PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM - { - using NativeType = VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( VULKAN_HPP_NAMESPACE::Extent2D fragmentDensityOffsetGranularity_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityOffsetGranularity( fragmentDensityOffsetGranularity_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM & - operator=( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM & operator=( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityOffsetGranularity ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityOffsetGranularity == rhs.fragmentDensityOffsetGranularity ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D fragmentDensityOffsetGranularity = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; - }; - - struct PhysicalDeviceFragmentDensityMapPropertiesEXT - { - using NativeType = VkPhysicalDeviceFragmentDensityMapPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapPropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minFragmentDensityTexelSize( minFragmentDensityTexelSize_ ) - , maxFragmentDensityTexelSize( maxFragmentDensityTexelSize_ ) - , fragmentDensityInvocations( fragmentDensityInvocations_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentDensityMapPropertiesEXT( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapPropertiesEXT( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentDensityMapPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentDensityMapPropertiesEXT & operator=( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentDensityMapPropertiesEXT & operator=( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentDensityMapPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentDensityMapPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minFragmentDensityTexelSize, maxFragmentDensityTexelSize, fragmentDensityInvocations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentDensityMapPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minFragmentDensityTexelSize == rhs.minFragmentDensityTexelSize ) && - ( maxFragmentDensityTexelSize == rhs.maxFragmentDensityTexelSize ) && ( fragmentDensityInvocations == rhs.fragmentDensityInvocations ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentDensityMapPropertiesEXT; - }; - - struct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR - { - using NativeType = VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentShaderBarycentric( fragmentShaderBarycentric_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & - operator=( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & operator=( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & - setFragmentShaderBarycentric( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ ) VULKAN_HPP_NOEXCEPT - { - fragmentShaderBarycentric = fragmentShaderBarycentric_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentShaderBarycentric ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShaderBarycentric == rhs.fragmentShaderBarycentric ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - }; - using PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - - struct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR - { - using NativeType = VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 triStripVertexOrderIndependentOfProvokingVertex_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , triStripVertexOrderIndependentOfProvokingVertex( triStripVertexOrderIndependentOfProvokingVertex_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShaderBarycentricPropertiesKHR & - operator=( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderBarycentricPropertiesKHR & operator=( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, triStripVertexOrderIndependentOfProvokingVertex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && - ( triStripVertexOrderIndependentOfProvokingVertex == rhs.triStripVertexOrderIndependentOfProvokingVertex ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 triStripVertexOrderIndependentOfProvokingVertex = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShaderBarycentricPropertiesKHR; - }; - - struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT - { - using NativeType = VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentShaderSampleInterlock( fragmentShaderSampleInterlock_ ) - , fragmentShaderPixelInterlock( fragmentShaderPixelInterlock_ ) - , fragmentShaderShadingRateInterlock( fragmentShaderShadingRateInterlock_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShaderInterlockFeaturesEXT( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShaderInterlockFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShaderInterlockFeaturesEXT & operator=( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShaderInterlockFeaturesEXT & operator=( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & - setFragmentShaderSampleInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ ) VULKAN_HPP_NOEXCEPT - { - fragmentShaderSampleInterlock = fragmentShaderSampleInterlock_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & - setFragmentShaderPixelInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ ) VULKAN_HPP_NOEXCEPT - { - fragmentShaderPixelInterlock = fragmentShaderPixelInterlock_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & - setFragmentShaderShadingRateInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ ) VULKAN_HPP_NOEXCEPT - { - fragmentShaderShadingRateInterlock = fragmentShaderShadingRateInterlock_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentShaderSampleInterlock, fragmentShaderPixelInterlock, fragmentShaderShadingRateInterlock ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShaderSampleInterlock == rhs.fragmentShaderSampleInterlock ) && - ( fragmentShaderPixelInterlock == rhs.fragmentShaderPixelInterlock ) && - ( fragmentShaderShadingRateInterlock == rhs.fragmentShaderShadingRateInterlock ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShaderInterlockFeaturesEXT; - }; - - struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV - { - using NativeType = VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentShadingRateEnums( fragmentShadingRateEnums_ ) - , supersampleFragmentShadingRates( supersampleFragmentShadingRates_ ) - , noInvocationFragmentShadingRates( noInvocationFragmentShadingRates_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & operator=( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & operator=( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & - setFragmentShadingRateEnums( VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums_ ) VULKAN_HPP_NOEXCEPT - { - fragmentShadingRateEnums = fragmentShadingRateEnums_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & - setSupersampleFragmentShadingRates( VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates_ ) VULKAN_HPP_NOEXCEPT - { - supersampleFragmentShadingRates = supersampleFragmentShadingRates_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & - setNoInvocationFragmentShadingRates( VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates_ ) VULKAN_HPP_NOEXCEPT - { - noInvocationFragmentShadingRates = noInvocationFragmentShadingRates_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentShadingRateEnums, supersampleFragmentShadingRates, noInvocationFragmentShadingRates ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShadingRateEnums == rhs.fragmentShadingRateEnums ) && - ( supersampleFragmentShadingRates == rhs.supersampleFragmentShadingRates ) && - ( noInvocationFragmentShadingRates == rhs.noInvocationFragmentShadingRates ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums = {}; - VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates = {}; - VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShadingRateEnumsFeaturesNV; - }; - - struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV - { - using NativeType = VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( - VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxFragmentShadingRateInvocationCount( maxFragmentShadingRateInvocationCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & - operator=( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & operator=( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & - setMaxFragmentShadingRateInvocationCount( VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount_ ) VULKAN_HPP_NOEXCEPT - { - maxFragmentShadingRateInvocationCount = maxFragmentShadingRateInvocationCount_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxFragmentShadingRateInvocationCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxFragmentShadingRateInvocationCount == rhs.maxFragmentShadingRateInvocationCount ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShadingRateEnumsPropertiesNV; - }; - - struct PhysicalDeviceFragmentShadingRateFeaturesKHR - { - using NativeType = VkPhysicalDeviceFragmentShadingRateFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineFragmentShadingRate( pipelineFragmentShadingRate_ ) - , primitiveFragmentShadingRate( primitiveFragmentShadingRate_ ) - , attachmentFragmentShadingRate( attachmentFragmentShadingRate_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateFeaturesKHR( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateFeaturesKHR( VkPhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShadingRateFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShadingRateFeaturesKHR & operator=( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateFeaturesKHR & operator=( VkPhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & - setPipelineFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT - { - pipelineFragmentShadingRate = pipelineFragmentShadingRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & - setPrimitiveFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT - { - primitiveFragmentShadingRate = primitiveFragmentShadingRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & - setAttachmentFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT - { - attachmentFragmentShadingRate = attachmentFragmentShadingRate_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceFragmentShadingRateFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShadingRateFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineFragmentShadingRate, primitiveFragmentShadingRate, attachmentFragmentShadingRate ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShadingRateFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineFragmentShadingRate == rhs.pipelineFragmentShadingRate ) && - ( primitiveFragmentShadingRate == rhs.primitiveFragmentShadingRate ) && ( attachmentFragmentShadingRate == rhs.attachmentFragmentShadingRate ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate = {}; - VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShadingRateFeaturesKHR; - }; - - struct PhysicalDeviceFragmentShadingRateKHR - { - using NativeType = VkPhysicalDeviceFragmentShadingRateKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateKHR( VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D fragmentSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sampleCounts( sampleCounts_ ) - , fragmentSize( fragmentSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateKHR( PhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateKHR( VkPhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShadingRateKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShadingRateKHR & operator=( PhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRateKHR & operator=( VkPhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentShadingRateKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShadingRateKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, sampleCounts, fragmentSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShadingRateKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShadingRateKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleCounts == rhs.sampleCounts ) && ( fragmentSize == rhs.fragmentSize ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShadingRateKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts = {}; - VULKAN_HPP_NAMESPACE::Extent2D fragmentSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShadingRateKHR; - }; - - struct PhysicalDeviceFragmentShadingRatePropertiesKHR - { - using NativeType = VkPhysicalDeviceFragmentShadingRatePropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRatePropertiesKHR( - VULKAN_HPP_NAMESPACE::Extent2D minFragmentShadingRateAttachmentTexelSize_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentShadingRateAttachmentTexelSize_ = {}, - uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateWithMultipleViewports_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 layeredShadingRateAttachments_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateNonTrivialCombinerOps_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentSize_ = {}, - uint32_t maxFragmentSizeAspectRatio_ = {}, - uint32_t maxFragmentShadingRateCoverageSamples_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateRasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderDepthStencilWrites_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithSampleMask_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderSampleMask_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithConservativeRasterization_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithFragmentShaderInterlock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithCustomSampleLocations_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateStrictMultiplyCombiner_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minFragmentShadingRateAttachmentTexelSize( minFragmentShadingRateAttachmentTexelSize_ ) - , maxFragmentShadingRateAttachmentTexelSize( maxFragmentShadingRateAttachmentTexelSize_ ) - , maxFragmentShadingRateAttachmentTexelSizeAspectRatio( maxFragmentShadingRateAttachmentTexelSizeAspectRatio_ ) - , primitiveFragmentShadingRateWithMultipleViewports( primitiveFragmentShadingRateWithMultipleViewports_ ) - , layeredShadingRateAttachments( layeredShadingRateAttachments_ ) - , fragmentShadingRateNonTrivialCombinerOps( fragmentShadingRateNonTrivialCombinerOps_ ) - , maxFragmentSize( maxFragmentSize_ ) - , maxFragmentSizeAspectRatio( maxFragmentSizeAspectRatio_ ) - , maxFragmentShadingRateCoverageSamples( maxFragmentShadingRateCoverageSamples_ ) - , maxFragmentShadingRateRasterizationSamples( maxFragmentShadingRateRasterizationSamples_ ) - , fragmentShadingRateWithShaderDepthStencilWrites( fragmentShadingRateWithShaderDepthStencilWrites_ ) - , fragmentShadingRateWithSampleMask( fragmentShadingRateWithSampleMask_ ) - , fragmentShadingRateWithShaderSampleMask( fragmentShadingRateWithShaderSampleMask_ ) - , fragmentShadingRateWithConservativeRasterization( fragmentShadingRateWithConservativeRasterization_ ) - , fragmentShadingRateWithFragmentShaderInterlock( fragmentShadingRateWithFragmentShaderInterlock_ ) - , fragmentShadingRateWithCustomSampleLocations( fragmentShadingRateWithCustomSampleLocations_ ) - , fragmentShadingRateStrictMultiplyCombiner( fragmentShadingRateStrictMultiplyCombiner_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceFragmentShadingRatePropertiesKHR( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRatePropertiesKHR( VkPhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceFragmentShadingRatePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceFragmentShadingRatePropertiesKHR & operator=( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceFragmentShadingRatePropertiesKHR & operator=( VkPhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceFragmentShadingRatePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceFragmentShadingRatePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - minFragmentShadingRateAttachmentTexelSize, - maxFragmentShadingRateAttachmentTexelSize, - maxFragmentShadingRateAttachmentTexelSizeAspectRatio, - primitiveFragmentShadingRateWithMultipleViewports, - layeredShadingRateAttachments, - fragmentShadingRateNonTrivialCombinerOps, - maxFragmentSize, - maxFragmentSizeAspectRatio, - maxFragmentShadingRateCoverageSamples, - maxFragmentShadingRateRasterizationSamples, - fragmentShadingRateWithShaderDepthStencilWrites, - fragmentShadingRateWithSampleMask, - fragmentShadingRateWithShaderSampleMask, - fragmentShadingRateWithConservativeRasterization, - fragmentShadingRateWithFragmentShaderInterlock, - fragmentShadingRateWithCustomSampleLocations, - fragmentShadingRateStrictMultiplyCombiner ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceFragmentShadingRatePropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && - ( minFragmentShadingRateAttachmentTexelSize == rhs.minFragmentShadingRateAttachmentTexelSize ) && - ( maxFragmentShadingRateAttachmentTexelSize == rhs.maxFragmentShadingRateAttachmentTexelSize ) && - ( maxFragmentShadingRateAttachmentTexelSizeAspectRatio == rhs.maxFragmentShadingRateAttachmentTexelSizeAspectRatio ) && - ( primitiveFragmentShadingRateWithMultipleViewports == rhs.primitiveFragmentShadingRateWithMultipleViewports ) && - ( layeredShadingRateAttachments == rhs.layeredShadingRateAttachments ) && - ( fragmentShadingRateNonTrivialCombinerOps == rhs.fragmentShadingRateNonTrivialCombinerOps ) && ( maxFragmentSize == rhs.maxFragmentSize ) && - ( maxFragmentSizeAspectRatio == rhs.maxFragmentSizeAspectRatio ) && - ( maxFragmentShadingRateCoverageSamples == rhs.maxFragmentShadingRateCoverageSamples ) && - ( maxFragmentShadingRateRasterizationSamples == rhs.maxFragmentShadingRateRasterizationSamples ) && - ( fragmentShadingRateWithShaderDepthStencilWrites == rhs.fragmentShadingRateWithShaderDepthStencilWrites ) && - ( fragmentShadingRateWithSampleMask == rhs.fragmentShadingRateWithSampleMask ) && - ( fragmentShadingRateWithShaderSampleMask == rhs.fragmentShadingRateWithShaderSampleMask ) && - ( fragmentShadingRateWithConservativeRasterization == rhs.fragmentShadingRateWithConservativeRasterization ) && - ( fragmentShadingRateWithFragmentShaderInterlock == rhs.fragmentShadingRateWithFragmentShaderInterlock ) && - ( fragmentShadingRateWithCustomSampleLocations == rhs.fragmentShadingRateWithCustomSampleLocations ) && - ( fragmentShadingRateStrictMultiplyCombiner == rhs.fragmentShadingRateStrictMultiplyCombiner ); -# endif - } - - bool operator!=( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D minFragmentShadingRateAttachmentTexelSize = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentShadingRateAttachmentTexelSize = {}; - uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateWithMultipleViewports = {}; - VULKAN_HPP_NAMESPACE::Bool32 layeredShadingRateAttachments = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateNonTrivialCombinerOps = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxFragmentSize = {}; - uint32_t maxFragmentSizeAspectRatio = {}; - uint32_t maxFragmentShadingRateCoverageSamples = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateRasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderDepthStencilWrites = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithSampleMask = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderSampleMask = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithConservativeRasterization = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithFragmentShaderInterlock = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithCustomSampleLocations = {}; - VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateStrictMultiplyCombiner = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceFragmentShadingRatePropertiesKHR; - }; - - struct PhysicalDeviceGlobalPriorityQueryFeaturesKHR - { - using NativeType = VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGlobalPriorityQueryFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceGlobalPriorityQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , globalPriorityQuery( globalPriorityQuery_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceGlobalPriorityQueryFeaturesKHR( PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGlobalPriorityQueryFeaturesKHR( VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceGlobalPriorityQueryFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceGlobalPriorityQueryFeaturesKHR & operator=( PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGlobalPriorityQueryFeaturesKHR & operator=( VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGlobalPriorityQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGlobalPriorityQueryFeaturesKHR & - setGlobalPriorityQuery( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ ) VULKAN_HPP_NOEXCEPT - { - globalPriorityQuery = globalPriorityQuery_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, globalPriorityQuery ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( globalPriorityQuery == rhs.globalPriorityQuery ); -# endif - } - - bool operator!=( PhysicalDeviceGlobalPriorityQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGlobalPriorityQueryFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceGlobalPriorityQueryFeaturesKHR; - }; - using PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeaturesKHR; - - struct PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT - { - using NativeType = VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , graphicsPipelineLibrary( graphicsPipelineLibrary_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & operator=( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & operator=( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & - setGraphicsPipelineLibrary( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary_ ) VULKAN_HPP_NOEXCEPT - { - graphicsPipelineLibrary = graphicsPipelineLibrary_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, graphicsPipelineLibrary ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( graphicsPipelineLibrary == rhs.graphicsPipelineLibrary ); -# endif - } - - bool operator!=( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; - }; - - struct PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT - { - using NativeType = VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , graphicsPipelineLibraryFastLinking( graphicsPipelineLibraryFastLinking_ ) - , graphicsPipelineLibraryIndependentInterpolationDecoration( graphicsPipelineLibraryIndependentInterpolationDecoration_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & - operator=( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & operator=( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & - setGraphicsPipelineLibraryFastLinking( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking_ ) VULKAN_HPP_NOEXCEPT - { - graphicsPipelineLibraryFastLinking = graphicsPipelineLibraryFastLinking_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & setGraphicsPipelineLibraryIndependentInterpolationDecoration( - VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration_ ) VULKAN_HPP_NOEXCEPT - { - graphicsPipelineLibraryIndependentInterpolationDecoration = graphicsPipelineLibraryIndependentInterpolationDecoration_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, graphicsPipelineLibraryFastLinking, graphicsPipelineLibraryIndependentInterpolationDecoration ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( graphicsPipelineLibraryFastLinking == rhs.graphicsPipelineLibraryFastLinking ) && - ( graphicsPipelineLibraryIndependentInterpolationDecoration == rhs.graphicsPipelineLibraryIndependentInterpolationDecoration ); -# endif - } - - bool operator!=( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking = {}; - VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; - }; - - struct PhysicalDeviceGroupProperties - { - using NativeType = VkPhysicalDeviceGroupProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGroupProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PhysicalDeviceGroupProperties( uint32_t physicalDeviceCount_ = {}, - std::array const & physicalDevices_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , physicalDeviceCount( physicalDeviceCount_ ) - , physicalDevices( physicalDevices_ ) - , subsetAllocation( subsetAllocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGroupProperties( PhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGroupProperties( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceGroupProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceGroupProperties & operator=( PhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceGroupProperties & operator=( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceGroupProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceGroupProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::Bool32 const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, physicalDeviceCount, physicalDevices, subsetAllocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceGroupProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceGroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( physicalDeviceCount == rhs.physicalDeviceCount ) && - ( physicalDevices == rhs.physicalDevices ) && ( subsetAllocation == rhs.subsetAllocation ); -# endif - } - - bool operator!=( PhysicalDeviceGroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGroupProperties; - void * pNext = {}; - uint32_t physicalDeviceCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D physicalDevices = {}; - VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceGroupProperties; - }; - using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; - - struct PhysicalDeviceHostQueryResetFeatures - { - using NativeType = VkPhysicalDeviceHostQueryResetFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceHostQueryResetFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeatures( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , hostQueryReset( hostQueryReset_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeatures( PhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceHostQueryResetFeatures( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceHostQueryResetFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceHostQueryResetFeatures & operator=( PhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceHostQueryResetFeatures & operator=( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostQueryResetFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostQueryResetFeatures & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT - { - hostQueryReset = hostQueryReset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceHostQueryResetFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceHostQueryResetFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, hostQueryReset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceHostQueryResetFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceHostQueryResetFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hostQueryReset == rhs.hostQueryReset ); -# endif - } - - bool operator!=( PhysicalDeviceHostQueryResetFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHostQueryResetFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceHostQueryResetFeatures; - }; - using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; - - struct PhysicalDeviceIDProperties - { - using NativeType = VkPhysicalDeviceIDProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceIdProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIDProperties( std::array const & deviceUUID_ = {}, - std::array const & driverUUID_ = {}, - std::array const & deviceLUID_ = {}, - uint32_t deviceNodeMask_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceUUID( deviceUUID_ ) - , driverUUID( driverUUID_ ) - , deviceLUID( deviceLUID_ ) - , deviceNodeMask( deviceNodeMask_ ) - , deviceLUIDValid( deviceLUIDValid_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIDProperties( PhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceIDProperties( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceIDProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceIDProperties & operator=( PhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceIDProperties & operator=( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceIDProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceIDProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, deviceUUID, driverUUID, deviceLUID, deviceNodeMask, deviceLUIDValid ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceIDProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceIDProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceUUID == rhs.deviceUUID ) && ( driverUUID == rhs.driverUUID ) && - ( deviceLUID == rhs.deviceLUID ) && ( deviceNodeMask == rhs.deviceNodeMask ) && ( deviceLUIDValid == rhs.deviceLUIDValid ); -# endif - } - - bool operator!=( PhysicalDeviceIDProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIdProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceUUID = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverUUID = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceLUID = {}; - uint32_t deviceNodeMask = {}; - VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceIDProperties; - }; - using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; - - struct PhysicalDeviceImage2DViewOf3DFeaturesEXT - { - using NativeType = VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImage2DViewOf3DFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , image2DViewOf3D( image2DViewOf3D_ ) - , sampler2DViewOf3D( sampler2DViewOf3D_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImage2DViewOf3DFeaturesEXT( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImage2DViewOf3DFeaturesEXT( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImage2DViewOf3DFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImage2DViewOf3DFeaturesEXT & operator=( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImage2DViewOf3DFeaturesEXT & operator=( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & setImage2DViewOf3D( VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D_ ) VULKAN_HPP_NOEXCEPT - { - image2DViewOf3D = image2DViewOf3D_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & - setSampler2DViewOf3D( VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D_ ) VULKAN_HPP_NOEXCEPT - { - sampler2DViewOf3D = sampler2DViewOf3D_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImage2DViewOf3DFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, image2DViewOf3D, sampler2DViewOf3D ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image2DViewOf3D == rhs.image2DViewOf3D ) && ( sampler2DViewOf3D == rhs.sampler2DViewOf3D ); -# endif - } - - bool operator!=( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D = {}; - VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImage2DViewOf3DFeaturesEXT; - }; - - struct PhysicalDeviceImageCompressionControlFeaturesEXT - { - using NativeType = VkPhysicalDeviceImageCompressionControlFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageCompressionControl( imageCompressionControl_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceImageCompressionControlFeaturesEXT( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageCompressionControlFeaturesEXT( VkPhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageCompressionControlFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageCompressionControlFeaturesEXT & operator=( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageCompressionControlFeaturesEXT & operator=( VkPhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlFeaturesEXT & - setImageCompressionControl( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl_ ) VULKAN_HPP_NOEXCEPT - { - imageCompressionControl = imageCompressionControl_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageCompressionControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageCompressionControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageCompressionControl ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageCompressionControlFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionControl == rhs.imageCompressionControl ); -# endif - } - - bool operator!=( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageCompressionControlFeaturesEXT; - }; - - struct PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT - { - using NativeType = VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageCompressionControlSwapchain( imageCompressionControlSwapchain_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( - *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & - operator=( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & - operator=( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & - setImageCompressionControlSwapchain( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain_ ) VULKAN_HPP_NOEXCEPT - { - imageCompressionControlSwapchain = imageCompressionControlSwapchain_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageCompressionControlSwapchain ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionControlSwapchain == rhs.imageCompressionControlSwapchain ); -# endif - } - - bool operator!=( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; - }; - - struct PhysicalDeviceImageDrmFormatModifierInfoEXT - { - using NativeType = VkPhysicalDeviceImageDrmFormatModifierInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = {}, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, - uint32_t queueFamilyIndexCount_ = {}, - const uint32_t * pQueueFamilyIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , drmFormatModifier( drmFormatModifier_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( queueFamilyIndexCount_ ) - , pQueueFamilyIndices( pQueueFamilyIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageDrmFormatModifierInfoEXT( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageDrmFormatModifierInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_, - VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , drmFormatModifier( drmFormatModifier_ ) - , sharingMode( sharingMode_ ) - , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) - , pQueueFamilyIndices( queueFamilyIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setDrmFormatModifier( uint64_t drmFormatModifier_ ) VULKAN_HPP_NOEXCEPT - { - drmFormatModifier = drmFormatModifier_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT - { - sharingMode = sharingMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = queueFamilyIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - pQueueFamilyIndices = pQueueFamilyIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PhysicalDeviceImageDrmFormatModifierInfoEXT & - setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); - pQueueFamilyIndices = queueFamilyIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, drmFormatModifier, sharingMode, queueFamilyIndexCount, pQueueFamilyIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageDrmFormatModifierInfoEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ) && ( sharingMode == rhs.sharingMode ) && - ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ); -# endif - } - - bool operator!=( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT; - const void * pNext = {}; - uint64_t drmFormatModifier = {}; - VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; - uint32_t queueFamilyIndexCount = {}; - const uint32_t * pQueueFamilyIndices = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageDrmFormatModifierInfoEXT; - }; - - struct PhysicalDeviceImageFormatInfo2 - { - using NativeType = VkPhysicalDeviceImageFormatInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageFormatInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ImageType type_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, - VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , type( type_ ) - , tiling( tiling_ ) - , usage( usage_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( PhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageFormatInfo2( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageFormatInfo2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageFormatInfo2 & operator=( PhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageFormatInfo2 & operator=( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT - { - tiling = tiling_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageFormatInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, format, type, tiling, usage, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageFormatInfo2 const & ) const = default; -#else - bool operator==( PhysicalDeviceImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( type == rhs.type ) && ( tiling == rhs.tiling ) && - ( usage == rhs.usage ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( PhysicalDeviceImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ImageType type = VULKAN_HPP_NAMESPACE::ImageType::e1D; - VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; - VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageFormatInfo2; - }; - using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; - - struct PhysicalDeviceImageProcessingFeaturesQCOM - { - using NativeType = VkPhysicalDeviceImageProcessingFeaturesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , textureSampleWeighted( textureSampleWeighted_ ) - , textureBoxFilter( textureBoxFilter_ ) - , textureBlockMatch( textureBlockMatch_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingFeaturesQCOM( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageProcessingFeaturesQCOM( VkPhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageProcessingFeaturesQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageProcessingFeaturesQCOM & operator=( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageProcessingFeaturesQCOM & operator=( VkPhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & - setTextureSampleWeighted( VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted_ ) VULKAN_HPP_NOEXCEPT - { - textureSampleWeighted = textureSampleWeighted_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & - setTextureBoxFilter( VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter_ ) VULKAN_HPP_NOEXCEPT - { - textureBoxFilter = textureBoxFilter_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & - setTextureBlockMatch( VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch_ ) VULKAN_HPP_NOEXCEPT - { - textureBlockMatch = textureBlockMatch_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageProcessingFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageProcessingFeaturesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, textureSampleWeighted, textureBoxFilter, textureBlockMatch ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageProcessingFeaturesQCOM const & ) const = default; -#else - bool operator==( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( textureSampleWeighted == rhs.textureSampleWeighted ) && - ( textureBoxFilter == rhs.textureBoxFilter ) && ( textureBlockMatch == rhs.textureBlockMatch ); -# endif - } - - bool operator!=( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageProcessingFeaturesQCOM; - }; - - struct PhysicalDeviceImageProcessingPropertiesQCOM - { - using NativeType = VkPhysicalDeviceImageProcessingPropertiesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingPropertiesQCOM( uint32_t maxWeightFilterPhases_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxWeightFilterDimension_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchRegion_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxBoxFilterBlockSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxWeightFilterPhases( maxWeightFilterPhases_ ) - , maxWeightFilterDimension( maxWeightFilterDimension_ ) - , maxBlockMatchRegion( maxBlockMatchRegion_ ) - , maxBoxFilterBlockSize( maxBoxFilterBlockSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingPropertiesQCOM( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageProcessingPropertiesQCOM( VkPhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageProcessingPropertiesQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageProcessingPropertiesQCOM & operator=( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageProcessingPropertiesQCOM & operator=( VkPhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceImageProcessingPropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageProcessingPropertiesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxWeightFilterPhases, maxWeightFilterDimension, maxBlockMatchRegion, maxBoxFilterBlockSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageProcessingPropertiesQCOM const & ) const = default; -#else - bool operator==( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxWeightFilterPhases == rhs.maxWeightFilterPhases ) && - ( maxWeightFilterDimension == rhs.maxWeightFilterDimension ) && ( maxBlockMatchRegion == rhs.maxBlockMatchRegion ) && - ( maxBoxFilterBlockSize == rhs.maxBoxFilterBlockSize ); -# endif - } - - bool operator!=( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM; - void * pNext = {}; - uint32_t maxWeightFilterPhases = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxWeightFilterDimension = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchRegion = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxBoxFilterBlockSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageProcessingPropertiesQCOM; - }; - - struct PhysicalDeviceImageRobustnessFeatures - { - using NativeType = VkPhysicalDeviceImageRobustnessFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageRobustnessFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageRobustnessFeatures( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , robustImageAccess( robustImageAccess_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageRobustnessFeatures( PhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageRobustnessFeatures( VkPhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageRobustnessFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageRobustnessFeatures & operator=( PhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageRobustnessFeatures & operator=( VkPhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageRobustnessFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageRobustnessFeatures & setRobustImageAccess( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ ) VULKAN_HPP_NOEXCEPT - { - robustImageAccess = robustImageAccess_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageRobustnessFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageRobustnessFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, robustImageAccess ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageRobustnessFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceImageRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustImageAccess == rhs.robustImageAccess ); -# endif - } - - bool operator!=( PhysicalDeviceImageRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageRobustnessFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageRobustnessFeatures; - }; - using PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; - - struct PhysicalDeviceImageViewImageFormatInfoEXT - { - using NativeType = VkPhysicalDeviceImageViewImageFormatInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceImageViewImageFormatInfoEXT( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ = VULKAN_HPP_NAMESPACE::ImageViewType::e1D, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageViewType( imageViewType_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageViewImageFormatInfoEXT( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageViewImageFormatInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageViewImageFormatInfoEXT & operator=( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageViewImageFormatInfoEXT & operator=( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewImageFormatInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewImageFormatInfoEXT & - setImageViewType( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ ) VULKAN_HPP_NOEXCEPT - { - imageViewType = imageViewType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageViewImageFormatInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageViewImageFormatInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageViewType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageViewImageFormatInfoEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageViewType == rhs.imageViewType ); -# endif - } - - bool operator!=( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageViewType imageViewType = VULKAN_HPP_NAMESPACE::ImageViewType::e1D; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageViewImageFormatInfoEXT; - }; - - struct PhysicalDeviceImageViewMinLodFeaturesEXT - { - using NativeType = VkPhysicalDeviceImageViewMinLodFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewMinLodFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 minLod_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minLod( minLod_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewMinLodFeaturesEXT( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageViewMinLodFeaturesEXT( VkPhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImageViewMinLodFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImageViewMinLodFeaturesEXT & operator=( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImageViewMinLodFeaturesEXT & operator=( VkPhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewMinLodFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewMinLodFeaturesEXT & setMinLod( VULKAN_HPP_NAMESPACE::Bool32 minLod_ ) VULKAN_HPP_NOEXCEPT - { - minLod = minLod_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImageViewMinLodFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImageViewMinLodFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minLod ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImageViewMinLodFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minLod == rhs.minLod ); -# endif - } - - bool operator!=( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 minLod = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImageViewMinLodFeaturesEXT; - }; - - struct PhysicalDeviceImagelessFramebufferFeatures - { - using NativeType = VkPhysicalDeviceImagelessFramebufferFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImagelessFramebufferFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeatures( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imagelessFramebuffer( imagelessFramebuffer_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeatures( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImagelessFramebufferFeatures( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceImagelessFramebufferFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceImagelessFramebufferFeatures & operator=( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceImagelessFramebufferFeatures & operator=( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImagelessFramebufferFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImagelessFramebufferFeatures & - setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT - { - imagelessFramebuffer = imagelessFramebuffer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceImagelessFramebufferFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceImagelessFramebufferFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imagelessFramebuffer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceImagelessFramebufferFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imagelessFramebuffer == rhs.imagelessFramebuffer ); -# endif - } - - bool operator!=( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImagelessFramebufferFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceImagelessFramebufferFeatures; - }; - using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; - - struct PhysicalDeviceIndexTypeUint8FeaturesEXT - { - using NativeType = VkPhysicalDeviceIndexTypeUint8FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , indexTypeUint8( indexTypeUint8_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8FeaturesEXT( PhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceIndexTypeUint8FeaturesEXT( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceIndexTypeUint8FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceIndexTypeUint8FeaturesEXT & operator=( PhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceIndexTypeUint8FeaturesEXT & operator=( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIndexTypeUint8FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIndexTypeUint8FeaturesEXT & setIndexTypeUint8( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ ) VULKAN_HPP_NOEXCEPT - { - indexTypeUint8 = indexTypeUint8_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceIndexTypeUint8FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceIndexTypeUint8FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, indexTypeUint8 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceIndexTypeUint8FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( indexTypeUint8 == rhs.indexTypeUint8 ); -# endif - } - - bool operator!=( PhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceIndexTypeUint8FeaturesEXT; - }; - - struct PhysicalDeviceInheritedViewportScissorFeaturesNV - { - using NativeType = VkPhysicalDeviceInheritedViewportScissorFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceInheritedViewportScissorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , inheritedViewportScissor2D( inheritedViewportScissor2D_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceInheritedViewportScissorFeaturesNV( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInheritedViewportScissorFeaturesNV( VkPhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceInheritedViewportScissorFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceInheritedViewportScissorFeaturesNV & operator=( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInheritedViewportScissorFeaturesNV & operator=( VkPhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInheritedViewportScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInheritedViewportScissorFeaturesNV & - setInheritedViewportScissor2D( VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D_ ) VULKAN_HPP_NOEXCEPT - { - inheritedViewportScissor2D = inheritedViewportScissor2D_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceInheritedViewportScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceInheritedViewportScissorFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, inheritedViewportScissor2D ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceInheritedViewportScissorFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( inheritedViewportScissor2D == rhs.inheritedViewportScissor2D ); -# endif - } - - bool operator!=( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceInheritedViewportScissorFeaturesNV; - }; - - struct PhysicalDeviceInlineUniformBlockFeatures - { - using NativeType = VkPhysicalDeviceInlineUniformBlockFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInlineUniformBlockFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeatures( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , inlineUniformBlock( inlineUniformBlock_ ) - , descriptorBindingInlineUniformBlockUpdateAfterBind( descriptorBindingInlineUniformBlockUpdateAfterBind_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeatures( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInlineUniformBlockFeatures( VkPhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceInlineUniformBlockFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceInlineUniformBlockFeatures & operator=( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInlineUniformBlockFeatures & operator=( VkPhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & - setInlineUniformBlock( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT - { - inlineUniformBlock = inlineUniformBlock_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & setDescriptorBindingInlineUniformBlockUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceInlineUniformBlockFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceInlineUniformBlockFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, inlineUniformBlock, descriptorBindingInlineUniformBlockUpdateAfterBind ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceInlineUniformBlockFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( inlineUniformBlock == rhs.inlineUniformBlock ) && - ( descriptorBindingInlineUniformBlockUpdateAfterBind == rhs.descriptorBindingInlineUniformBlockUpdateAfterBind ); -# endif - } - - bool operator!=( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceInlineUniformBlockFeatures; - }; - using PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; - - struct PhysicalDeviceInlineUniformBlockProperties - { - using NativeType = VkPhysicalDeviceInlineUniformBlockProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInlineUniformBlockProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockProperties( uint32_t maxInlineUniformBlockSize_ = {}, - uint32_t maxPerStageDescriptorInlineUniformBlocks_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ = {}, - uint32_t maxDescriptorSetInlineUniformBlocks_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxInlineUniformBlockSize( maxInlineUniformBlockSize_ ) - , maxPerStageDescriptorInlineUniformBlocks( maxPerStageDescriptorInlineUniformBlocks_ ) - , maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ ) - , maxDescriptorSetInlineUniformBlocks( maxDescriptorSetInlineUniformBlocks_ ) - , maxDescriptorSetUpdateAfterBindInlineUniformBlocks( maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockProperties( PhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInlineUniformBlockProperties( VkPhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceInlineUniformBlockProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceInlineUniformBlockProperties & operator=( PhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInlineUniformBlockProperties & operator=( VkPhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceInlineUniformBlockProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceInlineUniformBlockProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxInlineUniformBlockSize, - maxPerStageDescriptorInlineUniformBlocks, - maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks, - maxDescriptorSetInlineUniformBlocks, - maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceInlineUniformBlockProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceInlineUniformBlockProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInlineUniformBlockSize == rhs.maxInlineUniformBlockSize ) && - ( maxPerStageDescriptorInlineUniformBlocks == rhs.maxPerStageDescriptorInlineUniformBlocks ) && - ( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks == rhs.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ) && - ( maxDescriptorSetInlineUniformBlocks == rhs.maxDescriptorSetInlineUniformBlocks ) && - ( maxDescriptorSetUpdateAfterBindInlineUniformBlocks == rhs.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); -# endif - } - - bool operator!=( PhysicalDeviceInlineUniformBlockProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockProperties; - void * pNext = {}; - uint32_t maxInlineUniformBlockSize = {}; - uint32_t maxPerStageDescriptorInlineUniformBlocks = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = {}; - uint32_t maxDescriptorSetInlineUniformBlocks = {}; - uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceInlineUniformBlockProperties; - }; - using PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; - - struct PhysicalDeviceInvocationMaskFeaturesHUAWEI - { - using NativeType = VkPhysicalDeviceInvocationMaskFeaturesHUAWEI; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , invocationMask( invocationMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInvocationMaskFeaturesHUAWEI( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceInvocationMaskFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceInvocationMaskFeaturesHUAWEI & operator=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceInvocationMaskFeaturesHUAWEI & operator=( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInvocationMaskFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInvocationMaskFeaturesHUAWEI & setInvocationMask( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ ) VULKAN_HPP_NOEXCEPT - { - invocationMask = invocationMask_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, invocationMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & ) const = default; -#else - bool operator==( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( invocationMask == rhs.invocationMask ); -# endif - } - - bool operator!=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 invocationMask = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceInvocationMaskFeaturesHUAWEI; - }; - - struct PhysicalDeviceLegacyDitheringFeaturesEXT - { - using NativeType = VkPhysicalDeviceLegacyDitheringFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyDitheringFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 legacyDithering_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , legacyDithering( legacyDithering_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyDitheringFeaturesEXT( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLegacyDitheringFeaturesEXT( VkPhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceLegacyDitheringFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceLegacyDitheringFeaturesEXT & operator=( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLegacyDitheringFeaturesEXT & operator=( VkPhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyDitheringFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyDitheringFeaturesEXT & setLegacyDithering( VULKAN_HPP_NAMESPACE::Bool32 legacyDithering_ ) VULKAN_HPP_NOEXCEPT - { - legacyDithering = legacyDithering_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceLegacyDitheringFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceLegacyDitheringFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, legacyDithering ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceLegacyDitheringFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( legacyDithering == rhs.legacyDithering ); -# endif - } - - bool operator!=( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 legacyDithering = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceLegacyDitheringFeaturesEXT; - }; - - struct PhysicalDeviceLimits - { - using NativeType = VkPhysicalDeviceLimits; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLimits( uint32_t maxImageDimension1D_ = {}, - uint32_t maxImageDimension2D_ = {}, - uint32_t maxImageDimension3D_ = {}, - uint32_t maxImageDimensionCube_ = {}, - uint32_t maxImageArrayLayers_ = {}, - uint32_t maxTexelBufferElements_ = {}, - uint32_t maxUniformBufferRange_ = {}, - uint32_t maxStorageBufferRange_ = {}, - uint32_t maxPushConstantsSize_ = {}, - uint32_t maxMemoryAllocationCount_ = {}, - uint32_t maxSamplerAllocationCount_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize bufferImageGranularity_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize sparseAddressSpaceSize_ = {}, - uint32_t maxBoundDescriptorSets_ = {}, - uint32_t maxPerStageDescriptorSamplers_ = {}, - uint32_t maxPerStageDescriptorUniformBuffers_ = {}, - uint32_t maxPerStageDescriptorStorageBuffers_ = {}, - uint32_t maxPerStageDescriptorSampledImages_ = {}, - uint32_t maxPerStageDescriptorStorageImages_ = {}, - uint32_t maxPerStageDescriptorInputAttachments_ = {}, - uint32_t maxPerStageResources_ = {}, - uint32_t maxDescriptorSetSamplers_ = {}, - uint32_t maxDescriptorSetUniformBuffers_ = {}, - uint32_t maxDescriptorSetUniformBuffersDynamic_ = {}, - uint32_t maxDescriptorSetStorageBuffers_ = {}, - uint32_t maxDescriptorSetStorageBuffersDynamic_ = {}, - uint32_t maxDescriptorSetSampledImages_ = {}, - uint32_t maxDescriptorSetStorageImages_ = {}, - uint32_t maxDescriptorSetInputAttachments_ = {}, - uint32_t maxVertexInputAttributes_ = {}, - uint32_t maxVertexInputBindings_ = {}, - uint32_t maxVertexInputAttributeOffset_ = {}, - uint32_t maxVertexInputBindingStride_ = {}, - uint32_t maxVertexOutputComponents_ = {}, - uint32_t maxTessellationGenerationLevel_ = {}, - uint32_t maxTessellationPatchSize_ = {}, - uint32_t maxTessellationControlPerVertexInputComponents_ = {}, - uint32_t maxTessellationControlPerVertexOutputComponents_ = {}, - uint32_t maxTessellationControlPerPatchOutputComponents_ = {}, - uint32_t maxTessellationControlTotalOutputComponents_ = {}, - uint32_t maxTessellationEvaluationInputComponents_ = {}, - uint32_t maxTessellationEvaluationOutputComponents_ = {}, - uint32_t maxGeometryShaderInvocations_ = {}, - uint32_t maxGeometryInputComponents_ = {}, - uint32_t maxGeometryOutputComponents_ = {}, - uint32_t maxGeometryOutputVertices_ = {}, - uint32_t maxGeometryTotalOutputComponents_ = {}, - uint32_t maxFragmentInputComponents_ = {}, - uint32_t maxFragmentOutputAttachments_ = {}, - uint32_t maxFragmentDualSrcAttachments_ = {}, - uint32_t maxFragmentCombinedOutputResources_ = {}, - uint32_t maxComputeSharedMemorySize_ = {}, - std::array const & maxComputeWorkGroupCount_ = {}, - uint32_t maxComputeWorkGroupInvocations_ = {}, - std::array const & maxComputeWorkGroupSize_ = {}, - uint32_t subPixelPrecisionBits_ = {}, - uint32_t subTexelPrecisionBits_ = {}, - uint32_t mipmapPrecisionBits_ = {}, - uint32_t maxDrawIndexedIndexValue_ = {}, - uint32_t maxDrawIndirectCount_ = {}, - float maxSamplerLodBias_ = {}, - float maxSamplerAnisotropy_ = {}, - uint32_t maxViewports_ = {}, - std::array const & maxViewportDimensions_ = {}, - std::array const & viewportBoundsRange_ = {}, - uint32_t viewportSubPixelBits_ = {}, - size_t minMemoryMapAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize minTexelBufferOffsetAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize minUniformBufferOffsetAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize minStorageBufferOffsetAlignment_ = {}, - int32_t minTexelOffset_ = {}, - uint32_t maxTexelOffset_ = {}, - int32_t minTexelGatherOffset_ = {}, - uint32_t maxTexelGatherOffset_ = {}, - float minInterpolationOffset_ = {}, - float maxInterpolationOffset_ = {}, - uint32_t subPixelInterpolationOffsetBits_ = {}, - uint32_t maxFramebufferWidth_ = {}, - uint32_t maxFramebufferHeight_ = {}, - uint32_t maxFramebufferLayers_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferColorSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferDepthSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferStencilSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferNoAttachmentsSampleCounts_ = {}, - uint32_t maxColorAttachments_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageColorSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageIntegerSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageDepthSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageStencilSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags storageImageSampleCounts_ = {}, - uint32_t maxSampleMaskWords_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 timestampComputeAndGraphics_ = {}, - float timestampPeriod_ = {}, - uint32_t maxClipDistances_ = {}, - uint32_t maxCullDistances_ = {}, - uint32_t maxCombinedClipAndCullDistances_ = {}, - uint32_t discreteQueuePriorities_ = {}, - std::array const & pointSizeRange_ = {}, - std::array const & lineWidthRange_ = {}, - float pointSizeGranularity_ = {}, - float lineWidthGranularity_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 strictLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 standardSampleLocations_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyOffsetAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyRowPitchAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize nonCoherentAtomSize_ = {} ) VULKAN_HPP_NOEXCEPT - : maxImageDimension1D( maxImageDimension1D_ ) - , maxImageDimension2D( maxImageDimension2D_ ) - , maxImageDimension3D( maxImageDimension3D_ ) - , maxImageDimensionCube( maxImageDimensionCube_ ) - , maxImageArrayLayers( maxImageArrayLayers_ ) - , maxTexelBufferElements( maxTexelBufferElements_ ) - , maxUniformBufferRange( maxUniformBufferRange_ ) - , maxStorageBufferRange( maxStorageBufferRange_ ) - , maxPushConstantsSize( maxPushConstantsSize_ ) - , maxMemoryAllocationCount( maxMemoryAllocationCount_ ) - , maxSamplerAllocationCount( maxSamplerAllocationCount_ ) - , bufferImageGranularity( bufferImageGranularity_ ) - , sparseAddressSpaceSize( sparseAddressSpaceSize_ ) - , maxBoundDescriptorSets( maxBoundDescriptorSets_ ) - , maxPerStageDescriptorSamplers( maxPerStageDescriptorSamplers_ ) - , maxPerStageDescriptorUniformBuffers( maxPerStageDescriptorUniformBuffers_ ) - , maxPerStageDescriptorStorageBuffers( maxPerStageDescriptorStorageBuffers_ ) - , maxPerStageDescriptorSampledImages( maxPerStageDescriptorSampledImages_ ) - , maxPerStageDescriptorStorageImages( maxPerStageDescriptorStorageImages_ ) - , maxPerStageDescriptorInputAttachments( maxPerStageDescriptorInputAttachments_ ) - , maxPerStageResources( maxPerStageResources_ ) - , maxDescriptorSetSamplers( maxDescriptorSetSamplers_ ) - , maxDescriptorSetUniformBuffers( maxDescriptorSetUniformBuffers_ ) - , maxDescriptorSetUniformBuffersDynamic( maxDescriptorSetUniformBuffersDynamic_ ) - , maxDescriptorSetStorageBuffers( maxDescriptorSetStorageBuffers_ ) - , maxDescriptorSetStorageBuffersDynamic( maxDescriptorSetStorageBuffersDynamic_ ) - , maxDescriptorSetSampledImages( maxDescriptorSetSampledImages_ ) - , maxDescriptorSetStorageImages( maxDescriptorSetStorageImages_ ) - , maxDescriptorSetInputAttachments( maxDescriptorSetInputAttachments_ ) - , maxVertexInputAttributes( maxVertexInputAttributes_ ) - , maxVertexInputBindings( maxVertexInputBindings_ ) - , maxVertexInputAttributeOffset( maxVertexInputAttributeOffset_ ) - , maxVertexInputBindingStride( maxVertexInputBindingStride_ ) - , maxVertexOutputComponents( maxVertexOutputComponents_ ) - , maxTessellationGenerationLevel( maxTessellationGenerationLevel_ ) - , maxTessellationPatchSize( maxTessellationPatchSize_ ) - , maxTessellationControlPerVertexInputComponents( maxTessellationControlPerVertexInputComponents_ ) - , maxTessellationControlPerVertexOutputComponents( maxTessellationControlPerVertexOutputComponents_ ) - , maxTessellationControlPerPatchOutputComponents( maxTessellationControlPerPatchOutputComponents_ ) - , maxTessellationControlTotalOutputComponents( maxTessellationControlTotalOutputComponents_ ) - , maxTessellationEvaluationInputComponents( maxTessellationEvaluationInputComponents_ ) - , maxTessellationEvaluationOutputComponents( maxTessellationEvaluationOutputComponents_ ) - , maxGeometryShaderInvocations( maxGeometryShaderInvocations_ ) - , maxGeometryInputComponents( maxGeometryInputComponents_ ) - , maxGeometryOutputComponents( maxGeometryOutputComponents_ ) - , maxGeometryOutputVertices( maxGeometryOutputVertices_ ) - , maxGeometryTotalOutputComponents( maxGeometryTotalOutputComponents_ ) - , maxFragmentInputComponents( maxFragmentInputComponents_ ) - , maxFragmentOutputAttachments( maxFragmentOutputAttachments_ ) - , maxFragmentDualSrcAttachments( maxFragmentDualSrcAttachments_ ) - , maxFragmentCombinedOutputResources( maxFragmentCombinedOutputResources_ ) - , maxComputeSharedMemorySize( maxComputeSharedMemorySize_ ) - , maxComputeWorkGroupCount( maxComputeWorkGroupCount_ ) - , maxComputeWorkGroupInvocations( maxComputeWorkGroupInvocations_ ) - , maxComputeWorkGroupSize( maxComputeWorkGroupSize_ ) - , subPixelPrecisionBits( subPixelPrecisionBits_ ) - , subTexelPrecisionBits( subTexelPrecisionBits_ ) - , mipmapPrecisionBits( mipmapPrecisionBits_ ) - , maxDrawIndexedIndexValue( maxDrawIndexedIndexValue_ ) - , maxDrawIndirectCount( maxDrawIndirectCount_ ) - , maxSamplerLodBias( maxSamplerLodBias_ ) - , maxSamplerAnisotropy( maxSamplerAnisotropy_ ) - , maxViewports( maxViewports_ ) - , maxViewportDimensions( maxViewportDimensions_ ) - , viewportBoundsRange( viewportBoundsRange_ ) - , viewportSubPixelBits( viewportSubPixelBits_ ) - , minMemoryMapAlignment( minMemoryMapAlignment_ ) - , minTexelBufferOffsetAlignment( minTexelBufferOffsetAlignment_ ) - , minUniformBufferOffsetAlignment( minUniformBufferOffsetAlignment_ ) - , minStorageBufferOffsetAlignment( minStorageBufferOffsetAlignment_ ) - , minTexelOffset( minTexelOffset_ ) - , maxTexelOffset( maxTexelOffset_ ) - , minTexelGatherOffset( minTexelGatherOffset_ ) - , maxTexelGatherOffset( maxTexelGatherOffset_ ) - , minInterpolationOffset( minInterpolationOffset_ ) - , maxInterpolationOffset( maxInterpolationOffset_ ) - , subPixelInterpolationOffsetBits( subPixelInterpolationOffsetBits_ ) - , maxFramebufferWidth( maxFramebufferWidth_ ) - , maxFramebufferHeight( maxFramebufferHeight_ ) - , maxFramebufferLayers( maxFramebufferLayers_ ) - , framebufferColorSampleCounts( framebufferColorSampleCounts_ ) - , framebufferDepthSampleCounts( framebufferDepthSampleCounts_ ) - , framebufferStencilSampleCounts( framebufferStencilSampleCounts_ ) - , framebufferNoAttachmentsSampleCounts( framebufferNoAttachmentsSampleCounts_ ) - , maxColorAttachments( maxColorAttachments_ ) - , sampledImageColorSampleCounts( sampledImageColorSampleCounts_ ) - , sampledImageIntegerSampleCounts( sampledImageIntegerSampleCounts_ ) - , sampledImageDepthSampleCounts( sampledImageDepthSampleCounts_ ) - , sampledImageStencilSampleCounts( sampledImageStencilSampleCounts_ ) - , storageImageSampleCounts( storageImageSampleCounts_ ) - , maxSampleMaskWords( maxSampleMaskWords_ ) - , timestampComputeAndGraphics( timestampComputeAndGraphics_ ) - , timestampPeriod( timestampPeriod_ ) - , maxClipDistances( maxClipDistances_ ) - , maxCullDistances( maxCullDistances_ ) - , maxCombinedClipAndCullDistances( maxCombinedClipAndCullDistances_ ) - , discreteQueuePriorities( discreteQueuePriorities_ ) - , pointSizeRange( pointSizeRange_ ) - , lineWidthRange( lineWidthRange_ ) - , pointSizeGranularity( pointSizeGranularity_ ) - , lineWidthGranularity( lineWidthGranularity_ ) - , strictLines( strictLines_ ) - , standardSampleLocations( standardSampleLocations_ ) - , optimalBufferCopyOffsetAlignment( optimalBufferCopyOffsetAlignment_ ) - , optimalBufferCopyRowPitchAlignment( optimalBufferCopyRowPitchAlignment_ ) - , nonCoherentAtomSize( nonCoherentAtomSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLimits( PhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLimits( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceLimits( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceLimits & operator=( PhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLimits & operator=( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceLimits const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceLimits &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - float const &, - float const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - size_t const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &, - int32_t const &, - uint32_t const &, - int32_t const &, - uint32_t const &, - float const &, - float const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - float const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - float const &, - float const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( maxImageDimension1D, - maxImageDimension2D, - maxImageDimension3D, - maxImageDimensionCube, - maxImageArrayLayers, - maxTexelBufferElements, - maxUniformBufferRange, - maxStorageBufferRange, - maxPushConstantsSize, - maxMemoryAllocationCount, - maxSamplerAllocationCount, - bufferImageGranularity, - sparseAddressSpaceSize, - maxBoundDescriptorSets, - maxPerStageDescriptorSamplers, - maxPerStageDescriptorUniformBuffers, - maxPerStageDescriptorStorageBuffers, - maxPerStageDescriptorSampledImages, - maxPerStageDescriptorStorageImages, - maxPerStageDescriptorInputAttachments, - maxPerStageResources, - maxDescriptorSetSamplers, - maxDescriptorSetUniformBuffers, - maxDescriptorSetUniformBuffersDynamic, - maxDescriptorSetStorageBuffers, - maxDescriptorSetStorageBuffersDynamic, - maxDescriptorSetSampledImages, - maxDescriptorSetStorageImages, - maxDescriptorSetInputAttachments, - maxVertexInputAttributes, - maxVertexInputBindings, - maxVertexInputAttributeOffset, - maxVertexInputBindingStride, - maxVertexOutputComponents, - maxTessellationGenerationLevel, - maxTessellationPatchSize, - maxTessellationControlPerVertexInputComponents, - maxTessellationControlPerVertexOutputComponents, - maxTessellationControlPerPatchOutputComponents, - maxTessellationControlTotalOutputComponents, - maxTessellationEvaluationInputComponents, - maxTessellationEvaluationOutputComponents, - maxGeometryShaderInvocations, - maxGeometryInputComponents, - maxGeometryOutputComponents, - maxGeometryOutputVertices, - maxGeometryTotalOutputComponents, - maxFragmentInputComponents, - maxFragmentOutputAttachments, - maxFragmentDualSrcAttachments, - maxFragmentCombinedOutputResources, - maxComputeSharedMemorySize, - maxComputeWorkGroupCount, - maxComputeWorkGroupInvocations, - maxComputeWorkGroupSize, - subPixelPrecisionBits, - subTexelPrecisionBits, - mipmapPrecisionBits, - maxDrawIndexedIndexValue, - maxDrawIndirectCount, - maxSamplerLodBias, - maxSamplerAnisotropy, - maxViewports, - maxViewportDimensions, - viewportBoundsRange, - viewportSubPixelBits, - minMemoryMapAlignment, - minTexelBufferOffsetAlignment, - minUniformBufferOffsetAlignment, - minStorageBufferOffsetAlignment, - minTexelOffset, - maxTexelOffset, - minTexelGatherOffset, - maxTexelGatherOffset, - minInterpolationOffset, - maxInterpolationOffset, - subPixelInterpolationOffsetBits, - maxFramebufferWidth, - maxFramebufferHeight, - maxFramebufferLayers, - framebufferColorSampleCounts, - framebufferDepthSampleCounts, - framebufferStencilSampleCounts, - framebufferNoAttachmentsSampleCounts, - maxColorAttachments, - sampledImageColorSampleCounts, - sampledImageIntegerSampleCounts, - sampledImageDepthSampleCounts, - sampledImageStencilSampleCounts, - storageImageSampleCounts, - maxSampleMaskWords, - timestampComputeAndGraphics, - timestampPeriod, - maxClipDistances, - maxCullDistances, - maxCombinedClipAndCullDistances, - discreteQueuePriorities, - pointSizeRange, - lineWidthRange, - pointSizeGranularity, - lineWidthGranularity, - strictLines, - standardSampleLocations, - optimalBufferCopyOffsetAlignment, - optimalBufferCopyRowPitchAlignment, - nonCoherentAtomSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceLimits const & ) const = default; -#else - bool operator==( PhysicalDeviceLimits const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( maxImageDimension1D == rhs.maxImageDimension1D ) && ( maxImageDimension2D == rhs.maxImageDimension2D ) && - ( maxImageDimension3D == rhs.maxImageDimension3D ) && ( maxImageDimensionCube == rhs.maxImageDimensionCube ) && - ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && ( maxTexelBufferElements == rhs.maxTexelBufferElements ) && - ( maxUniformBufferRange == rhs.maxUniformBufferRange ) && ( maxStorageBufferRange == rhs.maxStorageBufferRange ) && - ( maxPushConstantsSize == rhs.maxPushConstantsSize ) && ( maxMemoryAllocationCount == rhs.maxMemoryAllocationCount ) && - ( maxSamplerAllocationCount == rhs.maxSamplerAllocationCount ) && ( bufferImageGranularity == rhs.bufferImageGranularity ) && - ( sparseAddressSpaceSize == rhs.sparseAddressSpaceSize ) && ( maxBoundDescriptorSets == rhs.maxBoundDescriptorSets ) && - ( maxPerStageDescriptorSamplers == rhs.maxPerStageDescriptorSamplers ) && - ( maxPerStageDescriptorUniformBuffers == rhs.maxPerStageDescriptorUniformBuffers ) && - ( maxPerStageDescriptorStorageBuffers == rhs.maxPerStageDescriptorStorageBuffers ) && - ( maxPerStageDescriptorSampledImages == rhs.maxPerStageDescriptorSampledImages ) && - ( maxPerStageDescriptorStorageImages == rhs.maxPerStageDescriptorStorageImages ) && - ( maxPerStageDescriptorInputAttachments == rhs.maxPerStageDescriptorInputAttachments ) && ( maxPerStageResources == rhs.maxPerStageResources ) && - ( maxDescriptorSetSamplers == rhs.maxDescriptorSetSamplers ) && ( maxDescriptorSetUniformBuffers == rhs.maxDescriptorSetUniformBuffers ) && - ( maxDescriptorSetUniformBuffersDynamic == rhs.maxDescriptorSetUniformBuffersDynamic ) && - ( maxDescriptorSetStorageBuffers == rhs.maxDescriptorSetStorageBuffers ) && - ( maxDescriptorSetStorageBuffersDynamic == rhs.maxDescriptorSetStorageBuffersDynamic ) && - ( maxDescriptorSetSampledImages == rhs.maxDescriptorSetSampledImages ) && ( maxDescriptorSetStorageImages == rhs.maxDescriptorSetStorageImages ) && - ( maxDescriptorSetInputAttachments == rhs.maxDescriptorSetInputAttachments ) && ( maxVertexInputAttributes == rhs.maxVertexInputAttributes ) && - ( maxVertexInputBindings == rhs.maxVertexInputBindings ) && ( maxVertexInputAttributeOffset == rhs.maxVertexInputAttributeOffset ) && - ( maxVertexInputBindingStride == rhs.maxVertexInputBindingStride ) && ( maxVertexOutputComponents == rhs.maxVertexOutputComponents ) && - ( maxTessellationGenerationLevel == rhs.maxTessellationGenerationLevel ) && ( maxTessellationPatchSize == rhs.maxTessellationPatchSize ) && - ( maxTessellationControlPerVertexInputComponents == rhs.maxTessellationControlPerVertexInputComponents ) && - ( maxTessellationControlPerVertexOutputComponents == rhs.maxTessellationControlPerVertexOutputComponents ) && - ( maxTessellationControlPerPatchOutputComponents == rhs.maxTessellationControlPerPatchOutputComponents ) && - ( maxTessellationControlTotalOutputComponents == rhs.maxTessellationControlTotalOutputComponents ) && - ( maxTessellationEvaluationInputComponents == rhs.maxTessellationEvaluationInputComponents ) && - ( maxTessellationEvaluationOutputComponents == rhs.maxTessellationEvaluationOutputComponents ) && - ( maxGeometryShaderInvocations == rhs.maxGeometryShaderInvocations ) && ( maxGeometryInputComponents == rhs.maxGeometryInputComponents ) && - ( maxGeometryOutputComponents == rhs.maxGeometryOutputComponents ) && ( maxGeometryOutputVertices == rhs.maxGeometryOutputVertices ) && - ( maxGeometryTotalOutputComponents == rhs.maxGeometryTotalOutputComponents ) && ( maxFragmentInputComponents == rhs.maxFragmentInputComponents ) && - ( maxFragmentOutputAttachments == rhs.maxFragmentOutputAttachments ) && ( maxFragmentDualSrcAttachments == rhs.maxFragmentDualSrcAttachments ) && - ( maxFragmentCombinedOutputResources == rhs.maxFragmentCombinedOutputResources ) && - ( maxComputeSharedMemorySize == rhs.maxComputeSharedMemorySize ) && ( maxComputeWorkGroupCount == rhs.maxComputeWorkGroupCount ) && - ( maxComputeWorkGroupInvocations == rhs.maxComputeWorkGroupInvocations ) && ( maxComputeWorkGroupSize == rhs.maxComputeWorkGroupSize ) && - ( subPixelPrecisionBits == rhs.subPixelPrecisionBits ) && ( subTexelPrecisionBits == rhs.subTexelPrecisionBits ) && - ( mipmapPrecisionBits == rhs.mipmapPrecisionBits ) && ( maxDrawIndexedIndexValue == rhs.maxDrawIndexedIndexValue ) && - ( maxDrawIndirectCount == rhs.maxDrawIndirectCount ) && ( maxSamplerLodBias == rhs.maxSamplerLodBias ) && - ( maxSamplerAnisotropy == rhs.maxSamplerAnisotropy ) && ( maxViewports == rhs.maxViewports ) && - ( maxViewportDimensions == rhs.maxViewportDimensions ) && ( viewportBoundsRange == rhs.viewportBoundsRange ) && - ( viewportSubPixelBits == rhs.viewportSubPixelBits ) && ( minMemoryMapAlignment == rhs.minMemoryMapAlignment ) && - ( minTexelBufferOffsetAlignment == rhs.minTexelBufferOffsetAlignment ) && - ( minUniformBufferOffsetAlignment == rhs.minUniformBufferOffsetAlignment ) && - ( minStorageBufferOffsetAlignment == rhs.minStorageBufferOffsetAlignment ) && ( minTexelOffset == rhs.minTexelOffset ) && - ( maxTexelOffset == rhs.maxTexelOffset ) && ( minTexelGatherOffset == rhs.minTexelGatherOffset ) && - ( maxTexelGatherOffset == rhs.maxTexelGatherOffset ) && ( minInterpolationOffset == rhs.minInterpolationOffset ) && - ( maxInterpolationOffset == rhs.maxInterpolationOffset ) && ( subPixelInterpolationOffsetBits == rhs.subPixelInterpolationOffsetBits ) && - ( maxFramebufferWidth == rhs.maxFramebufferWidth ) && ( maxFramebufferHeight == rhs.maxFramebufferHeight ) && - ( maxFramebufferLayers == rhs.maxFramebufferLayers ) && ( framebufferColorSampleCounts == rhs.framebufferColorSampleCounts ) && - ( framebufferDepthSampleCounts == rhs.framebufferDepthSampleCounts ) && ( framebufferStencilSampleCounts == rhs.framebufferStencilSampleCounts ) && - ( framebufferNoAttachmentsSampleCounts == rhs.framebufferNoAttachmentsSampleCounts ) && ( maxColorAttachments == rhs.maxColorAttachments ) && - ( sampledImageColorSampleCounts == rhs.sampledImageColorSampleCounts ) && - ( sampledImageIntegerSampleCounts == rhs.sampledImageIntegerSampleCounts ) && - ( sampledImageDepthSampleCounts == rhs.sampledImageDepthSampleCounts ) && - ( sampledImageStencilSampleCounts == rhs.sampledImageStencilSampleCounts ) && ( storageImageSampleCounts == rhs.storageImageSampleCounts ) && - ( maxSampleMaskWords == rhs.maxSampleMaskWords ) && ( timestampComputeAndGraphics == rhs.timestampComputeAndGraphics ) && - ( timestampPeriod == rhs.timestampPeriod ) && ( maxClipDistances == rhs.maxClipDistances ) && ( maxCullDistances == rhs.maxCullDistances ) && - ( maxCombinedClipAndCullDistances == rhs.maxCombinedClipAndCullDistances ) && ( discreteQueuePriorities == rhs.discreteQueuePriorities ) && - ( pointSizeRange == rhs.pointSizeRange ) && ( lineWidthRange == rhs.lineWidthRange ) && ( pointSizeGranularity == rhs.pointSizeGranularity ) && - ( lineWidthGranularity == rhs.lineWidthGranularity ) && ( strictLines == rhs.strictLines ) && - ( standardSampleLocations == rhs.standardSampleLocations ) && ( optimalBufferCopyOffsetAlignment == rhs.optimalBufferCopyOffsetAlignment ) && - ( optimalBufferCopyRowPitchAlignment == rhs.optimalBufferCopyRowPitchAlignment ) && ( nonCoherentAtomSize == rhs.nonCoherentAtomSize ); -# endif - } - - bool operator!=( PhysicalDeviceLimits const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t maxImageDimension1D = {}; - uint32_t maxImageDimension2D = {}; - uint32_t maxImageDimension3D = {}; - uint32_t maxImageDimensionCube = {}; - uint32_t maxImageArrayLayers = {}; - uint32_t maxTexelBufferElements = {}; - uint32_t maxUniformBufferRange = {}; - uint32_t maxStorageBufferRange = {}; - uint32_t maxPushConstantsSize = {}; - uint32_t maxMemoryAllocationCount = {}; - uint32_t maxSamplerAllocationCount = {}; - VULKAN_HPP_NAMESPACE::DeviceSize bufferImageGranularity = {}; - VULKAN_HPP_NAMESPACE::DeviceSize sparseAddressSpaceSize = {}; - uint32_t maxBoundDescriptorSets = {}; - uint32_t maxPerStageDescriptorSamplers = {}; - uint32_t maxPerStageDescriptorUniformBuffers = {}; - uint32_t maxPerStageDescriptorStorageBuffers = {}; - uint32_t maxPerStageDescriptorSampledImages = {}; - uint32_t maxPerStageDescriptorStorageImages = {}; - uint32_t maxPerStageDescriptorInputAttachments = {}; - uint32_t maxPerStageResources = {}; - uint32_t maxDescriptorSetSamplers = {}; - uint32_t maxDescriptorSetUniformBuffers = {}; - uint32_t maxDescriptorSetUniformBuffersDynamic = {}; - uint32_t maxDescriptorSetStorageBuffers = {}; - uint32_t maxDescriptorSetStorageBuffersDynamic = {}; - uint32_t maxDescriptorSetSampledImages = {}; - uint32_t maxDescriptorSetStorageImages = {}; - uint32_t maxDescriptorSetInputAttachments = {}; - uint32_t maxVertexInputAttributes = {}; - uint32_t maxVertexInputBindings = {}; - uint32_t maxVertexInputAttributeOffset = {}; - uint32_t maxVertexInputBindingStride = {}; - uint32_t maxVertexOutputComponents = {}; - uint32_t maxTessellationGenerationLevel = {}; - uint32_t maxTessellationPatchSize = {}; - uint32_t maxTessellationControlPerVertexInputComponents = {}; - uint32_t maxTessellationControlPerVertexOutputComponents = {}; - uint32_t maxTessellationControlPerPatchOutputComponents = {}; - uint32_t maxTessellationControlTotalOutputComponents = {}; - uint32_t maxTessellationEvaluationInputComponents = {}; - uint32_t maxTessellationEvaluationOutputComponents = {}; - uint32_t maxGeometryShaderInvocations = {}; - uint32_t maxGeometryInputComponents = {}; - uint32_t maxGeometryOutputComponents = {}; - uint32_t maxGeometryOutputVertices = {}; - uint32_t maxGeometryTotalOutputComponents = {}; - uint32_t maxFragmentInputComponents = {}; - uint32_t maxFragmentOutputAttachments = {}; - uint32_t maxFragmentDualSrcAttachments = {}; - uint32_t maxFragmentCombinedOutputResources = {}; - uint32_t maxComputeSharedMemorySize = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxComputeWorkGroupCount = {}; - uint32_t maxComputeWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxComputeWorkGroupSize = {}; - uint32_t subPixelPrecisionBits = {}; - uint32_t subTexelPrecisionBits = {}; - uint32_t mipmapPrecisionBits = {}; - uint32_t maxDrawIndexedIndexValue = {}; - uint32_t maxDrawIndirectCount = {}; - float maxSamplerLodBias = {}; - float maxSamplerAnisotropy = {}; - uint32_t maxViewports = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxViewportDimensions = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D viewportBoundsRange = {}; - uint32_t viewportSubPixelBits = {}; - size_t minMemoryMapAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minTexelBufferOffsetAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minUniformBufferOffsetAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minStorageBufferOffsetAlignment = {}; - int32_t minTexelOffset = {}; - uint32_t maxTexelOffset = {}; - int32_t minTexelGatherOffset = {}; - uint32_t maxTexelGatherOffset = {}; - float minInterpolationOffset = {}; - float maxInterpolationOffset = {}; - uint32_t subPixelInterpolationOffsetBits = {}; - uint32_t maxFramebufferWidth = {}; - uint32_t maxFramebufferHeight = {}; - uint32_t maxFramebufferLayers = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferColorSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferDepthSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferStencilSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferNoAttachmentsSampleCounts = {}; - uint32_t maxColorAttachments = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageColorSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageIntegerSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageDepthSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageStencilSampleCounts = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags storageImageSampleCounts = {}; - uint32_t maxSampleMaskWords = {}; - VULKAN_HPP_NAMESPACE::Bool32 timestampComputeAndGraphics = {}; - float timestampPeriod = {}; - uint32_t maxClipDistances = {}; - uint32_t maxCullDistances = {}; - uint32_t maxCombinedClipAndCullDistances = {}; - uint32_t discreteQueuePriorities = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D pointSizeRange = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D lineWidthRange = {}; - float pointSizeGranularity = {}; - float lineWidthGranularity = {}; - VULKAN_HPP_NAMESPACE::Bool32 strictLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 standardSampleLocations = {}; - VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyOffsetAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyRowPitchAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize nonCoherentAtomSize = {}; - }; - - struct PhysicalDeviceLineRasterizationFeaturesEXT - { - using NativeType = VkPhysicalDeviceLineRasterizationFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rectangularLines( rectangularLines_ ) - , bresenhamLines( bresenhamLines_ ) - , smoothLines( smoothLines_ ) - , stippledRectangularLines( stippledRectangularLines_ ) - , stippledBresenhamLines( stippledBresenhamLines_ ) - , stippledSmoothLines( stippledSmoothLines_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeaturesEXT( PhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLineRasterizationFeaturesEXT( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceLineRasterizationFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceLineRasterizationFeaturesEXT & operator=( PhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLineRasterizationFeaturesEXT & operator=( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & - setRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ ) VULKAN_HPP_NOEXCEPT - { - rectangularLines = rectangularLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & setBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ ) VULKAN_HPP_NOEXCEPT - { - bresenhamLines = bresenhamLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & setSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ ) VULKAN_HPP_NOEXCEPT - { - smoothLines = smoothLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & - setStippledRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ ) VULKAN_HPP_NOEXCEPT - { - stippledRectangularLines = stippledRectangularLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & - setStippledBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ ) VULKAN_HPP_NOEXCEPT - { - stippledBresenhamLines = stippledBresenhamLines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeaturesEXT & - setStippledSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ ) VULKAN_HPP_NOEXCEPT - { - stippledSmoothLines = stippledSmoothLines_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceLineRasterizationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceLineRasterizationFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, rectangularLines, bresenhamLines, smoothLines, stippledRectangularLines, stippledBresenhamLines, stippledSmoothLines ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceLineRasterizationFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rectangularLines == rhs.rectangularLines ) && ( bresenhamLines == rhs.bresenhamLines ) && - ( smoothLines == rhs.smoothLines ) && ( stippledRectangularLines == rhs.stippledRectangularLines ) && - ( stippledBresenhamLines == rhs.stippledBresenhamLines ) && ( stippledSmoothLines == rhs.stippledSmoothLines ); -# endif - } - - bool operator!=( PhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rectangularLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 smoothLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines = {}; - VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceLineRasterizationFeaturesEXT; - }; - - struct PhysicalDeviceLineRasterizationPropertiesEXT - { - using NativeType = VkPhysicalDeviceLineRasterizationPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationPropertiesEXT( uint32_t lineSubPixelPrecisionBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , lineSubPixelPrecisionBits( lineSubPixelPrecisionBits_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationPropertiesEXT( PhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLineRasterizationPropertiesEXT( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceLineRasterizationPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceLineRasterizationPropertiesEXT & operator=( PhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLineRasterizationPropertiesEXT & operator=( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceLineRasterizationPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceLineRasterizationPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, lineSubPixelPrecisionBits ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceLineRasterizationPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lineSubPixelPrecisionBits == rhs.lineSubPixelPrecisionBits ); -# endif - } - - bool operator!=( PhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT; - void * pNext = {}; - uint32_t lineSubPixelPrecisionBits = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceLineRasterizationPropertiesEXT; - }; - - struct PhysicalDeviceLinearColorAttachmentFeaturesNV - { - using NativeType = VkPhysicalDeviceLinearColorAttachmentFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceLinearColorAttachmentFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , linearColorAttachment( linearColorAttachment_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceLinearColorAttachmentFeaturesNV( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLinearColorAttachmentFeaturesNV( VkPhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceLinearColorAttachmentFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceLinearColorAttachmentFeaturesNV & operator=( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceLinearColorAttachmentFeaturesNV & operator=( VkPhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLinearColorAttachmentFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLinearColorAttachmentFeaturesNV & - setLinearColorAttachment( VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment_ ) VULKAN_HPP_NOEXCEPT - { - linearColorAttachment = linearColorAttachment_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceLinearColorAttachmentFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceLinearColorAttachmentFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, linearColorAttachment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceLinearColorAttachmentFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( linearColorAttachment == rhs.linearColorAttachment ); -# endif - } - - bool operator!=( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceLinearColorAttachmentFeaturesNV; - }; - - struct PhysicalDeviceMaintenance3Properties - { - using NativeType = VkPhysicalDeviceMaintenance3Properties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance3Properties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance3Properties( uint32_t maxPerSetDescriptors_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxPerSetDescriptors( maxPerSetDescriptors_ ) - , maxMemoryAllocationSize( maxMemoryAllocationSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance3Properties( PhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance3Properties( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMaintenance3Properties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMaintenance3Properties & operator=( PhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance3Properties & operator=( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMaintenance3Properties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMaintenance3Properties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxPerSetDescriptors, maxMemoryAllocationSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMaintenance3Properties const & ) const = default; -#else - bool operator==( PhysicalDeviceMaintenance3Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPerSetDescriptors == rhs.maxPerSetDescriptors ) && - ( maxMemoryAllocationSize == rhs.maxMemoryAllocationSize ); -# endif - } - - bool operator!=( PhysicalDeviceMaintenance3Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance3Properties; - void * pNext = {}; - uint32_t maxPerSetDescriptors = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMaintenance3Properties; - }; - using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; - - struct PhysicalDeviceMaintenance4Features - { - using NativeType = VkPhysicalDeviceMaintenance4Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance4Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Features( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maintenance4( maintenance4_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Features( PhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance4Features( VkPhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMaintenance4Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMaintenance4Features & operator=( PhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance4Features & operator=( VkPhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance4Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance4Features & setMaintenance4( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ ) VULKAN_HPP_NOEXCEPT - { - maintenance4 = maintenance4_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMaintenance4Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMaintenance4Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maintenance4 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMaintenance4Features const & ) const = default; -#else - bool operator==( PhysicalDeviceMaintenance4Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance4 == rhs.maintenance4 ); -# endif - } - - bool operator!=( PhysicalDeviceMaintenance4Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance4Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 maintenance4 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMaintenance4Features; - }; - using PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; - - struct PhysicalDeviceMaintenance4Properties - { - using NativeType = VkPhysicalDeviceMaintenance4Properties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance4Properties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Properties( VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxBufferSize( maxBufferSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Properties( PhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance4Properties( VkPhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMaintenance4Properties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMaintenance4Properties & operator=( PhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMaintenance4Properties & operator=( VkPhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMaintenance4Properties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMaintenance4Properties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxBufferSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMaintenance4Properties const & ) const = default; -#else - bool operator==( PhysicalDeviceMaintenance4Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxBufferSize == rhs.maxBufferSize ); -# endif - } - - bool operator!=( PhysicalDeviceMaintenance4Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance4Properties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMaintenance4Properties; - }; - using PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; - - struct PhysicalDeviceMemoryBudgetPropertiesEXT - { - using NativeType = VkPhysicalDeviceMemoryBudgetPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryBudgetPropertiesEXT( std::array const & heapBudget_ = {}, - std::array const & heapUsage_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , heapBudget( heapBudget_ ) - , heapUsage( heapUsage_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryBudgetPropertiesEXT( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryBudgetPropertiesEXT( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMemoryBudgetPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMemoryBudgetPropertiesEXT & operator=( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryBudgetPropertiesEXT & operator=( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMemoryBudgetPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMemoryBudgetPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, heapBudget, heapUsage ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMemoryBudgetPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( heapBudget == rhs.heapBudget ) && ( heapUsage == rhs.heapUsage ); -# endif - } - - bool operator!=( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D heapBudget = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D heapUsage = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMemoryBudgetPropertiesEXT; - }; - - struct PhysicalDeviceMemoryPriorityFeaturesEXT - { - using NativeType = VkPhysicalDeviceMemoryPriorityFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryPriority( memoryPriority_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryPriorityFeaturesEXT( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMemoryPriorityFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMemoryPriorityFeaturesEXT & operator=( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryPriorityFeaturesEXT & operator=( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryPriorityFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryPriorityFeaturesEXT & setMemoryPriority( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ ) VULKAN_HPP_NOEXCEPT - { - memoryPriority = memoryPriority_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMemoryPriorityFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMemoryPriorityFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryPriority ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMemoryPriorityFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryPriority == rhs.memoryPriority ); -# endif - } - - bool operator!=( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 memoryPriority = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMemoryPriorityFeaturesEXT; - }; - - struct PhysicalDeviceMemoryProperties - { - using NativeType = VkPhysicalDeviceMemoryProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PhysicalDeviceMemoryProperties( uint32_t memoryTypeCount_ = {}, - std::array const & memoryTypes_ = {}, - uint32_t memoryHeapCount_ = {}, - std::array const & memoryHeaps_ = {} ) VULKAN_HPP_NOEXCEPT - : memoryTypeCount( memoryTypeCount_ ) - , memoryTypes( memoryTypes_ ) - , memoryHeapCount( memoryHeapCount_ ) - , memoryHeaps( memoryHeaps_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties( PhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryProperties( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMemoryProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMemoryProperties & operator=( PhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryProperties & operator=( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMemoryProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMemoryProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( memoryTypeCount, memoryTypes, memoryHeapCount, memoryHeaps ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMemoryProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( memoryTypeCount == rhs.memoryTypeCount ) && ( memoryTypes == rhs.memoryTypes ) && ( memoryHeapCount == rhs.memoryHeapCount ) && - ( memoryHeaps == rhs.memoryHeaps ); -# endif - } - - bool operator!=( PhysicalDeviceMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t memoryTypeCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D memoryTypes = {}; - uint32_t memoryHeapCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D memoryHeaps = {}; - }; - - struct PhysicalDeviceMemoryProperties2 - { - using NativeType = VkPhysicalDeviceMemoryProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryProperties( memoryProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties2( PhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryProperties2( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMemoryProperties2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMemoryProperties2 & operator=( PhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMemoryProperties2 & operator=( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMemoryProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMemoryProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMemoryProperties2 const & ) const = default; -#else - bool operator==( PhysicalDeviceMemoryProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryProperties == rhs.memoryProperties ); -# endif - } - - bool operator!=( PhysicalDeviceMemoryProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMemoryProperties2; - }; - using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; - - struct PhysicalDeviceMeshShaderFeaturesEXT - { - using NativeType = VkPhysicalDeviceMeshShaderFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 meshShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , taskShader( taskShader_ ) - , meshShader( meshShader_ ) - , multiviewMeshShader( multiviewMeshShader_ ) - , primitiveFragmentShadingRateMeshShader( primitiveFragmentShadingRateMeshShader_ ) - , meshShaderQueries( meshShaderQueries_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesEXT( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderFeaturesEXT( VkPhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMeshShaderFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMeshShaderFeaturesEXT & operator=( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderFeaturesEXT & operator=( VkPhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setTaskShader( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT - { - taskShader = taskShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setMeshShader( VULKAN_HPP_NAMESPACE::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT - { - meshShader = meshShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & - setMultiviewMeshShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader_ ) VULKAN_HPP_NOEXCEPT - { - multiviewMeshShader = multiviewMeshShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & - setPrimitiveFragmentShadingRateMeshShader( VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader_ ) VULKAN_HPP_NOEXCEPT - { - primitiveFragmentShadingRateMeshShader = primitiveFragmentShadingRateMeshShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setMeshShaderQueries( VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries_ ) VULKAN_HPP_NOEXCEPT - { - meshShaderQueries = meshShaderQueries_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMeshShaderFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMeshShaderFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, taskShader, meshShader, multiviewMeshShader, primitiveFragmentShadingRateMeshShader, meshShaderQueries ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMeshShaderFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( taskShader == rhs.taskShader ) && ( meshShader == rhs.meshShader ) && - ( multiviewMeshShader == rhs.multiviewMeshShader ) && ( primitiveFragmentShadingRateMeshShader == rhs.primitiveFragmentShadingRateMeshShader ) && - ( meshShaderQueries == rhs.meshShaderQueries ); -# endif - } - - bool operator!=( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 taskShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 meshShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMeshShaderFeaturesEXT; - }; - - struct PhysicalDeviceMeshShaderFeaturesNV - { - using NativeType = VkPhysicalDeviceMeshShaderFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 meshShader_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , taskShader( taskShader_ ) - , meshShader( meshShader_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderFeaturesNV( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMeshShaderFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMeshShaderFeaturesNV & operator=( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderFeaturesNV & operator=( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setTaskShader( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT - { - taskShader = taskShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setMeshShader( VULKAN_HPP_NAMESPACE::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT - { - meshShader = meshShader_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMeshShaderFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMeshShaderFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, taskShader, meshShader ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMeshShaderFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( taskShader == rhs.taskShader ) && ( meshShader == rhs.meshShader ); -# endif - } - - bool operator!=( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 taskShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 meshShader = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMeshShaderFeaturesNV; - }; - - struct PhysicalDeviceMeshShaderPropertiesEXT - { - using NativeType = VkPhysicalDeviceMeshShaderPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesEXT( uint32_t maxTaskWorkGroupTotalCount_ = {}, - std::array const & maxTaskWorkGroupCount_ = {}, - uint32_t maxTaskWorkGroupInvocations_ = {}, - std::array const & maxTaskWorkGroupSize_ = {}, - uint32_t maxTaskPayloadSize_ = {}, - uint32_t maxTaskSharedMemorySize_ = {}, - uint32_t maxTaskPayloadAndSharedMemorySize_ = {}, - uint32_t maxMeshWorkGroupTotalCount_ = {}, - std::array const & maxMeshWorkGroupCount_ = {}, - uint32_t maxMeshWorkGroupInvocations_ = {}, - std::array const & maxMeshWorkGroupSize_ = {}, - uint32_t maxMeshSharedMemorySize_ = {}, - uint32_t maxMeshPayloadAndSharedMemorySize_ = {}, - uint32_t maxMeshOutputMemorySize_ = {}, - uint32_t maxMeshPayloadAndOutputMemorySize_ = {}, - uint32_t maxMeshOutputComponents_ = {}, - uint32_t maxMeshOutputVertices_ = {}, - uint32_t maxMeshOutputPrimitives_ = {}, - uint32_t maxMeshOutputLayers_ = {}, - uint32_t maxMeshMultiviewViewCount_ = {}, - uint32_t meshOutputPerVertexGranularity_ = {}, - uint32_t meshOutputPerPrimitiveGranularity_ = {}, - uint32_t maxPreferredTaskWorkGroupInvocations_ = {}, - uint32_t maxPreferredMeshWorkGroupInvocations_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationVertexOutput_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationPrimitiveOutput_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 prefersCompactVertexOutput_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 prefersCompactPrimitiveOutput_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxTaskWorkGroupTotalCount( maxTaskWorkGroupTotalCount_ ) - , maxTaskWorkGroupCount( maxTaskWorkGroupCount_ ) - , maxTaskWorkGroupInvocations( maxTaskWorkGroupInvocations_ ) - , maxTaskWorkGroupSize( maxTaskWorkGroupSize_ ) - , maxTaskPayloadSize( maxTaskPayloadSize_ ) - , maxTaskSharedMemorySize( maxTaskSharedMemorySize_ ) - , maxTaskPayloadAndSharedMemorySize( maxTaskPayloadAndSharedMemorySize_ ) - , maxMeshWorkGroupTotalCount( maxMeshWorkGroupTotalCount_ ) - , maxMeshWorkGroupCount( maxMeshWorkGroupCount_ ) - , maxMeshWorkGroupInvocations( maxMeshWorkGroupInvocations_ ) - , maxMeshWorkGroupSize( maxMeshWorkGroupSize_ ) - , maxMeshSharedMemorySize( maxMeshSharedMemorySize_ ) - , maxMeshPayloadAndSharedMemorySize( maxMeshPayloadAndSharedMemorySize_ ) - , maxMeshOutputMemorySize( maxMeshOutputMemorySize_ ) - , maxMeshPayloadAndOutputMemorySize( maxMeshPayloadAndOutputMemorySize_ ) - , maxMeshOutputComponents( maxMeshOutputComponents_ ) - , maxMeshOutputVertices( maxMeshOutputVertices_ ) - , maxMeshOutputPrimitives( maxMeshOutputPrimitives_ ) - , maxMeshOutputLayers( maxMeshOutputLayers_ ) - , maxMeshMultiviewViewCount( maxMeshMultiviewViewCount_ ) - , meshOutputPerVertexGranularity( meshOutputPerVertexGranularity_ ) - , meshOutputPerPrimitiveGranularity( meshOutputPerPrimitiveGranularity_ ) - , maxPreferredTaskWorkGroupInvocations( maxPreferredTaskWorkGroupInvocations_ ) - , maxPreferredMeshWorkGroupInvocations( maxPreferredMeshWorkGroupInvocations_ ) - , prefersLocalInvocationVertexOutput( prefersLocalInvocationVertexOutput_ ) - , prefersLocalInvocationPrimitiveOutput( prefersLocalInvocationPrimitiveOutput_ ) - , prefersCompactVertexOutput( prefersCompactVertexOutput_ ) - , prefersCompactPrimitiveOutput( prefersCompactPrimitiveOutput_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesEXT( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderPropertiesEXT( VkPhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMeshShaderPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMeshShaderPropertiesEXT & operator=( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderPropertiesEXT & operator=( VkPhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMeshShaderPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMeshShaderPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxTaskWorkGroupTotalCount, - maxTaskWorkGroupCount, - maxTaskWorkGroupInvocations, - maxTaskWorkGroupSize, - maxTaskPayloadSize, - maxTaskSharedMemorySize, - maxTaskPayloadAndSharedMemorySize, - maxMeshWorkGroupTotalCount, - maxMeshWorkGroupCount, - maxMeshWorkGroupInvocations, - maxMeshWorkGroupSize, - maxMeshSharedMemorySize, - maxMeshPayloadAndSharedMemorySize, - maxMeshOutputMemorySize, - maxMeshPayloadAndOutputMemorySize, - maxMeshOutputComponents, - maxMeshOutputVertices, - maxMeshOutputPrimitives, - maxMeshOutputLayers, - maxMeshMultiviewViewCount, - meshOutputPerVertexGranularity, - meshOutputPerPrimitiveGranularity, - maxPreferredTaskWorkGroupInvocations, - maxPreferredMeshWorkGroupInvocations, - prefersLocalInvocationVertexOutput, - prefersLocalInvocationPrimitiveOutput, - prefersCompactVertexOutput, - prefersCompactPrimitiveOutput ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMeshShaderPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTaskWorkGroupTotalCount == rhs.maxTaskWorkGroupTotalCount ) && - ( maxTaskWorkGroupCount == rhs.maxTaskWorkGroupCount ) && ( maxTaskWorkGroupInvocations == rhs.maxTaskWorkGroupInvocations ) && - ( maxTaskWorkGroupSize == rhs.maxTaskWorkGroupSize ) && ( maxTaskPayloadSize == rhs.maxTaskPayloadSize ) && - ( maxTaskSharedMemorySize == rhs.maxTaskSharedMemorySize ) && ( maxTaskPayloadAndSharedMemorySize == rhs.maxTaskPayloadAndSharedMemorySize ) && - ( maxMeshWorkGroupTotalCount == rhs.maxMeshWorkGroupTotalCount ) && ( maxMeshWorkGroupCount == rhs.maxMeshWorkGroupCount ) && - ( maxMeshWorkGroupInvocations == rhs.maxMeshWorkGroupInvocations ) && ( maxMeshWorkGroupSize == rhs.maxMeshWorkGroupSize ) && - ( maxMeshSharedMemorySize == rhs.maxMeshSharedMemorySize ) && ( maxMeshPayloadAndSharedMemorySize == rhs.maxMeshPayloadAndSharedMemorySize ) && - ( maxMeshOutputMemorySize == rhs.maxMeshOutputMemorySize ) && ( maxMeshPayloadAndOutputMemorySize == rhs.maxMeshPayloadAndOutputMemorySize ) && - ( maxMeshOutputComponents == rhs.maxMeshOutputComponents ) && ( maxMeshOutputVertices == rhs.maxMeshOutputVertices ) && - ( maxMeshOutputPrimitives == rhs.maxMeshOutputPrimitives ) && ( maxMeshOutputLayers == rhs.maxMeshOutputLayers ) && - ( maxMeshMultiviewViewCount == rhs.maxMeshMultiviewViewCount ) && ( meshOutputPerVertexGranularity == rhs.meshOutputPerVertexGranularity ) && - ( meshOutputPerPrimitiveGranularity == rhs.meshOutputPerPrimitiveGranularity ) && - ( maxPreferredTaskWorkGroupInvocations == rhs.maxPreferredTaskWorkGroupInvocations ) && - ( maxPreferredMeshWorkGroupInvocations == rhs.maxPreferredMeshWorkGroupInvocations ) && - ( prefersLocalInvocationVertexOutput == rhs.prefersLocalInvocationVertexOutput ) && - ( prefersLocalInvocationPrimitiveOutput == rhs.prefersLocalInvocationPrimitiveOutput ) && - ( prefersCompactVertexOutput == rhs.prefersCompactVertexOutput ) && ( prefersCompactPrimitiveOutput == rhs.prefersCompactPrimitiveOutput ); -# endif - } - - bool operator!=( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesEXT; - void * pNext = {}; - uint32_t maxTaskWorkGroupTotalCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupCount = {}; - uint32_t maxTaskWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupSize = {}; - uint32_t maxTaskPayloadSize = {}; - uint32_t maxTaskSharedMemorySize = {}; - uint32_t maxTaskPayloadAndSharedMemorySize = {}; - uint32_t maxMeshWorkGroupTotalCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupCount = {}; - uint32_t maxMeshWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupSize = {}; - uint32_t maxMeshSharedMemorySize = {}; - uint32_t maxMeshPayloadAndSharedMemorySize = {}; - uint32_t maxMeshOutputMemorySize = {}; - uint32_t maxMeshPayloadAndOutputMemorySize = {}; - uint32_t maxMeshOutputComponents = {}; - uint32_t maxMeshOutputVertices = {}; - uint32_t maxMeshOutputPrimitives = {}; - uint32_t maxMeshOutputLayers = {}; - uint32_t maxMeshMultiviewViewCount = {}; - uint32_t meshOutputPerVertexGranularity = {}; - uint32_t meshOutputPerPrimitiveGranularity = {}; - uint32_t maxPreferredTaskWorkGroupInvocations = {}; - uint32_t maxPreferredMeshWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationVertexOutput = {}; - VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationPrimitiveOutput = {}; - VULKAN_HPP_NAMESPACE::Bool32 prefersCompactVertexOutput = {}; - VULKAN_HPP_NAMESPACE::Bool32 prefersCompactPrimitiveOutput = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMeshShaderPropertiesEXT; - }; - - struct PhysicalDeviceMeshShaderPropertiesNV - { - using NativeType = VkPhysicalDeviceMeshShaderPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesNV( uint32_t maxDrawMeshTasksCount_ = {}, - uint32_t maxTaskWorkGroupInvocations_ = {}, - std::array const & maxTaskWorkGroupSize_ = {}, - uint32_t maxTaskTotalMemorySize_ = {}, - uint32_t maxTaskOutputCount_ = {}, - uint32_t maxMeshWorkGroupInvocations_ = {}, - std::array const & maxMeshWorkGroupSize_ = {}, - uint32_t maxMeshTotalMemorySize_ = {}, - uint32_t maxMeshOutputVertices_ = {}, - uint32_t maxMeshOutputPrimitives_ = {}, - uint32_t maxMeshMultiviewViewCount_ = {}, - uint32_t meshOutputPerVertexGranularity_ = {}, - uint32_t meshOutputPerPrimitiveGranularity_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxDrawMeshTasksCount( maxDrawMeshTasksCount_ ) - , maxTaskWorkGroupInvocations( maxTaskWorkGroupInvocations_ ) - , maxTaskWorkGroupSize( maxTaskWorkGroupSize_ ) - , maxTaskTotalMemorySize( maxTaskTotalMemorySize_ ) - , maxTaskOutputCount( maxTaskOutputCount_ ) - , maxMeshWorkGroupInvocations( maxMeshWorkGroupInvocations_ ) - , maxMeshWorkGroupSize( maxMeshWorkGroupSize_ ) - , maxMeshTotalMemorySize( maxMeshTotalMemorySize_ ) - , maxMeshOutputVertices( maxMeshOutputVertices_ ) - , maxMeshOutputPrimitives( maxMeshOutputPrimitives_ ) - , maxMeshMultiviewViewCount( maxMeshMultiviewViewCount_ ) - , meshOutputPerVertexGranularity( meshOutputPerVertexGranularity_ ) - , meshOutputPerPrimitiveGranularity( meshOutputPerPrimitiveGranularity_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesNV( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderPropertiesNV( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMeshShaderPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMeshShaderPropertiesNV & operator=( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMeshShaderPropertiesNV & operator=( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMeshShaderPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMeshShaderPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxDrawMeshTasksCount, - maxTaskWorkGroupInvocations, - maxTaskWorkGroupSize, - maxTaskTotalMemorySize, - maxTaskOutputCount, - maxMeshWorkGroupInvocations, - maxMeshWorkGroupSize, - maxMeshTotalMemorySize, - maxMeshOutputVertices, - maxMeshOutputPrimitives, - maxMeshMultiviewViewCount, - meshOutputPerVertexGranularity, - meshOutputPerPrimitiveGranularity ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMeshShaderPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxDrawMeshTasksCount == rhs.maxDrawMeshTasksCount ) && - ( maxTaskWorkGroupInvocations == rhs.maxTaskWorkGroupInvocations ) && ( maxTaskWorkGroupSize == rhs.maxTaskWorkGroupSize ) && - ( maxTaskTotalMemorySize == rhs.maxTaskTotalMemorySize ) && ( maxTaskOutputCount == rhs.maxTaskOutputCount ) && - ( maxMeshWorkGroupInvocations == rhs.maxMeshWorkGroupInvocations ) && ( maxMeshWorkGroupSize == rhs.maxMeshWorkGroupSize ) && - ( maxMeshTotalMemorySize == rhs.maxMeshTotalMemorySize ) && ( maxMeshOutputVertices == rhs.maxMeshOutputVertices ) && - ( maxMeshOutputPrimitives == rhs.maxMeshOutputPrimitives ) && ( maxMeshMultiviewViewCount == rhs.maxMeshMultiviewViewCount ) && - ( meshOutputPerVertexGranularity == rhs.meshOutputPerVertexGranularity ) && - ( meshOutputPerPrimitiveGranularity == rhs.meshOutputPerPrimitiveGranularity ); -# endif - } - - bool operator!=( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV; - void * pNext = {}; - uint32_t maxDrawMeshTasksCount = {}; - uint32_t maxTaskWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupSize = {}; - uint32_t maxTaskTotalMemorySize = {}; - uint32_t maxTaskOutputCount = {}; - uint32_t maxMeshWorkGroupInvocations = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupSize = {}; - uint32_t maxMeshTotalMemorySize = {}; - uint32_t maxMeshOutputVertices = {}; - uint32_t maxMeshOutputPrimitives = {}; - uint32_t maxMeshMultiviewViewCount = {}; - uint32_t meshOutputPerVertexGranularity = {}; - uint32_t meshOutputPerPrimitiveGranularity = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMeshShaderPropertiesNV; - }; - - struct PhysicalDeviceMultiDrawFeaturesEXT - { - using NativeType = VkPhysicalDeviceMultiDrawFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiDrawFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 multiDraw_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , multiDraw( multiDraw_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawFeaturesEXT( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiDrawFeaturesEXT( VkPhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultiDrawFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultiDrawFeaturesEXT & operator=( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiDrawFeaturesEXT & operator=( VkPhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiDrawFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiDrawFeaturesEXT & setMultiDraw( VULKAN_HPP_NAMESPACE::Bool32 multiDraw_ ) VULKAN_HPP_NOEXCEPT - { - multiDraw = multiDraw_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMultiDrawFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultiDrawFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, multiDraw ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultiDrawFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiDraw == rhs.multiDraw ); -# endif - } - - bool operator!=( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiDrawFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiDraw = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultiDrawFeaturesEXT; - }; - - struct PhysicalDeviceMultiDrawPropertiesEXT - { - using NativeType = VkPhysicalDeviceMultiDrawPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiDrawPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawPropertiesEXT( uint32_t maxMultiDrawCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxMultiDrawCount( maxMultiDrawCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawPropertiesEXT( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiDrawPropertiesEXT( VkPhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultiDrawPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultiDrawPropertiesEXT & operator=( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiDrawPropertiesEXT & operator=( VkPhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMultiDrawPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultiDrawPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxMultiDrawCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultiDrawPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxMultiDrawCount == rhs.maxMultiDrawCount ); -# endif - } - - bool operator!=( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiDrawPropertiesEXT; - void * pNext = {}; - uint32_t maxMultiDrawCount = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultiDrawPropertiesEXT; - }; - - struct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT - { - using NativeType = VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , multisampledRenderToSingleSampled( multisampledRenderToSingleSampled_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( - *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & - operator=( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & - operator=( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & - setMultisampledRenderToSingleSampled( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled_ ) VULKAN_HPP_NOEXCEPT - { - multisampledRenderToSingleSampled = multisampledRenderToSingleSampled_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, multisampledRenderToSingleSampled ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multisampledRenderToSingleSampled == rhs.multisampledRenderToSingleSampled ); -# endif - } - - bool operator!=( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; - }; - - struct PhysicalDeviceMultiviewFeatures - { - using NativeType = VkPhysicalDeviceMultiviewFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( VULKAN_HPP_NAMESPACE::Bool32 multiview_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , multiview( multiview_ ) - , multiviewGeometryShader( multiviewGeometryShader_ ) - , multiviewTessellationShader( multiviewTessellationShader_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( PhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewFeatures( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultiviewFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultiviewFeatures & operator=( PhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewFeatures & operator=( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT - { - multiview = multiview_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & - setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT - { - multiviewGeometryShader = multiviewGeometryShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & - setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT - { - multiviewTessellationShader = multiviewTessellationShader_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMultiviewFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultiviewFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, multiview, multiviewGeometryShader, multiviewTessellationShader ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultiviewFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceMultiviewFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiview == rhs.multiview ) && ( multiviewGeometryShader == rhs.multiviewGeometryShader ) && - ( multiviewTessellationShader == rhs.multiviewTessellationShader ); -# endif - } - - bool operator!=( PhysicalDeviceMultiviewFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiview = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultiviewFeatures; - }; - using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; - - struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX - { - using NativeType = VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , perViewPositionAllComponents( perViewPositionAllComponents_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX & - operator=( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX & operator=( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, perViewPositionAllComponents ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & ) const = default; -#else - bool operator==( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perViewPositionAllComponents == rhs.perViewPositionAllComponents ); -# endif - } - - bool operator!=( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - }; - - struct PhysicalDeviceMultiviewProperties - { - using NativeType = VkPhysicalDeviceMultiviewProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewProperties( uint32_t maxMultiviewViewCount_ = {}, - uint32_t maxMultiviewInstanceIndex_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxMultiviewViewCount( maxMultiviewViewCount_ ) - , maxMultiviewInstanceIndex( maxMultiviewInstanceIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewProperties( PhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewProperties( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMultiviewProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMultiviewProperties & operator=( PhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMultiviewProperties & operator=( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceMultiviewProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMultiviewProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxMultiviewViewCount, maxMultiviewInstanceIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMultiviewProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceMultiviewProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxMultiviewViewCount == rhs.maxMultiviewViewCount ) && - ( maxMultiviewInstanceIndex == rhs.maxMultiviewInstanceIndex ); -# endif - } - - bool operator!=( PhysicalDeviceMultiviewProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewProperties; - void * pNext = {}; - uint32_t maxMultiviewViewCount = {}; - uint32_t maxMultiviewInstanceIndex = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMultiviewProperties; - }; - using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; - - struct PhysicalDeviceMutableDescriptorTypeFeaturesVALVE - { - using NativeType = VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesVALVE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceMutableDescriptorTypeFeaturesVALVE( VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mutableDescriptorType( mutableDescriptorType_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceMutableDescriptorTypeFeaturesVALVE( PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMutableDescriptorTypeFeaturesVALVE( VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceMutableDescriptorTypeFeaturesVALVE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceMutableDescriptorTypeFeaturesVALVE & operator=( PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceMutableDescriptorTypeFeaturesVALVE & operator=( VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMutableDescriptorTypeFeaturesVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMutableDescriptorTypeFeaturesVALVE & - setMutableDescriptorType( VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType_ ) VULKAN_HPP_NOEXCEPT - { - mutableDescriptorType = mutableDescriptorType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mutableDescriptorType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & ) const = default; -#else - bool operator==( PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mutableDescriptorType == rhs.mutableDescriptorType ); -# endif - } - - bool operator!=( PhysicalDeviceMutableDescriptorTypeFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesVALVE; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceMutableDescriptorTypeFeaturesVALVE; - }; - - struct PhysicalDeviceNonSeamlessCubeMapFeaturesEXT - { - using NativeType = VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , nonSeamlessCubeMap( nonSeamlessCubeMap_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & operator=( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & operator=( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & - setNonSeamlessCubeMap( VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap_ ) VULKAN_HPP_NOEXCEPT - { - nonSeamlessCubeMap = nonSeamlessCubeMap_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, nonSeamlessCubeMap ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( nonSeamlessCubeMap == rhs.nonSeamlessCubeMap ); -# endif - } - - bool operator!=( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceNonSeamlessCubeMapFeaturesEXT; - }; - - struct PhysicalDevicePCIBusInfoPropertiesEXT - { - using NativeType = VkPhysicalDevicePCIBusInfoPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePCIBusInfoPropertiesEXT( - uint32_t pciDomain_ = {}, uint32_t pciBus_ = {}, uint32_t pciDevice_ = {}, uint32_t pciFunction_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pciDomain( pciDomain_ ) - , pciBus( pciBus_ ) - , pciDevice( pciDevice_ ) - , pciFunction( pciFunction_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePCIBusInfoPropertiesEXT( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePCIBusInfoPropertiesEXT( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePCIBusInfoPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePCIBusInfoPropertiesEXT & operator=( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePCIBusInfoPropertiesEXT & operator=( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDevicePCIBusInfoPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePCIBusInfoPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pciDomain, pciBus, pciDevice, pciFunction ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePCIBusInfoPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pciDomain == rhs.pciDomain ) && ( pciBus == rhs.pciBus ) && ( pciDevice == rhs.pciDevice ) && - ( pciFunction == rhs.pciFunction ); -# endif - } - - bool operator!=( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT; - void * pNext = {}; - uint32_t pciDomain = {}; - uint32_t pciBus = {}; - uint32_t pciDevice = {}; - uint32_t pciFunction = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePCIBusInfoPropertiesEXT; - }; - - struct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT - { - using NativeType = VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pageableDeviceLocalMemory( pageableDeviceLocalMemory_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & - operator=( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & operator=( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & - setPageableDeviceLocalMemory( VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory_ ) VULKAN_HPP_NOEXCEPT - { - pageableDeviceLocalMemory = pageableDeviceLocalMemory_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pageableDeviceLocalMemory ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pageableDeviceLocalMemory == rhs.pageableDeviceLocalMemory ); -# endif - } - - bool operator!=( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; - }; - - struct PhysicalDevicePerformanceQueryFeaturesKHR - { - using NativeType = VkPhysicalDevicePerformanceQueryFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , performanceCounterQueryPools( performanceCounterQueryPools_ ) - , performanceCounterMultipleQueryPools( performanceCounterMultipleQueryPools_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryFeaturesKHR( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePerformanceQueryFeaturesKHR( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePerformanceQueryFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePerformanceQueryFeaturesKHR & operator=( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePerformanceQueryFeaturesKHR & operator=( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & - setPerformanceCounterQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ ) VULKAN_HPP_NOEXCEPT - { - performanceCounterQueryPools = performanceCounterQueryPools_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & - setPerformanceCounterMultipleQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ ) VULKAN_HPP_NOEXCEPT - { - performanceCounterMultipleQueryPools = performanceCounterMultipleQueryPools_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePerformanceQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePerformanceQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, performanceCounterQueryPools, performanceCounterMultipleQueryPools ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePerformanceQueryFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( performanceCounterQueryPools == rhs.performanceCounterQueryPools ) && - ( performanceCounterMultipleQueryPools == rhs.performanceCounterMultipleQueryPools ); -# endif - } - - bool operator!=( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools = {}; - VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePerformanceQueryFeaturesKHR; - }; - - struct PhysicalDevicePerformanceQueryPropertiesKHR - { - using NativeType = VkPhysicalDevicePerformanceQueryPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , allowCommandBufferQueryCopies( allowCommandBufferQueryCopies_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryPropertiesKHR( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePerformanceQueryPropertiesKHR( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePerformanceQueryPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePerformanceQueryPropertiesKHR & operator=( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePerformanceQueryPropertiesKHR & operator=( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDevicePerformanceQueryPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePerformanceQueryPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, allowCommandBufferQueryCopies ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePerformanceQueryPropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allowCommandBufferQueryCopies == rhs.allowCommandBufferQueryCopies ); -# endif - } - - bool operator!=( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePerformanceQueryPropertiesKHR; - }; - - struct PhysicalDevicePipelineCreationCacheControlFeatures - { - using NativeType = VkPhysicalDevicePipelineCreationCacheControlFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineCreationCacheControlFeatures( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineCreationCacheControl( pipelineCreationCacheControl_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePipelineCreationCacheControlFeatures( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineCreationCacheControlFeatures( VkPhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePipelineCreationCacheControlFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePipelineCreationCacheControlFeatures & - operator=( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineCreationCacheControlFeatures & operator=( VkPhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineCreationCacheControlFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineCreationCacheControlFeatures & - setPipelineCreationCacheControl( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ ) VULKAN_HPP_NOEXCEPT - { - pipelineCreationCacheControl = pipelineCreationCacheControl_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePipelineCreationCacheControlFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePipelineCreationCacheControlFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineCreationCacheControl ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePipelineCreationCacheControlFeatures const & ) const = default; -#else - bool operator==( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineCreationCacheControl == rhs.pipelineCreationCacheControl ); -# endif - } - - bool operator!=( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePipelineCreationCacheControlFeatures; - }; - using PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; - - struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR - { - using NativeType = VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineExecutableInfo( pipelineExecutableInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & - operator=( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & operator=( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & - setPipelineExecutableInfo( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ ) VULKAN_HPP_NOEXCEPT - { - pipelineExecutableInfo = pipelineExecutableInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineExecutableInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineExecutableInfo == rhs.pipelineExecutableInfo ); -# endif - } - - bool operator!=( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePipelineExecutablePropertiesFeaturesKHR; - }; - - struct PhysicalDevicePipelinePropertiesFeaturesEXT - { - using NativeType = VkPhysicalDevicePipelinePropertiesFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelinePropertiesFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelinePropertiesIdentifier( pipelinePropertiesIdentifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelinePropertiesFeaturesEXT( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelinePropertiesFeaturesEXT( VkPhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePipelinePropertiesFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePipelinePropertiesFeaturesEXT & operator=( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelinePropertiesFeaturesEXT & operator=( VkPhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelinePropertiesFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelinePropertiesFeaturesEXT & - setPipelinePropertiesIdentifier( VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier_ ) VULKAN_HPP_NOEXCEPT - { - pipelinePropertiesIdentifier = pipelinePropertiesIdentifier_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePipelinePropertiesFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePipelinePropertiesFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelinePropertiesIdentifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePipelinePropertiesFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelinePropertiesIdentifier == rhs.pipelinePropertiesIdentifier ); -# endif - } - - bool operator!=( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePipelinePropertiesFeaturesEXT; - }; - - struct PhysicalDevicePipelineRobustnessFeaturesEXT - { - using NativeType = VkPhysicalDevicePipelineRobustnessFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineRobustnessFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineRobustness( pipelineRobustness_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessFeaturesEXT( PhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineRobustnessFeaturesEXT( VkPhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePipelineRobustnessFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePipelineRobustnessFeaturesEXT & operator=( PhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineRobustnessFeaturesEXT & operator=( VkPhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineRobustnessFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineRobustnessFeaturesEXT & - setPipelineRobustness( VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ ) VULKAN_HPP_NOEXCEPT - { - pipelineRobustness = pipelineRobustness_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePipelineRobustnessFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePipelineRobustnessFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineRobustness ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePipelineRobustnessFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineRobustness == rhs.pipelineRobustness ); -# endif - } - - bool operator!=( PhysicalDevicePipelineRobustnessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineRobustnessFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePipelineRobustnessFeaturesEXT; - }; - - struct PhysicalDevicePipelineRobustnessPropertiesEXT - { - using NativeType = VkPhysicalDevicePipelineRobustnessPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineRobustnessPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDevicePipelineRobustnessPropertiesEXT( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessStorageBuffers_ = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessUniformBuffers_ = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessVertexInputs_ = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT defaultRobustnessImages_ = - VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT::eDeviceDefault, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , defaultRobustnessStorageBuffers( defaultRobustnessStorageBuffers_ ) - , defaultRobustnessUniformBuffers( defaultRobustnessUniformBuffers_ ) - , defaultRobustnessVertexInputs( defaultRobustnessVertexInputs_ ) - , defaultRobustnessImages( defaultRobustnessImages_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePipelineRobustnessPropertiesEXT( PhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineRobustnessPropertiesEXT( VkPhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePipelineRobustnessPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePipelineRobustnessPropertiesEXT & operator=( PhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePipelineRobustnessPropertiesEXT & operator=( VkPhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDevicePipelineRobustnessPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePipelineRobustnessPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, defaultRobustnessStorageBuffers, defaultRobustnessUniformBuffers, defaultRobustnessVertexInputs, defaultRobustnessImages ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePipelineRobustnessPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( defaultRobustnessStorageBuffers == rhs.defaultRobustnessStorageBuffers ) && - ( defaultRobustnessUniformBuffers == rhs.defaultRobustnessUniformBuffers ) && - ( defaultRobustnessVertexInputs == rhs.defaultRobustnessVertexInputs ) && ( defaultRobustnessImages == rhs.defaultRobustnessImages ); -# endif - } - - bool operator!=( PhysicalDevicePipelineRobustnessPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineRobustnessPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessStorageBuffers = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessUniformBuffers = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT defaultRobustnessVertexInputs = - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT defaultRobustnessImages = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT::eDeviceDefault; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePipelineRobustnessPropertiesEXT; - }; - - struct PhysicalDevicePointClippingProperties - { - using NativeType = VkPhysicalDevicePointClippingProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePointClippingProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePointClippingProperties( - VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pointClippingBehavior( pointClippingBehavior_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePointClippingProperties( PhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePointClippingProperties( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePointClippingProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePointClippingProperties & operator=( PhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePointClippingProperties & operator=( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDevicePointClippingProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePointClippingProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pointClippingBehavior ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePointClippingProperties const & ) const = default; -#else - bool operator==( PhysicalDevicePointClippingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pointClippingBehavior == rhs.pointClippingBehavior ); -# endif - } - - bool operator!=( PhysicalDevicePointClippingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePointClippingProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePointClippingProperties; - }; - using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct PhysicalDevicePortabilitySubsetFeaturesKHR - { - using NativeType = VkPhysicalDevicePortabilitySubsetFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 events_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 pointPolygons_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 triangleFans_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , constantAlphaColorBlendFactors( constantAlphaColorBlendFactors_ ) - , events( events_ ) - , imageViewFormatReinterpretation( imageViewFormatReinterpretation_ ) - , imageViewFormatSwizzle( imageViewFormatSwizzle_ ) - , imageView2DOn3DImage( imageView2DOn3DImage_ ) - , multisampleArrayImage( multisampleArrayImage_ ) - , mutableComparisonSamplers( mutableComparisonSamplers_ ) - , pointPolygons( pointPolygons_ ) - , samplerMipLodBias( samplerMipLodBias_ ) - , separateStencilMaskRef( separateStencilMaskRef_ ) - , shaderSampleRateInterpolationFunctions( shaderSampleRateInterpolationFunctions_ ) - , tessellationIsolines( tessellationIsolines_ ) - , tessellationPointMode( tessellationPointMode_ ) - , triangleFans( triangleFans_ ) - , vertexAttributeAccessBeyondStride( vertexAttributeAccessBeyondStride_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetFeaturesKHR( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePortabilitySubsetFeaturesKHR( VkPhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePortabilitySubsetFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePortabilitySubsetFeaturesKHR & operator=( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePortabilitySubsetFeaturesKHR & operator=( VkPhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setConstantAlphaColorBlendFactors( VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors_ ) VULKAN_HPP_NOEXCEPT - { - constantAlphaColorBlendFactors = constantAlphaColorBlendFactors_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setEvents( VULKAN_HPP_NAMESPACE::Bool32 events_ ) VULKAN_HPP_NOEXCEPT - { - events = events_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setImageViewFormatReinterpretation( VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation_ ) VULKAN_HPP_NOEXCEPT - { - imageViewFormatReinterpretation = imageViewFormatReinterpretation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setImageViewFormatSwizzle( VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle_ ) VULKAN_HPP_NOEXCEPT - { - imageViewFormatSwizzle = imageViewFormatSwizzle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setImageView2DOn3DImage( VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage_ ) VULKAN_HPP_NOEXCEPT - { - imageView2DOn3DImage = imageView2DOn3DImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setMultisampleArrayImage( VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage_ ) VULKAN_HPP_NOEXCEPT - { - multisampleArrayImage = multisampleArrayImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setMutableComparisonSamplers( VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers_ ) VULKAN_HPP_NOEXCEPT - { - mutableComparisonSamplers = mutableComparisonSamplers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setPointPolygons( VULKAN_HPP_NAMESPACE::Bool32 pointPolygons_ ) VULKAN_HPP_NOEXCEPT - { - pointPolygons = pointPolygons_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setSamplerMipLodBias( VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias_ ) VULKAN_HPP_NOEXCEPT - { - samplerMipLodBias = samplerMipLodBias_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setSeparateStencilMaskRef( VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef_ ) VULKAN_HPP_NOEXCEPT - { - separateStencilMaskRef = separateStencilMaskRef_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setShaderSampleRateInterpolationFunctions( VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions_ ) VULKAN_HPP_NOEXCEPT - { - shaderSampleRateInterpolationFunctions = shaderSampleRateInterpolationFunctions_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setTessellationIsolines( VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines_ ) VULKAN_HPP_NOEXCEPT - { - tessellationIsolines = tessellationIsolines_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setTessellationPointMode( VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode_ ) VULKAN_HPP_NOEXCEPT - { - tessellationPointMode = tessellationPointMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setTriangleFans( VULKAN_HPP_NAMESPACE::Bool32 triangleFans_ ) VULKAN_HPP_NOEXCEPT - { - triangleFans = triangleFans_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & - setVertexAttributeAccessBeyondStride( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride_ ) VULKAN_HPP_NOEXCEPT - { - vertexAttributeAccessBeyondStride = vertexAttributeAccessBeyondStride_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePortabilitySubsetFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePortabilitySubsetFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - constantAlphaColorBlendFactors, - events, - imageViewFormatReinterpretation, - imageViewFormatSwizzle, - imageView2DOn3DImage, - multisampleArrayImage, - mutableComparisonSamplers, - pointPolygons, - samplerMipLodBias, - separateStencilMaskRef, - shaderSampleRateInterpolationFunctions, - tessellationIsolines, - tessellationPointMode, - triangleFans, - vertexAttributeAccessBeyondStride ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePortabilitySubsetFeaturesKHR const & ) const = default; -# else - bool operator==( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( constantAlphaColorBlendFactors == rhs.constantAlphaColorBlendFactors ) && - ( events == rhs.events ) && ( imageViewFormatReinterpretation == rhs.imageViewFormatReinterpretation ) && - ( imageViewFormatSwizzle == rhs.imageViewFormatSwizzle ) && ( imageView2DOn3DImage == rhs.imageView2DOn3DImage ) && - ( multisampleArrayImage == rhs.multisampleArrayImage ) && ( mutableComparisonSamplers == rhs.mutableComparisonSamplers ) && - ( pointPolygons == rhs.pointPolygons ) && ( samplerMipLodBias == rhs.samplerMipLodBias ) && - ( separateStencilMaskRef == rhs.separateStencilMaskRef ) && - ( shaderSampleRateInterpolationFunctions == rhs.shaderSampleRateInterpolationFunctions ) && ( tessellationIsolines == rhs.tessellationIsolines ) && - ( tessellationPointMode == rhs.tessellationPointMode ) && ( triangleFans == rhs.triangleFans ) && - ( vertexAttributeAccessBeyondStride == rhs.vertexAttributeAccessBeyondStride ); -# endif - } - - bool operator!=( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors = {}; - VULKAN_HPP_NAMESPACE::Bool32 events = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage = {}; - VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage = {}; - VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers = {}; - VULKAN_HPP_NAMESPACE::Bool32 pointPolygons = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias = {}; - VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions = {}; - VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines = {}; - VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode = {}; - VULKAN_HPP_NAMESPACE::Bool32 triangleFans = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePortabilitySubsetFeaturesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct PhysicalDevicePortabilitySubsetPropertiesKHR - { - using NativeType = VkPhysicalDevicePortabilitySubsetPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetPropertiesKHR( uint32_t minVertexInputBindingStrideAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minVertexInputBindingStrideAlignment( minVertexInputBindingStrideAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetPropertiesKHR( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePortabilitySubsetPropertiesKHR( VkPhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePortabilitySubsetPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePortabilitySubsetPropertiesKHR & operator=( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePortabilitySubsetPropertiesKHR & operator=( VkPhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetPropertiesKHR & - setMinVertexInputBindingStrideAlignment( uint32_t minVertexInputBindingStrideAlignment_ ) VULKAN_HPP_NOEXCEPT - { - minVertexInputBindingStrideAlignment = minVertexInputBindingStrideAlignment_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePortabilitySubsetPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePortabilitySubsetPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minVertexInputBindingStrideAlignment ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePortabilitySubsetPropertiesKHR const & ) const = default; -# else - bool operator==( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minVertexInputBindingStrideAlignment == rhs.minVertexInputBindingStrideAlignment ); -# endif - } - - bool operator!=( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR; - void * pNext = {}; - uint32_t minVertexInputBindingStrideAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePortabilitySubsetPropertiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - struct PhysicalDevicePresentIdFeaturesKHR - { - using NativeType = VkPhysicalDevicePresentIdFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentIdFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePresentIdFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentId_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , presentId( presentId_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePresentIdFeaturesKHR( PhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePresentIdFeaturesKHR( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePresentIdFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePresentIdFeaturesKHR & operator=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePresentIdFeaturesKHR & operator=( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentIdFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentIdFeaturesKHR & setPresentId( VULKAN_HPP_NAMESPACE::Bool32 presentId_ ) VULKAN_HPP_NOEXCEPT - { - presentId = presentId_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePresentIdFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePresentIdFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, presentId ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePresentIdFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentId == rhs.presentId ); -# endif - } - - bool operator!=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentIdFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 presentId = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePresentIdFeaturesKHR; - }; - - struct PhysicalDevicePresentWaitFeaturesKHR - { - using NativeType = VkPhysicalDevicePresentWaitFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentWaitFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePresentWaitFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , presentWait( presentWait_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePresentWaitFeaturesKHR( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePresentWaitFeaturesKHR( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePresentWaitFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePresentWaitFeaturesKHR & operator=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePresentWaitFeaturesKHR & operator=( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentWaitFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentWaitFeaturesKHR & setPresentWait( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ ) VULKAN_HPP_NOEXCEPT - { - presentWait = presentWait_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePresentWaitFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePresentWaitFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, presentWait ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePresentWaitFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentWait == rhs.presentWait ); -# endif - } - - bool operator!=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentWaitFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 presentWait = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePresentWaitFeaturesKHR; - }; - - struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT - { - using NativeType = VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , primitiveTopologyListRestart( primitiveTopologyListRestart_ ) - , primitiveTopologyPatchListRestart( primitiveTopologyPatchListRestart_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & - operator=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & operator=( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & - setPrimitiveTopologyListRestart( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ ) VULKAN_HPP_NOEXCEPT - { - primitiveTopologyListRestart = primitiveTopologyListRestart_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & - setPrimitiveTopologyPatchListRestart( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ ) VULKAN_HPP_NOEXCEPT - { - primitiveTopologyPatchListRestart = primitiveTopologyPatchListRestart_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, primitiveTopologyListRestart, primitiveTopologyPatchListRestart ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitiveTopologyListRestart == rhs.primitiveTopologyListRestart ) && - ( primitiveTopologyPatchListRestart == rhs.primitiveTopologyPatchListRestart ); -# endif - } - - bool operator!=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; - }; - - struct PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT - { - using NativeType = VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , primitivesGeneratedQuery( primitivesGeneratedQuery_ ) - , primitivesGeneratedQueryWithRasterizerDiscard( primitivesGeneratedQueryWithRasterizerDiscard_ ) - , primitivesGeneratedQueryWithNonZeroStreams( primitivesGeneratedQueryWithNonZeroStreams_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & - operator=( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & operator=( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & - setPrimitivesGeneratedQuery( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery_ ) VULKAN_HPP_NOEXCEPT - { - primitivesGeneratedQuery = primitivesGeneratedQuery_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & - setPrimitivesGeneratedQueryWithRasterizerDiscard( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard_ ) VULKAN_HPP_NOEXCEPT - { - primitivesGeneratedQueryWithRasterizerDiscard = primitivesGeneratedQueryWithRasterizerDiscard_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & - setPrimitivesGeneratedQueryWithNonZeroStreams( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams_ ) VULKAN_HPP_NOEXCEPT - { - primitivesGeneratedQueryWithNonZeroStreams = primitivesGeneratedQueryWithNonZeroStreams_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, primitivesGeneratedQuery, primitivesGeneratedQueryWithRasterizerDiscard, primitivesGeneratedQueryWithNonZeroStreams ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitivesGeneratedQuery == rhs.primitivesGeneratedQuery ) && - ( primitivesGeneratedQueryWithRasterizerDiscard == rhs.primitivesGeneratedQueryWithRasterizerDiscard ) && - ( primitivesGeneratedQueryWithNonZeroStreams == rhs.primitivesGeneratedQueryWithNonZeroStreams ); -# endif - } - - bool operator!=( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard = {}; - VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; - }; - - struct PhysicalDevicePrivateDataFeatures - { - using NativeType = VkPhysicalDevicePrivateDataFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrivateDataFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePrivateDataFeatures( VULKAN_HPP_NAMESPACE::Bool32 privateData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , privateData( privateData_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePrivateDataFeatures( PhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrivateDataFeatures( VkPhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePrivateDataFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePrivateDataFeatures & operator=( PhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePrivateDataFeatures & operator=( VkPhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrivateDataFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrivateDataFeatures & setPrivateData( VULKAN_HPP_NAMESPACE::Bool32 privateData_ ) VULKAN_HPP_NOEXCEPT - { - privateData = privateData_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDevicePrivateDataFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePrivateDataFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, privateData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePrivateDataFeatures const & ) const = default; -#else - bool operator==( PhysicalDevicePrivateDataFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( privateData == rhs.privateData ); -# endif - } - - bool operator!=( PhysicalDevicePrivateDataFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrivateDataFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 privateData = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePrivateDataFeatures; - }; - using PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; - - struct PhysicalDeviceSparseProperties - { - using NativeType = VkPhysicalDeviceSparseProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseProperties( VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DBlockShape_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DMultisampleBlockShape_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 residencyStandard3DBlockShape_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 residencyAlignedMipSize_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 residencyNonResidentStrict_ = {} ) VULKAN_HPP_NOEXCEPT - : residencyStandard2DBlockShape( residencyStandard2DBlockShape_ ) - , residencyStandard2DMultisampleBlockShape( residencyStandard2DMultisampleBlockShape_ ) - , residencyStandard3DBlockShape( residencyStandard3DBlockShape_ ) - , residencyAlignedMipSize( residencyAlignedMipSize_ ) - , residencyNonResidentStrict( residencyNonResidentStrict_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseProperties( PhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSparseProperties( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSparseProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSparseProperties & operator=( PhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSparseProperties & operator=( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSparseProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSparseProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( residencyStandard2DBlockShape, - residencyStandard2DMultisampleBlockShape, - residencyStandard3DBlockShape, - residencyAlignedMipSize, - residencyNonResidentStrict ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSparseProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceSparseProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( residencyStandard2DBlockShape == rhs.residencyStandard2DBlockShape ) && - ( residencyStandard2DMultisampleBlockShape == rhs.residencyStandard2DMultisampleBlockShape ) && - ( residencyStandard3DBlockShape == rhs.residencyStandard3DBlockShape ) && ( residencyAlignedMipSize == rhs.residencyAlignedMipSize ) && - ( residencyNonResidentStrict == rhs.residencyNonResidentStrict ); -# endif - } - - bool operator!=( PhysicalDeviceSparseProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DBlockShape = {}; - VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DMultisampleBlockShape = {}; - VULKAN_HPP_NAMESPACE::Bool32 residencyStandard3DBlockShape = {}; - VULKAN_HPP_NAMESPACE::Bool32 residencyAlignedMipSize = {}; - VULKAN_HPP_NAMESPACE::Bool32 residencyNonResidentStrict = {}; - }; - - struct PhysicalDeviceProperties - { - using NativeType = VkPhysicalDeviceProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties( uint32_t apiVersion_ = {}, - uint32_t driverVersion_ = {}, - uint32_t vendorID_ = {}, - uint32_t deviceID_ = {}, - VULKAN_HPP_NAMESPACE::PhysicalDeviceType deviceType_ = VULKAN_HPP_NAMESPACE::PhysicalDeviceType::eOther, - std::array const & deviceName_ = {}, - std::array const & pipelineCacheUUID_ = {}, - VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits limits_ = {}, - VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties sparseProperties_ = {} ) VULKAN_HPP_NOEXCEPT - : apiVersion( apiVersion_ ) - , driverVersion( driverVersion_ ) - , vendorID( vendorID_ ) - , deviceID( deviceID_ ) - , deviceType( deviceType_ ) - , deviceName( deviceName_ ) - , pipelineCacheUUID( pipelineCacheUUID_ ) - , limits( limits_ ) - , sparseProperties( sparseProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties( PhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProperties( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProperties & operator=( PhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProperties & operator=( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits const &, - VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( apiVersion, driverVersion, vendorID, deviceID, deviceType, deviceName, pipelineCacheUUID, limits, sparseProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( apiVersion == rhs.apiVersion ) && ( driverVersion == rhs.driverVersion ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && - ( deviceType == rhs.deviceType ) && ( deviceName == rhs.deviceName ) && ( pipelineCacheUUID == rhs.pipelineCacheUUID ) && - ( limits == rhs.limits ) && ( sparseProperties == rhs.sparseProperties ); -# endif - } - - bool operator!=( PhysicalDeviceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t apiVersion = {}; - uint32_t driverVersion = {}; - uint32_t vendorID = {}; - uint32_t deviceID = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceType deviceType = VULKAN_HPP_NAMESPACE::PhysicalDeviceType::eOther; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceName = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineCacheUUID = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits limits = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties sparseProperties = {}; - }; - - struct PhysicalDeviceProperties2 - { - using NativeType = VkPhysicalDeviceProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , properties( properties_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties2( PhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProperties2( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProperties2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProperties2 & operator=( PhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProperties2 & operator=( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, properties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProperties2 const & ) const = default; -#else - bool operator==( PhysicalDeviceProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( properties == rhs.properties ); -# endif - } - - bool operator!=( PhysicalDeviceProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceProperties2; - }; - using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; - - struct PhysicalDeviceProtectedMemoryFeatures - { - using NativeType = VkPhysicalDeviceProtectedMemoryFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProtectedMemoryFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , protectedMemory( protectedMemory_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( PhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProtectedMemoryFeatures( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProtectedMemoryFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProtectedMemoryFeatures & operator=( PhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProtectedMemoryFeatures & operator=( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProtectedMemoryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProtectedMemoryFeatures & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT - { - protectedMemory = protectedMemory_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceProtectedMemoryFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProtectedMemoryFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, protectedMemory ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProtectedMemoryFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceProtectedMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedMemory == rhs.protectedMemory ); -# endif - } - - bool operator!=( PhysicalDeviceProtectedMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 protectedMemory = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceProtectedMemoryFeatures; - }; - - struct PhysicalDeviceProtectedMemoryProperties - { - using NativeType = VkPhysicalDeviceProtectedMemoryProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProtectedMemoryProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryProperties( VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , protectedNoFault( protectedNoFault_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryProperties( PhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProtectedMemoryProperties( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProtectedMemoryProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProtectedMemoryProperties & operator=( PhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProtectedMemoryProperties & operator=( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceProtectedMemoryProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProtectedMemoryProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, protectedNoFault ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProtectedMemoryProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceProtectedMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedNoFault == rhs.protectedNoFault ); -# endif - } - - bool operator!=( PhysicalDeviceProtectedMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceProtectedMemoryProperties; - }; - - struct PhysicalDeviceProvokingVertexFeaturesEXT - { - using NativeType = VkPhysicalDeviceProvokingVertexFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , provokingVertexLast( provokingVertexLast_ ) - , transformFeedbackPreservesProvokingVertex( transformFeedbackPreservesProvokingVertex_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexFeaturesEXT( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProvokingVertexFeaturesEXT( VkPhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProvokingVertexFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProvokingVertexFeaturesEXT & operator=( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProvokingVertexFeaturesEXT & operator=( VkPhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & - setProvokingVertexLast( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast_ ) VULKAN_HPP_NOEXCEPT - { - provokingVertexLast = provokingVertexLast_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & - setTransformFeedbackPreservesProvokingVertex( VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex_ ) VULKAN_HPP_NOEXCEPT - { - transformFeedbackPreservesProvokingVertex = transformFeedbackPreservesProvokingVertex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceProvokingVertexFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProvokingVertexFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, provokingVertexLast, transformFeedbackPreservesProvokingVertex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProvokingVertexFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexLast == rhs.provokingVertexLast ) && - ( transformFeedbackPreservesProvokingVertex == rhs.transformFeedbackPreservesProvokingVertex ); -# endif - } - - bool operator!=( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceProvokingVertexFeaturesEXT; - }; - - struct PhysicalDeviceProvokingVertexPropertiesEXT - { - using NativeType = VkPhysicalDeviceProvokingVertexPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexModePerPipeline_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesTriangleFanProvokingVertex_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , provokingVertexModePerPipeline( provokingVertexModePerPipeline_ ) - , transformFeedbackPreservesTriangleFanProvokingVertex( transformFeedbackPreservesTriangleFanProvokingVertex_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexPropertiesEXT( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProvokingVertexPropertiesEXT( VkPhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceProvokingVertexPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceProvokingVertexPropertiesEXT & operator=( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceProvokingVertexPropertiesEXT & operator=( VkPhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceProvokingVertexPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceProvokingVertexPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, provokingVertexModePerPipeline, transformFeedbackPreservesTriangleFanProvokingVertex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceProvokingVertexPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexModePerPipeline == rhs.provokingVertexModePerPipeline ) && - ( transformFeedbackPreservesTriangleFanProvokingVertex == rhs.transformFeedbackPreservesTriangleFanProvokingVertex ); -# endif - } - - bool operator!=( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 provokingVertexModePerPipeline = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesTriangleFanProvokingVertex = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceProvokingVertexPropertiesEXT; - }; - - struct PhysicalDevicePushDescriptorPropertiesKHR - { - using NativeType = VkPhysicalDevicePushDescriptorPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDevicePushDescriptorPropertiesKHR( uint32_t maxPushDescriptors_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxPushDescriptors( maxPushDescriptors_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDevicePushDescriptorPropertiesKHR( PhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePushDescriptorPropertiesKHR( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDevicePushDescriptorPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDevicePushDescriptorPropertiesKHR & operator=( PhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDevicePushDescriptorPropertiesKHR & operator=( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDevicePushDescriptorPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDevicePushDescriptorPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxPushDescriptors ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDevicePushDescriptorPropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDevicePushDescriptorPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPushDescriptors == rhs.maxPushDescriptors ); -# endif - } - - bool operator!=( PhysicalDevicePushDescriptorPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR; - void * pNext = {}; - uint32_t maxPushDescriptors = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDevicePushDescriptorPropertiesKHR; - }; - - struct PhysicalDeviceRGBA10X6FormatsFeaturesEXT - { - using NativeType = VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRGBA10X6FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , formatRgba10x6WithoutYCbCrSampler( formatRgba10x6WithoutYCbCrSampler_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRGBA10X6FormatsFeaturesEXT( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRGBA10X6FormatsFeaturesEXT( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRGBA10X6FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRGBA10X6FormatsFeaturesEXT & operator=( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRGBA10X6FormatsFeaturesEXT & operator=( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRGBA10X6FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRGBA10X6FormatsFeaturesEXT & - setFormatRgba10x6WithoutYCbCrSampler( VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler_ ) VULKAN_HPP_NOEXCEPT - { - formatRgba10x6WithoutYCbCrSampler = formatRgba10x6WithoutYCbCrSampler_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, formatRgba10x6WithoutYCbCrSampler ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatRgba10x6WithoutYCbCrSampler == rhs.formatRgba10x6WithoutYCbCrSampler ); -# endif - } - - bool operator!=( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRGBA10X6FormatsFeaturesEXT; - }; - - struct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT - { - using NativeType = VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rasterizationOrderColorAttachmentAccess( rasterizationOrderColorAttachmentAccess_ ) - , rasterizationOrderDepthAttachmentAccess( rasterizationOrderDepthAttachmentAccess_ ) - , rasterizationOrderStencilAttachmentAccess( rasterizationOrderStencilAttachmentAccess_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( - *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & - operator=( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & - operator=( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & - setRasterizationOrderColorAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationOrderColorAttachmentAccess = rasterizationOrderColorAttachmentAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & - setRasterizationOrderDepthAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationOrderDepthAttachmentAccess = rasterizationOrderDepthAttachmentAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & - setRasterizationOrderStencilAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationOrderStencilAttachmentAccess = rasterizationOrderStencilAttachmentAccess_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, rasterizationOrderColorAttachmentAccess, rasterizationOrderDepthAttachmentAccess, rasterizationOrderStencilAttachmentAccess ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rasterizationOrderColorAttachmentAccess == rhs.rasterizationOrderColorAttachmentAccess ) && - ( rasterizationOrderDepthAttachmentAccess == rhs.rasterizationOrderDepthAttachmentAccess ) && - ( rasterizationOrderStencilAttachmentAccess == rhs.rasterizationOrderStencilAttachmentAccess ); -# endif - } - - bool operator!=( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - }; - using PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - - struct PhysicalDeviceRayQueryFeaturesKHR - { - using NativeType = VkPhysicalDeviceRayQueryFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayQueryFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayQuery_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rayQuery( rayQuery_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayQueryFeaturesKHR( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayQueryFeaturesKHR( VkPhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayQueryFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayQueryFeaturesKHR & operator=( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayQueryFeaturesKHR & operator=( VkPhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayQueryFeaturesKHR & setRayQuery( VULKAN_HPP_NAMESPACE::Bool32 rayQuery_ ) VULKAN_HPP_NOEXCEPT - { - rayQuery = rayQuery_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRayQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, rayQuery ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayQueryFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayQuery == rhs.rayQuery ); -# endif - } - - bool operator!=( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayQueryFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayQuery = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayQueryFeaturesKHR; - }; - - struct PhysicalDeviceRayTracingMaintenance1FeaturesKHR - { - using NativeType = VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMaintenance1FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rayTracingMaintenance1( rayTracingMaintenance1_ ) - , rayTracingPipelineTraceRaysIndirect2( rayTracingPipelineTraceRaysIndirect2_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceRayTracingMaintenance1FeaturesKHR( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingMaintenance1FeaturesKHR( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayTracingMaintenance1FeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayTracingMaintenance1FeaturesKHR & operator=( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingMaintenance1FeaturesKHR & operator=( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & - setRayTracingMaintenance1( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingMaintenance1 = rayTracingMaintenance1_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & - setRayTracingPipelineTraceRaysIndirect2( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingPipelineTraceRaysIndirect2 = rayTracingPipelineTraceRaysIndirect2_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, rayTracingMaintenance1, rayTracingPipelineTraceRaysIndirect2 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingMaintenance1 == rhs.rayTracingMaintenance1 ) && - ( rayTracingPipelineTraceRaysIndirect2 == rhs.rayTracingPipelineTraceRaysIndirect2 ); -# endif - } - - bool operator!=( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1 = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayTracingMaintenance1FeaturesKHR; - }; - - struct PhysicalDeviceRayTracingMotionBlurFeaturesNV - { - using NativeType = VkPhysicalDeviceRayTracingMotionBlurFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMotionBlurFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rayTracingMotionBlur( rayTracingMotionBlur_ ) - , rayTracingMotionBlurPipelineTraceRaysIndirect( rayTracingMotionBlurPipelineTraceRaysIndirect_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMotionBlurFeaturesNV( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingMotionBlurFeaturesNV( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayTracingMotionBlurFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayTracingMotionBlurFeaturesNV & operator=( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingMotionBlurFeaturesNV & operator=( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & - setRayTracingMotionBlur( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingMotionBlur = rayTracingMotionBlur_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & - setRayTracingMotionBlurPipelineTraceRaysIndirect( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingMotionBlurPipelineTraceRaysIndirect = rayTracingMotionBlurPipelineTraceRaysIndirect_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayTracingMotionBlurFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, rayTracingMotionBlur, rayTracingMotionBlurPipelineTraceRaysIndirect ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingMotionBlur == rhs.rayTracingMotionBlur ) && - ( rayTracingMotionBlurPipelineTraceRaysIndirect == rhs.rayTracingMotionBlurPipelineTraceRaysIndirect ); -# endif - } - - bool operator!=( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayTracingMotionBlurFeaturesNV; - }; - - struct PhysicalDeviceRayTracingPipelineFeaturesKHR - { - using NativeType = VkPhysicalDeviceRayTracingPipelineFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelineFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rayTracingPipeline( rayTracingPipeline_ ) - , rayTracingPipelineShaderGroupHandleCaptureReplay( rayTracingPipelineShaderGroupHandleCaptureReplay_ ) - , rayTracingPipelineShaderGroupHandleCaptureReplayMixed( rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ ) - , rayTracingPipelineTraceRaysIndirect( rayTracingPipelineTraceRaysIndirect_ ) - , rayTraversalPrimitiveCulling( rayTraversalPrimitiveCulling_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelineFeaturesKHR( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPipelineFeaturesKHR( VkPhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayTracingPipelineFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayTracingPipelineFeaturesKHR & operator=( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPipelineFeaturesKHR & operator=( VkPhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & - setRayTracingPipeline( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingPipeline = rayTracingPipeline_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & - setRayTracingPipelineShaderGroupHandleCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingPipelineShaderGroupHandleCaptureReplay = rayTracingPipelineShaderGroupHandleCaptureReplay_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTracingPipelineShaderGroupHandleCaptureReplayMixed( - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingPipelineShaderGroupHandleCaptureReplayMixed = rayTracingPipelineShaderGroupHandleCaptureReplayMixed_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & - setRayTracingPipelineTraceRaysIndirect( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect_ ) VULKAN_HPP_NOEXCEPT - { - rayTracingPipelineTraceRaysIndirect = rayTracingPipelineTraceRaysIndirect_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & - setRayTraversalPrimitiveCulling( VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling_ ) VULKAN_HPP_NOEXCEPT - { - rayTraversalPrimitiveCulling = rayTraversalPrimitiveCulling_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRayTracingPipelineFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayTracingPipelineFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - rayTracingPipeline, - rayTracingPipelineShaderGroupHandleCaptureReplay, - rayTracingPipelineShaderGroupHandleCaptureReplayMixed, - rayTracingPipelineTraceRaysIndirect, - rayTraversalPrimitiveCulling ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayTracingPipelineFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingPipeline == rhs.rayTracingPipeline ) && - ( rayTracingPipelineShaderGroupHandleCaptureReplay == rhs.rayTracingPipelineShaderGroupHandleCaptureReplay ) && - ( rayTracingPipelineShaderGroupHandleCaptureReplayMixed == rhs.rayTracingPipelineShaderGroupHandleCaptureReplayMixed ) && - ( rayTracingPipelineTraceRaysIndirect == rhs.rayTracingPipelineTraceRaysIndirect ) && - ( rayTraversalPrimitiveCulling == rhs.rayTraversalPrimitiveCulling ); -# endif - } - - bool operator!=( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect = {}; - VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayTracingPipelineFeaturesKHR; - }; - - struct PhysicalDeviceRayTracingPipelinePropertiesKHR - { - using NativeType = VkPhysicalDeviceRayTracingPipelinePropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelinePropertiesKHR( uint32_t shaderGroupHandleSize_ = {}, - uint32_t maxRayRecursionDepth_ = {}, - uint32_t maxShaderGroupStride_ = {}, - uint32_t shaderGroupBaseAlignment_ = {}, - uint32_t shaderGroupHandleCaptureReplaySize_ = {}, - uint32_t maxRayDispatchInvocationCount_ = {}, - uint32_t shaderGroupHandleAlignment_ = {}, - uint32_t maxRayHitAttributeSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderGroupHandleSize( shaderGroupHandleSize_ ) - , maxRayRecursionDepth( maxRayRecursionDepth_ ) - , maxShaderGroupStride( maxShaderGroupStride_ ) - , shaderGroupBaseAlignment( shaderGroupBaseAlignment_ ) - , shaderGroupHandleCaptureReplaySize( shaderGroupHandleCaptureReplaySize_ ) - , maxRayDispatchInvocationCount( maxRayDispatchInvocationCount_ ) - , shaderGroupHandleAlignment( shaderGroupHandleAlignment_ ) - , maxRayHitAttributeSize( maxRayHitAttributeSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceRayTracingPipelinePropertiesKHR( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPipelinePropertiesKHR( VkPhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayTracingPipelinePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayTracingPipelinePropertiesKHR & operator=( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPipelinePropertiesKHR & operator=( VkPhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceRayTracingPipelinePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayTracingPipelinePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderGroupHandleSize, - maxRayRecursionDepth, - maxShaderGroupStride, - shaderGroupBaseAlignment, - shaderGroupHandleCaptureReplaySize, - maxRayDispatchInvocationCount, - shaderGroupHandleAlignment, - maxRayHitAttributeSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayTracingPipelinePropertiesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderGroupHandleSize == rhs.shaderGroupHandleSize ) && - ( maxRayRecursionDepth == rhs.maxRayRecursionDepth ) && ( maxShaderGroupStride == rhs.maxShaderGroupStride ) && - ( shaderGroupBaseAlignment == rhs.shaderGroupBaseAlignment ) && ( shaderGroupHandleCaptureReplaySize == rhs.shaderGroupHandleCaptureReplaySize ) && - ( maxRayDispatchInvocationCount == rhs.maxRayDispatchInvocationCount ) && ( shaderGroupHandleAlignment == rhs.shaderGroupHandleAlignment ) && - ( maxRayHitAttributeSize == rhs.maxRayHitAttributeSize ); -# endif - } - - bool operator!=( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR; - void * pNext = {}; - uint32_t shaderGroupHandleSize = {}; - uint32_t maxRayRecursionDepth = {}; - uint32_t maxShaderGroupStride = {}; - uint32_t shaderGroupBaseAlignment = {}; - uint32_t shaderGroupHandleCaptureReplaySize = {}; - uint32_t maxRayDispatchInvocationCount = {}; - uint32_t shaderGroupHandleAlignment = {}; - uint32_t maxRayHitAttributeSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayTracingPipelinePropertiesKHR; - }; - - struct PhysicalDeviceRayTracingPropertiesNV - { - using NativeType = VkPhysicalDeviceRayTracingPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPropertiesNV( uint32_t shaderGroupHandleSize_ = {}, - uint32_t maxRecursionDepth_ = {}, - uint32_t maxShaderGroupStride_ = {}, - uint32_t shaderGroupBaseAlignment_ = {}, - uint64_t maxGeometryCount_ = {}, - uint64_t maxInstanceCount_ = {}, - uint64_t maxTriangleCount_ = {}, - uint32_t maxDescriptorSetAccelerationStructures_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderGroupHandleSize( shaderGroupHandleSize_ ) - , maxRecursionDepth( maxRecursionDepth_ ) - , maxShaderGroupStride( maxShaderGroupStride_ ) - , shaderGroupBaseAlignment( shaderGroupBaseAlignment_ ) - , maxGeometryCount( maxGeometryCount_ ) - , maxInstanceCount( maxInstanceCount_ ) - , maxTriangleCount( maxTriangleCount_ ) - , maxDescriptorSetAccelerationStructures( maxDescriptorSetAccelerationStructures_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPropertiesNV( PhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPropertiesNV( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRayTracingPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRayTracingPropertiesNV & operator=( PhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRayTracingPropertiesNV & operator=( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceRayTracingPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRayTracingPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderGroupHandleSize, - maxRecursionDepth, - maxShaderGroupStride, - shaderGroupBaseAlignment, - maxGeometryCount, - maxInstanceCount, - maxTriangleCount, - maxDescriptorSetAccelerationStructures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRayTracingPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceRayTracingPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderGroupHandleSize == rhs.shaderGroupHandleSize ) && - ( maxRecursionDepth == rhs.maxRecursionDepth ) && ( maxShaderGroupStride == rhs.maxShaderGroupStride ) && - ( shaderGroupBaseAlignment == rhs.shaderGroupBaseAlignment ) && ( maxGeometryCount == rhs.maxGeometryCount ) && - ( maxInstanceCount == rhs.maxInstanceCount ) && ( maxTriangleCount == rhs.maxTriangleCount ) && - ( maxDescriptorSetAccelerationStructures == rhs.maxDescriptorSetAccelerationStructures ); -# endif - } - - bool operator!=( PhysicalDeviceRayTracingPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPropertiesNV; - void * pNext = {}; - uint32_t shaderGroupHandleSize = {}; - uint32_t maxRecursionDepth = {}; - uint32_t maxShaderGroupStride = {}; - uint32_t shaderGroupBaseAlignment = {}; - uint64_t maxGeometryCount = {}; - uint64_t maxInstanceCount = {}; - uint64_t maxTriangleCount = {}; - uint32_t maxDescriptorSetAccelerationStructures = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRayTracingPropertiesNV; - }; - - struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV - { - using NativeType = VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , representativeFragmentTest( representativeFragmentTest_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceRepresentativeFragmentTestFeaturesNV( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRepresentativeFragmentTestFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRepresentativeFragmentTestFeaturesNV & - operator=( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRepresentativeFragmentTestFeaturesNV & operator=( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRepresentativeFragmentTestFeaturesNV & - setRepresentativeFragmentTest( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ ) VULKAN_HPP_NOEXCEPT - { - representativeFragmentTest = representativeFragmentTest_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, representativeFragmentTest ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( representativeFragmentTest == rhs.representativeFragmentTest ); -# endif - } - - bool operator!=( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRepresentativeFragmentTestFeaturesNV; - }; - - struct PhysicalDeviceRobustness2FeaturesEXT - { - using NativeType = VkPhysicalDeviceRobustness2FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRobustness2FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , robustBufferAccess2( robustBufferAccess2_ ) - , robustImageAccess2( robustImageAccess2_ ) - , nullDescriptor( nullDescriptor_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2FeaturesEXT( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRobustness2FeaturesEXT( VkPhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRobustness2FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRobustness2FeaturesEXT & operator=( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRobustness2FeaturesEXT & operator=( VkPhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & - setRobustBufferAccess2( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2_ ) VULKAN_HPP_NOEXCEPT - { - robustBufferAccess2 = robustBufferAccess2_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setRobustImageAccess2( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2_ ) VULKAN_HPP_NOEXCEPT - { - robustImageAccess2 = robustImageAccess2_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setNullDescriptor( VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor_ ) VULKAN_HPP_NOEXCEPT - { - nullDescriptor = nullDescriptor_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceRobustness2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRobustness2FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, robustBufferAccess2, robustImageAccess2, nullDescriptor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRobustness2FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustBufferAccess2 == rhs.robustBufferAccess2 ) && - ( robustImageAccess2 == rhs.robustImageAccess2 ) && ( nullDescriptor == rhs.nullDescriptor ); -# endif - } - - bool operator!=( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRobustness2FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2 = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2 = {}; - VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRobustness2FeaturesEXT; - }; - - struct PhysicalDeviceRobustness2PropertiesEXT - { - using NativeType = VkPhysicalDeviceRobustness2PropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRobustness2PropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2PropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize robustStorageBufferAccessSizeAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize robustUniformBufferAccessSizeAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , robustStorageBufferAccessSizeAlignment( robustStorageBufferAccessSizeAlignment_ ) - , robustUniformBufferAccessSizeAlignment( robustUniformBufferAccessSizeAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2PropertiesEXT( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRobustness2PropertiesEXT( VkPhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceRobustness2PropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceRobustness2PropertiesEXT & operator=( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceRobustness2PropertiesEXT & operator=( VkPhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceRobustness2PropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceRobustness2PropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, robustStorageBufferAccessSizeAlignment, robustUniformBufferAccessSizeAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceRobustness2PropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustStorageBufferAccessSizeAlignment == rhs.robustStorageBufferAccessSizeAlignment ) && - ( robustUniformBufferAccessSizeAlignment == rhs.robustUniformBufferAccessSizeAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRobustness2PropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize robustStorageBufferAccessSizeAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize robustUniformBufferAccessSizeAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceRobustness2PropertiesEXT; - }; - - struct PhysicalDeviceSampleLocationsPropertiesEXT - { - using NativeType = VkPhysicalDeviceSampleLocationsPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSampleLocationsPropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {}, - std::array const & sampleLocationCoordinateRange_ = {}, - uint32_t sampleLocationSubPixelBits_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sampleLocationSampleCounts( sampleLocationSampleCounts_ ) - , maxSampleLocationGridSize( maxSampleLocationGridSize_ ) - , sampleLocationCoordinateRange( sampleLocationCoordinateRange_ ) - , sampleLocationSubPixelBits( sampleLocationSubPixelBits_ ) - , variableSampleLocations( variableSampleLocations_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSampleLocationsPropertiesEXT( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSampleLocationsPropertiesEXT( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSampleLocationsPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSampleLocationsPropertiesEXT & operator=( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSampleLocationsPropertiesEXT & operator=( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSampleLocationsPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSampleLocationsPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - sampleLocationSampleCounts, - maxSampleLocationGridSize, - sampleLocationCoordinateRange, - sampleLocationSubPixelBits, - variableSampleLocations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSampleLocationsPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationSampleCounts == rhs.sampleLocationSampleCounts ) && - ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ) && ( sampleLocationCoordinateRange == rhs.sampleLocationCoordinateRange ) && - ( sampleLocationSubPixelBits == rhs.sampleLocationSubPixelBits ) && ( variableSampleLocations == rhs.variableSampleLocations ); -# endif - } - - bool operator!=( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D sampleLocationCoordinateRange = {}; - uint32_t sampleLocationSubPixelBits = {}; - VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSampleLocationsPropertiesEXT; - }; - - struct PhysicalDeviceSamplerFilterMinmaxProperties - { - using NativeType = VkPhysicalDeviceSamplerFilterMinmaxProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerFilterMinmaxProperties( VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , filterMinmaxSingleComponentFormats( filterMinmaxSingleComponentFormats_ ) - , filterMinmaxImageComponentMapping( filterMinmaxImageComponentMapping_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerFilterMinmaxProperties( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSamplerFilterMinmaxProperties( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSamplerFilterMinmaxProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSamplerFilterMinmaxProperties & operator=( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSamplerFilterMinmaxProperties & operator=( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSamplerFilterMinmaxProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSamplerFilterMinmaxProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, filterMinmaxSingleComponentFormats, filterMinmaxImageComponentMapping ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSamplerFilterMinmaxProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterMinmaxSingleComponentFormats == rhs.filterMinmaxSingleComponentFormats ) && - ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping ); -# endif - } - - bool operator!=( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSamplerFilterMinmaxProperties; - }; - using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; - - struct PhysicalDeviceSamplerYcbcrConversionFeatures - { - using NativeType = VkPhysicalDeviceSamplerYcbcrConversionFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , samplerYcbcrConversion( samplerYcbcrConversion_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSamplerYcbcrConversionFeatures( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSamplerYcbcrConversionFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSamplerYcbcrConversionFeatures & operator=( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSamplerYcbcrConversionFeatures & operator=( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSamplerYcbcrConversionFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSamplerYcbcrConversionFeatures & - setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT - { - samplerYcbcrConversion = samplerYcbcrConversion_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSamplerYcbcrConversionFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSamplerYcbcrConversionFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, samplerYcbcrConversion ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSamplerYcbcrConversionFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion ); -# endif - } - - bool operator!=( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSamplerYcbcrConversionFeatures; - }; - using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; - - struct PhysicalDeviceScalarBlockLayoutFeatures - { - using NativeType = VkPhysicalDeviceScalarBlockLayoutFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceScalarBlockLayoutFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , scalarBlockLayout( scalarBlockLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeatures( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceScalarBlockLayoutFeatures( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceScalarBlockLayoutFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceScalarBlockLayoutFeatures & operator=( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceScalarBlockLayoutFeatures & operator=( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceScalarBlockLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceScalarBlockLayoutFeatures & - setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT - { - scalarBlockLayout = scalarBlockLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceScalarBlockLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceScalarBlockLayoutFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, scalarBlockLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceScalarBlockLayoutFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( scalarBlockLayout == rhs.scalarBlockLayout ); -# endif - } - - bool operator!=( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceScalarBlockLayoutFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceScalarBlockLayoutFeatures; - }; - using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; - - struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures - { - using NativeType = VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , separateDepthStencilLayouts( separateDepthStencilLayouts_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceSeparateDepthStencilLayoutsFeatures( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSeparateDepthStencilLayoutsFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSeparateDepthStencilLayoutsFeatures & - operator=( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSeparateDepthStencilLayoutsFeatures & operator=( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSeparateDepthStencilLayoutsFeatures & - setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT - { - separateDepthStencilLayouts = separateDepthStencilLayouts_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, separateDepthStencilLayouts ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( separateDepthStencilLayouts == rhs.separateDepthStencilLayouts ); -# endif - } - - bool operator!=( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; - }; - using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; - - struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT - { - using NativeType = VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderBufferFloat16Atomics( shaderBufferFloat16Atomics_ ) - , shaderBufferFloat16AtomicAdd( shaderBufferFloat16AtomicAdd_ ) - , shaderBufferFloat16AtomicMinMax( shaderBufferFloat16AtomicMinMax_ ) - , shaderBufferFloat32AtomicMinMax( shaderBufferFloat32AtomicMinMax_ ) - , shaderBufferFloat64AtomicMinMax( shaderBufferFloat64AtomicMinMax_ ) - , shaderSharedFloat16Atomics( shaderSharedFloat16Atomics_ ) - , shaderSharedFloat16AtomicAdd( shaderSharedFloat16AtomicAdd_ ) - , shaderSharedFloat16AtomicMinMax( shaderSharedFloat16AtomicMinMax_ ) - , shaderSharedFloat32AtomicMinMax( shaderSharedFloat32AtomicMinMax_ ) - , shaderSharedFloat64AtomicMinMax( shaderSharedFloat64AtomicMinMax_ ) - , shaderImageFloat32AtomicMinMax( shaderImageFloat32AtomicMinMax_ ) - , sparseImageFloat32AtomicMinMax( sparseImageFloat32AtomicMinMax_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicFloat2FeaturesEXT( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderAtomicFloat2FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderAtomicFloat2FeaturesEXT & operator=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicFloat2FeaturesEXT & operator=( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderBufferFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat16Atomics = shaderBufferFloat16Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderBufferFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat16AtomicAdd = shaderBufferFloat16AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderBufferFloat16AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat16AtomicMinMax = shaderBufferFloat16AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderBufferFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat32AtomicMinMax = shaderBufferFloat32AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderBufferFloat64AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat64AtomicMinMax = shaderBufferFloat64AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderSharedFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat16Atomics = shaderSharedFloat16Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderSharedFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat16AtomicAdd = shaderSharedFloat16AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderSharedFloat16AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat16AtomicMinMax = shaderSharedFloat16AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderSharedFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat32AtomicMinMax = shaderSharedFloat32AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderSharedFloat64AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat64AtomicMinMax = shaderSharedFloat64AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setShaderImageFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - shaderImageFloat32AtomicMinMax = shaderImageFloat32AtomicMinMax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & - setSparseImageFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT - { - sparseImageFloat32AtomicMinMax = sparseImageFloat32AtomicMinMax_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderBufferFloat16Atomics, - shaderBufferFloat16AtomicAdd, - shaderBufferFloat16AtomicMinMax, - shaderBufferFloat32AtomicMinMax, - shaderBufferFloat64AtomicMinMax, - shaderSharedFloat16Atomics, - shaderSharedFloat16AtomicAdd, - shaderSharedFloat16AtomicMinMax, - shaderSharedFloat32AtomicMinMax, - shaderSharedFloat64AtomicMinMax, - shaderImageFloat32AtomicMinMax, - sparseImageFloat32AtomicMinMax ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferFloat16Atomics == rhs.shaderBufferFloat16Atomics ) && - ( shaderBufferFloat16AtomicAdd == rhs.shaderBufferFloat16AtomicAdd ) && - ( shaderBufferFloat16AtomicMinMax == rhs.shaderBufferFloat16AtomicMinMax ) && - ( shaderBufferFloat32AtomicMinMax == rhs.shaderBufferFloat32AtomicMinMax ) && - ( shaderBufferFloat64AtomicMinMax == rhs.shaderBufferFloat64AtomicMinMax ) && ( shaderSharedFloat16Atomics == rhs.shaderSharedFloat16Atomics ) && - ( shaderSharedFloat16AtomicAdd == rhs.shaderSharedFloat16AtomicAdd ) && - ( shaderSharedFloat16AtomicMinMax == rhs.shaderSharedFloat16AtomicMinMax ) && - ( shaderSharedFloat32AtomicMinMax == rhs.shaderSharedFloat32AtomicMinMax ) && - ( shaderSharedFloat64AtomicMinMax == rhs.shaderSharedFloat64AtomicMinMax ) && - ( shaderImageFloat32AtomicMinMax == rhs.shaderImageFloat32AtomicMinMax ) && - ( sparseImageFloat32AtomicMinMax == rhs.sparseImageFloat32AtomicMinMax ); -# endif - } - - bool operator!=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderAtomicFloat2FeaturesEXT; - }; - - struct PhysicalDeviceShaderAtomicFloatFeaturesEXT - { - using NativeType = VkPhysicalDeviceShaderAtomicFloatFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloatFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderBufferFloat32Atomics( shaderBufferFloat32Atomics_ ) - , shaderBufferFloat32AtomicAdd( shaderBufferFloat32AtomicAdd_ ) - , shaderBufferFloat64Atomics( shaderBufferFloat64Atomics_ ) - , shaderBufferFloat64AtomicAdd( shaderBufferFloat64AtomicAdd_ ) - , shaderSharedFloat32Atomics( shaderSharedFloat32Atomics_ ) - , shaderSharedFloat32AtomicAdd( shaderSharedFloat32AtomicAdd_ ) - , shaderSharedFloat64Atomics( shaderSharedFloat64Atomics_ ) - , shaderSharedFloat64AtomicAdd( shaderSharedFloat64AtomicAdd_ ) - , shaderImageFloat32Atomics( shaderImageFloat32Atomics_ ) - , shaderImageFloat32AtomicAdd( shaderImageFloat32AtomicAdd_ ) - , sparseImageFloat32Atomics( sparseImageFloat32Atomics_ ) - , sparseImageFloat32AtomicAdd( sparseImageFloat32AtomicAdd_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloatFeaturesEXT( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicFloatFeaturesEXT( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderAtomicFloatFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderAtomicFloatFeaturesEXT & operator=( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicFloatFeaturesEXT & operator=( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderBufferFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat32Atomics = shaderBufferFloat32Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderBufferFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat32AtomicAdd = shaderBufferFloat32AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderBufferFloat64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat64Atomics = shaderBufferFloat64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderBufferFloat64AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferFloat64AtomicAdd = shaderBufferFloat64AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderSharedFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat32Atomics = shaderSharedFloat32Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderSharedFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat32AtomicAdd = shaderSharedFloat32AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderSharedFloat64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat64Atomics = shaderSharedFloat64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderSharedFloat64AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedFloat64AtomicAdd = shaderSharedFloat64AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderImageFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderImageFloat32Atomics = shaderImageFloat32Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setShaderImageFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - shaderImageFloat32AtomicAdd = shaderImageFloat32AtomicAdd_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setSparseImageFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT - { - sparseImageFloat32Atomics = sparseImageFloat32Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & - setSparseImageFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT - { - sparseImageFloat32AtomicAdd = sparseImageFloat32AtomicAdd_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderAtomicFloatFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderBufferFloat32Atomics, - shaderBufferFloat32AtomicAdd, - shaderBufferFloat64Atomics, - shaderBufferFloat64AtomicAdd, - shaderSharedFloat32Atomics, - shaderSharedFloat32AtomicAdd, - shaderSharedFloat64Atomics, - shaderSharedFloat64AtomicAdd, - shaderImageFloat32Atomics, - shaderImageFloat32AtomicAdd, - sparseImageFloat32Atomics, - sparseImageFloat32AtomicAdd ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferFloat32Atomics == rhs.shaderBufferFloat32Atomics ) && - ( shaderBufferFloat32AtomicAdd == rhs.shaderBufferFloat32AtomicAdd ) && ( shaderBufferFloat64Atomics == rhs.shaderBufferFloat64Atomics ) && - ( shaderBufferFloat64AtomicAdd == rhs.shaderBufferFloat64AtomicAdd ) && ( shaderSharedFloat32Atomics == rhs.shaderSharedFloat32Atomics ) && - ( shaderSharedFloat32AtomicAdd == rhs.shaderSharedFloat32AtomicAdd ) && ( shaderSharedFloat64Atomics == rhs.shaderSharedFloat64Atomics ) && - ( shaderSharedFloat64AtomicAdd == rhs.shaderSharedFloat64AtomicAdd ) && ( shaderImageFloat32Atomics == rhs.shaderImageFloat32Atomics ) && - ( shaderImageFloat32AtomicAdd == rhs.shaderImageFloat32AtomicAdd ) && ( sparseImageFloat32Atomics == rhs.sparseImageFloat32Atomics ) && - ( sparseImageFloat32AtomicAdd == rhs.sparseImageFloat32AtomicAdd ); -# endif - } - - bool operator!=( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderAtomicFloatFeaturesEXT; - }; - - struct PhysicalDeviceShaderAtomicInt64Features - { - using NativeType = VkPhysicalDeviceShaderAtomicInt64Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicInt64Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64Features( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderBufferInt64Atomics( shaderBufferInt64Atomics_ ) - , shaderSharedInt64Atomics( shaderSharedInt64Atomics_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64Features( PhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicInt64Features( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderAtomicInt64Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderAtomicInt64Features & operator=( PhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderAtomicInt64Features & operator=( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & - setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferInt64Atomics = shaderBufferInt64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & - setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedInt64Atomics = shaderSharedInt64Atomics_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderAtomicInt64Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderAtomicInt64Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderBufferInt64Atomics, shaderSharedInt64Atomics ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderAtomicInt64Features const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderAtomicInt64Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferInt64Atomics == rhs.shaderBufferInt64Atomics ) && - ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics ); -# endif - } - - bool operator!=( PhysicalDeviceShaderAtomicInt64Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicInt64Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderAtomicInt64Features; - }; - using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; - - struct PhysicalDeviceShaderClockFeaturesKHR - { - using NativeType = VkPhysicalDeviceShaderClockFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderSubgroupClock( shaderSubgroupClock_ ) - , shaderDeviceClock( shaderDeviceClock_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderClockFeaturesKHR( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderClockFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderClockFeaturesKHR & operator=( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderClockFeaturesKHR & operator=( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & - setShaderSubgroupClock( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ ) VULKAN_HPP_NOEXCEPT - { - shaderSubgroupClock = shaderSubgroupClock_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & setShaderDeviceClock( VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ ) VULKAN_HPP_NOEXCEPT - { - shaderDeviceClock = shaderDeviceClock_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderClockFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderClockFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderSubgroupClock, shaderDeviceClock ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderClockFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupClock == rhs.shaderSubgroupClock ) && - ( shaderDeviceClock == rhs.shaderDeviceClock ); -# endif - } - - bool operator!=( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderClockFeaturesKHR; - }; - - struct PhysicalDeviceShaderCoreProperties2AMD - { - using NativeType = VkPhysicalDeviceShaderCoreProperties2AMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreProperties2AMD( VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures_ = {}, - uint32_t activeComputeUnitCount_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderCoreFeatures( shaderCoreFeatures_ ) - , activeComputeUnitCount( activeComputeUnitCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreProperties2AMD( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderCoreProperties2AMD( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderCoreProperties2AMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderCoreProperties2AMD & operator=( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderCoreProperties2AMD & operator=( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShaderCoreProperties2AMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderCoreProperties2AMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderCoreFeatures, activeComputeUnitCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderCoreProperties2AMD const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCoreFeatures == rhs.shaderCoreFeatures ) && - ( activeComputeUnitCount == rhs.activeComputeUnitCount ); -# endif - } - - bool operator!=( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures = {}; - uint32_t activeComputeUnitCount = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderCoreProperties2AMD; - }; - - struct PhysicalDeviceShaderCorePropertiesAMD - { - using NativeType = VkPhysicalDeviceShaderCorePropertiesAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesAMD( uint32_t shaderEngineCount_ = {}, - uint32_t shaderArraysPerEngineCount_ = {}, - uint32_t computeUnitsPerShaderArray_ = {}, - uint32_t simdPerComputeUnit_ = {}, - uint32_t wavefrontsPerSimd_ = {}, - uint32_t wavefrontSize_ = {}, - uint32_t sgprsPerSimd_ = {}, - uint32_t minSgprAllocation_ = {}, - uint32_t maxSgprAllocation_ = {}, - uint32_t sgprAllocationGranularity_ = {}, - uint32_t vgprsPerSimd_ = {}, - uint32_t minVgprAllocation_ = {}, - uint32_t maxVgprAllocation_ = {}, - uint32_t vgprAllocationGranularity_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderEngineCount( shaderEngineCount_ ) - , shaderArraysPerEngineCount( shaderArraysPerEngineCount_ ) - , computeUnitsPerShaderArray( computeUnitsPerShaderArray_ ) - , simdPerComputeUnit( simdPerComputeUnit_ ) - , wavefrontsPerSimd( wavefrontsPerSimd_ ) - , wavefrontSize( wavefrontSize_ ) - , sgprsPerSimd( sgprsPerSimd_ ) - , minSgprAllocation( minSgprAllocation_ ) - , maxSgprAllocation( maxSgprAllocation_ ) - , sgprAllocationGranularity( sgprAllocationGranularity_ ) - , vgprsPerSimd( vgprsPerSimd_ ) - , minVgprAllocation( minVgprAllocation_ ) - , maxVgprAllocation( maxVgprAllocation_ ) - , vgprAllocationGranularity( vgprAllocationGranularity_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesAMD( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderCorePropertiesAMD( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderCorePropertiesAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderCorePropertiesAMD & operator=( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderCorePropertiesAMD & operator=( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShaderCorePropertiesAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderCorePropertiesAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - shaderEngineCount, - shaderArraysPerEngineCount, - computeUnitsPerShaderArray, - simdPerComputeUnit, - wavefrontsPerSimd, - wavefrontSize, - sgprsPerSimd, - minSgprAllocation, - maxSgprAllocation, - sgprAllocationGranularity, - vgprsPerSimd, - minVgprAllocation, - maxVgprAllocation, - vgprAllocationGranularity ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderCorePropertiesAMD const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderEngineCount == rhs.shaderEngineCount ) && - ( shaderArraysPerEngineCount == rhs.shaderArraysPerEngineCount ) && ( computeUnitsPerShaderArray == rhs.computeUnitsPerShaderArray ) && - ( simdPerComputeUnit == rhs.simdPerComputeUnit ) && ( wavefrontsPerSimd == rhs.wavefrontsPerSimd ) && ( wavefrontSize == rhs.wavefrontSize ) && - ( sgprsPerSimd == rhs.sgprsPerSimd ) && ( minSgprAllocation == rhs.minSgprAllocation ) && ( maxSgprAllocation == rhs.maxSgprAllocation ) && - ( sgprAllocationGranularity == rhs.sgprAllocationGranularity ) && ( vgprsPerSimd == rhs.vgprsPerSimd ) && - ( minVgprAllocation == rhs.minVgprAllocation ) && ( maxVgprAllocation == rhs.maxVgprAllocation ) && - ( vgprAllocationGranularity == rhs.vgprAllocationGranularity ); -# endif - } - - bool operator!=( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD; - void * pNext = {}; - uint32_t shaderEngineCount = {}; - uint32_t shaderArraysPerEngineCount = {}; - uint32_t computeUnitsPerShaderArray = {}; - uint32_t simdPerComputeUnit = {}; - uint32_t wavefrontsPerSimd = {}; - uint32_t wavefrontSize = {}; - uint32_t sgprsPerSimd = {}; - uint32_t minSgprAllocation = {}; - uint32_t maxSgprAllocation = {}; - uint32_t sgprAllocationGranularity = {}; - uint32_t vgprsPerSimd = {}; - uint32_t minVgprAllocation = {}; - uint32_t maxVgprAllocation = {}; - uint32_t vgprAllocationGranularity = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderCorePropertiesAMD; - }; - - struct PhysicalDeviceShaderDemoteToHelperInvocationFeatures - { - using NativeType = VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderDemoteToHelperInvocation( shaderDemoteToHelperInvocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderDemoteToHelperInvocationFeatures( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderDemoteToHelperInvocationFeatures( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderDemoteToHelperInvocationFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderDemoteToHelperInvocationFeatures & - operator=( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderDemoteToHelperInvocationFeatures & operator=( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDemoteToHelperInvocationFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDemoteToHelperInvocationFeatures & - setShaderDemoteToHelperInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT - { - shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderDemoteToHelperInvocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderDemoteToHelperInvocation == rhs.shaderDemoteToHelperInvocation ); -# endif - } - - bool operator!=( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; - }; - using PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; - - struct PhysicalDeviceShaderDrawParametersFeatures - { - using NativeType = VkPhysicalDeviceShaderDrawParametersFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderDrawParameters( shaderDrawParameters_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderDrawParametersFeatures( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderDrawParametersFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderDrawParametersFeatures & operator=( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderDrawParametersFeatures & operator=( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDrawParametersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDrawParametersFeatures & - setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT - { - shaderDrawParameters = shaderDrawParameters_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderDrawParametersFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderDrawParametersFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderDrawParameters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderDrawParametersFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderDrawParameters == rhs.shaderDrawParameters ); -# endif - } - - bool operator!=( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderDrawParametersFeatures; - }; - using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; - - struct PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD - { - using NativeType = VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderEarlyAndLateFragmentTests( shaderEarlyAndLateFragmentTests_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & - operator=( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & - operator=( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & - setShaderEarlyAndLateFragmentTests( VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests_ ) VULKAN_HPP_NOEXCEPT - { - shaderEarlyAndLateFragmentTests = shaderEarlyAndLateFragmentTests_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderEarlyAndLateFragmentTests ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderEarlyAndLateFragmentTests == rhs.shaderEarlyAndLateFragmentTests ); -# endif - } - - bool operator!=( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; - }; - - struct PhysicalDeviceShaderFloat16Int8Features - { - using NativeType = VkPhysicalDeviceShaderFloat16Int8Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderFloat16Int8Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8Features( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderFloat16( shaderFloat16_ ) - , shaderInt8( shaderInt8_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8Features( PhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderFloat16Int8Features( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderFloat16Int8Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderFloat16Int8Features & operator=( PhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderFloat16Int8Features & operator=( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT - { - shaderFloat16 = shaderFloat16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT - { - shaderInt8 = shaderInt8_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderFloat16Int8Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderFloat16Int8Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderFloat16, shaderInt8 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderFloat16Int8Features const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderFloat16Int8Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderFloat16 == rhs.shaderFloat16 ) && ( shaderInt8 == rhs.shaderInt8 ); -# endif - } - - bool operator!=( PhysicalDeviceShaderFloat16Int8Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderFloat16Int8Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInt8 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderFloat16Int8Features; - }; - using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - - struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT - { - using NativeType = VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderImageInt64Atomics( shaderImageInt64Atomics_ ) - , sparseImageInt64Atomics( sparseImageInt64Atomics_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & operator=( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & operator=( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & - setShaderImageInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderImageInt64Atomics = shaderImageInt64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & - setSparseImageInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - sparseImageInt64Atomics = sparseImageInt64Atomics_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderImageInt64Atomics, sparseImageInt64Atomics ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderImageInt64Atomics == rhs.shaderImageInt64Atomics ) && - ( sparseImageInt64Atomics == rhs.sparseImageInt64Atomics ); -# endif - } - - bool operator!=( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderImageAtomicInt64FeaturesEXT; - }; - - struct PhysicalDeviceShaderImageFootprintFeaturesNV - { - using NativeType = VkPhysicalDeviceShaderImageFootprintFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageFootprint( imageFootprint_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderImageFootprintFeaturesNV( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderImageFootprintFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderImageFootprintFeaturesNV & operator=( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderImageFootprintFeaturesNV & operator=( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageFootprintFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageFootprintFeaturesNV & setImageFootprint( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ ) VULKAN_HPP_NOEXCEPT - { - imageFootprint = imageFootprint_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderImageFootprintFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderImageFootprintFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageFootprint ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderImageFootprintFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageFootprint == rhs.imageFootprint ); -# endif - } - - bool operator!=( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 imageFootprint = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderImageFootprintFeaturesNV; - }; - - struct PhysicalDeviceShaderIntegerDotProductFeatures - { - using NativeType = VkPhysicalDeviceShaderIntegerDotProductFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderIntegerDotProduct( shaderIntegerDotProduct_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderIntegerDotProductFeatures( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerDotProductFeatures( VkPhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderIntegerDotProductFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderIntegerDotProductFeatures & operator=( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerDotProductFeatures & operator=( VkPhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductFeatures & - setShaderIntegerDotProduct( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ ) VULKAN_HPP_NOEXCEPT - { - shaderIntegerDotProduct = shaderIntegerDotProduct_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderIntegerDotProductFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderIntegerDotProductFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderIntegerDotProduct ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderIntegerDotProductFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderIntegerDotProduct == rhs.shaderIntegerDotProduct ); -# endif - } - - bool operator!=( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderIntegerDotProductFeatures; - }; - using PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; - - struct PhysicalDeviceShaderIntegerDotProductProperties - { - using NativeType = VkPhysicalDeviceShaderIntegerDotProductProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerDotProductProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductProperties( - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , integerDotProduct8BitUnsignedAccelerated( integerDotProduct8BitUnsignedAccelerated_ ) - , integerDotProduct8BitSignedAccelerated( integerDotProduct8BitSignedAccelerated_ ) - , integerDotProduct8BitMixedSignednessAccelerated( integerDotProduct8BitMixedSignednessAccelerated_ ) - , integerDotProduct4x8BitPackedUnsignedAccelerated( integerDotProduct4x8BitPackedUnsignedAccelerated_ ) - , integerDotProduct4x8BitPackedSignedAccelerated( integerDotProduct4x8BitPackedSignedAccelerated_ ) - , integerDotProduct4x8BitPackedMixedSignednessAccelerated( integerDotProduct4x8BitPackedMixedSignednessAccelerated_ ) - , integerDotProduct16BitUnsignedAccelerated( integerDotProduct16BitUnsignedAccelerated_ ) - , integerDotProduct16BitSignedAccelerated( integerDotProduct16BitSignedAccelerated_ ) - , integerDotProduct16BitMixedSignednessAccelerated( integerDotProduct16BitMixedSignednessAccelerated_ ) - , integerDotProduct32BitUnsignedAccelerated( integerDotProduct32BitUnsignedAccelerated_ ) - , integerDotProduct32BitSignedAccelerated( integerDotProduct32BitSignedAccelerated_ ) - , integerDotProduct32BitMixedSignednessAccelerated( integerDotProduct32BitMixedSignednessAccelerated_ ) - , integerDotProduct64BitUnsignedAccelerated( integerDotProduct64BitUnsignedAccelerated_ ) - , integerDotProduct64BitSignedAccelerated( integerDotProduct64BitSignedAccelerated_ ) - , integerDotProduct64BitMixedSignednessAccelerated( integerDotProduct64BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitUnsignedAccelerated( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitSignedAccelerated( integerDotProductAccumulatingSaturating8BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated( - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitUnsignedAccelerated( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitSignedAccelerated( integerDotProductAccumulatingSaturating16BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitUnsignedAccelerated( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitSignedAccelerated( integerDotProductAccumulatingSaturating32BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitUnsignedAccelerated( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitSignedAccelerated( integerDotProductAccumulatingSaturating64BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderIntegerDotProductProperties( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerDotProductProperties( VkPhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderIntegerDotProductProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderIntegerDotProductProperties & operator=( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerDotProductProperties & operator=( VkPhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShaderIntegerDotProductProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderIntegerDotProductProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - integerDotProduct8BitUnsignedAccelerated, - integerDotProduct8BitSignedAccelerated, - integerDotProduct8BitMixedSignednessAccelerated, - integerDotProduct4x8BitPackedUnsignedAccelerated, - integerDotProduct4x8BitPackedSignedAccelerated, - integerDotProduct4x8BitPackedMixedSignednessAccelerated, - integerDotProduct16BitUnsignedAccelerated, - integerDotProduct16BitSignedAccelerated, - integerDotProduct16BitMixedSignednessAccelerated, - integerDotProduct32BitUnsignedAccelerated, - integerDotProduct32BitSignedAccelerated, - integerDotProduct32BitMixedSignednessAccelerated, - integerDotProduct64BitUnsignedAccelerated, - integerDotProduct64BitSignedAccelerated, - integerDotProduct64BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating8BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating8BitSignedAccelerated, - integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating16BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating16BitSignedAccelerated, - integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating32BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating32BitSignedAccelerated, - integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating64BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating64BitSignedAccelerated, - integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderIntegerDotProductProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( integerDotProduct8BitUnsignedAccelerated == rhs.integerDotProduct8BitUnsignedAccelerated ) && - ( integerDotProduct8BitSignedAccelerated == rhs.integerDotProduct8BitSignedAccelerated ) && - ( integerDotProduct8BitMixedSignednessAccelerated == rhs.integerDotProduct8BitMixedSignednessAccelerated ) && - ( integerDotProduct4x8BitPackedUnsignedAccelerated == rhs.integerDotProduct4x8BitPackedUnsignedAccelerated ) && - ( integerDotProduct4x8BitPackedSignedAccelerated == rhs.integerDotProduct4x8BitPackedSignedAccelerated ) && - ( integerDotProduct4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProduct4x8BitPackedMixedSignednessAccelerated ) && - ( integerDotProduct16BitUnsignedAccelerated == rhs.integerDotProduct16BitUnsignedAccelerated ) && - ( integerDotProduct16BitSignedAccelerated == rhs.integerDotProduct16BitSignedAccelerated ) && - ( integerDotProduct16BitMixedSignednessAccelerated == rhs.integerDotProduct16BitMixedSignednessAccelerated ) && - ( integerDotProduct32BitUnsignedAccelerated == rhs.integerDotProduct32BitUnsignedAccelerated ) && - ( integerDotProduct32BitSignedAccelerated == rhs.integerDotProduct32BitSignedAccelerated ) && - ( integerDotProduct32BitMixedSignednessAccelerated == rhs.integerDotProduct32BitMixedSignednessAccelerated ) && - ( integerDotProduct64BitUnsignedAccelerated == rhs.integerDotProduct64BitUnsignedAccelerated ) && - ( integerDotProduct64BitSignedAccelerated == rhs.integerDotProduct64BitSignedAccelerated ) && - ( integerDotProduct64BitMixedSignednessAccelerated == rhs.integerDotProduct64BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); -# endif - } - - bool operator!=( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderIntegerDotProductProperties; - }; - using PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; - - struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL - { - using NativeType = VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderIntegerFunctions2( shaderIntegerFunctions2_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & - operator=( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & operator=( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & - setShaderIntegerFunctions2( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ ) VULKAN_HPP_NOEXCEPT - { - shaderIntegerFunctions2 = shaderIntegerFunctions2_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderIntegerFunctions2 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderIntegerFunctions2 == rhs.shaderIntegerFunctions2 ); -# endif - } - - bool operator!=( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; - }; - - struct PhysicalDeviceShaderModuleIdentifierFeaturesEXT - { - using NativeType = VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderModuleIdentifierFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderModuleIdentifier( shaderModuleIdentifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderModuleIdentifierFeaturesEXT( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderModuleIdentifierFeaturesEXT( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderModuleIdentifierFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderModuleIdentifierFeaturesEXT & operator=( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderModuleIdentifierFeaturesEXT & operator=( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierFeaturesEXT & - setShaderModuleIdentifier( VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier_ ) VULKAN_HPP_NOEXCEPT - { - shaderModuleIdentifier = shaderModuleIdentifier_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderModuleIdentifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderModuleIdentifier == rhs.shaderModuleIdentifier ); -# endif - } - - bool operator!=( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderModuleIdentifierFeaturesEXT; - }; - - struct PhysicalDeviceShaderModuleIdentifierPropertiesEXT - { - using NativeType = VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PhysicalDeviceShaderModuleIdentifierPropertiesEXT( std::array const & shaderModuleIdentifierAlgorithmUUID_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderModuleIdentifierAlgorithmUUID( shaderModuleIdentifierAlgorithmUUID_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - PhysicalDeviceShaderModuleIdentifierPropertiesEXT( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderModuleIdentifierPropertiesEXT( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderModuleIdentifierPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderModuleIdentifierPropertiesEXT & - operator=( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderModuleIdentifierPropertiesEXT & operator=( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderModuleIdentifierAlgorithmUUID ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderModuleIdentifierAlgorithmUUID == rhs.shaderModuleIdentifierAlgorithmUUID ); -# endif - } - - bool operator!=( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D shaderModuleIdentifierAlgorithmUUID = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderModuleIdentifierPropertiesEXT; - }; - - struct PhysicalDeviceShaderSMBuiltinsFeaturesNV - { - using NativeType = VkPhysicalDeviceShaderSMBuiltinsFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderSMBuiltins( shaderSMBuiltins_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSMBuiltinsFeaturesNV( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderSMBuiltinsFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderSMBuiltinsFeaturesNV & operator=( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSMBuiltinsFeaturesNV & operator=( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSMBuiltinsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSMBuiltinsFeaturesNV & setShaderSMBuiltins( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ ) VULKAN_HPP_NOEXCEPT - { - shaderSMBuiltins = shaderSMBuiltins_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderSMBuiltinsFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderSMBuiltins ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSMBuiltins == rhs.shaderSMBuiltins ); -# endif - } - - bool operator!=( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderSMBuiltinsFeaturesNV; - }; - - struct PhysicalDeviceShaderSMBuiltinsPropertiesNV - { - using NativeType = VkPhysicalDeviceShaderSMBuiltinsPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderSMBuiltinsPropertiesNV( uint32_t shaderSMCount_ = {}, uint32_t shaderWarpsPerSM_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderSMCount( shaderSMCount_ ) - , shaderWarpsPerSM( shaderWarpsPerSM_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsPropertiesNV( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSMBuiltinsPropertiesNV( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderSMBuiltinsPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderSMBuiltinsPropertiesNV & operator=( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSMBuiltinsPropertiesNV & operator=( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderSMBuiltinsPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderSMCount, shaderWarpsPerSM ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSMCount == rhs.shaderSMCount ) && ( shaderWarpsPerSM == rhs.shaderWarpsPerSM ); -# endif - } - - bool operator!=( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV; - void * pNext = {}; - uint32_t shaderSMCount = {}; - uint32_t shaderWarpsPerSM = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderSMBuiltinsPropertiesNV; - }; - - struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures - { - using NativeType = VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderSubgroupExtendedTypes( shaderSubgroupExtendedTypes_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderSubgroupExtendedTypesFeatures( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderSubgroupExtendedTypesFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderSubgroupExtendedTypesFeatures & - operator=( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSubgroupExtendedTypesFeatures & operator=( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupExtendedTypesFeatures & - setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT - { - shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderSubgroupExtendedTypes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupExtendedTypes == rhs.shaderSubgroupExtendedTypes ); -# endif - } - - bool operator!=( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; - }; - using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; - - struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR - { - using NativeType = VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderSubgroupUniformControlFlow( shaderSubgroupUniformControlFlow_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( - *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & - operator=( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & - operator=( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & - setShaderSubgroupUniformControlFlow( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow_ ) VULKAN_HPP_NOEXCEPT - { - shaderSubgroupUniformControlFlow = shaderSubgroupUniformControlFlow_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderSubgroupUniformControlFlow ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupUniformControlFlow == rhs.shaderSubgroupUniformControlFlow ); -# endif - } - - bool operator!=( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; - }; - - struct PhysicalDeviceShaderTerminateInvocationFeatures - { - using NativeType = VkPhysicalDeviceShaderTerminateInvocationFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTerminateInvocationFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderTerminateInvocation( shaderTerminateInvocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceShaderTerminateInvocationFeatures( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderTerminateInvocationFeatures( VkPhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShaderTerminateInvocationFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShaderTerminateInvocationFeatures & operator=( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShaderTerminateInvocationFeatures & operator=( VkPhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTerminateInvocationFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTerminateInvocationFeatures & - setShaderTerminateInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ ) VULKAN_HPP_NOEXCEPT - { - shaderTerminateInvocation = shaderTerminateInvocation_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShaderTerminateInvocationFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShaderTerminateInvocationFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderTerminateInvocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShaderTerminateInvocationFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderTerminateInvocation == rhs.shaderTerminateInvocation ); -# endif - } - - bool operator!=( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShaderTerminateInvocationFeatures; - }; - using PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; - - struct PhysicalDeviceShadingRateImageFeaturesNV - { - using NativeType = VkPhysicalDeviceShadingRateImageFeaturesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shadingRateImage( shadingRateImage_ ) - , shadingRateCoarseSampleOrder( shadingRateCoarseSampleOrder_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShadingRateImageFeaturesNV( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShadingRateImageFeaturesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShadingRateImageFeaturesNV & operator=( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShadingRateImageFeaturesNV & operator=( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateImage( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateImage = shadingRateImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & - setShadingRateCoarseSampleOrder( VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateCoarseSampleOrder = shadingRateCoarseSampleOrder_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceShadingRateImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShadingRateImageFeaturesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shadingRateImage, shadingRateCoarseSampleOrder ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShadingRateImageFeaturesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateImage == rhs.shadingRateImage ) && - ( shadingRateCoarseSampleOrder == rhs.shadingRateCoarseSampleOrder ); -# endif - } - - bool operator!=( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage = {}; - VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShadingRateImageFeaturesNV; - }; - - struct PhysicalDeviceShadingRateImagePropertiesNV - { - using NativeType = VkPhysicalDeviceShadingRateImagePropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImagePropertiesNV( VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize_ = {}, - uint32_t shadingRatePaletteSize_ = {}, - uint32_t shadingRateMaxCoarseSamples_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shadingRateTexelSize( shadingRateTexelSize_ ) - , shadingRatePaletteSize( shadingRatePaletteSize_ ) - , shadingRateMaxCoarseSamples( shadingRateMaxCoarseSamples_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImagePropertiesNV( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShadingRateImagePropertiesNV( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceShadingRateImagePropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceShadingRateImagePropertiesNV & operator=( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceShadingRateImagePropertiesNV & operator=( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceShadingRateImagePropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceShadingRateImagePropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shadingRateTexelSize, shadingRatePaletteSize, shadingRateMaxCoarseSamples ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceShadingRateImagePropertiesNV const & ) const = default; -#else - bool operator==( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateTexelSize == rhs.shadingRateTexelSize ) && - ( shadingRatePaletteSize == rhs.shadingRatePaletteSize ) && ( shadingRateMaxCoarseSamples == rhs.shadingRateMaxCoarseSamples ); -# endif - } - - bool operator!=( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize = {}; - uint32_t shadingRatePaletteSize = {}; - uint32_t shadingRateMaxCoarseSamples = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceShadingRateImagePropertiesNV; - }; - - struct PhysicalDeviceSparseImageFormatInfo2 - { - using NativeType = VkPhysicalDeviceSparseImageFormatInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSparseImageFormatInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceSparseImageFormatInfo2( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ImageType type_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, - VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , type( type_ ) - , samples( samples_ ) - , usage( usage_ ) - , tiling( tiling_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseImageFormatInfo2( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSparseImageFormatInfo2( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSparseImageFormatInfo2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSparseImageFormatInfo2 & operator=( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSparseImageFormatInfo2 & operator=( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT - { - samples = samples_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT - { - usage = usage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT - { - tiling = tiling_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSparseImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSparseImageFormatInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, format, type, samples, usage, tiling ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSparseImageFormatInfo2 const & ) const = default; -#else - bool operator==( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( type == rhs.type ) && ( samples == rhs.samples ) && - ( usage == rhs.usage ) && ( tiling == rhs.tiling ); -# endif - } - - bool operator!=( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ImageType type = VULKAN_HPP_NAMESPACE::ImageType::e1D; - VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; - VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; - VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSparseImageFormatInfo2; - }; - using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; - - struct PhysicalDeviceSubgroupProperties - { - using NativeType = VkPhysicalDeviceSubgroupProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupProperties( uint32_t subgroupSize_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedStages_ = {}, - VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags supportedOperations_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 quadOperationsInAllStages_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subgroupSize( subgroupSize_ ) - , supportedStages( supportedStages_ ) - , supportedOperations( supportedOperations_ ) - , quadOperationsInAllStages( quadOperationsInAllStages_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupProperties( PhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupProperties( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubgroupProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubgroupProperties & operator=( PhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupProperties & operator=( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSubgroupProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubgroupProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subgroupSize, supportedStages, supportedOperations, quadOperationsInAllStages ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubgroupProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceSubgroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subgroupSize == rhs.subgroupSize ) && ( supportedStages == rhs.supportedStages ) && - ( supportedOperations == rhs.supportedOperations ) && ( quadOperationsInAllStages == rhs.quadOperationsInAllStages ); -# endif - } - - bool operator!=( PhysicalDeviceSubgroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupProperties; - void * pNext = {}; - uint32_t subgroupSize = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedStages = {}; - VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags supportedOperations = {}; - VULKAN_HPP_NAMESPACE::Bool32 quadOperationsInAllStages = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubgroupProperties; - }; - - struct PhysicalDeviceSubgroupSizeControlFeatures - { - using NativeType = VkPhysicalDeviceSubgroupSizeControlFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupSizeControlFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeatures( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subgroupSizeControl( subgroupSizeControl_ ) - , computeFullSubgroups( computeFullSubgroups_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeatures( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupSizeControlFeatures( VkPhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubgroupSizeControlFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubgroupSizeControlFeatures & operator=( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupSizeControlFeatures & operator=( VkPhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & - setSubgroupSizeControl( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT - { - subgroupSizeControl = subgroupSizeControl_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & - setComputeFullSubgroups( VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT - { - computeFullSubgroups = computeFullSubgroups_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSubgroupSizeControlFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubgroupSizeControlFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subgroupSizeControl, computeFullSubgroups ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubgroupSizeControlFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subgroupSizeControl == rhs.subgroupSizeControl ) && - ( computeFullSubgroups == rhs.computeFullSubgroups ); -# endif - } - - bool operator!=( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl = {}; - VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubgroupSizeControlFeatures; - }; - using PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; - - struct PhysicalDeviceSubgroupSizeControlProperties - { - using NativeType = VkPhysicalDeviceSubgroupSizeControlProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupSizeControlProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlProperties( uint32_t minSubgroupSize_ = {}, - uint32_t maxSubgroupSize_ = {}, - uint32_t maxComputeWorkgroupSubgroups_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minSubgroupSize( minSubgroupSize_ ) - , maxSubgroupSize( maxSubgroupSize_ ) - , maxComputeWorkgroupSubgroups( maxComputeWorkgroupSubgroups_ ) - , requiredSubgroupSizeStages( requiredSubgroupSizeStages_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlProperties( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupSizeControlProperties( VkPhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubgroupSizeControlProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubgroupSizeControlProperties & operator=( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubgroupSizeControlProperties & operator=( VkPhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSubgroupSizeControlProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubgroupSizeControlProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, minSubgroupSize, maxSubgroupSize, maxComputeWorkgroupSubgroups, requiredSubgroupSizeStages ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubgroupSizeControlProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minSubgroupSize == rhs.minSubgroupSize ) && ( maxSubgroupSize == rhs.maxSubgroupSize ) && - ( maxComputeWorkgroupSubgroups == rhs.maxComputeWorkgroupSubgroups ) && ( requiredSubgroupSizeStages == rhs.requiredSubgroupSizeStages ); -# endif - } - - bool operator!=( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlProperties; - void * pNext = {}; - uint32_t minSubgroupSize = {}; - uint32_t maxSubgroupSize = {}; - uint32_t maxComputeWorkgroupSubgroups = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubgroupSizeControlProperties; - }; - using PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; - - struct PhysicalDeviceSubpassMergeFeedbackFeaturesEXT - { - using NativeType = VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subpassMergeFeedback( subpassMergeFeedback_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & operator=( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & operator=( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & - setSubpassMergeFeedback( VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback_ ) VULKAN_HPP_NOEXCEPT - { - subpassMergeFeedback = subpassMergeFeedback_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subpassMergeFeedback ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassMergeFeedback == rhs.subpassMergeFeedback ); -# endif - } - - bool operator!=( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubpassMergeFeedbackFeaturesEXT; - }; - - struct PhysicalDeviceSubpassShadingFeaturesHUAWEI - { - using NativeType = VkPhysicalDeviceSubpassShadingFeaturesHUAWEI; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 subpassShading_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subpassShading( subpassShading_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingFeaturesHUAWEI( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassShadingFeaturesHUAWEI( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubpassShadingFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubpassShadingFeaturesHUAWEI & operator=( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassShadingFeaturesHUAWEI & operator=( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassShadingFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassShadingFeaturesHUAWEI & setSubpassShading( VULKAN_HPP_NAMESPACE::Bool32 subpassShading_ ) VULKAN_HPP_NOEXCEPT - { - subpassShading = subpassShading_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubpassShadingFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subpassShading ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & ) const = default; -#else - bool operator==( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassShading == rhs.subpassShading ); -# endif - } - - bool operator!=( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 subpassShading = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubpassShadingFeaturesHUAWEI; - }; - - struct PhysicalDeviceSubpassShadingPropertiesHUAWEI - { - using NativeType = VkPhysicalDeviceSubpassShadingPropertiesHUAWEI; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingPropertiesHUAWEI( uint32_t maxSubpassShadingWorkgroupSizeAspectRatio_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxSubpassShadingWorkgroupSizeAspectRatio( maxSubpassShadingWorkgroupSizeAspectRatio_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingPropertiesHUAWEI( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassShadingPropertiesHUAWEI( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSubpassShadingPropertiesHUAWEI( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSubpassShadingPropertiesHUAWEI & operator=( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSubpassShadingPropertiesHUAWEI & operator=( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSubpassShadingPropertiesHUAWEI &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxSubpassShadingWorkgroupSizeAspectRatio ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & ) const = default; -#else - bool operator==( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSubpassShadingWorkgroupSizeAspectRatio == rhs.maxSubpassShadingWorkgroupSizeAspectRatio ); -# endif - } - - bool operator!=( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI; - void * pNext = {}; - uint32_t maxSubpassShadingWorkgroupSizeAspectRatio = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSubpassShadingPropertiesHUAWEI; - }; - - struct PhysicalDeviceSurfaceInfo2KHR - { - using NativeType = VkPhysicalDeviceSurfaceInfo2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSurfaceInfo2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , surface( surface_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( PhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSurfaceInfo2KHR( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSurfaceInfo2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSurfaceInfo2KHR & operator=( PhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSurfaceInfo2KHR & operator=( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSurfaceInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSurfaceInfo2KHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT - { - surface = surface_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSurfaceInfo2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSurfaceInfo2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, surface ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSurfaceInfo2KHR const & ) const = default; -#else - bool operator==( PhysicalDeviceSurfaceInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surface == rhs.surface ); -# endif - } - - bool operator!=( PhysicalDeviceSurfaceInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceKHR surface = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSurfaceInfo2KHR; - }; - - struct PhysicalDeviceSynchronization2Features - { - using NativeType = VkPhysicalDeviceSynchronization2Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSynchronization2Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceSynchronization2Features( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , synchronization2( synchronization2_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceSynchronization2Features( PhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSynchronization2Features( VkPhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceSynchronization2Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceSynchronization2Features & operator=( PhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceSynchronization2Features & operator=( VkPhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSynchronization2Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSynchronization2Features & setSynchronization2( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ ) VULKAN_HPP_NOEXCEPT - { - synchronization2 = synchronization2_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceSynchronization2Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceSynchronization2Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, synchronization2 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceSynchronization2Features const & ) const = default; -#else - bool operator==( PhysicalDeviceSynchronization2Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( synchronization2 == rhs.synchronization2 ); -# endif - } - - bool operator!=( PhysicalDeviceSynchronization2Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSynchronization2Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 synchronization2 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceSynchronization2Features; - }; - using PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; - - struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT - { - using NativeType = VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , texelBufferAlignment( texelBufferAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceTexelBufferAlignmentFeaturesEXT( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTexelBufferAlignmentFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTexelBufferAlignmentFeaturesEXT & operator=( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTexelBufferAlignmentFeaturesEXT & operator=( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTexelBufferAlignmentFeaturesEXT & - setTexelBufferAlignment( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ ) VULKAN_HPP_NOEXCEPT - { - texelBufferAlignment = texelBufferAlignment_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, texelBufferAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( texelBufferAlignment == rhs.texelBufferAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTexelBufferAlignmentFeaturesEXT; - }; - - struct PhysicalDeviceTexelBufferAlignmentProperties - { - using NativeType = VkPhysicalDeviceTexelBufferAlignmentProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTexelBufferAlignmentProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentProperties( VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , storageTexelBufferOffsetAlignmentBytes( storageTexelBufferOffsetAlignmentBytes_ ) - , storageTexelBufferOffsetSingleTexelAlignment( storageTexelBufferOffsetSingleTexelAlignment_ ) - , uniformTexelBufferOffsetAlignmentBytes( uniformTexelBufferOffsetAlignmentBytes_ ) - , uniformTexelBufferOffsetSingleTexelAlignment( uniformTexelBufferOffsetSingleTexelAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentProperties( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTexelBufferAlignmentProperties( VkPhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTexelBufferAlignmentProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTexelBufferAlignmentProperties & operator=( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTexelBufferAlignmentProperties & operator=( VkPhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceTexelBufferAlignmentProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTexelBufferAlignmentProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - storageTexelBufferOffsetAlignmentBytes, - storageTexelBufferOffsetSingleTexelAlignment, - uniformTexelBufferOffsetAlignmentBytes, - uniformTexelBufferOffsetSingleTexelAlignment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTexelBufferAlignmentProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageTexelBufferOffsetAlignmentBytes == rhs.storageTexelBufferOffsetAlignmentBytes ) && - ( storageTexelBufferOffsetSingleTexelAlignment == rhs.storageTexelBufferOffsetSingleTexelAlignment ) && - ( uniformTexelBufferOffsetAlignmentBytes == rhs.uniformTexelBufferOffsetAlignmentBytes ) && - ( uniformTexelBufferOffsetSingleTexelAlignment == rhs.uniformTexelBufferOffsetSingleTexelAlignment ); -# endif - } - - bool operator!=( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTexelBufferAlignmentProperties; - }; - using PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; - - struct PhysicalDeviceTextureCompressionASTCHDRFeatures - { - using NativeType = VkPhysicalDeviceTextureCompressionASTCHDRFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeatures( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , textureCompressionASTC_HDR( textureCompressionASTC_HDR_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceTextureCompressionASTCHDRFeatures( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTextureCompressionASTCHDRFeatures( VkPhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTextureCompressionASTCHDRFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTextureCompressionASTCHDRFeatures & operator=( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTextureCompressionASTCHDRFeatures & operator=( VkPhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTextureCompressionASTCHDRFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTextureCompressionASTCHDRFeatures & - setTextureCompressionASTC_HDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT - { - textureCompressionASTC_HDR = textureCompressionASTC_HDR_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceTextureCompressionASTCHDRFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTextureCompressionASTCHDRFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, textureCompressionASTC_HDR ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTextureCompressionASTCHDRFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( textureCompressionASTC_HDR == rhs.textureCompressionASTC_HDR ); -# endif - } - - bool operator!=( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTextureCompressionASTCHDRFeatures; - }; - using PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; - - struct PhysicalDeviceTilePropertiesFeaturesQCOM - { - using NativeType = VkPhysicalDeviceTilePropertiesFeaturesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTilePropertiesFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 tileProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , tileProperties( tileProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTilePropertiesFeaturesQCOM( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTilePropertiesFeaturesQCOM( VkPhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTilePropertiesFeaturesQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTilePropertiesFeaturesQCOM & operator=( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTilePropertiesFeaturesQCOM & operator=( VkPhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTilePropertiesFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTilePropertiesFeaturesQCOM & setTileProperties( VULKAN_HPP_NAMESPACE::Bool32 tileProperties_ ) VULKAN_HPP_NOEXCEPT - { - tileProperties = tileProperties_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceTilePropertiesFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTilePropertiesFeaturesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, tileProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTilePropertiesFeaturesQCOM const & ) const = default; -#else - bool operator==( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tileProperties == rhs.tileProperties ); -# endif - } - - bool operator!=( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 tileProperties = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTilePropertiesFeaturesQCOM; - }; - - struct PhysicalDeviceTimelineSemaphoreFeatures - { - using NativeType = VkPhysicalDeviceTimelineSemaphoreFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTimelineSemaphoreFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeatures( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , timelineSemaphore( timelineSemaphore_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeatures( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTimelineSemaphoreFeatures( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTimelineSemaphoreFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTimelineSemaphoreFeatures & operator=( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTimelineSemaphoreFeatures & operator=( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTimelineSemaphoreFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTimelineSemaphoreFeatures & - setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT - { - timelineSemaphore = timelineSemaphore_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceTimelineSemaphoreFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTimelineSemaphoreFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, timelineSemaphore ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTimelineSemaphoreFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( timelineSemaphore == rhs.timelineSemaphore ); -# endif - } - - bool operator!=( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTimelineSemaphoreFeatures; - }; - using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; - - struct PhysicalDeviceTimelineSemaphoreProperties - { - using NativeType = VkPhysicalDeviceTimelineSemaphoreProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTimelineSemaphoreProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreProperties( uint64_t maxTimelineSemaphoreValueDifference_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxTimelineSemaphoreValueDifference( maxTimelineSemaphoreValueDifference_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreProperties( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTimelineSemaphoreProperties( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTimelineSemaphoreProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTimelineSemaphoreProperties & operator=( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTimelineSemaphoreProperties & operator=( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceTimelineSemaphoreProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTimelineSemaphoreProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxTimelineSemaphoreValueDifference ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTimelineSemaphoreProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTimelineSemaphoreValueDifference == rhs.maxTimelineSemaphoreValueDifference ); -# endif - } - - bool operator!=( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreProperties; - void * pNext = {}; - uint64_t maxTimelineSemaphoreValueDifference = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTimelineSemaphoreProperties; - }; - using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; - - struct PhysicalDeviceToolProperties - { - using NativeType = VkPhysicalDeviceToolProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceToolProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceToolProperties( std::array const & name_ = {}, - std::array const & version_ = {}, - VULKAN_HPP_NAMESPACE::ToolPurposeFlags purposes_ = {}, - std::array const & description_ = {}, - std::array const & layer_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , name( name_ ) - , version( version_ ) - , purposes( purposes_ ) - , description( description_ ) - , layer( layer_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceToolProperties( PhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceToolProperties( VkPhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceToolProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceToolProperties & operator=( PhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceToolProperties & operator=( VkPhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceToolProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceToolProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ToolPurposeFlags const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, name, version, purposes, description, layer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceToolProperties const & ) const = default; -#else - bool operator==( PhysicalDeviceToolProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( name == rhs.name ) && ( version == rhs.version ) && ( purposes == rhs.purposes ) && - ( description == rhs.description ) && ( layer == rhs.layer ); -# endif - } - - bool operator!=( PhysicalDeviceToolProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceToolProperties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D version = {}; - VULKAN_HPP_NAMESPACE::ToolPurposeFlags purposes = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D layer = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceToolProperties; - }; - using PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; - - struct PhysicalDeviceTransformFeedbackFeaturesEXT - { - using NativeType = VkPhysicalDeviceTransformFeedbackFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , transformFeedback( transformFeedback_ ) - , geometryStreams( geometryStreams_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTransformFeedbackFeaturesEXT( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTransformFeedbackFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTransformFeedbackFeaturesEXT & operator=( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTransformFeedbackFeaturesEXT & operator=( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & - setTransformFeedback( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ ) VULKAN_HPP_NOEXCEPT - { - transformFeedback = transformFeedback_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & setGeometryStreams( VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ ) VULKAN_HPP_NOEXCEPT - { - geometryStreams = geometryStreams_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceTransformFeedbackFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTransformFeedbackFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, transformFeedback, geometryStreams ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTransformFeedbackFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transformFeedback == rhs.transformFeedback ) && ( geometryStreams == rhs.geometryStreams ); -# endif - } - - bool operator!=( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedback = {}; - VULKAN_HPP_NAMESPACE::Bool32 geometryStreams = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTransformFeedbackFeaturesEXT; - }; - - struct PhysicalDeviceTransformFeedbackPropertiesEXT - { - using NativeType = VkPhysicalDeviceTransformFeedbackPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackPropertiesEXT( uint32_t maxTransformFeedbackStreams_ = {}, - uint32_t maxTransformFeedbackBuffers_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize maxTransformFeedbackBufferSize_ = {}, - uint32_t maxTransformFeedbackStreamDataSize_ = {}, - uint32_t maxTransformFeedbackBufferDataSize_ = {}, - uint32_t maxTransformFeedbackBufferDataStride_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackQueries_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackStreamsLinesTriangles_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackRasterizationStreamSelect_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackDraw_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxTransformFeedbackStreams( maxTransformFeedbackStreams_ ) - , maxTransformFeedbackBuffers( maxTransformFeedbackBuffers_ ) - , maxTransformFeedbackBufferSize( maxTransformFeedbackBufferSize_ ) - , maxTransformFeedbackStreamDataSize( maxTransformFeedbackStreamDataSize_ ) - , maxTransformFeedbackBufferDataSize( maxTransformFeedbackBufferDataSize_ ) - , maxTransformFeedbackBufferDataStride( maxTransformFeedbackBufferDataStride_ ) - , transformFeedbackQueries( transformFeedbackQueries_ ) - , transformFeedbackStreamsLinesTriangles( transformFeedbackStreamsLinesTriangles_ ) - , transformFeedbackRasterizationStreamSelect( transformFeedbackRasterizationStreamSelect_ ) - , transformFeedbackDraw( transformFeedbackDraw_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackPropertiesEXT( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTransformFeedbackPropertiesEXT( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceTransformFeedbackPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceTransformFeedbackPropertiesEXT & operator=( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceTransformFeedbackPropertiesEXT & operator=( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceTransformFeedbackPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceTransformFeedbackPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - maxTransformFeedbackStreams, - maxTransformFeedbackBuffers, - maxTransformFeedbackBufferSize, - maxTransformFeedbackStreamDataSize, - maxTransformFeedbackBufferDataSize, - maxTransformFeedbackBufferDataStride, - transformFeedbackQueries, - transformFeedbackStreamsLinesTriangles, - transformFeedbackRasterizationStreamSelect, - transformFeedbackDraw ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceTransformFeedbackPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTransformFeedbackStreams == rhs.maxTransformFeedbackStreams ) && - ( maxTransformFeedbackBuffers == rhs.maxTransformFeedbackBuffers ) && ( maxTransformFeedbackBufferSize == rhs.maxTransformFeedbackBufferSize ) && - ( maxTransformFeedbackStreamDataSize == rhs.maxTransformFeedbackStreamDataSize ) && - ( maxTransformFeedbackBufferDataSize == rhs.maxTransformFeedbackBufferDataSize ) && - ( maxTransformFeedbackBufferDataStride == rhs.maxTransformFeedbackBufferDataStride ) && - ( transformFeedbackQueries == rhs.transformFeedbackQueries ) && - ( transformFeedbackStreamsLinesTriangles == rhs.transformFeedbackStreamsLinesTriangles ) && - ( transformFeedbackRasterizationStreamSelect == rhs.transformFeedbackRasterizationStreamSelect ) && - ( transformFeedbackDraw == rhs.transformFeedbackDraw ); -# endif - } - - bool operator!=( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT; - void * pNext = {}; - uint32_t maxTransformFeedbackStreams = {}; - uint32_t maxTransformFeedbackBuffers = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxTransformFeedbackBufferSize = {}; - uint32_t maxTransformFeedbackStreamDataSize = {}; - uint32_t maxTransformFeedbackBufferDataSize = {}; - uint32_t maxTransformFeedbackBufferDataStride = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackQueries = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackStreamsLinesTriangles = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackRasterizationStreamSelect = {}; - VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackDraw = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceTransformFeedbackPropertiesEXT; - }; - - struct PhysicalDeviceUniformBufferStandardLayoutFeatures - { - using NativeType = VkPhysicalDeviceUniformBufferStandardLayoutFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , uniformBufferStandardLayout( uniformBufferStandardLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceUniformBufferStandardLayoutFeatures( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceUniformBufferStandardLayoutFeatures( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceUniformBufferStandardLayoutFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceUniformBufferStandardLayoutFeatures & - operator=( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceUniformBufferStandardLayoutFeatures & operator=( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceUniformBufferStandardLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceUniformBufferStandardLayoutFeatures & - setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT - { - uniformBufferStandardLayout = uniformBufferStandardLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, uniformBufferStandardLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceUniformBufferStandardLayoutFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( uniformBufferStandardLayout == rhs.uniformBufferStandardLayout ); -# endif - } - - bool operator!=( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceUniformBufferStandardLayoutFeatures; - }; - using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; - - struct PhysicalDeviceVariablePointersFeatures - { - using NativeType = VkPhysicalDeviceVariablePointersFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVariablePointersFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , variablePointersStorageBuffer( variablePointersStorageBuffer_ ) - , variablePointers( variablePointers_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( PhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVariablePointersFeatures( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVariablePointersFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVariablePointersFeatures & operator=( PhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVariablePointersFeatures & operator=( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & - setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT - { - variablePointersStorageBuffer = variablePointersStorageBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT - { - variablePointers = variablePointers_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVariablePointersFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVariablePointersFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, variablePointersStorageBuffer, variablePointers ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVariablePointersFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceVariablePointersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( variablePointersStorageBuffer == rhs.variablePointersStorageBuffer ) && - ( variablePointers == rhs.variablePointers ); -# endif - } - - bool operator!=( PhysicalDeviceVariablePointersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVariablePointersFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer = {}; - VULKAN_HPP_NAMESPACE::Bool32 variablePointers = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVariablePointersFeatures; - }; - using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; - using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - - struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT - { - using NativeType = VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexAttributeInstanceRateDivisor( vertexAttributeInstanceRateDivisor_ ) - , vertexAttributeInstanceRateZeroDivisor( vertexAttributeInstanceRateZeroDivisor_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceVertexAttributeDivisorFeaturesEXT( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVertexAttributeDivisorFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVertexAttributeDivisorFeaturesEXT & operator=( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexAttributeDivisorFeaturesEXT & operator=( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeaturesEXT & - setVertexAttributeInstanceRateDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ ) VULKAN_HPP_NOEXCEPT - { - vertexAttributeInstanceRateDivisor = vertexAttributeInstanceRateDivisor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeaturesEXT & - setVertexAttributeInstanceRateZeroDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ ) VULKAN_HPP_NOEXCEPT - { - vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vertexAttributeInstanceRateDivisor, vertexAttributeInstanceRateZeroDivisor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexAttributeInstanceRateDivisor == rhs.vertexAttributeInstanceRateDivisor ) && - ( vertexAttributeInstanceRateZeroDivisor == rhs.vertexAttributeInstanceRateZeroDivisor ); -# endif - } - - bool operator!=( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVertexAttributeDivisorFeaturesEXT; - }; - - struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT - { - using NativeType = VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorPropertiesEXT( uint32_t maxVertexAttribDivisor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxVertexAttribDivisor( maxVertexAttribDivisor_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceVertexAttributeDivisorPropertiesEXT( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexAttributeDivisorPropertiesEXT( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVertexAttributeDivisorPropertiesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVertexAttributeDivisorPropertiesEXT & - operator=( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexAttributeDivisorPropertiesEXT & operator=( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxVertexAttribDivisor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVertexAttribDivisor == rhs.maxVertexAttribDivisor ); -# endif - } - - bool operator!=( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT; - void * pNext = {}; - uint32_t maxVertexAttribDivisor = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVertexAttributeDivisorPropertiesEXT; - }; - - struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT - { - using NativeType = VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexInputDynamicStateFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexInputDynamicState( vertexInputDynamicState_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceVertexInputDynamicStateFeaturesEXT( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexInputDynamicStateFeaturesEXT( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVertexInputDynamicStateFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVertexInputDynamicStateFeaturesEXT & operator=( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVertexInputDynamicStateFeaturesEXT & operator=( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexInputDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexInputDynamicStateFeaturesEXT & - setVertexInputDynamicState( VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState_ ) VULKAN_HPP_NOEXCEPT - { - vertexInputDynamicState = vertexInputDynamicState_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vertexInputDynamicState ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexInputDynamicState == rhs.vertexInputDynamicState ); -# endif - } - - bool operator!=( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVertexInputDynamicStateFeaturesEXT; - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct PhysicalDeviceVideoFormatInfoKHR - { - using NativeType = VkPhysicalDeviceVideoFormatInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoFormatInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoFormatInfoKHR( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageUsage( imageUsage_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoFormatInfoKHR( PhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVideoFormatInfoKHR( VkPhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVideoFormatInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVideoFormatInfoKHR & operator=( PhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVideoFormatInfoKHR & operator=( VkPhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoFormatInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoFormatInfoKHR & setImageUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT - { - imageUsage = imageUsage_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVideoFormatInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVideoFormatInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageUsage ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVideoFormatInfoKHR const & ) const = default; -# else - bool operator==( PhysicalDeviceVideoFormatInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageUsage == rhs.imageUsage ); -# endif - } - - bool operator!=( PhysicalDeviceVideoFormatInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoFormatInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVideoFormatInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - struct PhysicalDeviceVulkan11Features - { - using NativeType = VkPhysicalDeviceVulkan11Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan11Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan11Features( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiview_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , storageBuffer16BitAccess( storageBuffer16BitAccess_ ) - , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ ) - , storagePushConstant16( storagePushConstant16_ ) - , storageInputOutput16( storageInputOutput16_ ) - , multiview( multiview_ ) - , multiviewGeometryShader( multiviewGeometryShader_ ) - , multiviewTessellationShader( multiviewTessellationShader_ ) - , variablePointersStorageBuffer( variablePointersStorageBuffer_ ) - , variablePointers( variablePointers_ ) - , protectedMemory( protectedMemory_ ) - , samplerYcbcrConversion( samplerYcbcrConversion_ ) - , shaderDrawParameters( shaderDrawParameters_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan11Features( PhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan11Features( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan11Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan11Features & operator=( PhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan11Features & operator=( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - storageBuffer16BitAccess = storageBuffer16BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT - { - storagePushConstant16 = storagePushConstant16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT - { - storageInputOutput16 = storageInputOutput16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT - { - multiview = multiview_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT - { - multiviewGeometryShader = multiviewGeometryShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT - { - multiviewTessellationShader = multiviewTessellationShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT - { - variablePointersStorageBuffer = variablePointersStorageBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT - { - variablePointers = variablePointers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT - { - protectedMemory = protectedMemory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & - setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT - { - samplerYcbcrConversion = samplerYcbcrConversion_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT - { - shaderDrawParameters = shaderDrawParameters_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVulkan11Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan11Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - storageBuffer16BitAccess, - uniformAndStorageBuffer16BitAccess, - storagePushConstant16, - storageInputOutput16, - multiview, - multiviewGeometryShader, - multiviewTessellationShader, - variablePointersStorageBuffer, - variablePointers, - protectedMemory, - samplerYcbcrConversion, - shaderDrawParameters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan11Features const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan11Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer16BitAccess == rhs.storageBuffer16BitAccess ) && - ( uniformAndStorageBuffer16BitAccess == rhs.uniformAndStorageBuffer16BitAccess ) && ( storagePushConstant16 == rhs.storagePushConstant16 ) && - ( storageInputOutput16 == rhs.storageInputOutput16 ) && ( multiview == rhs.multiview ) && - ( multiviewGeometryShader == rhs.multiviewGeometryShader ) && ( multiviewTessellationShader == rhs.multiviewTessellationShader ) && - ( variablePointersStorageBuffer == rhs.variablePointersStorageBuffer ) && ( variablePointers == rhs.variablePointers ) && - ( protectedMemory == rhs.protectedMemory ) && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion ) && - ( shaderDrawParameters == rhs.shaderDrawParameters ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan11Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan11Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiview = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader = {}; - VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer = {}; - VULKAN_HPP_NAMESPACE::Bool32 variablePointers = {}; - VULKAN_HPP_NAMESPACE::Bool32 protectedMemory = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan11Features; - }; - - struct PhysicalDeviceVulkan11Properties - { - using NativeType = VkPhysicalDeviceVulkan11Properties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan11Properties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Properties( - std::array const & deviceUUID_ = {}, - std::array const & driverUUID_ = {}, - std::array const & deviceLUID_ = {}, - uint32_t deviceNodeMask_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ = {}, - uint32_t subgroupSize_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags subgroupSupportedStages_ = {}, - VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags subgroupSupportedOperations_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 subgroupQuadOperationsInAllStages_ = {}, - VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes, - uint32_t maxMultiviewViewCount_ = {}, - uint32_t maxMultiviewInstanceIndex_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ = {}, - uint32_t maxPerSetDescriptors_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , deviceUUID( deviceUUID_ ) - , driverUUID( driverUUID_ ) - , deviceLUID( deviceLUID_ ) - , deviceNodeMask( deviceNodeMask_ ) - , deviceLUIDValid( deviceLUIDValid_ ) - , subgroupSize( subgroupSize_ ) - , subgroupSupportedStages( subgroupSupportedStages_ ) - , subgroupSupportedOperations( subgroupSupportedOperations_ ) - , subgroupQuadOperationsInAllStages( subgroupQuadOperationsInAllStages_ ) - , pointClippingBehavior( pointClippingBehavior_ ) - , maxMultiviewViewCount( maxMultiviewViewCount_ ) - , maxMultiviewInstanceIndex( maxMultiviewInstanceIndex_ ) - , protectedNoFault( protectedNoFault_ ) - , maxPerSetDescriptors( maxPerSetDescriptors_ ) - , maxMemoryAllocationSize( maxMemoryAllocationSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Properties( PhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan11Properties( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan11Properties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan11Properties & operator=( PhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan11Properties & operator=( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceVulkan11Properties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan11Properties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ShaderStageFlags const &, - VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::PointClippingBehavior const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::DeviceSize const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - deviceUUID, - driverUUID, - deviceLUID, - deviceNodeMask, - deviceLUIDValid, - subgroupSize, - subgroupSupportedStages, - subgroupSupportedOperations, - subgroupQuadOperationsInAllStages, - pointClippingBehavior, - maxMultiviewViewCount, - maxMultiviewInstanceIndex, - protectedNoFault, - maxPerSetDescriptors, - maxMemoryAllocationSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan11Properties const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan11Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceUUID == rhs.deviceUUID ) && ( driverUUID == rhs.driverUUID ) && - ( deviceLUID == rhs.deviceLUID ) && ( deviceNodeMask == rhs.deviceNodeMask ) && ( deviceLUIDValid == rhs.deviceLUIDValid ) && - ( subgroupSize == rhs.subgroupSize ) && ( subgroupSupportedStages == rhs.subgroupSupportedStages ) && - ( subgroupSupportedOperations == rhs.subgroupSupportedOperations ) && - ( subgroupQuadOperationsInAllStages == rhs.subgroupQuadOperationsInAllStages ) && ( pointClippingBehavior == rhs.pointClippingBehavior ) && - ( maxMultiviewViewCount == rhs.maxMultiviewViewCount ) && ( maxMultiviewInstanceIndex == rhs.maxMultiviewInstanceIndex ) && - ( protectedNoFault == rhs.protectedNoFault ) && ( maxPerSetDescriptors == rhs.maxPerSetDescriptors ) && - ( maxMemoryAllocationSize == rhs.maxMemoryAllocationSize ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan11Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan11Properties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceUUID = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverUUID = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceLUID = {}; - uint32_t deviceNodeMask = {}; - VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid = {}; - uint32_t subgroupSize = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags subgroupSupportedStages = {}; - VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags subgroupSupportedOperations = {}; - VULKAN_HPP_NAMESPACE::Bool32 subgroupQuadOperationsInAllStages = {}; - VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes; - uint32_t maxMultiviewViewCount = {}; - uint32_t maxMultiviewInstanceIndex = {}; - VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault = {}; - uint32_t maxPerSetDescriptors = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan11Properties; - }; - - struct PhysicalDeviceVulkan12Features - { - using NativeType = VkPhysicalDeviceVulkan12Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan12Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan12Features( VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , samplerMirrorClampToEdge( samplerMirrorClampToEdge_ ) - , drawIndirectCount( drawIndirectCount_ ) - , storageBuffer8BitAccess( storageBuffer8BitAccess_ ) - , uniformAndStorageBuffer8BitAccess( uniformAndStorageBuffer8BitAccess_ ) - , storagePushConstant8( storagePushConstant8_ ) - , shaderBufferInt64Atomics( shaderBufferInt64Atomics_ ) - , shaderSharedInt64Atomics( shaderSharedInt64Atomics_ ) - , shaderFloat16( shaderFloat16_ ) - , shaderInt8( shaderInt8_ ) - , descriptorIndexing( descriptorIndexing_ ) - , shaderInputAttachmentArrayDynamicIndexing( shaderInputAttachmentArrayDynamicIndexing_ ) - , shaderUniformTexelBufferArrayDynamicIndexing( shaderUniformTexelBufferArrayDynamicIndexing_ ) - , shaderStorageTexelBufferArrayDynamicIndexing( shaderStorageTexelBufferArrayDynamicIndexing_ ) - , shaderUniformBufferArrayNonUniformIndexing( shaderUniformBufferArrayNonUniformIndexing_ ) - , shaderSampledImageArrayNonUniformIndexing( shaderSampledImageArrayNonUniformIndexing_ ) - , shaderStorageBufferArrayNonUniformIndexing( shaderStorageBufferArrayNonUniformIndexing_ ) - , shaderStorageImageArrayNonUniformIndexing( shaderStorageImageArrayNonUniformIndexing_ ) - , shaderInputAttachmentArrayNonUniformIndexing( shaderInputAttachmentArrayNonUniformIndexing_ ) - , shaderUniformTexelBufferArrayNonUniformIndexing( shaderUniformTexelBufferArrayNonUniformIndexing_ ) - , shaderStorageTexelBufferArrayNonUniformIndexing( shaderStorageTexelBufferArrayNonUniformIndexing_ ) - , descriptorBindingUniformBufferUpdateAfterBind( descriptorBindingUniformBufferUpdateAfterBind_ ) - , descriptorBindingSampledImageUpdateAfterBind( descriptorBindingSampledImageUpdateAfterBind_ ) - , descriptorBindingStorageImageUpdateAfterBind( descriptorBindingStorageImageUpdateAfterBind_ ) - , descriptorBindingStorageBufferUpdateAfterBind( descriptorBindingStorageBufferUpdateAfterBind_ ) - , descriptorBindingUniformTexelBufferUpdateAfterBind( descriptorBindingUniformTexelBufferUpdateAfterBind_ ) - , descriptorBindingStorageTexelBufferUpdateAfterBind( descriptorBindingStorageTexelBufferUpdateAfterBind_ ) - , descriptorBindingUpdateUnusedWhilePending( descriptorBindingUpdateUnusedWhilePending_ ) - , descriptorBindingPartiallyBound( descriptorBindingPartiallyBound_ ) - , descriptorBindingVariableDescriptorCount( descriptorBindingVariableDescriptorCount_ ) - , runtimeDescriptorArray( runtimeDescriptorArray_ ) - , samplerFilterMinmax( samplerFilterMinmax_ ) - , scalarBlockLayout( scalarBlockLayout_ ) - , imagelessFramebuffer( imagelessFramebuffer_ ) - , uniformBufferStandardLayout( uniformBufferStandardLayout_ ) - , shaderSubgroupExtendedTypes( shaderSubgroupExtendedTypes_ ) - , separateDepthStencilLayouts( separateDepthStencilLayouts_ ) - , hostQueryReset( hostQueryReset_ ) - , timelineSemaphore( timelineSemaphore_ ) - , bufferDeviceAddress( bufferDeviceAddress_ ) - , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ ) - , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ ) - , vulkanMemoryModel( vulkanMemoryModel_ ) - , vulkanMemoryModelDeviceScope( vulkanMemoryModelDeviceScope_ ) - , vulkanMemoryModelAvailabilityVisibilityChains( vulkanMemoryModelAvailabilityVisibilityChains_ ) - , shaderOutputViewportIndex( shaderOutputViewportIndex_ ) - , shaderOutputLayer( shaderOutputLayer_ ) - , subgroupBroadcastDynamicId( subgroupBroadcastDynamicId_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan12Features( PhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan12Features( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan12Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan12Features & operator=( PhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan12Features & operator=( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setSamplerMirrorClampToEdge( VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge_ ) VULKAN_HPP_NOEXCEPT - { - samplerMirrorClampToEdge = samplerMirrorClampToEdge_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDrawIndirectCount( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount_ ) VULKAN_HPP_NOEXCEPT - { - drawIndirectCount = drawIndirectCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - storageBuffer8BitAccess = storageBuffer8BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT - { - storagePushConstant8 = storagePushConstant8_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderBufferInt64Atomics = shaderBufferInt64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT - { - shaderSharedInt64Atomics = shaderSharedInt64Atomics_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT - { - shaderFloat16 = shaderFloat16_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT - { - shaderInt8 = shaderInt8_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorIndexing( VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing_ ) VULKAN_HPP_NOEXCEPT - { - descriptorIndexing = descriptorIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT - { - shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingUniformTexelBufferUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingStorageTexelBufferUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT - { - runtimeDescriptorArray = runtimeDescriptorArray_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setSamplerFilterMinmax( VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax_ ) VULKAN_HPP_NOEXCEPT - { - samplerFilterMinmax = samplerFilterMinmax_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT - { - scalarBlockLayout = scalarBlockLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT - { - imagelessFramebuffer = imagelessFramebuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT - { - uniformBufferStandardLayout = uniformBufferStandardLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT - { - shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT - { - separateDepthStencilLayouts = separateDepthStencilLayouts_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT - { - hostQueryReset = hostQueryReset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT - { - timelineSemaphore = timelineSemaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddress = bufferDeviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT - { - bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModel = vulkanMemoryModel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setShaderOutputViewportIndex( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex_ ) VULKAN_HPP_NOEXCEPT - { - shaderOutputViewportIndex = shaderOutputViewportIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderOutputLayer( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer_ ) VULKAN_HPP_NOEXCEPT - { - shaderOutputLayer = shaderOutputLayer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & - setSubgroupBroadcastDynamicId( VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId_ ) VULKAN_HPP_NOEXCEPT - { - subgroupBroadcastDynamicId = subgroupBroadcastDynamicId_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVulkan12Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan12Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - samplerMirrorClampToEdge, - drawIndirectCount, - storageBuffer8BitAccess, - uniformAndStorageBuffer8BitAccess, - storagePushConstant8, - shaderBufferInt64Atomics, - shaderSharedInt64Atomics, - shaderFloat16, - shaderInt8, - descriptorIndexing, - shaderInputAttachmentArrayDynamicIndexing, - shaderUniformTexelBufferArrayDynamicIndexing, - shaderStorageTexelBufferArrayDynamicIndexing, - shaderUniformBufferArrayNonUniformIndexing, - shaderSampledImageArrayNonUniformIndexing, - shaderStorageBufferArrayNonUniformIndexing, - shaderStorageImageArrayNonUniformIndexing, - shaderInputAttachmentArrayNonUniformIndexing, - shaderUniformTexelBufferArrayNonUniformIndexing, - shaderStorageTexelBufferArrayNonUniformIndexing, - descriptorBindingUniformBufferUpdateAfterBind, - descriptorBindingSampledImageUpdateAfterBind, - descriptorBindingStorageImageUpdateAfterBind, - descriptorBindingStorageBufferUpdateAfterBind, - descriptorBindingUniformTexelBufferUpdateAfterBind, - descriptorBindingStorageTexelBufferUpdateAfterBind, - descriptorBindingUpdateUnusedWhilePending, - descriptorBindingPartiallyBound, - descriptorBindingVariableDescriptorCount, - runtimeDescriptorArray, - samplerFilterMinmax, - scalarBlockLayout, - imagelessFramebuffer, - uniformBufferStandardLayout, - shaderSubgroupExtendedTypes, - separateDepthStencilLayouts, - hostQueryReset, - timelineSemaphore, - bufferDeviceAddress, - bufferDeviceAddressCaptureReplay, - bufferDeviceAddressMultiDevice, - vulkanMemoryModel, - vulkanMemoryModelDeviceScope, - vulkanMemoryModelAvailabilityVisibilityChains, - shaderOutputViewportIndex, - shaderOutputLayer, - subgroupBroadcastDynamicId ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan12Features const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan12Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( samplerMirrorClampToEdge == rhs.samplerMirrorClampToEdge ) && - ( drawIndirectCount == rhs.drawIndirectCount ) && ( storageBuffer8BitAccess == rhs.storageBuffer8BitAccess ) && - ( uniformAndStorageBuffer8BitAccess == rhs.uniformAndStorageBuffer8BitAccess ) && ( storagePushConstant8 == rhs.storagePushConstant8 ) && - ( shaderBufferInt64Atomics == rhs.shaderBufferInt64Atomics ) && ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics ) && - ( shaderFloat16 == rhs.shaderFloat16 ) && ( shaderInt8 == rhs.shaderInt8 ) && ( descriptorIndexing == rhs.descriptorIndexing ) && - ( shaderInputAttachmentArrayDynamicIndexing == rhs.shaderInputAttachmentArrayDynamicIndexing ) && - ( shaderUniformTexelBufferArrayDynamicIndexing == rhs.shaderUniformTexelBufferArrayDynamicIndexing ) && - ( shaderStorageTexelBufferArrayDynamicIndexing == rhs.shaderStorageTexelBufferArrayDynamicIndexing ) && - ( shaderUniformBufferArrayNonUniformIndexing == rhs.shaderUniformBufferArrayNonUniformIndexing ) && - ( shaderSampledImageArrayNonUniformIndexing == rhs.shaderSampledImageArrayNonUniformIndexing ) && - ( shaderStorageBufferArrayNonUniformIndexing == rhs.shaderStorageBufferArrayNonUniformIndexing ) && - ( shaderStorageImageArrayNonUniformIndexing == rhs.shaderStorageImageArrayNonUniformIndexing ) && - ( shaderInputAttachmentArrayNonUniformIndexing == rhs.shaderInputAttachmentArrayNonUniformIndexing ) && - ( shaderUniformTexelBufferArrayNonUniformIndexing == rhs.shaderUniformTexelBufferArrayNonUniformIndexing ) && - ( shaderStorageTexelBufferArrayNonUniformIndexing == rhs.shaderStorageTexelBufferArrayNonUniformIndexing ) && - ( descriptorBindingUniformBufferUpdateAfterBind == rhs.descriptorBindingUniformBufferUpdateAfterBind ) && - ( descriptorBindingSampledImageUpdateAfterBind == rhs.descriptorBindingSampledImageUpdateAfterBind ) && - ( descriptorBindingStorageImageUpdateAfterBind == rhs.descriptorBindingStorageImageUpdateAfterBind ) && - ( descriptorBindingStorageBufferUpdateAfterBind == rhs.descriptorBindingStorageBufferUpdateAfterBind ) && - ( descriptorBindingUniformTexelBufferUpdateAfterBind == rhs.descriptorBindingUniformTexelBufferUpdateAfterBind ) && - ( descriptorBindingStorageTexelBufferUpdateAfterBind == rhs.descriptorBindingStorageTexelBufferUpdateAfterBind ) && - ( descriptorBindingUpdateUnusedWhilePending == rhs.descriptorBindingUpdateUnusedWhilePending ) && - ( descriptorBindingPartiallyBound == rhs.descriptorBindingPartiallyBound ) && - ( descriptorBindingVariableDescriptorCount == rhs.descriptorBindingVariableDescriptorCount ) && - ( runtimeDescriptorArray == rhs.runtimeDescriptorArray ) && ( samplerFilterMinmax == rhs.samplerFilterMinmax ) && - ( scalarBlockLayout == rhs.scalarBlockLayout ) && ( imagelessFramebuffer == rhs.imagelessFramebuffer ) && - ( uniformBufferStandardLayout == rhs.uniformBufferStandardLayout ) && ( shaderSubgroupExtendedTypes == rhs.shaderSubgroupExtendedTypes ) && - ( separateDepthStencilLayouts == rhs.separateDepthStencilLayouts ) && ( hostQueryReset == rhs.hostQueryReset ) && - ( timelineSemaphore == rhs.timelineSemaphore ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && - ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && - ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ) && ( vulkanMemoryModel == rhs.vulkanMemoryModel ) && - ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope ) && - ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains ) && - ( shaderOutputViewportIndex == rhs.shaderOutputViewportIndex ) && ( shaderOutputLayer == rhs.shaderOutputLayer ) && - ( subgroupBroadcastDynamicId == rhs.subgroupBroadcastDynamicId ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan12Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan12Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge = {}; - VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInt8 = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount = {}; - VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray = {}; - VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax = {}; - VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout = {}; - VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes = {}; - VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts = {}; - VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset = {}; - VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; - VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer = {}; - VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan12Features; - }; - - struct PhysicalDeviceVulkan12Properties - { - using NativeType = VkPhysicalDeviceVulkan12Properties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan12Properties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Properties( - VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary, - std::array const & driverName_ = {}, - std::array const & driverInfo_ = {}, - VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ = {}, - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64_ = {}, - uint32_t maxUpdateAfterBindDescriptorsInAllPools_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments_ = {}, - uint32_t maxPerStageUpdateAfterBindResources_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindSamplers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindSampledImages_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindStorageImages_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments_ = {}, - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ = {}, - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ = {}, - uint64_t maxTimelineSemaphoreValueDifference_ = {}, - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferIntegerColorSampleCounts_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , driverID( driverID_ ) - , driverName( driverName_ ) - , driverInfo( driverInfo_ ) - , conformanceVersion( conformanceVersion_ ) - , denormBehaviorIndependence( denormBehaviorIndependence_ ) - , roundingModeIndependence( roundingModeIndependence_ ) - , shaderSignedZeroInfNanPreserveFloat16( shaderSignedZeroInfNanPreserveFloat16_ ) - , shaderSignedZeroInfNanPreserveFloat32( shaderSignedZeroInfNanPreserveFloat32_ ) - , shaderSignedZeroInfNanPreserveFloat64( shaderSignedZeroInfNanPreserveFloat64_ ) - , shaderDenormPreserveFloat16( shaderDenormPreserveFloat16_ ) - , shaderDenormPreserveFloat32( shaderDenormPreserveFloat32_ ) - , shaderDenormPreserveFloat64( shaderDenormPreserveFloat64_ ) - , shaderDenormFlushToZeroFloat16( shaderDenormFlushToZeroFloat16_ ) - , shaderDenormFlushToZeroFloat32( shaderDenormFlushToZeroFloat32_ ) - , shaderDenormFlushToZeroFloat64( shaderDenormFlushToZeroFloat64_ ) - , shaderRoundingModeRTEFloat16( shaderRoundingModeRTEFloat16_ ) - , shaderRoundingModeRTEFloat32( shaderRoundingModeRTEFloat32_ ) - , shaderRoundingModeRTEFloat64( shaderRoundingModeRTEFloat64_ ) - , shaderRoundingModeRTZFloat16( shaderRoundingModeRTZFloat16_ ) - , shaderRoundingModeRTZFloat32( shaderRoundingModeRTZFloat32_ ) - , shaderRoundingModeRTZFloat64( shaderRoundingModeRTZFloat64_ ) - , maxUpdateAfterBindDescriptorsInAllPools( maxUpdateAfterBindDescriptorsInAllPools_ ) - , shaderUniformBufferArrayNonUniformIndexingNative( shaderUniformBufferArrayNonUniformIndexingNative_ ) - , shaderSampledImageArrayNonUniformIndexingNative( shaderSampledImageArrayNonUniformIndexingNative_ ) - , shaderStorageBufferArrayNonUniformIndexingNative( shaderStorageBufferArrayNonUniformIndexingNative_ ) - , shaderStorageImageArrayNonUniformIndexingNative( shaderStorageImageArrayNonUniformIndexingNative_ ) - , shaderInputAttachmentArrayNonUniformIndexingNative( shaderInputAttachmentArrayNonUniformIndexingNative_ ) - , robustBufferAccessUpdateAfterBind( robustBufferAccessUpdateAfterBind_ ) - , quadDivergentImplicitLod( quadDivergentImplicitLod_ ) - , maxPerStageDescriptorUpdateAfterBindSamplers( maxPerStageDescriptorUpdateAfterBindSamplers_ ) - , maxPerStageDescriptorUpdateAfterBindUniformBuffers( maxPerStageDescriptorUpdateAfterBindUniformBuffers_ ) - , maxPerStageDescriptorUpdateAfterBindStorageBuffers( maxPerStageDescriptorUpdateAfterBindStorageBuffers_ ) - , maxPerStageDescriptorUpdateAfterBindSampledImages( maxPerStageDescriptorUpdateAfterBindSampledImages_ ) - , maxPerStageDescriptorUpdateAfterBindStorageImages( maxPerStageDescriptorUpdateAfterBindStorageImages_ ) - , maxPerStageDescriptorUpdateAfterBindInputAttachments( maxPerStageDescriptorUpdateAfterBindInputAttachments_ ) - , maxPerStageUpdateAfterBindResources( maxPerStageUpdateAfterBindResources_ ) - , maxDescriptorSetUpdateAfterBindSamplers( maxDescriptorSetUpdateAfterBindSamplers_ ) - , maxDescriptorSetUpdateAfterBindUniformBuffers( maxDescriptorSetUpdateAfterBindUniformBuffers_ ) - , maxDescriptorSetUpdateAfterBindUniformBuffersDynamic( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ ) - , maxDescriptorSetUpdateAfterBindStorageBuffers( maxDescriptorSetUpdateAfterBindStorageBuffers_ ) - , maxDescriptorSetUpdateAfterBindStorageBuffersDynamic( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ ) - , maxDescriptorSetUpdateAfterBindSampledImages( maxDescriptorSetUpdateAfterBindSampledImages_ ) - , maxDescriptorSetUpdateAfterBindStorageImages( maxDescriptorSetUpdateAfterBindStorageImages_ ) - , maxDescriptorSetUpdateAfterBindInputAttachments( maxDescriptorSetUpdateAfterBindInputAttachments_ ) - , supportedDepthResolveModes( supportedDepthResolveModes_ ) - , supportedStencilResolveModes( supportedStencilResolveModes_ ) - , independentResolveNone( independentResolveNone_ ) - , independentResolve( independentResolve_ ) - , filterMinmaxSingleComponentFormats( filterMinmaxSingleComponentFormats_ ) - , filterMinmaxImageComponentMapping( filterMinmaxImageComponentMapping_ ) - , maxTimelineSemaphoreValueDifference( maxTimelineSemaphoreValueDifference_ ) - , framebufferIntegerColorSampleCounts( framebufferIntegerColorSampleCounts_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Properties( PhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan12Properties( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan12Properties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan12Properties & operator=( PhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan12Properties & operator=( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceVulkan12Properties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan12Properties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::ConformanceVersion const &, - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence const &, - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - uint32_t const &, - VULKAN_HPP_NAMESPACE::ResolveModeFlags const &, - VULKAN_HPP_NAMESPACE::ResolveModeFlags const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - uint64_t const &, - VULKAN_HPP_NAMESPACE::SampleCountFlags const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - driverID, - driverName, - driverInfo, - conformanceVersion, - denormBehaviorIndependence, - roundingModeIndependence, - shaderSignedZeroInfNanPreserveFloat16, - shaderSignedZeroInfNanPreserveFloat32, - shaderSignedZeroInfNanPreserveFloat64, - shaderDenormPreserveFloat16, - shaderDenormPreserveFloat32, - shaderDenormPreserveFloat64, - shaderDenormFlushToZeroFloat16, - shaderDenormFlushToZeroFloat32, - shaderDenormFlushToZeroFloat64, - shaderRoundingModeRTEFloat16, - shaderRoundingModeRTEFloat32, - shaderRoundingModeRTEFloat64, - shaderRoundingModeRTZFloat16, - shaderRoundingModeRTZFloat32, - shaderRoundingModeRTZFloat64, - maxUpdateAfterBindDescriptorsInAllPools, - shaderUniformBufferArrayNonUniformIndexingNative, - shaderSampledImageArrayNonUniformIndexingNative, - shaderStorageBufferArrayNonUniformIndexingNative, - shaderStorageImageArrayNonUniformIndexingNative, - shaderInputAttachmentArrayNonUniformIndexingNative, - robustBufferAccessUpdateAfterBind, - quadDivergentImplicitLod, - maxPerStageDescriptorUpdateAfterBindSamplers, - maxPerStageDescriptorUpdateAfterBindUniformBuffers, - maxPerStageDescriptorUpdateAfterBindStorageBuffers, - maxPerStageDescriptorUpdateAfterBindSampledImages, - maxPerStageDescriptorUpdateAfterBindStorageImages, - maxPerStageDescriptorUpdateAfterBindInputAttachments, - maxPerStageUpdateAfterBindResources, - maxDescriptorSetUpdateAfterBindSamplers, - maxDescriptorSetUpdateAfterBindUniformBuffers, - maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, - maxDescriptorSetUpdateAfterBindStorageBuffers, - maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, - maxDescriptorSetUpdateAfterBindSampledImages, - maxDescriptorSetUpdateAfterBindStorageImages, - maxDescriptorSetUpdateAfterBindInputAttachments, - supportedDepthResolveModes, - supportedStencilResolveModes, - independentResolveNone, - independentResolve, - filterMinmaxSingleComponentFormats, - filterMinmaxImageComponentMapping, - maxTimelineSemaphoreValueDifference, - framebufferIntegerColorSampleCounts ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan12Properties const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan12Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( driverID == rhs.driverID ) && ( driverName == rhs.driverName ) && - ( driverInfo == rhs.driverInfo ) && ( conformanceVersion == rhs.conformanceVersion ) && - ( denormBehaviorIndependence == rhs.denormBehaviorIndependence ) && ( roundingModeIndependence == rhs.roundingModeIndependence ) && - ( shaderSignedZeroInfNanPreserveFloat16 == rhs.shaderSignedZeroInfNanPreserveFloat16 ) && - ( shaderSignedZeroInfNanPreserveFloat32 == rhs.shaderSignedZeroInfNanPreserveFloat32 ) && - ( shaderSignedZeroInfNanPreserveFloat64 == rhs.shaderSignedZeroInfNanPreserveFloat64 ) && - ( shaderDenormPreserveFloat16 == rhs.shaderDenormPreserveFloat16 ) && ( shaderDenormPreserveFloat32 == rhs.shaderDenormPreserveFloat32 ) && - ( shaderDenormPreserveFloat64 == rhs.shaderDenormPreserveFloat64 ) && ( shaderDenormFlushToZeroFloat16 == rhs.shaderDenormFlushToZeroFloat16 ) && - ( shaderDenormFlushToZeroFloat32 == rhs.shaderDenormFlushToZeroFloat32 ) && - ( shaderDenormFlushToZeroFloat64 == rhs.shaderDenormFlushToZeroFloat64 ) && ( shaderRoundingModeRTEFloat16 == rhs.shaderRoundingModeRTEFloat16 ) && - ( shaderRoundingModeRTEFloat32 == rhs.shaderRoundingModeRTEFloat32 ) && ( shaderRoundingModeRTEFloat64 == rhs.shaderRoundingModeRTEFloat64 ) && - ( shaderRoundingModeRTZFloat16 == rhs.shaderRoundingModeRTZFloat16 ) && ( shaderRoundingModeRTZFloat32 == rhs.shaderRoundingModeRTZFloat32 ) && - ( shaderRoundingModeRTZFloat64 == rhs.shaderRoundingModeRTZFloat64 ) && - ( maxUpdateAfterBindDescriptorsInAllPools == rhs.maxUpdateAfterBindDescriptorsInAllPools ) && - ( shaderUniformBufferArrayNonUniformIndexingNative == rhs.shaderUniformBufferArrayNonUniformIndexingNative ) && - ( shaderSampledImageArrayNonUniformIndexingNative == rhs.shaderSampledImageArrayNonUniformIndexingNative ) && - ( shaderStorageBufferArrayNonUniformIndexingNative == rhs.shaderStorageBufferArrayNonUniformIndexingNative ) && - ( shaderStorageImageArrayNonUniformIndexingNative == rhs.shaderStorageImageArrayNonUniformIndexingNative ) && - ( shaderInputAttachmentArrayNonUniformIndexingNative == rhs.shaderInputAttachmentArrayNonUniformIndexingNative ) && - ( robustBufferAccessUpdateAfterBind == rhs.robustBufferAccessUpdateAfterBind ) && ( quadDivergentImplicitLod == rhs.quadDivergentImplicitLod ) && - ( maxPerStageDescriptorUpdateAfterBindSamplers == rhs.maxPerStageDescriptorUpdateAfterBindSamplers ) && - ( maxPerStageDescriptorUpdateAfterBindUniformBuffers == rhs.maxPerStageDescriptorUpdateAfterBindUniformBuffers ) && - ( maxPerStageDescriptorUpdateAfterBindStorageBuffers == rhs.maxPerStageDescriptorUpdateAfterBindStorageBuffers ) && - ( maxPerStageDescriptorUpdateAfterBindSampledImages == rhs.maxPerStageDescriptorUpdateAfterBindSampledImages ) && - ( maxPerStageDescriptorUpdateAfterBindStorageImages == rhs.maxPerStageDescriptorUpdateAfterBindStorageImages ) && - ( maxPerStageDescriptorUpdateAfterBindInputAttachments == rhs.maxPerStageDescriptorUpdateAfterBindInputAttachments ) && - ( maxPerStageUpdateAfterBindResources == rhs.maxPerStageUpdateAfterBindResources ) && - ( maxDescriptorSetUpdateAfterBindSamplers == rhs.maxDescriptorSetUpdateAfterBindSamplers ) && - ( maxDescriptorSetUpdateAfterBindUniformBuffers == rhs.maxDescriptorSetUpdateAfterBindUniformBuffers ) && - ( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ) && - ( maxDescriptorSetUpdateAfterBindStorageBuffers == rhs.maxDescriptorSetUpdateAfterBindStorageBuffers ) && - ( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ) && - ( maxDescriptorSetUpdateAfterBindSampledImages == rhs.maxDescriptorSetUpdateAfterBindSampledImages ) && - ( maxDescriptorSetUpdateAfterBindStorageImages == rhs.maxDescriptorSetUpdateAfterBindStorageImages ) && - ( maxDescriptorSetUpdateAfterBindInputAttachments == rhs.maxDescriptorSetUpdateAfterBindInputAttachments ) && - ( supportedDepthResolveModes == rhs.supportedDepthResolveModes ) && ( supportedStencilResolveModes == rhs.supportedStencilResolveModes ) && - ( independentResolveNone == rhs.independentResolveNone ) && ( independentResolve == rhs.independentResolve ) && - ( filterMinmaxSingleComponentFormats == rhs.filterMinmaxSingleComponentFormats ) && - ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping ) && - ( maxTimelineSemaphoreValueDifference == rhs.maxTimelineSemaphoreValueDifference ) && - ( framebufferIntegerColorSampleCounts == rhs.framebufferIntegerColorSampleCounts ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan12Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan12Properties; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverName = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverInfo = {}; - VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion = {}; - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; - VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32 = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64 = {}; - uint32_t maxUpdateAfterBindDescriptorsInAllPools = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments = {}; - uint32_t maxPerStageUpdateAfterBindResources = {}; - uint32_t maxDescriptorSetUpdateAfterBindSamplers = {}; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers = {}; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = {}; - uint32_t maxDescriptorSetUpdateAfterBindSampledImages = {}; - uint32_t maxDescriptorSetUpdateAfterBindStorageImages = {}; - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments = {}; - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes = {}; - VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes = {}; - VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone = {}; - VULKAN_HPP_NAMESPACE::Bool32 independentResolve = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats = {}; - VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping = {}; - uint64_t maxTimelineSemaphoreValueDifference = {}; - VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferIntegerColorSampleCounts = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan12Properties; - }; - - struct PhysicalDeviceVulkan13Features - { - using NativeType = VkPhysicalDeviceVulkan13Features; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan13Features; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Features( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 privateData_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , robustImageAccess( robustImageAccess_ ) - , inlineUniformBlock( inlineUniformBlock_ ) - , descriptorBindingInlineUniformBlockUpdateAfterBind( descriptorBindingInlineUniformBlockUpdateAfterBind_ ) - , pipelineCreationCacheControl( pipelineCreationCacheControl_ ) - , privateData( privateData_ ) - , shaderDemoteToHelperInvocation( shaderDemoteToHelperInvocation_ ) - , shaderTerminateInvocation( shaderTerminateInvocation_ ) - , subgroupSizeControl( subgroupSizeControl_ ) - , computeFullSubgroups( computeFullSubgroups_ ) - , synchronization2( synchronization2_ ) - , textureCompressionASTC_HDR( textureCompressionASTC_HDR_ ) - , shaderZeroInitializeWorkgroupMemory( shaderZeroInitializeWorkgroupMemory_ ) - , dynamicRendering( dynamicRendering_ ) - , shaderIntegerDotProduct( shaderIntegerDotProduct_ ) - , maintenance4( maintenance4_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Features( PhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan13Features( VkPhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan13Features( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan13Features & operator=( PhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan13Features & operator=( VkPhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setRobustImageAccess( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ ) VULKAN_HPP_NOEXCEPT - { - robustImageAccess = robustImageAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setInlineUniformBlock( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT - { - inlineUniformBlock = inlineUniformBlock_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setDescriptorBindingInlineUniformBlockUpdateAfterBind( - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT - { - descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setPipelineCreationCacheControl( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ ) VULKAN_HPP_NOEXCEPT - { - pipelineCreationCacheControl = pipelineCreationCacheControl_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setPrivateData( VULKAN_HPP_NAMESPACE::Bool32 privateData_ ) VULKAN_HPP_NOEXCEPT - { - privateData = privateData_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setShaderDemoteToHelperInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT - { - shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setShaderTerminateInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ ) VULKAN_HPP_NOEXCEPT - { - shaderTerminateInvocation = shaderTerminateInvocation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setSubgroupSizeControl( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT - { - subgroupSizeControl = subgroupSizeControl_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setComputeFullSubgroups( VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT - { - computeFullSubgroups = computeFullSubgroups_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setSynchronization2( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ ) VULKAN_HPP_NOEXCEPT - { - synchronization2 = synchronization2_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setTextureCompressionASTC_HDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT - { - textureCompressionASTC_HDR = textureCompressionASTC_HDR_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setShaderZeroInitializeWorkgroupMemory( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ ) VULKAN_HPP_NOEXCEPT - { - shaderZeroInitializeWorkgroupMemory = shaderZeroInitializeWorkgroupMemory_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setDynamicRendering( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ ) VULKAN_HPP_NOEXCEPT - { - dynamicRendering = dynamicRendering_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & - setShaderIntegerDotProduct( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ ) VULKAN_HPP_NOEXCEPT - { - shaderIntegerDotProduct = shaderIntegerDotProduct_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setMaintenance4( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ ) VULKAN_HPP_NOEXCEPT - { - maintenance4 = maintenance4_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVulkan13Features const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan13Features &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - robustImageAccess, - inlineUniformBlock, - descriptorBindingInlineUniformBlockUpdateAfterBind, - pipelineCreationCacheControl, - privateData, - shaderDemoteToHelperInvocation, - shaderTerminateInvocation, - subgroupSizeControl, - computeFullSubgroups, - synchronization2, - textureCompressionASTC_HDR, - shaderZeroInitializeWorkgroupMemory, - dynamicRendering, - shaderIntegerDotProduct, - maintenance4 ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan13Features const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan13Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustImageAccess == rhs.robustImageAccess ) && - ( inlineUniformBlock == rhs.inlineUniformBlock ) && - ( descriptorBindingInlineUniformBlockUpdateAfterBind == rhs.descriptorBindingInlineUniformBlockUpdateAfterBind ) && - ( pipelineCreationCacheControl == rhs.pipelineCreationCacheControl ) && ( privateData == rhs.privateData ) && - ( shaderDemoteToHelperInvocation == rhs.shaderDemoteToHelperInvocation ) && ( shaderTerminateInvocation == rhs.shaderTerminateInvocation ) && - ( subgroupSizeControl == rhs.subgroupSizeControl ) && ( computeFullSubgroups == rhs.computeFullSubgroups ) && - ( synchronization2 == rhs.synchronization2 ) && ( textureCompressionASTC_HDR == rhs.textureCompressionASTC_HDR ) && - ( shaderZeroInitializeWorkgroupMemory == rhs.shaderZeroInitializeWorkgroupMemory ) && ( dynamicRendering == rhs.dynamicRendering ) && - ( shaderIntegerDotProduct == rhs.shaderIntegerDotProduct ) && ( maintenance4 == rhs.maintenance4 ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan13Features const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan13Features; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock = {}; - VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind = {}; - VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl = {}; - VULKAN_HPP_NAMESPACE::Bool32 privateData = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation = {}; - VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl = {}; - VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups = {}; - VULKAN_HPP_NAMESPACE::Bool32 synchronization2 = {}; - VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory = {}; - VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct = {}; - VULKAN_HPP_NAMESPACE::Bool32 maintenance4 = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan13Features; - }; - - struct PhysicalDeviceVulkan13Properties - { - using NativeType = VkPhysicalDeviceVulkan13Properties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan13Properties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceVulkan13Properties( uint32_t minSubgroupSize_ = {}, - uint32_t maxSubgroupSize_ = {}, - uint32_t maxComputeWorkgroupSubgroups_ = {}, - VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages_ = {}, - uint32_t maxInlineUniformBlockSize_ = {}, - uint32_t maxPerStageDescriptorInlineUniformBlocks_ = {}, - uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ = {}, - uint32_t maxDescriptorSetInlineUniformBlocks_ = {}, - uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ = {}, - uint32_t maxInlineUniformTotalSize_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minSubgroupSize( minSubgroupSize_ ) - , maxSubgroupSize( maxSubgroupSize_ ) - , maxComputeWorkgroupSubgroups( maxComputeWorkgroupSubgroups_ ) - , requiredSubgroupSizeStages( requiredSubgroupSizeStages_ ) - , maxInlineUniformBlockSize( maxInlineUniformBlockSize_ ) - , maxPerStageDescriptorInlineUniformBlocks( maxPerStageDescriptorInlineUniformBlocks_ ) - , maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ ) - , maxDescriptorSetInlineUniformBlocks( maxDescriptorSetInlineUniformBlocks_ ) - , maxDescriptorSetUpdateAfterBindInlineUniformBlocks( maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ ) - , maxInlineUniformTotalSize( maxInlineUniformTotalSize_ ) - , integerDotProduct8BitUnsignedAccelerated( integerDotProduct8BitUnsignedAccelerated_ ) - , integerDotProduct8BitSignedAccelerated( integerDotProduct8BitSignedAccelerated_ ) - , integerDotProduct8BitMixedSignednessAccelerated( integerDotProduct8BitMixedSignednessAccelerated_ ) - , integerDotProduct4x8BitPackedUnsignedAccelerated( integerDotProduct4x8BitPackedUnsignedAccelerated_ ) - , integerDotProduct4x8BitPackedSignedAccelerated( integerDotProduct4x8BitPackedSignedAccelerated_ ) - , integerDotProduct4x8BitPackedMixedSignednessAccelerated( integerDotProduct4x8BitPackedMixedSignednessAccelerated_ ) - , integerDotProduct16BitUnsignedAccelerated( integerDotProduct16BitUnsignedAccelerated_ ) - , integerDotProduct16BitSignedAccelerated( integerDotProduct16BitSignedAccelerated_ ) - , integerDotProduct16BitMixedSignednessAccelerated( integerDotProduct16BitMixedSignednessAccelerated_ ) - , integerDotProduct32BitUnsignedAccelerated( integerDotProduct32BitUnsignedAccelerated_ ) - , integerDotProduct32BitSignedAccelerated( integerDotProduct32BitSignedAccelerated_ ) - , integerDotProduct32BitMixedSignednessAccelerated( integerDotProduct32BitMixedSignednessAccelerated_ ) - , integerDotProduct64BitUnsignedAccelerated( integerDotProduct64BitUnsignedAccelerated_ ) - , integerDotProduct64BitSignedAccelerated( integerDotProduct64BitSignedAccelerated_ ) - , integerDotProduct64BitMixedSignednessAccelerated( integerDotProduct64BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitUnsignedAccelerated( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitSignedAccelerated( integerDotProductAccumulatingSaturating8BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated( - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitUnsignedAccelerated( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitSignedAccelerated( integerDotProductAccumulatingSaturating16BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitUnsignedAccelerated( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitSignedAccelerated( integerDotProductAccumulatingSaturating32BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitUnsignedAccelerated( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitSignedAccelerated( integerDotProductAccumulatingSaturating64BitSignedAccelerated_ ) - , integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ ) - , storageTexelBufferOffsetAlignmentBytes( storageTexelBufferOffsetAlignmentBytes_ ) - , storageTexelBufferOffsetSingleTexelAlignment( storageTexelBufferOffsetSingleTexelAlignment_ ) - , uniformTexelBufferOffsetAlignmentBytes( uniformTexelBufferOffsetAlignmentBytes_ ) - , uniformTexelBufferOffsetSingleTexelAlignment( uniformTexelBufferOffsetSingleTexelAlignment_ ) - , maxBufferSize( maxBufferSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Properties( PhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan13Properties( VkPhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkan13Properties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkan13Properties & operator=( PhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkan13Properties & operator=( VkPhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPhysicalDeviceVulkan13Properties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkan13Properties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - minSubgroupSize, - maxSubgroupSize, - maxComputeWorkgroupSubgroups, - requiredSubgroupSizeStages, - maxInlineUniformBlockSize, - maxPerStageDescriptorInlineUniformBlocks, - maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks, - maxDescriptorSetInlineUniformBlocks, - maxDescriptorSetUpdateAfterBindInlineUniformBlocks, - maxInlineUniformTotalSize, - integerDotProduct8BitUnsignedAccelerated, - integerDotProduct8BitSignedAccelerated, - integerDotProduct8BitMixedSignednessAccelerated, - integerDotProduct4x8BitPackedUnsignedAccelerated, - integerDotProduct4x8BitPackedSignedAccelerated, - integerDotProduct4x8BitPackedMixedSignednessAccelerated, - integerDotProduct16BitUnsignedAccelerated, - integerDotProduct16BitSignedAccelerated, - integerDotProduct16BitMixedSignednessAccelerated, - integerDotProduct32BitUnsignedAccelerated, - integerDotProduct32BitSignedAccelerated, - integerDotProduct32BitMixedSignednessAccelerated, - integerDotProduct64BitUnsignedAccelerated, - integerDotProduct64BitSignedAccelerated, - integerDotProduct64BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating8BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating8BitSignedAccelerated, - integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated, - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating16BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating16BitSignedAccelerated, - integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating32BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating32BitSignedAccelerated, - integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated, - integerDotProductAccumulatingSaturating64BitUnsignedAccelerated, - integerDotProductAccumulatingSaturating64BitSignedAccelerated, - integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated, - storageTexelBufferOffsetAlignmentBytes, - storageTexelBufferOffsetSingleTexelAlignment, - uniformTexelBufferOffsetAlignmentBytes, - uniformTexelBufferOffsetSingleTexelAlignment, - maxBufferSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkan13Properties const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkan13Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minSubgroupSize == rhs.minSubgroupSize ) && ( maxSubgroupSize == rhs.maxSubgroupSize ) && - ( maxComputeWorkgroupSubgroups == rhs.maxComputeWorkgroupSubgroups ) && ( requiredSubgroupSizeStages == rhs.requiredSubgroupSizeStages ) && - ( maxInlineUniformBlockSize == rhs.maxInlineUniformBlockSize ) && - ( maxPerStageDescriptorInlineUniformBlocks == rhs.maxPerStageDescriptorInlineUniformBlocks ) && - ( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks == rhs.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ) && - ( maxDescriptorSetInlineUniformBlocks == rhs.maxDescriptorSetInlineUniformBlocks ) && - ( maxDescriptorSetUpdateAfterBindInlineUniformBlocks == rhs.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ) && - ( maxInlineUniformTotalSize == rhs.maxInlineUniformTotalSize ) && - ( integerDotProduct8BitUnsignedAccelerated == rhs.integerDotProduct8BitUnsignedAccelerated ) && - ( integerDotProduct8BitSignedAccelerated == rhs.integerDotProduct8BitSignedAccelerated ) && - ( integerDotProduct8BitMixedSignednessAccelerated == rhs.integerDotProduct8BitMixedSignednessAccelerated ) && - ( integerDotProduct4x8BitPackedUnsignedAccelerated == rhs.integerDotProduct4x8BitPackedUnsignedAccelerated ) && - ( integerDotProduct4x8BitPackedSignedAccelerated == rhs.integerDotProduct4x8BitPackedSignedAccelerated ) && - ( integerDotProduct4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProduct4x8BitPackedMixedSignednessAccelerated ) && - ( integerDotProduct16BitUnsignedAccelerated == rhs.integerDotProduct16BitUnsignedAccelerated ) && - ( integerDotProduct16BitSignedAccelerated == rhs.integerDotProduct16BitSignedAccelerated ) && - ( integerDotProduct16BitMixedSignednessAccelerated == rhs.integerDotProduct16BitMixedSignednessAccelerated ) && - ( integerDotProduct32BitUnsignedAccelerated == rhs.integerDotProduct32BitUnsignedAccelerated ) && - ( integerDotProduct32BitSignedAccelerated == rhs.integerDotProduct32BitSignedAccelerated ) && - ( integerDotProduct32BitMixedSignednessAccelerated == rhs.integerDotProduct32BitMixedSignednessAccelerated ) && - ( integerDotProduct64BitUnsignedAccelerated == rhs.integerDotProduct64BitUnsignedAccelerated ) && - ( integerDotProduct64BitSignedAccelerated == rhs.integerDotProduct64BitSignedAccelerated ) && - ( integerDotProduct64BitMixedSignednessAccelerated == rhs.integerDotProduct64BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitSignedAccelerated ) && - ( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated == - rhs.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ) && - ( storageTexelBufferOffsetAlignmentBytes == rhs.storageTexelBufferOffsetAlignmentBytes ) && - ( storageTexelBufferOffsetSingleTexelAlignment == rhs.storageTexelBufferOffsetSingleTexelAlignment ) && - ( uniformTexelBufferOffsetAlignmentBytes == rhs.uniformTexelBufferOffsetAlignmentBytes ) && - ( uniformTexelBufferOffsetSingleTexelAlignment == rhs.uniformTexelBufferOffsetSingleTexelAlignment ) && ( maxBufferSize == rhs.maxBufferSize ); -# endif - } - - bool operator!=( PhysicalDeviceVulkan13Properties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan13Properties; - void * pNext = {}; - uint32_t minSubgroupSize = {}; - uint32_t maxSubgroupSize = {}; - uint32_t maxComputeWorkgroupSubgroups = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages = {}; - uint32_t maxInlineUniformBlockSize = {}; - uint32_t maxPerStageDescriptorInlineUniformBlocks = {}; - uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = {}; - uint32_t maxDescriptorSetInlineUniformBlocks = {}; - uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks = {}; - uint32_t maxInlineUniformTotalSize = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated = {}; - VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = {}; - VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes = {}; - VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes = {}; - VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkan13Properties; - }; - - struct PhysicalDeviceVulkanMemoryModelFeatures - { - using NativeType = VkPhysicalDeviceVulkanMemoryModelFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkanMemoryModelFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeatures( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vulkanMemoryModel( vulkanMemoryModel_ ) - , vulkanMemoryModelDeviceScope( vulkanMemoryModelDeviceScope_ ) - , vulkanMemoryModelAvailabilityVisibilityChains( vulkanMemoryModelAvailabilityVisibilityChains_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeatures( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkanMemoryModelFeatures( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceVulkanMemoryModelFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceVulkanMemoryModelFeatures & operator=( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceVulkanMemoryModelFeatures & operator=( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & - setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModel = vulkanMemoryModel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & - setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & - setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT - { - vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceVulkanMemoryModelFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceVulkanMemoryModelFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vulkanMemoryModel, vulkanMemoryModelDeviceScope, vulkanMemoryModelAvailabilityVisibilityChains ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceVulkanMemoryModelFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vulkanMemoryModel == rhs.vulkanMemoryModel ) && - ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope ) && - ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains ); -# endif - } - - bool operator!=( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkanMemoryModelFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope = {}; - VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceVulkanMemoryModelFeatures; - }; - using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; - - struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR - { - using NativeType = VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , workgroupMemoryExplicitLayout( workgroupMemoryExplicitLayout_ ) - , workgroupMemoryExplicitLayoutScalarBlockLayout( workgroupMemoryExplicitLayoutScalarBlockLayout_ ) - , workgroupMemoryExplicitLayout8BitAccess( workgroupMemoryExplicitLayout8BitAccess_ ) - , workgroupMemoryExplicitLayout16BitAccess( workgroupMemoryExplicitLayout16BitAccess_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - operator=( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - operator=( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - setWorkgroupMemoryExplicitLayout( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout_ ) VULKAN_HPP_NOEXCEPT - { - workgroupMemoryExplicitLayout = workgroupMemoryExplicitLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - setWorkgroupMemoryExplicitLayoutScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT - { - workgroupMemoryExplicitLayoutScalarBlockLayout = workgroupMemoryExplicitLayoutScalarBlockLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - setWorkgroupMemoryExplicitLayout8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - workgroupMemoryExplicitLayout8BitAccess = workgroupMemoryExplicitLayout8BitAccess_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & - setWorkgroupMemoryExplicitLayout16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess_ ) VULKAN_HPP_NOEXCEPT - { - workgroupMemoryExplicitLayout16BitAccess = workgroupMemoryExplicitLayout16BitAccess_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - workgroupMemoryExplicitLayout, - workgroupMemoryExplicitLayoutScalarBlockLayout, - workgroupMemoryExplicitLayout8BitAccess, - workgroupMemoryExplicitLayout16BitAccess ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & ) const = default; -#else - bool operator==( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( workgroupMemoryExplicitLayout == rhs.workgroupMemoryExplicitLayout ) && - ( workgroupMemoryExplicitLayoutScalarBlockLayout == rhs.workgroupMemoryExplicitLayoutScalarBlockLayout ) && - ( workgroupMemoryExplicitLayout8BitAccess == rhs.workgroupMemoryExplicitLayout8BitAccess ) && - ( workgroupMemoryExplicitLayout16BitAccess == rhs.workgroupMemoryExplicitLayout16BitAccess ); -# endif - } - - bool operator!=( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout = {}; - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout = {}; - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess = {}; - VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; - }; - - struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT - { - using NativeType = VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , ycbcr2plane444Formats( ycbcr2plane444Formats_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & operator=( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & operator=( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & - setYcbcr2plane444Formats( VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats_ ) VULKAN_HPP_NOEXCEPT - { - ycbcr2plane444Formats = ycbcr2plane444Formats_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, ycbcr2plane444Formats ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ycbcr2plane444Formats == rhs.ycbcr2plane444Formats ); -# endif - } - - bool operator!=( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; - }; - - struct PhysicalDeviceYcbcrImageArraysFeaturesEXT - { - using NativeType = VkPhysicalDeviceYcbcrImageArraysFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , ycbcrImageArrays( ycbcrImageArrays_ ) - { - } - - VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceYcbcrImageArraysFeaturesEXT( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceYcbcrImageArraysFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceYcbcrImageArraysFeaturesEXT & operator=( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceYcbcrImageArraysFeaturesEXT & operator=( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrImageArraysFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrImageArraysFeaturesEXT & - setYcbcrImageArrays( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ ) VULKAN_HPP_NOEXCEPT - { - ycbcrImageArrays = ycbcrImageArrays_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceYcbcrImageArraysFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, ycbcrImageArrays ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & ) const = default; -#else - bool operator==( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ycbcrImageArrays == rhs.ycbcrImageArrays ); -# endif - } - - bool operator!=( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceYcbcrImageArraysFeaturesEXT; - }; - - struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures - { - using NativeType = VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shaderZeroInitializeWorkgroupMemory( shaderZeroInitializeWorkgroupMemory_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - : PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & - operator=( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & operator=( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & - setShaderZeroInitializeWorkgroupMemory( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ ) VULKAN_HPP_NOEXCEPT - { - shaderZeroInitializeWorkgroupMemory = shaderZeroInitializeWorkgroupMemory_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shaderZeroInitializeWorkgroupMemory ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & ) const = default; -#else - bool operator==( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderZeroInitializeWorkgroupMemory == rhs.shaderZeroInitializeWorkgroupMemory ); -# endif - } - - bool operator!=( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory = {}; - }; - - template <> - struct CppType - { - using Type = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - }; - using PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - - struct PipelineCacheCreateInfo - { - using NativeType = VkPipelineCacheCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCacheCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ = {}, - size_t initialDataSize_ = {}, - const void * pInitialData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , initialDataSize( initialDataSize_ ) - , pInitialData( pInitialData_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( PipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCacheCreateInfo( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCacheCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCacheCreateInfo & operator=( PipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCacheCreateInfo & operator=( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setInitialDataSize( size_t initialDataSize_ ) VULKAN_HPP_NOEXCEPT - { - initialDataSize = initialDataSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setPInitialData( const void * pInitialData_ ) VULKAN_HPP_NOEXCEPT - { - pInitialData = pInitialData_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - PipelineCacheCreateInfo & setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) VULKAN_HPP_NOEXCEPT - { - initialDataSize = initialData_.size() * sizeof( T ); - pInitialData = initialData_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCacheCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCacheCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, initialDataSize, pInitialData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCacheCreateInfo const & ) const = default; -#else - bool operator==( PipelineCacheCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( initialDataSize == rhs.initialDataSize ) && - ( pInitialData == rhs.pInitialData ); -# endif - } - - bool operator!=( PipelineCacheCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCacheCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags = {}; - size_t initialDataSize = {}; - const void * pInitialData = {}; - }; - - template <> - struct CppType - { - using Type = PipelineCacheCreateInfo; - }; - - struct PipelineCacheHeaderVersionOne - { - using NativeType = VkPipelineCacheHeaderVersionOne; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - PipelineCacheHeaderVersionOne( uint32_t headerSize_ = {}, - VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ = VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne, - uint32_t vendorID_ = {}, - uint32_t deviceID_ = {}, - std::array const & pipelineCacheUUID_ = {} ) VULKAN_HPP_NOEXCEPT - : headerSize( headerSize_ ) - , headerVersion( headerVersion_ ) - , vendorID( vendorID_ ) - , deviceID( deviceID_ ) - , pipelineCacheUUID( pipelineCacheUUID_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCacheHeaderVersionOne( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCacheHeaderVersionOne( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCacheHeaderVersionOne & operator=( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCacheHeaderVersionOne & operator=( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setHeaderSize( uint32_t headerSize_ ) VULKAN_HPP_NOEXCEPT - { - headerSize = headerSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & - setHeaderVersion( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ ) VULKAN_HPP_NOEXCEPT - { - headerVersion = headerVersion_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setVendorID( uint32_t vendorID_ ) VULKAN_HPP_NOEXCEPT - { - vendorID = vendorID_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setDeviceID( uint32_t deviceID_ ) VULKAN_HPP_NOEXCEPT - { - deviceID = deviceID_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setPipelineCacheUUID( std::array pipelineCacheUUID_ ) VULKAN_HPP_NOEXCEPT - { - pipelineCacheUUID = pipelineCacheUUID_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCacheHeaderVersionOne const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCacheHeaderVersionOne &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( headerSize, headerVersion, vendorID, deviceID, pipelineCacheUUID ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCacheHeaderVersionOne const & ) const = default; -#else - bool operator==( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( headerSize == rhs.headerSize ) && ( headerVersion == rhs.headerVersion ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && - ( pipelineCacheUUID == rhs.pipelineCacheUUID ); -# endif - } - - bool operator!=( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t headerSize = {}; - VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion = VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne; - uint32_t vendorID = {}; - uint32_t deviceID = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineCacheUUID = {}; - }; - - struct PipelineColorBlendAdvancedStateCreateInfoEXT - { - using NativeType = VkPipelineColorBlendAdvancedStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PipelineColorBlendAdvancedStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ = {}, - VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcPremultiplied( srcPremultiplied_ ) - , dstPremultiplied( dstPremultiplied_ ) - , blendOverlap( blendOverlap_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendAdvancedStateCreateInfoEXT( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineColorBlendAdvancedStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineColorBlendAdvancedStateCreateInfoEXT & operator=( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorBlendAdvancedStateCreateInfoEXT & operator=( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & - setSrcPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ ) VULKAN_HPP_NOEXCEPT - { - srcPremultiplied = srcPremultiplied_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & - setDstPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ ) VULKAN_HPP_NOEXCEPT - { - dstPremultiplied = dstPremultiplied_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & - setBlendOverlap( VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ ) VULKAN_HPP_NOEXCEPT - { - blendOverlap = blendOverlap_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineColorBlendAdvancedStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineColorBlendAdvancedStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcPremultiplied, dstPremultiplied, blendOverlap ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineColorBlendAdvancedStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcPremultiplied == rhs.srcPremultiplied ) && ( dstPremultiplied == rhs.dstPremultiplied ) && - ( blendOverlap == rhs.blendOverlap ); -# endif - } - - bool operator!=( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied = {}; - VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied = {}; - VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated; - }; - - template <> - struct CppType - { - using Type = PipelineColorBlendAdvancedStateCreateInfoEXT; - }; - - struct PipelineColorWriteCreateInfoEXT - { - using NativeType = VkPipelineColorWriteCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorWriteCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineColorWriteCreateInfoEXT( uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachmentCount( attachmentCount_ ) - , pColorWriteEnables( pColorWriteEnables_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineColorWriteCreateInfoEXT( PipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorWriteCreateInfoEXT( VkPipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineColorWriteCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineColorWriteCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorWriteEnables_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), attachmentCount( static_cast( colorWriteEnables_.size() ) ), pColorWriteEnables( colorWriteEnables_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineColorWriteCreateInfoEXT & operator=( PipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineColorWriteCreateInfoEXT & operator=( VkPipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & - setPColorWriteEnables( const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables_ ) VULKAN_HPP_NOEXCEPT - { - pColorWriteEnables = pColorWriteEnables_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineColorWriteCreateInfoEXT & - setColorWriteEnables( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorWriteEnables_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( colorWriteEnables_.size() ); - pColorWriteEnables = colorWriteEnables_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineColorWriteCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineColorWriteCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, attachmentCount, pColorWriteEnables ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineColorWriteCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineColorWriteCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentCount == rhs.attachmentCount ) && ( pColorWriteEnables == rhs.pColorWriteEnables ); -# endif - } - - bool operator!=( PipelineColorWriteCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorWriteCreateInfoEXT; - const void * pNext = {}; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables = {}; - }; - - template <> - struct CppType - { - using Type = PipelineColorWriteCreateInfoEXT; - }; - - struct PipelineCompilerControlCreateInfoAMD - { - using NativeType = VkPipelineCompilerControlCreateInfoAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCompilerControlCreateInfoAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , compilerControlFlags( compilerControlFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( PipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCompilerControlCreateInfoAMD( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCompilerControlCreateInfoAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCompilerControlCreateInfoAMD & operator=( PipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCompilerControlCreateInfoAMD & operator=( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCompilerControlCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCompilerControlCreateInfoAMD & - setCompilerControlFlags( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ ) VULKAN_HPP_NOEXCEPT - { - compilerControlFlags = compilerControlFlags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCompilerControlCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCompilerControlCreateInfoAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, compilerControlFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCompilerControlCreateInfoAMD const & ) const = default; -#else - bool operator==( PipelineCompilerControlCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compilerControlFlags == rhs.compilerControlFlags ); -# endif - } - - bool operator!=( PipelineCompilerControlCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCompilerControlCreateInfoAMD; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags = {}; - }; - - template <> - struct CppType - { - using Type = PipelineCompilerControlCreateInfoAMD; - }; - - struct PipelineCoverageModulationStateCreateInfoNV - { - using NativeType = VkPipelineCoverageModulationStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_ = {}, - VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_ = VULKAN_HPP_NAMESPACE::CoverageModulationModeNV::eNone, - VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_ = {}, - uint32_t coverageModulationTableCount_ = {}, - const float * pCoverageModulationTable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , coverageModulationMode( coverageModulationMode_ ) - , coverageModulationTableEnable( coverageModulationTableEnable_ ) - , coverageModulationTableCount( coverageModulationTableCount_ ) - , pCoverageModulationTable( pCoverageModulationTable_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( PipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageModulationStateCreateInfoNV( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCoverageModulationStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineCoverageModulationStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_, - VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_, - VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & coverageModulationTable_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , coverageModulationMode( coverageModulationMode_ ) - , coverageModulationTableEnable( coverageModulationTableEnable_ ) - , coverageModulationTableCount( static_cast( coverageModulationTable_.size() ) ) - , pCoverageModulationTable( coverageModulationTable_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCoverageModulationStateCreateInfoNV & operator=( PipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageModulationStateCreateInfoNV & operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & - setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & - setCoverageModulationMode( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_ ) VULKAN_HPP_NOEXCEPT - { - coverageModulationMode = coverageModulationMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & - setCoverageModulationTableEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_ ) VULKAN_HPP_NOEXCEPT - { - coverageModulationTableEnable = coverageModulationTableEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & - setCoverageModulationTableCount( uint32_t coverageModulationTableCount_ ) VULKAN_HPP_NOEXCEPT - { - coverageModulationTableCount = coverageModulationTableCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & - setPCoverageModulationTable( const float * pCoverageModulationTable_ ) VULKAN_HPP_NOEXCEPT - { - pCoverageModulationTable = pCoverageModulationTable_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineCoverageModulationStateCreateInfoNV & - setCoverageModulationTable( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & coverageModulationTable_ ) VULKAN_HPP_NOEXCEPT - { - coverageModulationTableCount = static_cast( coverageModulationTable_.size() ); - pCoverageModulationTable = coverageModulationTable_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCoverageModulationStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCoverageModulationStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, coverageModulationMode, coverageModulationTableEnable, coverageModulationTableCount, pCoverageModulationTable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCoverageModulationStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineCoverageModulationStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageModulationMode == rhs.coverageModulationMode ) && - ( coverageModulationTableEnable == rhs.coverageModulationTableEnable ) && ( coverageModulationTableCount == rhs.coverageModulationTableCount ) && - ( pCoverageModulationTable == rhs.pCoverageModulationTable ); -# endif - } - - bool operator!=( PipelineCoverageModulationStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags = {}; - VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode = VULKAN_HPP_NAMESPACE::CoverageModulationModeNV::eNone; - VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable = {}; - uint32_t coverageModulationTableCount = {}; - const float * pCoverageModulationTable = {}; - }; - - template <> - struct CppType - { - using Type = PipelineCoverageModulationStateCreateInfoNV; - }; - - struct PipelineCoverageReductionStateCreateInfoNV - { - using NativeType = VkPipelineCoverageReductionStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageReductionStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ = {}, - VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , coverageReductionMode( coverageReductionMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( PipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageReductionStateCreateInfoNV( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCoverageReductionStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCoverageReductionStateCreateInfoNV & operator=( PipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageReductionStateCreateInfoNV & operator=( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & - setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & - setCoverageReductionMode( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT - { - coverageReductionMode = coverageReductionMode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCoverageReductionStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCoverageReductionStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, coverageReductionMode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCoverageReductionStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineCoverageReductionStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageReductionMode == rhs.coverageReductionMode ); -# endif - } - - bool operator!=( PipelineCoverageReductionStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageReductionStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags = {}; - VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge; - }; - - template <> - struct CppType - { - using Type = PipelineCoverageReductionStateCreateInfoNV; - }; - - struct PipelineCoverageToColorStateCreateInfoNV - { - using NativeType = VkPipelineCoverageToColorStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ = {}, - uint32_t coverageToColorLocation_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , coverageToColorEnable( coverageToColorEnable_ ) - , coverageToColorLocation( coverageToColorLocation_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( PipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageToColorStateCreateInfoNV( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCoverageToColorStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCoverageToColorStateCreateInfoNV & operator=( PipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCoverageToColorStateCreateInfoNV & operator=( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & - setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & - setCoverageToColorEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ ) VULKAN_HPP_NOEXCEPT - { - coverageToColorEnable = coverageToColorEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setCoverageToColorLocation( uint32_t coverageToColorLocation_ ) VULKAN_HPP_NOEXCEPT - { - coverageToColorLocation = coverageToColorLocation_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCoverageToColorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCoverageToColorStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, coverageToColorEnable, coverageToColorLocation ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCoverageToColorStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineCoverageToColorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageToColorEnable == rhs.coverageToColorEnable ) && - ( coverageToColorLocation == rhs.coverageToColorLocation ); -# endif - } - - bool operator!=( PipelineCoverageToColorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags = {}; - VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable = {}; - uint32_t coverageToColorLocation = {}; - }; - - template <> - struct CppType - { - using Type = PipelineCoverageToColorStateCreateInfoNV; - }; - - struct PipelineCreationFeedback - { - using NativeType = VkPipelineCreationFeedback; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCreationFeedback( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlags flags_ = {}, - uint64_t duration_ = {} ) VULKAN_HPP_NOEXCEPT - : flags( flags_ ) - , duration( duration_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCreationFeedback( PipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCreationFeedback( VkPipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCreationFeedback( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCreationFeedback & operator=( PipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCreationFeedback & operator=( VkPipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPipelineCreationFeedback const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCreationFeedback &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( flags, duration ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCreationFeedback const & ) const = default; -#else - bool operator==( PipelineCreationFeedback const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( flags == rhs.flags ) && ( duration == rhs.duration ); -# endif - } - - bool operator!=( PipelineCreationFeedback const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlags flags = {}; - uint64_t duration = {}; - }; - using PipelineCreationFeedbackEXT = PipelineCreationFeedback; - - struct PipelineCreationFeedbackCreateInfo - { - using NativeType = VkPipelineCreationFeedbackCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCreationFeedbackCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_ = {}, - uint32_t pipelineStageCreationFeedbackCount_ = {}, - VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pPipelineCreationFeedback( pPipelineCreationFeedback_ ) - , pipelineStageCreationFeedbackCount( pipelineStageCreationFeedbackCount_ ) - , pPipelineStageCreationFeedbacks( pPipelineStageCreationFeedbacks_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfo( PipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCreationFeedbackCreateInfo( VkPipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineCreationFeedbackCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineCreationFeedbackCreateInfo( - VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineStageCreationFeedbacks_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pPipelineCreationFeedback( pPipelineCreationFeedback_ ) - , pipelineStageCreationFeedbackCount( static_cast( pipelineStageCreationFeedbacks_.size() ) ) - , pPipelineStageCreationFeedbacks( pipelineStageCreationFeedbacks_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineCreationFeedbackCreateInfo & operator=( PipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineCreationFeedbackCreateInfo & operator=( VkPipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & - setPPipelineCreationFeedback( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_ ) VULKAN_HPP_NOEXCEPT - { - pPipelineCreationFeedback = pPipelineCreationFeedback_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & - setPipelineStageCreationFeedbackCount( uint32_t pipelineStageCreationFeedbackCount_ ) VULKAN_HPP_NOEXCEPT - { - pipelineStageCreationFeedbackCount = pipelineStageCreationFeedbackCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & - setPPipelineStageCreationFeedbacks( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT - { - pPipelineStageCreationFeedbacks = pPipelineStageCreationFeedbacks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineCreationFeedbackCreateInfo & setPipelineStageCreationFeedbacks( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineStageCreationFeedbacks_ ) - VULKAN_HPP_NOEXCEPT - { - pipelineStageCreationFeedbackCount = static_cast( pipelineStageCreationFeedbacks_.size() ); - pPipelineStageCreationFeedbacks = pipelineStageCreationFeedbacks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineCreationFeedbackCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineCreationFeedbackCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pPipelineCreationFeedback, pipelineStageCreationFeedbackCount, pPipelineStageCreationFeedbacks ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineCreationFeedbackCreateInfo const & ) const = default; -#else - bool operator==( PipelineCreationFeedbackCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pPipelineCreationFeedback == rhs.pPipelineCreationFeedback ) && - ( pipelineStageCreationFeedbackCount == rhs.pipelineStageCreationFeedbackCount ) && - ( pPipelineStageCreationFeedbacks == rhs.pPipelineStageCreationFeedbacks ); -# endif - } - - bool operator!=( PipelineCreationFeedbackCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCreationFeedbackCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback = {}; - uint32_t pipelineStageCreationFeedbackCount = {}; - VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks = {}; - }; - - template <> - struct CppType - { - using Type = PipelineCreationFeedbackCreateInfo; - }; - using PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; - - struct PipelineDiscardRectangleStateCreateInfoEXT - { - using NativeType = VkPipelineDiscardRectangleStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( - VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_ = VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT::eInclusive, - uint32_t discardRectangleCount_ = {}, - const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , discardRectangleMode( discardRectangleMode_ ) - , discardRectangleCount( discardRectangleCount_ ) - , pDiscardRectangles( pDiscardRectangles_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDiscardRectangleStateCreateInfoEXT( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineDiscardRectangleStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineDiscardRectangleStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_, - VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & discardRectangles_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , discardRectangleMode( discardRectangleMode_ ) - , discardRectangleCount( static_cast( discardRectangles_.size() ) ) - , pDiscardRectangles( discardRectangles_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineDiscardRectangleStateCreateInfoEXT & operator=( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineDiscardRectangleStateCreateInfoEXT & operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & - setFlags( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & - setDiscardRectangleMode( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_ ) VULKAN_HPP_NOEXCEPT - { - discardRectangleMode = discardRectangleMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangleCount( uint32_t discardRectangleCount_ ) VULKAN_HPP_NOEXCEPT - { - discardRectangleCount = discardRectangleCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & - setPDiscardRectangles( const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles_ ) VULKAN_HPP_NOEXCEPT - { - pDiscardRectangles = pDiscardRectangles_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineDiscardRectangleStateCreateInfoEXT & - setDiscardRectangles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & discardRectangles_ ) VULKAN_HPP_NOEXCEPT - { - discardRectangleCount = static_cast( discardRectangles_.size() ); - pDiscardRectangles = discardRectangles_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineDiscardRectangleStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineDiscardRectangleStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, discardRectangleMode, discardRectangleCount, pDiscardRectangles ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineDiscardRectangleStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( discardRectangleMode == rhs.discardRectangleMode ) && - ( discardRectangleCount == rhs.discardRectangleCount ) && ( pDiscardRectangles == rhs.pDiscardRectangles ); -# endif - } - - bool operator!=( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode = VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT::eInclusive; - uint32_t discardRectangleCount = {}; - const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles = {}; - }; - - template <> - struct CppType - { - using Type = PipelineDiscardRectangleStateCreateInfoEXT; - }; - - struct PipelineExecutableInfoKHR - { - using NativeType = VkPipelineExecutableInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, - uint32_t executableIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipeline( pipeline_ ) - , executableIndex( executableIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( PipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableInfoKHR( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineExecutableInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineExecutableInfoKHR & operator=( PipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableInfoKHR & operator=( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT - { - pipeline = pipeline_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setExecutableIndex( uint32_t executableIndex_ ) VULKAN_HPP_NOEXCEPT - { - executableIndex = executableIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineExecutableInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineExecutableInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipeline, executableIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineExecutableInfoKHR const & ) const = default; -#else - bool operator==( PipelineExecutableInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ) && ( executableIndex == rhs.executableIndex ); -# endif - } - - bool operator!=( PipelineExecutableInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; - uint32_t executableIndex = {}; - }; - - template <> - struct CppType - { - using Type = PipelineExecutableInfoKHR; - }; - - struct PipelineExecutableInternalRepresentationKHR - { - using NativeType = VkPipelineExecutableInternalRepresentationKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableInternalRepresentationKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInternalRepresentationKHR( std::array const & name_ = {}, - std::array const & description_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 isText_ = {}, - size_t dataSize_ = {}, - void * pData_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , name( name_ ) - , description( description_ ) - , isText( isText_ ) - , dataSize( dataSize_ ) - , pData( pData_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - PipelineExecutableInternalRepresentationKHR( PipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableInternalRepresentationKHR( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineExecutableInternalRepresentationKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - PipelineExecutableInternalRepresentationKHR( std::array const & name_, - std::array const & description_, - VULKAN_HPP_NAMESPACE::Bool32 isText_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, - void * pNext_ = nullptr ) - : pNext( pNext_ ), name( name_ ), description( description_ ), isText( isText_ ), dataSize( data_.size() * sizeof( T ) ), pData( data_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineExecutableInternalRepresentationKHR & operator=( PipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableInternalRepresentationKHR & operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPipelineExecutableInternalRepresentationKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineExecutableInternalRepresentationKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::Bool32 const &, - size_t const &, - void * const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, name, description, isText, dataSize, pData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineExecutableInternalRepresentationKHR const & ) const = default; -#else - bool operator==( PipelineExecutableInternalRepresentationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( name == rhs.name ) && ( description == rhs.description ) && ( isText == rhs.isText ) && - ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); -# endif - } - - bool operator!=( PipelineExecutableInternalRepresentationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInternalRepresentationKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - VULKAN_HPP_NAMESPACE::Bool32 isText = {}; - size_t dataSize = {}; - void * pData = {}; - }; - - template <> - struct CppType - { - using Type = PipelineExecutableInternalRepresentationKHR; - }; - - struct PipelineExecutablePropertiesKHR - { - using NativeType = VkPipelineExecutablePropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutablePropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineExecutablePropertiesKHR( VULKAN_HPP_NAMESPACE::ShaderStageFlags stages_ = {}, - std::array const & name_ = {}, - std::array const & description_ = {}, - uint32_t subgroupSize_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stages( stages_ ) - , name( name_ ) - , description( description_ ) - , subgroupSize( subgroupSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutablePropertiesKHR( PipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutablePropertiesKHR( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineExecutablePropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineExecutablePropertiesKHR & operator=( PipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutablePropertiesKHR & operator=( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPipelineExecutablePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineExecutablePropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - uint32_t const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stages, name, description, subgroupSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineExecutablePropertiesKHR const & ) const = default; -#else - bool operator==( PipelineExecutablePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stages == rhs.stages ) && ( name == rhs.name ) && ( description == rhs.description ) && - ( subgroupSize == rhs.subgroupSize ); -# endif - } - - bool operator!=( PipelineExecutablePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutablePropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ShaderStageFlags stages = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - uint32_t subgroupSize = {}; - }; - - template <> - struct CppType - { - using Type = PipelineExecutablePropertiesKHR; - }; - - union PipelineExecutableStatisticValueKHR - { - using NativeType = VkPipelineExecutableStatisticValueKHR; -#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( VULKAN_HPP_NAMESPACE::Bool32 b32_ = {} ) : b32( b32_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( int64_t i64_ ) : i64( i64_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( uint64_t u64_ ) : u64( u64_ ) {} - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( double f64_ ) : f64( f64_ ) {} -#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/ - -#if !defined( VULKAN_HPP_NO_UNION_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setB32( VULKAN_HPP_NAMESPACE::Bool32 b32_ ) VULKAN_HPP_NOEXCEPT - { - b32 = b32_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setI64( int64_t i64_ ) VULKAN_HPP_NOEXCEPT - { - i64 = i64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setU64( uint64_t u64_ ) VULKAN_HPP_NOEXCEPT - { - u64 = u64_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setF64( double f64_ ) VULKAN_HPP_NOEXCEPT - { - f64 = f64_; - return *this; - } -#endif /*VULKAN_HPP_NO_UNION_SETTERS*/ - - operator VkPipelineExecutableStatisticValueKHR const &() const - { - return *reinterpret_cast( this ); - } - - operator VkPipelineExecutableStatisticValueKHR &() - { - return *reinterpret_cast( this ); - } - -#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS - VULKAN_HPP_NAMESPACE::Bool32 b32; - int64_t i64; - uint64_t u64; - double f64; -#else - VkBool32 b32; - int64_t i64; - uint64_t u64; - double f64; -#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ - }; - - struct PipelineExecutableStatisticKHR - { - using NativeType = VkPipelineExecutableStatisticKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableStatisticKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticKHR( - std::array const & name_ = {}, - std::array const & description_ = {}, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format_ = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , name( name_ ) - , description( description_ ) - , format( format_ ) - , value( value_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticKHR( PipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableStatisticKHR( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineExecutableStatisticKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineExecutableStatisticKHR & operator=( PipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineExecutableStatisticKHR & operator=( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPipelineExecutableStatisticKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineExecutableStatisticKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &, - VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR const &, - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, name, description, format, value ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableStatisticKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32; - VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value = {}; - }; - - template <> - struct CppType - { - using Type = PipelineExecutableStatisticKHR; - }; - - struct PipelineFragmentShadingRateEnumStateCreateInfoNV - { - using NativeType = VkPipelineFragmentShadingRateEnumStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType_ = VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV::eFragmentSize, - VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate_ = VULKAN_HPP_NAMESPACE::FragmentShadingRateNV::e1InvocationPerPixel, - std::array const & - combinerOps_ = { { VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep, VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep } }, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shadingRateType( shadingRateType_ ) - , shadingRate( shadingRate_ ) - , combinerOps( combinerOps_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - PipelineFragmentShadingRateEnumStateCreateInfoNV( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineFragmentShadingRateEnumStateCreateInfoNV( VkPipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineFragmentShadingRateEnumStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineFragmentShadingRateEnumStateCreateInfoNV & operator=( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineFragmentShadingRateEnumStateCreateInfoNV & operator=( VkPipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & - setShadingRateType( VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateType = shadingRateType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & - setShadingRate( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate_ ) VULKAN_HPP_NOEXCEPT - { - shadingRate = shadingRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & - setCombinerOps( std::array combinerOps_ ) VULKAN_HPP_NOEXCEPT - { - combinerOps = combinerOps_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineFragmentShadingRateEnumStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineFragmentShadingRateEnumStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shadingRateType, shadingRate, combinerOps ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineFragmentShadingRateEnumStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateType == rhs.shadingRateType ) && ( shadingRate == rhs.shadingRate ) && - ( combinerOps == rhs.combinerOps ); -# endif - } - - bool operator!=( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType = VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV::eFragmentSize; - VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate = VULKAN_HPP_NAMESPACE::FragmentShadingRateNV::e1InvocationPerPixel; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D combinerOps = {}; - }; - - template <> - struct CppType - { - using Type = PipelineFragmentShadingRateEnumStateCreateInfoNV; - }; - - struct PipelineFragmentShadingRateStateCreateInfoKHR - { - using NativeType = VkPipelineFragmentShadingRateStateCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR( - VULKAN_HPP_NAMESPACE::Extent2D fragmentSize_ = {}, - std::array const & - combinerOps_ = { { VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep, VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep } }, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentSize( fragmentSize_ ) - , combinerOps( combinerOps_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 - PipelineFragmentShadingRateStateCreateInfoKHR( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineFragmentShadingRateStateCreateInfoKHR( VkPipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineFragmentShadingRateStateCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineFragmentShadingRateStateCreateInfoKHR & operator=( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineFragmentShadingRateStateCreateInfoKHR & operator=( VkPipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & - setFragmentSize( VULKAN_HPP_NAMESPACE::Extent2D const & fragmentSize_ ) VULKAN_HPP_NOEXCEPT - { - fragmentSize = fragmentSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & - setCombinerOps( std::array combinerOps_ ) VULKAN_HPP_NOEXCEPT - { - combinerOps = combinerOps_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineFragmentShadingRateStateCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineFragmentShadingRateStateCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentSize, combinerOps ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineFragmentShadingRateStateCreateInfoKHR const & ) const = default; -#else - bool operator==( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentSize == rhs.fragmentSize ) && ( combinerOps == rhs.combinerOps ); -# endif - } - - bool operator!=( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent2D fragmentSize = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D combinerOps = {}; - }; - - template <> - struct CppType - { - using Type = PipelineFragmentShadingRateStateCreateInfoKHR; - }; - - struct PipelineInfoKHR - { - using NativeType = VkPipelineInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipeline( pipeline_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineInfoKHR( PipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineInfoKHR( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineInfoKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineInfoKHR & operator=( PipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineInfoKHR & operator=( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT - { - pipeline = pipeline_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipeline ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineInfoKHR const & ) const = default; -#else - bool operator==( PipelineInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ); -# endif - } - - bool operator!=( PipelineInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; - }; - - template <> - struct CppType - { - using Type = PipelineInfoKHR; - }; - using PipelineInfoEXT = PipelineInfoKHR; - - struct PushConstantRange - { - using NativeType = VkPushConstantRange; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PushConstantRange( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, uint32_t offset_ = {}, uint32_t size_ = {} ) VULKAN_HPP_NOEXCEPT - : stageFlags( stageFlags_ ) - , offset( offset_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR PushConstantRange( PushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PushConstantRange( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT : PushConstantRange( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PushConstantRange & operator=( PushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PushConstantRange & operator=( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT - { - stageFlags = stageFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPushConstantRange const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPushConstantRange &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( stageFlags, offset, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PushConstantRange const & ) const = default; -#else - bool operator==( PushConstantRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( stageFlags == rhs.stageFlags ) && ( offset == rhs.offset ) && ( size == rhs.size ); -# endif - } - - bool operator!=( PushConstantRange const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; - uint32_t offset = {}; - uint32_t size = {}; - }; - - struct PipelineLayoutCreateInfo - { - using NativeType = VkPipelineLayoutCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineLayoutCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_ = {}, - uint32_t setLayoutCount_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, - uint32_t pushConstantRangeCount_ = {}, - const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , setLayoutCount( setLayoutCount_ ) - , pSetLayouts( pSetLayouts_ ) - , pushConstantRangeCount( pushConstantRangeCount_ ) - , pPushConstantRanges( pPushConstantRanges_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( PipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineLayoutCreateInfo( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineLayoutCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineLayoutCreateInfo( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , setLayoutCount( static_cast( setLayouts_.size() ) ) - , pSetLayouts( setLayouts_.data() ) - , pushConstantRangeCount( static_cast( pushConstantRanges_.size() ) ) - , pPushConstantRanges( pushConstantRanges_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineLayoutCreateInfo & operator=( PipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineLayoutCreateInfo & operator=( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setSetLayoutCount( uint32_t setLayoutCount_ ) VULKAN_HPP_NOEXCEPT - { - setLayoutCount = setLayoutCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT - { - pSetLayouts = pSetLayouts_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineLayoutCreateInfo & - setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT - { - setLayoutCount = static_cast( setLayouts_.size() ); - pSetLayouts = setLayouts_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPushConstantRangeCount( uint32_t pushConstantRangeCount_ ) VULKAN_HPP_NOEXCEPT - { - pushConstantRangeCount = pushConstantRangeCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & - setPPushConstantRanges( const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT - { - pPushConstantRanges = pPushConstantRanges_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineLayoutCreateInfo & setPushConstantRanges( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ ) VULKAN_HPP_NOEXCEPT - { - pushConstantRangeCount = static_cast( pushConstantRanges_.size() ); - pPushConstantRanges = pushConstantRanges_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineLayoutCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, setLayoutCount, pSetLayouts, pushConstantRangeCount, pPushConstantRanges ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineLayoutCreateInfo const & ) const = default; -#else - bool operator==( PipelineLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( setLayoutCount == rhs.setLayoutCount ) && - ( pSetLayouts == rhs.pSetLayouts ) && ( pushConstantRangeCount == rhs.pushConstantRangeCount ) && - ( pPushConstantRanges == rhs.pPushConstantRanges ); -# endif - } - - bool operator!=( PipelineLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineLayoutCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags = {}; - uint32_t setLayoutCount = {}; - const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; - uint32_t pushConstantRangeCount = {}; - const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges = {}; - }; - - template <> - struct CppType - { - using Type = PipelineLayoutCreateInfo; - }; - - struct PipelineLibraryCreateInfoKHR - { - using NativeType = VkPipelineLibraryCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineLibraryCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineLibraryCreateInfoKHR( uint32_t libraryCount_ = {}, - const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , libraryCount( libraryCount_ ) - , pLibraries( pLibraries_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineLibraryCreateInfoKHR( PipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineLibraryCreateInfoKHR( VkPipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineLibraryCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineLibraryCreateInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & libraries_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), libraryCount( static_cast( libraries_.size() ) ), pLibraries( libraries_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineLibraryCreateInfoKHR & operator=( PipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineLibraryCreateInfoKHR & operator=( VkPipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setLibraryCount( uint32_t libraryCount_ ) VULKAN_HPP_NOEXCEPT - { - libraryCount = libraryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setPLibraries( const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries_ ) VULKAN_HPP_NOEXCEPT - { - pLibraries = pLibraries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineLibraryCreateInfoKHR & - setLibraries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & libraries_ ) VULKAN_HPP_NOEXCEPT - { - libraryCount = static_cast( libraries_.size() ); - pLibraries = libraries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineLibraryCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineLibraryCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, libraryCount, pLibraries ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineLibraryCreateInfoKHR const & ) const = default; -#else - bool operator==( PipelineLibraryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( libraryCount == rhs.libraryCount ) && ( pLibraries == rhs.pLibraries ); -# endif - } - - bool operator!=( PipelineLibraryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineLibraryCreateInfoKHR; - const void * pNext = {}; - uint32_t libraryCount = {}; - const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries = {}; - }; - - template <> - struct CppType - { - using Type = PipelineLibraryCreateInfoKHR; - }; - - struct PipelinePropertiesIdentifierEXT - { - using NativeType = VkPipelinePropertiesIdentifierEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelinePropertiesIdentifierEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT( std::array const & pipelineIdentifier_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pipelineIdentifier( pipelineIdentifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT( PipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelinePropertiesIdentifierEXT( VkPipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelinePropertiesIdentifierEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelinePropertiesIdentifierEXT & operator=( PipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelinePropertiesIdentifierEXT & operator=( VkPipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT & setPipelineIdentifier( std::array pipelineIdentifier_ ) VULKAN_HPP_NOEXCEPT - { - pipelineIdentifier = pipelineIdentifier_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelinePropertiesIdentifierEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelinePropertiesIdentifierEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pipelineIdentifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelinePropertiesIdentifierEXT const & ) const = default; -#else - bool operator==( PipelinePropertiesIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineIdentifier == rhs.pipelineIdentifier ); -# endif - } - - bool operator!=( PipelinePropertiesIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelinePropertiesIdentifierEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineIdentifier = {}; - }; - - template <> - struct CppType - { - using Type = PipelinePropertiesIdentifierEXT; - }; - - struct PipelineRasterizationConservativeStateCreateInfoEXT - { - using NativeType = VkPipelineRasterizationConservativeStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( - VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ = VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT::eDisabled, - float extraPrimitiveOverestimationSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , conservativeRasterizationMode( conservativeRasterizationMode_ ) - , extraPrimitiveOverestimationSize( extraPrimitiveOverestimationSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineRasterizationConservativeStateCreateInfoEXT( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationConservativeStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationConservativeStateCreateInfoEXT & - operator=( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationConservativeStateCreateInfoEXT & operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & - setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & - setConservativeRasterizationMode( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ ) VULKAN_HPP_NOEXCEPT - { - conservativeRasterizationMode = conservativeRasterizationMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & - setExtraPrimitiveOverestimationSize( float extraPrimitiveOverestimationSize_ ) VULKAN_HPP_NOEXCEPT - { - extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationConservativeStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationConservativeStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, conservativeRasterizationMode, extraPrimitiveOverestimationSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationConservativeStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( conservativeRasterizationMode == rhs.conservativeRasterizationMode ) && - ( extraPrimitiveOverestimationSize == rhs.extraPrimitiveOverestimationSize ); -# endif - } - - bool operator!=( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode = VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT::eDisabled; - float extraPrimitiveOverestimationSize = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationConservativeStateCreateInfoEXT; - }; - - struct PipelineRasterizationDepthClipStateCreateInfoEXT - { - using NativeType = VkPipelineRasterizationDepthClipStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , depthClipEnable( depthClipEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineRasterizationDepthClipStateCreateInfoEXT( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationDepthClipStateCreateInfoEXT( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationDepthClipStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationDepthClipStateCreateInfoEXT & operator=( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationDepthClipStateCreateInfoEXT & operator=( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & - setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & - setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT - { - depthClipEnable = depthClipEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationDepthClipStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationDepthClipStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, depthClipEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationDepthClipStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthClipEnable == rhs.depthClipEnable ); -# endif - } - - bool operator!=( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationDepthClipStateCreateInfoEXT; - }; - - struct PipelineRasterizationLineStateCreateInfoEXT - { - using NativeType = VkPipelineRasterizationLineStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationLineStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfoEXT( - VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode_ = VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT::eDefault, - VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ = {}, - uint32_t lineStippleFactor_ = {}, - uint16_t lineStipplePattern_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , lineRasterizationMode( lineRasterizationMode_ ) - , stippledLineEnable( stippledLineEnable_ ) - , lineStippleFactor( lineStippleFactor_ ) - , lineStipplePattern( lineStipplePattern_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfoEXT( PipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationLineStateCreateInfoEXT( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationLineStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationLineStateCreateInfoEXT & operator=( PipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationLineStateCreateInfoEXT & operator=( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfoEXT & - setLineRasterizationMode( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode_ ) VULKAN_HPP_NOEXCEPT - { - lineRasterizationMode = lineRasterizationMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfoEXT & - setStippledLineEnable( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ ) VULKAN_HPP_NOEXCEPT - { - stippledLineEnable = stippledLineEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfoEXT & setLineStippleFactor( uint32_t lineStippleFactor_ ) VULKAN_HPP_NOEXCEPT - { - lineStippleFactor = lineStippleFactor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfoEXT & setLineStipplePattern( uint16_t lineStipplePattern_ ) VULKAN_HPP_NOEXCEPT - { - lineStipplePattern = lineStipplePattern_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationLineStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationLineStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, lineRasterizationMode, stippledLineEnable, lineStippleFactor, lineStipplePattern ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationLineStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRasterizationLineStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lineRasterizationMode == rhs.lineRasterizationMode ) && - ( stippledLineEnable == rhs.stippledLineEnable ) && ( lineStippleFactor == rhs.lineStippleFactor ) && - ( lineStipplePattern == rhs.lineStipplePattern ); -# endif - } - - bool operator!=( PipelineRasterizationLineStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationLineStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode = VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT::eDefault; - VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable = {}; - uint32_t lineStippleFactor = {}; - uint16_t lineStipplePattern = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationLineStateCreateInfoEXT; - }; - - struct PipelineRasterizationProvokingVertexStateCreateInfoEXT - { - using NativeType = VkPipelineRasterizationProvokingVertexStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationProvokingVertexStateCreateInfoEXT( - VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode_ = VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT::eFirstVertex, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , provokingVertexMode( provokingVertexMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineRasterizationProvokingVertexStateCreateInfoEXT( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) - VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationProvokingVertexStateCreateInfoEXT( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationProvokingVertexStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationProvokingVertexStateCreateInfoEXT & - operator=( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationProvokingVertexStateCreateInfoEXT & - operator=( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationProvokingVertexStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationProvokingVertexStateCreateInfoEXT & - setProvokingVertexMode( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode_ ) VULKAN_HPP_NOEXCEPT - { - provokingVertexMode = provokingVertexMode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationProvokingVertexStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, provokingVertexMode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexMode == rhs.provokingVertexMode ); -# endif - } - - bool operator!=( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode = VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT::eFirstVertex; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationProvokingVertexStateCreateInfoEXT; - }; - - struct PipelineRasterizationStateRasterizationOrderAMD - { - using NativeType = VkPipelineRasterizationStateRasterizationOrderAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( - VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , rasterizationOrder( rasterizationOrder_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineRasterizationStateRasterizationOrderAMD( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateRasterizationOrderAMD( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationStateRasterizationOrderAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationStateRasterizationOrderAMD & operator=( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateRasterizationOrderAMD & operator=( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateRasterizationOrderAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateRasterizationOrderAMD & - setRasterizationOrder( VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationOrder = rasterizationOrder_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationStateRasterizationOrderAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationStateRasterizationOrderAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, rasterizationOrder ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationStateRasterizationOrderAMD const & ) const = default; -#else - bool operator==( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rasterizationOrder == rhs.rasterizationOrder ); -# endif - } - - bool operator!=( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationStateRasterizationOrderAMD; - }; - - struct PipelineRasterizationStateStreamCreateInfoEXT - { - using NativeType = VkPipelineRasterizationStateStreamCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ = {}, - uint32_t rasterizationStream_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , rasterizationStream( rasterizationStream_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineRasterizationStateStreamCreateInfoEXT( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateStreamCreateInfoEXT( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRasterizationStateStreamCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRasterizationStateStreamCreateInfoEXT & operator=( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRasterizationStateStreamCreateInfoEXT & operator=( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & - setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & setRasterizationStream( uint32_t rasterizationStream_ ) VULKAN_HPP_NOEXCEPT - { - rasterizationStream = rasterizationStream_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRasterizationStateStreamCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRasterizationStateStreamCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, rasterizationStream ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRasterizationStateStreamCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rasterizationStream == rhs.rasterizationStream ); -# endif - } - - bool operator!=( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags = {}; - uint32_t rasterizationStream = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRasterizationStateStreamCreateInfoEXT; - }; - - struct PipelineRenderingCreateInfo - { - using NativeType = VkPipelineRenderingCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRenderingCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRenderingCreateInfo( uint32_t viewMask_ = {}, - uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ = {}, - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachmentFormats( pColorAttachmentFormats_ ) - , depthAttachmentFormat( depthAttachmentFormat_ ) - , stencilAttachmentFormat( stencilAttachmentFormat_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineRenderingCreateInfo( PipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRenderingCreateInfo( VkPipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRenderingCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineRenderingCreateInfo( uint32_t viewMask_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_, - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( static_cast( colorAttachmentFormats_.size() ) ) - , pColorAttachmentFormats( colorAttachmentFormats_.data() ) - , depthAttachmentFormat( depthAttachmentFormat_ ) - , stencilAttachmentFormat( stencilAttachmentFormat_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRenderingCreateInfo & operator=( PipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRenderingCreateInfo & operator=( VkPipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT - { - viewMask = viewMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & - setPColorAttachmentFormats( const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachmentFormats = pColorAttachmentFormats_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineRenderingCreateInfo & setColorAttachmentFormats( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachmentFormats_.size() ); - pColorAttachmentFormats = colorAttachmentFormats_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setDepthAttachmentFormat( VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT - { - depthAttachmentFormat = depthAttachmentFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & - setStencilAttachmentFormat( VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT - { - stencilAttachmentFormat = stencilAttachmentFormat_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRenderingCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRenderingCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, viewMask, colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, stencilAttachmentFormat ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRenderingCreateInfo const & ) const = default; -#else - bool operator==( PipelineRenderingCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && - ( pColorAttachmentFormats == rhs.pColorAttachmentFormats ) && ( depthAttachmentFormat == rhs.depthAttachmentFormat ) && - ( stencilAttachmentFormat == rhs.stencilAttachmentFormat ); -# endif - } - - bool operator!=( PipelineRenderingCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRenderingCreateInfo; - const void * pNext = {}; - uint32_t viewMask = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats = {}; - VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - }; - - template <> - struct CppType - { - using Type = PipelineRenderingCreateInfo; - }; - using PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; - - struct PipelineRepresentativeFragmentTestStateCreateInfoNV - { - using NativeType = VkPipelineRepresentativeFragmentTestStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , representativeFragmentTestEnable( representativeFragmentTestEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineRepresentativeFragmentTestStateCreateInfoNV( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRepresentativeFragmentTestStateCreateInfoNV( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRepresentativeFragmentTestStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRepresentativeFragmentTestStateCreateInfoNV & - operator=( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRepresentativeFragmentTestStateCreateInfoNV & operator=( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRepresentativeFragmentTestStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRepresentativeFragmentTestStateCreateInfoNV & - setRepresentativeFragmentTestEnable( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ ) VULKAN_HPP_NOEXCEPT - { - representativeFragmentTestEnable = representativeFragmentTestEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, representativeFragmentTestEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRepresentativeFragmentTestStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( representativeFragmentTestEnable == rhs.representativeFragmentTestEnable ); -# endif - } - - bool operator!=( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable = {}; - }; - - template <> - struct CppType - { - using Type = PipelineRepresentativeFragmentTestStateCreateInfoNV; - }; - - struct PipelineRobustnessCreateInfoEXT - { - using NativeType = VkPipelineRobustnessCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRobustnessCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineRobustnessCreateInfoEXT( - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT storageBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT uniformBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT vertexInputs_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault, - VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT images_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT::eDeviceDefault, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , storageBuffers( storageBuffers_ ) - , uniformBuffers( uniformBuffers_ ) - , vertexInputs( vertexInputs_ ) - , images( images_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineRobustnessCreateInfoEXT( PipelineRobustnessCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRobustnessCreateInfoEXT( VkPipelineRobustnessCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineRobustnessCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineRobustnessCreateInfoEXT & operator=( PipelineRobustnessCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineRobustnessCreateInfoEXT & operator=( VkPipelineRobustnessCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfoEXT & - setStorageBuffers( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT storageBuffers_ ) VULKAN_HPP_NOEXCEPT - { - storageBuffers = storageBuffers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfoEXT & - setUniformBuffers( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT uniformBuffers_ ) VULKAN_HPP_NOEXCEPT - { - uniformBuffers = uniformBuffers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfoEXT & - setVertexInputs( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT vertexInputs_ ) VULKAN_HPP_NOEXCEPT - { - vertexInputs = vertexInputs_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfoEXT & setImages( VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT images_ ) VULKAN_HPP_NOEXCEPT - { - images = images_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineRobustnessCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineRobustnessCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, storageBuffers, uniformBuffers, vertexInputs, images ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineRobustnessCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineRobustnessCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffers == rhs.storageBuffers ) && ( uniformBuffers == rhs.uniformBuffers ) && - ( vertexInputs == rhs.vertexInputs ) && ( images == rhs.images ); -# endif - } - - bool operator!=( PipelineRobustnessCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRobustnessCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT storageBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT uniformBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT vertexInputs = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehaviorEXT::eDeviceDefault; - VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT images = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehaviorEXT::eDeviceDefault; - }; - - template <> - struct CppType - { - using Type = PipelineRobustnessCreateInfoEXT; - }; - - struct PipelineSampleLocationsStateCreateInfoEXT - { - using NativeType = VkPipelineSampleLocationsStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ = {}, - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sampleLocationsEnable( sampleLocationsEnable_ ) - , sampleLocationsInfo( sampleLocationsInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineSampleLocationsStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineSampleLocationsStateCreateInfoEXT & operator=( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineSampleLocationsStateCreateInfoEXT & operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & - setSampleLocationsEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsEnable = sampleLocationsEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & - setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsInfo = sampleLocationsInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineSampleLocationsStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineSampleLocationsStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, sampleLocationsEnable, sampleLocationsInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineSampleLocationsStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationsEnable == rhs.sampleLocationsEnable ) && - ( sampleLocationsInfo == rhs.sampleLocationsInfo ); -# endif - } - - bool operator!=( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable = {}; - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; - }; - - template <> - struct CppType - { - using Type = PipelineSampleLocationsStateCreateInfoEXT; - }; - - struct PipelineShaderStageModuleIdentifierCreateInfoEXT - { - using NativeType = VkPipelineShaderStageModuleIdentifierCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineShaderStageModuleIdentifierCreateInfoEXT( uint32_t identifierSize_ = {}, - const uint8_t * pIdentifier_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , identifierSize( identifierSize_ ) - , pIdentifier( pIdentifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineShaderStageModuleIdentifierCreateInfoEXT( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageModuleIdentifierCreateInfoEXT( VkPipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineShaderStageModuleIdentifierCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineShaderStageModuleIdentifierCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & identifier_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), identifierSize( static_cast( identifier_.size() ) ), pIdentifier( identifier_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineShaderStageModuleIdentifierCreateInfoEXT & operator=( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageModuleIdentifierCreateInfoEXT & operator=( VkPipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setIdentifierSize( uint32_t identifierSize_ ) VULKAN_HPP_NOEXCEPT - { - identifierSize = identifierSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setPIdentifier( const uint8_t * pIdentifier_ ) VULKAN_HPP_NOEXCEPT - { - pIdentifier = pIdentifier_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineShaderStageModuleIdentifierCreateInfoEXT & - setIdentifier( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & identifier_ ) VULKAN_HPP_NOEXCEPT - { - identifierSize = static_cast( identifier_.size() ); - pIdentifier = identifier_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineShaderStageModuleIdentifierCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineShaderStageModuleIdentifierCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, identifierSize, pIdentifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineShaderStageModuleIdentifierCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( identifierSize == rhs.identifierSize ) && ( pIdentifier == rhs.pIdentifier ); -# endif - } - - bool operator!=( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT; - const void * pNext = {}; - uint32_t identifierSize = {}; - const uint8_t * pIdentifier = {}; - }; - - template <> - struct CppType - { - using Type = PipelineShaderStageModuleIdentifierCreateInfoEXT; - }; - - struct PipelineShaderStageRequiredSubgroupSizeCreateInfo - { - using NativeType = VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineShaderStageRequiredSubgroupSizeCreateInfo( uint32_t requiredSubgroupSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , requiredSubgroupSize( requiredSubgroupSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineShaderStageRequiredSubgroupSizeCreateInfo( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageRequiredSubgroupSizeCreateInfo( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineShaderStageRequiredSubgroupSizeCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineShaderStageRequiredSubgroupSizeCreateInfo & - operator=( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineShaderStageRequiredSubgroupSizeCreateInfo & operator=( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineShaderStageRequiredSubgroupSizeCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, requiredSubgroupSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & ) const = default; -#else - bool operator==( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( requiredSubgroupSize == rhs.requiredSubgroupSize ); -# endif - } - - bool operator!=( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo; - void * pNext = {}; - uint32_t requiredSubgroupSize = {}; - }; - - template <> - struct CppType - { - using Type = PipelineShaderStageRequiredSubgroupSizeCreateInfo; - }; - using PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; - - struct PipelineTessellationDomainOriginStateCreateInfo - { - using NativeType = VkPipelineTessellationDomainOriginStateCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( - VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , domainOrigin( domainOrigin_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineTessellationDomainOriginStateCreateInfo( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineTessellationDomainOriginStateCreateInfo( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineTessellationDomainOriginStateCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineTessellationDomainOriginStateCreateInfo & operator=( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineTessellationDomainOriginStateCreateInfo & operator=( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineTessellationDomainOriginStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineTessellationDomainOriginStateCreateInfo & - setDomainOrigin( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ ) VULKAN_HPP_NOEXCEPT - { - domainOrigin = domainOrigin_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineTessellationDomainOriginStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineTessellationDomainOriginStateCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, domainOrigin ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineTessellationDomainOriginStateCreateInfo const & ) const = default; -#else - bool operator==( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( domainOrigin == rhs.domainOrigin ); -# endif - } - - bool operator!=( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft; - }; - - template <> - struct CppType - { - using Type = PipelineTessellationDomainOriginStateCreateInfo; - }; - using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; - - struct VertexInputBindingDivisorDescriptionEXT - { - using NativeType = VkVertexInputBindingDivisorDescriptionEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescriptionEXT( uint32_t binding_ = {}, uint32_t divisor_ = {} ) VULKAN_HPP_NOEXCEPT - : binding( binding_ ) - , divisor( divisor_ ) - { - } - - VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescriptionEXT( VertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDivisorDescriptionEXT( VkVertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VertexInputBindingDivisorDescriptionEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VertexInputBindingDivisorDescriptionEXT & operator=( VertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDivisorDescriptionEXT & operator=( VkVertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDivisorDescriptionEXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDivisorDescriptionEXT & setDivisor( uint32_t divisor_ ) VULKAN_HPP_NOEXCEPT - { - divisor = divisor_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVertexInputBindingDivisorDescriptionEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVertexInputBindingDivisorDescriptionEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( binding, divisor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VertexInputBindingDivisorDescriptionEXT const & ) const = default; -#else - bool operator==( VertexInputBindingDivisorDescriptionEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( binding == rhs.binding ) && ( divisor == rhs.divisor ); -# endif - } - - bool operator!=( VertexInputBindingDivisorDescriptionEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t binding = {}; - uint32_t divisor = {}; - }; - - struct PipelineVertexInputDivisorStateCreateInfoEXT - { - using NativeType = VkPipelineVertexInputDivisorStateCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - PipelineVertexInputDivisorStateCreateInfoEXT( uint32_t vertexBindingDivisorCount_ = {}, - const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT * pVertexBindingDivisors_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vertexBindingDivisorCount( vertexBindingDivisorCount_ ) - , pVertexBindingDivisors( pVertexBindingDivisors_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfoEXT( PipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineVertexInputDivisorStateCreateInfoEXT( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineVertexInputDivisorStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineVertexInputDivisorStateCreateInfoEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDivisors_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , vertexBindingDivisorCount( static_cast( vertexBindingDivisors_.size() ) ) - , pVertexBindingDivisors( vertexBindingDivisors_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineVertexInputDivisorStateCreateInfoEXT & operator=( PipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineVertexInputDivisorStateCreateInfoEXT & operator=( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfoEXT & - setVertexBindingDivisorCount( uint32_t vertexBindingDivisorCount_ ) VULKAN_HPP_NOEXCEPT - { - vertexBindingDivisorCount = vertexBindingDivisorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfoEXT & - setPVertexBindingDivisors( const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT * pVertexBindingDivisors_ ) VULKAN_HPP_NOEXCEPT - { - pVertexBindingDivisors = pVertexBindingDivisors_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineVertexInputDivisorStateCreateInfoEXT & setVertexBindingDivisors( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDivisors_ ) - VULKAN_HPP_NOEXCEPT - { - vertexBindingDivisorCount = static_cast( vertexBindingDivisors_.size() ); - pVertexBindingDivisors = vertexBindingDivisors_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineVertexInputDivisorStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineVertexInputDivisorStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vertexBindingDivisorCount, pVertexBindingDivisors ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineVertexInputDivisorStateCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexBindingDivisorCount == rhs.vertexBindingDivisorCount ) && - ( pVertexBindingDivisors == rhs.pVertexBindingDivisors ); -# endif - } - - bool operator!=( PipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT; - const void * pNext = {}; - uint32_t vertexBindingDivisorCount = {}; - const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT * pVertexBindingDivisors = {}; - }; - - template <> - struct CppType - { - using Type = PipelineVertexInputDivisorStateCreateInfoEXT; - }; - - struct PipelineViewportCoarseSampleOrderStateCreateInfoNV - { - using NativeType = VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ = VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV::eDefault, - uint32_t customSampleOrderCount_ = {}, - const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sampleOrderType( sampleOrderType_ ) - , customSampleOrderCount( customSampleOrderCount_ ) - , pCustomSampleOrders( pCustomSampleOrders_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineViewportCoarseSampleOrderStateCreateInfoNV( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportCoarseSampleOrderStateCreateInfoNV( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportCoarseSampleOrderStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportCoarseSampleOrderStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & customSampleOrders_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , sampleOrderType( sampleOrderType_ ) - , customSampleOrderCount( static_cast( customSampleOrders_.size() ) ) - , pCustomSampleOrders( customSampleOrders_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportCoarseSampleOrderStateCreateInfoNV & - operator=( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportCoarseSampleOrderStateCreateInfoNV & operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & - setSampleOrderType( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ ) VULKAN_HPP_NOEXCEPT - { - sampleOrderType = sampleOrderType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & - setCustomSampleOrderCount( uint32_t customSampleOrderCount_ ) VULKAN_HPP_NOEXCEPT - { - customSampleOrderCount = customSampleOrderCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & - setPCustomSampleOrders( const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders_ ) VULKAN_HPP_NOEXCEPT - { - pCustomSampleOrders = pCustomSampleOrders_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportCoarseSampleOrderStateCreateInfoNV & setCustomSampleOrders( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & customSampleOrders_ ) VULKAN_HPP_NOEXCEPT - { - customSampleOrderCount = static_cast( customSampleOrders_.size() ); - pCustomSampleOrders = customSampleOrders_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, sampleOrderType, customSampleOrderCount, pCustomSampleOrders ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleOrderType == rhs.sampleOrderType ) && - ( customSampleOrderCount == rhs.customSampleOrderCount ) && ( pCustomSampleOrders == rhs.pCustomSampleOrders ); -# endif - } - - bool operator!=( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType = VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV::eDefault; - uint32_t customSampleOrderCount = {}; - const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportCoarseSampleOrderStateCreateInfoNV; - }; - - struct PipelineViewportDepthClipControlCreateInfoEXT - { - using NativeType = VkPipelineViewportDepthClipControlCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportDepthClipControlCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportDepthClipControlCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , negativeOneToOne( negativeOneToOne_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineViewportDepthClipControlCreateInfoEXT( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportDepthClipControlCreateInfoEXT( VkPipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportDepthClipControlCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportDepthClipControlCreateInfoEXT & operator=( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportDepthClipControlCreateInfoEXT & operator=( VkPipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClipControlCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClipControlCreateInfoEXT & - setNegativeOneToOne( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne_ ) VULKAN_HPP_NOEXCEPT - { - negativeOneToOne = negativeOneToOne_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportDepthClipControlCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportDepthClipControlCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, negativeOneToOne ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportDepthClipControlCreateInfoEXT const & ) const = default; -#else - bool operator==( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( negativeOneToOne == rhs.negativeOneToOne ); -# endif - } - - bool operator!=( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportDepthClipControlCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportDepthClipControlCreateInfoEXT; - }; - - struct PipelineViewportExclusiveScissorStateCreateInfoNV - { - using NativeType = VkPipelineViewportExclusiveScissorStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = {}, - const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , exclusiveScissorCount( exclusiveScissorCount_ ) - , pExclusiveScissors( pExclusiveScissors_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineViewportExclusiveScissorStateCreateInfoNV( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportExclusiveScissorStateCreateInfoNV( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportExclusiveScissorStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportExclusiveScissorStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & exclusiveScissors_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), exclusiveScissorCount( static_cast( exclusiveScissors_.size() ) ), pExclusiveScissors( exclusiveScissors_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportExclusiveScissorStateCreateInfoNV & - operator=( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportExclusiveScissorStateCreateInfoNV & operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & setExclusiveScissorCount( uint32_t exclusiveScissorCount_ ) VULKAN_HPP_NOEXCEPT - { - exclusiveScissorCount = exclusiveScissorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & - setPExclusiveScissors( const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors_ ) VULKAN_HPP_NOEXCEPT - { - pExclusiveScissors = pExclusiveScissors_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportExclusiveScissorStateCreateInfoNV & - setExclusiveScissors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & exclusiveScissors_ ) VULKAN_HPP_NOEXCEPT - { - exclusiveScissorCount = static_cast( exclusiveScissors_.size() ); - pExclusiveScissors = exclusiveScissors_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportExclusiveScissorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportExclusiveScissorStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, exclusiveScissorCount, pExclusiveScissors ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportExclusiveScissorStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exclusiveScissorCount == rhs.exclusiveScissorCount ) && - ( pExclusiveScissors == rhs.pExclusiveScissors ); -# endif - } - - bool operator!=( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV; - const void * pNext = {}; - uint32_t exclusiveScissorCount = {}; - const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportExclusiveScissorStateCreateInfoNV; - }; - - struct ShadingRatePaletteNV - { - using NativeType = VkShadingRatePaletteNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( uint32_t shadingRatePaletteEntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries_ = {} ) VULKAN_HPP_NOEXCEPT - : shadingRatePaletteEntryCount( shadingRatePaletteEntryCount_ ) - , pShadingRatePaletteEntries( pShadingRatePaletteEntries_ ) - { - } - - VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( ShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShadingRatePaletteNV( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT - : ShadingRatePaletteNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ShadingRatePaletteNV( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePaletteEntries_ ) - : shadingRatePaletteEntryCount( static_cast( shadingRatePaletteEntries_.size() ) ) - , pShadingRatePaletteEntries( shadingRatePaletteEntries_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShadingRatePaletteNV & operator=( ShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShadingRatePaletteNV & operator=( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ShadingRatePaletteNV & setShadingRatePaletteEntryCount( uint32_t shadingRatePaletteEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - shadingRatePaletteEntryCount = shadingRatePaletteEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ShadingRatePaletteNV & - setPShadingRatePaletteEntries( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT - { - pShadingRatePaletteEntries = pShadingRatePaletteEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ShadingRatePaletteNV & setShadingRatePaletteEntries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePaletteEntries_ ) - VULKAN_HPP_NOEXCEPT - { - shadingRatePaletteEntryCount = static_cast( shadingRatePaletteEntries_.size() ); - pShadingRatePaletteEntries = shadingRatePaletteEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkShadingRatePaletteNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShadingRatePaletteNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( shadingRatePaletteEntryCount, pShadingRatePaletteEntries ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShadingRatePaletteNV const & ) const = default; -#else - bool operator==( ShadingRatePaletteNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( shadingRatePaletteEntryCount == rhs.shadingRatePaletteEntryCount ) && ( pShadingRatePaletteEntries == rhs.pShadingRatePaletteEntries ); -# endif - } - - bool operator!=( ShadingRatePaletteNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t shadingRatePaletteEntryCount = {}; - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries = {}; - }; - - struct PipelineViewportShadingRateImageStateCreateInfoNV - { - using NativeType = VkPipelineViewportShadingRateImageStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ = {}, - uint32_t viewportCount_ = {}, - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , shadingRateImageEnable( shadingRateImageEnable_ ) - , viewportCount( viewportCount_ ) - , pShadingRatePalettes( pShadingRatePalettes_ ) - { - } - - VULKAN_HPP_CONSTEXPR - PipelineViewportShadingRateImageStateCreateInfoNV( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportShadingRateImageStateCreateInfoNV( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportShadingRateImageStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportShadingRateImageStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePalettes_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , shadingRateImageEnable( shadingRateImageEnable_ ) - , viewportCount( static_cast( shadingRatePalettes_.size() ) ) - , pShadingRatePalettes( shadingRatePalettes_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportShadingRateImageStateCreateInfoNV & - operator=( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportShadingRateImageStateCreateInfoNV & operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & - setShadingRateImageEnable( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateImageEnable = shadingRateImageEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = viewportCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & - setPShadingRatePalettes( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT - { - pShadingRatePalettes = pShadingRatePalettes_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRatePalettes( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = static_cast( shadingRatePalettes_.size() ); - pShadingRatePalettes = shadingRatePalettes_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportShadingRateImageStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportShadingRateImageStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, shadingRateImageEnable, viewportCount, pShadingRatePalettes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportShadingRateImageStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateImageEnable == rhs.shadingRateImageEnable ) && - ( viewportCount == rhs.viewportCount ) && ( pShadingRatePalettes == rhs.pShadingRatePalettes ); -# endif - } - - bool operator!=( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable = {}; - uint32_t viewportCount = {}; - const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportShadingRateImageStateCreateInfoNV; - }; - - struct ViewportSwizzleNV - { - using NativeType = VkViewportSwizzleNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ViewportSwizzleNV( - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX ) VULKAN_HPP_NOEXCEPT - : x( x_ ) - , y( y_ ) - , z( z_ ) - , w( w_ ) - { - } - - VULKAN_HPP_CONSTEXPR ViewportSwizzleNV( ViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViewportSwizzleNV( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT : ViewportSwizzleNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ViewportSwizzleNV & operator=( ViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViewportSwizzleNV & operator=( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setX( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ ) VULKAN_HPP_NOEXCEPT - { - x = x_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setY( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y_ ) VULKAN_HPP_NOEXCEPT - { - y = y_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setZ( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z_ ) VULKAN_HPP_NOEXCEPT - { - z = z_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setW( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w_ ) VULKAN_HPP_NOEXCEPT - { - w = w_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkViewportSwizzleNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkViewportSwizzleNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( x, y, z, w ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ViewportSwizzleNV const & ) const = default; -#else - bool operator==( ViewportSwizzleNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ) && ( w == rhs.w ); -# endif - } - - bool operator!=( ViewportSwizzleNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; - VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; - }; - - struct PipelineViewportSwizzleStateCreateInfoNV - { - using NativeType = VkPipelineViewportSwizzleStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ = {}, - uint32_t viewportCount_ = {}, - const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , viewportCount( viewportCount_ ) - , pViewportSwizzles( pViewportSwizzles_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportSwizzleStateCreateInfoNV( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportSwizzleStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportSwizzleStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportSwizzles_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), viewportCount( static_cast( viewportSwizzles_.size() ) ), pViewportSwizzles( viewportSwizzles_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportSwizzleStateCreateInfoNV & operator=( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportSwizzleStateCreateInfoNV & operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & - setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = viewportCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & - setPViewportSwizzles( const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles_ ) VULKAN_HPP_NOEXCEPT - { - pViewportSwizzles = pViewportSwizzles_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportSwizzleStateCreateInfoNV & setViewportSwizzles( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportSwizzles_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = static_cast( viewportSwizzles_.size() ); - pViewportSwizzles = viewportSwizzles_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportSwizzleStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportSwizzleStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, viewportCount, pViewportSwizzles ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportSwizzleStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewportCount == rhs.viewportCount ) && - ( pViewportSwizzles == rhs.pViewportSwizzles ); -# endif - } - - bool operator!=( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags = {}; - uint32_t viewportCount = {}; - const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportSwizzleStateCreateInfoNV; - }; - - struct ViewportWScalingNV - { - using NativeType = VkViewportWScalingNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ViewportWScalingNV( float xcoeff_ = {}, float ycoeff_ = {} ) VULKAN_HPP_NOEXCEPT - : xcoeff( xcoeff_ ) - , ycoeff( ycoeff_ ) - { - } - - VULKAN_HPP_CONSTEXPR ViewportWScalingNV( ViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViewportWScalingNV( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT : ViewportWScalingNV( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ViewportWScalingNV & operator=( ViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViewportWScalingNV & operator=( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ViewportWScalingNV & setXcoeff( float xcoeff_ ) VULKAN_HPP_NOEXCEPT - { - xcoeff = xcoeff_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViewportWScalingNV & setYcoeff( float ycoeff_ ) VULKAN_HPP_NOEXCEPT - { - ycoeff = ycoeff_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkViewportWScalingNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkViewportWScalingNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( xcoeff, ycoeff ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ViewportWScalingNV const & ) const = default; -#else - bool operator==( ViewportWScalingNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( xcoeff == rhs.xcoeff ) && ( ycoeff == rhs.ycoeff ); -# endif - } - - bool operator!=( ViewportWScalingNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - float xcoeff = {}; - float ycoeff = {}; - }; - - struct PipelineViewportWScalingStateCreateInfoNV - { - using NativeType = VkPipelineViewportWScalingStateCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ = {}, - uint32_t viewportCount_ = {}, - const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , viewportWScalingEnable( viewportWScalingEnable_ ) - , viewportCount( viewportCount_ ) - , pViewportWScalings( pViewportWScalings_ ) - { - } - - VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( PipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportWScalingStateCreateInfoNV( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : PipelineViewportWScalingStateCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportWScalingStateCreateInfoNV( - VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportWScalings_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , viewportWScalingEnable( viewportWScalingEnable_ ) - , viewportCount( static_cast( viewportWScalings_.size() ) ) - , pViewportWScalings( viewportWScalings_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PipelineViewportWScalingStateCreateInfoNV & operator=( PipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PipelineViewportWScalingStateCreateInfoNV & operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & - setViewportWScalingEnable( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ ) VULKAN_HPP_NOEXCEPT - { - viewportWScalingEnable = viewportWScalingEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = viewportCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & - setPViewportWScalings( const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings_ ) VULKAN_HPP_NOEXCEPT - { - pViewportWScalings = pViewportWScalings_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PipelineViewportWScalingStateCreateInfoNV & setViewportWScalings( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportWScalings_ ) VULKAN_HPP_NOEXCEPT - { - viewportCount = static_cast( viewportWScalings_.size() ); - pViewportWScalings = viewportWScalings_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPipelineViewportWScalingStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPipelineViewportWScalingStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, viewportWScalingEnable, viewportCount, pViewportWScalings ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PipelineViewportWScalingStateCreateInfoNV const & ) const = default; -#else - bool operator==( PipelineViewportWScalingStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewportWScalingEnable == rhs.viewportWScalingEnable ) && - ( viewportCount == rhs.viewportCount ) && ( pViewportWScalings == rhs.pViewportWScalings ); -# endif - } - - bool operator!=( PipelineViewportWScalingStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable = {}; - uint32_t viewportCount = {}; - const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings = {}; - }; - - template <> - struct CppType - { - using Type = PipelineViewportWScalingStateCreateInfoNV; - }; - -#if defined( VK_USE_PLATFORM_GGP ) - struct PresentFrameTokenGGP - { - using NativeType = VkPresentFrameTokenGGP; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentFrameTokenGGP; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( GgpFrameToken frameToken_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , frameToken( frameToken_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( PresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentFrameTokenGGP( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT - : PresentFrameTokenGGP( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentFrameTokenGGP & operator=( PresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentFrameTokenGGP & operator=( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentFrameTokenGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentFrameTokenGGP & setFrameToken( GgpFrameToken frameToken_ ) VULKAN_HPP_NOEXCEPT - { - frameToken = frameToken_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentFrameTokenGGP const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentFrameTokenGGP &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, frameToken ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &frameToken, &rhs.frameToken, sizeof( GgpFrameToken ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &frameToken, &rhs.frameToken, sizeof( GgpFrameToken ) ) == 0 ); - } - - bool operator!=( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentFrameTokenGGP; - const void * pNext = {}; - GgpFrameToken frameToken = {}; - }; - - template <> - struct CppType - { - using Type = PresentFrameTokenGGP; - }; -#endif /*VK_USE_PLATFORM_GGP*/ - - struct PresentIdKHR - { - using NativeType = VkPresentIdKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentIdKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentIdKHR( uint32_t swapchainCount_ = {}, const uint64_t * pPresentIds_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchainCount( swapchainCount_ ) - , pPresentIds( pPresentIds_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentIdKHR( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentIdKHR( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentIdKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentIdKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentIds_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), swapchainCount( static_cast( presentIds_.size() ) ), pPresentIds( presentIds_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentIdKHR & operator=( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentIdKHR & operator=( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = swapchainCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setPPresentIds( const uint64_t * pPresentIds_ ) VULKAN_HPP_NOEXCEPT - { - pPresentIds = pPresentIds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentIdKHR & setPresentIds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentIds_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( presentIds_.size() ); - pPresentIds = presentIds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentIdKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentIdKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchainCount, pPresentIds ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentIdKHR const & ) const = default; -#else - bool operator==( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pPresentIds == rhs.pPresentIds ); -# endif - } - - bool operator!=( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentIdKHR; - const void * pNext = {}; - uint32_t swapchainCount = {}; - const uint64_t * pPresentIds = {}; - }; - - template <> - struct CppType - { - using Type = PresentIdKHR; - }; - - struct PresentInfoKHR - { - using NativeType = VkPresentInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentInfoKHR( uint32_t waitSemaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, - uint32_t swapchainCount_ = {}, - const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains_ = {}, - const uint32_t * pImageIndices_ = {}, - VULKAN_HPP_NAMESPACE::Result * pResults_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreCount( waitSemaphoreCount_ ) - , pWaitSemaphores( pWaitSemaphores_ ) - , swapchainCount( swapchainCount_ ) - , pSwapchains( pSwapchains_ ) - , pImageIndices( pImageIndices_ ) - , pResults( pResults_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentInfoKHR( PresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentInfoKHR( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentInfoKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & swapchains_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & results_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) - , pWaitSemaphores( waitSemaphores_.data() ) - , swapchainCount( static_cast( swapchains_.size() ) ) - , pSwapchains( swapchains_.data() ) - , pImageIndices( imageIndices_.data() ) - , pResults( results_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( swapchains_.size() == imageIndices_.size() ); - VULKAN_HPP_ASSERT( results_.empty() || ( swapchains_.size() == results_.size() ) ); - VULKAN_HPP_ASSERT( results_.empty() || ( imageIndices_.size() == results_.size() ) ); -# else - if ( swapchains_.size() != imageIndices_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: swapchains_.size() != imageIndices_.size()" ); - } - if ( !results_.empty() && ( swapchains_.size() != results_.size() ) ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( swapchains_.size() != results_.size() )" ); - } - if ( !results_.empty() && ( imageIndices_.size() != results_.size() ) ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( imageIndices_.size() != results_.size() )" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentInfoKHR & operator=( PresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentInfoKHR & operator=( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = waitSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphores = pWaitSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentInfoKHR & - setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = static_cast( waitSemaphores_.size() ); - pWaitSemaphores = waitSemaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = swapchainCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPSwapchains( const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains_ ) VULKAN_HPP_NOEXCEPT - { - pSwapchains = pSwapchains_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentInfoKHR & - setSwapchains( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & swapchains_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( swapchains_.size() ); - pSwapchains = swapchains_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPImageIndices( const uint32_t * pImageIndices_ ) VULKAN_HPP_NOEXCEPT - { - pImageIndices = pImageIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentInfoKHR & setImageIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( imageIndices_.size() ); - pImageIndices = imageIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPResults( VULKAN_HPP_NAMESPACE::Result * pResults_ ) VULKAN_HPP_NOEXCEPT - { - pResults = pResults_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentInfoKHR & setResults( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & results_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( results_.size() ); - pResults = results_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, waitSemaphoreCount, pWaitSemaphores, swapchainCount, pSwapchains, pImageIndices, pResults ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentInfoKHR const & ) const = default; -#else - bool operator==( PresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && - ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( swapchainCount == rhs.swapchainCount ) && ( pSwapchains == rhs.pSwapchains ) && - ( pImageIndices == rhs.pImageIndices ) && ( pResults == rhs.pResults ); -# endif - } - - bool operator!=( PresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentInfoKHR; - const void * pNext = {}; - uint32_t waitSemaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; - uint32_t swapchainCount = {}; - const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains = {}; - const uint32_t * pImageIndices = {}; - VULKAN_HPP_NAMESPACE::Result * pResults = {}; - }; - - template <> - struct CppType - { - using Type = PresentInfoKHR; - }; - - struct RectLayerKHR - { - using NativeType = VkRectLayerKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - RectLayerKHR( VULKAN_HPP_NAMESPACE::Offset2D offset_ = {}, VULKAN_HPP_NAMESPACE::Extent2D extent_ = {}, uint32_t layer_ = {} ) VULKAN_HPP_NOEXCEPT - : offset( offset_ ) - , extent( extent_ ) - , layer( layer_ ) - { - } - - VULKAN_HPP_CONSTEXPR RectLayerKHR( RectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RectLayerKHR( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RectLayerKHR( *reinterpret_cast( &rhs ) ) {} - - explicit RectLayerKHR( Rect2D const & rect2D, uint32_t layer_ = {} ) : offset( rect2D.offset ), extent( rect2D.extent ), layer( layer_ ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RectLayerKHR & operator=( RectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RectLayerKHR & operator=( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setExtent( VULKAN_HPP_NAMESPACE::Extent2D const & extent_ ) VULKAN_HPP_NOEXCEPT - { - extent = extent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setLayer( uint32_t layer_ ) VULKAN_HPP_NOEXCEPT - { - layer = layer_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRectLayerKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRectLayerKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( offset, extent, layer ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RectLayerKHR const & ) const = default; -#else - bool operator==( RectLayerKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( offset == rhs.offset ) && ( extent == rhs.extent ) && ( layer == rhs.layer ); -# endif - } - - bool operator!=( RectLayerKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Offset2D offset = {}; - VULKAN_HPP_NAMESPACE::Extent2D extent = {}; - uint32_t layer = {}; - }; - - struct PresentRegionKHR - { - using NativeType = VkPresentRegionKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentRegionKHR( uint32_t rectangleCount_ = {}, const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles_ = {} ) VULKAN_HPP_NOEXCEPT - : rectangleCount( rectangleCount_ ) - , pRectangles( pRectangles_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentRegionKHR( PresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentRegionKHR( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentRegionKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentRegionKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & rectangles_ ) - : rectangleCount( static_cast( rectangles_.size() ) ), pRectangles( rectangles_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentRegionKHR & operator=( PresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentRegionKHR & operator=( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentRegionKHR & setRectangleCount( uint32_t rectangleCount_ ) VULKAN_HPP_NOEXCEPT - { - rectangleCount = rectangleCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentRegionKHR & setPRectangles( const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles_ ) VULKAN_HPP_NOEXCEPT - { - pRectangles = pRectangles_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentRegionKHR & - setRectangles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & rectangles_ ) VULKAN_HPP_NOEXCEPT - { - rectangleCount = static_cast( rectangles_.size() ); - pRectangles = rectangles_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentRegionKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentRegionKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( rectangleCount, pRectangles ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentRegionKHR const & ) const = default; -#else - bool operator==( PresentRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( rectangleCount == rhs.rectangleCount ) && ( pRectangles == rhs.pRectangles ); -# endif - } - - bool operator!=( PresentRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t rectangleCount = {}; - const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles = {}; - }; - - struct PresentRegionsKHR - { - using NativeType = VkPresentRegionsKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentRegionsKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentRegionsKHR( uint32_t swapchainCount_ = {}, - const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchainCount( swapchainCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentRegionsKHR( PresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentRegionsKHR( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentRegionsKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentRegionsKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), swapchainCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentRegionsKHR & operator=( PresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentRegionsKHR & operator=( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = swapchainCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setPRegions( const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentRegionsKHR & - setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentRegionsKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentRegionsKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchainCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentRegionsKHR const & ) const = default; -#else - bool operator==( PresentRegionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( PresentRegionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentRegionsKHR; - const void * pNext = {}; - uint32_t swapchainCount = {}; - const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = PresentRegionsKHR; - }; - - struct PresentTimeGOOGLE - { - using NativeType = VkPresentTimeGOOGLE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( uint32_t presentID_ = {}, uint64_t desiredPresentTime_ = {} ) VULKAN_HPP_NOEXCEPT - : presentID( presentID_ ) - , desiredPresentTime( desiredPresentTime_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( PresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentTimeGOOGLE( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT : PresentTimeGOOGLE( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentTimeGOOGLE & operator=( PresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentTimeGOOGLE & operator=( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentTimeGOOGLE & setPresentID( uint32_t presentID_ ) VULKAN_HPP_NOEXCEPT - { - presentID = presentID_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentTimeGOOGLE & setDesiredPresentTime( uint64_t desiredPresentTime_ ) VULKAN_HPP_NOEXCEPT - { - desiredPresentTime = desiredPresentTime_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentTimeGOOGLE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentTimeGOOGLE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( presentID, desiredPresentTime ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentTimeGOOGLE const & ) const = default; -#else - bool operator==( PresentTimeGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( presentID == rhs.presentID ) && ( desiredPresentTime == rhs.desiredPresentTime ); -# endif - } - - bool operator!=( PresentTimeGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t presentID = {}; - uint64_t desiredPresentTime = {}; - }; - - struct PresentTimesInfoGOOGLE - { - using NativeType = VkPresentTimesInfoGOOGLE; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentTimesInfoGOOGLE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = {}, - const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , swapchainCount( swapchainCount_ ) - , pTimes( pTimes_ ) - { - } - - VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( PresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentTimesInfoGOOGLE( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - : PresentTimesInfoGOOGLE( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentTimesInfoGOOGLE( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & times_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), swapchainCount( static_cast( times_.size() ) ), pTimes( times_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PresentTimesInfoGOOGLE & operator=( PresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PresentTimesInfoGOOGLE & operator=( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = swapchainCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setPTimes( const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes_ ) VULKAN_HPP_NOEXCEPT - { - pTimes = pTimes_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - PresentTimesInfoGOOGLE & - setTimes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & times_ ) VULKAN_HPP_NOEXCEPT - { - swapchainCount = static_cast( times_.size() ); - pTimes = times_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPresentTimesInfoGOOGLE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPresentTimesInfoGOOGLE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, swapchainCount, pTimes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PresentTimesInfoGOOGLE const & ) const = default; -#else - bool operator==( PresentTimesInfoGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pTimes == rhs.pTimes ); -# endif - } - - bool operator!=( PresentTimesInfoGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentTimesInfoGOOGLE; - const void * pNext = {}; - uint32_t swapchainCount = {}; - const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes = {}; - }; - - template <> - struct CppType - { - using Type = PresentTimesInfoGOOGLE; - }; - - struct PrivateDataSlotCreateInfo - { - using NativeType = VkPrivateDataSlotCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePrivateDataSlotCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR PrivateDataSlotCreateInfo( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR PrivateDataSlotCreateInfo( PrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PrivateDataSlotCreateInfo( VkPrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : PrivateDataSlotCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - PrivateDataSlotCreateInfo & operator=( PrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - PrivateDataSlotCreateInfo & operator=( VkPrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 PrivateDataSlotCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 PrivateDataSlotCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkPrivateDataSlotCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkPrivateDataSlotCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( PrivateDataSlotCreateInfo const & ) const = default; -#else - bool operator==( PrivateDataSlotCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( PrivateDataSlotCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePrivateDataSlotCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags = {}; - }; - - template <> - struct CppType - { - using Type = PrivateDataSlotCreateInfo; - }; - using PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; - - struct ProtectedSubmitInfo - { - using NativeType = VkProtectedSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eProtectedSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , protectedSubmit( protectedSubmit_ ) - { - } - - VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( ProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ProtectedSubmitInfo( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ProtectedSubmitInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ProtectedSubmitInfo & operator=( ProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ProtectedSubmitInfo & operator=( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ProtectedSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ProtectedSubmitInfo & setProtectedSubmit( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ ) VULKAN_HPP_NOEXCEPT - { - protectedSubmit = protectedSubmit_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkProtectedSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkProtectedSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, protectedSubmit ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ProtectedSubmitInfo const & ) const = default; -#else - bool operator==( ProtectedSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedSubmit == rhs.protectedSubmit ); -# endif - } - - bool operator!=( ProtectedSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eProtectedSubmitInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit = {}; - }; - - template <> - struct CppType - { - using Type = ProtectedSubmitInfo; - }; - - struct QueryPoolCreateInfo - { - using NativeType = VkQueryPoolCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::QueryType queryType_ = VULKAN_HPP_NAMESPACE::QueryType::eOcclusion, - uint32_t queryCount_ = {}, - VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , queryType( queryType_ ) - , queryCount( queryCount_ ) - , pipelineStatistics( pipelineStatistics_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( QueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolCreateInfo( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : QueryPoolCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueryPoolCreateInfo & operator=( QueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolCreateInfo & operator=( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setQueryType( VULKAN_HPP_NAMESPACE::QueryType queryType_ ) VULKAN_HPP_NOEXCEPT - { - queryType = queryType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setQueryCount( uint32_t queryCount_ ) VULKAN_HPP_NOEXCEPT - { - queryCount = queryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & - setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT - { - pipelineStatistics = pipelineStatistics_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueryPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueryPoolCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, queryType, queryCount, pipelineStatistics ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPoolCreateInfo const & ) const = default; -#else - bool operator==( QueryPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queryType == rhs.queryType ) && ( queryCount == rhs.queryCount ) && - ( pipelineStatistics == rhs.pipelineStatistics ); -# endif - } - - bool operator!=( QueryPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::QueryType queryType = VULKAN_HPP_NAMESPACE::QueryType::eOcclusion; - uint32_t queryCount = {}; - VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics = {}; - }; - - template <> - struct CppType - { - using Type = QueryPoolCreateInfo; - }; - - struct QueryPoolPerformanceCreateInfoKHR - { - using NativeType = VkQueryPoolPerformanceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolPerformanceCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueryPoolPerformanceCreateInfoKHR( uint32_t queueFamilyIndex_ = {}, - uint32_t counterIndexCount_ = {}, - const uint32_t * pCounterIndices_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , counterIndexCount( counterIndexCount_ ) - , pCounterIndices( pCounterIndices_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueryPoolPerformanceCreateInfoKHR( QueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolPerformanceCreateInfoKHR( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : QueryPoolPerformanceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - QueryPoolPerformanceCreateInfoKHR( uint32_t queueFamilyIndex_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & counterIndices_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , counterIndexCount( static_cast( counterIndices_.size() ) ) - , pCounterIndices( counterIndices_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueryPoolPerformanceCreateInfoKHR & operator=( QueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolPerformanceCreateInfoKHR & operator=( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndex = queueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setCounterIndexCount( uint32_t counterIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - counterIndexCount = counterIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setPCounterIndices( const uint32_t * pCounterIndices_ ) VULKAN_HPP_NOEXCEPT - { - pCounterIndices = pCounterIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - QueryPoolPerformanceCreateInfoKHR & - setCounterIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & counterIndices_ ) VULKAN_HPP_NOEXCEPT - { - counterIndexCount = static_cast( counterIndices_.size() ); - pCounterIndices = counterIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueryPoolPerformanceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueryPoolPerformanceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, queueFamilyIndex, counterIndexCount, pCounterIndices ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPoolPerformanceCreateInfoKHR const & ) const = default; -#else - bool operator==( QueryPoolPerformanceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && - ( counterIndexCount == rhs.counterIndexCount ) && ( pCounterIndices == rhs.pCounterIndices ); -# endif - } - - bool operator!=( QueryPoolPerformanceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolPerformanceCreateInfoKHR; - const void * pNext = {}; - uint32_t queueFamilyIndex = {}; - uint32_t counterIndexCount = {}; - const uint32_t * pCounterIndices = {}; - }; - - template <> - struct CppType - { - using Type = QueryPoolPerformanceCreateInfoKHR; - }; - - struct QueryPoolPerformanceQueryCreateInfoINTEL - { - using NativeType = VkQueryPoolPerformanceQueryCreateInfoINTEL; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueryPoolPerformanceQueryCreateInfoINTEL( - VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , performanceCountersSampling( performanceCountersSampling_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueryPoolPerformanceQueryCreateInfoINTEL( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolPerformanceQueryCreateInfoINTEL( VkQueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - : QueryPoolPerformanceQueryCreateInfoINTEL( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueryPoolPerformanceQueryCreateInfoINTEL & operator=( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueryPoolPerformanceQueryCreateInfoINTEL & operator=( VkQueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceQueryCreateInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceQueryCreateInfoINTEL & - setPerformanceCountersSampling( VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ ) VULKAN_HPP_NOEXCEPT - { - performanceCountersSampling = performanceCountersSampling_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueryPoolPerformanceQueryCreateInfoINTEL const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueryPoolPerformanceQueryCreateInfoINTEL &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, performanceCountersSampling ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueryPoolPerformanceQueryCreateInfoINTEL const & ) const = default; -#else - bool operator==( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( performanceCountersSampling == rhs.performanceCountersSampling ); -# endif - } - - bool operator!=( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual; - }; - - template <> - struct CppType - { - using Type = QueryPoolPerformanceQueryCreateInfoINTEL; - }; - using QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; - - struct QueueFamilyCheckpointProperties2NV - { - using NativeType = VkQueueFamilyCheckpointProperties2NV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyCheckpointProperties2NV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 checkpointExecutionStageMask_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , checkpointExecutionStageMask( checkpointExecutionStageMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV( QueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyCheckpointProperties2NV( VkQueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyCheckpointProperties2NV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyCheckpointProperties2NV & operator=( QueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyCheckpointProperties2NV & operator=( VkQueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkQueueFamilyCheckpointProperties2NV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyCheckpointProperties2NV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, checkpointExecutionStageMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyCheckpointProperties2NV const & ) const = default; -#else - bool operator==( QueueFamilyCheckpointProperties2NV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( checkpointExecutionStageMask == rhs.checkpointExecutionStageMask ); -# endif - } - - bool operator!=( QueueFamilyCheckpointProperties2NV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointProperties2NV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 checkpointExecutionStageMask = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyCheckpointProperties2NV; - }; - - struct QueueFamilyCheckpointPropertiesNV - { - using NativeType = VkQueueFamilyCheckpointPropertiesNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyCheckpointPropertiesNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointPropertiesNV( VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , checkpointExecutionStageMask( checkpointExecutionStageMask_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointPropertiesNV( QueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyCheckpointPropertiesNV( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyCheckpointPropertiesNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyCheckpointPropertiesNV & operator=( QueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyCheckpointPropertiesNV & operator=( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkQueueFamilyCheckpointPropertiesNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyCheckpointPropertiesNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, checkpointExecutionStageMask ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyCheckpointPropertiesNV const & ) const = default; -#else - bool operator==( QueueFamilyCheckpointPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( checkpointExecutionStageMask == rhs.checkpointExecutionStageMask ); -# endif - } - - bool operator!=( QueueFamilyCheckpointPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointPropertiesNV; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyCheckpointPropertiesNV; - }; - - struct QueueFamilyGlobalPriorityPropertiesKHR - { - using NativeType = VkQueueFamilyGlobalPriorityPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyGlobalPriorityPropertiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - QueueFamilyGlobalPriorityPropertiesKHR( uint32_t priorityCount_ = {}, - std::array const & - priorities_ = { { VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow, - VULKAN_HPP_NAMESPACE::QueueGlobalPriorityKHR::eLow } }, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , priorityCount( priorityCount_ ) - , priorities( priorities_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityPropertiesKHR( QueueFamilyGlobalPriorityPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyGlobalPriorityPropertiesKHR( VkQueueFamilyGlobalPriorityPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyGlobalPriorityPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyGlobalPriorityPropertiesKHR & operator=( QueueFamilyGlobalPriorityPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyGlobalPriorityPropertiesKHR & operator=( VkQueueFamilyGlobalPriorityPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityPropertiesKHR & setPriorityCount( uint32_t priorityCount_ ) VULKAN_HPP_NOEXCEPT - { - priorityCount = priorityCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityPropertiesKHR & - setPriorities( std::array priorities_ ) VULKAN_HPP_NOEXCEPT - { - priorities = priorities_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueueFamilyGlobalPriorityPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyGlobalPriorityPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, priorityCount, priorities ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyGlobalPriorityPropertiesKHR const & ) const = default; -#else - bool operator==( QueueFamilyGlobalPriorityPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( priorityCount == rhs.priorityCount ) && ( priorities == rhs.priorities ); -# endif - } - - bool operator!=( QueueFamilyGlobalPriorityPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyGlobalPriorityPropertiesKHR; - void * pNext = {}; - uint32_t priorityCount = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D priorities = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyGlobalPriorityPropertiesKHR; - }; - using QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityPropertiesKHR; - - struct QueueFamilyProperties - { - using NativeType = VkQueueFamilyProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyProperties( VULKAN_HPP_NAMESPACE::QueueFlags queueFlags_ = {}, - uint32_t queueCount_ = {}, - uint32_t timestampValidBits_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D minImageTransferGranularity_ = {} ) VULKAN_HPP_NOEXCEPT - : queueFlags( queueFlags_ ) - , queueCount( queueCount_ ) - , timestampValidBits( timestampValidBits_ ) - , minImageTransferGranularity( minImageTransferGranularity_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyProperties( QueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyProperties( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyProperties & operator=( QueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyProperties & operator=( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkQueueFamilyProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( queueFlags, queueCount, timestampValidBits, minImageTransferGranularity ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyProperties const & ) const = default; -#else - bool operator==( QueueFamilyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( queueFlags == rhs.queueFlags ) && ( queueCount == rhs.queueCount ) && ( timestampValidBits == rhs.timestampValidBits ) && - ( minImageTransferGranularity == rhs.minImageTransferGranularity ); -# endif - } - - bool operator!=( QueueFamilyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::QueueFlags queueFlags = {}; - uint32_t queueCount = {}; - uint32_t timestampValidBits = {}; - VULKAN_HPP_NAMESPACE::Extent3D minImageTransferGranularity = {}; - }; - - struct QueueFamilyProperties2 - { - using NativeType = VkQueueFamilyProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyProperties2( VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , queueFamilyProperties( queueFamilyProperties_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyProperties2( QueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyProperties2( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyProperties2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyProperties2 & operator=( QueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyProperties2 & operator=( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkQueueFamilyProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, queueFamilyProperties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyProperties2 const & ) const = default; -#else - bool operator==( QueueFamilyProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyProperties == rhs.queueFamilyProperties ); -# endif - } - - bool operator!=( QueueFamilyProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyProperties2; - }; - using QueueFamilyProperties2KHR = QueueFamilyProperties2; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct QueueFamilyQueryResultStatusPropertiesKHR - { - using NativeType = VkQueueFamilyQueryResultStatusPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyQueryResultStatusPropertiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyQueryResultStatusPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 queryResultStatusSupport_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , queryResultStatusSupport( queryResultStatusSupport_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyQueryResultStatusPropertiesKHR( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyQueryResultStatusPropertiesKHR( VkQueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyQueryResultStatusPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyQueryResultStatusPropertiesKHR & operator=( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyQueryResultStatusPropertiesKHR & operator=( VkQueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueueFamilyQueryResultStatusPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueueFamilyQueryResultStatusPropertiesKHR & - setQueryResultStatusSupport( VULKAN_HPP_NAMESPACE::Bool32 queryResultStatusSupport_ ) VULKAN_HPP_NOEXCEPT - { - queryResultStatusSupport = queryResultStatusSupport_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueueFamilyQueryResultStatusPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyQueryResultStatusPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, queryResultStatusSupport ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyQueryResultStatusPropertiesKHR const & ) const = default; -# else - bool operator==( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queryResultStatusSupport == rhs.queryResultStatusSupport ); -# endif - } - - bool operator!=( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyQueryResultStatusPropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 queryResultStatusSupport = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyQueryResultStatusPropertiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct QueueFamilyVideoPropertiesKHR - { - using NativeType = VkQueueFamilyVideoPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyVideoPropertiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR QueueFamilyVideoPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagsKHR videoCodecOperations_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , videoCodecOperations( videoCodecOperations_ ) - { - } - - VULKAN_HPP_CONSTEXPR QueueFamilyVideoPropertiesKHR( QueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyVideoPropertiesKHR( VkQueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : QueueFamilyVideoPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - QueueFamilyVideoPropertiesKHR & operator=( QueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - QueueFamilyVideoPropertiesKHR & operator=( VkQueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 QueueFamilyVideoPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 QueueFamilyVideoPropertiesKHR & - setVideoCodecOperations( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagsKHR videoCodecOperations_ ) VULKAN_HPP_NOEXCEPT - { - videoCodecOperations = videoCodecOperations_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkQueueFamilyVideoPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkQueueFamilyVideoPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, videoCodecOperations ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( QueueFamilyVideoPropertiesKHR const & ) const = default; -# else - bool operator==( QueueFamilyVideoPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoCodecOperations == rhs.videoCodecOperations ); -# endif - } - - bool operator!=( QueueFamilyVideoPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyVideoPropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagsKHR videoCodecOperations = {}; - }; - - template <> - struct CppType - { - using Type = QueueFamilyVideoPropertiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - struct RayTracingShaderGroupCreateInfoKHR - { - using NativeType = VkRayTracingShaderGroupCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingShaderGroupCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoKHR( - VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral, - uint32_t generalShader_ = {}, - uint32_t closestHitShader_ = {}, - uint32_t anyHitShader_ = {}, - uint32_t intersectionShader_ = {}, - const void * pShaderGroupCaptureReplayHandle_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , generalShader( generalShader_ ) - , closestHitShader( closestHitShader_ ) - , anyHitShader( anyHitShader_ ) - , intersectionShader( intersectionShader_ ) - , pShaderGroupCaptureReplayHandle( pShaderGroupCaptureReplayHandle_ ) - { - } - - VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoKHR( RayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingShaderGroupCreateInfoKHR( VkRayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : RayTracingShaderGroupCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RayTracingShaderGroupCreateInfoKHR & operator=( RayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingShaderGroupCreateInfoKHR & operator=( VkRayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setType( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setGeneralShader( uint32_t generalShader_ ) VULKAN_HPP_NOEXCEPT - { - generalShader = generalShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setClosestHitShader( uint32_t closestHitShader_ ) VULKAN_HPP_NOEXCEPT - { - closestHitShader = closestHitShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setAnyHitShader( uint32_t anyHitShader_ ) VULKAN_HPP_NOEXCEPT - { - anyHitShader = anyHitShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setIntersectionShader( uint32_t intersectionShader_ ) VULKAN_HPP_NOEXCEPT - { - intersectionShader = intersectionShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & - setPShaderGroupCaptureReplayHandle( const void * pShaderGroupCaptureReplayHandle_ ) VULKAN_HPP_NOEXCEPT - { - pShaderGroupCaptureReplayHandle = pShaderGroupCaptureReplayHandle_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRayTracingShaderGroupCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRayTracingShaderGroupCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type, generalShader, closestHitShader, anyHitShader, intersectionShader, pShaderGroupCaptureReplayHandle ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RayTracingShaderGroupCreateInfoKHR const & ) const = default; -#else - bool operator==( RayTracingShaderGroupCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( generalShader == rhs.generalShader ) && - ( closestHitShader == rhs.closestHitShader ) && ( anyHitShader == rhs.anyHitShader ) && ( intersectionShader == rhs.intersectionShader ) && - ( pShaderGroupCaptureReplayHandle == rhs.pShaderGroupCaptureReplayHandle ); -# endif - } - - bool operator!=( RayTracingShaderGroupCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral; - uint32_t generalShader = {}; - uint32_t closestHitShader = {}; - uint32_t anyHitShader = {}; - uint32_t intersectionShader = {}; - const void * pShaderGroupCaptureReplayHandle = {}; - }; - - template <> - struct CppType - { - using Type = RayTracingShaderGroupCreateInfoKHR; - }; - - struct RayTracingPipelineInterfaceCreateInfoKHR - { - using NativeType = VkRayTracingPipelineInterfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineInterfaceCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RayTracingPipelineInterfaceCreateInfoKHR( uint32_t maxPipelineRayPayloadSize_ = {}, - uint32_t maxPipelineRayHitAttributeSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxPipelineRayPayloadSize( maxPipelineRayPayloadSize_ ) - , maxPipelineRayHitAttributeSize( maxPipelineRayHitAttributeSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR RayTracingPipelineInterfaceCreateInfoKHR( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineInterfaceCreateInfoKHR( VkRayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : RayTracingPipelineInterfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RayTracingPipelineInterfaceCreateInfoKHR & operator=( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineInterfaceCreateInfoKHR & operator=( VkRayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & setMaxPipelineRayPayloadSize( uint32_t maxPipelineRayPayloadSize_ ) VULKAN_HPP_NOEXCEPT - { - maxPipelineRayPayloadSize = maxPipelineRayPayloadSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & - setMaxPipelineRayHitAttributeSize( uint32_t maxPipelineRayHitAttributeSize_ ) VULKAN_HPP_NOEXCEPT - { - maxPipelineRayHitAttributeSize = maxPipelineRayHitAttributeSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRayTracingPipelineInterfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRayTracingPipelineInterfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxPipelineRayPayloadSize, maxPipelineRayHitAttributeSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RayTracingPipelineInterfaceCreateInfoKHR const & ) const = default; -#else - bool operator==( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPipelineRayPayloadSize == rhs.maxPipelineRayPayloadSize ) && - ( maxPipelineRayHitAttributeSize == rhs.maxPipelineRayHitAttributeSize ); -# endif - } - - bool operator!=( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineInterfaceCreateInfoKHR; - const void * pNext = {}; - uint32_t maxPipelineRayPayloadSize = {}; - uint32_t maxPipelineRayHitAttributeSize = {}; - }; - - template <> - struct CppType - { - using Type = RayTracingPipelineInterfaceCreateInfoKHR; - }; - - struct RayTracingPipelineCreateInfoKHR - { - using NativeType = VkRayTracingPipelineCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoKHR( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, - uint32_t stageCount_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, - uint32_t groupCount_ = {}, - const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups_ = {}, - uint32_t maxPipelineRayRecursionDepth_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( stageCount_ ) - , pStages( pStages_ ) - , groupCount( groupCount_ ) - , pGroups( pGroups_ ) - , maxPipelineRayRecursionDepth( maxPipelineRayRecursionDepth_ ) - , pLibraryInfo( pLibraryInfo_ ) - , pLibraryInterface( pLibraryInterface_ ) - , pDynamicState( pDynamicState_ ) - , layout( layout_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoKHR( RayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineCreateInfoKHR( VkRayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : RayTracingPipelineCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoKHR( - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ = {}, - uint32_t maxPipelineRayRecursionDepth_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, - const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( static_cast( stages_.size() ) ) - , pStages( stages_.data() ) - , groupCount( static_cast( groups_.size() ) ) - , pGroups( groups_.data() ) - , maxPipelineRayRecursionDepth( maxPipelineRayRecursionDepth_ ) - , pLibraryInfo( pLibraryInfo_ ) - , pLibraryInterface( pLibraryInterface_ ) - , pDynamicState( pDynamicState_ ) - , layout( layout_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RayTracingPipelineCreateInfoKHR & operator=( RayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineCreateInfoKHR & operator=( VkRayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = stageCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & - setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT - { - pStages = pStages_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoKHR & - setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = static_cast( stages_.size() ); - pStages = stages_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = groupCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & - setPGroups( const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups_ ) VULKAN_HPP_NOEXCEPT - { - pGroups = pGroups_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoKHR & setGroups( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = static_cast( groups_.size() ); - pGroups = groups_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setMaxPipelineRayRecursionDepth( uint32_t maxPipelineRayRecursionDepth_ ) VULKAN_HPP_NOEXCEPT - { - maxPipelineRayRecursionDepth = maxPipelineRayRecursionDepth_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & - setPLibraryInfo( const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ ) VULKAN_HPP_NOEXCEPT - { - pLibraryInfo = pLibraryInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & - setPLibraryInterface( const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ ) VULKAN_HPP_NOEXCEPT - { - pLibraryInterface = pLibraryInterface_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & - setPDynamicState( const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ ) VULKAN_HPP_NOEXCEPT - { - pDynamicState = pDynamicState_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineHandle = basePipelineHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineIndex = basePipelineIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRayTracingPipelineCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRayTracingPipelineCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - stageCount, - pStages, - groupCount, - pGroups, - maxPipelineRayRecursionDepth, - pLibraryInfo, - pLibraryInterface, - pDynamicState, - layout, - basePipelineHandle, - basePipelineIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RayTracingPipelineCreateInfoKHR const & ) const = default; -#else - bool operator==( RayTracingPipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && - ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && ( maxPipelineRayRecursionDepth == rhs.maxPipelineRayRecursionDepth ) && - ( pLibraryInfo == rhs.pLibraryInfo ) && ( pLibraryInterface == rhs.pLibraryInterface ) && ( pDynamicState == rhs.pDynamicState ) && - ( layout == rhs.layout ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); -# endif - } - - bool operator!=( RayTracingPipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; - uint32_t stageCount = {}; - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; - uint32_t groupCount = {}; - const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups = {}; - uint32_t maxPipelineRayRecursionDepth = {}; - const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo = {}; - const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface = {}; - const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; - int32_t basePipelineIndex = {}; - }; - - template <> - struct CppType - { - using Type = RayTracingPipelineCreateInfoKHR; - }; - - struct RayTracingShaderGroupCreateInfoNV - { - using NativeType = VkRayTracingShaderGroupCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingShaderGroupCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( - VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral, - uint32_t generalShader_ = {}, - uint32_t closestHitShader_ = {}, - uint32_t anyHitShader_ = {}, - uint32_t intersectionShader_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , type( type_ ) - , generalShader( generalShader_ ) - , closestHitShader( closestHitShader_ ) - , anyHitShader( anyHitShader_ ) - , intersectionShader( intersectionShader_ ) - { - } - - VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( RayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingShaderGroupCreateInfoNV( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : RayTracingShaderGroupCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RayTracingShaderGroupCreateInfoNV & operator=( RayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingShaderGroupCreateInfoNV & operator=( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setType( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ ) VULKAN_HPP_NOEXCEPT - { - type = type_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setGeneralShader( uint32_t generalShader_ ) VULKAN_HPP_NOEXCEPT - { - generalShader = generalShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setClosestHitShader( uint32_t closestHitShader_ ) VULKAN_HPP_NOEXCEPT - { - closestHitShader = closestHitShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setAnyHitShader( uint32_t anyHitShader_ ) VULKAN_HPP_NOEXCEPT - { - anyHitShader = anyHitShader_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setIntersectionShader( uint32_t intersectionShader_ ) VULKAN_HPP_NOEXCEPT - { - intersectionShader = intersectionShader_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRayTracingShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRayTracingShaderGroupCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, type, generalShader, closestHitShader, anyHitShader, intersectionShader ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RayTracingShaderGroupCreateInfoNV const & ) const = default; -#else - bool operator==( RayTracingShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( generalShader == rhs.generalShader ) && - ( closestHitShader == rhs.closestHitShader ) && ( anyHitShader == rhs.anyHitShader ) && ( intersectionShader == rhs.intersectionShader ); -# endif - } - - bool operator!=( RayTracingShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral; - uint32_t generalShader = {}; - uint32_t closestHitShader = {}; - uint32_t anyHitShader = {}; - uint32_t intersectionShader = {}; - }; - - template <> - struct CppType - { - using Type = RayTracingShaderGroupCreateInfoNV; - }; - - struct RayTracingPipelineCreateInfoNV - { - using NativeType = VkRayTracingPipelineCreateInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineCreateInfoNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, - uint32_t stageCount_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, - uint32_t groupCount_ = {}, - const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups_ = {}, - uint32_t maxRecursionDepth_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( stageCount_ ) - , pStages( pStages_ ) - , groupCount( groupCount_ ) - , pGroups( pGroups_ ) - , maxRecursionDepth( maxRecursionDepth_ ) - , layout( layout_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( RayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineCreateInfoNV( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : RayTracingPipelineCreateInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoNV( - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ = {}, - uint32_t maxRecursionDepth_ = {}, - VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, - int32_t basePipelineIndex_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , stageCount( static_cast( stages_.size() ) ) - , pStages( stages_.data() ) - , groupCount( static_cast( groups_.size() ) ) - , pGroups( groups_.data() ) - , maxRecursionDepth( maxRecursionDepth_ ) - , layout( layout_ ) - , basePipelineHandle( basePipelineHandle_ ) - , basePipelineIndex( basePipelineIndex_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RayTracingPipelineCreateInfoNV & operator=( RayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RayTracingPipelineCreateInfoNV & operator=( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = stageCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & - setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT - { - pStages = pStages_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoNV & - setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT - { - stageCount = static_cast( stages_.size() ); - pStages = stages_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = groupCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & - setPGroups( const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups_ ) VULKAN_HPP_NOEXCEPT - { - pGroups = pGroups_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RayTracingPipelineCreateInfoNV & setGroups( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT - { - groupCount = static_cast( groups_.size() ); - pGroups = groups_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setMaxRecursionDepth( uint32_t maxRecursionDepth_ ) VULKAN_HPP_NOEXCEPT - { - maxRecursionDepth = maxRecursionDepth_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT - { - layout = layout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineHandle = basePipelineHandle_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT - { - basePipelineIndex = basePipelineIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRayTracingPipelineCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRayTracingPipelineCreateInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, stageCount, pStages, groupCount, pGroups, maxRecursionDepth, layout, basePipelineHandle, basePipelineIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RayTracingPipelineCreateInfoNV const & ) const = default; -#else - bool operator==( RayTracingPipelineCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && - ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && ( maxRecursionDepth == rhs.maxRecursionDepth ) && ( layout == rhs.layout ) && - ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); -# endif - } - - bool operator!=( RayTracingPipelineCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineCreateInfoNV; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; - uint32_t stageCount = {}; - const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; - uint32_t groupCount = {}; - const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups = {}; - uint32_t maxRecursionDepth = {}; - VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; - VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; - int32_t basePipelineIndex = {}; - }; - - template <> - struct CppType - { - using Type = RayTracingPipelineCreateInfoNV; - }; - - struct RefreshCycleDurationGOOGLE - { - using NativeType = VkRefreshCycleDurationGOOGLE; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RefreshCycleDurationGOOGLE( uint64_t refreshDuration_ = {} ) VULKAN_HPP_NOEXCEPT : refreshDuration( refreshDuration_ ) {} - - VULKAN_HPP_CONSTEXPR RefreshCycleDurationGOOGLE( RefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RefreshCycleDurationGOOGLE( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - : RefreshCycleDurationGOOGLE( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RefreshCycleDurationGOOGLE & operator=( RefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RefreshCycleDurationGOOGLE & operator=( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkRefreshCycleDurationGOOGLE const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRefreshCycleDurationGOOGLE &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( refreshDuration ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RefreshCycleDurationGOOGLE const & ) const = default; -#else - bool operator==( RefreshCycleDurationGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( refreshDuration == rhs.refreshDuration ); -# endif - } - - bool operator!=( RefreshCycleDurationGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint64_t refreshDuration = {}; - }; - - struct RenderPassAttachmentBeginInfo - { - using NativeType = VkRenderPassAttachmentBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassAttachmentBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfo( uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachmentCount( attachmentCount_ ) - , pAttachments( pAttachments_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfo( RenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassAttachmentBeginInfo( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassAttachmentBeginInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassAttachmentBeginInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), attachmentCount( static_cast( attachments_.size() ) ), pAttachments( attachments_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassAttachmentBeginInfo & operator=( RenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassAttachmentBeginInfo & operator=( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pAttachments = pAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassAttachmentBeginInfo & - setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( attachments_.size() ); - pAttachments = attachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassAttachmentBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassAttachmentBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, attachmentCount, pAttachments ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassAttachmentBeginInfo const & ) const = default; -#else - bool operator==( RenderPassAttachmentBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ); -# endif - } - - bool operator!=( RenderPassAttachmentBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassAttachmentBeginInfo; - const void * pNext = {}; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::ImageView * pAttachments = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassAttachmentBeginInfo; - }; - using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; - - struct RenderPassBeginInfo - { - using NativeType = VkRenderPassBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ = {}, - VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, - uint32_t clearValueCount_ = {}, - const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , renderPass( renderPass_ ) - , framebuffer( framebuffer_ ) - , renderArea( renderArea_ ) - , clearValueCount( clearValueCount_ ) - , pClearValues( pClearValues_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo( RenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassBeginInfo( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassBeginInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassBeginInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_, - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_, - VULKAN_HPP_NAMESPACE::Rect2D renderArea_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & clearValues_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , renderPass( renderPass_ ) - , framebuffer( framebuffer_ ) - , renderArea( renderArea_ ) - , clearValueCount( static_cast( clearValues_.size() ) ) - , pClearValues( clearValues_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassBeginInfo & operator=( RenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassBeginInfo & operator=( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT - { - renderPass = renderPass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT - { - framebuffer = framebuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT - { - renderArea = renderArea_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setClearValueCount( uint32_t clearValueCount_ ) VULKAN_HPP_NOEXCEPT - { - clearValueCount = clearValueCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setPClearValues( const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues_ ) VULKAN_HPP_NOEXCEPT - { - pClearValues = pClearValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassBeginInfo & - setClearValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & clearValues_ ) VULKAN_HPP_NOEXCEPT - { - clearValueCount = static_cast( clearValues_.size() ); - pClearValues = clearValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, renderPass, framebuffer, renderArea, clearValueCount, pClearValues ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassBeginInfo const & ) const = default; -#else - bool operator==( RenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( framebuffer == rhs.framebuffer ) && - ( renderArea == rhs.renderArea ) && ( clearValueCount == rhs.clearValueCount ) && ( pClearValues == rhs.pClearValues ); -# endif - } - - bool operator!=( RenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassBeginInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; - VULKAN_HPP_NAMESPACE::Framebuffer framebuffer = {}; - VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; - uint32_t clearValueCount = {}; - const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassBeginInfo; - }; - - struct SubpassDescription - { - using NativeType = VkSubpassDescription; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassDescription( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - uint32_t inputAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments_ = {}, - uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ = {}, - uint32_t preserveAttachmentCount_ = {}, - const uint32_t * pPreserveAttachments_ = {} ) VULKAN_HPP_NOEXCEPT - : flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , inputAttachmentCount( inputAttachmentCount_ ) - , pInputAttachments( pInputAttachments_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachments( pColorAttachments_ ) - , pResolveAttachments( pResolveAttachments_ ) - , pDepthStencilAttachment( pDepthStencilAttachment_ ) - , preserveAttachmentCount( preserveAttachmentCount_ ) - , pPreserveAttachments( pPreserveAttachments_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassDescription( SubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescription( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDescription( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {} ) - : flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) - , pInputAttachments( inputAttachments_.data() ) - , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) - , pColorAttachments( colorAttachments_.data() ) - , pResolveAttachments( resolveAttachments_.data() ) - , pDepthStencilAttachment( pDepthStencilAttachment_ ) - , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) - , pPreserveAttachments( preserveAttachments_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); -# else - if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) - { - throw LogicError( - VULKAN_HPP_NAMESPACE_STRING - "::SubpassDescription::SubpassDescription: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassDescription & operator=( SubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescription & operator=( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - inputAttachmentCount = inputAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & - setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pInputAttachments = pInputAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription & setInputAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_ ) VULKAN_HPP_NOEXCEPT - { - inputAttachmentCount = static_cast( inputAttachments_.size() ); - pInputAttachments = inputAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & - setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachments = pColorAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription & setColorAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachments_.size() ); - pColorAttachments = colorAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & - setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pResolveAttachments = pResolveAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription & setResolveAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( resolveAttachments_.size() ); - pResolveAttachments = resolveAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & - setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pDepthStencilAttachment = pDepthStencilAttachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - preserveAttachmentCount = preserveAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPPreserveAttachments( const uint32_t * pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pPreserveAttachments = pPreserveAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription & - setPreserveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - preserveAttachmentCount = static_cast( preserveAttachments_.size() ); - pPreserveAttachments = preserveAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassDescription const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassDescription &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( flags, - pipelineBindPoint, - inputAttachmentCount, - pInputAttachments, - colorAttachmentCount, - pColorAttachments, - pResolveAttachments, - pDepthStencilAttachment, - preserveAttachmentCount, - pPreserveAttachments ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassDescription const & ) const = default; -#else - bool operator==( SubpassDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( inputAttachmentCount == rhs.inputAttachmentCount ) && - ( pInputAttachments == rhs.pInputAttachments ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && - ( pColorAttachments == rhs.pColorAttachments ) && ( pResolveAttachments == rhs.pResolveAttachments ) && - ( pDepthStencilAttachment == rhs.pDepthStencilAttachment ) && ( preserveAttachmentCount == rhs.preserveAttachmentCount ) && - ( pPreserveAttachments == rhs.pPreserveAttachments ); -# endif - } - - bool operator!=( SubpassDescription const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - uint32_t inputAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment = {}; - uint32_t preserveAttachmentCount = {}; - const uint32_t * pPreserveAttachments = {}; - }; - - struct SubpassDependency - { - using NativeType = VkSubpassDependency; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassDependency( uint32_t srcSubpass_ = {}, - uint32_t dstSubpass_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {} ) VULKAN_HPP_NOEXCEPT - : srcSubpass( srcSubpass_ ) - , dstSubpass( dstSubpass_ ) - , srcStageMask( srcStageMask_ ) - , dstStageMask( dstStageMask_ ) - , srcAccessMask( srcAccessMask_ ) - , dstAccessMask( dstAccessMask_ ) - , dependencyFlags( dependencyFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassDependency( SubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDependency( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDependency( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassDependency & operator=( SubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDependency & operator=( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT - { - srcSubpass = srcSubpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT - { - dstSubpass = dstSubpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT - { - srcStageMask = srcStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - dstStageMask = dstStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT - { - dependencyFlags = dependencyFlags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassDependency const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassDependency &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( srcSubpass, dstSubpass, srcStageMask, dstStageMask, srcAccessMask, dstAccessMask, dependencyFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassDependency const & ) const = default; -#else - bool operator==( SubpassDependency const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( srcSubpass == rhs.srcSubpass ) && ( dstSubpass == rhs.dstSubpass ) && ( srcStageMask == rhs.srcStageMask ) && - ( dstStageMask == rhs.dstStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && - ( dependencyFlags == rhs.dependencyFlags ); -# endif - } - - bool operator!=( SubpassDependency const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t srcSubpass = {}; - uint32_t dstSubpass = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; - }; - - struct RenderPassCreateInfo - { - using NativeType = VkRenderPassCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ = {}, - uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments_ = {}, - uint32_t subpassCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses_ = {}, - uint32_t dependencyCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , attachmentCount( attachmentCount_ ) - , pAttachments( pAttachments_ ) - , subpassCount( subpassCount_ ) - , pSubpasses( pSubpasses_ ) - , dependencyCount( dependencyCount_ ) - , pDependencies( pDependencies_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( RenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreateInfo( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , attachmentCount( static_cast( attachments_.size() ) ) - , pAttachments( attachments_.data() ) - , subpassCount( static_cast( subpasses_.size() ) ) - , pSubpasses( subpasses_.data() ) - , dependencyCount( static_cast( dependencies_.size() ) ) - , pDependencies( dependencies_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassCreateInfo & operator=( RenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreateInfo & operator=( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pAttachments = pAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo & setAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( attachments_.size() ); - pAttachments = attachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = subpassCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses_ ) VULKAN_HPP_NOEXCEPT - { - pSubpasses = pSubpasses_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo & - setSubpasses( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = static_cast( subpasses_.size() ); - pSubpasses = subpasses_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = dependencyCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies_ ) VULKAN_HPP_NOEXCEPT - { - pDependencies = pDependencies_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo & - setDependencies( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = static_cast( dependencies_.size() ); - pDependencies = dependencies_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, attachmentCount, pAttachments, subpassCount, pSubpasses, dependencyCount, pDependencies ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassCreateInfo const & ) const = default; -#else - bool operator==( RenderPassCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( attachmentCount == rhs.attachmentCount ) && - ( pAttachments == rhs.pAttachments ) && ( subpassCount == rhs.subpassCount ) && ( pSubpasses == rhs.pSubpasses ) && - ( dependencyCount == rhs.dependencyCount ) && ( pDependencies == rhs.pDependencies ); -# endif - } - - bool operator!=( RenderPassCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags = {}; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments = {}; - uint32_t subpassCount = {}; - const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses = {}; - uint32_t dependencyCount = {}; - const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassCreateInfo; - }; - - struct SubpassDescription2 - { - using NativeType = VkSubpassDescription2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDescription2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassDescription2( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, - uint32_t viewMask_ = {}, - uint32_t inputAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments_ = {}, - uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ = {}, - uint32_t preserveAttachmentCount_ = {}, - const uint32_t * pPreserveAttachments_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , viewMask( viewMask_ ) - , inputAttachmentCount( inputAttachmentCount_ ) - , pInputAttachments( pInputAttachments_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachments( pColorAttachments_ ) - , pResolveAttachments( pResolveAttachments_ ) - , pDepthStencilAttachment( pDepthStencilAttachment_ ) - , preserveAttachmentCount( preserveAttachmentCount_ ) - , pPreserveAttachments( pPreserveAttachments_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassDescription2( SubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescription2( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDescription2( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription2( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, - uint32_t viewMask_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , pipelineBindPoint( pipelineBindPoint_ ) - , viewMask( viewMask_ ) - , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) - , pInputAttachments( inputAttachments_.data() ) - , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) - , pColorAttachments( colorAttachments_.data() ) - , pResolveAttachments( resolveAttachments_.data() ) - , pDepthStencilAttachment( pDepthStencilAttachment_ ) - , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) - , pPreserveAttachments( preserveAttachments_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); -# else - if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) - { - throw LogicError( - VULKAN_HPP_NAMESPACE_STRING - "::SubpassDescription2::SubpassDescription2: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassDescription2 & operator=( SubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescription2 & operator=( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT - { - pipelineBindPoint = pipelineBindPoint_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT - { - viewMask = viewMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - inputAttachmentCount = inputAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & - setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pInputAttachments = pInputAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription2 & setInputAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_ ) VULKAN_HPP_NOEXCEPT - { - inputAttachmentCount = static_cast( inputAttachments_.size() ); - pInputAttachments = inputAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & - setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachments = pColorAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription2 & setColorAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachments_.size() ); - pColorAttachments = colorAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & - setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pResolveAttachments = pResolveAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription2 & setResolveAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( resolveAttachments_.size() ); - pResolveAttachments = resolveAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & - setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pDepthStencilAttachment = pDepthStencilAttachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - preserveAttachmentCount = preserveAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPPreserveAttachments( const uint32_t * pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pPreserveAttachments = pPreserveAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassDescription2 & - setPreserveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT - { - preserveAttachmentCount = static_cast( preserveAttachments_.size() ); - pPreserveAttachments = preserveAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassDescription2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassDescription2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - pipelineBindPoint, - viewMask, - inputAttachmentCount, - pInputAttachments, - colorAttachmentCount, - pColorAttachments, - pResolveAttachments, - pDepthStencilAttachment, - preserveAttachmentCount, - pPreserveAttachments ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassDescription2 const & ) const = default; -#else - bool operator==( SubpassDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && - ( viewMask == rhs.viewMask ) && ( inputAttachmentCount == rhs.inputAttachmentCount ) && ( pInputAttachments == rhs.pInputAttachments ) && - ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachments == rhs.pColorAttachments ) && - ( pResolveAttachments == rhs.pResolveAttachments ) && ( pDepthStencilAttachment == rhs.pDepthStencilAttachment ) && - ( preserveAttachmentCount == rhs.preserveAttachmentCount ) && ( pPreserveAttachments == rhs.pPreserveAttachments ); -# endif - } - - bool operator!=( SubpassDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDescription2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags = {}; - VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; - uint32_t viewMask = {}; - uint32_t inputAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments = {}; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment = {}; - uint32_t preserveAttachmentCount = {}; - const uint32_t * pPreserveAttachments = {}; - }; - - template <> - struct CppType - { - using Type = SubpassDescription2; - }; - using SubpassDescription2KHR = SubpassDescription2; - - struct SubpassDependency2 - { - using NativeType = VkSubpassDependency2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDependency2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassDependency2( uint32_t srcSubpass_ = {}, - uint32_t dstSubpass_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {}, - int32_t viewOffset_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcSubpass( srcSubpass_ ) - , dstSubpass( dstSubpass_ ) - , srcStageMask( srcStageMask_ ) - , dstStageMask( dstStageMask_ ) - , srcAccessMask( srcAccessMask_ ) - , dstAccessMask( dstAccessMask_ ) - , dependencyFlags( dependencyFlags_ ) - , viewOffset( viewOffset_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassDependency2( SubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDependency2( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDependency2( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassDependency2 & operator=( SubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDependency2 & operator=( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT - { - srcSubpass = srcSubpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT - { - dstSubpass = dstSubpass_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT - { - srcStageMask = srcStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - dstStageMask = dstStageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - srcAccessMask = srcAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT - { - dstAccessMask = dstAccessMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT - { - dependencyFlags = dependencyFlags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setViewOffset( int32_t viewOffset_ ) VULKAN_HPP_NOEXCEPT - { - viewOffset = viewOffset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassDependency2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassDependency2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcSubpass, dstSubpass, srcStageMask, dstStageMask, srcAccessMask, dstAccessMask, dependencyFlags, viewOffset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassDependency2 const & ) const = default; -#else - bool operator==( SubpassDependency2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubpass == rhs.srcSubpass ) && ( dstSubpass == rhs.dstSubpass ) && - ( srcStageMask == rhs.srcStageMask ) && ( dstStageMask == rhs.dstStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && - ( dstAccessMask == rhs.dstAccessMask ) && ( dependencyFlags == rhs.dependencyFlags ) && ( viewOffset == rhs.viewOffset ); -# endif - } - - bool operator!=( SubpassDependency2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDependency2; - const void * pNext = {}; - uint32_t srcSubpass = {}; - uint32_t dstSubpass = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; - VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; - VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; - int32_t viewOffset = {}; - }; - - template <> - struct CppType - { - using Type = SubpassDependency2; - }; - using SubpassDependency2KHR = SubpassDependency2; - - struct RenderPassCreateInfo2 - { - using NativeType = VkRenderPassCreateInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreateInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ = {}, - uint32_t attachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments_ = {}, - uint32_t subpassCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses_ = {}, - uint32_t dependencyCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies_ = {}, - uint32_t correlatedViewMaskCount_ = {}, - const uint32_t * pCorrelatedViewMasks_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , attachmentCount( attachmentCount_ ) - , pAttachments( pAttachments_ ) - , subpassCount( subpassCount_ ) - , pSubpasses( pSubpasses_ ) - , dependencyCount( dependencyCount_ ) - , pDependencies( pDependencies_ ) - , correlatedViewMaskCount( correlatedViewMaskCount_ ) - , pCorrelatedViewMasks( pCorrelatedViewMasks_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2( RenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreateInfo2( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassCreateInfo2( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo2( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlatedViewMasks_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , attachmentCount( static_cast( attachments_.size() ) ) - , pAttachments( attachments_.data() ) - , subpassCount( static_cast( subpasses_.size() ) ) - , pSubpasses( subpasses_.data() ) - , dependencyCount( static_cast( dependencies_.size() ) ) - , pDependencies( dependencies_.data() ) - , correlatedViewMaskCount( static_cast( correlatedViewMasks_.size() ) ) - , pCorrelatedViewMasks( correlatedViewMasks_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassCreateInfo2 & operator=( RenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreateInfo2 & operator=( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = attachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pAttachments = pAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo2 & setAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT - { - attachmentCount = static_cast( attachments_.size() ); - pAttachments = attachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = subpassCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses_ ) VULKAN_HPP_NOEXCEPT - { - pSubpasses = pSubpasses_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo2 & - setSubpasses( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = static_cast( subpasses_.size() ); - pSubpasses = subpasses_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = dependencyCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies_ ) VULKAN_HPP_NOEXCEPT - { - pDependencies = pDependencies_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo2 & - setDependencies( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = static_cast( dependencies_.size() ); - pDependencies = dependencies_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ ) VULKAN_HPP_NOEXCEPT - { - correlatedViewMaskCount = correlatedViewMaskCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPCorrelatedViewMasks( const uint32_t * pCorrelatedViewMasks_ ) VULKAN_HPP_NOEXCEPT - { - pCorrelatedViewMasks = pCorrelatedViewMasks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassCreateInfo2 & - setCorrelatedViewMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlatedViewMasks_ ) VULKAN_HPP_NOEXCEPT - { - correlatedViewMaskCount = static_cast( correlatedViewMasks_.size() ); - pCorrelatedViewMasks = correlatedViewMasks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassCreateInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassCreateInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - attachmentCount, - pAttachments, - subpassCount, - pSubpasses, - dependencyCount, - pDependencies, - correlatedViewMaskCount, - pCorrelatedViewMasks ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassCreateInfo2 const & ) const = default; -#else - bool operator==( RenderPassCreateInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( attachmentCount == rhs.attachmentCount ) && - ( pAttachments == rhs.pAttachments ) && ( subpassCount == rhs.subpassCount ) && ( pSubpasses == rhs.pSubpasses ) && - ( dependencyCount == rhs.dependencyCount ) && ( pDependencies == rhs.pDependencies ) && - ( correlatedViewMaskCount == rhs.correlatedViewMaskCount ) && ( pCorrelatedViewMasks == rhs.pCorrelatedViewMasks ); -# endif - } - - bool operator!=( RenderPassCreateInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreateInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags = {}; - uint32_t attachmentCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments = {}; - uint32_t subpassCount = {}; - const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses = {}; - uint32_t dependencyCount = {}; - const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies = {}; - uint32_t correlatedViewMaskCount = {}; - const uint32_t * pCorrelatedViewMasks = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassCreateInfo2; - }; - using RenderPassCreateInfo2KHR = RenderPassCreateInfo2; - - struct RenderPassCreationControlEXT - { - using NativeType = VkRenderPassCreationControlEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreationControlEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassCreationControlEXT( VULKAN_HPP_NAMESPACE::Bool32 disallowMerging_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , disallowMerging( disallowMerging_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassCreationControlEXT( RenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationControlEXT( VkRenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassCreationControlEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassCreationControlEXT & operator=( RenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationControlEXT & operator=( VkRenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassCreationControlEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreationControlEXT & setDisallowMerging( VULKAN_HPP_NAMESPACE::Bool32 disallowMerging_ ) VULKAN_HPP_NOEXCEPT - { - disallowMerging = disallowMerging_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassCreationControlEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassCreationControlEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, disallowMerging ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassCreationControlEXT const & ) const = default; -#else - bool operator==( RenderPassCreationControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( disallowMerging == rhs.disallowMerging ); -# endif - } - - bool operator!=( RenderPassCreationControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreationControlEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 disallowMerging = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassCreationControlEXT; - }; - - struct RenderPassCreationFeedbackInfoEXT - { - using NativeType = VkRenderPassCreationFeedbackInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackInfoEXT( uint32_t postMergeSubpassCount_ = {} ) VULKAN_HPP_NOEXCEPT - : postMergeSubpassCount( postMergeSubpassCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackInfoEXT( RenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationFeedbackInfoEXT( VkRenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassCreationFeedbackInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassCreationFeedbackInfoEXT & operator=( RenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationFeedbackInfoEXT & operator=( VkRenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkRenderPassCreationFeedbackInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassCreationFeedbackInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( postMergeSubpassCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassCreationFeedbackInfoEXT const & ) const = default; -#else - bool operator==( RenderPassCreationFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( postMergeSubpassCount == rhs.postMergeSubpassCount ); -# endif - } - - bool operator!=( RenderPassCreationFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t postMergeSubpassCount = {}; - }; - - struct RenderPassCreationFeedbackCreateInfoEXT - { - using NativeType = VkRenderPassCreationFeedbackCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreationFeedbackCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pRenderPassFeedback( pRenderPassFeedback_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackCreateInfoEXT( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationFeedbackCreateInfoEXT( VkRenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassCreationFeedbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassCreationFeedbackCreateInfoEXT & operator=( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassCreationFeedbackCreateInfoEXT & operator=( VkRenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassCreationFeedbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassCreationFeedbackCreateInfoEXT & - setPRenderPassFeedback( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback_ ) VULKAN_HPP_NOEXCEPT - { - pRenderPassFeedback = pRenderPassFeedback_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassCreationFeedbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassCreationFeedbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pRenderPassFeedback ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassCreationFeedbackCreateInfoEXT const & ) const = default; -#else - bool operator==( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pRenderPassFeedback == rhs.pRenderPassFeedback ); -# endif - } - - bool operator!=( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreationFeedbackCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassCreationFeedbackCreateInfoEXT; - }; - - struct RenderPassFragmentDensityMapCreateInfoEXT - { - using NativeType = VkRenderPassFragmentDensityMapCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityMapAttachment( fragmentDensityMapAttachment_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassFragmentDensityMapCreateInfoEXT( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassFragmentDensityMapCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassFragmentDensityMapCreateInfoEXT & operator=( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassFragmentDensityMapCreateInfoEXT & operator=( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassFragmentDensityMapCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassFragmentDensityMapCreateInfoEXT & - setFragmentDensityMapAttachment( VULKAN_HPP_NAMESPACE::AttachmentReference const & fragmentDensityMapAttachment_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityMapAttachment = fragmentDensityMapAttachment_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassFragmentDensityMapCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassFragmentDensityMapCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityMapAttachment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassFragmentDensityMapCreateInfoEXT const & ) const = default; -#else - bool operator==( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapAttachment == rhs.fragmentDensityMapAttachment ); -# endif - } - - bool operator!=( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassFragmentDensityMapCreateInfoEXT; - }; - - struct RenderPassInputAttachmentAspectCreateInfo - { - using NativeType = VkRenderPassInputAttachmentAspectCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassInputAttachmentAspectCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = {}, - const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , aspectReferenceCount( aspectReferenceCount_ ) - , pAspectReferences( pAspectReferences_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( RenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassInputAttachmentAspectCreateInfo( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassInputAttachmentAspectCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassInputAttachmentAspectCreateInfo( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & aspectReferences_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), aspectReferenceCount( static_cast( aspectReferences_.size() ) ), pAspectReferences( aspectReferences_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassInputAttachmentAspectCreateInfo & operator=( RenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassInputAttachmentAspectCreateInfo & operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & setAspectReferenceCount( uint32_t aspectReferenceCount_ ) VULKAN_HPP_NOEXCEPT - { - aspectReferenceCount = aspectReferenceCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & - setPAspectReferences( const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences_ ) VULKAN_HPP_NOEXCEPT - { - pAspectReferences = pAspectReferences_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassInputAttachmentAspectCreateInfo & setAspectReferences( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & aspectReferences_ ) VULKAN_HPP_NOEXCEPT - { - aspectReferenceCount = static_cast( aspectReferences_.size() ); - pAspectReferences = aspectReferences_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassInputAttachmentAspectCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassInputAttachmentAspectCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, aspectReferenceCount, pAspectReferences ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassInputAttachmentAspectCreateInfo const & ) const = default; -#else - bool operator==( RenderPassInputAttachmentAspectCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( aspectReferenceCount == rhs.aspectReferenceCount ) && - ( pAspectReferences == rhs.pAspectReferences ); -# endif - } - - bool operator!=( RenderPassInputAttachmentAspectCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfo; - const void * pNext = {}; - uint32_t aspectReferenceCount = {}; - const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassInputAttachmentAspectCreateInfo; - }; - using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; - - struct RenderPassMultiviewCreateInfo - { - using NativeType = VkRenderPassMultiviewCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassMultiviewCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( uint32_t subpassCount_ = {}, - const uint32_t * pViewMasks_ = {}, - uint32_t dependencyCount_ = {}, - const int32_t * pViewOffsets_ = {}, - uint32_t correlationMaskCount_ = {}, - const uint32_t * pCorrelationMasks_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subpassCount( subpassCount_ ) - , pViewMasks( pViewMasks_ ) - , dependencyCount( dependencyCount_ ) - , pViewOffsets( pViewOffsets_ ) - , correlationMaskCount( correlationMaskCount_ ) - , pCorrelationMasks( pCorrelationMasks_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( RenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassMultiviewCreateInfo( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassMultiviewCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassMultiviewCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewMasks_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewOffsets_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlationMasks_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , subpassCount( static_cast( viewMasks_.size() ) ) - , pViewMasks( viewMasks_.data() ) - , dependencyCount( static_cast( viewOffsets_.size() ) ) - , pViewOffsets( viewOffsets_.data() ) - , correlationMaskCount( static_cast( correlationMasks_.size() ) ) - , pCorrelationMasks( correlationMasks_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassMultiviewCreateInfo & operator=( RenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassMultiviewCreateInfo & operator=( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = subpassCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPViewMasks( const uint32_t * pViewMasks_ ) VULKAN_HPP_NOEXCEPT - { - pViewMasks = pViewMasks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassMultiviewCreateInfo & setViewMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewMasks_ ) VULKAN_HPP_NOEXCEPT - { - subpassCount = static_cast( viewMasks_.size() ); - pViewMasks = viewMasks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = dependencyCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPViewOffsets( const int32_t * pViewOffsets_ ) VULKAN_HPP_NOEXCEPT - { - pViewOffsets = pViewOffsets_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassMultiviewCreateInfo & setViewOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewOffsets_ ) VULKAN_HPP_NOEXCEPT - { - dependencyCount = static_cast( viewOffsets_.size() ); - pViewOffsets = viewOffsets_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setCorrelationMaskCount( uint32_t correlationMaskCount_ ) VULKAN_HPP_NOEXCEPT - { - correlationMaskCount = correlationMaskCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPCorrelationMasks( const uint32_t * pCorrelationMasks_ ) VULKAN_HPP_NOEXCEPT - { - pCorrelationMasks = pCorrelationMasks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassMultiviewCreateInfo & - setCorrelationMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlationMasks_ ) VULKAN_HPP_NOEXCEPT - { - correlationMaskCount = static_cast( correlationMasks_.size() ); - pCorrelationMasks = correlationMasks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassMultiviewCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassMultiviewCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subpassCount, pViewMasks, dependencyCount, pViewOffsets, correlationMaskCount, pCorrelationMasks ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassMultiviewCreateInfo const & ) const = default; -#else - bool operator==( RenderPassMultiviewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassCount == rhs.subpassCount ) && ( pViewMasks == rhs.pViewMasks ) && - ( dependencyCount == rhs.dependencyCount ) && ( pViewOffsets == rhs.pViewOffsets ) && ( correlationMaskCount == rhs.correlationMaskCount ) && - ( pCorrelationMasks == rhs.pCorrelationMasks ); -# endif - } - - bool operator!=( RenderPassMultiviewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassMultiviewCreateInfo; - const void * pNext = {}; - uint32_t subpassCount = {}; - const uint32_t * pViewMasks = {}; - uint32_t dependencyCount = {}; - const int32_t * pViewOffsets = {}; - uint32_t correlationMaskCount = {}; - const uint32_t * pCorrelationMasks = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassMultiviewCreateInfo; - }; - using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; - - struct SubpassSampleLocationsEXT - { - using NativeType = VkSubpassSampleLocationsEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( uint32_t subpassIndex_ = {}, - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT - : subpassIndex( subpassIndex_ ) - , sampleLocationsInfo( sampleLocationsInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( SubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassSampleLocationsEXT( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SubpassSampleLocationsEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassSampleLocationsEXT & operator=( SubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassSampleLocationsEXT & operator=( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassSampleLocationsEXT & setSubpassIndex( uint32_t subpassIndex_ ) VULKAN_HPP_NOEXCEPT - { - subpassIndex = subpassIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassSampleLocationsEXT & - setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT - { - sampleLocationsInfo = sampleLocationsInfo_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassSampleLocationsEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( subpassIndex, sampleLocationsInfo ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassSampleLocationsEXT const & ) const = default; -#else - bool operator==( SubpassSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( subpassIndex == rhs.subpassIndex ) && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); -# endif - } - - bool operator!=( SubpassSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t subpassIndex = {}; - VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; - }; - - struct RenderPassSampleLocationsBeginInfoEXT - { - using NativeType = VkRenderPassSampleLocationsBeginInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = {}, - const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations_ = {}, - uint32_t postSubpassSampleLocationsCount_ = {}, - const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ ) - , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ ) - , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ ) - , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( RenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassSampleLocationsBeginInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassSampleLocationsBeginInfoEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentInitialSampleLocations_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & postSubpassSampleLocations_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , attachmentInitialSampleLocationsCount( static_cast( attachmentInitialSampleLocations_.size() ) ) - , pAttachmentInitialSampleLocations( attachmentInitialSampleLocations_.data() ) - , postSubpassSampleLocationsCount( static_cast( postSubpassSampleLocations_.size() ) ) - , pPostSubpassSampleLocations( postSubpassSampleLocations_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassSampleLocationsBeginInfoEXT & operator=( RenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSampleLocationsBeginInfoEXT & operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & - setAttachmentInitialSampleLocationsCount( uint32_t attachmentInitialSampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT - { - attachmentInitialSampleLocationsCount = attachmentInitialSampleLocationsCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & - setPAttachmentInitialSampleLocations( const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - pAttachmentInitialSampleLocations = pAttachmentInitialSampleLocations_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassSampleLocationsBeginInfoEXT & setAttachmentInitialSampleLocations( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentInitialSampleLocations_ ) - VULKAN_HPP_NOEXCEPT - { - attachmentInitialSampleLocationsCount = static_cast( attachmentInitialSampleLocations_.size() ); - pAttachmentInitialSampleLocations = attachmentInitialSampleLocations_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & - setPostSubpassSampleLocationsCount( uint32_t postSubpassSampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT - { - postSubpassSampleLocationsCount = postSubpassSampleLocationsCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & - setPPostSubpassSampleLocations( const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT - { - pPostSubpassSampleLocations = pPostSubpassSampleLocations_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderPassSampleLocationsBeginInfoEXT & setPostSubpassSampleLocations( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & postSubpassSampleLocations_ ) - VULKAN_HPP_NOEXCEPT - { - postSubpassSampleLocationsCount = static_cast( postSubpassSampleLocations_.size() ); - pPostSubpassSampleLocations = postSubpassSampleLocations_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassSampleLocationsBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassSampleLocationsBeginInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, attachmentInitialSampleLocationsCount, pAttachmentInitialSampleLocations, postSubpassSampleLocationsCount, pPostSubpassSampleLocations ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassSampleLocationsBeginInfoEXT const & ) const = default; -#else - bool operator==( RenderPassSampleLocationsBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentInitialSampleLocationsCount == rhs.attachmentInitialSampleLocationsCount ) && - ( pAttachmentInitialSampleLocations == rhs.pAttachmentInitialSampleLocations ) && - ( postSubpassSampleLocationsCount == rhs.postSubpassSampleLocationsCount ) && ( pPostSubpassSampleLocations == rhs.pPostSubpassSampleLocations ); -# endif - } - - bool operator!=( RenderPassSampleLocationsBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; - const void * pNext = {}; - uint32_t attachmentInitialSampleLocationsCount = {}; - const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations = {}; - uint32_t postSubpassSampleLocationsCount = {}; - const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassSampleLocationsBeginInfoEXT; - }; - - struct RenderPassSubpassFeedbackInfoEXT - { - using NativeType = VkRenderPassSubpassFeedbackInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 - RenderPassSubpassFeedbackInfoEXT( VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT subpassMergeStatus_ = VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT::eMerged, - std::array const & description_ = {}, - uint32_t postMergeIndex_ = {} ) VULKAN_HPP_NOEXCEPT - : subpassMergeStatus( subpassMergeStatus_ ) - , description( description_ ) - , postMergeIndex( postMergeIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackInfoEXT( RenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSubpassFeedbackInfoEXT( VkRenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassSubpassFeedbackInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassSubpassFeedbackInfoEXT & operator=( RenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSubpassFeedbackInfoEXT & operator=( VkRenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkRenderPassSubpassFeedbackInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassSubpassFeedbackInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple const &, uint32_t const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( subpassMergeStatus, description, postMergeIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassSubpassFeedbackInfoEXT const & ) const = default; -#else - bool operator==( RenderPassSubpassFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( subpassMergeStatus == rhs.subpassMergeStatus ) && ( description == rhs.description ) && ( postMergeIndex == rhs.postMergeIndex ); -# endif - } - - bool operator!=( RenderPassSubpassFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT subpassMergeStatus = VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT::eMerged; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; - uint32_t postMergeIndex = {}; - }; - - struct RenderPassSubpassFeedbackCreateInfoEXT - { - using NativeType = VkRenderPassSubpassFeedbackCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassSubpassFeedbackCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pSubpassFeedback( pSubpassFeedback_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSubpassFeedbackCreateInfoEXT( VkRenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassSubpassFeedbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassSubpassFeedbackCreateInfoEXT & operator=( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassSubpassFeedbackCreateInfoEXT & operator=( VkRenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT & - setPSubpassFeedback( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback_ ) VULKAN_HPP_NOEXCEPT - { - pSubpassFeedback = pSubpassFeedback_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassSubpassFeedbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassSubpassFeedbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pSubpassFeedback ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassSubpassFeedbackCreateInfoEXT const & ) const = default; -#else - bool operator==( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pSubpassFeedback == rhs.pSubpassFeedback ); -# endif - } - - bool operator!=( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassSubpassFeedbackCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback = {}; - }; - - template <> - struct CppType - { - using Type = RenderPassSubpassFeedbackCreateInfoEXT; - }; - - struct RenderPassTransformBeginInfoQCOM - { - using NativeType = VkRenderPassTransformBeginInfoQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassTransformBeginInfoQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR RenderPassTransformBeginInfoQCOM( - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , transform( transform_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderPassTransformBeginInfoQCOM( RenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassTransformBeginInfoQCOM( VkRenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderPassTransformBeginInfoQCOM( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderPassTransformBeginInfoQCOM & operator=( RenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderPassTransformBeginInfoQCOM & operator=( VkRenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderPassTransformBeginInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderPassTransformBeginInfoQCOM & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT - { - transform = transform_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderPassTransformBeginInfoQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderPassTransformBeginInfoQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, transform ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderPassTransformBeginInfoQCOM const & ) const = default; -#else - bool operator==( RenderPassTransformBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ); -# endif - } - - bool operator!=( RenderPassTransformBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassTransformBeginInfoQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - }; - - template <> - struct CppType - { - using Type = RenderPassTransformBeginInfoQCOM; - }; - - struct RenderingAttachmentInfo - { - using NativeType = VkRenderingAttachmentInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingAttachmentInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, - VULKAN_HPP_NAMESPACE::ImageView resolveImageView_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, - VULKAN_HPP_NAMESPACE::ClearValue clearValue_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageView( imageView_ ) - , imageLayout( imageLayout_ ) - , resolveMode( resolveMode_ ) - , resolveImageView( resolveImageView_ ) - , resolveImageLayout( resolveImageLayout_ ) - , loadOp( loadOp_ ) - , storeOp( storeOp_ ) - , clearValue( clearValue_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo( RenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingAttachmentInfo( VkRenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderingAttachmentInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderingAttachmentInfo & operator=( RenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingAttachmentInfo & operator=( VkRenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT - { - imageLayout = imageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode_ ) VULKAN_HPP_NOEXCEPT - { - resolveMode = resolveMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveImageView( VULKAN_HPP_NAMESPACE::ImageView resolveImageView_ ) VULKAN_HPP_NOEXCEPT - { - resolveImageView = resolveImageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - resolveImageLayout = resolveImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT - { - loadOp = loadOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT - { - storeOp = storeOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setClearValue( VULKAN_HPP_NAMESPACE::ClearValue const & clearValue_ ) VULKAN_HPP_NOEXCEPT - { - clearValue = clearValue_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderingAttachmentInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderingAttachmentInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageView, imageLayout, resolveMode, resolveImageView, resolveImageLayout, loadOp, storeOp, clearValue ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingAttachmentInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; - VULKAN_HPP_NAMESPACE::ImageView resolveImageView = {}; - VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; - VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; - VULKAN_HPP_NAMESPACE::ClearValue clearValue = {}; - }; - - template <> - struct CppType - { - using Type = RenderingAttachmentInfo; - }; - using RenderingAttachmentInfoKHR = RenderingAttachmentInfo; - - struct RenderingFragmentDensityMapAttachmentInfoEXT - { - using NativeType = VkRenderingFragmentDensityMapAttachmentInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - RenderingFragmentDensityMapAttachmentInfoEXT( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageView( imageView_ ) - , imageLayout( imageLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR RenderingFragmentDensityMapAttachmentInfoEXT( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingFragmentDensityMapAttachmentInfoEXT( VkRenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderingFragmentDensityMapAttachmentInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderingFragmentDensityMapAttachmentInfoEXT & operator=( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingFragmentDensityMapAttachmentInfoEXT & operator=( VkRenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT - { - imageLayout = imageLayout_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderingFragmentDensityMapAttachmentInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderingFragmentDensityMapAttachmentInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageView, imageLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderingFragmentDensityMapAttachmentInfoEXT const & ) const = default; -#else - bool operator==( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ); -# endif - } - - bool operator!=( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - }; - - template <> - struct CppType - { - using Type = RenderingFragmentDensityMapAttachmentInfoEXT; - }; - - struct RenderingFragmentShadingRateAttachmentInfoKHR - { - using NativeType = VkRenderingFragmentShadingRateAttachmentInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - RenderingFragmentShadingRateAttachmentInfoKHR( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , imageView( imageView_ ) - , imageLayout( imageLayout_ ) - , shadingRateAttachmentTexelSize( shadingRateAttachmentTexelSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR - RenderingFragmentShadingRateAttachmentInfoKHR( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingFragmentShadingRateAttachmentInfoKHR( VkRenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : RenderingFragmentShadingRateAttachmentInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderingFragmentShadingRateAttachmentInfoKHR & operator=( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingFragmentShadingRateAttachmentInfoKHR & operator=( VkRenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT - { - imageView = imageView_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT - { - imageLayout = imageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & - setShadingRateAttachmentTexelSize( VULKAN_HPP_NAMESPACE::Extent2D const & shadingRateAttachmentTexelSize_ ) VULKAN_HPP_NOEXCEPT - { - shadingRateAttachmentTexelSize = shadingRateAttachmentTexelSize_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderingFragmentShadingRateAttachmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderingFragmentShadingRateAttachmentInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, imageView, imageLayout, shadingRateAttachmentTexelSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderingFragmentShadingRateAttachmentInfoKHR const & ) const = default; -#else - bool operator==( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ) && - ( shadingRateAttachmentTexelSize == rhs.shadingRateAttachmentTexelSize ); -# endif - } - - bool operator!=( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageView imageView = {}; - VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize = {}; - }; - - template <> - struct CppType - { - using Type = RenderingFragmentShadingRateAttachmentInfoKHR; - }; - - struct RenderingInfo - { - using NativeType = VkRenderingInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 RenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, - uint32_t layerCount_ = {}, - uint32_t viewMask_ = {}, - uint32_t colorAttachmentCount_ = {}, - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments_ = {}, - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ = {}, - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , renderArea( renderArea_ ) - , layerCount( layerCount_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( colorAttachmentCount_ ) - , pColorAttachments( pColorAttachments_ ) - , pDepthAttachment( pDepthAttachment_ ) - , pStencilAttachment( pStencilAttachment_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo( RenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingInfo( VkRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_, - VULKAN_HPP_NAMESPACE::Rect2D renderArea_, - uint32_t layerCount_, - uint32_t viewMask_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_, - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ = {}, - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , renderArea( renderArea_ ) - , layerCount( layerCount_ ) - , viewMask( viewMask_ ) - , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) - , pColorAttachments( colorAttachments_.data() ) - , pDepthAttachment( pDepthAttachment_ ) - , pStencilAttachment( pStencilAttachment_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - RenderingInfo & operator=( RenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - RenderingInfo & operator=( VkRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT - { - renderArea = renderArea_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT - { - viewMask = viewMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = colorAttachmentCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPColorAttachments( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - pColorAttachments = pColorAttachments_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - RenderingInfo & setColorAttachments( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT - { - colorAttachmentCount = static_cast( colorAttachments_.size() ); - pColorAttachments = colorAttachments_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPDepthAttachment( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pDepthAttachment = pDepthAttachment_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 RenderingInfo & - setPStencilAttachment( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pStencilAttachment = pStencilAttachment_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkRenderingInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkRenderingInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, renderArea, layerCount, viewMask, colorAttachmentCount, pColorAttachments, pDepthAttachment, pStencilAttachment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( RenderingInfo const & ) const = default; -#else - bool operator==( RenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( renderArea == rhs.renderArea ) && - ( layerCount == rhs.layerCount ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && - ( pColorAttachments == rhs.pColorAttachments ) && ( pDepthAttachment == rhs.pDepthAttachment ) && ( pStencilAttachment == rhs.pStencilAttachment ); -# endif - } - - bool operator!=( RenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderingFlags flags = {}; - VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; - uint32_t layerCount = {}; - uint32_t viewMask = {}; - uint32_t colorAttachmentCount = {}; - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments = {}; - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment = {}; - const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment = {}; - }; - - template <> - struct CppType - { - using Type = RenderingInfo; - }; - using RenderingInfoKHR = RenderingInfo; - - struct ResolveImageInfo2 - { - using NativeType = VkResolveImageInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eResolveImageInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ResolveImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, - uint32_t regionCount_ = {}, - const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( regionCount_ ) - , pRegions( pRegions_ ) - { - } - - VULKAN_HPP_CONSTEXPR ResolveImageInfo2( ResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ResolveImageInfo2( VkResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : ResolveImageInfo2( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ResolveImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, - VULKAN_HPP_NAMESPACE::Image dstImage_, - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , srcImage( srcImage_ ) - , srcImageLayout( srcImageLayout_ ) - , dstImage( dstImage_ ) - , dstImageLayout( dstImageLayout_ ) - , regionCount( static_cast( regions_.size() ) ) - , pRegions( regions_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ResolveImageInfo2 & operator=( ResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ResolveImageInfo2 & operator=( VkResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT - { - srcImage = srcImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - srcImageLayout = srcImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT - { - dstImage = dstImage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT - { - dstImageLayout = dstImageLayout_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = regionCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions_ ) VULKAN_HPP_NOEXCEPT - { - pRegions = pRegions_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ResolveImageInfo2 & - setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT - { - regionCount = static_cast( regions_.size() ); - pRegions = regions_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkResolveImageInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkResolveImageInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ResolveImageInfo2 const & ) const = default; -#else - bool operator==( ResolveImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && - ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); -# endif - } - - bool operator!=( ResolveImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eResolveImageInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Image srcImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - VULKAN_HPP_NAMESPACE::Image dstImage = {}; - VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; - uint32_t regionCount = {}; - const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions = {}; - }; - - template <> - struct CppType - { - using Type = ResolveImageInfo2; - }; - using ResolveImageInfo2KHR = ResolveImageInfo2; - - struct SamplerBorderColorComponentMappingCreateInfoEXT - { - using NativeType = VkSamplerBorderColorComponentMappingCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SamplerBorderColorComponentMappingCreateInfoEXT( VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 srgb_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , components( components_ ) - , srgb( srgb_ ) - { - } - - VULKAN_HPP_CONSTEXPR - SamplerBorderColorComponentMappingCreateInfoEXT( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerBorderColorComponentMappingCreateInfoEXT( VkSamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerBorderColorComponentMappingCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerBorderColorComponentMappingCreateInfoEXT & operator=( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerBorderColorComponentMappingCreateInfoEXT & operator=( VkSamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & - setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT - { - components = components_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & setSrgb( VULKAN_HPP_NAMESPACE::Bool32 srgb_ ) VULKAN_HPP_NOEXCEPT - { - srgb = srgb_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerBorderColorComponentMappingCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerBorderColorComponentMappingCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, components, srgb ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerBorderColorComponentMappingCreateInfoEXT const & ) const = default; -#else - bool operator==( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( components == rhs.components ) && ( srgb == rhs.srgb ); -# endif - } - - bool operator!=( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; - VULKAN_HPP_NAMESPACE::Bool32 srgb = {}; - }; - - template <> - struct CppType - { - using Type = SamplerBorderColorComponentMappingCreateInfoEXT; - }; - - struct SamplerCreateInfo - { - using NativeType = VkSamplerCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SamplerCreateInfo( VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags_ = {}, - VULKAN_HPP_NAMESPACE::Filter magFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, - VULKAN_HPP_NAMESPACE::Filter minFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, - VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode_ = VULKAN_HPP_NAMESPACE::SamplerMipmapMode::eNearest, - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, - float mipLodBias_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable_ = {}, - float maxAnisotropy_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 compareEnable_ = {}, - VULKAN_HPP_NAMESPACE::CompareOp compareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, - float minLod_ = {}, - float maxLod_ = {}, - VULKAN_HPP_NAMESPACE::BorderColor borderColor_ = VULKAN_HPP_NAMESPACE::BorderColor::eFloatTransparentBlack, - VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , magFilter( magFilter_ ) - , minFilter( minFilter_ ) - , mipmapMode( mipmapMode_ ) - , addressModeU( addressModeU_ ) - , addressModeV( addressModeV_ ) - , addressModeW( addressModeW_ ) - , mipLodBias( mipLodBias_ ) - , anisotropyEnable( anisotropyEnable_ ) - , maxAnisotropy( maxAnisotropy_ ) - , compareEnable( compareEnable_ ) - , compareOp( compareOp_ ) - , minLod( minLod_ ) - , maxLod( maxLod_ ) - , borderColor( borderColor_ ) - , unnormalizedCoordinates( unnormalizedCoordinates_ ) - { - } - - VULKAN_HPP_CONSTEXPR SamplerCreateInfo( SamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerCreateInfo( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerCreateInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerCreateInfo & operator=( SamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerCreateInfo & operator=( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMagFilter( VULKAN_HPP_NAMESPACE::Filter magFilter_ ) VULKAN_HPP_NOEXCEPT - { - magFilter = magFilter_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMinFilter( VULKAN_HPP_NAMESPACE::Filter minFilter_ ) VULKAN_HPP_NOEXCEPT - { - minFilter = minFilter_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMipmapMode( VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode_ ) VULKAN_HPP_NOEXCEPT - { - mipmapMode = mipmapMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeU( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU_ ) VULKAN_HPP_NOEXCEPT - { - addressModeU = addressModeU_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeV( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV_ ) VULKAN_HPP_NOEXCEPT - { - addressModeV = addressModeV_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeW( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW_ ) VULKAN_HPP_NOEXCEPT - { - addressModeW = addressModeW_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMipLodBias( float mipLodBias_ ) VULKAN_HPP_NOEXCEPT - { - mipLodBias = mipLodBias_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAnisotropyEnable( VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable_ ) VULKAN_HPP_NOEXCEPT - { - anisotropyEnable = anisotropyEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMaxAnisotropy( float maxAnisotropy_ ) VULKAN_HPP_NOEXCEPT - { - maxAnisotropy = maxAnisotropy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setCompareEnable( VULKAN_HPP_NAMESPACE::Bool32 compareEnable_ ) VULKAN_HPP_NOEXCEPT - { - compareEnable = compareEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT - { - compareOp = compareOp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMinLod( float minLod_ ) VULKAN_HPP_NOEXCEPT - { - minLod = minLod_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMaxLod( float maxLod_ ) VULKAN_HPP_NOEXCEPT - { - maxLod = maxLod_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setBorderColor( VULKAN_HPP_NAMESPACE::BorderColor borderColor_ ) VULKAN_HPP_NOEXCEPT - { - borderColor = borderColor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setUnnormalizedCoordinates( VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates_ ) VULKAN_HPP_NOEXCEPT - { - unnormalizedCoordinates = unnormalizedCoordinates_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - magFilter, - minFilter, - mipmapMode, - addressModeU, - addressModeV, - addressModeW, - mipLodBias, - anisotropyEnable, - maxAnisotropy, - compareEnable, - compareOp, - minLod, - maxLod, - borderColor, - unnormalizedCoordinates ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerCreateInfo const & ) const = default; -#else - bool operator==( SamplerCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( magFilter == rhs.magFilter ) && ( minFilter == rhs.minFilter ) && - ( mipmapMode == rhs.mipmapMode ) && ( addressModeU == rhs.addressModeU ) && ( addressModeV == rhs.addressModeV ) && - ( addressModeW == rhs.addressModeW ) && ( mipLodBias == rhs.mipLodBias ) && ( anisotropyEnable == rhs.anisotropyEnable ) && - ( maxAnisotropy == rhs.maxAnisotropy ) && ( compareEnable == rhs.compareEnable ) && ( compareOp == rhs.compareOp ) && ( minLod == rhs.minLod ) && - ( maxLod == rhs.maxLod ) && ( borderColor == rhs.borderColor ) && ( unnormalizedCoordinates == rhs.unnormalizedCoordinates ); -# endif - } - - bool operator!=( SamplerCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags = {}; - VULKAN_HPP_NAMESPACE::Filter magFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; - VULKAN_HPP_NAMESPACE::Filter minFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; - VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode = VULKAN_HPP_NAMESPACE::SamplerMipmapMode::eNearest; - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; - VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; - float mipLodBias = {}; - VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable = {}; - float maxAnisotropy = {}; - VULKAN_HPP_NAMESPACE::Bool32 compareEnable = {}; - VULKAN_HPP_NAMESPACE::CompareOp compareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; - float minLod = {}; - float maxLod = {}; - VULKAN_HPP_NAMESPACE::BorderColor borderColor = VULKAN_HPP_NAMESPACE::BorderColor::eFloatTransparentBlack; - VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates = {}; - }; - - template <> - struct CppType - { - using Type = SamplerCreateInfo; - }; - - struct SamplerCustomBorderColorCreateInfoEXT - { - using NativeType = VkSamplerCustomBorderColorCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCustomBorderColorCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT( VULKAN_HPP_NAMESPACE::ClearColorValue customBorderColor_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , customBorderColor( customBorderColor_ ) - , format( format_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT( SamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerCustomBorderColorCreateInfoEXT( VkSamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerCustomBorderColorCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerCustomBorderColorCreateInfoEXT & operator=( SamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerCustomBorderColorCreateInfoEXT & operator=( VkSamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & - setCustomBorderColor( VULKAN_HPP_NAMESPACE::ClearColorValue const & customBorderColor_ ) VULKAN_HPP_NOEXCEPT - { - customBorderColor = customBorderColor_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerCustomBorderColorCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerCustomBorderColorCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, customBorderColor, format ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCustomBorderColorCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ClearColorValue customBorderColor = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - }; - - template <> - struct CppType - { - using Type = SamplerCustomBorderColorCreateInfoEXT; - }; - - struct SamplerReductionModeCreateInfo - { - using NativeType = VkSamplerReductionModeCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerReductionModeCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SamplerReductionModeCreateInfo( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , reductionMode( reductionMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfo( SamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerReductionModeCreateInfo( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerReductionModeCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerReductionModeCreateInfo & operator=( SamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerReductionModeCreateInfo & operator=( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerReductionModeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerReductionModeCreateInfo & setReductionMode( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ ) VULKAN_HPP_NOEXCEPT - { - reductionMode = reductionMode_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerReductionModeCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerReductionModeCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, reductionMode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerReductionModeCreateInfo const & ) const = default; -#else - bool operator==( SamplerReductionModeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( reductionMode == rhs.reductionMode ); -# endif - } - - bool operator!=( SamplerReductionModeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerReductionModeCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage; - }; - - template <> - struct CppType - { - using Type = SamplerReductionModeCreateInfo; - }; - using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; - - struct SamplerYcbcrConversionCreateInfo - { - using NativeType = VkSamplerYcbcrConversionCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, - VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, - VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, - VULKAN_HPP_NAMESPACE::Filter chromaFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, - VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , ycbcrModel( ycbcrModel_ ) - , ycbcrRange( ycbcrRange_ ) - , components( components_ ) - , xChromaOffset( xChromaOffset_ ) - , yChromaOffset( yChromaOffset_ ) - , chromaFilter( chromaFilter_ ) - , forceExplicitReconstruction( forceExplicitReconstruction_ ) - { - } - - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( SamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionCreateInfo( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerYcbcrConversionCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerYcbcrConversionCreateInfo & operator=( SamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionCreateInfo & operator=( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & - setYcbcrModel( VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel_ ) VULKAN_HPP_NOEXCEPT - { - ycbcrModel = ycbcrModel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setYcbcrRange( VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange_ ) VULKAN_HPP_NOEXCEPT - { - ycbcrRange = ycbcrRange_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT - { - components = components_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setXChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset_ ) VULKAN_HPP_NOEXCEPT - { - xChromaOffset = xChromaOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setYChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset_ ) VULKAN_HPP_NOEXCEPT - { - yChromaOffset = yChromaOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setChromaFilter( VULKAN_HPP_NAMESPACE::Filter chromaFilter_ ) VULKAN_HPP_NOEXCEPT - { - chromaFilter = chromaFilter_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & - setForceExplicitReconstruction( VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction_ ) VULKAN_HPP_NOEXCEPT - { - forceExplicitReconstruction = forceExplicitReconstruction_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerYcbcrConversionCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerYcbcrConversionCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, format, ycbcrModel, ycbcrRange, components, xChromaOffset, yChromaOffset, chromaFilter, forceExplicitReconstruction ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversionCreateInfo const & ) const = default; -#else - bool operator==( SamplerYcbcrConversionCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( ycbcrModel == rhs.ycbcrModel ) && - ( ycbcrRange == rhs.ycbcrRange ) && ( components == rhs.components ) && ( xChromaOffset == rhs.xChromaOffset ) && - ( yChromaOffset == rhs.yChromaOffset ) && ( chromaFilter == rhs.chromaFilter ) && - ( forceExplicitReconstruction == rhs.forceExplicitReconstruction ); -# endif - } - - bool operator!=( SamplerYcbcrConversionCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; - VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; - VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; - VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; - VULKAN_HPP_NAMESPACE::Filter chromaFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; - VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction = {}; - }; - - template <> - struct CppType - { - using Type = SamplerYcbcrConversionCreateInfo; - }; - using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; - - struct SamplerYcbcrConversionImageFormatProperties - { - using NativeType = VkSamplerYcbcrConversionImageFormatProperties; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionImageFormatProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionImageFormatProperties( uint32_t combinedImageSamplerDescriptorCount_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , combinedImageSamplerDescriptorCount( combinedImageSamplerDescriptorCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionImageFormatProperties( SamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionImageFormatProperties( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerYcbcrConversionImageFormatProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerYcbcrConversionImageFormatProperties & operator=( SamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionImageFormatProperties & operator=( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSamplerYcbcrConversionImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerYcbcrConversionImageFormatProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, combinedImageSamplerDescriptorCount ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversionImageFormatProperties const & ) const = default; -#else - bool operator==( SamplerYcbcrConversionImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( combinedImageSamplerDescriptorCount == rhs.combinedImageSamplerDescriptorCount ); -# endif - } - - bool operator!=( SamplerYcbcrConversionImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatProperties; - void * pNext = {}; - uint32_t combinedImageSamplerDescriptorCount = {}; - }; - - template <> - struct CppType - { - using Type = SamplerYcbcrConversionImageFormatProperties; - }; - using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; - - struct SamplerYcbcrConversionInfo - { - using NativeType = VkSamplerYcbcrConversionInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , conversion( conversion_ ) - { - } - - VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( SamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionInfo( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SamplerYcbcrConversionInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SamplerYcbcrConversionInfo & operator=( SamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SamplerYcbcrConversionInfo & operator=( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionInfo & setConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ ) VULKAN_HPP_NOEXCEPT - { - conversion = conversion_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSamplerYcbcrConversionInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSamplerYcbcrConversionInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, conversion ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SamplerYcbcrConversionInfo const & ) const = default; -#else - bool operator==( SamplerYcbcrConversionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conversion == rhs.conversion ); -# endif - } - - bool operator!=( SamplerYcbcrConversionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion = {}; - }; - - template <> - struct CppType - { - using Type = SamplerYcbcrConversionInfo; - }; - using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - struct ScreenSurfaceCreateInfoQNX - { - using NativeType = VkScreenSurfaceCreateInfoQNX; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eScreenSurfaceCreateInfoQNX; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ScreenSurfaceCreateInfoQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags_ = {}, - struct _screen_context * context_ = {}, - struct _screen_window * window_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , context( context_ ) - , window( window_ ) - { - } - - VULKAN_HPP_CONSTEXPR ScreenSurfaceCreateInfoQNX( ScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ScreenSurfaceCreateInfoQNX( VkScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT - : ScreenSurfaceCreateInfoQNX( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ScreenSurfaceCreateInfoQNX & operator=( ScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ScreenSurfaceCreateInfoQNX & operator=( VkScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setFlags( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setContext( struct _screen_context * context_ ) VULKAN_HPP_NOEXCEPT - { - context = context_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setWindow( struct _screen_window * window_ ) VULKAN_HPP_NOEXCEPT - { - window = window_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkScreenSurfaceCreateInfoQNX const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkScreenSurfaceCreateInfoQNX &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, context, window ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ScreenSurfaceCreateInfoQNX const & ) const = default; -# else - bool operator==( ScreenSurfaceCreateInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( context == rhs.context ) && ( window == rhs.window ); -# endif - } - - bool operator!=( ScreenSurfaceCreateInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eScreenSurfaceCreateInfoQNX; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags = {}; - struct _screen_context * context = {}; - struct _screen_window * window = {}; - }; - - template <> - struct CppType - { - using Type = ScreenSurfaceCreateInfoQNX; - }; -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - struct SemaphoreCreateInfo - { - using NativeType = VkSemaphoreCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( SemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreCreateInfo( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreCreateInfo & operator=( SemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreCreateInfo & operator=( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreCreateInfo const & ) const = default; -#else - bool operator==( SemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( SemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags = {}; - }; - - template <> - struct CppType - { - using Type = SemaphoreCreateInfo; - }; - - struct SemaphoreGetFdInfoKHR - { - using NativeType = VkSemaphoreGetFdInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetFdInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( SemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetFdInfoKHR( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SemaphoreGetFdInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreGetFdInfoKHR & operator=( SemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetFdInfoKHR & operator=( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, handleType ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreGetFdInfoKHR const & ) const = default; -#else - bool operator==( SemaphoreGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( SemaphoreGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetFdInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = SemaphoreGetFdInfoKHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct SemaphoreGetWin32HandleInfoKHR - { - using NativeType = VkSemaphoreGetWin32HandleInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetWin32HandleInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( SemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetWin32HandleInfoKHR( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SemaphoreGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreGetWin32HandleInfoKHR & operator=( SemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetWin32HandleInfoKHR & operator=( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, handleType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreGetWin32HandleInfoKHR const & ) const = default; -# else - bool operator==( SemaphoreGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( SemaphoreGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = SemaphoreGetWin32HandleInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - struct SemaphoreGetZirconHandleInfoFUCHSIA - { - using NativeType = VkSemaphoreGetZirconHandleInfoFUCHSIA; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreGetZirconHandleInfoFUCHSIA( - VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , handleType( handleType_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreGetZirconHandleInfoFUCHSIA( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetZirconHandleInfoFUCHSIA( VkSemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - : SemaphoreGetZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreGetZirconHandleInfoFUCHSIA & operator=( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreGetZirconHandleInfoFUCHSIA & operator=( VkSemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & - setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT - { - handleType = handleType_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreGetZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, handleType ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreGetZirconHandleInfoFUCHSIA const & ) const = default; -# else - bool operator==( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); -# endif - } - - bool operator!=( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; - }; - - template <> - struct CppType - { - using Type = SemaphoreGetZirconHandleInfoFUCHSIA; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - struct SemaphoreSignalInfo - { - using NativeType = VkSemaphoreSignalInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreSignalInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SemaphoreSignalInfo( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, uint64_t value_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , value( value_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreSignalInfo( SemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreSignalInfo( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreSignalInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreSignalInfo & operator=( SemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreSignalInfo & operator=( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT - { - value = value_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreSignalInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreSignalInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, value ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreSignalInfo const & ) const = default; -#else - bool operator==( SemaphoreSignalInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( value == rhs.value ); -# endif - } - - bool operator!=( SemaphoreSignalInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreSignalInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - uint64_t value = {}; - }; - - template <> - struct CppType - { - using Type = SemaphoreSignalInfo; - }; - using SemaphoreSignalInfoKHR = SemaphoreSignalInfo; - - struct SemaphoreSubmitInfo - { - using NativeType = VkSemaphoreSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreSubmitInfo( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, - uint64_t value_ = {}, - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask_ = {}, - uint32_t deviceIndex_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphore( semaphore_ ) - , value( value_ ) - , stageMask( stageMask_ ) - , deviceIndex( deviceIndex_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreSubmitInfo( SemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreSubmitInfo( VkSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreSubmitInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreSubmitInfo & operator=( SemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreSubmitInfo & operator=( VkSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT - { - semaphore = semaphore_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT - { - value = value_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask_ ) VULKAN_HPP_NOEXCEPT - { - stageMask = stageMask_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setDeviceIndex( uint32_t deviceIndex_ ) VULKAN_HPP_NOEXCEPT - { - deviceIndex = deviceIndex_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphore, value, stageMask, deviceIndex ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreSubmitInfo const & ) const = default; -#else - bool operator==( SemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( value == rhs.value ) && ( stageMask == rhs.stageMask ) && - ( deviceIndex == rhs.deviceIndex ); -# endif - } - - bool operator!=( SemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreSubmitInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; - uint64_t value = {}; - VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask = {}; - uint32_t deviceIndex = {}; - }; - - template <> - struct CppType - { - using Type = SemaphoreSubmitInfo; - }; - using SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; - - struct SemaphoreTypeCreateInfo - { - using NativeType = VkSemaphoreTypeCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreTypeCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary, - uint64_t initialValue_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , semaphoreType( semaphoreType_ ) - , initialValue( initialValue_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfo( SemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreTypeCreateInfo( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : SemaphoreTypeCreateInfo( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreTypeCreateInfo & operator=( SemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreTypeCreateInfo & operator=( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setSemaphoreType( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ ) VULKAN_HPP_NOEXCEPT - { - semaphoreType = semaphoreType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setInitialValue( uint64_t initialValue_ ) VULKAN_HPP_NOEXCEPT - { - initialValue = initialValue_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreTypeCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreTypeCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, semaphoreType, initialValue ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreTypeCreateInfo const & ) const = default; -#else - bool operator==( SemaphoreTypeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphoreType == rhs.semaphoreType ) && ( initialValue == rhs.initialValue ); -# endif - } - - bool operator!=( SemaphoreTypeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreTypeCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary; - uint64_t initialValue = {}; - }; - - template <> - struct CppType - { - using Type = SemaphoreTypeCreateInfo; - }; - using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; - - struct SemaphoreWaitInfo - { - using NativeType = VkSemaphoreWaitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreWaitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SemaphoreWaitInfo( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ = {}, - uint32_t semaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores_ = {}, - const uint64_t * pValues_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , semaphoreCount( semaphoreCount_ ) - , pSemaphores( pSemaphores_ ) - , pValues( pValues_ ) - { - } - - VULKAN_HPP_CONSTEXPR SemaphoreWaitInfo( SemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreWaitInfo( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreWaitInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SemaphoreWaitInfo( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & semaphores_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , semaphoreCount( static_cast( semaphores_.size() ) ) - , pSemaphores( semaphores_.data() ) - , pValues( values_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( semaphores_.size() == values_.size() ); -# else - if ( semaphores_.size() != values_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SemaphoreWaitInfo::SemaphoreWaitInfo: semaphores_.size() != values_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SemaphoreWaitInfo & operator=( SemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SemaphoreWaitInfo & operator=( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setSemaphoreCount( uint32_t semaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - semaphoreCount = semaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pSemaphores = pSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SemaphoreWaitInfo & - setSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & semaphores_ ) VULKAN_HPP_NOEXCEPT - { - semaphoreCount = static_cast( semaphores_.size() ); - pSemaphores = semaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPValues( const uint64_t * pValues_ ) VULKAN_HPP_NOEXCEPT - { - pValues = pValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SemaphoreWaitInfo & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT - { - semaphoreCount = static_cast( values_.size() ); - pValues = values_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSemaphoreWaitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSemaphoreWaitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, semaphoreCount, pSemaphores, pValues ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SemaphoreWaitInfo const & ) const = default; -#else - bool operator==( SemaphoreWaitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( semaphoreCount == rhs.semaphoreCount ) && - ( pSemaphores == rhs.pSemaphores ) && ( pValues == rhs.pValues ); -# endif - } - - bool operator!=( SemaphoreWaitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreWaitInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags = {}; - uint32_t semaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores = {}; - const uint64_t * pValues = {}; - }; - - template <> - struct CppType - { - using Type = SemaphoreWaitInfo; - }; - using SemaphoreWaitInfoKHR = SemaphoreWaitInfo; - - struct SetStateFlagsIndirectCommandNV - { - using NativeType = VkSetStateFlagsIndirectCommandNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SetStateFlagsIndirectCommandNV( uint32_t data_ = {} ) VULKAN_HPP_NOEXCEPT : data( data_ ) {} - - VULKAN_HPP_CONSTEXPR SetStateFlagsIndirectCommandNV( SetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SetStateFlagsIndirectCommandNV( VkSetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - : SetStateFlagsIndirectCommandNV( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SetStateFlagsIndirectCommandNV & operator=( SetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SetStateFlagsIndirectCommandNV & operator=( VkSetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SetStateFlagsIndirectCommandNV & setData( uint32_t data_ ) VULKAN_HPP_NOEXCEPT - { - data = data_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSetStateFlagsIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSetStateFlagsIndirectCommandNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( data ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SetStateFlagsIndirectCommandNV const & ) const = default; -#else - bool operator==( SetStateFlagsIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( data == rhs.data ); -# endif - } - - bool operator!=( SetStateFlagsIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t data = {}; - }; - - struct ShaderModuleCreateInfo - { - using NativeType = VkShaderModuleCreateInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleCreateInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ = {}, - size_t codeSize_ = {}, - const uint32_t * pCode_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , codeSize( codeSize_ ) - , pCode( pCode_ ) - { - } - - VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( ShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleCreateInfo( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : ShaderModuleCreateInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), codeSize( code_.size() * 4 ), pCode( code_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShaderModuleCreateInfo & operator=( ShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleCreateInfo & operator=( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setCodeSize( size_t codeSize_ ) VULKAN_HPP_NOEXCEPT - { - codeSize = codeSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setPCode( const uint32_t * pCode_ ) VULKAN_HPP_NOEXCEPT - { - pCode = pCode_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ShaderModuleCreateInfo & setCode( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_ ) VULKAN_HPP_NOEXCEPT - { - codeSize = code_.size() * 4; - pCode = code_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkShaderModuleCreateInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShaderModuleCreateInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, codeSize, pCode ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModuleCreateInfo const & ) const = default; -#else - bool operator==( ShaderModuleCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( codeSize == rhs.codeSize ) && ( pCode == rhs.pCode ); -# endif - } - - bool operator!=( ShaderModuleCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleCreateInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags = {}; - size_t codeSize = {}; - const uint32_t * pCode = {}; - }; - - template <> - struct CppType - { - using Type = ShaderModuleCreateInfo; - }; - - struct ShaderModuleIdentifierEXT - { - using NativeType = VkShaderModuleIdentifierEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleIdentifierEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ShaderModuleIdentifierEXT( uint32_t identifierSize_ = {}, - std::array const & identifier_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , identifierSize( identifierSize_ ) - , identifier( identifier_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ShaderModuleIdentifierEXT( ShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleIdentifierEXT( VkShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ShaderModuleIdentifierEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShaderModuleIdentifierEXT & operator=( ShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleIdentifierEXT & operator=( VkShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkShaderModuleIdentifierEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShaderModuleIdentifierEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, identifierSize, identifier ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModuleIdentifierEXT const & ) const = default; -#else - bool operator==( ShaderModuleIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( identifierSize == rhs.identifierSize ) && ( identifier == rhs.identifier ); -# endif - } - - bool operator!=( ShaderModuleIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleIdentifierEXT; - void * pNext = {}; - uint32_t identifierSize = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D identifier = {}; - }; - - template <> - struct CppType - { - using Type = ShaderModuleIdentifierEXT; - }; - - struct ShaderModuleValidationCacheCreateInfoEXT - { - using NativeType = VkShaderModuleValidationCacheCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleValidationCacheCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , validationCache( validationCache_ ) - { - } - - VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ShaderModuleValidationCacheCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShaderModuleValidationCacheCreateInfoEXT & operator=( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderModuleValidationCacheCreateInfoEXT & operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ShaderModuleValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ShaderModuleValidationCacheCreateInfoEXT & - setValidationCache( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ ) VULKAN_HPP_NOEXCEPT - { - validationCache = validationCache_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkShaderModuleValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShaderModuleValidationCacheCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, validationCache ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderModuleValidationCacheCreateInfoEXT const & ) const = default; -#else - bool operator==( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( validationCache == rhs.validationCache ); -# endif - } - - bool operator!=( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache = {}; - }; - - template <> - struct CppType - { - using Type = ShaderModuleValidationCacheCreateInfoEXT; - }; - - struct ShaderResourceUsageAMD - { - using NativeType = VkShaderResourceUsageAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ShaderResourceUsageAMD( uint32_t numUsedVgprs_ = {}, - uint32_t numUsedSgprs_ = {}, - uint32_t ldsSizePerLocalWorkGroup_ = {}, - size_t ldsUsageSizeInBytes_ = {}, - size_t scratchMemUsageInBytes_ = {} ) VULKAN_HPP_NOEXCEPT - : numUsedVgprs( numUsedVgprs_ ) - , numUsedSgprs( numUsedSgprs_ ) - , ldsSizePerLocalWorkGroup( ldsSizePerLocalWorkGroup_ ) - , ldsUsageSizeInBytes( ldsUsageSizeInBytes_ ) - , scratchMemUsageInBytes( scratchMemUsageInBytes_ ) - { - } - - VULKAN_HPP_CONSTEXPR ShaderResourceUsageAMD( ShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderResourceUsageAMD( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : ShaderResourceUsageAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShaderResourceUsageAMD & operator=( ShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderResourceUsageAMD & operator=( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkShaderResourceUsageAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShaderResourceUsageAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( numUsedVgprs, numUsedSgprs, ldsSizePerLocalWorkGroup, ldsUsageSizeInBytes, scratchMemUsageInBytes ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderResourceUsageAMD const & ) const = default; -#else - bool operator==( ShaderResourceUsageAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( numUsedVgprs == rhs.numUsedVgprs ) && ( numUsedSgprs == rhs.numUsedSgprs ) && ( ldsSizePerLocalWorkGroup == rhs.ldsSizePerLocalWorkGroup ) && - ( ldsUsageSizeInBytes == rhs.ldsUsageSizeInBytes ) && ( scratchMemUsageInBytes == rhs.scratchMemUsageInBytes ); -# endif - } - - bool operator!=( ShaderResourceUsageAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t numUsedVgprs = {}; - uint32_t numUsedSgprs = {}; - uint32_t ldsSizePerLocalWorkGroup = {}; - size_t ldsUsageSizeInBytes = {}; - size_t scratchMemUsageInBytes = {}; - }; - - struct ShaderStatisticsInfoAMD - { - using NativeType = VkShaderStatisticsInfoAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 ShaderStatisticsInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStageMask_ = {}, - VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD resourceUsage_ = {}, - uint32_t numPhysicalVgprs_ = {}, - uint32_t numPhysicalSgprs_ = {}, - uint32_t numAvailableVgprs_ = {}, - uint32_t numAvailableSgprs_ = {}, - std::array const & computeWorkGroupSize_ = {} ) VULKAN_HPP_NOEXCEPT - : shaderStageMask( shaderStageMask_ ) - , resourceUsage( resourceUsage_ ) - , numPhysicalVgprs( numPhysicalVgprs_ ) - , numPhysicalSgprs( numPhysicalSgprs_ ) - , numAvailableVgprs( numAvailableVgprs_ ) - , numAvailableSgprs( numAvailableSgprs_ ) - , computeWorkGroupSize( computeWorkGroupSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 ShaderStatisticsInfoAMD( ShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderStatisticsInfoAMD( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : ShaderStatisticsInfoAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ShaderStatisticsInfoAMD & operator=( ShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ShaderStatisticsInfoAMD & operator=( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkShaderStatisticsInfoAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkShaderStatisticsInfoAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple const &> -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( shaderStageMask, resourceUsage, numPhysicalVgprs, numPhysicalSgprs, numAvailableVgprs, numAvailableSgprs, computeWorkGroupSize ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ShaderStatisticsInfoAMD const & ) const = default; -#else - bool operator==( ShaderStatisticsInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( shaderStageMask == rhs.shaderStageMask ) && ( resourceUsage == rhs.resourceUsage ) && ( numPhysicalVgprs == rhs.numPhysicalVgprs ) && - ( numPhysicalSgprs == rhs.numPhysicalSgprs ) && ( numAvailableVgprs == rhs.numAvailableVgprs ) && ( numAvailableSgprs == rhs.numAvailableSgprs ) && - ( computeWorkGroupSize == rhs.computeWorkGroupSize ); -# endif - } - - bool operator!=( ShaderStatisticsInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStageMask = {}; - VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD resourceUsage = {}; - uint32_t numPhysicalVgprs = {}; - uint32_t numPhysicalSgprs = {}; - uint32_t numAvailableVgprs = {}; - uint32_t numAvailableSgprs = {}; - VULKAN_HPP_NAMESPACE::ArrayWrapper1D computeWorkGroupSize = {}; - }; - - struct SharedPresentSurfaceCapabilitiesKHR - { - using NativeType = VkSharedPresentSurfaceCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSharedPresentSurfaceCapabilitiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SharedPresentSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , sharedPresentSupportedUsageFlags( sharedPresentSupportedUsageFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SharedPresentSurfaceCapabilitiesKHR( SharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SharedPresentSurfaceCapabilitiesKHR( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SharedPresentSurfaceCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SharedPresentSurfaceCapabilitiesKHR & operator=( SharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SharedPresentSurfaceCapabilitiesKHR & operator=( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSharedPresentSurfaceCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSharedPresentSurfaceCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, sharedPresentSupportedUsageFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SharedPresentSurfaceCapabilitiesKHR const & ) const = default; -#else - bool operator==( SharedPresentSurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sharedPresentSupportedUsageFlags == rhs.sharedPresentSupportedUsageFlags ); -# endif - } - - bool operator!=( SharedPresentSurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags = {}; - }; - - template <> - struct CppType - { - using Type = SharedPresentSurfaceCapabilitiesKHR; - }; - - struct SparseImageFormatProperties - { - using NativeType = VkSparseImageFormatProperties; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageFormatProperties( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, - VULKAN_HPP_NAMESPACE::Extent3D imageGranularity_ = {}, - VULKAN_HPP_NAMESPACE::SparseImageFormatFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT - : aspectMask( aspectMask_ ) - , imageGranularity( imageGranularity_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageFormatProperties( SparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageFormatProperties( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageFormatProperties( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageFormatProperties & operator=( SparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageFormatProperties & operator=( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSparseImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageFormatProperties &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( aspectMask, imageGranularity, flags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageFormatProperties const & ) const = default; -#else - bool operator==( SparseImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( aspectMask == rhs.aspectMask ) && ( imageGranularity == rhs.imageGranularity ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( SparseImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; - VULKAN_HPP_NAMESPACE::Extent3D imageGranularity = {}; - VULKAN_HPP_NAMESPACE::SparseImageFormatFlags flags = {}; - }; - - struct SparseImageFormatProperties2 - { - using NativeType = VkSparseImageFormatProperties2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSparseImageFormatProperties2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageFormatProperties2( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , properties( properties_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageFormatProperties2( SparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageFormatProperties2( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageFormatProperties2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageFormatProperties2 & operator=( SparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageFormatProperties2 & operator=( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSparseImageFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageFormatProperties2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, properties ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageFormatProperties2 const & ) const = default; -#else - bool operator==( SparseImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( properties == rhs.properties ); -# endif - } - - bool operator!=( SparseImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageFormatProperties2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties = {}; - }; - - template <> - struct CppType - { - using Type = SparseImageFormatProperties2; - }; - using SparseImageFormatProperties2KHR = SparseImageFormatProperties2; - - struct SparseImageMemoryRequirements - { - using NativeType = VkSparseImageMemoryRequirements; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties formatProperties_ = {}, - uint32_t imageMipTailFirstLod_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailStride_ = {} ) VULKAN_HPP_NOEXCEPT - : formatProperties( formatProperties_ ) - , imageMipTailFirstLod( imageMipTailFirstLod_ ) - , imageMipTailSize( imageMipTailSize_ ) - , imageMipTailOffset( imageMipTailOffset_ ) - , imageMipTailStride( imageMipTailStride_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements( SparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryRequirements( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageMemoryRequirements( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageMemoryRequirements & operator=( SparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryRequirements & operator=( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSparseImageMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageMemoryRequirements &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( formatProperties, imageMipTailFirstLod, imageMipTailSize, imageMipTailOffset, imageMipTailStride ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageMemoryRequirements const & ) const = default; -#else - bool operator==( SparseImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( formatProperties == rhs.formatProperties ) && ( imageMipTailFirstLod == rhs.imageMipTailFirstLod ) && - ( imageMipTailSize == rhs.imageMipTailSize ) && ( imageMipTailOffset == rhs.imageMipTailOffset ) && - ( imageMipTailStride == rhs.imageMipTailStride ); -# endif - } - - bool operator!=( SparseImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::SparseImageFormatProperties formatProperties = {}; - uint32_t imageMipTailFirstLod = {}; - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailStride = {}; - }; - - struct SparseImageMemoryRequirements2 - { - using NativeType = VkSparseImageMemoryRequirements2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSparseImageMemoryRequirements2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements2( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryRequirements( memoryRequirements_ ) - { - } - - VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements2( SparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryRequirements2( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT - : SparseImageMemoryRequirements2( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SparseImageMemoryRequirements2 & operator=( SparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SparseImageMemoryRequirements2 & operator=( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSparseImageMemoryRequirements2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSparseImageMemoryRequirements2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryRequirements ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SparseImageMemoryRequirements2 const & ) const = default; -#else - bool operator==( SparseImageMemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryRequirements == rhs.memoryRequirements ); -# endif - } - - bool operator!=( SparseImageMemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageMemoryRequirements2; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements = {}; - }; - - template <> - struct CppType - { - using Type = SparseImageMemoryRequirements2; - }; - using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; - -#if defined( VK_USE_PLATFORM_GGP ) - struct StreamDescriptorSurfaceCreateInfoGGP - { - using NativeType = VkStreamDescriptorSurfaceCreateInfoGGP; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ = {}, - GgpStreamDescriptor streamDescriptor_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , streamDescriptor( streamDescriptor_ ) - { - } - - VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StreamDescriptorSurfaceCreateInfoGGP( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT - : StreamDescriptorSurfaceCreateInfoGGP( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - StreamDescriptorSurfaceCreateInfoGGP & operator=( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StreamDescriptorSurfaceCreateInfoGGP & operator=( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & - setFlags( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & setStreamDescriptor( GgpStreamDescriptor streamDescriptor_ ) VULKAN_HPP_NOEXCEPT - { - streamDescriptor = streamDescriptor_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkStreamDescriptorSurfaceCreateInfoGGP const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkStreamDescriptorSurfaceCreateInfoGGP &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, streamDescriptor ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &streamDescriptor, &rhs.streamDescriptor, sizeof( GgpStreamDescriptor ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( memcmp( &streamDescriptor, &rhs.streamDescriptor, sizeof( GgpStreamDescriptor ) ) == 0 ); - } - - bool operator!=( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags = {}; - GgpStreamDescriptor streamDescriptor = {}; - }; - - template <> - struct CppType - { - using Type = StreamDescriptorSurfaceCreateInfoGGP; - }; -#endif /*VK_USE_PLATFORM_GGP*/ - - struct StridedDeviceAddressRegionKHR - { - using NativeType = VkStridedDeviceAddressRegionKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR StridedDeviceAddressRegionKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize stride_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT - : deviceAddress( deviceAddress_ ) - , stride( stride_ ) - , size( size_ ) - { - } - - VULKAN_HPP_CONSTEXPR StridedDeviceAddressRegionKHR( StridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StridedDeviceAddressRegionKHR( VkStridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : StridedDeviceAddressRegionKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - StridedDeviceAddressRegionKHR & operator=( StridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - StridedDeviceAddressRegionKHR & operator=( VkStridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT - { - deviceAddress = deviceAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setStride( VULKAN_HPP_NAMESPACE::DeviceSize stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT - { - size = size_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkStridedDeviceAddressRegionKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkStridedDeviceAddressRegionKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( deviceAddress, stride, size ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( StridedDeviceAddressRegionKHR const & ) const = default; -#else - bool operator==( StridedDeviceAddressRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( deviceAddress == rhs.deviceAddress ) && ( stride == rhs.stride ) && ( size == rhs.size ); -# endif - } - - bool operator!=( StridedDeviceAddressRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize stride = {}; - VULKAN_HPP_NAMESPACE::DeviceSize size = {}; - }; - - struct SubmitInfo - { - using NativeType = VkSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubmitInfo( uint32_t waitSemaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, - const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask_ = {}, - uint32_t commandBufferCount_ = {}, - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers_ = {}, - uint32_t signalSemaphoreCount_ = {}, - const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreCount( waitSemaphoreCount_ ) - , pWaitSemaphores( pWaitSemaphores_ ) - , pWaitDstStageMask( pWaitDstStageMask_ ) - , commandBufferCount( commandBufferCount_ ) - , pCommandBuffers( pCommandBuffers_ ) - , signalSemaphoreCount( signalSemaphoreCount_ ) - , pSignalSemaphores( pSignalSemaphores_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubmitInfo( SubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubmitInfo( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubmitInfo( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitDstStageMask_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBuffers_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) - , pWaitSemaphores( waitSemaphores_.data() ) - , pWaitDstStageMask( waitDstStageMask_.data() ) - , commandBufferCount( static_cast( commandBuffers_.size() ) ) - , pCommandBuffers( commandBuffers_.data() ) - , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) - , pSignalSemaphores( signalSemaphores_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( waitSemaphores_.size() == waitDstStageMask_.size() ); -# else - if ( waitSemaphores_.size() != waitDstStageMask_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SubmitInfo::SubmitInfo: waitSemaphores_.size() != waitDstStageMask_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubmitInfo & operator=( SubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubmitInfo & operator=( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = waitSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphores = pWaitSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo & - setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = static_cast( waitSemaphores_.size() ); - pWaitSemaphores = waitSemaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPWaitDstStageMask( const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask_ ) VULKAN_HPP_NOEXCEPT - { - pWaitDstStageMask = pWaitDstStageMask_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo & setWaitDstStageMask( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitDstStageMask_ ) - VULKAN_HPP_NOEXCEPT - { - waitSemaphoreCount = static_cast( waitDstStageMask_.size() ); - pWaitDstStageMask = waitDstStageMask_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferCount = commandBufferCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers_ ) VULKAN_HPP_NOEXCEPT - { - pCommandBuffers = pCommandBuffers_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo & - setCommandBuffers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBuffers_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferCount = static_cast( commandBuffers_.size() ); - pCommandBuffers = commandBuffers_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = signalSemaphoreCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphores = pSignalSemaphores_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo & - setSignalSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreCount = static_cast( signalSemaphores_.size() ); - pSignalSemaphores = signalSemaphores_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, waitSemaphoreCount, pWaitSemaphores, pWaitDstStageMask, commandBufferCount, pCommandBuffers, signalSemaphoreCount, pSignalSemaphores ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubmitInfo const & ) const = default; -#else - bool operator==( SubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && - ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( pWaitDstStageMask == rhs.pWaitDstStageMask ) && ( commandBufferCount == rhs.commandBufferCount ) && - ( pCommandBuffers == rhs.pCommandBuffers ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && - ( pSignalSemaphores == rhs.pSignalSemaphores ); -# endif - } - - bool operator!=( SubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubmitInfo; - const void * pNext = {}; - uint32_t waitSemaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; - const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask = {}; - uint32_t commandBufferCount = {}; - const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers = {}; - uint32_t signalSemaphoreCount = {}; - const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores = {}; - }; - - template <> - struct CppType - { - using Type = SubmitInfo; - }; - - struct SubmitInfo2 - { - using NativeType = VkSubmitInfo2; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubmitInfo2; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubmitInfo2( VULKAN_HPP_NAMESPACE::SubmitFlags flags_ = {}, - uint32_t waitSemaphoreInfoCount_ = {}, - const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos_ = {}, - uint32_t commandBufferInfoCount_ = {}, - const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos_ = {}, - uint32_t signalSemaphoreInfoCount_ = {}, - const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , waitSemaphoreInfoCount( waitSemaphoreInfoCount_ ) - , pWaitSemaphoreInfos( pWaitSemaphoreInfos_ ) - , commandBufferInfoCount( commandBufferInfoCount_ ) - , pCommandBufferInfos( pCommandBufferInfos_ ) - , signalSemaphoreInfoCount( signalSemaphoreInfoCount_ ) - , pSignalSemaphoreInfos( pSignalSemaphoreInfos_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubmitInfo2( SubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubmitInfo2( VkSubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubmitInfo2( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo2( VULKAN_HPP_NAMESPACE::SubmitFlags flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreInfos_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferInfos_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreInfos_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , waitSemaphoreInfoCount( static_cast( waitSemaphoreInfos_.size() ) ) - , pWaitSemaphoreInfos( waitSemaphoreInfos_.data() ) - , commandBufferInfoCount( static_cast( commandBufferInfos_.size() ) ) - , pCommandBufferInfos( commandBufferInfos_.data() ) - , signalSemaphoreInfoCount( static_cast( signalSemaphoreInfos_.size() ) ) - , pSignalSemaphoreInfos( signalSemaphoreInfos_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubmitInfo2 & operator=( SubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubmitInfo2 & operator=( VkSubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setFlags( VULKAN_HPP_NAMESPACE::SubmitFlags flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setWaitSemaphoreInfoCount( uint32_t waitSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreInfoCount = waitSemaphoreInfoCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPWaitSemaphoreInfos( const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphoreInfos = pWaitSemaphoreInfos_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo2 & setWaitSemaphoreInfos( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreInfoCount = static_cast( waitSemaphoreInfos_.size() ); - pWaitSemaphoreInfos = waitSemaphoreInfos_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setCommandBufferInfoCount( uint32_t commandBufferInfoCount_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferInfoCount = commandBufferInfoCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & - setPCommandBufferInfos( const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos_ ) VULKAN_HPP_NOEXCEPT - { - pCommandBufferInfos = pCommandBufferInfos_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo2 & setCommandBufferInfos( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferInfos_ ) VULKAN_HPP_NOEXCEPT - { - commandBufferInfoCount = static_cast( commandBufferInfos_.size() ); - pCommandBufferInfos = commandBufferInfos_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setSignalSemaphoreInfoCount( uint32_t signalSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreInfoCount = signalSemaphoreInfoCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & - setPSignalSemaphoreInfos( const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphoreInfos = pSignalSemaphoreInfos_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubmitInfo2 & setSignalSemaphoreInfos( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreInfoCount = static_cast( signalSemaphoreInfos_.size() ); - pSignalSemaphoreInfos = signalSemaphoreInfos_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubmitInfo2 const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubmitInfo2 &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - waitSemaphoreInfoCount, - pWaitSemaphoreInfos, - commandBufferInfoCount, - pCommandBufferInfos, - signalSemaphoreInfoCount, - pSignalSemaphoreInfos ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubmitInfo2 const & ) const = default; -#else - bool operator==( SubmitInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( waitSemaphoreInfoCount == rhs.waitSemaphoreInfoCount ) && - ( pWaitSemaphoreInfos == rhs.pWaitSemaphoreInfos ) && ( commandBufferInfoCount == rhs.commandBufferInfoCount ) && - ( pCommandBufferInfos == rhs.pCommandBufferInfos ) && ( signalSemaphoreInfoCount == rhs.signalSemaphoreInfoCount ) && - ( pSignalSemaphoreInfos == rhs.pSignalSemaphoreInfos ); -# endif - } - - bool operator!=( SubmitInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubmitInfo2; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SubmitFlags flags = {}; - uint32_t waitSemaphoreInfoCount = {}; - const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos = {}; - uint32_t commandBufferInfoCount = {}; - const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos = {}; - uint32_t signalSemaphoreInfoCount = {}; - const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos = {}; - }; - - template <> - struct CppType - { - using Type = SubmitInfo2; - }; - using SubmitInfo2KHR = SubmitInfo2; - - struct SubpassBeginInfo - { - using NativeType = VkSubpassBeginInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassBeginInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassBeginInfo( VULKAN_HPP_NAMESPACE::SubpassContents contents_ = VULKAN_HPP_NAMESPACE::SubpassContents::eInline, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , contents( contents_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassBeginInfo( SubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassBeginInfo( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassBeginInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassBeginInfo & operator=( SubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassBeginInfo & operator=( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassBeginInfo & setContents( VULKAN_HPP_NAMESPACE::SubpassContents contents_ ) VULKAN_HPP_NOEXCEPT - { - contents = contents_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassBeginInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassBeginInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, contents ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassBeginInfo const & ) const = default; -#else - bool operator==( SubpassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( contents == rhs.contents ); -# endif - } - - bool operator!=( SubpassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassBeginInfo; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SubpassContents contents = VULKAN_HPP_NAMESPACE::SubpassContents::eInline; - }; - - template <> - struct CppType - { - using Type = SubpassBeginInfo; - }; - using SubpassBeginInfoKHR = SubpassBeginInfo; - - struct SubpassDescriptionDepthStencilResolve - { - using NativeType = VkSubpassDescriptionDepthStencilResolve; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDescriptionDepthStencilResolve; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SubpassDescriptionDepthStencilResolve( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, - VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , depthResolveMode( depthResolveMode_ ) - , stencilResolveMode( stencilResolveMode_ ) - , pDepthStencilResolveAttachment( pDepthStencilResolveAttachment_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassDescriptionDepthStencilResolve( SubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescriptionDepthStencilResolve( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT - : SubpassDescriptionDepthStencilResolve( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassDescriptionDepthStencilResolve & operator=( SubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassDescriptionDepthStencilResolve & operator=( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & - setDepthResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode_ ) VULKAN_HPP_NOEXCEPT - { - depthResolveMode = depthResolveMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & - setStencilResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode_ ) VULKAN_HPP_NOEXCEPT - { - stencilResolveMode = stencilResolveMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & - setPDepthStencilResolveAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment_ ) VULKAN_HPP_NOEXCEPT - { - pDepthStencilResolveAttachment = pDepthStencilResolveAttachment_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassDescriptionDepthStencilResolve const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassDescriptionDepthStencilResolve &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, depthResolveMode, stencilResolveMode, pDepthStencilResolveAttachment ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassDescriptionDepthStencilResolve const & ) const = default; -#else - bool operator==( SubpassDescriptionDepthStencilResolve const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthResolveMode == rhs.depthResolveMode ) && - ( stencilResolveMode == rhs.stencilResolveMode ) && ( pDepthStencilResolveAttachment == rhs.pDepthStencilResolveAttachment ); -# endif - } - - bool operator!=( SubpassDescriptionDepthStencilResolve const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDescriptionDepthStencilResolve; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; - VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; - const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment = {}; - }; - - template <> - struct CppType - { - using Type = SubpassDescriptionDepthStencilResolve; - }; - using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; - - struct SubpassEndInfo - { - using NativeType = VkSubpassEndInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassEndInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassEndInfo( const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext( pNext_ ) {} - - VULKAN_HPP_CONSTEXPR SubpassEndInfo( SubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassEndInfo( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassEndInfo( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassEndInfo & operator=( SubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassEndInfo & operator=( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassEndInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassEndInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassEndInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassEndInfo const & ) const = default; -#else - bool operator==( SubpassEndInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); -# endif - } - - bool operator!=( SubpassEndInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassEndInfo; - const void * pNext = {}; - }; - - template <> - struct CppType - { - using Type = SubpassEndInfo; - }; - using SubpassEndInfoKHR = SubpassEndInfo; - - struct SubpassFragmentDensityMapOffsetEndInfoQCOM - { - using NativeType = VkSubpassFragmentDensityMapOffsetEndInfoQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassFragmentDensityMapOffsetEndInfoQCOM( uint32_t fragmentDensityOffsetCount_ = {}, - const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fragmentDensityOffsetCount( fragmentDensityOffsetCount_ ) - , pFragmentDensityOffsets( pFragmentDensityOffsets_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassFragmentDensityMapOffsetEndInfoQCOM( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassFragmentDensityMapOffsetEndInfoQCOM( VkSubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - : SubpassFragmentDensityMapOffsetEndInfoQCOM( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassFragmentDensityMapOffsetEndInfoQCOM( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fragmentDensityOffsets_, const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , fragmentDensityOffsetCount( static_cast( fragmentDensityOffsets_.size() ) ) - , pFragmentDensityOffsets( fragmentDensityOffsets_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassFragmentDensityMapOffsetEndInfoQCOM & operator=( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassFragmentDensityMapOffsetEndInfoQCOM & operator=( VkSubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & - setFragmentDensityOffsetCount( uint32_t fragmentDensityOffsetCount_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityOffsetCount = fragmentDensityOffsetCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & - setPFragmentDensityOffsets( const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets_ ) VULKAN_HPP_NOEXCEPT - { - pFragmentDensityOffsets = pFragmentDensityOffsets_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SubpassFragmentDensityMapOffsetEndInfoQCOM & setFragmentDensityOffsets( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fragmentDensityOffsets_ ) VULKAN_HPP_NOEXCEPT - { - fragmentDensityOffsetCount = static_cast( fragmentDensityOffsets_.size() ); - pFragmentDensityOffsets = fragmentDensityOffsets_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSubpassFragmentDensityMapOffsetEndInfoQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassFragmentDensityMapOffsetEndInfoQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fragmentDensityOffsetCount, pFragmentDensityOffsets ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassFragmentDensityMapOffsetEndInfoQCOM const & ) const = default; -#else - bool operator==( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityOffsetCount == rhs.fragmentDensityOffsetCount ) && - ( pFragmentDensityOffsets == rhs.pFragmentDensityOffsets ); -# endif - } - - bool operator!=( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM; - const void * pNext = {}; - uint32_t fragmentDensityOffsetCount = {}; - const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets = {}; - }; - - template <> - struct CppType - { - using Type = SubpassFragmentDensityMapOffsetEndInfoQCOM; - }; - - struct SubpassResolvePerformanceQueryEXT - { - using NativeType = VkSubpassResolvePerformanceQueryEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassResolvePerformanceQueryEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassResolvePerformanceQueryEXT( VULKAN_HPP_NAMESPACE::Bool32 optimal_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , optimal( optimal_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassResolvePerformanceQueryEXT( SubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassResolvePerformanceQueryEXT( VkSubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SubpassResolvePerformanceQueryEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassResolvePerformanceQueryEXT & operator=( SubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassResolvePerformanceQueryEXT & operator=( VkSubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSubpassResolvePerformanceQueryEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassResolvePerformanceQueryEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, optimal ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassResolvePerformanceQueryEXT const & ) const = default; -#else - bool operator==( SubpassResolvePerformanceQueryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( optimal == rhs.optimal ); -# endif - } - - bool operator!=( SubpassResolvePerformanceQueryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassResolvePerformanceQueryEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 optimal = {}; - }; - - template <> - struct CppType - { - using Type = SubpassResolvePerformanceQueryEXT; - }; - - struct SubpassShadingPipelineCreateInfoHUAWEI - { - using NativeType = VkSubpassShadingPipelineCreateInfoHUAWEI; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassShadingPipelineCreateInfoHUAWEI; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubpassShadingPipelineCreateInfoHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, - uint32_t subpass_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , renderPass( renderPass_ ) - , subpass( subpass_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubpassShadingPipelineCreateInfoHUAWEI( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassShadingPipelineCreateInfoHUAWEI( VkSubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - : SubpassShadingPipelineCreateInfoHUAWEI( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubpassShadingPipelineCreateInfoHUAWEI & operator=( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubpassShadingPipelineCreateInfoHUAWEI & operator=( VkSubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSubpassShadingPipelineCreateInfoHUAWEI const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubpassShadingPipelineCreateInfoHUAWEI &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, renderPass, subpass ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubpassShadingPipelineCreateInfoHUAWEI const & ) const = default; -#else - bool operator==( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ); -# endif - } - - bool operator!=( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassShadingPipelineCreateInfoHUAWEI; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; - uint32_t subpass = {}; - }; - - template <> - struct CppType - { - using Type = SubpassShadingPipelineCreateInfoHUAWEI; - }; - - struct SubresourceLayout2EXT - { - using NativeType = VkSubresourceLayout2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubresourceLayout2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::SubresourceLayout subresourceLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , subresourceLayout( subresourceLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR SubresourceLayout2EXT( SubresourceLayout2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubresourceLayout2EXT( VkSubresourceLayout2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SubresourceLayout2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SubresourceLayout2EXT & operator=( SubresourceLayout2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SubresourceLayout2EXT & operator=( VkSubresourceLayout2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSubresourceLayout2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSubresourceLayout2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, subresourceLayout ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SubresourceLayout2EXT const & ) const = default; -#else - bool operator==( SubresourceLayout2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subresourceLayout == rhs.subresourceLayout ); -# endif - } - - bool operator!=( SubresourceLayout2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubresourceLayout2EXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SubresourceLayout subresourceLayout = {}; - }; - - template <> - struct CppType - { - using Type = SubresourceLayout2EXT; - }; - - struct SurfaceCapabilities2EXT - { - using NativeType = VkSurfaceCapabilities2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilities2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceCapabilities2EXT( - uint32_t minImageCount_ = {}, - uint32_t maxImageCount_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D currentExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D minImageExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent_ = {}, - uint32_t maxImageArrayLayers_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha_ = {}, - VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT supportedSurfaceCounters_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , minImageCount( minImageCount_ ) - , maxImageCount( maxImageCount_ ) - , currentExtent( currentExtent_ ) - , minImageExtent( minImageExtent_ ) - , maxImageExtent( maxImageExtent_ ) - , maxImageArrayLayers( maxImageArrayLayers_ ) - , supportedTransforms( supportedTransforms_ ) - , currentTransform( currentTransform_ ) - , supportedCompositeAlpha( supportedCompositeAlpha_ ) - , supportedUsageFlags( supportedUsageFlags_ ) - , supportedSurfaceCounters( supportedSurfaceCounters_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceCapabilities2EXT( SurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilities2EXT( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceCapabilities2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceCapabilities2EXT & operator=( SurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilities2EXT & operator=( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSurfaceCapabilities2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceCapabilities2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - minImageCount, - maxImageCount, - currentExtent, - minImageExtent, - maxImageExtent, - maxImageArrayLayers, - supportedTransforms, - currentTransform, - supportedCompositeAlpha, - supportedUsageFlags, - supportedSurfaceCounters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceCapabilities2EXT const & ) const = default; -#else - bool operator==( SurfaceCapabilities2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minImageCount == rhs.minImageCount ) && ( maxImageCount == rhs.maxImageCount ) && - ( currentExtent == rhs.currentExtent ) && ( minImageExtent == rhs.minImageExtent ) && ( maxImageExtent == rhs.maxImageExtent ) && - ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && ( supportedTransforms == rhs.supportedTransforms ) && - ( currentTransform == rhs.currentTransform ) && ( supportedCompositeAlpha == rhs.supportedCompositeAlpha ) && - ( supportedUsageFlags == rhs.supportedUsageFlags ) && ( supportedSurfaceCounters == rhs.supportedSurfaceCounters ); -# endif - } - - bool operator!=( SurfaceCapabilities2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilities2EXT; - void * pNext = {}; - uint32_t minImageCount = {}; - uint32_t maxImageCount = {}; - VULKAN_HPP_NAMESPACE::Extent2D currentExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D minImageExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent = {}; - uint32_t maxImageArrayLayers = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags = {}; - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT supportedSurfaceCounters = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceCapabilities2EXT; - }; - - struct SurfaceCapabilitiesKHR - { - using NativeType = VkSurfaceCapabilitiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesKHR( - uint32_t minImageCount_ = {}, - uint32_t maxImageCount_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D currentExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D minImageExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent_ = {}, - uint32_t maxImageArrayLayers_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha_ = {}, - VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags_ = {} ) VULKAN_HPP_NOEXCEPT - : minImageCount( minImageCount_ ) - , maxImageCount( maxImageCount_ ) - , currentExtent( currentExtent_ ) - , minImageExtent( minImageExtent_ ) - , maxImageExtent( maxImageExtent_ ) - , maxImageArrayLayers( maxImageArrayLayers_ ) - , supportedTransforms( supportedTransforms_ ) - , currentTransform( currentTransform_ ) - , supportedCompositeAlpha( supportedCompositeAlpha_ ) - , supportedUsageFlags( supportedUsageFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesKHR( SurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilitiesKHR( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceCapabilitiesKHR & operator=( SurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilitiesKHR & operator=( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSurfaceCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( minImageCount, - maxImageCount, - currentExtent, - minImageExtent, - maxImageExtent, - maxImageArrayLayers, - supportedTransforms, - currentTransform, - supportedCompositeAlpha, - supportedUsageFlags ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceCapabilitiesKHR const & ) const = default; -#else - bool operator==( SurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( minImageCount == rhs.minImageCount ) && ( maxImageCount == rhs.maxImageCount ) && ( currentExtent == rhs.currentExtent ) && - ( minImageExtent == rhs.minImageExtent ) && ( maxImageExtent == rhs.maxImageExtent ) && ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && - ( supportedTransforms == rhs.supportedTransforms ) && ( currentTransform == rhs.currentTransform ) && - ( supportedCompositeAlpha == rhs.supportedCompositeAlpha ) && ( supportedUsageFlags == rhs.supportedUsageFlags ); -# endif - } - - bool operator!=( SurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t minImageCount = {}; - uint32_t maxImageCount = {}; - VULKAN_HPP_NAMESPACE::Extent2D currentExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D minImageExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent = {}; - uint32_t maxImageArrayLayers = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags = {}; - }; - - struct SurfaceCapabilities2KHR - { - using NativeType = VkSurfaceCapabilities2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilities2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceCapabilities2KHR( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , surfaceCapabilities( surfaceCapabilities_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceCapabilities2KHR( SurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilities2KHR( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceCapabilities2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceCapabilities2KHR & operator=( SurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilities2KHR & operator=( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSurfaceCapabilities2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceCapabilities2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, surfaceCapabilities ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceCapabilities2KHR const & ) const = default; -#else - bool operator==( SurfaceCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceCapabilities == rhs.surfaceCapabilities ); -# endif - } - - bool operator!=( SurfaceCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilities2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceCapabilities2KHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct SurfaceCapabilitiesFullScreenExclusiveEXT - { - using NativeType = VkSurfaceCapabilitiesFullScreenExclusiveEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fullScreenExclusiveSupported( fullScreenExclusiveSupported_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilitiesFullScreenExclusiveEXT( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceCapabilitiesFullScreenExclusiveEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceCapabilitiesFullScreenExclusiveEXT & operator=( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceCapabilitiesFullScreenExclusiveEXT & operator=( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SurfaceCapabilitiesFullScreenExclusiveEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SurfaceCapabilitiesFullScreenExclusiveEXT & - setFullScreenExclusiveSupported( VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported_ ) VULKAN_HPP_NOEXCEPT - { - fullScreenExclusiveSupported = fullScreenExclusiveSupported_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSurfaceCapabilitiesFullScreenExclusiveEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceCapabilitiesFullScreenExclusiveEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fullScreenExclusiveSupported ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceCapabilitiesFullScreenExclusiveEXT const & ) const = default; -# else - bool operator==( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fullScreenExclusiveSupported == rhs.fullScreenExclusiveSupported ); -# endif - } - - bool operator!=( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceCapabilitiesFullScreenExclusiveEXT; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct SurfaceFormatKHR - { - using NativeType = VkSurfaceFormatKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SurfaceFormatKHR( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ColorSpaceKHR colorSpace_ = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear ) VULKAN_HPP_NOEXCEPT - : format( format_ ) - , colorSpace( colorSpace_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceFormatKHR( SurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFormatKHR( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFormatKHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceFormatKHR & operator=( SurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFormatKHR & operator=( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSurfaceFormatKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceFormatKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( format, colorSpace ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceFormatKHR const & ) const = default; -#else - bool operator==( SurfaceFormatKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( format == rhs.format ) && ( colorSpace == rhs.colorSpace ); -# endif - } - - bool operator!=( SurfaceFormatKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ColorSpaceKHR colorSpace = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear; - }; - - struct SurfaceFormat2KHR - { - using NativeType = VkSurfaceFormat2KHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFormat2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceFormat2KHR( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , surfaceFormat( surfaceFormat_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceFormat2KHR( SurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFormat2KHR( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFormat2KHR( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceFormat2KHR & operator=( SurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFormat2KHR & operator=( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkSurfaceFormat2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceFormat2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, surfaceFormat ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceFormat2KHR const & ) const = default; -#else - bool operator==( SurfaceFormat2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceFormat == rhs.surfaceFormat ); -# endif - } - - bool operator!=( SurfaceFormat2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFormat2KHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceFormat2KHR; - }; - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct SurfaceFullScreenExclusiveInfoEXT - { - using NativeType = VkSurfaceFullScreenExclusiveInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFullScreenExclusiveInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( - VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , fullScreenExclusive( fullScreenExclusive_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( SurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFullScreenExclusiveInfoEXT( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceFullScreenExclusiveInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceFullScreenExclusiveInfoEXT & operator=( SurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFullScreenExclusiveInfoEXT & operator=( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveInfoEXT & - setFullScreenExclusive( VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ ) VULKAN_HPP_NOEXCEPT - { - fullScreenExclusive = fullScreenExclusive_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSurfaceFullScreenExclusiveInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceFullScreenExclusiveInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, fullScreenExclusive ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceFullScreenExclusiveInfoEXT const & ) const = default; -# else - bool operator==( SurfaceFullScreenExclusiveInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fullScreenExclusive == rhs.fullScreenExclusive ); -# endif - } - - bool operator!=( SurfaceFullScreenExclusiveInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveInfoEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault; - }; - - template <> - struct CppType - { - using Type = SurfaceFullScreenExclusiveInfoEXT; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct SurfaceFullScreenExclusiveWin32InfoEXT - { - using NativeType = VkSurfaceFullScreenExclusiveWin32InfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( HMONITOR hmonitor_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , hmonitor( hmonitor_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFullScreenExclusiveWin32InfoEXT( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceFullScreenExclusiveWin32InfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceFullScreenExclusiveWin32InfoEXT & operator=( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceFullScreenExclusiveWin32InfoEXT & operator=( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveWin32InfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveWin32InfoEXT & setHmonitor( HMONITOR hmonitor_ ) VULKAN_HPP_NOEXCEPT - { - hmonitor = hmonitor_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSurfaceFullScreenExclusiveWin32InfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceFullScreenExclusiveWin32InfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, hmonitor ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceFullScreenExclusiveWin32InfoEXT const & ) const = default; -# else - bool operator==( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hmonitor == rhs.hmonitor ); -# endif - } - - bool operator!=( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT; - const void * pNext = {}; - HMONITOR hmonitor = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceFullScreenExclusiveWin32InfoEXT; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct SurfaceProtectedCapabilitiesKHR - { - using NativeType = VkSurfaceProtectedCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceProtectedCapabilitiesKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( VULKAN_HPP_NAMESPACE::Bool32 supportsProtected_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , supportsProtected( supportsProtected_ ) - { - } - - VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( SurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceProtectedCapabilitiesKHR( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SurfaceProtectedCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SurfaceProtectedCapabilitiesKHR & operator=( SurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SurfaceProtectedCapabilitiesKHR & operator=( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SurfaceProtectedCapabilitiesKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SurfaceProtectedCapabilitiesKHR & setSupportsProtected( VULKAN_HPP_NAMESPACE::Bool32 supportsProtected_ ) VULKAN_HPP_NOEXCEPT - { - supportsProtected = supportsProtected_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSurfaceProtectedCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSurfaceProtectedCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, supportsProtected ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SurfaceProtectedCapabilitiesKHR const & ) const = default; -#else - bool operator==( SurfaceProtectedCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportsProtected == rhs.supportsProtected ); -# endif - } - - bool operator!=( SurfaceProtectedCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceProtectedCapabilitiesKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 supportsProtected = {}; - }; - - template <> - struct CppType - { - using Type = SurfaceProtectedCapabilitiesKHR; - }; - - struct SwapchainCounterCreateInfoEXT - { - using NativeType = VkSwapchainCounterCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainCounterCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , surfaceCounters( surfaceCounters_ ) - { - } - - VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( SwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainCounterCreateInfoEXT( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : SwapchainCounterCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SwapchainCounterCreateInfoEXT & operator=( SwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainCounterCreateInfoEXT & operator=( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SwapchainCounterCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCounterCreateInfoEXT & - setSurfaceCounters( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ ) VULKAN_HPP_NOEXCEPT - { - surfaceCounters = surfaceCounters_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSwapchainCounterCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSwapchainCounterCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, surfaceCounters ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainCounterCreateInfoEXT const & ) const = default; -#else - bool operator==( SwapchainCounterCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceCounters == rhs.surfaceCounters ); -# endif - } - - bool operator!=( SwapchainCounterCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters = {}; - }; - - template <> - struct CppType - { - using Type = SwapchainCounterCreateInfoEXT; - }; - - struct SwapchainCreateInfoKHR - { - using NativeType = VkSwapchainCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainCreateInfoKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - SwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ = {}, - uint32_t minImageCount_ = {}, - VULKAN_HPP_NAMESPACE::Format imageFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_ = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear, - VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ = {}, - uint32_t imageArrayLayers_ = {}, - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ = {}, - VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, - uint32_t queueFamilyIndexCount_ = {}, - const uint32_t * pQueueFamilyIndices_ = {}, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque, - VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, - VULKAN_HPP_NAMESPACE::Bool32 clipped_ = {}, - VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , surface( surface_ ) - , minImageCount( minImageCount_ ) - , imageFormat( imageFormat_ ) - , imageColorSpace( imageColorSpace_ ) - , imageExtent( imageExtent_ ) - , imageArrayLayers( imageArrayLayers_ ) - , imageUsage( imageUsage_ ) - , imageSharingMode( imageSharingMode_ ) - , queueFamilyIndexCount( queueFamilyIndexCount_ ) - , pQueueFamilyIndices( pQueueFamilyIndices_ ) - , preTransform( preTransform_ ) - , compositeAlpha( compositeAlpha_ ) - , presentMode( presentMode_ ) - , clipped( clipped_ ) - , oldSwapchain( oldSwapchain_ ) - { - } - - VULKAN_HPP_CONSTEXPR SwapchainCreateInfoKHR( SwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainCreateInfoKHR( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : SwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_, - VULKAN_HPP_NAMESPACE::SurfaceKHR surface_, - uint32_t minImageCount_, - VULKAN_HPP_NAMESPACE::Format imageFormat_, - VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_, - VULKAN_HPP_NAMESPACE::Extent2D imageExtent_, - uint32_t imageArrayLayers_, - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_, - VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque, - VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, - VULKAN_HPP_NAMESPACE::Bool32 clipped_ = {}, - VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , surface( surface_ ) - , minImageCount( minImageCount_ ) - , imageFormat( imageFormat_ ) - , imageColorSpace( imageColorSpace_ ) - , imageExtent( imageExtent_ ) - , imageArrayLayers( imageArrayLayers_ ) - , imageUsage( imageUsage_ ) - , imageSharingMode( imageSharingMode_ ) - , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) - , pQueueFamilyIndices( queueFamilyIndices_.data() ) - , preTransform( preTransform_ ) - , compositeAlpha( compositeAlpha_ ) - , presentMode( presentMode_ ) - , clipped( clipped_ ) - , oldSwapchain( oldSwapchain_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SwapchainCreateInfoKHR & operator=( SwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainCreateInfoKHR & operator=( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT - { - surface = surface_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setMinImageCount( uint32_t minImageCount_ ) VULKAN_HPP_NOEXCEPT - { - minImageCount = minImageCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageFormat( VULKAN_HPP_NAMESPACE::Format imageFormat_ ) VULKAN_HPP_NOEXCEPT - { - imageFormat = imageFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageColorSpace( VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_ ) VULKAN_HPP_NOEXCEPT - { - imageColorSpace = imageColorSpace_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT - { - imageExtent = imageExtent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageArrayLayers( uint32_t imageArrayLayers_ ) VULKAN_HPP_NOEXCEPT - { - imageArrayLayers = imageArrayLayers_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT - { - imageUsage = imageUsage_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageSharingMode( VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_ ) VULKAN_HPP_NOEXCEPT - { - imageSharingMode = imageSharingMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = queueFamilyIndexCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - pQueueFamilyIndices = pQueueFamilyIndices_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - SwapchainCreateInfoKHR & - setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); - pQueueFamilyIndices = queueFamilyIndices_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPreTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ ) VULKAN_HPP_NOEXCEPT - { - preTransform = preTransform_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setCompositeAlpha( VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ ) VULKAN_HPP_NOEXCEPT - { - compositeAlpha = compositeAlpha_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPresentMode( VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ ) VULKAN_HPP_NOEXCEPT - { - presentMode = presentMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setClipped( VULKAN_HPP_NAMESPACE::Bool32 clipped_ ) VULKAN_HPP_NOEXCEPT - { - clipped = clipped_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setOldSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ ) VULKAN_HPP_NOEXCEPT - { - oldSwapchain = oldSwapchain_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - surface, - minImageCount, - imageFormat, - imageColorSpace, - imageExtent, - imageArrayLayers, - imageUsage, - imageSharingMode, - queueFamilyIndexCount, - pQueueFamilyIndices, - preTransform, - compositeAlpha, - presentMode, - clipped, - oldSwapchain ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainCreateInfoKHR const & ) const = default; -#else - bool operator==( SwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( surface == rhs.surface ) && - ( minImageCount == rhs.minImageCount ) && ( imageFormat == rhs.imageFormat ) && ( imageColorSpace == rhs.imageColorSpace ) && - ( imageExtent == rhs.imageExtent ) && ( imageArrayLayers == rhs.imageArrayLayers ) && ( imageUsage == rhs.imageUsage ) && - ( imageSharingMode == rhs.imageSharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && - ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ) && ( preTransform == rhs.preTransform ) && ( compositeAlpha == rhs.compositeAlpha ) && - ( presentMode == rhs.presentMode ) && ( clipped == rhs.clipped ) && ( oldSwapchain == rhs.oldSwapchain ); -# endif - } - - bool operator!=( SwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::SurfaceKHR surface = {}; - uint32_t minImageCount = {}; - VULKAN_HPP_NAMESPACE::Format imageFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear; - VULKAN_HPP_NAMESPACE::Extent2D imageExtent = {}; - uint32_t imageArrayLayers = {}; - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage = {}; - VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; - uint32_t queueFamilyIndexCount = {}; - const uint32_t * pQueueFamilyIndices = {}; - VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; - VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque; - VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate; - VULKAN_HPP_NAMESPACE::Bool32 clipped = {}; - VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain = {}; - }; - - template <> - struct CppType - { - using Type = SwapchainCreateInfoKHR; - }; - - struct SwapchainDisplayNativeHdrCreateInfoAMD - { - using NativeType = VkSwapchainDisplayNativeHdrCreateInfoAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , localDimmingEnable( localDimmingEnable_ ) - { - } - - VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainDisplayNativeHdrCreateInfoAMD( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : SwapchainDisplayNativeHdrCreateInfoAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - SwapchainDisplayNativeHdrCreateInfoAMD & operator=( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - SwapchainDisplayNativeHdrCreateInfoAMD & operator=( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 SwapchainDisplayNativeHdrCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 SwapchainDisplayNativeHdrCreateInfoAMD & - setLocalDimmingEnable( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ ) VULKAN_HPP_NOEXCEPT - { - localDimmingEnable = localDimmingEnable_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkSwapchainDisplayNativeHdrCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkSwapchainDisplayNativeHdrCreateInfoAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, localDimmingEnable ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( SwapchainDisplayNativeHdrCreateInfoAMD const & ) const = default; -#else - bool operator==( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( localDimmingEnable == rhs.localDimmingEnable ); -# endif - } - - bool operator!=( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable = {}; - }; - - template <> - struct CppType - { - using Type = SwapchainDisplayNativeHdrCreateInfoAMD; - }; - - struct TextureLODGatherFormatPropertiesAMD - { - using NativeType = VkTextureLODGatherFormatPropertiesAMD; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTextureLodGatherFormatPropertiesAMD; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR TextureLODGatherFormatPropertiesAMD( VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , supportsTextureGatherLODBiasAMD( supportsTextureGatherLODBiasAMD_ ) - { - } - - VULKAN_HPP_CONSTEXPR TextureLODGatherFormatPropertiesAMD( TextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TextureLODGatherFormatPropertiesAMD( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - : TextureLODGatherFormatPropertiesAMD( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TextureLODGatherFormatPropertiesAMD & operator=( TextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TextureLODGatherFormatPropertiesAMD & operator=( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkTextureLODGatherFormatPropertiesAMD const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTextureLODGatherFormatPropertiesAMD &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, supportsTextureGatherLODBiasAMD ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TextureLODGatherFormatPropertiesAMD const & ) const = default; -#else - bool operator==( TextureLODGatherFormatPropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportsTextureGatherLODBiasAMD == rhs.supportsTextureGatherLODBiasAMD ); -# endif - } - - bool operator!=( TextureLODGatherFormatPropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD = {}; - }; - - template <> - struct CppType - { - using Type = TextureLODGatherFormatPropertiesAMD; - }; - - struct TilePropertiesQCOM - { - using NativeType = VkTilePropertiesQCOM; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTilePropertiesQCOM; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR TilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Extent3D tileSize_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D apronSize_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D origin_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , tileSize( tileSize_ ) - , apronSize( apronSize_ ) - , origin( origin_ ) - { - } - - VULKAN_HPP_CONSTEXPR TilePropertiesQCOM( TilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TilePropertiesQCOM( VkTilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : TilePropertiesQCOM( *reinterpret_cast( &rhs ) ) {} -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TilePropertiesQCOM & operator=( TilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TilePropertiesQCOM & operator=( VkTilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setTileSize( VULKAN_HPP_NAMESPACE::Extent3D const & tileSize_ ) VULKAN_HPP_NOEXCEPT - { - tileSize = tileSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setApronSize( VULKAN_HPP_NAMESPACE::Extent2D const & apronSize_ ) VULKAN_HPP_NOEXCEPT - { - apronSize = apronSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setOrigin( VULKAN_HPP_NAMESPACE::Offset2D const & origin_ ) VULKAN_HPP_NOEXCEPT - { - origin = origin_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkTilePropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTilePropertiesQCOM &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, tileSize, apronSize, origin ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TilePropertiesQCOM const & ) const = default; -#else - bool operator==( TilePropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tileSize == rhs.tileSize ) && ( apronSize == rhs.apronSize ) && ( origin == rhs.origin ); -# endif - } - - bool operator!=( TilePropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTilePropertiesQCOM; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Extent3D tileSize = {}; - VULKAN_HPP_NAMESPACE::Extent2D apronSize = {}; - VULKAN_HPP_NAMESPACE::Offset2D origin = {}; - }; - - template <> - struct CppType - { - using Type = TilePropertiesQCOM; - }; - - struct TimelineSemaphoreSubmitInfo - { - using NativeType = VkTimelineSemaphoreSubmitInfo; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTimelineSemaphoreSubmitInfo; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfo( uint32_t waitSemaphoreValueCount_ = {}, - const uint64_t * pWaitSemaphoreValues_ = {}, - uint32_t signalSemaphoreValueCount_ = {}, - const uint64_t * pSignalSemaphoreValues_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , waitSemaphoreValueCount( waitSemaphoreValueCount_ ) - , pWaitSemaphoreValues( pWaitSemaphoreValues_ ) - , signalSemaphoreValueCount( signalSemaphoreValueCount_ ) - , pSignalSemaphoreValues( pSignalSemaphoreValues_ ) - { - } - - VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfo( TimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TimelineSemaphoreSubmitInfo( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - : TimelineSemaphoreSubmitInfo( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - TimelineSemaphoreSubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , waitSemaphoreValueCount( static_cast( waitSemaphoreValues_.size() ) ) - , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) - , signalSemaphoreValueCount( static_cast( signalSemaphoreValues_.size() ) ) - , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TimelineSemaphoreSubmitInfo & operator=( TimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TimelineSemaphoreSubmitInfo & operator=( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setWaitSemaphoreValueCount( uint32_t waitSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreValueCount = waitSemaphoreValueCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPWaitSemaphoreValues( const uint64_t * pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - pWaitSemaphoreValues = pWaitSemaphoreValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - TimelineSemaphoreSubmitInfo & - setWaitSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - waitSemaphoreValueCount = static_cast( waitSemaphoreValues_.size() ); - pWaitSemaphoreValues = waitSemaphoreValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setSignalSemaphoreValueCount( uint32_t signalSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreValueCount = signalSemaphoreValueCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPSignalSemaphoreValues( const uint64_t * pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - pSignalSemaphoreValues = pSignalSemaphoreValues_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - TimelineSemaphoreSubmitInfo & - setSignalSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT - { - signalSemaphoreValueCount = static_cast( signalSemaphoreValues_.size() ); - pSignalSemaphoreValues = signalSemaphoreValues_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkTimelineSemaphoreSubmitInfo const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTimelineSemaphoreSubmitInfo &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, waitSemaphoreValueCount, pWaitSemaphoreValues, signalSemaphoreValueCount, pSignalSemaphoreValues ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TimelineSemaphoreSubmitInfo const & ) const = default; -#else - bool operator==( TimelineSemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreValueCount == rhs.waitSemaphoreValueCount ) && - ( pWaitSemaphoreValues == rhs.pWaitSemaphoreValues ) && ( signalSemaphoreValueCount == rhs.signalSemaphoreValueCount ) && - ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues ); -# endif - } - - bool operator!=( TimelineSemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTimelineSemaphoreSubmitInfo; - const void * pNext = {}; - uint32_t waitSemaphoreValueCount = {}; - const uint64_t * pWaitSemaphoreValues = {}; - uint32_t signalSemaphoreValueCount = {}; - const uint64_t * pSignalSemaphoreValues = {}; - }; - - template <> - struct CppType - { - using Type = TimelineSemaphoreSubmitInfo; - }; - using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; - - struct TraceRaysIndirectCommand2KHR - { - using NativeType = VkTraceRaysIndirectCommand2KHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommand2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride_ = {}, - VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride_ = {}, - VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride_ = {}, - uint32_t width_ = {}, - uint32_t height_ = {}, - uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT - : raygenShaderRecordAddress( raygenShaderRecordAddress_ ) - , raygenShaderRecordSize( raygenShaderRecordSize_ ) - , missShaderBindingTableAddress( missShaderBindingTableAddress_ ) - , missShaderBindingTableSize( missShaderBindingTableSize_ ) - , missShaderBindingTableStride( missShaderBindingTableStride_ ) - , hitShaderBindingTableAddress( hitShaderBindingTableAddress_ ) - , hitShaderBindingTableSize( hitShaderBindingTableSize_ ) - , hitShaderBindingTableStride( hitShaderBindingTableStride_ ) - , callableShaderBindingTableAddress( callableShaderBindingTableAddress_ ) - , callableShaderBindingTableSize( callableShaderBindingTableSize_ ) - , callableShaderBindingTableStride( callableShaderBindingTableStride_ ) - , width( width_ ) - , height( height_ ) - , depth( depth_ ) - { - } - - VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommand2KHR( TraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TraceRaysIndirectCommand2KHR( VkTraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - : TraceRaysIndirectCommand2KHR( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TraceRaysIndirectCommand2KHR & operator=( TraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TraceRaysIndirectCommand2KHR & operator=( VkTraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setRaygenShaderRecordAddress( VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress_ ) VULKAN_HPP_NOEXCEPT - { - raygenShaderRecordAddress = raygenShaderRecordAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setRaygenShaderRecordSize( VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize_ ) VULKAN_HPP_NOEXCEPT - { - raygenShaderRecordSize = raygenShaderRecordSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setMissShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT - { - missShaderBindingTableAddress = missShaderBindingTableAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setMissShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT - { - missShaderBindingTableSize = missShaderBindingTableSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setMissShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT - { - missShaderBindingTableStride = missShaderBindingTableStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setHitShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT - { - hitShaderBindingTableAddress = hitShaderBindingTableAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setHitShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT - { - hitShaderBindingTableSize = hitShaderBindingTableSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setHitShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT - { - hitShaderBindingTableStride = hitShaderBindingTableStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setCallableShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT - { - callableShaderBindingTableAddress = callableShaderBindingTableAddress_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setCallableShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT - { - callableShaderBindingTableSize = callableShaderBindingTableSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & - setCallableShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT - { - callableShaderBindingTableStride = callableShaderBindingTableStride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT - { - depth = depth_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkTraceRaysIndirectCommand2KHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTraceRaysIndirectCommand2KHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( raygenShaderRecordAddress, - raygenShaderRecordSize, - missShaderBindingTableAddress, - missShaderBindingTableSize, - missShaderBindingTableStride, - hitShaderBindingTableAddress, - hitShaderBindingTableSize, - hitShaderBindingTableStride, - callableShaderBindingTableAddress, - callableShaderBindingTableSize, - callableShaderBindingTableStride, - width, - height, - depth ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TraceRaysIndirectCommand2KHR const & ) const = default; -#else - bool operator==( TraceRaysIndirectCommand2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( raygenShaderRecordAddress == rhs.raygenShaderRecordAddress ) && ( raygenShaderRecordSize == rhs.raygenShaderRecordSize ) && - ( missShaderBindingTableAddress == rhs.missShaderBindingTableAddress ) && ( missShaderBindingTableSize == rhs.missShaderBindingTableSize ) && - ( missShaderBindingTableStride == rhs.missShaderBindingTableStride ) && ( hitShaderBindingTableAddress == rhs.hitShaderBindingTableAddress ) && - ( hitShaderBindingTableSize == rhs.hitShaderBindingTableSize ) && ( hitShaderBindingTableStride == rhs.hitShaderBindingTableStride ) && - ( callableShaderBindingTableAddress == rhs.callableShaderBindingTableAddress ) && - ( callableShaderBindingTableSize == rhs.callableShaderBindingTableSize ) && - ( callableShaderBindingTableStride == rhs.callableShaderBindingTableStride ) && ( width == rhs.width ) && ( height == rhs.height ) && - ( depth == rhs.depth ); -# endif - } - - bool operator!=( TraceRaysIndirectCommand2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize = {}; - VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride = {}; - VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride = {}; - VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress = {}; - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize = {}; - VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride = {}; - uint32_t width = {}; - uint32_t height = {}; - uint32_t depth = {}; - }; - - struct TraceRaysIndirectCommandKHR - { - using NativeType = VkTraceRaysIndirectCommandKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommandKHR( uint32_t width_ = {}, uint32_t height_ = {}, uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT - : width( width_ ) - , height( height_ ) - , depth( depth_ ) - { - } - - VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommandKHR( TraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TraceRaysIndirectCommandKHR( VkTraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : TraceRaysIndirectCommandKHR( *reinterpret_cast( &rhs ) ) - { - } - - explicit TraceRaysIndirectCommandKHR( Extent2D const & extent2D, uint32_t depth_ = {} ) - : width( extent2D.width ), height( extent2D.height ), depth( depth_ ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - TraceRaysIndirectCommandKHR & operator=( TraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - TraceRaysIndirectCommandKHR & operator=( VkTraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT - { - width = width_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT - { - height = height_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT - { - depth = depth_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkTraceRaysIndirectCommandKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkTraceRaysIndirectCommandKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( width, height, depth ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( TraceRaysIndirectCommandKHR const & ) const = default; -#else - bool operator==( TraceRaysIndirectCommandKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( width == rhs.width ) && ( height == rhs.height ) && ( depth == rhs.depth ); -# endif - } - - bool operator!=( TraceRaysIndirectCommandKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - uint32_t width = {}; - uint32_t height = {}; - uint32_t depth = {}; - }; - - struct ValidationCacheCreateInfoEXT - { - using NativeType = VkValidationCacheCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationCacheCreateInfoEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ = {}, - size_t initialDataSize_ = {}, - const void * pInitialData_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , initialDataSize( initialDataSize_ ) - , pInitialData( pInitialData_ ) - { - } - - VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( ValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ValidationCacheCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ValidationCacheCreateInfoEXT & operator=( ValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationCacheCreateInfoEXT & operator=( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setInitialDataSize( size_t initialDataSize_ ) VULKAN_HPP_NOEXCEPT - { - initialDataSize = initialDataSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setPInitialData( const void * pInitialData_ ) VULKAN_HPP_NOEXCEPT - { - pInitialData = pInitialData_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - ValidationCacheCreateInfoEXT & setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) VULKAN_HPP_NOEXCEPT - { - initialDataSize = initialData_.size() * sizeof( T ); - pInitialData = initialData_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkValidationCacheCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, initialDataSize, pInitialData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ValidationCacheCreateInfoEXT const & ) const = default; -#else - bool operator==( ValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( initialDataSize == rhs.initialDataSize ) && - ( pInitialData == rhs.pInitialData ); -# endif - } - - bool operator!=( ValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationCacheCreateInfoEXT; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags = {}; - size_t initialDataSize = {}; - const void * pInitialData = {}; - }; - - template <> - struct CppType - { - using Type = ValidationCacheCreateInfoEXT; - }; - - struct ValidationFeaturesEXT - { - using NativeType = VkValidationFeaturesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationFeaturesEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( uint32_t enabledValidationFeatureCount_ = {}, - const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures_ = {}, - uint32_t disabledValidationFeatureCount_ = {}, - const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , enabledValidationFeatureCount( enabledValidationFeatureCount_ ) - , pEnabledValidationFeatures( pEnabledValidationFeatures_ ) - , disabledValidationFeatureCount( disabledValidationFeatureCount_ ) - , pDisabledValidationFeatures( pDisabledValidationFeatures_ ) - { - } - - VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( ValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationFeaturesEXT( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : ValidationFeaturesEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ValidationFeaturesEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & enabledValidationFeatures_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationFeatures_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , enabledValidationFeatureCount( static_cast( enabledValidationFeatures_.size() ) ) - , pEnabledValidationFeatures( enabledValidationFeatures_.data() ) - , disabledValidationFeatureCount( static_cast( disabledValidationFeatures_.size() ) ) - , pDisabledValidationFeatures( disabledValidationFeatures_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ValidationFeaturesEXT & operator=( ValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationFeaturesEXT & operator=( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setEnabledValidationFeatureCount( uint32_t enabledValidationFeatureCount_ ) VULKAN_HPP_NOEXCEPT - { - enabledValidationFeatureCount = enabledValidationFeatureCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & - setPEnabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT - { - pEnabledValidationFeatures = pEnabledValidationFeatures_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ValidationFeaturesEXT & setEnabledValidationFeatures( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & enabledValidationFeatures_ ) - VULKAN_HPP_NOEXCEPT - { - enabledValidationFeatureCount = static_cast( enabledValidationFeatures_.size() ); - pEnabledValidationFeatures = enabledValidationFeatures_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setDisabledValidationFeatureCount( uint32_t disabledValidationFeatureCount_ ) VULKAN_HPP_NOEXCEPT - { - disabledValidationFeatureCount = disabledValidationFeatureCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & - setPDisabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT - { - pDisabledValidationFeatures = pDisabledValidationFeatures_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ValidationFeaturesEXT & setDisabledValidationFeatures( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationFeatures_ ) - VULKAN_HPP_NOEXCEPT - { - disabledValidationFeatureCount = static_cast( disabledValidationFeatures_.size() ); - pDisabledValidationFeatures = disabledValidationFeatures_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkValidationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkValidationFeaturesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, enabledValidationFeatureCount, pEnabledValidationFeatures, disabledValidationFeatureCount, pDisabledValidationFeatures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ValidationFeaturesEXT const & ) const = default; -#else - bool operator==( ValidationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( enabledValidationFeatureCount == rhs.enabledValidationFeatureCount ) && - ( pEnabledValidationFeatures == rhs.pEnabledValidationFeatures ) && ( disabledValidationFeatureCount == rhs.disabledValidationFeatureCount ) && - ( pDisabledValidationFeatures == rhs.pDisabledValidationFeatures ); -# endif - } - - bool operator!=( ValidationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationFeaturesEXT; - const void * pNext = {}; - uint32_t enabledValidationFeatureCount = {}; - const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures = {}; - uint32_t disabledValidationFeatureCount = {}; - const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures = {}; - }; - - template <> - struct CppType - { - using Type = ValidationFeaturesEXT; - }; - - struct ValidationFlagsEXT - { - using NativeType = VkValidationFlagsEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationFlagsEXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = {}, - const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , disabledValidationCheckCount( disabledValidationCheckCount_ ) - , pDisabledValidationChecks( pDisabledValidationChecks_ ) - { - } - - VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( ValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationFlagsEXT( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ValidationFlagsEXT( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ValidationFlagsEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationChecks_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , disabledValidationCheckCount( static_cast( disabledValidationChecks_.size() ) ) - , pDisabledValidationChecks( disabledValidationChecks_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ValidationFlagsEXT & operator=( ValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ValidationFlagsEXT & operator=( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & setDisabledValidationCheckCount( uint32_t disabledValidationCheckCount_ ) VULKAN_HPP_NOEXCEPT - { - disabledValidationCheckCount = disabledValidationCheckCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & - setPDisabledValidationChecks( const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT - { - pDisabledValidationChecks = pDisabledValidationChecks_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - ValidationFlagsEXT & setDisabledValidationChecks( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT - { - disabledValidationCheckCount = static_cast( disabledValidationChecks_.size() ); - pDisabledValidationChecks = disabledValidationChecks_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkValidationFlagsEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkValidationFlagsEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, disabledValidationCheckCount, pDisabledValidationChecks ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ValidationFlagsEXT const & ) const = default; -#else - bool operator==( ValidationFlagsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( disabledValidationCheckCount == rhs.disabledValidationCheckCount ) && - ( pDisabledValidationChecks == rhs.pDisabledValidationChecks ); -# endif - } - - bool operator!=( ValidationFlagsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationFlagsEXT; - const void * pNext = {}; - uint32_t disabledValidationCheckCount = {}; - const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks = {}; - }; - - template <> - struct CppType - { - using Type = ValidationFlagsEXT; - }; - - struct VertexInputAttributeDescription2EXT - { - using NativeType = VkVertexInputAttributeDescription2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVertexInputAttributeDescription2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription2EXT( uint32_t location_ = {}, - uint32_t binding_ = {}, - VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - uint32_t offset_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , location( location_ ) - , binding( binding_ ) - , format( format_ ) - , offset( offset_ ) - { - } - - VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription2EXT( VertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputAttributeDescription2EXT( VkVertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VertexInputAttributeDescription2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VertexInputAttributeDescription2EXT & operator=( VertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputAttributeDescription2EXT & operator=( VkVertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setLocation( uint32_t location_ ) VULKAN_HPP_NOEXCEPT - { - location = location_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT - { - format = format_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT - { - offset = offset_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVertexInputAttributeDescription2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVertexInputAttributeDescription2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, location, binding, format, offset ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VertexInputAttributeDescription2EXT const & ) const = default; -#else - bool operator==( VertexInputAttributeDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( location == rhs.location ) && ( binding == rhs.binding ) && ( format == rhs.format ) && - ( offset == rhs.offset ); -# endif - } - - bool operator!=( VertexInputAttributeDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVertexInputAttributeDescription2EXT; - void * pNext = {}; - uint32_t location = {}; - uint32_t binding = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - uint32_t offset = {}; - }; - - template <> - struct CppType - { - using Type = VertexInputAttributeDescription2EXT; - }; - - struct VertexInputBindingDescription2EXT - { - using NativeType = VkVertexInputBindingDescription2EXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVertexInputBindingDescription2EXT; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VertexInputBindingDescription2EXT( uint32_t binding_ = {}, - uint32_t stride_ = {}, - VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex, - uint32_t divisor_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , binding( binding_ ) - , stride( stride_ ) - , inputRate( inputRate_ ) - , divisor( divisor_ ) - { - } - - VULKAN_HPP_CONSTEXPR VertexInputBindingDescription2EXT( VertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDescription2EXT( VkVertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VertexInputBindingDescription2EXT( *reinterpret_cast( &rhs ) ) - { - } -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VertexInputBindingDescription2EXT & operator=( VertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VertexInputBindingDescription2EXT & operator=( VkVertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT - { - binding = binding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT - { - stride = stride_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setInputRate( VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT - { - inputRate = inputRate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setDivisor( uint32_t divisor_ ) VULKAN_HPP_NOEXCEPT - { - divisor = divisor_; - return *this; - } -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVertexInputBindingDescription2EXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVertexInputBindingDescription2EXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, binding, stride, inputRate, divisor ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VertexInputBindingDescription2EXT const & ) const = default; -#else - bool operator==( VertexInputBindingDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( binding == rhs.binding ) && ( stride == rhs.stride ) && ( inputRate == rhs.inputRate ) && - ( divisor == rhs.divisor ); -# endif - } - - bool operator!=( VertexInputBindingDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVertexInputBindingDescription2EXT; - void * pNext = {}; - uint32_t binding = {}; - uint32_t stride = {}; - VULKAN_HPP_NAMESPACE::VertexInputRate inputRate = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex; - uint32_t divisor = {}; - }; - - template <> - struct CppType - { - using Type = VertexInputBindingDescription2EXT; - }; - -#if defined( VK_USE_PLATFORM_VI_NN ) - struct ViSurfaceCreateInfoNN - { - using NativeType = VkViSurfaceCreateInfoNN; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eViSurfaceCreateInfoNN; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - ViSurfaceCreateInfoNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ = {}, void * window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , window( window_ ) - { - } - - VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( ViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViSurfaceCreateInfoNN( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT - : ViSurfaceCreateInfoNN( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - ViSurfaceCreateInfoNN & operator=( ViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - ViSurfaceCreateInfoNN & operator=( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setFlags( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setWindow( void * window_ ) VULKAN_HPP_NOEXCEPT - { - window = window_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkViSurfaceCreateInfoNN const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkViSurfaceCreateInfoNN &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, window ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( ViSurfaceCreateInfoNN const & ) const = default; -# else - bool operator==( ViSurfaceCreateInfoNN const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( window == rhs.window ); -# endif - } - - bool operator!=( ViSurfaceCreateInfoNN const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eViSurfaceCreateInfoNN; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags = {}; - void * window = {}; - }; - - template <> - struct CppType - { - using Type = ViSurfaceCreateInfoNN; - }; -#endif /*VK_USE_PLATFORM_VI_NN*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoPictureResourceInfoKHR - { - using NativeType = VkVideoPictureResourceInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoPictureResourceInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoPictureResourceInfoKHR( VULKAN_HPP_NAMESPACE::Offset2D codedOffset_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D codedExtent_ = {}, - uint32_t baseArrayLayer_ = {}, - VULKAN_HPP_NAMESPACE::ImageView imageViewBinding_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , codedOffset( codedOffset_ ) - , codedExtent( codedExtent_ ) - , baseArrayLayer( baseArrayLayer_ ) - , imageViewBinding( imageViewBinding_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoPictureResourceInfoKHR( VideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoPictureResourceInfoKHR( VkVideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoPictureResourceInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoPictureResourceInfoKHR & operator=( VideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoPictureResourceInfoKHR & operator=( VkVideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setCodedOffset( VULKAN_HPP_NAMESPACE::Offset2D const & codedOffset_ ) VULKAN_HPP_NOEXCEPT - { - codedOffset = codedOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setCodedExtent( VULKAN_HPP_NAMESPACE::Extent2D const & codedExtent_ ) VULKAN_HPP_NOEXCEPT - { - codedExtent = codedExtent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT - { - baseArrayLayer = baseArrayLayer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setImageViewBinding( VULKAN_HPP_NAMESPACE::ImageView imageViewBinding_ ) VULKAN_HPP_NOEXCEPT - { - imageViewBinding = imageViewBinding_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoPictureResourceInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoPictureResourceInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, codedOffset, codedExtent, baseArrayLayer, imageViewBinding ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoPictureResourceInfoKHR const & ) const = default; -# else - bool operator==( VideoPictureResourceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( codedOffset == rhs.codedOffset ) && ( codedExtent == rhs.codedExtent ) && - ( baseArrayLayer == rhs.baseArrayLayer ) && ( imageViewBinding == rhs.imageViewBinding ); -# endif - } - - bool operator!=( VideoPictureResourceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoPictureResourceInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Offset2D codedOffset = {}; - VULKAN_HPP_NAMESPACE::Extent2D codedExtent = {}; - uint32_t baseArrayLayer = {}; - VULKAN_HPP_NAMESPACE::ImageView imageViewBinding = {}; - }; - - template <> - struct CppType - { - using Type = VideoPictureResourceInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoReferenceSlotInfoKHR - { - using NativeType = VkVideoReferenceSlotInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoReferenceSlotInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoReferenceSlotInfoKHR( int8_t slotIndex_ = {}, - const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , slotIndex( slotIndex_ ) - , pPictureResource( pPictureResource_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoReferenceSlotInfoKHR( VideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoReferenceSlotInfoKHR( VkVideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoReferenceSlotInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoReferenceSlotInfoKHR & operator=( VideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoReferenceSlotInfoKHR & operator=( VkVideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & setSlotIndex( int8_t slotIndex_ ) VULKAN_HPP_NOEXCEPT - { - slotIndex = slotIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & - setPPictureResource( const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource_ ) VULKAN_HPP_NOEXCEPT - { - pPictureResource = pPictureResource_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoReferenceSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoReferenceSlotInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, slotIndex, pPictureResource ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoReferenceSlotInfoKHR const & ) const = default; -# else - bool operator==( VideoReferenceSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( slotIndex == rhs.slotIndex ) && ( pPictureResource == rhs.pPictureResource ); -# endif - } - - bool operator!=( VideoReferenceSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoReferenceSlotInfoKHR; - const void * pNext = {}; - int8_t slotIndex = {}; - const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource = {}; - }; - - template <> - struct CppType - { - using Type = VideoReferenceSlotInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoBeginCodingInfoKHR - { - using NativeType = VkVideoBeginCodingInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoBeginCodingInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoBeginCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ = {}, - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ = {}, - uint32_t referenceSlotCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , videoSession( videoSession_ ) - , videoSessionParameters( videoSessionParameters_ ) - , referenceSlotCount( referenceSlotCount_ ) - , pReferenceSlots( pReferenceSlots_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoBeginCodingInfoKHR( VideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoBeginCodingInfoKHR( VkVideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoBeginCodingInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoBeginCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_, - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_, - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , videoSession( videoSession_ ) - , videoSessionParameters( videoSessionParameters_ ) - , referenceSlotCount( static_cast( referenceSlots_.size() ) ) - , pReferenceSlots( referenceSlots_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoBeginCodingInfoKHR & operator=( VideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoBeginCodingInfoKHR & operator=( VkVideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setVideoSession( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ ) VULKAN_HPP_NOEXCEPT - { - videoSession = videoSession_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & - setVideoSessionParameters( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ ) VULKAN_HPP_NOEXCEPT - { - videoSessionParameters = videoSessionParameters_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = referenceSlotCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & - setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceSlots = pReferenceSlots_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoBeginCodingInfoKHR & setReferenceSlots( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = static_cast( referenceSlots_.size() ); - pReferenceSlots = referenceSlots_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoBeginCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoBeginCodingInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, videoSession, videoSessionParameters, referenceSlotCount, pReferenceSlots ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoBeginCodingInfoKHR const & ) const = default; -# else - bool operator==( VideoBeginCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( videoSession == rhs.videoSession ) && - ( videoSessionParameters == rhs.videoSessionParameters ) && ( referenceSlotCount == rhs.referenceSlotCount ) && - ( pReferenceSlots == rhs.pReferenceSlots ); -# endif - } - - bool operator!=( VideoBeginCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoBeginCodingInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession = {}; - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters = {}; - uint32_t referenceSlotCount = {}; - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; - }; - - template <> - struct CppType - { - using Type = VideoBeginCodingInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoCapabilitiesKHR - { - using NativeType = VkVideoCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoCapabilitiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 VideoCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR capabilityFlags_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D videoPictureExtentGranularity_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D minExtent_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D maxExtent_ = {}, - uint32_t maxReferencePicturesSlotsCount_ = {}, - uint32_t maxReferencePicturesActiveCount_ = {}, - VULKAN_HPP_NAMESPACE::ExtensionProperties stdHeaderVersion_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , capabilityFlags( capabilityFlags_ ) - , minBitstreamBufferOffsetAlignment( minBitstreamBufferOffsetAlignment_ ) - , minBitstreamBufferSizeAlignment( minBitstreamBufferSizeAlignment_ ) - , videoPictureExtentGranularity( videoPictureExtentGranularity_ ) - , minExtent( minExtent_ ) - , maxExtent( maxExtent_ ) - , maxReferencePicturesSlotsCount( maxReferencePicturesSlotsCount_ ) - , maxReferencePicturesActiveCount( maxReferencePicturesActiveCount_ ) - , stdHeaderVersion( stdHeaderVersion_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 VideoCapabilitiesKHR( VideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoCapabilitiesKHR( VkVideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoCapabilitiesKHR & operator=( VideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoCapabilitiesKHR & operator=( VkVideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - capabilityFlags, - minBitstreamBufferOffsetAlignment, - minBitstreamBufferSizeAlignment, - videoPictureExtentGranularity, - minExtent, - maxExtent, - maxReferencePicturesSlotsCount, - maxReferencePicturesActiveCount, - stdHeaderVersion ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoCapabilitiesKHR const & ) const = default; -# else - bool operator==( VideoCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( capabilityFlags == rhs.capabilityFlags ) && - ( minBitstreamBufferOffsetAlignment == rhs.minBitstreamBufferOffsetAlignment ) && - ( minBitstreamBufferSizeAlignment == rhs.minBitstreamBufferSizeAlignment ) && - ( videoPictureExtentGranularity == rhs.videoPictureExtentGranularity ) && ( minExtent == rhs.minExtent ) && ( maxExtent == rhs.maxExtent ) && - ( maxReferencePicturesSlotsCount == rhs.maxReferencePicturesSlotsCount ) && - ( maxReferencePicturesActiveCount == rhs.maxReferencePicturesActiveCount ) && ( stdHeaderVersion == rhs.stdHeaderVersion ); -# endif - } - - bool operator!=( VideoCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCapabilitiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR capabilityFlags = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment = {}; - VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment = {}; - VULKAN_HPP_NAMESPACE::Extent2D videoPictureExtentGranularity = {}; - VULKAN_HPP_NAMESPACE::Extent2D minExtent = {}; - VULKAN_HPP_NAMESPACE::Extent2D maxExtent = {}; - uint32_t maxReferencePicturesSlotsCount = {}; - uint32_t maxReferencePicturesActiveCount = {}; - VULKAN_HPP_NAMESPACE::ExtensionProperties stdHeaderVersion = {}; - }; - - template <> - struct CppType - { - using Type = VideoCapabilitiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoCodingControlInfoKHR - { - using NativeType = VkVideoCodingControlInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoCodingControlInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoCodingControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoCodingControlInfoKHR( VideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoCodingControlInfoKHR( VkVideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoCodingControlInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoCodingControlInfoKHR & operator=( VideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoCodingControlInfoKHR & operator=( VkVideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoCodingControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoCodingControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoCodingControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoCodingControlInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoCodingControlInfoKHR const & ) const = default; -# else - bool operator==( VideoCodingControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( VideoCodingControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCodingControlInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags = {}; - }; - - template <> - struct CppType - { - using Type = VideoCodingControlInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeCapabilitiesKHR - { - using NativeType = VkVideoDecodeCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeCapabilitiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilityFlagsKHR flags_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeCapabilitiesKHR( VideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeCapabilitiesKHR( VkVideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeCapabilitiesKHR & operator=( VideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeCapabilitiesKHR & operator=( VkVideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoDecodeCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeCapabilitiesKHR const & ) const = default; -# else - bool operator==( VideoDecodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( VideoDecodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeCapabilitiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoDecodeCapabilityFlagsKHR flags = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeCapabilitiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264CapabilitiesEXT - { - using NativeType = VkVideoDecodeH264CapabilitiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264CapabilitiesEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264CapabilitiesEXT( StdVideoH264Level maxLevel_ = {}, - VULKAN_HPP_NAMESPACE::Offset2D fieldOffsetGranularity_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxLevel( maxLevel_ ) - , fieldOffsetGranularity( fieldOffsetGranularity_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264CapabilitiesEXT( VideoDecodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264CapabilitiesEXT( VkVideoDecodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264CapabilitiesEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264CapabilitiesEXT & operator=( VideoDecodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264CapabilitiesEXT & operator=( VkVideoDecodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoDecodeH264CapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264CapabilitiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxLevel, fieldOffsetGranularity ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoDecodeH264CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoH264Level ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = fieldOffsetGranularity <=> rhs.fieldOffsetGranularity; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoDecodeH264CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoH264Level ) ) == 0 ) && - ( fieldOffsetGranularity == rhs.fieldOffsetGranularity ); - } - - bool operator!=( VideoDecodeH264CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264CapabilitiesEXT; - void * pNext = {}; - StdVideoH264Level maxLevel = {}; - VULKAN_HPP_NAMESPACE::Offset2D fieldOffsetGranularity = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264CapabilitiesEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264DpbSlotInfoEXT - { - using NativeType = VkVideoDecodeH264DpbSlotInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264DpbSlotInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264DpbSlotInfoEXT( const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pStdReferenceInfo( pStdReferenceInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264DpbSlotInfoEXT( VideoDecodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264DpbSlotInfoEXT( VkVideoDecodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264DpbSlotInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264DpbSlotInfoEXT & operator=( VideoDecodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264DpbSlotInfoEXT & operator=( VkVideoDecodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264DpbSlotInfoEXT & - setPStdReferenceInfo( const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdReferenceInfo = pStdReferenceInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264DpbSlotInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pStdReferenceInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH264DpbSlotInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH264DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); -# endif - } - - bool operator!=( VideoDecodeH264DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264DpbSlotInfoEXT; - const void * pNext = {}; - const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264DpbSlotInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264MvcInfoEXT - { - using NativeType = VkVideoDecodeH264MvcInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264MvcInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264MvcInfoEXT( const StdVideoDecodeH264Mvc * pStdMvc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pStdMvc( pStdMvc_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264MvcInfoEXT( VideoDecodeH264MvcInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264MvcInfoEXT( VkVideoDecodeH264MvcInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264MvcInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264MvcInfoEXT & operator=( VideoDecodeH264MvcInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264MvcInfoEXT & operator=( VkVideoDecodeH264MvcInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264MvcInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264MvcInfoEXT & setPStdMvc( const StdVideoDecodeH264Mvc * pStdMvc_ ) VULKAN_HPP_NOEXCEPT - { - pStdMvc = pStdMvc_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264MvcInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264MvcInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pStdMvc ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH264MvcInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH264MvcInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdMvc == rhs.pStdMvc ); -# endif - } - - bool operator!=( VideoDecodeH264MvcInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264MvcInfoEXT; - const void * pNext = {}; - const StdVideoDecodeH264Mvc * pStdMvc = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264MvcInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264PictureInfoEXT - { - using NativeType = VkVideoDecodeH264PictureInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264PictureInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureInfoEXT( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_ = {}, - uint32_t slicesCount_ = {}, - const uint32_t * pSlicesDataOffsets_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pStdPictureInfo( pStdPictureInfo_ ) - , slicesCount( slicesCount_ ) - , pSlicesDataOffsets( pSlicesDataOffsets_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureInfoEXT( VideoDecodeH264PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264PictureInfoEXT( VkVideoDecodeH264PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264PictureInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH264PictureInfoEXT( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & slicesDataOffsets_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pStdPictureInfo( pStdPictureInfo_ ) - , slicesCount( static_cast( slicesDataOffsets_.size() ) ) - , pSlicesDataOffsets( slicesDataOffsets_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264PictureInfoEXT & operator=( VideoDecodeH264PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264PictureInfoEXT & operator=( VkVideoDecodeH264PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoEXT & setPStdPictureInfo( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdPictureInfo = pStdPictureInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoEXT & setSlicesCount( uint32_t slicesCount_ ) VULKAN_HPP_NOEXCEPT - { - slicesCount = slicesCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoEXT & setPSlicesDataOffsets( const uint32_t * pSlicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT - { - pSlicesDataOffsets = pSlicesDataOffsets_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH264PictureInfoEXT & - setSlicesDataOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & slicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT - { - slicesCount = static_cast( slicesDataOffsets_.size() ); - pSlicesDataOffsets = slicesDataOffsets_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264PictureInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264PictureInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pStdPictureInfo, slicesCount, pSlicesDataOffsets ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH264PictureInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH264PictureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( slicesCount == rhs.slicesCount ) && - ( pSlicesDataOffsets == rhs.pSlicesDataOffsets ); -# endif - } - - bool operator!=( VideoDecodeH264PictureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264PictureInfoEXT; - const void * pNext = {}; - const StdVideoDecodeH264PictureInfo * pStdPictureInfo = {}; - uint32_t slicesCount = {}; - const uint32_t * pSlicesDataOffsets = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264PictureInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264ProfileInfoEXT - { - using NativeType = VkVideoDecodeH264ProfileInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264ProfileInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264ProfileInfoEXT( StdVideoH264ProfileIdc stdProfileIdc_ = {}, - VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stdProfileIdc( stdProfileIdc_ ) - , pictureLayout( pictureLayout_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264ProfileInfoEXT( VideoDecodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264ProfileInfoEXT( VkVideoDecodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264ProfileInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264ProfileInfoEXT & operator=( VideoDecodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264ProfileInfoEXT & operator=( VkVideoDecodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoEXT & setStdProfileIdc( StdVideoH264ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT - { - stdProfileIdc = stdProfileIdc_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoEXT & - setPictureLayout( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout_ ) VULKAN_HPP_NOEXCEPT - { - pictureLayout = pictureLayout_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264ProfileInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264ProfileInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stdProfileIdc, pictureLayout ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoDecodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - if ( auto cmp = pictureLayout <=> rhs.pictureLayout; cmp != 0 ) - return cmp; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoDecodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ) == 0 ) && - ( pictureLayout == rhs.pictureLayout ); - } - - bool operator!=( VideoDecodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264ProfileInfoEXT; - const void * pNext = {}; - StdVideoH264ProfileIdc stdProfileIdc = {}; - VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264ProfileInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264SessionParametersAddInfoEXT - { - using NativeType = VkVideoDecodeH264SessionParametersAddInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264SessionParametersAddInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersAddInfoEXT( uint32_t spsStdCount_ = {}, - const StdVideoH264SequenceParameterSet * pSpsStd_ = {}, - uint32_t ppsStdCount_ = {}, - const StdVideoH264PictureParameterSet * pPpsStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , spsStdCount( spsStdCount_ ) - , pSpsStd( pSpsStd_ ) - , ppsStdCount( ppsStdCount_ ) - , pPpsStd( pPpsStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersAddInfoEXT( VideoDecodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264SessionParametersAddInfoEXT( VkVideoDecodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264SessionParametersAddInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH264SessionParametersAddInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , spsStdCount( static_cast( spsStd_.size() ) ) - , pSpsStd( spsStd_.data() ) - , ppsStdCount( static_cast( ppsStd_.size() ) ) - , pPpsStd( ppsStd_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264SessionParametersAddInfoEXT & operator=( VideoDecodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264SessionParametersAddInfoEXT & operator=( VkVideoDecodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoEXT & setSpsStdCount( uint32_t spsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = spsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoEXT & setPSpsStd( const StdVideoH264SequenceParameterSet * pSpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pSpsStd = pSpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH264SessionParametersAddInfoEXT & - setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = static_cast( spsStd_.size() ); - pSpsStd = spsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = ppsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoEXT & setPPpsStd( const StdVideoH264PictureParameterSet * pPpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pPpsStd = pPpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH264SessionParametersAddInfoEXT & - setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = static_cast( ppsStd_.size() ); - pPpsStd = ppsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264SessionParametersAddInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, spsStdCount, pSpsStd, ppsStdCount, pPpsStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH264SessionParametersAddInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH264SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( spsStdCount == rhs.spsStdCount ) && ( pSpsStd == rhs.pSpsStd ) && - ( ppsStdCount == rhs.ppsStdCount ) && ( pPpsStd == rhs.pPpsStd ); -# endif - } - - bool operator!=( VideoDecodeH264SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264SessionParametersAddInfoEXT; - const void * pNext = {}; - uint32_t spsStdCount = {}; - const StdVideoH264SequenceParameterSet * pSpsStd = {}; - uint32_t ppsStdCount = {}; - const StdVideoH264PictureParameterSet * pPpsStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264SessionParametersAddInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH264SessionParametersCreateInfoEXT - { - using NativeType = VkVideoDecodeH264SessionParametersCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264SessionParametersCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VideoDecodeH264SessionParametersCreateInfoEXT( uint32_t maxSpsStdCount_ = {}, - uint32_t maxPpsStdCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoEXT * pParametersAddInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxSpsStdCount( maxSpsStdCount_ ) - , maxPpsStdCount( maxPpsStdCount_ ) - , pParametersAddInfo( pParametersAddInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR - VideoDecodeH264SessionParametersCreateInfoEXT( VideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264SessionParametersCreateInfoEXT( VkVideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH264SessionParametersCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH264SessionParametersCreateInfoEXT & operator=( VideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH264SessionParametersCreateInfoEXT & operator=( VkVideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoEXT & setMaxSpsStdCount( uint32_t maxSpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxSpsStdCount = maxSpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoEXT & setMaxPpsStdCount( uint32_t maxPpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxPpsStdCount = maxPpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoEXT & - setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoEXT * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT - { - pParametersAddInfo = pParametersAddInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH264SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH264SessionParametersCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxSpsStdCount, maxPpsStdCount, pParametersAddInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH264SessionParametersCreateInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSpsStdCount == rhs.maxSpsStdCount ) && ( maxPpsStdCount == rhs.maxPpsStdCount ) && - ( pParametersAddInfo == rhs.pParametersAddInfo ); -# endif - } - - bool operator!=( VideoDecodeH264SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264SessionParametersCreateInfoEXT; - const void * pNext = {}; - uint32_t maxSpsStdCount = {}; - uint32_t maxPpsStdCount = {}; - const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoEXT * pParametersAddInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH264SessionParametersCreateInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265CapabilitiesEXT - { - using NativeType = VkVideoDecodeH265CapabilitiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265CapabilitiesEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH265CapabilitiesEXT( StdVideoH265Level maxLevel_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxLevel( maxLevel_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH265CapabilitiesEXT( VideoDecodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265CapabilitiesEXT( VkVideoDecodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265CapabilitiesEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265CapabilitiesEXT & operator=( VideoDecodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265CapabilitiesEXT & operator=( VkVideoDecodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoDecodeH265CapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265CapabilitiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxLevel ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoDecodeH265CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoH265Level ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoDecodeH265CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoH265Level ) ) == 0 ); - } - - bool operator!=( VideoDecodeH265CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265CapabilitiesEXT; - void * pNext = {}; - StdVideoH265Level maxLevel = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265CapabilitiesEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265DpbSlotInfoEXT - { - using NativeType = VkVideoDecodeH265DpbSlotInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265DpbSlotInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH265DpbSlotInfoEXT( const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pStdReferenceInfo( pStdReferenceInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH265DpbSlotInfoEXT( VideoDecodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265DpbSlotInfoEXT( VkVideoDecodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265DpbSlotInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265DpbSlotInfoEXT & operator=( VideoDecodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265DpbSlotInfoEXT & operator=( VkVideoDecodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265DpbSlotInfoEXT & - setPStdReferenceInfo( const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdReferenceInfo = pStdReferenceInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH265DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265DpbSlotInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pStdReferenceInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH265DpbSlotInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH265DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); -# endif - } - - bool operator!=( VideoDecodeH265DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265DpbSlotInfoEXT; - const void * pNext = {}; - const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265DpbSlotInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265PictureInfoEXT - { - using NativeType = VkVideoDecodeH265PictureInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265PictureInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH265PictureInfoEXT( StdVideoDecodeH265PictureInfo * pStdPictureInfo_ = {}, - uint32_t slicesCount_ = {}, - const uint32_t * pSlicesDataOffsets_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pStdPictureInfo( pStdPictureInfo_ ) - , slicesCount( slicesCount_ ) - , pSlicesDataOffsets( pSlicesDataOffsets_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH265PictureInfoEXT( VideoDecodeH265PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265PictureInfoEXT( VkVideoDecodeH265PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265PictureInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265PictureInfoEXT( StdVideoDecodeH265PictureInfo * pStdPictureInfo_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & slicesDataOffsets_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pStdPictureInfo( pStdPictureInfo_ ) - , slicesCount( static_cast( slicesDataOffsets_.size() ) ) - , pSlicesDataOffsets( slicesDataOffsets_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265PictureInfoEXT & operator=( VideoDecodeH265PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265PictureInfoEXT & operator=( VkVideoDecodeH265PictureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoEXT & setPStdPictureInfo( StdVideoDecodeH265PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdPictureInfo = pStdPictureInfo_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoEXT & setSlicesCount( uint32_t slicesCount_ ) VULKAN_HPP_NOEXCEPT - { - slicesCount = slicesCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoEXT & setPSlicesDataOffsets( const uint32_t * pSlicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT - { - pSlicesDataOffsets = pSlicesDataOffsets_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265PictureInfoEXT & - setSlicesDataOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & slicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT - { - slicesCount = static_cast( slicesDataOffsets_.size() ); - pSlicesDataOffsets = slicesDataOffsets_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH265PictureInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265PictureInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pStdPictureInfo, slicesCount, pSlicesDataOffsets ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH265PictureInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH265PictureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( slicesCount == rhs.slicesCount ) && - ( pSlicesDataOffsets == rhs.pSlicesDataOffsets ); -# endif - } - - bool operator!=( VideoDecodeH265PictureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265PictureInfoEXT; - const void * pNext = {}; - StdVideoDecodeH265PictureInfo * pStdPictureInfo = {}; - uint32_t slicesCount = {}; - const uint32_t * pSlicesDataOffsets = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265PictureInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265ProfileInfoEXT - { - using NativeType = VkVideoDecodeH265ProfileInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265ProfileInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH265ProfileInfoEXT( StdVideoH265ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stdProfileIdc( stdProfileIdc_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH265ProfileInfoEXT( VideoDecodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265ProfileInfoEXT( VkVideoDecodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265ProfileInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265ProfileInfoEXT & operator=( VideoDecodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265ProfileInfoEXT & operator=( VkVideoDecodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265ProfileInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265ProfileInfoEXT & setStdProfileIdc( StdVideoH265ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT - { - stdProfileIdc = stdProfileIdc_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH265ProfileInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265ProfileInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stdProfileIdc ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoDecodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoDecodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ) == 0 ); - } - - bool operator!=( VideoDecodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265ProfileInfoEXT; - const void * pNext = {}; - StdVideoH265ProfileIdc stdProfileIdc = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265ProfileInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265SessionParametersAddInfoEXT - { - using NativeType = VkVideoDecodeH265SessionParametersAddInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265SessionParametersAddInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersAddInfoEXT( uint32_t vpsStdCount_ = {}, - const StdVideoH265VideoParameterSet * pVpsStd_ = {}, - uint32_t spsStdCount_ = {}, - const StdVideoH265SequenceParameterSet * pSpsStd_ = {}, - uint32_t ppsStdCount_ = {}, - const StdVideoH265PictureParameterSet * pPpsStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vpsStdCount( vpsStdCount_ ) - , pVpsStd( pVpsStd_ ) - , spsStdCount( spsStdCount_ ) - , pSpsStd( pSpsStd_ ) - , ppsStdCount( ppsStdCount_ ) - , pPpsStd( pPpsStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersAddInfoEXT( VideoDecodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265SessionParametersAddInfoEXT( VkVideoDecodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265SessionParametersAddInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265SessionParametersAddInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vpsStd_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , vpsStdCount( static_cast( vpsStd_.size() ) ) - , pVpsStd( vpsStd_.data() ) - , spsStdCount( static_cast( spsStd_.size() ) ) - , pSpsStd( spsStd_.data() ) - , ppsStdCount( static_cast( ppsStd_.size() ) ) - , pPpsStd( ppsStd_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265SessionParametersAddInfoEXT & operator=( VideoDecodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265SessionParametersAddInfoEXT & operator=( VkVideoDecodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setVpsStdCount( uint32_t vpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - vpsStdCount = vpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setPVpsStd( const StdVideoH265VideoParameterSet * pVpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pVpsStd = pVpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265SessionParametersAddInfoEXT & - setVpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vpsStd_ ) VULKAN_HPP_NOEXCEPT - { - vpsStdCount = static_cast( vpsStd_.size() ); - pVpsStd = vpsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setSpsStdCount( uint32_t spsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = spsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setPSpsStd( const StdVideoH265SequenceParameterSet * pSpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pSpsStd = pSpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265SessionParametersAddInfoEXT & - setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = static_cast( spsStd_.size() ); - pSpsStd = spsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = ppsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoEXT & setPPpsStd( const StdVideoH265PictureParameterSet * pPpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pPpsStd = pPpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeH265SessionParametersAddInfoEXT & - setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = static_cast( ppsStd_.size() ); - pPpsStd = ppsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH265SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265SessionParametersAddInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vpsStdCount, pVpsStd, spsStdCount, pSpsStd, ppsStdCount, pPpsStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH265SessionParametersAddInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH265SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vpsStdCount == rhs.vpsStdCount ) && ( pVpsStd == rhs.pVpsStd ) && - ( spsStdCount == rhs.spsStdCount ) && ( pSpsStd == rhs.pSpsStd ) && ( ppsStdCount == rhs.ppsStdCount ) && ( pPpsStd == rhs.pPpsStd ); -# endif - } - - bool operator!=( VideoDecodeH265SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265SessionParametersAddInfoEXT; - const void * pNext = {}; - uint32_t vpsStdCount = {}; - const StdVideoH265VideoParameterSet * pVpsStd = {}; - uint32_t spsStdCount = {}; - const StdVideoH265SequenceParameterSet * pSpsStd = {}; - uint32_t ppsStdCount = {}; - const StdVideoH265PictureParameterSet * pPpsStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265SessionParametersAddInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeH265SessionParametersCreateInfoEXT - { - using NativeType = VkVideoDecodeH265SessionParametersCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265SessionParametersCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VideoDecodeH265SessionParametersCreateInfoEXT( uint32_t maxVpsStdCount_ = {}, - uint32_t maxSpsStdCount_ = {}, - uint32_t maxPpsStdCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoEXT * pParametersAddInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxVpsStdCount( maxVpsStdCount_ ) - , maxSpsStdCount( maxSpsStdCount_ ) - , maxPpsStdCount( maxPpsStdCount_ ) - , pParametersAddInfo( pParametersAddInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR - VideoDecodeH265SessionParametersCreateInfoEXT( VideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265SessionParametersCreateInfoEXT( VkVideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeH265SessionParametersCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeH265SessionParametersCreateInfoEXT & operator=( VideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeH265SessionParametersCreateInfoEXT & operator=( VkVideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoEXT & setMaxVpsStdCount( uint32_t maxVpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxVpsStdCount = maxVpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoEXT & setMaxSpsStdCount( uint32_t maxSpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxSpsStdCount = maxSpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoEXT & setMaxPpsStdCount( uint32_t maxPpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxPpsStdCount = maxPpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoEXT & - setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoEXT * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT - { - pParametersAddInfo = pParametersAddInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeH265SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeH265SessionParametersCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxVpsStdCount, maxSpsStdCount, maxPpsStdCount, pParametersAddInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeH265SessionParametersCreateInfoEXT const & ) const = default; -# else - bool operator==( VideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVpsStdCount == rhs.maxVpsStdCount ) && ( maxSpsStdCount == rhs.maxSpsStdCount ) && - ( maxPpsStdCount == rhs.maxPpsStdCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); -# endif - } - - bool operator!=( VideoDecodeH265SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265SessionParametersCreateInfoEXT; - const void * pNext = {}; - uint32_t maxVpsStdCount = {}; - uint32_t maxSpsStdCount = {}; - uint32_t maxPpsStdCount = {}; - const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoEXT * pParametersAddInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeH265SessionParametersCreateInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeInfoKHR - { - using NativeType = VkVideoDecodeInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_ = {}, - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource_ = {}, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ = {}, - uint32_t referenceSlotCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , srcBuffer( srcBuffer_ ) - , srcBufferOffset( srcBufferOffset_ ) - , srcBufferRange( srcBufferRange_ ) - , dstPictureResource( dstPictureResource_ ) - , pSetupReferenceSlot( pSetupReferenceSlot_ ) - , referenceSlotCount( referenceSlotCount_ ) - , pReferenceSlots( pReferenceSlots_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeInfoKHR( VideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeInfoKHR( VkVideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeInfoKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_, - VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_, - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_, - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource_, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , srcBuffer( srcBuffer_ ) - , srcBufferOffset( srcBufferOffset_ ) - , srcBufferRange( srcBufferRange_ ) - , dstPictureResource( dstPictureResource_ ) - , pSetupReferenceSlot( pSetupReferenceSlot_ ) - , referenceSlotCount( static_cast( referenceSlots_.size() ) ) - , pReferenceSlots( referenceSlots_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeInfoKHR & operator=( VideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeInfoKHR & operator=( VkVideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT - { - srcBuffer = srcBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_ ) VULKAN_HPP_NOEXCEPT - { - srcBufferOffset = srcBufferOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBufferRange( VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_ ) VULKAN_HPP_NOEXCEPT - { - srcBufferRange = srcBufferRange_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & - setDstPictureResource( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & dstPictureResource_ ) VULKAN_HPP_NOEXCEPT - { - dstPictureResource = dstPictureResource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & - setPSetupReferenceSlot( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ ) VULKAN_HPP_NOEXCEPT - { - pSetupReferenceSlot = pSetupReferenceSlot_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = referenceSlotCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & - setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceSlots = pReferenceSlots_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoDecodeInfoKHR & setReferenceSlots( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = static_cast( referenceSlots_.size() ); - pReferenceSlots = referenceSlots_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, flags, srcBuffer, srcBufferOffset, srcBufferRange, dstPictureResource, pSetupReferenceSlot, referenceSlotCount, pReferenceSlots ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeInfoKHR const & ) const = default; -# else - bool operator==( VideoDecodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( srcBuffer == rhs.srcBuffer ) && - ( srcBufferOffset == rhs.srcBufferOffset ) && ( srcBufferRange == rhs.srcBufferRange ) && ( dstPictureResource == rhs.dstPictureResource ) && - ( pSetupReferenceSlot == rhs.pSetupReferenceSlot ) && ( referenceSlotCount == rhs.referenceSlotCount ) && - ( pReferenceSlots == rhs.pReferenceSlots ); -# endif - } - - bool operator!=( VideoDecodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange = {}; - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource = {}; - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot = {}; - uint32_t referenceSlotCount = {}; - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoDecodeUsageInfoKHR - { - using NativeType = VkVideoDecodeUsageInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeUsageInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoDecodeUsageInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , videoUsageHints( videoUsageHints_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoDecodeUsageInfoKHR( VideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeUsageInfoKHR( VkVideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoDecodeUsageInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoDecodeUsageInfoKHR & operator=( VideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoDecodeUsageInfoKHR & operator=( VkVideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoDecodeUsageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoDecodeUsageInfoKHR & setVideoUsageHints( VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints_ ) VULKAN_HPP_NOEXCEPT - { - videoUsageHints = videoUsageHints_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoDecodeUsageInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoDecodeUsageInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, videoUsageHints ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoDecodeUsageInfoKHR const & ) const = default; -# else - bool operator==( VideoDecodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoUsageHints == rhs.videoUsageHints ); -# endif - } - - bool operator!=( VideoDecodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeUsageInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints = {}; - }; - - template <> - struct CppType - { - using Type = VideoDecodeUsageInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeCapabilitiesKHR - { - using NativeType = VkVideoEncodeCapabilitiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeCapabilitiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilityFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagsKHR rateControlModes_ = {}, - uint8_t rateControlLayerCount_ = {}, - uint8_t qualityLevelCount_ = {}, - VULKAN_HPP_NAMESPACE::Extent2D inputImageDataFillAlignment_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , rateControlModes( rateControlModes_ ) - , rateControlLayerCount( rateControlLayerCount_ ) - , qualityLevelCount( qualityLevelCount_ ) - , inputImageDataFillAlignment( inputImageDataFillAlignment_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeCapabilitiesKHR( VideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeCapabilitiesKHR( VkVideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeCapabilitiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeCapabilitiesKHR & operator=( VideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeCapabilitiesKHR & operator=( VkVideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoEncodeCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, rateControlModes, rateControlLayerCount, qualityLevelCount, inputImageDataFillAlignment ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeCapabilitiesKHR const & ) const = default; -# else - bool operator==( VideoEncodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rateControlModes == rhs.rateControlModes ) && - ( rateControlLayerCount == rhs.rateControlLayerCount ) && ( qualityLevelCount == rhs.qualityLevelCount ) && - ( inputImageDataFillAlignment == rhs.inputImageDataFillAlignment ); -# endif - } - - bool operator!=( VideoEncodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeCapabilitiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeCapabilityFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagsKHR rateControlModes = {}; - uint8_t rateControlLayerCount = {}; - uint8_t qualityLevelCount = {}; - VULKAN_HPP_NAMESPACE::Extent2D inputImageDataFillAlignment = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeCapabilitiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264CapabilitiesEXT - { - using NativeType = VkVideoEncodeH264CapabilitiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264CapabilitiesEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesEXT( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags_ = {}, - uint8_t maxPPictureL0ReferenceCount_ = {}, - uint8_t maxBPictureL0ReferenceCount_ = {}, - uint8_t maxL1ReferenceCount_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 motionVectorsOverPicBoundariesFlag_ = {}, - uint32_t maxBytesPerPicDenom_ = {}, - uint32_t maxBitsPerMbDenom_ = {}, - uint32_t log2MaxMvLengthHorizontal_ = {}, - uint32_t log2MaxMvLengthVertical_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , inputModeFlags( inputModeFlags_ ) - , outputModeFlags( outputModeFlags_ ) - , maxPPictureL0ReferenceCount( maxPPictureL0ReferenceCount_ ) - , maxBPictureL0ReferenceCount( maxBPictureL0ReferenceCount_ ) - , maxL1ReferenceCount( maxL1ReferenceCount_ ) - , motionVectorsOverPicBoundariesFlag( motionVectorsOverPicBoundariesFlag_ ) - , maxBytesPerPicDenom( maxBytesPerPicDenom_ ) - , maxBitsPerMbDenom( maxBitsPerMbDenom_ ) - , log2MaxMvLengthHorizontal( log2MaxMvLengthHorizontal_ ) - , log2MaxMvLengthVertical( log2MaxMvLengthVertical_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesEXT( VideoEncodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264CapabilitiesEXT( VkVideoEncodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264CapabilitiesEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264CapabilitiesEXT & operator=( VideoEncodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264CapabilitiesEXT & operator=( VkVideoEncodeH264CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoEncodeH264CapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264CapabilitiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - inputModeFlags, - outputModeFlags, - maxPPictureL0ReferenceCount, - maxBPictureL0ReferenceCount, - maxL1ReferenceCount, - motionVectorsOverPicBoundariesFlag, - maxBytesPerPicDenom, - maxBitsPerMbDenom, - log2MaxMvLengthHorizontal, - log2MaxMvLengthVertical ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264CapabilitiesEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( inputModeFlags == rhs.inputModeFlags ) && - ( outputModeFlags == rhs.outputModeFlags ) && ( maxPPictureL0ReferenceCount == rhs.maxPPictureL0ReferenceCount ) && - ( maxBPictureL0ReferenceCount == rhs.maxBPictureL0ReferenceCount ) && ( maxL1ReferenceCount == rhs.maxL1ReferenceCount ) && - ( motionVectorsOverPicBoundariesFlag == rhs.motionVectorsOverPicBoundariesFlag ) && ( maxBytesPerPicDenom == rhs.maxBytesPerPicDenom ) && - ( maxBitsPerMbDenom == rhs.maxBitsPerMbDenom ) && ( log2MaxMvLengthHorizontal == rhs.log2MaxMvLengthHorizontal ) && - ( log2MaxMvLengthVertical == rhs.log2MaxMvLengthVertical ); -# endif - } - - bool operator!=( VideoEncodeH264CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264CapabilitiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags = {}; - uint8_t maxPPictureL0ReferenceCount = {}; - uint8_t maxBPictureL0ReferenceCount = {}; - uint8_t maxL1ReferenceCount = {}; - VULKAN_HPP_NAMESPACE::Bool32 motionVectorsOverPicBoundariesFlag = {}; - uint32_t maxBytesPerPicDenom = {}; - uint32_t maxBitsPerMbDenom = {}; - uint32_t log2MaxMvLengthHorizontal = {}; - uint32_t log2MaxMvLengthVertical = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264CapabilitiesEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264DpbSlotInfoEXT - { - using NativeType = VkVideoEncodeH264DpbSlotInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264DpbSlotInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264DpbSlotInfoEXT( int8_t slotIndex_ = {}, - const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , slotIndex( slotIndex_ ) - , pStdReferenceInfo( pStdReferenceInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264DpbSlotInfoEXT( VideoEncodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264DpbSlotInfoEXT( VkVideoEncodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264DpbSlotInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264DpbSlotInfoEXT & operator=( VideoEncodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264DpbSlotInfoEXT & operator=( VkVideoEncodeH264DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264DpbSlotInfoEXT & setSlotIndex( int8_t slotIndex_ ) VULKAN_HPP_NOEXCEPT - { - slotIndex = slotIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264DpbSlotInfoEXT & - setPStdReferenceInfo( const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdReferenceInfo = pStdReferenceInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264DpbSlotInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, slotIndex, pStdReferenceInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264DpbSlotInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( slotIndex == rhs.slotIndex ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); -# endif - } - - bool operator!=( VideoEncodeH264DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264DpbSlotInfoEXT; - const void * pNext = {}; - int8_t slotIndex = {}; - const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264DpbSlotInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264EmitPictureParametersInfoEXT - { - using NativeType = VkVideoEncodeH264EmitPictureParametersInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264EmitPictureParametersInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264EmitPictureParametersInfoEXT( uint8_t spsId_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_ = {}, - uint32_t ppsIdEntryCount_ = {}, - const uint8_t * ppsIdEntries_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , spsId( spsId_ ) - , emitSpsEnable( emitSpsEnable_ ) - , ppsIdEntryCount( ppsIdEntryCount_ ) - , ppsIdEntries( ppsIdEntries_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264EmitPictureParametersInfoEXT( VideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264EmitPictureParametersInfoEXT( VkVideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264EmitPictureParametersInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264EmitPictureParametersInfoEXT( uint8_t spsId_, - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & psIdEntries_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , spsId( spsId_ ) - , emitSpsEnable( emitSpsEnable_ ) - , ppsIdEntryCount( static_cast( psIdEntries_.size() ) ) - , ppsIdEntries( psIdEntries_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264EmitPictureParametersInfoEXT & operator=( VideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264EmitPictureParametersInfoEXT & operator=( VkVideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264EmitPictureParametersInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264EmitPictureParametersInfoEXT & setSpsId( uint8_t spsId_ ) VULKAN_HPP_NOEXCEPT - { - spsId = spsId_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264EmitPictureParametersInfoEXT & setEmitSpsEnable( VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_ ) VULKAN_HPP_NOEXCEPT - { - emitSpsEnable = emitSpsEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264EmitPictureParametersInfoEXT & setPpsIdEntryCount( uint32_t ppsIdEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntryCount = ppsIdEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264EmitPictureParametersInfoEXT & setPpsIdEntries( const uint8_t * ppsIdEntries_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntries = ppsIdEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264EmitPictureParametersInfoEXT & - setPsIdEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & psIdEntries_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntryCount = static_cast( psIdEntries_.size() ); - ppsIdEntries = psIdEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264EmitPictureParametersInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264EmitPictureParametersInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, spsId, emitSpsEnable, ppsIdEntryCount, ppsIdEntries ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264EmitPictureParametersInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( spsId == rhs.spsId ) && ( emitSpsEnable == rhs.emitSpsEnable ) && - ( ppsIdEntryCount == rhs.ppsIdEntryCount ) && ( ppsIdEntries == rhs.ppsIdEntries ); -# endif - } - - bool operator!=( VideoEncodeH264EmitPictureParametersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264EmitPictureParametersInfoEXT; - const void * pNext = {}; - uint8_t spsId = {}; - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable = {}; - uint32_t ppsIdEntryCount = {}; - const uint8_t * ppsIdEntries = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264EmitPictureParametersInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264FrameSizeEXT - { - using NativeType = VkVideoEncodeH264FrameSizeEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264FrameSizeEXT( uint32_t frameISize_ = {}, uint32_t framePSize_ = {}, uint32_t frameBSize_ = {} ) VULKAN_HPP_NOEXCEPT - : frameISize( frameISize_ ) - , framePSize( framePSize_ ) - , frameBSize( frameBSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264FrameSizeEXT( VideoEncodeH264FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264FrameSizeEXT( VkVideoEncodeH264FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264FrameSizeEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264FrameSizeEXT & operator=( VideoEncodeH264FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264FrameSizeEXT & operator=( VkVideoEncodeH264FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeEXT & setFrameISize( uint32_t frameISize_ ) VULKAN_HPP_NOEXCEPT - { - frameISize = frameISize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeEXT & setFramePSize( uint32_t framePSize_ ) VULKAN_HPP_NOEXCEPT - { - framePSize = framePSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeEXT & setFrameBSize( uint32_t frameBSize_ ) VULKAN_HPP_NOEXCEPT - { - frameBSize = frameBSize_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264FrameSizeEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264FrameSizeEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( frameISize, framePSize, frameBSize ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264FrameSizeEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264FrameSizeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( frameISize == rhs.frameISize ) && ( framePSize == rhs.framePSize ) && ( frameBSize == rhs.frameBSize ); -# endif - } - - bool operator!=( VideoEncodeH264FrameSizeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - uint32_t frameISize = {}; - uint32_t framePSize = {}; - uint32_t frameBSize = {}; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264ReferenceListsInfoEXT - { - using NativeType = VkVideoEncodeH264ReferenceListsInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264ReferenceListsInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264ReferenceListsInfoEXT( uint8_t referenceList0EntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList0Entries_ = {}, - uint8_t referenceList1EntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList1Entries_ = {}, - const StdVideoEncodeH264RefMemMgmtCtrlOperations * pMemMgmtCtrlOperations_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , referenceList0EntryCount( referenceList0EntryCount_ ) - , pReferenceList0Entries( pReferenceList0Entries_ ) - , referenceList1EntryCount( referenceList1EntryCount_ ) - , pReferenceList1Entries( pReferenceList1Entries_ ) - , pMemMgmtCtrlOperations( pMemMgmtCtrlOperations_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264ReferenceListsInfoEXT( VideoEncodeH264ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264ReferenceListsInfoEXT( VkVideoEncodeH264ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264ReferenceListsInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264ReferenceListsInfoEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList0Entries_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList1Entries_ = {}, - const StdVideoEncodeH264RefMemMgmtCtrlOperations * pMemMgmtCtrlOperations_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , referenceList0EntryCount( static_cast( referenceList0Entries_.size() ) ) - , pReferenceList0Entries( referenceList0Entries_.data() ) - , referenceList1EntryCount( static_cast( referenceList1Entries_.size() ) ) - , pReferenceList1Entries( referenceList1Entries_.data() ) - , pMemMgmtCtrlOperations( pMemMgmtCtrlOperations_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264ReferenceListsInfoEXT & operator=( VideoEncodeH264ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264ReferenceListsInfoEXT & operator=( VkVideoEncodeH264ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & setReferenceList0EntryCount( uint8_t referenceList0EntryCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceList0EntryCount = referenceList0EntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & - setPReferenceList0Entries( const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList0Entries_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceList0Entries = pReferenceList0Entries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264ReferenceListsInfoEXT & setReferenceList0Entries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList0Entries_ ) - VULKAN_HPP_NOEXCEPT - { - referenceList0EntryCount = static_cast( referenceList0Entries_.size() ); - pReferenceList0Entries = referenceList0Entries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & setReferenceList1EntryCount( uint8_t referenceList1EntryCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceList1EntryCount = referenceList1EntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & - setPReferenceList1Entries( const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList1Entries_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceList1Entries = pReferenceList1Entries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264ReferenceListsInfoEXT & setReferenceList1Entries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList1Entries_ ) - VULKAN_HPP_NOEXCEPT - { - referenceList1EntryCount = static_cast( referenceList1Entries_.size() ); - pReferenceList1Entries = referenceList1Entries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ReferenceListsInfoEXT & - setPMemMgmtCtrlOperations( const StdVideoEncodeH264RefMemMgmtCtrlOperations * pMemMgmtCtrlOperations_ ) VULKAN_HPP_NOEXCEPT - { - pMemMgmtCtrlOperations = pMemMgmtCtrlOperations_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264ReferenceListsInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264ReferenceListsInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, referenceList0EntryCount, pReferenceList0Entries, referenceList1EntryCount, pReferenceList1Entries, pMemMgmtCtrlOperations ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264ReferenceListsInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264ReferenceListsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( referenceList0EntryCount == rhs.referenceList0EntryCount ) && - ( pReferenceList0Entries == rhs.pReferenceList0Entries ) && ( referenceList1EntryCount == rhs.referenceList1EntryCount ) && - ( pReferenceList1Entries == rhs.pReferenceList1Entries ) && ( pMemMgmtCtrlOperations == rhs.pMemMgmtCtrlOperations ); -# endif - } - - bool operator!=( VideoEncodeH264ReferenceListsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264ReferenceListsInfoEXT; - const void * pNext = {}; - uint8_t referenceList0EntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList0Entries = {}; - uint8_t referenceList1EntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pReferenceList1Entries = {}; - const StdVideoEncodeH264RefMemMgmtCtrlOperations * pMemMgmtCtrlOperations = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264ReferenceListsInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264NaluSliceInfoEXT - { - using NativeType = VkVideoEncodeH264NaluSliceInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264NaluSliceInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264NaluSliceInfoEXT( uint32_t mbCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists_ = {}, - const StdVideoEncodeH264SliceHeader * pSliceHeaderStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , mbCount( mbCount_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , pSliceHeaderStd( pSliceHeaderStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264NaluSliceInfoEXT( VideoEncodeH264NaluSliceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264NaluSliceInfoEXT( VkVideoEncodeH264NaluSliceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264NaluSliceInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264NaluSliceInfoEXT & operator=( VideoEncodeH264NaluSliceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264NaluSliceInfoEXT & operator=( VkVideoEncodeH264NaluSliceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoEXT & setMbCount( uint32_t mbCount_ ) VULKAN_HPP_NOEXCEPT - { - mbCount = mbCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoEXT & - setPReferenceFinalLists( const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceFinalLists = pReferenceFinalLists_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoEXT & setPSliceHeaderStd( const StdVideoEncodeH264SliceHeader * pSliceHeaderStd_ ) VULKAN_HPP_NOEXCEPT - { - pSliceHeaderStd = pSliceHeaderStd_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264NaluSliceInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264NaluSliceInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, mbCount, pReferenceFinalLists, pSliceHeaderStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264NaluSliceInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264NaluSliceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mbCount == rhs.mbCount ) && ( pReferenceFinalLists == rhs.pReferenceFinalLists ) && - ( pSliceHeaderStd == rhs.pSliceHeaderStd ); -# endif - } - - bool operator!=( VideoEncodeH264NaluSliceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264NaluSliceInfoEXT; - const void * pNext = {}; - uint32_t mbCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists = {}; - const StdVideoEncodeH264SliceHeader * pSliceHeaderStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264NaluSliceInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264ProfileInfoEXT - { - using NativeType = VkVideoEncodeH264ProfileInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264ProfileInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264ProfileInfoEXT( StdVideoH264ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stdProfileIdc( stdProfileIdc_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264ProfileInfoEXT( VideoEncodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264ProfileInfoEXT( VkVideoEncodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264ProfileInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264ProfileInfoEXT & operator=( VideoEncodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264ProfileInfoEXT & operator=( VkVideoEncodeH264ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ProfileInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ProfileInfoEXT & setStdProfileIdc( StdVideoH264ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT - { - stdProfileIdc = stdProfileIdc_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264ProfileInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264ProfileInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stdProfileIdc ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoEncodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoEncodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ) == 0 ); - } - - bool operator!=( VideoEncodeH264ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264ProfileInfoEXT; - const void * pNext = {}; - StdVideoH264ProfileIdc stdProfileIdc = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264ProfileInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264QpEXT - { - using NativeType = VkVideoEncodeH264QpEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264QpEXT( int32_t qpI_ = {}, int32_t qpP_ = {}, int32_t qpB_ = {} ) VULKAN_HPP_NOEXCEPT - : qpI( qpI_ ) - , qpP( qpP_ ) - , qpB( qpB_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264QpEXT( VideoEncodeH264QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264QpEXT( VkVideoEncodeH264QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264QpEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264QpEXT & operator=( VideoEncodeH264QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264QpEXT & operator=( VkVideoEncodeH264QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpEXT & setQpI( int32_t qpI_ ) VULKAN_HPP_NOEXCEPT - { - qpI = qpI_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpEXT & setQpP( int32_t qpP_ ) VULKAN_HPP_NOEXCEPT - { - qpP = qpP_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpEXT & setQpB( int32_t qpB_ ) VULKAN_HPP_NOEXCEPT - { - qpB = qpB_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264QpEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264QpEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( qpI, qpP, qpB ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264QpEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264QpEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( qpI == rhs.qpI ) && ( qpP == rhs.qpP ) && ( qpB == rhs.qpB ); -# endif - } - - bool operator!=( VideoEncodeH264QpEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - int32_t qpI = {}; - int32_t qpP = {}; - int32_t qpB = {}; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264RateControlInfoEXT - { - using NativeType = VkVideoEncodeH264RateControlInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264RateControlInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlInfoEXT( uint32_t gopFrameCount_ = {}, - uint32_t idrPeriod_ = {}, - uint32_t consecutiveBFrameCount_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlStructureEXT rateControlStructure_ = - VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlStructureEXT::eUnknown, - uint8_t temporalLayerCount_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , gopFrameCount( gopFrameCount_ ) - , idrPeriod( idrPeriod_ ) - , consecutiveBFrameCount( consecutiveBFrameCount_ ) - , rateControlStructure( rateControlStructure_ ) - , temporalLayerCount( temporalLayerCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlInfoEXT( VideoEncodeH264RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264RateControlInfoEXT( VkVideoEncodeH264RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264RateControlInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264RateControlInfoEXT & operator=( VideoEncodeH264RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264RateControlInfoEXT & operator=( VkVideoEncodeH264RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & setGopFrameCount( uint32_t gopFrameCount_ ) VULKAN_HPP_NOEXCEPT - { - gopFrameCount = gopFrameCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & setIdrPeriod( uint32_t idrPeriod_ ) VULKAN_HPP_NOEXCEPT - { - idrPeriod = idrPeriod_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & setConsecutiveBFrameCount( uint32_t consecutiveBFrameCount_ ) VULKAN_HPP_NOEXCEPT - { - consecutiveBFrameCount = consecutiveBFrameCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & - setRateControlStructure( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlStructureEXT rateControlStructure_ ) VULKAN_HPP_NOEXCEPT - { - rateControlStructure = rateControlStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoEXT & setTemporalLayerCount( uint8_t temporalLayerCount_ ) VULKAN_HPP_NOEXCEPT - { - temporalLayerCount = temporalLayerCount_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264RateControlInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264RateControlInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, gopFrameCount, idrPeriod, consecutiveBFrameCount, rateControlStructure, temporalLayerCount ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264RateControlInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264RateControlInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( gopFrameCount == rhs.gopFrameCount ) && ( idrPeriod == rhs.idrPeriod ) && - ( consecutiveBFrameCount == rhs.consecutiveBFrameCount ) && ( rateControlStructure == rhs.rateControlStructure ) && - ( temporalLayerCount == rhs.temporalLayerCount ); -# endif - } - - bool operator!=( VideoEncodeH264RateControlInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264RateControlInfoEXT; - const void * pNext = {}; - uint32_t gopFrameCount = {}; - uint32_t idrPeriod = {}; - uint32_t consecutiveBFrameCount = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlStructureEXT rateControlStructure = VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlStructureEXT::eUnknown; - uint8_t temporalLayerCount = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264RateControlInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264RateControlLayerInfoEXT - { - using NativeType = VkVideoEncodeH264RateControlLayerInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264RateControlLayerInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlLayerInfoEXT( uint8_t temporalLayerId_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT initialRcQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT minQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT maxQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeEXT maxFrameSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , temporalLayerId( temporalLayerId_ ) - , useInitialRcQp( useInitialRcQp_ ) - , initialRcQp( initialRcQp_ ) - , useMinQp( useMinQp_ ) - , minQp( minQp_ ) - , useMaxQp( useMaxQp_ ) - , maxQp( maxQp_ ) - , useMaxFrameSize( useMaxFrameSize_ ) - , maxFrameSize( maxFrameSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlLayerInfoEXT( VideoEncodeH264RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264RateControlLayerInfoEXT( VkVideoEncodeH264RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264RateControlLayerInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264RateControlLayerInfoEXT & operator=( VideoEncodeH264RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264RateControlLayerInfoEXT & operator=( VkVideoEncodeH264RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setTemporalLayerId( uint8_t temporalLayerId_ ) VULKAN_HPP_NOEXCEPT - { - temporalLayerId = temporalLayerId_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setUseInitialRcQp( VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp_ ) VULKAN_HPP_NOEXCEPT - { - useInitialRcQp = useInitialRcQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & - setInitialRcQp( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT const & initialRcQp_ ) VULKAN_HPP_NOEXCEPT - { - initialRcQp = initialRcQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setUseMinQp( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ ) VULKAN_HPP_NOEXCEPT - { - useMinQp = useMinQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setMinQp( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT const & minQp_ ) VULKAN_HPP_NOEXCEPT - { - minQp = minQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setUseMaxQp( VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ ) VULKAN_HPP_NOEXCEPT - { - useMaxQp = useMaxQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setMaxQp( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT const & maxQp_ ) VULKAN_HPP_NOEXCEPT - { - maxQp = maxQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & setUseMaxFrameSize( VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ ) VULKAN_HPP_NOEXCEPT - { - useMaxFrameSize = useMaxFrameSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoEXT & - setMaxFrameSize( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeEXT const & maxFrameSize_ ) VULKAN_HPP_NOEXCEPT - { - maxFrameSize = maxFrameSize_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264RateControlLayerInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264RateControlLayerInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, temporalLayerId, useInitialRcQp, initialRcQp, useMinQp, minQp, useMaxQp, maxQp, useMaxFrameSize, maxFrameSize ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264RateControlLayerInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264RateControlLayerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( temporalLayerId == rhs.temporalLayerId ) && ( useInitialRcQp == rhs.useInitialRcQp ) && - ( initialRcQp == rhs.initialRcQp ) && ( useMinQp == rhs.useMinQp ) && ( minQp == rhs.minQp ) && ( useMaxQp == rhs.useMaxQp ) && - ( maxQp == rhs.maxQp ) && ( useMaxFrameSize == rhs.useMaxFrameSize ) && ( maxFrameSize == rhs.maxFrameSize ); -# endif - } - - bool operator!=( VideoEncodeH264RateControlLayerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264RateControlLayerInfoEXT; - const void * pNext = {}; - uint8_t temporalLayerId = {}; - VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT initialRcQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMinQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT minQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMaxQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264QpEXT maxQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeEXT maxFrameSize = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264RateControlLayerInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264SessionParametersAddInfoEXT - { - using NativeType = VkVideoEncodeH264SessionParametersAddInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersAddInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersAddInfoEXT( uint32_t spsStdCount_ = {}, - const StdVideoH264SequenceParameterSet * pSpsStd_ = {}, - uint32_t ppsStdCount_ = {}, - const StdVideoH264PictureParameterSet * pPpsStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , spsStdCount( spsStdCount_ ) - , pSpsStd( pSpsStd_ ) - , ppsStdCount( ppsStdCount_ ) - , pPpsStd( pPpsStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersAddInfoEXT( VideoEncodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264SessionParametersAddInfoEXT( VkVideoEncodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264SessionParametersAddInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264SessionParametersAddInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , spsStdCount( static_cast( spsStd_.size() ) ) - , pSpsStd( spsStd_.data() ) - , ppsStdCount( static_cast( ppsStd_.size() ) ) - , pPpsStd( ppsStd_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264SessionParametersAddInfoEXT & operator=( VideoEncodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264SessionParametersAddInfoEXT & operator=( VkVideoEncodeH264SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoEXT & setSpsStdCount( uint32_t spsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = spsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoEXT & setPSpsStd( const StdVideoH264SequenceParameterSet * pSpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pSpsStd = pSpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264SessionParametersAddInfoEXT & - setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = static_cast( spsStd_.size() ); - pSpsStd = spsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = ppsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoEXT & setPPpsStd( const StdVideoH264PictureParameterSet * pPpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pPpsStd = pPpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264SessionParametersAddInfoEXT & - setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = static_cast( ppsStd_.size() ); - pPpsStd = ppsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264SessionParametersAddInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, spsStdCount, pSpsStd, ppsStdCount, pPpsStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264SessionParametersAddInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( spsStdCount == rhs.spsStdCount ) && ( pSpsStd == rhs.pSpsStd ) && - ( ppsStdCount == rhs.ppsStdCount ) && ( pPpsStd == rhs.pPpsStd ); -# endif - } - - bool operator!=( VideoEncodeH264SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersAddInfoEXT; - const void * pNext = {}; - uint32_t spsStdCount = {}; - const StdVideoH264SequenceParameterSet * pSpsStd = {}; - uint32_t ppsStdCount = {}; - const StdVideoH264PictureParameterSet * pPpsStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264SessionParametersAddInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264SessionParametersCreateInfoEXT - { - using NativeType = VkVideoEncodeH264SessionParametersCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VideoEncodeH264SessionParametersCreateInfoEXT( uint32_t maxSpsStdCount_ = {}, - uint32_t maxPpsStdCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoEXT * pParametersAddInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxSpsStdCount( maxSpsStdCount_ ) - , maxPpsStdCount( maxPpsStdCount_ ) - , pParametersAddInfo( pParametersAddInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR - VideoEncodeH264SessionParametersCreateInfoEXT( VideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264SessionParametersCreateInfoEXT( VkVideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264SessionParametersCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264SessionParametersCreateInfoEXT & operator=( VideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264SessionParametersCreateInfoEXT & operator=( VkVideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoEXT & setMaxSpsStdCount( uint32_t maxSpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxSpsStdCount = maxSpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoEXT & setMaxPpsStdCount( uint32_t maxPpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxPpsStdCount = maxPpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoEXT & - setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoEXT * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT - { - pParametersAddInfo = pParametersAddInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264SessionParametersCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxSpsStdCount, maxPpsStdCount, pParametersAddInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264SessionParametersCreateInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSpsStdCount == rhs.maxSpsStdCount ) && ( maxPpsStdCount == rhs.maxPpsStdCount ) && - ( pParametersAddInfo == rhs.pParametersAddInfo ); -# endif - } - - bool operator!=( VideoEncodeH264SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersCreateInfoEXT; - const void * pNext = {}; - uint32_t maxSpsStdCount = {}; - uint32_t maxPpsStdCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoEXT * pParametersAddInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264SessionParametersCreateInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH264VclFrameInfoEXT - { - using NativeType = VkVideoEncodeH264VclFrameInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264VclFrameInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH264VclFrameInfoEXT( const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists_ = {}, - uint32_t naluSliceEntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoEXT * pNaluSliceEntries_ = {}, - const StdVideoEncodeH264PictureInfo * pCurrentPictureInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , naluSliceEntryCount( naluSliceEntryCount_ ) - , pNaluSliceEntries( pNaluSliceEntries_ ) - , pCurrentPictureInfo( pCurrentPictureInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH264VclFrameInfoEXT( VideoEncodeH264VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264VclFrameInfoEXT( VkVideoEncodeH264VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH264VclFrameInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264VclFrameInfoEXT( - const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceEntries_, - const StdVideoEncodeH264PictureInfo * pCurrentPictureInfo_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , naluSliceEntryCount( static_cast( naluSliceEntries_.size() ) ) - , pNaluSliceEntries( naluSliceEntries_.data() ) - , pCurrentPictureInfo( pCurrentPictureInfo_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH264VclFrameInfoEXT & operator=( VideoEncodeH264VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH264VclFrameInfoEXT & operator=( VkVideoEncodeH264VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264VclFrameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264VclFrameInfoEXT & - setPReferenceFinalLists( const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceFinalLists = pReferenceFinalLists_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264VclFrameInfoEXT & setNaluSliceEntryCount( uint32_t naluSliceEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - naluSliceEntryCount = naluSliceEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264VclFrameInfoEXT & - setPNaluSliceEntries( const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoEXT * pNaluSliceEntries_ ) VULKAN_HPP_NOEXCEPT - { - pNaluSliceEntries = pNaluSliceEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH264VclFrameInfoEXT & setNaluSliceEntries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceEntries_ ) VULKAN_HPP_NOEXCEPT - { - naluSliceEntryCount = static_cast( naluSliceEntries_.size() ); - pNaluSliceEntries = naluSliceEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264VclFrameInfoEXT & - setPCurrentPictureInfo( const StdVideoEncodeH264PictureInfo * pCurrentPictureInfo_ ) VULKAN_HPP_NOEXCEPT - { - pCurrentPictureInfo = pCurrentPictureInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH264VclFrameInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH264VclFrameInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pReferenceFinalLists, naluSliceEntryCount, pNaluSliceEntries, pCurrentPictureInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH264VclFrameInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH264VclFrameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pReferenceFinalLists == rhs.pReferenceFinalLists ) && - ( naluSliceEntryCount == rhs.naluSliceEntryCount ) && ( pNaluSliceEntries == rhs.pNaluSliceEntries ) && - ( pCurrentPictureInfo == rhs.pCurrentPictureInfo ); -# endif - } - - bool operator!=( VideoEncodeH264VclFrameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264VclFrameInfoEXT; - const void * pNext = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264ReferenceListsInfoEXT * pReferenceFinalLists = {}; - uint32_t naluSliceEntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoEXT * pNaluSliceEntries = {}; - const StdVideoEncodeH264PictureInfo * pCurrentPictureInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH264VclFrameInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265CapabilitiesEXT - { - using NativeType = VkVideoEncodeH265CapabilitiesEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265CapabilitiesEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilitiesEXT( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilityFlagsEXT flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265InputModeFlagsEXT inputModeFlags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265OutputModeFlagsEXT outputModeFlags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsEXT ctbSizes_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes_ = {}, - uint8_t maxPPictureL0ReferenceCount_ = {}, - uint8_t maxBPictureL0ReferenceCount_ = {}, - uint8_t maxL1ReferenceCount_ = {}, - uint8_t maxSubLayersCount_ = {}, - uint8_t minLog2MinLumaCodingBlockSizeMinus3_ = {}, - uint8_t maxLog2MinLumaCodingBlockSizeMinus3_ = {}, - uint8_t minLog2MinLumaTransformBlockSizeMinus2_ = {}, - uint8_t maxLog2MinLumaTransformBlockSizeMinus2_ = {}, - uint8_t minMaxTransformHierarchyDepthInter_ = {}, - uint8_t maxMaxTransformHierarchyDepthInter_ = {}, - uint8_t minMaxTransformHierarchyDepthIntra_ = {}, - uint8_t maxMaxTransformHierarchyDepthIntra_ = {}, - uint8_t maxDiffCuQpDeltaDepth_ = {}, - uint8_t minMaxNumMergeCand_ = {}, - uint8_t maxMaxNumMergeCand_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , inputModeFlags( inputModeFlags_ ) - , outputModeFlags( outputModeFlags_ ) - , ctbSizes( ctbSizes_ ) - , transformBlockSizes( transformBlockSizes_ ) - , maxPPictureL0ReferenceCount( maxPPictureL0ReferenceCount_ ) - , maxBPictureL0ReferenceCount( maxBPictureL0ReferenceCount_ ) - , maxL1ReferenceCount( maxL1ReferenceCount_ ) - , maxSubLayersCount( maxSubLayersCount_ ) - , minLog2MinLumaCodingBlockSizeMinus3( minLog2MinLumaCodingBlockSizeMinus3_ ) - , maxLog2MinLumaCodingBlockSizeMinus3( maxLog2MinLumaCodingBlockSizeMinus3_ ) - , minLog2MinLumaTransformBlockSizeMinus2( minLog2MinLumaTransformBlockSizeMinus2_ ) - , maxLog2MinLumaTransformBlockSizeMinus2( maxLog2MinLumaTransformBlockSizeMinus2_ ) - , minMaxTransformHierarchyDepthInter( minMaxTransformHierarchyDepthInter_ ) - , maxMaxTransformHierarchyDepthInter( maxMaxTransformHierarchyDepthInter_ ) - , minMaxTransformHierarchyDepthIntra( minMaxTransformHierarchyDepthIntra_ ) - , maxMaxTransformHierarchyDepthIntra( maxMaxTransformHierarchyDepthIntra_ ) - , maxDiffCuQpDeltaDepth( maxDiffCuQpDeltaDepth_ ) - , minMaxNumMergeCand( minMaxNumMergeCand_ ) - , maxMaxNumMergeCand( maxMaxNumMergeCand_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilitiesEXT( VideoEncodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265CapabilitiesEXT( VkVideoEncodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265CapabilitiesEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265CapabilitiesEXT & operator=( VideoEncodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265CapabilitiesEXT & operator=( VkVideoEncodeH265CapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoEncodeH265CapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265CapabilitiesEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - inputModeFlags, - outputModeFlags, - ctbSizes, - transformBlockSizes, - maxPPictureL0ReferenceCount, - maxBPictureL0ReferenceCount, - maxL1ReferenceCount, - maxSubLayersCount, - minLog2MinLumaCodingBlockSizeMinus3, - maxLog2MinLumaCodingBlockSizeMinus3, - minLog2MinLumaTransformBlockSizeMinus2, - maxLog2MinLumaTransformBlockSizeMinus2, - minMaxTransformHierarchyDepthInter, - maxMaxTransformHierarchyDepthInter, - minMaxTransformHierarchyDepthIntra, - maxMaxTransformHierarchyDepthIntra, - maxDiffCuQpDeltaDepth, - minMaxNumMergeCand, - maxMaxNumMergeCand ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265CapabilitiesEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( inputModeFlags == rhs.inputModeFlags ) && - ( outputModeFlags == rhs.outputModeFlags ) && ( ctbSizes == rhs.ctbSizes ) && ( transformBlockSizes == rhs.transformBlockSizes ) && - ( maxPPictureL0ReferenceCount == rhs.maxPPictureL0ReferenceCount ) && ( maxBPictureL0ReferenceCount == rhs.maxBPictureL0ReferenceCount ) && - ( maxL1ReferenceCount == rhs.maxL1ReferenceCount ) && ( maxSubLayersCount == rhs.maxSubLayersCount ) && - ( minLog2MinLumaCodingBlockSizeMinus3 == rhs.minLog2MinLumaCodingBlockSizeMinus3 ) && - ( maxLog2MinLumaCodingBlockSizeMinus3 == rhs.maxLog2MinLumaCodingBlockSizeMinus3 ) && - ( minLog2MinLumaTransformBlockSizeMinus2 == rhs.minLog2MinLumaTransformBlockSizeMinus2 ) && - ( maxLog2MinLumaTransformBlockSizeMinus2 == rhs.maxLog2MinLumaTransformBlockSizeMinus2 ) && - ( minMaxTransformHierarchyDepthInter == rhs.minMaxTransformHierarchyDepthInter ) && - ( maxMaxTransformHierarchyDepthInter == rhs.maxMaxTransformHierarchyDepthInter ) && - ( minMaxTransformHierarchyDepthIntra == rhs.minMaxTransformHierarchyDepthIntra ) && - ( maxMaxTransformHierarchyDepthIntra == rhs.maxMaxTransformHierarchyDepthIntra ) && ( maxDiffCuQpDeltaDepth == rhs.maxDiffCuQpDeltaDepth ) && - ( minMaxNumMergeCand == rhs.minMaxNumMergeCand ) && ( maxMaxNumMergeCand == rhs.maxMaxNumMergeCand ); -# endif - } - - bool operator!=( VideoEncodeH265CapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265CapabilitiesEXT; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilityFlagsEXT flags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265InputModeFlagsEXT inputModeFlags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265OutputModeFlagsEXT outputModeFlags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsEXT ctbSizes = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes = {}; - uint8_t maxPPictureL0ReferenceCount = {}; - uint8_t maxBPictureL0ReferenceCount = {}; - uint8_t maxL1ReferenceCount = {}; - uint8_t maxSubLayersCount = {}; - uint8_t minLog2MinLumaCodingBlockSizeMinus3 = {}; - uint8_t maxLog2MinLumaCodingBlockSizeMinus3 = {}; - uint8_t minLog2MinLumaTransformBlockSizeMinus2 = {}; - uint8_t maxLog2MinLumaTransformBlockSizeMinus2 = {}; - uint8_t minMaxTransformHierarchyDepthInter = {}; - uint8_t maxMaxTransformHierarchyDepthInter = {}; - uint8_t minMaxTransformHierarchyDepthIntra = {}; - uint8_t maxMaxTransformHierarchyDepthIntra = {}; - uint8_t maxDiffCuQpDeltaDepth = {}; - uint8_t minMaxNumMergeCand = {}; - uint8_t maxMaxNumMergeCand = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265CapabilitiesEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265DpbSlotInfoEXT - { - using NativeType = VkVideoEncodeH265DpbSlotInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265DpbSlotInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265DpbSlotInfoEXT( int8_t slotIndex_ = {}, - const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , slotIndex( slotIndex_ ) - , pStdReferenceInfo( pStdReferenceInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265DpbSlotInfoEXT( VideoEncodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265DpbSlotInfoEXT( VkVideoEncodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265DpbSlotInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265DpbSlotInfoEXT & operator=( VideoEncodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265DpbSlotInfoEXT & operator=( VkVideoEncodeH265DpbSlotInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265DpbSlotInfoEXT & setSlotIndex( int8_t slotIndex_ ) VULKAN_HPP_NOEXCEPT - { - slotIndex = slotIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265DpbSlotInfoEXT & - setPStdReferenceInfo( const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT - { - pStdReferenceInfo = pStdReferenceInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265DpbSlotInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, slotIndex, pStdReferenceInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265DpbSlotInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( slotIndex == rhs.slotIndex ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); -# endif - } - - bool operator!=( VideoEncodeH265DpbSlotInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265DpbSlotInfoEXT; - const void * pNext = {}; - int8_t slotIndex = {}; - const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265DpbSlotInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265EmitPictureParametersInfoEXT - { - using NativeType = VkVideoEncodeH265EmitPictureParametersInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265EmitPictureParametersInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265EmitPictureParametersInfoEXT( uint8_t vpsId_ = {}, - uint8_t spsId_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 emitVpsEnable_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_ = {}, - uint32_t ppsIdEntryCount_ = {}, - const uint8_t * ppsIdEntries_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vpsId( vpsId_ ) - , spsId( spsId_ ) - , emitVpsEnable( emitVpsEnable_ ) - , emitSpsEnable( emitSpsEnable_ ) - , ppsIdEntryCount( ppsIdEntryCount_ ) - , ppsIdEntries( ppsIdEntries_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265EmitPictureParametersInfoEXT( VideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265EmitPictureParametersInfoEXT( VkVideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265EmitPictureParametersInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265EmitPictureParametersInfoEXT( uint8_t vpsId_, - uint8_t spsId_, - VULKAN_HPP_NAMESPACE::Bool32 emitVpsEnable_, - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & psIdEntries_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , vpsId( vpsId_ ) - , spsId( spsId_ ) - , emitVpsEnable( emitVpsEnable_ ) - , emitSpsEnable( emitSpsEnable_ ) - , ppsIdEntryCount( static_cast( psIdEntries_.size() ) ) - , ppsIdEntries( psIdEntries_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265EmitPictureParametersInfoEXT & operator=( VideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265EmitPictureParametersInfoEXT & operator=( VkVideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setVpsId( uint8_t vpsId_ ) VULKAN_HPP_NOEXCEPT - { - vpsId = vpsId_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setSpsId( uint8_t spsId_ ) VULKAN_HPP_NOEXCEPT - { - spsId = spsId_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setEmitVpsEnable( VULKAN_HPP_NAMESPACE::Bool32 emitVpsEnable_ ) VULKAN_HPP_NOEXCEPT - { - emitVpsEnable = emitVpsEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setEmitSpsEnable( VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable_ ) VULKAN_HPP_NOEXCEPT - { - emitSpsEnable = emitSpsEnable_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setPpsIdEntryCount( uint32_t ppsIdEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntryCount = ppsIdEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265EmitPictureParametersInfoEXT & setPpsIdEntries( const uint8_t * ppsIdEntries_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntries = ppsIdEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265EmitPictureParametersInfoEXT & - setPsIdEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & psIdEntries_ ) VULKAN_HPP_NOEXCEPT - { - ppsIdEntryCount = static_cast( psIdEntries_.size() ); - ppsIdEntries = psIdEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265EmitPictureParametersInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265EmitPictureParametersInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vpsId, spsId, emitVpsEnable, emitSpsEnable, ppsIdEntryCount, ppsIdEntries ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265EmitPictureParametersInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vpsId == rhs.vpsId ) && ( spsId == rhs.spsId ) && ( emitVpsEnable == rhs.emitVpsEnable ) && - ( emitSpsEnable == rhs.emitSpsEnable ) && ( ppsIdEntryCount == rhs.ppsIdEntryCount ) && ( ppsIdEntries == rhs.ppsIdEntries ); -# endif - } - - bool operator!=( VideoEncodeH265EmitPictureParametersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265EmitPictureParametersInfoEXT; - const void * pNext = {}; - uint8_t vpsId = {}; - uint8_t spsId = {}; - VULKAN_HPP_NAMESPACE::Bool32 emitVpsEnable = {}; - VULKAN_HPP_NAMESPACE::Bool32 emitSpsEnable = {}; - uint32_t ppsIdEntryCount = {}; - const uint8_t * ppsIdEntries = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265EmitPictureParametersInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265FrameSizeEXT - { - using NativeType = VkVideoEncodeH265FrameSizeEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265FrameSizeEXT( uint32_t frameISize_ = {}, uint32_t framePSize_ = {}, uint32_t frameBSize_ = {} ) VULKAN_HPP_NOEXCEPT - : frameISize( frameISize_ ) - , framePSize( framePSize_ ) - , frameBSize( frameBSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265FrameSizeEXT( VideoEncodeH265FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265FrameSizeEXT( VkVideoEncodeH265FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265FrameSizeEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265FrameSizeEXT & operator=( VideoEncodeH265FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265FrameSizeEXT & operator=( VkVideoEncodeH265FrameSizeEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeEXT & setFrameISize( uint32_t frameISize_ ) VULKAN_HPP_NOEXCEPT - { - frameISize = frameISize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeEXT & setFramePSize( uint32_t framePSize_ ) VULKAN_HPP_NOEXCEPT - { - framePSize = framePSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeEXT & setFrameBSize( uint32_t frameBSize_ ) VULKAN_HPP_NOEXCEPT - { - frameBSize = frameBSize_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265FrameSizeEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265FrameSizeEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( frameISize, framePSize, frameBSize ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265FrameSizeEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265FrameSizeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( frameISize == rhs.frameISize ) && ( framePSize == rhs.framePSize ) && ( frameBSize == rhs.frameBSize ); -# endif - } - - bool operator!=( VideoEncodeH265FrameSizeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - uint32_t frameISize = {}; - uint32_t framePSize = {}; - uint32_t frameBSize = {}; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265ReferenceListsInfoEXT - { - using NativeType = VkVideoEncodeH265ReferenceListsInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265ReferenceListsInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265ReferenceListsInfoEXT( uint8_t referenceList0EntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList0Entries_ = {}, - uint8_t referenceList1EntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList1Entries_ = {}, - const StdVideoEncodeH265ReferenceModifications * pReferenceModifications_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , referenceList0EntryCount( referenceList0EntryCount_ ) - , pReferenceList0Entries( pReferenceList0Entries_ ) - , referenceList1EntryCount( referenceList1EntryCount_ ) - , pReferenceList1Entries( pReferenceList1Entries_ ) - , pReferenceModifications( pReferenceModifications_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265ReferenceListsInfoEXT( VideoEncodeH265ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265ReferenceListsInfoEXT( VkVideoEncodeH265ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265ReferenceListsInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265ReferenceListsInfoEXT( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList0Entries_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList1Entries_ = {}, - const StdVideoEncodeH265ReferenceModifications * pReferenceModifications_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , referenceList0EntryCount( static_cast( referenceList0Entries_.size() ) ) - , pReferenceList0Entries( referenceList0Entries_.data() ) - , referenceList1EntryCount( static_cast( referenceList1Entries_.size() ) ) - , pReferenceList1Entries( referenceList1Entries_.data() ) - , pReferenceModifications( pReferenceModifications_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265ReferenceListsInfoEXT & operator=( VideoEncodeH265ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265ReferenceListsInfoEXT & operator=( VkVideoEncodeH265ReferenceListsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & setReferenceList0EntryCount( uint8_t referenceList0EntryCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceList0EntryCount = referenceList0EntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & - setPReferenceList0Entries( const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList0Entries_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceList0Entries = pReferenceList0Entries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265ReferenceListsInfoEXT & setReferenceList0Entries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList0Entries_ ) - VULKAN_HPP_NOEXCEPT - { - referenceList0EntryCount = static_cast( referenceList0Entries_.size() ); - pReferenceList0Entries = referenceList0Entries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & setReferenceList1EntryCount( uint8_t referenceList1EntryCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceList1EntryCount = referenceList1EntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & - setPReferenceList1Entries( const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList1Entries_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceList1Entries = pReferenceList1Entries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265ReferenceListsInfoEXT & setReferenceList1Entries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceList1Entries_ ) - VULKAN_HPP_NOEXCEPT - { - referenceList1EntryCount = static_cast( referenceList1Entries_.size() ); - pReferenceList1Entries = referenceList1Entries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ReferenceListsInfoEXT & - setPReferenceModifications( const StdVideoEncodeH265ReferenceModifications * pReferenceModifications_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceModifications = pReferenceModifications_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265ReferenceListsInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265ReferenceListsInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, referenceList0EntryCount, pReferenceList0Entries, referenceList1EntryCount, pReferenceList1Entries, pReferenceModifications ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265ReferenceListsInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265ReferenceListsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( referenceList0EntryCount == rhs.referenceList0EntryCount ) && - ( pReferenceList0Entries == rhs.pReferenceList0Entries ) && ( referenceList1EntryCount == rhs.referenceList1EntryCount ) && - ( pReferenceList1Entries == rhs.pReferenceList1Entries ) && ( pReferenceModifications == rhs.pReferenceModifications ); -# endif - } - - bool operator!=( VideoEncodeH265ReferenceListsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265ReferenceListsInfoEXT; - const void * pNext = {}; - uint8_t referenceList0EntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList0Entries = {}; - uint8_t referenceList1EntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoEXT * pReferenceList1Entries = {}; - const StdVideoEncodeH265ReferenceModifications * pReferenceModifications = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265ReferenceListsInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265NaluSliceSegmentInfoEXT - { - using NativeType = VkVideoEncodeH265NaluSliceSegmentInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265NaluSliceSegmentInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265NaluSliceSegmentInfoEXT( uint32_t ctbCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists_ = {}, - const StdVideoEncodeH265SliceSegmentHeader * pSliceSegmentHeaderStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , ctbCount( ctbCount_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , pSliceSegmentHeaderStd( pSliceSegmentHeaderStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265NaluSliceSegmentInfoEXT( VideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265NaluSliceSegmentInfoEXT( VkVideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265NaluSliceSegmentInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265NaluSliceSegmentInfoEXT & operator=( VideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265NaluSliceSegmentInfoEXT & operator=( VkVideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoEXT & setCtbCount( uint32_t ctbCount_ ) VULKAN_HPP_NOEXCEPT - { - ctbCount = ctbCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoEXT & - setPReferenceFinalLists( const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceFinalLists = pReferenceFinalLists_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoEXT & - setPSliceSegmentHeaderStd( const StdVideoEncodeH265SliceSegmentHeader * pSliceSegmentHeaderStd_ ) VULKAN_HPP_NOEXCEPT - { - pSliceSegmentHeaderStd = pSliceSegmentHeaderStd_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265NaluSliceSegmentInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265NaluSliceSegmentInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, ctbCount, pReferenceFinalLists, pSliceSegmentHeaderStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265NaluSliceSegmentInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ctbCount == rhs.ctbCount ) && ( pReferenceFinalLists == rhs.pReferenceFinalLists ) && - ( pSliceSegmentHeaderStd == rhs.pSliceSegmentHeaderStd ); -# endif - } - - bool operator!=( VideoEncodeH265NaluSliceSegmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265NaluSliceSegmentInfoEXT; - const void * pNext = {}; - uint32_t ctbCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists = {}; - const StdVideoEncodeH265SliceSegmentHeader * pSliceSegmentHeaderStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265NaluSliceSegmentInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265ProfileInfoEXT - { - using NativeType = VkVideoEncodeH265ProfileInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265ProfileInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265ProfileInfoEXT( StdVideoH265ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , stdProfileIdc( stdProfileIdc_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265ProfileInfoEXT( VideoEncodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265ProfileInfoEXT( VkVideoEncodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265ProfileInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265ProfileInfoEXT & operator=( VideoEncodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265ProfileInfoEXT & operator=( VkVideoEncodeH265ProfileInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ProfileInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ProfileInfoEXT & setStdProfileIdc( StdVideoH265ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT - { - stdProfileIdc = stdProfileIdc_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265ProfileInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265ProfileInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, stdProfileIdc ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( VideoEncodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( VideoEncodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ) == 0 ); - } - - bool operator!=( VideoEncodeH265ProfileInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265ProfileInfoEXT; - const void * pNext = {}; - StdVideoH265ProfileIdc stdProfileIdc = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265ProfileInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265QpEXT - { - using NativeType = VkVideoEncodeH265QpEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265QpEXT( int32_t qpI_ = {}, int32_t qpP_ = {}, int32_t qpB_ = {} ) VULKAN_HPP_NOEXCEPT - : qpI( qpI_ ) - , qpP( qpP_ ) - , qpB( qpB_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265QpEXT( VideoEncodeH265QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265QpEXT( VkVideoEncodeH265QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265QpEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265QpEXT & operator=( VideoEncodeH265QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265QpEXT & operator=( VkVideoEncodeH265QpEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpEXT & setQpI( int32_t qpI_ ) VULKAN_HPP_NOEXCEPT - { - qpI = qpI_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpEXT & setQpP( int32_t qpP_ ) VULKAN_HPP_NOEXCEPT - { - qpP = qpP_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpEXT & setQpB( int32_t qpB_ ) VULKAN_HPP_NOEXCEPT - { - qpB = qpB_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265QpEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265QpEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( qpI, qpP, qpB ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265QpEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265QpEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( qpI == rhs.qpI ) && ( qpP == rhs.qpP ) && ( qpB == rhs.qpB ); -# endif - } - - bool operator!=( VideoEncodeH265QpEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - int32_t qpI = {}; - int32_t qpP = {}; - int32_t qpB = {}; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265RateControlInfoEXT - { - using NativeType = VkVideoEncodeH265RateControlInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265RateControlInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlInfoEXT( uint32_t gopFrameCount_ = {}, - uint32_t idrPeriod_ = {}, - uint32_t consecutiveBFrameCount_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlStructureEXT rateControlStructure_ = - VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlStructureEXT::eUnknown, - uint8_t subLayerCount_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , gopFrameCount( gopFrameCount_ ) - , idrPeriod( idrPeriod_ ) - , consecutiveBFrameCount( consecutiveBFrameCount_ ) - , rateControlStructure( rateControlStructure_ ) - , subLayerCount( subLayerCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlInfoEXT( VideoEncodeH265RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265RateControlInfoEXT( VkVideoEncodeH265RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265RateControlInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265RateControlInfoEXT & operator=( VideoEncodeH265RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265RateControlInfoEXT & operator=( VkVideoEncodeH265RateControlInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & setGopFrameCount( uint32_t gopFrameCount_ ) VULKAN_HPP_NOEXCEPT - { - gopFrameCount = gopFrameCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & setIdrPeriod( uint32_t idrPeriod_ ) VULKAN_HPP_NOEXCEPT - { - idrPeriod = idrPeriod_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & setConsecutiveBFrameCount( uint32_t consecutiveBFrameCount_ ) VULKAN_HPP_NOEXCEPT - { - consecutiveBFrameCount = consecutiveBFrameCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & - setRateControlStructure( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlStructureEXT rateControlStructure_ ) VULKAN_HPP_NOEXCEPT - { - rateControlStructure = rateControlStructure_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoEXT & setSubLayerCount( uint8_t subLayerCount_ ) VULKAN_HPP_NOEXCEPT - { - subLayerCount = subLayerCount_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265RateControlInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265RateControlInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, gopFrameCount, idrPeriod, consecutiveBFrameCount, rateControlStructure, subLayerCount ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265RateControlInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265RateControlInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( gopFrameCount == rhs.gopFrameCount ) && ( idrPeriod == rhs.idrPeriod ) && - ( consecutiveBFrameCount == rhs.consecutiveBFrameCount ) && ( rateControlStructure == rhs.rateControlStructure ) && - ( subLayerCount == rhs.subLayerCount ); -# endif - } - - bool operator!=( VideoEncodeH265RateControlInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265RateControlInfoEXT; - const void * pNext = {}; - uint32_t gopFrameCount = {}; - uint32_t idrPeriod = {}; - uint32_t consecutiveBFrameCount = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlStructureEXT rateControlStructure = VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlStructureEXT::eUnknown; - uint8_t subLayerCount = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265RateControlInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265RateControlLayerInfoEXT - { - using NativeType = VkVideoEncodeH265RateControlLayerInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265RateControlLayerInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlLayerInfoEXT( uint8_t temporalId_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT initialRcQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT minQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT maxQp_ = {}, - VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeEXT maxFrameSize_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , temporalId( temporalId_ ) - , useInitialRcQp( useInitialRcQp_ ) - , initialRcQp( initialRcQp_ ) - , useMinQp( useMinQp_ ) - , minQp( minQp_ ) - , useMaxQp( useMaxQp_ ) - , maxQp( maxQp_ ) - , useMaxFrameSize( useMaxFrameSize_ ) - , maxFrameSize( maxFrameSize_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlLayerInfoEXT( VideoEncodeH265RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265RateControlLayerInfoEXT( VkVideoEncodeH265RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265RateControlLayerInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265RateControlLayerInfoEXT & operator=( VideoEncodeH265RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265RateControlLayerInfoEXT & operator=( VkVideoEncodeH265RateControlLayerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setTemporalId( uint8_t temporalId_ ) VULKAN_HPP_NOEXCEPT - { - temporalId = temporalId_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setUseInitialRcQp( VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp_ ) VULKAN_HPP_NOEXCEPT - { - useInitialRcQp = useInitialRcQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & - setInitialRcQp( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT const & initialRcQp_ ) VULKAN_HPP_NOEXCEPT - { - initialRcQp = initialRcQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setUseMinQp( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ ) VULKAN_HPP_NOEXCEPT - { - useMinQp = useMinQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setMinQp( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT const & minQp_ ) VULKAN_HPP_NOEXCEPT - { - minQp = minQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setUseMaxQp( VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ ) VULKAN_HPP_NOEXCEPT - { - useMaxQp = useMaxQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setMaxQp( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT const & maxQp_ ) VULKAN_HPP_NOEXCEPT - { - maxQp = maxQp_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & setUseMaxFrameSize( VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ ) VULKAN_HPP_NOEXCEPT - { - useMaxFrameSize = useMaxFrameSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoEXT & - setMaxFrameSize( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeEXT const & maxFrameSize_ ) VULKAN_HPP_NOEXCEPT - { - maxFrameSize = maxFrameSize_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265RateControlLayerInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265RateControlLayerInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, temporalId, useInitialRcQp, initialRcQp, useMinQp, minQp, useMaxQp, maxQp, useMaxFrameSize, maxFrameSize ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265RateControlLayerInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265RateControlLayerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( temporalId == rhs.temporalId ) && ( useInitialRcQp == rhs.useInitialRcQp ) && - ( initialRcQp == rhs.initialRcQp ) && ( useMinQp == rhs.useMinQp ) && ( minQp == rhs.minQp ) && ( useMaxQp == rhs.useMaxQp ) && - ( maxQp == rhs.maxQp ) && ( useMaxFrameSize == rhs.useMaxFrameSize ) && ( maxFrameSize == rhs.maxFrameSize ); -# endif - } - - bool operator!=( VideoEncodeH265RateControlLayerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265RateControlLayerInfoEXT; - const void * pNext = {}; - uint8_t temporalId = {}; - VULKAN_HPP_NAMESPACE::Bool32 useInitialRcQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT initialRcQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMinQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT minQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMaxQp = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265QpEXT maxQp = {}; - VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeEXT maxFrameSize = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265RateControlLayerInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265SessionParametersAddInfoEXT - { - using NativeType = VkVideoEncodeH265SessionParametersAddInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersAddInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersAddInfoEXT( uint32_t vpsStdCount_ = {}, - const StdVideoH265VideoParameterSet * pVpsStd_ = {}, - uint32_t spsStdCount_ = {}, - const StdVideoH265SequenceParameterSet * pSpsStd_ = {}, - uint32_t ppsStdCount_ = {}, - const StdVideoH265PictureParameterSet * pPpsStd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , vpsStdCount( vpsStdCount_ ) - , pVpsStd( pVpsStd_ ) - , spsStdCount( spsStdCount_ ) - , pSpsStd( pSpsStd_ ) - , ppsStdCount( ppsStdCount_ ) - , pPpsStd( pPpsStd_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersAddInfoEXT( VideoEncodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265SessionParametersAddInfoEXT( VkVideoEncodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265SessionParametersAddInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265SessionParametersAddInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vpsStd_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , vpsStdCount( static_cast( vpsStd_.size() ) ) - , pVpsStd( vpsStd_.data() ) - , spsStdCount( static_cast( spsStd_.size() ) ) - , pSpsStd( spsStd_.data() ) - , ppsStdCount( static_cast( ppsStd_.size() ) ) - , pPpsStd( ppsStd_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265SessionParametersAddInfoEXT & operator=( VideoEncodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265SessionParametersAddInfoEXT & operator=( VkVideoEncodeH265SessionParametersAddInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setVpsStdCount( uint32_t vpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - vpsStdCount = vpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setPVpsStd( const StdVideoH265VideoParameterSet * pVpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pVpsStd = pVpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265SessionParametersAddInfoEXT & - setVpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vpsStd_ ) VULKAN_HPP_NOEXCEPT - { - vpsStdCount = static_cast( vpsStd_.size() ); - pVpsStd = vpsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setSpsStdCount( uint32_t spsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = spsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setPSpsStd( const StdVideoH265SequenceParameterSet * pSpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pSpsStd = pSpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265SessionParametersAddInfoEXT & - setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & spsStd_ ) VULKAN_HPP_NOEXCEPT - { - spsStdCount = static_cast( spsStd_.size() ); - pSpsStd = spsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = ppsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoEXT & setPPpsStd( const StdVideoH265PictureParameterSet * pPpsStd_ ) VULKAN_HPP_NOEXCEPT - { - pPpsStd = pPpsStd_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265SessionParametersAddInfoEXT & - setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & ppsStd_ ) VULKAN_HPP_NOEXCEPT - { - ppsStdCount = static_cast( ppsStd_.size() ); - pPpsStd = ppsStd_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265SessionParametersAddInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, vpsStdCount, pVpsStd, spsStdCount, pSpsStd, ppsStdCount, pPpsStd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265SessionParametersAddInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vpsStdCount == rhs.vpsStdCount ) && ( pVpsStd == rhs.pVpsStd ) && - ( spsStdCount == rhs.spsStdCount ) && ( pSpsStd == rhs.pSpsStd ) && ( ppsStdCount == rhs.ppsStdCount ) && ( pPpsStd == rhs.pPpsStd ); -# endif - } - - bool operator!=( VideoEncodeH265SessionParametersAddInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersAddInfoEXT; - const void * pNext = {}; - uint32_t vpsStdCount = {}; - const StdVideoH265VideoParameterSet * pVpsStd = {}; - uint32_t spsStdCount = {}; - const StdVideoH265SequenceParameterSet * pSpsStd = {}; - uint32_t ppsStdCount = {}; - const StdVideoH265PictureParameterSet * pPpsStd = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265SessionParametersAddInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265SessionParametersCreateInfoEXT - { - using NativeType = VkVideoEncodeH265SessionParametersCreateInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersCreateInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VideoEncodeH265SessionParametersCreateInfoEXT( uint32_t maxVpsStdCount_ = {}, - uint32_t maxSpsStdCount_ = {}, - uint32_t maxPpsStdCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoEXT * pParametersAddInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , maxVpsStdCount( maxVpsStdCount_ ) - , maxSpsStdCount( maxSpsStdCount_ ) - , maxPpsStdCount( maxPpsStdCount_ ) - , pParametersAddInfo( pParametersAddInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR - VideoEncodeH265SessionParametersCreateInfoEXT( VideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265SessionParametersCreateInfoEXT( VkVideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265SessionParametersCreateInfoEXT( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265SessionParametersCreateInfoEXT & operator=( VideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265SessionParametersCreateInfoEXT & operator=( VkVideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoEXT & setMaxVpsStdCount( uint32_t maxVpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxVpsStdCount = maxVpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoEXT & setMaxSpsStdCount( uint32_t maxSpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxSpsStdCount = maxSpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoEXT & setMaxPpsStdCount( uint32_t maxPpsStdCount_ ) VULKAN_HPP_NOEXCEPT - { - maxPpsStdCount = maxPpsStdCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoEXT & - setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoEXT * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT - { - pParametersAddInfo = pParametersAddInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265SessionParametersCreateInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, maxVpsStdCount, maxSpsStdCount, maxPpsStdCount, pParametersAddInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265SessionParametersCreateInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVpsStdCount == rhs.maxVpsStdCount ) && ( maxSpsStdCount == rhs.maxSpsStdCount ) && - ( maxPpsStdCount == rhs.maxPpsStdCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); -# endif - } - - bool operator!=( VideoEncodeH265SessionParametersCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersCreateInfoEXT; - const void * pNext = {}; - uint32_t maxVpsStdCount = {}; - uint32_t maxSpsStdCount = {}; - uint32_t maxPpsStdCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoEXT * pParametersAddInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265SessionParametersCreateInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeH265VclFrameInfoEXT - { - using NativeType = VkVideoEncodeH265VclFrameInfoEXT; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265VclFrameInfoEXT; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeH265VclFrameInfoEXT( const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists_ = {}, - uint32_t naluSliceSegmentEntryCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoEXT * pNaluSliceSegmentEntries_ = {}, - const StdVideoEncodeH265PictureInfo * pCurrentPictureInfo_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , naluSliceSegmentEntryCount( naluSliceSegmentEntryCount_ ) - , pNaluSliceSegmentEntries( pNaluSliceSegmentEntries_ ) - , pCurrentPictureInfo( pCurrentPictureInfo_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeH265VclFrameInfoEXT( VideoEncodeH265VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265VclFrameInfoEXT( VkVideoEncodeH265VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeH265VclFrameInfoEXT( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265VclFrameInfoEXT( - const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceSegmentEntries_, - const StdVideoEncodeH265PictureInfo * pCurrentPictureInfo_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , pReferenceFinalLists( pReferenceFinalLists_ ) - , naluSliceSegmentEntryCount( static_cast( naluSliceSegmentEntries_.size() ) ) - , pNaluSliceSegmentEntries( naluSliceSegmentEntries_.data() ) - , pCurrentPictureInfo( pCurrentPictureInfo_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeH265VclFrameInfoEXT & operator=( VideoEncodeH265VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeH265VclFrameInfoEXT & operator=( VkVideoEncodeH265VclFrameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265VclFrameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265VclFrameInfoEXT & - setPReferenceFinalLists( const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceFinalLists = pReferenceFinalLists_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265VclFrameInfoEXT & setNaluSliceSegmentEntryCount( uint32_t naluSliceSegmentEntryCount_ ) VULKAN_HPP_NOEXCEPT - { - naluSliceSegmentEntryCount = naluSliceSegmentEntryCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265VclFrameInfoEXT & - setPNaluSliceSegmentEntries( const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoEXT * pNaluSliceSegmentEntries_ ) VULKAN_HPP_NOEXCEPT - { - pNaluSliceSegmentEntries = pNaluSliceSegmentEntries_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeH265VclFrameInfoEXT & setNaluSliceSegmentEntries( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceSegmentEntries_ ) - VULKAN_HPP_NOEXCEPT - { - naluSliceSegmentEntryCount = static_cast( naluSliceSegmentEntries_.size() ); - pNaluSliceSegmentEntries = naluSliceSegmentEntries_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265VclFrameInfoEXT & - setPCurrentPictureInfo( const StdVideoEncodeH265PictureInfo * pCurrentPictureInfo_ ) VULKAN_HPP_NOEXCEPT - { - pCurrentPictureInfo = pCurrentPictureInfo_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeH265VclFrameInfoEXT const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeH265VclFrameInfoEXT &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, pReferenceFinalLists, naluSliceSegmentEntryCount, pNaluSliceSegmentEntries, pCurrentPictureInfo ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeH265VclFrameInfoEXT const & ) const = default; -# else - bool operator==( VideoEncodeH265VclFrameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pReferenceFinalLists == rhs.pReferenceFinalLists ) && - ( naluSliceSegmentEntryCount == rhs.naluSliceSegmentEntryCount ) && ( pNaluSliceSegmentEntries == rhs.pNaluSliceSegmentEntries ) && - ( pCurrentPictureInfo == rhs.pCurrentPictureInfo ); -# endif - } - - bool operator!=( VideoEncodeH265VclFrameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265VclFrameInfoEXT; - const void * pNext = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265ReferenceListsInfoEXT * pReferenceFinalLists = {}; - uint32_t naluSliceSegmentEntryCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoEXT * pNaluSliceSegmentEntries = {}; - const StdVideoEncodeH265PictureInfo * pCurrentPictureInfo = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeH265VclFrameInfoEXT; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeInfoKHR - { - using NativeType = VkVideoEncodeInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_ = {}, - uint32_t qualityLevel_ = {}, - VULKAN_HPP_NAMESPACE::Buffer dstBitstreamBuffer_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferOffset_ = {}, - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferMaxRange_ = {}, - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource_ = {}, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ = {}, - uint32_t referenceSlotCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, - uint32_t precedingExternallyEncodedBytes_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , qualityLevel( qualityLevel_ ) - , dstBitstreamBuffer( dstBitstreamBuffer_ ) - , dstBitstreamBufferOffset( dstBitstreamBufferOffset_ ) - , dstBitstreamBufferMaxRange( dstBitstreamBufferMaxRange_ ) - , srcPictureResource( srcPictureResource_ ) - , pSetupReferenceSlot( pSetupReferenceSlot_ ) - , referenceSlotCount( referenceSlotCount_ ) - , pReferenceSlots( pReferenceSlots_ ) - , precedingExternallyEncodedBytes( precedingExternallyEncodedBytes_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeInfoKHR( VideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeInfoKHR( VkVideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeInfoKHR( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_, - uint32_t qualityLevel_, - VULKAN_HPP_NAMESPACE::Buffer dstBitstreamBuffer_, - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferOffset_, - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferMaxRange_, - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource_, - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, - uint32_t precedingExternallyEncodedBytes_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , qualityLevel( qualityLevel_ ) - , dstBitstreamBuffer( dstBitstreamBuffer_ ) - , dstBitstreamBufferOffset( dstBitstreamBufferOffset_ ) - , dstBitstreamBufferMaxRange( dstBitstreamBufferMaxRange_ ) - , srcPictureResource( srcPictureResource_ ) - , pSetupReferenceSlot( pSetupReferenceSlot_ ) - , referenceSlotCount( static_cast( referenceSlots_.size() ) ) - , pReferenceSlots( referenceSlots_.data() ) - , precedingExternallyEncodedBytes( precedingExternallyEncodedBytes_ ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeInfoKHR & operator=( VideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeInfoKHR & operator=( VkVideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setQualityLevel( uint32_t qualityLevel_ ) VULKAN_HPP_NOEXCEPT - { - qualityLevel = qualityLevel_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setDstBitstreamBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBitstreamBuffer_ ) VULKAN_HPP_NOEXCEPT - { - dstBitstreamBuffer = dstBitstreamBuffer_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setDstBitstreamBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferOffset_ ) VULKAN_HPP_NOEXCEPT - { - dstBitstreamBufferOffset = dstBitstreamBufferOffset_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & - setDstBitstreamBufferMaxRange( VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferMaxRange_ ) VULKAN_HPP_NOEXCEPT - { - dstBitstreamBufferMaxRange = dstBitstreamBufferMaxRange_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & - setSrcPictureResource( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & srcPictureResource_ ) VULKAN_HPP_NOEXCEPT - { - srcPictureResource = srcPictureResource_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & - setPSetupReferenceSlot( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ ) VULKAN_HPP_NOEXCEPT - { - pSetupReferenceSlot = pSetupReferenceSlot_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = referenceSlotCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & - setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - pReferenceSlots = pReferenceSlots_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeInfoKHR & setReferenceSlots( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT - { - referenceSlotCount = static_cast( referenceSlots_.size() ); - pReferenceSlots = referenceSlots_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPrecedingExternallyEncodedBytes( uint32_t precedingExternallyEncodedBytes_ ) VULKAN_HPP_NOEXCEPT - { - precedingExternallyEncodedBytes = precedingExternallyEncodedBytes_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - flags, - qualityLevel, - dstBitstreamBuffer, - dstBitstreamBufferOffset, - dstBitstreamBufferMaxRange, - srcPictureResource, - pSetupReferenceSlot, - referenceSlotCount, - pReferenceSlots, - precedingExternallyEncodedBytes ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeInfoKHR const & ) const = default; -# else - bool operator==( VideoEncodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( qualityLevel == rhs.qualityLevel ) && - ( dstBitstreamBuffer == rhs.dstBitstreamBuffer ) && ( dstBitstreamBufferOffset == rhs.dstBitstreamBufferOffset ) && - ( dstBitstreamBufferMaxRange == rhs.dstBitstreamBufferMaxRange ) && ( srcPictureResource == rhs.srcPictureResource ) && - ( pSetupReferenceSlot == rhs.pSetupReferenceSlot ) && ( referenceSlotCount == rhs.referenceSlotCount ) && - ( pReferenceSlots == rhs.pReferenceSlots ) && ( precedingExternallyEncodedBytes == rhs.precedingExternallyEncodedBytes ); -# endif - } - - bool operator!=( VideoEncodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags = {}; - uint32_t qualityLevel = {}; - VULKAN_HPP_NAMESPACE::Buffer dstBitstreamBuffer = {}; - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferOffset = {}; - VULKAN_HPP_NAMESPACE::DeviceSize dstBitstreamBufferMaxRange = {}; - VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource = {}; - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot = {}; - uint32_t referenceSlotCount = {}; - const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; - uint32_t precedingExternallyEncodedBytes = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeRateControlLayerInfoKHR - { - using NativeType = VkVideoEncodeRateControlLayerInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeRateControlLayerInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeRateControlLayerInfoKHR( uint32_t averageBitrate_ = {}, - uint32_t maxBitrate_ = {}, - uint32_t frameRateNumerator_ = {}, - uint32_t frameRateDenominator_ = {}, - uint32_t virtualBufferSizeInMs_ = {}, - uint32_t initialVirtualBufferSizeInMs_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , averageBitrate( averageBitrate_ ) - , maxBitrate( maxBitrate_ ) - , frameRateNumerator( frameRateNumerator_ ) - , frameRateDenominator( frameRateDenominator_ ) - , virtualBufferSizeInMs( virtualBufferSizeInMs_ ) - , initialVirtualBufferSizeInMs( initialVirtualBufferSizeInMs_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeRateControlLayerInfoKHR( VideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeRateControlLayerInfoKHR( VkVideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeRateControlLayerInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeRateControlLayerInfoKHR & operator=( VideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeRateControlLayerInfoKHR & operator=( VkVideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setAverageBitrate( uint32_t averageBitrate_ ) VULKAN_HPP_NOEXCEPT - { - averageBitrate = averageBitrate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setMaxBitrate( uint32_t maxBitrate_ ) VULKAN_HPP_NOEXCEPT - { - maxBitrate = maxBitrate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setFrameRateNumerator( uint32_t frameRateNumerator_ ) VULKAN_HPP_NOEXCEPT - { - frameRateNumerator = frameRateNumerator_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setFrameRateDenominator( uint32_t frameRateDenominator_ ) VULKAN_HPP_NOEXCEPT - { - frameRateDenominator = frameRateDenominator_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setVirtualBufferSizeInMs( uint32_t virtualBufferSizeInMs_ ) VULKAN_HPP_NOEXCEPT - { - virtualBufferSizeInMs = virtualBufferSizeInMs_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setInitialVirtualBufferSizeInMs( uint32_t initialVirtualBufferSizeInMs_ ) VULKAN_HPP_NOEXCEPT - { - initialVirtualBufferSizeInMs = initialVirtualBufferSizeInMs_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeRateControlLayerInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeRateControlLayerInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( - sType, pNext, averageBitrate, maxBitrate, frameRateNumerator, frameRateDenominator, virtualBufferSizeInMs, initialVirtualBufferSizeInMs ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeRateControlLayerInfoKHR const & ) const = default; -# else - bool operator==( VideoEncodeRateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( averageBitrate == rhs.averageBitrate ) && ( maxBitrate == rhs.maxBitrate ) && - ( frameRateNumerator == rhs.frameRateNumerator ) && ( frameRateDenominator == rhs.frameRateDenominator ) && - ( virtualBufferSizeInMs == rhs.virtualBufferSizeInMs ) && ( initialVirtualBufferSizeInMs == rhs.initialVirtualBufferSizeInMs ); -# endif - } - - bool operator!=( VideoEncodeRateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeRateControlLayerInfoKHR; - const void * pNext = {}; - uint32_t averageBitrate = {}; - uint32_t maxBitrate = {}; - uint32_t frameRateNumerator = {}; - uint32_t frameRateDenominator = {}; - uint32_t virtualBufferSizeInMs = {}; - uint32_t initialVirtualBufferSizeInMs = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeRateControlLayerInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeRateControlInfoKHR - { - using NativeType = VkVideoEncodeRateControlInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeRateControlInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEncodeRateControlInfoKHR( - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eNone, - uint8_t layerCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayerConfigs_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , rateControlMode( rateControlMode_ ) - , layerCount( layerCount_ ) - , pLayerConfigs( pLayerConfigs_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeRateControlInfoKHR( VideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeRateControlInfoKHR( VkVideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeRateControlInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeRateControlInfoKHR( - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_, - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layerConfigs_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , flags( flags_ ) - , rateControlMode( rateControlMode_ ) - , layerCount( static_cast( layerConfigs_.size() ) ) - , pLayerConfigs( layerConfigs_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeRateControlInfoKHR & operator=( VideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeRateControlInfoKHR & operator=( VkVideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & - setRateControlMode( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_ ) VULKAN_HPP_NOEXCEPT - { - rateControlMode = rateControlMode_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setLayerCount( uint8_t layerCount_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = layerCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & - setPLayerConfigs( const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayerConfigs_ ) VULKAN_HPP_NOEXCEPT - { - pLayerConfigs = pLayerConfigs_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoEncodeRateControlInfoKHR & setLayerConfigs( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layerConfigs_ ) VULKAN_HPP_NOEXCEPT - { - layerCount = static_cast( layerConfigs_.size() ); - pLayerConfigs = layerConfigs_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeRateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeRateControlInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, rateControlMode, layerCount, pLayerConfigs ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeRateControlInfoKHR const & ) const = default; -# else - bool operator==( VideoEncodeRateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rateControlMode == rhs.rateControlMode ) && - ( layerCount == rhs.layerCount ) && ( pLayerConfigs == rhs.pLayerConfigs ); -# endif - } - - bool operator!=( VideoEncodeRateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeRateControlInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eNone; - uint8_t layerCount = {}; - const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayerConfigs = {}; - }; - - template <> - struct CppType - { - using Type = VideoEncodeRateControlInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEncodeUsageInfoKHR - { - using NativeType = VkVideoEncodeUsageInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeUsageInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - VideoEncodeUsageInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints_ = {}, - VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR::eDefault, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , videoUsageHints( videoUsageHints_ ) - , videoContentHints( videoContentHints_ ) - , tuningMode( tuningMode_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEncodeUsageInfoKHR( VideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeUsageInfoKHR( VkVideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEncodeUsageInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEncodeUsageInfoKHR & operator=( VideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEncodeUsageInfoKHR & operator=( VkVideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setVideoUsageHints( VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints_ ) VULKAN_HPP_NOEXCEPT - { - videoUsageHints = videoUsageHints_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & - setVideoContentHints( VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints_ ) VULKAN_HPP_NOEXCEPT - { - videoContentHints = videoContentHints_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setTuningMode( VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode_ ) VULKAN_HPP_NOEXCEPT - { - tuningMode = tuningMode_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEncodeUsageInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEncodeUsageInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, videoUsageHints, videoContentHints, tuningMode ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEncodeUsageInfoKHR const & ) const = default; -# else - bool operator==( VideoEncodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoUsageHints == rhs.videoUsageHints ) && ( videoContentHints == rhs.videoContentHints ) && - ( tuningMode == rhs.tuningMode ); -# endif - } - - bool operator!=( VideoEncodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeUsageInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints = {}; - VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode = VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR::eDefault; - }; - - template <> - struct CppType - { - using Type = VideoEncodeUsageInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoEndCodingInfoKHR - { - using NativeType = VkVideoEndCodingInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEndCodingInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoEndCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoEndCodingInfoKHR( VideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEndCodingInfoKHR( VkVideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoEndCodingInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoEndCodingInfoKHR & operator=( VideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoEndCodingInfoKHR & operator=( VkVideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoEndCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoEndCodingInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoEndCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoEndCodingInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoEndCodingInfoKHR const & ) const = default; -# else - bool operator==( VideoEndCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); -# endif - } - - bool operator!=( VideoEndCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEndCodingInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags = {}; - }; - - template <> - struct CppType - { - using Type = VideoEndCodingInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoFormatPropertiesKHR - { - using NativeType = VkVideoFormatPropertiesKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoFormatPropertiesKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoFormatPropertiesKHR( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::ComponentMapping componentMapping_ = {}, - VULKAN_HPP_NAMESPACE::ImageCreateFlags imageCreateFlags_ = {}, - VULKAN_HPP_NAMESPACE::ImageType imageType_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, - VULKAN_HPP_NAMESPACE::ImageTiling imageTiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsageFlags_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , format( format_ ) - , componentMapping( componentMapping_ ) - , imageCreateFlags( imageCreateFlags_ ) - , imageType( imageType_ ) - , imageTiling( imageTiling_ ) - , imageUsageFlags( imageUsageFlags_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoFormatPropertiesKHR( VideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoFormatPropertiesKHR( VkVideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoFormatPropertiesKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoFormatPropertiesKHR & operator=( VideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoFormatPropertiesKHR & operator=( VkVideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoFormatPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoFormatPropertiesKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, format, componentMapping, imageCreateFlags, imageType, imageTiling, imageUsageFlags ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoFormatPropertiesKHR const & ) const = default; -# else - bool operator==( VideoFormatPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( componentMapping == rhs.componentMapping ) && - ( imageCreateFlags == rhs.imageCreateFlags ) && ( imageType == rhs.imageType ) && ( imageTiling == rhs.imageTiling ) && - ( imageUsageFlags == rhs.imageUsageFlags ); -# endif - } - - bool operator!=( VideoFormatPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoFormatPropertiesKHR; - void * pNext = {}; - VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::ComponentMapping componentMapping = {}; - VULKAN_HPP_NAMESPACE::ImageCreateFlags imageCreateFlags = {}; - VULKAN_HPP_NAMESPACE::ImageType imageType = VULKAN_HPP_NAMESPACE::ImageType::e1D; - VULKAN_HPP_NAMESPACE::ImageTiling imageTiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; - VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsageFlags = {}; - }; - - template <> - struct CppType - { - using Type = VideoFormatPropertiesKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoProfileInfoKHR - { - using NativeType = VkVideoProfileInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoProfileInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoProfileInfoKHR( - VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation_ = VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR::eNone, - VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling_ = {}, - VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth_ = {}, - VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , videoCodecOperation( videoCodecOperation_ ) - , chromaSubsampling( chromaSubsampling_ ) - , lumaBitDepth( lumaBitDepth_ ) - , chromaBitDepth( chromaBitDepth_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoProfileInfoKHR( VideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoProfileInfoKHR( VkVideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoProfileInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoProfileInfoKHR & operator=( VideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoProfileInfoKHR & operator=( VkVideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & - setVideoCodecOperation( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation_ ) VULKAN_HPP_NOEXCEPT - { - videoCodecOperation = videoCodecOperation_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & - setChromaSubsampling( VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling_ ) VULKAN_HPP_NOEXCEPT - { - chromaSubsampling = chromaSubsampling_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setLumaBitDepth( VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth_ ) VULKAN_HPP_NOEXCEPT - { - lumaBitDepth = lumaBitDepth_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setChromaBitDepth( VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth_ ) VULKAN_HPP_NOEXCEPT - { - chromaBitDepth = chromaBitDepth_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoProfileInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, videoCodecOperation, chromaSubsampling, lumaBitDepth, chromaBitDepth ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoProfileInfoKHR const & ) const = default; -# else - bool operator==( VideoProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoCodecOperation == rhs.videoCodecOperation ) && - ( chromaSubsampling == rhs.chromaSubsampling ) && ( lumaBitDepth == rhs.lumaBitDepth ) && ( chromaBitDepth == rhs.chromaBitDepth ); -# endif - } - - bool operator!=( VideoProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoProfileInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation = VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR::eNone; - VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling = {}; - VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth = {}; - VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth = {}; - }; - - template <> - struct CppType - { - using Type = VideoProfileInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoProfileListInfoKHR - { - using NativeType = VkVideoProfileListInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoProfileListInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoProfileListInfoKHR( uint32_t profileCount_ = {}, - const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , profileCount( profileCount_ ) - , pProfiles( pProfiles_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoProfileListInfoKHR( VideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoProfileListInfoKHR( VkVideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoProfileListInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoProfileListInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & profiles_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ), profileCount( static_cast( profiles_.size() ) ), pProfiles( profiles_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoProfileListInfoKHR & operator=( VideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoProfileListInfoKHR & operator=( VkVideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setProfileCount( uint32_t profileCount_ ) VULKAN_HPP_NOEXCEPT - { - profileCount = profileCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setPProfiles( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles_ ) VULKAN_HPP_NOEXCEPT - { - pProfiles = pProfiles_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - VideoProfileListInfoKHR & - setProfiles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & profiles_ ) VULKAN_HPP_NOEXCEPT - { - profileCount = static_cast( profiles_.size() ); - pProfiles = profiles_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoProfileListInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoProfileListInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, profileCount, pProfiles ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoProfileListInfoKHR const & ) const = default; -# else - bool operator==( VideoProfileListInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( profileCount == rhs.profileCount ) && ( pProfiles == rhs.pProfiles ); -# endif - } - - bool operator!=( VideoProfileListInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoProfileListInfoKHR; - const void * pNext = {}; - uint32_t profileCount = {}; - const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles = {}; - }; - - template <> - struct CppType - { - using Type = VideoProfileListInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoSessionCreateInfoKHR - { - using NativeType = VkVideoSessionCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR( uint32_t queueFamilyIndex_ = {}, - VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags_ = {}, - const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ = {}, - VULKAN_HPP_NAMESPACE::Format pictureFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent_ = {}, - VULKAN_HPP_NAMESPACE::Format referencePicturesFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, - uint32_t maxReferencePicturesSlotsCount_ = {}, - uint32_t maxReferencePicturesActiveCount_ = {}, - const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , queueFamilyIndex( queueFamilyIndex_ ) - , flags( flags_ ) - , pVideoProfile( pVideoProfile_ ) - , pictureFormat( pictureFormat_ ) - , maxCodedExtent( maxCodedExtent_ ) - , referencePicturesFormat( referencePicturesFormat_ ) - , maxReferencePicturesSlotsCount( maxReferencePicturesSlotsCount_ ) - , maxReferencePicturesActiveCount( maxReferencePicturesActiveCount_ ) - , pStdHeaderVersion( pStdHeaderVersion_ ) - { - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR( VideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionCreateInfoKHR( VkVideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoSessionCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoSessionCreateInfoKHR & operator=( VideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionCreateInfoKHR & operator=( VkVideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT - { - queueFamilyIndex = queueFamilyIndex_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPVideoProfile( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ ) VULKAN_HPP_NOEXCEPT - { - pVideoProfile = pVideoProfile_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPictureFormat( VULKAN_HPP_NAMESPACE::Format pictureFormat_ ) VULKAN_HPP_NOEXCEPT - { - pictureFormat = pictureFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxCodedExtent( VULKAN_HPP_NAMESPACE::Extent2D const & maxCodedExtent_ ) VULKAN_HPP_NOEXCEPT - { - maxCodedExtent = maxCodedExtent_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setReferencePicturesFormat( VULKAN_HPP_NAMESPACE::Format referencePicturesFormat_ ) VULKAN_HPP_NOEXCEPT - { - referencePicturesFormat = referencePicturesFormat_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxReferencePicturesSlotsCount( uint32_t maxReferencePicturesSlotsCount_ ) VULKAN_HPP_NOEXCEPT - { - maxReferencePicturesSlotsCount = maxReferencePicturesSlotsCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxReferencePicturesActiveCount( uint32_t maxReferencePicturesActiveCount_ ) VULKAN_HPP_NOEXCEPT - { - maxReferencePicturesActiveCount = maxReferencePicturesActiveCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & - setPStdHeaderVersion( const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion_ ) VULKAN_HPP_NOEXCEPT - { - pStdHeaderVersion = pStdHeaderVersion_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoSessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoSessionCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, - pNext, - queueFamilyIndex, - flags, - pVideoProfile, - pictureFormat, - maxCodedExtent, - referencePicturesFormat, - maxReferencePicturesSlotsCount, - maxReferencePicturesActiveCount, - pStdHeaderVersion ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionCreateInfoKHR const & ) const = default; -# else - bool operator==( VideoSessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && ( flags == rhs.flags ) && - ( pVideoProfile == rhs.pVideoProfile ) && ( pictureFormat == rhs.pictureFormat ) && ( maxCodedExtent == rhs.maxCodedExtent ) && - ( referencePicturesFormat == rhs.referencePicturesFormat ) && ( maxReferencePicturesSlotsCount == rhs.maxReferencePicturesSlotsCount ) && - ( maxReferencePicturesActiveCount == rhs.maxReferencePicturesActiveCount ) && ( pStdHeaderVersion == rhs.pStdHeaderVersion ); -# endif - } - - bool operator!=( VideoSessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionCreateInfoKHR; - const void * pNext = {}; - uint32_t queueFamilyIndex = {}; - VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags = {}; - const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile = {}; - VULKAN_HPP_NAMESPACE::Format pictureFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent = {}; - VULKAN_HPP_NAMESPACE::Format referencePicturesFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; - uint32_t maxReferencePicturesSlotsCount = {}; - uint32_t maxReferencePicturesActiveCount = {}; - const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion = {}; - }; - - template <> - struct CppType - { - using Type = VideoSessionCreateInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoSessionMemoryRequirementsKHR - { - using NativeType = VkVideoSessionMemoryRequirementsKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionMemoryRequirementsKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoSessionMemoryRequirementsKHR( uint32_t memoryBindIndex_ = {}, - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements_ = {}, - void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , memoryBindIndex( memoryBindIndex_ ) - , memoryRequirements( memoryRequirements_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoSessionMemoryRequirementsKHR( VideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionMemoryRequirementsKHR( VkVideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoSessionMemoryRequirementsKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoSessionMemoryRequirementsKHR & operator=( VideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionMemoryRequirementsKHR & operator=( VkVideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - - operator VkVideoSessionMemoryRequirementsKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoSessionMemoryRequirementsKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, memoryBindIndex, memoryRequirements ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionMemoryRequirementsKHR const & ) const = default; -# else - bool operator==( VideoSessionMemoryRequirementsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryBindIndex == rhs.memoryBindIndex ) && ( memoryRequirements == rhs.memoryRequirements ); -# endif - } - - bool operator!=( VideoSessionMemoryRequirementsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionMemoryRequirementsKHR; - void * pNext = {}; - uint32_t memoryBindIndex = {}; - VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements = {}; - }; - - template <> - struct CppType - { - using Type = VideoSessionMemoryRequirementsKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoSessionParametersCreateInfoKHR - { - using NativeType = VkVideoSessionParametersCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionParametersCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoSessionParametersCreateInfoKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags_ = {}, - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate_ = {}, - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , videoSessionParametersTemplate( videoSessionParametersTemplate_ ) - , videoSession( videoSession_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoSessionParametersCreateInfoKHR( VideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionParametersCreateInfoKHR( VkVideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoSessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoSessionParametersCreateInfoKHR & operator=( VideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionParametersCreateInfoKHR & operator=( VkVideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & - setFlags( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & - setVideoSessionParametersTemplate( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate_ ) VULKAN_HPP_NOEXCEPT - { - videoSessionParametersTemplate = videoSessionParametersTemplate_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setVideoSession( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ ) VULKAN_HPP_NOEXCEPT - { - videoSession = videoSession_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoSessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoSessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, videoSessionParametersTemplate, videoSession ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionParametersCreateInfoKHR const & ) const = default; -# else - bool operator==( VideoSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && - ( videoSessionParametersTemplate == rhs.videoSessionParametersTemplate ) && ( videoSession == rhs.videoSession ); -# endif - } - - bool operator!=( VideoSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionParametersCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags = {}; - VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate = {}; - VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession = {}; - }; - - template <> - struct CppType - { - using Type = VideoSessionParametersCreateInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - struct VideoSessionParametersUpdateInfoKHR - { - using NativeType = VkVideoSessionParametersUpdateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionParametersUpdateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR VideoSessionParametersUpdateInfoKHR( uint32_t updateSequenceCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , updateSequenceCount( updateSequenceCount_ ) - { - } - - VULKAN_HPP_CONSTEXPR VideoSessionParametersUpdateInfoKHR( VideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionParametersUpdateInfoKHR( VkVideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : VideoSessionParametersUpdateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - VideoSessionParametersUpdateInfoKHR & operator=( VideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - VideoSessionParametersUpdateInfoKHR & operator=( VkVideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersUpdateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersUpdateInfoKHR & setUpdateSequenceCount( uint32_t updateSequenceCount_ ) VULKAN_HPP_NOEXCEPT - { - updateSequenceCount = updateSequenceCount_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkVideoSessionParametersUpdateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkVideoSessionParametersUpdateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, updateSequenceCount ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( VideoSessionParametersUpdateInfoKHR const & ) const = default; -# else - bool operator==( VideoSessionParametersUpdateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( updateSequenceCount == rhs.updateSequenceCount ); -# endif - } - - bool operator!=( VideoSessionParametersUpdateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionParametersUpdateInfoKHR; - const void * pNext = {}; - uint32_t updateSequenceCount = {}; - }; - - template <> - struct CppType - { - using Type = VideoSessionParametersUpdateInfoKHR; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - struct WaylandSurfaceCreateInfoKHR - { - using NativeType = VkWaylandSurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWaylandSurfaceCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ = {}, - struct wl_display * display_ = {}, - struct wl_surface * surface_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , display( display_ ) - , surface( surface_ ) - { - } - - VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( WaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WaylandSurfaceCreateInfoKHR( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : WaylandSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - WaylandSurfaceCreateInfoKHR & operator=( WaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WaylandSurfaceCreateInfoKHR & operator=( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setDisplay( struct wl_display * display_ ) VULKAN_HPP_NOEXCEPT - { - display = display_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setSurface( struct wl_surface * surface_ ) VULKAN_HPP_NOEXCEPT - { - surface = surface_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWaylandSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWaylandSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, display, surface ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( WaylandSurfaceCreateInfoKHR const & ) const = default; -# else - bool operator==( WaylandSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( display == rhs.display ) && ( surface == rhs.surface ); -# endif - } - - bool operator!=( WaylandSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags = {}; - struct wl_display * display = {}; - struct wl_surface * surface = {}; - }; - - template <> - struct CppType - { - using Type = WaylandSurfaceCreateInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct Win32KeyedMutexAcquireReleaseInfoKHR - { - using NativeType = VkWin32KeyedMutexAcquireReleaseInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = {}, - const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ = {}, - const uint64_t * pAcquireKeys_ = {}, - const uint32_t * pAcquireTimeouts_ = {}, - uint32_t releaseCount_ = {}, - const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ = {}, - const uint64_t * pReleaseKeys_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , acquireCount( acquireCount_ ) - , pAcquireSyncs( pAcquireSyncs_ ) - , pAcquireKeys( pAcquireKeys_ ) - , pAcquireTimeouts( pAcquireTimeouts_ ) - , releaseCount( releaseCount_ ) - , pReleaseSyncs( pReleaseSyncs_ ) - , pReleaseKeys( pReleaseKeys_ ) - { - } - - VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32KeyedMutexAcquireReleaseInfoKHR( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : Win32KeyedMutexAcquireReleaseInfoKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeouts_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , acquireCount( static_cast( acquireSyncs_.size() ) ) - , pAcquireSyncs( acquireSyncs_.data() ) - , pAcquireKeys( acquireKeys_.data() ) - , pAcquireTimeouts( acquireTimeouts_.data() ) - , releaseCount( static_cast( releaseSyncs_.size() ) ) - , pReleaseSyncs( releaseSyncs_.data() ) - , pReleaseKeys( releaseKeys_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); - VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeouts_.size() ); - VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeouts_.size() ); -# else - if ( acquireSyncs_.size() != acquireKeys_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireKeys_.size()" ); - } - if ( acquireSyncs_.size() != acquireTimeouts_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireTimeouts_.size()" ); - } - if ( acquireKeys_.size() != acquireTimeouts_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireKeys_.size() != acquireTimeouts_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); -# else - if ( releaseSyncs_.size() != releaseKeys_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: releaseSyncs_.size() != releaseKeys_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Win32KeyedMutexAcquireReleaseInfoKHR & operator=( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32KeyedMutexAcquireReleaseInfoKHR & operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireCount( uint32_t acquireCount_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = acquireCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & - setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireSyncs = pAcquireSyncs_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR & - setAcquireSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireSyncs_.size() ); - pAcquireSyncs = acquireSyncs_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireKeys = pAcquireKeys_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR & - setAcquireKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireKeys_.size() ); - pAcquireKeys = acquireKeys_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireTimeouts( const uint32_t * pAcquireTimeouts_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireTimeouts = pAcquireTimeouts_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR & - setAcquireTimeouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeouts_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireTimeouts_.size() ); - pAcquireTimeouts = acquireTimeouts_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = releaseCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & - setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT - { - pReleaseSyncs = pReleaseSyncs_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR & - setReleaseSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = static_cast( releaseSyncs_.size() ); - pReleaseSyncs = releaseSyncs_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT - { - pReleaseKeys = pReleaseKeys_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoKHR & - setReleaseKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = static_cast( releaseKeys_.size() ); - pReleaseKeys = releaseKeys_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWin32KeyedMutexAcquireReleaseInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWin32KeyedMutexAcquireReleaseInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, acquireCount, pAcquireSyncs, pAcquireKeys, pAcquireTimeouts, releaseCount, pReleaseSyncs, pReleaseKeys ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Win32KeyedMutexAcquireReleaseInfoKHR const & ) const = default; -# else - bool operator==( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( acquireCount == rhs.acquireCount ) && ( pAcquireSyncs == rhs.pAcquireSyncs ) && - ( pAcquireKeys == rhs.pAcquireKeys ) && ( pAcquireTimeouts == rhs.pAcquireTimeouts ) && ( releaseCount == rhs.releaseCount ) && - ( pReleaseSyncs == rhs.pReleaseSyncs ) && ( pReleaseKeys == rhs.pReleaseKeys ); -# endif - } - - bool operator!=( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR; - const void * pNext = {}; - uint32_t acquireCount = {}; - const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs = {}; - const uint64_t * pAcquireKeys = {}; - const uint32_t * pAcquireTimeouts = {}; - uint32_t releaseCount = {}; - const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs = {}; - const uint64_t * pReleaseKeys = {}; - }; - - template <> - struct CppType - { - using Type = Win32KeyedMutexAcquireReleaseInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct Win32KeyedMutexAcquireReleaseInfoNV - { - using NativeType = VkWin32KeyedMutexAcquireReleaseInfoNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = {}, - const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ = {}, - const uint64_t * pAcquireKeys_ = {}, - const uint32_t * pAcquireTimeoutMilliseconds_ = {}, - uint32_t releaseCount_ = {}, - const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ = {}, - const uint64_t * pReleaseKeys_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , acquireCount( acquireCount_ ) - , pAcquireSyncs( pAcquireSyncs_ ) - , pAcquireKeys( pAcquireKeys_ ) - , pAcquireTimeoutMilliseconds( pAcquireTimeoutMilliseconds_ ) - , releaseCount( releaseCount_ ) - , pReleaseSyncs( pReleaseSyncs_ ) - , pReleaseKeys( pReleaseKeys_ ) - { - } - - VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32KeyedMutexAcquireReleaseInfoNV( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - : Win32KeyedMutexAcquireReleaseInfoNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeoutMilliseconds_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , acquireCount( static_cast( acquireSyncs_.size() ) ) - , pAcquireSyncs( acquireSyncs_.data() ) - , pAcquireKeys( acquireKeys_.data() ) - , pAcquireTimeoutMilliseconds( acquireTimeoutMilliseconds_.data() ) - , releaseCount( static_cast( releaseSyncs_.size() ) ) - , pReleaseSyncs( releaseSyncs_.data() ) - , pReleaseKeys( releaseKeys_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); - VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeoutMilliseconds_.size() ); - VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeoutMilliseconds_.size() ); -# else - if ( acquireSyncs_.size() != acquireKeys_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireKeys_.size()" ); - } - if ( acquireSyncs_.size() != acquireTimeoutMilliseconds_.size() ) - { - throw LogicError( - VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireTimeoutMilliseconds_.size()" ); - } - if ( acquireKeys_.size() != acquireTimeoutMilliseconds_.size() ) - { - throw LogicError( - VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireKeys_.size() != acquireTimeoutMilliseconds_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); -# else - if ( releaseSyncs_.size() != releaseKeys_.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: releaseSyncs_.size() != releaseKeys_.size()" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Win32KeyedMutexAcquireReleaseInfoNV & operator=( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32KeyedMutexAcquireReleaseInfoNV & operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setAcquireCount( uint32_t acquireCount_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = acquireCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & - setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireSyncs = pAcquireSyncs_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV & - setAcquireSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireSyncs_.size() ); - pAcquireSyncs = acquireSyncs_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireKeys = pAcquireKeys_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV & - setAcquireKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireKeys_.size() ); - pAcquireKeys = acquireKeys_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & - setPAcquireTimeoutMilliseconds( const uint32_t * pAcquireTimeoutMilliseconds_ ) VULKAN_HPP_NOEXCEPT - { - pAcquireTimeoutMilliseconds = pAcquireTimeoutMilliseconds_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV & - setAcquireTimeoutMilliseconds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeoutMilliseconds_ ) VULKAN_HPP_NOEXCEPT - { - acquireCount = static_cast( acquireTimeoutMilliseconds_.size() ); - pAcquireTimeoutMilliseconds = acquireTimeoutMilliseconds_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = releaseCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & - setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT - { - pReleaseSyncs = pReleaseSyncs_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV & - setReleaseSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = static_cast( releaseSyncs_.size() ); - pReleaseSyncs = releaseSyncs_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT - { - pReleaseKeys = pReleaseKeys_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - Win32KeyedMutexAcquireReleaseInfoNV & - setReleaseKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT - { - releaseCount = static_cast( releaseKeys_.size() ); - pReleaseKeys = releaseKeys_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWin32KeyedMutexAcquireReleaseInfoNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWin32KeyedMutexAcquireReleaseInfoNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, acquireCount, pAcquireSyncs, pAcquireKeys, pAcquireTimeoutMilliseconds, releaseCount, pReleaseSyncs, pReleaseKeys ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Win32KeyedMutexAcquireReleaseInfoNV const & ) const = default; -# else - bool operator==( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( acquireCount == rhs.acquireCount ) && ( pAcquireSyncs == rhs.pAcquireSyncs ) && - ( pAcquireKeys == rhs.pAcquireKeys ) && ( pAcquireTimeoutMilliseconds == rhs.pAcquireTimeoutMilliseconds ) && - ( releaseCount == rhs.releaseCount ) && ( pReleaseSyncs == rhs.pReleaseSyncs ) && ( pReleaseKeys == rhs.pReleaseKeys ); -# endif - } - - bool operator!=( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV; - const void * pNext = {}; - uint32_t acquireCount = {}; - const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs = {}; - const uint64_t * pAcquireKeys = {}; - const uint32_t * pAcquireTimeoutMilliseconds = {}; - uint32_t releaseCount = {}; - const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs = {}; - const uint64_t * pReleaseKeys = {}; - }; - - template <> - struct CppType - { - using Type = Win32KeyedMutexAcquireReleaseInfoNV; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - struct Win32SurfaceCreateInfoKHR - { - using NativeType = VkWin32SurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32SurfaceCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ = {}, - HINSTANCE hinstance_ = {}, - HWND hwnd_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , hinstance( hinstance_ ) - , hwnd( hwnd_ ) - { - } - - VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( Win32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32SurfaceCreateInfoKHR( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : Win32SurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - Win32SurfaceCreateInfoKHR & operator=( Win32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - Win32SurfaceCreateInfoKHR & operator=( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setHinstance( HINSTANCE hinstance_ ) VULKAN_HPP_NOEXCEPT - { - hinstance = hinstance_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setHwnd( HWND hwnd_ ) VULKAN_HPP_NOEXCEPT - { - hwnd = hwnd_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWin32SurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWin32SurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, hinstance, hwnd ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( Win32SurfaceCreateInfoKHR const & ) const = default; -# else - bool operator==( Win32SurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( hinstance == rhs.hinstance ) && ( hwnd == rhs.hwnd ); -# endif - } - - bool operator!=( Win32SurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -# endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags = {}; - HINSTANCE hinstance = {}; - HWND hwnd = {}; - }; - - template <> - struct CppType - { - using Type = Win32SurfaceCreateInfoKHR; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - struct WriteDescriptorSet - { - using NativeType = VkWriteDescriptorSet; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSet; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR WriteDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ = {}, - uint32_t dstBinding_ = {}, - uint32_t dstArrayElement_ = {}, - uint32_t descriptorCount_ = {}, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, - const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo_ = {}, - const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo_ = {}, - const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dstSet( dstSet_ ) - , dstBinding( dstBinding_ ) - , dstArrayElement( dstArrayElement_ ) - , descriptorCount( descriptorCount_ ) - , descriptorType( descriptorType_ ) - , pImageInfo( pImageInfo_ ) - , pBufferInfo( pBufferInfo_ ) - , pTexelBufferView( pTexelBufferView_ ) - { - } - - VULKAN_HPP_CONSTEXPR WriteDescriptorSet( WriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSet( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSet( *reinterpret_cast( &rhs ) ) {} - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_, - uint32_t dstBinding_, - uint32_t dstArrayElement_, - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageInfo_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferInfo_ = {}, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & texelBufferView_ = {}, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , dstSet( dstSet_ ) - , dstBinding( dstBinding_ ) - , dstArrayElement( dstArrayElement_ ) - , descriptorCount( static_cast( !imageInfo_.empty() ? imageInfo_.size() - : !bufferInfo_.empty() ? bufferInfo_.size() - : texelBufferView_.size() ) ) - , descriptorType( descriptorType_ ) - , pImageInfo( imageInfo_.data() ) - , pBufferInfo( bufferInfo_.data() ) - , pTexelBufferView( texelBufferView_.data() ) - { -# ifdef VULKAN_HPP_NO_EXCEPTIONS - VULKAN_HPP_ASSERT( ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) <= 1 ); -# else - if ( 1 < ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING - "::WriteDescriptorSet::WriteDescriptorSet: 1 < ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() )" ); - } -# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - WriteDescriptorSet & operator=( WriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSet & operator=( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT - { - dstSet = dstSet_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT - { - dstBinding = dstBinding_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT - { - dstArrayElement = dstArrayElement_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = descriptorCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT - { - descriptorType = descriptorType_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPImageInfo( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo_ ) VULKAN_HPP_NOEXCEPT - { - pImageInfo = pImageInfo_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSet & - setImageInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageInfo_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = static_cast( imageInfo_.size() ); - pImageInfo = imageInfo_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPBufferInfo( const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo_ ) VULKAN_HPP_NOEXCEPT - { - pBufferInfo = pBufferInfo_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSet & - setBufferInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferInfo_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = static_cast( bufferInfo_.size() ); - pBufferInfo = bufferInfo_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPTexelBufferView( const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView_ ) VULKAN_HPP_NOEXCEPT - { - pTexelBufferView = pTexelBufferView_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSet & - setTexelBufferView( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & texelBufferView_ ) VULKAN_HPP_NOEXCEPT - { - descriptorCount = static_cast( texelBufferView_.size() ); - pTexelBufferView = texelBufferView_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWriteDescriptorSet const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWriteDescriptorSet &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dstSet, dstBinding, dstArrayElement, descriptorCount, descriptorType, pImageInfo, pBufferInfo, pTexelBufferView ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( WriteDescriptorSet const & ) const = default; -#else - bool operator==( WriteDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dstSet == rhs.dstSet ) && ( dstBinding == rhs.dstBinding ) && - ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ) && ( descriptorType == rhs.descriptorType ) && - ( pImageInfo == rhs.pImageInfo ) && ( pBufferInfo == rhs.pBufferInfo ) && ( pTexelBufferView == rhs.pTexelBufferView ); -# endif - } - - bool operator!=( WriteDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSet; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::DescriptorSet dstSet = {}; - uint32_t dstBinding = {}; - uint32_t dstArrayElement = {}; - uint32_t descriptorCount = {}; - VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; - const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo = {}; - const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo = {}; - const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView = {}; - }; - - template <> - struct CppType - { - using Type = WriteDescriptorSet; - }; - - struct WriteDescriptorSetAccelerationStructureKHR - { - using NativeType = VkWriteDescriptorSetAccelerationStructureKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetAccelerationStructureKHR; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureKHR( uint32_t accelerationStructureCount_ = {}, - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructureCount( accelerationStructureCount_ ) - , pAccelerationStructures( pAccelerationStructures_ ) - { - } - - VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureKHR( WriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetAccelerationStructureKHR( VkWriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : WriteDescriptorSetAccelerationStructureKHR( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSetAccelerationStructureKHR( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) - , pAccelerationStructures( accelerationStructures_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - WriteDescriptorSetAccelerationStructureKHR & operator=( WriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetAccelerationStructureKHR & operator=( VkWriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & - setAccelerationStructureCount( uint32_t accelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureCount = accelerationStructureCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & - setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT - { - pAccelerationStructures = pAccelerationStructures_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSetAccelerationStructureKHR & setAccelerationStructures( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureCount = static_cast( accelerationStructures_.size() ); - pAccelerationStructures = accelerationStructures_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWriteDescriptorSetAccelerationStructureKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWriteDescriptorSetAccelerationStructureKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, accelerationStructureCount, pAccelerationStructures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( WriteDescriptorSetAccelerationStructureKHR const & ) const = default; -#else - bool operator==( WriteDescriptorSetAccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureCount == rhs.accelerationStructureCount ) && - ( pAccelerationStructures == rhs.pAccelerationStructures ); -# endif - } - - bool operator!=( WriteDescriptorSetAccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureKHR; - const void * pNext = {}; - uint32_t accelerationStructureCount = {}; - const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures = {}; - }; - - template <> - struct CppType - { - using Type = WriteDescriptorSetAccelerationStructureKHR; - }; - - struct WriteDescriptorSetAccelerationStructureNV - { - using NativeType = VkWriteDescriptorSetAccelerationStructureNV; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetAccelerationStructureNV; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = {}, - const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , accelerationStructureCount( accelerationStructureCount_ ) - , pAccelerationStructures( pAccelerationStructures_ ) - { - } - - VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( WriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetAccelerationStructureNV( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT - : WriteDescriptorSetAccelerationStructureNV( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSetAccelerationStructureNV( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_, - const void * pNext_ = nullptr ) - : pNext( pNext_ ) - , accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) - , pAccelerationStructures( accelerationStructures_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - WriteDescriptorSetAccelerationStructureNV & operator=( WriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetAccelerationStructureNV & operator=( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & - setAccelerationStructureCount( uint32_t accelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureCount = accelerationStructureCount_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & - setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT - { - pAccelerationStructures = pAccelerationStructures_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - WriteDescriptorSetAccelerationStructureNV & setAccelerationStructures( - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_ ) VULKAN_HPP_NOEXCEPT - { - accelerationStructureCount = static_cast( accelerationStructures_.size() ); - pAccelerationStructures = accelerationStructures_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWriteDescriptorSetAccelerationStructureNV const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWriteDescriptorSetAccelerationStructureNV &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std:: - tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, accelerationStructureCount, pAccelerationStructures ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( WriteDescriptorSetAccelerationStructureNV const & ) const = default; -#else - bool operator==( WriteDescriptorSetAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureCount == rhs.accelerationStructureCount ) && - ( pAccelerationStructures == rhs.pAccelerationStructures ); -# endif - } - - bool operator!=( WriteDescriptorSetAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureNV; - const void * pNext = {}; - uint32_t accelerationStructureCount = {}; - const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures = {}; - }; - - template <> - struct CppType - { - using Type = WriteDescriptorSetAccelerationStructureNV; - }; - - struct WriteDescriptorSetInlineUniformBlock - { - using NativeType = VkWriteDescriptorSetInlineUniformBlock; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetInlineUniformBlock; - -#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR - WriteDescriptorSetInlineUniformBlock( uint32_t dataSize_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , dataSize( dataSize_ ) - , pData( pData_ ) - { - } - - VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlock( WriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetInlineUniformBlock( VkWriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT - : WriteDescriptorSetInlineUniformBlock( *reinterpret_cast( &rhs ) ) - { - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - WriteDescriptorSetInlineUniformBlock( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, const void * pNext_ = nullptr ) - : pNext( pNext_ ), dataSize( static_cast( data_.size() * sizeof( T ) ) ), pData( data_.data() ) - { - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - WriteDescriptorSetInlineUniformBlock & operator=( WriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - WriteDescriptorSetInlineUniformBlock & operator=( VkWriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setDataSize( uint32_t dataSize_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = dataSize_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT - { - pData = pData_; - return *this; - } - -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - WriteDescriptorSetInlineUniformBlock & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT - { - dataSize = static_cast( data_.size() * sizeof( T ) ); - pData = data_.data(); - return *this; - } -# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkWriteDescriptorSetInlineUniformBlock const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkWriteDescriptorSetInlineUniformBlock &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -#if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, dataSize, pData ); - } -#endif - -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( WriteDescriptorSetInlineUniformBlock const & ) const = default; -#else - bool operator==( WriteDescriptorSetInlineUniformBlock const & rhs ) const VULKAN_HPP_NOEXCEPT - { -# if defined( VULKAN_HPP_USE_REFLECT ) - return this->reflect() == rhs.reflect(); -# else - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); -# endif - } - - bool operator!=( WriteDescriptorSetInlineUniformBlock const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } -#endif - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetInlineUniformBlock; - const void * pNext = {}; - uint32_t dataSize = {}; - const void * pData = {}; - }; - - template <> - struct CppType - { - using Type = WriteDescriptorSetInlineUniformBlock; - }; - using WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - struct XcbSurfaceCreateInfoKHR - { - using NativeType = VkXcbSurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eXcbSurfaceCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ = {}, - xcb_connection_t * connection_ = {}, - xcb_window_t window_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , connection( connection_ ) - , window( window_ ) - { - } - - VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( XcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XcbSurfaceCreateInfoKHR( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : XcbSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - XcbSurfaceCreateInfoKHR & operator=( XcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XcbSurfaceCreateInfoKHR & operator=( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setConnection( xcb_connection_t * connection_ ) VULKAN_HPP_NOEXCEPT - { - connection = connection_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setWindow( xcb_window_t window_ ) VULKAN_HPP_NOEXCEPT - { - window = window_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkXcbSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkXcbSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, connection, window ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = connection <=> rhs.connection; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &window, &rhs.window, sizeof( xcb_window_t ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( connection == rhs.connection ) && - ( memcmp( &window, &rhs.window, sizeof( xcb_window_t ) ) == 0 ); - } - - bool operator!=( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags = {}; - xcb_connection_t * connection = {}; - xcb_window_t window = {}; - }; - - template <> - struct CppType - { - using Type = XcbSurfaceCreateInfoKHR; - }; -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - struct XlibSurfaceCreateInfoKHR - { - using NativeType = VkXlibSurfaceCreateInfoKHR; - - static const bool allowDuplicate = false; - static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eXlibSurfaceCreateInfoKHR; - -# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) - VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ = {}, - Display * dpy_ = {}, - Window window_ = {}, - const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT - : pNext( pNext_ ) - , flags( flags_ ) - , dpy( dpy_ ) - , window( window_ ) - { - } - - VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( XlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XlibSurfaceCreateInfoKHR( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - : XlibSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) - { - } -# endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/ - - XlibSurfaceCreateInfoKHR & operator=( XlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; - - XlibSurfaceCreateInfoKHR & operator=( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT - { - *this = *reinterpret_cast( &rhs ); - return *this; - } - -# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) - VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT - { - pNext = pNext_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT - { - flags = flags_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setDpy( Display * dpy_ ) VULKAN_HPP_NOEXCEPT - { - dpy = dpy_; - return *this; - } - - VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setWindow( Window window_ ) VULKAN_HPP_NOEXCEPT - { - window = window_; - return *this; - } -# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/ - - operator VkXlibSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - - operator VkXlibSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT - { - return *reinterpret_cast( this ); - } - -# if defined( VULKAN_HPP_USE_REFLECT ) -# if 14 <= VULKAN_HPP_CPP_VERSION - auto -# else - std::tuple -# endif - reflect() const VULKAN_HPP_NOEXCEPT - { - return std::tie( sType, pNext, flags, dpy, window ); - } -# endif - -# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - std::strong_ordering operator<=>( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) - return cmp; - if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) - return cmp; - if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) - return cmp; - if ( auto cmp = dpy <=> rhs.dpy; cmp != 0 ) - return cmp; - if ( auto cmp = memcmp( &window, &rhs.window, sizeof( Window ) ); cmp != 0 ) - return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; - - return std::strong_ordering::equivalent; - } -# endif - - bool operator==( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dpy == rhs.dpy ) && - ( memcmp( &window, &rhs.window, sizeof( Window ) ) == 0 ); - } - - bool operator!=( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT - { - return !operator==( rhs ); - } - - public: - VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR; - const void * pNext = {}; - VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags = {}; - Display * dpy = {}; - Window window = {}; - }; - - template <> - struct CppType - { - using Type = XlibSurfaceCreateInfoKHR; - }; -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/khronos/vulkan/vulkan_to_string.hpp b/modules/SDL2/src/video/khronos/vulkan/vulkan_to_string.hpp deleted file mode 100644 index 9a0c69b..0000000 --- a/modules/SDL2/src/video/khronos/vulkan/vulkan_to_string.hpp +++ /dev/null @@ -1,7732 +0,0 @@ -// Copyright 2015-2022 The Khronos Group Inc. -// -// SPDX-License-Identifier: Apache-2.0 OR MIT -// - -// This header is generated from the Khronos Vulkan XML API Registry. - -#ifndef VULKAN_TO_STRING_HPP -#define VULKAN_TO_STRING_HPP - -#include - -#if __cpp_lib_format -# include // std::format -#else -# include // std::stringstream -#endif - -namespace VULKAN_HPP_NAMESPACE -{ - //========================== - //=== BITMASKs to_string === - //========================== - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & FormatFeatureFlagBits::eSampledImage ) - result += "SampledImage | "; - if ( value & FormatFeatureFlagBits::eStorageImage ) - result += "StorageImage | "; - if ( value & FormatFeatureFlagBits::eStorageImageAtomic ) - result += "StorageImageAtomic | "; - if ( value & FormatFeatureFlagBits::eUniformTexelBuffer ) - result += "UniformTexelBuffer | "; - if ( value & FormatFeatureFlagBits::eStorageTexelBuffer ) - result += "StorageTexelBuffer | "; - if ( value & FormatFeatureFlagBits::eStorageTexelBufferAtomic ) - result += "StorageTexelBufferAtomic | "; - if ( value & FormatFeatureFlagBits::eVertexBuffer ) - result += "VertexBuffer | "; - if ( value & FormatFeatureFlagBits::eColorAttachment ) - result += "ColorAttachment | "; - if ( value & FormatFeatureFlagBits::eColorAttachmentBlend ) - result += "ColorAttachmentBlend | "; - if ( value & FormatFeatureFlagBits::eDepthStencilAttachment ) - result += "DepthStencilAttachment | "; - if ( value & FormatFeatureFlagBits::eBlitSrc ) - result += "BlitSrc | "; - if ( value & FormatFeatureFlagBits::eBlitDst ) - result += "BlitDst | "; - if ( value & FormatFeatureFlagBits::eSampledImageFilterLinear ) - result += "SampledImageFilterLinear | "; - if ( value & FormatFeatureFlagBits::eTransferSrc ) - result += "TransferSrc | "; - if ( value & FormatFeatureFlagBits::eTransferDst ) - result += "TransferDst | "; - if ( value & FormatFeatureFlagBits::eMidpointChromaSamples ) - result += "MidpointChromaSamples | "; - if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter ) - result += "SampledImageYcbcrConversionLinearFilter | "; - if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter ) - result += "SampledImageYcbcrConversionSeparateReconstructionFilter | "; - if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit ) - result += "SampledImageYcbcrConversionChromaReconstructionExplicit | "; - if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) - result += "SampledImageYcbcrConversionChromaReconstructionExplicitForceable | "; - if ( value & FormatFeatureFlagBits::eDisjoint ) - result += "Disjoint | "; - if ( value & FormatFeatureFlagBits::eCositedChromaSamples ) - result += "CositedChromaSamples | "; - if ( value & FormatFeatureFlagBits::eSampledImageFilterMinmax ) - result += "SampledImageFilterMinmax | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & FormatFeatureFlagBits::eVideoDecodeOutputKHR ) - result += "VideoDecodeOutputKHR | "; - if ( value & FormatFeatureFlagBits::eVideoDecodeDpbKHR ) - result += "VideoDecodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR ) - result += "AccelerationStructureVertexBufferKHR | "; - if ( value & FormatFeatureFlagBits::eSampledImageFilterCubicEXT ) - result += "SampledImageFilterCubicEXT | "; - if ( value & FormatFeatureFlagBits::eFragmentDensityMapEXT ) - result += "FragmentDensityMapEXT | "; - if ( value & FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR ) - result += "FragmentShadingRateAttachmentKHR | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & FormatFeatureFlagBits::eVideoEncodeInputKHR ) - result += "VideoEncodeInputKHR | "; - if ( value & FormatFeatureFlagBits::eVideoEncodeDpbKHR ) - result += "VideoEncodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageCreateFlagBits::eSparseBinding ) - result += "SparseBinding | "; - if ( value & ImageCreateFlagBits::eSparseResidency ) - result += "SparseResidency | "; - if ( value & ImageCreateFlagBits::eSparseAliased ) - result += "SparseAliased | "; - if ( value & ImageCreateFlagBits::eMutableFormat ) - result += "MutableFormat | "; - if ( value & ImageCreateFlagBits::eCubeCompatible ) - result += "CubeCompatible | "; - if ( value & ImageCreateFlagBits::eAlias ) - result += "Alias | "; - if ( value & ImageCreateFlagBits::eSplitInstanceBindRegions ) - result += "SplitInstanceBindRegions | "; - if ( value & ImageCreateFlagBits::e2DArrayCompatible ) - result += "2DArrayCompatible | "; - if ( value & ImageCreateFlagBits::eBlockTexelViewCompatible ) - result += "BlockTexelViewCompatible | "; - if ( value & ImageCreateFlagBits::eExtendedUsage ) - result += "ExtendedUsage | "; - if ( value & ImageCreateFlagBits::eProtected ) - result += "Protected | "; - if ( value & ImageCreateFlagBits::eDisjoint ) - result += "Disjoint | "; - if ( value & ImageCreateFlagBits::eCornerSampledNV ) - result += "CornerSampledNV | "; - if ( value & ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT ) - result += "SampleLocationsCompatibleDepthEXT | "; - if ( value & ImageCreateFlagBits::eSubsampledEXT ) - result += "SubsampledEXT | "; - if ( value & ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT ) - result += "MultisampledRenderToSingleSampledEXT | "; - if ( value & ImageCreateFlagBits::e2DViewCompatibleEXT ) - result += "2DViewCompatibleEXT | "; - if ( value & ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM ) - result += "FragmentDensityMapOffsetQCOM | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageUsageFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageUsageFlagBits::eTransferSrc ) - result += "TransferSrc | "; - if ( value & ImageUsageFlagBits::eTransferDst ) - result += "TransferDst | "; - if ( value & ImageUsageFlagBits::eSampled ) - result += "Sampled | "; - if ( value & ImageUsageFlagBits::eStorage ) - result += "Storage | "; - if ( value & ImageUsageFlagBits::eColorAttachment ) - result += "ColorAttachment | "; - if ( value & ImageUsageFlagBits::eDepthStencilAttachment ) - result += "DepthStencilAttachment | "; - if ( value & ImageUsageFlagBits::eTransientAttachment ) - result += "TransientAttachment | "; - if ( value & ImageUsageFlagBits::eInputAttachment ) - result += "InputAttachment | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & ImageUsageFlagBits::eVideoDecodeDstKHR ) - result += "VideoDecodeDstKHR | "; - if ( value & ImageUsageFlagBits::eVideoDecodeSrcKHR ) - result += "VideoDecodeSrcKHR | "; - if ( value & ImageUsageFlagBits::eVideoDecodeDpbKHR ) - result += "VideoDecodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & ImageUsageFlagBits::eFragmentDensityMapEXT ) - result += "FragmentDensityMapEXT | "; - if ( value & ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) - result += "FragmentShadingRateAttachmentKHR | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & ImageUsageFlagBits::eVideoEncodeDstKHR ) - result += "VideoEncodeDstKHR | "; - if ( value & ImageUsageFlagBits::eVideoEncodeSrcKHR ) - result += "VideoEncodeSrcKHR | "; - if ( value & ImageUsageFlagBits::eVideoEncodeDpbKHR ) - result += "VideoEncodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & ImageUsageFlagBits::eAttachmentFeedbackLoopEXT ) - result += "AttachmentFeedbackLoopEXT | "; - if ( value & ImageUsageFlagBits::eInvocationMaskHUAWEI ) - result += "InvocationMaskHUAWEI | "; - if ( value & ImageUsageFlagBits::eSampleWeightQCOM ) - result += "SampleWeightQCOM | "; - if ( value & ImageUsageFlagBits::eSampleBlockMatchQCOM ) - result += "SampleBlockMatchQCOM | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & InstanceCreateFlagBits::eEnumeratePortabilityKHR ) - result += "EnumeratePortabilityKHR | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & MemoryHeapFlagBits::eDeviceLocal ) - result += "DeviceLocal | "; - if ( value & MemoryHeapFlagBits::eMultiInstance ) - result += "MultiInstance | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & MemoryPropertyFlagBits::eDeviceLocal ) - result += "DeviceLocal | "; - if ( value & MemoryPropertyFlagBits::eHostVisible ) - result += "HostVisible | "; - if ( value & MemoryPropertyFlagBits::eHostCoherent ) - result += "HostCoherent | "; - if ( value & MemoryPropertyFlagBits::eHostCached ) - result += "HostCached | "; - if ( value & MemoryPropertyFlagBits::eLazilyAllocated ) - result += "LazilyAllocated | "; - if ( value & MemoryPropertyFlagBits::eProtected ) - result += "Protected | "; - if ( value & MemoryPropertyFlagBits::eDeviceCoherentAMD ) - result += "DeviceCoherentAMD | "; - if ( value & MemoryPropertyFlagBits::eDeviceUncachedAMD ) - result += "DeviceUncachedAMD | "; - if ( value & MemoryPropertyFlagBits::eRdmaCapableNV ) - result += "RdmaCapableNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( QueueFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & QueueFlagBits::eGraphics ) - result += "Graphics | "; - if ( value & QueueFlagBits::eCompute ) - result += "Compute | "; - if ( value & QueueFlagBits::eTransfer ) - result += "Transfer | "; - if ( value & QueueFlagBits::eSparseBinding ) - result += "SparseBinding | "; - if ( value & QueueFlagBits::eProtected ) - result += "Protected | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & QueueFlagBits::eVideoDecodeKHR ) - result += "VideoDecodeKHR | "; - if ( value & QueueFlagBits::eVideoEncodeKHR ) - result += "VideoEncodeKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SampleCountFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SampleCountFlagBits::e1 ) - result += "1 | "; - if ( value & SampleCountFlagBits::e2 ) - result += "2 | "; - if ( value & SampleCountFlagBits::e4 ) - result += "4 | "; - if ( value & SampleCountFlagBits::e8 ) - result += "8 | "; - if ( value & SampleCountFlagBits::e16 ) - result += "16 | "; - if ( value & SampleCountFlagBits::e32 ) - result += "32 | "; - if ( value & SampleCountFlagBits::e64 ) - result += "64 | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DeviceQueueCreateFlagBits::eProtected ) - result += "Protected | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineStageFlagBits::eTopOfPipe ) - result += "TopOfPipe | "; - if ( value & PipelineStageFlagBits::eDrawIndirect ) - result += "DrawIndirect | "; - if ( value & PipelineStageFlagBits::eVertexInput ) - result += "VertexInput | "; - if ( value & PipelineStageFlagBits::eVertexShader ) - result += "VertexShader | "; - if ( value & PipelineStageFlagBits::eTessellationControlShader ) - result += "TessellationControlShader | "; - if ( value & PipelineStageFlagBits::eTessellationEvaluationShader ) - result += "TessellationEvaluationShader | "; - if ( value & PipelineStageFlagBits::eGeometryShader ) - result += "GeometryShader | "; - if ( value & PipelineStageFlagBits::eFragmentShader ) - result += "FragmentShader | "; - if ( value & PipelineStageFlagBits::eEarlyFragmentTests ) - result += "EarlyFragmentTests | "; - if ( value & PipelineStageFlagBits::eLateFragmentTests ) - result += "LateFragmentTests | "; - if ( value & PipelineStageFlagBits::eColorAttachmentOutput ) - result += "ColorAttachmentOutput | "; - if ( value & PipelineStageFlagBits::eComputeShader ) - result += "ComputeShader | "; - if ( value & PipelineStageFlagBits::eTransfer ) - result += "Transfer | "; - if ( value & PipelineStageFlagBits::eBottomOfPipe ) - result += "BottomOfPipe | "; - if ( value & PipelineStageFlagBits::eHost ) - result += "Host | "; - if ( value & PipelineStageFlagBits::eAllGraphics ) - result += "AllGraphics | "; - if ( value & PipelineStageFlagBits::eAllCommands ) - result += "AllCommands | "; - if ( value & PipelineStageFlagBits::eTransformFeedbackEXT ) - result += "TransformFeedbackEXT | "; - if ( value & PipelineStageFlagBits::eConditionalRenderingEXT ) - result += "ConditionalRenderingEXT | "; - if ( value & PipelineStageFlagBits::eAccelerationStructureBuildKHR ) - result += "AccelerationStructureBuildKHR | "; - if ( value & PipelineStageFlagBits::eRayTracingShaderKHR ) - result += "RayTracingShaderKHR | "; - if ( value & PipelineStageFlagBits::eFragmentDensityProcessEXT ) - result += "FragmentDensityProcessEXT | "; - if ( value & PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR ) - result += "FragmentShadingRateAttachmentKHR | "; - if ( value & PipelineStageFlagBits::eCommandPreprocessNV ) - result += "CommandPreprocessNV | "; - if ( value & PipelineStageFlagBits::eTaskShaderEXT ) - result += "TaskShaderEXT | "; - if ( value & PipelineStageFlagBits::eMeshShaderEXT ) - result += "MeshShaderEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( MemoryMapFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageAspectFlagBits::eColor ) - result += "Color | "; - if ( value & ImageAspectFlagBits::eDepth ) - result += "Depth | "; - if ( value & ImageAspectFlagBits::eStencil ) - result += "Stencil | "; - if ( value & ImageAspectFlagBits::eMetadata ) - result += "Metadata | "; - if ( value & ImageAspectFlagBits::ePlane0 ) - result += "Plane0 | "; - if ( value & ImageAspectFlagBits::ePlane1 ) - result += "Plane1 | "; - if ( value & ImageAspectFlagBits::ePlane2 ) - result += "Plane2 | "; - if ( value & ImageAspectFlagBits::eMemoryPlane0EXT ) - result += "MemoryPlane0EXT | "; - if ( value & ImageAspectFlagBits::eMemoryPlane1EXT ) - result += "MemoryPlane1EXT | "; - if ( value & ImageAspectFlagBits::eMemoryPlane2EXT ) - result += "MemoryPlane2EXT | "; - if ( value & ImageAspectFlagBits::eMemoryPlane3EXT ) - result += "MemoryPlane3EXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SparseImageFormatFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SparseImageFormatFlagBits::eSingleMiptail ) - result += "SingleMiptail | "; - if ( value & SparseImageFormatFlagBits::eAlignedMipSize ) - result += "AlignedMipSize | "; - if ( value & SparseImageFormatFlagBits::eNonstandardBlockSize ) - result += "NonstandardBlockSize | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SparseMemoryBindFlagBits::eMetadata ) - result += "Metadata | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( FenceCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & FenceCreateFlagBits::eSignaled ) - result += "Signaled | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( EventCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & EventCreateFlagBits::eDeviceOnly ) - result += "DeviceOnly | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( QueryPipelineStatisticFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyVertices ) - result += "InputAssemblyVertices | "; - if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives ) - result += "InputAssemblyPrimitives | "; - if ( value & QueryPipelineStatisticFlagBits::eVertexShaderInvocations ) - result += "VertexShaderInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eGeometryShaderInvocations ) - result += "GeometryShaderInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives ) - result += "GeometryShaderPrimitives | "; - if ( value & QueryPipelineStatisticFlagBits::eClippingInvocations ) - result += "ClippingInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eClippingPrimitives ) - result += "ClippingPrimitives | "; - if ( value & QueryPipelineStatisticFlagBits::eFragmentShaderInvocations ) - result += "FragmentShaderInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches ) - result += "TessellationControlShaderPatches | "; - if ( value & QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations ) - result += "TessellationEvaluationShaderInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eComputeShaderInvocations ) - result += "ComputeShaderInvocations | "; - if ( value & QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT ) - result += "TaskShaderInvocationsEXT | "; - if ( value & QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT ) - result += "MeshShaderInvocationsEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( QueryResultFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & QueryResultFlagBits::e64 ) - result += "64 | "; - if ( value & QueryResultFlagBits::eWait ) - result += "Wait | "; - if ( value & QueryResultFlagBits::eWithAvailability ) - result += "WithAvailability | "; - if ( value & QueryResultFlagBits::ePartial ) - result += "Partial | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & QueryResultFlagBits::eWithStatusKHR ) - result += "WithStatusKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( BufferCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & BufferCreateFlagBits::eSparseBinding ) - result += "SparseBinding | "; - if ( value & BufferCreateFlagBits::eSparseResidency ) - result += "SparseResidency | "; - if ( value & BufferCreateFlagBits::eSparseAliased ) - result += "SparseAliased | "; - if ( value & BufferCreateFlagBits::eProtected ) - result += "Protected | "; - if ( value & BufferCreateFlagBits::eDeviceAddressCaptureReplay ) - result += "DeviceAddressCaptureReplay | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( BufferUsageFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & BufferUsageFlagBits::eTransferSrc ) - result += "TransferSrc | "; - if ( value & BufferUsageFlagBits::eTransferDst ) - result += "TransferDst | "; - if ( value & BufferUsageFlagBits::eUniformTexelBuffer ) - result += "UniformTexelBuffer | "; - if ( value & BufferUsageFlagBits::eStorageTexelBuffer ) - result += "StorageTexelBuffer | "; - if ( value & BufferUsageFlagBits::eUniformBuffer ) - result += "UniformBuffer | "; - if ( value & BufferUsageFlagBits::eStorageBuffer ) - result += "StorageBuffer | "; - if ( value & BufferUsageFlagBits::eIndexBuffer ) - result += "IndexBuffer | "; - if ( value & BufferUsageFlagBits::eVertexBuffer ) - result += "VertexBuffer | "; - if ( value & BufferUsageFlagBits::eIndirectBuffer ) - result += "IndirectBuffer | "; - if ( value & BufferUsageFlagBits::eShaderDeviceAddress ) - result += "ShaderDeviceAddress | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & BufferUsageFlagBits::eVideoDecodeSrcKHR ) - result += "VideoDecodeSrcKHR | "; - if ( value & BufferUsageFlagBits::eVideoDecodeDstKHR ) - result += "VideoDecodeDstKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & BufferUsageFlagBits::eTransformFeedbackBufferEXT ) - result += "TransformFeedbackBufferEXT | "; - if ( value & BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) - result += "TransformFeedbackCounterBufferEXT | "; - if ( value & BufferUsageFlagBits::eConditionalRenderingEXT ) - result += "ConditionalRenderingEXT | "; - if ( value & BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) - result += "AccelerationStructureBuildInputReadOnlyKHR | "; - if ( value & BufferUsageFlagBits::eAccelerationStructureStorageKHR ) - result += "AccelerationStructureStorageKHR | "; - if ( value & BufferUsageFlagBits::eShaderBindingTableKHR ) - result += "ShaderBindingTableKHR | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & BufferUsageFlagBits::eVideoEncodeDstKHR ) - result += "VideoEncodeDstKHR | "; - if ( value & BufferUsageFlagBits::eVideoEncodeSrcKHR ) - result += "VideoEncodeSrcKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT ) - result += "FragmentDensityMapDynamicEXT | "; - if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT ) - result += "FragmentDensityMapDeferredEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineCacheCreateFlagBits::eExternallySynchronized ) - result += "ExternallySynchronized | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ColorComponentFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ColorComponentFlagBits::eR ) - result += "R | "; - if ( value & ColorComponentFlagBits::eG ) - result += "G | "; - if ( value & ColorComponentFlagBits::eB ) - result += "B | "; - if ( value & ColorComponentFlagBits::eA ) - result += "A | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CullModeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CullModeFlagBits::eFront ) - result += "Front | "; - if ( value & CullModeFlagBits::eBack ) - result += "Back | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT ) - result += "RasterizationOrderAttachmentAccessEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineCreateFlagBits::eDisableOptimization ) - result += "DisableOptimization | "; - if ( value & PipelineCreateFlagBits::eAllowDerivatives ) - result += "AllowDerivatives | "; - if ( value & PipelineCreateFlagBits::eDerivative ) - result += "Derivative | "; - if ( value & PipelineCreateFlagBits::eViewIndexFromDeviceIndex ) - result += "ViewIndexFromDeviceIndex | "; - if ( value & PipelineCreateFlagBits::eDispatchBase ) - result += "DispatchBase | "; - if ( value & PipelineCreateFlagBits::eFailOnPipelineCompileRequired ) - result += "FailOnPipelineCompileRequired | "; - if ( value & PipelineCreateFlagBits::eEarlyReturnOnFailure ) - result += "EarlyReturnOnFailure | "; - if ( value & PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR ) - result += "RenderingFragmentShadingRateAttachmentKHR | "; - if ( value & PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT ) - result += "RenderingFragmentDensityMapAttachmentEXT | "; - if ( value & PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR ) - result += "RayTracingNoNullAnyHitShadersKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR ) - result += "RayTracingNoNullClosestHitShadersKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR ) - result += "RayTracingNoNullMissShadersKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR ) - result += "RayTracingNoNullIntersectionShadersKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR ) - result += "RayTracingSkipTrianglesKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingSkipAabbsKHR ) - result += "RayTracingSkipAabbsKHR | "; - if ( value & PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR ) - result += "RayTracingShaderGroupHandleCaptureReplayKHR | "; - if ( value & PipelineCreateFlagBits::eDeferCompileNV ) - result += "DeferCompileNV | "; - if ( value & PipelineCreateFlagBits::eCaptureStatisticsKHR ) - result += "CaptureStatisticsKHR | "; - if ( value & PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR ) - result += "CaptureInternalRepresentationsKHR | "; - if ( value & PipelineCreateFlagBits::eIndirectBindableNV ) - result += "IndirectBindableNV | "; - if ( value & PipelineCreateFlagBits::eLibraryKHR ) - result += "LibraryKHR | "; - if ( value & PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT ) - result += "RetainLinkTimeOptimizationInfoEXT | "; - if ( value & PipelineCreateFlagBits::eLinkTimeOptimizationEXT ) - result += "LinkTimeOptimizationEXT | "; - if ( value & PipelineCreateFlagBits::eRayTracingAllowMotionNV ) - result += "RayTracingAllowMotionNV | "; - if ( value & PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT ) - result += "ColorAttachmentFeedbackLoopEXT | "; - if ( value & PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT ) - result += "DepthStencilAttachmentFeedbackLoopEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) - result += "RasterizationOrderAttachmentDepthAccessEXT | "; - if ( value & PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) - result += "RasterizationOrderAttachmentStencilAccessEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineLayoutCreateFlagBits::eIndependentSetsEXT ) - result += "IndependentSetsEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize ) - result += "AllowVaryingSubgroupSize | "; - if ( value & PipelineShaderStageCreateFlagBits::eRequireFullSubgroups ) - result += "RequireFullSubgroups | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( ShaderStageFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ShaderStageFlagBits::eVertex ) - result += "Vertex | "; - if ( value & ShaderStageFlagBits::eTessellationControl ) - result += "TessellationControl | "; - if ( value & ShaderStageFlagBits::eTessellationEvaluation ) - result += "TessellationEvaluation | "; - if ( value & ShaderStageFlagBits::eGeometry ) - result += "Geometry | "; - if ( value & ShaderStageFlagBits::eFragment ) - result += "Fragment | "; - if ( value & ShaderStageFlagBits::eCompute ) - result += "Compute | "; - if ( value & ShaderStageFlagBits::eRaygenKHR ) - result += "RaygenKHR | "; - if ( value & ShaderStageFlagBits::eAnyHitKHR ) - result += "AnyHitKHR | "; - if ( value & ShaderStageFlagBits::eClosestHitKHR ) - result += "ClosestHitKHR | "; - if ( value & ShaderStageFlagBits::eMissKHR ) - result += "MissKHR | "; - if ( value & ShaderStageFlagBits::eIntersectionKHR ) - result += "IntersectionKHR | "; - if ( value & ShaderStageFlagBits::eCallableKHR ) - result += "CallableKHR | "; - if ( value & ShaderStageFlagBits::eTaskEXT ) - result += "TaskEXT | "; - if ( value & ShaderStageFlagBits::eMeshEXT ) - result += "MeshEXT | "; - if ( value & ShaderStageFlagBits::eSubpassShadingHUAWEI ) - result += "SubpassShadingHUAWEI | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SamplerCreateFlagBits::eSubsampledEXT ) - result += "SubsampledEXT | "; - if ( value & SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT ) - result += "SubsampledCoarseReconstructionEXT | "; - if ( value & SamplerCreateFlagBits::eNonSeamlessCubeMapEXT ) - result += "NonSeamlessCubeMapEXT | "; - if ( value & SamplerCreateFlagBits::eImageProcessingQCOM ) - result += "ImageProcessingQCOM | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DescriptorPoolCreateFlagBits::eFreeDescriptorSet ) - result += "FreeDescriptorSet | "; - if ( value & DescriptorPoolCreateFlagBits::eUpdateAfterBind ) - result += "UpdateAfterBind | "; - if ( value & DescriptorPoolCreateFlagBits::eHostOnlyVALVE ) - result += "HostOnlyVALVE | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool ) - result += "UpdateAfterBindPool | "; - if ( value & DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR ) - result += "PushDescriptorKHR | "; - if ( value & DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolVALVE ) - result += "HostOnlyPoolVALVE | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( AccessFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & AccessFlagBits::eIndirectCommandRead ) - result += "IndirectCommandRead | "; - if ( value & AccessFlagBits::eIndexRead ) - result += "IndexRead | "; - if ( value & AccessFlagBits::eVertexAttributeRead ) - result += "VertexAttributeRead | "; - if ( value & AccessFlagBits::eUniformRead ) - result += "UniformRead | "; - if ( value & AccessFlagBits::eInputAttachmentRead ) - result += "InputAttachmentRead | "; - if ( value & AccessFlagBits::eShaderRead ) - result += "ShaderRead | "; - if ( value & AccessFlagBits::eShaderWrite ) - result += "ShaderWrite | "; - if ( value & AccessFlagBits::eColorAttachmentRead ) - result += "ColorAttachmentRead | "; - if ( value & AccessFlagBits::eColorAttachmentWrite ) - result += "ColorAttachmentWrite | "; - if ( value & AccessFlagBits::eDepthStencilAttachmentRead ) - result += "DepthStencilAttachmentRead | "; - if ( value & AccessFlagBits::eDepthStencilAttachmentWrite ) - result += "DepthStencilAttachmentWrite | "; - if ( value & AccessFlagBits::eTransferRead ) - result += "TransferRead | "; - if ( value & AccessFlagBits::eTransferWrite ) - result += "TransferWrite | "; - if ( value & AccessFlagBits::eHostRead ) - result += "HostRead | "; - if ( value & AccessFlagBits::eHostWrite ) - result += "HostWrite | "; - if ( value & AccessFlagBits::eMemoryRead ) - result += "MemoryRead | "; - if ( value & AccessFlagBits::eMemoryWrite ) - result += "MemoryWrite | "; - if ( value & AccessFlagBits::eTransformFeedbackWriteEXT ) - result += "TransformFeedbackWriteEXT | "; - if ( value & AccessFlagBits::eTransformFeedbackCounterReadEXT ) - result += "TransformFeedbackCounterReadEXT | "; - if ( value & AccessFlagBits::eTransformFeedbackCounterWriteEXT ) - result += "TransformFeedbackCounterWriteEXT | "; - if ( value & AccessFlagBits::eConditionalRenderingReadEXT ) - result += "ConditionalRenderingReadEXT | "; - if ( value & AccessFlagBits::eColorAttachmentReadNoncoherentEXT ) - result += "ColorAttachmentReadNoncoherentEXT | "; - if ( value & AccessFlagBits::eAccelerationStructureReadKHR ) - result += "AccelerationStructureReadKHR | "; - if ( value & AccessFlagBits::eAccelerationStructureWriteKHR ) - result += "AccelerationStructureWriteKHR | "; - if ( value & AccessFlagBits::eFragmentDensityMapReadEXT ) - result += "FragmentDensityMapReadEXT | "; - if ( value & AccessFlagBits::eFragmentShadingRateAttachmentReadKHR ) - result += "FragmentShadingRateAttachmentReadKHR | "; - if ( value & AccessFlagBits::eCommandPreprocessReadNV ) - result += "CommandPreprocessReadNV | "; - if ( value & AccessFlagBits::eCommandPreprocessWriteNV ) - result += "CommandPreprocessWriteNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & AttachmentDescriptionFlagBits::eMayAlias ) - result += "MayAlias | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DependencyFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DependencyFlagBits::eByRegion ) - result += "ByRegion | "; - if ( value & DependencyFlagBits::eDeviceGroup ) - result += "DeviceGroup | "; - if ( value & DependencyFlagBits::eViewLocal ) - result += "ViewLocal | "; - if ( value & DependencyFlagBits::eFeedbackLoopEXT ) - result += "FeedbackLoopEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & FramebufferCreateFlagBits::eImageless ) - result += "Imageless | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & RenderPassCreateFlagBits::eTransformQCOM ) - result += "TransformQCOM | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SubpassDescriptionFlagBits::ePerViewAttributesNVX ) - result += "PerViewAttributesNVX | "; - if ( value & SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX ) - result += "PerViewPositionXOnlyNVX | "; - if ( value & SubpassDescriptionFlagBits::eFragmentRegionQCOM ) - result += "FragmentRegionQCOM | "; - if ( value & SubpassDescriptionFlagBits::eShaderResolveQCOM ) - result += "ShaderResolveQCOM | "; - if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT ) - result += "RasterizationOrderAttachmentColorAccessEXT | "; - if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) - result += "RasterizationOrderAttachmentDepthAccessEXT | "; - if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) - result += "RasterizationOrderAttachmentStencilAccessEXT | "; - if ( value & SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT ) - result += "EnableLegacyDitheringEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolCreateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CommandPoolCreateFlagBits::eTransient ) - result += "Transient | "; - if ( value & CommandPoolCreateFlagBits::eResetCommandBuffer ) - result += "ResetCommandBuffer | "; - if ( value & CommandPoolCreateFlagBits::eProtected ) - result += "Protected | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CommandPoolResetFlagBits::eReleaseResources ) - result += "ReleaseResources | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CommandBufferResetFlagBits::eReleaseResources ) - result += "ReleaseResources | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CommandBufferUsageFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CommandBufferUsageFlagBits::eOneTimeSubmit ) - result += "OneTimeSubmit | "; - if ( value & CommandBufferUsageFlagBits::eRenderPassContinue ) - result += "RenderPassContinue | "; - if ( value & CommandBufferUsageFlagBits::eSimultaneousUse ) - result += "SimultaneousUse | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( QueryControlFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & QueryControlFlagBits::ePrecise ) - result += "Precise | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( StencilFaceFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & StencilFaceFlagBits::eFront ) - result += "Front | "; - if ( value & StencilFaceFlagBits::eBack ) - result += "Back | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_INLINE std::string to_string( SubgroupFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SubgroupFeatureFlagBits::eBasic ) - result += "Basic | "; - if ( value & SubgroupFeatureFlagBits::eVote ) - result += "Vote | "; - if ( value & SubgroupFeatureFlagBits::eArithmetic ) - result += "Arithmetic | "; - if ( value & SubgroupFeatureFlagBits::eBallot ) - result += "Ballot | "; - if ( value & SubgroupFeatureFlagBits::eShuffle ) - result += "Shuffle | "; - if ( value & SubgroupFeatureFlagBits::eShuffleRelative ) - result += "ShuffleRelative | "; - if ( value & SubgroupFeatureFlagBits::eClustered ) - result += "Clustered | "; - if ( value & SubgroupFeatureFlagBits::eQuad ) - result += "Quad | "; - if ( value & SubgroupFeatureFlagBits::ePartitionedNV ) - result += "PartitionedNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PeerMemoryFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PeerMemoryFeatureFlagBits::eCopySrc ) - result += "CopySrc | "; - if ( value & PeerMemoryFeatureFlagBits::eCopyDst ) - result += "CopyDst | "; - if ( value & PeerMemoryFeatureFlagBits::eGenericSrc ) - result += "GenericSrc | "; - if ( value & PeerMemoryFeatureFlagBits::eGenericDst ) - result += "GenericDst | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & MemoryAllocateFlagBits::eDeviceMask ) - result += "DeviceMask | "; - if ( value & MemoryAllocateFlagBits::eDeviceAddress ) - result += "DeviceAddress | "; - if ( value & MemoryAllocateFlagBits::eDeviceAddressCaptureReplay ) - result += "DeviceAddressCaptureReplay | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) - result += "OpaqueFd | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueWin32 ) - result += "OpaqueWin32 | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt ) - result += "OpaqueWin32Kmt | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eD3D11Texture ) - result += "D3D11Texture | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) - result += "D3D11TextureKmt | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) - result += "D3D12Heap | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) - result += "D3D12Resource | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eDmaBufEXT ) - result += "DmaBufEXT | "; -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - if ( value & ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) - result += "AndroidHardwareBufferANDROID | "; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - if ( value & ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) - result += "HostAllocationEXT | "; - if ( value & ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) - result += "HostMappedForeignMemoryEXT | "; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - if ( value & ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) - result += "ZirconVmoFUCHSIA | "; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - if ( value & ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) - result += "RdmaAddressNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalMemoryFeatureFlagBits::eDedicatedOnly ) - result += "DedicatedOnly | "; - if ( value & ExternalMemoryFeatureFlagBits::eExportable ) - result += "Exportable | "; - if ( value & ExternalMemoryFeatureFlagBits::eImportable ) - result += "Importable | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalFenceHandleTypeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueFd ) - result += "OpaqueFd | "; - if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueWin32 ) - result += "OpaqueWin32 | "; - if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt ) - result += "OpaqueWin32Kmt | "; - if ( value & ExternalFenceHandleTypeFlagBits::eSyncFd ) - result += "SyncFd | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalFenceFeatureFlagBits::eExportable ) - result += "Exportable | "; - if ( value & ExternalFenceFeatureFlagBits::eImportable ) - result += "Importable | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( FenceImportFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & FenceImportFlagBits::eTemporary ) - result += "Temporary | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SemaphoreImportFlagBits::eTemporary ) - result += "Temporary | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreHandleTypeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) - result += "OpaqueFd | "; - if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32 ) - result += "OpaqueWin32 | "; - if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) - result += "OpaqueWin32Kmt | "; - if ( value & ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) - result += "D3D12Fence | "; - if ( value & ExternalSemaphoreHandleTypeFlagBits::eSyncFd ) - result += "SyncFd | "; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - if ( value & ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) - result += "ZirconEventFUCHSIA | "; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalSemaphoreFeatureFlagBits::eExportable ) - result += "Exportable | "; - if ( value & ExternalSemaphoreFeatureFlagBits::eImportable ) - result += "Importable | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_VERSION_1_2 === - - VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DescriptorBindingFlagBits::eUpdateAfterBind ) - result += "UpdateAfterBind | "; - if ( value & DescriptorBindingFlagBits::eUpdateUnusedWhilePending ) - result += "UpdateUnusedWhilePending | "; - if ( value & DescriptorBindingFlagBits::ePartiallyBound ) - result += "PartiallyBound | "; - if ( value & DescriptorBindingFlagBits::eVariableDescriptorCount ) - result += "VariableDescriptorCount | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ResolveModeFlagBits::eSampleZero ) - result += "SampleZero | "; - if ( value & ResolveModeFlagBits::eAverage ) - result += "Average | "; - if ( value & ResolveModeFlagBits::eMin ) - result += "Min | "; - if ( value & ResolveModeFlagBits::eMax ) - result += "Max | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SemaphoreWaitFlagBits::eAny ) - result += "Any | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_VERSION_1_3 === - - VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineCreationFeedbackFlagBits::eValid ) - result += "Valid | "; - if ( value & PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit ) - result += "ApplicationPipelineCacheHit | "; - if ( value & PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration ) - result += "BasePipelineAcceleration | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ToolPurposeFlagBits::eValidation ) - result += "Validation | "; - if ( value & ToolPurposeFlagBits::eProfiling ) - result += "Profiling | "; - if ( value & ToolPurposeFlagBits::eTracing ) - result += "Tracing | "; - if ( value & ToolPurposeFlagBits::eAdditionalFeatures ) - result += "AdditionalFeatures | "; - if ( value & ToolPurposeFlagBits::eModifyingFeatures ) - result += "ModifyingFeatures | "; - if ( value & ToolPurposeFlagBits::eDebugReportingEXT ) - result += "DebugReportingEXT | "; - if ( value & ToolPurposeFlagBits::eDebugMarkersEXT ) - result += "DebugMarkersEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( PrivateDataSlotCreateFlags ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PipelineStageFlagBits2::eTopOfPipe ) - result += "TopOfPipe | "; - if ( value & PipelineStageFlagBits2::eDrawIndirect ) - result += "DrawIndirect | "; - if ( value & PipelineStageFlagBits2::eVertexInput ) - result += "VertexInput | "; - if ( value & PipelineStageFlagBits2::eVertexShader ) - result += "VertexShader | "; - if ( value & PipelineStageFlagBits2::eTessellationControlShader ) - result += "TessellationControlShader | "; - if ( value & PipelineStageFlagBits2::eTessellationEvaluationShader ) - result += "TessellationEvaluationShader | "; - if ( value & PipelineStageFlagBits2::eGeometryShader ) - result += "GeometryShader | "; - if ( value & PipelineStageFlagBits2::eFragmentShader ) - result += "FragmentShader | "; - if ( value & PipelineStageFlagBits2::eEarlyFragmentTests ) - result += "EarlyFragmentTests | "; - if ( value & PipelineStageFlagBits2::eLateFragmentTests ) - result += "LateFragmentTests | "; - if ( value & PipelineStageFlagBits2::eColorAttachmentOutput ) - result += "ColorAttachmentOutput | "; - if ( value & PipelineStageFlagBits2::eComputeShader ) - result += "ComputeShader | "; - if ( value & PipelineStageFlagBits2::eAllTransfer ) - result += "AllTransfer | "; - if ( value & PipelineStageFlagBits2::eBottomOfPipe ) - result += "BottomOfPipe | "; - if ( value & PipelineStageFlagBits2::eHost ) - result += "Host | "; - if ( value & PipelineStageFlagBits2::eAllGraphics ) - result += "AllGraphics | "; - if ( value & PipelineStageFlagBits2::eAllCommands ) - result += "AllCommands | "; - if ( value & PipelineStageFlagBits2::eCopy ) - result += "Copy | "; - if ( value & PipelineStageFlagBits2::eResolve ) - result += "Resolve | "; - if ( value & PipelineStageFlagBits2::eBlit ) - result += "Blit | "; - if ( value & PipelineStageFlagBits2::eClear ) - result += "Clear | "; - if ( value & PipelineStageFlagBits2::eIndexInput ) - result += "IndexInput | "; - if ( value & PipelineStageFlagBits2::eVertexAttributeInput ) - result += "VertexAttributeInput | "; - if ( value & PipelineStageFlagBits2::ePreRasterizationShaders ) - result += "PreRasterizationShaders | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & PipelineStageFlagBits2::eVideoDecodeKHR ) - result += "VideoDecodeKHR | "; - if ( value & PipelineStageFlagBits2::eVideoEncodeKHR ) - result += "VideoEncodeKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & PipelineStageFlagBits2::eTransformFeedbackEXT ) - result += "TransformFeedbackEXT | "; - if ( value & PipelineStageFlagBits2::eConditionalRenderingEXT ) - result += "ConditionalRenderingEXT | "; - if ( value & PipelineStageFlagBits2::eCommandPreprocessNV ) - result += "CommandPreprocessNV | "; - if ( value & PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) - result += "FragmentShadingRateAttachmentKHR | "; - if ( value & PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) - result += "AccelerationStructureBuildKHR | "; - if ( value & PipelineStageFlagBits2::eRayTracingShaderKHR ) - result += "RayTracingShaderKHR | "; - if ( value & PipelineStageFlagBits2::eFragmentDensityProcessEXT ) - result += "FragmentDensityProcessEXT | "; - if ( value & PipelineStageFlagBits2::eTaskShaderEXT ) - result += "TaskShaderEXT | "; - if ( value & PipelineStageFlagBits2::eMeshShaderEXT ) - result += "MeshShaderEXT | "; - if ( value & PipelineStageFlagBits2::eSubpassShadingHUAWEI ) - result += "SubpassShadingHUAWEI | "; - if ( value & PipelineStageFlagBits2::eInvocationMaskHUAWEI ) - result += "InvocationMaskHUAWEI | "; - if ( value & PipelineStageFlagBits2::eAccelerationStructureCopyKHR ) - result += "AccelerationStructureCopyKHR | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & AccessFlagBits2::eIndirectCommandRead ) - result += "IndirectCommandRead | "; - if ( value & AccessFlagBits2::eIndexRead ) - result += "IndexRead | "; - if ( value & AccessFlagBits2::eVertexAttributeRead ) - result += "VertexAttributeRead | "; - if ( value & AccessFlagBits2::eUniformRead ) - result += "UniformRead | "; - if ( value & AccessFlagBits2::eInputAttachmentRead ) - result += "InputAttachmentRead | "; - if ( value & AccessFlagBits2::eShaderRead ) - result += "ShaderRead | "; - if ( value & AccessFlagBits2::eShaderWrite ) - result += "ShaderWrite | "; - if ( value & AccessFlagBits2::eColorAttachmentRead ) - result += "ColorAttachmentRead | "; - if ( value & AccessFlagBits2::eColorAttachmentWrite ) - result += "ColorAttachmentWrite | "; - if ( value & AccessFlagBits2::eDepthStencilAttachmentRead ) - result += "DepthStencilAttachmentRead | "; - if ( value & AccessFlagBits2::eDepthStencilAttachmentWrite ) - result += "DepthStencilAttachmentWrite | "; - if ( value & AccessFlagBits2::eTransferRead ) - result += "TransferRead | "; - if ( value & AccessFlagBits2::eTransferWrite ) - result += "TransferWrite | "; - if ( value & AccessFlagBits2::eHostRead ) - result += "HostRead | "; - if ( value & AccessFlagBits2::eHostWrite ) - result += "HostWrite | "; - if ( value & AccessFlagBits2::eMemoryRead ) - result += "MemoryRead | "; - if ( value & AccessFlagBits2::eMemoryWrite ) - result += "MemoryWrite | "; - if ( value & AccessFlagBits2::eShaderSampledRead ) - result += "ShaderSampledRead | "; - if ( value & AccessFlagBits2::eShaderStorageRead ) - result += "ShaderStorageRead | "; - if ( value & AccessFlagBits2::eShaderStorageWrite ) - result += "ShaderStorageWrite | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & AccessFlagBits2::eVideoDecodeReadKHR ) - result += "VideoDecodeReadKHR | "; - if ( value & AccessFlagBits2::eVideoDecodeWriteKHR ) - result += "VideoDecodeWriteKHR | "; - if ( value & AccessFlagBits2::eVideoEncodeReadKHR ) - result += "VideoEncodeReadKHR | "; - if ( value & AccessFlagBits2::eVideoEncodeWriteKHR ) - result += "VideoEncodeWriteKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & AccessFlagBits2::eTransformFeedbackWriteEXT ) - result += "TransformFeedbackWriteEXT | "; - if ( value & AccessFlagBits2::eTransformFeedbackCounterReadEXT ) - result += "TransformFeedbackCounterReadEXT | "; - if ( value & AccessFlagBits2::eTransformFeedbackCounterWriteEXT ) - result += "TransformFeedbackCounterWriteEXT | "; - if ( value & AccessFlagBits2::eConditionalRenderingReadEXT ) - result += "ConditionalRenderingReadEXT | "; - if ( value & AccessFlagBits2::eCommandPreprocessReadNV ) - result += "CommandPreprocessReadNV | "; - if ( value & AccessFlagBits2::eCommandPreprocessWriteNV ) - result += "CommandPreprocessWriteNV | "; - if ( value & AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR ) - result += "FragmentShadingRateAttachmentReadKHR | "; - if ( value & AccessFlagBits2::eAccelerationStructureReadKHR ) - result += "AccelerationStructureReadKHR | "; - if ( value & AccessFlagBits2::eAccelerationStructureWriteKHR ) - result += "AccelerationStructureWriteKHR | "; - if ( value & AccessFlagBits2::eFragmentDensityMapReadEXT ) - result += "FragmentDensityMapReadEXT | "; - if ( value & AccessFlagBits2::eColorAttachmentReadNoncoherentEXT ) - result += "ColorAttachmentReadNoncoherentEXT | "; - if ( value & AccessFlagBits2::eInvocationMaskReadHUAWEI ) - result += "InvocationMaskReadHUAWEI | "; - if ( value & AccessFlagBits2::eShaderBindingTableReadKHR ) - result += "ShaderBindingTableReadKHR | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( SubmitFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SubmitFlagBits::eProtected ) - result += "Protected | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( RenderingFlags value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & RenderingFlagBits::eContentsSecondaryCommandBuffers ) - result += "ContentsSecondaryCommandBuffers | "; - if ( value & RenderingFlagBits::eSuspending ) - result += "Suspending | "; - if ( value & RenderingFlagBits::eResuming ) - result += "Resuming | "; - if ( value & RenderingFlagBits::eEnableLegacyDitheringEXT ) - result += "EnableLegacyDitheringEXT | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlags2 value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & FormatFeatureFlagBits2::eSampledImage ) - result += "SampledImage | "; - if ( value & FormatFeatureFlagBits2::eStorageImage ) - result += "StorageImage | "; - if ( value & FormatFeatureFlagBits2::eStorageImageAtomic ) - result += "StorageImageAtomic | "; - if ( value & FormatFeatureFlagBits2::eUniformTexelBuffer ) - result += "UniformTexelBuffer | "; - if ( value & FormatFeatureFlagBits2::eStorageTexelBuffer ) - result += "StorageTexelBuffer | "; - if ( value & FormatFeatureFlagBits2::eStorageTexelBufferAtomic ) - result += "StorageTexelBufferAtomic | "; - if ( value & FormatFeatureFlagBits2::eVertexBuffer ) - result += "VertexBuffer | "; - if ( value & FormatFeatureFlagBits2::eColorAttachment ) - result += "ColorAttachment | "; - if ( value & FormatFeatureFlagBits2::eColorAttachmentBlend ) - result += "ColorAttachmentBlend | "; - if ( value & FormatFeatureFlagBits2::eDepthStencilAttachment ) - result += "DepthStencilAttachment | "; - if ( value & FormatFeatureFlagBits2::eBlitSrc ) - result += "BlitSrc | "; - if ( value & FormatFeatureFlagBits2::eBlitDst ) - result += "BlitDst | "; - if ( value & FormatFeatureFlagBits2::eSampledImageFilterLinear ) - result += "SampledImageFilterLinear | "; - if ( value & FormatFeatureFlagBits2::eSampledImageFilterCubic ) - result += "SampledImageFilterCubic | "; - if ( value & FormatFeatureFlagBits2::eTransferSrc ) - result += "TransferSrc | "; - if ( value & FormatFeatureFlagBits2::eTransferDst ) - result += "TransferDst | "; - if ( value & FormatFeatureFlagBits2::eSampledImageFilterMinmax ) - result += "SampledImageFilterMinmax | "; - if ( value & FormatFeatureFlagBits2::eMidpointChromaSamples ) - result += "MidpointChromaSamples | "; - if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter ) - result += "SampledImageYcbcrConversionLinearFilter | "; - if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter ) - result += "SampledImageYcbcrConversionSeparateReconstructionFilter | "; - if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit ) - result += "SampledImageYcbcrConversionChromaReconstructionExplicit | "; - if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) - result += "SampledImageYcbcrConversionChromaReconstructionExplicitForceable | "; - if ( value & FormatFeatureFlagBits2::eDisjoint ) - result += "Disjoint | "; - if ( value & FormatFeatureFlagBits2::eCositedChromaSamples ) - result += "CositedChromaSamples | "; - if ( value & FormatFeatureFlagBits2::eStorageReadWithoutFormat ) - result += "StorageReadWithoutFormat | "; - if ( value & FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) - result += "StorageWriteWithoutFormat | "; - if ( value & FormatFeatureFlagBits2::eSampledImageDepthComparison ) - result += "SampledImageDepthComparison | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) - result += "VideoDecodeOutputKHR | "; - if ( value & FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) - result += "VideoDecodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) - result += "AccelerationStructureVertexBufferKHR | "; - if ( value & FormatFeatureFlagBits2::eFragmentDensityMapEXT ) - result += "FragmentDensityMapEXT | "; - if ( value & FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR ) - result += "FragmentShadingRateAttachmentKHR | "; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & FormatFeatureFlagBits2::eVideoEncodeInputKHR ) - result += "VideoEncodeInputKHR | "; - if ( value & FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) - result += "VideoEncodeDpbKHR | "; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - if ( value & FormatFeatureFlagBits2::eLinearColorAttachmentNV ) - result += "LinearColorAttachmentNV | "; - if ( value & FormatFeatureFlagBits2::eWeightImageQCOM ) - result += "WeightImageQCOM | "; - if ( value & FormatFeatureFlagBits2::eWeightSampledImageQCOM ) - result += "WeightSampledImageQCOM | "; - if ( value & FormatFeatureFlagBits2::eBlockMatchingQCOM ) - result += "BlockMatchingQCOM | "; - if ( value & FormatFeatureFlagBits2::eBoxFilterSampledQCOM ) - result += "BoxFilterSampledQCOM | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_KHR_surface === - - VULKAN_HPP_INLINE std::string to_string( CompositeAlphaFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & CompositeAlphaFlagBitsKHR::eOpaque ) - result += "Opaque | "; - if ( value & CompositeAlphaFlagBitsKHR::ePreMultiplied ) - result += "PreMultiplied | "; - if ( value & CompositeAlphaFlagBitsKHR::ePostMultiplied ) - result += "PostMultiplied | "; - if ( value & CompositeAlphaFlagBitsKHR::eInherit ) - result += "Inherit | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_KHR_swapchain === - - VULKAN_HPP_INLINE std::string to_string( SwapchainCreateFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions ) - result += "SplitInstanceBindRegions | "; - if ( value & SwapchainCreateFlagBitsKHR::eProtected ) - result += "Protected | "; - if ( value & SwapchainCreateFlagBitsKHR::eMutableFormat ) - result += "MutableFormat | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DeviceGroupPresentModeFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocal ) - result += "Local | "; - if ( value & DeviceGroupPresentModeFlagBitsKHR::eRemote ) - result += "Remote | "; - if ( value & DeviceGroupPresentModeFlagBitsKHR::eSum ) - result += "Sum | "; - if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice ) - result += "LocalMultiDevice | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_KHR_display === - - VULKAN_HPP_INLINE std::string to_string( DisplayModeCreateFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( DisplayPlaneAlphaFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DisplayPlaneAlphaFlagBitsKHR::eOpaque ) - result += "Opaque | "; - if ( value & DisplayPlaneAlphaFlagBitsKHR::eGlobal ) - result += "Global | "; - if ( value & DisplayPlaneAlphaFlagBitsKHR::ePerPixel ) - result += "PerPixel | "; - if ( value & DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied ) - result += "PerPixelPremultiplied | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DisplaySurfaceCreateFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( SurfaceTransformFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SurfaceTransformFlagBitsKHR::eIdentity ) - result += "Identity | "; - if ( value & SurfaceTransformFlagBitsKHR::eRotate90 ) - result += "Rotate90 | "; - if ( value & SurfaceTransformFlagBitsKHR::eRotate180 ) - result += "Rotate180 | "; - if ( value & SurfaceTransformFlagBitsKHR::eRotate270 ) - result += "Rotate270 | "; - if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirror ) - result += "HorizontalMirror | "; - if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90 ) - result += "HorizontalMirrorRotate90 | "; - if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180 ) - result += "HorizontalMirrorRotate180 | "; - if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270 ) - result += "HorizontalMirrorRotate270 | "; - if ( value & SurfaceTransformFlagBitsKHR::eInherit ) - result += "Inherit | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VULKAN_HPP_INLINE std::string to_string( XlibSurfaceCreateFlagsKHR ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VULKAN_HPP_INLINE std::string to_string( XcbSurfaceCreateFlagsKHR ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VULKAN_HPP_INLINE std::string to_string( WaylandSurfaceCreateFlagsKHR ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - VULKAN_HPP_INLINE std::string to_string( AndroidSurfaceCreateFlagsKHR ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VULKAN_HPP_INLINE std::string to_string( Win32SurfaceCreateFlagsKHR ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - VULKAN_HPP_INLINE std::string to_string( DebugReportFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DebugReportFlagBitsEXT::eInformation ) - result += "Information | "; - if ( value & DebugReportFlagBitsEXT::eWarning ) - result += "Warning | "; - if ( value & DebugReportFlagBitsEXT::ePerformanceWarning ) - result += "PerformanceWarning | "; - if ( value & DebugReportFlagBitsEXT::eError ) - result += "Error | "; - if ( value & DebugReportFlagBitsEXT::eDebug ) - result += "Debug | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) - result += "EncodeH264EXT | "; - if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) - result += "EncodeH265EXT | "; - if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH264EXT ) - result += "DecodeH264EXT | "; - if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH265EXT ) - result += "DecodeH265EXT | "; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoChromaSubsamplingFlagBitsKHR::eMonochrome ) - result += "Monochrome | "; - if ( value & VideoChromaSubsamplingFlagBitsKHR::e420 ) - result += "420 | "; - if ( value & VideoChromaSubsamplingFlagBitsKHR::e422 ) - result += "422 | "; - if ( value & VideoChromaSubsamplingFlagBitsKHR::e444 ) - result += "444 | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoComponentBitDepthFlagBitsKHR::e8 ) - result += "8 | "; - if ( value & VideoComponentBitDepthFlagBitsKHR::e10 ) - result += "10 | "; - if ( value & VideoComponentBitDepthFlagBitsKHR::e12 ) - result += "12 | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoCapabilityFlagBitsKHR::eProtectedContent ) - result += "ProtectedContent | "; - if ( value & VideoCapabilityFlagBitsKHR::eSeparateReferenceImages ) - result += "SeparateReferenceImages | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoSessionCreateFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoSessionCreateFlagBitsKHR::eProtectedContent ) - result += "ProtectedContent | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoSessionParametersCreateFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoBeginCodingFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEndCodingFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoCodingControlFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoCodingControlFlagBitsKHR::eReset ) - result += "Reset | "; -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - if ( value & VideoCodingControlFlagBitsKHR::eEncodeRateControl ) - result += "EncodeRateControl | "; - if ( value & VideoCodingControlFlagBitsKHR::eEncodeRateControlLayer ) - result += "EncodeRateControlLayer | "; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeCapabilityFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide ) - result += "DpbAndOutputCoincide | "; - if ( value & VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct ) - result += "DpbAndOutputDistinct | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoDecodeUsageFlagBitsKHR::eTranscoding ) - result += "Transcoding | "; - if ( value & VideoDecodeUsageFlagBitsKHR::eOffline ) - result += "Offline | "; - if ( value & VideoDecodeUsageFlagBitsKHR::eStreaming ) - result += "Streaming | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeFlagsKHR ) - { - return "{}"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateStreamCreateFlagsEXT ) - { - return "{}"; - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceEnabled ) - result += "Direct8X8InferenceEnabled | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceDisabled ) - result += "Direct8X8InferenceDisabled | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eSeparateColourPlane ) - result += "SeparateColourPlane | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eQpprimeYZeroTransformBypass ) - result += "QpprimeYZeroTransformBypass | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eScalingLists ) - result += "ScalingLists | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eHrdCompliance ) - result += "HrdCompliance | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset ) - result += "ChromaQpOffset | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset ) - result += "SecondChromaQpOffset | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::ePicInitQpMinus26 ) - result += "PicInitQpMinus26 | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPred ) - result += "WeightedPred | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredExplicit ) - result += "WeightedBipredExplicit | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredImplicit ) - result += "WeightedBipredImplicit | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPredNoTable ) - result += "WeightedPredNoTable | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8 ) - result += "Transform8X8 | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eCabac ) - result += "Cabac | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eCavlc ) - result += "Cavlc | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled ) - result += "DeblockingFilterDisabled | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled ) - result += "DeblockingFilterEnabled | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial ) - result += "DeblockingFilterPartial | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDisableDirectSpatialMvPred ) - result += "DisableDirectSpatialMvPred | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame ) - result += "MultipleSlicePerFrame | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eSliceMbCount ) - result += "SliceMbCount | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eRowUnalignedSlice ) - result += "RowUnalignedSlice | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDifferentSliceType ) - result += "DifferentSliceType | "; - if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eBFrameInL1List ) - result += "BFrameInL1List | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264InputModeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH264InputModeFlagBitsEXT::eFrame ) - result += "Frame | "; - if ( value & VideoEncodeH264InputModeFlagBitsEXT::eSlice ) - result += "Slice | "; - if ( value & VideoEncodeH264InputModeFlagBitsEXT::eNonVcl ) - result += "NonVcl | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264OutputModeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eFrame ) - result += "Frame | "; - if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eSlice ) - result += "Slice | "; - if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl ) - result += "NonVcl | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CapabilityFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eSeparateColourPlane ) - result += "SeparateColourPlane | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eScalingLists ) - result += "ScalingLists | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eSampleAdaptiveOffsetEnabled ) - result += "SampleAdaptiveOffsetEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::ePcmEnable ) - result += "PcmEnable | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eSpsTemporalMvpEnabled ) - result += "SpsTemporalMvpEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eHrdCompliance ) - result += "HrdCompliance | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eInitQpMinus26 ) - result += "InitQpMinus26 | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eLog2ParallelMergeLevelMinus2 ) - result += "Log2ParallelMergeLevelMinus2 | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eSignDataHidingEnabled ) - result += "SignDataHidingEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipEnabled ) - result += "TransformSkipEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipDisabled ) - result += "TransformSkipDisabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::ePpsSliceChromaQpOffsetsPresent ) - result += "PpsSliceChromaQpOffsetsPresent | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPred ) - result += "WeightedPred | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eWeightedBipred ) - result += "WeightedBipred | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPredNoTable ) - result += "WeightedPredNoTable | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eTransquantBypassEnabled ) - result += "TransquantBypassEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eEntropyCodingSyncEnabled ) - result += "EntropyCodingSyncEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eDeblockingFilterOverrideEnabled ) - result += "DeblockingFilterOverrideEnabled | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerFrame ) - result += "MultipleTilePerFrame | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eMultipleSlicePerTile ) - result += "MultipleSlicePerTile | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerSlice ) - result += "MultipleTilePerSlice | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eSliceSegmentCtbCount ) - result += "SliceSegmentCtbCount | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eRowUnalignedSliceSegment ) - result += "RowUnalignedSliceSegment | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eDependentSliceSegment ) - result += "DependentSliceSegment | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eDifferentSliceType ) - result += "DifferentSliceType | "; - if ( value & VideoEncodeH265CapabilityFlagBitsEXT::eBFrameInL1List ) - result += "BFrameInL1List | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265InputModeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH265InputModeFlagBitsEXT::eFrame ) - result += "Frame | "; - if ( value & VideoEncodeH265InputModeFlagBitsEXT::eSliceSegment ) - result += "SliceSegment | "; - if ( value & VideoEncodeH265InputModeFlagBitsEXT::eNonVcl ) - result += "NonVcl | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265OutputModeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH265OutputModeFlagBitsEXT::eFrame ) - result += "Frame | "; - if ( value & VideoEncodeH265OutputModeFlagBitsEXT::eSliceSegment ) - result += "SliceSegment | "; - if ( value & VideoEncodeH265OutputModeFlagBitsEXT::eNonVcl ) - result += "NonVcl | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CtbSizeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH265CtbSizeFlagBitsEXT::e16 ) - result += "16 | "; - if ( value & VideoEncodeH265CtbSizeFlagBitsEXT::e32 ) - result += "32 | "; - if ( value & VideoEncodeH265CtbSizeFlagBitsEXT::e64 ) - result += "64 | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265TransformBlockSizeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeH265TransformBlockSizeFlagBitsEXT::e4 ) - result += "4 | "; - if ( value & VideoEncodeH265TransformBlockSizeFlagBitsEXT::e8 ) - result += "8 | "; - if ( value & VideoEncodeH265TransformBlockSizeFlagBitsEXT::e16 ) - result += "16 | "; - if ( value & VideoEncodeH265TransformBlockSizeFlagBitsEXT::e32 ) - result += "32 | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines ) - result += "InterlacedInterleavedLines | "; - if ( value & VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes ) - result += "InterlacedSeparatePlanes | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - VULKAN_HPP_INLINE std::string to_string( StreamDescriptorSurfaceCreateFlagsGGP ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagsNV value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32 ) - result += "OpaqueWin32 | "; - if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt ) - result += "OpaqueWin32Kmt | "; - if ( value & ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image ) - result += "D3D11Image | "; - if ( value & ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt ) - result += "D3D11ImageKmt | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagsNV value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly ) - result += "DedicatedOnly | "; - if ( value & ExternalMemoryFeatureFlagBitsNV::eExportable ) - result += "Exportable | "; - if ( value & ExternalMemoryFeatureFlagBitsNV::eImportable ) - result += "Importable | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - VULKAN_HPP_INLINE std::string to_string( ViSurfaceCreateFlagsNN ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_EXT_conditional_rendering === - - VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ConditionalRenderingFlagBitsEXT::eInverted ) - result += "Inverted | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_EXT_display_surface_counter === - - VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & SurfaceCounterFlagBitsEXT::eVblank ) - result += "Vblank | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_NV_viewport_swizzle === - - VULKAN_HPP_INLINE std::string to_string( PipelineViewportSwizzleStateCreateFlagsNV ) - { - return "{}"; - } - - //=== VK_EXT_discard_rectangles === - - VULKAN_HPP_INLINE std::string to_string( PipelineDiscardRectangleStateCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_EXT_conservative_rasterization === - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationConservativeStateCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_EXT_depth_clip_enable === - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationDepthClipStateCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_KHR_performance_query === - - VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting ) - result += "PerformanceImpacting | "; - if ( value & PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted ) - result += "ConcurrentlyImpacted | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagsKHR ) - { - return "{}"; - } - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - VULKAN_HPP_INLINE std::string to_string( IOSSurfaceCreateFlagsMVK ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - VULKAN_HPP_INLINE std::string to_string( MacOSSurfaceCreateFlagsMVK ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageSeverityFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eVerbose ) - result += "Verbose | "; - if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eInfo ) - result += "Info | "; - if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eWarning ) - result += "Warning | "; - if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eError ) - result += "Error | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageTypeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DebugUtilsMessageTypeFlagBitsEXT::eGeneral ) - result += "General | "; - if ( value & DebugUtilsMessageTypeFlagBitsEXT::eValidation ) - result += "Validation | "; - if ( value & DebugUtilsMessageTypeFlagBitsEXT::ePerformance ) - result += "Performance | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCallbackDataFlagsEXT ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_NV_fragment_coverage_to_color === - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageToColorStateCreateFlagsNV ) - { - return "{}"; - } - - //=== VK_KHR_acceleration_structure === - - VULKAN_HPP_INLINE std::string to_string( GeometryFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & GeometryFlagBitsKHR::eOpaque ) - result += "Opaque | "; - if ( value & GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation ) - result += "NoDuplicateAnyHitInvocation | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable ) - result += "TriangleFacingCullDisable | "; - if ( value & GeometryInstanceFlagBitsKHR::eTriangleFlipFacing ) - result += "TriangleFlipFacing | "; - if ( value & GeometryInstanceFlagBitsKHR::eForceOpaque ) - result += "ForceOpaque | "; - if ( value & GeometryInstanceFlagBitsKHR::eForceNoOpaque ) - result += "ForceNoOpaque | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowUpdate ) - result += "AllowUpdate | "; - if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowCompaction ) - result += "AllowCompaction | "; - if ( value & BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace ) - result += "PreferFastTrace | "; - if ( value & BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild ) - result += "PreferFastBuild | "; - if ( value & BuildAccelerationStructureFlagBitsKHR::eLowMemory ) - result += "LowMemory | "; - if ( value & BuildAccelerationStructureFlagBitsKHR::eMotionNV ) - result += "MotionNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCreateFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay ) - result += "DeviceAddressCaptureReplay | "; - if ( value & AccelerationStructureCreateFlagBitsKHR::eMotionNV ) - result += "MotionNV | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_NV_framebuffer_mixed_samples === - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageModulationStateCreateFlagsNV ) - { - return "{}"; - } - - //=== VK_EXT_validation_cache === - - VULKAN_HPP_INLINE std::string to_string( ValidationCacheCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_AMD_pipeline_compiler_control === - - VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagsAMD ) - { - return "{}"; - } - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - VULKAN_HPP_INLINE std::string to_string( ImagePipeSurfaceCreateFlagsFUCHSIA ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - VULKAN_HPP_INLINE std::string to_string( MetalSurfaceCreateFlagsEXT ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_AMD_shader_core_properties2 === - - VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagsAMD ) - { - return "{}"; - } - - //=== VK_NV_coverage_reduction_mode === - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageReductionStateCreateFlagsNV ) - { - return "{}"; - } - - //=== VK_EXT_headless_surface === - - VULKAN_HPP_INLINE std::string to_string( HeadlessSurfaceCreateFlagsEXT ) - { - return "{}"; - } - - //=== VK_NV_device_generated_commands === - - VULKAN_HPP_INLINE std::string to_string( IndirectStateFlagsNV value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & IndirectStateFlagBitsNV::eFlagFrontface ) - result += "FlagFrontface | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagsNV value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess ) - result += "ExplicitPreprocess | "; - if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences ) - result += "IndexedSequences | "; - if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences ) - result += "UnorderedSequences | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_EXT_device_memory_report === - - VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportFlagsEXT ) - { - return "{}"; - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeCapabilityFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes ) - result += "PrecedingExternallyEncodedBytes | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeUsageFlagBitsKHR::eTranscoding ) - result += "Transcoding | "; - if ( value & VideoEncodeUsageFlagBitsKHR::eStreaming ) - result += "Streaming | "; - if ( value & VideoEncodeUsageFlagBitsKHR::eRecording ) - result += "Recording | "; - if ( value & VideoEncodeUsageFlagBitsKHR::eConferencing ) - result += "Conferencing | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & VideoEncodeContentFlagBitsKHR::eCamera ) - result += "Camera | "; - if ( value & VideoEncodeContentFlagBitsKHR::eDesktop ) - result += "Desktop | "; - if ( value & VideoEncodeContentFlagBitsKHR::eRendered ) - result += "Rendered | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlFlagsKHR ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagsKHR value ) - { - if ( !value ) - return "{}"; - - std::string result; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - - VULKAN_HPP_INLINE std::string to_string( DeviceDiagnosticsConfigFlagsNV value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo ) - result += "EnableShaderDebugInfo | "; - if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking ) - result += "EnableResourceTracking | "; - if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints ) - result += "EnableAutomaticCheckpoints | "; - if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting ) - result += "EnableShaderErrorReporting | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - VULKAN_HPP_INLINE std::string to_string( ExportMetalObjectTypeFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalDevice ) - result += "MetalDevice | "; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue ) - result += "MetalCommandQueue | "; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer ) - result += "MetalBuffer | "; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalTexture ) - result += "MetalTexture | "; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface ) - result += "MetalIosurface | "; - if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent ) - result += "MetalSharedEvent | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_graphics_pipeline_library === - - VULKAN_HPP_INLINE std::string to_string( GraphicsPipelineLibraryFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface ) - result += "VertexInputInterface | "; - if ( value & GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders ) - result += "PreRasterizationShaders | "; - if ( value & GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader ) - result += "FragmentShader | "; - if ( value & GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface ) - result += "FragmentOutputInterface | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - //=== VK_NV_ray_tracing_motion_blur === - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInfoFlagsNV ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceFlagsNV ) - { - return "{}"; - } - - //=== VK_EXT_image_compression_control === - - VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageCompressionFlagBitsEXT::eFixedRateDefault ) - result += "FixedRateDefault | "; - if ( value & ImageCompressionFlagBitsEXT::eFixedRateExplicit ) - result += "FixedRateExplicit | "; - if ( value & ImageCompressionFlagBitsEXT::eDisabled ) - result += "Disabled | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagsEXT value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e1Bpc ) - result += "1Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e2Bpc ) - result += "2Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e3Bpc ) - result += "3Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e4Bpc ) - result += "4Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e5Bpc ) - result += "5Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e6Bpc ) - result += "6Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e7Bpc ) - result += "7Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e8Bpc ) - result += "8Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e9Bpc ) - result += "9Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e10Bpc ) - result += "10Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e11Bpc ) - result += "11Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e12Bpc ) - result += "12Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e13Bpc ) - result += "13Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e14Bpc ) - result += "14Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e15Bpc ) - result += "15Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e16Bpc ) - result += "16Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e17Bpc ) - result += "17Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e18Bpc ) - result += "18Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e19Bpc ) - result += "19Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e20Bpc ) - result += "20Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e21Bpc ) - result += "21Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e22Bpc ) - result += "22Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e23Bpc ) - result += "23Bpc | "; - if ( value & ImageCompressionFixedRateFlagBitsEXT::e24Bpc ) - result += "24Bpc | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VULKAN_HPP_INLINE std::string to_string( DirectFBSurfaceCreateFlagsEXT ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - VULKAN_HPP_INLINE std::string to_string( ImageFormatConstraintsFlagsFUCHSIA ) - { - return "{}"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageConstraintsInfoFlagsFUCHSIA value ) - { - if ( !value ) - return "{}"; - - std::string result; - if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely ) - result += "CpuReadRarely | "; - if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften ) - result += "CpuReadOften | "; - if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely ) - result += "CpuWriteRarely | "; - if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften ) - result += "CpuWriteOften | "; - if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional ) - result += "ProtectedOptional | "; - - return "{ " + result.substr( 0, result.size() - 3 ) + " }"; - } -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VULKAN_HPP_INLINE std::string to_string( ScreenSurfaceCreateFlagsQNX ) - { - return "{}"; - } -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //======================= - //=== ENUMs to_string === - //======================= - - VULKAN_HPP_INLINE std::string toHexString( uint32_t value ) - { -#if __cpp_lib_format - return std::format( "{:x}", value ); -#else - std::stringstream stream; - stream << std::hex << value; - return stream.str(); -#endif - } - - //=== VK_VERSION_1_0 === - - VULKAN_HPP_INLINE std::string to_string( Result value ) - { - switch ( value ) - { - case Result::eSuccess: return "Success"; - case Result::eNotReady: return "NotReady"; - case Result::eTimeout: return "Timeout"; - case Result::eEventSet: return "EventSet"; - case Result::eEventReset: return "EventReset"; - case Result::eIncomplete: return "Incomplete"; - case Result::eErrorOutOfHostMemory: return "ErrorOutOfHostMemory"; - case Result::eErrorOutOfDeviceMemory: return "ErrorOutOfDeviceMemory"; - case Result::eErrorInitializationFailed: return "ErrorInitializationFailed"; - case Result::eErrorDeviceLost: return "ErrorDeviceLost"; - case Result::eErrorMemoryMapFailed: return "ErrorMemoryMapFailed"; - case Result::eErrorLayerNotPresent: return "ErrorLayerNotPresent"; - case Result::eErrorExtensionNotPresent: return "ErrorExtensionNotPresent"; - case Result::eErrorFeatureNotPresent: return "ErrorFeatureNotPresent"; - case Result::eErrorIncompatibleDriver: return "ErrorIncompatibleDriver"; - case Result::eErrorTooManyObjects: return "ErrorTooManyObjects"; - case Result::eErrorFormatNotSupported: return "ErrorFormatNotSupported"; - case Result::eErrorFragmentedPool: return "ErrorFragmentedPool"; - case Result::eErrorUnknown: return "ErrorUnknown"; - case Result::eErrorOutOfPoolMemory: return "ErrorOutOfPoolMemory"; - case Result::eErrorInvalidExternalHandle: return "ErrorInvalidExternalHandle"; - case Result::eErrorFragmentation: return "ErrorFragmentation"; - case Result::eErrorInvalidOpaqueCaptureAddress: return "ErrorInvalidOpaqueCaptureAddress"; - case Result::ePipelineCompileRequired: return "PipelineCompileRequired"; - case Result::eErrorSurfaceLostKHR: return "ErrorSurfaceLostKHR"; - case Result::eErrorNativeWindowInUseKHR: return "ErrorNativeWindowInUseKHR"; - case Result::eSuboptimalKHR: return "SuboptimalKHR"; - case Result::eErrorOutOfDateKHR: return "ErrorOutOfDateKHR"; - case Result::eErrorIncompatibleDisplayKHR: return "ErrorIncompatibleDisplayKHR"; - case Result::eErrorValidationFailedEXT: return "ErrorValidationFailedEXT"; - case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case Result::eErrorImageUsageNotSupportedKHR: return "ErrorImageUsageNotSupportedKHR"; - case Result::eErrorVideoPictureLayoutNotSupportedKHR: return "ErrorVideoPictureLayoutNotSupportedKHR"; - case Result::eErrorVideoProfileOperationNotSupportedKHR: return "ErrorVideoProfileOperationNotSupportedKHR"; - case Result::eErrorVideoProfileFormatNotSupportedKHR: return "ErrorVideoProfileFormatNotSupportedKHR"; - case Result::eErrorVideoProfileCodecNotSupportedKHR: return "ErrorVideoProfileCodecNotSupportedKHR"; - case Result::eErrorVideoStdVersionNotSupportedKHR: return "ErrorVideoStdVersionNotSupportedKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: return "ErrorInvalidDrmFormatModifierPlaneLayoutEXT"; - case Result::eErrorNotPermittedKHR: return "ErrorNotPermittedKHR"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case Result::eErrorFullScreenExclusiveModeLostEXT: return "ErrorFullScreenExclusiveModeLostEXT"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case Result::eThreadIdleKHR: return "ThreadIdleKHR"; - case Result::eThreadDoneKHR: return "ThreadDoneKHR"; - case Result::eOperationDeferredKHR: return "OperationDeferredKHR"; - case Result::eOperationNotDeferredKHR: return "OperationNotDeferredKHR"; - case Result::eErrorCompressionExhaustedEXT: return "ErrorCompressionExhaustedEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( StructureType value ) - { - switch ( value ) - { - case StructureType::eApplicationInfo: return "ApplicationInfo"; - case StructureType::eInstanceCreateInfo: return "InstanceCreateInfo"; - case StructureType::eDeviceQueueCreateInfo: return "DeviceQueueCreateInfo"; - case StructureType::eDeviceCreateInfo: return "DeviceCreateInfo"; - case StructureType::eSubmitInfo: return "SubmitInfo"; - case StructureType::eMemoryAllocateInfo: return "MemoryAllocateInfo"; - case StructureType::eMappedMemoryRange: return "MappedMemoryRange"; - case StructureType::eBindSparseInfo: return "BindSparseInfo"; - case StructureType::eFenceCreateInfo: return "FenceCreateInfo"; - case StructureType::eSemaphoreCreateInfo: return "SemaphoreCreateInfo"; - case StructureType::eEventCreateInfo: return "EventCreateInfo"; - case StructureType::eQueryPoolCreateInfo: return "QueryPoolCreateInfo"; - case StructureType::eBufferCreateInfo: return "BufferCreateInfo"; - case StructureType::eBufferViewCreateInfo: return "BufferViewCreateInfo"; - case StructureType::eImageCreateInfo: return "ImageCreateInfo"; - case StructureType::eImageViewCreateInfo: return "ImageViewCreateInfo"; - case StructureType::eShaderModuleCreateInfo: return "ShaderModuleCreateInfo"; - case StructureType::ePipelineCacheCreateInfo: return "PipelineCacheCreateInfo"; - case StructureType::ePipelineShaderStageCreateInfo: return "PipelineShaderStageCreateInfo"; - case StructureType::ePipelineVertexInputStateCreateInfo: return "PipelineVertexInputStateCreateInfo"; - case StructureType::ePipelineInputAssemblyStateCreateInfo: return "PipelineInputAssemblyStateCreateInfo"; - case StructureType::ePipelineTessellationStateCreateInfo: return "PipelineTessellationStateCreateInfo"; - case StructureType::ePipelineViewportStateCreateInfo: return "PipelineViewportStateCreateInfo"; - case StructureType::ePipelineRasterizationStateCreateInfo: return "PipelineRasterizationStateCreateInfo"; - case StructureType::ePipelineMultisampleStateCreateInfo: return "PipelineMultisampleStateCreateInfo"; - case StructureType::ePipelineDepthStencilStateCreateInfo: return "PipelineDepthStencilStateCreateInfo"; - case StructureType::ePipelineColorBlendStateCreateInfo: return "PipelineColorBlendStateCreateInfo"; - case StructureType::ePipelineDynamicStateCreateInfo: return "PipelineDynamicStateCreateInfo"; - case StructureType::eGraphicsPipelineCreateInfo: return "GraphicsPipelineCreateInfo"; - case StructureType::eComputePipelineCreateInfo: return "ComputePipelineCreateInfo"; - case StructureType::ePipelineLayoutCreateInfo: return "PipelineLayoutCreateInfo"; - case StructureType::eSamplerCreateInfo: return "SamplerCreateInfo"; - case StructureType::eDescriptorSetLayoutCreateInfo: return "DescriptorSetLayoutCreateInfo"; - case StructureType::eDescriptorPoolCreateInfo: return "DescriptorPoolCreateInfo"; - case StructureType::eDescriptorSetAllocateInfo: return "DescriptorSetAllocateInfo"; - case StructureType::eWriteDescriptorSet: return "WriteDescriptorSet"; - case StructureType::eCopyDescriptorSet: return "CopyDescriptorSet"; - case StructureType::eFramebufferCreateInfo: return "FramebufferCreateInfo"; - case StructureType::eRenderPassCreateInfo: return "RenderPassCreateInfo"; - case StructureType::eCommandPoolCreateInfo: return "CommandPoolCreateInfo"; - case StructureType::eCommandBufferAllocateInfo: return "CommandBufferAllocateInfo"; - case StructureType::eCommandBufferInheritanceInfo: return "CommandBufferInheritanceInfo"; - case StructureType::eCommandBufferBeginInfo: return "CommandBufferBeginInfo"; - case StructureType::eRenderPassBeginInfo: return "RenderPassBeginInfo"; - case StructureType::eBufferMemoryBarrier: return "BufferMemoryBarrier"; - case StructureType::eImageMemoryBarrier: return "ImageMemoryBarrier"; - case StructureType::eMemoryBarrier: return "MemoryBarrier"; - case StructureType::eLoaderInstanceCreateInfo: return "LoaderInstanceCreateInfo"; - case StructureType::eLoaderDeviceCreateInfo: return "LoaderDeviceCreateInfo"; - case StructureType::ePhysicalDeviceSubgroupProperties: return "PhysicalDeviceSubgroupProperties"; - case StructureType::eBindBufferMemoryInfo: return "BindBufferMemoryInfo"; - case StructureType::eBindImageMemoryInfo: return "BindImageMemoryInfo"; - case StructureType::ePhysicalDevice16BitStorageFeatures: return "PhysicalDevice16BitStorageFeatures"; - case StructureType::eMemoryDedicatedRequirements: return "MemoryDedicatedRequirements"; - case StructureType::eMemoryDedicatedAllocateInfo: return "MemoryDedicatedAllocateInfo"; - case StructureType::eMemoryAllocateFlagsInfo: return "MemoryAllocateFlagsInfo"; - case StructureType::eDeviceGroupRenderPassBeginInfo: return "DeviceGroupRenderPassBeginInfo"; - case StructureType::eDeviceGroupCommandBufferBeginInfo: return "DeviceGroupCommandBufferBeginInfo"; - case StructureType::eDeviceGroupSubmitInfo: return "DeviceGroupSubmitInfo"; - case StructureType::eDeviceGroupBindSparseInfo: return "DeviceGroupBindSparseInfo"; - case StructureType::eBindBufferMemoryDeviceGroupInfo: return "BindBufferMemoryDeviceGroupInfo"; - case StructureType::eBindImageMemoryDeviceGroupInfo: return "BindImageMemoryDeviceGroupInfo"; - case StructureType::ePhysicalDeviceGroupProperties: return "PhysicalDeviceGroupProperties"; - case StructureType::eDeviceGroupDeviceCreateInfo: return "DeviceGroupDeviceCreateInfo"; - case StructureType::eBufferMemoryRequirementsInfo2: return "BufferMemoryRequirementsInfo2"; - case StructureType::eImageMemoryRequirementsInfo2: return "ImageMemoryRequirementsInfo2"; - case StructureType::eImageSparseMemoryRequirementsInfo2: return "ImageSparseMemoryRequirementsInfo2"; - case StructureType::eMemoryRequirements2: return "MemoryRequirements2"; - case StructureType::eSparseImageMemoryRequirements2: return "SparseImageMemoryRequirements2"; - case StructureType::ePhysicalDeviceFeatures2: return "PhysicalDeviceFeatures2"; - case StructureType::ePhysicalDeviceProperties2: return "PhysicalDeviceProperties2"; - case StructureType::eFormatProperties2: return "FormatProperties2"; - case StructureType::eImageFormatProperties2: return "ImageFormatProperties2"; - case StructureType::ePhysicalDeviceImageFormatInfo2: return "PhysicalDeviceImageFormatInfo2"; - case StructureType::eQueueFamilyProperties2: return "QueueFamilyProperties2"; - case StructureType::ePhysicalDeviceMemoryProperties2: return "PhysicalDeviceMemoryProperties2"; - case StructureType::eSparseImageFormatProperties2: return "SparseImageFormatProperties2"; - case StructureType::ePhysicalDeviceSparseImageFormatInfo2: return "PhysicalDeviceSparseImageFormatInfo2"; - case StructureType::ePhysicalDevicePointClippingProperties: return "PhysicalDevicePointClippingProperties"; - case StructureType::eRenderPassInputAttachmentAspectCreateInfo: return "RenderPassInputAttachmentAspectCreateInfo"; - case StructureType::eImageViewUsageCreateInfo: return "ImageViewUsageCreateInfo"; - case StructureType::ePipelineTessellationDomainOriginStateCreateInfo: return "PipelineTessellationDomainOriginStateCreateInfo"; - case StructureType::eRenderPassMultiviewCreateInfo: return "RenderPassMultiviewCreateInfo"; - case StructureType::ePhysicalDeviceMultiviewFeatures: return "PhysicalDeviceMultiviewFeatures"; - case StructureType::ePhysicalDeviceMultiviewProperties: return "PhysicalDeviceMultiviewProperties"; - case StructureType::ePhysicalDeviceVariablePointersFeatures: return "PhysicalDeviceVariablePointersFeatures"; - case StructureType::eProtectedSubmitInfo: return "ProtectedSubmitInfo"; - case StructureType::ePhysicalDeviceProtectedMemoryFeatures: return "PhysicalDeviceProtectedMemoryFeatures"; - case StructureType::ePhysicalDeviceProtectedMemoryProperties: return "PhysicalDeviceProtectedMemoryProperties"; - case StructureType::eDeviceQueueInfo2: return "DeviceQueueInfo2"; - case StructureType::eSamplerYcbcrConversionCreateInfo: return "SamplerYcbcrConversionCreateInfo"; - case StructureType::eSamplerYcbcrConversionInfo: return "SamplerYcbcrConversionInfo"; - case StructureType::eBindImagePlaneMemoryInfo: return "BindImagePlaneMemoryInfo"; - case StructureType::eImagePlaneMemoryRequirementsInfo: return "ImagePlaneMemoryRequirementsInfo"; - case StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures: return "PhysicalDeviceSamplerYcbcrConversionFeatures"; - case StructureType::eSamplerYcbcrConversionImageFormatProperties: return "SamplerYcbcrConversionImageFormatProperties"; - case StructureType::eDescriptorUpdateTemplateCreateInfo: return "DescriptorUpdateTemplateCreateInfo"; - case StructureType::ePhysicalDeviceExternalImageFormatInfo: return "PhysicalDeviceExternalImageFormatInfo"; - case StructureType::eExternalImageFormatProperties: return "ExternalImageFormatProperties"; - case StructureType::ePhysicalDeviceExternalBufferInfo: return "PhysicalDeviceExternalBufferInfo"; - case StructureType::eExternalBufferProperties: return "ExternalBufferProperties"; - case StructureType::ePhysicalDeviceIdProperties: return "PhysicalDeviceIdProperties"; - case StructureType::eExternalMemoryBufferCreateInfo: return "ExternalMemoryBufferCreateInfo"; - case StructureType::eExternalMemoryImageCreateInfo: return "ExternalMemoryImageCreateInfo"; - case StructureType::eExportMemoryAllocateInfo: return "ExportMemoryAllocateInfo"; - case StructureType::ePhysicalDeviceExternalFenceInfo: return "PhysicalDeviceExternalFenceInfo"; - case StructureType::eExternalFenceProperties: return "ExternalFenceProperties"; - case StructureType::eExportFenceCreateInfo: return "ExportFenceCreateInfo"; - case StructureType::eExportSemaphoreCreateInfo: return "ExportSemaphoreCreateInfo"; - case StructureType::ePhysicalDeviceExternalSemaphoreInfo: return "PhysicalDeviceExternalSemaphoreInfo"; - case StructureType::eExternalSemaphoreProperties: return "ExternalSemaphoreProperties"; - case StructureType::ePhysicalDeviceMaintenance3Properties: return "PhysicalDeviceMaintenance3Properties"; - case StructureType::eDescriptorSetLayoutSupport: return "DescriptorSetLayoutSupport"; - case StructureType::ePhysicalDeviceShaderDrawParametersFeatures: return "PhysicalDeviceShaderDrawParametersFeatures"; - case StructureType::ePhysicalDeviceVulkan11Features: return "PhysicalDeviceVulkan11Features"; - case StructureType::ePhysicalDeviceVulkan11Properties: return "PhysicalDeviceVulkan11Properties"; - case StructureType::ePhysicalDeviceVulkan12Features: return "PhysicalDeviceVulkan12Features"; - case StructureType::ePhysicalDeviceVulkan12Properties: return "PhysicalDeviceVulkan12Properties"; - case StructureType::eImageFormatListCreateInfo: return "ImageFormatListCreateInfo"; - case StructureType::eAttachmentDescription2: return "AttachmentDescription2"; - case StructureType::eAttachmentReference2: return "AttachmentReference2"; - case StructureType::eSubpassDescription2: return "SubpassDescription2"; - case StructureType::eSubpassDependency2: return "SubpassDependency2"; - case StructureType::eRenderPassCreateInfo2: return "RenderPassCreateInfo2"; - case StructureType::eSubpassBeginInfo: return "SubpassBeginInfo"; - case StructureType::eSubpassEndInfo: return "SubpassEndInfo"; - case StructureType::ePhysicalDevice8BitStorageFeatures: return "PhysicalDevice8BitStorageFeatures"; - case StructureType::ePhysicalDeviceDriverProperties: return "PhysicalDeviceDriverProperties"; - case StructureType::ePhysicalDeviceShaderAtomicInt64Features: return "PhysicalDeviceShaderAtomicInt64Features"; - case StructureType::ePhysicalDeviceShaderFloat16Int8Features: return "PhysicalDeviceShaderFloat16Int8Features"; - case StructureType::ePhysicalDeviceFloatControlsProperties: return "PhysicalDeviceFloatControlsProperties"; - case StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo: return "DescriptorSetLayoutBindingFlagsCreateInfo"; - case StructureType::ePhysicalDeviceDescriptorIndexingFeatures: return "PhysicalDeviceDescriptorIndexingFeatures"; - case StructureType::ePhysicalDeviceDescriptorIndexingProperties: return "PhysicalDeviceDescriptorIndexingProperties"; - case StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo: return "DescriptorSetVariableDescriptorCountAllocateInfo"; - case StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport: return "DescriptorSetVariableDescriptorCountLayoutSupport"; - case StructureType::ePhysicalDeviceDepthStencilResolveProperties: return "PhysicalDeviceDepthStencilResolveProperties"; - case StructureType::eSubpassDescriptionDepthStencilResolve: return "SubpassDescriptionDepthStencilResolve"; - case StructureType::ePhysicalDeviceScalarBlockLayoutFeatures: return "PhysicalDeviceScalarBlockLayoutFeatures"; - case StructureType::eImageStencilUsageCreateInfo: return "ImageStencilUsageCreateInfo"; - case StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties: return "PhysicalDeviceSamplerFilterMinmaxProperties"; - case StructureType::eSamplerReductionModeCreateInfo: return "SamplerReductionModeCreateInfo"; - case StructureType::ePhysicalDeviceVulkanMemoryModelFeatures: return "PhysicalDeviceVulkanMemoryModelFeatures"; - case StructureType::ePhysicalDeviceImagelessFramebufferFeatures: return "PhysicalDeviceImagelessFramebufferFeatures"; - case StructureType::eFramebufferAttachmentsCreateInfo: return "FramebufferAttachmentsCreateInfo"; - case StructureType::eFramebufferAttachmentImageInfo: return "FramebufferAttachmentImageInfo"; - case StructureType::eRenderPassAttachmentBeginInfo: return "RenderPassAttachmentBeginInfo"; - case StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures: return "PhysicalDeviceUniformBufferStandardLayoutFeatures"; - case StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures: return "PhysicalDeviceShaderSubgroupExtendedTypesFeatures"; - case StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures: return "PhysicalDeviceSeparateDepthStencilLayoutsFeatures"; - case StructureType::eAttachmentReferenceStencilLayout: return "AttachmentReferenceStencilLayout"; - case StructureType::eAttachmentDescriptionStencilLayout: return "AttachmentDescriptionStencilLayout"; - case StructureType::ePhysicalDeviceHostQueryResetFeatures: return "PhysicalDeviceHostQueryResetFeatures"; - case StructureType::ePhysicalDeviceTimelineSemaphoreFeatures: return "PhysicalDeviceTimelineSemaphoreFeatures"; - case StructureType::ePhysicalDeviceTimelineSemaphoreProperties: return "PhysicalDeviceTimelineSemaphoreProperties"; - case StructureType::eSemaphoreTypeCreateInfo: return "SemaphoreTypeCreateInfo"; - case StructureType::eTimelineSemaphoreSubmitInfo: return "TimelineSemaphoreSubmitInfo"; - case StructureType::eSemaphoreWaitInfo: return "SemaphoreWaitInfo"; - case StructureType::eSemaphoreSignalInfo: return "SemaphoreSignalInfo"; - case StructureType::ePhysicalDeviceBufferDeviceAddressFeatures: return "PhysicalDeviceBufferDeviceAddressFeatures"; - case StructureType::eBufferDeviceAddressInfo: return "BufferDeviceAddressInfo"; - case StructureType::eBufferOpaqueCaptureAddressCreateInfo: return "BufferOpaqueCaptureAddressCreateInfo"; - case StructureType::eMemoryOpaqueCaptureAddressAllocateInfo: return "MemoryOpaqueCaptureAddressAllocateInfo"; - case StructureType::eDeviceMemoryOpaqueCaptureAddressInfo: return "DeviceMemoryOpaqueCaptureAddressInfo"; - case StructureType::ePhysicalDeviceVulkan13Features: return "PhysicalDeviceVulkan13Features"; - case StructureType::ePhysicalDeviceVulkan13Properties: return "PhysicalDeviceVulkan13Properties"; - case StructureType::ePipelineCreationFeedbackCreateInfo: return "PipelineCreationFeedbackCreateInfo"; - case StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures: return "PhysicalDeviceShaderTerminateInvocationFeatures"; - case StructureType::ePhysicalDeviceToolProperties: return "PhysicalDeviceToolProperties"; - case StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures: return "PhysicalDeviceShaderDemoteToHelperInvocationFeatures"; - case StructureType::ePhysicalDevicePrivateDataFeatures: return "PhysicalDevicePrivateDataFeatures"; - case StructureType::eDevicePrivateDataCreateInfo: return "DevicePrivateDataCreateInfo"; - case StructureType::ePrivateDataSlotCreateInfo: return "PrivateDataSlotCreateInfo"; - case StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures: return "PhysicalDevicePipelineCreationCacheControlFeatures"; - case StructureType::eMemoryBarrier2: return "MemoryBarrier2"; - case StructureType::eBufferMemoryBarrier2: return "BufferMemoryBarrier2"; - case StructureType::eImageMemoryBarrier2: return "ImageMemoryBarrier2"; - case StructureType::eDependencyInfo: return "DependencyInfo"; - case StructureType::eSubmitInfo2: return "SubmitInfo2"; - case StructureType::eSemaphoreSubmitInfo: return "SemaphoreSubmitInfo"; - case StructureType::eCommandBufferSubmitInfo: return "CommandBufferSubmitInfo"; - case StructureType::ePhysicalDeviceSynchronization2Features: return "PhysicalDeviceSynchronization2Features"; - case StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures: return "PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures"; - case StructureType::ePhysicalDeviceImageRobustnessFeatures: return "PhysicalDeviceImageRobustnessFeatures"; - case StructureType::eCopyBufferInfo2: return "CopyBufferInfo2"; - case StructureType::eCopyImageInfo2: return "CopyImageInfo2"; - case StructureType::eCopyBufferToImageInfo2: return "CopyBufferToImageInfo2"; - case StructureType::eCopyImageToBufferInfo2: return "CopyImageToBufferInfo2"; - case StructureType::eBlitImageInfo2: return "BlitImageInfo2"; - case StructureType::eResolveImageInfo2: return "ResolveImageInfo2"; - case StructureType::eBufferCopy2: return "BufferCopy2"; - case StructureType::eImageCopy2: return "ImageCopy2"; - case StructureType::eImageBlit2: return "ImageBlit2"; - case StructureType::eBufferImageCopy2: return "BufferImageCopy2"; - case StructureType::eImageResolve2: return "ImageResolve2"; - case StructureType::ePhysicalDeviceSubgroupSizeControlProperties: return "PhysicalDeviceSubgroupSizeControlProperties"; - case StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo: return "PipelineShaderStageRequiredSubgroupSizeCreateInfo"; - case StructureType::ePhysicalDeviceSubgroupSizeControlFeatures: return "PhysicalDeviceSubgroupSizeControlFeatures"; - case StructureType::ePhysicalDeviceInlineUniformBlockFeatures: return "PhysicalDeviceInlineUniformBlockFeatures"; - case StructureType::ePhysicalDeviceInlineUniformBlockProperties: return "PhysicalDeviceInlineUniformBlockProperties"; - case StructureType::eWriteDescriptorSetInlineUniformBlock: return "WriteDescriptorSetInlineUniformBlock"; - case StructureType::eDescriptorPoolInlineUniformBlockCreateInfo: return "DescriptorPoolInlineUniformBlockCreateInfo"; - case StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures: return "PhysicalDeviceTextureCompressionAstcHdrFeatures"; - case StructureType::eRenderingInfo: return "RenderingInfo"; - case StructureType::eRenderingAttachmentInfo: return "RenderingAttachmentInfo"; - case StructureType::ePipelineRenderingCreateInfo: return "PipelineRenderingCreateInfo"; - case StructureType::ePhysicalDeviceDynamicRenderingFeatures: return "PhysicalDeviceDynamicRenderingFeatures"; - case StructureType::eCommandBufferInheritanceRenderingInfo: return "CommandBufferInheritanceRenderingInfo"; - case StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures: return "PhysicalDeviceShaderIntegerDotProductFeatures"; - case StructureType::ePhysicalDeviceShaderIntegerDotProductProperties: return "PhysicalDeviceShaderIntegerDotProductProperties"; - case StructureType::ePhysicalDeviceTexelBufferAlignmentProperties: return "PhysicalDeviceTexelBufferAlignmentProperties"; - case StructureType::eFormatProperties3: return "FormatProperties3"; - case StructureType::ePhysicalDeviceMaintenance4Features: return "PhysicalDeviceMaintenance4Features"; - case StructureType::ePhysicalDeviceMaintenance4Properties: return "PhysicalDeviceMaintenance4Properties"; - case StructureType::eDeviceBufferMemoryRequirements: return "DeviceBufferMemoryRequirements"; - case StructureType::eDeviceImageMemoryRequirements: return "DeviceImageMemoryRequirements"; - case StructureType::eSwapchainCreateInfoKHR: return "SwapchainCreateInfoKHR"; - case StructureType::ePresentInfoKHR: return "PresentInfoKHR"; - case StructureType::eDeviceGroupPresentCapabilitiesKHR: return "DeviceGroupPresentCapabilitiesKHR"; - case StructureType::eImageSwapchainCreateInfoKHR: return "ImageSwapchainCreateInfoKHR"; - case StructureType::eBindImageMemorySwapchainInfoKHR: return "BindImageMemorySwapchainInfoKHR"; - case StructureType::eAcquireNextImageInfoKHR: return "AcquireNextImageInfoKHR"; - case StructureType::eDeviceGroupPresentInfoKHR: return "DeviceGroupPresentInfoKHR"; - case StructureType::eDeviceGroupSwapchainCreateInfoKHR: return "DeviceGroupSwapchainCreateInfoKHR"; - case StructureType::eDisplayModeCreateInfoKHR: return "DisplayModeCreateInfoKHR"; - case StructureType::eDisplaySurfaceCreateInfoKHR: return "DisplaySurfaceCreateInfoKHR"; - case StructureType::eDisplayPresentInfoKHR: return "DisplayPresentInfoKHR"; -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - case StructureType::eXlibSurfaceCreateInfoKHR: return "XlibSurfaceCreateInfoKHR"; -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#if defined( VK_USE_PLATFORM_XCB_KHR ) - case StructureType::eXcbSurfaceCreateInfoKHR: return "XcbSurfaceCreateInfoKHR"; -#endif /*VK_USE_PLATFORM_XCB_KHR*/ -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - case StructureType::eWaylandSurfaceCreateInfoKHR: return "WaylandSurfaceCreateInfoKHR"; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - case StructureType::eAndroidSurfaceCreateInfoKHR: return "AndroidSurfaceCreateInfoKHR"; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eWin32SurfaceCreateInfoKHR: return "Win32SurfaceCreateInfoKHR"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eDebugReportCallbackCreateInfoEXT: return "DebugReportCallbackCreateInfoEXT"; - case StructureType::ePipelineRasterizationStateRasterizationOrderAMD: return "PipelineRasterizationStateRasterizationOrderAMD"; - case StructureType::eDebugMarkerObjectNameInfoEXT: return "DebugMarkerObjectNameInfoEXT"; - case StructureType::eDebugMarkerObjectTagInfoEXT: return "DebugMarkerObjectTagInfoEXT"; - case StructureType::eDebugMarkerMarkerInfoEXT: return "DebugMarkerMarkerInfoEXT"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case StructureType::eVideoProfileInfoKHR: return "VideoProfileInfoKHR"; - case StructureType::eVideoCapabilitiesKHR: return "VideoCapabilitiesKHR"; - case StructureType::eVideoPictureResourceInfoKHR: return "VideoPictureResourceInfoKHR"; - case StructureType::eVideoSessionMemoryRequirementsKHR: return "VideoSessionMemoryRequirementsKHR"; - case StructureType::eBindVideoSessionMemoryInfoKHR: return "BindVideoSessionMemoryInfoKHR"; - case StructureType::eVideoSessionCreateInfoKHR: return "VideoSessionCreateInfoKHR"; - case StructureType::eVideoSessionParametersCreateInfoKHR: return "VideoSessionParametersCreateInfoKHR"; - case StructureType::eVideoSessionParametersUpdateInfoKHR: return "VideoSessionParametersUpdateInfoKHR"; - case StructureType::eVideoBeginCodingInfoKHR: return "VideoBeginCodingInfoKHR"; - case StructureType::eVideoEndCodingInfoKHR: return "VideoEndCodingInfoKHR"; - case StructureType::eVideoCodingControlInfoKHR: return "VideoCodingControlInfoKHR"; - case StructureType::eVideoReferenceSlotInfoKHR: return "VideoReferenceSlotInfoKHR"; - case StructureType::eQueueFamilyVideoPropertiesKHR: return "QueueFamilyVideoPropertiesKHR"; - case StructureType::eVideoProfileListInfoKHR: return "VideoProfileListInfoKHR"; - case StructureType::ePhysicalDeviceVideoFormatInfoKHR: return "PhysicalDeviceVideoFormatInfoKHR"; - case StructureType::eVideoFormatPropertiesKHR: return "VideoFormatPropertiesKHR"; - case StructureType::eQueueFamilyQueryResultStatusPropertiesKHR: return "QueueFamilyQueryResultStatusPropertiesKHR"; - case StructureType::eVideoDecodeInfoKHR: return "VideoDecodeInfoKHR"; - case StructureType::eVideoDecodeCapabilitiesKHR: return "VideoDecodeCapabilitiesKHR"; - case StructureType::eVideoDecodeUsageInfoKHR: return "VideoDecodeUsageInfoKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case StructureType::eDedicatedAllocationImageCreateInfoNV: return "DedicatedAllocationImageCreateInfoNV"; - case StructureType::eDedicatedAllocationBufferCreateInfoNV: return "DedicatedAllocationBufferCreateInfoNV"; - case StructureType::eDedicatedAllocationMemoryAllocateInfoNV: return "DedicatedAllocationMemoryAllocateInfoNV"; - case StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT: return "PhysicalDeviceTransformFeedbackFeaturesEXT"; - case StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT: return "PhysicalDeviceTransformFeedbackPropertiesEXT"; - case StructureType::ePipelineRasterizationStateStreamCreateInfoEXT: return "PipelineRasterizationStateStreamCreateInfoEXT"; - case StructureType::eCuModuleCreateInfoNVX: return "CuModuleCreateInfoNVX"; - case StructureType::eCuFunctionCreateInfoNVX: return "CuFunctionCreateInfoNVX"; - case StructureType::eCuLaunchInfoNVX: return "CuLaunchInfoNVX"; - case StructureType::eImageViewHandleInfoNVX: return "ImageViewHandleInfoNVX"; - case StructureType::eImageViewAddressPropertiesNVX: return "ImageViewAddressPropertiesNVX"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case StructureType::eVideoEncodeH264CapabilitiesEXT: return "VideoEncodeH264CapabilitiesEXT"; - case StructureType::eVideoEncodeH264SessionParametersCreateInfoEXT: return "VideoEncodeH264SessionParametersCreateInfoEXT"; - case StructureType::eVideoEncodeH264SessionParametersAddInfoEXT: return "VideoEncodeH264SessionParametersAddInfoEXT"; - case StructureType::eVideoEncodeH264VclFrameInfoEXT: return "VideoEncodeH264VclFrameInfoEXT"; - case StructureType::eVideoEncodeH264DpbSlotInfoEXT: return "VideoEncodeH264DpbSlotInfoEXT"; - case StructureType::eVideoEncodeH264NaluSliceInfoEXT: return "VideoEncodeH264NaluSliceInfoEXT"; - case StructureType::eVideoEncodeH264EmitPictureParametersInfoEXT: return "VideoEncodeH264EmitPictureParametersInfoEXT"; - case StructureType::eVideoEncodeH264ProfileInfoEXT: return "VideoEncodeH264ProfileInfoEXT"; - case StructureType::eVideoEncodeH264RateControlInfoEXT: return "VideoEncodeH264RateControlInfoEXT"; - case StructureType::eVideoEncodeH264RateControlLayerInfoEXT: return "VideoEncodeH264RateControlLayerInfoEXT"; - case StructureType::eVideoEncodeH264ReferenceListsInfoEXT: return "VideoEncodeH264ReferenceListsInfoEXT"; - case StructureType::eVideoEncodeH265CapabilitiesEXT: return "VideoEncodeH265CapabilitiesEXT"; - case StructureType::eVideoEncodeH265SessionParametersCreateInfoEXT: return "VideoEncodeH265SessionParametersCreateInfoEXT"; - case StructureType::eVideoEncodeH265SessionParametersAddInfoEXT: return "VideoEncodeH265SessionParametersAddInfoEXT"; - case StructureType::eVideoEncodeH265VclFrameInfoEXT: return "VideoEncodeH265VclFrameInfoEXT"; - case StructureType::eVideoEncodeH265DpbSlotInfoEXT: return "VideoEncodeH265DpbSlotInfoEXT"; - case StructureType::eVideoEncodeH265NaluSliceSegmentInfoEXT: return "VideoEncodeH265NaluSliceSegmentInfoEXT"; - case StructureType::eVideoEncodeH265EmitPictureParametersInfoEXT: return "VideoEncodeH265EmitPictureParametersInfoEXT"; - case StructureType::eVideoEncodeH265ProfileInfoEXT: return "VideoEncodeH265ProfileInfoEXT"; - case StructureType::eVideoEncodeH265ReferenceListsInfoEXT: return "VideoEncodeH265ReferenceListsInfoEXT"; - case StructureType::eVideoEncodeH265RateControlInfoEXT: return "VideoEncodeH265RateControlInfoEXT"; - case StructureType::eVideoEncodeH265RateControlLayerInfoEXT: return "VideoEncodeH265RateControlLayerInfoEXT"; - case StructureType::eVideoDecodeH264CapabilitiesEXT: return "VideoDecodeH264CapabilitiesEXT"; - case StructureType::eVideoDecodeH264PictureInfoEXT: return "VideoDecodeH264PictureInfoEXT"; - case StructureType::eVideoDecodeH264MvcInfoEXT: return "VideoDecodeH264MvcInfoEXT"; - case StructureType::eVideoDecodeH264ProfileInfoEXT: return "VideoDecodeH264ProfileInfoEXT"; - case StructureType::eVideoDecodeH264SessionParametersCreateInfoEXT: return "VideoDecodeH264SessionParametersCreateInfoEXT"; - case StructureType::eVideoDecodeH264SessionParametersAddInfoEXT: return "VideoDecodeH264SessionParametersAddInfoEXT"; - case StructureType::eVideoDecodeH264DpbSlotInfoEXT: return "VideoDecodeH264DpbSlotInfoEXT"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case StructureType::eTextureLodGatherFormatPropertiesAMD: return "TextureLodGatherFormatPropertiesAMD"; - case StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR: return "RenderingFragmentShadingRateAttachmentInfoKHR"; - case StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT: return "RenderingFragmentDensityMapAttachmentInfoEXT"; - case StructureType::eAttachmentSampleCountInfoAMD: return "AttachmentSampleCountInfoAMD"; - case StructureType::eMultiviewPerViewAttributesInfoNVX: return "MultiviewPerViewAttributesInfoNVX"; -#if defined( VK_USE_PLATFORM_GGP ) - case StructureType::eStreamDescriptorSurfaceCreateInfoGGP: return "StreamDescriptorSurfaceCreateInfoGGP"; -#endif /*VK_USE_PLATFORM_GGP*/ - case StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV: return "PhysicalDeviceCornerSampledImageFeaturesNV"; - case StructureType::eExternalMemoryImageCreateInfoNV: return "ExternalMemoryImageCreateInfoNV"; - case StructureType::eExportMemoryAllocateInfoNV: return "ExportMemoryAllocateInfoNV"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eImportMemoryWin32HandleInfoNV: return "ImportMemoryWin32HandleInfoNV"; - case StructureType::eExportMemoryWin32HandleInfoNV: return "ExportMemoryWin32HandleInfoNV"; - case StructureType::eWin32KeyedMutexAcquireReleaseInfoNV: return "Win32KeyedMutexAcquireReleaseInfoNV"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eValidationFlagsEXT: return "ValidationFlagsEXT"; -#if defined( VK_USE_PLATFORM_VI_NN ) - case StructureType::eViSurfaceCreateInfoNN: return "ViSurfaceCreateInfoNN"; -#endif /*VK_USE_PLATFORM_VI_NN*/ - case StructureType::eImageViewAstcDecodeModeEXT: return "ImageViewAstcDecodeModeEXT"; - case StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT: return "PhysicalDeviceAstcDecodeFeaturesEXT"; - case StructureType::ePipelineRobustnessCreateInfoEXT: return "PipelineRobustnessCreateInfoEXT"; - case StructureType::ePhysicalDevicePipelineRobustnessFeaturesEXT: return "PhysicalDevicePipelineRobustnessFeaturesEXT"; - case StructureType::ePhysicalDevicePipelineRobustnessPropertiesEXT: return "PhysicalDevicePipelineRobustnessPropertiesEXT"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eImportMemoryWin32HandleInfoKHR: return "ImportMemoryWin32HandleInfoKHR"; - case StructureType::eExportMemoryWin32HandleInfoKHR: return "ExportMemoryWin32HandleInfoKHR"; - case StructureType::eMemoryWin32HandlePropertiesKHR: return "MemoryWin32HandlePropertiesKHR"; - case StructureType::eMemoryGetWin32HandleInfoKHR: return "MemoryGetWin32HandleInfoKHR"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eImportMemoryFdInfoKHR: return "ImportMemoryFdInfoKHR"; - case StructureType::eMemoryFdPropertiesKHR: return "MemoryFdPropertiesKHR"; - case StructureType::eMemoryGetFdInfoKHR: return "MemoryGetFdInfoKHR"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR: return "Win32KeyedMutexAcquireReleaseInfoKHR"; - case StructureType::eImportSemaphoreWin32HandleInfoKHR: return "ImportSemaphoreWin32HandleInfoKHR"; - case StructureType::eExportSemaphoreWin32HandleInfoKHR: return "ExportSemaphoreWin32HandleInfoKHR"; - case StructureType::eD3D12FenceSubmitInfoKHR: return "D3D12FenceSubmitInfoKHR"; - case StructureType::eSemaphoreGetWin32HandleInfoKHR: return "SemaphoreGetWin32HandleInfoKHR"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eImportSemaphoreFdInfoKHR: return "ImportSemaphoreFdInfoKHR"; - case StructureType::eSemaphoreGetFdInfoKHR: return "SemaphoreGetFdInfoKHR"; - case StructureType::ePhysicalDevicePushDescriptorPropertiesKHR: return "PhysicalDevicePushDescriptorPropertiesKHR"; - case StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT: return "CommandBufferInheritanceConditionalRenderingInfoEXT"; - case StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT: return "PhysicalDeviceConditionalRenderingFeaturesEXT"; - case StructureType::eConditionalRenderingBeginInfoEXT: return "ConditionalRenderingBeginInfoEXT"; - case StructureType::ePresentRegionsKHR: return "PresentRegionsKHR"; - case StructureType::ePipelineViewportWScalingStateCreateInfoNV: return "PipelineViewportWScalingStateCreateInfoNV"; - case StructureType::eSurfaceCapabilities2EXT: return "SurfaceCapabilities2EXT"; - case StructureType::eDisplayPowerInfoEXT: return "DisplayPowerInfoEXT"; - case StructureType::eDeviceEventInfoEXT: return "DeviceEventInfoEXT"; - case StructureType::eDisplayEventInfoEXT: return "DisplayEventInfoEXT"; - case StructureType::eSwapchainCounterCreateInfoEXT: return "SwapchainCounterCreateInfoEXT"; - case StructureType::ePresentTimesInfoGOOGLE: return "PresentTimesInfoGOOGLE"; - case StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX: return "PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX"; - case StructureType::ePipelineViewportSwizzleStateCreateInfoNV: return "PipelineViewportSwizzleStateCreateInfoNV"; - case StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT: return "PhysicalDeviceDiscardRectanglePropertiesEXT"; - case StructureType::ePipelineDiscardRectangleStateCreateInfoEXT: return "PipelineDiscardRectangleStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT: return "PhysicalDeviceConservativeRasterizationPropertiesEXT"; - case StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT: return "PipelineRasterizationConservativeStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT: return "PhysicalDeviceDepthClipEnableFeaturesEXT"; - case StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT: return "PipelineRasterizationDepthClipStateCreateInfoEXT"; - case StructureType::eHdrMetadataEXT: return "HdrMetadataEXT"; - case StructureType::eSharedPresentSurfaceCapabilitiesKHR: return "SharedPresentSurfaceCapabilitiesKHR"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eImportFenceWin32HandleInfoKHR: return "ImportFenceWin32HandleInfoKHR"; - case StructureType::eExportFenceWin32HandleInfoKHR: return "ExportFenceWin32HandleInfoKHR"; - case StructureType::eFenceGetWin32HandleInfoKHR: return "FenceGetWin32HandleInfoKHR"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eImportFenceFdInfoKHR: return "ImportFenceFdInfoKHR"; - case StructureType::eFenceGetFdInfoKHR: return "FenceGetFdInfoKHR"; - case StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR: return "PhysicalDevicePerformanceQueryFeaturesKHR"; - case StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR: return "PhysicalDevicePerformanceQueryPropertiesKHR"; - case StructureType::eQueryPoolPerformanceCreateInfoKHR: return "QueryPoolPerformanceCreateInfoKHR"; - case StructureType::ePerformanceQuerySubmitInfoKHR: return "PerformanceQuerySubmitInfoKHR"; - case StructureType::eAcquireProfilingLockInfoKHR: return "AcquireProfilingLockInfoKHR"; - case StructureType::ePerformanceCounterKHR: return "PerformanceCounterKHR"; - case StructureType::ePerformanceCounterDescriptionKHR: return "PerformanceCounterDescriptionKHR"; - case StructureType::ePhysicalDeviceSurfaceInfo2KHR: return "PhysicalDeviceSurfaceInfo2KHR"; - case StructureType::eSurfaceCapabilities2KHR: return "SurfaceCapabilities2KHR"; - case StructureType::eSurfaceFormat2KHR: return "SurfaceFormat2KHR"; - case StructureType::eDisplayProperties2KHR: return "DisplayProperties2KHR"; - case StructureType::eDisplayPlaneProperties2KHR: return "DisplayPlaneProperties2KHR"; - case StructureType::eDisplayModeProperties2KHR: return "DisplayModeProperties2KHR"; - case StructureType::eDisplayPlaneInfo2KHR: return "DisplayPlaneInfo2KHR"; - case StructureType::eDisplayPlaneCapabilities2KHR: return "DisplayPlaneCapabilities2KHR"; -#if defined( VK_USE_PLATFORM_IOS_MVK ) - case StructureType::eIosSurfaceCreateInfoMVK: return "IosSurfaceCreateInfoMVK"; -#endif /*VK_USE_PLATFORM_IOS_MVK*/ -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - case StructureType::eMacosSurfaceCreateInfoMVK: return "MacosSurfaceCreateInfoMVK"; -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - case StructureType::eDebugUtilsObjectNameInfoEXT: return "DebugUtilsObjectNameInfoEXT"; - case StructureType::eDebugUtilsObjectTagInfoEXT: return "DebugUtilsObjectTagInfoEXT"; - case StructureType::eDebugUtilsLabelEXT: return "DebugUtilsLabelEXT"; - case StructureType::eDebugUtilsMessengerCallbackDataEXT: return "DebugUtilsMessengerCallbackDataEXT"; - case StructureType::eDebugUtilsMessengerCreateInfoEXT: return "DebugUtilsMessengerCreateInfoEXT"; -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - case StructureType::eAndroidHardwareBufferUsageANDROID: return "AndroidHardwareBufferUsageANDROID"; - case StructureType::eAndroidHardwareBufferPropertiesANDROID: return "AndroidHardwareBufferPropertiesANDROID"; - case StructureType::eAndroidHardwareBufferFormatPropertiesANDROID: return "AndroidHardwareBufferFormatPropertiesANDROID"; - case StructureType::eImportAndroidHardwareBufferInfoANDROID: return "ImportAndroidHardwareBufferInfoANDROID"; - case StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID: return "MemoryGetAndroidHardwareBufferInfoANDROID"; - case StructureType::eExternalFormatANDROID: return "ExternalFormatANDROID"; - case StructureType::eAndroidHardwareBufferFormatProperties2ANDROID: return "AndroidHardwareBufferFormatProperties2ANDROID"; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - case StructureType::eSampleLocationsInfoEXT: return "SampleLocationsInfoEXT"; - case StructureType::eRenderPassSampleLocationsBeginInfoEXT: return "RenderPassSampleLocationsBeginInfoEXT"; - case StructureType::ePipelineSampleLocationsStateCreateInfoEXT: return "PipelineSampleLocationsStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT: return "PhysicalDeviceSampleLocationsPropertiesEXT"; - case StructureType::eMultisamplePropertiesEXT: return "MultisamplePropertiesEXT"; - case StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT: return "PhysicalDeviceBlendOperationAdvancedFeaturesEXT"; - case StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT: return "PhysicalDeviceBlendOperationAdvancedPropertiesEXT"; - case StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT: return "PipelineColorBlendAdvancedStateCreateInfoEXT"; - case StructureType::ePipelineCoverageToColorStateCreateInfoNV: return "PipelineCoverageToColorStateCreateInfoNV"; - case StructureType::eWriteDescriptorSetAccelerationStructureKHR: return "WriteDescriptorSetAccelerationStructureKHR"; - case StructureType::eAccelerationStructureBuildGeometryInfoKHR: return "AccelerationStructureBuildGeometryInfoKHR"; - case StructureType::eAccelerationStructureDeviceAddressInfoKHR: return "AccelerationStructureDeviceAddressInfoKHR"; - case StructureType::eAccelerationStructureGeometryAabbsDataKHR: return "AccelerationStructureGeometryAabbsDataKHR"; - case StructureType::eAccelerationStructureGeometryInstancesDataKHR: return "AccelerationStructureGeometryInstancesDataKHR"; - case StructureType::eAccelerationStructureGeometryTrianglesDataKHR: return "AccelerationStructureGeometryTrianglesDataKHR"; - case StructureType::eAccelerationStructureGeometryKHR: return "AccelerationStructureGeometryKHR"; - case StructureType::eAccelerationStructureVersionInfoKHR: return "AccelerationStructureVersionInfoKHR"; - case StructureType::eCopyAccelerationStructureInfoKHR: return "CopyAccelerationStructureInfoKHR"; - case StructureType::eCopyAccelerationStructureToMemoryInfoKHR: return "CopyAccelerationStructureToMemoryInfoKHR"; - case StructureType::eCopyMemoryToAccelerationStructureInfoKHR: return "CopyMemoryToAccelerationStructureInfoKHR"; - case StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR: return "PhysicalDeviceAccelerationStructureFeaturesKHR"; - case StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR: return "PhysicalDeviceAccelerationStructurePropertiesKHR"; - case StructureType::eAccelerationStructureCreateInfoKHR: return "AccelerationStructureCreateInfoKHR"; - case StructureType::eAccelerationStructureBuildSizesInfoKHR: return "AccelerationStructureBuildSizesInfoKHR"; - case StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR: return "PhysicalDeviceRayTracingPipelineFeaturesKHR"; - case StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR: return "PhysicalDeviceRayTracingPipelinePropertiesKHR"; - case StructureType::eRayTracingPipelineCreateInfoKHR: return "RayTracingPipelineCreateInfoKHR"; - case StructureType::eRayTracingShaderGroupCreateInfoKHR: return "RayTracingShaderGroupCreateInfoKHR"; - case StructureType::eRayTracingPipelineInterfaceCreateInfoKHR: return "RayTracingPipelineInterfaceCreateInfoKHR"; - case StructureType::ePhysicalDeviceRayQueryFeaturesKHR: return "PhysicalDeviceRayQueryFeaturesKHR"; - case StructureType::ePipelineCoverageModulationStateCreateInfoNV: return "PipelineCoverageModulationStateCreateInfoNV"; - case StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV: return "PhysicalDeviceShaderSmBuiltinsFeaturesNV"; - case StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV: return "PhysicalDeviceShaderSmBuiltinsPropertiesNV"; - case StructureType::eDrmFormatModifierPropertiesListEXT: return "DrmFormatModifierPropertiesListEXT"; - case StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT: return "PhysicalDeviceImageDrmFormatModifierInfoEXT"; - case StructureType::eImageDrmFormatModifierListCreateInfoEXT: return "ImageDrmFormatModifierListCreateInfoEXT"; - case StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT: return "ImageDrmFormatModifierExplicitCreateInfoEXT"; - case StructureType::eImageDrmFormatModifierPropertiesEXT: return "ImageDrmFormatModifierPropertiesEXT"; - case StructureType::eDrmFormatModifierPropertiesList2EXT: return "DrmFormatModifierPropertiesList2EXT"; - case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT"; - case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR: return "PhysicalDevicePortabilitySubsetFeaturesKHR"; - case StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR: return "PhysicalDevicePortabilitySubsetPropertiesKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV: return "PipelineViewportShadingRateImageStateCreateInfoNV"; - case StructureType::ePhysicalDeviceShadingRateImageFeaturesNV: return "PhysicalDeviceShadingRateImageFeaturesNV"; - case StructureType::ePhysicalDeviceShadingRateImagePropertiesNV: return "PhysicalDeviceShadingRateImagePropertiesNV"; - case StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV: return "PipelineViewportCoarseSampleOrderStateCreateInfoNV"; - case StructureType::eRayTracingPipelineCreateInfoNV: return "RayTracingPipelineCreateInfoNV"; - case StructureType::eAccelerationStructureCreateInfoNV: return "AccelerationStructureCreateInfoNV"; - case StructureType::eGeometryNV: return "GeometryNV"; - case StructureType::eGeometryTrianglesNV: return "GeometryTrianglesNV"; - case StructureType::eGeometryAabbNV: return "GeometryAabbNV"; - case StructureType::eBindAccelerationStructureMemoryInfoNV: return "BindAccelerationStructureMemoryInfoNV"; - case StructureType::eWriteDescriptorSetAccelerationStructureNV: return "WriteDescriptorSetAccelerationStructureNV"; - case StructureType::eAccelerationStructureMemoryRequirementsInfoNV: return "AccelerationStructureMemoryRequirementsInfoNV"; - case StructureType::ePhysicalDeviceRayTracingPropertiesNV: return "PhysicalDeviceRayTracingPropertiesNV"; - case StructureType::eRayTracingShaderGroupCreateInfoNV: return "RayTracingShaderGroupCreateInfoNV"; - case StructureType::eAccelerationStructureInfoNV: return "AccelerationStructureInfoNV"; - case StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV: return "PhysicalDeviceRepresentativeFragmentTestFeaturesNV"; - case StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV: return "PipelineRepresentativeFragmentTestStateCreateInfoNV"; - case StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT: return "PhysicalDeviceImageViewImageFormatInfoEXT"; - case StructureType::eFilterCubicImageViewImageFormatPropertiesEXT: return "FilterCubicImageViewImageFormatPropertiesEXT"; - case StructureType::eImportMemoryHostPointerInfoEXT: return "ImportMemoryHostPointerInfoEXT"; - case StructureType::eMemoryHostPointerPropertiesEXT: return "MemoryHostPointerPropertiesEXT"; - case StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT: return "PhysicalDeviceExternalMemoryHostPropertiesEXT"; - case StructureType::ePhysicalDeviceShaderClockFeaturesKHR: return "PhysicalDeviceShaderClockFeaturesKHR"; - case StructureType::ePipelineCompilerControlCreateInfoAMD: return "PipelineCompilerControlCreateInfoAMD"; - case StructureType::eCalibratedTimestampInfoEXT: return "CalibratedTimestampInfoEXT"; - case StructureType::ePhysicalDeviceShaderCorePropertiesAMD: return "PhysicalDeviceShaderCorePropertiesAMD"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case StructureType::eVideoDecodeH265CapabilitiesEXT: return "VideoDecodeH265CapabilitiesEXT"; - case StructureType::eVideoDecodeH265SessionParametersCreateInfoEXT: return "VideoDecodeH265SessionParametersCreateInfoEXT"; - case StructureType::eVideoDecodeH265SessionParametersAddInfoEXT: return "VideoDecodeH265SessionParametersAddInfoEXT"; - case StructureType::eVideoDecodeH265ProfileInfoEXT: return "VideoDecodeH265ProfileInfoEXT"; - case StructureType::eVideoDecodeH265PictureInfoEXT: return "VideoDecodeH265PictureInfoEXT"; - case StructureType::eVideoDecodeH265DpbSlotInfoEXT: return "VideoDecodeH265DpbSlotInfoEXT"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case StructureType::eDeviceQueueGlobalPriorityCreateInfoKHR: return "DeviceQueueGlobalPriorityCreateInfoKHR"; - case StructureType::ePhysicalDeviceGlobalPriorityQueryFeaturesKHR: return "PhysicalDeviceGlobalPriorityQueryFeaturesKHR"; - case StructureType::eQueueFamilyGlobalPriorityPropertiesKHR: return "QueueFamilyGlobalPriorityPropertiesKHR"; - case StructureType::eDeviceMemoryOverallocationCreateInfoAMD: return "DeviceMemoryOverallocationCreateInfoAMD"; - case StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT: return "PhysicalDeviceVertexAttributeDivisorPropertiesEXT"; - case StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT: return "PipelineVertexInputDivisorStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT: return "PhysicalDeviceVertexAttributeDivisorFeaturesEXT"; -#if defined( VK_USE_PLATFORM_GGP ) - case StructureType::ePresentFrameTokenGGP: return "PresentFrameTokenGGP"; -#endif /*VK_USE_PLATFORM_GGP*/ - case StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV: return "PhysicalDeviceComputeShaderDerivativesFeaturesNV"; - case StructureType::ePhysicalDeviceMeshShaderFeaturesNV: return "PhysicalDeviceMeshShaderFeaturesNV"; - case StructureType::ePhysicalDeviceMeshShaderPropertiesNV: return "PhysicalDeviceMeshShaderPropertiesNV"; - case StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV: return "PhysicalDeviceShaderImageFootprintFeaturesNV"; - case StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV: return "PipelineViewportExclusiveScissorStateCreateInfoNV"; - case StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV: return "PhysicalDeviceExclusiveScissorFeaturesNV"; - case StructureType::eCheckpointDataNV: return "CheckpointDataNV"; - case StructureType::eQueueFamilyCheckpointPropertiesNV: return "QueueFamilyCheckpointPropertiesNV"; - case StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL: return "PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL"; - case StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL: return "QueryPoolPerformanceQueryCreateInfoINTEL"; - case StructureType::eInitializePerformanceApiInfoINTEL: return "InitializePerformanceApiInfoINTEL"; - case StructureType::ePerformanceMarkerInfoINTEL: return "PerformanceMarkerInfoINTEL"; - case StructureType::ePerformanceStreamMarkerInfoINTEL: return "PerformanceStreamMarkerInfoINTEL"; - case StructureType::ePerformanceOverrideInfoINTEL: return "PerformanceOverrideInfoINTEL"; - case StructureType::ePerformanceConfigurationAcquireInfoINTEL: return "PerformanceConfigurationAcquireInfoINTEL"; - case StructureType::ePhysicalDevicePciBusInfoPropertiesEXT: return "PhysicalDevicePciBusInfoPropertiesEXT"; - case StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD: return "DisplayNativeHdrSurfaceCapabilitiesAMD"; - case StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD: return "SwapchainDisplayNativeHdrCreateInfoAMD"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case StructureType::eImagepipeSurfaceCreateInfoFUCHSIA: return "ImagepipeSurfaceCreateInfoFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ -#if defined( VK_USE_PLATFORM_METAL_EXT ) - case StructureType::eMetalSurfaceCreateInfoEXT: return "MetalSurfaceCreateInfoEXT"; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - case StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT: return "PhysicalDeviceFragmentDensityMapFeaturesEXT"; - case StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT: return "PhysicalDeviceFragmentDensityMapPropertiesEXT"; - case StructureType::eRenderPassFragmentDensityMapCreateInfoEXT: return "RenderPassFragmentDensityMapCreateInfoEXT"; - case StructureType::eFragmentShadingRateAttachmentInfoKHR: return "FragmentShadingRateAttachmentInfoKHR"; - case StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR: return "PipelineFragmentShadingRateStateCreateInfoKHR"; - case StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR: return "PhysicalDeviceFragmentShadingRatePropertiesKHR"; - case StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR: return "PhysicalDeviceFragmentShadingRateFeaturesKHR"; - case StructureType::ePhysicalDeviceFragmentShadingRateKHR: return "PhysicalDeviceFragmentShadingRateKHR"; - case StructureType::ePhysicalDeviceShaderCoreProperties2AMD: return "PhysicalDeviceShaderCoreProperties2AMD"; - case StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD: return "PhysicalDeviceCoherentMemoryFeaturesAMD"; - case StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT: return "PhysicalDeviceShaderImageAtomicInt64FeaturesEXT"; - case StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT: return "PhysicalDeviceMemoryBudgetPropertiesEXT"; - case StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT: return "PhysicalDeviceMemoryPriorityFeaturesEXT"; - case StructureType::eMemoryPriorityAllocateInfoEXT: return "MemoryPriorityAllocateInfoEXT"; - case StructureType::eSurfaceProtectedCapabilitiesKHR: return "SurfaceProtectedCapabilitiesKHR"; - case StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV: return "PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV"; - case StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT: return "PhysicalDeviceBufferDeviceAddressFeaturesEXT"; - case StructureType::eBufferDeviceAddressCreateInfoEXT: return "BufferDeviceAddressCreateInfoEXT"; - case StructureType::eValidationFeaturesEXT: return "ValidationFeaturesEXT"; - case StructureType::ePhysicalDevicePresentWaitFeaturesKHR: return "PhysicalDevicePresentWaitFeaturesKHR"; - case StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV: return "PhysicalDeviceCooperativeMatrixFeaturesNV"; - case StructureType::eCooperativeMatrixPropertiesNV: return "CooperativeMatrixPropertiesNV"; - case StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV: return "PhysicalDeviceCooperativeMatrixPropertiesNV"; - case StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV: return "PhysicalDeviceCoverageReductionModeFeaturesNV"; - case StructureType::ePipelineCoverageReductionStateCreateInfoNV: return "PipelineCoverageReductionStateCreateInfoNV"; - case StructureType::eFramebufferMixedSamplesCombinationNV: return "FramebufferMixedSamplesCombinationNV"; - case StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT: return "PhysicalDeviceFragmentShaderInterlockFeaturesEXT"; - case StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT: return "PhysicalDeviceYcbcrImageArraysFeaturesEXT"; - case StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT: return "PhysicalDeviceProvokingVertexFeaturesEXT"; - case StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT: return "PipelineRasterizationProvokingVertexStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT: return "PhysicalDeviceProvokingVertexPropertiesEXT"; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - case StructureType::eSurfaceFullScreenExclusiveInfoEXT: return "SurfaceFullScreenExclusiveInfoEXT"; - case StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT: return "SurfaceCapabilitiesFullScreenExclusiveEXT"; - case StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT: return "SurfaceFullScreenExclusiveWin32InfoEXT"; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - case StructureType::eHeadlessSurfaceCreateInfoEXT: return "HeadlessSurfaceCreateInfoEXT"; - case StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT: return "PhysicalDeviceLineRasterizationFeaturesEXT"; - case StructureType::ePipelineRasterizationLineStateCreateInfoEXT: return "PipelineRasterizationLineStateCreateInfoEXT"; - case StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT: return "PhysicalDeviceLineRasterizationPropertiesEXT"; - case StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT: return "PhysicalDeviceShaderAtomicFloatFeaturesEXT"; - case StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT: return "PhysicalDeviceIndexTypeUint8FeaturesEXT"; - case StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT: return "PhysicalDeviceExtendedDynamicStateFeaturesEXT"; - case StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR: return "PhysicalDevicePipelineExecutablePropertiesFeaturesKHR"; - case StructureType::ePipelineInfoKHR: return "PipelineInfoKHR"; - case StructureType::ePipelineExecutablePropertiesKHR: return "PipelineExecutablePropertiesKHR"; - case StructureType::ePipelineExecutableInfoKHR: return "PipelineExecutableInfoKHR"; - case StructureType::ePipelineExecutableStatisticKHR: return "PipelineExecutableStatisticKHR"; - case StructureType::ePipelineExecutableInternalRepresentationKHR: return "PipelineExecutableInternalRepresentationKHR"; - case StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT: return "PhysicalDeviceShaderAtomicFloat2FeaturesEXT"; - case StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV: return "PhysicalDeviceDeviceGeneratedCommandsPropertiesNV"; - case StructureType::eGraphicsShaderGroupCreateInfoNV: return "GraphicsShaderGroupCreateInfoNV"; - case StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV: return "GraphicsPipelineShaderGroupsCreateInfoNV"; - case StructureType::eIndirectCommandsLayoutTokenNV: return "IndirectCommandsLayoutTokenNV"; - case StructureType::eIndirectCommandsLayoutCreateInfoNV: return "IndirectCommandsLayoutCreateInfoNV"; - case StructureType::eGeneratedCommandsInfoNV: return "GeneratedCommandsInfoNV"; - case StructureType::eGeneratedCommandsMemoryRequirementsInfoNV: return "GeneratedCommandsMemoryRequirementsInfoNV"; - case StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV: return "PhysicalDeviceDeviceGeneratedCommandsFeaturesNV"; - case StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV: return "PhysicalDeviceInheritedViewportScissorFeaturesNV"; - case StructureType::eCommandBufferInheritanceViewportScissorInfoNV: return "CommandBufferInheritanceViewportScissorInfoNV"; - case StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT: return "PhysicalDeviceTexelBufferAlignmentFeaturesEXT"; - case StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM: return "CommandBufferInheritanceRenderPassTransformInfoQCOM"; - case StructureType::eRenderPassTransformBeginInfoQCOM: return "RenderPassTransformBeginInfoQCOM"; - case StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT: return "PhysicalDeviceDeviceMemoryReportFeaturesEXT"; - case StructureType::eDeviceDeviceMemoryReportCreateInfoEXT: return "DeviceDeviceMemoryReportCreateInfoEXT"; - case StructureType::eDeviceMemoryReportCallbackDataEXT: return "DeviceMemoryReportCallbackDataEXT"; - case StructureType::ePhysicalDeviceRobustness2FeaturesEXT: return "PhysicalDeviceRobustness2FeaturesEXT"; - case StructureType::ePhysicalDeviceRobustness2PropertiesEXT: return "PhysicalDeviceRobustness2PropertiesEXT"; - case StructureType::eSamplerCustomBorderColorCreateInfoEXT: return "SamplerCustomBorderColorCreateInfoEXT"; - case StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT: return "PhysicalDeviceCustomBorderColorPropertiesEXT"; - case StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT: return "PhysicalDeviceCustomBorderColorFeaturesEXT"; - case StructureType::ePipelineLibraryCreateInfoKHR: return "PipelineLibraryCreateInfoKHR"; - case StructureType::ePresentIdKHR: return "PresentIdKHR"; - case StructureType::ePhysicalDevicePresentIdFeaturesKHR: return "PhysicalDevicePresentIdFeaturesKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case StructureType::eVideoEncodeInfoKHR: return "VideoEncodeInfoKHR"; - case StructureType::eVideoEncodeRateControlInfoKHR: return "VideoEncodeRateControlInfoKHR"; - case StructureType::eVideoEncodeRateControlLayerInfoKHR: return "VideoEncodeRateControlLayerInfoKHR"; - case StructureType::eVideoEncodeCapabilitiesKHR: return "VideoEncodeCapabilitiesKHR"; - case StructureType::eVideoEncodeUsageInfoKHR: return "VideoEncodeUsageInfoKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV: return "PhysicalDeviceDiagnosticsConfigFeaturesNV"; - case StructureType::eDeviceDiagnosticsConfigCreateInfoNV: return "DeviceDiagnosticsConfigCreateInfoNV"; -#if defined( VK_USE_PLATFORM_METAL_EXT ) - case StructureType::eExportMetalObjectCreateInfoEXT: return "ExportMetalObjectCreateInfoEXT"; - case StructureType::eExportMetalObjectsInfoEXT: return "ExportMetalObjectsInfoEXT"; - case StructureType::eExportMetalDeviceInfoEXT: return "ExportMetalDeviceInfoEXT"; - case StructureType::eExportMetalCommandQueueInfoEXT: return "ExportMetalCommandQueueInfoEXT"; - case StructureType::eExportMetalBufferInfoEXT: return "ExportMetalBufferInfoEXT"; - case StructureType::eImportMetalBufferInfoEXT: return "ImportMetalBufferInfoEXT"; - case StructureType::eExportMetalTextureInfoEXT: return "ExportMetalTextureInfoEXT"; - case StructureType::eImportMetalTextureInfoEXT: return "ImportMetalTextureInfoEXT"; - case StructureType::eExportMetalIoSurfaceInfoEXT: return "ExportMetalIoSurfaceInfoEXT"; - case StructureType::eImportMetalIoSurfaceInfoEXT: return "ImportMetalIoSurfaceInfoEXT"; - case StructureType::eExportMetalSharedEventInfoEXT: return "ExportMetalSharedEventInfoEXT"; - case StructureType::eImportMetalSharedEventInfoEXT: return "ImportMetalSharedEventInfoEXT"; -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - case StructureType::eQueueFamilyCheckpointProperties2NV: return "QueueFamilyCheckpointProperties2NV"; - case StructureType::eCheckpointData2NV: return "CheckpointData2NV"; - case StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT: return "PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT"; - case StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT: return "PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT"; - case StructureType::eGraphicsPipelineLibraryCreateInfoEXT: return "GraphicsPipelineLibraryCreateInfoEXT"; - case StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD: return "PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD"; - case StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR: return "PhysicalDeviceFragmentShaderBarycentricFeaturesKHR"; - case StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR: return "PhysicalDeviceFragmentShaderBarycentricPropertiesKHR"; - case StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR: return "PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR"; - case StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV: return "PhysicalDeviceFragmentShadingRateEnumsPropertiesNV"; - case StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV: return "PhysicalDeviceFragmentShadingRateEnumsFeaturesNV"; - case StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV: return "PipelineFragmentShadingRateEnumStateCreateInfoNV"; - case StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV: return "AccelerationStructureGeometryMotionTrianglesDataNV"; - case StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV: return "PhysicalDeviceRayTracingMotionBlurFeaturesNV"; - case StructureType::eAccelerationStructureMotionInfoNV: return "AccelerationStructureMotionInfoNV"; - case StructureType::ePhysicalDeviceMeshShaderFeaturesEXT: return "PhysicalDeviceMeshShaderFeaturesEXT"; - case StructureType::ePhysicalDeviceMeshShaderPropertiesEXT: return "PhysicalDeviceMeshShaderPropertiesEXT"; - case StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT: return "PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT"; - case StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT: return "PhysicalDeviceFragmentDensityMap2FeaturesEXT"; - case StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT: return "PhysicalDeviceFragmentDensityMap2PropertiesEXT"; - case StructureType::eCopyCommandTransformInfoQCOM: return "CopyCommandTransformInfoQCOM"; - case StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR: return "PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR"; - case StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT: return "PhysicalDeviceImageCompressionControlFeaturesEXT"; - case StructureType::eImageCompressionControlEXT: return "ImageCompressionControlEXT"; - case StructureType::eSubresourceLayout2EXT: return "SubresourceLayout2EXT"; - case StructureType::eImageSubresource2EXT: return "ImageSubresource2EXT"; - case StructureType::eImageCompressionPropertiesEXT: return "ImageCompressionPropertiesEXT"; - case StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT: return "PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT"; - case StructureType::ePhysicalDevice4444FormatsFeaturesEXT: return "PhysicalDevice4444FormatsFeaturesEXT"; - case StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT: return "PhysicalDeviceRgba10X6FormatsFeaturesEXT"; -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - case StructureType::eDirectfbSurfaceCreateInfoEXT: return "DirectfbSurfaceCreateInfoEXT"; -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - case StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesVALVE: return "PhysicalDeviceMutableDescriptorTypeFeaturesVALVE"; - case StructureType::eMutableDescriptorTypeCreateInfoVALVE: return "MutableDescriptorTypeCreateInfoVALVE"; - case StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT: return "PhysicalDeviceVertexInputDynamicStateFeaturesEXT"; - case StructureType::eVertexInputBindingDescription2EXT: return "VertexInputBindingDescription2EXT"; - case StructureType::eVertexInputAttributeDescription2EXT: return "VertexInputAttributeDescription2EXT"; - case StructureType::ePhysicalDeviceDrmPropertiesEXT: return "PhysicalDeviceDrmPropertiesEXT"; - case StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT: return "PhysicalDeviceDepthClipControlFeaturesEXT"; - case StructureType::ePipelineViewportDepthClipControlCreateInfoEXT: return "PipelineViewportDepthClipControlCreateInfoEXT"; - case StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT: return "PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case StructureType::eImportMemoryZirconHandleInfoFUCHSIA: return "ImportMemoryZirconHandleInfoFUCHSIA"; - case StructureType::eMemoryZirconHandlePropertiesFUCHSIA: return "MemoryZirconHandlePropertiesFUCHSIA"; - case StructureType::eMemoryGetZirconHandleInfoFUCHSIA: return "MemoryGetZirconHandleInfoFUCHSIA"; - case StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA: return "ImportSemaphoreZirconHandleInfoFUCHSIA"; - case StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA: return "SemaphoreGetZirconHandleInfoFUCHSIA"; - case StructureType::eBufferCollectionCreateInfoFUCHSIA: return "BufferCollectionCreateInfoFUCHSIA"; - case StructureType::eImportMemoryBufferCollectionFUCHSIA: return "ImportMemoryBufferCollectionFUCHSIA"; - case StructureType::eBufferCollectionImageCreateInfoFUCHSIA: return "BufferCollectionImageCreateInfoFUCHSIA"; - case StructureType::eBufferCollectionPropertiesFUCHSIA: return "BufferCollectionPropertiesFUCHSIA"; - case StructureType::eBufferConstraintsInfoFUCHSIA: return "BufferConstraintsInfoFUCHSIA"; - case StructureType::eBufferCollectionBufferCreateInfoFUCHSIA: return "BufferCollectionBufferCreateInfoFUCHSIA"; - case StructureType::eImageConstraintsInfoFUCHSIA: return "ImageConstraintsInfoFUCHSIA"; - case StructureType::eImageFormatConstraintsInfoFUCHSIA: return "ImageFormatConstraintsInfoFUCHSIA"; - case StructureType::eSysmemColorSpaceFUCHSIA: return "SysmemColorSpaceFUCHSIA"; - case StructureType::eBufferCollectionConstraintsInfoFUCHSIA: return "BufferCollectionConstraintsInfoFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - case StructureType::eSubpassShadingPipelineCreateInfoHUAWEI: return "SubpassShadingPipelineCreateInfoHUAWEI"; - case StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI: return "PhysicalDeviceSubpassShadingFeaturesHUAWEI"; - case StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI: return "PhysicalDeviceSubpassShadingPropertiesHUAWEI"; - case StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI: return "PhysicalDeviceInvocationMaskFeaturesHUAWEI"; - case StructureType::eMemoryGetRemoteAddressInfoNV: return "MemoryGetRemoteAddressInfoNV"; - case StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV: return "PhysicalDeviceExternalMemoryRdmaFeaturesNV"; - case StructureType::ePipelinePropertiesIdentifierEXT: return "PipelinePropertiesIdentifierEXT"; - case StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT: return "PhysicalDevicePipelinePropertiesFeaturesEXT"; - case StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT: return "PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT"; - case StructureType::eSubpassResolvePerformanceQueryEXT: return "SubpassResolvePerformanceQueryEXT"; - case StructureType::eMultisampledRenderToSingleSampledInfoEXT: return "MultisampledRenderToSingleSampledInfoEXT"; - case StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT: return "PhysicalDeviceExtendedDynamicState2FeaturesEXT"; -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - case StructureType::eScreenSurfaceCreateInfoQNX: return "ScreenSurfaceCreateInfoQNX"; -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - case StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT: return "PhysicalDeviceColorWriteEnableFeaturesEXT"; - case StructureType::ePipelineColorWriteCreateInfoEXT: return "PipelineColorWriteCreateInfoEXT"; - case StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT: return "PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT"; - case StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR: return "PhysicalDeviceRayTracingMaintenance1FeaturesKHR"; - case StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT: return "PhysicalDeviceImageViewMinLodFeaturesEXT"; - case StructureType::eImageViewMinLodCreateInfoEXT: return "ImageViewMinLodCreateInfoEXT"; - case StructureType::ePhysicalDeviceMultiDrawFeaturesEXT: return "PhysicalDeviceMultiDrawFeaturesEXT"; - case StructureType::ePhysicalDeviceMultiDrawPropertiesEXT: return "PhysicalDeviceMultiDrawPropertiesEXT"; - case StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT: return "PhysicalDeviceImage2DViewOf3DFeaturesEXT"; - case StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT: return "PhysicalDeviceBorderColorSwizzleFeaturesEXT"; - case StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT: return "SamplerBorderColorComponentMappingCreateInfoEXT"; - case StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT: return "PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT"; - case StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE: return "PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE"; - case StructureType::eDescriptorSetBindingReferenceVALVE: return "DescriptorSetBindingReferenceVALVE"; - case StructureType::eDescriptorSetLayoutHostMappingInfoVALVE: return "DescriptorSetLayoutHostMappingInfoVALVE"; - case StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesEXT: return "PhysicalDeviceDepthClampZeroOneFeaturesEXT"; - case StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT: return "PhysicalDeviceNonSeamlessCubeMapFeaturesEXT"; - case StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM: return "PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM"; - case StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM: return "PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM"; - case StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM: return "SubpassFragmentDensityMapOffsetEndInfoQCOM"; - case StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV: return "PhysicalDeviceLinearColorAttachmentFeaturesNV"; - case StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT: return "PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT"; - case StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM: return "PhysicalDeviceImageProcessingFeaturesQCOM"; - case StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM: return "PhysicalDeviceImageProcessingPropertiesQCOM"; - case StructureType::eImageViewSampleWeightCreateInfoQCOM: return "ImageViewSampleWeightCreateInfoQCOM"; - case StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT: return "PhysicalDeviceSubpassMergeFeedbackFeaturesEXT"; - case StructureType::eRenderPassCreationControlEXT: return "RenderPassCreationControlEXT"; - case StructureType::eRenderPassCreationFeedbackCreateInfoEXT: return "RenderPassCreationFeedbackCreateInfoEXT"; - case StructureType::eRenderPassSubpassFeedbackCreateInfoEXT: return "RenderPassSubpassFeedbackCreateInfoEXT"; - case StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT: return "PhysicalDeviceShaderModuleIdentifierFeaturesEXT"; - case StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT: return "PhysicalDeviceShaderModuleIdentifierPropertiesEXT"; - case StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT: return "PipelineShaderStageModuleIdentifierCreateInfoEXT"; - case StructureType::eShaderModuleIdentifierEXT: return "ShaderModuleIdentifierEXT"; - case StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT: return "PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT"; - case StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT: return "PhysicalDeviceLegacyDitheringFeaturesEXT"; - case StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM: return "PhysicalDeviceTilePropertiesFeaturesQCOM"; - case StructureType::eTilePropertiesQCOM: return "TilePropertiesQCOM"; - case StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC: return "PhysicalDeviceAmigoProfilingFeaturesSEC"; - case StructureType::eAmigoProfilingSubmitInfoSEC: return "AmigoProfilingSubmitInfoSEC"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCacheHeaderVersion value ) - { - switch ( value ) - { - case PipelineCacheHeaderVersion::eOne: return "One"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ObjectType value ) - { - switch ( value ) - { - case ObjectType::eUnknown: return "Unknown"; - case ObjectType::eInstance: return "Instance"; - case ObjectType::ePhysicalDevice: return "PhysicalDevice"; - case ObjectType::eDevice: return "Device"; - case ObjectType::eQueue: return "Queue"; - case ObjectType::eSemaphore: return "Semaphore"; - case ObjectType::eCommandBuffer: return "CommandBuffer"; - case ObjectType::eFence: return "Fence"; - case ObjectType::eDeviceMemory: return "DeviceMemory"; - case ObjectType::eBuffer: return "Buffer"; - case ObjectType::eImage: return "Image"; - case ObjectType::eEvent: return "Event"; - case ObjectType::eQueryPool: return "QueryPool"; - case ObjectType::eBufferView: return "BufferView"; - case ObjectType::eImageView: return "ImageView"; - case ObjectType::eShaderModule: return "ShaderModule"; - case ObjectType::ePipelineCache: return "PipelineCache"; - case ObjectType::ePipelineLayout: return "PipelineLayout"; - case ObjectType::eRenderPass: return "RenderPass"; - case ObjectType::ePipeline: return "Pipeline"; - case ObjectType::eDescriptorSetLayout: return "DescriptorSetLayout"; - case ObjectType::eSampler: return "Sampler"; - case ObjectType::eDescriptorPool: return "DescriptorPool"; - case ObjectType::eDescriptorSet: return "DescriptorSet"; - case ObjectType::eFramebuffer: return "Framebuffer"; - case ObjectType::eCommandPool: return "CommandPool"; - case ObjectType::eSamplerYcbcrConversion: return "SamplerYcbcrConversion"; - case ObjectType::eDescriptorUpdateTemplate: return "DescriptorUpdateTemplate"; - case ObjectType::ePrivateDataSlot: return "PrivateDataSlot"; - case ObjectType::eSurfaceKHR: return "SurfaceKHR"; - case ObjectType::eSwapchainKHR: return "SwapchainKHR"; - case ObjectType::eDisplayKHR: return "DisplayKHR"; - case ObjectType::eDisplayModeKHR: return "DisplayModeKHR"; - case ObjectType::eDebugReportCallbackEXT: return "DebugReportCallbackEXT"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case ObjectType::eVideoSessionKHR: return "VideoSessionKHR"; - case ObjectType::eVideoSessionParametersKHR: return "VideoSessionParametersKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case ObjectType::eCuModuleNVX: return "CuModuleNVX"; - case ObjectType::eCuFunctionNVX: return "CuFunctionNVX"; - case ObjectType::eDebugUtilsMessengerEXT: return "DebugUtilsMessengerEXT"; - case ObjectType::eAccelerationStructureKHR: return "AccelerationStructureKHR"; - case ObjectType::eValidationCacheEXT: return "ValidationCacheEXT"; - case ObjectType::eAccelerationStructureNV: return "AccelerationStructureNV"; - case ObjectType::ePerformanceConfigurationINTEL: return "PerformanceConfigurationINTEL"; - case ObjectType::eDeferredOperationKHR: return "DeferredOperationKHR"; - case ObjectType::eIndirectCommandsLayoutNV: return "IndirectCommandsLayoutNV"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case ObjectType::eBufferCollectionFUCHSIA: return "BufferCollectionFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VendorId value ) - { - switch ( value ) - { - case VendorId::eVIV: return "VIV"; - case VendorId::eVSI: return "VSI"; - case VendorId::eKazan: return "Kazan"; - case VendorId::eCodeplay: return "Codeplay"; - case VendorId::eMESA: return "MESA"; - case VendorId::ePocl: return "Pocl"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( Format value ) - { - switch ( value ) - { - case Format::eUndefined: return "Undefined"; - case Format::eR4G4UnormPack8: return "R4G4UnormPack8"; - case Format::eR4G4B4A4UnormPack16: return "R4G4B4A4UnormPack16"; - case Format::eB4G4R4A4UnormPack16: return "B4G4R4A4UnormPack16"; - case Format::eR5G6B5UnormPack16: return "R5G6B5UnormPack16"; - case Format::eB5G6R5UnormPack16: return "B5G6R5UnormPack16"; - case Format::eR5G5B5A1UnormPack16: return "R5G5B5A1UnormPack16"; - case Format::eB5G5R5A1UnormPack16: return "B5G5R5A1UnormPack16"; - case Format::eA1R5G5B5UnormPack16: return "A1R5G5B5UnormPack16"; - case Format::eR8Unorm: return "R8Unorm"; - case Format::eR8Snorm: return "R8Snorm"; - case Format::eR8Uscaled: return "R8Uscaled"; - case Format::eR8Sscaled: return "R8Sscaled"; - case Format::eR8Uint: return "R8Uint"; - case Format::eR8Sint: return "R8Sint"; - case Format::eR8Srgb: return "R8Srgb"; - case Format::eR8G8Unorm: return "R8G8Unorm"; - case Format::eR8G8Snorm: return "R8G8Snorm"; - case Format::eR8G8Uscaled: return "R8G8Uscaled"; - case Format::eR8G8Sscaled: return "R8G8Sscaled"; - case Format::eR8G8Uint: return "R8G8Uint"; - case Format::eR8G8Sint: return "R8G8Sint"; - case Format::eR8G8Srgb: return "R8G8Srgb"; - case Format::eR8G8B8Unorm: return "R8G8B8Unorm"; - case Format::eR8G8B8Snorm: return "R8G8B8Snorm"; - case Format::eR8G8B8Uscaled: return "R8G8B8Uscaled"; - case Format::eR8G8B8Sscaled: return "R8G8B8Sscaled"; - case Format::eR8G8B8Uint: return "R8G8B8Uint"; - case Format::eR8G8B8Sint: return "R8G8B8Sint"; - case Format::eR8G8B8Srgb: return "R8G8B8Srgb"; - case Format::eB8G8R8Unorm: return "B8G8R8Unorm"; - case Format::eB8G8R8Snorm: return "B8G8R8Snorm"; - case Format::eB8G8R8Uscaled: return "B8G8R8Uscaled"; - case Format::eB8G8R8Sscaled: return "B8G8R8Sscaled"; - case Format::eB8G8R8Uint: return "B8G8R8Uint"; - case Format::eB8G8R8Sint: return "B8G8R8Sint"; - case Format::eB8G8R8Srgb: return "B8G8R8Srgb"; - case Format::eR8G8B8A8Unorm: return "R8G8B8A8Unorm"; - case Format::eR8G8B8A8Snorm: return "R8G8B8A8Snorm"; - case Format::eR8G8B8A8Uscaled: return "R8G8B8A8Uscaled"; - case Format::eR8G8B8A8Sscaled: return "R8G8B8A8Sscaled"; - case Format::eR8G8B8A8Uint: return "R8G8B8A8Uint"; - case Format::eR8G8B8A8Sint: return "R8G8B8A8Sint"; - case Format::eR8G8B8A8Srgb: return "R8G8B8A8Srgb"; - case Format::eB8G8R8A8Unorm: return "B8G8R8A8Unorm"; - case Format::eB8G8R8A8Snorm: return "B8G8R8A8Snorm"; - case Format::eB8G8R8A8Uscaled: return "B8G8R8A8Uscaled"; - case Format::eB8G8R8A8Sscaled: return "B8G8R8A8Sscaled"; - case Format::eB8G8R8A8Uint: return "B8G8R8A8Uint"; - case Format::eB8G8R8A8Sint: return "B8G8R8A8Sint"; - case Format::eB8G8R8A8Srgb: return "B8G8R8A8Srgb"; - case Format::eA8B8G8R8UnormPack32: return "A8B8G8R8UnormPack32"; - case Format::eA8B8G8R8SnormPack32: return "A8B8G8R8SnormPack32"; - case Format::eA8B8G8R8UscaledPack32: return "A8B8G8R8UscaledPack32"; - case Format::eA8B8G8R8SscaledPack32: return "A8B8G8R8SscaledPack32"; - case Format::eA8B8G8R8UintPack32: return "A8B8G8R8UintPack32"; - case Format::eA8B8G8R8SintPack32: return "A8B8G8R8SintPack32"; - case Format::eA8B8G8R8SrgbPack32: return "A8B8G8R8SrgbPack32"; - case Format::eA2R10G10B10UnormPack32: return "A2R10G10B10UnormPack32"; - case Format::eA2R10G10B10SnormPack32: return "A2R10G10B10SnormPack32"; - case Format::eA2R10G10B10UscaledPack32: return "A2R10G10B10UscaledPack32"; - case Format::eA2R10G10B10SscaledPack32: return "A2R10G10B10SscaledPack32"; - case Format::eA2R10G10B10UintPack32: return "A2R10G10B10UintPack32"; - case Format::eA2R10G10B10SintPack32: return "A2R10G10B10SintPack32"; - case Format::eA2B10G10R10UnormPack32: return "A2B10G10R10UnormPack32"; - case Format::eA2B10G10R10SnormPack32: return "A2B10G10R10SnormPack32"; - case Format::eA2B10G10R10UscaledPack32: return "A2B10G10R10UscaledPack32"; - case Format::eA2B10G10R10SscaledPack32: return "A2B10G10R10SscaledPack32"; - case Format::eA2B10G10R10UintPack32: return "A2B10G10R10UintPack32"; - case Format::eA2B10G10R10SintPack32: return "A2B10G10R10SintPack32"; - case Format::eR16Unorm: return "R16Unorm"; - case Format::eR16Snorm: return "R16Snorm"; - case Format::eR16Uscaled: return "R16Uscaled"; - case Format::eR16Sscaled: return "R16Sscaled"; - case Format::eR16Uint: return "R16Uint"; - case Format::eR16Sint: return "R16Sint"; - case Format::eR16Sfloat: return "R16Sfloat"; - case Format::eR16G16Unorm: return "R16G16Unorm"; - case Format::eR16G16Snorm: return "R16G16Snorm"; - case Format::eR16G16Uscaled: return "R16G16Uscaled"; - case Format::eR16G16Sscaled: return "R16G16Sscaled"; - case Format::eR16G16Uint: return "R16G16Uint"; - case Format::eR16G16Sint: return "R16G16Sint"; - case Format::eR16G16Sfloat: return "R16G16Sfloat"; - case Format::eR16G16B16Unorm: return "R16G16B16Unorm"; - case Format::eR16G16B16Snorm: return "R16G16B16Snorm"; - case Format::eR16G16B16Uscaled: return "R16G16B16Uscaled"; - case Format::eR16G16B16Sscaled: return "R16G16B16Sscaled"; - case Format::eR16G16B16Uint: return "R16G16B16Uint"; - case Format::eR16G16B16Sint: return "R16G16B16Sint"; - case Format::eR16G16B16Sfloat: return "R16G16B16Sfloat"; - case Format::eR16G16B16A16Unorm: return "R16G16B16A16Unorm"; - case Format::eR16G16B16A16Snorm: return "R16G16B16A16Snorm"; - case Format::eR16G16B16A16Uscaled: return "R16G16B16A16Uscaled"; - case Format::eR16G16B16A16Sscaled: return "R16G16B16A16Sscaled"; - case Format::eR16G16B16A16Uint: return "R16G16B16A16Uint"; - case Format::eR16G16B16A16Sint: return "R16G16B16A16Sint"; - case Format::eR16G16B16A16Sfloat: return "R16G16B16A16Sfloat"; - case Format::eR32Uint: return "R32Uint"; - case Format::eR32Sint: return "R32Sint"; - case Format::eR32Sfloat: return "R32Sfloat"; - case Format::eR32G32Uint: return "R32G32Uint"; - case Format::eR32G32Sint: return "R32G32Sint"; - case Format::eR32G32Sfloat: return "R32G32Sfloat"; - case Format::eR32G32B32Uint: return "R32G32B32Uint"; - case Format::eR32G32B32Sint: return "R32G32B32Sint"; - case Format::eR32G32B32Sfloat: return "R32G32B32Sfloat"; - case Format::eR32G32B32A32Uint: return "R32G32B32A32Uint"; - case Format::eR32G32B32A32Sint: return "R32G32B32A32Sint"; - case Format::eR32G32B32A32Sfloat: return "R32G32B32A32Sfloat"; - case Format::eR64Uint: return "R64Uint"; - case Format::eR64Sint: return "R64Sint"; - case Format::eR64Sfloat: return "R64Sfloat"; - case Format::eR64G64Uint: return "R64G64Uint"; - case Format::eR64G64Sint: return "R64G64Sint"; - case Format::eR64G64Sfloat: return "R64G64Sfloat"; - case Format::eR64G64B64Uint: return "R64G64B64Uint"; - case Format::eR64G64B64Sint: return "R64G64B64Sint"; - case Format::eR64G64B64Sfloat: return "R64G64B64Sfloat"; - case Format::eR64G64B64A64Uint: return "R64G64B64A64Uint"; - case Format::eR64G64B64A64Sint: return "R64G64B64A64Sint"; - case Format::eR64G64B64A64Sfloat: return "R64G64B64A64Sfloat"; - case Format::eB10G11R11UfloatPack32: return "B10G11R11UfloatPack32"; - case Format::eE5B9G9R9UfloatPack32: return "E5B9G9R9UfloatPack32"; - case Format::eD16Unorm: return "D16Unorm"; - case Format::eX8D24UnormPack32: return "X8D24UnormPack32"; - case Format::eD32Sfloat: return "D32Sfloat"; - case Format::eS8Uint: return "S8Uint"; - case Format::eD16UnormS8Uint: return "D16UnormS8Uint"; - case Format::eD24UnormS8Uint: return "D24UnormS8Uint"; - case Format::eD32SfloatS8Uint: return "D32SfloatS8Uint"; - case Format::eBc1RgbUnormBlock: return "Bc1RgbUnormBlock"; - case Format::eBc1RgbSrgbBlock: return "Bc1RgbSrgbBlock"; - case Format::eBc1RgbaUnormBlock: return "Bc1RgbaUnormBlock"; - case Format::eBc1RgbaSrgbBlock: return "Bc1RgbaSrgbBlock"; - case Format::eBc2UnormBlock: return "Bc2UnormBlock"; - case Format::eBc2SrgbBlock: return "Bc2SrgbBlock"; - case Format::eBc3UnormBlock: return "Bc3UnormBlock"; - case Format::eBc3SrgbBlock: return "Bc3SrgbBlock"; - case Format::eBc4UnormBlock: return "Bc4UnormBlock"; - case Format::eBc4SnormBlock: return "Bc4SnormBlock"; - case Format::eBc5UnormBlock: return "Bc5UnormBlock"; - case Format::eBc5SnormBlock: return "Bc5SnormBlock"; - case Format::eBc6HUfloatBlock: return "Bc6HUfloatBlock"; - case Format::eBc6HSfloatBlock: return "Bc6HSfloatBlock"; - case Format::eBc7UnormBlock: return "Bc7UnormBlock"; - case Format::eBc7SrgbBlock: return "Bc7SrgbBlock"; - case Format::eEtc2R8G8B8UnormBlock: return "Etc2R8G8B8UnormBlock"; - case Format::eEtc2R8G8B8SrgbBlock: return "Etc2R8G8B8SrgbBlock"; - case Format::eEtc2R8G8B8A1UnormBlock: return "Etc2R8G8B8A1UnormBlock"; - case Format::eEtc2R8G8B8A1SrgbBlock: return "Etc2R8G8B8A1SrgbBlock"; - case Format::eEtc2R8G8B8A8UnormBlock: return "Etc2R8G8B8A8UnormBlock"; - case Format::eEtc2R8G8B8A8SrgbBlock: return "Etc2R8G8B8A8SrgbBlock"; - case Format::eEacR11UnormBlock: return "EacR11UnormBlock"; - case Format::eEacR11SnormBlock: return "EacR11SnormBlock"; - case Format::eEacR11G11UnormBlock: return "EacR11G11UnormBlock"; - case Format::eEacR11G11SnormBlock: return "EacR11G11SnormBlock"; - case Format::eAstc4x4UnormBlock: return "Astc4x4UnormBlock"; - case Format::eAstc4x4SrgbBlock: return "Astc4x4SrgbBlock"; - case Format::eAstc5x4UnormBlock: return "Astc5x4UnormBlock"; - case Format::eAstc5x4SrgbBlock: return "Astc5x4SrgbBlock"; - case Format::eAstc5x5UnormBlock: return "Astc5x5UnormBlock"; - case Format::eAstc5x5SrgbBlock: return "Astc5x5SrgbBlock"; - case Format::eAstc6x5UnormBlock: return "Astc6x5UnormBlock"; - case Format::eAstc6x5SrgbBlock: return "Astc6x5SrgbBlock"; - case Format::eAstc6x6UnormBlock: return "Astc6x6UnormBlock"; - case Format::eAstc6x6SrgbBlock: return "Astc6x6SrgbBlock"; - case Format::eAstc8x5UnormBlock: return "Astc8x5UnormBlock"; - case Format::eAstc8x5SrgbBlock: return "Astc8x5SrgbBlock"; - case Format::eAstc8x6UnormBlock: return "Astc8x6UnormBlock"; - case Format::eAstc8x6SrgbBlock: return "Astc8x6SrgbBlock"; - case Format::eAstc8x8UnormBlock: return "Astc8x8UnormBlock"; - case Format::eAstc8x8SrgbBlock: return "Astc8x8SrgbBlock"; - case Format::eAstc10x5UnormBlock: return "Astc10x5UnormBlock"; - case Format::eAstc10x5SrgbBlock: return "Astc10x5SrgbBlock"; - case Format::eAstc10x6UnormBlock: return "Astc10x6UnormBlock"; - case Format::eAstc10x6SrgbBlock: return "Astc10x6SrgbBlock"; - case Format::eAstc10x8UnormBlock: return "Astc10x8UnormBlock"; - case Format::eAstc10x8SrgbBlock: return "Astc10x8SrgbBlock"; - case Format::eAstc10x10UnormBlock: return "Astc10x10UnormBlock"; - case Format::eAstc10x10SrgbBlock: return "Astc10x10SrgbBlock"; - case Format::eAstc12x10UnormBlock: return "Astc12x10UnormBlock"; - case Format::eAstc12x10SrgbBlock: return "Astc12x10SrgbBlock"; - case Format::eAstc12x12UnormBlock: return "Astc12x12UnormBlock"; - case Format::eAstc12x12SrgbBlock: return "Astc12x12SrgbBlock"; - case Format::eG8B8G8R8422Unorm: return "G8B8G8R8422Unorm"; - case Format::eB8G8R8G8422Unorm: return "B8G8R8G8422Unorm"; - case Format::eG8B8R83Plane420Unorm: return "G8B8R83Plane420Unorm"; - case Format::eG8B8R82Plane420Unorm: return "G8B8R82Plane420Unorm"; - case Format::eG8B8R83Plane422Unorm: return "G8B8R83Plane422Unorm"; - case Format::eG8B8R82Plane422Unorm: return "G8B8R82Plane422Unorm"; - case Format::eG8B8R83Plane444Unorm: return "G8B8R83Plane444Unorm"; - case Format::eR10X6UnormPack16: return "R10X6UnormPack16"; - case Format::eR10X6G10X6Unorm2Pack16: return "R10X6G10X6Unorm2Pack16"; - case Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return "R10X6G10X6B10X6A10X6Unorm4Pack16"; - case Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return "G10X6B10X6G10X6R10X6422Unorm4Pack16"; - case Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return "B10X6G10X6R10X6G10X6422Unorm4Pack16"; - case Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return "G10X6B10X6R10X63Plane420Unorm3Pack16"; - case Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return "G10X6B10X6R10X62Plane420Unorm3Pack16"; - case Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return "G10X6B10X6R10X63Plane422Unorm3Pack16"; - case Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return "G10X6B10X6R10X62Plane422Unorm3Pack16"; - case Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return "G10X6B10X6R10X63Plane444Unorm3Pack16"; - case Format::eR12X4UnormPack16: return "R12X4UnormPack16"; - case Format::eR12X4G12X4Unorm2Pack16: return "R12X4G12X4Unorm2Pack16"; - case Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return "R12X4G12X4B12X4A12X4Unorm4Pack16"; - case Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return "G12X4B12X4G12X4R12X4422Unorm4Pack16"; - case Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return "B12X4G12X4R12X4G12X4422Unorm4Pack16"; - case Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return "G12X4B12X4R12X43Plane420Unorm3Pack16"; - case Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return "G12X4B12X4R12X42Plane420Unorm3Pack16"; - case Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return "G12X4B12X4R12X43Plane422Unorm3Pack16"; - case Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return "G12X4B12X4R12X42Plane422Unorm3Pack16"; - case Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return "G12X4B12X4R12X43Plane444Unorm3Pack16"; - case Format::eG16B16G16R16422Unorm: return "G16B16G16R16422Unorm"; - case Format::eB16G16R16G16422Unorm: return "B16G16R16G16422Unorm"; - case Format::eG16B16R163Plane420Unorm: return "G16B16R163Plane420Unorm"; - case Format::eG16B16R162Plane420Unorm: return "G16B16R162Plane420Unorm"; - case Format::eG16B16R163Plane422Unorm: return "G16B16R163Plane422Unorm"; - case Format::eG16B16R162Plane422Unorm: return "G16B16R162Plane422Unorm"; - case Format::eG16B16R163Plane444Unorm: return "G16B16R163Plane444Unorm"; - case Format::eG8B8R82Plane444Unorm: return "G8B8R82Plane444Unorm"; - case Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return "G10X6B10X6R10X62Plane444Unorm3Pack16"; - case Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return "G12X4B12X4R12X42Plane444Unorm3Pack16"; - case Format::eG16B16R162Plane444Unorm: return "G16B16R162Plane444Unorm"; - case Format::eA4R4G4B4UnormPack16: return "A4R4G4B4UnormPack16"; - case Format::eA4B4G4R4UnormPack16: return "A4B4G4R4UnormPack16"; - case Format::eAstc4x4SfloatBlock: return "Astc4x4SfloatBlock"; - case Format::eAstc5x4SfloatBlock: return "Astc5x4SfloatBlock"; - case Format::eAstc5x5SfloatBlock: return "Astc5x5SfloatBlock"; - case Format::eAstc6x5SfloatBlock: return "Astc6x5SfloatBlock"; - case Format::eAstc6x6SfloatBlock: return "Astc6x6SfloatBlock"; - case Format::eAstc8x5SfloatBlock: return "Astc8x5SfloatBlock"; - case Format::eAstc8x6SfloatBlock: return "Astc8x6SfloatBlock"; - case Format::eAstc8x8SfloatBlock: return "Astc8x8SfloatBlock"; - case Format::eAstc10x5SfloatBlock: return "Astc10x5SfloatBlock"; - case Format::eAstc10x6SfloatBlock: return "Astc10x6SfloatBlock"; - case Format::eAstc10x8SfloatBlock: return "Astc10x8SfloatBlock"; - case Format::eAstc10x10SfloatBlock: return "Astc10x10SfloatBlock"; - case Format::eAstc12x10SfloatBlock: return "Astc12x10SfloatBlock"; - case Format::eAstc12x12SfloatBlock: return "Astc12x12SfloatBlock"; - case Format::ePvrtc12BppUnormBlockIMG: return "Pvrtc12BppUnormBlockIMG"; - case Format::ePvrtc14BppUnormBlockIMG: return "Pvrtc14BppUnormBlockIMG"; - case Format::ePvrtc22BppUnormBlockIMG: return "Pvrtc22BppUnormBlockIMG"; - case Format::ePvrtc24BppUnormBlockIMG: return "Pvrtc24BppUnormBlockIMG"; - case Format::ePvrtc12BppSrgbBlockIMG: return "Pvrtc12BppSrgbBlockIMG"; - case Format::ePvrtc14BppSrgbBlockIMG: return "Pvrtc14BppSrgbBlockIMG"; - case Format::ePvrtc22BppSrgbBlockIMG: return "Pvrtc22BppSrgbBlockIMG"; - case Format::ePvrtc24BppSrgbBlockIMG: return "Pvrtc24BppSrgbBlockIMG"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlagBits value ) - { - switch ( value ) - { - case FormatFeatureFlagBits::eSampledImage: return "SampledImage"; - case FormatFeatureFlagBits::eStorageImage: return "StorageImage"; - case FormatFeatureFlagBits::eStorageImageAtomic: return "StorageImageAtomic"; - case FormatFeatureFlagBits::eUniformTexelBuffer: return "UniformTexelBuffer"; - case FormatFeatureFlagBits::eStorageTexelBuffer: return "StorageTexelBuffer"; - case FormatFeatureFlagBits::eStorageTexelBufferAtomic: return "StorageTexelBufferAtomic"; - case FormatFeatureFlagBits::eVertexBuffer: return "VertexBuffer"; - case FormatFeatureFlagBits::eColorAttachment: return "ColorAttachment"; - case FormatFeatureFlagBits::eColorAttachmentBlend: return "ColorAttachmentBlend"; - case FormatFeatureFlagBits::eDepthStencilAttachment: return "DepthStencilAttachment"; - case FormatFeatureFlagBits::eBlitSrc: return "BlitSrc"; - case FormatFeatureFlagBits::eBlitDst: return "BlitDst"; - case FormatFeatureFlagBits::eSampledImageFilterLinear: return "SampledImageFilterLinear"; - case FormatFeatureFlagBits::eTransferSrc: return "TransferSrc"; - case FormatFeatureFlagBits::eTransferDst: return "TransferDst"; - case FormatFeatureFlagBits::eMidpointChromaSamples: return "MidpointChromaSamples"; - case FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter: return "SampledImageYcbcrConversionLinearFilter"; - case FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter: return "SampledImageYcbcrConversionSeparateReconstructionFilter"; - case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit: return "SampledImageYcbcrConversionChromaReconstructionExplicit"; - case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable: - return "SampledImageYcbcrConversionChromaReconstructionExplicitForceable"; - case FormatFeatureFlagBits::eDisjoint: return "Disjoint"; - case FormatFeatureFlagBits::eCositedChromaSamples: return "CositedChromaSamples"; - case FormatFeatureFlagBits::eSampledImageFilterMinmax: return "SampledImageFilterMinmax"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case FormatFeatureFlagBits::eVideoDecodeOutputKHR: return "VideoDecodeOutputKHR"; - case FormatFeatureFlagBits::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR: return "AccelerationStructureVertexBufferKHR"; - case FormatFeatureFlagBits::eSampledImageFilterCubicEXT: return "SampledImageFilterCubicEXT"; - case FormatFeatureFlagBits::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; - case FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case FormatFeatureFlagBits::eVideoEncodeInputKHR: return "VideoEncodeInputKHR"; - case FormatFeatureFlagBits::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageCreateFlagBits value ) - { - switch ( value ) - { - case ImageCreateFlagBits::eSparseBinding: return "SparseBinding"; - case ImageCreateFlagBits::eSparseResidency: return "SparseResidency"; - case ImageCreateFlagBits::eSparseAliased: return "SparseAliased"; - case ImageCreateFlagBits::eMutableFormat: return "MutableFormat"; - case ImageCreateFlagBits::eCubeCompatible: return "CubeCompatible"; - case ImageCreateFlagBits::eAlias: return "Alias"; - case ImageCreateFlagBits::eSplitInstanceBindRegions: return "SplitInstanceBindRegions"; - case ImageCreateFlagBits::e2DArrayCompatible: return "2DArrayCompatible"; - case ImageCreateFlagBits::eBlockTexelViewCompatible: return "BlockTexelViewCompatible"; - case ImageCreateFlagBits::eExtendedUsage: return "ExtendedUsage"; - case ImageCreateFlagBits::eProtected: return "Protected"; - case ImageCreateFlagBits::eDisjoint: return "Disjoint"; - case ImageCreateFlagBits::eCornerSampledNV: return "CornerSampledNV"; - case ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT: return "SampleLocationsCompatibleDepthEXT"; - case ImageCreateFlagBits::eSubsampledEXT: return "SubsampledEXT"; - case ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT: return "MultisampledRenderToSingleSampledEXT"; - case ImageCreateFlagBits::e2DViewCompatibleEXT: return "2DViewCompatibleEXT"; - case ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM: return "FragmentDensityMapOffsetQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageTiling value ) - { - switch ( value ) - { - case ImageTiling::eOptimal: return "Optimal"; - case ImageTiling::eLinear: return "Linear"; - case ImageTiling::eDrmFormatModifierEXT: return "DrmFormatModifierEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageType value ) - { - switch ( value ) - { - case ImageType::e1D: return "1D"; - case ImageType::e2D: return "2D"; - case ImageType::e3D: return "3D"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageUsageFlagBits value ) - { - switch ( value ) - { - case ImageUsageFlagBits::eTransferSrc: return "TransferSrc"; - case ImageUsageFlagBits::eTransferDst: return "TransferDst"; - case ImageUsageFlagBits::eSampled: return "Sampled"; - case ImageUsageFlagBits::eStorage: return "Storage"; - case ImageUsageFlagBits::eColorAttachment: return "ColorAttachment"; - case ImageUsageFlagBits::eDepthStencilAttachment: return "DepthStencilAttachment"; - case ImageUsageFlagBits::eTransientAttachment: return "TransientAttachment"; - case ImageUsageFlagBits::eInputAttachment: return "InputAttachment"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case ImageUsageFlagBits::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; - case ImageUsageFlagBits::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; - case ImageUsageFlagBits::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case ImageUsageFlagBits::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; - case ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case ImageUsageFlagBits::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; - case ImageUsageFlagBits::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; - case ImageUsageFlagBits::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case ImageUsageFlagBits::eAttachmentFeedbackLoopEXT: return "AttachmentFeedbackLoopEXT"; - case ImageUsageFlagBits::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI"; - case ImageUsageFlagBits::eSampleWeightQCOM: return "SampleWeightQCOM"; - case ImageUsageFlagBits::eSampleBlockMatchQCOM: return "SampleBlockMatchQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits value ) - { - switch ( value ) - { - case InstanceCreateFlagBits::eEnumeratePortabilityKHR: return "EnumeratePortabilityKHR"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( InternalAllocationType value ) - { - switch ( value ) - { - case InternalAllocationType::eExecutable: return "Executable"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlagBits value ) - { - switch ( value ) - { - case MemoryHeapFlagBits::eDeviceLocal: return "DeviceLocal"; - case MemoryHeapFlagBits::eMultiInstance: return "MultiInstance"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlagBits value ) - { - switch ( value ) - { - case MemoryPropertyFlagBits::eDeviceLocal: return "DeviceLocal"; - case MemoryPropertyFlagBits::eHostVisible: return "HostVisible"; - case MemoryPropertyFlagBits::eHostCoherent: return "HostCoherent"; - case MemoryPropertyFlagBits::eHostCached: return "HostCached"; - case MemoryPropertyFlagBits::eLazilyAllocated: return "LazilyAllocated"; - case MemoryPropertyFlagBits::eProtected: return "Protected"; - case MemoryPropertyFlagBits::eDeviceCoherentAMD: return "DeviceCoherentAMD"; - case MemoryPropertyFlagBits::eDeviceUncachedAMD: return "DeviceUncachedAMD"; - case MemoryPropertyFlagBits::eRdmaCapableNV: return "RdmaCapableNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PhysicalDeviceType value ) - { - switch ( value ) - { - case PhysicalDeviceType::eOther: return "Other"; - case PhysicalDeviceType::eIntegratedGpu: return "IntegratedGpu"; - case PhysicalDeviceType::eDiscreteGpu: return "DiscreteGpu"; - case PhysicalDeviceType::eVirtualGpu: return "VirtualGpu"; - case PhysicalDeviceType::eCpu: return "Cpu"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueueFlagBits value ) - { - switch ( value ) - { - case QueueFlagBits::eGraphics: return "Graphics"; - case QueueFlagBits::eCompute: return "Compute"; - case QueueFlagBits::eTransfer: return "Transfer"; - case QueueFlagBits::eSparseBinding: return "SparseBinding"; - case QueueFlagBits::eProtected: return "Protected"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case QueueFlagBits::eVideoDecodeKHR: return "VideoDecodeKHR"; - case QueueFlagBits::eVideoEncodeKHR: return "VideoEncodeKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SampleCountFlagBits value ) - { - switch ( value ) - { - case SampleCountFlagBits::e1: return "1"; - case SampleCountFlagBits::e2: return "2"; - case SampleCountFlagBits::e4: return "4"; - case SampleCountFlagBits::e8: return "8"; - case SampleCountFlagBits::e16: return "16"; - case SampleCountFlagBits::e32: return "32"; - case SampleCountFlagBits::e64: return "64"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SystemAllocationScope value ) - { - switch ( value ) - { - case SystemAllocationScope::eCommand: return "Command"; - case SystemAllocationScope::eObject: return "Object"; - case SystemAllocationScope::eCache: return "Cache"; - case SystemAllocationScope::eDevice: return "Device"; - case SystemAllocationScope::eInstance: return "Instance"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits value ) - { - switch ( value ) - { - case PipelineStageFlagBits::eTopOfPipe: return "TopOfPipe"; - case PipelineStageFlagBits::eDrawIndirect: return "DrawIndirect"; - case PipelineStageFlagBits::eVertexInput: return "VertexInput"; - case PipelineStageFlagBits::eVertexShader: return "VertexShader"; - case PipelineStageFlagBits::eTessellationControlShader: return "TessellationControlShader"; - case PipelineStageFlagBits::eTessellationEvaluationShader: return "TessellationEvaluationShader"; - case PipelineStageFlagBits::eGeometryShader: return "GeometryShader"; - case PipelineStageFlagBits::eFragmentShader: return "FragmentShader"; - case PipelineStageFlagBits::eEarlyFragmentTests: return "EarlyFragmentTests"; - case PipelineStageFlagBits::eLateFragmentTests: return "LateFragmentTests"; - case PipelineStageFlagBits::eColorAttachmentOutput: return "ColorAttachmentOutput"; - case PipelineStageFlagBits::eComputeShader: return "ComputeShader"; - case PipelineStageFlagBits::eTransfer: return "Transfer"; - case PipelineStageFlagBits::eBottomOfPipe: return "BottomOfPipe"; - case PipelineStageFlagBits::eHost: return "Host"; - case PipelineStageFlagBits::eAllGraphics: return "AllGraphics"; - case PipelineStageFlagBits::eAllCommands: return "AllCommands"; - case PipelineStageFlagBits::eNone: return "None"; - case PipelineStageFlagBits::eTransformFeedbackEXT: return "TransformFeedbackEXT"; - case PipelineStageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; - case PipelineStageFlagBits::eAccelerationStructureBuildKHR: return "AccelerationStructureBuildKHR"; - case PipelineStageFlagBits::eRayTracingShaderKHR: return "RayTracingShaderKHR"; - case PipelineStageFlagBits::eFragmentDensityProcessEXT: return "FragmentDensityProcessEXT"; - case PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; - case PipelineStageFlagBits::eCommandPreprocessNV: return "CommandPreprocessNV"; - case PipelineStageFlagBits::eTaskShaderEXT: return "TaskShaderEXT"; - case PipelineStageFlagBits::eMeshShaderEXT: return "MeshShaderEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( MemoryMapFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageAspectFlagBits value ) - { - switch ( value ) - { - case ImageAspectFlagBits::eColor: return "Color"; - case ImageAspectFlagBits::eDepth: return "Depth"; - case ImageAspectFlagBits::eStencil: return "Stencil"; - case ImageAspectFlagBits::eMetadata: return "Metadata"; - case ImageAspectFlagBits::ePlane0: return "Plane0"; - case ImageAspectFlagBits::ePlane1: return "Plane1"; - case ImageAspectFlagBits::ePlane2: return "Plane2"; - case ImageAspectFlagBits::eNone: return "None"; - case ImageAspectFlagBits::eMemoryPlane0EXT: return "MemoryPlane0EXT"; - case ImageAspectFlagBits::eMemoryPlane1EXT: return "MemoryPlane1EXT"; - case ImageAspectFlagBits::eMemoryPlane2EXT: return "MemoryPlane2EXT"; - case ImageAspectFlagBits::eMemoryPlane3EXT: return "MemoryPlane3EXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SparseImageFormatFlagBits value ) - { - switch ( value ) - { - case SparseImageFormatFlagBits::eSingleMiptail: return "SingleMiptail"; - case SparseImageFormatFlagBits::eAlignedMipSize: return "AlignedMipSize"; - case SparseImageFormatFlagBits::eNonstandardBlockSize: return "NonstandardBlockSize"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlagBits value ) - { - switch ( value ) - { - case SparseMemoryBindFlagBits::eMetadata: return "Metadata"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FenceCreateFlagBits value ) - { - switch ( value ) - { - case FenceCreateFlagBits::eSignaled: return "Signaled"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( EventCreateFlagBits value ) - { - switch ( value ) - { - case EventCreateFlagBits::eDeviceOnly: return "DeviceOnly"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryPipelineStatisticFlagBits value ) - { - switch ( value ) - { - case QueryPipelineStatisticFlagBits::eInputAssemblyVertices: return "InputAssemblyVertices"; - case QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives: return "InputAssemblyPrimitives"; - case QueryPipelineStatisticFlagBits::eVertexShaderInvocations: return "VertexShaderInvocations"; - case QueryPipelineStatisticFlagBits::eGeometryShaderInvocations: return "GeometryShaderInvocations"; - case QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives: return "GeometryShaderPrimitives"; - case QueryPipelineStatisticFlagBits::eClippingInvocations: return "ClippingInvocations"; - case QueryPipelineStatisticFlagBits::eClippingPrimitives: return "ClippingPrimitives"; - case QueryPipelineStatisticFlagBits::eFragmentShaderInvocations: return "FragmentShaderInvocations"; - case QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches: return "TessellationControlShaderPatches"; - case QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations: return "TessellationEvaluationShaderInvocations"; - case QueryPipelineStatisticFlagBits::eComputeShaderInvocations: return "ComputeShaderInvocations"; - case QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT: return "TaskShaderInvocationsEXT"; - case QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT: return "MeshShaderInvocationsEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryResultFlagBits value ) - { - switch ( value ) - { - case QueryResultFlagBits::e64: return "64"; - case QueryResultFlagBits::eWait: return "Wait"; - case QueryResultFlagBits::eWithAvailability: return "WithAvailability"; - case QueryResultFlagBits::ePartial: return "Partial"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case QueryResultFlagBits::eWithStatusKHR: return "WithStatusKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryType value ) - { - switch ( value ) - { - case QueryType::eOcclusion: return "Occlusion"; - case QueryType::ePipelineStatistics: return "PipelineStatistics"; - case QueryType::eTimestamp: return "Timestamp"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case QueryType::eResultStatusOnlyKHR: return "ResultStatusOnlyKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case QueryType::eTransformFeedbackStreamEXT: return "TransformFeedbackStreamEXT"; - case QueryType::ePerformanceQueryKHR: return "PerformanceQueryKHR"; - case QueryType::eAccelerationStructureCompactedSizeKHR: return "AccelerationStructureCompactedSizeKHR"; - case QueryType::eAccelerationStructureSerializationSizeKHR: return "AccelerationStructureSerializationSizeKHR"; - case QueryType::eAccelerationStructureCompactedSizeNV: return "AccelerationStructureCompactedSizeNV"; - case QueryType::ePerformanceQueryINTEL: return "PerformanceQueryINTEL"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case QueryType::eVideoEncodeBitstreamBufferRangeKHR: return "VideoEncodeBitstreamBufferRangeKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case QueryType::eMeshPrimitivesGeneratedEXT: return "MeshPrimitivesGeneratedEXT"; - case QueryType::ePrimitivesGeneratedEXT: return "PrimitivesGeneratedEXT"; - case QueryType::eAccelerationStructureSerializationBottomLevelPointersKHR: return "AccelerationStructureSerializationBottomLevelPointersKHR"; - case QueryType::eAccelerationStructureSizeKHR: return "AccelerationStructureSizeKHR"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( BufferCreateFlagBits value ) - { - switch ( value ) - { - case BufferCreateFlagBits::eSparseBinding: return "SparseBinding"; - case BufferCreateFlagBits::eSparseResidency: return "SparseResidency"; - case BufferCreateFlagBits::eSparseAliased: return "SparseAliased"; - case BufferCreateFlagBits::eProtected: return "Protected"; - case BufferCreateFlagBits::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( BufferUsageFlagBits value ) - { - switch ( value ) - { - case BufferUsageFlagBits::eTransferSrc: return "TransferSrc"; - case BufferUsageFlagBits::eTransferDst: return "TransferDst"; - case BufferUsageFlagBits::eUniformTexelBuffer: return "UniformTexelBuffer"; - case BufferUsageFlagBits::eStorageTexelBuffer: return "StorageTexelBuffer"; - case BufferUsageFlagBits::eUniformBuffer: return "UniformBuffer"; - case BufferUsageFlagBits::eStorageBuffer: return "StorageBuffer"; - case BufferUsageFlagBits::eIndexBuffer: return "IndexBuffer"; - case BufferUsageFlagBits::eVertexBuffer: return "VertexBuffer"; - case BufferUsageFlagBits::eIndirectBuffer: return "IndirectBuffer"; - case BufferUsageFlagBits::eShaderDeviceAddress: return "ShaderDeviceAddress"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case BufferUsageFlagBits::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; - case BufferUsageFlagBits::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case BufferUsageFlagBits::eTransformFeedbackBufferEXT: return "TransformFeedbackBufferEXT"; - case BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT: return "TransformFeedbackCounterBufferEXT"; - case BufferUsageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; - case BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR: return "AccelerationStructureBuildInputReadOnlyKHR"; - case BufferUsageFlagBits::eAccelerationStructureStorageKHR: return "AccelerationStructureStorageKHR"; - case BufferUsageFlagBits::eShaderBindingTableKHR: return "ShaderBindingTableKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case BufferUsageFlagBits::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; - case BufferUsageFlagBits::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SharingMode value ) - { - switch ( value ) - { - case SharingMode::eExclusive: return "Exclusive"; - case SharingMode::eConcurrent: return "Concurrent"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( ImageLayout value ) - { - switch ( value ) - { - case ImageLayout::eUndefined: return "Undefined"; - case ImageLayout::eGeneral: return "General"; - case ImageLayout::eColorAttachmentOptimal: return "ColorAttachmentOptimal"; - case ImageLayout::eDepthStencilAttachmentOptimal: return "DepthStencilAttachmentOptimal"; - case ImageLayout::eDepthStencilReadOnlyOptimal: return "DepthStencilReadOnlyOptimal"; - case ImageLayout::eShaderReadOnlyOptimal: return "ShaderReadOnlyOptimal"; - case ImageLayout::eTransferSrcOptimal: return "TransferSrcOptimal"; - case ImageLayout::eTransferDstOptimal: return "TransferDstOptimal"; - case ImageLayout::ePreinitialized: return "Preinitialized"; - case ImageLayout::eDepthReadOnlyStencilAttachmentOptimal: return "DepthReadOnlyStencilAttachmentOptimal"; - case ImageLayout::eDepthAttachmentStencilReadOnlyOptimal: return "DepthAttachmentStencilReadOnlyOptimal"; - case ImageLayout::eDepthAttachmentOptimal: return "DepthAttachmentOptimal"; - case ImageLayout::eDepthReadOnlyOptimal: return "DepthReadOnlyOptimal"; - case ImageLayout::eStencilAttachmentOptimal: return "StencilAttachmentOptimal"; - case ImageLayout::eStencilReadOnlyOptimal: return "StencilReadOnlyOptimal"; - case ImageLayout::eReadOnlyOptimal: return "ReadOnlyOptimal"; - case ImageLayout::eAttachmentOptimal: return "AttachmentOptimal"; - case ImageLayout::ePresentSrcKHR: return "PresentSrcKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case ImageLayout::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; - case ImageLayout::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; - case ImageLayout::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case ImageLayout::eSharedPresentKHR: return "SharedPresentKHR"; - case ImageLayout::eFragmentDensityMapOptimalEXT: return "FragmentDensityMapOptimalEXT"; - case ImageLayout::eFragmentShadingRateAttachmentOptimalKHR: return "FragmentShadingRateAttachmentOptimalKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case ImageLayout::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; - case ImageLayout::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; - case ImageLayout::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case ImageLayout::eAttachmentFeedbackLoopOptimalEXT: return "AttachmentFeedbackLoopOptimalEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ComponentSwizzle value ) - { - switch ( value ) - { - case ComponentSwizzle::eIdentity: return "Identity"; - case ComponentSwizzle::eZero: return "Zero"; - case ComponentSwizzle::eOne: return "One"; - case ComponentSwizzle::eR: return "R"; - case ComponentSwizzle::eG: return "G"; - case ComponentSwizzle::eB: return "B"; - case ComponentSwizzle::eA: return "A"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlagBits value ) - { - switch ( value ) - { - case ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT: return "FragmentDensityMapDynamicEXT"; - case ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT: return "FragmentDensityMapDeferredEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageViewType value ) - { - switch ( value ) - { - case ImageViewType::e1D: return "1D"; - case ImageViewType::e2D: return "2D"; - case ImageViewType::e3D: return "3D"; - case ImageViewType::eCube: return "Cube"; - case ImageViewType::e1DArray: return "1DArray"; - case ImageViewType::e2DArray: return "2DArray"; - case ImageViewType::eCubeArray: return "CubeArray"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( BlendFactor value ) - { - switch ( value ) - { - case BlendFactor::eZero: return "Zero"; - case BlendFactor::eOne: return "One"; - case BlendFactor::eSrcColor: return "SrcColor"; - case BlendFactor::eOneMinusSrcColor: return "OneMinusSrcColor"; - case BlendFactor::eDstColor: return "DstColor"; - case BlendFactor::eOneMinusDstColor: return "OneMinusDstColor"; - case BlendFactor::eSrcAlpha: return "SrcAlpha"; - case BlendFactor::eOneMinusSrcAlpha: return "OneMinusSrcAlpha"; - case BlendFactor::eDstAlpha: return "DstAlpha"; - case BlendFactor::eOneMinusDstAlpha: return "OneMinusDstAlpha"; - case BlendFactor::eConstantColor: return "ConstantColor"; - case BlendFactor::eOneMinusConstantColor: return "OneMinusConstantColor"; - case BlendFactor::eConstantAlpha: return "ConstantAlpha"; - case BlendFactor::eOneMinusConstantAlpha: return "OneMinusConstantAlpha"; - case BlendFactor::eSrcAlphaSaturate: return "SrcAlphaSaturate"; - case BlendFactor::eSrc1Color: return "Src1Color"; - case BlendFactor::eOneMinusSrc1Color: return "OneMinusSrc1Color"; - case BlendFactor::eSrc1Alpha: return "Src1Alpha"; - case BlendFactor::eOneMinusSrc1Alpha: return "OneMinusSrc1Alpha"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( BlendOp value ) - { - switch ( value ) - { - case BlendOp::eAdd: return "Add"; - case BlendOp::eSubtract: return "Subtract"; - case BlendOp::eReverseSubtract: return "ReverseSubtract"; - case BlendOp::eMin: return "Min"; - case BlendOp::eMax: return "Max"; - case BlendOp::eZeroEXT: return "ZeroEXT"; - case BlendOp::eSrcEXT: return "SrcEXT"; - case BlendOp::eDstEXT: return "DstEXT"; - case BlendOp::eSrcOverEXT: return "SrcOverEXT"; - case BlendOp::eDstOverEXT: return "DstOverEXT"; - case BlendOp::eSrcInEXT: return "SrcInEXT"; - case BlendOp::eDstInEXT: return "DstInEXT"; - case BlendOp::eSrcOutEXT: return "SrcOutEXT"; - case BlendOp::eDstOutEXT: return "DstOutEXT"; - case BlendOp::eSrcAtopEXT: return "SrcAtopEXT"; - case BlendOp::eDstAtopEXT: return "DstAtopEXT"; - case BlendOp::eXorEXT: return "XorEXT"; - case BlendOp::eMultiplyEXT: return "MultiplyEXT"; - case BlendOp::eScreenEXT: return "ScreenEXT"; - case BlendOp::eOverlayEXT: return "OverlayEXT"; - case BlendOp::eDarkenEXT: return "DarkenEXT"; - case BlendOp::eLightenEXT: return "LightenEXT"; - case BlendOp::eColordodgeEXT: return "ColordodgeEXT"; - case BlendOp::eColorburnEXT: return "ColorburnEXT"; - case BlendOp::eHardlightEXT: return "HardlightEXT"; - case BlendOp::eSoftlightEXT: return "SoftlightEXT"; - case BlendOp::eDifferenceEXT: return "DifferenceEXT"; - case BlendOp::eExclusionEXT: return "ExclusionEXT"; - case BlendOp::eInvertEXT: return "InvertEXT"; - case BlendOp::eInvertRgbEXT: return "InvertRgbEXT"; - case BlendOp::eLineardodgeEXT: return "LineardodgeEXT"; - case BlendOp::eLinearburnEXT: return "LinearburnEXT"; - case BlendOp::eVividlightEXT: return "VividlightEXT"; - case BlendOp::eLinearlightEXT: return "LinearlightEXT"; - case BlendOp::ePinlightEXT: return "PinlightEXT"; - case BlendOp::eHardmixEXT: return "HardmixEXT"; - case BlendOp::eHslHueEXT: return "HslHueEXT"; - case BlendOp::eHslSaturationEXT: return "HslSaturationEXT"; - case BlendOp::eHslColorEXT: return "HslColorEXT"; - case BlendOp::eHslLuminosityEXT: return "HslLuminosityEXT"; - case BlendOp::ePlusEXT: return "PlusEXT"; - case BlendOp::ePlusClampedEXT: return "PlusClampedEXT"; - case BlendOp::ePlusClampedAlphaEXT: return "PlusClampedAlphaEXT"; - case BlendOp::ePlusDarkerEXT: return "PlusDarkerEXT"; - case BlendOp::eMinusEXT: return "MinusEXT"; - case BlendOp::eMinusClampedEXT: return "MinusClampedEXT"; - case BlendOp::eContrastEXT: return "ContrastEXT"; - case BlendOp::eInvertOvgEXT: return "InvertOvgEXT"; - case BlendOp::eRedEXT: return "RedEXT"; - case BlendOp::eGreenEXT: return "GreenEXT"; - case BlendOp::eBlueEXT: return "BlueEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ColorComponentFlagBits value ) - { - switch ( value ) - { - case ColorComponentFlagBits::eR: return "R"; - case ColorComponentFlagBits::eG: return "G"; - case ColorComponentFlagBits::eB: return "B"; - case ColorComponentFlagBits::eA: return "A"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CompareOp value ) - { - switch ( value ) - { - case CompareOp::eNever: return "Never"; - case CompareOp::eLess: return "Less"; - case CompareOp::eEqual: return "Equal"; - case CompareOp::eLessOrEqual: return "LessOrEqual"; - case CompareOp::eGreater: return "Greater"; - case CompareOp::eNotEqual: return "NotEqual"; - case CompareOp::eGreaterOrEqual: return "GreaterOrEqual"; - case CompareOp::eAlways: return "Always"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CullModeFlagBits value ) - { - switch ( value ) - { - case CullModeFlagBits::eNone: return "None"; - case CullModeFlagBits::eFront: return "Front"; - case CullModeFlagBits::eBack: return "Back"; - case CullModeFlagBits::eFrontAndBack: return "FrontAndBack"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DynamicState value ) - { - switch ( value ) - { - case DynamicState::eViewport: return "Viewport"; - case DynamicState::eScissor: return "Scissor"; - case DynamicState::eLineWidth: return "LineWidth"; - case DynamicState::eDepthBias: return "DepthBias"; - case DynamicState::eBlendConstants: return "BlendConstants"; - case DynamicState::eDepthBounds: return "DepthBounds"; - case DynamicState::eStencilCompareMask: return "StencilCompareMask"; - case DynamicState::eStencilWriteMask: return "StencilWriteMask"; - case DynamicState::eStencilReference: return "StencilReference"; - case DynamicState::eCullMode: return "CullMode"; - case DynamicState::eFrontFace: return "FrontFace"; - case DynamicState::ePrimitiveTopology: return "PrimitiveTopology"; - case DynamicState::eViewportWithCount: return "ViewportWithCount"; - case DynamicState::eScissorWithCount: return "ScissorWithCount"; - case DynamicState::eVertexInputBindingStride: return "VertexInputBindingStride"; - case DynamicState::eDepthTestEnable: return "DepthTestEnable"; - case DynamicState::eDepthWriteEnable: return "DepthWriteEnable"; - case DynamicState::eDepthCompareOp: return "DepthCompareOp"; - case DynamicState::eDepthBoundsTestEnable: return "DepthBoundsTestEnable"; - case DynamicState::eStencilTestEnable: return "StencilTestEnable"; - case DynamicState::eStencilOp: return "StencilOp"; - case DynamicState::eRasterizerDiscardEnable: return "RasterizerDiscardEnable"; - case DynamicState::eDepthBiasEnable: return "DepthBiasEnable"; - case DynamicState::ePrimitiveRestartEnable: return "PrimitiveRestartEnable"; - case DynamicState::eViewportWScalingNV: return "ViewportWScalingNV"; - case DynamicState::eDiscardRectangleEXT: return "DiscardRectangleEXT"; - case DynamicState::eSampleLocationsEXT: return "SampleLocationsEXT"; - case DynamicState::eRayTracingPipelineStackSizeKHR: return "RayTracingPipelineStackSizeKHR"; - case DynamicState::eViewportShadingRatePaletteNV: return "ViewportShadingRatePaletteNV"; - case DynamicState::eViewportCoarseSampleOrderNV: return "ViewportCoarseSampleOrderNV"; - case DynamicState::eExclusiveScissorNV: return "ExclusiveScissorNV"; - case DynamicState::eFragmentShadingRateKHR: return "FragmentShadingRateKHR"; - case DynamicState::eLineStippleEXT: return "LineStippleEXT"; - case DynamicState::eVertexInputEXT: return "VertexInputEXT"; - case DynamicState::ePatchControlPointsEXT: return "PatchControlPointsEXT"; - case DynamicState::eLogicOpEXT: return "LogicOpEXT"; - case DynamicState::eColorWriteEnableEXT: return "ColorWriteEnableEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FrontFace value ) - { - switch ( value ) - { - case FrontFace::eCounterClockwise: return "CounterClockwise"; - case FrontFace::eClockwise: return "Clockwise"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( LogicOp value ) - { - switch ( value ) - { - case LogicOp::eClear: return "Clear"; - case LogicOp::eAnd: return "And"; - case LogicOp::eAndReverse: return "AndReverse"; - case LogicOp::eCopy: return "Copy"; - case LogicOp::eAndInverted: return "AndInverted"; - case LogicOp::eNoOp: return "NoOp"; - case LogicOp::eXor: return "Xor"; - case LogicOp::eOr: return "Or"; - case LogicOp::eNor: return "Nor"; - case LogicOp::eEquivalent: return "Equivalent"; - case LogicOp::eInvert: return "Invert"; - case LogicOp::eOrReverse: return "OrReverse"; - case LogicOp::eCopyInverted: return "CopyInverted"; - case LogicOp::eOrInverted: return "OrInverted"; - case LogicOp::eNand: return "Nand"; - case LogicOp::eSet: return "Set"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlagBits value ) - { - switch ( value ) - { - case PipelineCreateFlagBits::eDisableOptimization: return "DisableOptimization"; - case PipelineCreateFlagBits::eAllowDerivatives: return "AllowDerivatives"; - case PipelineCreateFlagBits::eDerivative: return "Derivative"; - case PipelineCreateFlagBits::eViewIndexFromDeviceIndex: return "ViewIndexFromDeviceIndex"; - case PipelineCreateFlagBits::eDispatchBase: return "DispatchBase"; - case PipelineCreateFlagBits::eFailOnPipelineCompileRequired: return "FailOnPipelineCompileRequired"; - case PipelineCreateFlagBits::eEarlyReturnOnFailure: return "EarlyReturnOnFailure"; - case PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR: return "RenderingFragmentShadingRateAttachmentKHR"; - case PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT: return "RenderingFragmentDensityMapAttachmentEXT"; - case PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR: return "RayTracingNoNullAnyHitShadersKHR"; - case PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR: return "RayTracingNoNullClosestHitShadersKHR"; - case PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR: return "RayTracingNoNullMissShadersKHR"; - case PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR: return "RayTracingNoNullIntersectionShadersKHR"; - case PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR: return "RayTracingSkipTrianglesKHR"; - case PipelineCreateFlagBits::eRayTracingSkipAabbsKHR: return "RayTracingSkipAabbsKHR"; - case PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR: return "RayTracingShaderGroupHandleCaptureReplayKHR"; - case PipelineCreateFlagBits::eDeferCompileNV: return "DeferCompileNV"; - case PipelineCreateFlagBits::eCaptureStatisticsKHR: return "CaptureStatisticsKHR"; - case PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR: return "CaptureInternalRepresentationsKHR"; - case PipelineCreateFlagBits::eIndirectBindableNV: return "IndirectBindableNV"; - case PipelineCreateFlagBits::eLibraryKHR: return "LibraryKHR"; - case PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT: return "RetainLinkTimeOptimizationInfoEXT"; - case PipelineCreateFlagBits::eLinkTimeOptimizationEXT: return "LinkTimeOptimizationEXT"; - case PipelineCreateFlagBits::eRayTracingAllowMotionNV: return "RayTracingAllowMotionNV"; - case PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT: return "ColorAttachmentFeedbackLoopEXT"; - case PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT: return "DepthStencilAttachmentFeedbackLoopEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlagBits value ) - { - switch ( value ) - { - case PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize: return "AllowVaryingSubgroupSize"; - case PipelineShaderStageCreateFlagBits::eRequireFullSubgroups: return "RequireFullSubgroups"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PolygonMode value ) - { - switch ( value ) - { - case PolygonMode::eFill: return "Fill"; - case PolygonMode::eLine: return "Line"; - case PolygonMode::ePoint: return "Point"; - case PolygonMode::eFillRectangleNV: return "FillRectangleNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PrimitiveTopology value ) - { - switch ( value ) - { - case PrimitiveTopology::ePointList: return "PointList"; - case PrimitiveTopology::eLineList: return "LineList"; - case PrimitiveTopology::eLineStrip: return "LineStrip"; - case PrimitiveTopology::eTriangleList: return "TriangleList"; - case PrimitiveTopology::eTriangleStrip: return "TriangleStrip"; - case PrimitiveTopology::eTriangleFan: return "TriangleFan"; - case PrimitiveTopology::eLineListWithAdjacency: return "LineListWithAdjacency"; - case PrimitiveTopology::eLineStripWithAdjacency: return "LineStripWithAdjacency"; - case PrimitiveTopology::eTriangleListWithAdjacency: return "TriangleListWithAdjacency"; - case PrimitiveTopology::eTriangleStripWithAdjacency: return "TriangleStripWithAdjacency"; - case PrimitiveTopology::ePatchList: return "PatchList"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ShaderStageFlagBits value ) - { - switch ( value ) - { - case ShaderStageFlagBits::eVertex: return "Vertex"; - case ShaderStageFlagBits::eTessellationControl: return "TessellationControl"; - case ShaderStageFlagBits::eTessellationEvaluation: return "TessellationEvaluation"; - case ShaderStageFlagBits::eGeometry: return "Geometry"; - case ShaderStageFlagBits::eFragment: return "Fragment"; - case ShaderStageFlagBits::eCompute: return "Compute"; - case ShaderStageFlagBits::eAllGraphics: return "AllGraphics"; - case ShaderStageFlagBits::eAll: return "All"; - case ShaderStageFlagBits::eRaygenKHR: return "RaygenKHR"; - case ShaderStageFlagBits::eAnyHitKHR: return "AnyHitKHR"; - case ShaderStageFlagBits::eClosestHitKHR: return "ClosestHitKHR"; - case ShaderStageFlagBits::eMissKHR: return "MissKHR"; - case ShaderStageFlagBits::eIntersectionKHR: return "IntersectionKHR"; - case ShaderStageFlagBits::eCallableKHR: return "CallableKHR"; - case ShaderStageFlagBits::eTaskEXT: return "TaskEXT"; - case ShaderStageFlagBits::eMeshEXT: return "MeshEXT"; - case ShaderStageFlagBits::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( StencilOp value ) - { - switch ( value ) - { - case StencilOp::eKeep: return "Keep"; - case StencilOp::eZero: return "Zero"; - case StencilOp::eReplace: return "Replace"; - case StencilOp::eIncrementAndClamp: return "IncrementAndClamp"; - case StencilOp::eDecrementAndClamp: return "DecrementAndClamp"; - case StencilOp::eInvert: return "Invert"; - case StencilOp::eIncrementAndWrap: return "IncrementAndWrap"; - case StencilOp::eDecrementAndWrap: return "DecrementAndWrap"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VertexInputRate value ) - { - switch ( value ) - { - case VertexInputRate::eVertex: return "Vertex"; - case VertexInputRate::eInstance: return "Instance"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( BorderColor value ) - { - switch ( value ) - { - case BorderColor::eFloatTransparentBlack: return "FloatTransparentBlack"; - case BorderColor::eIntTransparentBlack: return "IntTransparentBlack"; - case BorderColor::eFloatOpaqueBlack: return "FloatOpaqueBlack"; - case BorderColor::eIntOpaqueBlack: return "IntOpaqueBlack"; - case BorderColor::eFloatOpaqueWhite: return "FloatOpaqueWhite"; - case BorderColor::eIntOpaqueWhite: return "IntOpaqueWhite"; - case BorderColor::eFloatCustomEXT: return "FloatCustomEXT"; - case BorderColor::eIntCustomEXT: return "IntCustomEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( Filter value ) - { - switch ( value ) - { - case Filter::eNearest: return "Nearest"; - case Filter::eLinear: return "Linear"; - case Filter::eCubicEXT: return "CubicEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerAddressMode value ) - { - switch ( value ) - { - case SamplerAddressMode::eRepeat: return "Repeat"; - case SamplerAddressMode::eMirroredRepeat: return "MirroredRepeat"; - case SamplerAddressMode::eClampToEdge: return "ClampToEdge"; - case SamplerAddressMode::eClampToBorder: return "ClampToBorder"; - case SamplerAddressMode::eMirrorClampToEdge: return "MirrorClampToEdge"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlagBits value ) - { - switch ( value ) - { - case SamplerCreateFlagBits::eSubsampledEXT: return "SubsampledEXT"; - case SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT: return "SubsampledCoarseReconstructionEXT"; - case SamplerCreateFlagBits::eNonSeamlessCubeMapEXT: return "NonSeamlessCubeMapEXT"; - case SamplerCreateFlagBits::eImageProcessingQCOM: return "ImageProcessingQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerMipmapMode value ) - { - switch ( value ) - { - case SamplerMipmapMode::eNearest: return "Nearest"; - case SamplerMipmapMode::eLinear: return "Linear"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlagBits value ) - { - switch ( value ) - { - case DescriptorPoolCreateFlagBits::eFreeDescriptorSet: return "FreeDescriptorSet"; - case DescriptorPoolCreateFlagBits::eUpdateAfterBind: return "UpdateAfterBind"; - case DescriptorPoolCreateFlagBits::eHostOnlyVALVE: return "HostOnlyVALVE"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlagBits value ) - { - switch ( value ) - { - case DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool: return "UpdateAfterBindPool"; - case DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR: return "PushDescriptorKHR"; - case DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolVALVE: return "HostOnlyPoolVALVE"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorType value ) - { - switch ( value ) - { - case DescriptorType::eSampler: return "Sampler"; - case DescriptorType::eCombinedImageSampler: return "CombinedImageSampler"; - case DescriptorType::eSampledImage: return "SampledImage"; - case DescriptorType::eStorageImage: return "StorageImage"; - case DescriptorType::eUniformTexelBuffer: return "UniformTexelBuffer"; - case DescriptorType::eStorageTexelBuffer: return "StorageTexelBuffer"; - case DescriptorType::eUniformBuffer: return "UniformBuffer"; - case DescriptorType::eStorageBuffer: return "StorageBuffer"; - case DescriptorType::eUniformBufferDynamic: return "UniformBufferDynamic"; - case DescriptorType::eStorageBufferDynamic: return "StorageBufferDynamic"; - case DescriptorType::eInputAttachment: return "InputAttachment"; - case DescriptorType::eInlineUniformBlock: return "InlineUniformBlock"; - case DescriptorType::eAccelerationStructureKHR: return "AccelerationStructureKHR"; - case DescriptorType::eAccelerationStructureNV: return "AccelerationStructureNV"; - case DescriptorType::eMutableVALVE: return "MutableVALVE"; - case DescriptorType::eSampleWeightImageQCOM: return "SampleWeightImageQCOM"; - case DescriptorType::eBlockMatchImageQCOM: return "BlockMatchImageQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( AccessFlagBits value ) - { - switch ( value ) - { - case AccessFlagBits::eIndirectCommandRead: return "IndirectCommandRead"; - case AccessFlagBits::eIndexRead: return "IndexRead"; - case AccessFlagBits::eVertexAttributeRead: return "VertexAttributeRead"; - case AccessFlagBits::eUniformRead: return "UniformRead"; - case AccessFlagBits::eInputAttachmentRead: return "InputAttachmentRead"; - case AccessFlagBits::eShaderRead: return "ShaderRead"; - case AccessFlagBits::eShaderWrite: return "ShaderWrite"; - case AccessFlagBits::eColorAttachmentRead: return "ColorAttachmentRead"; - case AccessFlagBits::eColorAttachmentWrite: return "ColorAttachmentWrite"; - case AccessFlagBits::eDepthStencilAttachmentRead: return "DepthStencilAttachmentRead"; - case AccessFlagBits::eDepthStencilAttachmentWrite: return "DepthStencilAttachmentWrite"; - case AccessFlagBits::eTransferRead: return "TransferRead"; - case AccessFlagBits::eTransferWrite: return "TransferWrite"; - case AccessFlagBits::eHostRead: return "HostRead"; - case AccessFlagBits::eHostWrite: return "HostWrite"; - case AccessFlagBits::eMemoryRead: return "MemoryRead"; - case AccessFlagBits::eMemoryWrite: return "MemoryWrite"; - case AccessFlagBits::eNone: return "None"; - case AccessFlagBits::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT"; - case AccessFlagBits::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT"; - case AccessFlagBits::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT"; - case AccessFlagBits::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT"; - case AccessFlagBits::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT"; - case AccessFlagBits::eAccelerationStructureReadKHR: return "AccelerationStructureReadKHR"; - case AccessFlagBits::eAccelerationStructureWriteKHR: return "AccelerationStructureWriteKHR"; - case AccessFlagBits::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT"; - case AccessFlagBits::eFragmentShadingRateAttachmentReadKHR: return "FragmentShadingRateAttachmentReadKHR"; - case AccessFlagBits::eCommandPreprocessReadNV: return "CommandPreprocessReadNV"; - case AccessFlagBits::eCommandPreprocessWriteNV: return "CommandPreprocessWriteNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlagBits value ) - { - switch ( value ) - { - case AttachmentDescriptionFlagBits::eMayAlias: return "MayAlias"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AttachmentLoadOp value ) - { - switch ( value ) - { - case AttachmentLoadOp::eLoad: return "Load"; - case AttachmentLoadOp::eClear: return "Clear"; - case AttachmentLoadOp::eDontCare: return "DontCare"; - case AttachmentLoadOp::eNoneEXT: return "NoneEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AttachmentStoreOp value ) - { - switch ( value ) - { - case AttachmentStoreOp::eStore: return "Store"; - case AttachmentStoreOp::eDontCare: return "DontCare"; - case AttachmentStoreOp::eNone: return "None"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DependencyFlagBits value ) - { - switch ( value ) - { - case DependencyFlagBits::eByRegion: return "ByRegion"; - case DependencyFlagBits::eDeviceGroup: return "DeviceGroup"; - case DependencyFlagBits::eViewLocal: return "ViewLocal"; - case DependencyFlagBits::eFeedbackLoopEXT: return "FeedbackLoopEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlagBits value ) - { - switch ( value ) - { - case FramebufferCreateFlagBits::eImageless: return "Imageless"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineBindPoint value ) - { - switch ( value ) - { - case PipelineBindPoint::eGraphics: return "Graphics"; - case PipelineBindPoint::eCompute: return "Compute"; - case PipelineBindPoint::eRayTracingKHR: return "RayTracingKHR"; - case PipelineBindPoint::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlagBits value ) - { - switch ( value ) - { - case RenderPassCreateFlagBits::eTransformQCOM: return "TransformQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlagBits value ) - { - switch ( value ) - { - case SubpassDescriptionFlagBits::ePerViewAttributesNVX: return "PerViewAttributesNVX"; - case SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX: return "PerViewPositionXOnlyNVX"; - case SubpassDescriptionFlagBits::eFragmentRegionQCOM: return "FragmentRegionQCOM"; - case SubpassDescriptionFlagBits::eShaderResolveQCOM: return "ShaderResolveQCOM"; - case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT: return "RasterizationOrderAttachmentColorAccessEXT"; - case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; - case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; - case SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT: return "EnableLegacyDitheringEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolCreateFlagBits value ) - { - switch ( value ) - { - case CommandPoolCreateFlagBits::eTransient: return "Transient"; - case CommandPoolCreateFlagBits::eResetCommandBuffer: return "ResetCommandBuffer"; - case CommandPoolCreateFlagBits::eProtected: return "Protected"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlagBits value ) - { - switch ( value ) - { - case CommandPoolResetFlagBits::eReleaseResources: return "ReleaseResources"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandBufferLevel value ) - { - switch ( value ) - { - case CommandBufferLevel::ePrimary: return "Primary"; - case CommandBufferLevel::eSecondary: return "Secondary"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlagBits value ) - { - switch ( value ) - { - case CommandBufferResetFlagBits::eReleaseResources: return "ReleaseResources"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandBufferUsageFlagBits value ) - { - switch ( value ) - { - case CommandBufferUsageFlagBits::eOneTimeSubmit: return "OneTimeSubmit"; - case CommandBufferUsageFlagBits::eRenderPassContinue: return "RenderPassContinue"; - case CommandBufferUsageFlagBits::eSimultaneousUse: return "SimultaneousUse"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryControlFlagBits value ) - { - switch ( value ) - { - case QueryControlFlagBits::ePrecise: return "Precise"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( IndexType value ) - { - switch ( value ) - { - case IndexType::eUint16: return "Uint16"; - case IndexType::eUint32: return "Uint32"; - case IndexType::eNoneKHR: return "NoneKHR"; - case IndexType::eUint8EXT: return "Uint8EXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( StencilFaceFlagBits value ) - { - switch ( value ) - { - case StencilFaceFlagBits::eFront: return "Front"; - case StencilFaceFlagBits::eBack: return "Back"; - case StencilFaceFlagBits::eFrontAndBack: return "FrontAndBack"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SubpassContents value ) - { - switch ( value ) - { - case SubpassContents::eInline: return "Inline"; - case SubpassContents::eSecondaryCommandBuffers: return "SecondaryCommandBuffers"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_VERSION_1_1 === - - VULKAN_HPP_INLINE std::string to_string( SubgroupFeatureFlagBits value ) - { - switch ( value ) - { - case SubgroupFeatureFlagBits::eBasic: return "Basic"; - case SubgroupFeatureFlagBits::eVote: return "Vote"; - case SubgroupFeatureFlagBits::eArithmetic: return "Arithmetic"; - case SubgroupFeatureFlagBits::eBallot: return "Ballot"; - case SubgroupFeatureFlagBits::eShuffle: return "Shuffle"; - case SubgroupFeatureFlagBits::eShuffleRelative: return "ShuffleRelative"; - case SubgroupFeatureFlagBits::eClustered: return "Clustered"; - case SubgroupFeatureFlagBits::eQuad: return "Quad"; - case SubgroupFeatureFlagBits::ePartitionedNV: return "PartitionedNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PeerMemoryFeatureFlagBits value ) - { - switch ( value ) - { - case PeerMemoryFeatureFlagBits::eCopySrc: return "CopySrc"; - case PeerMemoryFeatureFlagBits::eCopyDst: return "CopyDst"; - case PeerMemoryFeatureFlagBits::eGenericSrc: return "GenericSrc"; - case PeerMemoryFeatureFlagBits::eGenericDst: return "GenericDst"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlagBits value ) - { - switch ( value ) - { - case MemoryAllocateFlagBits::eDeviceMask: return "DeviceMask"; - case MemoryAllocateFlagBits::eDeviceAddress: return "DeviceAddress"; - case MemoryAllocateFlagBits::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PointClippingBehavior value ) - { - switch ( value ) - { - case PointClippingBehavior::eAllClipPlanes: return "AllClipPlanes"; - case PointClippingBehavior::eUserClipPlanesOnly: return "UserClipPlanesOnly"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( TessellationDomainOrigin value ) - { - switch ( value ) - { - case TessellationDomainOrigin::eUpperLeft: return "UpperLeft"; - case TessellationDomainOrigin::eLowerLeft: return "LowerLeft"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) - { - switch ( value ) - { - case DeviceQueueCreateFlagBits::eProtected: return "Protected"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrModelConversion value ) - { - switch ( value ) - { - case SamplerYcbcrModelConversion::eRgbIdentity: return "RgbIdentity"; - case SamplerYcbcrModelConversion::eYcbcrIdentity: return "YcbcrIdentity"; - case SamplerYcbcrModelConversion::eYcbcr709: return "Ycbcr709"; - case SamplerYcbcrModelConversion::eYcbcr601: return "Ycbcr601"; - case SamplerYcbcrModelConversion::eYcbcr2020: return "Ycbcr2020"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrRange value ) - { - switch ( value ) - { - case SamplerYcbcrRange::eItuFull: return "ItuFull"; - case SamplerYcbcrRange::eItuNarrow: return "ItuNarrow"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ChromaLocation value ) - { - switch ( value ) - { - case ChromaLocation::eCositedEven: return "CositedEven"; - case ChromaLocation::eMidpoint: return "Midpoint"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateType value ) - { - switch ( value ) - { - case DescriptorUpdateTemplateType::eDescriptorSet: return "DescriptorSet"; - case DescriptorUpdateTemplateType::ePushDescriptorsKHR: return "PushDescriptorsKHR"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagBits value ) - { - switch ( value ) - { - case ExternalMemoryHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; - case ExternalMemoryHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; - case ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; - case ExternalMemoryHandleTypeFlagBits::eD3D11Texture: return "D3D11Texture"; - case ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt: return "D3D11TextureKmt"; - case ExternalMemoryHandleTypeFlagBits::eD3D12Heap: return "D3D12Heap"; - case ExternalMemoryHandleTypeFlagBits::eD3D12Resource: return "D3D12Resource"; - case ExternalMemoryHandleTypeFlagBits::eDmaBufEXT: return "DmaBufEXT"; -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - case ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID: return "AndroidHardwareBufferANDROID"; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - case ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT: return "HostAllocationEXT"; - case ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT: return "HostMappedForeignMemoryEXT"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA: return "ZirconVmoFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - case ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV: return "RdmaAddressNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagBits value ) - { - switch ( value ) - { - case ExternalMemoryFeatureFlagBits::eDedicatedOnly: return "DedicatedOnly"; - case ExternalMemoryFeatureFlagBits::eExportable: return "Exportable"; - case ExternalMemoryFeatureFlagBits::eImportable: return "Importable"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalFenceHandleTypeFlagBits value ) - { - switch ( value ) - { - case ExternalFenceHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; - case ExternalFenceHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; - case ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; - case ExternalFenceHandleTypeFlagBits::eSyncFd: return "SyncFd"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlagBits value ) - { - switch ( value ) - { - case ExternalFenceFeatureFlagBits::eExportable: return "Exportable"; - case ExternalFenceFeatureFlagBits::eImportable: return "Importable"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FenceImportFlagBits value ) - { - switch ( value ) - { - case FenceImportFlagBits::eTemporary: return "Temporary"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlagBits value ) - { - switch ( value ) - { - case SemaphoreImportFlagBits::eTemporary: return "Temporary"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreHandleTypeFlagBits value ) - { - switch ( value ) - { - case ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; - case ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; - case ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; - case ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence: return "D3D12Fence"; - case ExternalSemaphoreHandleTypeFlagBits::eSyncFd: return "SyncFd"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA: return "ZirconEventFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlagBits value ) - { - switch ( value ) - { - case ExternalSemaphoreFeatureFlagBits::eExportable: return "Exportable"; - case ExternalSemaphoreFeatureFlagBits::eImportable: return "Importable"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_VERSION_1_2 === - - VULKAN_HPP_INLINE std::string to_string( DriverId value ) - { - switch ( value ) - { - case DriverId::eAmdProprietary: return "AmdProprietary"; - case DriverId::eAmdOpenSource: return "AmdOpenSource"; - case DriverId::eMesaRadv: return "MesaRadv"; - case DriverId::eNvidiaProprietary: return "NvidiaProprietary"; - case DriverId::eIntelProprietaryWindows: return "IntelProprietaryWindows"; - case DriverId::eIntelOpenSourceMESA: return "IntelOpenSourceMESA"; - case DriverId::eImaginationProprietary: return "ImaginationProprietary"; - case DriverId::eQualcommProprietary: return "QualcommProprietary"; - case DriverId::eArmProprietary: return "ArmProprietary"; - case DriverId::eGoogleSwiftshader: return "GoogleSwiftshader"; - case DriverId::eGgpProprietary: return "GgpProprietary"; - case DriverId::eBroadcomProprietary: return "BroadcomProprietary"; - case DriverId::eMesaLlvmpipe: return "MesaLlvmpipe"; - case DriverId::eMoltenvk: return "Moltenvk"; - case DriverId::eCoreaviProprietary: return "CoreaviProprietary"; - case DriverId::eJuiceProprietary: return "JuiceProprietary"; - case DriverId::eVerisiliconProprietary: return "VerisiliconProprietary"; - case DriverId::eMesaTurnip: return "MesaTurnip"; - case DriverId::eMesaV3Dv: return "MesaV3Dv"; - case DriverId::eMesaPanvk: return "MesaPanvk"; - case DriverId::eSamsungProprietary: return "SamsungProprietary"; - case DriverId::eMesaVenus: return "MesaVenus"; - case DriverId::eMesaDozen: return "MesaDozen"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ShaderFloatControlsIndependence value ) - { - switch ( value ) - { - case ShaderFloatControlsIndependence::e32BitOnly: return "32BitOnly"; - case ShaderFloatControlsIndependence::eAll: return "All"; - case ShaderFloatControlsIndependence::eNone: return "None"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlagBits value ) - { - switch ( value ) - { - case DescriptorBindingFlagBits::eUpdateAfterBind: return "UpdateAfterBind"; - case DescriptorBindingFlagBits::eUpdateUnusedWhilePending: return "UpdateUnusedWhilePending"; - case DescriptorBindingFlagBits::ePartiallyBound: return "PartiallyBound"; - case DescriptorBindingFlagBits::eVariableDescriptorCount: return "VariableDescriptorCount"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ResolveModeFlagBits value ) - { - switch ( value ) - { - case ResolveModeFlagBits::eNone: return "None"; - case ResolveModeFlagBits::eSampleZero: return "SampleZero"; - case ResolveModeFlagBits::eAverage: return "Average"; - case ResolveModeFlagBits::eMin: return "Min"; - case ResolveModeFlagBits::eMax: return "Max"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SamplerReductionMode value ) - { - switch ( value ) - { - case SamplerReductionMode::eWeightedAverage: return "WeightedAverage"; - case SamplerReductionMode::eMin: return "Min"; - case SamplerReductionMode::eMax: return "Max"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreType value ) - { - switch ( value ) - { - case SemaphoreType::eBinary: return "Binary"; - case SemaphoreType::eTimeline: return "Timeline"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlagBits value ) - { - switch ( value ) - { - case SemaphoreWaitFlagBits::eAny: return "Any"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_VERSION_1_3 === - - VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlagBits value ) - { - switch ( value ) - { - case PipelineCreationFeedbackFlagBits::eValid: return "Valid"; - case PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit: return "ApplicationPipelineCacheHit"; - case PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration: return "BasePipelineAcceleration"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlagBits value ) - { - switch ( value ) - { - case ToolPurposeFlagBits::eValidation: return "Validation"; - case ToolPurposeFlagBits::eProfiling: return "Profiling"; - case ToolPurposeFlagBits::eTracing: return "Tracing"; - case ToolPurposeFlagBits::eAdditionalFeatures: return "AdditionalFeatures"; - case ToolPurposeFlagBits::eModifyingFeatures: return "ModifyingFeatures"; - case ToolPurposeFlagBits::eDebugReportingEXT: return "DebugReportingEXT"; - case ToolPurposeFlagBits::eDebugMarkersEXT: return "DebugMarkersEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PrivateDataSlotCreateFlagBits ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits2 value ) - { - switch ( value ) - { - case PipelineStageFlagBits2::eNone: return "None"; - case PipelineStageFlagBits2::eTopOfPipe: return "TopOfPipe"; - case PipelineStageFlagBits2::eDrawIndirect: return "DrawIndirect"; - case PipelineStageFlagBits2::eVertexInput: return "VertexInput"; - case PipelineStageFlagBits2::eVertexShader: return "VertexShader"; - case PipelineStageFlagBits2::eTessellationControlShader: return "TessellationControlShader"; - case PipelineStageFlagBits2::eTessellationEvaluationShader: return "TessellationEvaluationShader"; - case PipelineStageFlagBits2::eGeometryShader: return "GeometryShader"; - case PipelineStageFlagBits2::eFragmentShader: return "FragmentShader"; - case PipelineStageFlagBits2::eEarlyFragmentTests: return "EarlyFragmentTests"; - case PipelineStageFlagBits2::eLateFragmentTests: return "LateFragmentTests"; - case PipelineStageFlagBits2::eColorAttachmentOutput: return "ColorAttachmentOutput"; - case PipelineStageFlagBits2::eComputeShader: return "ComputeShader"; - case PipelineStageFlagBits2::eAllTransfer: return "AllTransfer"; - case PipelineStageFlagBits2::eBottomOfPipe: return "BottomOfPipe"; - case PipelineStageFlagBits2::eHost: return "Host"; - case PipelineStageFlagBits2::eAllGraphics: return "AllGraphics"; - case PipelineStageFlagBits2::eAllCommands: return "AllCommands"; - case PipelineStageFlagBits2::eCopy: return "Copy"; - case PipelineStageFlagBits2::eResolve: return "Resolve"; - case PipelineStageFlagBits2::eBlit: return "Blit"; - case PipelineStageFlagBits2::eClear: return "Clear"; - case PipelineStageFlagBits2::eIndexInput: return "IndexInput"; - case PipelineStageFlagBits2::eVertexAttributeInput: return "VertexAttributeInput"; - case PipelineStageFlagBits2::ePreRasterizationShaders: return "PreRasterizationShaders"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case PipelineStageFlagBits2::eVideoDecodeKHR: return "VideoDecodeKHR"; - case PipelineStageFlagBits2::eVideoEncodeKHR: return "VideoEncodeKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case PipelineStageFlagBits2::eTransformFeedbackEXT: return "TransformFeedbackEXT"; - case PipelineStageFlagBits2::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; - case PipelineStageFlagBits2::eCommandPreprocessNV: return "CommandPreprocessNV"; - case PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; - case PipelineStageFlagBits2::eAccelerationStructureBuildKHR: return "AccelerationStructureBuildKHR"; - case PipelineStageFlagBits2::eRayTracingShaderKHR: return "RayTracingShaderKHR"; - case PipelineStageFlagBits2::eFragmentDensityProcessEXT: return "FragmentDensityProcessEXT"; - case PipelineStageFlagBits2::eTaskShaderEXT: return "TaskShaderEXT"; - case PipelineStageFlagBits2::eMeshShaderEXT: return "MeshShaderEXT"; - case PipelineStageFlagBits2::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI"; - case PipelineStageFlagBits2::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI"; - case PipelineStageFlagBits2::eAccelerationStructureCopyKHR: return "AccelerationStructureCopyKHR"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AccessFlagBits2 value ) - { - switch ( value ) - { - case AccessFlagBits2::eNone: return "None"; - case AccessFlagBits2::eIndirectCommandRead: return "IndirectCommandRead"; - case AccessFlagBits2::eIndexRead: return "IndexRead"; - case AccessFlagBits2::eVertexAttributeRead: return "VertexAttributeRead"; - case AccessFlagBits2::eUniformRead: return "UniformRead"; - case AccessFlagBits2::eInputAttachmentRead: return "InputAttachmentRead"; - case AccessFlagBits2::eShaderRead: return "ShaderRead"; - case AccessFlagBits2::eShaderWrite: return "ShaderWrite"; - case AccessFlagBits2::eColorAttachmentRead: return "ColorAttachmentRead"; - case AccessFlagBits2::eColorAttachmentWrite: return "ColorAttachmentWrite"; - case AccessFlagBits2::eDepthStencilAttachmentRead: return "DepthStencilAttachmentRead"; - case AccessFlagBits2::eDepthStencilAttachmentWrite: return "DepthStencilAttachmentWrite"; - case AccessFlagBits2::eTransferRead: return "TransferRead"; - case AccessFlagBits2::eTransferWrite: return "TransferWrite"; - case AccessFlagBits2::eHostRead: return "HostRead"; - case AccessFlagBits2::eHostWrite: return "HostWrite"; - case AccessFlagBits2::eMemoryRead: return "MemoryRead"; - case AccessFlagBits2::eMemoryWrite: return "MemoryWrite"; - case AccessFlagBits2::eShaderSampledRead: return "ShaderSampledRead"; - case AccessFlagBits2::eShaderStorageRead: return "ShaderStorageRead"; - case AccessFlagBits2::eShaderStorageWrite: return "ShaderStorageWrite"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case AccessFlagBits2::eVideoDecodeReadKHR: return "VideoDecodeReadKHR"; - case AccessFlagBits2::eVideoDecodeWriteKHR: return "VideoDecodeWriteKHR"; - case AccessFlagBits2::eVideoEncodeReadKHR: return "VideoEncodeReadKHR"; - case AccessFlagBits2::eVideoEncodeWriteKHR: return "VideoEncodeWriteKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case AccessFlagBits2::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT"; - case AccessFlagBits2::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT"; - case AccessFlagBits2::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT"; - case AccessFlagBits2::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT"; - case AccessFlagBits2::eCommandPreprocessReadNV: return "CommandPreprocessReadNV"; - case AccessFlagBits2::eCommandPreprocessWriteNV: return "CommandPreprocessWriteNV"; - case AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR: return "FragmentShadingRateAttachmentReadKHR"; - case AccessFlagBits2::eAccelerationStructureReadKHR: return "AccelerationStructureReadKHR"; - case AccessFlagBits2::eAccelerationStructureWriteKHR: return "AccelerationStructureWriteKHR"; - case AccessFlagBits2::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT"; - case AccessFlagBits2::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT"; - case AccessFlagBits2::eInvocationMaskReadHUAWEI: return "InvocationMaskReadHUAWEI"; - case AccessFlagBits2::eShaderBindingTableReadKHR: return "ShaderBindingTableReadKHR"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( SubmitFlagBits value ) - { - switch ( value ) - { - case SubmitFlagBits::eProtected: return "Protected"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( RenderingFlagBits value ) - { - switch ( value ) - { - case RenderingFlagBits::eContentsSecondaryCommandBuffers: return "ContentsSecondaryCommandBuffers"; - case RenderingFlagBits::eSuspending: return "Suspending"; - case RenderingFlagBits::eResuming: return "Resuming"; - case RenderingFlagBits::eEnableLegacyDitheringEXT: return "EnableLegacyDitheringEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlagBits2 value ) - { - switch ( value ) - { - case FormatFeatureFlagBits2::eSampledImage: return "SampledImage"; - case FormatFeatureFlagBits2::eStorageImage: return "StorageImage"; - case FormatFeatureFlagBits2::eStorageImageAtomic: return "StorageImageAtomic"; - case FormatFeatureFlagBits2::eUniformTexelBuffer: return "UniformTexelBuffer"; - case FormatFeatureFlagBits2::eStorageTexelBuffer: return "StorageTexelBuffer"; - case FormatFeatureFlagBits2::eStorageTexelBufferAtomic: return "StorageTexelBufferAtomic"; - case FormatFeatureFlagBits2::eVertexBuffer: return "VertexBuffer"; - case FormatFeatureFlagBits2::eColorAttachment: return "ColorAttachment"; - case FormatFeatureFlagBits2::eColorAttachmentBlend: return "ColorAttachmentBlend"; - case FormatFeatureFlagBits2::eDepthStencilAttachment: return "DepthStencilAttachment"; - case FormatFeatureFlagBits2::eBlitSrc: return "BlitSrc"; - case FormatFeatureFlagBits2::eBlitDst: return "BlitDst"; - case FormatFeatureFlagBits2::eSampledImageFilterLinear: return "SampledImageFilterLinear"; - case FormatFeatureFlagBits2::eSampledImageFilterCubic: return "SampledImageFilterCubic"; - case FormatFeatureFlagBits2::eTransferSrc: return "TransferSrc"; - case FormatFeatureFlagBits2::eTransferDst: return "TransferDst"; - case FormatFeatureFlagBits2::eSampledImageFilterMinmax: return "SampledImageFilterMinmax"; - case FormatFeatureFlagBits2::eMidpointChromaSamples: return "MidpointChromaSamples"; - case FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter: return "SampledImageYcbcrConversionLinearFilter"; - case FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter: return "SampledImageYcbcrConversionSeparateReconstructionFilter"; - case FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit: return "SampledImageYcbcrConversionChromaReconstructionExplicit"; - case FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable: - return "SampledImageYcbcrConversionChromaReconstructionExplicitForceable"; - case FormatFeatureFlagBits2::eDisjoint: return "Disjoint"; - case FormatFeatureFlagBits2::eCositedChromaSamples: return "CositedChromaSamples"; - case FormatFeatureFlagBits2::eStorageReadWithoutFormat: return "StorageReadWithoutFormat"; - case FormatFeatureFlagBits2::eStorageWriteWithoutFormat: return "StorageWriteWithoutFormat"; - case FormatFeatureFlagBits2::eSampledImageDepthComparison: return "SampledImageDepthComparison"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case FormatFeatureFlagBits2::eVideoDecodeOutputKHR: return "VideoDecodeOutputKHR"; - case FormatFeatureFlagBits2::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR: return "AccelerationStructureVertexBufferKHR"; - case FormatFeatureFlagBits2::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; - case FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - case FormatFeatureFlagBits2::eVideoEncodeInputKHR: return "VideoEncodeInputKHR"; - case FormatFeatureFlagBits2::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - case FormatFeatureFlagBits2::eLinearColorAttachmentNV: return "LinearColorAttachmentNV"; - case FormatFeatureFlagBits2::eWeightImageQCOM: return "WeightImageQCOM"; - case FormatFeatureFlagBits2::eWeightSampledImageQCOM: return "WeightSampledImageQCOM"; - case FormatFeatureFlagBits2::eBlockMatchingQCOM: return "BlockMatchingQCOM"; - case FormatFeatureFlagBits2::eBoxFilterSampledQCOM: return "BoxFilterSampledQCOM"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_KHR_surface === - - VULKAN_HPP_INLINE std::string to_string( SurfaceTransformFlagBitsKHR value ) - { - switch ( value ) - { - case SurfaceTransformFlagBitsKHR::eIdentity: return "Identity"; - case SurfaceTransformFlagBitsKHR::eRotate90: return "Rotate90"; - case SurfaceTransformFlagBitsKHR::eRotate180: return "Rotate180"; - case SurfaceTransformFlagBitsKHR::eRotate270: return "Rotate270"; - case SurfaceTransformFlagBitsKHR::eHorizontalMirror: return "HorizontalMirror"; - case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90: return "HorizontalMirrorRotate90"; - case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180: return "HorizontalMirrorRotate180"; - case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270: return "HorizontalMirrorRotate270"; - case SurfaceTransformFlagBitsKHR::eInherit: return "Inherit"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PresentModeKHR value ) - { - switch ( value ) - { - case PresentModeKHR::eImmediate: return "Immediate"; - case PresentModeKHR::eMailbox: return "Mailbox"; - case PresentModeKHR::eFifo: return "Fifo"; - case PresentModeKHR::eFifoRelaxed: return "FifoRelaxed"; - case PresentModeKHR::eSharedDemandRefresh: return "SharedDemandRefresh"; - case PresentModeKHR::eSharedContinuousRefresh: return "SharedContinuousRefresh"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ColorSpaceKHR value ) - { - switch ( value ) - { - case ColorSpaceKHR::eSrgbNonlinear: return "SrgbNonlinear"; - case ColorSpaceKHR::eDisplayP3NonlinearEXT: return "DisplayP3NonlinearEXT"; - case ColorSpaceKHR::eExtendedSrgbLinearEXT: return "ExtendedSrgbLinearEXT"; - case ColorSpaceKHR::eDisplayP3LinearEXT: return "DisplayP3LinearEXT"; - case ColorSpaceKHR::eDciP3NonlinearEXT: return "DciP3NonlinearEXT"; - case ColorSpaceKHR::eBt709LinearEXT: return "Bt709LinearEXT"; - case ColorSpaceKHR::eBt709NonlinearEXT: return "Bt709NonlinearEXT"; - case ColorSpaceKHR::eBt2020LinearEXT: return "Bt2020LinearEXT"; - case ColorSpaceKHR::eHdr10St2084EXT: return "Hdr10St2084EXT"; - case ColorSpaceKHR::eDolbyvisionEXT: return "DolbyvisionEXT"; - case ColorSpaceKHR::eHdr10HlgEXT: return "Hdr10HlgEXT"; - case ColorSpaceKHR::eAdobergbLinearEXT: return "AdobergbLinearEXT"; - case ColorSpaceKHR::eAdobergbNonlinearEXT: return "AdobergbNonlinearEXT"; - case ColorSpaceKHR::ePassThroughEXT: return "PassThroughEXT"; - case ColorSpaceKHR::eExtendedSrgbNonlinearEXT: return "ExtendedSrgbNonlinearEXT"; - case ColorSpaceKHR::eDisplayNativeAMD: return "DisplayNativeAMD"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CompositeAlphaFlagBitsKHR value ) - { - switch ( value ) - { - case CompositeAlphaFlagBitsKHR::eOpaque: return "Opaque"; - case CompositeAlphaFlagBitsKHR::ePreMultiplied: return "PreMultiplied"; - case CompositeAlphaFlagBitsKHR::ePostMultiplied: return "PostMultiplied"; - case CompositeAlphaFlagBitsKHR::eInherit: return "Inherit"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_KHR_swapchain === - - VULKAN_HPP_INLINE std::string to_string( SwapchainCreateFlagBitsKHR value ) - { - switch ( value ) - { - case SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions: return "SplitInstanceBindRegions"; - case SwapchainCreateFlagBitsKHR::eProtected: return "Protected"; - case SwapchainCreateFlagBitsKHR::eMutableFormat: return "MutableFormat"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DeviceGroupPresentModeFlagBitsKHR value ) - { - switch ( value ) - { - case DeviceGroupPresentModeFlagBitsKHR::eLocal: return "Local"; - case DeviceGroupPresentModeFlagBitsKHR::eRemote: return "Remote"; - case DeviceGroupPresentModeFlagBitsKHR::eSum: return "Sum"; - case DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice: return "LocalMultiDevice"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_KHR_display === - - VULKAN_HPP_INLINE std::string to_string( DisplayPlaneAlphaFlagBitsKHR value ) - { - switch ( value ) - { - case DisplayPlaneAlphaFlagBitsKHR::eOpaque: return "Opaque"; - case DisplayPlaneAlphaFlagBitsKHR::eGlobal: return "Global"; - case DisplayPlaneAlphaFlagBitsKHR::ePerPixel: return "PerPixel"; - case DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied: return "PerPixelPremultiplied"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DisplayModeCreateFlagBitsKHR ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( DisplaySurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } - -#if defined( VK_USE_PLATFORM_XLIB_KHR ) - //=== VK_KHR_xlib_surface === - - VULKAN_HPP_INLINE std::string to_string( XlibSurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - -#if defined( VK_USE_PLATFORM_XCB_KHR ) - //=== VK_KHR_xcb_surface === - - VULKAN_HPP_INLINE std::string to_string( XcbSurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - -#if defined( VK_USE_PLATFORM_WAYLAND_KHR ) - //=== VK_KHR_wayland_surface === - - VULKAN_HPP_INLINE std::string to_string( WaylandSurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - //=== VK_KHR_android_surface === - - VULKAN_HPP_INLINE std::string to_string( AndroidSurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_KHR_win32_surface === - - VULKAN_HPP_INLINE std::string to_string( Win32SurfaceCreateFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_debug_report === - - VULKAN_HPP_INLINE std::string to_string( DebugReportFlagBitsEXT value ) - { - switch ( value ) - { - case DebugReportFlagBitsEXT::eInformation: return "Information"; - case DebugReportFlagBitsEXT::eWarning: return "Warning"; - case DebugReportFlagBitsEXT::ePerformanceWarning: return "PerformanceWarning"; - case DebugReportFlagBitsEXT::eError: return "Error"; - case DebugReportFlagBitsEXT::eDebug: return "Debug"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DebugReportObjectTypeEXT value ) - { - switch ( value ) - { - case DebugReportObjectTypeEXT::eUnknown: return "Unknown"; - case DebugReportObjectTypeEXT::eInstance: return "Instance"; - case DebugReportObjectTypeEXT::ePhysicalDevice: return "PhysicalDevice"; - case DebugReportObjectTypeEXT::eDevice: return "Device"; - case DebugReportObjectTypeEXT::eQueue: return "Queue"; - case DebugReportObjectTypeEXT::eSemaphore: return "Semaphore"; - case DebugReportObjectTypeEXT::eCommandBuffer: return "CommandBuffer"; - case DebugReportObjectTypeEXT::eFence: return "Fence"; - case DebugReportObjectTypeEXT::eDeviceMemory: return "DeviceMemory"; - case DebugReportObjectTypeEXT::eBuffer: return "Buffer"; - case DebugReportObjectTypeEXT::eImage: return "Image"; - case DebugReportObjectTypeEXT::eEvent: return "Event"; - case DebugReportObjectTypeEXT::eQueryPool: return "QueryPool"; - case DebugReportObjectTypeEXT::eBufferView: return "BufferView"; - case DebugReportObjectTypeEXT::eImageView: return "ImageView"; - case DebugReportObjectTypeEXT::eShaderModule: return "ShaderModule"; - case DebugReportObjectTypeEXT::ePipelineCache: return "PipelineCache"; - case DebugReportObjectTypeEXT::ePipelineLayout: return "PipelineLayout"; - case DebugReportObjectTypeEXT::eRenderPass: return "RenderPass"; - case DebugReportObjectTypeEXT::ePipeline: return "Pipeline"; - case DebugReportObjectTypeEXT::eDescriptorSetLayout: return "DescriptorSetLayout"; - case DebugReportObjectTypeEXT::eSampler: return "Sampler"; - case DebugReportObjectTypeEXT::eDescriptorPool: return "DescriptorPool"; - case DebugReportObjectTypeEXT::eDescriptorSet: return "DescriptorSet"; - case DebugReportObjectTypeEXT::eFramebuffer: return "Framebuffer"; - case DebugReportObjectTypeEXT::eCommandPool: return "CommandPool"; - case DebugReportObjectTypeEXT::eSurfaceKHR: return "SurfaceKHR"; - case DebugReportObjectTypeEXT::eSwapchainKHR: return "SwapchainKHR"; - case DebugReportObjectTypeEXT::eDebugReportCallbackEXT: return "DebugReportCallbackEXT"; - case DebugReportObjectTypeEXT::eDisplayKHR: return "DisplayKHR"; - case DebugReportObjectTypeEXT::eDisplayModeKHR: return "DisplayModeKHR"; - case DebugReportObjectTypeEXT::eValidationCacheEXT: return "ValidationCacheEXT"; - case DebugReportObjectTypeEXT::eSamplerYcbcrConversion: return "SamplerYcbcrConversion"; - case DebugReportObjectTypeEXT::eDescriptorUpdateTemplate: return "DescriptorUpdateTemplate"; - case DebugReportObjectTypeEXT::eCuModuleNVX: return "CuModuleNVX"; - case DebugReportObjectTypeEXT::eCuFunctionNVX: return "CuFunctionNVX"; - case DebugReportObjectTypeEXT::eAccelerationStructureKHR: return "AccelerationStructureKHR"; - case DebugReportObjectTypeEXT::eAccelerationStructureNV: return "AccelerationStructureNV"; -#if defined( VK_USE_PLATFORM_FUCHSIA ) - case DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA: return "BufferCollectionFUCHSIA"; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_AMD_rasterization_order === - - VULKAN_HPP_INLINE std::string to_string( RasterizationOrderAMD value ) - { - switch ( value ) - { - case RasterizationOrderAMD::eStrict: return "Strict"; - case RasterizationOrderAMD::eRelaxed: return "Relaxed"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagBitsKHR value ) - { - switch ( value ) - { - case VideoCodecOperationFlagBitsKHR::eNone: return "None"; -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case VideoCodecOperationFlagBitsKHR::eEncodeH264EXT: return "EncodeH264EXT"; - case VideoCodecOperationFlagBitsKHR::eEncodeH265EXT: return "EncodeH265EXT"; - case VideoCodecOperationFlagBitsKHR::eDecodeH264EXT: return "DecodeH264EXT"; - case VideoCodecOperationFlagBitsKHR::eDecodeH265EXT: return "DecodeH265EXT"; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagBitsKHR value ) - { - switch ( value ) - { - case VideoChromaSubsamplingFlagBitsKHR::eInvalid: return "Invalid"; - case VideoChromaSubsamplingFlagBitsKHR::eMonochrome: return "Monochrome"; - case VideoChromaSubsamplingFlagBitsKHR::e420: return "420"; - case VideoChromaSubsamplingFlagBitsKHR::e422: return "422"; - case VideoChromaSubsamplingFlagBitsKHR::e444: return "444"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagBitsKHR value ) - { - switch ( value ) - { - case VideoComponentBitDepthFlagBitsKHR::eInvalid: return "Invalid"; - case VideoComponentBitDepthFlagBitsKHR::e8: return "8"; - case VideoComponentBitDepthFlagBitsKHR::e10: return "10"; - case VideoComponentBitDepthFlagBitsKHR::e12: return "12"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagBitsKHR value ) - { - switch ( value ) - { - case VideoCapabilityFlagBitsKHR::eProtectedContent: return "ProtectedContent"; - case VideoCapabilityFlagBitsKHR::eSeparateReferenceImages: return "SeparateReferenceImages"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoSessionCreateFlagBitsKHR value ) - { - switch ( value ) - { - case VideoSessionCreateFlagBitsKHR::eProtectedContent: return "ProtectedContent"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoCodingControlFlagBitsKHR value ) - { - switch ( value ) - { - case VideoCodingControlFlagBitsKHR::eReset: return "Reset"; -# if defined( VK_ENABLE_BETA_EXTENSIONS ) - case VideoCodingControlFlagBitsKHR::eEncodeRateControl: return "EncodeRateControl"; - case VideoCodingControlFlagBitsKHR::eEncodeRateControlLayer: return "EncodeRateControlLayer"; -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryResultStatusKHR value ) - { - switch ( value ) - { - case QueryResultStatusKHR::eError: return "Error"; - case QueryResultStatusKHR::eNotReady: return "NotReady"; - case QueryResultStatusKHR::eComplete: return "Complete"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoSessionParametersCreateFlagBitsKHR ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoBeginCodingFlagBitsKHR ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEndCodingFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_decode_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeCapabilityFlagBitsKHR value ) - { - switch ( value ) - { - case VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide: return "DpbAndOutputCoincide"; - case VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct: return "DpbAndOutputDistinct"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagBitsKHR value ) - { - switch ( value ) - { - case VideoDecodeUsageFlagBitsKHR::eDefault: return "Default"; - case VideoDecodeUsageFlagBitsKHR::eTranscoding: return "Transcoding"; - case VideoDecodeUsageFlagBitsKHR::eOffline: return "Offline"; - case VideoDecodeUsageFlagBitsKHR::eStreaming: return "Streaming"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_EXT_transform_feedback === - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateStreamCreateFlagBitsEXT ) - { - return "(void)"; - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h264 === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceEnabled: return "Direct8X8InferenceEnabled"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDirect8X8InferenceDisabled: return "Direct8X8InferenceDisabled"; - case VideoEncodeH264CapabilityFlagBitsEXT::eSeparateColourPlane: return "SeparateColourPlane"; - case VideoEncodeH264CapabilityFlagBitsEXT::eQpprimeYZeroTransformBypass: return "QpprimeYZeroTransformBypass"; - case VideoEncodeH264CapabilityFlagBitsEXT::eScalingLists: return "ScalingLists"; - case VideoEncodeH264CapabilityFlagBitsEXT::eHrdCompliance: return "HrdCompliance"; - case VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset: return "ChromaQpOffset"; - case VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset: return "SecondChromaQpOffset"; - case VideoEncodeH264CapabilityFlagBitsEXT::ePicInitQpMinus26: return "PicInitQpMinus26"; - case VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPred: return "WeightedPred"; - case VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredExplicit: return "WeightedBipredExplicit"; - case VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBipredImplicit: return "WeightedBipredImplicit"; - case VideoEncodeH264CapabilityFlagBitsEXT::eWeightedPredNoTable: return "WeightedPredNoTable"; - case VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8: return "Transform8X8"; - case VideoEncodeH264CapabilityFlagBitsEXT::eCabac: return "Cabac"; - case VideoEncodeH264CapabilityFlagBitsEXT::eCavlc: return "Cavlc"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled: return "DeblockingFilterDisabled"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled: return "DeblockingFilterEnabled"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial: return "DeblockingFilterPartial"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDisableDirectSpatialMvPred: return "DisableDirectSpatialMvPred"; - case VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame: return "MultipleSlicePerFrame"; - case VideoEncodeH264CapabilityFlagBitsEXT::eSliceMbCount: return "SliceMbCount"; - case VideoEncodeH264CapabilityFlagBitsEXT::eRowUnalignedSlice: return "RowUnalignedSlice"; - case VideoEncodeH264CapabilityFlagBitsEXT::eDifferentSliceType: return "DifferentSliceType"; - case VideoEncodeH264CapabilityFlagBitsEXT::eBFrameInL1List: return "BFrameInL1List"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264InputModeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH264InputModeFlagBitsEXT::eFrame: return "Frame"; - case VideoEncodeH264InputModeFlagBitsEXT::eSlice: return "Slice"; - case VideoEncodeH264InputModeFlagBitsEXT::eNonVcl: return "NonVcl"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264OutputModeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH264OutputModeFlagBitsEXT::eFrame: return "Frame"; - case VideoEncodeH264OutputModeFlagBitsEXT::eSlice: return "Slice"; - case VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl: return "NonVcl"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264RateControlStructureEXT value ) - { - switch ( value ) - { - case VideoEncodeH264RateControlStructureEXT::eUnknown: return "Unknown"; - case VideoEncodeH264RateControlStructureEXT::eFlat: return "Flat"; - case VideoEncodeH264RateControlStructureEXT::eDyadic: return "Dyadic"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_encode_h265 === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CapabilityFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH265CapabilityFlagBitsEXT::eSeparateColourPlane: return "SeparateColourPlane"; - case VideoEncodeH265CapabilityFlagBitsEXT::eScalingLists: return "ScalingLists"; - case VideoEncodeH265CapabilityFlagBitsEXT::eSampleAdaptiveOffsetEnabled: return "SampleAdaptiveOffsetEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::ePcmEnable: return "PcmEnable"; - case VideoEncodeH265CapabilityFlagBitsEXT::eSpsTemporalMvpEnabled: return "SpsTemporalMvpEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eHrdCompliance: return "HrdCompliance"; - case VideoEncodeH265CapabilityFlagBitsEXT::eInitQpMinus26: return "InitQpMinus26"; - case VideoEncodeH265CapabilityFlagBitsEXT::eLog2ParallelMergeLevelMinus2: return "Log2ParallelMergeLevelMinus2"; - case VideoEncodeH265CapabilityFlagBitsEXT::eSignDataHidingEnabled: return "SignDataHidingEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipEnabled: return "TransformSkipEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eTransformSkipDisabled: return "TransformSkipDisabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::ePpsSliceChromaQpOffsetsPresent: return "PpsSliceChromaQpOffsetsPresent"; - case VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPred: return "WeightedPred"; - case VideoEncodeH265CapabilityFlagBitsEXT::eWeightedBipred: return "WeightedBipred"; - case VideoEncodeH265CapabilityFlagBitsEXT::eWeightedPredNoTable: return "WeightedPredNoTable"; - case VideoEncodeH265CapabilityFlagBitsEXT::eTransquantBypassEnabled: return "TransquantBypassEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eEntropyCodingSyncEnabled: return "EntropyCodingSyncEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eDeblockingFilterOverrideEnabled: return "DeblockingFilterOverrideEnabled"; - case VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerFrame: return "MultipleTilePerFrame"; - case VideoEncodeH265CapabilityFlagBitsEXT::eMultipleSlicePerTile: return "MultipleSlicePerTile"; - case VideoEncodeH265CapabilityFlagBitsEXT::eMultipleTilePerSlice: return "MultipleTilePerSlice"; - case VideoEncodeH265CapabilityFlagBitsEXT::eSliceSegmentCtbCount: return "SliceSegmentCtbCount"; - case VideoEncodeH265CapabilityFlagBitsEXT::eRowUnalignedSliceSegment: return "RowUnalignedSliceSegment"; - case VideoEncodeH265CapabilityFlagBitsEXT::eDependentSliceSegment: return "DependentSliceSegment"; - case VideoEncodeH265CapabilityFlagBitsEXT::eDifferentSliceType: return "DifferentSliceType"; - case VideoEncodeH265CapabilityFlagBitsEXT::eBFrameInL1List: return "BFrameInL1List"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265InputModeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH265InputModeFlagBitsEXT::eFrame: return "Frame"; - case VideoEncodeH265InputModeFlagBitsEXT::eSliceSegment: return "SliceSegment"; - case VideoEncodeH265InputModeFlagBitsEXT::eNonVcl: return "NonVcl"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265OutputModeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH265OutputModeFlagBitsEXT::eFrame: return "Frame"; - case VideoEncodeH265OutputModeFlagBitsEXT::eSliceSegment: return "SliceSegment"; - case VideoEncodeH265OutputModeFlagBitsEXT::eNonVcl: return "NonVcl"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CtbSizeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH265CtbSizeFlagBitsEXT::e16: return "16"; - case VideoEncodeH265CtbSizeFlagBitsEXT::e32: return "32"; - case VideoEncodeH265CtbSizeFlagBitsEXT::e64: return "64"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265TransformBlockSizeFlagBitsEXT value ) - { - switch ( value ) - { - case VideoEncodeH265TransformBlockSizeFlagBitsEXT::e4: return "4"; - case VideoEncodeH265TransformBlockSizeFlagBitsEXT::e8: return "8"; - case VideoEncodeH265TransformBlockSizeFlagBitsEXT::e16: return "16"; - case VideoEncodeH265TransformBlockSizeFlagBitsEXT::e32: return "32"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265RateControlStructureEXT value ) - { - switch ( value ) - { - case VideoEncodeH265RateControlStructureEXT::eUnknown: return "Unknown"; - case VideoEncodeH265RateControlStructureEXT::eFlat: return "Flat"; - case VideoEncodeH265RateControlStructureEXT::eDyadic: return "Dyadic"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_EXT_video_decode_h264 === - - VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagBitsEXT value ) - { - switch ( value ) - { - case VideoDecodeH264PictureLayoutFlagBitsEXT::eProgressive: return "Progressive"; - case VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines: return "InterlacedInterleavedLines"; - case VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes: return "InterlacedSeparatePlanes"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_AMD_shader_info === - - VULKAN_HPP_INLINE std::string to_string( ShaderInfoTypeAMD value ) - { - switch ( value ) - { - case ShaderInfoTypeAMD::eStatistics: return "Statistics"; - case ShaderInfoTypeAMD::eBinary: return "Binary"; - case ShaderInfoTypeAMD::eDisassembly: return "Disassembly"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_GGP ) - //=== VK_GGP_stream_descriptor_surface === - - VULKAN_HPP_INLINE std::string to_string( StreamDescriptorSurfaceCreateFlagBitsGGP ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_GGP*/ - - //=== VK_NV_external_memory_capabilities === - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagBitsNV value ) - { - switch ( value ) - { - case ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32: return "OpaqueWin32"; - case ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; - case ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image: return "D3D11Image"; - case ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt: return "D3D11ImageKmt"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagBitsNV value ) - { - switch ( value ) - { - case ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly: return "DedicatedOnly"; - case ExternalMemoryFeatureFlagBitsNV::eExportable: return "Exportable"; - case ExternalMemoryFeatureFlagBitsNV::eImportable: return "Importable"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_validation_flags === - - VULKAN_HPP_INLINE std::string to_string( ValidationCheckEXT value ) - { - switch ( value ) - { - case ValidationCheckEXT::eAll: return "All"; - case ValidationCheckEXT::eShaders: return "Shaders"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_VI_NN ) - //=== VK_NN_vi_surface === - - VULKAN_HPP_INLINE std::string to_string( ViSurfaceCreateFlagBitsNN ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_VI_NN*/ - - //=== VK_EXT_pipeline_robustness === - - VULKAN_HPP_INLINE std::string to_string( PipelineRobustnessBufferBehaviorEXT value ) - { - switch ( value ) - { - case PipelineRobustnessBufferBehaviorEXT::eDeviceDefault: return "DeviceDefault"; - case PipelineRobustnessBufferBehaviorEXT::eDisabled: return "Disabled"; - case PipelineRobustnessBufferBehaviorEXT::eRobustBufferAccess: return "RobustBufferAccess"; - case PipelineRobustnessBufferBehaviorEXT::eRobustBufferAccess2: return "RobustBufferAccess2"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineRobustnessImageBehaviorEXT value ) - { - switch ( value ) - { - case PipelineRobustnessImageBehaviorEXT::eDeviceDefault: return "DeviceDefault"; - case PipelineRobustnessImageBehaviorEXT::eDisabled: return "Disabled"; - case PipelineRobustnessImageBehaviorEXT::eRobustImageAccess: return "RobustImageAccess"; - case PipelineRobustnessImageBehaviorEXT::eRobustImageAccess2: return "RobustImageAccess2"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_conditional_rendering === - - VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagBitsEXT value ) - { - switch ( value ) - { - case ConditionalRenderingFlagBitsEXT::eInverted: return "Inverted"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_display_surface_counter === - - VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagBitsEXT value ) - { - switch ( value ) - { - case SurfaceCounterFlagBitsEXT::eVblank: return "Vblank"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_display_control === - - VULKAN_HPP_INLINE std::string to_string( DisplayPowerStateEXT value ) - { - switch ( value ) - { - case DisplayPowerStateEXT::eOff: return "Off"; - case DisplayPowerStateEXT::eSuspend: return "Suspend"; - case DisplayPowerStateEXT::eOn: return "On"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DeviceEventTypeEXT value ) - { - switch ( value ) - { - case DeviceEventTypeEXT::eDisplayHotplug: return "DisplayHotplug"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DisplayEventTypeEXT value ) - { - switch ( value ) - { - case DisplayEventTypeEXT::eFirstPixelOut: return "FirstPixelOut"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_viewport_swizzle === - - VULKAN_HPP_INLINE std::string to_string( ViewportCoordinateSwizzleNV value ) - { - switch ( value ) - { - case ViewportCoordinateSwizzleNV::ePositiveX: return "PositiveX"; - case ViewportCoordinateSwizzleNV::eNegativeX: return "NegativeX"; - case ViewportCoordinateSwizzleNV::ePositiveY: return "PositiveY"; - case ViewportCoordinateSwizzleNV::eNegativeY: return "NegativeY"; - case ViewportCoordinateSwizzleNV::ePositiveZ: return "PositiveZ"; - case ViewportCoordinateSwizzleNV::eNegativeZ: return "NegativeZ"; - case ViewportCoordinateSwizzleNV::ePositiveW: return "PositiveW"; - case ViewportCoordinateSwizzleNV::eNegativeW: return "NegativeW"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineViewportSwizzleStateCreateFlagBitsNV ) - { - return "(void)"; - } - - //=== VK_EXT_discard_rectangles === - - VULKAN_HPP_INLINE std::string to_string( DiscardRectangleModeEXT value ) - { - switch ( value ) - { - case DiscardRectangleModeEXT::eInclusive: return "Inclusive"; - case DiscardRectangleModeEXT::eExclusive: return "Exclusive"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDiscardRectangleStateCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_EXT_conservative_rasterization === - - VULKAN_HPP_INLINE std::string to_string( ConservativeRasterizationModeEXT value ) - { - switch ( value ) - { - case ConservativeRasterizationModeEXT::eDisabled: return "Disabled"; - case ConservativeRasterizationModeEXT::eOverestimate: return "Overestimate"; - case ConservativeRasterizationModeEXT::eUnderestimate: return "Underestimate"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationConservativeStateCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_EXT_depth_clip_enable === - - VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationDepthClipStateCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_KHR_performance_query === - - VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagBitsKHR value ) - { - switch ( value ) - { - case PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting: return "PerformanceImpacting"; - case PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted: return "ConcurrentlyImpacted"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceCounterScopeKHR value ) - { - switch ( value ) - { - case PerformanceCounterScopeKHR::eCommandBuffer: return "CommandBuffer"; - case PerformanceCounterScopeKHR::eRenderPass: return "RenderPass"; - case PerformanceCounterScopeKHR::eCommand: return "Command"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceCounterStorageKHR value ) - { - switch ( value ) - { - case PerformanceCounterStorageKHR::eInt32: return "Int32"; - case PerformanceCounterStorageKHR::eInt64: return "Int64"; - case PerformanceCounterStorageKHR::eUint32: return "Uint32"; - case PerformanceCounterStorageKHR::eUint64: return "Uint64"; - case PerformanceCounterStorageKHR::eFloat32: return "Float32"; - case PerformanceCounterStorageKHR::eFloat64: return "Float64"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceCounterUnitKHR value ) - { - switch ( value ) - { - case PerformanceCounterUnitKHR::eGeneric: return "Generic"; - case PerformanceCounterUnitKHR::ePercentage: return "Percentage"; - case PerformanceCounterUnitKHR::eNanoseconds: return "Nanoseconds"; - case PerformanceCounterUnitKHR::eBytes: return "Bytes"; - case PerformanceCounterUnitKHR::eBytesPerSecond: return "BytesPerSecond"; - case PerformanceCounterUnitKHR::eKelvin: return "Kelvin"; - case PerformanceCounterUnitKHR::eWatts: return "Watts"; - case PerformanceCounterUnitKHR::eVolts: return "Volts"; - case PerformanceCounterUnitKHR::eAmps: return "Amps"; - case PerformanceCounterUnitKHR::eHertz: return "Hertz"; - case PerformanceCounterUnitKHR::eCycles: return "Cycles"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagBitsKHR ) - { - return "(void)"; - } - -#if defined( VK_USE_PLATFORM_IOS_MVK ) - //=== VK_MVK_ios_surface === - - VULKAN_HPP_INLINE std::string to_string( IOSSurfaceCreateFlagBitsMVK ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_IOS_MVK*/ - -#if defined( VK_USE_PLATFORM_MACOS_MVK ) - //=== VK_MVK_macos_surface === - - VULKAN_HPP_INLINE std::string to_string( MacOSSurfaceCreateFlagBitsMVK ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_MACOS_MVK*/ - - //=== VK_EXT_debug_utils === - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageSeverityFlagBitsEXT value ) - { - switch ( value ) - { - case DebugUtilsMessageSeverityFlagBitsEXT::eVerbose: return "Verbose"; - case DebugUtilsMessageSeverityFlagBitsEXT::eInfo: return "Info"; - case DebugUtilsMessageSeverityFlagBitsEXT::eWarning: return "Warning"; - case DebugUtilsMessageSeverityFlagBitsEXT::eError: return "Error"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageTypeFlagBitsEXT value ) - { - switch ( value ) - { - case DebugUtilsMessageTypeFlagBitsEXT::eGeneral: return "General"; - case DebugUtilsMessageTypeFlagBitsEXT::eValidation: return "Validation"; - case DebugUtilsMessageTypeFlagBitsEXT::ePerformance: return "Performance"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCallbackDataFlagBitsEXT ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_EXT_blend_operation_advanced === - - VULKAN_HPP_INLINE std::string to_string( BlendOverlapEXT value ) - { - switch ( value ) - { - case BlendOverlapEXT::eUncorrelated: return "Uncorrelated"; - case BlendOverlapEXT::eDisjoint: return "Disjoint"; - case BlendOverlapEXT::eConjoint: return "Conjoint"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_fragment_coverage_to_color === - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageToColorStateCreateFlagBitsNV ) - { - return "(void)"; - } - - //=== VK_KHR_acceleration_structure === - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureTypeKHR value ) - { - switch ( value ) - { - case AccelerationStructureTypeKHR::eTopLevel: return "TopLevel"; - case AccelerationStructureTypeKHR::eBottomLevel: return "BottomLevel"; - case AccelerationStructureTypeKHR::eGeneric: return "Generic"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureBuildTypeKHR value ) - { - switch ( value ) - { - case AccelerationStructureBuildTypeKHR::eHost: return "Host"; - case AccelerationStructureBuildTypeKHR::eDevice: return "Device"; - case AccelerationStructureBuildTypeKHR::eHostOrDevice: return "HostOrDevice"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( GeometryFlagBitsKHR value ) - { - switch ( value ) - { - case GeometryFlagBitsKHR::eOpaque: return "Opaque"; - case GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation: return "NoDuplicateAnyHitInvocation"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagBitsKHR value ) - { - switch ( value ) - { - case GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable: return "TriangleFacingCullDisable"; - case GeometryInstanceFlagBitsKHR::eTriangleFlipFacing: return "TriangleFlipFacing"; - case GeometryInstanceFlagBitsKHR::eForceOpaque: return "ForceOpaque"; - case GeometryInstanceFlagBitsKHR::eForceNoOpaque: return "ForceNoOpaque"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagBitsKHR value ) - { - switch ( value ) - { - case BuildAccelerationStructureFlagBitsKHR::eAllowUpdate: return "AllowUpdate"; - case BuildAccelerationStructureFlagBitsKHR::eAllowCompaction: return "AllowCompaction"; - case BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace: return "PreferFastTrace"; - case BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild: return "PreferFastBuild"; - case BuildAccelerationStructureFlagBitsKHR::eLowMemory: return "LowMemory"; - case BuildAccelerationStructureFlagBitsKHR::eMotionNV: return "MotionNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CopyAccelerationStructureModeKHR value ) - { - switch ( value ) - { - case CopyAccelerationStructureModeKHR::eClone: return "Clone"; - case CopyAccelerationStructureModeKHR::eCompact: return "Compact"; - case CopyAccelerationStructureModeKHR::eSerialize: return "Serialize"; - case CopyAccelerationStructureModeKHR::eDeserialize: return "Deserialize"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( GeometryTypeKHR value ) - { - switch ( value ) - { - case GeometryTypeKHR::eTriangles: return "Triangles"; - case GeometryTypeKHR::eAabbs: return "Aabbs"; - case GeometryTypeKHR::eInstances: return "Instances"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCompatibilityKHR value ) - { - switch ( value ) - { - case AccelerationStructureCompatibilityKHR::eCompatible: return "Compatible"; - case AccelerationStructureCompatibilityKHR::eIncompatible: return "Incompatible"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCreateFlagBitsKHR value ) - { - switch ( value ) - { - case AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; - case AccelerationStructureCreateFlagBitsKHR::eMotionNV: return "MotionNV"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureModeKHR value ) - { - switch ( value ) - { - case BuildAccelerationStructureModeKHR::eBuild: return "Build"; - case BuildAccelerationStructureModeKHR::eUpdate: return "Update"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_framebuffer_mixed_samples === - - VULKAN_HPP_INLINE std::string to_string( CoverageModulationModeNV value ) - { - switch ( value ) - { - case CoverageModulationModeNV::eNone: return "None"; - case CoverageModulationModeNV::eRgb: return "Rgb"; - case CoverageModulationModeNV::eAlpha: return "Alpha"; - case CoverageModulationModeNV::eRgba: return "Rgba"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageModulationStateCreateFlagBitsNV ) - { - return "(void)"; - } - - //=== VK_EXT_validation_cache === - - VULKAN_HPP_INLINE std::string to_string( ValidationCacheHeaderVersionEXT value ) - { - switch ( value ) - { - case ValidationCacheHeaderVersionEXT::eOne: return "One"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ValidationCacheCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_NV_shading_rate_image === - - VULKAN_HPP_INLINE std::string to_string( ShadingRatePaletteEntryNV value ) - { - switch ( value ) - { - case ShadingRatePaletteEntryNV::eNoInvocations: return "NoInvocations"; - case ShadingRatePaletteEntryNV::e16InvocationsPerPixel: return "16InvocationsPerPixel"; - case ShadingRatePaletteEntryNV::e8InvocationsPerPixel: return "8InvocationsPerPixel"; - case ShadingRatePaletteEntryNV::e4InvocationsPerPixel: return "4InvocationsPerPixel"; - case ShadingRatePaletteEntryNV::e2InvocationsPerPixel: return "2InvocationsPerPixel"; - case ShadingRatePaletteEntryNV::e1InvocationPerPixel: return "1InvocationPerPixel"; - case ShadingRatePaletteEntryNV::e1InvocationPer2X1Pixels: return "1InvocationPer2X1Pixels"; - case ShadingRatePaletteEntryNV::e1InvocationPer1X2Pixels: return "1InvocationPer1X2Pixels"; - case ShadingRatePaletteEntryNV::e1InvocationPer2X2Pixels: return "1InvocationPer2X2Pixels"; - case ShadingRatePaletteEntryNV::e1InvocationPer4X2Pixels: return "1InvocationPer4X2Pixels"; - case ShadingRatePaletteEntryNV::e1InvocationPer2X4Pixels: return "1InvocationPer2X4Pixels"; - case ShadingRatePaletteEntryNV::e1InvocationPer4X4Pixels: return "1InvocationPer4X4Pixels"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( CoarseSampleOrderTypeNV value ) - { - switch ( value ) - { - case CoarseSampleOrderTypeNV::eDefault: return "Default"; - case CoarseSampleOrderTypeNV::eCustom: return "Custom"; - case CoarseSampleOrderTypeNV::ePixelMajor: return "PixelMajor"; - case CoarseSampleOrderTypeNV::eSampleMajor: return "SampleMajor"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_ray_tracing === - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMemoryRequirementsTypeNV value ) - { - switch ( value ) - { - case AccelerationStructureMemoryRequirementsTypeNV::eObject: return "Object"; - case AccelerationStructureMemoryRequirementsTypeNV::eBuildScratch: return "BuildScratch"; - case AccelerationStructureMemoryRequirementsTypeNV::eUpdateScratch: return "UpdateScratch"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_AMD_pipeline_compiler_control === - - VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagBitsAMD ) - { - return "(void)"; - } - - //=== VK_EXT_calibrated_timestamps === - - VULKAN_HPP_INLINE std::string to_string( TimeDomainEXT value ) - { - switch ( value ) - { - case TimeDomainEXT::eDevice: return "Device"; - case TimeDomainEXT::eClockMonotonic: return "ClockMonotonic"; - case TimeDomainEXT::eClockMonotonicRaw: return "ClockMonotonicRaw"; - case TimeDomainEXT::eQueryPerformanceCounter: return "QueryPerformanceCounter"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_KHR_global_priority === - - VULKAN_HPP_INLINE std::string to_string( QueueGlobalPriorityKHR value ) - { - switch ( value ) - { - case QueueGlobalPriorityKHR::eLow: return "Low"; - case QueueGlobalPriorityKHR::eMedium: return "Medium"; - case QueueGlobalPriorityKHR::eHigh: return "High"; - case QueueGlobalPriorityKHR::eRealtime: return "Realtime"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_AMD_memory_overallocation_behavior === - - VULKAN_HPP_INLINE std::string to_string( MemoryOverallocationBehaviorAMD value ) - { - switch ( value ) - { - case MemoryOverallocationBehaviorAMD::eDefault: return "Default"; - case MemoryOverallocationBehaviorAMD::eAllowed: return "Allowed"; - case MemoryOverallocationBehaviorAMD::eDisallowed: return "Disallowed"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_INTEL_performance_query === - - VULKAN_HPP_INLINE std::string to_string( PerformanceConfigurationTypeINTEL value ) - { - switch ( value ) - { - case PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated: return "CommandQueueMetricsDiscoveryActivated"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( QueryPoolSamplingModeINTEL value ) - { - switch ( value ) - { - case QueryPoolSamplingModeINTEL::eManual: return "Manual"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceOverrideTypeINTEL value ) - { - switch ( value ) - { - case PerformanceOverrideTypeINTEL::eNullHardware: return "NullHardware"; - case PerformanceOverrideTypeINTEL::eFlushGpuCaches: return "FlushGpuCaches"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceParameterTypeINTEL value ) - { - switch ( value ) - { - case PerformanceParameterTypeINTEL::eHwCountersSupported: return "HwCountersSupported"; - case PerformanceParameterTypeINTEL::eStreamMarkerValidBits: return "StreamMarkerValidBits"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PerformanceValueTypeINTEL value ) - { - switch ( value ) - { - case PerformanceValueTypeINTEL::eUint32: return "Uint32"; - case PerformanceValueTypeINTEL::eUint64: return "Uint64"; - case PerformanceValueTypeINTEL::eFloat: return "Float"; - case PerformanceValueTypeINTEL::eBool: return "Bool"; - case PerformanceValueTypeINTEL::eString: return "String"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_imagepipe_surface === - - VULKAN_HPP_INLINE std::string to_string( ImagePipeSurfaceCreateFlagBitsFUCHSIA ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_surface === - - VULKAN_HPP_INLINE std::string to_string( MetalSurfaceCreateFlagBitsEXT ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_KHR_fragment_shading_rate === - - VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateCombinerOpKHR value ) - { - switch ( value ) - { - case FragmentShadingRateCombinerOpKHR::eKeep: return "Keep"; - case FragmentShadingRateCombinerOpKHR::eReplace: return "Replace"; - case FragmentShadingRateCombinerOpKHR::eMin: return "Min"; - case FragmentShadingRateCombinerOpKHR::eMax: return "Max"; - case FragmentShadingRateCombinerOpKHR::eMul: return "Mul"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_AMD_shader_core_properties2 === - - VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagBitsAMD ) - { - return "(void)"; - } - - //=== VK_EXT_validation_features === - - VULKAN_HPP_INLINE std::string to_string( ValidationFeatureEnableEXT value ) - { - switch ( value ) - { - case ValidationFeatureEnableEXT::eGpuAssisted: return "GpuAssisted"; - case ValidationFeatureEnableEXT::eGpuAssistedReserveBindingSlot: return "GpuAssistedReserveBindingSlot"; - case ValidationFeatureEnableEXT::eBestPractices: return "BestPractices"; - case ValidationFeatureEnableEXT::eDebugPrintf: return "DebugPrintf"; - case ValidationFeatureEnableEXT::eSynchronizationValidation: return "SynchronizationValidation"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ValidationFeatureDisableEXT value ) - { - switch ( value ) - { - case ValidationFeatureDisableEXT::eAll: return "All"; - case ValidationFeatureDisableEXT::eShaders: return "Shaders"; - case ValidationFeatureDisableEXT::eThreadSafety: return "ThreadSafety"; - case ValidationFeatureDisableEXT::eApiParameters: return "ApiParameters"; - case ValidationFeatureDisableEXT::eObjectLifetimes: return "ObjectLifetimes"; - case ValidationFeatureDisableEXT::eCoreChecks: return "CoreChecks"; - case ValidationFeatureDisableEXT::eUniqueHandles: return "UniqueHandles"; - case ValidationFeatureDisableEXT::eShaderValidationCache: return "ShaderValidationCache"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_cooperative_matrix === - - VULKAN_HPP_INLINE std::string to_string( ScopeNV value ) - { - switch ( value ) - { - case ScopeNV::eDevice: return "Device"; - case ScopeNV::eWorkgroup: return "Workgroup"; - case ScopeNV::eSubgroup: return "Subgroup"; - case ScopeNV::eQueueFamily: return "QueueFamily"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ComponentTypeNV value ) - { - switch ( value ) - { - case ComponentTypeNV::eFloat16: return "Float16"; - case ComponentTypeNV::eFloat32: return "Float32"; - case ComponentTypeNV::eFloat64: return "Float64"; - case ComponentTypeNV::eSint8: return "Sint8"; - case ComponentTypeNV::eSint16: return "Sint16"; - case ComponentTypeNV::eSint32: return "Sint32"; - case ComponentTypeNV::eSint64: return "Sint64"; - case ComponentTypeNV::eUint8: return "Uint8"; - case ComponentTypeNV::eUint16: return "Uint16"; - case ComponentTypeNV::eUint32: return "Uint32"; - case ComponentTypeNV::eUint64: return "Uint64"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_coverage_reduction_mode === - - VULKAN_HPP_INLINE std::string to_string( CoverageReductionModeNV value ) - { - switch ( value ) - { - case CoverageReductionModeNV::eMerge: return "Merge"; - case CoverageReductionModeNV::eTruncate: return "Truncate"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineCoverageReductionStateCreateFlagBitsNV ) - { - return "(void)"; - } - - //=== VK_EXT_provoking_vertex === - - VULKAN_HPP_INLINE std::string to_string( ProvokingVertexModeEXT value ) - { - switch ( value ) - { - case ProvokingVertexModeEXT::eFirstVertex: return "FirstVertex"; - case ProvokingVertexModeEXT::eLastVertex: return "LastVertex"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - //=== VK_EXT_full_screen_exclusive === - - VULKAN_HPP_INLINE std::string to_string( FullScreenExclusiveEXT value ) - { - switch ( value ) - { - case FullScreenExclusiveEXT::eDefault: return "Default"; - case FullScreenExclusiveEXT::eAllowed: return "Allowed"; - case FullScreenExclusiveEXT::eDisallowed: return "Disallowed"; - case FullScreenExclusiveEXT::eApplicationControlled: return "ApplicationControlled"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - - //=== VK_EXT_headless_surface === - - VULKAN_HPP_INLINE std::string to_string( HeadlessSurfaceCreateFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_EXT_line_rasterization === - - VULKAN_HPP_INLINE std::string to_string( LineRasterizationModeEXT value ) - { - switch ( value ) - { - case LineRasterizationModeEXT::eDefault: return "Default"; - case LineRasterizationModeEXT::eRectangular: return "Rectangular"; - case LineRasterizationModeEXT::eBresenham: return "Bresenham"; - case LineRasterizationModeEXT::eRectangularSmooth: return "RectangularSmooth"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_KHR_pipeline_executable_properties === - - VULKAN_HPP_INLINE std::string to_string( PipelineExecutableStatisticFormatKHR value ) - { - switch ( value ) - { - case PipelineExecutableStatisticFormatKHR::eBool32: return "Bool32"; - case PipelineExecutableStatisticFormatKHR::eInt64: return "Int64"; - case PipelineExecutableStatisticFormatKHR::eUint64: return "Uint64"; - case PipelineExecutableStatisticFormatKHR::eFloat64: return "Float64"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_device_generated_commands === - - VULKAN_HPP_INLINE std::string to_string( IndirectStateFlagBitsNV value ) - { - switch ( value ) - { - case IndirectStateFlagBitsNV::eFlagFrontface: return "FlagFrontface"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( IndirectCommandsTokenTypeNV value ) - { - switch ( value ) - { - case IndirectCommandsTokenTypeNV::eShaderGroup: return "ShaderGroup"; - case IndirectCommandsTokenTypeNV::eStateFlags: return "StateFlags"; - case IndirectCommandsTokenTypeNV::eIndexBuffer: return "IndexBuffer"; - case IndirectCommandsTokenTypeNV::eVertexBuffer: return "VertexBuffer"; - case IndirectCommandsTokenTypeNV::ePushConstant: return "PushConstant"; - case IndirectCommandsTokenTypeNV::eDrawIndexed: return "DrawIndexed"; - case IndirectCommandsTokenTypeNV::eDraw: return "Draw"; - case IndirectCommandsTokenTypeNV::eDrawTasks: return "DrawTasks"; - case IndirectCommandsTokenTypeNV::eDrawMeshTasks: return "DrawMeshTasks"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagBitsNV value ) - { - switch ( value ) - { - case IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess: return "ExplicitPreprocess"; - case IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences: return "IndexedSequences"; - case IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences: return "UnorderedSequences"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_device_memory_report === - - VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportEventTypeEXT value ) - { - switch ( value ) - { - case DeviceMemoryReportEventTypeEXT::eAllocate: return "Allocate"; - case DeviceMemoryReportEventTypeEXT::eFree: return "Free"; - case DeviceMemoryReportEventTypeEXT::eImport: return "Import"; - case DeviceMemoryReportEventTypeEXT::eUnimport: return "Unimport"; - case DeviceMemoryReportEventTypeEXT::eAllocationFailed: return "AllocationFailed"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportFlagBitsEXT ) - { - return "(void)"; - } - - //=== VK_EXT_pipeline_creation_cache_control === - - VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) - { - switch ( value ) - { - case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - //=== VK_KHR_video_encode_queue === - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeCapabilityFlagBitsKHR value ) - { - switch ( value ) - { - case VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes: return "PrecedingExternallyEncodedBytes"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagBitsKHR value ) - { - switch ( value ) - { - case VideoEncodeUsageFlagBitsKHR::eDefault: return "Default"; - case VideoEncodeUsageFlagBitsKHR::eTranscoding: return "Transcoding"; - case VideoEncodeUsageFlagBitsKHR::eStreaming: return "Streaming"; - case VideoEncodeUsageFlagBitsKHR::eRecording: return "Recording"; - case VideoEncodeUsageFlagBitsKHR::eConferencing: return "Conferencing"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagBitsKHR value ) - { - switch ( value ) - { - case VideoEncodeContentFlagBitsKHR::eDefault: return "Default"; - case VideoEncodeContentFlagBitsKHR::eCamera: return "Camera"; - case VideoEncodeContentFlagBitsKHR::eDesktop: return "Desktop"; - case VideoEncodeContentFlagBitsKHR::eRendered: return "Rendered"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeTuningModeKHR value ) - { - switch ( value ) - { - case VideoEncodeTuningModeKHR::eDefault: return "Default"; - case VideoEncodeTuningModeKHR::eHighQuality: return "HighQuality"; - case VideoEncodeTuningModeKHR::eLowLatency: return "LowLatency"; - case VideoEncodeTuningModeKHR::eUltraLowLatency: return "UltraLowLatency"; - case VideoEncodeTuningModeKHR::eLossless: return "Lossless"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagBitsKHR value ) - { - switch ( value ) - { - case VideoEncodeRateControlModeFlagBitsKHR::eNone: return "None"; - case VideoEncodeRateControlModeFlagBitsKHR::eCbr: return "Cbr"; - case VideoEncodeRateControlModeFlagBitsKHR::eVbr: return "Vbr"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeFlagBitsKHR ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlFlagBitsKHR ) - { - return "(void)"; - } -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - - //=== VK_NV_device_diagnostics_config === - - VULKAN_HPP_INLINE std::string to_string( DeviceDiagnosticsConfigFlagBitsNV value ) - { - switch ( value ) - { - case DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo: return "EnableShaderDebugInfo"; - case DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking: return "EnableResourceTracking"; - case DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints: return "EnableAutomaticCheckpoints"; - case DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting: return "EnableShaderErrorReporting"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_METAL_EXT ) - //=== VK_EXT_metal_objects === - - VULKAN_HPP_INLINE std::string to_string( ExportMetalObjectTypeFlagBitsEXT value ) - { - switch ( value ) - { - case ExportMetalObjectTypeFlagBitsEXT::eMetalDevice: return "MetalDevice"; - case ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue: return "MetalCommandQueue"; - case ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer: return "MetalBuffer"; - case ExportMetalObjectTypeFlagBitsEXT::eMetalTexture: return "MetalTexture"; - case ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface: return "MetalIosurface"; - case ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent: return "MetalSharedEvent"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } -#endif /*VK_USE_PLATFORM_METAL_EXT*/ - - //=== VK_EXT_graphics_pipeline_library === - - VULKAN_HPP_INLINE std::string to_string( GraphicsPipelineLibraryFlagBitsEXT value ) - { - switch ( value ) - { - case GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface: return "VertexInputInterface"; - case GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders: return "PreRasterizationShaders"; - case GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader: return "FragmentShader"; - case GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface: return "FragmentOutputInterface"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits value ) - { - switch ( value ) - { - case PipelineLayoutCreateFlagBits::eIndependentSetsEXT: return "IndependentSetsEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_fragment_shading_rate_enums === - - VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateNV value ) - { - switch ( value ) - { - case FragmentShadingRateNV::e1InvocationPerPixel: return "1InvocationPerPixel"; - case FragmentShadingRateNV::e1InvocationPer1X2Pixels: return "1InvocationPer1X2Pixels"; - case FragmentShadingRateNV::e1InvocationPer2X1Pixels: return "1InvocationPer2X1Pixels"; - case FragmentShadingRateNV::e1InvocationPer2X2Pixels: return "1InvocationPer2X2Pixels"; - case FragmentShadingRateNV::e1InvocationPer2X4Pixels: return "1InvocationPer2X4Pixels"; - case FragmentShadingRateNV::e1InvocationPer4X2Pixels: return "1InvocationPer4X2Pixels"; - case FragmentShadingRateNV::e1InvocationPer4X4Pixels: return "1InvocationPer4X4Pixels"; - case FragmentShadingRateNV::e2InvocationsPerPixel: return "2InvocationsPerPixel"; - case FragmentShadingRateNV::e4InvocationsPerPixel: return "4InvocationsPerPixel"; - case FragmentShadingRateNV::e8InvocationsPerPixel: return "8InvocationsPerPixel"; - case FragmentShadingRateNV::e16InvocationsPerPixel: return "16InvocationsPerPixel"; - case FragmentShadingRateNV::eNoInvocations: return "NoInvocations"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateTypeNV value ) - { - switch ( value ) - { - case FragmentShadingRateTypeNV::eFragmentSize: return "FragmentSize"; - case FragmentShadingRateTypeNV::eEnums: return "Enums"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_NV_ray_tracing_motion_blur === - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceTypeNV value ) - { - switch ( value ) - { - case AccelerationStructureMotionInstanceTypeNV::eStatic: return "Static"; - case AccelerationStructureMotionInstanceTypeNV::eMatrixMotion: return "MatrixMotion"; - case AccelerationStructureMotionInstanceTypeNV::eSrtMotion: return "SrtMotion"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInfoFlagBitsNV ) - { - return "(void)"; - } - - VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceFlagBitsNV ) - { - return "(void)"; - } - - //=== VK_EXT_image_compression_control === - - VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagBitsEXT value ) - { - switch ( value ) - { - case ImageCompressionFlagBitsEXT::eDefault: return "Default"; - case ImageCompressionFlagBitsEXT::eFixedRateDefault: return "FixedRateDefault"; - case ImageCompressionFlagBitsEXT::eFixedRateExplicit: return "FixedRateExplicit"; - case ImageCompressionFlagBitsEXT::eDisabled: return "Disabled"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagBitsEXT value ) - { - switch ( value ) - { - case ImageCompressionFixedRateFlagBitsEXT::eNone: return "None"; - case ImageCompressionFixedRateFlagBitsEXT::e1Bpc: return "1Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e2Bpc: return "2Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e3Bpc: return "3Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e4Bpc: return "4Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e5Bpc: return "5Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e6Bpc: return "6Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e7Bpc: return "7Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e8Bpc: return "8Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e9Bpc: return "9Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e10Bpc: return "10Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e11Bpc: return "11Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e12Bpc: return "12Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e13Bpc: return "13Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e14Bpc: return "14Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e15Bpc: return "15Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e16Bpc: return "16Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e17Bpc: return "17Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e18Bpc: return "18Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e19Bpc: return "19Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e20Bpc: return "20Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e21Bpc: return "21Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e22Bpc: return "22Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e23Bpc: return "23Bpc"; - case ImageCompressionFixedRateFlagBitsEXT::e24Bpc: return "24Bpc"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) - //=== VK_EXT_directfb_surface === - - VULKAN_HPP_INLINE std::string to_string( DirectFBSurfaceCreateFlagBitsEXT ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ - - //=== VK_KHR_ray_tracing_pipeline === - - VULKAN_HPP_INLINE std::string to_string( RayTracingShaderGroupTypeKHR value ) - { - switch ( value ) - { - case RayTracingShaderGroupTypeKHR::eGeneral: return "General"; - case RayTracingShaderGroupTypeKHR::eTrianglesHitGroup: return "TrianglesHitGroup"; - case RayTracingShaderGroupTypeKHR::eProceduralHitGroup: return "ProceduralHitGroup"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ShaderGroupShaderKHR value ) - { - switch ( value ) - { - case ShaderGroupShaderKHR::eGeneral: return "General"; - case ShaderGroupShaderKHR::eClosestHit: return "ClosestHit"; - case ShaderGroupShaderKHR::eAnyHit: return "AnyHit"; - case ShaderGroupShaderKHR::eIntersection: return "Intersection"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -#if defined( VK_USE_PLATFORM_FUCHSIA ) - //=== VK_FUCHSIA_buffer_collection === - - VULKAN_HPP_INLINE std::string to_string( ImageConstraintsInfoFlagBitsFUCHSIA value ) - { - switch ( value ) - { - case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely: return "CpuReadRarely"; - case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften: return "CpuReadOften"; - case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely: return "CpuWriteRarely"; - case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften: return "CpuWriteOften"; - case ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional: return "ProtectedOptional"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( ImageFormatConstraintsFlagBitsFUCHSIA ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - -#if defined( VK_USE_PLATFORM_SCREEN_QNX ) - //=== VK_QNX_screen_surface === - - VULKAN_HPP_INLINE std::string to_string( ScreenSurfaceCreateFlagBitsQNX ) - { - return "(void)"; - } -#endif /*VK_USE_PLATFORM_SCREEN_QNX*/ - - //=== VK_EXT_subpass_merge_feedback === - - VULKAN_HPP_INLINE std::string to_string( SubpassMergeStatusEXT value ) - { - switch ( value ) - { - case SubpassMergeStatusEXT::eMerged: return "Merged"; - case SubpassMergeStatusEXT::eDisallowed: return "Disallowed"; - case SubpassMergeStatusEXT::eNotMergedSideEffects: return "NotMergedSideEffects"; - case SubpassMergeStatusEXT::eNotMergedSamplesMismatch: return "NotMergedSamplesMismatch"; - case SubpassMergeStatusEXT::eNotMergedViewsMismatch: return "NotMergedViewsMismatch"; - case SubpassMergeStatusEXT::eNotMergedAliasing: return "NotMergedAliasing"; - case SubpassMergeStatusEXT::eNotMergedDependencies: return "NotMergedDependencies"; - case SubpassMergeStatusEXT::eNotMergedIncompatibleInputAttachment: return "NotMergedIncompatibleInputAttachment"; - case SubpassMergeStatusEXT::eNotMergedTooManyAttachments: return "NotMergedTooManyAttachments"; - case SubpassMergeStatusEXT::eNotMergedInsufficientStorage: return "NotMergedInsufficientStorage"; - case SubpassMergeStatusEXT::eNotMergedDepthStencilCount: return "NotMergedDepthStencilCount"; - case SubpassMergeStatusEXT::eNotMergedResolveAttachmentReuse: return "NotMergedResolveAttachmentReuse"; - case SubpassMergeStatusEXT::eNotMergedSingleSubpass: return "NotMergedSingleSubpass"; - case SubpassMergeStatusEXT::eNotMergedUnspecified: return "NotMergedUnspecified"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - //=== VK_EXT_rasterization_order_attachment_access === - - VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits value ) - { - switch ( value ) - { - case PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT: return "RasterizationOrderAttachmentAccessEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits value ) - { - switch ( value ) - { - case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; - case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - -} // namespace VULKAN_HPP_NAMESPACE -#endif diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c index 44486ff..15c0f0d 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c @@ -38,28 +38,25 @@ typedef struct const char *libname; } kmsdrmdynlib; -#ifndef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC -#define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC NULL -#endif #ifndef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM #define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM NULL #endif static kmsdrmdynlib kmsdrmlibs[] = { - {NULL, SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM}, - {NULL, SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC} + { NULL, SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM }, + { NULL, SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC } }; -static void * -KMSDRM_GetSym(const char *fnname, int *pHasModule) +static void *KMSDRM_GetSym(const char *fnname, int *pHasModule) { int i; void *fn = NULL; for (i = 0; i < SDL_TABLESIZE(kmsdrmlibs); i++) { if (kmsdrmlibs[i].lib != NULL) { fn = SDL_LoadFunction(kmsdrmlibs[i].lib, fnname); - if (fn != NULL) + if (fn != NULL) { break; + } } } @@ -70,8 +67,9 @@ KMSDRM_GetSym(const char *fnname, int *pHasModule) SDL_Log("KMSDRM: Symbol '%s' NOT FOUND!\n", fnname); #endif - if (fn == NULL) - *pHasModule = 0; /* kill this module. */ + if (fn == NULL) { + *pHasModule = 0; /* kill this module. */ + } return fn; } @@ -79,15 +77,14 @@ KMSDRM_GetSym(const char *fnname, int *pHasModule) #endif /* SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */ /* Define all the function pointers and wrappers... */ -#define SDL_KMSDRM_MODULE(modname) int SDL_KMSDRM_HAVE_##modname = 0; -#define SDL_KMSDRM_SYM(rc,fn,params) SDL_DYNKMSDRMFN_##fn KMSDRM_##fn = NULL; -#define SDL_KMSDRM_SYM_CONST(type,name) SDL_DYNKMSDRMCONST_##name KMSDRM_##name = NULL; +#define SDL_KMSDRM_MODULE(modname) int SDL_KMSDRM_HAVE_##modname = 0; +#define SDL_KMSDRM_SYM(rc, fn, params) SDL_DYNKMSDRMFN_##fn KMSDRM_##fn = NULL; +#define SDL_KMSDRM_SYM_CONST(type, name) SDL_DYNKMSDRMCONST_##name KMSDRM_##name = NULL; #include "SDL_kmsdrmsym.h" static int kmsdrm_load_refcount = 0; -void -SDL_KMSDRM_UnloadSymbols(void) +void SDL_KMSDRM_UnloadSymbols(void) { /* Don't actually unload if more than one module is using the libs... */ if (kmsdrm_load_refcount > 0) { @@ -97,12 +94,11 @@ SDL_KMSDRM_UnloadSymbols(void) #endif /* set all the function pointers to NULL. */ -#define SDL_KMSDRM_MODULE(modname) SDL_KMSDRM_HAVE_##modname = 0; -#define SDL_KMSDRM_SYM(rc,fn,params) KMSDRM_##fn = NULL; -#define SDL_KMSDRM_SYM_CONST(type,name) KMSDRM_##name = NULL; +#define SDL_KMSDRM_MODULE(modname) SDL_KMSDRM_HAVE_##modname = 0; +#define SDL_KMSDRM_SYM(rc, fn, params) KMSDRM_##fn = NULL; +#define SDL_KMSDRM_SYM_CONST(type, name) KMSDRM_##name = NULL; #include "SDL_kmsdrmsym.h" - #ifdef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC for (i = 0; i < SDL_TABLESIZE(kmsdrmlibs); i++) { if (kmsdrmlibs[i].lib != NULL) { @@ -116,10 +112,9 @@ SDL_KMSDRM_UnloadSymbols(void) } /* returns non-zero if all needed symbols were loaded. */ -int -SDL_KMSDRM_LoadSymbols(void) +int SDL_KMSDRM_LoadSymbols(void) { - int rc = 1; /* always succeed if not using Dynamic KMSDRM stuff. */ + int rc = 1; /* always succeed if not using Dynamic KMSDRM stuff. */ /* deal with multiple modules needing these symbols... */ if (kmsdrm_load_refcount++ == 0) { @@ -135,9 +130,9 @@ SDL_KMSDRM_LoadSymbols(void) #define SDL_KMSDRM_MODULE(modname) SDL_KMSDRM_HAVE_##modname = 1; /* default yes */ #include "SDL_kmsdrmsym.h" -#define SDL_KMSDRM_MODULE(modname) thismod = &SDL_KMSDRM_HAVE_##modname; -#define SDL_KMSDRM_SYM(rc,fn,params) KMSDRM_##fn = (SDL_DYNKMSDRMFN_##fn) KMSDRM_GetSym(#fn,thismod); -#define SDL_KMSDRM_SYM_CONST(type,name) KMSDRM_##name = *(SDL_DYNKMSDRMCONST_##name*) KMSDRM_GetSym(#name,thismod); +#define SDL_KMSDRM_MODULE(modname) thismod = &SDL_KMSDRM_HAVE_##modname; +#define SDL_KMSDRM_SYM(rc, fn, params) KMSDRM_##fn = (SDL_DYNKMSDRMFN_##fn)KMSDRM_GetSym(#fn, thismod); +#define SDL_KMSDRM_SYM_CONST(type, name) KMSDRM_##name = *(SDL_DYNKMSDRMCONST_##name *)KMSDRM_GetSym(#name, thismod); #include "SDL_kmsdrmsym.h" if ((SDL_KMSDRM_HAVE_LIBDRM) && (SDL_KMSDRM_HAVE_GBM)) { @@ -149,11 +144,11 @@ SDL_KMSDRM_LoadSymbols(void) rc = 0; } -#else /* no dynamic KMSDRM */ +#else /* no dynamic KMSDRM */ -#define SDL_KMSDRM_MODULE(modname) SDL_KMSDRM_HAVE_##modname = 1; /* default yes */ -#define SDL_KMSDRM_SYM(rc,fn,params) KMSDRM_##fn = fn; -#define SDL_KMSDRM_SYM_CONST(type,name) KMSDRM_##name = name; +#define SDL_KMSDRM_MODULE(modname) SDL_KMSDRM_HAVE_##modname = 1; /* default yes */ +#define SDL_KMSDRM_SYM(rc, fn, params) KMSDRM_##fn = fn; +#define SDL_KMSDRM_SYM_CONST(type, name) KMSDRM_##name = name; #include "SDL_kmsdrmsym.h" #endif diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h index 82203f5..319e3f0 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h @@ -36,10 +36,10 @@ int SDL_KMSDRM_LoadSymbols(void); void SDL_KMSDRM_UnloadSymbols(void); /* Declare all the function pointers and wrappers... */ -#define SDL_KMSDRM_SYM(rc,fn,params) \ - typedef rc (*SDL_DYNKMSDRMFN_##fn) params; \ +#define SDL_KMSDRM_SYM(rc, fn, params) \ + typedef rc(*SDL_DYNKMSDRMFN_##fn) params; \ extern SDL_DYNKMSDRMFN_##fn KMSDRM_##fn; -#define SDL_KMSDRM_SYM_CONST(type, name) \ +#define SDL_KMSDRM_SYM_CONST(type, name) \ typedef type SDL_DYNKMSDRMCONST_##name; \ extern SDL_DYNKMSDRMCONST_##name KMSDRM_##name; #include "SDL_kmsdrmsym.h" diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c index 80192d4..8a97c87 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c @@ -39,8 +39,6 @@ void KMSDRM_PumpEvents(_THIS) #elif defined SDL_INPUT_WSCONS SDL_WSCONS_PumpEvents(); #endif - } #endif /* SDL_VIDEO_DRIVER_KMSDRM */ - diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c index 99b8699..955045a 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c @@ -33,11 +33,11 @@ #include "../SDL_pixels_c.h" static SDL_Cursor *KMSDRM_CreateDefaultCursor(void); -static SDL_Cursor *KMSDRM_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y); -static int KMSDRM_ShowCursor(SDL_Cursor * cursor); -static void KMSDRM_MoveCursor(SDL_Cursor * cursor); -static void KMSDRM_FreeCursor(SDL_Cursor * cursor); -static void KMSDRM_WarpMouse(SDL_Window * window, int x, int y); +static SDL_Cursor *KMSDRM_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y); +static int KMSDRM_ShowCursor(SDL_Cursor *cursor); +static void KMSDRM_MoveCursor(SDL_Cursor *cursor); +static void KMSDRM_FreeCursor(SDL_Cursor *cursor); +static void KMSDRM_WarpMouse(SDL_Window *window, int x, int y); static int KMSDRM_WarpMouseGlobal(int x, int y); /**************************************************************************************/ @@ -55,8 +55,7 @@ static int KMSDRM_WarpMouseGlobal(int x, int y); /* and mouse->cursor_shown is 1. */ /**************************************************************************************/ -static SDL_Cursor * -KMSDRM_CreateDefaultCursor(void) +static SDL_Cursor *KMSDRM_CreateDefaultCursor(void) { return SDL_CreateCursor(default_cdata, default_cmask, DEFAULT_CWIDTH, DEFAULT_CHEIGHT, DEFAULT_CHOTX, DEFAULT_CHOTY); } @@ -64,11 +63,10 @@ KMSDRM_CreateDefaultCursor(void) /* Given a display's driverdata, destroy the cursor BO for it. To be called from KMSDRM_DestroyWindow(), as that's where we destroy the driverdata for the window's display. */ -void -KMSDRM_DestroyCursorBO (_THIS, SDL_VideoDisplay *display) +void KMSDRM_DestroyCursorBO(_THIS, SDL_VideoDisplay *display) { - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; - + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; + /* Destroy the curso GBM BO. */ if (dispdata->cursor_bo) { KMSDRM_gbm_bo_destroy(dispdata->cursor_bo); @@ -80,26 +78,24 @@ KMSDRM_DestroyCursorBO (_THIS, SDL_VideoDisplay *display) /* Given a display's driverdata, create the cursor BO for it. To be called from KMSDRM_CreateWindow(), as that's where we build a window and assign a display to it. */ -void -KMSDRM_CreateCursorBO (SDL_VideoDisplay *display) { +void KMSDRM_CreateCursorBO(SDL_VideoDisplay *display) +{ SDL_VideoDevice *dev = SDL_GetVideoDevice(); SDL_VideoData *viddata = ((SDL_VideoData *)dev->driverdata); - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; if (!KMSDRM_gbm_device_is_format_supported(viddata->gbm_dev, - GBM_FORMAT_ARGB8888, - GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE)) - { + GBM_FORMAT_ARGB8888, + GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE)) { SDL_SetError("Unsupported pixel format for cursor"); return; } if (KMSDRM_drmGetCap(viddata->drm_fd, - DRM_CAP_CURSOR_WIDTH, &dispdata->cursor_w) || - KMSDRM_drmGetCap(viddata->drm_fd, DRM_CAP_CURSOR_HEIGHT, - &dispdata->cursor_h)) - { + DRM_CAP_CURSOR_WIDTH, &dispdata->cursor_w) || + KMSDRM_drmGetCap(viddata->drm_fd, DRM_CAP_CURSOR_HEIGHT, + &dispdata->cursor_h)) { SDL_SetError("Could not get the recommended GBM cursor size"); return; } @@ -110,8 +106,8 @@ KMSDRM_CreateCursorBO (SDL_VideoDisplay *display) { } dispdata->cursor_bo = KMSDRM_gbm_bo_create(viddata->gbm_dev, - dispdata->cursor_w, dispdata->cursor_h, - GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE | GBM_BO_USE_LINEAR); + dispdata->cursor_w, dispdata->cursor_h, + GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE | GBM_BO_USE_LINEAR); if (!dispdata->cursor_bo) { SDL_SetError("Could not create GBM cursor BO"); @@ -119,19 +115,18 @@ KMSDRM_CreateCursorBO (SDL_VideoDisplay *display) { } dispdata->cursor_bo_drm_fd = viddata->drm_fd; -} +} /* Remove a cursor buffer from a display's DRM cursor BO. */ -static int -KMSDRM_RemoveCursorFromBO(SDL_VideoDisplay *display) +static int KMSDRM_RemoveCursorFromBO(SDL_VideoDisplay *display) { int ret = 0; - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; SDL_VideoDevice *video_device = SDL_GetVideoDevice(); SDL_VideoData *viddata = ((SDL_VideoData *)video_device->driverdata); ret = KMSDRM_drmModeSetCursor(viddata->drm_fd, - dispdata->crtc->crtc_id, 0, 0, 0); + dispdata->crtc->crtc_id, 0, 0, 0); if (ret) { ret = SDL_SetError("Could not hide current cursor with drmModeSetCursor()."); @@ -141,11 +136,10 @@ KMSDRM_RemoveCursorFromBO(SDL_VideoDisplay *display) } /* Dump a cursor buffer to a display's DRM cursor BO. */ -static int -KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor) +static int KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor) { - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; - KMSDRM_CursorData *curdata = (KMSDRM_CursorData *) cursor->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; + KMSDRM_CursorData *curdata = (KMSDRM_CursorData *)cursor->driverdata; SDL_VideoDevice *video_device = SDL_GetVideoDevice(); SDL_VideoData *viddata = ((SDL_VideoData *)video_device->driverdata); @@ -158,7 +152,7 @@ KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor) int i; int ret; - if (!curdata || !dispdata->cursor_bo) { + if (curdata == NULL || !dispdata->cursor_bo) { return SDL_SetError("Cursor or display not initialized properly."); } @@ -167,17 +161,17 @@ KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor) bo_stride = KMSDRM_gbm_bo_get_stride(dispdata->cursor_bo); bufsize = bo_stride * dispdata->cursor_h; - ready_buffer = (uint8_t*)SDL_calloc(1, bufsize); + ready_buffer = (uint8_t *)SDL_calloc(1, bufsize); - if (!ready_buffer) { + if (ready_buffer == NULL) { ret = SDL_OutOfMemory(); goto cleanup; } /* Copy from the cursor buffer to a buffer that we can dump to the GBM BO. */ for (i = 0; i < curdata->h; i++) { - src_row = &((uint8_t*)curdata->buffer)[i * curdata->w * 4]; - SDL_memcpy(ready_buffer + (i * bo_stride), src_row, 4 * curdata->w); + src_row = &((uint8_t *)curdata->buffer)[i * curdata->w * 4]; + SDL_memcpy(ready_buffer + (i * bo_stride), src_row, (size_t)4 * curdata->w); } /* Dump the cursor buffer to our GBM BO. */ @@ -190,10 +184,10 @@ KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor) bo_handle = KMSDRM_gbm_bo_get_handle(dispdata->cursor_bo).u32; if (curdata->hot_x == 0 && curdata->hot_y == 0) { ret = KMSDRM_drmModeSetCursor(viddata->drm_fd, dispdata->crtc->crtc_id, - bo_handle, dispdata->cursor_w, dispdata->cursor_h); + bo_handle, dispdata->cursor_w, dispdata->cursor_h); } else { ret = KMSDRM_drmModeSetCursor2(viddata->drm_fd, dispdata->crtc->crtc_id, - bo_handle, dispdata->cursor_w, dispdata->cursor_h, curdata->hot_x, curdata->hot_y); + bo_handle, dispdata->cursor_w, dispdata->cursor_h, curdata->hot_x, curdata->hot_y); } if (ret) { @@ -215,14 +209,13 @@ cleanup: } /* This is only for freeing the SDL_cursor.*/ -static void -KMSDRM_FreeCursor(SDL_Cursor * cursor) +static void KMSDRM_FreeCursor(SDL_Cursor *cursor) { KMSDRM_CursorData *curdata; /* Even if the cursor is not ours, free it. */ if (cursor) { - curdata = (KMSDRM_CursorData *) cursor->driverdata; + curdata = (KMSDRM_CursorData *)cursor->driverdata; /* Free cursor buffer */ if (curdata->buffer) { SDL_free(curdata->buffer); @@ -239,8 +232,7 @@ KMSDRM_FreeCursor(SDL_Cursor * cursor) /* This simply gets the cursor soft-buffer ready. We don't copy it to a GBO BO until ShowCursor() because the cusor GBM BO (living in dispata) is destroyed and recreated when we recreate windows, etc. */ -static SDL_Cursor * -KMSDRM_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *KMSDRM_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { KMSDRM_CursorData *curdata; SDL_Cursor *cursor, *ret; @@ -248,13 +240,13 @@ KMSDRM_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) curdata = NULL; ret = NULL; - cursor = (SDL_Cursor *) SDL_calloc(1, sizeof(*cursor)); - if (!cursor) { + cursor = (SDL_Cursor *)SDL_calloc(1, sizeof(*cursor)); + if (cursor == NULL) { SDL_OutOfMemory(); goto cleanup; } - curdata = (KMSDRM_CursorData *) SDL_calloc(1, sizeof(*curdata)); - if (!curdata) { + curdata = (KMSDRM_CursorData *)SDL_calloc(1, sizeof(*curdata)); + if (curdata == NULL) { SDL_OutOfMemory(); goto cleanup; } @@ -269,8 +261,8 @@ KMSDRM_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) /* Configure the cursor buffer info. This buffer has the original size of the cursor surface we are given. */ curdata->buffer_pitch = surface->w; - curdata->buffer_size = surface->w * surface->h * 4; - curdata->buffer = (uint32_t*)SDL_malloc(curdata->buffer_size); + curdata->buffer_size = (size_t)surface->w * surface->h * 4; + curdata->buffer = (uint32_t *)SDL_malloc(curdata->buffer_size); if (!curdata->buffer) { SDL_OutOfMemory(); @@ -280,7 +272,7 @@ KMSDRM_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) /* All code below assumes ARGB8888 format for the cursor surface, like other backends do. Also, the GBM BO pixels have to be alpha-premultiplied, but the SDL surface we receive has - straight-alpha pixels, so we always have to convert. */ + straight-alpha pixels, so we always have to convert. */ SDL_PremultiplyAlpha(surface->w, surface->h, surface->format->format, surface->pixels, surface->pitch, SDL_PIXELFORMAT_ARGB8888, curdata->buffer, surface->w * 4); @@ -306,8 +298,7 @@ cleanup: } /* Show the specified cursor, or hide if cursor is NULL or has no focus. */ -static int -KMSDRM_ShowCursor(SDL_Cursor * cursor) +static int KMSDRM_ShowCursor(SDL_Cursor *cursor) { SDL_VideoDisplay *display; SDL_Window *window; @@ -319,28 +310,28 @@ KMSDRM_ShowCursor(SDL_Cursor * cursor) /* Get the mouse focused window, if any. */ mouse = SDL_GetMouse(); - if (!mouse) { + if (mouse == NULL) { return SDL_SetError("No mouse."); } window = mouse->focus; - if (!window || !cursor) { + if (window == NULL || cursor == NULL) { - /* If no window is focused by mouse or cursor is NULL, - since we have no window (no mouse->focus) and hence - we have no display, we simply hide mouse on all displays. - This happens on video quit, where we get here after - the mouse focus has been unset, yet SDL wants to - restore the system default cursor (makes no sense here). */ + /* If no window is focused by mouse or cursor is NULL, + since we have no window (no mouse->focus) and hence + we have no display, we simply hide mouse on all displays. + This happens on video quit, where we get here after + the mouse focus has been unset, yet SDL wants to + restore the system default cursor (makes no sense here). */ - num_displays = SDL_GetNumVideoDisplays(); + num_displays = SDL_GetNumVideoDisplays(); - /* Iterate on the displays hidding the cursor. */ - for (i = 0; i < num_displays; i++) { - display = SDL_GetDisplay(i); - ret = KMSDRM_RemoveCursorFromBO(display); - } + /* Iterate on the displays hidding the cursor. */ + for (i = 0; i < num_displays; i++) { + display = SDL_GetDisplay(i); + ret = KMSDRM_RemoveCursorFromBO(display); + } } else { @@ -357,30 +348,28 @@ KMSDRM_ShowCursor(SDL_Cursor * cursor) /* Hide the cursor on that display. */ ret = KMSDRM_RemoveCursorFromBO(display); } - } + } } return ret; } /* Warp the mouse to (x,y) */ -static void -KMSDRM_WarpMouse(SDL_Window * window, int x, int y) +static void KMSDRM_WarpMouse(SDL_Window *window, int x, int y) { /* Only one global/fullscreen window is supported */ KMSDRM_WarpMouseGlobal(x, y); } /* Warp the mouse to (x,y) */ -static int -KMSDRM_WarpMouseGlobal(int x, int y) +static int KMSDRM_WarpMouseGlobal(int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); if (mouse && mouse->cur_cursor && mouse->focus) { SDL_Window *window = mouse->focus; - SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; /* Update internal mouse position. */ SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y); @@ -406,11 +395,10 @@ KMSDRM_WarpMouseGlobal(int x, int y) } } -void -KMSDRM_InitMouse(_THIS, SDL_VideoDisplay *display) +void KMSDRM_InitMouse(_THIS, SDL_VideoDisplay *display) { SDL_Mouse *mouse = SDL_GetMouse(); - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; mouse->CreateCursor = KMSDRM_CreateCursor; mouse->ShowCursor = KMSDRM_ShowCursor; @@ -427,15 +415,13 @@ KMSDRM_InitMouse(_THIS, SDL_VideoDisplay *display) } } -void -KMSDRM_QuitMouse(_THIS) +void KMSDRM_QuitMouse(_THIS) { /* TODO: ? */ } /* This is called when a mouse motion event occurs */ -static void -KMSDRM_MoveCursor(SDL_Cursor * cursor) +static void KMSDRM_MoveCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); int ret = 0; @@ -445,7 +431,7 @@ KMSDRM_MoveCursor(SDL_Cursor * cursor) if (mouse && mouse->cur_cursor && mouse->focus) { SDL_Window *window = mouse->focus; - SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; if (!dispdata->cursor_bo) { SDL_SetError("Cursor not initialized properly."); diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h index d505079..bcd89f2 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h @@ -31,12 +31,12 @@ typedef struct _KMSDRM_CursorData { - int hot_x, hot_y; - int w, h; + int hot_x, hot_y; + int w, h; /* The buffer where we store the mouse bitmap ready to be used. We get it ready and filled in CreateCursor(), and copy it - to a GBM BO in ShowCursor().*/ + to a GBM BO in ShowCursor().*/ uint32_t *buffer; size_t buffer_size; size_t buffer_pitch; diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c index 969df3e..8dc2bfd 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c @@ -36,8 +36,7 @@ /* EGL implementation of SDL OpenGL support */ -void -KMSDRM_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) +void KMSDRM_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) { /* if SDL was _also_ built with the Raspberry Pi driver (so we're definitely a Pi device), default to GLES2. */ @@ -48,8 +47,8 @@ KMSDRM_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) #endif } -int -KMSDRM_GLES_LoadLibrary(_THIS, const char *path) { +int KMSDRM_GLES_LoadLibrary(_THIS, const char *path) +{ /* Just pretend you do this here, but don't do it until KMSDRM_CreateWindow(), where we do the same library load we would normally do here. because this gets called by SDL_CreateWindow() before KMSDR_CreateWindow(), @@ -62,15 +61,16 @@ KMSDRM_GLES_LoadLibrary(_THIS, const char *path) { return 0; } -void -KMSDRM_GLES_UnloadLibrary(_THIS) { +void KMSDRM_GLES_UnloadLibrary(_THIS) +{ /* As with KMSDRM_GLES_LoadLibrary(), we define our own "dummy" unloading function so we manually unload the library whenever we want. */ } SDL_EGL_CreateContext_impl(KMSDRM) -int KMSDRM_GLES_SetSwapInterval(_THIS, int interval) { + int KMSDRM_GLES_SetSwapInterval(_THIS, int interval) +{ if (!_this->egl_data) { return SDL_SetError("EGL not initialized"); @@ -85,10 +85,10 @@ int KMSDRM_GLES_SetSwapInterval(_THIS, int interval) { return 0; } -int -KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window) { - SDL_WindowData *windata = ((SDL_WindowData *) window->driverdata); - SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; +int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window *window) +{ + SDL_WindowData *windata = ((SDL_WindowData *)window->driverdata); + SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); KMSDRM_FBInfo *fb_info; int ret = 0; @@ -120,7 +120,7 @@ KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window) { /* Mark a buffer to becume the next front buffer. This won't happen until pagelip completes. */ if (!(_this->egl_data->eglSwapBuffers(_this->egl_data->egl_display, - windata->egl_surface))) { + windata->egl_surface))) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "eglSwapBuffers failed"); return 0; } @@ -136,7 +136,7 @@ KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window) { /* Get an actual usable fb for the next front buffer. */ fb_info = KMSDRM_FBFromBO(_this, windata->next_bo); - if (!fb_info) { + if (fb_info == NULL) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not get a framebuffer"); return 0; } @@ -146,8 +146,8 @@ KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window) { drmModePageFlip can be used the CRTC has to be configured to use the current connector and mode with drmModeSetCrtc */ ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, - dispdata->crtc->crtc_id, fb_info->fb_id, 0, 0, - &dispdata->connector->connector_id, 1, &dispdata->mode); + dispdata->crtc->crtc_id, fb_info->fb_id, 0, 0, + &dispdata->connector->connector_id, 1, &dispdata->mode); if (ret) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not set videomode on CRTC."); @@ -171,7 +171,7 @@ KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window) { } ret = KMSDRM_drmModePageFlip(viddata->drm_fd, dispdata->crtc->crtc_id, - fb_info->fb_id, flip_flags, &windata->waiting_for_flip); + fb_info->fb_id, flip_flags, &windata->waiting_for_flip); if (ret == 0) { windata->waiting_for_flip = SDL_TRUE; @@ -203,4 +203,4 @@ SDL_EGL_MakeCurrent_impl(KMSDRM) #endif /* SDL_VIDEO_DRIVER_KMSDRM */ -/* vi: set ts=4 sw=4 expandtab: */ + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h index 4158c2d..0f1ef87 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h @@ -37,9 +37,9 @@ extern void KMSDRM_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor); extern int KMSDRM_GLES_SetSwapInterval(_THIS, int interval); extern int KMSDRM_GLES_LoadLibrary(_THIS, const char *path); -extern SDL_GLContext KMSDRM_GLES_CreateContext(_THIS, SDL_Window * window); -extern int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int KMSDRM_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern SDL_GLContext KMSDRM_GLES_CreateContext(_THIS, SDL_Window *window); +extern int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int KMSDRM_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); #endif /* SDL_VIDEO_DRIVER_KMSDRM */ diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c index 83cdbf0..ebe15fe 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -68,8 +68,7 @@ static char kmsdrm_dri_cardpath[32]; #define EGL_PLATFORM_GBM_MESA 0x31D7 #endif -static int -get_driindex(void) +static int get_driindex(void) { int available = -ENOENT; char device[sizeof(kmsdrm_dri_cardpath)]; @@ -82,15 +81,15 @@ get_driindex(void) hint = SDL_GetHint(SDL_HINT_KMSDRM_DEVICE_INDEX); if (hint && *hint) { char *endptr = NULL; - const int idx = (int) SDL_strtol(hint, &endptr, 10); - if ((*endptr == '\0') && (idx >= 0)) { /* *endptr==0 means "whole string was a valid number" */ - return idx; /* we'll take the user's request here. */ + const int idx = (int)SDL_strtol(hint, &endptr, 10); + if ((*endptr == '\0') && (idx >= 0)) { /* *endptr==0 means "whole string was a valid number" */ + return idx; /* we'll take the user's request here. */ } } SDL_strlcpy(device, kmsdrm_dri_path, sizeof(device)); folder = opendir(device); - if (!folder) { + if (folder == NULL) { SDL_SetError("Failed to open directory '%s'", device); return -ENOENT; } @@ -128,7 +127,7 @@ get_driindex(void) KMSDRM_drmModeGetConnector( drm_fd, resources->connectors[i]); - if (!conn) { + if (conn == NULL) { continue; } @@ -171,8 +170,7 @@ get_driindex(void) return available; } -static int -KMSDRM_Available(void) +static int KMSDRM_Available(void) { #ifdef __OpenBSD__ struct utsname nameofsystem; @@ -199,8 +197,8 @@ KMSDRM_Available(void) kmsdrm_dri_pathsize = SDL_strlen(kmsdrm_dri_path); kmsdrm_dri_devnamesize = SDL_strlen(kmsdrm_dri_devname); - SDL_snprintf(kmsdrm_dri_cardpath, sizeof(kmsdrm_dri_cardpath), "%s%s", - kmsdrm_dri_path, kmsdrm_dri_devname); + (void)SDL_snprintf(kmsdrm_dri_cardpath, sizeof(kmsdrm_dri_cardpath), "%s%s", + kmsdrm_dri_path, kmsdrm_dri_devname); ret = get_driindex(); if (ret >= 0) { @@ -210,8 +208,7 @@ KMSDRM_Available(void) return ret; } -static void -KMSDRM_DeleteDevice(SDL_VideoDevice * device) +static void KMSDRM_DeleteDevice(SDL_VideoDevice *device) { if (device->driverdata) { SDL_free(device->driverdata); @@ -223,8 +220,7 @@ KMSDRM_DeleteDevice(SDL_VideoDevice * device) SDL_KMSDRM_UnloadSymbols(); } -static SDL_VideoDevice * -KMSDRM_CreateDevice(void) +static SDL_VideoDevice *KMSDRM_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *viddata; @@ -244,14 +240,14 @@ KMSDRM_CreateDevice(void) return NULL; } - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); return NULL; } - viddata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (!viddata) { + viddata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); + if (viddata == NULL) { SDL_OutOfMemory(); goto cleanup; } @@ -310,8 +306,9 @@ KMSDRM_CreateDevice(void) cleanup: SDL_free(device); - if (viddata) + if (viddata) { SDL_free(viddata); + } return NULL; } @@ -321,8 +318,7 @@ VideoBootStrap KMSDRM_bootstrap = { KMSDRM_CreateDevice }; -static void -KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data) +static void KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data) { KMSDRM_FBInfo *fb_info = (KMSDRM_FBInfo *)data; @@ -334,11 +330,10 @@ KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data) SDL_free(fb_info); } -KMSDRM_FBInfo * -KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) +KMSDRM_FBInfo *KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); - unsigned w,h; + unsigned w, h; int ret; Uint32 stride, handle; @@ -353,7 +348,7 @@ KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) when the backing buffer is destroyed */ fb_info = (KMSDRM_FBInfo *)SDL_calloc(1, sizeof(KMSDRM_FBInfo)); - if (!fb_info) { + if (fb_info == NULL) { SDL_OutOfMemory(); return NULL; } @@ -366,10 +361,10 @@ KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) stride = KMSDRM_gbm_bo_get_stride(bo); handle = KMSDRM_gbm_bo_get_handle(bo).u32; ret = KMSDRM_drmModeAddFB(viddata->drm_fd, w, h, 24, 32, stride, handle, - &fb_info->fb_id); + &fb_info->fb_id); if (ret) { - SDL_free(fb_info); - return NULL; + SDL_free(fb_info); + return NULL; } SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "New DRM FB (%u): %ux%u, stride %u from BO %p", @@ -381,18 +376,17 @@ KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) return fb_info; } -static void -KMSDRM_FlipHandler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *data) +static void KMSDRM_FlipHandler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *data) { - *((SDL_bool *) data) = SDL_FALSE; + *((SDL_bool *)data) = SDL_FALSE; } -SDL_bool -KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata) { +SDL_bool KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata) +{ SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); - drmEventContext ev = {0}; - struct pollfd pfd = {0}; + drmEventContext ev = { 0 }; + struct pollfd pfd = { 0 }; int ret; ev.version = DRM_EVENT_CONTEXT_VERSION; @@ -454,7 +448,7 @@ KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata) { If it's not, we keep iterating on the loop. */ KMSDRM_drmHandleEvent(viddata->drm_fd, &ev); } - + /* If we got to this point in the loop, we may iterate or exit the loop: -A legit (non-error) event arrived, and it was a POLLING event, and it was consumed by drmHandleEvent(). @@ -464,8 +458,7 @@ KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata) { iterare back to polling. -A legit (non-error) event arrived, but it's not a POLLIN event, so it hasn't to be consumed by drmHandleEvent(), so waiting_for_flip isn't set and we iterate back - to polling. */ - + to polling. */ } return SDL_TRUE; @@ -475,11 +468,11 @@ KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata) { available on the DRM connector of the display. We use the SDL mode list (which we filled in KMSDRM_GetDisplayModes) because it's ordered, while the list on the connector is mostly random.*/ -static drmModeModeInfo* -KMSDRM_GetClosestDisplayMode(SDL_VideoDisplay * display, -uint32_t width, uint32_t height, uint32_t refresh_rate){ +static drmModeModeInfo *KMSDRM_GetClosestDisplayMode(SDL_VideoDisplay *display, + uint32_t width, uint32_t height, uint32_t refresh_rate) +{ - SDL_DisplayData *dispdata = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; drmModeConnector *connector = dispdata->connector; SDL_DisplayMode target, closest; @@ -506,8 +499,8 @@ uint32_t width, uint32_t height, uint32_t refresh_rate){ /*****************************************************************************/ /* Deinitializes the driverdata of the SDL Displays in the SDL display list. */ -static void -KMSDRM_DeinitDisplays (_THIS) { +static void KMSDRM_DeinitDisplays(_THIS) +{ SDL_DisplayData *dispdata; int num_displays, i; @@ -516,8 +509,8 @@ KMSDRM_DeinitDisplays (_THIS) { /* Iterate on the SDL Display list. */ for (i = 0; i < num_displays; i++) { - - /* Get the driverdata for this display */ + + /* Get the driverdata for this display */ dispdata = (SDL_DisplayData *)SDL_GetDisplayDriverData(i); /* Free connector */ @@ -534,122 +527,127 @@ KMSDRM_DeinitDisplays (_THIS) { } } -static uint32_t -KMSDRM_CrtcGetPropId(uint32_t drm_fd, - drmModeObjectPropertiesPtr props, - char const* name) +static uint32_t KMSDRM_CrtcGetPropId(uint32_t drm_fd, + drmModeObjectPropertiesPtr props, + char const *name) { uint32_t i, prop_id = 0; for (i = 0; !prop_id && i < props->count_props; ++i) { drmModePropertyPtr drm_prop = - KMSDRM_drmModeGetProperty(drm_fd, props->props[i]); + KMSDRM_drmModeGetProperty(drm_fd, props->props[i]); - if (!drm_prop) + if (!drm_prop) { continue; + } - if (strcmp(drm_prop->name, name) == 0) + if (SDL_strcmp(drm_prop->name, name) == 0) { prop_id = drm_prop->prop_id; + } KMSDRM_drmModeFreeProperty(drm_prop); - } + } return prop_id; } -static SDL_bool KMSDRM_VrrPropId(uint32_t drm_fd, uint32_t crtc_id, uint32_t *vrr_prop_id) { +static SDL_bool KMSDRM_VrrPropId(uint32_t drm_fd, uint32_t crtc_id, uint32_t *vrr_prop_id) +{ drmModeObjectPropertiesPtr drm_props; drm_props = KMSDRM_drmModeObjectGetProperties(drm_fd, - crtc_id, - DRM_MODE_OBJECT_CRTC); + crtc_id, + DRM_MODE_OBJECT_CRTC); - if (!drm_props) + if (!drm_props) { return SDL_FALSE; + } *vrr_prop_id = KMSDRM_CrtcGetPropId(drm_fd, - drm_props, - "VRR_ENABLED"); + drm_props, + "VRR_ENABLED"); KMSDRM_drmModeFreeObjectProperties(drm_props); return SDL_TRUE; } -static SDL_bool -KMSDRM_ConnectorCheckVrrCapable(uint32_t drm_fd, - uint32_t output_id, - char const* name) +static SDL_bool KMSDRM_ConnectorCheckVrrCapable(uint32_t drm_fd, + uint32_t output_id, + char const *name) { uint32_t i; SDL_bool found = SDL_FALSE; uint64_t prop_value = 0; - drmModeObjectPropertiesPtr props = KMSDRM_drmModeObjectGetProperties(drm_fd, - output_id, - DRM_MODE_OBJECT_CONNECTOR); + output_id, + DRM_MODE_OBJECT_CONNECTOR); - if(!props) + if (!props) { return SDL_FALSE; + } for (i = 0; !found && i < props->count_props; ++i) { drmModePropertyPtr drm_prop = KMSDRM_drmModeGetProperty(drm_fd, props->props[i]); - if (!drm_prop) + if (!drm_prop) { continue; + } - if (strcasecmp(drm_prop->name, name) == 0) { + if (SDL_strcasecmp(drm_prop->name, name) == 0) { prop_value = props->prop_values[i]; found = SDL_TRUE; } KMSDRM_drmModeFreeProperty(drm_prop); } - if(found) - return prop_value ? SDL_TRUE: SDL_FALSE; + if (found) { + return prop_value ? SDL_TRUE : SDL_FALSE; + } return SDL_FALSE; } -void -KMSDRM_CrtcSetVrr(uint32_t drm_fd, uint32_t crtc_id, SDL_bool enabled) +void KMSDRM_CrtcSetVrr(uint32_t drm_fd, uint32_t crtc_id, SDL_bool enabled) { uint32_t vrr_prop_id; - if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id)) + if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id)) { return; + } KMSDRM_drmModeObjectSetProperty(drm_fd, - crtc_id, - DRM_MODE_OBJECT_CRTC, - vrr_prop_id, - enabled); + crtc_id, + DRM_MODE_OBJECT_CRTC, + vrr_prop_id, + enabled); } -static SDL_bool -KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id) +static SDL_bool KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id) { uint32_t object_prop_id, vrr_prop_id; drmModeObjectPropertiesPtr props; SDL_bool object_prop_value; int i; - if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id)) + if (!KMSDRM_VrrPropId(drm_fd, crtc_id, &vrr_prop_id)) { return SDL_FALSE; - + } props = KMSDRM_drmModeObjectGetProperties(drm_fd, - crtc_id, - DRM_MODE_OBJECT_CRTC); + crtc_id, + DRM_MODE_OBJECT_CRTC); - if(!props) + if (!props) { return SDL_FALSE; + } for (i = 0; i < props->count_props; ++i) { drmModePropertyPtr drm_prop = KMSDRM_drmModeGetProperty(drm_fd, props->props[i]); - if (!drm_prop) + if (!drm_prop) { continue; + } object_prop_id = drm_prop->prop_id; object_prop_value = props->prop_values[i] ? SDL_TRUE : SDL_FALSE; @@ -665,12 +663,11 @@ KMSDRM_CrtcGetVrr(uint32_t drm_fd, uint32_t crtc_id) /* Gets a DRM connector, builds an SDL_Display with it, and adds it to the list of SDL Displays in _this->displays[] */ -static void -KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) +static void KMSDRM_AddDisplay(_THIS, drmModeConnector *connector, drmModeRes *resources) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); SDL_DisplayData *dispdata = NULL; - SDL_VideoDisplay display = {0}; + SDL_VideoDisplay display = { 0 }; SDL_DisplayModeData *modedata = NULL; drmModeEncoder *encoder = NULL; drmModeCrtc *crtc = NULL; @@ -679,8 +676,8 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) int ret = 0; /* Reserve memory for the new display's driverdata. */ - dispdata = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData)); - if (!dispdata) { + dispdata = (SDL_DisplayData *)SDL_calloc(1, sizeof(SDL_DisplayData)); + if (dispdata == NULL) { ret = SDL_OutOfMemory(); goto cleanup; } @@ -701,8 +698,8 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) for (i = 0; i < resources->count_encoders; i++) { encoder = KMSDRM_drmModeGetEncoder(viddata->drm_fd, resources->encoders[i]); - if (!encoder) { - continue; + if (encoder == NULL) { + continue; } if (encoder->encoder_id == connector->encoder_id) { @@ -713,13 +710,13 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) encoder = NULL; } - if (!encoder) { + if (encoder == NULL) { /* No encoder was connected, find the first supported one */ for (i = 0; i < resources->count_encoders; i++) { encoder = KMSDRM_drmModeGetEncoder(viddata->drm_fd, - resources->encoders[i]); + resources->encoders[i]); - if (!encoder) { + if (encoder == NULL) { continue; } @@ -738,7 +735,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) } } - if (!encoder) { + if (encoder == NULL) { ret = SDL_SetError("No connected encoder found for connector."); goto cleanup; } @@ -748,7 +745,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) /* If no CRTC was connected to the encoder, find the first CRTC that is supported by the encoder, and use that. */ - if (!crtc) { + if (crtc == NULL) { for (i = 0; i < resources->count_crtcs; i++) { if (encoder->possible_crtcs & (1 << i)) { encoder->crtc_id = resources->crtcs[i]; @@ -758,7 +755,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) } } - if (!crtc) { + if (crtc == NULL) { ret = SDL_SetError("No CRTC found for connector."); goto cleanup; } @@ -818,7 +815,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) dispdata->original_mode = crtc->mode; dispdata->fullscreen_mode = crtc->mode; - if (dispdata->mode.hdisplay == 0 || dispdata->mode.vdisplay == 0 ) { + if (dispdata->mode.hdisplay == 0 || dispdata->mode.vdisplay == 0) { ret = SDL_SetError("Couldn't get a valid connector videomode."); goto cleanup; } @@ -830,7 +827,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) /* save previous vrr state */ dispdata->saved_vrr = KMSDRM_CrtcGetVrr(viddata->drm_fd, crtc->crtc_id); /* try to enable vrr */ - if(KMSDRM_ConnectorCheckVrrCapable(viddata->drm_fd, connector->connector_id, "VRR_CAPABLE")) { + if (KMSDRM_ConnectorCheckVrrCapable(viddata->drm_fd, connector->connector_id, "VRR_CAPABLE")) { SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Enabling VRR"); KMSDRM_CrtcSetVrr(viddata->drm_fd, crtc->crtc_id, SDL_TRUE); } @@ -843,7 +840,7 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) There's no problem with it being still incomplete. */ modedata = SDL_calloc(1, sizeof(SDL_DisplayModeData)); - if (!modedata) { + if (modedata == NULL) { ret = SDL_OutOfMemory(); goto cleanup; } @@ -862,8 +859,9 @@ KMSDRM_AddDisplay (_THIS, drmModeConnector *connector, drmModeRes *resources) SDL_AddVideoDisplay(&display, SDL_FALSE); cleanup: - if (encoder) + if (encoder) { KMSDRM_drmModeFreeEncoder(encoder); + } if (ret) { /* Error (complete) cleanup */ if (dispdata) { @@ -878,7 +876,7 @@ cleanup: SDL_free(dispdata); } } -} +} /* NOLINT(clang-analyzer-unix.Malloc): If no error `dispdata` is saved in the display */ /* Initializes the list of SDL displays: we build a new display for each connecter connector we find. @@ -886,8 +884,8 @@ cleanup: closed when we get to the end of this function. This is to be called early, in VideoInit(), because it gets us the videomode information, which SDL needs immediately after VideoInit(). */ -static int -KMSDRM_InitDisplays (_THIS) { +static int KMSDRM_InitDisplays(_THIS) +{ SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); drmModeRes *resources = NULL; @@ -897,8 +895,8 @@ KMSDRM_InitDisplays (_THIS) { int i; /* Open /dev/dri/cardNN (/dev/drmN if on OpenBSD version less than 6.9) */ - SDL_snprintf(viddata->devpath, sizeof(viddata->devpath), "%s%d", - kmsdrm_dri_cardpath, viddata->devindex); + (void)SDL_snprintf(viddata->devpath, sizeof(viddata->devpath), "%s%d", + kmsdrm_dri_cardpath, viddata->devindex); SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Opening device %s", viddata->devpath); viddata->drm_fd = open(viddata->devpath, O_RDWR | O_CLOEXEC); @@ -912,7 +910,7 @@ KMSDRM_InitDisplays (_THIS) { /* Get all of the available connectors / devices / crtcs */ resources = KMSDRM_drmModeGetResources(viddata->drm_fd); - if (!resources) { + if (resources == NULL) { ret = SDL_SetError("drmModeGetResources(%d) failed", viddata->drm_fd); goto cleanup; } @@ -921,9 +919,9 @@ KMSDRM_InitDisplays (_THIS) { we create an SDL_Display and add it to the list of SDL Displays. */ for (i = 0; i < resources->count_connectors; i++) { drmModeConnector *connector = KMSDRM_drmModeGetConnector(viddata->drm_fd, - resources->connectors[i]); + resources->connectors[i]); - if (!connector) { + if (connector == NULL) { continue; } @@ -933,8 +931,7 @@ KMSDRM_InitDisplays (_THIS) { so if it fails (no encoder for connector, no valid video mode for connector etc...) we can keep looking for connected connectors. */ KMSDRM_AddDisplay(_this, connector, resources); - } - else { + } else { /* If it's not, free it now. */ KMSDRM_drmModeFreeConnector(connector); } @@ -959,12 +956,13 @@ KMSDRM_InitDisplays (_THIS) { /* THIS IS FOR VULKAN! Leave the FD closed, so VK can work. Will reopen this in CreateWindow, but only if requested a non-VK window. */ - close (viddata->drm_fd); + close(viddata->drm_fd); viddata->drm_fd = -1; cleanup: - if (resources) + if (resources) { KMSDRM_drmModeFreeResources(resources); + } if (ret) { if (viddata->drm_fd >= 0) { close(viddata->drm_fd); @@ -982,8 +980,7 @@ cleanup: These things are incompatible with Vulkan, which accesses the same resources internally so they must be free when trying to build a Vulkan surface. */ -static int -KMSDRM_GBMInit (_THIS, SDL_DisplayData *dispdata) +static int KMSDRM_GBMInit(_THIS, SDL_DisplayData *dispdata) { SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; int ret = 0; @@ -1006,8 +1003,7 @@ KMSDRM_GBMInit (_THIS, SDL_DisplayData *dispdata) } /* Deinit the Vulkan-incompatible KMSDRM stuff. */ -static void -KMSDRM_GBMDeinit (_THIS, SDL_DisplayData *dispdata) +static void KMSDRM_GBMDeinit(_THIS, SDL_DisplayData *dispdata) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); @@ -1027,12 +1023,11 @@ KMSDRM_GBMDeinit (_THIS, SDL_DisplayData *dispdata) viddata->gbm_init = SDL_FALSE; } -static void -KMSDRM_DestroySurfaces(_THIS, SDL_Window *window) +static void KMSDRM_DestroySurfaces(_THIS, SDL_Window *window) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); - SDL_WindowData *windata = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_WindowData *windata = (SDL_WindowData *)window->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; int ret; /**********************************************/ @@ -1046,17 +1041,17 @@ KMSDRM_DestroySurfaces(_THIS, SDL_Window *window) /***********************************************************************/ ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, dispdata->crtc->crtc_id, - dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1, - &dispdata->original_mode); + dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1, + &dispdata->original_mode); /* If we failed to set the original mode, try to set the connector prefered mode. */ if (ret && (dispdata->crtc->mode_valid == 0)) { ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, dispdata->crtc->crtc_id, - dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1, - &dispdata->original_mode); + dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1, + &dispdata->original_mode); } - if(ret) { + if (ret) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not restore CRTC"); } @@ -1095,8 +1090,8 @@ KMSDRM_DestroySurfaces(_THIS, SDL_Window *window) } } -static void -KMSDRM_GetModeToSet(SDL_Window *window, drmModeModeInfo *out_mode) { +static void KMSDRM_GetModeToSet(SDL_Window *window, drmModeModeInfo *out_mode) +{ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; @@ -1106,7 +1101,7 @@ KMSDRM_GetModeToSet(SDL_Window *window, drmModeModeInfo *out_mode) { drmModeModeInfo *mode; mode = KMSDRM_GetClosestDisplayMode(display, - window->windowed.w, window->windowed.h, 0); + window->windowed.w, window->windowed.h, 0); if (mode) { *out_mode = *mode; @@ -1116,8 +1111,8 @@ KMSDRM_GetModeToSet(SDL_Window *window, drmModeModeInfo *out_mode) { } } -static void -KMSDRM_DirtySurfaces(SDL_Window *window) { +static void KMSDRM_DirtySurfaces(SDL_Window *window) +{ SDL_WindowData *windata = (SDL_WindowData *)window->driverdata; drmModeModeInfo mode; @@ -1134,8 +1129,7 @@ KMSDRM_DirtySurfaces(SDL_Window *window) { /* This determines the size of the fb, which comes from the GBM surface that we create here. */ -int -KMSDRM_CreateSurfaces(_THIS, SDL_Window * window) +int KMSDRM_CreateSurfaces(_THIS, SDL_Window *window) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); SDL_WindowData *windata = (SDL_WindowData *)window->driverdata; @@ -1155,9 +1149,9 @@ KMSDRM_CreateSurfaces(_THIS, SDL_Window * window) } if (!KMSDRM_gbm_device_is_format_supported(viddata->gbm_dev, - surface_fmt, surface_flags)) { + surface_fmt, surface_flags)) { SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, - "GBM surface format not supported. Trying anyway."); + "GBM surface format not supported. Trying anyway."); } /* The KMSDRM backend doesn't always set the mode the higher-level code in @@ -1171,8 +1165,8 @@ KMSDRM_CreateSurfaces(_THIS, SDL_Window * window) display->current_mode.format = SDL_PIXELFORMAT_ARGB8888; windata->gs = KMSDRM_gbm_surface_create(viddata->gbm_dev, - dispdata->mode.hdisplay, dispdata->mode.vdisplay, - surface_fmt, surface_flags); + dispdata->mode.hdisplay, dispdata->mode.vdisplay, + surface_fmt, surface_flags); if (!windata->gs) { return SDL_SetError("Could not create GBM surface"); @@ -1212,8 +1206,7 @@ cleanup: return ret; } -int -KMSDRM_VideoInit(_THIS) +int KMSDRM_VideoInit(_THIS) { int ret = 0; @@ -1244,8 +1237,7 @@ KMSDRM_VideoInit(_THIS) /* The driverdata pointers, like dispdata, viddata, windata, etc... are freed by SDL internals, so not our job. */ -void -KMSDRM_VideoQuit(_THIS) +void KMSDRM_VideoQuit(_THIS) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); @@ -1266,8 +1258,7 @@ KMSDRM_VideoQuit(_THIS) } /* Read modes from the connector modes, and store them in display->display_modes. */ -void -KMSDRM_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void KMSDRM_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { SDL_DisplayData *dispdata = display->driverdata; drmModeConnector *conn = dispdata->connector; @@ -1293,8 +1284,7 @@ KMSDRM_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } } -int -KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { /* Set the dispdata->mode to the new mode and leave actual modesetting pending to be done on SwapWindow() via drmModeSetCrtc() */ @@ -1310,7 +1300,7 @@ KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) return 0; } - if (!modedata) { + if (modedata == NULL) { return SDL_SetError("Mode doesn't have an associated index"); } @@ -1325,16 +1315,15 @@ KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) return 0; } -void -KMSDRM_DestroyWindow(_THIS, SDL_Window *window) +void KMSDRM_DestroyWindow(_THIS, SDL_Window *window) { - SDL_WindowData *windata = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_WindowData *windata = (SDL_WindowData *)window->driverdata; + SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; SDL_VideoData *viddata; SDL_bool is_vulkan = window->flags & SDL_WINDOW_VULKAN; /* Is this a VK window? */ unsigned int i, j; - if (!windata) { + if (windata == NULL) { return; } @@ -1343,7 +1332,7 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window) viddata = windata->viddata; - if ( !is_vulkan && viddata->gbm_init) { + if (!is_vulkan && viddata->gbm_init) { /* Destroy cursor GBM BO of the display of this window. */ KMSDRM_DestroyCursorBO(_this, SDL_GetDisplayForWindow(window)); @@ -1358,15 +1347,15 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window) added to the windows list. */ if (viddata->num_windows <= 1) { - /* Unload EGL/GL library and free egl_data. */ - if (_this->egl_data) { - SDL_EGL_UnloadLibrary(_this); - _this->gl_config.driver_loaded = 0; - } + /* Unload EGL/GL library and free egl_data. */ + if (_this->egl_data) { + SDL_EGL_UnloadLibrary(_this); + _this->gl_config.driver_loaded = 0; + } - /* Free display plane, and destroy GBM device. */ - KMSDRM_GBMDeinit(_this, dispdata); - } + /* Free display plane, and destroy GBM device. */ + KMSDRM_GBMDeinit(_this, dispdata); + } } else { @@ -1403,24 +1392,23 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window) /* We simply IGNORE if it's a fullscreen window, window->flags don't */ /* reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() will */ /* be called by SDL later, and we can manage it there. */ -/**********************************************************************/ -int -KMSDRM_CreateWindow(_THIS, SDL_Window * window) +/**********************************************************************/ +int KMSDRM_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *windata = NULL; SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayData *dispdata = display->driverdata; SDL_bool is_vulkan = window->flags & SDL_WINDOW_VULKAN; /* Is this a VK window? */ - SDL_bool vulkan_mode = viddata->vulkan_mode; /* Do we have any Vulkan windows? */ + SDL_bool vulkan_mode = viddata->vulkan_mode; /* Do we have any Vulkan windows? */ NativeDisplayType egl_display; drmModeModeInfo *mode; int ret = 0; /* Allocate window internal data */ windata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); - if (!windata) { - return(SDL_OutOfMemory()); + if (windata == NULL) { + return SDL_OutOfMemory(); } /* Setup driver data for this window */ @@ -1438,7 +1426,7 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) /* After SDL_CreateWindow, most SDL2 programs will do SDL_CreateRenderer(), which will in turn call GL_CreateRenderer() or GLES2_CreateRenderer(). In order for the GL_CreateRenderer() or GLES2_CreateRenderer() call to - succeed without an unnecessary window re-creation, we must: + succeed without an unnecessary window re-creation, we must: -Mark the window as being OPENGL -Load the GL library (which can't be done until the GBM device has been created, so we have to do it here instead of doing it on VideoInit()) @@ -1451,8 +1439,9 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) /* Reopen FD, create gbm dev, setup display plane, etc,. but only when we come here for the first time, and only if it's not a VK window. */ - if ((ret = KMSDRM_GBMInit(_this, dispdata))) { - return (SDL_SetError("Can't init GBM on window creation.")); + ret = KMSDRM_GBMInit(_this, dispdata); + if (ret != 0) { + return SDL_SetError("Can't init GBM on window creation."); } } @@ -1469,12 +1458,11 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) _this->gl_config.major_version = 2; _this->gl_config.minor_version = 0; if (SDL_EGL_LoadLibrary(_this, NULL, egl_display, EGL_PLATFORM_GBM_MESA) < 0) { - return (SDL_SetError("Can't load EGL/GL library on window creation.")); + return SDL_SetError("Can't load EGL/GL library on window creation."); } } _this->gl_config.driver_loaded = 1; - } /* Create the cursor BO for the display of this window, @@ -1491,7 +1479,7 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) If a window is fullscreen, SDL internals will call KMSDRM_SetWindowFullscreen() to reconfigure it if necessary. */ mode = KMSDRM_GetClosestDisplayMode(display, - window->windowed.w, window->windowed.h, 0 ); + window->windowed.w, window->windowed.h, 0); if (mode) { dispdata->fullscreen_mode = *mode; @@ -1501,8 +1489,9 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) /* Create the window surfaces with the size we have just chosen. Needs the window diverdata in place. */ - if ((ret = KMSDRM_CreateSurfaces(_this, window))) { - return (SDL_SetError("Can't window GBM/EGL surfaces on window creation.")); + ret = KMSDRM_CreateSurfaces(_this, window); + if (ret != 0) { + return SDL_SetError("Can't window GBM/EGL surfaces on window creation."); } } /* NON-Vulkan block ends. */ @@ -1512,11 +1501,11 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) if (viddata->num_windows >= viddata->max_windows) { unsigned int new_max_windows = viddata->max_windows + 1; viddata->windows = (SDL_Window **)SDL_realloc(viddata->windows, - new_max_windows * sizeof(SDL_Window *)); + new_max_windows * sizeof(SDL_Window *)); viddata->max_windows = new_max_windows; if (!viddata->windows) { - return (SDL_OutOfMemory()); + return SDL_OutOfMemory(); } } @@ -1535,12 +1524,11 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) /* Allocated windata will be freed in KMSDRM_DestroyWindow, and KMSDRM_DestroyWindow() will be called by SDL_CreateWindow() - if we return error on any of the previous returns of the function. */ + if we return error on any of the previous returns of the function. */ return ret; } -int -KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) +int KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) { SDL_WindowData *windata = (SDL_WindowData*)window->driverdata; SDL_VideoData *viddata = (SDL_VideoData*)windata->viddata; @@ -1553,8 +1541,7 @@ KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) return 0; } -int -KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) +int KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) { SDL_WindowData *windata = (SDL_WindowData*)window->driverdata; SDL_VideoData *viddata = (SDL_VideoData*)windata->viddata; @@ -1575,34 +1562,28 @@ KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) return 0; } -int -KMSDRM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int KMSDRM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { return -1; } -void -KMSDRM_SetWindowTitle(_THIS, SDL_Window * window) +void KMSDRM_SetWindowTitle(_THIS, SDL_Window *window) { } -void -KMSDRM_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void KMSDRM_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { } -void -KMSDRM_SetWindowPosition(_THIS, SDL_Window * window) +void KMSDRM_SetWindowPosition(_THIS, SDL_Window *window) { } -void -KMSDRM_SetWindowSize(_THIS, SDL_Window * window) +void KMSDRM_SetWindowSize(_THIS, SDL_Window *window) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); if (!viddata->vulkan_mode) { KMSDRM_DirtySurfaces(window); } } -void -KMSDRM_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +void KMSDRM_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); @@ -1610,36 +1591,29 @@ KMSDRM_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * displa KMSDRM_DirtySurfaces(window); } } -void -KMSDRM_ShowWindow(_THIS, SDL_Window * window) +void KMSDRM_ShowWindow(_THIS, SDL_Window *window) { } -void -KMSDRM_HideWindow(_THIS, SDL_Window * window) +void KMSDRM_HideWindow(_THIS, SDL_Window *window) { } -void -KMSDRM_RaiseWindow(_THIS, SDL_Window * window) +void KMSDRM_RaiseWindow(_THIS, SDL_Window *window) { } -void -KMSDRM_MaximizeWindow(_THIS, SDL_Window * window) +void KMSDRM_MaximizeWindow(_THIS, SDL_Window *window) { } -void -KMSDRM_MinimizeWindow(_THIS, SDL_Window * window) +void KMSDRM_MinimizeWindow(_THIS, SDL_Window *window) { } -void -KMSDRM_RestoreWindow(_THIS, SDL_Window * window) +void KMSDRM_RestoreWindow(_THIS, SDL_Window *window) { } /*****************************************************************************/ /* SDL Window Manager function */ /*****************************************************************************/ -SDL_bool -KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata); const Uint32 version = SDL_VERSIONNUM((Uint32)info->version.major, @@ -1651,10 +1625,10 @@ KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) return SDL_FALSE; } - info->subsystem = SDL_SYSWM_KMSDRM; - info->info.kmsdrm.dev_index = viddata->devindex; - info->info.kmsdrm.drm_fd = viddata->drm_fd; - info->info.kmsdrm.gbm_dev = viddata->gbm_dev; + info->subsystem = SDL_SYSWM_KMSDRM; + info->info.kmsdrm.dev_index = viddata->devindex; + info->info.kmsdrm.drm_fd = viddata->drm_fd; + info->info.kmsdrm.gbm_dev = viddata->gbm_dev; return SDL_TRUE; } diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h index ae004d0..b48f6ef 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h @@ -35,15 +35,15 @@ typedef struct SDL_VideoData { - int devindex; /* device index that was passed on creation */ - int drm_fd; /* DRM file desc */ - char devpath[32]; /* DRM dev path. */ + int devindex; /* device index that was passed on creation */ + int drm_fd; /* DRM file desc */ + char devpath[32]; /* DRM dev path. */ struct gbm_device *gbm_dev; SDL_bool video_init; /* Has VideoInit succeeded? */ SDL_bool vulkan_mode; /* Are we in Vulkan mode? One VK window is enough to be. */ - SDL_bool async_pageflip_support; /* Does the hardware support async. pageflips? */ + SDL_bool async_pageflip_support; /* Does the hardware support async. pageflips? */ SDL_Window **windows; int max_windows; @@ -55,13 +55,11 @@ typedef struct SDL_VideoData } SDL_VideoData; - typedef struct SDL_DisplayModeData { int mode_index; } SDL_DisplayModeData; - typedef struct SDL_DisplayData { drmModeConnector *connector; @@ -70,7 +68,7 @@ typedef struct SDL_DisplayData drmModeModeInfo original_mode; drmModeModeInfo fullscreen_mode; - drmModeCrtc *saved_crtc; /* CRTC to restore on quit */ + drmModeCrtc *saved_crtc; /* CRTC to restore on quit */ SDL_bool saved_vrr; /* DRM & GBM cursor stuff lives here, not in an SDL_Cursor's driverdata struct, @@ -104,12 +102,12 @@ typedef struct SDL_WindowData typedef struct KMSDRM_FBInfo { - int drm_fd; /* DRM file desc */ - uint32_t fb_id; /* DRM framebuffer ID */ + int drm_fd; /* DRM file desc */ + uint32_t fb_id; /* DRM framebuffer ID */ } KMSDRM_FBInfo; /* Helper functions */ -int KMSDRM_CreateSurfaces(_THIS, SDL_Window * window); +int KMSDRM_CreateSurfaces(_THIS, SDL_Window *window); KMSDRM_FBInfo *KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo); KMSDRM_FBInfo *KMSDRM_FBFromBO2(_THIS, struct gbm_bo *bo, int w, int h); SDL_bool KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata); @@ -148,11 +146,11 @@ SDL_bool KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, int KMSDRM_GLES_LoadLibrary(_THIS, const char *path); void *KMSDRM_GLES_GetProcAddress(_THIS, const char *proc); void KMSDRM_GLES_UnloadLibrary(_THIS); -SDL_GLContext KMSDRM_GLES_CreateContext(_THIS, SDL_Window * window); -int KMSDRM_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +SDL_GLContext KMSDRM_GLES_CreateContext(_THIS, SDL_Window *window); +int KMSDRM_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); int KMSDRM_GLES_SetSwapInterval(_THIS, int interval); int KMSDRM_GLES_GetSwapInterval(_THIS); -int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window * window); +int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window *window); void KMSDRM_GLES_DeleteContext(_THIS, SDL_GLContext context); #endif /* __SDL_KMSDRMVIDEO_H__ */ diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.c b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.c index c48c416..567bfc7 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.c +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.c @@ -38,9 +38,9 @@ #include "sys/ioctl.h" #if defined(__OpenBSD__) -#define DEFAULT_VULKAN "libvulkan.so" +#define DEFAULT_VULKAN "libvulkan.so" #else -#define DEFAULT_VULKAN "libvulkan.so.1" +#define DEFAULT_VULKAN "libvulkan.so.1" #endif int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path) @@ -51,19 +51,23 @@ int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasDisplayExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) + } + if (path == NULL) { path = DEFAULT_VULKAN; + } _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); @@ -71,45 +75,43 @@ int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path) vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; + } - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasDisplayExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else if(!hasDisplayExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_DISPLAY_EXTENSION_NAME "extension"); + } else if (!hasDisplayExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_DISPLAY_EXTENSION_NAME "extension"); goto fail; } @@ -123,8 +125,7 @@ fail: void KMSDRM_Vulkan_UnloadLibrary(_THIS) { - if(_this->vulkan_config.loader_handle) - { + if (_this->vulkan_config.loader_handle) { SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } @@ -141,21 +142,20 @@ void KMSDRM_Vulkan_UnloadLibrary(_THIS) /* vkCreateInstance(). */ /*********************************************************************/ SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names) + SDL_Window *window, + unsigned *count, + const char **names) { static const char *const extensionsForKMSDRM[] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_DISPLAY_EXTENSION_NAME }; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } return SDL_Vulkan_GetInstanceExtensions_Helper( - count, names, SDL_arraysize(extensionsForKMSDRM), - extensionsForKMSDRM); + count, names, SDL_arraysize(extensionsForKMSDRM), + extensionsForKMSDRM); } void KMSDRM_Vulkan_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h) @@ -175,12 +175,12 @@ void KMSDRM_Vulkan_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h) /* and we get it here, ready to use. */ /* Extensions specific for this platform are activated in */ /* KMSDRM_Vulkan_GetInstanceExtensions(), like we do with */ -/* VK_KHR_DISPLAY_EXTENSION_NAME, which is what we need for x-less VK. */ +/* VK_KHR_DISPLAY_EXTENSION_NAME, which is what we need for x-less VK. */ /***********************************************************************/ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface) + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface) { VkPhysicalDevice gpu = NULL; uint32_t gpu_count; @@ -202,8 +202,8 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, VkExtent2D image_size; VkDisplayKHR display; VkDisplayModeKHR display_mode = (VkDisplayModeKHR)0; - VkDisplayModePropertiesKHR display_mode_props = {0}; - VkDisplayModeParametersKHR new_mode_parameters = { {0, 0}, 0}; + VkDisplayModePropertiesKHR display_mode_props = { 0 }; + VkDisplayModeParametersKHR new_mode_parameters = { { 0, 0 }, 0 }; /* Prefer a plane that supports per-pixel alpha. */ VkDisplayPlaneAlphaFlagBitsKHR alpha_mode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR; @@ -257,8 +257,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, (PFN_vkCreateDisplayModeKHR)vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR"); - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); goto clean; } @@ -272,8 +271,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, /* that the VK_KHR_Display extension is active on the instance. */ /* That's the central extension we need for x-less VK! */ /****************************************************************/ - if(!vkCreateDisplayPlaneSurfaceKHR) - { + if (!vkCreateDisplayPlaneSurfaceKHR) { SDL_SetError(VK_KHR_DISPLAY_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); goto clean; @@ -306,13 +304,11 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, /* Get the physical device properties. */ vkGetPhysicalDeviceProperties( physical_devices[i], - device_props - ); + device_props); /* Is this device a real GPU that supports API version 1 at least? */ - if (device_props->apiVersion >= 1 && - (device_props->deviceType == 1 || device_props->deviceType == 2)) - { + if (device_props->apiVersion >= 1 && + (device_props->deviceType == 1 || device_props->deviceType == 2)) { gpu = physical_devices[i]; valid_gpu = SDL_TRUE; break; @@ -334,29 +330,29 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, } /* Get the props of the displays of the physical device. */ - display_props = (VkDisplayPropertiesKHR *) SDL_malloc(display_count * sizeof(*display_props)); + display_props = (VkDisplayPropertiesKHR *)SDL_malloc(display_count * sizeof(*display_props)); vkGetPhysicalDeviceDisplayPropertiesKHR(gpu, - &display_count, - display_props); + &display_count, + display_props); /* Get the chosen display based on the display index. */ display = display_props[display_index].display; /* Get the list of the display videomodes. */ vkGetDisplayModePropertiesKHR(gpu, - display, - &mode_count, NULL); + display, + &mode_count, NULL); if (mode_count == 0) { SDL_SetError("Vulkan can't find any video modes for display %i (%s)\n", 0, - display_props[display_index].displayName); + display_props[display_index].displayName); goto clean; } - mode_props = (VkDisplayModePropertiesKHR *) SDL_malloc(mode_count * sizeof(*mode_props)); + mode_props = (VkDisplayModePropertiesKHR *)SDL_malloc(mode_count * sizeof(*mode_props)); vkGetDisplayModePropertiesKHR(gpu, - display, - &mode_count, mode_props); + display, + &mode_count, mode_props); /* Get a video mode equal to the window size among the predefined ones, if possible. @@ -366,8 +362,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, buffer, and Vulkan would give us a confusing VK_ERROR_SURFACE_LOST_KHR). */ for (i = 0; i < mode_count; i++) { if (mode_props[i].parameters.visibleRegion.width == window->w && - mode_props[i].parameters.visibleRegion.height == window->h) - { + mode_props[i].parameters.visibleRegion.height == window->h) { display_mode_props = mode_props[i]; mode_found = SDL_TRUE; break; @@ -376,7 +371,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, if (mode_found && display_mode_props.parameters.visibleRegion.width > 0 && - display_mode_props.parameters.visibleRegion.height > 0 ) { + display_mode_props.parameters.visibleRegion.height > 0) { /* Found a suitable mode among the predefined ones. Use that. */ display_mode = display_mode_props.displayMode; } else { @@ -406,8 +401,8 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, /* Just in case we get here without a display_mode. */ if (!display_mode) { - SDL_SetError("Vulkan couldn't get a display mode."); - goto clean; + SDL_SetError("Vulkan couldn't get a display mode."); + goto clean; } /* Get the list of the physical device planes. */ @@ -427,7 +422,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, for (i = 0; i < plane_count; i++) { uint32_t supported_displays_count = 0; - VkDisplayKHR* supported_displays; + VkDisplayKHR *supported_displays; /* See if the plane is compatible with the current display. */ vkGetDisplayPlaneSupportedDisplaysKHR(gpu, i, &supported_displays_count, NULL); @@ -437,15 +432,15 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, } /* Get the list of displays supported by this plane. */ - supported_displays = (VkDisplayKHR*)SDL_malloc(sizeof(VkDisplayKHR) * supported_displays_count); + supported_displays = (VkDisplayKHR *)SDL_malloc(sizeof(VkDisplayKHR) * supported_displays_count); vkGetDisplayPlaneSupportedDisplaysKHR(gpu, i, - &supported_displays_count, supported_displays); + &supported_displays_count, supported_displays); /* The plane must be bound to the chosen display, or not in use. If none of these is true, iterate to another plane. */ - if (!((plane_props[i].currentDisplay == display) || - (plane_props[i].currentDisplay == VK_NULL_HANDLE))) + if (!((plane_props[i].currentDisplay == display) || (plane_props[i].currentDisplay == VK_NULL_HANDLE))) { continue; + } /* Iterate the list of displays supported by this plane in order to find out if the chosen display is among them. */ @@ -488,7 +483,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, image_size.width = window->w; image_size.height = window->h; - + SDL_zero(display_plane_surface_create_info); display_plane_surface_create_info.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR; display_plane_surface_create_info.displayMode = display_mode; @@ -497,29 +492,33 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, display_plane_surface_create_info.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; display_plane_surface_create_info.alphaMode = alpha_mode; result = vkCreateDisplayPlaneSurfaceKHR(instance, - &display_plane_surface_create_info, - NULL, - surface); - if(result != VK_SUCCESS) - { + &display_plane_surface_create_info, + NULL, + surface); + if (result != VK_SUCCESS) { SDL_SetError("vkCreateDisplayPlaneSurfaceKHR failed: %s", - SDL_Vulkan_GetResultString(result)); + SDL_Vulkan_GetResultString(result)); goto clean; } ret = SDL_TRUE; clean: - if (physical_devices) - SDL_free (physical_devices); - if (display_props) - SDL_free (display_props); - if (device_props) - SDL_free (device_props); - if (plane_props) - SDL_free (plane_props); - if (mode_props) - SDL_free (mode_props); + if (physical_devices) { + SDL_free(physical_devices); + } + if (display_props) { + SDL_free(display_props); + } + if (device_props) { + SDL_free(device_props); + } + if (plane_props) { + SDL_free(plane_props); + } + if (mode_props) { + SDL_free(mode_props); + } return ret; } diff --git a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.h b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.h index d8c5e28..76e865a 100644 --- a/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.h +++ b/modules/SDL2/src/video/kmsdrm/SDL_kmsdrmvulkan.h @@ -37,14 +37,14 @@ int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path); void KMSDRM_Vulkan_UnloadLibrary(_THIS); SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names); + SDL_Window *window, + unsigned *count, + const char **names); void KMSDRM_Vulkan_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h); SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface); + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface); #endif diff --git a/modules/SDL2/src/video/n3ds/SDL_n3dsevents.c b/modules/SDL2/src/video/n3ds/SDL_n3dsevents.c index 08095e7..a5489fb 100644 --- a/modules/SDL2/src/video/n3ds/SDL_n3dsevents.c +++ b/modules/SDL2/src/video/n3ds/SDL_n3dsevents.c @@ -28,8 +28,7 @@ #include "SDL_n3dsevents_c.h" #include "SDL_n3dstouch.h" -void -N3DS_PumpEvents(_THIS) +void N3DS_PumpEvents(_THIS) { hidScanInput(); N3DS_PollTouch(); diff --git a/modules/SDL2/src/video/n3ds/SDL_n3dsframebuffer.c b/modules/SDL2/src/video/n3ds/SDL_n3dsframebuffer.c index 2b0226f..601e8bc 100644 --- a/modules/SDL2/src/video/n3ds/SDL_n3dsframebuffer.c +++ b/modules/SDL2/src/video/n3ds/SDL_n3dsframebuffer.c @@ -40,15 +40,14 @@ SDL_FORCE_INLINE int GetDestOffset(int x, int y, int dest_width); SDL_FORCE_INLINE int GetSourceOffset(int x, int y, int source_width); SDL_FORCE_INLINE void FlushN3DSBuffer(const void *buffer, u32 bufsize, gfxScreen_t screen); -int -SDL_N3DS_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) +int SDL_N3DS_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { SDL_Surface *framebuffer; FreePreviousWindowFramebuffer(window); framebuffer = CreateNewWindowFramebuffer(window); - if (!framebuffer) { + if (framebuffer == NULL) { return SDL_OutOfMemory(); } @@ -62,7 +61,7 @@ SDL_N3DS_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void SDL_FORCE_INLINE void FreePreviousWindowFramebuffer(SDL_Window *window) { - SDL_Surface *surface = (SDL_Surface *) SDL_GetWindowData(window, N3DS_SURFACE); + SDL_Surface *surface = (SDL_Surface *)SDL_GetWindowData(window, N3DS_SURFACE); SDL_FreeSurface(surface); } @@ -72,26 +71,25 @@ CreateNewWindowFramebuffer(SDL_Window *window) int w, h, bpp; Uint32 Rmask, Gmask, Bmask, Amask; SDL_PixelFormatEnumToMasks(FRAMEBUFFER_FORMAT, &bpp, &Rmask, &Gmask, &Bmask, &Amask); - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowSizeInPixels(window, &w, &h); return SDL_CreateRGBSurface(0, w, h, bpp, Rmask, Gmask, Bmask, Amask); } -int -SDL_N3DS_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) +int SDL_N3DS_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { - SDL_WindowData *drv_data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *drv_data = (SDL_WindowData *)window->driverdata; SDL_Surface *surface; u16 width, height; u32 *framebuffer; u32 bufsize; - surface = (SDL_Surface *) SDL_GetWindowData(window, N3DS_SURFACE); - if (!surface) { + surface = (SDL_Surface *)SDL_GetWindowData(window, N3DS_SURFACE); + if (surface == NULL) { return SDL_SetError("%s: Unable to get the window surface.", __func__); } /* Get the N3DS internal framebuffer and its size */ - framebuffer = (u32 *) gfxGetFramebuffer(drv_data->screen, GFX_LEFT, &width, &height); + framebuffer = (u32 *)gfxGetFramebuffer(drv_data->screen, GFX_LEFT, &width, &height); bufsize = width * height * 4; CopyFramebuffertoN3DS(framebuffer, (Dimensions){ width, height }, @@ -135,11 +133,10 @@ FlushN3DSBuffer(const void *buffer, u32 bufsize, gfxScreen_t screen) gfxScreenSwapBuffers(screen, false); } -void -SDL_N3DS_DestroyWindowFramebuffer(_THIS, SDL_Window *window) +void SDL_N3DS_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { SDL_Surface *surface; - surface = (SDL_Surface *) SDL_SetWindowData(window, N3DS_SURFACE, NULL); + surface = (SDL_Surface *)SDL_SetWindowData(window, N3DS_SURFACE, NULL); SDL_FreeSurface(surface); } diff --git a/modules/SDL2/src/video/n3ds/SDL_n3dsswkb.c b/modules/SDL2/src/video/n3ds/SDL_n3dsswkb.c index 29a87d0..9170a2a 100644 --- a/modules/SDL2/src/video/n3ds/SDL_n3dsswkb.c +++ b/modules/SDL2/src/video/n3ds/SDL_n3dsswkb.c @@ -30,32 +30,27 @@ static SwkbdState sw_keyboard; const static size_t BUFFER_SIZE = 256; -void -N3DS_SwkbInit() +void N3DS_SwkbInit() { swkbdInit(&sw_keyboard, SWKBD_TYPE_NORMAL, 2, -1); } -void -N3DS_SwkbPoll() +void N3DS_SwkbPoll() { return; } -void -N3DS_SwkbQuit() +void N3DS_SwkbQuit() { return; } -SDL_bool -N3DS_HasScreenKeyboardSupport(_THIS) +SDL_bool N3DS_HasScreenKeyboardSupport(_THIS) { return SDL_TRUE; } -void -N3DS_StartTextInput(_THIS) +void N3DS_StartTextInput(_THIS) { char buffer[BUFFER_SIZE]; SwkbdButton button_pressed; @@ -65,8 +60,7 @@ N3DS_StartTextInput(_THIS) } } -void -N3DS_StopTextInput(_THIS) +void N3DS_StopTextInput(_THIS) { return; } diff --git a/modules/SDL2/src/video/n3ds/SDL_n3dstouch.c b/modules/SDL2/src/video/n3ds/SDL_n3dstouch.c index 0da496a..02e3b6f 100644 --- a/modules/SDL2/src/video/n3ds/SDL_n3dstouch.c +++ b/modules/SDL2/src/video/n3ds/SDL_n3dstouch.c @@ -39,20 +39,17 @@ #define TOUCHSCREEN_SCALE_X 1.0f / GSP_SCREEN_HEIGHT_BOTTOM #define TOUCHSCREEN_SCALE_Y 1.0f / GSP_SCREEN_WIDTH -void -N3DS_InitTouch(void) +void N3DS_InitTouch(void) { SDL_AddTouch(N3DS_TOUCH_ID, SDL_TOUCH_DEVICE_DIRECT, "Touchscreen"); } -void -N3DS_QuitTouch(void) +void N3DS_QuitTouch(void) { SDL_DelTouch(N3DS_TOUCH_ID); } -void -N3DS_PollTouch(void) +void N3DS_PollTouch(void) { touchPosition touch; static SDL_bool was_pressed = SDL_FALSE; diff --git a/modules/SDL2/src/video/n3ds/SDL_n3dsvideo.c b/modules/SDL2/src/video/n3ds/SDL_n3dsvideo.c index c5ff998..1668f9d 100644 --- a/modules/SDL2/src/video/n3ds/SDL_n3dsvideo.c +++ b/modules/SDL2/src/video/n3ds/SDL_n3dsvideo.c @@ -47,21 +47,19 @@ typedef struct /* N3DS driver bootstrap functions */ -static void -N3DS_DeleteDevice(SDL_VideoDevice *device) +static void N3DS_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device->displays); SDL_free(device->driverdata); SDL_free(device); } -static SDL_VideoDevice * -N3DS_CreateDevice(void) +static SDL_VideoDevice *N3DS_CreateDevice(void) { - SDL_VideoDevice *device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + SDL_VideoDevice *device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } device->VideoInit = N3DS_VideoInit; @@ -90,8 +88,7 @@ N3DS_CreateDevice(void) VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS_CreateDevice }; -static int -N3DS_VideoInit(_THIS) +static int N3DS_VideoInit(_THIS) { gfxInit(GSP_RGBA8_OES, GSP_RGBA8_OES, false); hidInit(); @@ -135,8 +132,7 @@ AddN3DSDisplay(gfxScreen_t screen) SDL_AddVideoDisplay(&display, SDL_FALSE); } -static void -N3DS_VideoQuit(_THIS) +static void N3DS_VideoQuit(_THIS) { N3DS_SwkbQuit(); N3DS_QuitTouch(); @@ -145,17 +141,15 @@ N3DS_VideoQuit(_THIS) gfxExit(); } -static void -N3DS_GetDisplayModes(_THIS, SDL_VideoDisplay *display) +static void N3DS_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { /* Each display only has a single mode */ SDL_AddDisplayMode(display, &display->current_mode); } -static int -N3DS_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) +static int N3DS_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) { - DisplayDriverData *driver_data = (DisplayDriverData *) display->driverdata; + DisplayDriverData *driver_data = (DisplayDriverData *)display->driverdata; if (driver_data == NULL) { return -1; } @@ -167,23 +161,21 @@ N3DS_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) return 0; } -static int -N3DS_CreateWindow(_THIS, SDL_Window *window) +static int N3DS_CreateWindow(_THIS, SDL_Window *window) { DisplayDriverData *display_data; - SDL_WindowData *window_data = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + SDL_WindowData *window_data = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (window_data == NULL) { return SDL_OutOfMemory(); } - display_data = (DisplayDriverData *) SDL_GetDisplayDriverData(window->display_index); + display_data = (DisplayDriverData *)SDL_GetDisplayDriverData(window->display_index); window_data->screen = display_data->screen; window->driverdata = window_data; SDL_SetKeyboardFocus(window); return 0; } -static void -N3DS_DestroyWindow(_THIS, SDL_Window *window) +static void N3DS_DestroyWindow(_THIS, SDL_Window *window) { if (window == NULL) { return; diff --git a/modules/SDL2/src/video/nacl/SDL_naclevents.c b/modules/SDL2/src/video/nacl/SDL_naclevents.c index 0fd9480..ce03e52 100644 --- a/modules/SDL2/src/video/nacl/SDL_naclevents.c +++ b/modules/SDL2/src/video/nacl/SDL_naclevents.c @@ -305,8 +305,7 @@ static Uint8 SDL_NACL_translate_mouse_button(int32_t button) { } } -static SDL_Scancode -SDL_NACL_translate_keycode(int keycode) +static SDL_Scancode SDL_NACL_translate_keycode(int keycode) { SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN; diff --git a/modules/SDL2/src/video/nacl/SDL_naclopengles.c b/modules/SDL2/src/video/nacl/SDL_naclopengles.c index 5089fa5..5889839 100644 --- a/modules/SDL2/src/video/nacl/SDL_naclopengles.c +++ b/modules/SDL2/src/video/nacl/SDL_naclopengles.c @@ -35,15 +35,13 @@ #include "ppapi_simple/ps.h" /* GL functions */ -int -NACL_GLES_LoadLibrary(_THIS, const char *path) +int NACL_GLES_LoadLibrary(_THIS, const char *path) { /* FIXME: Support dynamic linking when PNACL supports it */ return glInitializePPAPI(PSGetInterface) == 0; } -void * -NACL_GLES_GetProcAddress(_THIS, const char *proc) +void *NACL_GLES_GetProcAddress(_THIS, const char *proc) { #ifdef HAVE_DLOPEN return dlsym( 0 /* RTLD_DEFAULT */, proc); @@ -52,15 +50,13 @@ NACL_GLES_GetProcAddress(_THIS, const char *proc) #endif } -void -NACL_GLES_UnloadLibrary(_THIS) +void NACL_GLES_UnloadLibrary(_THIS) { /* FIXME: Support dynamic linking when PNACL supports it */ glTerminatePPAPI(); } -int -NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context) +int NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; /* FIXME: Check threading issues...otherwise use a hardcoded _this->context across all threads */ @@ -69,21 +65,20 @@ NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context) return 0; } -SDL_GLContext -NACL_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext NACL_GLES_CreateContext(_THIS, SDL_Window * window) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; PP_Resource context, share_context = 0; /* 64 seems nice. */ Sint32 attribs[64]; int i = 0; - + if (_this->gl_config.share_with_current_context) { share_context = (PP_Resource) SDL_GL_GetCurrentContext(); } /* FIXME: Some ATTRIBS from PP_Graphics3DAttrib are not set here */ - + attribs[i++] = PP_GRAPHICS3DATTRIB_WIDTH; attribs[i++] = window->w; attribs[i++] = PP_GRAPHICS3DATTRIB_HEIGHT; @@ -94,65 +89,62 @@ NACL_GLES_CreateContext(_THIS, SDL_Window * window) attribs[i++] = _this->gl_config.green_size; attribs[i++] = PP_GRAPHICS3DATTRIB_BLUE_SIZE; attribs[i++] = _this->gl_config.blue_size; - + if (_this->gl_config.alpha_size) { attribs[i++] = PP_GRAPHICS3DATTRIB_ALPHA_SIZE; attribs[i++] = _this->gl_config.alpha_size; } - + /*if (_this->gl_config.buffer_size) { attribs[i++] = EGL_BUFFER_SIZE; attribs[i++] = _this->gl_config.buffer_size; }*/ - + attribs[i++] = PP_GRAPHICS3DATTRIB_DEPTH_SIZE; attribs[i++] = _this->gl_config.depth_size; - + if (_this->gl_config.stencil_size) { attribs[i++] = PP_GRAPHICS3DATTRIB_STENCIL_SIZE; attribs[i++] = _this->gl_config.stencil_size; } - + if (_this->gl_config.multisamplebuffers) { attribs[i++] = PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS; attribs[i++] = _this->gl_config.multisamplebuffers; } - + if (_this->gl_config.multisamplesamples) { attribs[i++] = PP_GRAPHICS3DATTRIB_SAMPLES; attribs[i++] = _this->gl_config.multisamplesamples; } - + attribs[i++] = PP_GRAPHICS3DATTRIB_NONE; - + context = driverdata->ppb_graphics->Create(driverdata->instance, share_context, attribs); if (context) { /* We need to make the context current, otherwise nothing works */ SDL_GL_MakeCurrent(window, (SDL_GLContext) context); } - + return (SDL_GLContext) context; } -int -NACL_GLES_SetSwapInterval(_THIS, int interval) +int NACL_GLES_SetSwapInterval(_THIS, int interval) { /* STUB */ return SDL_Unsupported(); } -int -NACL_GLES_GetSwapInterval(_THIS) +int NACL_GLES_GetSwapInterval(_THIS) { /* STUB */ return 0; } -int -NACL_GLES_SwapWindow(_THIS, SDL_Window * window) +int NACL_GLES_SwapWindow(_THIS, SDL_Window * window) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; struct PP_CompletionCallback callback = { NULL, 0, PP_COMPLETIONCALLBACK_FLAG_NONE }; @@ -162,8 +154,7 @@ NACL_GLES_SwapWindow(_THIS, SDL_Window * window) return 0; } -void -NACL_GLES_DeleteContext(_THIS, SDL_GLContext context) +void NACL_GLES_DeleteContext(_THIS, SDL_GLContext context) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; driverdata->ppb_core->ReleaseResource((PP_Resource) context); diff --git a/modules/SDL2/src/video/nacl/SDL_naclvideo.c b/modules/SDL2/src/video/nacl/SDL_naclvideo.c index aa7237e..ef89038 100644 --- a/modules/SDL2/src/video/nacl/SDL_naclvideo.c +++ b/modules/SDL2/src/video/nacl/SDL_naclvideo.c @@ -32,34 +32,33 @@ #include "SDL_naclvideo.h" #include "SDL_naclwindow.h" #include "SDL_naclevents_c.h" -#include "SDL_naclopengles.h" +#include "SDL_naclopengles.h" #include "SDL_video.h" #include "../SDL_sysvideo.h" #include "../../events/SDL_events_c.h" #define NACLVID_DRIVER_NAME "nacl" -/* Static init required because NACL_SetScreenResolution +/* Static init required because NACL_SetScreenResolution * may appear even before SDL starts and we want to remember * the window width and height */ static SDL_VideoData nacl = {0}; -void -NACL_SetScreenResolution(int width, int height, Uint32 format) +void NACL_SetScreenResolution(int width, int height, Uint32 format) { PP_Resource context; - + nacl.w = width; - nacl.h = height; + nacl.h = height; nacl.format = format; - + if (nacl.window) { nacl.window->w = width; nacl.window->h = height; SDL_SendWindowEvent(nacl.window, SDL_WINDOWEVENT_RESIZED, width, height); } - + /* FIXME: Check threading issues...otherwise use a hardcoded _this->context across all threads */ context = (PP_Resource) SDL_GL_GetCurrentContext(); if (context) { @@ -85,19 +84,18 @@ static void NACL_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device); } -static int -NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { return 0; } static SDL_VideoDevice *NACL_CreateDevice(void) { SDL_VideoDevice *device; - + if (!NACL_Available()) { return NULL; } - + /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { @@ -105,20 +103,20 @@ static SDL_VideoDevice *NACL_CreateDevice(void) { return NULL; } device->driverdata = &nacl; - + /* Set the function pointers */ device->VideoInit = NACL_VideoInit; device->VideoQuit = NACL_VideoQuit; device->PumpEvents = NACL_PumpEvents; - + device->CreateSDLWindow = NACL_CreateWindow; device->SetWindowTitle = NACL_SetWindowTitle; device->DestroyWindow = NACL_DestroyWindow; - + device->SetDisplayMode = NACL_SetDisplayMode; - + device->free = NACL_DeleteDevice; - + /* GL pointers */ device->GL_LoadLibrary = NACL_GLES_LoadLibrary; device->GL_GetProcAddress = NACL_GLES_GetProcAddress; @@ -129,8 +127,8 @@ static SDL_VideoDevice *NACL_CreateDevice(void) { device->GL_GetSwapInterval = NACL_GLES_GetSwapInterval; device->GL_SwapWindow = NACL_GLES_SwapWindow; device->GL_DeleteContext = NACL_GLES_DeleteContext; - - + + return device; } @@ -154,7 +152,7 @@ int NACL_VideoInit(_THIS) { } SDL_AddDisplayMode(&_this->displays[0], &mode); - + PSInterfaceInit(); driverdata->instance = PSGetInstanceId(); driverdata->ppb_graphics = PSInterfaceGraphics3D(); @@ -170,12 +168,12 @@ int NACL_VideoInit(_THIS) { driverdata->ppb_mouse_input_event = (PPB_MouseInputEvent*) PSGetInterface(PPB_MOUSE_INPUT_EVENT_INTERFACE); driverdata->ppb_wheel_input_event = (PPB_WheelInputEvent*) PSGetInterface(PPB_WHEEL_INPUT_EVENT_INTERFACE); driverdata->ppb_touch_input_event = (PPB_TouchInputEvent*) PSGetInterface(PPB_TOUCH_INPUT_EVENT_INTERFACE); - - + + driverdata->message_loop = driverdata->ppb_message_loop->Create(driverdata->instance); - + PSEventSetFilter(PSE_ALL); - + /* We're done! */ return 0; } diff --git a/modules/SDL2/src/video/nacl/SDL_naclwindow.c b/modules/SDL2/src/video/nacl/SDL_naclwindow.c index 303fc73..3c22220 100644 --- a/modules/SDL2/src/video/nacl/SDL_naclwindow.c +++ b/modules/SDL2/src/video/nacl/SDL_naclwindow.c @@ -29,11 +29,10 @@ #include "SDL_naclvideo.h" #include "SDL_naclwindow.h" -int -NACL_CreateWindow(_THIS, SDL_Window * window) +int NACL_CreateWindow(_THIS, SDL_Window * window) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; - + if (driverdata->window) { return SDL_SetError("NaCl only supports one window"); } @@ -49,23 +48,21 @@ NACL_CreateWindow(_THIS, SDL_Window * window) window->flags |= SDL_WINDOW_FULLSCREEN; /* window is always fullscreen */ window->flags &= ~SDL_WINDOW_HIDDEN; window->flags |= SDL_WINDOW_SHOWN; /* only one window on NaCl */ - window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */ + window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */ window->flags |= SDL_WINDOW_OPENGL; - + SDL_SetMouseFocus(window); SDL_SetKeyboardFocus(window); - + return 0; } -void -NACL_SetWindowTitle(_THIS, SDL_Window * window) +void NACL_SetWindowTitle(_THIS, SDL_Window * window) { /* TODO */ } -void -NACL_DestroyWindow(_THIS, SDL_Window * window) +void NACL_DestroyWindow(_THIS, SDL_Window * window) { SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; if (window == driverdata->window) { diff --git a/modules/SDL2/src/video/ngage/SDL_ngageevents.cpp b/modules/SDL2/src/video/ngage/SDL_ngageevents.cpp index 9d43e33..d5b8b3a 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngageevents.cpp +++ b/modules/SDL2/src/video/ngage/SDL_ngageevents.cpp @@ -40,15 +40,13 @@ extern "C" { #include "SDL_ngagevideo.h" #include "SDL_ngageevents_c.h" -int HandleWsEvent(_THIS, const TWsEvent& aWsEvent); +int HandleWsEvent(_THIS, const TWsEvent &aWsEvent); -void -NGAGE_PumpEvents(_THIS) +void NGAGE_PumpEvents(_THIS) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; - while (phdata->NGAGE_WsEventStatus != KRequestPending) - { + while (phdata->NGAGE_WsEventStatus != KRequestPending) { phdata->NGAGE_WsSession.GetEvent(phdata->NGAGE_WsEvent); HandleWsEvent(_this, phdata->NGAGE_WsEvent); @@ -74,123 +72,121 @@ static SDL_Scancode ConvertScancode(_THIS, int key) { SDL_Keycode keycode; - switch(key) - { - case EStdKeyBackspace: // Clear key - keycode = SDLK_BACKSPACE; - break; - case 0x31: // 1 - keycode = SDLK_1; - break; - case 0x32: // 2 - keycode = SDLK_2; - break; - case 0x33: // 3 - keycode = SDLK_3; - break; - case 0x34: // 4 - keycode = SDLK_4; - break; - case 0x35: // 5 - keycode = SDLK_5; - break; - case 0x36: // 6 - keycode = SDLK_6; - break; - case 0x37: // 7 - keycode = SDLK_7; - break; - case 0x38: // 8 - keycode = SDLK_8; - break; - case 0x39: // 9 - keycode = SDLK_9; - break; - case 0x30: // 0 - keycode = SDLK_0; - break; - case 0x2a: // Asterisk - keycode = SDLK_ASTERISK; - break; - case EStdKeyHash: // Hash - keycode = SDLK_HASH; - break; - case EStdKeyDevice0: // Left softkey - keycode = SDLK_SOFTLEFT; - break; - case EStdKeyDevice1: // Right softkey - keycode = SDLK_SOFTRIGHT; - break; - case EStdKeyApplication0: // Call softkey - keycode = SDLK_CALL; - break; - case EStdKeyApplication1: // End call softkey - keycode = SDLK_ENDCALL; - break; - case EStdKeyDevice3: // Middle softkey - keycode = SDLK_SELECT; - break; - case EStdKeyUpArrow: // Up arrow - keycode = SDLK_UP; - break; - case EStdKeyDownArrow: // Down arrow - keycode = SDLK_DOWN; - break; - case EStdKeyLeftArrow: // Left arrow - keycode = SDLK_LEFT; - break; - case EStdKeyRightArrow: // Right arrow - keycode = SDLK_RIGHT; - break; - default: - keycode = SDLK_UNKNOWN; - break; + switch (key) { + case EStdKeyBackspace: // Clear key + keycode = SDLK_BACKSPACE; + break; + case 0x31: // 1 + keycode = SDLK_1; + break; + case 0x32: // 2 + keycode = SDLK_2; + break; + case 0x33: // 3 + keycode = SDLK_3; + break; + case 0x34: // 4 + keycode = SDLK_4; + break; + case 0x35: // 5 + keycode = SDLK_5; + break; + case 0x36: // 6 + keycode = SDLK_6; + break; + case 0x37: // 7 + keycode = SDLK_7; + break; + case 0x38: // 8 + keycode = SDLK_8; + break; + case 0x39: // 9 + keycode = SDLK_9; + break; + case 0x30: // 0 + keycode = SDLK_0; + break; + case 0x2a: // Asterisk + keycode = SDLK_ASTERISK; + break; + case EStdKeyHash: // Hash + keycode = SDLK_HASH; + break; + case EStdKeyDevice0: // Left softkey + keycode = SDLK_SOFTLEFT; + break; + case EStdKeyDevice1: // Right softkey + keycode = SDLK_SOFTRIGHT; + break; + case EStdKeyApplication0: // Call softkey + keycode = SDLK_CALL; + break; + case EStdKeyApplication1: // End call softkey + keycode = SDLK_ENDCALL; + break; + case EStdKeyDevice3: // Middle softkey + keycode = SDLK_SELECT; + break; + case EStdKeyUpArrow: // Up arrow + keycode = SDLK_UP; + break; + case EStdKeyDownArrow: // Down arrow + keycode = SDLK_DOWN; + break; + case EStdKeyLeftArrow: // Left arrow + keycode = SDLK_LEFT; + break; + case EStdKeyRightArrow: // Right arrow + keycode = SDLK_RIGHT; + break; + default: + keycode = SDLK_UNKNOWN; + break; } return SDL_GetScancodeFromKey(keycode); } -int HandleWsEvent(_THIS, const TWsEvent& aWsEvent) +int HandleWsEvent(_THIS, const TWsEvent &aWsEvent) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - int posted = 0; - - switch (aWsEvent.Type()) + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + int posted = 0; + + switch (aWsEvent.Type()) { + case EEventKeyDown: /* Key events */ + SDL_SendKeyboardKey(SDL_PRESSED, ConvertScancode(_this, aWsEvent.Key()->iScanCode)); + break; + case EEventKeyUp: /* Key events */ + SDL_SendKeyboardKey(SDL_RELEASED, ConvertScancode(_this, aWsEvent.Key()->iScanCode)); + break; + case EEventFocusGained: /* SDL window got focus */ + phdata->NGAGE_IsWindowFocused = ETrue; + /* Draw window background and screen buffer */ + DisableKeyBlocking(_this); + RedrawWindowL(_this); + break; + case EEventFocusLost: /* SDL window lost focus */ { - case EEventKeyDown: /* Key events */ - SDL_SendKeyboardKey(SDL_PRESSED, ConvertScancode(_this, aWsEvent.Key()->iScanCode)); - break; - case EEventKeyUp: /* Key events */ - SDL_SendKeyboardKey(SDL_RELEASED, ConvertScancode(_this, aWsEvent.Key()->iScanCode)); - break; - case EEventFocusGained: /* SDL window got focus */ - phdata->NGAGE_IsWindowFocused = ETrue; - /* Draw window background and screen buffer */ - DisableKeyBlocking(_this); - RedrawWindowL(_this); - break; - case EEventFocusLost: /* SDL window lost focus */ - { - phdata->NGAGE_IsWindowFocused = EFalse; - RWsSession s; - s.Connect(); - RWindowGroup g(s); - g.Construct(TUint32(&g), EFalse); - g.EnableReceiptOfFocus(EFalse); - RWindow w(s); - w.Construct(g, TUint32(&w)); - w.SetExtent(TPoint(0, 0), phdata->NGAGE_WsWindow.Size()); - w.SetOrdinalPosition(0); - w.Activate(); - w.Close(); - g.Close(); - s.Close(); - break; - } - case EEventModifiersChanged: - break; - default: - break; + phdata->NGAGE_IsWindowFocused = EFalse; + RWsSession s; + s.Connect(); + RWindowGroup g(s); + g.Construct(TUint32(&g), EFalse); + g.EnableReceiptOfFocus(EFalse); + RWindow w(s); + w.Construct(g, TUint32(&w)); + w.SetExtent(TPoint(0, 0), phdata->NGAGE_WsWindow.Size()); + w.SetOrdinalPosition(0); + w.Activate(); + w.Close(); + g.Close(); + s.Close(); + break; + } + case EEventModifiersChanged: + break; + default: + break; } return posted; } diff --git a/modules/SDL2/src/video/ngage/SDL_ngageframebuffer.cpp b/modules/SDL2/src/video/ngage/SDL_ngageframebuffer.cpp index 78a7075..20b1857 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngageframebuffer.cpp +++ b/modules/SDL2/src/video/ngage/SDL_ngageframebuffer.cpp @@ -38,26 +38,26 @@ */ static TUint32 NGAGE_HWPalette_256_to_Screen[256]; -int GetBpp(TDisplayMode displaymode); +int GetBpp(TDisplayMode displaymode); void DirectUpdate(_THIS, int numrects, SDL_Rect *rects); void DrawBackground(_THIS); -void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16* screenBuffer); +void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16 *screenBuffer); void RedrawWindowL(_THIS); -int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - SDL_Surface *surface; - const Uint32 surface_format = SDL_PIXELFORMAT_RGB444; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + SDL_Surface *surface; + const Uint32 surface_format = SDL_PIXELFORMAT_RGB444; int w, h; /* Free the old framebuffer surface */ SDL_NGAGE_DestroyWindowFramebuffer(_this, window); /* Create a new one */ - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowSizeInPixels(window, &w, &h); surface = SDL_CreateRGBSurfaceWithFormat(0, w, h, 0, surface_format); - if (! surface) { + if (surface == NULL) { return -1; } @@ -65,24 +65,24 @@ int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma SDL_SetWindowData(window, NGAGE_SURFACE, surface); *format = surface_format; *pixels = surface->pixels; - *pitch = surface->pitch; + *pitch = surface->pitch; /* Initialise Epoc frame buffer */ - TDisplayMode displayMode = phdata->NGAGE_WsScreen->DisplayMode(); + TDisplayMode displayMode = phdata->NGAGE_WsScreen->DisplayMode(); - TScreenInfoV01 screenInfo; + TScreenInfoV01 screenInfo; TPckg sInfo(screenInfo); UserSvr::ScreenInfo(sInfo); - phdata->NGAGE_ScreenSize = screenInfo.iScreenSize; - phdata->NGAGE_DisplayMode = displayMode; - phdata->NGAGE_HasFrameBuffer = screenInfo.iScreenAddressValid; - phdata->NGAGE_FrameBuffer = phdata->NGAGE_HasFrameBuffer ? (TUint8*) screenInfo.iScreenAddress : NULL; - phdata->NGAGE_BytesPerPixel = ((GetBpp(displayMode)-1) / 8) + 1; + phdata->NGAGE_ScreenSize = screenInfo.iScreenSize; + phdata->NGAGE_DisplayMode = displayMode; + phdata->NGAGE_HasFrameBuffer = screenInfo.iScreenAddressValid; + phdata->NGAGE_FrameBuffer = phdata->NGAGE_HasFrameBuffer ? (TUint8 *)screenInfo.iScreenAddress : NULL; + phdata->NGAGE_BytesPerPixel = ((GetBpp(displayMode) - 1) / 8) + 1; phdata->NGAGE_BytesPerScanLine = screenInfo.iScreenSize.iWidth * phdata->NGAGE_BytesPerPixel; - phdata->NGAGE_BytesPerScreen = phdata->NGAGE_BytesPerScanLine * phdata->NGAGE_ScreenSize.iHeight; + phdata->NGAGE_BytesPerScreen = phdata->NGAGE_BytesPerScanLine * phdata->NGAGE_ScreenSize.iHeight; SDL_Log("Screen width %d", screenInfo.iScreenSize.iWidth); SDL_Log("Screen height %d", screenInfo.iScreenSize.iHeight); @@ -98,24 +98,19 @@ int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma * * In 12 bpp machines the table has 16 entries. */ - if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 8) - { + if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 8) { phdata->NGAGE_FrameBuffer += 512; - } - else - { + } else { phdata->NGAGE_FrameBuffer += 32; } - #if 0 - if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 12) - { +#if 0 + if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 12) { phdata->NGAGE_FrameBuffer += 16 * 2; } - if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 16) - { + if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 16) { phdata->NGAGE_FrameBuffer += 16 * 2; } - #endif +#endif // Get draw device for updating the screen TScreenInfoV01 screenInfo2; @@ -148,36 +143,34 @@ int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma return 0; } -int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { - static int frame_number; + static int frame_number; SDL_Surface *surface; - surface = (SDL_Surface *) SDL_GetWindowData(window, NGAGE_SURFACE); - if (! surface) - { + surface = (SDL_Surface *)SDL_GetWindowData(window, NGAGE_SURFACE); + if (surface == NULL) { return SDL_SetError("Couldn't find ngage surface for window"); } /* Send the data to the display */ - if (SDL_getenv("SDL_VIDEO_NGAGE_SAVE_FRAMES")) - { + if (SDL_getenv("SDL_VIDEO_NGAGE_SAVE_FRAMES")) { char file[128]; SDL_snprintf(file, sizeof(file), "SDL_window%d-%8.8d.bmp", (int)SDL_GetWindowID(window), ++frame_number); SDL_SaveBMP(surface, file); } - DirectUpdate(_this, numrects, (SDL_Rect*)rects); + DirectUpdate(_this, numrects, (SDL_Rect *)rects); return 0; } -void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { SDL_Surface *surface; - surface = (SDL_Surface *) SDL_SetWindowData(window, NGAGE_SURFACE, NULL); + surface = (SDL_Surface *)SDL_SetWindowData(window, NGAGE_SURFACE, NULL); SDL_FreeSurface(surface); } @@ -189,7 +182,7 @@ void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window) #include #include -EXPORT_C void NGAGE_Runtime::GetScreenInfo(TScreenInfoV01& screenInfo2) +EXPORT_C void NGAGE_Runtime::GetScreenInfo(TScreenInfoV01 &screenInfo2) { TPckg sInfo2(screenInfo2); UserSvr::ScreenInfo(sInfo2); @@ -206,42 +199,40 @@ int GetBpp(TDisplayMode displaymode) void DrawBackground(_THIS) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; /* Draw background */ - TUint16* screenBuffer = (TUint16*)phdata->NGAGE_FrameBuffer; + TUint16 *screenBuffer = (TUint16 *)phdata->NGAGE_FrameBuffer; /* Draw black background */ Mem::FillZ(screenBuffer, phdata->NGAGE_BytesPerScreen); } -void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16* screenBuffer) +void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16 *screenBuffer) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - SDL_Surface *screen = (SDL_Surface*)SDL_GetWindowData(_this->windows, NGAGE_SURFACE); + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + SDL_Surface *screen = (SDL_Surface *)SDL_GetWindowData(_this->windows, NGAGE_SURFACE); TInt i; - TDisplayMode displayMode = phdata->NGAGE_DisplayMode; - const TInt sourceNumBytesPerPixel = ((GetBpp(displayMode)-1) / 8) + 1; + TDisplayMode displayMode = phdata->NGAGE_DisplayMode; + const TInt sourceNumBytesPerPixel = ((GetBpp(displayMode) - 1) / 8) + 1; - const TPoint fixedOffset = phdata->NGAGE_ScreenOffset; - const TInt screenW = screen->w; - const TInt screenH = screen->h; - const TInt sourceScanlineLength = screenW; - const TInt targetScanlineLength = phdata->NGAGE_ScreenSize.iWidth; + const TPoint fixedOffset = phdata->NGAGE_ScreenOffset; + const TInt screenW = screen->w; + const TInt screenH = screen->h; + const TInt sourceScanlineLength = screenW; + const TInt targetScanlineLength = phdata->NGAGE_ScreenSize.iWidth; /* Render the rectangles in the list */ - for (i = 0; i < numrects; ++i) - { - const SDL_Rect& currentRect = rects[i]; - SDL_Rect rect2; + for (i = 0; i < numrects; ++i) { + const SDL_Rect ¤tRect = rects[i]; + SDL_Rect rect2; rect2.x = currentRect.x; rect2.y = currentRect.y; rect2.w = currentRect.w; rect2.h = currentRect.h; - if (rect2.w <= 0 || rect2.h <= 0) /* Sanity check */ - { + if (rect2.w <= 0 || rect2.h <= 0) /* Sanity check */ { continue; } @@ -250,118 +241,101 @@ void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16* screenBuffer) /* Check rects validity, i.e. upper and lower bounds */ TInt maxX = Min(screenW - 1, rect2.x + rect2.w - 1); TInt maxY = Min(screenH - 1, rect2.y + rect2.h - 1); - if (maxX < 0 || maxY < 0) /* sanity check */ - { + if (maxX < 0 || maxY < 0) /* sanity check */ { continue; } /* Clip from bottom */ - maxY = Min(maxY, phdata->NGAGE_ScreenSize.iHeight-1); + maxY = Min(maxY, phdata->NGAGE_ScreenSize.iHeight - 1); /* TODO: Clip from the right side */ - const TInt sourceRectWidth = maxX - rect2.x + 1; - const TInt sourceRectWidthInBytes = sourceRectWidth * sourceNumBytesPerPixel; - const TInt sourceRectHeight = maxY - rect2.y + 1; - const TInt sourceStartOffset = rect2.x + rect2.y * sourceScanlineLength; - const TUint skipValue = 1; /* 1 = No skip */ + const TInt sourceRectWidth = maxX - rect2.x + 1; + const TInt sourceRectWidthInBytes = sourceRectWidth * sourceNumBytesPerPixel; + const TInt sourceRectHeight = maxY - rect2.y + 1; + const TInt sourceStartOffset = rect2.x + rect2.y * sourceScanlineLength; + const TUint skipValue = 1; /* 1 = No skip */ - TInt targetStartOffset = fixedOffset.iX + rect2.x + (fixedOffset.iY +rect2.y) * targetScanlineLength; + TInt targetStartOffset = fixedOffset.iX + rect2.x + (fixedOffset.iY + rect2.y) * targetScanlineLength; - switch (screen->format->BitsPerPixel) + switch (screen->format->BitsPerPixel) { + case 12: { - case 12: - { - TUint16* bitmapLine = (TUint16*)screen->pixels + sourceStartOffset; - TUint16* screenMemory = screenBuffer + targetStartOffset; - - if (skipValue == 1) - { - for(TInt y = 0 ; y < sourceRectHeight ; y++) - { - Mem::Copy(screenMemory, bitmapLine, sourceRectWidthInBytes); - bitmapLine += sourceScanlineLength; - screenMemory += targetScanlineLength; - } + TUint16 *bitmapLine = (TUint16 *)screen->pixels + sourceStartOffset; + TUint16 *screenMemory = screenBuffer + targetStartOffset; + + if (skipValue == 1) { + for (TInt y = 0; y < sourceRectHeight; y++) { + Mem::Copy(screenMemory, bitmapLine, sourceRectWidthInBytes); + bitmapLine += sourceScanlineLength; + screenMemory += targetScanlineLength; } - else - { - for(TInt y = 0 ; y < sourceRectHeight ; y++) - { - TUint16* bitmapPos = bitmapLine; /* 2 bytes per pixel */ - TUint16* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ - for(TInt x = 0 ; x < sourceRectWidth ; x++) - { - __ASSERT_DEBUG(screenMemory < (screenBuffer + phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(screenMemory >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapLine < ((TUint16*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapLine >= (TUint16*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); - - *screenMemoryLinePos++ = *bitmapPos; - bitmapPos += skipValue; - } - bitmapLine += sourceScanlineLength; - screenMemory += targetScanlineLength; + } else { + for (TInt y = 0; y < sourceRectHeight; y++) { + TUint16 *bitmapPos = bitmapLine; /* 2 bytes per pixel */ + TUint16 *screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ + for (TInt x = 0; x < sourceRectWidth; x++) { + __ASSERT_DEBUG(screenMemory < (screenBuffer + phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(screenMemory >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapLine < ((TUint16 *)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapLine >= (TUint16 *)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); + + *screenMemoryLinePos++ = *bitmapPos; + bitmapPos += skipValue; } + bitmapLine += sourceScanlineLength; + screenMemory += targetScanlineLength; } } - break; - // 256 color paletted mode: 8 bpp --> 12 bpp - default: - { - if(phdata->NGAGE_BytesPerPixel <= 2) - { - TUint8* bitmapLine = (TUint8*)screen->pixels + sourceStartOffset; - TUint16* screenMemory = screenBuffer + targetStartOffset; - - for(TInt y = 0 ; y < sourceRectHeight ; y++) - { - TUint8* bitmapPos = bitmapLine; /* 1 byte per pixel */ - TUint16* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ - /* Convert each pixel from 256 palette to 4k color values */ - for(TInt x = 0 ; x < sourceRectWidth ; x++) - { - __ASSERT_DEBUG(screenMemoryLinePos < (screenBuffer + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(screenMemoryLinePos >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapPos < ((TUint8*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapPos >= (TUint8*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); - *screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++]; - } - bitmapLine += sourceScanlineLength; - screenMemory += targetScanlineLength; + } break; + // 256 color paletted mode: 8 bpp --> 12 bpp + default: + { + if (phdata->NGAGE_BytesPerPixel <= 2) { + TUint8 *bitmapLine = (TUint8 *)screen->pixels + sourceStartOffset; + TUint16 *screenMemory = screenBuffer + targetStartOffset; + + for (TInt y = 0; y < sourceRectHeight; y++) { + TUint8 *bitmapPos = bitmapLine; /* 1 byte per pixel */ + TUint16 *screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ + /* Convert each pixel from 256 palette to 4k color values */ + for (TInt x = 0; x < sourceRectWidth; x++) { + __ASSERT_DEBUG(screenMemoryLinePos < (screenBuffer + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(screenMemoryLinePos >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapPos < ((TUint8 *)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapPos >= (TUint8 *)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); + *screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++]; } + bitmapLine += sourceScanlineLength; + screenMemory += targetScanlineLength; } - else - { - TUint8* bitmapLine = (TUint8*)screen->pixels + sourceStartOffset; - TUint32* screenMemory = reinterpret_cast(screenBuffer + targetStartOffset); - for(TInt y = 0 ; y < sourceRectHeight ; y++) - { - TUint8* bitmapPos = bitmapLine; /* 1 byte per pixel */ - TUint32* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ - /* Convert each pixel from 256 palette to 4k color values */ - for(TInt x = 0 ; x < sourceRectWidth ; x++) - { - __ASSERT_DEBUG(screenMemoryLinePos < (reinterpret_cast(screenBuffer) + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(screenMemoryLinePos >= reinterpret_cast(screenBuffer), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapPos < ((TUint8*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); - __ASSERT_DEBUG(bitmapPos >= (TUint8*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); - *screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++]; - } - bitmapLine += sourceScanlineLength; - screenMemory += targetScanlineLength; + } else { + TUint8 *bitmapLine = (TUint8 *)screen->pixels + sourceStartOffset; + TUint32 *screenMemory = reinterpret_cast(screenBuffer + targetStartOffset); + for (TInt y = 0; y < sourceRectHeight; y++) { + TUint8 *bitmapPos = bitmapLine; /* 1 byte per pixel */ + TUint32 *screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */ + /* Convert each pixel from 256 palette to 4k color values */ + for (TInt x = 0; x < sourceRectWidth; x++) { + __ASSERT_DEBUG(screenMemoryLinePos < (reinterpret_cast(screenBuffer) + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(screenMemoryLinePos >= reinterpret_cast(screenBuffer), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapPos < ((TUint8 *)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt)); + __ASSERT_DEBUG(bitmapPos >= (TUint8 *)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt)); + *screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++]; } + bitmapLine += sourceScanlineLength; + screenMemory += targetScanlineLength; } } } + } } } void DirectUpdate(_THIS, int numrects, SDL_Rect *rects) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; - if (! phdata->NGAGE_IsWindowFocused) - { + if (!phdata->NGAGE_IsWindowFocused) { SDL_PauseAudio(1); SDL_Delay(1000); return; @@ -369,25 +343,22 @@ void DirectUpdate(_THIS, int numrects, SDL_Rect *rects) SDL_PauseAudio(0); - TUint16* screenBuffer = (TUint16*)phdata->NGAGE_FrameBuffer; + TUint16 *screenBuffer = (TUint16 *)phdata->NGAGE_FrameBuffer; #if 0 - if (phdata->NGAGE_ScreenOrientation == CFbsBitGc::EGraphicsOrientationRotated270) - { + if (phdata->NGAGE_ScreenOrientation == CFbsBitGc::EGraphicsOrientationRotated270) { // ... - } - else + } else #endif { DirectDraw(_this, numrects, rects, screenBuffer); } - for (int i = 0; i < numrects; ++i) - { - TInt aAx = rects[i].x; - TInt aAy = rects[i].y; - TInt aBx = rects[i].w; - TInt aBy = rects[i].h; + for (int i = 0; i < numrects; ++i) { + TInt aAx = rects[i].x; + TInt aAy = rects[i].y; + TInt aBx = rects[i].w; + TInt aBy = rects[i].h; TRect rect2 = TRect(aAx, aAy, aBx, aBy); phdata->NGAGE_DrawDevice->UpdateRegion(rect2); /* Should we update rects parameter area only? */ @@ -397,8 +368,8 @@ void DirectUpdate(_THIS, int numrects, SDL_Rect *rects) void RedrawWindowL(_THIS) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - SDL_Surface *screen = (SDL_Surface*)SDL_GetWindowData(_this->windows, NGAGE_SURFACE); + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + SDL_Surface *screen = (SDL_Surface *)SDL_GetWindowData(_this->windows, NGAGE_SURFACE); int w = screen->w; int h = screen->h; @@ -406,13 +377,12 @@ void RedrawWindowL(_THIS) w = screen->h; h = screen->w; } - if ((w < phdata->NGAGE_ScreenSize.iWidth) - || (h < phdata->NGAGE_ScreenSize.iHeight)) { + if ((w < phdata->NGAGE_ScreenSize.iWidth) || (h < phdata->NGAGE_ScreenSize.iHeight)) { DrawBackground(_this); } /* Tell the system that something has been drawn */ - TRect rect = TRect(phdata->NGAGE_WsWindow.Size()); + TRect rect = TRect(phdata->NGAGE_WsWindow.Size()); phdata->NGAGE_WsWindow.Invalidate(rect); /* Draw current buffer */ diff --git a/modules/SDL2/src/video/ngage/SDL_ngageframebuffer_c.h b/modules/SDL2/src/video/ngage/SDL_ngageframebuffer_c.h index 79655d8..adbfff5 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngageframebuffer_c.h +++ b/modules/SDL2/src/video/ngage/SDL_ngageframebuffer_c.h @@ -21,9 +21,9 @@ #include "../../SDL_internal.h" -extern int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window *window); /****************************************************************************/ /* Runtime */ @@ -31,8 +31,8 @@ extern void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window); class NGAGE_Runtime { -public: - IMPORT_C static void GetScreenInfo(TScreenInfoV01& screenInfo2); + public: + IMPORT_C static void GetScreenInfo(TScreenInfoV01 &screenInfo2); }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/ngage/SDL_ngagevideo.cpp b/modules/SDL2/src/video/ngage/SDL_ngagevideo.cpp index ed06790..4b5c692 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngagevideo.cpp +++ b/modules/SDL2/src/video/ngage/SDL_ngagevideo.cpp @@ -48,40 +48,34 @@ extern "C" { #define NGAGEVID_DRIVER_NAME "ngage" /* Initialization/Query functions */ -static int NGAGE_VideoInit(_THIS); -static int NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +static int NGAGE_VideoInit(_THIS); +static int NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); static void NGAGE_VideoQuit(_THIS); /* NGAGE driver bootstrap functions */ -static void -NGAGE_DeleteDevice(SDL_VideoDevice * device) +static void NGAGE_DeleteDevice(SDL_VideoDevice *device) { - SDL_VideoData *phdata = (SDL_VideoData*)device->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)device->driverdata; - if (phdata) - { + if (phdata) { /* Free Epoc resources */ /* Disable events for me */ - if (phdata->NGAGE_WsEventStatus != KRequestPending) - { + if (phdata->NGAGE_WsEventStatus != KRequestPending) { phdata->NGAGE_WsSession.EventReadyCancel(); } - if (phdata->NGAGE_RedrawEventStatus != KRequestPending) - { + if (phdata->NGAGE_RedrawEventStatus != KRequestPending) { phdata->NGAGE_WsSession.RedrawReadyCancel(); } free(phdata->NGAGE_DrawDevice); - if (phdata->NGAGE_WsWindow.WsHandle()) - { + if (phdata->NGAGE_WsWindow.WsHandle()) { phdata->NGAGE_WsWindow.Close(); } - if (phdata->NGAGE_WsWindowGroup.WsHandle()) - { + if (phdata->NGAGE_WsWindowGroup.WsHandle()) { phdata->NGAGE_WsWindowGroup.Close(); } @@ -91,8 +85,7 @@ NGAGE_DeleteDevice(SDL_VideoDevice * device) delete phdata->NGAGE_WsScreen; phdata->NGAGE_WsScreen = NULL; - if (phdata->NGAGE_WsSession.WsHandle()) - { + if (phdata->NGAGE_WsSession.WsHandle()) { phdata->NGAGE_WsSession.Close(); } @@ -100,48 +93,45 @@ NGAGE_DeleteDevice(SDL_VideoDevice * device) phdata = NULL; } - if (device) - { + if (device) { SDL_free(device); device = NULL; } } -static SDL_VideoDevice * -NGAGE_CreateDevice(void) +static SDL_VideoDevice *NGAGE_CreateDevice(void) { SDL_VideoDevice *device; - SDL_VideoData *phdata; + SDL_VideoData *phdata; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } /* Initialize internal N-Gage specific data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (! phdata) - { + phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); + if (phdata == NULL) { SDL_OutOfMemory(); SDL_free(device); - return (0); + return 0; } /* General video */ - device->VideoInit = NGAGE_VideoInit; - device->VideoQuit = NGAGE_VideoQuit; - device->SetDisplayMode = NGAGE_SetDisplayMode; - device->PumpEvents = NGAGE_PumpEvents; - device->CreateWindowFramebuffer = SDL_NGAGE_CreateWindowFramebuffer; - device->UpdateWindowFramebuffer = SDL_NGAGE_UpdateWindowFramebuffer; + device->VideoInit = NGAGE_VideoInit; + device->VideoQuit = NGAGE_VideoQuit; + device->SetDisplayMode = NGAGE_SetDisplayMode; + device->PumpEvents = NGAGE_PumpEvents; + device->CreateWindowFramebuffer = SDL_NGAGE_CreateWindowFramebuffer; + device->UpdateWindowFramebuffer = SDL_NGAGE_UpdateWindowFramebuffer; device->DestroyWindowFramebuffer = SDL_NGAGE_DestroyWindowFramebuffer; - device->free = NGAGE_DeleteDevice; + device->free = NGAGE_DeleteDevice; /* "Window" */ device->CreateSDLWindow = NGAGE_CreateWindow; - device->DestroyWindow = NGAGE_DestroyWindow; + device->DestroyWindow = NGAGE_DestroyWindow; /* N-Gage specific data */ device->driverdata = phdata; @@ -154,17 +144,16 @@ VideoBootStrap NGAGE_bootstrap = { NGAGE_CreateDevice }; -int -NGAGE_VideoInit(_THIS) +int NGAGE_VideoInit(_THIS) { SDL_DisplayMode mode; /* Use 12-bpp desktop mode */ - mode.format = SDL_PIXELFORMAT_RGB444; - mode.w = 176; - mode.h = 208; + mode.format = SDL_PIXELFORMAT_RGB444; + mode.w = 176; + mode.h = 208; mode.refresh_rate = 0; - mode.driverdata = NULL; + mode.driverdata = NULL; if (SDL_AddBasicVideoDisplay(&mode) < 0) { return -1; } @@ -176,14 +165,12 @@ NGAGE_VideoInit(_THIS) return 0; } -static int -NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -void -NGAGE_VideoQuit(_THIS) +void NGAGE_VideoQuit(_THIS) { } diff --git a/modules/SDL2/src/video/ngage/SDL_ngagevideo.h b/modules/SDL2/src/video/ngage/SDL_ngagevideo.h index 6493443..3678141 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngagevideo.h +++ b/modules/SDL2/src/video/ngage/SDL_ngagevideo.h @@ -37,27 +37,27 @@ typedef struct SDL_VideoData { /* Epoc window server info */ - RWsSession NGAGE_WsSession; - RWindowGroup NGAGE_WsWindowGroup; - TInt NGAGE_WsWindowGroupID; - RWindow NGAGE_WsWindow; - CWsScreenDevice* NGAGE_WsScreen; - CWindowGc* NGAGE_WindowGc; - TRequestStatus NGAGE_WsEventStatus; - TRequestStatus NGAGE_RedrawEventStatus; - TWsEvent NGAGE_WsEvent; - CFbsDrawDevice* NGAGE_DrawDevice; - TBool NGAGE_IsWindowFocused; /* Not used yet */ + RWsSession NGAGE_WsSession; + RWindowGroup NGAGE_WsWindowGroup; + TInt NGAGE_WsWindowGroupID; + RWindow NGAGE_WsWindow; + CWsScreenDevice *NGAGE_WsScreen; + CWindowGc *NGAGE_WindowGc; + TRequestStatus NGAGE_WsEventStatus; + TRequestStatus NGAGE_RedrawEventStatus; + TWsEvent NGAGE_WsEvent; + CFbsDrawDevice *NGAGE_DrawDevice; + TBool NGAGE_IsWindowFocused; /* Not used yet */ /* Screen hardware frame buffer info */ - TBool NGAGE_HasFrameBuffer; - TInt NGAGE_BytesPerPixel; - TInt NGAGE_BytesPerScanLine; - TInt NGAGE_BytesPerScreen; - TDisplayMode NGAGE_DisplayMode; - TSize NGAGE_ScreenSize; - TUint8* NGAGE_FrameBuffer; - TPoint NGAGE_ScreenOffset; + TBool NGAGE_HasFrameBuffer; + TInt NGAGE_BytesPerPixel; + TInt NGAGE_BytesPerScanLine; + TInt NGAGE_BytesPerScreen; + TDisplayMode NGAGE_DisplayMode; + TSize NGAGE_ScreenSize; + TUint8 *NGAGE_FrameBuffer; + TPoint NGAGE_ScreenOffset; CFbsBitGc::TGraphicsOrientation NGAGE_ScreenOrientation; diff --git a/modules/SDL2/src/video/ngage/SDL_ngagewindow.cpp b/modules/SDL2/src/video/ngage/SDL_ngagewindow.cpp index 6710bd4..9d598b7 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngagewindow.cpp +++ b/modules/SDL2/src/video/ngage/SDL_ngagewindow.cpp @@ -32,12 +32,11 @@ const TUint32 WindowClientHandle = 9210; void DisableKeyBlocking(_THIS); void ConstructWindowL(_THIS); -int -NGAGE_CreateWindow(_THIS, SDL_Window* window) +int NGAGE_CreateWindow(_THIS, SDL_Window *window) { - NGAGE_Window* ngage_window = (NGAGE_Window*)SDL_calloc(1, sizeof(NGAGE_Window)); + NGAGE_Window *ngage_window = (NGAGE_Window *)SDL_calloc(1, sizeof(NGAGE_Window)); - if (!ngage_window) { + if (ngage_window == NULL) { return SDL_OutOfMemory(); } @@ -58,10 +57,9 @@ NGAGE_CreateWindow(_THIS, SDL_Window* window) return 0; } -void -NGAGE_DestroyWindow(_THIS, SDL_Window* window) +void NGAGE_DestroyWindow(_THIS, SDL_Window *window) { - NGAGE_Window* ngage_window = (NGAGE_Window*)window->driverdata; + NGAGE_Window *ngage_window = (NGAGE_Window *)window->driverdata; if (ngage_window) { SDL_free(ngage_window); @@ -76,8 +74,8 @@ NGAGE_DestroyWindow(_THIS, SDL_Window* window) void DisableKeyBlocking(_THIS) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - TRawEvent event; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + TRawEvent event; event.Set((TRawEvent::TType) /*EDisableKeyBlock*/ 51); phdata->NGAGE_WsSession.SimulateRawEvent(event); @@ -85,34 +83,34 @@ void DisableKeyBlocking(_THIS) void ConstructWindowL(_THIS) { - SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata; - TInt error; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; + TInt error; error = phdata->NGAGE_WsSession.Connect(); User::LeaveIfError(error); - phdata->NGAGE_WsScreen=new(ELeave) CWsScreenDevice(phdata->NGAGE_WsSession); + phdata->NGAGE_WsScreen = new (ELeave) CWsScreenDevice(phdata->NGAGE_WsSession); User::LeaveIfError(phdata->NGAGE_WsScreen->Construct()); User::LeaveIfError(phdata->NGAGE_WsScreen->CreateContext(phdata->NGAGE_WindowGc)); - phdata->NGAGE_WsWindowGroup=RWindowGroup(phdata->NGAGE_WsSession); + phdata->NGAGE_WsWindowGroup = RWindowGroup(phdata->NGAGE_WsSession); User::LeaveIfError(phdata->NGAGE_WsWindowGroup.Construct(WindowClientHandle)); phdata->NGAGE_WsWindowGroup.SetOrdinalPosition(0); RProcess thisProcess; - TParse exeName; + TParse exeName; exeName.Set(thisProcess.FileName(), NULL, NULL); TBuf<32> winGroupName; winGroupName.Append(0); winGroupName.Append(0); - winGroupName.Append(0); // UID + winGroupName.Append(0); // UID winGroupName.Append(0); winGroupName.Append(exeName.Name()); // Caption winGroupName.Append(0); - winGroupName.Append(0); // DOC name + winGroupName.Append(0); // DOC name phdata->NGAGE_WsWindowGroup.SetName(winGroupName); - phdata->NGAGE_WsWindow=RWindow(phdata->NGAGE_WsSession); - User::LeaveIfError(phdata->NGAGE_WsWindow.Construct(phdata->NGAGE_WsWindowGroup,WindowClientHandle - 1)); + phdata->NGAGE_WsWindow = RWindow(phdata->NGAGE_WsSession); + User::LeaveIfError(phdata->NGAGE_WsWindow.Construct(phdata->NGAGE_WsWindowGroup, WindowClientHandle - 1)); phdata->NGAGE_WsWindow.SetBackgroundColor(KRgbWhite); phdata->NGAGE_WsWindow.Activate(); phdata->NGAGE_WsWindow.SetSize(phdata->NGAGE_WsScreen->SizeInPixels()); diff --git a/modules/SDL2/src/video/ngage/SDL_ngagewindow.h b/modules/SDL2/src/video/ngage/SDL_ngagewindow.h index 5948779..500d8dc 100644 --- a/modules/SDL2/src/video/ngage/SDL_ngagewindow.h +++ b/modules/SDL2/src/video/ngage/SDL_ngagewindow.h @@ -27,19 +27,18 @@ #include "SDL_ngagevideo.h" -typedef struct { - SDL_Window* sdl_window; +typedef struct +{ + SDL_Window *sdl_window; } NGAGE_Window; - extern int -NGAGE_CreateWindow(_THIS, SDL_Window* window); +NGAGE_CreateWindow(_THIS, SDL_Window *window); extern void -NGAGE_DestroyWindow(_THIS, SDL_Window* window); +NGAGE_DestroyWindow(_THIS, SDL_Window *window); #endif /* _SDL_ngagewindow */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenevents.c b/modules/SDL2/src/video/offscreen/SDL_offscreenevents.c index 9f08af2..57e12b4 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenevents.c +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenevents.c @@ -30,8 +30,7 @@ #include "SDL_offscreenvideo.h" #include "SDL_offscreenevents_c.h" -void -OFFSCREEN_PumpEvents(_THIS) +void OFFSCREEN_PumpEvents(_THIS) { /* do nothing. */ } diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer.c b/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer.c index bfcf56f..4e27c72 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer.c +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer.c @@ -25,10 +25,9 @@ #include "../SDL_sysvideo.h" #include "SDL_offscreenframebuffer_c.h" +#define OFFSCREEN_SURFACE "_SDL_DummySurface" -#define OFFSCREEN_SURFACE "_SDL_DummySurface" - -int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { SDL_Surface *surface; const Uint32 surface_format = SDL_PIXELFORMAT_RGB888; @@ -38,9 +37,9 @@ int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * f SDL_OFFSCREEN_DestroyWindowFramebuffer(_this, window); /* Create a new one */ - SDL_GetWindowSize(window, &w, &h); + SDL_GetWindowSizeInPixels(window, &w, &h); surface = SDL_CreateRGBSurfaceWithFormat(0, w, h, 0, surface_format); - if (!surface) { + if (surface == NULL) { return -1; } @@ -49,34 +48,35 @@ int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * f *format = surface_format; *pixels = surface->pixels; *pitch = surface->pitch; + return 0; } -int SDL_OFFSCREEN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int SDL_OFFSCREEN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { static int frame_number; SDL_Surface *surface; - surface = (SDL_Surface *) SDL_GetWindowData(window, OFFSCREEN_SURFACE); - if (!surface) { + surface = (SDL_Surface *)SDL_GetWindowData(window, OFFSCREEN_SURFACE); + if (surface == NULL) { return SDL_SetError("Couldn't find offscreen surface for window"); } /* Send the data to the display */ if (SDL_getenv("SDL_VIDEO_OFFSCREEN_SAVE_FRAMES")) { char file[128]; - SDL_snprintf(file, sizeof(file), "SDL_window%d-%8.8d.bmp", - (int)SDL_GetWindowID(window), ++frame_number); + (void)SDL_snprintf(file, sizeof(file), "SDL_window%" SDL_PRIu32 "-%8.8d.bmp", + SDL_GetWindowID(window), ++frame_number); SDL_SaveBMP(surface, file); } return 0; } -void SDL_OFFSCREEN_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void SDL_OFFSCREEN_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { SDL_Surface *surface; - surface = (SDL_Surface *) SDL_SetWindowData(window, OFFSCREEN_SURFACE, NULL); + surface = (SDL_Surface *)SDL_SetWindowData(window, OFFSCREEN_SURFACE, NULL); SDL_FreeSurface(surface); } diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer_c.h b/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer_c.h index 2607c81..abad40f 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer_c.h +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenframebuffer_c.h @@ -20,8 +20,8 @@ */ #include "../../SDL_internal.h" -extern int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int SDL_OFFSCREEN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void SDL_OFFSCREEN_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int SDL_OFFSCREEN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int SDL_OFFSCREEN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void SDL_OFFSCREEN_DestroyWindowFramebuffer(_THIS, SDL_Window *window); /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.c b/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.c index 3564544..8185696 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.c +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.c @@ -28,8 +28,7 @@ /* EGL implementation of SDL OpenGL support */ -int -OFFSCREEN_GLES_LoadLibrary(_THIS, const char* path) +int OFFSCREEN_GLES_LoadLibrary(_THIS, const char *path) { int ret = SDL_EGL_LoadLibraryOnly(_this, path); if (ret != 0) { @@ -55,10 +54,9 @@ OFFSCREEN_GLES_LoadLibrary(_THIS, const char* path) return 0; } -SDL_GLContext -OFFSCREEN_GLES_CreateContext(_THIS, SDL_Window* window) +SDL_GLContext OFFSCREEN_GLES_CreateContext(_THIS, SDL_Window *window) { - OFFSCREEN_Window* offscreen_window = window->driverdata; + OFFSCREEN_Window *offscreen_window = window->driverdata; SDL_GLContext context; context = SDL_EGL_CreateContext(_this, offscreen_window->egl_surface); @@ -66,21 +64,19 @@ OFFSCREEN_GLES_CreateContext(_THIS, SDL_Window* window) return context; } -int -OFFSCREEN_GLES_MakeCurrent(_THIS, SDL_Window* window, SDL_GLContext context) +int OFFSCREEN_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { if (window) { - EGLSurface egl_surface = ((OFFSCREEN_Window*)window->driverdata)->egl_surface; + EGLSurface egl_surface = ((OFFSCREEN_Window *)window->driverdata)->egl_surface; return SDL_EGL_MakeCurrent(_this, egl_surface, context); } else { return SDL_EGL_MakeCurrent(_this, NULL, NULL); } } -int -OFFSCREEN_GLES_SwapWindow(_THIS, SDL_Window* window) +int OFFSCREEN_GLES_SwapWindow(_THIS, SDL_Window *window) { - OFFSCREEN_Window* offscreen_wind = window->driverdata; + OFFSCREEN_Window *offscreen_wind = window->driverdata; return SDL_EGL_SwapBuffers(_this, offscreen_wind->egl_surface); } diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.h b/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.h index fa64e84..12a068a 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.h +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenopengles.h @@ -44,4 +44,3 @@ extern int OFFSCREEN_GLES_SwapWindow(_THIS, SDL_Window *window); #endif /* _SDL_offscreenopengles_h */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenvideo.c b/modules/SDL2/src/video/offscreen/SDL_offscreenvideo.c index 0557384..2fd86d9 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenvideo.c +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenvideo.c @@ -42,27 +42,25 @@ /* Initialization/Query functions */ static int OFFSCREEN_VideoInit(_THIS); -static int OFFSCREEN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +static int OFFSCREEN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); static void OFFSCREEN_VideoQuit(_THIS); /* OFFSCREEN driver bootstrap functions */ -static void -OFFSCREEN_DeleteDevice(SDL_VideoDevice * device) +static void OFFSCREEN_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device); } -static SDL_VideoDevice * -OFFSCREEN_CreateDevice(void) +static SDL_VideoDevice *OFFSCREEN_CreateDevice(void) { SDL_VideoDevice *device; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } /* General video */ @@ -100,8 +98,7 @@ VideoBootStrap OFFSCREEN_bootstrap = { OFFSCREEN_CreateDevice }; -int -OFFSCREEN_VideoInit(_THIS) +int OFFSCREEN_VideoInit(_THIS) { SDL_DisplayMode mode; @@ -122,14 +119,12 @@ OFFSCREEN_VideoInit(_THIS) return 0; } -static int -OFFSCREEN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int OFFSCREEN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -void -OFFSCREEN_VideoQuit(_THIS) +void OFFSCREEN_VideoQuit(_THIS) { } diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.c b/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.c index f551051..03a14c3 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.c +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.c @@ -27,12 +27,11 @@ #include "SDL_offscreenwindow.h" -int -OFFSCREEN_CreateWindow(_THIS, SDL_Window* window) +int OFFSCREEN_CreateWindow(_THIS, SDL_Window *window) { OFFSCREEN_Window *offscreen_window = SDL_calloc(1, sizeof(OFFSCREEN_Window)); - if (!offscreen_window) { + if (offscreen_window == NULL) { return SDL_OutOfMemory(); } @@ -69,10 +68,9 @@ OFFSCREEN_CreateWindow(_THIS, SDL_Window* window) return 0; } -void -OFFSCREEN_DestroyWindow(_THIS, SDL_Window* window) +void OFFSCREEN_DestroyWindow(_THIS, SDL_Window *window) { - OFFSCREEN_Window* offscreen_window = window->driverdata; + OFFSCREEN_Window *offscreen_window = window->driverdata; if (offscreen_window) { #if SDL_VIDEO_OPENGL_EGL diff --git a/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.h b/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.h index 32aaf65..692f5d5 100644 --- a/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.h +++ b/modules/SDL2/src/video/offscreen/SDL_offscreenwindow.h @@ -25,19 +25,18 @@ #include "SDL_offscreenvideo.h" -typedef struct { - SDL_Window* sdl_window; +typedef struct +{ + SDL_Window *sdl_window; #if SDL_VIDEO_OPENGL_EGL EGLSurface egl_surface; #endif } OFFSCREEN_Window; - extern int OFFSCREEN_CreateWindow(_THIS, SDL_Window *window); extern void OFFSCREEN_DestroyWindow(_THIS, SDL_Window *window); #endif /* _SDL_offscreenwindow */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/os2/SDL_os2mouse.c b/modules/SDL2/src/video/os2/SDL_os2mouse.c index 869420c..3ffdef9 100644 --- a/modules/SDL2/src/video/os2/SDL_os2mouse.c +++ b/modules/SDL2/src/video/os2/SDL_os2mouse.c @@ -122,10 +122,10 @@ static void OS2_WarpMouse(SDL_Window * window, int x, int y) POINTL pointl; pointl.x = x; - pointl.y = window->h - y; + pointl.y = window->h - y - 1; WinMapWindowPoints(pWinData->hwnd, HWND_DESKTOP, &pointl, 1); -/* pWinData->lSkipWMMouseMove++; ???*/ WinSetPointerPos(HWND_DESKTOP, pointl.x, pointl.y); + SDL_SendMouseMotion(window, SDL_GetMouse()->mouseID, 0, x, y); } static int OS2_WarpMouseGlobal(int x, int y) diff --git a/modules/SDL2/src/video/pandora/SDL_pandora.c b/modules/SDL2/src/video/pandora/SDL_pandora.c index 23844e8..16debcb 100644 --- a/modules/SDL2/src/video/pandora/SDL_pandora.c +++ b/modules/SDL2/src/video/pandora/SDL_pandora.c @@ -41,14 +41,12 @@ static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */ #endif -static int -PND_available(void) +static int PND_available(void) { return 1; } -static void -PND_destroy(SDL_VideoDevice * device) +static void PND_destroy(SDL_VideoDevice * device) { if (device->driverdata != NULL) { SDL_free(device->driverdata); @@ -57,8 +55,7 @@ PND_destroy(SDL_VideoDevice * device) SDL_free(device); } -static SDL_VideoDevice * -PND_create() +static SDL_VideoDevice *PND_create() { SDL_VideoDevice *device; SDL_VideoData *phdata; @@ -149,8 +146,7 @@ VideoBootStrap PND_bootstrap = { /*****************************************************************************/ /* SDL Video and Display initialization/handling functions */ /*****************************************************************************/ -int -PND_videoinit(_THIS) +int PND_videoinit(_THIS) { SDL_VideoDisplay display; SDL_DisplayMode current_mode; @@ -177,26 +173,22 @@ PND_videoinit(_THIS) return 1; } -void -PND_videoquit(_THIS) +void PND_videoquit(_THIS) { } -void -PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display) +void PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display) { } -int -PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { return 0; } -int -PND_createwindow(_THIS, SDL_Window * window) +int PND_createwindow(_THIS, SDL_Window * window) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; @@ -239,54 +231,42 @@ PND_createwindow(_THIS, SDL_Window * window) return 0; } -int -PND_createwindowfrom(_THIS, SDL_Window * window, const void *data) +int PND_createwindowfrom(_THIS, SDL_Window * window, const void *data) { return -1; } -void -PND_setwindowtitle(_THIS, SDL_Window * window) +void PND_setwindowtitle(_THIS, SDL_Window * window) { } -void -PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon) +void PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon) { } -void -PND_setwindowposition(_THIS, SDL_Window * window) +void PND_setwindowposition(_THIS, SDL_Window * window) { } -void -PND_setwindowsize(_THIS, SDL_Window * window) +void PND_setwindowsize(_THIS, SDL_Window * window) { } -void -PND_showwindow(_THIS, SDL_Window * window) +void PND_showwindow(_THIS, SDL_Window * window) { } -void -PND_hidewindow(_THIS, SDL_Window * window) +void PND_hidewindow(_THIS, SDL_Window * window) { } -void -PND_raisewindow(_THIS, SDL_Window * window) +void PND_raisewindow(_THIS, SDL_Window * window) { } -void -PND_maximizewindow(_THIS, SDL_Window * window) +void PND_maximizewindow(_THIS, SDL_Window * window) { } -void -PND_minimizewindow(_THIS, SDL_Window * window) +void PND_minimizewindow(_THIS, SDL_Window * window) { } -void -PND_restorewindow(_THIS, SDL_Window * window) +void PND_restorewindow(_THIS, SDL_Window * window) { } -void -PND_destroywindow(_THIS, SDL_Window * window) +void PND_destroywindow(_THIS, SDL_Window * window) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; eglTerminate(phdata->egl_display); @@ -296,8 +276,7 @@ PND_destroywindow(_THIS, SDL_Window * window) /* SDL Window Manager function */ /*****************************************************************************/ #if 0 -SDL_bool -PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { if (info->version.major <= SDL_MAJOR_VERSION) { return SDL_TRUE; @@ -315,8 +294,7 @@ PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) /*****************************************************************************/ /* SDL OpenGL/OpenGL ES functions */ /*****************************************************************************/ -int -PND_gl_loadlibrary(_THIS, const char *path) +int PND_gl_loadlibrary(_THIS, const char *path) { /* Check if OpenGL ES library is specified for GF driver */ if (path == NULL) { @@ -352,8 +330,7 @@ PND_gl_loadlibrary(_THIS, const char *path) return 0; } -void * -PND_gl_getprocaddres(_THIS, const char *proc) +void *PND_gl_getprocaddres(_THIS, const char *proc) { void *function_address; @@ -377,8 +354,7 @@ PND_gl_getprocaddres(_THIS, const char *proc) return NULL; } -void -PND_gl_unloadlibrary(_THIS) +void PND_gl_unloadlibrary(_THIS) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; @@ -393,8 +369,7 @@ PND_gl_unloadlibrary(_THIS) } } -SDL_GLContext -PND_gl_createcontext(_THIS, SDL_Window * window) +SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; @@ -698,8 +673,7 @@ PND_gl_createcontext(_THIS, SDL_Window * window) return wdata->gles_context; } -int -PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; SDL_WindowData *wdata; @@ -742,8 +716,7 @@ PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context) return 0; } -int -PND_gl_setswapinterval(_THIS, int interval) +int PND_gl_setswapinterval(_THIS, int interval) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; EGLBoolean status; @@ -767,14 +740,12 @@ PND_gl_setswapinterval(_THIS, int interval) return SDL_SetError("PND: Cannot set swap interval"); } -int -PND_gl_getswapinterval(_THIS) +int PND_gl_getswapinterval(_THIS) { return ((SDL_VideoData *) _this->driverdata)->swapinterval; } -int -PND_gl_swapwindow(_THIS, SDL_Window * window) +int PND_gl_swapwindow(_THIS, SDL_Window * window) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; @@ -793,8 +764,7 @@ PND_gl_swapwindow(_THIS, SDL_Window * window) return 0; } -void -PND_gl_deletecontext(_THIS, SDL_GLContext context) +void PND_gl_deletecontext(_THIS, SDL_GLContext context) { SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; EGLBoolean status; diff --git a/modules/SDL2/src/video/pandora/SDL_pandora_events.c b/modules/SDL2/src/video/pandora/SDL_pandora_events.c index 7e46b3f..906c758 100644 --- a/modules/SDL2/src/video/pandora/SDL_pandora_events.c +++ b/modules/SDL2/src/video/pandora/SDL_pandora_events.c @@ -27,8 +27,7 @@ #include "../../events/SDL_events_c.h" -void -PND_PumpEvents(_THIS) +void PND_PumpEvents(_THIS) { /* Not implemented. */ } diff --git a/modules/SDL2/src/video/ps2/SDL_ps2video.c b/modules/SDL2/src/video/ps2/SDL_ps2video.c index 31c0909..490ea25 100644 --- a/modules/SDL2/src/video/ps2/SDL_ps2video.c +++ b/modules/SDL2/src/video/ps2/SDL_ps2video.c @@ -48,17 +48,17 @@ /* PS2 driver bootstrap functions */ -static int PS2_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int PS2_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -static void PS2_DeleteDevice(SDL_VideoDevice * device) +static void PS2_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device); } -static int PS2_CreateWindow(_THIS, SDL_Window * window) +static int PS2_CreateWindow(_THIS, SDL_Window *window) { SDL_SetKeyboardFocus(window); @@ -76,7 +76,7 @@ static int PS2_VideoInit(_THIS) current_mode.w = 640; current_mode.h = 480; current_mode.refresh_rate = 60; - + /* 32 bpp for default */ current_mode.format = SDL_PIXELFORMAT_ABGR8888; current_mode.driverdata = NULL; @@ -94,7 +94,6 @@ static int PS2_VideoInit(_THIS) static void PS2_VideoQuit(_THIS) { - } static void PS2_PumpEvents(_THIS) @@ -107,10 +106,10 @@ static SDL_VideoDevice *PS2_CreateDevice(void) SDL_VideoDevice *device; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } /* Set the function pointers */ @@ -125,7 +124,7 @@ static SDL_VideoDevice *PS2_CreateDevice(void) } VideoBootStrap PS2_bootstrap = { - "PS2", + "PS2", "PS2 Video Driver", PS2_CreateDevice }; diff --git a/modules/SDL2/src/video/psp/SDL_pspevents.c b/modules/SDL2/src/video/psp/SDL_pspevents.c index cb28512..ebea736 100644 --- a/modules/SDL2/src/video/psp/SDL_pspevents.c +++ b/modules/SDL2/src/video/psp/SDL_pspevents.c @@ -40,7 +40,7 @@ #include #include -#define IRKBD_CONFIG_FILE NULL /* this will take ms0:/seplugins/pspirkeyb.ini */ +#define IRKBD_CONFIG_FILE NULL /* this will take ms0:/seplugins/pspirkeyb.ini */ static int irkbd_ready = 0; static SDL_Keycode keymap[256]; @@ -50,24 +50,24 @@ static enum PspHprmKeys hprm = 0; static SDL_sem *event_sem = NULL; static SDL_Thread *thread = NULL; static int running = 0; -static struct { +static struct +{ enum PspHprmKeys id; SDL_Keycode sym; } keymap_psp[] = { { PSP_HPRM_PLAYPAUSE, SDLK_F10 }, - { PSP_HPRM_FORWARD, SDLK_F11 }, - { PSP_HPRM_BACK, SDLK_F12 }, - { PSP_HPRM_VOL_UP, SDLK_F13 }, - { PSP_HPRM_VOL_DOWN, SDLK_F14 }, - { PSP_HPRM_HOLD, SDLK_F15 } + { PSP_HPRM_FORWARD, SDLK_F11 }, + { PSP_HPRM_BACK, SDLK_F12 }, + { PSP_HPRM_VOL_UP, SDLK_F13 }, + { PSP_HPRM_VOL_DOWN, SDLK_F14 }, + { PSP_HPRM_HOLD, SDLK_F15 } }; -int -EventUpdate(void *data) +int EventUpdate(void *data) { while (running) { SDL_SemWait(event_sem); - sceHprmPeekCurrentKey((u32 *) &hprm); + sceHprmPeekCurrentKey((u32 *)&hprm); SDL_SemPost(event_sem); /* Delay 1/60th of a second */ sceKernelDelayThread(1000000 / 60); @@ -89,36 +89,33 @@ void PSP_PumpEvents(_THIS) /* HPRM Keyboard */ changed = old_keys ^ keys; old_keys = keys; - if(changed) { - for(i=0; i= 0) { - if((length % sizeof(SIrKeybScanCodeData)) == 0){ - count = length / sizeof(SIrKeybScanCodeData); - for( i=0; i < count; i++ ) { - unsigned char raw, pressed; - scanData=(SIrKeybScanCodeData*) buffer+i; - raw = scanData->raw; - pressed = scanData->pressed; - sym.scancode = raw; - sym.sym = keymap[raw]; - /* not tested */ - /* SDL_PrivateKeyboard(pressed?SDL_PRESSED:SDL_RELEASED, &sym); */ - SDL_SendKeyboardKey((keys & keymap_psp[i].id) ? - SDL_PRESSED : SDL_RELEASED, SDL_GetScancodeFromKey(keymap[raw])); - + if (pspIrKeybReadinput(buffer, &length) >= 0) { + if ((length % sizeof(SIrKeybScanCodeData)) == 0) { + count = length / sizeof(SIrKeybScanCodeData); + for (i = 0; i < count; i++) { + unsigned char raw, pressed; + scanData = (SIrKeybScanCodeData *)buffer + i; + raw = scanData->raw; + pressed = scanData->pressed; + sym.scancode = raw; + sym.sym = keymap[raw]; + /* not tested */ + /* SDL_PrivateKeyboard(pressed?SDL_PRESSED:SDL_RELEASED, &sym); */ + SDL_SendKeyboardKey((keys & keymap_psp[i].id) ? SDL_PRESSED : SDL_RELEASED, SDL_GetScancodeFromKey(keymap[raw])); } } } @@ -133,8 +130,9 @@ void PSP_InitOSKeymap(_THIS) { #ifdef PSPIRKEYB int i; - for (i=0; igl_data->display); + eglTerminate(_this->gl_data->display); } static EGLint width = 480; static EGLint height = 272; -SDL_GLContext -PSP_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window *window) { - SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; - - EGLint attribs[32]; - EGLDisplay display; - EGLContext context; - EGLSurface surface; - EGLConfig config; - EGLint num_configs; - int i; + SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata; + EGLint attribs[32]; + EGLDisplay display; + EGLContext context; + EGLSurface surface; + EGLConfig config; + EGLint num_configs; + int i; /* EGL init taken from glutCreateWindow() in PSPGL's glut.c. */ - EGLCHK(display = eglGetDisplay(0)); - EGLCHK(eglInitialize(display, NULL, NULL)); + EGLCHK(display = eglGetDisplay(0)); + EGLCHK(eglInitialize(display, NULL, NULL)); wdata->uses_gles = SDL_TRUE; - window->flags |= SDL_WINDOW_FULLSCREEN; - - /* Setup the config based on SDL's current values. */ - i = 0; - attribs[i++] = EGL_RED_SIZE; - attribs[i++] = _this->gl_config.red_size; - attribs[i++] = EGL_GREEN_SIZE; - attribs[i++] = _this->gl_config.green_size; - attribs[i++] = EGL_BLUE_SIZE; - attribs[i++] = _this->gl_config.blue_size; - attribs[i++] = EGL_DEPTH_SIZE; - attribs[i++] = _this->gl_config.depth_size; - - if (_this->gl_config.alpha_size) - { - attribs[i++] = EGL_ALPHA_SIZE; - attribs[i++] = _this->gl_config.alpha_size; - } - if (_this->gl_config.stencil_size) - { - attribs[i++] = EGL_STENCIL_SIZE; - attribs[i++] = _this->gl_config.stencil_size; - } - - attribs[i++] = EGL_NONE; + window->flags |= SDL_WINDOW_FULLSCREEN; + + /* Setup the config based on SDL's current values. */ + i = 0; + attribs[i++] = EGL_RED_SIZE; + attribs[i++] = _this->gl_config.red_size; + attribs[i++] = EGL_GREEN_SIZE; + attribs[i++] = _this->gl_config.green_size; + attribs[i++] = EGL_BLUE_SIZE; + attribs[i++] = _this->gl_config.blue_size; + attribs[i++] = EGL_DEPTH_SIZE; + attribs[i++] = _this->gl_config.depth_size; + + if (_this->gl_config.alpha_size) { + attribs[i++] = EGL_ALPHA_SIZE; + attribs[i++] = _this->gl_config.alpha_size; + } + if (_this->gl_config.stencil_size) { + attribs[i++] = EGL_STENCIL_SIZE; + attribs[i++] = _this->gl_config.stencil_size; + } - EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); + attribs[i++] = EGL_NONE; - if (num_configs == 0) - { - SDL_SetError("No valid EGL configs for requested mode"); - return 0; - } + EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); - EGLCHK(eglGetConfigAttrib(display, config, EGL_WIDTH, &width)); - EGLCHK(eglGetConfigAttrib(display, config, EGL_HEIGHT, &height)); + if (num_configs == 0) { + SDL_SetError("No valid EGL configs for requested mode"); + return 0; + } - EGLCHK(context = eglCreateContext(display, config, NULL, NULL)); - EGLCHK(surface = eglCreateWindowSurface(display, config, 0, NULL)); - EGLCHK(eglMakeCurrent(display, surface, surface, context)); + EGLCHK(eglGetConfigAttrib(display, config, EGL_WIDTH, &width)); + EGLCHK(eglGetConfigAttrib(display, config, EGL_HEIGHT, &height)); - _this->gl_data->display = display; - _this->gl_data->context = context; - _this->gl_data->surface = surface; + EGLCHK(context = eglCreateContext(display, config, NULL, NULL)); + EGLCHK(surface = eglCreateWindowSurface(display, config, 0, NULL)); + EGLCHK(eglMakeCurrent(display, surface, surface, context)); + _this->gl_data->display = display; + _this->gl_data->context = context; + _this->gl_data->surface = surface; return context; } -int -PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int PSP_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { - if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, - _this->gl_data->surface, _this->gl_data->context)) - { - return SDL_SetError("Unable to make EGL context current"); - } + if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, + _this->gl_data->surface, _this->gl_data->context)) { + return SDL_SetError("Unable to make EGL context current"); + } return 0; } -int -PSP_GL_SetSwapInterval(_THIS, int interval) +int PSP_GL_SetSwapInterval(_THIS, int interval) { EGLBoolean status; status = eglSwapInterval(_this->gl_data->display, interval); @@ -164,14 +152,12 @@ PSP_GL_SetSwapInterval(_THIS, int interval) return SDL_SetError("Unable to set the EGL swap interval"); } -int -PSP_GL_GetSwapInterval(_THIS) +int PSP_GL_GetSwapInterval(_THIS) { return _this->gl_data->swapinterval; } -int -PSP_GL_SwapWindow(_THIS, SDL_Window * window) +int PSP_GL_SwapWindow(_THIS, SDL_Window *window) { if (!eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface)) { return SDL_SetError("eglSwapBuffers() failed"); @@ -179,10 +165,9 @@ PSP_GL_SwapWindow(_THIS, SDL_Window * window) return 0; } -void -PSP_GL_DeleteContext(_THIS, SDL_GLContext context) +void PSP_GL_DeleteContext(_THIS, SDL_GLContext context) { - SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; EGLBoolean status; if (phdata->egl_initialized != SDL_TRUE) { diff --git a/modules/SDL2/src/video/psp/SDL_pspgl_c.h b/modules/SDL2/src/video/psp/SDL_pspgl_c.h index 3cffa3d..00128d7 100644 --- a/modules/SDL2/src/video/psp/SDL_pspgl_c.h +++ b/modules/SDL2/src/video/psp/SDL_pspgl_c.h @@ -22,33 +22,31 @@ #ifndef SDL_pspgl_c_h_ #define SDL_pspgl_c_h_ - #include #include #include "SDL_pspvideo.h" - -typedef struct SDL_GLDriverData { - EGLDisplay display; - EGLContext context; - EGLSurface surface; +typedef struct SDL_GLDriverData +{ + EGLDisplay display; + EGLContext context; + EGLSurface surface; uint32_t swapinterval; -}SDL_GLDriverData; +} SDL_GLDriverData; -extern void * PSP_GL_GetProcAddress(_THIS, const char *proc); -extern int PSP_GL_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context); +extern void *PSP_GL_GetProcAddress(_THIS, const char *proc); +extern int PSP_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern void PSP_GL_SwapBuffers(_THIS); -extern int PSP_GL_SwapWindow(_THIS, SDL_Window * window); -extern SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window); +extern int PSP_GL_SwapWindow(_THIS, SDL_Window *window); +extern SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window *window); extern int PSP_GL_LoadLibrary(_THIS, const char *path); extern void PSP_GL_UnloadLibrary(_THIS); extern int PSP_GL_SetSwapInterval(_THIS, int interval); extern int PSP_GL_GetSwapInterval(_THIS); - #endif /* SDL_pspgl_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/psp/SDL_pspmouse.c b/modules/SDL2/src/video/psp/SDL_pspmouse.c index 234f31b..774649a 100644 --- a/modules/SDL2/src/video/psp/SDL_pspmouse.c +++ b/modules/SDL2/src/video/psp/SDL_pspmouse.c @@ -30,9 +30,9 @@ #include "SDL_pspmouse_c.h" - /* The implementation dependent data for the window manager cursor */ -struct WMcursor { +struct WMcursor +{ int unused; }; diff --git a/modules/SDL2/src/video/psp/SDL_pspvideo.c b/modules/SDL2/src/video/psp/SDL_pspvideo.c index 0921db1..676196c 100644 --- a/modules/SDL2/src/video/psp/SDL_pspvideo.c +++ b/modules/SDL2/src/video/psp/SDL_pspvideo.c @@ -33,7 +33,6 @@ #include "../../events/SDL_keyboard_c.h" - /* PSP declarations */ #include "SDL_pspvideo.h" #include "SDL_pspevents_c.h" @@ -43,39 +42,37 @@ static SDL_bool PSP_initialized = SDL_FALSE; */ -static void -PSP_Destroy(SDL_VideoDevice * device) +static void PSP_Destroy(SDL_VideoDevice *device) { -/* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ + /* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ if (device->driverdata != NULL) { device->driverdata = NULL; } } -static SDL_VideoDevice * -PSP_Create() +static SDL_VideoDevice *PSP_Create() { SDL_VideoDevice *device; SDL_VideoData *phdata; SDL_GLDriverData *gldata; /* Initialize SDL_VideoDevice structure */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device == NULL) { SDL_OutOfMemory(); return NULL; } /* Initialize internal PSP specific data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (phdata == NULL) { SDL_OutOfMemory(); SDL_free(device); return NULL; } - gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData)); + gldata = (SDL_GLDriverData *)SDL_calloc(1, sizeof(SDL_GLDriverData)); if (gldata == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -88,7 +85,6 @@ PSP_Create() phdata->egl_initialized = SDL_TRUE; - /* Setup amount of available displays */ device->num_displays = 0; @@ -144,8 +140,7 @@ VideoBootStrap PSP_bootstrap = { /*****************************************************************************/ /* SDL Video and Display initialization/handling functions */ /*****************************************************************************/ -int -PSP_VideoInit(_THIS) +int PSP_VideoInit(_THIS) { SDL_VideoDisplay display; SDL_DisplayMode current_mode; @@ -177,42 +172,36 @@ PSP_VideoInit(_THIS) return 1; } -void -PSP_VideoQuit(_THIS) +void PSP_VideoQuit(_THIS) { - } -void -PSP_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void PSP_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { - } -int -PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int PSP_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -#define EGLCHK(stmt) \ - do { \ - EGLint err; \ - \ - stmt; \ - err = eglGetError(); \ - if (err != EGL_SUCCESS) { \ - SDL_SetError("EGL error %d", err); \ - return 0; \ - } \ +#define EGLCHK(stmt) \ + do { \ + EGLint err; \ + \ + stmt; \ + err = eglGetError(); \ + if (err != EGL_SUCCESS) { \ + SDL_SetError("EGL error %d", err); \ + return 0; \ + } \ } while (0) -int -PSP_CreateWindow(_THIS, SDL_Window * window) +int PSP_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *wdata; /* Allocate window internal data */ - wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + wdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (wdata == NULL) { return SDL_OutOfMemory(); } @@ -226,54 +215,42 @@ PSP_CreateWindow(_THIS, SDL_Window * window) return 0; } -int -PSP_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int PSP_CreateWindowFrom(_THIS, SDL_Window *window, const void *data) { return SDL_Unsupported(); } -void -PSP_SetWindowTitle(_THIS, SDL_Window * window) +void PSP_SetWindowTitle(_THIS, SDL_Window *window) { } -void -PSP_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void PSP_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { } -void -PSP_SetWindowPosition(_THIS, SDL_Window * window) +void PSP_SetWindowPosition(_THIS, SDL_Window *window) { } -void -PSP_SetWindowSize(_THIS, SDL_Window * window) +void PSP_SetWindowSize(_THIS, SDL_Window *window) { } -void -PSP_ShowWindow(_THIS, SDL_Window * window) +void PSP_ShowWindow(_THIS, SDL_Window *window) { } -void -PSP_HideWindow(_THIS, SDL_Window * window) +void PSP_HideWindow(_THIS, SDL_Window *window) { } -void -PSP_RaiseWindow(_THIS, SDL_Window * window) +void PSP_RaiseWindow(_THIS, SDL_Window *window) { } -void -PSP_MaximizeWindow(_THIS, SDL_Window * window) +void PSP_MaximizeWindow(_THIS, SDL_Window *window) { } -void -PSP_MinimizeWindow(_THIS, SDL_Window * window) +void PSP_MinimizeWindow(_THIS, SDL_Window *window) { } -void -PSP_RestoreWindow(_THIS, SDL_Window * window) +void PSP_RestoreWindow(_THIS, SDL_Window *window) { } -void -PSP_DestroyWindow(_THIS, SDL_Window * window) +void PSP_DestroyWindow(_THIS, SDL_Window *window) { } @@ -281,8 +258,7 @@ PSP_DestroyWindow(_THIS, SDL_Window * window) /* SDL Window Manager function */ /*****************************************************************************/ #if 0 -SDL_bool -PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { if (info->version.major <= SDL_MAJOR_VERSION) { return SDL_TRUE; @@ -314,7 +290,6 @@ SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window) return SDL_FALSE; } - #endif /* SDL_VIDEO_DRIVER_PSP */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/psp/SDL_pspvideo.h b/modules/SDL2/src/video/psp/SDL_pspvideo.h index 58be7a5..1b9ae92 100644 --- a/modules/SDL2/src/video/psp/SDL_pspvideo.h +++ b/modules/SDL2/src/video/psp/SDL_pspvideo.h @@ -29,29 +29,22 @@ typedef struct SDL_VideoData { - SDL_bool egl_initialized; /* OpenGL ES device initialization status */ - uint32_t egl_refcount; /* OpenGL ES reference count */ - - + SDL_bool egl_initialized; /* OpenGL ES device initialization status */ + uint32_t egl_refcount; /* OpenGL ES reference count */ } SDL_VideoData; - typedef struct SDL_DisplayData { } SDL_DisplayData; - typedef struct SDL_WindowData { - SDL_bool uses_gles; /* if true window must support OpenGL ES */ + SDL_bool uses_gles; /* if true window must support OpenGL ES */ } SDL_WindowData; - - - /****************************************************************************/ /* SDL_VideoDevice functions declaration */ /****************************************************************************/ @@ -59,21 +52,21 @@ typedef struct SDL_WindowData /* Display and window functions */ int PSP_VideoInit(_THIS); void PSP_VideoQuit(_THIS); -void PSP_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -int PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); -int PSP_CreateWindow(_THIS, SDL_Window * window); -int PSP_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); -void PSP_SetWindowTitle(_THIS, SDL_Window * window); -void PSP_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon); -void PSP_SetWindowPosition(_THIS, SDL_Window * window); -void PSP_SetWindowSize(_THIS, SDL_Window * window); -void PSP_ShowWindow(_THIS, SDL_Window * window); -void PSP_HideWindow(_THIS, SDL_Window * window); -void PSP_RaiseWindow(_THIS, SDL_Window * window); -void PSP_MaximizeWindow(_THIS, SDL_Window * window); -void PSP_MinimizeWindow(_THIS, SDL_Window * window); -void PSP_RestoreWindow(_THIS, SDL_Window * window); -void PSP_DestroyWindow(_THIS, SDL_Window * window); +void PSP_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +int PSP_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); +int PSP_CreateWindow(_THIS, SDL_Window *window); +int PSP_CreateWindowFrom(_THIS, SDL_Window *window, const void *data); +void PSP_SetWindowTitle(_THIS, SDL_Window *window); +void PSP_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon); +void PSP_SetWindowPosition(_THIS, SDL_Window *window); +void PSP_SetWindowSize(_THIS, SDL_Window *window); +void PSP_ShowWindow(_THIS, SDL_Window *window); +void PSP_HideWindow(_THIS, SDL_Window *window); +void PSP_RaiseWindow(_THIS, SDL_Window *window); +void PSP_MaximizeWindow(_THIS, SDL_Window *window); +void PSP_MinimizeWindow(_THIS, SDL_Window *window); +void PSP_RestoreWindow(_THIS, SDL_Window *window); +void PSP_DestroyWindow(_THIS, SDL_Window *window); /* Window manager function */ SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window, @@ -83,11 +76,11 @@ SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window, int PSP_GL_LoadLibrary(_THIS, const char *path); void *PSP_GL_GetProcAddress(_THIS, const char *proc); void PSP_GL_UnloadLibrary(_THIS); -SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window); -int PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window *window); +int PSP_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); int PSP_GL_SetSwapInterval(_THIS, int interval); int PSP_GL_GetSwapInterval(_THIS); -int PSP_GL_SwapWindow(_THIS, SDL_Window * window); +int PSP_GL_SwapWindow(_THIS, SDL_Window *window); void PSP_GL_DeleteContext(_THIS, SDL_GLContext context); /* PSP on screen keyboard */ diff --git a/modules/SDL2/src/video/qnx/gl.c b/modules/SDL2/src/video/qnx/gl.c index 1862ab4..cf487ed 100644 --- a/modules/SDL2/src/video/qnx/gl.c +++ b/modules/SDL2/src/video/qnx/gl.c @@ -30,8 +30,7 @@ static EGLDisplay egl_disp; * @param egl_conf EGL configuration to use * @return A SCREEN_FORMAT* constant for the pixel format to use */ -static int -chooseFormat(EGLConfig egl_conf) +static int chooseFormat(EGLConfig egl_conf) { EGLint buffer_bit_depth; EGLint alpha_bit_depth; @@ -64,8 +63,7 @@ chooseFormat(EGLConfig egl_conf) * @param[out] pformat The chosen pixel format * @return 0 if successful, -1 on error */ -int -glGetConfig(EGLConfig *pconf, int *pformat) +int glGetConfig(EGLConfig *pconf, int *pformat) { EGLConfig egl_conf = (EGLConfig)0; EGLConfig *egl_configs; @@ -132,8 +130,7 @@ glGetConfig(EGLConfig *pconf, int *pformat) * @param name unused * @return 0 if successful, -1 on error */ -int -glLoadLibrary(_THIS, const char *name) +int glLoadLibrary(_THIS, const char *name) { EGLNativeDisplayType disp_id = EGL_DEFAULT_DISPLAY; @@ -154,8 +151,7 @@ glLoadLibrary(_THIS, const char *name) * @param proc Function name * @return Function address */ -void * -glGetProcAddress(_THIS, const char *proc) +void *glGetProcAddress(_THIS, const char *proc) { return eglGetProcAddress(proc); } @@ -167,8 +163,7 @@ glGetProcAddress(_THIS, const char *proc) * @param window The SDL window to create the context for * @return A pointer to the created context, if successful, NULL on error */ -SDL_GLContext -glCreateContext(_THIS, SDL_Window *window) +SDL_GLContext glCreateContext(_THIS, SDL_Window *window) { window_impl_t *impl = (window_impl_t *)window->driverdata; EGLContext context; @@ -214,8 +209,7 @@ glCreateContext(_THIS, SDL_Window *window) * @param interval New interval value * @return 0 if successful, -1 on error */ -int -glSetSwapInterval(_THIS, int interval) +int glSetSwapInterval(_THIS, int interval) { if (eglSwapInterval(egl_disp, interval) != EGL_TRUE) { return -1; @@ -230,8 +224,7 @@ glSetSwapInterval(_THIS, int interval) * @param window Window to swap buffers for * @return 0 if successful, -1 on error */ -int -glSwapWindow(_THIS, SDL_Window *window) +int glSwapWindow(_THIS, SDL_Window *window) { /* !!! FIXME: should we migrate this all over to use SDL_egl.c? */ window_impl_t *impl = (window_impl_t *)window->driverdata; @@ -245,8 +238,7 @@ glSwapWindow(_THIS, SDL_Window *window) * @param context The context to activate * @return 0 if successful, -1 on error */ -int -glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) +int glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { window_impl_t *impl; EGLSurface surface = NULL; @@ -268,8 +260,7 @@ glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) * @param _THIS * @param context The context to destroy */ -void -glDeleteContext(_THIS, SDL_GLContext context) +void glDeleteContext(_THIS, SDL_GLContext context) { eglDestroyContext(egl_disp, context); } @@ -278,8 +269,7 @@ glDeleteContext(_THIS, SDL_GLContext context) * Terminates access to the EGL library. * @param _THIS */ -void -glUnloadLibrary(_THIS) +void glUnloadLibrary(_THIS) { eglTerminate(egl_disp); } diff --git a/modules/SDL2/src/video/qnx/keyboard.c b/modules/SDL2/src/video/qnx/keyboard.c index 86c6395..9ec289d 100644 --- a/modules/SDL2/src/video/qnx/keyboard.c +++ b/modules/SDL2/src/video/qnx/keyboard.c @@ -95,8 +95,7 @@ static int key_to_sdl[] = { * Translates the event such that it can be handled by SDL. * @param event Screen keyboard event */ -void -handleKeyboardEvent(screen_event_t event) +void handleKeyboardEvent(screen_event_t event) { int val; SDL_Scancode scancode; diff --git a/modules/SDL2/src/video/qnx/video.c b/modules/SDL2/src/video/qnx/video.c index 049d814..cecd717 100644 --- a/modules/SDL2/src/video/qnx/video.c +++ b/modules/SDL2/src/video/qnx/video.c @@ -32,8 +32,7 @@ static screen_event_t event; * @param _THIS * @return 0 if successful, -1 on error */ -static int -videoInit(_THIS) +static int videoInit(_THIS) { SDL_VideoDisplay display; @@ -55,8 +54,7 @@ videoInit(_THIS) return 0; } -static void -videoQuit(_THIS) +static void videoQuit(_THIS) { } @@ -67,8 +65,7 @@ videoQuit(_THIS) * @param window SDL window to initialize * @return 0 if successful, -1 on error */ -static int -createWindow(_THIS, SDL_Window *window) +static int createWindow(_THIS, SDL_Window *window) { window_impl_t *impl; int size[2]; @@ -150,8 +147,7 @@ fail: * @param[out] pitch Holds the number of bytes per line * @return 0 if successful, -1 on error */ -static int -createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, +static int createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) { window_impl_t *impl = (window_impl_t *)window->driverdata; @@ -186,8 +182,7 @@ createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, * @param numrects Rect array length * @return 0 if successful, -1 on error */ -static int -updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, +static int updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { window_impl_t *impl = (window_impl_t *)window->driverdata; @@ -207,8 +202,7 @@ updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, * Runs the main event loop. * @param _THIS */ -static void -pumpEvents(_THIS) +static void pumpEvents(_THIS) { int type; @@ -242,8 +236,7 @@ pumpEvents(_THIS) * @param _THIS * @param window SDL window to update */ -static void -setWindowSize(_THIS, SDL_Window *window) +static void setWindowSize(_THIS, SDL_Window *window) { window_impl_t *impl = (window_impl_t *)window->driverdata; int size[2]; @@ -261,8 +254,7 @@ setWindowSize(_THIS, SDL_Window *window) * @param _THIS * @param window SDL window to update */ -static void -showWindow(_THIS, SDL_Window *window) +static void showWindow(_THIS, SDL_Window *window) { window_impl_t *impl = (window_impl_t *)window->driverdata; const int visible = 1; @@ -276,8 +268,7 @@ showWindow(_THIS, SDL_Window *window) * @param _THIS * @param window SDL window to update */ -static void -hideWindow(_THIS, SDL_Window *window) +static void hideWindow(_THIS, SDL_Window *window) { window_impl_t *impl = (window_impl_t *)window->driverdata; const int visible = 0; @@ -291,8 +282,7 @@ hideWindow(_THIS, SDL_Window *window) * @param _THIS * @param window SDL window that is being destroyed */ -static void -destroyWindow(_THIS, SDL_Window *window) +static void destroyWindow(_THIS, SDL_Window *window) { window_impl_t *impl = (window_impl_t *)window->driverdata; @@ -306,8 +296,7 @@ destroyWindow(_THIS, SDL_Window *window) * Frees the plugin object created by createDevice(). * @param device Plugin object to free */ -static void -deleteDevice(SDL_VideoDevice *device) +static void deleteDevice(SDL_VideoDevice *device) { SDL_free(device); } @@ -317,8 +306,7 @@ deleteDevice(SDL_VideoDevice *device) * @param devindex Unused * @return Initialized device if successful, NULL otherwise */ -static SDL_VideoDevice * -createDevice(int devindex) +static SDL_VideoDevice *createDevice(int devindex) { SDL_VideoDevice *device; diff --git a/modules/SDL2/src/video/raspberry/SDL_rpievents.c b/modules/SDL2/src/video/raspberry/SDL_rpievents.c index e7aa8d6..9f2fccc 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpievents.c +++ b/modules/SDL2/src/video/raspberry/SDL_rpievents.c @@ -38,8 +38,6 @@ void RPI_PumpEvents(_THIS) #ifdef SDL_INPUT_LINUXEV SDL_EVDEV_Poll(); #endif - } #endif /* SDL_VIDEO_DRIVER_RPI */ - diff --git a/modules/SDL2/src/video/raspberry/SDL_rpimouse.c b/modules/SDL2/src/video/raspberry/SDL_rpimouse.c index 47a34ed..2d9b884 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpimouse.c +++ b/modules/SDL2/src/video/raspberry/SDL_rpimouse.c @@ -34,49 +34,47 @@ /* Copied from vc_vchi_dispmanx.h which is bugged and tries to include a non existing file */ /* Attributes changes flag mask */ -#define ELEMENT_CHANGE_LAYER (1<<0) -#define ELEMENT_CHANGE_OPACITY (1<<1) -#define ELEMENT_CHANGE_DEST_RECT (1<<2) -#define ELEMENT_CHANGE_SRC_RECT (1<<3) -#define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) -#define ELEMENT_CHANGE_TRANSFORM (1<<5) +#define ELEMENT_CHANGE_LAYER (1 << 0) +#define ELEMENT_CHANGE_OPACITY (1 << 1) +#define ELEMENT_CHANGE_DEST_RECT (1 << 2) +#define ELEMENT_CHANGE_SRC_RECT (1 << 3) +#define ELEMENT_CHANGE_MASK_RESOURCE (1 << 4) +#define ELEMENT_CHANGE_TRANSFORM (1 << 5) /* End copied from vc_vchi_dispmanx.h */ static SDL_Cursor *RPI_CreateDefaultCursor(void); -static SDL_Cursor *RPI_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y); -static int RPI_ShowCursor(SDL_Cursor * cursor); -static void RPI_MoveCursor(SDL_Cursor * cursor); -static void RPI_FreeCursor(SDL_Cursor * cursor); -static void RPI_WarpMouse(SDL_Window * window, int x, int y); +static SDL_Cursor *RPI_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y); +static int RPI_ShowCursor(SDL_Cursor *cursor); +static void RPI_MoveCursor(SDL_Cursor *cursor); +static void RPI_FreeCursor(SDL_Cursor *cursor); +static void RPI_WarpMouse(SDL_Window *window, int x, int y); static int RPI_WarpMouseGlobal(int x, int y); static SDL_Cursor *global_cursor; -static SDL_Cursor * -RPI_CreateDefaultCursor(void) +static SDL_Cursor *RPI_CreateDefaultCursor(void) { return SDL_CreateCursor(default_cdata, default_cmask, DEFAULT_CWIDTH, DEFAULT_CHEIGHT, DEFAULT_CHOTX, DEFAULT_CHOTY); } /* Create a cursor from a surface */ -static SDL_Cursor * -RPI_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *RPI_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { RPI_CursorData *curdata; SDL_Cursor *cursor; int ret; VC_RECT_T dst_rect; Uint32 dummy; - + SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888); SDL_assert(surface->pitch == surface->w * 4); - - cursor = (SDL_Cursor *) SDL_calloc(1, sizeof(*cursor)); + + cursor = (SDL_Cursor *)SDL_calloc(1, sizeof(*cursor)); if (cursor == NULL) { SDL_OutOfMemory(); return NULL; } - curdata = (RPI_CursorData *) SDL_calloc(1, sizeof(*curdata)); + curdata = (RPI_CursorData *)SDL_calloc(1, sizeof(*curdata)); if (curdata == NULL) { SDL_OutOfMemory(); SDL_free(cursor); @@ -87,29 +85,27 @@ RPI_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) curdata->hot_y = hot_y; curdata->w = surface->w; curdata->h = surface->h; - + /* This usage is inspired by Wayland/Weston RPI code, how they figured this out is anyone's guess */ curdata->resource = vc_dispmanx_resource_create(VC_IMAGE_ARGB8888, surface->w | (surface->pitch << 16), surface->h | (surface->h << 16), &dummy); SDL_assert(curdata->resource); vc_dispmanx_rect_set(&dst_rect, 0, 0, curdata->w, curdata->h); - /* A note from Weston: + /* A note from Weston: * vc_dispmanx_resource_write_data() ignores ifmt, * rect.x, rect.width, and uses stride only for computing * the size of the transfer as rect.height * stride. * Therefore we can only write rows starting at x=0. */ ret = vc_dispmanx_resource_write_data(curdata->resource, VC_IMAGE_ARGB8888, surface->pitch, surface->pixels, &dst_rect); - SDL_assert (ret == DISPMANX_SUCCESS); - + SDL_assert(ret == DISPMANX_SUCCESS); + cursor->driverdata = curdata; - - return cursor; + return cursor; } /* Show the specified cursor, or hide if cursor is NULL */ -static int -RPI_ShowCursor(SDL_Cursor * cursor) +static int RPI_ShowCursor(SDL_Cursor *cursor) { int ret; DISPMANX_UPDATE_HANDLE_T update; @@ -118,7 +114,7 @@ RPI_ShowCursor(SDL_Cursor * cursor) SDL_Mouse *mouse; SDL_VideoDisplay *display; SDL_DisplayData *data; - VC_DISPMANX_ALPHA_T alpha = { DISPMANX_FLAGS_ALPHA_FROM_SOURCE /* flags */ , 255 /*opacity 0->255*/, 0 /* mask */ }; + VC_DISPMANX_ALPHA_T alpha = { DISPMANX_FLAGS_ALPHA_FROM_SOURCE /* flags */, 255 /*opacity 0->255*/, 0 /* mask */ }; uint32_t layer = SDL_RPI_MOUSELAYER; const char *env; @@ -126,10 +122,10 @@ RPI_ShowCursor(SDL_Cursor * cursor) if (mouse == NULL) { return -1; } - + if (cursor != global_cursor) { if (global_cursor != NULL) { - curdata = (RPI_CursorData *) global_cursor->driverdata; + curdata = (RPI_CursorData *)global_cursor->driverdata; if (curdata && curdata->element > DISPMANX_NO_HANDLE) { update = vc_dispmanx_update_start(0); SDL_assert(update); @@ -146,12 +142,12 @@ RPI_ShowCursor(SDL_Cursor * cursor) if (cursor == NULL) { return 0; } - - curdata = (RPI_CursorData *) cursor->driverdata; + + curdata = (RPI_CursorData *)cursor->driverdata; if (curdata == NULL) { return -1; } - + if (mouse->focus == NULL) { return -1; } @@ -160,16 +156,16 @@ RPI_ShowCursor(SDL_Cursor * cursor) if (display == NULL) { return -1; } - - data = (SDL_DisplayData*) display->driverdata; + + data = (SDL_DisplayData *)display->driverdata; if (data == NULL) { return -1; } - + if (curdata->element == DISPMANX_NO_HANDLE) { vc_dispmanx_rect_set(&src_rect, 0, 0, curdata->w << 16, curdata->h << 16); vc_dispmanx_rect_set(&dst_rect, mouse->x - curdata->hot_x, mouse->y - curdata->hot_y, curdata->w, curdata->h); - + update = vc_dispmanx_update_start(0); SDL_assert(update); @@ -179,34 +175,33 @@ RPI_ShowCursor(SDL_Cursor * cursor) } curdata->element = vc_dispmanx_element_add(update, - data->dispman_display, - layer, - &dst_rect, - curdata->resource, - &src_rect, - DISPMANX_PROTECTION_NONE, - &alpha, - DISPMANX_NO_HANDLE, // clamp - DISPMANX_NO_ROTATE); + data->dispman_display, + layer, + &dst_rect, + curdata->resource, + &src_rect, + DISPMANX_PROTECTION_NONE, + &alpha, + DISPMANX_NO_HANDLE, // clamp + DISPMANX_NO_ROTATE); SDL_assert(curdata->element > DISPMANX_NO_HANDLE); ret = vc_dispmanx_update_submit_sync(update); SDL_assert(ret == DISPMANX_SUCCESS); } - + return 0; } /* Free a window manager cursor */ -static void -RPI_FreeCursor(SDL_Cursor * cursor) +static void RPI_FreeCursor(SDL_Cursor *cursor) { int ret; DISPMANX_UPDATE_HANDLE_T update; RPI_CursorData *curdata; - + if (cursor != NULL) { - curdata = (RPI_CursorData *) cursor->driverdata; - + curdata = (RPI_CursorData *)cursor->driverdata; + if (curdata != NULL) { if (curdata->element != DISPMANX_NO_HANDLE) { update = vc_dispmanx_update_start(0); @@ -216,12 +211,12 @@ RPI_FreeCursor(SDL_Cursor * cursor) ret = vc_dispmanx_update_submit_sync(update); SDL_assert(ret == DISPMANX_SUCCESS); } - + if (curdata->resource != DISPMANX_NO_HANDLE) { ret = vc_dispmanx_resource_delete(curdata->resource); SDL_assert(ret == DISPMANX_SUCCESS); } - + SDL_free(cursor->driverdata); } SDL_free(cursor); @@ -232,15 +227,13 @@ RPI_FreeCursor(SDL_Cursor * cursor) } /* Warp the mouse to (x,y) */ -static void -RPI_WarpMouse(SDL_Window * window, int x, int y) +static void RPI_WarpMouse(SDL_Window *window, int x, int y) { RPI_WarpMouseGlobal(x, y); } /* Warp the mouse to (x,y) */ -static int -RPI_WarpMouseGlobal(int x, int y) +static int RPI_WarpMouseGlobal(int x, int y) { RPI_CursorData *curdata; DISPMANX_UPDATE_HANDLE_T update; @@ -248,7 +241,7 @@ RPI_WarpMouseGlobal(int x, int y) VC_RECT_T dst_rect; VC_RECT_T src_rect; SDL_Mouse *mouse = SDL_GetMouse(); - + if (mouse == NULL || mouse->cur_cursor == NULL || mouse->cur_cursor->driverdata == NULL) { return 0; } @@ -256,7 +249,7 @@ RPI_WarpMouseGlobal(int x, int y) /* Update internal mouse position. */ SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y); - curdata = (RPI_CursorData *) mouse->cur_cursor->driverdata; + curdata = (RPI_CursorData *)mouse->cur_cursor->driverdata; if (curdata->element == DISPMANX_NO_HANDLE) { return 0; } @@ -268,11 +261,11 @@ RPI_WarpMouseGlobal(int x, int y) src_rect.x = 0; src_rect.y = 0; - src_rect.width = curdata->w << 16; + src_rect.width = curdata->w << 16; src_rect.height = curdata->h << 16; dst_rect.x = x - curdata->hot_x; dst_rect.y = y - curdata->hot_y; - dst_rect.width = curdata->w; + dst_rect.width = curdata->w; dst_rect.height = curdata->h; ret = vc_dispmanx_element_change_attributes( @@ -298,8 +291,7 @@ RPI_WarpMouseGlobal(int x, int y) } /* Warp the mouse to (x,y) */ -static int -RPI_WarpMouseGlobalGraphicOnly(int x, int y) +static int RPI_WarpMouseGlobalGraphicOnly(int x, int y) { RPI_CursorData *curdata; DISPMANX_UPDATE_HANDLE_T update; @@ -307,12 +299,12 @@ RPI_WarpMouseGlobalGraphicOnly(int x, int y) VC_RECT_T dst_rect; VC_RECT_T src_rect; SDL_Mouse *mouse = SDL_GetMouse(); - + if (mouse == NULL || mouse->cur_cursor == NULL || mouse->cur_cursor->driverdata == NULL) { return 0; } - curdata = (RPI_CursorData *) mouse->cur_cursor->driverdata; + curdata = (RPI_CursorData *)mouse->cur_cursor->driverdata; if (curdata->element == DISPMANX_NO_HANDLE) { return 0; } @@ -324,11 +316,11 @@ RPI_WarpMouseGlobalGraphicOnly(int x, int y) src_rect.x = 0; src_rect.y = 0; - src_rect.width = curdata->w << 16; + src_rect.width = curdata->w << 16; src_rect.height = curdata->h << 16; dst_rect.x = x - curdata->hot_x; dst_rect.y = y - curdata->hot_y; - dst_rect.width = curdata->w; + dst_rect.width = curdata->w; dst_rect.height = curdata->h; ret = vc_dispmanx_element_change_attributes( @@ -353,10 +345,9 @@ RPI_WarpMouseGlobalGraphicOnly(int x, int y) return 0; } -void -RPI_InitMouse(_THIS) +void RPI_InitMouse(_THIS) { - /* FIXME: Using UDEV it should be possible to scan all mice + /* FIXME: Using UDEV it should be possible to scan all mice * but there's no point in doing so as there's no multimice support...yet! */ SDL_Mouse *mouse = SDL_GetMouse(); @@ -371,17 +362,15 @@ RPI_InitMouse(_THIS) SDL_SetDefaultCursor(RPI_CreateDefaultCursor()); } -void -RPI_QuitMouse(_THIS) +void RPI_QuitMouse(_THIS) { } /* This is called when a mouse motion event occurs */ -static void -RPI_MoveCursor(SDL_Cursor * cursor) +static void RPI_MoveCursor(SDL_Cursor *cursor) { SDL_Mouse *mouse = SDL_GetMouse(); - /* We must NOT call SDL_SendMouseMotion() on the next call or we will enter recursivity, + /* We must NOT call SDL_SendMouseMotion() on the next call or we will enter recursivity, * so we create a version of WarpMouseGlobal without it. */ RPI_WarpMouseGlobalGraphicOnly(mouse->x, mouse->y); } diff --git a/modules/SDL2/src/video/raspberry/SDL_rpimouse.h b/modules/SDL2/src/video/raspberry/SDL_rpimouse.h index 1fb9a91..895fa39 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpimouse.h +++ b/modules/SDL2/src/video/raspberry/SDL_rpimouse.h @@ -27,13 +27,13 @@ typedef struct _RPI_CursorData RPI_CursorData; struct _RPI_CursorData { - DISPMANX_RESOURCE_HANDLE_T resource; - DISPMANX_ELEMENT_HANDLE_T element; - int hot_x, hot_y; - int w, h; + DISPMANX_RESOURCE_HANDLE_T resource; + DISPMANX_ELEMENT_HANDLE_T element; + int hot_x, hot_y; + int w, h; }; -#define SDL_RPI_CURSORDATA(curs) RPI_CursorData *curdata = (RPI_CursorData *) ((curs) ? (curs)->driverdata : NULL) +#define SDL_RPI_CURSORDATA(curs) RPI_CursorData *curdata = (RPI_CursorData *)((curs) ? (curs)->driverdata : NULL) extern void RPI_InitMouse(_THIS); extern void RPI_QuitMouse(_THIS); diff --git a/modules/SDL2/src/video/raspberry/SDL_rpiopengles.c b/modules/SDL2/src/video/raspberry/SDL_rpiopengles.c index 8b91deb..bce27e2 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpiopengles.c +++ b/modules/SDL2/src/video/raspberry/SDL_rpiopengles.c @@ -29,22 +29,21 @@ /* EGL implementation of SDL OpenGL support */ -void -RPI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) +void RPI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) { *mask = SDL_GL_CONTEXT_PROFILE_ES; *major = 2; *minor = 0; } -int -RPI_GLES_LoadLibrary(_THIS, const char *path) { +int RPI_GLES_LoadLibrary(_THIS, const char *path) +{ return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0); } -int -RPI_GLES_SwapWindow(_THIS, SDL_Window * window) { - SDL_WindowData *wdata = ((SDL_WindowData *) window->driverdata); +int RPI_GLES_SwapWindow(_THIS, SDL_Window *window) +{ + SDL_WindowData *wdata = ((SDL_WindowData *)window->driverdata); if (!(_this->egl_data->eglSwapBuffers(_this->egl_data->egl_display, wdata->egl_surface))) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "eglSwapBuffers failed."); @@ -63,9 +62,8 @@ RPI_GLES_SwapWindow(_THIS, SDL_Window * window) { } SDL_EGL_CreateContext_impl(RPI) -SDL_EGL_MakeCurrent_impl(RPI) + SDL_EGL_MakeCurrent_impl(RPI) #endif /* SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL */ -/* vi: set ts=4 sw=4 expandtab: */ - + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/raspberry/SDL_rpiopengles.h b/modules/SDL2/src/video/raspberry/SDL_rpiopengles.h index 0761090..cfe7a94 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpiopengles.h +++ b/modules/SDL2/src/video/raspberry/SDL_rpiopengles.h @@ -34,12 +34,12 @@ #define RPI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary #define RPI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval #define RPI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval -#define RPI_GLES_DeleteContext SDL_EGL_DeleteContext +#define RPI_GLES_DeleteContext SDL_EGL_DeleteContext extern int RPI_GLES_LoadLibrary(_THIS, const char *path); -extern SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window * window); -extern int RPI_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int RPI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window *window); +extern int RPI_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int RPI_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern void RPI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor); #endif /* SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/raspberry/SDL_rpivideo.c b/modules/SDL2/src/video/raspberry/SDL_rpivideo.c index 0d4239c..f56e23d 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpivideo.c +++ b/modules/SDL2/src/video/raspberry/SDL_rpivideo.c @@ -50,45 +50,40 @@ #include "SDL_rpiopengles.h" #include "SDL_rpimouse.h" -static void -RPI_Destroy(SDL_VideoDevice * device) +static void RPI_Destroy(SDL_VideoDevice *device) { SDL_free(device->driverdata); SDL_free(device); } -static int -RPI_GetRefreshRate() +static int RPI_GetRefreshRate() { TV_DISPLAY_STATE_T tvstate; - if (vc_tv_get_display_state( &tvstate ) == 0) { - //The width/height parameters are in the same position in the union - //for HDMI and SDTV + if (vc_tv_get_display_state(&tvstate) == 0) { + // The width/height parameters are in the same position in the union + // for HDMI and SDTV HDMI_PROPERTY_PARAM_T property; property.property = HDMI_PROPERTY_PIXEL_CLOCK_TYPE; vc_tv_hdmi_get_property(&property); - return property.param1 == HDMI_PIXEL_CLOCK_TYPE_NTSC ? - tvstate.display.hdmi.frame_rate * (1000.0f/1001.0f) : - tvstate.display.hdmi.frame_rate; - } - return 60; /* Failed to get display state, default to 60 */ + return property.param1 == HDMI_PIXEL_CLOCK_TYPE_NTSC ? tvstate.display.hdmi.frame_rate * (1000.0f / 1001.0f) : tvstate.display.hdmi.frame_rate; + } + return 60; /* Failed to get display state, default to 60 */ } -static SDL_VideoDevice * -RPI_Create() +static SDL_VideoDevice *RPI_Create() { SDL_VideoDevice *device; SDL_VideoData *phdata; /* Initialize SDL_VideoDevice structure */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device == NULL) { SDL_OutOfMemory(); return NULL; } /* Initialize internal data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (phdata == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -146,13 +141,11 @@ VideoBootStrap RPI_bootstrap = { RPI_Create }; - /*****************************************************************************/ /* SDL Video and Display initialization/handling functions */ /*****************************************************************************/ -static void -AddDispManXDisplay(const int display_id) +static void AddDispManXDisplay(const int display_id) { DISPMANX_MODEINFO_T modeinfo; DISPMANX_DISPLAY_HANDLE_T handle; @@ -162,7 +155,7 @@ AddDispManXDisplay(const int display_id) handle = vc_dispmanx_display_open(display_id); if (!handle) { - return; /* this display isn't available */ + return; /* this display isn't available */ } if (vc_dispmanx_display_get_info(handle, &modeinfo) < 0) { @@ -185,10 +178,10 @@ AddDispManXDisplay(const int display_id) display.current_mode = current_mode; /* Allocate display internal data */ - data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData)); + data = (SDL_DisplayData *)SDL_calloc(1, sizeof(SDL_DisplayData)); if (data == NULL) { vc_dispmanx_display_close(handle); - return; /* oh well */ + return; /* oh well */ } data->dispman_display = handle; @@ -198,82 +191,76 @@ AddDispManXDisplay(const int display_id) SDL_AddVideoDisplay(&display, SDL_FALSE); } -int -RPI_VideoInit(_THIS) +int RPI_VideoInit(_THIS) { /* Initialize BCM Host */ bcm_host_init(); - AddDispManXDisplay(DISPMANX_ID_MAIN_LCD); /* your default display */ - AddDispManXDisplay(DISPMANX_ID_FORCE_OTHER); /* an "other" display...maybe DSI-connected screen while HDMI is your main */ + AddDispManXDisplay(DISPMANX_ID_MAIN_LCD); /* your default display */ + AddDispManXDisplay(DISPMANX_ID_FORCE_OTHER); /* an "other" display...maybe DSI-connected screen while HDMI is your main */ -#ifdef SDL_INPUT_LINUXEV +#ifdef SDL_INPUT_LINUXEV if (SDL_EVDEV_Init() < 0) { return -1; } -#endif - +#endif + RPI_InitMouse(_this); return 1; } -void -RPI_VideoQuit(_THIS) +void RPI_VideoQuit(_THIS) { -#ifdef SDL_INPUT_LINUXEV +#ifdef SDL_INPUT_LINUXEV SDL_EVDEV_Quit(); -#endif +#endif } -void -RPI_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void RPI_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { /* Only one display mode available, the current one */ SDL_AddDisplayMode(display, &display->current_mode); } -int -RPI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int RPI_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -static void -RPI_vsync_callback(DISPMANX_UPDATE_HANDLE_T u, void *data) +static void RPI_vsync_callback(DISPMANX_UPDATE_HANDLE_T u, void *data) { - SDL_WindowData *wdata = ((SDL_WindowData *) data); + SDL_WindowData *wdata = ((SDL_WindowData *)data); - SDL_LockMutex(wdata->vsync_cond_mutex); - SDL_CondSignal(wdata->vsync_cond); - SDL_UnlockMutex(wdata->vsync_cond_mutex); + SDL_LockMutex(wdata->vsync_cond_mutex); + SDL_CondSignal(wdata->vsync_cond); + SDL_UnlockMutex(wdata->vsync_cond_mutex); } -int -RPI_CreateWindow(_THIS, SDL_Window * window) +int RPI_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *wdata; SDL_VideoDisplay *display; SDL_DisplayData *displaydata; VC_RECT_T dst_rect; VC_RECT_T src_rect; - VC_DISPMANX_ALPHA_T dispman_alpha; + VC_DISPMANX_ALPHA_T dispman_alpha; DISPMANX_UPDATE_HANDLE_T dispman_update; uint32_t layer = SDL_RPI_VIDEOLAYER; const char *env; /* Disable alpha, otherwise the app looks composed with whatever dispman is showing (X11, console,etc) */ - dispman_alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS; - dispman_alpha.opacity = 0xFF; + dispman_alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS; + dispman_alpha.opacity = 0xFF; dispman_alpha.mask = 0; /* Allocate window internal data */ - wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + wdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (wdata == NULL) { return SDL_OutOfMemory(); } display = SDL_GetDisplayForWindow(window); - displaydata = (SDL_DisplayData *) display->driverdata; + displaydata = (SDL_DisplayData *)display->driverdata; /* Windows have one size for now */ window->w = display->desktop_mode.w; @@ -298,27 +285,27 @@ RPI_CreateWindow(_THIS, SDL_Window * window) layer = SDL_atoi(env); } - dispman_update = vc_dispmanx_update_start( 0 ); - wdata->dispman_window.element = vc_dispmanx_element_add (dispman_update, - displaydata->dispman_display, - layer /* layer */, - &dst_rect, - 0 /*src*/, - &src_rect, - DISPMANX_PROTECTION_NONE, - &dispman_alpha /*alpha*/, - 0 /*clamp*/, - 0 /*transform*/); + dispman_update = vc_dispmanx_update_start(0); + wdata->dispman_window.element = vc_dispmanx_element_add(dispman_update, + displaydata->dispman_display, + layer /* layer */, + &dst_rect, + 0 /*src*/, + &src_rect, + DISPMANX_PROTECTION_NONE, + &dispman_alpha /*alpha*/, + 0 /*clamp*/, + 0 /*transform*/); wdata->dispman_window.width = window->w; wdata->dispman_window.height = window->h; vc_dispmanx_update_submit_sync(dispman_update); - + if (!_this->egl_data) { if (SDL_GL_LoadLibrary(NULL) < 0) { return -1; } } - wdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &wdata->dispman_window); + wdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)&wdata->dispman_window); if (wdata->egl_surface == EGL_NO_SURFACE) { return SDL_SetError("Could not create GLES window surface"); @@ -330,7 +317,7 @@ RPI_CreateWindow(_THIS, SDL_Window * window) wdata->vsync_cond = SDL_CreateCond(); wdata->vsync_cond_mutex = SDL_CreateMutex(); wdata->double_buffer = SDL_TRUE; - vc_dispmanx_vsync_callback(displaydata->dispman_display, RPI_vsync_callback, (void*)wdata); + vc_dispmanx_vsync_callback(displaydata->dispman_display, RPI_vsync_callback, (void *)wdata); } /* Setup driver data for this window */ @@ -344,14 +331,13 @@ RPI_CreateWindow(_THIS, SDL_Window * window) return 0; } -void -RPI_DestroyWindow(_THIS, SDL_Window * window) +void RPI_DestroyWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); - SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *displaydata = (SDL_DisplayData *)display->driverdata; - if(data) { + if (data) { if (data->double_buffer) { /* Wait for vsync, and then stop vsync callbacks and destroy related stuff, if needed */ SDL_LockMutex(data->vsync_cond_mutex); @@ -374,50 +360,39 @@ RPI_DestroyWindow(_THIS, SDL_Window * window) } } -int -RPI_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int RPI_CreateWindowFrom(_THIS, SDL_Window *window, const void *data) { return -1; } -void -RPI_SetWindowTitle(_THIS, SDL_Window * window) +void RPI_SetWindowTitle(_THIS, SDL_Window *window) { } -void -RPI_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void RPI_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { } -void -RPI_SetWindowPosition(_THIS, SDL_Window * window) +void RPI_SetWindowPosition(_THIS, SDL_Window *window) { } -void -RPI_SetWindowSize(_THIS, SDL_Window * window) +void RPI_SetWindowSize(_THIS, SDL_Window *window) { } -void -RPI_ShowWindow(_THIS, SDL_Window * window) +void RPI_ShowWindow(_THIS, SDL_Window *window) { } -void -RPI_HideWindow(_THIS, SDL_Window * window) +void RPI_HideWindow(_THIS, SDL_Window *window) { } -void -RPI_RaiseWindow(_THIS, SDL_Window * window) +void RPI_RaiseWindow(_THIS, SDL_Window *window) { } -void -RPI_MaximizeWindow(_THIS, SDL_Window * window) +void RPI_MaximizeWindow(_THIS, SDL_Window *window) { } -void -RPI_MinimizeWindow(_THIS, SDL_Window * window) +void RPI_MinimizeWindow(_THIS, SDL_Window *window) { } -void -RPI_RestoreWindow(_THIS, SDL_Window * window) +void RPI_RestoreWindow(_THIS, SDL_Window *window) { } @@ -425,8 +400,7 @@ RPI_RestoreWindow(_THIS, SDL_Window * window) /* SDL Window Manager function */ /*****************************************************************************/ #if 0 -SDL_bool -RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { if (info->version.major <= SDL_MAJOR_VERSION) { return SDL_TRUE; diff --git a/modules/SDL2/src/video/raspberry/SDL_rpivideo.h b/modules/SDL2/src/video/raspberry/SDL_rpivideo.h index bb93122..a0e9d21 100644 --- a/modules/SDL2/src/video/raspberry/SDL_rpivideo.h +++ b/modules/SDL2/src/video/raspberry/SDL_rpivideo.h @@ -32,25 +32,23 @@ typedef struct SDL_VideoData { - uint32_t egl_refcount; /* OpenGL ES reference count */ + uint32_t egl_refcount; /* OpenGL ES reference count */ } SDL_VideoData; - typedef struct SDL_DisplayData { DISPMANX_DISPLAY_HANDLE_T dispman_display; } SDL_DisplayData; - typedef struct SDL_WindowData { EGL_DISPMANX_WINDOW_T dispman_window; -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL EGLSurface egl_surface; -#endif +#endif /* Vsync callback cond and mutex */ - SDL_cond *vsync_cond; + SDL_cond *vsync_cond; SDL_mutex *vsync_cond_mutex; SDL_bool double_buffer; @@ -59,7 +57,6 @@ typedef struct SDL_WindowData #define SDL_RPI_VIDEOLAYER 10000 /* High enough so to occlude everything */ #define SDL_RPI_MOUSELAYER SDL_RPI_VIDEOLAYER + 1 - /****************************************************************************/ /* SDL_VideoDevice functions declaration */ /****************************************************************************/ @@ -67,21 +64,21 @@ typedef struct SDL_WindowData /* Display and window functions */ int RPI_VideoInit(_THIS); void RPI_VideoQuit(_THIS); -void RPI_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -int RPI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); -int RPI_CreateWindow(_THIS, SDL_Window * window); -int RPI_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); -void RPI_SetWindowTitle(_THIS, SDL_Window * window); -void RPI_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon); -void RPI_SetWindowPosition(_THIS, SDL_Window * window); -void RPI_SetWindowSize(_THIS, SDL_Window * window); -void RPI_ShowWindow(_THIS, SDL_Window * window); -void RPI_HideWindow(_THIS, SDL_Window * window); -void RPI_RaiseWindow(_THIS, SDL_Window * window); -void RPI_MaximizeWindow(_THIS, SDL_Window * window); -void RPI_MinimizeWindow(_THIS, SDL_Window * window); -void RPI_RestoreWindow(_THIS, SDL_Window * window); -void RPI_DestroyWindow(_THIS, SDL_Window * window); +void RPI_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +int RPI_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); +int RPI_CreateWindow(_THIS, SDL_Window *window); +int RPI_CreateWindowFrom(_THIS, SDL_Window *window, const void *data); +void RPI_SetWindowTitle(_THIS, SDL_Window *window); +void RPI_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon); +void RPI_SetWindowPosition(_THIS, SDL_Window *window); +void RPI_SetWindowSize(_THIS, SDL_Window *window); +void RPI_ShowWindow(_THIS, SDL_Window *window); +void RPI_HideWindow(_THIS, SDL_Window *window); +void RPI_RaiseWindow(_THIS, SDL_Window *window); +void RPI_MaximizeWindow(_THIS, SDL_Window *window); +void RPI_MinimizeWindow(_THIS, SDL_Window *window); +void RPI_RestoreWindow(_THIS, SDL_Window *window); +void RPI_DestroyWindow(_THIS, SDL_Window *window); /* Window manager function */ SDL_bool RPI_GetWindowWMInfo(_THIS, SDL_Window * window, @@ -91,11 +88,11 @@ SDL_bool RPI_GetWindowWMInfo(_THIS, SDL_Window * window, int RPI_GLES_LoadLibrary(_THIS, const char *path); void *RPI_GLES_GetProcAddress(_THIS, const char *proc); void RPI_GLES_UnloadLibrary(_THIS); -SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window * window); -int RPI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window *window); +int RPI_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); int RPI_GLES_SetSwapInterval(_THIS, int interval); int RPI_GLES_GetSwapInterval(_THIS); -int RPI_GLES_SwapWindow(_THIS, SDL_Window * window); +int RPI_GLES_SwapWindow(_THIS, SDL_Window *window); void RPI_GLES_DeleteContext(_THIS, SDL_GLContext context); #endif /* __SDL_RPIVIDEO_H__ */ diff --git a/modules/SDL2/src/video/riscos/SDL_riscosdefs.h b/modules/SDL2/src/video/riscos/SDL_riscosdefs.h index 34a1556..81c5058 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosdefs.h +++ b/modules/SDL2/src/video/riscos/SDL_riscosdefs.h @@ -23,7 +23,8 @@ #ifndef SDL_riscosdefs_h_ #define SDL_riscosdefs_h_ -typedef struct sprite_area { +typedef struct sprite_area +{ int size; /* +0 */ int count; /* +4 */ int start; /* +8 */ @@ -32,7 +33,8 @@ typedef struct sprite_area { SDL_COMPILE_TIME_ASSERT(sprite_area, sizeof(sprite_area) == 16); -typedef struct sprite_header { +typedef struct sprite_header +{ int next; /* +0 */ char name[12]; /* +4 */ int width; /* +16 */ diff --git a/modules/SDL2/src/video/riscos/SDL_riscosevents.c b/modules/SDL2/src/video/riscos/SDL_riscosevents.c index 6fb2b4c..77b3ba9 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosevents.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosevents.c @@ -32,8 +32,7 @@ #include #include -static SDL_Scancode -SDL_RISCOS_translate_keycode(int keycode) +static SDL_Scancode SDL_RISCOS_translate_keycode(int keycode) { SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN; @@ -50,8 +49,7 @@ SDL_RISCOS_translate_keycode(int keycode) return scancode; } -void -RISCOS_PollKeyboard(_THIS) +void RISCOS_PollKeyboard(_THIS) { SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; Uint8 key = 2; @@ -111,8 +109,7 @@ static const Uint8 mouse_button_map[] = { SDL_BUTTON_X2 + 3 }; -void -RISCOS_PollMouse(_THIS) +void RISCOS_PollMouse(_THIS) { SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; SDL_Mouse *mouse = SDL_GetMouse(); @@ -141,21 +138,21 @@ RISCOS_PollMouse(_THIS) } } -int -RISCOS_InitEvents(_THIS) +int RISCOS_InitEvents(_THIS) { - SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; _kernel_swi_regs regs; int i, status; - for (i = 0; i < RISCOS_MAX_KEYS_PRESSED; i++) + for (i = 0; i < RISCOS_MAX_KEYS_PRESSED; i++) { driverdata->key_pressed[i] = 255; + } status = (_kernel_osbyte(202, 0, 255) & 0xFF); - SDL_ToggleModState(KMOD_NUM, (status & (1 << 2)) == 0); - SDL_ToggleModState(KMOD_CAPS, (status & (1 << 4)) == 0); - SDL_ToggleModState(KMOD_SCROLL, (status & (1 << 1)) != 0); - + SDL_ToggleModState(KMOD_NUM, (status & (1 << 2)) ? SDL_FALSE : SDL_TRUE); + SDL_ToggleModState(KMOD_CAPS, (status & (1 << 4)) ? SDL_FALSE : SDL_TRUE); + SDL_ToggleModState(KMOD_SCROLL, (status & (1 << 1)) ? SDL_TRUE : SDL_FALSE); + _kernel_swi(OS_Mouse, ®s, ®s); driverdata->last_mouse_buttons = regs.r[2]; @@ -165,15 +162,13 @@ RISCOS_InitEvents(_THIS) return 0; } -void -RISCOS_PumpEvents(_THIS) +void RISCOS_PumpEvents(_THIS) { RISCOS_PollMouse(_this); RISCOS_PollKeyboard(_this); } -void -RISCOS_QuitEvents(_THIS) +void RISCOS_QuitEvents(_THIS) { /* Re-enable escape. */ _kernel_osbyte(229, 0, 0); diff --git a/modules/SDL2/src/video/riscos/SDL_riscosframebuffer.c b/modules/SDL2/src/video/riscos/SDL_riscosframebuffer.c index ba7a760..36ce340 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosframebuffer.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosframebuffer.c @@ -30,15 +30,18 @@ #include #include -int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { - SDL_WindowData *driverdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; const char *sprite_name = "display"; unsigned int sprite_mode; _kernel_oserror *error; _kernel_swi_regs regs; SDL_DisplayMode mode; int size; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); /* Free the old framebuffer surface */ RISCOS_DestroyWindowFramebuffer(_this, window); @@ -54,27 +57,27 @@ int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, } /* Calculate pitch */ - *pitch = (((window->w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); + *pitch = (((w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); /* Allocate the sprite area */ - size = sizeof(sprite_area) + sizeof(sprite_header) + ((*pitch) * window->h); + size = sizeof(sprite_area) + sizeof(sprite_header) + ((*pitch) * h); driverdata->fb_area = SDL_malloc(size); if (!driverdata->fb_area) { return SDL_OutOfMemory(); } - driverdata->fb_area->size = size; + driverdata->fb_area->size = size; driverdata->fb_area->count = 0; driverdata->fb_area->start = 16; - driverdata->fb_area->end = 16; + driverdata->fb_area->end = 16; /* Create the actual image */ - regs.r[0] = 256+15; + regs.r[0] = 256 + 15; regs.r[1] = (int)driverdata->fb_area; regs.r[2] = (int)sprite_name; regs.r[3] = 0; - regs.r[4] = window->w; - regs.r[5] = window->h; + regs.r[4] = w; + regs.r[5] = h; regs.r[6] = sprite_mode; error = _kernel_swi(OS_SpriteOp, ®s, ®s); if (error != NULL) { @@ -88,13 +91,13 @@ int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, return 0; } -int RISCOS_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int RISCOS_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { - SDL_WindowData *driverdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; _kernel_swi_regs regs; _kernel_oserror *error; - regs.r[0] = 512+52; + regs.r[0] = 512 + 52; regs.r[1] = (int)driverdata->fb_area; regs.r[2] = (int)driverdata->fb_sprite; regs.r[3] = 0; /* window->x << 1; */ @@ -110,9 +113,9 @@ int RISCOS_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * return 0; } -void RISCOS_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void RISCOS_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { - SDL_WindowData *driverdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; if (driverdata->fb_area) { SDL_free(driverdata->fb_area); diff --git a/modules/SDL2/src/video/riscos/SDL_riscosframebuffer_c.h b/modules/SDL2/src/video/riscos/SDL_riscosframebuffer_c.h index c9dfaf7..3c304ab 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosframebuffer_c.h +++ b/modules/SDL2/src/video/riscos/SDL_riscosframebuffer_c.h @@ -24,9 +24,9 @@ #include "../../SDL_internal.h" -extern int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int RISCOS_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void RISCOS_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int RISCOS_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int RISCOS_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void RISCOS_DestroyWindowFramebuffer(_THIS, SDL_Window *window); #endif /* SDL_riscosframebuffer_c_h_ */ diff --git a/modules/SDL2/src/video/riscos/SDL_riscosmessagebox.c b/modules/SDL2/src/video/riscos/SDL_riscosmessagebox.c index 95f92f1..c2fe81b 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosmessagebox.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosmessagebox.c @@ -28,8 +28,7 @@ #include #include -int -RISCOS_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int RISCOS_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { _kernel_swi_regs regs; _kernel_oserror error; @@ -41,19 +40,22 @@ RISCOS_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) regs.r[0] = (unsigned int)&error; regs.r[1] = (1 << 8) | (1 << 4); - if (messageboxdata->flags == SDL_MESSAGEBOX_INFORMATION) + if (messageboxdata->flags == SDL_MESSAGEBOX_INFORMATION) { regs.r[1] |= (1 << 9); - else if (messageboxdata->flags == SDL_MESSAGEBOX_WARNING) + } else if (messageboxdata->flags == SDL_MESSAGEBOX_WARNING) { regs.r[1] |= (2 << 9); + } + regs.r[2] = (unsigned int)messageboxdata->title; regs.r[3] = 0; regs.r[4] = 0; - SDL_strlcpy(buttonstring, "" , 1024); + SDL_strlcpy(buttonstring, "", 1024); for (i = 0; i < messageboxdata->numbuttons; i++) { SDL_strlcat(buttonstring, messageboxdata->buttons[i].text, 1024); - if (i + 1 < messageboxdata->numbuttons) + if (i + 1 < messageboxdata->numbuttons) { SDL_strlcat(buttonstring, ",", 1024); + } } regs.r[5] = (unsigned int)buttonstring; diff --git a/modules/SDL2/src/video/riscos/SDL_riscosmodes.c b/modules/SDL2/src/video/riscos/SDL_riscosmodes.c index 797dc02..35a42e3 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosmodes.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosmodes.c @@ -31,7 +31,8 @@ #include #include -enum { +enum +{ MODE_FLAG_565 = 1 << 7, MODE_FLAG_COLOUR_SPACE = 0xF << 12, @@ -42,7 +43,8 @@ enum { MODE_FLAG_ARGB = MODE_FLAG_TRGB | MODE_FLAG_ABGR }; -static const struct { +static const struct +{ SDL_PixelFormatEnum pixel_format; int modeflags, ncolour, log2bpp; } mode_to_pixelformat[] = { @@ -50,33 +52,32 @@ static const struct { /* { SDL_PIXELFORMAT_INDEX2LSB, 0, 3, 1 }, */ /* { SDL_PIXELFORMAT_INDEX4LSB, 0, 15, 2 }, */ /* { SDL_PIXELFORMAT_INDEX8, MODE_FLAG_565, 255, 3 }, */ - { SDL_PIXELFORMAT_XBGR1555, MODE_FLAG_TBGR, 65535, 4 }, - { SDL_PIXELFORMAT_XRGB1555, MODE_FLAG_TRGB, 65535, 4 }, - { SDL_PIXELFORMAT_ABGR1555, MODE_FLAG_ABGR, 65535, 4 }, - { SDL_PIXELFORMAT_ARGB1555, MODE_FLAG_ARGB, 65535, 4 }, - { SDL_PIXELFORMAT_XBGR4444, MODE_FLAG_TBGR, 4095, 4 }, - { SDL_PIXELFORMAT_XRGB4444, MODE_FLAG_TRGB, 4095, 4 }, - { SDL_PIXELFORMAT_ABGR4444, MODE_FLAG_ABGR, 4095, 4 }, - { SDL_PIXELFORMAT_ARGB4444, MODE_FLAG_ARGB, 4095, 4 }, - { SDL_PIXELFORMAT_BGR565, MODE_FLAG_TBGR | MODE_FLAG_565, 65535, 4 }, - { SDL_PIXELFORMAT_RGB565, MODE_FLAG_TRGB | MODE_FLAG_565, 65535, 4 }, - { SDL_PIXELFORMAT_BGR24, MODE_FLAG_TBGR, 16777215, 6 }, - { SDL_PIXELFORMAT_RGB24, MODE_FLAG_TRGB, 16777215, 6 }, - { SDL_PIXELFORMAT_XBGR8888, MODE_FLAG_TBGR, -1, 5 }, - { SDL_PIXELFORMAT_XRGB8888, MODE_FLAG_TRGB, -1, 5 }, - { SDL_PIXELFORMAT_ABGR8888, MODE_FLAG_ABGR, -1, 5 }, - { SDL_PIXELFORMAT_ARGB8888, MODE_FLAG_ARGB, -1, 5 } + { SDL_PIXELFORMAT_XBGR1555, MODE_FLAG_TBGR, 65535, 4 }, + { SDL_PIXELFORMAT_XRGB1555, MODE_FLAG_TRGB, 65535, 4 }, + { SDL_PIXELFORMAT_ABGR1555, MODE_FLAG_ABGR, 65535, 4 }, + { SDL_PIXELFORMAT_ARGB1555, MODE_FLAG_ARGB, 65535, 4 }, + { SDL_PIXELFORMAT_XBGR4444, MODE_FLAG_TBGR, 4095, 4 }, + { SDL_PIXELFORMAT_XRGB4444, MODE_FLAG_TRGB, 4095, 4 }, + { SDL_PIXELFORMAT_ABGR4444, MODE_FLAG_ABGR, 4095, 4 }, + { SDL_PIXELFORMAT_ARGB4444, MODE_FLAG_ARGB, 4095, 4 }, + { SDL_PIXELFORMAT_BGR565, MODE_FLAG_TBGR | MODE_FLAG_565, 65535, 4 }, + { SDL_PIXELFORMAT_RGB565, MODE_FLAG_TRGB | MODE_FLAG_565, 65535, 4 }, + { SDL_PIXELFORMAT_BGR24, MODE_FLAG_TBGR, 16777215, 6 }, + { SDL_PIXELFORMAT_RGB24, MODE_FLAG_TRGB, 16777215, 6 }, + { SDL_PIXELFORMAT_XBGR8888, MODE_FLAG_TBGR, -1, 5 }, + { SDL_PIXELFORMAT_XRGB8888, MODE_FLAG_TRGB, -1, 5 }, + { SDL_PIXELFORMAT_ABGR8888, MODE_FLAG_ABGR, -1, 5 }, + { SDL_PIXELFORMAT_ARGB8888, MODE_FLAG_ARGB, -1, 5 } }; -static SDL_PixelFormatEnum -RISCOS_ModeToPixelFormat(int ncolour, int modeflags, int log2bpp) +static SDL_PixelFormatEnum RISCOS_ModeToPixelFormat(int ncolour, int modeflags, int log2bpp) { int i; for (i = 0; i < SDL_arraysize(mode_to_pixelformat); i++) { if (log2bpp == mode_to_pixelformat[i].log2bpp && - (ncolour == mode_to_pixelformat[i].ncolour || ncolour == 0) && - (modeflags & (MODE_FLAG_565 | MODE_FLAG_COLOUR_SPACE)) == mode_to_pixelformat[i].modeflags) { + (ncolour == mode_to_pixelformat[i].ncolour || ncolour == 0) && + (modeflags & (MODE_FLAG_565 | MODE_FLAG_COLOUR_SPACE)) == mode_to_pixelformat[i].modeflags) { return mode_to_pixelformat[i].pixel_format; } } @@ -84,11 +85,10 @@ RISCOS_ModeToPixelFormat(int ncolour, int modeflags, int log2bpp) return SDL_PIXELFORMAT_UNKNOWN; } -static size_t -measure_mode_block(const int *block) +static size_t measure_mode_block(const int *block) { size_t blockSize = ((block[0] & 0xFF) == 3) ? 7 : 5; - while(block[blockSize] != -1) { + while (block[blockSize] != -1) { blockSize += 2; } blockSize++; @@ -96,8 +96,7 @@ measure_mode_block(const int *block) return blockSize * 4; } -static int -read_mode_variable(int *block, int var) +static int read_mode_variable(int *block, int var) { _kernel_swi_regs regs; regs.r[0] = (int)block; @@ -106,8 +105,7 @@ read_mode_variable(int *block, int var) return regs.r[2]; } -static SDL_bool -read_mode_block(int *block, SDL_DisplayMode *mode, SDL_bool extended) +static SDL_bool read_mode_block(int *block, SDL_DisplayMode *mode, SDL_bool extended) { int xres, yres, ncolour, modeflags, log2bpp, rate; @@ -145,8 +143,7 @@ read_mode_block(int *block, SDL_DisplayMode *mode, SDL_bool extended) return SDL_TRUE; } -static void * -convert_mode_block(const int *block) +static void *convert_mode_block(const int *block) { int xres, yres, log2bpp, rate, ncolour = 0, modeflags = 0; size_t pos = 0; @@ -169,7 +166,7 @@ convert_mode_block(const int *block) } dst = SDL_malloc(40); - if (!dst) { + if (dst == NULL) { return NULL; } @@ -191,8 +188,7 @@ convert_mode_block(const int *block) return dst; } -static void * -copy_memory(const void *src, size_t size, size_t alloc) +static void *copy_memory(const void *src, size_t size, size_t alloc) { void *dst = SDL_malloc(alloc); if (dst) { @@ -201,8 +197,7 @@ copy_memory(const void *src, size_t size, size_t alloc) return dst; } -int -RISCOS_InitModes(_THIS) +int RISCOS_InitModes(_THIS) { SDL_DisplayMode mode; int *current_mode; @@ -230,8 +225,7 @@ RISCOS_InitModes(_THIS) return SDL_AddBasicVideoDisplay(&mode); } -void -RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { SDL_DisplayMode mode; _kernel_swi_regs regs; @@ -249,7 +243,7 @@ RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } block = SDL_malloc(-regs.r[7]); - if (!block) { + if (block == NULL) { SDL_OutOfMemory(); return; } @@ -268,8 +262,9 @@ RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay * display) continue; } - if (mode.format == SDL_PIXELFORMAT_UNKNOWN) + if (mode.format == SDL_PIXELFORMAT_UNKNOWN) { continue; + } mode.driverdata = convert_mode_block(pos + 4); if (!mode.driverdata) { @@ -285,8 +280,7 @@ RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay * display) SDL_free(block); } -int -RISCOS_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int RISCOS_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { const char disable_cursor[] = { 23, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; _kernel_swi_regs regs; diff --git a/modules/SDL2/src/video/riscos/SDL_riscosmodes.h b/modules/SDL2/src/video/riscos/SDL_riscosmodes.h index 02341a9..7ff1f12 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosmodes.h +++ b/modules/SDL2/src/video/riscos/SDL_riscosmodes.h @@ -24,9 +24,9 @@ #define SDL_riscosmodes_h_ extern int RISCOS_InitModes(_THIS); -extern void RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -extern int RISCOS_SetDisplayMode(_THIS, SDL_VideoDisplay * display, - SDL_DisplayMode * mode); +extern void RISCOS_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +extern int RISCOS_SetDisplayMode(_THIS, SDL_VideoDisplay *display, + SDL_DisplayMode *mode); #endif /* SDL_riscosmodes_h_ */ diff --git a/modules/SDL2/src/video/riscos/SDL_riscosmouse.c b/modules/SDL2/src/video/riscos/SDL_riscosmouse.c index 088356a..e4c4222 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosmouse.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosmouse.c @@ -26,9 +26,7 @@ #include - -static SDL_Cursor * -RISCOS_CreateDefaultCursor() +static SDL_Cursor *RISCOS_CreateDefaultCursor() { SDL_Cursor *cursor; @@ -43,14 +41,12 @@ RISCOS_CreateDefaultCursor() return cursor; } -static void -RISCOS_FreeCursor(SDL_Cursor * cursor) +static void RISCOS_FreeCursor(SDL_Cursor *cursor) { SDL_free(cursor); } -static int -RISCOS_ShowCursor(SDL_Cursor * cursor) +static int RISCOS_ShowCursor(SDL_Cursor *cursor) { if (cursor) { /* Turn the mouse pointer on */ @@ -63,8 +59,7 @@ RISCOS_ShowCursor(SDL_Cursor * cursor) return 0; } -int -RISCOS_InitMouse(_THIS) +int RISCOS_InitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); diff --git a/modules/SDL2/src/video/riscos/SDL_riscosvideo.c b/modules/SDL2/src/video/riscos/SDL_riscosvideo.c index 280c4b8..05c7d92 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscosvideo.c +++ b/modules/SDL2/src/video/riscos/SDL_riscosvideo.c @@ -43,28 +43,26 @@ static void RISCOS_VideoQuit(_THIS); /* RISC OS driver bootstrap functions */ -static void -RISCOS_DeleteDevice(SDL_VideoDevice * device) +static void RISCOS_DeleteDevice(SDL_VideoDevice *device) { SDL_free(device->driverdata); SDL_free(device); } -static SDL_VideoDevice * -RISCOS_CreateDevice(void) +static SDL_VideoDevice *RISCOS_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *phdata; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } /* Initialize internal data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (phdata == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -99,8 +97,7 @@ VideoBootStrap RISCOS_bootstrap = { RISCOS_CreateDevice }; -static int -RISCOS_VideoInit(_THIS) +static int RISCOS_VideoInit(_THIS) { if (RISCOS_InitEvents(_this) < 0) { return -1; @@ -118,8 +115,7 @@ RISCOS_VideoInit(_THIS) return 0; } -static void -RISCOS_VideoQuit(_THIS) +static void RISCOS_VideoQuit(_THIS) { RISCOS_QuitEvents(_this); } diff --git a/modules/SDL2/src/video/riscos/SDL_riscoswindow.c b/modules/SDL2/src/video/riscos/SDL_riscoswindow.c index 950fe6a..cf8e71d 100644 --- a/modules/SDL2/src/video/riscos/SDL_riscoswindow.c +++ b/modules/SDL2/src/video/riscos/SDL_riscoswindow.c @@ -31,13 +31,12 @@ #include "SDL_riscosvideo.h" #include "SDL_riscoswindow.h" -int -RISCOS_CreateWindow(_THIS, SDL_Window * window) +int RISCOS_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *driverdata; - driverdata = (SDL_WindowData *) SDL_calloc(1, sizeof(*driverdata)); - if (!driverdata) { + driverdata = (SDL_WindowData *)SDL_calloc(1, sizeof(*driverdata)); + if (driverdata == NULL) { return SDL_OutOfMemory(); } driverdata->window = window; @@ -51,20 +50,19 @@ RISCOS_CreateWindow(_THIS, SDL_Window * window) return 0; } -void -RISCOS_DestroyWindow(_THIS, SDL_Window * window) +void RISCOS_DestroyWindow(_THIS, SDL_Window *window) { - SDL_WindowData *driverdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; - if (!driverdata) + if (driverdata == NULL) { return; + } SDL_free(driverdata); window->driverdata = NULL; } -SDL_bool -RISCOS_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool RISCOS_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { if (info->version.major == SDL_MAJOR_VERSION) { info->subsystem = SDL_SYSWM_RISCOS; diff --git a/modules/SDL2/src/video/sdlgenblit.pl b/modules/SDL2/src/video/sdlgenblit.pl index 2d95795..8ea8966 100644 --- a/modules/SDL2/src/video/sdlgenblit.pl +++ b/modules/SDL2/src/video/sdlgenblit.pl @@ -392,17 +392,6 @@ __EOF__ ${d}B = ((${s}B * ${d}B) + (${d}B * (255 - ${s}A))) / 255; if (${d}B > 255) ${d}B = 255; __EOF__ } - if ( $dst_has_alpha ) { - if ($A_is_const_FF) { - print FILE <<__EOF__; - ${d}A = 0xFF; -__EOF__ - } else { - print FILE <<__EOF__; - ${d}A = ((${s}A * ${d}A) + (${d}A * (255 - ${s}A))) / 255; if (${d}A > 255) ${d}A = 255; -__EOF__ - } - } print FILE <<__EOF__; break; @@ -426,7 +415,7 @@ sub output_copyfunc my $dst_has_alpha = ($dst =~ /A/) ? 1 : 0; my $ignore_dst_alpha = !$dst_has_alpha && !$blend; - + my $src_has_alpha = ($src =~ /A/) ? 1 : 0; my $is_modulateA_done = 0; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitappdelegate.m b/modules/SDL2/src/video/uikit/SDL_uikitappdelegate.m index fb42d22..1e27200 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitappdelegate.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitappdelegate.m @@ -87,8 +87,7 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa #if !TARGET_OS_TV /* Load a launch image using the old UILaunchImageFile-era naming rules. */ -static UIImage * -SDL_LoadLaunchImageNamed(NSString *name, int screenh) +static UIImage *SDL_LoadLaunchImageNamed(NSString *name, int screenh) { UIInterfaceOrientation curorient = [UIApplication sharedApplication].statusBarOrientation; UIUserInterfaceIdiom idiom = [UIDevice currentDevice].userInterfaceIdiom; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitclipboard.m b/modules/SDL2/src/video/uikit/SDL_uikitclipboard.m index 7d04f0f..da475f3 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitclipboard.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitclipboard.m @@ -27,8 +27,7 @@ #import -int -UIKit_SetClipboardText(_THIS, const char *text) +int UIKit_SetClipboardText(_THIS, const char *text) { #if TARGET_OS_TV return SDL_SetError("The clipboard is not available on tvOS"); @@ -40,8 +39,7 @@ UIKit_SetClipboardText(_THIS, const char *text) #endif } -char * -UIKit_GetClipboardText(_THIS) +char *UIKit_GetClipboardText(_THIS) { #if TARGET_OS_TV return SDL_strdup(""); // Unsupported. @@ -59,8 +57,7 @@ UIKit_GetClipboardText(_THIS) #endif } -SDL_bool -UIKit_HasClipboardText(_THIS) +SDL_bool UIKit_HasClipboardText(_THIS) { @autoreleasepool { #if !TARGET_OS_TV @@ -72,8 +69,7 @@ UIKit_HasClipboardText(_THIS) } } -void -UIKit_InitClipboard(_THIS) +void UIKit_InitClipboard(_THIS) { #if !TARGET_OS_TV @autoreleasepool { @@ -92,8 +88,7 @@ UIKit_InitClipboard(_THIS) #endif } -void -UIKit_QuitClipboard(_THIS) +void UIKit_QuitClipboard(_THIS) { @autoreleasepool { SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitevents.m b/modules/SDL2/src/video/uikit/SDL_uikitevents.m index d4e3d05..68d38bc 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitevents.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitevents.m @@ -108,8 +108,7 @@ static BOOL UIKit_EventPumpEnabled = YES; @end -void -SDL_iPhoneSetEventPump(SDL_bool enabled) +void SDL_iPhoneSetEventPump(SDL_bool enabled) { UIKit_EventPumpEnabled = enabled; @@ -121,8 +120,7 @@ SDL_iPhoneSetEventPump(SDL_bool enabled) [lifecycleObserver eventPumpChanged]; } -void -UIKit_PumpEvents(_THIS) +void UIKit_PumpEvents(_THIS) { if (!UIKit_EventPumpEnabled) { return; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitmessagebox.m b/modules/SDL2/src/video/uikit/SDL_uikitmessagebox.m index b7bbe56..03e3f38 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitmessagebox.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitmessagebox.m @@ -30,14 +30,12 @@ static SDL_bool s_showingMessageBox = SDL_FALSE; -SDL_bool -UIKit_ShowingMessageBox(void) +SDL_bool UIKit_ShowingMessageBox(void) { return s_showingMessageBox; } -static void -UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *clickedindex) +static void UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *clickedindex) { *clickedindex = messageboxdata->numbuttons; @@ -52,8 +50,7 @@ UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *c } } -static BOOL -UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid) +static BOOL UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid) { int i; int __block clickedindex = messageboxdata->numbuttons; @@ -124,8 +121,7 @@ UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, in return YES; } -static void -UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue) +static void UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue) { @autoreleasepool { if (UIKit_ShowMessageBoxAlertController(messageboxdata, buttonid)) { @@ -135,8 +131,7 @@ UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid } }} -int -UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { @autoreleasepool { __block int returnValue = 0; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitmetalview.m b/modules/SDL2/src/video/uikit/SDL_uikitmetalview.m index 6cb40b3..6bb43ea 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitmetalview.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitmetalview.m @@ -1,15 +1,15 @@ /* Simple DirectMedia Layer Copyright (C) 1997-2023 Sam Lantinga - + This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be @@ -74,8 +74,7 @@ @end -SDL_MetalView -UIKit_Metal_CreateView(_THIS, SDL_Window * window) +SDL_MetalView UIKit_Metal_CreateView(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata; CGFloat scale = 1.0; @@ -92,13 +91,17 @@ UIKit_Metal_CreateView(_THIS, SDL_Window * window) metalview = [[SDL_uikitmetalview alloc] initWithFrame:data.uiwindow.bounds scale:scale]; + if (metalview == nil) { + SDL_OutOfMemory(); + return NULL; + } + [metalview setSDLWindow:window]; return (void*)CFBridgingRetain(metalview); }} -void -UIKit_Metal_DestroyView(_THIS, SDL_MetalView view) +void UIKit_Metal_DestroyView(_THIS, SDL_MetalView view) { @autoreleasepool { SDL_uikitmetalview *metalview = CFBridgingRelease(view); @@ -107,15 +110,13 @@ UIKit_Metal_DestroyView(_THIS, SDL_MetalView view) } }} -void * -UIKit_Metal_GetLayer(_THIS, SDL_MetalView view) +void *UIKit_Metal_GetLayer(_THIS, SDL_MetalView view) { @autoreleasepool { SDL_uikitview *uiview = (__bridge SDL_uikitview *)view; return (__bridge void *)uiview.layer; }} -void -UIKit_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) +void UIKit_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitmodes.m b/modules/SDL2/src/video/uikit/SDL_uikitmodes.m index 323dd51..e60bada 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitmodes.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitmodes.m @@ -215,9 +215,7 @@ @end -static int -UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode, - UIScreenMode * uiscreenmode) +static int UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode, UIScreenMode * uiscreenmode) { SDL_DisplayModeData *data = nil; @@ -236,8 +234,7 @@ UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode, return 0; } -static void -UIKit_FreeDisplayModeData(SDL_DisplayMode * mode) +static void UIKit_FreeDisplayModeData(SDL_DisplayMode * mode) { if (mode->driverdata != NULL) { CFRelease(mode->driverdata); @@ -245,8 +242,7 @@ UIKit_FreeDisplayModeData(SDL_DisplayMode * mode) } } -static NSUInteger -UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen) +static NSUInteger UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen) { #ifdef __IPHONE_10_3 if ([uiscreen respondsToSelector:@selector(maximumFramesPerSecond)]) { @@ -256,9 +252,7 @@ UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen) return 0; } -static int -UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h, - UIScreen * uiscreen, UIScreenMode * uiscreenmode) +static int UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen, UIScreenMode * uiscreenmode) { SDL_DisplayMode mode; SDL_zero(mode); @@ -280,9 +274,7 @@ UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h, } } -static int -UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen, - UIScreenMode * uiscreenmode, SDL_bool addRotation) +static int UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen, UIScreenMode * uiscreenmode, SDL_bool addRotation) { if (UIKit_AddSingleDisplayMode(display, w, h, uiscreen, uiscreenmode) < 0) { return -1; @@ -298,8 +290,7 @@ UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscre return 0; } -int -UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event) +int UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event) { UIScreenMode *uiscreenmode = uiscreen.currentMode; CGSize size = uiscreen.bounds.size; @@ -340,8 +331,7 @@ UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event) return 0; } -void -UIKit_DelDisplay(UIScreen *uiscreen) +void UIKit_DelDisplay(UIScreen *uiscreen) { int i; @@ -356,8 +346,7 @@ UIKit_DelDisplay(UIScreen *uiscreen) } } -SDL_bool -UIKit_IsDisplayLandscape(UIScreen *uiscreen) +SDL_bool UIKit_IsDisplayLandscape(UIScreen *uiscreen) { #if !TARGET_OS_TV if (uiscreen == [UIScreen mainScreen]) { @@ -370,8 +359,7 @@ UIKit_IsDisplayLandscape(UIScreen *uiscreen) } } -int -UIKit_InitModes(_THIS) +int UIKit_InitModes(_THIS) { @autoreleasepool { for (UIScreen *uiscreen in [UIScreen screens]) { @@ -389,8 +377,7 @@ UIKit_InitModes(_THIS) return 0; } -void -UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) { @autoreleasepool { SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata; @@ -434,8 +421,7 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } } -int -UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi) +int UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi) { @autoreleasepool { SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata; @@ -455,8 +441,7 @@ UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp return 0; } -int -UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { @autoreleasepool { SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata; @@ -485,8 +470,7 @@ UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) return 0; } -int -UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +int UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) { @autoreleasepool { int displayIndex = (int) (display - _this->displays); @@ -508,8 +492,7 @@ UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) return 0; } -void -UIKit_QuitModes(_THIS) +void UIKit_QuitModes(_THIS) { [SDL_DisplayWatch stop]; diff --git a/modules/SDL2/src/video/uikit/SDL_uikitopengles.m b/modules/SDL2/src/video/uikit/SDL_uikitopengles.m index 6bccaf4..e0e7b5b 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitopengles.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitopengles.m @@ -52,8 +52,7 @@ @end -void * -UIKit_GL_GetProcAddress(_THIS, const char *proc) +void *UIKit_GL_GetProcAddress(_THIS, const char *proc) { /* Look through all SO's for the proc symbol. Here's why: * -Looking for the path to the OpenGL Library seems not to work in the iOS Simulator. @@ -64,8 +63,7 @@ UIKit_GL_GetProcAddress(_THIS, const char *proc) /* note that SDL_GL_DeleteContext makes it current without passing the window */ -int -UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { @autoreleasepool { SDLEAGLContext *eaglcontext = (__bridge SDLEAGLContext *) context; @@ -82,8 +80,7 @@ UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) return 0; } -void -UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) +void UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata; @@ -102,8 +99,7 @@ UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h) } } -int -UIKit_GL_LoadLibrary(_THIS, const char *path) +int UIKit_GL_LoadLibrary(_THIS, const char *path) { /* We shouldn't pass a path to this function, since we've already loaded the * library. */ @@ -132,8 +128,7 @@ int UIKit_GL_SwapWindow(_THIS, SDL_Window * window) return 0; } -SDL_GLContext -UIKit_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window) { @autoreleasepool { SDLEAGLContext *context = nil; @@ -210,8 +205,7 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window) } } -void -UIKit_GL_DeleteContext(_THIS, SDL_GLContext context) +void UIKit_GL_DeleteContext(_THIS, SDL_GLContext context) { @autoreleasepool { /* The context was retained in SDL_GL_CreateContext, so we release it @@ -221,8 +215,7 @@ UIKit_GL_DeleteContext(_THIS, SDL_GLContext context) } } -void -UIKit_GL_RestoreCurrentContext(void) +void UIKit_GL_RestoreCurrentContext(void) { @autoreleasepool { /* Some iOS system functionality (such as Dictation on the on-screen diff --git a/modules/SDL2/src/video/uikit/SDL_uikitvideo.m b/modules/SDL2/src/video/uikit/SDL_uikitvideo.m index 64cff19..8b16c23 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitvideo.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitvideo.m @@ -60,8 +60,7 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device) } } -static SDL_VideoDevice * -UIKit_CreateDevice(void) +static SDL_VideoDevice *UIKit_CreateDevice(void) { @autoreleasepool { SDL_VideoDevice *device; @@ -152,8 +151,7 @@ VideoBootStrap UIKIT_bootstrap = { }; -int -UIKit_VideoInit(_THIS) +int UIKit_VideoInit(_THIS) { _this->gl_config.driver_loaded = 1; @@ -167,8 +165,7 @@ UIKit_VideoInit(_THIS) return 0; } -void -UIKit_VideoQuit(_THIS) +void UIKit_VideoQuit(_THIS) { SDL_QuitGCKeyboard(); SDL_QuitGCMouse(); @@ -176,8 +173,7 @@ UIKit_VideoQuit(_THIS) UIKit_QuitModes(_this); } -void -UIKit_SuspendScreenSaver(_THIS) +void UIKit_SuspendScreenSaver(_THIS) { @autoreleasepool { /* Ignore ScreenSaver API calls if the idle timer hint has been set. */ @@ -191,14 +187,12 @@ UIKit_SuspendScreenSaver(_THIS) } } -SDL_bool -UIKit_IsSystemVersionAtLeast(double version) +SDL_bool UIKit_IsSystemVersionAtLeast(double version) { return [[UIDevice currentDevice].systemVersion doubleValue] >= version; } -CGRect -UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen) +CGRect UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen) { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; CGRect frame = screen.bounds; @@ -220,7 +214,8 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen) * https://bugzilla.libsdl.org/show_bug.cgi?id=3465 * https://forums.developer.apple.com/thread/65337 */ UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation; - BOOL landscape = UIInterfaceOrientationIsLandscape(orient); + BOOL landscape = UIInterfaceOrientationIsLandscape(orient) || + !(UIKit_GetSupportedOrientations(window) & (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown)); BOOL fullscreen = CGRectEqualToRect(screen.bounds, frame); /* The orientation flip doesn't make sense when the window is smaller @@ -235,8 +230,7 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen) return frame; } -void -UIKit_ForceUpdateHomeIndicator() +void UIKit_ForceUpdateHomeIndicator() { #if !TARGET_OS_TV /* Force the main SDL window to re-evaluate home indicator state */ diff --git a/modules/SDL2/src/video/uikit/SDL_uikitview.m b/modules/SDL2/src/video/uikit/SDL_uikitview.m index d719b03..b9c3326 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitview.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitview.m @@ -231,7 +231,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; int i; for (i = 1; i <= MAX_MOUSE_BUTTONS; ++i) { - if ((event.buttonMask & SDL_BUTTON(i)) != 0) { + if (event.buttonMask & SDL_BUTTON(i)) { Uint8 button; switch (i) { @@ -286,7 +286,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; int i; for (i = 1; i <= MAX_MOUSE_BUTTONS; ++i) { - if ((event.buttonMask & SDL_BUTTON(i)) != 0) { + if (event.buttonMask & SDL_BUTTON(i)) { Uint8 button; switch (i) { @@ -412,7 +412,9 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; SDL_SendKeyboardKey(SDL_PRESSED, scancode); } } - [super pressesBegan:presses withEvent:event]; + if (SDL_IsTextInputActive()) { + [super pressesBegan:presses withEvent:event]; + } } - (void)pressesEnded:(NSSet *)presses withEvent:(UIPressesEvent *)event @@ -423,7 +425,9 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; SDL_SendKeyboardKey(SDL_RELEASED, scancode); } } - [super pressesEnded:presses withEvent:event]; + if (SDL_IsTextInputActive()) { + [super pressesEnded:presses withEvent:event]; + } } - (void)pressesCancelled:(NSSet *)presses withEvent:(UIPressesEvent *)event @@ -434,13 +438,17 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; SDL_SendKeyboardKey(SDL_RELEASED, scancode); } } - [super pressesCancelled:presses withEvent:event]; + if (SDL_IsTextInputActive()) { + [super pressesCancelled:presses withEvent:event]; + } } - (void)pressesChanged:(NSSet *)presses withEvent:(UIPressesEvent *)event { /* This is only called when the force of a press changes. */ - [super pressesChanged:presses withEvent:event]; + if (SDL_IsTextInputActive()) { + [super pressesChanged:presses withEvent:event]; + } } #endif /* TARGET_OS_TV || defined(__IPHONE_9_1) */ diff --git a/modules/SDL2/src/video/uikit/SDL_uikitviewcontroller.m b/modules/SDL2/src/video/uikit/SDL_uikitviewcontroller.m index a6b157f..b9ccf6b 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitviewcontroller.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitviewcontroller.m @@ -74,6 +74,7 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o UITextField *textField; BOOL hardwareKeyboard; BOOL showingKeyboard; + BOOL hidingKeyboard; BOOL rotatingOrientation; NSString *committedText; NSString *obligateForBackspace; @@ -91,6 +92,7 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o [self initKeyboard]; hardwareKeyboard = NO; showingKeyboard = NO; + hidingKeyboard = NO; rotatingOrientation = NO; #endif @@ -277,8 +279,22 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; #if !TARGET_OS_TV - [center addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; - [center addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; + [center addObserver:self + selector:@selector(keyboardWillShow:) + name:UIKeyboardWillShowNotification + object:nil]; + [center addObserver:self + selector:@selector(keyboardDidShow:) + name:UIKeyboardDidShowNotification + object:nil]; + [center addObserver:self + selector:@selector(keyboardWillHide:) + name:UIKeyboardWillHideNotification + object:nil]; + [center addObserver:self + selector:@selector(keyboardDidHide:) + name:UIKeyboardDidHideNotification + object:nil]; #endif [center addObserver:self selector:@selector(textFieldTextDidChange:) name:UITextFieldTextDidChangeNotification object:nil]; } @@ -341,8 +357,18 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o { NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; #if !TARGET_OS_TV - [center removeObserver:self name:UIKeyboardWillShowNotification object:nil]; - [center removeObserver:self name:UIKeyboardWillHideNotification object:nil]; + [center removeObserver:self + name:UIKeyboardWillShowNotification + object:nil]; + [center removeObserver:self + name:UIKeyboardDidShowNotification + object:nil]; + [center removeObserver:self + name:UIKeyboardWillHideNotification + object:nil]; + [center removeObserver:self + name:UIKeyboardDidHideNotification + object:nil]; #endif [center removeObserver:self name:UITextFieldTextDidChangeNotification object:nil]; } @@ -350,23 +376,40 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o /* reveal onscreen virtual keyboard */ - (void)showKeyboard { + if (keyboardVisible) { + return; + } + keyboardVisible = YES; if (textField.window) { showingKeyboard = YES; [textField becomeFirstResponder]; - showingKeyboard = NO; } } /* hide onscreen virtual keyboard */ - (void)hideKeyboard { + if (!keyboardVisible) { + return; + } + keyboardVisible = NO; - [textField resignFirstResponder]; + if (textField.window) { + hidingKeyboard = YES; + [textField resignFirstResponder]; + } } - (void)keyboardWillShow:(NSNotification *)notification { + BOOL shouldStartTextInput = NO; + + if (!SDL_IsTextInputActive() && !hidingKeyboard && !rotatingOrientation) { + shouldStartTextInput = YES; + } + + showingKeyboard = YES; #if !TARGET_OS_TV CGRect kbrect = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue]; @@ -376,14 +419,36 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o [self setKeyboardHeight:(int)kbrect.size.height]; #endif + + if (shouldStartTextInput) { + SDL_StartTextInput(); + } +} + +- (void)keyboardDidShow:(NSNotification *)notification +{ + showingKeyboard = NO; } - (void)keyboardWillHide:(NSNotification *)notification { - if (!showingKeyboard && !rotatingOrientation) { - SDL_StopTextInput(); + BOOL shouldStopTextInput = NO; + + if (SDL_IsTextInputActive() && !showingKeyboard && !rotatingOrientation) { + shouldStopTextInput = YES; } + + hidingKeyboard = YES; [self setKeyboardHeight:0]; + + if (shouldStopTextInput) { + SDL_StopTextInput(); + } +} + +- (void)keyboardDidHide:(NSNotification *)notification +{ + hidingKeyboard = NO; } - (void)textFieldTextDidChange:(NSNotification *)notification @@ -402,8 +467,8 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o size_t deleteLength = SDL_utf8strlen([[committedText substringFromIndex:matchLength] UTF8String]); while (deleteLength > 0) { /* Send distinct down and up events for each backspace action */ - SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_BACKSPACE); - SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_BACKSPACE); + SDL_SendVirtualKeyboardKey(SDL_PRESSED, SDL_SCANCODE_BACKSPACE); + SDL_SendVirtualKeyboardKey(SDL_RELEASED, SDL_SCANCODE_BACKSPACE); --deleteLength; } } @@ -488,8 +553,7 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o /* iPhone keyboard addition functions */ #if SDL_IPHONE_KEYBOARD -static SDL_uikitviewcontroller * -GetWindowViewController(SDL_Window * window) +static SDL_uikitviewcontroller *GetWindowViewController(SDL_Window * window) { if (!window || !window->driverdata) { SDL_SetError("Invalid window"); @@ -501,14 +565,12 @@ GetWindowViewController(SDL_Window * window) return data.viewcontroller; } -SDL_bool -UIKit_HasScreenKeyboardSupport(_THIS) +SDL_bool UIKit_HasScreenKeyboardSupport(_THIS) { return SDL_TRUE; } -void -UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window) +void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window) { @autoreleasepool { SDL_uikitviewcontroller *vc = GetWindowViewController(window); @@ -516,8 +578,7 @@ UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window) } } -void -UIKit_HideScreenKeyboard(_THIS, SDL_Window *window) +void UIKit_HideScreenKeyboard(_THIS, SDL_Window *window) { @autoreleasepool { SDL_uikitviewcontroller *vc = GetWindowViewController(window); @@ -525,8 +586,7 @@ UIKit_HideScreenKeyboard(_THIS, SDL_Window *window) } } -SDL_bool -UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window) +SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window) { @autoreleasepool { SDL_uikitviewcontroller *vc = GetWindowViewController(window); @@ -537,8 +597,7 @@ UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window) } } -void -UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect) +void UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect) { if (!rect) { SDL_InvalidParamError("rect"); diff --git a/modules/SDL2/src/video/uikit/SDL_uikitwindow.m b/modules/SDL2/src/video/uikit/SDL_uikitwindow.m index d2a465b..d696179 100644 --- a/modules/SDL2/src/video/uikit/SDL_uikitwindow.m +++ b/modules/SDL2/src/video/uikit/SDL_uikitwindow.m @@ -84,8 +84,7 @@ @end -static int -SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created) +static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayData *displaydata = (__bridge SDL_DisplayData *) display->driverdata; @@ -158,8 +157,7 @@ SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created) return 0; } -int -UIKit_CreateWindow(_THIS, SDL_Window *window) +int UIKit_CreateWindow(_THIS, SDL_Window *window) { @autoreleasepool { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); @@ -229,8 +227,7 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) return 1; } -void -UIKit_SetWindowTitle(_THIS, SDL_Window * window) +void UIKit_SetWindowTitle(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -238,8 +235,7 @@ UIKit_SetWindowTitle(_THIS, SDL_Window * window) } } -void -UIKit_ShowWindow(_THIS, SDL_Window * window) +void UIKit_ShowWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -255,8 +251,7 @@ UIKit_ShowWindow(_THIS, SDL_Window * window) } } -void -UIKit_HideWindow(_THIS, SDL_Window * window) +void UIKit_HideWindow(_THIS, SDL_Window * window) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -264,8 +259,7 @@ UIKit_HideWindow(_THIS, SDL_Window * window) } } -void -UIKit_RaiseWindow(_THIS, SDL_Window * window) +void UIKit_RaiseWindow(_THIS, SDL_Window * window) { /* We don't currently offer a concept of "raising" the SDL window, since * we only allow one per display, in the iOS fashion. @@ -274,8 +268,7 @@ UIKit_RaiseWindow(_THIS, SDL_Window * window) _this->GL_MakeCurrent(_this, _this->current_glwin, _this->current_glctx); } -static void -UIKit_UpdateWindowBorder(_THIS, SDL_Window * window) +static void UIKit_UpdateWindowBorder(_THIS, SDL_Window * window) { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; SDL_uikitviewcontroller *viewcontroller = data.viewcontroller; @@ -304,30 +297,26 @@ UIKit_UpdateWindowBorder(_THIS, SDL_Window * window) [viewcontroller.view layoutIfNeeded]; } -void -UIKit_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) +void UIKit_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) { @autoreleasepool { UIKit_UpdateWindowBorder(_this, window); } } -void -UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +void UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) { @autoreleasepool { UIKit_UpdateWindowBorder(_this, window); } } -void -UIKit_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void UIKit_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { /* There really isn't a concept of window grab or cursor confinement on iOS */ } -void -UIKit_UpdatePointerLock(_THIS, SDL_Window * window) +void UIKit_UpdatePointerLock(_THIS, SDL_Window * window) { #if !TARGET_OS_TV #if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 @@ -342,12 +331,11 @@ UIKit_UpdatePointerLock(_THIS, SDL_Window * window) #endif /* !TARGET_OS_TV */ } -void -UIKit_DestroyWindow(_THIS, SDL_Window * window) +void UIKit_DestroyWindow(_THIS, SDL_Window * window) { @autoreleasepool { if (window->driverdata != NULL) { - SDL_WindowData *data = (SDL_WindowData *) CFBridgingRelease(window->driverdata); + SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata; NSArray *views = nil; [data.viewcontroller stopAnimation]; @@ -366,13 +354,14 @@ UIKit_DestroyWindow(_THIS, SDL_Window * window) * SDL window. */ data.uiwindow.rootViewController = nil; data.uiwindow.hidden = YES; + + CFRelease(window->driverdata); + window->driverdata = NULL; } } - window->driverdata = NULL; } -void -UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) +void UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) { @autoreleasepool { SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata; @@ -390,8 +379,7 @@ UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) *h = size.height * scale; }} -SDL_bool -UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { @autoreleasepool { SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata; @@ -430,8 +418,7 @@ UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) } #if !TARGET_OS_TV -NSUInteger -UIKit_GetSupportedOrientations(SDL_Window * window) +NSUInteger UIKit_GetSupportedOrientations(SDL_Window * window) { const char *hint = SDL_GetHint(SDL_HINT_ORIENTATIONS); NSUInteger validOrientations = UIInterfaceOrientationMaskAll; @@ -497,8 +484,7 @@ UIKit_GetSupportedOrientations(SDL_Window * window) } #endif /* !TARGET_OS_TV */ -int -SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam) +int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam) { if (!window || !window->driverdata) { return SDL_SetError("Invalid window"); diff --git a/modules/SDL2/src/video/vita/SDL_vitaframebuffer.c b/modules/SDL2/src/video/vita/SDL_vitaframebuffer.c index fb727a2..43b657b 100644 --- a/modules/SDL2/src/video/vita/SDL_vitaframebuffer.c +++ b/modules/SDL2/src/video/vita/SDL_vitaframebuffer.c @@ -26,9 +26,9 @@ #include -#define SCREEN_W 960 -#define SCREEN_H 544 -#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +#define SCREEN_W 960 +#define SCREEN_H 544 +#define ALIGN(x, a) (((x) + ((a)-1)) & ~((a)-1)) #define DISPLAY_PIXEL_FORMAT SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 void *vita_gpu_alloc(unsigned int type, unsigned int size, SceUID *uid) @@ -36,18 +36,20 @@ void *vita_gpu_alloc(unsigned int type, unsigned int size, SceUID *uid) void *mem; if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW) { - size = ALIGN(size, 256*1024); + size = ALIGN(size, 256 * 1024); } else { - size = ALIGN(size, 4*1024); + size = ALIGN(size, 4 * 1024); } *uid = sceKernelAllocMemBlock("gpu_mem", type, size, NULL); - if (*uid < 0) + if (*uid < 0) { return NULL; + } - if (sceKernelGetMemBlockBase(*uid, &mem) < 0) + if (sceKernelGetMemBlockBase(*uid, &mem) < 0) { return NULL; + } return mem; } @@ -55,14 +57,15 @@ void *vita_gpu_alloc(unsigned int type, unsigned int size, SceUID *uid) void vita_gpu_free(SceUID uid) { void *mem = NULL; - if (sceKernelGetMemBlockBase(uid, &mem) < 0) + if (sceKernelGetMemBlockBase(uid, &mem) < 0) { return; + } sceKernelFreeMemBlock(uid); } -int VITA_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int VITA_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SceDisplayFrameBuf framebuf; *format = SDL_PIXELFORMAT_ABGR8888; @@ -71,19 +74,18 @@ int VITA_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, vo data->buffer = vita_gpu_alloc( SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, 4 * SCREEN_W * SCREEN_H, - &data->buffer_uid - ); + &data->buffer_uid); // SDL_memset the buffer to black - SDL_memset(data->buffer, 0x0, SCREEN_W*SCREEN_H*4); + SDL_memset(data->buffer, 0x0, SCREEN_W * SCREEN_H * 4); SDL_memset(&framebuf, 0x00, sizeof(SceDisplayFrameBuf)); - framebuf.size = sizeof(SceDisplayFrameBuf); - framebuf.base = data->buffer; - framebuf.pitch = SCREEN_W; + framebuf.size = sizeof(SceDisplayFrameBuf); + framebuf.base = data->buffer; + framebuf.pitch = SCREEN_W; framebuf.pixelformat = DISPLAY_PIXEL_FORMAT; - framebuf.width = SCREEN_W; - framebuf.height = SCREEN_H; + framebuf.width = SCREEN_W; + framebuf.height = SCREEN_H; sceDisplaySetFrameBuf(&framebuf, SCE_DISPLAY_SETBUF_NEXTFRAME); *pixels = data->buffer; @@ -91,17 +93,17 @@ int VITA_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, vo return 0; } -int VITA_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int VITA_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { // do nothing return 0; } -void VITA_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void VITA_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; - if (!data) { + if (data == NULL) { /* The window wasn't fully initialized */ return; } diff --git a/modules/SDL2/src/video/vita/SDL_vitaframebuffer.h b/modules/SDL2/src/video/vita/SDL_vitaframebuffer.h index c029683..8b0a53e 100644 --- a/modules/SDL2/src/video/vita/SDL_vitaframebuffer.h +++ b/modules/SDL2/src/video/vita/SDL_vitaframebuffer.h @@ -20,8 +20,8 @@ */ #include "../../SDL_internal.h" -extern int VITA_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int VITA_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void VITA_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int VITA_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int VITA_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void VITA_DestroyWindowFramebuffer(_THIS, SDL_Window *window); /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitagl_pvr.c b/modules/SDL2/src/video/vita/SDL_vitagl_pvr.c index 4d4a944..ea920ad 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagl_pvr.c +++ b/modules/SDL2/src/video/vita/SDL_vitagl_pvr.c @@ -45,20 +45,17 @@ void getFBSize(int *width, int *height) *height = FB_HEIGHT; } -int -VITA_GL_LoadLibrary(_THIS, const char *path) +int VITA_GL_LoadLibrary(_THIS, const char *path) { PVRSRV_PSP2_APPHINT hint; - char* override = SDL_getenv("VITA_MODULE_PATH"); - char* skip_init = SDL_getenv("VITA_PVR_SKIP_INIT"); - char* default_path = "app0:module"; + char *override = SDL_getenv("VITA_MODULE_PATH"); + char *skip_init = SDL_getenv("VITA_PVR_SKIP_INIT"); + char *default_path = "app0:module"; char target_path[MAX_PATH]; - if (skip_init == NULL) // we don't care about actual value - { - if (override != NULL) - { - default_path = override; + if (skip_init == NULL) { // we don't care about actual value + if (override != NULL) { + default_path = override; } sceKernelLoadStartModule("vs0:sys/external/libfios2.suprx", 0, NULL, 0, NULL, NULL); @@ -82,11 +79,10 @@ VITA_GL_LoadLibrary(_THIS, const char *path) PVRSRVCreateVirtualAppHint(&hint); } - return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) 0, 0); + return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType)0, 0); } -SDL_GLContext -VITA_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window *window) { char gl_version[3]; SDL_GLContext context = NULL; @@ -99,10 +95,9 @@ VITA_GL_CreateContext(_THIS, SDL_Window * window) _this->gl_config.minor_version = 0; _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; - context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); - if (context != NULL) - { + if (context != NULL) { FB_WIDTH = window->w; FB_HEIGHT = window->h; set_getprocaddress((void *(*)(const char *))eglGetProcAddress); @@ -121,8 +116,7 @@ VITA_GL_CreateContext(_THIS, SDL_Window * window) return context; } -void * -VITA_GL_GetProcAddress(_THIS, const char *proc) +void *VITA_GL_GetProcAddress(_THIS, const char *proc) { return gl4es_GetProcAddress(proc); } diff --git a/modules/SDL2/src/video/vita/SDL_vitagl_pvr_c.h b/modules/SDL2/src/video/vita/SDL_vitagl_pvr_c.h index 76488db..33ee642 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagl_pvr_c.h +++ b/modules/SDL2/src/video/vita/SDL_vitagl_pvr_c.h @@ -24,11 +24,10 @@ #include "SDL_vitavideo.h" -extern SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window * window); +extern SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window *window); extern int VITA_GL_LoadLibrary(_THIS, const char *path); extern void *VITA_GL_GetProcAddress(_THIS, const char *proc); - #endif /* SDL_vitagl_pvr_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitagles.c b/modules/SDL2/src/video/vita/SDL_vitagles.c index 9e476d5..89f29d3 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagles.c +++ b/modules/SDL2/src/video/vita/SDL_vitagles.c @@ -32,20 +32,19 @@ /*****************************************************************************/ /* SDL OpenGL/OpenGL ES functions */ /*****************************************************************************/ -#define EGLCHK(stmt) \ - do { \ - EGLint err; \ - \ - stmt; \ - err = eglGetError(); \ - if (err != EGL_SUCCESS) { \ - SDL_SetError("EGL error %d", err); \ - return 0; \ - } \ +#define EGLCHK(stmt) \ + do { \ + EGLint err; \ + \ + stmt; \ + err = eglGetError(); \ + if (err != EGL_SUCCESS) { \ + SDL_SetError("EGL error %d", err); \ + return 0; \ + } \ } while (0) -void -VITA_GLES_KeyboardCallback(ScePigletPreSwapData *data) +void VITA_GLES_KeyboardCallback(ScePigletPreSwapData *data) { SceCommonDialogUpdateParam commonDialogParam; SDL_zero(commonDialogParam); @@ -61,21 +60,18 @@ VITA_GLES_KeyboardCallback(ScePigletPreSwapData *data) sceCommonDialogUpdate(&commonDialogParam); } -int -VITA_GLES_LoadLibrary(_THIS, const char *path) +int VITA_GLES_LoadLibrary(_THIS, const char *path) { - pibInit(PIB_SHACCCG | PIB_GET_PROC_ADDR_CORE); - return 0; + pibInit(PIB_SHACCCG | PIB_GET_PROC_ADDR_CORE); + return 0; } -void * -VITA_GLES_GetProcAddress(_THIS, const char *proc) +void *VITA_GLES_GetProcAddress(_THIS, const char *proc) { return eglGetProcAddress(proc); } -void -VITA_GLES_UnloadLibrary(_THIS) +void VITA_GLES_UnloadLibrary(_THIS) { eglTerminate(_this->gl_data->display); } @@ -83,11 +79,10 @@ VITA_GLES_UnloadLibrary(_THIS) static EGLint width = 960; static EGLint height = 544; -SDL_GLContext -VITA_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window) { - SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata; EGLint attribs[32]; EGLDisplay display; @@ -138,13 +133,11 @@ VITA_GLES_CreateContext(_THIS, SDL_Window * window) EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); - if (num_configs == 0) - { + if (num_configs == 0) { SDL_SetError("No valid EGL configs for requested mode"); return 0; } - EGLCHK(surface = eglCreateWindowSurface(display, config, VITA_WINDOW_960X544, NULL)); EGLCHK(context = eglCreateContext(display, config, EGL_NO_CONTEXT, contextAttribs)); @@ -158,25 +151,22 @@ VITA_GLES_CreateContext(_THIS, SDL_Window * window) _this->gl_data->context = context; _this->gl_data->surface = surface; - preSwapCallback = (PFNEGLPIGLETVITASETPRESWAPCALLBACKSCEPROC) eglGetProcAddress("eglPigletVitaSetPreSwapCallbackSCE"); + preSwapCallback = (PFNEGLPIGLETVITASETPRESWAPCALLBACKSCEPROC)eglGetProcAddress("eglPigletVitaSetPreSwapCallbackSCE"); preSwapCallback(VITA_GLES_KeyboardCallback); return context; } -int -VITA_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int VITA_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { - if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, - _this->gl_data->surface, _this->gl_data->context)) - { - return SDL_SetError("Unable to make EGL context current"); - } + if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, + _this->gl_data->surface, _this->gl_data->context)) { + return SDL_SetError("Unable to make EGL context current"); + } return 0; } -int -VITA_GLES_SetSwapInterval(_THIS, int interval) +int VITA_GLES_SetSwapInterval(_THIS, int interval) { EGLBoolean status; status = eglSwapInterval(_this->gl_data->display, interval); @@ -189,14 +179,12 @@ VITA_GLES_SetSwapInterval(_THIS, int interval) return SDL_SetError("Unable to set the EGL swap interval"); } -int -VITA_GLES_GetSwapInterval(_THIS) +int VITA_GLES_GetSwapInterval(_THIS) { return _this->gl_data->swapinterval; } -int -VITA_GLES_SwapWindow(_THIS, SDL_Window * window) +int VITA_GLES_SwapWindow(_THIS, SDL_Window *window) { if (!eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface)) { return SDL_SetError("eglSwapBuffers() failed"); @@ -204,10 +192,9 @@ VITA_GLES_SwapWindow(_THIS, SDL_Window * window) return 0; } -void -VITA_GLES_DeleteContext(_THIS, SDL_GLContext context) +void VITA_GLES_DeleteContext(_THIS, SDL_GLContext context) { - SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *phdata = (SDL_VideoData *)_this->driverdata; EGLBoolean status; if (phdata->egl_initialized != SDL_TRUE) { diff --git a/modules/SDL2/src/video/vita/SDL_vitagles_c.h b/modules/SDL2/src/video/vita/SDL_vitagles_c.h index 216f1b9..4e4545b 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagles_c.h +++ b/modules/SDL2/src/video/vita/SDL_vitagles_c.h @@ -22,7 +22,6 @@ #ifndef SDL_vitagles_c_h_ #define SDL_vitagles_c_h_ - #include #include #include @@ -31,27 +30,26 @@ #include "SDL_vitavideo.h" - -typedef struct SDL_GLDriverData { - EGLDisplay display; - EGLContext context; - EGLSurface surface; +typedef struct SDL_GLDriverData +{ + EGLDisplay display; + EGLContext context; + EGLSurface surface; uint32_t swapinterval; -}SDL_GLDriverData; +} SDL_GLDriverData; -extern void * VITA_GLES_GetProcAddress(_THIS, const char *proc); -extern int VITA_GLES_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context); +extern void *VITA_GLES_GetProcAddress(_THIS, const char *proc); +extern int VITA_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern void VITA_GLES_SwapBuffers(_THIS); -extern int VITA_GLES_SwapWindow(_THIS, SDL_Window * window); -extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window * window); +extern int VITA_GLES_SwapWindow(_THIS, SDL_Window *window); +extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window); extern int VITA_GLES_LoadLibrary(_THIS, const char *path); extern void VITA_GLES_UnloadLibrary(_THIS); extern int VITA_GLES_SetSwapInterval(_THIS, int interval); extern int VITA_GLES_GetSwapInterval(_THIS); - #endif /* SDL_vitagles_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitagles_pvr.c b/modules/SDL2/src/video/vita/SDL_vitagles_pvr.c index 3493acd..711d1dd 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagles_pvr.c +++ b/modules/SDL2/src/video/vita/SDL_vitagles_pvr.c @@ -34,20 +34,18 @@ #define MAX_PATH 256 // vita limits are somehow wrong -int -VITA_GLES_LoadLibrary(_THIS, const char *path) +int VITA_GLES_LoadLibrary(_THIS, const char *path) { PVRSRV_PSP2_APPHINT hint; - char* override = SDL_getenv("VITA_MODULE_PATH"); - char* skip_init = SDL_getenv("VITA_PVR_SKIP_INIT"); - char* default_path = "app0:module"; + char *override = SDL_getenv("VITA_MODULE_PATH"); + char *skip_init = SDL_getenv("VITA_PVR_SKIP_INIT"); + char *default_path = "app0:module"; char target_path[MAX_PATH]; - if (skip_init == NULL) // we don't care about actual value - { - if (override != NULL) - { - default_path = override; + if (skip_init == NULL) { // we don't care about actual value + + if (override != NULL) { + default_path = override; } sceKernelLoadStartModule("vs0:sys/external/libfios2.suprx", 0, NULL, 0, NULL, NULL); @@ -68,36 +66,32 @@ VITA_GLES_LoadLibrary(_THIS, const char *path) PVRSRVCreateVirtualAppHint(&hint); } - return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) 0, 0); + return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType)0, 0); } -SDL_GLContext -VITA_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window) { - return SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + return SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); } -int -VITA_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int VITA_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { if (window && context) { - return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); + return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *)window->driverdata)->egl_surface, context); } else { return SDL_EGL_MakeCurrent(_this, NULL, NULL); } } -int -VITA_GLES_SwapWindow(_THIS, SDL_Window * window) +int VITA_GLES_SwapWindow(_THIS, SDL_Window *window) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; if (videodata->ime_active) { sceImeUpdate(); } - return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); } - #endif /* SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_VITA_PVR */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitagles_pvr_c.h b/modules/SDL2/src/video/vita/SDL_vitagles_pvr_c.h index 9d3d60a..6cf2fa4 100644 --- a/modules/SDL2/src/video/vita/SDL_vitagles_pvr_c.h +++ b/modules/SDL2/src/video/vita/SDL_vitagles_pvr_c.h @@ -24,12 +24,11 @@ #include "SDL_vitavideo.h" -extern int VITA_GLES_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context); -extern int VITA_GLES_SwapWindow(_THIS, SDL_Window * window); -extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window * window); +extern int VITA_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); +extern int VITA_GLES_SwapWindow(_THIS, SDL_Window *window); +extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window); extern int VITA_GLES_LoadLibrary(_THIS, const char *path); - #endif /* SDL_vitagles_pvr_c_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitakeyboard.c b/modules/SDL2/src/video/vita/SDL_vitakeyboard.c index 984a1b7..56be9e6 100644 --- a/modules/SDL2/src/video/vita/SDL_vitakeyboard.c +++ b/modules/SDL2/src/video/vita/SDL_vitakeyboard.c @@ -34,13 +34,12 @@ SceHidKeyboardReport k_reports[SCE_HID_MAX_REPORT]; int keyboard_hid_handle = 0; -Uint8 prev_keys[6] = {0}; +Uint8 prev_keys[6] = { 0 }; Uint8 prev_modifiers = 0; Uint8 locks = 0; Uint8 lock_key_down = 0; -void -VITA_InitKeyboard(void) +void VITA_InitKeyboard(void) { #if defined(SDL_VIDEO_VITA_PVR) sceSysmoduleLoadModule(SCE_SYSMODULE_IME); /** For PVR OSK Support **/ @@ -48,21 +47,19 @@ VITA_InitKeyboard(void) sceHidKeyboardEnumerate(&keyboard_hid_handle, 1); } -void -VITA_PollKeyboard(void) +void VITA_PollKeyboard(void) { // We skip polling keyboard if no window is created - if (Vita_Window == NULL) + if (Vita_Window == NULL) { return; + } - if (keyboard_hid_handle > 0) - { - int numReports = sceHidKeyboardRead(keyboard_hid_handle, (SceHidKeyboardReport**)&k_reports, SCE_HID_MAX_REPORT); + if (keyboard_hid_handle > 0) { + int numReports = sceHidKeyboardRead(keyboard_hid_handle, (SceHidKeyboardReport **)&k_reports, SCE_HID_MAX_REPORT); if (numReports < 0) { keyboard_hid_handle = 0; - } - else if (numReports) { + } else if (numReports) { // Numlock and Capslock state changes only on a SDL_PRESSED event // The k_report only reports the state of the LED if (k_reports[numReports - 1].modifiers[1] & 0x1) { @@ -70,8 +67,7 @@ VITA_PollKeyboard(void) SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_NUMLOCKCLEAR); locks |= 0x1; } - } - else { + } else { if (locks & 0x1) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_NUMLOCKCLEAR); SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_NUMLOCKCLEAR); @@ -85,8 +81,7 @@ VITA_PollKeyboard(void) SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_CAPSLOCK); locks |= 0x2; } - } - else { + } else { if (locks & 0x2) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_CAPSLOCK); SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_CAPSLOCK); @@ -100,8 +95,7 @@ VITA_PollKeyboard(void) SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_SCROLLLOCK); locks |= 0x4; } - } - else { + } else { if (locks & 0x4) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_SCROLLLOCK); locks &= ~0x4; @@ -114,64 +108,56 @@ VITA_PollKeyboard(void) if (changed_modifiers & 0x01) { if (prev_modifiers & 0x01) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LCTRL); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LCTRL); } } if (changed_modifiers & 0x02) { if (prev_modifiers & 0x02) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT); } } if (changed_modifiers & 0x04) { if (prev_modifiers & 0x04) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LALT); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LALT); } } if (changed_modifiers & 0x08) { if (prev_modifiers & 0x08) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LGUI); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LGUI); } } if (changed_modifiers & 0x10) { if (prev_modifiers & 0x10) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RCTRL); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RCTRL); } - } + } if (changed_modifiers & 0x20) { if (prev_modifiers & 0x20) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RSHIFT); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RSHIFT); } } if (changed_modifiers & 0x40) { if (prev_modifiers & 0x40) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RALT); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RALT); } } if (changed_modifiers & 0x80) { if (prev_modifiers & 0x80) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RGUI); - } - else { + } else { SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RGUI); } } diff --git a/modules/SDL2/src/video/vita/SDL_vitamessagebox.c b/modules/SDL2/src/video/vita/SDL_vitamessagebox.c index 2b7d327..3582713 100644 --- a/modules/SDL2/src/video/vita/SDL_vitamessagebox.c +++ b/modules/SDL2/src/video/vita/SDL_vitamessagebox.c @@ -43,8 +43,7 @@ int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) SceCommonDialogErrorCode init_result; SDL_bool setup_minimal_gxm = SDL_FALSE; - if (messageboxdata->numbuttons > 3) - { + if (messageboxdata->numbuttons > 3) { return -1; } @@ -55,23 +54,18 @@ int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) SDL_zero(msgParam); SDL_snprintf(message, sizeof(message), "%s\r\n\r\n%s", messageboxdata->title, messageboxdata->message); - msgParam.msg = (const SceChar8*)message; + msgParam.msg = (const SceChar8 *)message; SDL_zero(buttonParam); - if (messageboxdata->numbuttons == 3) - { + if (messageboxdata->numbuttons == 3) { msgParam.buttonType = SCE_MSG_DIALOG_BUTTON_TYPE_3BUTTONS; msgParam.buttonParam = &buttonParam; buttonParam.msg1 = messageboxdata->buttons[0].text; buttonParam.msg2 = messageboxdata->buttons[1].text; buttonParam.msg3 = messageboxdata->buttons[2].text; - } - else if (messageboxdata->numbuttons == 2) - { + } else if (messageboxdata->numbuttons == 2) { msgParam.buttonType = SCE_MSG_DIALOG_BUTTON_TYPE_YESNO; - } - else if (messageboxdata->numbuttons == 1) - { + } else if (messageboxdata->numbuttons == 1) { msgParam.buttonType = SCE_MSG_DIALOG_BUTTON_TYPE_OK; } param.userMsgParam = &msgParam; @@ -81,8 +75,7 @@ int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) init_result = sceMsgDialogInit(¶m); // Setup display if it hasn't been initialized before - if (init_result == SCE_COMMON_DIALOG_ERROR_GXM_IS_UNINITIALIZED) - { + if (init_result == SCE_COMMON_DIALOG_ERROR_GXM_IS_UNINITIALIZED) { gxm_minimal_init_for_common_dialog(); init_result = sceMsgDialogInit(¶m); setup_minimal_gxm = SDL_TRUE; @@ -90,50 +83,34 @@ int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) gxm_init_for_common_dialog(); - if (init_result >= 0) - { - while (sceMsgDialogGetStatus() == SCE_COMMON_DIALOG_STATUS_RUNNING) - { + if (init_result >= 0) { + while (sceMsgDialogGetStatus() == SCE_COMMON_DIALOG_STATUS_RUNNING) { gxm_swap_for_common_dialog(); } SDL_zero(dialog_result); sceMsgDialogGetResult(&dialog_result); - if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON1) - { + if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON1) { *buttonid = messageboxdata->buttons[0].buttonid; - } - else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON2) - { + } else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON2) { *buttonid = messageboxdata->buttons[1].buttonid; - } - else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON3) - { + } else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_BUTTON3) { *buttonid = messageboxdata->buttons[2].buttonid; - } - else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_YES) - { + } else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_YES) { *buttonid = messageboxdata->buttons[0].buttonid; - } - else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_NO) - { + } else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_NO) { *buttonid = messageboxdata->buttons[1].buttonid; - } - else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_OK) - { + } else if (dialog_result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_OK) { *buttonid = messageboxdata->buttons[0].buttonid; } sceMsgDialogTerm(); - } - else - { + } else { return -1; } gxm_term_for_common_dialog(); - if (setup_minimal_gxm) - { + if (setup_minimal_gxm) { gxm_minimal_term_for_common_dialog(); } diff --git a/modules/SDL2/src/video/vita/SDL_vitamouse.c b/modules/SDL2/src/video/vita/SDL_vitamouse.c index a5d017a..b14690f 100644 --- a/modules/SDL2/src/video/vita/SDL_vitamouse.c +++ b/modules/SDL2/src/video/vita/SDL_vitamouse.c @@ -37,26 +37,22 @@ SceHidMouseReport m_reports[SCE_HID_MAX_REPORT]; int mouse_hid_handle = 0; Uint8 prev_buttons = 0; -void -VITA_InitMouse(void) +void VITA_InitMouse(void) { sceHidMouseEnumerate(&mouse_hid_handle, 1); } -void -VITA_PollMouse(void) +void VITA_PollMouse(void) { // We skip polling mouse if no window is created - if (Vita_Window == NULL) + if (Vita_Window == NULL) { return; + } - if (mouse_hid_handle > 0) - { - int numReports = sceHidMouseRead(mouse_hid_handle, (SceHidMouseReport**)&m_reports, SCE_HID_MAX_REPORT); - if (numReports > 0) - { - for (int i = 0; i <= numReports - 1; i++) - { + if (mouse_hid_handle > 0) { + int numReports = sceHidMouseRead(mouse_hid_handle, (SceHidMouseReport **)&m_reports, SCE_HID_MAX_REPORT); + if (numReports > 0) { + for (int i = 0; i <= numReports - 1; i++) { Uint8 changed_buttons = m_reports[i].buttons ^ prev_buttons; if (changed_buttons & 0x1) { @@ -80,8 +76,7 @@ VITA_PollMouse(void) prev_buttons = m_reports[i].buttons; - if (m_reports[i].rel_x || m_reports[i].rel_y) - { + if (m_reports[i].rel_x || m_reports[i].rel_y) { SDL_SendMouseMotion(Vita_Window, 0, 1, m_reports[i].rel_x, m_reports[i].rel_y); } } diff --git a/modules/SDL2/src/video/vita/SDL_vitatouch.c b/modules/SDL2/src/video/vita/SDL_vitatouch.c index 4e57e2b..87939b3 100644 --- a/modules/SDL2/src/video/vita/SDL_vitatouch.c +++ b/modules/SDL2/src/video/vita/SDL_vitatouch.c @@ -37,16 +37,16 @@ SceTouchData touch[SCE_TOUCH_PORT_MAX_NUM]; SDL_FRect area_info[SCE_TOUCH_PORT_MAX_NUM]; -struct{ +struct +{ float min; float range; } force_info[SCE_TOUCH_PORT_MAX_NUM]; -char* disableFrontPoll = NULL; -char* disableBackPoll = NULL; +char *disableFrontPoll = NULL; +char *disableBackPoll = NULL; -void -VITA_InitTouch(void) +void VITA_InitTouch(void) { disableFrontPoll = SDL_getenv("VITA_DISABLE_TOUCH_FRONT"); disableBackPoll = SDL_getenv("VITA_DISABLE_TOUCH_BACK"); @@ -56,14 +56,14 @@ VITA_InitTouch(void) sceTouchEnableTouchForce(SCE_TOUCH_PORT_FRONT); sceTouchEnableTouchForce(SCE_TOUCH_PORT_BACK); - for(int port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) { + for (int port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) { SceTouchPanelInfo panelinfo; sceTouchGetPanelInfo(port, &panelinfo); - area_info[port].x = (float)panelinfo.minAaX; - area_info[port].y = (float)panelinfo.minAaY; - area_info[port].w = (float)(panelinfo.maxAaX - panelinfo.minAaX); - area_info[port].h = (float)(panelinfo.maxAaY - panelinfo.minAaY); + area_info[port].x = (float)panelinfo.minAaX; + area_info[port].y = (float)panelinfo.minAaY; + area_info[port].w = (float)(panelinfo.maxAaX - panelinfo.minAaX); + area_info[port].h = (float)(panelinfo.maxAaY - panelinfo.minAaY); force_info[port].min = (float)panelinfo.minForce; force_info[port].range = (float)(panelinfo.maxForce - panelinfo.minForce); @@ -71,36 +71,35 @@ VITA_InitTouch(void) // Support passing both front and back touch devices in events SDL_AddTouch((SDL_TouchID)0, SDL_TOUCH_DEVICE_DIRECT, "Front"); - SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back"); + SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back"); } -void -VITA_QuitTouch(void){ +void VITA_QuitTouch(void) +{ sceTouchDisableTouchForce(SCE_TOUCH_PORT_FRONT); sceTouchDisableTouchForce(SCE_TOUCH_PORT_BACK); } -void -VITA_PollTouch(void) +void VITA_PollTouch(void) { SDL_FingerID finger_id = 0; int port; // We skip polling touch if no window is created - if (Vita_Window == NULL) + if (Vita_Window == NULL) { return; + } SDL_memcpy(touch_old, touch, sizeof(touch_old)); - for(port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) { + for (port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) { /** Skip polling of Touch Device if environment variable is set **/ if (((port == 0) && disableFrontPoll) || ((port == 1) && disableBackPoll)) { continue; } sceTouchPeek(port, &touch[port], 1); if (touch[port].reportNum > 0) { - for (int i = 0; i < touch[port].reportNum; i++) - { + for (int i = 0; i < touch[port].reportNum; i++) { // adjust coordinates and forces to return normalized values // for the front, screen area is used as a reference (for direct touch) // e.g. touch_x = 1.0 corresponds to screen_x = 960 @@ -112,34 +111,34 @@ VITA_PollTouch(void) if (touch_old[port].reportNum > 0) { for (int j = 0; j < touch_old[port].reportNum; j++) { - if (touch[port].report[i].id == touch_old[port].report[j].id ) { + if (touch[port].report[i].id == touch_old[port].report[j].id) { finger_down = 1; } } } - + VITA_ConvertTouchXYToSDLXY(&x, &y, touch[port].report[i].x, touch[port].report[i].y, port); - finger_id = (SDL_FingerID) touch[port].report[i].id; + finger_id = (SDL_FingerID)touch[port].report[i].id; // Skip if finger was already previously down - if(!finger_down) { + if (!finger_down) { // Send an initial touch SDL_SendTouch((SDL_TouchID)port, - finger_id, - Vita_Window, - SDL_TRUE, - x, - y, - force); + finger_id, + Vita_Window, + SDL_TRUE, + x, + y, + force); } // Always send the motion SDL_SendTouchMotion((SDL_TouchID)port, - finger_id, - Vita_Window, - x, - y, - force); + finger_id, + Vita_Window, + x, + y, + force); } } @@ -149,7 +148,7 @@ VITA_PollTouch(void) int finger_up = 1; if (touch[port].reportNum > 0) { for (int j = 0; j < touch[port].reportNum; j++) { - if (touch[port].report[j].id == touch_old[port].report[i].id ) { + if (touch[port].report[j].id == touch_old[port].report[i].id) { finger_up = 0; } } @@ -159,22 +158,23 @@ VITA_PollTouch(void) float y = 0; float force = (touch_old[port].report[i].force - force_info[port].min) / force_info[port].range; VITA_ConvertTouchXYToSDLXY(&x, &y, touch_old[port].report[i].x, touch_old[port].report[i].y, port); - finger_id = (SDL_FingerID) touch_old[port].report[i].id; + finger_id = (SDL_FingerID)touch_old[port].report[i].id; // Finger released from screen SDL_SendTouch((SDL_TouchID)port, - finger_id, - Vita_Window, - SDL_FALSE, - x, - y, - force); + finger_id, + Vita_Window, + SDL_FALSE, + x, + y, + force); } } } } } -void VITA_ConvertTouchXYToSDLXY(float *sdl_x, float *sdl_y, int vita_x, int vita_y, int port) { +void VITA_ConvertTouchXYToSDLXY(float *sdl_x, float *sdl_y, int vita_x, int vita_y, int port) +{ float x = (vita_x - area_info[port].x) / area_info[port].w; float y = (vita_y - area_info[port].y) / area_info[port].h; @@ -188,7 +188,6 @@ void VITA_ConvertTouchXYToSDLXY(float *sdl_x, float *sdl_y, int vita_x, int vita *sdl_y = y; } - #endif /* SDL_VIDEO_DRIVER_VITA */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vita/SDL_vitavideo.c b/modules/SDL2/src/video/vita/SDL_vitavideo.c index ecfc523..9e82399 100644 --- a/modules/SDL2/src/video/vita/SDL_vitavideo.c +++ b/modules/SDL2/src/video/vita/SDL_vitavideo.c @@ -41,11 +41,11 @@ #include "SDL_vitaframebuffer.h" #if defined(SDL_VIDEO_VITA_PIB) - #include "SDL_vitagles_c.h" +#include "SDL_vitagles_c.h" #elif defined(SDL_VIDEO_VITA_PVR) - #include "SDL_vitagles_pvr_c.h" +#include "SDL_vitagles_pvr_c.h" #if defined(SDL_VIDEO_VITA_PVR_OGL) - #include "SDL_vitagl_pvr_c.h" +#include "SDL_vitagl_pvr_c.h" #endif #define VITA_GLES_GetProcAddress SDL_EGL_GetProcAddress #define VITA_GLES_UnloadLibrary SDL_EGL_UnloadLibrary @@ -56,20 +56,18 @@ SDL_Window *Vita_Window; -static void -VITA_Destroy(SDL_VideoDevice * device) +static void VITA_Destroy(SDL_VideoDevice *device) { -/* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ + /* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ SDL_free(device->driverdata); SDL_free(device); -// if (device->driverdata != NULL) { -// device->driverdata = NULL; -// } + // if (device->driverdata != NULL) { + // device->driverdata = NULL; + // } } -static SDL_VideoDevice * -VITA_Create() +static SDL_VideoDevice *VITA_Create() { SDL_VideoDevice *device; SDL_VideoData *phdata; @@ -77,14 +75,14 @@ VITA_Create() SDL_GLDriverData *gldata; #endif /* Initialize SDL_VideoDevice structure */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device == NULL) { SDL_OutOfMemory(); return NULL; } /* Initialize internal VITA specific data */ - phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (phdata == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -92,7 +90,7 @@ VITA_Create() } #if SDL_VIDEO_VITA_PIB - gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData)); + gldata = (SDL_GLDriverData *)SDL_calloc(1, sizeof(SDL_GLDriverData)); if (gldata == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -134,26 +132,26 @@ VITA_Create() device->DestroyWindow = VITA_DestroyWindow; device->GetWindowWMInfo = VITA_GetWindowWMInfo; -/* - // Disabled, causes issues on high-framerate updates. SDL still emulates this. - device->CreateWindowFramebuffer = VITA_CreateWindowFramebuffer; - device->UpdateWindowFramebuffer = VITA_UpdateWindowFramebuffer; - device->DestroyWindowFramebuffer = VITA_DestroyWindowFramebuffer; -*/ + /* + // Disabled, causes issues on high-framerate updates. SDL still emulates this. + device->CreateWindowFramebuffer = VITA_CreateWindowFramebuffer; + device->UpdateWindowFramebuffer = VITA_UpdateWindowFramebuffer; + device->DestroyWindowFramebuffer = VITA_DestroyWindowFramebuffer; + */ #if defined(SDL_VIDEO_VITA_PIB) || defined(SDL_VIDEO_VITA_PVR) #if defined(SDL_VIDEO_VITA_PVR_OGL) -if(SDL_getenv("VITA_PVR_OGL") != NULL) { - device->GL_LoadLibrary = VITA_GL_LoadLibrary; - device->GL_CreateContext = VITA_GL_CreateContext; - device->GL_GetProcAddress = VITA_GL_GetProcAddress; -} else { + if (SDL_getenv("VITA_PVR_OGL") != NULL) { + device->GL_LoadLibrary = VITA_GL_LoadLibrary; + device->GL_CreateContext = VITA_GL_CreateContext; + device->GL_GetProcAddress = VITA_GL_GetProcAddress; + } else { #endif - device->GL_LoadLibrary = VITA_GLES_LoadLibrary; - device->GL_CreateContext = VITA_GLES_CreateContext; - device->GL_GetProcAddress = VITA_GLES_GetProcAddress; + device->GL_LoadLibrary = VITA_GLES_LoadLibrary; + device->GL_CreateContext = VITA_GLES_CreateContext; + device->GL_GetProcAddress = VITA_GLES_GetProcAddress; #if defined(SDL_VIDEO_VITA_PVR_OGL) -} + } #endif device->GL_UnloadLibrary = VITA_GLES_UnloadLibrary; @@ -183,13 +181,12 @@ VideoBootStrap VITA_bootstrap = { /*****************************************************************************/ /* SDL Video and Display initialization/handling functions */ /*****************************************************************************/ -int -VITA_VideoInit(_THIS) +int VITA_VideoInit(_THIS) { SDL_VideoDisplay display; SDL_DisplayMode current_mode; #if defined(SDL_VIDEO_VITA_PVR) - char* res = SDL_getenv("VITA_RESOLUTION"); + char *res = SDL_getenv("VITA_RESOLUTION"); #endif SDL_zero(current_mode); @@ -234,26 +231,22 @@ VITA_VideoInit(_THIS) return 1; } -void -VITA_VideoQuit(_THIS) +void VITA_VideoQuit(_THIS) { VITA_QuitTouch(); } -void -VITA_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void VITA_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { SDL_AddDisplayMode(display, &display->current_mode); } -int -VITA_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int VITA_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -int -VITA_CreateWindow(_THIS, SDL_Window * window) +int VITA_CreateWindow(_THIS, SDL_Window *window) { SDL_WindowData *wdata; #if defined(SDL_VIDEO_VITA_PVR) @@ -264,7 +257,7 @@ VITA_CreateWindow(_THIS, SDL_Window * window) #endif /* Allocate window internal data */ - wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + wdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (wdata == NULL) { return SDL_OutOfMemory(); } @@ -273,8 +266,7 @@ VITA_CreateWindow(_THIS, SDL_Window * window) window->driverdata = wdata; // Vita can only have one window - if (Vita_Window != NULL) - { + if (Vita_Window != NULL) { return SDL_SetError("Only one window supported"); } @@ -297,27 +289,27 @@ VITA_CreateWindow(_THIS, SDL_Window * window) else { win.windowSize = PSP2_WINDOW_960X544; } - if ((window->flags & SDL_WINDOW_OPENGL) != 0) { - if(SDL_getenv("VITA_PVR_OGL") != NULL) { - /* Set version to 2.1 and PROFILE to ES */ - temp_major = _this->gl_config.major_version; - temp_minor = _this->gl_config.minor_version; - temp_profile = _this->gl_config.profile_mask; - - _this->gl_config.major_version = 2; - _this->gl_config.minor_version = 1; - _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; - } - wdata->egl_surface = SDL_EGL_CreateSurface(_this, &win); - if (wdata->egl_surface == EGL_NO_SURFACE) { - return SDL_SetError("Could not create GLES window surface"); - } - if(SDL_getenv("VITA_PVR_OGL") != NULL) { - /* Revert */ - _this->gl_config.major_version = temp_major; - _this->gl_config.minor_version = temp_minor; - _this->gl_config.profile_mask = temp_profile; - } + if (window->flags & SDL_WINDOW_OPENGL) { + if (SDL_getenv("VITA_PVR_OGL") != NULL) { + /* Set version to 2.1 and PROFILE to ES */ + temp_major = _this->gl_config.major_version; + temp_minor = _this->gl_config.minor_version; + temp_profile = _this->gl_config.profile_mask; + + _this->gl_config.major_version = 2; + _this->gl_config.minor_version = 1; + _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; + } + wdata->egl_surface = SDL_EGL_CreateSurface(_this, &win); + if (wdata->egl_surface == EGL_NO_SURFACE) { + return SDL_SetError("Could not create GLES window surface"); + } + if (SDL_getenv("VITA_PVR_OGL") != NULL) { + /* Revert */ + _this->gl_config.major_version = temp_major; + _this->gl_config.minor_version = temp_minor; + _this->gl_config.profile_mask = temp_profile; + } } #endif @@ -328,61 +320,48 @@ VITA_CreateWindow(_THIS, SDL_Window * window) return 0; } -int -VITA_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int VITA_CreateWindowFrom(_THIS, SDL_Window *window, const void *data) { return -1; } -void -VITA_SetWindowTitle(_THIS, SDL_Window * window) +void VITA_SetWindowTitle(_THIS, SDL_Window *window) { } -void -VITA_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void VITA_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { } -void -VITA_SetWindowPosition(_THIS, SDL_Window * window) +void VITA_SetWindowPosition(_THIS, SDL_Window *window) { } -void -VITA_SetWindowSize(_THIS, SDL_Window * window) +void VITA_SetWindowSize(_THIS, SDL_Window *window) { } -void -VITA_ShowWindow(_THIS, SDL_Window * window) +void VITA_ShowWindow(_THIS, SDL_Window *window) { } -void -VITA_HideWindow(_THIS, SDL_Window * window) +void VITA_HideWindow(_THIS, SDL_Window *window) { } -void -VITA_RaiseWindow(_THIS, SDL_Window * window) +void VITA_RaiseWindow(_THIS, SDL_Window *window) { } -void -VITA_MaximizeWindow(_THIS, SDL_Window * window) +void VITA_MaximizeWindow(_THIS, SDL_Window *window) { } -void -VITA_MinimizeWindow(_THIS, SDL_Window * window) +void VITA_MinimizeWindow(_THIS, SDL_Window *window) { } -void -VITA_RestoreWindow(_THIS, SDL_Window * window) +void VITA_RestoreWindow(_THIS, SDL_Window *window) { } -void -VITA_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void VITA_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { } -void -VITA_DestroyWindow(_THIS, SDL_Window * window) +void VITA_DestroyWindow(_THIS, SDL_Window *window) { -// SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; + // SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_WindowData *data; data = window->driverdata; @@ -398,8 +377,7 @@ VITA_DestroyWindow(_THIS, SDL_Window * window) /*****************************************************************************/ /* SDL Window Manager function */ /*****************************************************************************/ -SDL_bool -VITA_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool VITA_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) { if (info->version.major <= SDL_MAJOR_VERSION) { return SDL_TRUE; @@ -422,31 +400,32 @@ SDL_bool VITA_HasScreenKeyboardSupport(_THIS) #define SCE_IME_LANGUAGE_ENGLISH_US SCE_IME_LANGUAGE_ENGLISH #endif -static void utf16_to_utf8(const uint16_t *src, uint8_t *dst) { - int i; - for (i = 0; src[i]; i++) { - if ((src[i] & 0xFF80) == 0) { - *(dst++) = src[i] & 0xFF; - } else if((src[i] & 0xF800) == 0) { - *(dst++) = ((src[i] >> 6) & 0xFF) | 0xC0; - *(dst++) = (src[i] & 0x3F) | 0x80; - } else if((src[i] & 0xFC00) == 0xD800 && (src[i + 1] & 0xFC00) == 0xDC00) { - *(dst++) = (((src[i] + 64) >> 8) & 0x3) | 0xF0; - *(dst++) = (((src[i] >> 2) + 16) & 0x3F) | 0x80; - *(dst++) = ((src[i] >> 4) & 0x30) | 0x80 | ((src[i + 1] << 2) & 0xF); - *(dst++) = (src[i + 1] & 0x3F) | 0x80; - i += 1; - } else { - *(dst++) = ((src[i] >> 12) & 0xF) | 0xE0; - *(dst++) = ((src[i] >> 6) & 0x3F) | 0x80; - *(dst++) = (src[i] & 0x3F) | 0x80; +static void utf16_to_utf8(const uint16_t *src, uint8_t *dst) +{ + int i; + for (i = 0; src[i]; i++) { + if (!(src[i] & 0xFF80)) { + *(dst++) = src[i] & 0xFF; + } else if (!(src[i] & 0xF800)) { + *(dst++) = ((src[i] >> 6) & 0xFF) | 0xC0; + *(dst++) = (src[i] & 0x3F) | 0x80; + } else if ((src[i] & 0xFC00) == 0xD800 && (src[i + 1] & 0xFC00) == 0xDC00) { + *(dst++) = (((src[i] + 64) >> 8) & 0x3) | 0xF0; + *(dst++) = (((src[i] >> 2) + 16) & 0x3F) | 0x80; + *(dst++) = ((src[i] >> 4) & 0x30) | 0x80 | ((src[i + 1] << 2) & 0xF); + *(dst++) = (src[i + 1] & 0x3F) | 0x80; + i += 1; + } else { + *(dst++) = ((src[i] >> 12) & 0xF) | 0xE0; + *(dst++) = ((src[i] >> 6) & 0x3F) | 0x80; + *(dst++) = (src[i] & 0x3F) | 0x80; + } } - } - *dst = '\0'; + *dst = '\0'; } -#if defined (SDL_VIDEO_VITA_PVR) +#if defined(SDL_VIDEO_VITA_PVR) SceWChar16 libime_out[SCE_IME_MAX_PREEDIT_LENGTH + SCE_IME_MAX_TEXT_LENGTH + 1]; char libime_initval[8] = { 1 }; SceImeCaret caret_rev; @@ -461,15 +440,13 @@ void VITA_ImeEventHandler(void *arg, const SceImeEventData *e) if (e->param.text.caretIndex == 0) { SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_BACKSPACE); sceImeSetText((SceWChar16 *)libime_initval, 4); - } - else { + } else { scancode = SDL_GetScancodeFromKey(*(SceWChar16 *)&libime_out[1]); if (scancode == SDL_SCANCODE_SPACE) { SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_SPACE); - } - else { + } else { utf16_to_utf8((SceWChar16 *)&libime_out[1], utf8_buffer); - SDL_SendKeyboardText((const char*)utf8_buffer); + SDL_SendKeyboardText((const char *)utf8_buffer); } SDL_memset(&caret_rev, 0, sizeof(SceImeCaret)); SDL_memset(libime_out, 0, ((SCE_IME_MAX_PREEDIT_LENGTH + SCE_IME_MAX_TEXT_LENGTH + 1) * sizeof(SceWChar16))); @@ -557,13 +534,13 @@ void VITA_HideScreenKeyboard(_THIS, SDL_Window *window) SceCommonDialogStatus dialogStatus = sceImeDialogGetStatus(); switch (dialogStatus) { - default: - case SCE_COMMON_DIALOG_STATUS_NONE: - case SCE_COMMON_DIALOG_STATUS_RUNNING: - break; - case SCE_COMMON_DIALOG_STATUS_FINISHED: - sceImeDialogTerm(); - break; + default: + case SCE_COMMON_DIALOG_STATUS_NONE: + case SCE_COMMON_DIALOG_STATUS_RUNNING: + break; + case SCE_COMMON_DIALOG_STATUS_FINISHED: + sceImeDialogTerm(); + break; } videodata->ime_active = SDL_FALSE; @@ -577,7 +554,7 @@ SDL_bool VITA_IsScreenKeyboardShown(_THIS, SDL_Window *window) return videodata->ime_active; #else SceCommonDialogStatus dialogStatus = sceImeDialogGetStatus(); - return (dialogStatus == SCE_COMMON_DIALOG_STATUS_RUNNING); + return dialogStatus == SCE_COMMON_DIALOG_STATUS_RUNNING; #endif } @@ -600,7 +577,7 @@ void VITA_PumpEvents(_THIS) if (videodata->ime_active == SDL_TRUE) { // update IME status. Terminate, if finished SceCommonDialogStatus dialogStatus = sceImeDialogGetStatus(); - if (dialogStatus == SCE_COMMON_DIALOG_STATUS_FINISHED) { + if (dialogStatus == SCE_COMMON_DIALOG_STATUS_FINISHED) { uint8_t utf8_buffer[SCE_IME_DIALOG_MAX_TEXT_LENGTH]; SceImeDialogResult result; @@ -611,17 +588,17 @@ void VITA_PumpEvents(_THIS) utf16_to_utf8(videodata->ime_buffer, utf8_buffer); // Send SDL event - SDL_SendKeyboardText((const char*)utf8_buffer); + SDL_SendKeyboardText((const char *)utf8_buffer); // Send enter key only on enter - if (result.button == SCE_IME_DIALOG_BUTTON_ENTER) + if (result.button == SCE_IME_DIALOG_BUTTON_ENTER) { SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_RETURN); + } sceImeDialogTerm(); videodata->ime_active = SDL_FALSE; } - } #endif } @@ -629,4 +606,3 @@ void VITA_PumpEvents(_THIS) #endif /* SDL_VIDEO_DRIVER_VITA */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/vita/SDL_vitavideo.h b/modules/SDL2/src/video/vita/SDL_vitavideo.h index 98be3f5..bafee68 100644 --- a/modules/SDL2/src/video/vita/SDL_vitavideo.h +++ b/modules/SDL2/src/video/vita/SDL_vitavideo.h @@ -33,33 +33,30 @@ typedef struct SDL_VideoData { - SDL_bool egl_initialized; /* OpenGL device initialization status */ - uint32_t egl_refcount; /* OpenGL reference count */ + SDL_bool egl_initialized; /* OpenGL device initialization status */ + uint32_t egl_refcount; /* OpenGL reference count */ SceWChar16 ime_buffer[SCE_IME_DIALOG_MAX_TEXT_LENGTH]; SDL_bool ime_active; } SDL_VideoData; - typedef struct SDL_DisplayData { } SDL_DisplayData; - typedef struct SDL_WindowData { SDL_bool uses_gles; SceUID buffer_uid; - void* buffer; + void *buffer; #if defined(SDL_VIDEO_VITA_PVR) EGLSurface egl_surface; EGLContext egl_context; #endif } SDL_WindowData; -extern SDL_Window * Vita_Window; - +extern SDL_Window *Vita_Window; /****************************************************************************/ /* SDL_VideoDevice functions declaration */ @@ -68,22 +65,22 @@ extern SDL_Window * Vita_Window; /* Display and window functions */ int VITA_VideoInit(_THIS); void VITA_VideoQuit(_THIS); -void VITA_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -int VITA_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); -int VITA_CreateWindow(_THIS, SDL_Window * window); -int VITA_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); -void VITA_SetWindowTitle(_THIS, SDL_Window * window); -void VITA_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon); -void VITA_SetWindowPosition(_THIS, SDL_Window * window); -void VITA_SetWindowSize(_THIS, SDL_Window * window); -void VITA_ShowWindow(_THIS, SDL_Window * window); -void VITA_HideWindow(_THIS, SDL_Window * window); -void VITA_RaiseWindow(_THIS, SDL_Window * window); -void VITA_MaximizeWindow(_THIS, SDL_Window * window); -void VITA_MinimizeWindow(_THIS, SDL_Window * window); -void VITA_RestoreWindow(_THIS, SDL_Window * window); -void VITA_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed); -void VITA_DestroyWindow(_THIS, SDL_Window * window); +void VITA_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +int VITA_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); +int VITA_CreateWindow(_THIS, SDL_Window *window); +int VITA_CreateWindowFrom(_THIS, SDL_Window *window, const void *data); +void VITA_SetWindowTitle(_THIS, SDL_Window *window); +void VITA_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon); +void VITA_SetWindowPosition(_THIS, SDL_Window *window); +void VITA_SetWindowSize(_THIS, SDL_Window *window); +void VITA_ShowWindow(_THIS, SDL_Window *window); +void VITA_HideWindow(_THIS, SDL_Window *window); +void VITA_RaiseWindow(_THIS, SDL_Window *window); +void VITA_MaximizeWindow(_THIS, SDL_Window *window); +void VITA_MinimizeWindow(_THIS, SDL_Window *window); +void VITA_RestoreWindow(_THIS, SDL_Window *window); +void VITA_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed); +void VITA_DestroyWindow(_THIS, SDL_Window *window); /* Window manager function */ SDL_bool VITA_GetWindowWMInfo(_THIS, SDL_Window * window, @@ -93,7 +90,7 @@ SDL_bool VITA_GetWindowWMInfo(_THIS, SDL_Window * window, #if defined(SDL_VIDEO_VITA_PVR_OGL) /* OpenGL functions */ int VITA_GL_LoadLibrary(_THIS, const char *path); -SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window * window); +SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window *window); void *VITA_GL_GetProcAddress(_THIS, const char *proc); #endif @@ -101,11 +98,11 @@ void *VITA_GL_GetProcAddress(_THIS, const char *proc); int VITA_GLES_LoadLibrary(_THIS, const char *path); void *VITA_GLES_GetProcAddress(_THIS, const char *proc); void VITA_GLES_UnloadLibrary(_THIS); -SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window * window); -int VITA_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window); +int VITA_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); int VITA_GLES_SetSwapInterval(_THIS, int interval); int VITA_GLES_GetSwapInterval(_THIS); -int VITA_GLES_SwapWindow(_THIS, SDL_Window * window); +int VITA_GLES_SwapWindow(_THIS, SDL_Window *window); void VITA_GLES_DeleteContext(_THIS, SDL_GLContext context); #endif diff --git a/modules/SDL2/src/video/vivante/SDL_vivanteopengles.c b/modules/SDL2/src/video/vivante/SDL_vivanteopengles.c index e01e8e0..9d9c638 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivanteopengles.c +++ b/modules/SDL2/src/video/vivante/SDL_vivanteopengles.c @@ -27,8 +27,7 @@ /* EGL implementation of SDL OpenGL support */ -int -VIVANTE_GLES_LoadLibrary(_THIS, const char *path) +int VIVANTE_GLES_LoadLibrary(_THIS, const char *path) { SDL_DisplayData *displaydata; @@ -38,10 +37,9 @@ VIVANTE_GLES_LoadLibrary(_THIS, const char *path) } SDL_EGL_CreateContext_impl(VIVANTE) -SDL_EGL_SwapWindow_impl(VIVANTE) -SDL_EGL_MakeCurrent_impl(VIVANTE) + SDL_EGL_SwapWindow_impl(VIVANTE) + SDL_EGL_MakeCurrent_impl(VIVANTE) #endif /* SDL_VIDEO_DRIVER_VIVANTE && SDL_VIDEO_OPENGL_EGL */ -/* vi: set ts=4 sw=4 expandtab: */ - + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/vivante/SDL_vivanteopengles.h b/modules/SDL2/src/video/vivante/SDL_vivanteopengles.h index 12fc6c0..8e420a1 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivanteopengles.h +++ b/modules/SDL2/src/video/vivante/SDL_vivanteopengles.h @@ -34,12 +34,12 @@ #define VIVANTE_GLES_UnloadLibrary SDL_EGL_UnloadLibrary #define VIVANTE_GLES_SetSwapInterval SDL_EGL_SetSwapInterval #define VIVANTE_GLES_GetSwapInterval SDL_EGL_GetSwapInterval -#define VIVANTE_GLES_DeleteContext SDL_EGL_DeleteContext +#define VIVANTE_GLES_DeleteContext SDL_EGL_DeleteContext extern int VIVANTE_GLES_LoadLibrary(_THIS, const char *path); -extern SDL_GLContext VIVANTE_GLES_CreateContext(_THIS, SDL_Window * window); -extern int VIVANTE_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int VIVANTE_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern SDL_GLContext VIVANTE_GLES_CreateContext(_THIS, SDL_Window *window); +extern int VIVANTE_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int VIVANTE_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); #endif /* SDL_VIDEO_DRIVER_VIVANTE && SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/vivante/SDL_vivanteplatform.c b/modules/SDL2/src/video/vivante/SDL_vivanteplatform.c index 0f145ff..8d3aff3 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivanteplatform.c +++ b/modules/SDL2/src/video/vivante/SDL_vivanteplatform.c @@ -26,8 +26,7 @@ #ifdef VIVANTE_PLATFORM_GENERIC -int -VIVANTE_SetupPlatform(_THIS) +int VIVANTE_SetupPlatform(_THIS) { return 0; } @@ -37,13 +36,11 @@ char *VIVANTE_GetDisplayName(_THIS) return NULL; } -void -VIVANTE_UpdateDisplayScale(_THIS) +void VIVANTE_UpdateDisplayScale(_THIS) { } -void -VIVANTE_CleanupPlatform(_THIS) +void VIVANTE_CleanupPlatform(_THIS) { } diff --git a/modules/SDL2/src/video/vivante/SDL_vivantevideo.c b/modules/SDL2/src/video/vivante/SDL_vivantevideo.c index 7b5acc5..aaf645c 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivantevideo.c +++ b/modules/SDL2/src/video/vivante/SDL_vivantevideo.c @@ -39,9 +39,7 @@ #include "SDL_vivanteopengles.h" #include "SDL_vivantevulkan.h" - -static void -VIVANTE_Destroy(SDL_VideoDevice * device) +static void VIVANTE_Destroy(SDL_VideoDevice *device) { if (device->driverdata != NULL) { SDL_free(device->driverdata); @@ -49,21 +47,20 @@ VIVANTE_Destroy(SDL_VideoDevice * device) } } -static SDL_VideoDevice * -VIVANTE_Create() +static SDL_VideoDevice *VIVANTE_Create() { SDL_VideoDevice *device; SDL_VideoData *data; /* Initialize SDL_VideoDevice structure */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device == NULL) { SDL_OutOfMemory(); return NULL; } /* Initialize internal data */ - data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (data == NULL) { SDL_OutOfMemory(); SDL_free(device); @@ -126,8 +123,7 @@ VideoBootStrap VIVANTE_bootstrap = { /* SDL Video and Display initialization/handling functions */ /*****************************************************************************/ -static int -VIVANTE_AddVideoDisplays(_THIS) +static int VIVANTE_AddVideoDisplays(_THIS) { SDL_VideoData *videodata = _this->driverdata; SDL_VideoDisplay display; @@ -136,7 +132,7 @@ VIVANTE_AddVideoDisplays(_THIS) int pitch = 0, bpp = 0; unsigned long pixels = 0; - data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData)); + data = (SDL_DisplayData *)SDL_calloc(1, sizeof(SDL_DisplayData)); if (data == NULL) { return SDL_OutOfMemory(); } @@ -152,8 +148,7 @@ VIVANTE_AddVideoDisplays(_THIS) videodata->fbGetDisplayInfo(data->native_display, ¤t_mode.w, ¤t_mode.h, &pixels, &pitch, &bpp); #endif /* SDL_VIDEO_DRIVER_VIVANTE_VDK */ - switch (bpp) - { + switch (bpp) { default: /* Is another format used? */ case 32: current_mode.format = SDL_PIXELFORMAT_ARGB8888; @@ -174,8 +169,7 @@ VIVANTE_AddVideoDisplays(_THIS) return 0; } -int -VIVANTE_VideoInit(_THIS) +int VIVANTE_VideoInit(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; @@ -192,9 +186,10 @@ VIVANTE_VideoInit(_THIS) return -1; } } -#define LOAD_FUNC(NAME) \ +#define LOAD_FUNC(NAME) \ videodata->NAME = SDL_LoadFunction(videodata->egl_handle, #NAME); \ - if (!videodata->NAME) return -1; + if (!videodata->NAME) \ + return -1; LOAD_FUNC(fbGetDisplay); LOAD_FUNC(fbGetDisplayByIndex); @@ -226,8 +221,7 @@ VIVANTE_VideoInit(_THIS) return 0; } -void -VIVANTE_VideoQuit(_THIS) +void VIVANTE_VideoQuit(_THIS) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; @@ -250,21 +244,18 @@ VIVANTE_VideoQuit(_THIS) #endif } -void -VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { /* Only one display mode available, the current one */ SDL_AddDisplayMode(display, &display->current_mode); } -int -VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -int -VIVANTE_CreateWindow(_THIS, SDL_Window * window) +int VIVANTE_CreateWindow(_THIS, SDL_Window *window) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_DisplayData *displaydata; @@ -273,7 +264,7 @@ VIVANTE_CreateWindow(_THIS, SDL_Window * window) displaydata = SDL_GetDisplayDriverData(0); /* Allocate window internal data */ - data = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); + data = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); if (data == NULL) { return SDL_OutOfMemory(); } @@ -305,8 +296,7 @@ VIVANTE_CreateWindow(_THIS, SDL_Window * window) return 0; } -void -VIVANTE_DestroyWindow(_THIS, SDL_Window * window) +void VIVANTE_DestroyWindow(_THIS, SDL_Window *window) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_WindowData *data; @@ -332,8 +322,7 @@ VIVANTE_DestroyWindow(_THIS, SDL_Window * window) window->driverdata = NULL; } -void -VIVANTE_SetWindowTitle(_THIS, SDL_Window * window) +void VIVANTE_SetWindowTitle(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_VIVANTE_VDK SDL_WindowData *data = window->driverdata; @@ -341,20 +330,17 @@ VIVANTE_SetWindowTitle(_THIS, SDL_Window * window) #endif } -void -VIVANTE_SetWindowPosition(_THIS, SDL_Window * window) +void VIVANTE_SetWindowPosition(_THIS, SDL_Window *window) { /* FIXME */ } -void -VIVANTE_SetWindowSize(_THIS, SDL_Window * window) +void VIVANTE_SetWindowSize(_THIS, SDL_Window *window) { /* FIXME */ } -void -VIVANTE_ShowWindow(_THIS, SDL_Window * window) +void VIVANTE_ShowWindow(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_VIVANTE_VDK SDL_WindowData *data = window->driverdata; @@ -364,8 +350,7 @@ VIVANTE_ShowWindow(_THIS, SDL_Window * window) SDL_SetKeyboardFocus(window); } -void -VIVANTE_HideWindow(_THIS, SDL_Window * window) +void VIVANTE_HideWindow(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_VIVANTE_VDK SDL_WindowData *data = window->driverdata; @@ -376,10 +361,9 @@ VIVANTE_HideWindow(_THIS, SDL_Window * window) /*****************************************************************************/ /* SDL Window Manager function */ /*****************************************************************************/ -SDL_bool -VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) +SDL_bool VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0); if (info->version.major == SDL_MAJOR_VERSION) { diff --git a/modules/SDL2/src/video/vivante/SDL_vivantevideo.h b/modules/SDL2/src/video/vivante/SDL_vivantevideo.h index c53b80d..f68f0f9 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivantevideo.h +++ b/modules/SDL2/src/video/vivante/SDL_vivantevideo.h @@ -39,15 +39,15 @@ typedef struct SDL_VideoData vdkPrivate vdk_private; #else void *egl_handle; /* EGL shared library handle */ - EGLNativeDisplayType (EGLAPIENTRY *fbGetDisplay)(void *context); - EGLNativeDisplayType (EGLAPIENTRY *fbGetDisplayByIndex)(int DisplayIndex); - void (EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display, int *Width, int *Height); - void (EGLAPIENTRY *fbGetDisplayInfo)(EGLNativeDisplayType Display, int *Width, int *Height, unsigned long *Physical, int *Stride, int *BitsPerPixel); - void (EGLAPIENTRY *fbDestroyDisplay)(EGLNativeDisplayType Display); - EGLNativeWindowType (EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display, int X, int Y, int Width, int Height); - void (EGLAPIENTRY *fbGetWindowGeometry)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height); - void (EGLAPIENTRY *fbGetWindowInfo)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height, int *BitsPerPixel, unsigned int *Offset); - void (EGLAPIENTRY *fbDestroyWindow)(EGLNativeWindowType Window); + EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplay)(void *context); + EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplayByIndex)(int DisplayIndex); + void(EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display, int *Width, int *Height); + void(EGLAPIENTRY *fbGetDisplayInfo)(EGLNativeDisplayType Display, int *Width, int *Height, unsigned long *Physical, int *Stride, int *BitsPerPixel); + void(EGLAPIENTRY *fbDestroyDisplay)(EGLNativeDisplayType Display); + EGLNativeWindowType(EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display, int X, int Y, int Width, int Height); + void(EGLAPIENTRY *fbGetWindowGeometry)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height); + void(EGLAPIENTRY *fbGetWindowInfo)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height, int *BitsPerPixel, unsigned int *Offset); + void(EGLAPIENTRY *fbDestroyWindow)(EGLNativeWindowType Window); #endif } SDL_VideoData; @@ -69,15 +69,15 @@ typedef struct SDL_WindowData /* Display and window functions */ int VIVANTE_VideoInit(_THIS); void VIVANTE_VideoQuit(_THIS); -void VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -int VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); -int VIVANTE_CreateWindow(_THIS, SDL_Window * window); -void VIVANTE_SetWindowTitle(_THIS, SDL_Window * window); -void VIVANTE_SetWindowPosition(_THIS, SDL_Window * window); -void VIVANTE_SetWindowSize(_THIS, SDL_Window * window); -void VIVANTE_ShowWindow(_THIS, SDL_Window * window); -void VIVANTE_HideWindow(_THIS, SDL_Window * window); -void VIVANTE_DestroyWindow(_THIS, SDL_Window * window); +void VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +int VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); +int VIVANTE_CreateWindow(_THIS, SDL_Window *window); +void VIVANTE_SetWindowTitle(_THIS, SDL_Window *window); +void VIVANTE_SetWindowPosition(_THIS, SDL_Window *window); +void VIVANTE_SetWindowSize(_THIS, SDL_Window *window); +void VIVANTE_ShowWindow(_THIS, SDL_Window *window); +void VIVANTE_HideWindow(_THIS, SDL_Window *window); +void VIVANTE_DestroyWindow(_THIS, SDL_Window *window); /* Window manager function */ SDL_bool VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, diff --git a/modules/SDL2/src/video/vivante/SDL_vivantevulkan.c b/modules/SDL2/src/video/vivante/SDL_vivantevulkan.c index 4d5e1b8..8e4c867 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivantevulkan.c +++ b/modules/SDL2/src/video/vivante/SDL_vivantevulkan.c @@ -42,19 +42,19 @@ int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasSurfaceExtension = SDL_FALSE; SDL_bool hasDisplayExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan loader library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) - { + } + if (path == NULL) { /* If no path set, try Vivante fb vulkan driver explicitly */ path = "libvulkan-fb.so"; _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { /* If that couldn't be loaded, fall back to default name */ path = "libvulkan.so"; _this->vulkan_config.loader_handle = SDL_LoadObject(path); @@ -62,45 +62,44 @@ int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path) } else { _this->vulkan_config.loader_handle = SDL_LoadObject(path); } - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vivante: Loaded vulkan driver %s", path); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasDisplayExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else if(!hasDisplayExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_DISPLAY_EXTENSION_NAME "extension"); + } else if (!hasDisplayExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_DISPLAY_EXTENSION_NAME "extension"); goto fail; } return 0; @@ -113,38 +112,35 @@ fail: void VIVANTE_Vulkan_UnloadLibrary(_THIS) { - if(_this->vulkan_config.loader_handle) - { + if (_this->vulkan_config.loader_handle) { SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } } SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names) + SDL_Window *window, + unsigned *count, + const char **names) { static const char *const extensionsForVivante[] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_DISPLAY_EXTENSION_NAME }; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } return SDL_Vulkan_GetInstanceExtensions_Helper( - count, names, SDL_arraysize(extensionsForVivante), - extensionsForVivante); + count, names, SDL_arraysize(extensionsForVivante), + extensionsForVivante); } SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface) + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface) { - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } @@ -154,4 +150,3 @@ SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS, #endif /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/vivante/SDL_vivantevulkan.h b/modules/SDL2/src/video/vivante/SDL_vivantevulkan.h index 7e68131..1b0500c 100644 --- a/modules/SDL2/src/video/vivante/SDL_vivantevulkan.h +++ b/modules/SDL2/src/video/vivante/SDL_vivantevulkan.h @@ -32,22 +32,21 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_VIVANTE +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_VIVANTE int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path); void VIVANTE_Vulkan_UnloadLibrary(_THIS); SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names); + SDL_Window *window, + unsigned *count, + const char **names); SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface); + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface); #endif #endif /* SDL_vivantevulkan_h_ */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/wayland/SDL_waylandclipboard.c b/modules/SDL2/src/video/wayland/SDL_waylandclipboard.c index a81bd36..bf4dca4 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandclipboard.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandclipboard.c @@ -26,8 +26,7 @@ #include "SDL_waylandevents_c.h" #include "SDL_waylandclipboard.h" -int -Wayland_SetClipboardText(_THIS, const char *text) +int Wayland_SetClipboardText(_THIS, const char *text) { SDL_VideoData *video_data = NULL; SDL_WaylandDataDevice *data_device = NULL; @@ -41,7 +40,7 @@ Wayland_SetClipboardText(_THIS, const char *text) if (video_data->input != NULL && video_data->input->data_device != NULL) { data_device = video_data->input->data_device; if (text[0] != '\0') { - SDL_WaylandDataSource* source = Wayland_data_source_create(_this); + SDL_WaylandDataSource *source = Wayland_data_source_create(_this); Wayland_data_source_add_data(source, TEXT_MIME, text, SDL_strlen(text)); @@ -58,8 +57,7 @@ Wayland_SetClipboardText(_THIS, const char *text) return status; } -int -Wayland_SetPrimarySelectionText(_THIS, const char *text) +int Wayland_SetPrimarySelectionText(_THIS, const char *text) { SDL_VideoData *video_data = NULL; SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL; @@ -73,7 +71,7 @@ Wayland_SetPrimarySelectionText(_THIS, const char *text) if (video_data->input != NULL && video_data->input->primary_selection_device != NULL) { primary_selection_device = video_data->input->primary_selection_device; if (text[0] != '\0') { - SDL_WaylandPrimarySelectionSource* source = Wayland_primary_selection_source_create(_this); + SDL_WaylandPrimarySelectionSource *source = Wayland_primary_selection_source_create(_this); Wayland_primary_selection_source_add_data(source, TEXT_MIME, text, SDL_strlen(text)); @@ -91,8 +89,7 @@ Wayland_SetPrimarySelectionText(_THIS, const char *text) return status; } -char * -Wayland_GetClipboardText(_THIS) +char *Wayland_GetClipboardText(_THIS) { SDL_VideoData *video_data = NULL; SDL_WaylandDataDevice *data_device = NULL; @@ -112,7 +109,7 @@ Wayland_GetClipboardText(_THIS) text = Wayland_data_source_get_data(data_device->selection_source, &length, TEXT_MIME, SDL_TRUE); } else if (Wayland_data_offer_has_mime( - data_device->selection_offer, TEXT_MIME)) { + data_device->selection_offer, TEXT_MIME)) { text = Wayland_data_offer_receive(data_device->selection_offer, &length, TEXT_MIME, SDL_TRUE); } @@ -126,8 +123,7 @@ Wayland_GetClipboardText(_THIS) return text; } -char * -Wayland_GetPrimarySelectionText(_THIS) +char *Wayland_GetPrimarySelectionText(_THIS) { SDL_VideoData *video_data = NULL; SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL; @@ -147,7 +143,7 @@ Wayland_GetPrimarySelectionText(_THIS) text = Wayland_primary_selection_source_get_data(primary_selection_device->selection_source, &length, TEXT_MIME, SDL_TRUE); } else if (Wayland_primary_selection_offer_has_mime( - primary_selection_device->selection_offer, TEXT_MIME)) { + primary_selection_device->selection_offer, TEXT_MIME)) { text = Wayland_primary_selection_offer_receive(primary_selection_device->selection_offer, &length, TEXT_MIME, SDL_TRUE); } @@ -161,8 +157,7 @@ Wayland_GetPrimarySelectionText(_THIS) return text; } -SDL_bool -Wayland_HasClipboardText(_THIS) +SDL_bool Wayland_HasClipboardText(_THIS) { SDL_VideoData *video_data = NULL; SDL_WaylandDataDevice *data_device = NULL; @@ -182,8 +177,7 @@ Wayland_HasClipboardText(_THIS) return result; } -SDL_bool -Wayland_HasPrimarySelectionText(_THIS) +SDL_bool Wayland_HasPrimarySelectionText(_THIS) { SDL_VideoData *video_data = NULL; SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL; diff --git a/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.c b/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.c index f2e5968..3d580ce 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.c +++ b/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.c @@ -40,8 +40,7 @@ */ #define PIPE_MS_TIMEOUT 14 -static ssize_t -write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos) +static ssize_t write_pipe(int fd, const void *buffer, size_t total_length, size_t *pos) { int ready = 0; ssize_t bytes_written = 0; @@ -49,7 +48,7 @@ write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos) sigset_t sig_set; sigset_t old_sig_set; - struct timespec zerotime = {0}; + struct timespec zerotime = { 0 }; ready = SDL_IOReady(fd, SDL_IOR_WRITE, PIPE_MS_TIMEOUT); @@ -68,7 +67,7 @@ write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos) bytes_written = SDL_SetError("Pipe select error"); } else { if (length > 0) { - bytes_written = write(fd, (Uint8*)buffer + *pos, SDL_min(length, PIPE_BUF)); + bytes_written = write(fd, (Uint8 *)buffer + *pos, SDL_min(length, PIPE_BUF)); } if (bytes_written > 0) { @@ -87,11 +86,10 @@ write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos) return bytes_written; } -static ssize_t -read_pipe(int fd, void** buffer, size_t* total_length, SDL_bool null_terminate) +static ssize_t read_pipe(int fd, void **buffer, size_t *total_length, SDL_bool null_terminate) { int ready = 0; - void* output_buffer = NULL; + void *output_buffer = NULL; char temp[PIPE_BUF]; size_t new_buffer_length = 0; ssize_t bytes_read = 0; @@ -126,10 +124,10 @@ read_pipe(int fd, void** buffer, size_t* total_length, SDL_bool null_terminate) if (output_buffer == NULL) { bytes_read = SDL_OutOfMemory(); } else { - SDL_memcpy((Uint8*)output_buffer + pos, temp, bytes_read); + SDL_memcpy((Uint8 *)output_buffer + pos, temp, bytes_read); if (null_terminate == SDL_TRUE) { - SDL_memset((Uint8*)output_buffer + (new_buffer_length - 1), 0, 1); + SDL_memset((Uint8 *)output_buffer + (new_buffer_length - 1), 0, 1); } *buffer = output_buffer; @@ -141,15 +139,14 @@ read_pipe(int fd, void** buffer, size_t* total_length, SDL_bool null_terminate) #define MIME_LIST_SIZE 4 -static const char* mime_conversion_list[MIME_LIST_SIZE][2] = { - {"text/plain", TEXT_MIME}, - {"TEXT", TEXT_MIME}, - {"UTF8_STRING", TEXT_MIME}, - {"STRING", TEXT_MIME} +static const char *mime_conversion_list[MIME_LIST_SIZE][2] = { + { "text/plain", TEXT_MIME }, + { "TEXT", TEXT_MIME }, + { "UTF8_STRING", TEXT_MIME }, + { "STRING", TEXT_MIME } }; -const char* -Wayland_convert_mime_type(const char *mime_type) +const char *Wayland_convert_mime_type(const char *mime_type) { const char *found = mime_type; @@ -165,14 +162,13 @@ Wayland_convert_mime_type(const char *mime_type) return found; } -static SDL_MimeDataList* -mime_data_list_find(struct wl_list* list, - const char* mime_type) +static SDL_MimeDataList *mime_data_list_find(struct wl_list *list, + const char *mime_type) { SDL_MimeDataList *found = NULL; SDL_MimeDataList *mime_list = NULL; - wl_list_for_each(mime_list, list, link) { + wl_list_for_each (mime_list, list, link) { if (SDL_strcmp(mime_list->mime_type, mime_type) == 0) { found = mime_list; break; @@ -181,10 +177,9 @@ mime_data_list_find(struct wl_list* list, return found; } -static int -mime_data_list_add(struct wl_list* list, - const char* mime_type, - const void* buffer, size_t length) +static int mime_data_list_add(struct wl_list *list, + const char *mime_type, + const void *buffer, size_t length) { int status = 0; size_t mime_type_length = 0; @@ -231,13 +226,13 @@ mime_data_list_add(struct wl_list* list, return status; } -static void -mime_data_list_free(struct wl_list *list) +static void mime_data_list_free(struct wl_list *list) { SDL_MimeDataList *mime_data = NULL; SDL_MimeDataList *next = NULL; - wl_list_for_each_safe(mime_data, next, list, link) { + wl_list_for_each_safe(mime_data, next, list, link) + { if (mime_data->data != NULL) { SDL_free(mime_data->data); } @@ -248,8 +243,7 @@ mime_data_list_free(struct wl_list *list) } } -static ssize_t -Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd) +static ssize_t Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd) { size_t written_bytes = 0; ssize_t status = 0; @@ -258,36 +252,35 @@ Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd) status = SDL_SetError("Invalid mime type"); close(fd); } else { - while (write_pipe(fd, mime_data->data, mime_data->length, - &written_bytes) > 0); + while (write_pipe(fd, + mime_data->data, + mime_data->length, + &written_bytes) > 0) { + } close(fd); status = written_bytes; } return status; } -ssize_t -Wayland_data_source_send(SDL_WaylandDataSource *source, - const char *mime_type, int fd) +ssize_t Wayland_data_source_send(SDL_WaylandDataSource *source, const char *mime_type, int fd) { SDL_MimeDataList *mime_data = NULL; mime_type = Wayland_convert_mime_type(mime_type); mime_data = mime_data_list_find(&source->mimes, - mime_type); + mime_type); return Wayland_source_send(mime_data, mime_type, fd); } -ssize_t -Wayland_primary_selection_source_send(SDL_WaylandPrimarySelectionSource *source, - const char *mime_type, int fd) +ssize_t Wayland_primary_selection_source_send(SDL_WaylandPrimarySelectionSource *source, const char *mime_type, int fd) { SDL_MimeDataList *mime_data = NULL; mime_type = Wayland_convert_mime_type(mime_type); mime_data = mime_data_list_find(&source->mimes, - mime_type); + mime_type); return Wayland_source_send(mime_data, mime_type, fd); } @@ -308,9 +301,8 @@ int Wayland_primary_selection_source_add_data(SDL_WaylandPrimarySelectionSource return mime_data_list_add(&source->mimes, mime_type, buffer, length); } -SDL_bool -Wayland_data_source_has_mime(SDL_WaylandDataSource *source, - const char *mime_type) +SDL_bool Wayland_data_source_has_mime(SDL_WaylandDataSource *source, + const char *mime_type) { SDL_bool found = SDL_FALSE; @@ -320,9 +312,8 @@ Wayland_data_source_has_mime(SDL_WaylandDataSource *source, return found; } -SDL_bool -Wayland_primary_selection_source_has_mime(SDL_WaylandPrimarySelectionSource *source, - const char *mime_type) +SDL_bool Wayland_primary_selection_source_has_mime(SDL_WaylandPrimarySelectionSource *source, + const char *mime_type) { SDL_bool found = SDL_FALSE; @@ -332,10 +323,9 @@ Wayland_primary_selection_source_has_mime(SDL_WaylandPrimarySelectionSource *sou return found; } -static void* -Wayland_source_get_data(SDL_MimeDataList *mime_data, - size_t *length, - SDL_bool null_terminate) +static void *Wayland_source_get_data(SDL_MimeDataList *mime_data, + size_t *length, + SDL_bool null_terminate) { void *buffer = NULL; @@ -360,10 +350,9 @@ Wayland_source_get_data(SDL_MimeDataList *mime_data, return buffer; } -void* -Wayland_data_source_get_data(SDL_WaylandDataSource *source, - size_t *length, const char* mime_type, - SDL_bool null_terminate) +void *Wayland_data_source_get_data(SDL_WaylandDataSource *source, + size_t *length, const char *mime_type, + SDL_bool null_terminate) { SDL_MimeDataList *mime_data = NULL; void *buffer = NULL; @@ -379,10 +368,9 @@ Wayland_data_source_get_data(SDL_WaylandDataSource *source, return buffer; } -void* -Wayland_primary_selection_source_get_data(SDL_WaylandPrimarySelectionSource *source, - size_t *length, const char* mime_type, - SDL_bool null_terminate) +void *Wayland_primary_selection_source_get_data(SDL_WaylandPrimarySelectionSource *source, + size_t *length, const char *mime_type, + SDL_bool null_terminate) { SDL_MimeDataList *mime_data = NULL; void *buffer = NULL; @@ -398,11 +386,10 @@ Wayland_primary_selection_source_get_data(SDL_WaylandPrimarySelectionSource *sou return buffer; } -void -Wayland_data_source_destroy(SDL_WaylandDataSource *source) +void Wayland_data_source_destroy(SDL_WaylandDataSource *source) { if (source != NULL) { - SDL_WaylandDataDevice *data_device = (SDL_WaylandDataDevice *) source->data_device; + SDL_WaylandDataDevice *data_device = (SDL_WaylandDataDevice *)source->data_device; if (data_device && (data_device->selection_source == source)) { data_device->selection_source = NULL; } @@ -412,11 +399,10 @@ Wayland_data_source_destroy(SDL_WaylandDataSource *source) } } -void -Wayland_primary_selection_source_destroy(SDL_WaylandPrimarySelectionSource *source) +void Wayland_primary_selection_source_destroy(SDL_WaylandPrimarySelectionSource *source) { if (source != NULL) { - SDL_WaylandPrimarySelectionDevice *primary_selection_device = (SDL_WaylandPrimarySelectionDevice *) source->primary_selection_device; + SDL_WaylandPrimarySelectionDevice *primary_selection_device = (SDL_WaylandPrimarySelectionDevice *)source->primary_selection_device; if (primary_selection_device && (primary_selection_device->selection_source == source)) { primary_selection_device->selection_source = NULL; } @@ -426,10 +412,9 @@ Wayland_primary_selection_source_destroy(SDL_WaylandPrimarySelectionSource *sour } } -void* -Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, - size_t *length, const char* mime_type, - SDL_bool null_terminate) +void *Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, + size_t *length, const char *mime_type, + SDL_bool null_terminate) { SDL_WaylandDataDevice *data_device = NULL; @@ -439,9 +424,12 @@ Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, if (offer == NULL) { SDL_SetError("Invalid data offer"); - } else if ((data_device = offer->data_device) == NULL) { + return NULL; + } + data_device = offer->data_device; + if (data_device == NULL) { SDL_SetError("Data device not initialized"); - } else if (pipe2(pipefd, O_CLOEXEC|O_NONBLOCK) == -1) { + } else if (pipe2(pipefd, O_CLOEXEC | O_NONBLOCK) == -1) { SDL_SetError("Could not read pipe"); } else { wl_data_offer_receive(offer->offer, mime_type, pipefd[1]); @@ -451,16 +439,16 @@ Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, close(pipefd[1]); - while (read_pipe(pipefd[0], &buffer, length, null_terminate) > 0); + while (read_pipe(pipefd[0], &buffer, length, null_terminate) > 0) { + } close(pipefd[0]); } return buffer; } -void* -Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, - size_t *length, const char* mime_type, - SDL_bool null_terminate) +void *Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, + size_t *length, const char *mime_type, + SDL_bool null_terminate) { SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL; @@ -470,9 +458,12 @@ Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, if (offer == NULL) { SDL_SetError("Invalid data offer"); - } else if ((primary_selection_device = offer->primary_selection_device) == NULL) { + return NULL; + } + primary_selection_device = offer->primary_selection_device; + if (primary_selection_device == NULL) { SDL_SetError("Primary selection device not initialized"); - } else if (pipe2(pipefd, O_CLOEXEC|O_NONBLOCK) == -1) { + } else if (pipe2(pipefd, O_CLOEXEC | O_NONBLOCK) == -1) { SDL_SetError("Could not read pipe"); } else { zwp_primary_selection_offer_v1_receive(offer->offer, mime_type, pipefd[1]); @@ -482,29 +473,27 @@ Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, close(pipefd[1]); - while (read_pipe(pipefd[0], &buffer, length, null_terminate) > 0); + while (read_pipe(pipefd[0], &buffer, length, null_terminate) > 0) { + } close(pipefd[0]); } return buffer; } -int -Wayland_data_offer_add_mime(SDL_WaylandDataOffer *offer, - const char* mime_type) +int Wayland_data_offer_add_mime(SDL_WaylandDataOffer *offer, + const char *mime_type) { return mime_data_list_add(&offer->mimes, mime_type, NULL, 0); } -int -Wayland_primary_selection_offer_add_mime(SDL_WaylandPrimarySelectionOffer *offer, - const char* mime_type) +int Wayland_primary_selection_offer_add_mime(SDL_WaylandPrimarySelectionOffer *offer, + const char *mime_type) { return mime_data_list_add(&offer->mimes, mime_type, NULL, 0); } -SDL_bool -Wayland_data_offer_has_mime(SDL_WaylandDataOffer *offer, - const char *mime_type) +SDL_bool Wayland_data_offer_has_mime(SDL_WaylandDataOffer *offer, + const char *mime_type) { SDL_bool found = SDL_FALSE; @@ -514,9 +503,8 @@ Wayland_data_offer_has_mime(SDL_WaylandDataOffer *offer, return found; } -SDL_bool -Wayland_primary_selection_offer_has_mime(SDL_WaylandPrimarySelectionOffer *offer, - const char *mime_type) +SDL_bool Wayland_primary_selection_offer_has_mime(SDL_WaylandPrimarySelectionOffer *offer, + const char *mime_type) { SDL_bool found = SDL_FALSE; @@ -526,8 +514,7 @@ Wayland_primary_selection_offer_has_mime(SDL_WaylandPrimarySelectionOffer *offer return found; } -void -Wayland_data_offer_destroy(SDL_WaylandDataOffer *offer) +void Wayland_data_offer_destroy(SDL_WaylandDataOffer *offer) { if (offer != NULL) { wl_data_offer_destroy(offer->offer); @@ -536,8 +523,7 @@ Wayland_data_offer_destroy(SDL_WaylandDataOffer *offer) } } -void -Wayland_primary_selection_offer_destroy(SDL_WaylandPrimarySelectionOffer *offer) +void Wayland_primary_selection_offer_destroy(SDL_WaylandPrimarySelectionOffer *offer) { if (offer != NULL) { zwp_primary_selection_offer_v1_destroy(offer->offer); @@ -546,8 +532,7 @@ Wayland_primary_selection_offer_destroy(SDL_WaylandPrimarySelectionOffer *offer) } } -int -Wayland_data_device_clear_selection(SDL_WaylandDataDevice *data_device) +int Wayland_data_device_clear_selection(SDL_WaylandDataDevice *data_device) { int status = 0; @@ -561,8 +546,7 @@ Wayland_data_device_clear_selection(SDL_WaylandDataDevice *data_device) return status; } -int -Wayland_primary_selection_device_clear_selection(SDL_WaylandPrimarySelectionDevice *primary_selection_device) +int Wayland_primary_selection_device_clear_selection(SDL_WaylandPrimarySelectionDevice *primary_selection_device) { int status = 0; @@ -577,9 +561,8 @@ Wayland_primary_selection_device_clear_selection(SDL_WaylandPrimarySelectionDevi return status; } -int -Wayland_data_device_set_selection(SDL_WaylandDataDevice *data_device, - SDL_WaylandDataSource *source) +int Wayland_data_device_set_selection(SDL_WaylandDataDevice *data_device, + SDL_WaylandDataSource *source) { int status = 0; size_t num_offers = 0; @@ -592,7 +575,7 @@ Wayland_data_device_set_selection(SDL_WaylandDataDevice *data_device, } else { SDL_MimeDataList *mime_data = NULL; - wl_list_for_each(mime_data, &(source->mimes), link) { + wl_list_for_each (mime_data, &(source->mimes), link) { wl_data_source_offer(source->source, mime_data->mime_type); @@ -601,7 +584,7 @@ Wayland_data_device_set_selection(SDL_WaylandDataDevice *data_device, if (SDL_strcmp(mime_conversion_list[index][1], mime_data->mime_type) == 0) { wl_data_source_offer(source->source, mime_conversion_list[index][0]); - } + } } /* */ @@ -629,9 +612,8 @@ Wayland_data_device_set_selection(SDL_WaylandDataDevice *data_device, return status; } -int -Wayland_primary_selection_device_set_selection(SDL_WaylandPrimarySelectionDevice *primary_selection_device, - SDL_WaylandPrimarySelectionSource *source) +int Wayland_primary_selection_device_set_selection(SDL_WaylandPrimarySelectionDevice *primary_selection_device, + SDL_WaylandPrimarySelectionSource *source) { int status = 0; size_t num_offers = 0; @@ -644,16 +626,16 @@ Wayland_primary_selection_device_set_selection(SDL_WaylandPrimarySelectionDevice } else { SDL_MimeDataList *mime_data = NULL; - wl_list_for_each(mime_data, &(source->mimes), link) { + wl_list_for_each (mime_data, &(source->mimes), link) { zwp_primary_selection_source_v1_offer(source->source, mime_data->mime_type); /* TODO - Improve system for multiple mime types to same data */ for (index = 0; index < MIME_LIST_SIZE; ++index) { if (SDL_strcmp(mime_conversion_list[index][1], mime_data->mime_type) == 0) { - zwp_primary_selection_source_v1_offer(source->source, - mime_conversion_list[index][0]); - } + zwp_primary_selection_source_v1_offer(source->source, + mime_conversion_list[index][0]); + } } /* */ @@ -681,17 +663,15 @@ Wayland_primary_selection_device_set_selection(SDL_WaylandPrimarySelectionDevice return status; } -int -Wayland_data_device_set_serial(SDL_WaylandDataDevice *data_device, - uint32_t serial) +int Wayland_data_device_set_serial(SDL_WaylandDataDevice *data_device, + uint32_t serial) { int status = -1; if (data_device != NULL) { status = 0; /* If there was no serial and there is a pending selection set it now. */ - if (data_device->selection_serial == 0 - && data_device->selection_source != NULL) { + if (data_device->selection_serial == 0 && data_device->selection_source != NULL) { wl_data_device_set_selection(data_device->data_device, data_device->selection_source->source, data_device->selection_serial); @@ -703,17 +683,15 @@ Wayland_data_device_set_serial(SDL_WaylandDataDevice *data_device, return status; } -int -Wayland_primary_selection_device_set_serial(SDL_WaylandPrimarySelectionDevice *primary_selection_device, - uint32_t serial) +int Wayland_primary_selection_device_set_serial(SDL_WaylandPrimarySelectionDevice *primary_selection_device, + uint32_t serial) { int status = -1; if (primary_selection_device != NULL) { status = 0; /* If there was no serial and there is a pending selection set it now. */ - if (primary_selection_device->selection_serial == 0 - && primary_selection_device->selection_source != NULL) { + if (primary_selection_device->selection_serial == 0 && primary_selection_device->selection_source != NULL) { zwp_primary_selection_device_v1_set_selection(primary_selection_device->primary_selection_device, primary_selection_device->selection_source->source, primary_selection_device->selection_serial); diff --git a/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.h b/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.h index 6fa4ea7..7f0cb7e 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.h +++ b/modules/SDL2/src/video/wayland/SDL_waylanddatamanager.h @@ -30,38 +30,44 @@ #define TEXT_MIME "text/plain;charset=utf-8" #define FILE_MIME "text/uri-list" -typedef struct { +typedef struct +{ char *mime_type; void *data; size_t length; struct wl_list link; } SDL_MimeDataList; -typedef struct { +typedef struct +{ struct wl_data_source *source; struct wl_list mimes; void *data_device; } SDL_WaylandDataSource; -typedef struct { +typedef struct +{ struct zwp_primary_selection_source_v1 *source; struct wl_list mimes; void *primary_selection_device; } SDL_WaylandPrimarySelectionSource; -typedef struct { +typedef struct +{ struct wl_data_offer *offer; struct wl_list mimes; void *data_device; } SDL_WaylandDataOffer; -typedef struct { +typedef struct +{ struct zwp_primary_selection_offer_v1 *offer; struct wl_list mimes; void *primary_selection_device; } SDL_WaylandPrimarySelectionOffer; -typedef struct { +typedef struct +{ struct wl_data_device *data_device; SDL_VideoData *video_data; @@ -69,13 +75,15 @@ typedef struct { uint32_t drag_serial; SDL_WaylandDataOffer *drag_offer; SDL_WaylandDataOffer *selection_offer; + SDL_Window *dnd_window; /* Clipboard and Primary Selection */ uint32_t selection_serial; SDL_WaylandDataSource *selection_source; } SDL_WaylandDataDevice; -typedef struct { +typedef struct +{ struct zwp_primary_selection_device_v1 *primary_selection_device; SDL_VideoData *video_data; @@ -84,11 +92,11 @@ typedef struct { SDL_WaylandPrimarySelectionOffer *selection_offer; } SDL_WaylandPrimarySelectionDevice; -extern const char* Wayland_convert_mime_type(const char *mime_type); +extern const char *Wayland_convert_mime_type(const char *mime_type); /* Wayland Data Source / Primary Selection Source - (Sending) */ -extern SDL_WaylandDataSource* Wayland_data_source_create(_THIS); -extern SDL_WaylandPrimarySelectionSource* Wayland_primary_selection_source_create(_THIS); +extern SDL_WaylandDataSource *Wayland_data_source_create(_THIS); +extern SDL_WaylandPrimarySelectionSource *Wayland_primary_selection_source_create(_THIS); extern ssize_t Wayland_data_source_send(SDL_WaylandDataSource *source, const char *mime_type, int fd); extern ssize_t Wayland_primary_selection_source_send(SDL_WaylandPrimarySelectionSource *source, @@ -105,11 +113,11 @@ extern SDL_bool Wayland_data_source_has_mime(SDL_WaylandDataSource *source, const char *mime_type); extern SDL_bool Wayland_primary_selection_source_has_mime(SDL_WaylandPrimarySelectionSource *source, const char *mime_type); -extern void* Wayland_data_source_get_data(SDL_WaylandDataSource *source, +extern void *Wayland_data_source_get_data(SDL_WaylandDataSource *source, size_t *length, const char *mime_type, SDL_bool null_terminate); -extern void* Wayland_primary_selection_source_get_data(SDL_WaylandPrimarySelectionSource *source, +extern void *Wayland_primary_selection_source_get_data(SDL_WaylandPrimarySelectionSource *source, size_t *length, const char *mime_type, SDL_bool null_terminate); @@ -117,11 +125,11 @@ extern void Wayland_data_source_destroy(SDL_WaylandDataSource *source); extern void Wayland_primary_selection_source_destroy(SDL_WaylandPrimarySelectionSource *source); /* Wayland Data / Primary Selection Offer - (Receiving) */ -extern void* Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, +extern void *Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, size_t *length, const char *mime_type, SDL_bool null_terminate); -extern void* Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, +extern void *Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *offer, size_t *length, const char *mime_type, SDL_bool null_terminate); @@ -142,7 +150,7 @@ extern int Wayland_primary_selection_device_clear_selection(SDL_WaylandPrimarySe extern int Wayland_data_device_set_selection(SDL_WaylandDataDevice *device, SDL_WaylandDataSource *source); extern int Wayland_primary_selection_device_set_selection(SDL_WaylandPrimarySelectionDevice *device, - SDL_WaylandPrimarySelectionSource *source); + SDL_WaylandPrimarySelectionSource *source); extern int Wayland_data_device_set_serial(SDL_WaylandDataDevice *device, uint32_t serial); extern int Wayland_primary_selection_device_set_serial(SDL_WaylandPrimarySelectionDevice *device, @@ -150,4 +158,3 @@ extern int Wayland_primary_selection_device_set_serial(SDL_WaylandPrimarySelecti #endif /* SDL_waylanddatamanager_h_ */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/wayland/SDL_waylanddyn.c b/modules/SDL2/src/video/wayland/SDL_waylanddyn.c index bda9ad3..8ebeaed 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylanddyn.c +++ b/modules/SDL2/src/video/wayland/SDL_waylanddyn.c @@ -26,7 +26,6 @@ #include "SDL_waylanddyn.h" - #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC #include "SDL_name.h" @@ -38,49 +37,47 @@ typedef struct const char *libname; } waylanddynlib; -#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL -#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL NULL +static waylanddynlib waylandlibs[] = { + { NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC }, +#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL + { NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL }, #endif -#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR -#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR NULL +#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR + { NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR }, #endif -#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON -#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON NULL +#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON + { NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON }, #endif -#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR -#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR NULL +#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR + { NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR }, #endif - -static waylanddynlib waylandlibs[] = { - {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC}, - {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL}, - {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR}, - {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON}, - {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR} + { NULL, NULL } }; -static void * -WAYLAND_GetSym(const char *fnname, int *pHasModule) +static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, SDL_bool required) { - int i; void *fn = NULL; - for (i = 0; i < SDL_TABLESIZE(waylandlibs); i++) { - if (waylandlibs[i].lib != NULL) { - fn = SDL_LoadFunction(waylandlibs[i].lib, fnname); - if (fn != NULL) + waylanddynlib *dynlib; + for (dynlib = waylandlibs; dynlib->libname; dynlib++) { + if (dynlib->lib != NULL) { + fn = SDL_LoadFunction(dynlib->lib, fnname); + if (fn != NULL) { break; + } } } #if DEBUG_DYNAMIC_WAYLAND - if (fn != NULL) - SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn); - else + if (fn != NULL) { + SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, dynlib->libname, fn); + } else { SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname); + } #endif - if (fn == NULL) - *pHasModule = 0; /* kill this module. */ + if (fn == NULL && required) { + *pHasModule = 0; /* kill this module. */ + } return fn; } @@ -92,30 +89,30 @@ WAYLAND_GetSym(const char *fnname, int *pHasModule) #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */ /* Define all the function pointers and wrappers... */ -#define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0; -#define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL; -#define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL; +#define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0; +#define SDL_WAYLAND_SYM(rc, fn, params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL; +#define SDL_WAYLAND_SYM_OPT(rc, fn, params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL; +#define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL; #include "SDL_waylandsym.h" static int wayland_load_refcount = 0; -void -SDL_WAYLAND_UnloadSymbols(void) +void SDL_WAYLAND_UnloadSymbols(void) { /* Don't actually unload if more than one module is using the libs... */ if (wayland_load_refcount > 0) { if (--wayland_load_refcount == 0) { -#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC +#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC int i; #endif - + /* set all the function pointers to NULL. */ -#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 0; -#define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = NULL; -#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = NULL; +#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 0; +#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = NULL; +#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = NULL; +#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = NULL; #include "SDL_waylandsym.h" - #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC for (i = 0; i < SDL_TABLESIZE(waylandlibs); i++) { if (waylandlibs[i].lib != NULL) { @@ -129,10 +126,9 @@ SDL_WAYLAND_UnloadSymbols(void) } /* returns non-zero if all needed symbols were loaded. */ -int -SDL_WAYLAND_LoadSymbols(void) +int SDL_WAYLAND_LoadSymbols(void) { - int rc = 1; /* always succeed if not using Dynamic WAYLAND stuff. */ + int rc = 1; /* always succeed if not using Dynamic WAYLAND stuff. */ /* deal with multiple modules (dga, wayland, etc) needing these symbols... */ if (wayland_load_refcount++ == 0) { @@ -148,9 +144,10 @@ SDL_WAYLAND_LoadSymbols(void) #define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */ #include "SDL_waylandsym.h" -#define SDL_WAYLAND_MODULE(modname) thismod = &SDL_WAYLAND_HAVE_##modname; -#define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn) WAYLAND_GetSym(#fn,thismod); -#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = (struct wl_interface *) WAYLAND_GetSym(#iface,thismod); +#define SDL_WAYLAND_MODULE(modname) thismod = &SDL_WAYLAND_HAVE_##modname; +#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn)WAYLAND_GetSym(#fn, thismod, SDL_TRUE); +#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn)WAYLAND_GetSym(#fn, thismod, SDL_FALSE); +#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = (struct wl_interface *)WAYLAND_GetSym(#iface, thismod, SDL_TRUE); #include "SDL_waylandsym.h" if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT) { @@ -162,11 +159,12 @@ SDL_WAYLAND_LoadSymbols(void) rc = 0; } -#else /* no dynamic WAYLAND */ +#else /* no dynamic WAYLAND */ -#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */ -#define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn; -#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = &iface; +#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */ +#define SDL_WAYLAND_SYM(rc, fn, params) WAYLAND_##fn = fn; +#define SDL_WAYLAND_SYM_OPT(rc, fn, params) WAYLAND_##fn = fn; +#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = &iface; #include "SDL_waylandsym.h" #endif diff --git a/modules/SDL2/src/video/wayland/SDL_waylanddyn.h b/modules/SDL2/src/video/wayland/SDL_waylanddyn.h index 9c400f4..36f4fde 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylanddyn.h +++ b/modules/SDL2/src/video/wayland/SDL_waylanddyn.h @@ -55,22 +55,24 @@ enum libdecor_window_state; /* Must be included before our #defines, see Bugzilla #4957 */ #include "wayland-client-core.h" -#define SDL_WAYLAND_CHECK_VERSION(x, y, z) \ - (WAYLAND_VERSION_MAJOR > x || \ - (WAYLAND_VERSION_MAJOR == x && WAYLAND_VERSION_MINOR > y) || \ - (WAYLAND_VERSION_MAJOR == x && WAYLAND_VERSION_MINOR == y && WAYLAND_VERSION_MICRO >= z)) +#define SDL_WAYLAND_CHECK_VERSION(x, y, z) \ + (WAYLAND_VERSION_MAJOR > x || \ + (WAYLAND_VERSION_MAJOR == x && WAYLAND_VERSION_MINOR > y) || \ + (WAYLAND_VERSION_MAJOR == x && WAYLAND_VERSION_MINOR == y && WAYLAND_VERSION_MICRO >= z)) #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif int SDL_WAYLAND_LoadSymbols(void); void SDL_WAYLAND_UnloadSymbols(void); #define SDL_WAYLAND_MODULE(modname) extern int SDL_WAYLAND_HAVE_##modname; -#define SDL_WAYLAND_SYM(rc,fn,params) \ - typedef rc (*SDL_DYNWAYLANDFN_##fn) params; \ +#define SDL_WAYLAND_SYM(rc, fn, params) \ + typedef rc(*SDL_DYNWAYLANDFN_##fn) params; \ + extern SDL_DYNWAYLANDFN_##fn WAYLAND_##fn; +#define SDL_WAYLAND_SYM_OPT(rc, fn, params) \ + typedef rc(*SDL_DYNWAYLANDFN_##fn) params; \ extern SDL_DYNWAYLANDFN_##fn WAYLAND_##fn; #define SDL_WAYLAND_INTERFACE(iface) extern const struct wl_interface *WAYLAND_##iface; #include "SDL_waylandsym.h" @@ -89,35 +91,35 @@ void SDL_WAYLAND_UnloadSymbols(void); * has inline functions that require these to be defined in dynamic loading mode */ -#define wl_proxy_create (*WAYLAND_wl_proxy_create) -#define wl_proxy_destroy (*WAYLAND_wl_proxy_destroy) -#define wl_proxy_marshal (*WAYLAND_wl_proxy_marshal) -#define wl_proxy_set_user_data (*WAYLAND_wl_proxy_set_user_data) -#define wl_proxy_get_user_data (*WAYLAND_wl_proxy_get_user_data) -#define wl_proxy_get_version (*WAYLAND_wl_proxy_get_version) -#define wl_proxy_add_listener (*WAYLAND_wl_proxy_add_listener) -#define wl_proxy_marshal_constructor (*WAYLAND_wl_proxy_marshal_constructor) +#define wl_proxy_create (*WAYLAND_wl_proxy_create) +#define wl_proxy_destroy (*WAYLAND_wl_proxy_destroy) +#define wl_proxy_marshal (*WAYLAND_wl_proxy_marshal) +#define wl_proxy_set_user_data (*WAYLAND_wl_proxy_set_user_data) +#define wl_proxy_get_user_data (*WAYLAND_wl_proxy_get_user_data) +#define wl_proxy_get_version (*WAYLAND_wl_proxy_get_version) +#define wl_proxy_add_listener (*WAYLAND_wl_proxy_add_listener) +#define wl_proxy_marshal_constructor (*WAYLAND_wl_proxy_marshal_constructor) #define wl_proxy_marshal_constructor_versioned (*WAYLAND_wl_proxy_marshal_constructor_versioned) -#define wl_proxy_set_tag (*WAYLAND_wl_proxy_set_tag) -#define wl_proxy_get_tag (*WAYLAND_wl_proxy_get_tag) -#define wl_proxy_marshal_flags (*WAYLAND_wl_proxy_marshal_flags) -#define wl_proxy_marshal_array_flags (*WAYLAND_wl_proxy_marshal_array_flags) -#define wl_display_reconnect (*WAYLAND_wl_display_reconnect) - -#define wl_seat_interface (*WAYLAND_wl_seat_interface) -#define wl_surface_interface (*WAYLAND_wl_surface_interface) -#define wl_shm_pool_interface (*WAYLAND_wl_shm_pool_interface) -#define wl_buffer_interface (*WAYLAND_wl_buffer_interface) -#define wl_registry_interface (*WAYLAND_wl_registry_interface) -#define wl_region_interface (*WAYLAND_wl_region_interface) -#define wl_pointer_interface (*WAYLAND_wl_pointer_interface) -#define wl_keyboard_interface (*WAYLAND_wl_keyboard_interface) -#define wl_compositor_interface (*WAYLAND_wl_compositor_interface) -#define wl_output_interface (*WAYLAND_wl_output_interface) -#define wl_shm_interface (*WAYLAND_wl_shm_interface) -#define wl_data_device_interface (*WAYLAND_wl_data_device_interface) -#define wl_data_offer_interface (*WAYLAND_wl_data_offer_interface) -#define wl_data_source_interface (*WAYLAND_wl_data_source_interface) +#define wl_proxy_set_tag (*WAYLAND_wl_proxy_set_tag) +#define wl_proxy_get_tag (*WAYLAND_wl_proxy_get_tag) +#define wl_proxy_marshal_flags (*WAYLAND_wl_proxy_marshal_flags) +#define wl_proxy_marshal_array_flags (*WAYLAND_wl_proxy_marshal_array_flags) +#define wl_display_reconnect (*WAYLAND_wl_display_reconnect) + +#define wl_seat_interface (*WAYLAND_wl_seat_interface) +#define wl_surface_interface (*WAYLAND_wl_surface_interface) +#define wl_shm_pool_interface (*WAYLAND_wl_shm_pool_interface) +#define wl_buffer_interface (*WAYLAND_wl_buffer_interface) +#define wl_registry_interface (*WAYLAND_wl_registry_interface) +#define wl_region_interface (*WAYLAND_wl_region_interface) +#define wl_pointer_interface (*WAYLAND_wl_pointer_interface) +#define wl_keyboard_interface (*WAYLAND_wl_keyboard_interface) +#define wl_compositor_interface (*WAYLAND_wl_compositor_interface) +#define wl_output_interface (*WAYLAND_wl_output_interface) +#define wl_shm_interface (*WAYLAND_wl_shm_interface) +#define wl_data_device_interface (*WAYLAND_wl_data_device_interface) +#define wl_data_offer_interface (*WAYLAND_wl_data_offer_interface) +#define wl_data_source_interface (*WAYLAND_wl_data_source_interface) #define wl_data_device_manager_interface (*WAYLAND_wl_data_device_manager_interface) /* @@ -131,37 +133,39 @@ void SDL_WAYLAND_UnloadSymbols(void); /* Must be included before our defines */ #include -#define libdecor_unref (*WAYLAND_libdecor_unref) -#define libdecor_new (*WAYLAND_libdecor_new) -#define libdecor_decorate (*WAYLAND_libdecor_decorate) -#define libdecor_frame_unref (*WAYLAND_libdecor_frame_unref) -#define libdecor_frame_set_title (*WAYLAND_libdecor_frame_set_title) -#define libdecor_frame_set_app_id (*WAYLAND_libdecor_frame_set_app_id) -#define libdecor_frame_set_max_content_size (*WAYLAND_libdecor_frame_set_max_content_size) -#define libdecor_frame_set_min_content_size (*WAYLAND_libdecor_frame_set_min_content_size) -#define libdecor_frame_resize (*WAYLAND_libdecor_frame_resize) -#define libdecor_frame_move (*WAYLAND_libdecor_frame_move) -#define libdecor_frame_commit (*WAYLAND_libdecor_frame_commit) -#define libdecor_frame_set_minimized (*WAYLAND_libdecor_frame_set_minimized) -#define libdecor_frame_set_maximized (*WAYLAND_libdecor_frame_set_maximized) -#define libdecor_frame_unset_maximized (*WAYLAND_libdecor_frame_unset_maximized) -#define libdecor_frame_set_fullscreen (*WAYLAND_libdecor_frame_set_fullscreen) -#define libdecor_frame_unset_fullscreen (*WAYLAND_libdecor_frame_unset_fullscreen) -#define libdecor_frame_set_capabilities (*WAYLAND_libdecor_frame_set_capabilities) -#define libdecor_frame_unset_capabilities (*WAYLAND_libdecor_frame_unset_capabilities) -#define libdecor_frame_has_capability (*WAYLAND_libdecor_frame_has_capability) -#define libdecor_frame_set_visibility (*WAYLAND_libdecor_frame_set_visibility) -#define libdecor_frame_is_visible (*WAYLAND_libdecor_frame_is_visible) -#define libdecor_frame_is_floating (*WAYLAND_libdecor_frame_is_floating) -#define libdecor_frame_set_parent (*WAYLAND_libdecor_frame_set_parent) -#define libdecor_frame_get_xdg_surface (*WAYLAND_libdecor_frame_get_xdg_surface) -#define libdecor_frame_get_xdg_toplevel (*WAYLAND_libdecor_frame_get_xdg_toplevel) -#define libdecor_frame_map (*WAYLAND_libdecor_frame_map) -#define libdecor_state_new (*WAYLAND_libdecor_state_new) -#define libdecor_state_free (*WAYLAND_libdecor_state_free) +#define libdecor_unref (*WAYLAND_libdecor_unref) +#define libdecor_new (*WAYLAND_libdecor_new) +#define libdecor_decorate (*WAYLAND_libdecor_decorate) +#define libdecor_frame_unref (*WAYLAND_libdecor_frame_unref) +#define libdecor_frame_set_title (*WAYLAND_libdecor_frame_set_title) +#define libdecor_frame_set_app_id (*WAYLAND_libdecor_frame_set_app_id) +#define libdecor_frame_set_max_content_size (*WAYLAND_libdecor_frame_set_max_content_size) +#define libdecor_frame_get_max_content_size (*WAYLAND_libdecor_frame_get_max_content_size) +#define libdecor_frame_set_min_content_size (*WAYLAND_libdecor_frame_set_min_content_size) +#define libdecor_frame_get_min_content_size (*WAYLAND_libdecor_frame_get_min_content_size) +#define libdecor_frame_resize (*WAYLAND_libdecor_frame_resize) +#define libdecor_frame_move (*WAYLAND_libdecor_frame_move) +#define libdecor_frame_commit (*WAYLAND_libdecor_frame_commit) +#define libdecor_frame_set_minimized (*WAYLAND_libdecor_frame_set_minimized) +#define libdecor_frame_set_maximized (*WAYLAND_libdecor_frame_set_maximized) +#define libdecor_frame_unset_maximized (*WAYLAND_libdecor_frame_unset_maximized) +#define libdecor_frame_set_fullscreen (*WAYLAND_libdecor_frame_set_fullscreen) +#define libdecor_frame_unset_fullscreen (*WAYLAND_libdecor_frame_unset_fullscreen) +#define libdecor_frame_set_capabilities (*WAYLAND_libdecor_frame_set_capabilities) +#define libdecor_frame_unset_capabilities (*WAYLAND_libdecor_frame_unset_capabilities) +#define libdecor_frame_has_capability (*WAYLAND_libdecor_frame_has_capability) +#define libdecor_frame_set_visibility (*WAYLAND_libdecor_frame_set_visibility) +#define libdecor_frame_is_visible (*WAYLAND_libdecor_frame_is_visible) +#define libdecor_frame_is_floating (*WAYLAND_libdecor_frame_is_floating) +#define libdecor_frame_set_parent (*WAYLAND_libdecor_frame_set_parent) +#define libdecor_frame_get_xdg_surface (*WAYLAND_libdecor_frame_get_xdg_surface) +#define libdecor_frame_get_xdg_toplevel (*WAYLAND_libdecor_frame_get_xdg_toplevel) +#define libdecor_frame_map (*WAYLAND_libdecor_frame_map) +#define libdecor_state_new (*WAYLAND_libdecor_state_new) +#define libdecor_state_free (*WAYLAND_libdecor_state_free) #define libdecor_configuration_get_content_size (*WAYLAND_libdecor_configuration_get_content_size) #define libdecor_configuration_get_window_state (*WAYLAND_libdecor_configuration_get_window_state) -#define libdecor_dispatch (*WAYLAND_libdecor_dispatch) +#define libdecor_dispatch (*WAYLAND_libdecor_dispatch) #endif #else /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandevents.c b/modules/SDL2/src/video/wayland/SDL_waylandevents.c index 1201781..160185f 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandevents.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandevents.c @@ -51,11 +51,11 @@ #ifdef SDL_INPUT_LINUXEV #include #else -#define BTN_LEFT (0x110) -#define BTN_RIGHT (0x111) -#define BTN_MIDDLE (0x112) -#define BTN_SIDE (0x113) -#define BTN_EXTRA (0x114) +#define BTN_LEFT (0x110) +#define BTN_RIGHT (0x111) +#define BTN_MIDDLE (0x112) +#define BTN_SIDE (0x113) +#define BTN_EXTRA (0x114) #endif #include #include @@ -75,27 +75,28 @@ /* Weston uses a ratio of 10 units per scroll tick */ #define WAYLAND_WHEEL_AXIS_UNIT 10 -struct SDL_WaylandTouchPoint { +struct SDL_WaylandTouchPoint +{ SDL_TouchID id; - float x; - float y; - struct wl_surface* surface; + wl_fixed_t x; + wl_fixed_t y; + struct wl_surface *surface; - struct SDL_WaylandTouchPoint* prev; - struct SDL_WaylandTouchPoint* next; + struct SDL_WaylandTouchPoint *prev; + struct SDL_WaylandTouchPoint *next; }; -struct SDL_WaylandTouchPointList { - struct SDL_WaylandTouchPoint* head; - struct SDL_WaylandTouchPoint* tail; +struct SDL_WaylandTouchPointList +{ + struct SDL_WaylandTouchPoint *head; + struct SDL_WaylandTouchPoint *tail; }; -static struct SDL_WaylandTouchPointList touch_points = {NULL, NULL}; +static struct SDL_WaylandTouchPointList touch_points = { NULL, NULL }; -static void -touch_add(SDL_TouchID id, float x, float y, struct wl_surface *surface) +static void touch_add(SDL_TouchID id, wl_fixed_t x, wl_fixed_t y, struct wl_surface *surface) { - struct SDL_WaylandTouchPoint* tp = SDL_malloc(sizeof(struct SDL_WaylandTouchPoint)); + struct SDL_WaylandTouchPoint *tp = SDL_malloc(sizeof(struct SDL_WaylandTouchPoint)); tp->id = id; tp->x = x; @@ -114,25 +115,24 @@ touch_add(SDL_TouchID id, float x, float y, struct wl_surface *surface) tp->next = NULL; } -static void -touch_update(SDL_TouchID id, float x, float y) +static void touch_update(SDL_TouchID id, wl_fixed_t x, wl_fixed_t y, struct wl_surface **surface) { - struct SDL_WaylandTouchPoint* tp = touch_points.head; + struct SDL_WaylandTouchPoint *tp = touch_points.head; while (tp) { if (tp->id == id) { tp->x = x; tp->y = y; + *surface = tp->surface; } tp = tp->next; } } -static void -touch_del(SDL_TouchID id, float* x, float* y, struct wl_surface **surface) +static void touch_del(SDL_TouchID id, wl_fixed_t *x, wl_fixed_t *y, struct wl_surface **surface) { - struct SDL_WaylandTouchPoint* tp = touch_points.head; + struct SDL_WaylandTouchPoint *tp = touch_points.head; while (tp) { if (tp->id == id) { @@ -163,25 +163,8 @@ touch_del(SDL_TouchID id, float* x, float* y, struct wl_surface **surface) } } -static struct wl_surface* -touch_surface(SDL_TouchID id) -{ - struct SDL_WaylandTouchPoint* tp = touch_points.head; - - while (tp) { - if (tp->id == id) { - return tp->surface; - } - - tp = tp->next; - } - - return NULL; -} - /* Returns SDL_TRUE if a key repeat event was due */ -static SDL_bool -keyboard_repeat_handle(SDL_WaylandKeyboardRepeat* repeat_info, uint32_t elapsed) +static SDL_bool keyboard_repeat_handle(SDL_WaylandKeyboardRepeat *repeat_info, uint32_t elapsed) { SDL_bool ret = SDL_FALSE; while ((elapsed - repeat_info->next_repeat_ms) < 0x80000000U) { @@ -197,17 +180,17 @@ keyboard_repeat_handle(SDL_WaylandKeyboardRepeat* repeat_info, uint32_t elapsed) return ret; } -static void -keyboard_repeat_clear(SDL_WaylandKeyboardRepeat* repeat_info) { +static void keyboard_repeat_clear(SDL_WaylandKeyboardRepeat *repeat_info) +{ if (!repeat_info->is_initialized) { return; } repeat_info->is_key_down = SDL_FALSE; } -static void -keyboard_repeat_set(SDL_WaylandKeyboardRepeat* repeat_info, uint32_t key, uint32_t wl_press_time, - uint32_t scancode, SDL_bool has_text, char text[8]) { +static void keyboard_repeat_set(SDL_WaylandKeyboardRepeat *repeat_info, uint32_t key, uint32_t wl_press_time, + uint32_t scancode, SDL_bool has_text, char text[8]) +{ if (!repeat_info->is_initialized || !repeat_info->repeat_rate) { return; } @@ -224,8 +207,7 @@ keyboard_repeat_set(SDL_WaylandKeyboardRepeat* repeat_info, uint32_t key, uint32 } } -static uint32_t -keyboard_repeat_get_key(SDL_WaylandKeyboardRepeat *repeat_info) +static uint32_t keyboard_repeat_get_key(SDL_WaylandKeyboardRepeat *repeat_info) { if (repeat_info->is_initialized && repeat_info->is_key_down) { return repeat_info->key; @@ -234,24 +216,24 @@ keyboard_repeat_get_key(SDL_WaylandKeyboardRepeat *repeat_info) return 0; } -static void -keyboard_repeat_set_text(SDL_WaylandKeyboardRepeat *repeat_info, const char text[8]) +static void keyboard_repeat_set_text(SDL_WaylandKeyboardRepeat *repeat_info, const char text[8]) { if (repeat_info->is_initialized) { SDL_memcpy(repeat_info->text, text, 8); } } -static SDL_bool keyboard_repeat_is_set(SDL_WaylandKeyboardRepeat* repeat_info) { +static SDL_bool keyboard_repeat_is_set(SDL_WaylandKeyboardRepeat *repeat_info) +{ return repeat_info->is_initialized && repeat_info->is_key_down; } -static SDL_bool keyboard_repeat_key_is_set(SDL_WaylandKeyboardRepeat* repeat_info, uint32_t key) { +static SDL_bool keyboard_repeat_key_is_set(SDL_WaylandKeyboardRepeat *repeat_info, uint32_t key) +{ return repeat_info->is_initialized && repeat_info->is_key_down && key == repeat_info->key; } -void -Wayland_SendWakeupEvent(_THIS, SDL_Window *window) +void Wayland_SendWakeupEvent(_THIS, SDL_Window *window) { SDL_VideoData *d = _this->driverdata; @@ -260,8 +242,7 @@ Wayland_SendWakeupEvent(_THIS, SDL_Window *window) WAYLAND_wl_display_flush(d->display); } -static int -dispatch_queued_events(SDL_VideoData *viddata) +static int dispatch_queued_events(SDL_VideoData *viddata) { int ret; @@ -279,8 +260,7 @@ dispatch_queued_events(SDL_VideoData *viddata) return ret >= 0 ? 1 : ret; } -int -Wayland_WaitEventTimeout(_THIS, int timeout) +int Wayland_WaitEventTimeout(_THIS, int timeout) { SDL_VideoData *d = _this->driverdata; struct SDL_WaylandInput *input = d->input; @@ -351,8 +331,7 @@ Wayland_WaitEventTimeout(_THIS, int timeout) } } -void -Wayland_PumpEvents(_THIS) +void Wayland_PumpEvents(_THIS) { SDL_VideoData *d = _this->driverdata; struct SDL_WaylandInput *input = d->input; @@ -408,9 +387,8 @@ Wayland_PumpEvents(_THIS) } } -static void -pointer_handle_motion(void *data, struct wl_pointer *pointer, - uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w) +static void pointer_handle_motion(void *data, struct wl_pointer *pointer, + uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w) { struct SDL_WaylandInput *input = data; SDL_WindowData *window = input->pointer_focus; @@ -419,21 +397,20 @@ pointer_handle_motion(void *data, struct wl_pointer *pointer, if (input->pointer_focus) { const float sx_f = (float)wl_fixed_to_double(sx_w); const float sy_f = (float)wl_fixed_to_double(sy_w); - const int sx = (int)SDL_floorf(sx_f * window->pointer_scale_x); - const int sy = (int)SDL_floorf(sy_f * window->pointer_scale_y); + const int sx = (int)SDL_floorf(sx_f * window->pointer_scale_x); + const int sy = (int)SDL_floorf(sy_f * window->pointer_scale_y); SDL_SendMouseMotion(window->sdlwindow, 0, 0, sx, sy); } } -static void -pointer_handle_enter(void *data, struct wl_pointer *pointer, - uint32_t serial, struct wl_surface *surface, - wl_fixed_t sx_w, wl_fixed_t sy_w) +static void pointer_handle_enter(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface, + wl_fixed_t sx_w, wl_fixed_t sy_w) { struct SDL_WaylandInput *input = data; SDL_WindowData *window; - if (!surface) { + if (surface == NULL) { /* enter event for a window we've just destroyed */ return; } @@ -466,13 +443,12 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, } } -static void -pointer_handle_leave(void *data, struct wl_pointer *pointer, - uint32_t serial, struct wl_surface *surface) +static void pointer_handle_leave(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface) { struct SDL_WaylandInput *input = data; - if (!surface || !SDL_WAYLAND_own_surface(surface)) { + if (surface == NULL || !SDL_WAYLAND_own_surface(surface)) { return; } @@ -482,8 +458,7 @@ pointer_handle_leave(void *data, struct wl_pointer *pointer, } } -static SDL_bool -ProcessHitTest(struct SDL_WaylandInput *input, uint32_t serial) +static SDL_bool ProcessHitTest(struct SDL_WaylandInput *input, uint32_t serial) { SDL_WindowData *window_data = input->pointer_focus; SDL_Window *window = window_data->sdlwindow; @@ -509,58 +484,58 @@ ProcessHitTest(struct SDL_WaylandInput *input, uint32_t serial) #endif switch (rc) { - case SDL_HITTEST_DRAGGABLE: + case SDL_HITTEST_DRAGGABLE: #ifdef HAVE_LIBDECOR_H - if (window_data->shell_surface_type == WAYLAND_SURFACE_LIBDECOR) { - if (window_data->shell_surface.libdecor.frame) { - libdecor_frame_move(window_data->shell_surface.libdecor.frame, input->seat, serial); - } - } else + if (window_data->shell_surface_type == WAYLAND_SURFACE_LIBDECOR) { + if (window_data->shell_surface.libdecor.frame) { + libdecor_frame_move(window_data->shell_surface.libdecor.frame, input->seat, serial); + } + } else #endif if (window_data->shell_surface_type == WAYLAND_SURFACE_XDG_TOPLEVEL) { - if (window_data->shell_surface.xdg.roleobj.toplevel) { - xdg_toplevel_move(window_data->shell_surface.xdg.roleobj.toplevel, - input->seat, - serial); - } + if (window_data->shell_surface.xdg.roleobj.toplevel) { + xdg_toplevel_move(window_data->shell_surface.xdg.roleobj.toplevel, + input->seat, + serial); } - return SDL_TRUE; - - case SDL_HITTEST_RESIZE_TOPLEFT: - case SDL_HITTEST_RESIZE_TOP: - case SDL_HITTEST_RESIZE_TOPRIGHT: - case SDL_HITTEST_RESIZE_RIGHT: - case SDL_HITTEST_RESIZE_BOTTOMRIGHT: - case SDL_HITTEST_RESIZE_BOTTOM: - case SDL_HITTEST_RESIZE_BOTTOMLEFT: - case SDL_HITTEST_RESIZE_LEFT: + } + return SDL_TRUE; + + case SDL_HITTEST_RESIZE_TOPLEFT: + case SDL_HITTEST_RESIZE_TOP: + case SDL_HITTEST_RESIZE_TOPRIGHT: + case SDL_HITTEST_RESIZE_RIGHT: + case SDL_HITTEST_RESIZE_BOTTOMRIGHT: + case SDL_HITTEST_RESIZE_BOTTOM: + case SDL_HITTEST_RESIZE_BOTTOMLEFT: + case SDL_HITTEST_RESIZE_LEFT: #ifdef HAVE_LIBDECOR_H - if (window_data->shell_surface_type == WAYLAND_SURFACE_LIBDECOR) { - if (window_data->shell_surface.libdecor.frame) { - libdecor_frame_resize(window_data->shell_surface.libdecor.frame, input->seat, serial, directions_libdecor[rc - SDL_HITTEST_RESIZE_TOPLEFT]); - } - } else + if (window_data->shell_surface_type == WAYLAND_SURFACE_LIBDECOR) { + if (window_data->shell_surface.libdecor.frame) { + libdecor_frame_resize(window_data->shell_surface.libdecor.frame, input->seat, serial, directions_libdecor[rc - SDL_HITTEST_RESIZE_TOPLEFT]); + } + } else #endif if (window_data->shell_surface_type == WAYLAND_SURFACE_XDG_TOPLEVEL) { - if (window_data->shell_surface.xdg.roleobj.toplevel) { - xdg_toplevel_resize(window_data->shell_surface.xdg.roleobj.toplevel, - input->seat, - serial, - directions[rc - SDL_HITTEST_RESIZE_TOPLEFT]); - } + if (window_data->shell_surface.xdg.roleobj.toplevel) { + xdg_toplevel_resize(window_data->shell_surface.xdg.roleobj.toplevel, + input->seat, + serial, + directions[rc - SDL_HITTEST_RESIZE_TOPLEFT]); } - return SDL_TRUE; + } + return SDL_TRUE; - default: return SDL_FALSE; + default: + return SDL_FALSE; } } return SDL_FALSE; } -static void -pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial, - uint32_t time, uint32_t button, uint32_t state_w) +static void pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial, + uint32_t time, uint32_t button, uint32_t state_w) { SDL_WindowData *window = input->pointer_focus; enum wl_pointer_button_state state = state_w; @@ -569,26 +544,26 @@ pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial, if (window) { SDL_VideoData *viddata = window->waylandData; switch (button) { - case BTN_LEFT: - sdl_button = SDL_BUTTON_LEFT; - if (ProcessHitTest(input, serial)) { - return; /* don't pass this event on to app. */ - } - break; - case BTN_MIDDLE: - sdl_button = SDL_BUTTON_MIDDLE; - break; - case BTN_RIGHT: - sdl_button = SDL_BUTTON_RIGHT; - break; - case BTN_SIDE: - sdl_button = SDL_BUTTON_X1; - break; - case BTN_EXTRA: - sdl_button = SDL_BUTTON_X2; - break; - default: - return; + case BTN_LEFT: + sdl_button = SDL_BUTTON_LEFT; + if (ProcessHitTest(input, serial)) { + return; /* don't pass this event on to app. */ + } + break; + case BTN_MIDDLE: + sdl_button = SDL_BUTTON_MIDDLE; + break; + case BTN_RIGHT: + sdl_button = SDL_BUTTON_RIGHT; + break; + case BTN_SIDE: + sdl_button = SDL_BUTTON_X1; + break; + case BTN_EXTRA: + sdl_button = SDL_BUTTON_X2; + break; + default: + return; } /* Wayland won't let you "capture" the mouse, but it will @@ -596,7 +571,7 @@ pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial, drag outside of it, until you let go of all buttons (even if you add or remove presses outside the window, as long as any button is still down, the capture remains) */ - if (state) { /* update our mask of currently-pressed buttons */ + if (state) { /* update our mask of currently-pressed buttons */ input->buttons_pressed |= SDL_BUTTON(sdl_button); } else { input->buttons_pressed &= ~(SDL_BUTTON(sdl_button)); @@ -619,18 +594,16 @@ pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial, } } -static void -pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial, - uint32_t time, uint32_t button, uint32_t state_w) +static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial, + uint32_t time, uint32_t button, uint32_t state_w) { struct SDL_WaylandInput *input = data; pointer_handle_button_common(input, serial, time, button, state_w); } -static void -pointer_handle_axis_common_v1(struct SDL_WaylandInput *input, - uint32_t time, uint32_t axis, wl_fixed_t value) +static void pointer_handle_axis_common_v1(struct SDL_WaylandInput *input, + uint32_t time, uint32_t axis, wl_fixed_t value) { SDL_WindowData *window = input->pointer_focus; enum wl_pointer_axis a = axis; @@ -638,16 +611,16 @@ pointer_handle_axis_common_v1(struct SDL_WaylandInput *input, if (input->pointer_focus) { switch (a) { - case WL_POINTER_AXIS_VERTICAL_SCROLL: - x = 0; - y = 0 - (float)wl_fixed_to_double(value); - break; - case WL_POINTER_AXIS_HORIZONTAL_SCROLL: - x = (float)wl_fixed_to_double(value); - y = 0; - break; - default: - return; + case WL_POINTER_AXIS_VERTICAL_SCROLL: + x = 0; + y = 0 - (float)wl_fixed_to_double(value); + break; + case WL_POINTER_AXIS_HORIZONTAL_SCROLL: + x = (float)wl_fixed_to_double(value); + y = 0; + break; + default: + return; } x /= WAYLAND_WHEEL_AXIS_UNIT; @@ -657,9 +630,8 @@ pointer_handle_axis_common_v1(struct SDL_WaylandInput *input, } } -static void -pointer_handle_axis_common(struct SDL_WaylandInput *input, enum SDL_WaylandAxisEvent type, - uint32_t axis, wl_fixed_t value) +static void pointer_handle_axis_common(struct SDL_WaylandInput *input, enum SDL_WaylandAxisEvent type, + uint32_t axis, wl_fixed_t value) { enum wl_pointer_axis a = axis; @@ -731,26 +703,25 @@ pointer_handle_axis_common(struct SDL_WaylandInput *input, enum SDL_WaylandAxisE } } -static void -pointer_handle_axis(void *data, struct wl_pointer *pointer, - uint32_t time, uint32_t axis, wl_fixed_t value) +static void pointer_handle_axis(void *data, struct wl_pointer *pointer, + uint32_t time, uint32_t axis, wl_fixed_t value) { struct SDL_WaylandInput *input = data; - if(wl_seat_get_version(input->seat) >= 5) + if (wl_seat_get_version(input->seat) >= 5) { pointer_handle_axis_common(input, AXIS_EVENT_CONTINUOUS, axis, value); - else + } else { pointer_handle_axis_common_v1(input, time, axis, value); + } } -static void -pointer_handle_frame(void *data, struct wl_pointer *pointer) +static void pointer_handle_frame(void *data, struct wl_pointer *pointer) { struct SDL_WaylandInput *input = data; SDL_WindowData *window = input->pointer_focus; float x, y; - switch(input->pointer_curr_axis_info.x_axis_type) { + switch (input->pointer_curr_axis_info.x_axis_type) { case AXIS_EVENT_CONTINUOUS: x = input->pointer_curr_axis_info.x / WAYLAND_WHEEL_AXIS_UNIT; break; @@ -765,7 +736,7 @@ pointer_handle_frame(void *data, struct wl_pointer *pointer) break; } - switch(input->pointer_curr_axis_info.y_axis_type) { + switch (input->pointer_curr_axis_info.y_axis_type) { case AXIS_EVENT_CONTINUOUS: y = input->pointer_curr_axis_info.y / WAYLAND_WHEEL_AXIS_UNIT; break; @@ -781,39 +752,35 @@ pointer_handle_frame(void *data, struct wl_pointer *pointer) } /* clear pointer_curr_axis_info for next frame */ - SDL_memset(&input->pointer_curr_axis_info, 0, sizeof input->pointer_curr_axis_info); + SDL_memset(&input->pointer_curr_axis_info, 0, sizeof(input->pointer_curr_axis_info)); if (x != 0.0f || y != 0.0f) { SDL_SendMouseWheel(window->sdlwindow, 0, x, y, SDL_MOUSEWHEEL_NORMAL); } } -static void -pointer_handle_axis_source(void *data, struct wl_pointer *pointer, - uint32_t axis_source) +static void pointer_handle_axis_source(void *data, struct wl_pointer *pointer, + uint32_t axis_source) { /* unimplemented */ } -static void -pointer_handle_axis_stop(void *data, struct wl_pointer *pointer, - uint32_t time, uint32_t axis) +static void pointer_handle_axis_stop(void *data, struct wl_pointer *pointer, + uint32_t time, uint32_t axis) { /* unimplemented */ } -static void -pointer_handle_axis_discrete(void *data, struct wl_pointer *pointer, - uint32_t axis, int32_t discrete) +static void pointer_handle_axis_discrete(void *data, struct wl_pointer *pointer, + uint32_t axis, int32_t discrete) { struct SDL_WaylandInput *input = data; pointer_handle_axis_common(input, AXIS_EVENT_DISCRETE, axis, wl_fixed_from_int(discrete)); } -static void -pointer_handle_axis_value120(void *data, struct wl_pointer *pointer, - uint32_t axis, int32_t value120) +static void pointer_handle_axis_value120(void *data, struct wl_pointer *pointer, + uint32_t axis, int32_t value120) { struct SDL_WaylandInput *input = data; @@ -826,71 +793,89 @@ static const struct wl_pointer_listener pointer_listener = { pointer_handle_motion, pointer_handle_button, pointer_handle_axis, - pointer_handle_frame, /* Version 5 */ - pointer_handle_axis_source, /* Version 5 */ - pointer_handle_axis_stop, /* Version 5 */ - pointer_handle_axis_discrete, /* Version 5 */ - pointer_handle_axis_value120 /* Version 8 */ + pointer_handle_frame, /* Version 5 */ + pointer_handle_axis_source, /* Version 5 */ + pointer_handle_axis_stop, /* Version 5 */ + pointer_handle_axis_discrete, /* Version 5 */ + pointer_handle_axis_value120 /* Version 8 */ }; -static void -touch_handler_down(void *data, struct wl_touch *touch, unsigned int serial, - unsigned int timestamp, struct wl_surface *surface, - int id, wl_fixed_t fx, wl_fixed_t fy) +static void touch_handler_down(void *data, struct wl_touch *touch, uint32_t serial, + uint32_t timestamp, struct wl_surface *surface, + int id, wl_fixed_t fx, wl_fixed_t fy) { - SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(surface); - const double dblx = wl_fixed_to_double(fx) * window_data->pointer_scale_x; - const double dbly = wl_fixed_to_double(fy) * window_data->pointer_scale_y; - const float x = dblx / window_data->sdlwindow->w; - const float y = dbly / window_data->sdlwindow->h; + SDL_WindowData *window_data; + + /* Check that this surface belongs to one of the SDL windows */ + if (!SDL_WAYLAND_own_surface(surface)) { + return; + } - touch_add(id, x, y, surface); + touch_add(id, fx, fy, surface); + window_data = (SDL_WindowData *)wl_surface_get_user_data(surface); - SDL_SendTouch((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, window_data->sdlwindow, SDL_TRUE, x, y, 1.0f); + if (window_data) { + const double dblx = wl_fixed_to_double(fx) * window_data->pointer_scale_x; + const double dbly = wl_fixed_to_double(fy) * window_data->pointer_scale_y; + const float x = dblx / window_data->sdlwindow->w; + const float y = dbly / window_data->sdlwindow->h; + + SDL_SendTouch((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, + window_data->sdlwindow, SDL_TRUE, x, y, 1.0f); + } } -static void -touch_handler_up(void *data, struct wl_touch *touch, unsigned int serial, - unsigned int timestamp, int id) +static void touch_handler_up(void *data, struct wl_touch *touch, uint32_t serial, + uint32_t timestamp, int id) { - float x = 0, y = 0; + wl_fixed_t fx = 0, fy = 0; struct wl_surface *surface = NULL; - SDL_Window *window = NULL; - touch_del(id, &x, &y, &surface); + touch_del(id, &fx, &fy, &surface); if (surface) { SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(surface); - window = window_data->sdlwindow; - } - SDL_SendTouch((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, window, SDL_FALSE, x, y, 0.0f); + if (window_data) { + const double dblx = wl_fixed_to_double(fx) * window_data->pointer_scale_x; + const double dbly = wl_fixed_to_double(fy) * window_data->pointer_scale_y; + const float x = dblx / window_data->sdlwindow->w; + const float y = dbly / window_data->sdlwindow->h; + + SDL_SendTouch((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, + window_data->sdlwindow, SDL_FALSE, x, y, 1.0f); + } + } } -static void -touch_handler_motion(void *data, struct wl_touch *touch, unsigned int timestamp, - int id, wl_fixed_t fx, wl_fixed_t fy) +static void touch_handler_motion(void *data, struct wl_touch *touch, uint32_t timestamp, + int id, wl_fixed_t fx, wl_fixed_t fy) { - SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(touch_surface(id)); - const double dblx = wl_fixed_to_double(fx) * window_data->pointer_scale_x; - const double dbly = wl_fixed_to_double(fy) * window_data->pointer_scale_y; - const float x = dblx / window_data->sdlwindow->w; - const float y = dbly / window_data->sdlwindow->h; + struct wl_surface *surface = NULL; - touch_update(id, x, y); - SDL_SendTouchMotion((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, window_data->sdlwindow, x, y, 1.0f); -} + touch_update(id, fx, fy, &surface); -static void -touch_handler_frame(void *data, struct wl_touch *touch) -{ + if (surface) { + SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(surface); + + if (window_data) { + const double dblx = wl_fixed_to_double(fx) * window_data->pointer_scale_x; + const double dbly = wl_fixed_to_double(fy) * window_data->pointer_scale_y; + const float x = dblx / window_data->sdlwindow->w; + const float y = dbly / window_data->sdlwindow->h; + SDL_SendTouchMotion((SDL_TouchID)(intptr_t)touch, (SDL_FingerID)id, + window_data->sdlwindow, x, y, 1.0f); + } + } } -static void -touch_handler_cancel(void *data, struct wl_touch *touch) +static void touch_handler_frame(void *data, struct wl_touch *touch) { +} +static void touch_handler_cancel(void *data, struct wl_touch *touch) +{ } static const struct wl_touch_listener touch_listener = { @@ -909,8 +894,7 @@ typedef struct Wayland_Keymap SDL_Keycode keymap[SDL_NUM_SCANCODES]; } Wayland_Keymap; -static void -Wayland_keymap_iter(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) +static void Wayland_keymap_iter(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) { const xkb_keysym_t *syms; Wayland_Keymap *sdlKeymap = (Wayland_Keymap *)data; @@ -956,15 +940,14 @@ Wayland_keymap_iter(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) } } -static void -keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, - uint32_t format, int fd, uint32_t size) +static void keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, + uint32_t format, int fd, uint32_t size) { struct SDL_WaylandInput *input = data; char *map_str; const char *locale; - if (!data) { + if (data == NULL) { close(fd); return; } @@ -1035,9 +1018,12 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, */ /* Look up the preferred locale, falling back to "C" as default */ - if (!(locale = SDL_getenv("LC_ALL"))) { - if (!(locale = SDL_getenv("LC_CTYPE"))) { - if (!(locale = SDL_getenv("LANG"))) { + locale = SDL_getenv("LC_ALL"); + if (locale == NULL) { + locale = SDL_getenv("LC_CTYPE"); + if (locale == NULL) { + locale = SDL_getenv("LANG"); + if (locale == NULL) { locale = "C"; } } @@ -1062,8 +1048,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, * Virtual keyboards can have arbitrary layouts, arbitrary scancodes/keycodes, etc... * Key presses from these devices must be looked up by their keysym value. */ -static SDL_Scancode -Wayland_get_scancode_from_key(struct SDL_WaylandInput *input, uint32_t key) +static SDL_Scancode Wayland_get_scancode_from_key(struct SDL_WaylandInput *input, uint32_t key) { SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN; @@ -1079,10 +1064,9 @@ Wayland_get_scancode_from_key(struct SDL_WaylandInput *input, uint32_t key) return scancode; } -static void -keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, - uint32_t serial, struct wl_surface *surface, - struct wl_array *keys) +static void keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, + uint32_t serial, struct wl_surface *surface, + struct wl_array *keys) { /* Caps Lock not included because it only makes sense to consider modifiers * that get held down, for the case where a user clicks on an unfocused @@ -1103,7 +1087,7 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, SDL_WindowData *window; uint32_t *key; - if (!surface) { + if (surface == NULL) { /* enter event for a window we've just destroyed */ return; } @@ -1129,7 +1113,7 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, const SDL_Scancode scancode = Wayland_get_scancode_from_key(input, *key + 8); if (scancode != SDL_SCANCODE_UNKNOWN) { - for (uint32_t i = 0; i < sizeof mod_scancodes / sizeof *mod_scancodes; ++i) { + for (uint32_t i = 0; i < SDL_arraysize(mod_scancodes); ++i) { if (mod_scancodes[i] == scancode) { SDL_SendKeyboardKey(SDL_PRESSED, scancode); break; @@ -1139,14 +1123,13 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, } } -static void -keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, - uint32_t serial, struct wl_surface *surface) +static void keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, + uint32_t serial, struct wl_surface *surface) { struct SDL_WaylandInput *input = data; SDL_WindowData *window; - if (!surface || !SDL_WAYLAND_own_surface(surface)) { + if (surface == NULL || !SDL_WAYLAND_own_surface(surface)) { return; } @@ -1168,14 +1151,13 @@ keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, #endif } -static SDL_bool -keyboard_input_get_text(char text[8], const struct SDL_WaylandInput *input, uint32_t key, Uint8 state, SDL_bool *handled_by_ime) +static SDL_bool keyboard_input_get_text(char text[8], const struct SDL_WaylandInput *input, uint32_t key, Uint8 state, SDL_bool *handled_by_ime) { SDL_WindowData *window = input->keyboard_focus; const xkb_keysym_t *syms; xkb_keysym_t sym; - if (!window || window->keyboard_device != input || !input->xkb.state) { + if (window == NULL || window->keyboard_device != input || !input->xkb.state) { return SDL_FALSE; } @@ -1199,31 +1181,30 @@ keyboard_input_get_text(char text[8], const struct SDL_WaylandInput *input, uint } if (input->xkb.compose_state && WAYLAND_xkb_compose_state_feed(input->xkb.compose_state, sym) == XKB_COMPOSE_FEED_ACCEPTED) { - switch(WAYLAND_xkb_compose_state_get_status(input->xkb.compose_state)) { - case XKB_COMPOSE_COMPOSING: - if (handled_by_ime) { - *handled_by_ime = SDL_TRUE; - } - return SDL_TRUE; - case XKB_COMPOSE_CANCELLED: - default: - sym = XKB_KEY_NoSymbol; - break; - case XKB_COMPOSE_NOTHING: - break; - case XKB_COMPOSE_COMPOSED: - sym = WAYLAND_xkb_compose_state_get_one_sym(input->xkb.compose_state); - break; + switch (WAYLAND_xkb_compose_state_get_status(input->xkb.compose_state)) { + case XKB_COMPOSE_COMPOSING: + if (handled_by_ime) { + *handled_by_ime = SDL_TRUE; + } + return SDL_TRUE; + case XKB_COMPOSE_CANCELLED: + default: + sym = XKB_KEY_NoSymbol; + break; + case XKB_COMPOSE_NOTHING: + break; + case XKB_COMPOSE_COMPOSED: + sym = WAYLAND_xkb_compose_state_get_one_sym(input->xkb.compose_state); + break; } } return WAYLAND_xkb_keysym_to_utf8(sym, text, 8) > 0; } -static void -keyboard_handle_key(void *data, struct wl_keyboard *keyboard, - uint32_t serial, uint32_t time, uint32_t key, - uint32_t state_w) +static void keyboard_handle_key(void *data, struct wl_keyboard *keyboard, + uint32_t serial, uint32_t time, uint32_t key, + uint32_t state_w) { struct SDL_WaylandInput *input = data; enum wl_keyboard_key_state state = state_w; @@ -1266,18 +1247,20 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, } } -static void -keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, - uint32_t serial, uint32_t mods_depressed, - uint32_t mods_latched, uint32_t mods_locked, - uint32_t group) +static void keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, + uint32_t serial, uint32_t mods_depressed, + uint32_t mods_latched, uint32_t mods_locked, + uint32_t group) { struct SDL_WaylandInput *input = data; Wayland_Keymap keymap; const uint32_t modstate = (mods_depressed | mods_latched | mods_locked); WAYLAND_xkb_state_update_mask(input->xkb.state, mods_depressed, mods_latched, - mods_locked, 0, 0, group); + mods_locked, 0, 0, group); + + SDL_ToggleModState(KMOD_NUM, modstate & input->xkb.idx_num); + SDL_ToggleModState(KMOD_CAPS, modstate & input->xkb.idx_caps); /* Toggle the modifier states for virtual keyboards, as they may not send key presses. */ if (input->keyboard_is_virtual) { @@ -1285,12 +1268,10 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, SDL_ToggleModState(KMOD_CTRL, modstate & input->xkb.idx_ctrl); SDL_ToggleModState(KMOD_ALT, modstate & input->xkb.idx_alt); SDL_ToggleModState(KMOD_GUI, modstate & input->xkb.idx_gui); - SDL_ToggleModState(KMOD_NUM, modstate & input->xkb.idx_num); - SDL_ToggleModState(KMOD_CAPS, modstate & input->xkb.idx_caps); } /* If a key is repeating, update the text to apply the modifier. */ - if(keyboard_repeat_is_set(&input->keyboard_repeat)) { + if (keyboard_repeat_is_set(&input->keyboard_repeat)) { char text[8]; const uint32_t key = keyboard_repeat_get_key(&input->keyboard_repeat); @@ -1315,9 +1296,8 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, SDL_SetKeymap(0, keymap.keymap, SDL_NUM_SCANCODES, SDL_TRUE); } -static void -keyboard_handle_repeat_info(void *data, struct wl_keyboard *wl_keyboard, - int32_t rate, int32_t delay) +static void keyboard_handle_repeat_info(void *data, struct wl_keyboard *wl_keyboard, + int32_t rate, int32_t delay) { struct SDL_WaylandInput *input = data; input->keyboard_repeat.repeat_rate = SDL_clamp(rate, 0, 1000); @@ -1331,18 +1311,17 @@ static const struct wl_keyboard_listener keyboard_listener = { keyboard_handle_leave, keyboard_handle_key, keyboard_handle_modifiers, - keyboard_handle_repeat_info, /* Version 4 */ + keyboard_handle_repeat_info, /* Version 4 */ }; -static void -seat_handle_capabilities(void *data, struct wl_seat *seat, - enum wl_seat_capability caps) +static void seat_handle_capabilities(void *data, struct wl_seat *seat, + enum wl_seat_capability caps) { struct SDL_WaylandInput *input = data; if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) { input->pointer = wl_seat_get_pointer(seat); - SDL_memset(&input->pointer_curr_axis_info, 0, sizeof input->pointer_curr_axis_info); + SDL_memset(&input->pointer_curr_axis_info, 0, sizeof(input->pointer_curr_axis_info)); input->display->pointer = input->pointer; wl_pointer_set_user_data(input->pointer, input); wl_pointer_add_listener(input->pointer, &pointer_listener, @@ -1358,7 +1337,7 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, SDL_AddTouch((SDL_TouchID)(intptr_t)input->touch, SDL_TOUCH_DEVICE_DIRECT, "wayland_touch"); wl_touch_set_user_data(input->touch, input); wl_touch_add_listener(input->touch, &touch_listener, - input); + input); } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) { SDL_DelTouch((SDL_TouchID)(intptr_t)input->touch); wl_touch_destroy(input->touch); @@ -1376,49 +1355,42 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, } } -static void -seat_handle_name(void *data, struct wl_seat *wl_seat, const char *name) +static void seat_handle_name(void *data, struct wl_seat *wl_seat, const char *name) { /* unimplemented */ } static const struct wl_seat_listener seat_listener = { seat_handle_capabilities, - seat_handle_name, /* Version 2 */ + seat_handle_name, /* Version 2 */ }; -static void -data_source_handle_target(void *data, struct wl_data_source *wl_data_source, - const char *mime_type) +static void data_source_handle_target(void *data, struct wl_data_source *wl_data_source, + const char *mime_type) { } -static void -data_source_handle_send(void *data, struct wl_data_source *wl_data_source, - const char *mime_type, int32_t fd) +static void data_source_handle_send(void *data, struct wl_data_source *wl_data_source, + const char *mime_type, int32_t fd) { Wayland_data_source_send((SDL_WaylandDataSource *)data, mime_type, fd); } -static void -data_source_handle_cancelled(void *data, struct wl_data_source *wl_data_source) +static void data_source_handle_cancelled(void *data, struct wl_data_source *wl_data_source) { Wayland_data_source_destroy(data); } -static void -data_source_handle_dnd_drop_performed(void *data, struct wl_data_source *wl_data_source) +static void data_source_handle_dnd_drop_performed(void *data, struct wl_data_source *wl_data_source) { } -static void -data_source_handle_dnd_finished(void *data, struct wl_data_source *wl_data_source) +static void data_source_handle_dnd_finished(void *data, struct wl_data_source *wl_data_source) { } -static void -data_source_handle_action(void *data, struct wl_data_source *wl_data_source, - uint32_t dnd_action) +static void data_source_handle_action(void *data, struct wl_data_source *wl_data_source, + uint32_t dnd_action) { } @@ -1431,16 +1403,14 @@ static const struct wl_data_source_listener data_source_listener = { data_source_handle_action, /* Version 3 */ }; -static void -primary_selection_source_send(void *data, struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1, - const char *mime_type, int32_t fd) +static void primary_selection_source_send(void *data, struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1, + const char *mime_type, int32_t fd) { Wayland_primary_selection_source_send((SDL_WaylandPrimarySelectionSource *)data, mime_type, fd); } -static void -primary_selection_source_cancelled(void *data, struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1) +static void primary_selection_source_cancelled(void *data, struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1) { Wayland_primary_selection_source_destroy(data); } @@ -1450,8 +1420,7 @@ static const struct zwp_primary_selection_source_v1_listener primary_selection_s primary_selection_source_cancelled, }; -SDL_WaylandDataSource* -Wayland_data_source_create(_THIS) +SDL_WaylandDataSource *Wayland_data_source_create(_THIS) { SDL_WaylandDataSource *data_source = NULL; SDL_VideoData *driver_data = NULL; @@ -1464,13 +1433,13 @@ Wayland_data_source_create(_THIS) if (driver_data->data_device_manager != NULL) { id = wl_data_device_manager_create_data_source( - driver_data->data_device_manager); + driver_data->data_device_manager); } if (id == NULL) { SDL_SetError("Wayland unable to create data source"); } else { - data_source = SDL_calloc(1, sizeof *data_source); + data_source = SDL_calloc(1, sizeof(*data_source)); if (data_source == NULL) { SDL_OutOfMemory(); wl_data_source_destroy(id); @@ -1486,8 +1455,7 @@ Wayland_data_source_create(_THIS) return data_source; } -SDL_WaylandPrimarySelectionSource* -Wayland_primary_selection_source_create(_THIS) +SDL_WaylandPrimarySelectionSource *Wayland_primary_selection_source_create(_THIS) { SDL_WaylandPrimarySelectionSource *primary_selection_source = NULL; SDL_VideoData *driver_data = NULL; @@ -1500,13 +1468,13 @@ Wayland_primary_selection_source_create(_THIS) if (driver_data->primary_selection_device_manager != NULL) { id = zwp_primary_selection_device_manager_v1_create_source( - driver_data->primary_selection_device_manager); + driver_data->primary_selection_device_manager); } if (id == NULL) { SDL_SetError("Wayland unable to create primary selection source"); } else { - primary_selection_source = SDL_calloc(1, sizeof *primary_selection_source); + primary_selection_source = SDL_calloc(1, sizeof(*primary_selection_source)); if (primary_selection_source == NULL) { SDL_OutOfMemory(); zwp_primary_selection_source_v1_destroy(id); @@ -1514,30 +1482,27 @@ Wayland_primary_selection_source_create(_THIS) WAYLAND_wl_list_init(&(primary_selection_source->mimes)); primary_selection_source->source = id; zwp_primary_selection_source_v1_add_listener(id, &primary_selection_source_listener, - primary_selection_source); + primary_selection_source); } } } return primary_selection_source; } -static void -data_offer_handle_offer(void *data, struct wl_data_offer *wl_data_offer, - const char *mime_type) +static void data_offer_handle_offer(void *data, struct wl_data_offer *wl_data_offer, + const char *mime_type) { SDL_WaylandDataOffer *offer = data; Wayland_data_offer_add_mime(offer, mime_type); } -static void -data_offer_handle_source_actions(void *data, struct wl_data_offer *wl_data_offer, - uint32_t source_actions) +static void data_offer_handle_source_actions(void *data, struct wl_data_offer *wl_data_offer, + uint32_t source_actions) { } -static void -data_offer_handle_actions(void *data, struct wl_data_offer *wl_data_offer, - uint32_t dnd_action) +static void data_offer_handle_actions(void *data, struct wl_data_offer *wl_data_offer, + uint32_t dnd_action) { } @@ -1547,9 +1512,8 @@ static const struct wl_data_offer_listener data_offer_listener = { data_offer_handle_actions, /* Version 3 */ }; -static void -primary_selection_offer_handle_offer(void *data, struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1, - const char *mime_type) +static void primary_selection_offer_handle_offer(void *data, struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1, + const char *mime_type) { SDL_WaylandPrimarySelectionOffer *offer = data; Wayland_primary_selection_offer_add_mime(offer, mime_type); @@ -1559,13 +1523,12 @@ static const struct zwp_primary_selection_offer_v1_listener primary_selection_of primary_selection_offer_handle_offer, }; -static void -data_device_handle_data_offer(void *data, struct wl_data_device *wl_data_device, - struct wl_data_offer *id) +static void data_device_handle_data_offer(void *data, struct wl_data_device *wl_data_device, + struct wl_data_offer *id) { SDL_WaylandDataOffer *data_offer = NULL; - data_offer = SDL_calloc(1, sizeof *data_offer); + data_offer = SDL_calloc(1, sizeof(*data_offer)); if (data_offer == NULL) { SDL_OutOfMemory(); } else { @@ -1577,10 +1540,9 @@ data_device_handle_data_offer(void *data, struct wl_data_device *wl_data_device, } } -static void -data_device_handle_enter(void *data, struct wl_data_device *wl_data_device, - uint32_t serial, struct wl_surface *surface, - wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id) +static void data_device_handle_enter(void *data, struct wl_data_device *wl_data_device, + uint32_t serial, struct wl_surface *surface, + wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id) { SDL_WaylandDataDevice *data_device = data; SDL_bool has_mime = SDL_FALSE; @@ -1607,11 +1569,18 @@ data_device_handle_enter(void *data, struct wl_data_device *wl_data_device, wl_data_offer_set_actions(data_device->drag_offer->offer, dnd_action, dnd_action); } + + /* find the current window */ + if (surface && SDL_WAYLAND_own_surface(surface)) { + SDL_WindowData *window = (SDL_WindowData *)wl_surface_get_user_data(surface); + if (window) { + data_device->dnd_window = window->sdlwindow; + } + } } } -static void -data_device_handle_leave(void *data, struct wl_data_device *wl_data_device) +static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_device) { SDL_WaylandDataDevice *data_device = data; SDL_WaylandDataOffer *offer = NULL; @@ -1622,9 +1591,8 @@ data_device_handle_leave(void *data, struct wl_data_device *wl_data_device) } } -static void -data_device_handle_motion(void *data, struct wl_data_device *wl_data_device, - uint32_t time, wl_fixed_t x, wl_fixed_t y) +static void data_device_handle_motion(void *data, struct wl_data_device *wl_data_device, + uint32_t time, wl_fixed_t x, wl_fixed_t y) { } @@ -1643,7 +1611,8 @@ data_device_handle_motion(void *data, struct wl_data_device *wl_data_device, * * FIXME: This was shamelessly copied from SDL_x11events.c */ -static int Wayland_URIDecode(char *buf, int len) { +static int Wayland_URIDecode(char *buf, int len) +{ int ri, wi, di; char decode = '\0'; if (buf == NULL || len < 0) { @@ -1708,44 +1677,47 @@ static int Wayland_URIDecode(char *buf, int len) { * * FIXME: This was shamelessly copied from SDL_x11events.c */ -static char* Wayland_URIToLocal(char* uri) { +static char *Wayland_URIToLocal(char *uri) +{ char *file = NULL; SDL_bool local; - if (SDL_memcmp(uri,"file:/",6) == 0) uri += 6; /* local file? */ - else if (SDL_strstr(uri,":/") != NULL) return file; /* wrong scheme */ + if (SDL_memcmp(uri, "file:/", 6) == 0) { + uri += 6; /* local file? */ + } else if (SDL_strstr(uri, ":/") != NULL) { + return file; /* wrong scheme */ + } local = uri[0] != '/' || (uri[0] != '\0' && uri[1] == '/'); /* got a hostname? */ if (!local && uri[0] == '/' && uri[2] != '/') { - char* hostname_end = SDL_strchr(uri+1, '/'); - if (hostname_end != NULL) { - char hostname[ 257 ]; - if (gethostname(hostname, 255) == 0) { - hostname[ 256 ] = '\0'; - if (SDL_memcmp(uri+1, hostname, hostname_end - (uri+1)) == 0) { - uri = hostname_end + 1; - local = SDL_TRUE; + char *hostname_end = SDL_strchr(uri + 1, '/'); + if (hostname_end != NULL) { + char hostname[257]; + if (gethostname(hostname, 255) == 0) { + hostname[256] = '\0'; + if (SDL_memcmp(uri + 1, hostname, hostname_end - (uri + 1)) == 0) { + uri = hostname_end + 1; + local = SDL_TRUE; + } } - } - } + } } if (local) { - file = uri; - /* Convert URI escape sequences to real characters */ - Wayland_URIDecode(file, 0); - if (uri[1] == '/') { - file++; - } else { - file--; - } + file = uri; + /* Convert URI escape sequences to real characters */ + Wayland_URIDecode(file, 0); + if (uri[1] == '/') { + file++; + } else { + file--; + } } return file; } -static void -data_device_handle_drop(void *data, struct wl_data_device *wl_data_device) +static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_device) { SDL_WaylandDataDevice *data_device = data; @@ -1756,23 +1728,22 @@ data_device_handle_drop(void *data, struct wl_data_device *wl_data_device) &length, FILE_MIME, SDL_TRUE); if (buffer) { char *saveptr = NULL; - char *token = SDL_strtokr((char *) buffer, "\r\n", &saveptr); + char *token = SDL_strtokr((char *)buffer, "\r\n", &saveptr); while (token != NULL) { char *fn = Wayland_URIToLocal(token); if (fn) { - SDL_SendDropFile(NULL, fn); /* FIXME: Window? */ + SDL_SendDropFile(data_device->dnd_window, fn); } token = SDL_strtokr(NULL, "\r\n", &saveptr); } - SDL_SendDropComplete(NULL); /* FIXME: Window? */ + SDL_SendDropComplete(data_device->dnd_window); SDL_free(buffer); } } } -static void -data_device_handle_selection(void *data, struct wl_data_device *wl_data_device, - struct wl_data_offer *id) +static void data_device_handle_selection(void *data, struct wl_data_device *wl_data_device, + struct wl_data_offer *id) { SDL_WaylandDataDevice *data_device = data; SDL_WaylandDataOffer *offer = NULL; @@ -1798,13 +1769,12 @@ static const struct wl_data_device_listener data_device_listener = { data_device_handle_selection }; -static void -primary_selection_device_handle_offer(void *data, struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, - struct zwp_primary_selection_offer_v1 *id) +static void primary_selection_device_handle_offer(void *data, struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, + struct zwp_primary_selection_offer_v1 *id) { SDL_WaylandPrimarySelectionOffer *primary_selection_offer = NULL; - primary_selection_offer = SDL_calloc(1, sizeof *primary_selection_offer); + primary_selection_offer = SDL_calloc(1, sizeof(*primary_selection_offer)); if (primary_selection_offer == NULL) { SDL_OutOfMemory(); } else { @@ -1816,9 +1786,8 @@ primary_selection_device_handle_offer(void *data, struct zwp_primary_selection_d } } -static void -primary_selection_device_handle_selection(void *data, struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, - struct zwp_primary_selection_offer_v1 *id) +static void primary_selection_device_handle_selection(void *data, struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, + struct zwp_primary_selection_offer_v1 *id) { SDL_WaylandPrimarySelectionDevice *primary_selection_device = data; SDL_WaylandPrimarySelectionOffer *offer = NULL; @@ -1840,28 +1809,25 @@ static const struct zwp_primary_selection_device_v1_listener primary_selection_d primary_selection_device_handle_selection }; -static void -text_input_enter(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - struct wl_surface *surface) +static void text_input_enter(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + struct wl_surface *surface) { /* No-op */ } -static void -text_input_leave(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - struct wl_surface *surface) +static void text_input_leave(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + struct wl_surface *surface) { /* No-op */ } -static void -text_input_preedit_string(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - const char *text, - int32_t cursor_begin, - int32_t cursor_end) +static void text_input_preedit_string(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + const char *text, + int32_t cursor_begin, + int32_t cursor_end) { SDL_WaylandTextInput *text_input = data; char buf[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; @@ -1885,7 +1851,7 @@ text_input_preedit_string(void *data, int text_bytes = (int)SDL_strlen(text), i = 0; int cursor = 0; do { - const int sz = (int)SDL_utf8strlcpy(buf, text+i, sizeof(buf)); + const int sz = (int)SDL_utf8strlcpy(buf, text + i, sizeof(buf)); const int chars = (int)SDL_utf8strlen(buf); SDL_SendEditingText(buf, cursor, chars); @@ -1900,17 +1866,16 @@ text_input_preedit_string(void *data, } } -static void -text_input_commit_string(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - const char *text) +static void text_input_commit_string(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + const char *text) { if (text && *text) { char buf[SDL_TEXTINPUTEVENT_TEXT_SIZE]; size_t text_bytes = SDL_strlen(text), i = 0; while (i < text_bytes) { - size_t sz = SDL_utf8strlcpy(buf, text+i, sizeof(buf)); + size_t sz = SDL_utf8strlcpy(buf, text + i, sizeof(buf)); SDL_SendKeyboardText(buf); i += sz; @@ -1918,19 +1883,17 @@ text_input_commit_string(void *data, } } -static void -text_input_delete_surrounding_text(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - uint32_t before_length, - uint32_t after_length) +static void text_input_delete_surrounding_text(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + uint32_t before_length, + uint32_t after_length) { /* FIXME: Do we care about this event? */ } -static void -text_input_done(void *data, - struct zwp_text_input_v3 *zwp_text_input_v3, - uint32_t serial) +static void text_input_done(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + uint32_t serial) { SDL_WaylandTextInput *text_input = data; if (!text_input->has_preedit) { @@ -1948,19 +1911,17 @@ static const struct zwp_text_input_v3_listener text_input_listener = { text_input_done }; -static void -Wayland_create_data_device(SDL_VideoData *d) +static void Wayland_create_data_device(SDL_VideoData *d) { SDL_WaylandDataDevice *data_device = NULL; - data_device = SDL_calloc(1, sizeof *data_device); + data_device = SDL_calloc(1, sizeof(*data_device)); if (data_device == NULL) { return; } data_device->data_device = wl_data_device_manager_get_data_device( - d->data_device_manager, d->input->seat - ); + d->data_device_manager, d->input->seat); data_device->video_data = d; if (data_device->data_device == NULL) { @@ -1973,19 +1934,17 @@ Wayland_create_data_device(SDL_VideoData *d) } } -static void -Wayland_create_primary_selection_device(SDL_VideoData *d) +static void Wayland_create_primary_selection_device(SDL_VideoData *d) { SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL; - primary_selection_device = SDL_calloc(1, sizeof *primary_selection_device); + primary_selection_device = SDL_calloc(1, sizeof(*primary_selection_device)); if (primary_selection_device == NULL) { return; } primary_selection_device->primary_selection_device = zwp_primary_selection_device_manager_v1_get_device( - d->primary_selection_device_manager, d->input->seat - ); + d->primary_selection_device_manager, d->input->seat); primary_selection_device->video_data = d; if (primary_selection_device->primary_selection_device == NULL) { @@ -1999,19 +1958,17 @@ Wayland_create_primary_selection_device(SDL_VideoData *d) } } -static void -Wayland_create_text_input(SDL_VideoData *d) +static void Wayland_create_text_input(SDL_VideoData *d) { SDL_WaylandTextInput *text_input = NULL; - text_input = SDL_calloc(1, sizeof *text_input); + text_input = SDL_calloc(1, sizeof(*text_input)); if (text_input == NULL) { return; } text_input->text_input = zwp_text_input_manager_v3_get_text_input( - d->text_input_manager, d->input->seat - ); + d->text_input_manager, d->input->seat); if (text_input->text_input == NULL) { SDL_free(text_input); @@ -2023,8 +1980,7 @@ Wayland_create_text_input(SDL_VideoData *d) } } -void -Wayland_add_data_device_manager(SDL_VideoData *d, uint32_t id, uint32_t version) +void Wayland_add_data_device_manager(SDL_VideoData *d, uint32_t id, uint32_t version) { d->data_device_manager = wl_registry_bind(d->registry, id, &wl_data_device_manager_interface, SDL_min(3, version)); @@ -2033,8 +1989,7 @@ Wayland_add_data_device_manager(SDL_VideoData *d, uint32_t id, uint32_t version) } } -void -Wayland_add_primary_selection_device_manager(SDL_VideoData *d, uint32_t id, uint32_t version) +void Wayland_add_primary_selection_device_manager(SDL_VideoData *d, uint32_t id, uint32_t version) { d->primary_selection_device_manager = wl_registry_bind(d->registry, id, &zwp_primary_selection_device_manager_v1_interface, 1); @@ -2043,8 +1998,7 @@ Wayland_add_primary_selection_device_manager(SDL_VideoData *d, uint32_t id, uint } } -void -Wayland_add_text_input_manager(SDL_VideoData *d, uint32_t id, uint32_t version) +void Wayland_add_text_input_manager(SDL_VideoData *d, uint32_t id, uint32_t version) { d->text_input_manager = wl_registry_bind(d->registry, id, &zwp_text_input_manager_v3_interface, 1); @@ -2053,49 +2007,42 @@ Wayland_add_text_input_manager(SDL_VideoData *d, uint32_t id, uint32_t version) } } -static void -tablet_tool_handle_type(void* data, struct zwp_tablet_tool_v2* tool, uint32_t type) +static void tablet_tool_handle_type(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t type) { /* unimplemented */ } -static void -tablet_tool_handle_hardware_serial(void* data, struct zwp_tablet_tool_v2* tool, uint32_t serial_hi, uint32_t serial_lo) +static void tablet_tool_handle_hardware_serial(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial_hi, uint32_t serial_lo) { /* unimplemented */ } -static void -tablet_tool_handle_hardware_id_wacom(void* data, struct zwp_tablet_tool_v2* tool, uint32_t id_hi, uint32_t id_lo) +static void tablet_tool_handle_hardware_id_wacom(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t id_hi, uint32_t id_lo) { /* unimplemented */ } -static void -tablet_tool_handle_capability(void* data, struct zwp_tablet_tool_v2* tool, uint32_t capability) +static void tablet_tool_handle_capability(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t capability) { /* unimplemented */ } -static void -tablet_tool_handle_done(void* data, struct zwp_tablet_tool_v2* tool) +static void tablet_tool_handle_done(void *data, struct zwp_tablet_tool_v2 *tool) { /* unimplemented */ } -static void -tablet_tool_handle_removed(void* data, struct zwp_tablet_tool_v2* tool) +static void tablet_tool_handle_removed(void *data, struct zwp_tablet_tool_v2 *tool) { /* unimplemented */ } -static void -tablet_tool_handle_proximity_in(void* data, struct zwp_tablet_tool_v2* tool, uint32_t serial, struct zwp_tablet_v2* tablet, struct wl_surface* surface) +static void tablet_tool_handle_proximity_in(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial, struct zwp_tablet_v2 *tablet, struct wl_surface *surface) { - struct SDL_WaylandTabletInput* input = data; - SDL_WindowData* window; + struct SDL_WaylandTabletInput *input = data; + SDL_WindowData *window; - if (!surface) { + if (surface == NULL) { return; } @@ -2103,7 +2050,7 @@ tablet_tool_handle_proximity_in(void* data, struct zwp_tablet_tool_v2* tool, uin return; } - window = (SDL_WindowData*)wl_surface_get_user_data(surface); + window = (SDL_WindowData *)wl_surface_get_user_data(surface); if (window) { input->tool_focus = window; @@ -2120,10 +2067,9 @@ tablet_tool_handle_proximity_in(void* data, struct zwp_tablet_tool_v2* tool, uin } } -static void -tablet_tool_handle_proximity_out(void* data, struct zwp_tablet_tool_v2* tool) +static void tablet_tool_handle_proximity_out(void *data, struct zwp_tablet_tool_v2 *tool) { - struct SDL_WaylandTabletInput* input = data; + struct SDL_WaylandTabletInput *input = data; if (input->tool_focus) { SDL_SetMouseFocus(NULL); @@ -2131,31 +2077,29 @@ tablet_tool_handle_proximity_out(void* data, struct zwp_tablet_tool_v2* tool) } } -uint32_t -tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput* input) +uint32_t tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput *input) { unsigned int tool_btn = input->btn_stylus3 << 2 | input->btn_stylus2 << 1 | input->btn_stylus << 0; switch (tool_btn) { - case 0b000: - return SDL_BUTTON_LEFT; - case 0b001: - return SDL_BUTTON_RIGHT; - case 0b010: - return SDL_BUTTON_MIDDLE; - case 0b100: - return SDL_BUTTON_X1; - default: - return SDL_BUTTON_LEFT; + case 0b000: + return SDL_BUTTON_LEFT; + case 0b001: + return SDL_BUTTON_RIGHT; + case 0b010: + return SDL_BUTTON_MIDDLE; + case 0b100: + return SDL_BUTTON_X1; + default: + return SDL_BUTTON_LEFT; } } -static void -tablet_tool_handle_down(void* data, struct zwp_tablet_tool_v2* tool, uint32_t serial) +static void tablet_tool_handle_down(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial) { - struct SDL_WaylandTabletInput* input = data; - SDL_WindowData* window = input->tool_focus; + struct SDL_WaylandTabletInput *input = data; + SDL_WindowData *window = input->tool_focus; input->is_down = SDL_TRUE; - if (!window) { + if (window == NULL) { /* tablet_tool_handle_proximity_out gets called when moving over the libdecoration csd. * that sets input->tool_focus (window) to NULL, but handle_{down,up} events are still * received. To prevent SIGSEGV this returns when this is the case. @@ -2166,15 +2110,14 @@ tablet_tool_handle_down(void* data, struct zwp_tablet_tool_v2* tool, uint32_t se SDL_SendMouseButton(window->sdlwindow, 0, SDL_PRESSED, tablet_tool_btn_to_sdl_button(input)); } -static void -tablet_tool_handle_up(void* data, struct zwp_tablet_tool_v2* tool) +static void tablet_tool_handle_up(void *data, struct zwp_tablet_tool_v2 *tool) { - struct SDL_WaylandTabletInput* input = data; - SDL_WindowData* window = input->tool_focus; + struct SDL_WaylandTabletInput *input = data; + SDL_WindowData *window = input->tool_focus; input->is_down = SDL_FALSE; - if (!window) { + if (window == NULL) { /* tablet_tool_handle_proximity_out gets called when moving over the libdecoration csd. * that sets input->tool_focus (window) to NULL, but handle_{down,up} events are still * received. To prevent SIGSEGV this returns when this is the case. @@ -2185,45 +2128,40 @@ tablet_tool_handle_up(void* data, struct zwp_tablet_tool_v2* tool) SDL_SendMouseButton(window->sdlwindow, 0, SDL_RELEASED, tablet_tool_btn_to_sdl_button(input)); } -static void -tablet_tool_handle_motion(void* data, struct zwp_tablet_tool_v2* tool, wl_fixed_t sx_w, wl_fixed_t sy_w) +static void tablet_tool_handle_motion(void *data, struct zwp_tablet_tool_v2 *tool, wl_fixed_t sx_w, wl_fixed_t sy_w) { - struct SDL_WaylandTabletInput* input = data; - SDL_WindowData* window = input->tool_focus; + struct SDL_WaylandTabletInput *input = data; + SDL_WindowData *window = input->tool_focus; input->sx_w = sx_w; input->sy_w = sy_w; if (input->tool_focus) { const float sx_f = (float)wl_fixed_to_double(sx_w); const float sy_f = (float)wl_fixed_to_double(sy_w); - const int sx = (int)SDL_floorf(sx_f * window->pointer_scale_x); - const int sy = (int)SDL_floorf(sy_f * window->pointer_scale_y); + const int sx = (int)SDL_floorf(sx_f * window->pointer_scale_x); + const int sy = (int)SDL_floorf(sy_f * window->pointer_scale_y); SDL_SendMouseMotion(window->sdlwindow, 0, 0, sx, sy); } } -static void -tablet_tool_handle_pressure(void* data, struct zwp_tablet_tool_v2* tool, uint32_t pressure) +static void tablet_tool_handle_pressure(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t pressure) { /* unimplemented */ } -static void -tablet_tool_handle_distance(void* data, struct zwp_tablet_tool_v2* tool, uint32_t distance) +static void tablet_tool_handle_distance(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t distance) { /* unimplemented */ } -static void -tablet_tool_handle_tilt(void* data, struct zwp_tablet_tool_v2* tool, wl_fixed_t xtilt, wl_fixed_t ytilt) +static void tablet_tool_handle_tilt(void *data, struct zwp_tablet_tool_v2 *tool, wl_fixed_t xtilt, wl_fixed_t ytilt) { /* unimplemented */ } -static void -tablet_tool_handle_button(void* data, struct zwp_tablet_tool_v2* tool, uint32_t serial, uint32_t button, uint32_t state) +static void tablet_tool_handle_button(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial, uint32_t button, uint32_t state) { - struct SDL_WaylandTabletInput* input = data; + struct SDL_WaylandTabletInput *input = data; if (input->is_down) { tablet_tool_handle_up(data, tool); @@ -2231,16 +2169,16 @@ tablet_tool_handle_button(void* data, struct zwp_tablet_tool_v2* tool, uint32_t } switch (button) { - /* see %{_includedir}/linux/input-event-codes.h */ - case 0x14b: /* BTN_STYLUS */ - input->btn_stylus = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; - break; - case 0x14c: /* BTN_STYLUS2 */ - input->btn_stylus2 = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; - break; - case 0x149: /* BTN_STYLUS3 */ - input->btn_stylus3 = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; - break; + /* see %{_includedir}/linux/input-event-codes.h */ + case 0x14b: /* BTN_STYLUS */ + input->btn_stylus = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; + break; + case 0x14c: /* BTN_STYLUS2 */ + input->btn_stylus2 = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; + break; + case 0x149: /* BTN_STYLUS3 */ + input->btn_stylus3 = state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED ? SDL_TRUE : SDL_FALSE; + break; } if (input->is_down) { @@ -2248,31 +2186,26 @@ tablet_tool_handle_button(void* data, struct zwp_tablet_tool_v2* tool, uint32_t } } -static void -tablet_tool_handle_rotation(void* data, struct zwp_tablet_tool_v2* tool, wl_fixed_t degrees) +static void tablet_tool_handle_rotation(void *data, struct zwp_tablet_tool_v2 *tool, wl_fixed_t degrees) { /* unimplemented */ } -static void -tablet_tool_handle_slider(void* data, struct zwp_tablet_tool_v2* tool, int32_t position) +static void tablet_tool_handle_slider(void *data, struct zwp_tablet_tool_v2 *tool, int32_t position) { /* unimplemented */ } -static void -tablet_tool_handle_wheel(void* data, struct zwp_tablet_tool_v2* tool, int32_t degrees, int32_t clicks) +static void tablet_tool_handle_wheel(void *data, struct zwp_tablet_tool_v2 *tool, int32_t degrees, int32_t clicks) { /* unimplemented */ } -static void -tablet_tool_handle_frame(void* data, struct zwp_tablet_tool_v2* tool, uint32_t time) +static void tablet_tool_handle_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time) { /* unimplemented */ } - static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { tablet_tool_handle_type, tablet_tool_handle_hardware_serial, @@ -2295,12 +2228,11 @@ static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { tablet_tool_handle_frame }; -struct SDL_WaylandTabletObjectListNode* -tablet_object_list_new_node(void* object) +struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object) { - struct SDL_WaylandTabletObjectListNode* node; + struct SDL_WaylandTabletObjectListNode *node; - node = SDL_calloc(1, sizeof *node); + node = SDL_calloc(1, sizeof(*node)); if (node == NULL) { return NULL; } @@ -2311,7 +2243,7 @@ tablet_object_list_new_node(void* object) return node; } -void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode* head, void* object) +void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, void *object) { if (head->object == NULL) { head->object = object; @@ -2325,10 +2257,10 @@ void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode* head, voi head->next = tablet_object_list_new_node(object); } -void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode* head, void (*deleter)(void* object)) +void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode *head, void (*deleter)(void *object)) { while (head) { - struct SDL_WaylandTabletObjectListNode* next = head->next; + struct SDL_WaylandTabletObjectListNode *next = head->next; if (head->object) { (*deleter)(head->object); } @@ -2337,19 +2269,16 @@ void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode* head, vo } } - -static void -tablet_seat_handle_tablet_added(void* data, struct zwp_tablet_seat_v2* seat, struct zwp_tablet_v2* tablet) +static void tablet_seat_handle_tablet_added(void *data, struct zwp_tablet_seat_v2 *seat, struct zwp_tablet_v2 *tablet) { - struct SDL_WaylandTabletInput* input = data; + struct SDL_WaylandTabletInput *input = data; tablet_object_list_append(input->tablets, tablet); } -static void -tablet_seat_handle_tool_added(void* data, struct zwp_tablet_seat_v2* seat, struct zwp_tablet_tool_v2* tool) +static void tablet_seat_handle_tool_added(void *data, struct zwp_tablet_seat_v2 *seat, struct zwp_tablet_tool_v2 *tool) { - struct SDL_WaylandTabletInput* input = data; + struct SDL_WaylandTabletInput *input = data; zwp_tablet_tool_v2_add_listener(tool, &tablet_tool_listener, data); zwp_tablet_tool_v2_set_user_data(tool, data); @@ -2357,10 +2286,9 @@ tablet_seat_handle_tool_added(void* data, struct zwp_tablet_seat_v2* seat, struc tablet_object_list_append(input->tools, tool); } -static void -tablet_seat_handle_pad_added(void* data, struct zwp_tablet_seat_v2* seat, struct zwp_tablet_pad_v2* pad) +static void tablet_seat_handle_pad_added(void *data, struct zwp_tablet_seat_v2 *seat, struct zwp_tablet_pad_v2 *pad) { - struct SDL_WaylandTabletInput* input = data; + struct SDL_WaylandTabletInput *input = data; tablet_object_list_append(input->pads, pad); } @@ -2371,53 +2299,51 @@ static const struct zwp_tablet_seat_v2_listener tablet_seat_listener = { tablet_seat_handle_pad_added }; -void -Wayland_input_add_tablet(struct SDL_WaylandInput *input, struct SDL_WaylandTabletManager* tablet_manager) +void Wayland_input_add_tablet(struct SDL_WaylandInput *input, struct SDL_WaylandTabletManager *tablet_manager) { - struct SDL_WaylandTabletInput* tablet_input; + struct SDL_WaylandTabletInput *tablet_input; - if (!tablet_manager || !input || !input->seat) { + if (tablet_manager == NULL || input == NULL || !input->seat) { return; } - tablet_input = SDL_calloc(1, sizeof *tablet_input); + tablet_input = SDL_calloc(1, sizeof(*tablet_input)); if (tablet_input == NULL) { return; } input->tablet = tablet_input; - tablet_input->seat = (struct SDL_WaylandTabletSeat*)zwp_tablet_manager_v2_get_tablet_seat((struct zwp_tablet_manager_v2*)tablet_manager, input->seat); + tablet_input->seat = (struct SDL_WaylandTabletSeat *)zwp_tablet_manager_v2_get_tablet_seat((struct zwp_tablet_manager_v2 *)tablet_manager, input->seat); tablet_input->tablets = tablet_object_list_new_node(NULL); tablet_input->tools = tablet_object_list_new_node(NULL); tablet_input->pads = tablet_object_list_new_node(NULL); - zwp_tablet_seat_v2_add_listener((struct zwp_tablet_seat_v2*)tablet_input->seat, &tablet_seat_listener, tablet_input); + zwp_tablet_seat_v2_add_listener((struct zwp_tablet_seat_v2 *)tablet_input->seat, &tablet_seat_listener, tablet_input); } -#define TABLET_OBJECT_LIST_DELETER(fun) (void (*)(void*))fun -void -Wayland_input_destroy_tablet(struct SDL_WaylandInput* input) +#define TABLET_OBJECT_LIST_DELETER(fun) (void (*)(void *)) fun +void Wayland_input_destroy_tablet(struct SDL_WaylandInput *input) { tablet_object_list_destroy(input->tablet->pads, TABLET_OBJECT_LIST_DELETER(zwp_tablet_pad_v2_destroy)); tablet_object_list_destroy(input->tablet->tools, TABLET_OBJECT_LIST_DELETER(zwp_tablet_tool_v2_destroy)); tablet_object_list_destroy(input->tablet->tablets, TABLET_OBJECT_LIST_DELETER(zwp_tablet_v2_destroy)); - zwp_tablet_seat_v2_destroy((struct zwp_tablet_seat_v2*)input->tablet->seat); + zwp_tablet_seat_v2_destroy((struct zwp_tablet_seat_v2 *)input->tablet->seat); SDL_free(input->tablet); input->tablet = NULL; } -void -Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version) +void Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version) { struct SDL_WaylandInput *input; - input = SDL_calloc(1, sizeof *input); - if (input == NULL) + input = SDL_calloc(1, sizeof(*input)); + if (input == NULL) { return; + } input->display = d; input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, SDL_min(SDL_WL_SEAT_VERSION, version)); @@ -2450,8 +2376,9 @@ void Wayland_display_destroy_input(SDL_VideoData *d) { struct SDL_WaylandInput *input = d->input; - if (!input) + if (input == NULL) { return; + } if (input->data_device != NULL) { Wayland_data_device_clear_selection(input->data_device); @@ -2467,16 +2394,25 @@ void Wayland_display_destroy_input(SDL_VideoData *d) SDL_free(input->data_device); } + if (input->primary_selection_device != NULL) { + if (input->primary_selection_device->selection_offer != NULL) { + Wayland_primary_selection_offer_destroy(input->primary_selection_device->selection_offer); + } + SDL_free(input->primary_selection_device); + } + if (input->text_input != NULL) { zwp_text_input_v3_destroy(input->text_input->text_input); SDL_free(input->text_input); } - if (input->keyboard) + if (input->keyboard) { wl_keyboard_destroy(input->keyboard); + } - if (input->pointer) + if (input->pointer) { wl_pointer_destroy(input->pointer); + } if (input->touch) { SDL_DelTouch(1); @@ -2487,20 +2423,25 @@ void Wayland_display_destroy_input(SDL_VideoData *d) Wayland_input_destroy_tablet(input); } - if (input->seat) + if (input->seat) { wl_seat_destroy(input->seat); + } - if (input->xkb.compose_state) + if (input->xkb.compose_state) { WAYLAND_xkb_compose_state_unref(input->xkb.compose_state); + } - if (input->xkb.compose_table) + if (input->xkb.compose_table) { WAYLAND_xkb_compose_table_unref(input->xkb.compose_table); + } - if (input->xkb.state) + if (input->xkb.state) { WAYLAND_xkb_state_unref(input->xkb.state); + } - if (input->xkb.keymap) + if (input->xkb.keymap) { WAYLAND_xkb_keymap_unref(input->xkb.keymap); + } SDL_free(input); d->input = NULL; @@ -2516,8 +2457,9 @@ void Wayland_display_add_relative_pointer_manager(SDL_VideoData *d, uint32_t id) void Wayland_display_destroy_relative_pointer_manager(SDL_VideoData *d) { - if (d->relative_pointer_manager) + if (d->relative_pointer_manager) { zwp_relative_pointer_manager_v1_destroy(d->relative_pointer_manager); + } } void Wayland_display_add_pointer_constraints(SDL_VideoData *d, uint32_t id) @@ -2529,19 +2471,19 @@ void Wayland_display_add_pointer_constraints(SDL_VideoData *d, uint32_t id) void Wayland_display_destroy_pointer_constraints(SDL_VideoData *d) { - if (d->pointer_constraints) + if (d->pointer_constraints) { zwp_pointer_constraints_v1_destroy(d->pointer_constraints); + } } -static void -relative_pointer_handle_relative_motion(void *data, - struct zwp_relative_pointer_v1 *pointer, - uint32_t time_hi, - uint32_t time_lo, - wl_fixed_t dx_w, - wl_fixed_t dy_w, - wl_fixed_t dx_unaccel_w, - wl_fixed_t dy_unaccel_w) +static void relative_pointer_handle_relative_motion(void *data, + struct zwp_relative_pointer_v1 *pointer, + uint32_t time_hi, + uint32_t time_lo, + wl_fixed_t dx_w, + wl_fixed_t dy_w, + wl_fixed_t dx_unaccel_w, + wl_fixed_t dy_unaccel_w) { struct SDL_WaylandInput *input = data; SDL_VideoData *d = input->display; @@ -2570,15 +2512,13 @@ static const struct zwp_relative_pointer_v1_listener relative_pointer_listener = relative_pointer_handle_relative_motion, }; -static void -locked_pointer_locked(void *data, - struct zwp_locked_pointer_v1 *locked_pointer) +static void locked_pointer_locked(void *data, + struct zwp_locked_pointer_v1 *locked_pointer) { } -static void -locked_pointer_unlocked(void *data, - struct zwp_locked_pointer_v1 *locked_pointer) +static void locked_pointer_unlocked(void *data, + struct zwp_locked_pointer_v1 *locked_pointer) { } @@ -2587,16 +2527,16 @@ static const struct zwp_locked_pointer_v1_listener locked_pointer_listener = { locked_pointer_unlocked, }; -static void -lock_pointer_to_window(SDL_Window *window, - struct SDL_WaylandInput *input) +static void lock_pointer_to_window(SDL_Window *window, + struct SDL_WaylandInput *input) { SDL_WindowData *w = window->driverdata; SDL_VideoData *d = input->display; struct zwp_locked_pointer_v1 *locked_pointer; - if (w->locked_pointer) + if (w->locked_pointer) { return; + } locked_pointer = zwp_pointer_constraints_v1_lock_pointer(d->pointer_constraints, @@ -2627,20 +2567,24 @@ int Wayland_input_lock_pointer(struct SDL_WaylandInput *input) SDL_Window *window; struct zwp_relative_pointer_v1 *relative_pointer; - if (!d->relative_pointer_manager) + if (!d->relative_pointer_manager) { return -1; + } - if (!d->pointer_constraints) + if (!d->pointer_constraints) { return -1; + } - if (!input->pointer) + if (!input->pointer) { return -1; + } /* If we have a pointer confine active, we must destroy it here because * creating a locked pointer otherwise would be a protocol error. */ - for (window = vd->windows; window; window = window->next) + for (window = vd->windows; window; window = window->next) { pointer_confine_destroy(window); + } if (!input->relative_pointer) { relative_pointer = @@ -2653,8 +2597,9 @@ int Wayland_input_lock_pointer(struct SDL_WaylandInput *input) input->relative_pointer = relative_pointer; } - for (window = vd->windows; window; window = window->next) + for (window = vd->windows; window; window = window->next) { lock_pointer_to_window(window, input); + } d->relative_mouse_mode = 1; @@ -2670,8 +2615,9 @@ int Wayland_input_unlock_pointer(struct SDL_WaylandInput *input) for (window = vd->windows; window; window = window->next) { w = window->driverdata; - if (w->locked_pointer) + if (w->locked_pointer) { zwp_locked_pointer_v1_destroy(w->locked_pointer); + } w->locked_pointer = NULL; } @@ -2680,21 +2626,20 @@ int Wayland_input_unlock_pointer(struct SDL_WaylandInput *input) d->relative_mouse_mode = 0; - for (window = vd->windows; window; window = window->next) + for (window = vd->windows; window; window = window->next) { Wayland_input_confine_pointer(input, window); + } return 0; } -static void -confined_pointer_confined(void *data, - struct zwp_confined_pointer_v1 *confined_pointer) +static void confined_pointer_confined(void *data, + struct zwp_confined_pointer_v1 *confined_pointer) { } -static void -confined_pointer_unconfined(void *data, - struct zwp_confined_pointer_v1 *confined_pointer) +static void confined_pointer_unconfined(void *data, + struct zwp_confined_pointer_v1 *confined_pointer) { } @@ -2710,11 +2655,13 @@ int Wayland_input_confine_pointer(struct SDL_WaylandInput *input, SDL_Window *wi struct zwp_confined_pointer_v1 *confined_pointer; struct wl_region *confine_rect; - if (!d->pointer_constraints) + if (!d->pointer_constraints) { return -1; + } - if (!input->pointer) + if (!input->pointer) { return -1; + } /* A confine may already be active, in which case we should destroy it and * create a new one. @@ -2724,12 +2671,14 @@ int Wayland_input_confine_pointer(struct SDL_WaylandInput *input, SDL_Window *wi /* We cannot create a confine if the pointer is already locked. Defer until * the pointer is unlocked. */ - if (d->relative_mouse_mode) + if (d->relative_mouse_mode) { return 0; + } /* Don't confine the pointer if it shouldn't be confined. */ - if (SDL_RectEmpty(&window->mouse_rect) && !(window->flags & SDL_WINDOW_MOUSE_GRABBED)) + if (SDL_RectEmpty(&window->mouse_rect) && !(window->flags & SDL_WINDOW_MOUSE_GRABBED)) { return 0; + } if (SDL_RectEmpty(&window->mouse_rect)) { confine_rect = NULL; @@ -2778,11 +2727,13 @@ int Wayland_input_grab_keyboard(SDL_Window *window, struct SDL_WaylandInput *inp SDL_WindowData *w = window->driverdata; SDL_VideoData *d = input->display; - if (!d->key_inhibitor_manager) + if (!d->key_inhibitor_manager) { return -1; + } - if (w->key_inhibitor) + if (w->key_inhibitor) { return 0; + } w->key_inhibitor = zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts(d->key_inhibitor_manager, diff --git a/modules/SDL2/src/video/wayland/SDL_waylandevents_c.h b/modules/SDL2/src/video/wayland/SDL_waylandevents_c.h index d94d9c1..3b8f92a 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandevents_c.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandevents_c.h @@ -38,17 +38,19 @@ enum SDL_WaylandAxisEvent struct SDL_WaylandTabletSeat; -struct SDL_WaylandTabletObjectListNode { - void* object; - struct SDL_WaylandTabletObjectListNode* next; +struct SDL_WaylandTabletObjectListNode +{ + void *object; + struct SDL_WaylandTabletObjectListNode *next; }; -struct SDL_WaylandTabletInput { - struct SDL_WaylandTabletSeat* seat; +struct SDL_WaylandTabletInput +{ + struct SDL_WaylandTabletSeat *seat; - struct SDL_WaylandTabletObjectListNode* tablets; - struct SDL_WaylandTabletObjectListNode* tools; - struct SDL_WaylandTabletObjectListNode* pads; + struct SDL_WaylandTabletObjectListNode *tablets; + struct SDL_WaylandTabletObjectListNode *tools; + struct SDL_WaylandTabletObjectListNode *pads; SDL_WindowData *tool_focus; uint32_t tool_prox_serial; @@ -64,7 +66,8 @@ struct SDL_WaylandTabletInput { SDL_bool btn_stylus3; }; -typedef struct { +typedef struct +{ // repeat_rate in range of [1, 1000] int32_t repeat_rate; int32_t repeat_delay; @@ -72,14 +75,15 @@ typedef struct { SDL_bool is_key_down; uint32_t key; - uint32_t wl_press_time; // Key press time as reported by the Wayland API + uint32_t wl_press_time; // Key press time as reported by the Wayland API uint32_t sdl_press_time; // Key press time expressed in SDL ticks uint32_t next_repeat_ms; uint32_t scancode; char text[8]; } SDL_WaylandKeyboardRepeat; -struct SDL_WaylandInput { +struct SDL_WaylandInput +{ SDL_VideoData *display; struct wl_seat *seat; struct wl_pointer *pointer; @@ -102,7 +106,8 @@ struct SDL_WaylandInput { double dx_frac; double dy_frac; - struct { + struct + { struct xkb_keymap *keymap; struct xkb_state *state; struct xkb_compose_table *compose_table; @@ -121,7 +126,8 @@ struct SDL_WaylandInput { } xkb; /* information about axis events on current frame */ - struct { + struct + { enum SDL_WaylandAxisEvent x_axis_type; float x; @@ -131,7 +137,7 @@ struct SDL_WaylandInput { SDL_WaylandKeyboardRepeat keyboard_repeat; - struct SDL_WaylandTabletInput* tablet; + struct SDL_WaylandTabletInput *tablet; /* are we forcing relative mouse mode? */ SDL_bool cursor_visible; @@ -166,7 +172,7 @@ extern void Wayland_display_destroy_relative_pointer_manager(SDL_VideoData *d); extern int Wayland_input_grab_keyboard(SDL_Window *window, struct SDL_WaylandInput *input); extern int Wayland_input_ungrab_keyboard(SDL_Window *window); -extern void Wayland_input_add_tablet(struct SDL_WaylandInput *input, struct SDL_WaylandTabletManager* tablet_manager); +extern void Wayland_input_add_tablet(struct SDL_WaylandInput *input, struct SDL_WaylandTabletManager *tablet_manager); extern void Wayland_input_destroy_tablet(struct SDL_WaylandInput *input); #endif /* SDL_waylandevents_h_ */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandkeyboard.c b/modules/SDL2/src/video/wayland/SDL_waylandkeyboard.c index b13b602..d8cf075 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandkeyboard.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandkeyboard.c @@ -25,10 +25,10 @@ #include "../SDL_sysvideo.h" #include "SDL_waylandvideo.h" #include "SDL_waylandevents_c.h" +#include "../../events/SDL_keyboard_c.h" #include "text-input-unstable-v3-client-protocol.h" -int -Wayland_InitKeyboard(_THIS) +int Wayland_InitKeyboard(_THIS) { #ifdef SDL_USE_IME SDL_VideoData *driverdata = _this->driverdata; @@ -36,12 +36,12 @@ Wayland_InitKeyboard(_THIS) SDL_IME_Init(); } #endif + SDL_SetScancodeName(SDL_SCANCODE_APPLICATION, "Menu"); return 0; } -void -Wayland_QuitKeyboard(_THIS) +void Wayland_QuitKeyboard(_THIS) { #ifdef SDL_USE_IME SDL_VideoData *driverdata = _this->driverdata; @@ -51,8 +51,7 @@ Wayland_QuitKeyboard(_THIS) #endif } -void -Wayland_StartTextInput(_THIS) +void Wayland_StartTextInput(_THIS) { SDL_VideoData *driverdata = _this->driverdata; @@ -62,8 +61,9 @@ Wayland_StartTextInput(_THIS) const SDL_Rect *rect = &input->text_input->cursor_rect; /* Don't re-enable if we're already enabled. */ - if (input->text_input->is_enabled) + if (input->text_input->is_enabled) { return; + } /* For some reason this has to be done twice, it appears to be a * bug in mutter? Maybe? @@ -92,8 +92,7 @@ Wayland_StartTextInput(_THIS) } } -void -Wayland_StopTextInput(_THIS) +void Wayland_StopTextInput(_THIS) { SDL_VideoData *driverdata = _this->driverdata; @@ -113,12 +112,11 @@ Wayland_StopTextInput(_THIS) #endif } -void -Wayland_SetTextInputRect(_THIS, const SDL_Rect *rect) +void Wayland_SetTextInputRect(_THIS, const SDL_Rect *rect) { SDL_VideoData *driverdata = _this->driverdata; - if (!rect) { + if (rect == NULL) { SDL_InvalidParamError("rect"); return; } @@ -126,8 +124,7 @@ Wayland_SetTextInputRect(_THIS, const SDL_Rect *rect) if (driverdata->text_input_manager) { struct SDL_WaylandInput *input = driverdata->input; if (input != NULL && input->text_input) { - if (!SDL_RectEquals(rect, &input->text_input->cursor_rect)) - { + if (!SDL_RectEquals(rect, &input->text_input->cursor_rect)) { SDL_copyp(&input->text_input->cursor_rect, rect); zwp_text_input_v3_set_cursor_rectangle(input->text_input->text_input, rect->x, @@ -146,8 +143,7 @@ Wayland_SetTextInputRect(_THIS, const SDL_Rect *rect) #endif } -SDL_bool -Wayland_HasScreenKeyboardSupport(_THIS) +SDL_bool Wayland_HasScreenKeyboardSupport(_THIS) { /* In reality we just want to return true when the screen keyboard is the * _only_ way to get text input. So, in addition to checking for the text @@ -156,7 +152,7 @@ Wayland_HasScreenKeyboardSupport(_THIS) SDL_VideoData *driverdata = _this->driverdata; SDL_bool haskeyboard = (driverdata->input != NULL) && (driverdata->input->keyboard != NULL); SDL_bool hastextmanager = (driverdata->text_input_manager != NULL); - return (!haskeyboard && hastextmanager); + return !haskeyboard && hastextmanager; } #endif /* SDL_VIDEO_DRIVER_WAYLAND */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandmessagebox.c b/modules/SDL2/src/video/wayland/SDL_waylandmessagebox.c index 3a89d1b..24bc21a 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandmessagebox.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandmessagebox.c @@ -28,166 +28,223 @@ #include /* FILE, STDOUT_FILENO, fdopen, fclose */ #include /* pid_t, pipe, fork, close, dup2, execvp, _exit */ #include /* waitpid, WIFEXITED, WEXITSTATUS */ -#include /* strerr */ +#include /* strerr */ #include #include "SDL_waylandmessagebox.h" -#define MAX_BUTTONS 8 /* Maximum number of buttons supported */ +#define ZENITY_VERSION_LEN 32 /* Number of bytes to read from zenity --version (including NUL)*/ -int -Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) -{ - int fd_pipe[2]; /* fd_pipe[0]: read end of pipe, fd_pipe[1]: write end of pipe */ +#define MAX_BUTTONS 8 /* Maximum number of buttons supported */ + +static int run_zenity(const char **args, int fd_pipe[2]) { + int status; pid_t pid1; + pid1 = fork(); + if (pid1 == 0) { /* child process */ + close(fd_pipe[0]); /* no reading from pipe */ + /* write stdout in pipe */ + if (dup2(fd_pipe[1], STDOUT_FILENO) == -1) { + _exit(128); + } + + /* const casting argv is fine: + * https://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html -> rational + */ + execvp("zenity", (char **)args); + _exit(129); + } else if (pid1 < 0) { /* fork() failed */ + return SDL_SetError("fork() failed: %s", strerror(errno)); + } else { /* parent process */ + close(fd_pipe[1]); /* no writing to the pipe */ + if (waitpid(pid1, &status, 0) != pid1) { + return SDL_SetError("Waiting on zenity failed: %s", strerror(errno)); + } + + if (!WIFEXITED(status)) { + return SDL_SetError("zenity failed for some reason"); + } + + if (WEXITSTATUS(status) >= 128) { + return SDL_SetError("zenity reported error or failed to launch: %d", WEXITSTATUS(status)); + } + + return 0; /* success! */ + } +} + +static int get_zenity_version(int *major, int *minor) { + int fd_pipe[2]; /* fd_pipe[0]: read end of pipe, fd_pipe[1]: write end of pipe */ + const char *argv[] = { "zenity", "--version", NULL }; + + if (pipe(fd_pipe) != 0) { /* create a pipe */ + return SDL_SetError("pipe() failed: %s", strerror(errno)); + } + + if (run_zenity(argv, fd_pipe) == 0) { + FILE *outputfp = NULL; + char version_str[ZENITY_VERSION_LEN]; + char *version_ptr = NULL, *end_ptr = NULL; + int tmp; + + outputfp = fdopen(fd_pipe[0], "r"); + if (outputfp == NULL) { + close(fd_pipe[0]); + return SDL_SetError("failed to open pipe for reading: %s", strerror(errno)); + } + + version_ptr = fgets(version_str, ZENITY_VERSION_LEN, outputfp); + (void)fclose(outputfp); /* will close underlying fd */ + + /* we expect the version string is in the form of MAJOR.MINOR.MICRO + * as described in meson.build. We'll ignore everything after that. + */ + tmp = (int) SDL_strtol(version_ptr, &end_ptr, 10); + if (tmp == 0 && end_ptr == version_ptr) { + return SDL_SetError("failed to get zenity major version number"); + } + *major = tmp; + + version_ptr = end_ptr + 1; /* skip the dot */ + tmp = (int) SDL_strtol(version_ptr, &end_ptr, 10); + if (tmp == 0 && end_ptr == version_ptr) { + return SDL_SetError("failed to get zenity minor version number"); + } + *minor = tmp; + + return 0; /* success */ + } + + close(fd_pipe[0]); + close(fd_pipe[1]); + return -1; /* run_zenity should've called SDL_SetError() */ +} + +int Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { + int fd_pipe[2]; /* fd_pipe[0]: read end of pipe, fd_pipe[1]: write end of pipe */ + int zenity_major = 0, zenity_minor = 0, output_len = 0; + int argc = 5, i; + const char *argv[5 + 2 /* icon name */ + 2 /* title */ + 2 /* message */ + 2 * MAX_BUTTONS + 1 /* NULL */] = { + "zenity", "--question", "--switch", "--no-wrap", "--no-markup" + }; + if (messageboxdata->numbuttons > MAX_BUTTONS) { return SDL_SetError("Too many buttons (%d max allowed)", MAX_BUTTONS); } + /* get zenity version so we know which arg to use */ + if (get_zenity_version(&zenity_major, &zenity_minor) != 0) { + return -1; /* get_zenity_version() calls SDL_SetError(), so message is already set */ + } + if (pipe(fd_pipe) != 0) { /* create a pipe */ return SDL_SetError("pipe() failed: %s", strerror(errno)); } - pid1 = fork(); - if (pid1 == 0) { /* child process */ - int argc = 5, i; - const char* argv[5 + 2/* icon name */ + 2/* title */ + 2/* message */ + 2*MAX_BUTTONS + 1/* NULL */] = { - "zenity", "--question", "--switch", "--no-wrap", "--no-markup" - }; + /* https://gitlab.gnome.org/GNOME/zenity/-/commit/c686bdb1b45e95acf010efd9ca0c75527fbb4dea + * This commit removed --icon-name without adding a deprecation notice. + * We need to handle it gracefully, otherwise no message box will be shown. + */ + argv[argc++] = zenity_major > 3 || (zenity_major == 3 && zenity_minor >= 90) ? "--icon" : "--icon-name"; + switch (messageboxdata->flags) { + case SDL_MESSAGEBOX_ERROR: + argv[argc++] = "dialog-error"; + break; + case SDL_MESSAGEBOX_WARNING: + argv[argc++] = "dialog-warning"; + break; + case SDL_MESSAGEBOX_INFORMATION: + default: + argv[argc++] = "dialog-information"; + break; + } - close(fd_pipe[0]); /* no reading from pipe */ - /* write stdout in pipe */ - if (dup2(fd_pipe[1], STDOUT_FILENO) == -1) { - _exit(128); + if (messageboxdata->title && messageboxdata->title[0]) { + argv[argc++] = "--title"; + argv[argc++] = messageboxdata->title; + } else { + argv[argc++] = "--title=\"\""; + } + + if (messageboxdata->message && messageboxdata->message[0]) { + argv[argc++] = "--text"; + argv[argc++] = messageboxdata->message; + } else { + argv[argc++] = "--text=\"\""; + } + + for (i = 0; i < messageboxdata->numbuttons; ++i) { + if (messageboxdata->buttons[i].text && messageboxdata->buttons[i].text[0]) { + int len = SDL_strlen(messageboxdata->buttons[i].text); + if (len > output_len) { + output_len = len; + } + + argv[argc++] = "--extra-button"; + argv[argc++] = messageboxdata->buttons[i].text; + } else { + argv[argc++] = "--extra-button=\"\""; } + } + argv[argc] = NULL; - argv[argc++] = "--icon-name"; - switch (messageboxdata->flags) { - case SDL_MESSAGEBOX_ERROR: - argv[argc++] = "dialog-error"; - break; - case SDL_MESSAGEBOX_WARNING: - argv[argc++] = "dialog-warning"; - break; - case SDL_MESSAGEBOX_INFORMATION: - default: - argv[argc++] = "dialog-information"; - break; + if (run_zenity(argv, fd_pipe) == 0) { + FILE *outputfp = NULL; + char *output = NULL; + char *tmp = NULL; + + if (buttonid == NULL) { + /* if we don't need buttonid, we can return immediately */ + close(fd_pipe[0]); + return 0; /* success */ } + *buttonid = -1; - if (messageboxdata->title && messageboxdata->title[0]) { - argv[argc++] = "--title"; - argv[argc++] = messageboxdata->title; - } else { - argv[argc++] = "--title=\"\""; + output = SDL_malloc(output_len + 1); + if (output == NULL) { + close(fd_pipe[0]); + return SDL_OutOfMemory(); } + output[0] = '\0'; - if (messageboxdata->message && messageboxdata->message[0]) { - argv[argc++] = "--text"; - argv[argc++] = messageboxdata->message; - } else { - argv[argc++] = "--text=\"\""; + outputfp = fdopen(fd_pipe[0], "r"); + if (outputfp == NULL) { + SDL_free(output); + close(fd_pipe[0]); + return SDL_SetError("Couldn't open pipe for reading: %s", strerror(errno)); } + tmp = fgets(output, output_len + 1, outputfp); + (void)fclose(outputfp); - for (i = 0; i < messageboxdata->numbuttons; ++i) { - if (messageboxdata->buttons[i].text && messageboxdata->buttons[i].text[0]) { - argv[argc++] = "--extra-button"; - argv[argc++] = messageboxdata->buttons[i].text; - } else { - argv[argc++] = "--extra-button=\"\""; - } + if ((tmp == NULL) || (*tmp == '\0') || (*tmp == '\n')) { + SDL_free(output); + return 0; /* User simply closed the dialog */ } - argv[argc] = NULL; - /* const casting argv is fine: - * https://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html -> rational - */ - execvp("zenity", (char **)argv); - _exit(129); - } else if (pid1 < 0) { - close(fd_pipe[0]); - close(fd_pipe[1]); - return SDL_SetError("fork() failed: %s", strerror(errno)); - } else { - int status; - if (waitpid(pid1, &status, 0) == pid1) { - if (WIFEXITED(status)) { - if (WEXITSTATUS(status) < 128) { - int i; - size_t output_len = 1; - char* output = NULL; - char* tmp = NULL; - FILE* outputfp = NULL; - - close(fd_pipe[1]); /* no writing to pipe */ - /* At this point, if no button ID is needed, we can just bail as soon as the - * process has completed. - */ - if (buttonid == NULL) { - close(fd_pipe[0]); - return 0; - } - *buttonid = -1; - - /* find button with longest text */ - for (i = 0; i < messageboxdata->numbuttons; ++i) { - if (messageboxdata->buttons[i].text != NULL) { - const size_t button_len = SDL_strlen(messageboxdata->buttons[i].text); - if (button_len > output_len) { - output_len = button_len; - } - } - } - output = SDL_malloc(output_len + 1); - if (!output) { - close(fd_pipe[0]); - return SDL_OutOfMemory(); - } - output[0] = '\0'; - - outputfp = fdopen(fd_pipe[0], "r"); - if (!outputfp) { - SDL_free(output); - close(fd_pipe[0]); - return SDL_SetError("Couldn't open pipe for reading: %s", strerror(errno)); - } - tmp = fgets(output, output_len + 1, outputfp); - fclose(outputfp); - - if ((tmp == NULL) || (*tmp == '\0') || (*tmp == '\n')) { - SDL_free(output); - return 0; /* User simply closed the dialog */ - } - - /* It likes to add a newline... */ - tmp = SDL_strrchr(output, '\n'); - if (tmp != NULL) { - *tmp = '\0'; - } - - /* Check which button got pressed */ - for (i = 0; i < messageboxdata->numbuttons; i += 1) { - if (messageboxdata->buttons[i].text != NULL) { - if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) { - *buttonid = messageboxdata->buttons[i].buttonid; - break; - } - } - } - - SDL_free(output); - return 0; /* success! */ - } else { - return SDL_SetError("zenity reported error or failed to launch: %d", WEXITSTATUS(status)); + /* It likes to add a newline... */ + tmp = SDL_strrchr(output, '\n'); + if (tmp != NULL) { + *tmp = '\0'; + } + + /* Check which button got pressed */ + for (i = 0; i < messageboxdata->numbuttons; i += 1) { + if (messageboxdata->buttons[i].text != NULL) { + if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) { + *buttonid = messageboxdata->buttons[i].buttonid; + break; } - } else { - return SDL_SetError("zenity failed for some reason"); } - } else { - return SDL_SetError("Waiting on zenity failed: %s", strerror(errno)); } + + SDL_free(output); + return 0; /* success! */ } + + close(fd_pipe[0]); + close(fd_pipe[1]); + return -1; /* run_zenity() calls SDL_SetError(), so message is already set */ } #endif /* SDL_VIDEO_DRIVER_WAYLAND */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandmouse.c b/modules/SDL2/src/video/wayland/SDL_waylandmouse.c index 53995e5..adc9127 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandmouse.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandmouse.c @@ -43,29 +43,28 @@ #include "SDL_hints.h" #include "../../SDL_hints_c.h" -static int -Wayland_SetRelativeMouseMode(SDL_bool enabled); +static int Wayland_SetRelativeMouseMode(SDL_bool enabled); -typedef struct { - struct wl_buffer *buffer; - struct wl_surface *surface; +typedef struct +{ + struct wl_buffer *buffer; + struct wl_surface *surface; - int hot_x, hot_y; - int w, h; + int hot_x, hot_y; + int w, h; /* shm_data is non-NULL for custom cursors. * When shm_data is NULL, system_cursor must be valid */ - SDL_SystemCursor system_cursor; - void *shm_data; + SDL_SystemCursor system_cursor; + void *shm_data; } Wayland_CursorData; #ifdef SDL_USE_LIBDBUS #include "../../core/linux/SDL_dbus.h" -static DBusMessage* -wayland_read_dbus_setting(SDL_DBusContext *dbus, const char *key) +static DBusMessage *wayland_read_dbus_setting(SDL_DBusContext *dbus, const char *key) { static const char *iface = "org.gnome.desktop.interface"; @@ -73,7 +72,7 @@ wayland_read_dbus_setting(SDL_DBusContext *dbus, const char *key) DBusMessage *msg = dbus->message_new_method_call("org.freedesktop.portal.Desktop", /* Node */ "/org/freedesktop/portal/desktop", /* Path */ "org.freedesktop.portal.Settings", /* Interface */ - "Read"); /* Method */ + "Read"); /* Method */ if (msg) { if (dbus->message_append_args(msg, DBUS_TYPE_STRING, &iface, DBUS_TYPE_STRING, &key, DBUS_TYPE_INVALID)) { @@ -85,8 +84,7 @@ wayland_read_dbus_setting(SDL_DBusContext *dbus, const char *key) return reply; } -static SDL_bool -wayland_parse_dbus_reply(SDL_DBusContext *dbus, DBusMessage *reply, int type, void *value) +static SDL_bool wayland_parse_dbus_reply(SDL_DBusContext *dbus, DBusMessage *reply, int type, void *value) { DBusMessageIter iter[3]; @@ -110,15 +108,14 @@ wayland_parse_dbus_reply(SDL_DBusContext *dbus, DBusMessage *reply, int type, vo return SDL_TRUE; } -static SDL_bool -wayland_dbus_read_cursor_size(int *size) +static SDL_bool wayland_dbus_read_cursor_size(int *size) { static const char *cursor_size_value = "cursor-size"; DBusMessage *reply; SDL_DBusContext *dbus = SDL_DBus_GetContext(); - if (!dbus || !size) { + if (dbus == NULL || size == NULL) { return SDL_FALSE; } @@ -133,15 +130,14 @@ wayland_dbus_read_cursor_size(int *size) return SDL_FALSE; } -static SDL_bool -wayland_dbus_read_cursor_theme(char **theme) +static SDL_bool wayland_dbus_read_cursor_theme(char **theme) { static const char *cursor_theme_value = "cursor-theme"; DBusMessage *reply; SDL_DBusContext *dbus = SDL_DBus_GetContext(); - if (!dbus || !theme) { + if (dbus == NULL || theme == NULL) { return SDL_FALSE; } @@ -160,8 +156,7 @@ wayland_dbus_read_cursor_theme(char **theme) #endif -static SDL_bool -wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorData *cdata, float *scale) +static SDL_bool wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorData *cdata, float *scale) { struct wl_cursor_theme *theme = NULL; struct wl_cursor *cursor; @@ -236,8 +231,7 @@ wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorData *cdata, float } /* Next, find the cursor from the theme... */ - switch(cdata->system_cursor) - { + switch (cdata->system_cursor) { case SDL_SYSTEM_CURSOR_ARROW: cursor = WAYLAND_wl_cursor_theme_get_cursor(theme, "left_ptr"); break; @@ -279,6 +273,14 @@ wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorData *cdata, float return SDL_FALSE; } + /* Fallback to the default cursor if the chosen one wasn't found */ + if (!cursor) { + cursor = WAYLAND_wl_cursor_theme_get_cursor(theme, "left_ptr"); + if (!cursor) { + return SDL_FALSE; + } + } + /* ... Set the cursor data, finally. */ cdata->buffer = WAYLAND_wl_cursor_image_get_buffer(cursor->images[0]); cdata->hot_x = cursor->images[0]->hotspot_x; @@ -288,8 +290,7 @@ wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorData *cdata, float return SDL_TRUE; } -static int -wayland_create_tmp_file(off_t size) +static int wayland_create_tmp_file(off_t size) { static const char template[] = "/sdl-shared-XXXXXX"; char *xdg_path; @@ -297,7 +298,7 @@ wayland_create_tmp_file(off_t size) int fd; xdg_path = SDL_getenv("XDG_RUNTIME_DIR"); - if (!xdg_path) { + if (xdg_path == NULL) { return -1; } @@ -305,8 +306,9 @@ wayland_create_tmp_file(off_t size) SDL_strlcat(tmp_path, template, PATH_MAX); fd = mkostemp(tmp_path, O_CLOEXEC); - if (fd < 0) + if (fd < 0) { return -1; + } if (ftruncate(fd, size) < 0) { close(fd); @@ -316,8 +318,7 @@ wayland_create_tmp_file(off_t size) return fd; } -static void -mouse_buffer_release(void *data, struct wl_buffer *buffer) +static void mouse_buffer_release(void *data, struct wl_buffer *buffer) { } @@ -325,14 +326,13 @@ static const struct wl_buffer_listener mouse_buffer_listener = { mouse_buffer_release }; -static int -create_buffer_from_shm(Wayland_CursorData *d, - int width, - int height, - uint32_t format) +static int create_buffer_from_shm(Wayland_CursorData *d, + int width, + int height, + uint32_t format) { SDL_VideoDevice *vd = SDL_GetVideoDevice(); - SDL_VideoData *data = (SDL_VideoData *) vd->driverdata; + SDL_VideoData *data = (SDL_VideoData *)vd->driverdata; struct wl_shm_pool *shm_pool; int stride = width * 4; @@ -341,8 +341,7 @@ create_buffer_from_shm(Wayland_CursorData *d, int shm_fd; shm_fd = wayland_create_tmp_file(size); - if (shm_fd < 0) - { + if (shm_fd < 0) { return SDL_SetError("Creating mouse cursor buffer failed."); } @@ -354,7 +353,7 @@ create_buffer_from_shm(Wayland_CursorData *d, 0); if (d->shm_data == MAP_FAILED) { d->shm_data = NULL; - close (shm_fd); + close(shm_fd); return SDL_SetError("mmap() failed."); } @@ -371,37 +370,35 @@ create_buffer_from_shm(Wayland_CursorData *d, &mouse_buffer_listener, d); - wl_shm_pool_destroy (shm_pool); - close (shm_fd); + wl_shm_pool_destroy(shm_pool); + close(shm_fd); return 0; } -static SDL_Cursor * -Wayland_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) +static SDL_Cursor *Wayland_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { SDL_Cursor *cursor; - cursor = SDL_calloc(1, sizeof (*cursor)); + cursor = SDL_calloc(1, sizeof(*cursor)); if (cursor) { - SDL_VideoDevice *vd = SDL_GetVideoDevice (); - SDL_VideoData *wd = (SDL_VideoData *) vd->driverdata; - Wayland_CursorData *data = SDL_calloc (1, sizeof (Wayland_CursorData)); - if (!data) { + SDL_VideoDevice *vd = SDL_GetVideoDevice(); + SDL_VideoData *wd = (SDL_VideoData *)vd->driverdata; + Wayland_CursorData *data = SDL_calloc(1, sizeof(Wayland_CursorData)); + if (data == NULL) { SDL_OutOfMemory(); SDL_free(cursor); return NULL; } - cursor->driverdata = (void *) data; + cursor->driverdata = (void *)data; /* Allocate shared memory buffer for this cursor */ - if (create_buffer_from_shm (data, - surface->w, - surface->h, - WL_SHM_FORMAT_ARGB8888) < 0) - { - SDL_free (cursor->driverdata); - SDL_free (cursor); + if (create_buffer_from_shm(data, + surface->w, + surface->h, + WL_SHM_FORMAT_ARGB8888) < 0) { + SDL_free(cursor->driverdata); + SDL_free(cursor); return NULL; } @@ -424,21 +421,20 @@ Wayland_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) return cursor; } -static SDL_Cursor * -Wayland_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *Wayland_CreateSystemCursor(SDL_SystemCursor id) { SDL_VideoData *data = SDL_GetVideoDevice()->driverdata; SDL_Cursor *cursor; - cursor = SDL_calloc(1, sizeof (*cursor)); + cursor = SDL_calloc(1, sizeof(*cursor)); if (cursor) { - Wayland_CursorData *cdata = SDL_calloc (1, sizeof (Wayland_CursorData)); - if (!cdata) { + Wayland_CursorData *cdata = SDL_calloc(1, sizeof(Wayland_CursorData)); + if (cdata == NULL) { SDL_OutOfMemory(); SDL_free(cursor); return NULL; } - cursor->driverdata = (void *) cdata; + cursor->driverdata = (void *)cdata; cdata->surface = wl_compositor_create_surface(data->compositor); wl_surface_set_user_data(cdata->surface, NULL); @@ -454,14 +450,12 @@ Wayland_CreateSystemCursor(SDL_SystemCursor id) return cursor; } -static SDL_Cursor * -Wayland_CreateDefaultCursor() +static SDL_Cursor *Wayland_CreateDefaultCursor() { return Wayland_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); } -static void -Wayland_FreeCursorData(Wayland_CursorData *d) +static void Wayland_FreeCursorData(Wayland_CursorData *d) { if (d->buffer) { if (d->shm_data) { @@ -476,10 +470,9 @@ Wayland_FreeCursorData(Wayland_CursorData *d) } } -static void -Wayland_FreeCursor(SDL_Cursor *cursor) +static void Wayland_FreeCursor(SDL_Cursor *cursor) { - if (!cursor) { + if (cursor == NULL) { return; } @@ -488,15 +481,14 @@ Wayland_FreeCursor(SDL_Cursor *cursor) return; } - Wayland_FreeCursorData((Wayland_CursorData *) cursor->driverdata); + Wayland_FreeCursorData((Wayland_CursorData *)cursor->driverdata); /* Not sure what's meant to happen to shm_data */ SDL_free(cursor->driverdata); SDL_free(cursor); } -static int -Wayland_ShowCursor(SDL_Cursor *cursor) +static int Wayland_ShowCursor(SDL_Cursor *cursor) { SDL_VideoDevice *vd = SDL_GetVideoDevice(); SDL_VideoData *d = vd->driverdata; @@ -504,11 +496,11 @@ Wayland_ShowCursor(SDL_Cursor *cursor) struct wl_pointer *pointer = d->pointer; float scale = 1.0f; - if (!pointer) + if (pointer == NULL) { return -1; + } - if (cursor) - { + if (cursor) { Wayland_CursorData *data = cursor->driverdata; /* TODO: High-DPI custom cursors? -flibit */ @@ -534,19 +526,16 @@ Wayland_ShowCursor(SDL_Cursor *cursor) Wayland_input_unlock_pointer(input); input->relative_mode_override = SDL_FALSE; } - - } - else - { + + } else { input->cursor_visible = SDL_FALSE; wl_pointer_set_cursor(pointer, input->pointer_enter_serial, NULL, 0, 0); } - + return 0; } -static void -Wayland_WarpMouse(SDL_Window *window, int x, int y) +static void Wayland_WarpMouse(SDL_Window *window, int x, int y) { SDL_VideoDevice *vd = SDL_GetVideoDevice(); SDL_VideoData *d = vd->driverdata; @@ -564,23 +553,21 @@ Wayland_WarpMouse(SDL_Window *window, int x, int y) } } -static int -Wayland_WarpMouseGlobal(int x, int y) +static int Wayland_WarpMouseGlobal(int x, int y) { return SDL_Unsupported(); } -static int -Wayland_SetRelativeMouseMode(SDL_bool enabled) +static int Wayland_SetRelativeMouseMode(SDL_bool enabled) { SDL_VideoDevice *vd = SDL_GetVideoDevice(); - SDL_VideoData *data = (SDL_VideoData *) vd->driverdata; - + SDL_VideoData *data = (SDL_VideoData *)vd->driverdata; if (enabled) { /* Disable mouse warp emulation if it's enabled. */ - if (data->input->relative_mode_override) + if (data->input->relative_mode_override) { data->input->relative_mode_override = SDL_FALSE; + } /* If the app has used relative mode before, it probably shouldn't * also be emulating it using repeated mouse warps, so disable @@ -593,17 +580,15 @@ Wayland_SetRelativeMouseMode(SDL_bool enabled) } } -static void SDLCALL -Wayland_EmulateMouseWarpChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL Wayland_EmulateMouseWarpChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { struct SDL_WaylandInput *input = (struct SDL_WaylandInput *)userdata; input->warp_emulation_prohibited = !SDL_GetStringBoolean(hint, !input->warp_emulation_prohibited); } -#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */ -static void -Wayland_RecreateCursor(SDL_Cursor *cursor, SDL_VideoData *vdata) +#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */ +static void Wayland_RecreateCursor(SDL_Cursor *cursor, SDL_VideoData *vdata) { Wayland_CursorData *cdata = (Wayland_CursorData *) cursor->driverdata; @@ -627,8 +612,7 @@ Wayland_RecreateCursor(SDL_Cursor *cursor, SDL_VideoData *vdata) wl_surface_set_user_data(cdata->surface, NULL); } -void -Wayland_RecreateCursors(void) +void Wayland_RecreateCursors(void) { SDL_Cursor *cursor; SDL_Mouse *mouse = SDL_GetMouse(); @@ -659,8 +643,7 @@ Wayland_RecreateCursors(void) } #endif /* 0 */ -void -Wayland_InitMouse(void) +void Wayland_InitMouse(void) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_VideoDevice *vd = SDL_GetVideoDevice(); @@ -680,12 +663,11 @@ Wayland_InitMouse(void) SDL_SetDefaultCursor(Wayland_CreateDefaultCursor()); - SDL_AddHintCallback(SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, + SDL_AddHintCallback(SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, Wayland_EmulateMouseWarpChanged, input); } -void -Wayland_FiniMouse(SDL_VideoData *data) +void Wayland_FiniMouse(SDL_VideoData *data) { struct SDL_WaylandInput *input = data->input; int i; @@ -696,10 +678,10 @@ Wayland_FiniMouse(SDL_VideoData *data) SDL_free(data->cursor_themes); data->cursor_themes = NULL; - SDL_DelHintCallback(SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, + SDL_DelHintCallback(SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, Wayland_EmulateMouseWarpChanged, input); } -#endif /* SDL_VIDEO_DRIVER_WAYLAND */ +#endif /* SDL_VIDEO_DRIVER_WAYLAND */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandmouse.h b/modules/SDL2/src/video/wayland/SDL_waylandmouse.h index c4fd130..dd3e8f8 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandmouse.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandmouse.h @@ -27,7 +27,7 @@ extern void Wayland_InitMouse(void); extern void Wayland_FiniMouse(SDL_VideoData *data); -#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */ +#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */ extern void Wayland_RecreateCursors(void); #endif /* 0 */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandopengles.c b/modules/SDL2/src/video/wayland/SDL_waylandopengles.c index b7215ed..41e84fb 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandopengles.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandopengles.c @@ -35,10 +35,10 @@ /* EGL implementation of SDL OpenGL ES support */ -int -Wayland_GLES_LoadLibrary(_THIS, const char *path) { +int Wayland_GLES_LoadLibrary(_THIS, const char *path) +{ int ret; - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; ret = SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) data->display, 0); @@ -48,13 +48,11 @@ Wayland_GLES_LoadLibrary(_THIS, const char *path) { return ret; } - -SDL_GLContext -Wayland_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window *window) { SDL_GLContext context; - context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); - WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display ); + context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); + WAYLAND_wl_display_flush(((SDL_VideoData *)_this->driverdata)->display); return context; } @@ -73,13 +71,12 @@ Wayland_GLES_CreateContext(_THIS, SDL_Window * window) libretro, Wayland, probably others...it feels like we're eventually going to have to give in with a future SDL API revision, since we can bend the other APIs to this style, but this style is much harder to bend the other way. :/ */ -int -Wayland_GLES_SetSwapInterval(_THIS, int interval) +int Wayland_GLES_SetSwapInterval(_THIS, int interval) { if (!_this->egl_data) { return SDL_SetError("EGL not initialized"); } - + /* technically, this is _all_ adaptive vsync (-1), because we can't actually wait for the _next_ vsync if you set 1, but things that request 1 probably won't care _that_ much. I hope. No matter what @@ -96,8 +93,7 @@ Wayland_GLES_SetSwapInterval(_THIS, int interval) return 0; } -int -Wayland_GLES_GetSwapInterval(_THIS) +int Wayland_GLES_GetSwapInterval(_THIS) { if (!_this->egl_data) { SDL_SetError("EGL not initialized"); @@ -107,10 +103,9 @@ Wayland_GLES_GetSwapInterval(_THIS) return _this->egl_data->egl_swapinterval; } -int -Wayland_GLES_SwapWindow(_THIS, SDL_Window *window) +int Wayland_GLES_SwapWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; const int swap_interval = _this->egl_data->egl_swapinterval; /* For windows that we know are hidden, skip swaps entirely, if we don't do @@ -131,8 +126,7 @@ Wayland_GLES_SwapWindow(_THIS, SDL_Window *window) struct wl_display *display = videodata->display; SDL_VideoDisplay *sdldisplay = SDL_GetDisplayForWindow(window); /* ~10 frames (or 1 sec), so we'll progress even if throttled to zero. */ - const Uint32 max_wait = SDL_GetTicks() + (sdldisplay->current_mode.refresh_rate ? - (10000 / sdldisplay->current_mode.refresh_rate) : 1000); + const Uint32 max_wait = SDL_GetTicks() + (sdldisplay->current_mode.refresh_rate ? (10000 / sdldisplay->current_mode.refresh_rate) : 1000); while (SDL_AtomicGet(&data->swap_interval_ready) == 0) { Uint32 now; @@ -173,35 +167,32 @@ Wayland_GLES_SwapWindow(_THIS, SDL_Window *window) return SDL_EGL_SetError("unable to show color buffer in an OS-native window", "eglSwapBuffers"); } - WAYLAND_wl_display_flush( data->waylandData->display ); + WAYLAND_wl_display_flush(data->waylandData->display); return 0; } -int -Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int Wayland_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { int ret; if (window && context) { - ret = SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); - } - else { + ret = SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *)window->driverdata)->egl_surface, context); + } else { ret = SDL_EGL_MakeCurrent(_this, NULL, NULL); } - WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display ); + WAYLAND_wl_display_flush(((SDL_VideoData *)_this->driverdata)->display); - _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, 0); /* see comments on Wayland_GLES_SetSwapInterval. */ + _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, 0); /* see comments on Wayland_GLES_SetSwapInterval. */ return ret; } -void -Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context) +void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context) { SDL_EGL_DeleteContext(_this, context); - WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display ); + WAYLAND_wl_display_flush(((SDL_VideoData *)_this->driverdata)->display); } #endif /* SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandopengles.h b/modules/SDL2/src/video/wayland/SDL_waylandopengles.h index 9e34eb1..deb7dd1 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandopengles.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandopengles.h @@ -37,11 +37,11 @@ typedef struct SDL_PrivateGLESData #define Wayland_GLES_UnloadLibrary SDL_EGL_UnloadLibrary extern int Wayland_GLES_LoadLibrary(_THIS, const char *path); -extern SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window * window); +extern SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window *window); extern int Wayland_GLES_SetSwapInterval(_THIS, int interval); extern int Wayland_GLES_GetSwapInterval(_THIS); -extern int Wayland_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern int Wayland_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int Wayland_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context); #endif /* SDL_waylandopengles_h_ */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandsym.h b/modules/SDL2/src/video/wayland/SDL_waylandsym.h index 7864eda..c59bb30 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandsym.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandsym.h @@ -29,6 +29,10 @@ #define SDL_WAYLAND_SYM(rc,fn,params) #endif +#ifndef SDL_WAYLAND_SYM_OPT +#define SDL_WAYLAND_SYM_OPT(rc,fn,params) +#endif + #ifndef SDL_WAYLAND_INTERFACE #define SDL_WAYLAND_INTERFACE(iface) #endif @@ -212,10 +216,22 @@ SDL_WAYLAND_SYM(bool, libdecor_configuration_get_content_size, (struct libdecor_ SDL_WAYLAND_SYM(bool, libdecor_configuration_get_window_state, (struct libdecor_configuration *,\ enum libdecor_window_state *)) SDL_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int)) + +#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) || defined(SDL_HAVE_LIBDECOR_GET_MIN_MAX) +/* Only found in libdecor 0.1.1 or higher, so failure to load them is not fatal. */ +SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_min_content_size, (struct libdecor_frame *,\ + int *,\ + int *)) +SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_max_content_size, (struct libdecor_frame *,\ + int *,\ + int *)) +#endif + #endif #undef SDL_WAYLAND_MODULE #undef SDL_WAYLAND_SYM +#undef SDL_WAYLAND_SYM_OPT #undef SDL_WAYLAND_INTERFACE /* *INDENT-ON* */ /* clang-format on */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandtouch.c b/modules/SDL2/src/video/wayland/SDL_waylandtouch.c index 77403b7..7c7a300 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandtouch.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandtouch.c @@ -30,42 +30,42 @@ #include "SDL_waylandtouch.h" #include "../../events/SDL_touch_c.h" -struct SDL_WaylandTouch { +struct SDL_WaylandTouch +{ struct qt_touch_extension *touch_extension; }; - /** * Qt TouchPointState * adapted from qtbase/src/corelib/global/qnamespace.h **/ -enum QtWaylandTouchPointState { - QtWaylandTouchPointPressed = 0x01, - QtWaylandTouchPointMoved = 0x02, +enum QtWaylandTouchPointState +{ + QtWaylandTouchPointPressed = 0x01, + QtWaylandTouchPointMoved = 0x02, /* Never sent by the server: QtWaylandTouchPointStationary = 0x04, */ - QtWaylandTouchPointReleased = 0x08, + QtWaylandTouchPointReleased = 0x08, }; -static void -touch_handle_touch(void *data, - struct qt_touch_extension *qt_touch_extension, - uint32_t time, - uint32_t id, - uint32_t state, - int32_t x, - int32_t y, - int32_t normalized_x, - int32_t normalized_y, - int32_t width, - int32_t height, - uint32_t pressure, - int32_t velocity_x, - int32_t velocity_y, - uint32_t flags, - struct wl_array *rawdata) +static void touch_handle_touch(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t time, + uint32_t id, + uint32_t state, + int32_t x, + int32_t y, + int32_t normalized_x, + int32_t normalized_y, + int32_t width, + int32_t height, + uint32_t pressure, + int32_t velocity_x, + int32_t velocity_y, + uint32_t flags, + struct wl_array *rawdata) { /** * Event is assembled in QtWayland in TouchExtensionGlobal::postTouchEvent @@ -89,11 +89,11 @@ touch_handle_touch(void *data, uint32_t capabilities = flags >> 16; */ - SDL_Window* window = NULL; + SDL_Window *window = NULL; SDL_TouchID deviceId = 1; if (SDL_AddTouch(deviceId, SDL_TOUCH_DEVICE_DIRECT, "qt_touch_extension") < 0) { - SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__); + SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__); } /* FIXME: This should be the window the given wayland surface is associated @@ -104,29 +104,27 @@ touch_handle_touch(void *data, } switch (touchState) { - case QtWaylandTouchPointPressed: - case QtWaylandTouchPointReleased: - SDL_SendTouch(deviceId, (SDL_FingerID)id, window, - (touchState == QtWaylandTouchPointPressed) ? SDL_TRUE : SDL_FALSE, - xf, yf, pressuref); - break; - case QtWaylandTouchPointMoved: - SDL_SendTouchMotion(deviceId, (SDL_FingerID)id, window, xf, yf, pressuref); - break; - default: - /* Should not happen */ - break; + case QtWaylandTouchPointPressed: + case QtWaylandTouchPointReleased: + SDL_SendTouch(deviceId, (SDL_FingerID)id, window, + (touchState == QtWaylandTouchPointPressed) ? SDL_TRUE : SDL_FALSE, + xf, yf, pressuref); + break; + case QtWaylandTouchPointMoved: + SDL_SendTouchMotion(deviceId, (SDL_FingerID)id, window, xf, yf, pressuref); + break; + default: + /* Should not happen */ + break; } } -static void -touch_handle_configure(void *data, - struct qt_touch_extension *qt_touch_extension, - uint32_t flags) +static void touch_handle_configure(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t flags) { } - /* wayland-qt-touch-extension.c BEGINS */ static const struct qt_touch_extension_listener touch_listener = { @@ -161,9 +159,12 @@ static const struct wl_message qt_touch_extension_events[] = { }; const struct wl_interface qt_touch_extension_interface = { - "qt_touch_extension", 1, - 1, qt_touch_extension_requests, - 2, qt_touch_extension_events, + "qt_touch_extension", + 1, + 1, + qt_touch_extension_requests, + 2, + qt_touch_extension_events, }; /* wayland-qt-touch-extension.c ENDS */ @@ -184,9 +185,12 @@ static const struct wl_message qt_windowmanager_events[] = { }; const struct wl_interface qt_windowmanager_interface = { - "qt_windowmanager", 1, - 1, qt_windowmanager_requests, - 2, qt_windowmanager_events, + "qt_windowmanager", + 1, + 1, + qt_windowmanager_requests, + 2, + qt_windowmanager_events, }; /* wayland-qt-windowmanager.c ENDS */ @@ -200,14 +204,14 @@ static const struct wl_interface *qt_surface_extension_types[] = { NULL, &qt_extended_surface_interface, #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC - /* FIXME: Set this dynamically to (*WAYLAND_wl_surface_interface) ? - * The value comes from auto generated code and does + /* FIXME: Set this dynamically to (*WAYLAND_wl_surface_interface) ? + * The value comes from auto generated code and does * not appear to actually be used anywhere */ - NULL, + NULL, #else &wl_surface_interface, -#endif +#endif }; static const struct wl_message qt_surface_extension_requests[] = { @@ -215,9 +219,12 @@ static const struct wl_message qt_surface_extension_requests[] = { }; const struct wl_interface qt_surface_extension_interface = { - "qt_surface_extension", 1, - 1, qt_surface_extension_requests, - 0, NULL, + "qt_surface_extension", + 1, + 1, + qt_surface_extension_requests, + 0, + NULL, }; static const struct wl_message qt_extended_surface_requests[] = { @@ -233,15 +240,17 @@ static const struct wl_message qt_extended_surface_events[] = { }; const struct wl_interface qt_extended_surface_interface = { - "qt_extended_surface", 1, - 3, qt_extended_surface_requests, - 3, qt_extended_surface_events, + "qt_extended_surface", + 1, + 3, + qt_extended_surface_requests, + 3, + qt_extended_surface_events, }; /* wayland-qt-surface-extension.c ENDS */ -void -Wayland_touch_create(SDL_VideoData *data, uint32_t id) +void Wayland_touch_create(SDL_VideoData *data, uint32_t id) { struct SDL_WaylandTouch *touch; @@ -257,8 +266,7 @@ Wayland_touch_create(SDL_VideoData *data, uint32_t id) qt_touch_extension_add_listener(touch->touch_extension, &touch_listener, data); } -void -Wayland_touch_destroy(SDL_VideoData *data) +void Wayland_touch_destroy(SDL_VideoData *data) { if (data->touch) { struct SDL_WaylandTouch *touch = data->touch; diff --git a/modules/SDL2/src/video/wayland/SDL_waylandtouch.h b/modules/SDL2/src/video/wayland/SDL_waylandtouch.h index 3dbb60d..5a542e2 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandtouch.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandtouch.h @@ -31,7 +31,6 @@ #include #include "wayland-util.h" - void Wayland_touch_create(SDL_VideoData *data, uint32_t id); void Wayland_touch_destroy(SDL_VideoData *data); @@ -72,45 +71,42 @@ struct qt_extended_surface; extern const struct wl_interface qt_surface_extension_interface; extern const struct wl_interface qt_extended_surface_interface; -#define QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE 0 +#define QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE 0 -static inline void -qt_surface_extension_set_user_data(struct qt_surface_extension *qt_surface_extension, void *user_data) +static inline void qt_surface_extension_set_user_data(struct qt_surface_extension *qt_surface_extension, void *user_data) { - wl_proxy_set_user_data((struct wl_proxy *) qt_surface_extension, user_data); + wl_proxy_set_user_data((struct wl_proxy *)qt_surface_extension, user_data); } -static inline void * -qt_surface_extension_get_user_data(struct qt_surface_extension *qt_surface_extension) +static inline void *qt_surface_extension_get_user_data(struct qt_surface_extension *qt_surface_extension) { - return wl_proxy_get_user_data((struct wl_proxy *) qt_surface_extension); + return wl_proxy_get_user_data((struct wl_proxy *)qt_surface_extension); } -static inline void -qt_surface_extension_destroy(struct qt_surface_extension *qt_surface_extension) +static inline void qt_surface_extension_destroy(struct qt_surface_extension *qt_surface_extension) { - WAYLAND_wl_proxy_destroy((struct wl_proxy *) qt_surface_extension); + WAYLAND_wl_proxy_destroy((struct wl_proxy *)qt_surface_extension); } -static inline struct qt_extended_surface * -qt_surface_extension_get_extended_surface(struct qt_surface_extension *qt_surface_extension, struct wl_surface *surface) +static inline struct qt_extended_surface *qt_surface_extension_get_extended_surface(struct qt_surface_extension *qt_surface_extension, struct wl_surface *surface) { struct wl_proxy *id; - id = wl_proxy_create((struct wl_proxy *) qt_surface_extension, - &qt_extended_surface_interface); - if (!id) + id = wl_proxy_create((struct wl_proxy *)qt_surface_extension, + &qt_extended_surface_interface); + if (id == NULL) return NULL; - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_surface_extension, - QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE, id, surface); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_surface_extension, + QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE, id, surface); - return (struct qt_extended_surface *) id; + return (struct qt_extended_surface *)id; } #ifndef QT_EXTENDED_SURFACE_ORIENTATION_ENUM #define QT_EXTENDED_SURFACE_ORIENTATION_ENUM -enum qt_extended_surface_orientation { +enum qt_extended_surface_orientation +{ QT_EXTENDED_SURFACE_ORIENTATION_PRIMARYORIENTATION = 0, QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION = 1, QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION = 2, @@ -121,85 +117,80 @@ enum qt_extended_surface_orientation { #ifndef QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM #define QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM -enum qt_extended_surface_windowflag { +enum qt_extended_surface_windowflag +{ QT_EXTENDED_SURFACE_WINDOWFLAG_OVERRIDESSYSTEMGESTURES = 1, QT_EXTENDED_SURFACE_WINDOWFLAG_STAYSONTOP = 2, }; #endif /* QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM */ -struct qt_extended_surface_listener { +struct qt_extended_surface_listener +{ /** * onscreen_visibility - (none) * @visible: (none) */ void (*onscreen_visibility)(void *data, - struct qt_extended_surface *qt_extended_surface, - int32_t visible); + struct qt_extended_surface *qt_extended_surface, + int32_t visible); /** * set_generic_property - (none) * @name: (none) * @value: (none) */ void (*set_generic_property)(void *data, - struct qt_extended_surface *qt_extended_surface, - const char *name, - struct wl_array *value); + struct qt_extended_surface *qt_extended_surface, + const char *name, + struct wl_array *value); /** * close - (none) */ void (*close)(void *data, - struct qt_extended_surface *qt_extended_surface); + struct qt_extended_surface *qt_extended_surface); }; -static inline int -qt_extended_surface_add_listener(struct qt_extended_surface *qt_extended_surface, - const struct qt_extended_surface_listener *listener, void *data) +static inline int qt_extended_surface_add_listener(struct qt_extended_surface *qt_extended_surface, + const struct qt_extended_surface_listener *listener, void *data) { - return wl_proxy_add_listener((struct wl_proxy *) qt_extended_surface, - (void (**)(void)) listener, data); + return wl_proxy_add_listener((struct wl_proxy *)qt_extended_surface, + (void (**)(void))listener, data); } #define QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY 0 #define QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION 1 -#define QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS 2 +#define QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS 2 -static inline void -qt_extended_surface_set_user_data(struct qt_extended_surface *qt_extended_surface, void *user_data) +static inline void qt_extended_surface_set_user_data(struct qt_extended_surface *qt_extended_surface, void *user_data) { - WAYLAND_wl_proxy_set_user_data((struct wl_proxy *) qt_extended_surface, user_data); + WAYLAND_wl_proxy_set_user_data((struct wl_proxy *)qt_extended_surface, user_data); } -static inline void * -qt_extended_surface_get_user_data(struct qt_extended_surface *qt_extended_surface) +static inline void *qt_extended_surface_get_user_data(struct qt_extended_surface *qt_extended_surface) { - return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *) qt_extended_surface); + return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *)qt_extended_surface); } -static inline void -qt_extended_surface_destroy(struct qt_extended_surface *qt_extended_surface) +static inline void qt_extended_surface_destroy(struct qt_extended_surface *qt_extended_surface) { - WAYLAND_wl_proxy_destroy((struct wl_proxy *) qt_extended_surface); + WAYLAND_wl_proxy_destroy((struct wl_proxy *)qt_extended_surface); } -static inline void -qt_extended_surface_update_generic_property(struct qt_extended_surface *qt_extended_surface, const char *name, struct wl_array *value) +static inline void qt_extended_surface_update_generic_property(struct qt_extended_surface *qt_extended_surface, const char *name, struct wl_array *value) { - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, - QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY, name, value); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_extended_surface, + QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY, name, value); } -static inline void -qt_extended_surface_set_content_orientation(struct qt_extended_surface *qt_extended_surface, int32_t orientation) +static inline void qt_extended_surface_set_content_orientation(struct qt_extended_surface *qt_extended_surface, int32_t orientation) { - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, - QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION, orientation); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_extended_surface, + QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION, orientation); } -static inline void -qt_extended_surface_set_window_flags(struct qt_extended_surface *qt_extended_surface, int32_t flags) +static inline void qt_extended_surface_set_window_flags(struct qt_extended_surface *qt_extended_surface, int32_t flags) { - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, - QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS, flags); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_extended_surface, + QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS, flags); } /* wayland-qt-touch-extension.h */ @@ -208,12 +199,14 @@ extern const struct wl_interface qt_touch_extension_interface; #ifndef QT_TOUCH_EXTENSION_FLAGS_ENUM #define QT_TOUCH_EXTENSION_FLAGS_ENUM -enum qt_touch_extension_flags { +enum qt_touch_extension_flags +{ QT_TOUCH_EXTENSION_FLAGS_MOUSE_FROM_TOUCH = 0x1, }; #endif /* QT_TOUCH_EXTENSION_FLAGS_ENUM */ -struct qt_touch_extension_listener { +struct qt_touch_extension_listener +{ /** * touch - (none) * @time: (none) @@ -232,118 +225,108 @@ struct qt_touch_extension_listener { * @rawdata: (none) */ void (*touch)(void *data, - struct qt_touch_extension *qt_touch_extension, - uint32_t time, - uint32_t id, - uint32_t state, - int32_t x, - int32_t y, - int32_t normalized_x, - int32_t normalized_y, - int32_t width, - int32_t height, - uint32_t pressure, - int32_t velocity_x, - int32_t velocity_y, - uint32_t flags, - struct wl_array *rawdata); + struct qt_touch_extension *qt_touch_extension, + uint32_t time, + uint32_t id, + uint32_t state, + int32_t x, + int32_t y, + int32_t normalized_x, + int32_t normalized_y, + int32_t width, + int32_t height, + uint32_t pressure, + int32_t velocity_x, + int32_t velocity_y, + uint32_t flags, + struct wl_array *rawdata); /** * configure - (none) * @flags: (none) */ void (*configure)(void *data, - struct qt_touch_extension *qt_touch_extension, - uint32_t flags); + struct qt_touch_extension *qt_touch_extension, + uint32_t flags); }; -static inline int -qt_touch_extension_add_listener(struct qt_touch_extension *qt_touch_extension, - const struct qt_touch_extension_listener *listener, void *data) +static inline int qt_touch_extension_add_listener(struct qt_touch_extension *qt_touch_extension, + const struct qt_touch_extension_listener *listener, void *data) { - return wl_proxy_add_listener((struct wl_proxy *) qt_touch_extension, - (void (**)(void)) listener, data); + return wl_proxy_add_listener((struct wl_proxy *)qt_touch_extension, + (void (**)(void))listener, data); } -#define QT_TOUCH_EXTENSION_DUMMY 0 +#define QT_TOUCH_EXTENSION_DUMMY 0 -static inline void -qt_touch_extension_set_user_data(struct qt_touch_extension *qt_touch_extension, void *user_data) +static inline void qt_touch_extension_set_user_data(struct qt_touch_extension *qt_touch_extension, void *user_data) { - WAYLAND_wl_proxy_set_user_data((struct wl_proxy *) qt_touch_extension, user_data); + WAYLAND_wl_proxy_set_user_data((struct wl_proxy *)qt_touch_extension, user_data); } -static inline void * -qt_touch_extension_get_user_data(struct qt_touch_extension *qt_touch_extension) +static inline void *qt_touch_extension_get_user_data(struct qt_touch_extension *qt_touch_extension) { - return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *) qt_touch_extension); + return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *)qt_touch_extension); } -static inline void -qt_touch_extension_destroy(struct qt_touch_extension *qt_touch_extension) +static inline void qt_touch_extension_destroy(struct qt_touch_extension *qt_touch_extension) { - WAYLAND_wl_proxy_destroy((struct wl_proxy *) qt_touch_extension); + WAYLAND_wl_proxy_destroy((struct wl_proxy *)qt_touch_extension); } -static inline void -qt_touch_extension_dummy(struct qt_touch_extension *qt_touch_extension) +static inline void qt_touch_extension_dummy(struct qt_touch_extension *qt_touch_extension) { - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_touch_extension, - QT_TOUCH_EXTENSION_DUMMY); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_touch_extension, + QT_TOUCH_EXTENSION_DUMMY); } - /* wayland-qt-windowmanager.h */ extern const struct wl_interface qt_windowmanager_interface; -struct qt_windowmanager_listener { +struct qt_windowmanager_listener +{ /** * hints - (none) * @show_is_fullscreen: (none) */ void (*hints)(void *data, - struct qt_windowmanager *qt_windowmanager, - int32_t show_is_fullscreen); + struct qt_windowmanager *qt_windowmanager, + int32_t show_is_fullscreen); /** * quit - (none) */ void (*quit)(void *data, - struct qt_windowmanager *qt_windowmanager); + struct qt_windowmanager *qt_windowmanager); }; -static inline int -qt_windowmanager_add_listener(struct qt_windowmanager *qt_windowmanager, - const struct qt_windowmanager_listener *listener, void *data) +static inline int qt_windowmanager_add_listener(struct qt_windowmanager *qt_windowmanager, + const struct qt_windowmanager_listener *listener, void *data) { - return wl_proxy_add_listener((struct wl_proxy *) qt_windowmanager, - (void (**)(void)) listener, data); + return wl_proxy_add_listener((struct wl_proxy *)qt_windowmanager, + (void (**)(void))listener, data); } -#define QT_WINDOWMANAGER_OPEN_URL 0 +#define QT_WINDOWMANAGER_OPEN_URL 0 -static inline void -qt_windowmanager_set_user_data(struct qt_windowmanager *qt_windowmanager, void *user_data) +static inline void qt_windowmanager_set_user_data(struct qt_windowmanager *qt_windowmanager, void *user_data) { - WAYLAND_wl_proxy_set_user_data((struct wl_proxy *) qt_windowmanager, user_data); + WAYLAND_wl_proxy_set_user_data((struct wl_proxy *)qt_windowmanager, user_data); } -static inline void * -qt_windowmanager_get_user_data(struct qt_windowmanager *qt_windowmanager) +static inline void *qt_windowmanager_get_user_data(struct qt_windowmanager *qt_windowmanager) { - return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *) qt_windowmanager); + return WAYLAND_wl_proxy_get_user_data((struct wl_proxy *)qt_windowmanager); } -static inline void -qt_windowmanager_destroy(struct qt_windowmanager *qt_windowmanager) +static inline void qt_windowmanager_destroy(struct qt_windowmanager *qt_windowmanager) { - WAYLAND_wl_proxy_destroy((struct wl_proxy *) qt_windowmanager); + WAYLAND_wl_proxy_destroy((struct wl_proxy *)qt_windowmanager); } -static inline void -qt_windowmanager_open_url(struct qt_windowmanager *qt_windowmanager, uint32_t remaining, const char *url) +static inline void qt_windowmanager_open_url(struct qt_windowmanager *qt_windowmanager, uint32_t remaining, const char *url) { - WAYLAND_wl_proxy_marshal((struct wl_proxy *) qt_windowmanager, - QT_WINDOWMANAGER_OPEN_URL, remaining, url); + WAYLAND_wl_proxy_marshal((struct wl_proxy *)qt_windowmanager, + QT_WINDOWMANAGER_OPEN_URL, remaining, url); } #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ diff --git a/modules/SDL2/src/video/wayland/SDL_waylandvideo.c b/modules/SDL2/src/video/wayland/SDL_waylandvideo.c index b91897f..8fd6581 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandvideo.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandvideo.c @@ -56,6 +56,7 @@ #include "xdg-output-unstable-v1-client-protocol.h" #include "viewporter-client-protocol.h" #include "primary-selection-unstable-v1-client-protocol.h" +#include "fractional-scale-v1-client-protocol.h" #ifdef HAVE_LIBDECOR_H #include @@ -63,32 +64,26 @@ #define WAYLANDVID_DRIVER_NAME "wayland" -static void -display_handle_done(void *data, struct wl_output *output); +static void display_handle_done(void *data, struct wl_output *output); /* Initialization/Query functions */ -static int -Wayland_VideoInit(_THIS); +static int Wayland_VideoInit(_THIS); -static int -Wayland_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); +static int Wayland_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); -static int -Wayland_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float * hdpi, float * vdpi); +static int Wayland_GetDisplayDPI(_THIS, SDL_VideoDisplay *sdl_display, float *ddpi, float *hdpi, float *vdpi); -static void -Wayland_VideoQuit(_THIS); +static void Wayland_VideoQuit(_THIS); /* Find out what class name we should use * Based on src/video/x11/SDL_x11video.c */ -static char * -get_classname() +static char *get_classname() { -/* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec: - "The surface class identifies the general class of applications - to which the surface belongs. A common convention is to use the - file name (or the full path if it is a non-standard location) of - the application's .desktop file as the class." */ + /* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec: + "The surface class identifies the general class of applications + to which the surface belongs. A common convention is to use the + file name (or the full path if it is a non-standard location) of + the application's .desktop file as the class." */ char *spot; #if defined(__LINUX__) || defined(__FREEBSD__) @@ -112,10 +107,9 @@ get_classname() /* Next look at the application's executable name */ #if defined(__LINUX__) || defined(__FREEBSD__) #if defined(__LINUX__) - SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/exe", getpid()); + (void)SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/exe", getpid()); #elif defined(__FREEBSD__) - SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/file", - getpid()); + (void)SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/file", getpid()); #else #error Where can we find the executable name? #endif @@ -150,16 +144,15 @@ void SDL_WAYLAND_register_output(struct wl_output *output) SDL_bool SDL_WAYLAND_own_surface(struct wl_surface *surface) { - return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag; + return wl_proxy_get_tag((struct wl_proxy *)surface) == &SDL_WAYLAND_surface_tag; } SDL_bool SDL_WAYLAND_own_output(struct wl_output *output) { - return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag; + return wl_proxy_get_tag((struct wl_proxy *)output) == &SDL_WAYLAND_output_tag; } -static void -Wayland_DeleteDevice(SDL_VideoDevice *device) +static void Wayland_DeleteDevice(SDL_VideoDevice *device) { SDL_VideoData *data = (SDL_VideoData *)device->driverdata; if (data->display) { @@ -174,8 +167,7 @@ Wayland_DeleteDevice(SDL_VideoDevice *device) SDL_WAYLAND_UnloadSymbols(); } -static SDL_VideoDevice * -Wayland_CreateDevice(void) +static SDL_VideoDevice *Wayland_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *data; @@ -204,7 +196,7 @@ Wayland_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + if (device == NULL) { SDL_free(data); WAYLAND_wl_display_disconnect(display); SDL_WAYLAND_UnloadSymbols(); @@ -293,22 +285,20 @@ VideoBootStrap Wayland_bootstrap = { Wayland_CreateDevice }; -static void -xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output, - int32_t x, int32_t y) +static void xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output, + int32_t x, int32_t y) { - SDL_WaylandOutputData* driverdata = data; + SDL_WaylandOutputData *driverdata = data; driverdata->x = x; driverdata->y = y; driverdata->has_logical_position = SDL_TRUE; } -static void -xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output, - int32_t width, int32_t height) +static void xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output, + int32_t width, int32_t height) { - SDL_WaylandOutputData* driverdata = data; + SDL_WaylandOutputData *driverdata = data; if (driverdata->width != 0 && driverdata->height != 0) { /* FIXME: GNOME has a bug where the logical size does not account for @@ -319,12 +309,11 @@ xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output, * detected otherwise), then override if necessary. * -flibit */ - const float scale = (float) driverdata->width / (float) width; + const float scale = (float)driverdata->width / (float)width; if ((scale == 1.0f) && (driverdata->scale_factor != 1.0f)) { SDL_LogWarn( SDL_LOG_CATEGORY_VIDEO, - "xdg_output scale did not match, overriding with wl_output scale" - ); + "xdg_output scale did not match, overriding with wl_output scale"); return; } } @@ -334,10 +323,9 @@ xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output, driverdata->has_logical_size = SDL_TRUE; } -static void -xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output) +static void xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output) { - SDL_WaylandOutputData* driverdata = data; + SDL_WaylandOutputData *driverdata = data; /* * xdg-output.done events are deprecated and only apply below version 3 of the protocol. @@ -348,17 +336,15 @@ xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output) } } -static void -xdg_output_handle_name(void *data, struct zxdg_output_v1 *xdg_output, - const char *name) +static void xdg_output_handle_name(void *data, struct zxdg_output_v1 *xdg_output, + const char *name) { } -static void -xdg_output_handle_description(void *data, struct zxdg_output_v1 *xdg_output, - const char *description) +static void xdg_output_handle_description(void *data, struct zxdg_output_v1 *xdg_output, + const char *description) { - SDL_WaylandOutputData* driverdata = data; + SDL_WaylandOutputData *driverdata = data; if (driverdata->index == -1) { /* xdg-output descriptions, if available, supersede wl-output model names. */ @@ -371,15 +357,14 @@ xdg_output_handle_description(void *data, struct zxdg_output_v1 *xdg_output, } static const struct zxdg_output_v1_listener xdg_output_listener = { - xdg_output_handle_logical_position, - xdg_output_handle_logical_size, - xdg_output_handle_done, - xdg_output_handle_name, - xdg_output_handle_description, + xdg_output_handle_logical_position, + xdg_output_handle_logical_size, + xdg_output_handle_done, + xdg_output_handle_name, + xdg_output_handle_description, }; -static void -AddEmulatedModes(SDL_VideoDisplay *dpy, SDL_bool rot_90) +static void AddEmulatedModes(SDL_VideoDisplay *dpy, SDL_bool rot_90) { struct EmulatedMode { @@ -431,7 +416,7 @@ AddEmulatedModes(SDL_VideoDisplay *dpy, SDL_bool rot_90) int i; SDL_DisplayMode mode; - const int native_width = dpy->display_modes->w; + const int native_width = dpy->display_modes->w; const int native_height = dpy->display_modes->h; for (i = 0; i < SDL_arraysize(mode_list); ++i) { @@ -454,16 +439,15 @@ AddEmulatedModes(SDL_VideoDisplay *dpy, SDL_bool rot_90) } } -static void -display_handle_geometry(void *data, - struct wl_output *output, - int x, int y, - int physical_width, - int physical_height, - int subpixel, - const char *make, - const char *model, - int transform) +static void display_handle_geometry(void *data, + struct wl_output *output, + int x, int y, + int physical_width, + int physical_height, + int subpixel, + const char *make, + const char *model, + int transform) { SDL_WaylandOutputData *driverdata = data; @@ -498,10 +482,10 @@ display_handle_geometry(void *data, } driverdata->transform = transform; - #define TF_CASE(in, out) \ - case WL_OUTPUT_TRANSFORM_##in: \ - driverdata->orientation = SDL_ORIENTATION_##out; \ - break; +#define TF_CASE(in, out) \ + case WL_OUTPUT_TRANSFORM_##in: \ + driverdata->orientation = SDL_ORIENTATION_##out; \ + break; if (driverdata->physical_width >= driverdata->physical_height) { switch (transform) { TF_CASE(NORMAL, LANDSCAPE) @@ -525,21 +509,20 @@ display_handle_geometry(void *data, TF_CASE(FLIPPED_270, LANDSCAPE) } } - #undef TF_CASE +#undef TF_CASE } -static void -display_handle_mode(void *data, - struct wl_output *output, - uint32_t flags, - int width, - int height, - int refresh) +static void display_handle_mode(void *data, + struct wl_output *output, + uint32_t flags, + int width, + int height, + int refresh) { - SDL_WaylandOutputData* driverdata = data; + SDL_WaylandOutputData *driverdata = data; if (flags & WL_OUTPUT_MODE_CURRENT) { - driverdata->native_width = width; + driverdata->native_width = width; driverdata->native_height = height; /* @@ -547,7 +530,7 @@ display_handle_mode(void *data, * handle_done and xdg-output coordinates are pre-transformed. */ if (!driverdata->has_logical_size) { - driverdata->width = width; + driverdata->width = width; driverdata->height = height; } @@ -555,12 +538,11 @@ display_handle_mode(void *data, } } -static void -display_handle_done(void *data, - struct wl_output *output) +static void display_handle_done(void *data, + struct wl_output *output) { - SDL_WaylandOutputData* driverdata = data; - SDL_VideoData* video = driverdata->videodata; + SDL_WaylandOutputData *driverdata = data; + SDL_VideoData *video = driverdata->videodata; SDL_DisplayMode native_mode, desktop_mode; SDL_VideoDisplay *dpy; const SDL_bool mode_emulation_enabled = SDL_GetHintBoolean(SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION, SDL_TRUE); @@ -591,7 +573,7 @@ display_handle_done(void *data, native_mode.h = driverdata->native_height; } native_mode.refresh_rate = (int)SDL_round(driverdata->refresh / 1000.0); /* mHz to Hz */ - native_mode.driverdata = driverdata->output; + native_mode.driverdata = driverdata->output; /* The scaled desktop mode */ SDL_zero(desktop_mode); @@ -599,7 +581,7 @@ display_handle_done(void *data, if (driverdata->has_logical_size) { /* If xdg-output is present, calculate the true scale of the desktop */ driverdata->scale_factor = (float)native_mode.w / (float)driverdata->width; - } else { /* Scale the desktop coordinates, if xdg-output isn't present */ + } else { /* Scale the desktop coordinates, if xdg-output isn't present */ driverdata->width /= driverdata->scale_factor; driverdata->height /= driverdata->scale_factor; } @@ -629,27 +611,19 @@ display_handle_done(void *data, /* Calculate the display DPI */ if (driverdata->transform & WL_OUTPUT_TRANSFORM_90) { - driverdata->hdpi = driverdata->physical_height ? - (((float) driverdata->height) * 25.4f / driverdata->physical_height) : - 0.0f; - driverdata->vdpi = driverdata->physical_width ? - (((float) driverdata->width) * 25.4f / driverdata->physical_width) : - 0.0f; + driverdata->hdpi = driverdata->physical_height ? (((float)driverdata->height) * 25.4f / driverdata->physical_height) : 0.0f; + driverdata->vdpi = driverdata->physical_width ? (((float)driverdata->width) * 25.4f / driverdata->physical_width) : 0.0f; driverdata->ddpi = SDL_ComputeDiagonalDPI(driverdata->height, driverdata->width, - ((float) driverdata->physical_height) / 25.4f, - ((float) driverdata->physical_width) / 25.4f); + ((float)driverdata->physical_height) / 25.4f, + ((float)driverdata->physical_width) / 25.4f); } else { - driverdata->hdpi = driverdata->physical_width ? - (((float) driverdata->width) * 25.4f / driverdata->physical_width) : - 0.0f; - driverdata->vdpi = driverdata->physical_height ? - (((float) driverdata->height) * 25.4f / driverdata->physical_height) : - 0.0f; + driverdata->hdpi = driverdata->physical_width ? (((float)driverdata->width) * 25.4f / driverdata->physical_width) : 0.0f; + driverdata->vdpi = driverdata->physical_height ? (((float)driverdata->height) * 25.4f / driverdata->physical_height) : 0.0f; driverdata->ddpi = SDL_ComputeDiagonalDPI(driverdata->width, driverdata->height, - ((float) driverdata->physical_width) / 25.4f, - ((float) driverdata->physical_height) / 25.4f); + ((float)driverdata->physical_width) / 25.4f, + ((float)driverdata->physical_height) / 25.4f); } if (driverdata->index > -1) { @@ -664,7 +638,7 @@ display_handle_done(void *data, /* Add emulated modes if wp_viewporter is supported and mode emulation is enabled. */ if (video->viewporter && mode_emulation_enabled) { - const SDL_bool rot_90 = ((driverdata->transform & WL_OUTPUT_TRANSFORM_90) != 0) || + const SDL_bool rot_90 = (driverdata->transform & WL_OUTPUT_TRANSFORM_90) || (driverdata->width < driverdata->height); AddEmulatedModes(dpy, rot_90); } @@ -682,10 +656,9 @@ display_handle_done(void *data, } } -static void -display_handle_scale(void *data, - struct wl_output *output, - int32_t factor) +static void display_handle_scale(void *data, + struct wl_output *output, + int32_t factor) { SDL_WaylandOutputData *driverdata = data; driverdata->scale_factor = factor; @@ -698,18 +671,17 @@ static const struct wl_output_listener output_listener = { display_handle_scale }; -static void -Wayland_add_display(SDL_VideoData *d, uint32_t id) +static void Wayland_add_display(SDL_VideoData *d, uint32_t id) { struct wl_output *output; SDL_WaylandOutputData *data; output = wl_registry_bind(d->registry, id, &wl_output_interface, 2); - if (!output) { + if (output == NULL) { SDL_SetError("Failed to retrieve output."); return; } - data = SDL_malloc(sizeof *data); + data = (SDL_WaylandOutputData *)SDL_malloc(sizeof(*data)); SDL_zerop(data); data->videodata = d; data->output = output; @@ -722,15 +694,15 @@ Wayland_add_display(SDL_VideoData *d, uint32_t id) /* Keep a list of outputs for deferred xdg-output initialization. */ if (d->output_list != NULL) { - SDL_WaylandOutputData *node = (SDL_WaylandOutputData*)d->output_list; + SDL_WaylandOutputData *node = d->output_list; while (node->next != NULL) { - node = (SDL_WaylandOutputData*)node->next; + node = node->next; } - node->next = (struct SDL_WaylandOutputData*)data; + node->next = (struct SDL_WaylandOutputData *)data; } else { - d->output_list = (struct SDL_WaylandOutputData*)data; + d->output_list = (struct SDL_WaylandOutputData *)data; } if (data->videodata->xdg_output_manager) { @@ -739,8 +711,7 @@ Wayland_add_display(SDL_VideoData *d, uint32_t id) } } -static void -Wayland_free_display(SDL_VideoData *d, uint32_t id) +static void Wayland_free_display(SDL_VideoData *d, uint32_t id) { int num_displays = SDL_GetNumVideoDisplays(); SDL_VideoDisplay *display; @@ -749,7 +720,7 @@ Wayland_free_display(SDL_VideoData *d, uint32_t id) for (i = 0; i < num_displays; i += 1) { display = SDL_GetDisplay(i); - data = (SDL_WaylandOutputData *) display->driverdata; + data = (SDL_WaylandOutputData *)display->driverdata; if (data->registry_id == id) { if (d->output_list != NULL) { SDL_WaylandOutputData *node = d->output_list; @@ -775,7 +746,7 @@ Wayland_free_display(SDL_VideoData *d, uint32_t id) num_displays -= 1; for (; i < num_displays; i += 1) { display = SDL_GetDisplay(i); - data = (SDL_WaylandOutputData *) display->driverdata; + data = (SDL_WaylandOutputData *)display->driverdata; data->index -= 1; } @@ -784,8 +755,7 @@ Wayland_free_display(SDL_VideoData *d, uint32_t id) } } -static void -Wayland_init_xdg_output(SDL_VideoData *d) +static void Wayland_init_xdg_output(SDL_VideoData *d) { SDL_WaylandOutputData *node; for (node = d->output_list; node != NULL; node = node->next) { @@ -795,14 +765,12 @@ Wayland_init_xdg_output(SDL_VideoData *d) } #ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH -static void -windowmanager_hints(void *data, struct qt_windowmanager *qt_windowmanager, - int32_t show_is_fullscreen) +static void windowmanager_hints(void *data, struct qt_windowmanager *qt_windowmanager, + int32_t show_is_fullscreen) { } -static void -windowmanager_quit(void *data, struct qt_windowmanager *qt_windowmanager) +static void windowmanager_quit(void *data, struct qt_windowmanager *qt_windowmanager) { SDL_SendQuit(); } @@ -813,8 +781,7 @@ static const struct qt_windowmanager_listener windowmanager_listener = { }; #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ -static void -handle_ping_xdg_wm_base(void *data, struct xdg_wm_base *xdg, uint32_t serial) +static void handle_ping_xdg_wm_base(void *data, struct xdg_wm_base *xdg, uint32_t serial) { xdg_wm_base_pong(xdg, serial); } @@ -823,12 +790,10 @@ static const struct xdg_wm_base_listener shell_listener_xdg = { handle_ping_xdg_wm_base }; - #ifdef HAVE_LIBDECOR_H -static void -libdecor_error(struct libdecor *context, - enum libdecor_error error, - const char *message) +static void libdecor_error(struct libdecor *context, + enum libdecor_error error, + const char *message) { SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "libdecor error (%d): %s\n", error, message); } @@ -838,10 +803,8 @@ static struct libdecor_interface libdecor_interface = { }; #endif - -static void -display_handle_global(void *data, struct wl_registry *registry, uint32_t id, - const char *interface, uint32_t version) +static void display_handle_global(void *data, struct wl_registry *registry, uint32_t id, + const char *interface, uint32_t version) { SDL_VideoData *d = data; @@ -887,23 +850,23 @@ display_handle_global(void *data, struct wl_registry *registry, uint32_t id, Wayland_init_xdg_output(d); } else if (SDL_strcmp(interface, "wp_viewporter") == 0) { d->viewporter = wl_registry_bind(d->registry, id, &wp_viewporter_interface, 1); - + } else if (SDL_strcmp(interface, "wp_fractional_scale_manager_v1") == 0) { + d->fractional_scale_manager = wl_registry_bind(d->registry, id, &wp_fractional_scale_manager_v1_interface, 1); #ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH } else if (SDL_strcmp(interface, "qt_touch_extension") == 0) { Wayland_touch_create(d, id); } else if (SDL_strcmp(interface, "qt_surface_extension") == 0) { d->surface_extension = wl_registry_bind(registry, id, - &qt_surface_extension_interface, 1); + &qt_surface_extension_interface, 1); } else if (SDL_strcmp(interface, "qt_windowmanager") == 0) { d->windowmanager = wl_registry_bind(registry, id, - &qt_windowmanager_interface, 1); + &qt_windowmanager_interface, 1); qt_windowmanager_add_listener(d->windowmanager, &windowmanager_listener, d); #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ } } -static void -display_remove_global(void *data, struct wl_registry *registry, uint32_t id) +static void display_remove_global(void *data, struct wl_registry *registry, uint32_t id) { SDL_VideoData *d = data; /* We don't get an interface, just an ID, so assume it's a wl_output :shrug: */ @@ -942,8 +905,7 @@ static SDL_bool should_use_libdecor(SDL_VideoData *data, SDL_bool ignore_xdg) } #endif -SDL_bool -Wayland_LoadLibdecor(SDL_VideoData *data, SDL_bool ignore_xdg) +SDL_bool Wayland_LoadLibdecor(SDL_VideoData *data, SDL_bool ignore_xdg) { #ifdef HAVE_LIBDECOR_H if (data->shell.libdecor != NULL) { @@ -957,10 +919,9 @@ Wayland_LoadLibdecor(SDL_VideoData *data, SDL_bool ignore_xdg) return SDL_FALSE; } -int -Wayland_VideoInit(_THIS) +int Wayland_VideoInit(_THIS) { - SDL_VideoData *data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; data->xkb_context = WAYLAND_xkb_context_new(0); if (!data->xkb_context) { @@ -998,8 +959,7 @@ Wayland_VideoInit(_THIS) return 0; } -static int -Wayland_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) +static int Wayland_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) { SDL_WaylandOutputData *driverdata = (SDL_WaylandOutputData *)display->driverdata; rect->x = driverdata->x; @@ -1009,8 +969,7 @@ Wayland_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) return 0; } -static int -Wayland_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float * hdpi, float * vdpi) +static int Wayland_GetDisplayDPI(_THIS, SDL_VideoDisplay *sdl_display, float *ddpi, float *hdpi, float *vdpi) { SDL_WaylandOutputData *driverdata = (SDL_WaylandOutputData *)sdl_display->driverdata; @@ -1027,8 +986,7 @@ Wayland_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float return driverdata->ddpi != 0.0f ? 0 : SDL_SetError("Couldn't get DPI"); } -static void -Wayland_VideoCleanup(_THIS) +static void Wayland_VideoCleanup(_THIS) { SDL_VideoData *data = _this->driverdata; int i, j; @@ -1039,11 +997,11 @@ Wayland_VideoCleanup(_THIS) for (i = _this->num_displays - 1; i >= 0; --i) { SDL_VideoDisplay *display = &_this->displays[i]; - if (((SDL_WaylandOutputData*)display->driverdata)->xdg_output) { - zxdg_output_v1_destroy(((SDL_WaylandOutputData*)display->driverdata)->xdg_output); + if (((SDL_WaylandOutputData *)display->driverdata)->xdg_output) { + zxdg_output_v1_destroy(((SDL_WaylandOutputData *)display->driverdata)->xdg_output); } - wl_output_destroy(((SDL_WaylandOutputData*)display->driverdata)->output); + wl_output_destroy(((SDL_WaylandOutputData *)display->driverdata)->output); SDL_free(display->driverdata); display->driverdata = NULL; @@ -1100,7 +1058,7 @@ Wayland_VideoCleanup(_THIS) #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ if (data->tablet_manager) { - zwp_tablet_manager_v2_destroy((struct zwp_tablet_manager_v2*)data->tablet_manager); + zwp_tablet_manager_v2_destroy((struct zwp_tablet_manager_v2 *)data->tablet_manager); data->tablet_manager = NULL; } @@ -1139,6 +1097,11 @@ Wayland_VideoCleanup(_THIS) data->primary_selection_device_manager = NULL; } + if (data->fractional_scale_manager) { + wp_fractional_scale_manager_v1_destroy(data->fractional_scale_manager); + data->fractional_scale_manager = NULL; + } + if (data->compositor) { wl_compositor_destroy(data->compositor); data->compositor = NULL; @@ -1150,8 +1113,7 @@ Wayland_VideoCleanup(_THIS) } } -SDL_bool -Wayland_VideoReconnect(_THIS) +SDL_bool Wayland_VideoReconnect(_THIS) { #if 0 /* TODO RECONNECT: Uncomment all when https://invent.kde.org/plasma/kwin/-/wikis/Restarting is completed */ SDL_VideoData *data = _this->driverdata; @@ -1198,8 +1160,7 @@ Wayland_VideoReconnect(_THIS) #endif /* 0 */ } -void -Wayland_VideoQuit(_THIS) +void Wayland_VideoQuit(_THIS) { SDL_VideoData *data = _this->driverdata; diff --git a/modules/SDL2/src/video/wayland/SDL_waylandvideo.h b/modules/SDL2/src/video/wayland/SDL_waylandvideo.h index f2ca6c7..2f3eb4c 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandvideo.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandvideo.h @@ -42,14 +42,16 @@ struct qt_surface_extension; struct qt_windowmanager; #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ -typedef struct { +typedef struct +{ struct wl_cursor_theme *theme; int size; } SDL_WaylandCursorTheme; typedef struct SDL_WaylandOutputData SDL_WaylandOutputData; -typedef struct { +typedef struct +{ SDL_bool initializing; struct wl_display *display; int display_disconnected; @@ -59,7 +61,8 @@ typedef struct { SDL_WaylandCursorTheme *cursor_themes; int num_cursor_themes; struct wl_pointer *pointer; - struct { + struct + { struct xdg_wm_base *xdg; #ifdef HAVE_LIBDECOR_H struct libdecor *libdecor; @@ -76,6 +79,7 @@ typedef struct { struct zwp_text_input_manager_v3 *text_input_manager; struct zxdg_output_manager_v1 *xdg_output_manager; struct wp_viewporter *viewporter; + struct wp_fractional_scale_manager_v1 *fractional_scale_manager; EGLDisplay edpy; EGLContext context; @@ -98,7 +102,8 @@ typedef struct { SDL_bool egl_transparency_enabled; } SDL_VideoData; -struct SDL_WaylandOutputData { +struct SDL_WaylandOutputData +{ SDL_VideoData *videodata; struct wl_output *output; struct zxdg_output_v1 *xdg_output; diff --git a/modules/SDL2/src/video/wayland/SDL_waylandvulkan.c b/modules/SDL2/src/video/wayland/SDL_waylandvulkan.c index d239e89..59427de 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandvulkan.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandvulkan.c @@ -36,9 +36,9 @@ #include "SDL_syswm.h" #if defined(__OpenBSD__) -#define DEFAULT_VULKAN "libvulkan.so" +#define DEFAULT_VULKAN "libvulkan.so" #else -#define DEFAULT_VULKAN "libvulkan.so.1" +#define DEFAULT_VULKAN "libvulkan.so.1" #endif int Wayland_Vulkan_LoadLibrary(_THIS, const char *path) @@ -48,53 +48,55 @@ int Wayland_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasSurfaceExtension = SDL_FALSE; SDL_bool hasWaylandSurfaceExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan loader library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) + } + if (path == NULL) { path = DEFAULT_VULKAN; + } _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasWaylandSurfaceExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else if(!hasWaylandSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "extension"); + } else if (!hasWaylandSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "extension"); goto fail; } return 0; @@ -107,54 +109,50 @@ fail: void Wayland_Vulkan_UnloadLibrary(_THIS) { - if(_this->vulkan_config.loader_handle) - { + if (_this->vulkan_config.loader_handle) { SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } } SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names) + SDL_Window *window, + unsigned *count, + const char **names) { static const char *const extensionsForWayland[] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME }; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } return SDL_Vulkan_GetInstanceExtensions_Helper( - count, names, SDL_arraysize(extensionsForWayland), - extensionsForWayland); + count, names, SDL_arraysize(extensionsForWayland), + extensionsForWayland); } SDL_bool Wayland_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface) + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface) { SDL_WindowData *windowData = (SDL_WindowData *)window->driverdata; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr; PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)vkGetInstanceProcAddr( - instance, - "vkCreateWaylandSurfaceKHR"); + instance, + "vkCreateWaylandSurfaceKHR"); VkWaylandSurfaceCreateInfoKHR createInfo; VkResult result; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } - if(!vkCreateWaylandSurfaceKHR) - { + if (!vkCreateWaylandSurfaceKHR) { SDL_SetError(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); return SDL_FALSE; @@ -164,11 +162,10 @@ SDL_bool Wayland_Vulkan_CreateSurface(_THIS, createInfo.pNext = NULL; createInfo.flags = 0; createInfo.display = windowData->waylandData->display; - createInfo.surface = windowData->surface; + createInfo.surface = windowData->surface; result = vkCreateWaylandSurfaceKHR(instance, &createInfo, NULL, surface); - if(result != VK_SUCCESS) - { + if (result != VK_SUCCESS) { SDL_SetError("vkCreateWaylandSurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result)); return SDL_FALSE; diff --git a/modules/SDL2/src/video/wayland/SDL_waylandvulkan.h b/modules/SDL2/src/video/wayland/SDL_waylandvulkan.h index 45427de..c22e34d 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandvulkan.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandvulkan.h @@ -37,13 +37,13 @@ int Wayland_Vulkan_LoadLibrary(_THIS, const char *path); void Wayland_Vulkan_UnloadLibrary(_THIS); SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS, - SDL_Window *window, - unsigned *count, - const char **names); + SDL_Window *window, + unsigned *count, + const char **names); SDL_bool Wayland_Vulkan_CreateSurface(_THIS, - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR *surface); + SDL_Window *window, + VkInstance instance, + VkSurfaceKHR *surface); #endif diff --git a/modules/SDL2/src/video/wayland/SDL_waylandwindow.c b/modules/SDL2/src/video/wayland/SDL_waylandwindow.c index 5927967..303f598 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandwindow.c +++ b/modules/SDL2/src/video/wayland/SDL_waylandwindow.c @@ -40,6 +40,7 @@ #include "idle-inhibit-unstable-v1-client-protocol.h" #include "xdg-activation-v1-client-protocol.h" #include "viewporter-client-protocol.h" +#include "fractional-scale-v1-client-protocol.h" #ifdef HAVE_LIBDECOR_H #include @@ -47,25 +48,24 @@ #define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP) -SDL_FORCE_INLINE SDL_bool -FloatEqual(float a, float b) +SDL_FORCE_INLINE SDL_bool FloatEqual(float a, float b) { - const float diff = SDL_fabsf(a - b); + const float diff = SDL_fabsf(a - b); const float largest = SDL_max(SDL_fabsf(a), SDL_fabsf(b)); return diff <= largest * SDL_FLT_EPSILON; } -static void -GetFullScreenDimensions(SDL_Window *window, int *width, int *height, int *drawable_width, int *drawable_height) +static void GetFullScreenDimensions(SDL_Window *window, int *width, int *height, int *drawable_width, int *drawable_height) { - SDL_WindowData *wind = (SDL_WindowData *) window->driverdata; - SDL_WaylandOutputData *output = (SDL_WaylandOutputData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; + SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_WaylandOutputData *output = display ? (SDL_WaylandOutputData *)display->driverdata : NULL; int fs_width, fs_height; int buf_width, buf_height; - const int output_width = wind->fs_output_width ? wind->fs_output_width : output->width; - const int output_height = wind->fs_output_height ? wind->fs_output_height : output->height; + const int output_width = wind->fs_output_width ? wind->fs_output_width : (output ? output->width : wind->window_width); + const int output_height = wind->fs_output_height ? wind->fs_output_height : (output ? output->height : wind->window_height); /* * Fullscreen desktop mandates a desktop sized window, so that's what applications will get. @@ -73,15 +73,15 @@ GetFullScreenDimensions(SDL_Window *window, int *width, int *height, int *drawab * differently sized window and backbuffer spaces on its own. */ if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) { - fs_width = output_width; + fs_width = output_width; fs_height = output_height; /* If the application is DPI aware, we can expose the true backbuffer size */ if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { - buf_width = output->native_width; + buf_width = output->native_width; buf_height = output->native_height; } else { - buf_width = fs_width; + buf_width = fs_width; buf_height = fs_height; } } else { @@ -90,17 +90,17 @@ GetFullScreenDimensions(SDL_Window *window, int *width, int *height, int *drawab * for DPI aware apps and the desktop size for legacy apps. */ if (window->fullscreen_mode.w != 0 && window->fullscreen_mode.h != 0) { - fs_width = window->fullscreen_mode.w; + fs_width = window->fullscreen_mode.w; fs_height = window->fullscreen_mode.h; } else if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { - fs_width = output->native_width; + fs_width = output->native_width; fs_height = output->native_height; } else { - fs_width = output_width; + fs_width = output_width; fs_height = output_height; } - buf_width = fs_width; + buf_width = fs_width; buf_height = fs_height; } @@ -118,27 +118,27 @@ GetFullScreenDimensions(SDL_Window *window, int *width, int *height, int *drawab } } -SDL_FORCE_INLINE SDL_bool -SurfaceScaleIsFractional(SDL_Window *window) +SDL_FORCE_INLINE SDL_bool SurfaceScaleIsFractional(SDL_Window *window) { SDL_WindowData *data = window->driverdata; return !FloatEqual(SDL_roundf(data->scale_factor), data->scale_factor); } -SDL_FORCE_INLINE SDL_bool -FullscreenModeEmulation(SDL_Window *window) +SDL_FORCE_INLINE SDL_bool FullscreenModeEmulation(SDL_Window *window) { return (window->flags & SDL_WINDOW_FULLSCREEN) && ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP); } -static SDL_bool -NeedViewport(SDL_Window *window) +static SDL_bool NeedViewport(SDL_Window *window) { - SDL_WindowData *wind = window->driverdata; - SDL_VideoData *video = wind->waylandData; - SDL_WaylandOutputData *output = ((SDL_WaylandOutputData *)SDL_GetDisplayForWindow(window)->driverdata); - int fs_width, fs_height; + SDL_WindowData *wind = window->driverdata; + SDL_VideoData *video = wind->waylandData; + SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_WaylandOutputData *output = display ? ((SDL_WaylandOutputData *)display->driverdata) : NULL; + const int output_width = wind->fs_output_width ? wind->fs_output_width : (output ? output->width : wind->window_width); + const int output_height = wind->fs_output_height ? wind->fs_output_height : (output ? output->height : wind->window_height); + int fs_width, fs_height; /* * A viewport is only required when scaling is enabled and: @@ -148,7 +148,7 @@ NeedViewport(SDL_Window *window) if (video->viewporter != NULL) { if (FullscreenModeEmulation(window)) { GetFullScreenDimensions(window, &fs_width, &fs_height, NULL, NULL); - if (fs_width != output->width || fs_height != output->height) { + if (fs_width != output_width || fs_height != output_height) { return SDL_TRUE; } } else if (SurfaceScaleIsFractional(window) && (window->flags & SDL_WINDOW_ALLOW_HIGHDPI)) { @@ -159,18 +159,17 @@ NeedViewport(SDL_Window *window) return SDL_FALSE; } -static void -GetBufferSize(SDL_Window *window, int *width, int *height) +static void GetBufferSize(SDL_Window *window, int *width, int *height) { SDL_WindowData *data = window->driverdata; - int buf_width; - int buf_height; + int buf_width; + int buf_height; if (FullscreenModeEmulation(window)) { GetFullScreenDimensions(window, NULL, NULL, &buf_width, &buf_height); } else if (NeedViewport(window)) { /* Round fractional backbuffer sizes halfway away from zero. */ - buf_width = (int)SDL_lroundf(window->w * data->scale_factor); + buf_width = (int)SDL_lroundf(window->w * data->scale_factor); buf_height = (int)SDL_lroundf(window->h * data->scale_factor); } else { /* @@ -181,7 +180,7 @@ GetBufferSize(SDL_Window *window, int *width, int *height) */ int scale_factor = (int)SDL_ceilf(data->scale_factor); - buf_width = window->w * scale_factor; + buf_width = window->w * scale_factor; buf_height = window->h * scale_factor; } @@ -193,11 +192,10 @@ GetBufferSize(SDL_Window *window, int *width, int *height) } } -static void -SetDrawSurfaceViewport(SDL_Window *window, int src_width, int src_height, int dst_width, int dst_height) +static void SetDrawSurfaceViewport(SDL_Window *window, int src_width, int src_height, int dst_width, int dst_height) { - SDL_WindowData *wind = window->driverdata; - SDL_VideoData *video = wind->waylandData; + SDL_WindowData *wind = window->driverdata; + SDL_VideoData *video = wind->waylandData; if (video->viewporter) { if (wind->draw_viewport == NULL) { @@ -209,8 +207,7 @@ SetDrawSurfaceViewport(SDL_Window *window, int src_width, int src_height, int ds } } -static void -UnsetDrawSurfaceViewport(SDL_Window *window) +static void UnsetDrawSurfaceViewport(SDL_Window *window) { SDL_WindowData *wind = window->driverdata; @@ -220,17 +217,17 @@ UnsetDrawSurfaceViewport(SDL_Window *window) } } -static void -ConfigureWindowGeometry(SDL_Window *window) +static void ConfigureWindowGeometry(SDL_Window *window) { - SDL_WindowData *data = window->driverdata; - SDL_VideoData *viddata = data->waylandData; - SDL_WaylandOutputData *output = (SDL_WaylandOutputData *)SDL_GetDisplayForWindow(window)->driverdata; - struct wl_region *region; - const int old_dw = data->drawable_width; - const int old_dh = data->drawable_height; - SDL_bool window_size_changed; - SDL_bool drawable_size_changed; + SDL_WindowData *data = window->driverdata; + SDL_VideoData *viddata = data->waylandData; + SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_WaylandOutputData *output = display ? (SDL_WaylandOutputData *)display->driverdata : NULL; + struct wl_region *region; + const int old_dw = data->drawable_width; + const int old_dh = data->drawable_height; + SDL_bool window_size_changed; + SDL_bool drawable_size_changed; /* Set the drawable backbuffer size. */ GetBufferSize(window, &data->drawable_width, &data->drawable_height); @@ -245,8 +242,8 @@ ConfigureWindowGeometry(SDL_Window *window) if (FullscreenModeEmulation(window) && NeedViewport(window)) { int fs_width, fs_height; - const int output_width = data->fs_output_width ? data->fs_output_width : output->width; - const int output_height = data->fs_output_height ? data->fs_output_height : output->height; + const int output_width = data->fs_output_width ? data->fs_output_width : (output ? output->width : data->window_width); + const int output_height = data->fs_output_height ? data->fs_output_height : (output ? output->height : data->window_height); window_size_changed = data->window_width != output_width || data->window_height != output_height; @@ -258,11 +255,11 @@ ConfigureWindowGeometry(SDL_Window *window) SetDrawSurfaceViewport(window, data->drawable_width, data->drawable_height, output_width, output_height); - data->window_width = output_width; + data->window_width = output_width; data->window_height = output_height; - data->pointer_scale_x = (float) fs_width / (float) output_width; - data->pointer_scale_y = (float) fs_height / (float) output_height; + data->pointer_scale_x = (float)fs_width / (float)output_width; + data->pointer_scale_y = (float)fs_height / (float)output_height; } } else { window_size_changed = data->window_width != window->w || data->window_height != window->h; @@ -274,12 +271,17 @@ ConfigureWindowGeometry(SDL_Window *window) } else { UnsetDrawSurfaceViewport(window); - /* Round to the next integer in case of a fractional value. */ - wl_surface_set_buffer_scale(data->surface, (int32_t) SDL_ceilf(data->scale_factor)); + if (!FullscreenModeEmulation(window)) { + /* Round to the next integer in case of a fractional value. */ + wl_surface_set_buffer_scale(data->surface, (int32_t)SDL_ceilf(data->scale_factor)); + } else { + wl_surface_set_buffer_scale(data->surface, 1); + } } - data->window_width = window->w; - data->window_height = window->h; + /* Clamp the physical window size to the system minimum required size. */ + data->window_width = SDL_max(window->w, data->system_min_required_width); + data->window_height = SDL_max(window->h, data->system_min_required_height); data->pointer_scale_x = 1.0f; data->pointer_scale_y = 1.0f; @@ -287,10 +289,16 @@ ConfigureWindowGeometry(SDL_Window *window) } /* - * The opaque and pointer confinement regions only need to be recalculated - * if the output size has changed. + * The surface geometry, opaque region and pointer confinement region only + * need to be recalculated if the output size has changed. */ if (window_size_changed) { + /* libdecor does this internally on frame commits, so it's only needed for xdg surfaces. */ + if (data->shell_surface_type != WAYLAND_SURFACE_LIBDECOR && + viddata->shell.xdg && data->shell_surface.xdg.surface != NULL) { + xdg_surface_set_window_geometry(data->shell_surface.xdg.surface, 0, 0, data->window_width, data->window_height); + } + if (!viddata->egl_transparency_enabled) { region = wl_compositor_create_region(viddata->compositor); wl_region_add(region, 0, 0, @@ -305,11 +313,10 @@ ConfigureWindowGeometry(SDL_Window *window) } } -static void -CommitLibdecorFrame(SDL_Window *window) +static void CommitLibdecorFrame(SDL_Window *window) { #ifdef HAVE_LIBDECOR_H - SDL_WindowData *wind = (SDL_WindowData *) window->driverdata; + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; if (wind->shell_surface_type == WAYLAND_SURFACE_LIBDECOR && wind->shell_surface.libdecor.frame) { struct libdecor_state *state = libdecor_state_new(wind->window_width, wind->window_height); @@ -319,8 +326,7 @@ CommitLibdecorFrame(SDL_Window *window) #endif } -static void -SetMinMaxDimensions(SDL_Window *window, SDL_bool commit) +static void SetMinMaxDimensions(SDL_Window *window, SDL_bool commit) { SDL_WindowData *wind = window->driverdata; SDL_VideoData *viddata = wind->waylandData; @@ -370,7 +376,7 @@ SetMinMaxDimensions(SDL_Window *window, SDL_bool commit) } } else #endif - if (viddata->shell.xdg) { + if (viddata->shell.xdg) { if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { return; /* Can't do anything yet, wait for ShowWindow */ } @@ -386,8 +392,7 @@ SetMinMaxDimensions(SDL_Window *window, SDL_bool commit) } } -static void -SetFullscreen(SDL_Window *window, struct wl_output *output) +static void SetFullscreen(SDL_Window *window, struct wl_output *output) { SDL_WindowData *wind = window->driverdata; SDL_VideoData *viddata = wind->waylandData; @@ -429,7 +434,7 @@ SetFullscreen(SDL_Window *window, struct wl_output *output) } } else #endif - if (viddata->shell.xdg) { + if (viddata->shell.xdg) { if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { return; /* Can't do anything yet, wait for ShowWindow */ } @@ -444,10 +449,9 @@ SetFullscreen(SDL_Window *window, struct wl_output *output) } } -static void -UpdateWindowFullscreen(SDL_Window *window, SDL_bool fullscreen) +static void UpdateWindowFullscreen(SDL_Window *window, SDL_bool fullscreen) { - SDL_WindowData *wind = (SDL_WindowData*)window->driverdata; + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; if (fullscreen) { if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { @@ -493,8 +497,7 @@ UpdateWindowFullscreen(SDL_Window *window, SDL_bool fullscreen) static const struct wl_callback_listener surface_damage_frame_listener; -static void -surface_damage_frame_done(void *data, struct wl_callback *cb, uint32_t time) +static void surface_damage_frame_done(void *data, struct wl_callback *cb, uint32_t time) { SDL_WindowData *wind = (SDL_WindowData *)data; @@ -521,11 +524,10 @@ static const struct wl_callback_listener surface_damage_frame_listener = { static const struct wl_callback_listener gles_swap_frame_listener; -static void -gles_swap_frame_done(void *data, struct wl_callback *cb, uint32_t time) +static void gles_swap_frame_done(void *data, struct wl_callback *cb, uint32_t time) { - SDL_WindowData *wind = (SDL_WindowData *) data; - SDL_AtomicSet(&wind->swap_interval_ready, 1); /* mark window as ready to present again. */ + SDL_WindowData *wind = (SDL_WindowData *)data; + SDL_AtomicSet(&wind->swap_interval_ready, 1); /* mark window as ready to present again. */ /* reset this callback to fire again once a new frame was presented and compositor wants the next one. */ wind->gles_swap_frame_callback = wl_surface_frame(wind->gles_swap_frame_surface_wrapper); @@ -537,11 +539,9 @@ static const struct wl_callback_listener gles_swap_frame_listener = { gles_swap_frame_done }; - static void Wayland_HandleResize(SDL_Window *window, int width, int height, float scale); -static void -handle_configure_xdg_shell_surface(void *data, struct xdg_surface *xdg, uint32_t serial) +static void handle_configure_xdg_shell_surface(void *data, struct xdg_surface *xdg, uint32_t serial) { SDL_WindowData *wind = (SDL_WindowData *)data; SDL_Window *window = wind->sdlwindow; @@ -556,22 +556,20 @@ static const struct xdg_surface_listener shell_surface_listener_xdg = { handle_configure_xdg_shell_surface }; -static void -handle_configure_xdg_toplevel(void *data, - struct xdg_toplevel *xdg_toplevel, - int32_t width, - int32_t height, - struct wl_array *states) +static void handle_configure_xdg_toplevel(void *data, + struct xdg_toplevel *xdg_toplevel, + int32_t width, + int32_t height, + struct wl_array *states) { SDL_WindowData *wind = (SDL_WindowData *)data; SDL_Window *window = wind->sdlwindow; - SDL_WaylandOutputData *driverdata; enum xdg_toplevel_state *state; SDL_bool fullscreen = SDL_FALSE; SDL_bool maximized = SDL_FALSE; SDL_bool floating = SDL_TRUE; - wl_array_for_each(state, states) { + wl_array_for_each (state, states) { switch (*state) { case XDG_TOPLEVEL_STATE_FULLSCREEN: fullscreen = SDL_TRUE; @@ -592,8 +590,6 @@ handle_configure_xdg_toplevel(void *data, } } - driverdata = (SDL_WaylandOutputData *) SDL_GetDisplayForWindow(window)->driverdata; - UpdateWindowFullscreen(window, fullscreen); if (!fullscreen) { @@ -608,7 +604,7 @@ handle_configure_xdg_toplevel(void *data, /* xdg_toplevel spec states that this is a suggestion. Ignore if less than or greater than max/min size. */ - if ((window->flags & SDL_WINDOW_RESIZABLE)) { + if (window->flags & SDL_WINDOW_RESIZABLE) { if (window->max_w > 0) { width = SDL_min(width, window->max_w); } @@ -632,9 +628,7 @@ handle_configure_xdg_toplevel(void *data, * No, we do not get minimize events from xdg-shell. */ SDL_SendWindowEvent(window, - maximized ? - SDL_WINDOWEVENT_MAXIMIZED : - SDL_WINDOWEVENT_RESTORED, + maximized ? SDL_WINDOWEVENT_MAXIMIZED : SDL_WINDOWEVENT_RESTORED, 0, 0); /* Store current floating dimensions for restoring */ @@ -672,17 +666,10 @@ handle_configure_xdg_toplevel(void *data, window->h = height; wind->needs_resize_event = SDL_TRUE; } - - /* This part is good though. */ - if ((window->flags & SDL_WINDOW_ALLOW_HIGHDPI) && !FloatEqual(wind->scale_factor, driverdata->scale_factor)) { - wind->scale_factor = driverdata->scale_factor; - wind->needs_resize_event = SDL_TRUE; - } } } -static void -handle_close_xdg_toplevel(void *data, struct xdg_toplevel *xdg_toplevel) +static void handle_close_xdg_toplevel(void *data, struct xdg_toplevel *xdg_toplevel) { SDL_WindowData *window = (SDL_WindowData *)data; SDL_SendWindowEvent(window->sdlwindow, SDL_WINDOWEVENT_CLOSE, 0, 0); @@ -693,28 +680,25 @@ static const struct xdg_toplevel_listener toplevel_listener_xdg = { handle_close_xdg_toplevel }; -static void -handle_configure_xdg_popup(void *data, - struct xdg_popup *xdg_popup, - int32_t x, - int32_t y, - int32_t width, - int32_t height) +static void handle_configure_xdg_popup(void *data, + struct xdg_popup *xdg_popup, + int32_t x, + int32_t y, + int32_t width, + int32_t height) { /* No-op, we don't use x/y and width/height are fixed-size */ } -static void -handle_done_xdg_popup(void *data, struct xdg_popup *xdg_popup) +static void handle_done_xdg_popup(void *data, struct xdg_popup *xdg_popup) { SDL_WindowData *window = (SDL_WindowData *)data; SDL_SendWindowEvent(window->sdlwindow, SDL_WINDOWEVENT_CLOSE, 0, 0); } -static void -handle_repositioned_xdg_popup(void *data, - struct xdg_popup *xdg_popup, - uint32_t token) +static void handle_repositioned_xdg_popup(void *data, + struct xdg_popup *xdg_popup, + uint32_t token) { /* No-op, configure does all the work we care about */ } @@ -727,11 +711,10 @@ static const struct xdg_popup_listener popup_listener_xdg = { #define TOOLTIP_CURSOR_OFFSET 8 /* FIXME: Arbitrary, eyeballed from X tooltip */ -static int -Wayland_PopupWatch(void *data, SDL_Event *event) +static int Wayland_PopupWatch(void *data, SDL_Event *event) { if (event->type == SDL_MOUSEMOTION) { - SDL_Window *window = (SDL_Window *) data; + SDL_Window *window = (SDL_Window *)data; SDL_WindowData *wind = window->driverdata; /* Coordinates might be relative to the popup, which we don't want */ @@ -747,13 +730,12 @@ Wayland_PopupWatch(void *data, SDL_Event *event) return 1; } -static void -handle_configure_zxdg_decoration(void *data, - struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, - uint32_t mode) +static void handle_configure_zxdg_decoration(void *data, + struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, + uint32_t mode) { - SDL_Window *window = (SDL_Window *) data; - SDL_WindowData *driverdata = (SDL_WindowData *) window->driverdata; + SDL_Window *window = (SDL_Window *)data; + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; SDL_VideoDevice *device = SDL_GetVideoDevice(); /* If the compositor tries to force CSD anyway, bail on direct XDG support @@ -786,19 +768,57 @@ static const struct zxdg_toplevel_decoration_v1_listener decoration_listener = { }; #ifdef HAVE_LIBDECOR_H -static void -decoration_frame_configure(struct libdecor_frame *frame, - struct libdecor_configuration *configuration, - void *user_data) +/* + * XXX: Hack for older versions of libdecor that lack the function to query the + * minimum content size limit. The internal limits must always be overridden + * to ensure that very small windows don't cause errors or crashes. + * + * On versions of libdecor that expose the function to get the minimum content + * size limit, this function is a no-op. + * + * Can be removed if the minimum required version of libdecor is raised + * to a version that guarantees the availability of this function. + */ +static void OverrideLibdecorLimits(SDL_Window *window) +{ +#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) + if (libdecor_frame_get_min_content_size == NULL) { + SetMinMaxDimensions(window, SDL_FALSE); + } +#elif !defined(SDL_HAVE_LIBDECOR_GET_MIN_MAX) + SetMinMaxDimensions(window, SDL_FALSE); +#endif +} + +/* + * NOTE: Retrieves the minimum content size limits, if the function for doing so is available. + * On versions of libdecor that lack the minimum content size retrieval function, this + * function is a no-op. + * + * Can be replaced with a direct call if the minimum required version of libdecor is raised + * to a version that guarantees the availability of this function. + */ +static void LibdecorGetMinContentSize(struct libdecor_frame *frame, int *min_w, int *min_h) +{ +#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) + if (libdecor_frame_get_min_content_size != NULL) { + libdecor_frame_get_min_content_size(frame, min_w, min_h); + } +#elif defined(SDL_HAVE_LIBDECOR_GET_MIN_MAX) + libdecor_frame_get_min_content_size(frame, min_w, min_h); +#endif +} + +static void decoration_frame_configure(struct libdecor_frame *frame, + struct libdecor_configuration *configuration, + void *user_data) { SDL_WindowData *wind = (SDL_WindowData *)user_data; SDL_Window *window = wind->sdlwindow; - SDL_WaylandOutputData *driverdata; struct libdecor_state *state; enum libdecor_window_state window_state; int width, height; - float scale_factor = wind->scale_factor; SDL_bool focused = SDL_FALSE; SDL_bool fullscreen = SDL_FALSE; @@ -806,10 +826,8 @@ decoration_frame_configure(struct libdecor_frame *frame, SDL_bool tiled = SDL_FALSE; SDL_bool floating; - static const enum libdecor_window_state tiled_states = ( - LIBDECOR_WINDOW_STATE_TILED_LEFT | LIBDECOR_WINDOW_STATE_TILED_RIGHT | - LIBDECOR_WINDOW_STATE_TILED_TOP | LIBDECOR_WINDOW_STATE_TILED_BOTTOM - ); + static const enum libdecor_window_state tiled_states = (LIBDECOR_WINDOW_STATE_TILED_LEFT | LIBDECOR_WINDOW_STATE_TILED_RIGHT | + LIBDECOR_WINDOW_STATE_TILED_TOP | LIBDECOR_WINDOW_STATE_TILED_BOTTOM); /* Window State */ if (libdecor_configuration_get_window_state(configuration, &window_state)) { @@ -820,8 +838,6 @@ decoration_frame_configure(struct libdecor_frame *frame, } floating = !(fullscreen || maximized || tiled); - driverdata = (SDL_WaylandOutputData *) SDL_GetDisplayForWindow(window)->driverdata; - UpdateWindowFullscreen(window, fullscreen); if (!fullscreen) { @@ -831,17 +847,13 @@ decoration_frame_configure(struct libdecor_frame *frame, * No, we do not get minimize events from libdecor. */ SDL_SendWindowEvent(window, - maximized ? - SDL_WINDOWEVENT_MAXIMIZED : - SDL_WINDOWEVENT_RESTORED, + maximized ? SDL_WINDOWEVENT_MAXIMIZED : SDL_WINDOWEVENT_RESTORED, 0, 0); } /* Similar to maximized/restore events above, send focus events too! */ SDL_SendWindowEvent(window, - focused ? - SDL_WINDOWEVENT_FOCUS_GAINED : - SDL_WINDOWEVENT_FOCUS_LOST, + focused ? SDL_WINDOWEVENT_FOCUS_GAINED : SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); /* For fullscreen or fixed-size windows we know our size. @@ -854,7 +866,7 @@ decoration_frame_configure(struct libdecor_frame *frame, * told to do this. */ if (libdecor_configuration_get_content_size(configuration, frame, - &width, &height)) { + &width, &height)) { wind->fs_output_width = width; wind->fs_output_height = height; } else { @@ -867,15 +879,12 @@ decoration_frame_configure(struct libdecor_frame *frame, if (FullscreenModeEmulation(window)) { GetFullScreenDimensions(window, &width, &height, NULL, NULL); } - - /* This part is good though. */ - if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { - scale_factor = driverdata->scale_factor; - } } else if (!(window->flags & SDL_WINDOW_RESIZABLE) || (floating && wind->floating_resize_pending)) { width = window->windowed.w; height = window->windowed.h; wind->floating_resize_pending = SDL_FALSE; + + OverrideLibdecorLimits(window); } else { /* * XXX: libdecor can send bogus content sizes that are +/- the height @@ -914,14 +923,18 @@ decoration_frame_configure(struct libdecor_frame *frame, wind->was_floating = floating; /* Do the resize on the SDL side (this will set window->w/h)... */ - Wayland_HandleResize(window, width, height, scale_factor); - wind->shell_surface.libdecor.initial_configure_seen = SDL_TRUE; + Wayland_HandleResize(window, width, height, wind->scale_factor); /* ... then commit the changes on the libdecor side. */ state = libdecor_state_new(wind->window_width, wind->window_height); libdecor_frame_commit(frame, state, configuration); libdecor_state_free(state); + if (!wind->shell_surface.libdecor.initial_configure_seen) { + LibdecorGetMinContentSize(frame, &wind->system_min_required_width, &wind->system_min_required_height); + wind->shell_surface.libdecor.initial_configure_seen = SDL_TRUE; + } + /* Update the resize capability. Since this will change the capabilities and * commit a new frame state with the last known content dimension, this has * to be called after the new state has been committed and the new content @@ -931,14 +944,12 @@ decoration_frame_configure(struct libdecor_frame *frame, window->flags & SDL_WINDOW_RESIZABLE); } -static void -decoration_frame_close(struct libdecor_frame *frame, void *user_data) +static void decoration_frame_close(struct libdecor_frame *frame, void *user_data) { SDL_SendWindowEvent(((SDL_WindowData *)user_data)->sdlwindow, SDL_WINDOWEVENT_CLOSE, 0, 0); } -static void -decoration_frame_commit(struct libdecor_frame *frame, void *user_data) +static void decoration_frame_commit(struct libdecor_frame *frame, void *user_data) { SDL_WindowData *wind = user_data; @@ -953,21 +964,18 @@ static struct libdecor_frame_interface libdecor_frame_interface = { #endif #ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH -static void -handle_onscreen_visibility(void *data, - struct qt_extended_surface *qt_extended_surface, int32_t visible) +static void handle_onscreen_visibility(void *data, + struct qt_extended_surface *qt_extended_surface, int32_t visible) { } -static void -handle_set_generic_property(void *data, - struct qt_extended_surface *qt_extended_surface, const char *name, - struct wl_array *value) +static void handle_set_generic_property(void *data, + struct qt_extended_surface *qt_extended_surface, const char *name, + struct wl_array *value) { } -static void -handle_close(void *data, struct qt_extended_surface *qt_extended_surface) +static void handle_close(void *data, struct qt_extended_surface *qt_extended_surface) { SDL_WindowData *window = (SDL_WindowData *)data; SDL_SendWindowEvent(window->sdlwindow, SDL_WINDOWEVENT_CLOSE, 0, 0); @@ -980,10 +988,9 @@ static const struct qt_extended_surface_listener extended_surface_listener = { }; #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ -static void -update_scale_factor(SDL_WindowData *window) +static void update_scale_factor(SDL_WindowData *window) { - float old_factor = window->scale_factor; + const float old_factor = window->scale_factor; float new_factor; int i; @@ -992,19 +999,23 @@ update_scale_factor(SDL_WindowData *window) return; } - if (FULLSCREEN_VISIBLE(window->sdlwindow)) { + if (window->num_outputs == 0) { + /* No display connected, just fall back. */ + new_factor = old_factor; + } else if (FULLSCREEN_VISIBLE(window->sdlwindow)) { /* For fullscreen, use the active display's scale factor */ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window->sdlwindow); - SDL_WaylandOutputData* driverdata = display->driverdata; - new_factor = driverdata->scale_factor; - } else if (window->num_outputs == 0) { - /* No monitor (somehow)? Just fall back. */ - new_factor = old_factor; + if (display) { + SDL_WaylandOutputData *driverdata = display->driverdata; + new_factor = driverdata->scale_factor; + } else { + new_factor = old_factor; + } } else { /* Check every display's factor, use the highest */ new_factor = 0.0f; for (i = 0; i < window->num_outputs; i++) { - SDL_WaylandOutputData* driverdata = window->outputs[i]; + SDL_WaylandOutputData *driverdata = window->outputs[i]; new_factor = SDL_max(new_factor, driverdata->scale_factor); } } @@ -1018,11 +1029,10 @@ update_scale_factor(SDL_WindowData *window) * what monitor we're on, so let's send move events that put the window at the * center of the whatever display the wl_surface_listener events give us. */ -static void -Wayland_move_window(SDL_Window *window, - SDL_WaylandOutputData *driverdata) +static void Wayland_move_window(SDL_Window *window, + SDL_WaylandOutputData *driverdata) { - SDL_WindowData *wind = (SDL_WindowData*)window->driverdata; + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; SDL_VideoDisplay *display; SDL_bool fs_display_changed = SDL_FALSE; int i, j; @@ -1089,9 +1099,8 @@ Wayland_move_window(SDL_Window *window, } } -static void -handle_surface_enter(void *data, struct wl_surface *surface, - struct wl_output *output) +static void handle_surface_enter(void *data, struct wl_surface *surface, + struct wl_output *output) { SDL_WindowData *window = data; SDL_WaylandOutputData *driverdata = wl_output_get_user_data(output); @@ -1101,17 +1110,19 @@ handle_surface_enter(void *data, struct wl_surface *surface, } window->outputs = SDL_realloc(window->outputs, - sizeof(SDL_WaylandOutputData*) * (window->num_outputs + 1)); + sizeof(SDL_WaylandOutputData *) * (window->num_outputs + 1)); window->outputs[window->num_outputs++] = driverdata; /* Update the scale factor after the move so that fullscreen outputs are updated. */ Wayland_move_window(window->sdlwindow, driverdata); - update_scale_factor(window); + + if (!window->fractional_scale) { + update_scale_factor(window); + } } -static void -handle_surface_leave(void *data, struct wl_surface *surface, - struct wl_output *output) +static void handle_surface_leave(void *data, struct wl_surface *surface, + struct wl_output *output) { SDL_WindowData *window = data; int i, send_move_event = 0; @@ -1122,14 +1133,14 @@ handle_surface_leave(void *data, struct wl_surface *surface, } for (i = 0; i < window->num_outputs; i++) { - if (window->outputs[i] == driverdata) { /* remove this one */ - if (i == (window->num_outputs-1)) { + if (window->outputs[i] == driverdata) { /* remove this one */ + if (i == (window->num_outputs - 1)) { window->outputs[i] = NULL; send_move_event = 1; } else { SDL_memmove(&window->outputs[i], &window->outputs[i + 1], - sizeof(SDL_WaylandOutputData*) * ((window->num_outputs - i) - 1)); + sizeof(SDL_WaylandOutputData *) * ((window->num_outputs - i) - 1)); } window->num_outputs--; i--; @@ -1144,7 +1155,9 @@ handle_surface_leave(void *data, struct wl_surface *surface, window->outputs[window->num_outputs - 1]); } - update_scale_factor(window); + if (!window->fractional_scale) { + update_scale_factor(window); + } } static const struct wl_surface_listener surface_listener = { @@ -1152,8 +1165,7 @@ static const struct wl_surface_listener surface_listener = { handle_surface_leave }; -static void -Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version) +static void Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version) { info->info.wl.xdg_surface = NULL; if (version >= SDL_VERSIONNUM(2, 0, 17)) { @@ -1165,8 +1177,7 @@ Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version) } } -SDL_bool -Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; SDL_WindowData *data = (SDL_WindowData *) window->driverdata; @@ -1242,16 +1253,14 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) return SDL_TRUE; } -int -Wayland_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) +int Wayland_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) { - return 0; /* just succeed, the real work is done elsewhere. */ + return 0; /* just succeed, the real work is done elsewhere. */ } -int -Wayland_SetWindowModalFor(_THIS, SDL_Window *modal_window, SDL_Window *parent_window) +int Wayland_SetWindowModalFor(_THIS, SDL_Window *modal_window, SDL_Window *parent_window) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; SDL_WindowData *modal_data = modal_window->driverdata; SDL_WindowData *parent_data = parent_window->driverdata; @@ -1271,7 +1280,7 @@ Wayland_SetWindowModalFor(_THIS, SDL_Window *modal_window, SDL_Window *parent_wi parent_data->shell_surface.libdecor.frame); } else #endif - if (viddata->shell.xdg) { + if (viddata->shell.xdg) { if (modal_data->shell_surface.xdg.roleobj.toplevel == NULL) { return SDL_SetError("Modal window was hidden"); } @@ -1331,7 +1340,7 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window) } } else #endif - if (c->shell.xdg) { + if (c->shell.xdg) { data->shell_surface.xdg.surface = xdg_wm_base_get_xdg_surface(c->shell.xdg, data->surface); xdg_surface_set_user_data(data->shell_surface.xdg.surface, data); xdg_surface_add_listener(data->shell_surface.xdg.surface, &shell_surface_listener_xdg, data); @@ -1396,7 +1405,7 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window) } } else #endif - if (c->shell.xdg) { + if (c->shell.xdg) { /* Unlike libdecor we need to call this explicitly to prevent a deadlock. * libdecor will call this as part of their configure event! * -flibit @@ -1416,6 +1425,9 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window) &decoration_listener, window); } + + /* Set the geometry */ + xdg_surface_set_window_geometry(data->shell_surface.xdg.surface, 0, 0, data->window_width, data->window_height); } else { /* Nothing to see here, just commit. */ wl_surface_commit(data->surface); @@ -1433,6 +1445,20 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window) if (data->shell_surface.libdecor.frame && window->flags & SDL_WINDOW_BORDERLESS) { Wayland_SetWindowBordered(_this, window, SDL_FALSE); } + + /* Libdecor plugins can enforce minimum window sizes, so adjust if the initial window size is too small. */ + if (window->windowed.w < data->system_min_required_width || + window->windowed.h < data->system_min_required_height) { + + /* Warn if the window frame will be larger than the content surface. */ + SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, + "Window dimensions (%i, %i) are smaller than the system enforced minimum (%i, %i); window borders will be larger than the content surface.", + window->windowed.w, window->windowed.h, data->system_min_required_width, data->system_min_required_height); + + data->window_width = SDL_max(window->windowed.w, data->system_min_required_width); + data->window_height = SDL_max(window->windowed.h, data->system_min_required_height); + CommitLibdecorFrame(window); + } } else #endif { @@ -1462,8 +1488,7 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window) WAYLAND_wl_display_roundtrip(c->display); } -static void -Wayland_ReleasePopup(_THIS, SDL_Window *popup) +static void Wayland_ReleasePopup(_THIS, SDL_Window *popup) { SDL_WindowData *popupdata; @@ -1504,8 +1529,8 @@ void Wayland_HideWindow(_THIS, SDL_Window *window) SDL_WindowData *wind = window->driverdata; if (wind->server_decoration) { - zxdg_toplevel_decoration_v1_destroy(wind->server_decoration); - wind->server_decoration = NULL; + zxdg_toplevel_decoration_v1_destroy(wind->server_decoration); + wind->server_decoration = NULL; } /* Be sure to detach after this is done, otherwise ShowWindow crashes! */ @@ -1520,7 +1545,7 @@ void Wayland_HideWindow(_THIS, SDL_Window *window) } } else #endif - if (data->shell.xdg) { + if (data->shell.xdg) { if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { Wayland_ReleasePopup(_this, window); } else if (wind->shell_surface.xdg.roleobj.toplevel) { @@ -1540,10 +1565,9 @@ void Wayland_HideWindow(_THIS, SDL_Window *window) WAYLAND_wl_display_roundtrip(data->display); } -static void -handle_xdg_activation_done(void *data, - struct xdg_activation_token_v1 *xdg_activation_token_v1, - const char *token) +static void handle_xdg_activation_done(void *data, + struct xdg_activation_token_v1 *xdg_activation_token_v1, + const char *token) { SDL_WindowData *window = data; if (xdg_activation_token_v1 == window->activation_token) { @@ -1579,10 +1603,9 @@ static const struct xdg_activation_token_v1_listener activation_listener_xdg = { * * -flibit */ -static void -Wayland_activate_window(SDL_VideoData *data, SDL_WindowData *wind, - struct wl_surface *surface, - uint32_t serial, struct wl_seat *seat) +static void Wayland_activate_window(SDL_VideoData *data, SDL_WindowData *wind, + struct wl_surface *surface, + uint32_t serial, struct wl_seat *seat) { if (data->activation_manager) { if (wind->activation_token != NULL) { @@ -1612,8 +1635,7 @@ Wayland_activate_window(SDL_VideoData *data, SDL_WindowData *wind, } } -void -Wayland_RaiseWindow(_THIS, SDL_Window *window) +void Wayland_RaiseWindow(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; @@ -1630,8 +1652,7 @@ Wayland_RaiseWindow(_THIS, SDL_Window *window) NULL); } -int -Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) +int Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) { Wayland_activate_window(_this->driverdata, window->driverdata, @@ -1641,15 +1662,37 @@ Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) return 0; } +void handle_preferred_scale_changed(void *data, + struct wp_fractional_scale_v1 *wp_fractional_scale_v1, + uint preferred_scale) +{ + SDL_WindowData *window = data; + float old_factor = window->scale_factor; + float new_factor = preferred_scale / 120.; /* 120 is a magic number defined in the spec as a common denominator*/ + + if (!(window->sdlwindow->flags & SDL_WINDOW_ALLOW_HIGHDPI)) { + /* Scale will always be 1, just ignore this */ + return; + } + + if (!FloatEqual(new_factor, old_factor)) { + Wayland_HandleResize(window->sdlwindow, window->sdlwindow->w, window->sdlwindow->h, new_factor); + } +} + +static const struct wp_fractional_scale_v1_listener fractional_scale_listener = { + handle_preferred_scale_changed +}; + #ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH -static void SDLCALL -QtExtendedSurface_OnHintChanged(void *userdata, const char *name, - const char *oldValue, const char *newValue) +static void SDLCALL QtExtendedSurface_OnHintChanged(void *userdata, const char *name, + const char *oldValue, const char *newValue) { struct qt_extended_surface *qt_extended_surface = userdata; int i; - static struct { + static struct + { const char *name; int32_t value; } orientations[] = { @@ -1668,6 +1711,8 @@ QtExtendedSurface_OnHintChanged(void *userdata, const char *name, if (newValue != NULL) { const char *value_attempt = newValue; + + orientation = 0; while (value_attempt != NULL && *value_attempt != 0) { const char *value_attempt_end = SDL_strchr(value_attempt, ','); size_t value_attempt_len = (value_attempt_end != NULL) ? (value_attempt_end - value_attempt) @@ -1725,13 +1770,12 @@ static void QtExtendedSurface_Unsubscribe(struct qt_extended_surface *surface, c } #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ -void -Wayland_SetWindowFullscreen(_THIS, SDL_Window * window, - SDL_VideoDisplay * _display, SDL_bool fullscreen) +void Wayland_SetWindowFullscreen(_THIS, SDL_Window *window, + SDL_VideoDisplay *_display, SDL_bool fullscreen) { - SDL_WindowData *wind = (SDL_WindowData*) window->driverdata; - struct wl_output *output = ((SDL_WaylandOutputData*) _display->driverdata)->output; - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; + struct wl_output *output = ((SDL_WaylandOutputData *)_display->driverdata)->output; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; /* Called from within a configure event or the window is a popup, drop it. */ if (wind->in_fullscreen_transition || wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { @@ -1764,11 +1808,10 @@ Wayland_SetWindowFullscreen(_THIS, SDL_Window * window, } } -void -Wayland_RestoreWindow(_THIS, SDL_Window * window) +void Wayland_RestoreWindow(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { return; @@ -1787,22 +1830,21 @@ Wayland_RestoreWindow(_THIS, SDL_Window * window) libdecor_frame_unset_maximized(wind->shell_surface.libdecor.frame); } else #endif - /* Note that xdg-shell does NOT provide a way to unset minimize! */ - if (viddata->shell.xdg) { - if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { - return; /* Can't do anything yet, wait for ShowWindow */ + /* Note that xdg-shell does NOT provide a way to unset minimize! */ + if (viddata->shell.xdg) { + if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { + return; /* Can't do anything yet, wait for ShowWindow */ + } + xdg_toplevel_unset_maximized(wind->shell_surface.xdg.roleobj.toplevel); } - xdg_toplevel_unset_maximized(wind->shell_surface.xdg.roleobj.toplevel); - } - WAYLAND_wl_display_flush( viddata->display ); + WAYLAND_wl_display_roundtrip(viddata->display); } -void -Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) +void Wayland_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered) { SDL_WindowData *wind = window->driverdata; - const SDL_VideoData *viddata = (const SDL_VideoData *) _this->driverdata; + const SDL_VideoData *viddata = (const SDL_VideoData *)_this->driverdata; if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { return; @@ -1815,14 +1857,13 @@ Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) } } else #endif - if ((viddata->decoration_manager) && (wind->server_decoration)) { + if ((viddata->decoration_manager) && (wind->server_decoration)) { const enum zxdg_toplevel_decoration_v1_mode mode = bordered ? ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE : ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE; zxdg_toplevel_decoration_v1_set_mode(wind->server_decoration, mode); } } -void -Wayland_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) +void Wayland_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable) { #ifdef HAVE_LIBDECOR_H const SDL_WindowData *wind = window->driverdata; @@ -1843,11 +1884,10 @@ Wayland_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) } } -void -Wayland_MaximizeWindow(_THIS, SDL_Window * window) +void Wayland_MaximizeWindow(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { return; @@ -1870,21 +1910,20 @@ Wayland_MaximizeWindow(_THIS, SDL_Window * window) libdecor_frame_set_maximized(wind->shell_surface.libdecor.frame); } else #endif - if (viddata->shell.xdg) { + if (viddata->shell.xdg) { if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { return; /* Can't do anything yet, wait for ShowWindow */ } xdg_toplevel_set_maximized(wind->shell_surface.xdg.roleobj.toplevel); } - WAYLAND_wl_display_flush(viddata->display); + WAYLAND_wl_display_roundtrip(viddata->display); } -void -Wayland_MinimizeWindow(_THIS, SDL_Window * window) +void Wayland_MinimizeWindow(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) { return; @@ -1898,7 +1937,7 @@ Wayland_MinimizeWindow(_THIS, SDL_Window * window) libdecor_frame_set_minimized(wind->shell_surface.libdecor.frame); } else #endif - if (viddata->shell.xdg) { + if (viddata->shell.xdg) { if (wind->shell_surface.xdg.roleobj.toplevel == NULL) { return; /* Can't do anything yet, wait for ShowWindow */ } @@ -1908,10 +1947,9 @@ Wayland_MinimizeWindow(_THIS, SDL_Window * window) WAYLAND_wl_display_flush(viddata->display); } -void -Wayland_SetWindowMouseRect(_THIS, SDL_Window *window) +void Wayland_SetWindowMouseRect(_THIS, SDL_Window *window) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; /* This may look suspiciously like SetWindowGrab, despite SetMouseRect not * implicitly doing a grab. And you're right! Wayland doesn't let us mess @@ -1928,10 +1966,9 @@ Wayland_SetWindowMouseRect(_THIS, SDL_Window *window) } } -void -Wayland_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed) +void Wayland_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (grabbed) { Wayland_input_confine_pointer(data->input, window); @@ -1940,10 +1977,9 @@ Wayland_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed) } } -void -Wayland_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed) +void Wayland_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (grabbed) { Wayland_input_grab_keyboard(window, data->input); @@ -1957,9 +1993,10 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) SDL_WindowData *data; SDL_VideoData *c; - data = SDL_calloc(1, sizeof *data); - if (data == NULL) + data = SDL_calloc(1, sizeof(*data)); + if (data == NULL) { return SDL_OutOfMemory(); + } c = _this->driverdata; window->driverdata = data; @@ -1985,8 +2022,8 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { int i; - for (i=0; i < SDL_GetVideoDevice()->num_displays; i++) { - float scale = ((SDL_WaylandOutputData*)SDL_GetVideoDevice()->displays[i].driverdata)->scale_factor; + for (i = 0; i < SDL_GetVideoDevice()->num_displays; i++) { + float scale = ((SDL_WaylandOutputData *)SDL_GetVideoDevice()->displays[i].driverdata)->scale_factor; data->scale_factor = SDL_max(data->scale_factor, scale); } } @@ -2026,7 +2063,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) #ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH if (c->surface_extension) { data->extended_surface = qt_surface_extension_get_extended_surface( - c->surface_extension, data->surface); + c->surface_extension, data->surface); QtExtendedSurface_Subscribe(data->extended_surface, SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION); QtExtendedSurface_Subscribe(data->extended_surface, SDL_HINT_QTWAYLAND_WINDOW_FLAGS); @@ -2038,10 +2075,10 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) #if SDL_VIDEO_OPENGL_EGL /* Create the GLES window surface */ - data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window); + data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)data->egl_window); if (data->egl_surface == EGL_NO_SURFACE) { - return -1; /* SDL_EGL_CreateSurface should have set error */ + return -1; /* SDL_EGL_CreateSurface should have set error */ } #endif } @@ -2058,36 +2095,40 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) Wayland_input_lock_pointer(c->input); } + if (c->fractional_scale_manager) { + data->fractional_scale = wp_fractional_scale_manager_v1_get_fractional_scale(c->fractional_scale_manager, data->surface); + wp_fractional_scale_v1_add_listener(data->fractional_scale, + &fractional_scale_listener, data); + } + /* Moved this call to ShowWindow: wl_surface_commit(data->surface); */ WAYLAND_wl_display_flush(c->display); /* We may need to create an idle inhibitor for this new window */ Wayland_SuspendScreenSaver(_this); - #define IS_POPUP(window) \ - (window->flags & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)) +#define IS_POPUP(window) \ + (window->flags & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)) #ifdef HAVE_LIBDECOR_H if (c->shell.libdecor && !IS_POPUP(window)) { data->shell_surface_type = WAYLAND_SURFACE_LIBDECOR; } else #endif - if (c->shell.xdg) { + if (c->shell.xdg) { if (IS_POPUP(window)) { data->shell_surface_type = WAYLAND_SURFACE_XDG_POPUP; } else { data->shell_surface_type = WAYLAND_SURFACE_XDG_TOPLEVEL; } } /* All other cases will be WAYLAND_SURFACE_UNKNOWN */ - #undef IS_POPUP +#undef IS_POPUP return 0; } - -static void -Wayland_HandleResize(SDL_Window *window, int width, int height, float scale) +static void Wayland_HandleResize(SDL_Window *window, int width, int height, float scale) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; const int old_w = window->w, old_h = window->h; const int old_drawable_width = data->drawable_width; const int old_drawable_height = data->drawable_height; @@ -2112,30 +2153,31 @@ Wayland_HandleResize(SDL_Window *window, int width, int height, float scale) } } -void -Wayland_SetWindowMinimumSize(_THIS, SDL_Window * window) +void Wayland_SetWindowMinimumSize(_THIS, SDL_Window *window) { SetMinMaxDimensions(window, SDL_TRUE); } -void -Wayland_SetWindowMaximumSize(_THIS, SDL_Window * window) +void Wayland_SetWindowMaximumSize(_THIS, SDL_Window *window) { SetMinMaxDimensions(window, SDL_TRUE); } -void Wayland_SetWindowSize(_THIS, SDL_Window * window) +void Wayland_SetWindowSize(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; #ifdef HAVE_LIBDECOR_H /* we must not resize the window while we have a static (non-floating) size */ - if (wind->shell_surface_type == WAYLAND_SURFACE_LIBDECOR && - wind->shell_surface.libdecor.frame && - !libdecor_frame_is_floating(wind->shell_surface.libdecor.frame)) { + if (wind->shell_surface_type == WAYLAND_SURFACE_LIBDECOR) { + if (wind->shell_surface.libdecor.frame && + !libdecor_frame_is_floating(wind->shell_surface.libdecor.frame)) { /* Commit the resize when we re-enter floating state */ wind->floating_resize_pending = SDL_TRUE; return; + } + + OverrideLibdecorLimits(window); } #endif @@ -2148,17 +2190,17 @@ void Wayland_SetWindowSize(_THIS, SDL_Window * window) wind->floating_height = window->windowed.h; } -void Wayland_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) +void Wayland_GetWindowSizeInPixels(_THIS, SDL_Window *window, int *w, int *h) { SDL_WindowData *data; if (window->driverdata) { - data = (SDL_WindowData *) window->driverdata; + data = (SDL_WindowData *)window->driverdata; *w = data->drawable_width; *h = data->drawable_height; } } -void Wayland_SetWindowTitle(_THIS, SDL_Window * window) +void Wayland_SetWindowTitle(_THIS, SDL_Window *window) { SDL_WindowData *wind = window->driverdata; SDL_VideoData *viddata = _this->driverdata; @@ -2186,8 +2228,7 @@ void Wayland_SetWindowTitle(_THIS, SDL_Window * window) WAYLAND_wl_display_flush(viddata->display); } -void -Wayland_SuspendScreenSaver(_THIS) +void Wayland_SuspendScreenSaver(_THIS) { SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; @@ -2251,12 +2292,16 @@ void Wayland_DestroyWindow(_THIS, SDL_Window *window) wp_viewport_destroy(wind->draw_viewport); } + if (wind->fractional_scale) { + wp_fractional_scale_v1_destroy(wind->fractional_scale); + } + SDL_free(wind->outputs); if (wind->gles_swap_frame_callback) { - WAYLAND_wl_event_queue_destroy(wind->gles_swap_frame_event_queue); - WAYLAND_wl_proxy_wrapper_destroy(wind->gles_swap_frame_surface_wrapper); wl_callback_destroy(wind->gles_swap_frame_callback); + WAYLAND_wl_proxy_wrapper_destroy(wind->gles_swap_frame_surface_wrapper); + WAYLAND_wl_event_queue_destroy(wind->gles_swap_frame_event_queue); } if (wind->surface_damage_frame_callback) { @@ -2278,23 +2323,22 @@ void Wayland_DestroyWindow(_THIS, SDL_Window *window) window->driverdata = NULL; } -static void -EGLTransparencyChangedCallback(void *userdata, const char *name, const char *oldValue, const char *newValue) +static void EGLTransparencyChangedCallback(void *userdata, const char *name, const char *oldValue, const char *newValue) { const SDL_bool oldval = SDL_GetStringBoolean(oldValue, SDL_FALSE); const SDL_bool newval = SDL_GetStringBoolean(newValue, SDL_FALSE); if (oldval != newval) { - SDL_Window *window; - SDL_VideoData *viddata = (SDL_VideoData *) userdata; - SDL_VideoDevice *dev = SDL_GetVideoDevice(); + SDL_Window *window; + SDL_VideoData *viddata = (SDL_VideoData *)userdata; + SDL_VideoDevice *dev = SDL_GetVideoDevice(); viddata->egl_transparency_enabled = newval; /* Iterate over all windows and update the surface opaque regions */ for (window = dev->windows; window != NULL; window = window->next) { - SDL_WindowData *wind = (SDL_WindowData *) window->driverdata; - + SDL_WindowData *wind = (SDL_WindowData *)window->driverdata; + if (!newval) { struct wl_region *region = wl_compositor_create_region(wind->waylandData->compositor); wl_region_add(region, 0, 0, wind->window_width, wind->window_height); @@ -2307,15 +2351,13 @@ EGLTransparencyChangedCallback(void *userdata, const char *name, const char *old } } -void -Wayland_InitWin(SDL_VideoData *data) +void Wayland_InitWin(SDL_VideoData *data) { data->egl_transparency_enabled = SDL_GetHintBoolean(SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY, SDL_FALSE); SDL_AddHintCallback(SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY, EGLTransparencyChangedCallback, data); } -void -Wayland_QuitWin(SDL_VideoData *data) +void Wayland_QuitWin(SDL_VideoData *data) { SDL_DelHintCallback(SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY, EGLTransparencyChangedCallback, data); } diff --git a/modules/SDL2/src/video/wayland/SDL_waylandwindow.h b/modules/SDL2/src/video/wayland/SDL_waylandwindow.h index 0d36a30..89f0d77 100644 --- a/modules/SDL2/src/video/wayland/SDL_waylandwindow.h +++ b/modules/SDL2/src/video/wayland/SDL_waylandwindow.h @@ -32,7 +32,8 @@ struct SDL_WaylandInput; -typedef struct { +typedef struct +{ SDL_Window *sdlwindow; SDL_VideoData *waylandData; struct wl_surface *surface; @@ -41,18 +42,23 @@ typedef struct { struct wl_surface *gles_swap_frame_surface_wrapper; struct wl_callback *surface_damage_frame_callback; - union { + union + { #ifdef HAVE_LIBDECOR_H - struct { + struct + { struct libdecor_frame *frame; SDL_bool initial_configure_seen; } libdecor; #endif - struct { + struct + { struct xdg_surface *surface; - union { + union + { struct xdg_toplevel *toplevel; - struct { + struct + { struct xdg_popup *popup; struct xdg_positioner *positioner; Uint32 parentID; @@ -62,7 +68,8 @@ typedef struct { SDL_bool initial_configure_seen; } xdg; } shell_surface; - enum { + enum + { WAYLAND_SURFACE_UNKNOWN = 0, WAYLAND_SURFACE_XDG_TOPLEVEL, WAYLAND_SURFACE_XDG_POPUP, @@ -81,6 +88,7 @@ typedef struct { struct zwp_idle_inhibitor_v1 *idle_inhibitor; struct xdg_activation_token_v1 *activation_token; struct wp_viewport *draw_viewport; + struct wp_fractional_scale_v1 *fractional_scale; /* floating dimensions for restoring from maximized and fullscreen */ int floating_width, floating_height; @@ -100,6 +108,8 @@ typedef struct { int drawable_width, drawable_height; int fs_output_width, fs_output_height; int window_width, window_height; + int system_min_required_width; + int system_min_required_height; SDL_bool needs_resize_event; SDL_bool floating_resize_pending; SDL_bool was_floating; @@ -111,31 +121,31 @@ typedef struct { extern void Wayland_ShowWindow(_THIS, SDL_Window *window); extern void Wayland_HideWindow(_THIS, SDL_Window *window); extern void Wayland_RaiseWindow(_THIS, SDL_Window *window); -extern void Wayland_SetWindowFullscreen(_THIS, SDL_Window * window, - SDL_VideoDisplay * _display, +extern void Wayland_SetWindowFullscreen(_THIS, SDL_Window *window, + SDL_VideoDisplay *_display, SDL_bool fullscreen); -extern void Wayland_MaximizeWindow(_THIS, SDL_Window * window); -extern void Wayland_MinimizeWindow(_THIS, SDL_Window * window); -extern void Wayland_SetWindowMouseRect(_THIS, SDL_Window * window); -extern void Wayland_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed); +extern void Wayland_MaximizeWindow(_THIS, SDL_Window *window); +extern void Wayland_MinimizeWindow(_THIS, SDL_Window *window); +extern void Wayland_SetWindowMouseRect(_THIS, SDL_Window *window); +extern void Wayland_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed); extern void Wayland_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed); -extern void Wayland_RestoreWindow(_THIS, SDL_Window * window); -extern void Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered); -extern void Wayland_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable); +extern void Wayland_RestoreWindow(_THIS, SDL_Window *window); +extern void Wayland_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered); +extern void Wayland_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable); extern int Wayland_CreateWindow(_THIS, SDL_Window *window); -extern void Wayland_SetWindowSize(_THIS, SDL_Window * window); -extern void Wayland_SetWindowMinimumSize(_THIS, SDL_Window * window); -extern void Wayland_SetWindowMaximumSize(_THIS, SDL_Window * window); -extern void Wayland_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h); -extern int Wayland_SetWindowModalFor(_THIS, SDL_Window * modal_window, SDL_Window * parent_window); -extern void Wayland_SetWindowTitle(_THIS, SDL_Window * window); +extern void Wayland_SetWindowSize(_THIS, SDL_Window *window); +extern void Wayland_SetWindowMinimumSize(_THIS, SDL_Window *window); +extern void Wayland_SetWindowMaximumSize(_THIS, SDL_Window *window); +extern void Wayland_GetWindowSizeInPixels(_THIS, SDL_Window *window, int *w, int *h); +extern int Wayland_SetWindowModalFor(_THIS, SDL_Window *modal_window, SDL_Window *parent_window); +extern void Wayland_SetWindowTitle(_THIS, SDL_Window *window); extern void Wayland_DestroyWindow(_THIS, SDL_Window *window); extern void Wayland_SuspendScreenSaver(_THIS); extern SDL_bool Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info); extern int Wayland_SetWindowHitTest(SDL_Window *window, SDL_bool enabled); -extern int Wayland_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation); +extern int Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation); extern void Wayland_InitWin(SDL_VideoData *data); extern void Wayland_QuitWin(SDL_VideoData *data); diff --git a/modules/SDL2/src/video/windows/SDL_msctf.h b/modules/SDL2/src/video/windows/SDL_msctf.h index 640e60f..5f6829a 100644 --- a/modules/SDL2/src/video/windows/SDL_msctf.h +++ b/modules/SDL2/src/video/windows/SDL_msctf.h @@ -24,9 +24,11 @@ #include -#define TF_INVALID_COOKIE (0xffffffff) -#define TF_IPSINK_FLAG_ACTIVE 0x0001 -#define TF_TMAE_UIELEMENTENABLEDONLY 0x00000004 +#define TF_INVALID_COOKIE (0xffffffff) +#define TF_IPSINK_FLAG_ACTIVE 0x0001 +#define TF_TMAE_UIELEMENTENABLEDONLY 0x00000004 + +/* *INDENT-OFF* */ /* clang-format off */ typedef struct ITfThreadMgr ITfThreadMgr; typedef struct ITfDocumentMgr ITfDocumentMgr; @@ -239,4 +241,6 @@ struct ITfSource const struct ITfSourceVtbl *lpVtbl; }; +/* *INDENT-ON* */ /* clang-format on */ + #endif /* SDL_msctf_h_ */ diff --git a/modules/SDL2/src/video/windows/SDL_vkeys.h b/modules/SDL2/src/video/windows/SDL_vkeys.h index 20d1b5b..12f3440 100644 --- a/modules/SDL2/src/video/windows/SDL_vkeys.h +++ b/modules/SDL2/src/video/windows/SDL_vkeys.h @@ -20,57 +20,57 @@ */ #ifndef VK_0 -#define VK_0 '0' -#define VK_1 '1' -#define VK_2 '2' -#define VK_3 '3' -#define VK_4 '4' -#define VK_5 '5' -#define VK_6 '6' -#define VK_7 '7' -#define VK_8 '8' -#define VK_9 '9' -#define VK_A 'A' -#define VK_B 'B' -#define VK_C 'C' -#define VK_D 'D' -#define VK_E 'E' -#define VK_F 'F' -#define VK_G 'G' -#define VK_H 'H' -#define VK_I 'I' -#define VK_J 'J' -#define VK_K 'K' -#define VK_L 'L' -#define VK_M 'M' -#define VK_N 'N' -#define VK_O 'O' -#define VK_P 'P' -#define VK_Q 'Q' -#define VK_R 'R' -#define VK_S 'S' -#define VK_T 'T' -#define VK_U 'U' -#define VK_V 'V' -#define VK_W 'W' -#define VK_X 'X' -#define VK_Y 'Y' -#define VK_Z 'Z' +#define VK_0 '0' +#define VK_1 '1' +#define VK_2 '2' +#define VK_3 '3' +#define VK_4 '4' +#define VK_5 '5' +#define VK_6 '6' +#define VK_7 '7' +#define VK_8 '8' +#define VK_9 '9' +#define VK_A 'A' +#define VK_B 'B' +#define VK_C 'C' +#define VK_D 'D' +#define VK_E 'E' +#define VK_F 'F' +#define VK_G 'G' +#define VK_H 'H' +#define VK_I 'I' +#define VK_J 'J' +#define VK_K 'K' +#define VK_L 'L' +#define VK_M 'M' +#define VK_N 'N' +#define VK_O 'O' +#define VK_P 'P' +#define VK_Q 'Q' +#define VK_R 'R' +#define VK_S 'S' +#define VK_T 'T' +#define VK_U 'U' +#define VK_V 'V' +#define VK_W 'W' +#define VK_X 'X' +#define VK_Y 'Y' +#define VK_Z 'Z' #endif /* VK_0 */ /* These keys haven't been defined, but were experimentally determined */ -#define VK_SEMICOLON 0xBA -#define VK_EQUALS 0xBB -#define VK_COMMA 0xBC -#define VK_MINUS 0xBD -#define VK_PERIOD 0xBE -#define VK_SLASH 0xBF -#define VK_GRAVE 0xC0 -#define VK_LBRACKET 0xDB -#define VK_BACKSLASH 0xDC -#define VK_RBRACKET 0xDD -#define VK_APOSTROPHE 0xDE -#define VK_BACKTICK 0xDF -#define VK_OEM_102 0xE2 +#define VK_SEMICOLON 0xBA +#define VK_EQUALS 0xBB +#define VK_COMMA 0xBC +#define VK_MINUS 0xBD +#define VK_PERIOD 0xBE +#define VK_SLASH 0xBF +#define VK_GRAVE 0xC0 +#define VK_LBRACKET 0xDB +#define VK_BACKSLASH 0xDC +#define VK_RBRACKET 0xDD +#define VK_APOSTROPHE 0xDE +#define VK_BACKTICK 0xDF +#define VK_OEM_102 0xE2 /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsclipboard.c b/modules/SDL2/src/video/windows/SDL_windowsclipboard.c index 4fad6a9..df8a404 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsclipboard.c +++ b/modules/SDL2/src/video/windows/SDL_windowsclipboard.c @@ -24,33 +24,30 @@ #include "SDL_windowsvideo.h" #include "SDL_windowswindow.h" +#include "SDL_timer.h" #include "../../events/SDL_clipboardevents_c.h" - #ifdef UNICODE -#define TEXT_FORMAT CF_UNICODETEXT +#define TEXT_FORMAT CF_UNICODETEXT #else -#define TEXT_FORMAT CF_TEXT +#define TEXT_FORMAT CF_TEXT #endif - /* Get any application owned window handle for clipboard association */ -static HWND -GetWindowHandle(_THIS) +static HWND GetWindowHandle(_THIS) { SDL_Window *window; window = _this->windows; if (window) { - return ((SDL_WindowData *) window->driverdata)->hwnd; + return ((SDL_WindowData *)window->driverdata)->hwnd; } return NULL; } -int -WIN_SetClipboardText(_THIS, const char *text) +int WIN_SetClipboardText(_THIS, const char *text) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int result = 0; if (OpenClipboard(GetWindowHandle(_this))) { @@ -66,12 +63,12 @@ WIN_SetClipboardText(_THIS, const char *text) /* Find out the size of the data */ for (size = 0, i = 0; tstr[i]; ++i, ++size) { - if (tstr[i] == '\n' && (i == 0 || tstr[i-1] != '\r')) { + if (tstr[i] == '\n' && (i == 0 || tstr[i - 1] != '\r')) { /* We're going to insert a carriage return */ ++size; } } - size = (size+1)*sizeof(*tstr); + size = (size + 1) * sizeof(*tstr); /* Save the data to the clipboard */ hMem = GlobalAlloc(GMEM_MOVEABLE, size); @@ -80,7 +77,7 @@ WIN_SetClipboardText(_THIS, const char *text) if (dst) { /* Copy the text over, adding carriage returns as necessary */ for (i = 0; tstr[i]; ++i) { - if (tstr[i] == '\n' && (i == 0 || tstr[i-1] != '\r')) { + if (tstr[i] == '\n' && (i == 0 || tstr[i - 1] != '\r')) { *dst++ = '\r'; } *dst++ = tstr[i]; @@ -104,35 +101,41 @@ WIN_SetClipboardText(_THIS, const char *text) return result; } -char * -WIN_GetClipboardText(_THIS) +char *WIN_GetClipboardText(_THIS) { - char *text; - - text = NULL; - if (IsClipboardFormatAvailable(TEXT_FORMAT) && - OpenClipboard(GetWindowHandle(_this))) { - HANDLE hMem; - LPTSTR tstr; - - hMem = GetClipboardData(TEXT_FORMAT); - if (hMem) { - tstr = (LPTSTR)GlobalLock(hMem); - text = WIN_StringToUTF8(tstr); - GlobalUnlock(hMem); - } else { - WIN_SetError("Couldn't get clipboard data"); + char *text = NULL; + + if (IsClipboardFormatAvailable(TEXT_FORMAT)) { + /* Retry to open the clipboard in case another application has it open */ + const int MAX_ATTEMPTS = 3; + int attempt; + + for (attempt = 0; attempt < MAX_ATTEMPTS; ++attempt) { + if (OpenClipboard(GetWindowHandle(_this))) { + HANDLE hMem; + LPTSTR tstr; + + hMem = GetClipboardData(TEXT_FORMAT); + if (hMem) { + tstr = (LPTSTR)GlobalLock(hMem); + text = WIN_StringToUTF8(tstr); + GlobalUnlock(hMem); + } else { + WIN_SetError("Couldn't get clipboard data"); + } + CloseClipboard(); + break; + } + SDL_Delay(10); } - CloseClipboard(); } - if (!text) { + if (text == NULL) { text = SDL_strdup(""); } return text; } -SDL_bool -WIN_HasClipboardText(_THIS) +SDL_bool WIN_HasClipboardText(_THIS) { SDL_bool result = SDL_FALSE; char *text = WIN_GetClipboardText(_this); @@ -143,8 +146,7 @@ WIN_HasClipboardText(_THIS) return result; } -void -WIN_CheckClipboardUpdate(struct SDL_VideoData * data) +void WIN_CheckClipboardUpdate(struct SDL_VideoData *data) { const DWORD count = GetClipboardSequenceNumber(); if (count != data->clipboard_count) { diff --git a/modules/SDL2/src/video/windows/SDL_windowsclipboard.h b/modules/SDL2/src/video/windows/SDL_windowsclipboard.h index 7320f5b..d91eefe 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsclipboard.h +++ b/modules/SDL2/src/video/windows/SDL_windowsclipboard.h @@ -29,7 +29,7 @@ struct SDL_VideoData; extern int WIN_SetClipboardText(_THIS, const char *text); extern char *WIN_GetClipboardText(_THIS); extern SDL_bool WIN_HasClipboardText(_THIS); -extern void WIN_CheckClipboardUpdate(struct SDL_VideoData * data); +extern void WIN_CheckClipboardUpdate(struct SDL_VideoData *data); #endif /* SDL_windowsclipboard_h_ */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsevents.c b/modules/SDL2/src/video/windows/SDL_windowsevents.c index d7d7e7a..180c1a8 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsevents.c +++ b/modules/SDL2/src/video/windows/SDL_windowsevents.c @@ -60,10 +60,10 @@ /* #define HIGHDPI_DEBUG */ /* Masks for processing the windows KEYDOWN and KEYUP messages */ -#define REPEATED_KEYMASK (1<<30) -#define EXTENDED_KEYMASK (1<<24) +#define REPEATED_KEYMASK (1 << 30) +#define EXTENDED_KEYMASK (1 << 24) -#define VK_ENTER 10 /* Keypad Enter ... no VKEY defined? */ +#define VK_ENTER 10 /* Keypad Enter ... no VKEY defined? */ #ifndef VK_OEM_NEC_EQUAL #define VK_OEM_NEC_EQUAL 0x92 #endif @@ -101,87 +101,132 @@ #endif #ifndef IS_HIGH_SURROGATE -#define IS_HIGH_SURROGATE(x) (((x) >= 0xd800) && ((x) <= 0xdbff)) +#define IS_HIGH_SURROGATE(x) (((x) >= 0xd800) && ((x) <= 0xdbff)) #endif #ifndef IS_LOW_SURROGATE -#define IS_LOW_SURROGATE(x) (((x) >= 0xdc00) && ((x) <= 0xdfff)) +#define IS_LOW_SURROGATE(x) (((x) >= 0xdc00) && ((x) <= 0xdfff)) #endif #ifndef IS_SURROGATE_PAIR -#define IS_SURROGATE_PAIR(h,l) (IS_HIGH_SURROGATE(h) && IS_LOW_SURROGATE(l)) +#define IS_SURROGATE_PAIR(h, l) (IS_HIGH_SURROGATE(h) && IS_LOW_SURROGATE(l)) #endif -static SDL_Scancode -VKeytoScancodeFallback(WPARAM vkey) +static SDL_Scancode VKeytoScancodeFallback(WPARAM vkey) { switch (vkey) { - case VK_LEFT: return SDL_SCANCODE_LEFT; - case VK_UP: return SDL_SCANCODE_UP; - case VK_RIGHT: return SDL_SCANCODE_RIGHT; - case VK_DOWN: return SDL_SCANCODE_DOWN; + case VK_LEFT: + return SDL_SCANCODE_LEFT; + case VK_UP: + return SDL_SCANCODE_UP; + case VK_RIGHT: + return SDL_SCANCODE_RIGHT; + case VK_DOWN: + return SDL_SCANCODE_DOWN; - default: return SDL_SCANCODE_UNKNOWN; + default: + return SDL_SCANCODE_UNKNOWN; } } -static SDL_Scancode -VKeytoScancode(WPARAM vkey) +static SDL_Scancode VKeytoScancode(WPARAM vkey) { switch (vkey) { - case VK_MODECHANGE: return SDL_SCANCODE_MODE; - case VK_SELECT: return SDL_SCANCODE_SELECT; - case VK_EXECUTE: return SDL_SCANCODE_EXECUTE; - case VK_HELP: return SDL_SCANCODE_HELP; - case VK_PAUSE: return SDL_SCANCODE_PAUSE; - case VK_NUMLOCK: return SDL_SCANCODE_NUMLOCKCLEAR; - - case VK_F13: return SDL_SCANCODE_F13; - case VK_F14: return SDL_SCANCODE_F14; - case VK_F15: return SDL_SCANCODE_F15; - case VK_F16: return SDL_SCANCODE_F16; - case VK_F17: return SDL_SCANCODE_F17; - case VK_F18: return SDL_SCANCODE_F18; - case VK_F19: return SDL_SCANCODE_F19; - case VK_F20: return SDL_SCANCODE_F20; - case VK_F21: return SDL_SCANCODE_F21; - case VK_F22: return SDL_SCANCODE_F22; - case VK_F23: return SDL_SCANCODE_F23; - case VK_F24: return SDL_SCANCODE_F24; - - case VK_OEM_NEC_EQUAL: return SDL_SCANCODE_KP_EQUALS; - case VK_BROWSER_BACK: return SDL_SCANCODE_AC_BACK; - case VK_BROWSER_FORWARD: return SDL_SCANCODE_AC_FORWARD; - case VK_BROWSER_REFRESH: return SDL_SCANCODE_AC_REFRESH; - case VK_BROWSER_STOP: return SDL_SCANCODE_AC_STOP; - case VK_BROWSER_SEARCH: return SDL_SCANCODE_AC_SEARCH; - case VK_BROWSER_FAVORITES: return SDL_SCANCODE_AC_BOOKMARKS; - case VK_BROWSER_HOME: return SDL_SCANCODE_AC_HOME; - case VK_VOLUME_MUTE: return SDL_SCANCODE_AUDIOMUTE; - case VK_VOLUME_DOWN: return SDL_SCANCODE_VOLUMEDOWN; - case VK_VOLUME_UP: return SDL_SCANCODE_VOLUMEUP; - - case VK_MEDIA_NEXT_TRACK: return SDL_SCANCODE_AUDIONEXT; - case VK_MEDIA_PREV_TRACK: return SDL_SCANCODE_AUDIOPREV; - case VK_MEDIA_STOP: return SDL_SCANCODE_AUDIOSTOP; - case VK_MEDIA_PLAY_PAUSE: return SDL_SCANCODE_AUDIOPLAY; - case VK_LAUNCH_MAIL: return SDL_SCANCODE_MAIL; - case VK_LAUNCH_MEDIA_SELECT: return SDL_SCANCODE_MEDIASELECT; - - case VK_OEM_102: return SDL_SCANCODE_NONUSBACKSLASH; - - case VK_ATTN: return SDL_SCANCODE_SYSREQ; - case VK_CRSEL: return SDL_SCANCODE_CRSEL; - case VK_EXSEL: return SDL_SCANCODE_EXSEL; - case VK_OEM_CLEAR: return SDL_SCANCODE_CLEAR; - - case VK_LAUNCH_APP1: return SDL_SCANCODE_APP1; - case VK_LAUNCH_APP2: return SDL_SCANCODE_APP2; - - default: return SDL_SCANCODE_UNKNOWN; + case VK_MODECHANGE: + return SDL_SCANCODE_MODE; + case VK_SELECT: + return SDL_SCANCODE_SELECT; + case VK_EXECUTE: + return SDL_SCANCODE_EXECUTE; + case VK_HELP: + return SDL_SCANCODE_HELP; + case VK_PAUSE: + return SDL_SCANCODE_PAUSE; + case VK_NUMLOCK: + return SDL_SCANCODE_NUMLOCKCLEAR; + + case VK_F13: + return SDL_SCANCODE_F13; + case VK_F14: + return SDL_SCANCODE_F14; + case VK_F15: + return SDL_SCANCODE_F15; + case VK_F16: + return SDL_SCANCODE_F16; + case VK_F17: + return SDL_SCANCODE_F17; + case VK_F18: + return SDL_SCANCODE_F18; + case VK_F19: + return SDL_SCANCODE_F19; + case VK_F20: + return SDL_SCANCODE_F20; + case VK_F21: + return SDL_SCANCODE_F21; + case VK_F22: + return SDL_SCANCODE_F22; + case VK_F23: + return SDL_SCANCODE_F23; + case VK_F24: + return SDL_SCANCODE_F24; + + case VK_OEM_NEC_EQUAL: + return SDL_SCANCODE_KP_EQUALS; + case VK_BROWSER_BACK: + return SDL_SCANCODE_AC_BACK; + case VK_BROWSER_FORWARD: + return SDL_SCANCODE_AC_FORWARD; + case VK_BROWSER_REFRESH: + return SDL_SCANCODE_AC_REFRESH; + case VK_BROWSER_STOP: + return SDL_SCANCODE_AC_STOP; + case VK_BROWSER_SEARCH: + return SDL_SCANCODE_AC_SEARCH; + case VK_BROWSER_FAVORITES: + return SDL_SCANCODE_AC_BOOKMARKS; + case VK_BROWSER_HOME: + return SDL_SCANCODE_AC_HOME; + case VK_VOLUME_MUTE: + return SDL_SCANCODE_AUDIOMUTE; + case VK_VOLUME_DOWN: + return SDL_SCANCODE_VOLUMEDOWN; + case VK_VOLUME_UP: + return SDL_SCANCODE_VOLUMEUP; + + case VK_MEDIA_NEXT_TRACK: + return SDL_SCANCODE_AUDIONEXT; + case VK_MEDIA_PREV_TRACK: + return SDL_SCANCODE_AUDIOPREV; + case VK_MEDIA_STOP: + return SDL_SCANCODE_AUDIOSTOP; + case VK_MEDIA_PLAY_PAUSE: + return SDL_SCANCODE_AUDIOPLAY; + case VK_LAUNCH_MAIL: + return SDL_SCANCODE_MAIL; + case VK_LAUNCH_MEDIA_SELECT: + return SDL_SCANCODE_MEDIASELECT; + + case VK_OEM_102: + return SDL_SCANCODE_NONUSBACKSLASH; + + case VK_ATTN: + return SDL_SCANCODE_SYSREQ; + case VK_CRSEL: + return SDL_SCANCODE_CRSEL; + case VK_EXSEL: + return SDL_SCANCODE_EXSEL; + case VK_OEM_CLEAR: + return SDL_SCANCODE_CLEAR; + + case VK_LAUNCH_APP1: + return SDL_SCANCODE_APP1; + case VK_LAUNCH_APP2: + return SDL_SCANCODE_APP2; + + default: + return SDL_SCANCODE_UNKNOWN; } } -static SDL_Scancode -WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam) +static SDL_Scancode WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam) { SDL_Scancode code; int nScanCode = (lParam >> 16) & 0xFF; @@ -266,20 +311,17 @@ WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam) } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -static SDL_bool -WIN_ShouldIgnoreFocusClick() +static SDL_bool WIN_ShouldIgnoreFocusClick() { return !SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, SDL_FALSE); } -static void -WIN_CheckWParamMouseButton(SDL_bool bwParamMousePressed, Uint32 mouseFlags, SDL_bool bSwapButtons, SDL_WindowData *data, Uint8 button, SDL_MouseID mouseID) +static void WIN_CheckWParamMouseButton(SDL_bool bwParamMousePressed, Uint32 mouseFlags, SDL_bool bSwapButtons, SDL_WindowData *data, Uint8 button, SDL_MouseID mouseID) { if (bSwapButtons) { if (button == SDL_BUTTON_LEFT) { button = SDL_BUTTON_RIGHT; - } - else if (button == SDL_BUTTON_RIGHT) { + } else if (button == SDL_BUTTON_RIGHT) { button = SDL_BUTTON_LEFT; } } @@ -303,11 +345,10 @@ WIN_CheckWParamMouseButton(SDL_bool bwParamMousePressed, Uint32 mouseFlags, SDL_ } /* -* Some windows systems fail to send a WM_LBUTTONDOWN sometimes, but each mouse move contains the current button state also -* so this function reconciles our view of the world with the current buttons reported by windows -*/ -static void -WIN_CheckWParamMouseButtons(WPARAM wParam, SDL_WindowData *data, SDL_MouseID mouseID) + * Some windows systems fail to send a WM_LBUTTONDOWN sometimes, but each mouse move contains the current button state also + * so this function reconciles our view of the world with the current buttons reported by windows + */ +static void WIN_CheckWParamMouseButtons(WPARAM wParam, SDL_WindowData *data, SDL_MouseID mouseID) { if (wParam != data->mouse_button_flags) { Uint32 mouseFlags = SDL_GetMouseState(NULL, NULL); @@ -323,8 +364,7 @@ WIN_CheckWParamMouseButtons(WPARAM wParam, SDL_WindowData *data, SDL_MouseID mou } } -static void -WIN_CheckRawMouseButtons(ULONG rawButtons, SDL_WindowData *data, SDL_MouseID mouseID) +static void WIN_CheckRawMouseButtons(ULONG rawButtons, SDL_WindowData *data, SDL_MouseID mouseID) { // Add a flag to distinguish raw mouse buttons from wParam above rawButtons |= 0x8000000; @@ -332,32 +372,41 @@ WIN_CheckRawMouseButtons(ULONG rawButtons, SDL_WindowData *data, SDL_MouseID mou if (rawButtons != data->mouse_button_flags) { Uint32 mouseFlags = SDL_GetMouseState(NULL, NULL); SDL_bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0; - if ((rawButtons & RI_MOUSE_BUTTON_1_DOWN)) + if (rawButtons & RI_MOUSE_BUTTON_1_DOWN) { WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_1_DOWN), mouseFlags, swapButtons, data, SDL_BUTTON_LEFT, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_1_UP)) + } + if (rawButtons & RI_MOUSE_BUTTON_1_UP) { WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_1_UP), mouseFlags, swapButtons, data, SDL_BUTTON_LEFT, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_2_DOWN)) + } + if (rawButtons & RI_MOUSE_BUTTON_2_DOWN) { WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_2_DOWN), mouseFlags, swapButtons, data, SDL_BUTTON_RIGHT, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_2_UP)) + } + if (rawButtons & RI_MOUSE_BUTTON_2_UP) { WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_2_UP), mouseFlags, swapButtons, data, SDL_BUTTON_RIGHT, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_3_DOWN)) + } + if (rawButtons & RI_MOUSE_BUTTON_3_DOWN) { WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_3_DOWN), mouseFlags, swapButtons, data, SDL_BUTTON_MIDDLE, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_3_UP)) + } + if (rawButtons & RI_MOUSE_BUTTON_3_UP) { WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_3_UP), mouseFlags, swapButtons, data, SDL_BUTTON_MIDDLE, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_4_DOWN)) + } + if (rawButtons & RI_MOUSE_BUTTON_4_DOWN) { WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_4_DOWN), mouseFlags, swapButtons, data, SDL_BUTTON_X1, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_4_UP)) + } + if (rawButtons & RI_MOUSE_BUTTON_4_UP) { WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_4_UP), mouseFlags, swapButtons, data, SDL_BUTTON_X1, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_5_DOWN)) + } + if (rawButtons & RI_MOUSE_BUTTON_5_DOWN) { WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_5_DOWN), mouseFlags, swapButtons, data, SDL_BUTTON_X2, mouseID); - if ((rawButtons & RI_MOUSE_BUTTON_5_UP)) + } + if (rawButtons & RI_MOUSE_BUTTON_5_UP) { WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_5_UP), mouseFlags, swapButtons, data, SDL_BUTTON_X2, mouseID); + } data->mouse_button_flags = rawButtons; } } -static void -WIN_CheckAsyncMouseRelease(SDL_WindowData *data) +static void WIN_CheckAsyncMouseRelease(SDL_WindowData *data) { Uint32 mouseFlags; SHORT keyState; @@ -392,10 +441,9 @@ WIN_CheckAsyncMouseRelease(SDL_WindowData *data) data->mouse_button_flags = (WPARAM)-1; } -static void -WIN_UpdateFocus(SDL_Window *window, SDL_bool expect_focus) +static void WIN_UpdateFocus(SDL_Window *window, SDL_bool expect_focus) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; SDL_bool had_focus = (SDL_GetKeyboardFocus() == window) ? SDL_TRUE : SDL_FALSE; SDL_bool has_focus = (GetForegroundWindow() == hwnd) ? SDL_TRUE : SDL_FALSE; @@ -445,10 +493,10 @@ WIN_UpdateFocus(SDL_Window *window, SDL_bool expect_focus) */ WIN_CheckClipboardUpdate(data->videodata); - SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) != 0); - SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) != 0); - SDL_ToggleModState(KMOD_SCROLL, (GetKeyState(VK_SCROLL) & 0x0001) != 0); - + SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_SCROLL, (GetKeyState(VK_SCROLL) & 0x0001) ? SDL_TRUE : SDL_FALSE); + WIN_UpdateWindowICCProfile(data->window, SDL_TRUE); } else { RECT rect; @@ -472,26 +520,25 @@ WIN_UpdateFocus(SDL_Window *window, SDL_bool expect_focus) } #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ -static BOOL -WIN_ConvertUTF32toUTF8(UINT32 codepoint, char * text) +static BOOL WIN_ConvertUTF32toUTF8(UINT32 codepoint, char *text) { if (codepoint <= 0x7F) { - text[0] = (char) codepoint; + text[0] = (char)codepoint; text[1] = '\0'; } else if (codepoint <= 0x7FF) { - text[0] = 0xC0 | (char) ((codepoint >> 6) & 0x1F); - text[1] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xC0 | (char)((codepoint >> 6) & 0x1F); + text[1] = 0x80 | (char)(codepoint & 0x3F); text[2] = '\0'; } else if (codepoint <= 0xFFFF) { - text[0] = 0xE0 | (char) ((codepoint >> 12) & 0x0F); - text[1] = 0x80 | (char) ((codepoint >> 6) & 0x3F); - text[2] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xE0 | (char)((codepoint >> 12) & 0x0F); + text[1] = 0x80 | (char)((codepoint >> 6) & 0x3F); + text[2] = 0x80 | (char)(codepoint & 0x3F); text[3] = '\0'; } else if (codepoint <= 0x10FFFF) { - text[0] = 0xF0 | (char) ((codepoint >> 18) & 0x0F); - text[1] = 0x80 | (char) ((codepoint >> 12) & 0x3F); - text[2] = 0x80 | (char) ((codepoint >> 6) & 0x3F); - text[3] = 0x80 | (char) (codepoint & 0x3F); + text[0] = 0xF0 | (char)((codepoint >> 18) & 0x0F); + text[1] = 0x80 | (char)((codepoint >> 12) & 0x3F); + text[2] = 0x80 | (char)((codepoint >> 6) & 0x3F); + text[3] = 0x80 | (char)(codepoint & 0x3F); text[4] = '\0'; } else { return SDL_FALSE; @@ -499,25 +546,23 @@ WIN_ConvertUTF32toUTF8(UINT32 codepoint, char * text) return SDL_TRUE; } -static BOOL -WIN_ConvertUTF16toUTF8(UINT32 high_surrogate, UINT32 low_surrogate, char * text) +static BOOL WIN_ConvertUTF16toUTF8(UINT32 high_surrogate, UINT32 low_surrogate, char *text) { const UINT32 SURROGATE_OFFSET = 0x10000 - (0xD800 << 10) - 0xDC00; const UINT32 codepoint = (high_surrogate << 10) + low_surrogate + SURROGATE_OFFSET; return WIN_ConvertUTF32toUTF8(codepoint, text); } -static SDL_bool -ShouldGenerateWindowCloseOnAltF4(void) +static SDL_bool ShouldGenerateWindowCloseOnAltF4(void) { return !SDL_GetHintBoolean(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, SDL_FALSE); } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* We want to generate mouse events from mouse and pen, and touch events from touchscreens */ -#define MI_WP_SIGNATURE 0xFF515700 -#define MI_WP_SIGNATURE_MASK 0xFFFFFF00 -#define IsTouchEvent(dw) ((dw) & MI_WP_SIGNATURE_MASK) == MI_WP_SIGNATURE +#define MI_WP_SIGNATURE 0xFF515700 +#define MI_WP_SIGNATURE_MASK 0xFFFFFF00 +#define IsTouchEvent(dw) ((dw)&MI_WP_SIGNATURE_MASK) == MI_WP_SIGNATURE typedef enum { @@ -546,8 +591,7 @@ static SDL_MOUSE_EVENT_SOURCE GetMouseMessageSource() } #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ -static SDL_WindowData * -WIN_GetWindowDataFromHWND(HWND hwnd) +static SDL_WindowData *WIN_GetWindowDataFromHWND(HWND hwnd) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); SDL_Window *window; @@ -567,8 +611,8 @@ WIN_GetWindowDataFromHWND(HWND hwnd) LRESULT CALLBACK WIN_KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam) { - KBDLLHOOKSTRUCT* hookData = (KBDLLHOOKSTRUCT*)lParam; - SDL_VideoData* data = SDL_GetVideoDevice()->driverdata; + KBDLLHOOKSTRUCT *hookData = (KBDLLHOOKSTRUCT *)lParam; + SDL_VideoData *data = SDL_GetVideoDevice()->driverdata; SDL_Scancode scanCode; if (nCode < 0 || nCode != HC_ACTION) { @@ -650,12 +694,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Get the window data for the window */ data = WIN_GetWindowDataFromHWND(hwnd); #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - if (!data) { + if (data == NULL) { /* Fallback */ - data = (SDL_WindowData *) GetProp(hwnd, TEXT("SDL_WindowData")); + data = (SDL_WindowData *)GetProp(hwnd, TEXT("SDL_WindowData")); } #endif - if (!data) { + if (data == NULL) { return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam); } @@ -672,93 +716,88 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) #endif /* WMMSG_DEBUG */ #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata)) + if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata)) { return 0; + } #endif switch (msg) { case WM_SHOWWINDOW: - { - if (wParam) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); - } else { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0); - } + { + if (wParam) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); + } else { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0); } - break; + } break; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) case WM_NCACTIVATE: - { - /* Don't immediately clip the cursor in case we're clicking minimize/maximize buttons */ - data->skip_update_clipcursor = SDL_TRUE; + { + /* Don't immediately clip the cursor in case we're clicking minimize/maximize buttons */ + data->skip_update_clipcursor = SDL_TRUE; - /* Update the focus here, since it's possible to get WM_ACTIVATE and WM_SETFOCUS without - actually being the foreground window, but this appears to get called in all cases where - the global foreground window changes to and from this window. */ - WIN_UpdateFocus(data->window, !!wParam); - } - break; + /* Update the focus here, since it's possible to get WM_ACTIVATE and WM_SETFOCUS without + actually being the foreground window, but this appears to get called in all cases where + the global foreground window changes to and from this window. */ + WIN_UpdateFocus(data->window, !!wParam); + } break; case WM_ACTIVATE: - { - /* Update the focus in case we changed focus to a child window and then away from the application */ - WIN_UpdateFocus(data->window, !!LOWORD(wParam)); - } - break; + { + /* Update the focus in case we changed focus to a child window and then away from the application */ + WIN_UpdateFocus(data->window, !!LOWORD(wParam)); + } break; case WM_SETFOCUS: - { - /* Update the focus in case it's changing between top-level windows in the same application */ - WIN_UpdateFocus(data->window, SDL_TRUE); - } - break; + { + /* Update the focus in case it's changing between top-level windows in the same application */ + WIN_UpdateFocus(data->window, SDL_TRUE); + } break; case WM_KILLFOCUS: case WM_ENTERIDLE: - { - /* Update the focus in case it's changing between top-level windows in the same application */ - WIN_UpdateFocus(data->window, SDL_FALSE); - } - break; + { + /* Update the focus in case it's changing between top-level windows in the same application */ + WIN_UpdateFocus(data->window, SDL_FALSE); + } break; case WM_POINTERUPDATE: - { - data->last_pointer_update = lParam; - break; - } + { + data->last_pointer_update = lParam; + break; + } case WM_MOUSEMOVE: - { - SDL_Mouse *mouse = SDL_GetMouse(); + { + SDL_Mouse *mouse = SDL_GetMouse(); - if (!data->mouse_tracked) { - TRACKMOUSEEVENT trackMouseEvent; + if (!data->mouse_tracked) { + TRACKMOUSEEVENT trackMouseEvent; - trackMouseEvent.cbSize = sizeof(TRACKMOUSEEVENT); - trackMouseEvent.dwFlags = TME_LEAVE; - trackMouseEvent.hwndTrack = data->hwnd; + trackMouseEvent.cbSize = sizeof(TRACKMOUSEEVENT); + trackMouseEvent.dwFlags = TME_LEAVE; + trackMouseEvent.hwndTrack = data->hwnd; - if (TrackMouseEvent(&trackMouseEvent)) { - data->mouse_tracked = SDL_TRUE; - } + if (TrackMouseEvent(&trackMouseEvent)) { + data->mouse_tracked = SDL_TRUE; } + } - if (!mouse->relative_mode || mouse->relative_mode_warp) { - /* Only generate mouse events for real mouse */ - if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH && - lParam != data->last_pointer_update) { - int x = GET_X_LPARAM(lParam); - int y = GET_Y_LPARAM(lParam); + if (!mouse->relative_mode || mouse->relative_mode_warp) { + /* Only generate mouse events for real mouse */ + if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH && + lParam != data->last_pointer_update) { + int x = GET_X_LPARAM(lParam); + int y = GET_Y_LPARAM(lParam); - WIN_ClientPointToSDL(data->window, &x, &y); + WIN_ClientPointToSDL(data->window, &x, &y); - SDL_SendMouseMotion(data->window, 0, 0, x, y); - } + SDL_SendMouseMotion(data->window, 0, 0, x, y); } } - break; + } break; case WM_LBUTTONUP: case WM_RBUTTONUP: @@ -772,141 +811,139 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_MBUTTONDBLCLK: case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK: - { - SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse->relative_mode || mouse->relative_mode_warp) { - if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH && - lParam != data->last_pointer_update) { - WIN_CheckWParamMouseButtons(wParam, data, 0); - } + { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!mouse->relative_mode || mouse->relative_mode_warp) { + if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH && + lParam != data->last_pointer_update) { + WIN_CheckWParamMouseButtons(wParam, data, 0); } } - break; + } break; case WM_INPUT: - { - SDL_Mouse *mouse = SDL_GetMouse(); - HRAWINPUT hRawInput = (HRAWINPUT)lParam; - RAWINPUT inp; - UINT size = sizeof(inp); + { + SDL_Mouse *mouse = SDL_GetMouse(); + HRAWINPUT hRawInput = (HRAWINPUT)lParam; + RAWINPUT inp; + UINT size = sizeof(inp); - /* We only use raw mouse input in relative mode */ - if (!mouse->relative_mode || mouse->relative_mode_warp) { - break; - } + /* We only use raw mouse input in relative mode */ + if (!mouse->relative_mode || mouse->relative_mode_warp) { + break; + } - /* Relative mouse motion is delivered to the window with keyboard focus */ - if (data->window != SDL_GetKeyboardFocus()) { - break; - } + /* Relative mouse motion is delivered to the window with keyboard focus */ + if (data->window != SDL_GetKeyboardFocus()) { + break; + } - GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); + GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); - /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */ - if (inp.header.dwType == RIM_TYPEMOUSE) { - SDL_MouseID mouseID; - RAWMOUSE* rawmouse; - if (SDL_GetNumTouchDevices() > 0 && - (GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x82) == 0x82)) { - break; + /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */ + if (inp.header.dwType == RIM_TYPEMOUSE) { + SDL_MouseID mouseID; + RAWMOUSE *rawmouse; + if (SDL_GetNumTouchDevices() > 0 && + (GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x82) == 0x82)) { + break; + } + /* We do all of our mouse state checking against mouse ID 0 + * We would only use the actual hDevice if we were tracking + * all mouse motion independently, and never using mouse ID 0. + */ + mouseID = 0; /* (SDL_MouseID)(uintptr_t)inp.header.hDevice; */ + rawmouse = &inp.data.mouse; + + if ((rawmouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) { + SDL_SendMouseMotion(data->window, mouseID, 1, (int)rawmouse->lLastX, (int)rawmouse->lLastY); + } else if (rawmouse->lLastX || rawmouse->lLastY) { + /* This is absolute motion, either using a tablet or mouse over RDP + + Notes on how RDP appears to work, as of Windows 10 2004: + - SetCursorPos() calls are cached, with multiple calls coalesced into a single call that's sent to the RDP client. If the last call to SetCursorPos() has the same value as the last one that was sent to the client, it appears to be ignored and not sent. This means that we need to jitter the SetCursorPos() position slightly in order for the recentering to work correctly. + - User mouse motion is coalesced with SetCursorPos(), so the WM_INPUT positions we see will not necessarily match the positon we requested with SetCursorPos(). + - SetCursorPos() outside of the bounds of the focus window appears not to do anything. + - SetCursorPos() while the cursor is NULL doesn't do anything + + We handle this by creating a safe area within the application window, and when the mouse leaves that safe area, we warp back to the opposite side. Any single motion > 50% of the safe area is assumed to be a warp and ignored. + */ + SDL_bool remote_desktop = GetSystemMetrics(SM_REMOTESESSION) ? SDL_TRUE : SDL_FALSE; + SDL_bool virtual_desktop = (rawmouse->usFlags & MOUSE_VIRTUAL_DESKTOP) ? SDL_TRUE : SDL_FALSE; + SDL_bool normalized_coordinates = !(rawmouse->usFlags & 0x40) ? SDL_TRUE : SDL_FALSE; + int w = GetSystemMetrics(virtual_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN); + int h = GetSystemMetrics(virtual_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN); + int x = normalized_coordinates ? (int)(((float)rawmouse->lLastX / 65535.0f) * w) : (int)rawmouse->lLastX; + int y = normalized_coordinates ? (int)(((float)rawmouse->lLastY / 65535.0f) * h) : (int)rawmouse->lLastY; + int relX, relY; + + /* Calculate relative motion */ + if (data->last_raw_mouse_position.x == 0 && data->last_raw_mouse_position.y == 0) { + data->last_raw_mouse_position.x = x; + data->last_raw_mouse_position.y = y; } - /* We do all of our mouse state checking against mouse ID 0 - * We would only use the actual hDevice if we were tracking - * all mouse motion independently, and never using mouse ID 0. - */ - mouseID = 0; /* (SDL_MouseID)(uintptr_t)inp.header.hDevice; */ - rawmouse = &inp.data.mouse; - - if ((rawmouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) { - SDL_SendMouseMotion(data->window, mouseID, 1, (int)rawmouse->lLastX, (int)rawmouse->lLastY); - } else if (rawmouse->lLastX || rawmouse->lLastY) { - /* This is absolute motion, either using a tablet or mouse over RDP - - Notes on how RDP appears to work, as of Windows 10 2004: - - SetCursorPos() calls are cached, with multiple calls coalesced into a single call that's sent to the RDP client. If the last call to SetCursorPos() has the same value as the last one that was sent to the client, it appears to be ignored and not sent. This means that we need to jitter the SetCursorPos() position slightly in order for the recentering to work correctly. - - User mouse motion is coalesced with SetCursorPos(), so the WM_INPUT positions we see will not necessarily match the positon we requested with SetCursorPos(). - - SetCursorPos() outside of the bounds of the focus window appears not to do anything. - - SetCursorPos() while the cursor is NULL doesn't do anything - - We handle this by creating a safe area within the application window, and when the mouse leaves that safe area, we warp back to the opposite side. Any single motion > 50% of the safe area is assumed to be a warp and ignored. - */ - SDL_bool remote_desktop = GetSystemMetrics(SM_REMOTESESSION) ? SDL_TRUE : SDL_FALSE; - SDL_bool virtual_desktop = (rawmouse->usFlags & MOUSE_VIRTUAL_DESKTOP) ? SDL_TRUE : SDL_FALSE; - SDL_bool normalized_coordinates = ((rawmouse->usFlags & 0x40) == 0) ? SDL_TRUE : SDL_FALSE; - int w = GetSystemMetrics(virtual_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN); - int h = GetSystemMetrics(virtual_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN); - int x = normalized_coordinates ? (int)(((float)rawmouse->lLastX / 65535.0f) * w) : (int)rawmouse->lLastX; - int y = normalized_coordinates ? (int)(((float)rawmouse->lLastY / 65535.0f) * h) : (int)rawmouse->lLastY; - int relX, relY; - - /* Calculate relative motion */ - if (data->last_raw_mouse_position.x == 0 && data->last_raw_mouse_position.y == 0) { - data->last_raw_mouse_position.x = x; - data->last_raw_mouse_position.y = y; - } - relX = (int)(x - data->last_raw_mouse_position.x); - relY = (int)(y - data->last_raw_mouse_position.y); - - if (remote_desktop) { - if (!data->in_title_click && !data->focus_click_pending) { - static int wobble; - float floatX = (float)x / w; - float floatY = (float)y / h; - - /* See if the mouse is at the edge of the screen, or in the RDP title bar area */ - if (floatX <= 0.01f || floatX >= 0.99f || floatY <= 0.01f || floatY >= 0.99f || y < 32) { - /* Wobble the cursor position so it's not ignored if the last warp didn't have any effect */ - RECT rect = data->cursor_clipped_rect; - int warpX = rect.left + ((rect.right - rect.left) / 2) + wobble; - int warpY = rect.top + ((rect.bottom - rect.top) / 2); - - WIN_SetCursorPos(warpX, warpY); - - ++wobble; - if (wobble > 1) { - wobble = -1; - } - } else { - /* Send relative motion if we didn't warp last frame (had good position data) - We also sometimes get large deltas due to coalesced mouse motion and warping, - so ignore those. - */ - const int MAX_RELATIVE_MOTION = (h / 6); - if (SDL_abs(relX) < MAX_RELATIVE_MOTION && - SDL_abs(relY) < MAX_RELATIVE_MOTION) { - SDL_SendMouseMotion(data->window, mouseID, 1, relX, relY); - } + relX = x - data->last_raw_mouse_position.x; + relY = y - data->last_raw_mouse_position.y; + + if (remote_desktop) { + if (!data->in_title_click && !data->focus_click_pending) { + static int wobble; + float floatX = (float)x / w; + float floatY = (float)y / h; + + /* See if the mouse is at the edge of the screen, or in the RDP title bar area */ + if (floatX <= 0.01f || floatX >= 0.99f || floatY <= 0.01f || floatY >= 0.99f || y < 32) { + /* Wobble the cursor position so it's not ignored if the last warp didn't have any effect */ + RECT rect = data->cursor_clipped_rect; + int warpX = rect.left + ((rect.right - rect.left) / 2) + wobble; + int warpY = rect.top + ((rect.bottom - rect.top) / 2); + + WIN_SetCursorPos(warpX, warpY); + + ++wobble; + if (wobble > 1) { + wobble = -1; } - } - } else { - const int MAXIMUM_TABLET_RELATIVE_MOTION = 32; - if (SDL_abs(relX) > MAXIMUM_TABLET_RELATIVE_MOTION || - SDL_abs(relY) > MAXIMUM_TABLET_RELATIVE_MOTION) { - /* Ignore this motion, probably a pen lift and drop */ } else { - SDL_SendMouseMotion(data->window, mouseID, 1, relX, relY); + /* Send relative motion if we didn't warp last frame (had good position data) + We also sometimes get large deltas due to coalesced mouse motion and warping, + so ignore those. + */ + const int MAX_RELATIVE_MOTION = (h / 6); + if (SDL_abs(relX) < MAX_RELATIVE_MOTION && + SDL_abs(relY) < MAX_RELATIVE_MOTION) { + SDL_SendMouseMotion(data->window, mouseID, 1, relX, relY); + } } } - - data->last_raw_mouse_position.x = x; - data->last_raw_mouse_position.y = y; + } else { + const int MAXIMUM_TABLET_RELATIVE_MOTION = 32; + if (SDL_abs(relX) > MAXIMUM_TABLET_RELATIVE_MOTION || + SDL_abs(relY) > MAXIMUM_TABLET_RELATIVE_MOTION) { + /* Ignore this motion, probably a pen lift and drop */ + } else { + SDL_SendMouseMotion(data->window, mouseID, 1, relX, relY); + } } - WIN_CheckRawMouseButtons(rawmouse->usButtonFlags, data, mouseID); + + data->last_raw_mouse_position.x = x; + data->last_raw_mouse_position.y = y; } + WIN_CheckRawMouseButtons(rawmouse->usButtonFlags, data, mouseID); } - break; + } break; case WM_MOUSEWHEEL: case WM_MOUSEHWHEEL: - { - short amount = GET_WHEEL_DELTA_WPARAM(wParam); - float fAmount = (float) amount / WHEEL_DELTA; - if (msg == WM_MOUSEWHEEL) - SDL_SendMouseWheel(data->window, 0, 0.0f, fAmount, SDL_MOUSEWHEEL_NORMAL); - else - SDL_SendMouseWheel(data->window, 0, fAmount, 0.0f, SDL_MOUSEWHEEL_NORMAL); + { + short amount = GET_WHEEL_DELTA_WPARAM(wParam); + float fAmount = (float)amount / WHEEL_DELTA; + if (msg == WM_MOUSEWHEEL) { + SDL_SendMouseWheel(data->window, 0, 0.0f, fAmount, SDL_MOUSEWHEEL_NORMAL); + } else { + SDL_SendMouseWheel(data->window, 0, fAmount, 0.0f, SDL_MOUSEWHEEL_NORMAL); } - break; + } break; case WM_MOUSELEAVE: if (!(data->window->flags & SDL_WINDOW_MOUSE_CAPTURE)) { @@ -922,14 +959,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) mouse = SDL_GetMouse(); if (!mouse->was_touch_mouse_events) { /* we're not a touch handler causing a mouse leave? */ SDL_SendMouseMotion(data->window, 0, 0, point.x, point.y); - } else { /* touch handling? */ + } else { /* touch handling? */ mouse->was_touch_mouse_events = SDL_FALSE; /* not anymore */ - if (mouse->touch_mouse_events) { /* convert touch to mouse events */ + if (mouse->touch_mouse_events) { /* convert touch to mouse events */ SDL_SendMouseMotion(data->window, SDL_TOUCH_MOUSEID, 0, point.x, point.y); } else { /* normal handling */ SDL_SendMouseMotion(data->window, 0, 0, point.x, point.y); } - } + } } if (!SDL_GetMouse()->relative_mode) { @@ -947,40 +984,40 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_KEYDOWN: case WM_SYSKEYDOWN: - { - SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam); - const Uint8 *keyboardState = SDL_GetKeyboardState(NULL); - - /* Detect relevant keyboard shortcuts */ - if (keyboardState[SDL_SCANCODE_LALT] == SDL_PRESSED || keyboardState[SDL_SCANCODE_RALT] == SDL_PRESSED) { - /* ALT+F4: Close window */ - if (code == SDL_SCANCODE_F4 && ShouldGenerateWindowCloseOnAltF4()) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); - } + { + SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam); + const Uint8 *keyboardState = SDL_GetKeyboardState(NULL); + + /* Detect relevant keyboard shortcuts */ + if (keyboardState[SDL_SCANCODE_LALT] == SDL_PRESSED || keyboardState[SDL_SCANCODE_RALT] == SDL_PRESSED) { + /* ALT+F4: Close window */ + if (code == SDL_SCANCODE_F4 && ShouldGenerateWindowCloseOnAltF4()) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); } + } - if (code != SDL_SCANCODE_UNKNOWN) { - SDL_SendKeyboardKey(SDL_PRESSED, code); - } + if (code != SDL_SCANCODE_UNKNOWN) { + SDL_SendKeyboardKey(SDL_PRESSED, code); } + } returnCode = 0; break; case WM_SYSKEYUP: case WM_KEYUP: - { - SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam); - const Uint8 *keyboardState = SDL_GetKeyboardState(NULL); + { + SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam); + const Uint8 *keyboardState = SDL_GetKeyboardState(NULL); - if (code != SDL_SCANCODE_UNKNOWN) { - if (code == SDL_SCANCODE_PRINTSCREEN && - keyboardState[code] == SDL_RELEASED) { - SDL_SendKeyboardKey(SDL_PRESSED, code); - } - SDL_SendKeyboardKey(SDL_RELEASED, code); + if (code != SDL_SCANCODE_UNKNOWN) { + if (code == SDL_SCANCODE_PRINTSCREEN && + keyboardState[code] == SDL_RELEASED) { + SDL_SendKeyboardKey(SDL_PRESSED, code); } + SDL_SendKeyboardKey(SDL_RELEASED, code); } + } returnCode = 0; break; @@ -1028,133 +1065,131 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) #ifdef WM_INPUTLANGCHANGE case WM_INPUTLANGCHANGE: - { - WIN_UpdateKeymap(SDL_TRUE); - } + { + WIN_UpdateKeymap(SDL_TRUE); + } returnCode = 1; break; #endif /* WM_INPUTLANGCHANGE */ case WM_NCLBUTTONDOWN: - { - data->in_title_click = SDL_TRUE; - } - break; + { + data->in_title_click = SDL_TRUE; + } break; case WM_CAPTURECHANGED: - { - data->in_title_click = SDL_FALSE; + { + data->in_title_click = SDL_FALSE; - /* The mouse may have been released during a modal loop */ - WIN_CheckAsyncMouseRelease(data); - } - break; + /* The mouse may have been released during a modal loop */ + WIN_CheckAsyncMouseRelease(data); + } break; #ifdef WM_GETMINMAXINFO case WM_GETMINMAXINFO: - { - MINMAXINFO *info; - RECT size; - int x, y; - int w, h; - int min_w, min_h; - int max_w, max_h; - BOOL constrain_max_size; + { + MINMAXINFO *info; + RECT size; + int x, y; + int w, h; + int min_w, min_h; + int max_w, max_h; + BOOL constrain_max_size; + + if (SDL_IsShapedWindow(data->window)) { + Win32_ResizeWindowShape(data->window); + } - if (SDL_IsShapedWindow(data->window)) { - Win32_ResizeWindowShape(data->window); - } + /* If this is an expected size change, allow it */ + if (data->expected_resize) { + break; + } - /* If this is an expected size change, allow it */ - if (data->expected_resize) { - break; - } + /* Get the current position of our window */ + GetWindowRect(hwnd, &size); + x = size.left; + y = size.top; + + /* Calculate current size of our window */ + SDL_GetWindowSize(data->window, &w, &h); + SDL_GetWindowMinimumSize(data->window, &min_w, &min_h); + SDL_GetWindowMaximumSize(data->window, &max_w, &max_h); + + /* Convert w, h, min_w, min_h, max_w, max_h from dpi-scaled points to pixels, + treating them as coordinates within the client area. */ + WIN_ClientPointFromSDL(data->window, &w, &h); + WIN_ClientPointFromSDL(data->window, &min_w, &min_h); + WIN_ClientPointFromSDL(data->window, &max_w, &max_h); + + /* Store in min_w and min_h difference between current size and minimal + size so we don't need to call AdjustWindowRectEx twice */ + min_w -= w; + min_h -= h; + if (max_w && max_h) { + max_w -= w; + max_h -= h; + constrain_max_size = TRUE; + } else { + constrain_max_size = FALSE; + } + + if (!(SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS)) { + LONG style = GetWindowLong(hwnd, GWL_STYLE); + /* DJM - according to the docs for GetMenu(), the + return value is undefined if hwnd is a child window. + Apparently it's too difficult for MS to check + inside their function, so I have to do it here. + */ + BOOL menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL); + UINT dpi; - /* Get the current position of our window */ - GetWindowRect(hwnd, &size); - x = size.left; - y = size.top; - - /* Calculate current size of our window */ - SDL_GetWindowSize(data->window, &w, &h); - SDL_GetWindowMinimumSize(data->window, &min_w, &min_h); - SDL_GetWindowMaximumSize(data->window, &max_w, &max_h); - - /* Convert w, h, min_w, min_h, max_w, max_h from dpi-scaled points to pixels, - treating them as coordinates within the client area. */ - WIN_ClientPointFromSDL(data->window, &w, &h); - WIN_ClientPointFromSDL(data->window, &min_w, &min_h); - WIN_ClientPointFromSDL(data->window, &max_w, &max_h); - - /* Store in min_w and min_h difference between current size and minimal - size so we don't need to call AdjustWindowRectEx twice */ - min_w -= w; - min_h -= h; - if (max_w && max_h) { - max_w -= w; - max_h -= h; - constrain_max_size = TRUE; + dpi = 96; + size.top = 0; + size.left = 0; + size.bottom = h; + size.right = w; + + if (WIN_IsPerMonitorV2DPIAware(SDL_GetVideoDevice())) { + dpi = data->videodata->GetDpiForWindow(hwnd); + data->videodata->AdjustWindowRectExForDpi(&size, style, menu, 0, dpi); } else { - constrain_max_size = FALSE; + AdjustWindowRectEx(&size, style, menu, 0); } - - if (!(SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS)) { - LONG style = GetWindowLong(hwnd, GWL_STYLE); - /* DJM - according to the docs for GetMenu(), the - return value is undefined if hwnd is a child window. - Apparently it's too difficult for MS to check - inside their function, so I have to do it here. - */ - BOOL menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL); - UINT dpi; - - dpi = 96; - size.top = 0; - size.left = 0; - size.bottom = h; - size.right = w; - - if (WIN_IsPerMonitorV2DPIAware(SDL_GetVideoDevice())) { - dpi = data->videodata->GetDpiForWindow(hwnd); - data->videodata->AdjustWindowRectExForDpi(&size, style, menu, 0, dpi); - } else { - AdjustWindowRectEx(&size, style, menu, 0); - } - w = size.right - size.left; - h = size.bottom - size.top; + w = size.right - size.left; + h = size.bottom - size.top; #ifdef HIGHDPI_DEBUG - SDL_Log("WM_GETMINMAXINFO: max window size: %dx%d using dpi: %u", w, h, dpi); + SDL_Log("WM_GETMINMAXINFO: max window size: %dx%d using dpi: %u", w, h, dpi); #endif - } + } - /* Fix our size to the current size */ - info = (MINMAXINFO *) lParam; - if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE) { - if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS) { - int screenW = GetSystemMetrics(SM_CXSCREEN); - int screenH = GetSystemMetrics(SM_CYSCREEN); - info->ptMaxSize.x = SDL_max(w, screenW); - info->ptMaxSize.y = SDL_max(h, screenH); - info->ptMaxPosition.x = SDL_min(0, ((screenW - w) / 2)); - info->ptMaxPosition.y = SDL_min(0, ((screenH - h) / 2)); - } - info->ptMinTrackSize.x = w + min_w; - info->ptMinTrackSize.y = h + min_h; - if (constrain_max_size) { - info->ptMaxTrackSize.x = w + max_w; - info->ptMaxTrackSize.y = h + max_h; - } - } else { - info->ptMaxSize.x = w; - info->ptMaxSize.y = h; - info->ptMaxPosition.x = x; - info->ptMaxPosition.y = y; - info->ptMinTrackSize.x = w; - info->ptMinTrackSize.y = h; - info->ptMaxTrackSize.x = w; - info->ptMaxTrackSize.y = h; + /* Fix our size to the current size */ + info = (MINMAXINFO *)lParam; + if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE) { + if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS) { + int screenW = GetSystemMetrics(SM_CXSCREEN); + int screenH = GetSystemMetrics(SM_CYSCREEN); + info->ptMaxSize.x = SDL_max(w, screenW); + info->ptMaxSize.y = SDL_max(h, screenH); + info->ptMaxPosition.x = SDL_min(0, ((screenW - w) / 2)); + info->ptMaxPosition.y = SDL_min(0, ((screenH - h) / 2)); } + info->ptMinTrackSize.x = (LONG)w + min_w; + info->ptMinTrackSize.y = (LONG)h + min_h; + if (constrain_max_size) { + info->ptMaxTrackSize.x = (LONG)w + max_w; + info->ptMaxTrackSize.y = (LONG)h + max_h; + } + } else { + info->ptMaxSize.x = w; + info->ptMaxSize.y = h; + info->ptMaxPosition.x = x; + info->ptMaxPosition.y = y; + info->ptMinTrackSize.x = w; + info->ptMinTrackSize.y = h; + info->ptMaxTrackSize.x = w; + info->ptMaxTrackSize.y = h; } + } returnCode = 0; break; #endif /* WM_GETMINMAXINFO */ @@ -1167,112 +1202,108 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_WINDOWPOSCHANGED: - { - RECT rect; - int x, y; - int w, h; - int display_index = data->window->display_index; + { + RECT rect; + int x, y; + int w, h; + int display_index = data->window->display_index; - if (data->initializing || data->in_border_change) { - break; - } + if (data->initializing || data->in_border_change) { + break; + } - /* When the window is minimized it's resized to the dock icon size, ignore this */ - if (IsIconic(hwnd)) { - break; - } + /* When the window is minimized it's resized to the dock icon size, ignore this */ + if (IsIconic(hwnd)) { + break; + } - if (!GetClientRect(hwnd, &rect) || IsRectEmpty(&rect)) { - break; - } - ClientToScreen(hwnd, (LPPOINT) & rect); - ClientToScreen(hwnd, (LPPOINT) & rect + 1); + if (!GetClientRect(hwnd, &rect) || WIN_IsRectEmpty(&rect)) { + break; + } + ClientToScreen(hwnd, (LPPOINT)&rect); + ClientToScreen(hwnd, (LPPOINT)&rect + 1); - WIN_UpdateClipCursor(data->window); + WIN_UpdateClipCursor(data->window); - x = rect.left; - y = rect.top; - WIN_ScreenPointToSDL(&x, &y); + x = rect.left; + y = rect.top; + WIN_ScreenPointToSDL(&x, &y); - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, x, y); + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, x, y); - /* Convert client area width/height from pixels to dpi-scaled points */ - w = rect.right - rect.left; - h = rect.bottom - rect.top; - WIN_ClientPointToSDL(data->window, &w, &h); + /* Convert client area width/height from pixels to dpi-scaled points */ + w = rect.right - rect.left; + h = rect.bottom - rect.top; + WIN_ClientPointToSDL(data->window, &w, &h); - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w, h); + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w, h); #ifdef HIGHDPI_DEBUG - SDL_Log("WM_WINDOWPOSCHANGED: Windows client rect (pixels): (%d, %d) (%d x %d)\tSDL client rect (points): (%d, %d) (%d x %d) cached dpi %d, windows reported dpi %d", + SDL_Log("WM_WINDOWPOSCHANGED: Windows client rect (pixels): (%d, %d) (%d x %d)\tSDL client rect (points): (%d, %d) (%d x %d) cached dpi %d, windows reported dpi %d", rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, x, y, w, h, data->scaling_dpi, data->videodata->GetDpiForWindow ? data->videodata->GetDpiForWindow(data->hwnd) : 0); #endif - /* Forces a WM_PAINT event */ - InvalidateRect(hwnd, NULL, FALSE); + /* Forces a WM_PAINT event */ + InvalidateRect(hwnd, NULL, FALSE); - if (data->window->display_index != display_index) { - /* Display changed, check ICC profile */ - WIN_UpdateWindowICCProfile(data->window, SDL_TRUE); - } + if (data->window->display_index != display_index) { + /* Display changed, check ICC profile */ + WIN_UpdateWindowICCProfile(data->window, SDL_TRUE); } - break; + } break; case WM_SIZE: - { - switch (wParam) { - case SIZE_MAXIMIZED: - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_RESTORED, 0, 0); - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_MAXIMIZED, 0, 0); - break; - case SIZE_MINIMIZED: - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_MINIMIZED, 0, 0); - break; - case SIZE_RESTORED: - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_RESTORED, 0, 0); - break; - default: - break; - } + { + switch (wParam) { + case SIZE_MAXIMIZED: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_RESTORED, 0, 0); + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_MAXIMIZED, 0, 0); + break; + case SIZE_MINIMIZED: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_MINIMIZED, 0, 0); + break; + case SIZE_RESTORED: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_RESTORED, 0, 0); + break; + default: + break; } - break; + } break; case WM_SETCURSOR: - { - Uint16 hittest; - - hittest = LOWORD(lParam); - if (hittest == HTCLIENT) { - SetCursor(SDL_cursor); - returnCode = TRUE; - } else if (!g_WindowFrameUsableWhileCursorHidden && !SDL_cursor) { - SetCursor(NULL); - returnCode = TRUE; - } + { + Uint16 hittest; + + hittest = LOWORD(lParam); + if (hittest == HTCLIENT) { + SetCursor(SDL_cursor); + returnCode = TRUE; + } else if (!g_WindowFrameUsableWhileCursorHidden && !SDL_cursor) { + SetCursor(NULL); + returnCode = TRUE; } - break; + } break; /* We were occluded, refresh our display */ case WM_PAINT: - { - RECT rect; - if (GetUpdateRect(hwnd, &rect, FALSE)) { - ValidateRect(hwnd, NULL); - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0); - } + { + RECT rect; + if (GetUpdateRect(hwnd, &rect, FALSE)) { + ValidateRect(hwnd, NULL); + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0); } + } returnCode = 0; break; /* We'll do our own drawing, prevent flicker */ case WM_ERASEBKGND: - if (!data->videodata->cleared) - { + if (!data->videodata->cleared) { RECT client_rect; HBRUSH brush; data->videodata->cleared = SDL_TRUE; @@ -1281,30 +1312,31 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) FillRect(GetDC(hwnd), &client_rect, brush); DeleteObject(brush); } - return (1); + return 1; case WM_SYSCOMMAND: - { + { + if (!g_WindowsEnableMenuMnemonics) { if ((wParam & 0xFFF0) == SC_KEYMENU) { - return (0); + return 0; } + } #if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER) - /* Don't start the screensaver or blank the monitor in fullscreen apps */ - if ((wParam & 0xFFF0) == SC_SCREENSAVE || - (wParam & 0xFFF0) == SC_MONITORPOWER) { - if (SDL_GetVideoDevice()->suspend_screensaver) { - return (0); - } + /* Don't start the screensaver or blank the monitor in fullscreen apps */ + if ((wParam & 0xFFF0) == SC_SCREENSAVE || + (wParam & 0xFFF0) == SC_MONITORPOWER) { + if (SDL_GetVideoDevice()->suspend_screensaver) { + return 0; } -#endif /* System has screensaver support */ } - break; +#endif /* System has screensaver support */ + } break; case WM_CLOSE: - { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); - } + { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); + } returnCode = 0; break; @@ -1317,15 +1349,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) RECT rect; float x, y; - if (!GetClientRect(hwnd, &rect) || - (rect.right == rect.left && rect.bottom == rect.top)) { + if (!GetClientRect(hwnd, &rect) || WIN_IsRectEmpty(&rect)) { if (inputs) { SDL_small_free(inputs, isstack); } break; } - ClientToScreen(hwnd, (LPPOINT) & rect); - ClientToScreen(hwnd, (LPPOINT) & rect + 1); + ClientToScreen(hwnd, (LPPOINT)&rect); + ClientToScreen(hwnd, (LPPOINT)&rect + 1); rect.top *= 100; rect.left *= 100; rect.bottom *= 100; @@ -1344,8 +1375,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } /* Get the normalized coordinates for the window */ - x = (float)(input->x - rect.left)/(rect.right - rect.left); - y = (float)(input->y - rect.top)/(rect.bottom - rect.top); + x = (float)(input->x - rect.left) / (rect.right - rect.left); + y = (float)(input->y - rect.top) / (rect.bottom - rect.top); if (input->dwFlags & TOUCHEVENTF_DOWN) { SDL_SendTouch(touchId, input->dwID, data->window, SDL_TRUE, x, y, 1.0f); @@ -1372,106 +1403,111 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) * If we're handling our own touches, we don't want any gestures. * Not all of these settings are documented. * The use of the undocumented ones was suggested by https://github.com/bjarkeck/GCGJ/blob/master/Monogame/Windows/WinFormsGameForm.cs . */ - return TABLET_DISABLE_PRESSANDHOLD | /* disables press and hold (right-click) gesture */ - TABLET_DISABLE_PENTAPFEEDBACK | /* disables UI feedback on pen up (waves) */ - TABLET_DISABLE_PENBARRELFEEDBACK | /* disables UI feedback on pen button down (circle) */ - TABLET_DISABLE_TOUCHUIFORCEON | - TABLET_DISABLE_TOUCHUIFORCEOFF | - TABLET_DISABLE_TOUCHSWITCH | - TABLET_DISABLE_FLICKS | /* disables pen flicks (back, forward, drag down, drag up) */ - TABLET_DISABLE_SMOOTHSCROLLING | - TABLET_DISABLE_FLICKFALLBACKKEYS; + return TABLET_DISABLE_PRESSANDHOLD | TABLET_DISABLE_PENTAPFEEDBACK | TABLET_DISABLE_PENBARRELFEEDBACK | TABLET_DISABLE_TOUCHUIFORCEON | TABLET_DISABLE_TOUCHUIFORCEOFF | TABLET_DISABLE_TOUCHSWITCH | TABLET_DISABLE_FLICKS | TABLET_DISABLE_SMOOTHSCROLLING | TABLET_DISABLE_FLICKFALLBACKKEYS; /* disables press and hold (right-click) gesture */ + /* disables UI feedback on pen up (waves) */ + /* disables UI feedback on pen button down (circle) */ + /* disables pen flicks (back, forward, drag down, drag up) */ #endif /* HAVE_TPCSHRD_H */ case WM_DROPFILES: - { - UINT i; - HDROP drop = (HDROP) wParam; - UINT count = DragQueryFile(drop, 0xFFFFFFFF, NULL, 0); - for (i = 0; i < count; ++i) { - SDL_bool isstack; - UINT size = DragQueryFile(drop, i, NULL, 0) + 1; - LPTSTR buffer = SDL_small_alloc(TCHAR, size, &isstack); - if (buffer) { - if (DragQueryFile(drop, i, buffer, size)) { - char *file = WIN_StringToUTF8(buffer); - SDL_SendDropFile(data->window, file); - SDL_free(file); - } - SDL_small_free(buffer, isstack); + { + UINT i; + HDROP drop = (HDROP)wParam; + UINT count = DragQueryFile(drop, 0xFFFFFFFF, NULL, 0); + for (i = 0; i < count; ++i) { + SDL_bool isstack; + UINT size = DragQueryFile(drop, i, NULL, 0) + 1; + LPTSTR buffer = SDL_small_alloc(TCHAR, size, &isstack); + if (buffer) { + if (DragQueryFile(drop, i, buffer, size)) { + char *file = WIN_StringToUTF8(buffer); + SDL_SendDropFile(data->window, file); + SDL_free(file); } + SDL_small_free(buffer, isstack); } - SDL_SendDropComplete(data->window); - DragFinish(drop); - return 0; } - break; + SDL_SendDropComplete(data->window); + DragFinish(drop); + return 0; + } break; case WM_DISPLAYCHANGE: - { - // Reacquire displays if any were added or removed - WIN_RefreshDisplays(SDL_GetVideoDevice()); - } - break; + { + // Reacquire displays if any were added or removed + WIN_RefreshDisplays(SDL_GetVideoDevice()); + } break; case WM_NCCALCSIZE: - { - Uint32 window_flags = SDL_GetWindowFlags(data->window); - if (wParam == TRUE && (window_flags & SDL_WINDOW_BORDERLESS) && !(window_flags & SDL_WINDOW_FULLSCREEN)) { - /* When borderless, need to tell windows that the size of the non-client area is 0 */ - if (!(window_flags & SDL_WINDOW_RESIZABLE)) { - int w, h; - NCCALCSIZE_PARAMS *params = (NCCALCSIZE_PARAMS *)lParam; - w = data->window->windowed.w; - h = data->window->windowed.h; - WIN_ClientPointFromSDL(data->window, &w, &h); - params->rgrc[0].right = params->rgrc[0].left + w; - params->rgrc[0].bottom = params->rgrc[0].top + h; - } - return 0; + { + Uint32 window_flags = SDL_GetWindowFlags(data->window); + if (wParam == TRUE && (window_flags & SDL_WINDOW_BORDERLESS) && !(window_flags & SDL_WINDOW_FULLSCREEN)) { + /* When borderless, need to tell windows that the size of the non-client area is 0 */ + if (!(window_flags & SDL_WINDOW_RESIZABLE)) { + int w, h; + NCCALCSIZE_PARAMS *params = (NCCALCSIZE_PARAMS *)lParam; + w = data->window->windowed.w; + h = data->window->windowed.h; + WIN_ClientPointFromSDL(data->window, &w, &h); + params->rgrc[0].right = params->rgrc[0].left + w; + params->rgrc[0].bottom = params->rgrc[0].top + h; } + return 0; } - break; + } break; case WM_NCHITTEST: - { - SDL_Window *window = data->window; - if (window->hit_test) { - POINT winpoint; - winpoint.x = GET_X_LPARAM(lParam); - winpoint.y = GET_Y_LPARAM(lParam); - if (ScreenToClient(hwnd, &winpoint)) { - SDL_Point point; - SDL_HitTestResult rc; - point.x = winpoint.x; - point.y = winpoint.y; - WIN_ClientPointToSDL(data->window, &point.x, &point.y); - rc = window->hit_test(window, &point, window->hit_test_data); - switch (rc) { - #define POST_HIT_TEST(ret) { SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0); return ret; } - case SDL_HITTEST_DRAGGABLE: POST_HIT_TEST(HTCAPTION); - case SDL_HITTEST_RESIZE_TOPLEFT: POST_HIT_TEST(HTTOPLEFT); - case SDL_HITTEST_RESIZE_TOP: POST_HIT_TEST(HTTOP); - case SDL_HITTEST_RESIZE_TOPRIGHT: POST_HIT_TEST(HTTOPRIGHT); - case SDL_HITTEST_RESIZE_RIGHT: POST_HIT_TEST(HTRIGHT); - case SDL_HITTEST_RESIZE_BOTTOMRIGHT: POST_HIT_TEST(HTBOTTOMRIGHT); - case SDL_HITTEST_RESIZE_BOTTOM: POST_HIT_TEST(HTBOTTOM); - case SDL_HITTEST_RESIZE_BOTTOMLEFT: POST_HIT_TEST(HTBOTTOMLEFT); - case SDL_HITTEST_RESIZE_LEFT: POST_HIT_TEST(HTLEFT); - #undef POST_HIT_TEST - case SDL_HITTEST_NORMAL: return HTCLIENT; - } + { + SDL_Window *window = data->window; + if (window->hit_test) { + POINT winpoint; + winpoint.x = GET_X_LPARAM(lParam); + winpoint.y = GET_Y_LPARAM(lParam); + if (ScreenToClient(hwnd, &winpoint)) { + SDL_Point point; + SDL_HitTestResult rc; + point.x = winpoint.x; + point.y = winpoint.y; + WIN_ClientPointToSDL(data->window, &point.x, &point.y); + rc = window->hit_test(window, &point, window->hit_test_data); + switch (rc) { +#define POST_HIT_TEST(ret) \ + { \ + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0); \ + return ret; \ + } + case SDL_HITTEST_DRAGGABLE: + POST_HIT_TEST(HTCAPTION); + case SDL_HITTEST_RESIZE_TOPLEFT: + POST_HIT_TEST(HTTOPLEFT); + case SDL_HITTEST_RESIZE_TOP: + POST_HIT_TEST(HTTOP); + case SDL_HITTEST_RESIZE_TOPRIGHT: + POST_HIT_TEST(HTTOPRIGHT); + case SDL_HITTEST_RESIZE_RIGHT: + POST_HIT_TEST(HTRIGHT); + case SDL_HITTEST_RESIZE_BOTTOMRIGHT: + POST_HIT_TEST(HTBOTTOMRIGHT); + case SDL_HITTEST_RESIZE_BOTTOM: + POST_HIT_TEST(HTBOTTOM); + case SDL_HITTEST_RESIZE_BOTTOMLEFT: + POST_HIT_TEST(HTBOTTOMLEFT); + case SDL_HITTEST_RESIZE_LEFT: + POST_HIT_TEST(HTLEFT); +#undef POST_HIT_TEST + case SDL_HITTEST_NORMAL: + return HTCLIENT; } - /* If we didn't return, this will call DefWindowProc below. */ } + /* If we didn't return, this will call DefWindowProc below. */ } - break; + } break; case WM_GETDPISCALEDSIZE: /* Windows 10 Creators Update+ */ /* Documented as only being sent to windows that are per-monitor V2 DPI aware. - + Experimentation shows it's only sent during interactive dragging, not in response to SetWindowPos. */ if (data->videodata->GetDpiForWindow && data->videodata->AdjustWindowRectExForDpi) { @@ -1485,7 +1521,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) because Windows doesn't scale the non-client area (titlebar etc.) linearly. So, we need to handle this message to request custom scaling. */ - + const int nextDPI = (int)wParam; const int prevDPI = (int)data->videodata->GetDpiForWindow(hwnd); SIZE *sizeInOut = (SIZE *)lParam; @@ -1503,7 +1539,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Subtract the window frame size that would have been used at prevDPI */ { - RECT rect = {0}; + RECT rect = { 0 }; if (!(data->window->flags & SDL_WINDOW_BORDERLESS)) { data->videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, prevDPI); @@ -1516,7 +1552,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) query_client_h_win = sizeInOut->cy - frame_h; } - /* Convert to new dpi if we are using scaling. + /* Convert to new dpi if we are using scaling. * Otherwise leave as pixels. */ if (data->videodata->dpi_scaling_enabled) { @@ -1526,7 +1562,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Add the window frame size that would be used at nextDPI */ { - RECT rect = {0}; + RECT rect = { 0 }; rect.right = query_client_w_win; rect.bottom = query_client_h_win; @@ -1550,12 +1586,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Windows 8.1+ */ { const int newDPI = HIWORD(wParam); - RECT* const suggestedRect = (RECT*)lParam; + RECT *const suggestedRect = (RECT *)lParam; int w, h; #ifdef HIGHDPI_DEBUG SDL_Log("WM_DPICHANGED: to %d\tsuggested rect: (%d, %d), (%dx%d)\n", newDPI, - suggestedRect->left, suggestedRect->top, suggestedRect->right - suggestedRect->left, suggestedRect->bottom - suggestedRect->top); + suggestedRect->left, suggestedRect->top, suggestedRect->right - suggestedRect->left, suggestedRect->bottom - suggestedRect->top); #endif if (data->expected_resize) { @@ -1602,7 +1638,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) const DWORD style = GetWindowLong(hwnd, GWL_STYLE); const BOOL menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL); - RECT rect = {0}; + RECT rect = { 0 }; rect.right = data->window->w; rect.bottom = data->window->h; @@ -1619,21 +1655,21 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) w = rect.right - rect.left; h = rect.bottom - rect.top; } - + #ifdef HIGHDPI_DEBUG SDL_Log("WM_DPICHANGED: current SDL window size: (%dx%d)\tcalling SetWindowPos: (%d, %d), (%dx%d)\n", - data->window->w, data->window->h, - suggestedRect->left, suggestedRect->top, w, h); + data->window->w, data->window->h, + suggestedRect->left, suggestedRect->top, w, h); #endif data->expected_resize = SDL_TRUE; SetWindowPos(hwnd, - NULL, - suggestedRect->left, - suggestedRect->top, - w, - h, - SWP_NOZORDER | SWP_NOACTIVATE); + NULL, + suggestedRect->left, + suggestedRect->top, + w, + h, + SWP_NOZORDER | SWP_NOACTIVATE); data->expected_resize = SDL_FALSE; if (data->videodata->dpi_scaling_enabled) { @@ -1693,10 +1729,10 @@ static void WIN_UpdateClipCursorForWindows() static void WIN_UpdateMouseCapture() { - SDL_Window* focusWindow = SDL_GetKeyboardFocus(); + SDL_Window *focusWindow = SDL_GetKeyboardFocus(); if (focusWindow && (focusWindow->flags & SDL_WINDOW_MOUSE_CAPTURE)) { - SDL_WindowData *data = (SDL_WindowData *) focusWindow->driverdata; + SDL_WindowData *data = (SDL_WindowData *)focusWindow->driverdata; if (!data->mouse_tracked) { POINT cursorPos; @@ -1731,8 +1767,7 @@ void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata) g_WindowsMessageHookData = userdata; } -int -WIN_WaitEventTimeout(_THIS, int timeout) +int WIN_WaitEventTimeout(_THIS, int timeout) { MSG msg; if (g_WindowsEnableMessageLoop) { @@ -1767,15 +1802,13 @@ WIN_WaitEventTimeout(_THIS, int timeout) } } -void -WIN_SendWakeupEvent(_THIS, SDL_Window *window) +void WIN_SendWakeupEvent(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; PostMessage(data->hwnd, data->videodata->_SDL_WAKEUP, 0, 0); } -void -WIN_PumpEvents(_THIS) +void WIN_PumpEvents(_THIS) { MSG msg; DWORD end_ticks = GetTickCount() + 1; @@ -1839,7 +1872,7 @@ WIN_PumpEvents(_THIS) not grabbing the keyboard. Note: If we *are* grabbing the keyboard, GetKeyState() will return inaccurate results for VK_LWIN and VK_RWIN but we don't need it anyway. */ focusWindow = SDL_GetKeyboardFocus(); - if (!focusWindow || !(focusWindow->flags & SDL_WINDOW_KEYBOARD_GRABBED)) { + if (focusWindow == NULL || !(focusWindow->flags & SDL_WINDOW_KEYBOARD_GRABBED)) { if ((keystate[SDL_SCANCODE_LGUI] == SDL_PRESSED) && !(GetKeyState(VK_LWIN) & 0x8000)) { SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LGUI); } @@ -1860,7 +1893,6 @@ WIN_PumpEvents(_THIS) #endif } - static int app_registered = 0; LPTSTR SDL_Appname = NULL; Uint32 SDL_Appstyle = 0; @@ -1869,16 +1901,19 @@ HINSTANCE SDL_Instance = NULL; static void WIN_CleanRegisterApp(WNDCLASSEX wcex) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - if (wcex.hIcon) DestroyIcon(wcex.hIcon); - if (wcex.hIconSm) DestroyIcon(wcex.hIconSm); + if (wcex.hIcon) { + DestroyIcon(wcex.hIcon); + } + if (wcex.hIconSm) { + DestroyIcon(wcex.hIconSm); + } #endif SDL_free(SDL_Appname); SDL_Appname = NULL; } /* Register the class for this application */ -int -SDL_RegisterApp(const char *name, Uint32 style, void *hInst) +int SDL_RegisterApp(const char *name, Uint32 style, void *hInst) { WNDCLASSEX wcex; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -1889,10 +1924,10 @@ SDL_RegisterApp(const char *name, Uint32 style, void *hInst) /* Only do this once... */ if (app_registered) { ++app_registered; - return (0); + return 0; } SDL_assert(SDL_Appname == NULL); - if (!name) { + if (name == NULL) { name = "SDL_app"; #if defined(CS_BYTEALIGNCLIENT) || defined(CS_OWNDC) style = (CS_BYTEALIGNCLIENT | CS_OWNDC); @@ -1903,18 +1938,18 @@ SDL_RegisterApp(const char *name, Uint32 style, void *hInst) SDL_Instance = hInst ? hInst : GetModuleHandle(NULL); /* Register the application class */ - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.hCursor = NULL; - wcex.hIcon = NULL; - wcex.hIconSm = NULL; - wcex.lpszMenuName = NULL; - wcex.lpszClassName = SDL_Appname; - wcex.style = SDL_Appstyle; - wcex.hbrBackground = NULL; - wcex.lpfnWndProc = WIN_WindowProc; - wcex.hInstance = SDL_Instance; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.hCursor = NULL; + wcex.hIcon = NULL; + wcex.hIconSm = NULL; + wcex.lpszMenuName = NULL; + wcex.lpszClassName = SDL_Appname; + wcex.style = SDL_Appstyle; + wcex.hbrBackground = NULL; + wcex.lpfnWndProc = WIN_WindowProc; + wcex.hInstance = SDL_Instance; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) hint = SDL_GetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON); @@ -1942,8 +1977,7 @@ SDL_RegisterApp(const char *name, Uint32 style, void *hInst) } /* Unregisters the windowclass registered in SDL_RegisterApp above. */ -void -SDL_UnregisterApp() +void SDL_UnregisterApp() { WNDCLASSEX wcex; diff --git a/modules/SDL2/src/video/windows/SDL_windowsevents.h b/modules/SDL2/src/video/windows/SDL_windowsevents.h index 4dd7530..98a45ad 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsevents.h +++ b/modules/SDL2/src/video/windows/SDL_windowsevents.h @@ -32,7 +32,7 @@ extern LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); extern void WIN_PumpEvents(_THIS); extern void WIN_SendWakeupEvent(_THIS, SDL_Window *window); -extern int WIN_WaitEventTimeout(_THIS, int timeout); +extern int WIN_WaitEventTimeout(_THIS, int timeout); #endif /* SDL_windowsevents_h_ */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsframebuffer.c b/modules/SDL2/src/video/windows/SDL_windowsframebuffer.c index daa8c4a..8248352 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsframebuffer.c +++ b/modules/SDL2/src/video/windows/SDL_windowsframebuffer.c @@ -24,13 +24,16 @@ #include "SDL_windowsvideo.h" -int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) +int WIN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_bool isstack; size_t size; LPBITMAPINFO info; HBITMAP hbm; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); /* Free the old framebuffer surface */ if (data->mdc) { @@ -41,7 +44,7 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi } /* Find out the format of the screen */ - size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD); + size = sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD); info = (LPBITMAPINFO)SDL_small_alloc(Uint8, size, &isstack); if (!info) { return SDL_OutOfMemory(); @@ -62,11 +65,10 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi Uint32 *masks; bpp = info->bmiHeader.biPlanes * info->bmiHeader.biBitCount; - masks = (Uint32*)((Uint8*)info + info->bmiHeader.biSize); + masks = (Uint32 *)((Uint8 *)info + info->bmiHeader.biSize); *format = SDL_MasksToPixelFormatEnum(bpp, masks[0], masks[1], masks[2], 0); } - if (*format == SDL_PIXELFORMAT_UNKNOWN) - { + if (*format == SDL_PIXELFORMAT_UNKNOWN) { /* We'll use RGB format for now */ *format = SDL_PIXELFORMAT_RGB888; @@ -79,10 +81,10 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi } /* Fill in the size information */ - *pitch = (((window->w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); - info->bmiHeader.biWidth = window->w; - info->bmiHeader.biHeight = -window->h; /* negative for topdown bitmap */ - info->bmiHeader.biSizeImage = window->h * (*pitch); + *pitch = (((w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); + info->bmiHeader.biWidth = w; + info->bmiHeader.biHeight = -h; /* negative for topdown bitmap */ + info->bmiHeader.biSizeImage = (DWORD)h * (*pitch); data->mdc = CreateCompatibleDC(data->hdc); data->hbm = CreateDIBSection(data->hdc, info, DIB_RGB_COLORS, pixels, NULL, 0); @@ -96,9 +98,9 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi return 0; } -int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects) +int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; int i; for (i = 0; i < numrects; ++i) { @@ -108,11 +110,11 @@ int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rec return 0; } -void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; - if (!data) { + if (data == NULL) { /* The window wasn't fully initialized */ return; } diff --git a/modules/SDL2/src/video/windows/SDL_windowsframebuffer.h b/modules/SDL2/src/video/windows/SDL_windowsframebuffer.h index 648b00b..fa626b8 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsframebuffer.h +++ b/modules/SDL2/src/video/windows/SDL_windowsframebuffer.h @@ -20,8 +20,8 @@ */ #include "../../SDL_internal.h" -extern int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); -extern int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); -extern void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int WIN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch); +extern int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects); +extern void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window *window); /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/windows/SDL_windowskeyboard.c b/modules/SDL2/src/video/windows/SDL_windowskeyboard.c index 29fbaba..d4d2238 100644 --- a/modules/SDL2/src/video/windows/SDL_windowskeyboard.c +++ b/modules/SDL2/src/video/windows/SDL_windowskeyboard.c @@ -36,26 +36,24 @@ static void IME_Init(SDL_VideoData *videodata, HWND hwnd); static void IME_Enable(SDL_VideoData *videodata, HWND hwnd); static void IME_Disable(SDL_VideoData *videodata, HWND hwnd); static void IME_Quit(SDL_VideoData *videodata); -static void IME_ClearComposition(SDL_VideoData *videodata); -static SDL_bool IME_IsTextInputShown(SDL_VideoData* videodata); +static SDL_bool IME_IsTextInputShown(SDL_VideoData *videodata); #endif /* !SDL_DISABLE_WINDOWS_IME */ #ifndef MAPVK_VK_TO_VSC -#define MAPVK_VK_TO_VSC 0 +#define MAPVK_VK_TO_VSC 0 #endif #ifndef MAPVK_VSC_TO_VK -#define MAPVK_VSC_TO_VK 1 +#define MAPVK_VSC_TO_VK 1 #endif #ifndef MAPVK_VK_TO_CHAR -#define MAPVK_VK_TO_CHAR 2 +#define MAPVK_VK_TO_CHAR 2 #endif /* Alphabetic scancodes for PC keyboards */ -void -WIN_InitKeyboard(_THIS) +void WIN_InitKeyboard(_THIS) { #ifndef SDL_DISABLE_WINDOWS_IME - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; data->ime_com_initialized = SDL_FALSE; data->ime_threadmgr = 0; @@ -66,7 +64,7 @@ WIN_InitKeyboard(_THIS) data->ime_hwnd_current = 0; data->ime_himc = 0; data->ime_composition_length = 32 * sizeof(WCHAR); - data->ime_composition = (WCHAR*)SDL_malloc(data->ime_composition_length + sizeof(WCHAR)); + data->ime_composition = (WCHAR *)SDL_malloc(data->ime_composition_length + sizeof(WCHAR)); data->ime_composition[0] = 0; data->ime_readingstring[0] = 0; data->ime_cursor = 0; @@ -111,13 +109,12 @@ WIN_InitKeyboard(_THIS) SDL_SetScancodeName(SDL_SCANCODE_RGUI, "Right Windows"); /* Are system caps/num/scroll lock active? Set our state to match. */ - SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) != 0); - SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) != 0); - SDL_ToggleModState(KMOD_SCROLL, (GetKeyState(VK_SCROLL) & 0x0001) != 0); + SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_SCROLL, (GetKeyState(VK_SCROLL) & 0x0001) ? SDL_TRUE : SDL_FALSE); } -void -WIN_UpdateKeymap(SDL_bool send_event) +void WIN_UpdateKeymap(SDL_bool send_event) { int i; SDL_Scancode scancode; @@ -129,24 +126,22 @@ WIN_UpdateKeymap(SDL_bool send_event) int vk; /* Make sure this scancode is a valid character scancode */ scancode = windows_scancode_table[i]; - if (scancode == SDL_SCANCODE_UNKNOWN ) { + if (scancode == SDL_SCANCODE_UNKNOWN) { continue; } /* If this key is one of the non-mappable keys, ignore it */ - /* Not mapping numbers fixes the French layout, giving numeric keycodes for the number keys, which is the expected behavior */ - if ((keymap[scancode] & SDLK_SCANCODE_MASK) || - /* scancode == SDL_SCANCODE_GRAVE || */ /* Uncomment this line to re-enable the behavior of not mapping the "`"(grave) key to the users actual keyboard layout */ - (scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0) ) { + /* Uncomment the second part re-enable the behavior of not mapping the "`"(grave) key to the users actual keyboard layout */ + if ((keymap[scancode] & SDLK_SCANCODE_MASK) /*|| scancode == SDL_SCANCODE_GRAVE*/) { continue; } - vk = MapVirtualKey(i, MAPVK_VSC_TO_VK); - if ( vk ) { - int ch = (MapVirtualKey( vk, MAPVK_VK_TO_CHAR ) & 0x7FFF); - if ( ch ) { - if ( ch >= 'A' && ch <= 'Z' ) { - keymap[scancode] = SDLK_a + ( ch - 'A' ); + vk = MapVirtualKey(i, MAPVK_VSC_TO_VK); + if (vk) { + int ch = (MapVirtualKey(vk, MAPVK_VK_TO_CHAR) & 0x7FFF); + if (ch) { + if (ch >= 'A' && ch <= 'Z') { + keymap[scancode] = SDLK_a + (ch - 'A'); } else { keymap[scancode] = ch; } @@ -157,10 +152,9 @@ WIN_UpdateKeymap(SDL_bool send_event) SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES, send_event); } -void -WIN_QuitKeyboard(_THIS) +void WIN_QuitKeyboard(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; #ifndef SDL_DISABLE_WINDOWS_IME IME_Quit(data); @@ -172,11 +166,10 @@ WIN_QuitKeyboard(_THIS) #endif /* !SDL_DISABLE_WINDOWS_IME */ } -void -WIN_ResetDeadKeys() +void WIN_ResetDeadKeys() { /* - if a deadkey has been typed, but not the next character (which the deadkey might modify), + if a deadkey has been typed, but not the next character (which the deadkey might modify), this tries to undo the effect pressing the deadkey. see: http://archives.miloush.net/michkap/archive/2006/09/10/748775.html */ @@ -202,8 +195,7 @@ WIN_ResetDeadKeys() } } -void -WIN_StartTextInput(_THIS) +void WIN_StartTextInput(_THIS) { #ifndef SDL_DISABLE_WINDOWS_IME SDL_Window *window; @@ -214,7 +206,7 @@ WIN_StartTextInput(_THIS) #ifndef SDL_DISABLE_WINDOWS_IME window = SDL_GetKeyboardFocus(); if (window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_GetWindowSize(window, &videodata->ime_winwidth, &videodata->ime_winheight); IME_Init(videodata, hwnd); @@ -223,8 +215,7 @@ WIN_StartTextInput(_THIS) #endif /* !SDL_DISABLE_WINDOWS_IME */ } -void -WIN_StopTextInput(_THIS) +void WIN_StopTextInput(_THIS) { #ifndef SDL_DISABLE_WINDOWS_IME SDL_Window *window; @@ -235,7 +226,7 @@ WIN_StopTextInput(_THIS) #ifndef SDL_DISABLE_WINDOWS_IME window = SDL_GetKeyboardFocus(); if (window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; IME_Init(videodata, hwnd); IME_Disable(videodata, hwnd); @@ -243,13 +234,12 @@ WIN_StopTextInput(_THIS) #endif /* !SDL_DISABLE_WINDOWS_IME */ } -void -WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) +void WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; HIMC himc = 0; - if (!rect) { + if (rect == NULL) { SDL_InvalidParamError("rect"); return; } @@ -258,8 +248,7 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) videodata->ime_rect = *rect; himc = ImmGetContext(videodata->ime_hwnd_current); - if (himc) - { + if (himc) { COMPOSITIONFORM cof; CANDIDATEFORM caf; @@ -267,9 +256,9 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) cof.ptCurrentPos.x = videodata->ime_rect.x; cof.ptCurrentPos.y = videodata->ime_rect.y; cof.rcArea.left = videodata->ime_rect.x; - cof.rcArea.right = videodata->ime_rect.x + videodata->ime_rect.w; + cof.rcArea.right = (LONG)videodata->ime_rect.x + videodata->ime_rect.w; cof.rcArea.top = videodata->ime_rect.y; - cof.rcArea.bottom = videodata->ime_rect.y + videodata->ime_rect.h; + cof.rcArea.bottom = (LONG)videodata->ime_rect.y + videodata->ime_rect.h; ImmSetCompositionWindow(himc, &cof); caf.dwIndex = 0; @@ -277,9 +266,9 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) caf.ptCurrentPos.x = videodata->ime_rect.x; caf.ptCurrentPos.y = videodata->ime_rect.y; caf.rcArea.left = videodata->ime_rect.x; - caf.rcArea.right = videodata->ime_rect.x + videodata->ime_rect.w; + caf.rcArea.right = (LONG)videodata->ime_rect.x + videodata->ime_rect.w; caf.rcArea.top = videodata->ime_rect.y; - caf.rcArea.bottom = videodata->ime_rect.y + videodata->ime_rect.h; + caf.rcArea.bottom = (LONG)videodata->ime_rect.y + videodata->ime_rect.h; ImmSetCandidateWindow(himc, &caf); ImmReleaseContext(videodata->ime_hwnd_current, himc); @@ -287,7 +276,6 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect) #endif /* !SDL_DISABLE_WINDOWS_IME */ } - #ifdef SDL_DISABLE_WINDOWS_IME void WIN_ClearComposition(_THIS) @@ -299,8 +287,7 @@ SDL_bool WIN_IsTextInputShown(_THIS) return SDL_FALSE; } -SDL_bool -IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata) +SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata) { return SDL_FALSE; } @@ -318,58 +305,58 @@ void IME_Present(SDL_VideoData *videodata) #endif #ifdef USE_INIT_GUID #undef DEFINE_GUID -#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} -DEFINE_GUID(IID_ITfInputProcessorProfileActivationSink, 0x71C6E74E,0x0F28,0x11D8,0xA8,0x2A,0x00,0x06,0x5B,0x84,0x43,0x5C); -DEFINE_GUID(IID_ITfUIElementSink, 0xEA1EA136,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C); -DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745C63,0xB2F0,0x4784,0x8B,0x67,0x5E,0x12,0xC8,0x70,0x1A,0x31); -DEFINE_GUID(IID_ITfSource, 0x4EA48A35,0x60AE,0x446F,0x8F,0xD6,0xE6,0xA8,0xD8,0x24,0x59,0xF7); -DEFINE_GUID(IID_ITfUIElementMgr, 0xEA1EA135,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C); -DEFINE_GUID(IID_ITfCandidateListUIElement, 0xEA1EA138,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C); -DEFINE_GUID(IID_ITfReadingInformationUIElement, 0xEA1EA139,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C); -DEFINE_GUID(IID_ITfThreadMgr, 0xAA80E801,0x2021,0x11D2,0x93,0xE0,0x00,0x60,0xB0,0x67,0xB8,0x6E); -DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529A9E6B,0x6587,0x4F23,0xAB,0x9E,0x9C,0x7D,0x68,0x3E,0x3C,0x50); -DEFINE_GUID(IID_ITfThreadMgrEx, 0x3E90ADE3,0x7594,0x4CB0,0xBB,0x58,0x69,0x62,0x8F,0x5F,0x45,0x8C); +#define DEFINE_GUID(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } +DEFINE_GUID(IID_ITfInputProcessorProfileActivationSink, 0x71C6E74E, 0x0F28, 0x11D8, 0xA8, 0x2A, 0x00, 0x06, 0x5B, 0x84, 0x43, 0x5C); +DEFINE_GUID(IID_ITfUIElementSink, 0xEA1EA136, 0x19DF, 0x11D7, 0xA6, 0xD2, 0x00, 0x06, 0x5B, 0x84, 0x43, 0x5C); +DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745C63, 0xB2F0, 0x4784, 0x8B, 0x67, 0x5E, 0x12, 0xC8, 0x70, 0x1A, 0x31); +DEFINE_GUID(IID_ITfSource, 0x4EA48A35, 0x60AE, 0x446F, 0x8F, 0xD6, 0xE6, 0xA8, 0xD8, 0x24, 0x59, 0xF7); +DEFINE_GUID(IID_ITfUIElementMgr, 0xEA1EA135, 0x19DF, 0x11D7, 0xA6, 0xD2, 0x00, 0x06, 0x5B, 0x84, 0x43, 0x5C); +DEFINE_GUID(IID_ITfCandidateListUIElement, 0xEA1EA138, 0x19DF, 0x11D7, 0xA6, 0xD2, 0x00, 0x06, 0x5B, 0x84, 0x43, 0x5C); +DEFINE_GUID(IID_ITfReadingInformationUIElement, 0xEA1EA139, 0x19DF, 0x11D7, 0xA6, 0xD2, 0x00, 0x06, 0x5B, 0x84, 0x43, 0x5C); +DEFINE_GUID(IID_ITfThreadMgr, 0xAA80E801, 0x2021, 0x11D2, 0x93, 0xE0, 0x00, 0x60, 0xB0, 0x67, 0xB8, 0x6E); +DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529A9E6B, 0x6587, 0x4F23, 0xAB, 0x9E, 0x9C, 0x7D, 0x68, 0x3E, 0x3C, 0x50); +DEFINE_GUID(IID_ITfThreadMgrEx, 0x3E90ADE3, 0x7594, 0x4CB0, 0xBB, 0x58, 0x69, 0x62, 0x8F, 0x5F, 0x45, 0x8C); #endif #define LANG_CHT MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL) #define LANG_CHS MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED) -#define MAKEIMEVERSION(major,minor) ((DWORD) (((BYTE)(major) << 24) | ((BYTE)(minor) << 16) )) -#define IMEID_VER(id) ((id) & 0xffff0000) -#define IMEID_LANG(id) ((id) & 0x0000ffff) - -#define CHT_HKL_DAYI ((HKL)(UINT_PTR)0xE0060404) -#define CHT_HKL_NEW_PHONETIC ((HKL)(UINT_PTR)0xE0080404) -#define CHT_HKL_NEW_CHANG_JIE ((HKL)(UINT_PTR)0xE0090404) -#define CHT_HKL_NEW_QUICK ((HKL)(UINT_PTR)0xE00A0404) -#define CHT_HKL_HK_CANTONESE ((HKL)(UINT_PTR)0xE00B0404) -#define CHT_IMEFILENAME1 "TINTLGNT.IME" -#define CHT_IMEFILENAME2 "CINTLGNT.IME" -#define CHT_IMEFILENAME3 "MSTCIPHA.IME" -#define IMEID_CHT_VER42 (LANG_CHT | MAKEIMEVERSION(4, 2)) -#define IMEID_CHT_VER43 (LANG_CHT | MAKEIMEVERSION(4, 3)) -#define IMEID_CHT_VER44 (LANG_CHT | MAKEIMEVERSION(4, 4)) -#define IMEID_CHT_VER50 (LANG_CHT | MAKEIMEVERSION(5, 0)) -#define IMEID_CHT_VER51 (LANG_CHT | MAKEIMEVERSION(5, 1)) -#define IMEID_CHT_VER52 (LANG_CHT | MAKEIMEVERSION(5, 2)) -#define IMEID_CHT_VER60 (LANG_CHT | MAKEIMEVERSION(6, 0)) -#define IMEID_CHT_VER_VISTA (LANG_CHT | MAKEIMEVERSION(7, 0)) - -#define CHS_HKL ((HKL)(UINT_PTR)0xE00E0804) -#define CHS_IMEFILENAME1 "PINTLGNT.IME" -#define CHS_IMEFILENAME2 "MSSCIPYA.IME" -#define IMEID_CHS_VER41 (LANG_CHS | MAKEIMEVERSION(4, 1)) -#define IMEID_CHS_VER42 (LANG_CHS | MAKEIMEVERSION(4, 2)) -#define IMEID_CHS_VER53 (LANG_CHS | MAKEIMEVERSION(5, 3)) - -#define LANG() LOWORD((videodata->ime_hkl)) -#define PRIMLANG() ((WORD)PRIMARYLANGID(LANG())) -#define SUBLANG() SUBLANGID(LANG()) +#define MAKEIMEVERSION(major, minor) ((DWORD)(((BYTE)(major) << 24) | ((BYTE)(minor) << 16))) +#define IMEID_VER(id) ((id)&0xffff0000) +#define IMEID_LANG(id) ((id)&0x0000ffff) + +#define CHT_HKL_DAYI ((HKL)(UINT_PTR)0xE0060404) +#define CHT_HKL_NEW_PHONETIC ((HKL)(UINT_PTR)0xE0080404) +#define CHT_HKL_NEW_CHANG_JIE ((HKL)(UINT_PTR)0xE0090404) +#define CHT_HKL_NEW_QUICK ((HKL)(UINT_PTR)0xE00A0404) +#define CHT_HKL_HK_CANTONESE ((HKL)(UINT_PTR)0xE00B0404) +#define CHT_IMEFILENAME1 "TINTLGNT.IME" +#define CHT_IMEFILENAME2 "CINTLGNT.IME" +#define CHT_IMEFILENAME3 "MSTCIPHA.IME" +#define IMEID_CHT_VER42 (LANG_CHT | MAKEIMEVERSION(4, 2)) +#define IMEID_CHT_VER43 (LANG_CHT | MAKEIMEVERSION(4, 3)) +#define IMEID_CHT_VER44 (LANG_CHT | MAKEIMEVERSION(4, 4)) +#define IMEID_CHT_VER50 (LANG_CHT | MAKEIMEVERSION(5, 0)) +#define IMEID_CHT_VER51 (LANG_CHT | MAKEIMEVERSION(5, 1)) +#define IMEID_CHT_VER52 (LANG_CHT | MAKEIMEVERSION(5, 2)) +#define IMEID_CHT_VER60 (LANG_CHT | MAKEIMEVERSION(6, 0)) +#define IMEID_CHT_VER_VISTA (LANG_CHT | MAKEIMEVERSION(7, 0)) + +#define CHS_HKL ((HKL)(UINT_PTR)0xE00E0804) +#define CHS_IMEFILENAME1 "PINTLGNT.IME" +#define CHS_IMEFILENAME2 "MSSCIPYA.IME" +#define IMEID_CHS_VER41 (LANG_CHS | MAKEIMEVERSION(4, 1)) +#define IMEID_CHS_VER42 (LANG_CHS | MAKEIMEVERSION(4, 2)) +#define IMEID_CHS_VER53 (LANG_CHS | MAKEIMEVERSION(5, 3)) + +#define LANG() LOWORD((videodata->ime_hkl)) +#define PRIMLANG() ((WORD)PRIMARYLANGID(LANG())) +#define SUBLANG() SUBLANGID(LANG()) static void IME_UpdateInputLocale(SDL_VideoData *videodata); static int IME_ShowCandidateList(SDL_VideoData *videodata); static void IME_ClearComposition(SDL_VideoData *videodata); -static void IME_SetWindow(SDL_VideoData* videodata, HWND hwnd); +static void IME_SetWindow(SDL_VideoData *videodata, HWND hwnd); static void IME_SetupAPI(SDL_VideoData *videodata); static DWORD IME_GetId(SDL_VideoData *videodata, UINT uIndex); static void IME_SendEditingEvent(SDL_VideoData *videodata); @@ -380,19 +367,18 @@ static void UILess_ReleaseSinks(SDL_VideoData *videodata); static void UILess_EnableUIUpdates(SDL_VideoData *videodata); static void UILess_DisableUIUpdates(SDL_VideoData *videodata); -static SDL_bool -WIN_ShouldShowNativeUI() +static SDL_bool WIN_ShouldShowNativeUI() { return SDL_GetHintBoolean(SDL_HINT_IME_SHOW_UI, SDL_FALSE); } -static void -IME_Init(SDL_VideoData *videodata, HWND hwnd) +static void IME_Init(SDL_VideoData *videodata, HWND hwnd) { HRESULT hResult = S_OK; - if (videodata->ime_initialized) + if (videodata->ime_initialized) { return; + } videodata->ime_hwnd_main = hwnd; if (SUCCEEDED(WIN_CoInitialize())) { @@ -411,10 +397,12 @@ IME_Init(SDL_VideoData *videodata, HWND hwnd) SDL_ClearError(); return; } + /* *INDENT-OFF* */ /* clang-format off */ videodata->ImmLockIMC = (LPINPUTCONTEXT2 (WINAPI *)(HIMC))SDL_LoadFunction(videodata->ime_himm32, "ImmLockIMC"); videodata->ImmUnlockIMC = (BOOL (WINAPI *)(HIMC))SDL_LoadFunction(videodata->ime_himm32, "ImmUnlockIMC"); videodata->ImmLockIMCC = (LPVOID (WINAPI *)(HIMCC))SDL_LoadFunction(videodata->ime_himm32, "ImmLockIMCC"); videodata->ImmUnlockIMCC = (BOOL (WINAPI *)(HIMCC))SDL_LoadFunction(videodata->ime_himm32, "ImmUnlockIMCC"); + /* *INDENT-ON* */ /* clang-format on */ IME_SetWindow(videodata, hwnd); videodata->ime_himc = ImmGetContext(hwnd); @@ -427,55 +415,59 @@ IME_Init(SDL_VideoData *videodata, HWND hwnd) videodata->ime_available = SDL_TRUE; IME_UpdateInputLocale(videodata); IME_SetupAPI(videodata); - if (WIN_ShouldShowNativeUI()) + if (WIN_ShouldShowNativeUI()) { videodata->ime_uiless = SDL_FALSE; - else + } else { videodata->ime_uiless = UILess_SetupSinks(videodata); + } IME_UpdateInputLocale(videodata); IME_Disable(videodata, hwnd); } -static void -IME_Enable(SDL_VideoData *videodata, HWND hwnd) +static void IME_Enable(SDL_VideoData *videodata, HWND hwnd) { - if (!videodata->ime_initialized || !videodata->ime_hwnd_current) + if (!videodata->ime_initialized || !videodata->ime_hwnd_current) { return; + } if (!videodata->ime_available) { IME_Disable(videodata, hwnd); return; } - if (videodata->ime_hwnd_current == videodata->ime_hwnd_main) + if (videodata->ime_hwnd_current == videodata->ime_hwnd_main) { ImmAssociateContext(videodata->ime_hwnd_current, videodata->ime_himc); + } videodata->ime_enabled = SDL_TRUE; IME_UpdateInputLocale(videodata); UILess_EnableUIUpdates(videodata); } -static void -IME_Disable(SDL_VideoData *videodata, HWND hwnd) +static void IME_Disable(SDL_VideoData *videodata, HWND hwnd) { - if (!videodata->ime_initialized || !videodata->ime_hwnd_current) + if (!videodata->ime_initialized || !videodata->ime_hwnd_current) { return; + } IME_ClearComposition(videodata); - if (videodata->ime_hwnd_current == videodata->ime_hwnd_main) + if (videodata->ime_hwnd_current == videodata->ime_hwnd_main) { ImmAssociateContext(videodata->ime_hwnd_current, (HIMC)0); + } videodata->ime_enabled = SDL_FALSE; UILess_DisableUIUpdates(videodata); } -static void -IME_Quit(SDL_VideoData *videodata) +static void IME_Quit(SDL_VideoData *videodata) { - if (!videodata->ime_initialized) + if (!videodata->ime_initialized) { return; + } UILess_ReleaseSinks(videodata); - if (videodata->ime_hwnd_main) + if (videodata->ime_hwnd_main) { ImmAssociateContext(videodata->ime_hwnd_main, videodata->ime_himc); + } videodata->ime_hwnd_main = 0; videodata->ime_himc = 0; @@ -495,8 +487,7 @@ IME_Quit(SDL_VideoData *videodata) videodata->ime_initialized = SDL_FALSE; } -static void -IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd) +static void IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd) { DWORD id = 0; HIMC himc = 0; @@ -507,77 +498,83 @@ IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd) BOOL vertical = FALSE; UINT maxuilen = 0; - if (videodata->ime_uiless) + if (videodata->ime_uiless) { return; + } videodata->ime_readingstring[0] = 0; - + id = IME_GetId(videodata, 0); - if (!id) + if (!id) { return; + } himc = ImmGetContext(hwnd); - if (!himc) + if (!himc) { return; + } if (videodata->GetReadingString) { len = videodata->GetReadingString(himc, 0, 0, &err, &vertical, &maxuilen); if (len) { - if (len > SDL_arraysize(buffer)) + if (len > SDL_arraysize(buffer)) { len = SDL_arraysize(buffer); + } len = videodata->GetReadingString(himc, len, s, &err, &vertical, &maxuilen); } SDL_wcslcpy(videodata->ime_readingstring, s, len); - } - else { + } else { LPINPUTCONTEXT2 lpimc = videodata->ImmLockIMC(himc); LPBYTE p = 0; s = 0; - switch (id) - { + switch (id) { case IMEID_CHT_VER42: case IMEID_CHT_VER43: case IMEID_CHT_VER44: p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 24); - if (!p) + if (!p) { break; + } - len = *(DWORD *)(p + 7*4 + 32*4); + len = *(DWORD *)(p + 7 * 4 + 32 * 4); s = (WCHAR *)(p + 56); break; case IMEID_CHT_VER51: case IMEID_CHT_VER52: case IMEID_CHS_VER53: p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 4); - if (!p) + if (!p) { break; + } - p = *(LPBYTE *)((LPBYTE)p + 1*4 + 5*4); - if (!p) + p = *(LPBYTE *)(p + 1 * 4 + 5 * 4); + if (!p) { break; + } - len = *(DWORD *)(p + 1*4 + (16*2+2*4) + 5*4 + 16*2); - s = (WCHAR *)(p + 1*4 + (16*2+2*4) + 5*4); + len = *(DWORD *)(p + 1 * 4 + (16 * 2 + 2 * 4) + 5 * 4 + 16 * 2); + s = (WCHAR *)(p + 1 * 4 + (16 * 2 + 2 * 4) + 5 * 4); break; case IMEID_CHS_VER41: - { - int offset = (IME_GetId(videodata, 1) >= 0x00000002) ? 8 : 7; - p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + offset * 4); - if (!p) - break; - - len = *(DWORD *)(p + 7*4 + 16*2*4); - s = (WCHAR *)(p + 6*4 + 16*2*1); + { + int offset = (IME_GetId(videodata, 1) >= 0x00000002) ? 8 : 7; + p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + offset * 4); + if (!p) { + break; } - break; + + len = *(DWORD *)(p + 7 * 4 + 16 * 2 * 4); + s = (WCHAR *)(p + 6 * 4 + 16 * 2 * 1); + } break; case IMEID_CHS_VER42: - p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1*4 + 1*4 + 6*4); - if (!p) + p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1 * 4 + 1 * 4 + 6 * 4); + if (!p) { break; + } - len = *(DWORD *)(p + 1*4 + (16*2+2*4) + 5*4 + 16*2); - s = (WCHAR *)(p + 1*4 + (16*2+2*4) + 5*4); + len = *(DWORD *)(p + 1 * 4 + (16 * 2 + 2 * 4) + 5 * 4 + 16 * 2); + s = (WCHAR *)(p + 1 * 4 + (16 * 2 + 2 * 4) + 5 * 4); break; } if (s) { @@ -592,13 +589,13 @@ IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd) IME_SendEditingEvent(videodata); } -static void -IME_InputLangChanged(SDL_VideoData *videodata) +static void IME_InputLangChanged(SDL_VideoData *videodata) { UINT lang = PRIMLANG(); IME_UpdateInputLocale(videodata); - if (!videodata->ime_uiless) + if (!videodata->ime_uiless) { videodata->ime_candlistindexbase = (videodata->ime_hkl == CHT_HKL_DAYI) ? 0 : 1; + } IME_SetupAPI(videodata); if (lang != PRIMLANG()) { @@ -606,11 +603,10 @@ IME_InputLangChanged(SDL_VideoData *videodata) } } -static DWORD -IME_GetId(SDL_VideoData *videodata, UINT uIndex) +static DWORD IME_GetId(SDL_VideoData *videodata, UINT uIndex) { static HKL hklprev = 0; - static DWORD dwRet[2] = {0}; + static DWORD dwRet[2] = { 0 }; DWORD dwVerSize = 0; DWORD dwVerHandle = 0; LPVOID lpVerBuffer = 0; @@ -622,8 +618,9 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex) SDL_assert(uIndex < sizeof(dwRet) / sizeof(dwRet[0])); hkl = videodata->ime_hkl; - if (hklprev == hkl) + if (hklprev == hkl) { return dwRet[uIndex]; + } hklprev = hkl; SDL_assert(uIndex == 0); @@ -633,11 +630,7 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex) dwRet[1] = 0; return dwRet[0]; } - if (hkl != CHT_HKL_NEW_PHONETIC - && hkl != CHT_HKL_NEW_CHANG_JIE - && hkl != CHT_HKL_NEW_QUICK - && hkl != CHT_HKL_HK_CANTONESE - && hkl != CHS_HKL) { + if (hkl != CHT_HKL_NEW_PHONETIC && hkl != CHT_HKL_NEW_CHANG_JIE && hkl != CHT_HKL_NEW_QUICK && hkl != CHT_HKL_HK_CANTONESE && hkl != CHS_HKL) { dwRet[0] = dwRet[1] = 0; return dwRet[0]; } @@ -646,45 +639,38 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex) return dwRet[0]; } if (!videodata->GetReadingString) { - #define LCID_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) - if (CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME1, -1) != 2 - && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME2, -1) != 2 - && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME3, -1) != 2 - && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHS_IMEFILENAME1, -1) != 2 - && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHS_IMEFILENAME2, -1) != 2) { +#define LCID_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) + if (CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME1, -1) != 2 && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME2, -1) != 2 && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHT_IMEFILENAME3, -1) != 2 && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHS_IMEFILENAME1, -1) != 2 && CompareStringA(LCID_INVARIANT, NORM_IGNORECASE, szTemp, -1, CHS_IMEFILENAME2, -1) != 2) { dwRet[0] = dwRet[1] = 0; return dwRet[0]; } - #undef LCID_INVARIANT +#undef LCID_INVARIANT dwVerSize = GetFileVersionInfoSizeA(szTemp, &dwVerHandle); if (dwVerSize) { lpVerBuffer = SDL_malloc(dwVerSize); if (lpVerBuffer) { if (GetFileVersionInfoA(szTemp, dwVerHandle, dwVerSize, lpVerBuffer)) { if (VerQueryValueA(lpVerBuffer, "\\", &lpVerData, &cbVerData)) { - #define pVerFixedInfo ((VS_FIXEDFILEINFO FAR*)lpVerData) +#define pVerFixedInfo ((VS_FIXEDFILEINFO FAR *)lpVerData) DWORD dwVer = pVerFixedInfo->dwFileVersionMS; dwVer = (dwVer & 0x00ff0000) << 8 | (dwVer & 0x000000ff) << 16; if ((videodata->GetReadingString) || - ((dwLang == LANG_CHT) && ( - dwVer == MAKEIMEVERSION(4, 2) || - dwVer == MAKEIMEVERSION(4, 3) || - dwVer == MAKEIMEVERSION(4, 4) || - dwVer == MAKEIMEVERSION(5, 0) || - dwVer == MAKEIMEVERSION(5, 1) || - dwVer == MAKEIMEVERSION(5, 2) || - dwVer == MAKEIMEVERSION(6, 0))) - || - ((dwLang == LANG_CHS) && ( - dwVer == MAKEIMEVERSION(4, 1) || - dwVer == MAKEIMEVERSION(4, 2) || - dwVer == MAKEIMEVERSION(5, 3)))) { + ((dwLang == LANG_CHT) && (dwVer == MAKEIMEVERSION(4, 2) || + dwVer == MAKEIMEVERSION(4, 3) || + dwVer == MAKEIMEVERSION(4, 4) || + dwVer == MAKEIMEVERSION(5, 0) || + dwVer == MAKEIMEVERSION(5, 1) || + dwVer == MAKEIMEVERSION(5, 2) || + dwVer == MAKEIMEVERSION(6, 0))) || + ((dwLang == LANG_CHS) && (dwVer == MAKEIMEVERSION(4, 1) || + dwVer == MAKEIMEVERSION(4, 2) || + dwVer == MAKEIMEVERSION(5, 3)))) { dwRet[0] = dwVer | dwLang; dwRet[1] = pVerFixedInfo->dwFileVersionLS; SDL_free(lpVerBuffer); return dwRet[0]; } - #undef pVerFixedInfo +#undef pVerFixedInfo } } } @@ -695,29 +681,33 @@ IME_GetId(SDL_VideoData *videodata, UINT uIndex) return dwRet[0]; } -static void -IME_SetupAPI(SDL_VideoData *videodata) +static void IME_SetupAPI(SDL_VideoData *videodata) { char ime_file[MAX_PATH + 1]; - void* hime = 0; + void *hime = 0; HKL hkl = 0; videodata->GetReadingString = 0; videodata->ShowReadingWindow = 0; - if (videodata->ime_uiless) + if (videodata->ime_uiless) { return; + } hkl = videodata->ime_hkl; - if (!ImmGetIMEFileNameA(hkl, ime_file, sizeof(ime_file) - 1)) + if (!ImmGetIMEFileNameA(hkl, ime_file, sizeof(ime_file) - 1)) { return; + } hime = SDL_LoadObject(ime_file); - if (!hime) + if (hime == NULL) { return; + } + /* *INDENT-OFF* */ /* clang-format off */ videodata->GetReadingString = (UINT (WINAPI *)(HIMC, UINT, LPWSTR, PINT, BOOL*, PUINT)) SDL_LoadFunction(hime, "GetReadingString"); videodata->ShowReadingWindow = (BOOL (WINAPI *)(HIMC, BOOL)) SDL_LoadFunction(hime, "ShowReadingWindow"); + /* *INDENT-ON* */ /* clang-format on */ if (videodata->ShowReadingWindow) { HIMC himc = ImmGetContext(videodata->ime_hwnd_current); @@ -728,72 +718,74 @@ IME_SetupAPI(SDL_VideoData *videodata) } } -static void -IME_SetWindow(SDL_VideoData* videodata, HWND hwnd) +static void IME_SetWindow(SDL_VideoData *videodata, HWND hwnd) { videodata->ime_hwnd_current = hwnd; if (videodata->ime_threadmgr) { struct ITfDocumentMgr *document_mgr = 0; if (SUCCEEDED(videodata->ime_threadmgr->lpVtbl->AssociateFocus(videodata->ime_threadmgr, hwnd, NULL, &document_mgr))) { - if (document_mgr) + if (document_mgr) { document_mgr->lpVtbl->Release(document_mgr); + } } } } -static void -IME_UpdateInputLocale(SDL_VideoData *videodata) +static void IME_UpdateInputLocale(SDL_VideoData *videodata) { HKL hklnext = GetKeyboardLayout(0); - if (hklnext == videodata->ime_hkl) + if (hklnext == videodata->ime_hkl) { return; + } videodata->ime_hkl = hklnext; videodata->ime_candvertical = (PRIMLANG() == LANG_KOREAN || LANG() == LANG_CHS) ? SDL_FALSE : SDL_TRUE; } -static void -IME_ClearComposition(SDL_VideoData *videodata) +static void IME_ClearComposition(SDL_VideoData *videodata) { HIMC himc = 0; - if (!videodata->ime_initialized) + if (!videodata->ime_initialized) { return; + } himc = ImmGetContext(videodata->ime_hwnd_current); - if (!himc) + if (!himc) { return; + } ImmNotifyIME(himc, NI_COMPOSITIONSTR, CPS_CANCEL, 0); - if (videodata->ime_uiless) + if (videodata->ime_uiless) { ImmSetCompositionString(himc, SCS_SETSTR, TEXT(""), sizeof(TCHAR), TEXT(""), sizeof(TCHAR)); + } ImmNotifyIME(himc, NI_CLOSECANDIDATE, 0, 0); ImmReleaseContext(videodata->ime_hwnd_current, himc); SDL_SendEditingText("", 0, 0); } -static SDL_bool -IME_IsTextInputShown(SDL_VideoData* videodata) +static SDL_bool IME_IsTextInputShown(SDL_VideoData *videodata) { - if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) + if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) { return SDL_FALSE; + } return videodata->ime_uicontext != 0 ? SDL_TRUE : SDL_FALSE; } -static void -IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) +static void IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) { LONG length; DWORD dwLang = ((DWORD_PTR)videodata->ime_hkl & 0xffff); length = ImmGetCompositionStringW(himc, string, NULL, 0); if (length > 0 && videodata->ime_composition_length < length) { - if (videodata->ime_composition != NULL) + if (videodata->ime_composition != NULL) { SDL_free(videodata->ime_composition); + } - videodata->ime_composition = (WCHAR*)SDL_malloc(length + sizeof(WCHAR)); + videodata->ime_composition = (WCHAR *)SDL_malloc(length + sizeof(WCHAR)); videodata->ime_composition_length = length; } @@ -801,11 +793,11 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) himc, string, videodata->ime_composition, - videodata->ime_composition_length - ); + videodata->ime_composition_length); - if (length < 0) + if (length < 0) { length = 0; + } length /= sizeof(WCHAR); videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0)); @@ -816,8 +808,9 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) // Traditional Chinese IMEs add a placeholder U+3000 // Simplified Chinese IMEs seem to add a placeholder U+0020 sometimes int i; - for (i = videodata->ime_cursor + 1; i < length; ++i) + for (i = videodata->ime_cursor + 1; i < length; ++i) { videodata->ime_composition[i - 1] = videodata->ime_composition[i]; + } --length; } @@ -831,19 +824,19 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) length = ImmGetCompositionStringW(himc, GCS_COMPATTR, NULL, 0); if (length > 0) { - Uint8* attributes = (Uint8*)SDL_malloc(length + sizeof(WCHAR)); + Uint8 *attributes = (Uint8 *)SDL_malloc(length + sizeof(WCHAR)); ImmGetCompositionString(himc, GCS_COMPATTR, attributes, length); for (start = 0; start < length; ++start) { - if (attributes[start] == ATTR_TARGET_CONVERTED || - attributes[start] == ATTR_TARGET_NOTCONVERTED) + if (attributes[start] == ATTR_TARGET_CONVERTED || attributes[start] == ATTR_TARGET_NOTCONVERTED) { break; + } } for (end = start; end < length; ++end) { - if (attributes[end] != ATTR_TARGET_CONVERTED && - attributes[end] != ATTR_TARGET_NOTCONVERTED) + if (attributes[end] != ATTR_TARGET_CONVERTED && attributes[end] != ATTR_TARGET_NOTCONVERTED) { break; + } } if (start == length) { @@ -858,8 +851,7 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) } } -static void -IME_SendInputEvent(SDL_VideoData *videodata) +static void IME_SendInputEvent(SDL_VideoData *videodata) { char *s = 0; s = WIN_StringToUTF8W(videodata->ime_composition); @@ -871,8 +863,7 @@ IME_SendInputEvent(SDL_VideoData *videodata) videodata->ime_cursor = 0; } -static void -IME_SendEditingEvent(SDL_VideoData *videodata) +static void IME_SendEditingEvent(SDL_VideoData *videodata) { char *s = NULL; WCHAR *buffer = NULL; @@ -881,15 +872,14 @@ IME_SendEditingEvent(SDL_VideoData *videodata) size_t len = SDL_min(SDL_wcslen(videodata->ime_composition), (size_t)videodata->ime_cursor); size += sizeof(videodata->ime_readingstring); - buffer = (WCHAR*)SDL_malloc(size + sizeof(WCHAR)); + buffer = (WCHAR *)SDL_malloc(size + sizeof(WCHAR)); buffer[0] = 0; SDL_wcslcpy(buffer, videodata->ime_composition, len + 1); SDL_wcslcat(buffer, videodata->ime_readingstring, size); SDL_wcslcat(buffer, &videodata->ime_composition[len], size); - } - else { - buffer = (WCHAR*)SDL_malloc(size + sizeof(WCHAR)); + } else { + buffer = (WCHAR *)SDL_malloc(size + sizeof(WCHAR)); buffer[0] = 0; SDL_wcslcpy(buffer, videodata->ime_composition, size); } @@ -900,34 +890,36 @@ IME_SendEditingEvent(SDL_VideoData *videodata) SDL_free(buffer); } -static void -IME_AddCandidate(SDL_VideoData *videodata, UINT i, LPCWSTR candidate) +static void IME_AddCandidate(SDL_VideoData *videodata, UINT i, LPCWSTR candidate) { LPWSTR dst = &videodata->ime_candidates[i * MAX_CANDLENGTH]; LPWSTR end = &dst[MAX_CANDLENGTH - 1]; SDL_COMPILE_TIME_ASSERT(IME_CANDIDATE_INDEXING_REQUIRES, MAX_CANDLIST == 10); *dst++ = (WCHAR)(TEXT('0') + ((i + videodata->ime_candlistindexbase) % 10)); - if (videodata->ime_candvertical) + if (videodata->ime_candvertical) { *dst++ = TEXT(' '); + } - while (*candidate && dst < end) + while (*candidate && dst < end) { *dst++ = *candidate++; + } *dst = (WCHAR)'\0'; } -static void -IME_GetCandidateList(HWND hwnd, SDL_VideoData *videodata) +static void IME_GetCandidateList(HWND hwnd, SDL_VideoData *videodata) { HIMC himc; DWORD size; LPCANDIDATELIST cand_list; - if (IME_ShowCandidateList(videodata) < 0) + if (IME_ShowCandidateList(videodata) < 0) { return; + } himc = ImmGetContext(hwnd); - if (!himc) + if (!himc) { return; + } size = ImmGetCandidateListW(himc, 0, 0, 0); if (size != 0) { cand_list = (LPCANDIDATELIST)SDL_malloc(size); @@ -946,13 +938,13 @@ IME_GetCandidateList(HWND hwnd, SDL_VideoData *videodata) for (i = 0; i < videodata->ime_candcount; ++i) { size_t len = SDL_wcslen((LPWSTR)((DWORD_PTR)cand_list + cand_list->dwOffset[i])) + 1; if (len + cchars > maxcandchar) { - if (i > cand_list->dwSelection) + if (i > cand_list->dwSelection) { break; + } page_start = i; cchars = len; - } - else { + } else { cchars += len; } } @@ -966,9 +958,8 @@ IME_GetCandidateList(HWND hwnd, SDL_VideoData *videodata) IME_AddCandidate(videodata, j, candidate); } // TODO: why was this necessary? check ime_candvertical instead? PRIMLANG() never equals LANG_CHT ! - //if (PRIMLANG() == LANG_KOREAN || (PRIMLANG() == LANG_CHT && !IME_GetId(videodata, 0))) + // if (PRIMLANG() == LANG_KOREAN || (PRIMLANG() == LANG_CHT && !IME_GetId(videodata, 0))) // videodata->ime_candsel = -1; - } SDL_free(cand_list); } @@ -976,18 +967,19 @@ IME_GetCandidateList(HWND hwnd, SDL_VideoData *videodata) ImmReleaseContext(hwnd, himc); } -static int -IME_ShowCandidateList(SDL_VideoData *videodata) +static int IME_ShowCandidateList(SDL_VideoData *videodata) { void *candidates; videodata->ime_candcount = 0; candidates = SDL_realloc(videodata->ime_candidates, MAX_CANDSIZE); - if (candidates != NULL) + if (candidates != NULL) { videodata->ime_candidates = (WCHAR *)candidates; + } - if (videodata->ime_candidates == NULL) + if (videodata->ime_candidates == NULL) { return -1; + } SDL_memset(videodata->ime_candidates, 0, MAX_CANDSIZE); @@ -998,8 +990,7 @@ IME_ShowCandidateList(SDL_VideoData *videodata) return 0; } -static void -IME_HideCandidateList(SDL_VideoData *videodata) +static void IME_HideCandidateList(SDL_VideoData *videodata) { videodata->ime_dirty = SDL_FALSE; videodata->ime_candlist = SDL_FALSE; @@ -1007,23 +998,22 @@ IME_HideCandidateList(SDL_VideoData *videodata) IME_SendEditingEvent(videodata); } -SDL_bool -IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata) +SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata) { SDL_bool trap = SDL_FALSE; HIMC himc = 0; - if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) + if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) { return SDL_FALSE; + } switch (msg) { case WM_KEYDOWN: - if (wParam == VK_PROCESSKEY) - { + if (wParam == VK_PROCESSKEY) { videodata->ime_uicontext = 1; trap = SDL_TRUE; - } - else + } else { videodata->ime_uicontext = 0; + } break; case WM_INPUTLANGCHANGE: IME_InputLangChanged(videodata); @@ -1033,7 +1023,7 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD *lParam = 0; } break; - case WM_IME_STARTCOMPOSITION: + case WM_IME_STARTCOMPOSITION: videodata->ime_suppress_endcomposition_event = SDL_FALSE; trap = SDL_TRUE; break; @@ -1047,8 +1037,9 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD IME_SendInputEvent(videodata); } if (*lParam & GCS_COMPSTR) { - if (!videodata->ime_uiless) + if (!videodata->ime_uiless) { videodata->ime_readingstring[0] = 0; + } IME_GetCompositionString(videodata, himc, GCS_COMPSTR); IME_SendEditingEvent(videodata); @@ -1060,8 +1051,9 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD videodata->ime_composition[0] = 0; videodata->ime_readingstring[0] = 0; videodata->ime_cursor = 0; - if (videodata->ime_suppress_endcomposition_event == SDL_FALSE) + if (videodata->ime_suppress_endcomposition_event == SDL_FALSE) { SDL_SendEditingText("", 0, 0); + } videodata->ime_suppress_endcomposition_event = SDL_FALSE; break; case WM_IME_NOTIFY: @@ -1072,8 +1064,9 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD break; case IMN_OPENCANDIDATE: case IMN_CHANGECANDIDATE: - if (videodata->ime_uiless) + if (videodata->ime_uiless) { break; + } trap = SDL_TRUE; videodata->ime_uicontext = 1; @@ -1085,35 +1078,31 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD IME_HideCandidateList(videodata); break; case IMN_PRIVATE: - { - DWORD dwId = IME_GetId(videodata, 0); - IME_GetReadingString(videodata, hwnd); - switch (dwId) - { - case IMEID_CHT_VER42: - case IMEID_CHT_VER43: - case IMEID_CHT_VER44: - case IMEID_CHS_VER41: - case IMEID_CHS_VER42: - if (*lParam == 1 || *lParam == 2) - trap = SDL_TRUE; + { + DWORD dwId = IME_GetId(videodata, 0); + IME_GetReadingString(videodata, hwnd); + switch (dwId) { + case IMEID_CHT_VER42: + case IMEID_CHT_VER43: + case IMEID_CHT_VER44: + case IMEID_CHS_VER41: + case IMEID_CHS_VER42: + if (*lParam == 1 || *lParam == 2) { + trap = SDL_TRUE; + } - break; - case IMEID_CHT_VER50: - case IMEID_CHT_VER51: - case IMEID_CHT_VER52: - case IMEID_CHT_VER60: - case IMEID_CHS_VER53: - if (*lParam == 16 - || *lParam == 17 - || *lParam == 26 - || *lParam == 27 - || *lParam == 28) - trap = SDL_TRUE; - break; + break; + case IMEID_CHT_VER50: + case IMEID_CHT_VER51: + case IMEID_CHT_VER52: + case IMEID_CHT_VER60: + case IMEID_CHS_VER53: + if (*lParam == 16 || *lParam == 17 || *lParam == 26 || *lParam == 27 || *lParam == 28) { + trap = SDL_TRUE; } + break; } - break; + } break; default: trap = SDL_TRUE; break; @@ -1123,8 +1112,7 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD return trap; } -static void -IME_CloseCandidateList(SDL_VideoData *videodata) +static void IME_CloseCandidateList(SDL_VideoData *videodata) { IME_HideCandidateList(videodata); videodata->ime_candcount = 0; @@ -1132,8 +1120,7 @@ IME_CloseCandidateList(SDL_VideoData *videodata) videodata->ime_candidates = NULL; } -static void -UILess_GetCandidateList(SDL_VideoData *videodata, ITfCandidateListUIElement *pcandlist) +static void UILess_GetCandidateList(SDL_VideoData *videodata, ITfCandidateListUIElement *pcandlist) { UINT selection = 0; UINT count = 0; @@ -1143,8 +1130,9 @@ UILess_GetCandidateList(SDL_VideoData *videodata, ITfCandidateListUIElement *pca DWORD pgsize = 0; UINT i, j; - if (IME_ShowCandidateList(videodata) < 0) + if (IME_ShowCandidateList(videodata) < 0) { return; + } pcandlist->lpVtbl->GetSelection(pcandlist, &selection); pcandlist->lpVtbl->GetCount(pcandlist, &count); @@ -1159,10 +1147,11 @@ UILess_GetCandidateList(SDL_VideoData *videodata, ITfCandidateListUIElement *pca if (idxlist) { pcandlist->lpVtbl->GetPageIndex(pcandlist, idxlist, pgcount, &pgcount); pgstart = idxlist[page]; - if (page < pgcount - 1) + if (page < pgcount - 1) { pgsize = SDL_min(count, idxlist[page + 1]) - pgstart; - else + } else { pgsize = count - pgstart; + } SDL_free(idxlist); } @@ -1179,16 +1168,18 @@ UILess_GetCandidateList(SDL_VideoData *videodata, ITfCandidateListUIElement *pca } } // TODO: why was this necessary? check ime_candvertical instead? - //if (PRIMLANG() == LANG_KOREAN) + // if (PRIMLANG() == LANG_KOREAN) // videodata->ime_candsel = -1; } -STDMETHODIMP_(ULONG) TSFSink_AddRef(TSFSink *sink) +STDMETHODIMP_(ULONG) +TSFSink_AddRef(TSFSink *sink) { return ++sink->refcount; } -STDMETHODIMP_(ULONG) TSFSink_Release(TSFSink *sink) +STDMETHODIMP_(ULONG) +TSFSink_Release(TSFSink *sink) { --sink->refcount; if (sink->refcount == 0) { @@ -1200,14 +1191,16 @@ STDMETHODIMP_(ULONG) TSFSink_Release(TSFSink *sink) STDMETHODIMP UIElementSink_QueryInterface(TSFSink *sink, REFIID riid, PVOID *ppv) { - if (!ppv) + if (ppv == NULL) { return E_INVALIDARG; + } *ppv = 0; - if (WIN_IsEqualIID(riid, &IID_IUnknown)) + if (WIN_IsEqualIID(riid, &IID_IUnknown)) { *ppv = (IUnknown *)sink; - else if (WIN_IsEqualIID(riid, &IID_ITfUIElementSink)) + } else if (WIN_IsEqualIID(riid, &IID_ITfUIElementSink)) { *ppv = (ITfUIElementSink *)sink; + } if (*ppv) { TSFSink_AddRef(sink); @@ -1235,8 +1228,9 @@ STDMETHODIMP UIElementSink_BeginUIElement(TSFSink *sink, DWORD dwUIElementId, BO ITfReadingInformationUIElement *preading = 0; ITfCandidateListUIElement *pcandlist = 0; SDL_VideoData *videodata = (SDL_VideoData *)sink->data; - if (!element) + if (element == NULL) { return E_INVALIDARG; + } *pbShow = FALSE; if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfReadingInformationUIElement, (LPVOID *)&preading))) { @@ -1245,8 +1239,7 @@ STDMETHODIMP UIElementSink_BeginUIElement(TSFSink *sink, DWORD dwUIElementId, BO SysFreeString(bstr); } preading->lpVtbl->Release(preading); - } - else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { + } else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { videodata->ime_candref++; UILess_GetCandidateList(videodata, pcandlist); pcandlist->lpVtbl->Release(pcandlist); @@ -1260,8 +1253,9 @@ STDMETHODIMP UIElementSink_UpdateUIElement(TSFSink *sink, DWORD dwUIElementId) ITfReadingInformationUIElement *preading = 0; ITfCandidateListUIElement *pcandlist = 0; SDL_VideoData *videodata = (SDL_VideoData *)sink->data; - if (!element) + if (element == NULL) { return E_INVALIDARG; + } if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfReadingInformationUIElement, (LPVOID *)&preading))) { BSTR bstr; @@ -1272,8 +1266,7 @@ STDMETHODIMP UIElementSink_UpdateUIElement(TSFSink *sink, DWORD dwUIElementId) SysFreeString(bstr); } preading->lpVtbl->Release(preading); - } - else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { + } else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { UILess_GetCandidateList(videodata, pcandlist); pcandlist->lpVtbl->Release(pcandlist); } @@ -1286,8 +1279,9 @@ STDMETHODIMP UIElementSink_EndUIElement(TSFSink *sink, DWORD dwUIElementId) ITfReadingInformationUIElement *preading = 0; ITfCandidateListUIElement *pcandlist = 0; SDL_VideoData *videodata = (SDL_VideoData *)sink->data; - if (!element) + if (element == NULL) { return E_INVALIDARG; + } if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfReadingInformationUIElement, (LPVOID *)&preading))) { videodata->ime_readingstring[0] = 0; @@ -1296,8 +1290,9 @@ STDMETHODIMP UIElementSink_EndUIElement(TSFSink *sink, DWORD dwUIElementId) } if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { videodata->ime_candref--; - if (videodata->ime_candref == 0) + if (videodata->ime_candref == 0) { IME_CloseCandidateList(videodata); + } pcandlist->lpVtbl->Release(pcandlist); } @@ -1306,14 +1301,16 @@ STDMETHODIMP UIElementSink_EndUIElement(TSFSink *sink, DWORD dwUIElementId) STDMETHODIMP IPPASink_QueryInterface(TSFSink *sink, REFIID riid, PVOID *ppv) { - if (!ppv) + if (ppv == NULL) { return E_INVALIDARG; + } *ppv = 0; - if (WIN_IsEqualIID(riid, &IID_IUnknown)) + if (WIN_IsEqualIID(riid, &IID_IUnknown)) { *ppv = (IUnknown *)sink; - else if (WIN_IsEqualIID(riid, &IID_ITfInputProcessorProfileActivationSink)) + } else if (WIN_IsEqualIID(riid, &IID_ITfInputProcessorProfileActivationSink)) { *ppv = (ITfInputProcessorProfileActivationSink *)sink; + } if (*ppv) { TSFSink_AddRef(sink); @@ -1327,8 +1324,9 @@ STDMETHODIMP IPPASink_OnActivated(TSFSink *sink, DWORD dwProfileType, LANGID lan static const GUID TF_PROFILE_DAYI = { 0x037B2C25, 0x480C, 0x4D7F, { 0xB0, 0x27, 0xD6, 0xCA, 0x6B, 0x69, 0x78, 0x8A } }; SDL_VideoData *videodata = (SDL_VideoData *)sink->data; videodata->ime_candlistindexbase = WIN_IsEqualGUID(&TF_PROFILE_DAYI, guidProfile) ? 0 : 1; - if (WIN_IsEqualIID(catid, &GUID_TFCAT_TIP_KEYBOARD) && (dwFlags & TF_IPSINK_FLAG_ACTIVE)) + if (WIN_IsEqualIID(catid, &GUID_TFCAT_TIP_KEYBOARD) && (dwFlags & TF_IPSINK_FLAG_ACTIVE)) { IME_InputLangChanged((SDL_VideoData *)sink->data); + } IME_HideCandidateList(videodata); return S_OK; @@ -1350,12 +1348,12 @@ static void *vtIPPASink[] = { (void *)(IPPASink_OnActivated) }; -static void -UILess_EnableUIUpdates(SDL_VideoData *videodata) +static void UILess_EnableUIUpdates(SDL_VideoData *videodata) { ITfSource *source = 0; - if (!videodata->ime_threadmgrex || videodata->ime_uielemsinkcookie != TF_INVALID_COOKIE) + if (!videodata->ime_threadmgrex || videodata->ime_uielemsinkcookie != TF_INVALID_COOKIE) { return; + } if (SUCCEEDED(videodata->ime_threadmgrex->lpVtbl->QueryInterface(videodata->ime_threadmgrex, &IID_ITfSource, (LPVOID *)&source))) { source->lpVtbl->AdviseSink(source, &IID_ITfUIElementSink, (IUnknown *)videodata->ime_uielemsink, &videodata->ime_uielemsinkcookie); @@ -1363,12 +1361,12 @@ UILess_EnableUIUpdates(SDL_VideoData *videodata) } } -static void -UILess_DisableUIUpdates(SDL_VideoData *videodata) +static void UILess_DisableUIUpdates(SDL_VideoData *videodata) { ITfSource *source = 0; - if (!videodata->ime_threadmgrex || videodata->ime_uielemsinkcookie == TF_INVALID_COOKIE) + if (!videodata->ime_threadmgrex || videodata->ime_uielemsinkcookie == TF_INVALID_COOKIE) { return; + } if (SUCCEEDED(videodata->ime_threadmgrex->lpVtbl->QueryInterface(videodata->ime_threadmgrex, &IID_ITfSource, (LPVOID *)&source))) { source->lpVtbl->UnadviseSink(source, videodata->ime_uielemsinkcookie); @@ -1377,17 +1375,18 @@ UILess_DisableUIUpdates(SDL_VideoData *videodata) } } -static SDL_bool -UILess_SetupSinks(SDL_VideoData *videodata) +static SDL_bool UILess_SetupSinks(SDL_VideoData *videodata) { TfClientId clientid = 0; SDL_bool result = SDL_FALSE; ITfSource *source = 0; - if (FAILED(CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgrEx, (LPVOID *)&videodata->ime_threadmgrex))) + if (FAILED(CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgrEx, (LPVOID *)&videodata->ime_threadmgrex))) { return SDL_FALSE; + } - if (FAILED(videodata->ime_threadmgrex->lpVtbl->ActivateEx(videodata->ime_threadmgrex, &clientid, TF_TMAE_UIELEMENTENABLEDONLY))) + if (FAILED(videodata->ime_threadmgrex->lpVtbl->ActivateEx(videodata->ime_threadmgrex, &clientid, TF_TMAE_UIELEMENTENABLEDONLY))) { return SDL_FALSE; + } videodata->ime_uielemsink = SDL_malloc(sizeof(TSFSink)); videodata->ime_ippasink = SDL_malloc(sizeof(TSFSink)); @@ -1411,16 +1410,15 @@ UILess_SetupSinks(SDL_VideoData *videodata) return result; } -#define SAFE_RELEASE(p) \ -{ \ - if (p) { \ - (p)->lpVtbl->Release((p)); \ - (p) = 0; \ - } \ -} +#define SAFE_RELEASE(p) \ + { \ + if (p) { \ + (p)->lpVtbl->Release((p)); \ + (p) = 0; \ + } \ + } -static void -UILess_ReleaseSinks(SDL_VideoData *videodata) +static void UILess_ReleaseSinks(SDL_VideoData *videodata) { ITfSource *source = 0; if (videodata->ime_threadmgrex && SUCCEEDED(videodata->ime_threadmgrex->lpVtbl->QueryInterface(videodata->ime_threadmgrex, &IID_ITfSource, (LPVOID *)&source))) { @@ -1436,8 +1434,7 @@ UILess_ReleaseSinks(SDL_VideoData *videodata) } } -static void * -StartDrawToBitmap(HDC hdc, HBITMAP *hhbm, int width, int height) +static void *StartDrawToBitmap(HDC hdc, HBITMAP *hhbm, int width, int height) { BITMAPINFO info; BITMAPINFOHEADER *infoHeader = &info.bmiHeader; @@ -1446,19 +1443,19 @@ StartDrawToBitmap(HDC hdc, HBITMAP *hhbm, int width, int height) SDL_zero(info); infoHeader->biSize = sizeof(BITMAPINFOHEADER); infoHeader->biWidth = width; - infoHeader->biHeight = -1 * SDL_abs(height); + infoHeader->biHeight = (LONG)-1 * SDL_abs(height); infoHeader->biPlanes = 1; infoHeader->biBitCount = 32; infoHeader->biCompression = BI_RGB; *hhbm = CreateDIBSection(hdc, &info, DIB_RGB_COLORS, (void **)&bits, 0, 0); - if (*hhbm) + if (*hhbm) { SelectObject(hdc, *hhbm); + } } return bits; } -static void -StopDrawToBitmap(HDC hdc, HBITMAP *hhbm) +static void StopDrawToBitmap(HDC hdc, HBITMAP *hhbm) { if (hhbm && *hhbm) { DeleteObject(*hhbm); @@ -1467,8 +1464,7 @@ StopDrawToBitmap(HDC hdc, HBITMAP *hhbm) } /* This draws only within the specified area and fills the entire region. */ -static void -DrawRect(HDC hdc, int left, int top, int right, int bottom, int pensize) +static void DrawRect(HDC hdc, int left, int top, int right, int bottom, int pensize) { /* The case of no pen (PenSize = 0) is automatically taken care of. */ const int penadjust = (int)SDL_floor(pensize / 2.0f - 0.5f); @@ -1479,19 +1475,18 @@ DrawRect(HDC hdc, int left, int top, int right, int bottom, int pensize) Rectangle(hdc, left, top, right, bottom); } -static void -IME_DestroyTextures(SDL_VideoData *videodata) +static void IME_DestroyTextures(SDL_VideoData *videodata) { } -#define SDL_swap(a,b) { \ - int c = (a); \ - (a) = (b); \ - (b) = c; \ +#define SDL_swap(a, b) \ + { \ + int c = (a); \ + (a) = (b); \ + (b) = c; \ } -static void -IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) +static void IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) { int left, top, right, bottom; SDL_bool ok = SDL_FALSE; @@ -1507,8 +1502,9 @@ IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) left -= right - winw; right = winw; } - if (bottom < winh) + if (bottom < winh) { ok = SDL_TRUE; + } /* Top */ if (!ok) { @@ -1520,8 +1516,9 @@ IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) left -= right - winw; right = winw; } - if (top >= 0) + if (top >= 0) { ok = SDL_TRUE; + } } /* Right */ @@ -1530,8 +1527,9 @@ IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) top = 0; right = left + size.cx; bottom = size.cy; - if (right < winw) + if (right < winw) { ok = SDL_TRUE; + } } /* Left */ @@ -1540,8 +1538,9 @@ IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) top = 0; right = videodata->ime_rect.x; bottom = size.cy; - if (right >= 0) + if (right >= 0) { ok = SDL_TRUE; + } } /* Window too small, show at (0,0) */ @@ -1558,13 +1557,12 @@ IME_PositionCandidateList(SDL_VideoData *videodata, SIZE size) videodata->ime_candlistrect.h = bottom - top; } -static void -IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) +static void IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) { int i, j; - SIZE size = {0}; + SIZE size = { 0 }; SIZE candsizes[MAX_CANDLIST]; - SIZE maxcandsize = {0}; + SIZE maxcandsize = { 0 }; HBITMAP hbm = NULL; int candcount = SDL_min(SDL_min(MAX_CANDLIST, videodata->ime_candcount), videodata->ime_candpgsize); SDL_bool vertical = videodata->ime_candvertical; @@ -1606,7 +1604,6 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) GetTextExtentPoint32W(hdc, s, (int)SDL_wcslen(s), &candsizes[i]); maxcandsize.cx = SDL_max(maxcandsize.cx, candsizes[i].cx); maxcandsize.cy = SDL_max(maxcandsize.cy, candsizes[i].cy); - } if (vertical) { size.cx = @@ -1615,28 +1612,26 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) (candmargin * 2) + (candborder * 2) + (candpadding * 2) + - (maxcandsize.cx) - ; + (maxcandsize.cx); size.cy = (listborder * 2) + (listpadding * 2) + ((candcount + 1) * candmargin) + (candcount * candborder * 2) + (candcount * candpadding * 2) + - (candcount * maxcandsize.cy) - ; - } - else { + (candcount * maxcandsize.cy); + } else { size.cx = - (listborder * 2) + + (LONG)(listborder * 2) + (listpadding * 2) + ((candcount + 1) * candmargin) + (candcount * candborder * 2) + (candcount * candpadding * 2) + ((candcount - 1) * horzcandspacing); - for (i = 0; i < candcount; ++i) + for (i = 0; i < candcount; ++i) { size.cx += candsizes[i].cx; + } size.cy = (listborder * 2) + @@ -1644,8 +1639,7 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) (candmargin * 2) + (candborder * 2) + (candpadding * 2) + - (maxcandsize.cy) - ; + (maxcandsize.cy); } StartDrawToBitmap(hdc, &hbm, size.cx, size.cy); @@ -1668,12 +1662,12 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) top = listborder + listpadding + (i * candborder * 2) + (i * candpadding * 2) + ((i + 1) * candmargin) + (i * maxcandsize.cy); right = size.cx - listborder - listpadding - candmargin; bottom = top + maxcandsize.cy + (candpadding * 2) + (candborder * 2); - } - else { + } else { left = listborder + listpadding + (i * candborder * 2) + (i * candpadding * 2) + ((i + 1) * candmargin) + (i * horzcandspacing); - for (j = 0; j < i; ++j) + for (j = 0; j < i; ++j) { left += candsizes[j].cx; + } top = listborder + listpadding + candmargin; right = left + candsizes[i].cx + (candpadding * 2) + (candborder * 2); @@ -1684,8 +1678,7 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) SelectObject(hdc, selpen); SelectObject(hdc, selbrush); SetTextColor(hdc, seltextcolor); - } - else { + } else { SelectObject(hdc, candpen); SelectObject(hdc, candbrush); SetTextColor(hdc, candtextcolor); @@ -1707,13 +1700,13 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) IME_PositionCandidateList(videodata, size); } -static void -IME_Render(SDL_VideoData *videodata) +static void IME_Render(SDL_VideoData *videodata) { HDC hdc = CreateCompatibleDC(NULL); - if (videodata->ime_candlist) + if (videodata->ime_candlist) { IME_RenderCandidateList(videodata, hdc); + } DeleteDC(hdc); @@ -1722,15 +1715,16 @@ IME_Render(SDL_VideoData *videodata) void IME_Present(SDL_VideoData *videodata) { - if (videodata->ime_dirty) + if (videodata->ime_dirty) { IME_Render(videodata); + } /* FIXME: Need to show the IME bitmap */ } SDL_bool WIN_IsTextInputShown(_THIS) { - SDL_VideoData* videodata = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; return IME_IsTextInputShown(videodata); } diff --git a/modules/SDL2/src/video/windows/SDL_windowsmessagebox.c b/modules/SDL2/src/video/windows/SDL_windowsmessagebox.c index b165ef7..9272f53 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsmessagebox.c +++ b/modules/SDL2/src/video/windows/SDL_windowsmessagebox.c @@ -34,7 +34,7 @@ #include "SDL_windowsvideo.h" #ifndef SS_EDITCONTROL -#define SS_EDITCONTROL 0x2000 +#define SS_EDITCONTROL 0x2000 #endif #ifndef IDOK @@ -46,11 +46,11 @@ #endif /* Custom dialog return codes */ -#define IDCLOSED 20 -#define IDINVALPTRINIT 50 -#define IDINVALPTRCOMMAND 51 +#define IDCLOSED 20 +#define IDINVALPTRINIT 50 +#define IDINVALPTRCOMMAND 51 #define IDINVALPTRSETFOCUS 52 -#define IDINVALPTRDLGITEM 53 +#define IDINVALPTRDLGITEM 53 /* First button ID */ #define IDBUTTONINDEX0 100 @@ -64,7 +64,6 @@ */ #define MAX_BUTTONS (0xffff - 100) - /* Display a Windows message box */ typedef HRESULT(CALLBACK *PFTASKDIALOGCALLBACK)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData); @@ -87,45 +86,45 @@ enum _TASKDIALOG_FLAGS TDF_RTL_LAYOUT = 0x2000, TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000, TDF_CAN_BE_MINIMIZED = 0x8000, - //#if (NTDDI_VERSION >= NTDDI_WIN8) + // #if (NTDDI_VERSION >= NTDDI_WIN8) TDF_NO_SET_FOREGROUND = 0x00010000, // Don't call SetForegroundWindow() when activating the dialog - //#endif // (NTDDI_VERSION >= NTDDI_WIN8) - TDF_SIZE_TO_CONTENT = 0x01000000 // used by ShellMessageBox to emulate MessageBox sizing behavior + // #endif // (NTDDI_VERSION >= NTDDI_WIN8) + TDF_SIZE_TO_CONTENT = 0x01000000 // used by ShellMessageBox to emulate MessageBox sizing behavior }; -typedef int TASKDIALOG_FLAGS; // Note: _TASKDIALOG_FLAGS is an int +typedef int TASKDIALOG_FLAGS; // Note: _TASKDIALOG_FLAGS is an int typedef enum _TASKDIALOG_MESSAGES { TDM_NAVIGATE_PAGE = WM_USER + 101, - TDM_CLICK_BUTTON = WM_USER + 102, // wParam = Button ID - TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER + 103, // wParam = 0 (nonMarque) wParam != 0 (Marquee) - TDM_SET_PROGRESS_BAR_STATE = WM_USER + 104, // wParam = new progress state - TDM_SET_PROGRESS_BAR_RANGE = WM_USER + 105, // lParam = MAKELPARAM(nMinRange, nMaxRange) - TDM_SET_PROGRESS_BAR_POS = WM_USER + 106, // wParam = new position - TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER + 107, // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints) - TDM_SET_ELEMENT_TEXT = WM_USER + 108, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) - TDM_CLICK_RADIO_BUTTON = WM_USER + 110, // wParam = Radio Button ID - TDM_ENABLE_BUTTON = WM_USER + 111, // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID - TDM_ENABLE_RADIO_BUTTON = WM_USER + 112, // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID - TDM_CLICK_VERIFICATION = WM_USER + 113, // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus) - TDM_UPDATE_ELEMENT_TEXT = WM_USER + 114, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) + TDM_CLICK_BUTTON = WM_USER + 102, // wParam = Button ID + TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER + 103, // wParam = 0 (nonMarque) wParam != 0 (Marquee) + TDM_SET_PROGRESS_BAR_STATE = WM_USER + 104, // wParam = new progress state + TDM_SET_PROGRESS_BAR_RANGE = WM_USER + 105, // lParam = MAKELPARAM(nMinRange, nMaxRange) + TDM_SET_PROGRESS_BAR_POS = WM_USER + 106, // wParam = new position + TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER + 107, // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints) + TDM_SET_ELEMENT_TEXT = WM_USER + 108, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) + TDM_CLICK_RADIO_BUTTON = WM_USER + 110, // wParam = Radio Button ID + TDM_ENABLE_BUTTON = WM_USER + 111, // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID + TDM_ENABLE_RADIO_BUTTON = WM_USER + 112, // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID + TDM_CLICK_VERIFICATION = WM_USER + 113, // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus) + TDM_UPDATE_ELEMENT_TEXT = WM_USER + 114, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER + 115, // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required) - TDM_UPDATE_ICON = WM_USER + 116 // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise) + TDM_UPDATE_ICON = WM_USER + 116 // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise) } TASKDIALOG_MESSAGES; typedef enum _TASKDIALOG_NOTIFICATIONS { TDN_CREATED = 0, TDN_NAVIGATED = 1, - TDN_BUTTON_CLICKED = 2, // wParam = Button ID - TDN_HYPERLINK_CLICKED = 3, // lParam = (LPCWSTR)pszHREF - TDN_TIMER = 4, // wParam = Milliseconds since dialog created or timer reset + TDN_BUTTON_CLICKED = 2, // wParam = Button ID + TDN_HYPERLINK_CLICKED = 3, // lParam = (LPCWSTR)pszHREF + TDN_TIMER = 4, // wParam = Milliseconds since dialog created or timer reset TDN_DESTROYED = 5, - TDN_RADIO_BUTTON_CLICKED = 6, // wParam = Radio Button ID + TDN_RADIO_BUTTON_CLICKED = 6, // wParam = Radio Button ID TDN_DIALOG_CONSTRUCTED = 7, - TDN_VERIFICATION_CLICKED = 8, // wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0 + TDN_VERIFICATION_CLICKED = 8, // wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0 TDN_HELP = 9, - TDN_EXPANDO_BUTTON_CLICKED = 10 // wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded) + TDN_EXPANDO_BUTTON_CLICKED = 10 // wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded) } TASKDIALOG_NOTIFICATIONS; typedef enum _TASKDIALOG_ELEMENTS @@ -142,64 +141,64 @@ typedef enum _TASKDIALOG_ICON_ELEMENTS TDIE_ICON_FOOTER } TASKDIALOG_ICON_ELEMENTS; -#define TD_WARNING_ICON MAKEINTRESOURCEW(-1) -#define TD_ERROR_ICON MAKEINTRESOURCEW(-2) -#define TD_INFORMATION_ICON MAKEINTRESOURCEW(-3) -#define TD_SHIELD_ICON MAKEINTRESOURCEW(-4) +#define TD_WARNING_ICON MAKEINTRESOURCEW(-1) +#define TD_ERROR_ICON MAKEINTRESOURCEW(-2) +#define TD_INFORMATION_ICON MAKEINTRESOURCEW(-3) +#define TD_SHIELD_ICON MAKEINTRESOURCEW(-4) enum _TASKDIALOG_COMMON_BUTTON_FLAGS { - TDCBF_OK_BUTTON = 0x0001, // selected control return value IDOK - TDCBF_YES_BUTTON = 0x0002, // selected control return value IDYES - TDCBF_NO_BUTTON = 0x0004, // selected control return value IDNO + TDCBF_OK_BUTTON = 0x0001, // selected control return value IDOK + TDCBF_YES_BUTTON = 0x0002, // selected control return value IDYES + TDCBF_NO_BUTTON = 0x0004, // selected control return value IDNO TDCBF_CANCEL_BUTTON = 0x0008, // selected control return value IDCANCEL - TDCBF_RETRY_BUTTON = 0x0010, // selected control return value IDRETRY - TDCBF_CLOSE_BUTTON = 0x0020 // selected control return value IDCLOSE + TDCBF_RETRY_BUTTON = 0x0010, // selected control return value IDRETRY + TDCBF_CLOSE_BUTTON = 0x0020 // selected control return value IDCLOSE }; -typedef int TASKDIALOG_COMMON_BUTTON_FLAGS; // Note: _TASKDIALOG_COMMON_BUTTON_FLAGS is an int +typedef int TASKDIALOG_COMMON_BUTTON_FLAGS; // Note: _TASKDIALOG_COMMON_BUTTON_FLAGS is an int #pragma pack(push, 1) typedef struct _TASKDIALOG_BUTTON { - int nButtonID; - PCWSTR pszButtonText; + int nButtonID; + PCWSTR pszButtonText; } TASKDIALOG_BUTTON; typedef struct _TASKDIALOGCONFIG { - UINT cbSize; - HWND hwndParent; // incorrectly named, this is the owner window, not a parent. - HINSTANCE hInstance; // used for MAKEINTRESOURCE() strings - TASKDIALOG_FLAGS dwFlags; // TASKDIALOG_FLAGS (TDF_XXX) flags - TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons; // TASKDIALOG_COMMON_BUTTON (TDCBF_XXX) flags - PCWSTR pszWindowTitle; // string or MAKEINTRESOURCE() + UINT cbSize; + HWND hwndParent; // incorrectly named, this is the owner window, not a parent. + HINSTANCE hInstance; // used for MAKEINTRESOURCE() strings + TASKDIALOG_FLAGS dwFlags; // TASKDIALOG_FLAGS (TDF_XXX) flags + TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons; // TASKDIALOG_COMMON_BUTTON (TDCBF_XXX) flags + PCWSTR pszWindowTitle; // string or MAKEINTRESOURCE() union { - HICON hMainIcon; - PCWSTR pszMainIcon; + HICON hMainIcon; + PCWSTR pszMainIcon; } /*DUMMYUNIONNAME*/; - PCWSTR pszMainInstruction; - PCWSTR pszContent; - UINT cButtons; - const TASKDIALOG_BUTTON *pButtons; - int nDefaultButton; - UINT cRadioButtons; - const TASKDIALOG_BUTTON *pRadioButtons; - int nDefaultRadioButton; - PCWSTR pszVerificationText; - PCWSTR pszExpandedInformation; - PCWSTR pszExpandedControlText; - PCWSTR pszCollapsedControlText; + PCWSTR pszMainInstruction; + PCWSTR pszContent; + UINT cButtons; + const TASKDIALOG_BUTTON *pButtons; + int nDefaultButton; + UINT cRadioButtons; + const TASKDIALOG_BUTTON *pRadioButtons; + int nDefaultRadioButton; + PCWSTR pszVerificationText; + PCWSTR pszExpandedInformation; + PCWSTR pszExpandedControlText; + PCWSTR pszCollapsedControlText; union { - HICON hFooterIcon; - PCWSTR pszFooterIcon; + HICON hFooterIcon; + PCWSTR pszFooterIcon; } /*DUMMYUNIONNAME2*/; - PCWSTR pszFooter; + PCWSTR pszFooter; PFTASKDIALOGCALLBACK pfCallback; - LONG_PTR lpCallbackData; - UINT cxWidth; // width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width. + LONG_PTR lpCallbackData; + UINT cxWidth; // width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width. } TASKDIALOGCONFIG; typedef struct @@ -232,7 +231,7 @@ typedef struct typedef struct { - DLGTEMPLATEEX* lpDialog; + DLGTEMPLATEEX *lpDialog; Uint8 *data; size_t size; size_t used; @@ -254,7 +253,7 @@ static INT_PTR CALLBACK MessageBoxDialogProc(HWND hDlg, UINT iMessage, WPARAM wP const SDL_MessageBoxData *messageboxdata; size_t buttonindex; - switch ( iMessage ) { + switch (iMessage) { case WM_INITDIALOG: if (lParam == 0) { EndDialog(hDlg, IDINVALPTRINIT); @@ -345,13 +344,13 @@ static SDL_bool ExpandDialogSpace(WIN_DialogData *dialog, size_t space) if (size > dialog->size) { void *data = SDL_realloc(dialog->data, size); - if (!data) { + if (data == NULL) { SDL_OutOfMemory(); return SDL_FALSE; } dialog->data = data; dialog->size = size; - dialog->lpDialog = (DLGTEMPLATEEX*)dialog->data; + dialog->lpDialog = (DLGTEMPLATEEX *)dialog->data; } return SDL_TRUE; } @@ -375,7 +374,7 @@ static SDL_bool AddDialogData(WIN_DialogData *dialog, const void *data, size_t s return SDL_FALSE; } - SDL_memcpy(dialog->data+dialog->used, data, size); + SDL_memcpy(dialog->data + dialog->used, data, size); dialog->used += size; return SDL_TRUE; @@ -388,12 +387,12 @@ static SDL_bool AddDialogString(WIN_DialogData *dialog, const char *string) size_t count; SDL_bool status; - if (!string) { + if (string == NULL) { string = ""; } wstring = WIN_UTF8ToStringW(string); - if (!wstring) { + if (wstring == NULL) { return SDL_FALSE; } @@ -404,7 +403,7 @@ static SDL_bool AddDialogString(WIN_DialogData *dialog, const char *string) } ++count; - status = AddDialogData(dialog, wstring, count*sizeof(WCHAR)); + status = AddDialogData(dialog, wstring, count * sizeof(WCHAR)); SDL_free(wstring); return status; } @@ -419,7 +418,6 @@ static void Vec2ToDLU(short *x, short *y) *y = MulDiv(*y, 8, s_BaseUnitsY); } - static SDL_bool AddDialogControl(WIN_DialogData *dialog, WORD type, DWORD style, DWORD exStyle, int x, int y, int w, int h, int id, const char *caption, WORD ordinal) { DLGITEMTEMPLATEEX item; @@ -523,7 +521,7 @@ static WIN_DialogData *CreateDialogData(int w, int h, const char *caption) Vec2ToDLU(&dialogTemplate.cx, &dialogTemplate.cy); dialog = (WIN_DialogData *)SDL_calloc(1, sizeof(*dialog)); - if (!dialog) { + if (dialog == NULL) { return NULL; } @@ -566,8 +564,10 @@ static WIN_DialogData *CreateDialogData(int w, int h, const char *caption) { HDC ScreenDC = GetDC(NULL); int LogicalPixelsY = GetDeviceCaps(ScreenDC, LOGPIXELSY); - if (!LogicalPixelsY) /* This can happen if the application runs out of GDI handles */ - LogicalPixelsY = 72; + if (!LogicalPixelsY) { + LogicalPixelsY = 72; /* This can happen if the application runs out of GDI handles */ + } + WordToPass = (WORD)(-72 * NCM.lfMessageFont.lfHeight / LogicalPixelsY); ReleaseDC(NULL, ScreenDC); } @@ -672,15 +672,14 @@ static const char *EscapeAmpersands(char **dst, size_t *dstlen, const char *src) } /* This function is called if a Task Dialog is unsupported. */ -static int -WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +static int WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { WIN_DialogData *dialog; int i, x, y, retval; HFONT DialogFont; SIZE Size; RECT TextSize; - wchar_t* wmessage; + wchar_t *wmessage; TEXTMETRIC TM; HDC FontDC; INT_PTR result; @@ -805,23 +804,24 @@ WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) } /* Ensure the size is wide enough for all of the buttons. */ - if (Size.cx < messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin) - Size.cx = messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin; + if (Size.cx < (LONG)messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin) { + Size.cx = (LONG)messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin; + } /* Reset the height to the icon size if it is actually bigger than the text. */ - if (icon && Size.cy < IconMargin * 2 + IconHeight) { - Size.cy = IconMargin * 2 + IconHeight; + if (icon && Size.cy < (LONG)IconMargin * 2 + IconHeight) { + Size.cy = (LONG)IconMargin * 2 + IconHeight; } /* Add vertical space for the buttons and border. */ Size.cy += ButtonHeight + TextMargin; dialog = CreateDialogData(Size.cx, Size.cy, messageboxdata->title); - if (!dialog) { + if (dialog == NULL) { return -1; } - if (icon && ! AddDialogStaticIcon(dialog, IconMargin, IconMargin, IconWidth, IconHeight, icon)) { + if (icon && !AddDialogStaticIcon(dialog, IconMargin, IconMargin, IconWidth, IconHeight, icon)) { FreeDialogData(dialog); return -1; } @@ -871,10 +871,10 @@ WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) /* If we have a parent window, get the Instance and HWND for them * so that our little dialog gets exclusive focus at all times. */ if (messageboxdata->window) { - ParentWindow = ((SDL_WindowData*)messageboxdata->window->driverdata)->hwnd; + ParentWindow = ((SDL_WindowData *)messageboxdata->window->driverdata)->hwnd; } - result = DialogBoxIndirectParam(NULL, (DLGTEMPLATE*)dialog->lpDialog, ParentWindow, MessageBoxDialogProc, (LPARAM)messageboxdata); + result = DialogBoxIndirectParam(NULL, (DLGTEMPLATE *)dialog->lpDialog, ParentWindow, MessageBoxDialogProc, (LPARAM)messageboxdata); if (result >= IDBUTTONINDEX0 && result - IDBUTTONINDEX0 < messageboxdata->numbuttons) { *buttonid = messageboxdata->buttons[result - IDBUTTONINDEX0].buttonid; retval = 0; @@ -905,10 +905,11 @@ WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) /* TaskDialogIndirect procedure * This is because SDL targets Windows XP (0x501), so this is not defined in the platform SDK. */ -typedef HRESULT(FAR WINAPI *TASKDIALOGINDIRECTPROC)(const TASKDIALOGCONFIG *pTaskConfig, int *pnButton, int *pnRadioButton, BOOL *pfVerificationFlagChecked); +/* *INDENT-OFF* */ /* clang-format off */ +typedef HRESULT (FAR WINAPI *TASKDIALOGINDIRECTPROC)(const TASKDIALOGCONFIG *pTaskConfig, int *pnButton, int *pnRadioButton, BOOL *pfVerificationFlagChecked); +/* *INDENT-ON* */ /* clang-format on */ -int -WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { HWND ParentWindow = NULL; wchar_t *wmessage; @@ -942,7 +943,7 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) If you don't want to bother with manifests, put this #pragma in your app's source code somewhere: pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") */ - pfnTaskDialogIndirect = (TASKDIALOGINDIRECTPROC) GetProcAddress(hComctl32, "TaskDialogIndirect"); + pfnTaskDialogIndirect = (TASKDIALOGINDIRECTPROC)GetProcAddress(hComctl32, "TaskDialogIndirect"); if (pfnTaskDialogIndirect == NULL) { FreeLibrary(hComctl32); return WIN_ShowOldMessageBox(messageboxdata, buttonid); @@ -951,14 +952,14 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) /* If we have a parent window, get the Instance and HWND for them so that our little dialog gets exclusive focus at all times. */ if (messageboxdata->window) { - ParentWindow = ((SDL_WindowData *) messageboxdata->window->driverdata)->hwnd; + ParentWindow = ((SDL_WindowData *)messageboxdata->window->driverdata)->hwnd; } wmessage = WIN_UTF8ToStringW(messageboxdata->message); wtitle = WIN_UTF8ToStringW(messageboxdata->title); SDL_zero(TaskConfig); - TaskConfig.cbSize = sizeof (TASKDIALOGCONFIG); + TaskConfig.cbSize = sizeof(TASKDIALOGCONFIG); TaskConfig.hwndParent = ParentWindow; TaskConfig.dwFlags = TDF_SIZE_TO_CONTENT; TaskConfig.pszWindowTitle = wtitle; @@ -974,11 +975,10 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) TaskConfig.pszContent = wmessage; TaskConfig.cButtons = messageboxdata->numbuttons; - pButtons = SDL_malloc(sizeof (TASKDIALOG_BUTTON) * messageboxdata->numbuttons); + pButtons = SDL_malloc(sizeof(TASKDIALOG_BUTTON) * messageboxdata->numbuttons); TaskConfig.nDefaultButton = 0; nCancelButton = 0; - for (i = 0; i < messageboxdata->numbuttons; i++) - { + for (i = 0; i < messageboxdata->numbuttons; i++) { const char *buttontext; if (messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT) { pButton = &pButtons[i]; @@ -999,7 +999,7 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) SDL_free(wmessage); SDL_free(wtitle); for (j = 0; j < i; j++) { - SDL_free((wchar_t *) pButtons[j].pszButtonText); + SDL_free((wchar_t *)pButtons[j].pszButtonText); } SDL_free(pButtons); return -1; @@ -1020,7 +1020,7 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) SDL_free(wmessage); SDL_free(wtitle); for (i = 0; i < messageboxdata->numbuttons; i++) { - SDL_free((wchar_t *) pButtons[i].pszButtonText); + SDL_free((wchar_t *)pButtons[i].pszButtonText); } SDL_free(pButtons); diff --git a/modules/SDL2/src/video/windows/SDL_windowsmodes.c b/modules/SDL2/src/video/windows/SDL_windowsmodes.c index b2f3f55..b8f47a1 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsmodes.c +++ b/modules/SDL2/src/video/windows/SDL_windowsmodes.c @@ -33,23 +33,22 @@ /* #define DEBUG_MODES */ /* #define HIGHDPI_DEBUG_VERBOSE */ -static void -WIN_UpdateDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * mode) +static void WIN_UpdateDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode *mode) { - SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; + SDL_DisplayModeData *data = (SDL_DisplayModeData *)mode->driverdata; HDC hdc; data->DeviceMode.dmFields = (DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY | DM_DISPLAYFLAGS); - if (index == ENUM_CURRENT_SETTINGS - && (hdc = CreateDC(deviceName, NULL, NULL, NULL)) != NULL) { + /* NOLINTNEXTLINE(bugprone-assignment-in-if-condition): No simple way to extract the assignment */ + if (index == ENUM_CURRENT_SETTINGS && (hdc = CreateDC(deviceName, NULL, NULL, NULL)) != NULL) { char bmi_data[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; LPBITMAPINFO bmi; HBITMAP hbm; - int logical_width = GetDeviceCaps( hdc, HORZRES ); - int logical_height = GetDeviceCaps( hdc, VERTRES ); + int logical_width = GetDeviceCaps(hdc, HORZRES); + int logical_height = GetDeviceCaps(hdc, VERTRES); /* High-DPI notes: @@ -62,9 +61,9 @@ WIN_UpdateDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * - GetDeviceCaps( hdc, HORZRES ) will return pixels, same as DeviceMode.dmPelsWidth */ mode->w = logical_width; mode->h = logical_height; - + SDL_zeroa(bmi_data); - bmi = (LPBITMAPINFO) bmi_data; + bmi = (LPBITMAPINFO)bmi_data; bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); hbm = CreateCompatibleBitmap(hdc, 1, 1); @@ -73,7 +72,7 @@ WIN_UpdateDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * DeleteObject(hbm); DeleteDC(hdc); if (bmi->bmiHeader.biCompression == BI_BITFIELDS) { - switch (*(Uint32 *) bmi->bmiColors) { + switch (*(Uint32 *)bmi->bmiColors) { case 0x00FF0000: mode->format = SDL_PIXELFORMAT_RGB888; break; @@ -119,8 +118,7 @@ WIN_UpdateDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * } } -static SDL_DisplayOrientation -WIN_GetDisplayOrientation(DEVMODE *mode) +static SDL_DisplayOrientation WIN_GetDisplayOrientation(DEVMODE *mode) { int width = mode->dmPelsWidth; int height = mode->dmPelsHeight; @@ -161,8 +159,7 @@ WIN_GetDisplayOrientation(DEVMODE *mode) } } -static SDL_bool -WIN_GetDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * mode, SDL_DisplayOrientation *orientation) +static SDL_bool WIN_GetDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode *mode, SDL_DisplayOrientation *orientation) { SDL_DisplayModeData *data; DEVMODE devmode; @@ -173,8 +170,8 @@ WIN_GetDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * mod return SDL_FALSE; } - data = (SDL_DisplayModeData *) SDL_malloc(sizeof(*data)); - if (!data) { + data = (SDL_DisplayModeData *)SDL_malloc(sizeof(*data)); + if (data == NULL) { return SDL_FALSE; } @@ -197,12 +194,13 @@ WIN_GetDisplayMode(_THIS, LPCWSTR deviceName, DWORD index, SDL_DisplayMode * mod } /* The win32 API calls in this function require Windows Vista or later. */ +/* *INDENT-OFF* */ /* clang-format off */ typedef LONG (WINAPI *SDL_WIN32PROC_GetDisplayConfigBufferSizes)(UINT32 flags, UINT32* numPathArrayElements, UINT32* numModeInfoArrayElements); typedef LONG (WINAPI *SDL_WIN32PROC_QueryDisplayConfig)(UINT32 flags, UINT32* numPathArrayElements, DISPLAYCONFIG_PATH_INFO* pathArray, UINT32* numModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO* modeInfoArray, DISPLAYCONFIG_TOPOLOGY_ID* currentTopologyId); typedef LONG (WINAPI *SDL_WIN32PROC_DisplayConfigGetDeviceInfo)(DISPLAYCONFIG_DEVICE_INFO_HEADER* requestPacket); +/* *INDENT-ON* */ /* clang-format on */ -static char * -WIN_GetDisplayNameVista(const WCHAR *deviceName) +static char *WIN_GetDisplayNameVista(const WCHAR *deviceName) { void *dll; SDL_WIN32PROC_GetDisplayConfigBufferSizes pGetDisplayConfigBufferSizes; @@ -217,15 +215,15 @@ WIN_GetDisplayNameVista(const WCHAR *deviceName) LONG rc; dll = SDL_LoadObject("USER32.DLL"); - if (!dll) { + if (dll == NULL) { return NULL; } - pGetDisplayConfigBufferSizes = (SDL_WIN32PROC_GetDisplayConfigBufferSizes) SDL_LoadFunction(dll, "GetDisplayConfigBufferSizes"); - pQueryDisplayConfig = (SDL_WIN32PROC_QueryDisplayConfig) SDL_LoadFunction(dll, "QueryDisplayConfig"); - pDisplayConfigGetDeviceInfo = (SDL_WIN32PROC_DisplayConfigGetDeviceInfo) SDL_LoadFunction(dll, "DisplayConfigGetDeviceInfo"); + pGetDisplayConfigBufferSizes = (SDL_WIN32PROC_GetDisplayConfigBufferSizes)SDL_LoadFunction(dll, "GetDisplayConfigBufferSizes"); + pQueryDisplayConfig = (SDL_WIN32PROC_QueryDisplayConfig)SDL_LoadFunction(dll, "QueryDisplayConfig"); + pDisplayConfigGetDeviceInfo = (SDL_WIN32PROC_DisplayConfigGetDeviceInfo)SDL_LoadFunction(dll, "DisplayConfigGetDeviceInfo"); - if (!pGetDisplayConfigBufferSizes || !pQueryDisplayConfig || !pDisplayConfigGetDeviceInfo) { + if (pGetDisplayConfigBufferSizes == NULL || pQueryDisplayConfig == NULL || pDisplayConfigGetDeviceInfo == NULL) { goto WIN_GetDisplayNameVista_failed; } @@ -238,8 +236,8 @@ WIN_GetDisplayNameVista(const WCHAR *deviceName) SDL_free(paths); SDL_free(modes); - paths = (DISPLAYCONFIG_PATH_INFO *) SDL_malloc(sizeof (DISPLAYCONFIG_PATH_INFO) * pathCount); - modes = (DISPLAYCONFIG_MODE_INFO *) SDL_malloc(sizeof (DISPLAYCONFIG_MODE_INFO) * modeCount); + paths = (DISPLAYCONFIG_PATH_INFO *)SDL_malloc(sizeof(DISPLAYCONFIG_PATH_INFO) * pathCount); + modes = (DISPLAYCONFIG_MODE_INFO *)SDL_malloc(sizeof(DISPLAYCONFIG_MODE_INFO) * modeCount); if ((paths == NULL) || (modes == NULL)) { goto WIN_GetDisplayNameVista_failed; } @@ -255,7 +253,7 @@ WIN_GetDisplayNameVista(const WCHAR *deviceName) SDL_zero(sourceName); sourceName.header.adapterId = paths[i].targetInfo.adapterId; sourceName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; - sourceName.header.size = sizeof (sourceName); + sourceName.header.size = sizeof(sourceName); sourceName.header.id = paths[i].sourceInfo.id; rc = pDisplayConfigGetDeviceInfo(&sourceName.header); if (rc != ERROR_SUCCESS) { @@ -268,7 +266,7 @@ WIN_GetDisplayNameVista(const WCHAR *deviceName) targetName.header.adapterId = paths[i].targetInfo.adapterId; targetName.header.id = paths[i].targetInfo.id; targetName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME; - targetName.header.size = sizeof (targetName); + targetName.header.size = sizeof(targetName); rc = pDisplayConfigGetDeviceInfo(&targetName.header); if (rc == ERROR_SUCCESS) { retval = WIN_StringToUTF8W(targetName.monitorFriendlyDeviceName); @@ -296,10 +294,9 @@ WIN_GetDisplayNameVista_failed: return NULL; } -static SDL_bool -WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, SDL_bool send_event) +static void WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, int *display_index, SDL_bool send_event) { - int i; + int i, index = *display_index; SDL_VideoDisplay display; SDL_DisplayData *displaydata; SDL_DisplayMode mode; @@ -310,31 +307,53 @@ WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, SDL_bool se #endif if (!WIN_GetDisplayMode(_this, info->szDevice, ENUM_CURRENT_SETTINGS, &mode, &orientation)) { - return SDL_FALSE; + return; } // Prevent adding duplicate displays. Do this after we know the display is // ready to be added to allow any displays that we can't fully query to be // removed - for(i = 0; i < _this->num_displays; ++i) { + for (i = 0; i < _this->num_displays; ++i) { SDL_DisplayData *driverdata = (SDL_DisplayData *)_this->displays[i].driverdata; if (SDL_wcscmp(driverdata->DeviceName, info->szDevice) == 0) { + SDL_bool moved = (index != i); + + if (index >= _this->num_displays) { + return; + } + + if (moved) { + SDL_VideoDisplay tmp; + + SDL_memcpy(&tmp, &_this->displays[index], sizeof(tmp)); + SDL_memcpy(&_this->displays[index], &_this->displays[i], sizeof(tmp)); + SDL_memcpy(&_this->displays[i], &tmp, sizeof(tmp)); + i = index; + } + driverdata->MonitorHandle = hMonitor; driverdata->IsValid = SDL_TRUE; if (!_this->setting_display_mode) { + SDL_Rect bounds; + SDL_ResetDisplayModes(i); SDL_SetCurrentDisplayMode(&_this->displays[i], &mode); SDL_SetDesktopDisplayMode(&_this->displays[i], &mode); + if (WIN_GetDisplayBounds(_this, &_this->displays[i], &bounds) == 0) { + if (SDL_memcmp(&driverdata->bounds, &bounds, sizeof(bounds)) != 0 || moved) { + SDL_SendDisplayEvent(&_this->displays[i], SDL_DISPLAYEVENT_MOVED, 0); + } + } SDL_SendDisplayEvent(&_this->displays[i], SDL_DISPLAYEVENT_ORIENTATION, orientation); } - return SDL_FALSE; + goto done; } } - displaydata = (SDL_DisplayData *) SDL_calloc(1, sizeof(*displaydata)); - if (!displaydata) { - return SDL_FALSE; + displaydata = (SDL_DisplayData *)SDL_calloc(1, sizeof(*displaydata)); + if (displaydata == NULL) { + return; } SDL_memcpy(displaydata->DeviceName, info->szDevice, sizeof(displaydata->DeviceName)); displaydata->MonitorHandle = hMonitor; @@ -345,7 +364,7 @@ WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, SDL_bool se if (display.name == NULL) { DISPLAY_DEVICEW device; SDL_zero(device); - device.cb = sizeof (device); + device.cb = sizeof(device); if (EnumDisplayDevicesW(info->szDevice, 0, &device, 0)) { display.name = WIN_StringToUTF8W(device.DeviceString); } @@ -354,25 +373,31 @@ WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, SDL_bool se display.desktop_mode = mode; display.current_mode = mode; display.orientation = orientation; + display.device = _this; display.driverdata = displaydata; - SDL_AddVideoDisplay(&display, send_event); + WIN_GetDisplayBounds(_this, &display, &displaydata->bounds); + index = SDL_AddVideoDisplay(&display, send_event); + SDL_assert(index == *display_index); SDL_free(display.name); - return SDL_TRUE; + +done: + *display_index += 1; } -typedef struct _WIN_AddDisplaysData { +typedef struct _WIN_AddDisplaysData +{ SDL_VideoDevice *video_device; + int display_index; SDL_bool send_event; SDL_bool want_primary; } WIN_AddDisplaysData; -static BOOL CALLBACK -WIN_AddDisplaysCallback(HMONITOR hMonitor, - HDC hdcMonitor, - LPRECT lprcMonitor, - LPARAM dwData) +static BOOL CALLBACK WIN_AddDisplaysCallback(HMONITOR hMonitor, + HDC hdcMonitor, + LPRECT lprcMonitor, + LPARAM dwData) { - WIN_AddDisplaysData *data = (WIN_AddDisplaysData*)dwData; + WIN_AddDisplaysData *data = (WIN_AddDisplaysData *)dwData; MONITORINFOEXW info; SDL_zero(info); @@ -382,7 +407,7 @@ WIN_AddDisplaysCallback(HMONITOR hMonitor, const SDL_bool is_primary = ((info.dwFlags & MONITORINFOF_PRIMARY) == MONITORINFOF_PRIMARY); if (is_primary == data->want_primary) { - WIN_AddDisplay(data->video_device, hMonitor, &info, data->send_event); + WIN_AddDisplay(data->video_device, hMonitor, &info, &data->display_index, data->send_event); } } @@ -390,11 +415,11 @@ WIN_AddDisplaysCallback(HMONITOR hMonitor, return TRUE; } -static void -WIN_AddDisplays(_THIS, SDL_bool send_event) +static void WIN_AddDisplays(_THIS, SDL_bool send_event) { WIN_AddDisplaysData callback_data; callback_data.video_device = _this; + callback_data.display_index = 0; callback_data.send_event = send_event; callback_data.want_primary = SDL_TRUE; @@ -404,8 +429,7 @@ WIN_AddDisplays(_THIS, SDL_bool send_event) EnumDisplayMonitors(NULL, NULL, WIN_AddDisplaysCallback, (LPARAM)&callback_data); } -int -WIN_InitModes(_THIS) +int WIN_InitModes(_THIS) { WIN_AddDisplays(_this, SDL_FALSE); @@ -416,13 +440,12 @@ WIN_InitModes(_THIS) } /** - * Convert the monitor rect and work rect from pixels to the SDL coordinate system (monitor origins are in pixels, + * Convert the monitor rect and work rect from pixels to the SDL coordinate system (monitor origins are in pixels, * monitor size in DPI-scaled points). - * + * * No-op if DPI scaling is not enabled. */ -static void -WIN_MonitorInfoToSDL(const SDL_VideoData *videodata, HMONITOR monitor, MONITORINFO *info) +static void WIN_MonitorInfoToSDL(const SDL_VideoData *videodata, HMONITOR monitor, MONITORINFO *info) { UINT xdpi, ydpi; @@ -444,14 +467,13 @@ WIN_MonitorInfoToSDL(const SDL_VideoData *videodata, HMONITOR monitor, MONITORIN info->rcMonitor.bottom = info->rcMonitor.top + MulDiv(info->rcMonitor.bottom - info->rcMonitor.top, 96, ydpi); /* Convert monitor work rect to points */ - info->rcWork.left = info->rcMonitor.left + MulDiv(info->rcWork.left - info->rcMonitor.left, 96, xdpi); - info->rcWork.right = info->rcMonitor.left + MulDiv(info->rcWork.right - info->rcMonitor.left, 96, xdpi); - info->rcWork.top = info->rcMonitor.top + MulDiv(info->rcWork.top - info->rcMonitor.top, 96, ydpi); - info->rcWork.bottom = info->rcMonitor.top + MulDiv(info->rcWork.bottom - info->rcMonitor.top, 96, ydpi); + info->rcWork.left = info->rcMonitor.left + MulDiv(info->rcWork.left - info->rcMonitor.left, 96, xdpi); + info->rcWork.right = info->rcMonitor.left + MulDiv(info->rcWork.right - info->rcMonitor.left, 96, xdpi); + info->rcWork.top = info->rcMonitor.top + MulDiv(info->rcWork.top - info->rcMonitor.top, 96, ydpi); + info->rcWork.bottom = info->rcMonitor.top + MulDiv(info->rcWork.bottom - info->rcMonitor.top, 96, ydpi); } -int -WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) { const SDL_DisplayData *data = (const SDL_DisplayData *)display->driverdata; const SDL_VideoData *videodata = (SDL_VideoData *)display->device->driverdata; @@ -475,13 +497,12 @@ WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) return 0; } -int -WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi_out, float * hdpi_out, float * vdpi_out) +int WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi_out, float *hdpi_out, float *vdpi_out) { const SDL_DisplayData *displaydata = (SDL_DisplayData *)display->driverdata; const SDL_VideoData *videodata = (SDL_VideoData *)display->device->driverdata; float hdpi = 0, vdpi = 0, ddpi = 0; - + if (videodata->GetDpiForMonitor) { UINT hdpi_uint, vdpi_uint; // Windows 8.1+ codepath @@ -534,8 +555,7 @@ WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi_out, float * h return ddpi != 0.0f ? 0 : SDL_SetError("Couldn't get DPI"); } -int -WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) +int WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) { const SDL_DisplayData *data = (const SDL_DisplayData *)display->driverdata; const SDL_VideoData *videodata = (SDL_VideoData *)display->device->driverdata; @@ -560,11 +580,11 @@ WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) } /** - * Convert a point from the SDL coordinate system (monitor origins are in pixels, + * Convert a point from the SDL coordinate system (monitor origins are in pixels, * offset within a monitor in DPI-scaled points) to Windows virtual screen coordinates (pixels). - * + * * No-op if DPI scaling is not enabled (returns 96 dpi). - * + * * Returns the DPI of the monitor that was closest to x, y and used for the conversion. */ void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut) @@ -576,14 +596,14 @@ void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut) float ddpi, hdpi, vdpi; int x_sdl, y_sdl; SDL_Point point; - point.x = *x; - point.y = *y; + point.x = *x; + point.y = *y; if (dpiOut) { *dpiOut = 96; } - if (!videodevice || !videodevice->driverdata) { + if (videodevice == NULL || !videodevice->driverdata) { return; } @@ -599,13 +619,12 @@ void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut) return; } - if (SDL_GetDisplayBounds(displayIndex, &bounds) < 0 - || SDL_GetDisplayDPI(displayIndex, &ddpi, &hdpi, &vdpi) < 0) { + if (SDL_GetDisplayBounds(displayIndex, &bounds) < 0 || SDL_GetDisplayDPI(displayIndex, &ddpi, &hdpi, &vdpi) < 0) { return; } if (dpiOut) { - *dpiOut = (int) ddpi; + *dpiOut = (int)ddpi; } /* Undo the DPI-scaling within the monitor bounds to convert back to pixels */ @@ -616,7 +635,7 @@ void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut) #ifdef HIGHDPI_DEBUG_VERBOSE SDL_Log("WIN_ScreenPointFromSDL: (%d, %d) points -> (%d x %d) pixels, using %d DPI monitor", - x_sdl, y_sdl, *x, *y, (int)ddpi); + x_sdl, y_sdl, *x, *y, (int)ddpi); #endif } @@ -637,7 +656,7 @@ void WIN_ScreenPointToSDL(int *x, int *y) float ddpi, hdpi, vdpi; int x_pixels, y_pixels; - if (!videodevice || !videodevice->driverdata) { + if (videodevice == NULL || !videodevice->driverdata) { return; } @@ -645,7 +664,7 @@ void WIN_ScreenPointToSDL(int *x, int *y) if (!videodata->dpi_scaling_enabled) { return; } - + point.x = *x; point.y = *y; monitor = MonitorFromPoint(point, MONITOR_DEFAULTTONEAREST); @@ -663,8 +682,7 @@ void WIN_ScreenPointToSDL(int *x, int *y) } /* Get SDL display properties */ - if (SDL_GetDisplayBounds(displayIndex, &bounds) < 0 - || SDL_GetDisplayDPI(displayIndex, &ddpi, &hdpi, &vdpi) < 0) { + if (SDL_GetDisplayBounds(displayIndex, &bounds) < 0 || SDL_GetDisplayDPI(displayIndex, &ddpi, &hdpi, &vdpi) < 0) { return; } @@ -676,18 +694,17 @@ void WIN_ScreenPointToSDL(int *x, int *y) #ifdef HIGHDPI_DEBUG_VERBOSE SDL_Log("WIN_ScreenPointToSDL: (%d, %d) pixels -> (%d x %d) points, using %d DPI monitor", - x_pixels, y_pixels, *x, *y, (int)ddpi); + x_pixels, y_pixels, *x, *y, (int)ddpi); #endif } -void -WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display) +void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { - SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; + SDL_DisplayData *data = (SDL_DisplayData *)display->driverdata; DWORD i; SDL_DisplayMode mode; - for (i = 0; ; ++i) { + for (i = 0;; ++i) { if (!WIN_GetDisplayMode(_this, data->DeviceName, i, &mode, NULL)) { break; } @@ -707,8 +724,7 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } #ifdef DEBUG_MODES -static void -WIN_LogMonitor(_THIS, HMONITOR mon) +static void WIN_LogMonitor(_THIS, HMONITOR mon) { const SDL_VideoData *vid_data = (const SDL_VideoData *)_this->driverdata; MONITORINFOEX minfo; @@ -726,22 +742,21 @@ WIN_LogMonitor(_THIS, HMONITOR mon) name_utf8 = WIN_StringToUTF8(minfo.szDevice); SDL_Log("WIN_LogMonitor: monitor \"%s\": dpi: %d windows screen coordinates: %d, %d, %dx%d", - name_utf8, - xdpi, - minfo.rcMonitor.left, - minfo.rcMonitor.top, - minfo.rcMonitor.right - minfo.rcMonitor.left, - minfo.rcMonitor.bottom - minfo.rcMonitor.top); + name_utf8, + xdpi, + minfo.rcMonitor.left, + minfo.rcMonitor.top, + minfo.rcMonitor.right - minfo.rcMonitor.left, + minfo.rcMonitor.bottom - minfo.rcMonitor.top); SDL_free(name_utf8); } #endif -int -WIN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { - SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; - SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; + SDL_DisplayData *displaydata = (SDL_DisplayData *)display->driverdata; + SDL_DisplayModeData *data = (SDL_DisplayModeData *)mode->driverdata; LONG status; #ifdef DEBUG_MODES @@ -799,8 +814,7 @@ WIN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) return 0; } -void -WIN_RefreshDisplays(_THIS) +void WIN_RefreshDisplays(_THIS) { int i; @@ -825,8 +839,7 @@ WIN_RefreshDisplays(_THIS) } } -void -WIN_QuitModes(_THIS) +void WIN_QuitModes(_THIS) { /* All fullscreen windows should have restored modes by now */ } diff --git a/modules/SDL2/src/video/windows/SDL_windowsmodes.h b/modules/SDL2/src/video/windows/SDL_windowsmodes.h index 370fbdc..1fc5eef 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsmodes.h +++ b/modules/SDL2/src/video/windows/SDL_windowsmodes.h @@ -28,6 +28,7 @@ typedef struct WCHAR DeviceName[32]; HMONITOR MonitorHandle; SDL_bool IsValid; + SDL_Rect bounds; } SDL_DisplayData; typedef struct @@ -36,13 +37,13 @@ typedef struct } SDL_DisplayModeData; extern int WIN_InitModes(_THIS); -extern int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); -extern int WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); +extern int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); +extern int WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect); extern void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut); extern void WIN_ScreenPointToSDL(int *x, int *y); -extern int WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi); -extern void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -extern int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +extern int WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi); +extern void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +extern int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); extern void WIN_RefreshDisplays(_THIS); extern void WIN_QuitModes(_THIS); diff --git a/modules/SDL2/src/video/windows/SDL_windowsmouse.c b/modules/SDL2/src/video/windows/SDL_windowsmouse.c index 05ff34b..5844da7 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsmouse.c +++ b/modules/SDL2/src/video/windows/SDL_windowsmouse.c @@ -26,30 +26,28 @@ #include "../../events/SDL_mouse_c.h" - DWORD SDL_last_warp_time = 0; HCURSOR SDL_cursor = NULL; static SDL_Cursor *SDL_blank_cursor = NULL; static int rawInputEnableCount = 0; -static int -ToggleRawInput(SDL_bool enabled) +static int ToggleRawInput(SDL_bool enabled) { RAWINPUTDEVICE rawMouse = { 0x01, 0x02, 0, NULL }; /* Mouse: UsagePage = 1, Usage = 2 */ if (enabled) { rawInputEnableCount++; if (rawInputEnableCount > 1) { - return 0; /* already done. */ + return 0; /* already done. */ } } else { if (rawInputEnableCount == 0) { - return 0; /* already done. */ + return 0; /* already done. */ } rawInputEnableCount--; if (rawInputEnableCount > 0) { - return 0; /* not time to disable yet */ + return 0; /* not time to disable yet */ } } @@ -72,9 +70,7 @@ ToggleRawInput(SDL_bool enabled) return 0; } - -static SDL_Cursor * -WIN_CreateDefaultCursor() +static SDL_Cursor *WIN_CreateDefaultCursor() { SDL_Cursor *cursor; @@ -88,12 +84,11 @@ WIN_CreateDefaultCursor() return cursor; } -static SDL_Cursor * -WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *WIN_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { /* msdn says cursor mask has to be padded out to word alignment. Not sure if that means machine word or WORD, but this handles either case. */ - const size_t pad = (sizeof (size_t) * 8); /* 32 or 64, or whatever. */ + const size_t pad = (sizeof(size_t) * 8); /* 32 or 64, or whatever. */ SDL_Cursor *cursor; HICON hicon; HICON hcursor; @@ -113,9 +108,9 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) bmh.bV4BitCount = 32; bmh.bV4V4Compression = BI_BITFIELDS; bmh.bV4AlphaMask = 0xFF000000; - bmh.bV4RedMask = 0x00FF0000; + bmh.bV4RedMask = 0x00FF0000; bmh.bV4GreenMask = 0x0000FF00; - bmh.bV4BlueMask = 0x000000FF; + bmh.bV4BlueMask = 0x000000FF; maskbitslen = ((surface->w + (pad - (surface->w % pad))) / 8) * surface->h; maskbits = SDL_small_alloc(Uint8, maskbitslen, &isstack); @@ -132,14 +127,14 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) ii.fIcon = FALSE; ii.xHotspot = (DWORD)hot_x; ii.yHotspot = (DWORD)hot_y; - ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO*)&bmh, DIB_RGB_COLORS, &pixels, NULL, 0); + ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO *)&bmh, DIB_RGB_COLORS, &pixels, NULL, 0); ii.hbmMask = CreateBitmap(surface->w, surface->h, 1, 1, maskbits); ReleaseDC(NULL, hdc); SDL_small_free(maskbits, isstack); SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888); SDL_assert(surface->pitch == surface->w * 4); - SDL_memcpy(pixels, surface->pixels, surface->h * surface->pitch); + SDL_memcpy(pixels, surface->pixels, (size_t)surface->h * surface->pitch); hicon = CreateIconIndirect(&ii); @@ -172,8 +167,7 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) return cursor; } -static SDL_Cursor * -WIN_CreateBlankCursor() +static SDL_Cursor *WIN_CreateBlankCursor() { SDL_Cursor *cursor = NULL; SDL_Surface *surface = SDL_CreateRGBSurfaceWithFormat(0, 32, 32, 32, SDL_PIXELFORMAT_ARGB8888); @@ -184,29 +178,51 @@ WIN_CreateBlankCursor() return cursor; } -static SDL_Cursor * -WIN_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *WIN_CreateSystemCursor(SDL_SystemCursor id) { SDL_Cursor *cursor; LPCTSTR name; - switch(id) - { + switch (id) { default: SDL_assert(0); return NULL; - case SDL_SYSTEM_CURSOR_ARROW: name = IDC_ARROW; break; - case SDL_SYSTEM_CURSOR_IBEAM: name = IDC_IBEAM; break; - case SDL_SYSTEM_CURSOR_WAIT: name = IDC_WAIT; break; - case SDL_SYSTEM_CURSOR_CROSSHAIR: name = IDC_CROSS; break; - case SDL_SYSTEM_CURSOR_WAITARROW: name = IDC_WAIT; break; - case SDL_SYSTEM_CURSOR_SIZENWSE: name = IDC_SIZENWSE; break; - case SDL_SYSTEM_CURSOR_SIZENESW: name = IDC_SIZENESW; break; - case SDL_SYSTEM_CURSOR_SIZEWE: name = IDC_SIZEWE; break; - case SDL_SYSTEM_CURSOR_SIZENS: name = IDC_SIZENS; break; - case SDL_SYSTEM_CURSOR_SIZEALL: name = IDC_SIZEALL; break; - case SDL_SYSTEM_CURSOR_NO: name = IDC_NO; break; - case SDL_SYSTEM_CURSOR_HAND: name = IDC_HAND; break; + case SDL_SYSTEM_CURSOR_ARROW: + name = IDC_ARROW; + break; + case SDL_SYSTEM_CURSOR_IBEAM: + name = IDC_IBEAM; + break; + case SDL_SYSTEM_CURSOR_WAIT: + name = IDC_WAIT; + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + name = IDC_CROSS; + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + name = IDC_WAIT; + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + name = IDC_SIZENWSE; + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + name = IDC_SIZENESW; + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + name = IDC_SIZEWE; + break; + case SDL_SYSTEM_CURSOR_SIZENS: + name = IDC_SIZENS; + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + name = IDC_SIZEALL; + break; + case SDL_SYSTEM_CURSOR_NO: + name = IDC_NO; + break; + case SDL_SYSTEM_CURSOR_HAND: + name = IDC_HAND; + break; } cursor = SDL_calloc(1, sizeof(*cursor)); @@ -223,8 +239,7 @@ WIN_CreateSystemCursor(SDL_SystemCursor id) return cursor; } -static void -WIN_FreeCursor(SDL_Cursor * cursor) +static void WIN_FreeCursor(SDL_Cursor *cursor) { HICON hicon = (HICON)cursor->driverdata; @@ -232,10 +247,9 @@ WIN_FreeCursor(SDL_Cursor * cursor) SDL_free(cursor); } -static int -WIN_ShowCursor(SDL_Cursor * cursor) +static int WIN_ShowCursor(SDL_Cursor *cursor) { - if (!cursor) { + if (cursor == NULL) { cursor = SDL_blank_cursor; } if (cursor) { @@ -249,12 +263,11 @@ WIN_ShowCursor(SDL_Cursor * cursor) return 0; } -void -WIN_SetCursorPos(int x, int y) +void WIN_SetCursorPos(int x, int y) { /* We need to jitter the value because otherwise Windows will occasionally inexplicably ignore the SetCursorPos() or SendInput() */ SetCursorPos(x, y); - SetCursorPos(x+1, y); + SetCursorPos(x + 1, y); SetCursorPos(x, y); /* Flush any mouse motion prior to or associated with this warp */ @@ -264,8 +277,7 @@ WIN_SetCursorPos(int x, int y) } } -static void -WIN_WarpMouse(SDL_Window * window, int x, int y) +static void WIN_WarpMouse(SDL_Window *window, int x, int y) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -276,6 +288,7 @@ WIN_WarpMouse(SDL_Window * window, int x, int y) return; } + WIN_ClientPointFromSDL(window, &x, &y); pt.x = x; pt.y = y; ClientToScreen(hwnd, &pt); @@ -285,8 +298,7 @@ WIN_WarpMouse(SDL_Window * window, int x, int y) SDL_SendMouseMotion(window, SDL_GetMouse()->mouseID, 0, x, y); } -static int -WIN_WarpMouseGlobal(int x, int y) +static int WIN_WarpMouseGlobal(int x, int y) { POINT pt; @@ -297,21 +309,19 @@ WIN_WarpMouseGlobal(int x, int y) return 0; } -static int -WIN_SetRelativeMouseMode(SDL_bool enabled) +static int WIN_SetRelativeMouseMode(SDL_bool enabled) { return ToggleRawInput(enabled); } -static int -WIN_CaptureMouse(SDL_Window *window) +static int WIN_CaptureMouse(SDL_Window *window) { if (window) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SetCapture(data->hwnd); } else { SDL_Window *focus_window = SDL_GetMouseFocus(); - + if (focus_window) { SDL_WindowData *data = (SDL_WindowData *)focus_window->driverdata; if (!data->mouse_tracked) { @@ -324,16 +334,15 @@ WIN_CaptureMouse(SDL_Window *window) return 0; } -static Uint32 -WIN_GetGlobalMouseState(int *x, int *y) +static Uint32 WIN_GetGlobalMouseState(int *x, int *y) { Uint32 retval = 0; POINT pt = { 0, 0 }; SDL_bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0; GetCursorPos(&pt); - *x = (int) pt.x; - *y = (int) pt.y; + *x = (int)pt.x; + *y = (int)pt.y; WIN_ScreenPointToSDL(x, y); retval |= GetAsyncKeyState(!swapButtons ? VK_LBUTTON : VK_RBUTTON) & 0x8000 ? SDL_BUTTON_LMASK : 0; @@ -345,8 +354,7 @@ WIN_GetGlobalMouseState(int *x, int *y) return retval; } -void -WIN_InitMouse(_THIS) +void WIN_InitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -367,10 +375,9 @@ WIN_InitMouse(_THIS) WIN_UpdateMouseSystemScale(); } -void -WIN_QuitMouse(_THIS) +void WIN_QuitMouse(_THIS) { - if (rawInputEnableCount) { /* force RAWINPUT off here. */ + if (rawInputEnableCount) { /* force RAWINPUT off here. */ rawInputEnableCount = 1; ToggleRawInput(SDL_FALSE); } @@ -385,13 +392,12 @@ WIN_QuitMouse(_THIS) * https://superuser.com/questions/278362/windows-mouse-acceleration-curve-smoothmousexcurve-and-smoothmouseycurve * http://www.esreality.com/?a=post&id=1846538/ */ -static SDL_bool -LoadFiveFixedPointFloats(BYTE *bytes, float *values) +static SDL_bool LoadFiveFixedPointFloats(const BYTE *bytes, float *values) { int i; for (i = 0; i < 5; ++i) { - float fraction = (float)((Uint16) bytes[1] << 8 | bytes[0]) / 65535.0f; + float fraction = (float)((Uint16)bytes[1] << 8 | bytes[0]) / 65535.0f; float value = (float)(((Uint16)bytes[3] << 8) | bytes[2]) + fraction; *values++ = value; bytes += 8; @@ -399,10 +405,9 @@ LoadFiveFixedPointFloats(BYTE *bytes, float *values) return SDL_TRUE; } -static void -WIN_SetEnhancedMouseScale(int mouse_speed) +static void WIN_SetEnhancedMouseScale(int mouse_speed) { - float scale = (float) mouse_speed / 10.0f; + float scale = (float)mouse_speed / 10.0f; HKEY hKey; DWORD dwType = REG_BINARY; BYTE value[40]; @@ -414,7 +419,7 @@ WIN_SetEnhancedMouseScale(int mouse_speed) const int dpi = 96; // FIXME, how do we handle different monitors with different DPI? const float display_factor = 3.5f * (150.0f / dpi); - if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\\Mouse", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { + if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\\Mouse", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { if (RegQueryValueExW(hKey, L"SmoothMouseXCurve", 0, &dwType, value, &length) == ERROR_SUCCESS && LoadFiveFixedPointFloats(value, xpoints) && RegQueryValueExW(hKey, L"SmoothMouseYCurve", 0, &dwType, value, &length) == ERROR_SUCCESS && @@ -428,7 +433,7 @@ WIN_SetEnhancedMouseScale(int mouse_speed) } scale_points[i * 2] = xpoints[i]; scale_points[i * 2 + 1] = gain / display_factor; - //SDL_Log("Point %d = %f,%f\n", i, scale_points[i * 2], scale_points[i * 2 + 1]); + // SDL_Log("Point %d = %f,%f\n", i, scale_points[i * 2], scale_points[i * 2 + 1]); } SDL_SetMouseSystemScale(SDL_arraysize(scale_points), scale_points); } @@ -436,8 +441,7 @@ WIN_SetEnhancedMouseScale(int mouse_speed) } } -static void -WIN_SetLinearMouseScale(int mouse_speed) +static void WIN_SetLinearMouseScale(int mouse_speed) { static float mouse_speed_scale[] = { 0.0f, @@ -468,8 +472,7 @@ WIN_SetLinearMouseScale(int mouse_speed) } } -void -WIN_UpdateMouseSystemScale() +void WIN_UpdateMouseSystemScale() { int mouse_speed; int params[3] = { 0, 0, 0 }; diff --git a/modules/SDL2/src/video/windows/SDL_windowsopengl.c b/modules/SDL2/src/video/windows/SDL_windowsopengl.c index 3cb52fd..947e309 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsopengl.c +++ b/modules/SDL2/src/video/windows/SDL_windowsopengl.c @@ -20,7 +20,7 @@ */ #include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_WINDOWS && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) +#if SDL_VIDEO_DRIVER_WINDOWS #include "SDL_loadso.h" #include "SDL_windowsvideo.h" @@ -36,12 +36,12 @@ #ifndef WGL_ARB_create_context #define WGL_ARB_create_context -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 #ifndef WGL_ARB_create_context_profile #define WGL_ARB_create_context_profile @@ -52,53 +52,62 @@ #ifndef WGL_ARB_create_context_robustness #define WGL_ARB_create_context_robustness -#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 -#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 #endif #endif #ifndef WGL_EXT_create_context_es2_profile #define WGL_EXT_create_context_es2_profile -#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 #endif #ifndef WGL_EXT_create_context_es_profile #define WGL_EXT_create_context_es_profile -#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 #endif #ifndef WGL_ARB_framebuffer_sRGB #define WGL_ARB_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 #endif #ifndef WGL_ARB_pixel_format_float #define WGL_ARB_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 #endif #ifndef WGL_ARB_context_flush_control #define WGL_ARB_context_flush_control -#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 -#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000 -#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 #endif #ifndef WGL_ARB_create_context_no_error #define WGL_ARB_create_context_no_error -#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 #endif -typedef HGLRC(APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, - HGLRC - hShareContext, - const int - *attribList); +typedef HGLRC(APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC, + HGLRC + hShareContext, + const int + *attribList); + +#if __XBOXONE__ || __XBOXSERIES__ +#define GetDC(hwnd) (HDC) hwnd +#define ReleaseDC(hwnd, hdc) 1 +#define SwapBuffers _this->gl_data->wglSwapBuffers +#define DescribePixelFormat _this->gl_data->wglDescribePixelFormat +#define ChoosePixelFormat _this->gl_data->wglChoosePixelFormat +#define GetPixelFormat _this->gl_data->wglGetPixelFormat +#define SetPixelFormat _this->gl_data->wglSetPixelFormat +#endif -int -WIN_GL_LoadLibrary(_THIS, const char *path) +int WIN_GL_LoadLibrary(_THIS, const char *path) { void *handle; @@ -116,28 +125,51 @@ WIN_GL_LoadLibrary(_THIS, const char *path) SDL_arraysize(_this->gl_config.driver_path)); /* Allocate OpenGL memory */ - _this->gl_data = (struct SDL_GLDriverData *) SDL_calloc(1, sizeof(struct SDL_GLDriverData)); + _this->gl_data = (struct SDL_GLDriverData *)SDL_calloc(1, sizeof(struct SDL_GLDriverData)); if (!_this->gl_data) { return SDL_OutOfMemory(); } /* Load function pointers */ handle = _this->gl_config.dll_handle; - _this->gl_data->wglGetProcAddress = (void *(WINAPI *) (const char *)) + /* *INDENT-OFF* */ /* clang-format off */ + _this->gl_data->wglGetProcAddress = (void *(WINAPI *)(const char *)) SDL_LoadFunction(handle, "wglGetProcAddress"); - _this->gl_data->wglCreateContext = (HGLRC(WINAPI *) (HDC)) + _this->gl_data->wglCreateContext = (HGLRC (WINAPI *)(HDC)) SDL_LoadFunction(handle, "wglCreateContext"); - _this->gl_data->wglDeleteContext = (BOOL(WINAPI *) (HGLRC)) + _this->gl_data->wglDeleteContext = (BOOL (WINAPI *)(HGLRC)) SDL_LoadFunction(handle, "wglDeleteContext"); - _this->gl_data->wglMakeCurrent = (BOOL(WINAPI *) (HDC, HGLRC)) + _this->gl_data->wglMakeCurrent = (BOOL (WINAPI *)(HDC, HGLRC)) SDL_LoadFunction(handle, "wglMakeCurrent"); - _this->gl_data->wglShareLists = (BOOL(WINAPI *) (HGLRC, HGLRC)) + _this->gl_data->wglShareLists = (BOOL (WINAPI *)(HGLRC, HGLRC)) SDL_LoadFunction(handle, "wglShareLists"); + /* *INDENT-ON* */ /* clang-format on */ + +#if __XBOXONE__ || __XBOXSERIES__ + _this->gl_data->wglSwapBuffers = (BOOL(WINAPI *)(HDC)) + SDL_LoadFunction(handle, "wglSwapBuffers"); + _this->gl_data->wglDescribePixelFormat = (int(WINAPI *)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)) + SDL_LoadFunction(handle, "wglDescribePixelFormat"); + _this->gl_data->wglChoosePixelFormat = (int(WINAPI *)(HDC, const PIXELFORMATDESCRIPTOR *)) + SDL_LoadFunction(handle, "wglChoosePixelFormat"); + _this->gl_data->wglSetPixelFormat = (BOOL(WINAPI *)(HDC, int, const PIXELFORMATDESCRIPTOR *)) + SDL_LoadFunction(handle, "wglSetPixelFormat"); + _this->gl_data->wglGetPixelFormat = (int(WINAPI *)(HDC hdc)) + SDL_LoadFunction(handle, "wglGetPixelFormat"); +#endif if (!_this->gl_data->wglGetProcAddress || !_this->gl_data->wglCreateContext || !_this->gl_data->wglDeleteContext || - !_this->gl_data->wglMakeCurrent) { + !_this->gl_data->wglMakeCurrent +#if __XBOXONE__ || __XBOXSERIES__ + || !_this->gl_data->wglSwapBuffers || + !_this->gl_data->wglDescribePixelFormat || + !_this->gl_data->wglChoosePixelFormat || + !_this->gl_data->wglGetPixelFormat || + !_this->gl_data->wglSetPixelFormat +#endif + ) { return SDL_SetError("Could not retrieve OpenGL functions"); } @@ -182,22 +214,20 @@ WIN_GL_LoadLibrary(_THIS, const char *path) return 0; } -void * -WIN_GL_GetProcAddress(_THIS, const char *proc) +void *WIN_GL_GetProcAddress(_THIS, const char *proc) { void *func; /* This is to pick up extensions */ func = _this->gl_data->wglGetProcAddress(proc); - if (!func) { + if (func == NULL) { /* This is probably a normal GL function */ func = GetProcAddress(_this->gl_config.dll_handle, proc); } return func; } -void -WIN_GL_UnloadLibrary(_THIS) +void WIN_GL_UnloadLibrary(_THIS) { SDL_UnloadObject(_this->gl_config.dll_handle); _this->gl_config.dll_handle = NULL; @@ -207,8 +237,7 @@ WIN_GL_UnloadLibrary(_THIS) _this->gl_data = NULL; } -static void -WIN_GL_SetupPixelFormat(_THIS, PIXELFORMATDESCRIPTOR * pfd) +static void WIN_GL_SetupPixelFormat(_THIS, PIXELFORMATDESCRIPTOR *pfd) { SDL_zerop(pfd); pfd->nSize = sizeof(*pfd); @@ -246,8 +275,7 @@ WIN_GL_SetupPixelFormat(_THIS, PIXELFORMATDESCRIPTOR * pfd) /* Choose the closest pixel format that meets or exceeds the target. FIXME: Should we weight any particular attribute over any other? */ -static int -WIN_GL_ChoosePixelFormat(HDC hdc, PIXELFORMATDESCRIPTOR * target) +static int WIN_GL_ChoosePixelFormat(_THIS, HDC hdc, PIXELFORMATDESCRIPTOR *target) { PIXELFORMATDESCRIPTOR pfd; int count, index, best = 0; @@ -344,19 +372,20 @@ WIN_GL_ChoosePixelFormat(HDC hdc, PIXELFORMATDESCRIPTOR * target) return best; } -static SDL_bool -HasExtension(const char *extension, const char *extensions) +static SDL_bool HasExtension(const char *extension, const char *extensions) { const char *start; const char *where, *terminator; /* Extension names should not have spaces. */ where = SDL_strchr(extension, ' '); - if (where || *extension == '\0') + if (where || *extension == '\0') { return SDL_FALSE; + } - if (!extensions) + if (extensions == NULL) { return SDL_FALSE; + } /* It takes a bit of care to be fool-proof about parsing the * OpenGL extensions string. Don't be fooled by sub-strings, @@ -366,23 +395,27 @@ HasExtension(const char *extension, const char *extensions) for (;;) { where = SDL_strstr(start, extension); - if (!where) + if (where == NULL) { break; + } terminator = where + SDL_strlen(extension); - if (where == start || *(where - 1) == ' ') - if (*terminator == ' ' || *terminator == '\0') + if (where == start || *(where - 1) == ' ') { + if (*terminator == ' ' || *terminator == '\0') { return SDL_TRUE; + } + } start = terminator; } return SDL_FALSE; } -void -WIN_GL_InitExtensions(_THIS) +void WIN_GL_InitExtensions(_THIS) { - const char *(WINAPI * wglGetExtensionsStringARB) (HDC) = 0; + /* *INDENT-OFF* */ /* clang-format off */ + const char *(WINAPI * wglGetExtensionsStringARB)(HDC) = 0; + /* *INDENT-ON* */ /* clang-format on */ const char *extensions; HWND hwnd; HDC hdc; @@ -395,7 +428,7 @@ WIN_GL_InitExtensions(_THIS) hwnd = CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0, - 10, 10, NULL, NULL, SDL_Instance, NULL); + 10, 10, NULL, NULL, SDL_Instance, NULL); if (!hwnd) { return; } @@ -413,8 +446,10 @@ WIN_GL_InitExtensions(_THIS) } _this->gl_data->wglMakeCurrent(hdc, hglrc); - wglGetExtensionsStringARB = (const char *(WINAPI *) (HDC)) + /* *INDENT-OFF* */ /* clang-format off */ + wglGetExtensionsStringARB = (const char *(WINAPI *)(HDC)) _this->gl_data->wglGetProcAddress("wglGetExtensionsStringARB"); + /* *INDENT-ON* */ /* clang-format on */ if (wglGetExtensionsStringARB) { extensions = wglGetExtensionsStringARB(hdc); } else { @@ -424,14 +459,14 @@ WIN_GL_InitExtensions(_THIS) /* Check for WGL_ARB_pixel_format */ _this->gl_data->HAS_WGL_ARB_pixel_format = SDL_FALSE; if (HasExtension("WGL_ARB_pixel_format", extensions)) { - _this->gl_data->wglChoosePixelFormatARB = (BOOL(WINAPI *) - (HDC, const int *, - const FLOAT *, UINT, - int *, UINT *)) + /* *INDENT-OFF* */ /* clang-format off */ + _this->gl_data->wglChoosePixelFormatARB = + (BOOL (WINAPI *)(HDC, const int *, const FLOAT *, UINT, int *, UINT *)) WIN_GL_GetProcAddress(_this, "wglChoosePixelFormatARB"); _this->gl_data->wglGetPixelFormatAttribivARB = - (BOOL(WINAPI *) (HDC, int, int, UINT, const int *, int *)) + (BOOL (WINAPI *)(HDC, int, int, UINT, const int *, int *)) WIN_GL_GetProcAddress(_this, "wglGetPixelFormatAttribivARB"); + /* *INDENT-ON* */ /* clang-format on */ if ((_this->gl_data->wglChoosePixelFormatARB != NULL) && (_this->gl_data->wglGetPixelFormatAttribivARB != NULL)) { @@ -458,8 +493,7 @@ WIN_GL_InitExtensions(_THIS) if (HasExtension("WGL_EXT_create_context_es2_profile", extensions)) { SDL_GL_DeduceMaxSupportedESProfile( &_this->gl_data->es_profile_max_supported_version.major, - &_this->gl_data->es_profile_max_supported_version.minor - ); + &_this->gl_data->es_profile_max_supported_version.minor); } /* Check for WGL_ARB_context_flush_control */ @@ -484,8 +518,7 @@ WIN_GL_InitExtensions(_THIS) WIN_PumpEvents(_this); } -static int -WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs) +static int WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs) { HWND hwnd; HDC hdc; @@ -526,10 +559,9 @@ WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs) } /* actual work of WIN_GL_SetupWindow() happens here. */ -static int -WIN_GL_SetupWindowInternal(_THIS, SDL_Window * window) +static int WIN_GL_SetupWindowInternal(_THIS, SDL_Window *window) { - HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc; + HDC hdc = ((SDL_WindowData *)window->driverdata)->hdc; PIXELFORMATDESCRIPTOR pfd; int pixel_format = 0; int iAttribs[64]; @@ -629,13 +661,13 @@ WIN_GL_SetupWindowInternal(_THIS, SDL_Window * window) pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs); /* App said "don't care about accel" and FULL accel failed. Try NO. */ - if ( ( !pixel_format ) && ( _this->gl_config.accelerated < 0 ) ) { + if ((!pixel_format) && (_this->gl_config.accelerated < 0)) { *iAccelAttr = WGL_NO_ACCELERATION_ARB; pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs); - *iAccelAttr = WGL_FULL_ACCELERATION_ARB; /* if we try again. */ + *iAccelAttr = WGL_FULL_ACCELERATION_ARB; /* if we try again. */ } if (!pixel_format) { - pixel_format = WIN_GL_ChoosePixelFormat(hdc, &pfd); + pixel_format = WIN_GL_ChoosePixelFormat(_this, hdc, &pfd); } if (!pixel_format) { return SDL_SetError("No matching GL pixel format available"); @@ -646,8 +678,7 @@ WIN_GL_SetupWindowInternal(_THIS, SDL_Window * window) return 0; } -int -WIN_GL_SetupWindow(_THIS, SDL_Window * window) +int WIN_GL_SetupWindow(_THIS, SDL_Window *window) { /* The current context is lost in here; save it and reset it. */ SDL_Window *current_win = SDL_GL_GetCurrentWindow(); @@ -657,27 +688,21 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window) return retval; } -SDL_bool -WIN_GL_UseEGL(_THIS) +SDL_bool WIN_GL_UseEGL(_THIS) { SDL_assert(_this->gl_data != NULL); SDL_assert(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES); - return (SDL_GetHintBoolean(SDL_HINT_OPENGL_ES_DRIVER, SDL_FALSE) - || _this->gl_config.major_version == 1 /* No WGL extension for OpenGL ES 1.x profiles. */ - || _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major - || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major - && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor)); + return SDL_GetHintBoolean(SDL_HINT_OPENGL_ES_DRIVER, SDL_FALSE) || _this->gl_config.major_version == 1 || _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor); /* No WGL extension for OpenGL ES 1.x profiles. */ } -SDL_GLContext -WIN_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window *window) { - HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc; + HDC hdc = ((SDL_WindowData *)window->driverdata)->hdc; HGLRC context, share_context; if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES && WIN_GL_UseEGL(_this)) { -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL /* Switch to EGL based functions */ WIN_GL_UnloadLibrary(_this); _this->GL_LoadLibrary = WIN_GLES_LoadLibrary; @@ -689,11 +714,11 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) _this->GL_GetSwapInterval = WIN_GLES_GetSwapInterval; _this->GL_SwapWindow = WIN_GLES_SwapWindow; _this->GL_DeleteContext = WIN_GLES_DeleteContext; - + if (WIN_GLES_LoadLibrary(_this, NULL) != 0) { return NULL; } - + return WIN_GLES_CreateContext(_this, window); #else SDL_SetError("SDL not configured with EGL support"); @@ -712,7 +737,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) _this->gl_config.flags == 0) { /* Create legacy context */ context = _this->gl_data->wglCreateContext(hdc); - if( share_context != 0 ) { + if (share_context != 0) { _this->gl_data->wglShareLists(share_context, context); } } else { @@ -730,13 +755,12 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) } wglCreateContextAttribsARB = - (PFNWGLCREATECONTEXTATTRIBSARBPROC) _this->gl_data-> - wglGetProcAddress("wglCreateContextAttribsARB"); + (PFNWGLCREATECONTEXTATTRIBSARBPROC)_this->gl_data->wglGetProcAddress("wglCreateContextAttribsARB"); if (!wglCreateContextAttribsARB) { SDL_SetError("GL 3.x is not supported"); context = temp_context; } else { - int attribs[15]; /* max 14 attributes plus terminator */ + int attribs[15]; /* max 14 attributes plus terminator */ int iattr = 0; attribs[iattr++] = WGL_CONTEXT_MAJOR_VERSION_ARB; @@ -756,24 +780,20 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) attribs[iattr++] = _this->gl_config.flags; } - /* only set if wgl extension is available */ - if (_this->gl_data->HAS_WGL_ARB_context_flush_control) { + /* only set if wgl extension is available and not the default setting */ + if ((_this->gl_data->HAS_WGL_ARB_context_flush_control) && (_this->gl_config.release_behavior == 0)) { attribs[iattr++] = WGL_CONTEXT_RELEASE_BEHAVIOR_ARB; - attribs[iattr++] = _this->gl_config.release_behavior ? - WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB : - WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB; + attribs[iattr++] = _this->gl_config.release_behavior ? WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB : WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB; } - /* only set if wgl extension is available */ - if (_this->gl_data->HAS_WGL_ARB_create_context_robustness) { + /* only set if wgl extension is available and not the default setting */ + if ((_this->gl_data->HAS_WGL_ARB_create_context_robustness) && (_this->gl_config.reset_notification != 0)) { attribs[iattr++] = WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB; - attribs[iattr++] = _this->gl_config.reset_notification ? - WGL_LOSE_CONTEXT_ON_RESET_ARB : - WGL_NO_RESET_NOTIFICATION_ARB; + attribs[iattr++] = _this->gl_config.reset_notification ? WGL_LOSE_CONTEXT_ON_RESET_ARB : WGL_NO_RESET_NOTIFICATION_ARB; } - /* only set if wgl extension is available */ - if (_this->gl_data->HAS_WGL_ARB_create_context_no_error) { + /* only set if wgl extension is available and not the default setting */ + if ((_this->gl_data->HAS_WGL_ARB_create_context_no_error) && (_this->gl_config.no_error != 0)) { attribs[iattr++] = WGL_CONTEXT_OPENGL_NO_ERROR_ARB; attribs[iattr++] = _this->gl_config.no_error; } @@ -800,8 +820,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) return context; } -int -WIN_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int WIN_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { HDC hdc; @@ -810,29 +829,28 @@ WIN_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) } /* sanity check that higher level handled this. */ - SDL_assert(window || (!window && !context)); + SDL_assert(window || (window == NULL && !context)); /* Some Windows drivers freak out if hdc is NULL, even when context is NULL, against spec. Since hdc is _supposed_ to be ignored if context is NULL, we either use the current GL window, or do nothing if we already have no current context. */ - if (!window) { + if (window == NULL) { window = SDL_GL_GetCurrentWindow(); - if (!window) { + if (window == NULL) { SDL_assert(SDL_GL_GetCurrentContext() == NULL); - return 0; /* already done. */ + return 0; /* already done. */ } } - hdc = ((SDL_WindowData *) window->driverdata)->hdc; - if (!_this->gl_data->wglMakeCurrent(hdc, (HGLRC) context)) { + hdc = ((SDL_WindowData *)window->driverdata)->hdc; + if (!_this->gl_data->wglMakeCurrent(hdc, (HGLRC)context)) { return WIN_SetError("wglMakeCurrent()"); } return 0; } -int -WIN_GL_SetSwapInterval(_THIS, int interval) +int WIN_GL_SetSwapInterval(_THIS, int interval) { if ((interval < 0) && (!_this->gl_data->HAS_WGL_EXT_swap_control_tear)) { return SDL_SetError("Negative swap interval unsupported in this GL"); @@ -846,8 +864,7 @@ WIN_GL_SetSwapInterval(_THIS, int interval) return 0; } -int -WIN_GL_GetSwapInterval(_THIS) +int WIN_GL_GetSwapInterval(_THIS) { int retval = 0; if (_this->gl_data->wglGetSwapIntervalEXT) { @@ -856,10 +873,9 @@ WIN_GL_GetSwapInterval(_THIS) return retval; } -int -WIN_GL_SwapWindow(_THIS, SDL_Window * window) +int WIN_GL_SwapWindow(_THIS, SDL_Window *window) { - HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc; + HDC hdc = ((SDL_WindowData *)window->driverdata)->hdc; if (!SwapBuffers(hdc)) { return WIN_SetError("SwapBuffers()"); @@ -867,21 +883,18 @@ WIN_GL_SwapWindow(_THIS, SDL_Window * window) return 0; } -void -WIN_GL_DeleteContext(_THIS, SDL_GLContext context) +void WIN_GL_DeleteContext(_THIS, SDL_GLContext context) { if (!_this->gl_data) { return; } - _this->gl_data->wglDeleteContext((HGLRC) context); + _this->gl_data->wglDeleteContext((HGLRC)context); } - -SDL_bool -WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window * fromWindow, SDL_Window * toWindow) +SDL_bool WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window *fromWindow, SDL_Window *toWindow) { - HDC hfromdc = ((SDL_WindowData *) fromWindow->driverdata)->hdc; - HDC htodc = ((SDL_WindowData *) toWindow->driverdata)->hdc; + HDC hfromdc = ((SDL_WindowData *)fromWindow->driverdata)->hdc; + HDC htodc = ((SDL_WindowData *)toWindow->driverdata)->hdc; BOOL result; /* get the pixel format of the fromWindow */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsopengl.h b/modules/SDL2/src/video/windows/SDL_windowsopengl.h index bd42ea6..0d30068 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsopengl.h +++ b/modules/SDL2/src/video/windows/SDL_windowsopengl.h @@ -25,6 +25,38 @@ #if SDL_VIDEO_OPENGL_WGL +#if __XBOXONE__ || __XBOXSERIES__ +typedef struct tagPIXELFORMATDESCRIPTOR +{ + WORD nSize; + WORD nVersion; + DWORD dwFlags; + BYTE iPixelType; + BYTE cColorBits; + BYTE cRedBits; + BYTE cRedShift; + BYTE cGreenBits; + BYTE cGreenShift; + BYTE cBlueBits; + BYTE cBlueShift; + BYTE cAlphaBits; + BYTE cAlphaShift; + BYTE cAccumBits; + BYTE cAccumRedBits; + BYTE cAccumGreenBits; + BYTE cAccumBlueBits; + BYTE cAccumAlphaBits; + BYTE cDepthBits; + BYTE cStencilBits; + BYTE cAuxBuffers; + BYTE iLayerType; + BYTE bReserved; + DWORD dwLayerMask; + DWORD dwVisibleMask; + DWORD dwDamageMask; +} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR; +#endif + struct SDL_GLDriverData { SDL_bool HAS_WGL_ARB_pixel_format; @@ -37,29 +69,36 @@ struct SDL_GLDriverData implementation supports WGL_EXT_create_context_es2_profile. major = minor = 0 when unsupported. */ - struct { + struct + { int major; int minor; } es_profile_max_supported_version; - void *(WINAPI * wglGetProcAddress) (const char *proc); - HGLRC(WINAPI * wglCreateContext) (HDC hdc); - BOOL(WINAPI * wglDeleteContext) (HGLRC hglrc); - BOOL(WINAPI * wglMakeCurrent) (HDC hdc, HGLRC hglrc); - BOOL(WINAPI * wglShareLists) (HGLRC hglrc1, HGLRC hglrc2); - BOOL(WINAPI * wglChoosePixelFormatARB) (HDC hdc, - const int *piAttribIList, - const FLOAT * pfAttribFList, - UINT nMaxFormats, - int *piFormats, - UINT * nNumFormats); - BOOL(WINAPI * wglGetPixelFormatAttribivARB) (HDC hdc, int iPixelFormat, - int iLayerPlane, - UINT nAttributes, - const int *piAttributes, - int *piValues); - BOOL (WINAPI * wglSwapIntervalEXT) (int interval); - int (WINAPI * wglGetSwapIntervalEXT) (void); + /* *INDENT-OFF* */ /* clang-format off */ + void *(WINAPI *wglGetProcAddress)(const char *proc); + HGLRC (WINAPI *wglCreateContext)(HDC hdc); + BOOL (WINAPI *wglDeleteContext)(HGLRC hglrc); + BOOL (WINAPI *wglMakeCurrent)(HDC hdc, HGLRC hglrc); + BOOL (WINAPI *wglShareLists)(HGLRC hglrc1, HGLRC hglrc2); + BOOL (WINAPI *wglChoosePixelFormatARB)(HDC hdc, const int *piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int *piFormats, UINT * nNumFormats); + BOOL (WINAPI *wglGetPixelFormatAttribivARB)(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); + BOOL (WINAPI *wglSwapIntervalEXT)(int interval); + int (WINAPI *wglGetSwapIntervalEXT)(void); +#if __XBOXONE__ || __XBOXSERIES__ + BOOL (WINAPI *wglSwapBuffers)(HDC hdc); + int (WINAPI *wglDescribePixelFormat)(HDC hdc, + int iPixelFormat, + UINT nBytes, + LPPIXELFORMATDESCRIPTOR ppfd); + int (WINAPI *wglChoosePixelFormat)(HDC hdc, + const PIXELFORMATDESCRIPTOR *ppfd); + BOOL (WINAPI *wglSetPixelFormat)(HDC hdc, + int format, + const PIXELFORMATDESCRIPTOR *ppfd); + int (WINAPI *wglGetPixelFormat)(HDC hdc); +#endif + /* *INDENT-ON* */ /* clang-format on */ }; /* OpenGL functions */ @@ -67,72 +106,72 @@ extern int WIN_GL_LoadLibrary(_THIS, const char *path); extern void *WIN_GL_GetProcAddress(_THIS, const char *proc); extern void WIN_GL_UnloadLibrary(_THIS); extern SDL_bool WIN_GL_UseEGL(_THIS); -extern int WIN_GL_SetupWindow(_THIS, SDL_Window * window); -extern SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window * window); -extern int WIN_GL_MakeCurrent(_THIS, SDL_Window * window, +extern int WIN_GL_SetupWindow(_THIS, SDL_Window *window); +extern SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window *window); +extern int WIN_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern int WIN_GL_SetSwapInterval(_THIS, int interval); extern int WIN_GL_GetSwapInterval(_THIS); -extern int WIN_GL_SwapWindow(_THIS, SDL_Window * window); +extern int WIN_GL_SwapWindow(_THIS, SDL_Window *window); extern void WIN_GL_DeleteContext(_THIS, SDL_GLContext context); extern void WIN_GL_InitExtensions(_THIS); -extern SDL_bool WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window * fromWindow, SDL_Window * toWindow); +extern SDL_bool WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window *fromWindow, SDL_Window *toWindow); #ifndef WGL_ARB_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_DRAW_TO_BITMAP_ARB 0x2002 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_NEED_PALETTE_ARB 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_NUMBER_OVERLAYS_ARB 0x2008 -#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 -#define WGL_TRANSPARENT_ARB 0x200A -#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 -#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B -#define WGL_SHARE_DEPTH_ARB 0x200C -#define WGL_SHARE_STENCIL_ARB 0x200D -#define WGL_SHARE_ACCUM_ARB 0x200E -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_STEREO_ARB 0x2012 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_RED_SHIFT_ARB 0x2016 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_GREEN_SHIFT_ARB 0x2018 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_BLUE_SHIFT_ARB 0x201A -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_ALPHA_SHIFT_ARB 0x201C -#define WGL_ACCUM_BITS_ARB 0x201D -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_AUX_BUFFERS_ARB 0x2024 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_SWAP_EXCHANGE_ARB 0x2028 -#define WGL_SWAP_COPY_ARB 0x2029 -#define WGL_SWAP_UNDEFINED_ARB 0x202A -#define WGL_TYPE_RGBA_ARB 0x202B -#define WGL_TYPE_COLORINDEX_ARB 0x202C +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C #endif #ifndef WGL_ARB_multisample -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 #endif #endif /* SDL_VIDEO_OPENGL_WGL */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsopengles.c b/modules/SDL2/src/video/windows/SDL_windowsopengles.c index c36528c..d410141 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsopengles.c +++ b/modules/SDL2/src/video/windows/SDL_windowsopengles.c @@ -29,8 +29,8 @@ /* EGL implementation of SDL OpenGL support */ -int -WIN_GLES_LoadLibrary(_THIS, const char *path) { +int WIN_GLES_LoadLibrary(_THIS, const char *path) +{ /* If the profile requested is not GL ES, switch over to WIN_GL functions */ if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) { @@ -50,7 +50,7 @@ WIN_GLES_LoadLibrary(_THIS, const char *path) { return SDL_SetError("SDL not configured with OpenGL/WGL support"); #endif } - + if (_this->egl_data == NULL) { return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0); } @@ -58,8 +58,7 @@ WIN_GLES_LoadLibrary(_THIS, const char *path) { return 0; } -SDL_GLContext -WIN_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window *window) { SDL_GLContext context; SDL_WindowData *data = (SDL_WindowData *)window->driverdata; @@ -90,27 +89,26 @@ WIN_GLES_CreateContext(_THIS, SDL_Window * window) return context; } -void -WIN_GLES_DeleteContext(_THIS, SDL_GLContext context) +void WIN_GLES_DeleteContext(_THIS, SDL_GLContext context) { SDL_EGL_DeleteContext(_this, context); - WIN_GLES_UnloadLibrary(_this); } +/* *INDENT-OFF* */ /* clang-format off */ SDL_EGL_SwapWindow_impl(WIN) SDL_EGL_MakeCurrent_impl(WIN) +/* *INDENT-ON* */ /* clang-format on */ -int -WIN_GLES_SetupWindow(_THIS, SDL_Window * window) +int WIN_GLES_SetupWindow(_THIS, SDL_Window *window) { /* The current context is lost in here; save it and reset it. */ - SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata; SDL_Window *current_win = SDL_GL_GetCurrentWindow(); SDL_GLContext current_ctx = SDL_GL_GetCurrentContext(); if (_this->egl_data == NULL) { - /* !!! FIXME: commenting out this assertion is (I think) incorrect; figure out why driver_loaded is wrong for ANGLE instead. --ryan. */ - #if 0 /* When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), _this->gl_config.driver_loaded can be 1, while the below lines function. */ +/* !!! FIXME: commenting out this assertion is (I think) incorrect; figure out why driver_loaded is wrong for ANGLE instead. --ryan. */ +#if 0 /* When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), _this->gl_config.driver_loaded can be 1, while the below lines function. */ SDL_assert(!_this->gl_config.driver_loaded); #endif if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { @@ -119,7 +117,7 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window) } _this->gl_config.driver_loaded = 1; } - + /* Create the GLES window surface */ windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)windowdata->hwnd); @@ -127,7 +125,7 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window) return SDL_SetError("Could not create GLES window surface"); } - return WIN_GLES_MakeCurrent(_this, current_win, current_ctx); + return WIN_GLES_MakeCurrent(_this, current_win, current_ctx); } #endif /* SDL_VIDEO_DRIVER_WINDOWS && SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsopengles.h b/modules/SDL2/src/video/windows/SDL_windowsopengles.h index 8984a96..65b71f5 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsopengles.h +++ b/modules/SDL2/src/video/windows/SDL_windowsopengles.h @@ -36,9 +36,9 @@ #define WIN_GLES_SetSwapInterval SDL_EGL_SetSwapInterval extern int WIN_GLES_LoadLibrary(_THIS, const char *path); -extern SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window * window); -extern int WIN_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int WIN_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window *window); +extern int WIN_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int WIN_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern void WIN_GLES_DeleteContext(_THIS, SDL_GLContext context); extern int WIN_GLES_SetupWindow(_THIS, SDL_Window * window); diff --git a/modules/SDL2/src/video/windows/SDL_windowsshape.c b/modules/SDL2/src/video/windows/SDL_windowsshape.c index f673446..9aa75d2 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsshape.c +++ b/modules/SDL2/src/video/windows/SDL_windowsshape.c @@ -25,11 +25,11 @@ #include "SDL_windowsshape.h" #include "SDL_windowsvideo.h" -SDL_WindowShaper* -Win32_CreateShaper(SDL_Window * window) { +SDL_WindowShaper *Win32_CreateShaper(SDL_Window *window) +{ int resized_properly; - SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper)); - if (!result) { + SDL_WindowShaper *result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper)); + if (result == NULL) { SDL_OutOfMemory(); return NULL; } @@ -38,7 +38,7 @@ Win32_CreateShaper(SDL_Window * window) { result->mode.parameters.binarizationCutoff = 1; result->userx = result->usery = 0; result->hasshape = SDL_FALSE; - result->driverdata = (SDL_ShapeData*)SDL_calloc(1, sizeof(SDL_ShapeData)); + result->driverdata = (SDL_ShapeData *)SDL_calloc(1, sizeof(SDL_ShapeData)); if (!result->driverdata) { SDL_free(result); SDL_OutOfMemory(); @@ -57,40 +57,41 @@ Win32_CreateShaper(SDL_Window * window) { return result; } -static void -CombineRectRegions(SDL_ShapeTree* node,void* closure) { - HRGN mask_region = *((HRGN*)closure),temp_region = NULL; - if(node->kind == OpaqueShape) { +static void CombineRectRegions(SDL_ShapeTree *node, void *closure) +{ + HRGN mask_region = *((HRGN *)closure), temp_region = NULL; + if (node->kind == OpaqueShape) { /* Win32 API regions exclude their outline, so we widen the region by one pixel in each direction to include the real outline. */ - temp_region = CreateRectRgn(node->data.shape.x,node->data.shape.y,node->data.shape.x + node->data.shape.w + 1,node->data.shape.y + node->data.shape.h + 1); - if(mask_region != NULL) { - CombineRgn(mask_region,mask_region,temp_region,RGN_OR); + temp_region = CreateRectRgn(node->data.shape.x, node->data.shape.y, node->data.shape.x + node->data.shape.w + 1, node->data.shape.y + node->data.shape.h + 1); + if (mask_region != NULL) { + CombineRgn(mask_region, mask_region, temp_region, RGN_OR); DeleteObject(temp_region); + } else { + *((HRGN *)closure) = temp_region; } - else - *((HRGN*)closure) = temp_region; } } -int -Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { +int Win32_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode) +{ SDL_ShapeData *data; HRGN mask_region = NULL; - if( (shaper == NULL) || + if ((shaper == NULL) || (shape == NULL) || ((shape->format->Amask == 0) && (shape_mode->mode != ShapeModeColorKey)) || (shape->w != shaper->window->w) || - (shape->h != shaper->window->h) ) { + (shape->h != shaper->window->h)) { return SDL_INVALID_SHAPE_ARGUMENT; } - data = (SDL_ShapeData*)shaper->driverdata; - if(data->mask_tree != NULL) + data = (SDL_ShapeData *)shaper->driverdata; + if (data->mask_tree != NULL) { SDL_FreeShapeTree(&data->mask_tree); - data->mask_tree = SDL_CalculateShapeTree(*shape_mode,shape); + } + data->mask_tree = SDL_CalculateShapeTree(*shape_mode, shape); - SDL_TraverseShapeTree(data->mask_tree,&CombineRectRegions,&mask_region); + SDL_TraverseShapeTree(data->mask_tree, &CombineRectRegions, &mask_region); SDL_assert(mask_region != NULL); SetWindowRgn(((SDL_WindowData *)(shaper->window->driverdata))->hwnd, mask_region, TRUE); @@ -98,22 +99,25 @@ Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape return 0; } -int -Win32_ResizeWindowShape(SDL_Window *window) { - SDL_ShapeData* data; +int Win32_ResizeWindowShape(SDL_Window *window) +{ + SDL_ShapeData *data; - if (window == NULL) + if (window == NULL) { return -1; + } data = (SDL_ShapeData *)window->shaper->driverdata; - if (data == NULL) + if (data == NULL) { return -1; + } - if(data->mask_tree != NULL) + if (data->mask_tree != NULL) { SDL_FreeShapeTree(&data->mask_tree); - if(window->shaper->hasshape == SDL_TRUE) { + } + if (window->shaper->hasshape == SDL_TRUE) { window->shaper->userx = window->x; window->shaper->usery = window->y; - SDL_SetWindowPosition(window,-1000,-1000); + SDL_SetWindowPosition(window, -1000, -1000); } return 0; diff --git a/modules/SDL2/src/video/windows/SDL_windowsshape.h b/modules/SDL2/src/video/windows/SDL_windowsshape.h index 94b03e1..875538b 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsshape.h +++ b/modules/SDL2/src/video/windows/SDL_windowsshape.h @@ -29,12 +29,13 @@ #include "../SDL_sysvideo.h" #include "../SDL_shape_internals.h" -typedef struct { +typedef struct +{ SDL_ShapeTree *mask_tree; } SDL_ShapeData; -extern SDL_WindowShaper* Win32_CreateShaper(SDL_Window * window); -extern int Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); +extern SDL_WindowShaper *Win32_CreateShaper(SDL_Window *window); +extern int Win32_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode); extern int Win32_ResizeWindowShape(SDL_Window *window); #endif /* SDL_windowsshape_h_ */ diff --git a/modules/SDL2/src/video/windows/SDL_windowsvideo.c b/modules/SDL2/src/video/windows/SDL_windowsvideo.c index b2016d7..5621293 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsvideo.c +++ b/modules/SDL2/src/video/windows/SDL_windowsvideo.c @@ -29,6 +29,7 @@ #include "SDL_system.h" #include "../SDL_sysvideo.h" #include "../SDL_pixels_c.h" +#include "../../SDL_hints_c.h" #include "SDL_windowsvideo.h" #include "SDL_windowsframebuffer.h" @@ -43,26 +44,22 @@ static void WIN_VideoQuit(_THIS); /* Hints */ SDL_bool g_WindowsEnableMessageLoop = SDL_TRUE; +SDL_bool g_WindowsEnableMenuMnemonics = SDL_FALSE; SDL_bool g_WindowFrameUsableWhileCursorHidden = SDL_TRUE; -static void SDLCALL -UpdateWindowsEnableMessageLoop(void *userdata, const char *name, const char *oldValue, const char *newValue) +static void SDLCALL UpdateWindowsEnableMessageLoop(void *userdata, const char *name, const char *oldValue, const char *newValue) { - if (newValue && *newValue == '0') { - g_WindowsEnableMessageLoop = SDL_FALSE; - } else { - g_WindowsEnableMessageLoop = SDL_TRUE; - } + g_WindowsEnableMessageLoop = SDL_GetStringBoolean(newValue, SDL_TRUE); } -static void SDLCALL -UpdateWindowFrameUsableWhileCursorHidden(void *userdata, const char *name, const char *oldValue, const char *newValue) +static void SDLCALL UpdateWindowsEnableMenuMnemonics(void *userdata, const char *name, const char *oldValue, const char *newValue) { - if (newValue && *newValue == '0') { - g_WindowFrameUsableWhileCursorHidden = SDL_FALSE; - } else { - g_WindowFrameUsableWhileCursorHidden = SDL_TRUE; - } + g_WindowsEnableMenuMnemonics = SDL_GetStringBoolean(newValue, SDL_FALSE); +} + +static void SDLCALL UpdateWindowFrameUsableWhileCursorHidden(void *userdata, const char *name, const char *oldValue, const char *newValue) +{ + g_WindowFrameUsableWhileCursorHidden = SDL_GetStringBoolean(newValue, SDL_TRUE); } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -80,13 +77,11 @@ static void WIN_SuspendScreenSaver(_THIS) extern void D3D12_XBOX_GetResolution(Uint32 *width, Uint32 *height); #endif - /* Windows driver bootstrap functions */ -static void -WIN_DeleteDevice(SDL_VideoDevice * device) +static void WIN_DeleteDevice(SDL_VideoDevice *device) { - SDL_VideoData *data = (SDL_VideoData *) device->driverdata; + SDL_VideoData *data = (SDL_VideoData *)device->driverdata; SDL_UnregisterApp(); #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -104,8 +99,7 @@ WIN_DeleteDevice(SDL_VideoDevice * device) SDL_free(device); } -static SDL_VideoDevice * -WIN_CreateDevice(void) +static SDL_VideoDevice *WIN_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *data; @@ -113,9 +107,9 @@ WIN_CreateDevice(void) SDL_RegisterApp(NULL, 0, NULL); /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device) { - data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); + data = (struct SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); } else { data = NULL; } @@ -130,27 +124,31 @@ WIN_CreateDevice(void) #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) data->userDLL = SDL_LoadObject("USER32.DLL"); if (data->userDLL) { - data->CloseTouchInputHandle = (BOOL (WINAPI *)(HTOUCHINPUT)) SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle"); + /* *INDENT-OFF* */ /* clang-format off */ + data->CloseTouchInputHandle = (BOOL (WINAPI *)(HTOUCHINPUT))SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle"); data->GetTouchInputInfo = (BOOL (WINAPI *)(HTOUCHINPUT, UINT, PTOUCHINPUT, int)) SDL_LoadFunction(data->userDLL, "GetTouchInputInfo"); - data->RegisterTouchWindow = (BOOL (WINAPI *)(HWND, ULONG)) SDL_LoadFunction(data->userDLL, "RegisterTouchWindow"); - data->SetProcessDPIAware = (BOOL (WINAPI *)(void)) SDL_LoadFunction(data->userDLL, "SetProcessDPIAware"); - data->SetProcessDpiAwarenessContext = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT)) SDL_LoadFunction(data->userDLL, "SetProcessDpiAwarenessContext"); - data->SetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT (WINAPI *)(DPI_AWARENESS_CONTEXT)) SDL_LoadFunction(data->userDLL, "SetThreadDpiAwarenessContext"); - data->GetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT (WINAPI *)(void)) SDL_LoadFunction(data->userDLL, "GetThreadDpiAwarenessContext"); - data->GetAwarenessFromDpiAwarenessContext = (DPI_AWARENESS (WINAPI *)(DPI_AWARENESS_CONTEXT)) SDL_LoadFunction(data->userDLL, "GetAwarenessFromDpiAwarenessContext"); - data->EnableNonClientDpiScaling = (BOOL (WINAPI *)(HWND)) SDL_LoadFunction(data->userDLL, "EnableNonClientDpiScaling"); - data->AdjustWindowRectExForDpi = (BOOL (WINAPI *)(LPRECT, DWORD, BOOL, DWORD, UINT)) SDL_LoadFunction(data->userDLL, "AdjustWindowRectExForDpi"); - data->GetDpiForWindow = (UINT (WINAPI *)(HWND)) SDL_LoadFunction(data->userDLL, "GetDpiForWindow"); - data->AreDpiAwarenessContextsEqual = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT)) SDL_LoadFunction(data->userDLL, "AreDpiAwarenessContextsEqual"); - data->IsValidDpiAwarenessContext = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT)) SDL_LoadFunction(data->userDLL, "IsValidDpiAwarenessContext"); + data->RegisterTouchWindow = (BOOL (WINAPI *)(HWND, ULONG))SDL_LoadFunction(data->userDLL, "RegisterTouchWindow"); + data->SetProcessDPIAware = (BOOL (WINAPI *)(void))SDL_LoadFunction(data->userDLL, "SetProcessDPIAware"); + data->SetProcessDpiAwarenessContext = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "SetProcessDpiAwarenessContext"); + data->SetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT (WINAPI *)(DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "SetThreadDpiAwarenessContext"); + data->GetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT (WINAPI *)(void))SDL_LoadFunction(data->userDLL, "GetThreadDpiAwarenessContext"); + data->GetAwarenessFromDpiAwarenessContext = (DPI_AWARENESS (WINAPI *)(DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "GetAwarenessFromDpiAwarenessContext"); + data->EnableNonClientDpiScaling = (BOOL (WINAPI *)(HWND))SDL_LoadFunction(data->userDLL, "EnableNonClientDpiScaling"); + data->AdjustWindowRectExForDpi = (BOOL (WINAPI *)(LPRECT, DWORD, BOOL, DWORD, UINT))SDL_LoadFunction(data->userDLL, "AdjustWindowRectExForDpi"); + data->GetDpiForWindow = (UINT (WINAPI *)(HWND))SDL_LoadFunction(data->userDLL, "GetDpiForWindow"); + data->AreDpiAwarenessContextsEqual = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "AreDpiAwarenessContextsEqual"); + data->IsValidDpiAwarenessContext = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "IsValidDpiAwarenessContext"); + /* *INDENT-ON* */ /* clang-format on */ } else { SDL_ClearError(); } data->shcoreDLL = SDL_LoadObject("SHCORE.DLL"); if (data->shcoreDLL) { - data->GetDpiForMonitor = (HRESULT (WINAPI *)(HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *)) SDL_LoadFunction(data->shcoreDLL, "GetDpiForMonitor"); - data->SetProcessDpiAwareness = (HRESULT (WINAPI *)(PROCESS_DPI_AWARENESS)) SDL_LoadFunction(data->shcoreDLL, "SetProcessDpiAwareness"); + /* *INDENT-OFF* */ /* clang-format off */ + data->GetDpiForMonitor = (HRESULT (WINAPI *)(HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *))SDL_LoadFunction(data->shcoreDLL, "GetDpiForMonitor"); + data->SetProcessDpiAwareness = (HRESULT (WINAPI *)(PROCESS_DPI_AWARENESS))SDL_LoadFunction(data->shcoreDLL, "SetProcessDpiAwareness"); + /* *INDENT-ON* */ /* clang-format on */ } else { SDL_ClearError(); } @@ -160,6 +158,7 @@ WIN_CreateDevice(void) device->VideoInit = WIN_VideoInit; device->VideoQuit = WIN_VideoQuit; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) + device->RefreshDisplays = WIN_RefreshDisplays; device->GetDisplayBounds = WIN_GetDisplayBounds; device->GetDisplayUsableBounds = WIN_GetDisplayUsableBounds; device->GetDisplayDPI = WIN_GetDisplayDPI; @@ -262,16 +261,14 @@ WIN_CreateDevice(void) return device; } - VideoBootStrap WINDOWS_bootstrap = { "windows", "SDL Windows video driver", WIN_CreateDevice }; -static BOOL -WIN_DeclareDPIAwareUnaware(_THIS) +static BOOL WIN_DeclareDPIAwareUnaware(_THIS) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - SDL_VideoData* data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (data->SetProcessDpiAwarenessContext) { return data->SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE); @@ -283,11 +280,10 @@ WIN_DeclareDPIAwareUnaware(_THIS) return FALSE; } -static BOOL -WIN_DeclareDPIAwareSystem(_THIS) +static BOOL WIN_DeclareDPIAwareSystem(_THIS) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - SDL_VideoData* data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (data->SetProcessDpiAwarenessContext) { /* Windows 10, version 1607 */ @@ -303,11 +299,10 @@ WIN_DeclareDPIAwareSystem(_THIS) return FALSE; } -static BOOL -WIN_DeclareDPIAwarePerMonitor(_THIS) +static BOOL WIN_DeclareDPIAwarePerMonitor(_THIS) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (data->SetProcessDpiAwarenessContext) { /* Windows 10, version 1607 */ @@ -323,13 +318,12 @@ WIN_DeclareDPIAwarePerMonitor(_THIS) return FALSE; } -static BOOL -WIN_DeclareDPIAwarePerMonitorV2(_THIS) +static BOOL WIN_DeclareDPIAwarePerMonitorV2(_THIS) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) return FALSE; #else - SDL_VideoData* data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; /* Declare DPI aware (may have been done in external code or a manifest, as well) */ if (data->SetProcessDpiAwarenessContext) { @@ -339,7 +333,7 @@ WIN_DeclareDPIAwarePerMonitorV2(_THIS) end up still getting OS scaled. (tested on Windows 10 21H1 19043.1348, NVIDIA 496.49) NOTE: Enabling DPI awareness through Windows Explorer - (right click .exe -> Properties -> Compatibility -> High DPI Settings -> + (right click .exe -> Properties -> Compatibility -> High DPI Settings -> check "Override high DPI Scaling behaviour", select Application) gives a DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE context (at least on Windows 10 21H1), and setting DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 will fail. @@ -363,10 +357,9 @@ WIN_DeclareDPIAwarePerMonitorV2(_THIS) } #ifdef HIGHDPI_DEBUG -static const char* -WIN_GetDPIAwareness(_THIS) +static const char *WIN_GetDPIAwareness(_THIS) { - SDL_VideoData* data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (data->GetThreadDpiAwarenessContext && data->AreDpiAwarenessContextsEqual) { DPI_AWARENESS_CONTEXT context = data->GetThreadDpiAwarenessContext(); @@ -388,10 +381,9 @@ WIN_GetDPIAwareness(_THIS) } #endif -static void -WIN_InitDPIAwareness(_THIS) +static void WIN_InitDPIAwareness(_THIS) { - const char* hint = SDL_GetHint(SDL_HINT_WINDOWS_DPI_AWARENESS); + const char *hint = SDL_GetHint(SDL_HINT_WINDOWS_DPI_AWARENESS); if (hint != NULL) { if (SDL_strcmp(hint, "permonitorv2") == 0) { @@ -406,10 +398,9 @@ WIN_InitDPIAwareness(_THIS) } } -static void -WIN_InitDPIScaling(_THIS) +static void WIN_InitDPIScaling(_THIS) { - SDL_VideoData* data = (SDL_VideoData*)_this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (SDL_GetHintBoolean(SDL_HINT_WINDOWS_DPI_SCALING, SDL_FALSE)) { WIN_DeclareDPIAwarePerMonitorV2(_this); @@ -418,10 +409,9 @@ WIN_InitDPIScaling(_THIS) } } -int -WIN_VideoInit(_THIS) +int WIN_VideoInit(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; WIN_InitDPIAwareness(_this); WIN_InitDPIScaling(_this); @@ -444,7 +434,7 @@ WIN_VideoInit(_THIS) SDL_zero(display); display.desktop_mode = current_mode; display.current_mode = current_mode; - + SDL_AddVideoDisplay(&display, SDL_FALSE); } #else /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ @@ -457,6 +447,7 @@ WIN_VideoInit(_THIS) #endif SDL_AddHintCallback(SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP, UpdateWindowsEnableMessageLoop, NULL); + SDL_AddHintCallback(SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS, UpdateWindowsEnableMenuMnemonics, NULL); SDL_AddHintCallback(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, UpdateWindowFrameUsableWhileCursorHidden, NULL); #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -466,8 +457,7 @@ WIN_VideoInit(_THIS) return 0; } -void -WIN_VideoQuit(_THIS) +void WIN_VideoQuit(_THIS) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) WIN_QuitModes(_this); @@ -476,7 +466,6 @@ WIN_VideoQuit(_THIS) #endif } - #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) #define D3D_DEBUG_INFO #include @@ -497,25 +486,26 @@ WIN_VideoQuit(_THIS) #endif #endif -SDL_bool -D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface) +SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface) { *pD3DDLL = SDL_LoadObject("D3D9.DLL"); if (*pD3DDLL) { - typedef IDirect3D9 *(WINAPI *Direct3DCreate9_t) (UINT SDKVersion); + /* *INDENT-OFF* */ /* clang-format off */ + typedef IDirect3D9 *(WINAPI *Direct3DCreate9_t)(UINT SDKVersion); + typedef HRESULT (WINAPI* Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex** ppD3D); + /* *INDENT-ON* */ /* clang-format on */ Direct3DCreate9_t Direct3DCreate9Func; if (SDL_GetHintBoolean(SDL_HINT_WINDOWS_USE_D3D9EX, SDL_FALSE)) { - typedef HRESULT(WINAPI* Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex** ppD3D); Direct3DCreate9Ex_t Direct3DCreate9ExFunc; Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex"); if (Direct3DCreate9ExFunc) { - IDirect3D9Ex* pDirect3D9ExInterface; + IDirect3D9Ex *pDirect3D9ExInterface; HRESULT hr = Direct3DCreate9ExFunc(D3D_SDK_VERSION, &pDirect3D9ExInterface); if (SUCCEEDED(hr)) { const GUID IDirect3D9_GUID = { 0x81bdcbca, 0x64d4, 0x426d, { 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c } }; - hr = IDirect3D9Ex_QueryInterface(pDirect3D9ExInterface, &IDirect3D9_GUID, (void**)pDirect3D9Interface); + hr = IDirect3D9Ex_QueryInterface(pDirect3D9ExInterface, &IDirect3D9_GUID, (void **)pDirect3D9Interface); IDirect3D9Ex_Release(pDirect3D9ExInterface); if (SUCCEEDED(hr)) { return SDL_TRUE; @@ -539,9 +529,7 @@ D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface) return SDL_FALSE; } - -int -SDL_Direct3D9GetAdapterIndex(int displayIndex) +int SDL_Direct3D9GetAdapterIndex(int displayIndex) { void *pD3DDLL; IDirect3D9 *pD3D; @@ -552,14 +540,14 @@ SDL_Direct3D9GetAdapterIndex(int displayIndex) SDL_DisplayData *pData = (SDL_DisplayData *)SDL_GetDisplayDriverData(displayIndex); int adapterIndex = D3DADAPTER_DEFAULT; - if (!pData) { + if (pData == NULL) { SDL_SetError("Invalid display index"); adapterIndex = -1; /* make sure we return something invalid */ } else { char *displayName = WIN_StringToUTF8W(pData->DeviceName); unsigned int count = IDirect3D9_GetAdapterCount(pD3D); unsigned int i; - for (i=0; i -static SDL_bool -DXGI_LoadDLL(void **pDXGIDLL, IDXGIFactory **pDXGIFactory) +static SDL_bool DXGI_LoadDLL(void **pDXGIDLL, IDXGIFactory **pDXGIFactory) { *pDXGIDLL = SDL_LoadObject("DXGI.DLL"); if (*pDXGIDLL) { - HRESULT (WINAPI *CreateDXGI)(REFIID riid, void **ppFactory); + /* *INDENT-OFF* */ /* clang-format off */ + typedef HRESULT (WINAPI *CreateDXGI_t)(REFIID riid, void **ppFactory); + /* *INDENT-ON* */ /* clang-format on */ + CreateDXGI_t CreateDXGI; - CreateDXGI = - (HRESULT (WINAPI *) (REFIID, void**)) SDL_LoadFunction(*pDXGIDLL, - "CreateDXGIFactory"); + CreateDXGI = (CreateDXGI_t)SDL_LoadFunction(*pDXGIDLL, "CreateDXGIFactory"); if (CreateDXGI) { - GUID dxgiGUID = {0x7b7166ec,0x21c7,0x44ae,{0xb2,0x1a,0xc9,0xae,0x32,0x1a,0xe3,0x69}}; - if (!SUCCEEDED(CreateDXGI(&dxgiGUID, (void**)pDXGIFactory))) { + GUID dxgiGUID = { 0x7b7166ec, 0x21c7, 0x44ae, { 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69 } }; + if (!SUCCEEDED(CreateDXGI(&dxgiGUID, (void **)pDXGIFactory))) { *pDXGIFactory = NULL; } } @@ -615,13 +603,15 @@ DXGI_LoadDLL(void **pDXGIDLL, IDXGIFactory **pDXGIFactory) } #endif - -SDL_bool -SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) +SDL_bool SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) { #if !HAVE_DXGI_H - if (adapterIndex) *adapterIndex = -1; - if (outputIndex) *outputIndex = -1; + if (adapterIndex) { + *adapterIndex = -1; + } + if (outputIndex) { + *outputIndex = -1; + } SDL_SetError("SDL was compiled without DXGI support due to missing dxgi.h header"); return SDL_FALSE; #else @@ -631,14 +621,14 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) int nAdapter, nOutput; IDXGIFactory *pDXGIFactory = NULL; IDXGIAdapter *pDXGIAdapter; - IDXGIOutput* pDXGIOutput; + IDXGIOutput *pDXGIOutput; - if (!adapterIndex) { + if (adapterIndex == NULL) { SDL_InvalidParamError("adapterIndex"); return SDL_FALSE; } - if (!outputIndex) { + if (outputIndex == NULL) { SDL_InvalidParamError("outputIndex"); return SDL_FALSE; } @@ -646,7 +636,7 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) *adapterIndex = -1; *outputIndex = -1; - if (!pData) { + if (pData == NULL) { SDL_SetError("Invalid display index"); return SDL_FALSE; } @@ -690,12 +680,11 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex) #endif } -SDL_bool -WIN_IsPerMonitorV2DPIAware(_THIS) +SDL_bool WIN_IsPerMonitorV2DPIAware(_THIS) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - SDL_VideoData* data = (SDL_VideoData*) _this->driverdata; - + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; + if (data->AreDpiAwarenessContextsEqual && data->GetThreadDpiAwarenessContext) { /* Windows 10, version 1607 */ return (SDL_bool)data->AreDpiAwarenessContextsEqual(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2, diff --git a/modules/SDL2/src/video/windows/SDL_windowsvideo.h b/modules/SDL2/src/video/windows/SDL_windowsvideo.h index ef7cd3b..7c44328 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsvideo.h +++ b/modules/SDL2/src/video/windows/SDL_windowsvideo.h @@ -35,18 +35,18 @@ #include -#define MAX_CANDLIST 10 -#define MAX_CANDLENGTH 256 -#define MAX_CANDSIZE (sizeof(WCHAR) * MAX_CANDLIST * MAX_CANDLENGTH) +#define MAX_CANDLIST 10 +#define MAX_CANDLENGTH 256 +#define MAX_CANDSIZE (sizeof(WCHAR) * MAX_CANDLIST * MAX_CANDLENGTH) #include "SDL_windowsclipboard.h" #include "SDL_windowsevents.h" +#include "SDL_windowsopengl.h" #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) #include "SDL_windowskeyboard.h" #include "SDL_windowsmodes.h" #include "SDL_windowsmouse.h" -#include "SDL_windowsopengl.h" #include "SDL_windowsopengles.h" #endif @@ -54,11 +54,10 @@ #include "SDL_events.h" #include "SDL_loadso.h" - #if WINVER < 0x0601 /* Touch input definitions */ -#define TWF_FINETOUCH 1 -#define TWF_WANTPALM 2 +#define TWF_FINETOUCH 1 +#define TWF_WANTPALM 2 #define TOUCHEVENTF_MOVE 0x0001 #define TOUCHEVENTF_DOWN 0x0002 @@ -66,78 +65,78 @@ DECLARE_HANDLE(HTOUCHINPUT); -typedef struct _TOUCHINPUT { - LONG x; - LONG y; - HANDLE hSource; - DWORD dwID; - DWORD dwFlags; - DWORD dwMask; - DWORD dwTime; +typedef struct _TOUCHINPUT +{ + LONG x; + LONG y; + HANDLE hSource; + DWORD dwID; + DWORD dwFlags; + DWORD dwMask; + DWORD dwTime; ULONG_PTR dwExtraInfo; - DWORD cxContact; - DWORD cyContact; + DWORD cxContact; + DWORD cyContact; } TOUCHINPUT, *PTOUCHINPUT; - /* More-robust display information in Vista... */ /* This is a huge amount of data to be stuffing into three API calls. :( */ typedef struct DISPLAYCONFIG_PATH_SOURCE_INFO { - LUID adapterId; - UINT32 id; + LUID adapterId; + UINT32 id; union { UINT32 modeInfoIdx; struct { - UINT32 cloneGroupId : 16; - UINT32 sourceModeInfoIdx : 16; + UINT32 cloneGroupId : 16; + UINT32 sourceModeInfoIdx : 16; } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; - UINT32 statusFlags; + UINT32 statusFlags; } DISPLAYCONFIG_PATH_SOURCE_INFO; typedef struct DISPLAYCONFIG_RATIONAL { - UINT32 Numerator; - UINT32 Denominator; + UINT32 Numerator; + UINT32 Denominator; } DISPLAYCONFIG_RATIONAL; typedef struct DISPLAYCONFIG_PATH_TARGET_INFO { - LUID adapterId; - UINT32 id; + LUID adapterId; + UINT32 id; union { - UINT32 modeInfoIdx; + UINT32 modeInfoIdx; struct { UINT32 desktopModeInfoIdx : 16; - UINT32 targetModeInfoIdx : 16; + UINT32 targetModeInfoIdx : 16; } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; - UINT32 /*DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY*/ outputTechnology; - UINT32 /*DISPLAYCONFIG_ROTATION*/ rotation; - UINT32 /*DISPLAYCONFIG_SCALING*/ scaling; - DISPLAYCONFIG_RATIONAL refreshRate; - UINT32 /*DISPLAYCONFIG_SCANLINE_ORDERING*/ scanLineOrdering; - BOOL targetAvailable; - UINT32 statusFlags; + UINT32 /*DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY*/ outputTechnology; + UINT32 /*DISPLAYCONFIG_ROTATION*/ rotation; + UINT32 /*DISPLAYCONFIG_SCALING*/ scaling; + DISPLAYCONFIG_RATIONAL refreshRate; + UINT32 /*DISPLAYCONFIG_SCANLINE_ORDERING*/ scanLineOrdering; + BOOL targetAvailable; + UINT32 statusFlags; } DISPLAYCONFIG_PATH_TARGET_INFO; typedef struct DISPLAYCONFIG_PATH_INFO { - DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; - DISPLAYCONFIG_PATH_TARGET_INFO targetInfo; - UINT32 flags; + DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; + DISPLAYCONFIG_PATH_TARGET_INFO targetInfo; + UINT32 flags; } DISPLAYCONFIG_PATH_INFO; typedef enum { - DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1, - DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2, + DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1, + DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2, DISPLAYCONFIG_MODE_INFO_TYPE_DESKTOP_IMAGE = 3, DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = 0xFFFFFFFF } DISPLAYCONFIG_MODE_INFO_TYPE; @@ -150,11 +149,11 @@ typedef struct DISPLAYCONFIG_2DREGION typedef struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO { - UINT64 pixelRate; - DISPLAYCONFIG_RATIONAL hSyncFreq; - DISPLAYCONFIG_RATIONAL vSyncFreq; - DISPLAYCONFIG_2DREGION activeSize; - DISPLAYCONFIG_2DREGION totalSize; + UINT64 pixelRate; + DISPLAYCONFIG_RATIONAL hSyncFreq; + DISPLAYCONFIG_RATIONAL vSyncFreq; + DISPLAYCONFIG_2DREGION activeSize; + DISPLAYCONFIG_2DREGION totalSize; union { @@ -177,15 +176,15 @@ typedef struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO typedef struct DISPLAYCONFIG_SOURCE_MODE { - UINT32 width; - UINT32 height; - UINT32 /*DISPLAYCONFIG_PIXELFORMAT*/ pixelFormat; - POINTL position; + UINT32 width; + UINT32 height; + UINT32 /*DISPLAYCONFIG_PIXELFORMAT*/ pixelFormat; + POINTL position; } DISPLAYCONFIG_SOURCE_MODE; typedef struct DISPLAYCONFIG_TARGET_MODE { - DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; + DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; } DISPLAYCONFIG_TARGET_MODE; typedef struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO @@ -197,54 +196,54 @@ typedef struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO typedef struct DISPLAYCONFIG_MODE_INFO { - DISPLAYCONFIG_MODE_INFO_TYPE infoType; - UINT32 id; - LUID adapterId; + DISPLAYCONFIG_MODE_INFO_TYPE infoType; + UINT32 id; + LUID adapterId; union { - DISPLAYCONFIG_TARGET_MODE targetMode; - DISPLAYCONFIG_SOURCE_MODE sourceMode; - DISPLAYCONFIG_DESKTOP_IMAGE_INFO desktopImageInfo; + DISPLAYCONFIG_TARGET_MODE targetMode; + DISPLAYCONFIG_SOURCE_MODE sourceMode; + DISPLAYCONFIG_DESKTOP_IMAGE_INFO desktopImageInfo; } DUMMYUNIONNAME; } DISPLAYCONFIG_MODE_INFO; typedef enum DISPLAYCONFIG_TOPOLOGY_ID { - DISPLAYCONFIG_TOPOLOGY_INTERNAL = 0x00000001, - DISPLAYCONFIG_TOPOLOGY_CLONE = 0x00000002, - DISPLAYCONFIG_TOPOLOGY_EXTEND = 0x00000004, - DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 0x00000008, - DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = 0xFFFFFFFF + DISPLAYCONFIG_TOPOLOGY_INTERNAL = 0x00000001, + DISPLAYCONFIG_TOPOLOGY_CLONE = 0x00000002, + DISPLAYCONFIG_TOPOLOGY_EXTEND = 0x00000004, + DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 0x00000008, + DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = 0xFFFFFFFF } DISPLAYCONFIG_TOPOLOGY_ID; typedef enum { - DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1, - DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2, - DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3, - DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4, - DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5, - DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE = 6, - DISPLAYCONFIG_DEVICE_INFO_GET_SUPPORT_VIRTUAL_RESOLUTION = 7, - DISPLAYCONFIG_DEVICE_INFO_SET_SUPPORT_VIRTUAL_RESOLUTION = 8, - DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO = 9, - DISPLAYCONFIG_DEVICE_INFO_SET_ADVANCED_COLOR_STATE = 10, - DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL = 11, - DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = 0xFFFFFFFF + DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1, + DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2, + DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3, + DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4, + DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5, + DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE = 6, + DISPLAYCONFIG_DEVICE_INFO_GET_SUPPORT_VIRTUAL_RESOLUTION = 7, + DISPLAYCONFIG_DEVICE_INFO_SET_SUPPORT_VIRTUAL_RESOLUTION = 8, + DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO = 9, + DISPLAYCONFIG_DEVICE_INFO_SET_ADVANCED_COLOR_STATE = 10, + DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL = 11, + DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = 0xFFFFFFFF } DISPLAYCONFIG_DEVICE_INFO_TYPE; typedef struct DISPLAYCONFIG_DEVICE_INFO_HEADER { - DISPLAYCONFIG_DEVICE_INFO_TYPE type; - UINT32 size; - LUID adapterId; - UINT32 id; + DISPLAYCONFIG_DEVICE_INFO_TYPE type; + UINT32 size; + LUID adapterId; + UINT32 id; } DISPLAYCONFIG_DEVICE_INFO_HEADER; typedef struct DISPLAYCONFIG_SOURCE_DEVICE_NAME { - DISPLAYCONFIG_DEVICE_INFO_HEADER header; - WCHAR viewGdiDeviceName[CCHDEVICENAME]; + DISPLAYCONFIG_DEVICE_INFO_HEADER header; + WCHAR viewGdiDeviceName[CCHDEVICENAME]; } DISPLAYCONFIG_SOURCE_DEVICE_NAME; typedef struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS @@ -253,41 +252,43 @@ typedef struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS { struct { - UINT32 friendlyNameFromEdid : 1; - UINT32 friendlyNameForced : 1; - UINT32 edidIdsValid : 1; - UINT32 reserved : 29; + UINT32 friendlyNameFromEdid : 1; + UINT32 friendlyNameForced : 1; + UINT32 edidIdsValid : 1; + UINT32 reserved : 29; } DUMMYSTRUCTNAME; - UINT32 value; + UINT32 value; } DUMMYUNIONNAME; } DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS; typedef struct DISPLAYCONFIG_TARGET_DEVICE_NAME { - DISPLAYCONFIG_DEVICE_INFO_HEADER header; - DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags; - UINT32 /*DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY*/ outputTechnology; - UINT16 edidManufactureId; - UINT16 edidProductCodeId; - UINT32 connectorInstance; - WCHAR monitorFriendlyDeviceName[64]; - WCHAR monitorDevicePath[128]; + DISPLAYCONFIG_DEVICE_INFO_HEADER header; + DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags; + UINT32 /*DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY*/ outputTechnology; + UINT16 edidManufactureId; + UINT16 edidProductCodeId; + UINT32 connectorInstance; + WCHAR monitorFriendlyDeviceName[64]; + WCHAR monitorDevicePath[128]; } DISPLAYCONFIG_TARGET_DEVICE_NAME; -#define QDC_ONLY_ACTIVE_PATHS 0x00000002 +#define QDC_ONLY_ACTIVE_PATHS 0x00000002 #endif /* WINVER < 0x0601 */ #ifndef HAVE_SHELLSCALINGAPI_H -typedef enum MONITOR_DPI_TYPE { +typedef enum MONITOR_DPI_TYPE +{ MDT_EFFECTIVE_DPI = 0, MDT_ANGULAR_DPI = 1, MDT_RAW_DPI = 2, MDT_DEFAULT = MDT_EFFECTIVE_DPI } MONITOR_DPI_TYPE; -typedef enum PROCESS_DPI_AWARENESS { +typedef enum PROCESS_DPI_AWARENESS +{ PROCESS_DPI_UNAWARE = 0, PROCESS_SYSTEM_DPI_AWARE = 1, PROCESS_PER_MONITOR_DPI_AWARE = 2 @@ -299,7 +300,8 @@ typedef enum PROCESS_DPI_AWARENESS { #ifndef _DPI_AWARENESS_CONTEXTS_ -typedef enum DPI_AWARENESS { +typedef enum DPI_AWARENESS +{ DPI_AWARENESS_INVALID = -1, DPI_AWARENESS_UNAWARE = 0, DPI_AWARENESS_SYSTEM_AWARE = 1, @@ -324,8 +326,8 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT); #define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5) #endif /* NTDDI_VERSION < 0x0A000006 */ -typedef BOOL (*PFNSHFullScreen)(HWND, DWORD); -typedef void (*PFCoordTransform)(SDL_Window*, POINT*); +typedef BOOL (*PFNSHFullScreen)(HWND, DWORD); +typedef void (*PFCoordTransform)(SDL_Window *, POINT *); typedef struct { @@ -336,14 +338,16 @@ typedef struct #ifndef SDL_DISABLE_WINDOWS_IME /* Definition from Win98DDK version of IMM.H */ -typedef struct tagINPUTCONTEXT2 { +typedef struct tagINPUTCONTEXT2 +{ HWND hWnd; BOOL fOpen; POINT ptStatusWndPos; POINT ptSoftKbdPos; DWORD fdwConversion; DWORD fdwSentence; - union { + union + { LOGFONTA A; LOGFONTW W; } lfFont; @@ -370,7 +374,8 @@ typedef struct SDL_VideoData #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* Xbox doesn't support user32/shcore*/ /* Touch input functions */ - void* userDLL; + void *userDLL; + /* *INDENT-OFF* */ /* clang-format off */ BOOL (WINAPI *CloseTouchInputHandle)( HTOUCHINPUT ); BOOL (WINAPI *GetTouchInputInfo)( HTOUCHINPUT, UINT, PTOUCHINPUT, int ); BOOL (WINAPI *RegisterTouchWindow)( HWND, ULONG ); @@ -384,19 +389,22 @@ typedef struct SDL_VideoData UINT (WINAPI *GetDpiForWindow)( HWND ); BOOL (WINAPI *AreDpiAwarenessContextsEqual)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT); BOOL (WINAPI *IsValidDpiAwarenessContext)(DPI_AWARENESS_CONTEXT); + /* *INDENT-ON* */ /* clang-format on */ - void* shcoreDLL; + void *shcoreDLL; + /* *INDENT-OFF* */ /* clang-format off */ HRESULT (WINAPI *GetDpiForMonitor)( HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT *dpiX, UINT *dpiY ); HRESULT (WINAPI *SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS dpiAwareness); -#endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ + /* *INDENT-ON* */ /* clang-format on */ +#endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ SDL_bool dpi_scaling_enabled; SDL_bool cleared; - #ifndef SDL_DISABLE_WINDOWS_IME +#ifndef SDL_DISABLE_WINDOWS_IME SDL_bool ime_com_initialized; struct ITfThreadMgr *ime_threadmgr; SDL_bool ime_initialized; @@ -407,13 +415,13 @@ typedef struct SDL_VideoData SDL_bool ime_suppress_endcomposition_event; HIMC ime_himc; - WCHAR* ime_composition; + WCHAR *ime_composition; int ime_composition_length; WCHAR ime_readingstring[16]; int ime_cursor; SDL_bool ime_candlist; - WCHAR* ime_candidates; + WCHAR *ime_candidates; DWORD ime_candcount; DWORD ime_candref; DWORD ime_candsel; @@ -428,13 +436,15 @@ typedef struct SDL_VideoData int ime_winheight; HKL ime_hkl; - void* ime_himm32; + void *ime_himm32; + /* *INDENT-OFF* */ /* clang-format off */ UINT (WINAPI *GetReadingString)(HIMC himc, UINT uReadingBufLen, LPWSTR lpwReadingBuf, PINT pnErrorIndex, BOOL *pfIsVertical, PUINT puMaxReadingLen); BOOL (WINAPI *ShowReadingWindow)(HIMC himc, BOOL bShow); LPINPUTCONTEXT2 (WINAPI *ImmLockIMC)(HIMC himc); BOOL (WINAPI *ImmUnlockIMC)(HIMC himc); LPVOID (WINAPI *ImmLockIMCC)(HIMCC himcc); BOOL (WINAPI *ImmUnlockIMCC)(HIMCC himcc); + /* *INDENT-ON* */ /* clang-format on */ SDL_bool ime_uiless; struct ITfThreadMgrEx *ime_threadmgrex; @@ -452,10 +462,11 @@ typedef struct SDL_VideoData } SDL_VideoData; extern SDL_bool g_WindowsEnableMessageLoop; +extern SDL_bool g_WindowsEnableMenuMnemonics; extern SDL_bool g_WindowFrameUsableWhileCursorHidden; typedef struct IDirect3D9 IDirect3D9; -extern SDL_bool D3D_LoadDLL( void **pD3DDLL, IDirect3D9 **pDirect3D9Interface ); +extern SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface); extern SDL_bool WIN_IsPerMonitorV2DPIAware(_THIS); diff --git a/modules/SDL2/src/video/windows/SDL_windowsvulkan.c b/modules/SDL2/src/video/windows/SDL_windowsvulkan.c index 8751818..aa5f018 100644 --- a/modules/SDL2/src/video/windows/SDL_windowsvulkan.c +++ b/modules/SDL2/src/video/windows/SDL_windowsvulkan.c @@ -43,53 +43,55 @@ int WIN_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasSurfaceExtension = SDL_FALSE; SDL_bool hasWin32SurfaceExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan loader library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) + } + if (path == NULL) { path = "vulkan-1.dll"; + } _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasWin32SurfaceExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else if(!hasWin32SurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_WIN32_SURFACE_EXTENSION_NAME "extension"); + } else if (!hasWin32SurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_WIN32_SURFACE_EXTENSION_NAME "extension"); goto fail; } return 0; @@ -102,8 +104,7 @@ fail: void WIN_Vulkan_UnloadLibrary(_THIS) { - if(_this->vulkan_config.loader_handle) - { + if (_this->vulkan_config.loader_handle) { SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } @@ -117,14 +118,13 @@ SDL_bool WIN_Vulkan_GetInstanceExtensions(_THIS, static const char *const extensionsForWin32[] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_EXTENSION_NAME }; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } return SDL_Vulkan_GetInstanceExtensions_Helper( - count, names, SDL_arraysize(extensionsForWin32), - extensionsForWin32); + count, names, SDL_arraysize(extensionsForWin32), + extensionsForWin32); } SDL_bool WIN_Vulkan_CreateSurface(_THIS, @@ -137,19 +137,17 @@ SDL_bool WIN_Vulkan_CreateSurface(_THIS, (PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr; PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)vkGetInstanceProcAddr( - (VkInstance)instance, - "vkCreateWin32SurfaceKHR"); + instance, + "vkCreateWin32SurfaceKHR"); VkWin32SurfaceCreateInfoKHR createInfo; VkResult result; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } - if(!vkCreateWin32SurfaceKHR) - { + if (!vkCreateWin32SurfaceKHR) { SDL_SetError(VK_KHR_WIN32_SURFACE_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); return SDL_FALSE; @@ -160,9 +158,8 @@ SDL_bool WIN_Vulkan_CreateSurface(_THIS, createInfo.hinstance = windowData->hinstance; createInfo.hwnd = windowData->hwnd; result = vkCreateWin32SurfaceKHR(instance, &createInfo, - NULL, surface); - if(result != VK_SUCCESS) - { + NULL, surface); + if (result != VK_SUCCESS) { SDL_SetError("vkCreateWin32SurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result)); return SDL_FALSE; diff --git a/modules/SDL2/src/video/windows/SDL_windowswindow.c b/modules/SDL2/src/video/windows/SDL_windowswindow.c index 6f16dc8..1d128f7 100644 --- a/modules/SDL2/src/video/windows/SDL_windowswindow.c +++ b/modules/SDL2/src/video/windows/SDL_windowswindow.c @@ -65,16 +65,15 @@ static ATOM SDL_HelperWindowClass = 0; This will also cause the task bar to overlap the window and other windowed behaviors, so only use this for windows that shouldn't appear to be fullscreen */ -#define STYLE_BASIC (WS_CLIPSIBLINGS | WS_CLIPCHILDREN) -#define STYLE_FULLSCREEN (WS_POPUP | WS_MINIMIZEBOX) -#define STYLE_BORDERLESS (WS_POPUP | WS_MINIMIZEBOX) +#define STYLE_BASIC (WS_CLIPSIBLINGS | WS_CLIPCHILDREN) +#define STYLE_FULLSCREEN (WS_POPUP | WS_MINIMIZEBOX) +#define STYLE_BORDERLESS (WS_POPUP | WS_MINIMIZEBOX) #define STYLE_BORDERLESS_WINDOWED (WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX) -#define STYLE_NORMAL (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX) -#define STYLE_RESIZABLE (WS_THICKFRAME | WS_MAXIMIZEBOX) -#define STYLE_MASK (STYLE_FULLSCREEN | STYLE_BORDERLESS | STYLE_NORMAL | STYLE_RESIZABLE) +#define STYLE_NORMAL (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX) +#define STYLE_RESIZABLE (WS_THICKFRAME | WS_MAXIMIZEBOX) +#define STYLE_MASK (STYLE_FULLSCREEN | STYLE_BORDERLESS | STYLE_NORMAL | STYLE_RESIZABLE) -static DWORD -GetWindowStyle(SDL_Window * window) +static DWORD GetWindowStyle(SDL_Window *window) { DWORD style = 0; @@ -122,10 +121,9 @@ GetWindowStyle(SDL_Window * window) * Returns arguments to pass to SetWindowPos - the window rect, including frame, in Windows coordinates. * Can be called before we have a HWND. */ -static void -WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL menu, int *x, int *y, int *width, int *height, SDL_bool use_current) +static void WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL menu, int *x, int *y, int *width, int *height, SDL_bool use_current) { - SDL_VideoData* videodata = SDL_GetVideoDevice() ? SDL_GetVideoDevice()->driverdata : NULL; + SDL_VideoData *videodata = SDL_GetVideoDevice() ? SDL_GetVideoDevice()->driverdata : NULL; RECT rect; int dpi = 96; #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) @@ -168,7 +166,7 @@ WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL menu, int *x AdjustWindowRectEx(&rect, style, menu, 0); #else if (WIN_IsPerMonitorV2DPIAware(SDL_GetVideoDevice())) { - /* With per-monitor v2, the window border/titlebar size depend on the DPI, so we need to call AdjustWindowRectExForDpi instead of + /* With per-monitor v2, the window border/titlebar size depend on the DPI, so we need to call AdjustWindowRectExForDpi instead of AdjustWindowRectEx. */ UINT unused; RECT screen_rect; @@ -176,20 +174,22 @@ WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL menu, int *x screen_rect.left = *x; screen_rect.top = *y; - screen_rect.right = *x + *width; - screen_rect.bottom = *y + *height; + screen_rect.right = (LONG)*x + *width; + screen_rect.bottom = (LONG)*y + *height; mon = MonitorFromRect(&screen_rect, MONITOR_DEFAULTTONEAREST); - /* GetDpiForMonitor docs promise to return the same hdpi / vdpi */ - if (videodata->GetDpiForMonitor(mon, MDT_EFFECTIVE_DPI, &frame_dpi, &unused) != S_OK) { - frame_dpi = 96; - } + if (videodata != NULL) { + /* GetDpiForMonitor docs promise to return the same hdpi / vdpi */ + if (videodata->GetDpiForMonitor(mon, MDT_EFFECTIVE_DPI, &frame_dpi, &unused) != S_OK) { + frame_dpi = 96; + } - videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, frame_dpi); + videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, frame_dpi); + } } else { AdjustWindowRectEx(&rect, style, menu, 0); - } + } #endif } @@ -200,17 +200,16 @@ WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL menu, int *x *height = (rect.bottom - rect.top); #ifdef HIGHDPI_DEBUG - SDL_Log("WIN_AdjustWindowRectWithStyle: in: %d, %d, %dx%d, returning: %d, %d, %dx%d, used dpi %d for frame calculation", - (use_current ? window->x : window->windowed.x), - (use_current ? window->y : window->windowed.y), - (use_current ? window->w : window->windowed.w), - (use_current ? window->h : window->windowed.h), - *x, *y, *width, *height, frame_dpi); + SDL_Log("WIN_AdjustWindowRectWithStyle: in: %d, %d, %dx%d, returning: %d, %d, %dx%d, used dpi %d for frame calculation", + (use_current ? window->x : window->windowed.x), + (use_current ? window->y : window->windowed.y), + (use_current ? window->w : window->windowed.w), + (use_current ? window->h : window->windowed.h), + *x, *y, *width, *height, frame_dpi); #endif } -static void -WIN_AdjustWindowRect(SDL_Window *window, int *x, int *y, int *width, int *height, SDL_bool use_current) +static void WIN_AdjustWindowRect(SDL_Window *window, int *x, int *y, int *width, int *height, SDL_bool use_current) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -226,8 +225,7 @@ WIN_AdjustWindowRect(SDL_Window *window, int *x, int *y, int *width, int *height WIN_AdjustWindowRectWithStyle(window, style, menu, x, y, width, height, use_current); } -static void -WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags) +static void WIN_SetWindowPositionInternal(_THIS, SDL_Window *window, UINT flags) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -249,15 +247,13 @@ WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags) data->expected_resize = SDL_FALSE; } -static void SDLCALL -WIN_MouseRelativeModeCenterChanged(void *userdata, const char *name, const char *oldValue, const char *hint) +static void SDLCALL WIN_MouseRelativeModeCenterChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { SDL_WindowData *data = (SDL_WindowData *)userdata; data->mouse_relative_mode_center = SDL_GetStringBoolean(hint, SDL_TRUE); } -static int -WIN_GetScalingDPIForHWND(const SDL_VideoData *videodata, HWND hwnd) +static int WIN_GetScalingDPIForHWND(const SDL_VideoData *videodata, HWND hwnd) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) return 96; @@ -297,24 +293,25 @@ WIN_GetScalingDPIForHWND(const SDL_VideoData *videodata, HWND hwnd) #endif } -static int -SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool created) +static int SetupWindowData(_THIS, SDL_Window *window, HWND hwnd, HWND parent, SDL_bool created) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_WindowData *data; /* Allocate the window data */ - data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (SDL_WindowData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { return SDL_OutOfMemory(); } data->window = window; data->hwnd = hwnd; data->parent = parent; -#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) +#if defined(__XBOXONE__) || defined(__XBOXSERIES__) + data->hdc = (HDC) data->hwnd; +#else data->hdc = GetDC(hwnd); #endif - data->hinstance = (HINSTANCE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE); + data->hinstance = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE); data->created = created; data->high_surrogate = 0; data->mouse_button_flags = (WPARAM)-1; @@ -331,7 +328,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre window->driverdata = data; -#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) +#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* Associate the data with the window */ if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) { ReleaseDC(hwnd, data->hdc); @@ -342,18 +339,18 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre /* Set up the window proc function */ #ifdef GWLP_WNDPROC - data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC); + data->wndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_WNDPROC); if (data->wndproc == WIN_WindowProc) { data->wndproc = NULL; } else { - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc); + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WIN_WindowProc); } #else - data->wndproc = (WNDPROC) GetWindowLong(hwnd, GWL_WNDPROC); + data->wndproc = (WNDPROC)GetWindowLong(hwnd, GWL_WNDPROC); if (data->wndproc == WIN_WindowProc) { data->wndproc = NULL; } else { - SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR) WIN_WindowProc); + SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR)WIN_WindowProc); } #endif @@ -379,7 +376,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre } } } -#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) +#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) { POINT point; point.x = 0; @@ -441,7 +438,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* Enable multi-touch */ if (videodata->RegisterTouchWindow) { - videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM)); + videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH | TWF_WANTPALM)); } #endif @@ -456,9 +453,9 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre return 0; } -static void CleanupWindowData(_THIS, SDL_Window * window) +static void CleanupWindowData(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; if (data) { SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, WIN_MouseRelativeModeCenterChanged, data); @@ -483,10 +480,10 @@ static void CleanupWindowData(_THIS, SDL_Window * window) if (data->wndproc != NULL) { #ifdef GWLP_WNDPROC SetWindowLongPtr(data->hwnd, GWLP_WNDPROC, - (LONG_PTR) data->wndproc); + (LONG_PTR)data->wndproc); #else SetWindowLong(data->hwnd, GWL_WNDPROC, - (LONG_PTR) data->wndproc); + (LONG_PTR)data->wndproc); #endif } } @@ -495,8 +492,7 @@ static void CleanupWindowData(_THIS, SDL_Window * window) window->driverdata = NULL; } -int -WIN_CreateWindow(_THIS, SDL_Window * window) +int WIN_CreateWindow(_THIS, SDL_Window *window) { HWND hwnd, parent = NULL; DWORD style = STYLE_BASIC; @@ -571,13 +567,12 @@ WIN_CreateWindow(_THIS, SDL_Window * window) return 0; } -int -WIN_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int WIN_CreateWindowFrom(_THIS, SDL_Window *window, const void *data) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) return -1; #else - HWND hwnd = (HWND) data; + HWND hwnd = (HWND)data; LPTSTR title; int titleLen; SDL_bool isstack; @@ -609,7 +604,7 @@ WIN_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) the window to share a pixel format with */ SDL_Window *otherWindow = NULL; - SDL_sscanf(hint, "%p", (void**)&otherWindow); + (void)SDL_sscanf(hint, "%p", (void **)&otherWindow); /* Do some error checking on the pointer */ if (otherWindow != NULL && otherWindow->magic == &_this->window_magic) { @@ -631,22 +626,20 @@ WIN_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ } -void -WIN_SetWindowTitle(_THIS, SDL_Window * window) +void WIN_SetWindowTitle(_THIS, SDL_Window *window) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; LPTSTR title = WIN_UTF8ToString(window->title); SetWindowText(hwnd, title); SDL_free(title); #endif } -void -WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void WIN_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; HICON hicon = NULL; BYTE *icon_bmp; int icon_len, mask_len, row_len, y; @@ -656,7 +649,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) /* Create temporary buffer for ICONIMAGE structure */ SDL_COMPILE_TIME_ASSERT(WIN_SetWindowIcon_uses_BITMAPINFOHEADER_to_prepare_an_ICONIMAGE, sizeof(BITMAPINFOHEADER) == 40); - mask_len = (icon->h * (icon->w + 7)/8); + mask_len = (icon->h * (icon->w + 7) / 8); icon_len = sizeof(BITMAPINFOHEADER) + icon->h * icon->w * sizeof(Uint32) + mask_len; icon_bmp = SDL_small_alloc(BYTE, icon_len, &isstack); @@ -680,7 +673,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) row_len = icon->w * sizeof(Uint32); y = icon->h; while (y--) { - Uint8 *src = (Uint8 *) icon->pixels + y * icon->pitch; + Uint8 *src = (Uint8 *)icon->pixels + y * icon->pitch; SDL_memcpy(dst, src, row_len); dst += row_len; } @@ -693,15 +686,14 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) SDL_small_free(icon_bmp, isstack); /* Set the icon for the window */ - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM) hicon); + SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hicon); /* Set the icon in the task manager (should we do this?) */ - SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM) hicon); + SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hicon); #endif } -void -WIN_SetWindowPosition(_THIS, SDL_Window * window) +void WIN_SetWindowPosition(_THIS, SDL_Window *window) { /* HighDPI support: removed SWP_NOSIZE. If the move results in a DPI change, we need to allow * the window to resize (e.g. AdjustWindowRectExForDpi frame sizes are different). @@ -709,17 +701,15 @@ WIN_SetWindowPosition(_THIS, SDL_Window * window) WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOACTIVATE); } -void -WIN_SetWindowSize(_THIS, SDL_Window * window) +void WIN_SetWindowSize(_THIS, SDL_Window *window) { WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOACTIVATE); } -int -WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *bottom, int *right) +int WIN_GetWindowBordersSize(_THIS, SDL_Window *window, int *top, int *left, int *bottom, int *right) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; RECT rcClient; /* rcClient stores the size of the inner window, while rcWindow stores the outer size relative to the top-left @@ -732,8 +722,8 @@ WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b *right = rcClient.right; return 0; -#else /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; +#else /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; RECT rcClient, rcWindow; POINT ptDiff; @@ -756,7 +746,7 @@ WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b return SDL_SetError("ScreenToClient() failed, error %08X", (unsigned int)GetLastError()); } - rcWindow.top = ptDiff.y; + rcWindow.top = ptDiff.y; rcWindow.left = ptDiff.x; /* convert the bottom/right values to make them relative to the window, @@ -769,7 +759,7 @@ WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b } rcWindow.bottom = ptDiff.y; - rcWindow.right = ptDiff.x; + rcWindow.right = ptDiff.x; /* Now that both the inner and outer rects use the same coordinate system we can substract them to get the border size. * Keep in mind that the top/left coordinates of rcWindow are negative because the border lies slightly before {0,0}, @@ -777,30 +767,28 @@ WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b *top = rcClient.top - rcWindow.top; *left = rcClient.left - rcWindow.left; *bottom = rcWindow.bottom - rcClient.bottom; - *right = rcWindow.right - rcClient.right; + *right = rcWindow.right - rcClient.right; return 0; #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ } -void -WIN_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h) +void WIN_GetWindowSizeInPixels(_THIS, SDL_Window *window, int *w, int *h) { const SDL_WindowData *data = ((SDL_WindowData *)window->driverdata); HWND hwnd = data->hwnd; RECT rect; - if (GetClientRect(hwnd, &rect)) { + if (GetClientRect(hwnd, &rect) && !WIN_IsRectEmpty(&rect)) { *w = rect.right; *h = rect.bottom; } else { - *w = 0; - *h = 0; + *w = window->w; + *h = window->h; } } -void -WIN_ShowWindow(_THIS, SDL_Window * window) +void WIN_ShowWindow(_THIS, SDL_Window *window) { DWORD style; HWND hwnd; @@ -815,15 +803,13 @@ WIN_ShowWindow(_THIS, SDL_Window * window) ShowWindow(hwnd, nCmdShow); } -void -WIN_HideWindow(_THIS, SDL_Window * window) +void WIN_HideWindow(_THIS, SDL_Window *window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; ShowWindow(hwnd, SW_HIDE); } -void -WIN_RaiseWindow(_THIS, SDL_Window * window) +void WIN_RaiseWindow(_THIS, SDL_Window *window) { #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) /* If desired, raise the window more forcefully. @@ -840,9 +826,8 @@ WIN_RaiseWindow(_THIS, SDL_Window * window) DWORD dwMyID = 0u; DWORD dwCurID = 0u; - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; - if(bForce) - { + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; + if (bForce) { hCurWnd = GetForegroundWindow(); dwMyID = GetCurrentThreadId(); dwCurID = GetWindowThreadProcessId(hCurWnd, NULL); @@ -852,8 +837,7 @@ WIN_RaiseWindow(_THIS, SDL_Window * window) SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); } SetForegroundWindow(hwnd); - if (bForce) - { + if (bForce) { AttachThreadInput(dwCurID, dwMyID, FALSE); SetFocus(hwnd); SetActiveWindow(hwnd); @@ -861,25 +845,27 @@ WIN_RaiseWindow(_THIS, SDL_Window * window) #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ } -void -WIN_MaximizeWindow(_THIS, SDL_Window * window) +void WIN_MaximizeWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *)window->driverdata; - HWND hwnd = data->hwnd; - data->expected_resize = SDL_TRUE; - ShowWindow(hwnd, SW_MAXIMIZE); - data->expected_resize = SDL_FALSE; + /* Other platforms refuse to maximize a non-resizable window, and with win32, + the OS resizes the window weirdly (covering the taskbar) if you don't have + the STYLE_RESIZABLE flag set. So just forbid it for now. */ + if (window->flags & SDL_WINDOW_RESIZABLE) { + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + HWND hwnd = data->hwnd; + data->expected_resize = SDL_TRUE; + ShowWindow(hwnd, SW_MAXIMIZE); + data->expected_resize = SDL_FALSE; + } } -void -WIN_MinimizeWindow(_THIS, SDL_Window * window) +void WIN_MinimizeWindow(_THIS, SDL_Window *window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + HWND hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; ShowWindow(hwnd, SW_MINIMIZE); } -void -WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) +void WIN_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -895,8 +881,7 @@ WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) data->in_border_change = SDL_FALSE; } -void -WIN_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) +void WIN_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -909,8 +894,7 @@ WIN_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) SetWindowLong(hwnd, GWL_STYLE, style); } -void -WIN_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) +void WIN_SetWindowAlwaysOnTop(_THIS, SDL_Window *window, SDL_bool on_top) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -921,8 +905,7 @@ WIN_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) } } -void -WIN_RestoreWindow(_THIS, SDL_Window * window) +void WIN_RestoreWindow(_THIS, SDL_Window *window) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; @@ -934,12 +917,11 @@ WIN_RestoreWindow(_THIS, SDL_Window * window) /** * Reconfigures the window to fill the given display, if fullscreen is true, otherwise restores the window. */ -void -WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +void WIN_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) { -#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) - SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; +#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) + SDL_DisplayData *displaydata = (SDL_DisplayData *)display->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; HWND hwnd = data->hwnd; MONITORINFO minfo; DWORD style; @@ -947,7 +929,7 @@ WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, int x, y; int w, h; - if (!fullscreen && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP)) != 0) { + if (!fullscreen && (window->flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP))) { /* Resizing the window on hide causes problems restoring it in Wine, and it's unnecessary. * Also, Windows would preview the minimized window with the wrong size. */ @@ -1020,8 +1002,7 @@ WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -int -WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) +int WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; @@ -1039,12 +1020,11 @@ WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) return succeeded ? 0 : -1; } -void -WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event) +void WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); - SDL_DisplayData *displaydata = display ? (SDL_DisplayData*)display->driverdata : NULL; + SDL_DisplayData *displaydata = display ? (SDL_DisplayData *)display->driverdata : NULL; if (displaydata) { HDC hdc = CreateDCW(displaydata->DeviceName, NULL, NULL, NULL); @@ -1069,17 +1049,16 @@ WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event) } } -void * -WIN_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) +void *WIN_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; char *filename_utf8; void *iccProfileData = NULL; filename_utf8 = WIN_StringToUTF8(data->ICMFileName); if (filename_utf8) { iccProfileData = SDL_LoadFile(filename_utf8, size); - if (!iccProfileData) { + if (iccProfileData == NULL) { SDL_SetError("Could not open ICC profile"); } SDL_free(filename_utf8); @@ -1089,8 +1068,7 @@ WIN_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) return iccProfileData; } -int -WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) +int WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; @@ -1152,20 +1130,17 @@ void WIN_UngrabKeyboard(SDL_Window *window) } } -void -WIN_SetWindowMouseRect(_THIS, SDL_Window * window) +void WIN_SetWindowMouseRect(_THIS, SDL_Window *window) { WIN_UpdateClipCursor(window); } -void -WIN_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void WIN_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { WIN_UpdateClipCursor(window); } -void -WIN_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void WIN_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { if (grabbed) { WIN_GrabKeyboard(window); @@ -1175,11 +1150,10 @@ WIN_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) } #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ -void -WIN_DestroyWindow(_THIS, SDL_Window * window) +void WIN_DestroyWindow(_THIS, SDL_Window *window) { if (window->shaper) { - SDL_ShapeData *shapedata = (SDL_ShapeData *) window->shaper->driverdata; + SDL_ShapeData *shapedata = (SDL_ShapeData *)window->shaper->driverdata; if (shapedata) { if (shapedata->mask_tree) { SDL_FreeShapeTree(&shapedata->mask_tree); @@ -1193,8 +1167,7 @@ WIN_DestroyWindow(_THIS, SDL_Window * window) CleanupWindowData(_this, window); } -SDL_bool -WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { const SDL_WindowData *data = (const SDL_WindowData *) window->driverdata; if (info->version.major <= SDL_MAJOR_VERSION) { @@ -1222,8 +1195,7 @@ WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) /* * Creates a HelperWindow used for DirectInput. */ -int -SDL_HelperWindowCreate(void) +int SDL_HelperWindowCreate(void) { HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wce; @@ -1260,12 +1232,10 @@ SDL_HelperWindowCreate(void) return 0; } - /* * Destroys the HelperWindow previously created with SDL_HelperWindowCreate. */ -void -SDL_HelperWindowDestroy(void) +void SDL_HelperWindowDestroy(void) { HINSTANCE hInstance = GetModuleHandle(NULL); @@ -1289,11 +1259,11 @@ SDL_HelperWindowDestroy(void) } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -void WIN_OnWindowEnter(_THIS, SDL_Window * window) +void WIN_OnWindowEnter(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; - if (!data || !data->hwnd) { + if (data == NULL || !data->hwnd) { /* The window wasn't fully initialized */ return; } @@ -1303,10 +1273,9 @@ void WIN_OnWindowEnter(_THIS, SDL_Window * window) } } -void -WIN_UpdateClipCursor(SDL_Window *window) +void WIN_UpdateClipCursor(SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_Mouse *mouse = SDL_GetMouse(); RECT rect, clipped_rect; @@ -1325,14 +1294,16 @@ WIN_UpdateClipCursor(SDL_Window *window) (window->flags & SDL_WINDOW_INPUT_FOCUS)) { if (mouse->relative_mode && !mouse->relative_mode_warp && data->mouse_relative_mode_center) { if (GetWindowRect(data->hwnd, &rect)) { + /* WIN_WarpCursor() jitters by +1, and remote desktop warp wobble is +/- 1 */ + LONG remote_desktop_adjustment = GetSystemMetrics(SM_REMOTESESSION) ? 2 : 0; LONG cx, cy; cx = (rect.left + rect.right) / 2; cy = (rect.top + rect.bottom) / 2; /* Make an absurdly small clip rect */ - rect.left = cx; - rect.right = cx + 1; + rect.left = cx - remote_desktop_adjustment; + rect.right = cx + 1 + remote_desktop_adjustment; rect.top = cy; rect.bottom = cy + 1; @@ -1344,8 +1315,8 @@ WIN_UpdateClipCursor(SDL_Window *window) } } else { if (GetClientRect(data->hwnd, &rect)) { - ClientToScreen(data->hwnd, (LPPOINT) & rect); - ClientToScreen(data->hwnd, (LPPOINT) & rect + 1); + ClientToScreen(data->hwnd, (LPPOINT)&rect); + ClientToScreen(data->hwnd, (LPPOINT)&rect + 1); if (window->mouse_rect.w > 0 && window->mouse_rect.h > 0) { SDL_Rect mouse_rect_win_client; RECT mouse_rect, intersection; @@ -1362,14 +1333,14 @@ WIN_UpdateClipCursor(SDL_Window *window) mouse_rect.bottom = mouse_rect.top + mouse_rect_win_client.h; if (IntersectRect(&intersection, &rect, &mouse_rect)) { SDL_memcpy(&rect, &intersection, sizeof(rect)); - } else if ((window->flags & SDL_WINDOW_MOUSE_GRABBED) != 0) { + } else if (window->flags & SDL_WINDOW_MOUSE_GRABBED) { /* Mouse rect was invalid, just do the normal grab */ } else { SDL_zero(rect); } } if (SDL_memcmp(&rect, &clipped_rect, sizeof(rect)) != 0) { - if (!IsRectEmpty(&rect)) { + if (!WIN_IsRectEmpty(&rect)) { if (ClipCursor(&rect)) { data->cursor_clipped_rect = rect; } @@ -1396,21 +1367,19 @@ WIN_UpdateClipCursor(SDL_Window *window) data->last_updated_clipcursor = SDL_GetTicks(); } -int -WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) +int WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) { - return 0; /* just succeed, the real work is done elsewhere. */ + return 0; /* just succeed, the real work is done elsewhere. */ } #endif /*!defined(__XBOXONE__) && !defined(__XBOXSERIES__)*/ -int -WIN_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) +int WIN_SetWindowOpacity(_THIS, SDL_Window *window, float opacity) { #if defined(__XBOXONE__) || defined(__XBOXSERIES__) return -1; #else - const SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - const HWND hwnd = data->hwnd; + const SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + HWND hwnd = data->hwnd; const LONG style = GetWindowLong(hwnd, GWL_EXSTYLE); SDL_assert(style != 0); @@ -1423,9 +1392,9 @@ WIN_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) } } } else { - const BYTE alpha = (BYTE) ((int) (opacity * 255.0f)); + const BYTE alpha = (BYTE)((int)(opacity * 255.0f)); /* want it transparent, mark it layered if necessary. */ - if ((style & WS_EX_LAYERED) == 0) { + if (!(style & WS_EX_LAYERED)) { if (SetWindowLong(hwnd, GWL_EXSTYLE, style | WS_EX_LAYERED) == 0) { return WIN_SetError("SetWindowLong()"); } @@ -1442,17 +1411,17 @@ WIN_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) /** * Convert a point in the client area from pixels to DPI-scaled points. - * + * * No-op if DPI scaling is not enabled. */ -void -WIN_ClientPointToSDL(const SDL_Window *window, int *x, int *y) +void WIN_ClientPointToSDL(const SDL_Window *window, int *x, int *y) { const SDL_WindowData *data = ((SDL_WindowData *)window->driverdata); const SDL_VideoData *videodata = data->videodata; - if (!videodata->dpi_scaling_enabled) + if (!videodata->dpi_scaling_enabled) { return; + } *x = MulDiv(*x, 96, data->scaling_dpi); *y = MulDiv(*y, 96, data->scaling_dpi); @@ -1460,38 +1429,36 @@ WIN_ClientPointToSDL(const SDL_Window *window, int *x, int *y) /** * Convert a point in the client area from DPI-scaled points to pixels. - * + * * No-op if DPI scaling is not enabled. */ -void -WIN_ClientPointFromSDL(const SDL_Window *window, int *x, int *y) +void WIN_ClientPointFromSDL(const SDL_Window *window, int *x, int *y) { const SDL_WindowData *data = ((SDL_WindowData *)window->driverdata); const SDL_VideoData *videodata = data->videodata; - if (!videodata->dpi_scaling_enabled) + if (!videodata->dpi_scaling_enabled) { return; - + } + *x = MulDiv(*x, data->scaling_dpi, 96); *y = MulDiv(*y, data->scaling_dpi, 96); } #if !defined(__XBOXONE__) && !defined(__XBOXSERIES__) -void -WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept) +void WIN_AcceptDragAndDrop(SDL_Window *window, SDL_bool accept) { - const SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + const SDL_WindowData *data = (SDL_WindowData *)window->driverdata; DragAcceptFiles(data->hwnd, accept ? TRUE : FALSE); } -int -WIN_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation) +int WIN_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) { FLASHWINFO desc; SDL_zero(desc); desc.cbSize = sizeof(desc); - desc.hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + desc.hwnd = ((SDL_WindowData *)window->driverdata)->hwnd; switch (operation) { case SDL_FLASH_CANCEL: desc.dwFlags = FLASHW_STOP; diff --git a/modules/SDL2/src/video/windows/SDL_windowswindow.h b/modules/SDL2/src/video/windows/SDL_windowswindow.h index 231041a..fe2e35f 100644 --- a/modules/SDL2/src/video/windows/SDL_windowswindow.h +++ b/modules/SDL2/src/video/windows/SDL_windowswindow.h @@ -23,7 +23,7 @@ #ifndef SDL_windowswindow_h_ #define SDL_windowswindow_h_ -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL #include "../SDL_egl_c.h" #else #include "../SDL_sysvideo.h" @@ -64,7 +64,7 @@ typedef struct SDL_bool mouse_tracked; WCHAR *ICMFileName; struct SDL_VideoData *videodata; -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL EGLSurface egl_surface; #endif /** @@ -106,10 +106,10 @@ extern SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window, extern void WIN_OnWindowEnter(_THIS, SDL_Window * window); extern void WIN_UpdateClipCursor(SDL_Window *window); extern int WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled); -extern void WIN_ClientPointToSDL(const SDL_Window *window, int *w, int *h); -extern void WIN_ClientPointFromSDL(const SDL_Window *window, int *w, int *h); -extern void WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept); -extern int WIN_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation); +extern void WIN_ClientPointToSDL(const SDL_Window *window, int *x, int *y); +extern void WIN_ClientPointFromSDL(const SDL_Window *window, int *x, int *y); +extern void WIN_AcceptDragAndDrop(SDL_Window *window, SDL_bool accept); +extern int WIN_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/modules/SDL2/src/video/windows/wmmsg.h b/modules/SDL2/src/video/windows/wmmsg.h index 1a79dcc..d0cb887 100644 --- a/modules/SDL2/src/video/windows/wmmsg.h +++ b/modules/SDL2/src/video/windows/wmmsg.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#define MAX_WMMSG (sizeof(wmtab)/sizeof(wmtab[0])) +#define MAX_WMMSG (sizeof(wmtab) / sizeof(wmtab[0])) const char *wmtab[] = { "WM_NULL", diff --git a/modules/SDL2/src/video/winrt/SDL_winrtevents.cpp b/modules/SDL2/src/video/winrt/SDL_winrtevents.cpp index a977c73..30d1fac 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtevents.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtevents.cpp @@ -44,15 +44,12 @@ extern "C" { #include "../../events/SDL_events_c.h" } - /* Forward declarations */ static void WINRT_YieldXAMLThread(); - /* Global event management */ -void -WINRT_PumpEvents(_THIS) +void WINRT_PumpEvents(_THIS) { if (SDL_WinRTGlobalApp) { SDL_WinRTGlobalApp->PumpEvents(); @@ -61,7 +58,6 @@ WINRT_PumpEvents(_THIS) } } - /* XAML Thread management */ enum SDL_XAMLAppThreadState @@ -72,12 +68,11 @@ enum SDL_XAMLAppThreadState }; static SDL_XAMLAppThreadState _threadState = ThreadState_NotLaunched; -static SDL_Thread * _XAMLThread = nullptr; -static SDL_mutex * _mutex = nullptr; -static SDL_cond * _cond = nullptr; +static SDL_Thread *_XAMLThread = nullptr; +static SDL_mutex *_mutex = nullptr; +static SDL_cond *_cond = nullptr; -static void -WINRT_YieldXAMLThread() +static void WINRT_YieldXAMLThread() { SDL_LockMutex(_mutex); SDL_assert(_threadState == ThreadState_Running); @@ -93,8 +88,7 @@ WINRT_YieldXAMLThread() SDL_UnlockMutex(_mutex); } -static int -WINRT_XAMLThreadMain(void * userdata) +static int WINRT_XAMLThreadMain(void *userdata) { // TODO, WinRT: pass the C-style main() a reasonably realistic // representation of command line arguments. @@ -103,48 +97,47 @@ WINRT_XAMLThreadMain(void * userdata) return WINRT_SDLAppEntryPoint(argc, argv); } -void -WINRT_CycleXAMLThread(void) +void WINRT_CycleXAMLThread(void) { switch (_threadState) { - case ThreadState_NotLaunched: - { - _cond = SDL_CreateCond(); + case ThreadState_NotLaunched: + { + _cond = SDL_CreateCond(); - _mutex = SDL_CreateMutex(); - _threadState = ThreadState_Running; - _XAMLThread = SDL_CreateThreadInternal(WINRT_XAMLThreadMain, "SDL/XAML App Thread", 0, nullptr); + _mutex = SDL_CreateMutex(); + _threadState = ThreadState_Running; + _XAMLThread = SDL_CreateThreadInternal(WINRT_XAMLThreadMain, "SDL/XAML App Thread", 0, nullptr); - SDL_LockMutex(_mutex); - while (_threadState != ThreadState_Yielding) { - SDL_CondWait(_cond, _mutex); - } - SDL_UnlockMutex(_mutex); - - break; + SDL_LockMutex(_mutex); + while (_threadState != ThreadState_Yielding) { + SDL_CondWait(_cond, _mutex); } + SDL_UnlockMutex(_mutex); - case ThreadState_Running: - { - SDL_assert(false); - break; - } + break; + } + + case ThreadState_Running: + { + SDL_assert(false); + break; + } - case ThreadState_Yielding: - { - SDL_LockMutex(_mutex); - SDL_assert(_threadState == ThreadState_Yielding); - _threadState = ThreadState_Running; - SDL_UnlockMutex(_mutex); + case ThreadState_Yielding: + { + SDL_LockMutex(_mutex); + SDL_assert(_threadState == ThreadState_Yielding); + _threadState = ThreadState_Running; + SDL_UnlockMutex(_mutex); - SDL_CondSignal(_cond); + SDL_CondSignal(_cond); - SDL_LockMutex(_mutex); - while (_threadState != ThreadState_Yielding) { - SDL_CondWait(_cond, _mutex); - } - SDL_UnlockMutex(_mutex); + SDL_LockMutex(_mutex); + while (_threadState != ThreadState_Yielding) { + SDL_CondWait(_cond, _mutex); } + SDL_UnlockMutex(_mutex); + } } } diff --git a/modules/SDL2/src/video/winrt/SDL_winrtevents_c.h b/modules/SDL2/src/video/winrt/SDL_winrtevents_c.h index 0daee4a..b761a40 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtevents_c.h +++ b/modules/SDL2/src/video/winrt/SDL_winrtevents_c.h @@ -39,33 +39,33 @@ extern void WINRT_PumpEvents(_THIS); } #endif - /* * Internal-use, C++/CX functions: */ #ifdef __cplusplus_winrt /* Pointers (Mice, Touch, etc.) */ -typedef enum { +typedef enum +{ NormalizeZeroToOne, TransformToSDLWindowSize } WINRT_CursorNormalizationType; -extern Windows::Foundation::Point WINRT_TransformCursorPosition(SDL_Window * window, +extern Windows::Foundation::Point WINRT_TransformCursorPosition(SDL_Window *window, Windows::Foundation::Point rawPosition, WINRT_CursorNormalizationType normalization); -extern SDL_bool WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^pt, Uint8 *button, Uint8 *pressed); -extern void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessPointerEnteredEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessPointerExitedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessPointerWheelChangedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint); -extern void WINRT_ProcessMouseMovedEvent(SDL_Window * window, Windows::Devices::Input::MouseEventArgs ^args); +extern SDL_bool WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^ pt, Uint8 *button, Uint8 *pressed); +extern void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessPointerEnteredEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessPointerExitedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessPointerWheelChangedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint); +extern void WINRT_ProcessMouseMovedEvent(SDL_Window *window, Windows::Devices::Input::MouseEventArgs ^ args); /* Keyboard */ -extern void WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^args); -extern void WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^args); -extern void WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArgs ^args); +extern void WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^ args); +extern void WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^ args); +extern void WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArgs ^ args); #if NTDDI_VERSION >= NTDDI_WIN10 extern void WINTRT_InitialiseInputPaneEvents(_THIS); @@ -73,7 +73,7 @@ extern SDL_bool WINRT_HasScreenKeyboardSupport(_THIS); extern void WINRT_ShowScreenKeyboard(_THIS, SDL_Window *window); extern void WINRT_HideScreenKeyboard(_THIS, SDL_Window *window); extern SDL_bool WINRT_IsScreenKeyboardShown(_THIS, SDL_Window *window); -#endif // NTDDI_VERSION >= ... +#endif // NTDDI_VERSION >= ... /* XAML Thread Management */ extern void WINRT_CycleXAMLThread(void); diff --git a/modules/SDL2/src/video/winrt/SDL_winrtgamebar.cpp b/modules/SDL2/src/video/winrt/SDL_winrtgamebar.cpp index 9da2564..fd71a55 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtgamebar.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtgamebar.cpp @@ -27,7 +27,6 @@ #include #include - /* SDL includes */ extern "C" { #include "SDL_mouse.h" @@ -35,13 +34,11 @@ extern "C" { } #include "SDL_winrtvideo_cpp.h" - /* Game Bar events can come in off the main thread. Use the following WinRT CoreDispatcher to deal with them on SDL's thread. */ static Platform::WeakReference WINRT_MainThreadDispatcher; - /* Win10's initial SDK (the 10.0.10240.0 release) does not include references to Game Bar APIs, as the Game Bar was released via Win10 10.0.10586.0. @@ -51,26 +48,26 @@ static Platform::WeakReference WINRT_MainThreadDispatcher; MIDL_INTERFACE("1DB9A292-CC78-4173-BE45-B61E67283EA7") IGameBarStatics_ : public IInspectable { -public: - virtual HRESULT STDMETHODCALLTYPE add_VisibilityChanged( - __FIEventHandler_1_IInspectable *handler, - Windows::Foundation::EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_VisibilityChanged( + public: + virtual HRESULT STDMETHODCALLTYPE add_VisibilityChanged( + __FIEventHandler_1_IInspectable * handler, + Windows::Foundation::EventRegistrationToken * token) = 0; + + virtual HRESULT STDMETHODCALLTYPE remove_VisibilityChanged( Windows::Foundation::EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_IsInputRedirectedChanged( - __FIEventHandler_1_IInspectable *handler, - Windows::Foundation::EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_IsInputRedirectedChanged( + + virtual HRESULT STDMETHODCALLTYPE add_IsInputRedirectedChanged( + __FIEventHandler_1_IInspectable * handler, + Windows::Foundation::EventRegistrationToken * token) = 0; + + virtual HRESULT STDMETHODCALLTYPE remove_IsInputRedirectedChanged( Windows::Foundation::EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE get_Visible( - boolean *value) = 0; - - virtual HRESULT STDMETHODCALLTYPE get_IsInputRedirected( - boolean *value) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Visible( + boolean * value) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_IsInputRedirected( + boolean * value) = 0; }; /* Declare the game bar's COM GUID */ @@ -80,8 +77,7 @@ static GUID IID_IGameBarStatics_ = { MAKELONG(0xA292, 0x1DB9), 0xCC78, 0x4173, { If a pointer is returned, it's ->Release() method must be called after the caller has finished using it. */ -static IGameBarStatics_ * -WINRT_GetGameBar() +static IGameBarStatics_ *WINRT_GetGameBar() { wchar_t *wClassName = L"Windows.Gaming.UI.GameBar"; HSTRING hClassName; @@ -99,7 +95,7 @@ WINRT_GetGameBar() goto done; } - pActivationFactory->QueryInterface(IID_IGameBarStatics_, (void **) &pGameBar); + pActivationFactory->QueryInterface(IID_IGameBarStatics_, (void **)&pGameBar); done: if (pActivationFactory) { @@ -111,8 +107,7 @@ done: return pGameBar; } -static void -WINRT_HandleGameBarIsInputRedirected_MainThread() +static void WINRT_HandleGameBarIsInputRedirected_MainThread() { IGameBarStatics_ *gameBar; boolean isInputRedirected = 0; @@ -121,12 +116,12 @@ WINRT_HandleGameBarIsInputRedirected_MainThread() return; } gameBar = WINRT_GetGameBar(); - if (!gameBar) { + if (gameBar == NULL) { /* Shouldn't happen, but just in case... */ return; } if (SUCCEEDED(gameBar->get_IsInputRedirected(&isInputRedirected))) { - if ( ! isInputRedirected) { + if (!isInputRedirected) { /* Input-control is now back to the SDL app. Restore the cursor, in case Windows does not (it does not in either Win10 10.0.10240.0 or 10.0.10586.0, maybe later version(s) too. @@ -138,10 +133,9 @@ WINRT_HandleGameBarIsInputRedirected_MainThread() gameBar->Release(); } -static void -WINRT_HandleGameBarIsInputRedirected_NonMainThread(Platform::Object ^ o1, Platform::Object ^o2) +static void WINRT_HandleGameBarIsInputRedirected_NonMainThread(Platform::Object ^ o1, Platform::Object ^ o2) { - Windows::UI::Core::CoreDispatcher ^dispatcher = WINRT_MainThreadDispatcher.Resolve(); + Windows::UI::Core::CoreDispatcher ^ dispatcher = WINRT_MainThreadDispatcher.Resolve(); if (dispatcher) { dispatcher->RunAsync( Windows::UI::Core::CoreDispatcherPriority::Normal, @@ -149,8 +143,7 @@ WINRT_HandleGameBarIsInputRedirected_NonMainThread(Platform::Object ^ o1, Platfo } } -void -WINRT_InitGameBar(_THIS) +void WINRT_InitGameBar(_THIS) { SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; IGameBarStatics_ *gameBar = WINRT_GetGameBar(); @@ -162,24 +155,23 @@ WINRT_InitGameBar(_THIS) SDL thread. */ WINRT_MainThreadDispatcher = Windows::UI::Core::CoreWindow::GetForCurrentThread()->Dispatcher; - Windows::Foundation::EventHandler ^handler = \ + Windows::Foundation::EventHandler ^ handler = ref new Windows::Foundation::EventHandler(&WINRT_HandleGameBarIsInputRedirected_NonMainThread); - __FIEventHandler_1_IInspectable * pHandler = reinterpret_cast<__FIEventHandler_1_IInspectable *>(handler); + __FIEventHandler_1_IInspectable *pHandler = reinterpret_cast<__FIEventHandler_1_IInspectable *>(handler); gameBar->add_IsInputRedirectedChanged(pHandler, &driverdata->gameBarIsInputRedirectedToken); gameBar->Release(); } } -void -WINRT_QuitGameBar(_THIS) +void WINRT_QuitGameBar(_THIS) { SDL_VideoData *driverdata; IGameBarStatics_ *gameBar; - if (!_this || !_this->driverdata) { + if (_this == NULL || _this->driverdata == NULL) { return; } gameBar = WINRT_GetGameBar(); - if (!gameBar) { + if (gameBar == NULL) { return; } driverdata = (SDL_VideoData *)_this->driverdata; diff --git a/modules/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp b/modules/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp index f7d9580..9e6e141 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp @@ -26,7 +26,6 @@ #include #include - /* SDL-specific includes */ #include "SDL.h" #include "SDL_winrtevents_c.h" @@ -36,223 +35,241 @@ extern "C" { #include "../../events/SDL_keyboard_c.h" } - static SDL_Scancode WinRT_Official_Keycodes[] = { - SDL_SCANCODE_UNKNOWN, /* VirtualKey.None -- 0 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.LeftButton -- 1 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.RightButton -- 2 */ - SDL_SCANCODE_CANCEL, /* VirtualKey.Cancel -- 3 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.MiddleButton -- 4 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.XButton1 -- 5 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.XButton2 -- 6 */ - SDL_SCANCODE_UNKNOWN, /* -- 7 */ - SDL_SCANCODE_BACKSPACE, /* VirtualKey.Back -- 8 */ - SDL_SCANCODE_TAB, /* VirtualKey.Tab -- 9 */ - SDL_SCANCODE_UNKNOWN, /* -- 10 */ - SDL_SCANCODE_UNKNOWN, /* -- 11 */ - SDL_SCANCODE_CLEAR, /* VirtualKey.Clear -- 12 */ - SDL_SCANCODE_RETURN, /* VirtualKey.Enter -- 13 */ - SDL_SCANCODE_UNKNOWN, /* -- 14 */ - SDL_SCANCODE_UNKNOWN, /* -- 15 */ - SDL_SCANCODE_LSHIFT, /* VirtualKey.Shift -- 16 */ - SDL_SCANCODE_LCTRL, /* VirtualKey.Control -- 17 */ - SDL_SCANCODE_MENU, /* VirtualKey.Menu -- 18 */ - SDL_SCANCODE_PAUSE, /* VirtualKey.Pause -- 19 */ - SDL_SCANCODE_CAPSLOCK, /* VirtualKey.CapitalLock -- 20 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Kana or VirtualKey.Hangul -- 21 */ - SDL_SCANCODE_UNKNOWN, /* -- 22 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Junja -- 23 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Final -- 24 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Hanja or VirtualKey.Kanji -- 25 */ - SDL_SCANCODE_UNKNOWN, /* -- 26 */ - SDL_SCANCODE_ESCAPE, /* VirtualKey.Escape -- 27 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Convert -- 28 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.NonConvert -- 29 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Accept -- 30 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.ModeChange -- 31 (maybe SDL_SCANCODE_MODE ?) */ - SDL_SCANCODE_SPACE, /* VirtualKey.Space -- 32 */ - SDL_SCANCODE_PAGEUP, /* VirtualKey.PageUp -- 33 */ - SDL_SCANCODE_PAGEDOWN, /* VirtualKey.PageDown -- 34 */ - SDL_SCANCODE_END, /* VirtualKey.End -- 35 */ - SDL_SCANCODE_HOME, /* VirtualKey.Home -- 36 */ - SDL_SCANCODE_LEFT, /* VirtualKey.Left -- 37 */ - SDL_SCANCODE_UP, /* VirtualKey.Up -- 38 */ - SDL_SCANCODE_RIGHT, /* VirtualKey.Right -- 39 */ - SDL_SCANCODE_DOWN, /* VirtualKey.Down -- 40 */ - SDL_SCANCODE_SELECT, /* VirtualKey.Select -- 41 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Print -- 42 (maybe SDL_SCANCODE_PRINTSCREEN ?) */ - SDL_SCANCODE_EXECUTE, /* VirtualKey.Execute -- 43 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Snapshot -- 44 */ - SDL_SCANCODE_INSERT, /* VirtualKey.Insert -- 45 */ - SDL_SCANCODE_DELETE, /* VirtualKey.Delete -- 46 */ - SDL_SCANCODE_HELP, /* VirtualKey.Help -- 47 */ - SDL_SCANCODE_0, /* VirtualKey.Number0 -- 48 */ - SDL_SCANCODE_1, /* VirtualKey.Number1 -- 49 */ - SDL_SCANCODE_2, /* VirtualKey.Number2 -- 50 */ - SDL_SCANCODE_3, /* VirtualKey.Number3 -- 51 */ - SDL_SCANCODE_4, /* VirtualKey.Number4 -- 52 */ - SDL_SCANCODE_5, /* VirtualKey.Number5 -- 53 */ - SDL_SCANCODE_6, /* VirtualKey.Number6 -- 54 */ - SDL_SCANCODE_7, /* VirtualKey.Number7 -- 55 */ - SDL_SCANCODE_8, /* VirtualKey.Number8 -- 56 */ - SDL_SCANCODE_9, /* VirtualKey.Number9 -- 57 */ - SDL_SCANCODE_UNKNOWN, /* -- 58 */ - SDL_SCANCODE_UNKNOWN, /* -- 59 */ - SDL_SCANCODE_UNKNOWN, /* -- 60 */ - SDL_SCANCODE_UNKNOWN, /* -- 61 */ - SDL_SCANCODE_UNKNOWN, /* -- 62 */ - SDL_SCANCODE_UNKNOWN, /* -- 63 */ - SDL_SCANCODE_UNKNOWN, /* -- 64 */ - SDL_SCANCODE_A, /* VirtualKey.A -- 65 */ - SDL_SCANCODE_B, /* VirtualKey.B -- 66 */ - SDL_SCANCODE_C, /* VirtualKey.C -- 67 */ - SDL_SCANCODE_D, /* VirtualKey.D -- 68 */ - SDL_SCANCODE_E, /* VirtualKey.E -- 69 */ - SDL_SCANCODE_F, /* VirtualKey.F -- 70 */ - SDL_SCANCODE_G, /* VirtualKey.G -- 71 */ - SDL_SCANCODE_H, /* VirtualKey.H -- 72 */ - SDL_SCANCODE_I, /* VirtualKey.I -- 73 */ - SDL_SCANCODE_J, /* VirtualKey.J -- 74 */ - SDL_SCANCODE_K, /* VirtualKey.K -- 75 */ - SDL_SCANCODE_L, /* VirtualKey.L -- 76 */ - SDL_SCANCODE_M, /* VirtualKey.M -- 77 */ - SDL_SCANCODE_N, /* VirtualKey.N -- 78 */ - SDL_SCANCODE_O, /* VirtualKey.O -- 79 */ - SDL_SCANCODE_P, /* VirtualKey.P -- 80 */ - SDL_SCANCODE_Q, /* VirtualKey.Q -- 81 */ - SDL_SCANCODE_R, /* VirtualKey.R -- 82 */ - SDL_SCANCODE_S, /* VirtualKey.S -- 83 */ - SDL_SCANCODE_T, /* VirtualKey.T -- 84 */ - SDL_SCANCODE_U, /* VirtualKey.U -- 85 */ - SDL_SCANCODE_V, /* VirtualKey.V -- 86 */ - SDL_SCANCODE_W, /* VirtualKey.W -- 87 */ - SDL_SCANCODE_X, /* VirtualKey.X -- 88 */ - SDL_SCANCODE_Y, /* VirtualKey.Y -- 89 */ - SDL_SCANCODE_Z, /* VirtualKey.Z -- 90 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.LeftWindows -- 91 (maybe SDL_SCANCODE_APPLICATION or SDL_SCANCODE_LGUI ?) */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.RightWindows -- 92 (maybe SDL_SCANCODE_APPLICATION or SDL_SCANCODE_RGUI ?) */ - SDL_SCANCODE_APPLICATION, /* VirtualKey.Application -- 93 */ - SDL_SCANCODE_UNKNOWN, /* -- 94 */ - SDL_SCANCODE_SLEEP, /* VirtualKey.Sleep -- 95 */ - SDL_SCANCODE_KP_0, /* VirtualKey.NumberPad0 -- 96 */ - SDL_SCANCODE_KP_1, /* VirtualKey.NumberPad1 -- 97 */ - SDL_SCANCODE_KP_2, /* VirtualKey.NumberPad2 -- 98 */ - SDL_SCANCODE_KP_3, /* VirtualKey.NumberPad3 -- 99 */ - SDL_SCANCODE_KP_4, /* VirtualKey.NumberPad4 -- 100 */ - SDL_SCANCODE_KP_5, /* VirtualKey.NumberPad5 -- 101 */ - SDL_SCANCODE_KP_6, /* VirtualKey.NumberPad6 -- 102 */ - SDL_SCANCODE_KP_7, /* VirtualKey.NumberPad7 -- 103 */ - SDL_SCANCODE_KP_8, /* VirtualKey.NumberPad8 -- 104 */ - SDL_SCANCODE_KP_9, /* VirtualKey.NumberPad9 -- 105 */ - SDL_SCANCODE_KP_MULTIPLY, /* VirtualKey.Multiply -- 106 */ - SDL_SCANCODE_KP_PLUS, /* VirtualKey.Add -- 107 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Separator -- 108 */ - SDL_SCANCODE_KP_MINUS, /* VirtualKey.Subtract -- 109 */ - SDL_SCANCODE_UNKNOWN, /* VirtualKey.Decimal -- 110 (maybe SDL_SCANCODE_DECIMALSEPARATOR, SDL_SCANCODE_KP_DECIMAL, or SDL_SCANCODE_KP_PERIOD ?) */ - SDL_SCANCODE_KP_DIVIDE, /* VirtualKey.Divide -- 111 */ - SDL_SCANCODE_F1, /* VirtualKey.F1 -- 112 */ - SDL_SCANCODE_F2, /* VirtualKey.F2 -- 113 */ - SDL_SCANCODE_F3, /* VirtualKey.F3 -- 114 */ - SDL_SCANCODE_F4, /* VirtualKey.F4 -- 115 */ - SDL_SCANCODE_F5, /* VirtualKey.F5 -- 116 */ - SDL_SCANCODE_F6, /* VirtualKey.F6 -- 117 */ - SDL_SCANCODE_F7, /* VirtualKey.F7 -- 118 */ - SDL_SCANCODE_F8, /* VirtualKey.F8 -- 119 */ - SDL_SCANCODE_F9, /* VirtualKey.F9 -- 120 */ - SDL_SCANCODE_F10, /* VirtualKey.F10 -- 121 */ - SDL_SCANCODE_F11, /* VirtualKey.F11 -- 122 */ - SDL_SCANCODE_F12, /* VirtualKey.F12 -- 123 */ - SDL_SCANCODE_F13, /* VirtualKey.F13 -- 124 */ - SDL_SCANCODE_F14, /* VirtualKey.F14 -- 125 */ - SDL_SCANCODE_F15, /* VirtualKey.F15 -- 126 */ - SDL_SCANCODE_F16, /* VirtualKey.F16 -- 127 */ - SDL_SCANCODE_F17, /* VirtualKey.F17 -- 128 */ - SDL_SCANCODE_F18, /* VirtualKey.F18 -- 129 */ - SDL_SCANCODE_F19, /* VirtualKey.F19 -- 130 */ - SDL_SCANCODE_F20, /* VirtualKey.F20 -- 131 */ - SDL_SCANCODE_F21, /* VirtualKey.F21 -- 132 */ - SDL_SCANCODE_F22, /* VirtualKey.F22 -- 133 */ - SDL_SCANCODE_F23, /* VirtualKey.F23 -- 134 */ - SDL_SCANCODE_F24, /* VirtualKey.F24 -- 135 */ - SDL_SCANCODE_UNKNOWN, /* -- 136 */ - SDL_SCANCODE_UNKNOWN, /* -- 137 */ - SDL_SCANCODE_UNKNOWN, /* -- 138 */ - SDL_SCANCODE_UNKNOWN, /* -- 139 */ - SDL_SCANCODE_UNKNOWN, /* -- 140 */ - SDL_SCANCODE_UNKNOWN, /* -- 141 */ - SDL_SCANCODE_UNKNOWN, /* -- 142 */ - SDL_SCANCODE_UNKNOWN, /* -- 143 */ - SDL_SCANCODE_NUMLOCKCLEAR, /* VirtualKey.NumberKeyLock -- 144 */ - SDL_SCANCODE_SCROLLLOCK, /* VirtualKey.Scroll -- 145 */ - SDL_SCANCODE_UNKNOWN, /* -- 146 */ - SDL_SCANCODE_UNKNOWN, /* -- 147 */ - SDL_SCANCODE_UNKNOWN, /* -- 148 */ - SDL_SCANCODE_UNKNOWN, /* -- 149 */ - SDL_SCANCODE_UNKNOWN, /* -- 150 */ - SDL_SCANCODE_UNKNOWN, /* -- 151 */ - SDL_SCANCODE_UNKNOWN, /* -- 152 */ - SDL_SCANCODE_UNKNOWN, /* -- 153 */ - SDL_SCANCODE_UNKNOWN, /* -- 154 */ - SDL_SCANCODE_UNKNOWN, /* -- 155 */ - SDL_SCANCODE_UNKNOWN, /* -- 156 */ - SDL_SCANCODE_UNKNOWN, /* -- 157 */ - SDL_SCANCODE_UNKNOWN, /* -- 158 */ - SDL_SCANCODE_UNKNOWN, /* -- 159 */ - SDL_SCANCODE_LSHIFT, /* VirtualKey.LeftShift -- 160 */ - SDL_SCANCODE_RSHIFT, /* VirtualKey.RightShift -- 161 */ - SDL_SCANCODE_LCTRL, /* VirtualKey.LeftControl -- 162 */ - SDL_SCANCODE_RCTRL, /* VirtualKey.RightControl -- 163 */ - SDL_SCANCODE_MENU, /* VirtualKey.LeftMenu -- 164 */ - SDL_SCANCODE_MENU, /* VirtualKey.RightMenu -- 165 */ - SDL_SCANCODE_AC_BACK, /* VirtualKey.GoBack -- 166 : The go back key. */ - SDL_SCANCODE_AC_FORWARD, /* VirtualKey.GoForward -- 167 : The go forward key. */ - SDL_SCANCODE_AC_REFRESH, /* VirtualKey.Refresh -- 168 : The refresh key. */ - SDL_SCANCODE_AC_STOP, /* VirtualKey.Stop -- 169 : The stop key. */ - SDL_SCANCODE_AC_SEARCH, /* VirtualKey.Search -- 170 : The search key. */ - SDL_SCANCODE_AC_BOOKMARKS, /* VirtualKey.Favorites -- 171 : The favorites key. */ - SDL_SCANCODE_AC_HOME /* VirtualKey.GoHome -- 172 : The go home key. */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.None -- 0 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.LeftButton -- 1 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.RightButton -- 2 */ + SDL_SCANCODE_CANCEL, /* VirtualKey.Cancel -- 3 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.MiddleButton -- 4 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.XButton1 -- 5 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.XButton2 -- 6 */ + SDL_SCANCODE_UNKNOWN, /* -- 7 */ + SDL_SCANCODE_BACKSPACE, /* VirtualKey.Back -- 8 */ + SDL_SCANCODE_TAB, /* VirtualKey.Tab -- 9 */ + SDL_SCANCODE_UNKNOWN, /* -- 10 */ + SDL_SCANCODE_UNKNOWN, /* -- 11 */ + SDL_SCANCODE_CLEAR, /* VirtualKey.Clear -- 12 */ + SDL_SCANCODE_RETURN, /* VirtualKey.Enter -- 13 */ + SDL_SCANCODE_UNKNOWN, /* -- 14 */ + SDL_SCANCODE_UNKNOWN, /* -- 15 */ + SDL_SCANCODE_LSHIFT, /* VirtualKey.Shift -- 16 */ + SDL_SCANCODE_LCTRL, /* VirtualKey.Control -- 17 */ + SDL_SCANCODE_MENU, /* VirtualKey.Menu -- 18 */ + SDL_SCANCODE_PAUSE, /* VirtualKey.Pause -- 19 */ + SDL_SCANCODE_CAPSLOCK, /* VirtualKey.CapitalLock -- 20 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Kana or VirtualKey.Hangul -- 21 */ + SDL_SCANCODE_UNKNOWN, /* -- 22 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Junja -- 23 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Final -- 24 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Hanja or VirtualKey.Kanji -- 25 */ + SDL_SCANCODE_UNKNOWN, /* -- 26 */ + SDL_SCANCODE_ESCAPE, /* VirtualKey.Escape -- 27 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Convert -- 28 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.NonConvert -- 29 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Accept -- 30 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.ModeChange -- 31 (maybe SDL_SCANCODE_MODE ?) */ + SDL_SCANCODE_SPACE, /* VirtualKey.Space -- 32 */ + SDL_SCANCODE_PAGEUP, /* VirtualKey.PageUp -- 33 */ + SDL_SCANCODE_PAGEDOWN, /* VirtualKey.PageDown -- 34 */ + SDL_SCANCODE_END, /* VirtualKey.End -- 35 */ + SDL_SCANCODE_HOME, /* VirtualKey.Home -- 36 */ + SDL_SCANCODE_LEFT, /* VirtualKey.Left -- 37 */ + SDL_SCANCODE_UP, /* VirtualKey.Up -- 38 */ + SDL_SCANCODE_RIGHT, /* VirtualKey.Right -- 39 */ + SDL_SCANCODE_DOWN, /* VirtualKey.Down -- 40 */ + SDL_SCANCODE_SELECT, /* VirtualKey.Select -- 41 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Print -- 42 (maybe SDL_SCANCODE_PRINTSCREEN ?) */ + SDL_SCANCODE_EXECUTE, /* VirtualKey.Execute -- 43 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Snapshot -- 44 */ + SDL_SCANCODE_INSERT, /* VirtualKey.Insert -- 45 */ + SDL_SCANCODE_DELETE, /* VirtualKey.Delete -- 46 */ + SDL_SCANCODE_HELP, /* VirtualKey.Help -- 47 */ + SDL_SCANCODE_0, /* VirtualKey.Number0 -- 48 */ + SDL_SCANCODE_1, /* VirtualKey.Number1 -- 49 */ + SDL_SCANCODE_2, /* VirtualKey.Number2 -- 50 */ + SDL_SCANCODE_3, /* VirtualKey.Number3 -- 51 */ + SDL_SCANCODE_4, /* VirtualKey.Number4 -- 52 */ + SDL_SCANCODE_5, /* VirtualKey.Number5 -- 53 */ + SDL_SCANCODE_6, /* VirtualKey.Number6 -- 54 */ + SDL_SCANCODE_7, /* VirtualKey.Number7 -- 55 */ + SDL_SCANCODE_8, /* VirtualKey.Number8 -- 56 */ + SDL_SCANCODE_9, /* VirtualKey.Number9 -- 57 */ + SDL_SCANCODE_UNKNOWN, /* -- 58 */ + SDL_SCANCODE_UNKNOWN, /* -- 59 */ + SDL_SCANCODE_UNKNOWN, /* -- 60 */ + SDL_SCANCODE_UNKNOWN, /* -- 61 */ + SDL_SCANCODE_UNKNOWN, /* -- 62 */ + SDL_SCANCODE_UNKNOWN, /* -- 63 */ + SDL_SCANCODE_UNKNOWN, /* -- 64 */ + SDL_SCANCODE_A, /* VirtualKey.A -- 65 */ + SDL_SCANCODE_B, /* VirtualKey.B -- 66 */ + SDL_SCANCODE_C, /* VirtualKey.C -- 67 */ + SDL_SCANCODE_D, /* VirtualKey.D -- 68 */ + SDL_SCANCODE_E, /* VirtualKey.E -- 69 */ + SDL_SCANCODE_F, /* VirtualKey.F -- 70 */ + SDL_SCANCODE_G, /* VirtualKey.G -- 71 */ + SDL_SCANCODE_H, /* VirtualKey.H -- 72 */ + SDL_SCANCODE_I, /* VirtualKey.I -- 73 */ + SDL_SCANCODE_J, /* VirtualKey.J -- 74 */ + SDL_SCANCODE_K, /* VirtualKey.K -- 75 */ + SDL_SCANCODE_L, /* VirtualKey.L -- 76 */ + SDL_SCANCODE_M, /* VirtualKey.M -- 77 */ + SDL_SCANCODE_N, /* VirtualKey.N -- 78 */ + SDL_SCANCODE_O, /* VirtualKey.O -- 79 */ + SDL_SCANCODE_P, /* VirtualKey.P -- 80 */ + SDL_SCANCODE_Q, /* VirtualKey.Q -- 81 */ + SDL_SCANCODE_R, /* VirtualKey.R -- 82 */ + SDL_SCANCODE_S, /* VirtualKey.S -- 83 */ + SDL_SCANCODE_T, /* VirtualKey.T -- 84 */ + SDL_SCANCODE_U, /* VirtualKey.U -- 85 */ + SDL_SCANCODE_V, /* VirtualKey.V -- 86 */ + SDL_SCANCODE_W, /* VirtualKey.W -- 87 */ + SDL_SCANCODE_X, /* VirtualKey.X -- 88 */ + SDL_SCANCODE_Y, /* VirtualKey.Y -- 89 */ + SDL_SCANCODE_Z, /* VirtualKey.Z -- 90 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.LeftWindows -- 91 (maybe SDL_SCANCODE_APPLICATION or SDL_SCANCODE_LGUI ?) */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.RightWindows -- 92 (maybe SDL_SCANCODE_APPLICATION or SDL_SCANCODE_RGUI ?) */ + SDL_SCANCODE_APPLICATION, /* VirtualKey.Application -- 93 */ + SDL_SCANCODE_UNKNOWN, /* -- 94 */ + SDL_SCANCODE_SLEEP, /* VirtualKey.Sleep -- 95 */ + SDL_SCANCODE_KP_0, /* VirtualKey.NumberPad0 -- 96 */ + SDL_SCANCODE_KP_1, /* VirtualKey.NumberPad1 -- 97 */ + SDL_SCANCODE_KP_2, /* VirtualKey.NumberPad2 -- 98 */ + SDL_SCANCODE_KP_3, /* VirtualKey.NumberPad3 -- 99 */ + SDL_SCANCODE_KP_4, /* VirtualKey.NumberPad4 -- 100 */ + SDL_SCANCODE_KP_5, /* VirtualKey.NumberPad5 -- 101 */ + SDL_SCANCODE_KP_6, /* VirtualKey.NumberPad6 -- 102 */ + SDL_SCANCODE_KP_7, /* VirtualKey.NumberPad7 -- 103 */ + SDL_SCANCODE_KP_8, /* VirtualKey.NumberPad8 -- 104 */ + SDL_SCANCODE_KP_9, /* VirtualKey.NumberPad9 -- 105 */ + SDL_SCANCODE_KP_MULTIPLY, /* VirtualKey.Multiply -- 106 */ + SDL_SCANCODE_KP_PLUS, /* VirtualKey.Add -- 107 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Separator -- 108 */ + SDL_SCANCODE_KP_MINUS, /* VirtualKey.Subtract -- 109 */ + SDL_SCANCODE_UNKNOWN, /* VirtualKey.Decimal -- 110 (maybe SDL_SCANCODE_DECIMALSEPARATOR, SDL_SCANCODE_KP_DECIMAL, or SDL_SCANCODE_KP_PERIOD ?) */ + SDL_SCANCODE_KP_DIVIDE, /* VirtualKey.Divide -- 111 */ + SDL_SCANCODE_F1, /* VirtualKey.F1 -- 112 */ + SDL_SCANCODE_F2, /* VirtualKey.F2 -- 113 */ + SDL_SCANCODE_F3, /* VirtualKey.F3 -- 114 */ + SDL_SCANCODE_F4, /* VirtualKey.F4 -- 115 */ + SDL_SCANCODE_F5, /* VirtualKey.F5 -- 116 */ + SDL_SCANCODE_F6, /* VirtualKey.F6 -- 117 */ + SDL_SCANCODE_F7, /* VirtualKey.F7 -- 118 */ + SDL_SCANCODE_F8, /* VirtualKey.F8 -- 119 */ + SDL_SCANCODE_F9, /* VirtualKey.F9 -- 120 */ + SDL_SCANCODE_F10, /* VirtualKey.F10 -- 121 */ + SDL_SCANCODE_F11, /* VirtualKey.F11 -- 122 */ + SDL_SCANCODE_F12, /* VirtualKey.F12 -- 123 */ + SDL_SCANCODE_F13, /* VirtualKey.F13 -- 124 */ + SDL_SCANCODE_F14, /* VirtualKey.F14 -- 125 */ + SDL_SCANCODE_F15, /* VirtualKey.F15 -- 126 */ + SDL_SCANCODE_F16, /* VirtualKey.F16 -- 127 */ + SDL_SCANCODE_F17, /* VirtualKey.F17 -- 128 */ + SDL_SCANCODE_F18, /* VirtualKey.F18 -- 129 */ + SDL_SCANCODE_F19, /* VirtualKey.F19 -- 130 */ + SDL_SCANCODE_F20, /* VirtualKey.F20 -- 131 */ + SDL_SCANCODE_F21, /* VirtualKey.F21 -- 132 */ + SDL_SCANCODE_F22, /* VirtualKey.F22 -- 133 */ + SDL_SCANCODE_F23, /* VirtualKey.F23 -- 134 */ + SDL_SCANCODE_F24, /* VirtualKey.F24 -- 135 */ + SDL_SCANCODE_UNKNOWN, /* -- 136 */ + SDL_SCANCODE_UNKNOWN, /* -- 137 */ + SDL_SCANCODE_UNKNOWN, /* -- 138 */ + SDL_SCANCODE_UNKNOWN, /* -- 139 */ + SDL_SCANCODE_UNKNOWN, /* -- 140 */ + SDL_SCANCODE_UNKNOWN, /* -- 141 */ + SDL_SCANCODE_UNKNOWN, /* -- 142 */ + SDL_SCANCODE_UNKNOWN, /* -- 143 */ + SDL_SCANCODE_NUMLOCKCLEAR, /* VirtualKey.NumberKeyLock -- 144 */ + SDL_SCANCODE_SCROLLLOCK, /* VirtualKey.Scroll -- 145 */ + SDL_SCANCODE_UNKNOWN, /* -- 146 */ + SDL_SCANCODE_UNKNOWN, /* -- 147 */ + SDL_SCANCODE_UNKNOWN, /* -- 148 */ + SDL_SCANCODE_UNKNOWN, /* -- 149 */ + SDL_SCANCODE_UNKNOWN, /* -- 150 */ + SDL_SCANCODE_UNKNOWN, /* -- 151 */ + SDL_SCANCODE_UNKNOWN, /* -- 152 */ + SDL_SCANCODE_UNKNOWN, /* -- 153 */ + SDL_SCANCODE_UNKNOWN, /* -- 154 */ + SDL_SCANCODE_UNKNOWN, /* -- 155 */ + SDL_SCANCODE_UNKNOWN, /* -- 156 */ + SDL_SCANCODE_UNKNOWN, /* -- 157 */ + SDL_SCANCODE_UNKNOWN, /* -- 158 */ + SDL_SCANCODE_UNKNOWN, /* -- 159 */ + SDL_SCANCODE_LSHIFT, /* VirtualKey.LeftShift -- 160 */ + SDL_SCANCODE_RSHIFT, /* VirtualKey.RightShift -- 161 */ + SDL_SCANCODE_LCTRL, /* VirtualKey.LeftControl -- 162 */ + SDL_SCANCODE_RCTRL, /* VirtualKey.RightControl -- 163 */ + SDL_SCANCODE_MENU, /* VirtualKey.LeftMenu -- 164 */ + SDL_SCANCODE_MENU, /* VirtualKey.RightMenu -- 165 */ + SDL_SCANCODE_AC_BACK, /* VirtualKey.GoBack -- 166 : The go back key. */ + SDL_SCANCODE_AC_FORWARD, /* VirtualKey.GoForward -- 167 : The go forward key. */ + SDL_SCANCODE_AC_REFRESH, /* VirtualKey.Refresh -- 168 : The refresh key. */ + SDL_SCANCODE_AC_STOP, /* VirtualKey.Stop -- 169 : The stop key. */ + SDL_SCANCODE_AC_SEARCH, /* VirtualKey.Search -- 170 : The search key. */ + SDL_SCANCODE_AC_BOOKMARKS, /* VirtualKey.Favorites -- 171 : The favorites key. */ + SDL_SCANCODE_AC_HOME /* VirtualKey.GoHome -- 172 : The go home key. */ }; /* Attempt to translate a keycode that isn't listed in WinRT's VirtualKey enum. */ -static SDL_Scancode -WINRT_TranslateUnofficialKeycode(int keycode) +static SDL_Scancode WINRT_TranslateUnofficialKeycode(int keycode) { switch (keycode) { - case 173: return SDL_SCANCODE_MUTE; /* VK_VOLUME_MUTE */ - case 174: return SDL_SCANCODE_VOLUMEDOWN; /* VK_VOLUME_DOWN */ - case 175: return SDL_SCANCODE_VOLUMEUP; /* VK_VOLUME_UP */ - case 176: return SDL_SCANCODE_AUDIONEXT; /* VK_MEDIA_NEXT_TRACK */ - case 177: return SDL_SCANCODE_AUDIOPREV; /* VK_MEDIA_PREV_TRACK */ - // case 178: return ; /* VK_MEDIA_STOP */ - case 179: return SDL_SCANCODE_AUDIOPLAY; /* VK_MEDIA_PLAY_PAUSE */ - case 180: return SDL_SCANCODE_MAIL; /* VK_LAUNCH_MAIL */ - case 181: return SDL_SCANCODE_MEDIASELECT; /* VK_LAUNCH_MEDIA_SELECT */ - // case 182: return ; /* VK_LAUNCH_APP1 */ - case 183: return SDL_SCANCODE_CALCULATOR; /* VK_LAUNCH_APP2 */ - // case 184: return ; /* ... reserved ... */ - // case 185: return ; /* ... reserved ... */ - case 186: return SDL_SCANCODE_SEMICOLON; /* VK_OEM_1, ';:' key on US standard keyboards */ - case 187: return SDL_SCANCODE_EQUALS; /* VK_OEM_PLUS */ - case 188: return SDL_SCANCODE_COMMA; /* VK_OEM_COMMA */ - case 189: return SDL_SCANCODE_MINUS; /* VK_OEM_MINUS */ - case 190: return SDL_SCANCODE_PERIOD; /* VK_OEM_PERIOD */ - case 191: return SDL_SCANCODE_SLASH; /* VK_OEM_2, '/?' key on US standard keyboards */ - case 192: return SDL_SCANCODE_GRAVE; /* VK_OEM_3, '`~' key on US standard keyboards */ - // ? - // ... reserved or unassigned ... - // ? - case 219: return SDL_SCANCODE_LEFTBRACKET; /* VK_OEM_4, '[{' key on US standard keyboards */ - case 220: return SDL_SCANCODE_BACKSLASH; /* VK_OEM_5, '\|' key on US standard keyboards */ - case 221: return SDL_SCANCODE_RIGHTBRACKET; /* VK_OEM_6, ']}' key on US standard keyboards */ - case 222: return SDL_SCANCODE_APOSTROPHE; /* VK_OEM_7, 'single/double quote' on US standard keyboards */ - default: break; + case 173: + return SDL_SCANCODE_MUTE; /* VK_VOLUME_MUTE */ + case 174: + return SDL_SCANCODE_VOLUMEDOWN; /* VK_VOLUME_DOWN */ + case 175: + return SDL_SCANCODE_VOLUMEUP; /* VK_VOLUME_UP */ + case 176: + return SDL_SCANCODE_AUDIONEXT; /* VK_MEDIA_NEXT_TRACK */ + case 177: + return SDL_SCANCODE_AUDIOPREV; /* VK_MEDIA_PREV_TRACK */ + // case 178: return ; /* VK_MEDIA_STOP */ + case 179: + return SDL_SCANCODE_AUDIOPLAY; /* VK_MEDIA_PLAY_PAUSE */ + case 180: + return SDL_SCANCODE_MAIL; /* VK_LAUNCH_MAIL */ + case 181: + return SDL_SCANCODE_MEDIASELECT; /* VK_LAUNCH_MEDIA_SELECT */ + // case 182: return ; /* VK_LAUNCH_APP1 */ + case 183: + return SDL_SCANCODE_CALCULATOR; /* VK_LAUNCH_APP2 */ + // case 184: return ; /* ... reserved ... */ + // case 185: return ; /* ... reserved ... */ + case 186: + return SDL_SCANCODE_SEMICOLON; /* VK_OEM_1, ';:' key on US standard keyboards */ + case 187: + return SDL_SCANCODE_EQUALS; /* VK_OEM_PLUS */ + case 188: + return SDL_SCANCODE_COMMA; /* VK_OEM_COMMA */ + case 189: + return SDL_SCANCODE_MINUS; /* VK_OEM_MINUS */ + case 190: + return SDL_SCANCODE_PERIOD; /* VK_OEM_PERIOD */ + case 191: + return SDL_SCANCODE_SLASH; /* VK_OEM_2, '/?' key on US standard keyboards */ + case 192: + return SDL_SCANCODE_GRAVE; /* VK_OEM_3, '`~' key on US standard keyboards */ + // ? + // ... reserved or unassigned ... + // ? + case 219: + return SDL_SCANCODE_LEFTBRACKET; /* VK_OEM_4, '[{' key on US standard keyboards */ + case 220: + return SDL_SCANCODE_BACKSLASH; /* VK_OEM_5, '\|' key on US standard keyboards */ + case 221: + return SDL_SCANCODE_RIGHTBRACKET; /* VK_OEM_6, ']}' key on US standard keyboards */ + case 222: + return SDL_SCANCODE_APOSTROPHE; /* VK_OEM_7, 'single/double quote' on US standard keyboards */ + default: + break; } return SDL_SCANCODE_UNKNOWN; } -static SDL_Scancode -WINRT_TranslateKeycode(int keycode, unsigned int nativeScancode) +static SDL_Scancode WINRT_TranslateKeycode(int keycode, unsigned int nativeScancode) { // TODO, WinRT: try filling out the WinRT keycode table as much as possible, using the Win32 table for interpretation hints @@ -271,21 +288,21 @@ WINRT_TranslateKeycode(int keycode, unsigned int nativeScancode) */ if (nativeScancode < SDL_arraysize(windows_scancode_table)) { switch (keycode) { - case 16: // VirtualKey.Shift - switch (windows_scancode_table[nativeScancode]) { - case SDL_SCANCODE_LSHIFT: - case SDL_SCANCODE_RSHIFT: - return windows_scancode_table[nativeScancode]; - } - break; - + case 16: // VirtualKey.Shift + switch (windows_scancode_table[nativeScancode]) { + case SDL_SCANCODE_LSHIFT: + case SDL_SCANCODE_RSHIFT: + return windows_scancode_table[nativeScancode]; + } + break; + // Add others, as necessary. // // Unfortunately, this hack doesn't seem to work in determining // handedness with Control keys. - default: - break; + default: + break; } } @@ -313,8 +330,7 @@ WINRT_TranslateKeycode(int keycode, unsigned int nativeScancode) return scancode; } -void -WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^args) +void WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^ args) { SDL_Scancode sdlScancode = WINRT_TranslateKeycode((int)args->VirtualKey, args->KeyStatus.ScanCode); #if 0 @@ -339,8 +355,7 @@ WINRT_ProcessKeyDownEvent(Windows::UI::Core::KeyEventArgs ^args) SDL_SendKeyboardKey(SDL_PRESSED, sdlScancode); } -void -WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^args) +void WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^ args) { SDL_Scancode sdlScancode = WINRT_TranslateKeycode((int)args->VirtualKey, args->KeyStatus.ScanCode); #if 0 @@ -365,8 +380,7 @@ WINRT_ProcessKeyUpEvent(Windows::UI::Core::KeyEventArgs ^args) SDL_SendKeyboardKey(SDL_RELEASED, sdlScancode); } -void -WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArgs ^args) +void WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArgs ^ args) { wchar_t src_ucs2[2]; char dest_utf8[16]; @@ -383,7 +397,6 @@ WINRT_ProcessCharacterReceivedEvent(Windows::UI::Core::CharacterReceivedEventArg } } - #if NTDDI_VERSION >= NTDDI_WIN10 static bool WINRT_InputPaneVisible = false; @@ -403,10 +416,10 @@ void WINTRT_InitialiseInputPaneEvents(_THIS) using namespace Windows::UI::ViewManagement; InputPane ^ inputPane = InputPane::GetForCurrentView(); if (inputPane) { - inputPane->Showing += ref new Windows::Foundation::TypedEventHandler(&WINTRT_OnInputPaneShowing); - inputPane->Hiding += ref new Windows::Foundation::TypedEventHandler(&WINTRT_OnInputPaneHiding); + inputPane->Showing += ref new Windows::Foundation::TypedEventHandler(&WINTRT_OnInputPaneShowing); + inputPane->Hiding += ref new Windows::Foundation::TypedEventHandler(&WINTRT_OnInputPaneHiding); } } @@ -440,17 +453,17 @@ SDL_bool WINRT_IsScreenKeyboardShown(_THIS, SDL_Window *window) if (inputPane) { switch (SDL_WinRTGetDeviceFamily()) { case SDL_WINRT_DEVICEFAMILY_XBOX: - //Documentation recommends using inputPane->Visible - //https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane.visible?view=winrt-22621 - //This does not seem to work on latest UWP/Xbox. - //Workaround: Listen to Showing/Hiding events + // Documentation recommends using inputPane->Visible + // https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane.visible?view=winrt-22621 + // This does not seem to work on latest UWP/Xbox. + // Workaround: Listen to Showing/Hiding events if (WINRT_InputPaneVisible) { return SDL_TRUE; } break; default: - //OccludedRect is recommend on universal apps per docs - //https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane.visible?view=winrt-22621 + // OccludedRect is recommend on universal apps per docs + // https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane.visible?view=winrt-22621 Windows::Foundation::Rect rect = inputPane->OccludedRect; if (rect.Width > 0 && rect.Height > 0) { return SDL_TRUE; @@ -461,6 +474,6 @@ SDL_bool WINRT_IsScreenKeyboardShown(_THIS, SDL_Window *window) return SDL_FALSE; } -#endif // NTDDI_VERSION >= ... +#endif // NTDDI_VERSION >= ... -#endif // SDL_VIDEO_DRIVER_WINRT \ No newline at end of file +#endif // SDL_VIDEO_DRIVER_WINRT diff --git a/modules/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp b/modules/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp index 4adc220..42a8f32 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp @@ -34,23 +34,20 @@ using namespace Platform; using namespace Windows::Foundation; using namespace Windows::UI::Popups; -static String ^ -WINRT_UTF8ToPlatformString(const char * str) -{ - wchar_t * wstr = WIN_UTF8ToString(str); +static String ^ WINRT_UTF8ToPlatformString(const char *str) { + wchar_t *wstr = WIN_UTF8ToString(str); String ^ rtstr = ref new String(wstr); SDL_free(wstr); return rtstr; } -extern "C" int -WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) + extern "C" int WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { #if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) && (NTDDI_VERSION == NTDDI_WIN8) /* Sadly, Windows Phone 8 doesn't include the MessageDialog class that * Windows 8.x/RT does, even though MSDN's reference documentation for * Windows Phone 8 mentions it. - * + * * The .NET runtime on Windows Phone 8 does, however, include a * MessageBox class. Perhaps this could be called, somehow? */ @@ -60,15 +57,15 @@ WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP const int maxbuttons = 2; - const char * platform = "Windows Phone 8.1+"; + const char *platform = "Windows Phone 8.1+"; #else const int maxbuttons = 3; - const char * platform = "Windows 8.x"; + const char *platform = "Windows 8.x"; #endif if (messageboxdata->numbuttons > maxbuttons) { return SDL_SetError("WinRT's MessageDialog only supports %d buttons, at most, on %s. %d were requested.", - maxbuttons, platform, messageboxdata->numbuttons); + maxbuttons, platform, messageboxdata->numbuttons); } /* Build a MessageDialog object and its buttons */ @@ -115,4 +112,3 @@ WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) #endif /* SDL_VIDEO_DRIVER_WINRT */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/winrt/SDL_winrtmouse.cpp b/modules/SDL2/src/video/winrt/SDL_winrtmouse.cpp index 9d48879..05fae95 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtmouse.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtmouse.cpp @@ -44,45 +44,65 @@ extern "C" { #include "SDL_winrtvideo_cpp.h" #include "SDL_winrtmouse_c.h" - extern "C" SDL_bool WINRT_UsingRelativeMouseMode = SDL_FALSE; - -static SDL_Cursor * -WINRT_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *WINRT_CreateSystemCursor(SDL_SystemCursor id) { SDL_Cursor *cursor; CoreCursorType cursorType = CoreCursorType::Arrow; - switch(id) - { + switch (id) { default: SDL_assert(0); return NULL; - case SDL_SYSTEM_CURSOR_ARROW: cursorType = CoreCursorType::Arrow; break; - case SDL_SYSTEM_CURSOR_IBEAM: cursorType = CoreCursorType::IBeam; break; - case SDL_SYSTEM_CURSOR_WAIT: cursorType = CoreCursorType::Wait; break; - case SDL_SYSTEM_CURSOR_CROSSHAIR: cursorType = CoreCursorType::Cross; break; - case SDL_SYSTEM_CURSOR_WAITARROW: cursorType = CoreCursorType::Wait; break; - case SDL_SYSTEM_CURSOR_SIZENWSE: cursorType = CoreCursorType::SizeNorthwestSoutheast; break; - case SDL_SYSTEM_CURSOR_SIZENESW: cursorType = CoreCursorType::SizeNortheastSouthwest; break; - case SDL_SYSTEM_CURSOR_SIZEWE: cursorType = CoreCursorType::SizeWestEast; break; - case SDL_SYSTEM_CURSOR_SIZENS: cursorType = CoreCursorType::SizeNorthSouth; break; - case SDL_SYSTEM_CURSOR_SIZEALL: cursorType = CoreCursorType::SizeAll; break; - case SDL_SYSTEM_CURSOR_NO: cursorType = CoreCursorType::UniversalNo; break; - case SDL_SYSTEM_CURSOR_HAND: cursorType = CoreCursorType::Hand; break; + case SDL_SYSTEM_CURSOR_ARROW: + cursorType = CoreCursorType::Arrow; + break; + case SDL_SYSTEM_CURSOR_IBEAM: + cursorType = CoreCursorType::IBeam; + break; + case SDL_SYSTEM_CURSOR_WAIT: + cursorType = CoreCursorType::Wait; + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + cursorType = CoreCursorType::Cross; + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + cursorType = CoreCursorType::Wait; + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + cursorType = CoreCursorType::SizeNorthwestSoutheast; + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + cursorType = CoreCursorType::SizeNortheastSouthwest; + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + cursorType = CoreCursorType::SizeWestEast; + break; + case SDL_SYSTEM_CURSOR_SIZENS: + cursorType = CoreCursorType::SizeNorthSouth; + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + cursorType = CoreCursorType::SizeAll; + break; + case SDL_SYSTEM_CURSOR_NO: + cursorType = CoreCursorType::UniversalNo; + break; + case SDL_SYSTEM_CURSOR_HAND: + cursorType = CoreCursorType::Hand; + break; } - cursor = (SDL_Cursor *) SDL_calloc(1, sizeof(*cursor)); + cursor = (SDL_Cursor *)SDL_calloc(1, sizeof(*cursor)); if (cursor) { /* Create a pointer to a COM reference to a cursor. The extra pointer is used (on top of the COM reference) to allow the cursor to be referenced by the SDL_cursor's driverdata field, which is a void pointer. */ - CoreCursor ^* theCursor = new CoreCursor^(nullptr); + CoreCursor ^ *theCursor = new CoreCursor ^ (nullptr); *theCursor = ref new CoreCursor(cursorType, 0); - cursor->driverdata = (void *) theCursor; + cursor->driverdata = (void *)theCursor; } else { SDL_OutOfMemory(); } @@ -90,34 +110,31 @@ WINRT_CreateSystemCursor(SDL_SystemCursor id) return cursor; } -static SDL_Cursor * -WINRT_CreateDefaultCursor() +static SDL_Cursor *WINRT_CreateDefaultCursor() { return WINRT_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); } -static void -WINRT_FreeCursor(SDL_Cursor * cursor) +static void WINRT_FreeCursor(SDL_Cursor *cursor) { if (cursor->driverdata) { - CoreCursor ^* theCursor = (CoreCursor ^*) cursor->driverdata; - *theCursor = nullptr; // Release the COM reference to the CoreCursor - delete theCursor; // Delete the pointer to the COM reference + CoreCursor ^ *theCursor = (CoreCursor ^ *)cursor->driverdata; + *theCursor = nullptr; // Release the COM reference to the CoreCursor + delete theCursor; // Delete the pointer to the COM reference } SDL_free(cursor); } -static int -WINRT_ShowCursor(SDL_Cursor * cursor) +static int WINRT_ShowCursor(SDL_Cursor *cursor) { // TODO, WinRT, XAML: make WINRT_ShowCursor work when XAML support is enabled. - if ( ! CoreWindow::GetForCurrentThread()) { + if (!CoreWindow::GetForCurrentThread()) { return 0; } CoreWindow ^ coreWindow = CoreWindow::GetForCurrentThread(); if (cursor) { - CoreCursor ^* theCursor = (CoreCursor ^*) cursor->driverdata; + CoreCursor ^ *theCursor = (CoreCursor ^ *)cursor->driverdata; coreWindow->PointerCursor = *theCursor; } else { // HACK ALERT: TL;DR - Hiding the cursor in WinRT/UWP apps is weird, and @@ -164,13 +181,13 @@ WINRT_ShowCursor(SDL_Cursor * cursor) // - src/main/winrt/SDL2-WinRTResources.rc -- declares the cursor resource, and its ID (of 5000) // - const unsigned int win32CursorResourceID = 5000; + const unsigned int win32CursorResourceID = 5000; CoreCursor ^ blankCursor = ref new CoreCursor(CoreCursorType::Custom, win32CursorResourceID); // Set 'PointerCursor' to 'blankCursor' in a way that shouldn't throw // an exception if the app hasn't loaded that resource. - ABI::Windows::UI::Core::ICoreCursor * iblankCursor = reinterpret_cast(blankCursor); - ABI::Windows::UI::Core::ICoreWindow * icoreWindow = reinterpret_cast(coreWindow); + ABI::Windows::UI::Core::ICoreCursor *iblankCursor = reinterpret_cast(blankCursor); + ABI::Windows::UI::Core::ICoreWindow *icoreWindow = reinterpret_cast(coreWindow); HRESULT hr = icoreWindow->put_PointerCursor(iblankCursor); if (FAILED(hr)) { // The app doesn't contain the cursor resource, or some other error @@ -182,15 +199,13 @@ WINRT_ShowCursor(SDL_Cursor * cursor) return 0; } -static int -WINRT_SetRelativeMouseMode(SDL_bool enabled) +static int WINRT_SetRelativeMouseMode(SDL_bool enabled) { WINRT_UsingRelativeMouseMode = enabled; return 0; } -void -WINRT_InitMouse(_THIS) +void WINRT_InitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -201,19 +216,18 @@ WINRT_InitMouse(_THIS) */ #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP - //mouse->CreateCursor = WINRT_CreateCursor; + // mouse->CreateCursor = WINRT_CreateCursor; mouse->CreateSystemCursor = WINRT_CreateSystemCursor; mouse->ShowCursor = WINRT_ShowCursor; mouse->FreeCursor = WINRT_FreeCursor; - //mouse->WarpMouse = WINRT_WarpMouse; + // mouse->WarpMouse = WINRT_WarpMouse; mouse->SetRelativeMouseMode = WINRT_SetRelativeMouseMode; SDL_SetDefaultCursor(WINRT_CreateDefaultCursor()); #endif } -void -WINRT_QuitMouse(_THIS) +void WINRT_QuitMouse(_THIS) { } diff --git a/modules/SDL2/src/video/winrt/SDL_winrtopengles.cpp b/modules/SDL2/src/video/winrt/SDL_winrtopengles.cpp index ef0fdb3..3488959 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtopengles.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtopengles.cpp @@ -37,17 +37,16 @@ using namespace Windows::UI::Core; /* ANGLE/WinRT constants */ static const int ANGLE_D3D_FEATURE_LEVEL_ANY = 0; -#define EGL_PLATFORM_ANGLE_ANGLE 0x3202 -#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205 -#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209 -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B -#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F - -#define EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER 0x320B +#define EGL_PLATFORM_ANGLE_ANGLE 0x3202 +#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205 +#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B +#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F +#define EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER 0x320B /* * SDL/EGL top-level implementation @@ -63,7 +62,7 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path) } /* Load ANGLE/WinRT-specific functions */ - CreateWinrtEglWindow_Old_Function CreateWinrtEglWindow = (CreateWinrtEglWindow_Old_Function) SDL_LoadFunction(_this->egl_data->opengl_dll_handle, "CreateWinrtEglWindow"); + CreateWinrtEglWindow_Old_Function CreateWinrtEglWindow = (CreateWinrtEglWindow_Old_Function)SDL_LoadFunction(_this->egl_data->opengl_dll_handle, "CreateWinrtEglWindow"); if (CreateWinrtEglWindow) { /* 'CreateWinrtEglWindow' was found, which means that an an older * version of ANGLE/WinRT is being used. Continue setting up EGL, @@ -98,30 +97,39 @@ WINRT_GLES_LoadLibrary(_THIS, const char *path) /* Declare some ANGLE/EGL initialization property-sets, as suggested by * MSOpenTech's ANGLE-for-WinRT template apps: */ - const EGLint defaultDisplayAttributes[] = - { - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + const EGLint defaultDisplayAttributes[] = { + EGL_PLATFORM_ANGLE_TYPE_ANGLE, + EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, + EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, + EGL_TRUE, EGL_NONE, }; - const EGLint fl9_3DisplayAttributes[] = - { - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, - EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + const EGLint fl9_3DisplayAttributes[] = { + EGL_PLATFORM_ANGLE_TYPE_ANGLE, + EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, + 9, + EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, + 3, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, + EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, + EGL_TRUE, EGL_NONE, }; - const EGLint warpDisplayAttributes[] = - { - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, - EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + const EGLint warpDisplayAttributes[] = { + EGL_PLATFORM_ANGLE_TYPE_ANGLE, + EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, + EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, + EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, + EGL_TRUE, EGL_NONE, }; @@ -193,11 +201,10 @@ WINRT_GLES_UnloadLibrary(_THIS) extern "C" { SDL_EGL_CreateContext_impl(WINRT) -SDL_EGL_SwapWindow_impl(WINRT) -SDL_EGL_MakeCurrent_impl(WINRT) + SDL_EGL_SwapWindow_impl(WINRT) + SDL_EGL_MakeCurrent_impl(WINRT) } #endif /* SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL */ /* vi: set ts=4 sw=4 expandtab: */ - diff --git a/modules/SDL2/src/video/winrt/SDL_winrtopengles.h b/modules/SDL2/src/video/winrt/SDL_winrtopengles.h index fb9b041..dc49560 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtopengles.h +++ b/modules/SDL2/src/video/winrt/SDL_winrtopengles.h @@ -33,14 +33,13 @@ #define WINRT_GLES_GetProcAddress SDL_EGL_GetProcAddress #define WINRT_GLES_SetSwapInterval SDL_EGL_SetSwapInterval #define WINRT_GLES_GetSwapInterval SDL_EGL_GetSwapInterval -#define WINRT_GLES_DeleteContext SDL_EGL_DeleteContext +#define WINRT_GLES_DeleteContext SDL_EGL_DeleteContext extern int WINRT_GLES_LoadLibrary(_THIS, const char *path); extern void WINRT_GLES_UnloadLibrary(_THIS); -extern SDL_GLContext WINRT_GLES_CreateContext(_THIS, SDL_Window * window); -extern int WINRT_GLES_SwapWindow(_THIS, SDL_Window * window); -extern int WINRT_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); - +extern SDL_GLContext WINRT_GLES_CreateContext(_THIS, SDL_Window *window); +extern int WINRT_GLES_SwapWindow(_THIS, SDL_Window *window); +extern int WINRT_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); #ifdef __cplusplus @@ -52,16 +51,16 @@ typedef Microsoft::WRL::ComPtr WINRT_EGLNativeWindowType_Old; /* Function pointer typedefs for 'old' ANGLE/WinRT's functions, which may * require that C++ objects be passed in: */ -typedef EGLDisplay (EGLAPIENTRY *eglGetDisplay_Old_Function)(WINRT_EGLNativeWindowType_Old); -typedef EGLSurface (EGLAPIENTRY *eglCreateWindowSurface_Old_Function)(EGLDisplay, EGLConfig, WINRT_EGLNativeWindowType_Old, const EGLint *); -typedef HRESULT (EGLAPIENTRY *CreateWinrtEglWindow_Old_Function)(Microsoft::WRL::ComPtr, int, IUnknown ** result); +typedef EGLDisplay(EGLAPIENTRY *eglGetDisplay_Old_Function)(WINRT_EGLNativeWindowType_Old); +typedef EGLSurface(EGLAPIENTRY *eglCreateWindowSurface_Old_Function)(EGLDisplay, EGLConfig, WINRT_EGLNativeWindowType_Old, const EGLint *); +typedef HRESULT(EGLAPIENTRY *CreateWinrtEglWindow_Old_Function)(Microsoft::WRL::ComPtr, int, IUnknown **result); #endif /* __cplusplus */ /* Function pointer typedefs for 'new' ANGLE/WinRT functions, which, unlike * the old functions, do not require C++ support and work with plain C. */ -typedef EGLDisplay (EGLAPIENTRY *eglGetPlatformDisplayEXT_Function)(EGLenum, void *, const EGLint *); +typedef EGLDisplay(EGLAPIENTRY *eglGetPlatformDisplayEXT_Function)(EGLenum, void *, const EGLint *); #endif /* SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL */ diff --git a/modules/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp b/modules/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp index 3c3fd3e..e80d99d 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp @@ -38,19 +38,16 @@ extern "C" { /* File-specific globals: */ static SDL_TouchID WINRT_TouchID = 1; - -void -WINRT_InitTouch(_THIS) +void WINRT_InitTouch(_THIS) { SDL_AddTouch(WINRT_TouchID, SDL_TOUCH_DEVICE_DIRECT, ""); } - // // Applies necessary geometric transformations to raw cursor positions: // Windows::Foundation::Point -WINRT_TransformCursorPosition(SDL_Window * window, +WINRT_TransformCursorPosition(SDL_Window *window, Windows::Foundation::Point rawPosition, WINRT_CursorNormalizationType normalization) { @@ -61,7 +58,7 @@ WINRT_TransformCursorPosition(SDL_Window * window, return rawPosition; } - SDL_WindowData * windowData = (SDL_WindowData *) window->driverdata; + SDL_WindowData *windowData = (SDL_WindowData *)window->driverdata; if (windowData->coreWindow == nullptr) { // For some reason, the window isn't associated with a CoreWindow. // This might end up being the case as XAML support is extended. @@ -85,39 +82,37 @@ WINRT_TransformCursorPosition(SDL_Window * window, outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width; outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height; #else - switch (WINRT_DISPLAY_PROPERTY(CurrentOrientation)) - { - case DisplayOrientations::Portrait: - outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width; - outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height; - break; - case DisplayOrientations::PortraitFlipped: - outputPosition.X = 1.0f - (rawPosition.X / nativeWindow->Bounds.Width); - outputPosition.Y = 1.0f - (rawPosition.Y / nativeWindow->Bounds.Height); - break; - case DisplayOrientations::Landscape: - outputPosition.X = rawPosition.Y / nativeWindow->Bounds.Height; - outputPosition.Y = 1.0f - (rawPosition.X / nativeWindow->Bounds.Width); - break; - case DisplayOrientations::LandscapeFlipped: - outputPosition.X = 1.0f - (rawPosition.Y / nativeWindow->Bounds.Height); - outputPosition.Y = rawPosition.X / nativeWindow->Bounds.Width; - break; - default: - break; + switch (WINRT_DISPLAY_PROPERTY(CurrentOrientation)) { + case DisplayOrientations::Portrait: + outputPosition.X = rawPosition.X / nativeWindow->Bounds.Width; + outputPosition.Y = rawPosition.Y / nativeWindow->Bounds.Height; + break; + case DisplayOrientations::PortraitFlipped: + outputPosition.X = 1.0f - (rawPosition.X / nativeWindow->Bounds.Width); + outputPosition.Y = 1.0f - (rawPosition.Y / nativeWindow->Bounds.Height); + break; + case DisplayOrientations::Landscape: + outputPosition.X = rawPosition.Y / nativeWindow->Bounds.Height; + outputPosition.Y = 1.0f - (rawPosition.X / nativeWindow->Bounds.Width); + break; + case DisplayOrientations::LandscapeFlipped: + outputPosition.X = 1.0f - (rawPosition.Y / nativeWindow->Bounds.Height); + outputPosition.Y = rawPosition.X / nativeWindow->Bounds.Width; + break; + default: + break; } #endif if (normalization == TransformToSDLWindowSize) { - outputPosition.X *= ((float32) window->w); - outputPosition.Y *= ((float32) window->h); + outputPosition.X *= ((float32)window->w); + outputPosition.Y *= ((float32)window->h); } return outputPosition; } -SDL_bool -WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^pt, Uint8 *button, Uint8 *pressed) +SDL_bool WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^ pt, Uint8 *button, Uint8 *pressed) { using namespace Windows::UI::Input; @@ -125,40 +120,39 @@ WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^pt, Uint8 *b *button = SDL_BUTTON_LEFT; return SDL_TRUE; #else - switch (pt->Properties->PointerUpdateKind) - { - case PointerUpdateKind::LeftButtonPressed: - case PointerUpdateKind::LeftButtonReleased: - *button = SDL_BUTTON_LEFT; - *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::LeftButtonPressed); - return SDL_TRUE; - - case PointerUpdateKind::RightButtonPressed: - case PointerUpdateKind::RightButtonReleased: - *button = SDL_BUTTON_RIGHT; - *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::RightButtonPressed); - return SDL_TRUE; - - case PointerUpdateKind::MiddleButtonPressed: - case PointerUpdateKind::MiddleButtonReleased: - *button = SDL_BUTTON_MIDDLE; - *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::MiddleButtonPressed); - return SDL_TRUE; - - case PointerUpdateKind::XButton1Pressed: - case PointerUpdateKind::XButton1Released: - *button = SDL_BUTTON_X1; - *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::XButton1Pressed); - return SDL_TRUE; - - case PointerUpdateKind::XButton2Pressed: - case PointerUpdateKind::XButton2Released: - *button = SDL_BUTTON_X2; - *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::XButton2Pressed); - return SDL_TRUE; - - default: - break; + switch (pt->Properties->PointerUpdateKind) { + case PointerUpdateKind::LeftButtonPressed: + case PointerUpdateKind::LeftButtonReleased: + *button = SDL_BUTTON_LEFT; + *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::LeftButtonPressed); + return SDL_TRUE; + + case PointerUpdateKind::RightButtonPressed: + case PointerUpdateKind::RightButtonReleased: + *button = SDL_BUTTON_RIGHT; + *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::RightButtonPressed); + return SDL_TRUE; + + case PointerUpdateKind::MiddleButtonPressed: + case PointerUpdateKind::MiddleButtonReleased: + *button = SDL_BUTTON_MIDDLE; + *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::MiddleButtonPressed); + return SDL_TRUE; + + case PointerUpdateKind::XButton1Pressed: + case PointerUpdateKind::XButton1Released: + *button = SDL_BUTTON_X1; + *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::XButton1Pressed); + return SDL_TRUE; + + case PointerUpdateKind::XButton2Pressed: + case PointerUpdateKind::XButton2Released: + *button = SDL_BUTTON_X2; + *pressed = (pt->Properties->PointerUpdateKind == PointerUpdateKind::XButton2Pressed); + return SDL_TRUE; + + default: + break; } #endif @@ -167,64 +161,63 @@ WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^pt, Uint8 *b return SDL_FALSE; } -//const char * -//WINRT_ConvertPointerUpdateKindToString(Windows::UI::Input::PointerUpdateKind kind) +// const char * +// WINRT_ConvertPointerUpdateKindToString(Windows::UI::Input::PointerUpdateKind kind) //{ -// using namespace Windows::UI::Input; +// using namespace Windows::UI::Input; // -// switch (kind) -// { -// case PointerUpdateKind::Other: -// return "Other"; -// case PointerUpdateKind::LeftButtonPressed: -// return "LeftButtonPressed"; -// case PointerUpdateKind::LeftButtonReleased: -// return "LeftButtonReleased"; -// case PointerUpdateKind::RightButtonPressed: -// return "RightButtonPressed"; -// case PointerUpdateKind::RightButtonReleased: -// return "RightButtonReleased"; -// case PointerUpdateKind::MiddleButtonPressed: -// return "MiddleButtonPressed"; -// case PointerUpdateKind::MiddleButtonReleased: -// return "MiddleButtonReleased"; -// case PointerUpdateKind::XButton1Pressed: -// return "XButton1Pressed"; -// case PointerUpdateKind::XButton1Released: -// return "XButton1Released"; -// case PointerUpdateKind::XButton2Pressed: -// return "XButton2Pressed"; -// case PointerUpdateKind::XButton2Released: -// return "XButton2Released"; -// } +// switch (kind) +// { +// case PointerUpdateKind::Other: +// return "Other"; +// case PointerUpdateKind::LeftButtonPressed: +// return "LeftButtonPressed"; +// case PointerUpdateKind::LeftButtonReleased: +// return "LeftButtonReleased"; +// case PointerUpdateKind::RightButtonPressed: +// return "RightButtonPressed"; +// case PointerUpdateKind::RightButtonReleased: +// return "RightButtonReleased"; +// case PointerUpdateKind::MiddleButtonPressed: +// return "MiddleButtonPressed"; +// case PointerUpdateKind::MiddleButtonReleased: +// return "MiddleButtonReleased"; +// case PointerUpdateKind::XButton1Pressed: +// return "XButton1Pressed"; +// case PointerUpdateKind::XButton1Released: +// return "XButton1Released"; +// case PointerUpdateKind::XButton2Pressed: +// return "XButton2Pressed"; +// case PointerUpdateKind::XButton2Released: +// return "XButton2Released"; +// } // -// return ""; -//} +// return ""; +// } -static bool -WINRT_IsTouchEvent(Windows::UI::Input::PointerPoint ^pointerPoint) +static bool WINRT_IsTouchEvent(Windows::UI::Input::PointerPoint ^ pointerPoint) { #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP return true; #else using namespace Windows::Devices::Input; switch (pointerPoint->PointerDevice->PointerDeviceType) { - case PointerDeviceType::Touch: - case PointerDeviceType::Pen: - return true; - default: - return false; + case PointerDeviceType::Touch: + case PointerDeviceType::Pen: + return true; + default: + return false; } #endif } -void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window) { return; } - if ( ! WINRT_IsTouchEvent(pointerPoint)) { + if (!WINRT_IsTouchEvent(pointerPoint)) { Uint8 button, pressed; WINRT_GetSDLButtonForPointerPoint(pointerPoint, &button, &pressed); SDL_assert(pressed == 1); @@ -235,7 +228,7 @@ void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::Po SDL_SendTouch( WINRT_TouchID, - (SDL_FingerID) pointerPoint->PointerId, + (SDL_FingerID)pointerPoint->PointerId, window, SDL_TRUE, normalizedPoint.X, @@ -244,8 +237,7 @@ void WINRT_ProcessPointerPressedEvent(SDL_Window *window, Windows::UI::Input::Po } } -void -WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window || WINRT_UsingRelativeMouseMode) { return; @@ -254,7 +246,7 @@ WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPo Windows::Foundation::Point normalizedPoint = WINRT_TransformCursorPosition(window, pointerPoint->Position, NormalizeZeroToOne); Windows::Foundation::Point windowPoint = WINRT_TransformCursorPosition(window, pointerPoint->Position, TransformToSDLWindowSize); - if ( ! WINRT_IsTouchEvent(pointerPoint)) { + if (!WINRT_IsTouchEvent(pointerPoint)) { /* For some odd reason Moved events are used for multiple mouse buttons */ Uint8 button, pressed; if (WINRT_GetSDLButtonForPointerPoint(pointerPoint, &button, &pressed)) { @@ -265,7 +257,7 @@ WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPo } else { SDL_SendTouchMotion( WINRT_TouchID, - (SDL_FingerID) pointerPoint->PointerId, + (SDL_FingerID)pointerPoint->PointerId, window, normalizedPoint.X, normalizedPoint.Y, @@ -273,7 +265,7 @@ WINRT_ProcessPointerMovedEvent(SDL_Window *window, Windows::UI::Input::PointerPo } } -void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window) { return; @@ -289,7 +281,7 @@ void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::P SDL_SendTouch( WINRT_TouchID, - (SDL_FingerID) pointerPoint->PointerId, + (SDL_FingerID)pointerPoint->PointerId, window, SDL_FALSE, normalizedPoint.X, @@ -298,7 +290,7 @@ void WINRT_ProcessPointerReleasedEvent(SDL_Window *window, Windows::UI::Input::P } } -void WINRT_ProcessPointerEnteredEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerEnteredEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window) { return; @@ -309,7 +301,7 @@ void WINRT_ProcessPointerEnteredEvent(SDL_Window *window, Windows::UI::Input::Po } } -void WINRT_ProcessPointerExitedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerExitedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window) { return; @@ -320,19 +312,17 @@ void WINRT_ProcessPointerExitedEvent(SDL_Window *window, Windows::UI::Input::Poi } } -void -WINRT_ProcessPointerWheelChangedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^pointerPoint) +void WINRT_ProcessPointerWheelChangedEvent(SDL_Window *window, Windows::UI::Input::PointerPoint ^ pointerPoint) { if (!window) { return; } - float motion = (float) pointerPoint->Properties->MouseWheelDelta / WHEEL_DELTA; - SDL_SendMouseWheel(window, 0, 0, (float) motion, SDL_MOUSEWHEEL_NORMAL); + float motion = (float)pointerPoint->Properties->MouseWheelDelta / WHEEL_DELTA; + SDL_SendMouseWheel(window, 0, 0, (float)motion, SDL_MOUSEWHEEL_NORMAL); } -void -WINRT_ProcessMouseMovedEvent(SDL_Window * window, Windows::Devices::Input::MouseEventArgs ^args) +void WINRT_ProcessMouseMovedEvent(SDL_Window *window, Windows::Devices::Input::MouseEventArgs ^ args) { if (!window || !WINRT_UsingRelativeMouseMode) { return; diff --git a/modules/SDL2/src/video/winrt/SDL_winrtvideo.cpp b/modules/SDL2/src/video/winrt/SDL_winrtvideo.cpp index 19ef964..9a38e6c 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtvideo.cpp +++ b/modules/SDL2/src/video/winrt/SDL_winrtvideo.cpp @@ -46,11 +46,9 @@ using namespace Windows::Graphics::Display; using namespace Windows::UI::Core; using namespace Windows::UI::ViewManagement; - /* [re]declare Windows GUIDs locally, to limit the amount of external lib(s) SDL has to link to */ -static const GUID SDL_IID_IDisplayRequest = { 0xe5732044, 0xf49f, 0x4b60, { 0x8d, 0xd4, 0x5e, 0x7e, 0x3a, 0x63, 0x2a, 0xc0 } }; -static const GUID SDL_IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; - +static const GUID SDL_IID_IDisplayRequest = { 0xe5732044, 0xf49f, 0x4b60, { 0x8d, 0xd4, 0x5e, 0x7e, 0x3a, 0x63, 0x2a, 0xc0 } }; +static const GUID SDL_IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; /* SDL includes */ extern "C" { @@ -75,14 +73,12 @@ extern "C" { #include "SDL_system.h" #include "SDL_hints.h" - /* Initialization/Query functions */ static int WINRT_VideoInit(_THIS); static int WINRT_InitModes(_THIS); -static int WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +static int WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); static void WINRT_VideoQuit(_THIS); - /* Window functions */ static int WINRT_CreateWindow(_THIS, SDL_Window * window); static void WINRT_SetWindowSize(_THIS, SDL_Window * window); @@ -92,21 +88,18 @@ static SDL_bool WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo /* Misc functions */ -static ABI::Windows::System::Display::IDisplayRequest * WINRT_CreateDisplayRequest(_THIS); +static ABI::Windows::System::Display::IDisplayRequest *WINRT_CreateDisplayRequest(_THIS); extern void WINRT_SuspendScreenSaver(_THIS); - /* SDL-internal globals: */ -SDL_Window * WINRT_GlobalSDLWindow = NULL; - +SDL_Window *WINRT_GlobalSDLWindow = NULL; /* WinRT driver bootstrap functions */ -static void -WINRT_DeleteDevice(SDL_VideoDevice * device) +static void WINRT_DeleteDevice(SDL_VideoDevice *device) { if (device->driverdata) { - SDL_VideoData * video_data = (SDL_VideoData *)device->driverdata; + SDL_VideoData *video_data = (SDL_VideoData *)device->driverdata; if (video_data->winrtEglWindow) { video_data->winrtEglWindow->Release(); } @@ -116,24 +109,23 @@ WINRT_DeleteDevice(SDL_VideoDevice * device) SDL_free(device); } -static SDL_VideoDevice * -WINRT_CreateDevice(void) +static SDL_VideoDevice *WINRT_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *data; /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); - return (0); + return 0; } - data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (!data) { + data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); + if (data == NULL) { SDL_OutOfMemory(); SDL_free(device); - return (0); + return 0; } device->driverdata = data; @@ -180,8 +172,7 @@ VideoBootStrap WINRT_bootstrap = { WINRT_CreateDevice }; -static void SDLCALL -WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue) +static void SDLCALL WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue) { SDL_assert(SDL_strcmp(name, SDL_HINT_ORIENTATIONS) == 0); @@ -204,13 +195,13 @@ WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const c std::string orientationName; std::getline(tokenizer, orientationName, ' '); if (orientationName == "LandscapeLeft") { - orientationFlags |= (unsigned int) DisplayOrientations::LandscapeFlipped; + orientationFlags |= (unsigned int)DisplayOrientations::LandscapeFlipped; } else if (orientationName == "LandscapeRight") { - orientationFlags |= (unsigned int) DisplayOrientations::Landscape; + orientationFlags |= (unsigned int)DisplayOrientations::Landscape; } else if (orientationName == "Portrait") { - orientationFlags |= (unsigned int) DisplayOrientations::Portrait; + orientationFlags |= (unsigned int)DisplayOrientations::Portrait; } else if (orientationName == "PortraitUpsideDown") { - orientationFlags |= (unsigned int) DisplayOrientations::PortraitFlipped; + orientationFlags |= (unsigned int)DisplayOrientations::PortraitFlipped; } } } @@ -218,11 +209,10 @@ WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const c // If no valid orientation flags were specified, use a reasonable set of defaults: if (!orientationFlags) { // TODO, WinRT: consider seeing if an app's default orientation flags can be found out via some API call(s). - orientationFlags = (unsigned int) ( \ - DisplayOrientations::Landscape | - DisplayOrientations::LandscapeFlipped | - DisplayOrientations::Portrait | - DisplayOrientations::PortraitFlipped); + orientationFlags = (unsigned int)(DisplayOrientations::Landscape | + DisplayOrientations::LandscapeFlipped | + DisplayOrientations::Portrait | + DisplayOrientations::PortraitFlipped); } // Set the orientation/rotation preferences. Please note that this does @@ -239,13 +229,12 @@ WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const c // for details. Microsoft's "Display orientation sample" also gives an // outline of how Windows treats device rotation // (http://code.msdn.microsoft.com/Display-Orientation-Sample-19a58e93). - WINRT_DISPLAY_PROPERTY(AutoRotationPreferences) = (DisplayOrientations) orientationFlags; + WINRT_DISPLAY_PROPERTY(AutoRotationPreferences) = (DisplayOrientations)orientationFlags; } -int -WINRT_VideoInit(_THIS) +int WINRT_VideoInit(_THIS) { - SDL_VideoData * driverdata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; if (WINRT_InitModes(_this) < 0) { return -1; } @@ -264,11 +253,9 @@ WINRT_VideoInit(_THIS) return 0; } -extern "C" -Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat); +extern "C" Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat); -static void -WINRT_DXGIModeToSDLDisplayMode(const DXGI_MODE_DESC * dxgiMode, SDL_DisplayMode * sdlMode) +static void WINRT_DXGIModeToSDLDisplayMode(const DXGI_MODE_DESC *dxgiMode, SDL_DisplayMode *sdlMode) { SDL_zerop(sdlMode); sdlMode->w = dxgiMode->Width; @@ -277,17 +264,16 @@ WINRT_DXGIModeToSDLDisplayMode(const DXGI_MODE_DESC * dxgiMode, SDL_DisplayMode sdlMode->format = D3D11_DXGIFormatToSDLPixelFormat(dxgiMode->Format); } -static int -WINRT_AddDisplaysForOutput (_THIS, IDXGIAdapter1 * dxgiAdapter1, int outputIndex) +static int WINRT_AddDisplaysForOutput(_THIS, IDXGIAdapter1 *dxgiAdapter1, int outputIndex) { HRESULT hr; - IDXGIOutput * dxgiOutput = NULL; + IDXGIOutput *dxgiOutput = NULL; DXGI_OUTPUT_DESC dxgiOutputDesc; SDL_VideoDisplay display; - char * displayName = NULL; + char *displayName = NULL; UINT numModes; - DXGI_MODE_DESC * dxgiModes = NULL; - int functionResult = -1; /* -1 for failure, 0 for success */ + DXGI_MODE_DESC *dxgiModes = NULL; + int functionResult = -1; /* -1 for failure, 0 for success */ DXGI_MODE_DESC modeToMatch, closestMatch; SDL_zero(display); @@ -326,10 +312,10 @@ WINRT_AddDisplaysForOutput (_THIS, IDXGIAdapter1 * dxgiAdapter1, int outputIndex mode.w = (dxgiOutputDesc.DesktopCoordinates.right - dxgiOutputDesc.DesktopCoordinates.left); mode.h = (dxgiOutputDesc.DesktopCoordinates.bottom - dxgiOutputDesc.DesktopCoordinates.top); mode.format = DXGI_FORMAT_B8G8R8A8_UNORM; - mode.refresh_rate = 0; /* Display mode is unknown, so just fill in zero, as specified by SDL's header files */ + mode.refresh_rate = 0; /* Display mode is unknown, so just fill in zero, as specified by SDL's header files */ display.desktop_mode = mode; display.current_mode = mode; - if ( ! SDL_AddDisplayMode(&display, &mode)) { + if (!SDL_AddDisplayMode(&display, &mode)) { goto done; } } else if (FAILED(hr)) { @@ -351,7 +337,7 @@ WINRT_AddDisplaysForOutput (_THIS, IDXGIAdapter1 * dxgiAdapter1, int outputIndex } dxgiModes = (DXGI_MODE_DESC *)SDL_calloc(numModes, sizeof(DXGI_MODE_DESC)); - if ( ! dxgiModes) { + if (dxgiModes == NULL) { SDL_OutOfMemory(); goto done; } @@ -373,7 +359,7 @@ WINRT_AddDisplaysForOutput (_THIS, IDXGIAdapter1 * dxgiAdapter1, int outputIndex goto done; } - functionResult = 0; /* 0 for Success! */ + functionResult = 0; /* 0 for Success! */ done: if (dxgiModes) { SDL_free(dxgiModes); @@ -387,11 +373,10 @@ done: return functionResult; } -static int -WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterIndex) +static int WINRT_AddDisplaysForAdapter(_THIS, IDXGIFactory2 *dxgiFactory2, int adapterIndex) { HRESULT hr; - IDXGIAdapter1 * dxgiAdapter1; + IDXGIAdapter1 *dxgiAdapter1; hr = dxgiFactory2->EnumAdapters1(adapterIndex, &dxgiAdapter1); if (FAILED(hr)) { @@ -401,7 +386,7 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd return -1; } - for (int outputIndex = 0; ; ++outputIndex) { + for (int outputIndex = 0;; ++outputIndex) { if (WINRT_AddDisplaysForOutput(_this, dxgiAdapter1, outputIndex) < 0) { /* HACK: The Windows App Certification Kit 10.0 can fail, when running the Store Apps' test, "Direct3D Feature Test". The @@ -448,12 +433,11 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd #endif mode.format = DXGI_FORMAT_B8G8R8A8_UNORM; - mode.refresh_rate = 0; /* Display mode is unknown, so just fill in zero, as specified by SDL's header files */ + mode.refresh_rate = 0; /* Display mode is unknown, so just fill in zero, as specified by SDL's header files */ display.desktop_mode = mode; display.current_mode = mode; if ((SDL_AddDisplayMode(&display, &mode) < 0) || - (SDL_AddVideoDisplay(&display, SDL_FALSE) < 0)) - { + (SDL_AddVideoDisplay(&display, SDL_FALSE) < 0)) { return SDL_SetError("Failed to apply DXGI Display-detection workaround"); } } @@ -466,8 +450,7 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd return 0; } -int -WINRT_InitModes(_THIS) +int WINRT_InitModes(_THIS) { /* HACK: Initialize a single display, for whatever screen the app's CoreApplicationView is on. @@ -476,14 +459,14 @@ WINRT_InitModes(_THIS) */ HRESULT hr; - IDXGIFactory2 * dxgiFactory2 = NULL; + IDXGIFactory2 *dxgiFactory2 = NULL; hr = CreateDXGIFactory1(SDL_IID_IDXGIFactory2, (void **)&dxgiFactory2); if (FAILED(hr)) { return WIN_SetErrorFromHRESULT(__FUNCTION__ ", CreateDXGIFactory1() failed", hr); } - for (int adapterIndex = 0; ; ++adapterIndex) { + for (int adapterIndex = 0;; ++adapterIndex) { if (WINRT_AddDisplaysForAdapter(_this, dxgiFactory2, adapterIndex) < 0) { break; } @@ -492,16 +475,14 @@ WINRT_InitModes(_THIS) return 0; } -static int -WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) +static int WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { return 0; } -void -WINRT_VideoQuit(_THIS) +void WINRT_VideoQuit(_THIS) { - SDL_VideoData * driverdata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; if (driverdata && driverdata->displayRequest) { driverdata->displayRequest->Release(); driverdata->displayRequest = NULL; @@ -510,18 +491,13 @@ WINRT_VideoQuit(_THIS) WINRT_QuitMouse(_this); } -static const Uint32 WINRT_DetectableFlags = - SDL_WINDOW_MAXIMIZED | - SDL_WINDOW_FULLSCREEN_DESKTOP | - SDL_WINDOW_SHOWN | - SDL_WINDOW_HIDDEN | - SDL_WINDOW_MOUSE_FOCUS; +static const Uint32 WINRT_DetectableFlags = SDL_WINDOW_MAXIMIZED | SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_SHOWN | SDL_WINDOW_HIDDEN | SDL_WINDOW_MOUSE_FOCUS; extern "C" Uint32 -WINRT_DetectWindowFlags(SDL_Window * window) +WINRT_DetectWindowFlags(SDL_Window *window) { Uint32 latestFlags = 0; - SDL_WindowData * data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; bool is_fullscreen = false; #if SDL_WINRT_USE_APPLICATIONVIEW @@ -534,7 +510,7 @@ WINRT_DetectWindowFlags(SDL_Window * window) if (data->coreWindow.Get()) { if (is_fullscreen) { - SDL_VideoDisplay * display = SDL_GetDisplayForWindow(window); + SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); int w = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Width); int h = WINRT_DIPS_TO_PHYSICAL_PIXELS(data->coreWindow->Bounds.Height); @@ -545,17 +521,17 @@ WINRT_DetectWindowFlags(SDL_Window * window) const DisplayOrientations currentOrientation = WINRT_DISPLAY_PROPERTY(CurrentOrientation); switch (currentOrientation) { #if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - case DisplayOrientations::Landscape: - case DisplayOrientations::LandscapeFlipped: + case DisplayOrientations::Landscape: + case DisplayOrientations::LandscapeFlipped: #else - case DisplayOrientations::Portrait: - case DisplayOrientations::PortraitFlipped: + case DisplayOrientations::Portrait: + case DisplayOrientations::PortraitFlipped: #endif - { - int tmp = w; - w = h; - h = tmp; - } break; + { + int tmp = w; + w = h; + h = tmp; + } break; } #endif @@ -586,47 +562,44 @@ WINRT_DetectWindowFlags(SDL_Window * window) } // TODO, WinRT: consider removing WINRT_UpdateWindowFlags, and just calling WINRT_DetectWindowFlags as-appropriate (with appropriate calls to SDL_SendWindowEvent) -void -WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask) +void WINRT_UpdateWindowFlags(SDL_Window *window, Uint32 mask) { mask &= WINRT_DetectableFlags; if (window) { Uint32 apply = WINRT_DetectWindowFlags(window); if ((apply & mask) & SDL_WINDOW_FULLSCREEN) { - window->last_fullscreen_flags = window->flags; // seems necessary to programmatically un-fullscreen, via SDL APIs + window->last_fullscreen_flags = window->flags; // seems necessary to programmatically un-fullscreen, via SDL APIs } window->flags = (window->flags & ~mask) | (apply & mask); } } -static bool -WINRT_IsCoreWindowActive(CoreWindow ^ coreWindow) +static bool WINRT_IsCoreWindowActive(CoreWindow ^ coreWindow) { /* WinRT does not appear to offer API(s) to determine window-activation state, at least not that I am aware of in Win8 - Win10. As such, SDL tracks this itself, via window-activation events. - + If there *is* an API to track this, it should probably get used instead of the following hack (that uses "SDLHelperWindowActivationState"). -- DavidL. */ if (coreWindow->CustomProperties->HasKey("SDLHelperWindowActivationState")) { - CoreWindowActivationState activationState = \ + CoreWindowActivationState activationState = safe_cast(coreWindow->CustomProperties->Lookup("SDLHelperWindowActivationState")); - return (activationState != CoreWindowActivationState::Deactivated); + return activationState != CoreWindowActivationState::Deactivated; } /* Assume that non-SDL tracked windows are active, although this should probably be avoided, if possible. - + This might not even be possible, in normal SDL use, at least as of this writing (Dec 22, 2015; via latest hg.libsdl.org/SDL clone) -- DavidL */ return true; } -int -WINRT_CreateWindow(_THIS, SDL_Window * window) +int WINRT_CreateWindow(_THIS, SDL_Window *window) { // Make sure that only one window gets created, at least until multimonitor // support is added. @@ -634,7 +607,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) return SDL_SetError("WinRT only supports one window"); } - SDL_WindowData *data = new SDL_WindowData; /* use 'new' here as SDL_WindowData may use WinRT/C++ types */ + SDL_WindowData *data = new SDL_WindowData; /* use 'new' here as SDL_WindowData may use WinRT/C++ types */ if (!data) { return SDL_OutOfMemory(); } @@ -664,7 +637,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) data->egl_surface = EGL_NO_SURFACE; } else { /* OpenGL ES 2 was reuqested. Set up an EGL surface. */ - SDL_VideoData * video_data = (SDL_VideoData *)_this->driverdata; + SDL_VideoData *video_data = (SDL_VideoData *)_this->driverdata; /* Call SDL_EGL_ChooseConfig and eglCreateWindowSurface directly, * rather than via SDL_EGL_CreateSurface, as older versions of @@ -673,10 +646,10 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) */ if (SDL_EGL_ChooseConfig(_this) != 0) { /* SDL_EGL_ChooseConfig failed, SDL_GetError() should have info */ - return -1; + return -1; } - if (video_data->winrtEglWindow) { /* ... is the 'old' version of ANGLE/WinRT being used? */ + if (video_data->winrtEglWindow) { /* ... is the 'old' version of ANGLE/WinRT being used? */ /* Attempt to create a window surface using older versions of * ANGLE/WinRT: */ @@ -692,7 +665,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) /* Attempt to create a window surface using newer versions of * ANGLE/WinRT: */ - IInspectable * coreWindowAsIInspectable = reinterpret_cast(data->coreWindow.Get()); + IInspectable *coreWindowAsIInspectable = reinterpret_cast(data->coreWindow.Get()); data->egl_surface = _this->egl_data->eglCreateWindowSurface( _this->egl_data->egl_display, _this->egl_data->egl_config, @@ -723,8 +696,8 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) window->x = 0; window->y = 0; window->flags |= SDL_WINDOW_SHOWN; - SDL_SetMouseFocus(NULL); // TODO: detect this - SDL_SetKeyboardFocus(NULL); // TODO: detect this + SDL_SetMouseFocus(NULL); // TODO: detect this + SDL_SetKeyboardFocus(NULL); // TODO: detect this } else { /* WinRT 8.x apps seem to live in an environment where the OS controls the app's window size, with some apps being fullscreen, depending on @@ -758,7 +731,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) WINRT_UpdateWindowFlags( window, - 0xffffffff /* Update any window flag(s) that WINRT_UpdateWindow can handle */ + 0xffffffff /* Update any window flag(s) that WINRT_UpdateWindow can handle */ ); /* Try detecting if the window is active */ @@ -767,7 +740,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) SDL_SetKeyboardFocus(window); } } - + /* Make sure the WinRT app's IFramworkView can post events on behalf of SDL: */ @@ -777,27 +750,25 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) return 0; } -void -WINRT_SetWindowSize(_THIS, SDL_Window * window) +void WINRT_SetWindowSize(_THIS, SDL_Window *window) { #if NTDDI_VERSION >= NTDDI_WIN10 - SDL_WindowData * data = (SDL_WindowData *)window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; const Windows::Foundation::Size size(WINRT_PHYSICAL_PIXELS_TO_DIPS(window->w), WINRT_PHYSICAL_PIXELS_TO_DIPS(window->h)); data->appView->TryResizeView(size); // TODO, WinRT: return failure (to caller?) from TryResizeView() #endif } -void -WINRT_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) +void WINRT_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) { #if NTDDI_VERSION >= NTDDI_WIN10 - SDL_WindowData * data = (SDL_WindowData *)window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; bool isWindowActive = WINRT_IsCoreWindowActive(data->coreWindow.Get()); if (isWindowActive) { if (fullscreen) { if (!data->appView->IsFullScreenMode) { - data->appView->TryEnterFullScreenMode(); // TODO, WinRT: return failure (to caller?) from TryEnterFullScreenMode() + data->appView->TryEnterFullScreenMode(); // TODO, WinRT: return failure (to caller?) from TryEnterFullScreenMode() } } else { if (data->appView->IsFullScreenMode) { @@ -808,11 +779,9 @@ WINRT_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display #endif } - -void -WINRT_DestroyWindow(_THIS, SDL_Window * window) +void WINRT_DestroyWindow(_THIS, SDL_Window *window) { - SDL_WindowData * data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; if (WINRT_GlobalSDLWindow == window) { WINRT_GlobalSDLWindow = NULL; @@ -826,8 +795,7 @@ WINRT_DestroyWindow(_THIS, SDL_Window * window) } } -SDL_bool -WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { SDL_WindowData * data = (SDL_WindowData *) window->driverdata; @@ -843,15 +811,14 @@ WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) return SDL_FALSE; } -static ABI::Windows::System::Display::IDisplayRequest * -WINRT_CreateDisplayRequest(_THIS) +static ABI::Windows::System::Display::IDisplayRequest *WINRT_CreateDisplayRequest(_THIS) { /* Setup a WinRT DisplayRequest object, usable for enabling/disabling screensaver requests */ wchar_t *wClassName = L"Windows.System.Display.DisplayRequest"; HSTRING hClassName; IActivationFactory *pActivationFactory = NULL; - IInspectable * pDisplayRequestRaw = nullptr; - ABI::Windows::System::Display::IDisplayRequest * pDisplayRequest = nullptr; + IInspectable *pDisplayRequestRaw = nullptr; + ABI::Windows::System::Display::IDisplayRequest *pDisplayRequest = nullptr; HRESULT hr; hr = ::WindowsCreateString(wClassName, (UINT32)SDL_wcslen(wClassName), &hClassName); @@ -869,7 +836,7 @@ WINRT_CreateDisplayRequest(_THIS) goto done; } - hr = pDisplayRequestRaw->QueryInterface(SDL_IID_IDisplayRequest, (void **) &pDisplayRequest); + hr = pDisplayRequestRaw->QueryInterface(SDL_IID_IDisplayRequest, (void **)&pDisplayRequest); if (FAILED(hr)) { goto done; } @@ -888,12 +855,11 @@ done: return pDisplayRequest; } -void -WINRT_SuspendScreenSaver(_THIS) +void WINRT_SuspendScreenSaver(_THIS) { SDL_VideoData *driverdata = (SDL_VideoData *)_this->driverdata; if (driverdata && driverdata->displayRequest) { - ABI::Windows::System::Display::IDisplayRequest * displayRequest = (ABI::Windows::System::Display::IDisplayRequest *) driverdata->displayRequest; + ABI::Windows::System::Display::IDisplayRequest *displayRequest = (ABI::Windows::System::Display::IDisplayRequest *)driverdata->displayRequest; if (_this->suspend_screensaver) { displayRequest->RequestActive(); } else { diff --git a/modules/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h b/modules/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h index b73db44..a34b79e 100644 --- a/modules/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h +++ b/modules/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h @@ -29,9 +29,9 @@ #include "SDL_video.h" #include "SDL_events.h" -#if NTDDI_VERSION >= NTDDI_WINBLUE /* ApplicationView's functionality only becomes - useful for SDL in Win[Phone] 8.1 and up. - Plus, it is not available at all in WinPhone 8.0. */ +#if NTDDI_VERSION >= NTDDI_WINBLUE /* ApplicationView's functionality only becomes \ + useful for SDL in Win[Phone] 8.1 and up. \ + Plus, it is not available at all in WinPhone 8.0. */ #define SDL_WINRT_USE_APPLICATIONVIEW 1 #endif @@ -41,7 +41,8 @@ extern "C" { } /* Private display data */ -typedef struct SDL_VideoData { +typedef struct SDL_VideoData +{ /* An object created by ANGLE/WinRT (OpenGL ES 2 for WinRT) that gets * passed to eglGetDisplay and eglCreateWindowSurface: */ @@ -55,7 +56,7 @@ typedef struct SDL_VideoData { /* A WinRT DisplayRequest, used for implementing SDL_*ScreenSaver() functions. * This is really a pointer to a 'ABI::Windows::System::Display::IDisplayRequest *', * It's casted to 'IUnknown *', to help with building SDL. - */ + */ IUnknown *displayRequest; } SDL_VideoData; @@ -63,19 +64,19 @@ typedef struct SDL_VideoData { For now, SDL/WinRT only supports one window (due to platform limitations of WinRT. */ -extern SDL_Window * WINRT_GlobalSDLWindow; +extern SDL_Window *WINRT_GlobalSDLWindow; /* Updates one or more SDL_Window flags, by querying the OS' native windowing APIs. SDL_Window flags that can be updated should be specified in 'mask'. */ -extern void WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask); -extern "C" Uint32 WINRT_DetectWindowFlags(SDL_Window * window); /* detects flags w/o applying them */ +extern void WINRT_UpdateWindowFlags(SDL_Window *window, Uint32 mask); +extern "C" Uint32 WINRT_DetectWindowFlags(SDL_Window *window); /* detects flags w/o applying them */ /* Display mode internals */ -//typedef struct +// typedef struct //{ -// Windows::Graphics::Display::DisplayOrientations currentOrientation; -//} SDL_DisplayModeData; +// Windows::Graphics::Display::DisplayOrientations currentOrientation; +// } SDL_DisplayModeData; #ifdef __cplusplus_winrt @@ -87,8 +88,8 @@ extern "C" Uint32 WINRT_DetectWindowFlags(SDL_Window * window); /* detects flag #endif /* Converts DIPS to/from physical pixels */ -#define WINRT_DIPS_TO_PHYSICAL_PIXELS(DIPS) ((int)(0.5f + (((float)(DIPS) * (float)WINRT_DISPLAY_PROPERTY(LogicalDpi)) / 96.f))) -#define WINRT_PHYSICAL_PIXELS_TO_DIPS(PHYSPIX) (((float)(PHYSPIX) * 96.f)/WINRT_DISPLAY_PROPERTY(LogicalDpi)) +#define WINRT_DIPS_TO_PHYSICAL_PIXELS(DIPS) ((int)(0.5f + (((float)(DIPS) * (float)WINRT_DISPLAY_PROPERTY(LogicalDpi)) / 96.f))) +#define WINRT_PHYSICAL_PIXELS_TO_DIPS(PHYSPIX) (((float)(PHYSPIX)*96.f) / WINRT_DISPLAY_PROPERTY(LogicalDpi)) /* Internal window data */ struct SDL_WindowData diff --git a/modules/SDL2/src/video/x11/SDL_x11clipboard.c b/modules/SDL2/src/video/x11/SDL_x11clipboard.c index aa719b2..6c84278 100644 --- a/modules/SDL2/src/video/x11/SDL_x11clipboard.c +++ b/modules/SDL2/src/video/x11/SDL_x11clipboard.c @@ -30,10 +30,9 @@ #include "SDL_x11clipboard.h" /* Get any application owned window handle for clipboard association */ -static Window -GetWindow(_THIS) +static Window GetWindow(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; /* We create an unmapped window that exists just to manage the clipboard, since X11 selection data is tied to a specific window and dies with it. @@ -54,76 +53,71 @@ GetWindow(_THIS) /* We use our own cut-buffer for intermediate storage instead of XA_CUT_BUFFER0 because their use isn't really defined for holding UTF8. */ -Atom -X11_GetSDLCutBufferClipboardType(Display *display, enum ESDLX11ClipboardMimeType mime_type, - Atom selection_type) +Atom X11_GetSDLCutBufferClipboardType(Display *display, enum ESDLX11ClipboardMimeType mime_type, + Atom selection_type) { switch (mime_type) { - case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: - #ifdef X_HAVE_UTF8_STRING - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: - #endif - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: - return X11_XInternAtom(display, selection_type == XA_PRIMARY ? - "SDL_CUTBUFFER_PRIMARY_SELECTION" : "SDL_CUTBUFFER", - False); - default: - SDL_SetError("Can't find mime_type."); - return XA_STRING; + case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: +#ifdef X_HAVE_UTF8_STRING + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: +#endif + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: + return X11_XInternAtom(display, selection_type == XA_PRIMARY ? "SDL_CUTBUFFER_PRIMARY_SELECTION" : "SDL_CUTBUFFER", + False); + default: + SDL_SetError("Can't find mime_type."); + return XA_STRING; } } -Atom -X11_GetSDLCutBufferClipboardExternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type) +Atom X11_GetSDLCutBufferClipboardExternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type) { switch (mime_type) { - case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: - /* If you don't support UTF-8, you might use XA_STRING here */ - #ifdef X_HAVE_UTF8_STRING - return X11_XInternAtom(display, "UTF8_STRING", False); - #else - return XA_STRING; - #endif - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: - return X11_XInternAtom(display, "text/plain", False); - #ifdef X_HAVE_UTF8_STRING - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: - return X11_XInternAtom(display, "text/plain;charset=utf-8", False); - #endif - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: - return X11_XInternAtom(display, "TEXT", False); - default: - SDL_SetError("Can't find mime_type."); - return XA_STRING; + case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: +/* If you don't support UTF-8, you might use XA_STRING here */ +#ifdef X_HAVE_UTF8_STRING + return X11_XInternAtom(display, "UTF8_STRING", False); +#else + return XA_STRING; +#endif + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: + return X11_XInternAtom(display, "text/plain", False); +#ifdef X_HAVE_UTF8_STRING + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: + return X11_XInternAtom(display, "text/plain;charset=utf-8", False); +#endif + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: + return X11_XInternAtom(display, "TEXT", False); + default: + SDL_SetError("Can't find mime_type."); + return XA_STRING; } } -Atom -X11_GetSDLCutBufferClipboardInternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type) +Atom X11_GetSDLCutBufferClipboardInternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type) { switch (mime_type) { - case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: - #ifdef X_HAVE_UTF8_STRING - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: - #endif - case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: - /* If you don't support UTF-8, you might use XA_STRING here */ - #ifdef X_HAVE_UTF8_STRING - return X11_XInternAtom(display, "UTF8_STRING", False); - #else - return XA_STRING; - #endif - default: - SDL_SetError("Can't find mime_type."); - return XA_STRING; + case SDL_X11_CLIPBOARD_MIME_TYPE_STRING: + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN: +#ifdef X_HAVE_UTF8_STRING + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8: +#endif + case SDL_X11_CLIPBOARD_MIME_TYPE_TEXT: +/* If you don't support UTF-8, you might use XA_STRING here */ +#ifdef X_HAVE_UTF8_STRING + return X11_XInternAtom(display, "UTF8_STRING", False); +#else + return XA_STRING; +#endif + default: + SDL_SetError("Can't find mime_type."); + return XA_STRING; } } -static int -SetSelectionText(_THIS, const char *text, Atom selection_type) +static int SetSelectionText(_THIS, const char *text, Atom selection_type) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; Window window; /* Get the SDL window that will own the selection */ @@ -134,9 +128,9 @@ SetSelectionText(_THIS, const char *text, Atom selection_type) /* Save the selection on the root window */ X11_XChangeProperty(display, DefaultRootWindow(display), - X11_GetSDLCutBufferClipboardType(display, SDL_X11_CLIPBOARD_MIME_TYPE_STRING, selection_type), - X11_GetSDLCutBufferClipboardInternalFormat(display, SDL_X11_CLIPBOARD_MIME_TYPE_STRING), 8, PropModeReplace, - (const unsigned char *)text, SDL_strlen(text)); + X11_GetSDLCutBufferClipboardType(display, SDL_X11_CLIPBOARD_MIME_TYPE_STRING, selection_type), + X11_GetSDLCutBufferClipboardInternalFormat(display, SDL_X11_CLIPBOARD_MIME_TYPE_STRING), 8, PropModeReplace, + (const unsigned char *)text, SDL_strlen(text)); if (X11_XGetSelectionOwner(display, selection_type) != window) { X11_XSetSelectionOwner(display, selection_type, window, CurrentTime); @@ -145,10 +139,9 @@ SetSelectionText(_THIS, const char *text, Atom selection_type) return 0; } -static char * -GetSlectionText(_THIS, Atom selection_type) +static char *GetSlectionText(_THIS, Atom selection_type) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display = videodata->display; Atom format; Window window; @@ -182,7 +175,7 @@ GetSlectionText(_THIS, Atom selection_type) owner = window; selection = X11_XInternAtom(display, "SDL_SELECTION", False); X11_XConvertSelection(display, selection_type, format, selection, owner, - CurrentTime); + CurrentTime); /* When using synergy on Linux and when data has been put in the clipboard on the remote (Windows anyway) machine then selection_waiting may never @@ -204,11 +197,10 @@ GetSlectionText(_THIS, Atom selection_type) } } - if (X11_XGetWindowProperty(display, owner, selection, 0, INT_MAX/4, False, - format, &seln_type, &seln_format, &nbytes, &overflow, &src) - == Success) { + if (X11_XGetWindowProperty(display, owner, selection, 0, INT_MAX / 4, False, + format, &seln_type, &seln_format, &nbytes, &overflow, &src) == Success) { if (seln_type == format) { - text = (char *)SDL_malloc(nbytes+1); + text = (char *)SDL_malloc(nbytes + 1); if (text) { SDL_memcpy(text, src, nbytes); text[nbytes] = '\0'; @@ -217,17 +209,16 @@ GetSlectionText(_THIS, Atom selection_type) X11_XFree(src); } - if (!text) { + if (text == NULL) { text = SDL_strdup(""); } return text; } -int -X11_SetClipboardText(_THIS, const char *text) +int X11_SetClipboardText(_THIS, const char *text) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Atom XA_CLIPBOARD = X11_XInternAtom(videodata->display, "CLIPBOARD", 0); if (XA_CLIPBOARD == None) { return SDL_SetError("Couldn't access X clipboard"); @@ -235,16 +226,14 @@ X11_SetClipboardText(_THIS, const char *text) return SetSelectionText(_this, text, XA_CLIPBOARD); } -int -X11_SetPrimarySelectionText(_THIS, const char *text) +int X11_SetPrimarySelectionText(_THIS, const char *text) { return SetSelectionText(_this, text, XA_PRIMARY); } -char * -X11_GetClipboardText(_THIS) +char *X11_GetClipboardText(_THIS) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Atom XA_CLIPBOARD = X11_XInternAtom(videodata->display, "CLIPBOARD", 0); if (XA_CLIPBOARD == None) { SDL_SetError("Couldn't access X clipboard"); @@ -253,14 +242,12 @@ X11_GetClipboardText(_THIS) return GetSlectionText(_this, XA_CLIPBOARD); } -char * -X11_GetPrimarySelectionText(_THIS) +char *X11_GetPrimarySelectionText(_THIS) { return GetSlectionText(_this, XA_PRIMARY); } -SDL_bool -X11_HasClipboardText(_THIS) +SDL_bool X11_HasClipboardText(_THIS) { SDL_bool result = SDL_FALSE; char *text = X11_GetClipboardText(_this); @@ -271,8 +258,7 @@ X11_HasClipboardText(_THIS) return result; } -SDL_bool -X11_HasPrimarySelectionText(_THIS) +SDL_bool X11_HasPrimarySelectionText(_THIS) { SDL_bool result = SDL_FALSE; char *text = X11_GetPrimarySelectionText(_this); diff --git a/modules/SDL2/src/video/x11/SDL_x11clipboard.h b/modules/SDL2/src/video/x11/SDL_x11clipboard.h index feb0faf..21575dd 100644 --- a/modules/SDL2/src/video/x11/SDL_x11clipboard.h +++ b/modules/SDL2/src/video/x11/SDL_x11clipboard.h @@ -23,12 +23,13 @@ #ifndef SDL_x11clipboard_h_ #define SDL_x11clipboard_h_ -enum ESDLX11ClipboardMimeType { +enum ESDLX11ClipboardMimeType +{ SDL_X11_CLIPBOARD_MIME_TYPE_STRING, SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN, - #ifdef X_HAVE_UTF8_STRING +#ifdef X_HAVE_UTF8_STRING SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8, - #endif +#endif SDL_X11_CLIPBOARD_MIME_TYPE_TEXT, SDL_X11_CLIPBOARD_MIME_TYPE_MAX }; diff --git a/modules/SDL2/src/video/x11/SDL_x11dyn.c b/modules/SDL2/src/video/x11/SDL_x11dyn.c index fc47db2..8187299 100644 --- a/modules/SDL2/src/video/x11/SDL_x11dyn.c +++ b/modules/SDL2/src/video/x11/SDL_x11dyn.c @@ -61,25 +61,25 @@ typedef struct #endif static x11dynlib x11libs[] = { - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR}, - {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS} + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR }, + { NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS } }; -static void * -X11_GetSym(const char *fnname, int *pHasModule) +static void *X11_GetSym(const char *fnname, int *pHasModule) { int i; void *fn = NULL; for (i = 0; i < SDL_TABLESIZE(x11libs); i++) { if (x11libs[i].lib != NULL) { fn = SDL_LoadFunction(x11libs[i].lib, fnname); - if (fn != NULL) + if (fn != NULL) { break; + } } } @@ -90,8 +90,9 @@ X11_GetSym(const char *fnname, int *pHasModule) printf("X11: Symbol '%s' NOT FOUND!\n", fnname); #endif - if (fn == NULL) - *pHasModule = 0; /* kill this module. */ + if (fn == NULL) { + *pHasModule = 0; /* kill this module. */ + } return fn; } @@ -99,7 +100,7 @@ X11_GetSym(const char *fnname, int *pHasModule) #endif /* SDL_VIDEO_DRIVER_X11_DYNAMIC */ /* Define all the function pointers and wrappers... */ -#define SDL_X11_SYM(rc,fn,params,args,ret) SDL_DYNX11FN_##fn X11_##fn = NULL; +#define SDL_X11_SYM(rc, fn, params, args, ret) SDL_DYNX11FN_##fn X11_##fn = NULL; #include "SDL_x11sym.h" /* Annoying varargs entry point... */ @@ -114,8 +115,7 @@ SDL_DYNX11FN_XGetICValues X11_XGetICValues = NULL; static int x11_load_refcount = 0; -void -SDL_X11_UnloadSymbols(void) +void SDL_X11_UnloadSymbols(void) { /* Don't actually unload if more than one module is using the libs... */ if (x11_load_refcount > 0) { @@ -125,8 +125,8 @@ SDL_X11_UnloadSymbols(void) #endif /* set all the function pointers to NULL. */ -#define SDL_X11_MODULE(modname) SDL_X11_HAVE_##modname = 0; -#define SDL_X11_SYM(rc,fn,params,args,ret) X11_##fn = NULL; +#define SDL_X11_MODULE(modname) SDL_X11_HAVE_##modname = 0; +#define SDL_X11_SYM(rc, fn, params, args, ret) X11_##fn = NULL; #include "SDL_x11sym.h" #ifdef X_HAVE_UTF8_STRING @@ -147,10 +147,9 @@ SDL_X11_UnloadSymbols(void) } /* returns non-zero if all needed symbols were loaded. */ -int -SDL_X11_LoadSymbols(void) +int SDL_X11_LoadSymbols(void) { - int rc = 1; /* always succeed if not using Dynamic X11 stuff. */ + int rc = 1; /* always succeed if not using Dynamic X11 stuff. */ /* deal with multiple modules (dga, x11, etc) needing these symbols... */ if (x11_load_refcount++ == 0) { @@ -166,15 +165,15 @@ SDL_X11_LoadSymbols(void) #define SDL_X11_MODULE(modname) SDL_X11_HAVE_##modname = 1; /* default yes */ #include "SDL_x11sym.h" -#define SDL_X11_MODULE(modname) thismod = &SDL_X11_HAVE_##modname; -#define SDL_X11_SYM(a,fn,x,y,z) X11_##fn = (SDL_DYNX11FN_##fn) X11_GetSym(#fn,thismod); +#define SDL_X11_MODULE(modname) thismod = &SDL_X11_HAVE_##modname; +#define SDL_X11_SYM(a, fn, x, y, z) X11_##fn = (SDL_DYNX11FN_##fn)X11_GetSym(#fn, thismod); #include "SDL_x11sym.h" #ifdef X_HAVE_UTF8_STRING X11_XCreateIC = (SDL_DYNX11FN_XCreateIC) - X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8); + X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8); X11_XGetICValues = (SDL_DYNX11FN_XGetICValues) - X11_GetSym("XGetICValues", &SDL_X11_HAVE_UTF8); + X11_GetSym("XGetICValues", &SDL_X11_HAVE_UTF8); #endif if (SDL_X11_HAVE_BASEXLIB) { @@ -186,10 +185,10 @@ SDL_X11_LoadSymbols(void) rc = 0; } -#else /* no dynamic X11 */ +#else /* no dynamic X11 */ -#define SDL_X11_MODULE(modname) SDL_X11_HAVE_##modname = 1; /* default yes */ -#define SDL_X11_SYM(a,fn,x,y,z) X11_##fn = (SDL_DYNX11FN_##fn) fn; +#define SDL_X11_MODULE(modname) SDL_X11_HAVE_##modname = 1; /* default yes */ +#define SDL_X11_SYM(a, fn, x, y, z) X11_##fn = (SDL_DYNX11FN_##fn)fn; #include "SDL_x11sym.h" #ifdef X_HAVE_UTF8_STRING diff --git a/modules/SDL2/src/video/x11/SDL_x11dyn.h b/modules/SDL2/src/video/x11/SDL_x11dyn.h index 9dbc664..a18e41f 100644 --- a/modules/SDL2/src/video/x11/SDL_x11dyn.h +++ b/modules/SDL2/src/video/x11/SDL_x11dyn.h @@ -52,7 +52,7 @@ #if SDL_VIDEO_DRIVER_X11_XDBE #include #endif -#if SDL_VIDEO_DRIVER_X11_XINPUT2 +#if SDL_VIDEO_DRIVER_X11_XINPUT2 || SDL_VIDEO_DRIVER_X11_XFIXES #include #endif #if SDL_VIDEO_DRIVER_X11_XFIXES @@ -69,28 +69,27 @@ #endif #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /* evil function signatures... */ -typedef Bool(*SDL_X11_XESetWireToEventRetType) (Display *, XEvent *, xEvent *); -typedef int (*SDL_X11_XSynchronizeRetType) (Display *); -typedef Status(*SDL_X11_XESetEventToWireRetType) (Display *, XEvent *, xEvent *); +typedef Bool (*SDL_X11_XESetWireToEventRetType)(Display *, XEvent *, xEvent *); +typedef int (*SDL_X11_XSynchronizeRetType)(Display *); +typedef Status (*SDL_X11_XESetEventToWireRetType)(Display *, XEvent *, xEvent *); int SDL_X11_LoadSymbols(void); void SDL_X11_UnloadSymbols(void); /* Declare all the function pointers and wrappers... */ -#define SDL_X11_SYM(rc,fn,params,args,ret) \ - typedef rc (*SDL_DYNX11FN_##fn) params; \ +#define SDL_X11_SYM(rc, fn, params, args, ret) \ + typedef rc(*SDL_DYNX11FN_##fn) params; \ extern SDL_DYNX11FN_##fn X11_##fn; #include "SDL_x11sym.h" /* Annoying varargs entry point... */ #ifdef X_HAVE_UTF8_STRING -typedef XIC(*SDL_DYNX11FN_XCreateIC) (XIM,...); -typedef char *(*SDL_DYNX11FN_XGetICValues) (XIC, ...); +typedef XIC (*SDL_DYNX11FN_XCreateIC)(XIM, ...); +typedef char *(*SDL_DYNX11FN_XGetICValues)(XIC, ...); extern SDL_DYNX11FN_XCreateIC X11_XCreateIC; extern SDL_DYNX11FN_XGetICValues X11_XGetICValues; #endif @@ -103,5 +102,5 @@ extern SDL_DYNX11FN_XGetICValues X11_XGetICValues; } #endif -#endif /* !defined SDL_x11dyn_h_ */ +#endif /* !defined SDL_x11dyn_h_ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/x11/SDL_x11events.c b/modules/SDL2/src/video/x11/SDL_x11events.c index 6d99f09..a28ccce 100644 --- a/modules/SDL2/src/video/x11/SDL_x11events.c +++ b/modules/SDL2/src/video/x11/SDL_x11events.c @@ -36,6 +36,7 @@ #include "../../events/SDL_events_c.h" #include "../../events/SDL_mouse_c.h" #include "../../events/SDL_touch_c.h" +#include "../../SDL_utils_c.h" #include "SDL_hints.h" #include "SDL_timer.h" @@ -46,42 +47,43 @@ /*#define DEBUG_XEVENTS*/ #ifndef _NET_WM_MOVERESIZE_SIZE_TOPLEFT -#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0 +#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_TOP -#define _NET_WM_MOVERESIZE_SIZE_TOP 1 +#define _NET_WM_MOVERESIZE_SIZE_TOP 1 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_TOPRIGHT -#define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2 +#define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_RIGHT -#define _NET_WM_MOVERESIZE_SIZE_RIGHT 3 +#define _NET_WM_MOVERESIZE_SIZE_RIGHT 3 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT -#define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4 +#define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_BOTTOM -#define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5 +#define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT -#define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6 +#define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6 #endif #ifndef _NET_WM_MOVERESIZE_SIZE_LEFT -#define _NET_WM_MOVERESIZE_SIZE_LEFT 7 +#define _NET_WM_MOVERESIZE_SIZE_LEFT 7 #endif #ifndef _NET_WM_MOVERESIZE_MOVE -#define _NET_WM_MOVERESIZE_MOVE 8 +#define _NET_WM_MOVERESIZE_MOVE 8 #endif -typedef struct { +typedef struct +{ unsigned char *data; int format, count; Atom type; @@ -92,7 +94,7 @@ typedef struct { */ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) { - unsigned char *ret=NULL; + unsigned char *ret = NULL; Atom type; int fmt; unsigned long count; @@ -100,15 +102,17 @@ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) int bytes_fetch = 0; do { - if (ret != NULL) X11_XFree(ret); + if (ret != NULL) { + X11_XFree(ret); + } X11_XGetWindowProperty(disp, w, prop, 0, bytes_fetch, False, AnyPropertyType, &type, &fmt, &count, &bytes_left, &ret); bytes_fetch += bytes_left; } while (bytes_left != 0); - p->data=ret; - p->format=fmt; - p->count=count; - p->type=type; + p->data = ret; + p->format = fmt; + p->count = count; + p->type = type; } /* Find text-uri-list in a list of targets and return it's atom @@ -118,10 +122,10 @@ static Atom X11_PickTarget(Display *disp, Atom list[], int list_count) Atom request = None; char *name; int i; - for (i=0; i < list_count && request == None; i++) { + for (i = 0; i < list_count && request == None; i++) { name = X11_XGetAtomName(disp, list[i]); if ((SDL_strcmp("text/uri-list", name) == 0) || (SDL_strcmp("text/plain", name) == 0)) { - request = list[i]; + request = list[i]; } X11_XFree(name); } @@ -132,11 +136,17 @@ static Atom X11_PickTarget(Display *disp, Atom list[], int list_count) case in the Xdnd protocol */ static Atom X11_PickTargetFromAtoms(Display *disp, Atom a0, Atom a1, Atom a2) { - int count=0; + int count = 0; Atom atom[3]; - if (a0 != None) atom[count++] = a0; - if (a1 != None) atom[count++] = a1; - if (a2 != None) atom[count++] = a2; + if (a0 != None) { + atom[count++] = a0; + } + if (a1 != None) { + atom[count++] = a1; + } + if (a2 != None) { + atom[count++] = a2; + } return X11_PickTarget(disp, atom, count); } @@ -147,13 +157,12 @@ struct KeyRepeatCheckData }; static Bool X11_KeyRepeatCheckIfEvent(Display *display, XEvent *chkev, - XPointer arg) + XPointer arg) { - struct KeyRepeatCheckData *d = (struct KeyRepeatCheckData *) arg; - if (chkev->type == KeyPress && - chkev->xkey.keycode == d->event->xkey.keycode && - chkev->xkey.time - d->event->xkey.time < 2) + struct KeyRepeatCheckData *d = (struct KeyRepeatCheckData *)arg; + if (chkev->type == KeyPress && chkev->xkey.keycode == d->event->xkey.keycode && chkev->xkey.time - d->event->xkey.time < 2) { d->found = SDL_TRUE; + } return False; } @@ -166,14 +175,13 @@ static SDL_bool X11_KeyRepeat(Display *display, XEvent *event) struct KeyRepeatCheckData d; d.event = event; d.found = SDL_FALSE; - if (X11_XPending(display)) - X11_XCheckIfEvent(display, &dummyev, X11_KeyRepeatCheckIfEvent, - (XPointer) &d); + if (X11_XPending(display)) { + X11_XCheckIfEvent(display, &dummyev, X11_KeyRepeatCheckIfEvent, (XPointer)&d); + } return d.found; } -static SDL_bool -X11_IsWheelEvent(Display * display,XEvent * event,int * xticks,int * yticks) +static SDL_bool X11_IsWheelEvent(Display *display, XEvent *event, int *xticks, int *yticks) { /* according to the xlib docs, no specific mouse wheel events exist. However, the defacto standard is that the vertical wheel is X buttons @@ -181,11 +189,20 @@ X11_IsWheelEvent(Display * display,XEvent * event,int * xticks,int * yticks) /* Xlib defines "Button1" through 5, so we just use literals here. */ switch (event->xbutton.button) { - case 4: *yticks = 1; return SDL_TRUE; - case 5: *yticks = -1; return SDL_TRUE; - case 6: *xticks = 1; return SDL_TRUE; - case 7: *xticks = -1; return SDL_TRUE; - default: break; + case 4: + *yticks = 1; + return SDL_TRUE; + case 5: + *yticks = -1; + return SDL_TRUE; + case 6: + *xticks = 1; + return SDL_TRUE; + case 7: + *xticks = -1; + return SDL_TRUE; + default: + break; } return SDL_FALSE; } @@ -203,7 +220,8 @@ X11_IsWheelEvent(Display * display,XEvent * event,int * xticks,int * yticks) On error, -1 is returned. */ -static int X11_URIDecode(char *buf, int len) { +static int X11_URIDecode(char *buf, int len) +{ int ri, wi, di; char decode = '\0'; if (buf == NULL || len < 0) { @@ -266,38 +284,42 @@ static int X11_URIDecode(char *buf, int len) { /* Convert URI to local filename return filename if possible, else NULL */ -static char* X11_URIToLocal(char* uri) { +static char *X11_URIToLocal(char *uri) +{ char *file = NULL; SDL_bool local; - if (SDL_memcmp(uri,"file:/",6) == 0) uri += 6; /* local file? */ - else if (SDL_strstr(uri,":/") != NULL) return file; /* wrong scheme */ + if (SDL_memcmp(uri, "file:/", 6) == 0) { + uri += 6; /* local file? */ + } else if (SDL_strstr(uri, ":/") != NULL) { + return file; /* wrong scheme */ + } local = uri[0] != '/' || (uri[0] != '\0' && uri[1] == '/'); /* got a hostname? */ if (!local && uri[0] == '/' && uri[2] != '/') { - char* hostname_end = SDL_strchr(uri+1, '/'); - if (hostname_end != NULL) { - char hostname[ 257 ]; - if (gethostname(hostname, 255) == 0) { - hostname[ 256 ] = '\0'; - if (SDL_memcmp(uri+1, hostname, hostname_end - (uri+1)) == 0) { - uri = hostname_end + 1; - local = SDL_TRUE; + char *hostname_end = SDL_strchr(uri + 1, '/'); + if (hostname_end != NULL) { + char hostname[257]; + if (gethostname(hostname, 255) == 0) { + hostname[256] = '\0'; + if (SDL_memcmp(uri + 1, hostname, hostname_end - (uri + 1)) == 0) { + uri = hostname_end + 1; + local = SDL_TRUE; + } } - } - } + } } if (local) { - file = uri; - /* Convert URI escape sequences to real characters */ - X11_URIDecode(file, 0); - if (uri[1] == '/') { - file++; - } else { - file--; - } + file = uri; + /* Convert URI escape sequences to real characters */ + X11_URIDecode(file, 0); + if (uri[1] == '/') { + file++; + } else { + file--; + } } return file; } @@ -328,10 +350,9 @@ static void X11_HandleGenericEvent(SDL_VideoData *videodata, XEvent *xev) } #endif /* SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */ -static unsigned -X11_GetNumLockModifierMask(_THIS) +static unsigned X11_GetNumLockModifierMask(_THIS) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; Display *display = viddata->display; unsigned num_mask = 0; int i, j; @@ -340,8 +361,8 @@ X11_GetNumLockModifierMask(_THIS) xmods = X11_XGetModifierMapping(display); n = xmods->max_keypermod; - for(i = 3; i < 8; i++) { - for(j = 0; j < n; j++) { + for (i = 3; i < 8; i++) { + for (j = 0; j < n; j++) { KeyCode kc = xmods->modifiermap[i * n + j]; if (viddata->key_layout[kc] == SDL_SCANCODE_NUMLOCKCLEAR) { num_mask = 1 << i; @@ -354,10 +375,9 @@ X11_GetNumLockModifierMask(_THIS) return num_mask; } -static unsigned -X11_GetScrollLockModifierMask(_THIS) +static unsigned X11_GetScrollLockModifierMask(_THIS) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; Display *display = viddata->display; unsigned num_mask = 0; int i, j; @@ -366,8 +386,8 @@ X11_GetScrollLockModifierMask(_THIS) xmods = X11_XGetModifierMapping(display); n = xmods->max_keypermod; - for(i = 3; i < 8; i++) { - for(j = 0; j < n; j++) { + for (i = 3; i < 8; i++) { + for (j = 0; j < n; j++) { KeyCode kc = xmods->modifiermap[i * n + j]; if (viddata->key_layout[kc] == SDL_SCANCODE_SCROLLLOCK) { num_mask = 1 << i; @@ -380,10 +400,9 @@ X11_GetScrollLockModifierMask(_THIS) return num_mask; } -void -X11_ReconcileKeyboardState(_THIS) +void X11_ReconcileKeyboardState(_THIS) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; Display *display = viddata->display; char keys[32]; int keycode; @@ -396,9 +415,9 @@ X11_ReconcileKeyboardState(_THIS) /* Sync up the keyboard modifier state */ if (X11_XQueryPointer(display, DefaultRootWindow(display), &junk_window, &junk_window, &x, &y, &x, &y, &mask)) { - SDL_ToggleModState(KMOD_CAPS, (mask & LockMask) != 0); - SDL_ToggleModState(KMOD_NUM, (mask & X11_GetNumLockModifierMask(_this)) != 0); - SDL_ToggleModState(KMOD_SCROLL, (mask & X11_GetScrollLockModifierMask(_this)) != 0); + SDL_ToggleModState(KMOD_CAPS, (mask & LockMask) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_NUM, (mask & X11_GetNumLockModifierMask(_this)) ? SDL_TRUE : SDL_FALSE); + SDL_ToggleModState(KMOD_SCROLL, (mask & X11_GetScrollLockModifierMask(_this)) ? SDL_TRUE : SDL_FALSE); } keyboardState = SDL_GetKeyboardState(0); @@ -430,9 +449,7 @@ X11_ReconcileKeyboardState(_THIS) } } - -static void -X11_DispatchFocusIn(_THIS, SDL_WindowData *data) +static void X11_DispatchFocusIn(_THIS, SDL_WindowData *data) { #ifdef DEBUG_XEVENTS printf("window %p: Dispatching FocusIn\n", data); @@ -452,8 +469,7 @@ X11_DispatchFocusIn(_THIS, SDL_WindowData *data) } } -static void -X11_DispatchFocusOut(_THIS, SDL_WindowData *data) +static void X11_DispatchFocusOut(_THIS, SDL_WindowData *data) { #ifdef DEBUG_XEVENTS printf("window %p: Dispatching FocusOut\n", data); @@ -475,8 +491,7 @@ X11_DispatchFocusOut(_THIS, SDL_WindowData *data) #endif } -static void -X11_DispatchMapNotify(SDL_WindowData *data) +static void X11_DispatchMapNotify(SDL_WindowData *data) { SDL_Window *window = data->window; SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); @@ -486,18 +501,16 @@ X11_DispatchMapNotify(SDL_WindowData *data) } } -static void -X11_DispatchUnmapNotify(SDL_WindowData *data) +static void X11_DispatchUnmapNotify(SDL_WindowData *data) { SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0); SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); } -static void -InitiateWindowMove(_THIS, const SDL_WindowData *data, const SDL_Point *point) +static void InitiateWindowMove(_THIS, const SDL_WindowData *data, const SDL_Point *point) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; - SDL_Window* window = data->window; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; + SDL_Window *window = data->window; Display *display = viddata->display; XEvent evt; @@ -509,8 +522,8 @@ InitiateWindowMove(_THIS, const SDL_WindowData *data, const SDL_Point *point) evt.xclient.window = data->xwindow; evt.xclient.message_type = X11_XInternAtom(display, "_NET_WM_MOVERESIZE", True); evt.xclient.format = 32; - evt.xclient.data.l[0] = window->x + point->x; - evt.xclient.data.l[1] = window->y + point->y; + evt.xclient.data.l[0] = (size_t)window->x + point->x; + evt.xclient.data.l[1] = (size_t)window->y + point->y; evt.xclient.data.l[2] = _NET_WM_MOVERESIZE_MOVE; evt.xclient.data.l[3] = Button1; evt.xclient.data.l[4] = 0; @@ -519,16 +532,16 @@ InitiateWindowMove(_THIS, const SDL_WindowData *data, const SDL_Point *point) X11_XSync(display, 0); } -static void -InitiateWindowResize(_THIS, const SDL_WindowData *data, const SDL_Point *point, int direction) +static void InitiateWindowResize(_THIS, const SDL_WindowData *data, const SDL_Point *point, int direction) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; - SDL_Window* window = data->window; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; + SDL_Window *window = data->window; Display *display = viddata->display; XEvent evt; - if (direction < _NET_WM_MOVERESIZE_SIZE_TOPLEFT || direction > _NET_WM_MOVERESIZE_SIZE_LEFT) + if (direction < _NET_WM_MOVERESIZE_SIZE_TOPLEFT || direction > _NET_WM_MOVERESIZE_SIZE_LEFT) { return; + } /* !!! FIXME: we need to regrab this if necessary when the drag is done. */ X11_XUngrabPointer(display, 0L); @@ -538,8 +551,8 @@ InitiateWindowResize(_THIS, const SDL_WindowData *data, const SDL_Point *point, evt.xclient.window = data->xwindow; evt.xclient.message_type = X11_XInternAtom(display, "_NET_WM_MOVERESIZE", True); evt.xclient.format = 32; - evt.xclient.data.l[0] = window->x + point->x; - evt.xclient.data.l[1] = window->y + point->y; + evt.xclient.data.l[0] = (size_t)window->x + point->x; + evt.xclient.data.l[1] = (size_t)window->y + point->y; evt.xclient.data.l[2] = direction; evt.xclient.data.l[3] = Button1; evt.xclient.data.l[4] = 0; @@ -548,8 +561,7 @@ InitiateWindowResize(_THIS, const SDL_WindowData *data, const SDL_Point *point, X11_XSync(display, 0); } -static SDL_bool -ProcessHitTest(_THIS, const SDL_WindowData *data, const XEvent *xev) +static SDL_bool ProcessHitTest(_THIS, const SDL_WindowData *data, const XEvent *xev) { SDL_Window *window = data->window; @@ -564,37 +576,37 @@ ProcessHitTest(_THIS, const SDL_WindowData *data, const XEvent *xev) }; switch (rc) { - case SDL_HITTEST_DRAGGABLE: - InitiateWindowMove(_this, data, &point); - return SDL_TRUE; - - case SDL_HITTEST_RESIZE_TOPLEFT: - case SDL_HITTEST_RESIZE_TOP: - case SDL_HITTEST_RESIZE_TOPRIGHT: - case SDL_HITTEST_RESIZE_RIGHT: - case SDL_HITTEST_RESIZE_BOTTOMRIGHT: - case SDL_HITTEST_RESIZE_BOTTOM: - case SDL_HITTEST_RESIZE_BOTTOMLEFT: - case SDL_HITTEST_RESIZE_LEFT: - InitiateWindowResize(_this, data, &point, directions[rc - SDL_HITTEST_RESIZE_TOPLEFT]); - return SDL_TRUE; - - default: return SDL_FALSE; + case SDL_HITTEST_DRAGGABLE: + InitiateWindowMove(_this, data, &point); + return SDL_TRUE; + + case SDL_HITTEST_RESIZE_TOPLEFT: + case SDL_HITTEST_RESIZE_TOP: + case SDL_HITTEST_RESIZE_TOPRIGHT: + case SDL_HITTEST_RESIZE_RIGHT: + case SDL_HITTEST_RESIZE_BOTTOMRIGHT: + case SDL_HITTEST_RESIZE_BOTTOM: + case SDL_HITTEST_RESIZE_BOTTOMLEFT: + case SDL_HITTEST_RESIZE_LEFT: + InitiateWindowResize(_this, data, &point, directions[rc - SDL_HITTEST_RESIZE_TOPLEFT]); + return SDL_TRUE; + + default: + return SDL_FALSE; } } return SDL_FALSE; } -static void -X11_UpdateUserTime(SDL_WindowData *data, const unsigned long latest) +static void X11_UpdateUserTime(SDL_WindowData *data, const unsigned long latest) { if (latest && (latest != data->user_time)) { SDL_VideoData *videodata = data->videodata; Display *display = videodata->display; X11_XChangeProperty(display, data->xwindow, videodata->_NET_WM_USER_TIME, XA_CARDINAL, 32, PropModeReplace, - (const unsigned char *) &latest, 1); + (const unsigned char *)&latest, 1); #ifdef DEBUG_XEVENTS printf("window %p: updating _NET_WM_USER_TIME to %lu\n", data, latest); #endif @@ -602,138 +614,148 @@ X11_UpdateUserTime(SDL_WindowData *data, const unsigned long latest) } } -static void -X11_HandleClipboardEvent(_THIS, const XEvent *xevent) +static void X11_HandleClipboardEvent(_THIS, const XEvent *xevent) { int i; - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display = videodata->display; SDL_assert(videodata->clipboard_window != None); SDL_assert(xevent->xany.window == videodata->clipboard_window); switch (xevent->type) { - /* Copy the selection from our own CUTBUFFER to the requested property */ - case SelectionRequest: { - const XSelectionRequestEvent *req = &xevent->xselectionrequest; - XEvent sevent; - int seln_format, mime_formats; - unsigned long nbytes; - unsigned long overflow; - unsigned char *seln_data; - Atom supportedFormats[SDL_X11_CLIPBOARD_MIME_TYPE_MAX+1]; - Atom XA_TARGETS = X11_XInternAtom(display, "TARGETS", 0); + /* Copy the selection from our own CUTBUFFER to the requested property */ + case SelectionRequest: + { + const XSelectionRequestEvent *req = &xevent->xselectionrequest; + XEvent sevent; + int seln_format, mime_formats; + unsigned long nbytes; + unsigned long overflow; + unsigned char *seln_data; + Atom supportedFormats[SDL_X11_CLIPBOARD_MIME_TYPE_MAX + 1]; + Atom XA_TARGETS = X11_XInternAtom(display, "TARGETS", 0); #ifdef DEBUG_XEVENTS - printf("window CLIPBOARD: SelectionRequest (requestor = %ld, target = %ld)\n", - req->requestor, req->target); + printf("window CLIPBOARD: SelectionRequest (requestor = %ld, target = %ld)\n", + req->requestor, req->target); #endif - SDL_zero(sevent); - sevent.xany.type = SelectionNotify; - sevent.xselection.selection = req->selection; - sevent.xselection.target = None; - sevent.xselection.property = None; /* tell them no by default */ - sevent.xselection.requestor = req->requestor; - sevent.xselection.time = req->time; - - /* !!! FIXME: We were probably storing this on the root window - because an SDL window might go away...? but we don't have to do - this now (or ever, really). */ - - if (req->target == XA_TARGETS) { - supportedFormats[0] = XA_TARGETS; - mime_formats = 1; - for (i = 0; i < SDL_X11_CLIPBOARD_MIME_TYPE_MAX; ++i) - supportedFormats[mime_formats++] = X11_GetSDLCutBufferClipboardExternalFormat(display, i); - X11_XChangeProperty(display, req->requestor, req->property, - XA_ATOM, 32, PropModeReplace, - (unsigned char*)supportedFormats, - mime_formats); - sevent.xselection.property = req->property; - sevent.xselection.target = XA_TARGETS; - } else { - for (i = 0; i < SDL_X11_CLIPBOARD_MIME_TYPE_MAX; ++i) { - if (X11_GetSDLCutBufferClipboardExternalFormat(display, i) != req->target) - continue; - if (X11_XGetWindowProperty(display, DefaultRootWindow(display), - X11_GetSDLCutBufferClipboardType(display, i, req->selection), 0, INT_MAX/4, False, X11_GetSDLCutBufferClipboardInternalFormat(display, i), - &sevent.xselection.target, &seln_format, &nbytes, - &overflow, &seln_data) == Success) { - if (seln_format != None) { - X11_XChangeProperty(display, req->requestor, req->property, - sevent.xselection.target, seln_format, PropModeReplace, - seln_data, nbytes); - sevent.xselection.property = req->property; - X11_XFree(seln_data); - break; - } else { - X11_XFree(seln_data); - } + SDL_zero(sevent); + sevent.xany.type = SelectionNotify; + sevent.xselection.selection = req->selection; + sevent.xselection.target = None; + sevent.xselection.property = None; /* tell them no by default */ + sevent.xselection.requestor = req->requestor; + sevent.xselection.time = req->time; + + /* !!! FIXME: We were probably storing this on the root window + because an SDL window might go away...? but we don't have to do + this now (or ever, really). */ + + if (req->target == XA_TARGETS) { + supportedFormats[0] = XA_TARGETS; + mime_formats = 1; + for (i = 0; i < SDL_X11_CLIPBOARD_MIME_TYPE_MAX; ++i) { + supportedFormats[mime_formats++] = X11_GetSDLCutBufferClipboardExternalFormat(display, i); + } + X11_XChangeProperty(display, req->requestor, req->property, + XA_ATOM, 32, PropModeReplace, + (unsigned char *)supportedFormats, + mime_formats); + sevent.xselection.property = req->property; + sevent.xselection.target = XA_TARGETS; + } else { + for (i = 0; i < SDL_X11_CLIPBOARD_MIME_TYPE_MAX; ++i) { + if (X11_GetSDLCutBufferClipboardExternalFormat(display, i) != req->target) { + continue; + } + if (X11_XGetWindowProperty(display, DefaultRootWindow(display), + X11_GetSDLCutBufferClipboardType(display, i, req->selection), 0, INT_MAX / 4, False, X11_GetSDLCutBufferClipboardInternalFormat(display, i), + &sevent.xselection.target, &seln_format, &nbytes, + &overflow, &seln_data) == Success) { + if (seln_format != None) { + X11_XChangeProperty(display, req->requestor, req->property, + sevent.xselection.target, seln_format, PropModeReplace, + seln_data, nbytes); + sevent.xselection.property = req->property; + X11_XFree(seln_data); + break; + } else { + X11_XFree(seln_data); } } } - X11_XSendEvent(display, req->requestor, False, 0, &sevent); - X11_XSync(display, False); } - break; + X11_XSendEvent(display, req->requestor, False, 0, &sevent); + X11_XSync(display, False); + } break; - case SelectionNotify: { + case SelectionNotify: + { #ifdef DEBUG_XEVENTS - printf("window CLIPBOARD: SelectionNotify (requestor = %ld, target = %ld)\n", - xevent->xselection.requestor, xevent->xselection.target); + printf("window CLIPBOARD: SelectionNotify (requestor = %ld, target = %ld)\n", + xevent->xselection.requestor, xevent->xselection.target); #endif - videodata->selection_waiting = SDL_FALSE; - } - break; + videodata->selection_waiting = SDL_FALSE; + } break; - case SelectionClear: { - /* !!! FIXME: cache atoms */ - Atom XA_CLIPBOARD = X11_XInternAtom(display, "CLIPBOARD", 0); + case SelectionClear: + { + /* !!! FIXME: cache atoms */ + Atom XA_CLIPBOARD = X11_XInternAtom(display, "CLIPBOARD", 0); #ifdef DEBUG_XEVENTS - printf("window CLIPBOARD: SelectionClear (requestor = %ld, target = %ld)\n", - xevent->xselection.requestor, xevent->xselection.target); + printf("window CLIPBOARD: SelectionClear (requestor = %ld, target = %ld)\n", + xevent->xselection.requestor, xevent->xselection.target); #endif - if (xevent->xselectionclear.selection == XA_PRIMARY || - (XA_CLIPBOARD != None && xevent->xselectionclear.selection == XA_CLIPBOARD)) { - SDL_SendClipboardUpdate(); - } + if (xevent->xselectionclear.selection == XA_PRIMARY || + (XA_CLIPBOARD != None && xevent->xselectionclear.selection == XA_CLIPBOARD)) { + SDL_SendClipboardUpdate(); } - break; + } break; } } -static Bool -isMapNotify(Display *display, XEvent *ev, XPointer arg) +static Bool isMapNotify(Display *display, XEvent *ev, XPointer arg) { XUnmapEvent *unmap; - unmap = (XUnmapEvent*) arg; + unmap = (XUnmapEvent *)arg; return ev->type == MapNotify && - ev->xmap.window == unmap->window && - ev->xmap.serial == unmap->serial; + ev->xmap.window == unmap->window && + ev->xmap.serial == unmap->serial; } -static Bool -isReparentNotify(Display *display, XEvent *ev, XPointer arg) +static Bool isReparentNotify(Display *display, XEvent *ev, XPointer arg) { XUnmapEvent *unmap; - unmap = (XUnmapEvent*) arg; + unmap = (XUnmapEvent *)arg; return ev->type == ReparentNotify && - ev->xreparent.window == unmap->window && - ev->xreparent.serial == unmap->serial; + ev->xreparent.window == unmap->window && + ev->xreparent.serial == unmap->serial; +} + +static SDL_bool IsHighLatin1(const char *string, int length) +{ + while (length-- > 0) { + Uint8 ch = (Uint8)*string; + if (ch >= 0x80) { + return SDL_TRUE; + } + ++string; + } + return SDL_FALSE; } -static int -XLookupStringAsUTF8(XKeyEvent *event_struct, char *buffer_return, int bytes_buffer, KeySym *keysym_return, XComposeStatus *status_in_out) +static int XLookupStringAsUTF8(XKeyEvent *event_struct, char *buffer_return, int bytes_buffer, KeySym *keysym_return, XComposeStatus *status_in_out) { int result = X11_XLookupString(event_struct, buffer_return, bytes_buffer, keysym_return, status_in_out); - if (result > 0) { + if (IsHighLatin1(buffer_return, result)) { char *utf8_text = SDL_iconv_string("UTF-8", "ISO-8859-1", buffer_return, result); if (utf8_text) { SDL_strlcpy(buffer_return, utf8_text, bytes_buffer); @@ -746,10 +768,34 @@ XLookupStringAsUTF8(XKeyEvent *event_struct, char *buffer_return, int bytes_buff return result; } -static void -X11_DispatchEvent(_THIS, XEvent *xevent) +void X11_GetBorderValues(void /* SDL_WindowData */ *data_) +{ + SDL_WindowData *data = (SDL_WindowData *)data_; + SDL_VideoData *videodata = data->videodata; + Display *display = videodata->display; + + Atom type; + int format; + unsigned long nitems, bytes_after; + unsigned char *property; + if (X11_XGetWindowProperty(display, data->xwindow, videodata->_NET_FRAME_EXTENTS, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property) == Success) { + if (type != None && nitems == 4) { + data->border_left = (int)((long *)property)[0]; + data->border_right = (int)((long *)property)[1]; + data->border_top = (int)((long *)property)[2]; + data->border_bottom = (int)((long *)property)[3]; + } + X11_XFree(property); + +#ifdef DEBUG_XEVENTS + printf("New _NET_FRAME_EXTENTS: left=%d right=%d, top=%d, bottom=%d\n", data->border_left, data->border_right, data->border_top, data->border_bottom); +#endif + } +} + +static void X11_DispatchEvent(_THIS, XEvent *xevent) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display; SDL_WindowData *data; int orig_event_type; @@ -796,7 +842,7 @@ X11_DispatchEvent(_THIS, XEvent *xevent) } #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS - if(xevent->type == GenericEvent) { + if (xevent->type == GenericEvent) { X11_HandleGenericEvent(videodata, xevent); return; } @@ -839,7 +885,7 @@ X11_DispatchEvent(_THIS, XEvent *xevent) } } } - if (!data) { + if (data == NULL) { /* The window for KeymapNotify, etc events is 0 */ if (xevent->type == KeymapNotify) { #ifdef DEBUG_XEVENTS @@ -861,7 +907,7 @@ X11_DispatchEvent(_THIS, XEvent *xevent) X11_UpdateKeymap(_this, SDL_TRUE); } else if (xevent->type == PropertyNotify && videodata && videodata->windowlist) { - char* name_of_atom = X11_XGetAtomName(display, xevent->xproperty.atom); + char *name_of_atom = X11_XGetAtomName(display, xevent->xproperty.atom); if (SDL_strncmp(name_of_atom, "_ICC_PROFILE", sizeof("_ICC_PROFILE") - 1) == 0) { XWindowAttributes attrib; @@ -884,7 +930,9 @@ X11_DispatchEvent(_THIS, XEvent *xevent) } } - if (name_of_atom) X11_XFree(name_of_atom); + if (name_of_atom) { + X11_XFree(name_of_atom); + } } return; } @@ -892,685 +940,660 @@ X11_DispatchEvent(_THIS, XEvent *xevent) switch (xevent->type) { /* Gaining mouse coverage? */ - case EnterNotify:{ - SDL_Mouse *mouse = SDL_GetMouse(); + case EnterNotify: + { + SDL_Mouse *mouse = SDL_GetMouse(); #ifdef DEBUG_XEVENTS - printf("window %p: EnterNotify! (%d,%d,%d)\n", data, - xevent->xcrossing.x, - xevent->xcrossing.y, - xevent->xcrossing.mode); - if (xevent->xcrossing.mode == NotifyGrab) - printf("Mode: NotifyGrab\n"); - if (xevent->xcrossing.mode == NotifyUngrab) - printf("Mode: NotifyUngrab\n"); + printf("window %p: EnterNotify! (%d,%d,%d)\n", data, + xevent->xcrossing.x, + xevent->xcrossing.y, + xevent->xcrossing.mode); + if (xevent->xcrossing.mode == NotifyGrab) { + printf("Mode: NotifyGrab\n"); + } + if (xevent->xcrossing.mode == NotifyUngrab) { + printf("Mode: NotifyUngrab\n"); + } #endif - SDL_SetMouseFocus(data->window); + SDL_SetMouseFocus(data->window); - mouse->last_x = xevent->xcrossing.x; - mouse->last_y = xevent->xcrossing.y; + mouse->last_x = xevent->xcrossing.x; + mouse->last_y = xevent->xcrossing.y; #if SDL_VIDEO_DRIVER_X11_XFIXES - { - /* Only create the barriers if we have input focus */ - SDL_WindowData* windowdata = (SDL_WindowData *) data->window->driverdata; - if ((data->pointer_barrier_active == SDL_TRUE) && windowdata->window->flags & SDL_WINDOW_INPUT_FOCUS) { - X11_ConfineCursorWithFlags(_this, windowdata->window, &windowdata->barrier_rect, X11_BARRIER_HANDLED_BY_EVENT); - } + { + /* Only create the barriers if we have input focus */ + SDL_WindowData *windowdata = (SDL_WindowData *)data->window->driverdata; + if ((data->pointer_barrier_active == SDL_TRUE) && windowdata->window->flags & SDL_WINDOW_INPUT_FOCUS) { + X11_ConfineCursorWithFlags(_this, windowdata->window, &windowdata->barrier_rect, X11_BARRIER_HANDLED_BY_EVENT); } + } #endif - if (!mouse->relative_mode) { - SDL_SendMouseMotion(data->window, 0, 0, xevent->xcrossing.x, xevent->xcrossing.y); - } - - /* We ungrab in LeaveNotify, so we may need to grab again here */ - SDL_UpdateWindowGrab(data->window); + if (!mouse->relative_mode) { + SDL_SendMouseMotion(data->window, 0, 0, xevent->xcrossing.x, xevent->xcrossing.y); } - break; + + /* We ungrab in LeaveNotify, so we may need to grab again here */ + SDL_UpdateWindowGrab(data->window); + } break; /* Losing mouse coverage? */ - case LeaveNotify:{ + case LeaveNotify: + { #ifdef DEBUG_XEVENTS - printf("window %p: LeaveNotify! (%d,%d,%d)\n", data, - xevent->xcrossing.x, - xevent->xcrossing.y, - xevent->xcrossing.mode); - if (xevent->xcrossing.mode == NotifyGrab) - printf("Mode: NotifyGrab\n"); - if (xevent->xcrossing.mode == NotifyUngrab) - printf("Mode: NotifyUngrab\n"); + printf("window %p: LeaveNotify! (%d,%d,%d)\n", data, + xevent->xcrossing.x, + xevent->xcrossing.y, + xevent->xcrossing.mode); + if (xevent->xcrossing.mode == NotifyGrab) { + printf("Mode: NotifyGrab\n"); + } + if (xevent->xcrossing.mode == NotifyUngrab) { + printf("Mode: NotifyUngrab\n"); + } #endif - if (!SDL_GetMouse()->relative_mode) { - SDL_SendMouseMotion(data->window, 0, 0, xevent->xcrossing.x, xevent->xcrossing.y); - } + if (!SDL_GetMouse()->relative_mode) { + SDL_SendMouseMotion(data->window, 0, 0, xevent->xcrossing.x, xevent->xcrossing.y); + } - if (xevent->xcrossing.mode != NotifyGrab && - xevent->xcrossing.mode != NotifyUngrab && - xevent->xcrossing.detail != NotifyInferior) { + if (xevent->xcrossing.mode != NotifyGrab && + xevent->xcrossing.mode != NotifyUngrab && + xevent->xcrossing.detail != NotifyInferior) { - /* In order for interaction with the window decorations and menu to work properly - on Mutter, we need to ungrab the keyboard when the the mouse leaves. */ - if (!(data->window->flags & SDL_WINDOW_FULLSCREEN)) { - X11_SetWindowKeyboardGrab(_this, data->window, SDL_FALSE); - } - - SDL_SetMouseFocus(NULL); + /* In order for interaction with the window decorations and menu to work properly + on Mutter, we need to ungrab the keyboard when the the mouse leaves. */ + if (!(data->window->flags & SDL_WINDOW_FULLSCREEN)) { + X11_SetWindowKeyboardGrab(_this, data->window, SDL_FALSE); } + + SDL_SetMouseFocus(NULL); } - break; + } break; /* Gaining input focus? */ - case FocusIn:{ - if (xevent->xfocus.mode == NotifyGrab || xevent->xfocus.mode == NotifyUngrab) { - /* Someone is handling a global hotkey, ignore it */ + case FocusIn: + { + if (xevent->xfocus.mode == NotifyGrab || xevent->xfocus.mode == NotifyUngrab) { + /* Someone is handling a global hotkey, ignore it */ #ifdef DEBUG_XEVENTS - printf("window %p: FocusIn (NotifyGrab/NotifyUngrab, ignoring)\n", data); + printf("window %p: FocusIn (NotifyGrab/NotifyUngrab, ignoring)\n", data); #endif - break; - } + break; + } - if (xevent->xfocus.detail == NotifyInferior || xevent->xfocus.detail == NotifyPointer) { + if (xevent->xfocus.detail == NotifyInferior || xevent->xfocus.detail == NotifyPointer) { #ifdef DEBUG_XEVENTS - printf("window %p: FocusIn (NotifyInferior/NotifyPointer, ignoring)\n", data); + printf("window %p: FocusIn (NotifyInferior/NotifyPointer, ignoring)\n", data); #endif - break; - } + break; + } #ifdef DEBUG_XEVENTS - printf("window %p: FocusIn!\n", data); + printf("window %p: FocusIn!\n", data); #endif - if (!videodata->last_mode_change_deadline) /* no recent mode changes */ - { - data->pending_focus = PENDING_FOCUS_NONE; - data->pending_focus_time = 0; - X11_DispatchFocusIn(_this, data); - } - else - { - data->pending_focus = PENDING_FOCUS_IN; - data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_TIME; - } - data->last_focus_event_time = SDL_GetTicks(); + if (!videodata->last_mode_change_deadline) /* no recent mode changes */ { + data->pending_focus = PENDING_FOCUS_NONE; + data->pending_focus_time = 0; + X11_DispatchFocusIn(_this, data); + } else { + data->pending_focus = PENDING_FOCUS_IN; + data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_TIME; } - break; + data->last_focus_event_time = SDL_GetTicks(); + } break; /* Losing input focus? */ - case FocusOut:{ - if (xevent->xfocus.mode == NotifyGrab || xevent->xfocus.mode == NotifyUngrab) { - /* Someone is handling a global hotkey, ignore it */ + case FocusOut: + { + if (xevent->xfocus.mode == NotifyGrab || xevent->xfocus.mode == NotifyUngrab) { + /* Someone is handling a global hotkey, ignore it */ #ifdef DEBUG_XEVENTS - printf("window %p: FocusOut (NotifyGrab/NotifyUngrab, ignoring)\n", data); + printf("window %p: FocusOut (NotifyGrab/NotifyUngrab, ignoring)\n", data); #endif - break; - } - if (xevent->xfocus.detail == NotifyInferior || xevent->xfocus.detail == NotifyPointer) { - /* We still have focus if a child gets focus. We also don't - care about the position of the pointer when the keyboard - focus changed. */ + break; + } + if (xevent->xfocus.detail == NotifyInferior || xevent->xfocus.detail == NotifyPointer) { + /* We still have focus if a child gets focus. We also don't + care about the position of the pointer when the keyboard + focus changed. */ #ifdef DEBUG_XEVENTS - printf("window %p: FocusOut (NotifyInferior/NotifyPointer, ignoring)\n", data); + printf("window %p: FocusOut (NotifyInferior/NotifyPointer, ignoring)\n", data); #endif - break; - } + break; + } #ifdef DEBUG_XEVENTS - printf("window %p: FocusOut!\n", data); + printf("window %p: FocusOut!\n", data); #endif - if (!videodata->last_mode_change_deadline) /* no recent mode changes */ - { - data->pending_focus = PENDING_FOCUS_NONE; - data->pending_focus_time = 0; - X11_DispatchFocusOut(_this, data); - } - else - { - data->pending_focus = PENDING_FOCUS_OUT; - data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_TIME; - } + if (!videodata->last_mode_change_deadline) /* no recent mode changes */ { + data->pending_focus = PENDING_FOCUS_NONE; + data->pending_focus_time = 0; + X11_DispatchFocusOut(_this, data); + } else { + data->pending_focus = PENDING_FOCUS_OUT; + data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_TIME; + } #if SDL_VIDEO_DRIVER_X11_XFIXES - /* Disable confinement if it is activated. */ - if (data->pointer_barrier_active == SDL_TRUE) { - X11_ConfineCursorWithFlags(_this, data->window, NULL, X11_BARRIER_HANDLED_BY_EVENT); - } -#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + /* Disable confinement if it is activated. */ + if (data->pointer_barrier_active == SDL_TRUE) { + X11_ConfineCursorWithFlags(_this, data->window, NULL, X11_BARRIER_HANDLED_BY_EVENT); } - break; +#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + } break; /* Key press/release? */ case KeyPress: - case KeyRelease: { - KeyCode keycode = xevent->xkey.keycode; - KeySym keysym = NoSymbol; - char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; - Status status = 0; - SDL_bool handled_by_ime = SDL_FALSE; + case KeyRelease: + { + KeyCode keycode = xevent->xkey.keycode; + KeySym keysym = NoSymbol; + char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; + Status status = 0; + SDL_bool handled_by_ime = SDL_FALSE; #ifdef DEBUG_XEVENTS - printf("window %p: %s (X11 keycode = 0x%X)\n", data, (xevent->type == KeyPress ? "KeyPress" : "KeyRelease"), xevent->xkey.keycode); + printf("window %p: %s (X11 keycode = 0x%X)\n", data, (xevent->type == KeyPress ? "KeyPress" : "KeyRelease"), xevent->xkey.keycode); #endif #ifdef DEBUG_SCANCODES - if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN && keycode) { - int min_keycode, max_keycode; - X11_XDisplayKeycodes(display, &min_keycode, &max_keycode); - keysym = X11_KeyCodeToSym(_this, keycode, xevent->xkey.state >> 13); - SDL_Log("The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list X11 KeyCode %d (%d), X11 KeySym 0x%lX (%s).\n", - keycode, keycode - min_keycode, keysym, - X11_XKeysymToString(keysym)); - } + if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN && keycode) { + int min_keycode, max_keycode; + X11_XDisplayKeycodes(display, &min_keycode, &max_keycode); + keysym = X11_KeyCodeToSym(_this, keycode, xevent->xkey.state >> 13); + SDL_Log("The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list X11 KeyCode %d (%d), X11 KeySym 0x%lX (%s).\n", + keycode, keycode - min_keycode, keysym, + X11_XKeysymToString(keysym)); + } #endif /* DEBUG SCANCODES */ - SDL_zeroa(text); + SDL_zeroa(text); #ifdef X_HAVE_UTF8_STRING - if (data->ic && xevent->type == KeyPress) { - X11_Xutf8LookupString(data->ic, &xevent->xkey, text, sizeof(text), + if (data->ic && xevent->type == KeyPress) { + X11_Xutf8LookupString(data->ic, &xevent->xkey, text, sizeof(text), &keysym, &status); - } else { - XLookupStringAsUTF8(&xevent->xkey, text, sizeof(text), &keysym, NULL); - } -#else + } else { XLookupStringAsUTF8(&xevent->xkey, text, sizeof(text), &keysym, NULL); + } +#else + XLookupStringAsUTF8(&xevent->xkey, text, sizeof(text), &keysym, NULL); #endif #ifdef SDL_USE_IME - if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){ - handled_by_ime = SDL_IME_ProcessKeyEvent(keysym, keycode, (xevent->type == KeyPress ? SDL_PRESSED : SDL_RELEASED)); - } + if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) { + handled_by_ime = SDL_IME_ProcessKeyEvent(keysym, keycode, (xevent->type == KeyPress ? SDL_PRESSED : SDL_RELEASED)); + } #endif - if (!handled_by_ime) { - if (xevent->type == KeyPress) { - /* Don't send the key if it looks like a duplicate of a filtered key sent by an IME */ - if (xevent->xkey.keycode != videodata->filter_code || xevent->xkey.time != videodata->filter_time) { - SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); - } - if (*text) { - SDL_SendKeyboardText(text); - } - } else { - if (X11_KeyRepeat(display, xevent)) { - /* We're about to get a repeated key down, ignore the key up */ - break; - } - SDL_SendKeyboardKey(SDL_RELEASED, videodata->key_layout[keycode]); + if (!handled_by_ime) { + if (xevent->type == KeyPress) { + /* Don't send the key if it looks like a duplicate of a filtered key sent by an IME */ + if (xevent->xkey.keycode != videodata->filter_code || xevent->xkey.time != videodata->filter_time) { + SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); + } + if (*text) { + SDL_SendKeyboardText(text); } + } else { + if (X11_KeyRepeat(display, xevent)) { + /* We're about to get a repeated key down, ignore the key up */ + break; + } + SDL_SendKeyboardKey(SDL_RELEASED, videodata->key_layout[keycode]); } + } - if (xevent->type == KeyPress) { - X11_UpdateUserTime(data, xevent->xkey.time); - } + if (xevent->type == KeyPress) { + X11_UpdateUserTime(data, xevent->xkey.time); } - break; + } break; /* Have we been iconified? */ - case UnmapNotify:{ - XEvent ev; + case UnmapNotify: + { + XEvent ev; #ifdef DEBUG_XEVENTS - printf("window %p: UnmapNotify!\n", data); + printf("window %p: UnmapNotify!\n", data); #endif - if (X11_XCheckIfEvent(display, &ev, &isReparentNotify, (XPointer)&xevent->xunmap)) { - X11_XCheckIfEvent(display, &ev, &isMapNotify, (XPointer)&xevent->xunmap); - } else { - X11_DispatchUnmapNotify(data); - } + if (X11_XCheckIfEvent(display, &ev, &isReparentNotify, (XPointer)&xevent->xunmap)) { + X11_XCheckIfEvent(display, &ev, &isMapNotify, (XPointer)&xevent->xunmap); + } else { + X11_DispatchUnmapNotify(data); + } #if SDL_VIDEO_DRIVER_X11_XFIXES - /* Disable confinement if the window gets hidden. */ - if (data->pointer_barrier_active == SDL_TRUE) { - X11_ConfineCursorWithFlags(_this, data->window, NULL, X11_BARRIER_HANDLED_BY_EVENT); - } -#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + /* Disable confinement if the window gets hidden. */ + if (data->pointer_barrier_active == SDL_TRUE) { + X11_ConfineCursorWithFlags(_this, data->window, NULL, X11_BARRIER_HANDLED_BY_EVENT); } - break; +#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + } break; /* Have we been restored? */ - case MapNotify:{ + case MapNotify: + { #ifdef DEBUG_XEVENTS - printf("window %p: MapNotify!\n", data); + printf("window %p: MapNotify!\n", data); #endif - X11_DispatchMapNotify(data); + X11_DispatchMapNotify(data); #if SDL_VIDEO_DRIVER_X11_XFIXES - /* Enable confinement if it was activated. */ - if (data->pointer_barrier_active == SDL_TRUE) { - X11_ConfineCursorWithFlags(_this, data->window, &data->barrier_rect, X11_BARRIER_HANDLED_BY_EVENT); - } -#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + /* Enable confinement if it was activated. */ + if (data->pointer_barrier_active == SDL_TRUE) { + X11_ConfineCursorWithFlags(_this, data->window, &data->barrier_rect, X11_BARRIER_HANDLED_BY_EVENT); } - break; +#endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ + } break; /* Have we been resized or moved? */ - case ConfigureNotify:{ + case ConfigureNotify: + { #ifdef DEBUG_XEVENTS - printf("window %p: ConfigureNotify! (position: %d,%d, size: %dx%d)\n", data, - xevent->xconfigure.x, xevent->xconfigure.y, - xevent->xconfigure.width, xevent->xconfigure.height); + printf("window %p: ConfigureNotify! (position: %d,%d, size: %dx%d)\n", data, + xevent->xconfigure.x, xevent->xconfigure.y, + xevent->xconfigure.width, xevent->xconfigure.height); #endif - /* Real configure notify events are relative to the parent, synthetic events are absolute. */ - if (!xevent->xconfigure.send_event) { - unsigned int NumChildren; - Window ChildReturn, Root, Parent; - Window * Children; - /* Translate these coodinates back to relative to root */ - X11_XQueryTree(data->videodata->display, xevent->xconfigure.window, &Root, &Parent, &Children, &NumChildren); - X11_XTranslateCoordinates(xevent->xconfigure.display, - Parent, DefaultRootWindow(xevent->xconfigure.display), - xevent->xconfigure.x, xevent->xconfigure.y, - &xevent->xconfigure.x, &xevent->xconfigure.y, - &ChildReturn); - } + /* Real configure notify events are relative to the parent, synthetic events are absolute. */ + if (!xevent->xconfigure.send_event) { + unsigned int NumChildren; + Window ChildReturn, Root, Parent; + Window *Children; + /* Translate these coodinates back to relative to root */ + X11_XQueryTree(data->videodata->display, xevent->xconfigure.window, &Root, &Parent, &Children, &NumChildren); + X11_XTranslateCoordinates(xevent->xconfigure.display, + Parent, DefaultRootWindow(xevent->xconfigure.display), + xevent->xconfigure.x, xevent->xconfigure.y, + &xevent->xconfigure.x, &xevent->xconfigure.y, + &ChildReturn); + } - if (xevent->xconfigure.x != data->last_xconfigure.x || - xevent->xconfigure.y != data->last_xconfigure.y) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, - xevent->xconfigure.x, xevent->xconfigure.y); + if (xevent->xconfigure.x != data->last_xconfigure.x || + xevent->xconfigure.y != data->last_xconfigure.y) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, + xevent->xconfigure.x, xevent->xconfigure.y); #ifdef SDL_USE_IME - if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){ - /* Update IME candidate list position */ - SDL_IME_UpdateTextRect(NULL); - } -#endif - } - if (xevent->xconfigure.width != data->last_xconfigure.width || - xevent->xconfigure.height != data->last_xconfigure.height) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, - xevent->xconfigure.width, - xevent->xconfigure.height); + if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) { + /* Update IME candidate list position */ + SDL_IME_UpdateTextRect(NULL); } - data->last_xconfigure = xevent->xconfigure; +#endif } - break; + if (xevent->xconfigure.width != data->last_xconfigure.width || + xevent->xconfigure.height != data->last_xconfigure.height) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, + xevent->xconfigure.width, + xevent->xconfigure.height); + } + data->last_xconfigure = xevent->xconfigure; + } break; /* Have we been requested to quit (or another client message?) */ - case ClientMessage:{ + case ClientMessage: + { - static int xdnd_version=0; + static int xdnd_version = 0; - if (xevent->xclient.message_type == videodata->XdndEnter) { + if (xevent->xclient.message_type == videodata->XdndEnter) { - SDL_bool use_list = xevent->xclient.data.l[1] & 1; - data->xdnd_source = xevent->xclient.data.l[0]; - xdnd_version = (xevent->xclient.data.l[1] >> 24); + SDL_bool use_list = xevent->xclient.data.l[1] & 1; + data->xdnd_source = xevent->xclient.data.l[0]; + xdnd_version = (xevent->xclient.data.l[1] >> 24); #ifdef DEBUG_XEVENTS - printf("XID of source window : %ld\n", data->xdnd_source); - printf("Protocol version to use : %d\n", xdnd_version); - printf("More then 3 data types : %d\n", (int) use_list); + printf("XID of source window : %ld\n", data->xdnd_source); + printf("Protocol version to use : %d\n", xdnd_version); + printf("More then 3 data types : %d\n", (int)use_list); #endif - if (use_list) { - /* fetch conversion targets */ - SDL_x11Prop p; - X11_ReadProperty(&p, display, data->xdnd_source, videodata->XdndTypeList); - /* pick one */ - data->xdnd_req = X11_PickTarget(display, (Atom*)p.data, p.count); - X11_XFree(p.data); - } else { - /* pick from list of three */ - data->xdnd_req = X11_PickTargetFromAtoms(display, xevent->xclient.data.l[2], xevent->xclient.data.l[3], xevent->xclient.data.l[4]); - } + if (use_list) { + /* fetch conversion targets */ + SDL_x11Prop p; + X11_ReadProperty(&p, display, data->xdnd_source, videodata->XdndTypeList); + /* pick one */ + data->xdnd_req = X11_PickTarget(display, (Atom *)p.data, p.count); + X11_XFree(p.data); + } else { + /* pick from list of three */ + data->xdnd_req = X11_PickTargetFromAtoms(display, xevent->xclient.data.l[2], xevent->xclient.data.l[3], xevent->xclient.data.l[4]); } - else if (xevent->xclient.message_type == videodata->XdndPosition) { + } else if (xevent->xclient.message_type == videodata->XdndPosition) { #ifdef DEBUG_XEVENTS - Atom act= videodata->XdndActionCopy; - if(xdnd_version >= 2) { - act = xevent->xclient.data.l[4]; - } - printf("Action requested by user is : %s\n", X11_XGetAtomName(display , act)); + Atom act = videodata->XdndActionCopy; + if (xdnd_version >= 2) { + act = xevent->xclient.data.l[4]; + } + printf("Action requested by user is : %s\n", X11_XGetAtomName(display, act)); #endif - - /* reply with status */ + /* reply with status */ + SDL_memset(&m, 0, sizeof(XClientMessageEvent)); + m.type = ClientMessage; + m.display = xevent->xclient.display; + m.window = xevent->xclient.data.l[0]; + m.message_type = videodata->XdndStatus; + m.format = 32; + m.data.l[0] = data->xwindow; + m.data.l[1] = (data->xdnd_req != None); + m.data.l[2] = 0; /* specify an empty rectangle */ + m.data.l[3] = 0; + m.data.l[4] = videodata->XdndActionCopy; /* we only accept copying anyway */ + + X11_XSendEvent(display, xevent->xclient.data.l[0], False, NoEventMask, (XEvent *)&m); + X11_XFlush(display); + } else if (xevent->xclient.message_type == videodata->XdndDrop) { + if (data->xdnd_req == None) { + /* say again - not interested! */ SDL_memset(&m, 0, sizeof(XClientMessageEvent)); m.type = ClientMessage; m.display = xevent->xclient.display; m.window = xevent->xclient.data.l[0]; - m.message_type = videodata->XdndStatus; - m.format=32; + m.message_type = videodata->XdndFinished; + m.format = 32; m.data.l[0] = data->xwindow; - m.data.l[1] = (data->xdnd_req != None); - m.data.l[2] = 0; /* specify an empty rectangle */ - m.data.l[3] = 0; - m.data.l[4] = videodata->XdndActionCopy; /* we only accept copying anyway */ - - X11_XSendEvent(display, xevent->xclient.data.l[0], False, NoEventMask, (XEvent*)&m); - X11_XFlush(display); - } - else if(xevent->xclient.message_type == videodata->XdndDrop) { - if (data->xdnd_req == None) { - /* say again - not interested! */ - SDL_memset(&m, 0, sizeof(XClientMessageEvent)); - m.type = ClientMessage; - m.display = xevent->xclient.display; - m.window = xevent->xclient.data.l[0]; - m.message_type = videodata->XdndFinished; - m.format=32; - m.data.l[0] = data->xwindow; - m.data.l[1] = 0; - m.data.l[2] = None; /* fail! */ - X11_XSendEvent(display, xevent->xclient.data.l[0], False, NoEventMask, (XEvent*)&m); + m.data.l[1] = 0; + m.data.l[2] = None; /* fail! */ + X11_XSendEvent(display, xevent->xclient.data.l[0], False, NoEventMask, (XEvent *)&m); + } else { + /* convert */ + if (xdnd_version >= 1) { + X11_XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, xevent->xclient.data.l[2]); } else { - /* convert */ - if(xdnd_version >= 1) { - X11_XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, xevent->xclient.data.l[2]); - } else { - X11_XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, CurrentTime); - } + X11_XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, CurrentTime); } } - else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && - (xevent->xclient.format == 32) && - (xevent->xclient.data.l[0] == videodata->_NET_WM_PING)) { - Window root = DefaultRootWindow(display); + } else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && + (xevent->xclient.format == 32) && + (xevent->xclient.data.l[0] == videodata->_NET_WM_PING)) { + Window root = DefaultRootWindow(display); #ifdef DEBUG_XEVENTS - printf("window %p: _NET_WM_PING\n", data); + printf("window %p: _NET_WM_PING\n", data); #endif - xevent->xclient.window = root; - X11_XSendEvent(display, root, False, SubstructureRedirectMask | SubstructureNotifyMask, xevent); - break; - } + xevent->xclient.window = root; + X11_XSendEvent(display, root, False, SubstructureRedirectMask | SubstructureNotifyMask, xevent); + break; + } - else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && - (xevent->xclient.format == 32) && - (xevent->xclient.data.l[0] == videodata->WM_DELETE_WINDOW)) { + else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && + (xevent->xclient.format == 32) && + (xevent->xclient.data.l[0] == videodata->WM_DELETE_WINDOW)) { #ifdef DEBUG_XEVENTS - printf("window %p: WM_DELETE_WINDOW\n", data); + printf("window %p: WM_DELETE_WINDOW\n", data); #endif - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); - break; - } - else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && - (xevent->xclient.format == 32) && - (xevent->xclient.data.l[0] == videodata->WM_TAKE_FOCUS)) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); + break; + } else if ((xevent->xclient.message_type == videodata->WM_PROTOCOLS) && + (xevent->xclient.format == 32) && + (xevent->xclient.data.l[0] == videodata->WM_TAKE_FOCUS)) { #ifdef DEBUG_XEVENTS - printf("window %p: WM_TAKE_FOCUS\n", data); + printf("window %p: WM_TAKE_FOCUS\n", data); #endif - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_TAKE_FOCUS, 0, 0); - break; - } + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_TAKE_FOCUS, 0, 0); + break; } - break; + } break; /* Do we need to refresh ourselves? */ - case Expose:{ + case Expose: + { #ifdef DEBUG_XEVENTS - printf("window %p: Expose (count = %d)\n", data, xevent->xexpose.count); + printf("window %p: Expose (count = %d)\n", data, xevent->xexpose.count); #endif - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0); - } - break; + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0); + } break; - case MotionNotify:{ - SDL_Mouse *mouse = SDL_GetMouse(); - if(!mouse->relative_mode || mouse->relative_mode_warp) { + case MotionNotify: + { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!mouse->relative_mode || mouse->relative_mode_warp) { #ifdef DEBUG_MOTION - printf("window %p: X11 motion: %d,%d\n", data, xevent->xmotion.x, xevent->xmotion.y); + printf("window %p: X11 motion: %d,%d\n", data, xevent->xmotion.x, xevent->xmotion.y); #endif - SDL_SendMouseMotion(data->window, 0, 0, xevent->xmotion.x, xevent->xmotion.y); - } + SDL_SendMouseMotion(data->window, 0, 0, xevent->xmotion.x, xevent->xmotion.y); } - break; + } break; - case ButtonPress:{ - int xticks = 0, yticks = 0; + case ButtonPress: + { + int xticks = 0, yticks = 0; #ifdef DEBUG_XEVENTS - printf("window %p: ButtonPress (X11 button = %d)\n", data, xevent->xbutton.button); + printf("window %p: ButtonPress (X11 button = %d)\n", data, xevent->xbutton.button); #endif - if (X11_IsWheelEvent(display,xevent,&xticks, &yticks)) { - SDL_SendMouseWheel(data->window, 0, (float) -xticks, (float) yticks, SDL_MOUSEWHEEL_NORMAL); - } else { - SDL_bool ignore_click = SDL_FALSE; - int button = xevent->xbutton.button; - if(button == Button1) { - if (ProcessHitTest(_this, data, xevent)) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0); - break; /* don't pass this event on to app. */ - } - } - else if(button > 7) { - /* X button values 4-7 are used for scrolling, so X1 is 8, X2 is 9, ... - => subtract (8-SDL_BUTTON_X1) to get value SDL expects */ - button -= (8-SDL_BUTTON_X1); - } - if (data->last_focus_event_time) { - const int X11_FOCUS_CLICK_TIMEOUT = 10; - if (!SDL_TICKS_PASSED(SDL_GetTicks(), data->last_focus_event_time + X11_FOCUS_CLICK_TIMEOUT)) { - ignore_click = !SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, SDL_FALSE); - } - data->last_focus_event_time = 0; + if (X11_IsWheelEvent(display, xevent, &xticks, &yticks)) { + SDL_SendMouseWheel(data->window, 0, (float)-xticks, (float)yticks, SDL_MOUSEWHEEL_NORMAL); + } else { + SDL_bool ignore_click = SDL_FALSE; + int button = xevent->xbutton.button; + if (button == Button1) { + if (ProcessHitTest(_this, data, xevent)) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0); + break; /* don't pass this event on to app. */ } - if (!ignore_click) { - SDL_SendMouseButton(data->window, 0, SDL_PRESSED, button); + } else if (button > 7) { + /* X button values 4-7 are used for scrolling, so X1 is 8, X2 is 9, ... + => subtract (8-SDL_BUTTON_X1) to get value SDL expects */ + button -= (8 - SDL_BUTTON_X1); + } + if (data->last_focus_event_time) { + const int X11_FOCUS_CLICK_TIMEOUT = 10; + if (!SDL_TICKS_PASSED(SDL_GetTicks(), data->last_focus_event_time + X11_FOCUS_CLICK_TIMEOUT)) { + ignore_click = !SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, SDL_FALSE); } + data->last_focus_event_time = 0; + } + if (!ignore_click) { + SDL_SendMouseButton(data->window, 0, SDL_PRESSED, button); } - X11_UpdateUserTime(data, xevent->xbutton.time); } - break; - - case ButtonRelease:{ - int button = xevent->xbutton.button; - /* The X server sends a Release event for each Press for wheels. Ignore them. */ - int xticks = 0, yticks = 0; + X11_UpdateUserTime(data, xevent->xbutton.time); + } break; + + case ButtonRelease: + { + int button = xevent->xbutton.button; + /* The X server sends a Release event for each Press for wheels. Ignore them. */ + int xticks = 0, yticks = 0; #ifdef DEBUG_XEVENTS - printf("window %p: ButtonRelease (X11 button = %d)\n", data, xevent->xbutton.button); + printf("window %p: ButtonRelease (X11 button = %d)\n", data, xevent->xbutton.button); #endif - if (!X11_IsWheelEvent(display, xevent, &xticks, &yticks)) { - if (button > 7) { - /* see explanation at case ButtonPress */ - button -= (8-SDL_BUTTON_X1); - } - SDL_SendMouseButton(data->window, 0, SDL_RELEASED, button); + if (!X11_IsWheelEvent(display, xevent, &xticks, &yticks)) { + if (button > 7) { + /* see explanation at case ButtonPress */ + button -= (8 - SDL_BUTTON_X1); } + SDL_SendMouseButton(data->window, 0, SDL_RELEASED, button); } - break; + } break; - case PropertyNotify:{ + case PropertyNotify: + { #ifdef DEBUG_XEVENTS - unsigned char *propdata; - int status, real_format; - Atom real_type; - unsigned long items_read, items_left; - - char *name = X11_XGetAtomName(display, xevent->xproperty.atom); - if (name) { - printf("window %p: PropertyNotify: %s %s time=%lu\n", data, name, (xevent->xproperty.state == PropertyDelete) ? "deleted" : "changed", xevent->xproperty.time); - X11_XFree(name); - } + unsigned char *propdata; + int status, real_format; + Atom real_type; + unsigned long items_read, items_left; + + char *name = X11_XGetAtomName(display, xevent->xproperty.atom); + if (name) { + printf("window %p: PropertyNotify: %s %s time=%lu\n", data, name, (xevent->xproperty.state == PropertyDelete) ? "deleted" : "changed", xevent->xproperty.time); + X11_XFree(name); + } - status = X11_XGetWindowProperty(display, data->xwindow, xevent->xproperty.atom, 0L, 8192L, False, AnyPropertyType, &real_type, &real_format, &items_read, &items_left, &propdata); - if (status == Success && items_read > 0) { - if (real_type == XA_INTEGER) { - int *values = (int *)propdata; + status = X11_XGetWindowProperty(display, data->xwindow, xevent->xproperty.atom, 0L, 8192L, False, AnyPropertyType, &real_type, &real_format, &items_read, &items_left, &propdata); + if (status == Success && items_read > 0) { + if (real_type == XA_INTEGER) { + int *values = (int *)propdata; + + printf("{"); + for (i = 0; i < items_read; i++) { + printf(" %d", values[i]); + } + printf(" }\n"); + } else if (real_type == XA_CARDINAL) { + if (real_format == 32) { + Uint32 *values = (Uint32 *)propdata; printf("{"); for (i = 0; i < items_read; i++) { printf(" %d", values[i]); } printf(" }\n"); - } else if (real_type == XA_CARDINAL) { - if (real_format == 32) { - Uint32 *values = (Uint32 *)propdata; - - printf("{"); - for (i = 0; i < items_read; i++) { - printf(" %d", values[i]); - } - printf(" }\n"); - } else if (real_format == 16) { - Uint16 *values = (Uint16 *)propdata; + } else if (real_format == 16) { + Uint16 *values = (Uint16 *)propdata; - printf("{"); - for (i = 0; i < items_read; i++) { - printf(" %d", values[i]); - } - printf(" }\n"); - } else if (real_format == 8) { - Uint8 *values = (Uint8 *)propdata; - - printf("{"); - for (i = 0; i < items_read; i++) { - printf(" %d", values[i]); - } - printf(" }\n"); + printf("{"); + for (i = 0; i < items_read; i++) { + printf(" %d", values[i]); } - } else if (real_type == XA_STRING || - real_type == videodata->UTF8_STRING) { - printf("{ \"%s\" }\n", propdata); - } else if (real_type == XA_ATOM) { - Atom *atoms = (Atom *)propdata; + printf(" }\n"); + } else if (real_format == 8) { + Uint8 *values = (Uint8 *)propdata; printf("{"); for (i = 0; i < items_read; i++) { - char *atomname = X11_XGetAtomName(display, atoms[i]); - if (atomname) { - printf(" %s", atomname); - X11_XFree(atomname); - } + printf(" %d", values[i]); } printf(" }\n"); - } else { - char *atomname = X11_XGetAtomName(display, real_type); - printf("Unknown type: %ld (%s)\n", real_type, atomname ? atomname : "UNKNOWN"); + } + } else if (real_type == XA_STRING || + real_type == videodata->UTF8_STRING) { + printf("{ \"%s\" }\n", propdata); + } else if (real_type == XA_ATOM) { + Atom *atoms = (Atom *)propdata; + + printf("{"); + for (i = 0; i < items_read; i++) { + char *atomname = X11_XGetAtomName(display, atoms[i]); if (atomname) { + printf(" %s", atomname); X11_XFree(atomname); } } + printf(" }\n"); + } else { + char *atomname = X11_XGetAtomName(display, real_type); + printf("Unknown type: %ld (%s)\n", real_type, atomname ? atomname : "UNKNOWN"); + if (atomname) { + X11_XFree(atomname); + } } - if (status == Success) { - X11_XFree(propdata); - } + } + if (status == Success) { + X11_XFree(propdata); + } #endif /* DEBUG_XEVENTS */ - /* Take advantage of this moment to make sure user_time has a - valid timestamp from the X server, so if we later try to - raise/restore this window, _NET_ACTIVE_WINDOW can have a - non-zero timestamp, even if there's never been a mouse or - key press to this window so far. Note that we don't try to - set _NET_WM_USER_TIME here, though. That's only for legit - user interaction with the window. */ - if (!data->user_time) { - data->user_time = xevent->xproperty.time; - } - - if (xevent->xproperty.atom == data->videodata->_NET_WM_STATE) { - /* Get the new state from the window manager. - Compositing window managers can alter visibility of windows - without ever mapping / unmapping them, so we handle that here, - because they use the NETWM protocol to notify us of changes. - */ - const Uint32 flags = X11_GetNetWMState(_this, data->window, xevent->xproperty.window); - const Uint32 changed = flags ^ data->window->flags; - - if ((changed & SDL_WINDOW_HIDDEN) || (changed & SDL_WINDOW_FULLSCREEN)) { - if (flags & SDL_WINDOW_HIDDEN) { - X11_DispatchUnmapNotify(data); - } else { - X11_DispatchMapNotify(data); - } - } + /* Take advantage of this moment to make sure user_time has a + valid timestamp from the X server, so if we later try to + raise/restore this window, _NET_ACTIVE_WINDOW can have a + non-zero timestamp, even if there's never been a mouse or + key press to this window so far. Note that we don't try to + set _NET_WM_USER_TIME here, though. That's only for legit + user interaction with the window. */ + if (!data->user_time) { + data->user_time = xevent->xproperty.time; + } - if (changed & SDL_WINDOW_MAXIMIZED) { - if (flags & SDL_WINDOW_MAXIMIZED) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0); - } else { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); - } + if (xevent->xproperty.atom == data->videodata->_NET_WM_STATE) { + /* Get the new state from the window manager. + Compositing window managers can alter visibility of windows + without ever mapping / unmapping them, so we handle that here, + because they use the NETWM protocol to notify us of changes. + */ + const Uint32 flags = X11_GetNetWMState(_this, data->window, xevent->xproperty.window); + const Uint32 changed = flags ^ data->window->flags; + + if ((changed & SDL_WINDOW_HIDDEN) || (changed & SDL_WINDOW_FULLSCREEN)) { + if (flags & SDL_WINDOW_HIDDEN) { + X11_DispatchUnmapNotify(data); + } else { + X11_DispatchMapNotify(data); } - } else if (xevent->xproperty.atom == videodata->XKLAVIER_STATE) { - /* Hack for Ubuntu 12.04 (etc) that doesn't send MappingNotify - events when the keyboard layout changes (for example, - changing from English to French on the menubar's keyboard - icon). Since it changes the XKLAVIER_STATE property, we - notice and reinit our keymap here. This might not be the - right approach, but it seems to work. */ - X11_UpdateKeymap(_this, SDL_TRUE); - } else if (xevent->xproperty.atom == videodata->_NET_FRAME_EXTENTS) { - Atom type; - int format; - unsigned long nitems, bytes_after; - unsigned char *property; - if (X11_XGetWindowProperty(display, data->xwindow, videodata->_NET_FRAME_EXTENTS, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property) == Success) { - if (type != None && nitems == 4) { - data->border_left = (int) ((long*)property)[0]; - data->border_right = (int) ((long*)property)[1]; - data->border_top = (int) ((long*)property)[2]; - data->border_bottom = (int) ((long*)property)[3]; - } - X11_XFree(property); + } - #ifdef DEBUG_XEVENTS - printf("New _NET_FRAME_EXTENTS: left=%d right=%d, top=%d, bottom=%d\n", data->border_left, data->border_right, data->border_top, data->border_bottom); - #endif + if (changed & SDL_WINDOW_MAXIMIZED) { + if (flags & SDL_WINDOW_MAXIMIZED) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0); + } else { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); } } + } else if (xevent->xproperty.atom == videodata->XKLAVIER_STATE) { + /* Hack for Ubuntu 12.04 (etc) that doesn't send MappingNotify + events when the keyboard layout changes (for example, + changing from English to French on the menubar's keyboard + icon). Since it changes the XKLAVIER_STATE property, we + notice and reinit our keymap here. This might not be the + right approach, but it seems to work. */ + X11_UpdateKeymap(_this, SDL_TRUE); + } else if (xevent->xproperty.atom == videodata->_NET_FRAME_EXTENTS) { + X11_GetBorderValues(data); } - break; + } break; - case SelectionNotify: { - Atom target = xevent->xselection.target; + case SelectionNotify: + { + Atom target = xevent->xselection.target; #ifdef DEBUG_XEVENTS - printf("window %p: SelectionNotify (requestor = %ld, target = %ld)\n", data, - xevent->xselection.requestor, xevent->xselection.target); + printf("window %p: SelectionNotify (requestor = %ld, target = %ld)\n", data, + xevent->xselection.requestor, xevent->xselection.target); #endif - if (target == data->xdnd_req) { - /* read data */ - SDL_x11Prop p; - X11_ReadProperty(&p, display, data->xwindow, videodata->PRIMARY); - - if (p.format == 8) { - char *saveptr = NULL; - char *name = X11_XGetAtomName(display, target); - if (name) { - char *token = SDL_strtokr((char *) p.data, "\r\n", &saveptr); - while (token != NULL) { - if (SDL_strcmp("text/plain", name) == 0) { - SDL_SendDropText(data->window, token); - } else if (SDL_strcmp("text/uri-list", name) == 0) { - char *fn = X11_URIToLocal(token); - if (fn) { - SDL_SendDropFile(data->window, fn); - } + if (target == data->xdnd_req) { + /* read data */ + SDL_x11Prop p; + X11_ReadProperty(&p, display, data->xwindow, videodata->PRIMARY); + + if (p.format == 8) { + char *saveptr = NULL; + char *name = X11_XGetAtomName(display, target); + if (name) { + char *token = SDL_strtokr((char *)p.data, "\r\n", &saveptr); + while (token != NULL) { + if (SDL_strcmp("text/plain", name) == 0) { + SDL_SendDropText(data->window, token); + } else if (SDL_strcmp("text/uri-list", name) == 0) { + char *fn = X11_URIToLocal(token); + if (fn) { + SDL_SendDropFile(data->window, fn); } - token = SDL_strtokr(NULL, "\r\n", &saveptr); } - X11_XFree(name); + token = SDL_strtokr(NULL, "\r\n", &saveptr); } - SDL_SendDropComplete(data->window); + X11_XFree(name); } - X11_XFree(p.data); - - /* send reply */ - SDL_memset(&m, 0, sizeof(XClientMessageEvent)); - m.type = ClientMessage; - m.display = display; - m.window = data->xdnd_source; - m.message_type = videodata->XdndFinished; - m.format = 32; - m.data.l[0] = data->xwindow; - m.data.l[1] = 1; - m.data.l[2] = videodata->XdndActionCopy; - X11_XSendEvent(display, data->xdnd_source, False, NoEventMask, (XEvent*)&m); - - X11_XSync(display, False); + SDL_SendDropComplete(data->window); } + X11_XFree(p.data); + + /* send reply */ + SDL_memset(&m, 0, sizeof(XClientMessageEvent)); + m.type = ClientMessage; + m.display = display; + m.window = data->xdnd_source; + m.message_type = videodata->XdndFinished; + m.format = 32; + m.data.l[0] = data->xwindow; + m.data.l[1] = 1; + m.data.l[2] = videodata->XdndActionCopy; + X11_XSendEvent(display, data->xdnd_source, False, NoEventMask, (XEvent *)&m); + + X11_XSync(display, False); } - break; + } break; - default:{ + default: + { #ifdef DEBUG_XEVENTS - printf("window %p: Unhandled event %d\n", data, xevent->type); + printf("window %p: Unhandled event %d\n", data, xevent->type); #endif - } - break; + } break; } } -static void -X11_HandleFocusChanges(_THIS) +static void X11_HandleFocusChanges(_THIS) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; int i; if (videodata && videodata->windowlist) { @@ -1591,14 +1614,12 @@ X11_HandleFocusChanges(_THIS) } } -static Bool -isAnyEvent(Display *display, XEvent *ev, XPointer arg) +static Bool isAnyEvent(Display *display, XEvent *ev, XPointer arg) { return True; } -static SDL_bool -X11_PollEvent(Display *display, XEvent *event) +static SDL_bool X11_PollEvent(Display *display, XEvent *event) { if (!X11_XCheckIfEvent(display, event, isAnyEvent, NULL)) { return SDL_FALSE; @@ -1607,12 +1628,11 @@ X11_PollEvent(Display *display, XEvent *event) return SDL_TRUE; } -void -X11_SendWakeupEvent(_THIS, SDL_Window *window) +void X11_SendWakeupEvent(_THIS, SDL_Window *window) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *req_display = data->request_display; - Window xwindow = ((SDL_WindowData *) window->driverdata)->xwindow; + Window xwindow = ((SDL_WindowData *)window->driverdata)->xwindow; XClientMessageEvent event; SDL_memset(&event, 0, sizeof(XClientMessageEvent)); @@ -1622,16 +1642,15 @@ X11_SendWakeupEvent(_THIS, SDL_Window *window) event.message_type = data->_SDL_WAKEUP; event.format = 8; - X11_XSendEvent(req_display, xwindow, False, NoEventMask, (XEvent *) &event); + X11_XSendEvent(req_display, xwindow, False, NoEventMask, (XEvent *)&event); /* XSendEvent returns a status and it could be BadValue or BadWindow. If an error happens it is an SDL's internal error and there is nothing we can do here. */ X11_XFlush(req_display); } -int -X11_WaitEventTimeout(_THIS, int timeout) +int X11_WaitEventTimeout(_THIS, int timeout) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display; XEvent xevent; display = videodata->display; @@ -1672,23 +1691,22 @@ X11_WaitEventTimeout(_THIS, int timeout) X11_DispatchEvent(_this, &xevent); #ifdef SDL_USE_IME - if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){ + if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) { SDL_IME_PumpEvents(); } #endif return 1; } -void -X11_PumpEvents(_THIS) +void X11_PumpEvents(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; XEvent xevent; int i; if (data->last_mode_change_deadline) { if (SDL_TICKS_PASSED(SDL_GetTicks(), data->last_mode_change_deadline)) { - data->last_mode_change_deadline = 0; /* assume we're done. */ + data->last_mode_change_deadline = 0; /* assume we're done. */ } } @@ -1715,7 +1733,7 @@ X11_PumpEvents(_THIS) } #ifdef SDL_USE_IME - if(SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE){ + if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) { SDL_IME_PumpEvents(); } #endif @@ -1733,12 +1751,10 @@ X11_PumpEvents(_THIS) } } - -void -X11_SuspendScreenSaver(_THIS) +void X11_SuspendScreenSaver(_THIS) { #if SDL_VIDEO_DRIVER_X11_XSCRNSAVER - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int dummy; int major_version, minor_version; #endif /* SDL_VIDEO_DRIVER_X11_XSCRNSAVER */ @@ -1758,7 +1774,7 @@ X11_SuspendScreenSaver(_THIS) /* X11_XScreenSaverSuspend was introduced in MIT-SCREEN-SAVER 1.1 */ if (!X11_XScreenSaverQueryExtension(data->display, &dummy, &dummy) || !X11_XScreenSaverQueryVersion(data->display, - &major_version, &minor_version) || + &major_version, &minor_version) || major_version < 1 || (major_version == 1 && minor_version < 1)) { return; } diff --git a/modules/SDL2/src/video/x11/SDL_x11events.h b/modules/SDL2/src/video/x11/SDL_x11events.h index 9d9725d..1c595f9 100644 --- a/modules/SDL2/src/video/x11/SDL_x11events.h +++ b/modules/SDL2/src/video/x11/SDL_x11events.h @@ -24,10 +24,11 @@ #define SDL_x11events_h_ extern void X11_PumpEvents(_THIS); -extern int X11_WaitEventTimeout(_THIS, int timeout); +extern int X11_WaitEventTimeout(_THIS, int timeout); extern void X11_SendWakeupEvent(_THIS, SDL_Window *window); extern void X11_SuspendScreenSaver(_THIS); extern void X11_ReconcileKeyboardState(_THIS); +extern void X11_GetBorderValues(void /*SDL_WindowData*/ *data); #endif /* SDL_x11events_h_ */ diff --git a/modules/SDL2/src/video/x11/SDL_x11framebuffer.c b/modules/SDL2/src/video/x11/SDL_x11framebuffer.c index 23fc731..403dbd3 100644 --- a/modules/SDL2/src/video/x11/SDL_x11framebuffer.c +++ b/modules/SDL2/src/video/x11/SDL_x11framebuffer.c @@ -25,7 +25,6 @@ #include "SDL_x11video.h" #include "SDL_x11framebuffer.h" - #ifndef NO_SHARED_MEMORY /* Shared memory error handler routine */ @@ -33,11 +32,11 @@ static int shm_error; static int (*X_handler)(Display *, XErrorEvent *) = NULL; static int shm_errhandler(Display *d, XErrorEvent *e) { - if ( e->error_code == BadAccess ) { - shm_error = True; - return(0); - } else - return(X_handler(d,e)); + if (e->error_code == BadAccess) { + shm_error = True; + return 0; + } + return X_handler(d, e); } static SDL_bool have_mitshm(Display *dpy) @@ -48,14 +47,16 @@ static SDL_bool have_mitshm(Display *dpy) #endif /* !NO_SHARED_MEMORY */ -int -X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, - void ** pixels, int *pitch) +int X11_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, + void **pixels, int *pitch) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XGCValues gcv; XVisualInfo vinfo; + int w, h; + + SDL_GetWindowSizeInPixels(window, &w, &h); /* Free the old framebuffer surface */ X11_DestroyWindowFramebuffer(_this, window); @@ -78,25 +79,26 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, } /* Calculate pitch */ - *pitch = (((window->w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); + *pitch = (((w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); /* Create the actual image */ #ifndef NO_SHARED_MEMORY if (have_mitshm(display)) { XShmSegmentInfo *shminfo = &data->shminfo; - shminfo->shmid = shmget(IPC_PRIVATE, window->h*(*pitch), IPC_CREAT | 0777); - if ( shminfo->shmid >= 0 ) { + shminfo->shmid = shmget(IPC_PRIVATE, (size_t)h * (*pitch), IPC_CREAT | 0777); + if (shminfo->shmid >= 0) { shminfo->shmaddr = (char *)shmat(shminfo->shmid, 0, 0); shminfo->readOnly = False; - if ( shminfo->shmaddr != (char *)-1 ) { + if (shminfo->shmaddr != (char *)-1) { shm_error = False; X_handler = X11_XSetErrorHandler(shm_errhandler); X11_XShmAttach(display, shminfo); X11_XSync(display, False); X11_XSetErrorHandler(X_handler); - if ( shm_error ) + if (shm_error) { shmdt(shminfo->shmaddr); + } } else { shm_error = True; } @@ -106,9 +108,9 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, } if (!shm_error) { data->ximage = X11_XShmCreateImage(display, data->visual, - vinfo.depth, ZPixmap, - shminfo->shmaddr, shminfo, - window->w, window->h); + vinfo.depth, ZPixmap, + shminfo->shmaddr, shminfo, + w, h); if (!data->ximage) { X11_XShmDetach(display, shminfo); X11_XSync(display, False); @@ -124,14 +126,14 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, } #endif /* not NO_SHARED_MEMORY */ - *pixels = SDL_malloc(window->h*(*pitch)); + *pixels = SDL_malloc((size_t)h * (*pitch)); if (*pixels == NULL) { return SDL_OutOfMemory(); } data->ximage = X11_XCreateImage(display, data->visual, - vinfo.depth, ZPixmap, 0, (char *)(*pixels), - window->w, window->h, 32, 0); + vinfo.depth, ZPixmap, 0, (char *)(*pixels), + w, h, 32, 0); if (!data->ximage) { SDL_free(*pixels); return SDL_SetError("Couldn't create XImage"); @@ -140,14 +142,17 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, return 0; } -int -X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, - int numrects) +int X11_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, + int numrects) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; int i; - int x, y, w ,h; + int x, y, w, h; + int window_w, window_h; + + SDL_GetWindowSizeInPixels(window, &window_w, &window_h); + #ifndef NO_SHARED_MEMORY if (data->use_mitshm) { for (i = 0; i < numrects; ++i) { @@ -160,26 +165,25 @@ X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, /* Clipped? */ continue; } - if (x < 0) - { + if (x < 0) { x += w; w += rects[i].x; } - if (y < 0) - { + if (y < 0) { y += h; h += rects[i].y; } - if (x + w > window->w) - w = window->w - x; - if (y + h > window->h) - h = window->h - y; + if (x + w > window_w) { + w = window_w - x; + } + if (y + h > window_h) { + h = window_h - y; + } X11_XShmPutImage(display, data->xwindow, data->gc, data->ximage, - x, y, x, y, w, h, False); + x, y, x, y, w, h, False); } - } - else + } else #endif /* !NO_SHARED_MEMORY */ { for (i = 0; i < numrects; ++i) { @@ -192,23 +196,23 @@ X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, /* Clipped? */ continue; } - if (x < 0) - { + if (x < 0) { x += w; w += rects[i].x; } - if (y < 0) - { + if (y < 0) { y += h; h += rects[i].y; } - if (x + w > window->w) - w = window->w - x; - if (y + h > window->h) - h = window->h - y; + if (x + w > window_w) { + w = window_w - x; + } + if (y + h > window_h) { + h = window_h - y; + } X11_XPutImage(display, data->xwindow, data->gc, data->ximage, - x, y, x, y, w, h); + x, y, x, y, w, h); } } @@ -217,13 +221,12 @@ X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, return 0; } -void -X11_DestroyWindowFramebuffer(_THIS, SDL_Window * window) +void X11_DestroyWindowFramebuffer(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display; - if (!data) { + if (data == NULL) { /* The window wasn't fully initialized */ return; } diff --git a/modules/SDL2/src/video/x11/SDL_x11framebuffer.h b/modules/SDL2/src/video/x11/SDL_x11framebuffer.h index 29ab9a7..0330223 100644 --- a/modules/SDL2/src/video/x11/SDL_x11framebuffer.h +++ b/modules/SDL2/src/video/x11/SDL_x11framebuffer.h @@ -24,13 +24,12 @@ #include "../../SDL_internal.h" - -extern int X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, - Uint32 * format, - void ** pixels, int *pitch); -extern int X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, - const SDL_Rect * rects, int numrects); -extern void X11_DestroyWindowFramebuffer(_THIS, SDL_Window * window); +extern int X11_CreateWindowFramebuffer(_THIS, SDL_Window *window, + Uint32 *format, + void **pixels, int *pitch); +extern int X11_UpdateWindowFramebuffer(_THIS, SDL_Window *window, + const SDL_Rect *rects, int numrects); +extern void X11_DestroyWindowFramebuffer(_THIS, SDL_Window *window); #endif /* SDL_x11framebuffer_h_ */ diff --git a/modules/SDL2/src/video/x11/SDL_x11keyboard.c b/modules/SDL2/src/video/x11/SDL_x11keyboard.c index 11cfff7..12818ed 100644 --- a/modules/SDL2/src/video/x11/SDL_x11keyboard.c +++ b/modules/SDL2/src/video/x11/SDL_x11keyboard.c @@ -46,9 +46,33 @@ static SDL_ScancodeTable scancode_set[] = { SDL_SCANCODE_TABLE_XVNC, }; +static SDL_bool X11_ScancodeIsRemappable(SDL_Scancode scancode) +{ + /* + * XKB remappings can assign different keysyms for these scancodes, but + * as these keys are in fixed positions, the scancodes themselves shouldn't + * be switched. Mark them as not being remappable. + */ + switch (scancode) { + case SDL_SCANCODE_ESCAPE: + case SDL_SCANCODE_CAPSLOCK: + case SDL_SCANCODE_NUMLOCKCLEAR: + case SDL_SCANCODE_LSHIFT: + case SDL_SCANCODE_RSHIFT: + case SDL_SCANCODE_LCTRL: + case SDL_SCANCODE_RCTRL: + case SDL_SCANCODE_LALT: + case SDL_SCANCODE_RALT: + case SDL_SCANCODE_LGUI: + case SDL_SCANCODE_RGUI: + return SDL_FALSE; + default: + return SDL_TRUE; + } +} + /* This function only correctly maps letters and numbers for keyboards in US QWERTY layout */ -static SDL_Scancode -X11_KeyCodeToSDLScancode(_THIS, KeyCode keycode) +static SDL_Scancode X11_KeyCodeToSDLScancode(_THIS, KeyCode keycode) { const KeySym keysym = X11_KeyCodeToSym(_this, keycode, 0); @@ -59,8 +83,7 @@ X11_KeyCodeToSDLScancode(_THIS, KeyCode keycode) return SDL_GetScancodeFromKeySym(keysym, keycode); } -static Uint32 -X11_KeyCodeToUcs4(_THIS, KeyCode keycode, unsigned char group) +static Uint32 X11_KeyCodeToUcs4(_THIS, KeyCode keycode, unsigned char group) { KeySym keysym = X11_KeyCodeToSym(_this, keycode, group); @@ -74,20 +97,21 @@ X11_KeyCodeToUcs4(_THIS, KeyCode keycode, unsigned char group) KeySym X11_KeyCodeToSym(_THIS, KeyCode keycode, unsigned char group) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; KeySym keysym; #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM if (data->xkb) { - int num_groups = XkbKeyNumGroups(data->xkb, keycode); + int num_groups = XkbKeyNumGroups(data->xkb, keycode); unsigned char info = XkbKeyGroupInfo(data->xkb, keycode); - + if (num_groups && group >= num_groups) { - + int action = XkbOutOfRangeGroupAction(info); - + if (action == XkbRedirectIntoRange) { - if ((group = XkbOutOfRangeGroupNumber(info)) >= num_groups) { + group = XkbOutOfRangeGroupNumber(info); + if (group >= num_groups) { group = 0; } } else if (action == XkbClampIntoRange) { @@ -107,14 +131,14 @@ X11_KeyCodeToSym(_THIS, KeyCode keycode, unsigned char group) return keysym; } -int -X11_InitKeyboard(_THIS) +int X11_InitKeyboard(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int i = 0; int j = 0; int min_keycode, max_keycode; - struct { + struct + { SDL_Scancode scancode; KeySym keysym; int value; @@ -144,14 +168,14 @@ X11_InitKeyboard(_THIS) X11_XkbSetDetectableAutoRepeat(data->display, True, &xkb_repeat); } #endif - + /* Open a connection to the X input manager */ #ifdef X_HAVE_UTF8_STRING if (SDL_X11_HAVE_UTF8) { - /* Set the locale, and call XSetLocaleModifiers before XOpenIM so that + /* Set the locale, and call XSetLocaleModifiers before XOpenIM so that Compose keys will work correctly. */ char *prev_locale = setlocale(LC_ALL, NULL); - char *prev_xmods = X11_XSetLocaleModifiers(NULL); + char *prev_xmods = X11_XSetLocaleModifiers(NULL); const char *new_xmods = ""; const char *env_xmods = SDL_getenv("XMODIFIERS"); SDL_bool has_dbus_ime_support = SDL_FALSE; @@ -166,7 +190,7 @@ X11_InitKeyboard(_THIS) /* IBus resends some key events that were filtered by XFilterEvents when it is used via XIM which causes issues. Prevent this by forcing - @im=none if XMODIFIERS contains @im=ibus. IBus can still be used via + @im=none if XMODIFIERS contains @im=ibus. IBus can still be used via the DBus implementation, which also has support for pre-editing. */ if (env_xmods && SDL_strstr(env_xmods, "@im=ibus") != NULL) { has_dbus_ime_support = SDL_TRUE; @@ -178,14 +202,14 @@ X11_InitKeyboard(_THIS) new_xmods = "@im=none"; } - setlocale(LC_ALL, ""); + (void)setlocale(LC_ALL, ""); X11_XSetLocaleModifiers(new_xmods); data->im = X11_XOpenIM(data->display, NULL, data->classname, data->classname); /* Reset the locale + X locale modifiers back to how they were, locale first because the X locale modifiers depend on it. */ - setlocale(LC_ALL, prev_locale); + (void)setlocale(LC_ALL, prev_locale); X11_XSetLocaleModifiers(prev_xmods); if (prev_locale) { @@ -261,14 +285,14 @@ X11_InitKeyboard(_THIS) KeySym sym; sym = X11_KeyCodeToSym(_this, (KeyCode)i, 0); SDL_Log("code = %d, sym = 0x%X (%s) ", i - min_keycode, - (unsigned int)sym, sym == NoSymbol ? "NoSymbol" : X11_XKeysymToString(sym)); + (unsigned int)sym, sym == NoSymbol ? "NoSymbol" : X11_XKeysymToString(sym)); } #endif if (scancode == data->key_layout[i]) { continue; } - if (default_keymap[scancode] >= SDLK_SCANCODE_MASK) { - /* Not a character key, safe to remap */ + if (default_keymap[scancode] >= SDLK_SCANCODE_MASK && X11_ScancodeIsRemappable(scancode)) { + /* Not a character key and the scancode is safe to remap */ #ifdef DEBUG_KEYBOARD SDL_Log("Changing scancode, was %d (%s), now %d (%s)\n", data->key_layout[i], SDL_GetScancodeName(data->key_layout[i]), scancode, SDL_GetScancodeName(scancode)); #endif @@ -288,7 +312,7 @@ X11_InitKeyboard(_THIS) KeySym sym; sym = X11_KeyCodeToSym(_this, (KeyCode)i, 0); SDL_Log("code = %d, sym = 0x%X (%s) ", i - min_keycode, - (unsigned int)sym, sym == NoSymbol ? "NoSymbol" : X11_XKeysymToString(sym)); + (unsigned int)sym, sym == NoSymbol ? "NoSymbol" : X11_XKeysymToString(sym)); } if (scancode == SDL_SCANCODE_UNKNOWN) { SDL_Log("scancode not found\n"); @@ -313,10 +337,9 @@ X11_InitKeyboard(_THIS) return 0; } -void -X11_UpdateKeymap(_THIS, SDL_bool send_event) +void X11_UpdateKeymap(_THIS, SDL_bool send_event) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int i; SDL_Scancode scancode; SDL_Keycode keymap[SDL_NUM_SCANCODES]; @@ -335,7 +358,6 @@ X11_UpdateKeymap(_THIS, SDL_bool send_event) } #endif - for (i = 0; i < SDL_arraysize(data->key_layout); i++) { Uint32 key; @@ -353,34 +375,33 @@ X11_UpdateKeymap(_THIS, SDL_bool send_event) SDL_Scancode keyScancode = X11_KeyCodeToSDLScancode(_this, (KeyCode)i); switch (keyScancode) { - case SDL_SCANCODE_RETURN: - keymap[scancode] = SDLK_RETURN; - break; - case SDL_SCANCODE_ESCAPE: - keymap[scancode] = SDLK_ESCAPE; - break; - case SDL_SCANCODE_BACKSPACE: - keymap[scancode] = SDLK_BACKSPACE; - break; - case SDL_SCANCODE_TAB: - keymap[scancode] = SDLK_TAB; - break; - case SDL_SCANCODE_DELETE: - keymap[scancode] = SDLK_DELETE; - break; - default: - keymap[scancode] = SDL_SCANCODE_TO_KEYCODE(keyScancode); - break; + case SDL_SCANCODE_RETURN: + keymap[scancode] = SDLK_RETURN; + break; + case SDL_SCANCODE_ESCAPE: + keymap[scancode] = SDLK_ESCAPE; + break; + case SDL_SCANCODE_BACKSPACE: + keymap[scancode] = SDLK_BACKSPACE; + break; + case SDL_SCANCODE_TAB: + keymap[scancode] = SDLK_TAB; + break; + case SDL_SCANCODE_DELETE: + keymap[scancode] = SDLK_DELETE; + break; + default: + keymap[scancode] = SDL_SCANCODE_TO_KEYCODE(keyScancode); + break; } } } SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES, send_event); } -void -X11_QuitKeyboard(_THIS) +void X11_QuitKeyboard(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM if (data->xkb) { @@ -394,11 +415,10 @@ X11_QuitKeyboard(_THIS) #endif } -static void -X11_ResetXIM(_THIS) +static void X11_ResetXIM(_THIS) { #ifdef X_HAVE_UTF8_STRING - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; int i; if (videodata && videodata->windowlist) { @@ -416,14 +436,12 @@ X11_ResetXIM(_THIS) #endif } -void -X11_StartTextInput(_THIS) +void X11_StartTextInput(_THIS) { X11_ResetXIM(_this); } -void -X11_StopTextInput(_THIS) +void X11_StopTextInput(_THIS) { X11_ResetXIM(_this); #ifdef SDL_USE_IME @@ -431,48 +449,44 @@ X11_StopTextInput(_THIS) #endif } -void -X11_SetTextInputRect(_THIS, const SDL_Rect *rect) +void X11_SetTextInputRect(_THIS, const SDL_Rect *rect) { - if (!rect) { + if (rect == NULL) { SDL_InvalidParamError("rect"); return; } - + #ifdef SDL_USE_IME SDL_IME_UpdateTextRect(rect); #endif } -SDL_bool -X11_HasScreenKeyboardSupport(_THIS) +SDL_bool X11_HasScreenKeyboardSupport(_THIS) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; return videodata->is_steam_deck; } -void -X11_ShowScreenKeyboard(_THIS, SDL_Window *window) +void X11_ShowScreenKeyboard(_THIS, SDL_Window *window) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; if (videodata->is_steam_deck) { /* For more documentation of the URL parameters, see: * https://partner.steamgames.com/doc/api/ISteamUtils#ShowFloatingGamepadTextInput */ char deeplink[128]; - SDL_snprintf(deeplink, sizeof(deeplink), - "steam://open/keyboard?XPosition=0&YPosition=0&Width=0&Height=0&Mode=%d", - SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE) ? 0 : 1); + (void)SDL_snprintf(deeplink, sizeof(deeplink), + "steam://open/keyboard?XPosition=0&YPosition=0&Width=0&Height=0&Mode=%d", + SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE) ? 0 : 1); SDL_OpenURL(deeplink); videodata->steam_keyboard_open = SDL_TRUE; } } -void -X11_HideScreenKeyboard(_THIS, SDL_Window *window) +void X11_HideScreenKeyboard(_THIS, SDL_Window *window) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; if (videodata->is_steam_deck) { SDL_OpenURL("steam://close/keyboard"); @@ -480,10 +494,9 @@ X11_HideScreenKeyboard(_THIS, SDL_Window *window) } } -SDL_bool -X11_IsScreenKeyboardShown(_THIS, SDL_Window *window) +SDL_bool X11_IsScreenKeyboardShown(_THIS, SDL_Window *window) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; return videodata->steam_keyboard_open; } diff --git a/modules/SDL2/src/video/x11/SDL_x11messagebox.c b/modules/SDL2/src/video/x11/SDL_x11messagebox.c index 0d03a24..12e40f4 100644 --- a/modules/SDL2/src/video/x11/SDL_x11messagebox.c +++ b/modules/SDL2/src/video/x11/SDL_x11messagebox.c @@ -31,7 +31,6 @@ #include #include - #define SDL_FORK_MESSAGEBOX 1 #define SDL_SET_LOCALE 1 @@ -42,40 +41,42 @@ #include #endif -#define MAX_BUTTONS 8 /* Maximum number of buttons supported */ -#define MIN_BUTTON_WIDTH 64 /* Minimum button width */ -#define MIN_DIALOG_WIDTH 200 /* Minimum dialog width */ -#define MIN_DIALOG_HEIGHT 100 /* Minimum dialog height */ +#define MAX_BUTTONS 8 /* Maximum number of buttons supported */ +#define MIN_BUTTON_WIDTH 64 /* Minimum button width */ +#define MIN_DIALOG_WIDTH 200 /* Minimum dialog width */ +#define MIN_DIALOG_HEIGHT 100 /* Minimum dialog height */ static const char g_MessageBoxFontLatin1[] = "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1"; static const char g_MessageBoxFont[] = "-*-*-medium-r-normal--*-120-*-*-*-*-*-*"; -static const SDL_MessageBoxColor g_default_colors[ SDL_MESSAGEBOX_COLOR_MAX ] = { - { 56, 54, 53 }, /* SDL_MESSAGEBOX_COLOR_BACKGROUND, */ +static const SDL_MessageBoxColor g_default_colors[SDL_MESSAGEBOX_COLOR_MAX] = { + { 56, 54, 53 }, /* SDL_MESSAGEBOX_COLOR_BACKGROUND, */ { 209, 207, 205 }, /* SDL_MESSAGEBOX_COLOR_TEXT, */ { 140, 135, 129 }, /* SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, */ - { 105, 102, 99 }, /* SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, */ - { 205, 202, 53 }, /* SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, */ + { 105, 102, 99 }, /* SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, */ + { 205, 202, 53 }, /* SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, */ }; -#define SDL_MAKE_RGB( _r, _g, _b ) ( ( ( Uint32 )( _r ) << 16 ) | \ - ( ( Uint32 )( _g ) << 8 ) | \ - ( ( Uint32 )( _b ) ) ) +#define SDL_MAKE_RGB(_r, _g, _b) (((Uint32)(_r) << 16) | \ + ((Uint32)(_g) << 8) | \ + ((Uint32)(_b))) -typedef struct SDL_MessageBoxButtonDataX11 { - int x, y; /* Text position */ - int length; /* Text length */ - int text_width; /* Text width */ +typedef struct SDL_MessageBoxButtonDataX11 +{ + int x, y; /* Text position */ + int length; /* Text length */ + int text_width; /* Text width */ - SDL_Rect rect; /* Rectangle for entire button */ + SDL_Rect rect; /* Rectangle for entire button */ - const SDL_MessageBoxButtonData *buttondata; /* Button data from caller */ + const SDL_MessageBoxButtonData *buttondata; /* Button data from caller */ } SDL_MessageBoxButtonDataX11; -typedef struct TextLineData { - int width; /* Width of this text line */ - int length; /* String length of this text line */ - const char *text; /* Text for this line */ +typedef struct TextLineData +{ + int width; /* Width of this text line */ + int length; /* String length of this text line */ + const char *text; /* Text for this line */ } TextLineData; typedef struct SDL_MessageBoxDataX11 @@ -85,46 +86,44 @@ typedef struct SDL_MessageBoxDataX11 Window window; #if SDL_VIDEO_DRIVER_X11_XDBE XdbeBackBuffer buf; - SDL_bool xdbe; /* Whether Xdbe is present or not */ + SDL_bool xdbe; /* Whether Xdbe is present or not */ #endif long event_mask; Atom wm_protocols; Atom wm_delete_message; - int dialog_width; /* Dialog box width. */ - int dialog_height; /* Dialog box height. */ + int dialog_width; /* Dialog box width. */ + int dialog_height; /* Dialog box height. */ - XFontSet font_set; /* for UTF-8 systems */ - XFontStruct *font_struct; /* Latin1 (ASCII) fallback. */ - int xtext, ytext; /* Text position to start drawing at. */ - int numlines; /* Count of Text lines. */ - int text_height; /* Height for text lines. */ + XFontSet font_set; /* for UTF-8 systems */ + XFontStruct *font_struct; /* Latin1 (ASCII) fallback. */ + int xtext, ytext; /* Text position to start drawing at. */ + int numlines; /* Count of Text lines. */ + int text_height; /* Height for text lines. */ TextLineData *linedata; - int *pbuttonid; /* Pointer to user return buttonid value. */ + int *pbuttonid; /* Pointer to user return buttonid value. */ - int button_press_index; /* Index into buttondata/buttonpos for button which is pressed (or -1). */ - int mouse_over_index; /* Index into buttondata/buttonpos for button mouse is over (or -1). */ + int button_press_index; /* Index into buttondata/buttonpos for button which is pressed (or -1). */ + int mouse_over_index; /* Index into buttondata/buttonpos for button mouse is over (or -1). */ - int numbuttons; /* Count of buttons. */ + int numbuttons; /* Count of buttons. */ const SDL_MessageBoxButtonData *buttondata; - SDL_MessageBoxButtonDataX11 buttonpos[ MAX_BUTTONS ]; + SDL_MessageBoxButtonDataX11 buttonpos[MAX_BUTTONS]; - Uint32 color[ SDL_MESSAGEBOX_COLOR_MAX ]; + Uint32 color[SDL_MESSAGEBOX_COLOR_MAX]; const SDL_MessageBoxData *messageboxdata; } SDL_MessageBoxDataX11; /* Maximum helper for ints. */ -static SDL_INLINE int -IntMax( int a, int b ) +static SDL_INLINE int IntMax(int a, int b) { - return ( a > b ) ? a : b; + return (a > b) ? a : b; } /* Return width and height for a string. */ -static void -GetTextWidthHeight( SDL_MessageBoxDataX11 *data, const char *str, int nbytes, int *pwidth, int *pheight ) +static void GetTextWidthHeight(SDL_MessageBoxDataX11 *data, const char *str, int nbytes, int *pwidth, int *pheight) { if (SDL_X11_HAVE_UTF8) { XRectangle overall_ink, overall_logical; @@ -134,29 +133,28 @@ GetTextWidthHeight( SDL_MessageBoxDataX11 *data, const char *str, int nbytes, in } else { XCharStruct text_structure; int font_direction, font_ascent, font_descent; - X11_XTextExtents( data->font_struct, str, nbytes, - &font_direction, &font_ascent, &font_descent, - &text_structure ); + X11_XTextExtents(data->font_struct, str, nbytes, + &font_direction, &font_ascent, &font_descent, + &text_structure); *pwidth = text_structure.width; *pheight = text_structure.ascent + text_structure.descent; } } /* Return index of button if position x,y is contained therein. */ -static int -GetHitButtonIndex( SDL_MessageBoxDataX11 *data, int x, int y ) +static int GetHitButtonIndex(SDL_MessageBoxDataX11 *data, int x, int y) { int i; int numbuttons = data->numbuttons; SDL_MessageBoxButtonDataX11 *buttonpos = data->buttonpos; - for ( i = 0; i < numbuttons; i++ ) { - SDL_Rect *rect = &buttonpos[ i ].rect; + for (i = 0; i < numbuttons; i++) { + SDL_Rect *rect = &buttonpos[i].rect; - if ( ( x >= rect->x ) && - ( x <= ( rect->x + rect->w ) ) && - ( y >= rect->y ) && - ( y <= ( rect->y + rect->h ) ) ) { + if ((x >= rect->x) && + (x <= (rect->x + rect->w)) && + (y >= rect->y) && + (y <= (rect->y + rect->h))) { return i; } } @@ -165,15 +163,14 @@ GetHitButtonIndex( SDL_MessageBoxDataX11 *data, int x, int y ) } /* Initialize SDL_MessageBoxData structure and Display, etc. */ -static int -X11_MessageBoxInit( SDL_MessageBoxDataX11 *data, const SDL_MessageBoxData * messageboxdata, int * pbuttonid ) +static int X11_MessageBoxInit(SDL_MessageBoxDataX11 *data, const SDL_MessageBoxData *messageboxdata, int *pbuttonid) { int i; int numbuttons = messageboxdata->numbuttons; const SDL_MessageBoxButtonData *buttondata = messageboxdata->buttons; const SDL_MessageBoxColor *colorhints; - if ( numbuttons > MAX_BUTTONS ) { + if (numbuttons > MAX_BUTTONS) { return SDL_SetError("Too many buttons (%d max allowed)", MAX_BUTTONS); } @@ -184,8 +181,8 @@ X11_MessageBoxInit( SDL_MessageBoxDataX11 *data, const SDL_MessageBoxData * mess data->numbuttons = numbuttons; data->pbuttonid = pbuttonid; - data->display = X11_XOpenDisplay( NULL ); - if ( !data->display ) { + data->display = X11_XOpenDisplay(NULL); + if (!data->display) { return SDL_SetError("Couldn't open X11 display"); } @@ -193,49 +190,47 @@ X11_MessageBoxInit( SDL_MessageBoxDataX11 *data, const SDL_MessageBoxData * mess char **missing = NULL; int num_missing = 0; data->font_set = X11_XCreateFontSet(data->display, g_MessageBoxFont, - &missing, &num_missing, NULL); - if ( missing != NULL ) { + &missing, &num_missing, NULL); + if (missing != NULL) { X11_XFreeStringList(missing); } - if ( data->font_set == NULL ) { + if (data->font_set == NULL) { return SDL_SetError("Couldn't load font %s", g_MessageBoxFont); } } else { - data->font_struct = X11_XLoadQueryFont( data->display, g_MessageBoxFontLatin1 ); - if ( data->font_struct == NULL ) { + data->font_struct = X11_XLoadQueryFont(data->display, g_MessageBoxFontLatin1); + if (data->font_struct == NULL) { return SDL_SetError("Couldn't load font %s", g_MessageBoxFontLatin1); } } - if ( messageboxdata->colorScheme ) { + if (messageboxdata->colorScheme) { colorhints = messageboxdata->colorScheme->colors; } else { colorhints = g_default_colors; } /* Convert our SDL_MessageBoxColor r,g,b values to packed RGB format. */ - for ( i = 0; i < SDL_MESSAGEBOX_COLOR_MAX; i++ ) { - data->color[ i ] = SDL_MAKE_RGB( colorhints[ i ].r, colorhints[ i ].g, colorhints[ i ].b ); + for (i = 0; i < SDL_MESSAGEBOX_COLOR_MAX; i++) { + data->color[i] = SDL_MAKE_RGB(colorhints[i].r, colorhints[i].g, colorhints[i].b); } return 0; } -static int -CountLinesOfText(const char *text) +static int CountLinesOfText(const char *text) { int retval = 0; while (text && *text) { const char *lf = SDL_strchr(text, '\n'); - retval++; /* even without an endline, this counts as a line. */ + retval++; /* even without an endline, this counts as a line. */ text = lf ? lf + 1 : NULL; } return retval; } /* Calculate and initialize text and button locations. */ -static int -X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) +static int X11_MessageBoxInitPositions(SDL_MessageBoxDataX11 *data) { int i; int ybuttons; @@ -245,30 +240,30 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) const SDL_MessageBoxData *messageboxdata = data->messageboxdata; /* Go over text and break linefeeds into separate lines. */ - if ( messageboxdata->message[0] ) { + if (messageboxdata != NULL && messageboxdata->message[0]) { const char *text = messageboxdata->message; const int linecount = CountLinesOfText(text); - TextLineData *plinedata = (TextLineData *) SDL_malloc(sizeof (TextLineData) * linecount); + TextLineData *plinedata = (TextLineData *)SDL_malloc(sizeof(TextLineData) * linecount); - if (!plinedata) { + if (plinedata == NULL) { return SDL_OutOfMemory(); } data->linedata = plinedata; data->numlines = linecount; - for ( i = 0; i < linecount; i++, plinedata++ ) { - const char *lf = SDL_strchr( text, '\n' ); - const int length = lf ? ( lf - text ) : SDL_strlen( text ); + for (i = 0; i < linecount; i++, plinedata++) { + const char *lf = SDL_strchr(text, '\n'); + const int length = lf ? (lf - text) : SDL_strlen(text); int height; plinedata->text = text; - GetTextWidthHeight( data, text, length, &plinedata->width, &height ); + GetTextWidthHeight(data, text, length, &plinedata->width, &height); /* Text and widths are the largest we've ever seen. */ - data->text_height = IntMax( data->text_height, height ); - text_width_max = IntMax( text_width_max, plinedata->width ); + data->text_height = IntMax(data->text_height, height); + text_width_max = IntMax(text_width_max, plinedata->width); plinedata->length = length; if (lf && (lf > text) && (lf[-1] == '\r')) { @@ -278,8 +273,9 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) text += length + 1; /* Break if there are no more linefeeds. */ - if ( !lf ) + if (lf == NULL) { break; + } } /* Bump up the text height slightly. */ @@ -287,36 +283,36 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) } /* Loop through all buttons and calculate the button widths and height. */ - for ( i = 0; i < data->numbuttons; i++ ) { + for (i = 0; i < data->numbuttons; i++) { int height; - data->buttonpos[ i ].buttondata = &data->buttondata[ i ]; - data->buttonpos[ i ].length = SDL_strlen( data->buttondata[ i ].text ); + data->buttonpos[i].buttondata = &data->buttondata[i]; + data->buttonpos[i].length = SDL_strlen(data->buttondata[i].text); - GetTextWidthHeight( data, data->buttondata[ i ].text, SDL_strlen( data->buttondata[ i ].text ), - &data->buttonpos[ i ].text_width, &height ); + GetTextWidthHeight(data, data->buttondata[i].text, SDL_strlen(data->buttondata[i].text), + &data->buttonpos[i].text_width, &height); - button_width = IntMax( button_width, data->buttonpos[ i ].text_width ); - button_text_height = IntMax( button_text_height, height ); + button_width = IntMax(button_width, data->buttonpos[i].text_width); + button_text_height = IntMax(button_text_height, height); } - if ( data->numlines ) { + if (data->numlines) { /* x,y for this line of text. */ data->xtext = data->text_height; data->ytext = data->text_height + data->text_height; /* Bump button y down to bottom of text. */ - ybuttons = 3 * data->ytext / 2 + ( data->numlines - 1 ) * data->text_height; + ybuttons = 3 * data->ytext / 2 + (data->numlines - 1) * data->text_height; /* Bump the dialog box width and height up if needed. */ - data->dialog_width = IntMax( data->dialog_width, 2 * data->xtext + text_width_max ); - data->dialog_height = IntMax( data->dialog_height, ybuttons ); + data->dialog_width = IntMax(data->dialog_width, 2 * data->xtext + text_width_max); + data->dialog_height = IntMax(data->dialog_height, ybuttons); } else { /* Button y starts at height of button text. */ ybuttons = button_text_height; } - if ( data->numbuttons ) { + if (data->numbuttons) { int x, y; int width_of_buttons; int button_spacing = button_text_height; @@ -326,33 +322,33 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) button_width += button_text_height; /* Get width of all buttons lined up. */ - width_of_buttons = data->numbuttons * button_width + ( data->numbuttons - 1 ) * button_spacing; + width_of_buttons = data->numbuttons * button_width + (data->numbuttons - 1) * button_spacing; /* Bump up dialog width and height if buttons are wider than text. */ - data->dialog_width = IntMax( data->dialog_width, width_of_buttons + 2 * button_spacing ); - data->dialog_height = IntMax( data->dialog_height, ybuttons + 2 * button_height ); + data->dialog_width = IntMax(data->dialog_width, width_of_buttons + 2 * button_spacing); + data->dialog_height = IntMax(data->dialog_height, ybuttons + 2 * button_height); /* Location for first button. */ - if ( messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT ) { - x = data->dialog_width - ( data->dialog_width - width_of_buttons ) / 2 - ( button_width + button_spacing ); + if (messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT) { + x = data->dialog_width - (data->dialog_width - width_of_buttons) / 2 - (button_width + button_spacing); } else { - x = ( data->dialog_width - width_of_buttons ) / 2; + x = (data->dialog_width - width_of_buttons) / 2; } - y = ybuttons + ( data->dialog_height - ybuttons - button_height ) / 2; + y = ybuttons + (data->dialog_height - ybuttons - button_height) / 2; - for ( i = 0; i < data->numbuttons; i++ ) { + for (i = 0; i < data->numbuttons; i++) { /* Button coordinates. */ - data->buttonpos[ i ].rect.x = x; - data->buttonpos[ i ].rect.y = y; - data->buttonpos[ i ].rect.w = button_width; - data->buttonpos[ i ].rect.h = button_height; + data->buttonpos[i].rect.x = x; + data->buttonpos[i].rect.y = y; + data->buttonpos[i].rect.w = button_width; + data->buttonpos[i].rect.h = button_height; /* Button text coordinates. */ - data->buttonpos[ i ].x = x + ( button_width - data->buttonpos[ i ].text_width ) / 2; - data->buttonpos[ i ].y = y + ( button_height - button_text_height - 1 ) / 2 + button_text_height; + data->buttonpos[i].x = x + (button_width - data->buttonpos[i].text_width) / 2; + data->buttonpos[i].y = y + (button_height - button_text_height - 1) / 2 + button_text_height; /* Scoot over for next button. */ - if ( messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT ) { + if (messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT) { x -= button_width + button_spacing; } else { x += button_width + button_spacing; @@ -364,33 +360,32 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data ) } /* Free SDL_MessageBoxData data. */ -static void -X11_MessageBoxShutdown( SDL_MessageBoxDataX11 *data ) +static void X11_MessageBoxShutdown(SDL_MessageBoxDataX11 *data) { - if ( data->font_set != NULL ) { - X11_XFreeFontSet( data->display, data->font_set ); + if (data->font_set != NULL) { + X11_XFreeFontSet(data->display, data->font_set); data->font_set = NULL; } - if ( data->font_struct != NULL ) { - X11_XFreeFont( data->display, data->font_struct ); + if (data->font_struct != NULL) { + X11_XFreeFont(data->display, data->font_struct); data->font_struct = NULL; } #if SDL_VIDEO_DRIVER_X11_XDBE - if ( SDL_X11_HAVE_XDBE && data->xdbe ) { + if (SDL_X11_HAVE_XDBE && data->xdbe) { X11_XdbeDeallocateBackBufferName(data->display, data->buf); } #endif - if ( data->display ) { - if ( data->window != None ) { - X11_XWithdrawWindow( data->display, data->window, data->screen ); - X11_XDestroyWindow( data->display, data->window ); + if (data->display) { + if (data->window != None) { + X11_XWithdrawWindow(data->display, data->window, data->screen); + X11_XDestroyWindow(data->display, data->window); data->window = None; } - X11_XCloseDisplay( data->display ); + X11_XCloseDisplay(data->display); data->display = NULL; } @@ -398,8 +393,7 @@ X11_MessageBoxShutdown( SDL_MessageBoxDataX11 *data ) } /* Create and set up our X11 dialog box indow. */ -static int -X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) +static int X11_MessageBoxCreateWindow(SDL_MessageBoxDataX11 *data) { int x, y; XSizeHints *sizehints; @@ -409,13 +403,13 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) SDL_WindowData *windowdata = NULL; const SDL_MessageBoxData *messageboxdata = data->messageboxdata; - if ( messageboxdata->window ) { + if (messageboxdata->window) { SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(messageboxdata->window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(messageboxdata->window)->driverdata; windowdata = (SDL_WindowData *)messageboxdata->window->driverdata; data->screen = displaydata->screen; } else { - data->screen = DefaultScreen( display ); + data->screen = DefaultScreen(display); } data->event_mask = ExposureMask | @@ -424,16 +418,16 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) wnd_attr.event_mask = data->event_mask; data->window = X11_XCreateWindow( - display, RootWindow(display, data->screen), - 0, 0, - data->dialog_width, data->dialog_height, - 0, CopyFromParent, InputOutput, CopyFromParent, - CWEventMask, &wnd_attr ); - if ( data->window == None ) { + display, RootWindow(display, data->screen), + 0, 0, + data->dialog_width, data->dialog_height, + 0, CopyFromParent, InputOutput, CopyFromParent, + CWEventMask, &wnd_attr); + if (data->window == None) { return SDL_SetError("Couldn't create X window"); } - if ( windowdata ) { + if (windowdata) { Atom _NET_WM_STATE = X11_XInternAtom(display, "_NET_WM_STATE", False); Atom stateatoms[16]; size_t statecount = 0; @@ -448,47 +442,47 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) PropModeReplace, (unsigned char *)stateatoms, statecount); /* http://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR */ - X11_XSetTransientForHint( display, data->window, windowdata->xwindow ); + X11_XSetTransientForHint(display, data->window, windowdata->xwindow); } - SDL_X11_SetWindowTitle(display, data->window, (char*)messageboxdata->title); + SDL_X11_SetWindowTitle(display, data->window, (char *)messageboxdata->title); /* Let the window manager know this is a dialog box */ _NET_WM_WINDOW_TYPE = X11_XInternAtom(display, "_NET_WM_WINDOW_TYPE", False); _NET_WM_WINDOW_TYPE_DIALOG = X11_XInternAtom(display, "_NET_WM_WINDOW_TYPE_DIALOG", False); X11_XChangeProperty(display, data->window, _NET_WM_WINDOW_TYPE, XA_ATOM, 32, - PropModeReplace, - (unsigned char *)&_NET_WM_WINDOW_TYPE_DIALOG, 1); + PropModeReplace, + (unsigned char *)&_NET_WM_WINDOW_TYPE_DIALOG, 1); /* Allow the window to be deleted by the window manager */ - data->wm_protocols = X11_XInternAtom( display, "WM_PROTOCOLS", False ); - data->wm_delete_message = X11_XInternAtom( display, "WM_DELETE_WINDOW", False ); - X11_XSetWMProtocols( display, data->window, &data->wm_delete_message, 1 ); + data->wm_protocols = X11_XInternAtom(display, "WM_PROTOCOLS", False); + data->wm_delete_message = X11_XInternAtom(display, "WM_DELETE_WINDOW", False); + X11_XSetWMProtocols(display, data->window, &data->wm_delete_message, 1); - if ( windowdata ) { + if (windowdata) { XWindowAttributes attrib; Window dummy; X11_XGetWindowAttributes(display, windowdata->xwindow, &attrib); - x = attrib.x + ( attrib.width - data->dialog_width ) / 2; - y = attrib.y + ( attrib.height - data->dialog_height ) / 3 ; + x = attrib.x + (attrib.width - data->dialog_width) / 2; + y = attrib.y + (attrib.height - data->dialog_height) / 3; X11_XTranslateCoordinates(display, windowdata->xwindow, RootWindow(display, data->screen), x, y, &x, &y, &dummy); } else { const SDL_VideoDevice *dev = SDL_GetVideoDevice(); if ((dev) && (dev->displays) && (dev->num_displays > 0)) { const SDL_VideoDisplay *dpy = &dev->displays[0]; - const SDL_DisplayData *dpydata = (SDL_DisplayData *) dpy->driverdata; - x = dpydata->x + (( dpy->current_mode.w - data->dialog_width ) / 2); - y = dpydata->y + (( dpy->current_mode.h - data->dialog_height ) / 3); - } else { /* oh well. This will misposition on a multi-head setup. Init first next time. */ - x = ( DisplayWidth( display, data->screen ) - data->dialog_width ) / 2; - y = ( DisplayHeight( display, data->screen ) - data->dialog_height ) / 3 ; + const SDL_DisplayData *dpydata = (SDL_DisplayData *)dpy->driverdata; + x = dpydata->x + ((dpy->current_mode.w - data->dialog_width) / 2); + y = dpydata->y + ((dpy->current_mode.h - data->dialog_height) / 3); + } else { /* oh well. This will misposition on a multi-head setup. Init first next time. */ + x = (DisplayWidth(display, data->screen) - data->dialog_width) / 2; + y = (DisplayHeight(display, data->screen) - data->dialog_height) / 3; } } - X11_XMoveWindow( display, data->window, x, y ); + X11_XMoveWindow(display, data->window, x, y); sizehints = X11_XAllocSizeHints(); - if ( sizehints ) { + if (sizehints) { sizehints->flags = USPosition | USSize | PMaxSize | PMinSize; sizehints->x = x; sizehints->y = y; @@ -498,12 +492,12 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) sizehints->min_width = sizehints->max_width = data->dialog_width; sizehints->min_height = sizehints->max_height = data->dialog_height; - X11_XSetWMNormalHints( display, data->window, sizehints ); + X11_XSetWMNormalHints(display, data->window, sizehints); - X11_XFree( sizehints ); + X11_XFree(sizehints); } - X11_XMapRaised( display, data->window ); + X11_XMapRaised(display, data->window); #if SDL_VIDEO_DRIVER_X11_XDBE /* Initialise a back buffer for double buffering */ @@ -522,8 +516,7 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data ) } /* Draw our message box. */ -static void -X11_MessageBoxDraw( SDL_MessageBoxDataX11 *data, GC ctx ) +static void X11_MessageBoxDraw(SDL_MessageBoxDataX11 *data, GC ctx) { int i; Drawable window = data->window; @@ -536,53 +529,51 @@ X11_MessageBoxDraw( SDL_MessageBoxDataX11 *data, GC ctx ) } #endif - X11_XSetForeground( display, ctx, data->color[ SDL_MESSAGEBOX_COLOR_BACKGROUND ] ); - X11_XFillRectangle( display, window, ctx, 0, 0, data->dialog_width, data->dialog_height ); + X11_XSetForeground(display, ctx, data->color[SDL_MESSAGEBOX_COLOR_BACKGROUND]); + X11_XFillRectangle(display, window, ctx, 0, 0, data->dialog_width, data->dialog_height); - X11_XSetForeground( display, ctx, data->color[ SDL_MESSAGEBOX_COLOR_TEXT ] ); - for ( i = 0; i < data->numlines; i++ ) { - TextLineData *plinedata = &data->linedata[ i ]; + X11_XSetForeground(display, ctx, data->color[SDL_MESSAGEBOX_COLOR_TEXT]); + for (i = 0; i < data->numlines; i++) { + TextLineData *plinedata = &data->linedata[i]; if (SDL_X11_HAVE_UTF8) { - X11_Xutf8DrawString( display, window, data->font_set, ctx, - data->xtext, data->ytext + i * data->text_height, - plinedata->text, plinedata->length ); + X11_Xutf8DrawString(display, window, data->font_set, ctx, + data->xtext, data->ytext + i * data->text_height, + plinedata->text, plinedata->length); } else { - X11_XDrawString( display, window, ctx, - data->xtext, data->ytext + i * data->text_height, - plinedata->text, plinedata->length ); + X11_XDrawString(display, window, ctx, + data->xtext, data->ytext + i * data->text_height, + plinedata->text, plinedata->length); } } - for ( i = 0; i < data->numbuttons; i++ ) { - SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[ i ]; + for (i = 0; i < data->numbuttons; i++) { + SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[i]; const SDL_MessageBoxButtonData *buttondata = buttondatax11->buttondata; - int border = ( buttondata->flags & SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT ) ? 2 : 0; - int offset = ( ( data->mouse_over_index == i ) && ( data->button_press_index == data->mouse_over_index ) ) ? 1 : 0; + int border = (buttondata->flags & SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT) ? 2 : 0; + int offset = ((data->mouse_over_index == i) && (data->button_press_index == data->mouse_over_index)) ? 1 : 0; - X11_XSetForeground( display, ctx, data->color[ SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND ] ); - X11_XFillRectangle( display, window, ctx, - buttondatax11->rect.x - border, buttondatax11->rect.y - border, - buttondatax11->rect.w + 2 * border, buttondatax11->rect.h + 2 * border ); + X11_XSetForeground(display, ctx, data->color[SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND]); + X11_XFillRectangle(display, window, ctx, + buttondatax11->rect.x - border, buttondatax11->rect.y - border, + buttondatax11->rect.w + 2 * border, buttondatax11->rect.h + 2 * border); - X11_XSetForeground( display, ctx, data->color[ SDL_MESSAGEBOX_COLOR_BUTTON_BORDER ] ); - X11_XDrawRectangle( display, window, ctx, - buttondatax11->rect.x, buttondatax11->rect.y, - buttondatax11->rect.w, buttondatax11->rect.h ); + X11_XSetForeground(display, ctx, data->color[SDL_MESSAGEBOX_COLOR_BUTTON_BORDER]); + X11_XDrawRectangle(display, window, ctx, + buttondatax11->rect.x, buttondatax11->rect.y, + buttondatax11->rect.w, buttondatax11->rect.h); - X11_XSetForeground( display, ctx, ( data->mouse_over_index == i ) ? - data->color[ SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED ] : - data->color[ SDL_MESSAGEBOX_COLOR_TEXT ] ); + X11_XSetForeground(display, ctx, (data->mouse_over_index == i) ? data->color[SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED] : data->color[SDL_MESSAGEBOX_COLOR_TEXT]); if (SDL_X11_HAVE_UTF8) { - X11_Xutf8DrawString( display, window, data->font_set, ctx, - buttondatax11->x + offset, - buttondatax11->y + offset, - buttondata->text, buttondatax11->length ); + X11_Xutf8DrawString(display, window, data->font_set, ctx, + buttondatax11->x + offset, + buttondatax11->y + offset, + buttondata->text, buttondatax11->length); } else { - X11_XDrawString( display, window, ctx, - buttondatax11->x + offset, buttondatax11->y + offset, - buttondata->text, buttondatax11->length ); + X11_XDrawString(display, window, ctx, + buttondatax11->x + offset, buttondatax11->y + offset, + buttondata->text, buttondatax11->length); } } @@ -597,16 +588,15 @@ X11_MessageBoxDraw( SDL_MessageBoxDataX11 *data, GC ctx ) #endif } -static Bool -X11_MessageBoxEventTest(Display *display, XEvent *event, XPointer arg) +/* NOLINTNEXTLINE(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */ +static Bool X11_MessageBoxEventTest(Display *display, XEvent *event, XPointer arg) { - const SDL_MessageBoxDataX11 *data = (const SDL_MessageBoxDataX11 *) arg; + const SDL_MessageBoxDataX11 *data = (const SDL_MessageBoxDataX11 *)arg; return ((event->xany.display == data->display) && (event->xany.window == data->window)) ? True : False; } /* Loop and handle message box event messages until something kills it. */ -static int -X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) +static int X11_MessageBoxLoop(SDL_MessageBoxDataX11 *data) { GC ctx; XGCValues ctx_vals; @@ -616,38 +606,39 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) unsigned long gcflags = GCForeground | GCBackground; SDL_zero(ctx_vals); - ctx_vals.foreground = data->color[ SDL_MESSAGEBOX_COLOR_BACKGROUND ]; - ctx_vals.background = data->color[ SDL_MESSAGEBOX_COLOR_BACKGROUND ]; + ctx_vals.foreground = data->color[SDL_MESSAGEBOX_COLOR_BACKGROUND]; + ctx_vals.background = data->color[SDL_MESSAGEBOX_COLOR_BACKGROUND]; if (!SDL_X11_HAVE_UTF8) { gcflags |= GCFont; ctx_vals.font = data->font_struct->fid; } - ctx = X11_XCreateGC( data->display, data->window, gcflags, &ctx_vals ); - if ( ctx == None ) { + ctx = X11_XCreateGC(data->display, data->window, gcflags, &ctx_vals); + if (ctx == None) { return SDL_SetError("Couldn't create graphics context"); } - data->button_press_index = -1; /* Reset what button is currently depressed. */ - data->mouse_over_index = -1; /* Reset what button the mouse is over. */ + data->button_press_index = -1; /* Reset what button is currently depressed. */ + data->mouse_over_index = -1; /* Reset what button the mouse is over. */ - while( !close_dialog ) { + while (!close_dialog) { XEvent e; SDL_bool draw = SDL_TRUE; /* can't use XWindowEvent() because it can't handle ClientMessage events. */ /* can't use XNextEvent() because we only want events for this window. */ - X11_XIfEvent( data->display, &e, X11_MessageBoxEventTest, (XPointer) data ); + X11_XIfEvent(data->display, &e, X11_MessageBoxEventTest, (XPointer)data); /* If X11_XFilterEvent returns True, then some input method has filtered the event, and the client should discard the event. */ - if ( ( e.type != Expose ) && X11_XFilterEvent( &e, None ) ) + if ((e.type != Expose) && X11_XFilterEvent(&e, None)) { continue; + } - switch( e.type ) { + switch (e.type) { case Expose: - if ( e.xexpose.count > 0 ) { + if (e.xexpose.count > 0) { draw = SDL_FALSE; } break; @@ -665,10 +656,10 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) break; case MotionNotify: - if ( has_focus ) { + if (has_focus) { /* Mouse moved... */ const int previndex = data->mouse_over_index; - data->mouse_over_index = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y ); + data->mouse_over_index = GetHitButtonIndex(data, e.xbutton.x, e.xbutton.y); if (data->mouse_over_index == previndex) { draw = SDL_FALSE; } @@ -676,39 +667,42 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) break; case ClientMessage: - if ( e.xclient.message_type == data->wm_protocols && - e.xclient.format == 32 && - e.xclient.data.l[ 0 ] == data->wm_delete_message ) { + if (e.xclient.message_type == data->wm_protocols && + e.xclient.format == 32 && + e.xclient.data.l[0] == data->wm_delete_message) { close_dialog = SDL_TRUE; } break; case KeyPress: /* Store key press - we make sure in key release that we got both. */ - last_key_pressed = X11_XLookupKeysym( &e.xkey, 0 ); + last_key_pressed = X11_XLookupKeysym(&e.xkey, 0); break; - case KeyRelease: { + case KeyRelease: + { Uint32 mask = 0; - KeySym key = X11_XLookupKeysym( &e.xkey, 0 ); + KeySym key = X11_XLookupKeysym(&e.xkey, 0); /* If this is a key release for something we didn't get the key down for, then bail. */ - if ( key != last_key_pressed ) + if (key != last_key_pressed) { break; + } - if ( key == XK_Escape ) + if (key == XK_Escape) { mask = SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT; - else if ( ( key == XK_Return ) || ( key == XK_KP_Enter ) ) + } else if ((key == XK_Return) || (key == XK_KP_Enter)) { mask = SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT; + } - if ( mask ) { + if (mask) { int i; /* Look for first button with this mask set, and return it if found. */ - for ( i = 0; i < data->numbuttons; i++ ) { - SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[ i ]; + for (i = 0; i < data->numbuttons; i++) { + SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[i]; - if ( buttondatax11->buttondata->flags & mask ) { + if (buttondatax11->buttondata->flags & mask) { *data->pbuttonid = buttondatax11->buttondata->buttonid; close_dialog = SDL_TRUE; break; @@ -720,19 +714,19 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) case ButtonPress: data->button_press_index = -1; - if ( e.xbutton.button == Button1 ) { + if (e.xbutton.button == Button1) { /* Find index of button they clicked on. */ - data->button_press_index = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y ); + data->button_press_index = GetHitButtonIndex(data, e.xbutton.x, e.xbutton.y); } break; case ButtonRelease: /* If button is released over the same button that was clicked down on, then return it. */ - if ( ( e.xbutton.button == Button1 ) && ( data->button_press_index >= 0 ) ) { - int button = GetHitButtonIndex( data, e.xbutton.x, e.xbutton.y ); + if ((e.xbutton.button == Button1) && (data->button_press_index >= 0)) { + int button = GetHitButtonIndex(data, e.xbutton.x, e.xbutton.y); - if ( data->button_press_index == button ) { - SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[ button ]; + if (data->button_press_index == button) { + SDL_MessageBoxButtonDataX11 *buttondatax11 = &data->buttonpos[button]; *data->pbuttonid = buttondatax11->buttondata->buttonid; close_dialog = SDL_TRUE; @@ -742,18 +736,17 @@ X11_MessageBoxLoop( SDL_MessageBoxDataX11 *data ) break; } - if ( draw ) { + if (draw) { /* Draw our dialog box. */ - X11_MessageBoxDraw( data, ctx ); + X11_MessageBoxDraw(data, ctx); } } - X11_XFreeGC( data->display, ctx ); + X11_XFreeGC(data->display, ctx); return 0; } -static int -X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) +static int X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) { int ret; SDL_MessageBoxDataX11 data; @@ -763,8 +756,9 @@ X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) SDL_zero(data); - if ( !SDL_X11_LoadSymbols() ) + if (!SDL_X11_LoadSymbols()) { return -1; + } #if SDL_SET_LOCALE origlocale = setlocale(LC_ALL, NULL); @@ -773,7 +767,7 @@ X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) if (origlocale == NULL) { return SDL_OutOfMemory(); } - setlocale(LC_ALL, ""); + (void)setlocale(LC_ALL, ""); } #endif @@ -784,22 +778,22 @@ X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) *buttonid = -1; /* Init and display the message box. */ - ret = X11_MessageBoxInit( &data, messageboxdata, buttonid ); - if ( ret != -1 ) { - ret = X11_MessageBoxInitPositions( &data ); - if ( ret != -1 ) { - ret = X11_MessageBoxCreateWindow( &data ); - if ( ret != -1 ) { - ret = X11_MessageBoxLoop( &data ); + ret = X11_MessageBoxInit(&data, messageboxdata, buttonid); + if (ret != -1) { + ret = X11_MessageBoxInitPositions(&data); + if (ret != -1) { + ret = X11_MessageBoxCreateWindow(&data); + if (ret != -1) { + ret = X11_MessageBoxLoop(&data); } } } - X11_MessageBoxShutdown( &data ); + X11_MessageBoxShutdown(&data); #if SDL_SET_LOCALE if (origlocale) { - setlocale(LC_ALL, origlocale); + (void)setlocale(LC_ALL, origlocale); SDL_free(origlocale); } #endif @@ -808,8 +802,7 @@ X11_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid) } /* Display an x11 message box. */ -int -X11_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) +int X11_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { #if SDL_FORK_MESSAGEBOX /* Use a child process to protect against setlocale(). Annoying. */ @@ -822,34 +815,34 @@ X11_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) } pid = fork(); - if (pid == -1) { /* failed */ + if (pid == -1) { /* failed */ close(fds[0]); close(fds[1]); return X11_ShowMessageBoxImpl(messageboxdata, buttonid); /* oh well. */ - } else if (pid == 0) { /* we're the child */ + } else if (pid == 0) { /* we're the child */ int exitcode = 0; close(fds[0]); status = X11_ShowMessageBoxImpl(messageboxdata, buttonid); - if (write(fds[1], &status, sizeof (int)) != sizeof (int)) { + if (write(fds[1], &status, sizeof(int)) != sizeof(int)) { exitcode = 1; - } else if (write(fds[1], buttonid, sizeof (int)) != sizeof (int)) { + } else if (write(fds[1], buttonid, sizeof(int)) != sizeof(int)) { exitcode = 1; } close(fds[1]); - _exit(exitcode); /* don't run atexit() stuff, static destructors, etc. */ - } else { /* we're the parent */ + _exit(exitcode); /* don't run atexit() stuff, static destructors, etc. */ + } else { /* we're the parent */ pid_t rc; close(fds[1]); do { rc = waitpid(pid, &status, 0); } while ((rc == -1) && (errno == EINTR)); - SDL_assert(rc == pid); /* not sure what to do if this fails. */ + SDL_assert(rc == pid); /* not sure what to do if this fails. */ if ((rc == -1) || (!WIFEXITED(status)) || (WEXITSTATUS(status) != 0)) { status = SDL_SetError("msgbox child process failed"); - } else if ( (read(fds[0], &status, sizeof (int)) != sizeof (int)) || - (read(fds[0], buttonid, sizeof (int)) != sizeof (int)) ) { + } else if ((read(fds[0], &status, sizeof(int)) != sizeof(int)) || + (read(fds[0], buttonid, sizeof(int)) != sizeof(int))) { status = SDL_SetError("read from msgbox child process failed"); *buttonid = 0; } diff --git a/modules/SDL2/src/video/x11/SDL_x11modes.c b/modules/SDL2/src/video/x11/SDL_x11modes.c index b20d99c..e3c24b2 100644 --- a/modules/SDL2/src/video/x11/SDL_x11modes.c +++ b/modules/SDL2/src/video/x11/SDL_x11modes.c @@ -38,12 +38,10 @@ * fullscreen state hint but be decorated and windowed. * * However, many people swear by it, so let them swear at it. :) -*/ + */ /* #define XRANDR_DISABLED_BY_DEFAULT */ - -static int -get_visualinfo(Display * display, int screen, XVisualInfo * vinfo) +static int get_visualinfo(Display *display, int screen, XVisualInfo *vinfo) { const char *visual_id = SDL_getenv("SDL_VIDEO_X11_VISUALID"); int depth; @@ -74,8 +72,7 @@ get_visualinfo(Display * display, int screen, XVisualInfo * vinfo) return -1; } -int -X11_GetVisualInfoFromVisual(Display * display, Visual * visual, XVisualInfo * vinfo) +int X11_GetVisualInfoFromVisual(Display *display, Visual *visual, XVisualInfo *vinfo) { XVisualInfo *vi; int nvis; @@ -90,8 +87,7 @@ X11_GetVisualInfoFromVisual(Display * display, Visual * visual, XVisualInfo * vi return -1; } -Uint32 -X11_GetPixelFormatFromVisualInfo(Display * display, XVisualInfo * vinfo) +Uint32 X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo) { if (vinfo->class == DirectColor || vinfo->class == TrueColor) { int bpp; @@ -149,8 +145,7 @@ X11_GetPixelFormatFromVisualInfo(Display * display, XVisualInfo * vinfo) } #if SDL_VIDEO_DRIVER_X11_XRANDR -static SDL_bool -CheckXRandR(Display * display, int *major, int *minor) +static SDL_bool CheckXRandR(Display *display, int *major, int *minor) { /* Default the extension not available */ *major = *minor = 0; @@ -180,7 +175,8 @@ CheckXRandR(Display * display, int *major, int *minor) } /* Query the extension version */ - *major = 1; *minor = 3; /* we want 1.3 */ + *major = 1; + *minor = 3; /* we want 1.3 */ if (!X11_XRRQueryVersion(display, major, minor)) { #ifdef X11MODES_DEBUG printf("XRandR not active on the display\n"); @@ -194,19 +190,16 @@ CheckXRandR(Display * display, int *major, int *minor) return SDL_TRUE; } -#define XRANDR_ROTATION_LEFT (1 << 1) -#define XRANDR_ROTATION_RIGHT (1 << 3) +#define XRANDR_ROTATION_LEFT (1 << 1) +#define XRANDR_ROTATION_RIGHT (1 << 3) -static int -CalculateXRandRRefreshRate(const XRRModeInfo *info) +static int CalculateXRandRRefreshRate(const XRRModeInfo *info) { - return (info->hTotal && info->vTotal) ? - SDL_round(((double)info->dotClock / (double)(info->hTotal * info->vTotal))) : 0; + return (info->hTotal && info->vTotal) ? SDL_round(((double)info->dotClock / (double)(info->hTotal * info->vTotal))) : 0; } -static SDL_bool -SetXRandRModeInfo(Display *display, XRRScreenResources *res, RRCrtc crtc, - RRMode modeID, SDL_DisplayMode *mode) +static SDL_bool SetXRandRModeInfo(Display *display, XRRScreenResources *res, RRCrtc crtc, + RRMode modeID, SDL_DisplayMode *mode) { int i; for (i = 0; i < res->nmode; ++i) { @@ -221,7 +214,7 @@ SetXRandRModeInfo(Display *display, XRRScreenResources *res, RRCrtc crtc, X11_XRRFreeCrtcInfo(crtcinfo); } - if (rotation & (XRANDR_ROTATION_LEFT|XRANDR_ROTATION_RIGHT)) { + if (rotation & (XRANDR_ROTATION_LEFT | XRANDR_ROTATION_RIGHT)) { mode->w = info->height; mode->h = info->width; } else { @@ -229,9 +222,9 @@ SetXRandRModeInfo(Display *display, XRRScreenResources *res, RRCrtc crtc, mode->h = info->height; } mode->refresh_rate = CalculateXRandRRefreshRate(info); - ((SDL_DisplayModeData*)mode->driverdata)->xrandr_mode = modeID; + ((SDL_DisplayModeData *)mode->driverdata)->xrandr_mode = modeID; #ifdef X11MODES_DEBUG - printf("XRandR mode %d: %dx%d@%dHz\n", (int) modeID, mode->w, mode->h, mode->refresh_rate); + printf("XRandR mode %d: %dx%d@%dHz\n", (int)modeID, mode->w, mode->h, mode->refresh_rate); #endif return SDL_TRUE; } @@ -239,8 +232,7 @@ SetXRandRModeInfo(Display *display, XRRScreenResources *res, RRCrtc crtc, return SDL_FALSE; } -static void -SetXRandRDisplayName(Display *dpy, Atom EDID, char *name, const size_t namelen, RROutput output, const unsigned long widthmm, const unsigned long heightmm) +static void SetXRandRDisplayName(Display *dpy, Atom EDID, char *name, const size_t namelen, RROutput output, const unsigned long widthmm, const unsigned long heightmm) { /* See if we can get the EDID data for the real monitor name */ int inches; @@ -281,7 +273,7 @@ SetXRandRDisplayName(Display *dpy, Atom EDID, char *name, const size_t namelen, inches = (int)((SDL_sqrtf(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f); if (*name && inches) { const size_t len = SDL_strlen(name); - SDL_snprintf(&name[len], namelen-len, " %d\"", inches); + (void)SDL_snprintf(&name[len], namelen - len, " %d\"", inches); } #ifdef X11MODES_DEBUG @@ -289,9 +281,7 @@ SetXRandRDisplayName(Display *dpy, Atom EDID, char *name, const size_t namelen, #endif } - -static int -X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScreenResources *res, SDL_bool send_event) +static int X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScreenResources *res, SDL_bool send_event) { Atom EDID = X11_XInternAtom(dpy, "EDID", False); XRROutputInfo *output_info; @@ -312,12 +302,12 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre int i, n; if (get_visualinfo(dpy, screen, &vinfo) < 0) { - return 0; /* uh, skip this screen? */ + return 0; /* uh, skip this screen? */ } pixelformat = X11_GetPixelFormatFromVisualInfo(dpy, &vinfo); if (SDL_ISPIXELFORMAT_INDEXED(pixelformat)) { - return 0; /* Palettized video modes are no longer supported, ignore this one. */ + return 0; /* Palettized video modes are no longer supported, ignore this one. */ } scanline_pad = SDL_BYTESPERPIXEL(pixelformat) * 8; @@ -333,9 +323,9 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre } output_info = X11_XRRGetOutputInfo(dpy, res, outputid); - if (!output_info || !output_info->crtc || output_info->connection == RR_Disconnected) { + if (output_info == NULL || !output_info->crtc || output_info->connection == RR_Disconnected) { X11_XRRFreeOutputInfo(output_info); - return 0; /* ignore this one. */ + return 0; /* ignore this one. */ } SDL_strlcpy(display_name, output_info->name, sizeof(display_name)); @@ -345,8 +335,8 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre X11_XRRFreeOutputInfo(output_info); crtc = X11_XRRGetCrtcInfo(dpy, res, output_crtc); - if (!crtc) { - return 0; /* oh well, ignore it. */ + if (crtc == NULL) { + return 0; /* oh well, ignore it. */ } SDL_zero(mode); @@ -360,13 +350,13 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre X11_XRRFreeCrtcInfo(crtc); - displaydata = (SDL_DisplayData *) SDL_calloc(1, sizeof(*displaydata)); - if (!displaydata) { + displaydata = (SDL_DisplayData *)SDL_calloc(1, sizeof(*displaydata)); + if (displaydata == NULL) { return SDL_OutOfMemory(); } - modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData)); - if (!modedata) { + modedata = (SDL_DisplayModeData *)SDL_calloc(1, sizeof(SDL_DisplayModeData)); + if (modedata == NULL) { SDL_free(displaydata); return SDL_OutOfMemory(); } @@ -377,9 +367,9 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre displaydata->screen = screen; displaydata->visual = vinfo.visual; displaydata->depth = vinfo.depth; - displaydata->hdpi = display_mm_width ? (((float) mode.w) * 25.4f / display_mm_width) : 0.0f; - displaydata->vdpi = display_mm_height ? (((float) mode.h) * 25.4f / display_mm_height) : 0.0f; - displaydata->ddpi = SDL_ComputeDiagonalDPI(mode.w, mode.h, ((float) display_mm_width) / 25.4f,((float) display_mm_height) / 25.4f); + displaydata->hdpi = display_mm_width ? (((float)mode.w) * 25.4f / display_mm_width) : 0.0f; + displaydata->vdpi = display_mm_height ? (((float)mode.h) * 25.4f / display_mm_height) : 0.0f; + displaydata->ddpi = SDL_ComputeDiagonalDPI(mode.w, mode.h, ((float)display_mm_width) / 25.4f, ((float)display_mm_height) / 25.4f); displaydata->scanline_pad = scanline_pad; displaydata->x = display_x; displaydata->y = display_y; @@ -387,7 +377,7 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre displaydata->xrandr_output = outputid; SetXRandRModeInfo(dpy, res, output_crtc, modeID, &mode); - SetXRandRDisplayName(dpy, EDID, display_name, sizeof (display_name), outputid, display_mm_width, display_mm_height); + SetXRandRDisplayName(dpy, EDID, display_name, sizeof(display_name), outputid, display_mm_width, display_mm_height); SDL_zero(display); if (*display_name) { @@ -399,21 +389,20 @@ X11_AddXRandRDisplay(_THIS, Display *dpy, int screen, RROutput outputid, XRRScre return SDL_AddVideoDisplay(&display, send_event); } -static void -X11_HandleXRandROutputChange(_THIS, const XRROutputChangeNotifyEvent *ev) +static void X11_HandleXRandROutputChange(_THIS, const XRROutputChangeNotifyEvent *ev) { const int num_displays = SDL_GetNumVideoDisplays(); SDL_VideoDisplay *display = NULL; int displayidx = -1; int i; - #if 0 +#if 0 printf("XRROutputChangeNotifyEvent! [output=%u, crtc=%u, mode=%u, rotation=%u, connection=%u]", (unsigned int) ev->output, (unsigned int) ev->crtc, (unsigned int) ev->mode, (unsigned int) ev->rotation, (unsigned int) ev->connection); - #endif +#endif for (i = 0; i < num_displays; i++) { SDL_VideoDisplay *thisdisplay = SDL_GetDisplay(i); - const SDL_DisplayData *displaydata = (const SDL_DisplayData *) thisdisplay->driverdata; + const SDL_DisplayData *displaydata = (const SDL_DisplayData *)thisdisplay->driverdata; if (displaydata->xrandr_output == ev->output) { display = thisdisplay; displayidx = i; @@ -423,11 +412,11 @@ X11_HandleXRandROutputChange(_THIS, const XRROutputChangeNotifyEvent *ev) SDL_assert((displayidx == -1) == (display == NULL)); - if (ev->connection == RR_Disconnected) { /* output is going away */ + if (ev->connection == RR_Disconnected) { /* output is going away */ if (display != NULL) { SDL_DelVideoDisplay(displayidx); } - } else if (ev->connection == RR_Connected) { /* output is coming online */ + } else if (ev->connection == RR_Connected) { /* output is coming online */ if (display != NULL) { /* !!! FIXME: update rotation or current mode of existing display? */ } else { @@ -436,7 +425,7 @@ X11_HandleXRandROutputChange(_THIS, const XRROutputChangeNotifyEvent *ev) XVisualInfo vinfo; if (get_visualinfo(dpy, screen, &vinfo) == 0) { XRRScreenResources *res = X11_XRRGetScreenResourcesCurrent(dpy, RootWindow(dpy, screen)); - if (!res || res->noutput == 0) { + if (res == NULL || res->noutput == 0) { if (res) { X11_XRRFreeScreenResources(res); } @@ -452,26 +441,23 @@ X11_HandleXRandROutputChange(_THIS, const XRROutputChangeNotifyEvent *ev) } } -void -X11_HandleXRandREvent(_THIS, const XEvent *xevent) +void X11_HandleXRandREvent(_THIS, const XEvent *xevent) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_assert(xevent->type == (videodata->xrandr_event_base + RRNotify)); - switch (((const XRRNotifyEvent *) xevent)->subtype) { - case RRNotify_OutputChange: - X11_HandleXRandROutputChange(_this, (const XRROutputChangeNotifyEvent *) xevent); - break; - default: - break; + switch (((const XRRNotifyEvent *)xevent)->subtype) { + case RRNotify_OutputChange: + X11_HandleXRandROutputChange(_this, (const XRROutputChangeNotifyEvent *)xevent); + break; + default: + break; } } - -static int -X11_InitModes_XRandR(_THIS) +static int X11_InitModes_XRandR(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *dpy = data->display; const int screencount = ScreenCount(dpy); const int default_screen = DefaultScreen(dpy); @@ -495,13 +481,13 @@ X11_InitModes_XRandR(_THIS) } res = X11_XRRGetScreenResourcesCurrent(dpy, RootWindow(dpy, screen)); - if (!res || res->noutput == 0) { + if (res == NULL || res->noutput == 0) { if (res) { X11_XRRFreeScreenResources(res); } res = X11_XRRGetScreenResources(dpy, RootWindow(dpy, screen)); - if (!res) { + if (res == NULL) { continue; } } @@ -532,15 +518,14 @@ X11_InitModes_XRandR(_THIS) } #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */ -static int -GetXftDPI(Display* dpy) +static int GetXftDPI(Display *dpy) { - char* xdefault_resource; + char *xdefault_resource; int xft_dpi, err; xdefault_resource = X11_XGetDefault(dpy, "Xft", "dpi"); - if(!xdefault_resource) { + if (xdefault_resource == NULL) { return 0; } @@ -562,7 +547,7 @@ GetXftDPI(Display* dpy) static int X11_InitModes_StdXlib(_THIS) { /* !!! FIXME: a lot of copy/paste from X11_InitModes_XRandR in this function. */ - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *dpy = data->display; const int default_screen = DefaultScreen(dpy); Screen *screen = ScreenOfDisplay(dpy, default_screen); @@ -590,15 +575,15 @@ static int X11_InitModes_StdXlib(_THIS) mode.w = WidthOfScreen(screen); mode.h = HeightOfScreen(screen); mode.format = pixelformat; - mode.refresh_rate = 0; /* don't know it, sorry. */ + mode.refresh_rate = 0; /* don't know it, sorry. */ - displaydata = (SDL_DisplayData *) SDL_calloc(1, sizeof(*displaydata)); - if (!displaydata) { + displaydata = (SDL_DisplayData *)SDL_calloc(1, sizeof(*displaydata)); + if (displaydata == NULL) { return SDL_OutOfMemory(); } - modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData)); - if (!modedata) { + modedata = (SDL_DisplayModeData *)SDL_calloc(1, sizeof(SDL_DisplayModeData)); + if (modedata == NULL) { SDL_free(displaydata); return SDL_OutOfMemory(); } @@ -610,12 +595,12 @@ static int X11_InitModes_StdXlib(_THIS) displaydata->screen = default_screen; displaydata->visual = vinfo.visual; displaydata->depth = vinfo.depth; - displaydata->hdpi = display_mm_width ? (((float) mode.w) * 25.4f / display_mm_width) : 0.0f; - displaydata->vdpi = display_mm_height ? (((float) mode.h) * 25.4f / display_mm_height) : 0.0f; - displaydata->ddpi = SDL_ComputeDiagonalDPI(mode.w, mode.h, ((float) display_mm_width) / 25.4f,((float) display_mm_height) / 25.4f); + displaydata->hdpi = display_mm_width ? (((float)mode.w) * 25.4f / display_mm_width) : 0.0f; + displaydata->vdpi = display_mm_height ? (((float)mode.h) * 25.4f / display_mm_height) : 0.0f; + displaydata->ddpi = SDL_ComputeDiagonalDPI(mode.w, mode.h, ((float)display_mm_width) / 25.4f, ((float)display_mm_height) / 25.4f); xft_dpi = GetXftDPI(dpy); - if(xft_dpi > 0) { + if (xft_dpi > 0) { displaydata->hdpi = (float)xft_dpi; displaydata->vdpi = (float)xft_dpi; } @@ -638,7 +623,7 @@ static int X11_InitModes_StdXlib(_THIS) displaydata->use_xrandr = SDL_FALSE; SDL_zero(display); - display.name = (char *) "Generic X11 Display"; /* this is just copied and thrown away, it's safe to cast to char* here. */ + display.name = (char *)"Generic X11 Display"; /* this is just copied and thrown away, it's safe to cast to char* here. */ display.desktop_mode = mode; display.current_mode = mode; display.driverdata = displaydata; @@ -647,21 +632,20 @@ static int X11_InitModes_StdXlib(_THIS) return 0; } - -int -X11_InitModes(_THIS) +int X11_InitModes(_THIS) { /* XRandR is the One True Modern Way to do this on X11. If this fails, we just won't report any display modes except the current desktop size. */ #if SDL_VIDEO_DRIVER_X11_XRANDR { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int xrandr_major, xrandr_minor; /* require at least XRandR v1.3 */ if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) && - (xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3))) { - return X11_InitModes_XRandR(_this); + (xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3)) && + X11_InitModes_XRandR(_this) == 0) { + return 0; } } #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */ @@ -670,10 +654,9 @@ X11_InitModes(_THIS) return X11_InitModes_StdXlib(_this); } -void -X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display) +void X11_GetDisplayModes(_THIS, SDL_VideoDisplay *sdl_display) { - SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata; + SDL_DisplayData *data = (SDL_DisplayData *)sdl_display->driverdata; SDL_DisplayMode mode; /* Unfortunately X11 requires the window to be created with the correct @@ -687,10 +670,10 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display) #if SDL_VIDEO_DRIVER_X11_XRANDR if (data->use_xrandr) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; XRRScreenResources *res; - res = X11_XRRGetScreenResources (display, RootWindow(display, data->screen)); + res = X11_XRRGetScreenResources(display, RootWindow(display, data->screen)); if (res) { SDL_DisplayModeData *modedata; XRROutputInfo *output_info; @@ -699,8 +682,8 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display) output_info = X11_XRRGetOutputInfo(display, res, data->xrandr_output); if (output_info && output_info->connection != RR_Disconnected) { for (i = 0; i < output_info->nmode; ++i) { - modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData)); - if (!modedata) { + modedata = (SDL_DisplayModeData *)SDL_calloc(1, sizeof(SDL_DisplayModeData)); + if (modedata == NULL) { continue; } mode.driverdata = modedata; @@ -722,7 +705,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display) SDL_DisplayModeData *modedata; /* Add the desktop mode */ mode = sdl_display->desktop_mode; - modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData)); + modedata = (SDL_DisplayModeData *)SDL_calloc(1, sizeof(SDL_DisplayModeData)); if (modedata) { *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata; } @@ -737,8 +720,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display) /* This catches an error from XRRSetScreenSize, as a workaround for now. */ /* !!! FIXME: remove this later when we have a better solution. */ static int (*PreXRRSetScreenSizeErrorHandler)(Display *, XErrorEvent *) = NULL; -static int -SDL_XRRSetScreenSizeErrHandler(Display *d, XErrorEvent *e) +static int SDL_XRRSetScreenSizeErrHandler(Display *d, XErrorEvent *e) { /* BadMatch: https://github.com/libsdl-org/SDL/issues/4561 */ /* BadValue: https://github.com/libsdl-org/SDL/issues/4840 */ @@ -750,11 +732,10 @@ SDL_XRRSetScreenSizeErrHandler(Display *d, XErrorEvent *e) } #endif -int -X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode) +int X11_SetDisplayMode(_THIS, SDL_VideoDisplay *sdl_display, SDL_DisplayMode *mode) { - SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; - SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata; + SDL_VideoData *viddata = (SDL_VideoData *)_this->driverdata; + SDL_DisplayData *data = (SDL_DisplayData *)sdl_display->driverdata; viddata->last_mode_change_deadline = SDL_GetTicks() + (PENDING_FOCUS_TIME * 2); @@ -768,19 +749,19 @@ X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode XRRCrtcInfo *crtc; Status status; - res = X11_XRRGetScreenResources (display, RootWindow(display, data->screen)); - if (!res) { + res = X11_XRRGetScreenResources(display, RootWindow(display, data->screen)); + if (res == NULL) { return SDL_SetError("Couldn't get XRandR screen resources"); } output_info = X11_XRRGetOutputInfo(display, res, data->xrandr_output); - if (!output_info || output_info->connection == RR_Disconnected) { + if (output_info == NULL || output_info->connection == RR_Disconnected) { X11_XRRFreeScreenResources(res); return SDL_SetError("Couldn't get XRandR output info"); } crtc = X11_XRRGetCrtcInfo(display, res, output_info->crtc); - if (!crtc) { + if (crtc == NULL) { X11_XRRFreeOutputInfo(output_info); X11_XRRFreeScreenResources(res); return SDL_SetError("Couldn't get XRandR crtc info"); @@ -797,7 +778,7 @@ X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode X11_XGrabServer(display); status = X11_XRRSetCrtcConfig(display, res, output_info->crtc, CurrentTime, - 0, 0, None, crtc->rotation, NULL, 0); + 0, 0, None, crtc->rotation, NULL, 0); if (status != Success) { goto ungrabServer; } @@ -818,13 +799,13 @@ X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode X11_XSync(display, False); X11_XSetErrorHandler(PreXRRSetScreenSizeErrorHandler); - status = X11_XRRSetCrtcConfig (display, res, output_info->crtc, CurrentTime, - crtc->x, crtc->y, modedata->xrandr_mode, crtc->rotation, - &data->xrandr_output, 1); + status = X11_XRRSetCrtcConfig(display, res, output_info->crtc, CurrentTime, + crtc->x, crtc->y, modedata->xrandr_mode, crtc->rotation, + &data->xrandr_output, 1); -ungrabServer: + ungrabServer: X11_XUngrabServer(display); -freeInfo: + freeInfo: X11_XRRFreeCrtcInfo(crtc); X11_XRRFreeOutputInfo(output_info); X11_XRRFreeScreenResources(res); @@ -840,15 +821,13 @@ freeInfo: return 0; } -void -X11_QuitModes(_THIS) +void X11_QuitModes(_THIS) { } -int -X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect) +int X11_GetDisplayBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect) { - SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata; + SDL_DisplayData *data = (SDL_DisplayData *)sdl_display->driverdata; rect->x = data->x; rect->y = data->y; @@ -858,10 +837,9 @@ X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect) return 0; } -int -X11_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float * hdpi, float * vdpi) +int X11_GetDisplayDPI(_THIS, SDL_VideoDisplay *sdl_display, float *ddpi, float *hdpi, float *vdpi) { - SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata; + SDL_DisplayData *data = (SDL_DisplayData *)sdl_display->driverdata; if (ddpi) { *ddpi = data->ddpi; @@ -876,10 +854,9 @@ X11_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float * h return data->ddpi != 0.0f ? 0 : SDL_SetError("Couldn't get DPI"); } -int -X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect) +int X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *display = data->display; Atom _NET_WORKAREA; int status, real_format; @@ -898,7 +875,7 @@ X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rec &real_type, &real_format, &items_read, &items_left, &propdata); if ((status == Success) && (items_read >= 4)) { - const long *p = (long*) propdata; + const long *p = (long *)propdata; const SDL_Rect usable = { (int)p[0], (int)p[1], (int)p[2], (int)p[3] }; retval = 0; if (!SDL_IntersectRect(rect, &usable, rect)) { diff --git a/modules/SDL2/src/video/x11/SDL_x11modes.h b/modules/SDL2/src/video/x11/SDL_x11modes.h index 8979a15..178c727 100644 --- a/modules/SDL2/src/video/x11/SDL_x11modes.h +++ b/modules/SDL2/src/video/x11/SDL_x11modes.h @@ -47,23 +47,23 @@ typedef struct #if SDL_VIDEO_DRIVER_X11_XRANDR RRMode xrandr_mode; #else - int unused; /* just so struct isn't empty. */ + int unused; /* just so struct isn't empty. */ #endif } SDL_DisplayModeData; extern int X11_InitModes(_THIS); -extern void X11_GetDisplayModes(_THIS, SDL_VideoDisplay * display); -extern int X11_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); +extern void X11_GetDisplayModes(_THIS, SDL_VideoDisplay *display); +extern int X11_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); extern void X11_QuitModes(_THIS); /* Some utility functions for working with visuals */ -extern int X11_GetVisualInfoFromVisual(Display * display, Visual * visual, - XVisualInfo * vinfo); -extern Uint32 X11_GetPixelFormatFromVisualInfo(Display * display, - XVisualInfo * vinfo); -extern int X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect); -extern int X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect); -extern int X11_GetDisplayDPI(_THIS, SDL_VideoDisplay * sdl_display, float * ddpi, float * hdpi, float * vdpi); +extern int X11_GetVisualInfoFromVisual(Display *display, Visual *visual, + XVisualInfo *vinfo); +extern Uint32 X11_GetPixelFormatFromVisualInfo(Display *display, + XVisualInfo *vinfo); +extern int X11_GetDisplayBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect); +extern int X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect); +extern int X11_GetDisplayDPI(_THIS, SDL_VideoDisplay *sdl_display, float *ddpi, float *hdpi, float *vdpi); #if SDL_VIDEO_DRIVER_X11_XRANDR extern void X11_HandleXRandREvent(_THIS, const XEvent *xevent); diff --git a/modules/SDL2/src/video/x11/SDL_x11mouse.c b/modules/SDL2/src/video/x11/SDL_x11mouse.c index f61b861..978a305 100644 --- a/modules/SDL2/src/video/x11/SDL_x11mouse.c +++ b/modules/SDL2/src/video/x11/SDL_x11mouse.c @@ -28,18 +28,15 @@ #include "SDL_x11xinput2.h" #include "../../events/SDL_mouse_c.h" - /* FIXME: Find a better place to put this... */ static Cursor x11_empty_cursor = None; -static Display * -GetDisplay(void) +static Display *GetDisplay(void) { return ((SDL_VideoData *)SDL_GetVideoDevice()->driverdata)->display; } -static Cursor -X11_CreateEmptyCursor() +static Cursor X11_CreateEmptyCursor() { if (x11_empty_cursor == None) { Display *display = GetDisplay(); @@ -50,18 +47,17 @@ X11_CreateEmptyCursor() SDL_zeroa(data); color.red = color.green = color.blue = 0; pixmap = X11_XCreateBitmapFromData(display, DefaultRootWindow(display), - data, 1, 1); + data, 1, 1); if (pixmap) { x11_empty_cursor = X11_XCreatePixmapCursor(display, pixmap, pixmap, - &color, &color, 0, 0); + &color, &color, 0, 0); X11_XFreePixmap(display, pixmap); } } return x11_empty_cursor; } -static void -X11_DestroyEmptyCursor(void) +static void X11_DestroyEmptyCursor(void) { if (x11_empty_cursor != None) { X11_XFreeCursor(GetDisplay(), x11_empty_cursor); @@ -69,15 +65,14 @@ X11_DestroyEmptyCursor(void) } } -static SDL_Cursor * -X11_CreateDefaultCursor() +static SDL_Cursor *X11_CreateDefaultCursor() { SDL_Cursor *cursor; cursor = SDL_calloc(1, sizeof(*cursor)); if (cursor) { /* None is used to indicate the default cursor */ - cursor->driverdata = (void*)(uintptr_t)None; + cursor->driverdata = (void *)(uintptr_t)None; } else { SDL_OutOfMemory(); } @@ -86,15 +81,14 @@ X11_CreateDefaultCursor() } #if SDL_VIDEO_DRIVER_X11_XCURSOR -static Cursor -X11_CreateXCursorCursor(SDL_Surface * surface, int hot_x, int hot_y) +static Cursor X11_CreateXCursorCursor(SDL_Surface *surface, int hot_x, int hot_y) { Display *display = GetDisplay(); Cursor cursor = None; XcursorImage *image; image = X11_XcursorImageCreate(surface->w, surface->h); - if (!image) { + if (image == NULL) { SDL_OutOfMemory(); return None; } @@ -104,7 +98,7 @@ X11_CreateXCursorCursor(SDL_Surface * surface, int hot_x, int hot_y) SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888); SDL_assert(surface->pitch == surface->w * 4); - SDL_memcpy(image->pixels, surface->pixels, surface->h * surface->pitch); + SDL_memcpy(image->pixels, surface->pixels, (size_t)surface->h * surface->pitch); cursor = X11_XcursorImageLoadCursor(display, image); @@ -114,8 +108,7 @@ X11_CreateXCursorCursor(SDL_Surface * surface, int hot_x, int hot_y) } #endif /* SDL_VIDEO_DRIVER_X11_XCURSOR */ -static Cursor -X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) +static Cursor X11_CreatePixmapCursor(SDL_Surface *surface, int hot_x, int hot_y) { Display *display = GetDisplay(); XColor fg, bg; @@ -125,16 +118,16 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) Pixmap data_pixmap, mask_pixmap; int x, y; unsigned int rfg, gfg, bfg, rbg, gbg, bbg, fgBits, bgBits; - unsigned int width_bytes = ((surface->w + 7) & ~7) / 8; + size_t width_bytes = ((surface->w + 7) & ~((size_t)7)) / 8; data_bits = SDL_calloc(1, surface->h * width_bytes); - if (!data_bits) { + if (data_bits == NULL) { SDL_OutOfMemory(); return None; } mask_bits = SDL_calloc(1, surface->h * width_bytes); - if (!mask_bits) { + if (mask_bits == NULL) { SDL_free(data_bits); SDL_OutOfMemory(); return None; @@ -148,9 +141,9 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch); for (x = 0; x < surface->w; ++x) { int alpha = (*ptr >> 24) & 0xff; - int red = (*ptr >> 16) & 0xff; + int red = (*ptr >> 16) & 0xff; int green = (*ptr >> 8) & 0xff; - int blue = (*ptr >> 0) & 0xff; + int blue = (*ptr >> 0) & 0xff; if (alpha > 25) { mask_bits[y * width_bytes + x / 8] |= (0x01 << (x % 8)); @@ -172,27 +165,29 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) } if (fgBits) { - fg.red = rfg * 257 / fgBits; + fg.red = rfg * 257 / fgBits; fg.green = gfg * 257 / fgBits; - fg.blue = bfg * 257 / fgBits; + fg.blue = bfg * 257 / fgBits; + } else { + fg.red = fg.green = fg.blue = 0; } - else fg.red = fg.green = fg.blue = 0; if (bgBits) { - bg.red = rbg * 257 / bgBits; + bg.red = rbg * 257 / bgBits; bg.green = gbg * 257 / bgBits; - bg.blue = bbg * 257 / bgBits; + bg.blue = bbg * 257 / bgBits; + } else { + bg.red = bg.green = bg.blue = 0; } - else bg.red = bg.green = bg.blue = 0; data_pixmap = X11_XCreateBitmapFromData(display, DefaultRootWindow(display), - (char*)data_bits, - surface->w, surface->h); + (char *)data_bits, + surface->w, surface->h); mask_pixmap = X11_XCreateBitmapFromData(display, DefaultRootWindow(display), - (char*)mask_bits, - surface->w, surface->h); + (char *)mask_bits, + surface->w, surface->h); cursor = X11_XCreatePixmapCursor(display, data_pixmap, mask_pixmap, - &fg, &bg, hot_x, hot_y); + &fg, &bg, hot_x, hot_y); X11_XFreePixmap(display, data_pixmap); X11_XFreePixmap(display, mask_pixmap); SDL_free(data_bits); @@ -201,8 +196,7 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) return cursor; } -static SDL_Cursor * -X11_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) +static SDL_Cursor *X11_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) { SDL_Cursor *cursor; @@ -218,7 +212,7 @@ X11_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) if (x11_cursor == None) { x11_cursor = X11_CreatePixmapCursor(surface, hot_x, hot_y); } - cursor->driverdata = (void*)(uintptr_t)x11_cursor; + cursor->driverdata = (void *)(uintptr_t)x11_cursor; } else { SDL_OutOfMemory(); } @@ -226,31 +220,53 @@ X11_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) return cursor; } -static SDL_Cursor * -X11_CreateSystemCursor(SDL_SystemCursor id) +static SDL_Cursor *X11_CreateSystemCursor(SDL_SystemCursor id) { SDL_Cursor *cursor; unsigned int shape; - switch(id) - { + switch (id) { default: SDL_assert(0); return NULL; /* X Font Cursors reference: */ /* http://tronche.com/gui/x/xlib/appendix/b/ */ - case SDL_SYSTEM_CURSOR_ARROW: shape = XC_left_ptr; break; - case SDL_SYSTEM_CURSOR_IBEAM: shape = XC_xterm; break; - case SDL_SYSTEM_CURSOR_WAIT: shape = XC_watch; break; - case SDL_SYSTEM_CURSOR_CROSSHAIR: shape = XC_tcross; break; - case SDL_SYSTEM_CURSOR_WAITARROW: shape = XC_watch; break; - case SDL_SYSTEM_CURSOR_SIZENWSE: shape = XC_top_left_corner; break; - case SDL_SYSTEM_CURSOR_SIZENESW: shape = XC_top_right_corner; break; - case SDL_SYSTEM_CURSOR_SIZEWE: shape = XC_sb_h_double_arrow; break; - case SDL_SYSTEM_CURSOR_SIZENS: shape = XC_sb_v_double_arrow; break; - case SDL_SYSTEM_CURSOR_SIZEALL: shape = XC_fleur; break; - case SDL_SYSTEM_CURSOR_NO: shape = XC_pirate; break; - case SDL_SYSTEM_CURSOR_HAND: shape = XC_hand2; break; + case SDL_SYSTEM_CURSOR_ARROW: + shape = XC_left_ptr; + break; + case SDL_SYSTEM_CURSOR_IBEAM: + shape = XC_xterm; + break; + case SDL_SYSTEM_CURSOR_WAIT: + shape = XC_watch; + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + shape = XC_tcross; + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + shape = XC_watch; + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + shape = XC_top_left_corner; + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + shape = XC_top_right_corner; + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + shape = XC_sb_h_double_arrow; + break; + case SDL_SYSTEM_CURSOR_SIZENS: + shape = XC_sb_v_double_arrow; + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + shape = XC_fleur; + break; + case SDL_SYSTEM_CURSOR_NO: + shape = XC_pirate; + break; + case SDL_SYSTEM_CURSOR_HAND: + shape = XC_hand2; + break; } cursor = SDL_calloc(1, sizeof(*cursor)); @@ -259,7 +275,7 @@ X11_CreateSystemCursor(SDL_SystemCursor id) x11_cursor = X11_XCreateFontCursor(GetDisplay(), shape); - cursor->driverdata = (void*)(uintptr_t)x11_cursor; + cursor->driverdata = (void *)(uintptr_t)x11_cursor; } else { SDL_OutOfMemory(); } @@ -267,8 +283,7 @@ X11_CreateSystemCursor(SDL_SystemCursor id) return cursor; } -static void -X11_FreeCursor(SDL_Cursor * cursor) +static void X11_FreeCursor(SDL_Cursor *cursor) { Cursor x11_cursor = (Cursor)cursor->driverdata; @@ -278,8 +293,7 @@ X11_FreeCursor(SDL_Cursor * cursor) SDL_free(cursor); } -static int -X11_ShowCursor(SDL_Cursor * cursor) +static int X11_ShowCursor(SDL_Cursor *cursor) { Cursor x11_cursor = 0; @@ -310,10 +324,9 @@ X11_ShowCursor(SDL_Cursor * cursor) return 0; } -static void -WarpMouseInternal(Window xwindow, const int x, const int y) +static void WarpMouseInternal(Window xwindow, const int x, const int y) { - SDL_VideoData *videodata = (SDL_VideoData *) SDL_GetVideoDevice()->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata; Display *display = videodata->display; #if SDL_VIDEO_DRIVER_X11_XINPUT2 int deviceid = 0; @@ -334,10 +347,9 @@ WarpMouseInternal(Window xwindow, const int x, const int y) videodata->global_mouse_changed = SDL_TRUE; } -static void -X11_WarpMouse(SDL_Window * window, int x, int y) +static void X11_WarpMouse(SDL_Window *window, int x, int y) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; #if SDL_VIDEO_DRIVER_X11_XFIXES /* If we have no barrier, we need to warp */ @@ -349,33 +361,31 @@ X11_WarpMouse(SDL_Window * window, int x, int y) #endif } -static int -X11_WarpMouseGlobal(int x, int y) +static int X11_WarpMouseGlobal(int x, int y) { WarpMouseInternal(DefaultRootWindow(GetDisplay()), x, y); return 0; } -static int -X11_SetRelativeMouseMode(SDL_bool enabled) +static int X11_SetRelativeMouseMode(SDL_bool enabled) { #if SDL_VIDEO_DRIVER_X11_XINPUT2 - if(X11_Xinput2IsInitialized()) + if (X11_Xinput2IsInitialized()) { return 0; + } #else SDL_Unsupported(); #endif return -1; } -static int -X11_CaptureMouse(SDL_Window *window) +static int X11_CaptureMouse(SDL_Window *window) { Display *display = GetDisplay(); SDL_Window *mouse_focus = SDL_GetMouseFocus(); if (window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; const unsigned int mask = ButtonPressMask | ButtonReleaseMask | PointerMotionMask | FocusChangeMask; Window confined = (data->mouse_grabbed ? data->xwindow : None); const int rc = X11_XGrabPointer(display, data->xwindow, False, @@ -395,10 +405,9 @@ X11_CaptureMouse(SDL_Window *window) return 0; } -static Uint32 -X11_GetGlobalMouseState(int *x, int *y) +static Uint32 X11_GetGlobalMouseState(int *x, int *y) { - SDL_VideoData *videodata = (SDL_VideoData *) SDL_GetVideoDevice()->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata; Display *display = GetDisplay(); const int num_screens = SDL_GetNumVideoDisplays(); int i; @@ -407,13 +416,16 @@ X11_GetGlobalMouseState(int *x, int *y) #if !SDL_VIDEO_DRIVER_X11_XINPUT2 videodata->global_mouse_changed = SDL_TRUE; +#else + if (!SDL_X11_HAVE_XINPUT2) + videodata->global_mouse_changed = SDL_TRUE; #endif /* check if we have this cached since XInput last saw the mouse move. */ /* !!! FIXME: can we just calculate this from XInput's events? */ if (videodata->global_mouse_changed) { for (i = 0; i < num_screens; i++) { - SDL_DisplayData *data = (SDL_DisplayData *) SDL_GetDisplayDriverData(i); + SDL_DisplayData *data = (SDL_DisplayData *)SDL_GetDisplayDriverData(i); if (data != NULL) { Window root, child; int rootx, rooty, winx, winy; @@ -425,7 +437,7 @@ X11_GetGlobalMouseState(int *x, int *y) buttons |= (mask & Button2Mask) ? SDL_BUTTON_MMASK : 0; buttons |= (mask & Button3Mask) ? SDL_BUTTON_RMASK : 0; /* Use the SDL state for the extended buttons - it's better than nothing */ - buttons |= (SDL_GetMouseState(NULL, NULL) & (SDL_BUTTON_X1MASK|SDL_BUTTON_X2MASK)); + buttons |= (SDL_GetMouseState(NULL, NULL) & (SDL_BUTTON_X1MASK | SDL_BUTTON_X2MASK)); /* SDL_DisplayData->x,y point to screen origin, and adding them to mouse coordinates relative to root window doesn't do the right thing * (observed on dual monitor setup with primary display being the rightmost one - mouse was offset to the right). * @@ -441,16 +453,14 @@ X11_GetGlobalMouseState(int *x, int *y) } } - SDL_assert(!videodata->global_mouse_changed); /* The pointer wasn't on any X11 screen?! */ + SDL_assert(!videodata->global_mouse_changed); /* The pointer wasn't on any X11 screen?! */ *x = videodata->global_mouse_position.x; *y = videodata->global_mouse_position.y; return videodata->global_mouse_buttons; } - -void -X11_InitMouse(_THIS) +void X11_InitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -467,10 +477,9 @@ X11_InitMouse(_THIS) SDL_SetDefaultCursor(X11_CreateDefaultCursor()); } -void -X11_QuitMouse(_THIS) +void X11_QuitMouse(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; SDL_XInput2DeviceInfo *i; SDL_XInput2DeviceInfo *next; diff --git a/modules/SDL2/src/video/x11/SDL_x11mouse.h b/modules/SDL2/src/video/x11/SDL_x11mouse.h index c884f42..0a7f165 100644 --- a/modules/SDL2/src/video/x11/SDL_x11mouse.h +++ b/modules/SDL2/src/video/x11/SDL_x11mouse.h @@ -30,7 +30,6 @@ typedef struct SDL_XInput2DeviceInfo double minval[2]; double maxval[2]; double prev_coords[2]; - Time prev_time; struct SDL_XInput2DeviceInfo *next; } SDL_XInput2DeviceInfo; diff --git a/modules/SDL2/src/video/x11/SDL_x11opengl.c b/modules/SDL2/src/video/x11/SDL_x11opengl.c index c226466..3e95d8d 100644 --- a/modules/SDL2/src/video/x11/SDL_x11opengl.c +++ b/modules/SDL2/src/video/x11/SDL_x11opengl.c @@ -44,100 +44,100 @@ #elif defined(__QNXNTO__) #define DEFAULT_OPENGL "libGL.so.3" #else -#define DEFAULT_OPENGL "libGL.so.1" +#define DEFAULT_OPENGL "libGL.so.1" #endif #ifndef GLX_NONE_EXT -#define GLX_NONE_EXT 0x8000 +#define GLX_NONE_EXT 0x8000 #endif #ifndef GLX_ARB_multisample #define GLX_ARB_multisample -#define GLX_SAMPLE_BUFFERS_ARB 100000 -#define GLX_SAMPLES_ARB 100001 +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 #endif #ifndef GLX_EXT_visual_rating #define GLX_EXT_visual_rating -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#define GLX_NONE_EXT 0x8000 -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_NONE_EXT 0x8000 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D #endif #ifndef GLX_EXT_visual_info #define GLX_EXT_visual_info -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_DIRECT_COLOR_EXT 0x8003 #endif #ifndef GLX_ARB_create_context #define GLX_ARB_create_context -#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define GLX_CONTEXT_FLAGS_ARB 0x2094 -#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 /* Typedef for the GL 3.0 context creation function */ -typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy, +typedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display *dpy, GLXFBConfig config, GLXContext - share_context, + share_context, Bool direct, const int - *attrib_list); + *attrib_list); #endif #ifndef GLX_ARB_create_context_profile #define GLX_ARB_create_context_profile -#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 -#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #endif #ifndef GLX_ARB_create_context_robustness #define GLX_ARB_create_context_robustness -#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 -#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 #endif #ifndef GLX_EXT_create_context_es2_profile #define GLX_EXT_create_context_es2_profile #ifndef GLX_CONTEXT_ES2_PROFILE_BIT_EXT -#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000002 +#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000002 #endif #endif #ifndef GLX_ARB_framebuffer_sRGB #define GLX_ARB_framebuffer_sRGB #ifndef GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB -#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 #endif #endif #ifndef GLX_ARB_fbconfig_float #define GLX_ARB_fbconfig_float #ifndef GLX_RGBA_FLOAT_TYPE_ARB -#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 #endif #ifndef GLX_RGBA_FLOAT_BIT_ARB -#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif #endif #ifndef GLX_ARB_create_context_no_error #define GLX_ARB_create_context_no_error #ifndef GLX_CONTEXT_OPENGL_NO_ERROR_ARB -#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 #endif #endif #ifndef GLX_EXT_swap_control -#define GLX_SWAP_INTERVAL_EXT 0x20F1 -#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 #endif #ifndef GLX_EXT_swap_control_tear @@ -146,17 +146,17 @@ typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy, #ifndef GLX_ARB_context_flush_control #define GLX_ARB_context_flush_control -#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 -#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000 -#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 #endif #define OPENGL_REQUIRES_DLOPEN #if defined(OPENGL_REQUIRES_DLOPEN) && defined(HAVE_DLOPEN) #include -#define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL)) -#define GL_LoadFunction dlsym -#define GL_UnloadObject dlclose +#define GL_LoadObject(X) dlopen(X, (RTLD_NOW | RTLD_GLOBAL)) +#define GL_LoadFunction dlsym +#define GL_UnloadObject dlclose #else #define GL_LoadObject SDL_LoadObject #define GL_LoadFunction SDL_LoadFunction @@ -165,8 +165,7 @@ typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy, static void X11_GL_InitExtensions(_THIS); -int -X11_GL_LoadLibrary(_THIS, const char *path) +int X11_GL_LoadLibrary(_THIS, const char *path) { Display *display; void *handle; @@ -194,9 +193,9 @@ X11_GL_LoadLibrary(_THIS, const char *path) /* Allocate OpenGL memory */ _this->gl_data = - (struct SDL_GLDriverData *) SDL_calloc(1, - sizeof(struct - SDL_GLDriverData)); + (struct SDL_GLDriverData *)SDL_calloc(1, + sizeof(struct + SDL_GLDriverData)); if (!_this->gl_data) { return SDL_OutOfMemory(); } @@ -204,7 +203,7 @@ X11_GL_LoadLibrary(_THIS, const char *path) /* Load function pointers */ handle = _this->gl_config.dll_handle; _this->gl_data->glXQueryExtension = - (Bool (*)(Display *, int *, int *)) + (Bool(*)(Display *, int *, int *)) GL_LoadFunction(handle, "glXQueryExtension"); _this->gl_data->glXGetProcAddress = (void *(*)(const GLubyte *)) @@ -225,7 +224,7 @@ X11_GL_LoadLibrary(_THIS, const char *path) (void (*)(Display *, GLXDrawable)) X11_GL_GetProcAddress(_this, "glXSwapBuffers"); _this->gl_data->glXQueryDrawable = - (void (*)(Display*,GLXDrawable,int,unsigned int*)) + (void (*)(Display *, GLXDrawable, int, unsigned int *)) X11_GL_GetProcAddress(_this, "glXQueryDrawable"); if (!_this->gl_data->glXQueryExtension || @@ -237,20 +236,20 @@ X11_GL_LoadLibrary(_THIS, const char *path) return SDL_SetError("Could not retrieve OpenGL functions"); } - display = ((SDL_VideoData *) _this->driverdata)->display; + display = ((SDL_VideoData *)_this->driverdata)->display; if (!_this->gl_data->glXQueryExtension(display, &_this->gl_data->errorBase, &_this->gl_data->eventBase)) { return SDL_SetError("GLX is not supported"); } /* Initialize extensions */ - /* See lengthy comment about the inc/dec in + /* See lengthy comment about the inc/dec in ../windows/SDL_windowsopengl.c. */ ++_this->gl_config.driver_loaded; X11_GL_InitExtensions(_this); --_this->gl_config.driver_loaded; - - /* If we need a GL ES context and there's no - * GLX_EXT_create_context_es2_profile extension, switch over to X11_GLES functions + + /* If we need a GL ES context and there's no + * GLX_EXT_create_context_es2_profile extension, switch over to X11_GLES functions */ if (((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) || SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) && @@ -275,17 +274,15 @@ X11_GL_LoadLibrary(_THIS, const char *path) return 0; } -void * -X11_GL_GetProcAddress(_THIS, const char *proc) +void *X11_GL_GetProcAddress(_THIS, const char *proc) { if (_this->gl_data->glXGetProcAddress) { - return _this->gl_data->glXGetProcAddress((const GLubyte *) proc); + return _this->gl_data->glXGetProcAddress((const GLubyte *)proc); } return GL_LoadFunction(_this->gl_config.dll_handle, proc); } -void -X11_GL_UnloadLibrary(_THIS) +void X11_GL_UnloadLibrary(_THIS) { /* Don't actually unload the library, since it may have registered * X11 shutdown hooks, per the notes at: @@ -301,19 +298,20 @@ X11_GL_UnloadLibrary(_THIS) _this->gl_data = NULL; } -static SDL_bool -HasExtension(const char *extension, const char *extensions) +static SDL_bool HasExtension(const char *extension, const char *extensions) { const char *start; const char *where, *terminator; - if (!extensions) + if (!extensions) { return SDL_FALSE; + } /* Extension names should not have spaces. */ where = SDL_strchr(extension, ' '); - if (where || *extension == '\0') + if (where || *extension == '\0') { return SDL_FALSE; + } /* It takes a bit of care to be fool-proof about parsing the * OpenGL extensions string. Don't be fooled by sub-strings, @@ -323,39 +321,41 @@ HasExtension(const char *extension, const char *extensions) for (;;) { where = SDL_strstr(start, extension); - if (!where) + if (!where) { break; + } terminator = where + SDL_strlen(extension); - if (where == start || *(where - 1) == ' ') - if (*terminator == ' ' || *terminator == '\0') + if (where == start || *(where - 1) == ' ') { + if (*terminator == ' ' || *terminator == '\0') { return SDL_TRUE; + } + } start = terminator; } return SDL_FALSE; } -static void -X11_GL_InitExtensions(_THIS) +static void X11_GL_InitExtensions(_THIS) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; const int screen = DefaultScreen(display); XVisualInfo *vinfo = NULL; Window w = 0; GLXContext prev_ctx = 0; GLXDrawable prev_drawable = 0; GLXContext context = 0; - const char *(*glXQueryExtensionsStringFunc) (Display *, int); + const char *(*glXQueryExtensionsStringFunc)(Display *, int); const char *extensions; vinfo = X11_GL_GetVisual(_this, display, screen); if (vinfo) { - GLXContext (*glXGetCurrentContextFunc) (void) = + GLXContext (*glXGetCurrentContextFunc)(void) = (GLXContext(*)(void)) X11_GL_GetProcAddress(_this, "glXGetCurrentContext"); - GLXDrawable (*glXGetCurrentDrawableFunc) (void) = + GLXDrawable (*glXGetCurrentDrawableFunc)(void) = (GLXDrawable(*)(void)) X11_GL_GetProcAddress(_this, "glXGetCurrentDrawable"); @@ -370,11 +370,11 @@ X11_GL_InitExtensions(_THIS) X11_XCreateColormap(display, RootWindow(display, screen), vinfo->visual, AllocNone); w = X11_XCreateWindow(display, RootWindow(display, screen), 0, 0, - 32, 32, 0, vinfo->depth, InputOutput, vinfo->visual, - (CWBackPixel | CWBorderPixel | CWColormap), &xattr); + 32, 32, 0, vinfo->depth, InputOutput, vinfo->visual, + (CWBackPixel | CWBorderPixel | CWColormap), &xattr); context = _this->gl_data->glXCreateContext(display, vinfo, - NULL, True); + NULL, True); if (context) { _this->gl_data->glXMakeCurrent(display, w, context); } @@ -384,8 +384,8 @@ X11_GL_InitExtensions(_THIS) } glXQueryExtensionsStringFunc = - (const char *(*)(Display *, int)) X11_GL_GetProcAddress(_this, - "glXQueryExtensionsString"); + (const char *(*)(Display *, int))X11_GL_GetProcAddress(_this, + "glXQueryExtensionsString"); if (glXQueryExtensionsStringFunc) { extensions = glXQueryExtensionsStringFunc(display, screen); } else { @@ -396,7 +396,7 @@ X11_GL_InitExtensions(_THIS) _this->gl_data->HAS_GLX_EXT_swap_control_tear = SDL_FALSE; if (HasExtension("GLX_EXT_swap_control", extensions)) { _this->gl_data->glXSwapIntervalEXT = - (void (*)(Display*,GLXDrawable,int)) + (void (*)(Display *, GLXDrawable, int)) X11_GL_GetProcAddress(_this, "glXSwapIntervalEXT"); if (HasExtension("GLX_EXT_swap_control_tear", extensions)) { _this->gl_data->HAS_GLX_EXT_swap_control_tear = SDL_TRUE; @@ -406,28 +406,28 @@ X11_GL_InitExtensions(_THIS) /* Check for GLX_MESA_swap_control */ if (HasExtension("GLX_MESA_swap_control", extensions)) { _this->gl_data->glXSwapIntervalMESA = - (int(*)(int)) X11_GL_GetProcAddress(_this, "glXSwapIntervalMESA"); + (int (*)(int))X11_GL_GetProcAddress(_this, "glXSwapIntervalMESA"); _this->gl_data->glXGetSwapIntervalMESA = - (int(*)(void)) X11_GL_GetProcAddress(_this, - "glXGetSwapIntervalMESA"); + (int (*)(void))X11_GL_GetProcAddress(_this, + "glXGetSwapIntervalMESA"); } /* Check for GLX_SGI_swap_control */ if (HasExtension("GLX_SGI_swap_control", extensions)) { _this->gl_data->glXSwapIntervalSGI = - (int (*)(int)) X11_GL_GetProcAddress(_this, "glXSwapIntervalSGI"); + (int (*)(int))X11_GL_GetProcAddress(_this, "glXSwapIntervalSGI"); } /* Check for GLX_ARB_create_context */ if (HasExtension("GLX_ARB_create_context", extensions)) { _this->gl_data->glXCreateContextAttribsARB = - (GLXContext (*)(Display*,GLXFBConfig,GLXContext,Bool,const int *)) + (GLXContext(*)(Display *, GLXFBConfig, GLXContext, Bool, const int *)) X11_GL_GetProcAddress(_this, "glXCreateContextAttribsARB"); _this->gl_data->glXChooseFBConfig = - (GLXFBConfig *(*)(Display *, int, const int *, int *)) + (GLXFBConfig * (*)(Display *, int, const int *, int *)) X11_GL_GetProcAddress(_this, "glXChooseFBConfig"); _this->gl_data->glXGetVisualFromFBConfig = - (XVisualInfo *(*)(Display *, GLXFBConfig)) + (XVisualInfo * (*)(Display *, GLXFBConfig)) X11_GL_GetProcAddress(_this, "glXGetVisualFromFBConfig"); } @@ -440,7 +440,7 @@ X11_GL_InitExtensions(_THIS) if (HasExtension("GLX_EXT_visual_info", extensions)) { _this->gl_data->HAS_GLX_EXT_visual_info = SDL_TRUE; } - + /* Check for GLX_EXT_create_context_es2_profile */ if (HasExtension("GLX_EXT_create_context_es2_profile", extensions)) { /* this wants to call glGetString(), so it needs a context. */ @@ -448,8 +448,7 @@ X11_GL_InitExtensions(_THIS) if (context) { SDL_GL_DeduceMaxSupportedESProfile( &_this->gl_data->es_profile_max_supported_version.major, - &_this->gl_data->es_profile_max_supported_version.minor - ); + &_this->gl_data->es_profile_max_supported_version.minor); } } @@ -489,8 +488,7 @@ X11_GL_InitExtensions(_THIS) * In case of failure, if that pointer is not NULL, set that pointer to None * and try again. */ -static int -X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int size, Bool for_FBConfig, int **_pvistypeattr) +static int X11_GL_GetAttributes(_THIS, Display *display, int screen, int *attribs, int size, Bool for_FBConfig, int **_pvistypeattr) { int i = 0; const int MAX_ATTRIBUTES = 64; @@ -500,7 +498,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si SDL_assert(size >= MAX_ATTRIBUTES); /* Setup our GLX attributes according to the gl_config. */ - if( for_FBConfig ) { + if (for_FBConfig) { attribs[i++] = GLX_RENDER_TYPE; if (_this->gl_config.floatbuffers) { attribs[i++] = GLX_RGBA_FLOAT_BIT_ARB; @@ -524,7 +522,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si if (_this->gl_config.double_buffer) { attribs[i++] = GLX_DOUBLEBUFFER; - if( for_FBConfig ) { + if (for_FBConfig) { attribs[i++] = True; } } @@ -559,7 +557,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si if (_this->gl_config.stereo) { attribs[i++] = GLX_STEREO; - if( for_FBConfig ) { + if (for_FBConfig) { attribs[i++] = True; } } @@ -580,14 +578,13 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si if (_this->gl_config.framebuffer_srgb_capable) { attribs[i++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB; - attribs[i++] = True; /* always needed, for_FBConfig or not! */ + attribs[i++] = True; /* always needed, for_FBConfig or not! */ } if (_this->gl_config.accelerated >= 0 && _this->gl_data->HAS_GLX_EXT_visual_rating) { attribs[i++] = GLX_VISUAL_CAVEAT_EXT; - attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT : - GLX_SLOW_VISUAL_EXT; + attribs[i++] = _this->gl_config.accelerated ? GLX_NONE_EXT : GLX_SLOW_VISUAL_EXT; } /* If we're supposed to use DirectColor visuals, and we've got the @@ -610,8 +607,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si return i; } -XVisualInfo * -X11_GL_GetVisual(_THIS, Display * display, int screen) +XVisualInfo *X11_GL_GetVisual(_THIS, Display *display, int screen) { /* 64 seems nice. */ int attribs[64]; @@ -658,37 +654,31 @@ X11_GL_GetVisual(_THIS, Display * display, int screen) return vinfo; } -static int (*handler) (Display *, XErrorEvent *) = NULL; +static int (*handler)(Display *, XErrorEvent *) = NULL; static const char *errorHandlerOperation = NULL; static int errorBase = 0; static int errorCode = 0; -static int -X11_GL_ErrorHandler(Display * d, XErrorEvent * e) +static int X11_GL_ErrorHandler(Display *d, XErrorEvent *e) { char *x11_error = NULL; char x11_error_locale[256]; errorCode = e->error_code; - if (X11_XGetErrorText(d, errorCode, x11_error_locale, sizeof(x11_error_locale)) == Success) - { - x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, SDL_strlen(x11_error_locale)+1); + if (X11_XGetErrorText(d, errorCode, x11_error_locale, sizeof(x11_error_locale)) == Success) { + x11_error = SDL_iconv_string("UTF-8", "", x11_error_locale, SDL_strlen(x11_error_locale) + 1); } - if (x11_error) - { + if (x11_error) { SDL_SetError("Could not %s: %s", errorHandlerOperation, x11_error); SDL_free(x11_error); - } - else - { + } else { SDL_SetError("Could not %s: %i (Base %i)", errorHandlerOperation, errorCode, errorBase); } return (0); } -SDL_bool -X11_GL_UseEGL(_THIS) +SDL_bool X11_GL_UseEGL(_THIS) { SDL_assert(_this->gl_data != NULL); if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) @@ -698,20 +688,16 @@ X11_GL_UseEGL(_THIS) } SDL_assert(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES); - return (SDL_GetHintBoolean(SDL_HINT_OPENGL_ES_DRIVER, SDL_FALSE) - || _this->gl_config.major_version == 1 /* No GLX extension for OpenGL ES 1.x profiles. */ - || _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major - || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major - && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor)); + return (SDL_GetHintBoolean(SDL_HINT_OPENGL_ES_DRIVER, SDL_FALSE) || _this->gl_config.major_version == 1 /* No GLX extension for OpenGL ES 1.x profiles. */ + || _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor)); } -SDL_GLContext -X11_GL_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext X11_GL_CreateContext(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; int screen = - ((SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata)->screen; + ((SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata)->screen; XWindowAttributes xattr; XVisualInfo v, *vinfo; int n; @@ -752,37 +738,33 @@ X11_GL_CreateContext(_THIS, SDL_Window * window) int iattr = 4; /* SDL profile bits match GLX profile bits */ - if( _this->gl_config.profile_mask != 0 ) { + if (_this->gl_config.profile_mask != 0) { attribs[iattr++] = GLX_CONTEXT_PROFILE_MASK_ARB; attribs[iattr++] = _this->gl_config.profile_mask; } /* SDL flags match GLX flags */ - if( _this->gl_config.flags != 0 ) { + if (_this->gl_config.flags != 0) { attribs[iattr++] = GLX_CONTEXT_FLAGS_ARB; attribs[iattr++] = _this->gl_config.flags; } - /* only set if glx extension is available */ - if( _this->gl_data->HAS_GLX_ARB_context_flush_control ) { + /* only set if glx extension is available and not the default setting */ + if ((_this->gl_data->HAS_GLX_ARB_context_flush_control) && (_this->gl_config.release_behavior == 0)) { attribs[iattr++] = GLX_CONTEXT_RELEASE_BEHAVIOR_ARB; - attribs[iattr++] = - _this->gl_config.release_behavior ? - GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB : - GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB; + attribs[iattr++] = + _this->gl_config.release_behavior ? GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB : GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB; } - /* only set if glx extension is available */ - if( _this->gl_data->HAS_GLX_ARB_create_context_robustness ) { + /* only set if glx extension is available and not the default setting */ + if ((_this->gl_data->HAS_GLX_ARB_create_context_robustness) && (_this->gl_config.reset_notification != 0)) { attribs[iattr++] = GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB; attribs[iattr++] = - _this->gl_config.reset_notification ? - GLX_LOSE_CONTEXT_ON_RESET_ARB : - GLX_NO_RESET_NOTIFICATION_ARB; + _this->gl_config.reset_notification ? GLX_LOSE_CONTEXT_ON_RESET_ARB : GLX_NO_RESET_NOTIFICATION_ARB; } - /* only set if glx extension is available */ - if( _this->gl_data->HAS_GLX_ARB_create_context_no_error ) { + /* only set if glx extension is available and not the default setting */ + if ((_this->gl_data->HAS_GLX_ARB_create_context_no_error) && (_this->gl_config.no_error != 0)) { attribs[iattr++] = GLX_CONTEXT_OPENGL_NO_ERROR_ARB; attribs[iattr++] = _this->gl_config.no_error; } @@ -800,24 +782,24 @@ X11_GL_CreateContext(_THIS, SDL_Window * window) int fbcount = 0; int *pvistypeattr = NULL; - X11_GL_GetAttributes(_this,display,screen,glxAttribs,64,SDL_TRUE,&pvistypeattr); + X11_GL_GetAttributes(_this, display, screen, glxAttribs, 64, SDL_TRUE, &pvistypeattr); if (_this->gl_data->glXChooseFBConfig) { framebuffer_config = _this->gl_data->glXChooseFBConfig(display, - DefaultScreen(display), glxAttribs, - &fbcount); + DefaultScreen(display), glxAttribs, + &fbcount); if (!framebuffer_config && (pvistypeattr != NULL)) { *pvistypeattr = None; framebuffer_config = _this->gl_data->glXChooseFBConfig(display, - DefaultScreen(display), glxAttribs, - &fbcount); + DefaultScreen(display), glxAttribs, + &fbcount); } - + if (framebuffer_config) { context = _this->gl_data->glXCreateContextAttribsARB(display, - framebuffer_config[0], - share_context, True, attribs); + framebuffer_config[0], + share_context, True, attribs); X11_XFree(framebuffer_config); } } @@ -843,13 +825,12 @@ X11_GL_CreateContext(_THIS, SDL_Window * window) return context; } -int -X11_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +int X11_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; Window drawable = - (context ? ((SDL_WindowData *) window->driverdata)->xwindow : None); - GLXContext glx_context = (GLXContext) context; + (context ? ((SDL_WindowData *)window->driverdata)->xwindow : None); + GLXContext glx_context = (GLXContext)context; int rc; if (!_this->gl_data) { @@ -865,9 +846,9 @@ X11_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) rc = _this->gl_data->glXMakeCurrent(display, drawable, glx_context); X11_XSetErrorHandler(handler); - if (errorCode != Success) { /* uhoh, an X error was thrown! */ - return -1; /* the error handler called SDL_SetError() already. */ - } else if (!rc) { /* glXMakeCurrent() failed without throwing an X error */ + if (errorCode != Success) { /* uhoh, an X error was thrown! */ + return -1; /* the error handler called SDL_SetError() already. */ + } else if (!rc) { /* glXMakeCurrent() failed without throwing an X error */ return SDL_SetError("Unable to make GL context current"); } @@ -883,17 +864,17 @@ X11_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) */ static int swapinterval = 0; -int -X11_GL_SetSwapInterval(_THIS, int interval) +int X11_GL_SetSwapInterval(_THIS, int interval) { int status = -1; if ((interval < 0) && (!_this->gl_data->HAS_GLX_EXT_swap_control_tear)) { SDL_SetError("Negative swap interval unsupported in this GL"); } else if (_this->gl_data->glXSwapIntervalEXT) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; const SDL_WindowData *windowdata = (SDL_WindowData *) - SDL_GL_GetCurrentWindow()->driverdata; + SDL_GL_GetCurrentWindow() + ->driverdata; Window drawable = windowdata->xwindow; @@ -931,31 +912,31 @@ X11_GL_SetSwapInterval(_THIS, int interval) return status; } -int -X11_GL_GetSwapInterval(_THIS) +int X11_GL_GetSwapInterval(_THIS) { if (_this->gl_data->glXSwapIntervalEXT) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; const SDL_WindowData *windowdata = (SDL_WindowData *) - SDL_GL_GetCurrentWindow()->driverdata; + SDL_GL_GetCurrentWindow() + ->driverdata; Window drawable = windowdata->xwindow; unsigned int allow_late_swap_tearing = 0; unsigned int interval = 0; if (_this->gl_data->HAS_GLX_EXT_swap_control_tear) { _this->gl_data->glXQueryDrawable(display, drawable, - GLX_LATE_SWAPS_TEAR_EXT, - &allow_late_swap_tearing); + GLX_LATE_SWAPS_TEAR_EXT, + &allow_late_swap_tearing); } _this->gl_data->glXQueryDrawable(display, drawable, GLX_SWAP_INTERVAL_EXT, &interval); if ((allow_late_swap_tearing) && (interval > 0)) { - return -((int) interval); + return -((int)interval); } - return (int) interval; + return (int)interval; } else if (_this->gl_data->glXGetSwapIntervalMESA) { return _this->gl_data->glXGetSwapIntervalMESA(); } else { @@ -963,21 +944,19 @@ X11_GL_GetSwapInterval(_THIS) } } -int -X11_GL_SwapWindow(_THIS, SDL_Window * window) +int X11_GL_SwapWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; _this->gl_data->glXSwapBuffers(display, data->xwindow); return 0; } -void -X11_GL_DeleteContext(_THIS, SDL_GLContext context) +void X11_GL_DeleteContext(_THIS, SDL_GLContext context) { - Display *display = ((SDL_VideoData *) _this->driverdata)->display; - GLXContext glx_context = (GLXContext) context; + Display *display = ((SDL_VideoData *)_this->driverdata)->display; + GLXContext glx_context = (GLXContext)context; if (!_this->gl_data) { return; diff --git a/modules/SDL2/src/video/x11/SDL_x11opengl.h b/modules/SDL2/src/video/x11/SDL_x11opengl.h index d0f9085..a341398 100644 --- a/modules/SDL2/src/video/x11/SDL_x11opengl.h +++ b/modules/SDL2/src/video/x11/SDL_x11opengl.h @@ -42,26 +42,27 @@ struct SDL_GLDriverData implementation supports GLX_EXT_create_context_es2_profile. major = minor = 0 when unsupported. */ - struct { + struct + { int major; int minor; } es_profile_max_supported_version; - Bool (*glXQueryExtension) (Display*,int*,int*); - void *(*glXGetProcAddress) (const GLubyte*); - XVisualInfo *(*glXChooseVisual) (Display*,int,int*); - GLXContext (*glXCreateContext) (Display*,XVisualInfo*,GLXContext,Bool); - GLXContext (*glXCreateContextAttribsARB) (Display*,GLXFBConfig,GLXContext,Bool,const int *); - GLXFBConfig *(*glXChooseFBConfig) (Display*,int,const int *,int *); - XVisualInfo *(*glXGetVisualFromFBConfig) (Display*,GLXFBConfig); - void (*glXDestroyContext) (Display*, GLXContext); - Bool(*glXMakeCurrent) (Display*,GLXDrawable,GLXContext); - void (*glXSwapBuffers) (Display*, GLXDrawable); - void (*glXQueryDrawable) (Display*,GLXDrawable,int,unsigned int*); - void (*glXSwapIntervalEXT) (Display*,GLXDrawable,int); - int (*glXSwapIntervalSGI) (int); - int (*glXSwapIntervalMESA) (int); - int (*glXGetSwapIntervalMESA) (void); + Bool (*glXQueryExtension)(Display *, int *, int *); + void *(*glXGetProcAddress)(const GLubyte *); + XVisualInfo *(*glXChooseVisual)(Display *, int, int *); + GLXContext (*glXCreateContext)(Display *, XVisualInfo *, GLXContext, Bool); + GLXContext (*glXCreateContextAttribsARB)(Display *, GLXFBConfig, GLXContext, Bool, const int *); + GLXFBConfig *(*glXChooseFBConfig)(Display *, int, const int *, int *); + XVisualInfo *(*glXGetVisualFromFBConfig)(Display *, GLXFBConfig); + void (*glXDestroyContext)(Display *, GLXContext); + Bool (*glXMakeCurrent)(Display *, GLXDrawable, GLXContext); + void (*glXSwapBuffers)(Display *, GLXDrawable); + void (*glXQueryDrawable)(Display *, GLXDrawable, int, unsigned int *); + void (*glXSwapIntervalEXT)(Display *, GLXDrawable, int); + int (*glXSwapIntervalSGI)(int); + int (*glXSwapIntervalMESA)(int); + int (*glXGetSwapIntervalMESA)(void); }; /* OpenGL functions */ @@ -69,13 +70,13 @@ extern int X11_GL_LoadLibrary(_THIS, const char *path); extern void *X11_GL_GetProcAddress(_THIS, const char *proc); extern void X11_GL_UnloadLibrary(_THIS); extern SDL_bool X11_GL_UseEGL(_THIS); -extern XVisualInfo *X11_GL_GetVisual(_THIS, Display * display, int screen); -extern SDL_GLContext X11_GL_CreateContext(_THIS, SDL_Window * window); -extern int X11_GL_MakeCurrent(_THIS, SDL_Window * window, +extern XVisualInfo *X11_GL_GetVisual(_THIS, Display *display, int screen); +extern SDL_GLContext X11_GL_CreateContext(_THIS, SDL_Window *window); +extern int X11_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context); extern int X11_GL_SetSwapInterval(_THIS, int interval); extern int X11_GL_GetSwapInterval(_THIS); -extern int X11_GL_SwapWindow(_THIS, SDL_Window * window); +extern int X11_GL_SwapWindow(_THIS, SDL_Window *window); extern void X11_GL_DeleteContext(_THIS, SDL_GLContext context); #endif /* SDL_VIDEO_OPENGL_GLX */ diff --git a/modules/SDL2/src/video/x11/SDL_x11opengles.c b/modules/SDL2/src/video/x11/SDL_x11opengles.c index 2736678..4d38a71 100644 --- a/modules/SDL2/src/video/x11/SDL_x11opengles.c +++ b/modules/SDL2/src/video/x11/SDL_x11opengles.c @@ -29,10 +29,9 @@ /* EGL implementation of SDL OpenGL support */ -int -X11_GLES_LoadLibrary(_THIS, const char *path) +int X11_GLES_LoadLibrary(_THIS, const char *path) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; /* If the profile requested is not GL ES, switch over to X11_GL functions */ if ((_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) && @@ -49,18 +48,17 @@ X11_GLES_LoadLibrary(_THIS, const char *path) _this->GL_SwapWindow = X11_GL_SwapWindow; _this->GL_DeleteContext = X11_GL_DeleteContext; return X11_GL_LoadLibrary(_this, path); - #else +#else return SDL_SetError("SDL not configured with OpenGL/GLX support"); - #endif +#endif } - + return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) data->display, 0); } -XVisualInfo * -X11_GLES_GetVisual(_THIS, Display * display, int screen) +XVisualInfo *X11_GLES_GetVisual(_THIS, Display *display, int screen) { - + XVisualInfo *egl_visualinfo = NULL; EGLint visual_id; XVisualInfo vi_in; @@ -74,12 +72,13 @@ X11_GLES_GetVisual(_THIS, Display * display, int screen) if (_this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, _this->egl_data->egl_config, EGL_NATIVE_VISUAL_ID, - &visual_id) == EGL_FALSE || !visual_id) { + &visual_id) == EGL_FALSE || + !visual_id) { /* Use the default visual when all else fails */ vi_in.screen = screen; egl_visualinfo = X11_XGetVisualInfo(display, - VisualScreenMask, - &vi_in, &out_count); + VisualScreenMask, + &vi_in, &out_count); } else { vi_in.screen = screen; vi_in.visualid = visual_id; @@ -89,11 +88,10 @@ X11_GLES_GetVisual(_THIS, Display * display, int screen) return egl_visualinfo; } -SDL_GLContext -X11_GLES_CreateContext(_THIS, SDL_Window * window) +SDL_GLContext X11_GLES_CreateContext(_THIS, SDL_Window *window) { SDL_GLContext context; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; X11_XSync(display, False); @@ -104,8 +102,8 @@ X11_GLES_CreateContext(_THIS, SDL_Window * window) } SDL_EGL_SwapWindow_impl(X11) -SDL_EGL_MakeCurrent_impl(X11) + SDL_EGL_MakeCurrent_impl(X11) #endif /* SDL_VIDEO_DRIVER_X11 && SDL_VIDEO_OPENGL_EGL */ -/* vi: set ts=4 sw=4 expandtab: */ + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/src/video/x11/SDL_x11opengles.h b/modules/SDL2/src/video/x11/SDL_x11opengles.h index 61142d4..cd5bfba 100644 --- a/modules/SDL2/src/video/x11/SDL_x11opengles.h +++ b/modules/SDL2/src/video/x11/SDL_x11opengles.h @@ -30,9 +30,9 @@ typedef struct SDL_PrivateGLESData { - /* 1401 If the struct-declaration-list contains no named members, the behavior is undefined. */ - /* warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] */ - int dummy; + /* 1401 If the struct-declaration-list contains no named members, the behavior is undefined. */ + /* warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] */ + int dummy; } SDL_PrivateGLESData; /* OpenGLES functions */ @@ -41,7 +41,7 @@ typedef struct SDL_PrivateGLESData #define X11_GLES_UnloadLibrary SDL_EGL_UnloadLibrary #define X11_GLES_SetSwapInterval SDL_EGL_SetSwapInterval #define X11_GLES_GetSwapInterval SDL_EGL_GetSwapInterval -#define X11_GLES_DeleteContext SDL_EGL_DeleteContext +#define X11_GLES_DeleteContext SDL_EGL_DeleteContext extern int X11_GLES_LoadLibrary(_THIS, const char *path); extern XVisualInfo *X11_GLES_GetVisual(_THIS, Display * display, int screen); diff --git a/modules/SDL2/src/video/x11/SDL_x11shape.c b/modules/SDL2/src/video/x11/SDL_x11shape.c index 26a1284..4a8d946 100644 --- a/modules/SDL2/src/video/x11/SDL_x11shape.c +++ b/modules/SDL2/src/video/x11/SDL_x11shape.c @@ -27,15 +27,15 @@ #include "SDL_x11window.h" #include "../SDL_shape_internals.h" -SDL_WindowShaper* -X11_CreateShaper(SDL_Window* window) { - SDL_WindowShaper* result = NULL; - SDL_ShapeData* data = NULL; +SDL_WindowShaper *X11_CreateShaper(SDL_Window *window) +{ + SDL_WindowShaper *result = NULL; + SDL_ShapeData *data = NULL; #if SDL_VIDEO_DRIVER_X11_XSHAPE - if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */ + if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */ result = SDL_malloc(sizeof(SDL_WindowShaper)); - if (!result) { + if (result == NULL) { SDL_OutOfMemory(); return NULL; } @@ -44,7 +44,7 @@ X11_CreateShaper(SDL_Window* window) { result->mode.parameters.binarizationCutoff = 1; result->userx = result->usery = 0; data = SDL_malloc(sizeof(SDL_ShapeData)); - if (!data) { + if (data == NULL) { SDL_free(result); SDL_OutOfMemory(); return NULL; @@ -65,58 +65,62 @@ X11_CreateShaper(SDL_Window* window) { return result; } -int -X11_ResizeWindowShape(SDL_Window* window) { - SDL_ShapeData* data = window->shaper->driverdata; +int X11_ResizeWindowShape(SDL_Window *window) +{ + SDL_ShapeData *data = window->shaper->driverdata; unsigned int bitmapsize = window->w / 8; SDL_assert(data != NULL); - if(window->w % 8 > 0) + if (window->w % 8 > 0) { bitmapsize += 1; + } bitmapsize *= window->h; - if(data->bitmapsize != bitmapsize || data->bitmap == NULL) { + if (data->bitmapsize != bitmapsize || data->bitmap == NULL) { data->bitmapsize = bitmapsize; SDL_free(data->bitmap); data->bitmap = SDL_malloc(data->bitmapsize); - if(data->bitmap == NULL) { + if (data->bitmap == NULL) { return SDL_OutOfMemory(); } } - SDL_memset(data->bitmap,0,data->bitmapsize); + SDL_memset(data->bitmap, 0, data->bitmapsize); window->shaper->userx = window->x; window->shaper->usery = window->y; - SDL_SetWindowPosition(window,-1000,-1000); + SDL_SetWindowPosition(window, -1000, -1000); return 0; } -int -X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { +int X11_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode) +{ SDL_ShapeData *data = NULL; SDL_WindowData *windowdata = NULL; Pixmap shapemask; - - if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) + + if (shaper == NULL || shape == NULL || shaper->driverdata == NULL) { return -1; + } #if SDL_VIDEO_DRIVER_X11_XSHAPE - if(shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode)) + if (shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode)) { return -2; - if(shape->w != shaper->window->w || shape->h != shaper->window->h) + } + if (shape->w != shaper->window->w || shape->h != shaper->window->h) { return -3; + } data = shaper->driverdata; /* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */ - SDL_CalculateShapeBitmap(shaper->mode,shape,data->bitmap,8); + SDL_CalculateShapeBitmap(shaper->mode, shape, data->bitmap, 8); - windowdata = (SDL_WindowData*)(shaper->window->driverdata); - shapemask = X11_XCreateBitmapFromData(windowdata->videodata->display,windowdata->xwindow,data->bitmap,shaper->window->w,shaper->window->h); + windowdata = (SDL_WindowData *)(shaper->window->driverdata); + shapemask = X11_XCreateBitmapFromData(windowdata->videodata->display, windowdata->xwindow, data->bitmap, shaper->window->w, shaper->window->h); - X11_XShapeCombineMask(windowdata->videodata->display,windowdata->xwindow, ShapeBounding, 0, 0,shapemask, ShapeSet); - X11_XSync(windowdata->videodata->display,False); + X11_XShapeCombineMask(windowdata->videodata->display, windowdata->xwindow, ShapeBounding, 0, 0, shapemask, ShapeSet); + X11_XSync(windowdata->videodata->display, False); - X11_XFreePixmap(windowdata->videodata->display,shapemask); + X11_XFreePixmap(windowdata->videodata->display, shapemask); #endif return 0; diff --git a/modules/SDL2/src/video/x11/SDL_x11shape.h b/modules/SDL2/src/video/x11/SDL_x11shape.h index 4da3c0d..b1741d1 100644 --- a/modules/SDL2/src/video/x11/SDL_x11shape.h +++ b/modules/SDL2/src/video/x11/SDL_x11shape.h @@ -27,13 +27,14 @@ #include "SDL_shape.h" #include "../SDL_sysvideo.h" -typedef struct { - void* bitmap; +typedef struct +{ + void *bitmap; Uint32 bitmapsize; } SDL_ShapeData; -extern SDL_WindowShaper* X11_CreateShaper(SDL_Window* window); -extern int X11_ResizeWindowShape(SDL_Window* window); -extern int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); +extern SDL_WindowShaper *X11_CreateShaper(SDL_Window *window); +extern int X11_ResizeWindowShape(SDL_Window *window); +extern int X11_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode); #endif /* SDL_x11shape_h_ */ diff --git a/modules/SDL2/src/video/x11/SDL_x11touch.c b/modules/SDL2/src/video/x11/SDL_x11touch.c index 52557d6..90a4135 100644 --- a/modules/SDL2/src/video/x11/SDL_x11touch.c +++ b/modules/SDL2/src/video/x11/SDL_x11touch.c @@ -27,21 +27,17 @@ #include "SDL_x11xinput2.h" #include "../../events/SDL_touch_c.h" - -void -X11_InitTouch(_THIS) +void X11_InitTouch(_THIS) { X11_InitXinput2Multitouch(_this); } -void -X11_QuitTouch(_THIS) +void X11_QuitTouch(_THIS) { SDL_TouchQuit(); } -void -X11_ResetTouch(_THIS) +void X11_ResetTouch(_THIS) { X11_QuitTouch(_this); X11_InitTouch(_this); diff --git a/modules/SDL2/src/video/x11/SDL_x11video.c b/modules/SDL2/src/video/x11/SDL_x11video.c index 88cccc6..e2b36a8 100644 --- a/modules/SDL2/src/video/x11/SDL_x11video.c +++ b/modules/SDL2/src/video/x11/SDL_x11video.c @@ -49,8 +49,7 @@ static int X11_VideoInit(_THIS); static void X11_VideoQuit(_THIS); /* Find out what class name we should use */ -static char * -get_classname() +static char *get_classname() { char *spot; #if defined(__LINUX__) || defined(__FREEBSD__) @@ -68,10 +67,9 @@ get_classname() /* Next look at the application's executable name */ #if defined(__LINUX__) || defined(__FREEBSD__) #if defined(__LINUX__) - SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/exe", getpid()); + (void)SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/exe", getpid()); #elif defined(__FREEBSD__) - SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/file", - getpid()); + (void)SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/file", getpid()); #else #error Where can we find the executable name? #endif @@ -93,12 +91,11 @@ get_classname() /* X11 driver bootstrap functions */ -static int (*orig_x11_errhandler) (Display *, XErrorEvent *) = NULL; +static int (*orig_x11_errhandler)(Display *, XErrorEvent *) = NULL; -static void -X11_DeleteDevice(SDL_VideoDevice * device) +static void X11_DeleteDevice(SDL_VideoDevice *device) { - SDL_VideoData *data = (SDL_VideoData *) device->driverdata; + SDL_VideoData *data = (SDL_VideoData *)device->driverdata; if (device->vulkan_config.loader_handle) { device->Vulkan_UnloadLibrary(device); } @@ -121,8 +118,7 @@ X11_DeleteDevice(SDL_VideoDevice * device) /* An error handler to reset the vidmode and then call the default handler. */ static SDL_bool safety_net_triggered = SDL_FALSE; -static int -X11_SafetyNetErrHandler(Display * d, XErrorEvent * e) +static int X11_SafetyNetErrHandler(Display *d, XErrorEvent *e) { SDL_VideoDevice *device = NULL; /* if we trigger an error in our error handler, don't try again. */ @@ -134,7 +130,7 @@ X11_SafetyNetErrHandler(Display * d, XErrorEvent * e) for (i = 0; i < device->num_displays; i++) { SDL_VideoDisplay *display = &device->displays[i]; if (SDL_memcmp(&display->current_mode, &display->desktop_mode, - sizeof (SDL_DisplayMode)) != 0) { + sizeof(SDL_DisplayMode)) != 0) { X11_SetDisplayMode(device, display, &display->desktop_mode); } } @@ -142,14 +138,13 @@ X11_SafetyNetErrHandler(Display * d, XErrorEvent * e) } if (orig_x11_errhandler != NULL) { - return orig_x11_errhandler(d, e); /* probably terminate. */ + return orig_x11_errhandler(d, e); /* probably terminate. */ } return 0; } -static SDL_VideoDevice * -X11_CreateDevice(void) +static SDL_VideoDevice *X11_CreateDevice(void) { SDL_VideoDevice *device; SDL_VideoData *data; @@ -167,19 +162,19 @@ X11_CreateDevice(void) /* Open the display first to be sure that X11 is available */ x11_display = X11_XOpenDisplay(display); - if (!x11_display) { + if (x11_display == NULL) { SDL_X11_UnloadSymbols(); return NULL; } /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); - if (!device) { + device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { SDL_OutOfMemory(); return NULL; } - data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); - if (!data) { + data = (struct SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); + if (data == NULL) { SDL_free(device); SDL_OutOfMemory(); return NULL; @@ -334,21 +329,19 @@ VideoBootStrap X11_bootstrap = { X11_CreateDevice }; -static int (*handler) (Display *, XErrorEvent *) = NULL; -static int -X11_CheckWindowManagerErrorHandler(Display * d, XErrorEvent * e) +static int (*handler)(Display *, XErrorEvent *) = NULL; +static int X11_CheckWindowManagerErrorHandler(Display *d, XErrorEvent *e) { if (e->error_code == BadWindow) { - return (0); + return 0; } else { - return (handler(d, e)); + return handler(d, e); } } -static void -X11_CheckWindowManager(_THIS) +static void X11_CheckWindowManager(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *display = data->display; Atom _NET_SUPPORTING_WM_CHECK; int status, real_format; @@ -368,7 +361,7 @@ X11_CheckWindowManager(_THIS) status = X11_XGetWindowProperty(display, DefaultRootWindow(display), _NET_SUPPORTING_WM_CHECK, 0L, 1L, False, XA_WINDOW, &real_type, &real_format, &items_read, &items_left, &propdata); if (status == Success) { if (items_read) { - wm_window = ((Window*)propdata)[0]; + wm_window = ((Window *)propdata)[0]; } if (propdata) { X11_XFree(propdata); @@ -378,7 +371,7 @@ X11_CheckWindowManager(_THIS) if (wm_window) { status = X11_XGetWindowProperty(display, wm_window, _NET_SUPPORTING_WM_CHECK, 0L, 1L, False, XA_WINDOW, &real_type, &real_format, &items_read, &items_left, &propdata); - if (status != Success || !items_read || wm_window != ((Window*)propdata)[0]) { + if (status != Success || !items_read || wm_window != ((Window *)propdata)[0]) { wm_window = None; } if (status == Success && propdata) { @@ -406,11 +399,9 @@ X11_CheckWindowManager(_THIS) #endif } - -int -X11_VideoInit(_THIS) +int X11_VideoInit(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; /* Get the window class name, usually the name of the application */ data->classname = get_classname(); @@ -419,7 +410,7 @@ X11_VideoInit(_THIS) data->pid = getpid(); /* I have no idea how random this actually is, or has to be. */ - data->window_group = (XID) (((size_t) data->pid) ^ ((size_t) _this)); + data->window_group = (XID)(((size_t)data->pid) ^ ((size_t)_this)); /* Look up some useful Atoms */ #define GET_ATOM(X) data->X = X11_XInternAtom(data->display, #X, False) @@ -486,10 +477,9 @@ X11_VideoInit(_THIS) return 0; } -void -X11_VideoQuit(_THIS) +void X11_VideoQuit(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (data->clipboard_window) { X11_XDestroyWindow(data->display, data->clipboard_window); @@ -508,8 +498,7 @@ X11_VideoQuit(_THIS) X11_QuitTouch(_this); } -SDL_bool -X11_UseDirectColorVisuals(void) +SDL_bool X11_UseDirectColorVisuals(void) { return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE; } diff --git a/modules/SDL2/src/video/x11/SDL_x11video.h b/modules/SDL2/src/video/x11/SDL_x11video.h index e4c589f..65876c2 100644 --- a/modules/SDL2/src/video/x11/SDL_x11video.h +++ b/modules/SDL2/src/video/x11/SDL_x11video.h @@ -126,7 +126,7 @@ typedef struct SDL_VideoData SDL_Scancode key_layout[256]; SDL_bool selection_waiting; - SDL_bool broken_pointer_grab; /* true if XGrabPointer seems unreliable. */ + SDL_bool broken_pointer_grab; /* true if XGrabPointer seems unreliable. */ Uint32 last_mode_change_deadline; @@ -144,7 +144,7 @@ typedef struct SDL_VideoData int xkb_event; KeyCode filter_code; - Time filter_time; + Time filter_time; #if SDL_VIDEO_VULKAN /* Vulkan variables only valid if _this->vulkan_config.loader_handle is not NULL */ diff --git a/modules/SDL2/src/video/x11/SDL_x11vulkan.c b/modules/SDL2/src/video/x11/SDL_x11vulkan.c index ae1e7b5..07b4a80 100644 --- a/modules/SDL2/src/video/x11/SDL_x11vulkan.c +++ b/modules/SDL2/src/video/x11/SDL_x11vulkan.c @@ -31,9 +31,9 @@ /*#include */ #if defined(__OpenBSD__) -#define DEFAULT_VULKAN "libvulkan.so" +#define DEFAULT_VULKAN "libvulkan.so" #else -#define DEFAULT_VULKAN "libvulkan.so.1" +#define DEFAULT_VULKAN "libvulkan.so.1" #endif /* @@ -51,73 +51,72 @@ int X11_Vulkan_LoadLibrary(_THIS, const char *path) SDL_bool hasXCBSurfaceExtension = SDL_FALSE; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL; Uint32 i; - if(_this->vulkan_config.loader_handle) + if (_this->vulkan_config.loader_handle) { return SDL_SetError("Vulkan already loaded"); + } /* Load the Vulkan loader library */ - if(!path) + if (path == NULL) { path = SDL_getenv("SDL_VULKAN_LIBRARY"); - if(!path) + } + if (path == NULL) { path = DEFAULT_VULKAN; + } _this->vulkan_config.loader_handle = SDL_LoadObject(path); - if(!_this->vulkan_config.loader_handle) + if (!_this->vulkan_config.loader_handle) { return -1; + } SDL_strlcpy(_this->vulkan_config.loader_path, path, SDL_arraysize(_this->vulkan_config.loader_path)); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_LoadFunction( _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr"); - if(!vkGetInstanceProcAddr) + if (!vkGetInstanceProcAddr) { goto fail; + } _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); - if(!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) + if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail; + } extensions = SDL_Vulkan_CreateInstanceExtensionsList( (PFN_vkEnumerateInstanceExtensionProperties) _this->vulkan_config.vkEnumerateInstanceExtensionProperties, &extensionCount); - if(!extensions) + if (extensions == NULL) { goto fail; - for(i = 0; i < extensionCount; i++) - { - if(SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } + for (i = 0; i < extensionCount; i++) { + if (SDL_strcmp(VK_KHR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_XCB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_XCB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasXCBSurfaceExtension = SDL_TRUE; - else if(SDL_strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) + } else if (SDL_strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0) { hasXlibSurfaceExtension = SDL_TRUE; + } } SDL_free(extensions); - if(!hasSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement the " - VK_KHR_SURFACE_EXTENSION_NAME " extension"); + if (!hasSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement the " VK_KHR_SURFACE_EXTENSION_NAME " extension"); goto fail; } - if(hasXlibSurfaceExtension) - { + if (hasXlibSurfaceExtension) { videoData->vulkan_xlib_xcb_library = NULL; - } - else if(!hasXCBSurfaceExtension) - { - SDL_SetError("Installed Vulkan doesn't implement either the " - VK_KHR_XCB_SURFACE_EXTENSION_NAME "extension or the " - VK_KHR_XLIB_SURFACE_EXTENSION_NAME " extension"); + } else if (!hasXCBSurfaceExtension) { + SDL_SetError("Installed Vulkan doesn't implement either the " VK_KHR_XCB_SURFACE_EXTENSION_NAME "extension or the " VK_KHR_XLIB_SURFACE_EXTENSION_NAME " extension"); goto fail; - } - else - { + } else { const char *libX11XCBLibraryName = SDL_getenv("SDL_X11_XCB_LIBRARY"); - if(!libX11XCBLibraryName) + if (libX11XCBLibraryName == NULL) { libX11XCBLibraryName = "libX11-xcb.so"; + } videoData->vulkan_xlib_xcb_library = SDL_LoadObject(libX11XCBLibraryName); - if(!videoData->vulkan_xlib_xcb_library) + if (!videoData->vulkan_xlib_xcb_library) { goto fail; + } videoData->vulkan_XGetXCBConnection = SDL_LoadFunction(videoData->vulkan_xlib_xcb_library, "XGetXCBConnection"); - if(!videoData->vulkan_XGetXCBConnection) - { + if (!videoData->vulkan_XGetXCBConnection) { SDL_UnloadObject(videoData->vulkan_xlib_xcb_library); goto fail; } @@ -133,10 +132,10 @@ fail: void X11_Vulkan_UnloadLibrary(_THIS) { SDL_VideoData *videoData = (SDL_VideoData *)_this->driverdata; - if(_this->vulkan_config.loader_handle) - { - if(videoData->vulkan_xlib_xcb_library) + if (_this->vulkan_config.loader_handle) { + if (videoData->vulkan_xlib_xcb_library) { SDL_UnloadObject(videoData->vulkan_xlib_xcb_library); + } SDL_UnloadObject(_this->vulkan_config.loader_handle); _this->vulkan_config.loader_handle = NULL; } @@ -148,23 +147,21 @@ SDL_bool X11_Vulkan_GetInstanceExtensions(_THIS, const char **names) { SDL_VideoData *videoData = (SDL_VideoData *)_this->driverdata; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } - if(videoData->vulkan_xlib_xcb_library) - { + if (videoData->vulkan_xlib_xcb_library) { static const char *const extensionsForXCB[] = { - VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_XCB_SURFACE_EXTENSION_NAME, + VK_KHR_SURFACE_EXTENSION_NAME, + VK_KHR_XCB_SURFACE_EXTENSION_NAME, }; return SDL_Vulkan_GetInstanceExtensions_Helper( count, names, SDL_arraysize(extensionsForXCB), extensionsForXCB); - } - else - { + } else { static const char *const extensionsForXlib[] = { - VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_XLIB_SURFACE_EXTENSION_NAME, + VK_KHR_SURFACE_EXTENSION_NAME, + VK_KHR_XLIB_SURFACE_EXTENSION_NAME, }; return SDL_Vulkan_GetInstanceExtensions_Helper( count, names, SDL_arraysize(extensionsForXlib), extensionsForXlib); @@ -179,21 +176,18 @@ SDL_bool X11_Vulkan_CreateSurface(_THIS, SDL_VideoData *videoData = (SDL_VideoData *)_this->driverdata; SDL_WindowData *windowData = (SDL_WindowData *)window->driverdata; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; - if(!_this->vulkan_config.loader_handle) - { + if (!_this->vulkan_config.loader_handle) { SDL_SetError("Vulkan is not loaded"); return SDL_FALSE; } vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr; - if(videoData->vulkan_xlib_xcb_library) - { + if (videoData->vulkan_xlib_xcb_library) { PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateXcbSurfaceKHR"); VkXcbSurfaceCreateInfoKHR createInfo; VkResult result; - if(!vkCreateXcbSurfaceKHR) - { + if (!vkCreateXcbSurfaceKHR) { SDL_SetError(VK_KHR_XCB_SURFACE_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); return SDL_FALSE; @@ -201,30 +195,25 @@ SDL_bool X11_Vulkan_CreateSurface(_THIS, SDL_zero(createInfo); createInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; createInfo.connection = videoData->vulkan_XGetXCBConnection(videoData->display); - if(!createInfo.connection) - { + if (!createInfo.connection) { SDL_SetError("XGetXCBConnection failed"); return SDL_FALSE; } createInfo.window = (xcb_window_t)windowData->xwindow; result = vkCreateXcbSurfaceKHR(instance, &createInfo, NULL, surface); - if(result != VK_SUCCESS) - { + if (result != VK_SUCCESS) { SDL_SetError("vkCreateXcbSurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result)); return SDL_FALSE; } return SDL_TRUE; - } - else - { + } else { PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateXlibSurfaceKHR"); VkXlibSurfaceCreateInfoKHR createInfo; VkResult result; - if(!vkCreateXlibSurfaceKHR) - { + if (!vkCreateXlibSurfaceKHR) { SDL_SetError(VK_KHR_XLIB_SURFACE_EXTENSION_NAME " extension is not enabled in the Vulkan instance."); return SDL_FALSE; @@ -235,8 +224,7 @@ SDL_bool X11_Vulkan_CreateSurface(_THIS, createInfo.window = (xcb_window_t)windowData->xwindow; result = vkCreateXlibSurfaceKHR(instance, &createInfo, NULL, surface); - if(result != VK_SUCCESS) - { + if (result != VK_SUCCESS) { SDL_SetError("vkCreateXlibSurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result)); return SDL_FALSE; } diff --git a/modules/SDL2/src/video/x11/SDL_x11window.c b/modules/SDL2/src/video/x11/SDL_x11window.c index 25aa25f..2a2a160 100644 --- a/modules/SDL2/src/video/x11/SDL_x11window.c +++ b/modules/SDL2/src/video/x11/SDL_x11window.c @@ -42,16 +42,16 @@ #include "SDL_timer.h" #include "SDL_syswm.h" -#define _NET_WM_STATE_REMOVE 0l -#define _NET_WM_STATE_ADD 1l +#define _NET_WM_STATE_REMOVE 0l +#define _NET_WM_STATE_ADD 1l -static Bool isMapNotify(Display *dpy, XEvent *ev, XPointer win) +static Bool isMapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */ { - return ev->type == MapNotify && ev->xmap.window == *((Window*)win); + return ev->type == MapNotify && ev->xmap.window == *((Window *)win); } -static Bool isUnmapNotify(Display *dpy, XEvent *ev, XPointer win) +static Bool isUnmapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */ { - return ev->type == UnmapNotify && ev->xunmap.window == *((Window*)win); + return ev->type == UnmapNotify && ev->xunmap.window == *((Window *)win); } /* @@ -59,8 +59,7 @@ static Bool isConfigureNotify(Display *dpy, XEvent *ev, XPointer win) { return ev->type == ConfigureNotify && ev->xconfigure.window == *((Window*)win); } -static Bool -X11_XIfEventTimeout(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg, int timeoutMS) +static Bool X11_XIfEventTimeout(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg, int timeoutMS) { Uint32 start = SDL_GetTicks(); @@ -73,11 +72,10 @@ X11_XIfEventTimeout(Display *display, XEvent *event_return, Bool (*predicate)(), } */ -static SDL_bool -X11_IsWindowMapped(_THIS, SDL_Window * window) +static SDL_bool X11_IsWindowMapped(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; XWindowAttributes attr; X11_XGetWindowAttributes(videodata->display, data->xwindow, &attr); @@ -89,8 +87,7 @@ X11_IsWindowMapped(_THIS, SDL_Window * window) } #if 0 -static SDL_bool -X11_IsActionAllowed(SDL_Window *window, Atom action) +static SDL_bool X11_IsActionAllowed(SDL_Window *window, Atom action) { SDL_WindowData *data = (SDL_WindowData *) window->driverdata; Atom _NET_WM_ALLOWED_ACTIONS = data->videodata->_NET_WM_ALLOWED_ACTIONS; @@ -102,10 +99,8 @@ X11_IsActionAllowed(SDL_Window *window, Atom action) Atom *list; SDL_bool ret = SDL_FALSE; - if (X11_XGetWindowProperty(display, data->xwindow, _NET_WM_ALLOWED_ACTIONS, 0, 1024, False, XA_ATOM, &type, &form, &len, &remain, (unsigned char **)&list) == Success) - { - for (i=0; ixwindow, _NET_WM_ALLOWED_ACTIONS, 0, 1024, False, XA_ATOM, &type, &form, &len, &remain, (unsigned char **)&list) == Success) { + for (i=0; idriverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display = videodata->display; /* !!! FIXME: just dereference videodata below instead of copying to locals. */ Atom _NET_WM_STATE = videodata->_NET_WM_STATE; @@ -166,16 +160,15 @@ X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags) if (count > 0) { X11_XChangeProperty(display, xwindow, _NET_WM_STATE, XA_ATOM, 32, - PropModeReplace, (unsigned char *)atoms, count); + PropModeReplace, (unsigned char *)atoms, count); } else { X11_XDeleteProperty(display, xwindow, _NET_WM_STATE); } } -Uint32 -X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) +Uint32 X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; Display *display = videodata->display; Atom _NET_WM_STATE = videodata->_NET_WM_STATE; Atom _NET_WM_STATE_HIDDEN = videodata->_NET_WM_STATE_HIDDEN; @@ -191,10 +184,10 @@ X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) Uint32 flags = 0; if (X11_XGetWindowProperty(display, xwindow, _NET_WM_STATE, - 0l, maxLength, False, XA_ATOM, &actualType, - &actualFormat, &numItems, &bytesAfter, - &propertyValue) == Success) { - Atom *atoms = (Atom *) propertyValue; + 0l, maxLength, False, XA_ATOM, &actualType, + &actualFormat, &numItems, &bytesAfter, + &propertyValue) == Success) { + Atom *atoms = (Atom *)propertyValue; int maximized = 0; int fullscreen = 0; @@ -207,7 +200,7 @@ X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) maximized |= 1; } else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_HORZ) { maximized |= 2; - } else if ( atoms[i] == _NET_WM_STATE_FULLSCREEN) { + } else if (atoms[i] == _NET_WM_STATE_FULLSCREEN) { fullscreen = 1; } } @@ -232,14 +225,13 @@ X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) } } - /* If the window is unmapped, numItems will be zero and _NET_WM_STATE_HIDDEN * will not be set. Do an additional check to see if the window is unmapped * and mark it as SDL_WINDOW_HIDDEN if it is. */ { XWindowAttributes attr; - SDL_memset(&attr,0,sizeof(attr)); + SDL_memset(&attr, 0, sizeof(attr)); X11_XGetWindowAttributes(videodata->display, xwindow, &attr); if (attr.map_state == IsUnmapped) { flags |= SDL_WINDOW_HIDDEN; @@ -254,18 +246,17 @@ X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow) return flags; } -static int -SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) +static int SetupWindowData(_THIS, SDL_Window *window, Window w, BOOL created) { - SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; SDL_WindowData *data; int numwindows = videodata->numwindows; int windowlistlength = videodata->windowlistlength; SDL_WindowData **windowlist = videodata->windowlist; /* Allocate the window data */ - data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data)); - if (!data) { + data = (SDL_WindowData *)SDL_calloc(1, sizeof(*data)); + if (data == NULL) { return SDL_OutOfMemory(); } data->window = window; @@ -275,8 +266,8 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) if (SDL_X11_HAVE_UTF8 && videodata->im) { data->ic = X11_XCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w, - XNInputStyle, XIMPreeditNothing | XIMStatusNothing, - NULL); + XNInputStyle, XIMPreeditNothing | XIMStatusNothing, + NULL); } #endif data->created = created; @@ -289,10 +280,11 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) videodata->numwindows++; } else { windowlist = - (SDL_WindowData **) SDL_realloc(windowlist, - (numwindows + - 1) * sizeof(*windowlist)); - if (!windowlist) { + (SDL_WindowData **)SDL_realloc(windowlist, + (numwindows + + 1) * + sizeof(*windowlist)); + if (windowlist == NULL) { SDL_free(data); return SDL_OutOfMemory(); } @@ -324,10 +316,9 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) { Window FocalWindow; - int RevertTo=0; + int RevertTo = 0; X11_XGetInputFocus(data->videodata->display, &FocalWindow, &RevertTo); - if (FocalWindow==w) - { + if (FocalWindow == w) { window->flags |= SDL_WINDOW_INPUT_FOCUS; } @@ -345,8 +336,7 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created) return 0; } -static void -SetWindowBordered(Display *display, int screen, Window window, SDL_bool border) +static void SetWindowBordered(Display *display, int screen, Window window, SDL_bool border) { /* * this code used to check for KWM_WIN_DECORATION, but KDE hasn't @@ -369,19 +359,18 @@ SetWindowBordered(Display *display, int screen, Window window, SDL_bool border) }; X11_XChangeProperty(display, window, WM_HINTS, WM_HINTS, 32, - PropModeReplace, (unsigned char *) &MWMHints, - sizeof(MWMHints) / sizeof(long)); - } else { /* set the transient hints instead, if necessary */ + PropModeReplace, (unsigned char *)&MWMHints, + sizeof(MWMHints) / sizeof(long)); + } else { /* set the transient hints instead, if necessary */ X11_XSetTransientForHint(display, window, RootWindow(display, screen)); } } -int -X11_CreateWindow(_THIS, SDL_Window * window) +int X11_CreateWindow(_THIS, SDL_Window *window) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; const SDL_bool force_override_redirect = SDL_GetHintBoolean(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, SDL_FALSE); SDL_WindowData *windowdata; Display *display = data->display; @@ -405,8 +394,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) #if SDL_VIDEO_OPENGL_GLX || SDL_VIDEO_OPENGL_EGL const char *forced_visual_id = SDL_GetHint(SDL_HINT_VIDEO_X11_WINDOW_VISUALID); - if (forced_visual_id != NULL && forced_visual_id[0] != '\0') - { + if (forced_visual_id != NULL && forced_visual_id[0] != '\0') { XVisualInfo *vi, template; int nvis; @@ -417,20 +405,17 @@ X11_CreateWindow(_THIS, SDL_Window * window) visual = vi->visual; depth = vi->depth; X11_XFree(vi); - } - else - { + } else { return -1; } - } - else if ((window->flags & SDL_WINDOW_OPENGL) && - !SDL_getenv("SDL_VIDEO_X11_VISUALID")) { + } else if ((window->flags & SDL_WINDOW_OPENGL) && + !SDL_getenv("SDL_VIDEO_X11_VISUALID")) { XVisualInfo *vinfo = NULL; #if SDL_VIDEO_OPENGL_EGL if (((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) || SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) -#if SDL_VIDEO_OPENGL_GLX +#if SDL_VIDEO_OPENGL_GLX && ( !_this->gl_data || X11_GL_UseEGL(_this) ) #endif ) { @@ -443,7 +428,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) #endif } - if (!vinfo) { + if (vinfo == NULL) { return -1; } visual = vinfo->visual; @@ -471,7 +456,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) xattr.colormap = X11_XCreateColormap(display, RootWindow(display, screen), - visual, AllocAll); + visual, AllocAll); /* If we can't create a colormap, then we must die */ if (!xattr.colormap) { @@ -480,7 +465,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) /* OK, we got a colormap, now fill it in as best as we can */ colorcells = SDL_malloc(visual->map_entries * sizeof(XColor)); - if (!colorcells) { + if (colorcells == NULL) { return SDL_OutOfMemory(); } ncolors = visual->map_entries; @@ -537,7 +522,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) } else { xattr.colormap = X11_XCreateColormap(display, RootWindow(display, screen), - visual, AllocNone); + visual, AllocNone); } /* Always create this with the window->windowed.* fields; if we're @@ -547,10 +532,11 @@ X11_CreateWindow(_THIS, SDL_Window * window) migration to fullscreen after CreateSDLWindow returns, which will put all the SDL_Window fields and system state as expected. */ w = X11_XCreateWindow(display, RootWindow(display, screen), - window->windowed.x, window->windowed.y, window->windowed.w, window->windowed.h, - 0, depth, InputOutput, visual, - (CWOverrideRedirect | CWBackPixmap | CWBorderPixel | - CWBackingStore | CWColormap), &xattr); + window->windowed.x, window->windowed.y, window->windowed.w, window->windowed.h, + 0, depth, InputOutput, visual, + (CWOverrideRedirect | CWBackPixmap | CWBorderPixel | + CWBackingStore | CWColormap), + &xattr); if (!w) { return SDL_SetError("Couldn't create window"); } @@ -589,40 +575,40 @@ X11_CreateWindow(_THIS, SDL_Window * window) X11_XFree(classhints); /* Set the PID related to the window for the given hostname, if possible */ if (data->pid > 0) { - long pid = (long) data->pid; + long pid = (long)data->pid; _NET_WM_PID = X11_XInternAtom(display, "_NET_WM_PID", False); X11_XChangeProperty(display, w, _NET_WM_PID, XA_CARDINAL, 32, PropModeReplace, - (unsigned char *) &pid, 1); + (unsigned char *)&pid, 1); } /* Set the window manager state */ X11_SetNetWMState(_this, w, window->flags); - compositor = 2; /* don't disable compositing except for "normal" windows */ - + compositor = 2; /* don't disable compositing except for "normal" windows */ + hint = SDL_GetHint(SDL_HINT_X11_WINDOW_TYPE); if (window->flags & SDL_WINDOW_UTILITY) { wintype_name = "_NET_WM_WINDOW_TYPE_UTILITY"; } else if (window->flags & SDL_WINDOW_TOOLTIP) { wintype_name = "_NET_WM_WINDOW_TYPE_TOOLTIP"; } else if (window->flags & SDL_WINDOW_POPUP_MENU) { wintype_name = "_NET_WM_WINDOW_TYPE_POPUP_MENU"; - } else if ( ((hint = SDL_GetHint(SDL_HINT_X11_WINDOW_TYPE)) != NULL) && *hint ) { + } else if (hint != NULL && *hint) { wintype_name = hint; } else { wintype_name = "_NET_WM_WINDOW_TYPE_NORMAL"; - compositor = 1; /* disable compositing for "normal" windows */ + compositor = 1; /* disable compositing for "normal" windows */ } /* Let the window manager know what type of window we are. */ _NET_WM_WINDOW_TYPE = X11_XInternAtom(display, "_NET_WM_WINDOW_TYPE", False); wintype = X11_XInternAtom(display, wintype_name, False); X11_XChangeProperty(display, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32, - PropModeReplace, (unsigned char *)&wintype, 1); + PropModeReplace, (unsigned char *)&wintype, 1); if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, SDL_TRUE)) { _NET_WM_BYPASS_COMPOSITOR = X11_XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False); X11_XChangeProperty(display, w, _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32, - PropModeReplace, - (unsigned char *)&compositor, 1); + PropModeReplace, + (unsigned char *)&compositor, 1); } { @@ -630,7 +616,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) int proto_count = 0; protocols[proto_count++] = data->WM_DELETE_WINDOW; /* Allow window to be deleted by the WM */ - protocols[proto_count++] = data->WM_TAKE_FOCUS; /* Since we will want to set input focus explicitly */ + protocols[proto_count++] = data->WM_TAKE_FOCUS; /* Since we will want to set input focus explicitly */ /* Default to using ping if there is no hint */ if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_NET_WM_PING, SDL_TRUE)) { @@ -646,23 +632,23 @@ X11_CreateWindow(_THIS, SDL_Window * window) X11_XDestroyWindow(display, w); return -1; } - windowdata = (SDL_WindowData *) window->driverdata; + windowdata = (SDL_WindowData *)window->driverdata; #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 || SDL_VIDEO_OPENGL_EGL - if ((window->flags & SDL_WINDOW_OPENGL) && + if ((window->flags & SDL_WINDOW_OPENGL) && ((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) || SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) -#if SDL_VIDEO_OPENGL_GLX +#if SDL_VIDEO_OPENGL_GLX && ( !_this->gl_data || X11_GL_UseEGL(_this) ) -#endif +#endif ) { -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL if (!_this->egl_data) { return -1; } /* Create the GLES window surface */ - windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) w); + windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)w); if (windowdata->egl_surface == EGL_NO_SURFACE) { return SDL_SetError("Could not create GLES window surface"); @@ -672,7 +658,6 @@ X11_CreateWindow(_THIS, SDL_Window * window) #endif /* SDL_VIDEO_OPENGL_EGL */ } #endif - #ifdef X_HAVE_UTF8_STRING if (SDL_X11_HAVE_UTF8 && windowdata->ic) { @@ -683,11 +668,11 @@ X11_CreateWindow(_THIS, SDL_Window * window) X11_Xinput2SelectTouch(_this, window); X11_XSelectInput(display, w, - (FocusChangeMask | EnterWindowMask | LeaveWindowMask | - ExposureMask | ButtonPressMask | ButtonReleaseMask | - PointerMotionMask | KeyPressMask | KeyReleaseMask | - PropertyChangeMask | StructureNotifyMask | - KeymapStateMask | fevent)); + (FocusChangeMask | EnterWindowMask | LeaveWindowMask | + ExposureMask | ButtonPressMask | ButtonReleaseMask | + PointerMotionMask | KeyPressMask | KeyReleaseMask | + PropertyChangeMask | StructureNotifyMask | + KeymapStateMask | fevent)); /* For _ICC_PROFILE. */ X11_XSelectInput(display, RootWindow(display, screen), PropertyChangeMask); @@ -697,10 +682,9 @@ X11_CreateWindow(_THIS, SDL_Window * window) return 0; } -int -X11_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) +int X11_CreateWindowFrom(_THIS, SDL_Window *window, const void *data) { - Window w = (Window) data; + Window w = (Window)data; window->title = X11_GetWindowTitle(_this, w); @@ -710,10 +694,9 @@ X11_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) return 0; } -char * -X11_GetWindowTitle(_THIS, Window xwindow) +char *X11_GetWindowTitle(_THIS, Window xwindow) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; Display *display = data->display; int status, real_format; Atom real_type; @@ -722,17 +705,17 @@ X11_GetWindowTitle(_THIS, Window xwindow) char *title = NULL; status = X11_XGetWindowProperty(display, xwindow, data->_NET_WM_NAME, - 0L, 8192L, False, data->UTF8_STRING, &real_type, &real_format, - &items_read, &items_left, &propdata); + 0L, 8192L, False, data->UTF8_STRING, &real_type, &real_format, + &items_read, &items_left, &propdata); if (status == Success && propdata) { - title = SDL_strdup(SDL_static_cast(char*, propdata)); + title = SDL_strdup(SDL_static_cast(char *, propdata)); X11_XFree(propdata); } else { status = X11_XGetWindowProperty(display, xwindow, XA_WM_NAME, - 0L, 8192L, False, XA_STRING, &real_type, &real_format, - &items_read, &items_left, &propdata); + 0L, 8192L, False, XA_STRING, &real_type, &real_format, + &items_read, &items_left, &propdata); if (status == Success && propdata) { - title = SDL_iconv_string("UTF-8", "", SDL_static_cast(char*, propdata), items_read+1); + title = SDL_iconv_string("UTF-8", "", SDL_static_cast(char *, propdata), items_read + 1); SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Failed to convert WM_NAME title expecting UTF8! Title: %s", title); X11_XFree(propdata); } else { @@ -743,10 +726,9 @@ X11_GetWindowTitle(_THIS, Window xwindow) return title; } -void -X11_SetWindowTitle(_THIS, SDL_Window * window) +void X11_SetWindowTitle(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Window xwindow = data->xwindow; Display *display = data->videodata->display; char *title = window->title ? window->title : ""; @@ -754,10 +736,9 @@ X11_SetWindowTitle(_THIS, SDL_Window * window) SDL_X11_SetWindowTitle(display, xwindow, title); } -void -X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) +void X11_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; Atom _NET_WM_ICON = data->videodata->_NET_WM_ICON; @@ -778,14 +759,14 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) propdata[1] = icon->h; dst = &propdata[2]; for (y = 0; y < icon->h; ++y) { - src = (Uint32*)((Uint8*)icon->pixels + y * icon->pitch); + src = (Uint32 *)((Uint8 *)icon->pixels + y * icon->pitch); for (x = 0; x < icon->w; ++x) { *dst++ = *src++; } } X11_XChangeProperty(display, data->xwindow, _NET_WM_ICON, XA_CARDINAL, - 32, PropModeReplace, (unsigned char *) propdata, - propsize); + 32, PropModeReplace, (unsigned char *)propdata, + propsize); } SDL_free(propdata); } else { @@ -795,8 +776,7 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) } static SDL_bool caught_x11_error = SDL_FALSE; -static int -X11_CatchAnyError(Display * d, XErrorEvent * e) +static int X11_CatchAnyError(Display *d, XErrorEvent *e) { /* this may happen during tumultuous times when we are polling anyhow, so just note we had an error and return control. */ @@ -804,16 +784,16 @@ X11_CatchAnyError(Display * d, XErrorEvent * e) return 0; } -void -X11_SetWindowPosition(_THIS, SDL_Window * window) +void X11_SetWindowPosition(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; - int (*prev_handler) (Display *, XErrorEvent *) = NULL; + int (*prev_handler)(Display *, XErrorEvent *) = NULL; unsigned int childCount; Window childReturn, root, parent; - Window* children; + Window *children; XWindowAttributes attrs; + int x, y; int orig_x, orig_y; Uint32 timeout; @@ -833,8 +813,6 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) timeout = SDL_GetTicks() + 100; while (SDL_TRUE) { - int x, y; - caught_x11_error = SDL_FALSE; X11_XSync(display, False); X11_XGetWindowAttributes(display, data->xwindow, &attrs); @@ -843,11 +821,9 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) if (!caught_x11_error) { if ((x != orig_x) || (y != orig_y)) { - window->x = x; - window->y = y; - break; /* window moved, time to go. */ + break; /* window moved, time to go. */ } else if ((x == window->x) && (y == window->y)) { - break; /* we're at the place we wanted to be anyhow, drop out. */ + break; /* we're at the place we wanted to be anyhow, drop out. */ } } @@ -858,29 +834,33 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) SDL_Delay(10); } + if (!caught_x11_error) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height); + } + X11_XSetErrorHandler(prev_handler); caught_x11_error = SDL_FALSE; } -void -X11_SetWindowMinimumSize(_THIS, SDL_Window * window) +void X11_SetWindowMinimumSize(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; if (window->flags & SDL_WINDOW_RESIZABLE) { - XSizeHints *sizehints = X11_XAllocSizeHints(); - long userhints; + XSizeHints *sizehints = X11_XAllocSizeHints(); + long userhints; - X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); + X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); - sizehints->min_width = window->min_w; - sizehints->min_height = window->min_h; - sizehints->flags |= PMinSize; + sizehints->min_width = window->min_w; + sizehints->min_height = window->min_h; + sizehints->flags |= PMinSize; - X11_XSetWMNormalHints(display, data->xwindow, sizehints); + X11_XSetWMNormalHints(display, data->xwindow, sizehints); - X11_XFree(sizehints); + X11_XFree(sizehints); /* See comment in X11_SetWindowSize. */ X11_XResizeWindow(display, data->xwindow, window->w, window->h); @@ -891,25 +871,24 @@ X11_SetWindowMinimumSize(_THIS, SDL_Window * window) X11_XFlush(display); } -void -X11_SetWindowMaximumSize(_THIS, SDL_Window * window) +void X11_SetWindowMaximumSize(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; if (window->flags & SDL_WINDOW_RESIZABLE) { - XSizeHints *sizehints = X11_XAllocSizeHints(); - long userhints; + XSizeHints *sizehints = X11_XAllocSizeHints(); + long userhints; - X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); + X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); - sizehints->max_width = window->max_w; - sizehints->max_height = window->max_h; - sizehints->flags |= PMaxSize; + sizehints->max_width = window->max_w; + sizehints->max_height = window->max_h; + sizehints->flags |= PMaxSize; - X11_XSetWMNormalHints(display, data->xwindow, sizehints); + X11_XSetWMNormalHints(display, data->xwindow, sizehints); - X11_XFree(sizehints); + X11_XFree(sizehints); /* See comment in X11_SetWindowSize. */ X11_XResizeWindow(display, data->xwindow, window->w, window->h); @@ -920,12 +899,11 @@ X11_SetWindowMaximumSize(_THIS, SDL_Window * window) X11_XFlush(display); } -void -X11_SetWindowSize(_THIS, SDL_Window * window) +void X11_SetWindowSize(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; - int (*prev_handler) (Display *, XErrorEvent *) = NULL; + int (*prev_handler)(Display *, XErrorEvent *) = NULL; XWindowAttributes attrs; int orig_w, orig_h; Uint32 timeout; @@ -939,20 +917,20 @@ X11_SetWindowSize(_THIS, SDL_Window * window) X11_ResizeWindowShape(window); } if (!(window->flags & SDL_WINDOW_RESIZABLE)) { - /* Apparently, if the X11 Window is set to a 'non-resizable' window, you cannot resize it using the X11_XResizeWindow, thus - we must set the size hints to adjust the window size. */ - XSizeHints *sizehints = X11_XAllocSizeHints(); - long userhints; + /* Apparently, if the X11 Window is set to a 'non-resizable' window, you cannot resize it using the X11_XResizeWindow, thus + we must set the size hints to adjust the window size. */ + XSizeHints *sizehints = X11_XAllocSizeHints(); + long userhints; - X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); + X11_XGetWMNormalHints(display, data->xwindow, sizehints, &userhints); - sizehints->min_width = sizehints->max_width = window->w; - sizehints->min_height = sizehints->max_height = window->h; - sizehints->flags |= PMinSize | PMaxSize; + sizehints->min_width = sizehints->max_width = window->w; + sizehints->min_height = sizehints->max_height = window->h; + sizehints->flags |= PMinSize | PMaxSize; - X11_XSetWMNormalHints(display, data->xwindow, sizehints); + X11_XSetWMNormalHints(display, data->xwindow, sizehints); - X11_XFree(sizehints); + X11_XFree(sizehints); /* From Pierre-Loup: WMs each have their little quirks with that. When you change the @@ -990,27 +968,37 @@ X11_SetWindowSize(_THIS, SDL_Window * window) if (!caught_x11_error) { if ((attrs.width != orig_w) || (attrs.height != orig_h)) { - window->w = attrs.width; - window->h = attrs.height; - break; /* window changed, time to go. */ + break; /* window changed, time to go. */ } else if ((attrs.width == window->w) && (attrs.height == window->h)) { - break; /* we're at the place we wanted to be anyhow, drop out. */ + break; /* we're at the place we wanted to be anyhow, drop out. */ } } if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { + /* Timeout occurred and window size didn't change + * window manager likely denied the resize, + * or the new size is the same as the existing: + * - current width: is 'full width'. + * - try to set new width at 'full width + 1', which get truncated to 'full width'. + * - new width is/remains 'full width' + * So, even if we break here as a timeout, we can send an event, since the requested size isn't the same + * as the final size. (even if final size is same as original size). + */ break; } SDL_Delay(10); } + if (!caught_x11_error) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height); + } + X11_XSetErrorHandler(prev_handler); caught_x11_error = SDL_FALSE; } -int -X11_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *bottom, int *right) +int X11_GetWindowBordersSize(_THIS, SDL_Window *window, int *top, int *left, int *bottom, int *right) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; @@ -1022,40 +1010,38 @@ X11_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b return 0; } -int -X11_SetWindowOpacity(_THIS, SDL_Window * window, float opacity) +int X11_SetWindowOpacity(_THIS, SDL_Window *window, float opacity) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; Atom _NET_WM_WINDOW_OPACITY = data->videodata->_NET_WM_WINDOW_OPACITY; if (opacity == 1.0f) { X11_XDeleteProperty(display, data->xwindow, _NET_WM_WINDOW_OPACITY); - } else { + } else { const Uint32 FullyOpaque = 0xFFFFFFFF; - const long alpha = (long) ((double)opacity * (double)FullyOpaque); + const long alpha = (long)((double)opacity * (double)FullyOpaque); X11_XChangeProperty(display, data->xwindow, _NET_WM_WINDOW_OPACITY, XA_CARDINAL, 32, - PropModeReplace, (unsigned char *)&alpha, 1); + PropModeReplace, (unsigned char *)&alpha, 1); } return 0; } -int -X11_SetWindowModalFor(_THIS, SDL_Window * modal_window, SDL_Window * parent_window) { - SDL_WindowData *data = (SDL_WindowData *) modal_window->driverdata; - SDL_WindowData *parent_data = (SDL_WindowData *) parent_window->driverdata; +int X11_SetWindowModalFor(_THIS, SDL_Window *modal_window, SDL_Window *parent_window) +{ + SDL_WindowData *data = (SDL_WindowData *)modal_window->driverdata; + SDL_WindowData *parent_data = (SDL_WindowData *)parent_window->driverdata; Display *display = data->videodata->display; X11_XSetTransientForHint(display, data->xwindow, parent_data->xwindow); return 0; } -int -X11_SetWindowInputFocus(_THIS, SDL_Window * window) +int X11_SetWindowInputFocus(_THIS, SDL_Window *window) { if (X11_IsWindowMapped(_this, window)) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; X11_XSetInputFocus(display, data->xwindow, RevertToNone, CurrentTime); X11_XFlush(display); @@ -1064,14 +1050,14 @@ X11_SetWindowInputFocus(_THIS, SDL_Window * window) return -1; } -void -X11_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) +void X11_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered) { - const SDL_bool focused = ((window->flags & SDL_WINDOW_INPUT_FOCUS) != 0); - const SDL_bool visible = ((window->flags & SDL_WINDOW_HIDDEN) == 0); - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + const SDL_bool focused = (window->flags & SDL_WINDOW_INPUT_FOCUS) ? SDL_TRUE : SDL_FALSE; + const SDL_bool visible = (!(window->flags & SDL_WINDOW_HIDDEN)) ? SDL_TRUE : SDL_FALSE; + + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; XEvent event; @@ -1100,10 +1086,9 @@ X11_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) X11_XSync(display, False); } -void -X11_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) +void X11_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XSizeHints *sizehints = X11_XAllocSizeHints(); @@ -1138,11 +1123,10 @@ X11_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) X11_XFlush(display); } -void -X11_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) +void X11_SetWindowAlwaysOnTop(_THIS, SDL_Window *window, SDL_bool on_top) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + SDL_DisplayData *displaydata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE; Atom _NET_WM_STATE_ABOVE = data->videodata->_NET_WM_STATE_ABOVE; @@ -1161,17 +1145,16 @@ X11_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top) e.xclient.data.l[3] = 0l; X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0, - SubstructureNotifyMask | SubstructureRedirectMask, &e); + SubstructureNotifyMask | SubstructureRedirectMask, &e); } else { X11_SetNetWMState(_this, data->xwindow, window->flags); } X11_XFlush(display); } -void -X11_ShowWindow(_THIS, SDL_Window * window) +void X11_ShowWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XEvent event; @@ -1180,8 +1163,9 @@ X11_ShowWindow(_THIS, SDL_Window * window) /* Blocking wait for "MapNotify" event. * We use X11_XIfEvent because pXWindowEvent takes a mask rather than a type, * and XCheckTypedWindowEvent doesn't block */ - if(!(window->flags & SDL_WINDOW_FOREIGN)) + if (!(window->flags & SDL_WINDOW_FOREIGN)) { X11_XIfEvent(display, &event, &isMapNotify, (XPointer)&data->xwindow); + } X11_XFlush(display); } @@ -1191,31 +1175,35 @@ X11_ShowWindow(_THIS, SDL_Window * window) X11_XSetInputFocus(display, data->xwindow, RevertToNone, CurrentTime); X11_XFlush(display); } + + /* Get some valid border values, if we haven't them yet */ + if (data->border_left == 0 && data->border_right == 0 && data->border_top == 0 && data->border_bottom == 0) { + X11_GetBorderValues(data); + } } -void -X11_HideWindow(_THIS, SDL_Window * window) +void X11_HideWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + SDL_DisplayData *displaydata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; XEvent event; if (X11_IsWindowMapped(_this, window)) { X11_XWithdrawWindow(display, data->xwindow, displaydata->screen); /* Blocking wait for "UnmapNotify" event */ - if(!(window->flags & SDL_WINDOW_FOREIGN)) + if (!(window->flags & SDL_WINDOW_FOREIGN)) { X11_XIfEvent(display, &event, &isUnmapNotify, (XPointer)&data->xwindow); + } X11_XFlush(display); } } -static void -SetWindowActive(_THIS, SDL_Window * window) +static void SetWindowActive(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; Atom _NET_ACTIVE_WINDOW = data->videodata->_NET_ACTIVE_WINDOW; @@ -1229,21 +1217,20 @@ SetWindowActive(_THIS, SDL_Window * window) e.xclient.message_type = _NET_ACTIVE_WINDOW; e.xclient.format = 32; e.xclient.window = data->xwindow; - e.xclient.data.l[0] = 1; /* source indication. 1 = application */ + e.xclient.data.l[0] = 1; /* source indication. 1 = application */ e.xclient.data.l[1] = data->user_time; e.xclient.data.l[2] = 0; X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0, - SubstructureNotifyMask | SubstructureRedirectMask, &e); + SubstructureNotifyMask | SubstructureRedirectMask, &e); X11_XFlush(display); } } -void -X11_RaiseWindow(_THIS, SDL_Window * window) +void X11_RaiseWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; X11_XRaiseWindow(display, data->xwindow); @@ -1251,12 +1238,11 @@ X11_RaiseWindow(_THIS, SDL_Window * window) X11_XFlush(display); } -static void -SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) +static void SetWindowMaximized(_THIS, SDL_Window *window, SDL_bool maximized) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE; Atom _NET_WM_STATE_MAXIMIZED_VERT = data->videodata->_NET_WM_STATE_MAXIMIZED_VERT; @@ -1267,7 +1253,7 @@ SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) } else { window->flags &= ~SDL_WINDOW_MAXIMIZED; - if ((window->flags & SDL_WINDOW_FULLSCREEN) != 0) { + if (window->flags & SDL_WINDOW_FULLSCREEN) { /* Fullscreen windows are maximized on some window managers, and this is functional behavior, so don't remove that state now, we'll take care of it when we leave fullscreen mode. @@ -1277,8 +1263,25 @@ SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) } if (X11_IsWindowMapped(_this, window)) { + /* !!! FIXME: most of this waiting code is copy/pasted from elsewhere. */ + int (*prev_handler)(Display *, XErrorEvent *) = NULL; + XWindowAttributes attrs; + Window childReturn, root, parent; + Window *children; + unsigned int childCount; + int orig_w, orig_h, orig_x, orig_y; + int x, y; + Uint64 timeout; XEvent e; + X11_XSync(display, False); + X11_XQueryTree(display, data->xwindow, &root, &parent, &children, &childCount); + X11_XGetWindowAttributes(display, data->xwindow, &attrs); + X11_XTranslateCoordinates(display, parent, DefaultRootWindow(display), + attrs.x, attrs.y, &orig_x, &orig_y, &childReturn); + orig_w = attrs.width; + orig_h = attrs.height; + SDL_zero(e); e.xany.type = ClientMessage; e.xclient.message_type = _NET_WM_STATE; @@ -1291,33 +1294,64 @@ SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) e.xclient.data.l[3] = 0l; X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0, - SubstructureNotifyMask | SubstructureRedirectMask, &e); + SubstructureNotifyMask | SubstructureRedirectMask, &e); + + /* Wait a brief time to see if the window manager decided to let this happen. + If the window changes at all, even to an unexpected value, we break out. */ + X11_XSync(display, False); + prev_handler = X11_XSetErrorHandler(X11_CatchAnyError); + + timeout = SDL_GetTicks64() + 100; + while (SDL_TRUE) { + caught_x11_error = SDL_FALSE; + X11_XSync(display, False); + X11_XGetWindowAttributes(display, data->xwindow, &attrs); + X11_XTranslateCoordinates(display, parent, DefaultRootWindow(display), + attrs.x, attrs.y, &x, &y, &childReturn); + + if (!caught_x11_error) { + if ((x != orig_x) || (y != orig_y) || (attrs.width != orig_w) || (attrs.height != orig_h)) { + break; /* window changed, time to go. */ + } + } + + if (SDL_GetTicks64() >= timeout) { + break; + } + + SDL_Delay(10); + } + + if (!caught_x11_error) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height); + } + + X11_XSetErrorHandler(prev_handler); + caught_x11_error = SDL_FALSE; } else { X11_SetNetWMState(_this, data->xwindow, window->flags); } X11_XFlush(display); } -void -X11_MaximizeWindow(_THIS, SDL_Window * window) +void X11_MaximizeWindow(_THIS, SDL_Window *window) { SetWindowMaximized(_this, window, SDL_TRUE); } -void -X11_MinimizeWindow(_THIS, SDL_Window * window) +void X11_MinimizeWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; SDL_DisplayData *displaydata = - (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; + (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; X11_XIconifyWindow(display, data->xwindow, displaydata->screen); X11_XFlush(display); } -void -X11_RestoreWindow(_THIS, SDL_Window * window) +void X11_RestoreWindow(_THIS, SDL_Window *window) { SetWindowMaximized(_this, window, SDL_FALSE); X11_ShowWindow(_this, window); @@ -1325,23 +1359,25 @@ X11_RestoreWindow(_THIS, SDL_Window * window) } /* This asks the Window Manager to handle fullscreen for us. This is the modern way. */ -static void -X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _display, SDL_bool fullscreen) +static void X11_SetWindowFullscreenViaWM(_THIS, SDL_Window *window, SDL_VideoDisplay *_display, SDL_bool fullscreen) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + SDL_DisplayData *displaydata = (SDL_DisplayData *)_display->driverdata; Display *display = data->videodata->display; Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE; Atom _NET_WM_STATE_FULLSCREEN = data->videodata->_NET_WM_STATE_FULLSCREEN; + SDL_bool window_size_changed = SDL_FALSE; + int window_position_changed = 0; if (X11_IsWindowMapped(_this, window)) { XEvent e; /* !!! FIXME: most of this waiting code is copy/pasted from elsewhere. */ - int (*prev_handler) (Display *, XErrorEvent *) = NULL; + int (*prev_handler)(Display *, XErrorEvent *) = NULL; unsigned int childCount; Window childReturn, root, parent; - Window* children; + Window *children; XWindowAttributes attrs; + int x, y; int orig_w, orig_h, orig_x, orig_y; Uint64 timeout; @@ -1384,7 +1420,7 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis e.xclient.data.l[3] = 0l; X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0, - SubstructureNotifyMask | SubstructureRedirectMask, &e); + SubstructureNotifyMask | SubstructureRedirectMask, &e); /* Fullscreen windows sometimes end up being marked maximized by window managers. Force it back to how we expect it to be. */ @@ -1394,7 +1430,7 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis e.xclient.message_type = _NET_WM_STATE; e.xclient.format = 32; e.xclient.window = data->xwindow; - if ((window->flags & SDL_WINDOW_MAXIMIZED) != 0) { + if (window->flags & SDL_WINDOW_MAXIMIZED) { e.xclient.data.l[0] = _NET_WM_STATE_ADD; } else { e.xclient.data.l[0] = _NET_WM_STATE_REMOVE; @@ -1403,9 +1439,19 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis e.xclient.data.l[2] = data->videodata->_NET_WM_STATE_MAXIMIZED_HORZ; e.xclient.data.l[3] = 0l; X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0, - SubstructureNotifyMask | SubstructureRedirectMask, &e); + SubstructureNotifyMask | SubstructureRedirectMask, &e); } + if (!fullscreen) { + int dest_x = 0, dest_y = 0; + dest_x = window->windowed.x - data->border_left; + dest_y = window->windowed.y - data->border_top; + + /* Attempt to move the window */ + X11_XMoveWindow(display, data->xwindow, dest_x, dest_y); + } + + /* Wait a brief time to see if the window manager decided to let this happen. If the window changes at all, even to an unexpected value, we break out. */ X11_XSync(display, False); @@ -1413,7 +1459,6 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis timeout = SDL_GetTicks64() + 100; while (SDL_TRUE) { - int x, y; caught_x11_error = SDL_FALSE; X11_XSync(display, False); @@ -1422,19 +1467,21 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis attrs.x, attrs.y, &x, &y, &childReturn); if (!caught_x11_error) { - SDL_bool window_changed = SDL_FALSE; if ((x != orig_x) || (y != orig_y)) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, x, y); - window_changed = SDL_TRUE; + orig_x = x; + orig_y = y; + window_position_changed += 1; } if ((attrs.width != orig_w) || (attrs.height != orig_h)) { - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height); - window_changed = SDL_TRUE; + orig_w = attrs.width; + orig_h = attrs.height; + window_size_changed = SDL_TRUE; } - if (window_changed) { - break; /* window changed, time to go. */ + /* Wait for at least 2 moves + 1 size changed to have valid values */ + if (window_position_changed >= 2 && window_size_changed) { + break; /* window changed, time to go. */ } } @@ -1445,6 +1492,11 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis SDL_Delay(10); } + if (!caught_x11_error) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height); + } + X11_XSetErrorHandler(prev_handler); caught_x11_error = SDL_FALSE; } else { @@ -1460,7 +1512,7 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis } if (data->visual->class == DirectColor) { - if ( fullscreen ) { + if (fullscreen) { X11_XInstallColormap(display, data->colormap); } else { X11_XUninstallColormap(display, data->colormap); @@ -1470,14 +1522,12 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis X11_XFlush(display); } -void -X11_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * _display, SDL_bool fullscreen) +void X11_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *_display, SDL_bool fullscreen) { X11_SetWindowFullscreenViaWM(_this, window, _display, fullscreen); } -int -X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) +int X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) { SDL_WindowData *data = (SDL_WindowData *) window->driverdata; Display *display = data->videodata->display; @@ -1554,7 +1604,7 @@ typedef struct { */ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) { - unsigned char *ret=NULL; + unsigned char *ret = NULL; Atom type; int fmt; unsigned long count; @@ -1562,34 +1612,35 @@ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) int bytes_fetch = 0; do { - if (ret != NULL) X11_XFree(ret); + if (ret != NULL) { + X11_XFree(ret); + } X11_XGetWindowProperty(disp, w, prop, 0, bytes_fetch, False, AnyPropertyType, &type, &fmt, &count, &bytes_left, &ret); bytes_fetch += bytes_left; } while (bytes_left != 0); - p->data=ret; - p->format=fmt; - p->count=count; - p->type=type; + p->data = ret; + p->format = fmt; + p->count = count; + p->type = type; } -void* -X11_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) +void *X11_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XWindowAttributes attributes; Atom icc_profile_atom; char icc_atom_string[sizeof("_ICC_PROFILE_") + 12]; - void* ret_icc_profile_data = NULL; - CARD8* icc_profile_data; + void *ret_icc_profile_data = NULL; + CARD8 *icc_profile_data; int real_format; unsigned long real_nitems; SDL_x11Prop atomProp; X11_XGetWindowAttributes(display, data->xwindow, &attributes); if (X11_XScreenNumberOfScreen(attributes.screen) > 0) { - SDL_snprintf(icc_atom_string, sizeof("_ICC_PROFILE_") + 12, "%s%d", "_ICC_PROFILE_", X11_XScreenNumberOfScreen(attributes.screen)); + (void)SDL_snprintf(icc_atom_string, sizeof("_ICC_PROFILE_") + 12, "%s%d", "_ICC_PROFILE_", X11_XScreenNumberOfScreen(attributes.screen)); } else { SDL_strlcpy(icc_atom_string, "_ICC_PROFILE", sizeof("_ICC_PROFILE")); } @@ -1611,7 +1662,7 @@ X11_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) } ret_icc_profile_data = SDL_malloc(real_nitems); - if (!ret_icc_profile_data) { + if (ret_icc_profile_data == NULL) { SDL_OutOfMemory(); return NULL; } @@ -1619,14 +1670,13 @@ X11_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size) SDL_memcpy(ret_icc_profile_data, icc_profile_data, real_nitems); *size = real_nitems; X11_XFree(icc_profile_data); - + return ret_icc_profile_data; } -void -X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void X11_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display; if (data == NULL) { @@ -1652,8 +1702,8 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) /* Try for up to 5000ms (5s) to grab. If it still fails, stop trying. */ for (attempts = 0; attempts < 100; attempts++) { - result = X11_XGrabPointer(display, data->xwindow, True, mask, GrabModeAsync, - GrabModeAsync, data->xwindow, None, CurrentTime); + result = X11_XGrabPointer(display, data->xwindow, False, mask, GrabModeAsync, + GrabModeAsync, data->xwindow, None, CurrentTime); if (result == GrabSuccess) { data->mouse_grabbed = SDL_TRUE; break; @@ -1663,7 +1713,7 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) if (result != GrabSuccess) { SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "The X server refused to let us grab the mouse. You might experience input bugs."); - data->videodata->broken_pointer_grab = SDL_TRUE; /* don't try again. */ + data->videodata->broken_pointer_grab = SDL_TRUE; /* don't try again. */ } } @@ -1679,10 +1729,9 @@ X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) X11_XSync(display, False); } -void -X11_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) +void X11_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display; if (data == NULL) { @@ -1707,13 +1756,12 @@ X11_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed) X11_XSync(display, False); } -void -X11_DestroyWindow(_THIS, SDL_Window * window) +void X11_DestroyWindow(_THIS, SDL_Window *window) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; if (window->shaper) { - SDL_ShapeData *shapedata = (SDL_ShapeData *) window->shaper->driverdata; + SDL_ShapeData *shapedata = (SDL_ShapeData *)window->shaper->driverdata; if (shapedata) { SDL_free(shapedata->bitmap); SDL_free(shapedata); @@ -1723,7 +1771,7 @@ X11_DestroyWindow(_THIS, SDL_Window * window) } if (data) { - SDL_VideoData *videodata = (SDL_VideoData *) data->videodata; + SDL_VideoData *videodata = (SDL_VideoData *)data->videodata; Display *display = videodata->display; int numwindows = videodata->numwindows; SDL_WindowData **windowlist = videodata->windowlist; @@ -1760,13 +1808,12 @@ X11_DestroyWindow(_THIS, SDL_Window * window) window->driverdata = NULL; } -SDL_bool -X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +SDL_bool X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { SDL_WindowData *data = (SDL_WindowData *) window->driverdata; Display *display; - if (!data) { + if (data == NULL) { /* This sometimes happens in SDL_IBus_UpdateTextRect() while creating the window */ SDL_SetError("Window not initialized"); return SDL_FALSE; @@ -1786,37 +1833,34 @@ X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) } } -int -X11_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) +int X11_SetWindowHitTest(SDL_Window *window, SDL_bool enabled) { - return 0; /* just succeed, the real work is done elsewhere. */ + return 0; /* just succeed, the real work is done elsewhere. */ } -void -X11_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept) +void X11_AcceptDragAndDrop(SDL_Window *window, SDL_bool accept) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; Atom XdndAware = X11_XInternAtom(display, "XdndAware", False); if (accept) { Atom xdnd_version = 5; X11_XChangeProperty(display, data->xwindow, XdndAware, XA_ATOM, 32, - PropModeReplace, (unsigned char*)&xdnd_version, 1); + PropModeReplace, (unsigned char *)&xdnd_version, 1); } else { X11_XDeleteProperty(display, data->xwindow, XdndAware); } } -int -X11_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation) +int X11_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XWMHints *wmhints; wmhints = X11_XGetWMHints(display, data->xwindow); - if (!wmhints) { + if (wmhints == NULL) { return SDL_SetError("Couldn't get WM hints"); } @@ -1854,10 +1898,11 @@ X11_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation) return 0; } -int SDL_X11_SetWindowTitle(Display* display, Window xwindow, char* title) { +int SDL_X11_SetWindowTitle(Display *display, Window xwindow, char *title) +{ Atom _NET_WM_NAME = X11_XInternAtom(display, "_NET_WM_NAME", False); XTextProperty titleprop; - int conv = X11_XmbTextListToTextProperty(display, (char**) &title, 1, XTextStyle, &titleprop); + int conv = X11_XmbTextListToTextProperty(display, &title, 1, XTextStyle, &titleprop); Status status; if (X11_XSupportsLocale() != True) { @@ -1867,7 +1912,7 @@ int SDL_X11_SetWindowTitle(Display* display, Window xwindow, char* title) { if (conv == 0) { X11_XSetTextProperty(display, xwindow, &titleprop, XA_WM_NAME); X11_XFree(titleprop.value); - /* we know this can't be a locale error as we checked X locale validity */ + /* we know this can't be a locale error as we checked X locale validity */ } else if (conv < 0) { return SDL_OutOfMemory(); } else { /* conv > 0 */ @@ -1876,7 +1921,7 @@ int SDL_X11_SetWindowTitle(Display* display, Window xwindow, char* title) { } #ifdef X_HAVE_UTF8_STRING - status = X11_Xutf8TextListToTextProperty(display, (char **) &title, 1, XUTF8StringStyle, &titleprop); + status = X11_Xutf8TextListToTextProperty(display, &title, 1, XUTF8StringStyle, &titleprop); if (status == Success) { X11_XSetTextProperty(display, xwindow, &titleprop, _NET_WM_NAME); X11_XFree(titleprop.value); diff --git a/modules/SDL2/src/video/x11/SDL_x11window.h b/modules/SDL2/src/video/x11/SDL_x11window.h index 783a764..f31eb40 100644 --- a/modules/SDL2/src/video/x11/SDL_x11window.h +++ b/modules/SDL2/src/video/x11/SDL_x11window.h @@ -27,9 +27,9 @@ video mode changes and we can respond to them by triggering more mode changes. */ -#define PENDING_FOCUS_TIME 200 +#define PENDING_FOCUS_TIME 200 -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL #include #endif @@ -70,7 +70,7 @@ typedef struct Window xdnd_source; SDL_bool flashing_window; Uint32 flash_cancel_time; -#if SDL_VIDEO_OPENGL_EGL +#if SDL_VIDEO_OPENGL_EGL EGLSurface egl_surface; #endif #if SDL_VIDEO_DRIVER_X11_XFIXES @@ -83,8 +83,8 @@ typedef struct extern void X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags); extern Uint32 X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow); -extern int X11_CreateWindow(_THIS, SDL_Window * window); -extern int X11_CreateWindowFrom(_THIS, SDL_Window * window, const void *data); +extern int X11_CreateWindow(_THIS, SDL_Window *window); +extern int X11_CreateWindowFrom(_THIS, SDL_Window *window, const void *data); extern char *X11_GetWindowTitle(_THIS, Window xwindow); extern void X11_SetWindowTitle(_THIS, SDL_Window * window); extern void X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon); @@ -114,10 +114,10 @@ extern void X11_DestroyWindow(_THIS, SDL_Window * window); extern SDL_bool X11_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info); extern int X11_SetWindowHitTest(SDL_Window *window, SDL_bool enabled); -extern void X11_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept); -extern int X11_FlashWindow(_THIS, SDL_Window * window, SDL_FlashOperation operation); +extern void X11_AcceptDragAndDrop(SDL_Window *window, SDL_bool accept); +extern int X11_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation); -int SDL_X11_SetWindowTitle(Display* display, Window xwindow, char* string); +int SDL_X11_SetWindowTitle(Display *display, Window xwindow, char *title); #endif /* SDL_x11window_h_ */ diff --git a/modules/SDL2/src/video/x11/SDL_x11xfixes.c b/modules/SDL2/src/video/x11/SDL_x11xfixes.c index 53b9069..662759f 100644 --- a/modules/SDL2/src/video/x11/SDL_x11xfixes.c +++ b/modules/SDL2/src/video/x11/SDL_x11xfixes.c @@ -30,24 +30,21 @@ static int xfixes_initialized = 0; -static int -query_xfixes_version(Display *display, int major, int minor) +static int query_xfixes_version(Display *display, int major, int minor) { /* We don't care if this fails, so long as it sets major/minor on it's way out the door. */ X11_XFixesQueryVersion(display, &major, &minor); - return ((major * 1000) + minor); + return (major * 1000) + minor; } -static SDL_bool -xfixes_version_atleast(const int version, const int wantmajor, const int wantminor) +static SDL_bool xfixes_version_atleast(const int version, const int wantmajor, const int wantminor) { - return (version >= ((wantmajor * 1000) + wantminor)); + return version >= ((wantmajor * 1000) + wantminor); } -void -X11_InitXfixes(_THIS) +void X11_InitXfixes(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int version = 0; int event, error; @@ -67,14 +64,12 @@ X11_InitXfixes(_THIS) xfixes_initialized = 1; } -int -X11_XfixesIsInitialized() +int X11_XfixesIsInitialized() { return xfixes_initialized; } -void -X11_SetWindowMouseRect(_THIS, SDL_Window * window) +void X11_SetWindowMouseRect(_THIS, SDL_Window *window) { if (SDL_RectEmpty(&window->mouse_rect)) { X11_ConfineCursorWithFlags(_this, window, NULL, 0); @@ -83,7 +78,7 @@ X11_SetWindowMouseRect(_THIS, SDL_Window * window) X11_ConfineCursorWithFlags(_this, window, &window->mouse_rect, 0); } else { /* Save the state for when we get focus again */ - SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata; SDL_memcpy(&wdata->barrier_rect, &window->mouse_rect, sizeof(wdata->barrier_rect)); @@ -92,14 +87,13 @@ X11_SetWindowMouseRect(_THIS, SDL_Window * window) } } -int -X11_ConfineCursorWithFlags(_THIS, SDL_Window * window, const SDL_Rect * rect, int flags) +int X11_ConfineCursorWithFlags(_THIS, SDL_Window *window, const SDL_Rect *rect, int flags) { /* Yaakuro: For some reason Xfixes when confining inside a rect where the * edges exactly match, a rectangle the cursor 'slips' out of the barrier. * To prevent that the lines for the barriers will span the whole screen. */ - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; SDL_WindowData *wdata; if (!X11_XfixesIsInitialized()) { @@ -108,11 +102,11 @@ X11_ConfineCursorWithFlags(_THIS, SDL_Window * window, const SDL_Rect * rect, in /* If there is already a set of barriers active, disable them. */ if (data->active_cursor_confined_window) { - X11_DestroyPointerBarrier(_this, data->active_cursor_confined_window); + X11_DestroyPointerBarrier(_this, data->active_cursor_confined_window); } SDL_assert(window != NULL); - wdata = (SDL_WindowData *) window->driverdata; + wdata = (SDL_WindowData *)window->driverdata; /* If user did not specify an area to confine, destroy the barrier that was/is assigned to * this window it was assigned */ @@ -140,28 +134,28 @@ X11_ConfineCursorWithFlags(_THIS, SDL_Window * window, const SDL_Rect * rect, in /** Create the left barrier */ wdata->barrier[0] = X11_XFixesCreatePointerBarrier(data->display, wdata->xwindow, - x1, bounds.y, - x1, bounds.y + bounds.h, - BarrierPositiveX, - 0, NULL); + x1, bounds.y, + x1, bounds.y + bounds.h, + BarrierPositiveX, + 0, NULL); /** Create the right barrier */ wdata->barrier[1] = X11_XFixesCreatePointerBarrier(data->display, wdata->xwindow, - x2, bounds.y, - x2, bounds.y + bounds.h, - BarrierNegativeX, - 0, NULL); + x2, bounds.y, + x2, bounds.y + bounds.h, + BarrierNegativeX, + 0, NULL); /** Create the top barrier */ wdata->barrier[2] = X11_XFixesCreatePointerBarrier(data->display, wdata->xwindow, - bounds.x, y1, - bounds.x + bounds.w, y1, - BarrierPositiveY, - 0, NULL); + bounds.x, y1, + bounds.x + bounds.w, y1, + BarrierPositiveY, + 0, NULL); /** Create the bottom barrier */ wdata->barrier[3] = X11_XFixesCreatePointerBarrier(data->display, wdata->xwindow, - bounds.x, y2, - bounds.x + bounds.w, y2, - BarrierNegativeY, - 0, NULL); + bounds.x, y2, + bounds.x + bounds.w, y2, + BarrierNegativeY, + 0, NULL); X11_XFlush(data->display); @@ -182,13 +176,12 @@ X11_ConfineCursorWithFlags(_THIS, SDL_Window * window, const SDL_Rect * rect, in return 0; } -void -X11_DestroyPointerBarrier(_THIS, SDL_Window * window) +void X11_DestroyPointerBarrier(_THIS, SDL_Window *window) { int i; - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; if (window) { - SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; + SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata; for (i = 0; i < 4; i++) { if (wdata->barrier[i] > 0) { diff --git a/modules/SDL2/src/video/x11/SDL_x11xfixes.h b/modules/SDL2/src/video/x11/SDL_x11xfixes.h index dce6cc5..92c6594 100644 --- a/modules/SDL2/src/video/x11/SDL_x11xfixes.h +++ b/modules/SDL2/src/video/x11/SDL_x11xfixes.h @@ -30,9 +30,9 @@ extern void X11_InitXfixes(_THIS); extern int X11_XfixesIsInitialized(void); -extern void X11_SetWindowMouseRect(_THIS, SDL_Window * window); -extern int X11_ConfineCursorWithFlags(_THIS, SDL_Window * window, const SDL_Rect * rect, int flags); -extern void X11_DestroyPointerBarrier(_THIS, SDL_Window * window); +extern void X11_SetWindowMouseRect(_THIS, SDL_Window *window); +extern int X11_ConfineCursorWithFlags(_THIS, SDL_Window *window, const SDL_Rect *rect, int flags); +extern void X11_DestroyPointerBarrier(_THIS, SDL_Window *window); #endif /* SDL_VIDEO_DRIVER_X11_XFIXES */ diff --git a/modules/SDL2/src/video/x11/SDL_x11xinput2.c b/modules/SDL2/src/video/x11/SDL_x11xinput2.c index 224366f..4fe205b 100644 --- a/modules/SDL2/src/video/x11/SDL_x11xinput2.c +++ b/modules/SDL2/src/video/x11/SDL_x11xinput2.c @@ -42,17 +42,19 @@ static int xinput2_multitouch_supported = 0; * this extension */ static int xinput2_opcode; -static void parse_valuators(const double *input_values, const unsigned char *mask,int mask_len, - double *output_values,int output_values_len) { - int i = 0,z = 0; +static void parse_valuators(const double *input_values, const unsigned char *mask, int mask_len, + double *output_values, int output_values_len) +{ + int i = 0, z = 0; int top = mask_len * 8; - if (top > MAX_AXIS) + if (top > MAX_AXIS) { top = MAX_AXIS; + } - SDL_memset(output_values,0,output_values_len * sizeof(double)); + SDL_memset(output_values, 0, output_values_len * sizeof(double)); for (; i < top && z < output_values_len; i++) { if (XIMaskIsSet(mask, i)) { - const int value = (int) *input_values; + const int value = (int)*input_values; output_values[z] = value; input_values++; } @@ -60,23 +62,20 @@ static void parse_valuators(const double *input_values, const unsigned char *mas } } -static int -query_xinput2_version(Display *display, int major, int minor) +static int query_xinput2_version(Display *display, int major, int minor) { /* We don't care if this fails, so long as it sets major/minor on it's way out the door. */ X11_XIQueryVersion(display, &major, &minor); - return ((major * 1000) + minor); + return (major * 1000) + minor; } -static SDL_bool -xinput2_version_atleast(const int version, const int wantmajor, const int wantminor) +static SDL_bool xinput2_version_atleast(const int version, const int wantmajor, const int wantminor) { - return ( version >= ((wantmajor * 1000) + wantminor) ); + return version >= ((wantmajor * 1000) + wantminor); } #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH -static SDL_Window * -xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window) +static SDL_Window *xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window) { int i; for (i = 0; i < videodata->numwindows; i++) { @@ -88,8 +87,7 @@ xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window) return NULL; } -static void -xinput2_normalize_touch_coordinates(SDL_Window *window, double in_x, double in_y, float *out_x, float *out_y) +static void xinput2_normalize_touch_coordinates(SDL_Window *window, double in_x, double in_y, float *out_x, float *out_y) { if (window) { if (window->w == 1) { @@ -112,11 +110,10 @@ xinput2_normalize_touch_coordinates(SDL_Window *window, double in_x, double in_y #endif /* SDL_VIDEO_DRIVER_X11_XINPUT2 */ -void -X11_InitXinput2(_THIS) +void X11_InitXinput2(_THIS) { #if SDL_VIDEO_DRIVER_X11_XINPUT2 - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; int version = 0; XIEventMask eventmask; @@ -124,14 +121,14 @@ X11_InitXinput2(_THIS) int event, err; /* - * Initialize XInput 2 - * According to http://who-t.blogspot.com/2009/05/xi2-recipes-part-1.html its better - * to inform Xserver what version of Xinput we support.The server will store the version we support. - * "As XI2 progresses it becomes important that you use this call as the server may treat the client - * differently depending on the supported version". - * - * FIXME:event and err are not needed but if not passed X11_XQueryExtension returns SegmentationFault - */ + * Initialize XInput 2 + * According to http://who-t.blogspot.com/2009/05/xi2-recipes-part-1.html its better + * to inform Xserver what version of Xinput we support.The server will store the version we support. + * "As XI2 progresses it becomes important that you use this call as the server may treat the client + * differently depending on the supported version". + * + * FIXME:event and err are not needed but if not passed X11_XQueryExtension returns SegmentationFault + */ if (!SDL_X11_HAVE_XINPUT2 || !X11_XQueryExtension(data->display, "XInputExtension", &xinput2_opcode, &event, &err)) { return; /* X server does not have XInput at all */ @@ -145,7 +142,7 @@ X11_InitXinput2(_THIS) xinput2_initialized = 1; -#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH /* Multitouch needs XInput 2.2 */ +#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH /* Multitouch needs XInput 2.2 */ xinput2_multitouch_supported = xinput2_version_atleast(version, 2, 2); #endif @@ -184,9 +181,9 @@ X11_InitXinput2(_THIS) #endif } +#if SDL_VIDEO_DRIVER_X11_XINPUT2 /* xi2 device went away? take it out of the list. */ -static void -xinput2_remove_device_info(SDL_VideoData *videodata, const int device_id) +static void xinput2_remove_device_info(SDL_VideoData *videodata, const int device_id) { SDL_XInput2DeviceInfo *prev = NULL; SDL_XInput2DeviceInfo *devinfo; @@ -206,9 +203,7 @@ xinput2_remove_device_info(SDL_VideoData *videodata, const int device_id) } } -#if SDL_VIDEO_DRIVER_X11_XINPUT2 -static SDL_XInput2DeviceInfo * -xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) +static SDL_XInput2DeviceInfo *xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) { /* cache device info as we see new devices. */ SDL_XInput2DeviceInfo *prev = NULL; @@ -220,7 +215,7 @@ xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) for (devinfo = videodata->mouse_device_info; devinfo != NULL; devinfo = devinfo->next) { if (devinfo->device_id == device_id) { SDL_assert((devinfo == videodata->mouse_device_info) == (prev == NULL)); - if (prev != NULL) { /* move this to the front of the list, assuming we'll get more from this one. */ + if (prev != NULL) { /* move this to the front of the list, assuming we'll get more from this one. */ prev->next = devinfo->next; devinfo->next = videodata->mouse_device_info; videodata->mouse_device_info = devinfo; @@ -231,14 +226,14 @@ xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) } /* don't know about this device yet, query and cache it. */ - devinfo = (SDL_XInput2DeviceInfo *) SDL_calloc(1, sizeof (SDL_XInput2DeviceInfo)); - if (!devinfo) { + devinfo = (SDL_XInput2DeviceInfo *)SDL_calloc(1, sizeof(SDL_XInput2DeviceInfo)); + if (devinfo == NULL) { SDL_OutOfMemory(); return NULL; } xidevinfo = X11_XIQueryDevice(videodata->display, device_id, &i); - if (!xidevinfo) { + if (xidevinfo == NULL) { SDL_free(devinfo); return NULL; } @@ -249,7 +244,7 @@ xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) !!! FIXME: axis could be relative or absolute, and they might not even be the X and Y axes! !!! FIXME: But we go on, for now. Maybe we need a more robust mouse API in SDL3... */ for (i = 0; i < xidevinfo->num_classes; i++) { - const XIValuatorClassInfo *v = (const XIValuatorClassInfo *) xidevinfo->classes[i]; + const XIValuatorClassInfo *v = (const XIValuatorClassInfo *)xidevinfo->classes[i]; if (v->type == XIValuatorClass) { devinfo->relative[axis] = (v->mode == XIModeRelative) ? SDL_TRUE : SDL_FALSE; devinfo->minval[axis] = v->min; @@ -269,124 +264,118 @@ xinput2_get_device_info(SDL_VideoData *videodata, const int device_id) } #endif -int -X11_HandleXinput2Event(SDL_VideoData *videodata, XGenericEventCookie *cookie) +int X11_HandleXinput2Event(SDL_VideoData *videodata, XGenericEventCookie *cookie) { #if SDL_VIDEO_DRIVER_X11_XINPUT2 if (cookie->extension != xinput2_opcode) { return 0; } - switch(cookie->evtype) { - case XI_RawMotion: { - const XIRawEvent *rawev = (const XIRawEvent*)cookie->data; - SDL_Mouse *mouse = SDL_GetMouse(); - SDL_XInput2DeviceInfo *devinfo; - double coords[2]; - double processed_coords[2]; - int i; - - videodata->global_mouse_changed = SDL_TRUE; - - if (!mouse->relative_mode || mouse->relative_mode_warp) { - return 0; - } - - devinfo = xinput2_get_device_info(videodata, rawev->deviceid); - if (!devinfo) { - return 0; /* oh well. */ - } + switch (cookie->evtype) { + case XI_RawMotion: + { + const XIRawEvent *rawev = (const XIRawEvent *)cookie->data; + SDL_Mouse *mouse = SDL_GetMouse(); + SDL_XInput2DeviceInfo *devinfo; + double coords[2]; + double processed_coords[2]; + int i; + + videodata->global_mouse_changed = SDL_TRUE; + + if (!mouse->relative_mode || mouse->relative_mode_warp) { + return 0; + } - parse_valuators(rawev->raw_values,rawev->valuators.mask, - rawev->valuators.mask_len,coords,2); + devinfo = xinput2_get_device_info(videodata, rawev->deviceid); + if (devinfo == NULL) { + return 0; /* oh well. */ + } - if ((rawev->time == devinfo->prev_time) && (coords[0] == devinfo->prev_coords[0]) && (coords[1] == devinfo->prev_coords[1])) { - return 0; /* duplicate event, drop it. */ - } + parse_valuators(rawev->raw_values, rawev->valuators.mask, + rawev->valuators.mask_len, coords, 2); - for (i = 0; i < 2; i++) { - if (devinfo->relative[i]) { - processed_coords[i] = coords[i]; - } else { - processed_coords[i] = devinfo->prev_coords[i] - coords[i]; /* convert absolute to relative */ - } + for (i = 0; i < 2; i++) { + if (devinfo->relative[i]) { + processed_coords[i] = coords[i]; + } else { + processed_coords[i] = devinfo->prev_coords[i] - coords[i]; /* convert absolute to relative */ } - - SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, (int) processed_coords[0], (int) processed_coords[1]); - devinfo->prev_coords[0] = coords[0]; - devinfo->prev_coords[1] = coords[1]; - devinfo->prev_time = rawev->time; - return 1; } - break; - case XI_HierarchyChanged: { - const XIHierarchyEvent *hierev = (const XIHierarchyEvent *) cookie->data; - int i; - for (i = 0; i < hierev->num_info; i++) { - if (hierev->info[i].flags & XISlaveRemoved) { - xinput2_remove_device_info(videodata, hierev->info[i].deviceid); - } + SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, (int)processed_coords[0], (int)processed_coords[1]); + devinfo->prev_coords[0] = coords[0]; + devinfo->prev_coords[1] = coords[1]; + return 1; + } break; + + case XI_HierarchyChanged: + { + const XIHierarchyEvent *hierev = (const XIHierarchyEvent *)cookie->data; + int i; + for (i = 0; i < hierev->num_info; i++) { + if (hierev->info[i].flags & XISlaveRemoved) { + xinput2_remove_device_info(videodata, hierev->info[i].deviceid); } } - break; + } break; - case XI_RawButtonPress: - case XI_RawButtonRelease: + case XI_RawButtonPress: + case XI_RawButtonRelease: #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - case XI_RawTouchBegin: - case XI_RawTouchUpdate: - case XI_RawTouchEnd: + case XI_RawTouchBegin: + case XI_RawTouchUpdate: + case XI_RawTouchEnd: #endif - videodata->global_mouse_changed = SDL_TRUE; - break; + videodata->global_mouse_changed = SDL_TRUE; + break; #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - /* With multitouch, register to receive XI_Motion (which desctivates MotionNotify), - * so that we can distinguish real mouse motions from synthetic one. */ - case XI_Motion: { - const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data; - int pointer_emulated = (xev->flags & XIPointerEmulated); - - if (! pointer_emulated) { - SDL_Mouse *mouse = SDL_GetMouse(); - if (!mouse->relative_mode || mouse->relative_mode_warp) { - SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); - if (window) { - SDL_SendMouseMotion(window, 0, 0, xev->event_x, xev->event_y); - } + /* With multitouch, register to receive XI_Motion (which desctivates MotionNotify), + * so that we can distinguish real mouse motions from synthetic one. */ + case XI_Motion: + { + const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data; + int pointer_emulated = (xev->flags & XIPointerEmulated); + + if (!pointer_emulated) { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!mouse->relative_mode || mouse->relative_mode_warp) { + SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); + if (window) { + SDL_SendMouseMotion(window, 0, 0, xev->event_x, xev->event_y); } } - return 1; - } - break; - - case XI_TouchBegin: { - const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data; - float x, y; - SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); - xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); - SDL_SendTouch(xev->sourceid, xev->detail, window, SDL_TRUE, x, y, 1.0); - return 1; - } - break; - case XI_TouchEnd: { - const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data; - float x, y; - SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); - xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); - SDL_SendTouch(xev->sourceid, xev->detail, window, SDL_FALSE, x, y, 1.0); - return 1; - } - break; - case XI_TouchUpdate: { - const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data; - float x, y; - SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); - xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); - SDL_SendTouchMotion(xev->sourceid, xev->detail, window, x, y, 1.0); - return 1; } - break; + return 1; + } break; + + case XI_TouchBegin: + { + const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data; + float x, y; + SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); + xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); + SDL_SendTouch(xev->sourceid, xev->detail, window, SDL_TRUE, x, y, 1.0); + return 1; + } break; + case XI_TouchEnd: + { + const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data; + float x, y; + SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); + xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); + SDL_SendTouch(xev->sourceid, xev->detail, window, SDL_FALSE, x, y, 1.0); + return 1; + } break; + case XI_TouchUpdate: + { + const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data; + float x, y; + SDL_Window *window = xinput2_get_sdlwindow(videodata, xev->event); + xinput2_normalize_touch_coordinates(window, xev->event_x, xev->event_y, &x, &y); + SDL_SendTouchMotion(xev->sourceid, xev->detail, window, x, y, 1.0); + return 1; + } break; #endif } @@ -394,13 +383,12 @@ X11_HandleXinput2Event(SDL_VideoData *videodata, XGenericEventCookie *cookie) return 0; } -void -X11_InitXinput2Multitouch(_THIS) +void X11_InitXinput2Multitouch(_THIS) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; XIDeviceInfo *info; - int ndevices,i,j; + int ndevices, i, j; if (!X11_Xinput2IsMultitouchSupported()) { return; @@ -414,11 +402,12 @@ X11_InitXinput2Multitouch(_THIS) SDL_TouchID touchId; SDL_TouchDeviceType touchType; XIAnyClassInfo *class = dev->classes[j]; - XITouchClassInfo *t = (XITouchClassInfo*)class; + XITouchClassInfo *t = (XITouchClassInfo *)class; /* Only touch devices */ - if (class->type != XITouchClass) + if (class->type != XITouchClass) { continue; + } if (t->mode == XIDependentTouch) { touchType = SDL_TOUCH_DEVICE_INDIRECT_RELATIVE; @@ -434,8 +423,7 @@ X11_InitXinput2Multitouch(_THIS) #endif } -void -X11_Xinput2SelectTouch(_THIS, SDL_Window *window) +void X11_Xinput2SelectTouch(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH SDL_VideoData *data = NULL; @@ -447,8 +435,8 @@ X11_Xinput2SelectTouch(_THIS, SDL_Window *window) return; } - data = (SDL_VideoData *) _this->driverdata; - window_data = (SDL_WindowData*)window->driverdata; + data = (SDL_VideoData *)_this->driverdata; + window_data = (SDL_WindowData *)window->driverdata; eventmask.deviceid = XIAllMasterDevices; eventmask.mask_len = sizeof(mask); @@ -459,13 +447,11 @@ X11_Xinput2SelectTouch(_THIS, SDL_Window *window) XISetMask(mask, XI_TouchEnd); XISetMask(mask, XI_Motion); - X11_XISelectEvents(data->display,window_data->xwindow,&eventmask,1); + X11_XISelectEvents(data->display, window_data->xwindow, &eventmask, 1); #endif } - -int -X11_Xinput2IsInitialized() +int X11_Xinput2IsInitialized() { #if SDL_VIDEO_DRIVER_X11_XINPUT2 return xinput2_initialized; @@ -474,8 +460,7 @@ X11_Xinput2IsInitialized() #endif } -int -X11_Xinput2IsMultitouchSupported() +int X11_Xinput2IsMultitouchSupported() { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH return xinput2_initialized && xinput2_multitouch_supported; @@ -484,11 +469,10 @@ X11_Xinput2IsMultitouchSupported() #endif } -void -X11_Xinput2GrabTouch(_THIS, SDL_Window *window) +void X11_Xinput2GrabTouch(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; unsigned char mask[4] = { 0, 0, 0, 0 }; @@ -515,11 +499,10 @@ X11_Xinput2GrabTouch(_THIS, SDL_Window *window) #endif } -void -X11_Xinput2UngrabTouch(_THIS, SDL_Window *window) +void X11_Xinput2UngrabTouch(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; Display *display = data->videodata->display; XIGrabModifiers mods; diff --git a/modules/SDL2/src/video/x11/SDL_x11xinput2.h b/modules/SDL2/src/video/x11/SDL_x11xinput2.h index 42d1709..4d7890b 100644 --- a/modules/SDL2/src/video/x11/SDL_x11xinput2.h +++ b/modules/SDL2/src/video/x11/SDL_x11xinput2.h @@ -32,7 +32,7 @@ typedef struct XGenericEventCookie XGenericEventCookie; extern void X11_InitXinput2(_THIS); extern void X11_InitXinput2Multitouch(_THIS); -extern int X11_HandleXinput2Event(SDL_VideoData *videodata,XGenericEventCookie *cookie); +extern int X11_HandleXinput2Event(SDL_VideoData *videodata, XGenericEventCookie *cookie); extern int X11_Xinput2IsInitialized(void); extern int X11_Xinput2IsMultitouchSupported(void); extern void X11_Xinput2SelectTouch(_THIS, SDL_Window *window); diff --git a/modules/SDL2/src/video/x11/edid.h b/modules/SDL2/src/video/x11/edid.h index cb9f0e8..37abbec 100644 --- a/modules/SDL2/src/video/x11/edid.h +++ b/modules/SDL2/src/video/x11/edid.h @@ -41,127 +41,127 @@ struct Timing struct DetailedTiming { - int pixel_clock; - int h_addr; - int h_blank; - int h_sync; - int h_front_porch; - int v_addr; - int v_blank; - int v_sync; - int v_front_porch; - int width_mm; - int height_mm; - int right_border; - int top_border; - int interlaced; - StereoType stereo; - - int digital_sync; + int pixel_clock; + int h_addr; + int h_blank; + int h_sync; + int h_front_porch; + int v_addr; + int v_blank; + int v_sync; + int v_front_porch; + int width_mm; + int height_mm; + int right_border; + int top_border; + int interlaced; + StereoType stereo; + + int digital_sync; union { - struct - { - int bipolar; - int serrations; - int sync_on_green; - } analog; - - struct - { - int composite; - int serrations; - int negative_vsync; - int negative_hsync; - } digital; + struct + { + int bipolar; + int serrations; + int sync_on_green; + } analog; + + struct + { + int composite; + int serrations; + int negative_vsync; + int negative_hsync; + } digital; } ad; }; struct MonitorInfo { - int checksum; - char manufacturer_code[4]; - int product_code; - unsigned int serial_number; - - int production_week; /* -1 if not specified */ - int production_year; /* -1 if not specified */ - int model_year; /* -1 if not specified */ - - int major_version; - int minor_version; - - int is_digital; - + int checksum; + char manufacturer_code[4]; + int product_code; + unsigned int serial_number; + + int production_week; /* -1 if not specified */ + int production_year; /* -1 if not specified */ + int model_year; /* -1 if not specified */ + + int major_version; + int minor_version; + + int is_digital; + union { - struct - { - int bits_per_primary; - Interface interface; - int rgb444; - int ycrcb444; - int ycrcb422; - } digital; - - struct - { - double video_signal_level; - double sync_signal_level; - double total_signal_level; - - int blank_to_black; - - int separate_hv_sync; - int composite_sync_on_h; - int composite_sync_on_green; - int serration_on_vsync; - ColorType color_type; - } analog; + struct + { + int bits_per_primary; + Interface interface; + int rgb444; + int ycrcb444; + int ycrcb422; + } digital; + + struct + { + double video_signal_level; + double sync_signal_level; + double total_signal_level; + + int blank_to_black; + + int separate_hv_sync; + int composite_sync_on_h; + int composite_sync_on_green; + int serration_on_vsync; + ColorType color_type; + } analog; } ad; - int width_mm; /* -1 if not specified */ - int height_mm; /* -1 if not specified */ - double aspect_ratio; /* -1.0 if not specififed */ - - double gamma; /* -1.0 if not specified */ - - int standby; - int suspend; - int active_off; - - int srgb_is_standard; - int preferred_timing_includes_native; - int continuous_frequency; - - double red_x; - double red_y; - double green_x; - double green_y; - double blue_x; - double blue_y; - double white_x; - double white_y; - - Timing established[24]; /* Terminated by 0x0x0 */ - Timing standard[8]; - - int n_detailed_timings; - DetailedTiming detailed_timings[4]; /* If monitor has a preferred - * mode, it is the first one - * (whether it has, is - * determined by the - * preferred_timing_includes - * bit. - */ + int width_mm; /* -1 if not specified */ + int height_mm; /* -1 if not specified */ + double aspect_ratio; /* -1.0 if not specififed */ + + double gamma; /* -1.0 if not specified */ + + int standby; + int suspend; + int active_off; + + int srgb_is_standard; + int preferred_timing_includes_native; + int continuous_frequency; + + double red_x; + double red_y; + double green_x; + double green_y; + double blue_x; + double blue_y; + double white_x; + double white_y; + + Timing established[24]; /* Terminated by 0x0x0 */ + Timing standard[8]; + + int n_detailed_timings; + DetailedTiming detailed_timings[4]; /* If monitor has a preferred + * mode, it is the first one + * (whether it has, is + * determined by the + * preferred_timing_includes + * bit. + */ /* Optional product description */ - char dsc_serial_number[14]; - char dsc_product_name[14]; - char dsc_string[14]; /* Unspecified ASCII data */ + char dsc_serial_number[14]; + char dsc_product_name[14]; + char dsc_string[14]; /* Unspecified ASCII data */ }; -MonitorInfo *decode_edid (const uchar *data); -void dump_monitor_info (MonitorInfo *info); -char * make_display_name (const char *output_name, - const MonitorInfo *info); +MonitorInfo *decode_edid(const uchar *data); +void dump_monitor_info(MonitorInfo *info); +char *make_display_name(const char *output_name, + const MonitorInfo *info); diff --git a/modules/SDL2/test/CMakeLists.txt b/modules/SDL2/test/CMakeLists.txt index 676a8e7..1f65b75 100644 --- a/modules/SDL2/test/CMakeLists.txt +++ b/modules/SDL2/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...3.5) project(SDL2_test) include(CheckCCompilerFlag) @@ -127,6 +127,7 @@ add_sdl_test_executable(testgesture testgesture.c) add_sdl_test_executable(testgl2 testgl2.c) add_sdl_test_executable(testgles testgles.c) add_sdl_test_executable(testgles2 testgles2.c) +add_sdl_test_executable(testgles2_sdf NEEDS_RESOURCES testgles2_sdf.c testutils.c) add_sdl_test_executable(testhaptic testhaptic.c) add_sdl_test_executable(testhotplug testhotplug.c) add_sdl_test_executable(testrumble testrumble.c) @@ -159,6 +160,8 @@ elseif(WINDOWS) elseif(HAVE_X11) add_sdl_test_executable(testnative NEEDS_RESOURCES testnative.c testnativex11.c testutils.c) target_link_libraries(testnative X11) +elseif(OS2) + add_sdl_test_executable(testnative NEEDS_RESOURCES testnative.c testnativeos2.c testutils.c) endif() add_sdl_test_executable(testoverlay2 NEEDS_RESOURCES testoverlay2.c testyuv_cvt.c testutils.c) @@ -329,7 +332,7 @@ if(N3DS) foreach(APP IN LISTS SDL_TEST_EXECUTABLES) get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR) set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh") - ctr_generate_smdh("${SMDH_FILE}" + ctr_generate_smdh("${SMDH_FILE}" NAME "SDL-${APP}" DESCRIPTION "SDL2 Test suite" AUTHOR "SDL2 Contributors" @@ -366,7 +369,7 @@ foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES) endif() endforeach(RESOURCE_FILE) if(APPLE) - # Make sure resource files get installed into macOS/iOS .app bundles. + # Make sure resource files get installed into macOS/iOS .app bundles. target_sources(${APP} PRIVATE "${RESOURCE_FILES}") set_target_properties(${APP} PROPERTIES RESOURCE "${RESOURCE_FILES}") endif() diff --git a/modules/SDL2/test/Makefile.os2 b/modules/SDL2/test/Makefile.os2 index ee66409..0d5198e 100644 --- a/modules/SDL2/test/Makefile.os2 +++ b/modules/SDL2/test/Makefile.os2 @@ -9,6 +9,7 @@ INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h" CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei CFLAGS+= -wx -wcd=303 +CFLAGS+= -DHAVE_SIGNAL_H !ifeq ENABLE_WERROR 1 CFLAGS+= -we !endif diff --git a/modules/SDL2/test/Makefile.w32 b/modules/SDL2/test/Makefile.w32 index 02e68e8..63613e2 100644 --- a/modules/SDL2/test/Makefile.w32 +++ b/modules/SDL2/test/Makefile.w32 @@ -13,7 +13,7 @@ CFLAGS+= -wx -wcd=303 CFLAGS+= -we !endif CFLAGS+= -DSDL_MAIN_HANDLED -CFLAGS+= -DHAVE_OPENGL +CFLAGS+= -DHAVE_OPENGL -DHAVE_SIGNAL_H GLLIBS = opengl32.lib TNSRCS = testnative.c testnativew32.c diff --git a/modules/SDL2/test/checkkeys.c b/modules/SDL2/test/checkkeys.c index 8b11bdf..4efdc72 100644 --- a/modules/SDL2/test/checkkeys.c +++ b/modules/SDL2/test/checkkeys.c @@ -49,8 +49,8 @@ print_string(char **text, size_t *maxlen, const char *fmt, ...) len = SDL_vsnprintf(*text, *maxlen, fmt, ap); if (len > 0) { *text += len; - if ( ((size_t) len) < *maxlen ) { - *maxlen -= (size_t) len; + if (((size_t)len) < *maxlen) { + *maxlen -= (size_t)len; } else { *maxlen = 0; } @@ -68,30 +68,42 @@ print_modifiers(char **text, size_t *maxlen) print_string(text, maxlen, " (none)"); return; } - if (mod & KMOD_LSHIFT) + if (mod & KMOD_LSHIFT) { print_string(text, maxlen, " LSHIFT"); - if (mod & KMOD_RSHIFT) + } + if (mod & KMOD_RSHIFT) { print_string(text, maxlen, " RSHIFT"); - if (mod & KMOD_LCTRL) + } + if (mod & KMOD_LCTRL) { print_string(text, maxlen, " LCTRL"); - if (mod & KMOD_RCTRL) + } + if (mod & KMOD_RCTRL) { print_string(text, maxlen, " RCTRL"); - if (mod & KMOD_LALT) + } + if (mod & KMOD_LALT) { print_string(text, maxlen, " LALT"); - if (mod & KMOD_RALT) + } + if (mod & KMOD_RALT) { print_string(text, maxlen, " RALT"); - if (mod & KMOD_LGUI) + } + if (mod & KMOD_LGUI) { print_string(text, maxlen, " LGUI"); - if (mod & KMOD_RGUI) + } + if (mod & KMOD_RGUI) { print_string(text, maxlen, " RGUI"); - if (mod & KMOD_NUM) + } + if (mod & KMOD_NUM) { print_string(text, maxlen, " NUM"); - if (mod & KMOD_CAPS) + } + if (mod & KMOD_CAPS) { print_string(text, maxlen, " CAPS"); - if (mod & KMOD_MODE) + } + if (mod & KMOD_MODE) { print_string(text, maxlen, " MODE"); - if (mod & KMOD_SCROLL) + } + if (mod & KMOD_SCROLL) { print_string(text, maxlen, " SCROLL"); + } } static void @@ -109,7 +121,7 @@ PrintModifierState() } static void -PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat) +PrintKey(SDL_Keysym *sym, SDL_bool pressed, SDL_bool repeat) { char message[512]; char *spot; @@ -121,17 +133,17 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat) /* Print the keycode, name and state */ if (sym->sym) { print_string(&spot, &left, - "Key %s: scancode %d = %s, keycode 0x%08X = %s ", - pressed ? "pressed " : "released", - sym->scancode, - SDL_GetScancodeName(sym->scancode), - sym->sym, SDL_GetKeyName(sym->sym)); + "Key %s: scancode %d = %s, keycode 0x%08X = %s ", + pressed ? "pressed " : "released", + sym->scancode, + SDL_GetScancodeName(sym->scancode), + sym->sym, SDL_GetKeyName(sym->sym)); } else { print_string(&spot, &left, - "Unknown Key (scancode %d = %s) %s ", - sym->scancode, - SDL_GetScancodeName(sym->scancode), - pressed ? "pressed " : "released"); + "Unknown Key (scancode %d = %s) %s ", + sym->scancode, + SDL_GetScancodeName(sym->scancode), + pressed ? "pressed " : "released"); } print_modifiers(&spot, &left); if (repeat) { @@ -147,16 +159,14 @@ PrintText(const char *eventtype, const char *text) char expanded[1024]; expanded[0] = '\0'; - for ( spot = text; *spot; ++spot ) - { + for (spot = text; *spot; ++spot) { size_t length = SDL_strlen(expanded); - SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", (unsigned char)*spot); + (void)SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", (unsigned char)*spot); } SDL_Log("%s Text (%s): \"%s%s\"\n", eventtype, expanded, *text == '"' ? "\\" : "", text); } -void -loop() +void loop() { SDL_Event event; /* Check for events */ @@ -238,8 +248,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); @@ -253,23 +262,23 @@ main(int argc, char *argv[]) /* Initialize SDL */ if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } /* Set 640x480 video mode */ window = SDL_CreateWindow("CheckKeys Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create 640x480 window: %s\n", - SDL_GetError()); + SDL_GetError()); quit(2); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", - SDL_GetError()); + SDL_GetError()); quit(2); } @@ -298,7 +307,7 @@ main(int argc, char *argv[]) #endif SDL_Quit(); - return (0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/checkkeysthreads.c b/modules/SDL2/test/checkkeysthreads.c index 07b7e7b..3db5dd2 100644 --- a/modules/SDL2/test/checkkeysthreads.c +++ b/modules/SDL2/test/checkkeysthreads.c @@ -45,8 +45,8 @@ print_string(char **text, size_t *maxlen, const char *fmt, ...) len = SDL_vsnprintf(*text, *maxlen, fmt, ap); if (len > 0) { *text += len; - if ( ((size_t) len) < *maxlen ) { - *maxlen -= (size_t) len; + if (((size_t)len) < *maxlen) { + *maxlen -= (size_t)len; } else { *maxlen = 0; } @@ -64,30 +64,42 @@ print_modifiers(char **text, size_t *maxlen) print_string(text, maxlen, " (none)"); return; } - if (mod & KMOD_LSHIFT) + if (mod & KMOD_LSHIFT) { print_string(text, maxlen, " LSHIFT"); - if (mod & KMOD_RSHIFT) + } + if (mod & KMOD_RSHIFT) { print_string(text, maxlen, " RSHIFT"); - if (mod & KMOD_LCTRL) + } + if (mod & KMOD_LCTRL) { print_string(text, maxlen, " LCTRL"); - if (mod & KMOD_RCTRL) + } + if (mod & KMOD_RCTRL) { print_string(text, maxlen, " RCTRL"); - if (mod & KMOD_LALT) + } + if (mod & KMOD_LALT) { print_string(text, maxlen, " LALT"); - if (mod & KMOD_RALT) + } + if (mod & KMOD_RALT) { print_string(text, maxlen, " RALT"); - if (mod & KMOD_LGUI) + } + if (mod & KMOD_LGUI) { print_string(text, maxlen, " LGUI"); - if (mod & KMOD_RGUI) + } + if (mod & KMOD_RGUI) { print_string(text, maxlen, " RGUI"); - if (mod & KMOD_NUM) + } + if (mod & KMOD_NUM) { print_string(text, maxlen, " NUM"); - if (mod & KMOD_CAPS) + } + if (mod & KMOD_CAPS) { print_string(text, maxlen, " CAPS"); - if (mod & KMOD_MODE) + } + if (mod & KMOD_MODE) { print_string(text, maxlen, " MODE"); - if (mod & KMOD_SCROLL) + } + if (mod & KMOD_SCROLL) { print_string(text, maxlen, " SCROLL"); + } } static void @@ -105,7 +117,7 @@ PrintModifierState() } static void -PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat) +PrintKey(SDL_Keysym *sym, SDL_bool pressed, SDL_bool repeat) { char message[512]; char *spot; @@ -117,24 +129,23 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat) /* Print the keycode, name and state */ if (sym->sym) { print_string(&spot, &left, - "Key %s: scancode %d = %s, keycode 0x%08X = %s ", - pressed ? "pressed " : "released", - sym->scancode, - SDL_GetScancodeName(sym->scancode), - sym->sym, SDL_GetKeyName(sym->sym)); + "Key %s: scancode %d = %s, keycode 0x%08X = %s ", + pressed ? "pressed " : "released", + sym->scancode, + SDL_GetScancodeName(sym->scancode), + sym->sym, SDL_GetKeyName(sym->sym)); } else { print_string(&spot, &left, - "Unknown Key (scancode %d = %s) %s ", - sym->scancode, - SDL_GetScancodeName(sym->scancode), - pressed ? "pressed " : "released"); + "Unknown Key (scancode %d = %s) %s ", + sym->scancode, + SDL_GetScancodeName(sym->scancode), + pressed ? "pressed " : "released"); } print_modifiers(&spot, &left); if (repeat) { print_string(&spot, &left, " (repeat)"); } SDL_Log("%s\n", message); - fflush(stderr); } static void @@ -144,26 +155,24 @@ PrintText(const char *eventtype, const char *text) char expanded[1024]; expanded[0] = '\0'; - for ( spot = text; *spot; ++spot ) - { + for (spot = text; *spot; ++spot) { size_t length = SDL_strlen(expanded); - SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", (unsigned char)*spot); + (void)SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", (unsigned char)*spot); } SDL_Log("%s Text (%s): \"%s%s\"\n", eventtype, expanded, *text == '"' ? "\\" : "", text); } -void -loop() +void loop() { SDL_Event event; /* Check for events */ /*SDL_WaitEvent(&event); emscripten does not like waiting*/ - fprintf(stderr, "starting loop\n"); fflush(stderr); + (void)fprintf(stderr, "starting loop\n"); + (void)fflush(stderr); // while (SDL_PollEvent(&event)) { while (!done && SDL_WaitEvent(&event)) { - fprintf(stderr, "got event type: %" SDL_PRIu32 "\n", event.type); - fflush(stderr); + SDL_Log("Got event type: %" SDL_PRIu32 "\n", event.type); switch (event.type) { case SDL_KEYDOWN: case SDL_KEYUP: @@ -177,7 +186,8 @@ loop() break; case SDL_MOUSEBUTTONDOWN: /* Left button quits the app, other buttons toggles text input */ - fprintf(stderr, "mouse button down button: %d (LEFT=%d)\n", event.button.button, SDL_BUTTON_LEFT); fflush(stderr); + (void)fprintf(stderr, "mouse button down button: %d (LEFT=%d)\n", event.button.button, SDL_BUTTON_LEFT); + (void)fflush(stderr); if (event.button.button == SDL_BUTTON_LEFT) { done = 1; } else { @@ -196,9 +206,11 @@ loop() default: break; } - fprintf(stderr, "waiting new event\n"); fflush(stderr); + (void)fprintf(stderr, "waiting new event\n"); + (void)fflush(stderr); } - fprintf(stderr, "exiting event loop\n"); fflush(stderr); + (void)fprintf(stderr, "exiting event loop\n"); + (void)fflush(stderr); #ifdef __EMSCRIPTEN__ if (done) { emscripten_cancel_main_loop(); @@ -211,9 +223,10 @@ static int SDLCALL ping_thread(void *ptr) { int cnt; SDL_Event sdlevent; - SDL_memset(&sdlevent, 0 , sizeof(SDL_Event)); + SDL_memset(&sdlevent, 0, sizeof(SDL_Event)); for (cnt = 0; cnt < 10; ++cnt) { - fprintf(stderr, "sending event (%d/%d) from thread.\n", cnt + 1, 10); fflush(stderr); + (void)fprintf(stderr, "sending event (%d/%d) from thread.\n", cnt + 1, 10); + (void)fflush(stderr); sdlevent.type = SDL_KEYDOWN; sdlevent.key.keysym.sym = SDLK_1; SDL_PushEvent(&sdlevent); @@ -222,8 +235,7 @@ static int SDLCALL ping_thread(void *ptr) return cnt; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Window *window; SDL_Renderer *renderer; @@ -235,16 +247,16 @@ main(int argc, char *argv[]) /* Initialize SDL */ if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } /* Set 640x480 video mode */ window = SDL_CreateWindow("CheckKeys Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create 640x480 window: %s\n", - SDL_GetError()); + SDL_GetError()); quit(2); } @@ -268,7 +280,7 @@ main(int argc, char *argv[]) /* Watch keystrokes */ done = 0; - thread = SDL_CreateThread(ping_thread, "PingThread", (void *)NULL); + thread = SDL_CreateThread(ping_thread, "PingThread", NULL); #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(loop, 0, 1); @@ -280,7 +292,7 @@ main(int argc, char *argv[]) SDL_WaitThread(thread, NULL); SDL_Quit(); - return (0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/controllermap.c b/modules/SDL2/test/controllermap.c index 3378367..cfb0eff 100644 --- a/modules/SDL2/test/controllermap.c +++ b/modules/SDL2/test/controllermap.c @@ -25,10 +25,11 @@ /* Define this for verbose output while mapping controllers */ #define DEBUG_CONTROLLERMAP -#define SCREEN_WIDTH 512 -#define SCREEN_HEIGHT 320 +#define SCREEN_WIDTH 512 +#define SCREEN_HEIGHT 320 -enum marker_type { +enum marker_type +{ MARKER_BUTTON, MARKER_AXIS, }; @@ -64,10 +65,10 @@ static struct { 174, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_BACK */ { 232, 128, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_GUIDE */ { 289, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_START */ - { 75, 154, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSTICK */ + { 75, 154, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSTICK */ { 305, 230, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_RIGHTSTICK */ - { 77, 40, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSHOULDER */ - { 396, 36, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_RIGHTSHOULDER */ + { 77, 40, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSHOULDER */ + { 396, 36, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_RIGHTSHOULDER */ { 154, 188, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_UP */ { 154, 249, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_DOWN */ { 116, 217, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_LEFT */ @@ -77,16 +78,16 @@ static struct { 330, 135, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_PADDLE2 */ { 132, 175, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_PADDLE3 */ { 330, 175, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_PADDLE4 */ - { 0, 0, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_TOUCHPAD */ - { 74, 153, 270.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE */ - { 74, 153, 90.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE */ - { 74, 153, 0.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE */ - { 74, 153, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE */ + { 0, 0, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_TOUCHPAD */ + { 74, 153, 270.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE */ + { 74, 153, 90.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE */ + { 74, 153, 0.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE */ + { 74, 153, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE */ { 306, 231, 270.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTX_NEGATIVE */ - { 306, 231, 90.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE */ - { 306, 231, 0.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE */ + { 306, 231, 90.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE */ + { 306, 231, 0.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE */ { 306, 231, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTY_POSITIVE */ - { 91, -20, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT */ + { 91, -20, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT */ { 375, -20, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_TRIGGERRIGHT */ }; SDL_COMPILE_TIME_ASSERT(s_arrBindingDisplay, SDL_arraysize(s_arrBindingDisplay) == BINDING_COUNT); @@ -133,13 +134,15 @@ typedef struct { int button; - struct { + struct + { int axis; int axis_min; int axis_max; } axis; - struct { + struct + { int hat; int hat_mask; } hat; @@ -162,7 +165,7 @@ typedef struct static int s_nNumAxes; static AxisState *s_arrAxisState; - + static int s_iCurrentBinding; static Uint32 s_unPendingAdvanceTime; static SDL_bool s_bBindingComplete; @@ -175,9 +178,9 @@ static SDL_bool bind_touchpad = SDL_FALSE; static int StandardizeAxisValue(int nValue) { - if (nValue > SDL_JOYSTICK_AXIS_MAX/2) { + if (nValue > SDL_JOYSTICK_AXIS_MAX / 2) { return SDL_JOYSTICK_AXIS_MAX; - } else if (nValue < SDL_JOYSTICK_AXIS_MIN/2) { + } else if (nValue < SDL_JOYSTICK_AXIS_MIN / 2) { return SDL_JOYSTICK_AXIS_MIN; } else { return 0; @@ -199,15 +202,13 @@ SetCurrentBinding(int iBinding) return; } - if (s_arrBindingOrder[iBinding] == -1) - { + if (s_arrBindingOrder[iBinding] == -1) { SetCurrentBinding(iBinding + 1); return; } if (s_arrBindingOrder[iBinding] == SDL_CONTROLLER_BUTTON_TOUCHPAD && - !bind_touchpad) - { + !bind_touchpad) { SetCurrentBinding(iBinding + 1); return; } @@ -227,12 +228,10 @@ SetCurrentBinding(int iBinding) static SDL_bool BBindingContainsBinding(const SDL_GameControllerExtendedBind *pBindingA, const SDL_GameControllerExtendedBind *pBindingB) { - if (pBindingA->bindType != pBindingB->bindType) - { + if (pBindingA->bindType != pBindingB->bindType) { return SDL_FALSE; } - switch (pBindingA->bindType) - { + switch (pBindingA->bindType) { case SDL_CONTROLLER_BINDTYPE_AXIS: if (pBindingA->value.axis.axis != pBindingB->value.axis.axis) { return SDL_FALSE; @@ -245,7 +244,7 @@ BBindingContainsBinding(const SDL_GameControllerExtendedBind *pBindingA, const S int maxA = SDL_max(pBindingA->value.axis.axis_min, pBindingA->value.axis.axis_max); int minB = SDL_min(pBindingB->value.axis.axis_min, pBindingB->value.axis.axis_max); int maxB = SDL_max(pBindingB->value.axis.axis_min, pBindingB->value.axis.axis_max); - return (minA <= minB && maxA >= maxB); + return minA <= minB && maxA >= maxB; } /* Not reached */ default: @@ -282,19 +281,18 @@ ConfigureBinding(const SDL_GameControllerExtendedBind *pBinding) } #ifdef DEBUG_CONTROLLERMAP - switch ( pBinding->bindType ) - { + switch (pBinding->bindType) { case SDL_CONTROLLER_BINDTYPE_NONE: - break; + break; case SDL_CONTROLLER_BINDTYPE_BUTTON: - SDL_Log("Configuring button binding for button %d\n", pBinding->value.button); - break; + SDL_Log("Configuring button binding for button %d\n", pBinding->value.button); + break; case SDL_CONTROLLER_BINDTYPE_AXIS: - SDL_Log("Configuring axis binding for axis %d %d/%d committed = %s\n", pBinding->value.axis.axis, pBinding->value.axis.axis_min, pBinding->value.axis.axis_max, pBinding->committed ? "true" : "false"); - break; + SDL_Log("Configuring axis binding for axis %d %d/%d committed = %s\n", pBinding->value.axis.axis, pBinding->value.axis.axis_min, pBinding->value.axis.axis_max, pBinding->committed ? "true" : "false"); + break; case SDL_CONTROLLER_BINDTYPE_HAT: - SDL_Log("Configuring hat binding for hat %d %d\n", pBinding->value.hat.hat, pBinding->value.hat.hat_mask); - break; + SDL_Log("Configuring hat binding for hat %d %d\n", pBinding->value.hat.hat, pBinding->value.hat.hat_mask); + break; } #endif /* DEBUG_CONTROLLERMAP */ @@ -303,7 +301,7 @@ ConfigureBinding(const SDL_GameControllerExtendedBind *pBinding) if (pCurrent->bindType != SDL_CONTROLLER_BINDTYPE_NONE) { SDL_bool bNativeDPad, bCurrentDPad; SDL_bool bNativeAxis, bCurrentAxis; - + bNativeDPad = (iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_UP || iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_DOWN || iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_LEFT || @@ -337,7 +335,7 @@ static SDL_bool BMergeAxisBindings(int iIndex) { SDL_GameControllerExtendedBind *pBindingA = &s_arrBindings[iIndex]; - SDL_GameControllerExtendedBind *pBindingB = &s_arrBindings[iIndex+1]; + SDL_GameControllerExtendedBind *pBindingB = &s_arrBindings[iIndex + 1]; if (pBindingA->bindType == SDL_CONTROLLER_BINDTYPE_AXIS && pBindingB->bindType == SDL_CONTROLLER_BINDTYPE_AXIS && pBindingA->value.axis.axis == pBindingB->value.axis.axis) { @@ -352,13 +350,13 @@ BMergeAxisBindings(int iIndex) } static void -WatchJoystick(SDL_Joystick * joystick) +WatchJoystick(SDL_Joystick *joystick) { - SDL_Texture *background_front, *background_back, *button, *axis, *marker=NULL; + SDL_Texture *background_front, *background_back, *button, *axis, *marker = NULL; const char *name = NULL; SDL_Event event; SDL_Rect dst; - Uint8 alpha=200, alpha_step = -1; + Uint8 alpha = 200, alpha_step = -1; Uint32 alpha_ticks = 0; SDL_JoystickID nJoystickID; @@ -376,9 +374,9 @@ WatchJoystick(SDL_Joystick * joystick) SDL_Log("Watching joystick %" SDL_PRIs32 ": (%s)\n", SDL_JoystickInstanceID(joystick), name ? name : "Unknown Joystick"); SDL_Log("Joystick has %d axes, %d hats, %d balls, and %d buttons\n", - SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick), - SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick)); - + SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick), + SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick)); + SDL_Log("\n\n\ ====================================================================================\n\ Press the buttons on your controller when indicated\n\ @@ -395,7 +393,6 @@ WatchJoystick(SDL_Joystick * joystick) /* Skip any spurious events at start */ while (SDL_PollEvent(&event) > 0) { - continue; } /* Loop, getting joystick events! */ @@ -403,14 +400,14 @@ WatchJoystick(SDL_Joystick * joystick) int iElement = s_arrBindingOrder[s_iCurrentBinding]; switch (s_arrBindingDisplay[iElement].marker) { - case MARKER_AXIS: - marker = axis; - break; - case MARKER_BUTTON: - marker = button; - break; + case MARKER_AXIS: + marker = axis; + break; + case MARKER_BUTTON: + marker = button; + break; } - + dst.x = s_arrBindingDisplay[iElement].x; dst.y = s_arrBindingDisplay[iElement].y; SDL_QueryTexture(marker, NULL, NULL, &dst.w, &dst.h); @@ -438,7 +435,7 @@ WatchJoystick(SDL_Joystick * joystick) SDL_SetTextureColorMod(marker, 10, 255, 21); SDL_RenderCopyEx(screen, marker, NULL, &dst, s_arrBindingDisplay[iElement].angle, NULL, SDL_FLIP_NONE); SDL_RenderPresent(screen); - + while (SDL_PollEvent(&event) > 0) { switch (event.type) { case SDL_JOYDEVICEREMOVED: @@ -448,7 +445,7 @@ WatchJoystick(SDL_Joystick * joystick) break; case SDL_JOYAXISMOTION: if (event.jaxis.which == nJoystickID) { - const int MAX_ALLOWED_JITTER = SDL_JOYSTICK_AXIS_MAX / 80; /* ShanWan PS3 controller needed 96 */ + const int MAX_ALLOWED_JITTER = SDL_JOYSTICK_AXIS_MAX / 80; /* ShanWan PS3 controller needed 96 */ AxisState *pAxisState = &s_arrAxisState[event.jaxis.axis]; int nValue = event.jaxis.value; int nCurrentDistance, nFarthestDistance; @@ -504,9 +501,7 @@ WatchJoystick(SDL_Joystick * joystick) } } break; - case SDL_JOYBALLMOTION: - break; - case SDL_JOYBUTTONDOWN: + case SDL_JOYBUTTONUP: if (event.jbutton.which == nJoystickID) { SDL_GameControllerExtendedBind binding; @@ -535,7 +530,7 @@ WatchJoystick(SDL_Joystick * joystick) break; } - if ((event.key.keysym.sym != SDLK_ESCAPE)) { + if (event.key.keysym.sym != SDLK_ESCAPE) { break; } SDL_FALLTHROUGH; @@ -549,10 +544,10 @@ WatchJoystick(SDL_Joystick * joystick) SDL_Delay(15); - /* Wait 100 ms for joystick events to stop coming in, + /* Wait 30 ms for joystick events to stop coming in, in case a controller sends multiple events for a single control (e.g. axis and button for trigger) */ - if (s_unPendingAdvanceTime && SDL_GetTicks() - s_unPendingAdvanceTime >= 100) { + if (s_unPendingAdvanceTime && SDL_GetTicks() - s_unPendingAdvanceTime >= 30) { SetCurrentBinding(s_iCurrentBinding + 1); } } @@ -596,7 +591,7 @@ WatchJoystick(SDL_Joystick * joystick) char crc_string[5]; SDL_strlcat(mapping, "crc:", SDL_arraysize(mapping)); - SDL_snprintf(crc_string, sizeof(crc_string), "%.4x", crc); + (void)SDL_snprintf(crc_string, sizeof(crc_string), "%.4x", crc); SDL_strlcat(mapping, crc_string, SDL_arraysize(mapping)); SDL_strlcat(mapping, ",", SDL_arraysize(mapping)); } @@ -669,17 +664,17 @@ WatchJoystick(SDL_Joystick * joystick) pszElement[0] = '\0'; switch (pBinding->bindType) { case SDL_CONTROLLER_BINDTYPE_BUTTON: - SDL_snprintf(pszElement, sizeof(pszElement), "b%d", pBinding->value.button); + (void)SDL_snprintf(pszElement, sizeof(pszElement), "b%d", pBinding->value.button); break; case SDL_CONTROLLER_BINDTYPE_AXIS: if (pBinding->value.axis.axis_min == 0 && pBinding->value.axis.axis_max == SDL_JOYSTICK_AXIS_MIN) { /* The negative half axis */ - SDL_snprintf(pszElement, sizeof(pszElement), "-a%d", pBinding->value.axis.axis); + (void)SDL_snprintf(pszElement, sizeof(pszElement), "-a%d", pBinding->value.axis.axis); } else if (pBinding->value.axis.axis_min == 0 && pBinding->value.axis.axis_max == SDL_JOYSTICK_AXIS_MAX) { /* The positive half axis */ - SDL_snprintf(pszElement, sizeof(pszElement), "+a%d", pBinding->value.axis.axis); + (void)SDL_snprintf(pszElement, sizeof(pszElement), "+a%d", pBinding->value.axis.axis); } else { - SDL_snprintf(pszElement, sizeof(pszElement), "a%d", pBinding->value.axis.axis); + (void)SDL_snprintf(pszElement, sizeof(pszElement), "a%d", pBinding->value.axis.axis); if (pBinding->value.axis.axis_min > pBinding->value.axis.axis_max) { /* Invert the axis */ SDL_strlcat(pszElement, "~", SDL_arraysize(pszElement)); @@ -687,7 +682,7 @@ WatchJoystick(SDL_Joystick * joystick) } break; case SDL_CONTROLLER_BINDTYPE_HAT: - SDL_snprintf(pszElement, sizeof(pszElement), "h%d.%d", pBinding->value.hat.hat, pBinding->value.hat.hat_mask); + (void)SDL_snprintf(pszElement, sizeof(pszElement), "h%d.%d", pBinding->value.hat.hat, pBinding->value.hat.hat_mask); break; default: SDL_assert(!"Unknown bind type"); @@ -704,12 +699,11 @@ WatchJoystick(SDL_Joystick * joystick) SDL_free(s_arrAxisState); s_arrAxisState = NULL; - + SDL_DestroyRenderer(screen); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { const char *name; int i; @@ -752,7 +746,7 @@ main(int argc, char *argv[]) while (SDL_PollEvent(&event) > 0) { switch (event.type) { case SDL_KEYDOWN: - if ((event.key.keysym.sym != SDLK_ESCAPE)) { + if (event.key.keysym.sym != SDLK_ESCAPE) { break; } SDL_FALLTHROUGH; @@ -774,11 +768,11 @@ main(int argc, char *argv[]) joystick = SDL_JoystickOpen(i); if (joystick == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_JoystickOpen(%d) failed: %s\n", i, - SDL_GetError()); + SDL_GetError()); } else { char guid[64]; SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), - guid, sizeof (guid)); + guid, sizeof(guid)); SDL_Log(" axes: %d\n", SDL_JoystickNumAxes(joystick)); SDL_Log(" balls: %d\n", SDL_JoystickNumBalls(joystick)); SDL_Log(" hats: %d\n", SDL_JoystickNumHats(joystick)); diff --git a/modules/SDL2/test/loopwave.c b/modules/SDL2/test/loopwave.c index 072d71b..156767c 100644 --- a/modules/SDL2/test/loopwave.c +++ b/modules/SDL2/test/loopwave.c @@ -30,9 +30,9 @@ static struct { SDL_AudioSpec spec; - Uint8 *sound; /* Pointer to wave data */ - Uint32 soundlen; /* Length of wave data */ - int soundpos; /* Current play position */ + Uint8 *sound; /* Pointer to wave data */ + Uint32 soundlen; /* Length of wave data */ + int soundpos; /* Current play position */ } wave; static SDL_AudioDeviceID device; @@ -65,7 +65,6 @@ open_audio() quit(2); } - /* Let the audio run */ SDL_PauseAudioDevice(device, SDL_FALSE); } @@ -79,7 +78,7 @@ static void reopen_audio() #endif void SDLCALL -fillerup(void *unused, Uint8 * stream, int len) +fillerup(void *unused, Uint8 *stream, int len) { Uint8 *waveptr; int waveleft; @@ -104,16 +103,15 @@ fillerup(void *unused, Uint8 * stream, int len) static int done = 0; #ifdef __EMSCRIPTEN__ -void -loop() +void loop() { - if(done || (SDL_GetAudioDeviceStatus(device) != SDL_AUDIO_PLAYING)) + if (done || (SDL_GetAudioDeviceStatus(device) != SDL_AUDIO_PLAYING)) { emscripten_cancel_main_loop(); + } } #endif -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; char *filename = NULL; @@ -122,9 +120,9 @@ main(int argc, char *argv[]) SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); /* Load the SDL library */ - if (SDL_Init(SDL_INIT_AUDIO|SDL_INIT_EVENTS) < 0) { + if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_EVENTS) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } filename = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav"); @@ -178,7 +176,7 @@ main(int argc, char *argv[]) SDL_FreeWAV(wave.sound); SDL_free(filename); SDL_Quit(); - return (0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/loopwavequeue.c b/modules/SDL2/test/loopwavequeue.c index 54e25e5..70dd072 100644 --- a/modules/SDL2/test/loopwavequeue.c +++ b/modules/SDL2/test/loopwavequeue.c @@ -30,11 +30,10 @@ static struct { SDL_AudioSpec spec; - Uint8 *sound; /* Pointer to wave data */ - Uint32 soundlen; /* Length of wave data */ + Uint8 *sound; /* Pointer to wave data */ + Uint32 soundlen; /* Length of wave data */ } wave; - /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -44,37 +43,33 @@ quit(int rc) } static int done = 0; -void -poked(int sig) +void poked(int sig) { done = 1; } -void -loop() +void loop() { #ifdef __EMSCRIPTEN__ if (done || (SDL_GetAudioStatus() != SDL_AUDIO_PLAYING)) { emscripten_cancel_main_loop(); - } - else + } else #endif { /* The device from SDL_OpenAudio() is always device #1. */ const Uint32 queued = SDL_GetQueuedAudioSize(1); - SDL_Log("Device has %u bytes queued.\n", (unsigned int) queued); - if (queued <= 8192) { /* time to requeue the whole thing? */ + SDL_Log("Device has %u bytes queued.\n", (unsigned int)queued); + if (queued <= 8192) { /* time to requeue the whole thing? */ if (SDL_QueueAudio(1, wave.sound, wave.soundlen) == 0) { - SDL_Log("Device queued %u more bytes.\n", (unsigned int) wave.soundlen); + SDL_Log("Device queued %u more bytes.\n", (unsigned int)wave.soundlen); } else { - SDL_Log("Device FAILED to queue %u more bytes: %s\n", (unsigned int) wave.soundlen, SDL_GetError()); + SDL_Log("Device FAILED to queue %u more bytes: %s\n", (unsigned int)wave.soundlen, SDL_GetError()); } } } } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { char *filename = NULL; @@ -84,7 +79,7 @@ main(int argc, char *argv[]) /* Load the SDL library */ if (SDL_Init(SDL_INIT_AUDIO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } filename = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav"); @@ -100,18 +95,18 @@ main(int argc, char *argv[]) quit(1); } - wave.spec.callback = NULL; /* we'll push audio. */ + wave.spec.callback = NULL; /* we'll push audio. */ #if HAVE_SIGNAL_H /* Set the signals */ #ifdef SIGHUP - signal(SIGHUP, poked); + (void)signal(SIGHUP, poked); #endif - signal(SIGINT, poked); + (void)signal(SIGINT, poked); #ifdef SIGQUIT - signal(SIGQUIT, poked); + (void)signal(SIGQUIT, poked); #endif - signal(SIGTERM, poked); + (void)signal(SIGTERM, poked); #endif /* HAVE_SIGNAL_H */ /* Initialize fillerup() variables */ @@ -131,15 +126,14 @@ main(int argc, char *argv[]) /* Note that we stuff the entire audio buffer into the queue in one shot. Most apps would want to feed it a little at a time, as it plays, but we're going for simplicity here. */ - + #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(loop, 0, 1); #else - while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING)) - { + while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING)) { loop(); - SDL_Delay(100); /* let it play for awhile. */ + SDL_Delay(100); /* let it play for awhile. */ } #endif diff --git a/modules/SDL2/test/testatomic.c b/modules/SDL2/test/testatomic.c index 79b417b..15a7a6a 100644 --- a/modules/SDL2/test/testatomic.c +++ b/modules/SDL2/test/testatomic.c @@ -18,23 +18,20 @@ after calling each function. */ -static -const char * +static const char * tf(SDL_bool _tf) { static const char *t = "TRUE"; static const char *f = "FALSE"; - if (_tf) - { - return t; + if (_tf) { + return t; } return f; } -static -void RunBasicTest() +static void RunBasicTest() { int value; SDL_SpinLock lock = 0; @@ -96,15 +93,16 @@ void RunBasicTest() /* Number of concurrent incrementers */ #define NThreads 2 #define CountInc 100 -#define VALBITS (sizeof(atomicValue)*8) +#define VALBITS (sizeof(atomicValue) * 8) #define atomicValue int -#define CountTo ((atomicValue)((unsigned int)(1<<(VALBITS-1))-1)) -#define NInter (CountTo/CountInc/NThreads) -#define Expect (CountTo-NInter*CountInc*NThreads) +#define CountTo ((atomicValue)((unsigned int)(1 << (VALBITS - 1)) - 1)) +#define NInter (CountTo / CountInc / NThreads) +#define Expect (CountTo - NInter * CountInc * NThreads) -enum { - CountTo_GreaterThanZero = CountTo > 0, +enum +{ + CountTo_GreaterThanZero = CountTo > 0, }; SDL_COMPILE_TIME_ASSERT(size, CountTo_GreaterThanZero); /* check for rollover */ @@ -116,25 +114,23 @@ static SDL_atomic_t threadsRunning; static SDL_sem *threadDone; -static -int SDLCALL adder(void* junk) +static int SDLCALL adder(void *junk) { - unsigned long N=NInter; - SDL_Log("Thread subtracting %d %lu times\n",CountInc,N); + unsigned long N = NInter; + SDL_Log("Thread subtracting %d %lu times\n", CountInc, N); while (N--) { SDL_AtomicAdd(&good, -CountInc); - bad-=CountInc; + bad -= CountInc; } SDL_AtomicAdd(&threadsRunning, -1); SDL_SemPost(threadDone); return 0; } -static -void runAdder(void) +static void runAdder(void) { Uint32 start, end; - int T=NThreads; + int T = NThreads; start = SDL_GetTicks(); @@ -142,11 +138,13 @@ void runAdder(void) SDL_AtomicSet(&threadsRunning, NThreads); - while (T--) + while (T--) { SDL_CreateThread(adder, "Adder", NULL); + } - while (SDL_AtomicGet(&threadsRunning) > 0) + while (SDL_AtomicGet(&threadsRunning) > 0) { SDL_SemWait(threadDone); + } SDL_DestroySemaphore(threadDone); @@ -155,8 +153,7 @@ void runAdder(void) SDL_Log("Finished in %f sec\n", (end - start) / 1000.f); } -static -void RunEpicTest() +static void RunEpicTest() { int b; atomicValue v; @@ -164,80 +161,80 @@ void RunEpicTest() SDL_Log("\nepic test---------------------------------------\n\n"); SDL_Log("Size asserted to be >= 32-bit\n"); - SDL_assert(sizeof(atomicValue)>=4); + SDL_assert(sizeof(atomicValue) >= 4); SDL_Log("Check static initializer\n"); - v=SDL_AtomicGet(&good); - SDL_assert(v==42); + v = SDL_AtomicGet(&good); + SDL_assert(v == 42); - SDL_assert(bad==42); + SDL_assert(bad == 42); SDL_Log("Test negative values\n"); SDL_AtomicSet(&good, -5); - v=SDL_AtomicGet(&good); - SDL_assert(v==-5); + v = SDL_AtomicGet(&good); + SDL_assert(v == -5); SDL_Log("Verify maximum value\n"); SDL_AtomicSet(&good, CountTo); - v=SDL_AtomicGet(&good); - SDL_assert(v==CountTo); + v = SDL_AtomicGet(&good); + SDL_assert(v == CountTo); SDL_Log("Test compare and exchange\n"); - b=SDL_AtomicCAS(&good, 500, 43); + b = SDL_AtomicCAS(&good, 500, 43); SDL_assert(!b); /* no swap since CountTo!=500 */ - v=SDL_AtomicGet(&good); - SDL_assert(v==CountTo); /* ensure no swap */ + v = SDL_AtomicGet(&good); + SDL_assert(v == CountTo); /* ensure no swap */ - b=SDL_AtomicCAS(&good, CountTo, 44); + b = SDL_AtomicCAS(&good, CountTo, 44); SDL_assert(!!b); /* will swap */ - v=SDL_AtomicGet(&good); - SDL_assert(v==44); + v = SDL_AtomicGet(&good); + SDL_assert(v == 44); SDL_Log("Test Add\n"); - v=SDL_AtomicAdd(&good, 1); - SDL_assert(v==44); - v=SDL_AtomicGet(&good); - SDL_assert(v==45); + v = SDL_AtomicAdd(&good, 1); + SDL_assert(v == 44); + v = SDL_AtomicGet(&good); + SDL_assert(v == 45); - v=SDL_AtomicAdd(&good, 10); - SDL_assert(v==45); - v=SDL_AtomicGet(&good); - SDL_assert(v==55); + v = SDL_AtomicAdd(&good, 10); + SDL_assert(v == 45); + v = SDL_AtomicGet(&good); + SDL_assert(v == 55); SDL_Log("Test Add (Negative values)\n"); - v=SDL_AtomicAdd(&good, -20); - SDL_assert(v==55); - v=SDL_AtomicGet(&good); - SDL_assert(v==35); + v = SDL_AtomicAdd(&good, -20); + SDL_assert(v == 55); + v = SDL_AtomicGet(&good); + SDL_assert(v == 35); - v=SDL_AtomicAdd(&good, -50); /* crossing zero down */ - SDL_assert(v==35); - v=SDL_AtomicGet(&good); - SDL_assert(v==-15); + v = SDL_AtomicAdd(&good, -50); /* crossing zero down */ + SDL_assert(v == 35); + v = SDL_AtomicGet(&good); + SDL_assert(v == -15); - v=SDL_AtomicAdd(&good, 30); /* crossing zero up */ - SDL_assert(v==-15); - v=SDL_AtomicGet(&good); - SDL_assert(v==15); + v = SDL_AtomicAdd(&good, 30); /* crossing zero up */ + SDL_assert(v == -15); + v = SDL_AtomicGet(&good); + SDL_assert(v == 15); SDL_Log("Reset before count down test\n"); SDL_AtomicSet(&good, CountTo); - v=SDL_AtomicGet(&good); - SDL_assert(v==CountTo); + v = SDL_AtomicGet(&good); + SDL_assert(v == CountTo); - bad=CountTo; - SDL_assert(bad==CountTo); + bad = CountTo; + SDL_assert(bad == CountTo); - SDL_Log("Counting down from %d, Expect %d remaining\n",CountTo,Expect); + SDL_Log("Counting down from %d, Expect %d remaining\n", CountTo, Expect); runAdder(); - v=SDL_AtomicGet(&good); - SDL_Log("Atomic %d Non-Atomic %d\n",v,bad); - SDL_assert(v==Expect); - SDL_assert(bad!=Expect); + v = SDL_AtomicGet(&good); + SDL_Log("Atomic %d Non-Atomic %d\n", v, bad); + SDL_assert(v == Expect); + SDL_assert(bad != Expect); } /* End atomic operation test */ @@ -251,13 +248,13 @@ void RunEpicTest() */ #define TEST_SPINLOCK_FIFO -#define NUM_READERS 4 -#define NUM_WRITERS 4 -#define EVENTS_PER_WRITER 1000000 +#define NUM_READERS 4 +#define NUM_WRITERS 4 +#define EVENTS_PER_WRITER 1000000 /* The number of entries must be a power of 2 */ #define MAX_ENTRIES 256 -#define WRAP_MASK (MAX_ENTRIES-1) +#define WRAP_MASK (MAX_ENTRIES - 1) typedef struct { @@ -269,22 +266,22 @@ typedef struct { SDL_EventQueueEntry entries[MAX_ENTRIES]; - char cache_pad1[SDL_CACHELINE_SIZE-((sizeof(SDL_EventQueueEntry)*MAX_ENTRIES)%SDL_CACHELINE_SIZE)]; + char cache_pad1[SDL_CACHELINE_SIZE - ((sizeof(SDL_EventQueueEntry) * MAX_ENTRIES) % SDL_CACHELINE_SIZE)]; SDL_atomic_t enqueue_pos; - char cache_pad2[SDL_CACHELINE_SIZE-sizeof(SDL_atomic_t)]; + char cache_pad2[SDL_CACHELINE_SIZE - sizeof(SDL_atomic_t)]; SDL_atomic_t dequeue_pos; - char cache_pad3[SDL_CACHELINE_SIZE-sizeof(SDL_atomic_t)]; + char cache_pad3[SDL_CACHELINE_SIZE - sizeof(SDL_atomic_t)]; #ifdef TEST_SPINLOCK_FIFO SDL_SpinLock lock; SDL_atomic_t rwcount; SDL_atomic_t watcher; - char cache_pad4[SDL_CACHELINE_SIZE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)]; + char cache_pad4[SDL_CACHELINE_SIZE - sizeof(SDL_SpinLock) - 2 * sizeof(SDL_atomic_t)]; #endif SDL_atomic_t active; @@ -328,14 +325,14 @@ static SDL_bool EnqueueEvent_LockFree(SDL_EventQueue *queue, const SDL_Event *ev #endif queue_pos = (unsigned)SDL_AtomicGet(&queue->enqueue_pos); - for ( ; ; ) { + for (;;) { entry = &queue->entries[queue_pos & WRAP_MASK]; entry_seq = (unsigned)SDL_AtomicGet(&entry->sequence); delta = (int)(entry_seq - queue_pos); if (delta == 0) { /* The entry and the queue position match, try to increment the queue position */ - if (SDL_AtomicCAS(&queue->enqueue_pos, (int)queue_pos, (int)(queue_pos+1))) { + if (SDL_AtomicCAS(&queue->enqueue_pos, (int)queue_pos, (int)(queue_pos + 1))) { /* We own the object, fill it! */ entry->event = *event; SDL_AtomicSet(&entry->sequence, (int)(queue_pos + 1)); @@ -353,7 +350,7 @@ static SDL_bool EnqueueEvent_LockFree(SDL_EventQueue *queue, const SDL_Event *ev } #ifdef TEST_SPINLOCK_FIFO - (void) SDL_AtomicDecRef(&queue->rwcount); + (void)SDL_AtomicDecRef(&queue->rwcount); #endif return status; } @@ -375,17 +372,17 @@ static SDL_bool DequeueEvent_LockFree(SDL_EventQueue *queue, SDL_Event *event) #endif queue_pos = (unsigned)SDL_AtomicGet(&queue->dequeue_pos); - for ( ; ; ) { + for (;;) { entry = &queue->entries[queue_pos & WRAP_MASK]; entry_seq = (unsigned)SDL_AtomicGet(&entry->sequence); delta = (int)(entry_seq - (queue_pos + 1)); if (delta == 0) { /* The entry and the queue position match, try to increment the queue position */ - if (SDL_AtomicCAS(&queue->dequeue_pos, (int)queue_pos, (int)(queue_pos+1))) { + if (SDL_AtomicCAS(&queue->dequeue_pos, (int)queue_pos, (int)(queue_pos + 1))) { /* We own the object, fill it! */ *event = entry->event; - SDL_AtomicSet(&entry->sequence, (int)(queue_pos+MAX_ENTRIES)); + SDL_AtomicSet(&entry->sequence, (int)(queue_pos + MAX_ENTRIES)); status = SDL_TRUE; break; } @@ -400,7 +397,7 @@ static SDL_bool DequeueEvent_LockFree(SDL_EventQueue *queue, SDL_Event *event) } #ifdef TEST_SPINLOCK_FIFO - (void) SDL_AtomicDecRef(&queue->rwcount); + (void)SDL_AtomicDecRef(&queue->rwcount); #endif return status; } @@ -475,10 +472,10 @@ typedef struct { SDL_EventQueue *queue; int index; - char padding1[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int))%SDL_CACHELINE_SIZE]; + char padding1[SDL_CACHELINE_SIZE - (sizeof(SDL_EventQueue *) + sizeof(int)) % SDL_CACHELINE_SIZE]; int waits; SDL_bool lock_free; - char padding2[SDL_CACHELINE_SIZE-sizeof(int)-sizeof(SDL_bool)]; + char padding2[SDL_CACHELINE_SIZE - sizeof(int) - sizeof(SDL_bool)]; SDL_Thread *thread; } WriterData; @@ -488,11 +485,11 @@ typedef struct int counters[NUM_WRITERS]; int waits; SDL_bool lock_free; - char padding[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int)*NUM_WRITERS+sizeof(int)+sizeof(SDL_bool))%SDL_CACHELINE_SIZE]; + char padding[SDL_CACHELINE_SIZE - (sizeof(SDL_EventQueue *) + sizeof(int) * NUM_WRITERS + sizeof(int) + sizeof(SDL_bool)) % SDL_CACHELINE_SIZE]; SDL_Thread *thread; } ReaderData; -static int SDLCALL FIFO_Writer(void* _data) +static int SDLCALL FIFO_Writer(void *_data) { WriterData *data = (WriterData *)_data; SDL_EventQueue *queue = data->queue; @@ -525,16 +522,16 @@ static int SDLCALL FIFO_Writer(void* _data) return 0; } -static int SDLCALL FIFO_Reader(void* _data) +static int SDLCALL FIFO_Reader(void *_data) { ReaderData *data = (ReaderData *)_data; SDL_EventQueue *queue = data->queue; SDL_Event event; if (data->lock_free) { - for ( ; ; ) { + for (;;) { if (DequeueEvent_LockFree(queue, &event)) { - WriterData *writer = (WriterData*)event.user.data1; + WriterData *writer = (WriterData *)event.user.data1; ++data->counters[writer->index]; } else if (SDL_AtomicGet(&queue->active)) { ++data->waits; @@ -545,9 +542,9 @@ static int SDLCALL FIFO_Reader(void* _data) } } } else { - for ( ; ; ) { + for (;;) { if (DequeueEvent_Mutex(queue, &event)) { - WriterData *writer = (WriterData*)event.user.data1; + WriterData *writer = (WriterData *)event.user.data1; ++data->counters[writer->index]; } else if (SDL_AtomicGet(&queue->active)) { ++data->waits; @@ -563,7 +560,7 @@ static int SDLCALL FIFO_Reader(void* _data) #ifdef TEST_SPINLOCK_FIFO /* This thread periodically locks the queue for no particular reason */ -static int SDLCALL FIFO_Watcher(void* _data) +static int SDLCALL FIFO_Watcher(void *_data) { SDL_EventQueue *queue = (SDL_EventQueue *)_data; @@ -574,7 +571,7 @@ static int SDLCALL FIFO_Watcher(void* _data) SDL_Delay(0); } /* Do queue manipulation here... */ - (void) SDL_AtomicDecRef(&queue->watcher); + (void)SDL_AtomicDecRef(&queue->watcher); SDL_AtomicUnlock(&queue->lock); /* Wait a bit... */ @@ -620,7 +617,7 @@ static void RunFIFOTest(SDL_bool lock_free) SDL_zeroa(readerData); for (i = 0; i < NUM_READERS; ++i) { char name[64]; - SDL_snprintf(name, sizeof (name), "FIFOReader%d", i); + (void)SDL_snprintf(name, sizeof(name), "FIFOReader%d", i); readerData[i].queue = &queue; readerData[i].lock_free = lock_free; readerData[i].thread = SDL_CreateThread(FIFO_Reader, name, &readerData[i]); @@ -631,7 +628,7 @@ static void RunFIFOTest(SDL_bool lock_free) SDL_zeroa(writerData); for (i = 0; i < NUM_WRITERS; ++i) { char name[64]; - SDL_snprintf(name, sizeof (name), "FIFOWriter%d", i); + (void)SDL_snprintf(name, sizeof(name), "FIFOWriter%d", i); writerData[i].queue = &queue; writerData[i].index = i; writerData[i].lock_free = lock_free; @@ -668,7 +665,7 @@ static void RunFIFOTest(SDL_bool lock_free) for (i = 0; i < NUM_WRITERS; ++i) { SDL_Log("Writer %d wrote %d events, had %d waits\n", i, EVENTS_PER_WRITER, writerData[i].waits); } - SDL_Log("Writers wrote %d total events\n", NUM_WRITERS*EVENTS_PER_WRITER); + SDL_Log("Writers wrote %d total events\n", NUM_WRITERS * EVENTS_PER_WRITER); /* Print a breakdown of which readers read messages from which writer */ SDL_Log("\n"); @@ -680,17 +677,17 @@ static void RunFIFOTest(SDL_bool lock_free) } grand_total += total; SDL_Log("Reader %d read %d events, had %d waits\n", i, total, readerData[i].waits); - SDL_snprintf(textBuffer, sizeof(textBuffer), " { "); + (void)SDL_snprintf(textBuffer, sizeof(textBuffer), " { "); for (j = 0; j < NUM_WRITERS; ++j) { if (j > 0) { len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, ", "); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, ", "); } len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, "%d", readerData[i].counters[j]); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, "%d", readerData[i].counters[j]); } len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, " }\n"); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, " }\n"); SDL_Log("%s", textBuffer); } SDL_Log("Readers read %d total events\n", grand_total); @@ -699,8 +696,7 @@ static void RunFIFOTest(SDL_bool lock_free) /* End FIFO test */ /**************************************************************************/ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); diff --git a/modules/SDL2/test/testaudiocapture.c b/modules/SDL2/test/testaudiocapture.c index 2975694..a8fdf5e 100644 --- a/modules/SDL2/test/testaudiocapture.c +++ b/modules/SDL2/test/testaudiocapture.c @@ -67,9 +67,9 @@ loop() SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); - #ifdef __EMSCRIPTEN__ +#ifdef __EMSCRIPTEN__ emscripten_cancel_main_loop(); - #endif +#endif exit(0); } @@ -78,16 +78,15 @@ loop() trying to test the API, so we use SDL_DequeueAudio() here. */ while (SDL_TRUE) { Uint8 buf[1024]; - const Uint32 br = SDL_DequeueAudio(devid_in, buf, sizeof (buf)); + const Uint32 br = SDL_DequeueAudio(devid_in, buf, sizeof(buf)); SDL_QueueAudio(devid_out, buf, br); - if (br < sizeof (buf)) { + if (br < sizeof(buf)) { break; } } } -int -main(int argc, char **argv) +int main(int argc, char **argv) { /* (argv[1] == NULL means "open default device.") */ const char *devname = argv[1]; @@ -101,7 +100,7 @@ main(int argc, char **argv) /* Load the SDL library */ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } window = SDL_CreateWindow("testaudiocapture", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0); @@ -157,7 +156,10 @@ main(int argc, char **argv) #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(loop, 0, 1); #else - while (1) { loop(); SDL_Delay(16); } + while (1) { + loop(); + SDL_Delay(16); + } #endif return 0; diff --git a/modules/SDL2/test/testaudiohotplug.c b/modules/SDL2/test/testaudiohotplug.c index 7d8436e..e4bd9ac 100644 --- a/modules/SDL2/test/testaudiohotplug.c +++ b/modules/SDL2/test/testaudiohotplug.c @@ -29,8 +29,8 @@ #include "testutils.h" static SDL_AudioSpec spec; -static Uint8 *sound = NULL; /* Pointer to wave data */ -static Uint32 soundlen = 0; /* Length of wave data */ +static Uint8 *sound = NULL; /* Pointer to wave data */ +static Uint32 soundlen = 0; /* Length of wave data */ static int posindex = 0; static Uint32 positions[64]; @@ -44,9 +44,9 @@ quit(int rc) } void SDLCALL -fillerup(void *_pos, Uint8 * stream, int len) +fillerup(void *_pos, Uint8 *stream, int len) { - Uint32 pos = *((Uint32 *) _pos); + Uint32 pos = *((Uint32 *)_pos); Uint8 *waveptr; int waveleft; @@ -65,17 +65,16 @@ fillerup(void *_pos, Uint8 * stream, int len) } SDL_memcpy(stream, waveptr, len); pos += len; - *((Uint32 *) _pos) = pos; + *((Uint32 *)_pos) = pos; } static int done = 0; -void -poked(int sig) +void poked(int sig) { done = 1; } -static const char* +static const char * devtypestr(int iscapture) { return iscapture ? "capture" : "output"; @@ -90,17 +89,18 @@ iteration() if (e.type == SDL_QUIT) { done = 1; } else if (e.type == SDL_KEYUP) { - if (e.key.keysym.sym == SDLK_ESCAPE) + if (e.key.keysym.sym == SDLK_ESCAPE) { done = 1; + } } else if (e.type == SDL_AUDIODEVICEADDED) { int index = e.adevice.which; int iscapture = e.adevice.iscapture; const char *name = SDL_GetAudioDeviceName(index, iscapture); - if (name != NULL) - SDL_Log("New %s audio device at index %u: %s\n", devtypestr(iscapture), (unsigned int) index, name); - else { + if (name != NULL) { + SDL_Log("New %s audio device at index %u: %s\n", devtypestr(iscapture), (unsigned int)index, name); + } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Got new %s device at index %u, but failed to get the name: %s\n", - devtypestr(iscapture), (unsigned int) index, SDL_GetError()); + devtypestr(iscapture), (unsigned int)index, SDL_GetError()); continue; } if (!iscapture) { @@ -111,31 +111,29 @@ iteration() if (!dev) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open '%s': %s\n", name, SDL_GetError()); } else { - SDL_Log("Opened '%s' as %u\n", name, (unsigned int) dev); + SDL_Log("Opened '%s' as %u\n", name, (unsigned int)dev); SDL_PauseAudioDevice(dev, 0); } } } else if (e.type == SDL_AUDIODEVICEREMOVED) { - dev = (SDL_AudioDeviceID) e.adevice.which; - SDL_Log("%s device %u removed.\n", devtypestr(e.adevice.iscapture), (unsigned int) dev); + dev = (SDL_AudioDeviceID)e.adevice.which; + SDL_Log("%s device %u removed.\n", devtypestr(e.adevice.iscapture), (unsigned int)dev); SDL_CloseAudioDevice(dev); } } } #ifdef __EMSCRIPTEN__ -void -loop() +void loop() { - if(done) + if (done) emscripten_cancel_main_loop(); else iteration(); } #endif -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; char *filename = NULL; @@ -146,7 +144,7 @@ main(int argc, char *argv[]) /* Load the SDL library */ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } /* Some targets (Mac CoreAudio) need an event queue for audio hotplug, so make and immediately hide a window. */ @@ -168,13 +166,13 @@ main(int argc, char *argv[]) #if HAVE_SIGNAL_H /* Set the signals */ #ifdef SIGHUP - signal(SIGHUP, poked); + (void)signal(SIGHUP, poked); #endif - signal(SIGINT, poked); + (void)signal(SIGINT, poked); #ifdef SIGQUIT - signal(SIGQUIT, poked); + (void)signal(SIGQUIT, poked); #endif - signal(SIGTERM, poked); + (void)signal(SIGTERM, poked); #endif /* HAVE_SIGNAL_H */ /* Show the list of available drivers */ @@ -201,7 +199,7 @@ main(int argc, char *argv[]) SDL_FreeWAV(sound); SDL_free(filename); SDL_Quit(); - return (0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testaudioinfo.c b/modules/SDL2/test/testaudioinfo.c index 3bec51f..ae59cbc 100644 --- a/modules/SDL2/test/testaudioinfo.c +++ b/modules/SDL2/test/testaudioinfo.c @@ -21,18 +21,19 @@ print_devices(int iscapture) SDL_Log("Found %d %s device%s:\n", n, typestr, n != 1 ? "s" : ""); - if (n == -1) + if (n == -1) { SDL_Log(" Driver can't detect specific %s devices.\n\n", typestr); - else if (n == 0) + } else if (n == 0) { SDL_Log(" No %s devices found.\n\n", typestr); - else { + } else { int i; for (i = 0; i < n; i++) { const char *name = SDL_GetAudioDeviceName(i, iscapture); - if (name != NULL) + if (name != NULL) { SDL_Log(" %d: %s\n", i, name); - else + } else { SDL_Log(" %d Error: %s\n", i, SDL_GetError()); + } if (SDL_GetAudioDeviceSpec(i, iscapture, &spec) == 0) { SDL_Log(" Sample Rate: %d\n", spec.freq); @@ -44,8 +45,7 @@ print_devices(int iscapture) } } -int -main(int argc, char **argv) +int main(int argc, char **argv) { char *deviceName = NULL; SDL_AudioSpec spec; @@ -57,7 +57,7 @@ main(int argc, char **argv) /* Load the SDL library */ if (SDL_Init(SDL_INIT_AUDIO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } /* Print available audio drivers */ @@ -98,7 +98,6 @@ main(int argc, char **argv) SDL_Log("SDL_AudioFormat: %X\n", spec.format); } - SDL_Quit(); return 0; } diff --git a/modules/SDL2/test/testautomation.c b/modules/SDL2/test/testautomation.c index a98f4ee..2150ed2 100644 --- a/modules/SDL2/test/testautomation.c +++ b/modules/SDL2/test/testautomation.c @@ -29,8 +29,7 @@ quit(int rc) exit(rc); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int result; int testIterations = 1; @@ -42,10 +41,13 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } + /* No need of windows (or update testautomation_mouse.c:mouse_getMouseFocus() */ + state->num_windows = 0; + /* Parse commandline */ for (i = 1; i < argc;) { int consumed; @@ -56,23 +58,22 @@ main(int argc, char *argv[]) if (SDL_strcasecmp(argv[i], "--iterations") == 0) { if (argv[i + 1]) { testIterations = SDL_atoi(argv[i + 1]); - if (testIterations < 1) testIterations = 1; + if (testIterations < 1) { + testIterations = 1; + } consumed = 2; } - } - else if (SDL_strcasecmp(argv[i], "--execKey") == 0) { + } else if (SDL_strcasecmp(argv[i], "--execKey") == 0) { if (argv[i + 1]) { - SDL_sscanf(argv[i + 1], "%"SDL_PRIu64, &userExecKey); + (void)SDL_sscanf(argv[i + 1], "%" SDL_PRIu64, &userExecKey); consumed = 2; } - } - else if (SDL_strcasecmp(argv[i], "--seed") == 0) { + } else if (SDL_strcasecmp(argv[i], "--seed") == 0) { if (argv[i + 1]) { userRunSeed = SDL_strdup(argv[i + 1]); consumed = 2; } - } - else if (SDL_strcasecmp(argv[i], "--filter") == 0) { + } else if (SDL_strcasecmp(argv[i], "--filter") == 0) { if (argv[i + 1]) { filter = SDL_strdup(argv[i + 1]); consumed = 2; @@ -105,11 +106,11 @@ main(int argc, char *argv[]) /* Empty event queue */ done = 0; - for (i=0; i<100; i++) { - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - } - SDL_Delay(10); + for (i = 0; i < 100; i++) { + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + SDL_Delay(10); } /* Clean up */ @@ -118,7 +119,7 @@ main(int argc, char *argv[]) /* Shutdown everything */ quit(result); - return(result); + return result; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testautomation_audio.c b/modules/SDL2/test/testautomation_audio.c index e6127b5..bd58631 100644 --- a/modules/SDL2/test/testautomation_audio.c +++ b/modules/SDL2/test/testautomation_audio.c @@ -5,9 +5,10 @@ /* quiet windows compiler warnings */ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) -# define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS #endif +#include #include #include @@ -18,44 +19,39 @@ /* Fixture */ -void -_audioSetUp(void *arg) +void _audioSetUp(void *arg) { /* Start SDL audio subsystem */ - int ret = SDL_InitSubSystem( SDL_INIT_AUDIO ); - SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_AUDIO)"); - SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_AUDIO)"); + int ret = SDL_InitSubSystem(SDL_INIT_AUDIO); + SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_AUDIO)"); + SDLTest_AssertCheck(ret == 0, "Check result from SDL_InitSubSystem(SDL_INIT_AUDIO)"); if (ret != 0) { - SDLTest_LogError("%s", SDL_GetError()); - } + SDLTest_LogError("%s", SDL_GetError()); + } } -void -_audioTearDown(void *arg) +void _audioTearDown(void *arg) { /* Remove a possibly created file from SDL disk writer audio driver; ignore errors */ - remove("sdlaudio.raw"); + (void)remove("sdlaudio.raw"); SDLTest_AssertPass("Cleanup of test files completed"); } - /* Global counter for callback invocation */ int _audio_testCallbackCounter; /* Global accumulator for total callback length */ int _audio_testCallbackLength; - /* Test callback function */ void SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len) { - /* track that callback was called */ - _audio_testCallbackCounter++; - _audio_testCallbackLength += len; + /* track that callback was called */ + _audio_testCallbackCounter++; + _audio_testCallbackLength += len; } - /* Test case functions */ /** @@ -67,11 +63,11 @@ void SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len) int audio_quitInitAudioSubSystem() { /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); - SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + SDL_QuitSubSystem(SDL_INIT_AUDIO); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); - /* Restart audio again */ - _audioSetUp(NULL); + /* Restart audio again */ + _audioSetUp(NULL); return TEST_COMPLETED; } @@ -84,32 +80,32 @@ int audio_quitInitAudioSubSystem() */ int audio_initQuitAudio() { - int result; + int result; int i, iMax; - const char* audioDriver; + const char *audioDriver; /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); - SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); - - /* Loop over all available audio drivers */ - iMax = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); - SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); - for (i = 0; i < iMax; i++) { - audioDriver = SDL_GetAudioDriver(i); - SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); - SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Call Quit */ - SDL_AudioQuit(); - SDLTest_AssertPass("Call to SDL_AudioQuit()"); + SDL_QuitSubSystem(SDL_INIT_AUDIO); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_Assert(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */ + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); } /* NULL driver specification */ @@ -124,8 +120,8 @@ int audio_initQuitAudio() SDL_AudioQuit(); SDLTest_AssertPass("Call to SDL_AudioQuit()"); - /* Restart audio again */ - _audioSetUp(NULL); + /* Restart audio again */ + _audioSetUp(NULL); return TEST_COMPLETED; } @@ -142,79 +138,79 @@ int audio_initOpenCloseQuitAudio() { int result, expectedResult; int i, iMax, j, k; - const char* audioDriver; + const char *audioDriver; SDL_AudioSpec desired; /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); - SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); - - /* Loop over all available audio drivers */ - iMax = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); - SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); - for (i = 0; i < iMax; i++) { - audioDriver = SDL_GetAudioDriver(i); - SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); - SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); - - /* Change specs */ - for (j = 0; j < 2; j++) { - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Set spec */ - SDL_memset(&desired, 0, sizeof(desired)); - switch (j) { - case 0: - /* Set standard desired spec */ - desired.freq = 22050; - desired.format = AUDIO_S16SYS; - desired.channels = 2; - desired.samples = 4096; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - - case 1: - /* Set custom desired spec */ - desired.freq = 48000; - desired.format = AUDIO_F32SYS; - desired.channels = 2; - desired.samples = 2048; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - break; + SDL_QuitSubSystem(SDL_INIT_AUDIO); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_Assert(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */ + + /* Change specs */ + for (j = 0; j < 2; j++) { + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Set spec */ + SDL_memset(&desired, 0, sizeof(desired)); + switch (j) { + case 0: + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; + case 1: + /* Set custom desired spec */ + desired.freq = 48000; + desired.format = AUDIO_F32SYS; + desired.channels = 2; + desired.samples = 2048; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; } /* Call Open (maybe multiple times) */ - for (k=0; k <= j; k++) { + for (k = 0; k <= j; k++) { result = SDL_OpenAudio(&desired, NULL); - SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL), call %d", j, k+1); - expectedResult = (k==0) ? 0 : -1; + SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL), call %d", j, k + 1); + expectedResult = (k == 0) ? 0 : -1; SDLTest_AssertCheck(result == expectedResult, "Verify return value; expected: %d, got: %d", expectedResult, result); } /* Call Close (maybe multiple times) */ - for (k=0; k <= j; k++) { + for (k = 0; k <= j; k++) { SDL_CloseAudio(); - SDLTest_AssertPass("Call to SDL_CloseAudio(), call %d", k+1); + SDLTest_AssertPass("Call to SDL_CloseAudio(), call %d", k + 1); } /* Call Quit (maybe multiple times) */ - for (k=0; k <= j; k++) { + for (k = 0; k <= j; k++) { SDL_AudioQuit(); - SDLTest_AssertPass("Call to SDL_AudioQuit(), call %d", k+1); + SDLTest_AssertPass("Call to SDL_AudioQuit(), call %d", k + 1); } } /* spec loop */ - } /* driver loop */ + } /* driver loop */ - /* Restart audio again */ - _audioSetUp(NULL); + /* Restart audio again */ + _audioSetUp(NULL); return TEST_COMPLETED; } @@ -231,52 +227,52 @@ int audio_pauseUnpauseAudio() int totalDelay; int pause_on; int originalCounter; - const char* audioDriver; + const char *audioDriver; SDL_AudioSpec desired; /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); - SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); - - /* Loop over all available audio drivers */ - iMax = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); - SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); - for (i = 0; i < iMax; i++) { - audioDriver = SDL_GetAudioDriver(i); - SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); - SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); - - /* Change specs */ - for (j = 0; j < 2; j++) { - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Set spec */ - SDL_memset(&desired, 0, sizeof(desired)); - switch (j) { - case 0: - /* Set standard desired spec */ - desired.freq = 22050; - desired.format = AUDIO_S16SYS; - desired.channels = 2; - desired.samples = 4096; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - - case 1: - /* Set custom desired spec */ - desired.freq = 48000; - desired.format = AUDIO_F32SYS; - desired.channels = 2; - desired.samples = 2048; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - break; + SDL_QuitSubSystem(SDL_INIT_AUDIO); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_Assert(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */ + + /* Change specs */ + for (j = 0; j < 2; j++) { + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Set spec */ + SDL_memset(&desired, 0, sizeof(desired)); + switch (j) { + case 0: + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; + case 1: + /* Set custom desired spec */ + desired.freq = 48000; + desired.format = AUDIO_F32SYS; + desired.channels = 2; + desired.samples = 2048; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; } /* Call Open */ @@ -285,37 +281,36 @@ int audio_pauseUnpauseAudio() SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0 got: %d", result); /* Start and stop audio multiple times */ - for (l=0; l<3; l++) { - SDLTest_Log("Pause/Unpause iteration: %d", l+1); - + for (l = 0; l < 3; l++) { + SDLTest_Log("Pause/Unpause iteration: %d", l + 1); + /* Reset callback counters */ _audio_testCallbackCounter = 0; _audio_testCallbackLength = 0; /* Un-pause audio to start playing (maybe multiple times) */ pause_on = 0; - for (k=0; k <= j; k++) { + for (k = 0; k <= j; k++) { SDL_PauseAudio(pause_on); - SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k+1); + SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k + 1); } - + /* Wait for callback */ totalDelay = 0; do { SDL_Delay(10); totalDelay += 10; - } - while (_audio_testCallbackCounter == 0 && totalDelay < 1000); + } while (_audio_testCallbackCounter == 0 && totalDelay < 1000); SDLTest_AssertCheck(_audio_testCallbackCounter > 0, "Verify callback counter; expected: >0 got: %d", _audio_testCallbackCounter); SDLTest_AssertCheck(_audio_testCallbackLength > 0, "Verify callback length; expected: >0 got: %d", _audio_testCallbackLength); /* Pause audio to stop playing (maybe multiple times) */ - for (k=0; k <= j; k++) { - pause_on = (k==0) ? 1 : SDLTest_RandomIntegerInRange(99, 9999); + for (k = 0; k <= j; k++) { + pause_on = (k == 0) ? 1 : SDLTest_RandomIntegerInRange(99, 9999); SDL_PauseAudio(pause_on); - SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k+1); + SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k + 1); } - + /* Ensure callback is not called again */ originalCounter = _audio_testCallbackCounter; SDL_Delay(totalDelay + 10); @@ -331,7 +326,7 @@ int audio_pauseUnpauseAudio() SDLTest_AssertPass("Call to SDL_AudioQuit()"); } /* spec loop */ - } /* driver loop */ + } /* driver loop */ /* Restart audio again */ _audioSetUp(NULL); @@ -347,54 +342,54 @@ int audio_pauseUnpauseAudio() */ int audio_enumerateAndNameAudioDevices() { - int t, tt; - int i, n, nn; - const char *name, *nameAgain; - - /* Iterate over types: t=0 output device, t=1 input/capture device */ - for (t=0; t<2; t++) { - - /* Get number of devices. */ - n = SDL_GetNumAudioDevices(t); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(%i)", t); - SDLTest_Log("Number of %s devices < 0, reported as %i", (t) ? "capture" : "output", n); - SDLTest_AssertCheck(n >= 0, "Validate result is >= 0, got: %i", n); - - /* Variation of non-zero type */ - if (t==1) { - tt = t + SDLTest_RandomIntegerInRange(1,10); - nn = SDL_GetNumAudioDevices(tt); - SDLTest_AssertCheck(n==nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", tt, n, nn); - nn = SDL_GetNumAudioDevices(-tt); - SDLTest_AssertCheck(n==nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", -tt, n, nn); - } - - /* List devices. */ - if (n>0) { - for (i=0; i= 0, "Validate result is >= 0, got: %i", n); + + /* Variation of non-zero type */ + if (t == 1) { + tt = t + SDLTest_RandomIntegerInRange(1, 10); + nn = SDL_GetNumAudioDevices(tt); + SDLTest_AssertCheck(n == nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", tt, n, nn); + nn = SDL_GetNumAudioDevices(-tt); + SDLTest_AssertCheck(n == nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", -tt, n, nn); + } + + /* List devices. */ + if (n > 0) { + for (i = 0; i < n; i++) { + name = SDL_GetAudioDeviceName(i, t); + SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); + SDLTest_AssertCheck(name != NULL, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL", i, t); + if (name != NULL) { + SDLTest_AssertCheck(name[0] != '\0', "verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, t, name); + if (t == 1) { + /* Also try non-zero type */ + tt = t + SDLTest_RandomIntegerInRange(1, 10); + nameAgain = SDL_GetAudioDeviceName(i, tt); + SDLTest_AssertCheck(nameAgain != NULL, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL", i, tt); + if (nameAgain != NULL) { + SDLTest_AssertCheck(nameAgain[0] != '\0', "Verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, tt, nameAgain); + SDLTest_AssertCheck(SDL_strcmp(name, nameAgain) == 0, + "Verify SDL_GetAudioDeviceName(%i, %i) and SDL_GetAudioDeviceName(%i %i) return the same string", + i, t, i, tt); + } + } + } } - } - } - } + } + } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -405,44 +400,43 @@ int audio_enumerateAndNameAudioDevices() */ int audio_enumerateAndNameAudioDevicesNegativeTests() { - int t; - int i, j, no, nc; - const char *name; - - /* Get number of devices. */ - no = SDL_GetNumAudioDevices(0); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); - nc = SDL_GetNumAudioDevices(1); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(1)"); - - /* Invalid device index when getting name */ - for (t=0; t<2; t++) { - /* Negative device index */ - i = SDLTest_RandomIntegerInRange(-10,-1); - name = SDL_GetAudioDeviceName(i, t); - SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); - SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result NULL, expected NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); - - /* Device index past range */ - for (j=0; j<3; j++) { - i = (t) ? nc+j : no+j; - name = SDL_GetAudioDeviceName(i, t); - SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); - SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); - } - - /* Capture index past capture range but within output range */ - if ((no>0) && (no>nc) && (t==1)) { - i = no-1; - name = SDL_GetAudioDeviceName(i, t); - SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); - SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); - } - } - - return TEST_COMPLETED; -} + int t; + int i, j, no, nc; + const char *name; + + /* Get number of devices. */ + no = SDL_GetNumAudioDevices(0); + SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); + nc = SDL_GetNumAudioDevices(1); + SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(1)"); + + /* Invalid device index when getting name */ + for (t = 0; t < 2; t++) { + /* Negative device index */ + i = SDLTest_RandomIntegerInRange(-10, -1); + name = SDL_GetAudioDeviceName(i, t); + SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); + SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result NULL, expected NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); + + /* Device index past range */ + for (j = 0; j < 3; j++) { + i = (t) ? nc + j : no + j; + name = SDL_GetAudioDeviceName(i, t); + SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); + SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); + } + /* Capture index past capture range but within output range */ + if ((no > 0) && (no > nc) && (t == 1)) { + i = no - 1; + name = SDL_GetAudioDeviceName(i, t); + SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); + SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); + } + } + + return TEST_COMPLETED; +} /** * \brief Checks available audio driver names. @@ -452,30 +446,28 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() */ int audio_printAudioDrivers() { - int i, n; - const char *name; - - /* Get number of drivers */ - n = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); - SDLTest_AssertCheck(n>=0, "Verify number of audio drivers >= 0, got: %i", n); - - /* List drivers. */ - if (n>0) - { - for (i=0; i= 0, "Verify number of audio drivers >= 0, got: %i", n); + + /* List drivers. */ + if (n > 0) { + for (i = 0; i < n; i++) { + name = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%i)", i); + SDLTest_AssertCheck(name != NULL, "Verify returned name is not NULL"); + if (name != NULL) { + SDLTest_AssertCheck(name[0] != '\0', "Verify returned name is not empty, got: '%s'", name); + } + } + } + return TEST_COMPLETED; +} /** * \brief Checks current audio driver name with initialized audio. @@ -484,31 +476,30 @@ int audio_printAudioDrivers() */ int audio_printCurrentAudioDriver() { - /* Check current audio driver */ - const char *name = SDL_GetCurrentAudioDriver(); - SDLTest_AssertPass("Call to SDL_GetCurrentAudioDriver()"); - SDLTest_AssertCheck(name != NULL, "Verify returned name is not NULL"); - if (name != NULL) { - SDLTest_AssertCheck(name[0] != '\0', "Verify returned name is not empty, got: '%s'", name); - } - - return TEST_COMPLETED; + /* Check current audio driver */ + const char *name = SDL_GetCurrentAudioDriver(); + SDLTest_AssertPass("Call to SDL_GetCurrentAudioDriver()"); + SDLTest_AssertCheck(name != NULL, "Verify returned name is not NULL"); + if (name != NULL) { + SDLTest_AssertCheck(name[0] != '\0', "Verify returned name is not empty, got: '%s'", name); + } + + return TEST_COMPLETED; } /* Definition of all formats, channels, and frequencies used to test audio conversions */ const int _numAudioFormats = 18; SDL_AudioFormat _audioFormats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB, - AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32, - AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_F32SYS, AUDIO_F32 }; + AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32, + AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_F32SYS, AUDIO_F32 }; const char *_audioFormatsVerbose[] = { "AUDIO_S8", "AUDIO_U8", "AUDIO_S16LSB", "AUDIO_S16MSB", "AUDIO_S16SYS", "AUDIO_S16", "AUDIO_U16LSB", - "AUDIO_U16MSB", "AUDIO_U16SYS", "AUDIO_U16", "AUDIO_S32LSB", "AUDIO_S32MSB", "AUDIO_S32SYS", "AUDIO_S32", - "AUDIO_F32LSB", "AUDIO_F32MSB", "AUDIO_F32SYS", "AUDIO_F32" }; + "AUDIO_U16MSB", "AUDIO_U16SYS", "AUDIO_U16", "AUDIO_S32LSB", "AUDIO_S32MSB", "AUDIO_S32SYS", "AUDIO_S32", + "AUDIO_F32LSB", "AUDIO_F32MSB", "AUDIO_F32SYS", "AUDIO_F32" }; const int _numAudioChannels = 4; Uint8 _audioChannels[] = { 1, 2, 4, 6 }; const int _numAudioFrequencies = 4; int _audioFrequencies[] = { 11025, 22050, 44100, 48000 }; - /** * \brief Builds various audio conversion structures * @@ -516,61 +507,61 @@ int _audioFrequencies[] = { 11025, 22050, 44100, 48000 }; */ int audio_buildAudioCVT() { - int result; - SDL_AudioCVT cvt; - SDL_AudioSpec spec1; - SDL_AudioSpec spec2; - int i, ii, j, jj, k, kk; - - /* No conversion needed */ - spec1.format = AUDIO_S16LSB; - spec1.channels = 2; - spec1.freq = 22050; - result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, - spec1.format, spec1.channels, spec1.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec1)"); - SDLTest_AssertCheck(result == 0, "Verify result value; expected: 0, got: %i", result); - - /* Typical conversion */ - spec1.format = AUDIO_S8; - spec1.channels = 1; - spec1.freq = 22050; - spec2.format = AUDIO_S16LSB; - spec2.channels = 2; - spec2.freq = 44100; - result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, - spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); - SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); - - /* All source conversions with random conversion targets, allow 'null' conversions */ - for (i = 0; i < _numAudioFormats; i++) { - for (j = 0; j < _numAudioChannels; j++) { - for (k = 0; k < _numAudioFrequencies; k++) { - spec1.format = _audioFormats[i]; - spec1.channels = _audioChannels[j]; - spec1.freq = _audioFrequencies[k]; - ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); - jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); - kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); - spec2.format = _audioFormats[ii]; - spec2.channels = _audioChannels[jj]; - spec2.freq = _audioFrequencies[kk]; - result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, - spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", - i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); - SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result); - if (result<0) { - SDLTest_LogError("%s", SDL_GetError()); - } else { - SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); + int result; + SDL_AudioCVT cvt; + SDL_AudioSpec spec1; + SDL_AudioSpec spec2; + int i, ii, j, jj, k, kk; + + /* No conversion needed */ + spec1.format = AUDIO_S16LSB; + spec1.channels = 2; + spec1.freq = 22050; + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, + spec1.format, spec1.channels, spec1.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec1)"); + SDLTest_AssertCheck(result == 0, "Verify result value; expected: 0, got: %i", result); + + /* Typical conversion */ + spec1.format = AUDIO_S8; + spec1.channels = 1; + spec1.freq = 22050; + spec2.format = AUDIO_S16LSB; + spec2.channels = 2; + spec2.freq = 44100; + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, + spec2.format, spec2.channels, spec2.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); + SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); + + /* All source conversions with random conversion targets, allow 'null' conversions */ + for (i = 0; i < _numAudioFormats; i++) { + for (j = 0; j < _numAudioChannels; j++) { + for (k = 0; k < _numAudioFrequencies; k++) { + spec1.format = _audioFormats[i]; + spec1.channels = _audioChannels[j]; + spec1.freq = _audioFrequencies[k]; + ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); + jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); + kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); + spec2.format = _audioFormats[ii]; + spec2.channels = _audioChannels[jj]; + spec2.freq = _audioFrequencies[kk]; + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, + spec2.format, spec2.channels, spec2.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", + i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); + SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result); + if (result < 0) { + SDLTest_LogError("%s", SDL_GetError()); + } else { + SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); + } + } } - } } - } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -580,42 +571,16 @@ int audio_buildAudioCVT() */ int audio_buildAudioCVTNegative() { - const char *expectedError = "Parameter 'cvt' is invalid"; - const char *error; - int result; - SDL_AudioCVT cvt; - SDL_AudioSpec spec1; - SDL_AudioSpec spec2; - int i; - char message[256]; - - /* Valid format */ - spec1.format = AUDIO_S8; - spec1.channels = 1; - spec1.freq = 22050; - spec2.format = AUDIO_S16LSB; - spec2.channels = 2; - spec2.freq = 44100; - - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - /* NULL input for CVT buffer */ - result = SDL_BuildAudioCVT((SDL_AudioCVT *)NULL, spec1.format, spec1.channels, spec1.freq, - spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(NULL,...)"); - SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - } + const char *expectedError = "Parameter 'cvt' is invalid"; + const char *error; + int result; + SDL_AudioCVT cvt; + SDL_AudioSpec spec1; + SDL_AudioSpec spec2; + int i; + char message[256]; - /* Invalid conversions */ - for (i = 1; i < 64; i++) { - /* Valid format to start with */ + /* Valid format */ spec1.format = AUDIO_S8; spec1.channels = 1; spec1.freq = 22050; @@ -626,46 +591,72 @@ int audio_buildAudioCVTNegative() SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - /* Set various invalid format inputs */ - SDL_strlcpy(message, "Invalid: ", 256); - if (i & 1) { - SDL_strlcat(message, " spec1.format", 256); - spec1.format = 0; - } - if (i & 2) { - SDL_strlcat(message, " spec1.channels", 256); - spec1.channels = 0; - } - if (i & 4) { - SDL_strlcat(message, " spec1.freq", 256); - spec1.freq = 0; - } - if (i & 8) { - SDL_strlcat(message, " spec2.format", 256); - spec2.format = 0; - } - if (i & 16) { - SDL_strlcat(message, " spec2.channels", 256); - spec2.channels = 0; - } - if (i & 32) { - SDL_strlcat(message, " spec2.freq", 256); - spec2.freq = 0; - } - SDLTest_Log("%s", message); - result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, - spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); + /* NULL input for CVT buffer */ + result = SDL_BuildAudioCVT((SDL_AudioCVT *)NULL, spec1.format, spec1.channels, spec1.freq, + spec2.format, spec2.channels, spec2.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(NULL,...)"); SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL && error[0] != '\0', "Validate that error message was not NULL or empty"); - } + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + } - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + /* Invalid conversions */ + for (i = 1; i < 64; i++) { + /* Valid format to start with */ + spec1.format = AUDIO_S8; + spec1.channels = 1; + spec1.freq = 22050; + spec2.format = AUDIO_S16LSB; + spec2.channels = 2; + spec2.freq = 44100; + + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Set various invalid format inputs */ + SDL_strlcpy(message, "Invalid: ", 256); + if (i & 1) { + SDL_strlcat(message, " spec1.format", 256); + spec1.format = 0; + } + if (i & 2) { + SDL_strlcat(message, " spec1.channels", 256); + spec1.channels = 0; + } + if (i & 4) { + SDL_strlcat(message, " spec1.freq", 256); + spec1.freq = 0; + } + if (i & 8) { + SDL_strlcat(message, " spec2.format", 256); + spec2.format = 0; + } + if (i & 16) { + SDL_strlcat(message, " spec2.channels", 256); + spec2.channels = 0; + } + if (i & 32) { + SDL_strlcat(message, " spec2.freq", 256); + spec2.freq = 0; + } + SDLTest_Log("%s", message); + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, + spec2.format, spec2.channels, spec2.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); + SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL && error[0] != '\0', "Validate that error message was not NULL or empty"); + } - return TEST_COMPLETED; + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + return TEST_COMPLETED; } /** @@ -675,20 +666,18 @@ int audio_buildAudioCVTNegative() */ int audio_getAudioStatus() { - SDL_AudioStatus result; + SDL_AudioStatus result; - /* Check current audio status */ - result = SDL_GetAudioStatus(); - SDLTest_AssertPass("Call to SDL_GetAudioStatus()"); - SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, - "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", - SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); + /* Check current audio status */ + result = SDL_GetAudioStatus(); + SDLTest_AssertPass("Call to SDL_GetAudioStatus()"); + SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, + "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", + SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); - return TEST_COMPLETED; + return TEST_COMPLETED; } - - /** * \brief Opens, checks current audio status, and closes a device. * @@ -696,55 +685,57 @@ int audio_getAudioStatus() */ int audio_openCloseAndGetAudioStatus() { - SDL_AudioStatus result; - int i; - int count; - const char *device; - SDL_AudioDeviceID id; - SDL_AudioSpec desired, obtained; - - /* Get number of devices. */ - count = SDL_GetNumAudioDevices(0); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); - if (count > 0) { - for (i = 0; i < count; i++) { - /* Get device name */ - device = SDL_GetAudioDeviceName(i, 0); - SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); - SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); - if (device == NULL) return TEST_ABORTED; - - /* Set standard desired spec */ - desired.freq=22050; - desired.format=AUDIO_S16SYS; - desired.channels=2; - desired.samples=4096; - desired.callback=_audio_testCallback; - desired.userdata=NULL; - - /* Open device */ - id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); - SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); - SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id); - if (id > 1) { - - /* Check device audio status */ - result = SDL_GetAudioDeviceStatus(id); - SDLTest_AssertPass("Call to SDL_GetAudioDeviceStatus()"); - SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, - "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", - SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); - - /* Close device again */ - SDL_CloseAudioDevice(id); - SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); - } - } - } else { - SDLTest_Log("No devices to test with"); - } - - return TEST_COMPLETED; + SDL_AudioStatus result; + int i; + int count; + const char *device; + SDL_AudioDeviceID id; + SDL_AudioSpec desired, obtained; + + /* Get number of devices. */ + count = SDL_GetNumAudioDevices(0); + SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); + if (count > 0) { + for (i = 0; i < count; i++) { + /* Get device name */ + device = SDL_GetAudioDeviceName(i, 0); + SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); + SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); + if (device == NULL) { + return TEST_ABORTED; + } + + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + /* Open device */ + id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); + SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); + SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id); + if (id > 1) { + + /* Check device audio status */ + result = SDL_GetAudioDeviceStatus(id); + SDLTest_AssertPass("Call to SDL_GetAudioDeviceStatus()"); + SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, + "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", + SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); + + /* Close device again */ + SDL_CloseAudioDevice(id); + SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); + } + } + } else { + SDLTest_Log("No devices to test with"); + } + + return TEST_COMPLETED; } /** @@ -755,60 +746,61 @@ int audio_openCloseAndGetAudioStatus() */ int audio_lockUnlockOpenAudioDevice() { - int i; - int count; - const char *device; - SDL_AudioDeviceID id; - SDL_AudioSpec desired, obtained; - - /* Get number of devices. */ - count = SDL_GetNumAudioDevices(0); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); - if (count > 0) { - for (i = 0; i < count; i++) { - /* Get device name */ - device = SDL_GetAudioDeviceName(i, 0); - SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); - SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); - if (device == NULL) return TEST_ABORTED; - - /* Set standard desired spec */ - desired.freq=22050; - desired.format=AUDIO_S16SYS; - desired.channels=2; - desired.samples=4096; - desired.callback=_audio_testCallback; - desired.userdata=NULL; - - /* Open device */ - id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); - SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); - SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id); - if (id > 1) { - /* Lock to protect callback */ - SDL_LockAudioDevice(id); - SDLTest_AssertPass("SDL_LockAudioDevice(%" SDL_PRIu32 ")", id); - - /* Simulate callback processing */ - SDL_Delay(10); - SDLTest_Log("Simulate callback processing - delay"); - - /* Unlock again */ - SDL_UnlockAudioDevice(id); - SDLTest_AssertPass("SDL_UnlockAudioDevice(%" SDL_PRIu32 ")", id); - - /* Close device again */ - SDL_CloseAudioDevice(id); - SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); - } - } - } else { - SDLTest_Log("No devices to test with"); - } - - return TEST_COMPLETED; -} + int i; + int count; + const char *device; + SDL_AudioDeviceID id; + SDL_AudioSpec desired, obtained; + + /* Get number of devices. */ + count = SDL_GetNumAudioDevices(0); + SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); + if (count > 0) { + for (i = 0; i < count; i++) { + /* Get device name */ + device = SDL_GetAudioDeviceName(i, 0); + SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); + SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); + if (device == NULL) { + return TEST_ABORTED; + } + + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + /* Open device */ + id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); + SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); + SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id); + if (id > 1) { + /* Lock to protect callback */ + SDL_LockAudioDevice(id); + SDLTest_AssertPass("SDL_LockAudioDevice(%" SDL_PRIu32 ")", id); + + /* Simulate callback processing */ + SDL_Delay(10); + SDLTest_Log("Simulate callback processing - delay"); + + /* Unlock again */ + SDL_UnlockAudioDevice(id); + SDLTest_AssertPass("SDL_UnlockAudioDevice(%" SDL_PRIu32 ")", id); + + /* Close device again */ + SDL_CloseAudioDevice(id); + SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); + } + } + } else { + SDLTest_Log("No devices to test with"); + } + return TEST_COMPLETED; +} /** * \brief Convert audio using various conversion structures @@ -818,97 +810,100 @@ int audio_lockUnlockOpenAudioDevice() */ int audio_convertAudio() { - int result; - SDL_AudioCVT cvt; - SDL_AudioSpec spec1; - SDL_AudioSpec spec2; - int c; - char message[128]; - int i, ii, j, jj, k, kk, l, ll; - - /* Iterate over bitmask that determines which parameters are modified in the conversion */ - for (c = 1; c < 8; c++) { - SDL_strlcpy(message, "Changing:", 128); - if (c & 1) { - SDL_strlcat(message, " Format", 128); - } - if (c & 2) { - SDL_strlcat(message, " Channels", 128); - } - if (c & 4) { - SDL_strlcat(message, " Frequencies", 128); - } - SDLTest_Log("%s", message); - /* All source conversions with random conversion targets */ - for (i = 0; i < _numAudioFormats; i++) { - for (j = 0; j < _numAudioChannels; j++) { - for (k = 0; k < _numAudioFrequencies; k++) { - spec1.format = _audioFormats[i]; - spec1.channels = _audioChannels[j]; - spec1.freq = _audioFrequencies[k]; - - /* Ensure we have a different target format */ - do { - if (c & 1) { - ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); - } else { - ii = 1; - } - if (c & 2) { - jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); - } else { - jj= j; - } - if (c & 4) { - kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); - } else { - kk = k; + int result; + SDL_AudioCVT cvt; + SDL_AudioSpec spec1; + SDL_AudioSpec spec2; + int c; + char message[128]; + int i, ii, j, jj, k, kk, l, ll; + + /* Iterate over bitmask that determines which parameters are modified in the conversion */ + for (c = 1; c < 8; c++) { + SDL_strlcpy(message, "Changing:", 128); + if (c & 1) { + SDL_strlcat(message, " Format", 128); + } + if (c & 2) { + SDL_strlcat(message, " Channels", 128); + } + if (c & 4) { + SDL_strlcat(message, " Frequencies", 128); + } + SDLTest_Log("%s", message); + /* All source conversions with random conversion targets */ + for (i = 0; i < _numAudioFormats; i++) { + for (j = 0; j < _numAudioChannels; j++) { + for (k = 0; k < _numAudioFrequencies; k++) { + spec1.format = _audioFormats[i]; + spec1.channels = _audioChannels[j]; + spec1.freq = _audioFrequencies[k]; + + /* Ensure we have a different target format */ + do { + if (c & 1) { + ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); + } else { + ii = 1; + } + if (c & 2) { + jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); + } else { + jj = j; + } + if (c & 4) { + kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); + } else { + kk = k; + } + } while ((i == ii) && (j == jj) && (k == kk)); + spec2.format = _audioFormats[ii]; + spec2.channels = _audioChannels[jj]; + spec2.freq = _audioFrequencies[kk]; + + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, + spec2.format, spec2.channels, spec2.freq); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", + i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); + SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); + if (result != 1) { + SDLTest_LogError("%s", SDL_GetError()); + } else { + SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); + if (cvt.len_mult < 1) { + return TEST_ABORTED; + } + + /* Create some random data to convert */ + l = 64; + ll = l * cvt.len_mult; + SDLTest_Log("Creating dummy sample buffer of %i length (%i bytes)", l, ll); + cvt.len = l; + cvt.buf = (Uint8 *)SDL_malloc(ll); + SDLTest_AssertCheck(cvt.buf != NULL, "Check data buffer to convert is not NULL"); + if (cvt.buf == NULL) { + return TEST_ABORTED; + } + + /* Convert the data */ + result = SDL_ConvertAudio(&cvt); + SDLTest_AssertPass("Call to SDL_ConvertAudio()"); + SDLTest_AssertCheck(result == 0, "Verify result value; expected: 0; got: %i", result); + SDLTest_AssertCheck(cvt.buf != NULL, "Verify conversion buffer is not NULL"); + SDLTest_AssertCheck(cvt.len_ratio > 0.0, "Verify conversion length ratio; expected: >0; got: %f", cvt.len_ratio); + + /* Free converted buffer */ + SDL_free(cvt.buf); + cvt.buf = NULL; + } + } } - } while ((i == ii) && (j == jj) && (k == kk)); - spec2.format = _audioFormats[ii]; - spec2.channels = _audioChannels[jj]; - spec2.freq = _audioFrequencies[kk]; - - result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, - spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", - i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); - SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); - if (result != 1) { - SDLTest_LogError("%s", SDL_GetError()); - } else { - SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); - if (cvt.len_mult < 1) return TEST_ABORTED; - - /* Create some random data to convert */ - l = 64; - ll = l * cvt.len_mult; - SDLTest_Log("Creating dummy sample buffer of %i length (%i bytes)", l, ll); - cvt.len = l; - cvt.buf = (Uint8 *)SDL_malloc(ll); - SDLTest_AssertCheck(cvt.buf != NULL, "Check data buffer to convert is not NULL"); - if (cvt.buf == NULL) return TEST_ABORTED; - - /* Convert the data */ - result = SDL_ConvertAudio(&cvt); - SDLTest_AssertPass("Call to SDL_ConvertAudio()"); - SDLTest_AssertCheck(result == 0, "Verify result value; expected: 0; got: %i", result); - SDLTest_AssertCheck(cvt.buf != NULL, "Verify conversion buffer is not NULL"); - SDLTest_AssertCheck(cvt.len_ratio > 0.0, "Verify conversion length ratio; expected: >0; got: %f", cvt.len_ratio); - - /* Free converted buffer */ - SDL_free(cvt.buf); - cvt.buf = NULL; - } } - } } - } - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * \brief Opens, checks current connected status, and closes a device. * @@ -916,119 +911,251 @@ int audio_convertAudio() */ int audio_openCloseAudioDeviceConnected() { - int result = -1; - int i; - int count; - const char *device; - SDL_AudioDeviceID id; - SDL_AudioSpec desired, obtained; - - /* Get number of devices. */ - count = SDL_GetNumAudioDevices(0); - SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); - if (count > 0) { - for (i = 0; i < count; i++) { - /* Get device name */ - device = SDL_GetAudioDeviceName(i, 0); - SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); - SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); - if (device == NULL) return TEST_ABORTED; - - /* Set standard desired spec */ - desired.freq=22050; - desired.format=AUDIO_S16SYS; - desired.channels=2; - desired.samples=4096; - desired.callback=_audio_testCallback; - desired.userdata=NULL; - - /* Open device */ - id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); - SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); - SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >1, got: %" SDL_PRIu32, id); - if (id > 1) { + int result = -1; + int i; + int count; + const char *device; + SDL_AudioDeviceID id; + SDL_AudioSpec desired, obtained; + + /* Get number of devices. */ + count = SDL_GetNumAudioDevices(0); + SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); + if (count > 0) { + for (i = 0; i < count; i++) { + /* Get device name */ + device = SDL_GetAudioDeviceName(i, 0); + SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i); + SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL"); + if (device == NULL) { + return TEST_ABORTED; + } + + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + /* Open device */ + id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); + SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); + SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >1, got: %" SDL_PRIu32, id); + if (id > 1) { /* TODO: enable test code when function is available in SDL2 */ #ifdef AUDIODEVICECONNECTED_DEFINED - /* Get connected status */ - result = SDL_AudioDeviceConnected(id); - SDLTest_AssertPass("Call to SDL_AudioDeviceConnected()"); + /* Get connected status */ + result = SDL_AudioDeviceConnected(id); + SDLTest_AssertPass("Call to SDL_AudioDeviceConnected()"); #endif - SDLTest_AssertCheck(result == 1, "Verify returned value; expected: 1; got: %i", result); - - /* Close device again */ - SDL_CloseAudioDevice(id); - SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); - } - } - } else { - SDLTest_Log("No devices to test with"); - } - - return TEST_COMPLETED; + SDLTest_AssertCheck(result == 1, "Verify returned value; expected: 1; got: %i", result); + + /* Close device again */ + SDL_CloseAudioDevice(id); + SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); + } + } + } else { + SDLTest_Log("No devices to test with"); + } + + return TEST_COMPLETED; +} + +static double sine_wave_sample(const Sint64 idx, const Sint64 rate, const Sint64 freq, const double phase) +{ + /* Using integer modulo to avoid precision loss caused by large floating + * point numbers. Sint64 is needed for the large integer multiplication. + * The integers are assumed to be non-negative so that modulo is always + * non-negative. + * sin(i / rate * freq * 2 * M_PI + phase) + * = sin(mod(i / rate * freq, 1) * 2 * M_PI + phase) + * = sin(mod(i * freq, rate) / rate * 2 * M_PI + phase) */ + return SDL_sin(((double) (idx * freq % rate)) / ((double) rate) * (M_PI * 2) + phase); } +/** + * \brief Check signal-to-noise ratio and maximum error of audio resampling. + * + * \sa https://wiki.libsdl.org/SDL_BuildAudioCVT + * \sa https://wiki.libsdl.org/SDL_ConvertAudio + */ +int audio_resampleLoss() +{ + /* Note: always test long input time (>= 5s from experience) in some test + * cases because an improper implementation may suffer from low resampling + * precision with long input due to e.g. doing subtraction with large floats. */ + struct test_spec_t { + int time; + int freq; + double phase; + int rate_in; + int rate_out; + double signal_to_noise; + double max_error; + } test_specs[] = { + { 50, 440, 0, 44100, 48000, 60, 0.0025 }, + { 50, 5000, M_PI / 2, 20000, 10000, 65, 0.0010 }, + { 0 } + }; + + int spec_idx = 0; + + for (spec_idx = 0; test_specs[spec_idx].time > 0; ++spec_idx) { + const struct test_spec_t *spec = &test_specs[spec_idx]; + const int frames_in = spec->time * spec->rate_in; + const int frames_target = spec->time * spec->rate_out; + const int len_in = frames_in * (int)sizeof(float); + const int len_target = frames_target * (int)sizeof(float); + + Uint64 tick_beg = 0; + Uint64 tick_end = 0; + SDL_AudioCVT cvt; + int i = 0; + int ret = 0; + double max_error = 0; + double sum_squared_error = 0; + double sum_squared_value = 0; + double signal_to_noise = 0; + + SDLTest_AssertPass("Test resampling of %i s %i Hz %f phase sine wave from sampling rate of %i Hz to %i Hz", + spec->time, spec->freq, spec->phase, spec->rate_in, spec->rate_out); + + ret = SDL_BuildAudioCVT(&cvt, AUDIO_F32, 1, spec->rate_in, AUDIO_F32, 1, spec->rate_out); + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(&cvt, AUDIO_F32, 1, %i, AUDIO_F32, 1, %i)", spec->rate_in, spec->rate_out); + SDLTest_AssertCheck(ret == 1, "Expected SDL_BuildAudioCVT to succeed and conversion to be needed."); + if (ret != 1) { + return TEST_ABORTED; + } + + cvt.buf = (Uint8 *)SDL_malloc(len_in * cvt.len_mult); + SDLTest_AssertCheck(cvt.buf != NULL, "Expected input buffer to be created."); + if (cvt.buf == NULL) { + return TEST_ABORTED; + } + + cvt.len = len_in; + for (i = 0; i < frames_in; ++i) { + *(((float *) cvt.buf) + i) = (float)sine_wave_sample(i, spec->rate_in, spec->freq, spec->phase); + } + + tick_beg = SDL_GetPerformanceCounter(); + ret = SDL_ConvertAudio(&cvt); + tick_end = SDL_GetPerformanceCounter(); + SDLTest_AssertPass("Call to SDL_ConvertAudio(&cvt)"); + SDLTest_AssertCheck(ret == 0, "Expected SDL_ConvertAudio to succeed."); + SDLTest_AssertCheck(cvt.len_cvt == len_target, "Expected output length %i, got %i.", len_target, cvt.len_cvt); + if (ret != 0 || cvt.len_cvt != len_target) { + SDL_free(cvt.buf); + return TEST_ABORTED; + } + SDLTest_Log("Resampling used %f seconds.", ((double) (tick_end - tick_beg)) / SDL_GetPerformanceFrequency()); + + for (i = 0; i < frames_target; ++i) { + const float output = *(((float *) cvt.buf) + i); + const double target = sine_wave_sample(i, spec->rate_out, spec->freq, spec->phase); + const double error = SDL_fabs(target - output); + max_error = SDL_max(max_error, error); + sum_squared_error += error * error; + sum_squared_value += target * target; + } + SDL_free(cvt.buf); + signal_to_noise = 10 * SDL_log10(sum_squared_value / sum_squared_error); /* decibel */ + SDLTest_AssertCheck(isfinite(sum_squared_value), "Sum of squared target should be finite."); + SDLTest_AssertCheck(isfinite(sum_squared_error), "Sum of squared error should be finite."); + /* Infinity is theoretically possible when there is very little to no noise */ + SDLTest_AssertCheck(!isnan(signal_to_noise), "Signal-to-noise ratio should not be NaN."); + SDLTest_AssertCheck(isfinite(max_error), "Maximum conversion error should be finite."); + SDLTest_AssertCheck(signal_to_noise >= spec->signal_to_noise, "Conversion signal-to-noise ratio %f dB should be no less than %f dB.", + signal_to_noise, spec->signal_to_noise); + SDLTest_AssertCheck(max_error <= spec->max_error, "Maximum conversion error %f should be no more than %f.", + max_error, spec->max_error); + } + return TEST_COMPLETED; +} /* ================= Test Case References ================== */ /* Audio test cases */ -static const SDLTest_TestCaseReference audioTest1 = - { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevices, "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest1 = { + (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevices, "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest2 = - { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevicesNegativeTests, "audio_enumerateAndNameAudioDevicesNegativeTests", "Negative tests around enumeration and naming of audio devices.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest2 = { + (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevicesNegativeTests, "audio_enumerateAndNameAudioDevicesNegativeTests", "Negative tests around enumeration and naming of audio devices.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest3 = - { (SDLTest_TestCaseFp)audio_printAudioDrivers, "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest3 = { + (SDLTest_TestCaseFp)audio_printAudioDrivers, "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest4 = - { (SDLTest_TestCaseFp)audio_printCurrentAudioDriver, "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest4 = { + (SDLTest_TestCaseFp)audio_printCurrentAudioDriver, "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest5 = - { (SDLTest_TestCaseFp)audio_buildAudioCVT, "audio_buildAudioCVT", "Builds various audio conversion structures.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest5 = { + (SDLTest_TestCaseFp)audio_buildAudioCVT, "audio_buildAudioCVT", "Builds various audio conversion structures.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest6 = - { (SDLTest_TestCaseFp)audio_buildAudioCVTNegative, "audio_buildAudioCVTNegative", "Checks calls with invalid input to SDL_BuildAudioCVT", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest6 = { + (SDLTest_TestCaseFp)audio_buildAudioCVTNegative, "audio_buildAudioCVTNegative", "Checks calls with invalid input to SDL_BuildAudioCVT", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest7 = - { (SDLTest_TestCaseFp)audio_getAudioStatus, "audio_getAudioStatus", "Checks current audio status.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest7 = { + (SDLTest_TestCaseFp)audio_getAudioStatus, "audio_getAudioStatus", "Checks current audio status.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest8 = - { (SDLTest_TestCaseFp)audio_openCloseAndGetAudioStatus, "audio_openCloseAndGetAudioStatus", "Opens and closes audio device and get audio status.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest8 = { + (SDLTest_TestCaseFp)audio_openCloseAndGetAudioStatus, "audio_openCloseAndGetAudioStatus", "Opens and closes audio device and get audio status.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest9 = - { (SDLTest_TestCaseFp)audio_lockUnlockOpenAudioDevice, "audio_lockUnlockOpenAudioDevice", "Locks and unlocks an open audio device.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest9 = { + (SDLTest_TestCaseFp)audio_lockUnlockOpenAudioDevice, "audio_lockUnlockOpenAudioDevice", "Locks and unlocks an open audio device.", TEST_ENABLED +}; /* TODO: enable test when SDL_ConvertAudio segfaults on cygwin have been fixed. */ /* For debugging, test case can be run manually using --filter audio_convertAudio */ -static const SDLTest_TestCaseReference audioTest10 = - { (SDLTest_TestCaseFp)audio_convertAudio, "audio_convertAudio", "Convert audio using available formats.", TEST_DISABLED }; +static const SDLTest_TestCaseReference audioTest10 = { + (SDLTest_TestCaseFp)audio_convertAudio, "audio_convertAudio", "Convert audio using available formats.", TEST_DISABLED +}; /* TODO: enable test when SDL_AudioDeviceConnected has been implemented. */ -static const SDLTest_TestCaseReference audioTest11 = - { (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, "audio_openCloseAudioDeviceConnected", "Opens and closes audio device and get connected status.", TEST_DISABLED }; +static const SDLTest_TestCaseReference audioTest11 = { + (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, "audio_openCloseAudioDeviceConnected", "Opens and closes audio device and get connected status.", TEST_DISABLED +}; + +static const SDLTest_TestCaseReference audioTest12 = { + (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest12 = - { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest13 = { + (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest13 = - { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest14 = { + (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest14 = - { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest15 = { + (SDLTest_TestCaseFp)audio_pauseUnpauseAudio, "audio_pauseUnpauseAudio", "Pause and Unpause audio for various audio specs while testing callback.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference audioTest15 = - { (SDLTest_TestCaseFp)audio_pauseUnpauseAudio, "audio_pauseUnpauseAudio", "Pause and Unpause audio for various audio specs while testing callback.", TEST_ENABLED }; +static const SDLTest_TestCaseReference audioTest16 = { + (SDLTest_TestCaseFp)audio_resampleLoss, "audio_resampleLoss", "Check signal-to-noise ratio and maximum error of audio resampling.", TEST_ENABLED +}; /* Sequence of Audio test cases */ -static const SDLTest_TestCaseReference *audioTests[] = { +static const SDLTest_TestCaseReference *audioTests[] = { &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6, &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, - &audioTest12, &audioTest13, &audioTest14, &audioTest15, NULL + &audioTest12, &audioTest13, &audioTest14, &audioTest15, &audioTest16, NULL }; /* Audio test suite (global) */ diff --git a/modules/SDL2/test/testautomation_clipboard.c b/modules/SDL2/test/testautomation_clipboard.c index 76090d1..dbe1ef8 100644 --- a/modules/SDL2/test/testautomation_clipboard.c +++ b/modules/SDL2/test/testautomation_clipboard.c @@ -18,8 +18,7 @@ * \sa * http://wiki.libsdl.org/SDL_HasClipboardText */ -int -clipboard_testHasClipboardText(void *arg) +int clipboard_testHasClipboardText(void *arg) { SDL_HasClipboardText(); SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); @@ -33,8 +32,7 @@ clipboard_testHasClipboardText(void *arg) * \sa * http://wiki.libsdl.org/SDL_HasPrimarySelectionText */ -int -clipboard_testHasPrimarySelectionText(void *arg) +int clipboard_testHasPrimarySelectionText(void *arg) { SDL_HasPrimarySelectionText(); SDLTest_AssertPass("Call to SDL_HasPrimarySelectionText succeeded"); @@ -48,8 +46,7 @@ clipboard_testHasPrimarySelectionText(void *arg) * \sa * http://wiki.libsdl.org/SDL_GetClipboardText */ -int -clipboard_testGetClipboardText(void *arg) +int clipboard_testGetClipboardText(void *arg) { char *charResult; charResult = SDL_GetClipboardText(); @@ -66,8 +63,7 @@ clipboard_testGetClipboardText(void *arg) * \sa * http://wiki.libsdl.org/SDL_GetPrimarySelectionText */ -int -clipboard_testGetPrimarySelectionText(void *arg) +int clipboard_testGetPrimarySelectionText(void *arg) { char *charResult; charResult = SDL_GetPrimarySelectionText(); @@ -83,8 +79,7 @@ clipboard_testGetPrimarySelectionText(void *arg) * \sa * http://wiki.libsdl.org/SDL_SetClipboardText */ -int -clipboard_testSetClipboardText(void *arg) +int clipboard_testSetClipboardText(void *arg) { char *textRef = SDLTest_RandomAsciiString(); char *text = SDL_strdup(textRef); @@ -112,8 +107,7 @@ clipboard_testSetClipboardText(void *arg) * \sa * http://wiki.libsdl.org/SDL_SetPrimarySelectionText */ -int -clipboard_testSetPrimarySelectionText(void *arg) +int clipboard_testSetPrimarySelectionText(void *arg) { char *textRef = SDLTest_RandomAsciiString(); char *text = SDL_strdup(textRef); @@ -143,8 +137,7 @@ clipboard_testSetPrimarySelectionText(void *arg) * http://wiki.libsdl.org/SDL_GetClipboardText * http://wiki.libsdl.org/SDL_SetClipboardText */ -int -clipboard_testClipboardTextFunctions(void *arg) +int clipboard_testClipboardTextFunctions(void *arg) { char *textRef = SDLTest_RandomAsciiString(); char *text = SDL_strdup(textRef); @@ -176,13 +169,13 @@ clipboard_testClipboardTextFunctions(void *arg) /* Empty clipboard */ charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - SDLTest_AssertCheck( + SDLTest_Assert( charResult != NULL, "Verify SDL_GetClipboardText did not return NULL"); SDLTest_AssertCheck( - charResult[0] == '\0', + charResult[0] == '\0', /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */ "Verify SDL_GetClipboardText returned string with length 0, got length %i", - (int) SDL_strlen(charResult)); + (int)SDL_strlen(charResult)); intResult = SDL_SetClipboardText((const char *)text); SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded"); SDLTest_AssertCheck( @@ -222,8 +215,7 @@ clipboard_testClipboardTextFunctions(void *arg) * http://wiki.libsdl.org/SDL_GetPrimarySelectionText * http://wiki.libsdl.org/SDL_SetPrimarySelectionText */ -int -clipboard_testPrimarySelectionTextFunctions(void *arg) +int clipboard_testPrimarySelectionTextFunctions(void *arg) { char *textRef = SDLTest_RandomAsciiString(); char *text = SDL_strdup(textRef); @@ -255,13 +247,13 @@ clipboard_testPrimarySelectionTextFunctions(void *arg) /* Empty primary selection */ charResult = SDL_GetPrimarySelectionText(); SDLTest_AssertPass("Call to SDL_GetPrimarySelectionText succeeded"); - SDLTest_AssertCheck( + SDLTest_Assert( charResult != NULL, "Verify SDL_GetPrimarySelectionText did not return NULL"); SDLTest_AssertCheck( - charResult[0] == '\0', + charResult[0] == '\0', /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */ "Verify SDL_GetPrimarySelectionText returned string with length 0, got length %i", - (int) SDL_strlen(charResult)); + (int)SDL_strlen(charResult)); intResult = SDL_SetPrimarySelectionText((const char *)text); SDLTest_AssertPass("Call to SDL_SetPrimarySelectionText succeeded"); SDLTest_AssertCheck( @@ -294,36 +286,43 @@ clipboard_testPrimarySelectionTextFunctions(void *arg) return TEST_COMPLETED; } - /* ================= Test References ================== */ /* Clipboard test cases */ -static const SDLTest_TestCaseReference clipboardTest1 = - { (SDLTest_TestCaseFp)clipboard_testHasClipboardText, "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest1 = { + (SDLTest_TestCaseFp)clipboard_testHasClipboardText, "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest2 = - { (SDLTest_TestCaseFp)clipboard_testHasPrimarySelectionText, "clipboard_testHasPrimarySelectionText", "Check call to SDL_HasPrimarySelectionText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest2 = { + (SDLTest_TestCaseFp)clipboard_testHasPrimarySelectionText, "clipboard_testHasPrimarySelectionText", "Check call to SDL_HasPrimarySelectionText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest3 = - { (SDLTest_TestCaseFp)clipboard_testGetClipboardText, "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest3 = { + (SDLTest_TestCaseFp)clipboard_testGetClipboardText, "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest4 = - { (SDLTest_TestCaseFp)clipboard_testGetPrimarySelectionText, "clipboard_testGetPrimarySelectionText", "Check call to SDL_GetPrimarySelectionText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest4 = { + (SDLTest_TestCaseFp)clipboard_testGetPrimarySelectionText, "clipboard_testGetPrimarySelectionText", "Check call to SDL_GetPrimarySelectionText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest5 = - { (SDLTest_TestCaseFp)clipboard_testSetClipboardText, "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest5 = { + (SDLTest_TestCaseFp)clipboard_testSetClipboardText, "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest6 = - { (SDLTest_TestCaseFp)clipboard_testSetPrimarySelectionText, "clipboard_testSetPrimarySelectionText", "Check call to SDL_SetPrimarySelectionText", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest6 = { + (SDLTest_TestCaseFp)clipboard_testSetPrimarySelectionText, "clipboard_testSetPrimarySelectionText", "Check call to SDL_SetPrimarySelectionText", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest7 = - { (SDLTest_TestCaseFp)clipboard_testClipboardTextFunctions, "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest7 = { + (SDLTest_TestCaseFp)clipboard_testClipboardTextFunctions, "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED +}; -static const SDLTest_TestCaseReference clipboardTest8 = - { (SDLTest_TestCaseFp)clipboard_testPrimarySelectionTextFunctions, "clipboard_testPrimarySelectionTextFunctions", "End-to-end test of SDL_xyzPrimarySelectionText functions", TEST_ENABLED }; +static const SDLTest_TestCaseReference clipboardTest8 = { + (SDLTest_TestCaseFp)clipboard_testPrimarySelectionTextFunctions, "clipboard_testPrimarySelectionTextFunctions", "End-to-end test of SDL_xyzPrimarySelectionText functions", TEST_ENABLED +}; /* Sequence of Clipboard test cases */ -static const SDLTest_TestCaseReference *clipboardTests[] = { +static const SDLTest_TestCaseReference *clipboardTests[] = { &clipboardTest1, &clipboardTest2, &clipboardTest3, &clipboardTest4, &clipboardTest5, &clipboardTest6, &clipboardTest7, &clipboardTest8, NULL }; diff --git a/modules/SDL2/test/testautomation_events.c b/modules/SDL2/test/testautomation_events.c index 20f2ea5..6d0f3ff 100644 --- a/modules/SDL2/test/testautomation_events.c +++ b/modules/SDL2/test/testautomation_events.c @@ -27,16 +27,16 @@ int _userdataValue2 = 2; /* Event filter that sets some flags and optionally checks userdata */ int SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event) { - _eventFilterCalled = 1; + _eventFilterCalled = 1; - if (_userdataCheck != 0) { - SDLTest_AssertCheck(userdata != NULL, "Check userdata pointer, expected: non-NULL, got: %s", (userdata != NULL) ? "non-NULL" : "NULL"); - if (userdata != NULL) { - SDLTest_AssertCheck(*(int *)userdata == _userdataValue, "Check userdata value, expected: %i, got: %i", _userdataValue, *(int *)userdata); - } - } + if (_userdataCheck != 0) { + SDLTest_AssertCheck(userdata != NULL, "Check userdata pointer, expected: non-NULL, got: %s", (userdata != NULL) ? "non-NULL" : "NULL"); + if (userdata != NULL) { + SDLTest_AssertCheck(*(int *)userdata == _userdataValue, "Check userdata value, expected: %i, got: %i", _userdataValue, *(int *)userdata); + } + } - return 0; + return 0; } /** @@ -45,34 +45,32 @@ int SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event) * @sa http://wiki.libsdl.org/SDL_PumpEvents * @sa http://wiki.libsdl.org/SDL_PollEvent */ -int -events_pushPumpAndPollUserevent(void *arg) +int events_pushPumpAndPollUserevent(void *arg) { - SDL_Event event1; - SDL_Event event2; - int result; - - /* Create user event */ - event1.type = SDL_USEREVENT; - event1.user.code = SDLTest_RandomSint32(); - event1.user.data1 = (void *)&_userdataValue1; - event1.user.data2 = (void *)&_userdataValue2; - - /* Push a user event onto the queue and force queue update */ - SDL_PushEvent(&event1); - SDLTest_AssertPass("Call to SDL_PushEvent()"); - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - - /* Poll for user event */ - result = SDL_PollEvent(&event2); - SDLTest_AssertPass("Call to SDL_PollEvent()"); - SDLTest_AssertCheck(result == 1, "Check result from SDL_PollEvent, expected: 1, got: %d", result); - - return TEST_COMPLETED; + SDL_Event event1; + SDL_Event event2; + int result; + + /* Create user event */ + event1.type = SDL_USEREVENT; + event1.user.code = SDLTest_RandomSint32(); + event1.user.data1 = (void *)&_userdataValue1; + event1.user.data2 = (void *)&_userdataValue2; + + /* Push a user event onto the queue and force queue update */ + SDL_PushEvent(&event1); + SDLTest_AssertPass("Call to SDL_PushEvent()"); + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + + /* Poll for user event */ + result = SDL_PollEvent(&event2); + SDLTest_AssertPass("Call to SDL_PollEvent()"); + SDLTest_AssertCheck(result == 1, "Check result from SDL_PollEvent, expected: 1, got: %d", result); + + return TEST_COMPLETED; } - /** * @brief Adds and deletes an event watch function with NULL userdata * @@ -80,47 +78,46 @@ events_pushPumpAndPollUserevent(void *arg) * @sa http://wiki.libsdl.org/SDL_DelEventWatch * */ -int -events_addDelEventWatch(void *arg) +int events_addDelEventWatch(void *arg) { - SDL_Event event; - - /* Create user event */ - event.type = SDL_USEREVENT; - event.user.code = SDLTest_RandomSint32(); - event.user.data1 = (void *)&_userdataValue1; - event.user.data2 = (void *)&_userdataValue2; - - /* Disable userdata check */ - _userdataCheck = 0; - - /* Reset event filter call tracker */ - _eventFilterCalled = 0; - - /* Add watch */ - SDL_AddEventWatch(_events_sampleNullEventFilter, NULL); - SDLTest_AssertPass("Call to SDL_AddEventWatch()"); - - /* Push a user event onto the queue and force queue update */ - SDL_PushEvent(&event); - SDLTest_AssertPass("Call to SDL_PushEvent()"); - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - SDLTest_AssertCheck(_eventFilterCalled == 1, "Check that event filter was called"); - - /* Delete watch */ - SDL_DelEventWatch(_events_sampleNullEventFilter, NULL); - SDLTest_AssertPass("Call to SDL_DelEventWatch()"); - - /* Push a user event onto the queue and force queue update */ - _eventFilterCalled = 0; - SDL_PushEvent(&event); - SDLTest_AssertPass("Call to SDL_PushEvent()"); - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - SDLTest_AssertCheck(_eventFilterCalled == 0, "Check that event filter was NOT called"); - - return TEST_COMPLETED; + SDL_Event event; + + /* Create user event */ + event.type = SDL_USEREVENT; + event.user.code = SDLTest_RandomSint32(); + event.user.data1 = (void *)&_userdataValue1; + event.user.data2 = (void *)&_userdataValue2; + + /* Disable userdata check */ + _userdataCheck = 0; + + /* Reset event filter call tracker */ + _eventFilterCalled = 0; + + /* Add watch */ + SDL_AddEventWatch(_events_sampleNullEventFilter, NULL); + SDLTest_AssertPass("Call to SDL_AddEventWatch()"); + + /* Push a user event onto the queue and force queue update */ + SDL_PushEvent(&event); + SDLTest_AssertPass("Call to SDL_PushEvent()"); + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + SDLTest_AssertCheck(_eventFilterCalled == 1, "Check that event filter was called"); + + /* Delete watch */ + SDL_DelEventWatch(_events_sampleNullEventFilter, NULL); + SDLTest_AssertPass("Call to SDL_DelEventWatch()"); + + /* Push a user event onto the queue and force queue update */ + _eventFilterCalled = 0; + SDL_PushEvent(&event); + SDLTest_AssertPass("Call to SDL_PushEvent()"); + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + SDLTest_AssertCheck(_eventFilterCalled == 0, "Check that event filter was NOT called"); + + return TEST_COMPLETED; } /** @@ -130,65 +127,66 @@ events_addDelEventWatch(void *arg) * @sa http://wiki.libsdl.org/SDL_DelEventWatch * */ -int -events_addDelEventWatchWithUserdata(void *arg) +int events_addDelEventWatchWithUserdata(void *arg) { - SDL_Event event; - - /* Create user event */ - event.type = SDL_USEREVENT; - event.user.code = SDLTest_RandomSint32(); - event.user.data1 = (void *)&_userdataValue1; - event.user.data2 = (void *)&_userdataValue2; - - /* Enable userdata check and set a value to check */ - _userdataCheck = 1; - _userdataValue = SDLTest_RandomIntegerInRange(-1024, 1024); - - /* Reset event filter call tracker */ - _eventFilterCalled = 0; - - /* Add watch */ - SDL_AddEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); - SDLTest_AssertPass("Call to SDL_AddEventWatch()"); - - /* Push a user event onto the queue and force queue update */ - SDL_PushEvent(&event); - SDLTest_AssertPass("Call to SDL_PushEvent()"); - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - SDLTest_AssertCheck(_eventFilterCalled == 1, "Check that event filter was called"); - - /* Delete watch */ - SDL_DelEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); - SDLTest_AssertPass("Call to SDL_DelEventWatch()"); - - /* Push a user event onto the queue and force queue update */ - _eventFilterCalled = 0; - SDL_PushEvent(&event); - SDLTest_AssertPass("Call to SDL_PushEvent()"); - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - SDLTest_AssertCheck(_eventFilterCalled == 0, "Check that event filter was NOT called"); - - return TEST_COMPLETED; + SDL_Event event; + + /* Create user event */ + event.type = SDL_USEREVENT; + event.user.code = SDLTest_RandomSint32(); + event.user.data1 = (void *)&_userdataValue1; + event.user.data2 = (void *)&_userdataValue2; + + /* Enable userdata check and set a value to check */ + _userdataCheck = 1; + _userdataValue = SDLTest_RandomIntegerInRange(-1024, 1024); + + /* Reset event filter call tracker */ + _eventFilterCalled = 0; + + /* Add watch */ + SDL_AddEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); + SDLTest_AssertPass("Call to SDL_AddEventWatch()"); + + /* Push a user event onto the queue and force queue update */ + SDL_PushEvent(&event); + SDLTest_AssertPass("Call to SDL_PushEvent()"); + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + SDLTest_AssertCheck(_eventFilterCalled == 1, "Check that event filter was called"); + + /* Delete watch */ + SDL_DelEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); + SDLTest_AssertPass("Call to SDL_DelEventWatch()"); + + /* Push a user event onto the queue and force queue update */ + _eventFilterCalled = 0; + SDL_PushEvent(&event); + SDLTest_AssertPass("Call to SDL_PushEvent()"); + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + SDLTest_AssertCheck(_eventFilterCalled == 0, "Check that event filter was NOT called"); + + return TEST_COMPLETED; } - /* ================= Test References ================== */ /* Events test cases */ -static const SDLTest_TestCaseReference eventsTest1 = - { (SDLTest_TestCaseFp)events_pushPumpAndPollUserevent, "events_pushPumpAndPollUserevent", "Pushes, pumps and polls a user event", TEST_ENABLED }; +static const SDLTest_TestCaseReference eventsTest1 = { + (SDLTest_TestCaseFp)events_pushPumpAndPollUserevent, "events_pushPumpAndPollUserevent", "Pushes, pumps and polls a user event", TEST_ENABLED +}; -static const SDLTest_TestCaseReference eventsTest2 = - { (SDLTest_TestCaseFp)events_addDelEventWatch, "events_addDelEventWatch", "Adds and deletes an event watch function with NULL userdata", TEST_ENABLED }; +static const SDLTest_TestCaseReference eventsTest2 = { + (SDLTest_TestCaseFp)events_addDelEventWatch, "events_addDelEventWatch", "Adds and deletes an event watch function with NULL userdata", TEST_ENABLED +}; -static const SDLTest_TestCaseReference eventsTest3 = - { (SDLTest_TestCaseFp)events_addDelEventWatchWithUserdata, "events_addDelEventWatchWithUserdata", "Adds and deletes an event watch function with userdata", TEST_ENABLED }; +static const SDLTest_TestCaseReference eventsTest3 = { + (SDLTest_TestCaseFp)events_addDelEventWatchWithUserdata, "events_addDelEventWatchWithUserdata", "Adds and deletes an event watch function with userdata", TEST_ENABLED +}; /* Sequence of Events test cases */ -static const SDLTest_TestCaseReference *eventsTests[] = { +static const SDLTest_TestCaseReference *eventsTests[] = { &eventsTest1, &eventsTest2, &eventsTest3, NULL }; diff --git a/modules/SDL2/test/testautomation_guid.c b/modules/SDL2/test/testautomation_guid.c index bab2b9f..cf99dea 100644 --- a/modules/SDL2/test/testautomation_guid.c +++ b/modules/SDL2/test/testautomation_guid.c @@ -5,36 +5,56 @@ #include "SDL.h" #include "SDL_test.h" +#ifdef HAVE_STDINT_H +#include +#endif + /* ================= Test Case Implementation ================== */ /* Helper functions */ #define NUM_TEST_GUIDS 5 -static struct { +#ifndef UINT64_C +#ifdef _MSC_VER +#define UINT64_C(x) x##ui64 +#elif defined(_LP64) +#define UINT64_C(x) x##UL +#else +#define UINT64_C(x) x##ULL +#endif +#endif + +static struct +{ char *str; Uint64 upper, lower; } test_guids[NUM_TEST_GUIDS] = { - { "0000000000000000" "ffffffffffffffff", - 0x0000000000000000, 0xfffffffffffffffflu }, - { "0011223344556677" "8091a2b3c4d5e6f0", - 0x0011223344556677lu, 0x8091a2b3c4d5e6f0lu }, - { "a011223344556677" "8091a2b3c4d5e6f0", - 0xa011223344556677lu, 0x8091a2b3c4d5e6f0lu }, - { "a011223344556677" "8091a2b3c4d5e6f1", - 0xa011223344556677lu, 0x8091a2b3c4d5e6f1lu }, - { "a011223344556677" "8191a2b3c4d5e6f0", - 0xa011223344556677lu, 0x8191a2b3c4d5e6f0lu }, + { "0000000000000000" + "ffffffffffffffff", + UINT64_C(0x0000000000000000), UINT64_C(0xffffffffffffffff) }, + { "0011223344556677" + "8091a2b3c4d5e6f0", + UINT64_C(0x0011223344556677), UINT64_C(0x8091a2b3c4d5e6f0) }, + { "a011223344556677" + "8091a2b3c4d5e6f0", + UINT64_C(0xa011223344556677), UINT64_C(0x8091a2b3c4d5e6f0) }, + { "a011223344556677" + "8091a2b3c4d5e6f1", + UINT64_C(0xa011223344556677), UINT64_C(0x8091a2b3c4d5e6f1) }, + { "a011223344556677" + "8191a2b3c4d5e6f0", + UINT64_C(0xa011223344556677), UINT64_C(0x8191a2b3c4d5e6f0) }, }; static void -upper_lower_to_bytestring(Uint8* out, Uint64 upper, Uint64 lower) +upper_lower_to_bytestring(Uint8 *out, Uint64 upper, Uint64 lower) { Uint64 values[2]; int i, k; values[0] = upper; - values [1] = lower; + values[1] = lower; for (i = 0; i < 2; ++i) { Uint64 v = values[i]; @@ -46,7 +66,6 @@ upper_lower_to_bytestring(Uint8* out, Uint64 upper, Uint64 lower) } } - /* Test case functions */ /** @@ -128,14 +147,16 @@ TestGuidToString(void *arg) /* ================= Test References ================== */ /* GUID routine test cases */ -static const SDLTest_TestCaseReference guidTest1 = - { (SDLTest_TestCaseFp)TestGuidFromString, "TestGuidFromString", "Call to SDL_GUIDFromString", TEST_ENABLED }; +static const SDLTest_TestCaseReference guidTest1 = { + (SDLTest_TestCaseFp)TestGuidFromString, "TestGuidFromString", "Call to SDL_GUIDFromString", TEST_ENABLED +}; -static const SDLTest_TestCaseReference guidTest2 = - { (SDLTest_TestCaseFp)TestGuidToString, "TestGuidToString", "Call to SDL_GUIDToString", TEST_ENABLED }; +static const SDLTest_TestCaseReference guidTest2 = { + (SDLTest_TestCaseFp)TestGuidToString, "TestGuidToString", "Call to SDL_GUIDToString", TEST_ENABLED +}; /* Sequence of GUID routine test cases */ -static const SDLTest_TestCaseReference *guidTests[] = { +static const SDLTest_TestCaseReference *guidTests[] = { &guidTest1, &guidTest2, NULL diff --git a/modules/SDL2/test/testautomation_hints.c b/modules/SDL2/test/testautomation_hints.c index c3f5ddf..dbd30e1 100644 --- a/modules/SDL2/test/testautomation_hints.c +++ b/modules/SDL2/test/testautomation_hints.c @@ -7,9 +7,7 @@ #include "SDL.h" #include "SDL_test.h" - -const char* _HintsEnum[] = - { +const char *_HintsEnum[] = { SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_FRAMEBUFFER_ACCELERATION, SDL_HINT_GAMECONTROLLERCONFIG, @@ -33,9 +31,8 @@ const char* _HintsEnum[] = SDL_HINT_VIDEO_WIN_D3DCOMPILER, SDL_HINT_VIDEO_X11_XRANDR, SDL_HINT_XINPUT_ENABLED, - }; -const char* _HintsVerbose[] = - { +}; +const char *_HintsVerbose[] = { "SDL_ACCELEROMETER_AS_JOYSTICK", "SDL_FRAMEBUFFER_ACCELERATION", "SDL_GAMECONTROLLERCONFIG", @@ -59,7 +56,7 @@ const char* _HintsVerbose[] = "SDL_VIDEO_WIN_D3DCOMPILER", "SDL_VIDEO_X11_XRANDR", "SDL_XINPUT_ENABLED" - }; +}; SDL_COMPILE_TIME_ASSERT(HintsEnum, SDL_arraysize(_HintsEnum) == SDL_arraysize(_HintsVerbose)); @@ -70,193 +67,193 @@ const int _numHintsEnum = SDL_arraysize(_HintsEnum); /** * @brief Call to SDL_GetHint */ -int -hints_getHint(void *arg) +int hints_getHint(void *arg) { - const char *result1; - const char *result2; - int i; - - for (i=0; i<_numHintsEnum; i++) { - result1 = SDL_GetHint(_HintsEnum[i]); - SDLTest_AssertPass("Call to SDL_GetHint(%s) - using define definition", (char*)_HintsEnum[i]); - result2 = SDL_GetHint(_HintsVerbose[i]); - SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", (char*)_HintsVerbose[i]); - SDLTest_AssertCheck( - (result1 == NULL && result2 == NULL) || (SDL_strcmp(result1, result2) == 0), - "Verify returned values are equal; got: result1='%s' result2='%s", - (result1 == NULL) ? "null" : result1, - (result2 == NULL) ? "null" : result2); - } + const char *result1; + const char *result2; + int i; + + for (i = 0; i < _numHintsEnum; i++) { + result1 = SDL_GetHint(_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using define definition", (char *)_HintsEnum[i]); + result2 = SDL_GetHint(_HintsVerbose[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", (char *)_HintsVerbose[i]); + SDLTest_AssertCheck( + (result1 == NULL && result2 == NULL) || (SDL_strcmp(result1, result2) == 0), + "Verify returned values are equal; got: result1='%s' result2='%s", + (result1 == NULL) ? "null" : result1, + (result2 == NULL) ? "null" : result2); + } - return TEST_COMPLETED; + return TEST_COMPLETED; } static void SDLCALL hints_testHintChanged(void *userdata, const char *name, const char *oldValue, const char *hint) { - *(char **)userdata = hint ? SDL_strdup(hint) : NULL; + *(char **)userdata = hint ? SDL_strdup(hint) : NULL; } /** * @brief Call to SDL_SetHint */ -int -hints_setHint(void *arg) +int hints_setHint(void *arg) { - const char *testHint = "SDL_AUTOMATED_TEST_HINT"; - const char *originalValue; - char *value; - const char *testValue; - char *callbackValue; - SDL_bool result; - int i, j; - - /* Create random values to set */ - value = SDLTest_RandomAsciiStringOfSize(10); - - for (i=0; i<_numHintsEnum; i++) { - /* Capture current value */ - originalValue = SDL_GetHint(_HintsEnum[i]); - SDLTest_AssertPass("Call to SDL_GetHint(%s)", _HintsEnum[i]); - - /* Copy the original value, since it will be freed when we set it again */ - originalValue = originalValue ? SDL_strdup(originalValue) : NULL; - - /* Set value (twice) */ - for (j=1; j<=2; j++) { - result = SDL_SetHint(_HintsEnum[i], value); - SDLTest_AssertPass("Call to SDL_SetHint(%s, %s) (iteration %i)", _HintsEnum[i], value, j); - SDLTest_AssertCheck( - result == SDL_TRUE || result == SDL_FALSE, - "Verify valid result was returned, got: %i", - (int)result); - testValue = SDL_GetHint(_HintsEnum[i]); - SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", _HintsVerbose[i]); - SDLTest_AssertCheck( - (SDL_strcmp(value, testValue) == 0), - "Verify returned value equals set value; got: testValue='%s' value='%s", - (testValue == NULL) ? "null" : testValue, - value); + const char *testHint = "SDL_AUTOMATED_TEST_HINT"; + const char *originalValue; + char *value; + const char *testValue; + char *callbackValue; + SDL_bool result; + int i, j; + + /* Create random values to set */ + value = SDLTest_RandomAsciiStringOfSize(10); + + for (i = 0; i < _numHintsEnum; i++) { + /* Capture current value */ + originalValue = SDL_GetHint(_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s)", _HintsEnum[i]); + + /* Copy the original value, since it will be freed when we set it again */ + originalValue = originalValue ? SDL_strdup(originalValue) : NULL; + + /* Set value (twice) */ + for (j = 1; j <= 2; j++) { + result = SDL_SetHint(_HintsEnum[i], value); + SDLTest_AssertPass("Call to SDL_SetHint(%s, %s) (iteration %i)", _HintsEnum[i], value, j); + SDLTest_AssertCheck( + result == SDL_TRUE || result == SDL_FALSE, + "Verify valid result was returned, got: %i", + (int)result); + testValue = SDL_GetHint(_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", _HintsVerbose[i]); + SDLTest_AssertCheck( + (SDL_strcmp(value, testValue) == 0), + "Verify returned value equals set value; got: testValue='%s' value='%s", + (testValue == NULL) ? "null" : testValue, + value); + } + + /* Reset original value */ + result = SDL_SetHint(_HintsEnum[i], originalValue); + SDLTest_AssertPass("Call to SDL_SetHint(%s, originalValue)", _HintsEnum[i]); + SDLTest_AssertCheck( + result == SDL_TRUE || result == SDL_FALSE, + "Verify valid result was returned, got: %i", + (int)result); + SDL_free((void *)originalValue); } - /* Reset original value */ - result = SDL_SetHint(_HintsEnum[i], originalValue); - SDLTest_AssertPass("Call to SDL_SetHint(%s, originalValue)", _HintsEnum[i]); + SDL_free(value); + + /* Set default value in environment */ + SDL_setenv(testHint, "original", 1); + + SDLTest_AssertPass("Call to SDL_GetHint() after saving and restoring hint"); + originalValue = SDL_GetHint(testHint); + value = (originalValue == NULL) ? NULL : SDL_strdup(originalValue); + SDL_SetHint(testHint, "temp"); + SDL_SetHint(testHint, value); + SDL_free(value); + testValue = SDL_GetHint(testHint); + SDLTest_AssertCheck( + testValue && SDL_strcmp(testValue, "original") == 0, + "testValue = %s, expected \"original\"", + testValue); + + SDLTest_AssertPass("Call to SDL_SetHintWithPriority(NULL, SDL_HINT_DEFAULT)"); + SDL_SetHintWithPriority(testHint, NULL, SDL_HINT_DEFAULT); + testValue = SDL_GetHint(testHint); + SDLTest_AssertCheck( + testValue && SDL_strcmp(testValue, "original") == 0, + "testValue = %s, expected \"original\"", + testValue); + + SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE)"); + SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); + testValue = SDL_GetHint(testHint); + SDLTest_AssertCheck( + testValue && SDL_strcmp(testValue, "temp") == 0, + "testValue = %s, expected \"temp\"", + testValue); + + SDLTest_AssertPass("Call to SDL_SetHintWithPriority(NULL, SDL_HINT_OVERRIDE)"); + SDL_SetHintWithPriority(testHint, NULL, SDL_HINT_OVERRIDE); + testValue = SDL_GetHint(testHint); + SDLTest_AssertCheck( + testValue == NULL, + "testValue = %s, expected NULL", + testValue); + + SDLTest_AssertPass("Call to SDL_ResetHint()"); + SDL_ResetHint(testHint); + testValue = SDL_GetHint(testHint); + SDLTest_AssertCheck( + testValue && SDL_strcmp(testValue, "original") == 0, + "testValue = %s, expected \"original\"", + testValue); + + /* Make sure callback functionality works past a reset */ + SDLTest_AssertPass("Call to SDL_AddHintCallback()"); + callbackValue = NULL; + SDL_AddHintCallback(testHint, hints_testHintChanged, &callbackValue); + SDLTest_AssertCheck( + callbackValue && SDL_strcmp(callbackValue, "original") == 0, + "callbackValue = %s, expected \"original\"", + callbackValue); + SDL_free(callbackValue); + + SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE), using callback"); + callbackValue = NULL; + SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); + SDLTest_AssertCheck( + callbackValue && SDL_strcmp(callbackValue, "temp") == 0, + "callbackValue = %s, expected \"temp\"", + callbackValue); + SDL_free(callbackValue); + + SDLTest_AssertPass("Call to SDL_ResetHint(), using callback"); + callbackValue = NULL; + SDL_ResetHint(testHint); + SDLTest_AssertCheck( + callbackValue && SDL_strcmp(callbackValue, "original") == 0, + "callbackValue = %s, expected \"original\"", + callbackValue); + + SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE), using callback after reset"); + callbackValue = NULL; + SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); + SDLTest_AssertCheck( + callbackValue && SDL_strcmp(callbackValue, "temp") == 0, + "callbackValue = %s, expected \"temp\"", + callbackValue); + SDL_free(callbackValue); + + SDLTest_AssertPass("Call to SDL_ResetHint(), after clearing callback"); + callbackValue = NULL; + SDL_DelHintCallback(testHint, hints_testHintChanged, &callbackValue); + SDL_ResetHint(testHint); SDLTest_AssertCheck( - result == SDL_TRUE || result == SDL_FALSE, - "Verify valid result was returned, got: %i", - (int)result); - SDL_free((void *)originalValue); - } - - SDL_free(value); - - /* Set default value in environment */ - SDL_setenv(testHint, "original", 1); - - SDLTest_AssertPass("Call to SDL_GetHint() after saving and restoring hint"); - originalValue = SDL_GetHint(testHint); - value = (originalValue == NULL) ? NULL : SDL_strdup(originalValue); - SDL_SetHint(testHint, "temp"); - SDL_SetHint(testHint, value); - SDL_free(value); - testValue = SDL_GetHint(testHint); - SDLTest_AssertCheck( - testValue && SDL_strcmp(testValue, "original") == 0, - "testValue = %s, expected \"original\"", - testValue); - - SDLTest_AssertPass("Call to SDL_SetHintWithPriority(NULL, SDL_HINT_DEFAULT)"); - SDL_SetHintWithPriority(testHint, NULL, SDL_HINT_DEFAULT); - testValue = SDL_GetHint(testHint); - SDLTest_AssertCheck( - testValue && SDL_strcmp(testValue, "original") == 0, - "testValue = %s, expected \"original\"", - testValue); - - SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE)"); - SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); - testValue = SDL_GetHint(testHint); - SDLTest_AssertCheck( - testValue && SDL_strcmp(testValue, "temp") == 0, - "testValue = %s, expected \"temp\"", - testValue); - - SDLTest_AssertPass("Call to SDL_SetHintWithPriority(NULL, SDL_HINT_OVERRIDE)"); - SDL_SetHintWithPriority(testHint, NULL, SDL_HINT_OVERRIDE); - testValue = SDL_GetHint(testHint); - SDLTest_AssertCheck( - testValue == NULL, - "testValue = %s, expected NULL", - testValue); - - SDLTest_AssertPass("Call to SDL_ResetHint()"); - SDL_ResetHint(testHint); - testValue = SDL_GetHint(testHint); - SDLTest_AssertCheck( - testValue && SDL_strcmp(testValue, "original") == 0, - "testValue = %s, expected \"original\"", - testValue); - - /* Make sure callback functionality works past a reset */ - SDLTest_AssertPass("Call to SDL_AddHintCallback()"); - callbackValue = NULL; - SDL_AddHintCallback(testHint, hints_testHintChanged, &callbackValue); - SDLTest_AssertCheck( - callbackValue && SDL_strcmp(callbackValue, "original") == 0, - "callbackValue = %s, expected \"original\"", - callbackValue); - SDL_free(callbackValue); - - SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE), using callback"); - callbackValue = NULL; - SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); - SDLTest_AssertCheck( - callbackValue && SDL_strcmp(callbackValue, "temp") == 0, - "callbackValue = %s, expected \"temp\"", - callbackValue); - SDL_free(callbackValue); - - SDLTest_AssertPass("Call to SDL_ResetHint(), using callback"); - callbackValue = NULL; - SDL_ResetHint(testHint); - SDLTest_AssertCheck( - callbackValue && SDL_strcmp(callbackValue, "original") == 0, - "callbackValue = %s, expected \"original\"", - callbackValue); - - SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE), using callback after reset"); - callbackValue = NULL; - SDL_SetHintWithPriority(testHint, "temp", SDL_HINT_OVERRIDE); - SDLTest_AssertCheck( - callbackValue && SDL_strcmp(callbackValue, "temp") == 0, - "callbackValue = %s, expected \"temp\"", - callbackValue); - SDL_free(callbackValue); - - SDLTest_AssertPass("Call to SDL_ResetHint(), after clearing callback"); - callbackValue = NULL; - SDL_DelHintCallback(testHint, hints_testHintChanged, &callbackValue); - SDL_ResetHint(testHint); - SDLTest_AssertCheck( - callbackValue == NULL, - "callbackValue = %s, expected \"(null)\"", - callbackValue); - - return TEST_COMPLETED; + callbackValue == NULL, + "callbackValue = %s, expected \"(null)\"", + callbackValue); + + return TEST_COMPLETED; } /* ================= Test References ================== */ /* Hints test cases */ -static const SDLTest_TestCaseReference hintsTest1 = - { (SDLTest_TestCaseFp)hints_getHint, "hints_getHint", "Call to SDL_GetHint", TEST_ENABLED }; +static const SDLTest_TestCaseReference hintsTest1 = { + (SDLTest_TestCaseFp)hints_getHint, "hints_getHint", "Call to SDL_GetHint", TEST_ENABLED +}; -static const SDLTest_TestCaseReference hintsTest2 = - { (SDLTest_TestCaseFp)hints_setHint, "hints_setHint", "Call to SDL_SetHint", TEST_ENABLED }; +static const SDLTest_TestCaseReference hintsTest2 = { + (SDLTest_TestCaseFp)hints_setHint, "hints_setHint", "Call to SDL_SetHint", TEST_ENABLED +}; /* Sequence of Hints test cases */ -static const SDLTest_TestCaseReference *hintsTests[] = { +static const SDLTest_TestCaseReference *hintsTests[] = { &hintsTest1, &hintsTest2, NULL }; diff --git a/modules/SDL2/test/testautomation_joystick.c b/modules/SDL2/test/testautomation_joystick.c index 3baa4ee..8104c65 100644 --- a/modules/SDL2/test/testautomation_joystick.c +++ b/modules/SDL2/test/testautomation_joystick.c @@ -72,11 +72,12 @@ TestVirtualJoystick(void *arg) /* ================= Test References ================== */ /* Joystick routine test cases */ -static const SDLTest_TestCaseReference joystickTest1 = - { (SDLTest_TestCaseFp)TestVirtualJoystick, "TestVirtualJoystick", "Test virtual joystick functionality", TEST_ENABLED }; +static const SDLTest_TestCaseReference joystickTest1 = { + (SDLTest_TestCaseFp)TestVirtualJoystick, "TestVirtualJoystick", "Test virtual joystick functionality", TEST_ENABLED +}; /* Sequence of Joystick routine test cases */ -static const SDLTest_TestCaseReference *joystickTests[] = { +static const SDLTest_TestCaseReference *joystickTests[] = { &joystickTest1, NULL }; diff --git a/modules/SDL2/test/testautomation_keyboard.c b/modules/SDL2/test/testautomation_keyboard.c index a83f536..0d459d0 100644 --- a/modules/SDL2/test/testautomation_keyboard.c +++ b/modules/SDL2/test/testautomation_keyboard.c @@ -18,25 +18,24 @@ * * @sa http://wiki.libsdl.org/SDL_GetKeyboardState */ -int -keyboard_getKeyboardState(void *arg) +int keyboard_getKeyboardState(void *arg) { - int numkeys; - Uint8 *state; - - /* Case where numkeys pointer is NULL */ - state = (Uint8 *)SDL_GetKeyboardState(NULL); - SDLTest_AssertPass("Call to SDL_GetKeyboardState(NULL)"); - SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); - - /* Case where numkeys pointer is not NULL */ - numkeys = -1; - state = (Uint8 *)SDL_GetKeyboardState(&numkeys); - SDLTest_AssertPass("Call to SDL_GetKeyboardState(&numkeys)"); - SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); - SDLTest_AssertCheck(numkeys >= 0, "Validate that value of numkeys is >= 0, got: %i", numkeys); - - return TEST_COMPLETED; + int numkeys; + Uint8 *state; + + /* Case where numkeys pointer is NULL */ + state = (Uint8 *)SDL_GetKeyboardState(NULL); + SDLTest_AssertPass("Call to SDL_GetKeyboardState(NULL)"); + SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); + + /* Case where numkeys pointer is not NULL */ + numkeys = -1; + state = (Uint8 *)SDL_GetKeyboardState(&numkeys); + SDLTest_AssertPass("Call to SDL_GetKeyboardState(&numkeys)"); + SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); + SDLTest_AssertCheck(numkeys >= 0, "Validate that value of numkeys is >= 0, got: %i", numkeys); + + return TEST_COMPLETED; } /** @@ -44,14 +43,13 @@ keyboard_getKeyboardState(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetKeyboardFocus */ -int -keyboard_getKeyboardFocus(void *arg) +int keyboard_getKeyboardFocus(void *arg) { - /* Call, but ignore return value */ - SDL_GetKeyboardFocus(); - SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()"); + /* Call, but ignore return value */ + SDL_GetKeyboardFocus(); + SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -59,66 +57,64 @@ keyboard_getKeyboardFocus(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetKeyFromName */ -int -keyboard_getKeyFromName(void *arg) +int keyboard_getKeyFromName(void *arg) { - SDL_Keycode result; - - /* Case where Key is known, 1 character input */ - result = SDL_GetKeyFromName("A"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/single)"); - SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result); - - /* Case where Key is known, 2 character input */ - result = SDL_GetKeyFromName("F1"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/double)"); - SDLTest_AssertCheck(result == SDLK_F1, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_F1, result); - - /* Case where Key is known, 3 character input */ - result = SDL_GetKeyFromName("End"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/triple)"); - SDLTest_AssertCheck(result == SDLK_END, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_END, result); - - /* Case where Key is known, 4 character input */ - result = SDL_GetKeyFromName("Find"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/quad)"); - SDLTest_AssertCheck(result == SDLK_FIND, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_FIND, result); - - /* Case where Key is known, multiple character input */ - result = SDL_GetKeyFromName("AudioStop"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/multi)"); - SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_AUDIOSTOP, result); - - /* Case where Key is unknown */ - result = SDL_GetKeyFromName("NotThere"); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(unknown)"); - SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); - - /* Case where input is NULL/invalid */ - result = SDL_GetKeyFromName(NULL); - SDLTest_AssertPass("Call to SDL_GetKeyFromName(NULL)"); - SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); - - return TEST_COMPLETED; + SDL_Keycode result; + + /* Case where Key is known, 1 character input */ + result = SDL_GetKeyFromName("A"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/single)"); + SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result); + + /* Case where Key is known, 2 character input */ + result = SDL_GetKeyFromName("F1"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/double)"); + SDLTest_AssertCheck(result == SDLK_F1, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_F1, result); + + /* Case where Key is known, 3 character input */ + result = SDL_GetKeyFromName("End"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/triple)"); + SDLTest_AssertCheck(result == SDLK_END, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_END, result); + + /* Case where Key is known, 4 character input */ + result = SDL_GetKeyFromName("Find"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/quad)"); + SDLTest_AssertCheck(result == SDLK_FIND, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_FIND, result); + + /* Case where Key is known, multiple character input */ + result = SDL_GetKeyFromName("AudioStop"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/multi)"); + SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_AUDIOSTOP, result); + + /* Case where Key is unknown */ + result = SDL_GetKeyFromName("NotThere"); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(unknown)"); + SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); + + /* Case where input is NULL/invalid */ + result = SDL_GetKeyFromName(NULL); + SDLTest_AssertPass("Call to SDL_GetKeyFromName(NULL)"); + SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); + + return TEST_COMPLETED; } /* * Local helper to check for the invalid scancode error message */ -void -_checkInvalidScancodeError() +void _checkInvalidScancodeError() { - const char *expectedError = "Parameter 'scancode' is invalid"; - const char *error; - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - } + const char *expectedError = "Parameter 'scancode' is invalid"; + const char *error; + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + } } /** @@ -126,38 +122,37 @@ _checkInvalidScancodeError() * * @sa http://wiki.libsdl.org/SDL_GetKeyFromScancode */ -int -keyboard_getKeyFromScancode(void *arg) +int keyboard_getKeyFromScancode(void *arg) { - SDL_Keycode result; - - /* Case where input is valid */ - result = SDL_GetKeyFromScancode(SDL_SCANCODE_A); - SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(valid)"); - SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result); - - /* Case where input is zero */ - result = SDL_GetKeyFromScancode(0); - SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(0)"); - SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); - - /* Clear error message */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - /* Case where input is invalid (too small) */ - result = SDL_GetKeyFromScancode(-999); - SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(-999)"); - SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); - _checkInvalidScancodeError(); - - /* Case where input is invalid (too big) */ - result = SDL_GetKeyFromScancode(999); - SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(999)"); - SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); - _checkInvalidScancodeError(); - - return TEST_COMPLETED; + SDL_Keycode result; + + /* Case where input is valid */ + result = SDL_GetKeyFromScancode(SDL_SCANCODE_A); + SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(valid)"); + SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result); + + /* Case where input is zero */ + result = SDL_GetKeyFromScancode(0); + SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(0)"); + SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); + + /* Clear error message */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Case where input is invalid (too small) */ + result = SDL_GetKeyFromScancode(-999); + SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(-999)"); + SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); + _checkInvalidScancodeError(); + + /* Case where input is invalid (too big) */ + result = SDL_GetKeyFromScancode(999); + SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(999)"); + SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result); + _checkInvalidScancodeError(); + + return TEST_COMPLETED; } /** @@ -165,55 +160,54 @@ keyboard_getKeyFromScancode(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetKeyName */ -int -keyboard_getKeyName(void *arg) +int keyboard_getKeyName(void *arg) { - const char *result; - const char *expected; - - /* Case where key has a 1 character name */ - expected = "3"; - result = (char *)SDL_GetKeyName(SDLK_3); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - /* Case where key has a 2 character name */ - expected = "F1"; - result = (char *)SDL_GetKeyName(SDLK_F1); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - /* Case where key has a 3 character name */ - expected = "Cut"; - result = (char *)SDL_GetKeyName(SDLK_CUT); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - /* Case where key has a 4 character name */ - expected = "Down"; - result = (char *)SDL_GetKeyName(SDLK_DOWN); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - /* Case where key has a N character name */ - expected = "BrightnessUp"; - result = (char *)SDL_GetKeyName(SDLK_BRIGHTNESSUP); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - /* Case where key has a N character name with space */ - expected = "Keypad MemStore"; - result = (char *)SDL_GetKeyName(SDLK_KP_MEMSTORE); - SDLTest_AssertPass("Call to SDL_GetKeyName()"); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); - - return TEST_COMPLETED; + const char *result; + const char *expected; + + /* Case where key has a 1 character name */ + expected = "3"; + result = (char *)SDL_GetKeyName(SDLK_3); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + /* Case where key has a 2 character name */ + expected = "F1"; + result = (char *)SDL_GetKeyName(SDLK_F1); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + /* Case where key has a 3 character name */ + expected = "Cut"; + result = (char *)SDL_GetKeyName(SDLK_CUT); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + /* Case where key has a 4 character name */ + expected = "Down"; + result = (char *)SDL_GetKeyName(SDLK_DOWN); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + /* Case where key has a N character name */ + expected = "BrightnessUp"; + result = (char *)SDL_GetKeyName(SDLK_BRIGHTNESSUP); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + /* Case where key has a N character name with space */ + expected = "Keypad MemStore"; + result = (char *)SDL_GetKeyName(SDLK_KP_MEMSTORE); + SDLTest_AssertPass("Call to SDL_GetKeyName()"); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result); + + return TEST_COMPLETED; } /** @@ -221,26 +215,25 @@ keyboard_getKeyName(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetScancodeName */ -int -keyboard_getScancodeNameNegative(void *arg) +int keyboard_getScancodeNameNegative(void *arg) { - SDL_Scancode scancode; - const char *result; - const char *expected = ""; - - /* Clear error message */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - /* Out-of-bounds scancode */ - scancode = (SDL_Scancode)SDL_NUM_SCANCODES; - result = (char *)SDL_GetScancodeName(scancode); - SDLTest_AssertPass("Call to SDL_GetScancodeName(%d/large)", scancode); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); - _checkInvalidScancodeError(); - - return TEST_COMPLETED; + SDL_Scancode scancode; + const char *result; + const char *expected = ""; + + /* Clear error message */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Out-of-bounds scancode */ + scancode = (SDL_Scancode)SDL_NUM_SCANCODES; + result = (char *)SDL_GetScancodeName(scancode); + SDLTest_AssertPass("Call to SDL_GetScancodeName(%d/large)", scancode); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); + _checkInvalidScancodeError(); + + return TEST_COMPLETED; } /** @@ -248,36 +241,35 @@ keyboard_getScancodeNameNegative(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetKeyName */ -int -keyboard_getKeyNameNegative(void *arg) +int keyboard_getKeyNameNegative(void *arg) { - SDL_Keycode keycode; - const char *result; - const char *expected = ""; - - /* Unknown keycode */ - keycode = SDLK_UNKNOWN; - result = (char *)SDL_GetKeyName(keycode); - SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/unknown)", keycode); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); - - /* Clear error message */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - /* Negative keycode */ - keycode = (SDL_Keycode)SDLTest_RandomIntegerInRange(-255, -1); - result = (char *)SDL_GetKeyName(keycode); - SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/negative)", keycode); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); - _checkInvalidScancodeError(); - - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - return TEST_COMPLETED; + SDL_Keycode keycode; + const char *result; + const char *expected = ""; + + /* Unknown keycode */ + keycode = SDLK_UNKNOWN; + result = (char *)SDL_GetKeyName(keycode); + SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/unknown)", keycode); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); + + /* Clear error message */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Negative keycode */ + keycode = (SDL_Keycode)SDLTest_RandomIntegerInRange(-255, -1); + result = (char *)SDL_GetKeyName(keycode); + SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/negative)", keycode); + SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); + SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); + _checkInvalidScancodeError(); + + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + return TEST_COMPLETED; } /** @@ -286,106 +278,103 @@ keyboard_getKeyNameNegative(void *arg) * @sa http://wiki.libsdl.org/SDL_GetModState * @sa http://wiki.libsdl.org/SDL_SetModState */ -int -keyboard_getSetModState(void *arg) +int keyboard_getSetModState(void *arg) { - SDL_Keymod result; - SDL_Keymod currentState; - SDL_Keymod newState; - SDL_Keymod allStates = - KMOD_NONE | - KMOD_LSHIFT | - KMOD_RSHIFT | - KMOD_LCTRL | - KMOD_RCTRL | - KMOD_LALT | - KMOD_RALT | - KMOD_LGUI | - KMOD_RGUI | - KMOD_NUM | - KMOD_CAPS | - KMOD_MODE | - KMOD_SCROLL; - - /* Get state, cache for later reset */ - result = SDL_GetModState(); - SDLTest_AssertPass("Call to SDL_GetModState()"); - SDLTest_AssertCheck(/*result >= 0 &&*/ result <= allStates, "Verify result from call is valid, expected: 0 <= result <= %i, got: %i", allStates, result); - currentState = result; - - /* Set random state */ - newState = SDLTest_RandomIntegerInRange(0, allStates); - SDL_SetModState(newState); - SDLTest_AssertPass("Call to SDL_SetModState(%i)", newState); - result = SDL_GetModState(); - SDLTest_AssertPass("Call to SDL_GetModState()"); - SDLTest_AssertCheck(result == newState, "Verify result from call is valid, expected: %i, got: %i", newState, result); - - /* Set zero state */ - SDL_SetModState(0); - SDLTest_AssertPass("Call to SDL_SetModState(0)"); - result = SDL_GetModState(); - SDLTest_AssertPass("Call to SDL_GetModState()"); - SDLTest_AssertCheck(result == 0, "Verify result from call is valid, expected: 0, got: %i", result); - - /* Revert back to cached current state if needed */ - if (currentState != 0) { - SDL_SetModState(currentState); - SDLTest_AssertPass("Call to SDL_SetModState(%i)", currentState); - result = SDL_GetModState(); - SDLTest_AssertPass("Call to SDL_GetModState()"); - SDLTest_AssertCheck(result == currentState, "Verify result from call is valid, expected: %i, got: %i", currentState, result); - } - - return TEST_COMPLETED; + SDL_Keymod result; + SDL_Keymod currentState; + SDL_Keymod newState; + SDL_Keymod allStates = + KMOD_NONE | + KMOD_LSHIFT | + KMOD_RSHIFT | + KMOD_LCTRL | + KMOD_RCTRL | + KMOD_LALT | + KMOD_RALT | + KMOD_LGUI | + KMOD_RGUI | + KMOD_NUM | + KMOD_CAPS | + KMOD_MODE | + KMOD_SCROLL; + + /* Get state, cache for later reset */ + result = SDL_GetModState(); + SDLTest_AssertPass("Call to SDL_GetModState()"); + SDLTest_AssertCheck(/*result >= 0 &&*/ result <= allStates, "Verify result from call is valid, expected: 0 <= result <= %i, got: %i", allStates, result); + currentState = result; + + /* Set random state */ + newState = SDLTest_RandomIntegerInRange(0, allStates); + SDL_SetModState(newState); + SDLTest_AssertPass("Call to SDL_SetModState(%i)", newState); + result = SDL_GetModState(); + SDLTest_AssertPass("Call to SDL_GetModState()"); + SDLTest_AssertCheck(result == newState, "Verify result from call is valid, expected: %i, got: %i", newState, result); + + /* Set zero state */ + SDL_SetModState(0); + SDLTest_AssertPass("Call to SDL_SetModState(0)"); + result = SDL_GetModState(); + SDLTest_AssertPass("Call to SDL_GetModState()"); + SDLTest_AssertCheck(result == 0, "Verify result from call is valid, expected: 0, got: %i", result); + + /* Revert back to cached current state if needed */ + if (currentState != 0) { + SDL_SetModState(currentState); + SDLTest_AssertPass("Call to SDL_SetModState(%i)", currentState); + result = SDL_GetModState(); + SDLTest_AssertPass("Call to SDL_GetModState()"); + SDLTest_AssertCheck(result == currentState, "Verify result from call is valid, expected: %i, got: %i", currentState, result); + } + + return TEST_COMPLETED; } - /** * @brief Check call to SDL_StartTextInput and SDL_StopTextInput * * @sa http://wiki.libsdl.org/SDL_StartTextInput * @sa http://wiki.libsdl.org/SDL_StopTextInput */ -int -keyboard_startStopTextInput(void *arg) +int keyboard_startStopTextInput(void *arg) { - /* Start-Stop */ - SDL_StartTextInput(); - SDLTest_AssertPass("Call to SDL_StartTextInput()"); - SDL_StopTextInput(); - SDLTest_AssertPass("Call to SDL_StopTextInput()"); - - /* Stop-Start */ - SDL_StartTextInput(); - SDLTest_AssertPass("Call to SDL_StartTextInput()"); - - /* Start-Start */ - SDL_StartTextInput(); - SDLTest_AssertPass("Call to SDL_StartTextInput()"); - - /* Stop-Stop */ - SDL_StopTextInput(); - SDLTest_AssertPass("Call to SDL_StopTextInput()"); - SDL_StopTextInput(); - SDLTest_AssertPass("Call to SDL_StopTextInput()"); - - return TEST_COMPLETED; + /* Start-Stop */ + SDL_StartTextInput(); + SDLTest_AssertPass("Call to SDL_StartTextInput()"); + SDL_StopTextInput(); + SDLTest_AssertPass("Call to SDL_StopTextInput()"); + + /* Stop-Start */ + SDL_StartTextInput(); + SDLTest_AssertPass("Call to SDL_StartTextInput()"); + + /* Start-Start */ + SDL_StartTextInput(); + SDLTest_AssertPass("Call to SDL_StartTextInput()"); + + /* Stop-Stop */ + SDL_StopTextInput(); + SDLTest_AssertPass("Call to SDL_StopTextInput()"); + SDL_StopTextInput(); + SDLTest_AssertPass("Call to SDL_StopTextInput()"); + + return TEST_COMPLETED; } /* Internal function to test SDL_SetTextInputRect */ void _testSetTextInputRect(SDL_Rect refRect) { - SDL_Rect testRect; - - testRect = refRect; - SDL_SetTextInputRect(&testRect); - SDLTest_AssertPass("Call to SDL_SetTextInputRect with refRect(x:%i,y:%i,w:%i,h:%i)", refRect.x, refRect.y, refRect.w, refRect.h); - SDLTest_AssertCheck( - (refRect.x == testRect.x) && (refRect.y == testRect.y) && (refRect.w == testRect.w) && (refRect.h == testRect.h), - "Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i", - refRect.x, refRect.y, refRect.w, refRect.h, - testRect.x, testRect.y, testRect.w, testRect.h); + SDL_Rect testRect; + + testRect = refRect; + SDL_SetTextInputRect(&testRect); + SDLTest_AssertPass("Call to SDL_SetTextInputRect with refRect(x:%i,y:%i,w:%i,h:%i)", refRect.x, refRect.y, refRect.w, refRect.h); + SDLTest_AssertCheck( + (refRect.x == testRect.x) && (refRect.y == testRect.y) && (refRect.w == testRect.w) && (refRect.h == testRect.h), + "Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i", + refRect.x, refRect.y, refRect.w, refRect.h, + testRect.x, testRect.y, testRect.w, testRect.h); } /** @@ -393,79 +382,78 @@ void _testSetTextInputRect(SDL_Rect refRect) * * @sa http://wiki.libsdl.org/SDL_SetTextInputRect */ -int -keyboard_setTextInputRect(void *arg) +int keyboard_setTextInputRect(void *arg) { - SDL_Rect refRect; - - /* Normal visible refRect, origin inside */ - refRect.x = SDLTest_RandomIntegerInRange(1, 50); - refRect.y = SDLTest_RandomIntegerInRange(1, 50); - refRect.w = SDLTest_RandomIntegerInRange(10, 50); - refRect.h = SDLTest_RandomIntegerInRange(10, 50); - _testSetTextInputRect(refRect); - - /* Normal visible refRect, origin 0,0 */ - refRect.x = 0; - refRect.y = 0; - refRect.w = SDLTest_RandomIntegerInRange(10, 50); - refRect.h = SDLTest_RandomIntegerInRange(10, 50); - _testSetTextInputRect(refRect); - - /* 1Pixel refRect */ - refRect.x = SDLTest_RandomIntegerInRange(10, 50); - refRect.y = SDLTest_RandomIntegerInRange(10, 50); - refRect.w = 1; - refRect.h = 1; - _testSetTextInputRect(refRect); - - /* 0pixel refRect */ - refRect.x = 1; - refRect.y = 1; - refRect.w = 1; - refRect.h = 0; - _testSetTextInputRect(refRect); - - /* 0pixel refRect */ - refRect.x = 1; - refRect.y = 1; - refRect.w = 0; - refRect.h = 1; - _testSetTextInputRect(refRect); - - /* 0pixel refRect */ - refRect.x = 1; - refRect.y = 1; - refRect.w = 0; - refRect.h = 0; - _testSetTextInputRect(refRect); - - /* 0pixel refRect */ - refRect.x = 0; - refRect.y = 0; - refRect.w = 0; - refRect.h = 0; - _testSetTextInputRect(refRect); - - /* negative refRect */ - refRect.x = SDLTest_RandomIntegerInRange(-200, -100); - refRect.y = SDLTest_RandomIntegerInRange(-200, -100); - refRect.w = 50; - refRect.h = 50; - _testSetTextInputRect(refRect); - - /* oversized refRect */ - refRect.x = SDLTest_RandomIntegerInRange(1, 50); - refRect.y = SDLTest_RandomIntegerInRange(1, 50); - refRect.w = 5000; - refRect.h = 5000; - _testSetTextInputRect(refRect); - - /* NULL refRect */ - SDL_SetTextInputRect(NULL); - SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)"); - - return TEST_COMPLETED; + SDL_Rect refRect; + + /* Normal visible refRect, origin inside */ + refRect.x = SDLTest_RandomIntegerInRange(1, 50); + refRect.y = SDLTest_RandomIntegerInRange(1, 50); + refRect.w = SDLTest_RandomIntegerInRange(10, 50); + refRect.h = SDLTest_RandomIntegerInRange(10, 50); + _testSetTextInputRect(refRect); + + /* Normal visible refRect, origin 0,0 */ + refRect.x = 0; + refRect.y = 0; + refRect.w = SDLTest_RandomIntegerInRange(10, 50); + refRect.h = SDLTest_RandomIntegerInRange(10, 50); + _testSetTextInputRect(refRect); + + /* 1Pixel refRect */ + refRect.x = SDLTest_RandomIntegerInRange(10, 50); + refRect.y = SDLTest_RandomIntegerInRange(10, 50); + refRect.w = 1; + refRect.h = 1; + _testSetTextInputRect(refRect); + + /* 0pixel refRect */ + refRect.x = 1; + refRect.y = 1; + refRect.w = 1; + refRect.h = 0; + _testSetTextInputRect(refRect); + + /* 0pixel refRect */ + refRect.x = 1; + refRect.y = 1; + refRect.w = 0; + refRect.h = 1; + _testSetTextInputRect(refRect); + + /* 0pixel refRect */ + refRect.x = 1; + refRect.y = 1; + refRect.w = 0; + refRect.h = 0; + _testSetTextInputRect(refRect); + + /* 0pixel refRect */ + refRect.x = 0; + refRect.y = 0; + refRect.w = 0; + refRect.h = 0; + _testSetTextInputRect(refRect); + + /* negative refRect */ + refRect.x = SDLTest_RandomIntegerInRange(-200, -100); + refRect.y = SDLTest_RandomIntegerInRange(-200, -100); + refRect.w = 50; + refRect.h = 50; + _testSetTextInputRect(refRect); + + /* oversized refRect */ + refRect.x = SDLTest_RandomIntegerInRange(1, 50); + refRect.y = SDLTest_RandomIntegerInRange(1, 50); + refRect.w = 5000; + refRect.h = 5000; + _testSetTextInputRect(refRect); + + /* NULL refRect */ + SDL_SetTextInputRect(NULL); + SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)"); + + return TEST_COMPLETED; } /** @@ -473,37 +461,36 @@ keyboard_setTextInputRect(void *arg) * * @sa http://wiki.libsdl.org/SDL_SetTextInputRect */ -int -keyboard_setTextInputRectNegative(void *arg) +int keyboard_setTextInputRectNegative(void *arg) { - /* Some platforms set also an error message; prepare for checking it */ + /* Some platforms set also an error message; prepare for checking it */ #if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA - const char *expectedError = "Parameter 'rect' is invalid"; - const char *error; + const char *expectedError = "Parameter 'rect' is invalid"; + const char *error; - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); #endif - /* NULL refRect */ - SDL_SetTextInputRect(NULL); - SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)"); + /* NULL refRect */ + SDL_SetTextInputRect(NULL); + SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)"); - /* Some platforms set also an error message; so check it */ + /* Some platforms set also an error message; so check it */ #if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - } - - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + } + + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); #endif - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -512,22 +499,21 @@ keyboard_setTextInputRectNegative(void *arg) * @sa http://wiki.libsdl.org/SDL_GetScancodeFromKey * @sa http://wiki.libsdl.org/SDL_Keycode */ -int -keyboard_getScancodeFromKey(void *arg) +int keyboard_getScancodeFromKey(void *arg) { - SDL_Scancode scancode; + SDL_Scancode scancode; - /* Regular key */ - scancode = SDL_GetScancodeFromKey(SDLK_4); - SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_4)"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromKey, expected: %i, got: %i", SDL_SCANCODE_4, scancode); + /* Regular key */ + scancode = SDL_GetScancodeFromKey(SDLK_4); + SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_4)"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromKey, expected: %i, got: %i", SDL_SCANCODE_4, scancode); - /* Virtual key */ - scancode = SDL_GetScancodeFromKey(SDLK_PLUS); - SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_PLUS)"); - SDLTest_AssertCheck(scancode == 0, "Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i", scancode); + /* Virtual key */ + scancode = SDL_GetScancodeFromKey(SDLK_PLUS); + SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_PLUS)"); + SDLTest_AssertCheck(scancode == 0, "Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i", scancode); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -536,71 +522,69 @@ keyboard_getScancodeFromKey(void *arg) * @sa http://wiki.libsdl.org/SDL_GetScancodeFromName * @sa http://wiki.libsdl.org/SDL_Keycode */ -int -keyboard_getScancodeFromName(void *arg) +int keyboard_getScancodeFromName(void *arg) { - SDL_Scancode scancode; - - /* Regular key, 1 character, first name in list */ - scancode = SDL_GetScancodeFromName("A"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('A')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_A, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_A, scancode); - - /* Regular key, 1 character */ - scancode = SDL_GetScancodeFromName("4"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('4')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_4, scancode); - - /* Regular key, 2 characters */ - scancode = SDL_GetScancodeFromName("F1"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('F1')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_F1, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_F1, scancode); - - /* Regular key, 3 characters */ - scancode = SDL_GetScancodeFromName("End"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('End')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_END, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_END, scancode); - - /* Regular key, 4 characters */ - scancode = SDL_GetScancodeFromName("Find"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Find')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_FIND, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_FIND, scancode); - - /* Regular key, several characters */ - scancode = SDL_GetScancodeFromName("Backspace"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Backspace')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_BACKSPACE, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_BACKSPACE, scancode); - - /* Regular key, several characters with space */ - scancode = SDL_GetScancodeFromName("Keypad Enter"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Keypad Enter')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_KP_ENTER, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_KP_ENTER, scancode); - - /* Regular key, last name in list */ - scancode = SDL_GetScancodeFromName("Sleep"); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Sleep')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_SLEEP, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_SLEEP, scancode); - - return TEST_COMPLETED; + SDL_Scancode scancode; + + /* Regular key, 1 character, first name in list */ + scancode = SDL_GetScancodeFromName("A"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('A')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_A, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_A, scancode); + + /* Regular key, 1 character */ + scancode = SDL_GetScancodeFromName("4"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('4')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_4, scancode); + + /* Regular key, 2 characters */ + scancode = SDL_GetScancodeFromName("F1"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('F1')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_F1, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_F1, scancode); + + /* Regular key, 3 characters */ + scancode = SDL_GetScancodeFromName("End"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('End')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_END, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_END, scancode); + + /* Regular key, 4 characters */ + scancode = SDL_GetScancodeFromName("Find"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Find')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_FIND, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_FIND, scancode); + + /* Regular key, several characters */ + scancode = SDL_GetScancodeFromName("Backspace"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Backspace')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_BACKSPACE, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_BACKSPACE, scancode); + + /* Regular key, several characters with space */ + scancode = SDL_GetScancodeFromName("Keypad Enter"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Keypad Enter')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_KP_ENTER, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_KP_ENTER, scancode); + + /* Regular key, last name in list */ + scancode = SDL_GetScancodeFromName("Sleep"); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Sleep')"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_SLEEP, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_SLEEP, scancode); + + return TEST_COMPLETED; } /* * Local helper to check for the invalid scancode error message */ -void -_checkInvalidNameError() +void _checkInvalidNameError() { - const char *expectedError = "Parameter 'name' is invalid"; - const char *error; - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - } + const char *expectedError = "Parameter 'name' is invalid"; + const char *error; + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + } } /** @@ -609,94 +593,105 @@ _checkInvalidNameError() * @sa http://wiki.libsdl.org/SDL_GetScancodeFromName * @sa http://wiki.libsdl.org/SDL_Keycode */ -int -keyboard_getScancodeFromNameNegative(void *arg) +int keyboard_getScancodeFromNameNegative(void *arg) { - const char *name; - SDL_Scancode scancode; - - /* Clear error message */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - - /* Random string input */ - name = SDLTest_RandomAsciiStringOfSize(32); - SDLTest_Assert(name != NULL, "Check that random name is not NULL"); - if (name == NULL) { - return TEST_ABORTED; - } - scancode = SDL_GetScancodeFromName(name); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName('%s')", name); - SDL_free((void *)name); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); - _checkInvalidNameError(); - - /* Zero length string input */ - name = ""; - scancode = SDL_GetScancodeFromName((const char *)name); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName(NULL)"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); - _checkInvalidNameError(); - - /* NULL input */ - name = NULL; - scancode = SDL_GetScancodeFromName((const char *)name); - SDLTest_AssertPass("Call to SDL_GetScancodeFromName(NULL)"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); - _checkInvalidNameError(); - - return TEST_COMPLETED; + const char *name; + SDL_Scancode scancode; + + /* Clear error message */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Random string input */ + name = SDLTest_RandomAsciiStringOfSize(32); + SDLTest_Assert(name != NULL, "Check that random name is not NULL"); + if (name == NULL) { + return TEST_ABORTED; + } + scancode = SDL_GetScancodeFromName(name); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName('%s')", name); + SDL_free((void *)name); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); + _checkInvalidNameError(); + + /* Zero length string input */ + name = ""; + scancode = SDL_GetScancodeFromName(name); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName(NULL)"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); + _checkInvalidNameError(); + + /* NULL input */ + name = NULL; + scancode = SDL_GetScancodeFromName(name); + SDLTest_AssertPass("Call to SDL_GetScancodeFromName(NULL)"); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); + _checkInvalidNameError(); + + return TEST_COMPLETED; } - - /* ================= Test References ================== */ /* Keyboard test cases */ -static const SDLTest_TestCaseReference keyboardTest1 = - { (SDLTest_TestCaseFp)keyboard_getKeyboardState, "keyboard_getKeyboardState", "Check call to SDL_GetKeyboardState with and without numkeys reference", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest1 = { + (SDLTest_TestCaseFp)keyboard_getKeyboardState, "keyboard_getKeyboardState", "Check call to SDL_GetKeyboardState with and without numkeys reference", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest2 = - { (SDLTest_TestCaseFp)keyboard_getKeyboardFocus, "keyboard_getKeyboardFocus", "Check call to SDL_GetKeyboardFocus", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest2 = { + (SDLTest_TestCaseFp)keyboard_getKeyboardFocus, "keyboard_getKeyboardFocus", "Check call to SDL_GetKeyboardFocus", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest3 = - { (SDLTest_TestCaseFp)keyboard_getKeyFromName, "keyboard_getKeyFromName", "Check call to SDL_GetKeyFromName for known, unknown and invalid name", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest3 = { + (SDLTest_TestCaseFp)keyboard_getKeyFromName, "keyboard_getKeyFromName", "Check call to SDL_GetKeyFromName for known, unknown and invalid name", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest4 = - { (SDLTest_TestCaseFp)keyboard_getKeyFromScancode, "keyboard_getKeyFromScancode", "Check call to SDL_GetKeyFromScancode", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest4 = { + (SDLTest_TestCaseFp)keyboard_getKeyFromScancode, "keyboard_getKeyFromScancode", "Check call to SDL_GetKeyFromScancode", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest5 = - { (SDLTest_TestCaseFp)keyboard_getKeyName, "keyboard_getKeyName", "Check call to SDL_GetKeyName", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest5 = { + (SDLTest_TestCaseFp)keyboard_getKeyName, "keyboard_getKeyName", "Check call to SDL_GetKeyName", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest6 = - { (SDLTest_TestCaseFp)keyboard_getSetModState, "keyboard_getSetModState", "Check call to SDL_GetModState and SDL_SetModState", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest6 = { + (SDLTest_TestCaseFp)keyboard_getSetModState, "keyboard_getSetModState", "Check call to SDL_GetModState and SDL_SetModState", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest7 = - { (SDLTest_TestCaseFp)keyboard_startStopTextInput, "keyboard_startStopTextInput", "Check call to SDL_StartTextInput and SDL_StopTextInput", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest7 = { + (SDLTest_TestCaseFp)keyboard_startStopTextInput, "keyboard_startStopTextInput", "Check call to SDL_StartTextInput and SDL_StopTextInput", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest8 = - { (SDLTest_TestCaseFp)keyboard_setTextInputRect, "keyboard_setTextInputRect", "Check call to SDL_SetTextInputRect", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest8 = { + (SDLTest_TestCaseFp)keyboard_setTextInputRect, "keyboard_setTextInputRect", "Check call to SDL_SetTextInputRect", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest9 = - { (SDLTest_TestCaseFp)keyboard_setTextInputRectNegative, "keyboard_setTextInputRectNegative", "Check call to SDL_SetTextInputRect with invalid data", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest9 = { + (SDLTest_TestCaseFp)keyboard_setTextInputRectNegative, "keyboard_setTextInputRectNegative", "Check call to SDL_SetTextInputRect with invalid data", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest10 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromKey, "keyboard_getScancodeFromKey", "Check call to SDL_GetScancodeFromKey", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest10 = { + (SDLTest_TestCaseFp)keyboard_getScancodeFromKey, "keyboard_getScancodeFromKey", "Check call to SDL_GetScancodeFromKey", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest11 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromName, "keyboard_getScancodeFromName", "Check call to SDL_GetScancodeFromName", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest11 = { + (SDLTest_TestCaseFp)keyboard_getScancodeFromName, "keyboard_getScancodeFromName", "Check call to SDL_GetScancodeFromName", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest12 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromNameNegative, "keyboard_getScancodeFromNameNegative", "Check call to SDL_GetScancodeFromName with invalid data", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest12 = { + (SDLTest_TestCaseFp)keyboard_getScancodeFromNameNegative, "keyboard_getScancodeFromNameNegative", "Check call to SDL_GetScancodeFromName with invalid data", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest13 = - { (SDLTest_TestCaseFp)keyboard_getKeyNameNegative, "keyboard_getKeyNameNegative", "Check call to SDL_GetKeyName with invalid data", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest13 = { + (SDLTest_TestCaseFp)keyboard_getKeyNameNegative, "keyboard_getKeyNameNegative", "Check call to SDL_GetKeyName with invalid data", TEST_ENABLED +}; -static const SDLTest_TestCaseReference keyboardTest14 = - { (SDLTest_TestCaseFp)keyboard_getScancodeNameNegative, "keyboard_getScancodeNameNegative", "Check call to SDL_GetScancodeName with invalid data", TEST_ENABLED }; +static const SDLTest_TestCaseReference keyboardTest14 = { + (SDLTest_TestCaseFp)keyboard_getScancodeNameNegative, "keyboard_getScancodeNameNegative", "Check call to SDL_GetScancodeName with invalid data", TEST_ENABLED +}; /* Sequence of Keyboard test cases */ -static const SDLTest_TestCaseReference *keyboardTests[] = { +static const SDLTest_TestCaseReference *keyboardTests[] = { &keyboardTest1, &keyboardTest2, &keyboardTest3, &keyboardTest4, &keyboardTest5, &keyboardTest6, &keyboardTest7, &keyboardTest8, &keyboardTest9, &keyboardTest10, &keyboardTest11, &keyboardTest12, &keyboardTest13, &keyboardTest14, NULL diff --git a/modules/SDL2/test/testautomation_main.c b/modules/SDL2/test/testautomation_main.c index 97d2352..ed72e0d 100644 --- a/modules/SDL2/test/testautomation_main.c +++ b/modules/SDL2/test/testautomation_main.c @@ -9,14 +9,13 @@ #include "SDL.h" #include "SDL_test.h" - /* ! * \brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems * \sa * http://wiki.libsdl.org/SDL_Init * http://wiki.libsdl.org/SDL_Quit */ -static int main_testInitQuitJoystickHaptic (void *arg) +static int main_testInitQuitJoystickHaptic(void *arg) { #if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED return TEST_SKIPPED; @@ -24,15 +23,15 @@ static int main_testInitQuitJoystickHaptic (void *arg) int enabled_subsystems; int initialized_subsystems = SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC; - SDLTest_AssertCheck( SDL_Init(initialized_subsystems) == 0, "SDL_Init multiple systems." ); + SDLTest_AssertCheck(SDL_Init(initialized_subsystems) == 0, "SDL_Init multiple systems."); enabled_subsystems = SDL_WasInit(initialized_subsystems); - SDLTest_AssertCheck( enabled_subsystems == initialized_subsystems, "SDL_WasInit(SDL_INIT_EVERYTHING) contains all systems (%i)", enabled_subsystems ); + SDLTest_AssertCheck(enabled_subsystems == initialized_subsystems, "SDL_WasInit(SDL_INIT_EVERYTHING) contains all systems (%i)", enabled_subsystems); SDL_Quit(); enabled_subsystems = SDL_WasInit(initialized_subsystems); - SDLTest_AssertCheck( enabled_subsystems == 0, "SDL_Quit should shut down everything (%i)", enabled_subsystems ); + SDLTest_AssertCheck(enabled_subsystems == 0, "SDL_Quit should shut down everything (%i)", enabled_subsystems); return TEST_COMPLETED; #endif @@ -44,7 +43,7 @@ static int main_testInitQuitJoystickHaptic (void *arg) * http://wiki.libsdl.org/SDL_Init * http://wiki.libsdl.org/SDL_Quit */ -static int main_testInitQuitSubSystem (void *arg) +static int main_testInitQuitSubSystem(void *arg) { #if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED || defined SDL_GAMECONTROLLER_DISABLED return TEST_SKIPPED; @@ -56,15 +55,15 @@ static int main_testInitQuitSubSystem (void *arg) int initialized_system; int subsystem = subsystems[i]; - SDLTest_AssertCheck( (SDL_WasInit(subsystem) & subsystem) == 0, "SDL_WasInit(%x) before init should be false", subsystem ); - SDLTest_AssertCheck( SDL_InitSubSystem(subsystem) == 0, "SDL_InitSubSystem(%x)", subsystem ); + SDLTest_AssertCheck((SDL_WasInit(subsystem) & subsystem) == 0, "SDL_WasInit(%x) before init should be false", subsystem); + SDLTest_AssertCheck(SDL_InitSubSystem(subsystem) == 0, "SDL_InitSubSystem(%x)", subsystem); initialized_system = SDL_WasInit(subsystem); - SDLTest_AssertCheck( (initialized_system & subsystem) != 0, "SDL_WasInit(%x) should be true (%x)", subsystem, initialized_system ); + SDLTest_AssertCheck((initialized_system & subsystem) != 0, "SDL_WasInit(%x) should be true (%x)", subsystem, initialized_system); SDL_QuitSubSystem(subsystem); - SDLTest_AssertCheck( (SDL_WasInit(subsystem) & subsystem) == 0, "SDL_WasInit(%x) after shutdown should be false", subsystem ); + SDLTest_AssertCheck((SDL_WasInit(subsystem) & subsystem) == 0, "SDL_WasInit(%x) after shutdown should be false", subsystem); } return TEST_COMPLETED; @@ -72,7 +71,7 @@ static int main_testInitQuitSubSystem (void *arg) } const int joy_and_controller = SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER; -static int main_testImpliedJoystickInit (void *arg) +static int main_testImpliedJoystickInit(void *arg) { #if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED return TEST_SKIPPED; @@ -80,24 +79,24 @@ static int main_testImpliedJoystickInit (void *arg) int initialized_system; /* First initialize the controller */ - SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller" ); - SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)" ); + SDLTest_AssertCheck((SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller"); + SDLTest_AssertCheck(SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)"); /* Then make sure this implicitly initialized the joystick subsystem */ initialized_system = SDL_WasInit(joy_and_controller); - SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system ); + SDLTest_AssertCheck((initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system); /* Then quit the controller, and make sure that implicitly also quits the */ /* joystick subsystem */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); initialized_system = SDL_WasInit(joy_and_controller); - SDLTest_AssertCheck( (initialized_system & joy_and_controller) == 0, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system ); + SDLTest_AssertCheck((initialized_system & joy_and_controller) == 0, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system); return TEST_COMPLETED; #endif } -static int main_testImpliedJoystickQuit (void *arg) +static int main_testImpliedJoystickQuit(void *arg) { #if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED return TEST_SKIPPED; @@ -105,19 +104,19 @@ static int main_testImpliedJoystickQuit (void *arg) int initialized_system; /* First initialize the controller and the joystick (explicitly) */ - SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller" ); - SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_JOYSTICK) == 0, "SDL_InitSubSystem(SDL_INIT_JOYSTICK)" ); - SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)" ); + SDLTest_AssertCheck((SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller"); + SDLTest_AssertCheck(SDL_InitSubSystem(SDL_INIT_JOYSTICK) == 0, "SDL_InitSubSystem(SDL_INIT_JOYSTICK)"); + SDLTest_AssertCheck(SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)"); /* Then make sure they're both initialized properly */ initialized_system = SDL_WasInit(joy_and_controller); - SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system ); + SDLTest_AssertCheck((initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system); /* Then quit the controller, and make sure that it does NOT quit the */ /* explicitly initialized joystick subsystem. */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); initialized_system = SDL_WasInit(joy_and_controller); - SDLTest_AssertCheck( (initialized_system & joy_and_controller) == SDL_INIT_JOYSTICK, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system ); + SDLTest_AssertCheck((initialized_system & joy_and_controller) == SDL_INIT_JOYSTICK, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system); SDL_QuitSubSystem(SDL_INIT_JOYSTICK); @@ -140,7 +139,7 @@ main_testSetError(void *arg) SDL_SetError(""); SDLTest_AssertCheck(SDL_strcmp(error, SDL_GetError()) == 0, "SDL_SetError(\"\")"); - for (i = 0; i < (sizeof(error)-1); ++i) { + for (i = 0; i < (sizeof(error) - 1); ++i) { error[i] = 'a' + (i % 26); } error[i] = '\0'; @@ -154,23 +153,28 @@ main_testSetError(void *arg) #pragma GCC diagnostic pop #endif -static const SDLTest_TestCaseReference mainTest1 = - { (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED}; +static const SDLTest_TestCaseReference mainTest1 = { + (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED +}; -static const SDLTest_TestCaseReference mainTest2 = - { (SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED}; +static const SDLTest_TestCaseReference mainTest2 = { + (SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED +}; -static const SDLTest_TestCaseReference mainTest3 = - { (SDLTest_TestCaseFp)main_testImpliedJoystickInit, "main_testImpliedJoystickInit", "Tests that init for gamecontroller properly implies joystick", TEST_ENABLED}; +static const SDLTest_TestCaseReference mainTest3 = { + (SDLTest_TestCaseFp)main_testImpliedJoystickInit, "main_testImpliedJoystickInit", "Tests that init for gamecontroller properly implies joystick", TEST_ENABLED +}; -static const SDLTest_TestCaseReference mainTest4 = - { (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED}; +static const SDLTest_TestCaseReference mainTest4 = { + (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED +}; -static const SDLTest_TestCaseReference mainTest5 = - { (SDLTest_TestCaseFp)main_testSetError, "main_testSetError", "Tests that SDL_SetError() handles arbitrarily large strings", TEST_ENABLED}; +static const SDLTest_TestCaseReference mainTest5 = { + (SDLTest_TestCaseFp)main_testSetError, "main_testSetError", "Tests that SDL_SetError() handles arbitrarily large strings", TEST_ENABLED +}; /* Sequence of Main test cases */ -static const SDLTest_TestCaseReference *mainTests[] = { +static const SDLTest_TestCaseReference *mainTests[] = { &mainTest1, &mainTest2, &mainTest3, diff --git a/modules/SDL2/test/testautomation_math.c b/modules/SDL2/test/testautomation_math.c index bdf5703..87637c0 100644 --- a/modules/SDL2/test/testautomation_math.c +++ b/modules/SDL2/test/testautomation_math.c @@ -12,7 +12,7 @@ /* Range tests parameters */ #define RANGE_TEST_ITERATIONS 10000000 -#define RANGE_TEST_STEP SDL_MAX_UINT32 / RANGE_TEST_ITERATIONS +#define RANGE_TEST_STEP ((Uint32)(SDL_MAX_UINT32 / RANGE_TEST_ITERATIONS)) /* Margin of error for imprecise tests */ #define EPSILON 1.0E-10 @@ -24,6 +24,8 @@ #define EULER M_E #endif +#define IS_INFINITY(V) fpclassify(V) == FP_INFINITE + /* Square root of 3 (used in atan2) */ #define SQRT3 1.7320508075688771931766041234368458390235900878906250 @@ -222,12 +224,12 @@ floor_infCases(void *args) double result; result = SDL_floor(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Floor(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_floor(-INFINITY); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Floor(%f), expected %f, got %f", -INFINITY, -INFINITY, result); @@ -326,12 +328,12 @@ ceil_infCases(void *args) double result; result = SDL_ceil(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Ceil(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_ceil(-INFINITY); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Ceil(%f), expected %f, got %f", -INFINITY, -INFINITY, result); @@ -430,12 +432,12 @@ trunc_infCases(void *args) double result; result = SDL_trunc(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Trunc(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_trunc(-INFINITY); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Trunc(%f), expected %f, got %f", -INFINITY, -INFINITY, result); @@ -534,12 +536,12 @@ round_infCases(void *args) double result; result = SDL_round(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Round(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_round(-INFINITY); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Round(%f), expected %f, got %f", -INFINITY, -INFINITY, result); @@ -638,12 +640,12 @@ fabs_infCases(void *args) double result; result = SDL_fabs(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Fabs(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_fabs(-INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Fabs(%f), expected %f, got %f", -INFINITY, INFINITY, result); @@ -700,22 +702,22 @@ copysign_infCases(void *args) double result; result = SDL_copysign(INFINITY, -1.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Copysign(%f,%.1f), expected %f, got %f", INFINITY, -1.0, -INFINITY, result); result = SDL_copysign(INFINITY, 1.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Copysign(%f,%.1f), expected %f, got %f", INFINITY, 1.0, INFINITY, result); result = SDL_copysign(-INFINITY, -1.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Copysign(%f,%.1f), expected %f, got %f", -INFINITY, -1.0, -INFINITY, result); result = SDL_copysign(-INFINITY, 1.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Copysign(%f,%.1f), expected %f, got %f", -INFINITY, 1.0, INFINITY, result); @@ -1008,7 +1010,7 @@ exp_infCases(void *args) double result; result = SDL_exp(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Exp(%f), expected %f, got %f", INFINITY, INFINITY, result); @@ -1104,17 +1106,17 @@ log_limitCases(void *args) double result; result = SDL_log(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Log(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_log(0.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Log(%f), expected %f, got %f", 0.0, -INFINITY, result); result = SDL_log(-0.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Log(%f), expected %f, got %f", -0.0, -INFINITY, result); @@ -1194,17 +1196,17 @@ log10_limitCases(void *args) double result; result = SDL_log10(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Log10(%f), expected %f, got %f", INFINITY, INFINITY, result); result = SDL_log10(0.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Log10(%f), expected %f, got %f", 0.0, -INFINITY, result); result = SDL_log10(-0.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Log10(%f), expected %f, got %f", -0.0, -INFINITY, result); @@ -1307,12 +1309,12 @@ pow_baseZeroExpNInfCases(void *args) double result; result = SDL_pow(0.0, -INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 0.0, -INFINITY, INFINITY, result); result = SDL_pow(-0.0, -INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", -0.0, -INFINITY, INFINITY, result); @@ -1334,12 +1336,12 @@ pow_expInfCases(void *args) 0.5, INFINITY, 0.0, result); result = SDL_pow(1.5, INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 1.5, INFINITY, INFINITY, result); result = SDL_pow(0.5, -INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 0.5, INFINITY, INFINITY, result); @@ -1368,7 +1370,7 @@ pow_basePInfCases(void *args) INFINITY, -3.0, 0.0, result); result = SDL_pow(INFINITY, 2.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", INFINITY, 2.0, INFINITY, result); @@ -1378,7 +1380,7 @@ pow_basePInfCases(void *args) INFINITY, -2.12345, 0.0, result); result = SDL_pow(INFINITY, 3.1345); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", INFINITY, 3.12345, INFINITY, result); @@ -1414,17 +1416,17 @@ pow_baseNInfCases(void *args) -INFINITY, -5.5, 0.0, result); result = SDL_pow(-INFINITY, 3.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Pow(%f,%f), expected %f, got %f", -INFINITY, 3.0, -INFINITY, result); result = SDL_pow(-INFINITY, 2.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", -INFINITY, 2.0, INFINITY, result); result = SDL_pow(-INFINITY, 5.5); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", -INFINITY, 5.5, INFINITY, result); @@ -1526,7 +1528,7 @@ pow_baseNZeroExpOddCases(void *args) double result; result = SDL_pow(-0.0, -3.0); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Pow(%f,%f), expected %f, got %f", -0.0, -3.0, -INFINITY, result); @@ -1550,7 +1552,7 @@ pow_basePZeroExpOddCases(void *args) double result; result = SDL_pow(0.0, -5.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 0.0, -5.0, INFINITY, result); @@ -1576,12 +1578,12 @@ pow_baseNZeroCases(void *args) double result; result = SDL_pow(-0.0, -3.5); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", -0.0, -3.5, INFINITY, result); result = SDL_pow(-0.0, -4.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", -0.0, -4.0, INFINITY, result); @@ -1612,12 +1614,12 @@ pow_basePZeroCases(void *args) double result; result = SDL_pow(0.0, -3.5); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 0.0, -3.5, INFINITY, result); result = SDL_pow(0.0, -4.0); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Pow(%f,%f), expected %f, got %f", 0.0, -4.0, INFINITY, result); @@ -1725,7 +1727,7 @@ static int sqrt_infCase(void *args) { const double result = SDL_sqrt(INFINITY); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Sqrt(%f), expected %f, got %f", INFINITY, INFINITY, result); return TEST_COMPLETED; @@ -1818,12 +1820,12 @@ scalbn_infCases(void *args) double result; result = SDL_scalbn(INFINITY, 1); - SDLTest_AssertCheck(INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result > 0, "Scalbn(%f,%d), expected %f, got %f", INFINITY, 1, INFINITY, result); result = SDL_scalbn(-INFINITY, 1); - SDLTest_AssertCheck(-INFINITY == result, + SDLTest_AssertCheck(IS_INFINITY(result) && result < 0, "Scalbn(%f,%d), expected %f, got %f", -INFINITY, 1, -INFINITY, result); @@ -2769,520 +2771,520 @@ atan2_bottomLeftQuadrantTest(void *args) /* SDL_floor test cases */ static const SDLTest_TestCaseReference floorTestInf = { - (SDLTest_TestCaseFp) floor_infCases, "floor_infCases", + (SDLTest_TestCaseFp)floor_infCases, "floor_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference floorTestZero = { - (SDLTest_TestCaseFp) floor_zeroCases, "floor_zeroCases", + (SDLTest_TestCaseFp)floor_zeroCases, "floor_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference floorTestNan = { - (SDLTest_TestCaseFp) floor_nanCase, "floor_nanCase", + (SDLTest_TestCaseFp)floor_nanCase, "floor_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference floorTestRound = { - (SDLTest_TestCaseFp) floor_roundNumbersCases, "floor_roundNumberCases", + (SDLTest_TestCaseFp)floor_roundNumbersCases, "floor_roundNumberCases", "Checks a set of integral values", TEST_ENABLED }; static const SDLTest_TestCaseReference floorTestFraction = { - (SDLTest_TestCaseFp) floor_fractionCases, "floor_fractionCases", + (SDLTest_TestCaseFp)floor_fractionCases, "floor_fractionCases", "Checks a set of fractions", TEST_ENABLED }; static const SDLTest_TestCaseReference floorTestRange = { - (SDLTest_TestCaseFp) floor_rangeTest, "floor_rangeTest", + (SDLTest_TestCaseFp)floor_rangeTest, "floor_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_ceil test cases */ static const SDLTest_TestCaseReference ceilTestInf = { - (SDLTest_TestCaseFp) ceil_infCases, "ceil_infCases", + (SDLTest_TestCaseFp)ceil_infCases, "ceil_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference ceilTestZero = { - (SDLTest_TestCaseFp) ceil_zeroCases, "ceil_zeroCases", + (SDLTest_TestCaseFp)ceil_zeroCases, "ceil_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference ceilTestNan = { - (SDLTest_TestCaseFp) ceil_nanCase, "ceil_nanCase", + (SDLTest_TestCaseFp)ceil_nanCase, "ceil_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference ceilTestRound = { - (SDLTest_TestCaseFp) ceil_roundNumbersCases, "ceil_roundNumberCases", + (SDLTest_TestCaseFp)ceil_roundNumbersCases, "ceil_roundNumberCases", "Checks a set of integral values", TEST_ENABLED }; static const SDLTest_TestCaseReference ceilTestFraction = { - (SDLTest_TestCaseFp) ceil_fractionCases, "ceil_fractionCases", + (SDLTest_TestCaseFp)ceil_fractionCases, "ceil_fractionCases", "Checks a set of fractions", TEST_ENABLED }; static const SDLTest_TestCaseReference ceilTestRange = { - (SDLTest_TestCaseFp) ceil_rangeTest, "ceil_rangeTest", + (SDLTest_TestCaseFp)ceil_rangeTest, "ceil_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_trunc test cases */ static const SDLTest_TestCaseReference truncTestInf = { - (SDLTest_TestCaseFp) trunc_infCases, "trunc_infCases", + (SDLTest_TestCaseFp)trunc_infCases, "trunc_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference truncTestZero = { - (SDLTest_TestCaseFp) trunc_zeroCases, "trunc_zeroCases", + (SDLTest_TestCaseFp)trunc_zeroCases, "trunc_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference truncTestNan = { - (SDLTest_TestCaseFp) trunc_nanCase, "trunc_nanCase", + (SDLTest_TestCaseFp)trunc_nanCase, "trunc_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference truncTestRound = { - (SDLTest_TestCaseFp) trunc_roundNumbersCases, "trunc_roundNumberCases", + (SDLTest_TestCaseFp)trunc_roundNumbersCases, "trunc_roundNumberCases", "Checks a set of integral values", TEST_ENABLED }; static const SDLTest_TestCaseReference truncTestFraction = { - (SDLTest_TestCaseFp) trunc_fractionCases, "trunc_fractionCases", + (SDLTest_TestCaseFp)trunc_fractionCases, "trunc_fractionCases", "Checks a set of fractions", TEST_ENABLED }; static const SDLTest_TestCaseReference truncTestRange = { - (SDLTest_TestCaseFp) trunc_rangeTest, "trunc_rangeTest", + (SDLTest_TestCaseFp)trunc_rangeTest, "trunc_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_round test cases */ static const SDLTest_TestCaseReference roundTestInf = { - (SDLTest_TestCaseFp) round_infCases, "round_infCases", + (SDLTest_TestCaseFp)round_infCases, "round_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference roundTestZero = { - (SDLTest_TestCaseFp) round_zeroCases, "round_zeroCases", + (SDLTest_TestCaseFp)round_zeroCases, "round_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference roundTestNan = { - (SDLTest_TestCaseFp) round_nanCase, "round_nanCase", + (SDLTest_TestCaseFp)round_nanCase, "round_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference roundTestRound = { - (SDLTest_TestCaseFp) round_roundNumbersCases, "round_roundNumberCases", + (SDLTest_TestCaseFp)round_roundNumbersCases, "round_roundNumberCases", "Checks a set of integral values", TEST_ENABLED }; static const SDLTest_TestCaseReference roundTestFraction = { - (SDLTest_TestCaseFp) round_fractionCases, "round_fractionCases", + (SDLTest_TestCaseFp)round_fractionCases, "round_fractionCases", "Checks a set of fractions", TEST_ENABLED }; static const SDLTest_TestCaseReference roundTestRange = { - (SDLTest_TestCaseFp) round_rangeTest, "round_rangeTest", + (SDLTest_TestCaseFp)round_rangeTest, "round_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_fabs test cases */ static const SDLTest_TestCaseReference fabsTestInf = { - (SDLTest_TestCaseFp) fabs_infCases, "fabs_infCases", + (SDLTest_TestCaseFp)fabs_infCases, "fabs_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference fabsTestZero = { - (SDLTest_TestCaseFp) fabs_zeroCases, "fabs_zeroCases", + (SDLTest_TestCaseFp)fabs_zeroCases, "fabs_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference fabsTestNan = { - (SDLTest_TestCaseFp) fabs_nanCase, "fabs_nanCase", + (SDLTest_TestCaseFp)fabs_nanCase, "fabs_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference fabsTestRange = { - (SDLTest_TestCaseFp) fabs_rangeTest, "fabs_rangeTest", + (SDLTest_TestCaseFp)fabs_rangeTest, "fabs_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_copysign test cases */ static const SDLTest_TestCaseReference copysignTestInf = { - (SDLTest_TestCaseFp) copysign_infCases, "copysign_infCases", + (SDLTest_TestCaseFp)copysign_infCases, "copysign_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference copysignTestZero = { - (SDLTest_TestCaseFp) copysign_zeroCases, "copysign_zeroCases", + (SDLTest_TestCaseFp)copysign_zeroCases, "copysign_zeroCases", "Checks positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference copysignTestNan = { - (SDLTest_TestCaseFp) copysign_nanCases, "copysign_nanCases", + (SDLTest_TestCaseFp)copysign_nanCases, "copysign_nanCases", "Checks NANs", TEST_ENABLED }; static const SDLTest_TestCaseReference copysignTestRange = { - (SDLTest_TestCaseFp) copysign_rangeTest, "copysign_rangeTest", + (SDLTest_TestCaseFp)copysign_rangeTest, "copysign_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_fmod test cases */ static const SDLTest_TestCaseReference fmodTestDivOfInf = { - (SDLTest_TestCaseFp) fmod_divOfInfCases, "fmod_divOfInfCases", + (SDLTest_TestCaseFp)fmod_divOfInfCases, "fmod_divOfInfCases", "Checks division of positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestDivByInf = { - (SDLTest_TestCaseFp) fmod_divByInfCases, "fmod_divByInfCases", + (SDLTest_TestCaseFp)fmod_divByInfCases, "fmod_divByInfCases", "Checks division by positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestDivOfZero = { - (SDLTest_TestCaseFp) fmod_divOfZeroCases, "fmod_divOfZeroCases", + (SDLTest_TestCaseFp)fmod_divOfZeroCases, "fmod_divOfZeroCases", "Checks division of positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestDivByZero = { - (SDLTest_TestCaseFp) fmod_divByZeroCases, "fmod_divByZeroCases", + (SDLTest_TestCaseFp)fmod_divByZeroCases, "fmod_divByZeroCases", "Checks division by positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestNan = { - (SDLTest_TestCaseFp) fmod_nanCases, "fmod_nanCases", + (SDLTest_TestCaseFp)fmod_nanCases, "fmod_nanCases", "Checks NANs", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestRegular = { - (SDLTest_TestCaseFp) fmod_regularCases, "fmod_regularCases", + (SDLTest_TestCaseFp)fmod_regularCases, "fmod_regularCases", "Checks a set of regular values", TEST_ENABLED }; static const SDLTest_TestCaseReference fmodTestRange = { - (SDLTest_TestCaseFp) fmod_rangeTest, "fmod_rangeTest", + (SDLTest_TestCaseFp)fmod_rangeTest, "fmod_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_exp test cases */ static const SDLTest_TestCaseReference expTestInf = { - (SDLTest_TestCaseFp) exp_infCases, "exp_infCases", + (SDLTest_TestCaseFp)exp_infCases, "exp_infCases", "Checks positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference expTestZero = { - (SDLTest_TestCaseFp) exp_zeroCases, "exp_zeroCases", + (SDLTest_TestCaseFp)exp_zeroCases, "exp_zeroCases", "Checks for positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference expTestOverflow = { - (SDLTest_TestCaseFp) exp_overflowCase, "exp_overflowCase", + (SDLTest_TestCaseFp)exp_overflowCase, "exp_overflowCase", "Checks for overflow", TEST_ENABLED }; static const SDLTest_TestCaseReference expTestBase = { - (SDLTest_TestCaseFp) exp_baseCase, "exp_baseCase", + (SDLTest_TestCaseFp)exp_baseCase, "exp_baseCase", "Checks the base case", TEST_ENABLED }; static const SDLTest_TestCaseReference expTestRegular = { - (SDLTest_TestCaseFp) exp_regularCases, "exp_regularCases", + (SDLTest_TestCaseFp)exp_regularCases, "exp_regularCases", "Checks a set of regular values", TEST_ENABLED }; /* SDL_log test cases */ static const SDLTest_TestCaseReference logTestLimit = { - (SDLTest_TestCaseFp) log_limitCases, "log_limitCases", + (SDLTest_TestCaseFp)log_limitCases, "log_limitCases", "Checks the domain limits", TEST_ENABLED }; static const SDLTest_TestCaseReference logTestNan = { - (SDLTest_TestCaseFp) log_nanCases, "log_nanCases", + (SDLTest_TestCaseFp)log_nanCases, "log_nanCases", "Checks NAN and negative values", TEST_ENABLED }; static const SDLTest_TestCaseReference logTestBase = { - (SDLTest_TestCaseFp) log_baseCases, "log_baseCases", + (SDLTest_TestCaseFp)log_baseCases, "log_baseCases", "Checks the base cases", TEST_ENABLED }; static const SDLTest_TestCaseReference logTestRegular = { - (SDLTest_TestCaseFp) log_regularCases, "log_regularCases", + (SDLTest_TestCaseFp)log_regularCases, "log_regularCases", "Checks a set of regular values", TEST_ENABLED }; /* SDL_log10 test cases */ static const SDLTest_TestCaseReference log10TestLimit = { - (SDLTest_TestCaseFp) log10_limitCases, "log10_limitCases", + (SDLTest_TestCaseFp)log10_limitCases, "log10_limitCases", "Checks the domain limits", TEST_ENABLED }; static const SDLTest_TestCaseReference log10TestNan = { - (SDLTest_TestCaseFp) log10_nanCases, "log10_nanCases", + (SDLTest_TestCaseFp)log10_nanCases, "log10_nanCases", "Checks NAN and negative values", TEST_ENABLED }; static const SDLTest_TestCaseReference log10TestBase = { - (SDLTest_TestCaseFp) log10_baseCases, "log10_baseCases", + (SDLTest_TestCaseFp)log10_baseCases, "log10_baseCases", "Checks the base cases", TEST_ENABLED }; static const SDLTest_TestCaseReference log10TestRegular = { - (SDLTest_TestCaseFp) log10_regularCases, "log10_regularCases", + (SDLTest_TestCaseFp)log10_regularCases, "log10_regularCases", "Checks a set of regular values", TEST_ENABLED }; /* SDL_pow test cases */ static const SDLTest_TestCaseReference powTestExpInf1 = { - (SDLTest_TestCaseFp) pow_baseNOneExpInfCases, "pow_baseNOneExpInfCases", + (SDLTest_TestCaseFp)pow_baseNOneExpInfCases, "pow_baseNOneExpInfCases", "Checks for pow(-1, +/-inf)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestExpInf2 = { - (SDLTest_TestCaseFp) pow_baseZeroExpNInfCases, "pow_baseZeroExpNInfCases", + (SDLTest_TestCaseFp)pow_baseZeroExpNInfCases, "pow_baseZeroExpNInfCases", "Checks for pow(+/-0, -inf)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestExpInf3 = { - (SDLTest_TestCaseFp) pow_expInfCases, "pow_expInfCases", + (SDLTest_TestCaseFp)pow_expInfCases, "pow_expInfCases", "Checks for pow(x, +/-inf)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestBaseInf1 = { - (SDLTest_TestCaseFp) pow_basePInfCases, "pow_basePInfCases", + (SDLTest_TestCaseFp)pow_basePInfCases, "pow_basePInfCases", "Checks for pow(inf, x)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestBaseInf2 = { - (SDLTest_TestCaseFp) pow_baseNInfCases, "pow_baseNInfCases", + (SDLTest_TestCaseFp)pow_baseNInfCases, "pow_baseNInfCases", "Checks for pow(-inf, x)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestNan1 = { - (SDLTest_TestCaseFp) pow_badOperationCase, "pow_badOperationCase", + (SDLTest_TestCaseFp)pow_badOperationCase, "pow_badOperationCase", "Checks for negative finite base and non-integer finite exponent", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestNan2 = { - (SDLTest_TestCaseFp) pow_base1ExpNanCase, "pow_base1ExpNanCase", + (SDLTest_TestCaseFp)pow_base1ExpNanCase, "pow_base1ExpNanCase", "Checks for pow(1.0, NAN)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestNan3 = { - (SDLTest_TestCaseFp) pow_baseNanExp0Cases, "pow_baseNanExp0Cases", + (SDLTest_TestCaseFp)pow_baseNanExp0Cases, "pow_baseNanExp0Cases", "Checks for pow(NAN, +/-0)", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestNan4 = { - (SDLTest_TestCaseFp) pow_nanArgsCases, "pow_nanArgsCases", + (SDLTest_TestCaseFp)pow_nanArgsCases, "pow_nanArgsCases", "Checks for pow(x, y) with either x or y being NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestZero1 = { - (SDLTest_TestCaseFp) pow_baseNZeroExpOddCases, "pow_baseNZeroExpOddCases", + (SDLTest_TestCaseFp)pow_baseNZeroExpOddCases, "pow_baseNZeroExpOddCases", "Checks for pow(-0.0, y), with y an odd integer.", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestZero2 = { - (SDLTest_TestCaseFp) pow_basePZeroExpOddCases, "pow_basePZeroExpOddCases", + (SDLTest_TestCaseFp)pow_basePZeroExpOddCases, "pow_basePZeroExpOddCases", "Checks for pow(0.0, y), with y an odd integer.", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestZero3 = { - (SDLTest_TestCaseFp) pow_baseNZeroCases, "pow_baseNZeroCases", + (SDLTest_TestCaseFp)pow_baseNZeroCases, "pow_baseNZeroCases", "Checks for pow(-0.0, y), with y finite and even or non-integer number", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestZero4 = { - (SDLTest_TestCaseFp) pow_basePZeroCases, "pow_basePZeroCases", + (SDLTest_TestCaseFp)pow_basePZeroCases, "pow_basePZeroCases", "Checks for pow(0.0, y), with y finite and even or non-integer number", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestRegular = { - (SDLTest_TestCaseFp) pow_regularCases, "pow_regularCases", + (SDLTest_TestCaseFp)pow_regularCases, "pow_regularCases", "Checks a set of regular values", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestPowOf2 = { - (SDLTest_TestCaseFp) pow_powerOfTwo, "pow_powerOfTwo", + (SDLTest_TestCaseFp)pow_powerOfTwo, "pow_powerOfTwo", "Checks the powers of two from 1 to 8", TEST_ENABLED }; static const SDLTest_TestCaseReference powTestRange = { - (SDLTest_TestCaseFp) pow_rangeTest, "pow_rangeTest", + (SDLTest_TestCaseFp)pow_rangeTest, "pow_rangeTest", "Checks a range of positive integer to the power of 0", TEST_ENABLED }; /* SDL_sqrt test cases */ static const SDLTest_TestCaseReference sqrtTestInf = { - (SDLTest_TestCaseFp) sqrt_infCase, "sqrt_infCase", + (SDLTest_TestCaseFp)sqrt_infCase, "sqrt_infCase", "Checks positive infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference sqrtTestNan = { - (SDLTest_TestCaseFp) sqrt_nanCase, "sqrt_nanCase", + (SDLTest_TestCaseFp)sqrt_nanCase, "sqrt_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference sqrtTestDomain = { - (SDLTest_TestCaseFp) sqrt_outOfDomainCases, "sqrt_outOfDomainCases", + (SDLTest_TestCaseFp)sqrt_outOfDomainCases, "sqrt_outOfDomainCases", "Checks for values out of the domain", TEST_ENABLED }; static const SDLTest_TestCaseReference sqrtTestBase = { - (SDLTest_TestCaseFp) sqrt_baseCases, "sqrt_baseCases", + (SDLTest_TestCaseFp)sqrt_baseCases, "sqrt_baseCases", "Checks the base cases", TEST_ENABLED }; static const SDLTest_TestCaseReference sqrtTestRegular = { - (SDLTest_TestCaseFp) sqrt_regularCases, "sqrt_regularCases", + (SDLTest_TestCaseFp)sqrt_regularCases, "sqrt_regularCases", "Checks a set of regular values", TEST_ENABLED }; /* SDL_scalbn test cases */ static const SDLTest_TestCaseReference scalbnTestInf = { - (SDLTest_TestCaseFp) scalbn_infCases, "scalbn_infCases", + (SDLTest_TestCaseFp)scalbn_infCases, "scalbn_infCases", "Checks positive and negative infinity arg", TEST_ENABLED }; static const SDLTest_TestCaseReference scalbnTestBaseZero = { - (SDLTest_TestCaseFp) scalbn_baseZeroCases, "scalbn_baseZeroCases", + (SDLTest_TestCaseFp)scalbn_baseZeroCases, "scalbn_baseZeroCases", "Checks for positive and negative zero arg", TEST_ENABLED }; static const SDLTest_TestCaseReference scalbnTestExpZero = { - (SDLTest_TestCaseFp) scalbn_expZeroCase, "scalbn_expZeroCase", + (SDLTest_TestCaseFp)scalbn_expZeroCase, "scalbn_expZeroCase", "Checks for zero exp", TEST_ENABLED }; static const SDLTest_TestCaseReference scalbnTestNan = { - (SDLTest_TestCaseFp) scalbn_nanCase, "scalbn_nanCase", + (SDLTest_TestCaseFp)scalbn_nanCase, "scalbn_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference scalbnTestRegular = { - (SDLTest_TestCaseFp) scalbn_regularCases, "scalbn_regularCases", + (SDLTest_TestCaseFp)scalbn_regularCases, "scalbn_regularCases", "Checks a set of regular cases", TEST_ENABLED }; /* SDL_cos test cases */ static const SDLTest_TestCaseReference cosTestInf = { - (SDLTest_TestCaseFp) cos_infCases, "cos_infCases", + (SDLTest_TestCaseFp)cos_infCases, "cos_infCases", "Checks for positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference cosTestNan = { - (SDLTest_TestCaseFp) cos_nanCase, "cos_nanCase", + (SDLTest_TestCaseFp)cos_nanCase, "cos_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference cosTestRegular = { - (SDLTest_TestCaseFp) cos_regularCases, "cos_regularCases", + (SDLTest_TestCaseFp)cos_regularCases, "cos_regularCases", "Checks a set of regular cases", TEST_ENABLED }; static const SDLTest_TestCaseReference cosTestPrecision = { - (SDLTest_TestCaseFp) cos_precisionTest, "cos_precisionTest", + (SDLTest_TestCaseFp)cos_precisionTest, "cos_precisionTest", "Checks cosine precision", TEST_ENABLED }; static const SDLTest_TestCaseReference cosTestRange = { - (SDLTest_TestCaseFp) cos_rangeTest, "cos_rangeTest", + (SDLTest_TestCaseFp)cos_rangeTest, "cos_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_sin test cases */ static const SDLTest_TestCaseReference sinTestInf = { - (SDLTest_TestCaseFp) sin_infCases, "sin_infCases", + (SDLTest_TestCaseFp)sin_infCases, "sin_infCases", "Checks for positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference sinTestNan = { - (SDLTest_TestCaseFp) sin_nanCase, "sin_nanCase", + (SDLTest_TestCaseFp)sin_nanCase, "sin_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference sinTestRegular = { - (SDLTest_TestCaseFp) sin_regularCases, "sin_regularCases", + (SDLTest_TestCaseFp)sin_regularCases, "sin_regularCases", "Checks a set of regular cases", TEST_ENABLED }; static const SDLTest_TestCaseReference sinTestPrecision = { - (SDLTest_TestCaseFp) sin_precisionTest, "sin_precisionTest", + (SDLTest_TestCaseFp)sin_precisionTest, "sin_precisionTest", "Checks sine precision", TEST_ENABLED }; static const SDLTest_TestCaseReference sinTestRange = { - (SDLTest_TestCaseFp) sin_rangeTest, "sin_rangeTest", + (SDLTest_TestCaseFp)sin_rangeTest, "sin_rangeTest", "Checks a range of positive integer", TEST_ENABLED }; /* SDL_tan test cases */ static const SDLTest_TestCaseReference tanTestInf = { - (SDLTest_TestCaseFp) tan_infCases, "tan_infCases", + (SDLTest_TestCaseFp)tan_infCases, "tan_infCases", "Checks for positive and negative infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference tanTestNan = { - (SDLTest_TestCaseFp) tan_nanCase, "tan_nanCase", + (SDLTest_TestCaseFp)tan_nanCase, "tan_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference tanTestZero = { - (SDLTest_TestCaseFp) tan_zeroCases, "tan_zeroCases", + (SDLTest_TestCaseFp)tan_zeroCases, "tan_zeroCases", "Checks a set of regular cases", TEST_ENABLED }; static const SDLTest_TestCaseReference tanTestPrecision = { - (SDLTest_TestCaseFp) tan_precisionTest, "tan_precisionTest", + (SDLTest_TestCaseFp)tan_precisionTest, "tan_precisionTest", "Checks tangent precision", TEST_ENABLED }; /* SDL_acos test cases */ static const SDLTest_TestCaseReference acosTestLimit = { - (SDLTest_TestCaseFp) acos_limitCases, "acos_limitCases", + (SDLTest_TestCaseFp)acos_limitCases, "acos_limitCases", "Checks the edge of the domain (+/-1)", TEST_ENABLED }; static const SDLTest_TestCaseReference acosTestOutOfDomain = { - (SDLTest_TestCaseFp) acos_outOfDomainCases, "acos_outOfDomainCases", + (SDLTest_TestCaseFp)acos_outOfDomainCases, "acos_outOfDomainCases", "Checks values outside the domain", TEST_ENABLED }; static const SDLTest_TestCaseReference acosTestNan = { - (SDLTest_TestCaseFp) acos_nanCase, "acos_nanCase", + (SDLTest_TestCaseFp)acos_nanCase, "acos_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference acosTestPrecision = { - (SDLTest_TestCaseFp) acos_precisionTest, "acos_precisionTest", + (SDLTest_TestCaseFp)acos_precisionTest, "acos_precisionTest", "Checks acos precision", TEST_ENABLED }; /* SDL_asin test cases */ static const SDLTest_TestCaseReference asinTestLimit = { - (SDLTest_TestCaseFp) asin_limitCases, "asin_limitCases", + (SDLTest_TestCaseFp)asin_limitCases, "asin_limitCases", "Checks the edge of the domain (+/-1)", TEST_ENABLED }; static const SDLTest_TestCaseReference asinTestOutOfDomain = { - (SDLTest_TestCaseFp) asin_outOfDomainCases, "asin_outOfDomainCases", + (SDLTest_TestCaseFp)asin_outOfDomainCases, "asin_outOfDomainCases", "Checks values outside the domain", TEST_ENABLED }; static const SDLTest_TestCaseReference asinTestNan = { - (SDLTest_TestCaseFp) asin_nanCase, "asin_nanCase", + (SDLTest_TestCaseFp)asin_nanCase, "asin_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference asinTestPrecision = { - (SDLTest_TestCaseFp) asin_precisionTest, "asin_precisionTest", + (SDLTest_TestCaseFp)asin_precisionTest, "asin_precisionTest", "Checks asin precision", TEST_ENABLED }; /* SDL_atan test cases */ static const SDLTest_TestCaseReference atanTestLimit = { - (SDLTest_TestCaseFp) atan_limitCases, "atan_limitCases", + (SDLTest_TestCaseFp)atan_limitCases, "atan_limitCases", "Checks the edge of the domain (+/-Infinity)", TEST_ENABLED }; static const SDLTest_TestCaseReference atanTestZero = { - (SDLTest_TestCaseFp) atan_zeroCases, "atan_zeroCases", + (SDLTest_TestCaseFp)atan_zeroCases, "atan_zeroCases", "Checks for positive and negative zero", TEST_ENABLED }; static const SDLTest_TestCaseReference atanTestNan = { - (SDLTest_TestCaseFp) atan_nanCase, "atan_nanCase", + (SDLTest_TestCaseFp)atan_nanCase, "atan_nanCase", "Checks NAN", TEST_ENABLED }; static const SDLTest_TestCaseReference atanTestPrecision = { - (SDLTest_TestCaseFp) atan_precisionTest, "atan_precisionTest", + (SDLTest_TestCaseFp)atan_precisionTest, "atan_precisionTest", "Checks atan precision", TEST_ENABLED }; /* SDL_atan2 test cases */ static const SDLTest_TestCaseReference atan2TestZero1 = { - (SDLTest_TestCaseFp) atan2_bothZeroCases, "atan2_bothZeroCases", + (SDLTest_TestCaseFp)atan2_bothZeroCases, "atan2_bothZeroCases", "Checks for both arguments being zero", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestZero2 = { - (SDLTest_TestCaseFp) atan2_yZeroCases, "atan2_yZeroCases", + (SDLTest_TestCaseFp)atan2_yZeroCases, "atan2_yZeroCases", "Checks for y=0", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestZero3 = { - (SDLTest_TestCaseFp) atan2_xZeroCases, "atan2_xZeroCases", + (SDLTest_TestCaseFp)atan2_xZeroCases, "atan2_xZeroCases", "Checks for x=0", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestInf1 = { - (SDLTest_TestCaseFp) atan2_bothInfCases, "atan2_bothInfCases", + (SDLTest_TestCaseFp)atan2_bothInfCases, "atan2_bothInfCases", "Checks for both arguments being infinity", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestInf2 = { - (SDLTest_TestCaseFp) atan2_yInfCases, "atan2_yInfCases", + (SDLTest_TestCaseFp)atan2_yInfCases, "atan2_yInfCases", "Checks for y=0", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestInf3 = { - (SDLTest_TestCaseFp) atan2_xInfCases, "atan2_xInfCases", + (SDLTest_TestCaseFp)atan2_xInfCases, "atan2_xInfCases", "Checks for x=0", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestNan = { - (SDLTest_TestCaseFp) atan2_nanCases, "atan2_nanCases", + (SDLTest_TestCaseFp)atan2_nanCases, "atan2_nanCases", "Checks NANs", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestQuadrantTopRight = { - (SDLTest_TestCaseFp) atan2_topRightQuadrantTest, "atan2_topRightQuadrantTest", + (SDLTest_TestCaseFp)atan2_topRightQuadrantTest, "atan2_topRightQuadrantTest", "Checks values in the top right quadrant", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestQuadrantTopLeft = { - (SDLTest_TestCaseFp) atan2_topLeftQuadrantTest, "atan2_topLeftQuadrantTest", + (SDLTest_TestCaseFp)atan2_topLeftQuadrantTest, "atan2_topLeftQuadrantTest", "Checks values in the top left quadrant", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestQuadrantBottomRight = { - (SDLTest_TestCaseFp) atan2_bottomRightQuadrantTest, "atan2_bottomRightQuadrantTest", + (SDLTest_TestCaseFp)atan2_bottomRightQuadrantTest, "atan2_bottomRightQuadrantTest", "Checks values in the bottom right quadrant", TEST_ENABLED }; static const SDLTest_TestCaseReference atan2TestQuadrantBottomLeft = { - (SDLTest_TestCaseFp) atan2_bottomLeftQuadrantTest, "atan2_bottomLeftQuadrantTest", + (SDLTest_TestCaseFp)atan2_bottomLeftQuadrantTest, "atan2_bottomLeftQuadrantTest", "Checks values in the bottom left quadrant", TEST_ENABLED }; diff --git a/modules/SDL2/test/testautomation_mouse.c b/modules/SDL2/test/testautomation_mouse.c index f833480..22a4378 100644 --- a/modules/SDL2/test/testautomation_mouse.c +++ b/modules/SDL2/test/testautomation_mouse.c @@ -15,178 +15,175 @@ /* Helper to evaluate state returned from SDL_GetMouseState */ int _mouseStateCheck(Uint32 state) { - return (state == 0) || - (state == SDL_BUTTON(SDL_BUTTON_LEFT)) || - (state == SDL_BUTTON(SDL_BUTTON_MIDDLE)) || - (state == SDL_BUTTON(SDL_BUTTON_RIGHT)) || - (state == SDL_BUTTON(SDL_BUTTON_X1)) || - (state == SDL_BUTTON(SDL_BUTTON_X2)); + return (state == 0) || + (state == SDL_BUTTON(SDL_BUTTON_LEFT)) || + (state == SDL_BUTTON(SDL_BUTTON_MIDDLE)) || + (state == SDL_BUTTON(SDL_BUTTON_RIGHT)) || + (state == SDL_BUTTON(SDL_BUTTON_X1)) || + (state == SDL_BUTTON(SDL_BUTTON_X2)); } /** * @brief Check call to SDL_GetMouseState * */ -int -mouse_getMouseState(void *arg) +int mouse_getMouseState(void *arg) { - int x; - int y; - Uint32 state; - - /* Pump some events to update mouse state */ - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - - /* Case where x, y pointer is NULL */ - state = SDL_GetMouseState(NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, NULL)"); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where x pointer is not NULL */ - x = INT_MIN; - state = SDL_GetMouseState(&x, NULL); - SDLTest_AssertPass("Call to SDL_GetMouseState(&x, NULL)"); - SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where y pointer is not NULL */ - y = INT_MIN; - state = SDL_GetMouseState(NULL, &y); - SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, &y)"); - SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where x and y pointer is not NULL */ - x = INT_MIN; - y = INT_MIN; - state = SDL_GetMouseState(&x, &y); - SDLTest_AssertPass("Call to SDL_GetMouseState(&x, &y)"); - SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); - SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - return TEST_COMPLETED; + int x; + int y; + Uint32 state; + + /* Pump some events to update mouse state */ + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + + /* Case where x, y pointer is NULL */ + state = SDL_GetMouseState(NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, NULL)"); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where x pointer is not NULL */ + x = INT_MIN; + state = SDL_GetMouseState(&x, NULL); + SDLTest_AssertPass("Call to SDL_GetMouseState(&x, NULL)"); + SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where y pointer is not NULL */ + y = INT_MIN; + state = SDL_GetMouseState(NULL, &y); + SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, &y)"); + SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where x and y pointer is not NULL */ + x = INT_MIN; + y = INT_MIN; + state = SDL_GetMouseState(&x, &y); + SDLTest_AssertPass("Call to SDL_GetMouseState(&x, &y)"); + SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); + SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetRelativeMouseState * */ -int -mouse_getRelativeMouseState(void *arg) +int mouse_getRelativeMouseState(void *arg) { - int x; - int y; - Uint32 state; - - /* Pump some events to update mouse state */ - SDL_PumpEvents(); - SDLTest_AssertPass("Call to SDL_PumpEvents()"); - - /* Case where x, y pointer is NULL */ - state = SDL_GetRelativeMouseState(NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, NULL)"); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where x pointer is not NULL */ - x = INT_MIN; - state = SDL_GetRelativeMouseState(&x, NULL); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, NULL)"); - SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where y pointer is not NULL */ - y = INT_MIN; - state = SDL_GetRelativeMouseState(NULL, &y); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, &y)"); - SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - /* Case where x and y pointer is not NULL */ - x = INT_MIN; - y = INT_MIN; - state = SDL_GetRelativeMouseState(&x, &y); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, &y)"); - SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); - SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); - SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); - - return TEST_COMPLETED; -} + int x; + int y; + Uint32 state; + /* Pump some events to update mouse state */ + SDL_PumpEvents(); + SDLTest_AssertPass("Call to SDL_PumpEvents()"); + + /* Case where x, y pointer is NULL */ + state = SDL_GetRelativeMouseState(NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, NULL)"); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where x pointer is not NULL */ + x = INT_MIN; + state = SDL_GetRelativeMouseState(&x, NULL); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, NULL)"); + SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where y pointer is not NULL */ + y = INT_MIN; + state = SDL_GetRelativeMouseState(NULL, &y); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, &y)"); + SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + /* Case where x and y pointer is not NULL */ + x = INT_MIN; + y = INT_MIN; + state = SDL_GetRelativeMouseState(&x, &y); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, &y)"); + SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); + SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); + SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state); + + return TEST_COMPLETED; +} /* XPM definition of mouse Cursor */ static const char *_mouseArrowData[] = { - /* pixels */ - "X ", - "XX ", - "X.X ", - "X..X ", - "X...X ", - "X....X ", - "X.....X ", - "X......X ", - "X.......X ", - "X........X ", - "X.....XXXXX ", - "X..X..X ", - "X.X X..X ", - "XX X..X ", - "X X..X ", - " X..X ", - " X..X ", - " X..X ", - " XX ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " + /* pixels */ + "X ", + "XX ", + "X.X ", + "X..X ", + "X...X ", + "X....X ", + "X.....X ", + "X......X ", + "X.......X ", + "X........X ", + "X.....XXXXX ", + "X..X..X ", + "X.X X..X ", + "XX X..X ", + "X X..X ", + " X..X ", + " X..X ", + " X..X ", + " XX ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " }; /* Helper that creates a new mouse cursor from an XPM */ static SDL_Cursor *_initArrowCursor(const char *image[]) { - SDL_Cursor *cursor; - int i, row, col; - Uint8 data[4*32]; - Uint8 mask[4*32]; - - i = -1; - for ( row=0; row<32; ++row ) { - for ( col=0; col<32; ++col ) { - if ( col % 8 ) { - data[i] <<= 1; - mask[i] <<= 1; - } else { - ++i; - data[i] = mask[i] = 0; - } - switch (image[row][col]) { - case 'X': - data[i] |= 0x01; - mask[i] |= 0x01; - break; - case '.': - mask[i] |= 0x01; - break; - case ' ': - break; - } + SDL_Cursor *cursor; + int i, row, col; + Uint8 data[4 * 32]; + Uint8 mask[4 * 32]; + + i = -1; + for (row = 0; row < 32; ++row) { + for (col = 0; col < 32; ++col) { + if (col % 8) { + data[i] <<= 1; + mask[i] <<= 1; + } else { + ++i; + data[i] = mask[i] = 0; + } + switch (image[row][col]) { + case 'X': + data[i] |= 0x01; + mask[i] |= 0x01; + break; + case '.': + mask[i] |= 0x01; + break; + case ' ': + break; + } + } } - } - cursor = SDL_CreateCursor(data, mask, 32, 32, 0, 0); - return cursor; + cursor = SDL_CreateCursor(data, mask, 32, 32, 0, 0); + return cursor; } /** @@ -195,15 +192,14 @@ static SDL_Cursor *_initArrowCursor(const char *image[]) * @sa http://wiki.libsdl.org/SDL_CreateCursor * @sa http://wiki.libsdl.org/SDL_FreeCursor */ -int -mouse_createFreeCursor(void *arg) +int mouse_createFreeCursor(void *arg) { SDL_Cursor *cursor; /* Create a cursor */ cursor = _initArrowCursor(_mouseArrowData); - SDLTest_AssertPass("Call to SDL_CreateCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); + SDLTest_AssertPass("Call to SDL_CreateCursor()"); + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); if (cursor == NULL) { return TEST_ABORTED; } @@ -221,8 +217,7 @@ mouse_createFreeCursor(void *arg) * @sa http://wiki.libsdl.org/SDL_CreateColorCursor * @sa http://wiki.libsdl.org/SDL_FreeCursor */ -int -mouse_createFreeColorCursor(void *arg) +int mouse_createFreeColorCursor(void *arg) { SDL_Surface *face; SDL_Cursor *cursor; @@ -230,12 +225,14 @@ mouse_createFreeColorCursor(void *arg) /* Get sample surface */ face = SDLTest_ImageFace(); SDLTest_AssertCheck(face != NULL, "Validate sample input image is not NULL"); - if (face == NULL) return TEST_ABORTED; + if (face == NULL) { + return TEST_ABORTED; + } /* Create a color cursor from surface */ cursor = SDL_CreateColorCursor(face, 0, 0); - SDLTest_AssertPass("Call to SDL_CreateColorCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateColorCursor() is not NULL"); + SDLTest_AssertPass("Call to SDL_CreateColorCursor()"); + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateColorCursor() is not NULL"); if (cursor == NULL) { SDL_FreeSurface(face); return TEST_ABORTED; @@ -258,18 +255,18 @@ void _changeCursorVisibility(int state) int newState; int result; - oldState = SDL_ShowCursor(SDL_QUERY); + oldState = SDL_ShowCursor(SDL_QUERY); SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); - result = SDL_ShowCursor(state); + result = SDL_ShowCursor(state); SDLTest_AssertPass("Call to SDL_ShowCursor(%s)", (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE"); SDLTest_AssertCheck(result == oldState, "Validate result from SDL_ShowCursor(%s), expected: %i, got: %i", - (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE", oldState, result); + (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE", oldState, result); newState = SDL_ShowCursor(SDL_QUERY); SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); SDLTest_AssertCheck(state == newState, "Validate new state, expected: %i, got: %i", - state, newState); + state, newState); } /** @@ -277,8 +274,7 @@ void _changeCursorVisibility(int state) * * @sa http://wiki.libsdl.org/SDL_ShowCursor */ -int -mouse_showCursor(void *arg) +int mouse_showCursor(void *arg) { int currentState; @@ -286,7 +282,7 @@ mouse_showCursor(void *arg) currentState = SDL_ShowCursor(SDL_QUERY); SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); SDLTest_AssertCheck(currentState == SDL_DISABLE || currentState == SDL_ENABLE, - "Validate result is %i or %i, got: %i", SDL_DISABLE, SDL_ENABLE, currentState); + "Validate result is %i or %i, got: %i", SDL_DISABLE, SDL_ENABLE, currentState); if (currentState == SDL_DISABLE) { /* Show the cursor, then hide it again */ _changeCursorVisibility(SDL_ENABLE); @@ -307,15 +303,14 @@ mouse_showCursor(void *arg) * * @sa http://wiki.libsdl.org/SDL_SetCursor */ -int -mouse_setCursor(void *arg) +int mouse_setCursor(void *arg) { SDL_Cursor *cursor; /* Create a cursor */ cursor = _initArrowCursor(_mouseArrowData); - SDLTest_AssertPass("Call to SDL_CreateCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); + SDLTest_AssertPass("Call to SDL_CreateCursor()"); + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); if (cursor == NULL) { return TEST_ABORTED; } @@ -340,15 +335,14 @@ mouse_setCursor(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetCursor */ -int -mouse_getCursor(void *arg) +int mouse_getCursor(void *arg) { SDL_Cursor *cursor; /* Get current cursor */ cursor = SDL_GetCursor(); - SDLTest_AssertPass("Call to SDL_GetCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_GetCursor() is not NULL"); + SDLTest_AssertPass("Call to SDL_GetCursor()"); + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_GetCursor() is not NULL"); return TEST_COMPLETED; } @@ -359,52 +353,51 @@ mouse_getCursor(void *arg) * @sa http://wiki.libsdl.org/SDL_GetRelativeMouseMode * @sa http://wiki.libsdl.org/SDL_SetRelativeMouseMode */ -int -mouse_getSetRelativeMouseMode(void *arg) +int mouse_getSetRelativeMouseMode(void *arg) { int result; - int i; + int i; SDL_bool initialState; SDL_bool currentState; /* Capture original state so we can revert back to it later */ initialState = SDL_GetRelativeMouseMode(); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); - /* Repeat twice to check D->D transition */ - for (i=0; i<2; i++) { - /* Disable - should always be supported */ - result = SDL_SetRelativeMouseMode(SDL_FALSE); - SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); - SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); - currentState = SDL_GetRelativeMouseMode(); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); - SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); - } + /* Repeat twice to check D->D transition */ + for (i = 0; i < 2; i++) { + /* Disable - should always be supported */ + result = SDL_SetRelativeMouseMode(SDL_FALSE); + SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); + SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); + currentState = SDL_GetRelativeMouseMode(); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); + SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); + } - /* Repeat twice to check D->E->E transition */ - for (i=0; i<2; i++) { - /* Enable - may not be supported */ - result = SDL_SetRelativeMouseMode(SDL_TRUE); - SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(TRUE)"); - if (result != -1) { + /* Repeat twice to check D->E->E transition */ + for (i = 0; i < 2; i++) { + /* Enable - may not be supported */ + result = SDL_SetRelativeMouseMode(SDL_TRUE); + SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(TRUE)"); + if (result != -1) { SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); - currentState = SDL_GetRelativeMouseMode(); + currentState = SDL_GetRelativeMouseMode(); SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); SDLTest_AssertCheck(currentState == SDL_TRUE, "Validate current state is TRUE, got: %i", currentState); - } } + } /* Disable to check E->D transition */ - result = SDL_SetRelativeMouseMode(SDL_FALSE); - SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); - SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); + result = SDL_SetRelativeMouseMode(SDL_FALSE); + SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); + SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); currentState = SDL_GetRelativeMouseMode(); - SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); - SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); + SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); + SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); - /* Revert to original state - ignore result */ - result = SDL_SetRelativeMouseMode(initialState); + /* Revert to original state - ignore result */ + result = SDL_SetRelativeMouseMode(initialState); return TEST_COMPLETED; } @@ -417,12 +410,12 @@ mouse_getSetRelativeMouseMode(void *arg) */ SDL_Window *_createMouseSuiteTestWindow() { - int posX = 100, posY = 100, width = MOUSE_TESTWINDOW_WIDTH, height = MOUSE_TESTWINDOW_HEIGHT; - SDL_Window *window; - window = SDL_CreateWindow("mouse_createMouseSuiteTestWindow", posX, posY, width, height, 0); - SDLTest_AssertPass("SDL_CreateWindow()"); - SDLTest_AssertCheck(window != NULL, "Check SDL_CreateWindow result"); - return window; + int posX = 100, posY = 100, width = MOUSE_TESTWINDOW_WIDTH, height = MOUSE_TESTWINDOW_HEIGHT; + SDL_Window *window; + window = SDL_CreateWindow("mouse_createMouseSuiteTestWindow", posX, posY, width, height, 0); + SDLTest_AssertPass("SDL_CreateWindow()"); + SDLTest_AssertCheck(window != NULL, "Check SDL_CreateWindow result"); + return window; } /* @@ -430,11 +423,11 @@ SDL_Window *_createMouseSuiteTestWindow() */ void _destroyMouseSuiteTestWindow(SDL_Window *window) { - if (window != NULL) { - SDL_DestroyWindow(window); - window = NULL; - SDLTest_AssertPass("SDL_DestroyWindow()"); - } + if (window != NULL) { + SDL_DestroyWindow(window); + window = NULL; + SDLTest_AssertPass("SDL_DestroyWindow()"); + } } /** @@ -442,8 +435,7 @@ void _destroyMouseSuiteTestWindow(SDL_Window *window) * * @sa http://wiki.libsdl.org/SDL_WarpMouseInWindow */ -int -mouse_warpMouseInWindow(void *arg) +int mouse_warpMouseInWindow(void *arg) { const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT; int numPositions = 6; @@ -455,45 +447,46 @@ mouse_warpMouseInWindow(void *arg) xPositions[0] = -1; xPositions[1] = 0; xPositions[2] = 1; - xPositions[3] = w-1; + xPositions[3] = w - 1; xPositions[4] = w; - xPositions[5] = w+1; + xPositions[5] = w + 1; yPositions[0] = -1; yPositions[1] = 0; yPositions[2] = 1; - yPositions[3] = h-1; + yPositions[3] = h - 1; yPositions[4] = h; - yPositions[5] = h+1; + yPositions[5] = h + 1; /* Create test window */ window = _createMouseSuiteTestWindow(); - if (window == NULL) return TEST_ABORTED; + if (window == NULL) { + return TEST_ABORTED; + } /* Mouse to random position inside window */ - x = SDLTest_RandomIntegerInRange(1, w-1); - y = SDLTest_RandomIntegerInRange(1, h-1); + x = SDLTest_RandomIntegerInRange(1, w - 1); + y = SDLTest_RandomIntegerInRange(1, h - 1); SDL_WarpMouseInWindow(window, x, y); SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); - /* Same position again */ + /* Same position again */ SDL_WarpMouseInWindow(window, x, y); SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); /* Mouse to various boundary positions */ - for (i=0; iformat == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format); - SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel); - SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel); - masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; - SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %" SDL_PRIu32, masks); - - /* Deallocate again */ - SDL_FreeFormat(result); - SDLTest_AssertPass("Call to SDL_FreeFormat()"); - } + const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; + const char *error; + int i; + Uint32 format; + Uint32 masks; + SDL_PixelFormat *result; - /* RGB formats */ - for (i = 0; i < _numRGBPixelFormats; i++) { - format = _RGBPixelFormats[i]; - SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format); + /* Blank/unknown format */ + format = 0; + SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", unknownFormat, format); /* Allocate format */ result = SDL_AllocFormat(format); SDLTest_AssertPass("Call to SDL_AllocFormat()"); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format); - SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel); - SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel); - if (result->palette != NULL) { - masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; - SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %" SDL_PRIu32, masks); - } - - /* Deallocate again */ - SDL_FreeFormat(result); - SDLTest_AssertPass("Call to SDL_FreeFormat()"); + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel); + masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; + SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %" SDL_PRIu32, masks); + + /* Deallocate again */ + SDL_FreeFormat(result); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); } - } - - /* Non-RGB formats */ - for (i = 0; i < _numNonRGBPixelFormats; i++) { - format = _nonRGBPixelFormats[i]; - SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format); - /* Try to allocate format */ - result = SDL_AllocFormat(format); - SDLTest_AssertPass("Call to SDL_AllocFormat()"); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - } + /* RGB formats */ + for (i = 0; i < _numRGBPixelFormats; i++) { + format = _RGBPixelFormats[i]; + SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format); + + /* Allocate format */ + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel); + if (result->palette != NULL) { + masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; + SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %" SDL_PRIu32, masks); + } + + /* Deallocate again */ + SDL_FreeFormat(result); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); + } + } - /* Negative cases */ +#if 0 /* This succeeds for SDL3, but we don't expect SDL2 applications to call SDL_AllocFormat() for FOURCC formats directly */ + /* Non-RGB formats */ + for (i = 0; i < _numNonRGBPixelFormats; i++) { + format = _nonRGBPixelFormats[i]; + SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format); - /* Invalid Formats */ - for (i = 0; i < _numInvalidPixelFormats; i++) { - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - format = _invalidPixelFormats[i]; - result = SDL_AllocFormat(format); - SDLTest_AssertPass("Call to SDL_AllocFormat(%" SDL_PRIu32 ")", format); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); + /* Try to allocate format */ + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat()"); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + } +#endif + + /* Negative cases */ + + /* Invalid Formats */ + for (i = 0; i < _numInvalidPixelFormats; i++) { + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + format = _invalidPixelFormats[i]; + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat(%" SDL_PRIu32 ")", format); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); } - } - - /* Invalid free pointer */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_FreeFormat(NULL); - SDLTest_AssertPass("Call to SDL_FreeFormat(NULL)"); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -230,83 +207,82 @@ pixels_allocFreeFormat(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetPixelFormatName */ -int -pixels_getPixelFormatName(void *arg) +int pixels_getPixelFormatName(void *arg) { - const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; - const char *error; - int i; - Uint32 format; - const char *result; - - /* Blank/undefined format */ - format = 0; - SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", unknownFormat, format); - - /* Get name of format */ - result = SDL_GetPixelFormatName(format); - SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); - if (result != NULL) { - SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, - "Verify result text; expected: %s, got %s", unknownFormat, result); - } + const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; + const char *error; + int i; + Uint32 format; + const char *result; - /* RGB formats */ - for (i = 0; i < _numRGBPixelFormats; i++) { - format = _RGBPixelFormats[i]; - SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format); + /* Blank/undefined format */ + format = 0; + SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", unknownFormat, format); /* Get name of format */ result = SDL_GetPixelFormatName(format); SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, - "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result); + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, + "Verify result text; expected: %s, got %s", unknownFormat, result); } - } - /* Non-RGB formats */ - for (i = 0; i < _numNonRGBPixelFormats; i++) { - format = _nonRGBPixelFormats[i]; - SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format); + /* RGB formats */ + for (i = 0; i < _numRGBPixelFormats; i++) { + format = _RGBPixelFormats[i]; + SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format); + + /* Get name of format */ + result = SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, + "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result); + } + } - /* Get name of format */ - result = SDL_GetPixelFormatName(format); - SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); - if (result != NULL) { - SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, - "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result); + /* Non-RGB formats */ + for (i = 0; i < _numNonRGBPixelFormats; i++) { + format = _nonRGBPixelFormats[i]; + SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format); + + /* Get name of format */ + result = SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, + "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result); + } } - } - /* Negative cases */ + /* Negative cases */ - /* Invalid Formats */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - for (i = 0; i < _numInvalidPixelFormats; i++) { - format = _invalidPixelFormats[i]; - result = SDL_GetPixelFormatName(format); - SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%" SDL_PRIu32 ")", format); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); - if (result != NULL) { - SDLTest_AssertCheck(result[0] != '\0', - "Verify result is non-empty; got: %s", result); - SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0, - "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result); + /* Invalid Formats */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + for (i = 0; i < _numInvalidPixelFormats; i++) { + format = _invalidPixelFormats[i]; + result = SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%" SDL_PRIu32 ")", format); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result[0] != '\0', + "Verify result is non-empty; got: %s", result); + SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0, + "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result); + } + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error == NULL || error[0] == '\0', "Validate that error message is empty"); } - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error == NULL || error[0] == '\0', "Validate that error message is empty"); - } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -315,89 +291,74 @@ pixels_getPixelFormatName(void *arg) * @sa http://wiki.libsdl.org/SDL_AllocPalette * @sa http://wiki.libsdl.org/SDL_FreePalette */ -int -pixels_allocFreePalette(void *arg) +int pixels_allocFreePalette(void *arg) { - const char *expectedError1 = "Parameter 'ncolors' is invalid"; - const char *expectedError2 = "Parameter 'palette' is invalid"; - const char *error; - int variation; - int i; - int ncolors; - SDL_Palette* result; - - /* Allocate palette */ - for (variation = 1; variation <= 3; variation++) { - switch (variation) { - /* Just one color */ - default: - case 1: - ncolors = 1; - break; - /* Two colors */ - case 2: - ncolors = 2; - break; - /* More than two colors */ - case 3: - ncolors = SDLTest_RandomIntegerInRange(8, 16); - break; + const char *expectedError1 = "Parameter 'ncolors' is invalid"; + const char *error; + int variation; + int i; + int ncolors; + SDL_Palette *result; + + /* Allocate palette */ + for (variation = 1; variation <= 3; variation++) { + switch (variation) { + /* Just one color */ + default: + case 1: + ncolors = 1; + break; + /* Two colors */ + case 2: + ncolors = 2; + break; + /* More than two colors */ + case 3: + ncolors = SDLTest_RandomIntegerInRange(8, 16); + break; + } + + result = SDL_AllocPalette(ncolors); + SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors); + if (result->ncolors > 0) { + SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL"); + if (result->colors != NULL) { + for (i = 0; i < result->ncolors; i++) { + SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r); + SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g); + SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b); + } + } + } + + /* Deallocate again */ + SDL_FreePalette(result); + SDLTest_AssertPass("Call to SDL_FreePalette()"); + } } - result = SDL_AllocPalette(ncolors); - SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); - if (result != NULL) { - SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors); - if (result->ncolors > 0) { - SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL"); - if (result->colors != NULL) { - for(i = 0; i < result->ncolors; i++) { - SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r); - SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g); - SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b); - } - } - } - - /* Deallocate again */ - SDL_FreePalette(result); - SDLTest_AssertPass("Call to SDL_FreePalette()"); + /* Negative cases */ + + /* Invalid number of colors */ + for (ncolors = 0; ncolors > -3; ncolors--) { + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + result = SDL_AllocPalette(ncolors); + SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError1, error); + } } - } - /* Negative cases */ - - /* Invalid number of colors */ - for (ncolors = 0; ncolors > -3; ncolors--) { - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - result = SDL_AllocPalette(ncolors); - SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError1, error); - } - } - - /* Invalid free pointer */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_FreePalette(NULL); - SDLTest_AssertPass("Call to SDL_FreePalette(NULL)"); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError2, error); - } - - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -507,11 +468,13 @@ pixels_calcGammaRamp(void *arg) /* ================= Test References ================== */ /* Pixels test cases */ -static const SDLTest_TestCaseReference pixelsTest1 = - { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }; +static const SDLTest_TestCaseReference pixelsTest1 = { + (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED +}; -static const SDLTest_TestCaseReference pixelsTest2 = - { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }; +static const SDLTest_TestCaseReference pixelsTest2 = { + (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED +}; static const SDLTest_TestCaseReference pixelsTest3 = { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }; diff --git a/modules/SDL2/test/testautomation_platform.c b/modules/SDL2/test/testautomation_platform.c index e866148..ac85eef 100644 --- a/modules/SDL2/test/testautomation_platform.c +++ b/modules/SDL2/test/testautomation_platform.c @@ -19,7 +19,7 @@ * compare them directly, so we push it through a function to keep the * compiler quiet. --ryan. */ -static int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype ) +static int _compareSizeOfType(size_t sizeoftype, size_t hardcodetype) { return sizeoftype != hardcodetype; } @@ -31,21 +31,21 @@ static int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype ) */ int platform_testTypes(void *arg) { - int ret; + int ret; - ret = _compareSizeOfType( sizeof(Uint8), 1 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", (unsigned long)sizeof(Uint8) ); + ret = _compareSizeOfType(sizeof(Uint8), 1); + SDLTest_AssertCheck(ret == 0, "sizeof(Uint8) = %u, expected 1", (unsigned int)sizeof(Uint8)); - ret = _compareSizeOfType( sizeof(Uint16), 2 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", (unsigned long)sizeof(Uint16) ); + ret = _compareSizeOfType(sizeof(Uint16), 2); + SDLTest_AssertCheck(ret == 0, "sizeof(Uint16) = %u, expected 2", (unsigned int)sizeof(Uint16)); - ret = _compareSizeOfType( sizeof(Uint32), 4 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", (unsigned long)sizeof(Uint32) ); + ret = _compareSizeOfType(sizeof(Uint32), 4); + SDLTest_AssertCheck(ret == 0, "sizeof(Uint32) = %u, expected 4", (unsigned int)sizeof(Uint32)); - ret = _compareSizeOfType( sizeof(Uint64), 8 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", (unsigned long)sizeof(Uint64) ); + ret = _compareSizeOfType(sizeof(Uint64), 8); + SDLTest_AssertCheck(ret == 0, "sizeof(Uint64) = %u, expected 8", (unsigned int)sizeof(Uint64)); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -61,9 +61,10 @@ int platform_testEndianessAndSwap(void *arg) Uint32 value32 = 0xEFBEADDE; Uint32 swapped32 = 0xDEADBEEF; - union { - double d; - Uint32 ui32[2]; + union + { + double d; + Uint32 ui32[2]; } value_double; Uint64 value64, swapped64; @@ -75,17 +76,17 @@ int platform_testEndianessAndSwap(void *arg) swapped64 |= 0xDEADBEEF; value_double.d = 3.141593; - if ((*((char *) &value) >> 4) == 0x1) { + if ((*((char *)&value) >> 4) == 0x1) { real_byteorder = SDL_BIG_ENDIAN; } else { real_byteorder = SDL_LIL_ENDIAN; } /* Test endianness. */ - SDLTest_AssertCheck( real_byteorder == SDL_BYTEORDER, - "Machine detected as %s endian, appears to be %s endian.", - (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big", - (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big" ); + SDLTest_AssertCheck(real_byteorder == SDL_BYTEORDER, + "Machine detected as %s endian, appears to be %s endian.", + (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big", + (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big"); if (value_double.ui32[0] == 0x82c2bd7f && value_double.ui32[1] == 0x400921fb) { real_floatwordorder = SDL_LIL_ENDIAN; @@ -94,27 +95,28 @@ int platform_testEndianessAndSwap(void *arg) } /* Test endianness. */ - SDLTest_AssertCheck( real_floatwordorder == SDL_FLOATWORDORDER, - "Machine detected as having %s endian float word order, appears to be %s endian.", - (SDL_FLOATWORDORDER == SDL_LIL_ENDIAN) ? "little" : "big", - (real_floatwordorder == SDL_LIL_ENDIAN) ? "little" : (real_floatwordorder == SDL_BIG_ENDIAN) ? "big" : "unknown" ); + SDLTest_AssertCheck(real_floatwordorder == SDL_FLOATWORDORDER, + "Machine detected as having %s endian float word order, appears to be %s endian.", + (SDL_FLOATWORDORDER == SDL_LIL_ENDIAN) ? "little" : "big", + (real_floatwordorder == SDL_LIL_ENDIAN) ? "little" : (real_floatwordorder == SDL_BIG_ENDIAN) ? "big" + : "unknown"); /* Test 16 swap. */ - SDLTest_AssertCheck( SDL_Swap16(value16) == swapped16, - "SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X", - value16, SDL_Swap16(value16) ); + SDLTest_AssertCheck(SDL_Swap16(value16) == swapped16, + "SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X", + value16, SDL_Swap16(value16)); /* Test 32 swap. */ - SDLTest_AssertCheck( SDL_Swap32(value32) == swapped32, - "SDL_Swap32(): 32 bit swapped: 0x%" SDL_PRIX32 " => 0x%" SDL_PRIX32, - value32, SDL_Swap32(value32) ); + SDLTest_AssertCheck(SDL_Swap32(value32) == swapped32, + "SDL_Swap32(): 32 bit swapped: 0x%" SDL_PRIX32 " => 0x%" SDL_PRIX32, + value32, SDL_Swap32(value32)); /* Test 64 swap. */ - SDLTest_AssertCheck( SDL_Swap64(value64) == swapped64, - "SDL_Swap64(): 64 bit swapped: 0x%"SDL_PRIX64" => 0x%"SDL_PRIX64, - value64, SDL_Swap64(value64) ); + SDLTest_AssertCheck(SDL_Swap64(value64) == swapped64, + "SDL_Swap64(): 64 bit swapped: 0x%" SDL_PRIX64 " => 0x%" SDL_PRIX64, + value64, SDL_Swap64(value64)); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ! @@ -126,41 +128,41 @@ int platform_testEndianessAndSwap(void *arg) * http://wiki.libsdl.org/SDL_GetRevision * http://wiki.libsdl.org/SDL_GetRevisionNumber */ -int platform_testGetFunctions (void *arg) +int platform_testGetFunctions(void *arg) { - char *platform; - char *revision; - int ret; - size_t len; - - platform = (char *)SDL_GetPlatform(); - SDLTest_AssertPass("SDL_GetPlatform()"); - SDLTest_AssertCheck(platform != NULL, "SDL_GetPlatform() != NULL"); - if (platform != NULL) { - len = SDL_strlen(platform); - SDLTest_AssertCheck(len > 0, - "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i", - platform, - (int) len); - } - - ret = SDL_GetCPUCount(); - SDLTest_AssertPass("SDL_GetCPUCount()"); - SDLTest_AssertCheck(ret > 0, - "SDL_GetCPUCount(): expected count > 0, was: %i", - ret); - - ret = SDL_GetCPUCacheLineSize(); - SDLTest_AssertPass("SDL_GetCPUCacheLineSize()"); - SDLTest_AssertCheck(ret >= 0, - "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i", - ret); - - revision = (char *)SDL_GetRevision(); - SDLTest_AssertPass("SDL_GetRevision()"); - SDLTest_AssertCheck(revision != NULL, "SDL_GetRevision() != NULL"); - - return TEST_COMPLETED; + char *platform; + char *revision; + int ret; + size_t len; + + platform = (char *)SDL_GetPlatform(); + SDLTest_AssertPass("SDL_GetPlatform()"); + SDLTest_AssertCheck(platform != NULL, "SDL_GetPlatform() != NULL"); + if (platform != NULL) { + len = SDL_strlen(platform); + SDLTest_AssertCheck(len > 0, + "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i", + platform, + (int)len); + } + + ret = SDL_GetCPUCount(); + SDLTest_AssertPass("SDL_GetCPUCount()"); + SDLTest_AssertCheck(ret > 0, + "SDL_GetCPUCount(): expected count > 0, was: %i", + ret); + + ret = SDL_GetCPUCacheLineSize(); + SDLTest_AssertPass("SDL_GetCPUCacheLineSize()"); + SDLTest_AssertCheck(ret >= 0, + "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i", + ret); + + revision = (char *)SDL_GetRevision(); + SDLTest_AssertPass("SDL_GetRevision()"); + SDLTest_AssertCheck(revision != NULL, "SDL_GetRevision() != NULL"); + + return TEST_COMPLETED; } /* ! @@ -177,41 +179,41 @@ int platform_testGetFunctions (void *arg) * http://wiki.libsdl.org/SDL_HasSSE42 * http://wiki.libsdl.org/SDL_HasAVX */ -int platform_testHasFunctions (void *arg) +int platform_testHasFunctions(void *arg) { - /* TODO: independently determine and compare values as well */ + /* TODO: independently determine and compare values as well */ - SDL_HasRDTSC(); - SDLTest_AssertPass("SDL_HasRDTSC()"); + SDL_HasRDTSC(); + SDLTest_AssertPass("SDL_HasRDTSC()"); - SDL_HasAltiVec(); - SDLTest_AssertPass("SDL_HasAltiVec()"); + SDL_HasAltiVec(); + SDLTest_AssertPass("SDL_HasAltiVec()"); - SDL_HasMMX(); - SDLTest_AssertPass("SDL_HasMMX()"); + SDL_HasMMX(); + SDLTest_AssertPass("SDL_HasMMX()"); - SDL_Has3DNow(); - SDLTest_AssertPass("SDL_Has3DNow()"); + SDL_Has3DNow(); + SDLTest_AssertPass("SDL_Has3DNow()"); - SDL_HasSSE(); - SDLTest_AssertPass("SDL_HasSSE()"); + SDL_HasSSE(); + SDLTest_AssertPass("SDL_HasSSE()"); - SDL_HasSSE2(); - SDLTest_AssertPass("SDL_HasSSE2()"); + SDL_HasSSE2(); + SDLTest_AssertPass("SDL_HasSSE2()"); - SDL_HasSSE3(); - SDLTest_AssertPass("SDL_HasSSE3()"); + SDL_HasSSE3(); + SDLTest_AssertPass("SDL_HasSSE3()"); - SDL_HasSSE41(); - SDLTest_AssertPass("SDL_HasSSE41()"); + SDL_HasSSE41(); + SDLTest_AssertPass("SDL_HasSSE41()"); - SDL_HasSSE42(); - SDLTest_AssertPass("SDL_HasSSE42()"); + SDL_HasSSE42(); + SDLTest_AssertPass("SDL_HasSSE42()"); - SDL_HasAVX(); - SDLTest_AssertPass("SDL_HasAVX()"); + SDL_HasAVX(); + SDLTest_AssertPass("SDL_HasAVX()"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ! @@ -221,67 +223,65 @@ int platform_testHasFunctions (void *arg) */ int platform_testGetVersion(void *arg) { - SDL_version linked; - int major = SDL_MAJOR_VERSION; - int minor = SDL_MINOR_VERSION; - - SDL_GetVersion(&linked); - SDLTest_AssertCheck( linked.major >= major, - "SDL_GetVersion(): returned major %i (>= %i)", - linked.major, - major); - SDLTest_AssertCheck( linked.minor >= minor, - "SDL_GetVersion(): returned minor %i (>= %i)", - linked.minor, - minor); - - return TEST_COMPLETED; + SDL_version linked; + int major = SDL_MAJOR_VERSION; + int minor = SDL_MINOR_VERSION; + + SDL_GetVersion(&linked); + SDLTest_AssertCheck(linked.major >= major, + "SDL_GetVersion(): returned major %i (>= %i)", + linked.major, + major); + SDLTest_AssertCheck(linked.minor >= minor, + "SDL_GetVersion(): returned minor %i (>= %i)", + linked.minor, + minor); + + return TEST_COMPLETED; } - /* ! * \brief Tests SDL_VERSION macro */ int platform_testSDLVersion(void *arg) { - SDL_version compiled; - int major = SDL_MAJOR_VERSION; - int minor = SDL_MINOR_VERSION; - - SDL_VERSION(&compiled); - SDLTest_AssertCheck( compiled.major >= major, - "SDL_VERSION() returned major %i (>= %i)", - compiled.major, - major); - SDLTest_AssertCheck( compiled.minor >= minor, - "SDL_VERSION() returned minor %i (>= %i)", - compiled.minor, - minor); - - return TEST_COMPLETED; + SDL_version compiled; + int major = SDL_MAJOR_VERSION; + int minor = SDL_MINOR_VERSION; + + SDL_VERSION(&compiled); + SDLTest_AssertCheck(compiled.major >= major, + "SDL_VERSION() returned major %i (>= %i)", + compiled.major, + major); + SDLTest_AssertCheck(compiled.minor >= minor, + "SDL_VERSION() returned minor %i (>= %i)", + compiled.minor, + minor); + + return TEST_COMPLETED; } - /* ! * \brief Tests default SDL_Init */ int platform_testDefaultInit(void *arg) { - int ret; - int subsystem; + int ret; + int subsystem; - subsystem = SDL_WasInit(SDL_INIT_EVERYTHING); - SDLTest_AssertCheck( subsystem != 0, - "SDL_WasInit(0): returned %i, expected != 0", - subsystem); + subsystem = SDL_WasInit(SDL_INIT_EVERYTHING); + SDLTest_AssertCheck(subsystem != 0, + "SDL_WasInit(0): returned %i, expected != 0", + subsystem); - ret = SDL_Init(SDL_WasInit(SDL_INIT_EVERYTHING)); - SDLTest_AssertCheck( ret == 0, - "SDL_Init(0): returned %i, expected 0, error: %s", - ret, - SDL_GetError()); + ret = SDL_Init(SDL_WasInit(SDL_INIT_EVERYTHING)); + SDLTest_AssertCheck(ret == 0, + "SDL_Init(0): returned %i, expected 0, error: %s", + ret, + SDL_GetError()); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ! @@ -293,49 +293,47 @@ int platform_testDefaultInit(void *arg) */ int platform_testGetSetClearError(void *arg) { - int result; - const char *testError = "Testing"; - char *lastError; - size_t len; - - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == 0, - "SDL_GetError(): no message expected, len: %i", (int) len); - } - - result = SDL_SetError("%s", testError); - SDLTest_AssertPass("SDL_SetError()"); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == SDL_strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - (int) SDL_strlen(testError), - (int) len); - SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message %s, was message: %s", - testError, - lastError); - } - - /* Clean up */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + int result; + const char *testError = "Testing"; + char *lastError; + size_t len; + + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == 0, + "SDL_GetError(): no message expected, len: %i", (int)len); + } + + result = SDL_SetError("%s", testError); + SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == SDL_strlen(testError), + "SDL_GetError(): expected message len %i, was len: %i", + (int)SDL_strlen(testError), + (int)len); + SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0, + "SDL_GetError(): expected message %s, was message: %s", + testError, + lastError); + } + + /* Clean up */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* ! @@ -345,35 +343,34 @@ int platform_testGetSetClearError(void *arg) */ int platform_testSetErrorEmptyInput(void *arg) { - int result; - const char *testError = ""; - char *lastError; - size_t len; - - result = SDL_SetError("%s", testError); - SDLTest_AssertPass("SDL_SetError()"); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == SDL_strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - (int) SDL_strlen(testError), - (int) len); - SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - testError, - lastError); - } - - /* Clean up */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + int result; + const char *testError = ""; + char *lastError; + size_t len; + + result = SDL_SetError("%s", testError); + SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == SDL_strlen(testError), + "SDL_GetError(): expected message len %i, was len: %i", + (int)SDL_strlen(testError), + (int)len); + SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + testError, + lastError); + } + + /* Clean up */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } #if defined(HAVE_WFORMAT_OVERFLOW) @@ -388,80 +385,77 @@ int platform_testSetErrorEmptyInput(void *arg) */ int platform_testSetErrorInvalidInput(void *arg) { - int result; - const char *invalidError = NULL; - const char *probeError = "Testing"; - char *lastError; - size_t len; - - /* Reset */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* Check for no-op */ - result = SDL_SetError("%s", invalidError); - SDLTest_AssertPass("SDL_SetError()"); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == 0 || SDL_strcmp(lastError, "(null)") == 0, - "SDL_GetError(): expected message len 0, was len: %i", - (int) len); - } - - /* Set */ - result = SDL_SetError("%s", probeError); - SDLTest_AssertPass("SDL_SetError('%s')", probeError); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - - /* Check for no-op */ - result = SDL_SetError("%s", invalidError); - SDLTest_AssertPass("SDL_SetError(NULL)"); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == 0 || SDL_strcmp( lastError, "(null)" ) == 0, - "SDL_GetError(): expected message len 0, was len: %i", - (int) len); - } - - /* Reset */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* Set and check */ - result = SDL_SetError("%s", probeError); - SDLTest_AssertPass("SDL_SetError()"); - SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertCheck(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == SDL_strlen(probeError), - "SDL_GetError(): expected message len %i, was len: %i", - (int) SDL_strlen(probeError), - (int) len); - SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - probeError, - lastError); - } - - /* Clean up */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + int result; + const char *invalidError = NULL; + const char *probeError = "Testing"; + char *lastError; + size_t len; + + /* Reset */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* Check for no-op */ + result = SDL_SetError("%s", invalidError); + SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == 0 || SDL_strcmp(lastError, "(null)") == 0, + "SDL_GetError(): expected message len 0, was len: %i", + (int)len); + } + + /* Set */ + result = SDL_SetError("%s", probeError); + SDLTest_AssertPass("SDL_SetError('%s')", probeError); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + + /* Check for no-op */ + result = SDL_SetError("%s", invalidError); + SDLTest_AssertPass("SDL_SetError(NULL)"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == 0 || SDL_strcmp(lastError, "(null)") == 0, + "SDL_GetError(): expected message len 0, was len: %i", + (int)len); + } + + /* Reset */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* Set and check */ + result = SDL_SetError("%s", probeError); + SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == SDL_strlen(probeError), + "SDL_GetError(): expected message len %i, was len: %i", + (int)SDL_strlen(probeError), + (int)len); + SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + probeError, + lastError); + } + + /* Clean up */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } #if defined(HAVE_WFORMAT_OVERFLOW) @@ -475,115 +469,124 @@ int platform_testSetErrorInvalidInput(void *arg) */ int platform_testGetPowerInfo(void *arg) { - SDL_PowerState state; - SDL_PowerState stateAgain; - int secs; - int secsAgain; - int pct; - int pctAgain; - - state = SDL_GetPowerInfo(&secs, &pct); - SDLTest_AssertPass("SDL_GetPowerInfo()"); - SDLTest_AssertCheck( - state==SDL_POWERSTATE_UNKNOWN || - state==SDL_POWERSTATE_ON_BATTERY || - state==SDL_POWERSTATE_NO_BATTERY || - state==SDL_POWERSTATE_CHARGING || - state==SDL_POWERSTATE_CHARGED, - "SDL_GetPowerInfo(): state %i is one of the expected values", - (int)state); - - if (state==SDL_POWERSTATE_ON_BATTERY) - { - SDLTest_AssertCheck( - secs >= 0, - "SDL_GetPowerInfo(): on battery, secs >= 0, was: %i", - secs); - SDLTest_AssertCheck( - (pct >= 0) && (pct <= 100), - "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i", - pct); - } - - if (state==SDL_POWERSTATE_UNKNOWN || - state==SDL_POWERSTATE_NO_BATTERY) - { - SDLTest_AssertCheck( - secs == -1, - "SDL_GetPowerInfo(): no battery, secs == -1, was: %i", - secs); - SDLTest_AssertCheck( - pct == -1, - "SDL_GetPowerInfo(): no battery, pct == -1, was: %i", - pct); - } - - /* Partial return value variations */ - stateAgain = SDL_GetPowerInfo(&secsAgain, NULL); - SDLTest_AssertCheck( - state==stateAgain, + SDL_PowerState state; + SDL_PowerState stateAgain; + int secs; + int secsAgain; + int pct; + int pctAgain; + + state = SDL_GetPowerInfo(&secs, &pct); + SDLTest_AssertPass("SDL_GetPowerInfo()"); + SDLTest_AssertCheck( + state == SDL_POWERSTATE_UNKNOWN || + state == SDL_POWERSTATE_ON_BATTERY || + state == SDL_POWERSTATE_NO_BATTERY || + state == SDL_POWERSTATE_CHARGING || + state == SDL_POWERSTATE_CHARGED, + "SDL_GetPowerInfo(): state %i is one of the expected values", + (int)state); + + if (state == SDL_POWERSTATE_ON_BATTERY) { + SDLTest_AssertCheck( + secs >= 0, + "SDL_GetPowerInfo(): on battery, secs >= 0, was: %i", + secs); + SDLTest_AssertCheck( + (pct >= 0) && (pct <= 100), + "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i", + pct); + } + + if (state == SDL_POWERSTATE_UNKNOWN || + state == SDL_POWERSTATE_NO_BATTERY) { + SDLTest_AssertCheck( + secs == -1, + "SDL_GetPowerInfo(): no battery, secs == -1, was: %i", + secs); + SDLTest_AssertCheck( + pct == -1, + "SDL_GetPowerInfo(): no battery, pct == -1, was: %i", + pct); + } + + /* Partial return value variations */ + stateAgain = SDL_GetPowerInfo(&secsAgain, NULL); + SDLTest_AssertCheck( + state == stateAgain, "State %i returned when only 'secs' requested", stateAgain); - SDLTest_AssertCheck( - secs==secsAgain, + SDLTest_AssertCheck( + secs == secsAgain, "Value %i matches when only 'secs' requested", secsAgain); - stateAgain = SDL_GetPowerInfo(NULL, &pctAgain); - SDLTest_AssertCheck( - state==stateAgain, + stateAgain = SDL_GetPowerInfo(NULL, &pctAgain); + SDLTest_AssertCheck( + state == stateAgain, "State %i returned when only 'pct' requested", stateAgain); - SDLTest_AssertCheck( - pct==pctAgain, + SDLTest_AssertCheck( + pct == pctAgain, "Value %i matches when only 'pct' requested", pctAgain); - stateAgain = SDL_GetPowerInfo(NULL, NULL); - SDLTest_AssertCheck( - state==stateAgain, + stateAgain = SDL_GetPowerInfo(NULL, NULL); + SDLTest_AssertCheck( + state == stateAgain, "State %i returned when no value requested", stateAgain); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ================= Test References ================== */ /* Platform test cases */ -static const SDLTest_TestCaseReference platformTest1 = - { (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest1 = { + (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest2 = - { (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianness and swap functions", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest2 = { + (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianness and swap functions", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest3 = - { (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest3 = { + (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest4 = - { (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest4 = { + (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest5 = - { (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest5 = { + (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest6 = - { (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest6 = { + (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest7 = - { (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest7 = { + (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest8 = - { (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest8 = { + (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest9 = - { (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest9 = { + (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest10 = - { (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED}; +static const SDLTest_TestCaseReference platformTest10 = { + (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED +}; -static const SDLTest_TestCaseReference platformTest11 = - { (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED }; +static const SDLTest_TestCaseReference platformTest11 = { + (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED +}; /* Sequence of Platform test cases */ -static const SDLTest_TestCaseReference *platformTests[] = { +static const SDLTest_TestCaseReference *platformTests[] = { &platformTest1, &platformTest2, &platformTest3, diff --git a/modules/SDL2/test/testautomation_rect.c b/modules/SDL2/test/testautomation_rect.c index 729ff29..d1d7e1d 100644 --- a/modules/SDL2/test/testautomation_rect.c +++ b/modules/SDL2/test/testautomation_rect.c @@ -17,24 +17,24 @@ */ void _validateIntersectRectAndLineResults( SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rect, SDL_Rect * refRect, + SDL_Rect *rect, SDL_Rect *refRect, int x1, int y1, int x2, int y2, int x1Ref, int y1Ref, int x2Ref, int y2Ref) { SDLTest_AssertCheck(intersection == expectedIntersection, - "Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)", - (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - refRect->x, refRect->y, refRect->w, refRect->h, - x1Ref, y1Ref, x2Ref, y2Ref); + "Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)", + (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + refRect->x, refRect->y, refRect->w, refRect->h, + x1Ref, y1Ref, x2Ref, y2Ref); SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h, - "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rect->x, rect->y, rect->w, rect->h, - refRect->x, refRect->y, refRect->w, refRect->h); + "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rect->x, rect->y, rect->w, rect->h, + refRect->x, refRect->y, refRect->w, refRect->h); SDLTest_AssertCheck(x1 == x1Ref && y1 == y1Ref && x2 == x2Ref && y2 == y2Ref, - "Check if line was incorrectly clipped or modified: got (%d,%d - %d,%d) expected (%d,%d - %d,%d)", - x1, y1, x2, y2, - x1Ref, y1Ref, x2Ref, y2Ref); + "Check if line was incorrectly clipped or modified: got (%d,%d - %d,%d) expected (%d,%d - %d,%d)", + x1, y1, x2, y2, + x1Ref, y1Ref, x2Ref, y2Ref); } /* Test case functions */ @@ -45,8 +45,7 @@ void _validateIntersectRectAndLineResults( * \sa * http://wiki.libsdl.org/SDL_IntersectRectAndLine */ -int -rect_testIntersectRectAndLine (void *arg) +int rect_testIntersectRectAndLine(void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; SDL_Rect rect; @@ -77,14 +76,14 @@ rect_testIntersectRectAndLine (void *arg) x1 = -refRect.w; y1 = -refRect.h; - x2 = 2*refRect.w; - y2 = 2*refRect.h; + x2 = 2 * refRect.w; + y2 = 2 * refRect.h; rect = refRect; intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 0, 31, 31); + _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 0, 31, 31); - x1 = 2*refRect.w; - y1 = 2*refRect.h; + x1 = 2 * refRect.w; + y1 = 2 * refRect.h; x2 = -refRect.w; y2 = -refRect.h; rect = refRect; @@ -116,8 +115,7 @@ rect_testIntersectRectAndLine (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRectAndLine */ -int -rect_testIntersectRectAndLineInside (void *arg) +int rect_testIntersectRectAndLineInside(void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; SDL_Rect rect; @@ -183,8 +181,7 @@ rect_testIntersectRectAndLineInside (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRectAndLine */ -int -rect_testIntersectRectAndLineOutside (void *arg) +int rect_testIntersectRectAndLineOutside(void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; SDL_Rect rect; @@ -238,8 +235,7 @@ rect_testIntersectRectAndLineOutside (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRectAndLine */ -int -rect_testIntersectRectAndLineEmpty (void *arg) +int rect_testIntersectRectAndLineEmpty(void *arg) { SDL_Rect refRect; SDL_Rect rect; @@ -273,8 +269,7 @@ rect_testIntersectRectAndLineEmpty (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRectAndLine */ -int -rect_testIntersectRectAndLineParam (void *arg) +int rect_testIntersectRectAndLineParam(void *arg) { SDL_Rect rect = { 0, 0, 32, 32 }; int x1 = rect.w / 2; @@ -310,19 +305,19 @@ void _validateHasIntersectionResults( SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { SDLTest_AssertCheck(intersection == expectedIntersection, - "Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)", - (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h); + "Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)", + (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + rectA->x, rectA->y, rectA->w, rectA->h, + rectB->x, rectB->y, rectB->w, rectB->h); SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); + "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectA->x, rectA->y, rectA->w, rectA->h, + refRectA->x, refRectA->y, refRectA->w, refRectA->h); SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); + "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectB->x, rectB->y, rectB->w, rectB->h, + refRectB->x, refRectB->y, refRectB->w, refRectB->h); } /* ! @@ -336,11 +331,11 @@ void _validateIntersectRectResults( _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB); if (result && expectedResult) { SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, - "Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h, - result->x, result->y, result->w, result->h, - expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); + "Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectA->x, rectA->y, rectA->w, rectA->h, + rectB->x, rectB->y, rectB->w, rectB->h, + result->x, result->y, result->w, result->h, + expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); } } @@ -352,19 +347,19 @@ void _validateUnionRectResults( SDL_Rect *result, SDL_Rect *expectedResult) { SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); + "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectA->x, rectA->y, rectA->w, rectA->h, + refRectA->x, refRectA->y, refRectA->w, refRectA->h); SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); + "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectB->x, rectB->y, rectB->w, rectB->h, + refRectB->x, refRectB->y, refRectB->w, refRectB->h); SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, - "Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h, - result->x, result->y, result->w, result->h, - expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); + "Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectA->x, rectA->y, rectA->w, rectA->h, + rectB->x, rectB->y, rectB->w, rectB->h, + result->x, result->y, result->w, result->h, + expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); } /* ! @@ -375,14 +370,14 @@ void _validateRectEmptyResults( SDL_Rect *rect, SDL_Rect *refRect) { SDLTest_AssertCheck(empty == expectedEmpty, - "Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)", - (expectedEmpty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - rect->x, rect->y, rect->w, rect->h); + "Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)", + (expectedEmpty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + rect->x, rect->y, rect->w, rect->h); SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h, - "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rect->x, rect->y, rect->w, rect->h, - refRect->x, refRect->y, refRect->w, refRect->h); + "Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rect->x, rect->y, rect->w, rect->h, + refRect->x, refRect->y, refRect->w, refRect->h); } /* ! @@ -393,19 +388,19 @@ void _validateRectEqualsResults( SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { SDLTest_AssertCheck(equals == expectedEquals, - "Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)", - (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h); + "Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)", + (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + rectA->x, rectA->y, rectA->w, rectA->h, + rectB->x, rectB->y, rectB->w, rectB->h); SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); + "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectA->x, rectA->y, rectA->w, rectA->h, + refRectA->x, refRectA->y, refRectA->w, refRectA->h); SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); + "Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", + rectB->x, rectB->y, rectB->w, rectB->h, + refRectB->x, refRectB->y, refRectB->w, refRectB->h); } /* ! @@ -417,21 +412,21 @@ void _validateFRectEqualsResults( { int cmpRes; SDLTest_AssertCheck(equals == expectedEquals, - "Check for correct equals result: expected %s, got %s testing (%f,%f,%f,%f) and (%f,%f,%f,%f)", - (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h); + "Check for correct equals result: expected %s, got %s testing (%f,%f,%f,%f) and (%f,%f,%f,%f)", + (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + rectA->x, rectA->y, rectA->w, rectA->h, + rectB->x, rectB->y, rectB->w, rectB->h); cmpRes = SDL_memcmp(rectA, refRectA, sizeof(*rectA)); SDLTest_AssertCheck(cmpRes == 0, - "Check that source rectangle A was not modified: got (%f,%f,%f,%f) expected (%f,%f,%f,%f)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); + "Check that source rectangle A was not modified: got (%f,%f,%f,%f) expected (%f,%f,%f,%f)", + rectA->x, rectA->y, rectA->w, rectA->h, + refRectA->x, refRectA->y, refRectA->w, refRectA->h); cmpRes = SDL_memcmp(rectB, refRectB, sizeof(*rectB)); SDLTest_AssertCheck(cmpRes == 0, - "Check that source rectangle B was not modified: got (%f,%f,%f,%f) expected (%f,%f,%f,%f)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); + "Check that source rectangle B was not modified: got (%f,%f,%f,%f) expected (%f,%f,%f,%f)", + rectB->x, rectB->y, rectB->w, rectB->h, + refRectB->x, refRectB->y, refRectB->w, refRectB->h); } /* ! @@ -440,7 +435,7 @@ void _validateFRectEqualsResults( * \sa * http://wiki.libsdl.org/SDL_IntersectRect */ -int rect_testIntersectRectInside (void *arg) +int rect_testIntersectRectInside(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -468,7 +463,7 @@ int rect_testIntersectRectInside (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRect */ -int rect_testIntersectRectOutside (void *arg) +int rect_testIntersectRectOutside(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -496,7 +491,7 @@ int rect_testIntersectRectOutside (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRect */ -int rect_testIntersectRectPartial (void *arg) +int rect_testIntersectRectPartial(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -585,7 +580,7 @@ int rect_testIntersectRectPartial (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRect */ -int rect_testIntersectRectPoint (void *arg) +int rect_testIntersectRectPoint(void *arg) { SDL_Rect refRectA = { 0, 0, 1, 1 }; SDL_Rect refRectB = { 0, 0, 1, 1 }; @@ -632,7 +627,7 @@ int rect_testIntersectRectPoint (void *arg) * \sa * http://wiki.libsdl.org/SDL_IntersectRect */ -int rect_testIntersectRectEmpty (void *arg) +int rect_testIntersectRectEmpty(void *arg) { SDL_Rect refRectA; SDL_Rect refRectB; @@ -656,7 +651,7 @@ int rect_testIntersectRectEmpty (void *arg) rectB = refRectB; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - empty = (SDL_bool)SDL_RectEmpty(&result); + empty = SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); /* Rect B empty */ @@ -673,7 +668,7 @@ int rect_testIntersectRectEmpty (void *arg) rectB = refRectB; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - empty = (SDL_bool)SDL_RectEmpty(&result); + empty = SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); /* Rect A and B empty */ @@ -692,7 +687,7 @@ int rect_testIntersectRectEmpty (void *arg) rectB = refRectB; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - empty = (SDL_bool)SDL_RectEmpty(&result); + empty = SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); return TEST_COMPLETED; @@ -707,7 +702,7 @@ int rect_testIntersectRectEmpty (void *arg) int rect_testIntersectRectParam(void *arg) { SDL_Rect rectA; - SDL_Rect rectB = {0}; + SDL_Rect rectB = { 0 }; SDL_Rect result; SDL_bool intersection; @@ -734,7 +729,7 @@ int rect_testIntersectRectParam(void *arg) * \sa * http://wiki.libsdl.org/SDL_HasIntersection */ -int rect_testHasIntersectionInside (void *arg) +int rect_testHasIntersectionInside(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -761,7 +756,7 @@ int rect_testHasIntersectionInside (void *arg) * \sa * http://wiki.libsdl.org/SDL_HasIntersection */ -int rect_testHasIntersectionOutside (void *arg) +int rect_testHasIntersectionOutside(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -788,7 +783,7 @@ int rect_testHasIntersectionOutside (void *arg) * \sa * http://wiki.libsdl.org/SDL_HasIntersection */ -int rect_testHasIntersectionPartial (void *arg) +int rect_testHasIntersectionPartial(void *arg) { SDL_Rect refRectA = { 0, 0, 32, 32 }; SDL_Rect refRectB; @@ -855,7 +850,7 @@ int rect_testHasIntersectionPartial (void *arg) * \sa * http://wiki.libsdl.org/SDL_HasIntersection */ -int rect_testHasIntersectionPoint (void *arg) +int rect_testHasIntersectionPoint(void *arg) { SDL_Rect refRectA = { 0, 0, 1, 1 }; SDL_Rect refRectB = { 0, 0, 1, 1 }; @@ -901,7 +896,7 @@ int rect_testHasIntersectionPoint (void *arg) * \sa * http://wiki.libsdl.org/SDL_HasIntersection */ -int rect_testHasIntersectionEmpty (void *arg) +int rect_testHasIntersectionEmpty(void *arg) { SDL_Rect refRectA; SDL_Rect refRectB; @@ -962,7 +957,7 @@ int rect_testHasIntersectionEmpty (void *arg) int rect_testHasIntersectionParam(void *arg) { SDL_Rect rectA; - SDL_Rect rectB = {0}; + SDL_Rect rectB = { 0 }; SDL_bool intersection; /* invalid parameter combinations */ @@ -996,52 +991,60 @@ int rect_testEnclosePoints(void *arg) int i; /* Create input data, tracking result */ - for (i=0; i maxx) maxx = newx; - if (newy < miny) miny = newy; - if (newy > maxy) maxy = newy; + if (newx < minx) { + minx = newx; + } + if (newx > maxx) { + maxx = newx; + } + if (newy < miny) { + miny = newy; + } + if (newy > maxy) { + maxy = newy; + } } } /* Call function and validate - special case: no result requested */ anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult, - "Check expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - for (i=0; i maxx) maxx = newx; - if (newy < miny) miny = newy; - if (newy > maxy) maxy = newy; + if (newx < minx) { + minx = newx; + } + if (newx > maxx) { + maxx = newx; + } + if (newy < miny) { + miny = newy; + } + if (newy > maxy) { + maxy = newy; + } } } /* Call function and validate - special case: no result requested */ anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult, - "Check return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - for (i=0; i=refClip.x) && (newx<(refClip.x + refClip.w)) && - (newy>=refClip.y) && (newy<(refClip.y + refClip.h))) { - if (expectedEnclosed==SDL_FALSE) { + if ((newx >= refClip.x) && (newx < (refClip.x + refClip.w)) && + (newy >= refClip.y) && (newy < (refClip.y + refClip.h))) { + if (expectedEnclosed == SDL_FALSE) { minx = newx; maxx = newx; miny = newy; maxy = newy; } else { - if (newx < minx) minx = newx; - if (newx > maxx) maxx = newx; - if (newy < miny) miny = newy; - if (newy > maxy) maxy = newy; + if (newx < minx) { + minx = newx; + } + if (newx > maxx) { + maxx = newx; + } + if (newy < miny) { + miny = newy; + } + if (newy > maxy) { + maxy = newy; + } } expectedEnclosed = SDL_TRUE; } @@ -1177,35 +1196,35 @@ int rect_testEnclosePointsWithClipping(void *arg) /* Call function and validate - special case: no result requested */ clip = refClip; anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, (SDL_Rect *)NULL); - SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult, - "Expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - for (i=0; irefRectB.x) ? refRectA.x : refRectB.x; - miny = (refRectA.yrefRectB.y) ? refRectA.y : refRectB.y; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = 1; + refRectA.h = 1; + refRectB.x = SDLTest_RandomIntegerInRange(-1024, 1024) + dx * 2048; + refRectB.y = SDLTest_RandomIntegerInRange(-1024, 1024) + dx * 2048; + refRectB.w = 1; + refRectB.h = 1; + minx = (refRectA.x < refRectB.x) ? refRectA.x : refRectB.x; + maxx = (refRectA.x > refRectB.x) ? refRectA.x : refRectB.x; + miny = (refRectA.y < refRectB.y) ? refRectA.y : refRectB.y; + maxy = (refRectA.y > refRectB.y) ? refRectA.y : refRectB.y; expectedResult.x = minx; expectedResult.y = miny; expectedResult.w = maxx - minx + 1; @@ -1296,19 +1315,27 @@ int rect_testUnionRectOutside(void *arg) for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=SDLTest_RandomIntegerInRange(256, 512); - refRectA.h=SDLTest_RandomIntegerInRange(256, 512); - refRectB.x=refRectA.x + 1 + dx*2; - refRectB.y=refRectA.y + 1 + dy*2; - refRectB.w=refRectA.w - 2; - refRectB.h=refRectA.h - 2; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = SDLTest_RandomIntegerInRange(256, 512); + refRectA.h = SDLTest_RandomIntegerInRange(256, 512); + refRectB.x = refRectA.x + 1 + dx * 2; + refRectB.y = refRectA.y + 1 + dy * 2; + refRectB.w = refRectA.w - 2; + refRectB.h = refRectA.h - 2; expectedResult = refRectA; - if (dx == -1) expectedResult.x--; - if (dy == -1) expectedResult.y--; - if ((dx == 1) || (dx == -1)) expectedResult.w++; - if ((dy == 1) || (dy == -1)) expectedResult.h++; + if (dx == -1) { + expectedResult.x--; + } + if (dy == -1) { + expectedResult.y--; + } + if ((dx == 1) || (dx == -1)) { + expectedResult.w++; + } + if ((dy == 1) || (dy == -1)) { + expectedResult.h++; + } rectA = refRectA; rectB = refRectB; SDL_UnionRect(&rectA, &rectB, &result); @@ -1334,14 +1361,14 @@ int rect_testUnionRectEmpty(void *arg) SDL_Rect result; /* A empty */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=0; - refRectA.h=0; - refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.w=SDLTest_RandomIntegerInRange(1, 1024); - refRectB.h=SDLTest_RandomIntegerInRange(1, 1024); + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = 0; + refRectA.h = 0; + refRectB.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.w = SDLTest_RandomIntegerInRange(1, 1024); + refRectB.h = SDLTest_RandomIntegerInRange(1, 1024); expectedResult = refRectB; rectA = refRectA; rectB = refRectB; @@ -1349,14 +1376,14 @@ int rect_testUnionRectEmpty(void *arg) _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); /* B empty */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=SDLTest_RandomIntegerInRange(1, 1024); - refRectA.h=SDLTest_RandomIntegerInRange(1, 1024); - refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.w=0; - refRectB.h=0; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = SDLTest_RandomIntegerInRange(1, 1024); + refRectA.h = SDLTest_RandomIntegerInRange(1, 1024); + refRectB.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.w = 0; + refRectB.h = 0; expectedResult = refRectA; rectA = refRectA; rectB = refRectB; @@ -1364,18 +1391,18 @@ int rect_testUnionRectEmpty(void *arg) _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); /* A and B empty */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=0; - refRectA.h=0; - refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectB.w=0; - refRectB.h=0; - result.x=0; - result.y=0; - result.w=0; - result.h=0; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = 0; + refRectA.h = 0; + refRectB.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectB.w = 0; + refRectB.h = 0; + result.x = 0; + result.y = 0; + result.w = 0; + result.h = 0; expectedResult = result; rectA = refRectA; rectB = refRectB; @@ -1400,24 +1427,24 @@ int rect_testUnionRectInside(void *arg) int dx, dy; /* Union 1x1 with itself */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=1; - refRectA.h=1; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = 1; + refRectA.h = 1; expectedResult = refRectA; rectA = refRectA; SDL_UnionRect(&rectA, &rectA, &result); _validateUnionRectResults(&rectA, &rectA, &refRectA, &refRectA, &result, &expectedResult); /* Union 1x1 somewhere inside */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=SDLTest_RandomIntegerInRange(256, 1024); - refRectA.h=SDLTest_RandomIntegerInRange(256, 1024); - refRectB.x=refRectA.x + 1 + SDLTest_RandomIntegerInRange(1, refRectA.w - 2); - refRectB.y=refRectA.y + 1 + SDLTest_RandomIntegerInRange(1, refRectA.h - 2); - refRectB.w=1; - refRectB.h=1; + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = SDLTest_RandomIntegerInRange(256, 1024); + refRectA.h = SDLTest_RandomIntegerInRange(256, 1024); + refRectB.x = refRectA.x + 1 + SDLTest_RandomIntegerInRange(1, refRectA.w - 2); + refRectB.y = refRectA.y + 1 + SDLTest_RandomIntegerInRange(1, refRectA.h - 2); + refRectB.w = 1; + refRectB.h = 1; expectedResult = refRectA; rectA = refRectA; rectB = refRectB; @@ -1428,15 +1455,23 @@ int rect_testUnionRectInside(void *arg) for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=SDLTest_RandomIntegerInRange(256, 1024); - refRectA.h=SDLTest_RandomIntegerInRange(256, 1024); + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = SDLTest_RandomIntegerInRange(256, 1024); + refRectA.h = SDLTest_RandomIntegerInRange(256, 1024); refRectB = refRectA; - if (dx == -1) refRectB.x++; - if ((dx == 1) || (dx == -1)) refRectB.w--; - if (dy == -1) refRectB.y++; - if ((dy == 1) || (dy == -1)) refRectB.h--; + if (dx == -1) { + refRectB.x++; + } + if ((dx == 1) || (dx == -1)) { + refRectB.w--; + } + if (dy == -1) { + refRectB.y++; + } + if ((dy == 1) || (dy == -1)) { + refRectB.h--; + } expectedResult = refRectA; rectA = refRectA; rectB = refRectB; @@ -1492,26 +1527,26 @@ int rect_testRectEmpty(void *arg) int w, h; /* Non-empty case */ - refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRect.w=SDLTest_RandomIntegerInRange(256, 1024); - refRect.h=SDLTest_RandomIntegerInRange(256, 1024); + refRect.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRect.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRect.w = SDLTest_RandomIntegerInRange(256, 1024); + refRect.h = SDLTest_RandomIntegerInRange(256, 1024); expectedResult = SDL_FALSE; rect = refRect; - result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect); + result = SDL_RectEmpty(&rect); _validateRectEmptyResults(result, expectedResult, &rect, &refRect); /* Empty case */ - for (w=-1; w<2; w++) { - for (h=-1; h<2; h++) { + for (w = -1; w < 2; w++) { + for (h = -1; h < 2; h++) { if ((w != 1) || (h != 1)) { - refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRect.w=w; - refRect.h=h; + refRect.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRect.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRect.w = w; + refRect.h = h; expectedResult = SDL_TRUE; rect = refRect; - result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect); + result = SDL_RectEmpty(&rect); _validateRectEmptyResults(result, expectedResult, &rect, &refRect); } } @@ -1531,7 +1566,7 @@ int rect_testRectEmptyParam(void *arg) SDL_bool result; /* invalid parameter combinations */ - result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)NULL); + result = SDL_RectEmpty(NULL); SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL"); return TEST_COMPLETED; @@ -1553,15 +1588,15 @@ int rect_testRectEquals(void *arg) SDL_bool result; /* Equals */ - refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=SDLTest_RandomIntegerInRange(1, 1024); - refRectA.h=SDLTest_RandomIntegerInRange(1, 1024); + refRectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = SDLTest_RandomIntegerInRange(1, 1024); + refRectA.h = SDLTest_RandomIntegerInRange(1, 1024); refRectB = refRectA; expectedResult = SDL_TRUE; rectA = refRectA; rectB = refRectB; - result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB); + result = SDL_RectEquals(&rectA, &rectB); _validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB); return TEST_COMPLETED; @@ -1580,21 +1615,21 @@ int rect_testRectEqualsParam(void *arg) SDL_bool result; /* data setup */ - rectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); - rectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); - rectA.w=SDLTest_RandomIntegerInRange(1, 1024); - rectA.h=SDLTest_RandomIntegerInRange(1, 1024); - rectB.x=SDLTest_RandomIntegerInRange(-1024, 1024); - rectB.y=SDLTest_RandomIntegerInRange(-1024, 1024); - rectB.w=SDLTest_RandomIntegerInRange(1, 1024); - rectB.h=SDLTest_RandomIntegerInRange(1, 1024); + rectA.x = SDLTest_RandomIntegerInRange(-1024, 1024); + rectA.y = SDLTest_RandomIntegerInRange(-1024, 1024); + rectA.w = SDLTest_RandomIntegerInRange(1, 1024); + rectA.h = SDLTest_RandomIntegerInRange(1, 1024); + rectB.x = SDLTest_RandomIntegerInRange(-1024, 1024); + rectB.y = SDLTest_RandomIntegerInRange(-1024, 1024); + rectB.w = SDLTest_RandomIntegerInRange(1, 1024); + rectB.h = SDLTest_RandomIntegerInRange(1, 1024); /* invalid parameter combinations */ - result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB); + result = SDL_RectEquals(NULL, &rectB); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); - result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL); + result = SDL_RectEquals(&rectA, NULL); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL"); - result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL); + result = SDL_RectEquals(NULL, NULL); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL"); return TEST_COMPLETED; @@ -1616,15 +1651,15 @@ int rect_testFRectEquals(void *arg) SDL_bool result; /* Equals */ - refRectA.x=(float)SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.y=(float)SDLTest_RandomIntegerInRange(-1024, 1024); - refRectA.w=(float)SDLTest_RandomIntegerInRange(1, 1024); - refRectA.h=(float)SDLTest_RandomIntegerInRange(1, 1024); + refRectA.x = (float)SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.y = (float)SDLTest_RandomIntegerInRange(-1024, 1024); + refRectA.w = (float)SDLTest_RandomIntegerInRange(1, 1024); + refRectA.h = (float)SDLTest_RandomIntegerInRange(1, 1024); refRectB = refRectA; expectedResult = SDL_TRUE; rectA = refRectA; rectB = refRectB; - result = (SDL_bool)SDL_FRectEquals((const SDL_FRect *)&rectA, (const SDL_FRect *)&rectB); + result = SDL_FRectEquals(&rectA, &rectB); _validateFRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB); return TEST_COMPLETED; @@ -1643,21 +1678,21 @@ int rect_testFRectEqualsParam(void *arg) SDL_bool result; /* data setup -- For the purpose of this test, the values don't matter. */ - rectA.x=SDLTest_RandomFloat(); - rectA.y=SDLTest_RandomFloat(); - rectA.w=SDLTest_RandomFloat(); - rectA.h=SDLTest_RandomFloat(); - rectB.x=SDLTest_RandomFloat(); - rectB.y=SDLTest_RandomFloat(); - rectB.w=SDLTest_RandomFloat(); - rectB.h=SDLTest_RandomFloat(); + rectA.x = SDLTest_RandomFloat(); + rectA.y = SDLTest_RandomFloat(); + rectA.w = SDLTest_RandomFloat(); + rectA.h = SDLTest_RandomFloat(); + rectB.x = SDLTest_RandomFloat(); + rectB.y = SDLTest_RandomFloat(); + rectB.w = SDLTest_RandomFloat(); + rectB.h = SDLTest_RandomFloat(); /* invalid parameter combinations */ - result = (SDL_bool)SDL_FRectEquals((const SDL_FRect *)NULL, (const SDL_FRect *)&rectB); + result = SDL_FRectEquals(NULL, &rectB); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); - result = (SDL_bool)SDL_FRectEquals((const SDL_FRect *)&rectA, (const SDL_FRect *)NULL); + result = SDL_FRectEquals(&rectA, NULL); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL"); - result = (SDL_bool)SDL_FRectEquals((const SDL_FRect *)NULL, (const SDL_FRect *)NULL); + result = SDL_FRectEquals(NULL, NULL); SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL"); return TEST_COMPLETED; @@ -1668,107 +1703,138 @@ int rect_testFRectEqualsParam(void *arg) /* Rect test cases */ /* SDL_IntersectRectAndLine */ -static const SDLTest_TestCaseReference rectTest1 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest1 = { + (SDLTest_TestCaseFp)rect_testIntersectRectAndLine, "rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest2 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest2 = { + (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest3 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest3 = { + (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest4 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest4 = { + (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest5 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest5 = { + (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED +}; /* SDL_IntersectRect */ -static const SDLTest_TestCaseReference rectTest6 = - { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest6 = { + (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest7 = - { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest7 = { + (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest8 = - { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest8 = { + (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest9 = - { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest9 = { + (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest10 = - { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest10 = { + (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest11 = - { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest11 = { + (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED +}; /* SDL_HasIntersection */ -static const SDLTest_TestCaseReference rectTest12 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest12 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest13 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest13 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest14 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest14 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionPartial, "rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest15 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest15 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest16 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest16 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest17 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest17 = { + (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED +}; /* SDL_EnclosePoints */ -static const SDLTest_TestCaseReference rectTest18 = - { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest18 = { + (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest19 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest19 = { + (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest20 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest20 = { + (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest21 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest21 = { + (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED +}; /* SDL_UnionRect */ -static const SDLTest_TestCaseReference rectTest22 = - { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest22 = { + (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest23 = - { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest23 = { + (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest24 = - { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest24 = { + (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest25 = - { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest25 = { + (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED +}; /* SDL_RectEmpty */ -static const SDLTest_TestCaseReference rectTest26 = - { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest26 = { + (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest27 = - { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest27 = { + (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED +}; /* SDL_RectEquals */ -static const SDLTest_TestCaseReference rectTest28 = - { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest28 = { + (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest29 = - { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest29 = { + (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED +}; /* SDL_FRectEquals */ -static const SDLTest_TestCaseReference rectTest30 = - { (SDLTest_TestCaseFp)rect_testFRectEquals, "rect_testFRectEquals", "Tests SDL_FRectEquals with various inputs", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest30 = { + (SDLTest_TestCaseFp)rect_testFRectEquals, "rect_testFRectEquals", "Tests SDL_FRectEquals with various inputs", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rectTest31 = - { (SDLTest_TestCaseFp)rect_testFRectEqualsParam, "rect_testFRectEqualsParam", "Negative tests against SDL_FRectEquals with invalid parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rectTest31 = { + (SDLTest_TestCaseFp)rect_testFRectEqualsParam, "rect_testFRectEqualsParam", "Negative tests against SDL_FRectEquals with invalid parameters", TEST_ENABLED +}; /* ! * \brief Sequence of Rect test cases; functions that handle simple rectangles including overlaps and merges. @@ -1776,13 +1842,12 @@ static const SDLTest_TestCaseReference rectTest31 = * \sa * http://wiki.libsdl.org/CategoryRect */ -static const SDLTest_TestCaseReference *rectTests[] = { +static const SDLTest_TestCaseReference *rectTests[] = { &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14, &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27, &rectTest28, &rectTest29, &rectTest30, &rectTest31, NULL }; - /* Rect test suite (global) */ SDLTest_TestSuiteReference rectTestSuite = { "Rect", diff --git a/modules/SDL2/test/testautomation_render.c b/modules/SDL2/test/testautomation_render.c index 52da1bf..74b9631 100644 --- a/modules/SDL2/test/testautomation_render.c +++ b/modules/SDL2/test/testautomation_render.c @@ -10,14 +10,14 @@ /* ================= Test Case Implementation ================== */ -#define TESTRENDER_SCREEN_W 80 -#define TESTRENDER_SCREEN_H 60 +#define TESTRENDER_SCREEN_W 80 +#define TESTRENDER_SCREEN_H 60 -#define RENDER_COMPARE_FORMAT SDL_PIXELFORMAT_ARGB8888 -#define RENDER_COMPARE_AMASK 0xff000000 /**< Alpha bit mask. */ -#define RENDER_COMPARE_RMASK 0x00ff0000 /**< Red bit mask. */ -#define RENDER_COMPARE_GMASK 0x0000ff00 /**< Green bit mask. */ -#define RENDER_COMPARE_BMASK 0x000000ff /**< Blue bit mask. */ +#define RENDER_COMPARE_FORMAT SDL_PIXELFORMAT_ARGB8888 +#define RENDER_COMPARE_AMASK 0xff000000 /**< Alpha bit mask. */ +#define RENDER_COMPARE_RMASK 0x00ff0000 /**< Red bit mask. */ +#define RENDER_COMPARE_GMASK 0x0000ff00 /**< Green bit mask. */ +#define RENDER_COMPARE_BMASK 0x000000ff /**< Blue bit mask. */ #define ALLOWABLE_ERROR_OPAQUE 0 #define ALLOWABLE_ERROR_BLENDED 64 @@ -28,7 +28,7 @@ SDL_Renderer *renderer = NULL; /* Prototypes for helper functions */ -static int _clearScreen (void); +static int _clearScreen(void); static void _compare(SDL_Surface *reference, int allowable_error); static int _hasTexAlpha(void); static int _hasTexColor(void); @@ -42,22 +42,22 @@ static int _isSupported(int code); */ void InitCreateRenderer(void *arg) { - int posX = 100, posY = 100, width = 320, height = 240; - renderer = NULL; - window = SDL_CreateWindow("render_testCreateRenderer", posX, posY, width, height, 0); - SDLTest_AssertPass("SDL_CreateWindow()"); - SDLTest_AssertCheck(window != NULL, "Check SDL_CreateWindow result"); - if (window == NULL) { - return; - } - - renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); - SDLTest_AssertPass("SDL_CreateRenderer()"); - SDLTest_AssertCheck(renderer != NULL, "Check SDL_CreateRenderer result"); - if (renderer == NULL) { - SDL_DestroyWindow(window); - return; - } + int posX = 100, posY = 100, width = 320, height = 240; + renderer = NULL; + window = SDL_CreateWindow("render_testCreateRenderer", posX, posY, width, height, 0); + SDLTest_AssertPass("SDL_CreateWindow()"); + SDLTest_AssertCheck(window != NULL, "Check SDL_CreateWindow result"); + if (window == NULL) { + return; + } + + renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); + SDLTest_AssertPass("SDL_CreateRenderer()"); + SDLTest_AssertCheck(renderer != NULL, "Check SDL_CreateRenderer result"); + if (renderer == NULL) { + SDL_DestroyWindow(window); + return; + } } /* @@ -65,36 +65,33 @@ void InitCreateRenderer(void *arg) */ void CleanupDestroyRenderer(void *arg) { - if (renderer != NULL) { - SDL_DestroyRenderer(renderer); - renderer = NULL; - SDLTest_AssertPass("SDL_DestroyRenderer()"); - } - - if (window != NULL) { - SDL_DestroyWindow(window); - window = NULL; - SDLTest_AssertPass("SDL_DestroyWindow"); - } + if (renderer != NULL) { + SDL_DestroyRenderer(renderer); + renderer = NULL; + SDLTest_AssertPass("SDL_DestroyRenderer()"); + } + + if (window != NULL) { + SDL_DestroyWindow(window); + window = NULL; + SDLTest_AssertPass("SDL_DestroyWindow"); + } } - /** * @brief Tests call to SDL_GetNumRenderDrivers * * \sa * http://wiki.libsdl.org/SDL_GetNumRenderDrivers */ -int -render_testGetNumRenderDrivers(void *arg) +int render_testGetNumRenderDrivers(void *arg) { - int n; - n = SDL_GetNumRenderDrivers(); - SDLTest_AssertCheck(n >= 1, "Number of renderers >= 1, reported as %i", n); - return TEST_COMPLETED; + int n; + n = SDL_GetNumRenderDrivers(); + SDLTest_AssertCheck(n >= 1, "Number of renderers >= 1, reported as %i", n); + return TEST_COMPLETED; } - /** * @brief Tests the SDL primitives for rendering. * @@ -104,102 +101,106 @@ render_testGetNumRenderDrivers(void *arg) * http://wiki.libsdl.org/SDL_RenderDrawLine * */ -int render_testPrimitives (void *arg) +int render_testPrimitives(void *arg) { - int ret; - int x, y; - SDL_Rect rect; - SDL_Surface *referenceSurface = NULL; - int checkFailCount1; - int checkFailCount2; - - /* Clear surface. */ - _clearScreen(); - - /* Need drawcolor or just skip test. */ - SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor"); - - /* Draw a rectangle. */ - rect.x = 40; - rect.y = 0; - rect.w = 40; - rect.h = 80; - - ret = SDL_SetRenderDrawColor(renderer, 13, 73, 200, SDL_ALPHA_OPAQUE ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret); - - ret = SDL_RenderFillRect(renderer, &rect ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderFillRect, expected: 0, got: %i", ret); - - /* Draw a rectangle. */ - rect.x = 10; - rect.y = 10; - rect.w = 60; - rect.h = 40; - ret = SDL_SetRenderDrawColor(renderer, 200, 0, 100, SDL_ALPHA_OPAQUE ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret); - - ret = SDL_RenderFillRect(renderer, &rect ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderFillRect, expected: 0, got: %i", ret); - - /* Draw some points like so: - * X.X.X.X.. - * .X.X.X.X. - * X.X.X.X.. */ - checkFailCount1 = 0; - checkFailCount2 = 0; - for (y=0; y<3; y++) { - for (x = y % 2; x @@ -21,9 +21,9 @@ /* ================= Test Case Implementation ================== */ -const char* RWopsReadTestFilename = "rwops_read"; -const char* RWopsWriteTestFilename = "rwops_write"; -const char* RWopsAlphabetFilename = "rwops_alphabet"; +const char *RWopsReadTestFilename = "rwops_read"; +const char *RWopsWriteTestFilename = "rwops_write"; +const char *RWopsAlphabetFilename = "rwops_alphabet"; static const char RWopsHelloWorldTestString[] = "Hello World!"; static const char RWopsHelloWorldCompString[] = "Hello World!"; @@ -31,8 +31,7 @@ static const char RWopsAlphabetString[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; /* Fixture */ -void -RWopsSetUp(void *arg) +void RWopsSetUp(void *arg) { size_t fileLen; FILE *handle; @@ -40,46 +39,49 @@ RWopsSetUp(void *arg) int result; /* Clean up from previous runs (if any); ignore errors */ - remove(RWopsReadTestFilename); - remove(RWopsWriteTestFilename); - remove(RWopsAlphabetFilename); + (void)remove(RWopsReadTestFilename); + (void)remove(RWopsWriteTestFilename); + (void)remove(RWopsAlphabetFilename); /* Create a test file */ handle = fopen(RWopsReadTestFilename, "w"); SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsReadTestFilename); - if (handle == NULL) return; + if (handle == NULL) { + return; + } /* Write some known text into it */ fileLen = SDL_strlen(RWopsHelloWorldTestString); writtenLen = fwrite(RWopsHelloWorldTestString, 1, fileLen, handle); - SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", (int) fileLen, (int) writtenLen); + SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", (int)fileLen, (int)writtenLen); result = fclose(handle); SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); /* Create a second test file */ handle = fopen(RWopsAlphabetFilename, "w"); SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsAlphabetFilename); - if (handle == NULL) return; + if (handle == NULL) { + return; + } /* Write alphabet text into it */ fileLen = SDL_strlen(RWopsAlphabetString); writtenLen = fwrite(RWopsAlphabetString, 1, fileLen, handle); - SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", (int) fileLen, (int) writtenLen); + SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", (int)fileLen, (int)writtenLen); result = fclose(handle); SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); SDLTest_AssertPass("Creation of test file completed"); } -void -RWopsTearDown(void *arg) +void RWopsTearDown(void *arg) { int result; /* Remove the created files to clean up; ignore errors for write filename */ result = remove(RWopsReadTestFilename); SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsReadTestFilename, result); - remove(RWopsWriteTestFilename); + (void)remove(RWopsWriteTestFilename); result = remove(RWopsAlphabetFilename); SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsAlphabetFilename, result); @@ -93,78 +95,76 @@ RWopsTearDown(void *arg) * http://wiki.libsdl.org/SDL_RWseek * http://wiki.libsdl.org/SDL_RWread */ -void -_testGenericRWopsValidations(SDL_RWops *rw, int write) +void _testGenericRWopsValidations(SDL_RWops *rw, int write) { - char buf[sizeof(RWopsHelloWorldTestString)]; - Sint64 i; - size_t s; - int seekPos = SDLTest_RandomIntegerInRange(4, 8); - - /* Clear buffer */ - SDL_zeroa(buf); - - /* Set to start. */ - i = SDL_RWseek(rw, 0, RW_SEEK_SET ); - SDLTest_AssertPass("Call to SDL_RWseek succeeded"); - SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %"SDL_PRIs64, i); - - /* Test write. */ - s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1); - SDLTest_AssertPass("Call to SDL_RWwrite succeeded"); - if (write) { - SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", (int) s); - } - else { - SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", (int) s); - } - - /* Test seek to random position */ - i = SDL_RWseek( rw, seekPos, RW_SEEK_SET ); - SDLTest_AssertPass("Call to SDL_RWseek succeeded"); - SDLTest_AssertCheck(i == (Sint64)seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %"SDL_PRIs64, seekPos, seekPos, i); - - /* Test seek back to start */ - i = SDL_RWseek(rw, 0, RW_SEEK_SET ); - SDLTest_AssertPass("Call to SDL_RWseek succeeded"); - SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %"SDL_PRIs64, i); - - /* Test read */ - s = SDL_RWread( rw, buf, 1, sizeof(RWopsHelloWorldTestString)-1 ); - SDLTest_AssertPass("Call to SDL_RWread succeeded"); - SDLTest_AssertCheck( - s == (size_t)(sizeof(RWopsHelloWorldTestString)-1), - "Verify result from SDL_RWread, expected %i, got %i", - (int) (sizeof(RWopsHelloWorldTestString)-1), - (int) s); - SDLTest_AssertCheck( - SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1 ) == 0, - "Verify read bytes match expected string, expected '%s', got '%s'", RWopsHelloWorldTestString, buf); - - /* More seek tests. */ - i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); - SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded"); - SDLTest_AssertCheck( - i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5), - "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i", - (int) (sizeof(RWopsHelloWorldTestString)-5), - (int) i); - - i = SDL_RWseek( rw, -1, RW_SEEK_END ); - SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded"); - SDLTest_AssertCheck( - i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2), - "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i", - (int) (sizeof(RWopsHelloWorldTestString)-2), - (int) i); - - /* Invalid whence seek */ - i = SDL_RWseek( rw, 0, 999 ); - SDLTest_AssertPass("Call to SDL_RWseek(...,0,invalid_whence) succeeded"); - SDLTest_AssertCheck( - i == (Sint64)(-1), - "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i", - (int) i); + char buf[sizeof(RWopsHelloWorldTestString)]; + Sint64 i; + size_t s; + int seekPos = SDLTest_RandomIntegerInRange(4, 8); + + /* Clear buffer */ + SDL_zeroa(buf); + + /* Set to start. */ + i = SDL_RWseek(rw, 0, RW_SEEK_SET); + SDLTest_AssertPass("Call to SDL_RWseek succeeded"); + SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %" SDL_PRIs64, i); + + /* Test write. */ + s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString) - 1, 1); + SDLTest_AssertPass("Call to SDL_RWwrite succeeded"); + if (write) { + SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", (int)s); + } else { + SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", (int)s); + } + + /* Test seek to random position */ + i = SDL_RWseek(rw, seekPos, RW_SEEK_SET); + SDLTest_AssertPass("Call to SDL_RWseek succeeded"); + SDLTest_AssertCheck(i == (Sint64)seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %" SDL_PRIs64, seekPos, seekPos, i); + + /* Test seek back to start */ + i = SDL_RWseek(rw, 0, RW_SEEK_SET); + SDLTest_AssertPass("Call to SDL_RWseek succeeded"); + SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %" SDL_PRIs64, i); + + /* Test read */ + s = SDL_RWread(rw, buf, 1, sizeof(RWopsHelloWorldTestString) - 1); + SDLTest_AssertPass("Call to SDL_RWread succeeded"); + SDLTest_AssertCheck( + s == (size_t)(sizeof(RWopsHelloWorldTestString) - 1), + "Verify result from SDL_RWread, expected %i, got %i", + (int)(sizeof(RWopsHelloWorldTestString) - 1), + (int)s); + SDLTest_AssertCheck( + SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString) - 1) == 0, + "Verify read bytes match expected string, expected '%s', got '%s'", RWopsHelloWorldTestString, buf); + + /* More seek tests. */ + i = SDL_RWseek(rw, -4, RW_SEEK_CUR); + SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded"); + SDLTest_AssertCheck( + i == (Sint64)(sizeof(RWopsHelloWorldTestString) - 5), + "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i", + (int)(sizeof(RWopsHelloWorldTestString) - 5), + (int)i); + + i = SDL_RWseek(rw, -1, RW_SEEK_END); + SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded"); + SDLTest_AssertCheck( + i == (Sint64)(sizeof(RWopsHelloWorldTestString) - 2), + "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i", + (int)(sizeof(RWopsHelloWorldTestString) - 2), + (int)i); + + /* Invalid whence seek */ + i = SDL_RWseek(rw, 0, 999); + SDLTest_AssertPass("Call to SDL_RWseek(...,0,invalid_whence) succeeded"); + SDLTest_AssertCheck( + i == (Sint64)(-1), + "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i", + (int)i); } /* ! @@ -173,45 +173,44 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write) * \sa http://wiki.libsdl.org/SDL_RWFromFile * */ -int -rwops_testParamNegative (void) +int rwops_testParamNegative(void) { - SDL_RWops *rwops; + SDL_RWops *rwops; - /* These should all fail. */ - rwops = SDL_RWFromFile(NULL, NULL); - SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, NULL) succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, NULL) returns NULL"); + /* These should all fail. */ + rwops = SDL_RWFromFile(NULL, NULL); + SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, NULL) succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, NULL) returns NULL"); - rwops = SDL_RWFromFile(NULL, "ab+"); - SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, \"ab+\") succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, \"ab+\") returns NULL"); + rwops = SDL_RWFromFile(NULL, "ab+"); + SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, \"ab+\") succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, \"ab+\") returns NULL"); - rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); - SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, \"sldfkjsldkfj\") succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, \"sldfkjsldkfj\") returns NULL"); + rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); + SDLTest_AssertPass("Call to SDL_RWFromFile(NULL, \"sldfkjsldkfj\") succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(NULL, \"sldfkjsldkfj\") returns NULL"); - rwops = SDL_RWFromFile("something", ""); - SDLTest_AssertPass("Call to SDL_RWFromFile(\"something\", \"\") succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(\"something\", \"\") returns NULL"); + rwops = SDL_RWFromFile("something", ""); + SDLTest_AssertPass("Call to SDL_RWFromFile(\"something\", \"\") succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(\"something\", \"\") returns NULL"); - rwops = SDL_RWFromFile("something", NULL); - SDLTest_AssertPass("Call to SDL_RWFromFile(\"something\", NULL) succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(\"something\", NULL) returns NULL"); + rwops = SDL_RWFromFile("something", NULL); + SDLTest_AssertPass("Call to SDL_RWFromFile(\"something\", NULL) succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromFile(\"something\", NULL) returns NULL"); - rwops = SDL_RWFromMem((void *)NULL, 10); - SDLTest_AssertPass("Call to SDL_RWFromMem(NULL, 10) succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromMem(NULL, 10) returns NULL"); + rwops = SDL_RWFromMem(NULL, 10); + SDLTest_AssertPass("Call to SDL_RWFromMem(NULL, 10) succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromMem(NULL, 10) returns NULL"); - rwops = SDL_RWFromMem((void *)RWopsAlphabetString, 0); - SDLTest_AssertPass("Call to SDL_RWFromMem(data, 0) succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromMem(data, 0) returns NULL"); + rwops = SDL_RWFromMem((void *)RWopsAlphabetString, 0); + SDLTest_AssertPass("Call to SDL_RWFromMem(data, 0) succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromMem(data, 0) returns NULL"); - rwops = SDL_RWFromConstMem((const void *)RWopsAlphabetString, 0); - SDLTest_AssertPass("Call to SDL_RWFromConstMem(data, 0) succeeded"); - SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromConstMem(data, 0) returns NULL"); + rwops = SDL_RWFromConstMem((const void *)RWopsAlphabetString, 0); + SDLTest_AssertPass("Call to SDL_RWFromConstMem(data, 0) succeeded"); + SDLTest_AssertCheck(rwops == NULL, "Verify SDL_RWFromConstMem(data, 0) returns NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -220,39 +219,39 @@ rwops_testParamNegative (void) * \sa http://wiki.libsdl.org/SDL_RWFromMem * \sa http://wiki.libsdl.org/SDL_RWClose */ -int -rwops_testMem (void) +int rwops_testMem(void) { - char mem[sizeof(RWopsHelloWorldTestString)]; - SDL_RWops *rw; - int result; + char mem[sizeof(RWopsHelloWorldTestString)]; + SDL_RWops *rw; + int result; - /* Clear buffer */ - SDL_zeroa(mem); + /* Clear buffer */ + SDL_zeroa(mem); - /* Open */ - rw = SDL_RWFromMem(mem, sizeof(RWopsHelloWorldTestString)-1); - SDLTest_AssertPass("Call to SDL_RWFromMem() succeeded"); - SDLTest_AssertCheck(rw != NULL, "Verify opening memory with SDL_RWFromMem does not return NULL"); + /* Open */ + rw = SDL_RWFromMem(mem, sizeof(RWopsHelloWorldTestString) - 1); + SDLTest_AssertPass("Call to SDL_RWFromMem() succeeded"); + SDLTest_AssertCheck(rw != NULL, "Verify opening memory with SDL_RWFromMem does not return NULL"); - /* Bail out if NULL */ - if (rw == NULL) return TEST_ABORTED; + /* Bail out if NULL */ + if (rw == NULL) { + return TEST_ABORTED; + } - /* Check type */ - SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY, "Verify RWops type is SDL_RWOPS_MEMORY; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY, rw->type); + /* Check type */ + SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY, "Verify RWops type is SDL_RWOPS_MEMORY; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY, rw->type); - /* Run generic tests */ - _testGenericRWopsValidations(rw, 1); + /* Run generic tests */ + _testGenericRWopsValidations(rw, 1); - /* Close */ - result = SDL_RWclose(rw); - SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + /* Close */ + result = SDL_RWclose(rw); + SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests opening from memory. * @@ -260,35 +259,35 @@ rwops_testMem (void) * http://wiki.libsdl.org/SDL_RWFromConstMem * http://wiki.libsdl.org/SDL_RWClose */ -int -rwops_testConstMem (void) +int rwops_testConstMem(void) { - SDL_RWops *rw; - int result; + SDL_RWops *rw; + int result; - /* Open handle */ - rw = SDL_RWFromConstMem( RWopsHelloWorldCompString, sizeof(RWopsHelloWorldCompString)-1 ); - SDLTest_AssertPass("Call to SDL_RWFromConstMem() succeeded"); - SDLTest_AssertCheck(rw != NULL, "Verify opening memory with SDL_RWFromConstMem does not return NULL"); + /* Open handle */ + rw = SDL_RWFromConstMem(RWopsHelloWorldCompString, sizeof(RWopsHelloWorldCompString) - 1); + SDLTest_AssertPass("Call to SDL_RWFromConstMem() succeeded"); + SDLTest_AssertCheck(rw != NULL, "Verify opening memory with SDL_RWFromConstMem does not return NULL"); - /* Bail out if NULL */ - if (rw == NULL) return TEST_ABORTED; + /* Bail out if NULL */ + if (rw == NULL) { + return TEST_ABORTED; + } - /* Check type */ - SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY_RO, "Verify RWops type is SDL_RWOPS_MEMORY_RO; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY_RO, rw->type); + /* Check type */ + SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY_RO, "Verify RWops type is SDL_RWOPS_MEMORY_RO; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY_RO, rw->type); - /* Run generic tests */ - _testGenericRWopsValidations( rw, 0 ); + /* Run generic tests */ + _testGenericRWopsValidations(rw, 0); - /* Close handle */ - result = SDL_RWclose(rw); - SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + /* Close handle */ + result = SDL_RWclose(rw); + SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests reading from file. * @@ -296,44 +295,45 @@ rwops_testConstMem (void) * http://wiki.libsdl.org/SDL_RWFromFile * http://wiki.libsdl.org/SDL_RWClose */ -int -rwops_testFileRead(void) +int rwops_testFileRead(void) { - SDL_RWops *rw; - int result; + SDL_RWops *rw; + int result; - /* Read test. */ - rw = SDL_RWFromFile(RWopsReadTestFilename, "r"); - SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"r\") succeeded"); - SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in read mode does not return NULL"); + /* Read test. */ + rw = SDL_RWFromFile(RWopsReadTestFilename, "r"); + SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"r\") succeeded"); + SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in read mode does not return NULL"); - /* Bail out if NULL */ - if (rw == NULL) return TEST_ABORTED; + /* Bail out if NULL */ + if (rw == NULL) { + return TEST_ABORTED; + } - /* Check type */ + /* Check type */ #if defined(__ANDROID__) - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, - "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, + "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); #elif defined(__WIN32__) - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_WINFILE, - "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_WINFILE, + "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); #else - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, - "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_STDFILE, + "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type); #endif - /* Run generic tests */ - _testGenericRWopsValidations( rw, 0 ); + /* Run generic tests */ + _testGenericRWopsValidations(rw, 0); - /* Close handle */ - result = SDL_RWclose(rw); - SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + /* Close handle */ + result = SDL_RWclose(rw); + SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -343,47 +343,47 @@ rwops_testFileRead(void) * http://wiki.libsdl.org/SDL_RWFromFile * http://wiki.libsdl.org/SDL_RWClose */ -int -rwops_testFileWrite(void) +int rwops_testFileWrite(void) { - SDL_RWops *rw; - int result; + SDL_RWops *rw; + int result; - /* Write test. */ - rw = SDL_RWFromFile(RWopsWriteTestFilename, "w+"); - SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\") succeeded"); - SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); + /* Write test. */ + rw = SDL_RWFromFile(RWopsWriteTestFilename, "w+"); + SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\") succeeded"); + SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); - /* Bail out if NULL */ - if (rw == NULL) return TEST_ABORTED; + /* Bail out if NULL */ + if (rw == NULL) { + return TEST_ABORTED; + } - /* Check type */ + /* Check type */ #if defined(__ANDROID__) - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, - "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, + "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); #elif defined(__WIN32__) - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_WINFILE, - "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_WINFILE, + "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); #else - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, - "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type); + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_STDFILE, + "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type); #endif - /* Run generic tests */ - _testGenericRWopsValidations( rw, 1 ); + /* Run generic tests */ + _testGenericRWopsValidations(rw, 1); - /* Close handle */ - result = SDL_RWclose(rw); - SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + /* Close handle */ + result = SDL_RWclose(rw); + SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests reading from file handle * @@ -495,25 +495,26 @@ rwops_testFPWrite(void) * \sa http://wiki.libsdl.org/SDL_AllocRW * \sa http://wiki.libsdl.org/SDL_FreeRW */ -int -rwops_testAllocFree (void) +int rwops_testAllocFree(void) { - /* Allocate context */ - SDL_RWops *rw = SDL_AllocRW(); - SDLTest_AssertPass("Call to SDL_AllocRW() succeeded"); - SDLTest_AssertCheck(rw != NULL, "Validate result from SDL_AllocRW() is not NULL"); - if (rw==NULL) return TEST_ABORTED; - - /* Check type */ - SDLTest_AssertCheck( - rw->type == SDL_RWOPS_UNKNOWN, - "Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_UNKNOWN, rw->type); - - /* Free context again */ - SDL_FreeRW(rw); - SDLTest_AssertPass("Call to SDL_FreeRW() succeeded"); - - return TEST_COMPLETED; + /* Allocate context */ + SDL_RWops *rw = SDL_AllocRW(); + SDLTest_AssertPass("Call to SDL_AllocRW() succeeded"); + SDLTest_AssertCheck(rw != NULL, "Validate result from SDL_AllocRW() is not NULL"); + if (rw == NULL) { + return TEST_ABORTED; + } + + /* Check type */ + SDLTest_AssertCheck( + rw->type == SDL_RWOPS_UNKNOWN, + "Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_UNKNOWN, rw->type); + + /* Free context again */ + SDL_FreeRW(rw); + SDLTest_AssertPass("Call to SDL_FreeRW() succeeded"); + + return TEST_COMPLETED; } /** @@ -522,64 +523,61 @@ rwops_testAllocFree (void) * \sa http://wiki.libsdl.org/SDL_RWFromMem * \sa http://wiki.libsdl.org/SDL_RWFromFile */ -int -rwops_testCompareRWFromMemWithRWFromFile(void) +int rwops_testCompareRWFromMemWithRWFromFile(void) { - int slen = 26; - char buffer_file[27]; - char buffer_mem[27]; - size_t rv_file; - size_t rv_mem; - Uint64 sv_file; - Uint64 sv_mem; - SDL_RWops* rwops_file; - SDL_RWops* rwops_mem; - int size; - int result; - - - for (size=5; size<10; size++) - { - /* Terminate buffer */ - buffer_file[slen] = 0; - buffer_mem[slen] = 0; - - /* Read/seek from memory */ - rwops_mem = SDL_RWFromMem((void *)RWopsAlphabetString, slen); - SDLTest_AssertPass("Call to SDL_RWFromMem()"); - rv_mem = SDL_RWread(rwops_mem, buffer_mem, size, 6); - SDLTest_AssertPass("Call to SDL_RWread(mem, size=%d)", size); - sv_mem = SDL_RWseek(rwops_mem, 0, SEEK_END); - SDLTest_AssertPass("Call to SDL_RWseek(mem,SEEK_END)"); - result = SDL_RWclose(rwops_mem); - SDLTest_AssertPass("Call to SDL_RWclose(mem)"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - - /* Read/see from file */ - rwops_file = SDL_RWFromFile(RWopsAlphabetFilename, "r"); - SDLTest_AssertPass("Call to SDL_RWFromFile()"); - rv_file = SDL_RWread(rwops_file, buffer_file, size, 6); - SDLTest_AssertPass("Call to SDL_RWread(file, size=%d)", size); - sv_file = SDL_RWseek(rwops_file, 0, SEEK_END); - SDLTest_AssertPass("Call to SDL_RWseek(file,SEEK_END)"); - result = SDL_RWclose(rwops_file); - SDLTest_AssertPass("Call to SDL_RWclose(file)"); - SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - - /* Compare */ - SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", (int) rv_mem, (int) rv_file); - SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%d sv_file=%d", (int) sv_mem, (int) sv_file); - SDLTest_AssertCheck(buffer_mem[slen] == 0, "Verify mem buffer termination; expected: 0, got: %d", buffer_mem[slen]); - SDLTest_AssertCheck(buffer_file[slen] == 0, "Verify file buffer termination; expected: 0, got: %d", buffer_file[slen]); - SDLTest_AssertCheck( - SDL_strncmp(buffer_mem, RWopsAlphabetString, slen) == 0, - "Verify mem buffer contain alphabet string; expected: %s, got: %s", RWopsAlphabetString, buffer_mem); - SDLTest_AssertCheck( - SDL_strncmp(buffer_file, RWopsAlphabetString, slen) == 0, - "Verify file buffer contain alphabet string; expected: %s, got: %s", RWopsAlphabetString, buffer_file); - } + int slen = 26; + char buffer_file[27]; + char buffer_mem[27]; + size_t rv_file; + size_t rv_mem; + Uint64 sv_file; + Uint64 sv_mem; + SDL_RWops *rwops_file; + SDL_RWops *rwops_mem; + int size; + int result; - return TEST_COMPLETED; + for (size = 5; size < 10; size++) { + /* Terminate buffer */ + buffer_file[slen] = 0; + buffer_mem[slen] = 0; + + /* Read/seek from memory */ + rwops_mem = SDL_RWFromMem((void *)RWopsAlphabetString, slen); + SDLTest_AssertPass("Call to SDL_RWFromMem()"); + rv_mem = SDL_RWread(rwops_mem, buffer_mem, size, 6); + SDLTest_AssertPass("Call to SDL_RWread(mem, size=%d)", size); + sv_mem = SDL_RWseek(rwops_mem, 0, SEEK_END); + SDLTest_AssertPass("Call to SDL_RWseek(mem,SEEK_END)"); + result = SDL_RWclose(rwops_mem); + SDLTest_AssertPass("Call to SDL_RWclose(mem)"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + + /* Read/see from file */ + rwops_file = SDL_RWFromFile(RWopsAlphabetFilename, "r"); + SDLTest_AssertPass("Call to SDL_RWFromFile()"); + rv_file = SDL_RWread(rwops_file, buffer_file, size, 6); + SDLTest_AssertPass("Call to SDL_RWread(file, size=%d)", size); + sv_file = SDL_RWseek(rwops_file, 0, SEEK_END); + SDLTest_AssertPass("Call to SDL_RWseek(file,SEEK_END)"); + result = SDL_RWclose(rwops_file); + SDLTest_AssertPass("Call to SDL_RWclose(file)"); + SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); + + /* Compare */ + SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", (int)rv_mem, (int)rv_file); + SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%d sv_file=%d", (int)sv_mem, (int)sv_file); + SDLTest_AssertCheck(buffer_mem[slen] == 0, "Verify mem buffer termination; expected: 0, got: %d", buffer_mem[slen]); + SDLTest_AssertCheck(buffer_file[slen] == 0, "Verify file buffer termination; expected: 0, got: %d", buffer_file[slen]); + SDLTest_AssertCheck( + SDL_strncmp(buffer_mem, RWopsAlphabetString, slen) == 0, + "Verify mem buffer contain alphabet string; expected: %s, got: %s", RWopsAlphabetString, buffer_mem); + SDLTest_AssertCheck( + SDL_strncmp(buffer_file, RWopsAlphabetString, slen) == 0, + "Verify file buffer contain alphabet string; expected: %s, got: %s", RWopsAlphabetString, buffer_file); + } + + return TEST_COMPLETED; } /** @@ -591,141 +589,146 @@ rwops_testCompareRWFromMemWithRWFromFile(void) * http://wiki.libsdl.org/SDL_ReadBE16 * http://wiki.libsdl.org/SDL_WriteBE16 */ -int -rwops_testFileWriteReadEndian(void) +int rwops_testFileWriteReadEndian(void) { - SDL_RWops *rw; - Sint64 result; - int mode; - size_t objectsWritten; - Uint16 BE16value; - Uint32 BE32value; - Uint64 BE64value; - Uint16 LE16value; - Uint32 LE32value; - Uint64 LE64value; - Uint16 BE16test; - Uint32 BE32test; - Uint64 BE64test; - Uint16 LE16test; - Uint32 LE32test; - Uint64 LE64test; - int cresult; - - for (mode = 0; mode < 3; mode++) { - - /* Create test data */ - switch (mode) { - default: - case 0: - SDLTest_Log("All 0 values"); - BE16value = 0; - BE32value = 0; - BE64value = 0; - LE16value = 0; - LE32value = 0; - LE64value = 0; - break; - case 1: - SDLTest_Log("All 1 values"); - BE16value = 1; - BE32value = 1; - BE64value = 1; - LE16value = 1; - LE32value = 1; - LE64value = 1; - break; - case 2: - SDLTest_Log("Random values"); - BE16value = SDLTest_RandomUint16(); - BE32value = SDLTest_RandomUint32(); - BE64value = SDLTest_RandomUint64(); - LE16value = SDLTest_RandomUint16(); - LE32value = SDLTest_RandomUint32(); - LE64value = SDLTest_RandomUint64(); - break; - } - - /* Write test. */ - rw = SDL_RWFromFile(RWopsWriteTestFilename, "w+"); - SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\")"); - SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); - - /* Bail out if NULL */ - if (rw == NULL) return TEST_ABORTED; - - /* Write test data */ - objectsWritten = SDL_WriteBE16(rw, BE16value); - SDLTest_AssertPass("Call to SDL_WriteBE16()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - objectsWritten = SDL_WriteBE32(rw, BE32value); - SDLTest_AssertPass("Call to SDL_WriteBE32()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - objectsWritten = SDL_WriteBE64(rw, BE64value); - SDLTest_AssertPass("Call to SDL_WriteBE64()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - objectsWritten = SDL_WriteLE16(rw, LE16value); - SDLTest_AssertPass("Call to SDL_WriteLE16()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - objectsWritten = SDL_WriteLE32(rw, LE32value); - SDLTest_AssertPass("Call to SDL_WriteLE32()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - objectsWritten = SDL_WriteLE64(rw, LE64value); - SDLTest_AssertPass("Call to SDL_WriteLE64()"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten); - - /* Test seek to start */ - result = SDL_RWseek( rw, 0, RW_SEEK_SET ); - SDLTest_AssertPass("Call to SDL_RWseek succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %i", (int) result); - - /* Read test data */ - BE16test = SDL_ReadBE16(rw); - SDLTest_AssertPass("Call to SDL_ReadBE16()"); - SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test); - BE32test = SDL_ReadBE32(rw); - SDLTest_AssertPass("Call to SDL_ReadBE32()"); - SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, BE32value, BE32test); - BE64test = SDL_ReadBE64(rw); - SDLTest_AssertPass("Call to SDL_ReadBE64()"); - SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, BE64value, BE64test); - LE16test = SDL_ReadLE16(rw); - SDLTest_AssertPass("Call to SDL_ReadLE16()"); - SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test); - LE32test = SDL_ReadLE32(rw); - SDLTest_AssertPass("Call to SDL_ReadLE32()"); - SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, LE32value, LE32test); - LE64test = SDL_ReadLE64(rw); - SDLTest_AssertPass("Call to SDL_ReadLE64()"); - SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, LE64value, LE64test); - - /* Close handle */ - cresult = SDL_RWclose(rw); - SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(cresult == 0, "Verify result value is 0; got: %d", cresult); - } - - return TEST_COMPLETED; + SDL_RWops *rw; + Sint64 result; + int mode; + size_t objectsWritten; + Uint16 BE16value; + Uint32 BE32value; + Uint64 BE64value; + Uint16 LE16value; + Uint32 LE32value; + Uint64 LE64value; + Uint16 BE16test; + Uint32 BE32test; + Uint64 BE64test; + Uint16 LE16test; + Uint32 LE32test; + Uint64 LE64test; + int cresult; + + for (mode = 0; mode < 3; mode++) { + + /* Create test data */ + switch (mode) { + default: + case 0: + SDLTest_Log("All 0 values"); + BE16value = 0; + BE32value = 0; + BE64value = 0; + LE16value = 0; + LE32value = 0; + LE64value = 0; + break; + case 1: + SDLTest_Log("All 1 values"); + BE16value = 1; + BE32value = 1; + BE64value = 1; + LE16value = 1; + LE32value = 1; + LE64value = 1; + break; + case 2: + SDLTest_Log("Random values"); + BE16value = SDLTest_RandomUint16(); + BE32value = SDLTest_RandomUint32(); + BE64value = SDLTest_RandomUint64(); + LE16value = SDLTest_RandomUint16(); + LE32value = SDLTest_RandomUint32(); + LE64value = SDLTest_RandomUint64(); + break; + } + + /* Write test. */ + rw = SDL_RWFromFile(RWopsWriteTestFilename, "w+"); + SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\")"); + SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); + + /* Bail out if NULL */ + if (rw == NULL) { + return TEST_ABORTED; + } + + /* Write test data */ + objectsWritten = SDL_WriteBE16(rw, BE16value); + SDLTest_AssertPass("Call to SDL_WriteBE16()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + objectsWritten = SDL_WriteBE32(rw, BE32value); + SDLTest_AssertPass("Call to SDL_WriteBE32()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + objectsWritten = SDL_WriteBE64(rw, BE64value); + SDLTest_AssertPass("Call to SDL_WriteBE64()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + objectsWritten = SDL_WriteLE16(rw, LE16value); + SDLTest_AssertPass("Call to SDL_WriteLE16()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + objectsWritten = SDL_WriteLE32(rw, LE32value); + SDLTest_AssertPass("Call to SDL_WriteLE32()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + objectsWritten = SDL_WriteLE64(rw, LE64value); + SDLTest_AssertPass("Call to SDL_WriteLE64()"); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int)objectsWritten); + + /* Test seek to start */ + result = SDL_RWseek(rw, 0, RW_SEEK_SET); + SDLTest_AssertPass("Call to SDL_RWseek succeeded"); + SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %i", (int)result); + + /* Read test data */ + BE16test = SDL_ReadBE16(rw); + SDLTest_AssertPass("Call to SDL_ReadBE16()"); + SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test); + BE32test = SDL_ReadBE32(rw); + SDLTest_AssertPass("Call to SDL_ReadBE32()"); + SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, BE32value, BE32test); + BE64test = SDL_ReadBE64(rw); + SDLTest_AssertPass("Call to SDL_ReadBE64()"); + SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %" SDL_PRIu64 ", got: %" SDL_PRIu64, BE64value, BE64test); + LE16test = SDL_ReadLE16(rw); + SDLTest_AssertPass("Call to SDL_ReadLE16()"); + SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test); + LE32test = SDL_ReadLE32(rw); + SDLTest_AssertPass("Call to SDL_ReadLE32()"); + SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, LE32value, LE32test); + LE64test = SDL_ReadLE64(rw); + SDLTest_AssertPass("Call to SDL_ReadLE64()"); + SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %" SDL_PRIu64 ", got: %" SDL_PRIu64, LE64value, LE64test); + + /* Close handle */ + cresult = SDL_RWclose(rw); + SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); + SDLTest_AssertCheck(cresult == 0, "Verify result value is 0; got: %d", cresult); + } + + return TEST_COMPLETED; } - /* ================= Test References ================== */ /* RWops test cases */ -static const SDLTest_TestCaseReference rwopsTest1 = - { (SDLTest_TestCaseFp)rwops_testParamNegative, "rwops_testParamNegative", "Negative test for SDL_RWFromFile parameters", TEST_ENABLED }; +static const SDLTest_TestCaseReference rwopsTest1 = { + (SDLTest_TestCaseFp)rwops_testParamNegative, "rwops_testParamNegative", "Negative test for SDL_RWFromFile parameters", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rwopsTest2 = - { (SDLTest_TestCaseFp)rwops_testMem, "rwops_testMem", "Tests opening from memory", TEST_ENABLED }; +static const SDLTest_TestCaseReference rwopsTest2 = { + (SDLTest_TestCaseFp)rwops_testMem, "rwops_testMem", "Tests opening from memory", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rwopsTest3 = - { (SDLTest_TestCaseFp)rwops_testConstMem, "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED }; +static const SDLTest_TestCaseReference rwopsTest3 = { + (SDLTest_TestCaseFp)rwops_testConstMem, "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rwopsTest4 = - { (SDLTest_TestCaseFp)rwops_testFileRead, "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED }; +static const SDLTest_TestCaseReference rwopsTest4 = { + (SDLTest_TestCaseFp)rwops_testFileRead, "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED +}; -static const SDLTest_TestCaseReference rwopsTest5 = - { (SDLTest_TestCaseFp)rwops_testFileWrite, "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED }; +static const SDLTest_TestCaseReference rwopsTest5 = { + (SDLTest_TestCaseFp)rwops_testFileWrite, "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED +}; static const SDLTest_TestCaseReference rwopsTest6 = { (SDLTest_TestCaseFp)rwops_testFPRead, "rwops_testFPRead", "Test reading from file pointer", TEST_ENABLED }; @@ -743,7 +746,7 @@ static const SDLTest_TestCaseReference rwopsTest10 = { (SDLTest_TestCaseFp)rwops_testCompareRWFromMemWithRWFromFile, "rwops_testCompareRWFromMemWithRWFromFile", "Compare RWFromMem and RWFromFile RWops for read and seek", TEST_ENABLED }; /* Sequence of RWops test cases */ -static const SDLTest_TestCaseReference *rwopsTests[] = { +static const SDLTest_TestCaseReference *rwopsTests[] = { &rwopsTest1, &rwopsTest2, &rwopsTest3, &rwopsTest4, &rwopsTest5, &rwopsTest6, &rwopsTest7, &rwopsTest8, &rwopsTest9, &rwopsTest10, NULL }; diff --git a/modules/SDL2/test/testautomation_sdltest.c b/modules/SDL2/test/testautomation_sdltest.c index 9c97e60..194a69d 100644 --- a/modules/SDL2/test/testautomation_sdltest.c +++ b/modules/SDL2/test/testautomation_sdltest.c @@ -24,1286 +24,1280 @@ /* Test case functions */ -/* Forward declarations for internal harness functions */ -extern char *SDLTest_GenerateRunSeed(const int length); - /** * @brief Calls to SDLTest_GenerateRunSeed() */ -int -sdltest_generateRunSeed(void *arg) +int sdltest_generateRunSeed(void *arg) { - char* result; - size_t i, l; - int j; - - for (i = 1; i <= 10; i += 3) { - result = SDLTest_GenerateRunSeed((const int)i); - SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); - SDLTest_AssertCheck(result != NULL, "Verify returned value is not NULL"); - if (result != NULL) { - l = SDL_strlen(result); - SDLTest_AssertCheck(l == i, "Verify length of returned value is %d, got: %d", (int) i, (int) l); - SDL_free(result); - } - } - - /* Negative cases */ - for (j = -2; j <= 0; j++) { - result = SDLTest_GenerateRunSeed((const int)j); - SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); - SDLTest_AssertCheck(result == NULL, "Verify returned value is not NULL"); - } - - return TEST_COMPLETED; + char *result; + size_t i, l; + int j; + + for (i = 1; i <= 10; i += 3) { + result = SDLTest_GenerateRunSeed((int)i); + SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); + SDLTest_AssertCheck(result != NULL, "Verify returned value is not NULL"); + if (result != NULL) { + l = SDL_strlen(result); + SDLTest_AssertCheck(l == i, "Verify length of returned value is %d, got: %d", (int)i, (int)l); + SDL_free(result); + } + } + + /* Negative cases */ + for (j = -2; j <= 0; j++) { + result = SDLTest_GenerateRunSeed(j); + SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); + SDLTest_AssertCheck(result == NULL, "Verify returned value is not NULL"); + } + + return TEST_COMPLETED; } /** * @brief Calls to SDLTest_GetFuzzerInvocationCount() */ -int -sdltest_getFuzzerInvocationCount(void *arg) +int sdltest_getFuzzerInvocationCount(void *arg) { - Uint8 result; - int fuzzerCount1, fuzzerCount2; + Uint8 result; + int fuzzerCount1, fuzzerCount2; - fuzzerCount1 = SDLTest_GetFuzzerInvocationCount(); - SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); - SDLTest_AssertCheck(fuzzerCount1 >= 0, "Verify returned value, expected: >=0, got: %d", fuzzerCount1); + fuzzerCount1 = SDLTest_GetFuzzerInvocationCount(); + SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); + SDLTest_AssertCheck(fuzzerCount1 >= 0, "Verify returned value, expected: >=0, got: %d", fuzzerCount1); - result = SDLTest_RandomUint8(); - SDLTest_AssertPass("Call to SDLTest_RandomUint8(), returned %d", result); + result = SDLTest_RandomUint8(); + SDLTest_AssertPass("Call to SDLTest_RandomUint8(), returned %d", result); - fuzzerCount2 = SDLTest_GetFuzzerInvocationCount(); - SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); - SDLTest_AssertCheck(fuzzerCount2 > fuzzerCount1, "Verify returned value, expected: >%d, got: %d", fuzzerCount1, fuzzerCount2); + fuzzerCount2 = SDLTest_GetFuzzerInvocationCount(); + SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); + SDLTest_AssertCheck(fuzzerCount2 > fuzzerCount1, "Verify returned value, expected: >%d, got: %d", fuzzerCount1, fuzzerCount2); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Calls to random number generators */ -int -sdltest_randomNumber(void *arg) +int sdltest_randomNumber(void *arg) { - Sint64 result; - double dresult; - Uint64 umax; - Sint64 min, max; - - result = (Sint64)SDLTest_RandomUint8(); - umax = (1 << 8) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomUint8"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); - - result = (Sint64)SDLTest_RandomSint8(); - min = 0 - (1 << 7); - max = (1 << 7) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomSint8"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); - - result = (Sint64)SDLTest_RandomUint16(); - umax = (1 << 16) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomUint16"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); - - result = (Sint64)SDLTest_RandomSint16(); - min = 0 - (1 << 15); - max = (1 << 15) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomSint16"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); - - result = (Sint64)SDLTest_RandomUint32(); - umax = ((Uint64)1 << 32) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomUint32"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); - - result = (Sint64)SDLTest_RandomSint32(); - min = 0 - ((Sint64)1 << 31); - max = ((Sint64)1 << 31) - 1; - SDLTest_AssertPass("Call to SDLTest_RandomSint32"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); - - SDLTest_RandomUint64(); - SDLTest_AssertPass("Call to SDLTest_RandomUint64"); - - result = SDLTest_RandomSint64(); - SDLTest_AssertPass("Call to SDLTest_RandomSint64"); - - dresult = (double)SDLTest_RandomUnitFloat(); - SDLTest_AssertPass("Call to SDLTest_RandomUnitFloat"); - SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult); - - dresult = (double)SDLTest_RandomFloat(); - SDLTest_AssertPass("Call to SDLTest_RandomFloat"); - SDLTest_AssertCheck(dresult >= (double)(-FLT_MAX) && dresult <= (double)FLT_MAX, "Verify result value, expected: [%e,%e], got: %e", (double)(-FLT_MAX), (double)FLT_MAX, dresult); - - dresult = (double)SDLTest_RandomUnitDouble(); - SDLTest_AssertPass("Call to SDLTest_RandomUnitDouble"); - SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult); - - dresult = SDLTest_RandomDouble(); - SDLTest_AssertPass("Call to SDLTest_RandomDouble"); - - return TEST_COMPLETED; + Sint64 result; + double dresult; + Uint64 umax; + Sint64 min, max; + + result = (Sint64)SDLTest_RandomUint8(); + umax = (1 << 8) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomUint8"); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%" SDL_PRIu64 "], got: %" SDL_PRIs64, umax, result); + + result = (Sint64)SDLTest_RandomSint8(); + min = 0 - (1 << 7); + max = (1 << 7) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomSint8"); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%" SDL_PRIs64 ",%" SDL_PRIs64 "], got: %" SDL_PRIs64, min, max, result); + + result = (Sint64)SDLTest_RandomUint16(); + umax = (1 << 16) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomUint16"); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%" SDL_PRIu64 "], got: %" SDL_PRIs64, umax, result); + + result = (Sint64)SDLTest_RandomSint16(); + min = 0 - (1 << 15); + max = (1 << 15) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomSint16"); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%" SDL_PRIs64 ",%" SDL_PRIs64 "], got: %" SDL_PRIs64, min, max, result); + + result = (Sint64)SDLTest_RandomUint32(); + umax = ((Uint64)1 << 32) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomUint32"); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%" SDL_PRIu64 "], got: %" SDL_PRIs64, umax, result); + + result = (Sint64)SDLTest_RandomSint32(); + min = 0 - ((Sint64)1 << 31); + max = ((Sint64)1 << 31) - 1; + SDLTest_AssertPass("Call to SDLTest_RandomSint32"); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%" SDL_PRIs64 ",%" SDL_PRIs64 "], got: %" SDL_PRIs64, min, max, result); + + SDLTest_RandomUint64(); + SDLTest_AssertPass("Call to SDLTest_RandomUint64"); + + result = SDLTest_RandomSint64(); + SDLTest_AssertPass("Call to SDLTest_RandomSint64"); + + dresult = (double)SDLTest_RandomUnitFloat(); + SDLTest_AssertPass("Call to SDLTest_RandomUnitFloat"); + SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult); + + dresult = (double)SDLTest_RandomFloat(); + SDLTest_AssertPass("Call to SDLTest_RandomFloat"); + SDLTest_AssertCheck(dresult >= (double)(-FLT_MAX) && dresult <= (double)FLT_MAX, "Verify result value, expected: [%e,%e], got: %e", (double)(-FLT_MAX), (double)FLT_MAX, dresult); + + dresult = SDLTest_RandomUnitDouble(); + SDLTest_AssertPass("Call to SDLTest_RandomUnitDouble"); + SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult); + + dresult = SDLTest_RandomDouble(); + SDLTest_AssertPass("Call to SDLTest_RandomDouble"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Uint8 */ -int -sdltest_randomBoundaryNumberUint8(void *arg) +int sdltest_randomBoundaryNumberUint8(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Uint64 uresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xfe, SDL_FALSE) returns 0xff (no error) */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 254, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0xff, - "Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xff, SDL_FALSE) returns 0 (sets error) */ - uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 255, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters(0,255,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Uint64 uresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0 || uresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 100, + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xfe, SDL_FALSE) returns 0xff (no error) */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 254, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0xff, + "Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xff, SDL_FALSE) returns 0 (sets error) */ + uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 255, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters(0,255,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Uint16 */ -int -sdltest_randomBoundaryNumberUint16(void *arg) +int sdltest_randomBoundaryNumberUint16(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Uint64 uresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xfffe, SDL_FALSE) returns 0xffff (no error) */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xfffe, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0xffff, - "Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xffff, SDL_FALSE) returns 0 (sets error) */ - uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xffff, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters(0,0xffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Uint64 uresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0 || uresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 100, + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xfffe, SDL_FALSE) returns 0xffff (no error) */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xfffe, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0xffff, + "Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xffff, SDL_FALSE) returns 0 (sets error) */ + uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xffff, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters(0,0xffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Uint32 */ -int -sdltest_randomBoundaryNumberUint32(void *arg) +int sdltest_randomBoundaryNumberUint32(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Uint64 uresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xfffffffe, SDL_FALSE) returns 0xffffffff (no error) */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xfffffffe, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0xffffffff, - "Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xffffffff, SDL_FALSE) returns 0 (sets error) */ - uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xffffffff, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters(0,0xffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Uint64 uresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0 || uresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 100, + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xfffffffe, SDL_FALSE) returns 0xffffffff (no error) */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xfffffffe, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0xffffffff, + "Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xffffffff, SDL_FALSE) returns 0 (sets error) */ + uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xffffffff, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters(0,0xffffffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Uint64 */ -int -sdltest_randomBoundaryNumberUint64(void *arg) +int sdltest_randomBoundaryNumberUint64(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Uint64 uresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); - - /* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, (Uint64)0xffffffffffffffffULL, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xfffffffffffffffe, SDL_FALSE) returns 0xffffffffffffffff (no error) */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xfffffffffffffffeULL, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == (Uint64)0xffffffffffffffffULL, - "Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomUintXBoundaryValue(0, 0xffffffffffffffff, SDL_FALSE) returns 0 (sets error) */ - uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xffffffffffffffffULL, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); - SDLTest_AssertCheck( - uresult == 0, - "Validate result value for parameters(0,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Uint64 uresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + uresult = SDLTest_RandomUint64BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + uresult = SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + uresult = SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + uresult = SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + uresult = SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + uresult = SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0 || uresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ + uresult = SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 100, + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, uresult); + + /* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */ + uresult = SDLTest_RandomUint64BoundaryValue(1, 0xffffffffffffffffULL, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xfffffffffffffffe, SDL_FALSE) returns 0xffffffffffffffff (no error) */ + uresult = SDLTest_RandomUint64BoundaryValue(0, 0xfffffffffffffffeULL, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0xffffffffffffffffULL, + "Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomUintXBoundaryValue(0, 0xffffffffffffffff, SDL_FALSE) returns 0 (sets error) */ + uresult = SDLTest_RandomUint64BoundaryValue(0, 0xffffffffffffffffULL, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); + SDLTest_AssertCheck( + uresult == 0, + "Validate result value for parameters(0,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %" SDL_PRIs64, uresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Sint8 */ -int -sdltest_randomBoundaryNumberSint8(void *arg) +int sdltest_randomBoundaryNumberSint8(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Sint64 sresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == 100, - "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == SCHAR_MIN, - "Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE) returns SCHAR_MAX (no error) */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX -1, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == SCHAR_MAX, - "Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MAX, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (sets error) */ - sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); - SDLTest_AssertCheck( - sresult == SCHAR_MIN, - "Validate result value for parameters(SCHAR_MIN,SCHAR_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Sint64 sresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 0 || sresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == 100, + "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == SCHAR_MIN, + "Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SCHAR_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE) returns SCHAR_MAX (no error) */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == SCHAR_MAX, + "Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SCHAR_MAX, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (sets error) */ + sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); + SDLTest_AssertCheck( + sresult == SCHAR_MIN, + "Validate result value for parameters(SCHAR_MIN,SCHAR_MAX,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SCHAR_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Sint16 */ -int -sdltest_randomBoundaryNumberSint16(void *arg) +int sdltest_randomBoundaryNumberSint16(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Sint64 sresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == 100, - "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == SHRT_MIN, - "Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE) returns SHRT_MAX (no error) */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == SHRT_MAX, - "Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MAX, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE) returns 0 (sets error) */ - sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); - SDLTest_AssertCheck( - sresult == SHRT_MIN, - "Validate result value for parameters(SHRT_MIN,SHRT_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Sint64 sresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 0 || sresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == 100, + "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == SHRT_MIN, + "Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SHRT_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE) returns SHRT_MAX (no error) */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == SHRT_MAX, + "Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SHRT_MAX, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE) returns 0 (sets error) */ + sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); + SDLTest_AssertCheck( + sresult == SHRT_MIN, + "Validate result value for parameters(SHRT_MIN,SHRT_MAX,SDL_FALSE); expected: %d, got: %" SDL_PRIs64, SHRT_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Sint32 */ -int -sdltest_randomBoundaryNumberSint32(void *arg) +int sdltest_randomBoundaryNumberSint32(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Sint64 sresult; + const char *expectedError = "That operation is not supported"; + char *lastError; + Sint64 sresult; #if ((ULONG_MAX) == (UINT_MAX)) - Sint32 long_min = LONG_MIN; - Sint32 long_max = LONG_MAX; + Sint32 long_min = LONG_MIN; + Sint32 long_max = LONG_MAX; #else - Sint32 long_min = INT_MIN; - Sint32 long_max = INT_MAX; + Sint32 long_min = INT_MIN; + Sint32 long_max = INT_MAX; #endif - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == 100, - "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == long_min, - "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == long_max, - "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_max, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); - SDLTest_AssertCheck( - sresult == long_min, - "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 0 || sresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == 100, + "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == long_min, + "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == long_max, + "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_max, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */ + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); + SDLTest_AssertCheck( + sresult == long_min, + "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /* * @brief Calls to random boundary number generators for Sint64 */ -int -sdltest_randomBoundaryNumberSint64(void *arg) +int sdltest_randomBoundaryNumberSint64(void *arg) { - const char *expectedError = "That operation is not supported"; - char *lastError; - Sint64 sresult; - - /* Clean error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, 99, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == 100, - "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); - - /* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN + 1, INT64_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == INT64_MIN, - "Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, INT64_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE) returns LLONG_MAX (no error) */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX - 1, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == INT64_MAX, - "Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, INT64_MAX, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); - - /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE) returns 0 (sets error) */ - sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX, SDL_FALSE); - SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); - SDLTest_AssertCheck( - sresult == INT64_MIN, - "Validate result value for parameters(LLONG_MIN,LLONG_MAX,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, INT64_MIN, sresult); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - - /* Clear error messages */ - SDL_ClearError(); - SDLTest_AssertPass("SDL_ClearError()"); - - return TEST_COMPLETED; + const char *expectedError = "That operation is not supported"; + char *lastError; + Sint64 sresult; + + /* Clean error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */ + sresult = SDLTest_RandomSint64BoundaryValue(10, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10, + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ + sresult = SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11, + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ + sresult = SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12, + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ + sresult = SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ + sresult = SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ + sresult = SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 0 || sresult == 21, + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */ + sresult = SDLTest_RandomSint64BoundaryValue(INT64_MIN, 99, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == 100, + "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %" SDL_PRIs64, sresult); + + /* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */ + sresult = SDLTest_RandomSint64BoundaryValue(INT64_MIN + 1, INT64_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == INT64_MIN, + "Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %" SDL_PRIs64 ", got: %" SDL_PRIs64, INT64_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE) returns LLONG_MAX (no error) */ + sresult = SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX - 1, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == INT64_MAX, + "Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %" SDL_PRIs64 ", got: %" SDL_PRIs64, INT64_MAX, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); + + /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE) returns 0 (sets error) */ + sresult = SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX, SDL_FALSE); + SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); + SDLTest_AssertCheck( + sresult == INT64_MIN, + "Validate result value for parameters(LLONG_MIN,LLONG_MAX,SDL_FALSE); expected: %" SDL_PRIs64 ", got: %" SDL_PRIs64, INT64_MIN, sresult); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /** * @brief Calls to SDLTest_RandomIntegerInRange */ -int -sdltest_randomIntegerInRange(void *arg) +int sdltest_randomIntegerInRange(void *arg) { - Sint32 min, max; - Sint32 result; + Sint32 min, max; + Sint32 result; #if ((ULONG_MAX) == (UINT_MAX)) - Sint32 long_min = LONG_MIN; - Sint32 long_max = LONG_MAX; + Sint32 long_min = LONG_MIN; + Sint32 long_max = LONG_MAX; #else - Sint32 long_min = INT_MIN; - Sint32 long_max = INT_MAX; + Sint32 long_min = INT_MIN; + Sint32 long_max = INT_MAX; #endif - /* Standard range */ - min = (Sint32)SDLTest_RandomSint16(); - max = min + (Sint32)SDLTest_RandomUint8() + 2; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,max)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - /* One Range */ - min = (Sint32)SDLTest_RandomSint16(); - max = min + 1; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min+1)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - /* Zero range */ - min = (Sint32)SDLTest_RandomSint16(); - max = min; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min)"); - SDLTest_AssertCheck(min == result, "Validated returned value; expected: %" SDL_PRIs32 ", got: %" SDL_PRIs32, min, result); - - /* Zero range at zero */ - min = 0; - max = 0; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(0,0)"); - SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %" SDL_PRIs32, result); - - /* Swapped min-max */ - min = (Sint32)SDLTest_RandomSint16(); - max = min + (Sint32)SDLTest_RandomUint8() + 2; - result = SDLTest_RandomIntegerInRange(max, min); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - /* Range with min at integer limit */ - min = long_min; - max = long_max + (Sint32)SDLTest_RandomSint16(); - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - /* Range with max at integer limit */ - min = long_min - (Sint32)SDLTest_RandomSint16(); - max = long_max; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - /* Full integer range */ - min = long_min; - max = long_max; - result = SDLTest_RandomIntegerInRange(min, max); - SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,SINT32_MAX)"); - SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); - - return TEST_COMPLETED; + /* Standard range */ + min = (Sint32)SDLTest_RandomSint16(); + max = min + (Sint32)SDLTest_RandomUint8() + 2; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,max)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + /* One Range */ + min = (Sint32)SDLTest_RandomSint16(); + max = min + 1; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min+1)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + /* Zero range */ + min = (Sint32)SDLTest_RandomSint16(); + max = min; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min)"); + SDLTest_AssertCheck(min == result, "Validated returned value; expected: %" SDL_PRIs32 ", got: %" SDL_PRIs32, min, result); + + /* Zero range at zero */ + min = 0; + max = 0; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(0,0)"); + SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %" SDL_PRIs32, result); + + /* Swapped min-max */ + min = (Sint32)SDLTest_RandomSint16(); + max = min + (Sint32)SDLTest_RandomUint8() + 2; + result = SDLTest_RandomIntegerInRange(max, min); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + /* Range with min at integer limit */ + min = long_min; + max = long_max + (Sint32)SDLTest_RandomSint16(); + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + /* Range with max at integer limit */ + min = long_min - (Sint32)SDLTest_RandomSint16(); + max = long_max; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + /* Full integer range */ + min = long_min; + max = long_max; + result = SDLTest_RandomIntegerInRange(min, max); + SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,SINT32_MAX)"); + SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result); + + return TEST_COMPLETED; } /** * @brief Calls to SDLTest_RandomAsciiString */ -int -sdltest_randomAsciiString(void *arg) +int sdltest_randomAsciiString(void *arg) { - char* result; - size_t len; - int nonAsciiCharacters; - size_t i; - - result = SDLTest_RandomAsciiString(); - SDLTest_AssertPass("Call to SDLTest_RandomAsciiString()"); - SDLTest_AssertCheck(result != NULL, "Validate that result is not NULL"); - if (result != NULL) { - len = SDL_strlen(result); - SDLTest_AssertCheck(len >= 1 && len <= 255, "Validate that result length; expected: len=[1,255], got: %d", (int) len); - nonAsciiCharacters = 0; - for (i=0; i= 1 && len <= 255, "Validate that result length; expected: len=[1,255], got: %d", (int)len); + nonAsciiCharacters = 0; + for (i = 0; i < len; i++) { + if (SDL_iscntrl(result[i])) { + nonAsciiCharacters++; + } + } + SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters); + if (nonAsciiCharacters) { + SDLTest_LogError("Invalid result from generator: '%s'", result); + } + SDL_free(result); + } + + return TEST_COMPLETED; } - /** * @brief Calls to SDLTest_RandomAsciiStringWithMaximumLength */ -int -sdltest_randomAsciiStringWithMaximumLength(void *arg) +int sdltest_randomAsciiStringWithMaximumLength(void *arg) { - const char* expectedError = "Parameter 'maxLength' is invalid"; - char* lastError; - char* result; - size_t targetLen; - size_t len; - int nonAsciiCharacters; - size_t i; - - targetLen = 16 + SDLTest_RandomUint8(); - result = SDLTest_RandomAsciiStringWithMaximumLength((int) targetLen); - SDLTest_AssertPass("Call to SDLTest_RandomAsciiStringWithMaximumLength(%d)", (int) targetLen); - SDLTest_AssertCheck(result != NULL, "Validate that result is not NULL"); - if (result != NULL) { - len = SDL_strlen(result); - SDLTest_AssertCheck(len >= 1 && len <= targetLen, "Validate that result length; expected: len=[1,%d], got: %d", (int) targetLen, (int) len); - nonAsciiCharacters = 0; - for (i=0; i= 1 && len <= targetLen, "Validate that result length; expected: len=[1,%d], got: %d", (int)targetLen, (int)len); + nonAsciiCharacters = 0; + for (i = 0; i < len; i++) { + if (SDL_iscntrl(result[i])) { + nonAsciiCharacters++; + } + } + SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters); + if (nonAsciiCharacters) { + SDLTest_LogError("Invalid result from generator: '%s'", result); + } + SDL_free(result); + } + + /* Negative test */ + targetLen = 0; + result = SDLTest_RandomAsciiStringWithMaximumLength((int)targetLen); + SDLTest_AssertPass("Call to SDLTest_RandomAsciiStringWithMaximumLength(%d)", (int)targetLen); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + + /* Clear error messages */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + return TEST_COMPLETED; } /** * @brief Calls to SDLTest_RandomAsciiStringOfSize */ -int -sdltest_randomAsciiStringOfSize(void *arg) +int sdltest_randomAsciiStringOfSize(void *arg) { - const char* expectedError = "Parameter 'size' is invalid"; - char* lastError; - char* result; - size_t targetLen; - size_t len; - int nonAsciiCharacters; - size_t i; - - /* Positive test */ - targetLen = 16 + SDLTest_RandomUint8(); - result = SDLTest_RandomAsciiStringOfSize((int) targetLen); - SDLTest_AssertPass("Call to SDLTest_RandomAsciiStringOfSize(%d)", (int) targetLen); - SDLTest_AssertCheck(result != NULL, "Validate that result is not NULL"); - if (result != NULL) { - len = SDL_strlen(result); - SDLTest_AssertCheck(len == targetLen, "Validate that result length; expected: len=%d, got: %d", (int) targetLen, (int) len); - nonAsciiCharacters = 0; - for (i=0; i> 1); \ - expected_result = 1; \ - result = SDL_snprintf(text, sizeof(text), format_specifier, expected_##var##_output); \ - result = SDL_sscanf(text, format_specifier, &var##_output); \ - SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%s\", &output)", text, #format_specifier); \ - SDLTest_AssertCheck(expected_##var##_output == var##_output, "Check output, expected: " format_specifier ", got: " format_specifier, expected_##var##_output, var##_output); \ - SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); \ - \ - var##_output = 123; \ - expected_##var##_output = ~(type)(((unsigned type)(~0)) >> 1); \ - expected_result = 1; \ - result = SDL_snprintf(text, sizeof(text), format_specifier, expected_##var##_output); \ - result = SDL_sscanf(text, format_specifier, &var##_output); \ - SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%s\", &output)", text, #format_specifier); \ - SDLTest_AssertCheck(expected_##var##_output == var##_output, "Check output, expected: " format_specifier ", got: " format_specifier, expected_##var##_output, var##_output); \ - SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); \ - - SIZED_TEST_CASE(short, short, "%hd") - SIZED_TEST_CASE(long, long, "%ld") - SIZED_TEST_CASE(long long, long_long, "%lld") - - size_output = 123; - expected_size_output = (size_t)~0; - expected_result = 1; - result = SDL_snprintf(text, sizeof(text), "%zu", expected_size_output); - result = SDL_sscanf(text, "%zu", &size_output); - SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%%zu\", &output)", text); - SDLTest_AssertCheck(expected_size_output == size_output, "Check output, expected: %zu, got: %zu", expected_size_output, size_output); - SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); - - return TEST_COMPLETED; + int output; + int result; + int expected_output; + int expected_result; + short short_output, expected_short_output; + long long_output, expected_long_output; + long long long_long_output, expected_long_long_output; + size_t size_output, expected_size_output; + char text[128]; + + expected_output = output = 123; + expected_result = -1; + result = SDL_sscanf("", "%i", &output); + SDLTest_AssertPass("Call to SDL_sscanf(\"\", \"%%i\", &output)"); + SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + + expected_output = output = 123; + expected_result = 0; + result = SDL_sscanf("a", "%i", &output); + SDLTest_AssertPass("Call to SDL_sscanf(\"a\", \"%%i\", &output)"); + SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + + output = 123; + expected_output = 2; + expected_result = 1; + result = SDL_sscanf("2", "%i", &output); + SDLTest_AssertPass("Call to SDL_sscanf(\"2\", \"%%i\", &output)"); + SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + + output = 123; + expected_output = 0xa; + expected_result = 1; + result = SDL_sscanf("aa", "%1x", &output); + SDLTest_AssertPass("Call to SDL_sscanf(\"aa\", \"%%1x\", &output)"); + SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + +#define SIZED_TEST_CASE(type, var, format_specifier) \ + var##_output = 123; \ + expected_##var##_output = (type)(((unsigned type)(~0)) >> 1); \ + expected_result = 1; \ + result = SDL_snprintf(text, sizeof(text), format_specifier, expected_##var##_output); \ + result = SDL_sscanf(text, format_specifier, &var##_output); \ + SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%s\", &output)", text, #format_specifier); \ + SDLTest_AssertCheck(expected_##var##_output == var##_output, "Check output, expected: " format_specifier ", got: " format_specifier, expected_##var##_output, var##_output); \ + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); \ + \ + var##_output = 123; \ + expected_##var##_output = ~(type)(((unsigned type)(~0)) >> 1); \ + expected_result = 1; \ + result = SDL_snprintf(text, sizeof(text), format_specifier, expected_##var##_output); \ + result = SDL_sscanf(text, format_specifier, &var##_output); \ + SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%s\", &output)", text, #format_specifier); \ + SDLTest_AssertCheck(expected_##var##_output == var##_output, "Check output, expected: " format_specifier ", got: " format_specifier, expected_##var##_output, var##_output); \ + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + + SIZED_TEST_CASE(short, short, "%hd") + SIZED_TEST_CASE(long, long, "%ld") + SIZED_TEST_CASE(long long, long_long, "%lld") + + size_output = 123; + expected_size_output = ~((size_t)0); + expected_result = 1; + result = SDL_snprintf(text, sizeof(text), "%zu", expected_size_output); + result = SDL_sscanf(text, "%zu", &size_output); + SDLTest_AssertPass("Call to SDL_sscanf(\"%s\", \"%%zu\", &output)", text); + SDLTest_AssertCheck(expected_size_output == size_output, "Check output, expected: %zu, got: %zu", expected_size_output, size_output); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + + return TEST_COMPLETED; } #if defined(HAVE_WFORMAT) || defined(HAVE_WFORMAT_EXTRA_ARGS) @@ -403,11 +411,11 @@ stdlib_sscanf(void *arg) #endif #if defined(_WIN64) -# define SIZE_FORMAT "I64u" +#define SIZE_FORMAT "I64u" #elif defined(__WIN32__) -# define SIZE_FORMAT "I32u" +#define SIZE_FORMAT "I32u" #else -# define SIZE_FORMAT "zu" +#define SIZE_FORMAT "zu" #endif typedef struct @@ -418,8 +426,7 @@ typedef struct int status; } overflow_test; -static const overflow_test multiplications[] = -{ +static const overflow_test multiplications[] = { { 1, 1, 1, 0 }, { 0, 0, 0, 0 }, { SDL_SIZE_MAX, 0, 0, 0 }, @@ -432,8 +439,7 @@ static const overflow_test multiplications[] = { SDL_SIZE_MAX, SDL_SIZE_MAX, 0, -1 }, }; -static const overflow_test additions[] = -{ +static const overflow_test additions[] = { { 1, 1, 2, 0 }, { 0, 0, 0, 0 }, { SDL_SIZE_MAX, 0, SDL_SIZE_MAX, 0 }, @@ -448,142 +454,147 @@ static const overflow_test additions[] = static int stdlib_overflow(void *arg) { - size_t i; - size_t useBuiltin; - - for (useBuiltin = 0; useBuiltin < 2; useBuiltin++) { - if (useBuiltin) { - SDLTest_Log("Using gcc/clang builtins if possible"); - } else { - SDLTest_Log("Not using gcc/clang builtins"); - } - - for (i = 0; i < SDL_arraysize(multiplications); i++) { - const overflow_test *t = &multiplications[i]; - int status; - size_t result = ~t->result; - - if (useBuiltin) { - status = SDL_size_mul_overflow(t->a, t->b, &result); - } else { - /* This disables the macro that tries to use a gcc/clang - * builtin, so we test the fallback implementation instead. */ - status = (SDL_size_mul_overflow)(t->a, t->b, &result); - } - - if (t->status == 0) { - SDLTest_AssertCheck(status == 0, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should succeed", - t->a, t->b); - SDLTest_AssertCheck(result == t->result, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, - t->a, t->b, t->result, result); - } else { - SDLTest_AssertCheck(status == -1, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should fail", - t->a, t->b); - } - - if (t->a == t->b) { - continue; - } - - result = ~t->result; - - if (useBuiltin) { - status = SDL_size_mul_overflow(t->b, t->a, &result); - } else { - status = (SDL_size_mul_overflow)(t->b, t->a, &result); - } - - if (t->status == 0) { - SDLTest_AssertCheck(status == 0, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should succeed", - t->b, t->a); - SDLTest_AssertCheck(result == t->result, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, - t->b, t->a, t->result, result); - } else { - SDLTest_AssertCheck(status == -1, - "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should fail", - t->b, t->a); - } - } - - for (i = 0; i < SDL_arraysize(additions); i++) { - const overflow_test *t = &additions[i]; - int status; - size_t result = ~t->result; - - if (useBuiltin) { - status = SDL_size_add_overflow(t->a, t->b, &result); - } else { - status = (SDL_size_add_overflow)(t->a, t->b, &result); - } - - if (t->status == 0) { - SDLTest_AssertCheck(status == 0, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should succeed", - t->a, t->b); - SDLTest_AssertCheck(result == t->result, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, - t->a, t->b, t->result, result); - } else { - SDLTest_AssertCheck(status == -1, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should fail", - t->a, t->b); - } - - if (t->a == t->b) { - continue; - } - - result = ~t->result; - - if (useBuiltin) { - status = SDL_size_add_overflow(t->b, t->a, &result); - } else { - status = (SDL_size_add_overflow)(t->b, t->a, &result); - } - - if (t->status == 0) { - SDLTest_AssertCheck(status == 0, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should succeed", - t->b, t->a); - SDLTest_AssertCheck(result == t->result, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, - t->b, t->a, t->result, result); - } else { - SDLTest_AssertCheck(status == -1, - "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should fail", - t->b, t->a); - } - } - } - - return TEST_COMPLETED; + size_t i; + size_t useBuiltin; + + for (useBuiltin = 0; useBuiltin < 2; useBuiltin++) { + if (useBuiltin) { + SDLTest_Log("Using gcc/clang builtins if possible"); + } else { + SDLTest_Log("Not using gcc/clang builtins"); + } + + for (i = 0; i < SDL_arraysize(multiplications); i++) { + const overflow_test *t = &multiplications[i]; + int status; + size_t result = ~t->result; + + if (useBuiltin) { + status = SDL_size_mul_overflow(t->a, t->b, &result); + } else { + /* This disables the macro that tries to use a gcc/clang + * builtin, so we test the fallback implementation instead. */ + status = (SDL_size_mul_overflow)(t->a, t->b, &result); + } + + if (t->status == 0) { + SDLTest_AssertCheck(status == 0, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should succeed", + t->a, t->b); + SDLTest_AssertCheck(result == t->result, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, + t->a, t->b, t->result, result); + } else { + SDLTest_AssertCheck(status == -1, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should fail", + t->a, t->b); + } + + if (t->a == t->b) { + continue; + } + + result = ~t->result; + + if (useBuiltin) { + status = SDL_size_mul_overflow(t->b, t->a, &result); + } else { + status = (SDL_size_mul_overflow)(t->b, t->a, &result); + } + + if (t->status == 0) { + SDLTest_AssertCheck(status == 0, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should succeed", + t->b, t->a); + SDLTest_AssertCheck(result == t->result, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, + t->b, t->a, t->result, result); + } else { + SDLTest_AssertCheck(status == -1, + "(%" SIZE_FORMAT " * %" SIZE_FORMAT ") should fail", + t->b, t->a); + } + } + + for (i = 0; i < SDL_arraysize(additions); i++) { + const overflow_test *t = &additions[i]; + int status; + size_t result = ~t->result; + + if (useBuiltin) { + status = SDL_size_add_overflow(t->a, t->b, &result); + } else { + status = (SDL_size_add_overflow)(t->a, t->b, &result); + } + + if (t->status == 0) { + SDLTest_AssertCheck(status == 0, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should succeed", + t->a, t->b); + SDLTest_AssertCheck(result == t->result, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, + t->a, t->b, t->result, result); + } else { + SDLTest_AssertCheck(status == -1, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should fail", + t->a, t->b); + } + + if (t->a == t->b) { + continue; + } + + result = ~t->result; + + if (useBuiltin) { + status = SDL_size_add_overflow(t->b, t->a, &result); + } else { + status = (SDL_size_add_overflow)(t->b, t->a, &result); + } + + if (t->status == 0) { + SDLTest_AssertCheck(status == 0, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should succeed", + t->b, t->a); + SDLTest_AssertCheck(result == t->result, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT "): expected %" SIZE_FORMAT ", got %" SIZE_FORMAT, + t->b, t->a, t->result, result); + } else { + SDLTest_AssertCheck(status == -1, + "(%" SIZE_FORMAT " + %" SIZE_FORMAT ") should fail", + t->b, t->a); + } + } + } + + return TEST_COMPLETED; } /* ================= Test References ================== */ /* Standard C routine test cases */ -static const SDLTest_TestCaseReference stdlibTest1 = - { (SDLTest_TestCaseFp)stdlib_strlcpy, "stdlib_strlcpy", "Call to SDL_strlcpy", TEST_ENABLED }; +static const SDLTest_TestCaseReference stdlibTest1 = { + (SDLTest_TestCaseFp)stdlib_strlcpy, "stdlib_strlcpy", "Call to SDL_strlcpy", TEST_ENABLED +}; -static const SDLTest_TestCaseReference stdlibTest2 = - { (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_snprintf", TEST_ENABLED }; +static const SDLTest_TestCaseReference stdlibTest2 = { + (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_snprintf", TEST_ENABLED +}; -static const SDLTest_TestCaseReference stdlibTest3 = - { (SDLTest_TestCaseFp)stdlib_getsetenv, "stdlib_getsetenv", "Call to SDL_getenv and SDL_setenv", TEST_ENABLED }; +static const SDLTest_TestCaseReference stdlibTest3 = { + (SDLTest_TestCaseFp)stdlib_getsetenv, "stdlib_getsetenv", "Call to SDL_getenv and SDL_setenv", TEST_ENABLED +}; -static const SDLTest_TestCaseReference stdlibTest4 = - { (SDLTest_TestCaseFp)stdlib_sscanf, "stdlib_sscanf", "Call to SDL_sscanf", TEST_ENABLED }; +static const SDLTest_TestCaseReference stdlibTest4 = { + (SDLTest_TestCaseFp)stdlib_sscanf, "stdlib_sscanf", "Call to SDL_sscanf", TEST_ENABLED +}; -static const SDLTest_TestCaseReference stdlibTestOverflow = - { stdlib_overflow, "stdlib_overflow", "Overflow detection", TEST_ENABLED }; +static const SDLTest_TestCaseReference stdlibTestOverflow = { + stdlib_overflow, "stdlib_overflow", "Overflow detection", TEST_ENABLED +}; /* Sequence of Standard C routine test cases */ -static const SDLTest_TestCaseReference *stdlibTests[] = { +static const SDLTest_TestCaseReference *stdlibTests[] = { &stdlibTest1, &stdlibTest2, &stdlibTest3, diff --git a/modules/SDL2/test/testautomation_suites.h b/modules/SDL2/test/testautomation_suites.h index 7fcce1b..6fdcd83 100644 --- a/modules/SDL2/test/testautomation_suites.h +++ b/modules/SDL2/test/testautomation_suites.h @@ -32,7 +32,7 @@ extern SDLTest_TestSuiteReference timerTestSuite; extern SDLTest_TestSuiteReference videoTestSuite; /* All test suites */ -SDLTest_TestSuiteReference *testSuites[] = { +SDLTest_TestSuiteReference *testSuites[] = { &audioTestSuite, &clipboardTestSuite, &eventsTestSuite, diff --git a/modules/SDL2/test/testautomation_surface.c b/modules/SDL2/test/testautomation_surface.c index 9b38066..41aa241 100644 --- a/modules/SDL2/test/testautomation_surface.c +++ b/modules/SDL2/test/testautomation_surface.c @@ -4,8 +4,12 @@ */ /* Supress C4996 VS compiler warnings for unlink() */ +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) #define _CRT_SECURE_NO_DEPRECATE +#endif +#if defined(_MSC_VER) && !defined(_CRT_NONSTDC_NO_DEPRECATE) #define _CRT_NONSTDC_NO_DEPRECATE +#endif #include #ifndef _MSC_VER @@ -29,14 +33,13 @@ static SDL_Surface *testSurface = NULL; /* Helper functions for the test cases */ -#define TEST_SURFACE_WIDTH testSurface->w +#define TEST_SURFACE_WIDTH testSurface->w #define TEST_SURFACE_HEIGHT testSurface->h /* Fixture */ /* Create a 32-bit writable surface for blitting tests */ -void -_surfaceSetUp(void *arg) +void _surfaceSetUp(void *arg) { int result; SDL_BlendMode blendMode = SDL_BLENDMODE_NONE; @@ -58,17 +61,16 @@ _surfaceSetUp(void *arg) testSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, referenceSurface->w, referenceSurface->h, 32, rmask, gmask, bmask, amask); SDLTest_AssertCheck(testSurface != NULL, "Check that testSurface is not NULL"); if (testSurface != NULL) { - /* Disable blend mode for target surface */ - result = SDL_SetSurfaceBlendMode(testSurface, blendMode); - SDLTest_AssertCheck(result == 0, "Validate result from SDL_SetSurfaceBlendMode, expected: 0, got: %i", result); - result = SDL_GetSurfaceBlendMode(testSurface, ¤tBlendMode); - SDLTest_AssertCheck(result == 0, "Validate result from SDL_GetSurfaceBlendMode, expected: 0, got: %i", result); - SDLTest_AssertCheck(currentBlendMode == blendMode, "Validate blendMode, expected: %i, got: %i", blendMode, currentBlendMode); + /* Disable blend mode for target surface */ + result = SDL_SetSurfaceBlendMode(testSurface, blendMode); + SDLTest_AssertCheck(result == 0, "Validate result from SDL_SetSurfaceBlendMode, expected: 0, got: %i", result); + result = SDL_GetSurfaceBlendMode(testSurface, ¤tBlendMode); + SDLTest_AssertCheck(result == 0, "Validate result from SDL_GetSurfaceBlendMode, expected: 0, got: %i", result); + SDLTest_AssertCheck(currentBlendMode == blendMode, "Validate blendMode, expected: %i, got: %i", blendMode, currentBlendMode); } } -void -_surfaceTearDown(void *arg) +void _surfaceTearDown(void *arg) { SDL_FreeSurface(referenceSurface); referenceSurface = NULL; @@ -85,9 +87,9 @@ void _clearTestSurface() Uint32 color; /* Clear surface. */ - color = SDL_MapRGBA( testSurface->format, 0, 0, 0, 0); + color = SDL_MapRGBA(testSurface->format, 0, 0, 0, 0); SDLTest_AssertPass("Call to SDL_MapRGBA()"); - ret = SDL_FillRect( testSurface, NULL, color); + ret = SDL_FillRect(testSurface, NULL, color); SDLTest_AssertPass("Call to SDL_FillRect()"); SDLTest_AssertCheck(ret == 0, "Verify result from SDL_FillRect, expected: 0, got: %i", ret); } @@ -110,30 +112,34 @@ void _testBlitBlendMode(int mode) /* Check test surface */ SDLTest_AssertCheck(testSurface != NULL, "Verify testSurface is not NULL"); - if (testSurface == NULL) return; + if (testSurface == NULL) { + return; + } /* Create sample surface */ face = SDLTest_ImageFace(); SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) return; + if (face == NULL) { + return; + } - /* Reset alpha modulation */ + /* Reset alpha modulation */ ret = SDL_SetSurfaceAlphaMod(face, 255); SDLTest_AssertPass("Call to SDL_SetSurfaceAlphaMod()"); SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceAlphaMod(), expected: 0, got: %i", ret); - /* Reset color modulation */ + /* Reset color modulation */ ret = SDL_SetSurfaceColorMod(face, 255, 255, 255); SDLTest_AssertPass("Call to SDL_SetSurfaceColorMod()"); SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceColorMod(), expected: 0, got: %i", ret); - /* Reset color key */ + /* Reset color key */ ret = SDL_SetColorKey(face, SDL_FALSE, 0); SDLTest_AssertPass("Call to SDL_SetColorKey()"); SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey(), expected: 0, got: %i", ret); /* Clear the test surface */ - _clearTestSurface(); + _clearTestSurface(); /* Target rect size */ rect.w = face->w; @@ -145,7 +151,7 @@ void _testBlitBlendMode(int mode) /* Optionally set blend mode. */ if (mode >= 0) { - ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode ); + ret = SDL_SetSurfaceBlendMode(face, (SDL_BlendMode)mode); SDLTest_AssertPass("Call to SDL_SetSurfaceBlendMode()"); SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i", mode, ret); } @@ -155,44 +161,50 @@ void _testBlitBlendMode(int mode) checkFailCount2 = 0; checkFailCount3 = 0; checkFailCount4 = 0; - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - if (mode == -2) { - /* Set color mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - if (ret != 0) checkFailCount2++; - } - else if (mode == -3) { - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i ); - if (ret != 0) checkFailCount3++; - } - else if (mode == -4) { - /* Crazy blending mode magic. */ - nmode = (i/4*j/4) % 4; - if (nmode==0) { - bmode = SDL_BLENDMODE_NONE; - } else if (nmode==1) { - bmode = SDL_BLENDMODE_BLEND; - } else if (nmode==2) { - bmode = SDL_BLENDMODE_ADD; - } else if (nmode==3) { - bmode = SDL_BLENDMODE_MOD; - } else { - /* Should be impossible, but some static checkers are too imprecise and will complain */ - SDLTest_LogError("Invalid: nmode=%d", nmode); - return; + for (j = 0; j <= nj; j += 4) { + for (i = 0; i <= ni; i += 4) { + if (mode == -2) { + /* Set color mod. */ + ret = SDL_SetSurfaceColorMod(face, (255 / nj) * j, (255 / ni) * i, (255 / nj) * j); + if (ret != 0) { + checkFailCount2++; + } + } else if (mode == -3) { + /* Set alpha mod. */ + ret = SDL_SetSurfaceAlphaMod(face, (255 / ni) * i); + if (ret != 0) { + checkFailCount3++; + } + } else if (mode == -4) { + /* Crazy blending mode magic. */ + nmode = (i / 4 * j / 4) % 4; + if (nmode == 0) { + bmode = SDL_BLENDMODE_NONE; + } else if (nmode == 1) { + bmode = SDL_BLENDMODE_BLEND; + } else if (nmode == 2) { + bmode = SDL_BLENDMODE_ADD; + } else if (nmode == 3) { + bmode = SDL_BLENDMODE_MOD; + } else { + /* Should be impossible, but some static checkers are too imprecise and will complain */ + SDLTest_LogError("Invalid: nmode=%d", nmode); + return; + } + ret = SDL_SetSurfaceBlendMode(face, bmode); + if (ret != 0) { + checkFailCount4++; + } } - ret = SDL_SetSurfaceBlendMode( face, bmode ); - if (ret != 0) checkFailCount4++; - } - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testSurface, &rect ); - if (ret != 0) checkFailCount1++; - } + /* Blitting. */ + rect.x = i; + rect.y = j; + ret = SDL_BlitSurface(face, NULL, testSurface, &rect); + if (ret != 0) { + checkFailCount1++; + } + } } SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_BlitSurface, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i", checkFailCount2); @@ -205,8 +217,7 @@ void _testBlitBlendMode(int mode) } /* Helper to check that a file exists */ -void -_AssertFileExist(const char *filename) +void _AssertFileExist(const char *filename) { struct stat st; int ret = stat(filename, &st); @@ -214,14 +225,12 @@ _AssertFileExist(const char *filename) SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename); } - /* Test case functions */ /** * @brief Tests sprite saving and loading */ -int -surface_testSaveLoadBitmap(void *arg) +int surface_testSaveLoadBitmap(void *arg) { int ret; const char *sampleFilename = "testSaveLoadBitmap.bmp"; @@ -231,7 +240,9 @@ surface_testSaveLoadBitmap(void *arg) /* Create sample surface */ face = SDLTest_ImageFace(); SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) return TEST_ABORTED; + if (face == NULL) { + return TEST_ABORTED; + } /* Delete test file; ignore errors */ unlink(sampleFilename); @@ -266,8 +277,7 @@ surface_testSaveLoadBitmap(void *arg) /* ! * Tests surface conversion. */ -int -surface_testSurfaceConversion(void *arg) +int surface_testSurfaceConversion(void *arg) { SDL_Surface *rface = NULL, *face = NULL; int ret = 0; @@ -275,14 +285,15 @@ surface_testSurfaceConversion(void *arg) /* Create sample surface */ face = SDLTest_ImageFace(); SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) + if (face == NULL) { return TEST_ABORTED; + } /* Set transparent pixel as the pixel at (0,0) */ if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - SDLTest_AssertPass("Call to SDL_SetColorKey()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); + ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *)face->pixels); + SDLTest_AssertPass("Call to SDL_SetColorKey()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); } /* Convert to 32 bit to compare. */ @@ -291,7 +302,7 @@ surface_testSurfaceConversion(void *arg) SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_ConvertSurface is not NULL"); /* Compare surface. */ - ret = SDLTest_CompareSurfaces( rface, face, 0 ); + ret = SDLTest_CompareSurfaces(rface, face, 0); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ @@ -303,12 +314,10 @@ surface_testSurfaceConversion(void *arg) return TEST_COMPLETED; } - /* ! * Tests surface conversion across all pixel formats. */ -int -surface_testCompleteSurfaceConversion(void *arg) +int surface_testCompleteSurfaceConversion(void *arg) { Uint32 pixel_formats[] = { SDL_PIXELFORMAT_INDEX8, @@ -346,18 +355,19 @@ surface_testCompleteSurfaceConversion(void *arg) /* Create sample surface */ face = SDLTest_ImageFace(); SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) + if (face == NULL) { return TEST_ABORTED; + } /* Set transparent pixel as the pixel at (0,0) */ if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - SDLTest_AssertPass("Call to SDL_SetColorKey()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); + ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *)face->pixels); + SDLTest_AssertPass("Call to SDL_SetColorKey()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); } - for ( i = 0; i < SDL_arraysize(pixel_formats); ++i ) { - for ( j = 0; j < SDL_arraysize(pixel_formats); ++j ) { + for (i = 0; i < SDL_arraysize(pixel_formats); ++i) { + for (j = 0; j < SDL_arraysize(pixel_formats); ++j) { fmt1 = SDL_AllocFormat(pixel_formats[i]); SDL_assert(fmt1 != NULL); cvt1 = SDL_ConvertSurface(face, fmt1, 0); @@ -376,7 +386,7 @@ surface_testCompleteSurfaceConversion(void *arg) SDL_assert(final != NULL); /* Compare surface. */ - ret = SDLTest_CompareSurfaces( face, final, 0 ); + ret = SDLTest_CompareSurfaces(face, final, 0); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); SDL_FreeSurface(final); } @@ -389,17 +399,15 @@ surface_testCompleteSurfaceConversion(void *arg) } /* Clean up. */ - SDL_FreeSurface( face ); + SDL_FreeSurface(face); return TEST_COMPLETED; } - /** * @brief Tests sprite loading. A failure case. */ -int -surface_testLoadFailure(void *arg) +int surface_testLoadFailure(void *arg) { SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); SDLTest_AssertCheck(face == NULL, "SDL_CreateLoadBmp"); @@ -410,191 +418,181 @@ surface_testLoadFailure(void *arg) /** * @brief Tests some blitting routines. */ -int -surface_testBlit(void *arg) +int surface_testBlit(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Basic blitting */ - _testBlitBlendMode(-1); + /* Basic blitting */ + _testBlitBlendMode(-1); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlit(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlit(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some blitting routines with color mod */ -int -surface_testBlitColorMod(void *arg) +int surface_testBlitColorMod(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Basic blitting with color mod */ - _testBlitBlendMode(-2); + /* Basic blitting with color mod */ + _testBlitBlendMode(-2); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitColor(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitColor(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some blitting routines with alpha mod */ -int -surface_testBlitAlphaMod(void *arg) +int surface_testBlitAlphaMod(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Basic blitting with alpha mod */ - _testBlitBlendMode(-3); + /* Basic blitting with alpha mod */ + _testBlitBlendMode(-3); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitAlpha(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitAlpha(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests some more blitting routines. */ -int -surface_testBlitBlendNone(void *arg) +int surface_testBlitBlendNone(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Basic blitting */ - _testBlitBlendMode(SDL_BLENDMODE_NONE); + /* Basic blitting */ + _testBlitBlendMode(SDL_BLENDMODE_NONE); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitBlendNone(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitBlendNone(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some more blitting routines. */ -int -surface_testBlitBlendBlend(void *arg) +int surface_testBlitBlendBlend(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Blend blitting */ - _testBlitBlendMode(SDL_BLENDMODE_BLEND); + /* Blend blitting */ + _testBlitBlendMode(SDL_BLENDMODE_BLEND); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitBlend(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitBlend(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some more blitting routines. */ -int -surface_testBlitBlendAdd(void *arg) +int surface_testBlitBlendAdd(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Add blitting */ - _testBlitBlendMode(SDL_BLENDMODE_ADD); + /* Add blitting */ + _testBlitBlendMode(SDL_BLENDMODE_ADD); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitBlendAdd(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitBlendAdd(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some more blitting routines. */ -int -surface_testBlitBlendMod(void *arg) +int surface_testBlitBlendMod(void *arg) { - int ret; - SDL_Surface *compareSurface; + int ret; + SDL_Surface *compareSurface; - /* Mod blitting */ - _testBlitBlendMode(SDL_BLENDMODE_MOD); + /* Mod blitting */ + _testBlitBlendMode(SDL_BLENDMODE_MOD); - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitBlendMod(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitBlendMod(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Clean up. */ + SDL_FreeSurface(compareSurface); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests some more blitting routines with loop */ -int -surface_testBlitBlendLoop(void *arg) { - - int ret; - SDL_Surface *compareSurface; +int surface_testBlitBlendLoop(void *arg) +{ - /* All blitting modes */ - _testBlitBlendMode(-4); + int ret; + SDL_Surface *compareSurface; - /* Verify result by comparing surfaces */ - compareSurface = SDLTest_ImageBlitBlendAll(); - ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); + /* All blitting modes */ + _testBlitBlendMode(-4); - /* Clean up. */ - SDL_FreeSurface(compareSurface); + /* Verify result by comparing surfaces */ + compareSurface = SDLTest_ImageBlitBlendAll(); + ret = SDLTest_CompareSurfaces(testSurface, compareSurface, 0); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - return TEST_COMPLETED; + /* Clean up. */ + SDL_FreeSurface(compareSurface); + return TEST_COMPLETED; } -int -surface_testOverflow(void *arg) +int surface_testOverflow(void *arg) { char buf[1024]; const char *expectedError; @@ -738,7 +736,7 @@ surface_testOverflow(void *arg) SDLTest_AssertCheck(SDL_strcmp(SDL_GetError(), expectedError) == 0, "Expected \"%s\", got \"%s\"", expectedError, SDL_GetError()); - if (sizeof (size_t) == 4 && sizeof (int) >= 4) { + if (sizeof(size_t) == 4 && sizeof(int) >= 4) { expectedError = "Out of memory"; surface = SDL_CreateRGBSurfaceWithFormat(0, SDL_MAX_SINT32, 1, 8, SDL_PIXELFORMAT_INDEX8); SDLTest_AssertCheck(surface == NULL, "Should detect overflow in width + alignment"); @@ -756,8 +754,7 @@ surface_testOverflow(void *arg) SDLTest_AssertCheck(surface == NULL, "Should detect overflow in width * height * bytes per pixel"); SDLTest_AssertCheck(SDL_strcmp(SDL_GetError(), expectedError) == 0, "Expected \"%s\", got \"%s\"", expectedError, SDL_GetError()); - } - else { + } else { SDLTest_Log("Can't easily overflow size_t on this platform"); } @@ -767,50 +764,63 @@ surface_testOverflow(void *arg) /* ================= Test References ================== */ /* Surface test cases */ -static const SDLTest_TestCaseReference surfaceTest1 = - { (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest1 = { + (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest2 = - { (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest2 = { + (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest3 = - { (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest3 = { + (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest4 = - { (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest4 = { + (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest5 = - { (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest5 = { + (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest6 = - { (SDLTest_TestCaseFp)surface_testCompleteSurfaceConversion, "surface_testCompleteSurfaceConversion", "Tests surface conversion across all pixel formats", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest6 = { + (SDLTest_TestCaseFp)surface_testCompleteSurfaceConversion, "surface_testCompleteSurfaceConversion", "Tests surface conversion across all pixel formats", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest7 = - { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest7 = { + (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTest8 = - { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest8 = { + (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED +}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ -static const SDLTest_TestCaseReference surfaceTest9 = - { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blitting routines with various blending modes", TEST_DISABLED}; +static const SDLTest_TestCaseReference surfaceTest9 = { + (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blitting routines with various blending modes", TEST_DISABLED +}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ -static const SDLTest_TestCaseReference surfaceTest10 = - { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED}; +static const SDLTest_TestCaseReference surfaceTest10 = { + (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED +}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ -static const SDLTest_TestCaseReference surfaceTest11 = - { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED}; +static const SDLTest_TestCaseReference surfaceTest11 = { + (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED +}; -static const SDLTest_TestCaseReference surfaceTest12 = - { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTest12 = { + (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED +}; -static const SDLTest_TestCaseReference surfaceTestOverflow = - { surface_testOverflow, "surface_testOverflow", "Test overflow detection.", TEST_ENABLED}; +static const SDLTest_TestCaseReference surfaceTestOverflow = { + surface_testOverflow, "surface_testOverflow", "Test overflow detection.", TEST_ENABLED +}; /* Sequence of Surface test cases */ -static const SDLTest_TestCaseReference *surfaceTests[] = { +static const SDLTest_TestCaseReference *surfaceTests[] = { &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5, &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, &surfaceTest12, &surfaceTestOverflow, NULL diff --git a/modules/SDL2/test/testautomation_syswm.c b/modules/SDL2/test/testautomation_syswm.c index d9fd982..f636e15 100644 --- a/modules/SDL2/test/testautomation_syswm.c +++ b/modules/SDL2/test/testautomation_syswm.c @@ -13,19 +13,18 @@ /** * @brief Call to SDL_GetWindowWMInfo */ -int -syswm_getWindowWMInfo(void *arg) +int syswm_getWindowWMInfo(void *arg) { SDL_bool result; SDL_Window *window; SDL_SysWMinfo info; - window = SDL_CreateWindow("", 0, 0, 0, 0, SDL_WINDOW_HIDDEN); - SDLTest_AssertPass("Call to SDL_CreateWindow()"); - SDLTest_AssertCheck(window != NULL, "Check that value returned from SDL_CreateWindow is not NULL"); - if (window == NULL) { - return TEST_ABORTED; - } + window = SDL_CreateWindow("", 0, 0, 0, 0, SDL_WINDOW_HIDDEN); + SDLTest_AssertPass("Call to SDL_CreateWindow()"); + SDLTest_AssertCheck(window != NULL, "Check that value returned from SDL_CreateWindow is not NULL"); + if (window == NULL) { + return TEST_ABORTED; + } /* Initialize info structure with SDL version info */ SDL_VERSION(&info.version); @@ -35,20 +34,21 @@ syswm_getWindowWMInfo(void *arg) SDLTest_AssertPass("Call to SDL_GetWindowWMInfo()"); SDLTest_Log((result == SDL_TRUE) ? "Got window information" : "Couldn't get window information"); - SDL_DestroyWindow(window); - SDLTest_AssertPass("Call to SDL_DestroyWindow()"); + SDL_DestroyWindow(window); + SDLTest_AssertPass("Call to SDL_DestroyWindow()"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ================= Test References ================== */ /* SysWM test cases */ -static const SDLTest_TestCaseReference syswmTest1 = - { (SDLTest_TestCaseFp)syswm_getWindowWMInfo, "syswm_getWindowWMInfo", "Call to SDL_GetWindowWMInfo", TEST_ENABLED }; +static const SDLTest_TestCaseReference syswmTest1 = { + (SDLTest_TestCaseFp)syswm_getWindowWMInfo, "syswm_getWindowWMInfo", "Call to SDL_GetWindowWMInfo", TEST_ENABLED +}; /* Sequence of SysWM test cases */ -static const SDLTest_TestCaseReference *syswmTests[] = { +static const SDLTest_TestCaseReference *syswmTests[] = { &syswmTest1, NULL }; diff --git a/modules/SDL2/test/testautomation_timer.c b/modules/SDL2/test/testautomation_timer.c index 3cb160a..1002a36 100644 --- a/modules/SDL2/test/testautomation_timer.c +++ b/modules/SDL2/test/testautomation_timer.c @@ -18,16 +18,15 @@ int _timerCallbackCalled = 0; /* Fixture */ -void -_timerSetUp(void *arg) +void _timerSetUp(void *arg) { /* Start SDL timer subsystem */ - int ret = SDL_InitSubSystem( SDL_INIT_TIMER ); - SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_TIMER)"); - SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_TIMER)"); + int ret = SDL_InitSubSystem(SDL_INIT_TIMER); + SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_TIMER)"); + SDLTest_AssertCheck(ret == 0, "Check result from SDL_InitSubSystem(SDL_INIT_TIMER)"); if (ret != 0) { - SDLTest_LogError("%s", SDL_GetError()); - } + SDLTest_LogError("%s", SDL_GetError()); + } } /* Test case functions */ @@ -35,160 +34,160 @@ _timerSetUp(void *arg) /** * @brief Call to SDL_GetPerformanceCounter */ -int -timer_getPerformanceCounter(void *arg) +int timer_getPerformanceCounter(void *arg) { - Uint64 result; + Uint64 result; - result = SDL_GetPerformanceCounter(); - SDLTest_AssertPass("Call to SDL_GetPerformanceCounter()"); - SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %"SDL_PRIu64, result); + result = SDL_GetPerformanceCounter(); + SDLTest_AssertPass("Call to SDL_GetPerformanceCounter()"); + SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu64, result); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Call to SDL_GetPerformanceFrequency */ -int -timer_getPerformanceFrequency(void *arg) +int timer_getPerformanceFrequency(void *arg) { - Uint64 result; + Uint64 result; - result = SDL_GetPerformanceFrequency(); - SDLTest_AssertPass("Call to SDL_GetPerformanceFrequency()"); - SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %"SDL_PRIu64, result); + result = SDL_GetPerformanceFrequency(); + SDLTest_AssertPass("Call to SDL_GetPerformanceFrequency()"); + SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu64, result); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Call to SDL_Delay and SDL_GetTicks */ -int -timer_delayAndGetTicks(void *arg) +int timer_delayAndGetTicks(void *arg) { - const Uint32 testDelay = 100; - const Uint32 marginOfError = 25; - Uint32 result; - Uint32 result2; - Uint32 difference; - - /* Zero delay */ - SDL_Delay(0); - SDLTest_AssertPass("Call to SDL_Delay(0)"); - - /* Non-zero delay */ - SDL_Delay(1); - SDLTest_AssertPass("Call to SDL_Delay(1)"); - - SDL_Delay(SDLTest_RandomIntegerInRange(5, 15)); - SDLTest_AssertPass("Call to SDL_Delay()"); - - /* Get ticks count - should be non-zero by now */ - result = SDL_GetTicks(); - SDLTest_AssertPass("Call to SDL_GetTicks()"); - SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result); - - /* Delay a bit longer and measure ticks and verify difference */ - SDL_Delay(testDelay); - SDLTest_AssertPass("Call to SDL_Delay(%" SDL_PRIu32 ")", testDelay); - result2 = SDL_GetTicks(); - SDLTest_AssertPass("Call to SDL_GetTicks()"); - SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result2); - difference = result2 - result; - SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay - marginOfError, difference); - SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay + marginOfError, difference); - - return TEST_COMPLETED; + const Uint32 testDelay = 100; + const Uint32 marginOfError = 25; + Uint32 result; + Uint32 result2; + Uint32 difference; + + /* Zero delay */ + SDL_Delay(0); + SDLTest_AssertPass("Call to SDL_Delay(0)"); + + /* Non-zero delay */ + SDL_Delay(1); + SDLTest_AssertPass("Call to SDL_Delay(1)"); + + SDL_Delay(SDLTest_RandomIntegerInRange(5, 15)); + SDLTest_AssertPass("Call to SDL_Delay()"); + + /* Get ticks count - should be non-zero by now */ + result = SDL_GetTicks(); + SDLTest_AssertPass("Call to SDL_GetTicks()"); + SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result); + + /* Delay a bit longer and measure ticks and verify difference */ + SDL_Delay(testDelay); + SDLTest_AssertPass("Call to SDL_Delay(%" SDL_PRIu32 ")", testDelay); + result2 = SDL_GetTicks(); + SDLTest_AssertPass("Call to SDL_GetTicks()"); + SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result2); + difference = result2 - result; + SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay - marginOfError, difference); + SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay + marginOfError, difference); + + return TEST_COMPLETED; } /* Test callback */ Uint32 SDLCALL _timerTestCallback(Uint32 interval, void *param) { - _timerCallbackCalled = 1; + _timerCallbackCalled = 1; - if (_paramCheck != 0) { - SDLTest_AssertCheck(param != NULL, "Check param pointer, expected: non-NULL, got: %s", (param != NULL) ? "non-NULL" : "NULL"); - if (param != NULL) { - SDLTest_AssertCheck(*(int *)param == _paramValue, "Check param value, expected: %i, got: %i", _paramValue, *(int *)param); - } - } + if (_paramCheck != 0) { + SDLTest_AssertCheck(param != NULL, "Check param pointer, expected: non-NULL, got: %s", (param != NULL) ? "non-NULL" : "NULL"); + if (param != NULL) { + SDLTest_AssertCheck(*(int *)param == _paramValue, "Check param value, expected: %i, got: %i", _paramValue, *(int *)param); + } + } - return 0; + return 0; } /** * @brief Call to SDL_AddTimer and SDL_RemoveTimer */ -int -timer_addRemoveTimer(void *arg) +int timer_addRemoveTimer(void *arg) { - SDL_TimerID id; - SDL_bool result; - int param; - - /* Reset state */ - _paramCheck = 0; - _timerCallbackCalled = 0; - - /* Set timer with a long delay */ - id = SDL_AddTimer(10000, _timerTestCallback, NULL); - SDLTest_AssertPass("Call to SDL_AddTimer(10000,...)"); - SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); - - /* Remove timer again and check that callback was not called */ - result = SDL_RemoveTimer(id); - SDLTest_AssertPass("Call to SDL_RemoveTimer()"); - SDLTest_AssertCheck(result == SDL_TRUE, "Check result value, expected: %i, got: %i", SDL_TRUE, result); - SDLTest_AssertCheck(_timerCallbackCalled == 0, "Check callback WAS NOT called, expected: 0, got: %i", _timerCallbackCalled); - - /* Try to remove timer again (should be a NOOP) */ - result = SDL_RemoveTimer(id); - SDLTest_AssertPass("Call to SDL_RemoveTimer()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); - - /* Reset state */ - param = SDLTest_RandomIntegerInRange(-1024, 1024); - _paramCheck = 1; - _paramValue = param; - _timerCallbackCalled = 0; - - /* Set timer with a short delay */ - id = SDL_AddTimer(10, _timerTestCallback, (void *)¶m); - SDLTest_AssertPass("Call to SDL_AddTimer(10, param)"); - SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); - - /* Wait to let timer trigger callback */ - SDL_Delay(100); - SDLTest_AssertPass("Call to SDL_Delay(100)"); - - /* Remove timer again and check that callback was called */ - result = SDL_RemoveTimer(id); - SDLTest_AssertPass("Call to SDL_RemoveTimer()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); - SDLTest_AssertCheck(_timerCallbackCalled == 1, "Check callback WAS called, expected: 1, got: %i", _timerCallbackCalled); - - return TEST_COMPLETED; + SDL_TimerID id; + SDL_bool result; + int param; + + /* Reset state */ + _paramCheck = 0; + _timerCallbackCalled = 0; + + /* Set timer with a long delay */ + id = SDL_AddTimer(10000, _timerTestCallback, NULL); + SDLTest_AssertPass("Call to SDL_AddTimer(10000,...)"); + SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); + + /* Remove timer again and check that callback was not called */ + result = SDL_RemoveTimer(id); + SDLTest_AssertPass("Call to SDL_RemoveTimer()"); + SDLTest_AssertCheck(result == SDL_TRUE, "Check result value, expected: %i, got: %i", SDL_TRUE, result); + SDLTest_AssertCheck(_timerCallbackCalled == 0, "Check callback WAS NOT called, expected: 0, got: %i", _timerCallbackCalled); + + /* Try to remove timer again (should be a NOOP) */ + result = SDL_RemoveTimer(id); + SDLTest_AssertPass("Call to SDL_RemoveTimer()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); + + /* Reset state */ + param = SDLTest_RandomIntegerInRange(-1024, 1024); + _paramCheck = 1; + _paramValue = param; + _timerCallbackCalled = 0; + + /* Set timer with a short delay */ + id = SDL_AddTimer(10, _timerTestCallback, (void *)¶m); + SDLTest_AssertPass("Call to SDL_AddTimer(10, param)"); + SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); + + /* Wait to let timer trigger callback */ + SDL_Delay(100); + SDLTest_AssertPass("Call to SDL_Delay(100)"); + + /* Remove timer again and check that callback was called */ + result = SDL_RemoveTimer(id); + SDLTest_AssertPass("Call to SDL_RemoveTimer()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); + SDLTest_AssertCheck(_timerCallbackCalled == 1, "Check callback WAS called, expected: 1, got: %i", _timerCallbackCalled); + + return TEST_COMPLETED; } /* ================= Test References ================== */ /* Timer test cases */ -static const SDLTest_TestCaseReference timerTest1 = - { (SDLTest_TestCaseFp)timer_getPerformanceCounter, "timer_getPerformanceCounter", "Call to SDL_GetPerformanceCounter", TEST_ENABLED }; +static const SDLTest_TestCaseReference timerTest1 = { + (SDLTest_TestCaseFp)timer_getPerformanceCounter, "timer_getPerformanceCounter", "Call to SDL_GetPerformanceCounter", TEST_ENABLED +}; -static const SDLTest_TestCaseReference timerTest2 = - { (SDLTest_TestCaseFp)timer_getPerformanceFrequency, "timer_getPerformanceFrequency", "Call to SDL_GetPerformanceFrequency", TEST_ENABLED }; +static const SDLTest_TestCaseReference timerTest2 = { + (SDLTest_TestCaseFp)timer_getPerformanceFrequency, "timer_getPerformanceFrequency", "Call to SDL_GetPerformanceFrequency", TEST_ENABLED +}; -static const SDLTest_TestCaseReference timerTest3 = - { (SDLTest_TestCaseFp)timer_delayAndGetTicks, "timer_delayAndGetTicks", "Call to SDL_Delay and SDL_GetTicks", TEST_ENABLED }; +static const SDLTest_TestCaseReference timerTest3 = { + (SDLTest_TestCaseFp)timer_delayAndGetTicks, "timer_delayAndGetTicks", "Call to SDL_Delay and SDL_GetTicks", TEST_ENABLED +}; -static const SDLTest_TestCaseReference timerTest4 = - { (SDLTest_TestCaseFp)timer_addRemoveTimer, "timer_addRemoveTimer", "Call to SDL_AddTimer and SDL_RemoveTimer", TEST_ENABLED }; +static const SDLTest_TestCaseReference timerTest4 = { + (SDLTest_TestCaseFp)timer_addRemoveTimer, "timer_addRemoveTimer", "Call to SDL_AddTimer and SDL_RemoveTimer", TEST_ENABLED +}; /* Sequence of Timer test cases */ -static const SDLTest_TestCaseReference *timerTests[] = { +static const SDLTest_TestCaseReference *timerTests[] = { &timerTest1, &timerTest2, &timerTest3, &timerTest4, NULL }; diff --git a/modules/SDL2/test/testautomation_video.c b/modules/SDL2/test/testautomation_video.c index 8d248bf..aa9e7b9 100644 --- a/modules/SDL2/test/testautomation_video.c +++ b/modules/SDL2/test/testautomation_video.c @@ -25,22 +25,22 @@ */ SDL_Window *_createVideoSuiteTestWindow(const char *title) { - SDL_Window* window; - int x, y, w, h; - SDL_WindowFlags flags; + SDL_Window *window; + int x, y, w, h; + SDL_WindowFlags flags; - /* Standard window */ - x = SDLTest_RandomIntegerInRange(1, 100); - y = SDLTest_RandomIntegerInRange(1, 100); - w = SDLTest_RandomIntegerInRange(320, 1024); - h = SDLTest_RandomIntegerInRange(320, 768); - flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS; + /* Standard window */ + x = SDLTest_RandomIntegerInRange(1, 100); + y = SDLTest_RandomIntegerInRange(1, 100); + w = SDLTest_RandomIntegerInRange(320, 1024); + h = SDLTest_RandomIntegerInRange(320, 768); + flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS; - window = SDL_CreateWindow(title, x, y, w, h, flags); - SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); - SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); + window = SDL_CreateWindow(title, x, y, w, h, flags); + SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); + SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - return window; + return window; } /* @@ -48,11 +48,11 @@ SDL_Window *_createVideoSuiteTestWindow(const char *title) */ void _destroyVideoSuiteTestWindow(SDL_Window *window) { - if (window != NULL) { - SDL_DestroyWindow(window); - window = NULL; - SDLTest_AssertPass("Call to SDL_DestroyWindow()"); - } + if (window != NULL) { + SDL_DestroyWindow(window); + window = NULL; + SDLTest_AssertPass("Call to SDL_DestroyWindow()"); + } } /* Test case functions */ @@ -60,8 +60,7 @@ void _destroyVideoSuiteTestWindow(SDL_Window *window) /** * @brief Enable and disable screensaver while checking state */ -int -video_enableDisableScreensaver(void *arg) +int video_enableDisableScreensaver(void *arg) { SDL_bool initialResult; SDL_bool result; @@ -71,39 +70,39 @@ video_enableDisableScreensaver(void *arg) SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); if (initialResult == SDL_TRUE) { - /* Currently enabled: disable first, then enable again */ + /* Currently enabled: disable first, then enable again */ - /* Disable screensaver and check */ - SDL_DisableScreenSaver(); - SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); + /* Disable screensaver and check */ + SDL_DisableScreenSaver(); + SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); - /* Enable screensaver and check */ - SDL_EnableScreenSaver(); - SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + /* Enable screensaver and check */ + SDL_EnableScreenSaver(); + SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); } else { - /* Currently disabled: enable first, then disable again */ - - /* Enable screensaver and check */ - SDL_EnableScreenSaver(); - SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); - - /* Disable screensaver and check */ - SDL_DisableScreenSaver(); - SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); + /* Currently disabled: enable first, then disable again */ + + /* Enable screensaver and check */ + SDL_EnableScreenSaver(); + SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + + /* Disable screensaver and check */ + SDL_DisableScreenSaver(); + SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); } return TEST_COMPLETED; @@ -112,402 +111,395 @@ video_enableDisableScreensaver(void *arg) /** * @brief Tests the functionality of the SDL_CreateWindow function using different positions */ -int -video_createWindowVariousPositions(void *arg) +int video_createWindowVariousPositions(void *arg) { - SDL_Window* window; - const char* title = "video_createWindowVariousPositions Test Window"; - int x, y, w, h; - int xVariation, yVariation; - - for (xVariation = 0; xVariation < 6; xVariation++) { - for (yVariation = 0; yVariation < 6; yVariation++) { - switch(xVariation) { - default: - case 0: - /* Zero X Position */ - x = 0; - break; - case 1: - /* Random X position inside screen */ - x = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Random X position outside screen (positive) */ - x = SDLTest_RandomIntegerInRange(10000, 11000); - break; - case 3: - /* Random X position outside screen (negative) */ - x = SDLTest_RandomIntegerInRange(-1000, -100); - break; - case 4: - /* Centered X position */ - x = SDL_WINDOWPOS_CENTERED; - break; - case 5: - /* Undefined X position */ - x = SDL_WINDOWPOS_UNDEFINED; - break; - } - - switch(yVariation) { - default: - case 0: - /* Zero X Position */ - y = 0; - break; - case 1: - /* Random X position inside screen */ - y = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Random X position outside screen (positive) */ - y = SDLTest_RandomIntegerInRange(10000, 11000); - break; - case 3: - /* Random Y position outside screen (negative) */ - y = SDLTest_RandomIntegerInRange(-1000, -100); - break; - case 4: - /* Centered Y position */ - y = SDL_WINDOWPOS_CENTERED; - break; - case 5: - /* Undefined Y position */ - y = SDL_WINDOWPOS_UNDEFINED; - break; - } + SDL_Window *window; + const char *title = "video_createWindowVariousPositions Test Window"; + int x, y, w, h; + int xVariation, yVariation; - w = SDLTest_RandomIntegerInRange(32, 96); - h = SDLTest_RandomIntegerInRange(32, 96); - window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); - SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); - SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); + for (xVariation = 0; xVariation < 6; xVariation++) { + for (yVariation = 0; yVariation < 6; yVariation++) { + switch (xVariation) { + default: + case 0: + /* Zero X Position */ + x = 0; + break; + case 1: + /* Random X position inside screen */ + x = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Random X position outside screen (positive) */ + x = SDLTest_RandomIntegerInRange(10000, 11000); + break; + case 3: + /* Random X position outside screen (negative) */ + x = SDLTest_RandomIntegerInRange(-1000, -100); + break; + case 4: + /* Centered X position */ + x = SDL_WINDOWPOS_CENTERED; + break; + case 5: + /* Undefined X position */ + x = SDL_WINDOWPOS_UNDEFINED; + break; + } + + switch (yVariation) { + default: + case 0: + /* Zero X Position */ + y = 0; + break; + case 1: + /* Random X position inside screen */ + y = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Random X position outside screen (positive) */ + y = SDLTest_RandomIntegerInRange(10000, 11000); + break; + case 3: + /* Random Y position outside screen (negative) */ + y = SDLTest_RandomIntegerInRange(-1000, -100); + break; + case 4: + /* Centered Y position */ + y = SDL_WINDOWPOS_CENTERED; + break; + case 5: + /* Undefined Y position */ + y = SDL_WINDOWPOS_UNDEFINED; + break; + } + + w = SDLTest_RandomIntegerInRange(32, 96); + h = SDLTest_RandomIntegerInRange(32, 96); + window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); + SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); + SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); - } - } + /* Clean up */ + _destroyVideoSuiteTestWindow(window); + } + } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests the functionality of the SDL_CreateWindow function using different sizes */ -int -video_createWindowVariousSizes(void *arg) +int video_createWindowVariousSizes(void *arg) { - SDL_Window* window; - const char* title = "video_createWindowVariousSizes Test Window"; - int x, y, w, h; - int wVariation, hVariation; - - x = SDLTest_RandomIntegerInRange(1, 100); - y = SDLTest_RandomIntegerInRange(1, 100); - for (wVariation = 0; wVariation < 3; wVariation++) { - for (hVariation = 0; hVariation < 3; hVariation++) { - switch(wVariation) { - case 0: - /* Width of 1 */ - w = 1; - break; - case 1: - /* Random "normal" width */ - w = SDLTest_RandomIntegerInRange(320, 1920); - break; - case 2: - /* Random "large" width */ - w = SDLTest_RandomIntegerInRange(2048, 4095); - break; - } - - switch(hVariation) { - case 0: - /* Height of 1 */ - h = 1; - break; - case 1: - /* Random "normal" height */ - h = SDLTest_RandomIntegerInRange(320, 1080); - break; - case 2: - /* Random "large" height */ - h = SDLTest_RandomIntegerInRange(2048, 4095); - break; - } - - window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); - SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); - SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); + SDL_Window *window; + const char *title = "video_createWindowVariousSizes Test Window"; + int x, y, w, h; + int wVariation, hVariation; + + x = SDLTest_RandomIntegerInRange(1, 100); + y = SDLTest_RandomIntegerInRange(1, 100); + for (wVariation = 0; wVariation < 3; wVariation++) { + for (hVariation = 0; hVariation < 3; hVariation++) { + switch (wVariation) { + case 0: + /* Width of 1 */ + w = 1; + break; + case 1: + /* Random "normal" width */ + w = SDLTest_RandomIntegerInRange(320, 1920); + break; + case 2: + /* Random "large" width */ + w = SDLTest_RandomIntegerInRange(2048, 4095); + break; + } + + switch (hVariation) { + case 0: + /* Height of 1 */ + h = 1; + break; + case 1: + /* Random "normal" height */ + h = SDLTest_RandomIntegerInRange(320, 1080); + break; + case 2: + /* Random "large" height */ + h = SDLTest_RandomIntegerInRange(2048, 4095); + break; + } + + window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); + SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); + SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); - } - } + /* Clean up */ + _destroyVideoSuiteTestWindow(window); + } + } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests the functionality of the SDL_CreateWindow function using different flags */ -int -video_createWindowVariousFlags(void *arg) +int video_createWindowVariousFlags(void *arg) { - SDL_Window* window; - const char* title = "video_createWindowVariousFlags Test Window"; - int x, y, w, h; - int fVariation; - SDL_WindowFlags flags; - - /* Standard window */ - x = SDLTest_RandomIntegerInRange(1, 100); - y = SDLTest_RandomIntegerInRange(1, 100); - w = SDLTest_RandomIntegerInRange(320, 1024); - h = SDLTest_RandomIntegerInRange(320, 768); - - for (fVariation = 0; fVariation < 14; fVariation++) { - switch(fVariation) { - default: - case 0: - flags = SDL_WINDOW_FULLSCREEN; - /* Skip - blanks screen; comment out next line to run test */ - continue; - break; - case 1: - flags = SDL_WINDOW_FULLSCREEN_DESKTOP; - /* Skip - blanks screen; comment out next line to run test */ - continue; - break; - case 2: - flags = SDL_WINDOW_OPENGL; - break; - case 3: - flags = SDL_WINDOW_SHOWN; - break; - case 4: - flags = SDL_WINDOW_HIDDEN; - break; - case 5: - flags = SDL_WINDOW_BORDERLESS; - break; - case 6: - flags = SDL_WINDOW_RESIZABLE; - break; - case 7: - flags = SDL_WINDOW_MINIMIZED; - break; - case 8: - flags = SDL_WINDOW_MAXIMIZED; - break; - case 9: - flags = SDL_WINDOW_MOUSE_GRABBED; - break; - case 10: - flags = SDL_WINDOW_INPUT_FOCUS; - break; - case 11: - flags = SDL_WINDOW_MOUSE_FOCUS; - break; - case 12: - flags = SDL_WINDOW_FOREIGN; - break; - case 13: - flags = SDL_WINDOW_KEYBOARD_GRABBED; - break; - } + SDL_Window *window; + const char *title = "video_createWindowVariousFlags Test Window"; + int x, y, w, h; + int fVariation; + SDL_WindowFlags flags; + + /* Standard window */ + x = SDLTest_RandomIntegerInRange(1, 100); + y = SDLTest_RandomIntegerInRange(1, 100); + w = SDLTest_RandomIntegerInRange(320, 1024); + h = SDLTest_RandomIntegerInRange(320, 768); + + for (fVariation = 0; fVariation < 14; fVariation++) { + switch (fVariation) { + default: + case 0: + flags = SDL_WINDOW_FULLSCREEN; + /* Skip - blanks screen; comment out next line to run test */ + continue; + break; + case 1: + flags = SDL_WINDOW_FULLSCREEN_DESKTOP; + /* Skip - blanks screen; comment out next line to run test */ + continue; + break; + case 2: + flags = SDL_WINDOW_OPENGL; + break; + case 3: + flags = SDL_WINDOW_SHOWN; + break; + case 4: + flags = SDL_WINDOW_HIDDEN; + break; + case 5: + flags = SDL_WINDOW_BORDERLESS; + break; + case 6: + flags = SDL_WINDOW_RESIZABLE; + break; + case 7: + flags = SDL_WINDOW_MINIMIZED; + break; + case 8: + flags = SDL_WINDOW_MAXIMIZED; + break; + case 9: + flags = SDL_WINDOW_MOUSE_GRABBED; + break; + case 10: + flags = SDL_WINDOW_INPUT_FOCUS; + break; + case 11: + flags = SDL_WINDOW_MOUSE_FOCUS; + break; + case 12: + flags = SDL_WINDOW_FOREIGN; + break; + case 13: + flags = SDL_WINDOW_KEYBOARD_GRABBED; + break; + } - window = SDL_CreateWindow(title, x, y, w, h, flags); - SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); - SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); + window = SDL_CreateWindow(title, x, y, w, h, flags); + SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); + SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); - } + /* Clean up */ + _destroyVideoSuiteTestWindow(window); + } - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests the functionality of the SDL_GetWindowFlags function */ -int -video_getWindowFlags(void *arg) +int video_getWindowFlags(void *arg) { - SDL_Window* window; - const char* title = "video_getWindowFlags Test Window"; - SDL_WindowFlags flags; - Uint32 actualFlags; - - /* Reliable flag set always set in test window */ - flags = SDL_WINDOW_SHOWN; - - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window != NULL) { - actualFlags = SDL_GetWindowFlags(window); - SDLTest_AssertPass("Call to SDL_GetWindowFlags()"); - SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %" SDL_PRIu32, flags, actualFlags); - } + SDL_Window *window; + const char *title = "video_getWindowFlags Test Window"; + SDL_WindowFlags flags; + Uint32 actualFlags; + + /* Reliable flag set always set in test window */ + flags = SDL_WINDOW_SHOWN; + + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window != NULL) { + actualFlags = SDL_GetWindowFlags(window); + SDLTest_AssertPass("Call to SDL_GetWindowFlags()"); + SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %" SDL_PRIu32, flags, actualFlags); + } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests the functionality of the SDL_GetNumDisplayModes function */ -int -video_getNumDisplayModes(void *arg) +int video_getNumDisplayModes(void *arg) { - int result; - int displayNum; - int i; - - /* Get number of displays */ - displayNum = SDL_GetNumVideoDisplays(); - SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); - - /* Make call for each display */ - for (i=0; i= 1, "Validate returned value from function; expected: >=1; got: %d", result); - } + int result; + int displayNum; + int i; - return TEST_COMPLETED; + /* Get number of displays */ + displayNum = SDL_GetNumVideoDisplays(); + SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); + + /* Make call for each display */ + for (i = 0; i < displayNum; i++) { + result = SDL_GetNumDisplayModes(i); + SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d)", i); + SDLTest_AssertCheck(result >= 1, "Validate returned value from function; expected: >=1; got: %d", result); + } + + return TEST_COMPLETED; } /** * @brief Tests negative call to SDL_GetNumDisplayModes function */ -int -video_getNumDisplayModesNegative(void *arg) +int video_getNumDisplayModesNegative(void *arg) { - int result; - int displayNum; - int displayIndex; - - /* Get number of displays */ - displayNum = SDL_GetNumVideoDisplays(); - SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); - - /* Invalid boundary values */ - displayIndex = SDLTest_RandomSint32BoundaryValue(0, displayNum, SDL_FALSE); - result = SDL_GetNumDisplayModes(displayIndex); - SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/boundary)", displayIndex); - SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); - - /* Large (out-of-bounds) display index */ - displayIndex = SDLTest_RandomIntegerInRange(-2000, -1000); - result = SDL_GetNumDisplayModes(displayIndex); - SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large negative)", displayIndex); - SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); - - displayIndex = SDLTest_RandomIntegerInRange(1000, 2000); - result = SDL_GetNumDisplayModes(displayIndex); - SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large positive)", displayIndex); - SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); + int result; + int displayNum; + int displayIndex; - return TEST_COMPLETED; + /* Get number of displays */ + displayNum = SDL_GetNumVideoDisplays(); + SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); + + /* Invalid boundary values */ + displayIndex = SDLTest_RandomSint32BoundaryValue(0, displayNum, SDL_FALSE); + result = SDL_GetNumDisplayModes(displayIndex); + SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/boundary)", displayIndex); + SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); + + /* Large (out-of-bounds) display index */ + displayIndex = SDLTest_RandomIntegerInRange(-2000, -1000); + result = SDL_GetNumDisplayModes(displayIndex); + SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large negative)", displayIndex); + SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); + + displayIndex = SDLTest_RandomIntegerInRange(1000, 2000); + result = SDL_GetNumDisplayModes(displayIndex); + SDLTest_AssertPass("Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large positive)", displayIndex); + SDLTest_AssertCheck(result < 0, "Validate returned value from function; expected: <0; got: %d", result); + + return TEST_COMPLETED; } /** * @brief Tests the functionality of the SDL_GetClosestDisplayMode function against current resolution */ -int -video_getClosestDisplayModeCurrentResolution(void *arg) +int video_getClosestDisplayModeCurrentResolution(void *arg) { - int result; - SDL_DisplayMode current; - SDL_DisplayMode target; - SDL_DisplayMode closest; - SDL_DisplayMode* dResult; - int displayNum; - int i; - int variation; - - /* Get number of displays */ - displayNum = SDL_GetNumVideoDisplays(); - SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); - - /* Make calls for each display */ - for (i=0; iw, "Verify return value matches assigned value; expected: %d, got: %d", closest.w, dResult->w); - SDLTest_AssertCheck(closest.h == dResult->h, "Verify return value matches assigned value; expected: %d, got: %d", closest.h, dResult->h); + /* Set the desired resolution equals to current resolution */ + target.w = current.w; + target.h = current.h; + for (variation = 0; variation < 8; variation++) { + /* Vary constraints on other query parameters */ + target.format = (variation & 1) ? current.format : 0; + target.refresh_rate = (variation & 2) ? current.refresh_rate : 0; + target.driverdata = (variation & 4) ? current.driverdata : 0; + + /* Make call */ + dResult = SDL_GetClosestDisplayMode(i, &target, &closest); + SDLTest_AssertPass("Call to SDL_GetClosestDisplayMode(target=current/variation%d)", variation); + SDLTest_Assert(dResult != NULL, "Verify returned value is not NULL"); + + /* Check that one gets the current resolution back again */ + SDLTest_AssertCheck(closest.w == current.w, "Verify returned width matches current width; expected: %d, got: %d", current.w, closest.w); + SDLTest_AssertCheck(closest.h == current.h, "Verify returned height matches current height; expected: %d, got: %d", current.h, closest.h); + /* NOLINTBEGIN(clang-analyzer-core.NullDereference): Checked earlier for NULL */ + SDLTest_AssertCheck(closest.w == dResult->w, "Verify return value matches assigned value; expected: %d, got: %d", closest.w, dResult->w); + SDLTest_AssertCheck(closest.h == dResult->h, "Verify return value matches assigned value; expected: %d, got: %d", closest.h, dResult->h); + /* NOLINTEND(clang-analyzer-core.NullDereference) */ + } } - } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests the functionality of the SDL_GetClosestDisplayMode function against random resolution */ -int -video_getClosestDisplayModeRandomResolution(void *arg) +int video_getClosestDisplayModeRandomResolution(void *arg) { - SDL_DisplayMode target; - SDL_DisplayMode closest; - int displayNum; - int i; - int variation; - - /* Get number of displays */ - displayNum = SDL_GetNumVideoDisplays(); - SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); - - /* Make calls for each display */ - for (i=0; i 0, "Validate mode.w content; expected: >0, got: %d", mode.w); - SDLTest_AssertCheck(mode.h > 0, "Validate mode.h content; expected: >0, got: %d", mode.h); - SDLTest_AssertCheck(mode.refresh_rate > 0, "Validate mode.refresh_rate content; expected: >0, got: %d", mode.refresh_rate); - } + /* Invalidate part of the mode content so we can check values later */ + mode.w = -1; + mode.h = -1; + mode.refresh_rate = -1; + + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window != NULL) { + result = SDL_GetWindowDisplayMode(window, &mode); + SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode()"); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0, got: %d", result); + SDLTest_AssertCheck(mode.w > 0, "Validate mode.w content; expected: >0, got: %d", mode.w); + SDLTest_AssertCheck(mode.h > 0, "Validate mode.h content; expected: >0, got: %d", mode.h); + SDLTest_AssertCheck(mode.refresh_rate > 0, "Validate mode.refresh_rate content; expected: >0, got: %d", mode.refresh_rate); + } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* Helper function that checks for an 'Invalid window' error */ void _checkInvalidWindowError() { - const char *invalidWindowError = "Invalid window"; - char *lastError; - - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); - if (lastError != NULL) { - SDLTest_AssertCheck(SDL_strcmp(lastError, invalidWindowError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - invalidWindowError, - lastError); - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - } + const char *invalidWindowError = "Invalid window"; + char *lastError; + + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); + if (lastError != NULL) { + SDLTest_AssertCheck(SDL_strcmp(lastError, invalidWindowError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + invalidWindowError, + lastError); + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + } } /** @@ -624,43 +615,42 @@ void _checkInvalidWindowError() * * @sa http://wiki.libsdl.org/SDL_GetWindowDisplayMode */ -int -video_getWindowDisplayModeNegative(void *arg) +int video_getWindowDisplayModeNegative(void *arg) { - const char *expectedError = "Parameter 'mode' is invalid"; - char *lastError; - SDL_Window* window; - const char* title = "video_getWindowDisplayModeNegative Test Window"; - SDL_DisplayMode mode; - int result; + const char *expectedError = "Parameter 'mode' is invalid"; + char *lastError; + SDL_Window *window; + const char *title = "video_getWindowDisplayModeNegative Test Window"; + SDL_DisplayMode mode; + int result; - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window != NULL) { - result = SDL_GetWindowDisplayMode(window, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode(...,mode=NULL)"); - SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %d", result); - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); - if (lastError != NULL) { - SDLTest_AssertCheck(SDL_strcmp(lastError, expectedError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - expectedError, - lastError); - } - } + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window != NULL) { + result = SDL_GetWindowDisplayMode(window, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode(...,mode=NULL)"); + SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %d", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); + if (lastError != NULL) { + SDLTest_AssertCheck(SDL_strcmp(lastError, expectedError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + expectedError, + lastError); + } + } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Call against invalid window */ - result = SDL_GetWindowDisplayMode(NULL, &mode); - SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode(window=NULL,...)"); - SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %d", result); - _checkInvalidWindowError(); + /* Call against invalid window */ + result = SDL_GetWindowDisplayMode(NULL, &mode); + SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode(window=NULL,...)"); + SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %d", result); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -750,75 +740,73 @@ video_getWindowGammaRampNegative(void *arg) } /* Helper for setting and checking the window mouse grab state */ -void -_setAndCheckWindowMouseGrabState(SDL_Window* window, SDL_bool desiredState) +void _setAndCheckWindowMouseGrabState(SDL_Window *window, SDL_bool desiredState) { - SDL_bool currentState; - - /* Set state */ - SDL_SetWindowMouseGrab(window, desiredState); - SDLTest_AssertPass("Call to SDL_SetWindowMouseGrab(%s)", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); - - /* Get and check state */ - currentState = SDL_GetWindowMouseGrab(window); - SDLTest_AssertPass("Call to SDL_GetWindowMouseGrab()"); - SDLTest_AssertCheck( - currentState == desiredState, - "Validate returned state; expected: %s, got: %s", - (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", - (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); - - if (desiredState) { - SDLTest_AssertCheck( - SDL_GetGrabbedWindow() == window, - "Grabbed window should be to our window"); - SDLTest_AssertCheck( - SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - SDLTest_AssertCheck( - SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_GRABBED, - "SDL_WINDOW_MOUSE_GRABBED should be set"); - } else { + SDL_bool currentState; + + /* Set state */ + SDL_SetWindowMouseGrab(window, desiredState); + SDLTest_AssertPass("Call to SDL_SetWindowMouseGrab(%s)", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); + + /* Get and check state */ + currentState = SDL_GetWindowMouseGrab(window); + SDLTest_AssertPass("Call to SDL_GetWindowMouseGrab()"); SDLTest_AssertCheck( - !(SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_GRABBED), - "SDL_WINDOW_MOUSE_GRABBED should be unset"); - } + currentState == desiredState, + "Validate returned state; expected: %s, got: %s", + (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", + (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); + + if (desiredState) { + SDLTest_AssertCheck( + SDL_GetGrabbedWindow() == window, + "Grabbed window should be to our window"); + SDLTest_AssertCheck( + SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + SDLTest_AssertCheck( + SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_GRABBED, + "SDL_WINDOW_MOUSE_GRABBED should be set"); + } else { + SDLTest_AssertCheck( + !(SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_GRABBED), + "SDL_WINDOW_MOUSE_GRABBED should be unset"); + } } /* Helper for setting and checking the window keyboard grab state */ -void -_setAndCheckWindowKeyboardGrabState(SDL_Window* window, SDL_bool desiredState) +void _setAndCheckWindowKeyboardGrabState(SDL_Window *window, SDL_bool desiredState) { - SDL_bool currentState; - - /* Set state */ - SDL_SetWindowKeyboardGrab(window, desiredState); - SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(%s)", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); - - /* Get and check state */ - currentState = SDL_GetWindowKeyboardGrab(window); - SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab()"); - SDLTest_AssertCheck( - currentState == desiredState, - "Validate returned state; expected: %s, got: %s", - (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", - (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); - - if (desiredState) { - SDLTest_AssertCheck( - SDL_GetGrabbedWindow() == window, - "Grabbed window should be set to our window"); - SDLTest_AssertCheck( - SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - SDLTest_AssertCheck( - SDL_GetWindowFlags(window) & SDL_WINDOW_KEYBOARD_GRABBED, - "SDL_WINDOW_KEYBOARD_GRABBED should be set"); - } else { + SDL_bool currentState; + + /* Set state */ + SDL_SetWindowKeyboardGrab(window, desiredState); + SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(%s)", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); + + /* Get and check state */ + currentState = SDL_GetWindowKeyboardGrab(window); + SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab()"); SDLTest_AssertCheck( - !(SDL_GetWindowFlags(window) & SDL_WINDOW_KEYBOARD_GRABBED), - "SDL_WINDOW_KEYBOARD_GRABBED should be unset"); - } + currentState == desiredState, + "Validate returned state; expected: %s, got: %s", + (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", + (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); + + if (desiredState) { + SDLTest_AssertCheck( + SDL_GetGrabbedWindow() == window, + "Grabbed window should be set to our window"); + SDLTest_AssertCheck( + SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + SDLTest_AssertCheck( + SDL_GetWindowFlags(window) & SDL_WINDOW_KEYBOARD_GRABBED, + "SDL_WINDOW_KEYBOARD_GRABBED should be set"); + } else { + SDLTest_AssertCheck( + !(SDL_GetWindowFlags(window) & SDL_WINDOW_KEYBOARD_GRABBED), + "SDL_WINDOW_KEYBOARD_GRABBED should be unset"); + } } /** @@ -827,197 +815,198 @@ _setAndCheckWindowKeyboardGrabState(SDL_Window* window, SDL_bool desiredState) * @sa http://wiki.libsdl.org/SDL_GetWindowGrab * @sa http://wiki.libsdl.org/SDL_SetWindowGrab */ -int -video_getSetWindowGrab(void *arg) +int video_getSetWindowGrab(void *arg) { - const char* title = "video_getSetWindowGrab Test Window"; - SDL_Window* window; - SDL_bool originalMouseState, originalKeyboardState; - - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; - - /* Get state */ - originalMouseState = SDL_GetWindowMouseGrab(window); - SDLTest_AssertPass("Call to SDL_GetWindowMouseGrab()"); - originalKeyboardState = SDL_GetWindowKeyboardGrab(window); - SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab()"); - - /* F */ - _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); - _setAndCheckWindowMouseGrabState(window, SDL_FALSE); - SDLTest_AssertCheck(!SDL_GetWindowGrab(window), - "SDL_GetWindowGrab should return SDL_FALSE"); - SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, - "Expected NULL grabbed window"); - - /* F --> F */ - _setAndCheckWindowMouseGrabState(window, SDL_FALSE); - _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); - SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, - "Expected NULL grabbed window"); - - /* F --> T */ - _setAndCheckWindowMouseGrabState(window, SDL_TRUE); - _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - - /* T --> T */ - _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); - _setAndCheckWindowMouseGrabState(window, SDL_TRUE); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - - /* M: T --> F */ - /* K: T --> T */ - _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); - _setAndCheckWindowMouseGrabState(window, SDL_FALSE); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - - /* M: F --> T */ - /* K: T --> F */ - _setAndCheckWindowMouseGrabState(window, SDL_TRUE); - _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - - /* M: T --> F */ - /* K: F --> F */ - _setAndCheckWindowMouseGrabState(window, SDL_FALSE); - _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); - SDLTest_AssertCheck(!SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_FALSE"); - SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, - "Expected NULL grabbed window"); - - /* Using the older SDL_SetWindowGrab API should only grab mouse by default */ - SDL_SetWindowGrab(window, SDL_TRUE); - SDLTest_AssertPass("Call to SDL_SetWindowGrab(SDL_TRUE)"); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - SDLTest_AssertCheck(SDL_GetWindowMouseGrab(window), - "SDL_GetWindowMouseGrab() should return SDL_TRUE"); - SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), - "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); - SDL_SetWindowGrab(window, SDL_FALSE); - SDLTest_AssertCheck(!SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_FALSE"); - SDLTest_AssertCheck(!SDL_GetWindowMouseGrab(window), - "SDL_GetWindowMouseGrab() should return SDL_FALSE"); - SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), - "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); - - /* Now test with SDL_HINT_GRAB_KEYBOARD set. We should get keyboard grab now. */ - SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1"); - SDL_SetWindowGrab(window, SDL_TRUE); - SDLTest_AssertPass("Call to SDL_SetWindowGrab(SDL_TRUE)"); - SDLTest_AssertCheck(SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_TRUE"); - SDLTest_AssertCheck(SDL_GetWindowMouseGrab(window), - "SDL_GetWindowMouseGrab() should return SDL_TRUE"); - SDLTest_AssertCheck(SDL_GetWindowKeyboardGrab(window), - "SDL_GetWindowKeyboardGrab() should return SDL_TRUE"); - SDL_SetWindowGrab(window, SDL_FALSE); - SDLTest_AssertCheck(!SDL_GetWindowGrab(window), - "SDL_GetWindowGrab() should return SDL_FALSE"); - SDLTest_AssertCheck(!SDL_GetWindowMouseGrab(window), - "SDL_GetWindowMouseGrab() should return SDL_FALSE"); - SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), - "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); - - /* Negative tests */ - SDL_GetWindowGrab(NULL); - SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)"); - _checkInvalidWindowError(); - - SDL_GetWindowKeyboardGrab(NULL); - SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)"); - _checkInvalidWindowError(); - - SDL_SetWindowGrab(NULL, SDL_FALSE); - SDLTest_AssertPass("Call to SDL_SetWindowGrab(window=NULL,SDL_FALSE)"); - _checkInvalidWindowError(); - - SDL_SetWindowKeyboardGrab(NULL, SDL_FALSE); - SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(window=NULL,SDL_FALSE)"); - _checkInvalidWindowError(); - - SDL_SetWindowGrab(NULL, SDL_TRUE); - SDLTest_AssertPass("Call to SDL_SetWindowGrab(window=NULL,SDL_TRUE)"); - _checkInvalidWindowError(); + const char *title = "video_getSetWindowGrab Test Window"; + SDL_Window *window; + SDL_bool originalMouseState, originalKeyboardState; - SDL_SetWindowKeyboardGrab(NULL, SDL_TRUE); - SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(window=NULL,SDL_TRUE)"); - _checkInvalidWindowError(); + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; + } - /* Restore state */ - _setAndCheckWindowMouseGrabState(window, originalMouseState); - _setAndCheckWindowKeyboardGrabState(window, originalKeyboardState); + /* Get state */ + originalMouseState = SDL_GetWindowMouseGrab(window); + SDLTest_AssertPass("Call to SDL_GetWindowMouseGrab()"); + originalKeyboardState = SDL_GetWindowKeyboardGrab(window); + SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab()"); + + /* F */ + _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); + _setAndCheckWindowMouseGrabState(window, SDL_FALSE); + SDLTest_AssertCheck(!SDL_GetWindowGrab(window), + "SDL_GetWindowGrab should return SDL_FALSE"); + SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, + "Expected NULL grabbed window"); + + /* F --> F */ + _setAndCheckWindowMouseGrabState(window, SDL_FALSE); + _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); + SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, + "Expected NULL grabbed window"); + + /* F --> T */ + _setAndCheckWindowMouseGrabState(window, SDL_TRUE); + _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + + /* T --> T */ + _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); + _setAndCheckWindowMouseGrabState(window, SDL_TRUE); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + + /* M: T --> F */ + /* K: T --> T */ + _setAndCheckWindowKeyboardGrabState(window, SDL_TRUE); + _setAndCheckWindowMouseGrabState(window, SDL_FALSE); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + + /* M: F --> T */ + /* K: T --> F */ + _setAndCheckWindowMouseGrabState(window, SDL_TRUE); + _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + + /* M: T --> F */ + /* K: F --> F */ + _setAndCheckWindowMouseGrabState(window, SDL_FALSE); + _setAndCheckWindowKeyboardGrabState(window, SDL_FALSE); + SDLTest_AssertCheck(!SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_FALSE"); + SDLTest_AssertCheck(SDL_GetGrabbedWindow() == NULL, + "Expected NULL grabbed window"); + + /* Using the older SDL_SetWindowGrab API should only grab mouse by default */ + SDL_SetWindowGrab(window, SDL_TRUE); + SDLTest_AssertPass("Call to SDL_SetWindowGrab(SDL_TRUE)"); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + SDLTest_AssertCheck(SDL_GetWindowMouseGrab(window), + "SDL_GetWindowMouseGrab() should return SDL_TRUE"); + SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), + "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); + SDL_SetWindowGrab(window, SDL_FALSE); + SDLTest_AssertCheck(!SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_FALSE"); + SDLTest_AssertCheck(!SDL_GetWindowMouseGrab(window), + "SDL_GetWindowMouseGrab() should return SDL_FALSE"); + SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), + "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); + + /* Now test with SDL_HINT_GRAB_KEYBOARD set. We should get keyboard grab now. */ + SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1"); + SDL_SetWindowGrab(window, SDL_TRUE); + SDLTest_AssertPass("Call to SDL_SetWindowGrab(SDL_TRUE)"); + SDLTest_AssertCheck(SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_TRUE"); + SDLTest_AssertCheck(SDL_GetWindowMouseGrab(window), + "SDL_GetWindowMouseGrab() should return SDL_TRUE"); + SDLTest_AssertCheck(SDL_GetWindowKeyboardGrab(window), + "SDL_GetWindowKeyboardGrab() should return SDL_TRUE"); + SDL_SetWindowGrab(window, SDL_FALSE); + SDLTest_AssertCheck(!SDL_GetWindowGrab(window), + "SDL_GetWindowGrab() should return SDL_FALSE"); + SDLTest_AssertCheck(!SDL_GetWindowMouseGrab(window), + "SDL_GetWindowMouseGrab() should return SDL_FALSE"); + SDLTest_AssertCheck(!SDL_GetWindowKeyboardGrab(window), + "SDL_GetWindowKeyboardGrab() should return SDL_FALSE"); + + /* Negative tests */ + SDL_GetWindowGrab(NULL); + SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)"); + _checkInvalidWindowError(); + + SDL_GetWindowKeyboardGrab(NULL); + SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)"); + _checkInvalidWindowError(); + + SDL_SetWindowGrab(NULL, SDL_FALSE); + SDLTest_AssertPass("Call to SDL_SetWindowGrab(window=NULL,SDL_FALSE)"); + _checkInvalidWindowError(); + + SDL_SetWindowKeyboardGrab(NULL, SDL_FALSE); + SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(window=NULL,SDL_FALSE)"); + _checkInvalidWindowError(); + + SDL_SetWindowGrab(NULL, SDL_TRUE); + SDLTest_AssertPass("Call to SDL_SetWindowGrab(window=NULL,SDL_TRUE)"); + _checkInvalidWindowError(); + + SDL_SetWindowKeyboardGrab(NULL, SDL_TRUE); + SDLTest_AssertPass("Call to SDL_SetWindowKeyboardGrab(window=NULL,SDL_TRUE)"); + _checkInvalidWindowError(); + + /* Restore state */ + _setAndCheckWindowMouseGrabState(window, originalMouseState); + _setAndCheckWindowKeyboardGrabState(window, originalKeyboardState); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests call to SDL_GetWindowID and SDL_GetWindowFromID * * @sa http://wiki.libsdl.org/SDL_GetWindowID * @sa http://wiki.libsdl.org/SDL_SetWindowFromID */ -int -video_getWindowId(void *arg) +int video_getWindowId(void *arg) { - const char* title = "video_getWindowId Test Window"; - SDL_Window* window; - SDL_Window* result; - Uint32 id, randomId; + const char *title = "video_getWindowId Test Window"; + SDL_Window *window; + SDL_Window *result; + Uint32 id, randomId; - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; + } - /* Get ID */ - id = SDL_GetWindowID(window); - SDLTest_AssertPass("Call to SDL_GetWindowID()"); + /* Get ID */ + id = SDL_GetWindowID(window); + SDLTest_AssertPass("Call to SDL_GetWindowID()"); - /* Get window from ID */ - result = SDL_GetWindowFromID(id); - SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 ")", id); - SDLTest_AssertCheck(result == window, "Verify result matches window pointer"); + /* Get window from ID */ + result = SDL_GetWindowFromID(id); + SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 ")", id); + SDLTest_AssertCheck(result == window, "Verify result matches window pointer"); - /* Get window from random large ID, no result check */ - randomId = SDLTest_RandomIntegerInRange(UINT8_MAX,UINT16_MAX); - result = SDL_GetWindowFromID(randomId); - SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/random_large)", randomId); + /* Get window from random large ID, no result check */ + randomId = SDLTest_RandomIntegerInRange(UINT8_MAX, UINT16_MAX); + result = SDL_GetWindowFromID(randomId); + SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/random_large)", randomId); - /* Get window from 0 and Uint32 max ID, no result check */ - result = SDL_GetWindowFromID(0); - SDLTest_AssertPass("Call to SDL_GetWindowID(0)"); - result = SDL_GetWindowFromID(UINT32_MAX); - SDLTest_AssertPass("Call to SDL_GetWindowID(UINT32_MAX)"); + /* Get window from 0 and Uint32 max ID, no result check */ + result = SDL_GetWindowFromID(0); + SDLTest_AssertPass("Call to SDL_GetWindowID(0)"); + result = SDL_GetWindowFromID(UINT32_MAX); + SDLTest_AssertPass("Call to SDL_GetWindowID(UINT32_MAX)"); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Get window from ID for closed window */ - result = SDL_GetWindowFromID(id); - SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/closed_window)", id); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + /* Get window from ID for closed window */ + result = SDL_GetWindowFromID(id); + SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/closed_window)", id); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - /* Negative test */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - id = SDL_GetWindowID(NULL); - SDLTest_AssertPass("Call to SDL_GetWindowID(window=NULL)"); - _checkInvalidWindowError(); + /* Negative test */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + id = SDL_GetWindowID(NULL); + SDLTest_AssertPass("Call to SDL_GetWindowID(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -1025,33 +1014,65 @@ video_getWindowId(void *arg) * * @sa http://wiki.libsdl.org/SDL_GetWindowPixelFormat */ -int -video_getWindowPixelFormat(void *arg) +int video_getWindowPixelFormat(void *arg) { - const char* title = "video_getWindowPixelFormat Test Window"; - SDL_Window* window; - Uint32 format; + const char *title = "video_getWindowPixelFormat Test Window"; + SDL_Window *window; + Uint32 format; - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; + } - /* Get format */ - format = SDL_GetWindowPixelFormat(window); - SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat()"); - SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, "Verify that returned format is valid; expected: != %d, got: %" SDL_PRIu32, SDL_PIXELFORMAT_UNKNOWN, format); + /* Get format */ + format = SDL_GetWindowPixelFormat(window); + SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat()"); + SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, "Verify that returned format is valid; expected: != %d, got: %" SDL_PRIu32, SDL_PIXELFORMAT_UNKNOWN, format); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Negative test */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - format = SDL_GetWindowPixelFormat(NULL); - SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat(window=NULL)"); - _checkInvalidWindowError(); + /* Negative test */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + format = SDL_GetWindowPixelFormat(NULL); + SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; +} + + +static SDL_bool getPositionFromEvent(int *x, int *y) +{ + SDL_bool ret = SDL_FALSE; + SDL_Event evt; + SDL_zero(evt); + while (SDL_PollEvent(&evt)) { + if (evt.type == SDL_WINDOWEVENT && evt.window.event == SDL_WINDOWEVENT_MOVED) { + *x = evt.window.data1; + *y = evt.window.data2; + ret = SDL_TRUE; + } + } + return ret; +} + +static SDL_bool getSizeFromEvent(int *w, int *h) +{ + SDL_bool ret = SDL_FALSE; + SDL_Event evt; + SDL_zero(evt); + while (SDL_PollEvent(&evt)) { + if (evt.type == SDL_WINDOWEVENT && evt.window.event == SDL_WINDOWEVENT_RESIZED) { + *w = evt.window.data1; + *h = evt.window.data2; + ret = SDL_TRUE; + } + } + return ret; } /** @@ -1060,143 +1081,159 @@ video_getWindowPixelFormat(void *arg) * @sa http://wiki.libsdl.org/SDL_GetWindowPosition * @sa http://wiki.libsdl.org/SDL_SetWindowPosition */ -int -video_getSetWindowPosition(void *arg) +int video_getSetWindowPosition(void *arg) { - const char* title = "video_getSetWindowPosition Test Window"; - SDL_Window* window; - int xVariation, yVariation; - int referenceX, referenceY; - int currentX, currentY; - int desiredX, desiredY; - - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; + const char *title = "video_getSetWindowPosition Test Window"; + SDL_Window *window; + int xVariation, yVariation; + int referenceX, referenceY; + int currentX, currentY; + int desiredX, desiredY; - for (xVariation = 0; xVariation < 4; xVariation++) { - for (yVariation = 0; yVariation < 4; yVariation++) { - switch(xVariation) { - default: - case 0: - /* Zero X Position */ - desiredX = 0; - break; - case 1: - /* Random X position inside screen */ - desiredX = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Random X position outside screen (positive) */ - desiredX = SDLTest_RandomIntegerInRange(10000, 11000); - break; - case 3: - /* Random X position outside screen (negative) */ - desiredX = SDLTest_RandomIntegerInRange(-1000, -100); - break; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; } - switch(yVariation) { - default: - case 0: - /* Zero X Position */ - desiredY = 0; - break; - case 1: - /* Random X position inside screen */ - desiredY = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Random X position outside screen (positive) */ - desiredY = SDLTest_RandomIntegerInRange(10000, 11000); - break; - case 3: - /* Random Y position outside screen (negative) */ - desiredY = SDLTest_RandomIntegerInRange(-1000, -100); - break; + for (xVariation = 0; xVariation < 4; xVariation++) { + for (yVariation = 0; yVariation < 4; yVariation++) { + switch (xVariation) { + default: + case 0: + /* Zero X Position */ + desiredX = 0; + break; + case 1: + /* Random X position inside screen */ + desiredX = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Random X position outside screen (positive) */ + desiredX = SDLTest_RandomIntegerInRange(10000, 11000); + break; + case 3: + /* Random X position outside screen (negative) */ + desiredX = SDLTest_RandomIntegerInRange(-1000, -100); + break; + } + + switch (yVariation) { + default: + case 0: + /* Zero X Position */ + desiredY = 0; + break; + case 1: + /* Random X position inside screen */ + desiredY = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Random X position outside screen (positive) */ + desiredY = SDLTest_RandomIntegerInRange(10000, 11000); + break; + case 3: + /* Random Y position outside screen (negative) */ + desiredY = SDLTest_RandomIntegerInRange(-1000, -100); + break; + } + + /* Set position */ + SDL_SetWindowPosition(window, desiredX, desiredY); + SDLTest_AssertPass("Call to SDL_SetWindowPosition(...,%d,%d)", desiredX, desiredY); + + /* Get position */ + currentX = desiredX + 1; + currentY = desiredY + 1; + SDL_GetWindowPosition(window, ¤tX, ¤tY); + SDLTest_AssertPass("Call to SDL_GetWindowPosition()"); + + if (desiredX == currentX && desiredY == currentY) { + SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position; expected: %d, got: %d", desiredX, currentX); + SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position; expected: %d, got: %d", desiredY, currentY); + } else { + SDL_bool hasEvent; + /* SDL_SetWindowPosition() and SDL_SetWindowSize() will make requests of the window manager and set the internal position and size, + * and then we get events signaling what actually happened, and they get passed on to the application if they're not what we expect. */ + desiredX = currentX + 1; + desiredY = currentY + 1; + hasEvent = getPositionFromEvent(&desiredX, &desiredY); + SDLTest_AssertCheck(hasEvent == SDL_TRUE, "Changing position was not honored by WM, checking present of SDL_WINDOWEVENT_MOVED"); + if (hasEvent) { + SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position is the position from SDL event; expected: %d, got: %d", desiredX, currentX); + SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position is the position from SDL event; expected: %d, got: %d", desiredY, currentY); + } + } + + /* Get position X */ + currentX = desiredX + 1; + SDL_GetWindowPosition(window, ¤tX, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowPosition(&y=NULL)"); + SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position; expected: %d, got: %d", desiredX, currentX); + + /* Get position Y */ + currentY = desiredY + 1; + SDL_GetWindowPosition(window, NULL, ¤tY); + SDLTest_AssertPass("Call to SDL_GetWindowPosition(&x=NULL)"); + SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position; expected: %d, got: %d", desiredY, currentY); + } } - /* Set position */ - SDL_SetWindowPosition(window, desiredX, desiredY); - SDLTest_AssertPass("Call to SDL_SetWindowPosition(...,%d,%d)", desiredX, desiredY); - - /* Get position */ - currentX = desiredX + 1; - currentY = desiredY + 1; - SDL_GetWindowPosition(window, ¤tX, ¤tY); - SDLTest_AssertPass("Call to SDL_GetWindowPosition()"); - SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position; expected: %d, got: %d", desiredX, currentX); - SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position; expected: %d, got: %d", desiredY, currentY); - - /* Get position X */ - currentX = desiredX + 1; - SDL_GetWindowPosition(window, ¤tX, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowPosition(&y=NULL)"); - SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position; expected: %d, got: %d", desiredX, currentX); - - /* Get position Y */ - currentY = desiredY + 1; - SDL_GetWindowPosition(window, NULL, ¤tY); - SDLTest_AssertPass("Call to SDL_GetWindowPosition(&x=NULL)"); - SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position; expected: %d, got: %d", desiredY, currentY); - } - } - - /* Dummy call with both pointers NULL */ - SDL_GetWindowPosition(window, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowPosition(&x=NULL,&y=NULL)"); - - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Dummy call with both pointers NULL */ + SDL_GetWindowPosition(window, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowPosition(&x=NULL,&y=NULL)"); - /* Set some 'magic' value for later check that nothing was changed */ - referenceX = SDLTest_RandomSint32(); - referenceY = SDLTest_RandomSint32(); - currentX = referenceX; - currentY = referenceY; - desiredX = SDLTest_RandomSint32(); - desiredY = SDLTest_RandomSint32(); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Negative tests */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_GetWindowPosition(NULL, ¤tX, ¤tY); - SDLTest_AssertPass("Call to SDL_GetWindowPosition(window=NULL)"); - SDLTest_AssertCheck( - currentX == referenceX && currentY == referenceY, - "Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceX, referenceY, - currentX, currentY); - _checkInvalidWindowError(); + /* Set some 'magic' value for later check that nothing was changed */ + referenceX = SDLTest_RandomSint32(); + referenceY = SDLTest_RandomSint32(); + currentX = referenceX; + currentY = referenceY; + desiredX = SDLTest_RandomSint32(); + desiredY = SDLTest_RandomSint32(); + + /* Negative tests */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + SDL_GetWindowPosition(NULL, ¤tX, ¤tY); + SDLTest_AssertPass("Call to SDL_GetWindowPosition(window=NULL)"); + SDLTest_AssertCheck( + currentX == referenceX && currentY == referenceY, + "Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceX, referenceY, + currentX, currentY); + _checkInvalidWindowError(); - SDL_GetWindowPosition(NULL, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowPosition(NULL, NULL, NULL)"); - _checkInvalidWindowError(); + SDL_GetWindowPosition(NULL, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowPosition(NULL, NULL, NULL)"); + _checkInvalidWindowError(); - SDL_SetWindowPosition(NULL, desiredX, desiredY); - SDLTest_AssertPass("Call to SDL_SetWindowPosition(window=NULL)"); - _checkInvalidWindowError(); + SDL_SetWindowPosition(NULL, desiredX, desiredY); + SDLTest_AssertPass("Call to SDL_SetWindowPosition(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* Helper function that checks for an 'Invalid parameter' error */ void _checkInvalidParameterError() { - const char *invalidParameterError = "Parameter"; - char *lastError; - - lastError = (char *)SDL_GetError(); - SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); - if (lastError != NULL) { - SDLTest_AssertCheck(SDL_strncmp(lastError, invalidParameterError, SDL_strlen(invalidParameterError)) == 0, - "SDL_GetError(): expected message starts with '%s', was message: '%s'", - invalidParameterError, - lastError); - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - } + const char *invalidParameterError = "Parameter"; + char *lastError; + + lastError = (char *)SDL_GetError(); + SDLTest_AssertPass("SDL_GetError()"); + SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); + if (lastError != NULL) { + SDLTest_AssertCheck(SDL_strncmp(lastError, invalidParameterError, SDL_strlen(invalidParameterError)) == 0, + "SDL_GetError(): expected message starts with '%s', was message: '%s'", + invalidParameterError, + lastError); + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + } } /** @@ -1205,665 +1242,689 @@ void _checkInvalidParameterError() * @sa http://wiki.libsdl.org/SDL_GetWindowSize * @sa http://wiki.libsdl.org/SDL_SetWindowSize */ -int -video_getSetWindowSize(void *arg) +int video_getSetWindowSize(void *arg) { - const char* title = "video_getSetWindowSize Test Window"; - SDL_Window* window; - int result; - SDL_Rect display; - int maxwVariation, maxhVariation; - int wVariation, hVariation; - int referenceW, referenceH; - int currentW, currentH; - int desiredW, desiredH; - - /* Get display bounds for size range */ - result = SDL_GetDisplayBounds(0, &display); - SDLTest_AssertPass("SDL_GetDisplayBounds()"); - SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); - if (result != 0) return TEST_ABORTED; + const char *title = "video_getSetWindowSize Test Window"; + SDL_Window *window; + int result; + SDL_Rect display; + int maxwVariation, maxhVariation; + int wVariation, hVariation; + int referenceW, referenceH; + int currentW, currentH; + int desiredW, desiredH; + + /* Get display bounds for size range */ + result = SDL_GetDisplayBounds(0, &display); + SDLTest_AssertPass("SDL_GetDisplayBounds()"); + SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); + if (result != 0) { + return TEST_ABORTED; + } - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; + } #ifdef __WIN32__ - /* Platform clips window size to screen size */ - maxwVariation = 4; - maxhVariation = 4; + /* Platform clips window size to screen size */ + maxwVariation = 4; + maxhVariation = 4; #else - /* Platform allows window size >= screen size */ - maxwVariation = 5; - maxhVariation = 5; + /* Platform allows window size >= screen size */ + maxwVariation = 5; + maxhVariation = 5; #endif - - for (wVariation = 0; wVariation < maxwVariation; wVariation++) { - for (hVariation = 0; hVariation < maxhVariation; hVariation++) { - switch(wVariation) { - default: - case 0: - /* 1 Pixel Wide */ - desiredW = 1; - break; - case 1: - /* Random width inside screen */ - desiredW = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Width 1 pixel smaller than screen */ - desiredW = display.w - 1; - break; - case 3: - /* Width at screen size */ - desiredW = display.w; - break; - case 4: - /* Width 1 pixel larger than screen */ - desiredW = display.w + 1; - break; - } - switch(hVariation) { - default: - case 0: - /* 1 Pixel High */ - desiredH = 1; - break; - case 1: - /* Random height inside screen */ - desiredH = SDLTest_RandomIntegerInRange(1, 100); - break; - case 2: - /* Height 1 pixel smaller than screen */ - desiredH = display.h - 1; - break; - case 3: - /* Height at screen size */ - desiredH = display.h; - break; - case 4: - /* Height 1 pixel larger than screen */ - desiredH = display.h + 1; - break; + for (wVariation = 0; wVariation < maxwVariation; wVariation++) { + for (hVariation = 0; hVariation < maxhVariation; hVariation++) { + switch (wVariation) { + default: + case 0: + /* 1 Pixel Wide */ + desiredW = 1; + break; + case 1: + /* Random width inside screen */ + desiredW = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Width 1 pixel smaller than screen */ + desiredW = display.w - 1; + break; + case 3: + /* Width at screen size */ + desiredW = display.w; + break; + case 4: + /* Width 1 pixel larger than screen */ + desiredW = display.w + 1; + break; + } + + switch (hVariation) { + default: + case 0: + /* 1 Pixel High */ + desiredH = 1; + break; + case 1: + /* Random height inside screen */ + desiredH = SDLTest_RandomIntegerInRange(1, 100); + break; + case 2: + /* Height 1 pixel smaller than screen */ + desiredH = display.h - 1; + break; + case 3: + /* Height at screen size */ + desiredH = display.h; + break; + case 4: + /* Height 1 pixel larger than screen */ + desiredH = display.h + 1; + break; + } + + /* Set size */ + SDL_SetWindowSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); + + /* Get size */ + currentW = desiredW + 1; + currentH = desiredH + 1; + SDL_GetWindowSize(window, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowSize()"); + + if (desiredW == currentW && desiredH == currentH) { + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); + } else { + SDL_bool hasEvent; + /* SDL_SetWindowPosition() and SDL_SetWindowSize() will make requests of the window manager and set the internal position and size, + * and then we get events signaling what actually happened, and they get passed on to the application if they're not what we expect. */ + desiredW = currentW + 1; + desiredH = currentH + 1; + hasEvent = getSizeFromEvent(&desiredW, &desiredH); + SDLTest_AssertCheck(hasEvent == SDL_TRUE, "Changing size was not honored by WM, checking presence of SDL_WINDOWEVENT_RESIZED"); + if (hasEvent) { + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width is the one from SDL event; expected: %d, got: %d", desiredW, currentW); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height is the one from SDL event; expected: %d, got: %d", desiredH, currentH); + } + } + + + /* Get just width */ + currentW = desiredW + 1; + SDL_GetWindowSize(window, ¤tW, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowSize(&h=NULL)"); + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); + + /* Get just height */ + currentH = desiredH + 1; + SDL_GetWindowSize(window, NULL, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowSize(&w=NULL)"); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); + } } - /* Set size */ - SDL_SetWindowSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); - - /* Get size */ - currentW = desiredW + 1; - currentH = desiredH + 1; - SDL_GetWindowSize(window, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowSize()"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); - - /* Get just width */ - currentW = desiredW + 1; - SDL_GetWindowSize(window, ¤tW, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowSize(&h=NULL)"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); - - /* Get just height */ - currentH = desiredH + 1; - SDL_GetWindowSize(window, NULL, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowSize(&w=NULL)"); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); - } - } - - /* Dummy call with both pointers NULL */ - SDL_GetWindowSize(window, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowSize(&w=NULL,&h=NULL)"); - - /* Negative tests for parameter input */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - for (desiredH = -2; desiredH < 2; desiredH++) { - for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { - SDL_SetWindowSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); - _checkInvalidParameterError(); - } + /* Dummy call with both pointers NULL */ + SDL_GetWindowSize(window, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowSize(&w=NULL,&h=NULL)"); + + /* Negative tests for parameter input */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + for (desiredH = -2; desiredH < 2; desiredH++) { + for (desiredW = -2; desiredW < 2; desiredW++) { + if (desiredW <= 0 || desiredH <= 0) { + SDL_SetWindowSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); + _checkInvalidParameterError(); + } + } } - } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); - - /* Set some 'magic' value for later check that nothing was changed */ - referenceW = SDLTest_RandomSint32(); - referenceH = SDLTest_RandomSint32(); - currentW = referenceW; - currentH = referenceH; - desiredW = SDLTest_RandomSint32(); - desiredH = SDLTest_RandomSint32(); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Negative tests for window input */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_GetWindowSize(NULL, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowSize(window=NULL)"); - SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); - _checkInvalidWindowError(); + /* Set some 'magic' value for later check that nothing was changed */ + referenceW = SDLTest_RandomSint32(); + referenceH = SDLTest_RandomSint32(); + currentW = referenceW; + currentH = referenceH; + desiredW = SDLTest_RandomSint32(); + desiredH = SDLTest_RandomSint32(); + + /* Negative tests for window input */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + SDL_GetWindowSize(NULL, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowSize(window=NULL)"); + SDLTest_AssertCheck( + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); + _checkInvalidWindowError(); - SDL_GetWindowSize(NULL, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowSize(NULL, NULL, NULL)"); - _checkInvalidWindowError(); + SDL_GetWindowSize(NULL, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowSize(NULL, NULL, NULL)"); + _checkInvalidWindowError(); - SDL_SetWindowSize(NULL, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowSize(window=NULL)"); - _checkInvalidWindowError(); + SDL_SetWindowSize(NULL, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowSize(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests call to SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize * */ -int -video_getSetWindowMinimumSize(void *arg) +int video_getSetWindowMinimumSize(void *arg) { - const char* title = "video_getSetWindowMinimumSize Test Window"; - SDL_Window* window; - int result; - SDL_Rect display; - int wVariation, hVariation; - int referenceW, referenceH; - int currentW, currentH; - int desiredW = 1; - int desiredH = 1; - - /* Get display bounds for size range */ - result = SDL_GetDisplayBounds(0, &display); - SDLTest_AssertPass("SDL_GetDisplayBounds()"); - SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); - if (result != 0) return TEST_ABORTED; - - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; - - for (wVariation = 0; wVariation < 5; wVariation++) { - for (hVariation = 0; hVariation < 5; hVariation++) { - switch(wVariation) { - case 0: - /* 1 Pixel Wide */ - desiredW = 1; - break; - case 1: - /* Random width inside screen */ - desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); - break; - case 2: - /* Width at screen size */ - desiredW = display.w; - break; + const char *title = "video_getSetWindowMinimumSize Test Window"; + SDL_Window *window; + int result; + SDL_Rect display; + int wVariation, hVariation; + int referenceW, referenceH; + int currentW, currentH; + int desiredW = 1; + int desiredH = 1; + + /* Get display bounds for size range */ + result = SDL_GetDisplayBounds(0, &display); + SDLTest_AssertPass("SDL_GetDisplayBounds()"); + SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); + if (result != 0) { + return TEST_ABORTED; } - switch(hVariation) { - case 0: - /* 1 Pixel High */ - desiredH = 1; - break; - case 1: - /* Random height inside screen */ - desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); - break; - case 2: - /* Height at screen size */ - desiredH = display.h; - break; - case 4: - /* Height 1 pixel larger than screen */ - desiredH = display.h + 1; - break; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; } - /* Set size */ - SDL_SetWindowMinimumSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); - - /* Get size */ - currentW = desiredW + 1; - currentH = desiredH + 1; - SDL_GetWindowMinimumSize(window, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize()"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); - - /* Get just width */ - currentW = desiredW + 1; - SDL_GetWindowMinimumSize(window, ¤tW, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&h=NULL)"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); - - /* Get just height */ - currentH = desiredH + 1; - SDL_GetWindowMinimumSize(window, NULL, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&w=NULL)"); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredW, currentH); - } - } - - /* Dummy call with both pointers NULL */ - SDL_GetWindowMinimumSize(window, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&w=NULL,&h=NULL)"); - - /* Negative tests for parameter input */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - for (desiredH = -2; desiredH < 2; desiredH++) { - for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { - SDL_SetWindowMinimumSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); - _checkInvalidParameterError(); - } + for (wVariation = 0; wVariation < 5; wVariation++) { + for (hVariation = 0; hVariation < 5; hVariation++) { + switch (wVariation) { + case 0: + /* 1 Pixel Wide */ + desiredW = 1; + break; + case 1: + /* Random width inside screen */ + desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); + break; + case 2: + /* Width at screen size */ + desiredW = display.w; + break; + } + + switch (hVariation) { + case 0: + /* 1 Pixel High */ + desiredH = 1; + break; + case 1: + /* Random height inside screen */ + desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); + break; + case 2: + /* Height at screen size */ + desiredH = display.h; + break; + case 4: + /* Height 1 pixel larger than screen */ + desiredH = display.h + 1; + break; + } + + /* Set size */ + SDL_SetWindowMinimumSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); + + /* Get size */ + currentW = desiredW + 1; + currentH = desiredH + 1; + SDL_GetWindowMinimumSize(window, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize()"); + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); + + /* Get just width */ + currentW = desiredW + 1; + SDL_GetWindowMinimumSize(window, ¤tW, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&h=NULL)"); + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); + + /* Get just height */ + currentH = desiredH + 1; + SDL_GetWindowMinimumSize(window, NULL, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&w=NULL)"); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredW, currentH); + } } - } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Dummy call with both pointers NULL */ + SDL_GetWindowMinimumSize(window, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&w=NULL,&h=NULL)"); + + /* Negative tests for parameter input */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + for (desiredH = -2; desiredH < 2; desiredH++) { + for (desiredW = -2; desiredW < 2; desiredW++) { + if (desiredW <= 0 || desiredH <= 0) { + SDL_SetWindowMinimumSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); + _checkInvalidParameterError(); + } + } + } - /* Set some 'magic' value for later check that nothing was changed */ - referenceW = SDLTest_RandomSint32(); - referenceH = SDLTest_RandomSint32(); - currentW = referenceW; - currentH = referenceH; - desiredW = SDLTest_RandomSint32(); - desiredH = SDLTest_RandomSint32(); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Negative tests for window input */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_GetWindowMinimumSize(NULL, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(window=NULL)"); - SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); - _checkInvalidWindowError(); + /* Set some 'magic' value for later check that nothing was changed */ + referenceW = SDLTest_RandomSint32(); + referenceH = SDLTest_RandomSint32(); + currentW = referenceW; + currentH = referenceH; + desiredW = SDLTest_RandomSint32(); + desiredH = SDLTest_RandomSint32(); + + /* Negative tests for window input */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + SDL_GetWindowMinimumSize(NULL, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(window=NULL)"); + SDLTest_AssertCheck( + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); + _checkInvalidWindowError(); - SDL_GetWindowMinimumSize(NULL, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(NULL, NULL, NULL)"); - _checkInvalidWindowError(); + SDL_GetWindowMinimumSize(NULL, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(NULL, NULL, NULL)"); + _checkInvalidWindowError(); - SDL_SetWindowMinimumSize(NULL, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(window=NULL)"); - _checkInvalidWindowError(); + SDL_SetWindowMinimumSize(NULL, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Tests call to SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize * */ -int -video_getSetWindowMaximumSize(void *arg) +int video_getSetWindowMaximumSize(void *arg) { - const char* title = "video_getSetWindowMaximumSize Test Window"; - SDL_Window* window; - int result; - SDL_Rect display; - int wVariation, hVariation; - int referenceW, referenceH; - int currentW, currentH; - int desiredW, desiredH; - - /* Get display bounds for size range */ - result = SDL_GetDisplayBounds(0, &display); - SDLTest_AssertPass("SDL_GetDisplayBounds()"); - SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); - if (result != 0) return TEST_ABORTED; - - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; - - for (wVariation = 0; wVariation < 3; wVariation++) { - for (hVariation = 0; hVariation < 3; hVariation++) { - switch(wVariation) { - case 0: - /* 1 Pixel Wide */ - desiredW = 1; - break; - case 1: - /* Random width inside screen */ - desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); - break; - case 2: - /* Width at screen size */ - desiredW = display.w; - break; + const char *title = "video_getSetWindowMaximumSize Test Window"; + SDL_Window *window; + int result; + SDL_Rect display; + int wVariation, hVariation; + int referenceW, referenceH; + int currentW, currentH; + int desiredW, desiredH; + + /* Get display bounds for size range */ + result = SDL_GetDisplayBounds(0, &display); + SDLTest_AssertPass("SDL_GetDisplayBounds()"); + SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); + if (result != 0) { + return TEST_ABORTED; } - switch(hVariation) { - case 0: - /* 1 Pixel High */ - desiredH = 1; - break; - case 1: - /* Random height inside screen */ - desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); - break; - case 2: - /* Height at screen size */ - desiredH = display.h; - break; + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; } - /* Set size */ - SDL_SetWindowMaximumSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); - - /* Get size */ - currentW = desiredW + 1; - currentH = desiredH + 1; - SDL_GetWindowMaximumSize(window, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize()"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); - - /* Get just width */ - currentW = desiredW + 1; - SDL_GetWindowMaximumSize(window, ¤tW, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&h=NULL)"); - SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); - - /* Get just height */ - currentH = desiredH + 1; - SDL_GetWindowMaximumSize(window, NULL, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&w=NULL)"); - SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredW, currentH); - } - } - - /* Dummy call with both pointers NULL */ - SDL_GetWindowMaximumSize(window, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&w=NULL,&h=NULL)"); - - /* Negative tests for parameter input */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - for (desiredH = -2; desiredH < 2; desiredH++) { - for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { - SDL_SetWindowMaximumSize(window, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); - _checkInvalidParameterError(); - } + for (wVariation = 0; wVariation < 3; wVariation++) { + for (hVariation = 0; hVariation < 3; hVariation++) { + switch (wVariation) { + case 0: + /* 1 Pixel Wide */ + desiredW = 1; + break; + case 1: + /* Random width inside screen */ + desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); + break; + case 2: + /* Width at screen size */ + desiredW = display.w; + break; + } + + switch (hVariation) { + case 0: + /* 1 Pixel High */ + desiredH = 1; + break; + case 1: + /* Random height inside screen */ + desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); + break; + case 2: + /* Height at screen size */ + desiredH = display.h; + break; + } + + /* Set size */ + SDL_SetWindowMaximumSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); + + /* Get size */ + currentW = desiredW + 1; + currentH = desiredH + 1; + SDL_GetWindowMaximumSize(window, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize()"); + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); + + /* Get just width */ + currentW = desiredW + 1; + SDL_GetWindowMaximumSize(window, ¤tW, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&h=NULL)"); + SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); + + /* Get just height */ + currentH = desiredH + 1; + SDL_GetWindowMaximumSize(window, NULL, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&w=NULL)"); + SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredW, currentH); + } } - } - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Dummy call with both pointers NULL */ + SDL_GetWindowMaximumSize(window, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&w=NULL,&h=NULL)"); + + /* Negative tests for parameter input */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + for (desiredH = -2; desiredH < 2; desiredH++) { + for (desiredW = -2; desiredW < 2; desiredW++) { + if (desiredW <= 0 || desiredH <= 0) { + SDL_SetWindowMaximumSize(window, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); + _checkInvalidParameterError(); + } + } + } - /* Set some 'magic' value for later check that nothing was changed */ - referenceW = SDLTest_RandomSint32(); - referenceH = SDLTest_RandomSint32(); - currentW = referenceW; - currentH = referenceH; - desiredW = SDLTest_RandomSint32(); - desiredH = SDLTest_RandomSint32(); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); - /* Negative tests */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_GetWindowMaximumSize(NULL, ¤tW, ¤tH); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(window=NULL)"); - SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); - _checkInvalidWindowError(); + /* Set some 'magic' value for later check that nothing was changed */ + referenceW = SDLTest_RandomSint32(); + referenceH = SDLTest_RandomSint32(); + currentW = referenceW; + currentH = referenceH; + desiredW = SDLTest_RandomSint32(); + desiredH = SDLTest_RandomSint32(); + + /* Negative tests */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + SDL_GetWindowMaximumSize(NULL, ¤tW, ¤tH); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(window=NULL)"); + SDLTest_AssertCheck( + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); + _checkInvalidWindowError(); - SDL_GetWindowMaximumSize(NULL, NULL, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(NULL, NULL, NULL)"); - _checkInvalidWindowError(); + SDL_GetWindowMaximumSize(NULL, NULL, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(NULL, NULL, NULL)"); + _checkInvalidWindowError(); - SDL_SetWindowMaximumSize(NULL, desiredW, desiredH); - SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(window=NULL)"); - _checkInvalidWindowError(); + SDL_SetWindowMaximumSize(NULL, desiredW, desiredH); + SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(window=NULL)"); + _checkInvalidWindowError(); - return TEST_COMPLETED; + return TEST_COMPLETED; } - /** * @brief Tests call to SDL_SetWindowData and SDL_GetWindowData * * @sa http://wiki.libsdl.org/SDL_SetWindowData * @sa http://wiki.libsdl.org/SDL_GetWindowData */ -int -video_getSetWindowData(void *arg) +int video_getSetWindowData(void *arg) { - int returnValue = TEST_COMPLETED; - const char* title = "video_setGetWindowData Test Window"; - SDL_Window* window; - const char *referenceName = "TestName"; - const char *name = "TestName"; - const char *referenceName2 = "TestName2"; - const char *name2 = "TestName2"; - int datasize; - char *referenceUserdata = NULL; - char *userdata = NULL; - char *referenceUserdata2 = NULL; - char *userdata2 = NULL; - char *result; - int iteration; + int returnValue = TEST_COMPLETED; + const char *title = "video_setGetWindowData Test Window"; + SDL_Window *window; + const char *referenceName = "TestName"; + const char *name = "TestName"; + const char *referenceName2 = "TestName2"; + const char *name2 = "TestName2"; + int datasize; + char *referenceUserdata = NULL; + char *userdata = NULL; + char *referenceUserdata2 = NULL; + char *userdata2 = NULL; + char *result; + int iteration; + + /* Call against new test window */ + window = _createVideoSuiteTestWindow(title); + if (window == NULL) { + return TEST_ABORTED; + } - /* Call against new test window */ - window = _createVideoSuiteTestWindow(title); - if (window == NULL) return TEST_ABORTED; + /* Create testdata */ + datasize = SDLTest_RandomIntegerInRange(1, 32); + referenceUserdata = SDLTest_RandomAsciiStringOfSize(datasize); + if (referenceUserdata == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; + } + userdata = SDL_strdup(referenceUserdata); + if (userdata == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; + } + datasize = SDLTest_RandomIntegerInRange(1, 32); + referenceUserdata2 = SDLTest_RandomAsciiStringOfSize(datasize); + if (referenceUserdata2 == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; + } + userdata2 = SDL_strdup(referenceUserdata2); + if (userdata2 == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; + } - /* Create testdata */ - datasize = SDLTest_RandomIntegerInRange(1, 32); - referenceUserdata = SDLTest_RandomAsciiStringOfSize(datasize); - if (referenceUserdata == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; - } - userdata = SDL_strdup(referenceUserdata); - if (userdata == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; - } - datasize = SDLTest_RandomIntegerInRange(1, 32); - referenceUserdata2 = SDLTest_RandomAsciiStringOfSize(datasize); - if (referenceUserdata2 == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; - } - userdata2 = (char *)SDL_strdup(referenceUserdata2); - if (userdata2 == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; - } + /* Get non-existent data */ + result = (char *)SDL_GetWindowData(window, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - /* Get non-existent data */ - result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - - /* Set data */ - result = (char *)SDL_SetWindowData(window, name, userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - - /* Get data (twice) */ - for (iteration = 1; iteration <= 2; iteration++) { + /* Set data */ + result = (char *)SDL_SetWindowData(window, name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); + + /* Get data (twice) */ + for (iteration = 1; iteration <= 2; iteration++) { + result = (char *)SDL_GetWindowData(window, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [iteration %d]", name, iteration); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + } + + /* Set data again twice */ + for (iteration = 1; iteration <= 2; iteration++) { + result = (char *)SDL_SetWindowData(window, name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); + } + + /* Get data again */ result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [iteration %d]", name, iteration); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again]", name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - } - /* Set data again twice */ - for (iteration = 1; iteration <= 2; iteration++) { - result = (char *)SDL_SetWindowData(window, name, userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration); + /* Set data with new data */ + result = (char *)SDL_SetWindowData(window, name, userdata2); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - } + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - /* Get data again */ - result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again]", name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - - /* Set data with new data */ - result = (char *)SDL_SetWindowData(window, name, userdata2); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - - /* Set data with new data again */ - result = (char *)SDL_SetWindowData(window, name, userdata2); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - - /* Get new data */ - result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - - /* Set data with NULL to clear */ - result = (char *)SDL_SetWindowData(window, name, NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - - /* Set data with NULL to clear again */ - result = (char *)SDL_SetWindowData(window, name, NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - - /* Get non-existent data */ - result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - - /* Get non-existent data new name */ - result = (char *)SDL_GetWindowData(window, name2); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name2); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, "Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2); - - /* Set data (again) */ - result = (char *)SDL_SetWindowData(window, name, userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - - /* Get data (again) */ - result = (char *)SDL_GetWindowData(window, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again, after clear]", name); - SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); - SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - - /* Negative test */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + /* Set data with new data again */ + result = (char *)SDL_SetWindowData(window, name, userdata2); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - /* Set with invalid window */ - result = (char *)SDL_SetWindowData(NULL, name, userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(window=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidWindowError(); + /* Get new data */ + result = (char *)SDL_GetWindowData(window, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - /* Set data with NULL name, valid userdata */ - result = (char *)SDL_SetWindowData(window, NULL, userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); - - /* Set data with empty name, valid userdata */ - result = (char *)SDL_SetWindowData(window, "", userdata); - SDLTest_AssertPass("Call to SDL_SetWindowData(name='')"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); - - /* Set data with NULL name, NULL userdata */ - result = (char *)SDL_SetWindowData(window, NULL, NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL,userdata=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); - - /* Set data with empty name, NULL userdata */ - result = (char *)SDL_SetWindowData(window, "", NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(name='',userdata=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); - - /* Get with invalid window */ - result = (char *)SDL_GetWindowData(NULL, name); - SDLTest_AssertPass("Call to SDL_GetWindowData(window=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidWindowError(); + /* Set data with NULL to clear */ + result = (char *)SDL_SetWindowData(window, name, NULL); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); + + /* Set data with NULL to clear again */ + result = (char *)SDL_SetWindowData(window, name, NULL); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); + + /* Get non-existent data */ + result = (char *)SDL_GetWindowData(window, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - /* Get data with NULL name */ - result = (char *)SDL_GetWindowData(window, NULL); - SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); + /* Get non-existent data new name */ + result = (char *)SDL_GetWindowData(window, name2); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name2); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, "Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2); - /* Get data with empty name */ - result = (char *)SDL_GetWindowData(window, ""); - SDLTest_AssertPass("Call to SDL_GetWindowData(name='')"); - SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); - _checkInvalidParameterError(); + /* Set data (again) */ + result = (char *)SDL_SetWindowData(window, name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Get data (again) */ + result = (char *)SDL_GetWindowData(window, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again, after clear]", name); + SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); + SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - cleanup: - SDL_free(referenceUserdata); - SDL_free(referenceUserdata2); - SDL_free(userdata); - SDL_free(userdata2); + /* Negative test */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + + /* Set with invalid window */ + result = (char *)SDL_SetWindowData(NULL, name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(window=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidWindowError(); + + /* Set data with NULL name, valid userdata */ + result = (char *)SDL_SetWindowData(window, NULL, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); + + /* Set data with empty name, valid userdata */ + result = (char *)SDL_SetWindowData(window, "", userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(name='')"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); + + /* Set data with NULL name, NULL userdata */ + result = (char *)SDL_SetWindowData(window, NULL, NULL); + SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL,userdata=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); + + /* Set data with empty name, NULL userdata */ + result = (char *)SDL_SetWindowData(window, "", NULL); + SDLTest_AssertPass("Call to SDL_SetWindowData(name='',userdata=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); + + /* Get with invalid window */ + result = (char *)SDL_GetWindowData(NULL, name); + SDLTest_AssertPass("Call to SDL_GetWindowData(window=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidWindowError(); + + /* Get data with NULL name */ + result = (char *)SDL_GetWindowData(window, NULL); + SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); + + /* Get data with empty name */ + result = (char *)SDL_GetWindowData(window, ""); + SDLTest_AssertPass("Call to SDL_GetWindowData(name='')"); + SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); + _checkInvalidParameterError(); - return returnValue; + /* Clean up */ + _destroyVideoSuiteTestWindow(window); + +cleanup: + SDL_free(referenceUserdata); + SDL_free(referenceUserdata2); + SDL_free(userdata); + SDL_free(userdata2); + + return returnValue; } /** -* @brief Tests the functionality of the SDL_WINDOWPOS_CENTERED_DISPLAY along with SDL_WINDOW_FULLSCREEN_DESKTOP. -* -* Espeically useful when run on a multi-monitor system with different DPI scales per monitor, -* to test that the window size is maintained when moving between monitors. -*/ -int -video_setWindowCenteredOnDisplay(void *arg) + * @brief Tests the functionality of the SDL_WINDOWPOS_CENTERED_DISPLAY along with SDL_WINDOW_FULLSCREEN_DESKTOP. + * + * Espeically useful when run on a multi-monitor system with different DPI scales per monitor, + * to test that the window size is maintained when moving between monitors. + */ +int video_setWindowCenteredOnDisplay(void *arg) { SDL_Window *window; const char *title = "video_setWindowCenteredOnDisplay Test Window"; @@ -1879,14 +1940,16 @@ video_setWindowCenteredOnDisplay(void *arg) result = SDL_GetDisplayBounds(0 % displayNum, &display0); SDLTest_AssertPass("SDL_GetDisplayBounds()"); SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); - if (result != 0) + if (result != 0) { return TEST_ABORTED; + } result = SDL_GetDisplayBounds(1 % displayNum, &display1); SDLTest_AssertPass("SDL_GetDisplayBounds()"); SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); - if (result != 0) + if (result != 0) { return TEST_ABORTED; + } for (xVariation = 0; xVariation < 2; xVariation++) { for (yVariation = 0; yVariation < 2; yVariation++) { @@ -1983,32 +2046,41 @@ video_setWindowCenteredOnDisplay(void *arg) /* ================= Test References ================== */ /* Video test cases */ -static const SDLTest_TestCaseReference videoTest1 = - { (SDLTest_TestCaseFp)video_enableDisableScreensaver, "video_enableDisableScreensaver", "Enable and disable screenaver while checking state", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest1 = { + (SDLTest_TestCaseFp)video_enableDisableScreensaver, "video_enableDisableScreensaver", "Enable and disable screenaver while checking state", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest2 = - { (SDLTest_TestCaseFp)video_createWindowVariousPositions, "video_createWindowVariousPositions", "Create windows at various locations", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest2 = { + (SDLTest_TestCaseFp)video_createWindowVariousPositions, "video_createWindowVariousPositions", "Create windows at various locations", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest3 = - { (SDLTest_TestCaseFp)video_createWindowVariousSizes, "video_createWindowVariousSizes", "Create windows with various sizes", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest3 = { + (SDLTest_TestCaseFp)video_createWindowVariousSizes, "video_createWindowVariousSizes", "Create windows with various sizes", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest4 = - { (SDLTest_TestCaseFp)video_createWindowVariousFlags, "video_createWindowVariousFlags", "Create windows using various flags", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest4 = { + (SDLTest_TestCaseFp)video_createWindowVariousFlags, "video_createWindowVariousFlags", "Create windows using various flags", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest5 = - { (SDLTest_TestCaseFp)video_getWindowFlags, "video_getWindowFlags", "Get window flags set during SDL_CreateWindow", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest5 = { + (SDLTest_TestCaseFp)video_getWindowFlags, "video_getWindowFlags", "Get window flags set during SDL_CreateWindow", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest6 = - { (SDLTest_TestCaseFp)video_getNumDisplayModes, "video_getNumDisplayModes", "Use SDL_GetNumDisplayModes function to get number of display modes", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest6 = { + (SDLTest_TestCaseFp)video_getNumDisplayModes, "video_getNumDisplayModes", "Use SDL_GetNumDisplayModes function to get number of display modes", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest7 = - { (SDLTest_TestCaseFp)video_getNumDisplayModesNegative, "video_getNumDisplayModesNegative", "Negative tests for SDL_GetNumDisplayModes", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest7 = { + (SDLTest_TestCaseFp)video_getNumDisplayModesNegative, "video_getNumDisplayModesNegative", "Negative tests for SDL_GetNumDisplayModes", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest8 = - { (SDLTest_TestCaseFp)video_getClosestDisplayModeCurrentResolution, "video_getClosestDisplayModeCurrentResolution", "Use function to get closes match to requested display mode for current resolution", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest8 = { + (SDLTest_TestCaseFp)video_getClosestDisplayModeCurrentResolution, "video_getClosestDisplayModeCurrentResolution", "Use function to get closes match to requested display mode for current resolution", TEST_ENABLED +}; -static const SDLTest_TestCaseReference videoTest9 = - { (SDLTest_TestCaseFp)video_getClosestDisplayModeRandomResolution, "video_getClosestDisplayModeRandomResolution", "Use function to get closes match to requested display mode for random resolution", TEST_ENABLED }; +static const SDLTest_TestCaseReference videoTest9 = { + (SDLTest_TestCaseFp)video_getClosestDisplayModeRandomResolution, "video_getClosestDisplayModeRandomResolution", "Use function to get closes match to requested display mode for random resolution", TEST_ENABLED +}; static const SDLTest_TestCaseReference videoTest10 = { (SDLTest_TestCaseFp)video_getWindowBrightness, "video_getWindowBrightness", "Get window brightness", TEST_ENABLED }; @@ -2056,7 +2128,7 @@ static const SDLTest_TestCaseReference videoTest24 = { (SDLTest_TestCaseFp) video_setWindowCenteredOnDisplay, "video_setWindowCenteredOnDisplay", "Checks using SDL_WINDOWPOS_CENTERED_DISPLAY centers the window on a display", TEST_ENABLED }; /* Sequence of Video test cases */ -static const SDLTest_TestCaseReference *videoTests[] = { +static const SDLTest_TestCaseReference *videoTests[] = { &videoTest1, &videoTest2, &videoTest3, &videoTest4, &videoTest5, &videoTest6, &videoTest7, &videoTest8, &videoTest9, &videoTest10, &videoTest11, &videoTest12, &videoTest13, &videoTest14, &videoTest15, &videoTest16, &videoTest17, diff --git a/modules/SDL2/test/testbounds.c b/modules/SDL2/test/testbounds.c index a64cd1a..42213f5 100644 --- a/modules/SDL2/test/testbounds.c +++ b/modules/SDL2/test/testbounds.c @@ -23,7 +23,7 @@ int main(int argc, char **argv) total = SDL_GetNumVideoDisplays(); for (i = 0; i < total; i++) { - SDL_Rect bounds = { -1,-1,-1,-1 }, usable = { -1,-1,-1,-1 }; + SDL_Rect bounds = { -1, -1, -1, -1 }, usable = { -1, -1, -1, -1 }; SDL_GetDisplayBounds(i, &bounds); SDL_GetDisplayUsableBounds(i, &usable); SDL_Log("Display #%d ('%s'): bounds={(%d,%d),%dx%d}, usable={(%d,%d),%dx%d}", diff --git a/modules/SDL2/test/testcustomcursor.c b/modules/SDL2/test/testcustomcursor.c index 54ef708..dc1c371 100644 --- a/modules/SDL2/test/testcustomcursor.c +++ b/modules/SDL2/test/testcustomcursor.c @@ -22,59 +22,58 @@ /* Stolen from the mailing list */ /* Creates a new mouse cursor from an XPM */ - /* XPM */ static const char *arrow[] = { - /* width height num_colors chars_per_pixel */ - " 32 32 3 1", - /* colors */ - "X c #000000", - ". c #ffffff", - " c None", - /* pixels */ - "X ", - "XX ", - "X.X ", - "X..X ", - "X...X ", - "X....X ", - "X.....X ", - "X......X ", - "X.......X ", - "X........X ", - "X.....XXXXX ", - "X..X..X ", - "X.X X..X ", - "XX X..X ", - "X X..X ", - " X..X ", - " X..X ", - " X..X ", - " XX ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "0,0" -}; - -static SDL_Cursor* + /* width height num_colors chars_per_pixel */ + " 32 32 3 1", + /* colors */ + "X c #000000", + ". c #ffffff", + " c None", + /* pixels */ + "X ", + "XX ", + "X.X ", + "X..X ", + "X...X ", + "X....X ", + "X.....X ", + "X......X ", + "X.......X ", + "X........X ", + "X.....XXXXX ", + "X..X..X ", + "X.X X..X ", + "XX X..X ", + "X X..X ", + " X..X ", + " X..X ", + " X..X ", + " XX ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "0,0" +}; + +static SDL_Cursor * init_color_cursor(const char *file) { SDL_Cursor *cursor = NULL; SDL_Surface *surface = SDL_LoadBMP(file); if (surface) { if (surface->format->palette) { - SDL_SetColorKey(surface, 1, *(Uint8 *) surface->pixels); + SDL_SetColorKey(surface, 1, *(Uint8 *)surface->pixels); } else { switch (surface->format->BitsPerPixel) { case 15: @@ -97,45 +96,46 @@ init_color_cursor(const char *file) return cursor; } -static SDL_Cursor* +static SDL_Cursor * init_system_cursor(const char *image[]) { - int i, row, col; - Uint8 data[4*32]; - Uint8 mask[4*32]; - int hot_x, hot_y; - - i = -1; - for (row=0; row<32; ++row) { - for (col=0; col<32; ++col) { - if (col % 8) { - data[i] <<= 1; - mask[i] <<= 1; - } else { - ++i; - data[i] = mask[i] = 0; - } - switch (image[4+row][col]) { - case 'X': - data[i] |= 0x01; - mask[i] |= 0x01; - break; - case '.': - mask[i] |= 0x01; - break; - case ' ': - break; - } + int i, row, col; + Uint8 data[4 * 32]; + Uint8 mask[4 * 32]; + int hot_x = 0; + int hot_y = 0; + + i = -1; + for (row = 0; row < 32; ++row) { + for (col = 0; col < 32; ++col) { + if (col % 8) { + data[i] <<= 1; + mask[i] <<= 1; + } else { + ++i; + data[i] = mask[i] = 0; + } + switch (image[4 + row][col]) { + case 'X': + data[i] |= 0x01; + mask[i] |= 0x01; + break; + case '.': + mask[i] |= 0x01; + break; + case ' ': + break; + } + } } - } - SDL_sscanf(image[4+row], "%d,%d", &hot_x, &hot_y); - return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y); + (void)SDL_sscanf(image[4 + row], "%d,%d", &hot_x, &hot_y); + return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y); } static SDLTest_CommonState *state; int done; -static SDL_Cursor *cursors[1+SDL_NUM_SYSTEM_CURSORS]; -static SDL_SystemCursor cursor_types[1+SDL_NUM_SYSTEM_CURSORS]; +static SDL_Cursor *cursors[1 + SDL_NUM_SYSTEM_CURSORS]; +static SDL_SystemCursor cursor_types[1 + SDL_NUM_SYSTEM_CURSORS]; static int num_cursors; static int current_cursor; static int show_cursor; @@ -148,8 +148,7 @@ quit(int rc) exit(rc); } -void -loop() +void loop() { int i; SDL_Event event; @@ -170,20 +169,48 @@ loop() SDL_SetCursor(cursors[current_cursor]); switch ((int)cursor_types[current_cursor]) { - case (SDL_SystemCursor)-1: SDL_Log("Custom cursor"); break; - case SDL_SYSTEM_CURSOR_ARROW: SDL_Log("Arrow"); break; - case SDL_SYSTEM_CURSOR_IBEAM: SDL_Log("I-beam"); break; - case SDL_SYSTEM_CURSOR_WAIT: SDL_Log("Wait"); break; - case SDL_SYSTEM_CURSOR_CROSSHAIR: SDL_Log("Crosshair"); break; - case SDL_SYSTEM_CURSOR_WAITARROW: SDL_Log("Small wait cursor (or Wait if not available)"); break; - case SDL_SYSTEM_CURSOR_SIZENWSE: SDL_Log("Double arrow pointing northwest and southeast"); break; - case SDL_SYSTEM_CURSOR_SIZENESW: SDL_Log("Double arrow pointing northeast and southwest"); break; - case SDL_SYSTEM_CURSOR_SIZEWE: SDL_Log("Double arrow pointing west and east"); break; - case SDL_SYSTEM_CURSOR_SIZENS: SDL_Log("Double arrow pointing north and south"); break; - case SDL_SYSTEM_CURSOR_SIZEALL: SDL_Log("Four pointed arrow pointing north, south, east, and west"); break; - case SDL_SYSTEM_CURSOR_NO: SDL_Log("Slashed circle or crossbones"); break; - case SDL_SYSTEM_CURSOR_HAND: SDL_Log("Hand"); break; - default: SDL_Log("UNKNOWN CURSOR TYPE, FIX THIS PROGRAM."); break; + case (SDL_SystemCursor)-1: + SDL_Log("Custom cursor"); + break; + case SDL_SYSTEM_CURSOR_ARROW: + SDL_Log("Arrow"); + break; + case SDL_SYSTEM_CURSOR_IBEAM: + SDL_Log("I-beam"); + break; + case SDL_SYSTEM_CURSOR_WAIT: + SDL_Log("Wait"); + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + SDL_Log("Crosshair"); + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + SDL_Log("Small wait cursor (or Wait if not available)"); + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + SDL_Log("Double arrow pointing northwest and southeast"); + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + SDL_Log("Double arrow pointing northeast and southwest"); + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + SDL_Log("Double arrow pointing west and east"); + break; + case SDL_SYSTEM_CURSOR_SIZENS: + SDL_Log("Double arrow pointing north and south"); + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + SDL_Log("Four pointed arrow pointing north, south, east, and west"); + break; + case SDL_SYSTEM_CURSOR_NO: + SDL_Log("Slashed circle or crossbones"); + break; + case SDL_SYSTEM_CURSOR_HAND: + SDL_Log("Hand"); + break; + default: + SDL_Log("UNKNOWN CURSOR TYPE, FIX THIS PROGRAM."); + break; } } else { @@ -192,7 +219,7 @@ loop() } } } - + for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; SDL_RenderClear(renderer); @@ -205,8 +232,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; const char *color_cursor = NULL; @@ -216,7 +242,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -293,7 +319,7 @@ main(int argc, char *argv[]) quit(0); /* keep the compiler happy ... */ - return(0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testdisplayinfo.c b/modules/SDL2/test/testdisplayinfo.c index 633daa7..66cc5d8 100644 --- a/modules/SDL2/test/testdisplayinfo.c +++ b/modules/SDL2/test/testdisplayinfo.c @@ -20,16 +20,16 @@ static void print_mode(const char *prefix, const SDL_DisplayMode *mode) { - if (!mode) + if (mode == NULL) { return; + } SDL_Log("%s: fmt=%s w=%d h=%d refresh=%d\n", prefix, SDL_GetPixelFormatName(mode->format), mode->w, mode->h, mode->refresh_rate); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_DisplayMode mode; int num_displays, dpy; @@ -80,7 +80,7 @@ main(int argc, char *argv[]) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " MODE %d: failed to query (%s)\n", m, SDL_GetError()); } else { char prefix[64]; - SDL_snprintf(prefix, sizeof (prefix), " MODE %d", m); + (void)SDL_snprintf(prefix, sizeof(prefix), " MODE %d", m); print_mode(prefix, &mode); } } diff --git a/modules/SDL2/test/testdraw2.c b/modules/SDL2/test/testdraw2.c index d192892..f660c28 100644 --- a/modules/SDL2/test/testdraw2.c +++ b/modules/SDL2/test/testdraw2.c @@ -37,8 +37,7 @@ static const Uint32 fps_check_delay = 5000; int done; -void -DrawPoints(SDL_Renderer * renderer) +void DrawPoints(SDL_Renderer *renderer) { int i; int x, y; @@ -71,8 +70,8 @@ DrawPoints(SDL_Renderer * renderer) cycle_direction = -cycle_direction; } } - SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color, - (Uint8) current_color, (Uint8) current_alpha); + SDL_SetRenderDrawColor(renderer, 255, (Uint8)current_color, + (Uint8)current_color, (Uint8)current_alpha); x = rand() % viewport.w; y = rand() % viewport.h; @@ -80,8 +79,7 @@ DrawPoints(SDL_Renderer * renderer) } } -void -DrawLines(SDL_Renderer * renderer) +void DrawLines(SDL_Renderer *renderer) { int i; int x1, y1, x2, y2; @@ -114,8 +112,8 @@ DrawLines(SDL_Renderer * renderer) cycle_direction = -cycle_direction; } } - SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color, - (Uint8) current_color, (Uint8) current_alpha); + SDL_SetRenderDrawColor(renderer, 255, (Uint8)current_color, + (Uint8)current_color, (Uint8)current_alpha); if (i == 0) { SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); @@ -123,17 +121,16 @@ DrawLines(SDL_Renderer * renderer) SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2); SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1); } else { - x1 = (rand() % (viewport.w*2)) - viewport.w; - x2 = (rand() % (viewport.w*2)) - viewport.w; - y1 = (rand() % (viewport.h*2)) - viewport.h; - y2 = (rand() % (viewport.h*2)) - viewport.h; + x1 = (rand() % (viewport.w * 2)) - viewport.w; + x2 = (rand() % (viewport.w * 2)) - viewport.w; + y1 = (rand() % (viewport.h * 2)) - viewport.h; + y2 = (rand() % (viewport.h * 2)) - viewport.h; SDL_RenderDrawLine(renderer, x1, y1, x2, y2); } } } -void -DrawRects(SDL_Renderer * renderer) +void DrawRects(SDL_Renderer *renderer) { int i; SDL_Rect rect; @@ -166,19 +163,18 @@ DrawRects(SDL_Renderer * renderer) cycle_direction = -cycle_direction; } } - SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color, - (Uint8) current_color, (Uint8) current_alpha); + SDL_SetRenderDrawColor(renderer, 255, (Uint8)current_color, + (Uint8)current_color, (Uint8)current_alpha); rect.w = rand() % (viewport.h / 2); rect.h = rand() % (viewport.h / 2); - rect.x = (rand() % (viewport.w*2) - viewport.w) - (rect.w / 2); - rect.y = (rand() % (viewport.h*2) - viewport.h) - (rect.h / 2); + rect.x = (rand() % (viewport.w * 2) - viewport.w) - (rect.w / 2); + rect.y = (rand() % (viewport.h * 2) - viewport.h) - (rect.h / 2); SDL_RenderFillRect(renderer, &rect); } } -void -loop() +void loop() { Uint32 now; int i; @@ -190,8 +186,9 @@ loop() } for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); @@ -211,16 +208,14 @@ loop() if (SDL_TICKS_PASSED(now, next_fps_check)) { /* Print out some timing information */ const Uint32 then = next_fps_check - fps_check_delay; - const double fps = ((double) frames * 1000) / (now - then); + const double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); next_fps_check = now + fps_check_delay; frames = 0; } - } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; @@ -232,7 +227,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -269,12 +264,13 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - static const char *options[] = { - "[--blend none|blend|add|mod]", + static const char *options[] = { + "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", "[num_objects]", - NULL }; + NULL + }; SDLTest_CommonLogUsage(state, argv[0], options); return 1; } @@ -307,7 +303,6 @@ main(int argc, char *argv[]) } #endif - SDLTest_CommonQuit(state); return 0; diff --git a/modules/SDL2/test/testdrawchessboard.c b/modules/SDL2/test/testdrawchessboard.c index bed22bb..8ff21a4 100644 --- a/modules/SDL2/test/testdrawchessboard.c +++ b/modules/SDL2/test/testdrawchessboard.c @@ -28,25 +28,22 @@ SDL_Renderer *renderer; SDL_Surface *surface; int done; -void -DrawChessBoard() +void DrawChessBoard() { - int row = 0,column = 0,x = 0; + int row = 0, column = 0, x = 0; SDL_Rect rect, darea; /* Get the Size of drawing surface */ SDL_RenderGetViewport(renderer, &darea); - for( ; row < 8; row++) - { - column = row%2; + for (; row < 8; row++) { + column = row % 2; x = column; - for( ; column < 4+(row%2); column++) - { + for (; column < 4 + (row % 2); column++) { SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF); - rect.w = darea.w/8; - rect.h = darea.h/8; + rect.w = darea.w / 8; + rect.h = darea.h / 8; rect.x = x * rect.w; rect.y = row * rect.h; x = x + 2; @@ -55,25 +52,24 @@ DrawChessBoard() } } -void -loop() +void loop() { SDL_Event e; while (SDL_PollEvent(&e)) { - - /* Re-create when window has been resized */ - if ((e.type == SDL_WINDOWEVENT) && (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)) { - SDL_DestroyRenderer(renderer); + /* Re-create when window has been resized */ + if ((e.type == SDL_WINDOWEVENT) && (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)) { - surface = SDL_GetWindowSurface(window); - renderer = SDL_CreateSoftwareRenderer(surface); - /* Clear the rendering surface with the specified color */ - SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); - SDL_RenderClear(renderer); - } + SDL_DestroyRenderer(renderer); - if (e.type == SDL_QUIT) { + surface = SDL_GetWindowSurface(window); + renderer = SDL_CreateSoftwareRenderer(surface); + /* Clear the rendering surface with the specified color */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); + SDL_RenderClear(renderer); + } + + if (e.type == SDL_QUIT) { done = 1; #ifdef __EMSCRIPTEN__ emscripten_cancel_main_loop(); @@ -97,32 +93,27 @@ loop() SDL_UpdateWindowSurface(window); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); /* Initialize SDL */ - if(SDL_Init(SDL_INIT_VIDEO) != 0) - { + if (SDL_Init(SDL_INIT_VIDEO) != 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init fail : %s\n", SDL_GetError()); return 1; } - /* Create window and renderer for given surface */ window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_RESIZABLE); - if(!window) - { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError()); + if (window == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n", SDL_GetError()); return 1; } surface = SDL_GetWindowSurface(window); renderer = SDL_CreateSoftwareRenderer(surface); - if(!renderer) - { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError()); + if (renderer == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n", SDL_GetError()); return 1; } @@ -130,7 +121,6 @@ main(int argc, char *argv[]) SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); SDL_RenderClear(renderer); - /* Draw the Image on rendering surface */ done = 0; #ifdef __EMSCRIPTEN__ diff --git a/modules/SDL2/test/testdropfile.c b/modules/SDL2/test/testdropfile.c index ef5256f..b806333 100644 --- a/modules/SDL2/test/testdropfile.c +++ b/modules/SDL2/test/testdropfile.c @@ -25,8 +25,7 @@ quit(int rc) exit(rc); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i, done; SDL_Event event; @@ -36,7 +35,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } @@ -76,13 +75,13 @@ main(int argc, char *argv[]) /* Check for events */ while (SDL_PollEvent(&event)) { if (event.type == SDL_DROPBEGIN) { - SDL_Log("Drop beginning on window %u", (unsigned int) event.drop.windowID); + SDL_Log("Drop beginning on window %u", (unsigned int)event.drop.windowID); } else if (event.type == SDL_DROPCOMPLETE) { - SDL_Log("Drop complete on window %u", (unsigned int) event.drop.windowID); + SDL_Log("Drop complete on window %u", (unsigned int)event.drop.windowID); } else if ((event.type == SDL_DROPFILE) || (event.type == SDL_DROPTEXT)) { const char *typestr = (event.type == SDL_DROPFILE) ? "File" : "Text"; char *dropped_filedir = event.drop.file; - SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int) event.drop.windowID, dropped_filedir); + SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int)event.drop.windowID, dropped_filedir); /* Normally you'd have to do this, but this is freed in SDLTest_CommonEvent() */ /*SDL_free(dropped_filedir);*/ } @@ -93,7 +92,7 @@ main(int argc, char *argv[]) quit(0); /* keep the compiler happy ... */ - return(0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testerror.c b/modules/SDL2/test/testerror.c index f24859f..f3f11b6 100644 --- a/modules/SDL2/test/testerror.c +++ b/modules/SDL2/test/testerror.c @@ -32,17 +32,16 @@ ThreadFunc(void *data) { /* Set the child thread error string */ SDL_SetError("Thread %s (%lu) had a problem: %s", - (char *) data, SDL_ThreadID(), "nevermind"); + (char *)data, SDL_ThreadID(), "nevermind"); while (alive) { - SDL_Log("Thread '%s' is alive!\n", (char *) data); + SDL_Log("Thread '%s' is alive!\n", (char *)data); SDL_Delay(1 * 1000); } SDL_Log("Child thread error string: %s\n", SDL_GetError()); - return (0); + return 0; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Thread *thread; @@ -52,7 +51,7 @@ main(int argc, char *argv[]) /* Load the SDL library */ if (SDL_Init(0) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } /* Set the error value for the main thread */ @@ -78,5 +77,5 @@ main(int argc, char *argv[]) SDL_Log("Main thread error string: %s\n", SDL_GetError()); SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testevdev.c b/modules/SDL2/test/testevdev.c index f504f83..e615791 100644 --- a/modules/SDL2/test/testevdev.c +++ b/modules/SDL2/test/testevdev.c @@ -31,10 +31,11 @@ static const struct { int code; const char *name; -} device_classes[] = -{ -#define CLS(x) \ - { SDL_UDEV_DEVICE_ ## x, #x } +} device_classes[] = { +#define CLS(x) \ + { \ + SDL_UDEV_DEVICE_##x, #x \ + } CLS(MOUSE), CLS(KEYBOARD), CLS(JOYSTICK), @@ -48,18 +49,18 @@ static const struct typedef struct { - const char *name; - uint16_t bus_type; - uint16_t vendor_id; - uint16_t product_id; - uint16_t version; - uint8_t ev[(EV_MAX + 1) / 8]; - uint8_t keys[(KEY_MAX + 1) / 8]; - uint8_t abs[(ABS_MAX + 1) / 8]; - uint8_t rel[(REL_MAX + 1) / 8]; - uint8_t ff[(FF_MAX + 1) / 8]; - uint8_t props[INPUT_PROP_MAX / 8]; - int expected; + const char *name; + uint16_t bus_type; + uint16_t vendor_id; + uint16_t product_id; + uint16_t version; + uint8_t ev[(EV_MAX + 1) / 8]; + uint8_t keys[(KEY_MAX + 1) / 8]; + uint8_t abs[(ABS_MAX + 1) / 8]; + uint8_t rel[(REL_MAX + 1) / 8]; + uint8_t ff[(FF_MAX + 1) / 8]; + uint8_t props[INPUT_PROP_MAX / 8]; + int expected; } GuessTest; /* @@ -73,10 +74,11 @@ typedef struct */ #define ZEROx4 0, 0, 0, 0 #define ZEROx8 ZEROx4, ZEROx4 -#define FFx4 0xff, 0xff, 0xff, 0xff -#define FFx8 FFx4, FFx4 +#define FFx4 0xff, 0xff, 0xff, 0xff +#define FFx8 FFx4, FFx4 /* Test-cases derived from real devices or from Linux kernel source */ +/* *INDENT-OFF* */ /* clang-format off */ static const GuessTest guess_tests[] = { { @@ -934,6 +936,7 @@ static const GuessTest guess_tests[] = .expected = SDL_UDEV_DEVICE_UNKNOWN, } }; +/* *INDENT-ON* */ /* clang-format on */ /* The Linux kernel provides capability info in EVIOCGBIT and in /sys * as an array of unsigned long in native byte order, rather than an array @@ -950,7 +953,7 @@ static const GuessTest guess_tests[] = * an appropriate byteswapping function for the architecture's word size. */ SDL_COMPILE_TIME_ASSERT(sizeof_long, sizeof(unsigned long) == 4 || sizeof(unsigned long) == 8); #define SwapLongLE(X) \ - ((sizeof(unsigned long) == 4) ? SDL_SwapLE32(X) : SDL_SwapLE64(X)) + ((sizeof(unsigned long) == 4) ? SDL_SwapLE32(X) : SDL_SwapLE64(X)) static int run_test(void) @@ -962,7 +965,8 @@ run_test(void) const GuessTest *t = &guess_tests[i]; size_t j; int actual; - struct { + struct + { unsigned long ev[NBITS(EV_MAX)]; unsigned long abs[NBITS(ABS_MAX)]; unsigned long keys[NBITS(KEY_MAX)]; @@ -998,8 +1002,7 @@ run_test(void) if (actual == t->expected) { printf("\tOK\n"); - } - else { + } else { printf("\tExpected 0x%08x\n", t->expected); for (j = 0; device_classes[j].code != 0; j++) { @@ -1034,8 +1037,7 @@ run_test(void) #endif -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { return run_test() ? 0 : 1; } diff --git a/modules/SDL2/test/testfile.c b/modules/SDL2/test/testfile.c index 0ee025f..40d52ca 100644 --- a/modules/SDL2/test/testfile.c +++ b/modules/SDL2/test/testfile.c @@ -13,27 +13,26 @@ /* sanity tests on SDL_rwops.c (usefull for alternative implementations of stdio rwops) */ /* quiet windows compiler warnings */ +#if defined(_MSC_VER) && !defined(_CRT_NONSTDC_NO_WARNINGS) #define _CRT_NONSTDC_NO_WARNINGS +#endif +#include #include - #ifndef _MSC_VER #include #endif #include "SDL.h" - -#include - /* WARNING ! those 2 files will be destroyed by this test program */ #ifdef __IPHONEOS__ #define FBASENAME1 "../Documents/sdldata1" /* this file will be created during tests */ #define FBASENAME2 "../Documents/sdldata2" /* this file should not exist before starting test */ #else -#define FBASENAME1 "sdldata1" /* this file will be created during tests */ -#define FBASENAME2 "sdldata2" /* this file should not exist before starting test */ +#define FBASENAME1 "sdldata1" /* this file will be created during tests */ +#define FBASENAME2 "sdldata2" /* this file should not exist before starting test */ #endif #ifndef NULL @@ -48,22 +47,19 @@ cleanup(void) } static void -rwops_error_quit(unsigned line, SDL_RWops * rwops) +rwops_error_quit(unsigned line, SDL_RWops *rwops) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "testfile.c(%d): failed\n", line); if (rwops) { - rwops->close(rwops); /* This calls SDL_FreeRW(rwops); */ + rwops->close(rwops); /* This calls SDL_FreeRW(rwops); */ } cleanup(); - exit(1); /* quit with rwops error (test failed) */ + exit(1); /* quit with rwops error (test failed) */ } -#define RWOP_ERR_QUIT(x) rwops_error_quit( __LINE__, (x) ) +#define RWOP_ERR_QUIT(x) rwops_error_quit(__LINE__, (x)) - - -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_RWops *rwops = NULL; char test_buf[30]; @@ -73,211 +69,289 @@ main(int argc, char *argv[]) cleanup(); -/* test 1 : basic argument test: all those calls to SDL_RWFromFile should fail */ + /* test 1 : basic argument test: all those calls to SDL_RWFromFile should fail */ rwops = SDL_RWFromFile(NULL, NULL); - if (rwops) + if (rwops) { RWOP_ERR_QUIT(rwops); + } rwops = SDL_RWFromFile(NULL, "ab+"); - if (rwops) + if (rwops) { RWOP_ERR_QUIT(rwops); + } rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); - if (rwops) + if (rwops) { RWOP_ERR_QUIT(rwops); + } rwops = SDL_RWFromFile("something", ""); - if (rwops) + if (rwops) { RWOP_ERR_QUIT(rwops); + } rwops = SDL_RWFromFile("something", NULL); - if (rwops) + if (rwops) { RWOP_ERR_QUIT(rwops); + } SDL_Log("test1 OK\n"); -/* test 2 : check that inexistent file is not successfully opened/created when required */ -/* modes : r, r+ imply that file MUST exist - modes : a, a+, w, w+ checks that it succeeds (file may not exists) + /* test 2 : check that inexistent file is not successfully opened/created when required */ + /* modes : r, r+ imply that file MUST exist + modes : a, a+, w, w+ checks that it succeeds (file may not exists) - */ - rwops = SDL_RWFromFile(FBASENAME2, "rb"); /* this file doesn't exist that call must fail */ - if (rwops) + */ + rwops = SDL_RWFromFile(FBASENAME2, "rb"); /* this file doesn't exist that call must fail */ + if (rwops) { RWOP_ERR_QUIT(rwops); - rwops = SDL_RWFromFile(FBASENAME2, "rb+"); /* this file doesn't exist that call must fail */ - if (rwops) + } + rwops = SDL_RWFromFile(FBASENAME2, "rb+"); /* this file doesn't exist that call must fail */ + if (rwops) { RWOP_ERR_QUIT(rwops); + } rwops = SDL_RWFromFile(FBASENAME2, "wb"); - if (!rwops) + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); unlink(FBASENAME2); rwops = SDL_RWFromFile(FBASENAME2, "wb+"); - if (!rwops) + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); unlink(FBASENAME2); rwops = SDL_RWFromFile(FBASENAME2, "ab"); - if (!rwops) + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); unlink(FBASENAME2); rwops = SDL_RWFromFile(FBASENAME2, "ab+"); - if (!rwops) + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); unlink(FBASENAME2); SDL_Log("test2 OK\n"); -/* test 3 : creation, writing , reading, seeking, - test : w mode, r mode, w+ mode - */ - rwops = SDL_RWFromFile(FBASENAME1, "wb"); /* write only */ - if (!rwops) + /* test 3 : creation, writing , reading, seeking, + test : w mode, r mode, w+ mode + */ + rwops = SDL_RWFromFile(FBASENAME1, "wb"); /* write only */ + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->write(rwops, "1234567890", 10, 1)) + } + if (1 != rwops->write(rwops, "1234567890", 10, 1)) { RWOP_ERR_QUIT(rwops); - if (10 != rwops->write(rwops, "1234567890", 1, 10)) + } + if (10 != rwops->write(rwops, "1234567890", 1, 10)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->write(rwops, "1234567", 1, 7)) + } + if (7 != rwops->write(rwops, "1234567", 1, 7)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 1, 1)) - RWOP_ERR_QUIT(rwops); /* we are in write only mode */ + } + if (0 != rwops->read(rwops, test_buf, 1, 1)) { + RWOP_ERR_QUIT(rwops); /* we are in write only mode */ + } + rwops->close(rwops); - rwops = SDL_RWFromFile(FBASENAME1, "rb"); /* read mode, file must exists */ - if (!rwops) + rwops = SDL_RWFromFile(FBASENAME1, "rb"); /* read mode, file must exists */ + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) + } + if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->read(rwops, test_buf, 1, 7)) + } + if (7 != rwops->read(rwops, test_buf, 1, 7)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "1234567", 7)) + } + if (SDL_memcmp(test_buf, "1234567", 7) != 0) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 1, 1)) + } + if (0 != rwops->read(rwops, test_buf, 1, 1)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 10, 100)) + } + if (0 != rwops->read(rwops, test_buf, 10, 100)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) + } + if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) { RWOP_ERR_QUIT(rwops); - if (2 != rwops->read(rwops, test_buf, 10, 3)) + } + if (2 != rwops->read(rwops, test_buf, 10, 3)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "12345678901234567890", 20)) + } + if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->write(rwops, test_buf, 1, 1)) - RWOP_ERR_QUIT(rwops); /* readonly mode */ + } + if (0 != rwops->write(rwops, test_buf, 1, 1)) { + RWOP_ERR_QUIT(rwops); /* readonly mode */ + } + rwops->close(rwops); -/* test 3: same with w+ mode */ - rwops = SDL_RWFromFile(FBASENAME1, "wb+"); /* write + read + truncation */ - if (!rwops) + /* test 3: same with w+ mode */ + rwops = SDL_RWFromFile(FBASENAME1, "wb+"); /* write + read + truncation */ + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->write(rwops, "1234567890", 10, 1)) + } + if (1 != rwops->write(rwops, "1234567890", 10, 1)) { RWOP_ERR_QUIT(rwops); - if (10 != rwops->write(rwops, "1234567890", 1, 10)) + } + if (10 != rwops->write(rwops, "1234567890", 1, 10)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->write(rwops, "1234567", 1, 7)) + } + if (7 != rwops->write(rwops, "1234567", 1, 7)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->read(rwops, test_buf, 1, 1)) - RWOP_ERR_QUIT(rwops); /* we are in read/write mode */ - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (1 != rwops->read(rwops, test_buf, 1, 1)) { + RWOP_ERR_QUIT(rwops); /* we are in read/write mode */ + } + + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) + } + if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->read(rwops, test_buf, 1, 7)) + } + if (7 != rwops->read(rwops, test_buf, 1, 7)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "1234567", 7)) + } + if (SDL_memcmp(test_buf, "1234567", 7) != 0) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 1, 1)) + } + if (0 != rwops->read(rwops, test_buf, 1, 1)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 10, 100)) + } + if (0 != rwops->read(rwops, test_buf, 10, 100)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) + } + if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) { RWOP_ERR_QUIT(rwops); - if (2 != rwops->read(rwops, test_buf, 10, 3)) + } + if (2 != rwops->read(rwops, test_buf, 10, 3)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "12345678901234567890", 20)) + } + if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); SDL_Log("test3 OK\n"); -/* test 4: same in r+ mode */ - rwops = SDL_RWFromFile(FBASENAME1, "rb+"); /* write + read + file must exists, no truncation */ - if (!rwops) + /* test 4: same in r+ mode */ + rwops = SDL_RWFromFile(FBASENAME1, "rb+"); /* write + read + file must exists, no truncation */ + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->write(rwops, "1234567890", 10, 1)) + } + if (1 != rwops->write(rwops, "1234567890", 10, 1)) { RWOP_ERR_QUIT(rwops); - if (10 != rwops->write(rwops, "1234567890", 1, 10)) + } + if (10 != rwops->write(rwops, "1234567890", 1, 10)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->write(rwops, "1234567", 1, 7)) + } + if (7 != rwops->write(rwops, "1234567", 1, 7)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->read(rwops, test_buf, 1, 1)) - RWOP_ERR_QUIT(rwops); /* we are in read/write mode */ - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (1 != rwops->read(rwops, test_buf, 1, 1)) { + RWOP_ERR_QUIT(rwops); /* we are in read/write mode */ + } + + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) + } + if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->read(rwops, test_buf, 1, 7)) + } + if (7 != rwops->read(rwops, test_buf, 1, 7)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "1234567", 7)) + } + if (SDL_memcmp(test_buf, "1234567", 7) != 0) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 1, 1)) + } + if (0 != rwops->read(rwops, test_buf, 1, 1)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 10, 100)) + } + if (0 != rwops->read(rwops, test_buf, 10, 100)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) + } + if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) { RWOP_ERR_QUIT(rwops); - if (2 != rwops->read(rwops, test_buf, 10, 3)) + } + if (2 != rwops->read(rwops, test_buf, 10, 3)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "12345678901234567890", 20)) + } + if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); SDL_Log("test4 OK\n"); -/* test5 : append mode */ - rwops = SDL_RWFromFile(FBASENAME1, "ab+"); /* write + read + append */ - if (!rwops) + /* test5 : append mode */ + rwops = SDL_RWFromFile(FBASENAME1, "ab+"); /* write + read + append */ + if (rwops == NULL) { RWOP_ERR_QUIT(rwops); - if (1 != rwops->write(rwops, "1234567890", 10, 1)) + } + if (1 != rwops->write(rwops, "1234567890", 10, 1)) { RWOP_ERR_QUIT(rwops); - if (10 != rwops->write(rwops, "1234567890", 1, 10)) + } + if (10 != rwops->write(rwops, "1234567890", 1, 10)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->write(rwops, "1234567", 1, 7)) + } + if (7 != rwops->write(rwops, "1234567", 1, 7)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); + } - if (1 != rwops->read(rwops, test_buf, 1, 1)) + if (1 != rwops->read(rwops, test_buf, 1, 1)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + } + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); + } - if (20 + 27 != rwops->seek(rwops, -7, RW_SEEK_END)) + if (20 + 27 != rwops->seek(rwops, -7, RW_SEEK_END)) { RWOP_ERR_QUIT(rwops); - if (7 != rwops->read(rwops, test_buf, 1, 7)) + } + if (7 != rwops->read(rwops, test_buf, 1, 7)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "1234567", 7)) + } + if (SDL_memcmp(test_buf, "1234567", 7) != 0) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 1, 1)) + } + if (0 != rwops->read(rwops, test_buf, 1, 1)) { RWOP_ERR_QUIT(rwops); - if (0 != rwops->read(rwops, test_buf, 10, 100)) + } + if (0 != rwops->read(rwops, test_buf, 10, 100)) { RWOP_ERR_QUIT(rwops); + } - if (27 != rwops->seek(rwops, -27, RW_SEEK_CUR)) + if (27 != rwops->seek(rwops, -27, RW_SEEK_CUR)) { RWOP_ERR_QUIT(rwops); + } - if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) + if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) { RWOP_ERR_QUIT(rwops); - if (3 != rwops->read(rwops, test_buf, 10, 3)) + } + if (3 != rwops->read(rwops, test_buf, 10, 3)) { RWOP_ERR_QUIT(rwops); - if (SDL_memcmp(test_buf, "123456789012345678901234567123", 30)) + } + if (SDL_memcmp(test_buf, "123456789012345678901234567123", 30) != 0) { RWOP_ERR_QUIT(rwops); + } rwops->close(rwops); SDL_Log("test5 OK\n"); cleanup(); - return 0; /* all ok */ + return 0; /* all ok */ } diff --git a/modules/SDL2/test/testfilesystem.c b/modules/SDL2/test/testfilesystem.c index aeab78d..f452d77 100644 --- a/modules/SDL2/test/testfilesystem.c +++ b/modules/SDL2/test/testfilesystem.c @@ -14,8 +14,7 @@ #include #include "SDL.h" -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { char *base_path; char *pref_path; @@ -29,27 +28,27 @@ main(int argc, char *argv[]) } base_path = SDL_GetBasePath(); - if(base_path == NULL){ - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n", - SDL_GetError()); + if (base_path == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n", + SDL_GetError()); } else { SDL_Log("base path: '%s'\n", base_path); SDL_free(base_path); } pref_path = SDL_GetPrefPath("libsdl", "test_filesystem"); - if(pref_path == NULL){ - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n", - SDL_GetError()); + if (pref_path == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n", + SDL_GetError()); } else { SDL_Log("pref path: '%s'\n", pref_path); SDL_free(pref_path); } pref_path = SDL_GetPrefPath(NULL, "test_filesystem"); - if(pref_path == NULL){ - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path without organization: %s\n", - SDL_GetError()); + if (pref_path == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path without organization: %s\n", + SDL_GetError()); } else { SDL_Log("pref path: '%s'\n", pref_path); SDL_free(pref_path); diff --git a/modules/SDL2/test/testgamecontroller.c b/modules/SDL2/test/testgamecontroller.c index 92422e6..e2bdebd 100644 --- a/modules/SDL2/test/testgamecontroller.c +++ b/modules/SDL2/test/testgamecontroller.c @@ -31,46 +31,57 @@ #define BUTTON_SIZE 50 #define AXIS_SIZE 50 +#define BUTTON_SIZE 50 +#define AXIS_SIZE 50 /* This is indexed by SDL_GameControllerButton. */ -static const struct { int x; int y; } button_positions[] = { - {387, 167}, /* SDL_CONTROLLER_BUTTON_A */ - {431, 132}, /* SDL_CONTROLLER_BUTTON_B */ - {342, 132}, /* SDL_CONTROLLER_BUTTON_X */ - {389, 101}, /* SDL_CONTROLLER_BUTTON_Y */ - {174, 132}, /* SDL_CONTROLLER_BUTTON_BACK */ - {232, 128}, /* SDL_CONTROLLER_BUTTON_GUIDE */ - {289, 132}, /* SDL_CONTROLLER_BUTTON_START */ - {75, 154}, /* SDL_CONTROLLER_BUTTON_LEFTSTICK */ - {305, 230}, /* SDL_CONTROLLER_BUTTON_RIGHTSTICK */ - {77, 40}, /* SDL_CONTROLLER_BUTTON_LEFTSHOULDER */ - {396, 36}, /* SDL_CONTROLLER_BUTTON_RIGHTSHOULDER */ - {154, 188}, /* SDL_CONTROLLER_BUTTON_DPAD_UP */ - {154, 249}, /* SDL_CONTROLLER_BUTTON_DPAD_DOWN */ - {116, 217}, /* SDL_CONTROLLER_BUTTON_DPAD_LEFT */ - {186, 217}, /* SDL_CONTROLLER_BUTTON_DPAD_RIGHT */ - {232, 174}, /* SDL_CONTROLLER_BUTTON_MISC1 */ - {132, 135}, /* SDL_CONTROLLER_BUTTON_PADDLE1 */ - {330, 135}, /* SDL_CONTROLLER_BUTTON_PADDLE2 */ - {132, 175}, /* SDL_CONTROLLER_BUTTON_PADDLE3 */ - {330, 175}, /* SDL_CONTROLLER_BUTTON_PADDLE4 */ - {0, 0}, /* SDL_CONTROLLER_BUTTON_TOUCHPAD */ +static const struct +{ + int x; + int y; +} button_positions[] = { + { 387, 167 }, /* SDL_CONTROLLER_BUTTON_A */ + { 431, 132 }, /* SDL_CONTROLLER_BUTTON_B */ + { 342, 132 }, /* SDL_CONTROLLER_BUTTON_X */ + { 389, 101 }, /* SDL_CONTROLLER_BUTTON_Y */ + { 174, 132 }, /* SDL_CONTROLLER_BUTTON_BACK */ + { 232, 128 }, /* SDL_CONTROLLER_BUTTON_GUIDE */ + { 289, 132 }, /* SDL_CONTROLLER_BUTTON_START */ + { 75, 154 }, /* SDL_CONTROLLER_BUTTON_LEFTSTICK */ + { 305, 230 }, /* SDL_CONTROLLER_BUTTON_RIGHTSTICK */ + { 77, 40 }, /* SDL_CONTROLLER_BUTTON_LEFTSHOULDER */ + { 396, 36 }, /* SDL_CONTROLLER_BUTTON_RIGHTSHOULDER */ + { 154, 188 }, /* SDL_CONTROLLER_BUTTON_DPAD_UP */ + { 154, 249 }, /* SDL_CONTROLLER_BUTTON_DPAD_DOWN */ + { 116, 217 }, /* SDL_CONTROLLER_BUTTON_DPAD_LEFT */ + { 186, 217 }, /* SDL_CONTROLLER_BUTTON_DPAD_RIGHT */ + { 232, 174 }, /* SDL_CONTROLLER_BUTTON_MISC1 */ + { 132, 135 }, /* SDL_CONTROLLER_BUTTON_PADDLE1 */ + { 330, 135 }, /* SDL_CONTROLLER_BUTTON_PADDLE2 */ + { 132, 175 }, /* SDL_CONTROLLER_BUTTON_PADDLE3 */ + { 330, 175 }, /* SDL_CONTROLLER_BUTTON_PADDLE4 */ + { 0, 0 }, /* SDL_CONTROLLER_BUTTON_TOUCHPAD */ }; SDL_COMPILE_TIME_ASSERT(button_positions, SDL_arraysize(button_positions) == SDL_CONTROLLER_BUTTON_MAX); /* This is indexed by SDL_GameControllerAxis. */ -static const struct { int x; int y; double angle; } axis_positions[] = { - {74, 153, 270.0}, /* LEFTX */ - {74, 153, 0.0}, /* LEFTY */ - {306, 231, 270.0}, /* RIGHTX */ - {306, 231, 0.0}, /* RIGHTY */ - {91, -20, 0.0}, /* TRIGGERLEFT */ - {375, -20, 0.0}, /* TRIGGERRIGHT */ +static const struct +{ + int x; + int y; + double angle; +} axis_positions[] = { + { 74, 153, 270.0 }, /* LEFTX */ + { 74, 153, 0.0 }, /* LEFTY */ + { 306, 231, 270.0 }, /* RIGHTX */ + { 306, 231, 0.0 }, /* RIGHTY */ + { 91, -20, 0.0 }, /* TRIGGERLEFT */ + { 375, -20, 0.0 }, /* TRIGGERRIGHT */ }; SDL_COMPILE_TIME_ASSERT(axis_positions, SDL_arraysize(axis_positions) == SDL_CONTROLLER_AXIS_MAX); /* This is indexed by SDL_JoystickPowerLevel + 1. */ -static const char* power_level_strings[] = { +static const char *power_level_strings[] = { "unknown", /* SDL_JOYSTICK_POWER_UNKNOWN */ "empty", /* SDL_JOYSTICK_POWER_EMPTY */ "low", /* SDL_JOYSTICK_POWER_LOW */ @@ -98,7 +109,7 @@ static SDL_GameControllerButton virtual_button_active = SDL_CONTROLLER_BUTTON_IN static void UpdateWindowTitle() { - if (!window) { + if (window == NULL) { return; } @@ -190,13 +201,13 @@ static void AddController(int device_index, SDL_bool verbose) } controller = SDL_GameControllerOpen(device_index); - if (!controller) { + if (controller == NULL) { SDL_Log("Couldn't open controller: %s\n", SDL_GetError()); return; } controllers = (SDL_GameController **)SDL_realloc(gamecontrollers, (num_controllers + 1) * sizeof(*controllers)); - if (!controllers) { + if (controllers == NULL) { SDL_GameControllerClose(controller); return; } @@ -267,7 +278,7 @@ static void DelController(SDL_JoystickID controller) --num_controllers; if (i < num_controllers) { - SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i+1], (num_controllers - i) * sizeof(*gamecontrollers)); + SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i + 1], (num_controllers - i) * sizeof(*gamecontrollers)); } if (num_controllers > 0) { @@ -294,35 +305,34 @@ static Uint16 ConvertAxisToRumble(Sint16 axisval) */ typedef struct { - Uint8 ucEnableBits1; /* 0 */ - Uint8 ucEnableBits2; /* 1 */ - Uint8 ucRumbleRight; /* 2 */ - Uint8 ucRumbleLeft; /* 3 */ - Uint8 ucHeadphoneVolume; /* 4 */ - Uint8 ucSpeakerVolume; /* 5 */ - Uint8 ucMicrophoneVolume; /* 6 */ - Uint8 ucAudioEnableBits; /* 7 */ - Uint8 ucMicLightMode; /* 8 */ - Uint8 ucAudioMuteBits; /* 9 */ - Uint8 rgucRightTriggerEffect[11]; /* 10 */ - Uint8 rgucLeftTriggerEffect[11]; /* 21 */ - Uint8 rgucUnknown1[6]; /* 32 */ - Uint8 ucLedFlags; /* 38 */ - Uint8 rgucUnknown2[2]; /* 39 */ - Uint8 ucLedAnim; /* 41 */ - Uint8 ucLedBrightness; /* 42 */ - Uint8 ucPadLights; /* 43 */ - Uint8 ucLedRed; /* 44 */ - Uint8 ucLedGreen; /* 45 */ - Uint8 ucLedBlue; /* 46 */ + Uint8 ucEnableBits1; /* 0 */ + Uint8 ucEnableBits2; /* 1 */ + Uint8 ucRumbleRight; /* 2 */ + Uint8 ucRumbleLeft; /* 3 */ + Uint8 ucHeadphoneVolume; /* 4 */ + Uint8 ucSpeakerVolume; /* 5 */ + Uint8 ucMicrophoneVolume; /* 6 */ + Uint8 ucAudioEnableBits; /* 7 */ + Uint8 ucMicLightMode; /* 8 */ + Uint8 ucAudioMuteBits; /* 9 */ + Uint8 rgucRightTriggerEffect[11]; /* 10 */ + Uint8 rgucLeftTriggerEffect[11]; /* 21 */ + Uint8 rgucUnknown1[6]; /* 32 */ + Uint8 ucLedFlags; /* 38 */ + Uint8 rgucUnknown2[2]; /* 39 */ + Uint8 ucLedAnim; /* 41 */ + Uint8 ucLedBrightness; /* 42 */ + Uint8 ucPadLights; /* 43 */ + Uint8 ucLedRed; /* 44 */ + Uint8 ucLedGreen; /* 45 */ + Uint8 ucLedBlue; /* 46 */ } DS5EffectsState_t; static void CyclePS5TriggerEffect() { DS5EffectsState_t state; - Uint8 effects[3][11] = - { + Uint8 effects[3][11] = { /* Clear trigger effect */ { 0x05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* Constant resistance across entire trigger pull */ @@ -403,7 +413,7 @@ static void OpenVirtualController() SDL_Log("Couldn't open virtual device: %s\n", SDL_GetError()); } else { virtual_joystick = SDL_JoystickOpen(virtual_index); - if (!virtual_joystick) { + if (virtual_joystick == NULL) { SDL_Log("Couldn't open virtual device: %s\n", SDL_GetError()); } } @@ -413,7 +423,7 @@ static void CloseVirtualController() { int i; - for (i = SDL_NumJoysticks(); i--; ) { + for (i = SDL_NumJoysticks(); i--;) { if (SDL_JoystickIsVirtual(i)) { SDL_JoystickDetachVirtual(i); } @@ -508,7 +518,7 @@ static void VirtualControllerMouseMotion(int x, int y) valueY = (Sint16)(distanceY * -SDL_JOYSTICK_AXIS_MIN); } SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active, valueX); - SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active+1, valueY); + SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active + 1, valueY); } } } @@ -545,14 +555,13 @@ static void VirtualControllerMouseUp(int x, int y) SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active, SDL_JOYSTICK_AXIS_MIN); } else { SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active, 0); - SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active+1, 0); + SDL_JoystickSetVirtualAxis(virtual_joystick, virtual_axis_active + 1, 0); } virtual_axis_active = SDL_CONTROLLER_AXIS_INVALID; } } -void -loop(void *arg) +void loop(void *arg) { SDL_Event event; int i; @@ -565,12 +574,12 @@ loop(void *arg) while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1) { switch (event.type) { case SDL_CONTROLLERDEVICEADDED: - SDL_Log("Game controller device %d added.\n", (int) SDL_JoystickGetDeviceInstanceID(event.cdevice.which)); + SDL_Log("Game controller device %d added.\n", (int)SDL_JoystickGetDeviceInstanceID(event.cdevice.which)); AddController(event.cdevice.which, SDL_TRUE); break; case SDL_CONTROLLERDEVICEREMOVED: - SDL_Log("Game controller device %d removed.\n", (int) event.cdevice.which); + SDL_Log("Game controller device %d removed.\n", (int)event.cdevice.which); DelController(event.cdevice.which); break; @@ -592,7 +601,7 @@ loop(void *arg) case SDL_CONTROLLERSENSORUPDATE: SDL_Log("Controller %" SDL_PRIs32 " sensor %s: %.2f, %.2f, %.2f (%" SDL_PRIu64 ")\n", event.csensor.which, - GetSensorName((SDL_SensorType) event.csensor.sensor), + GetSensorName((SDL_SensorType)event.csensor.sensor), event.csensor.data[0], event.csensor.data[1], event.csensor.data[2], @@ -606,7 +615,7 @@ loop(void *arg) if (event.caxis.value <= (-SDL_JOYSTICK_AXIS_MAX / 2) || event.caxis.value >= (SDL_JOYSTICK_AXIS_MAX / 2)) { SetController(event.caxis.which); } - SDL_Log("Controller %" SDL_PRIs32 " axis %s changed to %d\n", event.caxis.which, SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis) event.caxis.axis), event.caxis.value); + SDL_Log("Controller %" SDL_PRIs32 " axis %s changed to %d\n", event.caxis.which, SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis)event.caxis.axis), event.caxis.value); break; #endif /* VERBOSE_AXES */ @@ -615,7 +624,7 @@ loop(void *arg) if (event.type == SDL_CONTROLLERBUTTONDOWN) { SetController(event.cbutton.which); } - SDL_Log("Controller %" SDL_PRIs32 " button %s %s\n", event.cbutton.which, SDL_GameControllerGetStringForButton((SDL_GameControllerButton) event.cbutton.button), event.cbutton.state ? "pressed" : "released"); + SDL_Log("Controller %" SDL_PRIs32 " button %s %s\n", event.cbutton.which, SDL_GameControllerGetStringForButton((SDL_GameControllerButton)event.cbutton.button), event.cbutton.state ? "pressed" : "released"); /* Cycle PS5 trigger effects when the microphone button is pressed */ if (event.type == SDL_CONTROLLERBUTTONDOWN && @@ -701,7 +710,7 @@ loop(void *arg) if (showing_front) { for (i = 0; i < SDL_CONTROLLER_AXIS_MAX; ++i) { - const Sint16 deadzone = 8000; /* !!! FIXME: real deadzone */ + const Sint16 deadzone = 8000; /* !!! FIXME: real deadzone */ const Sint16 value = SDL_GameControllerGetAxis(gamecontroller, (SDL_GameControllerAxis)(i)); if (value < -deadzone) { const double angle = axis_positions[i].angle; @@ -735,14 +744,14 @@ loop(void *arg) Uint8 r, g, b; if (x < 0) { - r = (Uint8)(((int)(~x) * 255) / 32767); + r = (Uint8)(((~x) * 255) / 32767); b = 0; } else { r = 0; - b = (Uint8)(((int)(x) * 255) / 32767); + b = (Uint8)(((int)(x)*255) / 32767); } if (y > 0) { - g = (Uint8)(((int)(y) * 255) / 32767); + g = (Uint8)(((int)(y)*255) / 32767); } else { g = 0; } @@ -782,8 +791,7 @@ loop(void *arg) #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; int controller_count = 0; @@ -802,7 +810,7 @@ main(int argc, char *argv[]) SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); /* Initialize SDL (Note: video is required to start event loop) */ - if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) { + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); return 1; } @@ -829,7 +837,7 @@ main(int argc, char *argv[]) const char *description; SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i), - guid, sizeof (guid)); + guid, sizeof(guid)); if (SDL_IsGameController(i)) { controller_count++; @@ -879,8 +887,8 @@ main(int argc, char *argv[]) description = "Joystick"; } SDL_Log("%s %d: %s%s%s (guid %s, VID 0x%.4x, PID 0x%.4x, player index = %d)\n", - description, i, name ? name : "Unknown", path ? ", " : "", path ? path : "", guid, - SDL_JoystickGetDeviceVendor(i), SDL_JoystickGetDeviceProduct(i), SDL_JoystickGetDevicePlayerIndex(i)); + description, i, name ? name : "Unknown", path ? ", " : "", path ? path : "", guid, + SDL_JoystickGetDeviceVendor(i), SDL_JoystickGetDeviceProduct(i), SDL_JoystickGetDevicePlayerIndex(i)); } SDL_Log("There are %d game controller(s) attached (%d joystick(s))\n", controller_count, SDL_NumJoysticks()); @@ -912,7 +920,7 @@ main(int argc, char *argv[]) button_texture = LoadTexture(screen, "button.bmp", SDL_TRUE, NULL, NULL); axis_texture = LoadTexture(screen, "axis.bmp", SDL_TRUE, NULL, NULL); - if (!background_front || !background_back || !button_texture || !axis_texture) { + if (background_front == NULL || background_back == NULL || button_texture == NULL || axis_texture == NULL) { SDL_DestroyRenderer(screen); SDL_DestroyWindow(window); return 2; diff --git a/modules/SDL2/test/testgeometry.c b/modules/SDL2/test/testgeometry.c index 076b29e..9742a14 100644 --- a/modules/SDL2/test/testgeometry.c +++ b/modules/SDL2/test/testgeometry.c @@ -41,8 +41,7 @@ quit(int rc) exit(rc); } -int -LoadSprite(const char *file) +int LoadSprite(const char *file) { int i; @@ -50,22 +49,20 @@ LoadSprite(const char *file) /* This does the SDL_LoadBMP step repeatedly, but that's OK for test code. */ sprites[i] = LoadTexture(state->renderers[i], file, SDL_TRUE, &sprite_w, &sprite_h); if (!sprites[i]) { - return (-1); + return -1; } if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError()); SDL_DestroyTexture(sprites[i]); - return (-1); + return -1; } } /* We're ready to roll. :) */ - return (0); + return 0; } - -void -loop() +void loop() { int i; SDL_Event event; @@ -99,8 +96,9 @@ loop() for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); @@ -163,8 +161,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; const char *icon = "icon.bmp"; @@ -175,7 +172,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -218,8 +215,8 @@ main(int argc, char *argv[]) /* Create the windows, initialize the renderers, and load the textures */ sprites = - (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites)); - if (!sprites) { + (SDL_Texture **)SDL_malloc(state->num_windows * sizeof(*sprites)); + if (sprites == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } @@ -237,7 +234,6 @@ main(int argc, char *argv[]) } } - srand((unsigned int)time(NULL)); /* Main render loop */ @@ -251,16 +247,16 @@ main(int argc, char *argv[]) while (!done) { ++frames; loop(); - } + } #endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } - + quit(0); return 0; diff --git a/modules/SDL2/test/testgesture.c b/modules/SDL2/test/testgesture.c index 5cc5a01..f37635f 100644 --- a/modules/SDL2/test/testgesture.c +++ b/modules/SDL2/test/testgesture.c @@ -26,9 +26,9 @@ #include "SDL_test.h" #include "SDL_test_common.h" -#define WIDTH 640 +#define WIDTH 640 #define HEIGHT 480 -#define BPP 4 +#define BPP 4 /* MUST BE A POWER OF 2! */ #define EVENT_BUF_SIZE 256 @@ -38,7 +38,7 @@ static SDLTest_CommonState *state; static SDL_Event events[EVENT_BUF_SIZE]; static int eventWrite; -static int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF}; +static int colors[7] = { 0xFF, 0xFF00, 0xFF0000, 0xFFFF00, 0x00FFFF, 0xFF00FF, 0xFFFFFF }; static int quitting = 0; typedef struct @@ -54,7 +54,6 @@ typedef struct static Knob knob = { 0.0f, 0.1f, { 0.0f, 0.0f } }; - static void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col) { @@ -65,26 +64,26 @@ setpix(SDL_Surface *screen, float _x, float _y, unsigned int col) const int y = (int)_y; float a; - if ( (x < 0) || (x >= screen->w) || (y < 0) || (y >= screen->h) ) { + if ((x < 0) || (x >= screen->w) || (y < 0) || (y >= screen->h)) { return; } - pixmem32 = (Uint32 *) screen->pixels + y * screen->pitch / BPP + x; + pixmem32 = (Uint32 *)screen->pixels + y * screen->pitch / BPP + x; SDL_memcpy(&colour, pixmem32, screen->format->BytesPerPixel); - SDL_GetRGB(colour,screen->format,&r,&g,&b); + SDL_GetRGB(colour, screen->format, &r, &g, &b); /* r = 0;g = 0; b = 0; */ - a = (float) ((col >> 24) & 0xFF); + a = (float)((col >> 24) & 0xFF); if (a == 0) { a = 0xFF; /* Hack, to make things easier. */ } a = (a == 0.0f) ? 1 : (a / 255.0f); - r = (Uint8) (r * (1 - a) + ((col >> 16) & 0xFF) * a); - g = (Uint8) (g * (1 - a) + ((col >> 8) & 0xFF) * a); - b = (Uint8) (b * (1 - a) + ((col >> 0) & 0xFF) * a); + r = (Uint8)(r * (1 - a) + ((col >> 16) & 0xFF) * a); + g = (Uint8)(g * (1 - a) + ((col >> 8) & 0xFF) * a); + b = (Uint8)(b * (1 - a) + ((col >> 0) & 0xFF) * a); colour = SDL_MapRGB(screen->format, r, g, b); *pixmem32 = colour; @@ -104,11 +103,11 @@ drawLine(SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned i static void drawCircle(SDL_Surface *screen, float x, float y, float r, unsigned int c) { - float tx,ty, xr; - for (ty = (float) -SDL_fabs(r); ty <= (float) SDL_fabs((int) r); ty++) { - xr = (float) SDL_sqrt(r * r - ty * ty); + float tx, ty, xr; + for (ty = (float)-SDL_fabs(r); ty <= (float)SDL_fabs((int)r); ty++) { + xr = (float)SDL_sqrt(r * r - ty * ty); if (r > 0) { /* r > 0 ==> filled circle */ - for(tx = -xr + 0.5f; tx <= xr - 0.5f; tx++) { + for (tx = -xr + 0.5f; tx <= xr - 0.5f; tx++) { setpix(screen, x + tx, y + ty, c); } } else { @@ -132,7 +131,7 @@ DrawScreen(SDL_Window *window) SDL_Surface *screen = SDL_GetWindowSurface(window); int i; - if (!screen) { + if (screen == NULL) { return; } @@ -145,15 +144,15 @@ DrawScreen(SDL_Window *window) float x, y; unsigned int c, col; - if ( (event->type == SDL_FINGERMOTION) || - (event->type == SDL_FINGERDOWN) || - (event->type == SDL_FINGERUP) ) { + if ((event->type == SDL_FINGERMOTION) || + (event->type == SDL_FINGERDOWN) || + (event->type == SDL_FINGERUP)) { x = event->tfinger.x; y = event->tfinger.y; /* draw the touch: */ c = colors[event->tfinger.fingerId % 7]; - col = ((unsigned int) (c * (0.1f + 0.85f))) | (unsigned int) (0xFF * age) << 24; + col = ((unsigned int)(c * (0.1f + 0.85f))) | (unsigned int)(0xFF * age) << 24; if (event->type == SDL_FINGERMOTION) { drawCircle(screen, x * screen->w, y * screen->h, 5, col); @@ -181,78 +180,79 @@ loop(void) SDLTest_CommonEvent(state, &event, &quitting); /* Record _all_ events */ - events[eventWrite & (EVENT_BUF_SIZE-1)] = event; + events[eventWrite & (EVENT_BUF_SIZE - 1)] = event; eventWrite++; switch (event.type) { - case SDL_KEYDOWN: - switch (event.key.keysym.sym) { - case SDLK_i: { - for (i = 0; i < SDL_GetNumTouchDevices(); ++i) { - const SDL_TouchID id = SDL_GetTouchDevice(i); - const char *name = SDL_GetTouchName(i); - SDL_Log("Fingers Down on device %"SDL_PRIs64" (%s): %d", id, name, SDL_GetNumTouchFingers(id)); - } - break; - } - - case SDLK_SPACE: - SDL_RecordGesture(-1); - break; - - case SDLK_s: - stream = SDL_RWFromFile("gestureSave", "w"); - SDL_Log("Wrote %i templates", SDL_SaveAllDollarTemplates(stream)); - SDL_RWclose(stream); - break; - - case SDLK_l: - stream = SDL_RWFromFile("gestureSave", "r"); - SDL_Log("Loaded: %i", SDL_LoadDollarTemplates(-1, stream)); - SDL_RWclose(stream); - break; + case SDL_KEYDOWN: + switch (event.key.keysym.sym) { + case SDLK_i: + { + for (i = 0; i < SDL_GetNumTouchDevices(); ++i) { + const SDL_TouchID id = SDL_GetTouchDevice(i); + const char *name = SDL_GetTouchName(i); + SDL_Log("Fingers Down on device %" SDL_PRIs64 " (%s): %d", id, name, SDL_GetNumTouchFingers(id)); } break; + } -#if VERBOSE - case SDL_FINGERMOTION: - SDL_Log("Finger: %"SDL_PRIs64", x: %f, y: %f",event.tfinger.fingerId, - event.tfinger.x,event.tfinger.y); + case SDLK_SPACE: + SDL_RecordGesture(-1); break; - case SDL_FINGERDOWN: - SDL_Log("Finger: %"SDL_PRIs64" down - x: %f, y: %f", - event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); + case SDLK_s: + stream = SDL_RWFromFile("gestureSave", "w"); + SDL_Log("Wrote %i templates", SDL_SaveAllDollarTemplates(stream)); + SDL_RWclose(stream); break; - case SDL_FINGERUP: - SDL_Log("Finger: %"SDL_PRIs64" up - x: %f, y: %f", - event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); + case SDLK_l: + stream = SDL_RWFromFile("gestureSave", "r"); + SDL_Log("Loaded: %i", SDL_LoadDollarTemplates(-1, stream)); + SDL_RWclose(stream); break; + } + break; + +#if VERBOSE + case SDL_FINGERMOTION: + SDL_Log("Finger: %" SDL_PRIs64 ", x: %f, y: %f", event.tfinger.fingerId, + event.tfinger.x, event.tfinger.y); + break; + + case SDL_FINGERDOWN: + SDL_Log("Finger: %" SDL_PRIs64 " down - x: %f, y: %f", + event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); + break; + + case SDL_FINGERUP: + SDL_Log("Finger: %" SDL_PRIs64 " up - x: %f, y: %f", + event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); + break; #endif - case SDL_MULTIGESTURE: + case SDL_MULTIGESTURE: #if VERBOSE - SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", - event.mgesture.x, event.mgesture.y, - event.mgesture.dTheta, event.mgesture.dDist); - SDL_Log("MG: numDownTouch = %i",event.mgesture.numFingers); + SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", + event.mgesture.x, event.mgesture.y, + event.mgesture.dTheta, event.mgesture.dDist); + SDL_Log("MG: numDownTouch = %i", event.mgesture.numFingers); #endif - knob.p.x = event.mgesture.x; - knob.p.y = event.mgesture.y; - knob.ang += event.mgesture.dTheta; - knob.r += event.mgesture.dDist; - break; + knob.p.x = event.mgesture.x; + knob.p.y = event.mgesture.y; + knob.ang += event.mgesture.dTheta; + knob.r += event.mgesture.dDist; + break; - case SDL_DOLLARGESTURE: - SDL_Log("Gesture %"SDL_PRIs64" performed, error: %f", - event.dgesture.gestureId, event.dgesture.error); - break; + case SDL_DOLLARGESTURE: + SDL_Log("Gesture %" SDL_PRIs64 " performed, error: %f", + event.dgesture.gestureId, event.dgesture.error); + break; - case SDL_DOLLARRECORD: - SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId); - break; + case SDL_DOLLARRECORD: + SDL_Log("Recorded gesture: %" SDL_PRIs64 "", event.dgesture.gestureId); + break; } } @@ -269,10 +269,10 @@ loop(void) #endif } -int main(int argc, char* argv[]) +int main(int argc, char *argv[]) { state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } diff --git a/modules/SDL2/test/testgl2.c b/modules/SDL2/test/testgl2.c index 2e7a33d..b58798c 100644 --- a/modules/SDL2/test/testgl2.c +++ b/modules/SDL2/test/testgl2.c @@ -26,12 +26,11 @@ typedef struct GL_Context { -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; #include "../src/render/opengl/SDL_glfuncs.h" #undef SDL_PROC } GL_Context; - /* Undefine this if you want a flat cube instead of a rainbow cube */ #define SHADED_CUBE @@ -39,7 +38,7 @@ static SDLTest_CommonState *state; static SDL_GLContext context; static GL_Context ctx; -static int LoadContext(GL_Context * data) +static int LoadContext(GL_Context *data) { #if SDL_VIDEO_DRIVER_UIKIT #define __SDL_NOGETPROCADDR__ @@ -50,15 +49,15 @@ static int LoadContext(GL_Context * data) #endif #if defined __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; #else -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); + } \ + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "../src/render/opengl/SDL_glfuncs.h" @@ -66,13 +65,12 @@ static int LoadContext(GL_Context * data) return 0; } - /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) { if (context) { - /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */ + /* SDL_GL_MakeCurrent(0, NULL); */ /* doesn't do anything */ SDL_GL_DeleteContext(context); } SDLTest_CommonQuit(state); @@ -83,24 +81,24 @@ static void Render() { static float color[8][3] = { - {1.0, 1.0, 0.0}, - {1.0, 0.0, 0.0}, - {0.0, 0.0, 0.0}, - {0.0, 1.0, 0.0}, - {0.0, 1.0, 1.0}, - {1.0, 1.0, 1.0}, - {1.0, 0.0, 1.0}, - {0.0, 0.0, 1.0} + { 1.0, 1.0, 0.0 }, + { 1.0, 0.0, 0.0 }, + { 0.0, 0.0, 0.0 }, + { 0.0, 1.0, 0.0 }, + { 0.0, 1.0, 1.0 }, + { 1.0, 1.0, 1.0 }, + { 1.0, 0.0, 1.0 }, + { 0.0, 0.0, 1.0 } }; static float cube[8][3] = { - {0.5, 0.5, -0.5}, - {0.5, -0.5, -0.5}, - {-0.5, -0.5, -0.5}, - {-0.5, 0.5, -0.5}, - {-0.5, 0.5, 0.5}, - {0.5, 0.5, 0.5}, - {0.5, -0.5, 0.5}, - {-0.5, -0.5, 0.5} + { 0.5, 0.5, -0.5 }, + { 0.5, -0.5, -0.5 }, + { -0.5, -0.5, -0.5 }, + { -0.5, 0.5, -0.5 }, + { -0.5, 0.5, 0.5 }, + { 0.5, 0.5, 0.5 }, + { 0.5, -0.5, 0.5 }, + { -0.5, -0.5, 0.5 } }; /* Do our drawing, too. */ @@ -163,7 +161,7 @@ Render() ctx.glVertex3fv(cube[2]); ctx.glColor3fv(color[7]); ctx.glVertex3fv(cube[7]); -#else /* flat cube */ +#else /* flat cube */ ctx.glColor3f(1.0, 0.0, 0.0); ctx.glVertex3fv(cube[0]); ctx.glVertex3fv(cube[1]); @@ -207,8 +205,7 @@ Render() ctx.glRotatef(5.0, 1.0, 1.0, 1.0); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int fsaa, accel; int value; @@ -229,7 +226,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -237,11 +234,11 @@ main(int argc, char *argv[]) consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { - if (SDL_strcasecmp(argv[i], "--fsaa") == 0 && i+1 < argc) { - fsaa = SDL_atoi(argv[i+1]); + if (SDL_strcasecmp(argv[i], "--fsaa") == 0 && i + 1 < argc) { + fsaa = SDL_atoi(argv[i + 1]); consumed = 2; - } else if (SDL_strcasecmp(argv[i], "--accel") == 0 && i+1 < argc) { - accel = SDL_atoi(argv[i+1]); + } else if (SDL_strcasecmp(argv[i], "--accel") == 0 && i + 1 < argc) { + accel = SDL_atoi(argv[i + 1]); consumed = 2; } else { consumed = -1; @@ -280,7 +277,7 @@ main(int argc, char *argv[]) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError()); quit(2); } - + /* Important: call this *after* creating the context */ if (LoadContext(&ctx) < 0) { SDL_Log("Could not load GL functions\n"); @@ -297,7 +294,7 @@ main(int argc, char *argv[]) swap_interval = 1; } } else { - SDL_GL_SetSwapInterval(0); /* disable vsync. */ + SDL_GL_SetSwapInterval(0); /* disable vsync. */ swap_interval = 0; } @@ -345,25 +342,25 @@ main(int argc, char *argv[]) SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", - SDL_GetError()); + SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); if (!status) { SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, - value); + value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", - SDL_GetError()); + SDL_GetError()); } } if (accel >= 0) { status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); if (!status) { SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested %d, got %d\n", accel, - value); + value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", - SDL_GetError()); + SDL_GetError()); } } @@ -376,7 +373,7 @@ main(int argc, char *argv[]) ctx.glEnable(GL_DEPTH_TEST); ctx.glDepthFunc(GL_LESS); ctx.glShadeModel(GL_SMOOTH); - + /* Main render loop */ frames = 0; then = SDL_GetTicks(); @@ -405,8 +402,9 @@ main(int argc, char *argv[]) for (i = 0; i < state->num_windows; ++i) { int w, h; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_GL_MakeCurrent(state->windows[i], context); if (update_swap_interval) { SDL_GL_SetSwapInterval(swap_interval); @@ -422,7 +420,7 @@ main(int argc, char *argv[]) now = SDL_GetTicks(); if (now > then) { SDL_Log("%2.2f frames per second\n", - ((double) frames * 1000) / (now - then)); + ((double)frames * 1000) / (now - then)); } quit(0); return 0; @@ -430,8 +428,7 @@ main(int argc, char *argv[]) #else /* HAVE_OPENGL */ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL support on this system\n"); return 1; diff --git a/modules/SDL2/test/testgles.c b/modules/SDL2/test/testgles.c index 211dc4a..498dbce 100644 --- a/modules/SDL2/test/testgles.c +++ b/modules/SDL2/test/testgles.c @@ -51,38 +51,34 @@ quit(int rc) static void Render() { - static GLubyte color[8][4] = { {255, 0, 0, 0}, - {255, 0, 0, 255}, - {0, 255, 0, 255}, - {0, 255, 0, 255}, - {0, 255, 0, 255}, - {255, 255, 255, 255}, - {255, 0, 255, 255}, - {0, 0, 255, 255} - }; - static GLfloat cube[8][3] = { {0.5, 0.5, -0.5}, - {0.5f, -0.5f, -0.5f}, - {-0.5f, -0.5f, -0.5f}, - {-0.5f, 0.5f, -0.5f}, - {-0.5f, 0.5f, 0.5f}, - {0.5f, 0.5f, 0.5f}, - {0.5f, -0.5f, 0.5f}, - {-0.5f, -0.5f, 0.5f} - }; + static GLubyte color[8][4] = { { 255, 0, 0, 0 }, + { 255, 0, 0, 255 }, + { 0, 255, 0, 255 }, + { 0, 255, 0, 255 }, + { 0, 255, 0, 255 }, + { 255, 255, 255, 255 }, + { 255, 0, 255, 255 }, + { 0, 0, 255, 255 } }; + static GLfloat cube[8][3] = { { 0.5, 0.5, -0.5 }, + { 0.5f, -0.5f, -0.5f }, + { -0.5f, -0.5f, -0.5f }, + { -0.5f, 0.5f, -0.5f }, + { -0.5f, 0.5f, 0.5f }, + { 0.5f, 0.5f, 0.5f }, + { 0.5f, -0.5f, 0.5f }, + { -0.5f, -0.5f, 0.5f } }; static GLubyte indices[36] = { 0, 3, 4, - 4, 5, 0, - 0, 5, 6, - 6, 1, 0, - 6, 7, 2, - 2, 1, 6, - 7, 4, 3, - 3, 2, 7, - 5, 4, 7, - 7, 6, 5, - 2, 3, 1, - 3, 0, 1 - }; - + 4, 5, 0, + 0, 5, 6, + 6, 1, 0, + 6, 7, 2, + 2, 1, 6, + 7, 4, 3, + 3, 2, 7, + 5, 4, 7, + 7, 6, 5, + 2, 3, 1, + 3, 0, 1 }; /* Do our drawing, too. */ glClearColor(0.0, 0.0, 0.0, 1.0); @@ -99,8 +95,7 @@ Render() glRotatef(5.0, 1.0, 1.0, 1.0); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int fsaa, accel; int value; @@ -119,7 +114,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -163,11 +158,11 @@ main(int argc, char *argv[]) state->gl_minor_version = 1; state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; if (fsaa) { - state->gl_multisamplebuffers=1; - state->gl_multisamplesamples=fsaa; + state->gl_multisamplebuffers = 1; + state->gl_multisamplesamples = fsaa; } if (accel) { - state->gl_accelerated=1; + state->gl_accelerated = 1; } if (!SDLTest_CommonInit(state)) { quit(2); @@ -208,28 +203,28 @@ main(int argc, char *argv[]) SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_RED_SIZE: %s\n", - SDL_GetError()); + SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); if (!status) { SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_GREEN_SIZE: %s\n", - SDL_GetError()); + SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); if (!status) { SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_BLUE_SIZE: %s\n", - SDL_GetError()); + SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); if (!status) { SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_DEPTH_SIZE: %s\n", - SDL_GetError()); + SDL_GetError()); } if (fsaa) { status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); @@ -237,15 +232,15 @@ main(int argc, char *argv[]) SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", - SDL_GetError()); + SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); if (!status) { SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, - value); + value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", - SDL_GetError()); + SDL_GetError()); } } if (accel) { @@ -254,7 +249,7 @@ main(int argc, char *argv[]) SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", - SDL_GetError()); + SDL_GetError()); } } @@ -293,30 +288,31 @@ main(int argc, char *argv[]) switch (event.type) { case SDL_WINDOWEVENT: switch (event.window.event) { - case SDL_WINDOWEVENT_RESIZED: - for (i = 0; i < state->num_windows; ++i) { - if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { - status = SDL_GL_MakeCurrent(state->windows[i], context[i]); - if (status) { - SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); - break; - } - /* Change view port to the new window dimensions */ - glViewport(0, 0, event.window.data1, event.window.data2); - /* Update window content */ - Render(); - SDL_GL_SwapWindow(state->windows[i]); + case SDL_WINDOWEVENT_RESIZED: + for (i = 0; i < state->num_windows; ++i) { + if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); break; } + /* Change view port to the new window dimensions */ + glViewport(0, 0, event.window.data1, event.window.data2); + /* Update window content */ + Render(); + SDL_GL_SwapWindow(state->windows[i]); + break; } - break; + } + break; } } SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } status = SDL_GL_MakeCurrent(state->windows[i], context[i]); if (status) { SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); @@ -333,18 +329,17 @@ main(int argc, char *argv[]) now = SDL_GetTicks(); if (now > then) { SDL_Log("%2.2f frames per second\n", - ((double) frames * 1000) / (now - then)); + ((double)frames * 1000) / (now - then)); } #if !defined(__ANDROID__) quit(0); -#endif +#endif return 0; } #else /* HAVE_OPENGLES */ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL ES support on this system\n"); return 1; diff --git a/modules/SDL2/test/testgles2.c b/modules/SDL2/test/testgles2.c index 2a37faf..656e5e6 100644 --- a/modules/SDL2/test/testgles2.c +++ b/modules/SDL2/test/testgles2.c @@ -33,7 +33,7 @@ typedef struct GLES2_Context { -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; #include "../src/render/opengles2/SDL_gles2funcs.h" #undef SDL_PROC } GLES2_Context; @@ -63,7 +63,7 @@ static SDL_GLContext *context = NULL; static int depth = 16; static GLES2_Context ctx; -static int LoadContext(GLES2_Context * data) +static int LoadContext(GLES2_Context *data) { #if SDL_VIDEO_DRIVER_UIKIT #define __SDL_NOGETPROCADDR__ @@ -74,15 +74,15 @@ static int LoadContext(GLES2_Context * data) #endif #if defined __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; #else -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); + } \ + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "../src/render/opengles2/SDL_gles2funcs.h" @@ -110,19 +110,19 @@ quit(int rc) exit(rc); } -#define GL_CHECK(x) \ - x; \ - { \ - GLenum glError = ctx.glGetError(); \ - if(glError != GL_NO_ERROR) { \ +#define GL_CHECK(x) \ + x; \ + { \ + GLenum glError = ctx.glGetError(); \ + if (glError != GL_NO_ERROR) { \ SDL_Log("glGetError() = %i (0x%.8x) at line %i\n", glError, glError, __LINE__); \ - quit(1); \ - } \ - } + quit(1); \ + } \ + } -/* - * Simulates desktop's glRotatef. The matrix is returned in column-major - * order. +/* + * Simulates desktop's glRotatef. The matrix is returned in column-major + * order. */ static void rotate_matrix(float angle, float x, float y, float z, float *r) @@ -161,16 +161,16 @@ rotate_matrix(float angle, float x, float y, float z, float *r) } } -/* - * Simulates gluPerspectiveMatrix +/* + * Simulates gluPerspectiveMatrix */ -static void +static void perspective_matrix(float fovy, float aspect, float znear, float zfar, float *r) { int i; float f; - f = 1.0f/SDL_tanf(fovy * 0.5f); + f = 1.0f / SDL_tanf(fovy * 0.5f); for (i = 0; i < 16; i++) { r[i] = 0.0; @@ -184,12 +184,12 @@ perspective_matrix(float fovy, float aspect, float znear, float zfar, float *r) r[15] = 0.0f; } -/* +/* * Multiplies lhs by rhs and writes out to r. All matrices are 4x4 and column * major. In-place multiplication is supported. */ static void -multiply_matrix(float *lhs, float *rhs, float *r) +multiply_matrix(const float *lhs, const float *rhs, float *r) { int i, j, k; float tmp[16]; @@ -209,7 +209,7 @@ multiply_matrix(float *lhs, float *rhs, float *r) } } -/* +/* * Create shader, load in source, compile, dump debug as necessary. * * shader: Pointer to return created shader ID. @@ -217,7 +217,7 @@ multiply_matrix(float *lhs, float *rhs, float *r) * shader_type: Passed to GL, e.g. GL_VERTEX_SHADER. */ static void -process_shader(GLuint *shader, const char * source, GLint shader_type) +process_shader(GLuint *shader, const char *source, GLint shader_type) { GLint status = GL_FALSE; const char *shaders[1] = { NULL }; @@ -239,7 +239,7 @@ process_shader(GLuint *shader, const char * source, GLint shader_type) GL_CHECK(ctx.glGetShaderiv(*shader, GL_COMPILE_STATUS, &status)); /* Dump debug info (source and log) if compilation failed. */ - if(status != GL_TRUE) { + if (status != GL_TRUE) { ctx.glGetShaderInfoLog(*shader, sizeof(buffer), &length, &buffer[0]); buffer[length] = '\0'; SDL_Log("Shader compilation failed: %s", buffer); @@ -260,7 +260,7 @@ link_program(struct shader_data *data) GL_CHECK(ctx.glLinkProgram(data->shader_program)); GL_CHECK(ctx.glGetProgramiv(data->shader_program, GL_LINK_STATUS, &status)); - if(status != GL_TRUE) { + if (status != GL_TRUE) { ctx.glGetProgramInfoLog(data->shader_program, sizeof(buffer), &length, &buffer[0]); buffer[length] = '\0'; SDL_Log("Program linking failed: %s", buffer); @@ -270,67 +270,137 @@ link_program(struct shader_data *data) } /* 3D data. Vertex range -0.5..0.5 in all axes. -* Z -0.5 is near, 0.5 is far. */ -const float _vertices[] = -{ + * Z -0.5 is near, 0.5 is far. */ +const float _vertices[] = { /* Front face. */ /* Bottom left */ - -0.5, 0.5, -0.5, - 0.5, -0.5, -0.5, - -0.5, -0.5, -0.5, + -0.5, + 0.5, + -0.5, + 0.5, + -0.5, + -0.5, + -0.5, + -0.5, + -0.5, /* Top right */ - -0.5, 0.5, -0.5, - 0.5, 0.5, -0.5, - 0.5, -0.5, -0.5, + -0.5, + 0.5, + -0.5, + 0.5, + 0.5, + -0.5, + 0.5, + -0.5, + -0.5, /* Left face */ /* Bottom left */ - -0.5, 0.5, 0.5, - -0.5, -0.5, -0.5, - -0.5, -0.5, 0.5, + -0.5, + 0.5, + 0.5, + -0.5, + -0.5, + -0.5, + -0.5, + -0.5, + 0.5, /* Top right */ - -0.5, 0.5, 0.5, - -0.5, 0.5, -0.5, - -0.5, -0.5, -0.5, + -0.5, + 0.5, + 0.5, + -0.5, + 0.5, + -0.5, + -0.5, + -0.5, + -0.5, /* Top face */ /* Bottom left */ - -0.5, 0.5, 0.5, - 0.5, 0.5, -0.5, - -0.5, 0.5, -0.5, + -0.5, + 0.5, + 0.5, + 0.5, + 0.5, + -0.5, + -0.5, + 0.5, + -0.5, /* Top right */ - -0.5, 0.5, 0.5, - 0.5, 0.5, 0.5, - 0.5, 0.5, -0.5, + -0.5, + 0.5, + 0.5, + 0.5, + 0.5, + 0.5, + 0.5, + 0.5, + -0.5, /* Right face */ /* Bottom left */ - 0.5, 0.5, -0.5, - 0.5, -0.5, 0.5, - 0.5, -0.5, -0.5, + 0.5, + 0.5, + -0.5, + 0.5, + -0.5, + 0.5, + 0.5, + -0.5, + -0.5, /* Top right */ - 0.5, 0.5, -0.5, - 0.5, 0.5, 0.5, - 0.5, -0.5, 0.5, + 0.5, + 0.5, + -0.5, + 0.5, + 0.5, + 0.5, + 0.5, + -0.5, + 0.5, /* Back face */ /* Bottom left */ - 0.5, 0.5, 0.5, - -0.5, -0.5, 0.5, - 0.5, -0.5, 0.5, + 0.5, + 0.5, + 0.5, + -0.5, + -0.5, + 0.5, + 0.5, + -0.5, + 0.5, /* Top right */ - 0.5, 0.5, 0.5, - -0.5, 0.5, 0.5, - -0.5, -0.5, 0.5, + 0.5, + 0.5, + 0.5, + -0.5, + 0.5, + 0.5, + -0.5, + -0.5, + 0.5, /* Bottom face */ /* Bottom left */ - -0.5, -0.5, -0.5, - 0.5, -0.5, 0.5, - -0.5, -0.5, 0.5, + -0.5, + -0.5, + -0.5, + 0.5, + -0.5, + 0.5, + -0.5, + -0.5, + 0.5, /* Top right */ - -0.5, -0.5, -0.5, - 0.5, -0.5, -0.5, - 0.5, -0.5, 0.5, + -0.5, + -0.5, + -0.5, + 0.5, + -0.5, + -0.5, + 0.5, + -0.5, + 0.5, }; -const float _colors[] = -{ +const float _colors[] = { /* Front face */ /* Bottom left */ 1.0, 0.0, 0.0, /* red */ @@ -387,32 +457,32 @@ const float _colors[] = 1.0, 0.0, 1.0, /* magenta */ }; -const char* _shader_vert_src = -" attribute vec4 av4position; " -" attribute vec3 av3color; " -" uniform mat4 mvp; " -" varying vec3 vv3color; " -" void main() { " -" vv3color = av3color; " -" gl_Position = mvp * av4position; " -" } "; - -const char* _shader_frag_src = -" precision lowp float; " -" varying vec3 vv3color; " -" void main() { " -" gl_FragColor = vec4(vv3color, 1.0); " -" } "; +const char *_shader_vert_src = + " attribute vec4 av4position; " + " attribute vec3 av3color; " + " uniform mat4 mvp; " + " varying vec3 vv3color; " + " void main() { " + " vv3color = av3color; " + " gl_Position = mvp * av4position; " + " } "; + +const char *_shader_frag_src = + " precision lowp float; " + " varying vec3 vv3color; " + " void main() { " + " gl_FragColor = vec4(vv3color, 1.0); " + " } "; static void -Render(unsigned int width, unsigned int height, shader_data* data) +Render(unsigned int width, unsigned int height, shader_data *data) { float matrix_rotate[16], matrix_modelview[16], matrix_perspective[16], matrix_mvp[16]; - /* - * Do some rotation with Euler angles. It is not a fixed axis as - * quaterions would be, but the effect is cool. - */ + /* + * Do some rotation with Euler angles. It is not a fixed axis as + * quaterions would be, but the effect is cool. + */ rotate_matrix((float)data->angle_x, 1.0f, 0.0f, 0.0f, matrix_modelview); rotate_matrix((float)data->angle_y, 0.0f, 1.0f, 0.0f, matrix_rotate); @@ -425,7 +495,7 @@ Render(unsigned int width, unsigned int height, shader_data* data) /* Pull the camera back from the cube */ matrix_modelview[14] -= 2.5; - perspective_matrix(45.0f, (float)width/height, 0.01f, 100.0f, matrix_perspective); + perspective_matrix(45.0f, (float)width / height, 0.01f, 100.0f, matrix_perspective); multiply_matrix(matrix_perspective, matrix_modelview, matrix_mvp); GL_CHECK(ctx.glUniformMatrix4fv(data->attr_mvp, 1, GL_FALSE, matrix_mvp)); @@ -434,12 +504,24 @@ Render(unsigned int width, unsigned int height, shader_data* data) data->angle_y += 2; data->angle_z += 1; - if(data->angle_x >= 360) data->angle_x -= 360; - if(data->angle_x < 0) data->angle_x += 360; - if(data->angle_y >= 360) data->angle_y -= 360; - if(data->angle_y < 0) data->angle_y += 360; - if(data->angle_z >= 360) data->angle_z -= 360; - if(data->angle_z < 0) data->angle_z += 360; + if (data->angle_x >= 360) { + data->angle_x -= 360; + } + if (data->angle_x < 0) { + data->angle_x += 360; + } + if (data->angle_y >= 360) { + data->angle_y -= 360; + } + if (data->angle_y < 0) { + data->angle_y += 360; + } + if (data->angle_z >= 360) { + data->angle_z -= 360; + } + if (data->angle_z < 0) { + data->angle_z += 360; + } GL_CHECK(ctx.glViewport(0, 0, width, height)); GL_CHECK(ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)); @@ -474,7 +556,7 @@ render_window(int index) #ifndef __EMSCRIPTEN__ static int SDLCALL -render_thread_fn(void* render_ctx) +render_thread_fn(void *render_ctx) { thread_data *thread = render_ctx; @@ -537,8 +619,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int fsaa, accel, threaded; int value; @@ -555,7 +636,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -603,11 +684,11 @@ main(int argc, char *argv[]) state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; if (fsaa) { - state->gl_multisamplebuffers=1; - state->gl_multisamplesamples=fsaa; + state->gl_multisamplebuffers = 1; + state->gl_multisamplesamples = fsaa; } if (accel) { - state->gl_accelerated=1; + state->gl_accelerated = 1; } if (!SDLTest_CommonInit(state)) { quit(2); @@ -619,7 +700,7 @@ main(int argc, char *argv[]) SDL_Log("Out of memory!\n"); quit(2); } - + /* Create OpenGL ES contexts */ for (i = 0; i < state->num_windows; i++) { context[i] = SDL_GL_CreateContext(state->windows[i]); @@ -636,8 +717,6 @@ main(int argc, char *argv[]) return 0; } - - if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { SDL_GL_SetSwapInterval(1); } else { @@ -658,28 +737,28 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_RED_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); if (!status) { SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_GREEN_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); if (!status) { SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_BLUE_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); if (!status) { SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); } else { - SDL_Log( "Failed to get SDL_GL_DEPTH_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError()); } if (fsaa) { @@ -687,15 +766,15 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); } else { - SDL_Log( "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_Log("Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); if (!status) { SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, - value); + value); } else { - SDL_Log( "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_Log("Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", SDL_GetError()); } } @@ -704,7 +783,7 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); } else { - SDL_Log( "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_Log("Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", SDL_GetError()); } } @@ -726,7 +805,9 @@ main(int argc, char *argv[]) ctx.glViewport(0, 0, w, h); data = &datas[i]; - data->angle_x = 0; data->angle_y = 0; data->angle_z = 0; + data->angle_x = 0; + data->angle_y = 0; + data->angle_z = 0; /* Shader Initialization */ process_shader(&data->shader_vert, _shader_vert_src, GL_VERTEX_SHADER); @@ -780,7 +861,7 @@ main(int argc, char *argv[]) emscripten_set_main_loop(loop, 0, 1); #else if (threaded) { - threads = (thread_data*)SDL_calloc(state->num_windows, sizeof(thread_data)); + threads = (thread_data *)SDL_calloc(state->num_windows, sizeof(thread_data)); /* Start a render thread for each window */ for (i = 0; i < state->num_windows; ++i) { @@ -810,7 +891,7 @@ main(int argc, char *argv[]) now = SDL_GetTicks(); if (now > then) { SDL_Log("%2.2f frames per second\n", - ((double) frames * 1000) / (now - then)); + ((double)frames * 1000) / (now - then)); } #if !defined(__ANDROID__) && !defined(__NACL__) quit(0); @@ -820,8 +901,7 @@ main(int argc, char *argv[]) #else /* HAVE_OPENGLES2 */ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Log("No OpenGL ES support on this system\n"); return 1; diff --git a/modules/SDL2/test/testgles2_sdf.c b/modules/SDL2/test/testgles2_sdf.c index c4e1069..91f4906 100644 --- a/modules/SDL2/test/testgles2_sdf.c +++ b/modules/SDL2/test/testgles2_sdf.c @@ -10,15 +10,13 @@ freely. */ #include -#include -#include -#include #ifdef __EMSCRIPTEN__ #include #endif #include "SDL_test_common.h" +#include "testutils.h" #if defined(__IPHONEOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__NACL__) \ || defined(__WINDOWS__) || defined(__LINUX__) @@ -31,12 +29,11 @@ typedef struct GLES2_Context { -#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#define SDL_PROC(ret, func, params) ret (APIENTRY *func) params; #include "../src/render/opengles2/SDL_gles2funcs.h" #undef SDL_PROC } GLES2_Context; - static SDL_Surface *g_surf_sdf = NULL; GLenum g_texture; GLenum g_texture_type = GL_TEXTURE_2D; @@ -57,16 +54,14 @@ typedef enum } GLES2_Uniform; -GLuint g_uniform_locations[16]; - - +GLint g_uniform_locations[16]; static SDLTest_CommonState *state; static SDL_GLContext *context = NULL; static int depth = 16; static GLES2_Context ctx; -static int LoadContext(GLES2_Context * data) +static int LoadContext(GLES2_Context *data) { #if SDL_VIDEO_DRIVER_UIKIT #define __SDL_NOGETPROCADDR__ @@ -77,15 +72,15 @@ static int LoadContext(GLES2_Context * data) #endif #if defined __SDL_NOGETPROCADDR__ -#define SDL_PROC(ret,func,params) data->func=func; +#define SDL_PROC(ret, func, params) data->func = func; #else -#define SDL_PROC(ret,func,params) \ - do { \ - data->func = SDL_GL_GetProcAddress(#func); \ - if ( ! data->func ) { \ +#define SDL_PROC(ret, func, params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if (!data->func) { \ return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \ - } \ - } while ( 0 ); + } \ + } while (0); #endif /* __SDL_NOGETPROCADDR__ */ #include "../src/render/opengles2/SDL_gles2funcs.h" @@ -113,26 +108,25 @@ quit(int rc) exit(rc); } -#define GL_CHECK(x) \ - x; \ - { \ - GLenum glError = ctx.glGetError(); \ - if(glError != GL_NO_ERROR) { \ +#define GL_CHECK(x) \ + x; \ + { \ + GLenum glError = ctx.glGetError(); \ + if (glError != GL_NO_ERROR) { \ SDL_Log("glGetError() = %i (0x%.8x) at line %i\n", glError, glError, __LINE__); \ - quit(1); \ - } \ - } - + quit(1); \ + } \ + } -/* +/* * Create shader, load in source, compile, dump debug as necessary. * * shader: Pointer to return created shader ID. * source: Passed-in shader source code. * shader_type: Passed to GL, e.g. GL_VERTEX_SHADER. */ -void -process_shader(GLuint *shader, const char * source, GLint shader_type) +void +process_shader(GLenum *shader, const char *source, GLenum shader_type) { GLint status = GL_FALSE; const char *shaders[1] = { NULL }; @@ -154,10 +148,10 @@ process_shader(GLuint *shader, const char * source, GLint shader_type) GL_CHECK(ctx.glGetShaderiv(*shader, GL_COMPILE_STATUS, &status)); /* Dump debug info (source and log) if compilation failed. */ - if(status != GL_TRUE) { - ctx.glGetProgramInfoLog(*shader, sizeof(buffer), &length, &buffer[0]); + if (status != GL_TRUE) { + ctx.glGetShaderInfoLog(*shader, sizeof(buffer), &length, &buffer[0]); buffer[length] = '\0'; - SDL_Log("Shader compilation failed: %s", buffer);fflush(stderr); + SDL_Log("Shader compilation failed: %s", buffer); quit(-1); } } @@ -167,7 +161,7 @@ process_shader(GLuint *shader, const char * source, GLint shader_type) * To get correct rotation for most cases when a_angle is disabled cosine * value is decremented by 1.0 to get proper output with 0.0 which is default value */ -static const Uint8 GLES2_VertexSrc_Default_[] = " \ +static const char GLES2_VertexSrc_Default_[] = " \ uniform mat4 u_projection; \ attribute vec2 a_position; \ attribute vec2 a_texCoord; \ @@ -187,7 +181,7 @@ static const Uint8 GLES2_VertexSrc_Default_[] = " \ } \ "; -static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \ +static const char GLES2_FragmentSrc_TextureABGRSrc_[] = " \ precision mediump float; \ uniform sampler2D u_texture; \ uniform vec4 u_color; \ @@ -201,7 +195,7 @@ static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \ "; /* RGB to ABGR conversion */ -static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_SDF[] = " \ +static const char GLES2_FragmentSrc_TextureABGRSrc_SDF[] = " \ #extension GL_OES_standard_derivatives : enable\n\ \ precision mediump float; \ @@ -242,19 +236,16 @@ static const char *GLES2_FragmentSrc_TextureABGRSrc_SDF_dbg = " \ } \ "; - static float g_val = 1.0f; -static int g_use_SDF = 1; -static int g_use_SDF_debug = 0; +static int g_use_SDF = 1; +static int g_use_SDF_debug = 0; static float g_angle = 0.0f; static float matrix_mvp[4][4]; - - - typedef struct shader_data { - GLuint shader_program, shader_frag, shader_vert; + GLint shader_program; + GLenum shader_frag, shader_vert; GLint attr_position; GLint attr_color, attr_mvp; @@ -262,7 +253,7 @@ typedef struct shader_data } shader_data; static void -Render(unsigned int width, unsigned int height, shader_data* data) +Render(int width, int height, shader_data* data) { float *verts = g_verts; ctx.glViewport(0, 0, 640, 480); @@ -272,17 +263,16 @@ Render(unsigned int width, unsigned int height, shader_data* data) GL_CHECK(ctx.glUniformMatrix4fv(g_uniform_locations[GLES2_UNIFORM_PROJECTION], 1, GL_FALSE, (const float *)matrix_mvp)); GL_CHECK(ctx.glUniform4f(g_uniform_locations[GLES2_UNIFORM_COLOR], 1.0f, 1.0f, 1.0f, 1.0f)); - GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_ANGLE, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (verts + 16))); - GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (verts + 8))); - GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) verts)); + GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_ANGLE, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *)(verts + 16))); + GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *)(verts + 8))); + GL_CHECK(ctx.glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *)verts)); GL_CHECK(ctx.glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); } - -void renderCopy_angle(float degree_angle) +void renderCopy_angle(float degree_angle) { - const float radian_angle = (float)(3.141592 * degree_angle) / 180.0; + const float radian_angle = (float)(3.141592 * degree_angle) / 180.0f; const GLfloat s = (GLfloat) SDL_sin(radian_angle); const GLfloat c = (GLfloat) SDL_cos(radian_angle) - 1.0f; GLfloat *verts = g_verts + 16; @@ -296,22 +286,21 @@ void renderCopy_angle(float degree_angle) *(verts++) = c; } - -void renderCopy_position(SDL_Rect *srcrect, SDL_Rect *dstrect) +void renderCopy_position(SDL_Rect *srcrect, SDL_Rect *dstrect) { GLfloat minx, miny, maxx, maxy; GLfloat minu, maxu, minv, maxv; GLfloat *verts = g_verts; - minx = dstrect->x; - miny = dstrect->y; - maxx = dstrect->x + dstrect->w; - maxy = dstrect->y + dstrect->h; + minx = (GLfloat)dstrect->x; + miny = (GLfloat)dstrect->y; + maxx = (GLfloat)(dstrect->x + dstrect->w); + maxy = (GLfloat)(dstrect->y + dstrect->h); - minu = (GLfloat) srcrect->x / g_surf_sdf->w; - maxu = (GLfloat) (srcrect->x + srcrect->w) / g_surf_sdf->w; - minv = (GLfloat) srcrect->y / g_surf_sdf->h; - maxv = (GLfloat) (srcrect->y + srcrect->h) / g_surf_sdf->h; + minu = (GLfloat) srcrect->x / (GLfloat)g_surf_sdf->w; + maxu = (GLfloat) (srcrect->x + srcrect->w) / (GLfloat)g_surf_sdf->w; + minv = (GLfloat) srcrect->y / (GLfloat)g_surf_sdf->h; + maxv = (GLfloat) (srcrect->y + srcrect->h) / (GLfloat)g_surf_sdf->h; *(verts++) = minx; *(verts++) = miny; @@ -347,71 +336,63 @@ void loop() while (SDL_PollEvent(&event) && !done) { switch (event.type) { case SDL_KEYDOWN: - { - const int sym = event.key.keysym.sym; - - if (sym == SDLK_TAB) { - SDL_Log("Tab"); - - - } - + { + const int sym = event.key.keysym.sym; - if (sym == SDLK_LEFT) g_val -= 0.05; - if (sym == SDLK_RIGHT) g_val += 0.05; - if (sym == SDLK_UP) g_angle -= 1; - if (sym == SDLK_DOWN) g_angle += 1; - + if (sym == SDLK_TAB) { + SDL_Log("Tab"); + } - break; + if (sym == SDLK_LEFT) { + g_val -= 0.05f; + } + if (sym == SDLK_RIGHT) { + g_val += 0.05f; + } + if (sym == SDLK_UP) { + g_angle -= 1.0f; } + if (sym == SDLK_DOWN) { + g_angle += 1.0f; + } + + break; + } case SDL_WINDOWEVENT: switch (event.window.event) { - case SDL_WINDOWEVENT_RESIZED: - for (i = 0; i < state->num_windows; ++i) { - if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { - int w, h; - status = SDL_GL_MakeCurrent(state->windows[i], context[i]); - if (status) { - SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); - break; - } - /* Change view port to the new window dimensions */ - SDL_GL_GetDrawableSize(state->windows[i], &w, &h); - ctx.glViewport(0, 0, w, h); - state->window_w = event.window.data1; - state->window_h = event.window.data2; - /* Update window content */ - Render(event.window.data1, event.window.data2, &datas[i]); - SDL_GL_SwapWindow(state->windows[i]); + case SDL_WINDOWEVENT_RESIZED: + for (i = 0; i < state->num_windows; ++i) { + if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { + int w, h; + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); break; } + /* Change view port to the new window dimensions */ + SDL_GL_GetDrawableSize(state->windows[i], &w, &h); + ctx.glViewport(0, 0, w, h); + state->window_w = event.window.data1; + state->window_h = event.window.data2; + /* Update window content */ + Render(event.window.data1, event.window.data2, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + break; } - break; + } + break; } } SDLTest_CommonEvent(state, &event, &done); } - matrix_mvp[3][0] = -1.0f; matrix_mvp[3][3] = 1.0f; - matrix_mvp[0][0] = 2.0f / 640.0; - matrix_mvp[1][1] = -2.0f / 480.0; + matrix_mvp[0][0] = 2.0f / 640.0f; + matrix_mvp[1][1] = -2.0f / 480.0f; matrix_mvp[3][1] = 1.0f; - - if (0) - { - float *f = (float *) matrix_mvp; - SDL_Log("-----------------------------------"); - SDL_Log("[ %f, %f, %f, %f ]", *f++, *f++, *f++, *f++); - SDL_Log("[ %f, %f, %f, %f ]", *f++, *f++, *f++, *f++); - SDL_Log("[ %f, %f, %f, %f ]", *f++, *f++, *f++, *f++); - SDL_Log("[ %f, %f, %f, %f ]", *f++, *f++, *f++, *f++); - SDL_Log("-----------------------------------"); - } renderCopy_angle(g_angle); @@ -422,24 +403,23 @@ void loop() SDL_GL_GetDrawableSize(state->windows[0], &w, &h); rs.x = 0; rs.y = 0; rs.w = g_surf_sdf->w; rs.h = g_surf_sdf->h; - rd.w = g_surf_sdf->w * g_val; rd.h = g_surf_sdf->h * g_val; + rd.w = (int)((float)g_surf_sdf->w * g_val); rd.h = (int)((float)g_surf_sdf->h * g_val); rd.x = (w - rd.w) / 2; rd.y = (h - rd.h) / 2; renderCopy_position(&rs, &rd); } - if (!done) { - for (i = 0; i < state->num_windows; ++i) { - status = SDL_GL_MakeCurrent(state->windows[i], context[i]); - if (status) { - SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); - - /* Continue for next window */ - continue; - } - Render(state->window_w, state->window_h, &datas[i]); - SDL_GL_SwapWindow(state->windows[i]); - } + for (i = 0; i < state->num_windows; ++i) { + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + + /* Continue for next window */ + continue; + } + Render(state->window_w, state->window_h, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + } } #ifdef __EMSCRIPTEN__ else { @@ -448,8 +428,7 @@ void loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int fsaa, accel; int value; @@ -466,7 +445,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -511,11 +490,11 @@ main(int argc, char *argv[]) state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; if (fsaa) { - state->gl_multisamplebuffers=1; - state->gl_multisamplesamples=fsaa; + state->gl_multisamplebuffers = 1; + state->gl_multisamplesamples = fsaa; } if (accel) { - state->gl_accelerated=1; + state->gl_accelerated = 1; } if (!SDLTest_CommonInit(state)) { quit(2); @@ -527,7 +506,7 @@ main(int argc, char *argv[]) SDL_Log("Out of memory!\n"); quit(2); } - + /* Create OpenGL ES contexts */ for (i = 0; i < state->num_windows; i++) { context[i] = SDL_GL_CreateContext(state->windows[i]); @@ -544,8 +523,8 @@ main(int argc, char *argv[]) return 0; } - SDL_memset(matrix_mvp, 0, sizeof (matrix_mvp)); - + SDL_memset(matrix_mvp, 0, sizeof(matrix_mvp)); + { SDL_Surface *tmp; char *f; @@ -557,15 +536,16 @@ main(int argc, char *argv[]) } else { f = "testgles2_sdf_img_normal.bmp"; } - + SDL_Log("SDF is %s", g_use_SDF ? "enabled" : "disabled"); /* Load SDF BMP image */ #if 1 path = GetNearbyFilename(f); - if (path == NULL) + if (path == NULL) { path = SDL_strdup(f); + } if (path == NULL) { SDL_Log("out of memory\n"); @@ -573,7 +553,7 @@ main(int argc, char *argv[]) } tmp = SDL_LoadBMP(path); - if (tmp == NULL) { + if (tmp == NULL) { SDL_Log("missing image file: %s", path); exit(-1); } else { @@ -584,10 +564,10 @@ main(int argc, char *argv[]) #else /* Generate SDF image using SDL_ttf */ - #include "SDL_ttf.h" +#include "SDL_ttf.h" char *font_file = "./font/DroidSansFallback.ttf"; char *str = "Abcde"; - SDL_Color color = { 0, 0,0, 255}; + SDL_Color color = { 0, 0, 0, 255 }; TTF_Init(); TTF_Font *font = TTF_OpenFont(font_file, 72); @@ -615,7 +595,6 @@ main(int argc, char *argv[]) SDL_SetSurfaceBlendMode(g_surf_sdf, SDL_BLENDMODE_BLEND); } - if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { SDL_GL_SetSwapInterval(1); } else { @@ -635,28 +614,28 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_RED_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); if (!status) { SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_GREEN_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); if (!status) { SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); } else { - SDL_Log( "Failed to get SDL_GL_BLUE_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); if (!status) { SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); } else { - SDL_Log( "Failed to get SDL_GL_DEPTH_SIZE: %s\n", + SDL_Log("Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError()); } if (fsaa) { @@ -664,15 +643,15 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); } else { - SDL_Log( "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_Log("Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); if (!status) { SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, - value); + value); } else { - SDL_Log( "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_Log("Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", SDL_GetError()); } } @@ -681,7 +660,7 @@ main(int argc, char *argv[]) if (!status) { SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); } else { - SDL_Log( "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_Log("Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", SDL_GetError()); } } @@ -720,7 +699,6 @@ main(int argc, char *argv[]) GL_CHECK(ctx.glTexSubImage2D(g_texture_type, 0, 0 /* xoffset */, 0 /* yoffset */, g_surf_sdf->w, g_surf_sdf->h, format, type, g_surf_sdf->pixels)); } - SDL_GL_GetDrawableSize(state->windows[i], &w, &h); ctx.glViewport(0, 0, w, h); @@ -759,23 +737,20 @@ main(int argc, char *argv[]) GL_CHECK(ctx.glUseProgram(data->shader_program)); - ctx.glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_ANGLE); - ctx.glDisableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_CENTER); + ctx.glEnableVertexAttribArray((GLenum)GLES2_ATTRIBUTE_ANGLE); + ctx.glDisableVertexAttribArray((GLenum)GLES2_ATTRIBUTE_CENTER); ctx.glEnableVertexAttribArray(GLES2_ATTRIBUTE_POSITION); - ctx.glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_TEXCOORD); - - - ctx.glUniform1i(g_uniform_locations[GLES2_UNIFORM_TEXTURE], 0); /* always texture unit 0. */ - ctx.glActiveTexture(GL_TEXTURE0); - ctx.glBindTexture(g_texture_type, g_texture); - GL_CHECK(ctx.glClearColor(1, 1, 1, 1)); - - // SDL_BLENDMODE_BLEND - GL_CHECK(ctx.glEnable(GL_BLEND)); - ctx.glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - ctx.glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD); + ctx.glEnableVertexAttribArray((GLenum)GLES2_ATTRIBUTE_TEXCOORD); + ctx.glUniform1i(g_uniform_locations[GLES2_UNIFORM_TEXTURE], 0); /* always texture unit 0. */ + ctx.glActiveTexture(GL_TEXTURE0); + ctx.glBindTexture(g_texture_type, g_texture); + GL_CHECK(ctx.glClearColor(1, 1, 1, 1)); + // SDL_BLENDMODE_BLEND + GL_CHECK(ctx.glEnable(GL_BLEND)); + ctx.glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + ctx.glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD); } /* Main render loop */ @@ -795,18 +770,17 @@ main(int argc, char *argv[]) now = SDL_GetTicks(); if (now > then) { SDL_Log("%2.2f frames per second\n", - ((double) frames * 1000) / (now - then)); + ((double)frames * 1000) / (now - then)); } -#if !defined(__ANDROID__) && !defined(__NACL__) +#if !defined(__ANDROID__) && !defined(__NACL__) quit(0); -#endif +#endif return 0; } #else /* HAVE_OPENGLES2 */ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Log("No OpenGL ES support on this system\n"); return 1; diff --git a/modules/SDL2/test/testhaptic.c b/modules/SDL2/test/testhaptic.c index 8e92da3..fa41863 100644 --- a/modules/SDL2/test/testhaptic.c +++ b/modules/SDL2/test/testhaptic.c @@ -20,21 +20,18 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND static SDL_Haptic *haptic; - /* * prototypes */ static void abort_execution(void); static void HapticPrintSupported(SDL_Haptic *); - /** * @brief The entry point of this force feedback demo. * @param[in] argc Number of arguments. * @param[in] argv Array of argc arguments. */ -int -main(int argc, char **argv) +int main(int argc, char **argv) { int i; char *name; @@ -53,9 +50,9 @@ main(int argc, char **argv) name = argv[1]; if ((SDL_strcmp(name, "--help") == 0) || (SDL_strcmp(name, "-h") == 0)) { SDL_Log("USAGE: %s [device]\n" - "If device is a two-digit number it'll use it as an index, otherwise\n" - "it'll use it as if it were part of the device's name.\n", - argv[0]); + "If device is a two-digit number it'll use it as an index, otherwise\n" + "it'll use it as if it were part of the device's name.\n", + argv[0]); return 0; } @@ -78,13 +75,14 @@ main(int argc, char **argv) /* Try to find matching device */ else { for (i = 0; i < SDL_NumHaptics(); i++) { - if (SDL_strstr(SDL_HapticName(i), name) != NULL) + if (SDL_strstr(SDL_HapticName(i), name) != NULL) { break; + } } if (i >= SDL_NumHaptics()) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", - name); + name); return 1; } } @@ -92,7 +90,7 @@ main(int argc, char **argv) haptic = SDL_HapticOpen(i); if (haptic == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", - SDL_GetError()); + SDL_GetError()); return 1; } SDL_Log("Device: %s\n", SDL_HapticName(i)); @@ -116,8 +114,8 @@ main(int argc, char **argv) SDL_Log(" effect %d: Sine Wave\n", nefx); efx[nefx].type = SDL_HAPTIC_SINE; efx[nefx].periodic.period = 1000; - efx[nefx].periodic.magnitude = -0x2000; /* Negative magnitude and ... */ - efx[nefx].periodic.phase = 18000; /* ... 180 degrees phase shift => cancel eachother */ + efx[nefx].periodic.magnitude = -0x2000; /* Negative magnitude and ... */ + efx[nefx].periodic.phase = 18000; /* ... 180 degrees phase shift => cancel eachother */ efx[nefx].periodic.length = 5000; efx[nefx].periodic.attack_length = 1000; efx[nefx].periodic.fade_length = 1000; @@ -144,13 +142,13 @@ main(int argc, char **argv) } nefx++; } - + /* Now the classical constant effect. */ if (supported & SDL_HAPTIC_CONSTANT) { SDL_Log(" effect %d: Constant Force\n", nefx); efx[nefx].type = SDL_HAPTIC_CONSTANT; efx[nefx].constant.direction.type = SDL_HAPTIC_POLAR; - efx[nefx].constant.direction.dir[0] = 20000; /* Force comes from the south-west. */ + efx[nefx].constant.direction.dir[0] = 20000; /* Force comes from the south-west. */ efx[nefx].constant.length = 5000; efx[nefx].constant.level = 0x6000; efx[nefx].constant.attack_length = 1000; @@ -162,7 +160,7 @@ main(int argc, char **argv) } nefx++; } - + /* The cute spring effect. */ if (supported & SDL_HAPTIC_SPRING) { SDL_Log(" effect %d: Condition Spring\n", nefx); @@ -173,7 +171,7 @@ main(int argc, char **argv) efx[nefx].condition.left_sat[i] = 0xFFFF; efx[nefx].condition.right_coeff[i] = 0x2000; efx[nefx].condition.left_coeff[i] = 0x2000; - efx[nefx].condition.center[i] = 0x1000; /* Displace the center for it to move. */ + efx[nefx].condition.center[i] = 0x1000; /* Displace the center for it to move. */ } id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); if (id[nefx] < 0) { @@ -210,7 +208,7 @@ main(int argc, char **argv) efx[nefx].condition.left_sat[i] = 0xFFFF; efx[nefx].condition.right_coeff[i] = 0x2000; efx[nefx].condition.left_coeff[i] = 0x2000; - efx[nefx].condition.deadband[i] = 0x1000; /* 1/16th of axis-range around the center is 'dead'. */ + efx[nefx].condition.deadband[i] = 0x1000; /* 1/16th of axis-range around the center is 'dead'. */ } id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); if (id[nefx] < 0) { @@ -237,14 +235,14 @@ main(int argc, char **argv) } nefx++; } - + /* Now we'll try a ramp effect */ if (supported & SDL_HAPTIC_RAMP) { SDL_Log(" effect %d: Ramp\n", nefx); efx[nefx].type = SDL_HAPTIC_RAMP; efx[nefx].ramp.direction.type = SDL_HAPTIC_CARTESIAN; - efx[nefx].ramp.direction.dir[0] = 1; /* Force comes from */ - efx[nefx].ramp.direction.dir[1] = -1; /* the north-east. */ + efx[nefx].ramp.direction.dir[0] = 1; /* Force comes from */ + efx[nefx].ramp.direction.dir[1] = -1; /* the north-east. */ efx[nefx].ramp.length = 5000; efx[nefx].ramp.start = 0x4000; efx[nefx].ramp.end = -0x4000; @@ -273,24 +271,22 @@ main(int argc, char **argv) nefx++; } - - SDL_Log - ("\nNow playing effects for 5 seconds each with 1 second delay between\n"); + SDL_Log("\nNow playing effects for 5 seconds each with 1 second delay between\n"); for (i = 0; i < nefx; i++) { SDL_Log(" Playing effect %d\n", i); SDL_HapticRunEffect(haptic, id[i], 1); - SDL_Delay(6000); /* Effects only have length 5000 */ + SDL_Delay(6000); /* Effects only have length 5000 */ } /* Quit */ - if (haptic != NULL) + if (haptic != NULL) { SDL_HapticClose(haptic); + } SDL_Quit(); return 0; } - /* * Cleans up a bit. */ @@ -305,52 +301,66 @@ abort_execution(void) exit(1); } - /* * Displays information about the haptic device. */ static void -HapticPrintSupported(SDL_Haptic * ptr) +HapticPrintSupported(SDL_Haptic *ptr) { unsigned int supported; supported = SDL_HapticQuery(ptr); SDL_Log(" Supported effects [%d effects, %d playing]:\n", - SDL_HapticNumEffects(ptr), SDL_HapticNumEffectsPlaying(ptr)); - if (supported & SDL_HAPTIC_CONSTANT) + SDL_HapticNumEffects(ptr), SDL_HapticNumEffectsPlaying(ptr)); + if (supported & SDL_HAPTIC_CONSTANT) { SDL_Log(" constant\n"); - if (supported & SDL_HAPTIC_SINE) + } + if (supported & SDL_HAPTIC_SINE) { SDL_Log(" sine\n"); + } /* !!! FIXME: put this back when we have more bits in 2.1 */ /* if (supported & SDL_HAPTIC_SQUARE) SDL_Log(" square\n"); */ - if (supported & SDL_HAPTIC_TRIANGLE) + if (supported & SDL_HAPTIC_TRIANGLE) { SDL_Log(" triangle\n"); - if (supported & SDL_HAPTIC_SAWTOOTHUP) + } + if (supported & SDL_HAPTIC_SAWTOOTHUP) { SDL_Log(" sawtoothup\n"); - if (supported & SDL_HAPTIC_SAWTOOTHDOWN) + } + if (supported & SDL_HAPTIC_SAWTOOTHDOWN) { SDL_Log(" sawtoothdown\n"); - if (supported & SDL_HAPTIC_RAMP) + } + if (supported & SDL_HAPTIC_RAMP) { SDL_Log(" ramp\n"); - if (supported & SDL_HAPTIC_FRICTION) + } + if (supported & SDL_HAPTIC_FRICTION) { SDL_Log(" friction\n"); - if (supported & SDL_HAPTIC_SPRING) + } + if (supported & SDL_HAPTIC_SPRING) { SDL_Log(" spring\n"); - if (supported & SDL_HAPTIC_DAMPER) + } + if (supported & SDL_HAPTIC_DAMPER) { SDL_Log(" damper\n"); - if (supported & SDL_HAPTIC_INERTIA) + } + if (supported & SDL_HAPTIC_INERTIA) { SDL_Log(" inertia\n"); - if (supported & SDL_HAPTIC_CUSTOM) + } + if (supported & SDL_HAPTIC_CUSTOM) { SDL_Log(" custom\n"); - if (supported & SDL_HAPTIC_LEFTRIGHT) + } + if (supported & SDL_HAPTIC_LEFTRIGHT) { SDL_Log(" left/right\n"); + } SDL_Log(" Supported capabilities:\n"); - if (supported & SDL_HAPTIC_GAIN) + if (supported & SDL_HAPTIC_GAIN) { SDL_Log(" gain\n"); - if (supported & SDL_HAPTIC_AUTOCENTER) + } + if (supported & SDL_HAPTIC_AUTOCENTER) { SDL_Log(" autocenter\n"); - if (supported & SDL_HAPTIC_STATUS) + } + if (supported & SDL_HAPTIC_STATUS) { SDL_Log(" status\n"); + } } #else diff --git a/modules/SDL2/test/testhittesting.c b/modules/SDL2/test/testhittesting.c index c5223a9..92ddf8c 100644 --- a/modules/SDL2/test/testhittesting.c +++ b/modules/SDL2/test/testhittesting.c @@ -29,9 +29,10 @@ hitTest(SDL_Window *window, const SDL_Point *pt, void *data) SDL_GetWindowSize(window, &w, &h); - #define REPORT_RESIZE_HIT(name) { \ +#define REPORT_RESIZE_HIT(name) \ + { \ SDL_Log("HIT-TEST: RESIZE_" #name "\n"); \ - return SDL_HITTEST_RESIZE_##name; \ + return SDL_HITTEST_RESIZE_##name; \ } if (pt->x < RESIZE_BORDER && pt->y < RESIZE_BORDER) { @@ -56,7 +57,6 @@ hitTest(SDL_Window *window, const SDL_Point *pt, void *data) return SDL_HITTEST_NORMAL; } - int main(int argc, char **argv) { int done = 0; @@ -74,8 +74,7 @@ int main(int argc, char **argv) return 1; } - while (!done) - { + while (!done) { SDL_Event e; int nothing_to_do = 1; @@ -88,39 +87,38 @@ int main(int argc, char **argv) while (SDL_PollEvent(&e)) { nothing_to_do = 0; - switch (e.type) - { - case SDL_MOUSEBUTTONDOWN: - SDL_Log("button down!\n"); - break; + switch (e.type) { + case SDL_MOUSEBUTTONDOWN: + SDL_Log("button down!\n"); + break; - case SDL_MOUSEBUTTONUP: - SDL_Log("button up!\n"); - break; + case SDL_MOUSEBUTTONUP: + SDL_Log("button up!\n"); + break; - case SDL_WINDOWEVENT: - if (e.window.event == SDL_WINDOWEVENT_MOVED) { - SDL_Log("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2); - } - break; - - case SDL_KEYDOWN: - if (e.key.keysym.sym == SDLK_ESCAPE) { - done = 1; - } else if (e.key.keysym.sym == SDLK_x) { - if (!areas) { - areas = drag_areas; - numareas = SDL_arraysize(drag_areas); - } else { - areas = NULL; - numareas = 0; - } - } - break; + case SDL_WINDOWEVENT: + if (e.window.event == SDL_WINDOWEVENT_MOVED) { + SDL_Log("Window event moved to (%d, %d)!\n", (int)e.window.data1, (int)e.window.data2); + } + break; - case SDL_QUIT: + case SDL_KEYDOWN: + if (e.key.keysym.sym == SDLK_ESCAPE) { done = 1; - break; + } else if (e.key.keysym.sym == SDLK_x) { + if (areas == NULL) { + areas = drag_areas; + numareas = SDL_arraysize(drag_areas); + } else { + areas = NULL; + numareas = 0; + } + } + break; + + case SDL_QUIT: + done = 1; + break; } } diff --git a/modules/SDL2/test/testhotplug.c b/modules/SDL2/test/testhotplug.c index 51568be..1ac73a7 100644 --- a/modules/SDL2/test/testhotplug.c +++ b/modules/SDL2/test/testhotplug.c @@ -20,8 +20,7 @@ #if !defined SDL_JOYSTICK_DISABLED && !defined SDL_HAPTIC_DISABLED -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Joystick *joystick = NULL; SDL_Haptic *haptic = NULL; @@ -30,17 +29,17 @@ main(int argc, char *argv[]) int i; SDL_bool enable_haptic = SDL_TRUE; Uint32 init_subsystems = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK; - + for (i = 1; i < argc; ++i) { if (SDL_strcasecmp(argv[i], "--nohaptic") == 0) { enable_haptic = SDL_FALSE; } } - if(enable_haptic) { + if (enable_haptic) { init_subsystems |= SDL_INIT_HAPTIC; } - + /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); @@ -57,91 +56,78 @@ main(int argc, char *argv[]) */ SDL_Log("There are %d joysticks at startup\n", SDL_NumJoysticks()); - if (enable_haptic) + if (enable_haptic) { SDL_Log("There are %d haptic devices at startup\n", SDL_NumHaptics()); + } - while(keepGoing) - { + while (keepGoing) { SDL_Event event; - while(SDL_PollEvent(&event)) - { - switch(event.type) - { - case SDL_QUIT: - keepGoing = SDL_FALSE; - break; - case SDL_JOYDEVICEADDED: - if (joystick != NULL) - { - SDL_Log("Only one joystick supported by this test\n"); - } - else - { - joystick = SDL_JoystickOpen(event.jdevice.which); - instance = SDL_JoystickInstanceID(joystick); - SDL_Log("Joy Added : %" SDL_PRIs32 " : %s\n", event.jdevice.which, SDL_JoystickName(joystick)); - if (enable_haptic) - { - if (SDL_JoystickIsHaptic(joystick)) - { - haptic = SDL_HapticOpenFromJoystick(joystick); - if (haptic) - { - SDL_Log("Joy Haptic Opened\n"); - if (SDL_HapticRumbleInit( haptic ) != 0) - { - SDL_Log("Could not init Rumble!: %s\n", SDL_GetError()); - SDL_HapticClose(haptic); - haptic = NULL; - } - } else { - SDL_Log("Joy haptic open FAILED!: %s\n", SDL_GetError()); + while (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_QUIT: + keepGoing = SDL_FALSE; + break; + case SDL_JOYDEVICEADDED: + if (joystick != NULL) { + SDL_Log("Only one joystick supported by this test\n"); + } else { + joystick = SDL_JoystickOpen(event.jdevice.which); + instance = SDL_JoystickInstanceID(joystick); + SDL_Log("Joy Added : %" SDL_PRIs32 " : %s\n", event.jdevice.which, SDL_JoystickName(joystick)); + if (enable_haptic) { + if (SDL_JoystickIsHaptic(joystick)) { + haptic = SDL_HapticOpenFromJoystick(joystick); + if (haptic) { + SDL_Log("Joy Haptic Opened\n"); + if (SDL_HapticRumbleInit(haptic) != 0) { + SDL_Log("Could not init Rumble!: %s\n", SDL_GetError()); + SDL_HapticClose(haptic); + haptic = NULL; } + } else { + SDL_Log("Joy haptic open FAILED!: %s\n", SDL_GetError()); } - else - { - SDL_Log("No haptic found\n"); - } + } else { + SDL_Log("No haptic found\n"); } } - break; - case SDL_JOYDEVICEREMOVED: - if (instance == event.jdevice.which) - { - SDL_Log("Joy Removed: %" SDL_PRIs32 "\n", event.jdevice.which); - instance = -1; - if(enable_haptic && haptic) - { - SDL_HapticClose(haptic); - haptic = NULL; - } - SDL_JoystickClose(joystick); - joystick = NULL; - } else { - SDL_Log("Unknown joystick diconnected\n"); + } + break; + case SDL_JOYDEVICEREMOVED: + if (instance == event.jdevice.which) { + SDL_Log("Joy Removed: %" SDL_PRIs32 "\n", event.jdevice.which); + instance = -1; + if (enable_haptic && haptic) { + SDL_HapticClose(haptic); + haptic = NULL; } - break; - case SDL_JOYAXISMOTION: -/* -// SDL_Log("Axis Move: %d\n", event.jaxis.axis); -*/ - if (enable_haptic) - SDL_HapticRumblePlay(haptic, 0.25, 250); - break; - case SDL_JOYBUTTONDOWN: - SDL_Log("Button Press: %d\n", event.jbutton.button); - if(enable_haptic && haptic) - { - SDL_HapticRumblePlay(haptic, 0.25, 250); - } - if (event.jbutton.button == 0) { - SDL_Log("Exiting due to button press of button 0\n"); - keepGoing = SDL_FALSE; - } - break; - case SDL_JOYBUTTONUP: - SDL_Log("Button Release: %d\n", event.jbutton.button); - break; + SDL_JoystickClose(joystick); + joystick = NULL; + } else { + SDL_Log("Unknown joystick diconnected\n"); + } + break; + case SDL_JOYAXISMOTION: + /* + // SDL_Log("Axis Move: %d\n", event.jaxis.axis); + */ + if (enable_haptic) { + SDL_HapticRumblePlay(haptic, 0.25, 250); + } + break; + case SDL_JOYBUTTONDOWN: + SDL_Log("Button Press: %d\n", event.jbutton.button); + if (enable_haptic && haptic) { + SDL_HapticRumblePlay(haptic, 0.25, 250); + } + if (event.jbutton.button == 0) { + SDL_Log("Exiting due to button press of button 0\n"); + keepGoing = SDL_FALSE; + } + break; + case SDL_JOYBUTTONUP: + SDL_Log("Button Release: %d\n", event.jbutton.button); + break; } } } diff --git a/modules/SDL2/test/testiconv.c b/modules/SDL2/test/testiconv.c index f38136c..b2d13a6 100644 --- a/modules/SDL2/test/testiconv.c +++ b/modules/SDL2/test/testiconv.c @@ -12,7 +12,7 @@ /* quiet windows compiler warnings */ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) -# define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS #endif #include @@ -24,15 +24,14 @@ static size_t widelen(char *data) { size_t len = 0; - Uint32 *p = (Uint32 *) data; + Uint32 *p = (Uint32 *)data; while (*p++) { ++len; } return len; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { const char *formats[] = { "UTF8", @@ -49,7 +48,7 @@ main(int argc, char *argv[]) "UCS-4", }; - char * fname; + char *fname; char buffer[BUFSIZ]; char *ucs4; char *test[2]; @@ -62,9 +61,9 @@ main(int argc, char *argv[]) fname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "utf8.txt"); file = fopen(fname, "rb"); - if (!file) { + if (file == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to open %s\n", fname); - return (1); + return 1; } SDL_free(fname); @@ -87,11 +86,11 @@ main(int argc, char *argv[]) } test[0] = SDL_iconv_string("UTF-8", "UCS-4", ucs4, len); SDL_free(ucs4); - fputs(test[0], stdout); + (void)fputs(test[0], stdout); SDL_free(test[0]); } - fclose(file); + (void)fclose(file); SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Total errors: %d\n", errors); - return (errors ? errors + 1 : 0); + return errors ? errors + 1 : 0; } diff --git a/modules/SDL2/test/testime.c b/modules/SDL2/test/testime.c index a790424..51f685b 100644 --- a/modules/SDL2/test/testime.c +++ b/modules/SDL2/test/testime.c @@ -42,41 +42,43 @@ static SDLTest_CommonState *state; static SDL_Rect textRect, markedRect; -static SDL_Color lineColor = {0,0,0,255}; -static SDL_Color backColor = {255,255,255,255}; -static SDL_Color textColor = {0,0,0,255}; +static SDL_Color lineColor = { 0, 0, 0, 255 }; +static SDL_Color backColor = { 255, 255, 255, 255 }; +static SDL_Color textColor = { 0, 0, 0, 255 }; static char text[MAX_TEXT_LENGTH], markedText[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; static int cursor = 0; #ifdef HAVE_SDL_TTF static TTF_Font *font; #else -#define UNIFONT_MAX_CODEPOINT 0x1ffff -#define UNIFONT_NUM_GLYPHS 0x20000 +#define UNIFONT_MAX_CODEPOINT 0x1ffff +#define UNIFONT_NUM_GLYPHS 0x20000 /* Using 512x512 textures that are supported everywhere. */ -#define UNIFONT_TEXTURE_WIDTH 512 -#define UNIFONT_GLYPHS_IN_ROW (UNIFONT_TEXTURE_WIDTH / 16) +#define UNIFONT_TEXTURE_WIDTH 512 +#define UNIFONT_GLYPHS_IN_ROW (UNIFONT_TEXTURE_WIDTH / 16) #define UNIFONT_GLYPHS_IN_TEXTURE (UNIFONT_GLYPHS_IN_ROW * UNIFONT_GLYPHS_IN_ROW) -#define UNIFONT_NUM_TEXTURES ((UNIFONT_NUM_GLYPHS + UNIFONT_GLYPHS_IN_TEXTURE - 1) / UNIFONT_GLYPHS_IN_TEXTURE) -#define UNIFONT_TEXTURE_SIZE (UNIFONT_TEXTURE_WIDTH * UNIFONT_TEXTURE_WIDTH * 4) -#define UNIFONT_TEXTURE_PITCH (UNIFONT_TEXTURE_WIDTH * 4) -#define UNIFONT_DRAW_SCALE 2 -struct UnifontGlyph { +#define UNIFONT_NUM_TEXTURES ((UNIFONT_NUM_GLYPHS + UNIFONT_GLYPHS_IN_TEXTURE - 1) / UNIFONT_GLYPHS_IN_TEXTURE) +#define UNIFONT_TEXTURE_SIZE (UNIFONT_TEXTURE_WIDTH * UNIFONT_TEXTURE_WIDTH * 4) +#define UNIFONT_TEXTURE_PITCH (UNIFONT_TEXTURE_WIDTH * 4) +#define UNIFONT_DRAW_SCALE 2 +struct UnifontGlyph +{ Uint8 width; Uint8 data[32]; -} *unifontGlyph; +} * unifontGlyph; static SDL_Texture **unifontTexture; -static Uint8 unifontTextureLoaded[UNIFONT_NUM_TEXTURES] = {0}; +static Uint8 unifontTextureLoaded[UNIFONT_NUM_TEXTURES] = { 0 }; /* Unifont loading code start */ static Uint8 dehex(char c) { - if (c >= '0' && c <= '9') + if (c >= '0' && c <= '9') { return c - '0'; - else if (c >= 'a' && c <= 'f') + } else if (c >= 'a' && c <= 'f') { return c - 'a' + 10; - else if (c >= 'A' && c <= 'F') + } else if (c >= 'A' && c <= 'F') { return c - 'A' + 10; + } return 255; } @@ -88,15 +90,16 @@ static Uint8 dehex2(char c1, char c2) static Uint8 validate_hex(const char *cp, size_t len, Uint32 *np) { Uint32 n = 0; - for (; len > 0; cp++, len--) - { + for (; len > 0; cp++, len--) { Uint8 c = dehex(*cp); - if (c == 255) + if (c == 255) { return 0; + } n = (n << 4) | c; } - if (np != NULL) + if (np != NULL) { *np = n; + } return 1; } @@ -113,8 +116,7 @@ static int unifont_init(const char *fontname) /* Allocate memory for the glyph data so the file can be closed after initialization. */ unifontGlyph = (struct UnifontGlyph *)SDL_malloc(unifontGlyphSize); - if (unifontGlyph == NULL) - { + if (unifontGlyph == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d KiB for glyph data.\n", (int)(unifontGlyphSize + 1023) / 1024); return -1; } @@ -122,8 +124,7 @@ static int unifont_init(const char *fontname) /* Allocate memory for texture pointers for all renderers. */ unifontTexture = (SDL_Texture **)SDL_malloc(unifontTextureSize); - if (unifontTexture == NULL) - { + if (unifontTexture == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d KiB for texture pointer data.\n", (int)(unifontTextureSize + 1023) / 1024); return -1; } @@ -136,8 +137,7 @@ static int unifont_init(const char *fontname) } hexFile = SDL_RWFromFile(filename, "rb"); SDL_free(filename); - if (hexFile == NULL) - { + if (hexFile == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to open font file: %s\n", fontname); return -1; } @@ -150,76 +150,71 @@ static int unifont_init(const char *fontname) Uint32 codepoint; bytesRead = SDL_RWread(hexFile, hexBuffer, 1, 9); - if (numGlyphs > 0 && bytesRead == 0) + if (numGlyphs > 0 && bytesRead == 0) { break; /* EOF */ - if ((numGlyphs == 0 && bytesRead == 0) || (numGlyphs > 0 && bytesRead < 9)) - { + } + if ((numGlyphs == 0 && bytesRead == 0) || (numGlyphs > 0 && bytesRead < 9)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n"); return -1; } /* Looking for the colon that separates the codepoint and glyph data at position 2, 4, 6 and 8. */ - if (hexBuffer[2] == ':') + if (hexBuffer[2] == ':') { codepointHexSize = 2; - else if (hexBuffer[4] == ':') + } else if (hexBuffer[4] == ':') { codepointHexSize = 4; - else if (hexBuffer[6] == ':') + } else if (hexBuffer[6] == ':') { codepointHexSize = 6; - else if (hexBuffer[8] == ':') + } else if (hexBuffer[8] == ':') { codepointHexSize = 8; - else - { + } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Could not find codepoint and glyph data separator symbol in hex file on line %d.\n", lineNumber); return -1; } - if (!validate_hex((const char *)hexBuffer, codepointHexSize, &codepoint)) - { + if (!validate_hex((const char *)hexBuffer, codepointHexSize, &codepoint)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Malformed hexadecimal number in hex file on line %d.\n", lineNumber); return -1; } - if (codepoint > UNIFONT_MAX_CODEPOINT) + if (codepoint > UNIFONT_MAX_CODEPOINT) { SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Codepoint on line %d exceeded limit of 0x%x.\n", lineNumber, UNIFONT_MAX_CODEPOINT); + } /* If there was glyph data read in the last file read, move it to the front of the buffer. */ bytesOverread = 8 - codepointHexSize; - if (codepointHexSize < 8) + if (codepointHexSize < 8) { SDL_memmove(hexBuffer, hexBuffer + codepointHexSize + 1, bytesOverread); + } bytesRead = SDL_RWread(hexFile, hexBuffer + bytesOverread, 1, 33 - bytesOverread); - if (bytesRead < (33 - bytesOverread)) - { + if (bytesRead < (33 - bytesOverread)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n"); return -1; } - if (hexBuffer[32] == '\n') + if (hexBuffer[32] == '\n') { glyphWidth = 8; - else - { + } else { glyphWidth = 16; bytesRead = SDL_RWread(hexFile, hexBuffer + 33, 1, 32); - if (bytesRead < 32) - { + if (bytesRead < 32) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n"); return -1; } } - if (!validate_hex((const char *)hexBuffer, glyphWidth * 4, NULL)) - { + if (!validate_hex((const char *)hexBuffer, glyphWidth * 4, NULL)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Malformed hexadecimal glyph data in hex file on line %d.\n", lineNumber); return -1; } - if (codepoint <= UNIFONT_MAX_CODEPOINT) - { - if (unifontGlyph[codepoint].width > 0) + if (codepoint <= UNIFONT_MAX_CODEPOINT) { + if (unifontGlyph[codepoint].width > 0) { SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Ignoring duplicate codepoint 0x%08" SDL_PRIx32 " in hex file on line %d.\n", codepoint, lineNumber); - else - { + } else { unifontGlyph[codepoint].width = glyphWidth; /* Pack the hex data into a more compact form. */ - for (i = 0; i < glyphWidth * 2; i++) + for (i = 0; i < glyphWidth * 2; i++) { unifontGlyph[codepoint].data[i] = dehex2(hexBuffer[i * 2], hexBuffer[i * 2 + 1]); + } numGlyphs++; } } @@ -232,25 +227,21 @@ static int unifont_init(const char *fontname) return 0; } -static void unifont_make_rgba(Uint8 *src, Uint8 *dst, Uint8 width) +static void +unifont_make_rgba(const Uint8 *src, Uint8 *dst, Uint8 width) { int i, j; Uint8 *row = dst; - for (i = 0; i < width * 2; i++) - { + for (i = 0; i < width * 2; i++) { Uint8 data = src[i]; - for (j = 0; j < 8; j++) - { - if (data & 0x80) - { + for (j = 0; j < 8; j++) { + if (data & 0x80) { row[0] = textColor.r; row[1] = textColor.g; row[2] = textColor.b; row[3] = textColor.a; - } - else - { + } else { row[0] = 0; row[1] = 0; row[2] = 0; @@ -260,8 +251,7 @@ static void unifont_make_rgba(Uint8 *src, Uint8 *dst, Uint8 width) row += 4; } - if (width == 8 || (width == 16 && i % 2 == 1)) - { + if (width == 8 || (width == 16 && i % 2 == 1)) { dst += UNIFONT_TEXTURE_PITCH; row = dst; } @@ -271,51 +261,45 @@ static void unifont_make_rgba(Uint8 *src, Uint8 *dst, Uint8 width) static int unifont_load_texture(Uint32 textureID) { int i; - Uint8 * textureRGBA; + Uint8 *textureRGBA; - if (textureID >= UNIFONT_NUM_TEXTURES) - { + if (textureID >= UNIFONT_NUM_TEXTURES) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Tried to load out of range texture %" SDL_PRIu32 "\n", textureID); return -1; } textureRGBA = (Uint8 *)SDL_malloc(UNIFONT_TEXTURE_SIZE); - if (textureRGBA == NULL) - { + if (textureRGBA == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d MiB for a texture.\n", UNIFONT_TEXTURE_SIZE / 1024 / 1024); return -1; } SDL_memset(textureRGBA, 0, UNIFONT_TEXTURE_SIZE); /* Copy the glyphs into memory in RGBA format. */ - for (i = 0; i < UNIFONT_GLYPHS_IN_TEXTURE; i++) - { + for (i = 0; i < UNIFONT_GLYPHS_IN_TEXTURE; i++) { Uint32 codepoint = UNIFONT_GLYPHS_IN_TEXTURE * textureID + i; - if (unifontGlyph[codepoint].width > 0) - { + if (unifontGlyph[codepoint].width > 0) { const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE; - const size_t offset = (cInTex / UNIFONT_GLYPHS_IN_ROW) * UNIFONT_TEXTURE_PITCH * 16 + (cInTex % UNIFONT_GLYPHS_IN_ROW) * 16 * 4; + const size_t offset = ((size_t)cInTex / UNIFONT_GLYPHS_IN_ROW) * UNIFONT_TEXTURE_PITCH * 16 + (cInTex % UNIFONT_GLYPHS_IN_ROW) * 16 * 4; unifont_make_rgba(unifontGlyph[codepoint].data, textureRGBA + offset, unifontGlyph[codepoint].width); } } /* Create textures and upload the RGBA data from above. */ - for (i = 0; i < state->num_windows; ++i) - { + for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID]; - if (state->windows[i] == NULL || renderer == NULL || tex != NULL) + if (state->windows[i] == NULL || renderer == NULL || tex != NULL) { continue; + } tex = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, UNIFONT_TEXTURE_WIDTH, UNIFONT_TEXTURE_WIDTH); - if (tex == NULL) - { + if (tex == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to create texture %" SDL_PRIu32 " for renderer %d.\n", textureID, i); return -1; } unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID] = tex; SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND); - if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0) - { + if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0) { SDL_Log("unifont error: Failed to update texture %" SDL_PRIu32 " data for renderer %d.\n", textureID, i); } } @@ -340,8 +324,7 @@ static Sint32 unifont_draw_glyph(Uint32 codepoint, int rendererID, SDL_Rect *dst } } texture = unifontTexture[UNIFONT_NUM_TEXTURES * rendererID + textureID]; - if (texture != NULL) - { + if (texture != NULL) { const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE; srcrect.x = cInTex % UNIFONT_GLYPHS_IN_ROW * 16; srcrect.y = cInTex / UNIFONT_GLYPHS_IN_ROW * 16; @@ -353,21 +336,22 @@ static Sint32 unifont_draw_glyph(Uint32 codepoint, int rendererID, SDL_Rect *dst static void unifont_cleanup() { int i, j; - for (i = 0; i < state->num_windows; ++i) - { + for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL || renderer == NULL) + if (state->windows[i] == NULL || renderer == NULL) { continue; - for (j = 0; j < UNIFONT_NUM_TEXTURES; j++) - { + } + for (j = 0; j < UNIFONT_NUM_TEXTURES; j++) { SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + j]; - if (tex != NULL) + if (tex != NULL) { SDL_DestroyTexture(tex); + } } } - for (j = 0; j < UNIFONT_NUM_TEXTURES; j++) - unifontTextureLoaded[j] = 0; + for (j = 0; j < UNIFONT_NUM_TEXTURES; j++) { + unifontTextureLoaded[j] = 0; + } SDL_free(unifontTexture); SDL_free(unifontGlyph); @@ -379,30 +363,31 @@ static void unifont_cleanup() size_t utf8_length(unsigned char c) { c = (unsigned char)(0xff & c); - if (c < 0x80) + if (c < 0x80) { return 1; - else if ((c >> 5) ==0x6) + } else if ((c >> 5) == 0x6) { return 2; - else if ((c >> 4) == 0xe) + } else if ((c >> 4) == 0xe) { return 3; - else if ((c >> 3) == 0x1e) + } else if ((c >> 3) == 0x1e) { return 4; - else - return 0; + } + return 0; } char *utf8_next(char *p) { size_t len = utf8_length(*p); size_t i = 0; - if (!len) + if (!len) { return 0; + } - for (; i < len; ++i) - { + for (; i < len; ++i) { ++p; - if (!*p) + if (!*p) { return 0; + } } return p; } @@ -410,8 +395,7 @@ char *utf8_next(char *p) char *utf8_advance(char *p, size_t distance) { size_t i = 0; - for (; i < distance && p; ++i) - { + for (; i < distance && p; ++i) { p = utf8_next(p); } return p; @@ -421,20 +405,20 @@ Uint32 utf8_decode(char *p, size_t len) { Uint32 codepoint = 0; size_t i = 0; - if (!len) + if (!len) { return 0; + } - for (; i < len; ++i) - { - if (i == 0) + for (; i < len; ++i) { + if (i == 0) { codepoint = (0xff >> len) & *p; - else - { + } else { codepoint <<= 6; codepoint |= 0x3f & *p; } - if (!*p) + if (!*p) { return 0; + } p++; } @@ -473,16 +457,15 @@ void CleanupVideo() void _Redraw(int rendererID) { - SDL_Renderer * renderer = state->renderers[rendererID]; + SDL_Renderer *renderer = state->renderers[rendererID]; SDL_Rect drawnTextRect, cursorRect, underlineRect; drawnTextRect = textRect; drawnTextRect.w = 0; SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a); - SDL_RenderFillRect(renderer,&textRect); + SDL_RenderFillRect(renderer, &textRect); - if (*text) - { + if (*text) { #ifdef HAVE_SDL_TTF SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, textColor); SDL_Texture *texture; @@ -492,10 +475,10 @@ void _Redraw(int rendererID) drawnTextRect.w = textSur->w; drawnTextRect.h = textSur->h; - texture = SDL_CreateTextureFromSurface(renderer,textSur); + texture = SDL_CreateTextureFromSurface(renderer, textSur); SDL_FreeSurface(textSur); - SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect); + SDL_RenderCopy(renderer, texture, NULL, &drawnTextRect); SDL_DestroyTexture(texture); #else char *utext = text; @@ -510,8 +493,7 @@ void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) - { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance; @@ -522,14 +504,11 @@ void _Redraw(int rendererID) markedRect.x = textRect.x + drawnTextRect.w; markedRect.w = textRect.w - drawnTextRect.w; - if (markedRect.w < 0) - { + if (markedRect.w < 0) { /* Stop text input because we cannot hold any more characters */ SDL_StopTextInput(); return; - } - else - { + } else { SDL_StartTextInput(); } @@ -542,19 +521,18 @@ void _Redraw(int rendererID) drawnTextRect.w = 0; SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a); - SDL_RenderFillRect(renderer,&markedRect); + SDL_RenderFillRect(renderer, &markedRect); - if (markedText[0]) - { + if (markedText[0]) { #ifdef HAVE_SDL_TTF SDL_Surface *textSur; SDL_Texture *texture; - if (cursor) - { + if (cursor) { char *p = utf8_advance(markedText, cursor); char c = 0; - if (!p) + if (p == NULL) { p = &markedText[SDL_strlen(markedText)]; + } c = *p; *p = 0; @@ -568,10 +546,10 @@ void _Redraw(int rendererID) drawnTextRect.w = textSur->w; drawnTextRect.h = textSur->h; - texture = SDL_CreateTextureFromSurface(renderer,textSur); + texture = SDL_CreateTextureFromSurface(renderer, textSur); SDL_FreeSurface(textSur); - SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect); + SDL_RenderCopy(renderer, texture, NULL, &drawnTextRect); SDL_DestroyTexture(texture); #else int i = 0; @@ -587,20 +565,19 @@ void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) - { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance; - if (i < cursor) + if (i < cursor) { cursorRect.x += advance; + } i++; utext += len; } #endif - if (cursor > 0) - { + if (cursor > 0) { cursorRect.y = drawnTextRect.y; cursorRect.h = drawnTextRect.h; } @@ -615,7 +592,7 @@ void _Redraw(int rendererID) } SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a); - SDL_RenderFillRect(renderer,&cursorRect); + SDL_RenderFillRect(renderer, &cursorRect); SDL_SetTextInputRect(&markedRect); } @@ -625,8 +602,9 @@ void Redraw() int i; for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0); SDL_RenderClear(renderer); @@ -648,27 +626,25 @@ int main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } - for (i = 1; i < argc;i++) { + for (i = 1; i < argc; i++) { SDLTest_CommonArg(state, i); } - for (argc--, argv++; argc > 0; argc--, argv++) - { + for (argc--, argv++; argc > 0; argc--, argv++) { if (SDL_strcmp(argv[0], "--help") == 0) { usage(); return 0; } - else if (SDL_strcmp(argv[0], "--font") == 0) - { + else if (SDL_strcmp(argv[0], "--font") == 0) { argc--; argv++; - if (argc > 0) + if (argc > 0) { fontname = argv[0]; - else { + } else { usage(); return 0; } @@ -679,14 +655,12 @@ int main(int argc, char *argv[]) return 2; } - #ifdef HAVE_SDL_TTF /* Initialize fonts */ TTF_Init(); font = TTF_OpenFont(fontname, DEFAULT_PTSIZE); - if (! font) - { + if (font == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to find font: %s\n", TTF_GetError()); return -1; } @@ -713,91 +687,82 @@ int main(int argc, char *argv[]) /* Check for events */ while (SDL_PollEvent(&event)) { SDLTest_CommonEvent(state, &event, &done); - switch(event.type) { - case SDL_KEYDOWN: { - switch (event.key.keysym.sym) - { - case SDLK_RETURN: - text[0]=0x00; - Redraw(); - break; - case SDLK_BACKSPACE: - /* Only delete text if not in editing mode. */ - if (!markedText[0]) - { - size_t textlen = SDL_strlen(text); - - do { - if (textlen==0) - { - break; - } - if ((text[textlen-1] & 0x80) == 0x00) - { - /* One byte */ - text[textlen-1]=0x00; - break; - } - if ((text[textlen-1] & 0xC0) == 0x80) - { - /* Byte from the multibyte sequence */ - text[textlen-1]=0x00; - textlen--; - } - if ((text[textlen-1] & 0xC0) == 0xC0) - { - /* First byte of multibyte sequence */ - text[textlen-1]=0x00; - break; - } - } while(1); - - Redraw(); - } - break; - } - - if (done) - { - break; + switch (event.type) { + case SDL_KEYDOWN: + switch (event.key.keysym.sym) { + case SDLK_RETURN: + text[0] = 0x00; + Redraw(); + break; + case SDLK_BACKSPACE: + /* Only delete text if not in editing mode. */ + if (!markedText[0]) { + size_t textlen = SDL_strlen(text); + + do { + if (textlen == 0) { + break; + } + if (!(text[textlen - 1] & 0x80)) { + /* One byte */ + text[textlen - 1] = 0x00; + break; + } + if ((text[textlen - 1] & 0xC0) == 0x80) { + /* Byte from the multibyte sequence */ + text[textlen - 1] = 0x00; + textlen--; + } + if ((text[textlen - 1] & 0xC0) == 0xC0) { + /* First byte of multibyte sequence */ + text[textlen - 1] = 0x00; + break; + } + } while (1); + + Redraw(); } - - SDL_Log("Keyboard: scancode 0x%08X = %s, keycode 0x%08" SDL_PRIX32 " = %s\n", - event.key.keysym.scancode, - SDL_GetScancodeName(event.key.keysym.scancode), - SDL_static_cast(Uint32, event.key.keysym.sym), - SDL_GetKeyName(event.key.keysym.sym)); break; + } - case SDL_TEXTINPUT: - if (event.text.text[0] == '\0' || event.text.text[0] == '\n' || - markedRect.w < 0) - break; - - SDL_Log("Keyboard: text input \"%s\"\n", event.text.text); - - if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text)) - SDL_strlcat(text, event.text.text, sizeof(text)); + if (done) { + break; + } - SDL_Log("text inputed: %s\n", text); + SDL_Log("Keyboard: scancode 0x%08X = %s, keycode 0x%08" SDL_PRIX32 " = %s\n", + event.key.keysym.scancode, + SDL_GetScancodeName(event.key.keysym.scancode), + SDL_static_cast(Uint32, event.key.keysym.sym), + SDL_GetKeyName(event.key.keysym.sym)); + break; - /* After text inputed, we can clear up markedText because it */ - /* is committed */ - markedText[0] = 0; - Redraw(); + case SDL_TEXTINPUT: + if (event.text.text[0] == '\0' || event.text.text[0] == '\n' || markedRect.w < 0) { break; + } - case SDL_TEXTEDITING: - SDL_Log("text editing \"%s\", selected range (%" SDL_PRIs32 ", %" SDL_PRIs32 ")\n", - event.edit.text, event.edit.start, event.edit.length); + SDL_Log("Keyboard: text input \"%s\"\n", event.text.text); - SDL_strlcpy(markedText, event.edit.text, SDL_TEXTEDITINGEVENT_TEXT_SIZE); - cursor = event.edit.start; - Redraw(); - break; + if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text)) { + SDL_strlcat(text, event.text.text, sizeof(text)); } + + SDL_Log("text inputed: %s\n", text); + + /* After text inputed, we can clear up markedText because it */ + /* is committed */ + markedText[0] = 0; + Redraw(); break; + case SDL_TEXTEDITING: + SDL_Log("text editing \"%s\", selected range (%" SDL_PRIs32 ", %" SDL_PRIs32 ")\n", + event.edit.text, event.edit.start, event.edit.length); + + SDL_strlcpy(markedText, event.edit.text, SDL_TEXTEDITINGEVENT_TEXT_SIZE); + cursor = event.edit.start; + Redraw(); + break; } } } diff --git a/modules/SDL2/test/testintersections.c b/modules/SDL2/test/testintersections.c index 12aa1ff..f24d9fb 100644 --- a/modules/SDL2/test/testintersections.c +++ b/modules/SDL2/test/testintersections.c @@ -22,7 +22,12 @@ #include "SDL_test_common.h" -#define SWAP(typ,a,b) do{typ t=a;a=b;b=t;}while(0) +#define SWAP(typ, a, b) \ + do { \ + typ t = a; \ + a = b; \ + b = t; \ + } while (0) #define NUM_OBJECTS 100 static SDLTest_CommonState *state; @@ -37,8 +42,7 @@ static SDL_BlendMode blendMode = SDL_BLENDMODE_NONE; int mouse_begin_x = -1, mouse_begin_y = -1; int done; -void -DrawPoints(SDL_Renderer * renderer) +void DrawPoints(SDL_Renderer *renderer) { int i; int x, y; @@ -71,8 +75,8 @@ DrawPoints(SDL_Renderer * renderer) cycle_direction = -cycle_direction; } } - SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color, - (Uint8) current_color, (Uint8) current_alpha); + SDL_SetRenderDrawColor(renderer, 255, (Uint8)current_color, + (Uint8)current_color, (Uint8)current_alpha); x = rand() % viewport.w; y = rand() % viewport.h; @@ -86,10 +90,12 @@ SDL_Rect lines[MAX_LINES]; static int add_line(int x1, int y1, int x2, int y2) { - if (num_lines >= MAX_LINES) + if (num_lines >= MAX_LINES) { return 0; - if ((x1 == x2) && (y1 == y2)) + } + if ((x1 == x2) && (y1 == y2)) { return 0; + } SDL_Log("adding line (%d, %d), (%d, %d)\n", x1, y1, x2, y2); lines[num_lines].x = x1; @@ -100,9 +106,7 @@ add_line(int x1, int y1, int x2, int y2) return ++num_lines; } - -void -DrawLines(SDL_Renderer * renderer) +void DrawLines(SDL_Renderer *renderer) { int i; SDL_Rect viewport; @@ -130,18 +134,22 @@ SDL_Rect rects[MAX_RECTS]; static int add_rect(int x1, int y1, int x2, int y2) { - if (num_rects >= MAX_RECTS) + if (num_rects >= MAX_RECTS) { return 0; - if ((x1 == x2) || (y1 == y2)) + } + if ((x1 == x2) || (y1 == y2)) { return 0; + } - if (x1 > x2) + if (x1 > x2) { SWAP(int, x1, x2); - if (y1 > y2) + } + if (y1 > y2) { SWAP(int, y1, y2); + } SDL_Log("adding rect (%d, %d), (%d, %d) [%dx%d]\n", x1, y1, x2, y2, - x2 - x1, y2 - y1); + x2 - x1, y2 - y1); rects[num_rects].x = x1; rects[num_rects].y = y1; @@ -152,20 +160,20 @@ add_rect(int x1, int y1, int x2, int y2) } static void -DrawRects(SDL_Renderer * renderer) +DrawRects(SDL_Renderer *renderer) { SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255); SDL_RenderFillRects(renderer, rects, num_rects); } static void -DrawRectLineIntersections(SDL_Renderer * renderer) +DrawRectLineIntersections(SDL_Renderer *renderer) { int i, j; SDL_SetRenderDrawColor(renderer, 0, 255, 55, 255); - for (i = 0; i < num_rects; i++) + for (i = 0; i < num_rects; i++) { for (j = 0; j < num_lines; j++) { int x1, y1, x2, y2; SDL_Rect r; @@ -180,26 +188,27 @@ DrawRectLineIntersections(SDL_Renderer * renderer) SDL_RenderDrawLine(renderer, x1, y1, x2, y2); } } + } } static void -DrawRectRectIntersections(SDL_Renderer * renderer) +DrawRectRectIntersections(SDL_Renderer *renderer) { int i, j; SDL_SetRenderDrawColor(renderer, 255, 200, 0, 255); - for (i = 0; i < num_rects; i++) + for (i = 0; i < num_rects; i++) { for (j = i + 1; j < num_rects; j++) { SDL_Rect r; if (SDL_IntersectRect(&rects[i], &rects[j], &r)) { SDL_RenderFillRect(renderer, &r); } } + } } -void -loop() +void loop() { int i; SDL_Event event; @@ -213,28 +222,30 @@ loop() mouse_begin_y = event.button.y; break; case SDL_MOUSEBUTTONUP: - if (event.button.button == 3) - add_line(mouse_begin_x, mouse_begin_y, event.button.x, - event.button.y); - if (event.button.button == 1) - add_rect(mouse_begin_x, mouse_begin_y, event.button.x, - event.button.y); + if (event.button.button == 3) { + add_line(mouse_begin_x, mouse_begin_y, event.button.x, event.button.y); + } + if (event.button.button == 1) { + add_rect(mouse_begin_x, mouse_begin_y, event.button.x, event.button.y); + } break; case SDL_KEYDOWN: switch (event.key.keysym.sym) { case 'l': - if (event.key.keysym.mod & KMOD_SHIFT) + if (event.key.keysym.mod & KMOD_SHIFT) { num_lines = 0; - else + } else { add_line(rand() % 640, rand() % 480, rand() % 640, rand() % 480); + } break; case 'r': - if (event.key.keysym.mod & KMOD_SHIFT) + if (event.key.keysym.mod & KMOD_SHIFT) { num_rects = 0; - else + } else { add_rect(rand() % 640, rand() % 480, rand() % 640, rand() % 480); + } break; } break; @@ -244,8 +255,9 @@ loop() } for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); @@ -264,8 +276,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; Uint32 then, now, frames; @@ -278,7 +289,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -354,7 +365,7 @@ main(int argc, char *argv[]) /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } return 0; diff --git a/modules/SDL2/test/testjoystick.c b/modules/SDL2/test/testjoystick.c index c849d61..adb31dc 100644 --- a/modules/SDL2/test/testjoystick.c +++ b/modules/SDL2/test/testjoystick.c @@ -28,8 +28,8 @@ #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 480 #else -#define SCREEN_WIDTH 640 -#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #endif static SDL_Window *window = NULL; @@ -44,7 +44,7 @@ PrintJoystick(SDL_Joystick *joy) char guid[64]; SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joy)) == joy); - SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joy), guid, sizeof (guid)); + SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joy), guid, sizeof(guid)); switch (SDL_JoystickGetType(joy)) { case SDL_JOYSTICK_TYPE_GAMECONTROLLER: type = "Game Controller"; @@ -103,8 +103,7 @@ DrawRect(SDL_Renderer *r, const int x, const int y, const int w, const int h) SDL_RenderFillRect(r, &area); } -void -loop(void *arg) +void loop(void *arg) { SDL_Event event; int i; @@ -117,8 +116,8 @@ loop(void *arg) switch (event.type) { case SDL_JOYDEVICEADDED: - SDL_Log("Joystick device %d added.\n", (int) event.jdevice.which); - if (!joystick) { + SDL_Log("Joystick device %d added.\n", (int)event.jdevice.which); + if (joystick == NULL) { joystick = SDL_JoystickOpen(event.jdevice.which); if (joystick) { PrintJoystick(joystick); @@ -129,7 +128,7 @@ loop(void *arg) break; case SDL_JOYDEVICEREMOVED: - SDL_Log("Joystick device %d removed.\n", (int) event.jdevice.which); + SDL_Log("Joystick device %d removed.\n", (int)event.jdevice.which); if (event.jdevice.which == SDL_JoystickInstanceID(joystick)) { SDL_JoystickClose(joystick); joystick = SDL_JoystickOpen(0); @@ -144,16 +143,21 @@ loop(void *arg) case SDL_JOYHATMOTION: SDL_Log("Joystick %" SDL_PRIs32 " hat %d value:", event.jhat.which, event.jhat.hat); - if (event.jhat.value == SDL_HAT_CENTERED) + if (event.jhat.value == SDL_HAT_CENTERED) { SDL_Log(" centered"); - if (event.jhat.value & SDL_HAT_UP) + } + if (event.jhat.value & SDL_HAT_UP) { SDL_Log(" up"); - if (event.jhat.value & SDL_HAT_RIGHT) + } + if (event.jhat.value & SDL_HAT_RIGHT) { SDL_Log(" right"); - if (event.jhat.value & SDL_HAT_DOWN) + } + if (event.jhat.value & SDL_HAT_DOWN) { SDL_Log(" down"); - if (event.jhat.value & SDL_HAT_LEFT) + } + if (event.jhat.value & SDL_HAT_LEFT) { SDL_Log(" left"); + } SDL_Log("\n"); break; case SDL_JOYBALLMOTION: @@ -217,7 +221,7 @@ loop(void *arg) SDL_SetRenderDrawColor(screen, 0xFF, 0x00, 0x00, SDL_ALPHA_OPAQUE); for (i = 0; i < SDL_JoystickNumAxes(joystick); ++i) { /* Draw the X/Y axis */ - x = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768); + x = (((int)SDL_JoystickGetAxis(joystick, i)) + 32768); x *= SCREEN_WIDTH; x /= 65535; if (x < 0) { @@ -227,7 +231,7 @@ loop(void *arg) } ++i; if (i < SDL_JoystickNumAxes(joystick)) { - y = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768); + y = (((int)SDL_JoystickGetAxis(joystick, i)) + 32768); } else { y = 32768; } @@ -246,19 +250,19 @@ loop(void *arg) for (i = 0; i < SDL_JoystickNumHats(joystick); ++i) { /* Derive the new position */ const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i); - x = SCREEN_WIDTH/2; - y = SCREEN_HEIGHT/2; + x = SCREEN_WIDTH / 2; + y = SCREEN_HEIGHT / 2; if (hat_pos & SDL_HAT_UP) { y = 0; } else if (hat_pos & SDL_HAT_DOWN) { - y = SCREEN_HEIGHT-8; + y = SCREEN_HEIGHT - 8; } if (hat_pos & SDL_HAT_LEFT) { x = 0; } else if (hat_pos & SDL_HAT_RIGHT) { - x = SCREEN_WIDTH-8; + x = SCREEN_WIDTH - 8; } DrawRect(screen, x, y, 8, 8); @@ -275,8 +279,7 @@ loop(void *arg) #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); diff --git a/modules/SDL2/test/testkeys.c b/modules/SDL2/test/testkeys.c index 66bba41..f80f0b9 100644 --- a/modules/SDL2/test/testkeys.c +++ b/modules/SDL2/test/testkeys.c @@ -19,8 +19,7 @@ #include "SDL.h" -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Scancode scancode; @@ -33,8 +32,8 @@ main(int argc, char *argv[]) } for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) { SDL_Log("Scancode #%d, \"%s\"\n", scancode, - SDL_GetScancodeName(scancode)); + SDL_GetScancodeName(scancode)); } SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testloadso.c b/modules/SDL2/test/testloadso.c index 30bddd5..f404a68 100644 --- a/modules/SDL2/test/testloadso.c +++ b/modules/SDL2/test/testloadso.c @@ -11,7 +11,7 @@ */ /* Test program to test dynamic loading with the loadso subsystem. -*/ + */ #include #include @@ -19,10 +19,9 @@ #include "SDL.h" -typedef int (*fntype) (const char *); +typedef int (*fntype)(const char *); -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int retval = 0; int hello = 0; @@ -56,23 +55,21 @@ main(int argc, char *argv[]) lib = SDL_LoadObject(libname); if (lib == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadObject('%s') failed: %s\n", - libname, SDL_GetError()); + libname, SDL_GetError()); retval = 3; } else { - fn = (fntype) SDL_LoadFunction(lib, symname); + fn = (fntype)SDL_LoadFunction(lib, symname); if (fn == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadFunction('%s') failed: %s\n", - symname, SDL_GetError()); + symname, SDL_GetError()); retval = 4; } else { SDL_Log("Found %s in %s at %p\n", symname, libname, fn); if (hello) { SDL_Log("Calling function...\n"); - fflush(stdout); fn(" HELLO, WORLD!\n"); SDL_Log("...apparently, we survived. :)\n"); SDL_Log("Unloading library...\n"); - fflush(stdout); } } SDL_UnloadObject(lib); diff --git a/modules/SDL2/test/testlocale.c b/modules/SDL2/test/testlocale.c index 5f2ff5d..f8ff1a3 100644 --- a/modules/SDL2/test/testlocale.c +++ b/modules/SDL2/test/testlocale.c @@ -61,7 +61,7 @@ int main(int argc, char **argv) SDL_Quit(); } - return 0; + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testlock.c b/modules/SDL2/test/testlock.c index 7bf1cd0..544ec32 100644 --- a/modules/SDL2/test/testlock.c +++ b/modules/SDL2/test/testlock.c @@ -27,7 +27,7 @@ static SDL_atomic_t doterminate; /* * SDL_Quit() shouldn't be used with atexit() directly because - * calling conventions may differ... + * calling conventions may differ... */ static void SDL_Quit_Wrapper(void) @@ -35,28 +35,26 @@ SDL_Quit_Wrapper(void) SDL_Quit(); } -void -printid(void) +void printid(void) { SDL_Log("Process %lu: exiting\n", SDL_ThreadID()); } -void -terminate(int sig) +void terminate(int sig) { - signal(SIGINT, terminate); + (void)signal(SIGINT, terminate); SDL_AtomicSet(&doterminate, 1); } -void -closemutex(int sig) +void closemutex(int sig) { SDL_threadID id = SDL_ThreadID(); int i; SDL_Log("Process %lu: Cleaning up...\n", id == mainthread ? 0 : id); SDL_AtomicSet(&doterminate, 1); - for (i = 0; i < 6; ++i) + for (i = 0; i < 6; ++i) { SDL_WaitThread(threads[i], NULL); + } SDL_DestroyMutex(mutex); exit(sig); } @@ -64,8 +62,9 @@ closemutex(int sig) int SDLCALL Run(void *data) { - if (SDL_ThreadID() == mainthread) - signal(SIGTERM, closemutex); + if (SDL_ThreadID() == mainthread) { + (void)signal(SIGTERM, closemutex); + } while (!SDL_AtomicGet(&doterminate)) { SDL_Log("Process %lu ready to work\n", SDL_ThreadID()); if (SDL_LockMutex(mutex) < 0) { @@ -84,13 +83,12 @@ Run(void *data) } if (SDL_ThreadID() == mainthread && SDL_AtomicGet(&doterminate)) { SDL_Log("Process %lu: raising SIGTERM\n", SDL_ThreadID()); - raise(SIGTERM); + (void)raise(SIGTERM); } - return (0); + return 0; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; int maxproc = 6; @@ -103,26 +101,29 @@ main(int argc, char *argv[]) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError()); exit(1); } - atexit(SDL_Quit_Wrapper); + (void)atexit(SDL_Quit_Wrapper); SDL_AtomicSet(&doterminate, 0); - if ((mutex = SDL_CreateMutex()) == NULL) { + mutex = SDL_CreateMutex(); + if (mutex == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create mutex: %s\n", SDL_GetError()); exit(1); } mainthread = SDL_ThreadID(); SDL_Log("Main thread: %lu\n", mainthread); - atexit(printid); + (void)atexit(printid); for (i = 0; i < maxproc; ++i) { char name[64]; - SDL_snprintf(name, sizeof (name), "Worker%d", i); - if ((threads[i] = SDL_CreateThread(Run, name, NULL)) == NULL) + (void)SDL_snprintf(name, sizeof(name), "Worker%d", i); + threads[i] = SDL_CreateThread(Run, name, NULL); + if (threads[i] == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread!\n"); + } } - signal(SIGINT, terminate); + (void)signal(SIGINT, terminate); Run(NULL); - return (0); /* Never reached */ + return 0; /* Never reached */ } diff --git a/modules/SDL2/test/testmessage.c b/modules/SDL2/test/testmessage.c index 1c85266..f805f83 100644 --- a/modules/SDL2/test/testmessage.c +++ b/modules/SDL2/test/testmessage.c @@ -29,15 +29,12 @@ static int SDLCALL button_messagebox(void *eventNumber) { const SDL_MessageBoxButtonData buttons[] = { - { - SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, - 0, - "OK" - },{ - SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, - 1, - "Cancel" - }, + { SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, + 0, + "OK" }, + { SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, + 1, + "Cancel" }, }; SDL_MessageBoxData data = { @@ -46,8 +43,8 @@ button_messagebox(void *eventNumber) "Custom MessageBox", "This is a custom messagebox", 2, - NULL,/* buttons */ - NULL /* Default color scheme */ + NULL, /* buttons */ + NULL /* Default color scheme */ }; int button = -1; @@ -69,7 +66,8 @@ button_messagebox(void *eventNumber) quit(2); } } - SDL_Log("Pressed button: %d, %s\n", button, button == -1 ? "[closed]" : button == 1 ? "Cancel" : "OK"); + SDL_Log("Pressed button: %d, %s\n", button, button == -1 ? "[closed]" : button == 1 ? "Cancel" + : "OK"); if (eventNumber) { SDL_Event event; @@ -80,8 +78,7 @@ button_messagebox(void *eventNumber) return 0; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int success; @@ -89,36 +86,36 @@ main(int argc, char *argv[]) SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "Simple MessageBox", - "This is a simple error MessageBox", - NULL); + "Simple MessageBox", + "This is a simple error MessageBox", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); } success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "Simple MessageBox", - "This is a simple MessageBox with a newline:\r\nHello world!", - NULL); + "Simple MessageBox", + "This is a simple MessageBox with a newline:\r\nHello world!", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); } success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - NULL, - "NULL Title", - NULL); + NULL, + "NULL Title", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); } success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "NULL Message", - NULL, - NULL); + "NULL Message", + NULL, + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); @@ -126,9 +123,9 @@ main(int argc, char *argv[]) /* Google says this is Traditional Chinese for "beef with broccoli" */ success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "UTF-8 Simple MessageBox", - "Unicode text: '牛肉西蘭花' ...", - NULL); + "UTF-8 Simple MessageBox", + "Unicode text: '牛肉西蘭花' ...", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); @@ -136,9 +133,9 @@ main(int argc, char *argv[]) /* Google says this is Traditional Chinese for "beef with broccoli" */ success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "UTF-8 Simple MessageBox", - "Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'", - NULL); + "UTF-8 Simple MessageBox", + "Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); @@ -146,9 +143,9 @@ main(int argc, char *argv[]) /* Google says this is Traditional Chinese for "beef with broccoli" */ success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "牛肉西蘭花", - "Unicode text in the title.", - NULL); + "牛肉西蘭花", + "Unicode text in the title.", + NULL); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); @@ -164,16 +161,15 @@ main(int argc, char *argv[]) */ if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video subsystem: %s\n", SDL_GetError()); - return (1); + return 1; } { int status = 0; SDL_Event event; intptr_t eventNumber = SDL_RegisterEvents(1); - SDL_Thread* thread = SDL_CreateThread(&button_messagebox, "MessageBox", (void*)eventNumber); + SDL_Thread *thread = SDL_CreateThread(&button_messagebox, "MessageBox", (void *)eventNumber); - while (SDL_WaitEvent(&event)) - { + while (SDL_WaitEvent(&event)) { if (event.type == eventNumber) { break; } @@ -196,16 +192,15 @@ main(int argc, char *argv[]) SDL_RenderPresent(renderer); success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "Simple MessageBox", - "This is a simple error MessageBox with a parent window. Press a key or close the window after dismissing this messagebox.", - window); + "Simple MessageBox", + "This is a simple error MessageBox with a parent window. Press a key or close the window after dismissing this messagebox.", + window); if (success == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); quit(1); } - while (SDL_WaitEvent(&event)) - { + while (SDL_WaitEvent(&event)) { if (event.type == SDL_QUIT || event.type == SDL_KEYUP) { break; } @@ -213,5 +208,5 @@ main(int argc, char *argv[]) } SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testmouse.c b/modules/SDL2/test/testmouse.c index 15e429c..d1c4edc 100644 --- a/modules/SDL2/test/testmouse.c +++ b/modules/SDL2/test/testmouse.c @@ -22,13 +22,14 @@ #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 480 #else -#define SCREEN_WIDTH 640 -#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #endif static SDL_Window *window; -typedef struct _Object { +typedef struct _Object +{ struct _Object *next; int x1, y1, x2, y2; @@ -49,8 +50,7 @@ static float wheel_y = SCREEN_HEIGHT * 0.5f; static SDL_bool done = SDL_FALSE; -void -DrawObject(SDL_Renderer * renderer, Object * object) +void DrawObject(SDL_Renderer *renderer, Object *object) { SDL_SetRenderDrawColor(renderer, object->r, object->g, object->b, 255); @@ -80,8 +80,7 @@ DrawObject(SDL_Renderer * renderer, Object * object) } } -void -DrawObjects(SDL_Renderer * renderer) +void DrawObjects(SDL_Renderer *renderer) { Object *next = objects; while (next != NULL) { @@ -90,8 +89,7 @@ DrawObjects(SDL_Renderer * renderer) } } -void -AppendObject(Object *object) +void AppendObject(Object *object) { if (objects) { Object *next = objects; @@ -104,8 +102,7 @@ AppendObject(Object *object) } } -void -loop(void *arg) +void loop(void *arg) { SDL_Renderer *renderer = (SDL_Renderer *)arg; SDL_Event event; @@ -114,34 +111,35 @@ loop(void *arg) while (SDL_PollEvent(&event)) { switch (event.type) { case SDL_MOUSEWHEEL: - if (event.wheel.direction == SDL_MOUSEWHEEL_FLIPPED) { - event.wheel.preciseX *= -1.0f; - event.wheel.preciseY *= -1.0f; - event.wheel.x *= -1; - event.wheel.y *= -1; - } - if (event.wheel.preciseX != 0.0f) { - wheel_x_active = SDL_TRUE; - /* "positive to the right and negative to the left" */ - wheel_x += event.wheel.preciseX * 10.0f; - } - if (event.wheel.preciseY != 0.0f) { - wheel_y_active = SDL_TRUE; - /* "positive away from the user and negative towards the user" */ - wheel_y -= event.wheel.preciseY * 10.0f; - } - break; + if (event.wheel.direction == SDL_MOUSEWHEEL_FLIPPED) { + event.wheel.preciseX *= -1.0f; + event.wheel.preciseY *= -1.0f; + event.wheel.x *= -1; + event.wheel.y *= -1; + } + if (event.wheel.preciseX != 0.0f) { + wheel_x_active = SDL_TRUE; + /* "positive to the right and negative to the left" */ + wheel_x += event.wheel.preciseX * 10.0f; + } + if (event.wheel.preciseY != 0.0f) { + wheel_y_active = SDL_TRUE; + /* "positive away from the user and negative towards the user" */ + wheel_y -= event.wheel.preciseY * 10.0f; + } + break; case SDL_MOUSEMOTION: - if (!active) + if (active == NULL) { break; + } active->x2 = event.motion.x; active->y2 = event.motion.y; break; case SDL_MOUSEBUTTONDOWN: - if (!active) { + if (active == NULL) { active = SDL_calloc(1, sizeof(*active)); active->x1 = active->x2 = event.button.x; active->y1 = active->y2 = event.button.y; @@ -149,24 +147,52 @@ loop(void *arg) } switch (event.button.button) { - case SDL_BUTTON_LEFT: active->r = 255; buttons |= SDL_BUTTON_LMASK; break; - case SDL_BUTTON_MIDDLE: active->g = 255; buttons |= SDL_BUTTON_MMASK; break; - case SDL_BUTTON_RIGHT: active->b = 255; buttons |= SDL_BUTTON_RMASK; break; - case SDL_BUTTON_X1: active->r = 255; active->b = 255; buttons |= SDL_BUTTON_X1MASK; break; - case SDL_BUTTON_X2: active->g = 255; active->b = 255; buttons |= SDL_BUTTON_X2MASK; break; + case SDL_BUTTON_LEFT: + active->r = 255; + buttons |= SDL_BUTTON_LMASK; + break; + case SDL_BUTTON_MIDDLE: + active->g = 255; + buttons |= SDL_BUTTON_MMASK; + break; + case SDL_BUTTON_RIGHT: + active->b = 255; + buttons |= SDL_BUTTON_RMASK; + break; + case SDL_BUTTON_X1: + active->r = 255; + active->b = 255; + buttons |= SDL_BUTTON_X1MASK; + break; + case SDL_BUTTON_X2: + active->g = 255; + active->b = 255; + buttons |= SDL_BUTTON_X2MASK; + break; } break; case SDL_MOUSEBUTTONUP: - if (!active) + if (active == NULL) { break; + } switch (event.button.button) { - case SDL_BUTTON_LEFT: buttons &= ~SDL_BUTTON_LMASK; break; - case SDL_BUTTON_MIDDLE: buttons &= ~SDL_BUTTON_MMASK; break; - case SDL_BUTTON_RIGHT: buttons &= ~SDL_BUTTON_RMASK; break; - case SDL_BUTTON_X1: buttons &= ~SDL_BUTTON_X1MASK; break; - case SDL_BUTTON_X2: buttons &= ~SDL_BUTTON_X2MASK; break; + case SDL_BUTTON_LEFT: + buttons &= ~SDL_BUTTON_LMASK; + break; + case SDL_BUTTON_MIDDLE: + buttons &= ~SDL_BUTTON_MMASK; + break; + case SDL_BUTTON_RIGHT: + buttons &= ~SDL_BUTTON_RMASK; + break; + case SDL_BUTTON_X1: + buttons &= ~SDL_BUTTON_X1MASK; + break; + case SDL_BUTTON_X2: + buttons &= ~SDL_BUTTON_X2MASK; + break; } if (buttons == 0) { @@ -210,8 +236,9 @@ loop(void *arg) /* Objects from mouse clicks */ DrawObjects(renderer); - if (active) + if (active) { DrawObject(renderer, active); + } SDL_RenderPresent(renderer); @@ -222,8 +249,7 @@ loop(void *arg) #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Renderer *renderer; diff --git a/modules/SDL2/test/testmultiaudio.c b/modules/SDL2/test/testmultiaudio.c index a3ad921..2fd352b 100644 --- a/modules/SDL2/test/testmultiaudio.c +++ b/modules/SDL2/test/testmultiaudio.c @@ -20,8 +20,8 @@ #include "testutils.h" static SDL_AudioSpec spec; -static Uint8 *sound = NULL; /* Pointer to wave data */ -static Uint32 soundlen = 0; /* Length of wave data */ +static Uint8 *sound = NULL; /* Pointer to wave data */ +static Uint32 soundlen = 0; /* Length of wave data */ typedef struct { @@ -33,14 +33,15 @@ typedef struct callback_data cbd[64]; void SDLCALL -play_through_once(void *arg, Uint8 * stream, int len) +play_through_once(void *arg, Uint8 *stream, int len) { - callback_data *cbdata = (callback_data *) arg; + callback_data *cbdata = (callback_data *)arg; Uint8 *waveptr = sound + cbdata->soundpos; int waveleft = soundlen - cbdata->soundpos; int cpy = len; - if (cpy > waveleft) + if (cpy > waveleft) { cpy = waveleft; + } SDL_memcpy(stream, waveptr, cpy); len -= cpy; @@ -52,8 +53,7 @@ play_through_once(void *arg, Uint8 * stream, int len) } } -void -loop() +void loop() { if (SDL_AtomicGet(&cbd[0].done)) { #ifdef __EMSCRIPTEN__ @@ -71,17 +71,17 @@ test_multi_audio(int devcount) { int keep_going = 1; int i; - -#ifdef __ANDROID__ + +#ifdef __ANDROID__ SDL_Event event; - + /* Create a Window to get fully initialized event processing for testing pause on Android. */ SDL_CreateWindow("testmultiaudio", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0); #endif if (devcount > 64) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Too many devices (%d), clamping to 64...\n", - devcount); + devcount); devcount = 64; } @@ -90,7 +90,6 @@ test_multi_audio(int devcount) for (i = 0; i < devcount; i++) { const char *devname = SDL_GetAudioDeviceName(i, 0); SDL_Log("playing on device #%d: ('%s')...", i, devname); - fflush(stdout); SDL_memset(&cbd[0], '\0', sizeof(callback_data)); spec.userdata = &cbd[0]; @@ -103,10 +102,11 @@ test_multi_audio(int devcount) emscripten_set_main_loop(loop, 0, 1); #else while (!SDL_AtomicGet(&cbd[0].done)) { - #ifdef __ANDROID__ +#ifdef __ANDROID__ /* Empty queue, some application events would prevent pause. */ - while (SDL_PollEvent(&event)){} - #endif + while (SDL_PollEvent(&event)) { + } +#endif SDL_Delay(100); } SDL_PauseAudioDevice(cbd[0].dev, 1); @@ -141,10 +141,11 @@ test_multi_audio(int devcount) keep_going = 1; } } - #ifdef __ANDROID__ +#ifdef __ANDROID__ /* Empty queue, some application events would prevent pause. */ - while (SDL_PollEvent(&event)){} - #endif + while (SDL_PollEvent(&event)) { + } +#endif SDL_Delay(100); } @@ -161,9 +162,7 @@ test_multi_audio(int devcount) #endif } - -int -main(int argc, char **argv) +int main(int argc, char **argv) { int devcount = 0; @@ -173,11 +172,11 @@ main(int argc, char **argv) /* Load the SDL library */ if (SDL_Init(SDL_INIT_AUDIO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver()); - + devcount = SDL_GetNumAudioDevices(0); if (devcount < 1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Don't see any specific audio devices!\n"); @@ -187,7 +186,7 @@ main(int argc, char **argv) /* Load the wave file into memory */ if (SDL_LoadWAV(file, &spec, &sound, &soundlen) == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", file, - SDL_GetError()); + SDL_GetError()); } else { test_multi_audio(devcount); SDL_FreeWAV(sound); diff --git a/modules/SDL2/test/testnative.c b/modules/SDL2/test/testnative.c index fab5b75..e803b82 100644 --- a/modules/SDL2/test/testnative.c +++ b/modules/SDL2/test/testnative.c @@ -13,7 +13,7 @@ #include #include /* for srand() */ -#include /* for time() */ +#include /* for time() */ #include "testnative.h" #include "testutils.h" @@ -47,14 +47,13 @@ static void quit(int rc) { SDL_VideoQuit(); - if (native_window) { + if (native_window != NULL && factory != NULL) { factory->DestroyNativeWindow(native_window); } exit(rc); } -void -MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) +void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite) { int sprite_w, sprite_h; int i; @@ -92,8 +91,7 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderPresent(renderer); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i, done; const char *driver; @@ -109,7 +107,7 @@ main(int argc, char *argv[]) if (SDL_VideoInit(NULL) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video: %s\n", - SDL_GetError()); + SDL_GetError()); exit(1); } driver = SDL_GetCurrentVideoDriver(); @@ -121,19 +119,19 @@ main(int argc, char *argv[]) break; } } - if (!factory) { + if (factory == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find native window code for %s driver\n", - driver); + driver); quit(2); } SDL_Log("Creating native window for %s driver\n", driver); native_window = factory->CreateNativeWindow(WINDOW_W, WINDOW_H); - if (!native_window) { + if (native_window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create native window\n"); quit(3); } window = SDL_CreateWindowFrom(native_window); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create SDL window: %s\n", SDL_GetError()); quit(4); } @@ -141,7 +139,7 @@ main(int argc, char *argv[]) /* Create the renderer */ renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); quit(5); } @@ -151,16 +149,16 @@ main(int argc, char *argv[]) SDL_RenderClear(renderer); sprite = LoadTexture(renderer, "icon.bmp", SDL_TRUE, NULL, NULL); - if (!sprite) { + if (sprite == NULL) { quit(6); } /* Allocate memory for the sprite info */ SDL_GetWindowSize(window, &window_w, &window_h); SDL_QueryTexture(sprite, NULL, NULL, &sprite_w, &sprite_h); - positions = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); - velocities = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); - if (!positions || !velocities) { + positions = (SDL_Rect *)SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); + velocities = (SDL_Rect *)SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); + if (positions == NULL || velocities == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } diff --git a/modules/SDL2/test/testnative.h b/modules/SDL2/test/testnative.h index 2b56847..2ba9005 100644 --- a/modules/SDL2/test/testnative.h +++ b/modules/SDL2/test/testnative.h @@ -22,8 +22,8 @@ typedef struct { const char *tag; - void *(*CreateNativeWindow) (int w, int h); - void (*DestroyNativeWindow) (void *window); + void *(*CreateNativeWindow)(int w, int h); + void (*DestroyNativeWindow)(void *window); } NativeWindowFactory; #ifdef SDL_VIDEO_DRIVER_WINDOWS diff --git a/modules/SDL2/test/testnativecocoa.m b/modules/SDL2/test/testnativecocoa.m index 030607d..e895072 100644 --- a/modules/SDL2/test/testnativecocoa.m +++ b/modules/SDL2/test/testnativecocoa.m @@ -3,8 +3,15 @@ #ifdef TEST_NATIVE_COCOA +#include #include +#ifndef MAC_OS_X_VERSION_10_12 +static const unsigned int NSWindowStyleMaskTitled = NSTitledWindowMask; +static const unsigned int NSWindowStyleMaskMiniaturizable = NSMiniaturizableWindowMask; +static const unsigned int NSWindowStyleMaskClosable = NSClosableWindowMask; +#endif + static void *CreateWindowCocoa(int w, int h); static void DestroyWindowCocoa(void *window); @@ -29,7 +36,7 @@ static void *CreateWindowCocoa(int w, int h) rect.size.height = h; rect.origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - rect.origin.y - rect.size.height; - style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); + style = (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable); nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE]; [nswindow makeKeyAndOrderFront:nil]; diff --git a/modules/SDL2/test/testnativew32.c b/modules/SDL2/test/testnativew32.c index d30bac1..e157458 100644 --- a/modules/SDL2/test/testnativew32.c +++ b/modules/SDL2/test/testnativew32.c @@ -52,7 +52,7 @@ CreateWindowNative(int w, int h) wc.hInstance = GetModuleHandle(NULL); wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wc.lpszMenuName = NULL; wc.lpszClassName = "SDL Test"; @@ -80,7 +80,7 @@ CreateWindowNative(int w, int h) static void DestroyWindowNative(void *window) { - DestroyWindow((HWND) window); + DestroyWindow((HWND)window); } #endif diff --git a/modules/SDL2/test/testnativex11.c b/modules/SDL2/test/testnativex11.c index 931c0a1..95dc3d6 100644 --- a/modules/SDL2/test/testnativex11.c +++ b/modules/SDL2/test/testnativex11.c @@ -38,14 +38,14 @@ CreateWindowX11(int w, int h) XMapRaised(dpy, window); XSync(dpy, False); } - return (void *) window; + return (void *)window; } static void DestroyWindowX11(void *window) { if (dpy) { - XDestroyWindow(dpy, (Window) window); + XDestroyWindow(dpy, (Window)window); XCloseDisplay(dpy); } } diff --git a/modules/SDL2/test/testoffscreen.c b/modules/SDL2/test/testoffscreen.c index 6a8726a..fa511e8 100644 --- a/modules/SDL2/test/testoffscreen.c +++ b/modules/SDL2/test/testoffscreen.c @@ -32,8 +32,7 @@ static int width = 640; static int height = 480; static unsigned int max_frames = 200; -void -draw() +void draw() { SDL_Rect Rect; @@ -51,10 +50,9 @@ draw() SDL_RenderPresent(renderer); } -void -save_surface_to_bmp() +void save_surface_to_bmp() { - SDL_Surface* surface; + SDL_Surface *surface; Uint32 r_mask, g_mask, b_mask, a_mask; Uint32 pixel_format; char file[128]; @@ -73,15 +71,14 @@ save_surface_to_bmp() SDL_FreeSurface(surface); } -void -loop() +void loop() { SDL_Event event; /* Check for events */ while (SDL_PollEvent(&event)) { switch (event.type) { - case SDL_QUIT: + case SDL_QUIT: done = SDL_TRUE; break; } @@ -97,8 +94,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { #ifndef __EMSCRIPTEN__ Uint32 then, now, frames; @@ -110,26 +106,25 @@ main(int argc, char *argv[]) /* Force the offscreen renderer, if it cannot be created then fail out */ if (SDL_VideoInit("offscreen") < 0) { SDL_Log("Couldn't initialize the offscreen video driver: %s\n", - SDL_GetError()); + SDL_GetError()); return SDL_FALSE; } - /* If OPENGL fails to init it will fallback to using a framebuffer for rendering */ + /* If OPENGL fails to init it will fallback to using a framebuffer for rendering */ window = SDL_CreateWindow("Offscreen Test", - SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - width, height, 0); + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + width, height, 0); - if (!window) { - SDL_Log("Couldn't create window: %s\n", - SDL_GetError()); + if (window == NULL) { + SDL_Log("Couldn't create window: %s\n", SDL_GetError()); return SDL_FALSE; } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_Log("Couldn't create renderer: %s\n", - SDL_GetError()); + SDL_GetError()); return SDL_FALSE; } @@ -157,7 +152,7 @@ main(int argc, char *argv[]) if (frames % (max_frames / 10) == 0) { now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("Frames remaining: %" SDL_PRIu32 " rendering at %2.2f frames per second\n", max_frames - frames, fps); } } diff --git a/modules/SDL2/test/testoverlay2.c b/modules/SDL2/test/testoverlay2.c index 05876ff..a5dba68 100644 --- a/modules/SDL2/test/testoverlay2.c +++ b/modules/SDL2/test/testoverlay2.c @@ -30,9 +30,10 @@ #define MOOSEPIC_W 64 #define MOOSEPIC_H 88 -#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) +#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) #define MOOSEFRAMES_COUNT 10 +/* *INDENT-OFF* */ /* clang-format off */ SDL_Color MooseColors[84] = { {49, 49, 49, SDL_ALPHA_OPAQUE} , {66, 24, 0, SDL_ALPHA_OPAQUE} @@ -139,8 +140,9 @@ SDL_Color MooseColors[84] = { , {231, 231, 231, SDL_ALPHA_OPAQUE} , {239, 206, 173, SDL_ALPHA_OPAQUE} }; +/* *INDENT-ON* */ /* clang-format on */ -Uint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE*2]; +Uint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE * 2]; SDL_Texture *MooseTexture; SDL_Rect displayrect; int window_w; @@ -176,8 +178,7 @@ PrintUsage(char *argv0) SDL_Log("\n"); } -void -loop() +void loop() { SDL_Event event; @@ -208,6 +209,7 @@ loop() if (event.key.keysym.sym != SDLK_ESCAPE) { break; } + SDL_FALLTHROUGH; case SDL_QUIT: done = SDL_TRUE; break; @@ -234,8 +236,7 @@ loop() #endif } -int -main(int argc, char **argv) +int main(int argc, char **argv) { Uint8 *RawMooseData; SDL_RWops *handle; @@ -260,19 +261,19 @@ main(int argc, char **argv) fps = SDL_atoi(argv[2]); if (fps == 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); quit(10); } if ((fps < 0) || (fps > 1000)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -fps option must be in range from 1 to 1000, default is 12.\n"); + "The -fps option must be in range from 1 to 1000, default is 12.\n"); quit(10); } argv += 2; argc -= 2; } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); quit(10); } } else if (SDL_strcmp(argv[1], "-nodelay") == 0) { @@ -284,23 +285,22 @@ main(int argc, char **argv) scale = SDL_atoi(argv[2]); if (scale == 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -scale option requires an argument [from 1 to 50], default is 5.\n"); + "The -scale option requires an argument [from 1 to 50], default is 5.\n"); quit(10); } if ((scale < 0) || (scale > 50)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -scale option must be in range from 1 to 50, default is 5.\n"); + "The -scale option must be in range from 1 to 50, default is 5.\n"); quit(10); } argv += 2; argc -= 2; } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); quit(10); } - } else if ((SDL_strcmp(argv[1], "-help") == 0) - || (SDL_strcmp(argv[1], "-h") == 0)) { + } else if ((SDL_strcmp(argv[1], "-help") == 0) || (SDL_strcmp(argv[1], "-h") == 0)) { PrintUsage(argv[0]); quit(0); } else { @@ -310,7 +310,7 @@ main(int argc, char **argv) break; } - RawMooseData = (Uint8 *) SDL_malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT); + RawMooseData = (Uint8 *)SDL_malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT); if (RawMooseData == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't allocate memory for movie !\n"); quit(1); @@ -320,6 +320,7 @@ main(int argc, char **argv) filename = GetResourceFilename(NULL, "moose.dat"); if (filename == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory\n"); + SDL_free(RawMooseData); return -1; } handle = SDL_RWFromFile(filename, "rb"); @@ -342,21 +343,21 @@ main(int argc, char **argv) SDL_WINDOWPOS_UNDEFINED, window_w, window_h, SDL_WINDOW_RESIZABLE); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError()); SDL_free(RawMooseData); quit(4); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError()); SDL_free(RawMooseData); quit(4); } MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H); - if (!MooseTexture) { + if (MooseTexture == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError()); SDL_free(RawMooseData); quit(5); @@ -365,7 +366,7 @@ main(int argc, char **argv) /* SDL_SetTextureColorMod(MooseTexture, 0xff, 0x80, 0x80); */ for (i = 0; i < MOOSEFRAMES_COUNT; i++) { - Uint8 MooseFrameRGB[MOOSEFRAME_SIZE*3]; + Uint8 MooseFrameRGB[MOOSEFRAME_SIZE * 3]; Uint8 *rgb; Uint8 *frame; @@ -377,9 +378,9 @@ main(int argc, char **argv) rgb[2] = MooseColors[frame[j]].b; rgb += 3; } - ConvertRGBtoYUV(SDL_PIXELFORMAT_YV12, MooseFrameRGB, MOOSEPIC_W*3, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, - SDL_GetYUVConversionModeForResolution(MOOSEPIC_W, MOOSEPIC_H), - 0, 100); + ConvertRGBtoYUV(SDL_PIXELFORMAT_YV12, MooseFrameRGB, MOOSEPIC_W * 3, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, + SDL_GetYUVConversionModeForResolution(MOOSEPIC_W, MOOSEPIC_H), + 0, 100); } SDL_free(RawMooseData); @@ -406,7 +407,7 @@ main(int argc, char **argv) #else while (!done) { loop(); - } + } #endif SDL_DestroyRenderer(renderer); diff --git a/modules/SDL2/test/testplatform.c b/modules/SDL2/test/testplatform.c index 13ee56a..7e89d2f 100644 --- a/modules/SDL2/test/testplatform.c +++ b/modules/SDL2/test/testplatform.c @@ -45,43 +45,42 @@ SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT64, SDL_MIN_SINT64 == ~0x7fffffffffffffffll) SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == 18446744073709551615ull); SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0); -int -TestTypes(SDL_bool verbose) +int TestTypes(SDL_bool verbose) { int error = 0; if (badsize(sizeof(Uint8), 1)) { - if (verbose) - SDL_Log("sizeof(Uint8) != 1, instead = %u\n", - (unsigned int)sizeof(Uint8)); + if (verbose) { + SDL_Log("sizeof(Uint8) != 1, instead = %u\n", (unsigned int)sizeof(Uint8)); + } ++error; } if (badsize(sizeof(Uint16), 2)) { - if (verbose) - SDL_Log("sizeof(Uint16) != 2, instead = %u\n", - (unsigned int)sizeof(Uint16)); + if (verbose) { + SDL_Log("sizeof(Uint16) != 2, instead = %u\n", (unsigned int)sizeof(Uint16)); + } ++error; } if (badsize(sizeof(Uint32), 4)) { - if (verbose) - SDL_Log("sizeof(Uint32) != 4, instead = %u\n", - (unsigned int)sizeof(Uint32)); + if (verbose) { + SDL_Log("sizeof(Uint32) != 4, instead = %u\n", (unsigned int)sizeof(Uint32)); + } ++error; } if (badsize(sizeof(Uint64), 8)) { - if (verbose) - SDL_Log("sizeof(Uint64) != 8, instead = %u\n", - (unsigned int)sizeof(Uint64)); + if (verbose) { + SDL_Log("sizeof(Uint64) != 8, instead = %u\n", (unsigned int)sizeof(Uint64)); + } ++error; } - if (verbose && !error) + if (verbose && !error) { SDL_Log("All data types are the expected size.\n"); + } - return (error ? 1 : 0); + return error ? 1 : 0; } -int -TestEndian(SDL_bool verbose) +int TestEndian(SDL_bool verbose) { int error = 0; Uint16 value = 0x1234; @@ -93,9 +92,10 @@ TestEndian(SDL_bool verbose) Uint32 swapped32 = 0xDEADBEEF; Uint64 value64, swapped64; - union { - double d; - Uint32 ui32[2]; + union + { + double d; + Uint32 ui32[2]; } value_double; value64 = 0xEFBEADDE; @@ -108,9 +108,9 @@ TestEndian(SDL_bool verbose) if (verbose) { SDL_Log("Detected a %s endian machine.\n", - (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big"); + (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big"); } - if ((*((char *) &value) >> 4) == 0x1) { + if ((*((char *)&value) >> 4) == 0x1) { real_byteorder = SDL_BIG_ENDIAN; } else { real_byteorder = SDL_LIL_ENDIAN; @@ -118,13 +118,13 @@ TestEndian(SDL_bool verbose) if (real_byteorder != SDL_BYTEORDER) { if (verbose) { SDL_Log("Actually a %s endian machine!\n", - (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big"); + (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big"); } ++error; } if (verbose) { SDL_Log("Detected a %s endian float word order machine.\n", - (SDL_FLOATWORDORDER == SDL_LIL_ENDIAN) ? "little" : "big"); + (SDL_FLOATWORDORDER == SDL_LIL_ENDIAN) ? "little" : "big"); } if (value_double.ui32[0] == 0x82c2bd7f && value_double.ui32[1] == 0x400921fb) { real_floatwordorder = SDL_LIL_ENDIAN; @@ -134,13 +134,14 @@ TestEndian(SDL_bool verbose) if (real_floatwordorder != SDL_FLOATWORDORDER) { if (verbose) { SDL_Log("Actually a %s endian float word order machine!\n", - (real_floatwordorder == SDL_LIL_ENDIAN) ? "little" : (real_floatwordorder == SDL_BIG_ENDIAN) ? "big" : "unknown" ); + (real_floatwordorder == SDL_LIL_ENDIAN) ? "little" : (real_floatwordorder == SDL_BIG_ENDIAN) ? "big" + : "unknown"); } ++error; } if (verbose) { SDL_Log("Value 16 = 0x%X, swapped = 0x%X\n", value16, - SDL_Swap16(value16)); + SDL_Swap16(value16)); } if (SDL_Swap16(value16) != swapped16) { if (verbose) { @@ -160,8 +161,8 @@ TestEndian(SDL_bool verbose) ++error; } if (verbose) { - SDL_Log("Value 64 = 0x%"SDL_PRIX64", swapped = 0x%"SDL_PRIX64"\n", value64, - SDL_Swap64(value64)); + SDL_Log("Value 64 = 0x%" SDL_PRIX64 ", swapped = 0x%" SDL_PRIX64 "\n", value64, + SDL_Swap64(value64)); } if (SDL_Swap64(value64) != swapped64) { if (verbose) { @@ -169,67 +170,67 @@ TestEndian(SDL_bool verbose) } ++error; } - return (error ? 1 : 0); + return error ? 1 : 0; } -static int TST_allmul (void *a, void *b, int arg, void *result, void *expected) +static int TST_allmul(void *a, void *b, int arg, void *result, void *expected) { (*(long long *)result) = ((*(long long *)a) * (*(long long *)b)); return (*(long long *)result) == (*(long long *)expected); } -static int TST_alldiv (void *a, void *b, int arg, void *result, void *expected) +static int TST_alldiv(void *a, void *b, int arg, void *result, void *expected) { (*(long long *)result) = ((*(long long *)a) / (*(long long *)b)); return (*(long long *)result) == (*(long long *)expected); } -static int TST_allrem (void *a, void *b, int arg, void *result, void *expected) +static int TST_allrem(void *a, void *b, int arg, void *result, void *expected) { (*(long long *)result) = ((*(long long *)a) % (*(long long *)b)); return (*(long long *)result) == (*(long long *)expected); } -static int TST_ualldiv (void *a, void *b, int arg, void *result, void *expected) +static int TST_ualldiv(void *a, void *b, int arg, void *result, void *expected) { (*(unsigned long long *)result) = ((*(unsigned long long *)a) / (*(unsigned long long *)b)); return (*(unsigned long long *)result) == (*(unsigned long long *)expected); } -static int TST_uallrem (void *a, void *b, int arg, void *result, void *expected) +static int TST_uallrem(void *a, void *b, int arg, void *result, void *expected) { (*(unsigned long long *)result) = ((*(unsigned long long *)a) % (*(unsigned long long *)b)); return (*(unsigned long long *)result) == (*(unsigned long long *)expected); } -static int TST_allshl (void *a, void *b, int arg, void *result, void *expected) +static int TST_allshl(void *a, void *b, int arg, void *result, void *expected) { (*(long long *)result) = (*(long long *)a) << arg; return (*(long long *)result) == (*(long long *)expected); } -static int TST_aullshl (void *a, void *b, int arg, void *result, void *expected) +static int TST_aullshl(void *a, void *b, int arg, void *result, void *expected) { (*(unsigned long long *)result) = (*(unsigned long long *)a) << arg; return (*(unsigned long long *)result) == (*(unsigned long long *)expected); } -static int TST_allshr (void *a, void *b, int arg, void *result, void *expected) +static int TST_allshr(void *a, void *b, int arg, void *result, void *expected) { (*(long long *)result) = (*(long long *)a) >> arg; return (*(long long *)result) == (*(long long *)expected); } -static int TST_aullshr (void *a, void *b, int arg, void *result, void *expected) +static int TST_aullshr(void *a, void *b, int arg, void *result, void *expected) { (*(unsigned long long *)result) = (*(unsigned long long *)a) >> arg; return (*(unsigned long long *)result) == (*(unsigned long long *)expected); } - typedef int (*LL_Intrinsic)(void *a, void *b, int arg, void *result, void *expected); -typedef struct { +typedef struct +{ const char *operation; LL_Intrinsic routine; unsigned long long a, b; @@ -237,133 +238,130 @@ typedef struct { unsigned long long expected_result; } LL_Test; -static LL_Test LL_Tests[] = -{ +static LL_Test LL_Tests[] = { /* UNDEFINED {"_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 65, 0x0000000000000000ll}, */ - {"_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFEll}, - {"_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFF00000000ll}, - {"_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFE00000000ll}, - {"_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll}, + { "_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFEll }, + { "_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFF00000000ll }, + { "_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFE00000000ll }, + { "_allshl", &TST_allshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll }, - {"_allshr", &TST_allshr, 0xAAAAAAAA55555555ll, 0ll, 63, 0xFFFFFFFFFFFFFFFFll}, + { "_allshr", &TST_allshr, 0xAAAAAAAA55555555ll, 0ll, 63, 0xFFFFFFFFFFFFFFFFll }, /* UNDEFINED {"_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 65, 0xFFFFFFFFFFFFFFFFll}, */ - {"_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFFll}, - {"_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFFFFFFFFFFll}, - {"_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFFFFFFFFFFll}, - {"_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll}, + { "_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFFll }, + { "_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFFFFFFFFFFll }, + { "_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFFFFFFFFFFll }, + { "_allshr", &TST_allshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll }, /* UNDEFINED {"_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 65, 0x0000000000000000ll}, */ - {"_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 1, 0x2FAFAFAFAFAFAFAFll}, - {"_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 32, 0x000000005F5F5F5Fll}, - {"_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 33, 0x000000002FAFAFAFll}, + { "_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 1, 0x2FAFAFAFAFAFAFAFll }, + { "_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 32, 0x000000005F5F5F5Fll }, + { "_allshr", &TST_allshr, 0x5F5F5F5F5F5F5F5Fll, 0ll, 33, 0x000000002FAFAFAFll }, /* UNDEFINED {"_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 65, 0x0000000000000000ll}, */ - {"_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFEll}, - {"_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFF00000000ll}, - {"_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFE00000000ll}, - {"_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll}, + { "_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0xFFFFFFFFFFFFFFFEll }, + { "_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0xFFFFFFFF00000000ll }, + { "_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0xFFFFFFFE00000000ll }, + { "_aullshl", &TST_aullshl, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll }, /* UNDEFINED {"_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 65, 0x0000000000000000ll}, */ - {"_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0x7FFFFFFFFFFFFFFFll}, - {"_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0x00000000FFFFFFFFll}, - {"_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0x000000007FFFFFFFll}, - {"_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll}, - - {"_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000000ll, 0, 0x0000000000000000ll}, - {"_allmul", &TST_allmul, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll}, - {"_allmul", &TST_allmul, 0x0000000000000001ll, 0x000000000FFFFFFFll, 0, 0x000000000FFFFFFFll}, - {"_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFF0ll}, - {"_allmul", &TST_allmul, 0x0000000000000010ll, 0x000000000FFFFFFFll, 0, 0x00000000FFFFFFF0ll}, - {"_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000100ll, 0, 0x0000000FFFFFFF00ll}, - {"_allmul", &TST_allmul, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000FFFFFFF00ll}, - {"_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000010000000ll, 0, 0x00FFFFFFF0000000ll}, - {"_allmul", &TST_allmul, 0x0000000010000000ll, 0x000000000FFFFFFFll, 0, 0x00FFFFFFF0000000ll}, - {"_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000080000000ll, 0, 0x07FFFFFF80000000ll}, - {"_allmul", &TST_allmul, 0x0000000080000000ll, 0x000000000FFFFFFFll, 0, 0x07FFFFFF80000000ll}, - {"_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0xFFFFFFFF00000000ll}, - {"_allmul", &TST_allmul, 0x0000000080000000ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFF00000000ll}, - {"_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000008ll, 0, 0xFFFFFFFEFFFFFFF0ll}, - {"_allmul", &TST_allmul, 0x0000000080000008ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFEFFFFFFF0ll}, - {"_allmul", &TST_allmul, 0x00000000FFFFFFFFll, 0x00000000FFFFFFFFll, 0, 0xFFFFFFFE00000001ll}, - - {"_alldiv", &TST_alldiv, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_alldiv", &TST_alldiv, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_alldiv", &TST_alldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0xFFFFFFFFFFFFFFFFll}, - {"_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0xFFFFFFFFFFFFFFFFll}, - {"_alldiv", &TST_alldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0xFFFFFFFFFFFFFFFFll}, - {"_alldiv", &TST_alldiv, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000001ll}, - {"_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll}, - {"_alldiv", &TST_alldiv, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll}, - {"_alldiv", &TST_alldiv, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFFFll}, - {"_alldiv", &TST_alldiv, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000000ll}, - {"_alldiv", &TST_alldiv, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x000000000FFFFFFFll}, - {"_alldiv", &TST_alldiv, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x000000000FFFFFFFll}, - {"_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x0000000000000000ll}, - {"_alldiv", &TST_alldiv, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000080000008ll}, - {"_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xC000000080000008ll}, - {"_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000000000007FFFll}, - {"_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000001ll}, - - {"_allrem", &TST_allrem, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x000000000000000Fll}, - {"_allrem", &TST_allrem, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000100ll}, - {"_allrem", &TST_allrem, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0xFFFFFFFFFFFFFFFEll}, - {"_allrem", &TST_allrem, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll}, - {"_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000FFFF0000FFEEll}, - {"_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000000ll}, - - - {"_ualldiv", &TST_ualldiv, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0xFFFFFFFFFFFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000001ll}, - {"_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll}, - {"_ualldiv", &TST_ualldiv, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x000000000FFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x000000000FFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x00000001FFFFFFFFll}, - {"_ualldiv", &TST_ualldiv, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll}, - {"_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000000000007FFFll}, - {"_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000001ll}, - - {"_uallrem", &TST_uallrem, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll}, - {"_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll}, - {"_uallrem", &TST_uallrem, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x000000000000000Fll}, - {"_uallrem", &TST_uallrem, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000100ll}, - {"_uallrem", &TST_uallrem, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x0000000000000000ll}, - {"_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x000000007FFFFFFEll}, - {"_uallrem", &TST_uallrem, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFEFFFFFFF0ll}, - {"_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x7FFFFFFEFFFFFFF0ll}, - {"_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000FFFF0000FFEEll}, - {"_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000000ll}, - - {NULL} + { "_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 1, 0x7FFFFFFFFFFFFFFFll }, + { "_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 32, 0x00000000FFFFFFFFll }, + { "_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 33, 0x000000007FFFFFFFll }, + { "_aullshr", &TST_aullshr, 0xFFFFFFFFFFFFFFFFll, 0ll, 0, 0xFFFFFFFFFFFFFFFFll }, + + { "_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000000ll, 0, 0x0000000000000000ll }, + { "_allmul", &TST_allmul, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll }, + { "_allmul", &TST_allmul, 0x0000000000000001ll, 0x000000000FFFFFFFll, 0, 0x000000000FFFFFFFll }, + { "_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFF0ll }, + { "_allmul", &TST_allmul, 0x0000000000000010ll, 0x000000000FFFFFFFll, 0, 0x00000000FFFFFFF0ll }, + { "_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000000000100ll, 0, 0x0000000FFFFFFF00ll }, + { "_allmul", &TST_allmul, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000FFFFFFF00ll }, + { "_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000010000000ll, 0, 0x00FFFFFFF0000000ll }, + { "_allmul", &TST_allmul, 0x0000000010000000ll, 0x000000000FFFFFFFll, 0, 0x00FFFFFFF0000000ll }, + { "_allmul", &TST_allmul, 0x000000000FFFFFFFll, 0x0000000080000000ll, 0, 0x07FFFFFF80000000ll }, + { "_allmul", &TST_allmul, 0x0000000080000000ll, 0x000000000FFFFFFFll, 0, 0x07FFFFFF80000000ll }, + { "_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0xFFFFFFFF00000000ll }, + { "_allmul", &TST_allmul, 0x0000000080000000ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFF00000000ll }, + { "_allmul", &TST_allmul, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000008ll, 0, 0xFFFFFFFEFFFFFFF0ll }, + { "_allmul", &TST_allmul, 0x0000000080000008ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFEFFFFFFF0ll }, + { "_allmul", &TST_allmul, 0x00000000FFFFFFFFll, 0x00000000FFFFFFFFll, 0, 0xFFFFFFFE00000001ll }, + + { "_alldiv", &TST_alldiv, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_alldiv", &TST_alldiv, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_alldiv", &TST_alldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0xFFFFFFFFFFFFFFFFll }, + { "_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0xFFFFFFFFFFFFFFFFll }, + { "_alldiv", &TST_alldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0xFFFFFFFFFFFFFFFFll }, + { "_alldiv", &TST_alldiv, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000001ll }, + { "_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll }, + { "_alldiv", &TST_alldiv, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll }, + { "_alldiv", &TST_alldiv, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFFFll }, + { "_alldiv", &TST_alldiv, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000000ll }, + { "_alldiv", &TST_alldiv, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x000000000FFFFFFFll }, + { "_alldiv", &TST_alldiv, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x000000000FFFFFFFll }, + { "_alldiv", &TST_alldiv, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x0000000000000000ll }, + { "_alldiv", &TST_alldiv, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000080000008ll }, + { "_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xC000000080000008ll }, + { "_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000000000007FFFll }, + { "_alldiv", &TST_alldiv, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000001ll }, + + { "_allrem", &TST_allrem, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x000000000000000Fll }, + { "_allrem", &TST_allrem, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000100ll }, + { "_allrem", &TST_allrem, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0xFFFFFFFFFFFFFFFEll }, + { "_allrem", &TST_allrem, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll }, + { "_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000FFFF0000FFEEll }, + { "_allrem", &TST_allrem, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000000ll }, + + { "_ualldiv", &TST_ualldiv, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0xFFFFFFFFFFFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000001ll }, + { "_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll }, + { "_ualldiv", &TST_ualldiv, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x000000000FFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x00000000FFFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x000000000FFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x000000000FFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x00000001FFFFFFFFll }, + { "_ualldiv", &TST_ualldiv, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x0000000000000000ll }, + { "_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000000000007FFFll }, + { "_ualldiv", &TST_ualldiv, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000001ll }, + + { "_uallrem", &TST_uallrem, 0x0000000000000000ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll }, + { "_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000001ll }, + { "_uallrem", &TST_uallrem, 0x0000000000000001ll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x000000000FFFFFFFll, 0x0000000000000001ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x0000000FFFFFFFFFll, 0x0000000000000010ll, 0, 0x000000000000000Fll }, + { "_uallrem", &TST_uallrem, 0x0000000000000100ll, 0x000000000FFFFFFFll, 0, 0x0000000000000100ll }, + { "_uallrem", &TST_uallrem, 0x00FFFFFFF0000000ll, 0x0000000010000000ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0x07FFFFFF80000000ll, 0x0000000080000000ll, 0, 0x0000000000000000ll }, + { "_uallrem", &TST_uallrem, 0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll, 0, 0x000000007FFFFFFEll }, + { "_uallrem", &TST_uallrem, 0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0xFFFFFFFEFFFFFFF0ll }, + { "_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll, 0, 0x7FFFFFFEFFFFFFF0ll }, + { "_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll, 0, 0x0000FFFF0000FFEEll }, + { "_uallrem", &TST_uallrem, 0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll, 0, 0x0000000000000000ll }, + + { NULL } }; -int -Test64Bit (SDL_bool verbose) +int Test64Bit(SDL_bool verbose) { LL_Test *t; int failed = 0; @@ -376,46 +374,46 @@ Test64Bit (SDL_bool verbose) unsigned int *rl = (unsigned int *)&result; if (!t->routine(&t->a, &t->b, t->arg, &result, &t->expected_result)) { - if (verbose) - SDL_Log("%s(0x%08X%08X, 0x%08X%08X, %3d, produced: 0x%08X%08X, expected: 0x%08X%08X\n", - t->operation, al[1], al[0], bl[1], bl[0], t->arg, rl[1], rl[0], el[1], el[0]); + if (verbose) { + SDL_Log("%s(0x%08X%08X, 0x%08X%08X, %3d, produced: 0x%08X%08X, expected: 0x%08X%08X\n", t->operation, al[1], al[0], bl[1], bl[0], + t->arg, rl[1], rl[0], el[1], el[0]); + } ++failed; } } - if (verbose && (failed == 0)) + if (verbose && (failed == 0)) { SDL_Log("All 64bit instrinsic tests passed\n"); - return (failed ? 1 : 0); + } + return failed ? 1 : 0; } -int -TestCPUInfo(SDL_bool verbose) +int TestCPUInfo(SDL_bool verbose) { if (verbose) { SDL_Log("CPU count: %d\n", SDL_GetCPUCount()); SDL_Log("CPU cache line size: %d\n", SDL_GetCPUCacheLineSize()); - SDL_Log("RDTSC %s\n", SDL_HasRDTSC()? "detected" : "not detected"); - SDL_Log("AltiVec %s\n", SDL_HasAltiVec()? "detected" : "not detected"); - SDL_Log("MMX %s\n", SDL_HasMMX()? "detected" : "not detected"); - SDL_Log("3DNow! %s\n", SDL_Has3DNow()? "detected" : "not detected"); - SDL_Log("SSE %s\n", SDL_HasSSE()? "detected" : "not detected"); - SDL_Log("SSE2 %s\n", SDL_HasSSE2()? "detected" : "not detected"); - SDL_Log("SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected"); - SDL_Log("SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected"); - SDL_Log("SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected"); - SDL_Log("AVX %s\n", SDL_HasAVX()? "detected" : "not detected"); - SDL_Log("AVX2 %s\n", SDL_HasAVX2()? "detected" : "not detected"); - SDL_Log("AVX-512F %s\n", SDL_HasAVX512F()? "detected" : "not detected"); - SDL_Log("ARM SIMD %s\n", SDL_HasARMSIMD()? "detected" : "not detected"); - SDL_Log("NEON %s\n", SDL_HasNEON()? "detected" : "not detected"); - SDL_Log("LSX %s\n", SDL_HasLSX()? "detected" : "not detected"); - SDL_Log("LASX %s\n", SDL_HasLASX()? "detected" : "not detected"); + SDL_Log("RDTSC %s\n", SDL_HasRDTSC() ? "detected" : "not detected"); + SDL_Log("AltiVec %s\n", SDL_HasAltiVec() ? "detected" : "not detected"); + SDL_Log("MMX %s\n", SDL_HasMMX() ? "detected" : "not detected"); + SDL_Log("3DNow! %s\n", SDL_Has3DNow() ? "detected" : "not detected"); + SDL_Log("SSE %s\n", SDL_HasSSE() ? "detected" : "not detected"); + SDL_Log("SSE2 %s\n", SDL_HasSSE2() ? "detected" : "not detected"); + SDL_Log("SSE3 %s\n", SDL_HasSSE3() ? "detected" : "not detected"); + SDL_Log("SSE4.1 %s\n", SDL_HasSSE41() ? "detected" : "not detected"); + SDL_Log("SSE4.2 %s\n", SDL_HasSSE42() ? "detected" : "not detected"); + SDL_Log("AVX %s\n", SDL_HasAVX() ? "detected" : "not detected"); + SDL_Log("AVX2 %s\n", SDL_HasAVX2() ? "detected" : "not detected"); + SDL_Log("AVX-512F %s\n", SDL_HasAVX512F() ? "detected" : "not detected"); + SDL_Log("ARM SIMD %s\n", SDL_HasARMSIMD() ? "detected" : "not detected"); + SDL_Log("NEON %s\n", SDL_HasNEON() ? "detected" : "not detected"); + SDL_Log("LSX %s\n", SDL_HasLSX() ? "detected" : "not detected"); + SDL_Log("LASX %s\n", SDL_HasLASX() ? "detected" : "not detected"); SDL_Log("System RAM %d MB\n", SDL_GetSystemRAM()); } - return (0); + return 0; } -int -TestAssertions(SDL_bool verbose) +int TestAssertions(SDL_bool verbose) { SDL_assert(1); SDL_assert_release(1); @@ -424,7 +422,7 @@ TestAssertions(SDL_bool verbose) SDL_assert_release(0 || 1); SDL_assert_paranoid(0 || 1); -#if 0 /* enable this to test assertion failures. */ +#if 0 /* enable this to test assertion failures. */ SDL_assert_release(1 == 2); SDL_assert_release(5 < 4); SDL_assert_release(0 && "This is a test"); @@ -434,17 +432,16 @@ TestAssertions(SDL_bool verbose) const SDL_AssertData *item = SDL_GetAssertionReport(); while (item) { SDL_Log("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n", - item->condition, item->function, item->filename, - item->linenum, item->trigger_count, - item->always_ignore ? "yes" : "no"); + item->condition, item->function, item->filename, + item->linenum, item->trigger_count, + item->always_ignore ? "yes" : "no"); item = item->next; } } - return (0); + return 0; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_bool verbose = SDL_TRUE; int status = 0; diff --git a/modules/SDL2/test/testpower.c b/modules/SDL2/test/testpower.c index 1b15929..af60258 100644 --- a/modules/SDL2/test/testpower.c +++ b/modules/SDL2/test/testpower.c @@ -54,14 +54,11 @@ report_power(void) if (seconds == -1) { SDL_Log("Time left: unknown\n"); } else { - SDL_Log("Time left: %d minutes, %d seconds\n", (int) (seconds / 60), - (int) (seconds % 60)); + SDL_Log("Time left: %d minutes, %d seconds\n", seconds / 60, seconds % 60); } } - -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); diff --git a/modules/SDL2/test/testqsort.c b/modules/SDL2/test/testqsort.c index fb7a54f..271671e 100644 --- a/modules/SDL2/test/testqsort.c +++ b/modules/SDL2/test/testqsort.c @@ -15,8 +15,8 @@ static int SDLCALL num_compare(const void *_a, const void *_b) { - const int a = *((const int *) _a); - const int b = *((const int *) _b); + const int a = *((const int *)_a); + const int b = *((const int *)_b); return (a < b) ? -1 : ((a > b) ? 1 : 0); } @@ -28,7 +28,7 @@ test_sort(const char *desc, int *nums, const int arraylen) SDL_Log("test: %s arraylen=%d", desc, arraylen); - SDL_qsort(nums, arraylen, sizeof (nums[0]), num_compare); + SDL_qsort(nums, arraylen, sizeof(nums[0]), num_compare); prev = nums[0]; for (i = 1; i < arraylen; i++) { @@ -41,22 +41,21 @@ test_sort(const char *desc, int *nums, const int arraylen) } } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { static int nums[1024 * 100]; static const int itervals[] = { SDL_arraysize(nums), 12 }; int iteration; SDLTest_RandomContext rndctx; - if (argc > 1) - { + if (argc > 1) { int success; Uint64 seed = 0; - if (argv[1][0] == '0' && argv[1][1] == 'x') - success = SDL_sscanf(argv[1] + 2, "%"SDL_PRIx64, &seed); - else - success = SDL_sscanf(argv[1], "%"SDL_PRIu64, &seed); + if (argv[1][0] == '0' && argv[1][1] == 'x') { + success = SDL_sscanf(argv[1] + 2, "%" SDL_PRIx64, &seed); + } else { + success = SDL_sscanf(argv[1], "%" SDL_PRIu64, &seed); + } if (!success) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n"); return 1; @@ -66,9 +65,7 @@ main(int argc, char *argv[]) return 1; } SDLTest_RandomInit(&rndctx, (unsigned int)(seed >> 32), (unsigned int)(seed & 0xffffffff)); - } - else - { + } else { SDLTest_RandomInitTime(&rndctx); } SDL_Log("Using random seed 0x%08x%08x\n", rndctx.x, rndctx.c); @@ -85,11 +82,11 @@ main(int argc, char *argv[]) for (i = 0; i < arraylen; i++) { nums[i] = i; } - nums[arraylen-1] = -1; + nums[arraylen - 1] = -1; test_sort("already sorted except last element", nums, arraylen); for (i = 0; i < arraylen; i++) { - nums[i] = (arraylen-1) - i; + nums[i] = (arraylen - 1) - i; } test_sort("reverse sorted", nums, arraylen); diff --git a/modules/SDL2/test/testrelative.c b/modules/SDL2/test/testrelative.c index fdbe771..88ed0bf 100644 --- a/modules/SDL2/test/testrelative.c +++ b/modules/SDL2/test/testrelative.c @@ -28,40 +28,49 @@ SDL_Rect rect; SDL_Event event; static void -DrawRects(SDL_Renderer * renderer) +DrawRects(SDL_Renderer *renderer) { SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); SDL_RenderFillRect(renderer, &rect); } static void -loop(){ +loop() +{ /* Check for events */ while (SDL_PollEvent(&event)) { SDLTest_CommonEvent(state, &event, &done); - switch(event.type) { + switch (event.type) { case SDL_MOUSEMOTION: - { - rect.x += event.motion.xrel; - rect.y += event.motion.yrel; - } - break; + { + rect.x += event.motion.xrel; + rect.y += event.motion.yrel; + } break; } } for (i = 0; i < state->num_windows; ++i) { SDL_Rect viewport; SDL_Renderer *renderer = state->renderers[i]; - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF); SDL_RenderClear(renderer); /* Wrap the cursor rectangle at the screen edges to keep it visible */ SDL_RenderGetViewport(renderer, &viewport); - if (rect.x < viewport.x) rect.x += viewport.w; - if (rect.y < viewport.y) rect.y += viewport.h; - if (rect.x > viewport.x + viewport.w) rect.x -= viewport.w; - if (rect.y > viewport.y + viewport.h) rect.y -= viewport.h; + if (rect.x < viewport.x) { + rect.x += viewport.w; + } + if (rect.y < viewport.y) { + rect.y += viewport.h; + } + if (rect.x > viewport.x + viewport.w) { + rect.x -= viewport.w; + } + if (rect.y > viewport.y + viewport.h) { + rect.y -= viewport.h; + } DrawRects(renderer); @@ -74,8 +83,7 @@ loop(){ #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { /* Enable standard application logging */ @@ -83,7 +91,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc; ++i) { @@ -102,7 +110,7 @@ main(int argc, char *argv[]) } srand((unsigned int)time(NULL)); - if(SDL_SetRelativeMouseMode(SDL_TRUE) < 0) { + if (SDL_SetRelativeMouseMode(SDL_TRUE) < 0) { return 3; } @@ -117,7 +125,7 @@ main(int argc, char *argv[]) #else while (!done) { loop(); - } + } #endif SDLTest_CommonQuit(state); return 0; diff --git a/modules/SDL2/test/testrendercopyex.c b/modules/SDL2/test/testrendercopyex.c index 60a38ce..de7bc01 100644 --- a/modules/SDL2/test/testrendercopyex.c +++ b/modules/SDL2/test/testrendercopyex.c @@ -24,7 +24,8 @@ static SDLTest_CommonState *state; -typedef struct { +typedef struct +{ SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *background; @@ -44,13 +45,12 @@ quit(int rc) exit(rc); } -void -Draw(DrawState *s) +void Draw(DrawState *s) { SDL_Rect viewport; SDL_Texture *target; - SDL_Point *center=NULL; - SDL_Point origin = {0,0}; + SDL_Point *center = NULL; + SDL_Point origin = { 0, 0 }; SDL_RenderGetViewport(s->renderer, &viewport); @@ -98,8 +98,9 @@ void loop() SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } Draw(&drawstates[i]); } #ifdef __EMSCRIPTEN__ @@ -109,8 +110,7 @@ void loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; int frames; @@ -121,7 +121,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } @@ -157,12 +157,12 @@ main(int argc, char *argv[]) while (!done) { ++frames; loop(); - } + } #endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } diff --git a/modules/SDL2/test/testrendertarget.c b/modules/SDL2/test/testrendertarget.c index 3284d69..1ae6099 100644 --- a/modules/SDL2/test/testrendertarget.c +++ b/modules/SDL2/test/testrendertarget.c @@ -24,7 +24,8 @@ static SDLTest_CommonState *state; -typedef struct { +typedef struct +{ SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *background; @@ -137,7 +138,7 @@ Draw(DrawState *s) SDL_RenderGetViewport(s->renderer, &viewport); target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h); - if (!target) { + if (target == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create render target texture: %s\n", SDL_GetError()); return SDL_FALSE; } @@ -172,8 +173,7 @@ Draw(DrawState *s) return SDL_TRUE; } -void -loop() +void loop() { int i; SDL_Event event; @@ -183,12 +183,17 @@ loop() SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } if (test_composite) { - if (!DrawComposite(&drawstates[i])) done = 1; + if (!DrawComposite(&drawstates[i])) { + done = 1; + } } else { - if (!Draw(&drawstates[i])) done = 1; + if (!Draw(&drawstates[i])) { + done = 1; + } } } #ifdef __EMSCRIPTEN__ @@ -198,8 +203,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; int frames; @@ -210,7 +214,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } for (i = 1; i < argc;) { @@ -272,7 +276,7 @@ main(int argc, char *argv[]) /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } diff --git a/modules/SDL2/test/testresample.c b/modules/SDL2/test/testresample.c index 1f5bd82..8bb603a 100644 --- a/modules/SDL2/test/testresample.c +++ b/modules/SDL2/test/testresample.c @@ -12,8 +12,7 @@ #include "SDL.h" -int -main(int argc, char **argv) +int main(int argc, char **argv) { SDL_AudioSpec spec; SDL_AudioCVT cvt; @@ -57,7 +56,7 @@ main(int argc, char **argv) } cvt.len = len; - cvt.buf = (Uint8 *) SDL_malloc(len * cvt.len_mult); + cvt.buf = (Uint8 *)SDL_malloc((size_t)len * cvt.len_mult); if (cvt.buf == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory.\n"); SDL_FreeWAV(data); @@ -88,19 +87,19 @@ main(int argc, char **argv) blockalign = (bitsize / 8) * cvtchans; avgbytes = cvtfreq * blockalign; - SDL_WriteLE32(io, 0x46464952); /* RIFF */ + SDL_WriteLE32(io, 0x46464952); /* RIFF */ SDL_WriteLE32(io, cvt.len_cvt + 36); - SDL_WriteLE32(io, 0x45564157); /* WAVE */ - SDL_WriteLE32(io, 0x20746D66); /* fmt */ - SDL_WriteLE32(io, 16); /* chunk size */ - SDL_WriteLE16(io, SDL_AUDIO_ISFLOAT(spec.format) ? 3 : 1); /* uncompressed */ - SDL_WriteLE16(io, cvtchans); /* channels */ - SDL_WriteLE32(io, cvtfreq); /* sample rate */ - SDL_WriteLE32(io, avgbytes); /* average bytes per second */ - SDL_WriteLE16(io, blockalign); /* block align */ - SDL_WriteLE16(io, bitsize); /* significant bits per sample */ - SDL_WriteLE32(io, 0x61746164); /* data */ - SDL_WriteLE32(io, cvt.len_cvt); /* size */ + SDL_WriteLE32(io, 0x45564157); /* WAVE */ + SDL_WriteLE32(io, 0x20746D66); /* fmt */ + SDL_WriteLE32(io, 16); /* chunk size */ + SDL_WriteLE16(io, SDL_AUDIO_ISFLOAT(spec.format) ? 3 : 1); /* uncompressed */ + SDL_WriteLE16(io, cvtchans); /* channels */ + SDL_WriteLE32(io, cvtfreq); /* sample rate */ + SDL_WriteLE32(io, avgbytes); /* average bytes per second */ + SDL_WriteLE16(io, blockalign); /* block align */ + SDL_WriteLE16(io, bitsize); /* significant bits per sample */ + SDL_WriteLE32(io, 0x61746164); /* data */ + SDL_WriteLE32(io, cvt.len_cvt); /* size */ SDL_RWwrite(io, cvt.buf, cvt.len_cvt, 1); if (SDL_RWclose(io) == -1) { @@ -109,12 +108,12 @@ main(int argc, char **argv) SDL_FreeWAV(data); SDL_Quit(); return 8; - } /* if */ + } /* if */ SDL_free(cvt.buf); SDL_FreeWAV(data); SDL_Quit(); return 0; -} /* main */ +} /* main */ /* end of testresample.c ... */ diff --git a/modules/SDL2/test/testrumble.c b/modules/SDL2/test/testrumble.c index 330440e..d6288d5 100644 --- a/modules/SDL2/test/testrumble.c +++ b/modules/SDL2/test/testrumble.c @@ -31,14 +31,12 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND static SDL_Haptic *haptic; - /** * @brief The entry point of this force feedback demo. * @param[in] argc Number of arguments. * @param[in] argv Array of argc arguments. */ -int -main(int argc, char **argv) +int main(int argc, char **argv) { int i; char *name; @@ -54,9 +52,9 @@ main(int argc, char **argv) name = argv[1]; if ((SDL_strcmp(name, "--help") == 0) || (SDL_strcmp(name, "-h") == 0)) { SDL_Log("USAGE: %s [device]\n" - "If device is a two-digit number it'll use it as an index, otherwise\n" - "it'll use it as if it were part of the device's name.\n", - argv[0]); + "If device is a two-digit number it'll use it as an index, otherwise\n" + "it'll use it as if it were part of the device's name.\n", + argv[0]); return 0; } @@ -79,13 +77,14 @@ main(int argc, char **argv) /* Try to find matching device */ else { for (i = 0; i < SDL_NumHaptics(); i++) { - if (SDL_strstr(SDL_HapticName(i), name) != NULL) + if (SDL_strstr(SDL_HapticName(i), name) != NULL) { break; + } } if (i >= SDL_NumHaptics()) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", - name); + name); return 1; } } @@ -93,7 +92,7 @@ main(int argc, char **argv) haptic = SDL_HapticOpen(i); if (haptic == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", - SDL_GetError()); + SDL_GetError()); return 1; } SDL_Log("Device: %s\n", SDL_HapticName(i)); @@ -115,8 +114,8 @@ main(int argc, char **argv) } SDL_Log("Playing 2 second rumble at 0.5 magnitude.\n"); if (SDL_HapticRumblePlay(haptic, 0.5, 5000) != 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); - return 1; + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError()); + return 1; } SDL_Delay(2000); SDL_Log("Stopping rumble.\n"); @@ -124,14 +123,15 @@ main(int argc, char **argv) SDL_Delay(2000); SDL_Log("Playing 2 second rumble at 0.3 magnitude.\n"); if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); - return 1; + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError()); + return 1; } SDL_Delay(2000); /* Quit */ - if (haptic != NULL) + if (haptic != NULL) { SDL_HapticClose(haptic); + } SDL_Quit(); return 0; diff --git a/modules/SDL2/test/testscale.c b/modules/SDL2/test/testscale.c index 0d5d4dd..dca3d09 100644 --- a/modules/SDL2/test/testscale.c +++ b/modules/SDL2/test/testscale.c @@ -22,12 +22,13 @@ #include "SDL_test_common.h" #include "testutils.h" -#define WINDOW_WIDTH 640 -#define WINDOW_HEIGHT 480 +#define WINDOW_WIDTH 640 +#define WINDOW_HEIGHT 480 static SDLTest_CommonState *state; -typedef struct { +typedef struct +{ SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *background; @@ -47,8 +48,7 @@ quit(int rc) exit(rc); } -void -Draw(DrawState *s) +void Draw(DrawState *s) { SDL_Rect viewport; @@ -78,8 +78,7 @@ Draw(DrawState *s) SDL_RenderPresent(s->renderer); } -void -loop() +void loop() { int i; SDL_Event event; @@ -89,8 +88,9 @@ loop() SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } Draw(&drawstates[i]); } #ifdef __EMSCRIPTEN__ @@ -100,8 +100,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; int frames; @@ -112,7 +111,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } @@ -154,7 +153,7 @@ main(int argc, char *argv[]) /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } diff --git a/modules/SDL2/test/testsem.c b/modules/SDL2/test/testsem.c index f96a94f..c0036e8 100644 --- a/modules/SDL2/test/testsem.c +++ b/modules/SDL2/test/testsem.c @@ -21,14 +21,15 @@ #define NUM_THREADS 10 /* This value should be smaller than the maximum count of the */ /* semaphore implementation: */ -#define NUM_OVERHEAD_OPS 10000 +#define NUM_OVERHEAD_OPS 10000 #define NUM_OVERHEAD_OPS_MULT 10 static SDL_sem *sem; int alive; -typedef struct Thread_State { - SDL_Thread * thread; +typedef struct Thread_State +{ + SDL_Thread *thread; int number; SDL_bool flag; int loop_count; @@ -44,7 +45,7 @@ killed(int sig) static int SDLCALL ThreadFuncRealWorld(void *data) { - Thread_State *state = (Thread_State *) data; + Thread_State *state = (Thread_State *)data; while (alive) { SDL_SemWait(sem); SDL_Log("Thread number %d has got the semaphore (value = %" SDL_PRIu32 ")!\n", @@ -54,29 +55,30 @@ ThreadFuncRealWorld(void *data) SDL_Log("Thread number %d has released the semaphore (value = %" SDL_PRIu32 ")!\n", state->number, SDL_SemValue(sem)); ++state->loop_count; - SDL_Delay(1); /* For the scheduler */ + SDL_Delay(1); /* For the scheduler */ } SDL_Log("Thread number %d exiting.\n", state->number); return 0; } static void -TestRealWorld(int init_sem) { - Thread_State thread_states[NUM_THREADS] = { {0} }; +TestRealWorld(int init_sem) +{ + Thread_State thread_states[NUM_THREADS] = { { 0 } }; int i; int loop_count; sem = SDL_CreateSemaphore(init_sem); SDL_Log("Running %d threads, semaphore value = %d\n", NUM_THREADS, - init_sem); + init_sem); alive = 1; /* Create all the threads */ for (i = 0; i < NUM_THREADS; ++i) { char name[64]; - SDL_snprintf(name, sizeof (name), "Thread%u", (unsigned int) i); + (void)SDL_snprintf(name, sizeof(name), "Thread%u", (unsigned int)i); thread_states[i].number = i; - thread_states[i].thread = SDL_CreateThread(ThreadFuncRealWorld, name, (void *) &thread_states[i]); + thread_states[i].thread = SDL_CreateThread(ThreadFuncRealWorld, name, (void *)&thread_states[i]); } /* Wait 10 seconds */ @@ -117,8 +119,9 @@ TestWaitTimeout(void) SDL_Log("Wait took %" SDL_PRIu32 " milliseconds\n\n", duration); /* Check to make sure the return value indicates timed out */ - if (retval != SDL_MUTEX_TIMEDOUT) + if (retval != SDL_MUTEX_TIMEDOUT) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_SemWaitTimeout returned: %d; expected: %d\n\n", retval, SDL_MUTEX_TIMEDOUT); + } SDL_DestroySemaphore(sem); } @@ -135,7 +138,7 @@ TestOverheadUncontended(void) SDL_Log("Doing %d uncontended Post/Wait operations on semaphore\n", NUM_OVERHEAD_OPS * NUM_OVERHEAD_OPS_MULT); start_ticks = SDL_GetTicks(); - for (i = 0; i < NUM_OVERHEAD_OPS_MULT; i++){ + for (i = 0; i < NUM_OVERHEAD_OPS_MULT; i++) { for (j = 0; j < NUM_OVERHEAD_OPS; j++) { SDL_SemPost(sem); } @@ -154,17 +157,17 @@ TestOverheadUncontended(void) static int SDLCALL ThreadFuncOverheadContended(void *data) { - Thread_State *state = (Thread_State *) data; + Thread_State *state = (Thread_State *)data; if (state->flag) { - while(alive) { + while (alive) { if (SDL_SemTryWait(sem) == SDL_MUTEX_TIMEDOUT) { ++state->content_count; } ++state->loop_count; } } else { - while(alive) { + while (alive) { /* Timeout needed to allow check on alive flag */ if (SDL_SemWaitTimeout(sem, 50) == SDL_MUTEX_TIMEDOUT) { ++state->content_count; @@ -181,7 +184,7 @@ TestOverheadContended(SDL_bool try_wait) Uint32 start_ticks; Uint32 end_ticks; Uint32 duration; - Thread_State thread_states[NUM_THREADS] = { {0} }; + Thread_State thread_states[NUM_THREADS] = { { 0 } }; char textBuffer[1024]; int loop_count; int content_count; @@ -195,9 +198,9 @@ TestOverheadContended(SDL_bool try_wait) /* Create multiple threads to starve the semaphore and cause contention */ for (i = 0; i < NUM_THREADS; ++i) { char name[64]; - SDL_snprintf(name, sizeof (name), "Thread%u", (unsigned int) i); + (void)SDL_snprintf(name, sizeof(name), "Thread%u", (unsigned int)i); thread_states[i].flag = try_wait; - thread_states[i].thread = SDL_CreateThread(ThreadFuncOverheadContended, name, (void *) &thread_states[i]); + thread_states[i].thread = SDL_CreateThread(ThreadFuncOverheadContended, name, (void *)&thread_states[i]); } start_ticks = SDL_GetTicks(); @@ -206,7 +209,10 @@ TestOverheadContended(SDL_bool try_wait) SDL_SemPost(sem); } /* Make sure threads consumed everything */ - while (SDL_SemValue(sem)) { } + while (SDL_SemValue(sem)) { + /* Friendlier with cooperative threading models */ + SDL_Delay(1); + } } end_ticks = SDL_GetTicks(); @@ -223,26 +229,25 @@ TestOverheadContended(SDL_bool try_wait) duration = end_ticks - start_ticks; SDL_Log("Took %" SDL_PRIu32 " milliseconds, threads %s %d out of %d times in total (%.2f%%)\n", duration, try_wait ? "where contended" : "timed out", content_count, - loop_count, ((float) content_count * 100) / loop_count); + loop_count, ((float)content_count * 100) / loop_count); /* Print how many semaphores where consumed per thread */ - SDL_snprintf(textBuffer, sizeof(textBuffer), "{ "); + (void)SDL_snprintf(textBuffer, sizeof(textBuffer), "{ "); for (i = 0; i < NUM_THREADS; ++i) { if (i > 0) { len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, ", "); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, ", "); } len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, "%d", thread_states[i].loop_count - thread_states[i].content_count); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, "%d", thread_states[i].loop_count - thread_states[i].content_count); } len = SDL_strlen(textBuffer); - SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, " }\n"); + (void)SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, " }\n"); SDL_Log("%s\n", textBuffer); SDL_DestroySemaphore(sem); } -int -main(int argc, char **argv) +int main(int argc, char **argv) { int init_sem; @@ -251,16 +256,16 @@ main(int argc, char **argv) if (argc < 2) { SDL_Log("Usage: %s init_value\n", argv[0]); - return (1); + return 1; } /* Load the SDL library */ if (SDL_Init(0) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } - signal(SIGTERM, killed); - signal(SIGINT, killed); + (void)signal(SIGTERM, killed); + (void)signal(SIGINT, killed); init_sem = SDL_atoi(argv[1]); if (init_sem > 0) { @@ -276,5 +281,5 @@ main(int argc, char **argv) TestOverheadContended(SDL_TRUE); SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testsensor.c b/modules/SDL2/test/testsensor.c index aae95ab..3da7e01 100644 --- a/modules/SDL2/test/testsensor.c +++ b/modules/SDL2/test/testsensor.c @@ -18,8 +18,7 @@ static const char *GetSensorTypeString(SDL_SensorType type) { static char unknown_type[64]; - switch (type) - { + switch (type) { case SDL_SENSOR_INVALID: return "SDL_SENSOR_INVALID"; case SDL_SENSOR_UNKNOWN: @@ -29,7 +28,7 @@ static const char *GetSensorTypeString(SDL_SensorType type) case SDL_SENSOR_GYRO: return "SDL_SENSOR_GYRO"; default: - SDL_snprintf(unknown_type, sizeof(unknown_type), "UNKNOWN (%d)", type); + (void)SDL_snprintf(unknown_type, sizeof(unknown_type), "UNKNOWN (%d)", type); return unknown_type; } } @@ -37,7 +36,7 @@ static const char *GetSensorTypeString(SDL_SensorType type) static void HandleSensorEvent(SDL_SensorEvent *event) { SDL_Sensor *sensor = SDL_SensorFromInstanceID(event->which); - if (!sensor) { + if (sensor == NULL) { SDL_Log("Couldn't get sensor for sensor event\n"); return; } @@ -55,8 +54,7 @@ static void HandleSensorEvent(SDL_SensorEvent *event) } } -int -main(int argc, char **argv) +int main(int argc, char **argv) { int i; int num_sensors, num_opened; @@ -64,7 +62,7 @@ main(int argc, char **argv) /* Load the SDL library */ if (SDL_Init(SDL_INIT_SENSOR) < 0) { SDL_Log("Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } num_sensors = SDL_NumSensors(); @@ -117,5 +115,5 @@ main(int argc, char **argv) } SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testshader.c b/modules/SDL2/test/testshader.c index 502522e..2371fce 100644 --- a/modules/SDL2/test/testshader.c +++ b/modules/SDL2/test/testshader.c @@ -17,18 +17,19 @@ #include "SDL_opengl.h" - static SDL_bool shaders_supported; -static int current_shader = 0; +static int current_shader = 0; -enum { +enum +{ SHADER_COLOR, SHADER_TEXTURE, SHADER_TEXCOORDS, NUM_SHADERS }; -typedef struct { +typedef struct +{ GLhandleARB program; GLhandleARB vert_shader; GLhandleARB frag_shader; @@ -40,75 +41,72 @@ static ShaderData shaders[NUM_SHADERS] = { /* SHADER_COLOR */ { 0, 0, 0, - /* vertex shader */ -"varying vec4 v_color;\n" -"\n" -"void main()\n" -"{\n" -" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" -" v_color = gl_Color;\n" -"}", - /* fragment shader */ -"varying vec4 v_color;\n" -"\n" -"void main()\n" -"{\n" -" gl_FragColor = v_color;\n" -"}" - }, + /* vertex shader */ + "varying vec4 v_color;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + " v_color = gl_Color;\n" + "}", + /* fragment shader */ + "varying vec4 v_color;\n" + "\n" + "void main()\n" + "{\n" + " gl_FragColor = v_color;\n" + "}" }, /* SHADER_TEXTURE */ { 0, 0, 0, - /* vertex shader */ -"varying vec4 v_color;\n" -"varying vec2 v_texCoord;\n" -"\n" -"void main()\n" -"{\n" -" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" -" v_color = gl_Color;\n" -" v_texCoord = vec2(gl_MultiTexCoord0);\n" -"}", - /* fragment shader */ -"varying vec4 v_color;\n" -"varying vec2 v_texCoord;\n" -"uniform sampler2D tex0;\n" -"\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex0, v_texCoord) * v_color;\n" -"}" - }, + /* vertex shader */ + "varying vec4 v_color;\n" + "varying vec2 v_texCoord;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + " v_color = gl_Color;\n" + " v_texCoord = vec2(gl_MultiTexCoord0);\n" + "}", + /* fragment shader */ + "varying vec4 v_color;\n" + "varying vec2 v_texCoord;\n" + "uniform sampler2D tex0;\n" + "\n" + "void main()\n" + "{\n" + " gl_FragColor = texture2D(tex0, v_texCoord) * v_color;\n" + "}" }, /* SHADER_TEXCOORDS */ { 0, 0, 0, - /* vertex shader */ -"varying vec2 v_texCoord;\n" -"\n" -"void main()\n" -"{\n" -" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" -" v_texCoord = vec2(gl_MultiTexCoord0);\n" -"}", - /* fragment shader */ -"varying vec2 v_texCoord;\n" -"\n" -"void main()\n" -"{\n" -" vec4 color;\n" -" vec2 delta;\n" -" float dist;\n" -"\n" -" delta = vec2(0.5, 0.5) - v_texCoord;\n" -" dist = dot(delta, delta);\n" -"\n" -" color.r = v_texCoord.x;\n" -" color.g = v_texCoord.x * v_texCoord.y;\n" -" color.b = v_texCoord.y;\n" -" color.a = 1.0 - (dist * 4.0);\n" -" gl_FragColor = color;\n" -"}" - }, + /* vertex shader */ + "varying vec2 v_texCoord;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + " v_texCoord = vec2(gl_MultiTexCoord0);\n" + "}", + /* fragment shader */ + "varying vec2 v_texCoord;\n" + "\n" + "void main()\n" + "{\n" + " vec4 color;\n" + " vec2 delta;\n" + " float dist;\n" + "\n" + " delta = vec2(0.5, 0.5) - v_texCoord;\n" + " dist = dot(delta, delta);\n" + "\n" + " color.r = v_texCoord.x;\n" + " color.g = v_texCoord.x * v_texCoord.y;\n" + " color.b = v_texCoord.y;\n" + " color.a = 1.0 - (dist * 4.0);\n" + " gl_FragColor = color;\n" + "}" }, }; static PFNGLATTACHOBJECTARBPROC glAttachObjectARB; @@ -136,8 +134,8 @@ static SDL_bool CompileShader(GLhandleARB shader, const char *source) char *info; glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); - info = (char *) SDL_malloc(length + 1); - if (!info) { + info = (char *)SDL_malloc((size_t)length + 1); + if (info == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!"); } else { glGetInfoLogARB(shader, length, NULL, info); @@ -164,8 +162,8 @@ static SDL_bool LinkProgram(ShaderData *data) char *info; glGetObjectParameterivARB(data->program, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); - info = (char *) SDL_malloc(length + 1); - if (!info) { + info = (char *)SDL_malloc((size_t)length + 1); + if (info == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!"); } else { glGetInfoLogARB(data->program, length, NULL, info); @@ -210,7 +208,7 @@ static SDL_bool CompileShaderProgram(ShaderData *data) glUseProgramObjectARB(data->program); for (i = 0; i < num_tmus_bound; ++i) { char tex_name[5]; - SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i); + (void)SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i); location = glGetUniformLocationARB(data->program, tex_name); if (location >= 0) { glUniform1iARB(location, i); @@ -240,18 +238,18 @@ static SDL_bool InitShaders() SDL_GL_ExtensionSupported("GL_ARB_shading_language_100") && SDL_GL_ExtensionSupported("GL_ARB_vertex_shader") && SDL_GL_ExtensionSupported("GL_ARB_fragment_shader")) { - glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) SDL_GL_GetProcAddress("glAttachObjectARB"); - glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) SDL_GL_GetProcAddress("glCompileShaderARB"); - glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress("glCreateProgramObjectARB"); - glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) SDL_GL_GetProcAddress("glCreateShaderObjectARB"); - glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) SDL_GL_GetProcAddress("glDeleteObjectARB"); - glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) SDL_GL_GetProcAddress("glGetInfoLogARB"); - glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) SDL_GL_GetProcAddress("glGetObjectParameterivARB"); - glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) SDL_GL_GetProcAddress("glGetUniformLocationARB"); - glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) SDL_GL_GetProcAddress("glLinkProgramARB"); - glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) SDL_GL_GetProcAddress("glShaderSourceARB"); - glUniform1iARB = (PFNGLUNIFORM1IARBPROC) SDL_GL_GetProcAddress("glUniform1iARB"); - glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress("glUseProgramObjectARB"); + glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)SDL_GL_GetProcAddress("glAttachObjectARB"); + glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)SDL_GL_GetProcAddress("glCompileShaderARB"); + glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glCreateProgramObjectARB"); + glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)SDL_GL_GetProcAddress("glCreateShaderObjectARB"); + glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)SDL_GL_GetProcAddress("glDeleteObjectARB"); + glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)SDL_GL_GetProcAddress("glGetInfoLogARB"); + glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)SDL_GL_GetProcAddress("glGetObjectParameterivARB"); + glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC)SDL_GL_GetProcAddress("glGetUniformLocationARB"); + glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)SDL_GL_GetProcAddress("glLinkProgramARB"); + glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)SDL_GL_GetProcAddress("glShaderSourceARB"); + glUniform1iARB = (PFNGLUNIFORM1IARBPROC)SDL_GL_GetProcAddress("glUniform1iARB"); + glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glUseProgramObjectARB"); if (glAttachObjectARB && glCompileShaderARB && glCreateProgramObjectARB && @@ -306,7 +304,7 @@ power_of_two(int input) } GLuint -SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) +SDL_GL_LoadTexture(SDL_Surface *surface, GLfloat *texcoord) { GLuint texture; int w, h; @@ -317,10 +315,10 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) /* Use the surface width and height expanded to powers of 2 */ w = power_of_two(surface->w); h = power_of_two(surface->h); - texcoord[0] = 0.0f; /* Min X */ - texcoord[1] = 0.0f; /* Min Y */ - texcoord[2] = (GLfloat) surface->w / w; /* Max X */ - texcoord[3] = (GLfloat) surface->h / h; /* Max Y */ + texcoord[0] = 0.0f; /* Min X */ + texcoord[1] = 0.0f; /* Min Y */ + texcoord[2] = (GLfloat)surface->w / w; /* Max X */ + texcoord[3] = (GLfloat)surface->h / h; /* Max Y */ image = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */ @@ -330,7 +328,7 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF #endif - ); + ); if (image == NULL) { return 0; } @@ -357,25 +355,25 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels); - SDL_FreeSurface(image); /* No longer needed */ + SDL_FreeSurface(image); /* No longer needed */ return texture; } /* A general OpenGL initialization function. Sets all of the initial parameters. */ -void InitGL(int Width, int Height) /* We call this right after our OpenGL window is created. */ +void InitGL(int Width, int Height) /* We call this right after our OpenGL window is created. */ { GLdouble aspect; glViewport(0, 0, Width, Height); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); /* This Will Clear The Background Color To Black */ - glClearDepth(1.0); /* Enables Clearing Of The Depth Buffer */ - glDepthFunc(GL_LESS); /* The Type Of Depth Test To Do */ - glEnable(GL_DEPTH_TEST); /* Enables Depth Testing */ - glShadeModel(GL_SMOOTH); /* Enables Smooth Color Shading */ + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); /* This Will Clear The Background Color To Black */ + glClearDepth(1.0); /* Enables Clearing Of The Depth Buffer */ + glDepthFunc(GL_LESS); /* The Type Of Depth Test To Do */ + glEnable(GL_DEPTH_TEST); /* Enables Depth Testing */ + glShadeModel(GL_SMOOTH); /* Enables Smooth Color Shading */ glMatrixMode(GL_PROJECTION); - glLoadIdentity(); /* Reset The Projection Matrix */ + glLoadIdentity(); /* Reset The Projection Matrix */ aspect = (GLdouble)Width / Height; glOrtho(-3.0, 3.0, -3.0 / aspect, 3.0 / aspect, 0.0, 1.0); @@ -384,32 +382,33 @@ void InitGL(int Width, int Height) /* We call this right afte } /* The main drawing function. */ -void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord) +void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat *texcoord) { /* Texture coordinate lookup, to make it simple */ - enum { + enum + { MINX, MINY, MAXX, MAXY }; - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Clear The Screen And The Depth Buffer */ - glLoadIdentity(); /* Reset The View */ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Clear The Screen And The Depth Buffer */ + glLoadIdentity(); /* Reset The View */ - glTranslatef(-1.5f,0.0f,0.0f); /* Move Left 1.5 Units */ + glTranslatef(-1.5f, 0.0f, 0.0f); /* Move Left 1.5 Units */ /* draw a triangle (in smooth coloring mode) */ - glBegin(GL_POLYGON); /* start drawing a polygon */ - glColor3f(1.0f,0.0f,0.0f); /* Set The Color To Red */ - glVertex3f( 0.0f, 1.0f, 0.0f); /* Top */ - glColor3f(0.0f,1.0f,0.0f); /* Set The Color To Green */ - glVertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Right */ - glColor3f(0.0f,0.0f,1.0f); /* Set The Color To Blue */ - glVertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Left */ - glEnd(); /* we're done with the polygon (smooth color interpolation) */ + glBegin(GL_POLYGON); /* start drawing a polygon */ + glColor3f(1.0f, 0.0f, 0.0f); /* Set The Color To Red */ + glVertex3f(0.0f, 1.0f, 0.0f); /* Top */ + glColor3f(0.0f, 1.0f, 0.0f); /* Set The Color To Green */ + glVertex3f(1.0f, -1.0f, 0.0f); /* Bottom Right */ + glColor3f(0.0f, 0.0f, 1.0f); /* Set The Color To Blue */ + glVertex3f(-1.0f, -1.0f, 0.0f); /* Bottom Left */ + glEnd(); /* we're done with the polygon (smooth color interpolation) */ - glTranslatef(3.0f,0.0f,0.0f); /* Move Right 3 Units */ + glTranslatef(3.0f, 0.0f, 0.0f); /* Move Right 3 Units */ /* Enable blending */ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); @@ -419,21 +418,21 @@ void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord) /* draw a textured square (quadrilateral) */ glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); - glColor3f(1.0f,1.0f,1.0f); + glColor3f(1.0f, 1.0f, 1.0f); if (shaders_supported) { glUseProgramObjectARB(shaders[current_shader].program); } - glBegin(GL_QUADS); /* start drawing a polygon (4 sided) */ + glBegin(GL_QUADS); /* start drawing a polygon (4 sided) */ glTexCoord2f(texcoord[MINX], texcoord[MINY]); - glVertex3f(-1.0f, 1.0f, 0.0f); /* Top Left */ + glVertex3f(-1.0f, 1.0f, 0.0f); /* Top Left */ glTexCoord2f(texcoord[MAXX], texcoord[MINY]); - glVertex3f( 1.0f, 1.0f, 0.0f); /* Top Right */ + glVertex3f(1.0f, 1.0f, 0.0f); /* Top Right */ glTexCoord2f(texcoord[MAXX], texcoord[MAXY]); - glVertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Right */ + glVertex3f(1.0f, -1.0f, 0.0f); /* Bottom Right */ glTexCoord2f(texcoord[MINX], texcoord[MAXY]); - glVertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Left */ - glEnd(); /* done with the polygon */ + glVertex3f(-1.0f, -1.0f, 0.0f); /* Bottom Left */ + glEnd(); /* done with the polygon */ if (shaders_supported) { glUseProgramObjectARB(0); @@ -456,27 +455,27 @@ int main(int argc, char **argv) SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); /* Initialize SDL for video output */ - if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { + if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to initialize SDL: %s\n", SDL_GetError()); exit(1); } /* Create a 640x480 OpenGL screen */ - window = SDL_CreateWindow( "Shader Demo", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL ); - if ( !window ) { + window = SDL_CreateWindow("Shader Demo", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL); + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create OpenGL window: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } - if ( !SDL_GL_CreateContext(window)) { + if (!SDL_GL_CreateContext(window)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create OpenGL context: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } surface = SDL_LoadBMP("icon.bmp"); - if ( ! surface ) { + if (surface == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to load icon.bmp: %s\n", SDL_GetError()); SDL_Quit(); exit(3); @@ -492,20 +491,21 @@ int main(int argc, char **argv) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Shaders not supported!\n"); } done = 0; - while ( ! done ) { + while (!done) { DrawGLScene(window, texture, texcoords); /* This could go in a separate function */ - { SDL_Event event; - while ( SDL_PollEvent(&event) ) { - if ( event.type == SDL_QUIT ) { + { + SDL_Event event; + while (SDL_PollEvent(&event)) { + if (event.type == SDL_QUIT) { done = 1; } - if ( event.type == SDL_KEYDOWN ) { - if ( event.key.keysym.sym == SDLK_SPACE ) { + if (event.type == SDL_KEYDOWN) { + if (event.key.keysym.sym == SDLK_SPACE) { current_shader = (current_shader + 1) % NUM_SHADERS; } - if ( event.key.keysym.sym == SDLK_ESCAPE ) { + if (event.key.keysym.sym == SDLK_ESCAPE) { done = 1; } } @@ -519,8 +519,7 @@ int main(int argc, char **argv) #else /* HAVE_OPENGL */ -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL support on this system\n"); return 1; diff --git a/modules/SDL2/test/testshape.c b/modules/SDL2/test/testshape.c index cb2ecfe..4e3c12c 100644 --- a/modules/SDL2/test/testshape.c +++ b/modules/SDL2/test/testshape.c @@ -15,38 +15,39 @@ #include "SDL.h" #include "SDL_shape.h" -#define SHAPED_WINDOW_X 150 -#define SHAPED_WINDOW_Y 150 +#define SHAPED_WINDOW_X 150 +#define SHAPED_WINDOW_Y 150 #define SHAPED_WINDOW_DIMENSION 640 -typedef struct LoadedPicture { +typedef struct LoadedPicture +{ SDL_Surface *surface; SDL_Texture *texture; SDL_WindowShapeMode mode; - const char* name; + const char *name; } LoadedPicture; -void render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensions) +void render(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Rect texture_dimensions) { /* Clear render-target to blue. */ - SDL_SetRenderDrawColor(renderer,0x00,0x00,0xff,0xff); + SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xff, 0xff); SDL_RenderClear(renderer); /* Render the texture. */ - SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions); + SDL_RenderCopy(renderer, texture, &texture_dimensions, &texture_dimensions); SDL_RenderPresent(renderer); } -int main(int argc,char** argv) +int main(int argc, char **argv) { Uint8 num_pictures; - LoadedPicture* pictures; + LoadedPicture *pictures; int i, j; - SDL_PixelFormat* format = NULL; + SDL_PixelFormat *format = NULL; SDL_Window *window; SDL_Renderer *renderer; - SDL_Color black = {0,0,0,0xff}; + SDL_Color black = { 0, 0, 0, 0xff }; SDL_Event event; int should_exit = 0; unsigned int current_picture; @@ -58,81 +59,88 @@ int main(int argc,char** argv) /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - if(argc < 2) { + if (argc < 2) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Shape requires at least one bitmap file as argument."); exit(-1); } - if(SDL_VideoInit(NULL) == -1) { + if (SDL_VideoInit(NULL) == -1) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not initialize SDL video."); exit(-2); } num_pictures = argc - 1; - pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures); - if (!pictures) { + pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture) * num_pictures); + if (pictures == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not allocate memory."); exit(1); } - for(i=0;iformat; - if(SDL_ISPIXELFORMAT_ALPHA(format->format)) { + if (SDL_ISPIXELFORMAT_ALPHA(format->format)) { pictures[i].mode.mode = ShapeModeBinarizeAlpha; pictures[i].mode.parameters.binarizationCutoff = 255; - } - else { + } else { pictures[i].mode.mode = ShapeModeColorKey; pictures[i].mode.parameters.colorKey = black; } } window = SDL_CreateShapedWindow("SDL_Shape test", - SHAPED_WINDOW_X, SHAPED_WINDOW_Y, - SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION, - 0); + SHAPED_WINDOW_X, SHAPED_WINDOW_Y, + SHAPED_WINDOW_DIMENSION, SHAPED_WINDOW_DIMENSION, + 0); SDL_SetWindowPosition(window, SHAPED_WINDOW_X, SHAPED_WINDOW_Y); - if(window == NULL) { - for(i=0;i= num_pictures) + if (current_picture >= num_pictures) { current_picture = 0; + } SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Changing to shaped bmp: %s", pictures[current_picture].name); - SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h); - SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h); - SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode); + SDL_QueryTexture(pictures[current_picture].texture, &pixelFormat, &access, &texture_dimensions.w, &texture_dimensions.h); + SDL_SetWindowSize(window, texture_dimensions.w, texture_dimensions.h); + SDL_SetWindowShape(window, pictures[current_picture].surface, &pictures[current_picture].mode); } if (event.type == SDL_QUIT) { should_exit = 1; break; } } - render(renderer,pictures[current_picture].texture,texture_dimensions); + render(renderer, pictures[current_picture].texture, texture_dimensions); SDL_Delay(10); } /* Free the textures. */ - for(i=0;irenderers[i], file, SDL_TRUE, &sprite_w, &sprite_h); if (!sprites[i]) { - return (-1); + return -1; } if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError()); SDL_DestroyTexture(sprites[i]); - return (-1); + return -1; } } /* We're ready to roll. :) */ - return (0); + return 0; } -void -MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) +void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite) { int i; SDL_Rect viewport, temp; @@ -107,8 +105,8 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) current_color = 255; cycle_direction = -cycle_direction; } - SDL_SetTextureColorMod(sprite, 255, (Uint8) current_color, - (Uint8) current_color); + SDL_SetTextureColorMod(sprite, 255, (Uint8)current_color, + (Uint8)current_color); } if (cycle_alpha) { current_alpha += cycle_direction; @@ -120,7 +118,7 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) current_alpha = 255; cycle_direction = -cycle_direction; } - SDL_SetTextureAlphaMod(sprite, (Uint8) current_alpha); + SDL_SetTextureAlphaMod(sprite, (Uint8)current_alpha); } /* Draw a gray background */ @@ -130,16 +128,16 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) /* Test points */ SDL_SetRenderDrawColor(renderer, 0xFF, 0x00, 0x00, 0xFF); SDL_RenderDrawPoint(renderer, 0, 0); - SDL_RenderDrawPoint(renderer, viewport.w-1, 0); - SDL_RenderDrawPoint(renderer, 0, viewport.h-1); - SDL_RenderDrawPoint(renderer, viewport.w-1, viewport.h-1); + SDL_RenderDrawPoint(renderer, viewport.w - 1, 0); + SDL_RenderDrawPoint(renderer, 0, viewport.h - 1); + SDL_RenderDrawPoint(renderer, viewport.w - 1, viewport.h - 1); /* Test horizontal and vertical lines */ SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); - SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0); - SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1); - SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2); - SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2); + SDL_RenderDrawLine(renderer, 1, 0, viewport.w - 2, 0); + SDL_RenderDrawLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1); + SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h - 2); + SDL_RenderDrawLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2); /* Test fill and copy */ SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); @@ -180,20 +178,20 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderGeometry(renderer, NULL, verts, 3, NULL, 0); } SDL_RenderCopy(renderer, sprite, NULL, &temp); - temp.x = viewport.w-sprite_w-1; + temp.x = viewport.w - sprite_w - 1; temp.y = 1; temp.w = sprite_w; temp.h = sprite_h; SDL_RenderFillRect(renderer, &temp); SDL_RenderCopy(renderer, sprite, NULL, &temp); temp.x = 1; - temp.y = viewport.h-sprite_h-1; + temp.y = viewport.h - sprite_h - 1; temp.w = sprite_w; temp.h = sprite_h; SDL_RenderFillRect(renderer, &temp); SDL_RenderCopy(renderer, sprite, NULL, &temp); - temp.x = viewport.w-sprite_w-1; - temp.y = viewport.h-sprite_h-1; + temp.x = viewport.w - sprite_w - 1; + temp.y = viewport.h - sprite_h - 1; temp.w = sprite_w; temp.h = sprite_h; SDL_RenderFillRect(renderer, &temp); @@ -202,9 +200,9 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) /* Test diagonal lines */ SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); SDL_RenderDrawLine(renderer, sprite_w, sprite_h, - viewport.w-sprite_w-2, viewport.h-sprite_h-2); - SDL_RenderDrawLine(renderer, viewport.w-sprite_w-2, sprite_h, - sprite_w, viewport.h-sprite_h-2); + viewport.w - sprite_w - 2, viewport.h - sprite_h - 2); + SDL_RenderDrawLine(renderer, viewport.w - sprite_w - 2, sprite_h, + sprite_w, viewport.h - sprite_h - 2); /* Conditionally move the sprites, bounce at the wall */ if (iterations == -1 || iterations > 0) { @@ -221,7 +219,6 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) velocity->y = -velocity->y; position->y += velocity->y; } - } /* Countdown sprite-move iterations and disable color changes at iteration end - used for visual tests. */ @@ -251,7 +248,7 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) * * Draw sprite2 as triangles that can be recombined as rect by software renderer */ - SDL_Vertex *verts = (SDL_Vertex *) SDL_malloc(num_sprites * sizeof (SDL_Vertex) * 6); + SDL_Vertex *verts = (SDL_Vertex *)SDL_malloc(num_sprites * sizeof(SDL_Vertex) * 6); SDL_Vertex *verts2 = verts; if (verts) { SDL_Color color; @@ -319,9 +316,9 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) * Draw sprite2 as triangles that can *not* be recombined as rect by software renderer * Use an 'indices' array */ - SDL_Vertex *verts = (SDL_Vertex *) SDL_malloc(num_sprites * sizeof (SDL_Vertex) * 5); + SDL_Vertex *verts = (SDL_Vertex *)SDL_malloc(num_sprites * sizeof(SDL_Vertex) * 5); SDL_Vertex *verts2 = verts; - int *indices = (int *) SDL_malloc(num_sprites * sizeof (int) * 4 * 3); + int *indices = (int *)SDL_malloc(num_sprites * sizeof(int) * 4 * 3); int *indices2 = indices; if (verts && indices) { int pos = 0; @@ -395,8 +392,7 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderPresent(renderer); } -void -loop() +void loop() { Uint32 now; int i; @@ -407,8 +403,9 @@ loop() SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } MoveSprites(state->renderers[i], sprites[i]); } #ifdef __EMSCRIPTEN__ @@ -422,16 +419,14 @@ loop() if (SDL_TICKS_PASSED(now, next_fps_check)) { /* Print out some timing information */ const Uint32 then = next_fps_check - fps_check_delay; - const double fps = ((double) frames * 1000) / (now - then); + const double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); next_fps_check = now + fps_check_delay; frames = 0; } - } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; Uint64 seed; @@ -442,7 +437,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } @@ -474,7 +469,9 @@ main(int argc, char *argv[]) } else if (SDL_strcasecmp(argv[i], "--iterations") == 0) { if (argv[i + 1]) { iterations = SDL_atoi(argv[i + 1]); - if (iterations < -1) iterations = -1; + if (iterations < -1) { + iterations = -1; + } consumed = 2; } } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) { @@ -514,7 +511,8 @@ main(int argc, char *argv[]) "[--use-rendergeometry mode1|mode2]", "[num_sprites]", "[icon.bmp]", - NULL }; + NULL + }; SDLTest_CommonLogUsage(state, argv[0], options); quit(1); } @@ -526,8 +524,8 @@ main(int argc, char *argv[]) /* Create the windows, initialize the renderers, and load the textures */ sprites = - (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites)); - if (!sprites) { + (SDL_Texture **)SDL_malloc(state->num_windows * sizeof(*sprites)); + if (sprites == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } @@ -541,9 +539,9 @@ main(int argc, char *argv[]) } /* Allocate memory for the sprite info */ - positions = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect)); - velocities = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect)); - if (!positions || !velocities) { + positions = (SDL_Rect *)SDL_malloc(num_sprites * sizeof(SDL_Rect)); + velocities = (SDL_Rect *)SDL_malloc(num_sprites * sizeof(SDL_Rect)); + if (positions == NULL || velocities == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } diff --git a/modules/SDL2/test/testspriteminimal.c b/modules/SDL2/test/testspriteminimal.c index 231c1ad..16b4fa4 100644 --- a/modules/SDL2/test/testspriteminimal.c +++ b/modules/SDL2/test/testspriteminimal.c @@ -22,10 +22,10 @@ #include "SDL.h" #include "testutils.h" -#define WINDOW_WIDTH 640 -#define WINDOW_HEIGHT 480 -#define NUM_SPRITES 100 -#define MAX_SPEED 1 +#define WINDOW_WIDTH 640 +#define WINDOW_HEIGHT 480 +#define NUM_SPRITES 100 +#define MAX_SPEED 1 static SDL_Texture *sprite; static SDL_Rect positions[NUM_SPRITES]; @@ -43,8 +43,7 @@ quit(int rc) exit(rc); } -void -MoveSprites() +void MoveSprites() { int i; int window_w = WINDOW_WIDTH; @@ -96,13 +95,11 @@ void loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Window *window; int i; - /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); diff --git a/modules/SDL2/test/teststreaming.c b/modules/SDL2/test/teststreaming.c index e8d596c..15c1aef 100644 --- a/modules/SDL2/test/teststreaming.c +++ b/modules/SDL2/test/teststreaming.c @@ -28,9 +28,10 @@ #define MOOSEPIC_W 64 #define MOOSEPIC_H 88 -#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) +#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) #define MOOSEFRAMES_COUNT 10 +/* *INDENT-OFF* */ /* clang-format off */ SDL_Color MooseColors[84] = { {49, 49, 49, 255}, {66, 24, 0, 255}, {66, 33, 0, 255}, {66, 66, 66, 255}, {66, 115, 49, 255}, {74, 33, 0, 255}, {74, 41, 16, 255}, {82, 33, 8, 255}, @@ -54,6 +55,7 @@ SDL_Color MooseColors[84] = { {214, 173, 140, 255}, {222, 181, 148, 255}, {222, 189, 132, 255}, {222, 189, 156, 255}, {222, 222, 222, 255}, {231, 198, 165, 255}, {231, 231, 231, 255}, {239, 206, 173, 255} }; +/* *INDENT-ON* */ /* clang-format on */ Uint8 MooseFrames[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE]; @@ -83,17 +85,16 @@ void UpdateTexture(SDL_Texture *texture) } src = MooseFrames[frame]; for (row = 0; row < MOOSEPIC_H; ++row) { - dst = (Uint32*)((Uint8*)pixels + row * pitch); + dst = (Uint32 *)((Uint8 *)pixels + row * pitch); for (col = 0; col < MOOSEPIC_W; ++col) { color = &MooseColors[*src++]; - *dst++ = (0xFF000000|(color->r<<16)|(color->g<<8)|color->b); + *dst++ = (0xFF000000 | (color->r << 16) | (color->g << 8) | color->b); } } SDL_UnlockTexture(texture); } -void -loop() +void loop() { SDL_Event event; @@ -124,8 +125,7 @@ loop() #endif } -int -main(int argc, char **argv) +int main(int argc, char **argv) { SDL_Window *window; SDL_RWops *handle; @@ -154,26 +154,25 @@ main(int argc, char **argv) SDL_RWread(handle, MooseFrames, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT); SDL_RWclose(handle); - /* Create the window and renderer */ window = SDL_CreateWindow("Happy Moose", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - MOOSEPIC_W*4, MOOSEPIC_H*4, + MOOSEPIC_W * 4, MOOSEPIC_H * 4, SDL_WINDOW_RESIZABLE); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError()); quit(3); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError()); quit(4); } MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H); - if (!MooseTexture) { + if (MooseTexture == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError()); quit(5); } @@ -186,7 +185,7 @@ main(int argc, char **argv) #else while (!done) { loop(); - } + } #endif SDL_DestroyRenderer(renderer); diff --git a/modules/SDL2/test/testsurround.c b/modules/SDL2/test/testsurround.c index 9bfae46..b284369 100644 --- a/modules/SDL2/test/testsurround.c +++ b/modules/SDL2/test/testsurround.c @@ -18,16 +18,16 @@ static int total_channels; static int active_channel; -#define SAMPLE_RATE_HZ 48000 -#define QUICK_TEST_TIME_MSEC 100 +#define SAMPLE_RATE_HZ 48000 +#define QUICK_TEST_TIME_MSEC 100 #define CHANNEL_TEST_TIME_SEC 5 -#define MAX_AMPLITUDE SDL_MAX_SINT16 +#define MAX_AMPLITUDE SDL_MAX_SINT16 -#define SINE_FREQ_HZ 500 +#define SINE_FREQ_HZ 500 #define LFE_SINE_FREQ_HZ 50 /* The channel layout is defined in SDL_audio.h */ -const char* +const char * get_channel_name(int channel_index, int channel_count) { switch (channel_index) { @@ -38,6 +38,7 @@ get_channel_name(int channel_index, int channel_count) case 2: switch (channel_count) { case 3: + case 5: return "Low Frequency Effects"; case 4: return "Back Left"; @@ -57,27 +58,32 @@ get_channel_name(int channel_index, int channel_count) switch (channel_count) { case 5: return "Back Right"; + case 6: + return "Side Left"; case 7: return "Back Center"; - case 6: case 8: return "Back Left"; } + SDL_assert(0); case 5: switch (channel_count) { - case 7: - return "Back Left"; case 6: + return "Side Right"; + case 7: + return "Side Left"; case 8: return "Back Right"; } + SDL_assert(0); case 6: switch (channel_count) { case 7: - return "Back Right"; + return "Side Right"; case 8: return "Side Left"; } + SDL_assert(0); case 7: return "Side Right"; } @@ -92,9 +98,9 @@ is_lfe_channel(int channel_index, int channel_count) } void SDLCALL -fill_buffer(void* unused, Uint8* stream, int len) +fill_buffer(void *unused, Uint8 *stream, int len) { - Sint16* buffer = (Sint16*)stream; + Sint16 *buffer = (Sint16 *)stream; int samples = len / sizeof(Sint16); static int total_samples = 0; int i; @@ -132,8 +138,7 @@ fill_buffer(void* unused, Uint8* stream, int len) } } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; diff --git a/modules/SDL2/test/testthread.c b/modules/SDL2/test/testthread.c index 972a503..f6d9675 100644 --- a/modules/SDL2/test/testthread.c +++ b/modules/SDL2/test/testthread.c @@ -33,12 +33,15 @@ quit(int rc) static const char * getprioritystr(SDL_ThreadPriority priority) { - switch(priority) - { - case SDL_THREAD_PRIORITY_LOW: return "SDL_THREAD_PRIORITY_LOW"; - case SDL_THREAD_PRIORITY_NORMAL: return "SDL_THREAD_PRIORITY_NORMAL"; - case SDL_THREAD_PRIORITY_HIGH: return "SDL_THREAD_PRIORITY_HIGH"; - case SDL_THREAD_PRIORITY_TIME_CRITICAL: return "SDL_THREAD_PRIORITY_TIME_CRITICAL"; + switch (priority) { + case SDL_THREAD_PRIORITY_LOW: + return "SDL_THREAD_PRIORITY_LOW"; + case SDL_THREAD_PRIORITY_NORMAL: + return "SDL_THREAD_PRIORITY_NORMAL"; + case SDL_THREAD_PRIORITY_HIGH: + return "SDL_THREAD_PRIORITY_HIGH"; + case SDL_THREAD_PRIORITY_TIME_CRITICAL: + return "SDL_THREAD_PRIORITY_TIME_CRITICAL"; } return "???"; @@ -51,20 +54,21 @@ ThreadFunc(void *data) SDL_TLSSet(tls, "baby thread", NULL); SDL_Log("Started thread %s: My thread id is %lu, thread data = %s\n", - (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls)); + (char *)data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls)); while (alive) { - SDL_Log("Thread '%s' is alive!\n", (char *) data); + SDL_Log("Thread '%s' is alive!\n", (char *)data); if (testprio) { SDL_Log("SDL_SetThreadPriority(%s):%d\n", getprioritystr(prio), SDL_SetThreadPriority(prio)); - if (++prio > SDL_THREAD_PRIORITY_TIME_CRITICAL) + if (++prio > SDL_THREAD_PRIORITY_TIME_CRITICAL) { prio = SDL_THREAD_PRIORITY_LOW; + } } SDL_Delay(1 * 1000); } - SDL_Log("Thread '%s' exiting!\n", (char *) data); - return (0); + SDL_Log("Thread '%s' exiting!\n", (char *)data); + return 0; } static void @@ -76,8 +80,7 @@ killed(int sig) quit(0); } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int arg = 1; SDL_Thread *thread; @@ -88,7 +91,7 @@ main(int argc, char *argv[]) /* Load the SDL library */ if (SDL_Init(0) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } if (SDL_getenv("SDL_TESTS_QUICK") != NULL) { @@ -123,14 +126,14 @@ main(int argc, char *argv[]) SDL_Log("Main thread data finally: %s\n", (const char *)SDL_TLSGet(tls)); alive = 1; - signal(SIGTERM, killed); + (void)signal(SIGTERM, killed); thread = SDL_CreateThread(ThreadFunc, "Two", "#2"); if (thread == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); quit(1); } - raise(SIGTERM); + (void)raise(SIGTERM); - SDL_Quit(); /* Never reached */ - return (0); /* Never reached */ + SDL_Quit(); /* Never reached */ + return 0; /* Never reached */ } diff --git a/modules/SDL2/test/testtimer.c b/modules/SDL2/test/testtimer.c index 6c5d37a..54a903a 100644 --- a/modules/SDL2/test/testtimer.c +++ b/modules/SDL2/test/testtimer.c @@ -19,7 +19,7 @@ #include "SDL.h" -#define DEFAULT_RESOLUTION 1 +#define DEFAULT_RESOLUTION 1 static int ticks = 0; @@ -27,18 +27,17 @@ static Uint32 SDLCALL ticktock(Uint32 interval, void *param) { ++ticks; - return (interval); + return interval; } static Uint32 SDLCALL callback(Uint32 interval, void *param) { - SDL_Log("Timer %" SDL_PRIu32 " : param = %d\n", interval, (int) (uintptr_t) param); + SDL_Log("Timer %" SDL_PRIu32 " : param = %d\n", interval, (int)(uintptr_t)param); return interval; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i, desired; SDL_TimerID t1, t2, t3; @@ -51,7 +50,7 @@ main(int argc, char *argv[]) if (SDL_Init(SDL_INIT_TIMER) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } if (SDL_getenv("SDL_TESTS_QUICK") != NULL) { @@ -95,20 +94,23 @@ main(int argc, char *argv[]) /* Print the results */ if (ticks) { SDL_Log("Timer resolution: desired = %d ms, actual = %f ms\n", - desired, (double) (10 * 1000) / ticks); + desired, (double)(10 * 1000) / ticks); } /* Test multiple timers */ SDL_Log("Testing multiple timers...\n"); - t1 = SDL_AddTimer(100, callback, (void *) 1); - if (!t1) - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 1: %s\n", SDL_GetError()); - t2 = SDL_AddTimer(50, callback, (void *) 2); - if (!t2) - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 2: %s\n", SDL_GetError()); - t3 = SDL_AddTimer(233, callback, (void *) 3); - if (!t3) - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 3: %s\n", SDL_GetError()); + t1 = SDL_AddTimer(100, callback, (void *)1); + if (!t1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create timer 1: %s\n", SDL_GetError()); + } + t2 = SDL_AddTimer(50, callback, (void *)2); + if (!t2) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create timer 2: %s\n", SDL_GetError()); + } + t3 = SDL_AddTimer(233, callback, (void *)3); + if (!t3) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create timer 3: %s\n", SDL_GetError()); + } /* Wait 10 seconds */ SDL_Log("Waiting 10 seconds\n"); @@ -127,9 +129,9 @@ main(int argc, char *argv[]) ticktock(0, NULL); } now = SDL_GetPerformanceCounter(); - SDL_Log("1 million iterations of ticktock took %f ms\n", (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + SDL_Log("1 million iterations of ticktock took %f ms\n", (double)((now - start) * 1000) / SDL_GetPerformanceFrequency()); - SDL_Log("Performance counter frequency: %"SDL_PRIu64"\n", SDL_GetPerformanceFrequency()); + SDL_Log("Performance counter frequency: %" SDL_PRIu64 "\n", SDL_GetPerformanceFrequency()); start64 = SDL_GetTicks64(); start32 = SDL_GetTicks(); start = SDL_GetPerformanceCounter(); @@ -137,10 +139,10 @@ main(int argc, char *argv[]) now = SDL_GetPerformanceCounter(); now64 = SDL_GetTicks64(); now32 = SDL_GetTicks(); - SDL_Log("Delay 1 second = %d ms in ticks, %d ms in ticks64, %f ms according to performance counter\n", (int) (now32-start32), (int) (now64-start64), (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + SDL_Log("Delay 1 second = %d ms in ticks, %d ms in ticks64, %f ms according to performance counter\n", (int)(now32 - start32), (int)(now64 - start64), (double)((now - start) * 1000) / SDL_GetPerformanceFrequency()); SDL_Quit(); - return (0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testutils.c b/modules/SDL2/test/testutils.c index 9f56164..20efef0 100644 --- a/modules/SDL2/test/testutils.c +++ b/modules/SDL2/test/testutils.c @@ -1,7 +1,14 @@ /* -Copyright 1997-2023 Sam Lantinga -Copyright 2022 Collabora Ltd. -SPDX-License-Identifier: Zlib + Copyright (C) 1997-2023 Sam Lantinga + Copyright 2022 Collabora Ltd. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. */ #include "testutils.h" @@ -33,7 +40,7 @@ GetNearbyFilename(const char *file) return NULL; } - SDL_snprintf(path, len, "%s%s", base, file); + (void)SDL_snprintf(path, len, "%s%s", base, file); SDL_free(base); rw = SDL_RWFromFile(path, "rb"); @@ -114,17 +121,17 @@ LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent, switch (temp->format->BitsPerPixel) { case 15: SDL_SetColorKey(temp, SDL_TRUE, - (*(Uint16 *) temp->pixels) & 0x00007FFF); + (*(Uint16 *)temp->pixels) & 0x00007FFF); break; case 16: - SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels); + SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *)temp->pixels); break; case 24: SDL_SetColorKey(temp, SDL_TRUE, - (*(Uint32 *) temp->pixels) & 0x00FFFFFF); + (*(Uint32 *)temp->pixels) & 0x00FFFFFF); break; case 32: - SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels); + SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *)temp->pixels); break; } } @@ -139,7 +146,7 @@ LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent, } texture = SDL_CreateTextureFromSurface(renderer, temp); - if (!texture) { + if (texture == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); } } diff --git a/modules/SDL2/test/testutils.h b/modules/SDL2/test/testutils.h index c8ce55d..1f69673 100644 --- a/modules/SDL2/test/testutils.h +++ b/modules/SDL2/test/testutils.h @@ -1,7 +1,14 @@ /* -Copyright 1997-2023 Sam Lantinga -Copyright 2022 Collabora Ltd. -SPDX-License-Identifier: Zlib + Copyright (C) 1997-2023 Sam Lantinga + Copyright 2022 Collabora Ltd. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. */ #ifndef TESTUTILS_H diff --git a/modules/SDL2/test/testver.c b/modules/SDL2/test/testver.c index d6c153e..eeecb14 100644 --- a/modules/SDL2/test/testver.c +++ b/modules/SDL2/test/testver.c @@ -20,8 +20,7 @@ #include "SDL.h" #include "SDL_revision.h" -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_version compiled; SDL_version linked; @@ -36,12 +35,12 @@ main(int argc, char *argv[]) #endif SDL_VERSION(&compiled); SDL_Log("Compiled version: %d.%d.%d (%s)\n", - compiled.major, compiled.minor, compiled.patch, - SDL_REVISION); + compiled.major, compiled.minor, compiled.patch, + SDL_REVISION); SDL_GetVersion(&linked); SDL_Log("Linked version: %d.%d.%d (%s)\n", - linked.major, linked.minor, linked.patch, - SDL_GetRevision()); + linked.major, linked.minor, linked.patch, + SDL_GetRevision()); SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/test/testviewport.c b/modules/SDL2/test/testviewport.c index 188524d..932f248 100644 --- a/modules/SDL2/test/testviewport.c +++ b/modules/SDL2/test/testviewport.c @@ -42,43 +42,42 @@ quit(int rc) exit(rc); } -void -DrawOnViewport(SDL_Renderer * renderer) -{ +void DrawOnViewport(SDL_Renderer *renderer) +{ SDL_Rect rect; /* Set the viewport */ SDL_RenderSetViewport(renderer, &viewport); - + /* Draw a gray background */ SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF); SDL_RenderClear(renderer); /* Test inside points */ SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF); - SDL_RenderDrawPoint(renderer, viewport.h/2 + 20, viewport.w/2); - SDL_RenderDrawPoint(renderer, viewport.h/2 - 20, viewport.w/2); - SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 - 20); - SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 + 20); + SDL_RenderDrawPoint(renderer, viewport.h / 2 + 20, viewport.w / 2); + SDL_RenderDrawPoint(renderer, viewport.h / 2 - 20, viewport.w / 2); + SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 - 20); + SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 + 20); /* Test horizontal and vertical lines */ SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); - SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0); - SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1); - SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2); - SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2); + SDL_RenderDrawLine(renderer, 1, 0, viewport.w - 2, 0); + SDL_RenderDrawLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1); + SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h - 2); + SDL_RenderDrawLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2); /* Test diagonal lines */ SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF); - SDL_RenderDrawLine(renderer, 0, 0, viewport.w-1, viewport.h-1); - SDL_RenderDrawLine(renderer, viewport.w-1, 0, 0, viewport.h-1); + SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); + SDL_RenderDrawLine(renderer, viewport.w - 1, 0, 0, viewport.h - 1); /* Test outside points */ SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF); - SDL_RenderDrawPoint(renderer, viewport.h/2 + viewport.h, viewport.w/2); - SDL_RenderDrawPoint(renderer, viewport.h/2 - viewport.h, viewport.w/2); - SDL_RenderDrawPoint(renderer, viewport.h/2, viewport.w/2 - viewport.w); - SDL_RenderDrawPoint(renderer, viewport.h/2, viewport.w/2 + viewport.w); + SDL_RenderDrawPoint(renderer, viewport.h / 2 + viewport.h, viewport.w / 2); + SDL_RenderDrawPoint(renderer, viewport.h / 2 - viewport.h, viewport.w / 2); + SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 - viewport.w); + SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 + viewport.w); /* Add a box at the top */ rect.w = 8; @@ -96,15 +95,15 @@ DrawOnViewport(SDL_Renderer * renderer) SDL_RenderSetClipRect(renderer, NULL); } -void -loop() +void loop() { SDL_Event event; int i; #ifdef __EMSCRIPTEN__ /* Avoid using delays */ - if(SDL_GetTicks() - wait_start < 1000) + if (SDL_GetTicks() - wait_start < 1000) { return; + } wait_start = SDL_GetTicks(); #endif /* Check for events */ @@ -121,8 +120,9 @@ loop() SDL_Log("Current Viewport x=%i y=%i w=%i h=%i", viewport.x, viewport.y, viewport.w, viewport.h); for (i = 0; i < state->num_windows; ++i) { - if (state->windows[i] == NULL) + if (state->windows[i] == NULL) { continue; + } /* Draw using viewport */ DrawOnViewport(state->renderers[i]); @@ -145,19 +145,17 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; Uint32 then, now, frames; /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } - for (i = 1; i < argc;) { int consumed; @@ -222,7 +220,7 @@ main(int argc, char *argv[]) /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - double fps = ((double) frames * 1000) / (now - then); + double fps = ((double)frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } quit(0); diff --git a/modules/SDL2/test/testvulkan.c b/modules/SDL2/test/testvulkan.c index 251ca6f..acdde28 100644 --- a/modules/SDL2/test/testvulkan.c +++ b/modules/SDL2/test/testvulkan.c @@ -84,8 +84,8 @@ int main(int argc, char *argv[]) VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR) \ VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR) -#define VULKAN_DEVICE_FUNCTION(name) static PFN_##name name = NULL; -#define VULKAN_GLOBAL_FUNCTION(name) static PFN_##name name = NULL; +#define VULKAN_DEVICE_FUNCTION(name) static PFN_##name name = NULL; +#define VULKAN_GLOBAL_FUNCTION(name) static PFN_##name name = NULL; #define VULKAN_INSTANCE_FUNCTION(name) static PFN_##name name = NULL; VULKAN_FUNCTIONS() #undef VULKAN_DEVICE_FUNCTION @@ -103,16 +103,18 @@ enum }; #endif #if VK_HEADER_VERSION < 38 -enum { +enum +{ VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000 }; #endif static const char *getVulkanResultString(VkResult result) { - switch((int) result) - { - #define RESULT_CASE(x) case x: return #x + switch ((int)result) { +#define RESULT_CASE(x) \ + case x: \ + return #x RESULT_CASE(VK_SUCCESS); RESULT_CASE(VK_NOT_READY); RESULT_CASE(VK_TIMEOUT); @@ -139,8 +141,9 @@ static const char *getVulkanResultString(VkResult result) RESULT_CASE(VK_ERROR_VALIDATION_FAILED_EXT); RESULT_CASE(VK_ERROR_OUT_OF_POOL_MEMORY_KHR); RESULT_CASE(VK_ERROR_INVALID_SHADER_NV); - #undef RESULT_CASE - default: break; +#undef RESULT_CASE + default: + break; } return (result < 0) ? "VK_ERROR_" : "VK_"; } @@ -176,7 +179,7 @@ typedef struct VulkanContext } VulkanContext; static SDLTest_CommonState *state; -static VulkanContext *vulkanContexts = NULL; // an array of state->num_windows items +static VulkanContext *vulkanContexts = NULL; // an array of state->num_windows items static VulkanContext *vulkanContext = NULL; // for the currently-rendering window static void shutdownVulkan(SDL_bool doDestroySwapchain); @@ -216,8 +219,8 @@ static void loadGlobalFunctions(void) static void createInstance(void) { - VkApplicationInfo appInfo = {0}; - VkInstanceCreateInfo instanceCreateInfo = {0}; + VkApplicationInfo appInfo = { 0 }; + VkInstanceCreateInfo instanceCreateInfo = { 0 }; const char **extensions = NULL; unsigned extensionCount = 0; VkResult result; @@ -232,13 +235,13 @@ static void createInstance(void) SDL_GetError()); quit(2); } - extensions = (const char **) SDL_malloc(sizeof(const char *) * extensionCount); - if (!extensions) { + extensions = (const char **)SDL_malloc(sizeof(const char *) * extensionCount); + if (extensions == NULL) { SDL_OutOfMemory(); quit(2); } if (!SDL_Vulkan_GetInstanceExtensions(NULL, &extensionCount, extensions)) { - SDL_free((void*)extensions); + SDL_free((void *)extensions); SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Vulkan_GetInstanceExtensions(): %s\n", SDL_GetError()); @@ -247,7 +250,7 @@ static void createInstance(void) instanceCreateInfo.enabledExtensionCount = extensionCount; instanceCreateInfo.ppEnabledExtensionNames = extensions; result = vkCreateInstance(&instanceCreateInfo, NULL, &vulkanContext->instance); - SDL_free((void*)extensions); + SDL_free((void *)extensions); if (result != VK_SUCCESS) { vulkanContext->instance = VK_NULL_HANDLE; SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, @@ -277,8 +280,8 @@ static void loadInstanceFunctions(void) static void createSurface(void) { if (!SDL_Vulkan_CreateSurface(vulkanContext->window, - vulkanContext->instance, - &vulkanContext->surface)) { + vulkanContext->instance, + &vulkanContext->surface)) { vulkanContext->surface = VK_NULL_HANDLE; SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Vulkan_CreateSurface(): %s\n", SDL_GetError()); quit(2); @@ -308,8 +311,8 @@ static void findPhysicalDevice(void) "vkEnumeratePhysicalDevices(): no physical devices\n"); quit(2); } - physicalDevices = (VkPhysicalDevice *) SDL_malloc(sizeof(VkPhysicalDevice) * physicalDeviceCount); - if (!physicalDevices) { + physicalDevices = (VkPhysicalDevice *)SDL_malloc(sizeof(VkPhysicalDevice) * physicalDeviceCount); + if (physicalDevices == NULL) { SDL_OutOfMemory(); quit(2); } @@ -331,7 +334,7 @@ static void findPhysicalDevice(void) VkPhysicalDevice physicalDevice = physicalDevices[physicalDeviceIndex]; vkGetPhysicalDeviceProperties(physicalDevice, &vulkanContext->physicalDeviceProperties); - if(VK_VERSION_MAJOR(vulkanContext->physicalDeviceProperties.apiVersion) < 1) { + if (VK_VERSION_MAJOR(vulkanContext->physicalDeviceProperties.apiVersion) < 1) { continue; } vkGetPhysicalDeviceFeatures(physicalDevice, &vulkanContext->physicalDeviceFeatures); @@ -342,8 +345,8 @@ static void findPhysicalDevice(void) if (queueFamiliesPropertiesAllocatedSize < queueFamiliesCount) { SDL_free(queueFamiliesProperties); queueFamiliesPropertiesAllocatedSize = queueFamiliesCount; - queueFamiliesProperties = (VkQueueFamilyProperties *) SDL_malloc(sizeof(VkQueueFamilyProperties) * queueFamiliesPropertiesAllocatedSize); - if (!queueFamiliesProperties) { + queueFamiliesProperties = (VkQueueFamilyProperties *)SDL_malloc(sizeof(VkQueueFamilyProperties) * queueFamiliesPropertiesAllocatedSize); + if (queueFamiliesProperties == NULL) { SDL_free(physicalDevices); SDL_free(deviceExtensions); SDL_OutOfMemory(); @@ -382,15 +385,14 @@ static void findPhysicalDevice(void) } } - if (vulkanContext->graphicsQueueFamilyIndex == queueFamiliesCount) { // no good queues found + if (vulkanContext->graphicsQueueFamilyIndex == queueFamiliesCount) { // no good queues found continue; } - if (vulkanContext->presentQueueFamilyIndex == queueFamiliesCount) { // no good queues found + if (vulkanContext->presentQueueFamilyIndex == queueFamiliesCount) { // no good queues found continue; } result = vkEnumerateDeviceExtensionProperties(physicalDevice, NULL, &deviceExtensionCount, NULL); - if (result != VK_SUCCESS) - { + if (result != VK_SUCCESS) { SDL_free(physicalDevices); SDL_free(queueFamiliesProperties); SDL_free(deviceExtensions); @@ -406,7 +408,7 @@ static void findPhysicalDevice(void) SDL_free(deviceExtensions); deviceExtensionsAllocatedSize = deviceExtensionCount; deviceExtensions = SDL_malloc(sizeof(VkExtensionProperties) * deviceExtensionsAllocatedSize); - if (!deviceExtensions) { + if (deviceExtensions == NULL) { SDL_free(physicalDevices); SDL_free(queueFamiliesProperties); SDL_OutOfMemory(); @@ -424,7 +426,7 @@ static void findPhysicalDevice(void) quit(2); } for (i = 0; i < deviceExtensionCount; i++) { - if(SDL_strcmp(deviceExtensions[i].extensionName, VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) { + if (SDL_strcmp(deviceExtensions[i].extensionName, VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) { hasSwapchainExtension = SDL_TRUE; break; } @@ -446,9 +448,9 @@ static void findPhysicalDevice(void) static void createDevice(void) { - VkDeviceQueueCreateInfo deviceQueueCreateInfo[1] = { {0} }; - static const float queuePriority[] = {1.0f}; - VkDeviceCreateInfo deviceCreateInfo = {0}; + VkDeviceQueueCreateInfo deviceQueueCreateInfo[1] = { { 0 } }; + static const float queuePriority[] = { 1.0f }; + VkDeviceCreateInfo deviceCreateInfo = { 0 }; static const char *const deviceExtensionNames[] = { VK_KHR_SWAPCHAIN_EXTENSION_NAME, }; @@ -512,7 +514,7 @@ static void createSemaphore(VkSemaphore *semaphore) { VkResult result; - VkSemaphoreCreateInfo createInfo = {0}; + VkSemaphoreCreateInfo createInfo = { 0 }; createInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; result = vkCreateSemaphore(vulkanContext->device, &createInfo, NULL, semaphore); if (result != VK_SUCCESS) { @@ -564,7 +566,7 @@ static void getSurfaceFormats(void) if (vulkanContext->surfaceFormatsCount > vulkanContext->surfaceFormatsAllocatedCount) { vulkanContext->surfaceFormatsAllocatedCount = vulkanContext->surfaceFormatsCount; SDL_free(vulkanContext->surfaceFormats); - vulkanContext->surfaceFormats = (VkSurfaceFormatKHR *) SDL_malloc(sizeof(VkSurfaceFormatKHR) * vulkanContext->surfaceFormatsAllocatedCount); + vulkanContext->surfaceFormats = (VkSurfaceFormatKHR *)SDL_malloc(sizeof(VkSurfaceFormatKHR) * vulkanContext->surfaceFormatsAllocatedCount); if (!vulkanContext->surfaceFormats) { vulkanContext->surfaceFormatsCount = 0; SDL_OutOfMemory(); @@ -622,26 +624,26 @@ static SDL_bool createSwapchain(void) { uint32_t i; int w, h; - VkSwapchainCreateInfoKHR createInfo = {0}; + VkSwapchainCreateInfoKHR createInfo = { 0 }; VkResult result; // pick an image count vulkanContext->swapchainDesiredImageCount = vulkanContext->surfaceCapabilities.minImageCount + 1; - if ( (vulkanContext->swapchainDesiredImageCount > vulkanContext->surfaceCapabilities.maxImageCount) && - (vulkanContext->surfaceCapabilities.maxImageCount > 0) ) { + if ((vulkanContext->swapchainDesiredImageCount > vulkanContext->surfaceCapabilities.maxImageCount) && + (vulkanContext->surfaceCapabilities.maxImageCount > 0)) { vulkanContext->swapchainDesiredImageCount = vulkanContext->surfaceCapabilities.maxImageCount; } // pick a format - if ( (vulkanContext->surfaceFormatsCount == 1) && - (vulkanContext->surfaceFormats[0].format == VK_FORMAT_UNDEFINED) ) { + if ((vulkanContext->surfaceFormatsCount == 1) && + (vulkanContext->surfaceFormats[0].format == VK_FORMAT_UNDEFINED)) { // aren't any preferred formats, so we pick vulkanContext->surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; vulkanContext->surfaceFormat.format = VK_FORMAT_R8G8B8A8_UNORM; } else { vulkanContext->surfaceFormat = vulkanContext->surfaceFormats[0]; for (i = 0; i < vulkanContext->surfaceFormatsCount; i++) { - if(vulkanContext->surfaceFormats[i].format == VK_FORMAT_R8G8B8A8_UNORM) { + if (vulkanContext->surfaceFormats[i].format == VK_FORMAT_R8G8B8A8_UNORM) { vulkanContext->surfaceFormat = vulkanContext->surfaceFormats[i]; break; } @@ -653,13 +655,13 @@ static SDL_bool createSwapchain(void) // Clamp the size to the allowable image extent. // SDL_Vulkan_GetDrawableSize()'s result it not always in this range (bug #3287) - vulkanContext->swapchainSize.width = SDL_clamp((uint32_t) w, - vulkanContext->surfaceCapabilities.minImageExtent.width, - vulkanContext->surfaceCapabilities.maxImageExtent.width); + vulkanContext->swapchainSize.width = SDL_clamp((uint32_t)w, + vulkanContext->surfaceCapabilities.minImageExtent.width, + vulkanContext->surfaceCapabilities.maxImageExtent.width); - vulkanContext->swapchainSize.height = SDL_clamp((uint32_t) h, - vulkanContext->surfaceCapabilities.minImageExtent.height, - vulkanContext->surfaceCapabilities.maxImageExtent.height); + vulkanContext->swapchainSize.height = SDL_clamp((uint32_t)h, + vulkanContext->surfaceCapabilities.minImageExtent.height, + vulkanContext->surfaceCapabilities.maxImageExtent.height); if (w == 0 || h == 0) { return SDL_FALSE; @@ -687,7 +689,7 @@ static SDL_bool createSwapchain(void) vkDestroySwapchainKHR(vulkanContext->device, createInfo.oldSwapchain, NULL); } - if(result != VK_SUCCESS) { + if (result != VK_SUCCESS) { vulkanContext->swapchain = VK_NULL_HANDLE; SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "vkCreateSwapchainKHR(): %s\n", @@ -732,7 +734,7 @@ static void destroyCommandPool(void) static void createCommandPool(void) { VkResult result; - VkCommandPoolCreateInfo createInfo = {0}; + VkCommandPoolCreateInfo createInfo = { 0 }; createInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; createInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT; createInfo.queueFamilyIndex = vulkanContext->graphicsQueueFamilyIndex; @@ -749,14 +751,14 @@ static void createCommandPool(void) static void createCommandBuffers(void) { VkResult result; - VkCommandBufferAllocateInfo allocateInfo = {0}; + VkCommandBufferAllocateInfo allocateInfo = { 0 }; allocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; allocateInfo.commandPool = vulkanContext->commandPool; allocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; allocateInfo.commandBufferCount = vulkanContext->swapchainImageCount; - vulkanContext->commandBuffers = (VkCommandBuffer *) SDL_malloc(sizeof(VkCommandBuffer) * vulkanContext->swapchainImageCount); + vulkanContext->commandBuffers = (VkCommandBuffer *)SDL_malloc(sizeof(VkCommandBuffer) * vulkanContext->swapchainImageCount); result = vkAllocateCommandBuffers(vulkanContext->device, &allocateInfo, vulkanContext->commandBuffers); - if(result != VK_SUCCESS) { + if (result != VK_SUCCESS) { SDL_free(vulkanContext->commandBuffers); vulkanContext->commandBuffers = NULL; SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, @@ -777,12 +779,12 @@ static void createFences(void) } for (i = 0; i < vulkanContext->swapchainImageCount; i++) { VkResult result; - VkFenceCreateInfo createInfo = {0}; + VkFenceCreateInfo createInfo = { 0 }; createInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; createInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT; result = vkCreateFence(vulkanContext->device, &createInfo, NULL, &vulkanContext->fences[i]); - if(result != VK_SUCCESS) { - for(; i > 0; i--) { + if (result != VK_SUCCESS) { + for (; i > 0; i--) { vkDestroyFence(vulkanContext->device, vulkanContext->fences[i - 1], NULL); } SDL_free(vulkanContext->fences); @@ -817,7 +819,7 @@ static void recordPipelineImageBarrier(VkCommandBuffer commandBuffer, VkImageLayout destLayout, VkImage image) { - VkImageMemoryBarrier barrier = {0}; + VkImageMemoryBarrier barrier = { 0 }; barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; barrier.srcAccessMask = sourceAccessMask; barrier.dstAccessMask = destAccessMask; @@ -847,11 +849,11 @@ static void rerecordCommandBuffer(uint32_t frameIndex, const VkClearColorValue * { VkCommandBuffer commandBuffer = vulkanContext->commandBuffers[frameIndex]; VkImage image = vulkanContext->swapchainImages[frameIndex]; - VkCommandBufferBeginInfo beginInfo = {0}; - VkImageSubresourceRange clearRange = {0}; + VkCommandBufferBeginInfo beginInfo = { 0 }; + VkImageSubresourceRange clearRange = { 0 }; VkResult result = vkResetCommandBuffer(commandBuffer, 0); - if(result != VK_SUCCESS) { + if (result != VK_SUCCESS) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "vkResetCommandBuffer(): %s\n", getVulkanResultString(result)); @@ -895,7 +897,9 @@ static void rerecordCommandBuffer(uint32_t frameIndex, const VkClearColorValue * static void destroySwapchainAndSwapchainSpecificStuff(SDL_bool doDestroySwapchain) { - vkDeviceWaitIdle(vulkanContext->device); + if (vkDeviceWaitIdle != NULL) { + vkDeviceWaitIdle(vulkanContext->device); + } destroyFences(); destroyCommandBuffers(); destroyCommandPool(); @@ -909,7 +913,7 @@ static SDL_bool createNewSwapchainAndSwapchainSpecificStuff(void) destroySwapchainAndSwapchainSpecificStuff(SDL_FALSE); getSurfaceCaps(); getSurfaceFormats(); - if(!createSwapchain()) { + if (!createSwapchain()) { return SDL_FALSE; } createCommandPool(); @@ -924,8 +928,8 @@ static void initVulkan(void) SDL_Vulkan_LoadLibrary(NULL); - vulkanContexts = (VulkanContext *) SDL_calloc(state->num_windows, sizeof (VulkanContext)); - if (!vulkanContexts) { + vulkanContexts = (VulkanContext *)SDL_calloc(state->num_windows, sizeof(VulkanContext)); + if (vulkanContexts == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!"); quit(2); } @@ -992,24 +996,25 @@ static SDL_bool render(void) uint32_t frameIndex; VkResult result; double currentTime; - VkClearColorValue clearColor = { {0} }; + VkClearColorValue clearColor = { { 0 } }; VkPipelineStageFlags waitDestStageMask = VK_PIPELINE_STAGE_TRANSFER_BIT; - VkSubmitInfo submitInfo = {0}; - VkPresentInfoKHR presentInfo = {0}; + VkSubmitInfo submitInfo = { 0 }; + VkPresentInfoKHR presentInfo = { 0 }; int w, h; if (!vulkanContext->swapchain) { SDL_bool retval = createNewSwapchainAndSwapchainSpecificStuff(); - if(!retval) + if (!retval) { SDL_Delay(100); + } return retval; } result = vkAcquireNextImageKHR(vulkanContext->device, - vulkanContext->swapchain, - UINT64_MAX, - vulkanContext->imageAvailableSemaphore, - VK_NULL_HANDLE, - &frameIndex); + vulkanContext->swapchain, + UINT64_MAX, + vulkanContext->imageAvailableSemaphore, + VK_NULL_HANDLE, + &frameIndex); if (result == VK_ERROR_OUT_OF_DATE_KHR) { return createNewSwapchainAndSwapchainSpecificStuff(); } @@ -1068,7 +1073,7 @@ static SDL_bool render(void) quit(2); } SDL_Vulkan_GetDrawableSize(vulkanContext->window, &w, &h); - if(w != (int)vulkanContext->swapchainSize.width || h != (int)vulkanContext->swapchainSize.height) { + if (w != (int)vulkanContext->swapchainSize.width || h != (int)vulkanContext->swapchainSize.height) { return createNewSwapchainAndSwapchainSpecificStuff(); } return SDL_TRUE; @@ -1087,7 +1092,7 @@ int main(int argc, char **argv) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if(!state) { + if (state == NULL) { return 1; } @@ -1117,7 +1122,7 @@ int main(int argc, char **argv) while (!done) { /* Check for events */ frames++; - while(SDL_PollEvent(&event)) { + while (SDL_PollEvent(&event)) { /* Need to destroy the swapchain before the window created * by SDL. */ diff --git a/modules/SDL2/test/testwm2.c b/modules/SDL2/test/testwm2.c index 105e35d..7fc189b 100644 --- a/modules/SDL2/test/testwm2.c +++ b/modules/SDL2/test/testwm2.c @@ -24,18 +24,18 @@ static SDLTest_CommonState *state; int done; static const char *cursorNames[] = { - "arrow", - "ibeam", - "wait", - "crosshair", - "waitarrow", - "sizeNWSE", - "sizeNESW", - "sizeWE", - "sizeNS", - "sizeALL", - "NO", - "hand", + "arrow", + "ibeam", + "wait", + "crosshair", + "waitarrow", + "sizeNWSE", + "sizeNESW", + "sizeWE", + "sizeNS", + "sizeALL", + "NO", + "hand", }; int system_cursor = -1; SDL_Cursor *cursor = NULL; @@ -83,12 +83,12 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_Rect viewport) y += lineHeight; - SDL_snprintf(text, sizeof(text), "Click on a mode to set it with SDL_SetWindowDisplayMode"); + SDL_strlcpy(text, "Click on a mode to set it with SDL_SetWindowDisplayMode", sizeof(text)); SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); SDLTest_DrawString(renderer, x, y, text); y += lineHeight; - SDL_snprintf(text, sizeof(text), "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN"); + SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof(text)); SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); SDLTest_DrawString(renderer, x, y, text); y += lineHeight; @@ -107,14 +107,14 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_Rect viewport) return; } - SDL_snprintf(text, sizeof(text), "%d: %dx%d@%dHz", - i, mode.w, mode.h, mode.refresh_rate); + (void)SDL_snprintf(text, sizeof(text), "%d: %dx%d@%dHz", + i, mode.w, mode.h, mode.refresh_rate); /* Update column width */ text_length = (int)SDL_strlen(text); column_chars = SDL_max(column_chars, text_length); - /* Check if under mouse */ + /* Check if under mouse */ cell_rect.x = x; cell_rect.y = y; cell_rect.w = text_length * FONT_CHARACTER_SIZE; @@ -143,108 +143,107 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_Rect viewport) } } -void -loop() +void loop() { int i; SDL_Event event; - /* Check for events */ - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - - if (event.type == SDL_WINDOWEVENT) { - if (event.window.event == SDL_WINDOWEVENT_RESIZED) { - SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); - if (window) { - SDL_Log("Window %" SDL_PRIu32 " resized to %" SDL_PRIs32 "x%" SDL_PRIs32 "\n", - event.window.windowID, - event.window.data1, - event.window.data2); - } + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + + if (event.type == SDL_WINDOWEVENT) { + if (event.window.event == SDL_WINDOWEVENT_RESIZED) { + SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); + if (window) { + SDL_Log("Window %" SDL_PRIu32 " resized to %" SDL_PRIs32 "x%" SDL_PRIs32 "\n", + event.window.windowID, + event.window.data1, + event.window.data2); } - if (event.window.event == SDL_WINDOWEVENT_MOVED) { - SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); - if (window) { - SDL_Log("Window %" SDL_PRIu32 " moved to %" SDL_PRIs32 ",%" SDL_PRIs32 " (display %s)\n", - event.window.windowID, - event.window.data1, - event.window.data2, - SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window))); - } + } + if (event.window.event == SDL_WINDOWEVENT_MOVED) { + SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); + if (window) { + SDL_Log("Window %" SDL_PRIu32 " moved to %" SDL_PRIs32 ",%" SDL_PRIs32 " (display %s)\n", + event.window.windowID, + event.window.data1, + event.window.data2, + SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window))); } - if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) { - relative_mode = SDL_GetRelativeMouseMode(); - if (relative_mode) { - SDL_SetRelativeMouseMode(SDL_FALSE); - } + } + if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) { + relative_mode = SDL_GetRelativeMouseMode(); + if (relative_mode) { + SDL_SetRelativeMouseMode(SDL_FALSE); } - if (event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { - if (relative_mode) { - SDL_SetRelativeMouseMode(SDL_TRUE); - } + } + if (event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { + if (relative_mode) { + SDL_SetRelativeMouseMode(SDL_TRUE); } } - if (event.type == SDL_KEYUP) { - SDL_bool updateCursor = SDL_FALSE; - - if (event.key.keysym.sym == SDLK_LEFT) { - --system_cursor; - if (system_cursor < 0) { - system_cursor = SDL_NUM_SYSTEM_CURSORS - 1; - } - updateCursor = SDL_TRUE; - } else if (event.key.keysym.sym == SDLK_RIGHT) { - ++system_cursor; - if (system_cursor >= SDL_NUM_SYSTEM_CURSORS) { - system_cursor = 0; - } - updateCursor = SDL_TRUE; + } + if (event.type == SDL_KEYUP) { + SDL_bool updateCursor = SDL_FALSE; + + if (event.key.keysym.sym == SDLK_LEFT) { + --system_cursor; + if (system_cursor < 0) { + system_cursor = SDL_NUM_SYSTEM_CURSORS - 1; } - if (updateCursor) { - SDL_Log("Changing cursor to \"%s\"", cursorNames[system_cursor]); - SDL_FreeCursor(cursor); - cursor = SDL_CreateSystemCursor((SDL_SystemCursor)system_cursor); - SDL_SetCursor(cursor); + updateCursor = SDL_TRUE; + } else if (event.key.keysym.sym == SDLK_RIGHT) { + ++system_cursor; + if (system_cursor >= SDL_NUM_SYSTEM_CURSORS) { + system_cursor = 0; } + updateCursor = SDL_TRUE; + } + if (updateCursor) { + SDL_Log("Changing cursor to \"%s\"", cursorNames[system_cursor]); + SDL_FreeCursor(cursor); + cursor = SDL_CreateSystemCursor((SDL_SystemCursor)system_cursor); + SDL_SetCursor(cursor); } - if (event.type == SDL_MOUSEBUTTONUP) { - SDL_Window* window = SDL_GetMouseFocus(); - if (highlighted_mode != -1 && window != NULL) { - const int display_index = SDL_GetWindowDisplayIndex(window); - SDL_DisplayMode mode; - if (0 != SDL_GetDisplayMode(display_index, highlighted_mode, &mode)) { - SDL_Log("Couldn't get display mode"); - } else { - SDL_SetWindowDisplayMode(window, &mode); - } + } + if (event.type == SDL_MOUSEBUTTONUP) { + SDL_Window *window = SDL_GetMouseFocus(); + if (highlighted_mode != -1 && window != NULL) { + const int display_index = SDL_GetWindowDisplayIndex(window); + SDL_DisplayMode mode; + if (0 != SDL_GetDisplayMode(display_index, highlighted_mode, &mode)) { + SDL_Log("Couldn't get display mode"); + } else { + SDL_SetWindowDisplayMode(window, &mode); } } } + } - for (i = 0; i < state->num_windows; ++i) { - SDL_Window* window = state->windows[i]; - SDL_Renderer *renderer = state->renderers[i]; - if (window != NULL && renderer != NULL) { - int y = 0; - SDL_Rect viewport, menurect; + for (i = 0; i < state->num_windows; ++i) { + SDL_Window *window = state->windows[i]; + SDL_Renderer *renderer = state->renderers[i]; + if (window != NULL && renderer != NULL) { + int y = 0; + SDL_Rect viewport, menurect; - SDL_RenderGetViewport(renderer, &viewport); + SDL_RenderGetViewport(renderer, &viewport); - SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); - SDL_RenderClear(renderer); + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); + SDL_RenderClear(renderer); - SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); - SDLTest_CommonDrawWindowInfo(renderer, state->windows[i], &y); + SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); + SDLTest_CommonDrawWindowInfo(renderer, state->windows[i], &y); - menurect.x = 0; - menurect.y = y; - menurect.w = viewport.w; - menurect.h = viewport.h - y; - draw_modes_menu(window, renderer, menurect); + menurect.x = 0; + menurect.y = y; + menurect.w = viewport.w; + menurect.h = viewport.h - y; + draw_modes_menu(window, renderer, menurect); - SDL_RenderPresent(renderer); - } + SDL_RenderPresent(renderer); } + } #ifdef __EMSCRIPTEN__ if (done) { emscripten_cancel_main_loop(); @@ -252,8 +251,7 @@ loop() #endif } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; @@ -264,7 +262,7 @@ main(int argc, char *argv[]) /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { + if (state == NULL) { return 1; } @@ -281,7 +279,7 @@ main(int argc, char *argv[]) SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); } - + /* Main render loop */ done = 0; #ifdef __EMSCRIPTEN__ @@ -295,7 +293,7 @@ main(int argc, char *argv[]) quit(0); /* keep the compiler happy ... */ - return(0); + return 0; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/modules/SDL2/test/testyuv.c b/modules/SDL2/test/testyuv.c index e085edf..e7373a8 100644 --- a/modules/SDL2/test/testyuv.c +++ b/modules/SDL2/test/testyuv.c @@ -17,17 +17,13 @@ #include "SDL_test_font.h" #include "testyuv_cvt.h" - /* 422 (YUY2, etc) formats are the largest */ -#define MAX_YUV_SURFACE_SIZE(W, H, P) (H*4*(W+P+1)/2) - +#define MAX_YUV_SURFACE_SIZE(W, H, P) (H * 4 * (W + P + 1) / 2) /* Return true if the YUV format is packed pixels */ static SDL_bool is_packed_yuv_format(Uint32 format) { - return (format == SDL_PIXELFORMAT_YUY2 || - format == SDL_PIXELFORMAT_UYVY || - format == SDL_PIXELFORMAT_YVYU); + return format == SDL_PIXELFORMAT_YUY2 || format == SDL_PIXELFORMAT_UYVY || format == SDL_PIXELFORMAT_YVYU; } /* Create a surface with a good pattern for verifying YUV conversion */ @@ -38,12 +34,12 @@ static SDL_Surface *generate_test_pattern(int pattern_size) if (pattern) { int i, x, y; Uint8 *p, c; - const int thickness = 2; /* Important so 2x2 blocks of color are the same, to avoid Cr/Cb interpolation over pixels */ + const int thickness = 2; /* Important so 2x2 blocks of color are the same, to avoid Cr/Cb interpolation over pixels */ /* R, G, B in alternating horizontal bands */ for (y = 0; y < pattern->h; y += thickness) { for (i = 0; i < thickness; ++i) { - p = (Uint8 *)pattern->pixels + (y + i) * pattern->pitch + ((y/thickness) % 3); + p = (Uint8 *)pattern->pixels + (y + i) * pattern->pitch + ((y / thickness) % 3); for (x = 0; x < pattern->w; ++x) { *p = 0xFF; p += 3; @@ -53,9 +49,9 @@ static SDL_Surface *generate_test_pattern(int pattern_size) /* Black and white in alternating vertical bands */ c = 0xFF; - for (x = 1*thickness; x < pattern->w; x += 2*thickness) { + for (x = 1 * thickness; x < pattern->w; x += 2 * thickness) { for (i = 0; i < thickness; ++i) { - p = (Uint8 *)pattern->pixels + (x + i)*3; + p = (Uint8 *)pattern->pixels + (x + i) * 3; for (y = 0; y < pattern->h; ++y) { SDL_memset(p, c, 3); p += pattern->pitch; @@ -79,7 +75,7 @@ static SDL_bool verify_yuv_data(Uint32 format, const Uint8 *yuv, int yuv_pitch, SDL_bool result = SDL_FALSE; rgb = (Uint8 *)SDL_malloc(size); - if (!rgb) { + if (rgb == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory"); return SDL_FALSE; } @@ -129,8 +125,8 @@ static int run_automated_tests(int pattern_size, int extra_pitch) Uint8 *yuv2 = (Uint8 *)SDL_malloc(yuv_len); int yuv1_pitch, yuv2_pitch; int result = -1; - - if (!pattern || !yuv1 || !yuv2) { + + if (pattern == NULL || yuv1 == NULL || yuv2 == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't allocate test surfaces"); goto done; } @@ -206,7 +202,6 @@ static int run_automated_tests(int pattern_size, int extra_pitch) } } - result = 0; done: @@ -216,10 +211,10 @@ done: return result; } -int -main(int argc, char **argv) +int main(int argc, char **argv) { - struct { + struct + { SDL_bool enable_intrinsics; int pattern_size; int extra_pitch; @@ -315,10 +310,10 @@ main(int argc, char **argv) /* Run automated tests */ if (should_run_automated_tests) { for (i = 0; i < SDL_arraysize(automated_test_params); ++i) { - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Running automated test, pattern size %d, extra pitch %d, intrinsics %s\n", - automated_test_params[i].pattern_size, - automated_test_params[i].extra_pitch, - automated_test_params[i].enable_intrinsics ? "enabled" : "disabled"); + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Running automated test, pattern size %d, extra pitch %d, intrinsics %s\n", + automated_test_params[i].pattern_size, + automated_test_params[i].extra_pitch, + automated_test_params[i].enable_intrinsics ? "enabled" : "disabled"); if (run_automated_tests(automated_test_params[i].pattern_size, automated_test_params[i].extra_pitch) < 0) { return 2; } @@ -332,42 +327,42 @@ main(int argc, char **argv) filename = "testyuv.bmp"; } original = SDL_ConvertSurfaceFormat(SDL_LoadBMP(filename), SDL_PIXELFORMAT_RGB24, 0); - if (!original) { + if (original == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError()); return 3; } raw_yuv = SDL_calloc(1, MAX_YUV_SURFACE_SIZE(original->w, original->h, 0)); ConvertRGBtoYUV(yuv_format, original->pixels, original->pitch, raw_yuv, original->w, original->h, - SDL_GetYUVConversionModeForResolution(original->w, original->h), - 0, 100); + SDL_GetYUVConversionModeForResolution(original->w, original->h), + 0, 100); pitch = CalculateYUVPitch(yuv_format, original->w); converted = SDL_CreateRGBSurfaceWithFormat(0, original->w, original->h, 0, rgb_format); - if (!converted) { + if (converted == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create converted surface: %s\n", SDL_GetError()); return 3; } then = SDL_GetTicks(); - for ( i = 0; i < iterations; ++i ) { + for (i = 0; i < iterations; ++i) { SDL_ConvertPixels(original->w, original->h, yuv_format, raw_yuv, pitch, rgb_format, converted->pixels, converted->pitch); } now = SDL_GetTicks(); - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "%" SDL_PRIu32 " iterations in %" SDL_PRIu32 " ms, %.2fms each\n", iterations, (now - then), (float) (now - then) / iterations); + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "%" SDL_PRIu32 " iterations in %" SDL_PRIu32 " ms, %.2fms each\n", iterations, (now - then), (float)(now - then) / iterations); window = SDL_CreateWindow("YUV test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, original->w, original->h, 0); - if (!window) { + if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); return 4; } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (renderer == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); return 4; } @@ -380,7 +375,7 @@ main(int argc, char **argv) return 5; } SDL_UpdateTexture(output[2], NULL, raw_yuv, pitch); - + yuv_name = SDL_GetPixelFormatName(yuv_format); if (SDL_strncmp(yuv_name, "SDL_PIXELFORMAT_", 16) == 0) { yuv_name += 16; @@ -401,9 +396,9 @@ main(int argc, char **argv) break; } - { int done = 0; - while ( !done ) - { + { + int done = 0; + while (!done) { SDL_Event event; while (SDL_PollEvent(&event) > 0) { if (event.type == SDL_QUIT) { @@ -419,7 +414,7 @@ main(int argc, char **argv) } } if (event.type == SDL_MOUSEBUTTONDOWN) { - if (event.button.x < (original->w/2)) { + if (event.button.x < (original->w / 2)) { --current; } else { ++current; @@ -441,7 +436,7 @@ main(int argc, char **argv) if (current == 0) { SDLTest_DrawString(renderer, 4, 4, titles[current]); } else { - SDL_snprintf(title, sizeof(title), "%s %s %s", titles[current], yuv_name, yuv_mode); + (void)SDL_snprintf(title, sizeof(title), "%s %s %s", titles[current], yuv_name, yuv_mode); SDLTest_DrawString(renderer, 4, 4, title); } SDL_RenderPresent(renderer); diff --git a/modules/SDL2/test/testyuv_cvt.c b/modules/SDL2/test/testyuv_cvt.c index 9b5d89d..3bd2df3 100644 --- a/modules/SDL2/test/testyuv_cvt.c +++ b/modules/SDL2/test/testyuv_cvt.c @@ -14,13 +14,12 @@ #include "testyuv_cvt.h" - static float clip3(float x, float y, float z) { - return ((z < x) ? x : ((z > y) ? y : z)); + return (z < x) ? x : ((z > y) ? y : z); } -static void RGBtoYUV(Uint8 * rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance) +static void RGBtoYUV(const Uint8 *rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance) { if (mode == SDL_YUV_CONVERSION_JPEG) { /* Full range YUV */ @@ -52,9 +51,9 @@ static void RGBtoYUV(Uint8 * rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int mo G = rgb[1]; B = rgb[2]; L = Kr * R + Kb * B + (1 - Kr - Kb) * G; - Y = (Uint8)SDL_floorf((219*(L-Z)/S + 16) + 0.5f); - U = (Uint8)clip3(0, 255, SDL_floorf((112.0f*(B-L) / ((1.0f-Kb)*S) + 128) + 0.5f)); - V = (Uint8)clip3(0, 255, SDL_floorf((112.0f*(R-L) / ((1.0f-Kr)*S) + 128) + 0.5f)); + Y = (Uint8)SDL_floorf((219 * (L - Z) / S + 16) + 0.5f); + U = (Uint8)clip3(0, 255, SDL_floorf((112.0f * (B - L) / ((1.0f - Kb) * S) + 128) + 0.5f)); + V = (Uint8)clip3(0, 255, SDL_floorf((112.0f * (R - L) / ((1.0f - Kr) * S) + 128) + 0.5f)); yuv[0] = (Uint8)Y; yuv[1] = (Uint8)U; @@ -68,8 +67,9 @@ static void RGBtoYUV(Uint8 * rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int mo if (luminance != 100) { yuv[0] = yuv[0] * luminance / 100; - if (yuv[0] > 255) + if (yuv[0] > 255) { yuv[0] = 255; + } } } @@ -79,7 +79,7 @@ static void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *o int yuv[4][3]; Uint8 *Y1, *Y2, *U, *V; Uint8 *rgb1, *rgb2; - int rgb_row_advance = (pitch - w*3) + pitch; + int rgb_row_advance = (pitch - w * 3) + pitch; int UV_advance; rgb1 = src; @@ -90,12 +90,12 @@ static void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *o switch (format) { case SDL_PIXELFORMAT_YV12: V = (Y1 + h * w); - U = V + ((h + 1)/2)*((w + 1)/2); + U = V + ((h + 1) / 2) * ((w + 1) / 2); UV_advance = 1; break; case SDL_PIXELFORMAT_IYUV: U = (Y1 + h * w); - V = U + ((h + 1)/2)*((w + 1)/2); + V = U + ((h + 1) / 2) * ((w + 1) / 2); UV_advance = 1; break; case SDL_PIXELFORMAT_NV12: @@ -131,10 +131,10 @@ static void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *o rgb2 += 3; *Y2++ = (Uint8)yuv[3][0]; - *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1] + yuv[2][1] + yuv[3][1])/4.0f + 0.5f); + *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1] + yuv[2][1] + yuv[3][1]) / 4.0f + 0.5f); U += UV_advance; - *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2] + yuv[2][2] + yuv[3][2])/4.0f + 0.5f); + *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2] + yuv[2][2] + yuv[3][2]) / 4.0f + 0.5f); V += UV_advance; } /* Last column */ @@ -147,10 +147,10 @@ static void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *o rgb2 += 3; *Y2++ = (Uint8)yuv[2][0]; - *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[2][1])/2.0f + 0.5f); + *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[2][1]) / 2.0f + 0.5f); U += UV_advance; - *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[2][2])/2.0f + 0.5f); + *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[2][2]) / 2.0f + 0.5f); V += UV_advance; } Y1 += w; @@ -169,10 +169,10 @@ static void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *o rgb1 += 3; *Y1++ = (Uint8)yuv[1][0]; - *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1])/2.0f + 0.5f); + *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1]) / 2.0f + 0.5f); U += UV_advance; - *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2])/2.0f + 0.5f); + *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2]) / 2.0f + 0.5f); V += UV_advance; } /* Last column */ @@ -195,28 +195,28 @@ static void ConvertRGBtoPacked4(Uint32 format, Uint8 *src, int pitch, Uint8 *out int yuv[2][3]; Uint8 *Y1, *Y2, *U, *V; Uint8 *rgb; - int rgb_row_advance = (pitch - w*3); + int rgb_row_advance = (pitch - w * 3); rgb = src; switch (format) { case SDL_PIXELFORMAT_YUY2: Y1 = out; - U = out+1; - Y2 = out+2; - V = out+3; + U = out + 1; + Y2 = out + 2; + V = out + 3; break; case SDL_PIXELFORMAT_UYVY: U = out; - Y1 = out+1; - V = out+2; - Y2 = out+3; + Y1 = out + 1; + V = out + 2; + Y2 = out + 3; break; case SDL_PIXELFORMAT_YVYU: Y1 = out; - V = out+1; - Y2 = out+2; - U = out+3; + V = out + 1; + Y2 = out + 2; + U = out + 3; break; default: SDL_assert(!"Unsupported packed YUV format"); @@ -235,10 +235,10 @@ static void ConvertRGBtoPacked4(Uint32 format, Uint8 *src, int pitch, Uint8 *out *Y2 = (Uint8)yuv[1][0]; Y2 += 4; - *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1])/2.0f + 0.5f); + *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1]) / 2.0f + 0.5f); U += 4; - *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2])/2.0f + 0.5f); + *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2]) / 2.0f + 0.5f); V += 4; } /* Last column */ @@ -261,8 +261,7 @@ static void ConvertRGBtoPacked4(Uint32 format, Uint8 *src, int pitch, Uint8 *out SDL_bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance) { - switch (format) - { + switch (format) { case SDL_PIXELFORMAT_YV12: case SDL_PIXELFORMAT_IYUV: case SDL_PIXELFORMAT_NV12: @@ -281,8 +280,7 @@ SDL_bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w int CalculateYUVPitch(Uint32 format, int width) { - switch (format) - { + switch (format) { case SDL_PIXELFORMAT_YV12: case SDL_PIXELFORMAT_IYUV: case SDL_PIXELFORMAT_NV12: @@ -291,7 +289,7 @@ int CalculateYUVPitch(Uint32 format, int width) case SDL_PIXELFORMAT_YUY2: case SDL_PIXELFORMAT_UYVY: case SDL_PIXELFORMAT_YVYU: - return 4*((width + 1)/2); + return 4 * ((width + 1) / 2); default: return 0; } diff --git a/modules/SDL2/test/torturethread.c b/modules/SDL2/test/torturethread.c index 87ab763..1976800 100644 --- a/modules/SDL2/test/torturethread.c +++ b/modules/SDL2/test/torturethread.c @@ -34,8 +34,8 @@ quit(int rc) int SDLCALL SubThreadFunc(void *data) { - while (!*(int volatile *) data) { - ; /* SDL_Delay(10); *//* do nothing */ + while (!*(int volatile *)data) { + ; /* SDL_Delay(10); */ /* do nothing */ } return 0; } @@ -46,20 +46,20 @@ ThreadFunc(void *data) SDL_Thread *sub_threads[NUMTHREADS]; int flags[NUMTHREADS]; int i; - int tid = (int) (uintptr_t) data; + int tid = (int)(uintptr_t)data; SDL_Log("Creating Thread %d\n", tid); for (i = 0; i < NUMTHREADS; i++) { char name[64]; - SDL_snprintf(name, sizeof (name), "Child%d_%d", tid, i); + (void)SDL_snprintf(name, sizeof(name), "Child%d_%d", tid, i); flags[i] = 0; sub_threads[i] = SDL_CreateThread(SubThreadFunc, name, &flags[i]); } SDL_Log("Thread '%d' waiting for signal\n", tid); while (SDL_AtomicGet(&time_for_threads_to_die[tid]) != 1) { - ; /* do nothing */ + ; /* do nothing */ } SDL_Log("Thread '%d' sending signals to subthreads\n", tid); @@ -73,8 +73,7 @@ ThreadFunc(void *data) return 0; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { SDL_Thread *threads[NUMTHREADS]; int i; @@ -85,15 +84,15 @@ main(int argc, char *argv[]) /* Load the SDL library */ if (SDL_Init(0) < 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); + return 1; } - signal(SIGSEGV, SIG_DFL); + (void)signal(SIGSEGV, SIG_DFL); for (i = 0; i < NUMTHREADS; i++) { char name[64]; - SDL_snprintf(name, sizeof (name), "Parent%d", i); + (void)SDL_snprintf(name, sizeof(name), "Parent%d", i); SDL_AtomicSet(&time_for_threads_to_die[i], 0); - threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i); + threads[i] = SDL_CreateThread(ThreadFunc, name, (void *)(uintptr_t)i); if (threads[i] == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); @@ -109,5 +108,5 @@ main(int argc, char *argv[]) SDL_WaitThread(threads[i], NULL); } SDL_Quit(); - return (0); + return 0; } diff --git a/modules/SDL2/wayland-protocols/fractional-scale-v1.xml b/modules/SDL2/wayland-protocols/fractional-scale-v1.xml new file mode 100644 index 0000000..350bfc0 --- /dev/null +++ b/modules/SDL2/wayland-protocols/fractional-scale-v1.xml @@ -0,0 +1,102 @@ + + + + Copyright © 2022 Kenny Levinsen + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol allows a compositor to suggest for surfaces to render at + fractional scales. + + A client can submit scaled content by utilizing wp_viewport. This is done by + creating a wp_viewport object for the surface and setting the destination + rectangle to the surface size before the scale factor is applied. + + The buffer size is calculated by multiplying the surface size by the + intended scale. + + The wl_surface buffer scale should remain set to 1. + + If a surface has a surface-local size of 100 px by 50 px and wishes to + submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should + be used and the wp_viewport destination rectangle should be 100 px by 50 px. + + For toplevel surfaces, the size is rounded halfway away from zero. The + rounding algorithm for subsurface position and size is not defined. + + + + + A global interface for requesting surfaces to use fractional scales. + + + + + Informs the server that the client will not be using this protocol + object anymore. This does not affect any other objects, + wp_fractional_scale_v1 objects included. + + + + + + + + + + Create an add-on object for the the wl_surface to let the compositor + request fractional scales. If the given wl_surface already has a + wp_fractional_scale_v1 object associated, the fractional_scale_exists + protocol error is raised. + + + + + + + + + An additional interface to a wl_surface object which allows the compositor + to inform the client of the preferred scale. + + + + + Destroy the fractional scale object. When this object is destroyed, + preferred_scale events will no longer be sent. + + + + + + Notification of a new preferred scale for this surface that the + compositor suggests that the client should use. + + The sent scale is the numerator of a fraction with a denominator of 120. + + + + + diff --git a/modules/antkeeper-source b/modules/antkeeper-source index f25e7ce..d027b2d 160000 --- a/modules/antkeeper-source +++ b/modules/antkeeper-source @@ -1 +1 @@ -Subproject commit f25e7ce98639a5666aecda993e444c634e03f66d +Subproject commit d027b2daf669fc02eece47f3832d63ac18fce1cd diff --git a/modules/stb/stb_image.h b/modules/stb/stb_image.h index d60371b..5e807a0 100644 --- a/modules/stb/stb_image.h +++ b/modules/stb/stb_image.h @@ -1,4 +1,4 @@ -/* stb_image - v2.27 - public domain image loader - http://nothings.org/stb +/* stb_image - v2.28 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: @@ -48,6 +48,7 @@ LICENSE RECENT REVISION HISTORY: + 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes 2.26 (2020-07-13) many minor fixes 2.25 (2020-02-02) fix warnings @@ -108,7 +109,7 @@ RECENT REVISION HISTORY: Cass Everitt Ryamond Barbiero github:grim210 Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw Philipp Wiesemann Dale Weiler Oriol Ferrer Mesia github:phprus - Josh Tobin Matthew Gregan github:poppolopoppo + Josh Tobin Neil Bickford Matthew Gregan github:poppolopoppo Julian Raschke Gregory Mullen Christian Floisand github:darealshinji Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007 Brad Weinberger Matvey Cherevko github:mosra @@ -140,7 +141,7 @@ RECENT REVISION HISTORY: // // ... x = width, y = height, n = # 8-bit components per pixel ... // // ... replace '0' with '1'..'4' to force that many components per pixel // // ... but 'n' will always be the number that it would have been if you said 0 -// stbi_image_free(data) +// stbi_image_free(data); // // Standard parameters: // int *x -- outputs image width in pixels @@ -635,7 +636,7 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch #endif #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__SYMBIAN32__) typedef unsigned short stbi__uint16; typedef signed short stbi__int16; typedef unsigned int stbi__uint32; @@ -1063,6 +1064,23 @@ static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) } #endif +// returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow. +static int stbi__addints_valid(int a, int b) +{ + if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow + if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. + return a <= INT_MAX - b; +} + +// returns 1 if the product of two signed shorts is valid, 0 on overflow. +static int stbi__mul2shorts_valid(short a, short b) +{ + if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow + if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid + if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN + return a >= SHRT_MIN / b; +} + // stbi__err - error // stbi__errpf - error returning pointer to float // stbi__errpuc - error returning pointer to unsigned char @@ -1985,9 +2003,12 @@ static int stbi__build_huffman(stbi__huffman *h, int *count) int i,j,k=0; unsigned int code; // build size list for each symbol (from JPEG spec) - for (i=0; i < 16; ++i) - for (j=0; j < count[i]; ++j) + for (i=0; i < 16; ++i) { + for (j=0; j < count[i]; ++j) { h->size[k++] = (stbi_uc) (i+1); + if(k >= 257) return stbi__err("bad size list","Corrupt JPEG"); + } + } h->size[k] = 0; // compute actual symbols (from jpeg spec) @@ -2112,6 +2133,8 @@ stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) // convert the huffman code to the symbol id c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; + if(c < 0 || c >= 256) // symbol id out of bounds! + return -1; STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); // convert the id to a symbol @@ -2130,6 +2153,7 @@ stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n) unsigned int k; int sgn; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); + if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) k = stbi_lrot(j->code_buffer, n); @@ -2144,6 +2168,7 @@ stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) { unsigned int k; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); + if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; @@ -2155,6 +2180,7 @@ stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) { unsigned int k; if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); + if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing k = j->code_buffer; j->code_buffer <<= 1; --j->code_bits; @@ -2192,8 +2218,10 @@ static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman memset(data,0,64*sizeof(data[0])); diff = t ? stbi__extend_receive(j, t) : 0; + if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta","Corrupt JPEG"); dc = j->img_comp[b].dc_pred + diff; j->img_comp[b].dc_pred = dc; + if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); data[0] = (short) (dc * dequant[0]); // decode AC components, see JPEG spec @@ -2207,6 +2235,7 @@ static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman if (r) { // fast-AC path k += (r >> 4) & 15; // run s = r & 15; // combined length + if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); j->code_buffer <<= s; j->code_bits -= s; // decode into unzigzag'd location @@ -2246,8 +2275,10 @@ static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__ if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); diff = t ? stbi__extend_receive(j, t) : 0; + if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); dc = j->img_comp[b].dc_pred + diff; j->img_comp[b].dc_pred = dc; + if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); data[0] = (short) (dc * (1 << j->succ_low)); } else { // refinement scan for DC coefficient @@ -2282,6 +2313,7 @@ static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__ if (r) { // fast-AC path k += (r >> 4) & 15; // run s = r & 15; // combined length + if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); j->code_buffer <<= s; j->code_bits -= s; zig = stbi__jpeg_dezigzag[k++]; @@ -3102,6 +3134,7 @@ static int stbi__process_marker(stbi__jpeg *z, int m) sizes[i] = stbi__get8(z->s); n += sizes[i]; } + if(n > 256) return stbi__err("bad DHT header","Corrupt JPEG"); // Loop over i < n would write past end of values! L -= 17; if (tc == 0) { if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; @@ -3351,6 +3384,28 @@ static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) return 1; } +static int stbi__skip_jpeg_junk_at_end(stbi__jpeg *j) +{ + // some JPEGs have junk at end, skip over it but if we find what looks + // like a valid marker, resume there + while (!stbi__at_eof(j->s)) { + int x = stbi__get8(j->s); + while (x == 255) { // might be a marker + if (stbi__at_eof(j->s)) return STBI__MARKER_none; + x = stbi__get8(j->s); + if (x != 0x00 && x != 0xff) { + // not a stuffed zero or lead-in to another marker, looks + // like an actual marker, return it + return x; + } + // stuffed zero has x=0 now which ends the loop, meaning we go + // back to regular scan loop. + // repeated 0xff keeps trying to read the next byte of the marker. + } + } + return STBI__MARKER_none; +} + // decode image to YCbCr format static int stbi__decode_jpeg_image(stbi__jpeg *j) { @@ -3367,25 +3422,22 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j) if (!stbi__process_scan_header(j)) return 0; if (!stbi__parse_entropy_coded_data(j)) return 0; if (j->marker == STBI__MARKER_none ) { - // handle 0s at the end of image data from IP Kamera 9060 - while (!stbi__at_eof(j->s)) { - int x = stbi__get8(j->s); - if (x == 255) { - j->marker = stbi__get8(j->s); - break; - } - } + j->marker = stbi__skip_jpeg_junk_at_end(j); // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 } + m = stbi__get_marker(j); + if (STBI__RESTART(m)) + m = stbi__get_marker(j); } else if (stbi__DNL(m)) { int Ld = stbi__get16be(j->s); stbi__uint32 NL = stbi__get16be(j->s); if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); + m = stbi__get_marker(j); } else { - if (!stbi__process_marker(j, m)) return 0; + if (!stbi__process_marker(j, m)) return 1; + m = stbi__get_marker(j); } - m = stbi__get_marker(j); } if (j->progressive) stbi__jpeg_finish(j); @@ -3976,6 +4028,7 @@ static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int re unsigned char* result; stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); if (!j) return stbi__errpuc("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); STBI_NOTUSED(ri); j->s = s; stbi__setup_jpeg(j); @@ -3989,6 +4042,7 @@ static int stbi__jpeg_test(stbi__context *s) int r; stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); if (!j) return stbi__err("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); j->s = s; stbi__setup_jpeg(j); r = stbi__decode_jpeg_header(j, STBI__SCAN_type); @@ -4014,6 +4068,7 @@ static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) int result; stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); if (!j) return stbi__err("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); j->s = s; result = stbi__jpeg_info_raw(j, x, y, comp); STBI_FREE(j); @@ -4256,11 +4311,12 @@ static int stbi__parse_huffman_block(stbi__zbuf *a) a->zout = zout; return 1; } + if (z >= 286) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data z -= 257; len = stbi__zlength_base[z]; if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); z = stbi__zhuffman_decode(a, &a->z_distance); - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); + if (z < 0 || z >= 30) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data dist = stbi__zdist_base[z]; if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); @@ -4955,7 +5011,7 @@ STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -STBIDEF void stbi__unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) +STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) { stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; stbi__unpremultiply_on_load_set = 1; @@ -5064,14 +5120,13 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) if (!pal_img_n) { s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - if (scan == STBI__SCAN_header) return 1; } else { // if paletted, then pal_n is our final components, and // img_n is # components to decompress/filter. s->img_n = 1; if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); - // if SCAN_header, have to scan to see if we have a tRNS } + // even with SCAN_header, have to scan to see if we have a tRNS break; } @@ -5103,6 +5158,8 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); has_trans = 1; + // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. + if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } if (z->depth == 16) { for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is } else { @@ -5115,7 +5172,13 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) case STBI__PNG_TYPE('I','D','A','T'): { if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); - if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; } + if (scan == STBI__SCAN_header) { + // header scan definitely stops at first IDAT + if (pal_img_n) + s->img_n = pal_img_n; + return 1; + } + if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); if ((int)(ioff + c.length) < (int)ioff) return 0; if (ioff + c.length > idata_limit) { stbi__uint32 idata_limit_old = idata_limit; @@ -5498,8 +5561,22 @@ static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req psize = (info.offset - info.extra_read - info.hsz) >> 2; } if (psize == 0) { - if (info.offset != s->callback_already_read + (s->img_buffer - s->img_buffer_original)) { - return stbi__errpuc("bad offset", "Corrupt BMP"); + // accept some number of extra bytes after the header, but if the offset points either to before + // the header ends or implies a large amount of extra data, reject the file as malformed + int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); + int header_limit = 1024; // max we actually read is below 256 bytes currently. + int extra_data_limit = 256*4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. + if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { + return stbi__errpuc("bad header", "Corrupt BMP"); + } + // we established that bytes_read_so_far is positive and sensible. + // the first half of this test rejects offsets that are either too small positives, or + // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn + // ensures the number computed in the second half of the test can't overflow. + if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { + return stbi__errpuc("bad offset", "Corrupt BMP"); + } else { + stbi__skip(s, info.offset - bytes_read_so_far); } } @@ -7187,12 +7264,12 @@ static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int re // Run value = stbi__get8(s); count -= 128; - if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = value; } else { // Dump - if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = stbi__get8(s); } @@ -7446,10 +7523,17 @@ static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); if (!out) return stbi__errpuc("outofmem", "Out of memory"); - stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8)); + if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { + STBI_FREE(out); + return stbi__errpuc("bad PNM", "PNM file truncated"); + } if (req_comp && req_comp != s->img_n) { - out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); + if (ri->bits_per_channel == 16) { + out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); + } else { + out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); + } if (out == NULL) return out; // stbi__convert_format frees input on failure } return out; @@ -7486,6 +7570,8 @@ static int stbi__pnm_getinteger(stbi__context *s, char *c) while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); + if((value > 214748364) || (value == 214748364 && *c > '7')) + return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; @@ -7516,9 +7602,13 @@ static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) stbi__pnm_skip_whitespace(s, &c); *x = stbi__pnm_getinteger(s, &c); // read width + if(*x == 0) + return stbi__err("invalid width", "PPM image header had zero or overflowing width"); stbi__pnm_skip_whitespace(s, &c); *y = stbi__pnm_getinteger(s, &c); // read height + if (*y == 0) + return stbi__err("invalid width", "PPM image header had zero or overflowing width"); stbi__pnm_skip_whitespace(s, &c); maxv = stbi__pnm_getinteger(s, &c); // read max value